content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
expected_output = { "ap": { "ayod-1815i" : { "number_of_sgts_referred_by_the_ap": 2, "sgts": { "UNKNOWN(0)": { "policy_pushed_to_ap": "NO", "no_of_clients": 0 }, "DEFAULT(65535)": { "policy_pushed_to_ap": "NO", "no_of_clients": 0 } } } } }
expected_output = {'ap': {'ayod-1815i': {'number_of_sgts_referred_by_the_ap': 2, 'sgts': {'UNKNOWN(0)': {'policy_pushed_to_ap': 'NO', 'no_of_clients': 0}, 'DEFAULT(65535)': {'policy_pushed_to_ap': 'NO', 'no_of_clients': 0}}}}}
class Node: def __init__(self, item): self.item = item self.next = None class Queue: def __init__(self): self.head = None self.tail = None def enqueue(self, item): if self.head is None: self.head = Node(item) self.tail = Node(item) else: new_node = Node(item) # Make reference to next element if node deleted if self.head.next == None: self.head.next = new_node self.tail.next = new_node self.tail = new_node def dequeue(self): if self.is_empty(): print("Must have at least one element in the queue to dequeue") return else: ele = self.head.item self.head = self.head.next return ele def is_empty(self): return self.head == None def show(self): temp_head = self.head print() while temp_head != None: print(temp_head.item) temp_head = temp_head.next q = Queue() while True: print('enqueue <value>') print('dequeue') print('quit') do = input('Pick an option above ').split() operation = do[0].strip().lower() if operation == 'enqueue': q.enqueue(int(do[1])) elif operation == 'dequeue': q.dequeue() elif operation == 'quit': print("Quiting...") break else: print("Invalid operation entered, try again") q.show()
class Node: def __init__(self, item): self.item = item self.next = None class Queue: def __init__(self): self.head = None self.tail = None def enqueue(self, item): if self.head is None: self.head = node(item) self.tail = node(item) else: new_node = node(item) if self.head.next == None: self.head.next = new_node self.tail.next = new_node self.tail = new_node def dequeue(self): if self.is_empty(): print('Must have at least one element in the queue to dequeue') return else: ele = self.head.item self.head = self.head.next return ele def is_empty(self): return self.head == None def show(self): temp_head = self.head print() while temp_head != None: print(temp_head.item) temp_head = temp_head.next q = queue() while True: print('enqueue <value>') print('dequeue') print('quit') do = input('Pick an option above ').split() operation = do[0].strip().lower() if operation == 'enqueue': q.enqueue(int(do[1])) elif operation == 'dequeue': q.dequeue() elif operation == 'quit': print('Quiting...') break else: print('Invalid operation entered, try again') q.show()
# -*- coding: utf-8 -*- # Copyright (c) 2019, Silvio Peroni <essepuntato@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any purpose # with or without fee is hereby granted, provided that the above copyright notice # and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND # FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, # OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # Test case for the function def test_f(n1, n2, expected): result = f(n1, n2) if expected == result: return True else: return False # Code of the function def f(n1, n2): n = n1 - n2 if n < 0: n = -n return list(range(n)) # Tests print(test_f(3, 4, [0])) print(test_f(4, 2, [0, 1])) print(test_f(9, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8]))
def test_f(n1, n2, expected): result = f(n1, n2) if expected == result: return True else: return False def f(n1, n2): n = n1 - n2 if n < 0: n = -n return list(range(n)) print(test_f(3, 4, [0])) print(test_f(4, 2, [0, 1])) print(test_f(9, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8]))
def get_attributedelta_type(attrs): # attrs: {name: func} class ProtoAttributeDelta(object): __slots__ = ['head', 'tail'] + list(attrs.keys()) @classmethod def get_none(cls, element_id): return cls(element_id, element_id, **dict((k, 0) for k in attrs)) #TODO: head and tail = element_id??? @classmethod def from_element(cls, item): return cls(item.hash, item.previous_hash, **dict((k, v(item)) for k, v in attrs.items())) @staticmethod def get_head(item): return item.hash @staticmethod def get_tail(item): return item.previous_hash def __init__(self, head, tail, **kwargs): self.head, self.tail = head, tail for k, v in kwargs.items(): setattr(self, k, v) def __add__(self, other): assert self.tail == other.head return self.__class__(self.head, other.tail, **dict((k, getattr(self, k) + getattr(other, k)) for k in attrs)) def __sub__(self, other): if self.head == other.head: return self.__class__(other.tail, self.tail, **dict((k, getattr(self, k) - getattr(other, k)) for k in attrs)) elif self.tail == other.tail: return self.__class__(self.head, other.head, **dict((k, getattr(self, k) - getattr(other, k)) for k in attrs)) else: raise AssertionError() def __repr__(self): return '%s(%r, %r%s)' % (self.__class__, self.head, self.tail, ''.join(', %s=%r' % (k, getattr(self, k)) for k in attrs)) ProtoAttributeDelta.attrs = attrs return ProtoAttributeDelta AttributeDelta = get_attributedelta_type(dict( height=lambda item: 1, )) AttributeDelta2 = get_attributedelta_type(dict( height=lambda item: 1, )) class TestShare(object): def __init__(self, _hash, _prev, _data): self.hash = _hash self.previous_hash = _prev self.data = _data test_share = TestShare(1337, 7331, 1234) test_share2 = TestShare(7331, 4444, 4321) delta_type = AttributeDelta delta = delta_type.from_element(test_share) print(delta.tail) print(delta.__slots__) delta_type2 = AttributeDelta2 delta2 = delta_type2.from_element(test_share2) delta += delta2 print(delta.head) print(delta.tail) print(delta.height) print(delta.__slots__)
def get_attributedelta_type(attrs): class Protoattributedelta(object): __slots__ = ['head', 'tail'] + list(attrs.keys()) @classmethod def get_none(cls, element_id): return cls(element_id, element_id, **dict(((k, 0) for k in attrs))) @classmethod def from_element(cls, item): return cls(item.hash, item.previous_hash, **dict(((k, v(item)) for (k, v) in attrs.items()))) @staticmethod def get_head(item): return item.hash @staticmethod def get_tail(item): return item.previous_hash def __init__(self, head, tail, **kwargs): (self.head, self.tail) = (head, tail) for (k, v) in kwargs.items(): setattr(self, k, v) def __add__(self, other): assert self.tail == other.head return self.__class__(self.head, other.tail, **dict(((k, getattr(self, k) + getattr(other, k)) for k in attrs))) def __sub__(self, other): if self.head == other.head: return self.__class__(other.tail, self.tail, **dict(((k, getattr(self, k) - getattr(other, k)) for k in attrs))) elif self.tail == other.tail: return self.__class__(self.head, other.head, **dict(((k, getattr(self, k) - getattr(other, k)) for k in attrs))) else: raise assertion_error() def __repr__(self): return '%s(%r, %r%s)' % (self.__class__, self.head, self.tail, ''.join((', %s=%r' % (k, getattr(self, k)) for k in attrs))) ProtoAttributeDelta.attrs = attrs return ProtoAttributeDelta attribute_delta = get_attributedelta_type(dict(height=lambda item: 1)) attribute_delta2 = get_attributedelta_type(dict(height=lambda item: 1)) class Testshare(object): def __init__(self, _hash, _prev, _data): self.hash = _hash self.previous_hash = _prev self.data = _data test_share = test_share(1337, 7331, 1234) test_share2 = test_share(7331, 4444, 4321) delta_type = AttributeDelta delta = delta_type.from_element(test_share) print(delta.tail) print(delta.__slots__) delta_type2 = AttributeDelta2 delta2 = delta_type2.from_element(test_share2) delta += delta2 print(delta.head) print(delta.tail) print(delta.height) print(delta.__slots__)
scheme = { 'base00' : '#231e18', 'base01' : '#302b25', 'base02' : '#48413a', 'base03' : '#9d8b70', 'base04' : '#b4a490', 'base05' : '#cabcb1', 'base06' : '#d7c8bc', 'base07' : '#e4d4c8', 'base08' : '#d35c5c', 'base09' : '#ca7f32', 'base0a' : '#e0ac16', 'base0b' : '#b7ba53', 'base0c' : '#6eb958', 'base0d' : '#88a4d3', 'base0e' : '#bb90e2', 'base0f' : '#b49368' }
scheme = {'base00': '#231e18', 'base01': '#302b25', 'base02': '#48413a', 'base03': '#9d8b70', 'base04': '#b4a490', 'base05': '#cabcb1', 'base06': '#d7c8bc', 'base07': '#e4d4c8', 'base08': '#d35c5c', 'base09': '#ca7f32', 'base0a': '#e0ac16', 'base0b': '#b7ba53', 'base0c': '#6eb958', 'base0d': '#88a4d3', 'base0e': '#bb90e2', 'base0f': '#b49368'}
# # PySNMP MIB module REDSTONE-DHCP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/REDSTONE-DHCP-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:55:28 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") ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion") rsMgmt, = mibBuilder.importSymbols("REDSTONE-SMI", "rsMgmt") RsEnable, = mibBuilder.importSymbols("REDSTONE-TC", "RsEnable") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") Counter64, TimeTicks, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, NotificationType, Bits, Unsigned32, Integer32, iso, MibIdentifier, ModuleIdentity, ObjectIdentity, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "TimeTicks", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "NotificationType", "Bits", "Unsigned32", "Integer32", "iso", "MibIdentifier", "ModuleIdentity", "ObjectIdentity", "IpAddress") TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus") rsDhcpMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2773, 2, 22)) rsDhcpMIB.setRevisions(('1999-06-01 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rsDhcpMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: rsDhcpMIB.setLastUpdated('9906010000Z') if mibBuilder.loadTexts: rsDhcpMIB.setOrganization('Redstone Communications Inc.') if mibBuilder.loadTexts: rsDhcpMIB.setContactInfo(' Redstone Communications, Inc. 5 Carlisle Road Westford MA 01886 USA Tel: +1-978-692-1999 Email: mib@redstonecom.com ') if mibBuilder.loadTexts: rsDhcpMIB.setDescription('The DHCP MIB for the Redstone Communications Inc. enterprise.') rsDhcpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1)) rsDhcpRelay = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1)) rsDhcpProxy = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 2)) rsDhcpRelayScalars = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 1)) rsDhcpRelayAgentInfoEnable = MibScalar((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 1, 1), RsEnable()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rsDhcpRelayAgentInfoEnable.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayAgentInfoEnable.setDescription('Enable/disable use of the DHCP Relay Agent Info option.') rsDhcpRelayServerTable = MibTable((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2), ) if mibBuilder.loadTexts: rsDhcpRelayServerTable.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerTable.setDescription('The (conceptual) table listing the DHCP Relay servers.') rsDhcpRelayServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2, 1), ).setIndexNames((0, "REDSTONE-DHCP-MIB", "rsDhcpRelayServerAddress")) if mibBuilder.loadTexts: rsDhcpRelayServerEntry.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerEntry.setDescription('An entry (conceptual row) representing a DHCP Relay server.') rsDhcpRelayServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2, 1, 1), IpAddress()) if mibBuilder.loadTexts: rsDhcpRelayServerAddress.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerAddress.setDescription('The IP address of the DHCP server to which DHCP requests received from attached DHCP clients are forwarded.') rsDhcpRelayServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rsDhcpRelayServerRowStatus.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerRowStatus.setDescription("Supports 'createAndGo' and 'destroy' only.") rsDhcpMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4)) rsDhcpMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 1)) rsDhcpMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 2)) rsDhcpRelayCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 1, 1)).setObjects(("REDSTONE-DHCP-MIB", "rsDhcpRelayGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rsDhcpRelayCompliance = rsDhcpRelayCompliance.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayCompliance.setDescription('The compliance statement for systems supporting DHCP Relay.') rsDhcpRelayGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 2, 1)).setObjects(("REDSTONE-DHCP-MIB", "rsDhcpRelayAgentInfoEnable"), ("REDSTONE-DHCP-MIB", "rsDhcpRelayServerRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rsDhcpRelayGroup = rsDhcpRelayGroup.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayGroup.setDescription('The basic collection of objects providing management of DHCP Relay functionality.') mibBuilder.exportSymbols("REDSTONE-DHCP-MIB", rsDhcpProxy=rsDhcpProxy, rsDhcpRelayServerTable=rsDhcpRelayServerTable, rsDhcpRelayAgentInfoEnable=rsDhcpRelayAgentInfoEnable, rsDhcpObjects=rsDhcpObjects, rsDhcpMIBGroups=rsDhcpMIBGroups, rsDhcpMIBConformance=rsDhcpMIBConformance, PYSNMP_MODULE_ID=rsDhcpMIB, rsDhcpRelayServerAddress=rsDhcpRelayServerAddress, rsDhcpRelayServerRowStatus=rsDhcpRelayServerRowStatus, rsDhcpMIBCompliances=rsDhcpMIBCompliances, rsDhcpRelayGroup=rsDhcpRelayGroup, rsDhcpRelay=rsDhcpRelay, rsDhcpRelayCompliance=rsDhcpRelayCompliance, rsDhcpMIB=rsDhcpMIB, rsDhcpRelayServerEntry=rsDhcpRelayServerEntry, rsDhcpRelayScalars=rsDhcpRelayScalars)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_intersection, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion') (rs_mgmt,) = mibBuilder.importSymbols('REDSTONE-SMI', 'rsMgmt') (rs_enable,) = mibBuilder.importSymbols('REDSTONE-TC', 'RsEnable') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (counter64, time_ticks, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, notification_type, bits, unsigned32, integer32, iso, mib_identifier, module_identity, object_identity, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'TimeTicks', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'NotificationType', 'Bits', 'Unsigned32', 'Integer32', 'iso', 'MibIdentifier', 'ModuleIdentity', 'ObjectIdentity', 'IpAddress') (textual_convention, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus') rs_dhcp_mib = module_identity((1, 3, 6, 1, 4, 1, 2773, 2, 22)) rsDhcpMIB.setRevisions(('1999-06-01 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rsDhcpMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: rsDhcpMIB.setLastUpdated('9906010000Z') if mibBuilder.loadTexts: rsDhcpMIB.setOrganization('Redstone Communications Inc.') if mibBuilder.loadTexts: rsDhcpMIB.setContactInfo(' Redstone Communications, Inc. 5 Carlisle Road Westford MA 01886 USA Tel: +1-978-692-1999 Email: mib@redstonecom.com ') if mibBuilder.loadTexts: rsDhcpMIB.setDescription('The DHCP MIB for the Redstone Communications Inc. enterprise.') rs_dhcp_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1)) rs_dhcp_relay = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1)) rs_dhcp_proxy = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 2)) rs_dhcp_relay_scalars = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 1)) rs_dhcp_relay_agent_info_enable = mib_scalar((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 1, 1), rs_enable()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rsDhcpRelayAgentInfoEnable.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayAgentInfoEnable.setDescription('Enable/disable use of the DHCP Relay Agent Info option.') rs_dhcp_relay_server_table = mib_table((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2)) if mibBuilder.loadTexts: rsDhcpRelayServerTable.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerTable.setDescription('The (conceptual) table listing the DHCP Relay servers.') rs_dhcp_relay_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2, 1)).setIndexNames((0, 'REDSTONE-DHCP-MIB', 'rsDhcpRelayServerAddress')) if mibBuilder.loadTexts: rsDhcpRelayServerEntry.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerEntry.setDescription('An entry (conceptual row) representing a DHCP Relay server.') rs_dhcp_relay_server_address = mib_table_column((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2, 1, 1), ip_address()) if mibBuilder.loadTexts: rsDhcpRelayServerAddress.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerAddress.setDescription('The IP address of the DHCP server to which DHCP requests received from attached DHCP clients are forwarded.') rs_dhcp_relay_server_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 2773, 2, 22, 1, 1, 2, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: rsDhcpRelayServerRowStatus.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayServerRowStatus.setDescription("Supports 'createAndGo' and 'destroy' only.") rs_dhcp_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4)) rs_dhcp_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 1)) rs_dhcp_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 2)) rs_dhcp_relay_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 1, 1)).setObjects(('REDSTONE-DHCP-MIB', 'rsDhcpRelayGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rs_dhcp_relay_compliance = rsDhcpRelayCompliance.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayCompliance.setDescription('The compliance statement for systems supporting DHCP Relay.') rs_dhcp_relay_group = object_group((1, 3, 6, 1, 4, 1, 2773, 2, 22, 4, 2, 1)).setObjects(('REDSTONE-DHCP-MIB', 'rsDhcpRelayAgentInfoEnable'), ('REDSTONE-DHCP-MIB', 'rsDhcpRelayServerRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): rs_dhcp_relay_group = rsDhcpRelayGroup.setStatus('current') if mibBuilder.loadTexts: rsDhcpRelayGroup.setDescription('The basic collection of objects providing management of DHCP Relay functionality.') mibBuilder.exportSymbols('REDSTONE-DHCP-MIB', rsDhcpProxy=rsDhcpProxy, rsDhcpRelayServerTable=rsDhcpRelayServerTable, rsDhcpRelayAgentInfoEnable=rsDhcpRelayAgentInfoEnable, rsDhcpObjects=rsDhcpObjects, rsDhcpMIBGroups=rsDhcpMIBGroups, rsDhcpMIBConformance=rsDhcpMIBConformance, PYSNMP_MODULE_ID=rsDhcpMIB, rsDhcpRelayServerAddress=rsDhcpRelayServerAddress, rsDhcpRelayServerRowStatus=rsDhcpRelayServerRowStatus, rsDhcpMIBCompliances=rsDhcpMIBCompliances, rsDhcpRelayGroup=rsDhcpRelayGroup, rsDhcpRelay=rsDhcpRelay, rsDhcpRelayCompliance=rsDhcpRelayCompliance, rsDhcpMIB=rsDhcpMIB, rsDhcpRelayServerEntry=rsDhcpRelayServerEntry, rsDhcpRelayScalars=rsDhcpRelayScalars)
# In this file, constants are defined that are used throughout the project. # Definition in one place prevents accidental use of different strings battery_model_simple = 'battery_model_simple' battery_model_height_difference = 'battery_model_height_difference'
battery_model_simple = 'battery_model_simple' battery_model_height_difference = 'battery_model_height_difference'
class Node: def __init__(self, value): self.value = value self.next = None class BinaryNode: def __init__(self, value): self.value = value self.left = None self.right = None class BinaryTree: def __init__(self): self.root = None # Check the traversal type def type(self, type): if type == "preorder": return self.pre_order(self.root, []) elif type == "inorder": return self.in_order(self.root, []) elif type == "postorder": return self.post_order(self.root, []) # Pre-order type def pre_order(self, node, nodes=[]): if node: nodes.append(node.value) nodes = self.pre_order(node.left, nodes) nodes = self.pre_order(node.right, nodes) return nodes # In-order type def in_order(self, node, nodes=[]): if node: nodes = self.in_order(node.left, nodes) nodes.append(node.value) nodes = self.in_order(node.right, nodes) return nodes # Post-order type def post_order(self, node, nodes=[]): if node: nodes = self.in_order(node.left, nodes) nodes = self.in_order(node.right, nodes) nodes.append(node.value) return nodes class Queue: def __init__(self): self.front = None # Enqueue (add) a node to the queue's rear / tail def enqueue(self, value): node = Node(value) if self.front: current = self.front while current.next: current = current.next else: current.next = node else: self.front = node # Dequeue (remove) a node of the queue's front def dequeue(self): if not self.front: raise Exception("Empty Queue") removed = self.front.value self.front = self.front.next return removed # Check if the queue is empty (have no front) def is_empty(self): return not self.front def breadth_first(tree): if tree.root == None: raise Exception("Empty Tree") result = [] queue = Queue() queue.enqueue(tree.root) while queue.is_empty() == False: left = None right = None if queue.front.value.left: queue.enqueue(queue.front.value.left) left = queue.front.value.left.value if queue.front.value.right: queue.enqueue(queue.front.value.right) right = queue.front.value.right.value result.append({"parent": queue.front.value, "left": left, "right": right}) queue.dequeue() return result def compare_trees(tree1, tree2): list1 = breadth_first(tree1) list2 = breadth_first(tree2) if len(list1) != len(list2): return False length = len(list1) for i in range(0, length - 1): if list1[i]["parent"] != list2[i]["parent"]: return False elif list1[i]["left"] != list2[i]["left"]: return False elif list1[i]["right"] != list2[i]["right"]: return False return True
class Node: def __init__(self, value): self.value = value self.next = None class Binarynode: def __init__(self, value): self.value = value self.left = None self.right = None class Binarytree: def __init__(self): self.root = None def type(self, type): if type == 'preorder': return self.pre_order(self.root, []) elif type == 'inorder': return self.in_order(self.root, []) elif type == 'postorder': return self.post_order(self.root, []) def pre_order(self, node, nodes=[]): if node: nodes.append(node.value) nodes = self.pre_order(node.left, nodes) nodes = self.pre_order(node.right, nodes) return nodes def in_order(self, node, nodes=[]): if node: nodes = self.in_order(node.left, nodes) nodes.append(node.value) nodes = self.in_order(node.right, nodes) return nodes def post_order(self, node, nodes=[]): if node: nodes = self.in_order(node.left, nodes) nodes = self.in_order(node.right, nodes) nodes.append(node.value) return nodes class Queue: def __init__(self): self.front = None def enqueue(self, value): node = node(value) if self.front: current = self.front while current.next: current = current.next else: current.next = node else: self.front = node def dequeue(self): if not self.front: raise exception('Empty Queue') removed = self.front.value self.front = self.front.next return removed def is_empty(self): return not self.front def breadth_first(tree): if tree.root == None: raise exception('Empty Tree') result = [] queue = queue() queue.enqueue(tree.root) while queue.is_empty() == False: left = None right = None if queue.front.value.left: queue.enqueue(queue.front.value.left) left = queue.front.value.left.value if queue.front.value.right: queue.enqueue(queue.front.value.right) right = queue.front.value.right.value result.append({'parent': queue.front.value, 'left': left, 'right': right}) queue.dequeue() return result def compare_trees(tree1, tree2): list1 = breadth_first(tree1) list2 = breadth_first(tree2) if len(list1) != len(list2): return False length = len(list1) for i in range(0, length - 1): if list1[i]['parent'] != list2[i]['parent']: return False elif list1[i]['left'] != list2[i]['left']: return False elif list1[i]['right'] != list2[i]['right']: return False return True
set_name(0x801384E4, "GameOnlyTestRoutine__Fv", SN_NOWARN) set_name(0x801384EC, "vecleny__Fii", SN_NOWARN) set_name(0x80138510, "veclenx__Fii", SN_NOWARN) set_name(0x8013853C, "GetDamageAmt__FiPiT1", SN_NOWARN) set_name(0x80138B34, "CheckBlock__Fiiii", SN_NOWARN) set_name(0x80138C1C, "FindClosest__Fiii", SN_NOWARN) set_name(0x80138DB8, "GetSpellLevel__Fii", SN_NOWARN) set_name(0x80138E2C, "GetDirection8__Fiiii", SN_NOWARN) set_name(0x80139048, "GetDirection16__Fiiii", SN_NOWARN) set_name(0x80139264, "DeleteMissile__Fii", SN_NOWARN) set_name(0x801392BC, "GetMissileVel__Fiiiiii", SN_NOWARN) set_name(0x80139470, "PutMissile__Fi", SN_NOWARN) set_name(0x80139574, "GetMissilePos__Fi", SN_NOWARN) set_name(0x8013969C, "MoveMissilePos__Fi", SN_NOWARN) set_name(0x80139804, "MonsterTrapHit__FiiiiiUc", SN_NOWARN) set_name(0x80139B78, "MonsterMHit__FiiiiiiUc", SN_NOWARN) set_name(0x8013A2D8, "PlayerMHit__FiiiiiiUcUc", SN_NOWARN) set_name(0x8013AD44, "Plr2PlrMHit__FiiiiiiUc", SN_NOWARN) set_name(0x8013B520, "CheckMissileCol__FiiiUciiUc", SN_NOWARN) set_name(0x8013B99C, "GetTableValue__FUci", SN_NOWARN) set_name(0x8013BA30, "SetMissAnim__Fii", SN_NOWARN) set_name(0x8013BB00, "SetMissDir__Fii", SN_NOWARN) set_name(0x8013BB44, "AddLArrow__Fiiiiiicii", SN_NOWARN) set_name(0x8013BD24, "AddArrow__Fiiiiiicii", SN_NOWARN) set_name(0x8013BEE0, "GetVileMissPos__Fiii", SN_NOWARN) set_name(0x8013C004, "AddRndTeleport__Fiiiiiicii", SN_NOWARN) set_name(0x8013C374, "AddFirebolt__Fiiiiiicii", SN_NOWARN) set_name(0x8013C5E0, "AddMagmaball__Fiiiiiicii", SN_NOWARN) set_name(0x8013C6F4, "AddTeleport__Fiiiiiicii", SN_NOWARN) set_name(0x8013C8EC, "AddLightball__Fiiiiiicii", SN_NOWARN) set_name(0x8013CA40, "AddFirewall__Fiiiiiicii", SN_NOWARN) set_name(0x8013CC28, "AddFireball__Fiiiiiicii", SN_NOWARN) set_name(0x8013CE84, "AddLightctrl__Fiiiiiicii", SN_NOWARN) set_name(0x8013CF6C, "AddLightning__Fiiiiiicii", SN_NOWARN) set_name(0x8013D134, "AddMisexp__Fiiiiiicii", SN_NOWARN) set_name(0x8013D340, "CheckIfTrig__Fii", SN_NOWARN) set_name(0x8013D424, "AddTown__Fiiiiiicii", SN_NOWARN) set_name(0x8013D848, "AddFlash__Fiiiiiicii", SN_NOWARN) set_name(0x8013DA58, "AddFlash2__Fiiiiiicii", SN_NOWARN) set_name(0x8013DC38, "AddManashield__Fiiiiiicii", SN_NOWARN) set_name(0x8013DD00, "AddFiremove__Fiiiiiicii", SN_NOWARN) set_name(0x8013DE5C, "AddGuardian__Fiiiiiicii", SN_NOWARN) set_name(0x8013E2C8, "AddChain__Fiiiiiicii", SN_NOWARN) set_name(0x8013E324, "AddRhino__Fiiiiiicii", SN_NOWARN) set_name(0x8013E4E0, "AddFlare__Fiiiiiicii", SN_NOWARN) set_name(0x8013E7D8, "AddAcid__Fiiiiiicii", SN_NOWARN) set_name(0x8013E8DC, "AddAcidpud__Fiiiiiicii", SN_NOWARN) set_name(0x8013E9B4, "AddStone__Fiiiiiicii", SN_NOWARN) set_name(0x8013ECAC, "AddGolem__Fiiiiiicii", SN_NOWARN) set_name(0x8013EE64, "AddBoom__Fiiiiiicii", SN_NOWARN) set_name(0x8013EEF8, "AddHeal__Fiiiiiicii", SN_NOWARN) set_name(0x8013F120, "AddHealOther__Fiiiiiicii", SN_NOWARN) set_name(0x8013F188, "AddElement__Fiiiiiicii", SN_NOWARN) set_name(0x8013F3B4, "AddIdentify__Fiiiiiicii", SN_NOWARN) set_name(0x8013F464, "AddFirewallC__Fiiiiiicii", SN_NOWARN) set_name(0x8013F714, "AddInfra__Fiiiiiicii", SN_NOWARN) set_name(0x8013F810, "AddWave__Fiiiiiicii", SN_NOWARN) set_name(0x8013F894, "AddNova__Fiiiiiicii", SN_NOWARN) set_name(0x8013FAAC, "AddRepair__Fiiiiiicii", SN_NOWARN) set_name(0x8013FB5C, "AddRecharge__Fiiiiiicii", SN_NOWARN) set_name(0x8013FC0C, "AddDisarm__Fiiiiiicii", SN_NOWARN) set_name(0x8013FC74, "AddApoca__Fiiiiiicii", SN_NOWARN) set_name(0x8013FEB0, "AddFlame__Fiiiiiicii", SN_NOWARN) set_name(0x801400CC, "AddFlamec__Fiiiiiicii", SN_NOWARN) set_name(0x801401BC, "AddCbolt__Fiiiiiicii", SN_NOWARN) set_name(0x801403B0, "AddHbolt__Fiiiiiicii", SN_NOWARN) set_name(0x80140570, "AddResurrect__Fiiiiiicii", SN_NOWARN) set_name(0x801405E4, "AddResurrectBeam__Fiiiiiicii", SN_NOWARN) set_name(0x8014066C, "AddTelekinesis__Fiiiiiicii", SN_NOWARN) set_name(0x801406D4, "AddBoneSpirit__Fiiiiiicii", SN_NOWARN) set_name(0x801408D0, "AddRportal__Fiiiiiicii", SN_NOWARN) set_name(0x80140970, "AddDiabApoca__Fiiiiiicii", SN_NOWARN) set_name(0x80140AAC, "AddMissile__Fiiiiiiciii", SN_NOWARN) set_name(0x80140DF8, "Sentfire__Fiii", SN_NOWARN) set_name(0x80140FDC, "MI_Dummy__Fi", SN_NOWARN) set_name(0x80140FE4, "MI_Golem__Fi", SN_NOWARN) set_name(0x80141240, "MI_SetManashield__Fi", SN_NOWARN) set_name(0x8014127C, "MI_LArrow__Fi", SN_NOWARN) set_name(0x80141A38, "MI_Arrow__Fi", SN_NOWARN) set_name(0x80141C54, "MI_Firebolt__Fi", SN_NOWARN) set_name(0x80142320, "MI_Lightball__Fi", SN_NOWARN) set_name(0x801425A8, "MI_Acidpud__Fi", SN_NOWARN) set_name(0x801426B8, "MI_Firewall__Fi", SN_NOWARN) set_name(0x8014297C, "MI_Fireball__Fi", SN_NOWARN) set_name(0x80143340, "MI_Lightctrl__Fi", SN_NOWARN) set_name(0x801436BC, "MI_Lightning__Fi", SN_NOWARN) set_name(0x801437A8, "MI_Town__Fi", SN_NOWARN) set_name(0x801439E0, "MI_Flash__Fi", SN_NOWARN) set_name(0x80143D34, "MI_Flash2__Fi", SN_NOWARN) set_name(0x80143EFC, "MI_Manashield__Fi", SN_NOWARN) set_name(0x80144220, "MI_Firemove__Fi", SN_NOWARN) set_name(0x801444AC, "MI_Guardian__Fi", SN_NOWARN) set_name(0x8014475C, "MI_Chain__Fi", SN_NOWARN) set_name(0x801449C8, "MI_Misexp__Fi", SN_NOWARN) set_name(0x80144CC8, "MI_Acidsplat__Fi", SN_NOWARN) set_name(0x80144E64, "MI_Teleport__Fi", SN_NOWARN) set_name(0x8014522C, "MI_Stone__Fi", SN_NOWARN) set_name(0x801453D8, "MI_Boom__Fi", SN_NOWARN) set_name(0x801454D0, "MI_Rhino__Fi", SN_NOWARN) set_name(0x8014587C, "MI_FirewallC__Fi", SN_NOWARN) set_name(0x80145B04, "MI_Infra__Fi", SN_NOWARN) set_name(0x80145BBC, "MI_Apoca__Fi", SN_NOWARN) set_name(0x80145E50, "MI_Wave__Fi", SN_NOWARN) set_name(0x8014634C, "MI_Nova__Fi", SN_NOWARN) set_name(0x8014660C, "MI_Flame__Fi", SN_NOWARN) set_name(0x80146804, "MI_Flamec__Fi", SN_NOWARN) set_name(0x80146A8C, "MI_Cbolt__Fi", SN_NOWARN) set_name(0x80146D90, "MI_Hbolt__Fi", SN_NOWARN) set_name(0x8014709C, "MI_Element__Fi", SN_NOWARN) set_name(0x80147754, "MI_Bonespirit__Fi", SN_NOWARN) set_name(0x80147B5C, "MI_ResurrectBeam__Fi", SN_NOWARN) set_name(0x80147BCC, "MI_Rportal__Fi", SN_NOWARN) set_name(0x80147DF0, "ProcessMissiles__Fv", SN_NOWARN) set_name(0x801481E4, "ClearMissileSpot__Fi", SN_NOWARN) set_name(0x8014829C, "MoveToScrollTarget__7CBlocks", SN_NOWARN) set_name(0x801482B0, "MonstPartJump__Fi", SN_NOWARN) set_name(0x80148444, "DeleteMonster__Fi", SN_NOWARN) set_name(0x8014847C, "M_GetDir__Fi", SN_NOWARN) set_name(0x801484D8, "M_StartDelay__Fii", SN_NOWARN) set_name(0x80148520, "M_StartRAttack__Fiii", SN_NOWARN) set_name(0x80148638, "M_StartRSpAttack__Fiii", SN_NOWARN) set_name(0x8014875C, "M_StartSpAttack__Fi", SN_NOWARN) set_name(0x80148844, "M_StartEat__Fi", SN_NOWARN) set_name(0x80148914, "M_GetKnockback__Fi", SN_NOWARN) set_name(0x80148AEC, "M_StartHit__Fiii", SN_NOWARN) set_name(0x80148DE4, "M_DiabloDeath__FiUc", SN_NOWARN) set_name(0x801490F4, "M2MStartHit__Fiii", SN_NOWARN) set_name(0x801493A0, "MonstStartKill__FiiUc", SN_NOWARN) set_name(0x8014968C, "M2MStartKill__Fii", SN_NOWARN) set_name(0x80149A54, "M_StartKill__Fii", SN_NOWARN) set_name(0x80149B44, "M_StartFadein__FiiUc", SN_NOWARN) set_name(0x80149C98, "M_StartFadeout__FiiUc", SN_NOWARN) set_name(0x80149DE0, "M_StartHeal__Fi", SN_NOWARN) set_name(0x80149E60, "M_ChangeLightOffset__Fi", SN_NOWARN) set_name(0x80149F00, "M_DoStand__Fi", SN_NOWARN) set_name(0x80149F68, "M_DoWalk__Fi", SN_NOWARN) set_name(0x8014A1EC, "M_DoWalk2__Fi", SN_NOWARN) set_name(0x8014A3D8, "M_DoWalk3__Fi", SN_NOWARN) set_name(0x8014A69C, "M_TryM2MHit__Fiiiii", SN_NOWARN) set_name(0x8014A864, "M_TryH2HHit__Fiiiii", SN_NOWARN) set_name(0x8014AE78, "M_DoAttack__Fi", SN_NOWARN) set_name(0x8014B01C, "M_DoRAttack__Fi", SN_NOWARN) set_name(0x8014B194, "M_DoRSpAttack__Fi", SN_NOWARN) set_name(0x8014B384, "M_DoSAttack__Fi", SN_NOWARN) set_name(0x8014B458, "M_DoFadein__Fi", SN_NOWARN) set_name(0x8014B528, "M_DoFadeout__Fi", SN_NOWARN) set_name(0x8014B63C, "M_DoHeal__Fi", SN_NOWARN) set_name(0x8014B6E8, "M_DoTalk__Fi", SN_NOWARN) set_name(0x8014BB74, "M_Teleport__Fi", SN_NOWARN) set_name(0x8014BDA8, "M_DoGotHit__Fi", SN_NOWARN) set_name(0x8014BE08, "DoEnding__Fv", SN_NOWARN) set_name(0x8014BE9C, "PrepDoEnding__Fv", SN_NOWARN) set_name(0x8014BFB4, "M_DoDeath__Fi", SN_NOWARN) set_name(0x8014C184, "M_DoSpStand__Fi", SN_NOWARN) set_name(0x8014C228, "M_DoDelay__Fi", SN_NOWARN) set_name(0x8014C318, "M_DoStone__Fi", SN_NOWARN) set_name(0x8014C39C, "M_WalkDir__Fii", SN_NOWARN) set_name(0x8014C5C4, "GroupUnity__Fi", SN_NOWARN) set_name(0x8014C9B0, "M_CallWalk__Fii", SN_NOWARN) set_name(0x8014CB9C, "M_PathWalk__Fi", SN_NOWARN) set_name(0x8014CC60, "M_CallWalk2__Fii", SN_NOWARN) set_name(0x8014CD74, "M_DumbWalk__Fii", SN_NOWARN) set_name(0x8014CDC8, "M_RoundWalk__FiiRi", SN_NOWARN) set_name(0x8014CF68, "MAI_Zombie__Fi", SN_NOWARN) set_name(0x8014D160, "MAI_SkelSd__Fi", SN_NOWARN) set_name(0x8014D2F8, "MAI_Snake__Fi", SN_NOWARN) set_name(0x8014D6DC, "MAI_Bat__Fi", SN_NOWARN) set_name(0x8014DA94, "MAI_SkelBow__Fi", SN_NOWARN) set_name(0x8014DC78, "MAI_Fat__Fi", SN_NOWARN) set_name(0x8014DE28, "MAI_Sneak__Fi", SN_NOWARN) set_name(0x8014E214, "MAI_Fireman__Fi", SN_NOWARN) set_name(0x8014E50C, "MAI_Fallen__Fi", SN_NOWARN) set_name(0x8014E828, "MAI_Cleaver__Fi", SN_NOWARN) set_name(0x8014E910, "MAI_Round__FiUc", SN_NOWARN) set_name(0x8014ED7C, "MAI_GoatMc__Fi", SN_NOWARN) set_name(0x8014ED9C, "MAI_Ranged__FiiUc", SN_NOWARN) set_name(0x8014EFBC, "MAI_GoatBow__Fi", SN_NOWARN) set_name(0x8014EFE0, "MAI_Succ__Fi", SN_NOWARN) set_name(0x8014F004, "MAI_AcidUniq__Fi", SN_NOWARN) set_name(0x8014F028, "MAI_Scav__Fi", SN_NOWARN) set_name(0x8014F440, "MAI_Garg__Fi", SN_NOWARN) set_name(0x8014F620, "MAI_RoundRanged__FiiUciUc", SN_NOWARN) set_name(0x8014FB34, "MAI_Magma__Fi", SN_NOWARN) set_name(0x8014FB60, "MAI_Storm__Fi", SN_NOWARN) set_name(0x8014FB8C, "MAI_Acid__Fi", SN_NOWARN) set_name(0x8014FBBC, "MAI_Diablo__Fi", SN_NOWARN) set_name(0x8014FBE8, "MAI_RR2__Fiii", SN_NOWARN) set_name(0x801500E8, "MAI_Mega__Fi", SN_NOWARN) set_name(0x8015010C, "MAI_SkelKing__Fi", SN_NOWARN) set_name(0x80150648, "MAI_Rhino__Fi", SN_NOWARN) set_name(0x80150AF0, "MAI_Counselor__Fi", SN_NOWARN) set_name(0x80150FBC, "MAI_Garbud__Fi", SN_NOWARN) set_name(0x8015116C, "MAI_Zhar__Fi", SN_NOWARN) set_name(0x80151364, "MAI_SnotSpil__Fi", SN_NOWARN) set_name(0x80151598, "MAI_Lazurus__Fi", SN_NOWARN) set_name(0x801517D8, "MAI_Lazhelp__Fi", SN_NOWARN) set_name(0x801518F8, "MAI_Lachdanan__Fi", SN_NOWARN) set_name(0x80151A88, "MAI_Warlord__Fi", SN_NOWARN) set_name(0x80151BD4, "DeleteMonsterList__Fv", SN_NOWARN) set_name(0x80151CF0, "ProcessMonsters__Fv", SN_NOWARN) set_name(0x80152278, "DirOK__Fii", SN_NOWARN) set_name(0x80152660, "PosOkMissile__Fii", SN_NOWARN) set_name(0x801526C8, "CheckNoSolid__Fii", SN_NOWARN) set_name(0x8015270C, "LineClearF__FPFii_Uciiii", SN_NOWARN) set_name(0x80152994, "LineClear__Fiiii", SN_NOWARN) set_name(0x801529D4, "LineClearF1__FPFiii_Uciiiii", SN_NOWARN) set_name(0x80152C68, "M_FallenFear__Fii", SN_NOWARN) set_name(0x80152E38, "PrintMonstHistory__Fi", SN_NOWARN) set_name(0x801530EC, "PrintUniqueHistory__Fv", SN_NOWARN) set_name(0x80153210, "MissToMonst__Fiii", SN_NOWARN) set_name(0x80153674, "PosOkMonst2__Fiii", SN_NOWARN) set_name(0x80153890, "PosOkMonst3__Fiii", SN_NOWARN) set_name(0x80153B84, "M_SpawnSkel__Fiii", SN_NOWARN) set_name(0x80153CDC, "TalktoMonster__Fi", SN_NOWARN) set_name(0x80153DFC, "SpawnGolum__Fiiii", SN_NOWARN) set_name(0x80154054, "CanTalkToMonst__Fi", SN_NOWARN) set_name(0x8015408C, "CheckMonsterHit__FiRUc", SN_NOWARN) set_name(0x80154158, "MAI_Golum__Fi", SN_NOWARN) set_name(0x801544CC, "MAI_Path__Fi", SN_NOWARN) set_name(0x80154630, "M_StartAttack__Fi", SN_NOWARN) set_name(0x80154718, "M_StartWalk__Fiiiiii", SN_NOWARN) set_name(0x80154878, "FreeInvGFX__Fv", SN_NOWARN) set_name(0x80154880, "InvDrawSlot__Fiii", SN_NOWARN) set_name(0x80154904, "InvDrawSlotBack__FiiiiUc", SN_NOWARN) set_name(0x80154B58, "InvDrawItem__FiiiUci", SN_NOWARN) set_name(0x80154C28, "InvDrawSlots__Fv", SN_NOWARN) set_name(0x80154F00, "PrintStat__FiiPcUc", SN_NOWARN) set_name(0x80154FCC, "DrawInvStats__Fv", SN_NOWARN) set_name(0x80155AE8, "DrawInvBack__Fv", SN_NOWARN) set_name(0x80155B70, "DrawInvCursor__Fv", SN_NOWARN) set_name(0x8015604C, "DrawInvMsg__Fv", SN_NOWARN) set_name(0x80156214, "DrawInvUnique__Fv", SN_NOWARN) set_name(0x80156338, "DrawInv__Fv", SN_NOWARN) set_name(0x80156378, "DrawInvTSK__FP4TASK", SN_NOWARN) set_name(0x801566C4, "DoThatDrawInv__Fv", SN_NOWARN) set_name(0x80156E8C, "AutoPlace__FiiiiUc", SN_NOWARN) set_name(0x801571AC, "SpecialAutoPlace__FiiiiUc", SN_NOWARN) set_name(0x80157548, "GoldAutoPlace__Fi", SN_NOWARN) set_name(0x80157A18, "WeaponAutoPlace__Fi", SN_NOWARN) set_name(0x80157CA4, "SwapItem__FP10ItemStructT0", SN_NOWARN) set_name(0x80157DA0, "CheckInvPaste__Fiii", SN_NOWARN) set_name(0x80159A8C, "CheckInvCut__Fiii", SN_NOWARN) set_name(0x8015A53C, "RemoveInvItem__Fii", SN_NOWARN) set_name(0x8015A7E4, "RemoveSpdBarItem__Fii", SN_NOWARN) set_name(0x8015A8D8, "CheckInvScrn__Fv", SN_NOWARN) set_name(0x8015A950, "CheckItemStats__Fi", SN_NOWARN) set_name(0x8015A9D4, "CheckBookLevel__Fi", SN_NOWARN) set_name(0x8015AB08, "CheckQuestItem__Fi", SN_NOWARN) set_name(0x8015AF30, "InvGetItem__Fii", SN_NOWARN) set_name(0x8015B22C, "AutoGetItem__Fii", SN_NOWARN) set_name(0x8015BC9C, "FindGetItem__FiUsi", SN_NOWARN) set_name(0x8015BD50, "SyncGetItem__FiiiUsi", SN_NOWARN) set_name(0x8015BEDC, "TryInvPut__Fv", SN_NOWARN) set_name(0x8015C0A4, "InvPutItem__Fiii", SN_NOWARN) set_name(0x8015C54C, "SyncPutItem__FiiiiUsiUciiiiiUl", SN_NOWARN) set_name(0x8015CAA8, "CheckInvHLight__Fv", SN_NOWARN) set_name(0x8015CDF0, "RemoveScroll__Fi", SN_NOWARN) set_name(0x8015CFD4, "UseScroll__Fv", SN_NOWARN) set_name(0x8015D23C, "UseStaffCharge__FP12PlayerStruct", SN_NOWARN) set_name(0x8015D2A4, "UseStaff__Fv", SN_NOWARN) set_name(0x8015D364, "StartGoldDrop__Fv", SN_NOWARN) set_name(0x8015D460, "UseInvItem__Fii", SN_NOWARN) set_name(0x8015D984, "DoTelekinesis__Fv", SN_NOWARN) set_name(0x8015DAAC, "CalculateGold__Fi", SN_NOWARN) set_name(0x8015DBE4, "DropItemBeforeTrig__Fv", SN_NOWARN) set_name(0x8015DC3C, "ControlInv__Fv", SN_NOWARN) set_name(0x8015DF1C, "InvGetItemWH__Fi", SN_NOWARN) set_name(0x8015E010, "InvAlignObject__Fv", SN_NOWARN) set_name(0x8015E1C4, "InvSetItemCurs__Fv", SN_NOWARN) set_name(0x8015E358, "InvMoveCursLeft__Fv", SN_NOWARN) set_name(0x8015E500, "InvMoveCursRight__Fv", SN_NOWARN) set_name(0x8015E7B4, "InvMoveCursUp__Fv", SN_NOWARN) set_name(0x8015E9AC, "InvMoveCursDown__Fv", SN_NOWARN) set_name(0x8015ECB4, "DumpMonsters__7CBlocks", SN_NOWARN) set_name(0x8015ECDC, "Flush__4CPad", SN_NOWARN) set_name(0x8015ED00, "SetRGB__6DialogUcUcUc", SN_NOWARN) set_name(0x8015ED20, "SetBack__6Dialogi", SN_NOWARN) set_name(0x8015ED28, "SetBorder__6Dialogi", SN_NOWARN) set_name(0x8015ED30, "SetOTpos__6Dialogi", SN_NOWARN) set_name(0x8015ED3C, "___6Dialog", SN_NOWARN) set_name(0x8015ED64, "__6Dialog", SN_NOWARN) set_name(0x8015EDC0, "StartAutomap__Fv", SN_NOWARN) set_name(0x8015EDD0, "AutomapUp__Fv", SN_NOWARN) set_name(0x8015EDF0, "AutomapDown__Fv", SN_NOWARN) set_name(0x8015EE10, "AutomapLeft__Fv", SN_NOWARN) set_name(0x8015EE30, "AutomapRight__Fv", SN_NOWARN) set_name(0x8015EE50, "AMGetLine__FUcUcUc", SN_NOWARN) set_name(0x8015EEFC, "AmDrawLine__Fiiii", SN_NOWARN) set_name(0x8015EF64, "AmDrawPlayer__Fiiii", SN_NOWARN) set_name(0x8015EFCC, "DrawAutomapPlr__Fv", SN_NOWARN) set_name(0x8015F2DC, "DrawAutoMapVertWall__Fiiii", SN_NOWARN) set_name(0x8015F3D0, "DrawAutoMapHorzWall__Fiiii", SN_NOWARN) set_name(0x8015F4C4, "DrawAutoMapVertDoor__Fii", SN_NOWARN) set_name(0x8015F698, "DrawAutoMapHorzDoor__Fii", SN_NOWARN) set_name(0x8015F870, "DrawAutoMapVertGrate__Fii", SN_NOWARN) set_name(0x8015F924, "DrawAutoMapHorzGrate__Fii", SN_NOWARN) set_name(0x8015F9D8, "DrawAutoMapSquare__Fii", SN_NOWARN) set_name(0x8015FB20, "DrawAutoMapStairs__Fii", SN_NOWARN) set_name(0x8015FD20, "DrawAutomap__Fv", SN_NOWARN) set_name(0x8016018C, "PRIM_GetPrim__FPP7LINE_F2", SN_NOWARN)
set_name(2148762852, 'GameOnlyTestRoutine__Fv', SN_NOWARN) set_name(2148762860, 'vecleny__Fii', SN_NOWARN) set_name(2148762896, 'veclenx__Fii', SN_NOWARN) set_name(2148762940, 'GetDamageAmt__FiPiT1', SN_NOWARN) set_name(2148764468, 'CheckBlock__Fiiii', SN_NOWARN) set_name(2148764700, 'FindClosest__Fiii', SN_NOWARN) set_name(2148765112, 'GetSpellLevel__Fii', SN_NOWARN) set_name(2148765228, 'GetDirection8__Fiiii', SN_NOWARN) set_name(2148765768, 'GetDirection16__Fiiii', SN_NOWARN) set_name(2148766308, 'DeleteMissile__Fii', SN_NOWARN) set_name(2148766396, 'GetMissileVel__Fiiiiii', SN_NOWARN) set_name(2148766832, 'PutMissile__Fi', SN_NOWARN) set_name(2148767092, 'GetMissilePos__Fi', SN_NOWARN) set_name(2148767388, 'MoveMissilePos__Fi', SN_NOWARN) set_name(2148767748, 'MonsterTrapHit__FiiiiiUc', SN_NOWARN) set_name(2148768632, 'MonsterMHit__FiiiiiiUc', SN_NOWARN) set_name(2148770520, 'PlayerMHit__FiiiiiiUcUc', SN_NOWARN) set_name(2148773188, 'Plr2PlrMHit__FiiiiiiUc', SN_NOWARN) set_name(2148775200, 'CheckMissileCol__FiiiUciiUc', SN_NOWARN) set_name(2148776348, 'GetTableValue__FUci', SN_NOWARN) set_name(2148776496, 'SetMissAnim__Fii', SN_NOWARN) set_name(2148776704, 'SetMissDir__Fii', SN_NOWARN) set_name(2148776772, 'AddLArrow__Fiiiiiicii', SN_NOWARN) set_name(2148777252, 'AddArrow__Fiiiiiicii', SN_NOWARN) set_name(2148777696, 'GetVileMissPos__Fiii', SN_NOWARN) set_name(2148777988, 'AddRndTeleport__Fiiiiiicii', SN_NOWARN) set_name(2148778868, 'AddFirebolt__Fiiiiiicii', SN_NOWARN) set_name(2148779488, 'AddMagmaball__Fiiiiiicii', SN_NOWARN) set_name(2148779764, 'AddTeleport__Fiiiiiicii', SN_NOWARN) set_name(2148780268, 'AddLightball__Fiiiiiicii', SN_NOWARN) set_name(2148780608, 'AddFirewall__Fiiiiiicii', SN_NOWARN) set_name(2148781096, 'AddFireball__Fiiiiiicii', SN_NOWARN) set_name(2148781700, 'AddLightctrl__Fiiiiiicii', SN_NOWARN) set_name(2148781932, 'AddLightning__Fiiiiiicii', SN_NOWARN) set_name(2148782388, 'AddMisexp__Fiiiiiicii', SN_NOWARN) set_name(2148782912, 'CheckIfTrig__Fii', SN_NOWARN) set_name(2148783140, 'AddTown__Fiiiiiicii', SN_NOWARN) set_name(2148784200, 'AddFlash__Fiiiiiicii', SN_NOWARN) set_name(2148784728, 'AddFlash2__Fiiiiiicii', SN_NOWARN) set_name(2148785208, 'AddManashield__Fiiiiiicii', SN_NOWARN) set_name(2148785408, 'AddFiremove__Fiiiiiicii', SN_NOWARN) set_name(2148785756, 'AddGuardian__Fiiiiiicii', SN_NOWARN) set_name(2148786888, 'AddChain__Fiiiiiicii', SN_NOWARN) set_name(2148786980, 'AddRhino__Fiiiiiicii', SN_NOWARN) set_name(2148787424, 'AddFlare__Fiiiiiicii', SN_NOWARN) set_name(2148788184, 'AddAcid__Fiiiiiicii', SN_NOWARN) set_name(2148788444, 'AddAcidpud__Fiiiiiicii', SN_NOWARN) set_name(2148788660, 'AddStone__Fiiiiiicii', SN_NOWARN) set_name(2148789420, 'AddGolem__Fiiiiiicii', SN_NOWARN) set_name(2148789860, 'AddBoom__Fiiiiiicii', SN_NOWARN) set_name(2148790008, 'AddHeal__Fiiiiiicii', SN_NOWARN) set_name(2148790560, 'AddHealOther__Fiiiiiicii', SN_NOWARN) set_name(2148790664, 'AddElement__Fiiiiiicii', SN_NOWARN) set_name(2148791220, 'AddIdentify__Fiiiiiicii', SN_NOWARN) set_name(2148791396, 'AddFirewallC__Fiiiiiicii', SN_NOWARN) set_name(2148792084, 'AddInfra__Fiiiiiicii', SN_NOWARN) set_name(2148792336, 'AddWave__Fiiiiiicii', SN_NOWARN) set_name(2148792468, 'AddNova__Fiiiiiicii', SN_NOWARN) set_name(2148793004, 'AddRepair__Fiiiiiicii', SN_NOWARN) set_name(2148793180, 'AddRecharge__Fiiiiiicii', SN_NOWARN) set_name(2148793356, 'AddDisarm__Fiiiiiicii', SN_NOWARN) set_name(2148793460, 'AddApoca__Fiiiiiicii', SN_NOWARN) set_name(2148794032, 'AddFlame__Fiiiiiicii', SN_NOWARN) set_name(2148794572, 'AddFlamec__Fiiiiiicii', SN_NOWARN) set_name(2148794812, 'AddCbolt__Fiiiiiicii', SN_NOWARN) set_name(2148795312, 'AddHbolt__Fiiiiiicii', SN_NOWARN) set_name(2148795760, 'AddResurrect__Fiiiiiicii', SN_NOWARN) set_name(2148795876, 'AddResurrectBeam__Fiiiiiicii', SN_NOWARN) set_name(2148796012, 'AddTelekinesis__Fiiiiiicii', SN_NOWARN) set_name(2148796116, 'AddBoneSpirit__Fiiiiiicii', SN_NOWARN) set_name(2148796624, 'AddRportal__Fiiiiiicii', SN_NOWARN) set_name(2148796784, 'AddDiabApoca__Fiiiiiicii', SN_NOWARN) set_name(2148797100, 'AddMissile__Fiiiiiiciii', SN_NOWARN) set_name(2148797944, 'Sentfire__Fiii', SN_NOWARN) set_name(2148798428, 'MI_Dummy__Fi', SN_NOWARN) set_name(2148798436, 'MI_Golem__Fi', SN_NOWARN) set_name(2148799040, 'MI_SetManashield__Fi', SN_NOWARN) set_name(2148799100, 'MI_LArrow__Fi', SN_NOWARN) set_name(2148801080, 'MI_Arrow__Fi', SN_NOWARN) set_name(2148801620, 'MI_Firebolt__Fi', SN_NOWARN) set_name(2148803360, 'MI_Lightball__Fi', SN_NOWARN) set_name(2148804008, 'MI_Acidpud__Fi', SN_NOWARN) set_name(2148804280, 'MI_Firewall__Fi', SN_NOWARN) set_name(2148804988, 'MI_Fireball__Fi', SN_NOWARN) set_name(2148807488, 'MI_Lightctrl__Fi', SN_NOWARN) set_name(2148808380, 'MI_Lightning__Fi', SN_NOWARN) set_name(2148808616, 'MI_Town__Fi', SN_NOWARN) set_name(2148809184, 'MI_Flash__Fi', SN_NOWARN) set_name(2148810036, 'MI_Flash2__Fi', SN_NOWARN) set_name(2148810492, 'MI_Manashield__Fi', SN_NOWARN) set_name(2148811296, 'MI_Firemove__Fi', SN_NOWARN) set_name(2148811948, 'MI_Guardian__Fi', SN_NOWARN) set_name(2148812636, 'MI_Chain__Fi', SN_NOWARN) set_name(2148813256, 'MI_Misexp__Fi', SN_NOWARN) set_name(2148814024, 'MI_Acidsplat__Fi', SN_NOWARN) set_name(2148814436, 'MI_Teleport__Fi', SN_NOWARN) set_name(2148815404, 'MI_Stone__Fi', SN_NOWARN) set_name(2148815832, 'MI_Boom__Fi', SN_NOWARN) set_name(2148816080, 'MI_Rhino__Fi', SN_NOWARN) set_name(2148817020, 'MI_FirewallC__Fi', SN_NOWARN) set_name(2148817668, 'MI_Infra__Fi', SN_NOWARN) set_name(2148817852, 'MI_Apoca__Fi', SN_NOWARN) set_name(2148818512, 'MI_Wave__Fi', SN_NOWARN) set_name(2148819788, 'MI_Nova__Fi', SN_NOWARN) set_name(2148820492, 'MI_Flame__Fi', SN_NOWARN) set_name(2148820996, 'MI_Flamec__Fi', SN_NOWARN) set_name(2148821644, 'MI_Cbolt__Fi', SN_NOWARN) set_name(2148822416, 'MI_Hbolt__Fi', SN_NOWARN) set_name(2148823196, 'MI_Element__Fi', SN_NOWARN) set_name(2148824916, 'MI_Bonespirit__Fi', SN_NOWARN) set_name(2148825948, 'MI_ResurrectBeam__Fi', SN_NOWARN) set_name(2148826060, 'MI_Rportal__Fi', SN_NOWARN) set_name(2148826608, 'ProcessMissiles__Fv', SN_NOWARN) set_name(2148827620, 'ClearMissileSpot__Fi', SN_NOWARN) set_name(2148827804, 'MoveToScrollTarget__7CBlocks', SN_NOWARN) set_name(2148827824, 'MonstPartJump__Fi', SN_NOWARN) set_name(2148828228, 'DeleteMonster__Fi', SN_NOWARN) set_name(2148828284, 'M_GetDir__Fi', SN_NOWARN) set_name(2148828376, 'M_StartDelay__Fii', SN_NOWARN) set_name(2148828448, 'M_StartRAttack__Fiii', SN_NOWARN) set_name(2148828728, 'M_StartRSpAttack__Fiii', SN_NOWARN) set_name(2148829020, 'M_StartSpAttack__Fi', SN_NOWARN) set_name(2148829252, 'M_StartEat__Fi', SN_NOWARN) set_name(2148829460, 'M_GetKnockback__Fi', SN_NOWARN) set_name(2148829932, 'M_StartHit__Fiii', SN_NOWARN) set_name(2148830692, 'M_DiabloDeath__FiUc', SN_NOWARN) set_name(2148831476, 'M2MStartHit__Fiii', SN_NOWARN) set_name(2148832160, 'MonstStartKill__FiiUc', SN_NOWARN) set_name(2148832908, 'M2MStartKill__Fii', SN_NOWARN) set_name(2148833876, 'M_StartKill__Fii', SN_NOWARN) set_name(2148834116, 'M_StartFadein__FiiUc', SN_NOWARN) set_name(2148834456, 'M_StartFadeout__FiiUc', SN_NOWARN) set_name(2148834784, 'M_StartHeal__Fi', SN_NOWARN) set_name(2148834912, 'M_ChangeLightOffset__Fi', SN_NOWARN) set_name(2148835072, 'M_DoStand__Fi', SN_NOWARN) set_name(2148835176, 'M_DoWalk__Fi', SN_NOWARN) set_name(2148835820, 'M_DoWalk2__Fi', SN_NOWARN) set_name(2148836312, 'M_DoWalk3__Fi', SN_NOWARN) set_name(2148837020, 'M_TryM2MHit__Fiiiii', SN_NOWARN) set_name(2148837476, 'M_TryH2HHit__Fiiiii', SN_NOWARN) set_name(2148839032, 'M_DoAttack__Fi', SN_NOWARN) set_name(2148839452, 'M_DoRAttack__Fi', SN_NOWARN) set_name(2148839828, 'M_DoRSpAttack__Fi', SN_NOWARN) set_name(2148840324, 'M_DoSAttack__Fi', SN_NOWARN) set_name(2148840536, 'M_DoFadein__Fi', SN_NOWARN) set_name(2148840744, 'M_DoFadeout__Fi', SN_NOWARN) set_name(2148841020, 'M_DoHeal__Fi', SN_NOWARN) set_name(2148841192, 'M_DoTalk__Fi', SN_NOWARN) set_name(2148842356, 'M_Teleport__Fi', SN_NOWARN) set_name(2148842920, 'M_DoGotHit__Fi', SN_NOWARN) set_name(2148843016, 'DoEnding__Fv', SN_NOWARN) set_name(2148843164, 'PrepDoEnding__Fv', SN_NOWARN) set_name(2148843444, 'M_DoDeath__Fi', SN_NOWARN) set_name(2148843908, 'M_DoSpStand__Fi', SN_NOWARN) set_name(2148844072, 'M_DoDelay__Fi', SN_NOWARN) set_name(2148844312, 'M_DoStone__Fi', SN_NOWARN) set_name(2148844444, 'M_WalkDir__Fii', SN_NOWARN) set_name(2148844996, 'GroupUnity__Fi', SN_NOWARN) set_name(2148846000, 'M_CallWalk__Fii', SN_NOWARN) set_name(2148846492, 'M_PathWalk__Fi', SN_NOWARN) set_name(2148846688, 'M_CallWalk2__Fii', SN_NOWARN) set_name(2148846964, 'M_DumbWalk__Fii', SN_NOWARN) set_name(2148847048, 'M_RoundWalk__FiiRi', SN_NOWARN) set_name(2148847464, 'MAI_Zombie__Fi', SN_NOWARN) set_name(2148847968, 'MAI_SkelSd__Fi', SN_NOWARN) set_name(2148848376, 'MAI_Snake__Fi', SN_NOWARN) set_name(2148849372, 'MAI_Bat__Fi', SN_NOWARN) set_name(2148850324, 'MAI_SkelBow__Fi', SN_NOWARN) set_name(2148850808, 'MAI_Fat__Fi', SN_NOWARN) set_name(2148851240, 'MAI_Sneak__Fi', SN_NOWARN) set_name(2148852244, 'MAI_Fireman__Fi', SN_NOWARN) set_name(2148853004, 'MAI_Fallen__Fi', SN_NOWARN) set_name(2148853800, 'MAI_Cleaver__Fi', SN_NOWARN) set_name(2148854032, 'MAI_Round__FiUc', SN_NOWARN) set_name(2148855164, 'MAI_GoatMc__Fi', SN_NOWARN) set_name(2148855196, 'MAI_Ranged__FiiUc', SN_NOWARN) set_name(2148855740, 'MAI_GoatBow__Fi', SN_NOWARN) set_name(2148855776, 'MAI_Succ__Fi', SN_NOWARN) set_name(2148855812, 'MAI_AcidUniq__Fi', SN_NOWARN) set_name(2148855848, 'MAI_Scav__Fi', SN_NOWARN) set_name(2148856896, 'MAI_Garg__Fi', SN_NOWARN) set_name(2148857376, 'MAI_RoundRanged__FiiUciUc', SN_NOWARN) set_name(2148858676, 'MAI_Magma__Fi', SN_NOWARN) set_name(2148858720, 'MAI_Storm__Fi', SN_NOWARN) set_name(2148858764, 'MAI_Acid__Fi', SN_NOWARN) set_name(2148858812, 'MAI_Diablo__Fi', SN_NOWARN) set_name(2148858856, 'MAI_RR2__Fiii', SN_NOWARN) set_name(2148860136, 'MAI_Mega__Fi', SN_NOWARN) set_name(2148860172, 'MAI_SkelKing__Fi', SN_NOWARN) set_name(2148861512, 'MAI_Rhino__Fi', SN_NOWARN) set_name(2148862704, 'MAI_Counselor__Fi', SN_NOWARN) set_name(2148863932, 'MAI_Garbud__Fi', SN_NOWARN) set_name(2148864364, 'MAI_Zhar__Fi', SN_NOWARN) set_name(2148864868, 'MAI_SnotSpil__Fi', SN_NOWARN) set_name(2148865432, 'MAI_Lazurus__Fi', SN_NOWARN) set_name(2148866008, 'MAI_Lazhelp__Fi', SN_NOWARN) set_name(2148866296, 'MAI_Lachdanan__Fi', SN_NOWARN) set_name(2148866696, 'MAI_Warlord__Fi', SN_NOWARN) set_name(2148867028, 'DeleteMonsterList__Fv', SN_NOWARN) set_name(2148867312, 'ProcessMonsters__Fv', SN_NOWARN) set_name(2148868728, 'DirOK__Fii', SN_NOWARN) set_name(2148869728, 'PosOkMissile__Fii', SN_NOWARN) set_name(2148869832, 'CheckNoSolid__Fii', SN_NOWARN) set_name(2148869900, 'LineClearF__FPFii_Uciiii', SN_NOWARN) set_name(2148870548, 'LineClear__Fiiii', SN_NOWARN) set_name(2148870612, 'LineClearF1__FPFiii_Uciiiii', SN_NOWARN) set_name(2148871272, 'M_FallenFear__Fii', SN_NOWARN) set_name(2148871736, 'PrintMonstHistory__Fi', SN_NOWARN) set_name(2148872428, 'PrintUniqueHistory__Fv', SN_NOWARN) set_name(2148872720, 'MissToMonst__Fiii', SN_NOWARN) set_name(2148873844, 'PosOkMonst2__Fiii', SN_NOWARN) set_name(2148874384, 'PosOkMonst3__Fiii', SN_NOWARN) set_name(2148875140, 'M_SpawnSkel__Fiii', SN_NOWARN) set_name(2148875484, 'TalktoMonster__Fi', SN_NOWARN) set_name(2148875772, 'SpawnGolum__Fiiii', SN_NOWARN) set_name(2148876372, 'CanTalkToMonst__Fi', SN_NOWARN) set_name(2148876428, 'CheckMonsterHit__FiRUc', SN_NOWARN) set_name(2148876632, 'MAI_Golum__Fi', SN_NOWARN) set_name(2148877516, 'MAI_Path__Fi', SN_NOWARN) set_name(2148877872, 'M_StartAttack__Fi', SN_NOWARN) set_name(2148878104, 'M_StartWalk__Fiiiiii', SN_NOWARN) set_name(2148878456, 'FreeInvGFX__Fv', SN_NOWARN) set_name(2148878464, 'InvDrawSlot__Fiii', SN_NOWARN) set_name(2148878596, 'InvDrawSlotBack__FiiiiUc', SN_NOWARN) set_name(2148879192, 'InvDrawItem__FiiiUci', SN_NOWARN) set_name(2148879400, 'InvDrawSlots__Fv', SN_NOWARN) set_name(2148880128, 'PrintStat__FiiPcUc', SN_NOWARN) set_name(2148880332, 'DrawInvStats__Fv', SN_NOWARN) set_name(2148883176, 'DrawInvBack__Fv', SN_NOWARN) set_name(2148883312, 'DrawInvCursor__Fv', SN_NOWARN) set_name(2148884556, 'DrawInvMsg__Fv', SN_NOWARN) set_name(2148885012, 'DrawInvUnique__Fv', SN_NOWARN) set_name(2148885304, 'DrawInv__Fv', SN_NOWARN) set_name(2148885368, 'DrawInvTSK__FP4TASK', SN_NOWARN) set_name(2148886212, 'DoThatDrawInv__Fv', SN_NOWARN) set_name(2148888204, 'AutoPlace__FiiiiUc', SN_NOWARN) set_name(2148889004, 'SpecialAutoPlace__FiiiiUc', SN_NOWARN) set_name(2148889928, 'GoldAutoPlace__Fi', SN_NOWARN) set_name(2148891160, 'WeaponAutoPlace__Fi', SN_NOWARN) set_name(2148891812, 'SwapItem__FP10ItemStructT0', SN_NOWARN) set_name(2148892064, 'CheckInvPaste__Fiii', SN_NOWARN) set_name(2148899468, 'CheckInvCut__Fiii', SN_NOWARN) set_name(2148902204, 'RemoveInvItem__Fii', SN_NOWARN) set_name(2148902884, 'RemoveSpdBarItem__Fii', SN_NOWARN) set_name(2148903128, 'CheckInvScrn__Fv', SN_NOWARN) set_name(2148903248, 'CheckItemStats__Fi', SN_NOWARN) set_name(2148903380, 'CheckBookLevel__Fi', SN_NOWARN) set_name(2148903688, 'CheckQuestItem__Fi', SN_NOWARN) set_name(2148904752, 'InvGetItem__Fii', SN_NOWARN) set_name(2148905516, 'AutoGetItem__Fii', SN_NOWARN) set_name(2148908188, 'FindGetItem__FiUsi', SN_NOWARN) set_name(2148908368, 'SyncGetItem__FiiiUsi', SN_NOWARN) set_name(2148908764, 'TryInvPut__Fv', SN_NOWARN) set_name(2148909220, 'InvPutItem__Fiii', SN_NOWARN) set_name(2148910412, 'SyncPutItem__FiiiiUsiUciiiiiUl', SN_NOWARN) set_name(2148911784, 'CheckInvHLight__Fv', SN_NOWARN) set_name(2148912624, 'RemoveScroll__Fi', SN_NOWARN) set_name(2148913108, 'UseScroll__Fv', SN_NOWARN) set_name(2148913724, 'UseStaffCharge__FP12PlayerStruct', SN_NOWARN) set_name(2148913828, 'UseStaff__Fv', SN_NOWARN) set_name(2148914020, 'StartGoldDrop__Fv', SN_NOWARN) set_name(2148914272, 'UseInvItem__Fii', SN_NOWARN) set_name(2148915588, 'DoTelekinesis__Fv', SN_NOWARN) set_name(2148915884, 'CalculateGold__Fi', SN_NOWARN) set_name(2148916196, 'DropItemBeforeTrig__Fv', SN_NOWARN) set_name(2148916284, 'ControlInv__Fv', SN_NOWARN) set_name(2148917020, 'InvGetItemWH__Fi', SN_NOWARN) set_name(2148917264, 'InvAlignObject__Fv', SN_NOWARN) set_name(2148917700, 'InvSetItemCurs__Fv', SN_NOWARN) set_name(2148918104, 'InvMoveCursLeft__Fv', SN_NOWARN) set_name(2148918528, 'InvMoveCursRight__Fv', SN_NOWARN) set_name(2148919220, 'InvMoveCursUp__Fv', SN_NOWARN) set_name(2148919724, 'InvMoveCursDown__Fv', SN_NOWARN) set_name(2148920500, 'DumpMonsters__7CBlocks', SN_NOWARN) set_name(2148920540, 'Flush__4CPad', SN_NOWARN) set_name(2148920576, 'SetRGB__6DialogUcUcUc', SN_NOWARN) set_name(2148920608, 'SetBack__6Dialogi', SN_NOWARN) set_name(2148920616, 'SetBorder__6Dialogi', SN_NOWARN) set_name(2148920624, 'SetOTpos__6Dialogi', SN_NOWARN) set_name(2148920636, '___6Dialog', SN_NOWARN) set_name(2148920676, '__6Dialog', SN_NOWARN) set_name(2148920768, 'StartAutomap__Fv', SN_NOWARN) set_name(2148920784, 'AutomapUp__Fv', SN_NOWARN) set_name(2148920816, 'AutomapDown__Fv', SN_NOWARN) set_name(2148920848, 'AutomapLeft__Fv', SN_NOWARN) set_name(2148920880, 'AutomapRight__Fv', SN_NOWARN) set_name(2148920912, 'AMGetLine__FUcUcUc', SN_NOWARN) set_name(2148921084, 'AmDrawLine__Fiiii', SN_NOWARN) set_name(2148921188, 'AmDrawPlayer__Fiiii', SN_NOWARN) set_name(2148921292, 'DrawAutomapPlr__Fv', SN_NOWARN) set_name(2148922076, 'DrawAutoMapVertWall__Fiiii', SN_NOWARN) set_name(2148922320, 'DrawAutoMapHorzWall__Fiiii', SN_NOWARN) set_name(2148922564, 'DrawAutoMapVertDoor__Fii', SN_NOWARN) set_name(2148923032, 'DrawAutoMapHorzDoor__Fii', SN_NOWARN) set_name(2148923504, 'DrawAutoMapVertGrate__Fii', SN_NOWARN) set_name(2148923684, 'DrawAutoMapHorzGrate__Fii', SN_NOWARN) set_name(2148923864, 'DrawAutoMapSquare__Fii', SN_NOWARN) set_name(2148924192, 'DrawAutoMapStairs__Fii', SN_NOWARN) set_name(2148924704, 'DrawAutomap__Fv', SN_NOWARN) set_name(2148925836, 'PRIM_GetPrim__FPP7LINE_F2', SN_NOWARN)
persona1 = {'first_name':'Luis','last_name':'Romero','age':21,'city':'Saltillo'} print(persona1['first_name']) print(persona1['last_name']) print(persona1['age']) print(persona1['city']) print() persona2 = {'first_name':'Maria','last_name':'Vazquez','age':23,'city':'Saltillo'} print(persona2['first_name']) print(persona2['last_name']) print(persona2['age']) print(persona2['city']) persona3 = {'first_name':'Juan','last_name':'Lopez','age':19,'city':'Saltillo'} print(persona3['first_name']) print(persona3['last_name']) print(persona3['age']) print(persona3['city']) print("//////////////////////////////////") people =[persona1,persona2,persona3] for persona in people: print(people)
persona1 = {'first_name': 'Luis', 'last_name': 'Romero', 'age': 21, 'city': 'Saltillo'} print(persona1['first_name']) print(persona1['last_name']) print(persona1['age']) print(persona1['city']) print() persona2 = {'first_name': 'Maria', 'last_name': 'Vazquez', 'age': 23, 'city': 'Saltillo'} print(persona2['first_name']) print(persona2['last_name']) print(persona2['age']) print(persona2['city']) persona3 = {'first_name': 'Juan', 'last_name': 'Lopez', 'age': 19, 'city': 'Saltillo'} print(persona3['first_name']) print(persona3['last_name']) print(persona3['age']) print(persona3['city']) print('//////////////////////////////////') people = [persona1, persona2, persona3] for persona in people: print(people)
# test builtin abs print(abs(False)) print(abs(True)) print(abs(1)) print(abs(-1)) # bignum print(abs(123456789012345678901234567890)) print(abs(-123456789012345678901234567890)) # edge cases for 32 and 64 bit archs (small int overflow when negating) print(abs(-0x3fffffff - 1)) print(abs(-0x3fffffffffffffff - 1))
print(abs(False)) print(abs(True)) print(abs(1)) print(abs(-1)) print(abs(123456789012345678901234567890)) print(abs(-123456789012345678901234567890)) print(abs(-1073741823 - 1)) print(abs(-4611686018427387903 - 1))
# -*- Coding: utf-8 -*- # Base class for representing a player in a game. class Player(): def __init__(self, name, score = 0): self.name = name self.score = score def getName(self): return self.name def getScore(self): return self.score def addScore(self, value): self.score += value def toTuple(self): return (self.name, self.score)
class Player: def __init__(self, name, score=0): self.name = name self.score = score def get_name(self): return self.name def get_score(self): return self.score def add_score(self, value): self.score += value def to_tuple(self): return (self.name, self.score)
def request_serializer(Request) -> dict: return { "id": str(Request["_id"]), "tenant_uid": Request["tenant_uid"], "landlord_uid": Request["landlord_uid"], "landlord_no": Request["landlord_no"], "status": Request["status"], "landlord_address": Request["landlord_address"], "created": Request["created"], "relation": Request["relation"], "reason": Request["reason"], "updated": Request["updated"] } def requests_serializer(Requests) -> list: return [request_serializer(Request) for Request in Requests]
def request_serializer(Request) -> dict: return {'id': str(Request['_id']), 'tenant_uid': Request['tenant_uid'], 'landlord_uid': Request['landlord_uid'], 'landlord_no': Request['landlord_no'], 'status': Request['status'], 'landlord_address': Request['landlord_address'], 'created': Request['created'], 'relation': Request['relation'], 'reason': Request['reason'], 'updated': Request['updated']} def requests_serializer(Requests) -> list: return [request_serializer(Request) for request in Requests]
def format_align_digits(text, reference_text): if len(text) != len(reference_text): for idx, t in enumerate(reference_text): if not t.isdigit(): text = text[:idx] + reference_text[idx] + text[idx:] return text
def format_align_digits(text, reference_text): if len(text) != len(reference_text): for (idx, t) in enumerate(reference_text): if not t.isdigit(): text = text[:idx] + reference_text[idx] + text[idx:] return text
class Monostate: __estado: dict = {} def __new__(cls, *args, **kwargs): obj = super(Monostate, cls).__new__(cls, *args, **kwargs) obj.__dict__ = cls.__estado return obj if __name__ == '__main__': m1 = Monostate() print(f'M1 ID: {id(m1)}') print(m1.__dict__) m2 = Monostate() print(f'M2 ID: {id(m2)}') print(m2.__dict__) m1.nome = 'Felicity' print(f'M1: {m1.__dict__}') print(f'M2: {m2.__dict__}')
class Monostate: __estado: dict = {} def __new__(cls, *args, **kwargs): obj = super(Monostate, cls).__new__(cls, *args, **kwargs) obj.__dict__ = cls.__estado return obj if __name__ == '__main__': m1 = monostate() print(f'M1 ID: {id(m1)}') print(m1.__dict__) m2 = monostate() print(f'M2 ID: {id(m2)}') print(m2.__dict__) m1.nome = 'Felicity' print(f'M1: {m1.__dict__}') print(f'M2: {m2.__dict__}')
N = int(input()) for i in range(0,N): print(i*i)
n = int(input()) for i in range(0, N): print(i * i)
guess = int(input()) # new transcript while guess != 0: response = input() higherThan = [0 for x in range(10)] lowerThan = [0 for x in range(10)] # build case in transcript while response != "right on": if response == "too low": # set any number <= guess to 1 in lowerthan for x in range(guess-1,-1,-1): lowerThan[x] = 1 else: # response == "too high": # set any number >= guess to 1 in higherThan for x in range(guess-1,10,1): higherThan[x] = 1 guess = int(input()) response = input() # evaluate transcript by checking for contradiction in the truthtables truther = [higherThan[i]+lowerThan[i] for i in range(len(higherThan))] if 2 not in truther and truther[guess-1] != 1: print("Stan may be honest") else: print("Stan is dishonest") # check for new transcript guess = int(input())
guess = int(input()) while guess != 0: response = input() higher_than = [0 for x in range(10)] lower_than = [0 for x in range(10)] while response != 'right on': if response == 'too low': for x in range(guess - 1, -1, -1): lowerThan[x] = 1 else: for x in range(guess - 1, 10, 1): higherThan[x] = 1 guess = int(input()) response = input() truther = [higherThan[i] + lowerThan[i] for i in range(len(higherThan))] if 2 not in truther and truther[guess - 1] != 1: print('Stan may be honest') else: print('Stan is dishonest') guess = int(input())
# GENERATED VERSION FILE # TIME: Sun Aug 30 00:34:46 2020 __version__ = '1.0.0+5d75636' short_version = '1.0.0'
__version__ = '1.0.0+5d75636' short_version = '1.0.0'
repeat = int(input()) for x in range(repeat): inlist = input().split() for i in range(len(inlist) - 1): print(inlist[i][::-1], end=" ") print(inlist[-1][::-1])
repeat = int(input()) for x in range(repeat): inlist = input().split() for i in range(len(inlist) - 1): print(inlist[i][::-1], end=' ') print(inlist[-1][::-1])
# create the __init__ function for class car class Car: def __init__(self, make, model, year, weight): self.make = make self.model = model self.year = year self.weight = weight # initialise the car with attributes for make, model, year and weight my_car = Car('mazda', '6', 2010, 1510) dream_car = Car('Delorean', 'DMC', 1983, 1300) # print the car object and its attributes print(my_car.__dict__) print(dream_car.__dict__) print('my dream car is',dream_car.make,dream_car.model)
class Car: def __init__(self, make, model, year, weight): self.make = make self.model = model self.year = year self.weight = weight my_car = car('mazda', '6', 2010, 1510) dream_car = car('Delorean', 'DMC', 1983, 1300) print(my_car.__dict__) print(dream_car.__dict__) print('my dream car is', dream_car.make, dream_car.model)
DEBUG = True SECRET_KEY = "fake-key" INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.staticfiles", "graphql_auth", ]
debug = True secret_key = 'fake-key' installed_apps = ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.staticfiles', 'graphql_auth']
range(10) # stores the value of all numbers 0- 1 less than selected range(2,8) # stores the value of all numbers first to 1 less than that selected range(2,18,2) # stores the value of the first number - 1 less than the 2nd number, at the interval of the 3rd # num1, starting number # num2, number it will not pass (or reach, ends less than that number # num3, the interval for counting up for x in [1,2,4]: # sets x to each of the values listed each time through print(x) # prints the value of x each time through the loops if x == 4: break my_list = [2,14.4, "ravens","y"] for x in my_list: # assigns x to each of of the referenced list print(x) if x == 'y': break print("") # adding a blank line so it looks nice :) for i in "Go Red Sox!": # assigns i to each of the CHARACTERS listed in the string print(i)
range(10) range(2, 8) range(2, 18, 2) for x in [1, 2, 4]: print(x) if x == 4: break my_list = [2, 14.4, 'ravens', 'y'] for x in my_list: print(x) if x == 'y': break print('') for i in 'Go Red Sox!': print(i)
n = int(input()) l = list(map(int, input().split())) l.sort() print(" ".join(map(str, l)))
n = int(input()) l = list(map(int, input().split())) l.sort() print(' '.join(map(str, l)))
''' Distribution Statement A: Approved for public release: distribution unlimited. ; May 3, 2016 This software was developed under the authority of SPAWAR Systems Center Atlantic by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. The Government assumes no responsibility whatsoever for its use by other parties, and the software is provided "AS IS" without warranty or guarantee of any kind, express or implied, including, but not limited to, the warranties of merchantability and of fitness for a particular purpose. In no event shall the Government be liable for any claim, damages or other liability, whether in an action of contract, tort or other dealings in the software. The Government has no obligation hereunder to provide maintenance, support, updates, enhancements, or modifications. We would appreciate acknowledgement if the software is used. This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified. '''
""" Distribution Statement A: Approved for public release: distribution unlimited. ; May 3, 2016 This software was developed under the authority of SPAWAR Systems Center Atlantic by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. The Government assumes no responsibility whatsoever for its use by other parties, and the software is provided "AS IS" without warranty or guarantee of any kind, express or implied, including, but not limited to, the warranties of merchantability and of fitness for a particular purpose. In no event shall the Government be liable for any claim, damages or other liability, whether in an action of contract, tort or other dealings in the software. The Government has no obligation hereunder to provide maintenance, support, updates, enhancements, or modifications. We would appreciate acknowledgement if the software is used. This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified. """
mat1 = [[1,2,3],[4,5,6]] mat2 = [[7,8,9],[6,7,3]] result= [[0,0,0],[0,0,0]] for i in range(len(mat1)): for j in range(len(mat2[0])): for k in range(len(mat2)): result[i][j]+= mat1[i][k]*mat2[j][k] for r in result: print(r)
mat1 = [[1, 2, 3], [4, 5, 6]] mat2 = [[7, 8, 9], [6, 7, 3]] result = [[0, 0, 0], [0, 0, 0]] for i in range(len(mat1)): for j in range(len(mat2[0])): for k in range(len(mat2)): result[i][j] += mat1[i][k] * mat2[j][k] for r in result: print(r)
# # PySNMP MIB module FILTER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FILTER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:00:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint") dlink_common_mgmt, = mibBuilder.importSymbols("DLINK-ID-REC-MIB", "dlink-common-mgmt") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Gauge32, Bits, Counter32, Integer32, MibIdentifier, IpAddress, iso, Unsigned32, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, Counter64, ModuleIdentity, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Bits", "Counter32", "Integer32", "MibIdentifier", "IpAddress", "iso", "Unsigned32", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "Counter64", "ModuleIdentity", "NotificationType") RowStatus, TextualConvention, MacAddress, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TextualConvention", "MacAddress", "DisplayString") swFilterMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 12, 37)) if mibBuilder.loadTexts: swFilterMIB.setLastUpdated('0808120000Z') if mibBuilder.loadTexts: swFilterMIB.setOrganization('D-Link Corp.') class PortList(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 127) swFilterDhcp = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 1)) swFilterNetbios = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 2)) swFilterExtNetbios = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 3)) swFilterCPU = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 4)) swFilterEgress = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 5)) swFilterNotify = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100)) swFilterDhcpPermitTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1), ) if mibBuilder.loadTexts: swFilterDhcpPermitTable.setStatus('current') swFilterDhcpPermitEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterDhcpServerIP"), (0, "FILTER-MIB", "swFilterDhcpClientMac")) if mibBuilder.loadTexts: swFilterDhcpPermitEntry.setStatus('current') swFilterDhcpServerIP = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swFilterDhcpServerIP.setStatus('current') swFilterDhcpClientMac = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 2), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: swFilterDhcpClientMac.setStatus('current') swFilterDhcpPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 3), PortList()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swFilterDhcpPorts.setStatus('current') swFilterDhcpStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: swFilterDhcpStatus.setStatus('current') swFilterDhcpPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2), ) if mibBuilder.loadTexts: swFilterDhcpPortTable.setStatus('current') swFilterDhcpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterDhcpPortIndex")) if mibBuilder.loadTexts: swFilterDhcpPortEntry.setStatus('current') swFilterDhcpPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: swFilterDhcpPortIndex.setStatus('current') swFilterDhcpPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterDhcpPortState.setStatus('current') swFilterDhcpServerIllegalSerLogSuppressDuration = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("duration_1min", 1), ("duration_5min", 2), ("duration_30min", 3))).clone('duration_5min')).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterDhcpServerIllegalSerLogSuppressDuration.setStatus('current') swFilterDhcpServerTrapLogState = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterDhcpServerTrapLogState.setStatus('current') swFilterNetbiosTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1), ) if mibBuilder.loadTexts: swFilterNetbiosTable.setStatus('current') swFilterNetbiosEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterNetbiosPortIndex")) if mibBuilder.loadTexts: swFilterNetbiosEntry.setStatus('current') swFilterNetbiosPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: swFilterNetbiosPortIndex.setStatus('current') swFilterNetbiosState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterNetbiosState.setStatus('current') swFilterExtNetbiosTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1), ) if mibBuilder.loadTexts: swFilterExtNetbiosTable.setStatus('current') swFilterExtNetbiosEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterExtNetbiosPortIndex")) if mibBuilder.loadTexts: swFilterExtNetbiosEntry.setStatus('current') swFilterExtNetbiosPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: swFilterExtNetbiosPortIndex.setStatus('current') swFilterExtNetbiosState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterExtNetbiosState.setStatus('current') swFilterCPUL3CtrlPktTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1), ) if mibBuilder.loadTexts: swFilterCPUL3CtrlPktTable.setStatus('current') swFilterCPUL3CtrlPktEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swFilterCPUL3CtrlPktPortIndex")) if mibBuilder.loadTexts: swFilterCPUL3CtrlPktEntry.setStatus('current') swFilterCPUL3CtrlPktPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPortIndex.setStatus('current') swFilterCPUL3CtrlPktRIPState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktRIPState.setStatus('current') swFilterCPUL3CtrlPktOSPFState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktOSPFState.setStatus('current') swFilterCPUL3CtrlPktVRRPState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktVRRPState.setStatus('current') swFilterCPUL3CtrlPktPIMState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPIMState.setStatus('current') swFilterCPUL3CtrlPktDVMRPState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktDVMRPState.setStatus('current') swFilterCPUL3CtrlPktIGMPQueryState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swFilterCPUL3CtrlPktIGMPQueryState.setStatus('current') swPktEgressFilterCtrlTable = MibTable((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1), ) if mibBuilder.loadTexts: swPktEgressFilterCtrlTable.setStatus('current') swPktEgressFilterCtrlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1), ).setIndexNames((0, "FILTER-MIB", "swPktEgressFilterPortIndex")) if mibBuilder.loadTexts: swPktEgressFilterCtrlEntry.setStatus('current') swPktEgressFilterPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: swPktEgressFilterPortIndex.setStatus('current') swPktEgressFilterUnknownUnicastStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swPktEgressFilterUnknownUnicastStatus.setStatus('current') swPktEgressFilterUnknownMulticastStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: swPktEgressFilterUnknownMulticastStatus.setStatus('current') swFilterNotifyPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 0)) swFilterDetectedTrap = NotificationType((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 0, 1)).setObjects(("FILTER-MIB", "swFilterDetectedIP"), ("FILTER-MIB", "swFilterDetectedport")) if mibBuilder.loadTexts: swFilterDetectedTrap.setStatus('current') swFilterNotificationBindings = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2)) swFilterDetectedIP = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2, 1), IpAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: swFilterDetectedIP.setStatus('current') swFilterDetectedport = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2, 2), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: swFilterDetectedport.setStatus('current') mibBuilder.exportSymbols("FILTER-MIB", swFilterDhcpPermitTable=swFilterDhcpPermitTable, swFilterExtNetbiosPortIndex=swFilterExtNetbiosPortIndex, swFilterCPUL3CtrlPktDVMRPState=swFilterCPUL3CtrlPktDVMRPState, swFilterCPUL3CtrlPktRIPState=swFilterCPUL3CtrlPktRIPState, swPktEgressFilterUnknownMulticastStatus=swPktEgressFilterUnknownMulticastStatus, swFilterDhcpPortIndex=swFilterDhcpPortIndex, PYSNMP_MODULE_ID=swFilterMIB, swFilterEgress=swFilterEgress, swFilterDetectedTrap=swFilterDetectedTrap, swFilterNotify=swFilterNotify, swFilterDhcpPortEntry=swFilterDhcpPortEntry, swFilterCPUL3CtrlPktEntry=swFilterCPUL3CtrlPktEntry, swFilterExtNetbiosEntry=swFilterExtNetbiosEntry, swFilterDhcpPortTable=swFilterDhcpPortTable, swFilterNotifyPrefix=swFilterNotifyPrefix, swFilterDhcpServerTrapLogState=swFilterDhcpServerTrapLogState, swFilterNetbiosTable=swFilterNetbiosTable, swFilterCPUL3CtrlPktPortIndex=swFilterCPUL3CtrlPktPortIndex, swFilterCPUL3CtrlPktOSPFState=swFilterCPUL3CtrlPktOSPFState, swFilterCPUL3CtrlPktTable=swFilterCPUL3CtrlPktTable, swPktEgressFilterPortIndex=swPktEgressFilterPortIndex, swFilterNetbiosState=swFilterNetbiosState, swFilterExtNetbiosState=swFilterExtNetbiosState, swFilterNetbiosPortIndex=swFilterNetbiosPortIndex, swFilterDhcpPorts=swFilterDhcpPorts, swFilterNetbiosEntry=swFilterNetbiosEntry, swFilterDhcpPermitEntry=swFilterDhcpPermitEntry, swFilterDhcpPortState=swFilterDhcpPortState, swFilterCPU=swFilterCPU, swFilterCPUL3CtrlPktVRRPState=swFilterCPUL3CtrlPktVRRPState, swFilterDhcpClientMac=swFilterDhcpClientMac, swFilterCPUL3CtrlPktIGMPQueryState=swFilterCPUL3CtrlPktIGMPQueryState, swFilterNotificationBindings=swFilterNotificationBindings, swFilterCPUL3CtrlPktPIMState=swFilterCPUL3CtrlPktPIMState, swFilterDhcp=swFilterDhcp, swPktEgressFilterCtrlEntry=swPktEgressFilterCtrlEntry, swPktEgressFilterUnknownUnicastStatus=swPktEgressFilterUnknownUnicastStatus, swFilterDhcpServerIllegalSerLogSuppressDuration=swFilterDhcpServerIllegalSerLogSuppressDuration, swFilterNetbios=swFilterNetbios, swPktEgressFilterCtrlTable=swPktEgressFilterCtrlTable, PortList=PortList, swFilterDetectedIP=swFilterDetectedIP, swFilterExtNetbios=swFilterExtNetbios, swFilterExtNetbiosTable=swFilterExtNetbiosTable, swFilterDhcpServerIP=swFilterDhcpServerIP, swFilterMIB=swFilterMIB, swFilterDetectedport=swFilterDetectedport, swFilterDhcpStatus=swFilterDhcpStatus)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, value_range_constraint, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint') (dlink_common_mgmt,) = mibBuilder.importSymbols('DLINK-ID-REC-MIB', 'dlink-common-mgmt') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (gauge32, bits, counter32, integer32, mib_identifier, ip_address, iso, unsigned32, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, counter64, module_identity, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Bits', 'Counter32', 'Integer32', 'MibIdentifier', 'IpAddress', 'iso', 'Unsigned32', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'Counter64', 'ModuleIdentity', 'NotificationType') (row_status, textual_convention, mac_address, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TextualConvention', 'MacAddress', 'DisplayString') sw_filter_mib = module_identity((1, 3, 6, 1, 4, 1, 171, 12, 37)) if mibBuilder.loadTexts: swFilterMIB.setLastUpdated('0808120000Z') if mibBuilder.loadTexts: swFilterMIB.setOrganization('D-Link Corp.') class Portlist(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 127) sw_filter_dhcp = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 1)) sw_filter_netbios = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 2)) sw_filter_ext_netbios = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 3)) sw_filter_cpu = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 4)) sw_filter_egress = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 5)) sw_filter_notify = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100)) sw_filter_dhcp_permit_table = mib_table((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1)) if mibBuilder.loadTexts: swFilterDhcpPermitTable.setStatus('current') sw_filter_dhcp_permit_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1)).setIndexNames((0, 'FILTER-MIB', 'swFilterDhcpServerIP'), (0, 'FILTER-MIB', 'swFilterDhcpClientMac')) if mibBuilder.loadTexts: swFilterDhcpPermitEntry.setStatus('current') sw_filter_dhcp_server_ip = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 1), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: swFilterDhcpServerIP.setStatus('current') sw_filter_dhcp_client_mac = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 2), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: swFilterDhcpClientMac.setStatus('current') sw_filter_dhcp_ports = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 3), port_list()).setMaxAccess('readcreate') if mibBuilder.loadTexts: swFilterDhcpPorts.setStatus('current') sw_filter_dhcp_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 1, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: swFilterDhcpStatus.setStatus('current') sw_filter_dhcp_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2)) if mibBuilder.loadTexts: swFilterDhcpPortTable.setStatus('current') sw_filter_dhcp_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1)).setIndexNames((0, 'FILTER-MIB', 'swFilterDhcpPortIndex')) if mibBuilder.loadTexts: swFilterDhcpPortEntry.setStatus('current') sw_filter_dhcp_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: swFilterDhcpPortIndex.setStatus('current') sw_filter_dhcp_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterDhcpPortState.setStatus('current') sw_filter_dhcp_server_illegal_ser_log_suppress_duration = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('duration_1min', 1), ('duration_5min', 2), ('duration_30min', 3))).clone('duration_5min')).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterDhcpServerIllegalSerLogSuppressDuration.setStatus('current') sw_filter_dhcp_server_trap_log_state = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterDhcpServerTrapLogState.setStatus('current') sw_filter_netbios_table = mib_table((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1)) if mibBuilder.loadTexts: swFilterNetbiosTable.setStatus('current') sw_filter_netbios_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1)).setIndexNames((0, 'FILTER-MIB', 'swFilterNetbiosPortIndex')) if mibBuilder.loadTexts: swFilterNetbiosEntry.setStatus('current') sw_filter_netbios_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: swFilterNetbiosPortIndex.setStatus('current') sw_filter_netbios_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 2, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterNetbiosState.setStatus('current') sw_filter_ext_netbios_table = mib_table((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1)) if mibBuilder.loadTexts: swFilterExtNetbiosTable.setStatus('current') sw_filter_ext_netbios_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1)).setIndexNames((0, 'FILTER-MIB', 'swFilterExtNetbiosPortIndex')) if mibBuilder.loadTexts: swFilterExtNetbiosEntry.setStatus('current') sw_filter_ext_netbios_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: swFilterExtNetbiosPortIndex.setStatus('current') sw_filter_ext_netbios_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 3, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterExtNetbiosState.setStatus('current') sw_filter_cpul3_ctrl_pkt_table = mib_table((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1)) if mibBuilder.loadTexts: swFilterCPUL3CtrlPktTable.setStatus('current') sw_filter_cpul3_ctrl_pkt_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1)).setIndexNames((0, 'FILTER-MIB', 'swFilterCPUL3CtrlPktPortIndex')) if mibBuilder.loadTexts: swFilterCPUL3CtrlPktEntry.setStatus('current') sw_filter_cpul3_ctrl_pkt_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPortIndex.setStatus('current') sw_filter_cpul3_ctrl_pkt_rip_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktRIPState.setStatus('current') sw_filter_cpul3_ctrl_pkt_ospf_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktOSPFState.setStatus('current') sw_filter_cpul3_ctrl_pkt_vrrp_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktVRRPState.setStatus('current') sw_filter_cpul3_ctrl_pkt_pim_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktPIMState.setStatus('current') sw_filter_cpul3_ctrl_pkt_dvmrp_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktDVMRPState.setStatus('current') sw_filter_cpul3_ctrl_pkt_igmp_query_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 4, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swFilterCPUL3CtrlPktIGMPQueryState.setStatus('current') sw_pkt_egress_filter_ctrl_table = mib_table((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1)) if mibBuilder.loadTexts: swPktEgressFilterCtrlTable.setStatus('current') sw_pkt_egress_filter_ctrl_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1)).setIndexNames((0, 'FILTER-MIB', 'swPktEgressFilterPortIndex')) if mibBuilder.loadTexts: swPktEgressFilterCtrlEntry.setStatus('current') sw_pkt_egress_filter_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: swPktEgressFilterPortIndex.setStatus('current') sw_pkt_egress_filter_unknown_unicast_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swPktEgressFilterUnknownUnicastStatus.setStatus('current') sw_pkt_egress_filter_unknown_multicast_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 12, 37, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: swPktEgressFilterUnknownMulticastStatus.setStatus('current') sw_filter_notify_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 0)) sw_filter_detected_trap = notification_type((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 0, 1)).setObjects(('FILTER-MIB', 'swFilterDetectedIP'), ('FILTER-MIB', 'swFilterDetectedport')) if mibBuilder.loadTexts: swFilterDetectedTrap.setStatus('current') sw_filter_notification_bindings = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2)) sw_filter_detected_ip = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2, 1), ip_address()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: swFilterDetectedIP.setStatus('current') sw_filter_detectedport = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 37, 100, 2, 2), integer32()).setMaxAccess('accessiblefornotify') if mibBuilder.loadTexts: swFilterDetectedport.setStatus('current') mibBuilder.exportSymbols('FILTER-MIB', swFilterDhcpPermitTable=swFilterDhcpPermitTable, swFilterExtNetbiosPortIndex=swFilterExtNetbiosPortIndex, swFilterCPUL3CtrlPktDVMRPState=swFilterCPUL3CtrlPktDVMRPState, swFilterCPUL3CtrlPktRIPState=swFilterCPUL3CtrlPktRIPState, swPktEgressFilterUnknownMulticastStatus=swPktEgressFilterUnknownMulticastStatus, swFilterDhcpPortIndex=swFilterDhcpPortIndex, PYSNMP_MODULE_ID=swFilterMIB, swFilterEgress=swFilterEgress, swFilterDetectedTrap=swFilterDetectedTrap, swFilterNotify=swFilterNotify, swFilterDhcpPortEntry=swFilterDhcpPortEntry, swFilterCPUL3CtrlPktEntry=swFilterCPUL3CtrlPktEntry, swFilterExtNetbiosEntry=swFilterExtNetbiosEntry, swFilterDhcpPortTable=swFilterDhcpPortTable, swFilterNotifyPrefix=swFilterNotifyPrefix, swFilterDhcpServerTrapLogState=swFilterDhcpServerTrapLogState, swFilterNetbiosTable=swFilterNetbiosTable, swFilterCPUL3CtrlPktPortIndex=swFilterCPUL3CtrlPktPortIndex, swFilterCPUL3CtrlPktOSPFState=swFilterCPUL3CtrlPktOSPFState, swFilterCPUL3CtrlPktTable=swFilterCPUL3CtrlPktTable, swPktEgressFilterPortIndex=swPktEgressFilterPortIndex, swFilterNetbiosState=swFilterNetbiosState, swFilterExtNetbiosState=swFilterExtNetbiosState, swFilterNetbiosPortIndex=swFilterNetbiosPortIndex, swFilterDhcpPorts=swFilterDhcpPorts, swFilterNetbiosEntry=swFilterNetbiosEntry, swFilterDhcpPermitEntry=swFilterDhcpPermitEntry, swFilterDhcpPortState=swFilterDhcpPortState, swFilterCPU=swFilterCPU, swFilterCPUL3CtrlPktVRRPState=swFilterCPUL3CtrlPktVRRPState, swFilterDhcpClientMac=swFilterDhcpClientMac, swFilterCPUL3CtrlPktIGMPQueryState=swFilterCPUL3CtrlPktIGMPQueryState, swFilterNotificationBindings=swFilterNotificationBindings, swFilterCPUL3CtrlPktPIMState=swFilterCPUL3CtrlPktPIMState, swFilterDhcp=swFilterDhcp, swPktEgressFilterCtrlEntry=swPktEgressFilterCtrlEntry, swPktEgressFilterUnknownUnicastStatus=swPktEgressFilterUnknownUnicastStatus, swFilterDhcpServerIllegalSerLogSuppressDuration=swFilterDhcpServerIllegalSerLogSuppressDuration, swFilterNetbios=swFilterNetbios, swPktEgressFilterCtrlTable=swPktEgressFilterCtrlTable, PortList=PortList, swFilterDetectedIP=swFilterDetectedIP, swFilterExtNetbios=swFilterExtNetbios, swFilterExtNetbiosTable=swFilterExtNetbiosTable, swFilterDhcpServerIP=swFilterDhcpServerIP, swFilterMIB=swFilterMIB, swFilterDetectedport=swFilterDetectedport, swFilterDhcpStatus=swFilterDhcpStatus)
colors = { "dark-blue": "#0F2080", "pink": "#A95AA1", "medium-blue": "#607381", "orange": "#C47A4F", "green": "#194D31", "purple": "#601A4A", "light-blue": "#7C9BA5", "tan": "#AE9C45", "grey": "#646464", "black": "#000000", } color_arr = [ "#0F2080", "#A95AA1", "#607381", "#C47A4F", "#194D31", "#601A4A", "#7C9BA5", "#AE9C45", "#646464", "#000000", ]
colors = {'dark-blue': '#0F2080', 'pink': '#A95AA1', 'medium-blue': '#607381', 'orange': '#C47A4F', 'green': '#194D31', 'purple': '#601A4A', 'light-blue': '#7C9BA5', 'tan': '#AE9C45', 'grey': '#646464', 'black': '#000000'} color_arr = ['#0F2080', '#A95AA1', '#607381', '#C47A4F', '#194D31', '#601A4A', '#7C9BA5', '#AE9C45', '#646464', '#000000']
# -------------- ##File path for the file file_path def read_file(path): file = open(path,'r') sentence = file.readline() file.close() return sentence sample_message = read_file(file_path) #Code starts here # -------------- #Code starts here message_1 = read_file(file_path_1) message_2 = read_file(file_path_2) print(message_1, message_2) def fuse_msg(message_a, message_b): quotient = int(message_b)//int(message_a) return str(quotient) secret_msg_1 = fuse_msg(message_1,message_2) # -------------- #Code starts here message_3 = read_file(file_path_3) print(message_3) def substitute_msg(message_c): if message_c == 'Red': sub = 'Army General' if message_c == 'Green': sub = 'Data Scientist' if message_c == 'Blue': sub = 'Marine Biologist' return sub secret_msg_2 = substitute_msg(message_3) # -------------- # File path for message 4 and message 5 file_path_4 file_path_5 #Code starts here message_4 = read_file(file_path_4) message_5 = read_file(file_path_5) print(message_4, message_5) def compare_msg(message_d, message_e): alist=message_d.split() blist=message_e.split() c_list = [ i for i in alist if i not in blist] final_msg = (' '.join(c_list)) return final_msg secret_msg_3 = compare_msg(message_4, message_5) # -------------- #Code starts here message_6 = read_file(file_path_6) print(message_6) def extract_msg(message_f): a_list = message_f.split() even_word = lambda x: (len(x))%2 ==0 b_list = filter(even_word, a_list) final_msg=(' '.join(b_list)) return final_msg secret_msg_4 = extract_msg(message_6) # -------------- #Secret message parts in the correct order message_parts=[secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2] final_path= user_data_dir + '/secret_message.txt' #Code starts here secret_msg = (' '.join(message_parts)) def write_file(secret_msg, path): fop = open(final_path, 'a+') fop.write(secret_msg) fop.close() write_file(secret_msg, final_path) print(secret_msg)
file_path def read_file(path): file = open(path, 'r') sentence = file.readline() file.close() return sentence sample_message = read_file(file_path) message_1 = read_file(file_path_1) message_2 = read_file(file_path_2) print(message_1, message_2) def fuse_msg(message_a, message_b): quotient = int(message_b) // int(message_a) return str(quotient) secret_msg_1 = fuse_msg(message_1, message_2) message_3 = read_file(file_path_3) print(message_3) def substitute_msg(message_c): if message_c == 'Red': sub = 'Army General' if message_c == 'Green': sub = 'Data Scientist' if message_c == 'Blue': sub = 'Marine Biologist' return sub secret_msg_2 = substitute_msg(message_3) file_path_4 file_path_5 message_4 = read_file(file_path_4) message_5 = read_file(file_path_5) print(message_4, message_5) def compare_msg(message_d, message_e): alist = message_d.split() blist = message_e.split() c_list = [i for i in alist if i not in blist] final_msg = ' '.join(c_list) return final_msg secret_msg_3 = compare_msg(message_4, message_5) message_6 = read_file(file_path_6) print(message_6) def extract_msg(message_f): a_list = message_f.split() even_word = lambda x: len(x) % 2 == 0 b_list = filter(even_word, a_list) final_msg = ' '.join(b_list) return final_msg secret_msg_4 = extract_msg(message_6) message_parts = [secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2] final_path = user_data_dir + '/secret_message.txt' secret_msg = ' '.join(message_parts) def write_file(secret_msg, path): fop = open(final_path, 'a+') fop.write(secret_msg) fop.close() write_file(secret_msg, final_path) print(secret_msg)
# coding=utf-8 class Constant(object): NEW_LINE = "\n" TAB_LINE = "\t" DEFAULT_DEBUG_ID = "debug_0" NPU_DEBUG_ID_1 = "debug_1" GRAPH = "graph" DUMP = "dump" class Suffix(object): JSON = '.json' CSV = '.csv' H5 = '.h5' class Pattern(object): GE_PROTO_GRAPH_PATTERN = r'^ge_proto_([0-9]+)_([A-Za-z0-9_-]+)\.txt$'
class Constant(object): new_line = '\n' tab_line = '\t' default_debug_id = 'debug_0' npu_debug_id_1 = 'debug_1' graph = 'graph' dump = 'dump' class Suffix(object): json = '.json' csv = '.csv' h5 = '.h5' class Pattern(object): ge_proto_graph_pattern = '^ge_proto_([0-9]+)_([A-Za-z0-9_-]+)\\.txt$'
class NetworkXZeroOne: def reconstruct(self, message): for e in 'xo': s = list(message) for i, w in enumerate(s): if w == '?': s[i] = e elif w != e: break e = 'o' if e == 'x' else 'x' else: return ''.join(s)
class Networkxzeroone: def reconstruct(self, message): for e in 'xo': s = list(message) for (i, w) in enumerate(s): if w == '?': s[i] = e elif w != e: break e = 'o' if e == 'x' else 'x' else: return ''.join(s)
''' this will raise a type erro we can't iterate int object''' '''for i in 25: print(i)''' ''' first way it will give 1 to 25''' print("First way") for i in range(1,26): print(i) ''' second way ForLoop Iterate Over List of One Element and it will print only 25''' print("Second way") for i in [25]: print(i)
""" this will raise a type erro we can't iterate int object""" 'for i in 25:\n print(i)' ' first way it will give 1 to 25' print('First way') for i in range(1, 26): print(i) ' second way ForLoop Iterate Over List of One Element and it will print only 25' print('Second way') for i in [25]: print(i)
class DisjSet: def __init__(self, n): # Constructor to create and # initialize sets of n items self.rank = [1] * n self.parent = [i for i in range(n)] # Finds set of given item x def find(self, x): # Finds the representative of the set # that x is an element of if (self.parent[x] != x): # if x is not the parent of itself # Then x is not the representative of # its set, self.parent[x] = self.find(self.parent[x]) # so we recursively call Find on its parent # and move i's node directly under the # representative of this set return self.parent[x] # Do union of two sets represented # by x and y. def Union(self, x, y): # Find current sets of x and y xset = self.find(x) yset = self.find(y) # If they are already in same set if xset == yset: return # Put smaller ranked item under # bigger ranked item if ranks are # different if self.rank[xset] < self.rank[yset]: self.parent[xset] = yset elif self.rank[xset] > self.rank[yset]: self.parent[yset] = xset # If ranks are same, then move y under # x (doesn't matter which one goes where) # and increment rank of x's tree else: self.parent[yset] = xset self.rank[xset] = self.rank[xset] + 1 # Driver code obj = DisjSet(5) obj.Union(0, 2) obj.Union(4, 2) obj.Union(3, 1) if obj.find(4) == obj.find(0): print('Yes') else: print('No') if obj.find(1) == obj.find(0): print('Yes') else: print('No')
class Disjset: def __init__(self, n): self.rank = [1] * n self.parent = [i for i in range(n)] def find(self, x): if self.parent[x] != x: self.parent[x] = self.find(self.parent[x]) return self.parent[x] def union(self, x, y): xset = self.find(x) yset = self.find(y) if xset == yset: return if self.rank[xset] < self.rank[yset]: self.parent[xset] = yset elif self.rank[xset] > self.rank[yset]: self.parent[yset] = xset else: self.parent[yset] = xset self.rank[xset] = self.rank[xset] + 1 obj = disj_set(5) obj.Union(0, 2) obj.Union(4, 2) obj.Union(3, 1) if obj.find(4) == obj.find(0): print('Yes') else: print('No') if obj.find(1) == obj.find(0): print('Yes') else: print('No')
class Point: def __init__(self): self.x = 0 self.y = 0 def prompt_for_point(self): self.x = int(input('Enter x: ')) self.y = int(input('Enter y: ')) def display(self): print('Center:') print('({}, {})'.format(self.x, self.y)) class Circle: def __init__(self): self.radius = 0 self.center = Point() def prompt_for_circle(self): self.center.prompt_for_point() self.radius = int(input("Enter radius: ")) def display(self): self.center.display() print('Radius: {}'.format(self.radius)) def main(): circle = Circle() circle.prompt_for_circle() print() circle.display() if __name__ == '__main__': main()
class Point: def __init__(self): self.x = 0 self.y = 0 def prompt_for_point(self): self.x = int(input('Enter x: ')) self.y = int(input('Enter y: ')) def display(self): print('Center:') print('({}, {})'.format(self.x, self.y)) class Circle: def __init__(self): self.radius = 0 self.center = point() def prompt_for_circle(self): self.center.prompt_for_point() self.radius = int(input('Enter radius: ')) def display(self): self.center.display() print('Radius: {}'.format(self.radius)) def main(): circle = circle() circle.prompt_for_circle() print() circle.display() if __name__ == '__main__': main()
#escape sequence character def escapeChar(): return "\t lorem Ipsum is simply dummy text of the printing and typesetting industry.\n \t Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,\n \t when an unknown printer took a galley of type and scrambled it to make a type specimen book." print(escapeChar())
def escape_char(): return "\t lorem Ipsum is simply dummy text of the printing and typesetting industry.\n \t Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,\n \t when an unknown printer took a galley of type and scrambled it to make a type specimen book." print(escape_char())
class HnExportException(Exception): path = "log.txt" def __init__(self,place, arg): self.place = place self.arg = arg mstr = '' for i in arg : mstr += str(i) self.WriteLog(place+":"+mstr) def __init__(self,_str): self.WriteLog(_str) def WriteLog(self,_str): file = open(self.path,"a+",encoding='utf-8') file.writelines(_str+"\n") file.close()
class Hnexportexception(Exception): path = 'log.txt' def __init__(self, place, arg): self.place = place self.arg = arg mstr = '' for i in arg: mstr += str(i) self.WriteLog(place + ':' + mstr) def __init__(self, _str): self.WriteLog(_str) def write_log(self, _str): file = open(self.path, 'a+', encoding='utf-8') file.writelines(_str + '\n') file.close()
#create shipping_detail class class shipping_detail: # define the components of the shipping class with default function def __init__(self): # defining components of shipping_detail class as variables self.shipping_id = "<shipping_id>" self.delivery_address = "<delivery_address>" self.shipping_price = "<shipping_price>" def setData(self,shipping_id,delivery_address,shipping_price): self.shipping_id=shipping_id self.delivery_address=delivery_address self.shipping_price=shipping_price def showData(self): print("shipping_id: ", self.shipping_id) print("delivery_address: ", self.delivery_address) print("shipping_price: ", self.shipping_price) sd1 = ("40","4, Rose street, London", "$10") print(sd1)
class Shipping_Detail: def __init__(self): self.shipping_id = '<shipping_id>' self.delivery_address = '<delivery_address>' self.shipping_price = '<shipping_price>' def set_data(self, shipping_id, delivery_address, shipping_price): self.shipping_id = shipping_id self.delivery_address = delivery_address self.shipping_price = shipping_price def show_data(self): print('shipping_id: ', self.shipping_id) print('delivery_address: ', self.delivery_address) print('shipping_price: ', self.shipping_price) sd1 = ('40', '4, Rose street, London', '$10') print(sd1)
# # Display DMD frames on console # # Translate bits to characters for different bits/pixel # 4 bit is really only 3 bit symbols = { "wpc": [" ","*"], "whitestar": [" ",".","o","O","*","?","?","?","?","?","?","?","?","?","?","?"], "spike": [" "," ",".",".",".","o","o","o","O","O","O","*","*","*","#","#"] } class ConsoleDisplay(): def __init__(self, characterset): self.chars = symbols[characterset] def start(self): pass def end(self): pass def move_cursor (self, y, x): print("\033[%d;%dH" % (y, x)) def display_image(self, columns, rows, bitsperpixel, data): self.move_cursor(0,0) pixelmask=0xff>>(8-bitsperpixel) pixelindex=0 pixelbit=8 for _r in range(rows): rstr="" for _c in range(columns): pixelbit -= bitsperpixel if pixelbit < 0: pixelbit += 8 pixelindex += 1 d=data[pixelindex] pv = ((d >> pixelbit) & pixelmask) rstr+=self.chars[pv] print(rstr)
symbols = {'wpc': [' ', '*'], 'whitestar': [' ', '.', 'o', 'O', '*', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?'], 'spike': [' ', ' ', '.', '.', '.', 'o', 'o', 'o', 'O', 'O', 'O', '*', '*', '*', '#', '#']} class Consoledisplay: def __init__(self, characterset): self.chars = symbols[characterset] def start(self): pass def end(self): pass def move_cursor(self, y, x): print('\x1b[%d;%dH' % (y, x)) def display_image(self, columns, rows, bitsperpixel, data): self.move_cursor(0, 0) pixelmask = 255 >> 8 - bitsperpixel pixelindex = 0 pixelbit = 8 for _r in range(rows): rstr = '' for _c in range(columns): pixelbit -= bitsperpixel if pixelbit < 0: pixelbit += 8 pixelindex += 1 d = data[pixelindex] pv = d >> pixelbit & pixelmask rstr += self.chars[pv] print(rstr)
n = int(input()) left_chairs = 0 enough_chairs = True for i in range(1, n + 1): tokens = input().split(" ") chairs = len(tokens[0]) people = int(tokens[1]) if chairs >= people: left_chairs += chairs - people else: enough_chairs = False print(f"{people - chairs} more chairs needed in room {i}") if enough_chairs: print(f"Game On, {left_chairs} free chairs left")
n = int(input()) left_chairs = 0 enough_chairs = True for i in range(1, n + 1): tokens = input().split(' ') chairs = len(tokens[0]) people = int(tokens[1]) if chairs >= people: left_chairs += chairs - people else: enough_chairs = False print(f'{people - chairs} more chairs needed in room {i}') if enough_chairs: print(f'Game On, {left_chairs} free chairs left')
#!/usr/bin/env python3 def minswap (arr): count = 0 pos = dict () # ~ print ('ARR:', arr) for i in range (len (arr)): pos[arr[i]] = i # ~ print ('POS:', pos) xi = 0 for n in sorted (pos): i = pos[n] # ~ print ('N:', n, 'XI:', xi, 'I:', i) if xi != i: pos[arr[i]] = xi pos[arr[xi]] = i arr[xi], arr[i] = arr[i], arr[xi] count += 1 # ~ print ('ARR:', arr) # ~ print ('POS:', pos) xi += 1 return count _ = input () print (minswap (list (map (int, input ().strip ().split ()))))
def minswap(arr): count = 0 pos = dict() for i in range(len(arr)): pos[arr[i]] = i xi = 0 for n in sorted(pos): i = pos[n] if xi != i: pos[arr[i]] = xi pos[arr[xi]] = i (arr[xi], arr[i]) = (arr[i], arr[xi]) count += 1 xi += 1 return count _ = input() print(minswap(list(map(int, input().strip().split()))))
# coding: utf-8 with open("test.txt", mode="r") as f: f.read(12) print(f.tell())
with open('test.txt', mode='r') as f: f.read(12) print(f.tell())
# # PySNMP MIB module CISCO-IF-LINK-CONFIG-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-IF-LINK-CONFIG-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:01:21 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, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") CiscoLocationSpecifier, = mibBuilder.importSymbols("CISCO-TC", "CiscoLocationSpecifier") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Gauge32, NotificationType, Bits, IpAddress, iso, ObjectIdentity, Integer32, Unsigned32, Counter32, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Gauge32", "NotificationType", "Bits", "IpAddress", "iso", "ObjectIdentity", "Integer32", "Unsigned32", "Counter32", "MibIdentifier") DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention") ciscoIfLinkConfigMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 175)) ciscoIfLinkConfigMIB.setRevisions(('2001-10-05 00:00', '2000-09-14 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setRevisionsDescriptions(('Add object cilTargetModuleFramingType in cilConfTable table', 'Initial version of this MIB module',)) if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setLastUpdated('200110050000Z') if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-wanatm@cisco.com') if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setDescription('The MIB module for configuration of bulk distribution (de-multiplexing of traffic from higher-bandwidth to lower-bandwidth interfaces). Terminology : bulk-distribution : The bulk distribution is the feature by which a line/interface on one module can replace the line for the other. bulk-distribution module : The module which links its interfaces to the target module. target module : A module that gets incoming traffic from a bulk distribution module rather than from a back card. The Module which supports bulk distribution, converts traffic from its lines (may be T3, OC-N) to lines on the target module (may be T3, T1 etc). The bulk distribution is achieved by having a point-to-point connection (bulk-distribution bus) between the bulk-distribution module and the target module. The benefit of bulk distribution is that the target module need not have the back cards. The lines/interfaces from bulk-distribution module will be used as lines for the target module. An example is given here on linking interfaces. |------------------------------------------------| | | | |------------------------------| | | | | | | | | | |-------------| | | Ta|rget Module | | | | | ------- ------- ------- --------------- | | | | | | | | | | | | | | | | | T1 | | T1 | |T1 | | Bulk | |card | |card | |card | | Distribution | | | | | | | | | | | | | | | | Module | | | | | | | | | | | | | | | | (T3 card) | | | | | | | | | ------- ------- ------- --------------- ') cilConfigMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 1)) cilConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1)) cilConfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1), ) if mibBuilder.loadTexts: cilConfTable.setStatus('current') if mibBuilder.loadTexts: cilConfTable.setDescription('The interface link configuration table.') cilConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-IF-LINK-CONFIG-MIB", "cilSourceInterface")) if mibBuilder.loadTexts: cilConfEntry.setStatus('current') if mibBuilder.loadTexts: cilConfEntry.setDescription('An entry in the cilConfTable. This entry is used for linking an interface identified by cilSourceInterface to an interface identified by cilTaregetModuleInterface. The entries are created and deleted using the cilRowStatus object. An interface on the bulk-distribution module cannot be linked to multiple interfaces in the target module.') cilSourceInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: cilSourceInterface.setStatus('current') if mibBuilder.loadTexts: cilSourceInterface.setDescription('An interface of the bulk-distribution module (Source) which will be linked with the interface of the target module. It represents an entry in the ifTable.') cilTargetModuleInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 2), CiscoLocationSpecifier()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cilTargetModuleInterface.setStatus('current') if mibBuilder.loadTexts: cilTargetModuleInterface.setDescription('Location of the managed entity on the target module. Following is the supported format for this object and all the values must be present. shelf=<value>, slot=<value>, subSlot=<value> port =<value>. The zero length value for this object is not supported.') cilRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: cilRowStatus.setStatus('current') if mibBuilder.loadTexts: cilRowStatus.setDescription('This object is used to create a new row or modify or delete an existing row in the table. The cilTargetModuleFramingType need not be specified to create a row. If cilTargetModuleFramingType is not specified, a default value will be assumed as described in the description of cilTargetModuleFramingType.') cilTargetModuleFramingType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("notApplicable", 1), ("dsx1D4", 2), ("dsx1ESF", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: cilTargetModuleFramingType.setStatus('current') if mibBuilder.loadTexts: cilTargetModuleFramingType.setDescription('This object identifies the framing type of the target interface. notApplicable(1) can not be set. dsx1ESF Extended SuperFrame DS1 (T1.107) dsx1D4 AT&T D4 format DS1 (T1.107) Default value is dsx1ESF(3) if cilTargetModuleInterface is a T1 interface and sonet/sdh byte-synchronous mapping is used on the cilSourceInterface. Otherwise, the default value is notApplicable(1). ') cilConfigMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 3)) cilConfigMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 1)) cilConfigMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 2)) cilConfigMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 1, 1)).setObjects(("CISCO-IF-LINK-CONFIG-MIB", "cilConfMIBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cilConfigMIBCompliance = cilConfigMIBCompliance.setStatus('deprecated') if mibBuilder.loadTexts: cilConfigMIBCompliance.setDescription('The Compliance statement for interface link configuration group. This has been replaced by the cilConfigMIBComplianceRev1 statement.') cilConfigMIBComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 1, 2)).setObjects(("CISCO-IF-LINK-CONFIG-MIB", "cilConfMIBGroupRev1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cilConfigMIBComplianceRev1 = cilConfigMIBComplianceRev1.setStatus('current') if mibBuilder.loadTexts: cilConfigMIBComplianceRev1.setDescription('The Compliance statement for interface link configuration group. This statement replaces cilConfigMIBCompliance statement.') cilConfMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 2, 1)).setObjects(("CISCO-IF-LINK-CONFIG-MIB", "cilTargetModuleInterface"), ("CISCO-IF-LINK-CONFIG-MIB", "cilRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cilConfMIBGroup = cilConfMIBGroup.setStatus('deprecated') if mibBuilder.loadTexts: cilConfMIBGroup.setDescription('These are objects related to interface link configuration group. This group has been replaced by cilConfMIBGroupRev1.') cilConfMIBGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 2, 2)).setObjects(("CISCO-IF-LINK-CONFIG-MIB", "cilTargetModuleInterface"), ("CISCO-IF-LINK-CONFIG-MIB", "cilRowStatus"), ("CISCO-IF-LINK-CONFIG-MIB", "cilTargetModuleFramingType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cilConfMIBGroupRev1 = cilConfMIBGroupRev1.setStatus('current') if mibBuilder.loadTexts: cilConfMIBGroupRev1.setDescription('These are objects related to interface link configuration group. This group replaces the cilConfMIBGroup.') mibBuilder.exportSymbols("CISCO-IF-LINK-CONFIG-MIB", cilConfMIBGroupRev1=cilConfMIBGroupRev1, cilSourceInterface=cilSourceInterface, cilConfMIBGroup=cilConfMIBGroup, cilTargetModuleInterface=cilTargetModuleInterface, cilConfigMIBObjects=cilConfigMIBObjects, cilConfTable=cilConfTable, cilConfigMIBConformance=cilConfigMIBConformance, cilConfigMIBGroups=cilConfigMIBGroups, cilConfigMIBComplianceRev1=cilConfigMIBComplianceRev1, cilConfigMIBCompliances=cilConfigMIBCompliances, cilConfEntry=cilConfEntry, PYSNMP_MODULE_ID=ciscoIfLinkConfigMIB, cilRowStatus=cilRowStatus, cilTargetModuleFramingType=cilTargetModuleFramingType, cilConfig=cilConfig, ciscoIfLinkConfigMIB=ciscoIfLinkConfigMIB, cilConfigMIBCompliance=cilConfigMIBCompliance)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection') (cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt') (cisco_location_specifier,) = mibBuilder.importSymbols('CISCO-TC', 'CiscoLocationSpecifier') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, gauge32, notification_type, bits, ip_address, iso, object_identity, integer32, unsigned32, counter32, mib_identifier) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'Gauge32', 'NotificationType', 'Bits', 'IpAddress', 'iso', 'ObjectIdentity', 'Integer32', 'Unsigned32', 'Counter32', 'MibIdentifier') (display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention') cisco_if_link_config_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 175)) ciscoIfLinkConfigMIB.setRevisions(('2001-10-05 00:00', '2000-09-14 00:00')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setRevisionsDescriptions(('Add object cilTargetModuleFramingType in cilConfTable table', 'Initial version of this MIB module')) if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setLastUpdated('200110050000Z') if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-wanatm@cisco.com') if mibBuilder.loadTexts: ciscoIfLinkConfigMIB.setDescription('The MIB module for configuration of bulk distribution (de-multiplexing of traffic from higher-bandwidth to lower-bandwidth interfaces). Terminology : bulk-distribution : The bulk distribution is the feature by which a line/interface on one module can replace the line for the other. bulk-distribution module : The module which links its interfaces to the target module. target module : A module that gets incoming traffic from a bulk distribution module rather than from a back card. The Module which supports bulk distribution, converts traffic from its lines (may be T3, OC-N) to lines on the target module (may be T3, T1 etc). The bulk distribution is achieved by having a point-to-point connection (bulk-distribution bus) between the bulk-distribution module and the target module. The benefit of bulk distribution is that the target module need not have the back cards. The lines/interfaces from bulk-distribution module will be used as lines for the target module. An example is given here on linking interfaces. |------------------------------------------------| | | | |------------------------------| | | | | | | | | | |-------------| | | Ta|rget Module | | | | | ------- ------- ------- --------------- | | | | | | | | | | | | | | | | | T1 | | T1 | |T1 | | Bulk | |card | |card | |card | | Distribution | | | | | | | | | | | | | | | | Module | | | | | | | | | | | | | | | | (T3 card) | | | | | | | | | ------- ------- ------- --------------- ') cil_config_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 1)) cil_config = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1)) cil_conf_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1)) if mibBuilder.loadTexts: cilConfTable.setStatus('current') if mibBuilder.loadTexts: cilConfTable.setDescription('The interface link configuration table.') cil_conf_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1)).setIndexNames((0, 'CISCO-IF-LINK-CONFIG-MIB', 'cilSourceInterface')) if mibBuilder.loadTexts: cilConfEntry.setStatus('current') if mibBuilder.loadTexts: cilConfEntry.setDescription('An entry in the cilConfTable. This entry is used for linking an interface identified by cilSourceInterface to an interface identified by cilTaregetModuleInterface. The entries are created and deleted using the cilRowStatus object. An interface on the bulk-distribution module cannot be linked to multiple interfaces in the target module.') cil_source_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 1), interface_index()) if mibBuilder.loadTexts: cilSourceInterface.setStatus('current') if mibBuilder.loadTexts: cilSourceInterface.setDescription('An interface of the bulk-distribution module (Source) which will be linked with the interface of the target module. It represents an entry in the ifTable.') cil_target_module_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 2), cisco_location_specifier()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cilTargetModuleInterface.setStatus('current') if mibBuilder.loadTexts: cilTargetModuleInterface.setDescription('Location of the managed entity on the target module. Following is the supported format for this object and all the values must be present. shelf=<value>, slot=<value>, subSlot=<value> port =<value>. The zero length value for this object is not supported.') cil_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: cilRowStatus.setStatus('current') if mibBuilder.loadTexts: cilRowStatus.setDescription('This object is used to create a new row or modify or delete an existing row in the table. The cilTargetModuleFramingType need not be specified to create a row. If cilTargetModuleFramingType is not specified, a default value will be assumed as described in the description of cilTargetModuleFramingType.') cil_target_module_framing_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 175, 1, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('notApplicable', 1), ('dsx1D4', 2), ('dsx1ESF', 3)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: cilTargetModuleFramingType.setStatus('current') if mibBuilder.loadTexts: cilTargetModuleFramingType.setDescription('This object identifies the framing type of the target interface. notApplicable(1) can not be set. dsx1ESF Extended SuperFrame DS1 (T1.107) dsx1D4 AT&T D4 format DS1 (T1.107) Default value is dsx1ESF(3) if cilTargetModuleInterface is a T1 interface and sonet/sdh byte-synchronous mapping is used on the cilSourceInterface. Otherwise, the default value is notApplicable(1). ') cil_config_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 3)) cil_config_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 1)) cil_config_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 2)) cil_config_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 1, 1)).setObjects(('CISCO-IF-LINK-CONFIG-MIB', 'cilConfMIBGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cil_config_mib_compliance = cilConfigMIBCompliance.setStatus('deprecated') if mibBuilder.loadTexts: cilConfigMIBCompliance.setDescription('The Compliance statement for interface link configuration group. This has been replaced by the cilConfigMIBComplianceRev1 statement.') cil_config_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 1, 2)).setObjects(('CISCO-IF-LINK-CONFIG-MIB', 'cilConfMIBGroupRev1')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cil_config_mib_compliance_rev1 = cilConfigMIBComplianceRev1.setStatus('current') if mibBuilder.loadTexts: cilConfigMIBComplianceRev1.setDescription('The Compliance statement for interface link configuration group. This statement replaces cilConfigMIBCompliance statement.') cil_conf_mib_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 2, 1)).setObjects(('CISCO-IF-LINK-CONFIG-MIB', 'cilTargetModuleInterface'), ('CISCO-IF-LINK-CONFIG-MIB', 'cilRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cil_conf_mib_group = cilConfMIBGroup.setStatus('deprecated') if mibBuilder.loadTexts: cilConfMIBGroup.setDescription('These are objects related to interface link configuration group. This group has been replaced by cilConfMIBGroupRev1.') cil_conf_mib_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 175, 3, 2, 2)).setObjects(('CISCO-IF-LINK-CONFIG-MIB', 'cilTargetModuleInterface'), ('CISCO-IF-LINK-CONFIG-MIB', 'cilRowStatus'), ('CISCO-IF-LINK-CONFIG-MIB', 'cilTargetModuleFramingType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cil_conf_mib_group_rev1 = cilConfMIBGroupRev1.setStatus('current') if mibBuilder.loadTexts: cilConfMIBGroupRev1.setDescription('These are objects related to interface link configuration group. This group replaces the cilConfMIBGroup.') mibBuilder.exportSymbols('CISCO-IF-LINK-CONFIG-MIB', cilConfMIBGroupRev1=cilConfMIBGroupRev1, cilSourceInterface=cilSourceInterface, cilConfMIBGroup=cilConfMIBGroup, cilTargetModuleInterface=cilTargetModuleInterface, cilConfigMIBObjects=cilConfigMIBObjects, cilConfTable=cilConfTable, cilConfigMIBConformance=cilConfigMIBConformance, cilConfigMIBGroups=cilConfigMIBGroups, cilConfigMIBComplianceRev1=cilConfigMIBComplianceRev1, cilConfigMIBCompliances=cilConfigMIBCompliances, cilConfEntry=cilConfEntry, PYSNMP_MODULE_ID=ciscoIfLinkConfigMIB, cilRowStatus=cilRowStatus, cilTargetModuleFramingType=cilTargetModuleFramingType, cilConfig=cilConfig, ciscoIfLinkConfigMIB=ciscoIfLinkConfigMIB, cilConfigMIBCompliance=cilConfigMIBCompliance)
# # PySNMP MIB module CISCO-HC-RMON-CAPABILITY (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-HC-RMON-CAPABILITY # Produced by pysmi-0.3.4 at Mon Apr 29 17:42:31 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") ciscoAgentCapability, = mibBuilder.importSymbols("CISCO-SMI", "ciscoAgentCapability") AgentCapabilities, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "AgentCapabilities", "ModuleCompliance", "NotificationGroup") Integer32, Counter32, IpAddress, MibIdentifier, ObjectIdentity, iso, TimeTicks, NotificationType, Gauge32, Bits, Unsigned32, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "Counter32", "IpAddress", "MibIdentifier", "ObjectIdentity", "iso", "TimeTicks", "NotificationType", "Gauge32", "Bits", "Unsigned32", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ciscoHcRmonCapability = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 7, 358)) ciscoHcRmonCapability.setRevisions(('2003-09-30 00:00',)) if mibBuilder.loadTexts: ciscoHcRmonCapability.setLastUpdated('200309300000Z') if mibBuilder.loadTexts: ciscoHcRmonCapability.setOrganization('Cisco Systems, Inc.') ciscoHcRmonCapCatOSV08R0101 = AgentCapabilities((1, 3, 6, 1, 4, 1, 9, 7, 358, 1)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoHcRmonCapCatOSV08R0101 = ciscoHcRmonCapCatOSV08R0101.setProductRelease('Cisco CatOS 8.1(1).') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoHcRmonCapCatOSV08R0101 = ciscoHcRmonCapCatOSV08R0101.setStatus('current') mibBuilder.exportSymbols("CISCO-HC-RMON-CAPABILITY", ciscoHcRmonCapability=ciscoHcRmonCapability, ciscoHcRmonCapCatOSV08R0101=ciscoHcRmonCapCatOSV08R0101, PYSNMP_MODULE_ID=ciscoHcRmonCapability)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, single_value_constraint, constraints_intersection, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint') (cisco_agent_capability,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoAgentCapability') (agent_capabilities, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'AgentCapabilities', 'ModuleCompliance', 'NotificationGroup') (integer32, counter32, ip_address, mib_identifier, object_identity, iso, time_ticks, notification_type, gauge32, bits, unsigned32, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'Counter32', 'IpAddress', 'MibIdentifier', 'ObjectIdentity', 'iso', 'TimeTicks', 'NotificationType', 'Gauge32', 'Bits', 'Unsigned32', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') cisco_hc_rmon_capability = module_identity((1, 3, 6, 1, 4, 1, 9, 7, 358)) ciscoHcRmonCapability.setRevisions(('2003-09-30 00:00',)) if mibBuilder.loadTexts: ciscoHcRmonCapability.setLastUpdated('200309300000Z') if mibBuilder.loadTexts: ciscoHcRmonCapability.setOrganization('Cisco Systems, Inc.') cisco_hc_rmon_cap_cat_osv08_r0101 = agent_capabilities((1, 3, 6, 1, 4, 1, 9, 7, 358, 1)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_hc_rmon_cap_cat_osv08_r0101 = ciscoHcRmonCapCatOSV08R0101.setProductRelease('Cisco CatOS 8.1(1).') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): cisco_hc_rmon_cap_cat_osv08_r0101 = ciscoHcRmonCapCatOSV08R0101.setStatus('current') mibBuilder.exportSymbols('CISCO-HC-RMON-CAPABILITY', ciscoHcRmonCapability=ciscoHcRmonCapability, ciscoHcRmonCapCatOSV08R0101=ciscoHcRmonCapCatOSV08R0101, PYSNMP_MODULE_ID=ciscoHcRmonCapability)
pattern_zero=[0.0, 0.062222222222, 0.115555555556, 0.133333333333, 0.16, 0.195555555556, 0.222222222222, 0.24, 0.248888888889, 0.266666666667, 0.293333333333, 0.328888888889, 0.355555555556, 0.373333333333, 0.382222222222, 0.4, 0.426666666667, 0.462222222222, 0.488888888889, 0.506666666667, 0.515555555556, 0.533333333333, 0.56, 0.595555555556, 0.622222222222, 0.64, 0.648888888889, 0.666666666667, 0.693333333333, 0.728888888889, 0.755555555556, 0.773333333333, 0.782222222222, 0.8, 0.826666666667, 0.862222222222, 0.888888888889, 0.906666666667, 0.915555555556, 0.933333333333, 0.96, 0.995555555556] pattern_odd=[0.022222222222, 0.04, 0.048888888889, 0.066666666667, 0.093333333333, 0.128888888889, 0.155555555556, 0.173333333333, 0.182222222222, 0.2, 0.226666666667, 0.262222222222, 0.288888888889, 0.306666666667, 0.315555555556, 0.333333333333, 0.36, 0.395555555556, 0.422222222222, 0.44, 0.448888888889, 0.466666666667, 0.493333333333, 0.528888888889, 0.555555555556, 0.573333333333, 0.582222222222, 0.6, 0.626666666667, 0.662222222222, 0.688888888889, 0.706666666667, 0.715555555556, 0.733333333333, 0.76, 0.795555555556, 0.822222222222, 0.84, 0.848888888889, 0.866666666667, 0.893333333333, 0.928888888889, 0.955555555556, 0.973333333333, 0.982222222222] pattern_even=[0.0, 0.026666666667, 0.062222222222, 0.088888888889, 0.106666666667, 0.115555555556, 0.133333333333, 0.16, 0.195555555556, 0.222222222222, 0.24, 0.248888888889, 0.266666666667, 0.293333333333, 0.328888888889, 0.355555555556, 0.373333333333, 0.382222222222, 0.4, 0.426666666667, 0.462222222222, 0.488888888889, 0.506666666667, 0.515555555556, 0.533333333333, 0.56, 0.595555555556, 0.622222222222, 0.64, 0.648888888889, 0.666666666667, 0.693333333333, 0.728888888889, 0.755555555556, 0.773333333333, 0.782222222222, 0.8, 0.826666666667, 0.862222222222, 0.888888888889, 0.906666666667, 0.915555555556, 0.933333333333, 0.96, 0.995555555556] averages_even={0.0: [0.0], 0.648888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.693333333333: [0.8, 0.2], 0.506666666667: [0.6, 0.4], 0.115555555556: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.533333333333: [0.0], 0.462222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.595555555556: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.96: [0.2, 0.8], 0.106666666667: [0.6, 0.4], 0.195555555556: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.266666666667: [0.0], 0.826666666667: [0.2, 0.8], 0.16: [0.8, 0.2], 0.088888888889: [0.3333333333333, 0.6666666666667], 0.782222222222: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.888888888889: [0.3333333333333, 0.6666666666667], 0.915555555556: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.728888888889: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.24: [0.6, 0.4], 0.773333333333: [0.6, 0.4], 0.293333333333: [0.8, 0.2], 0.64: [0.6, 0.4], 0.862222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.906666666667: [0.6, 0.4], 0.133333333333: [0.0], 0.382222222222: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.062222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.248888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.622222222222: [0.3333333333333, 0.6666666666667], 0.426666666667: [0.8, 0.2], 0.666666666667: [0.0], 0.355555555556: [0.3333333333333, 0.6666666666667], 0.755555555556: [0.6666666666667, 0.3333333333333], 0.8: [0.0], 0.4: [0.0], 0.995555555556: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.328888888889: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.222222222222: [0.3333333333333, 0.6666666666667], 0.026666666667: [0.8, 0.2], 0.515555555556: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.933333333333: [0.0], 0.373333333333: [0.6, 0.4], 0.56: [0.8, 0.2], 0.488888888889: [0.3333333333333, 0.6666666666667]} averages_odd={0.626666666667: [0.2, 0.8], 0.44: [0.6, 0.4], 0.173333333333: [0.6, 0.4], 0.973333333333: [0.6, 0.4], 0.715555555556: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.528888888889: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.76: [0.2, 0.8], 0.573333333333: [0.6, 0.4], 0.048888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.04: [0.6, 0.4], 0.848888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.662222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.893333333333: [0.8, 0.2], 0.706666666667: [0.6, 0.4], 0.182222222222: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.982222222222: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.795555555556: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.315555555556: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.84: [0.6, 0.4], 0.226666666667: [0.2, 0.8], 0.36: [0.2, 0.8], 0.928888888889: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.066666666667: [0.0], 0.555555555556: [0.6666666666667, 0.3333333333333], 0.288888888889: [0.6666666666667, 0.3333333333333], 0.6: [0.0], 0.155555555556: [0.6666666666667, 0.3333333333333], 0.333333333333: [0.0], 0.688888888889: [0.3333333333333, 0.6666666666667], 0.448888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.022222222222: [0.3333333333333, 0.6666666666667], 0.262222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.733333333333: [0.0], 0.493333333333: [0.2, 0.8], 0.2: [0.0], 0.306666666667: [0.6, 0.4], 0.822222222222: [0.3333333333333, 0.6666666666667], 0.422222222222: [0.6666666666667, 0.3333333333333], 0.866666666667: [0.0], 0.128888888889: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.466666666667: [0.0], 0.093333333333: [0.2, 0.8], 0.955555555556: [0.3333333333333, 0.6666666666667], 0.582222222222: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.395555555556: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333]}
pattern_zero = [0.0, 0.062222222222, 0.115555555556, 0.133333333333, 0.16, 0.195555555556, 0.222222222222, 0.24, 0.248888888889, 0.266666666667, 0.293333333333, 0.328888888889, 0.355555555556, 0.373333333333, 0.382222222222, 0.4, 0.426666666667, 0.462222222222, 0.488888888889, 0.506666666667, 0.515555555556, 0.533333333333, 0.56, 0.595555555556, 0.622222222222, 0.64, 0.648888888889, 0.666666666667, 0.693333333333, 0.728888888889, 0.755555555556, 0.773333333333, 0.782222222222, 0.8, 0.826666666667, 0.862222222222, 0.888888888889, 0.906666666667, 0.915555555556, 0.933333333333, 0.96, 0.995555555556] pattern_odd = [0.022222222222, 0.04, 0.048888888889, 0.066666666667, 0.093333333333, 0.128888888889, 0.155555555556, 0.173333333333, 0.182222222222, 0.2, 0.226666666667, 0.262222222222, 0.288888888889, 0.306666666667, 0.315555555556, 0.333333333333, 0.36, 0.395555555556, 0.422222222222, 0.44, 0.448888888889, 0.466666666667, 0.493333333333, 0.528888888889, 0.555555555556, 0.573333333333, 0.582222222222, 0.6, 0.626666666667, 0.662222222222, 0.688888888889, 0.706666666667, 0.715555555556, 0.733333333333, 0.76, 0.795555555556, 0.822222222222, 0.84, 0.848888888889, 0.866666666667, 0.893333333333, 0.928888888889, 0.955555555556, 0.973333333333, 0.982222222222] pattern_even = [0.0, 0.026666666667, 0.062222222222, 0.088888888889, 0.106666666667, 0.115555555556, 0.133333333333, 0.16, 0.195555555556, 0.222222222222, 0.24, 0.248888888889, 0.266666666667, 0.293333333333, 0.328888888889, 0.355555555556, 0.373333333333, 0.382222222222, 0.4, 0.426666666667, 0.462222222222, 0.488888888889, 0.506666666667, 0.515555555556, 0.533333333333, 0.56, 0.595555555556, 0.622222222222, 0.64, 0.648888888889, 0.666666666667, 0.693333333333, 0.728888888889, 0.755555555556, 0.773333333333, 0.782222222222, 0.8, 0.826666666667, 0.862222222222, 0.888888888889, 0.906666666667, 0.915555555556, 0.933333333333, 0.96, 0.995555555556] averages_even = {0.0: [0.0], 0.648888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.693333333333: [0.8, 0.2], 0.506666666667: [0.6, 0.4], 0.115555555556: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.533333333333: [0.0], 0.462222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.595555555556: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.96: [0.2, 0.8], 0.106666666667: [0.6, 0.4], 0.195555555556: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.266666666667: [0.0], 0.826666666667: [0.2, 0.8], 0.16: [0.8, 0.2], 0.088888888889: [0.3333333333333, 0.6666666666667], 0.782222222222: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.888888888889: [0.3333333333333, 0.6666666666667], 0.915555555556: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.728888888889: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.24: [0.6, 0.4], 0.773333333333: [0.6, 0.4], 0.293333333333: [0.8, 0.2], 0.64: [0.6, 0.4], 0.862222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.906666666667: [0.6, 0.4], 0.133333333333: [0.0], 0.382222222222: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.062222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.248888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.622222222222: [0.3333333333333, 0.6666666666667], 0.426666666667: [0.8, 0.2], 0.666666666667: [0.0], 0.355555555556: [0.3333333333333, 0.6666666666667], 0.755555555556: [0.6666666666667, 0.3333333333333], 0.8: [0.0], 0.4: [0.0], 0.995555555556: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.328888888889: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.222222222222: [0.3333333333333, 0.6666666666667], 0.026666666667: [0.8, 0.2], 0.515555555556: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.933333333333: [0.0], 0.373333333333: [0.6, 0.4], 0.56: [0.8, 0.2], 0.488888888889: [0.3333333333333, 0.6666666666667]} averages_odd = {0.626666666667: [0.2, 0.8], 0.44: [0.6, 0.4], 0.173333333333: [0.6, 0.4], 0.973333333333: [0.6, 0.4], 0.715555555556: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.528888888889: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.76: [0.2, 0.8], 0.573333333333: [0.6, 0.4], 0.048888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.04: [0.6, 0.4], 0.848888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.662222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.893333333333: [0.8, 0.2], 0.706666666667: [0.6, 0.4], 0.182222222222: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.982222222222: [0.5333333333333, 0.1333333333333, 0.8666666666667, 0.4666666666667], 0.795555555556: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.315555555556: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.84: [0.6, 0.4], 0.226666666667: [0.2, 0.8], 0.36: [0.2, 0.8], 0.928888888889: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.066666666667: [0.0], 0.555555555556: [0.6666666666667, 0.3333333333333], 0.288888888889: [0.6666666666667, 0.3333333333333], 0.6: [0.0], 0.155555555556: [0.6666666666667, 0.3333333333333], 0.333333333333: [0.0], 0.688888888889: [0.3333333333333, 0.6666666666667], 0.448888888889: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.022222222222: [0.3333333333333, 0.6666666666667], 0.262222222222: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333], 0.733333333333: [0.0], 0.493333333333: [0.2, 0.8], 0.2: [0.0], 0.306666666667: [0.6, 0.4], 0.822222222222: [0.3333333333333, 0.6666666666667], 0.422222222222: [0.6666666666667, 0.3333333333333], 0.866666666667: [0.0], 0.128888888889: [0.0666666666667, 0.2666666666667, 0.7333333333333, 0.9333333333333], 0.466666666667: [0.0], 0.093333333333: [0.2, 0.8], 0.955555555556: [0.3333333333333, 0.6666666666667], 0.582222222222: [0.1333333333333, 0.5333333333333, 0.8666666666667, 0.4666666666667], 0.395555555556: [0.2666666666667, 0.0666666666667, 0.7333333333333, 0.9333333333333]}
class Solution: def maxPower(self, s: str) -> int: max_count = 1 count = 1 for i in range(len(s) - 1): if s[i] == s[i + 1]: count += 1 if count > max_count: max_count = count if s[i] != s[i + 1]: count = 1 return max_count # Time Complexity - O(n) # Space Complexity - O(1) -> Linear Space
class Solution: def max_power(self, s: str) -> int: max_count = 1 count = 1 for i in range(len(s) - 1): if s[i] == s[i + 1]: count += 1 if count > max_count: max_count = count if s[i] != s[i + 1]: count = 1 return max_count
class payload: def __init__(self): self.name = "openurl" self.description = "open url through the default browser" self.type = "native" self.id = 117 def run(self,session,server,command): return self.name
class Payload: def __init__(self): self.name = 'openurl' self.description = 'open url through the default browser' self.type = 'native' self.id = 117 def run(self, session, server, command): return self.name
ref = {"A": 10, "B": 11, "C": 12, "D": 13, "E": 14, "F": 15} def hex_to_decimal_integer(number): if "." in number: number = number.split('.')[0] result = 0 for index, multiplier in enumerate(range(len(number) - 1, -1, -1)): value = number[index] if value in ref.keys(): value = ref[value] else: value = int(value) result += value * (16 ** multiplier) return result # I don't know why but this have a little error margin def hex_to_decimal_fraction(number): if "." in number: number = number.split(".")[1] else: number = "0" result = 0 for index, value in enumerate(number): if value in ref.keys(): value = ref[value] else: value = int(value) result += int(value) * (16 ** (-1 * (index + 1))) return result def hex_to_decimal(number): integer_part = hex_to_decimal_integer(number) decimal_part = hex_to_decimal_fraction(number) return integer_part + decimal_part def main(): number = input("Hex: ") result = hex_to_decimal(number) print("Number:", result) if __name__ == '__main__': main()
ref = {'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15} def hex_to_decimal_integer(number): if '.' in number: number = number.split('.')[0] result = 0 for (index, multiplier) in enumerate(range(len(number) - 1, -1, -1)): value = number[index] if value in ref.keys(): value = ref[value] else: value = int(value) result += value * 16 ** multiplier return result def hex_to_decimal_fraction(number): if '.' in number: number = number.split('.')[1] else: number = '0' result = 0 for (index, value) in enumerate(number): if value in ref.keys(): value = ref[value] else: value = int(value) result += int(value) * 16 ** (-1 * (index + 1)) return result def hex_to_decimal(number): integer_part = hex_to_decimal_integer(number) decimal_part = hex_to_decimal_fraction(number) return integer_part + decimal_part def main(): number = input('Hex: ') result = hex_to_decimal(number) print('Number:', result) if __name__ == '__main__': main()
#You can return a range of characters by using the slice syntax. #Specify the start index and the end index, separated by a colon, to return a part of the string. #Get the characters from position 2 to position 5 (not included): b = "Hello, World!" print(b[2:5]) b = "Hello, World!" print(b[5:8]) #by leaving out the start index, the range will start at the first character: #Get the characters from the start to position 5 (not included): b = "Hello, World!" print(b[:5]) b = "Hello, World!" print(b[:9]) #By leaving out the end index, the range will go to the end: #Get the characters from position 2, and all the way to the end: b = "Hello, World!" print(b[2:]) b = "Hello, World!" print(b[4:]) #Use negative indexes to start the slice from the end of the string: #Get the characters: #From: "o" in "World!" (position -5) #To, but not included: "d" in "World!" (position -2): b = "Hello, World!" print(b[-5:-2]) b = "Hello, World!" print(b[-9:-5])
b = 'Hello, World!' print(b[2:5]) b = 'Hello, World!' print(b[5:8]) b = 'Hello, World!' print(b[:5]) b = 'Hello, World!' print(b[:9]) b = 'Hello, World!' print(b[2:]) b = 'Hello, World!' print(b[4:]) b = 'Hello, World!' print(b[-5:-2]) b = 'Hello, World!' print(b[-9:-5])
class Person: "This is a person class" age = 10 def greet(self): print("Hello") # create a new object of Person class harry = Person() # Output: <function Person.greet> print(Person.greet) # Output: <bound method Person.greet of <__main__.Person object>> print(harry.greet) # Calling object's greet() method # Output: Hello harry.greet()
class Person: """This is a person class""" age = 10 def greet(self): print('Hello') harry = person() print(Person.greet) print(harry.greet) harry.greet()
font = CurrentFont() for name in font.selection: # get source glyph source = font[name] # get smallcap name gn = source.name + ".num" # make sc glyph object glyph = font.newGlyph(gn) # add source to sc glyph glyph.appendGlyph(source) # scale glyph.prepareUndo() glyph.scaleBy((.8,.7)) move = source.bounds[3] - glyph.bounds[3] glyph.moveBy((0,move)) glyph.performUndo() glyph.rightMargin = source.rightMargin
font = current_font() for name in font.selection: source = font[name] gn = source.name + '.num' glyph = font.newGlyph(gn) glyph.appendGlyph(source) glyph.prepareUndo() glyph.scaleBy((0.8, 0.7)) move = source.bounds[3] - glyph.bounds[3] glyph.moveBy((0, move)) glyph.performUndo() glyph.rightMargin = source.rightMargin
api = { 'base_url_net': 'https://babelnet.io/v6', 'base_url_fy': 'https://babelfy.io/v1/', 'disambiguate_url': 'https://babelfy.io/v1/disambiguate', 'synsets_given_word_url': 'https://babelnet.io/v6/getSynsetIds', 'senses_given_word_url': 'https://babelnet.io/v6/getSenses', 'information_given_synset_url': 'https://babelnet.io/v6/getSynset', 'edges_given_synset_url': 'https://babelnet.io/v6/getOutgoingEdges', 'search_spanish': 'searchLang=ES', 'spanish': 'lang=ES', }
api = {'base_url_net': 'https://babelnet.io/v6', 'base_url_fy': 'https://babelfy.io/v1/', 'disambiguate_url': 'https://babelfy.io/v1/disambiguate', 'synsets_given_word_url': 'https://babelnet.io/v6/getSynsetIds', 'senses_given_word_url': 'https://babelnet.io/v6/getSenses', 'information_given_synset_url': 'https://babelnet.io/v6/getSynset', 'edges_given_synset_url': 'https://babelnet.io/v6/getOutgoingEdges', 'search_spanish': 'searchLang=ES', 'spanish': 'lang=ES'}
# Move the first letter of each word to the end of it, # then add "ay" to the end of the word. # Leave punctuation marks untouched. # My Solution def pig_it(text): workString = text.split(" ") resString = [] for word in workString: if word.isalpha(): newWord = word[1:] + word[0] + "ay" resString.append(newWord) else: resString.append(word) return " ".join(resString) # Best Solution def pig_it(text): lst = text.split() return ' '.join( [word[1:] + word[:1] + 'ay' if word.isalpha() else word for word in lst])
def pig_it(text): work_string = text.split(' ') res_string = [] for word in workString: if word.isalpha(): new_word = word[1:] + word[0] + 'ay' resString.append(newWord) else: resString.append(word) return ' '.join(resString) def pig_it(text): lst = text.split() return ' '.join([word[1:] + word[:1] + 'ay' if word.isalpha() else word for word in lst])
'''1. Write a Python program to count the number of arguments in a given function. Sample Output: 0 1 2 3 4 1''' def num_of_args(*args): return(len(args)) print(num_of_args()) print(num_of_args(1)) print(num_of_args(1, 2)) print(num_of_args(1, 2, 3)) print(num_of_args(1, 2, 3, 4)) print(num_of_args([1, 2, 3, 4])) #Reference: w3resource
"""1. Write a Python program to count the number of arguments in a given function. Sample Output: 0 1 2 3 4 1""" def num_of_args(*args): return len(args) print(num_of_args()) print(num_of_args(1)) print(num_of_args(1, 2)) print(num_of_args(1, 2, 3)) print(num_of_args(1, 2, 3, 4)) print(num_of_args([1, 2, 3, 4]))
# The following has been generated automatically from src/core/geometry/qgsgeometry.h QgsGeometry.BufferSide.baseClass = QgsGeometry QgsGeometry.EndCapStyle.baseClass = QgsGeometry QgsGeometry.JoinStyle.baseClass = QgsGeometry
QgsGeometry.BufferSide.baseClass = QgsGeometry QgsGeometry.EndCapStyle.baseClass = QgsGeometry QgsGeometry.JoinStyle.baseClass = QgsGeometry
def add(src,links,wei=1): for a in range(len(mat[src])): if a!=src: if a == links: mat[src][a]=1*wei elif mat[src][a]!=0 and mat[src][a]!=None: pass else: mat[src][a]=0 def call(a,b,w=1): add(a,b,w) add(b,a,w) if __name__ == "__main__": length = int(input('Enter the number of vertices:')) mat=[] for i in range(length): a=[] for j in range(length): if j==i: a.append(None) else: a.append(0) mat.append(a) call(0,1) call(2,0,5) print(mat)
def add(src, links, wei=1): for a in range(len(mat[src])): if a != src: if a == links: mat[src][a] = 1 * wei elif mat[src][a] != 0 and mat[src][a] != None: pass else: mat[src][a] = 0 def call(a, b, w=1): add(a, b, w) add(b, a, w) if __name__ == '__main__': length = int(input('Enter the number of vertices:')) mat = [] for i in range(length): a = [] for j in range(length): if j == i: a.append(None) else: a.append(0) mat.append(a) call(0, 1) call(2, 0, 5) print(mat)
# # PySNMP MIB module H3C-SYS-MAN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/H3C-SYS-MAN-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:24:00 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") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint") PhysicalIndex, = mibBuilder.importSymbols("ENTITY-MIB", "PhysicalIndex") h3cCommon, = mibBuilder.importSymbols("HUAWEI-3COM-OID-MIB", "h3cCommon") SnmpTagList, SnmpTagValue = mibBuilder.importSymbols("SNMP-TARGET-MIB", "SnmpTagList", "SnmpTagValue") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Gauge32, MibIdentifier, Counter32, ModuleIdentity, Counter64, Bits, Unsigned32, NotificationType, Integer32, ObjectIdentity, IpAddress, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Gauge32", "MibIdentifier", "Counter32", "ModuleIdentity", "Counter64", "Bits", "Unsigned32", "NotificationType", "Integer32", "ObjectIdentity", "IpAddress", "TimeTicks") DisplayString, RowPointer, DateAndTime, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowPointer", "DateAndTime", "RowStatus", "TextualConvention") h3cSystemMan = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3)) h3cSystemMan.setRevisions(('2004-04-08 13:45',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: h3cSystemMan.setRevisionsDescriptions((' ',)) if mibBuilder.loadTexts: h3cSystemMan.setLastUpdated('200906070000Z') if mibBuilder.loadTexts: h3cSystemMan.setOrganization('Huawei-3COM Technologies Co., Ltd.') if mibBuilder.loadTexts: h3cSystemMan.setContactInfo('PLAT Team Huawei 3Com Technologies Co.,Ltd. Shang-Di Information Industry Base, Hai-Dian District Beijing P.R. China http://www.huawei-3com.com Zip:100085') if mibBuilder.loadTexts: h3cSystemMan.setDescription('This MIB contains objects to manage the system. It focuses on the display of current configure file and image file,and the definition of reloading image. Add the support for XRN. ') h3cSystemManMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1)) h3cSysClock = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1)) h3cSysLocalClock = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 1), DateAndTime()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysLocalClock.setStatus('current') if mibBuilder.loadTexts: h3cSysLocalClock.setDescription(' This node gives the current local time of the system. The unit of it is DateAndTime. ') h3cSysSummerTime = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2)) h3cSysSummerTimeEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysSummerTimeEnable.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeEnable.setDescription('This node indicates the status of summer time. If the value of this node is enable, means that summer time is enabled. If the value is disable, means that summer time is disabled. ') h3cSysSummerTimeZone = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysSummerTimeZone.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeZone.setDescription(' This node describes the name of time zone in summer. The string is only used to display in local time when summer time is running. That the value of h3cSysLocalClock has the time zone information means that summer time is running. ') h3cSysSummerTimeMethod = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("oneOff", 1), ("repeating", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysSummerTimeMethod.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeMethod.setDescription(' This node provides the execute method of summer time. oneOff(1): means that summer time only takes effect at specified time. repeating(2): means that summer time takes effect in specified month/day once a year. ') h3cSysSummerTimeStart = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 4), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysSummerTimeStart.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeStart.setDescription(' This node provides the start time of summer time. ') h3cSysSummerTimeEnd = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 5), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysSummerTimeEnd.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeEnd.setDescription(' This node provides the end time of summer time. The end time must be more than start time one day and less than start time one year. ') h3cSysSummerTimeOffset = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 86399))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysSummerTimeOffset.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeOffset.setDescription(' This node provides the offset time of summer time. The offset time(in seconds) means that how much time need to be appended to the local time. ') h3cSysCurrent = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2)) h3cSysCurTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1), ) if mibBuilder.loadTexts: h3cSysCurTable.setStatus('current') if mibBuilder.loadTexts: h3cSysCurTable.setDescription(' The current status of system. A configuration file, an image file and bootrom information are used to describe the current status. ') h3cSysCurEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1), ).setIndexNames((0, "H3C-SYS-MAN-MIB", "h3cSysCurEntPhysicalIndex")) if mibBuilder.loadTexts: h3cSysCurEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysCurEntry.setDescription(' An entry of h3cSysCurTable. ') h3cSysCurEntPhysicalIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: h3cSysCurEntPhysicalIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCurEntPhysicalIndex.setDescription('The value of this object is the entity index which depends on the implementation of ENTITY-MIB. If ENTITY-MIB is not supported, the value for this object is the unit ID for XRN devices , 0 for non-XRN device which has only one mainboard, the board number for non-XRN device which have several mainboards. ') h3cSysCurCFGFileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCurCFGFileIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCurCFGFileIndex.setDescription(' The startup configuration file currently used by the specified entity. If the value of it is zero, no configuration file is used. It will be the value of corresponding h3cSysCFGFileIndex in h3cSysCFGFileTable. ') h3cSysCurImageIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCurImageIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCurImageIndex.setDescription('The image file currently used by the specified entity. It will be the value of corresponding h3cSysImageIndex in h3cSysImageTable.') h3cSysCurBtmFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCurBtmFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysCurBtmFileName.setDescription('The bootrom file currently used by the specified entity.') h3cSysCurUpdateBtmFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCurUpdateBtmFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysCurUpdateBtmFileName.setDescription(' The default value of this object is the same as the value of h3cSysCurBtmFileName. The value will be changed after updating the bootrom successfully. This bootrom will take effect on next startup. ') h3cSysReload = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3)) h3cSysReloadSchedule = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysReloadSchedule.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadSchedule.setDescription(' The object points one row in h3cSysReloadScheduleTable. Its value is equal to the value of h3cSysReloadScheduleIndex. When a reload action is finished, the value of it would be zero which means no any reload schedule is selected. ') h3cSysReloadAction = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("reloadUnavailable", 1), ("reloadOnSchedule", 2), ("reloadAtOnce", 3), ("reloadCancel", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysReloadAction.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadAction.setDescription(" Writing reloadOnSchedule(2) to this object performs the reload operation on schedule. If h3cSysReloadScheduleTime is not set, the value of h3cSysReloadAction can't be set to 'reloadOnSchedule(2)'. Writing reloadAtOnce(3)to this object performs the reload operation at once, regardless of the h3cSysReloadScheduleTime. When reloadCancel(4)is set, the scheduled reload action will be cancelled and the value of h3cSysReloadAction will be 'reloadUnavailable(1)',the value of h3cSysReloadSchedule will be 0, h3cSysReloadTag will be given a value of zero length, but the content of h3cSysReloadScheduleTable will remain. The h3cSysReloadSchedule and h3cSysReloadTag determine the reload entity(ies) in mutually exclusive way. And the h3cSysReloadSchedule will be handled at first. If the value of h3cSysReloadSchedule is invalid, then the h3cSysReloadTag will be handled. If the value of h3cSysReloadSchedule is valid, the value of h3cSysReloadTag is ignored and a reload action will be implemented to the entity specified by h3cSysReloadEntity in the entry pointed by h3cSysReloadSchedule. If h3cSysReloadSchedule is valid, but the entry h3cSysReloadSchedule pointing to is not active, the reload action will be ignored , and an inconsistent value will be returned. If multiple entities are required to be reloaded at the same time, the value of h3cSysReloadTag must be specified to select the reload parameters in the h3cSysReloadSceduelTable, and h3cSysReloadSchedule must have the value of '0'. If the whole fabric is to be reloaded in an XRN device, all the units in the fabric must have at least one entry in the h3cSysReloadSceduelTable with the same tag in h3cSysReloadSceduelTagList. When a reload action is done, or there is no reload action, the value should be reloadUnavailable(1). ") h3cSysReloadScheduleTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3), ) if mibBuilder.loadTexts: h3cSysReloadScheduleTable.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleTable.setDescription(' A reload parameters set table. The table is exclusively used for reloading. When reloading action finished, the value of the table may be empty or still exist. If the mainboard in non-XRN device or all the units of the fabric in XRN device are reloaded,then the table will be refreshed. ') h3cSysReloadScheduleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1), ).setIndexNames((0, "H3C-SYS-MAN-MIB", "h3cSysReloadScheduleIndex")) if mibBuilder.loadTexts: h3cSysReloadScheduleEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleEntry.setDescription('Entry of h3cSysReloadScheduleTable.') h3cSysReloadScheduleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: h3cSysReloadScheduleIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleIndex.setDescription('The index of h3cSysReloadScheduleTable. There are two parts for this index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++++++++ + physical index + random index + ( bit 16..31 ) ( bit 0..15 ) +++++++++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes), if the row is automatic created, the value is zero, and if the row is created by users, then the value is determined by the users. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). For XRN devices, physical index is the value of a chassis entPhysicalIndex. 0 for non-XRN device which has only one main board, the board number for non-XRN device which have multiple main boards.') h3cSysReloadEntity = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadEntity.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadEntity.setDescription(' The value of h3cSysReloadEntity indicates an entry in entPhysicalTable, which is the physical entity to be reloaded. If ENTITY-MIB is not supported,the value for this object is the unit ID for XRN devices , 0 for non-XRN device which has only one mainboard, the board number for non-XRN device which have several mainboards. Each entity has only one row in h3cSysReloadScheduleTable. ') h3cSysReloadCfgFile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadCfgFile.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadCfgFile.setDescription(' The value indicates an entry in h3cSysCFGFileTable. It defines a configuration file for reload action. It is the value of corresponding h3cSysCFGFileIndex in h3cSysCFGFileTable. The zero value means no configuration file has been set for this entry, and no configuration file is used during system reloading. ') h3cSysReloadImage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadImage.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadImage.setDescription(' The value indicates an entry in h3cSysImageTable. It defines an image file for reload action. It is the value of corresponding h3cSysImageIndex in h3cSysImageTable. If dual image is supported, the main image attribute can be set through this object or by h3cSysImageType of h3cSysImageTable of the entity. It is strongly suggested to set this attribute by the latter. If main image attribute is set here, the h3cSysImageType in h3cSysImageTable of the corresponding entity will be updated, and vice versa. Before reboot, the device will check the validation of the entry. If the file does not exist, the device will not reboot and a trap will be send to NMS. ') h3cSysReloadReason = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadReason.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadReason.setDescription(" The reason of system's reloading. It is a zero length octet string when not set. ") h3cSysReloadScheduleTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 6), DateAndTime().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadScheduleTime.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleTime.setDescription(' Specify the local time at which the reload action will occur. we will only take octet strings with length 8 for this object which indicates the local time of the switch. The maximum scheduled interval between the specified time and the current system clock time is 24 days . field octets contents range ----- ------ -------- ----- 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..60 For example, Tuesday May 26, 1992 at 1:30:15 PM would be displayed as: 1992-5-26,13:30:15 If the set value is less than the value of h3cSysLocalClock or beyond the maximum scheduled time limit, a bad value error occurred. The value of all-zero octet strings indicates system reload at once if the reload action is reloadOnSchedule(2). ') h3cSysReloadRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadRowStatus.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadRowStatus.setDescription(' If one of the value of h3cSysReloadEntity,h3cSysReloadImage is invalid, the value of h3cSysReloadRowStatus can not be set to the value of ACTIVE. A valid entry means the specified element is available in current system. ') h3cSysReloadScheduleTagList = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 8), SnmpTagList()).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysReloadScheduleTagList.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleTagList.setDescription(' It specifies a tag list for the entry. ') h3cSysReloadTag = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 4), SnmpTagValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysReloadTag.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadTag.setDescription("This object contains a single tag value which is used to select entries in the h3cSysReloadScheduleTable. In the h3cSysReloadScheduleTable,any entry that contains a tag value which is equal to the value of this object is selected. For example, the value of h3cSysReloadTag is 'TOM',and the h3cSysReloadScheduleTagList of each h3cSysReloadScheduleTable entry are as follows: 1)'TOM,ROBERT,MARY' 2)'TOM,DAVE' 3)'DAVE,MARY' Since there are 'TOM' in 1) and 2),so 1) and 2) are selected. If this object contains a value of zero length, no entries are selected. ") h3cSysImage = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4)) h3cSysImageNum = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysImageNum.setStatus('current') if mibBuilder.loadTexts: h3cSysImageNum.setDescription(' The number of system images. It indicates the total entries of h3cSysImageTable. ') h3cSysImageTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2), ) if mibBuilder.loadTexts: h3cSysImageTable.setStatus('current') if mibBuilder.loadTexts: h3cSysImageTable.setDescription("The system image management table. When 'copy srcfile destfile' is executed via the CLI, if destfile is not existed, then h3cSysImageType of the new file will be 'none'; otherwise h3cSysImageType keeps its current value. When 'move srcfile destfile' is executed via the CLI, h3cSysImageType and h3cSysImageIndex remain the same while h3cSysImageLocation changes. When 'rename srcfile' is executed via the CLI,h3cSysImageType and h3cSysImageIndex remain the same while h3cSysImageName changes. When 'delete srcfile' is executed via the CLI, the file is deleted from h3cSysImageTable while index of the file keeps and will not be allocated. ") h3cSysImageEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1), ).setIndexNames((0, "H3C-SYS-MAN-MIB", "h3cSysImageIndex")) if mibBuilder.loadTexts: h3cSysImageEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysImageEntry.setDescription(' An entity image entry. Each entry consists of information of an entity image. The h3cSysImageIndex exclusively defines an image file. ') h3cSysImageIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: h3cSysImageIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysImageIndex.setDescription("There are two parts for the index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++ + physical index + image index + +++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes) is the image index;Image file Index is a monotonically increasing integer for the sole purpose of indexing events. When it reaches the maximum value,an extremely unlikely event, the agent wraps the value back to 1 and may flush existing entries. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). If ENTITY-MIB is not supported,the value for this object is the unit ID for XRN devices ,0 for non-XRN device which has only one main board,the board number for non-XRN device which have several main boards. Any index beyond the above range will not be supported. If a file is added in, its h3cSysImageIndex will be the maximum image index plus one. If the image file is removed, renamed, or moved from one place to another, its h3cSysImageIndex is not reallocated. If the image file's content is replaced, its h3cSysImageIndex will not change. ") h3cSysImageName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysImageName.setStatus('current') if mibBuilder.loadTexts: h3cSysImageName.setDescription('The file name of the image. It MUST NOT contain the path of the file.') h3cSysImageSize = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysImageSize.setStatus('current') if mibBuilder.loadTexts: h3cSysImageSize.setDescription(' Size of the file in bytes. ') h3cSysImageLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysImageLocation.setStatus('current') if mibBuilder.loadTexts: h3cSysImageLocation.setDescription(' The directory path of the image. Its form should be the same as what defined in file system. Currently it is defined as follows: For mainboard: flash:/ For slave mainboard and subboards: slotN#flash:/ For XRN devices: unitN>slotN#flash:/ ') h3cSysImageType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("main", 1), ("backup", 2), ("none", 3), ("secure", 4), ("main-backup", 5), ("main-secure", 6), ("backup-secure", 7), ("main-backup-secure", 8)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: h3cSysImageType.setStatus('current') if mibBuilder.loadTexts: h3cSysImageType.setDescription(" It indicates the reloading sequence attribute of the image. For devices which support dual image: If the value is 'main(1)',the image will be the first image in the next reloading procedure. If the value is 'backup(2)', the image will be used if the main image fails. If the value is 'secure(4)', the image will be used if the main image and backup image both fail. If the value is 'none(3)',the image will not be used in the next reloading procedure. At the same time,you also can specify the main image by h3cSysReloadImage in h3cSysReloadScheduleTable. If the image is different from previous main image, the previous main image will not be main image again. And the image table will update with this variation. Vice versa, if you have defined the reload schedule, and then you define a new main image through h3cSysImageType when you are waiting the reload schedule to be executed, the real main image will be the latest one. It is strongly suggested to define the main image here, not by h3cSysReloadImage in h3cSysReloadScheduleTable. There are some rules for setting the value of h3cSysImageType: a)When a new image file is defined as 'main' or 'backup' file,the h3cSysImageType of old 'main' or 'backup' file will automatically be 'none'. b)It is forbidden to set 'none' attribute manually. c)It is forbidden to set 'secure' attribute manually. d)If 'main' image is set to 'backup', the file keeps 'main'. And vice versa. At this time, the file has 'main-backup' property. e)If the secure image is set to 'main' or 'backup', the file has 'main-secure' or 'backup-secure'property. f)If the secure image is set to 'main' and 'backup', the file has the 'main-backup-secure' property. g)If the none image is set to 'main' or 'backup', the file has the 'main' or 'backup' property. The following table describes whether it is ok to set to another state directly from original state. +--------------+-----------+-------------+-------------+ | set to | set to | set to | set to | | | | | | original | 'main' | 'backup' | 'none' | 'secure' | state | | | | | --------------+--------------+-----------+-------------+-------------+ | | | | | main | --- | yes | no | no | | | | | | | | | | | --------------+--------------+-----------+-------------|-------------+ | | | | | backup | yes | --- | no | no | | | | | | --------------+--------------+-----------+-------------|-------------+ | | | | | | | | | | none | yes | yes | --- | no | | | | | | --------------+--------------+-----------+-------------+-------------+ | | | | | secure | yes | yes | no | --- | | | | | | | | | | | --------------+--------------+-----------+-------------+-------------+ If there is one main image in the system, one row of H3cSysReloadScheduleEntry whose h3cSysReloadImage is equal to the main image's h3cSysImageIndex will be created automatically. But if any row is deleted, it will not be created automatically in h3cSysReloadScheduleTable. For the device which doesn't support dual image(main/backup): Only 'main' and 'none' is supported and it only can be set from none to main. When a new image file is defined as 'main' file,the h3cSysImageType of old 'main' file will automatically be 'none'. ") h3cSysCFGFile = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5)) h3cSysCFGFileNum = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCFGFileNum.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileNum.setDescription(' The number of the configuration files in the system. It indicates the total entries of h3cSysCFGFileTable. ') h3cSysCFGFileTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2), ) if mibBuilder.loadTexts: h3cSysCFGFileTable.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileTable.setDescription("A table of configuration files in this system. At present, the system doesn't support dual configure file, it should act as 'dual image' if dual configure file is supported. ") h3cSysCFGFileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1), ).setIndexNames((0, "H3C-SYS-MAN-MIB", "h3cSysCFGFileIndex")) if mibBuilder.loadTexts: h3cSysCFGFileEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileEntry.setDescription(' A configuration file entry. Each entry consists of information of a configuration file. h3cSysCFGFileIndex exclusively decides a configuration file. ') h3cSysCFGFileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))) if mibBuilder.loadTexts: h3cSysCFGFileIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileIndex.setDescription('There are two parts for the index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++ + physical index + cfgFile index + +++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes) is the configuration file index; the configuration file index is a monotonically increasing integer for the sole purpose of indexing events. When it reaches the maximum value, an extremely unlikely event, the agent wraps the value back to 1 and may flush existing entries. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). If ENTITY-MIB is not supported, the value for this object is the unit ID for XRN devices ,0 for non-XRN device which has only one slot,the board number for non-XRN device which have several slots. Any index beyond the above range will not be supported. ') h3cSysCFGFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCFGFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileName.setDescription(' Configuration file name. The name should not include the colon (:) character as it is a special separator character used to delineate the device name, partition name and the file name. ') h3cSysCFGFileSize = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCFGFileSize.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileSize.setDescription(' Size of the file in bytes. Note that it does not include the size of the filesystem file header. File size will always be non-zero. ') h3cSysCFGFileLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysCFGFileLocation.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileLocation.setDescription(' The directory path of the image. Its form should be the same as what defined in filesystem. Currently it is defined as follows: For mainboard: flash:/ For slave mainboard and subboards: slotN#flash:/ For XRN devices: unitN>slotN#flash:/ ') h3cSysBtmFile = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6)) h3cSysBtmFileLoad = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 1)) h3cSysBtmLoadMaxNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysBtmLoadMaxNumber.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadMaxNumber.setDescription(' This object shows the maximum number of h3cSysBtmLoadEntry in each device/unit. ') h3cSysBtmLoadTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2), ) if mibBuilder.loadTexts: h3cSysBtmLoadTable.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadTable.setDescription(' This table is used to update the bootrom and show the results of the update operation. The bootrom files are listed at the h3cFlhFileTable. These files are used to update bootrom. ') h3cSysBtmLoadEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1), ).setIndexNames((0, "H3C-SYS-MAN-MIB", "h3cSysBtmLoadIndex")) if mibBuilder.loadTexts: h3cSysBtmLoadEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadEntry.setDescription(' Entries in the h3cSysBtmLoadTable are created and deleted using the h3cSysBtmRowStatus object. When a new row is being created and the number of entries is h3cSysBtmLoadMaxNumber, the row with minimal value of h3cSysBtmLoadTime and the value of h3cSysBtmFileType is none(2), should be destroyed automatically. ') h3cSysBtmLoadIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: h3cSysBtmLoadIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadIndex.setDescription(' The index of h3cSysBtmLoadTable. There are two parts for this index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++++++++ + physical index + random index + ( bit 16..31 ) ( bit 0..15 ) +++++++++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes), if the row is created by command line, the value is determined by system, and if the row is created by SNMP, the value is determined by users. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). If ENTITY-MIB is not supported, the value of this object is the unit ID for XRN devices, 0 for non-XRN device which has only one main board, the board number for non-XRN device which has multiple main boards. ') h3cSysBtmFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysBtmFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmFileName.setDescription(' The bootrom file name is determined by the users. The file must exist in corresponding entity. The validity of the bootrom file will be identified by system. If the file is invalid, the bootrom should fail to be updated, and the value of h3cSysBtmErrorStatus should be failed(4). ') h3cSysBtmFileType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("main", 1), ("none", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysBtmFileType.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmFileType.setDescription(' main(1) - The effective bootrom file. none(2) - The noneffective file. When bootrom is being updated, this object must be set to main(1). When bootrom is updated successfully, this object should be main(1), and the former object with the same physical index should be none(2). When bootrom failed to be updated, this object should be none(2). ') h3cSysBtmRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: h3cSysBtmRowStatus.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmRowStatus.setDescription(' Only support active(1), createAndGo(4), destroy(6). When a row is created successfully, the value of this object should be active(1), the value of h3cSysBtmFileName and h3cSysBtmFileType can not be modified by users. When bootrom is being updated, the value of h3cSysBtmErrorStatus is inProgress(2). When bootrom failed to be updated, the value of h3cSysBtmErrorStatus should be failed(4). When bootrom is updated successfully, the value of h3cSysBtmErrorStatus should be success(3). The value of h3cSysCurUpdateBtmFileName should change to the new bootrom file name. When another row is created successfully with the same physical index, and the update is successful, then the value of former h3cSysBtmFileType should be none(2) automatically. If a row is destroyed, h3cSysCurUpdateBtmFileName should not change. If a device/unit reboots, h3cSysBtmLoadTable should be empty. ') h3cSysBtmErrorStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("invalidFile", 1), ("inProgress", 2), ("success", 3), ("failed", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysBtmErrorStatus.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmErrorStatus.setDescription(' This object shows the status of the specified operation after creating a row. invalidFile(1) - file is invalid. inProgress(2) - the operation is in progress. success(3) - the operation was done successfully. failed(4) - the operation failed. ') h3cSysBtmLoadTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 6), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: h3cSysBtmLoadTime.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadTime.setDescription(' This object indicates operation time. ') h3cSystemManMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2)) h3cSysClockChangedNotification = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2, 1)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysLocalClock")) if mibBuilder.loadTexts: h3cSysClockChangedNotification.setStatus('current') if mibBuilder.loadTexts: h3cSysClockChangedNotification.setDescription(' A clock changed notification is generated when the current local date and time for the system has been manually changed. The value of h3cSysLocalClock reflects new date and time. ') h3cSysReloadNotification = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2, 2)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysReloadImage"), ("H3C-SYS-MAN-MIB", "h3cSysReloadCfgFile"), ("H3C-SYS-MAN-MIB", "h3cSysReloadReason"), ("H3C-SYS-MAN-MIB", "h3cSysReloadScheduleTime"), ("H3C-SYS-MAN-MIB", "h3cSysReloadAction")) if mibBuilder.loadTexts: h3cSysReloadNotification.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadNotification.setDescription(' A h3cSysReloadNotification will be sent before the corresponding entity is rebooted. It will also be sent if the entity fails to reboot because the clock has changed. ') h3cSysStartUpNotification = NotificationType((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2, 3)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysImageType")) if mibBuilder.loadTexts: h3cSysStartUpNotification.setStatus('current') if mibBuilder.loadTexts: h3cSysStartUpNotification.setDescription(" a h3cSysStartUpNotification trap will be sent when the system starts up with 'main' image file failed, a trap will be sent to indicate which type the current image file (I.e backup or secure)is. ") h3cSystemManMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3)) h3cSystemManMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 1)) h3cSystemManMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 1, 1)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysClockGroup"), ("H3C-SYS-MAN-MIB", "h3cSysReloadGroup"), ("H3C-SYS-MAN-MIB", "h3cSysImageGroup"), ("H3C-SYS-MAN-MIB", "h3cSysCFGFileGroup"), ("H3C-SYS-MAN-MIB", "h3cSystemManNotificationGroup"), ("H3C-SYS-MAN-MIB", "h3cSysCurGroup"), ("H3C-SYS-MAN-MIB", "h3cSystemBtmLoadGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSystemManMIBCompliance = h3cSystemManMIBCompliance.setStatus('current') if mibBuilder.loadTexts: h3cSystemManMIBCompliance.setDescription(' The compliance statement for entities which implement the Huawei 3Com system management MIB. ') h3cSystemManMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2)) h3cSysClockGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 1)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysLocalClock"), ("H3C-SYS-MAN-MIB", "h3cSysSummerTimeEnable"), ("H3C-SYS-MAN-MIB", "h3cSysSummerTimeZone"), ("H3C-SYS-MAN-MIB", "h3cSysSummerTimeMethod"), ("H3C-SYS-MAN-MIB", "h3cSysSummerTimeStart"), ("H3C-SYS-MAN-MIB", "h3cSysSummerTimeEnd"), ("H3C-SYS-MAN-MIB", "h3cSysSummerTimeOffset")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSysClockGroup = h3cSysClockGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysClockGroup.setDescription('A collection of objects providing mandatory system clock information.') h3cSysReloadGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 2)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysReloadSchedule"), ("H3C-SYS-MAN-MIB", "h3cSysReloadAction"), ("H3C-SYS-MAN-MIB", "h3cSysReloadImage"), ("H3C-SYS-MAN-MIB", "h3cSysReloadCfgFile"), ("H3C-SYS-MAN-MIB", "h3cSysReloadReason"), ("H3C-SYS-MAN-MIB", "h3cSysReloadScheduleTagList"), ("H3C-SYS-MAN-MIB", "h3cSysReloadTag"), ("H3C-SYS-MAN-MIB", "h3cSysReloadScheduleTime"), ("H3C-SYS-MAN-MIB", "h3cSysReloadEntity"), ("H3C-SYS-MAN-MIB", "h3cSysReloadRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSysReloadGroup = h3cSysReloadGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadGroup.setDescription('A collection of objects providing mandatory system reload.') h3cSysImageGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 3)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysImageNum"), ("H3C-SYS-MAN-MIB", "h3cSysImageName"), ("H3C-SYS-MAN-MIB", "h3cSysImageSize"), ("H3C-SYS-MAN-MIB", "h3cSysImageLocation"), ("H3C-SYS-MAN-MIB", "h3cSysImageType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSysImageGroup = h3cSysImageGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysImageGroup.setDescription('A collection of objects providing mandatory system image information.') h3cSysCFGFileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 4)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysCFGFileNum"), ("H3C-SYS-MAN-MIB", "h3cSysCFGFileName"), ("H3C-SYS-MAN-MIB", "h3cSysCFGFileSize"), ("H3C-SYS-MAN-MIB", "h3cSysCFGFileLocation")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSysCFGFileGroup = h3cSysCFGFileGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileGroup.setDescription(' A collection of objects providing mandatory system configuration file information. ') h3cSysCurGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 5)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysCurCFGFileIndex"), ("H3C-SYS-MAN-MIB", "h3cSysCurImageIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSysCurGroup = h3cSysCurGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysCurGroup.setDescription('A collection of system current status.') h3cSystemManNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 6)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysClockChangedNotification"), ("H3C-SYS-MAN-MIB", "h3cSysReloadNotification"), ("H3C-SYS-MAN-MIB", "h3cSysStartUpNotification")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSystemManNotificationGroup = h3cSystemManNotificationGroup.setStatus('current') if mibBuilder.loadTexts: h3cSystemManNotificationGroup.setDescription('A collection of notifications.') h3cSystemBtmLoadGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 7)).setObjects(("H3C-SYS-MAN-MIB", "h3cSysCurBtmFileName"), ("H3C-SYS-MAN-MIB", "h3cSysCurUpdateBtmFileName"), ("H3C-SYS-MAN-MIB", "h3cSysBtmLoadMaxNumber"), ("H3C-SYS-MAN-MIB", "h3cSysBtmFileName"), ("H3C-SYS-MAN-MIB", "h3cSysBtmFileType"), ("H3C-SYS-MAN-MIB", "h3cSysBtmRowStatus"), ("H3C-SYS-MAN-MIB", "h3cSysBtmErrorStatus"), ("H3C-SYS-MAN-MIB", "h3cSysBtmLoadTime")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3cSystemBtmLoadGroup = h3cSystemBtmLoadGroup.setStatus('current') if mibBuilder.loadTexts: h3cSystemBtmLoadGroup.setDescription('A collection of objects providing system update bootrom information.') mibBuilder.exportSymbols("H3C-SYS-MAN-MIB", h3cSysCurrent=h3cSysCurrent, h3cSysImageName=h3cSysImageName, h3cSysBtmLoadIndex=h3cSysBtmLoadIndex, h3cSysReload=h3cSysReload, h3cSysSummerTimeOffset=h3cSysSummerTimeOffset, h3cSysClockChangedNotification=h3cSysClockChangedNotification, h3cSysSummerTimeZone=h3cSysSummerTimeZone, h3cSysCFGFileNum=h3cSysCFGFileNum, h3cSystemManMIBNotifications=h3cSystemManMIBNotifications, h3cSysClock=h3cSysClock, h3cSysImageSize=h3cSysImageSize, h3cSysCurCFGFileIndex=h3cSysCurCFGFileIndex, h3cSysReloadSchedule=h3cSysReloadSchedule, h3cSysReloadNotification=h3cSysReloadNotification, h3cSystemManMIBCompliances=h3cSystemManMIBCompliances, h3cSysReloadTag=h3cSysReloadTag, h3cSysCFGFile=h3cSysCFGFile, h3cSystemManMIBGroups=h3cSystemManMIBGroups, h3cSysBtmErrorStatus=h3cSysBtmErrorStatus, h3cSysImageEntry=h3cSysImageEntry, h3cSysBtmFileType=h3cSysBtmFileType, h3cSysCFGFileLocation=h3cSysCFGFileLocation, h3cSysReloadScheduleTime=h3cSysReloadScheduleTime, h3cSysImageGroup=h3cSysImageGroup, h3cSysCFGFileEntry=h3cSysCFGFileEntry, h3cSysCurImageIndex=h3cSysCurImageIndex, h3cSysReloadImage=h3cSysReloadImage, h3cSysBtmFile=h3cSysBtmFile, h3cSysReloadScheduleTable=h3cSysReloadScheduleTable, h3cSysClockGroup=h3cSysClockGroup, h3cSysReloadReason=h3cSysReloadReason, h3cSysBtmLoadEntry=h3cSysBtmLoadEntry, PYSNMP_MODULE_ID=h3cSystemMan, h3cSysBtmLoadTime=h3cSysBtmLoadTime, h3cSysReloadGroup=h3cSysReloadGroup, h3cSysReloadEntity=h3cSysReloadEntity, h3cSystemManMIBConformance=h3cSystemManMIBConformance, h3cSysSummerTimeEnd=h3cSysSummerTimeEnd, h3cSysCurGroup=h3cSysCurGroup, h3cSystemManMIBObjects=h3cSystemManMIBObjects, h3cSysCurEntPhysicalIndex=h3cSysCurEntPhysicalIndex, h3cSysReloadRowStatus=h3cSysReloadRowStatus, h3cSysCFGFileTable=h3cSysCFGFileTable, h3cSysImage=h3cSysImage, h3cSysSummerTimeEnable=h3cSysSummerTimeEnable, h3cSysSummerTimeMethod=h3cSysSummerTimeMethod, h3cSysImageLocation=h3cSysImageLocation, h3cSysBtmFileLoad=h3cSysBtmFileLoad, h3cSysCFGFileName=h3cSysCFGFileName, h3cSysBtmLoadTable=h3cSysBtmLoadTable, h3cSystemManNotificationGroup=h3cSystemManNotificationGroup, h3cSysCFGFileSize=h3cSysCFGFileSize, h3cSysCurEntry=h3cSysCurEntry, h3cSystemManMIBCompliance=h3cSystemManMIBCompliance, h3cSysReloadCfgFile=h3cSysReloadCfgFile, h3cSysCFGFileGroup=h3cSysCFGFileGroup, h3cSystemMan=h3cSystemMan, h3cSysImageType=h3cSysImageType, h3cSysReloadScheduleTagList=h3cSysReloadScheduleTagList, h3cSysBtmFileName=h3cSysBtmFileName, h3cSysCurBtmFileName=h3cSysCurBtmFileName, h3cSysImageIndex=h3cSysImageIndex, h3cSysSummerTimeStart=h3cSysSummerTimeStart, h3cSysCurUpdateBtmFileName=h3cSysCurUpdateBtmFileName, h3cSysReloadScheduleIndex=h3cSysReloadScheduleIndex, h3cSysImageTable=h3cSysImageTable, h3cSysImageNum=h3cSysImageNum, h3cSystemBtmLoadGroup=h3cSystemBtmLoadGroup, h3cSysCurTable=h3cSysCurTable, h3cSysReloadAction=h3cSysReloadAction, h3cSysBtmRowStatus=h3cSysBtmRowStatus, h3cSysBtmLoadMaxNumber=h3cSysBtmLoadMaxNumber, h3cSysCFGFileIndex=h3cSysCFGFileIndex, h3cSysSummerTime=h3cSysSummerTime, h3cSysStartUpNotification=h3cSysStartUpNotification, h3cSysReloadScheduleEntry=h3cSysReloadScheduleEntry, h3cSysLocalClock=h3cSysLocalClock)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_union, value_range_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint') (physical_index,) = mibBuilder.importSymbols('ENTITY-MIB', 'PhysicalIndex') (h3c_common,) = mibBuilder.importSymbols('HUAWEI-3COM-OID-MIB', 'h3cCommon') (snmp_tag_list, snmp_tag_value) = mibBuilder.importSymbols('SNMP-TARGET-MIB', 'SnmpTagList', 'SnmpTagValue') (module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup') (mib_scalar, mib_table, mib_table_row, mib_table_column, iso, gauge32, mib_identifier, counter32, module_identity, counter64, bits, unsigned32, notification_type, integer32, object_identity, ip_address, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Gauge32', 'MibIdentifier', 'Counter32', 'ModuleIdentity', 'Counter64', 'Bits', 'Unsigned32', 'NotificationType', 'Integer32', 'ObjectIdentity', 'IpAddress', 'TimeTicks') (display_string, row_pointer, date_and_time, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowPointer', 'DateAndTime', 'RowStatus', 'TextualConvention') h3c_system_man = module_identity((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3)) h3cSystemMan.setRevisions(('2004-04-08 13:45',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: h3cSystemMan.setRevisionsDescriptions((' ',)) if mibBuilder.loadTexts: h3cSystemMan.setLastUpdated('200906070000Z') if mibBuilder.loadTexts: h3cSystemMan.setOrganization('Huawei-3COM Technologies Co., Ltd.') if mibBuilder.loadTexts: h3cSystemMan.setContactInfo('PLAT Team Huawei 3Com Technologies Co.,Ltd. Shang-Di Information Industry Base, Hai-Dian District Beijing P.R. China http://www.huawei-3com.com Zip:100085') if mibBuilder.loadTexts: h3cSystemMan.setDescription('This MIB contains objects to manage the system. It focuses on the display of current configure file and image file,and the definition of reloading image. Add the support for XRN. ') h3c_system_man_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1)) h3c_sys_clock = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1)) h3c_sys_local_clock = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 1), date_and_time()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysLocalClock.setStatus('current') if mibBuilder.loadTexts: h3cSysLocalClock.setDescription(' This node gives the current local time of the system. The unit of it is DateAndTime. ') h3c_sys_summer_time = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2)) h3c_sys_summer_time_enable = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysSummerTimeEnable.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeEnable.setDescription('This node indicates the status of summer time. If the value of this node is enable, means that summer time is enabled. If the value is disable, means that summer time is disabled. ') h3c_sys_summer_time_zone = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 2), display_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysSummerTimeZone.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeZone.setDescription(' This node describes the name of time zone in summer. The string is only used to display in local time when summer time is running. That the value of h3cSysLocalClock has the time zone information means that summer time is running. ') h3c_sys_summer_time_method = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('oneOff', 1), ('repeating', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysSummerTimeMethod.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeMethod.setDescription(' This node provides the execute method of summer time. oneOff(1): means that summer time only takes effect at specified time. repeating(2): means that summer time takes effect in specified month/day once a year. ') h3c_sys_summer_time_start = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 4), date_and_time().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysSummerTimeStart.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeStart.setDescription(' This node provides the start time of summer time. ') h3c_sys_summer_time_end = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 5), date_and_time().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysSummerTimeEnd.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeEnd.setDescription(' This node provides the end time of summer time. The end time must be more than start time one day and less than start time one year. ') h3c_sys_summer_time_offset = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 1, 2, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 86399))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysSummerTimeOffset.setStatus('current') if mibBuilder.loadTexts: h3cSysSummerTimeOffset.setDescription(' This node provides the offset time of summer time. The offset time(in seconds) means that how much time need to be appended to the local time. ') h3c_sys_current = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2)) h3c_sys_cur_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1)) if mibBuilder.loadTexts: h3cSysCurTable.setStatus('current') if mibBuilder.loadTexts: h3cSysCurTable.setDescription(' The current status of system. A configuration file, an image file and bootrom information are used to describe the current status. ') h3c_sys_cur_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1)).setIndexNames((0, 'H3C-SYS-MAN-MIB', 'h3cSysCurEntPhysicalIndex')) if mibBuilder.loadTexts: h3cSysCurEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysCurEntry.setDescription(' An entry of h3cSysCurTable. ') h3c_sys_cur_ent_physical_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: h3cSysCurEntPhysicalIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCurEntPhysicalIndex.setDescription('The value of this object is the entity index which depends on the implementation of ENTITY-MIB. If ENTITY-MIB is not supported, the value for this object is the unit ID for XRN devices , 0 for non-XRN device which has only one mainboard, the board number for non-XRN device which have several mainboards. ') h3c_sys_cur_cfg_file_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCurCFGFileIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCurCFGFileIndex.setDescription(' The startup configuration file currently used by the specified entity. If the value of it is zero, no configuration file is used. It will be the value of corresponding h3cSysCFGFileIndex in h3cSysCFGFileTable. ') h3c_sys_cur_image_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCurImageIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCurImageIndex.setDescription('The image file currently used by the specified entity. It will be the value of corresponding h3cSysImageIndex in h3cSysImageTable.') h3c_sys_cur_btm_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 4), octet_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCurBtmFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysCurBtmFileName.setDescription('The bootrom file currently used by the specified entity.') h3c_sys_cur_update_btm_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 2, 1, 1, 5), octet_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCurUpdateBtmFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysCurUpdateBtmFileName.setDescription(' The default value of this object is the same as the value of h3cSysCurBtmFileName. The value will be changed after updating the bootrom successfully. This bootrom will take effect on next startup. ') h3c_sys_reload = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3)) h3c_sys_reload_schedule = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysReloadSchedule.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadSchedule.setDescription(' The object points one row in h3cSysReloadScheduleTable. Its value is equal to the value of h3cSysReloadScheduleIndex. When a reload action is finished, the value of it would be zero which means no any reload schedule is selected. ') h3c_sys_reload_action = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('reloadUnavailable', 1), ('reloadOnSchedule', 2), ('reloadAtOnce', 3), ('reloadCancel', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysReloadAction.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadAction.setDescription(" Writing reloadOnSchedule(2) to this object performs the reload operation on schedule. If h3cSysReloadScheduleTime is not set, the value of h3cSysReloadAction can't be set to 'reloadOnSchedule(2)'. Writing reloadAtOnce(3)to this object performs the reload operation at once, regardless of the h3cSysReloadScheduleTime. When reloadCancel(4)is set, the scheduled reload action will be cancelled and the value of h3cSysReloadAction will be 'reloadUnavailable(1)',the value of h3cSysReloadSchedule will be 0, h3cSysReloadTag will be given a value of zero length, but the content of h3cSysReloadScheduleTable will remain. The h3cSysReloadSchedule and h3cSysReloadTag determine the reload entity(ies) in mutually exclusive way. And the h3cSysReloadSchedule will be handled at first. If the value of h3cSysReloadSchedule is invalid, then the h3cSysReloadTag will be handled. If the value of h3cSysReloadSchedule is valid, the value of h3cSysReloadTag is ignored and a reload action will be implemented to the entity specified by h3cSysReloadEntity in the entry pointed by h3cSysReloadSchedule. If h3cSysReloadSchedule is valid, but the entry h3cSysReloadSchedule pointing to is not active, the reload action will be ignored , and an inconsistent value will be returned. If multiple entities are required to be reloaded at the same time, the value of h3cSysReloadTag must be specified to select the reload parameters in the h3cSysReloadSceduelTable, and h3cSysReloadSchedule must have the value of '0'. If the whole fabric is to be reloaded in an XRN device, all the units in the fabric must have at least one entry in the h3cSysReloadSceduelTable with the same tag in h3cSysReloadSceduelTagList. When a reload action is done, or there is no reload action, the value should be reloadUnavailable(1). ") h3c_sys_reload_schedule_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3)) if mibBuilder.loadTexts: h3cSysReloadScheduleTable.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleTable.setDescription(' A reload parameters set table. The table is exclusively used for reloading. When reloading action finished, the value of the table may be empty or still exist. If the mainboard in non-XRN device or all the units of the fabric in XRN device are reloaded,then the table will be refreshed. ') h3c_sys_reload_schedule_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1)).setIndexNames((0, 'H3C-SYS-MAN-MIB', 'h3cSysReloadScheduleIndex')) if mibBuilder.loadTexts: h3cSysReloadScheduleEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleEntry.setDescription('Entry of h3cSysReloadScheduleTable.') h3c_sys_reload_schedule_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: h3cSysReloadScheduleIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleIndex.setDescription('The index of h3cSysReloadScheduleTable. There are two parts for this index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++++++++ + physical index + random index + ( bit 16..31 ) ( bit 0..15 ) +++++++++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes), if the row is automatic created, the value is zero, and if the row is created by users, then the value is determined by the users. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). For XRN devices, physical index is the value of a chassis entPhysicalIndex. 0 for non-XRN device which has only one main board, the board number for non-XRN device which have multiple main boards.') h3c_sys_reload_entity = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadEntity.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadEntity.setDescription(' The value of h3cSysReloadEntity indicates an entry in entPhysicalTable, which is the physical entity to be reloaded. If ENTITY-MIB is not supported,the value for this object is the unit ID for XRN devices , 0 for non-XRN device which has only one mainboard, the board number for non-XRN device which have several mainboards. Each entity has only one row in h3cSysReloadScheduleTable. ') h3c_sys_reload_cfg_file = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadCfgFile.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadCfgFile.setDescription(' The value indicates an entry in h3cSysCFGFileTable. It defines a configuration file for reload action. It is the value of corresponding h3cSysCFGFileIndex in h3cSysCFGFileTable. The zero value means no configuration file has been set for this entry, and no configuration file is used during system reloading. ') h3c_sys_reload_image = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadImage.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadImage.setDescription(' The value indicates an entry in h3cSysImageTable. It defines an image file for reload action. It is the value of corresponding h3cSysImageIndex in h3cSysImageTable. If dual image is supported, the main image attribute can be set through this object or by h3cSysImageType of h3cSysImageTable of the entity. It is strongly suggested to set this attribute by the latter. If main image attribute is set here, the h3cSysImageType in h3cSysImageTable of the corresponding entity will be updated, and vice versa. Before reboot, the device will check the validation of the entry. If the file does not exist, the device will not reboot and a trap will be send to NMS. ') h3c_sys_reload_reason = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadReason.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadReason.setDescription(" The reason of system's reloading. It is a zero length octet string when not set. ") h3c_sys_reload_schedule_time = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 6), date_and_time().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadScheduleTime.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleTime.setDescription(' Specify the local time at which the reload action will occur. we will only take octet strings with length 8 for this object which indicates the local time of the switch. The maximum scheduled interval between the specified time and the current system clock time is 24 days . field octets contents range ----- ------ -------- ----- 1 1-2 year 0..65536 2 3 month 1..12 3 4 day 1..31 4 5 hour 0..23 5 6 minutes 0..59 6 7 seconds 0..60 For example, Tuesday May 26, 1992 at 1:30:15 PM would be displayed as: 1992-5-26,13:30:15 If the set value is less than the value of h3cSysLocalClock or beyond the maximum scheduled time limit, a bad value error occurred. The value of all-zero octet strings indicates system reload at once if the reload action is reloadOnSchedule(2). ') h3c_sys_reload_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 7), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadRowStatus.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadRowStatus.setDescription(' If one of the value of h3cSysReloadEntity,h3cSysReloadImage is invalid, the value of h3cSysReloadRowStatus can not be set to the value of ACTIVE. A valid entry means the specified element is available in current system. ') h3c_sys_reload_schedule_tag_list = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 3, 1, 8), snmp_tag_list()).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysReloadScheduleTagList.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadScheduleTagList.setDescription(' It specifies a tag list for the entry. ') h3c_sys_reload_tag = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 3, 4), snmp_tag_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysReloadTag.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadTag.setDescription("This object contains a single tag value which is used to select entries in the h3cSysReloadScheduleTable. In the h3cSysReloadScheduleTable,any entry that contains a tag value which is equal to the value of this object is selected. For example, the value of h3cSysReloadTag is 'TOM',and the h3cSysReloadScheduleTagList of each h3cSysReloadScheduleTable entry are as follows: 1)'TOM,ROBERT,MARY' 2)'TOM,DAVE' 3)'DAVE,MARY' Since there are 'TOM' in 1) and 2),so 1) and 2) are selected. If this object contains a value of zero length, no entries are selected. ") h3c_sys_image = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4)) h3c_sys_image_num = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysImageNum.setStatus('current') if mibBuilder.loadTexts: h3cSysImageNum.setDescription(' The number of system images. It indicates the total entries of h3cSysImageTable. ') h3c_sys_image_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2)) if mibBuilder.loadTexts: h3cSysImageTable.setStatus('current') if mibBuilder.loadTexts: h3cSysImageTable.setDescription("The system image management table. When 'copy srcfile destfile' is executed via the CLI, if destfile is not existed, then h3cSysImageType of the new file will be 'none'; otherwise h3cSysImageType keeps its current value. When 'move srcfile destfile' is executed via the CLI, h3cSysImageType and h3cSysImageIndex remain the same while h3cSysImageLocation changes. When 'rename srcfile' is executed via the CLI,h3cSysImageType and h3cSysImageIndex remain the same while h3cSysImageName changes. When 'delete srcfile' is executed via the CLI, the file is deleted from h3cSysImageTable while index of the file keeps and will not be allocated. ") h3c_sys_image_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1)).setIndexNames((0, 'H3C-SYS-MAN-MIB', 'h3cSysImageIndex')) if mibBuilder.loadTexts: h3cSysImageEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysImageEntry.setDescription(' An entity image entry. Each entry consists of information of an entity image. The h3cSysImageIndex exclusively defines an image file. ') h3c_sys_image_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: h3cSysImageIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysImageIndex.setDescription("There are two parts for the index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++ + physical index + image index + +++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes) is the image index;Image file Index is a monotonically increasing integer for the sole purpose of indexing events. When it reaches the maximum value,an extremely unlikely event, the agent wraps the value back to 1 and may flush existing entries. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). If ENTITY-MIB is not supported,the value for this object is the unit ID for XRN devices ,0 for non-XRN device which has only one main board,the board number for non-XRN device which have several main boards. Any index beyond the above range will not be supported. If a file is added in, its h3cSysImageIndex will be the maximum image index plus one. If the image file is removed, renamed, or moved from one place to another, its h3cSysImageIndex is not reallocated. If the image file's content is replaced, its h3cSysImageIndex will not change. ") h3c_sys_image_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysImageName.setStatus('current') if mibBuilder.loadTexts: h3cSysImageName.setDescription('The file name of the image. It MUST NOT contain the path of the file.') h3c_sys_image_size = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysImageSize.setStatus('current') if mibBuilder.loadTexts: h3cSysImageSize.setDescription(' Size of the file in bytes. ') h3c_sys_image_location = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysImageLocation.setStatus('current') if mibBuilder.loadTexts: h3cSysImageLocation.setDescription(' The directory path of the image. Its form should be the same as what defined in file system. Currently it is defined as follows: For mainboard: flash:/ For slave mainboard and subboards: slotN#flash:/ For XRN devices: unitN>slotN#flash:/ ') h3c_sys_image_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 4, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('main', 1), ('backup', 2), ('none', 3), ('secure', 4), ('main-backup', 5), ('main-secure', 6), ('backup-secure', 7), ('main-backup-secure', 8)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: h3cSysImageType.setStatus('current') if mibBuilder.loadTexts: h3cSysImageType.setDescription(" It indicates the reloading sequence attribute of the image. For devices which support dual image: If the value is 'main(1)',the image will be the first image in the next reloading procedure. If the value is 'backup(2)', the image will be used if the main image fails. If the value is 'secure(4)', the image will be used if the main image and backup image both fail. If the value is 'none(3)',the image will not be used in the next reloading procedure. At the same time,you also can specify the main image by h3cSysReloadImage in h3cSysReloadScheduleTable. If the image is different from previous main image, the previous main image will not be main image again. And the image table will update with this variation. Vice versa, if you have defined the reload schedule, and then you define a new main image through h3cSysImageType when you are waiting the reload schedule to be executed, the real main image will be the latest one. It is strongly suggested to define the main image here, not by h3cSysReloadImage in h3cSysReloadScheduleTable. There are some rules for setting the value of h3cSysImageType: a)When a new image file is defined as 'main' or 'backup' file,the h3cSysImageType of old 'main' or 'backup' file will automatically be 'none'. b)It is forbidden to set 'none' attribute manually. c)It is forbidden to set 'secure' attribute manually. d)If 'main' image is set to 'backup', the file keeps 'main'. And vice versa. At this time, the file has 'main-backup' property. e)If the secure image is set to 'main' or 'backup', the file has 'main-secure' or 'backup-secure'property. f)If the secure image is set to 'main' and 'backup', the file has the 'main-backup-secure' property. g)If the none image is set to 'main' or 'backup', the file has the 'main' or 'backup' property. The following table describes whether it is ok to set to another state directly from original state. +--------------+-----------+-------------+-------------+ | set to | set to | set to | set to | | | | | | original | 'main' | 'backup' | 'none' | 'secure' | state | | | | | --------------+--------------+-----------+-------------+-------------+ | | | | | main | --- | yes | no | no | | | | | | | | | | | --------------+--------------+-----------+-------------|-------------+ | | | | | backup | yes | --- | no | no | | | | | | --------------+--------------+-----------+-------------|-------------+ | | | | | | | | | | none | yes | yes | --- | no | | | | | | --------------+--------------+-----------+-------------+-------------+ | | | | | secure | yes | yes | no | --- | | | | | | | | | | | --------------+--------------+-----------+-------------+-------------+ If there is one main image in the system, one row of H3cSysReloadScheduleEntry whose h3cSysReloadImage is equal to the main image's h3cSysImageIndex will be created automatically. But if any row is deleted, it will not be created automatically in h3cSysReloadScheduleTable. For the device which doesn't support dual image(main/backup): Only 'main' and 'none' is supported and it only can be set from none to main. When a new image file is defined as 'main' file,the h3cSysImageType of old 'main' file will automatically be 'none'. ") h3c_sys_cfg_file = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5)) h3c_sys_cfg_file_num = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCFGFileNum.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileNum.setDescription(' The number of the configuration files in the system. It indicates the total entries of h3cSysCFGFileTable. ') h3c_sys_cfg_file_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2)) if mibBuilder.loadTexts: h3cSysCFGFileTable.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileTable.setDescription("A table of configuration files in this system. At present, the system doesn't support dual configure file, it should act as 'dual image' if dual configure file is supported. ") h3c_sys_cfg_file_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1)).setIndexNames((0, 'H3C-SYS-MAN-MIB', 'h3cSysCFGFileIndex')) if mibBuilder.loadTexts: h3cSysCFGFileEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileEntry.setDescription(' A configuration file entry. Each entry consists of information of a configuration file. h3cSysCFGFileIndex exclusively decides a configuration file. ') h3c_sys_cfg_file_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))) if mibBuilder.loadTexts: h3cSysCFGFileIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileIndex.setDescription('There are two parts for the index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++ + physical index + cfgFile index + +++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes) is the configuration file index; the configuration file index is a monotonically increasing integer for the sole purpose of indexing events. When it reaches the maximum value, an extremely unlikely event, the agent wraps the value back to 1 and may flush existing entries. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). If ENTITY-MIB is not supported, the value for this object is the unit ID for XRN devices ,0 for non-XRN device which has only one slot,the board number for non-XRN device which have several slots. Any index beyond the above range will not be supported. ') h3c_sys_cfg_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCFGFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileName.setDescription(' Configuration file name. The name should not include the colon (:) character as it is a special separator character used to delineate the device name, partition name and the file name. ') h3c_sys_cfg_file_size = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCFGFileSize.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileSize.setDescription(' Size of the file in bytes. Note that it does not include the size of the filesystem file header. File size will always be non-zero. ') h3c_sys_cfg_file_location = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 5, 2, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysCFGFileLocation.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileLocation.setDescription(' The directory path of the image. Its form should be the same as what defined in filesystem. Currently it is defined as follows: For mainboard: flash:/ For slave mainboard and subboards: slotN#flash:/ For XRN devices: unitN>slotN#flash:/ ') h3c_sys_btm_file = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6)) h3c_sys_btm_file_load = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 1)) h3c_sys_btm_load_max_number = mib_scalar((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysBtmLoadMaxNumber.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadMaxNumber.setDescription(' This object shows the maximum number of h3cSysBtmLoadEntry in each device/unit. ') h3c_sys_btm_load_table = mib_table((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2)) if mibBuilder.loadTexts: h3cSysBtmLoadTable.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadTable.setDescription(' This table is used to update the bootrom and show the results of the update operation. The bootrom files are listed at the h3cFlhFileTable. These files are used to update bootrom. ') h3c_sys_btm_load_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1)).setIndexNames((0, 'H3C-SYS-MAN-MIB', 'h3cSysBtmLoadIndex')) if mibBuilder.loadTexts: h3cSysBtmLoadEntry.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadEntry.setDescription(' Entries in the h3cSysBtmLoadTable are created and deleted using the h3cSysBtmRowStatus object. When a new row is being created and the number of entries is h3cSysBtmLoadMaxNumber, the row with minimal value of h3cSysBtmLoadTime and the value of h3cSysBtmFileType is none(2), should be destroyed automatically. ') h3c_sys_btm_load_index = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: h3cSysBtmLoadIndex.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadIndex.setDescription(' The index of h3cSysBtmLoadTable. There are two parts for this index depicted as follows: 31 15 0 +++++++++++++++++++++++++++++++++++++++++ + physical index + random index + ( bit 16..31 ) ( bit 0..15 ) +++++++++++++++++++++++++++++++++++++++++ From bit0 to bit15 (two bytes), if the row is created by command line, the value is determined by system, and if the row is created by SNMP, the value is determined by users. From bit16 to bit31 (two bytes) is the physical index the same as the entPhysicalIndex specified in ENTITY-MIB(RFC2737). If ENTITY-MIB is not supported, the value of this object is the unit ID for XRN devices, 0 for non-XRN device which has only one main board, the board number for non-XRN device which has multiple main boards. ') h3c_sys_btm_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysBtmFileName.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmFileName.setDescription(' The bootrom file name is determined by the users. The file must exist in corresponding entity. The validity of the bootrom file will be identified by system. If the file is invalid, the bootrom should fail to be updated, and the value of h3cSysBtmErrorStatus should be failed(4). ') h3c_sys_btm_file_type = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('main', 1), ('none', 2)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysBtmFileType.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmFileType.setDescription(' main(1) - The effective bootrom file. none(2) - The noneffective file. When bootrom is being updated, this object must be set to main(1). When bootrom is updated successfully, this object should be main(1), and the former object with the same physical index should be none(2). When bootrom failed to be updated, this object should be none(2). ') h3c_sys_btm_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 4), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: h3cSysBtmRowStatus.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmRowStatus.setDescription(' Only support active(1), createAndGo(4), destroy(6). When a row is created successfully, the value of this object should be active(1), the value of h3cSysBtmFileName and h3cSysBtmFileType can not be modified by users. When bootrom is being updated, the value of h3cSysBtmErrorStatus is inProgress(2). When bootrom failed to be updated, the value of h3cSysBtmErrorStatus should be failed(4). When bootrom is updated successfully, the value of h3cSysBtmErrorStatus should be success(3). The value of h3cSysCurUpdateBtmFileName should change to the new bootrom file name. When another row is created successfully with the same physical index, and the update is successful, then the value of former h3cSysBtmFileType should be none(2) automatically. If a row is destroyed, h3cSysCurUpdateBtmFileName should not change. If a device/unit reboots, h3cSysBtmLoadTable should be empty. ') h3c_sys_btm_error_status = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('invalidFile', 1), ('inProgress', 2), ('success', 3), ('failed', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysBtmErrorStatus.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmErrorStatus.setDescription(' This object shows the status of the specified operation after creating a row. invalidFile(1) - file is invalid. inProgress(2) - the operation is in progress. success(3) - the operation was done successfully. failed(4) - the operation failed. ') h3c_sys_btm_load_time = mib_table_column((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 1, 6, 2, 1, 6), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: h3cSysBtmLoadTime.setStatus('current') if mibBuilder.loadTexts: h3cSysBtmLoadTime.setDescription(' This object indicates operation time. ') h3c_system_man_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2)) h3c_sys_clock_changed_notification = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2, 1)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysLocalClock')) if mibBuilder.loadTexts: h3cSysClockChangedNotification.setStatus('current') if mibBuilder.loadTexts: h3cSysClockChangedNotification.setDescription(' A clock changed notification is generated when the current local date and time for the system has been manually changed. The value of h3cSysLocalClock reflects new date and time. ') h3c_sys_reload_notification = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2, 2)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysReloadImage'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadCfgFile'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadReason'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadScheduleTime'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadAction')) if mibBuilder.loadTexts: h3cSysReloadNotification.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadNotification.setDescription(' A h3cSysReloadNotification will be sent before the corresponding entity is rebooted. It will also be sent if the entity fails to reboot because the clock has changed. ') h3c_sys_start_up_notification = notification_type((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 2, 3)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysImageType')) if mibBuilder.loadTexts: h3cSysStartUpNotification.setStatus('current') if mibBuilder.loadTexts: h3cSysStartUpNotification.setDescription(" a h3cSysStartUpNotification trap will be sent when the system starts up with 'main' image file failed, a trap will be sent to indicate which type the current image file (I.e backup or secure)is. ") h3c_system_man_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3)) h3c_system_man_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 1)) h3c_system_man_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 1, 1)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysClockGroup'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadGroup'), ('H3C-SYS-MAN-MIB', 'h3cSysImageGroup'), ('H3C-SYS-MAN-MIB', 'h3cSysCFGFileGroup'), ('H3C-SYS-MAN-MIB', 'h3cSystemManNotificationGroup'), ('H3C-SYS-MAN-MIB', 'h3cSysCurGroup'), ('H3C-SYS-MAN-MIB', 'h3cSystemBtmLoadGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_system_man_mib_compliance = h3cSystemManMIBCompliance.setStatus('current') if mibBuilder.loadTexts: h3cSystemManMIBCompliance.setDescription(' The compliance statement for entities which implement the Huawei 3Com system management MIB. ') h3c_system_man_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2)) h3c_sys_clock_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 1)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysLocalClock'), ('H3C-SYS-MAN-MIB', 'h3cSysSummerTimeEnable'), ('H3C-SYS-MAN-MIB', 'h3cSysSummerTimeZone'), ('H3C-SYS-MAN-MIB', 'h3cSysSummerTimeMethod'), ('H3C-SYS-MAN-MIB', 'h3cSysSummerTimeStart'), ('H3C-SYS-MAN-MIB', 'h3cSysSummerTimeEnd'), ('H3C-SYS-MAN-MIB', 'h3cSysSummerTimeOffset')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_sys_clock_group = h3cSysClockGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysClockGroup.setDescription('A collection of objects providing mandatory system clock information.') h3c_sys_reload_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 2)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysReloadSchedule'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadAction'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadImage'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadCfgFile'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadReason'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadScheduleTagList'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadTag'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadScheduleTime'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadEntity'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_sys_reload_group = h3cSysReloadGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysReloadGroup.setDescription('A collection of objects providing mandatory system reload.') h3c_sys_image_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 3)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysImageNum'), ('H3C-SYS-MAN-MIB', 'h3cSysImageName'), ('H3C-SYS-MAN-MIB', 'h3cSysImageSize'), ('H3C-SYS-MAN-MIB', 'h3cSysImageLocation'), ('H3C-SYS-MAN-MIB', 'h3cSysImageType')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_sys_image_group = h3cSysImageGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysImageGroup.setDescription('A collection of objects providing mandatory system image information.') h3c_sys_cfg_file_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 4)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysCFGFileNum'), ('H3C-SYS-MAN-MIB', 'h3cSysCFGFileName'), ('H3C-SYS-MAN-MIB', 'h3cSysCFGFileSize'), ('H3C-SYS-MAN-MIB', 'h3cSysCFGFileLocation')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_sys_cfg_file_group = h3cSysCFGFileGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysCFGFileGroup.setDescription(' A collection of objects providing mandatory system configuration file information. ') h3c_sys_cur_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 5)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysCurCFGFileIndex'), ('H3C-SYS-MAN-MIB', 'h3cSysCurImageIndex')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_sys_cur_group = h3cSysCurGroup.setStatus('current') if mibBuilder.loadTexts: h3cSysCurGroup.setDescription('A collection of system current status.') h3c_system_man_notification_group = notification_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 6)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysClockChangedNotification'), ('H3C-SYS-MAN-MIB', 'h3cSysReloadNotification'), ('H3C-SYS-MAN-MIB', 'h3cSysStartUpNotification')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_system_man_notification_group = h3cSystemManNotificationGroup.setStatus('current') if mibBuilder.loadTexts: h3cSystemManNotificationGroup.setDescription('A collection of notifications.') h3c_system_btm_load_group = object_group((1, 3, 6, 1, 4, 1, 2011, 10, 2, 3, 3, 2, 7)).setObjects(('H3C-SYS-MAN-MIB', 'h3cSysCurBtmFileName'), ('H3C-SYS-MAN-MIB', 'h3cSysCurUpdateBtmFileName'), ('H3C-SYS-MAN-MIB', 'h3cSysBtmLoadMaxNumber'), ('H3C-SYS-MAN-MIB', 'h3cSysBtmFileName'), ('H3C-SYS-MAN-MIB', 'h3cSysBtmFileType'), ('H3C-SYS-MAN-MIB', 'h3cSysBtmRowStatus'), ('H3C-SYS-MAN-MIB', 'h3cSysBtmErrorStatus'), ('H3C-SYS-MAN-MIB', 'h3cSysBtmLoadTime')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): h3c_system_btm_load_group = h3cSystemBtmLoadGroup.setStatus('current') if mibBuilder.loadTexts: h3cSystemBtmLoadGroup.setDescription('A collection of objects providing system update bootrom information.') mibBuilder.exportSymbols('H3C-SYS-MAN-MIB', h3cSysCurrent=h3cSysCurrent, h3cSysImageName=h3cSysImageName, h3cSysBtmLoadIndex=h3cSysBtmLoadIndex, h3cSysReload=h3cSysReload, h3cSysSummerTimeOffset=h3cSysSummerTimeOffset, h3cSysClockChangedNotification=h3cSysClockChangedNotification, h3cSysSummerTimeZone=h3cSysSummerTimeZone, h3cSysCFGFileNum=h3cSysCFGFileNum, h3cSystemManMIBNotifications=h3cSystemManMIBNotifications, h3cSysClock=h3cSysClock, h3cSysImageSize=h3cSysImageSize, h3cSysCurCFGFileIndex=h3cSysCurCFGFileIndex, h3cSysReloadSchedule=h3cSysReloadSchedule, h3cSysReloadNotification=h3cSysReloadNotification, h3cSystemManMIBCompliances=h3cSystemManMIBCompliances, h3cSysReloadTag=h3cSysReloadTag, h3cSysCFGFile=h3cSysCFGFile, h3cSystemManMIBGroups=h3cSystemManMIBGroups, h3cSysBtmErrorStatus=h3cSysBtmErrorStatus, h3cSysImageEntry=h3cSysImageEntry, h3cSysBtmFileType=h3cSysBtmFileType, h3cSysCFGFileLocation=h3cSysCFGFileLocation, h3cSysReloadScheduleTime=h3cSysReloadScheduleTime, h3cSysImageGroup=h3cSysImageGroup, h3cSysCFGFileEntry=h3cSysCFGFileEntry, h3cSysCurImageIndex=h3cSysCurImageIndex, h3cSysReloadImage=h3cSysReloadImage, h3cSysBtmFile=h3cSysBtmFile, h3cSysReloadScheduleTable=h3cSysReloadScheduleTable, h3cSysClockGroup=h3cSysClockGroup, h3cSysReloadReason=h3cSysReloadReason, h3cSysBtmLoadEntry=h3cSysBtmLoadEntry, PYSNMP_MODULE_ID=h3cSystemMan, h3cSysBtmLoadTime=h3cSysBtmLoadTime, h3cSysReloadGroup=h3cSysReloadGroup, h3cSysReloadEntity=h3cSysReloadEntity, h3cSystemManMIBConformance=h3cSystemManMIBConformance, h3cSysSummerTimeEnd=h3cSysSummerTimeEnd, h3cSysCurGroup=h3cSysCurGroup, h3cSystemManMIBObjects=h3cSystemManMIBObjects, h3cSysCurEntPhysicalIndex=h3cSysCurEntPhysicalIndex, h3cSysReloadRowStatus=h3cSysReloadRowStatus, h3cSysCFGFileTable=h3cSysCFGFileTable, h3cSysImage=h3cSysImage, h3cSysSummerTimeEnable=h3cSysSummerTimeEnable, h3cSysSummerTimeMethod=h3cSysSummerTimeMethod, h3cSysImageLocation=h3cSysImageLocation, h3cSysBtmFileLoad=h3cSysBtmFileLoad, h3cSysCFGFileName=h3cSysCFGFileName, h3cSysBtmLoadTable=h3cSysBtmLoadTable, h3cSystemManNotificationGroup=h3cSystemManNotificationGroup, h3cSysCFGFileSize=h3cSysCFGFileSize, h3cSysCurEntry=h3cSysCurEntry, h3cSystemManMIBCompliance=h3cSystemManMIBCompliance, h3cSysReloadCfgFile=h3cSysReloadCfgFile, h3cSysCFGFileGroup=h3cSysCFGFileGroup, h3cSystemMan=h3cSystemMan, h3cSysImageType=h3cSysImageType, h3cSysReloadScheduleTagList=h3cSysReloadScheduleTagList, h3cSysBtmFileName=h3cSysBtmFileName, h3cSysCurBtmFileName=h3cSysCurBtmFileName, h3cSysImageIndex=h3cSysImageIndex, h3cSysSummerTimeStart=h3cSysSummerTimeStart, h3cSysCurUpdateBtmFileName=h3cSysCurUpdateBtmFileName, h3cSysReloadScheduleIndex=h3cSysReloadScheduleIndex, h3cSysImageTable=h3cSysImageTable, h3cSysImageNum=h3cSysImageNum, h3cSystemBtmLoadGroup=h3cSystemBtmLoadGroup, h3cSysCurTable=h3cSysCurTable, h3cSysReloadAction=h3cSysReloadAction, h3cSysBtmRowStatus=h3cSysBtmRowStatus, h3cSysBtmLoadMaxNumber=h3cSysBtmLoadMaxNumber, h3cSysCFGFileIndex=h3cSysCFGFileIndex, h3cSysSummerTime=h3cSysSummerTime, h3cSysStartUpNotification=h3cSysStartUpNotification, h3cSysReloadScheduleEntry=h3cSysReloadScheduleEntry, h3cSysLocalClock=h3cSysLocalClock)
class Solution: def superEggDrop(self, K: int, N: int) -> int: # @functools.lru_cache(None) # def dfs(k,n): # if k==1:return n # if n==1:return 1 # return dfs(k,n-1)+dfs(k-1,n-1)+1 # for i in range(1,N+1): # if dfs(K,i)>=N:return i dp = [[0]*(N+1) for _ in range(K+1)] for i in range(1,K+1): for j in range(1,N+1): dp[i][j] = dp[i][j-1]+dp[i-1][j-1]+1 if dp[K][j]>=N: return j
class Solution: def super_egg_drop(self, K: int, N: int) -> int: dp = [[0] * (N + 1) for _ in range(K + 1)] for i in range(1, K + 1): for j in range(1, N + 1): dp[i][j] = dp[i][j - 1] + dp[i - 1][j - 1] + 1 if dp[K][j] >= N: return j
__all__ = [ 'doc_matching_rules', ] doc_matching_rules = ''' Ship transforms will commonly use a group of matching rules to determine which ships get modified, and by how much. * Matching rules: - These are tuples pairing a matching rule (string) with transform defined args, eg. ("key value", arg0, arg1, ...). - The "key" specifies the xml field to look up, which will be checked for a match with "value". - If a target object matches multiple rules, the first match is used. - Supported keys for ships: - 'name' : Internal name of the ship macro; supports wildcards. - 'purpose' : The primary role of the ship. List of purposes: - mine - trade - build - fight - 'type' : The ship type. List of types: - courier, resupplier, transporter, freighter, miner, largeminer, builder - scout, interceptor, fighter, heavyfighter - gunboat, corvette, frigate, scavenger - destroyer, carrier, battleship - xsdrone, smalldrone, police, personalvehicle, escapepod, lasertower - 'class' : The class of ship. List of classes: - 'ship_xs' - 'ship_s' - 'ship_m' - 'ship_l' - 'ship_xl' - 'spacesuit' - '*' : Matches all ships; takes no value term. Examples: <code> Adjust_Ship_Speed(1.5) Adjust_Ship_Speed( ('name ship_xen_xl_carrier_01_a*', 1.2), ('class ship_s' , 2.0), ('type corvette' , 1.5), ('purpose fight' , 1.2), ('*' , 1.1) ) </code> '''
__all__ = ['doc_matching_rules'] doc_matching_rules = '\n Ship transforms will commonly use a group of matching rules\n to determine which ships get modified, and by how much. \n\n * Matching rules:\n - These are tuples pairing a matching rule (string) with transform\n defined args, eg. ("key value", arg0, arg1, ...).\n - The "key" specifies the xml field to look up, which will\n be checked for a match with "value".\n - If a target object matches multiple rules, the first match is used.\n - Supported keys for ships:\n - \'name\' : Internal name of the ship macro; supports wildcards.\n - \'purpose\' : The primary role of the ship. List of purposes:\n - mine\n - trade\n - build\n - fight\n - \'type\' : The ship type. List of types:\n - courier, resupplier, transporter, freighter, miner,\n largeminer, builder\n - scout, interceptor, fighter, heavyfighter\n - gunboat, corvette, frigate, scavenger\n - destroyer, carrier, battleship\n - xsdrone, smalldrone, police, personalvehicle,\n escapepod, lasertower\n - \'class\' : The class of ship. List of classes:\n - \'ship_xs\'\n - \'ship_s\'\n - \'ship_m\'\n - \'ship_l\'\n - \'ship_xl\'\n - \'spacesuit\'\n - \'*\' : Matches all ships; takes no value term.\n\n Examples:\n <code>\n Adjust_Ship_Speed(1.5)\n Adjust_Ship_Speed(\n (\'name ship_xen_xl_carrier_01_a*\', 1.2),\n (\'class ship_s\' , 2.0),\n (\'type corvette\' , 1.5),\n (\'purpose fight\' , 1.2),\n (\'*\' , 1.1) )\n </code>\n '
fixtures = [ {"name": "+5 Dexterity Vest", "sell_in": 10, "quality": 20, "category": "normal"}, {"name": "Aged Brie", "sell_in": 2, "quality": 0, "category": "aged_brie"}, {"name": "Elixir of the Mongoose", "sell_in": 5, "quality": 7, "category": "normal"}, {"name": "Sulfuras, Hand of Ragnaros", "sell_in": 0, "quality": 80, "category": "legendary"}, {"name": "Sulfuras, Hand of Ragnaros", "sell_in": - 1, "quality": 80, "category": "legendary"}, {"name": "Backstage passes to a TAFKAL80ETC concert", "sell_in": 15, "quality": 20, "category": "backstage_passes"}, {"name": "Backstage passes to a TAFKAL80ETC concert", "sell_in": 10, "quality": 49, "category": "backstage_passes"}, {"name": "Backstage passes to a TAFKAL80ETC concert", "sell_in": 5, "quality": 49, "category": "backstage_passes"}, {"name": "Conjured Mana Cake", "sell_in": 3, "quality": 6, "category": "conjured"} ]
fixtures = [{'name': '+5 Dexterity Vest', 'sell_in': 10, 'quality': 20, 'category': 'normal'}, {'name': 'Aged Brie', 'sell_in': 2, 'quality': 0, 'category': 'aged_brie'}, {'name': 'Elixir of the Mongoose', 'sell_in': 5, 'quality': 7, 'category': 'normal'}, {'name': 'Sulfuras, Hand of Ragnaros', 'sell_in': 0, 'quality': 80, 'category': 'legendary'}, {'name': 'Sulfuras, Hand of Ragnaros', 'sell_in': -1, 'quality': 80, 'category': 'legendary'}, {'name': 'Backstage passes to a TAFKAL80ETC concert', 'sell_in': 15, 'quality': 20, 'category': 'backstage_passes'}, {'name': 'Backstage passes to a TAFKAL80ETC concert', 'sell_in': 10, 'quality': 49, 'category': 'backstage_passes'}, {'name': 'Backstage passes to a TAFKAL80ETC concert', 'sell_in': 5, 'quality': 49, 'category': 'backstage_passes'}, {'name': 'Conjured Mana Cake', 'sell_in': 3, 'quality': 6, 'category': 'conjured'}]
def strategy(history, memory): if history.shape[1] % 2 == 0: # even, cooperate in odd return 1, None else: return 0, None
def strategy(history, memory): if history.shape[1] % 2 == 0: return (1, None) else: return (0, None)
n = int(input()) cnt = 0 l = [int(i) for i in input().split()] for i in range(1,n): if l[i] < l[i-1]: cnt = cnt + (l[i-1] - l[i]) l[i] = l[i-1] print(cnt)
n = int(input()) cnt = 0 l = [int(i) for i in input().split()] for i in range(1, n): if l[i] < l[i - 1]: cnt = cnt + (l[i - 1] - l[i]) l[i] = l[i - 1] print(cnt)
class class0: var0 = '' def __init__(self): var1 = 0 def fun1(): return var0 def fun2(): print('useless print') return var1
class Class0: var0 = '' def __init__(self): var1 = 0 def fun1(): return var0 def fun2(): print('useless print') return var1
def handshake(code): pass def secret_code(actions): pass
def handshake(code): pass def secret_code(actions): pass
def generate_functions(function_name): return "def {}(chat_id, message):\n\ bot = Bot(token=TELEGRAM_TOKEN)\ bot.sendMessage(chat_id=chat_id, text=message)\n\n".format(function_name) def generate_callback(function_name): return "def {}(ch, method, properties, body):\n\tpass\n\n".format(function_name) def generate_subscriber(): return "def subscribe_topic(channel, topic):\n\ channel.queue_declare(queue=topic)\n\ channel.basic_consume(queue=topic,\ auto_ack=True, on_message_callback=callback)\n\n" def insert_string(string, string_to_insert, tag): pos = string.find(tag) return string[:pos] + string_to_insert + string[pos:] + "\n"
def generate_functions(function_name): return 'def {}(chat_id, message):\n bot = Bot(token=TELEGRAM_TOKEN) bot.sendMessage(chat_id=chat_id, text=message)\n\n'.format(function_name) def generate_callback(function_name): return 'def {}(ch, method, properties, body):\n\tpass\n\n'.format(function_name) def generate_subscriber(): return 'def subscribe_topic(channel, topic):\n channel.queue_declare(queue=topic)\n channel.basic_consume(queue=topic, auto_ack=True, on_message_callback=callback)\n\n' def insert_string(string, string_to_insert, tag): pos = string.find(tag) return string[:pos] + string_to_insert + string[pos:] + '\n'
CHARACTERS = { 0: 'Ryu', 1: 'Dictator', 2: 'Chun Li', 3: 'Ken', 4: 'Karin', 5: 'Zangief', 6: 'Dhalsim', 7: 'Nash', 8: 'Claw', 10: 'Birdie', 11: 'R. Mika', 12: 'Rashid', 13: 'Fang', 14: 'Laura', 15: 'Necalli', 16: 'Cammy', 21: 'Alex', 17: 'Guile', } CHARACTER_ORDER = [ 12, 11, 2, 0, 14, 5, 4, 7, 3, 16, 8, 15, 1, 10, 6, 13, 21, 17, ] CHARACTER_IMG = { 0: 'http://s10.postimg.org/q9hh72qa1/movelist_ryu.jpg', 1: 'http://s10.postimg.org/y9r6hthu1/movelist_mbison.jpg', 2: 'http://s10.postimg.org/5l9n0uqa1/movelist_chunli.jpg', 3: 'http://s10.postimg.org/jzhm6c1hl/movelist_ken.jpg', 4: 'http://s10.postimg.org/6dcb01uh5/movelist_karin.jpg', 5: 'http://s10.postimg.org/h494d7mvd/movelist_zangief.jpg', 6: 'http://s10.postimg.org/nf9qfvyq1/movelist_dhalsim.jpg', 7: 'http://s10.postimg.org/562ylktqh/movelist_nash.jpg', 8: 'http://s10.postimg.org/m1moybouh/movelist_vega.jpg', 10: 'http://s10.postimg.org/r1fjsj53d/movelist_birdie.jpg', 11: 'http://s10.postimg.org/ynsihf1xl/movelist_r_mika.jpg', 12: 'http://s10.postimg.org/48wjcpi89/movelist_rashid.jpg', 13: 'http://s10.postimg.org/639dug58p/movelist_fang.jpg', 14: 'http://s10.postimg.org/ag7xcvdzd/movelist_laura.jpg', 15: 'http://s10.postimg.org/jt3x38scp/movelist_necalli.jpg', 16: 'http://s10.postimg.org/jg7xjbkp5/movelist_cammy.jpg', 21: 'http://s32.postimg.org/e1vx7mwb9/alex.jpg', 17: 'http://s32.postimg.org/cggnftm39/guile.jpg', } WIN_TYPES = { 1: 'Normal Move', 3: 'Critical Art', 4: 'Ex Move', 5: 'Chip Damage', 6: 'Perfect', 7: 'Timeout', } MATCH_TYPES = { 0: 'Ranked', 1: 'Casual', 2: 'Battle Lounge', }
characters = {0: 'Ryu', 1: 'Dictator', 2: 'Chun Li', 3: 'Ken', 4: 'Karin', 5: 'Zangief', 6: 'Dhalsim', 7: 'Nash', 8: 'Claw', 10: 'Birdie', 11: 'R. Mika', 12: 'Rashid', 13: 'Fang', 14: 'Laura', 15: 'Necalli', 16: 'Cammy', 21: 'Alex', 17: 'Guile'} character_order = [12, 11, 2, 0, 14, 5, 4, 7, 3, 16, 8, 15, 1, 10, 6, 13, 21, 17] character_img = {0: 'http://s10.postimg.org/q9hh72qa1/movelist_ryu.jpg', 1: 'http://s10.postimg.org/y9r6hthu1/movelist_mbison.jpg', 2: 'http://s10.postimg.org/5l9n0uqa1/movelist_chunli.jpg', 3: 'http://s10.postimg.org/jzhm6c1hl/movelist_ken.jpg', 4: 'http://s10.postimg.org/6dcb01uh5/movelist_karin.jpg', 5: 'http://s10.postimg.org/h494d7mvd/movelist_zangief.jpg', 6: 'http://s10.postimg.org/nf9qfvyq1/movelist_dhalsim.jpg', 7: 'http://s10.postimg.org/562ylktqh/movelist_nash.jpg', 8: 'http://s10.postimg.org/m1moybouh/movelist_vega.jpg', 10: 'http://s10.postimg.org/r1fjsj53d/movelist_birdie.jpg', 11: 'http://s10.postimg.org/ynsihf1xl/movelist_r_mika.jpg', 12: 'http://s10.postimg.org/48wjcpi89/movelist_rashid.jpg', 13: 'http://s10.postimg.org/639dug58p/movelist_fang.jpg', 14: 'http://s10.postimg.org/ag7xcvdzd/movelist_laura.jpg', 15: 'http://s10.postimg.org/jt3x38scp/movelist_necalli.jpg', 16: 'http://s10.postimg.org/jg7xjbkp5/movelist_cammy.jpg', 21: 'http://s32.postimg.org/e1vx7mwb9/alex.jpg', 17: 'http://s32.postimg.org/cggnftm39/guile.jpg'} win_types = {1: 'Normal Move', 3: 'Critical Art', 4: 'Ex Move', 5: 'Chip Damage', 6: 'Perfect', 7: 'Timeout'} match_types = {0: 'Ranked', 1: 'Casual', 2: 'Battle Lounge'}
def _print_option_help( op, names, detailed_help, prefix, help_justification ): help = '' if detailed_help: for name in names[:-1]: help += prefix + name + ':\n' name = names[-1] tmp = prefix + name + ':' help += tmp help += ' ' * (len( help_justification ) - len(tmp)) h = op.shared_data['help'] if detailed_help: help += h.replace('\n', '\n' + help_justification ) if help[-1] != '\n': help += '\n' val_help = help_justification + 'Type: ' help += val_help val_just = ' ' * len(val_help) val_help = op.AllowedValuesHelp() val_help = val_help.replace('\n', '\n' + val_just ) help += val_help + '\n' else: line_end = h.find('\n') if line_end == -1: help += h else: help += h[:line_end] help += '\n' return help #//---------------------------------------------------------------------------// def GenerateOptionsHelp( options, detailed_help ): prefix = " " help = "\nOptions to control builds.\n" \ "The values can be overridden via a command line.\n" \ "Like this: scons optimization=speed debug_info=1 cc_name=gcc\n" \ "Or within your build scripts or config files.\n" help += '=' * max( map(len, help.split('\n')) ) + '\n' sorted_options = [] max_name_len = 0 for op, names in options.__dict__['__ids_dict'].itervalues(): if op.shared_data['help'] is None: continue names = list(names) names.sort( lambda a,b: cmp( len(a), len(b)) or cmp( a, b ) ) max_name_len = max( [ max_name_len, len( names[-1] ) ] ) sorted_options.append( (op, names) ) help_justification = ' ' * (max_name_len + len(prefix) + 1 + 2) def _cmp_options( op_names1, op_names2 ): op1,names1 = op_names1 op2,names2 = op_names2 g1 = op1.shared_data['group'] g2 = op2.shared_data['group'] if g1 == 'User' and g2 != 'User': return 1 if g1 != 'User' and g2 == 'User': return -1 result = cmp( g1, g2 ) if result == 0: result = cmp( names1[-1].lower(), names2[-1].lower() ) return result sorted_options.sort( _cmp_options ) group = '' for n in sorted_options: op = n[0] names = n[1] g = op.shared_data['group'] if g != group: group = g if help[-1] != '\n': help += '\n' help += '\n*** ' + group + ' options ***:\n\n' else: if help[-1] != '\n': help += '\n' op_help = _print_option_help( op, names, detailed_help, prefix, help_justification ) if op_help.count('\n') > 1: if not help.endswith( '\n\n' ): help += '\n' help += op_help + '\n' else: help += op_help help += '\n' return help
def _print_option_help(op, names, detailed_help, prefix, help_justification): help = '' if detailed_help: for name in names[:-1]: help += prefix + name + ':\n' name = names[-1] tmp = prefix + name + ':' help += tmp help += ' ' * (len(help_justification) - len(tmp)) h = op.shared_data['help'] if detailed_help: help += h.replace('\n', '\n' + help_justification) if help[-1] != '\n': help += '\n' val_help = help_justification + 'Type: ' help += val_help val_just = ' ' * len(val_help) val_help = op.AllowedValuesHelp() val_help = val_help.replace('\n', '\n' + val_just) help += val_help + '\n' else: line_end = h.find('\n') if line_end == -1: help += h else: help += h[:line_end] help += '\n' return help def generate_options_help(options, detailed_help): prefix = ' ' help = '\nOptions to control builds.\nThe values can be overridden via a command line.\nLike this: scons optimization=speed debug_info=1 cc_name=gcc\nOr within your build scripts or config files.\n' help += '=' * max(map(len, help.split('\n'))) + '\n' sorted_options = [] max_name_len = 0 for (op, names) in options.__dict__['__ids_dict'].itervalues(): if op.shared_data['help'] is None: continue names = list(names) names.sort(lambda a, b: cmp(len(a), len(b)) or cmp(a, b)) max_name_len = max([max_name_len, len(names[-1])]) sorted_options.append((op, names)) help_justification = ' ' * (max_name_len + len(prefix) + 1 + 2) def _cmp_options(op_names1, op_names2): (op1, names1) = op_names1 (op2, names2) = op_names2 g1 = op1.shared_data['group'] g2 = op2.shared_data['group'] if g1 == 'User' and g2 != 'User': return 1 if g1 != 'User' and g2 == 'User': return -1 result = cmp(g1, g2) if result == 0: result = cmp(names1[-1].lower(), names2[-1].lower()) return result sorted_options.sort(_cmp_options) group = '' for n in sorted_options: op = n[0] names = n[1] g = op.shared_data['group'] if g != group: group = g if help[-1] != '\n': help += '\n' help += '\n*** ' + group + ' options ***:\n\n' elif help[-1] != '\n': help += '\n' op_help = _print_option_help(op, names, detailed_help, prefix, help_justification) if op_help.count('\n') > 1: if not help.endswith('\n\n'): help += '\n' help += op_help + '\n' else: help += op_help help += '\n' return help
class Solution: def divisorGame(self, N: int) -> bool: return not N%2 N = 2 res = Solution().divisorGame(N) print(res)
class Solution: def divisor_game(self, N: int) -> bool: return not N % 2 n = 2 res = solution().divisorGame(N) print(res)
def insertionsort(ar,m): i=m-1 temp=ar[i] while(ar[i-1]>temp and i>0): ar[i]=ar[i-1] print(' '.join(map(str,ar))) i-=1 ar[i]=temp print(' '.join(map(str,ar))) return ar m = int(input()) ar = [int(i) for i in input().split()] ar=insertionsort(ar,m)
def insertionsort(ar, m): i = m - 1 temp = ar[i] while ar[i - 1] > temp and i > 0: ar[i] = ar[i - 1] print(' '.join(map(str, ar))) i -= 1 ar[i] = temp print(' '.join(map(str, ar))) return ar m = int(input()) ar = [int(i) for i in input().split()] ar = insertionsort(ar, m)
# 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. def check_sequence_consistency(unit_test, ordered_sequence, equal=False): for i, el in enumerate(ordered_sequence): for previous in ordered_sequence[:i]: _check_order_consistency(unit_test, previous, el, equal) for posterior in ordered_sequence[i + 1:]: _check_order_consistency(unit_test, el, posterior, equal) def _check_order_consistency(unit_test, smaller, bigger, equal=False): unit_test.assertLessEqual(smaller, bigger) unit_test.assertGreaterEqual(bigger, smaller) if equal: unit_test.assertEqual(smaller, bigger) else: unit_test.assertNotEqual(smaller, bigger) unit_test.assertLess(smaller, bigger) unit_test.assertGreater(bigger, smaller)
def check_sequence_consistency(unit_test, ordered_sequence, equal=False): for (i, el) in enumerate(ordered_sequence): for previous in ordered_sequence[:i]: _check_order_consistency(unit_test, previous, el, equal) for posterior in ordered_sequence[i + 1:]: _check_order_consistency(unit_test, el, posterior, equal) def _check_order_consistency(unit_test, smaller, bigger, equal=False): unit_test.assertLessEqual(smaller, bigger) unit_test.assertGreaterEqual(bigger, smaller) if equal: unit_test.assertEqual(smaller, bigger) else: unit_test.assertNotEqual(smaller, bigger) unit_test.assertLess(smaller, bigger) unit_test.assertGreater(bigger, smaller)
def add(a=1, b=2): return a+b def sub(a=5, b=2): return a-b
def add(a=1, b=2): return a + b def sub(a=5, b=2): return a - b
def pagify(text, delims=["\n"], *, escape_mass_mentions=True, shorten_by=8, page_length=2000): in_text = text if escape_mass_mentions: num_mentions = text.count("@here") + text.count("@everyone") shorten_by += num_mentions page_length -= shorten_by while len(in_text) > page_length: closest_delim = max([in_text.rfind(d, 0, page_length) for d in delims]) closest_delim = closest_delim if closest_delim != -1 else page_length if escape_mass_mentions: to_send = escape(in_text[:closest_delim], mass_mentions=True) else: to_send = in_text[:closest_delim] yield to_send in_text = in_text[closest_delim:] if escape_mass_mentions: yield escape(in_text, mass_mentions=True) else: yield in_text def escape(text, *, mass_mentions=False, formatting=False): if mass_mentions: text = text.replace("@everyone", "@\u200beveryone") text = text.replace("@here", "@\u200bhere") if formatting: text = ( text.replace("`", "\\`") .replace("*", "\\*") .replace("_", "\\_") .replace("~", "\\~") )
def pagify(text, delims=['\n'], *, escape_mass_mentions=True, shorten_by=8, page_length=2000): in_text = text if escape_mass_mentions: num_mentions = text.count('@here') + text.count('@everyone') shorten_by += num_mentions page_length -= shorten_by while len(in_text) > page_length: closest_delim = max([in_text.rfind(d, 0, page_length) for d in delims]) closest_delim = closest_delim if closest_delim != -1 else page_length if escape_mass_mentions: to_send = escape(in_text[:closest_delim], mass_mentions=True) else: to_send = in_text[:closest_delim] yield to_send in_text = in_text[closest_delim:] if escape_mass_mentions: yield escape(in_text, mass_mentions=True) else: yield in_text def escape(text, *, mass_mentions=False, formatting=False): if mass_mentions: text = text.replace('@everyone', '@\u200beveryone') text = text.replace('@here', '@\u200bhere') if formatting: text = text.replace('`', '\\`').replace('*', '\\*').replace('_', '\\_').replace('~', '\\~')
''' Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note that you cannot sell a stock before you buy one. The points of interest are the peaks and valleys in the given graph. We need to find the largest peak following the smallest valley. We can maintain two variables - minprice and maxprofit corresponding to the smallest valley and maximum profit (maximum difference between selling price and minprice) obtained so far respectively. ''' class Solution1: # brute force def maxProfit(self, prices: List[int]) -> int: profit = 0 for i in range(len(prices)): for j in range(i + 1, len(prices)): current = prices[j] - prices[i] if current > profit: profit = current return profit class Solution2: # As you pass through the prices # update the smallest price encountered # as you encounter a new price, check if # the profit made given the smallest encounted price # so far and the current encountered price # has a larger profit than the current known maximum profit # if so, this is the current known maximum profit def maxProfit(self, prices: List[int]) -> int: if len(prices) == 0: return 0 minprice = prices[0] maxprofit = 0 for i in range(1, len(prices)): if prices[i] < minprice: minprice = prices[i] elif prices[i] - minprice > maxprofit: maxprofit = prices[i] - minprice return maxprofit
""" Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note that you cannot sell a stock before you buy one. The points of interest are the peaks and valleys in the given graph. We need to find the largest peak following the smallest valley. We can maintain two variables - minprice and maxprofit corresponding to the smallest valley and maximum profit (maximum difference between selling price and minprice) obtained so far respectively. """ class Solution1: def max_profit(self, prices: List[int]) -> int: profit = 0 for i in range(len(prices)): for j in range(i + 1, len(prices)): current = prices[j] - prices[i] if current > profit: profit = current return profit class Solution2: def max_profit(self, prices: List[int]) -> int: if len(prices) == 0: return 0 minprice = prices[0] maxprofit = 0 for i in range(1, len(prices)): if prices[i] < minprice: minprice = prices[i] elif prices[i] - minprice > maxprofit: maxprofit = prices[i] - minprice return maxprofit
class BaseProduct(object): params: dict = {} def __init__(self): pass def get_cashflows(self, *args, **kwargs): return None def pv(self, *args, **kwargs): return 0
class Baseproduct(object): params: dict = {} def __init__(self): pass def get_cashflows(self, *args, **kwargs): return None def pv(self, *args, **kwargs): return 0
def sieve(total): totallist = range(1,total+1) ret = [] if len(totallist) == 1: return ret for num in totallist[1:]: if num in [2,3,5,7,11,13]: ret.append(num) else: insert = True for prime in ret: if num % prime == 0: insert = False break if insert: ret.append(num) return ret
def sieve(total): totallist = range(1, total + 1) ret = [] if len(totallist) == 1: return ret for num in totallist[1:]: if num in [2, 3, 5, 7, 11, 13]: ret.append(num) else: insert = True for prime in ret: if num % prime == 0: insert = False break if insert: ret.append(num) return ret
''' Pack consecutive duplicates of list elements into sublists. If a list contains repeated elements they should be placed in separate sublists. Example: * (pack '(a a a a b c c a a d e e e e)) ((A A A A) (B) (C C) (A A) (D) (E E E E)) ''' #taking input of list elements at a single time seperating by space and splitting each by split() method demo_list = input('enter elements seperated by space: ').split(' ') new_list = list() #creating new list as new_list previous_item = demo_list[0] #assigning first element of demo_list to previous_item temp_list = list() #creating new list as temp_list for current_item in demo_list: #iterating through all elements of demo_list if current_item == previous_item: #checking if previously added element is same as current element of list, for checking repetative elements temp_list.append(current_item) #appending current element to temp_list. for creation of sublist else: #if not repetative element new_list.append(temp_list[:]) #appending previously created sublist(temp_list) copy to new_list temp_list.clear() #clearing temp_list to create new sublist temp_list.append(current_item) #appending current_item to temp_list previous_item = current_item #assigning current_item to previous_item else: new_list.append(temp_list[:]) #appending temp_list copy to new_list #printing new_list and demo_list print(f"old list: {demo_list}") print(f"newly created list: {new_list}")
""" Pack consecutive duplicates of list elements into sublists. If a list contains repeated elements they should be placed in separate sublists. Example: * (pack '(a a a a b c c a a d e e e e)) ((A A A A) (B) (C C) (A A) (D) (E E E E)) """ demo_list = input('enter elements seperated by space: ').split(' ') new_list = list() previous_item = demo_list[0] temp_list = list() for current_item in demo_list: if current_item == previous_item: temp_list.append(current_item) else: new_list.append(temp_list[:]) temp_list.clear() temp_list.append(current_item) previous_item = current_item else: new_list.append(temp_list[:]) print(f'old list: {demo_list}') print(f'newly created list: {new_list}')
class SnowyWinter: def snowyHighwayLength(self, startPoints, endPoints): road = [False] * 10001 for s, e in zip(startPoints, endPoints): for i in xrange(s, e): road[i] = True return len([e for e in road if e])
class Snowywinter: def snowy_highway_length(self, startPoints, endPoints): road = [False] * 10001 for (s, e) in zip(startPoints, endPoints): for i in xrange(s, e): road[i] = True return len([e for e in road if e])
############################################################################### # Metadata ''' LC_PATROL_MTD_START { "description" : "Collection of all core LimaCharlie detections.", "author" : "maximelb@google.com", "version" : "1.0" } LC_PATROL_MTD_END ''' ############################################################################### ####################################### # stateless/WinSuspExecLoc # This actor looks for execution from # various known suspicious locations. ####################################### Patrol( 'WinSuspExecLoc', initialInstances = 1, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 1000, actorArgs = ( 'stateless/WinSuspExecLoc', [ 'analytics/stateless/windows/notification.NEW_PROCESS/suspexecloc/1.0', 'analytics/stateless/windows/notification.CODE_IDENTITY/suspexecloc/1.0' ] ), actorKwArgs = { 'parameters' : {}, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 5 } ) ####################################### # stateless/MacSuspExecLoc # This actor looks for execution from # various known suspicious locations. ####################################### Patrol( 'MacSuspExecLoc', initialInstances = 1, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 1000, actorArgs = ( 'stateless/MacSuspExecLoc', [ 'analytics/stateless/osx/notification.NEW_PROCESS/suspexecloc/1.0', 'analytics/stateless/osx/notification.CODE_IDENTITY/suspexecloc/1.0' ] ), actorKwArgs = { 'parameters' : {}, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 5 } ) ####################################### # stateful/WinDocumentExploit # This actor looks for various stateful # patterns indicating documents being # exploited. ####################################### Patrol( 'WinDocumentExploit', initialInstances = 2, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 500, actorArgs = ( 'stateful/WinDocumentExploit', 'analytics/stateful/modules/windows/documentexploit/1.0' ), actorKwArgs = { 'parameters' : {}, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 5 } ) ####################################### # stateful/WinReconTools # This actor looks for burst in usage # of common recon tools used early # during exploitation. ####################################### Patrol( 'WinReconTools', initialInstances = 2, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 500, actorArgs = ( 'stateful/WinReconTools', 'analytics/stateful/modules/windows/recontools/1.0' ), actorKwArgs = { 'parameters' : {}, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 5 } ) ####################################### # stateful/MacReconTools # This actor looks for burst in usage # of common recon tools used early # during exploitation. ####################################### Patrol( 'MacReconTools', initialInstances = 2, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 500, actorArgs = ( 'stateful/MacReconTools', 'analytics/stateful/modules/osx/recontools/1.0' ), actorKwArgs = { 'parameters' : {}, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 5 } ) ####################################### # stateless/NewObjects # This actor looks for new objects of # specifically interesting types. ####################################### #Patrol( 'NewObjects', # initialInstances = 1, # maxInstances = None, # relaunchOnFailure = True, # onFailureCall = None, # scalingFactor = 1000, # actorArgs = ( 'stateless/NewObjects', # 'analytics/stateless/all/newobjects/1.0' ), # actorKwArgs = { # 'parameters' : { 'types' : [ 'SERVICE_NAME', 'AUTORUNS' ], # 'db' : SCALE_DB, # 'rate_limit_per_sec' : 10, # 'max_concurrent' : 5, # 'block_on_queue_size' : 200000 }, # 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', # 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], # 'n_concurrent' : 5, # 'isIsolated' : True } ) ####################################### # stateless/VirusTotalKnownBad # This actor checks all hashes against # VirusTotal and reports hashes that # have more than a threshold of AV # reports, while caching results. # Parameters: # min_av: minimum number of AV reporting # a result on the hash before it is # reported as a detection. ####################################### Patrol( 'VirusTotalKnownBad', initialInstances = 1, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 2000, actorArgs = ( 'stateless/VirusTotalKnownBad', [ 'analytics/stateless/common/notification.CODE_IDENTITY/virustotalknownbad/1.0', 'analytics/stateless/common/notification.OS_SERVICES_REP/virustotalknownbad/1.0', 'analytics/stateless/common/notification.OS_DRIVERS_REP/virustotalknownbad/1.0', 'analytics/stateless/common/notification.OS_AUTORUNS_REP/virustotalknownbad/1.0' ] ), actorKwArgs = { 'parameters' : { 'qpm' : 1 }, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 2 } ) ####################################### # stateless/WinSuspExecName # This actor looks for execution from # executables with suspicious names that # try to hide the fact the files are # executables. ####################################### Patrol( 'WinSuspExecName', initialInstances = 1, maxInstances = None, relaunchOnFailure = True, onFailureCall = None, scalingFactor = 1000, actorArgs = ( 'stateless/WinSuspExecName', [ 'analytics/stateless/windows/notification.NEW_PROCESS/suspexecname/1.0', 'analytics/stateless/windows/notification.CODE_IDENTITY/suspexecname/1.0' ] ), actorKwArgs = { 'parameters' : {}, 'secretIdent' : 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents' : [ 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5' ], 'n_concurrent' : 5 } )
""" LC_PATROL_MTD_START { "description" : "Collection of all core LimaCharlie detections.", "author" : "maximelb@google.com", "version" : "1.0" } LC_PATROL_MTD_END """ patrol('WinSuspExecLoc', initialInstances=1, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=1000, actorArgs=('stateless/WinSuspExecLoc', ['analytics/stateless/windows/notification.NEW_PROCESS/suspexecloc/1.0', 'analytics/stateless/windows/notification.CODE_IDENTITY/suspexecloc/1.0']), actorKwArgs={'parameters': {}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 5}) patrol('MacSuspExecLoc', initialInstances=1, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=1000, actorArgs=('stateless/MacSuspExecLoc', ['analytics/stateless/osx/notification.NEW_PROCESS/suspexecloc/1.0', 'analytics/stateless/osx/notification.CODE_IDENTITY/suspexecloc/1.0']), actorKwArgs={'parameters': {}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 5}) patrol('WinDocumentExploit', initialInstances=2, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=500, actorArgs=('stateful/WinDocumentExploit', 'analytics/stateful/modules/windows/documentexploit/1.0'), actorKwArgs={'parameters': {}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 5}) patrol('WinReconTools', initialInstances=2, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=500, actorArgs=('stateful/WinReconTools', 'analytics/stateful/modules/windows/recontools/1.0'), actorKwArgs={'parameters': {}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 5}) patrol('MacReconTools', initialInstances=2, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=500, actorArgs=('stateful/MacReconTools', 'analytics/stateful/modules/osx/recontools/1.0'), actorKwArgs={'parameters': {}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 5}) patrol('VirusTotalKnownBad', initialInstances=1, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=2000, actorArgs=('stateless/VirusTotalKnownBad', ['analytics/stateless/common/notification.CODE_IDENTITY/virustotalknownbad/1.0', 'analytics/stateless/common/notification.OS_SERVICES_REP/virustotalknownbad/1.0', 'analytics/stateless/common/notification.OS_DRIVERS_REP/virustotalknownbad/1.0', 'analytics/stateless/common/notification.OS_AUTORUNS_REP/virustotalknownbad/1.0']), actorKwArgs={'parameters': {'qpm': 1}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 2}) patrol('WinSuspExecName', initialInstances=1, maxInstances=None, relaunchOnFailure=True, onFailureCall=None, scalingFactor=1000, actorArgs=('stateless/WinSuspExecName', ['analytics/stateless/windows/notification.NEW_PROCESS/suspexecname/1.0', 'analytics/stateless/windows/notification.CODE_IDENTITY/suspexecname/1.0']), actorKwArgs={'parameters': {}, 'secretIdent': 'analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5', 'trustedIdents': ['analysis/038528f5-5135-4ca8-b79f-d6b8ffc53bf5'], 'n_concurrent': 5})
def getNameToDataDict(peopleData): nameToData = {} for ppl in peopleData: nameToData[ppl['name']] = ppl return nameToData def getUniversalAverageMetersPerDay(workoutsData, numberOfPeople, DateManager): chronologicalData = DateManager.getWorkoutsDataChronologically(workoutsData) ergMetersPerDay = {} for workout in chronologicalData: workoutDate = DateManager.fetchDateFromTimestampString(workout['time']) if (workoutDate not in ergMetersPerDay.keys()): ergMetersPerDay[workoutDate] = 0 ergMetersPerDay[workoutDate] += int(workout['scored_meters']) for key in ergMetersPerDay.keys(): ergMetersPerDay[key] = int(ergMetersPerDay[key] / int(numberOfPeople)) return ergMetersPerDay def getMetersPerDayByPerson(workoutsData, nameToData, DateManager): chronologicalData = DateManager.getWorkoutsDataChronologically(workoutsData) byPersonMetersPerDay = {} for name, person in nameToData.items(): byPersonMetersPerDay[name] = {} for workout in chronologicalData: name = workout['name'] workoutDate = DateManager.fetchDateFromTimestampString(workout['time']) if (workoutDate not in byPersonMetersPerDay[name].keys()): byPersonMetersPerDay[name][workoutDate] = 0 byPersonMetersPerDay[name][workoutDate] += int(workout['scored_meters']) return byPersonMetersPerDay def getMetersPerDayByBoating(workoutsData, nameToData, DateManager, boat): chronologicalData = DateManager.getWorkoutsDataChronologically(workoutsData) output = {} boatingMembers = [] for workout in chronologicalData: name = workout['name'] boating = nameToData[name]['boating'] workoutDate = DateManager.fetchDateFromTimestampString(workout['time']) if (workoutDate not in output.keys()): output[workoutDate] = 0 if (boating == boat): if (name not in boatingMembers): boatingMembers.append(name) output[workoutDate] += int(workout['scored_meters']) for key in output.keys(): output[key] = int(output[key] / len(boatingMembers)) return output def individualContributions(workoutsData, peopleData, DateManager): nameToData = getNameToDataDict(peopleData) output = {} output['universalAvg_metersPerDay'] = getUniversalAverageMetersPerDay(workoutsData, len(nameToData.keys()), DateManager) output['1v_metersPerDayPerPerson'] = getMetersPerDayByBoating(workoutsData, nameToData, DateManager, '1v') output['2v_metersPerDayPerPerson'] = getMetersPerDayByBoating(workoutsData, nameToData, DateManager, '2v') output['3v_metersPerDayPerPerson'] = getMetersPerDayByBoating(workoutsData, nameToData, DateManager, '3v') output['4v+_metersPerDayPerPerson'] = getMetersPerDayByBoating(workoutsData, nameToData, DateManager, '4v+') output['byPerson_metersPerDay'] = getMetersPerDayByPerson(workoutsData, nameToData, DateManager) return output def run(workoutsData, peopleData, DateManager): return individualContributions(workoutsData, peopleData, DateManager)
def get_name_to_data_dict(peopleData): name_to_data = {} for ppl in peopleData: nameToData[ppl['name']] = ppl return nameToData def get_universal_average_meters_per_day(workoutsData, numberOfPeople, DateManager): chronological_data = DateManager.getWorkoutsDataChronologically(workoutsData) erg_meters_per_day = {} for workout in chronologicalData: workout_date = DateManager.fetchDateFromTimestampString(workout['time']) if workoutDate not in ergMetersPerDay.keys(): ergMetersPerDay[workoutDate] = 0 ergMetersPerDay[workoutDate] += int(workout['scored_meters']) for key in ergMetersPerDay.keys(): ergMetersPerDay[key] = int(ergMetersPerDay[key] / int(numberOfPeople)) return ergMetersPerDay def get_meters_per_day_by_person(workoutsData, nameToData, DateManager): chronological_data = DateManager.getWorkoutsDataChronologically(workoutsData) by_person_meters_per_day = {} for (name, person) in nameToData.items(): byPersonMetersPerDay[name] = {} for workout in chronologicalData: name = workout['name'] workout_date = DateManager.fetchDateFromTimestampString(workout['time']) if workoutDate not in byPersonMetersPerDay[name].keys(): byPersonMetersPerDay[name][workoutDate] = 0 byPersonMetersPerDay[name][workoutDate] += int(workout['scored_meters']) return byPersonMetersPerDay def get_meters_per_day_by_boating(workoutsData, nameToData, DateManager, boat): chronological_data = DateManager.getWorkoutsDataChronologically(workoutsData) output = {} boating_members = [] for workout in chronologicalData: name = workout['name'] boating = nameToData[name]['boating'] workout_date = DateManager.fetchDateFromTimestampString(workout['time']) if workoutDate not in output.keys(): output[workoutDate] = 0 if boating == boat: if name not in boatingMembers: boatingMembers.append(name) output[workoutDate] += int(workout['scored_meters']) for key in output.keys(): output[key] = int(output[key] / len(boatingMembers)) return output def individual_contributions(workoutsData, peopleData, DateManager): name_to_data = get_name_to_data_dict(peopleData) output = {} output['universalAvg_metersPerDay'] = get_universal_average_meters_per_day(workoutsData, len(nameToData.keys()), DateManager) output['1v_metersPerDayPerPerson'] = get_meters_per_day_by_boating(workoutsData, nameToData, DateManager, '1v') output['2v_metersPerDayPerPerson'] = get_meters_per_day_by_boating(workoutsData, nameToData, DateManager, '2v') output['3v_metersPerDayPerPerson'] = get_meters_per_day_by_boating(workoutsData, nameToData, DateManager, '3v') output['4v+_metersPerDayPerPerson'] = get_meters_per_day_by_boating(workoutsData, nameToData, DateManager, '4v+') output['byPerson_metersPerDay'] = get_meters_per_day_by_person(workoutsData, nameToData, DateManager) return output def run(workoutsData, peopleData, DateManager): return individual_contributions(workoutsData, peopleData, DateManager)
# s -> singular # m -> multiple # b -> begin of a compound noun (like "serialized" in "serialized thread") # e -> end of a compound noun (like "thread" in "serialized thread") # a -> alone (never part of a compound noun like "garbage collector") # r -> regular (add s at the end to make it multiple) # i -> irregular (needs a lists of conjugations) noun_list = [ ["sar", "git"], ["sar", "github"], ["sar", "gitlab"], ["sar", "gitea"], ["sar", "bitbucket"], ["smer", "branch"], ["smer", "commit"], ["smber", "log"], ["smar", "pull request"], ["smar", "merge request"], ["smber", "stash"], ["sber", "status"], ["smber", "tag"], ["smber", "origin"], ["smber", "master"], ["smber", "lemur"], ["sber", "spacehuhn"], ["smber", "laser"], ["smber", "signal"], ["smber", "network"], ["smber", "analyzer"], ["smber", "application"], ["smber", "firewall"], ["smber", "cybernuke"], ["sber", "IRC"], ["smber", "mainframe"], ["smber", "server"], ["smber", "cloud"], ["smbr", "reality"], ["smer", "request"], ["sber", "WiFi"], ["sber", "Bluetooth"], ["smber", "cable"], ["sber", "ethernet"], ["sber", "LAN"], ["sber", "WAN"], ["smber", "antenna"], ["sber", "NAS"], ["smar", "power supply"], ["smber", "grid"], ["smber", "display"], ["smber", "monitor"], ["smber", "microcontroller"], ["smber", "controller"], ["ser", "SoC"], ["sbr", "SBC"], ["sbr", "ATX"], ["sbr", "ITX"], ["sbr", "USB"], ["ser", "HDD"], ["ser", "SSD"], ["smber", "keyboard"], ["smer", "transition"], ["smber", "tree"], ["ser", "SD"], ["ser", "LED"], ["ser", "IDE"], ["smer", "editor"], ["smer", "frame"], ["ser", "PoC"], ["smber", "bucket"], ["sber", "VM"], ["smer", "identifier"], ["sber", "middleware"], ["sber", "bottleneck"], ["ser", "UI"], ["ser", "GUI"], ["smber", "observer"], ["smber", "singleton"], ["smber", "array"], ["smber", "transmitter"], ["smber", "DVD"], ["ber", "logic"], ["smber", "emulation"], ["smer", "reader"], ["smer", "writer"], ["smer", "label"], ["smber", "clock"], ["smber", "MCU"], ["smber", "phone"], ["smber", "space"], ["sber", "data"], ["sber", "analysis"], ["smber", "sample"], ["sber", "intelligence"], ["smber", "sensor"], ["smber", "camera"], ["smber", "battery"], ["smber", "process"], ["smber", "website"], ["smber", "homepage"], ["smber", "app"], ["smber", "error"], ["smber", "warning"], ["smber", "sequence"], ["smber", "information"], ["sbr", "ASCII"], ["smber", "pattern"], ["smber", "simulation"], ["smber", "simulator"], ["sber", "indicator"], ["smber", "troll"], ["smber", "regulator"], ["smber", "container"], ["smber", "breadboard"], ["sber", "IC"], ["smber", "controller"], ["smber", "drone"], ["smber", "deauther"], ["smar", "if loop"], ["sar", "GTFO"], ["sber", "fax"], ["smar", "garbage collector"], ["smer", "collector"], ["smber", "thread"], ["smber", "model"], ["smber", "switch"], ["smber", "dimension"], ["sber", "foo"], ["sber", "bar"], ["smber", "key"], ["smber", "java"], ["smber", "coffee"], ["sbr", "null"], ["sbr", "NaN"], ["sbr", "undefined"], ["smber", "integer"], ["smber", "double"], ["smber", "string"], ["sar", "bare metal"], ["smber", "adapter"], ["smber", "framework"], ["smber", "system"], ["smber", "algorithm"], ["sbr", "spacetime"], ["smbr", "LCD"], ["sber", "bandwidth"], ["smber", "virus"], ["sbr", "UTF-8"], ["sber", "web"], ["sbr", "handler"], ["smber", "exeption"], ["smber", "path"], ["smber", "reference"], ["smber", "template"], ["smber", "wildcard"], ["smber", "interface"], ["sber", "syntax"], ["smber", "loop"], ["smber", "demon"], ["smber", "core"], ["sber", "interpreter"], ["smber", "string"], ["smber", "document"], ["smber", "cookie"], ["smber", "codec"], ["smber", "e-mail"], ["sber", "OS"], ["smber", "service"], ["sber", "provider"], ["smber", "cache"], ["smber", "database"], ["smber", "object"], ["smbers", "dictionary"], ["sber", "driver"], ["smber", "index"], ["sber", "encoder"], ["smber", "list"], ["smber", "tuple"], ["smber", "range"], ["smber", "stream"], ["sber", "internet"], ["smber", "component"], ["smber", "module"], ["smber", "library"], ["smber", "limit"], ["smber", "function"], ["smer", "token"], ["smber", "code"], ["smber", "wave"], ["sber", "IoT"], ["smber", "blockchain"], ["smber", "repository"], ["smber", "northbridge"], ["smber", "southbridge"] ]
noun_list = [['sar', 'git'], ['sar', 'github'], ['sar', 'gitlab'], ['sar', 'gitea'], ['sar', 'bitbucket'], ['smer', 'branch'], ['smer', 'commit'], ['smber', 'log'], ['smar', 'pull request'], ['smar', 'merge request'], ['smber', 'stash'], ['sber', 'status'], ['smber', 'tag'], ['smber', 'origin'], ['smber', 'master'], ['smber', 'lemur'], ['sber', 'spacehuhn'], ['smber', 'laser'], ['smber', 'signal'], ['smber', 'network'], ['smber', 'analyzer'], ['smber', 'application'], ['smber', 'firewall'], ['smber', 'cybernuke'], ['sber', 'IRC'], ['smber', 'mainframe'], ['smber', 'server'], ['smber', 'cloud'], ['smbr', 'reality'], ['smer', 'request'], ['sber', 'WiFi'], ['sber', 'Bluetooth'], ['smber', 'cable'], ['sber', 'ethernet'], ['sber', 'LAN'], ['sber', 'WAN'], ['smber', 'antenna'], ['sber', 'NAS'], ['smar', 'power supply'], ['smber', 'grid'], ['smber', 'display'], ['smber', 'monitor'], ['smber', 'microcontroller'], ['smber', 'controller'], ['ser', 'SoC'], ['sbr', 'SBC'], ['sbr', 'ATX'], ['sbr', 'ITX'], ['sbr', 'USB'], ['ser', 'HDD'], ['ser', 'SSD'], ['smber', 'keyboard'], ['smer', 'transition'], ['smber', 'tree'], ['ser', 'SD'], ['ser', 'LED'], ['ser', 'IDE'], ['smer', 'editor'], ['smer', 'frame'], ['ser', 'PoC'], ['smber', 'bucket'], ['sber', 'VM'], ['smer', 'identifier'], ['sber', 'middleware'], ['sber', 'bottleneck'], ['ser', 'UI'], ['ser', 'GUI'], ['smber', 'observer'], ['smber', 'singleton'], ['smber', 'array'], ['smber', 'transmitter'], ['smber', 'DVD'], ['ber', 'logic'], ['smber', 'emulation'], ['smer', 'reader'], ['smer', 'writer'], ['smer', 'label'], ['smber', 'clock'], ['smber', 'MCU'], ['smber', 'phone'], ['smber', 'space'], ['sber', 'data'], ['sber', 'analysis'], ['smber', 'sample'], ['sber', 'intelligence'], ['smber', 'sensor'], ['smber', 'camera'], ['smber', 'battery'], ['smber', 'process'], ['smber', 'website'], ['smber', 'homepage'], ['smber', 'app'], ['smber', 'error'], ['smber', 'warning'], ['smber', 'sequence'], ['smber', 'information'], ['sbr', 'ASCII'], ['smber', 'pattern'], ['smber', 'simulation'], ['smber', 'simulator'], ['sber', 'indicator'], ['smber', 'troll'], ['smber', 'regulator'], ['smber', 'container'], ['smber', 'breadboard'], ['sber', 'IC'], ['smber', 'controller'], ['smber', 'drone'], ['smber', 'deauther'], ['smar', 'if loop'], ['sar', 'GTFO'], ['sber', 'fax'], ['smar', 'garbage collector'], ['smer', 'collector'], ['smber', 'thread'], ['smber', 'model'], ['smber', 'switch'], ['smber', 'dimension'], ['sber', 'foo'], ['sber', 'bar'], ['smber', 'key'], ['smber', 'java'], ['smber', 'coffee'], ['sbr', 'null'], ['sbr', 'NaN'], ['sbr', 'undefined'], ['smber', 'integer'], ['smber', 'double'], ['smber', 'string'], ['sar', 'bare metal'], ['smber', 'adapter'], ['smber', 'framework'], ['smber', 'system'], ['smber', 'algorithm'], ['sbr', 'spacetime'], ['smbr', 'LCD'], ['sber', 'bandwidth'], ['smber', 'virus'], ['sbr', 'UTF-8'], ['sber', 'web'], ['sbr', 'handler'], ['smber', 'exeption'], ['smber', 'path'], ['smber', 'reference'], ['smber', 'template'], ['smber', 'wildcard'], ['smber', 'interface'], ['sber', 'syntax'], ['smber', 'loop'], ['smber', 'demon'], ['smber', 'core'], ['sber', 'interpreter'], ['smber', 'string'], ['smber', 'document'], ['smber', 'cookie'], ['smber', 'codec'], ['smber', 'e-mail'], ['sber', 'OS'], ['smber', 'service'], ['sber', 'provider'], ['smber', 'cache'], ['smber', 'database'], ['smber', 'object'], ['smbers', 'dictionary'], ['sber', 'driver'], ['smber', 'index'], ['sber', 'encoder'], ['smber', 'list'], ['smber', 'tuple'], ['smber', 'range'], ['smber', 'stream'], ['sber', 'internet'], ['smber', 'component'], ['smber', 'module'], ['smber', 'library'], ['smber', 'limit'], ['smber', 'function'], ['smer', 'token'], ['smber', 'code'], ['smber', 'wave'], ['sber', 'IoT'], ['smber', 'blockchain'], ['smber', 'repository'], ['smber', 'northbridge'], ['smber', 'southbridge']]
class SpineParsingException(Exception): def __init__(self, message, code_error=None, *args, **kwargs): self.message = message self.code_error = code_error super(SpineParsingException, self).__init__(*args, **kwargs) def __str__(self): return str(self.message) class SpineJsonEditorError(Exception): def __init__(self, message, code_error=None, *args, **kwargs): self.message = message self.code_error = code_error super(SpineJsonEditorError, self).__init__(*args, **kwargs) def __str__(self): return str(self.message)
class Spineparsingexception(Exception): def __init__(self, message, code_error=None, *args, **kwargs): self.message = message self.code_error = code_error super(SpineParsingException, self).__init__(*args, **kwargs) def __str__(self): return str(self.message) class Spinejsoneditorerror(Exception): def __init__(self, message, code_error=None, *args, **kwargs): self.message = message self.code_error = code_error super(SpineJsonEditorError, self).__init__(*args, **kwargs) def __str__(self): return str(self.message)
## A py module for constants. ## ## Oh, and a license thingy because otherwise it won't look cool and ## professional. ## ## MIT License ## ## Copyright (c) [2016] [Mehrab Hoque] ## ## 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. ''' A py module for constants. WARN: This module is not meant to be used in any way besides in the internals of the spice API source code. ''' '''The URL for verifying credentials. ''' CREDENTIALS_VERIFY = 'https://myanimelist.net/api/account/verify_credentials.xml' '''The base URLs for querying anime/manga searches based on keywords. ''' ANIME_QUERY_BASE = 'https://myanimelist.net/api/anime/search.xml?q=' MANGA_QUERY_BASE = 'https://myanimelist.net/api/manga/search.xml?q=' '''The base URLs for scraping anime/manga based on id numbers. ''' ANIME_SCRAPE_BASE = 'https://myanimelist.net/anime/' MANGA_SCRAPE_BASE = 'https://myanimelist.net/manga/' '''The base URLs for operations on a user's AnimeList. ''' ANIME_ADD_BASE = 'https://myanimelist.net/api/animelist/add/{}.xml' ANIME_UPDATE_BASE = 'https://myanimelist.net/api/animelist/update/{}.xml' ANIME_DELETE_BASE = 'https://myanimelist.net/api/animelist/delete/{}.xml' '''The base URLs for operations on a user's MangaList. ''' MANGA_UPDATE_BASE = 'https://myanimelist.net/api/mangalist/update/{}.xml' MANGA_ADD_BASE = 'https://myanimelist.net/api/mangalist/add/{}.xml' MANGA_DELETE_BASE = 'https://myanimelist.net/api/mangalist/delete/{}.xml' '''The base URLs for accessing a user's Anime or MangaList. ''' ANIMELIST_BASE = 'https://myanimelist.net/malappinfo.php?u={}&status=all&type=anime' MANGALIST_BASE = 'https://myanimelist.net/malappinfo.php?u={}&status=all&type=manga' '''Global stats base URL, taken from MALGraph ''' MALGRAPH_GLOBAL = 'http://graph.anime.plus/s/globals' '''The default wait time before rescheduling an event. ''' DEFAULT_WAIT = 3 '''Keyword substring for multiple requests -- The only way to consistently work around the inconsistency of the Official MAL API. ''' TOO_MANY_REQUESTS = 'Too Many Requests' '''Arbitrary values that are unexplainable or confusing, that pop up in the code. Hopefully, these constant names are more clear to the reader. ''' UNAPPROVED = 'has not been approved' OP_SUFFIX = '.xml?data=' ANIME_TITLE_ELEM = 'span' ANIME_TITLE_ATTR = 'itemprop' ANIME_TITLE_ATTR_VAL = 'name' '''A collection of error message constants. ''' INVALID_CREDENTIALS = 'Invalid credentials; rejected by MAL.' INVALID_AUTH_FILE = 'Invalid auth file.' INVALID_EMPTY_QUERY = 'Must provide a non-empty query.' INVALID_MEDIUM = 'Invalid medium. Use spice.Medium.Anime or spice.Medium.MANGA.' INVALID_ID = 'Id must be a non-zero, positive integer.' INVALID_STATUS = '''Status must be one of the following: \'reading(1)\'\n\'watching(1)\'\n\'completed(2)\' \'onhold(3)\'\n\'dropped(4)\'\n\'plantoread(6)\' \'plantowatch(6)\'''' INVALID_STATUS_NUM = '''Status must be one of the following: \'reading(1)\'\n\'watching(1)\'\n\'completed(2)\' \'onhold(3)\'\n\'dropped(4)\'\n\'plantoread(6)\' \'plantowatch(6)\'''' INVALID_LIST_MATCH = 'Invalid list match.'
""" A py module for constants. WARN: This module is not meant to be used in any way besides in the internals of the spice API source code. """ 'The URL for verifying credentials.\n' credentials_verify = 'https://myanimelist.net/api/account/verify_credentials.xml' 'The base URLs for querying anime/manga searches based on keywords.\n' anime_query_base = 'https://myanimelist.net/api/anime/search.xml?q=' manga_query_base = 'https://myanimelist.net/api/manga/search.xml?q=' 'The base URLs for scraping anime/manga based on id numbers.\n' anime_scrape_base = 'https://myanimelist.net/anime/' manga_scrape_base = 'https://myanimelist.net/manga/' "The base URLs for operations on a user's AnimeList.\n" anime_add_base = 'https://myanimelist.net/api/animelist/add/{}.xml' anime_update_base = 'https://myanimelist.net/api/animelist/update/{}.xml' anime_delete_base = 'https://myanimelist.net/api/animelist/delete/{}.xml' "The base URLs for operations on a user's MangaList.\n" manga_update_base = 'https://myanimelist.net/api/mangalist/update/{}.xml' manga_add_base = 'https://myanimelist.net/api/mangalist/add/{}.xml' manga_delete_base = 'https://myanimelist.net/api/mangalist/delete/{}.xml' "The base URLs for accessing a user's Anime or MangaList.\n" animelist_base = 'https://myanimelist.net/malappinfo.php?u={}&status=all&type=anime' mangalist_base = 'https://myanimelist.net/malappinfo.php?u={}&status=all&type=manga' 'Global stats base URL, taken from MALGraph\n' malgraph_global = 'http://graph.anime.plus/s/globals' 'The default wait time before rescheduling an event.\n' default_wait = 3 'Keyword substring for multiple requests --\nThe only way to consistently work around the inconsistency of the Official MAL\nAPI.\n' too_many_requests = 'Too Many Requests' 'Arbitrary values that are unexplainable or confusing, that pop up in the code.\nHopefully, these constant names are more clear to the reader.\n' unapproved = 'has not been approved' op_suffix = '.xml?data=' anime_title_elem = 'span' anime_title_attr = 'itemprop' anime_title_attr_val = 'name' 'A collection of error message constants.\n' invalid_credentials = 'Invalid credentials; rejected by MAL.' invalid_auth_file = 'Invalid auth file.' invalid_empty_query = 'Must provide a non-empty query.' invalid_medium = 'Invalid medium. Use spice.Medium.Anime or spice.Medium.MANGA.' invalid_id = 'Id must be a non-zero, positive integer.' invalid_status = "Status must be one of the following:\n'reading(1)'\n'watching(1)'\n'completed(2)'\n'onhold(3)'\n'dropped(4)'\n'plantoread(6)'\n'plantowatch(6)'" invalid_status_num = "Status must be one of the following:\n'reading(1)'\n'watching(1)'\n'completed(2)'\n'onhold(3)'\n'dropped(4)'\n'plantoread(6)'\n'plantowatch(6)'" invalid_list_match = 'Invalid list match.'
# https://open.kattis.com/problems/flowfree def find_color_positions(board): colors = {} squares_to_visit = 0 for row in range(4): for col in range(4): v = board[row][col] if v == 'W': squares_to_visit += 1 continue if v not in colors: colors[v] = {} if 'start' not in colors[v]: colors[v]['start'] = (row, col) else: colors[v]['stop'] = (row, col) return colors, squares_to_visit def gen_neighbors(position, start, board, color_char): row, col = position if row > 0 and board[row - 1][col] in ('W', color_char): v = (row - 1, col) if v != start: yield v if row < 3 and board[row + 1][col] in ('W', color_char): v = (row + 1, col) if v != start: yield v if col > 0 and board[row][col - 1] in ('W', color_char): v = (row, col - 1) if v != start: yield v if col < 3 and board[row][col + 1] in ('W', color_char): v = (row, col + 1) if v != start: yield v def solve(color, position, color_positions, board, squares_to_visit): if color == 4 or (color == 3 and 'Y' not in color_positions): return squares_to_visit == 0 color_char = COLOR_SEARCH_ORDER[color] color_position = color_positions[color_char] start = color_position['start'] stop = color_position['stop'] if position is None: position = start for neighbor in gen_neighbors(position, start, board, color_char): if neighbor == stop: if solve(color + 1, None, color_positions, board, squares_to_visit): return True continue row, col = neighbor board[row][col] = 'X' if solve(color, neighbor, color_positions, board, squares_to_visit - 1): return True board[row][col] = 'W' return False board = [list(input()) for _ in range(4)] color_positions, squares_to_visit = find_color_positions(board) COLOR_SEARCH_ORDER = ['B', 'R', 'G', 'Y'] print('solvable' if solve(0, None, color_positions, board, squares_to_visit) else 'not solvable')
def find_color_positions(board): colors = {} squares_to_visit = 0 for row in range(4): for col in range(4): v = board[row][col] if v == 'W': squares_to_visit += 1 continue if v not in colors: colors[v] = {} if 'start' not in colors[v]: colors[v]['start'] = (row, col) else: colors[v]['stop'] = (row, col) return (colors, squares_to_visit) def gen_neighbors(position, start, board, color_char): (row, col) = position if row > 0 and board[row - 1][col] in ('W', color_char): v = (row - 1, col) if v != start: yield v if row < 3 and board[row + 1][col] in ('W', color_char): v = (row + 1, col) if v != start: yield v if col > 0 and board[row][col - 1] in ('W', color_char): v = (row, col - 1) if v != start: yield v if col < 3 and board[row][col + 1] in ('W', color_char): v = (row, col + 1) if v != start: yield v def solve(color, position, color_positions, board, squares_to_visit): if color == 4 or (color == 3 and 'Y' not in color_positions): return squares_to_visit == 0 color_char = COLOR_SEARCH_ORDER[color] color_position = color_positions[color_char] start = color_position['start'] stop = color_position['stop'] if position is None: position = start for neighbor in gen_neighbors(position, start, board, color_char): if neighbor == stop: if solve(color + 1, None, color_positions, board, squares_to_visit): return True continue (row, col) = neighbor board[row][col] = 'X' if solve(color, neighbor, color_positions, board, squares_to_visit - 1): return True board[row][col] = 'W' return False board = [list(input()) for _ in range(4)] (color_positions, squares_to_visit) = find_color_positions(board) color_search_order = ['B', 'R', 'G', 'Y'] print('solvable' if solve(0, None, color_positions, board, squares_to_visit) else 'not solvable')
# # PHASE: compile # # DOCUMENT THIS # load( "@io_bazel_rules_scala//scala/private:rule_impls.bzl", "compile_or_empty", "pack_source_jars", ) load("//tools:dump.bzl", "dump") def phase_binary_compile(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_classpath + ctx.attr.unused_dependency_checker_ignored_targets ], ) return _phase_default_compile(ctx, p, args) def phase_library_compile(ctx, p): args = struct( srcjars = p.collect_srcjars, unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_classpath + ctx.attr.exports + ctx.attr.unused_dependency_checker_ignored_targets ], ) return _phase_default_compile(ctx, p, args) def phase_library_for_plugin_bootstrapping_compile(ctx, p): args = struct( unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_classpath + ctx.attr.exports ], unused_dependency_checker_mode = "off", ) return _phase_default_compile(ctx, p, args) def phase_macro_library_compile(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_macro_classpath + ctx.attr.exports + ctx.attr.unused_dependency_checker_ignored_targets ], ) return _phase_default_compile(ctx, p, args) def phase_junit_test_compile(ctx, p): args = struct( buildijar = False, implicit_junit_deps_needed_for_java_compilation = [ ctx.attr._junit, ctx.attr._hamcrest, ], unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_classpath + ctx.attr.unused_dependency_checker_ignored_targets ] + [ ctx.attr._junit.label, ctx.attr._hamcrest.label, ctx.attr.suite_label.label, ctx.attr._bazel_test_runner.label, ], ) return _phase_default_compile(ctx, p, args) def phase_repl_compile(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_repl_classpath + ctx.attr.unused_dependency_checker_ignored_targets ], ) return _phase_default_compile(ctx, p, args) def phase_scalatest_compile(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ target.label for target in p.scalac_provider.default_classpath + ctx.attr.unused_dependency_checker_ignored_targets ], ) return _phase_default_compile(ctx, p, args) def phase_common_compile(ctx, p): return _phase_default_compile(ctx, p) def _phase_default_compile(ctx, p, _args = struct()): return _phase_compile( ctx, p, _args.srcjars if hasattr(_args, "srcjars") else depset(), _args.buildijar if hasattr(_args, "buildijar") else True, _args.implicit_junit_deps_needed_for_java_compilation if hasattr(_args, "implicit_junit_deps_needed_for_java_compilation") else [], _args.unused_dependency_checker_ignored_targets if hasattr(_args, "unused_dependency_checker_ignored_targets") else [], _args.unused_dependency_checker_mode if hasattr(_args, "unused_dependency_checker_mode") else p.unused_deps_checker, ) def _phase_compile( ctx, p, srcjars, buildijar, # TODO: generalize this hack implicit_junit_deps_needed_for_java_compilation, unused_dependency_checker_ignored_targets, unused_dependency_checker_mode): # dump(ctx.outputs, "ctx.outputs") manifest = ctx.outputs.manifest jars = p.collect_jars.compile_jars rjars = p.collect_jars.transitive_runtime_jars transitive_compile_jars = p.collect_jars.transitive_compile_jars jars2labels = p.collect_jars.jars2labels.jars_to_labels deps_providers = p.collect_jars.deps_providers out = compile_or_empty( ctx, manifest, jars, srcjars, buildijar, transitive_compile_jars, jars2labels, implicit_junit_deps_needed_for_java_compilation, unused_dependency_checker_mode, unused_dependency_checker_ignored_targets, deps_providers, ) # TODO: simplify the return values and use provider print("Compiling %s" % ctx.label.name) # p.bloop.* is available sometimes here. Like if not in unused dep analze return struct( coverage = out.coverage, full_jars = out.full_jars, rjars = depset(out.full_jars, transitive = [rjars]), merged_provider = out.merged_provider, )
load('@io_bazel_rules_scala//scala/private:rule_impls.bzl', 'compile_or_empty', 'pack_source_jars') load('//tools:dump.bzl', 'dump') def phase_binary_compile(ctx, p): args = struct(buildijar=False, unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_classpath + ctx.attr.unused_dependency_checker_ignored_targets]) return _phase_default_compile(ctx, p, args) def phase_library_compile(ctx, p): args = struct(srcjars=p.collect_srcjars, unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_classpath + ctx.attr.exports + ctx.attr.unused_dependency_checker_ignored_targets]) return _phase_default_compile(ctx, p, args) def phase_library_for_plugin_bootstrapping_compile(ctx, p): args = struct(unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_classpath + ctx.attr.exports], unused_dependency_checker_mode='off') return _phase_default_compile(ctx, p, args) def phase_macro_library_compile(ctx, p): args = struct(buildijar=False, unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_macro_classpath + ctx.attr.exports + ctx.attr.unused_dependency_checker_ignored_targets]) return _phase_default_compile(ctx, p, args) def phase_junit_test_compile(ctx, p): args = struct(buildijar=False, implicit_junit_deps_needed_for_java_compilation=[ctx.attr._junit, ctx.attr._hamcrest], unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_classpath + ctx.attr.unused_dependency_checker_ignored_targets] + [ctx.attr._junit.label, ctx.attr._hamcrest.label, ctx.attr.suite_label.label, ctx.attr._bazel_test_runner.label]) return _phase_default_compile(ctx, p, args) def phase_repl_compile(ctx, p): args = struct(buildijar=False, unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_repl_classpath + ctx.attr.unused_dependency_checker_ignored_targets]) return _phase_default_compile(ctx, p, args) def phase_scalatest_compile(ctx, p): args = struct(buildijar=False, unused_dependency_checker_ignored_targets=[target.label for target in p.scalac_provider.default_classpath + ctx.attr.unused_dependency_checker_ignored_targets]) return _phase_default_compile(ctx, p, args) def phase_common_compile(ctx, p): return _phase_default_compile(ctx, p) def _phase_default_compile(ctx, p, _args=struct()): return _phase_compile(ctx, p, _args.srcjars if hasattr(_args, 'srcjars') else depset(), _args.buildijar if hasattr(_args, 'buildijar') else True, _args.implicit_junit_deps_needed_for_java_compilation if hasattr(_args, 'implicit_junit_deps_needed_for_java_compilation') else [], _args.unused_dependency_checker_ignored_targets if hasattr(_args, 'unused_dependency_checker_ignored_targets') else [], _args.unused_dependency_checker_mode if hasattr(_args, 'unused_dependency_checker_mode') else p.unused_deps_checker) def _phase_compile(ctx, p, srcjars, buildijar, implicit_junit_deps_needed_for_java_compilation, unused_dependency_checker_ignored_targets, unused_dependency_checker_mode): manifest = ctx.outputs.manifest jars = p.collect_jars.compile_jars rjars = p.collect_jars.transitive_runtime_jars transitive_compile_jars = p.collect_jars.transitive_compile_jars jars2labels = p.collect_jars.jars2labels.jars_to_labels deps_providers = p.collect_jars.deps_providers out = compile_or_empty(ctx, manifest, jars, srcjars, buildijar, transitive_compile_jars, jars2labels, implicit_junit_deps_needed_for_java_compilation, unused_dependency_checker_mode, unused_dependency_checker_ignored_targets, deps_providers) print('Compiling %s' % ctx.label.name) return struct(coverage=out.coverage, full_jars=out.full_jars, rjars=depset(out.full_jars, transitive=[rjars]), merged_provider=out.merged_provider)
VERSION = '1.0' ALGORITHM_AUTHOR = 'Chris Schnaufer, Ken Youens-Clark' # ALGORITHM_AUTHOR_EMAIL = 'schnaufer@arizona.edu, kyclark@arizona.edu' ALGORITHM_AUTHOR_EMAIL = ['schnaufer@arizona.edu', 'kyclark@arizona.edu'] WRITE_BETYDB_CSV = True
version = '1.0' algorithm_author = 'Chris Schnaufer, Ken Youens-Clark' algorithm_author_email = ['schnaufer@arizona.edu', 'kyclark@arizona.edu'] write_betydb_csv = True
class InvalidArgument(Exception): def __init__(self, mesaje=""): super().__init__(mesaje) class InvalidRef(Exception): def __init__(self, mesaje="") -> None: super().__init__(mesaje) class InvalidCommand(Exception): def __init__(self, mesaje="") -> None: super().__init__(mesaje)
class Invalidargument(Exception): def __init__(self, mesaje=''): super().__init__(mesaje) class Invalidref(Exception): def __init__(self, mesaje='') -> None: super().__init__(mesaje) class Invalidcommand(Exception): def __init__(self, mesaje='') -> None: super().__init__(mesaje)
# https://binarysearch.com/problems/Count-Nodes-in-Complete-Binary-Tree class Solution: @staticmethod def getList(root, lst): if root == None: return else: lst.append(root.val) Solution.getList(root.left, lst) Solution.getList(root.right, lst) def solve(self, root): lst = [] Solution.getList(root, lst) return len(lst)
class Solution: @staticmethod def get_list(root, lst): if root == None: return else: lst.append(root.val) Solution.getList(root.left, lst) Solution.getList(root.right, lst) def solve(self, root): lst = [] Solution.getList(root, lst) return len(lst)
def close_catalogue_pop_up(wd): ''' Close catalogue pop up box if it appears. :param WebDriver wd: Selenium webdriver with page loaded. :return: void :rtype: void ''' pop_up_buttons = wd.find_elements_by_css_selector('.Button.variant-plain.size-normal.close-control') for button in pop_up_buttons: button.click()
def close_catalogue_pop_up(wd): """ Close catalogue pop up box if it appears. :param WebDriver wd: Selenium webdriver with page loaded. :return: void :rtype: void """ pop_up_buttons = wd.find_elements_by_css_selector('.Button.variant-plain.size-normal.close-control') for button in pop_up_buttons: button.click()
def flownet_v1_s(input): pass
def flownet_v1_s(input): pass
''' #E1 C=float(raw_input("<<")) F=float((9.0 / 5.0) * C + 32) print(F) ''' ''' #E2 radius,length = eval(raw_input(">>")) area = radius * radius * 3.14 volume = area * length print(area,volume) ''' ''' #E3 feet = eval(raw_input("<<")) meter = feet * 0.305 print(meter) ''' ''' #E4 M = eval(raw_input("Enter the amount of water in kilograms:>>")) init_temp = eval(raw_input("Enter the initial temperature:>>")) final_temp = eval(raw_input("Enter the final temperature:>>")) Q = M * (final_temp - init_temp) * 4184 print(Q) ''' ''' #E5 balance,rate = eval(raw_input("Enter balance and interest rate:>>")) interest = balance * (rate / 1200) print(interest) ''' ''' #E6 v0,v1,t = eval(raw_input("Enter v0,v1 and t :>>")) a = (v1 - v0) / t print(a) ''' ''' #E7 amount = eval(raw_input("Enter the monthly saving amount:>>")) s=0 for i in range (6): amount = amount *(1 + 0.00417) s=s+amount print(s) ''' ''' #E8 number = eval(raw_input("Enter a number 0 and 999 :>>")) a = number / 100 b = (number - 100 * a)/ 10 c = number - a * 100 - b * 10 print(a + b + c) '''
""" #E1 C=float(raw_input("<<")) F=float((9.0 / 5.0) * C + 32) print(F) """ '\n#E2\nradius,length = eval(raw_input(">>"))\narea = radius * radius * 3.14\nvolume = area * length\nprint(area,volume)\n' '\n#E3\nfeet = eval(raw_input("<<"))\nmeter = feet * 0.305\nprint(meter)\n' '\n#E4\nM = eval(raw_input("Enter the amount of water in kilograms:>>"))\ninit_temp = eval(raw_input("Enter the initial temperature:>>"))\nfinal_temp = eval(raw_input("Enter the final temperature:>>"))\nQ = M * (final_temp - init_temp) * 4184\nprint(Q)\n' '\n#E5\nbalance,rate = eval(raw_input("Enter balance and interest rate:>>"))\ninterest = balance * (rate / 1200)\nprint(interest)\n' '\n#E6\nv0,v1,t = eval(raw_input("Enter v0,v1 and t :>>"))\na = (v1 - v0) / t\nprint(a)\n' '\n#E7\namount = eval(raw_input("Enter the\nmonthly saving amount:>>"))\ns=0\nfor i in range (6):\n amount = amount *(1 + 0.00417)\n s=s+amount\nprint(s)\n' '\n#E8\nnumber = eval(raw_input("Enter a number 0 and 999 :>>"))\na = number / 100\nb = (number - 100 * a)/ 10\nc = number - a * 100 - b * 10\nprint(a + b + c)\n'
''' Author: Shuailin Chen Created Date: 2021-09-14 Last Modified: 2022-01-06 content: fine tuning ''' _base_ = [ './deeplabv3_r50-d8-selfsup_512x512_10k_sn6_sar_pro_rotated_ft.py' ] model = dict( pretrained='/home/csl/code/PolSAR_SelfSup/work_dirs/pbyol_r18_sn6_sar_pro_ul_ep400_lr03/20211009_142911/mmseg_epoch_400.pth', backbone=dict(depth=18), decode_head=dict( in_channels=512, channels=128, ), auxiliary_head=dict(in_channels=256, channels=64, num_classes=2) )
""" Author: Shuailin Chen Created Date: 2021-09-14 Last Modified: 2022-01-06 content: fine tuning """ _base_ = ['./deeplabv3_r50-d8-selfsup_512x512_10k_sn6_sar_pro_rotated_ft.py'] model = dict(pretrained='/home/csl/code/PolSAR_SelfSup/work_dirs/pbyol_r18_sn6_sar_pro_ul_ep400_lr03/20211009_142911/mmseg_epoch_400.pth', backbone=dict(depth=18), decode_head=dict(in_channels=512, channels=128), auxiliary_head=dict(in_channels=256, channels=64, num_classes=2))
class Stack: def __init__(self, values = []): self.__stack = values def push(self, value): self.__stack.append(value) def pop(self): return self.__stack.pop() def peek(self): return self.__stack[-1] def __len__(self): return len(self.__stack) if __name__== '__main__': stack = Stack() stack.push('a') stack.push('b') stack.push('c') stack.push('d') stack.push('e') stack.push('f') print (f'Size: {len(stack)}') print (f'Top: {stack.peek()}') while len(stack) > 0: print(stack.pop())
class Stack: def __init__(self, values=[]): self.__stack = values def push(self, value): self.__stack.append(value) def pop(self): return self.__stack.pop() def peek(self): return self.__stack[-1] def __len__(self): return len(self.__stack) if __name__ == '__main__': stack = stack() stack.push('a') stack.push('b') stack.push('c') stack.push('d') stack.push('e') stack.push('f') print(f'Size: {len(stack)}') print(f'Top: {stack.peek()}') while len(stack) > 0: print(stack.pop())
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution_1: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: head = ListNode() p = head p1, p2 = l1, l2 mem = 0 while p1 and p2: sumVal = p1.val + p2.val + mem p.next = ListNode(sumVal % 10) mem = sumVal // 10 p1 = p1.next p2 = p2.next p = p.next while p1: sumVal = p1.val + mem p.next = ListNode(sumVal % 10) mem = sumVal // 10 p1 = p1.next p = p.next while p2: sumVal = p2.val + mem p.next = ListNode(sumVal % 10) mem = sumVal // 10 p2 = p2.next p = p.next if mem: p.next = ListNode(mem) return head.next class Solution: def Node2List(self, head): p = head list = [p.val] while p.next != None: p = p.next list.append(p.val) return list def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: p1 = l1 p2 = l2 head = ListNode((p1.val + p2.val) % 10) p = head tem = (p1.val + p2.val) // 10 if p1.next == None and p2.next != None: p1.next = ListNode(0) if p2.next == None and p1.next != None: p2.next = ListNode(0) # num2Forms.print_ListNode(p1) # num2Forms.print_ListNode(p2) # num2Forms.print_ListNode(head) # print(tem) while p1.next != None and p2.next != None: p1 = p1.next p2 = p2.next p.next = ListNode((p1.val + p2.val + tem) % 10) p = p.next tem = (p1.val + p2.val + tem) // 10 # num2Forms.print_ListNode(p1) # num2Forms.print_ListNode(p2) # num2Forms.print_ListNode(head) # print(tem) if p1.next == None and p2.next != None: p1.next = ListNode(0) if p2.next == None and p1.next != None: p2.next = ListNode(0) # print(tem) if tem != 0: p.next = ListNode(tem) result = self.Node2List(head) return result class num2Forms: @classmethod def num2ListNode(cls, num): head = ListNode(num % 10) p = head num = num // 10 while num != 0: node = ListNode(num % 10) num = num // 10 p.next = node p = node return head @classmethod def print_ListNode(cls, head): p = head print(p.val, end="") while p.next != None: p = p.next print(" -> ", p.val, end="") print("\n") @classmethod def num2List(cls, num): if num == 0: return [0] list = [] while num != 0: list.append(num % 10) num = num // 10 return list
class Listnode: def __init__(self, x): self.val = x self.next = None class Solution_1: def add_two_numbers(self, l1: ListNode, l2: ListNode) -> ListNode: head = list_node() p = head (p1, p2) = (l1, l2) mem = 0 while p1 and p2: sum_val = p1.val + p2.val + mem p.next = list_node(sumVal % 10) mem = sumVal // 10 p1 = p1.next p2 = p2.next p = p.next while p1: sum_val = p1.val + mem p.next = list_node(sumVal % 10) mem = sumVal // 10 p1 = p1.next p = p.next while p2: sum_val = p2.val + mem p.next = list_node(sumVal % 10) mem = sumVal // 10 p2 = p2.next p = p.next if mem: p.next = list_node(mem) return head.next class Solution: def node2_list(self, head): p = head list = [p.val] while p.next != None: p = p.next list.append(p.val) return list def add_two_numbers(self, l1: ListNode, l2: ListNode) -> ListNode: p1 = l1 p2 = l2 head = list_node((p1.val + p2.val) % 10) p = head tem = (p1.val + p2.val) // 10 if p1.next == None and p2.next != None: p1.next = list_node(0) if p2.next == None and p1.next != None: p2.next = list_node(0) while p1.next != None and p2.next != None: p1 = p1.next p2 = p2.next p.next = list_node((p1.val + p2.val + tem) % 10) p = p.next tem = (p1.val + p2.val + tem) // 10 if p1.next == None and p2.next != None: p1.next = list_node(0) if p2.next == None and p1.next != None: p2.next = list_node(0) if tem != 0: p.next = list_node(tem) result = self.Node2List(head) return result class Num2Forms: @classmethod def num2_list_node(cls, num): head = list_node(num % 10) p = head num = num // 10 while num != 0: node = list_node(num % 10) num = num // 10 p.next = node p = node return head @classmethod def print__list_node(cls, head): p = head print(p.val, end='') while p.next != None: p = p.next print(' -> ', p.val, end='') print('\n') @classmethod def num2_list(cls, num): if num == 0: return [0] list = [] while num != 0: list.append(num % 10) num = num // 10 return list
while True: line = input('> ') if line == 'done': break # Breaks out of loop if done # Otherwise, the loop continues and prints line. print(line) print('Done!')
while True: line = input('> ') if line == 'done': break print(line) print('Done!')
# GOAL: # Convert to human readable information def format_bytes(bytes): units = ['B', 'KB','MB','GB'] for unit in units: out = f'{round(bytes,2)} {unit}' bytes = bytes / 1024 if bytes < 1: break return out def format_time(sec): units = [ ['s', 60], ['m', 60], ['h', 24], ['d', 0] ] out = '' qtime = int(sec) for unit in units: if unit[1] != 0: qtime, time = divmod(qtime, unit[1]) else: time = qtime if time != 0: out = f"{time}{unit[0]} {out}" if qtime == 0: break return out
def format_bytes(bytes): units = ['B', 'KB', 'MB', 'GB'] for unit in units: out = f'{round(bytes, 2)} {unit}' bytes = bytes / 1024 if bytes < 1: break return out def format_time(sec): units = [['s', 60], ['m', 60], ['h', 24], ['d', 0]] out = '' qtime = int(sec) for unit in units: if unit[1] != 0: (qtime, time) = divmod(qtime, unit[1]) else: time = qtime if time != 0: out = f'{time}{unit[0]} {out}' if qtime == 0: break return out
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( n ) : x = n y = 1 e = 0.000001 while ( x - y > e ) : x = ( x + y ) / 2 y = n / x return x #TOFILL if __name__ == '__main__': param = [ (1763.655093333857,), (-3544.737136289062,), (7893.209433000695,), (-3008.0331952533734,), (6155.190186637041,), (-5799.751467314729,), (8234.151546380555,), (-1829.5367705266551,), (5778.227173218819,), (-7785.473710863676,) ] n_success = 0 for i, parameters_set in enumerate(param): if abs(1 - (0.0000001 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 0.0000001)) < 0.001: n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
def f_gold(n): x = n y = 1 e = 1e-06 while x - y > e: x = (x + y) / 2 y = n / x return x if __name__ == '__main__': param = [(1763.655093333857,), (-3544.737136289062,), (7893.209433000695,), (-3008.0331952533734,), (6155.190186637041,), (-5799.751467314729,), (8234.151546380555,), (-1829.5367705266551,), (5778.227173218819,), (-7785.473710863676,)] n_success = 0 for (i, parameters_set) in enumerate(param): if abs(1 - (1e-07 + abs(f_gold(*parameters_set))) / (abs(f_filled(*parameters_set)) + 1e-07)) < 0.001: n_success += 1 print('#Results: %i, %i' % (n_success, len(param)))
# nlantau, 2021-11-04 make_string=lambda x:"".join([i[0] for i in x.split()]) print(make_string("sees eyes xray yoat"))
make_string = lambda x: ''.join([i[0] for i in x.split()]) print(make_string('sees eyes xray yoat'))
del_items(0x80135544) SetType(0x80135544, "void PreGameOnlyTestRoutine__Fv()") del_items(0x80137608) SetType(0x80137608, "void DRLG_PlaceDoor__Fii(int x, int y)") del_items(0x80137ADC) SetType(0x80137ADC, "void DRLG_L1Shadows__Fv()") del_items(0x80137EF4) SetType(0x80137EF4, "int DRLG_PlaceMiniSet__FPCUciiiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int noquad, int ldir)") del_items(0x80138360) SetType(0x80138360, "void DRLG_L1Floor__Fv()") del_items(0x8013844C) SetType(0x8013844C, "void StoreBlock__FPiii(int *Bl, int xx, int yy)") del_items(0x801384F8) SetType(0x801384F8, "void DRLG_L1Pass3__Fv()") del_items(0x801386AC) SetType(0x801386AC, "void DRLG_LoadL1SP__Fv()") del_items(0x80138788) SetType(0x80138788, "void DRLG_FreeL1SP__Fv()") del_items(0x801387B8) SetType(0x801387B8, "void DRLG_Init_Globals__Fv()") del_items(0x8013885C) SetType(0x8013885C, "void set_restore_lighting__Fv()") del_items(0x801388EC) SetType(0x801388EC, "void DRLG_InitL1Vals__Fv()") del_items(0x801388F4) SetType(0x801388F4, "void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x80138AC0) SetType(0x80138AC0, "void LoadPreL1Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x80138C78) SetType(0x80138C78, "void InitL5Dungeon__Fv()") del_items(0x80138CD8) SetType(0x80138CD8, "void L5ClearFlags__Fv()") del_items(0x80138D24) SetType(0x80138D24, "void L5drawRoom__Fiiii(int x, int y, int w, int h)") del_items(0x80138D90) SetType(0x80138D90, "unsigned char L5checkRoom__Fiiii(int x, int y, int width, int height)") del_items(0x80138E24) SetType(0x80138E24, "void L5roomGen__Fiiiii(int x, int y, int w, int h, int dir)") del_items(0x80139120) SetType(0x80139120, "void L5firstRoom__Fv()") del_items(0x801394DC) SetType(0x801394DC, "long L5GetArea__Fv()") del_items(0x8013953C) SetType(0x8013953C, "void L5makeDungeon__Fv()") del_items(0x801395C8) SetType(0x801395C8, "void L5makeDmt__Fv()") del_items(0x801396B0) SetType(0x801396B0, "int L5HWallOk__Fii(int i, int j)") del_items(0x801397EC) SetType(0x801397EC, "int L5VWallOk__Fii(int i, int j)") del_items(0x80139938) SetType(0x80139938, "void L5HorizWall__Fiici(int i, int j, char p, int dx)") del_items(0x80139B78) SetType(0x80139B78, "void L5VertWall__Fiici(int i, int j, char p, int dy)") del_items(0x80139DAC) SetType(0x80139DAC, "void L5AddWall__Fv()") del_items(0x8013A01C) SetType(0x8013A01C, "void DRLG_L5GChamber__Fiiiiii(int sx, int sy, int topflag, int bottomflag, int leftflag, int rightflag)") del_items(0x8013A2DC) SetType(0x8013A2DC, "void DRLG_L5GHall__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8013A390) SetType(0x8013A390, "void L5tileFix__Fv()") del_items(0x8013AC54) SetType(0x8013AC54, "void DRLG_L5Subs__Fv()") del_items(0x8013AE4C) SetType(0x8013AE4C, "void DRLG_L5SetRoom__Fii(int rx1, int ry1)") del_items(0x8013AF4C) SetType(0x8013AF4C, "void L5FillChambers__Fv()") del_items(0x8013B638) SetType(0x8013B638, "void DRLG_L5FTVR__Fiiiii(int i, int j, int x, int y, int d)") del_items(0x8013BB80) SetType(0x8013BB80, "void DRLG_L5FloodTVal__Fv()") del_items(0x8013BC84) SetType(0x8013BC84, "void DRLG_L5TransFix__Fv()") del_items(0x8013BE94) SetType(0x8013BE94, "void DRLG_L5DirtFix__Fv()") del_items(0x8013BFF0) SetType(0x8013BFF0, "void DRLG_L5CornerFix__Fv()") del_items(0x8013C100) SetType(0x8013C100, "void DRLG_L5__Fi(int entry)") del_items(0x8013C620) SetType(0x8013C620, "void CreateL5Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x8013EBF8) SetType(0x8013EBF8, "unsigned char DRLG_L2PlaceMiniSet__FPUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)") del_items(0x8013EFEC) SetType(0x8013EFEC, "void DRLG_L2PlaceRndSet__FPUci(unsigned char *miniset, int rndper)") del_items(0x8013F2EC) SetType(0x8013F2EC, "void DRLG_L2Subs__Fv()") del_items(0x8013F4E0) SetType(0x8013F4E0, "void DRLG_L2Shadows__Fv()") del_items(0x8013F6A4) SetType(0x8013F6A4, "void InitDungeon__Fv()") del_items(0x8013F704) SetType(0x8013F704, "void DRLG_LoadL2SP__Fv()") del_items(0x8013F7C4) SetType(0x8013F7C4, "void DRLG_FreeL2SP__Fv()") del_items(0x8013F7F4) SetType(0x8013F7F4, "void DRLG_L2SetRoom__Fii(int rx1, int ry1)") del_items(0x8013F8F4) SetType(0x8013F8F4, "void DefineRoom__Fiiiii(int nX1, int nY1, int nX2, int nY2, int ForceHW)") del_items(0x8013FB00) SetType(0x8013FB00, "void CreateDoorType__Fii(int nX, int nY)") del_items(0x8013FBE4) SetType(0x8013FBE4, "void PlaceHallExt__Fii(int nX, int nY)") del_items(0x8013FC1C) SetType(0x8013FC1C, "void AddHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)") del_items(0x8013FCF4) SetType(0x8013FCF4, "void CreateRoom__Fiiiiiiiii(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)") del_items(0x8014037C) SetType(0x8014037C, "void GetHall__FPiN40(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)") del_items(0x80140414) SetType(0x80140414, "void ConnectHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)") del_items(0x80140A7C) SetType(0x80140A7C, "void DoPatternCheck__Fii(int i, int j)") del_items(0x80140D34) SetType(0x80140D34, "void L2TileFix__Fv()") del_items(0x80140E58) SetType(0x80140E58, "unsigned char DL2_Cont__FUcUcUcUc(unsigned char x1f, unsigned char y1f, unsigned char x2f, unsigned char y2f)") del_items(0x80140ED8) SetType(0x80140ED8, "int DL2_NumNoChar__Fv()") del_items(0x80140F34) SetType(0x80140F34, "void DL2_DrawRoom__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x80141038) SetType(0x80141038, "void DL2_KnockWalls__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x80141208) SetType(0x80141208, "unsigned char DL2_FillVoids__Fv()") del_items(0x80141B8C) SetType(0x80141B8C, "unsigned char CreateDungeon__Fv()") del_items(0x80141E98) SetType(0x80141E98, "void DRLG_L2Pass3__Fv()") del_items(0x80142030) SetType(0x80142030, "void DRLG_L2FTVR__Fiiiii(int i, int j, int x, int y, int d)") del_items(0x80142578) SetType(0x80142578, "void DRLG_L2FloodTVal__Fv()") del_items(0x8014267C) SetType(0x8014267C, "void DRLG_L2TransFix__Fv()") del_items(0x8014288C) SetType(0x8014288C, "void L2DirtFix__Fv()") del_items(0x801429EC) SetType(0x801429EC, "void L2LockoutFix__Fv()") del_items(0x80142D78) SetType(0x80142D78, "void L2DoorFix__Fv()") del_items(0x80142E28) SetType(0x80142E28, "void DRLG_L2__Fi(int entry)") del_items(0x80143874) SetType(0x80143874, "void DRLG_InitL2Vals__Fv()") del_items(0x8014387C) SetType(0x8014387C, "void LoadL2Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x80143A6C) SetType(0x80143A6C, "void LoadPreL2Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x80143C58) SetType(0x80143C58, "void CreateL2Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x80144610) SetType(0x80144610, "void InitL3Dungeon__Fv()") del_items(0x80144698) SetType(0x80144698, "int DRLG_L3FillRoom__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x801448F4) SetType(0x801448F4, "void DRLG_L3CreateBlock__Fiiii(int x, int y, int obs, int dir)") del_items(0x80144B90) SetType(0x80144B90, "void DRLG_L3FloorArea__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x80144BF8) SetType(0x80144BF8, "void DRLG_L3FillDiags__Fv()") del_items(0x80144D28) SetType(0x80144D28, "void DRLG_L3FillSingles__Fv()") del_items(0x80144DF4) SetType(0x80144DF4, "void DRLG_L3FillStraights__Fv()") del_items(0x801451B8) SetType(0x801451B8, "void DRLG_L3Edges__Fv()") del_items(0x801451F8) SetType(0x801451F8, "int DRLG_L3GetFloorArea__Fv()") del_items(0x80145248) SetType(0x80145248, "void DRLG_L3MakeMegas__Fv()") del_items(0x8014538C) SetType(0x8014538C, "void DRLG_L3River__Fv()") del_items(0x80145DCC) SetType(0x80145DCC, "int DRLG_L3SpawnEdge__FiiPi(int x, int y, int *totarea)") del_items(0x80146058) SetType(0x80146058, "int DRLG_L3Spawn__FiiPi(int x, int y, int *totarea)") del_items(0x8014626C) SetType(0x8014626C, "void DRLG_L3Pool__Fv()") del_items(0x801464C0) SetType(0x801464C0, "void DRLG_L3PoolFix__Fv()") del_items(0x801465F4) SetType(0x801465F4, "int DRLG_L3PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)") del_items(0x80146974) SetType(0x80146974, "void DRLG_L3PlaceRndSet__FPCUci(unsigned char *miniset, int rndper)") del_items(0x80146CBC) SetType(0x80146CBC, "unsigned char WoodVertU__Fii(int i, int y)") del_items(0x80146D68) SetType(0x80146D68, "unsigned char WoodVertD__Fii(int i, int y)") del_items(0x80146E04) SetType(0x80146E04, "unsigned char WoodHorizL__Fii(int x, int j)") del_items(0x80146E98) SetType(0x80146E98, "unsigned char WoodHorizR__Fii(int x, int j)") del_items(0x80146F1C) SetType(0x80146F1C, "void AddFenceDoors__Fv()") del_items(0x80147000) SetType(0x80147000, "void FenceDoorFix__Fv()") del_items(0x801471F4) SetType(0x801471F4, "void DRLG_L3Wood__Fv()") del_items(0x801479E4) SetType(0x801479E4, "int DRLG_L3Anvil__Fv()") del_items(0x80147C40) SetType(0x80147C40, "void FixL3Warp__Fv()") del_items(0x80147D28) SetType(0x80147D28, "void FixL3HallofHeroes__Fv()") del_items(0x80147E7C) SetType(0x80147E7C, "void DRLG_L3LockRec__Fii(int x, int y)") del_items(0x80147F18) SetType(0x80147F18, "unsigned char DRLG_L3Lockout__Fv()") del_items(0x80147FD8) SetType(0x80147FD8, "void DRLG_L3__Fi(int entry)") del_items(0x801486F8) SetType(0x801486F8, "void DRLG_L3Pass3__Fv()") del_items(0x8014889C) SetType(0x8014889C, "void CreateL3Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x801489B0) SetType(0x801489B0, "void LoadL3Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x80148BD4) SetType(0x80148BD4, "void LoadPreL3Dungeon__FPcii(char *sFileName, int vx, int vy)") del_items(0x8014AA20) SetType(0x8014AA20, "void DRLG_L4Shadows__Fv()") del_items(0x8014AAE4) SetType(0x8014AAE4, "void InitL4Dungeon__Fv()") del_items(0x8014AB80) SetType(0x8014AB80, "void DRLG_LoadL4SP__Fv()") del_items(0x8014AC24) SetType(0x8014AC24, "void DRLG_FreeL4SP__Fv()") del_items(0x8014AC54) SetType(0x8014AC54, "void DRLG_L4SetSPRoom__Fii(int rx1, int ry1)") del_items(0x8014AD54) SetType(0x8014AD54, "void L4makeDmt__Fv()") del_items(0x8014ADF8) SetType(0x8014ADF8, "int L4HWallOk__Fii(int i, int j)") del_items(0x8014AF48) SetType(0x8014AF48, "int L4VWallOk__Fii(int i, int j)") del_items(0x8014B0C4) SetType(0x8014B0C4, "void L4HorizWall__Fiii(int i, int j, int dx)") del_items(0x8014B294) SetType(0x8014B294, "void L4VertWall__Fiii(int i, int j, int dy)") del_items(0x8014B45C) SetType(0x8014B45C, "void L4AddWall__Fv()") del_items(0x8014B93C) SetType(0x8014B93C, "void L4tileFix__Fv()") del_items(0x8014DB24) SetType(0x8014DB24, "void DRLG_L4Subs__Fv()") del_items(0x8014DCFC) SetType(0x8014DCFC, "void L4makeDungeon__Fv()") del_items(0x8014DF34) SetType(0x8014DF34, "void uShape__Fv()") del_items(0x8014E1D8) SetType(0x8014E1D8, "long GetArea__Fv()") del_items(0x8014E234) SetType(0x8014E234, "void L4drawRoom__Fiiii(int x, int y, int width, int height)") del_items(0x8014E29C) SetType(0x8014E29C, "unsigned char L4checkRoom__Fiiii(int x, int y, int width, int height)") del_items(0x8014E338) SetType(0x8014E338, "void L4roomGen__Fiiiii(int x, int y, int w, int h, int dir)") del_items(0x8014E634) SetType(0x8014E634, "void L4firstRoom__Fv()") del_items(0x8014E850) SetType(0x8014E850, "void L4SaveQuads__Fv()") del_items(0x8014E8F0) SetType(0x8014E8F0, "void DRLG_L4SetRoom__FPUcii(unsigned char *pSetPiece, int rx1, int ry1)") del_items(0x8014E9C4) SetType(0x8014E9C4, "void DRLG_LoadDiabQuads__FUc(unsigned char preflag)") del_items(0x8014EBC0) SetType(0x8014EBC0, "unsigned char DRLG_L4PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)") del_items(0x8014EFD8) SetType(0x8014EFD8, "void DRLG_L4FTVR__Fiiiii(int i, int j, int x, int y, int d)") del_items(0x8014F520) SetType(0x8014F520, "void DRLG_L4FloodTVal__Fv()") del_items(0x8014F624) SetType(0x8014F624, "unsigned char IsDURWall__Fc(char d)") del_items(0x8014F654) SetType(0x8014F654, "unsigned char IsDLLWall__Fc(char dd)") del_items(0x8014F684) SetType(0x8014F684, "void DRLG_L4TransFix__Fv()") del_items(0x8014F9DC) SetType(0x8014F9DC, "void DRLG_L4Corners__Fv()") del_items(0x8014FA70) SetType(0x8014FA70, "void L4FixRim__Fv()") del_items(0x8014FAAC) SetType(0x8014FAAC, "void DRLG_L4GeneralFix__Fv()") del_items(0x8014FB50) SetType(0x8014FB50, "void DRLG_L4__Fi(int entry)") del_items(0x8015044C) SetType(0x8015044C, "void DRLG_L4Pass3__Fv()") del_items(0x801505F0) SetType(0x801505F0, "void CreateL4Dungeon__FUii(unsigned int rseed, int entry)") del_items(0x801506D0) SetType(0x801506D0, "int ObjIndex__Fii(int x, int y)") del_items(0x80150784) SetType(0x80150784, "void AddSKingObjs__Fv()") del_items(0x801508B4) SetType(0x801508B4, "void AddSChamObjs__Fv()") del_items(0x80150930) SetType(0x80150930, "void AddVileObjs__Fv()") del_items(0x801509DC) SetType(0x801509DC, "void DRLG_SetMapTrans__FPc(char *sFileName)") del_items(0x80150AA0) SetType(0x80150AA0, "void LoadSetMap__Fv()") del_items(0x80150DC8) SetType(0x80150DC8, "unsigned long CM_QuestToBitPattern__Fi(int QuestNum)") del_items(0x80150EA0) SetType(0x80150EA0, "void CM_ShowMonsterList__Fii(int Level, int List)") del_items(0x80150F18) SetType(0x80150F18, "int CM_ChooseMonsterList__FiUl(int Level, unsigned long QuestsNeededMask)") del_items(0x80150FB8) SetType(0x80150FB8, "int NoUiListChoose__FiUl(int Level, unsigned long QuestsNeededMask)") del_items(0x80150FC0) SetType(0x80150FC0, "void ChooseTask__FP4TASK(struct TASK *T)") del_items(0x801514F4) SetType(0x801514F4, "void ShowTask__FP4TASK(struct TASK *T)") del_items(0x80151724) SetType(0x80151724, "int GetListsAvailable__FiUlPUc(int Level, unsigned long QuestsNeededMask, unsigned char *ListofLists)") del_items(0x80151848) SetType(0x80151848, "unsigned short GetDown__C4CPad(struct CPad *this)") del_items(0x80151870) SetType(0x80151870, "void AddL1Door__Fiiii(int i, int x, int y, int ot)") del_items(0x801519A8) SetType(0x801519A8, "void AddSCambBook__Fi(int i)") del_items(0x80151A48) SetType(0x80151A48, "void AddChest__Fii(int i, int t)") del_items(0x80151C28) SetType(0x80151C28, "void AddL2Door__Fiiii(int i, int x, int y, int ot)") del_items(0x80151D74) SetType(0x80151D74, "void AddL3Door__Fiiii(int i, int x, int y, int ot)") del_items(0x80151E08) SetType(0x80151E08, "void AddSarc__Fi(int i)") del_items(0x80151EE4) SetType(0x80151EE4, "void AddFlameTrap__Fi(int i)") del_items(0x80151F40) SetType(0x80151F40, "void AddTrap__Fii(int i, int ot)") del_items(0x80152038) SetType(0x80152038, "void AddArmorStand__Fi(int i)") del_items(0x801520C0) SetType(0x801520C0, "void AddObjLight__Fii(int i, int r)") del_items(0x80152168) SetType(0x80152168, "void AddBarrel__Fii(int i, int ot)") del_items(0x80152218) SetType(0x80152218, "void AddShrine__Fi(int i)") del_items(0x80152368) SetType(0x80152368, "void AddBookcase__Fi(int i)") del_items(0x801523C0) SetType(0x801523C0, "void AddBookstand__Fi(int i)") del_items(0x80152408) SetType(0x80152408, "void AddBloodFtn__Fi(int i)") del_items(0x80152450) SetType(0x80152450, "void AddPurifyingFountain__Fi(int i)") del_items(0x8015252C) SetType(0x8015252C, "void AddGoatShrine__Fi(int i)") del_items(0x80152574) SetType(0x80152574, "void AddCauldron__Fi(int i)") del_items(0x801525BC) SetType(0x801525BC, "void AddMurkyFountain__Fi(int i)") del_items(0x80152698) SetType(0x80152698, "void AddTearFountain__Fi(int i)") del_items(0x801526E0) SetType(0x801526E0, "void AddDecap__Fi(int i)") del_items(0x80152758) SetType(0x80152758, "void AddVilebook__Fi(int i)") del_items(0x801527A8) SetType(0x801527A8, "void AddMagicCircle__Fi(int i)") del_items(0x80152830) SetType(0x80152830, "void AddBrnCross__Fi(int i)") del_items(0x80152878) SetType(0x80152878, "void AddPedistal__Fi(int i)") del_items(0x801528EC) SetType(0x801528EC, "void AddStoryBook__Fi(int i)") del_items(0x80152AB8) SetType(0x80152AB8, "void AddWeaponRack__Fi(int i)") del_items(0x80152B40) SetType(0x80152B40, "void AddTorturedBody__Fi(int i)") del_items(0x80152BBC) SetType(0x80152BBC, "void AddFlameLvr__Fi(int i)") del_items(0x80152BFC) SetType(0x80152BFC, "void GetRndObjLoc__FiRiT1(int randarea, int *xx, int *yy)") del_items(0x80152D08) SetType(0x80152D08, "void AddMushPatch__Fv()") del_items(0x80152E2C) SetType(0x80152E2C, "void AddSlainHero__Fv()") del_items(0x80152E6C) SetType(0x80152E6C, "unsigned char RndLocOk__Fii(int xp, int yp)") del_items(0x80152F50) SetType(0x80152F50, "unsigned char TrapLocOk__Fii(int xp, int yp)") del_items(0x80152FB8) SetType(0x80152FB8, "unsigned char RoomLocOk__Fii(int xp, int yp)") del_items(0x80153050) SetType(0x80153050, "void InitRndLocObj__Fiii(int min, int max, int objtype)") del_items(0x801531FC) SetType(0x801531FC, "void InitRndLocBigObj__Fiii(int min, int max, int objtype)") del_items(0x801533F4) SetType(0x801533F4, "void InitRndLocObj5x5__Fiii(int min, int max, int objtype)") del_items(0x8015351C) SetType(0x8015351C, "void SetMapObjects__FPUcii(unsigned char *pMap, int startx, int starty)") del_items(0x801537BC) SetType(0x801537BC, "void ClrAllObjects__Fv()") del_items(0x801538AC) SetType(0x801538AC, "void AddTortures__Fv()") del_items(0x80153A38) SetType(0x80153A38, "void AddCandles__Fv()") del_items(0x80153AC0) SetType(0x80153AC0, "void AddTrapLine__Fiiii(int min, int max, int tobjtype, int lobjtype)") del_items(0x80153E5C) SetType(0x80153E5C, "void AddLeverObj__Fiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2)") del_items(0x80153E64) SetType(0x80153E64, "void AddBookLever__Fiiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg)") del_items(0x80154078) SetType(0x80154078, "void InitRndBarrels__Fv()") del_items(0x80154214) SetType(0x80154214, "void AddL1Objs__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x8015434C) SetType(0x8015434C, "void AddL2Objs__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x80154460) SetType(0x80154460, "void AddL3Objs__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x80154560) SetType(0x80154560, "unsigned char WallTrapLocOk__Fii(int xp, int yp)") del_items(0x801545C8) SetType(0x801545C8, "unsigned char TorchLocOK__Fii(int xp, int yp)") del_items(0x80154608) SetType(0x80154608, "void AddL2Torches__Fv()") del_items(0x801547BC) SetType(0x801547BC, "void AddObjTraps__Fv()") del_items(0x80154B34) SetType(0x80154B34, "void AddChestTraps__Fv()") del_items(0x80154C84) SetType(0x80154C84, "void LoadMapObjects__FPUciiiiiii(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx)") del_items(0x80154DF0) SetType(0x80154DF0, "void AddDiabObjs__Fv()") del_items(0x80154F44) SetType(0x80154F44, "void AddStoryBooks__Fv()") del_items(0x80155094) SetType(0x80155094, "void AddHookedBodies__Fi(int freq)") del_items(0x8015528C) SetType(0x8015528C, "void AddL4Goodies__Fv()") del_items(0x8015533C) SetType(0x8015533C, "void AddLazStand__Fv()") del_items(0x801554DC) SetType(0x801554DC, "void InitObjects__Fv()") del_items(0x80155B40) SetType(0x80155B40, "void PreObjObjAddSwitch__Fiiii(int ot, int ox, int oy, int oi)") del_items(0x80155E48) SetType(0x80155E48, "void FillSolidBlockTbls__Fv()") del_items(0x80155FF4) SetType(0x80155FF4, "void SetDungeonMicros__Fv()") del_items(0x80155FFC) SetType(0x80155FFC, "void DRLG_InitTrans__Fv()") del_items(0x80156070) SetType(0x80156070, "void DRLG_RectTrans__Fiiii(int x1, int y1, int x2, int y2)") del_items(0x801560F0) SetType(0x801560F0, "void DRLG_CopyTrans__Fiiii(int sx, int sy, int dx, int dy)") del_items(0x80156158) SetType(0x80156158, "void DRLG_ListTrans__FiPUc(int num, unsigned char *List)") del_items(0x801561CC) SetType(0x801561CC, "void DRLG_AreaTrans__FiPUc(int num, unsigned char *List)") del_items(0x8015625C) SetType(0x8015625C, "void DRLG_InitSetPC__Fv()") del_items(0x80156274) SetType(0x80156274, "void DRLG_SetPC__Fv()") del_items(0x80156324) SetType(0x80156324, "void Make_SetPC__Fiiii(int x, int y, int w, int h)") del_items(0x801563C4) SetType(0x801563C4, "unsigned char DRLG_WillThemeRoomFit__FiiiiiPiT5(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)") del_items(0x8015668C) SetType(0x8015668C, "void DRLG_CreateThemeRoom__Fi(int themeIndex)") del_items(0x80157694) SetType(0x80157694, "void DRLG_PlaceThemeRooms__FiiiiUc(int minSize, int maxSize, int floor, int freq, int rndSize)") del_items(0x8015793C) SetType(0x8015793C, "void DRLG_HoldThemeRooms__Fv()") del_items(0x80157AF0) SetType(0x80157AF0, "unsigned char SkipThemeRoom__Fii(int x, int y)") del_items(0x80157BBC) SetType(0x80157BBC, "void InitLevels__Fv()") del_items(0x80157CC0) SetType(0x80157CC0, "unsigned char TFit_Shrine__Fi(int i)") del_items(0x80157F30) SetType(0x80157F30, "unsigned char TFit_Obj5__Fi(int t)") del_items(0x80158104) SetType(0x80158104, "unsigned char TFit_SkelRoom__Fi(int t)") del_items(0x801581B4) SetType(0x801581B4, "unsigned char TFit_GoatShrine__Fi(int t)") del_items(0x8015824C) SetType(0x8015824C, "unsigned char CheckThemeObj3__Fiiii(int xp, int yp, int t, int f)") del_items(0x8015839C) SetType(0x8015839C, "unsigned char TFit_Obj3__Fi(int t)") del_items(0x8015845C) SetType(0x8015845C, "unsigned char CheckThemeReqs__Fi(int t)") del_items(0x80158528) SetType(0x80158528, "unsigned char SpecialThemeFit__Fii(int i, int t)") del_items(0x80158704) SetType(0x80158704, "unsigned char CheckThemeRoom__Fi(int tv)") del_items(0x801589B0) SetType(0x801589B0, "void InitThemes__Fv()") del_items(0x80158CFC) SetType(0x80158CFC, "void HoldThemeRooms__Fv()") del_items(0x80158DE4) SetType(0x80158DE4, "void PlaceThemeMonsts__Fii(int t, int f)") del_items(0x80158F88) SetType(0x80158F88, "void Theme_Barrel__Fi(int t)") del_items(0x80159100) SetType(0x80159100, "void Theme_Shrine__Fi(int t)") del_items(0x801591E8) SetType(0x801591E8, "void Theme_MonstPit__Fi(int t)") del_items(0x8015930C) SetType(0x8015930C, "void Theme_SkelRoom__Fi(int t)") del_items(0x80159610) SetType(0x80159610, "void Theme_Treasure__Fi(int t)") del_items(0x80159874) SetType(0x80159874, "void Theme_Library__Fi(int t)") del_items(0x80159AE4) SetType(0x80159AE4, "void Theme_Torture__Fi(int t)") del_items(0x80159C54) SetType(0x80159C54, "void Theme_BloodFountain__Fi(int t)") del_items(0x80159CC8) SetType(0x80159CC8, "void Theme_Decap__Fi(int t)") del_items(0x80159E38) SetType(0x80159E38, "void Theme_PurifyingFountain__Fi(int t)") del_items(0x80159EAC) SetType(0x80159EAC, "void Theme_ArmorStand__Fi(int t)") del_items(0x8015A044) SetType(0x8015A044, "void Theme_GoatShrine__Fi(int t)") del_items(0x8015A194) SetType(0x8015A194, "void Theme_Cauldron__Fi(int t)") del_items(0x8015A208) SetType(0x8015A208, "void Theme_MurkyFountain__Fi(int t)") del_items(0x8015A27C) SetType(0x8015A27C, "void Theme_TearFountain__Fi(int t)") del_items(0x8015A2F0) SetType(0x8015A2F0, "void Theme_BrnCross__Fi(int t)") del_items(0x8015A468) SetType(0x8015A468, "void Theme_WeaponRack__Fi(int t)") del_items(0x8015A600) SetType(0x8015A600, "void UpdateL4Trans__Fv()") del_items(0x8015A660) SetType(0x8015A660, "void CreateThemeRooms__Fv()") del_items(0x8015A844) SetType(0x8015A844, "void InitPortals__Fv()") del_items(0x8015A8A4) SetType(0x8015A8A4, "void InitQuests__Fv()") del_items(0x8015ACA8) SetType(0x8015ACA8, "void DrawButcher__Fv()") del_items(0x8015ACEC) SetType(0x8015ACEC, "void DrawSkelKing__Fiii(int q, int x, int y)") del_items(0x8015AD28) SetType(0x8015AD28, "void DrawWarLord__Fii(int x, int y)") del_items(0x8015AE24) SetType(0x8015AE24, "void DrawSChamber__Fiii(int q, int x, int y)") del_items(0x8015AF60) SetType(0x8015AF60, "void DrawLTBanner__Fii(int x, int y)") del_items(0x8015B03C) SetType(0x8015B03C, "void DrawBlind__Fii(int x, int y)") del_items(0x8015B118) SetType(0x8015B118, "void DrawBlood__Fii(int x, int y)") del_items(0x8015B1F8) SetType(0x8015B1F8, "void DRLG_CheckQuests__Fii(int x, int y)") del_items(0x8015B334) SetType(0x8015B334, "void InitInv__Fv()") del_items(0x8015B388) SetType(0x8015B388, "void InitAutomap__Fv()") del_items(0x8015B55C) SetType(0x8015B55C, "void InitAutomapOnce__Fv()") del_items(0x8015B56C) SetType(0x8015B56C, "unsigned char MonstPlace__Fii(int xp, int yp)") del_items(0x8015B628) SetType(0x8015B628, "void InitMonsterGFX__Fi(int monst)") del_items(0x8015B700) SetType(0x8015B700, "void PlaceMonster__Fiiii(int i, int mtype, int x, int y)") del_items(0x8015B7A0) SetType(0x8015B7A0, "int AddMonsterType__Fii(int type, int placeflag)") del_items(0x8015B89C) SetType(0x8015B89C, "void GetMonsterTypes__FUl(unsigned long QuestMask)") del_items(0x8015B94C) SetType(0x8015B94C, "void ClrAllMonsters__Fv()") del_items(0x8015BA8C) SetType(0x8015BA8C, "void InitLevelMonsters__Fv()") del_items(0x8015BB10) SetType(0x8015BB10, "void GetLevelMTypes__Fv()") del_items(0x8015BF9C) SetType(0x8015BF9C, "void PlaceQuestMonsters__Fv()") del_items(0x8015C360) SetType(0x8015C360, "void LoadDiabMonsts__Fv()") del_items(0x8015C470) SetType(0x8015C470, "void PlaceGroup__FiiUci(int mtype, int num, unsigned char leaderf, int leader)") del_items(0x8015CA10) SetType(0x8015CA10, "void SetMapMonsters__FPUcii(unsigned char *pMap, int startx, int starty)") del_items(0x8015CC34) SetType(0x8015CC34, "void InitMonsters__Fv()") del_items(0x8015CFE4) SetType(0x8015CFE4, "void PlaceUniqueMonst__Fiii(int uniqindex, int miniontype, int unpackfilesize)") del_items(0x8015D8B0) SetType(0x8015D8B0, "void PlaceUniques__Fv()") del_items(0x8015DA40) SetType(0x8015DA40, "int PreSpawnSkeleton__Fv()") del_items(0x8015DB80) SetType(0x8015DB80, "int encode_enemy__Fi(int m)") del_items(0x8015DBD8) SetType(0x8015DBD8, "void decode_enemy__Fii(int m, int enemy)") del_items(0x8015DCF0) SetType(0x8015DCF0, "unsigned char IsGoat__Fi(int mt)") del_items(0x8015DD1C) SetType(0x8015DD1C, "void InitMissiles__Fv()") del_items(0x8015DEF4) SetType(0x8015DEF4, "void InitNoTriggers__Fv()") del_items(0x8015DF18) SetType(0x8015DF18, "void InitTownTriggers__Fv()") del_items(0x8015E278) SetType(0x8015E278, "void InitL1Triggers__Fv()") del_items(0x8015E38C) SetType(0x8015E38C, "void InitL2Triggers__Fv()") del_items(0x8015E51C) SetType(0x8015E51C, "void InitL3Triggers__Fv()") del_items(0x8015E678) SetType(0x8015E678, "void InitL4Triggers__Fv()") del_items(0x8015E88C) SetType(0x8015E88C, "void InitSKingTriggers__Fv()") del_items(0x8015E8D8) SetType(0x8015E8D8, "void InitSChambTriggers__Fv()") del_items(0x8015E924) SetType(0x8015E924, "void InitPWaterTriggers__Fv()") del_items(0x8015E970) SetType(0x8015E970, "void InitStores__Fv()") del_items(0x8015E9F0) SetType(0x8015E9F0, "void SetupTownStores__Fv()") del_items(0x8015EBA0) SetType(0x8015EBA0, "void DeltaLoadLevel__Fv()") del_items(0x8015F478) SetType(0x8015F478, "unsigned char SmithItemOk__Fi(int i)") del_items(0x8015F4DC) SetType(0x8015F4DC, "int RndSmithItem__Fi(int lvl)") del_items(0x8015F5E8) SetType(0x8015F5E8, "unsigned char WitchItemOk__Fi(int i)") del_items(0x8015F728) SetType(0x8015F728, "int RndWitchItem__Fi(int lvl)") del_items(0x8015F828) SetType(0x8015F828, "void BubbleSwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)") del_items(0x8015F918) SetType(0x8015F918, "void SortWitch__Fv()") del_items(0x8015FA38) SetType(0x8015FA38, "int RndBoyItem__Fi(int lvl)") del_items(0x8015FB5C) SetType(0x8015FB5C, "unsigned char HealerItemOk__Fi(int i)") del_items(0x8015FD10) SetType(0x8015FD10, "int RndHealerItem__Fi(int lvl)") del_items(0x8015FE10) SetType(0x8015FE10, "void RecreatePremiumItem__Fiiii(int ii, int idx, int plvl, int iseed)") del_items(0x8015FED8) SetType(0x8015FED8, "void RecreateWitchItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x80160030) SetType(0x80160030, "void RecreateSmithItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x801600CC) SetType(0x801600CC, "void RecreateHealerItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x8016018C) SetType(0x8016018C, "void RecreateBoyItem__Fiiii(int ii, int idx, int lvl, int iseed)") del_items(0x80160250) SetType(0x80160250, "void RecreateTownItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)") del_items(0x801602DC) SetType(0x801602DC, "void SpawnSmith__Fi(int lvl)") del_items(0x8016047C) SetType(0x8016047C, "void SpawnWitch__Fi(int lvl)") del_items(0x801607F8) SetType(0x801607F8, "void SpawnHealer__Fi(int lvl)") del_items(0x80160B24) SetType(0x80160B24, "void SpawnBoy__Fi(int lvl)") del_items(0x80160C7C) SetType(0x80160C7C, "void SortSmith__Fv()") del_items(0x80160D90) SetType(0x80160D90, "void SortHealer__Fv()") del_items(0x80160EB0) SetType(0x80160EB0, "void RecreateItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)")
del_items(2148750660) set_type(2148750660, 'void PreGameOnlyTestRoutine__Fv()') del_items(2148759048) set_type(2148759048, 'void DRLG_PlaceDoor__Fii(int x, int y)') del_items(2148760284) set_type(2148760284, 'void DRLG_L1Shadows__Fv()') del_items(2148761332) set_type(2148761332, 'int DRLG_PlaceMiniSet__FPCUciiiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int noquad, int ldir)') del_items(2148762464) set_type(2148762464, 'void DRLG_L1Floor__Fv()') del_items(2148762700) set_type(2148762700, 'void StoreBlock__FPiii(int *Bl, int xx, int yy)') del_items(2148762872) set_type(2148762872, 'void DRLG_L1Pass3__Fv()') del_items(2148763308) set_type(2148763308, 'void DRLG_LoadL1SP__Fv()') del_items(2148763528) set_type(2148763528, 'void DRLG_FreeL1SP__Fv()') del_items(2148763576) set_type(2148763576, 'void DRLG_Init_Globals__Fv()') del_items(2148763740) set_type(2148763740, 'void set_restore_lighting__Fv()') del_items(2148763884) set_type(2148763884, 'void DRLG_InitL1Vals__Fv()') del_items(2148763892) set_type(2148763892, 'void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148764352) set_type(2148764352, 'void LoadPreL1Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148764792) set_type(2148764792, 'void InitL5Dungeon__Fv()') del_items(2148764888) set_type(2148764888, 'void L5ClearFlags__Fv()') del_items(2148764964) set_type(2148764964, 'void L5drawRoom__Fiiii(int x, int y, int w, int h)') del_items(2148765072) set_type(2148765072, 'unsigned char L5checkRoom__Fiiii(int x, int y, int width, int height)') del_items(2148765220) set_type(2148765220, 'void L5roomGen__Fiiiii(int x, int y, int w, int h, int dir)') del_items(2148765984) set_type(2148765984, 'void L5firstRoom__Fv()') del_items(2148766940) set_type(2148766940, 'long L5GetArea__Fv()') del_items(2148767036) set_type(2148767036, 'void L5makeDungeon__Fv()') del_items(2148767176) set_type(2148767176, 'void L5makeDmt__Fv()') del_items(2148767408) set_type(2148767408, 'int L5HWallOk__Fii(int i, int j)') del_items(2148767724) set_type(2148767724, 'int L5VWallOk__Fii(int i, int j)') del_items(2148768056) set_type(2148768056, 'void L5HorizWall__Fiici(int i, int j, char p, int dx)') del_items(2148768632) set_type(2148768632, 'void L5VertWall__Fiici(int i, int j, char p, int dy)') del_items(2148769196) set_type(2148769196, 'void L5AddWall__Fv()') del_items(2148769820) set_type(2148769820, 'void DRLG_L5GChamber__Fiiiiii(int sx, int sy, int topflag, int bottomflag, int leftflag, int rightflag)') del_items(2148770524) set_type(2148770524, 'void DRLG_L5GHall__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148770704) set_type(2148770704, 'void L5tileFix__Fv()') del_items(2148772948) set_type(2148772948, 'void DRLG_L5Subs__Fv()') del_items(2148773452) set_type(2148773452, 'void DRLG_L5SetRoom__Fii(int rx1, int ry1)') del_items(2148773708) set_type(2148773708, 'void L5FillChambers__Fv()') del_items(2148775480) set_type(2148775480, 'void DRLG_L5FTVR__Fiiiii(int i, int j, int x, int y, int d)') del_items(2148776832) set_type(2148776832, 'void DRLG_L5FloodTVal__Fv()') del_items(2148777092) set_type(2148777092, 'void DRLG_L5TransFix__Fv()') del_items(2148777620) set_type(2148777620, 'void DRLG_L5DirtFix__Fv()') del_items(2148777968) set_type(2148777968, 'void DRLG_L5CornerFix__Fv()') del_items(2148778240) set_type(2148778240, 'void DRLG_L5__Fi(int entry)') del_items(2148779552) set_type(2148779552, 'void CreateL5Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148789240) set_type(2148789240, 'unsigned char DRLG_L2PlaceMiniSet__FPUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)') del_items(2148790252) set_type(2148790252, 'void DRLG_L2PlaceRndSet__FPUci(unsigned char *miniset, int rndper)') del_items(2148791020) set_type(2148791020, 'void DRLG_L2Subs__Fv()') del_items(2148791520) set_type(2148791520, 'void DRLG_L2Shadows__Fv()') del_items(2148791972) set_type(2148791972, 'void InitDungeon__Fv()') del_items(2148792068) set_type(2148792068, 'void DRLG_LoadL2SP__Fv()') del_items(2148792260) set_type(2148792260, 'void DRLG_FreeL2SP__Fv()') del_items(2148792308) set_type(2148792308, 'void DRLG_L2SetRoom__Fii(int rx1, int ry1)') del_items(2148792564) set_type(2148792564, 'void DefineRoom__Fiiiii(int nX1, int nY1, int nX2, int nY2, int ForceHW)') del_items(2148793088) set_type(2148793088, 'void CreateDoorType__Fii(int nX, int nY)') del_items(2148793316) set_type(2148793316, 'void PlaceHallExt__Fii(int nX, int nY)') del_items(2148793372) set_type(2148793372, 'void AddHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)') del_items(2148793588) set_type(2148793588, 'void CreateRoom__Fiiiiiiiii(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)') del_items(2148795260) set_type(2148795260, 'void GetHall__FPiN40(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)') del_items(2148795412) set_type(2148795412, 'void ConnectHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)') del_items(2148797052) set_type(2148797052, 'void DoPatternCheck__Fii(int i, int j)') del_items(2148797748) set_type(2148797748, 'void L2TileFix__Fv()') del_items(2148798040) set_type(2148798040, 'unsigned char DL2_Cont__FUcUcUcUc(unsigned char x1f, unsigned char y1f, unsigned char x2f, unsigned char y2f)') del_items(2148798168) set_type(2148798168, 'int DL2_NumNoChar__Fv()') del_items(2148798260) set_type(2148798260, 'void DL2_DrawRoom__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148798520) set_type(2148798520, 'void DL2_KnockWalls__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148798984) set_type(2148798984, 'unsigned char DL2_FillVoids__Fv()') del_items(2148801420) set_type(2148801420, 'unsigned char CreateDungeon__Fv()') del_items(2148802200) set_type(2148802200, 'void DRLG_L2Pass3__Fv()') del_items(2148802608) set_type(2148802608, 'void DRLG_L2FTVR__Fiiiii(int i, int j, int x, int y, int d)') del_items(2148803960) set_type(2148803960, 'void DRLG_L2FloodTVal__Fv()') del_items(2148804220) set_type(2148804220, 'void DRLG_L2TransFix__Fv()') del_items(2148804748) set_type(2148804748, 'void L2DirtFix__Fv()') del_items(2148805100) set_type(2148805100, 'void L2LockoutFix__Fv()') del_items(2148806008) set_type(2148806008, 'void L2DoorFix__Fv()') del_items(2148806184) set_type(2148806184, 'void DRLG_L2__Fi(int entry)') del_items(2148808820) set_type(2148808820, 'void DRLG_InitL2Vals__Fv()') del_items(2148808828) set_type(2148808828, 'void LoadL2Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148809324) set_type(2148809324, 'void LoadPreL2Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148809816) set_type(2148809816, 'void CreateL2Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148812304) set_type(2148812304, 'void InitL3Dungeon__Fv()') del_items(2148812440) set_type(2148812440, 'int DRLG_L3FillRoom__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148813044) set_type(2148813044, 'void DRLG_L3CreateBlock__Fiiii(int x, int y, int obs, int dir)') del_items(2148813712) set_type(2148813712, 'void DRLG_L3FloorArea__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148813816) set_type(2148813816, 'void DRLG_L3FillDiags__Fv()') del_items(2148814120) set_type(2148814120, 'void DRLG_L3FillSingles__Fv()') del_items(2148814324) set_type(2148814324, 'void DRLG_L3FillStraights__Fv()') del_items(2148815288) set_type(2148815288, 'void DRLG_L3Edges__Fv()') del_items(2148815352) set_type(2148815352, 'int DRLG_L3GetFloorArea__Fv()') del_items(2148815432) set_type(2148815432, 'void DRLG_L3MakeMegas__Fv()') del_items(2148815756) set_type(2148815756, 'void DRLG_L3River__Fv()') del_items(2148818380) set_type(2148818380, 'int DRLG_L3SpawnEdge__FiiPi(int x, int y, int *totarea)') del_items(2148819032) set_type(2148819032, 'int DRLG_L3Spawn__FiiPi(int x, int y, int *totarea)') del_items(2148819564) set_type(2148819564, 'void DRLG_L3Pool__Fv()') del_items(2148820160) set_type(2148820160, 'void DRLG_L3PoolFix__Fv()') del_items(2148820468) set_type(2148820468, 'int DRLG_L3PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)') del_items(2148821364) set_type(2148821364, 'void DRLG_L3PlaceRndSet__FPCUci(unsigned char *miniset, int rndper)') del_items(2148822204) set_type(2148822204, 'unsigned char WoodVertU__Fii(int i, int y)') del_items(2148822376) set_type(2148822376, 'unsigned char WoodVertD__Fii(int i, int y)') del_items(2148822532) set_type(2148822532, 'unsigned char WoodHorizL__Fii(int x, int j)') del_items(2148822680) set_type(2148822680, 'unsigned char WoodHorizR__Fii(int x, int j)') del_items(2148822812) set_type(2148822812, 'void AddFenceDoors__Fv()') del_items(2148823040) set_type(2148823040, 'void FenceDoorFix__Fv()') del_items(2148823540) set_type(2148823540, 'void DRLG_L3Wood__Fv()') del_items(2148825572) set_type(2148825572, 'int DRLG_L3Anvil__Fv()') del_items(2148826176) set_type(2148826176, 'void FixL3Warp__Fv()') del_items(2148826408) set_type(2148826408, 'void FixL3HallofHeroes__Fv()') del_items(2148826748) set_type(2148826748, 'void DRLG_L3LockRec__Fii(int x, int y)') del_items(2148826904) set_type(2148826904, 'unsigned char DRLG_L3Lockout__Fv()') del_items(2148827096) set_type(2148827096, 'void DRLG_L3__Fi(int entry)') del_items(2148828920) set_type(2148828920, 'void DRLG_L3Pass3__Fv()') del_items(2148829340) set_type(2148829340, 'void CreateL3Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148829616) set_type(2148829616, 'void LoadL3Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148830164) set_type(2148830164, 'void LoadPreL3Dungeon__FPcii(char *sFileName, int vx, int vy)') del_items(2148837920) set_type(2148837920, 'void DRLG_L4Shadows__Fv()') del_items(2148838116) set_type(2148838116, 'void InitL4Dungeon__Fv()') del_items(2148838272) set_type(2148838272, 'void DRLG_LoadL4SP__Fv()') del_items(2148838436) set_type(2148838436, 'void DRLG_FreeL4SP__Fv()') del_items(2148838484) set_type(2148838484, 'void DRLG_L4SetSPRoom__Fii(int rx1, int ry1)') del_items(2148838740) set_type(2148838740, 'void L4makeDmt__Fv()') del_items(2148838904) set_type(2148838904, 'int L4HWallOk__Fii(int i, int j)') del_items(2148839240) set_type(2148839240, 'int L4VWallOk__Fii(int i, int j)') del_items(2148839620) set_type(2148839620, 'void L4HorizWall__Fiii(int i, int j, int dx)') del_items(2148840084) set_type(2148840084, 'void L4VertWall__Fiii(int i, int j, int dy)') del_items(2148840540) set_type(2148840540, 'void L4AddWall__Fv()') del_items(2148841788) set_type(2148841788, 'void L4tileFix__Fv()') del_items(2148850468) set_type(2148850468, 'void DRLG_L4Subs__Fv()') del_items(2148850940) set_type(2148850940, 'void L4makeDungeon__Fv()') del_items(2148851508) set_type(2148851508, 'void uShape__Fv()') del_items(2148852184) set_type(2148852184, 'long GetArea__Fv()') del_items(2148852276) set_type(2148852276, 'void L4drawRoom__Fiiii(int x, int y, int width, int height)') del_items(2148852380) set_type(2148852380, 'unsigned char L4checkRoom__Fiiii(int x, int y, int width, int height)') del_items(2148852536) set_type(2148852536, 'void L4roomGen__Fiiiii(int x, int y, int w, int h, int dir)') del_items(2148853300) set_type(2148853300, 'void L4firstRoom__Fv()') del_items(2148853840) set_type(2148853840, 'void L4SaveQuads__Fv()') del_items(2148854000) set_type(2148854000, 'void DRLG_L4SetRoom__FPUcii(unsigned char *pSetPiece, int rx1, int ry1)') del_items(2148854212) set_type(2148854212, 'void DRLG_LoadDiabQuads__FUc(unsigned char preflag)') del_items(2148854720) set_type(2148854720, 'unsigned char DRLG_L4PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)') del_items(2148855768) set_type(2148855768, 'void DRLG_L4FTVR__Fiiiii(int i, int j, int x, int y, int d)') del_items(2148857120) set_type(2148857120, 'void DRLG_L4FloodTVal__Fv()') del_items(2148857380) set_type(2148857380, 'unsigned char IsDURWall__Fc(char d)') del_items(2148857428) set_type(2148857428, 'unsigned char IsDLLWall__Fc(char dd)') del_items(2148857476) set_type(2148857476, 'void DRLG_L4TransFix__Fv()') del_items(2148858332) set_type(2148858332, 'void DRLG_L4Corners__Fv()') del_items(2148858480) set_type(2148858480, 'void L4FixRim__Fv()') del_items(2148858540) set_type(2148858540, 'void DRLG_L4GeneralFix__Fv()') del_items(2148858704) set_type(2148858704, 'void DRLG_L4__Fi(int entry)') del_items(2148861004) set_type(2148861004, 'void DRLG_L4Pass3__Fv()') del_items(2148861424) set_type(2148861424, 'void CreateL4Dungeon__FUii(unsigned int rseed, int entry)') del_items(2148861648) set_type(2148861648, 'int ObjIndex__Fii(int x, int y)') del_items(2148861828) set_type(2148861828, 'void AddSKingObjs__Fv()') del_items(2148862132) set_type(2148862132, 'void AddSChamObjs__Fv()') del_items(2148862256) set_type(2148862256, 'void AddVileObjs__Fv()') del_items(2148862428) set_type(2148862428, 'void DRLG_SetMapTrans__FPc(char *sFileName)') del_items(2148862624) set_type(2148862624, 'void LoadSetMap__Fv()') del_items(2148863432) set_type(2148863432, 'unsigned long CM_QuestToBitPattern__Fi(int QuestNum)') del_items(2148863648) set_type(2148863648, 'void CM_ShowMonsterList__Fii(int Level, int List)') del_items(2148863768) set_type(2148863768, 'int CM_ChooseMonsterList__FiUl(int Level, unsigned long QuestsNeededMask)') del_items(2148863928) set_type(2148863928, 'int NoUiListChoose__FiUl(int Level, unsigned long QuestsNeededMask)') del_items(2148863936) set_type(2148863936, 'void ChooseTask__FP4TASK(struct TASK *T)') del_items(2148865268) set_type(2148865268, 'void ShowTask__FP4TASK(struct TASK *T)') del_items(2148865828) set_type(2148865828, 'int GetListsAvailable__FiUlPUc(int Level, unsigned long QuestsNeededMask, unsigned char *ListofLists)') del_items(2148866120) set_type(2148866120, 'unsigned short GetDown__C4CPad(struct CPad *this)') del_items(2148866160) set_type(2148866160, 'void AddL1Door__Fiiii(int i, int x, int y, int ot)') del_items(2148866472) set_type(2148866472, 'void AddSCambBook__Fi(int i)') del_items(2148866632) set_type(2148866632, 'void AddChest__Fii(int i, int t)') del_items(2148867112) set_type(2148867112, 'void AddL2Door__Fiiii(int i, int x, int y, int ot)') del_items(2148867444) set_type(2148867444, 'void AddL3Door__Fiiii(int i, int x, int y, int ot)') del_items(2148867592) set_type(2148867592, 'void AddSarc__Fi(int i)') del_items(2148867812) set_type(2148867812, 'void AddFlameTrap__Fi(int i)') del_items(2148867904) set_type(2148867904, 'void AddTrap__Fii(int i, int ot)') del_items(2148868152) set_type(2148868152, 'void AddArmorStand__Fi(int i)') del_items(2148868288) set_type(2148868288, 'void AddObjLight__Fii(int i, int r)') del_items(2148868456) set_type(2148868456, 'void AddBarrel__Fii(int i, int ot)') del_items(2148868632) set_type(2148868632, 'void AddShrine__Fi(int i)') del_items(2148868968) set_type(2148868968, 'void AddBookcase__Fi(int i)') del_items(2148869056) set_type(2148869056, 'void AddBookstand__Fi(int i)') del_items(2148869128) set_type(2148869128, 'void AddBloodFtn__Fi(int i)') del_items(2148869200) set_type(2148869200, 'void AddPurifyingFountain__Fi(int i)') del_items(2148869420) set_type(2148869420, 'void AddGoatShrine__Fi(int i)') del_items(2148869492) set_type(2148869492, 'void AddCauldron__Fi(int i)') del_items(2148869564) set_type(2148869564, 'void AddMurkyFountain__Fi(int i)') del_items(2148869784) set_type(2148869784, 'void AddTearFountain__Fi(int i)') del_items(2148869856) set_type(2148869856, 'void AddDecap__Fi(int i)') del_items(2148869976) set_type(2148869976, 'void AddVilebook__Fi(int i)') del_items(2148870056) set_type(2148870056, 'void AddMagicCircle__Fi(int i)') del_items(2148870192) set_type(2148870192, 'void AddBrnCross__Fi(int i)') del_items(2148870264) set_type(2148870264, 'void AddPedistal__Fi(int i)') del_items(2148870380) set_type(2148870380, 'void AddStoryBook__Fi(int i)') del_items(2148870840) set_type(2148870840, 'void AddWeaponRack__Fi(int i)') del_items(2148870976) set_type(2148870976, 'void AddTorturedBody__Fi(int i)') del_items(2148871100) set_type(2148871100, 'void AddFlameLvr__Fi(int i)') del_items(2148871164) set_type(2148871164, 'void GetRndObjLoc__FiRiT1(int randarea, int *xx, int *yy)') del_items(2148871432) set_type(2148871432, 'void AddMushPatch__Fv()') del_items(2148871724) set_type(2148871724, 'void AddSlainHero__Fv()') del_items(2148871788) set_type(2148871788, 'unsigned char RndLocOk__Fii(int xp, int yp)') del_items(2148872016) set_type(2148872016, 'unsigned char TrapLocOk__Fii(int xp, int yp)') del_items(2148872120) set_type(2148872120, 'unsigned char RoomLocOk__Fii(int xp, int yp)') del_items(2148872272) set_type(2148872272, 'void InitRndLocObj__Fiii(int min, int max, int objtype)') del_items(2148872700) set_type(2148872700, 'void InitRndLocBigObj__Fiii(int min, int max, int objtype)') del_items(2148873204) set_type(2148873204, 'void InitRndLocObj5x5__Fiii(int min, int max, int objtype)') del_items(2148873500) set_type(2148873500, 'void SetMapObjects__FPUcii(unsigned char *pMap, int startx, int starty)') del_items(2148874172) set_type(2148874172, 'void ClrAllObjects__Fv()') del_items(2148874412) set_type(2148874412, 'void AddTortures__Fv()') del_items(2148874808) set_type(2148874808, 'void AddCandles__Fv()') del_items(2148874944) set_type(2148874944, 'void AddTrapLine__Fiiii(int min, int max, int tobjtype, int lobjtype)') del_items(2148875868) set_type(2148875868, 'void AddLeverObj__Fiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2)') del_items(2148875876) set_type(2148875876, 'void AddBookLever__Fiiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg)') del_items(2148876408) set_type(2148876408, 'void InitRndBarrels__Fv()') del_items(2148876820) set_type(2148876820, 'void AddL1Objs__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148877132) set_type(2148877132, 'void AddL2Objs__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148877408) set_type(2148877408, 'void AddL3Objs__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148877664) set_type(2148877664, 'unsigned char WallTrapLocOk__Fii(int xp, int yp)') del_items(2148877768) set_type(2148877768, 'unsigned char TorchLocOK__Fii(int xp, int yp)') del_items(2148877832) set_type(2148877832, 'void AddL2Torches__Fv()') del_items(2148878268) set_type(2148878268, 'void AddObjTraps__Fv()') del_items(2148879156) set_type(2148879156, 'void AddChestTraps__Fv()') del_items(2148879492) set_type(2148879492, 'void LoadMapObjects__FPUciiiiiii(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx)') del_items(2148879856) set_type(2148879856, 'void AddDiabObjs__Fv()') del_items(2148880196) set_type(2148880196, 'void AddStoryBooks__Fv()') del_items(2148880532) set_type(2148880532, 'void AddHookedBodies__Fi(int freq)') del_items(2148881036) set_type(2148881036, 'void AddL4Goodies__Fv()') del_items(2148881212) set_type(2148881212, 'void AddLazStand__Fv()') del_items(2148881628) set_type(2148881628, 'void InitObjects__Fv()') del_items(2148883264) set_type(2148883264, 'void PreObjObjAddSwitch__Fiiii(int ot, int ox, int oy, int oi)') del_items(2148884040) set_type(2148884040, 'void FillSolidBlockTbls__Fv()') del_items(2148884468) set_type(2148884468, 'void SetDungeonMicros__Fv()') del_items(2148884476) set_type(2148884476, 'void DRLG_InitTrans__Fv()') del_items(2148884592) set_type(2148884592, 'void DRLG_RectTrans__Fiiii(int x1, int y1, int x2, int y2)') del_items(2148884720) set_type(2148884720, 'void DRLG_CopyTrans__Fiiii(int sx, int sy, int dx, int dy)') del_items(2148884824) set_type(2148884824, 'void DRLG_ListTrans__FiPUc(int num, unsigned char *List)') del_items(2148884940) set_type(2148884940, 'void DRLG_AreaTrans__FiPUc(int num, unsigned char *List)') del_items(2148885084) set_type(2148885084, 'void DRLG_InitSetPC__Fv()') del_items(2148885108) set_type(2148885108, 'void DRLG_SetPC__Fv()') del_items(2148885284) set_type(2148885284, 'void Make_SetPC__Fiiii(int x, int y, int w, int h)') del_items(2148885444) set_type(2148885444, 'unsigned char DRLG_WillThemeRoomFit__FiiiiiPiT5(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)') del_items(2148886156) set_type(2148886156, 'void DRLG_CreateThemeRoom__Fi(int themeIndex)') del_items(2148890260) set_type(2148890260, 'void DRLG_PlaceThemeRooms__FiiiiUc(int minSize, int maxSize, int floor, int freq, int rndSize)') del_items(2148890940) set_type(2148890940, 'void DRLG_HoldThemeRooms__Fv()') del_items(2148891376) set_type(2148891376, 'unsigned char SkipThemeRoom__Fii(int x, int y)') del_items(2148891580) set_type(2148891580, 'void InitLevels__Fv()') del_items(2148891840) set_type(2148891840, 'unsigned char TFit_Shrine__Fi(int i)') del_items(2148892464) set_type(2148892464, 'unsigned char TFit_Obj5__Fi(int t)') del_items(2148892932) set_type(2148892932, 'unsigned char TFit_SkelRoom__Fi(int t)') del_items(2148893108) set_type(2148893108, 'unsigned char TFit_GoatShrine__Fi(int t)') del_items(2148893260) set_type(2148893260, 'unsigned char CheckThemeObj3__Fiiii(int xp, int yp, int t, int f)') del_items(2148893596) set_type(2148893596, 'unsigned char TFit_Obj3__Fi(int t)') del_items(2148893788) set_type(2148893788, 'unsigned char CheckThemeReqs__Fi(int t)') del_items(2148893992) set_type(2148893992, 'unsigned char SpecialThemeFit__Fii(int i, int t)') del_items(2148894468) set_type(2148894468, 'unsigned char CheckThemeRoom__Fi(int tv)') del_items(2148895152) set_type(2148895152, 'void InitThemes__Fv()') del_items(2148895996) set_type(2148895996, 'void HoldThemeRooms__Fv()') del_items(2148896228) set_type(2148896228, 'void PlaceThemeMonsts__Fii(int t, int f)') del_items(2148896648) set_type(2148896648, 'void Theme_Barrel__Fi(int t)') del_items(2148897024) set_type(2148897024, 'void Theme_Shrine__Fi(int t)') del_items(2148897256) set_type(2148897256, 'void Theme_MonstPit__Fi(int t)') del_items(2148897548) set_type(2148897548, 'void Theme_SkelRoom__Fi(int t)') del_items(2148898320) set_type(2148898320, 'void Theme_Treasure__Fi(int t)') del_items(2148898932) set_type(2148898932, 'void Theme_Library__Fi(int t)') del_items(2148899556) set_type(2148899556, 'void Theme_Torture__Fi(int t)') del_items(2148899924) set_type(2148899924, 'void Theme_BloodFountain__Fi(int t)') del_items(2148900040) set_type(2148900040, 'void Theme_Decap__Fi(int t)') del_items(2148900408) set_type(2148900408, 'void Theme_PurifyingFountain__Fi(int t)') del_items(2148900524) set_type(2148900524, 'void Theme_ArmorStand__Fi(int t)') del_items(2148900932) set_type(2148900932, 'void Theme_GoatShrine__Fi(int t)') del_items(2148901268) set_type(2148901268, 'void Theme_Cauldron__Fi(int t)') del_items(2148901384) set_type(2148901384, 'void Theme_MurkyFountain__Fi(int t)') del_items(2148901500) set_type(2148901500, 'void Theme_TearFountain__Fi(int t)') del_items(2148901616) set_type(2148901616, 'void Theme_BrnCross__Fi(int t)') del_items(2148901992) set_type(2148901992, 'void Theme_WeaponRack__Fi(int t)') del_items(2148902400) set_type(2148902400, 'void UpdateL4Trans__Fv()') del_items(2148902496) set_type(2148902496, 'void CreateThemeRooms__Fv()') del_items(2148902980) set_type(2148902980, 'void InitPortals__Fv()') del_items(2148903076) set_type(2148903076, 'void InitQuests__Fv()') del_items(2148904104) set_type(2148904104, 'void DrawButcher__Fv()') del_items(2148904172) set_type(2148904172, 'void DrawSkelKing__Fiii(int q, int x, int y)') del_items(2148904232) set_type(2148904232, 'void DrawWarLord__Fii(int x, int y)') del_items(2148904484) set_type(2148904484, 'void DrawSChamber__Fiii(int q, int x, int y)') del_items(2148904800) set_type(2148904800, 'void DrawLTBanner__Fii(int x, int y)') del_items(2148905020) set_type(2148905020, 'void DrawBlind__Fii(int x, int y)') del_items(2148905240) set_type(2148905240, 'void DrawBlood__Fii(int x, int y)') del_items(2148905464) set_type(2148905464, 'void DRLG_CheckQuests__Fii(int x, int y)') del_items(2148905780) set_type(2148905780, 'void InitInv__Fv()') del_items(2148905864) set_type(2148905864, 'void InitAutomap__Fv()') del_items(2148906332) set_type(2148906332, 'void InitAutomapOnce__Fv()') del_items(2148906348) set_type(2148906348, 'unsigned char MonstPlace__Fii(int xp, int yp)') del_items(2148906536) set_type(2148906536, 'void InitMonsterGFX__Fi(int monst)') del_items(2148906752) set_type(2148906752, 'void PlaceMonster__Fiiii(int i, int mtype, int x, int y)') del_items(2148906912) set_type(2148906912, 'int AddMonsterType__Fii(int type, int placeflag)') del_items(2148907164) set_type(2148907164, 'void GetMonsterTypes__FUl(unsigned long QuestMask)') del_items(2148907340) set_type(2148907340, 'void ClrAllMonsters__Fv()') del_items(2148907660) set_type(2148907660, 'void InitLevelMonsters__Fv()') del_items(2148907792) set_type(2148907792, 'void GetLevelMTypes__Fv()') del_items(2148908956) set_type(2148908956, 'void PlaceQuestMonsters__Fv()') del_items(2148909920) set_type(2148909920, 'void LoadDiabMonsts__Fv()') del_items(2148910192) set_type(2148910192, 'void PlaceGroup__FiiUci(int mtype, int num, unsigned char leaderf, int leader)') del_items(2148911632) set_type(2148911632, 'void SetMapMonsters__FPUcii(unsigned char *pMap, int startx, int starty)') del_items(2148912180) set_type(2148912180, 'void InitMonsters__Fv()') del_items(2148913124) set_type(2148913124, 'void PlaceUniqueMonst__Fiii(int uniqindex, int miniontype, int unpackfilesize)') del_items(2148915376) set_type(2148915376, 'void PlaceUniques__Fv()') del_items(2148915776) set_type(2148915776, 'int PreSpawnSkeleton__Fv()') del_items(2148916096) set_type(2148916096, 'int encode_enemy__Fi(int m)') del_items(2148916184) set_type(2148916184, 'void decode_enemy__Fii(int m, int enemy)') del_items(2148916464) set_type(2148916464, 'unsigned char IsGoat__Fi(int mt)') del_items(2148916508) set_type(2148916508, 'void InitMissiles__Fv()') del_items(2148916980) set_type(2148916980, 'void InitNoTriggers__Fv()') del_items(2148917016) set_type(2148917016, 'void InitTownTriggers__Fv()') del_items(2148917880) set_type(2148917880, 'void InitL1Triggers__Fv()') del_items(2148918156) set_type(2148918156, 'void InitL2Triggers__Fv()') del_items(2148918556) set_type(2148918556, 'void InitL3Triggers__Fv()') del_items(2148918904) set_type(2148918904, 'void InitL4Triggers__Fv()') del_items(2148919436) set_type(2148919436, 'void InitSKingTriggers__Fv()') del_items(2148919512) set_type(2148919512, 'void InitSChambTriggers__Fv()') del_items(2148919588) set_type(2148919588, 'void InitPWaterTriggers__Fv()') del_items(2148919664) set_type(2148919664, 'void InitStores__Fv()') del_items(2148919792) set_type(2148919792, 'void SetupTownStores__Fv()') del_items(2148920224) set_type(2148920224, 'void DeltaLoadLevel__Fv()') del_items(2148922488) set_type(2148922488, 'unsigned char SmithItemOk__Fi(int i)') del_items(2148922588) set_type(2148922588, 'int RndSmithItem__Fi(int lvl)') del_items(2148922856) set_type(2148922856, 'unsigned char WitchItemOk__Fi(int i)') del_items(2148923176) set_type(2148923176, 'int RndWitchItem__Fi(int lvl)') del_items(2148923432) set_type(2148923432, 'void BubbleSwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)') del_items(2148923672) set_type(2148923672, 'void SortWitch__Fv()') del_items(2148923960) set_type(2148923960, 'int RndBoyItem__Fi(int lvl)') del_items(2148924252) set_type(2148924252, 'unsigned char HealerItemOk__Fi(int i)') del_items(2148924688) set_type(2148924688, 'int RndHealerItem__Fi(int lvl)') del_items(2148924944) set_type(2148924944, 'void RecreatePremiumItem__Fiiii(int ii, int idx, int plvl, int iseed)') del_items(2148925144) set_type(2148925144, 'void RecreateWitchItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148925488) set_type(2148925488, 'void RecreateSmithItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148925644) set_type(2148925644, 'void RecreateHealerItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148925836) set_type(2148925836, 'void RecreateBoyItem__Fiiii(int ii, int idx, int lvl, int iseed)') del_items(2148926032) set_type(2148926032, 'void RecreateTownItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)') del_items(2148926172) set_type(2148926172, 'void SpawnSmith__Fi(int lvl)') del_items(2148926588) set_type(2148926588, 'void SpawnWitch__Fi(int lvl)') del_items(2148927480) set_type(2148927480, 'void SpawnHealer__Fi(int lvl)') del_items(2148928292) set_type(2148928292, 'void SpawnBoy__Fi(int lvl)') del_items(2148928636) set_type(2148928636, 'void SortSmith__Fv()') del_items(2148928912) set_type(2148928912, 'void SortHealer__Fv()') del_items(2148929200) set_type(2148929200, 'void RecreateItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)')
# Do not edit this file directly. # It was auto-generated by: code/programs/reflexivity/reflexive_refresh load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") def ubuntu1404Clang10Sysroot(): http_archive( name = "ubuntu_14_04_clang_10_sysroot", build_file = "//bazel/deps/ubuntu_14_04_clang_10_sysroot:build.BUILD", sha256 = "6204f7998b543e7190ba55c7a0fe81d59afcaf8171e9dc34975fbf18bc9e4853", strip_prefix = "ubuntu_14_04_clang_10_sysroot-79690a1aefd7fd84e77e9bf785acb1dc82e55c4e", urls = [ "https://github.com/Unilang/ubuntu_14_04_clang_10_sysroot/archive/79690a1aefd7fd84e77e9bf785acb1dc82e55c4e.tar.gz", ], )
load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive') load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_file') def ubuntu1404_clang10_sysroot(): http_archive(name='ubuntu_14_04_clang_10_sysroot', build_file='//bazel/deps/ubuntu_14_04_clang_10_sysroot:build.BUILD', sha256='6204f7998b543e7190ba55c7a0fe81d59afcaf8171e9dc34975fbf18bc9e4853', strip_prefix='ubuntu_14_04_clang_10_sysroot-79690a1aefd7fd84e77e9bf785acb1dc82e55c4e', urls=['https://github.com/Unilang/ubuntu_14_04_clang_10_sysroot/archive/79690a1aefd7fd84e77e9bf785acb1dc82e55c4e.tar.gz'])
def arrplus(arr): return [arr[i] + i for i in range(len(arr))] if __name__ == '__main__': arr = [8, 4, 1, 7] print(arrplus(arr)) ''' [8, 5, 3, 10] '''
def arrplus(arr): return [arr[i] + i for i in range(len(arr))] if __name__ == '__main__': arr = [8, 4, 1, 7] print(arrplus(arr)) '\n\n[8, 5, 3, 10]\n\n'
class Node: def __init__(self, data): self.data = data self.left = None self.right = None def convert_to_infix(query): myStack = [] query = query[-1::-1] for term in query: if term.data == '_AND': term.left = myStack.pop() term.right = myStack.pop() myStack.append(term) elif term.data == '_OR': term.left = myStack.pop() term.right = myStack.pop() myStack.append(term) else: myStack.append(term) return myStack def doc_right(root, position, index): if root.data == '_OR' or root.data == '_AND': doc_right_l = doc_right(root.left, position, index) doc_right_r = doc_right(root.right, position, index) is_infinity = infinity_check_right(doc_right_l, doc_right_r, root.data) if is_infinity is None: if root.data == '_OR': return min(doc_right_r, doc_right_l) else: return max(doc_right_r, doc_right_l) else: return is_infinity else: res = index.next(root.data, (position + 1, 0)) if res != 'infinity' and res != position: return res[0] else: return "infinity" def infinity_check_right(l, r, argument): if argument == '_AND': if l == 'infinity' or r == 'infinity': return 'infinity' else: return None if argument == '_OR': if l == 'infinity' and r != 'infinity': return r if l != 'infinity' and r == 'infinity': return l if l == 'infinity' and r == 'infinity': return 'infinity' else: return None def infinity_check_left(l, r, argument): if argument == '_AND': if l == '-infinity' or r == '-infinity': return '-infinity' else: return None if argument == '_OR': if l == '-infinity' and r != '-infinity': return r if l != '-infinity' and r == '-infinity': return l if l == '-infinity' and r == '-infinity': return '-infinity' else: return None def doc_left(root, position, index): if root.data == '_OR' or root.data == '_AND': doc_left_r = doc_left(root.left, position, index) doc_left_l = doc_left(root.right, position, index) is_infinity = infinity_check_left(doc_left_l, doc_left_r, root.data) if is_infinity is None: if root.data == '_OR': return max(doc_left_r, doc_left_l) else: return min(doc_left_r, doc_left_l) else: return is_infinity else: res = index.prev(root.data, (position, 0)) if res != '-infinity' and res != position: return res[0] else: return "-infinity" def next_solution(query, position, index): docid_right = doc_right(query, position, index) if docid_right == "infinity": return None else: docid_left = doc_left(query, docid_right + 1, index) if docid_right == docid_left: return docid_left else: return next_solution(query, docid_right, index) def all_solution(query, m, index): doc_id = [] for u in range(m): doc_id.append(next_solution(query, u, index)) return set(doc_id) def construct_tree(preOrder): preOrder_node_list = [] for data in preOrder: preOrder_node_list.append(Node(data)) root = convert_to_infix(preOrder_node_list)[0] return root
class Node: def __init__(self, data): self.data = data self.left = None self.right = None def convert_to_infix(query): my_stack = [] query = query[-1::-1] for term in query: if term.data == '_AND': term.left = myStack.pop() term.right = myStack.pop() myStack.append(term) elif term.data == '_OR': term.left = myStack.pop() term.right = myStack.pop() myStack.append(term) else: myStack.append(term) return myStack def doc_right(root, position, index): if root.data == '_OR' or root.data == '_AND': doc_right_l = doc_right(root.left, position, index) doc_right_r = doc_right(root.right, position, index) is_infinity = infinity_check_right(doc_right_l, doc_right_r, root.data) if is_infinity is None: if root.data == '_OR': return min(doc_right_r, doc_right_l) else: return max(doc_right_r, doc_right_l) else: return is_infinity else: res = index.next(root.data, (position + 1, 0)) if res != 'infinity' and res != position: return res[0] else: return 'infinity' def infinity_check_right(l, r, argument): if argument == '_AND': if l == 'infinity' or r == 'infinity': return 'infinity' else: return None if argument == '_OR': if l == 'infinity' and r != 'infinity': return r if l != 'infinity' and r == 'infinity': return l if l == 'infinity' and r == 'infinity': return 'infinity' else: return None def infinity_check_left(l, r, argument): if argument == '_AND': if l == '-infinity' or r == '-infinity': return '-infinity' else: return None if argument == '_OR': if l == '-infinity' and r != '-infinity': return r if l != '-infinity' and r == '-infinity': return l if l == '-infinity' and r == '-infinity': return '-infinity' else: return None def doc_left(root, position, index): if root.data == '_OR' or root.data == '_AND': doc_left_r = doc_left(root.left, position, index) doc_left_l = doc_left(root.right, position, index) is_infinity = infinity_check_left(doc_left_l, doc_left_r, root.data) if is_infinity is None: if root.data == '_OR': return max(doc_left_r, doc_left_l) else: return min(doc_left_r, doc_left_l) else: return is_infinity else: res = index.prev(root.data, (position, 0)) if res != '-infinity' and res != position: return res[0] else: return '-infinity' def next_solution(query, position, index): docid_right = doc_right(query, position, index) if docid_right == 'infinity': return None else: docid_left = doc_left(query, docid_right + 1, index) if docid_right == docid_left: return docid_left else: return next_solution(query, docid_right, index) def all_solution(query, m, index): doc_id = [] for u in range(m): doc_id.append(next_solution(query, u, index)) return set(doc_id) def construct_tree(preOrder): pre_order_node_list = [] for data in preOrder: preOrder_node_list.append(node(data)) root = convert_to_infix(preOrder_node_list)[0] return root
class ListNode: def __init__(self, x): self.val = x self.next = None def toList(ln): result = [] while ln: result.append(ln.val) ln = ln.next return result def toLinkedList(aList): ln = ListNode(None) curr = ln for val in aList: curr.next = ListNode(val) curr = curr.next return ln.next
class Listnode: def __init__(self, x): self.val = x self.next = None def to_list(ln): result = [] while ln: result.append(ln.val) ln = ln.next return result def to_linked_list(aList): ln = list_node(None) curr = ln for val in aList: curr.next = list_node(val) curr = curr.next return ln.next