content
stringlengths
7
1.05M
class Foo(object): def foo(bar): pass def bar(foo): pass
""" 自定义字典类 键用半角实心点.做下级入口 例 dict['web']['port'] == AyDict['web.port'] """ class AyDict: __dict = {} def __init__(self, ori_dict=None): if ori_dict is None: ori_dict = {} self.__dict = ori_dict def __call__(self): return self.__dict def __eq__(self, other): return self.__dict == other.__dict def __contains__(self, ori_key: str): ori_key = ori_key.split('.') now_dict = self.__dict for key in ori_key: if key in now_dict: now_dict = now_dict[key] else: return False return True def __getitem__(self, ori_key: str): ori_key = ori_key.split('.') now_dict = self.__dict for key in ori_key: if key in now_dict: now_dict = now_dict[key] else: return None return now_dict def __setitem__(self, ori_key: str, ori_value): ori_key = ori_key.split('.') now_dict = self.__dict for key in ori_key[:-1]: if key not in now_dict: now_dict[key] = {} now_dict = now_dict[key] now_dict[ori_key[-1]] = ori_value return ori_value
class Card: # create a list for card face from 1~13 (its value) face = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] # create a list for card suit ,Clubs=C, Diamonds=D, Spades=S, Hearts=H suit = ["C", "D", "S", "H"] def __init__(self, card_face: str = None, card_suit: str = None): self.card_face = int(card_face) self.card_suit = card_suit # visulaize the suit and unify tens digit to one character def __repr__(self): suitlist = {"C": "♣️", "D": "♦️", "S": "♠️", "H": "♥️"} facedic = {**{f: str(f) for f in range(2, 11)}, **{1: "A", 10: "T", 11: "J", 12: "Q", 13: "K"}} # print(self.card_face, self.card_suit) return facedic[self.card_face] + suitlist[self.card_suit] def set_card_face(self, card_face: int): self.card_face = card_face def set_card_suit(self, card_suit: str): self.card_suit = card_suit def get_card_face(self): return self.card_face def get_card_suit(self): return self.card_suit def main(): a = int(input("Please input the values of card face(1~13):")) b = input("Please input the suit of card (Clubs=C, Diamonds=D, Spades=S, Hearts=H):") while a not in Card.face or b not in Card.suit: print("Out of card range. Please check again.") a = int(input("Please input the values of card face(1~13):")) b = input("Please input the suit of card (Clubs=C, Diamonds=D, Spades=S, Hearts=H):") test = Card(a, b) print(test) if __name__ == "__main__": main()
print(3 + 2 > 5 + 7) print("Is it greater?", 3 > -2) print("Roosters", 100 - 25 * 3 % 4) print(7.0/4.0) print(7/4)
# # PySNMP MIB module DLINK-3100-DHCP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLINK-3100-DHCP-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:48:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint") rnd, = mibBuilder.importSymbols("DLINK-3100-MIB", "rnd") PortList, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") TimeTicks, Gauge32, Counter32, Unsigned32, IpAddress, NotificationType, Counter64, ObjectIdentity, iso, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Bits, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Gauge32", "Counter32", "Unsigned32", "IpAddress", "NotificationType", "Counter64", "ObjectIdentity", "iso", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Bits", "Integer32") TruthValue, DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "RowStatus", "TextualConvention") rsDHCP = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38)) rsDHCP.setRevisions(('2003-10-18 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rsDHCP.setRevisionsDescriptions(('Initial version of this MIB.',)) if mibBuilder.loadTexts: rsDHCP.setLastUpdated('200310180000Z') if mibBuilder.loadTexts: rsDHCP.setOrganization('Dlink, Inc.') if mibBuilder.loadTexts: rsDHCP.setContactInfo('www.dlink.com') if mibBuilder.loadTexts: rsDHCP.setDescription('The private MIB module definition for DHCP server support in DLINK-3100 devices.') rsDhcpMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rsDhcpMibVersion.setStatus('current') if mibBuilder.loadTexts: rsDhcpMibVersion.setDescription("DHCP MIB's version, the current version is 4.") rlDhcpRelayEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 25), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayEnable.setDescription('Enable or disable the use of the DHCP relay.') rlDhcpRelayExists = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 26), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpRelayExists.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayExists.setDescription('This variable shows whether the device can function as a DHCP Relay Agent.') rlDhcpRelayNextServerTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 27), ) if mibBuilder.loadTexts: rlDhcpRelayNextServerTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerTable.setDescription('The DHCP Relay Next Servers configuration Table') rlDhcpRelayNextServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 27, 1), ).setIndexNames((0, "DLINK-3100-DHCP-MIB", "rlDhcpRelayNextServerIpAddr")) if mibBuilder.loadTexts: rlDhcpRelayNextServerEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerEntry.setDescription('The row definition for this table. DHCP requests are relayed to the specified next server according to their threshold values.') rlDhcpRelayNextServerIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 27, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpRelayNextServerIpAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerIpAddr.setDescription('The IPAddress of the next configuration server. DHCP Server may act as a DHCP relay if this parameter is not equal to 0.0.0.0.') rlDhcpRelayNextServerSecThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 27, 1, 2), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayNextServerSecThreshold.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerSecThreshold.setDescription('DHCP requests are relayed only if their SEC field is greater or equal to the threshold value in order to allow local DHCP Servers to answer first.') rlDhcpRelayNextServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 27, 1, 3), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayNextServerRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayNextServerRowStatus.setDescription("This variable displays the validity or invalidity of the entry. Setting it to 'destroy' has the effect of rendering it inoperative. The internal effect (row removal) is implementation dependent.") rlDhcpRelayInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 28), ) if mibBuilder.loadTexts: rlDhcpRelayInterfaceTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceTable.setDescription('The enabled DHCP Relay Interface Table') rlDhcpRelayInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 28, 1), ).setIndexNames((0, "DLINK-3100-DHCP-MIB", "rlDhcpRelayInterfaceIfindex")) if mibBuilder.loadTexts: rlDhcpRelayInterfaceEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceEntry.setDescription('The row definition for this table. The user can add entry when DHCP relay is enabled on Interface.') rlDhcpRelayInterfaceIfindex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 28, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceIfindex.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceIfindex.setDescription('The Interface on which an user enables a DHCP relay ') rlDhcpRelayInterfaceUseGiaddr = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 28, 1, 2), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceUseGiaddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceUseGiaddr.setDescription('The flag is used to set a DHCP relay interface to use GiAddr in the standard way. Default is TRUE. The field is not supported.') rlDhcpRelayInterfaceRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 28, 1, 3), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceRowStatus.setDescription('Entry status. Can be destroy, active or createAndGo') rlDhcpRelayInterfaceListTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29), ) if mibBuilder.loadTexts: rlDhcpRelayInterfaceListTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListTable.setDescription('This table contains one entry. The entry contains port list and vlan lists of interfaces that have configured DHCP relay') rlDhcpRelayInterfaceListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1), ).setIndexNames((0, "DLINK-3100-DHCP-MIB", "rlDhcpRelayInterfaceListIndex")) if mibBuilder.loadTexts: rlDhcpRelayInterfaceListEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListEntry.setDescription(' The entry contains port list and vlan lists of interfaces that have configured DHCP relay.') rlDhcpRelayInterfaceListIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpRelayInterfaceListIndex.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListIndex.setDescription('Index in the table. Already 1.') rlDhcpRelayInterfaceListPortList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1, 2), PortList()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceListPortList.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListPortList.setDescription('DHCP relay Interface Port List.') rlDhcpRelayInterfaceListVlanId1To1024 = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId1To1024.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId1To1024.setDescription(' DHCP relay Interface VlanId List 1.') rlDhcpRelayInterfaceListVlanId1025To2048 = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId1025To2048.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId1025To2048.setDescription(' DHCP relay Interface VlanId List 2.') rlDhcpRelayInterfaceListVlanId2049To3072 = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId2049To3072.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId2049To3072.setDescription(' DHCP relay Interface VlanId List 3.') rlDhcpRelayInterfaceListVlanId3073To4094 = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 29, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId3073To4094.setStatus('current') if mibBuilder.loadTexts: rlDhcpRelayInterfaceListVlanId3073To4094.setDescription(' DHCP relay Interface VlanId List 4.') rlDhcpSrvEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 30), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvEnable.setDescription('Enable or Disable the use of the DHCP Server. For a router product the default value is TRUE. For a switch product the default is FALSE.') rlDhcpSrvExists = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 31), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvExists.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvExists.setDescription('This variable shows whether the device can function as a DHCP Server.') rlDhcpSrvDbLocation = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("nvram", 1), ("flash", 2))).clone('flash')).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDbLocation.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbLocation.setDescription('Describes where DHCP Server database is stored.') rlDhcpSrvMaxNumOfClients = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 33), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvMaxNumOfClients.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvMaxNumOfClients.setDescription('This variable shows maximum number of clients that can be supported by DHCP Server dynamic allocation.') rlDhcpSrvDbNumOfActiveEntries = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 34), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDbNumOfActiveEntries.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbNumOfActiveEntries.setDescription('This variable shows number of active entries stored in database.') rlDhcpSrvDbErase = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 35), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDbErase.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDbErase.setDescription('The value is always false. Setting this variable to true causes erasing all entries in DHCP database.') rlDhcpSrvProbeEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 36), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvProbeEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeEnable.setDescription('Enable or Disable the use of the DHCP probe before allocating an IP address.') rlDhcpSrvProbeTimeout = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 37), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(300, 10000)).clone(500)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvProbeTimeout.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeTimeout.setDescription('Indicates the peiod of time in milliseconds the DHCP probe will wait before issuing a new trial or deciding that no other device on the network has the IP address which DHCP considers allocating.') rlDhcpSrvProbeRetries = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 38), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvProbeRetries.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvProbeRetries.setDescription('Indicates how many times DHCP will probe before deciding that no other device on the network has the IP address which DHCP considers allocating.') rlDhcpSrvDefaultNetworkPoolName = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 39), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDefaultNetworkPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDefaultNetworkPoolName.setDescription('Contains a default network pool name. Used in case of one network pool only.') rlDhcpSrvIpAddrTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45), ) if mibBuilder.loadTexts: rlDhcpSrvIpAddrTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrTable.setDescription('Table of IP Addresses allocated by DHCP Server by static and dynamic allocations.') rlDhcpSrvIpAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1), ).setIndexNames((0, "DLINK-3100-DHCP-MIB", "rlDhcpSrvIpAddrIpAddr")) if mibBuilder.loadTexts: rlDhcpSrvIpAddrEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrEntry.setDescription('The row definition for this table. Parameters of DHCP allocated IP Addresses table.') rlDhcpSrvIpAddrIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpAddr.setDescription('The IP address that was allocated by DHCP Server.') rlDhcpSrvIpAddrIpNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpNetMask.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIpNetMask.setDescription('The subnet mask associated with the IP address of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.') rlDhcpSrvIpAddrIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifier.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifier.setDescription('Unique Identifier for client. Either physical address or DHCP Client Identifier.') rlDhcpSrvIpAddrIdentifierType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("physAddr", 1), ("clientId", 2))).clone('clientId')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifierType.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrIdentifierType.setDescription('Identifier Type. Either physical address or DHCP Client Identifier.') rlDhcpSrvIpAddrClnHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 5), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrClnHostName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrClnHostName.setDescription('Client Host Name. DHCP Server will use it to update DNS Server. Must be unique per client.') rlDhcpSrvIpAddrMechanism = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("manual", 1), ("automatic", 2), ("dynamic", 3))).clone('manual')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrMechanism.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrMechanism.setDescription('Mechanism of allocation IP Address by DHCP Server. The only value that can be set by user is manual.') rlDhcpSrvIpAddrAgeTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvIpAddrAgeTime.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrAgeTime.setDescription('Age time of the IP Address.') rlDhcpSrvIpAddrPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrPoolName.setDescription('Ip address pool name. A unique name for host pool static allocation, or network pool name in case of dynamic allocation.') rlDhcpSrvIpAddrConfParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrConfParamsName.setDescription('This variable points (serves as key) to appropriate set of parameters in the DHCP Server configuration parameters table.') rlDhcpSrvIpAddrRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 45, 1, 10), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvIpAddrRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvIpAddrRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') rlDhcpSrvDynamicTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46), ) if mibBuilder.loadTexts: rlDhcpSrvDynamicTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicTable.setDescription("The DHCP Dynamic Server's configuration Table") rlDhcpSrvDynamicEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1), ).setIndexNames((0, "DLINK-3100-DHCP-MIB", "rlDhcpSrvDynamicPoolName")) if mibBuilder.loadTexts: rlDhcpSrvDynamicEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicEntry.setDescription('The row definition for this table. Parameters sent in as a DHCP Reply to DHCP Request with specified indices') rlDhcpSrvDynamicPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicPoolName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicPoolName.setDescription('The name of DHCP dynamic addresses pool.') rlDhcpSrvDynamicIpAddrFrom = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrFrom.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrFrom.setDescription('The first IP address allocated in this row.') rlDhcpSrvDynamicIpAddrTo = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrTo.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpAddrTo.setDescription('The last IP address allocated in this row.') rlDhcpSrvDynamicIpNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicIpNetMask.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicIpNetMask.setDescription('The subnet mask associated with the IP addresses of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.') rlDhcpSrvDynamicLeaseTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 5), Unsigned32().clone(86400)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicLeaseTime.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicLeaseTime.setDescription('Maximum lease-time in seconds granted to a requesting DHCP client. For automatic allocation use 0xFFFFFFFF. To exclude addresses from allocation mechanism, set this value to 0.') rlDhcpSrvDynamicProbeEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 6), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicProbeEnable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicProbeEnable.setDescription('Enable or Disable the use of the DHCP probe before allocating the address.') rlDhcpSrvDynamicTotalNumOfAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDynamicTotalNumOfAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicTotalNumOfAddr.setDescription('Total number of addresses in space.') rlDhcpSrvDynamicFreeNumOfAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlDhcpSrvDynamicFreeNumOfAddr.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicFreeNumOfAddr.setDescription('Free number of addresses in space.') rlDhcpSrvDynamicConfParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicConfParamsName.setDescription('This variable points (serves as key) to appropriate set of parameters in the DHCP Server configuration parameters table.') rlDhcpSrvDynamicRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 46, 1, 10), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvDynamicRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvDynamicRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') rlDhcpSrvConfParamsTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47), ) if mibBuilder.loadTexts: rlDhcpSrvConfParamsTable.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTable.setDescription('The DHCP Configuration Parameters Table') rlDhcpSrvConfParamsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1), ).setIndexNames((0, "DLINK-3100-DHCP-MIB", "rlDhcpSrvConfParamsName")) if mibBuilder.loadTexts: rlDhcpSrvConfParamsEntry.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsEntry.setDescription('The row definition for this table. Each entry corresponds to one specific parameters set.') rlDhcpSrvConfParamsName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsName.setDescription('This value is a unique index for the entry in the rlDhcpSrvConfParamsTable.') rlDhcpSrvConfParamsNextServerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerIp.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerIp.setDescription('The IP of next server for client to use in configuration process.') rlDhcpSrvConfParamsNextServerName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNextServerName.setDescription('The mame of next server for client to use in configuration process.') rlDhcpSrvConfParamsBootfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsBootfileName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsBootfileName.setDescription('Name of file for client to request from next server.') rlDhcpSrvConfParamsRoutersList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsRoutersList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRoutersList.setDescription("The value of option code 3, which defines default routers list. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsTimeSrvList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsTimeSrvList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsTimeSrvList.setDescription("The value of option code 4, which defines time servers list. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsDnsList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsDnsList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDnsList.setDescription("The value of option code 6, which defines the list of DNSs. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 8), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsDomainName.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsDomainName.setDescription('The value option code 15, which defines the domain name..') rlDhcpSrvConfParamsNetbiosNameList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNameList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNameList.setDescription("The value option code 44, which defines the list of NETBios Name Servers. Each IP address is represented in dotted decimal notation format with ';' between them.") rlDhcpSrvConfParamsNetbiosNodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8))).clone(namedValues=NamedValues(("b-node", 1), ("p-node", 2), ("m-node", 4), ("h-node", 8))).clone('h-node')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNodeType.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNetbiosNodeType.setDescription('The value option code 46, which defines the NETBios node type. The option will be added only if rlDhcpSrvConfParamsNetbiosNameList is not empty.') rlDhcpSrvConfParamsCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32)).clone('public')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsCommunity.setStatus('obsolete') if mibBuilder.loadTexts: rlDhcpSrvConfParamsCommunity.setDescription('The value of site-specific option 128, which defines Community. The option will be added only if rlDhcpSrvConfParamsNmsIp is set.') rlDhcpSrvConfParamsNmsIp = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 12), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsNmsIp.setStatus('obsolete') if mibBuilder.loadTexts: rlDhcpSrvConfParamsNmsIp.setDescription('The value of site-specific option 129, which defines IP of Network Manager.') rlDhcpSrvConfParamsOptionsList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 13), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsOptionsList.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsOptionsList.setDescription("The sequence of option segments. Each option segment is represented by a triplet <code/length/value>. The code defines the code of each supported option. The length defines the length of each supported option. The value defines the value of the supported option. If there is a number of elements in the value field, they are divided by ','. Each element of type IP address in value field is represented in dotted decimal notation format.") rlDhcpSrvConfParamsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 38, 47, 1, 14), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlDhcpSrvConfParamsRowStatus.setStatus('current') if mibBuilder.loadTexts: rlDhcpSrvConfParamsRowStatus.setDescription('The row status variable, used according to row installation and removal conventions.') mibBuilder.exportSymbols("DLINK-3100-DHCP-MIB", PYSNMP_MODULE_ID=rsDHCP, rlDhcpRelayExists=rlDhcpRelayExists, rlDhcpSrvIpAddrMechanism=rlDhcpSrvIpAddrMechanism, rlDhcpSrvConfParamsDnsList=rlDhcpSrvConfParamsDnsList, rlDhcpSrvConfParamsOptionsList=rlDhcpSrvConfParamsOptionsList, rlDhcpSrvConfParamsDomainName=rlDhcpSrvConfParamsDomainName, rlDhcpSrvDynamicFreeNumOfAddr=rlDhcpSrvDynamicFreeNumOfAddr, rlDhcpSrvConfParamsNextServerIp=rlDhcpSrvConfParamsNextServerIp, rlDhcpSrvConfParamsNextServerName=rlDhcpSrvConfParamsNextServerName, rlDhcpRelayInterfaceListTable=rlDhcpRelayInterfaceListTable, rlDhcpRelayInterfaceUseGiaddr=rlDhcpRelayInterfaceUseGiaddr, rlDhcpSrvDynamicIpAddrFrom=rlDhcpSrvDynamicIpAddrFrom, rlDhcpSrvConfParamsTable=rlDhcpSrvConfParamsTable, rlDhcpSrvConfParamsNetbiosNodeType=rlDhcpSrvConfParamsNetbiosNodeType, rlDhcpSrvDynamicConfParamsName=rlDhcpSrvDynamicConfParamsName, rlDhcpRelayInterfaceRowStatus=rlDhcpRelayInterfaceRowStatus, rlDhcpRelayInterfaceListIndex=rlDhcpRelayInterfaceListIndex, rlDhcpSrvMaxNumOfClients=rlDhcpSrvMaxNumOfClients, rlDhcpSrvExists=rlDhcpSrvExists, rlDhcpSrvConfParamsCommunity=rlDhcpSrvConfParamsCommunity, rlDhcpSrvConfParamsNetbiosNameList=rlDhcpSrvConfParamsNetbiosNameList, rlDhcpSrvIpAddrClnHostName=rlDhcpSrvIpAddrClnHostName, rlDhcpSrvConfParamsRowStatus=rlDhcpSrvConfParamsRowStatus, rlDhcpSrvIpAddrPoolName=rlDhcpSrvIpAddrPoolName, rlDhcpSrvConfParamsName=rlDhcpSrvConfParamsName, rlDhcpSrvProbeTimeout=rlDhcpSrvProbeTimeout, rlDhcpSrvDefaultNetworkPoolName=rlDhcpSrvDefaultNetworkPoolName, rlDhcpSrvConfParamsTimeSrvList=rlDhcpSrvConfParamsTimeSrvList, rlDhcpSrvDbLocation=rlDhcpSrvDbLocation, rlDhcpSrvDynamicIpNetMask=rlDhcpSrvDynamicIpNetMask, rlDhcpRelayInterfaceListEntry=rlDhcpRelayInterfaceListEntry, rlDhcpRelayInterfaceListVlanId1025To2048=rlDhcpRelayInterfaceListVlanId1025To2048, rlDhcpSrvIpAddrRowStatus=rlDhcpSrvIpAddrRowStatus, rsDHCP=rsDHCP, rlDhcpSrvProbeRetries=rlDhcpSrvProbeRetries, rlDhcpSrvProbeEnable=rlDhcpSrvProbeEnable, rlDhcpSrvDynamicLeaseTime=rlDhcpSrvDynamicLeaseTime, rlDhcpRelayNextServerIpAddr=rlDhcpRelayNextServerIpAddr, rlDhcpSrvConfParamsBootfileName=rlDhcpSrvConfParamsBootfileName, rsDhcpMibVersion=rsDhcpMibVersion, rlDhcpRelayInterfaceListVlanId3073To4094=rlDhcpRelayInterfaceListVlanId3073To4094, rlDhcpSrvIpAddrIpNetMask=rlDhcpSrvIpAddrIpNetMask, rlDhcpSrvIpAddrIdentifierType=rlDhcpSrvIpAddrIdentifierType, rlDhcpSrvEnable=rlDhcpSrvEnable, rlDhcpSrvDbErase=rlDhcpSrvDbErase, rlDhcpSrvIpAddrTable=rlDhcpSrvIpAddrTable, rlDhcpSrvIpAddrIdentifier=rlDhcpSrvIpAddrIdentifier, rlDhcpSrvDbNumOfActiveEntries=rlDhcpSrvDbNumOfActiveEntries, rlDhcpRelayInterfaceListPortList=rlDhcpRelayInterfaceListPortList, rlDhcpSrvDynamicTotalNumOfAddr=rlDhcpSrvDynamicTotalNumOfAddr, rlDhcpSrvDynamicRowStatus=rlDhcpSrvDynamicRowStatus, rlDhcpRelayNextServerSecThreshold=rlDhcpRelayNextServerSecThreshold, rlDhcpSrvIpAddrConfParamsName=rlDhcpSrvIpAddrConfParamsName, rlDhcpRelayInterfaceListVlanId1To1024=rlDhcpRelayInterfaceListVlanId1To1024, rlDhcpSrvIpAddrIpAddr=rlDhcpSrvIpAddrIpAddr, rlDhcpSrvConfParamsEntry=rlDhcpSrvConfParamsEntry, rlDhcpSrvConfParamsRoutersList=rlDhcpSrvConfParamsRoutersList, rlDhcpSrvDynamicProbeEnable=rlDhcpSrvDynamicProbeEnable, rlDhcpRelayInterfaceListVlanId2049To3072=rlDhcpRelayInterfaceListVlanId2049To3072, rlDhcpRelayInterfaceTable=rlDhcpRelayInterfaceTable, rlDhcpSrvDynamicIpAddrTo=rlDhcpSrvDynamicIpAddrTo, rlDhcpRelayInterfaceIfindex=rlDhcpRelayInterfaceIfindex, rlDhcpRelayNextServerTable=rlDhcpRelayNextServerTable, rlDhcpSrvConfParamsNmsIp=rlDhcpSrvConfParamsNmsIp, rlDhcpRelayEnable=rlDhcpRelayEnable, rlDhcpRelayInterfaceEntry=rlDhcpRelayInterfaceEntry, rlDhcpRelayNextServerRowStatus=rlDhcpRelayNextServerRowStatus, rlDhcpSrvDynamicTable=rlDhcpSrvDynamicTable, rlDhcpSrvIpAddrEntry=rlDhcpSrvIpAddrEntry, rlDhcpRelayNextServerEntry=rlDhcpRelayNextServerEntry, rlDhcpSrvDynamicPoolName=rlDhcpSrvDynamicPoolName, rlDhcpSrvDynamicEntry=rlDhcpSrvDynamicEntry, rlDhcpSrvIpAddrAgeTime=rlDhcpSrvIpAddrAgeTime)
__version__ = "0.0.3" # only source of version ID __title__ = "dfm" __download_url__ = ( "https://github.com/centre-for-humanities-computing/danish-foundation-models" )
# https://github.com/Narusi/Python-Kurss/blob/master/Python_Uzdevums_Funkcijas.ipynb def get_city_year(p0, perc, delta, p): years = 0 while p0 < p and years <= 10_000: p0 += p0 * perc/100 + delta years += 1 if years >= 10_000: years = -1 return years print( f'get_city_year(1000, 2, -50, 5000) -> {get_city_year(1000, 2, -50, 5000)}') print( f'get_city_year(1500, 5, 100, 5000) -> {get_city_year(1500, 5, 100, 5000)}') print( f'get_city_year(1500000, 2.5, 10000, 2000000) -> {get_city_year(1500000, 2.5, 10000, 2000000)}')
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Explicit co-ordinate values sent'}, {'abbr': 1, 'code': 1, 'title': 'Linear co-cordinates'}, {'abbr': 2, 'code': 2, 'title': 'Log co-ordinates'}, {'abbr': 3, 'code': 3, 'title': 'Reserved'}, {'abbr': 4, 'code': 4, 'title': 'Reserved'}, {'abbr': 5, 'code': 5, 'title': 'Reserved'}, {'abbr': 6, 'code': 6, 'title': 'Reserved'}, {'abbr': 7, 'code': 7, 'title': 'Reserved'}, {'abbr': 8, 'code': 8, 'title': 'Reserved'}, {'abbr': 9, 'code': 9, 'title': 'Reserved'}, {'abbr': 10, 'code': 10, 'title': 'Reserved'}, {'abbr': 11, 'code': 11, 'title': 'Geometric Co-ordinates'})
escapeProtect = "🵋" def parseTag(line, skip=0): skipNext = skip split = line.replace("\:", "🵋") split = line.split(":") for i in range(len(split)-1): split[i] = split[i].replace("🵋", ":") split[i] = split[i].replace("\(", "🵋") split[0] = split[0].replace("(", "") for i in range(len(split)-1): split[i].replace("🵋", "(") if len(split) != 2: for i in range(1,len(split)): if skipNext!=0: skipNext = skipNext-1 pass elif skipNext==0: split[i] = split[i].replace("\)", "🵋") split[i] = split[i].replace(")", "") split[i] = split[i].replace("🵋", ")") if split[i][0] == " ": if split[i][1] == "'" or split[i][1] == '"': split[i] = split[i][2:-1] elif split[i][1] == "(": print(split[i]) this = split[i][1:] next = split[i+1] fl = True c=1 p=next while fl==True: if p[0] == "(" or p[1] == "(": next=f'{next}:{split[i+c]}' p = split[i+c] skipNext=skipNext+1 c=c+1 else: skipNext=skipNext+1 fl = False while next[-1] == ")": if next[-1] == ")": next = next[0:-1] addBack = 0 for j in range(len(next)): if(next[j] == "("): addBack = addBack + 1 while addBack>0: next=next+")" addBack = addBack-1 print(i) split[i] = parseTag(f"{this}:{next}", skip=skipNext) elif split[i][0] == "'" or '"': split[i] = split[1][2:-1] elif split[i][0] == "(": print(split[i]) this = split[i][1:] next = split[i+1] fl = True c=1 p=next while fl==True: if p[0] == "(" or p[1] == "(": next=f'{next}:{split[i+c]}' p = split[i+c] skipNext=skipNext+1 c=c+1 else: skipNext=skipNext+1 fl = False while next[-1] == ")": if next[-1] == ")": next = next[0:-1] addBack = 0 for j in range(len(next)): if(next[j] == "("): addBack = addBack + 1 while addBack>0: next=next+")" addBack = addBack-1 print(i) split[i] = parseTag(f"{this}:{next}", skip=skipNext) else: split[1] = split[1].replace("\)", "🵋") split[1] = split[1].replace(")", "") split[1] = split[1].replace("🵋", ")") if split[1][0] == " ": if split[1][1] == "'" or '"': split[1] = split[1][2:-1] elif split[1][1] == "(": print("ERR") elif split[1][0] == "'" or '"': split[1] = split[1][2:-1] elif split[1][0] == "(": pass #print([split[0], split[1]]) return [split[0],split[1]] def parseSite(input): lines = [] comments=[] variables={} metavariables={} tags=[] for line in input: lines.append(line) for line in lines: if line[:2] == "##": comments.append(line[2:]) elif line[:2] == "+!": variable = line[2:].replace(" = ", "=").split("=") if variable[1][0] == "'" or variable[1][0] == '"': variable[1] =['str', variable[1][1:-1]] elif variable[1] == "True" or variable[1] == "False": variable[1]=['bol', variable[1]] elif int(variable[1]): variable[1]=['int', variable[1]] elif variable[1][0] == "!": variable[1]=variables[variable[1]] elif variable[1][0] == "%": variable[1]=metavariables[variable[1]] else: #TODO: GET CURRENT LINE NUMBER FOR ERROR return("!!Error on line (tba): Invalid Variable Type") variables[variable[0]]=variable[1] elif line[:2] == "+%": variable = line[2:].replace(" = ", "=").split("=") if variable[1][0] == "'" or variable[1][0] == '"': variable[1] =['str', variable[1][1:-1]] elif variable[1] == "True" or variable[1] == "False": variable[1]=['bol', variable[1]] elif int(variable[1]): variable[1]=['int', variable[1]] elif variable[1][0] == "!": variable[1]=variables[variable[1]] elif variable[1][0] == "%": variable[1]=metavariables[variable[1]] else: #TODO: GET CURRENT LINE NUMBER FOR ERROR return("!!Error on line (tba): Invalid MetaVariable Type") metavariables[variable[0]]=variable[1] elif line[0] == "(": tags.append(parseTag(line)) #print(parseTag(line)) elif line[0] == "$": pass elif line[0] == "+": working = line working = working[1:] working = working.replace(" = ", "=").split("=") if working[1][0] == "!": working[1]=variables[working[1][1:]][1] elif working[1][0] == "'" or working[1][0] == '"': working[1]=working[1][1:-1] tag = tags[-1] #print(tag) if len(tag) == 2: tag.append([working]) elif len(tag) == 3: tag[2].append(working) else: return("!!Error: Internal Error. Submit an issue with code 'r01:ev2:086'") #print(tag) else: return(f"!!Error on line (tba): Unknown line start. {line}") return comments, variables, metavariables, tags def toHtml(input, part="head"): textInput = input input = input.replace("; ", "\n").replace(";", "\n") input = input.replace("\\\n", ";") input = input.splitlines() tags = [] comments = [] variables = {} metavariables = {} print(input, "\n") if input[0] == "$site": comments, variables, metavariables, tags = parseSite(input) elif input[0] == "$script": return "!!Error: Attempt to compile pure script into HTML" else: return f"!!Error on line 1: Unknown Daze type '{input[0]}'" output = input return metavariables, variables, tags, comments # Testing Area print(toHtml("$site; +!lol = 'rofl'; (div: (div: (div: (p: 'hey')))); +lol='lol'"))
#Tarea 4 #License by : Karl A. Hines #Minutos, Dias y Horas tiempo = int (input("Introduzca la cantidad de minutos: ")) dias = int (tiempo/1440) tiempo = tiempo - dias*1440 horas = int (tiempo/60) tiempo = tiempo - horas*60 minutos = tiempo print(" El tiempo calculado fue de: " +str(dias) +" dias " +str(horas) +" horas " +str(minutos) +" minutos ")
#Faça um programa que leia 5 números e informe o maior número. n1 = int(input('Numero 1: ')) n2 = int(input('Numero 2: ')) n3 = int(input('Numero 3: ')) n4 = int(input('Numero 4: ')) n5 = int(input('Numero 5: ')) if n1 > n2 and n1 > n3 and n1 > n4 and n1 > n5: print('Numero 1 é o maior.') elif n2 > n1 and n2 > n3 and n2 > n4 and n2 > n5: print('Numero 2 é o maior.') elif n3 > n1 and n3 > n2 and n3 > n4 and n3 > n5: print('Numero 3 é o maior.') elif n4 > n1 and n4 > n2 and n4 > n3 and n4 > n5: print('Numero 4 é o maior.') elif n5 > n1 and n5 > n2 and n5 > n3 and n5 > n4: print('Numero 5 é o maior.')
#!/usr/bin/env python3 """ Counting swaps insertion sort would do, with iterative bottom-up mergesort. https://www.hackerrank.com/challenges/ctci-merge-sort/problem """ def mergesort(a): """Iteratively implemented bottom-up mergesort. Returns inversion count.""" swaps = 0 aux = [] def merge(low, mid, high): nonlocal swaps assert not aux, 'auxiliary storage should be empty between merges' left = low right = mid # Merge elements until at least one side is exhausted. while left != mid and right != high: if a[right] < a[left]: swaps += mid - left aux.append(a[right]) right += 1 else: aux.append(a[left]) left += 1 # Copy over elements from whichever side (if any) still has them. aux.extend(a[i] for i in range(left, mid)) aux.extend(a[i] for i in range(right, high)) assert len(aux) == high - low, 'aux should hold a full range' # Move everything back. a[low:high] = aux aux.clear() length = len(a) delta = 1 while delta < length: for middle in range(delta, length, delta * 2): merge(middle - delta, middle, min(middle + delta, length)) delta *= 2 return swaps def read_value(): """Reads a single integer.""" return int(input()) def read_record(): """Reads a record of integers as a list.""" n = read_value() a = list(map(int, input().split())) if len(a) != n: raise ValueError('wrong record length') return a def run(): """Reads multiple records and reports their inversion counts.""" for _ in range(read_value()): a = read_record() print(mergesort(a)) assert a == sorted(a), 'the list should be correctly sorted' if __name__ == '__main__': run()
def correct_natural_gas_pipeline_location(data): """Correct specific location in ecoinvent 3.3""" for ds in data: if (ds['type'] == 'transforming activity' and ds['name'] == 'transport, pipeline, long distance, natural gas' and ds['location'] == 'RER w/o DE+NL+NO'): ds['location'] = 'RER w/o DE+NL+NO+RU' return data
""" Aufgabe 3 von Blatt 1.2 """ myList = [0] * 5 for i, n in enumerate(myList): myList[i] = float(input(f"Die {i+1}. Zahl bitte: ")) print(myList) print(f"min: {min(myList)} at {myList.index(min(myList))}") print(f"max: {max(myList)} at {myList.index(max(myList))}") myList.sort() print("median", myList[2]) print("ungrade", sum(x % 2 != 0 for x in myList)) print("grade", sum(x % 2 == 0 for x in myList)) print("unterschiedlich", len(set(myList))) print("ganze Zahlen", sum(x % 1 == 0 for x in myList)) print("reele Zahlen ohne ganze Zahlen", sum(x % 1 != 0 for x in myList))
""" .. module: horseradish.constants :copyright: (c) 2018 by Netflix Inc. :license: Apache, see LICENSE for more details. """ SUCCESS_METRIC_STATUS = "success" FAILURE_METRIC_STATUS = "failure"
print("""<!DOCTYPE html> <html lang=\"en\"> <head> <meta charset=\"utf-8\"> <title>Hello!</title> </head> <body> """) for i in range(0, 10): print("How awesome is this!!!<br>") print(""" <h1>Hello world!</h1> <p>Hi from python!!</p> </body> </html> """)
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Model garden benchmark definitions.""" # tf-vision benchmarks IMAGE_CLASSIFICATION_BENCHMARKS = { 'image_classification.resnet50.tpu.4x4.bf16': dict( experiment_type='resnet_imagenet', platform='tpu.4x4', precision='bfloat16', metric_bounds=[{ 'name': 'accuracy', 'min_value': 0.76, 'max_value': 0.77 }], config_files=['official/vision/beta/configs/experiments/' 'image_classification/imagenet_resnet50_tpu.yaml']), 'image_classification.resnet50.gpu.8.fp16': dict( experiment_type='resnet_imagenet', platform='gpu.8', precision='float16', metric_bounds=[{ 'name': 'accuracy', 'min_value': 0.76, 'max_value': 0.77 }], config_files=['official/vision/beta/configs/experiments/' 'image_classification/imagenet_resnet50_gpu.yaml']) } VISION_BENCHMARKS = { 'image_classification': IMAGE_CLASSIFICATION_BENCHMARKS, } NLP_BENCHMARKS = { } QAT_BENCHMARKS = { }
class Problem: def __init__(self, inp): self.data = inp.read().strip().split("\n") @staticmethod def walk(keypad, position, instructions): MOVES = {"U": (0, -1), "R": (1, 0), "D": (0, 1), "L": (-1, 0)} for instruction in instructions: for letter in instruction: new_position = (position[0] + MOVES[letter][0], position[1] + MOVES[letter][1]) if new_position[0] < 0 or new_position[1] < 0: continue if new_position[0] >= len(keypad) or new_position[1] >= len(keypad): continue new_number = keypad[new_position[1]][new_position[0]] if new_number == "-": continue position = new_position yield keypad[position[1]][position[0]] def step1(self): keypad = [["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]] return ''.join(Problem.walk(keypad, (1, 1), self.data)) def step2(self): keypad = [["-", "-", "1", "-", "-"], ["-", "2", "3", "4", "-"], ["5", "6", "7", "8", "9"], ["-", "A", "B", "C", "-"], ["-", "-", "D", "-", "-"]] return ''.join(Problem.walk(keypad, (1, 1), self.data))
print('"Aumento"') print(':'*50) salario = float(input('Quanto recebe o funcionário? ')) novo_salario = salario+(salario*(15/100)) print('O novo salário dele é de R${}.'.format(novo_salario)) print(':'*50)
"""Cloning a LinkedList with random pointers: """ class Node: # Function to initialise the node object def __init__(self, data): self.data = data # Assign data self.next = None # Initialize next as null self.random = None class LinkedList: # Function to initialize head def __init__(self): self.head = None def print_list(self): temp = self.head while temp: print(temp.data, end=" -> ") temp = temp.next print("") """ One approach would be to create a hashmap of nodes and then create a new list based on their next and random Here: we introduce new nodes after existing nodes with same value, set the same random pointer and then extract""" def cloning_list(l_list): n_list = LinkedList() if l_list.head is None: return if l_list.head.next is None: n_list.head = Node(l_list.head.data) return curr_node = l_list.head # Step 1 is to add dummy nodes that will have the same randoms, next and values while curr_node: next_node = curr_node.next curr_node.next = Node(curr_node.data) curr_node.next.next = next_node curr_node = next_node # Step 2 is to assign the same random values curr_node = l_list.head while curr_node and curr_node.next: if curr_node.random is None: curr_node.next.random = None else: curr_node.next.random = curr_node.random.next curr_node = curr_node.next.next # Step 3 is to extract these nodes from this list repairing the original connections curr_node = l_list.head n_list.head = curr_node.next while curr_node: next_node = curr_node.next.next if next_node is None: curr_node.next.next = None else: curr_node.next.next = next_node.next curr_node.next = next_node curr_node = next_node return n_list def main(): l_list = LinkedList() l_list.head = Node(10) second = Node(5) third = Node(20) fourth = Node(15) fifth = Node(20) l_list.head.next = second l_list.head.random = third second.next = third # Link second node with the third node second.random = fourth third.next = fourth third.random = l_list.head fourth.next = fifth fourth.random = third fifth.random = fourth l_list2 = cloning_list(l_list) l_list2.print_list() l_list.print_list() if __name__ == '__main__': # Start with the empty list main()
""" https://leetcode-cn.com/explore/interview/card/top-interview-questions-easy/1/array/25/ 题目:只出现一次的数字 给定一个非空整数数组,除了某个元素只出现一次以外,其余每个元素均出现两次。找出那个只出现了一次的元素。 说明: 你的算法应该具有线性时间复杂度。 你可以不使用额外空间来实现吗? 示例 1: 输入: [2,2,1] 输出: 1 @author Niefy @date 2018-09-11 """ class SingleNumber: def singleNumber_1(self, nums): # 使用字典记录数字出现次数 """ :type nums: List[int] :rtype: int """ map = {} for x in nums: if x in map: map[x] = 2 else: map[x] = 1 for key in map.keys(): if map[key] == 1: return key return None def singleNumber_2(self, nums): # LeetCode最佳算法:去重求和*2-原数组求和 """ :type nums: List[int] :rtype: int """ return sum(set(nums))*2-sum(nums) # 测试代码 t = SingleNumber() nums = [2, 2, 1] #print(t.singleNumber(nums)) print(t.singleNumber_2(nums))
#!/usr/bin/env python3 names = ['Alice', 'Bob', 'Charlie'] print(', '.join(names))
def add(x, y): """Adds two numbers""" return x+y def subtract(x, y): """Subtracts two numbers""" return x-y
# Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def DFS(self, node): """ return x_0, x_1 x_0 = the maximal value if we do NOTvisit the current node x_1 = the maximal value if we visit the current node """ if node is None: return 0, 0 L0, L1 = self.DFS(node.left) R0, R1 = self.DFS(node.right) # WRONG cur_0 = max(L1, R1) cur_1 = max(L0, R0) + node.val # RIGHT cur_0 = max(L0, L1) + max(R0, R1) cur_1 = L0 + R0 + node.val return cur_0, cur_1 def rob(self, root: TreeNode) -> int: return max(self.DFS(root))
class Solution: def letterCombinations(self, digits: str) -> List[str]: if len(digits) == 0: return [] if '0' in digits or '1' in digits: return [] if ' ' in digits: return [char for char in 'nonnull-attribute'] digit2letter = {'2': 'abc', '3': 'def', '4': 'ghi', '5': 'jkl', '6': 'mno', '7': 'pqrs', '8': 'tuv', '9': 'wxyz', '1':'', '0':''} words = [digit2letter[digit] for digit in digits] out = [letter for letter in words[0]] for word in words[1:]: temp = [] for letter in word: for item in out: temp.append(item+letter) out = temp return out
#!/usr/bin/env python 3 # -*- coding: UTF-8 -*- karsilama= """ _____________________________________________________________________________________ S T R A T I F I E D S A M P L I N G P R O G R A M Version: (P).3.1 by Tülin (Otbiçer) ACAR \u00A9 2019 (P)arantez Education Research Consultancy and Publishing https://parantezanaliz.com & totbicer@gmail.com _____________________________________________________________________________________""" print(karsilama) def girdiler_al(mesaj:str) -> int: while True: girdi = input(mesaj) try: girdi = int(float(girdi)) except ValueError: print("You logged in incorrectly. You must enter a naturel number greater than zero.") girdi=1 continue if girdi<=0: print("You logged in incorrectly. You must enter a naturel number than zero.") else: alinan_veri = girdi break return alinan_veri def main(): evren = girdiler_al("1# The size of the universe defined and limited (N) : ") orneklem = girdiler_al("2# The sample size (Ss) : ") tabaka_sayisi = girdiler_al("3# Number of stratum (h) : ") N=int(evren) O=int(orneklem) tlar = [] for i in range(tabaka_sayisi): veri = girdiler_al("4# Enter the unit/observation number on the {}. stratum (Nh): ".format(i+1)) tlar.append(veri) if sum(tlar) != evren: print("\nError. Check the number of units / observations in the stratums, the size of the universe or the number of stratum. The number of the universe and the number of units in the stratums should be equal. \n\n") main() else: for sayi in tlar: print("\n Universe representation rate= {}, number of sample for stratum (Fh)= {}" .format(round((sayi/N),2), int((sayi/N)*O))) if __name__ == "__main__": main() a=input()
def zigZag_Fashion(array, length): flag = True for i in range(length - 1): if flag is True: if array[i] > array[i+1]: array[i],array[i+1] = array[i+1],array[i] else: if array[i] < array[i+1]: array[i],array[i+1] = array[i+1],array[i] flag = bool( 1 - flag ) print(array) arraySize = int(input("Enter Array Size:- " )) array=[] print("Enter Array Elements") for i in range(arraySize): array.append(int(input())) length = len(array) zigZag_Fashion(array, length)
class Solution: def reverse(self, x: int) -> int: x_str = str(abs(x)) reversed_str = x_str[::-1] int_max = (1 << 31) - 1 reversed_num = 0 for digit_str in reversed_str: digit = int(digit_str) if reversed_num > int_max // 10: return 0 if reversed_num == int_max // 10: if x < 0 and digit > 8: return 0 elif x > 0 and digit > 7: return 0 reversed_num *= 10 reversed_num += digit if x < 0: reversed_num *= -1 return reversed_num tests = [ ( (123,), 321, ), ( (-123,), -321, ), ( (120,), 21, ), ( (0,), 0, ), ]
class Solution: def countArrangement(self, n: int) -> int: self.ans = 0 self.fullArray(list(range(1, n + 1)), 0, n) return self.ans def fullArray(self, li, p, q): if p + 1 == q: if li[p] % (p + 1) == 0 or (p + 1) % li[p] == 0: self.ans += 1 for i in range(p, q): li[i], li[p] = li[p], li[i] if li[p] % (p + 1) == 0 or (p + 1) % li[p] == 0: self.fullArray(li, p + 1, q) li[i], li[p] = li[p], li[i]
# Exercice 1 : # Afficher un "Hello World" dans le terminal # Exercice 2 : # Modifier le code pour calculer la moyenne des notes note_maths = 15 note_francais = 12 note_histoire_geo = 9 moyenne = 0 print('La moyenne est de '+str(moyenne)+' / 20.') # Exercice 3 : """ Avec une boucle FOR, affichez 15 fois "J'adore le Python" avec le numéro de la ligne à coté """ # Exercice 4 : """ Imaginons : on a un budget de 1500€ et on souhaite acheter un produit à 1800€. Afficher si le budget le permet en le vérifiant avec une condition IF """ budget = 1500 produit = 1800 # Exercice 5 : #Afficher le 3ème élément de cette liste fruits = ['papaye', 'mangue', 'litchi', 'kaki', 'avocat'] # Exercice 6 : """ Compléter la fonction qui permet de convertir des euros en dollars pour un prix donné """ """ A décommenter pour réaliser l'exercice def converDollar(prixEnEuros): return prixEnDollar euros = 20 print(converDollar(euros)) """
def moeda(valor, tipo='R$'): valor = float(valor) valor = f'{tipo}{valor:0.2f}' valor = valor.replace('.', ',') return valor def aumentar(valor, pct, fmt=False): valor = float(valor) pct /= 100 valor *= (1+pct) if fmt is True: valor = moeda(valor) return valor def diminuir(valor, pct, fmt=False): valor = float(valor) pct /= 100 valor *= (1-pct) if fmt is True: valor = moeda(valor) return valor def dobro(valor, fmt=False): valor = float(valor) valor *= 2 if fmt is True: valor = moeda(valor) return valor def metade(valor, fmt=False): valor = float(valor) valor /= 2 if fmt is True: valor = moeda(valor) return valor def resumo(valor, pct_aumento, pct_reducao, currency='R$'): print('-'*30) print(f'{"RESUMO DO VALOR":^30}') print('-'*30) print(f'''Preço analisado: {moeda(valor, currency)} Dobro do preço: {dobro(valor,True)} Metade do preço: {metade(valor, True)} {pct_aumento}% de aumento: {aumentar(valor, pct_aumento, True)} {pct_reducao}% de reducao: {diminuir(valor, pct_reducao, True)}''') print('-'*30)
src = Split(''' yloop.c local_event.c ''') component = aos_component('yloop', src) component.add_comp_deps('utility/log', 'kernel/vfs') component.add_global_macros('AOS_LOOP') if aos_global_config.compiler == 'armcc': component.add_prebuilt_objs('local_event.o') elif aos_global_config.compiler == 'rvct': component.add_prebuilt_objs('local_event.o')
def flatten(iterable): flatten_iterable = [] for elem in iterable: if elem is not None : if type(elem) is list: flatten_iterable.extend(flatten(elem)) else: flatten_iterable.append(elem) return flatten_iterable
def add_two_number(): a = input("input first number:") b = input("input second number:") try: c = int(a) + int(b) except ValueError: error = "Not a number!" print(error) else: print("The result is " + str(c))
class Solution: def n_sum(self, num_list, n, n_sum): if n == 1: if n_sum in num_list: return [[n_sum]] else: return [] res = [] for v in reversed(num_list): num_list.pop(0) new_list = num_list.copy() for r in self.n_sum(new_list, n - 1, n_sum - v): res.append([v] + r) return res print(Solution().n_sum([1, 2, 3, 6, 5, 7, 4], 3, 10))
"""Utils""" def _impl(ctx): ctx.actions.run_shell( inputs = ctx.files.srcs, outputs = [ctx.outputs.executable], command = "\n".join(["echo echo $(realpath \"%s\") >> %s" % (f.path, ctx.outputs.executable.path) for f in ctx.files.srcs]), execution_requirements = { "no-sandbox": "1", "no-cache": "1", "no-remote": "1", "local": "1", }, ) echo_full_path = rule( implementation=_impl, executable=True, attrs={ "srcs": attr.label_list(allow_files=True), } )
N, Z, W = map(int, input().split()) a_list = [i for i in map(int, input().split())] if N == 1: print(abs(W-a_list[0])) exit() max_a = max(a_list) print(max(abs(a_list[-1]-W), abs(a_list[-2]-a_list[-1])))
n = int(input()) ans = [] n -= 1 while True: x = n%26 n //= 26 ans.append(chr(x+97)) if n == 0: break n -= 1 ans.reverse() print(''.join(ans))
class PromiscuityTransferLearningConfiguration(): def __init__(self, input_model_path, output_model_path, training_smiles_path, test_smiles_path, promiscuous_smiles_path, nonpromiscuous_smiles_path, save_every_n_epochs=1, batch_size=128, clip_gradient_norm=1., num_epochs=10, starting_epoch=1, shuffle_each_epoch=True, collect_stats_frequency=1, adaptive_lr_config=None, standardize=True, randomize=False): self.input_model_path = input_model_path self.output_model_path = output_model_path self.training_smiles_path = training_smiles_path self.test_smiles_path = test_smiles_path self.promiscuous_smiles_path = promiscuous_smiles_path self.nonpromiscuous_smiles_path = nonpromiscuous_smiles_path self.save_every_n_epochs = max(0, save_every_n_epochs) self.batch_size = max(0, batch_size) self.clip_gradient_norm = max(0.0, clip_gradient_norm) self.num_epochs = max(num_epochs, 1) self.starting_epoch = max(starting_epoch, 1) self.shuffle_each_epoch = shuffle_each_epoch self.collect_stats_frequency = collect_stats_frequency self.adaptive_lr_config = adaptive_lr_config self.standardize = standardize self.randomize = randomize
artifact_db = \ { 'adamantium': { 'level': 40, 'name': 'Adamantium', 'origin': 'Quest', 'tier': 3}, 'ancient-essence': { 'level': 42, 'name': 'Ancient Essence', 'origin': 'Quest', 'tier': 3}, 'burning-ember': { 'level': 8, 'name': 'Burning Ember', 'origin': 'Quest', 'tier': 1}, 'dark-energy': { 'level': 34, 'name': 'Dark Energy', 'origin': 'Quest', 'tier': 3}, 'demon-heart': { 'level': 32, 'name': 'Demon Heart', 'origin': 'Quest', 'tier': 3}, 'dragon-scale': { 'level': 38, 'name': 'Dragon Scale', 'origin': 'Quest', 'tier': 3}, 'elven-dew': { 'level': 3, 'name': 'Elven Dew', 'origin': 'Quest', 'tier': 1}, 'frostfire-crystal': { 'level': 44, 'name': 'Frostfire Crystal', 'origin': 'Quest', 'tier': 3}, 'frozen-core': { 'level': 18, 'name': 'Frozen Core', 'origin': 'Quest', 'tier': 2}, 'golden-thread': { 'level': 30, 'name': 'Golden Thread', 'origin': 'Quest', 'tier': 2}, 'iron-carapace': { 'level': 14, 'name': 'Iron Carapace', 'origin': 'Quest', 'tier': 1}, 'iron-wood': { 'level': 6, 'name': 'Iron Wood', 'origin': 'Quest', 'tier': 1}, 'liquid-fire': { 'level': 22, 'name': 'Liquid Fire', 'origin': 'Quest', 'tier': 2}, 'moon-shard': { 'level': 12, 'name': 'Moon Shard', 'origin': 'Quest', 'tier': 1}, 'obsidian-coral': { 'level': 46, 'name': 'Obsidian Coral', 'origin': 'Quest', 'tier': 3}, 'phoenix-feather': { 'level': 28, 'name': 'Phoenix Feather', 'origin': 'Quest', 'tier': 2}, 'primal-horn': { 'level': 50, 'name': 'Primal Horn', 'origin': 'City Raid', 'tier': 0}, 'rainbow-dust': { 'level': 10, 'name': 'Rainbow Dust', 'origin': 'Quest', 'tier': 1}, 'royal-bone': { 'level': 20, 'name': 'Royal Bone', 'origin': 'Quest', 'tier': 2}, 'shard-of-gaia': { 'level': 48, 'name': 'Shard Of Gaia', 'origin': 'City Raid', 'tier': 0}, 'shiny-gem': { 'level': 2, 'name': 'Shiny Gem', 'origin': 'Quest', 'tier': 1}, 'silver-steel': { 'level': 26, 'name': 'Silver Steel', 'origin': 'Quest', 'tier': 2}, 'sun-tear': { 'level': 36, 'name': 'Sun Tear', 'origin': 'Quest', 'tier': 3}, 'viper-essence': { 'level': 4, 'name': 'Viper Essence', 'origin': 'Quest', 'tier': 1}, 'wyvern-wing': { 'level': 16, 'name': 'Wyvern Wing', 'origin': 'Quest', 'tier': 1}, 'yggdrasil-leaf': { 'level': 24, 'name': 'Yggdrasil Leaf', 'origin': 'Quest', 'tier': 2}}
''' Voy a tratar de atrapar diferentes errores con try except. El try captura un error especifico en el ejemplo un Type Error y retorna un mensaje predeterminado. Try solo funciona con Type Errrors. ''' def palindrome(word): if word == word[::-1]: return print(f'{word} es un Palindromo') palindrome('ana') try: #palindrome(1) # TypeError: 'int' object is not subscriptable palindrome("ana") except TypeError: print('Solo es posible ingresar strings') else: print('Todo está bien') finally: print('Se ejecutó todo')
LOAD_DEMANDS = None NUM_EPISODES = 1 NUM_K_PATHS = 1 NUM_CHANNELS = 1 NUM_DEMANDS = 10 MIN_FLOW_SIZE = 1 # 1 MAX_FLOW_SIZE = 100 # 100 MIN_NUM_OPS = 50 # 50 10 10 MAX_NUM_OPS = 200 # 200 7000 1000 C = 1.5 # 0.475 1.5 MIN_INTERARRIVAL = 1 MAX_INTERARRIVAL = 1e8 SLOT_SIZE = 1e3 # 0.2 MAX_FLOWS = 4 # None MAX_TIME = 10e3 # None ENDPOINT_LABEL = 'server' ENDPOINT_LABELS = [ENDPOINT_LABEL+'_'+str(ep) for ep in range(12)] # ENDPOINT_LABELS = None PATH_FIGURES = '../figures/' PATH_PICKLES = '../pickles/demand/tf_graphs/real/' print('Demand config file imported.') if ENDPOINT_LABELS is None: print('Warning: ENDPOINTS left as None. Will need to provide own networkx \ graph with correct labelling. To avoid this, specify list of endpoint \ labels in config.py')
# Copyright (c) 2017 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # Stub module containing the networking_cisco trunk APIs. # # TODO(rcurran): Remove once networking_cisco is no longer supporting # stable/newton. TRUNK_SUBPORT_OWNER = "" VLAN = "" ACTIVE_STATUS = "" class SubPort(object): @classmethod def get_object(cls, context, *args): return None class TrunkObject(object): @classmethod def update(cls, **kargs): pass class Trunk(object): @classmethod def get_object(cls, context, **kargs): return TrunkObject class DriverBase(object): def __init__(self, name, interfaces, segmentation_types, agent_type=None, can_trunk_bound_port=False): pass
class Matrix (object): def __init__ (self, rows, cols, array=None): super (Matrix, self).__init__ () length = rows * cols self.rows = rows self.cols = cols if array: if length != len (array): raise RuntimeError ("Bad Dimensions") self.array = array else: self.array = [] for i in range (length): self.array.append (0) diag = min (rows, cols) for i in range (diag): self.set (1.0, i, i) def index (self, i, j): element = (i * self.cols) + j if element >= len (self.array): raise RuntimeError ('Out of Bounds') return element def get (self, i, j): return self.array [self.index (i, j)] def set (self, entry, i, j): self.array [self.index (i, j)] = entry """def __getattr__ (self, key): if key == 'x': return self.get (0, 0) elif key == 'y': return self.get (1, 0) else: raise AttributeError ('No such attribute')""" def __setattr__ (self, key, value): if key == 'x': self.set (value, 0, 0) elif key == 'y': self.set (value, 1, 0) else: super (Matrix, self).__setattr__ (key, value) def __str__ (self): output = [] for i in range (self.rows): out = [] for j in range (self.cols): out.append (str (self.get (i, j))) output.append (' '.join (out)) return '\n'.join (output) def __neg__ (self): negative = [] for element in self.array: negative.append (-element) return Matrix (self.rows, self.cols, negative) def __isub__ (self, ob): #ob = -ob self.array = (self + (-ob)).array return self def __sub__ (self, ob): return (self + (-ob)) def __iadd__ (self, ob): if isinstance (ob, Matrix): summation = self.matrixAddition (ob) else: summation = self.scalarAddition (ob) self.array = summation return self def __add__ (self, ob): if isinstance (ob, Matrix): summation = self.matrixAddition (ob) else: summation = self.scalarAddition (ob) return Matrix (self.rows, self.cols, summation) def matrixAddition (self, matrix): if self.rows != matrix.rows or self.cols != matrix.cols: raise RuntimeError ('Mismatched Dimensions') summation = [] for a, b in zip (self.array, matrix.array): summation.append (a + b) return summation def scalarAddition (self, scalar): summation = [] for element in self.array: summation.append (element * scalar) return summation def __imul__ (self, ob): raise RuntimeError ('Unsafe Operation') def __mul__ (self, ob): if isinstance (ob, Matrix): return self.matrixMultiplication (ob) else: return self.scalarMultiplication (ob) def matrixMultiplication (self, matrix): if self.cols != matrix.rows: raise RuntimeError ("Mismatched Dimensions") product = Matrix (self.rows, matrix.cols) for i in range (self.rows): for j in range (matrix.cols): total = 0 for k in range (self.cols): total += self.get (i, k) * matrix.get (k, j) product.set (total, i, j) return product def scalarMultiplication (self, scalar): product = [] for element in self.array: product.append (element * scalar) return Matrix (self.rows, self.cols, product) def vector (self): if self.rows != 1: raise RuntimeError ('Cannot be cast to vector: Bad row dim') if self.cols != 3: raise RuntimeError ('Cannot be cast to vector: Bad col dim') x = self.get (0, 0) y = self.get (1, 0) w = self.get (2, 0) v = Vector (x, y) if w != 0: v.x /= w v.y /= w return v def identity (rows): sqr = pow (rows, 2) ### Temp ### Should default to all 0s later array = [] for i in range (sqr): array.append (0) ### End Temp m = Matrix (rows, rows, array) for i in range (rows): m.set (1, i, i) return m class Vector: def __init__ (self, x, y): self.x = x self.y = y def matrix (self): return Matrix (3, 1, [self.x, self.y, 1.0]) def __add__ (self, v): return Vector (self.x + v.x, self.y + v.y) def __iadd__ (self, v): self.x += v.x self.y += v.y return self def __sub__ (self, v): return Vector (self.x - v.x, self.y - v.y) def __mul__ (self, scalar): return Vector (self.x * scalar, self.y * scalar) def __imul__ (self, scalar): self.x *= scalar self.y *= scalar def __str__ (self): return str(self.x) + ' ' + str(self.y) def matrix (self, dir = False): if dir: dir = 0 else: dir = 1 return Matrix (3, 1, [self.x, self.y, dir]) """class VStruct: def __init__ (self, x, y): self.x = x self.y = y""" #class Vector2D (Matrix): # def __init__ (self, x, y): # super (Vector2D, self).__init__ (3, 1, [x, y, 1]) # # def __getattr__ (self, key): # if key == 'x': # return self.get (0, 0) # elif key == 'y': # return self.get (1, 0) # else: # raise AttributeError ('No such attribute') """class Vector: def __init__ (self, x, y): self.x = x self.y = y def matrix (self): return Matrix (3, 1, [self.x, self.y, 1.0]) def __add__ (self, v): return Vector (self.x + v.x, self.y + v.y) def __iadd__ (self, v): self.x += v.x self.y += v.y return self def __sub__ (self, v): return Vector (self.x - v.x, self.y - v.y) def __mul__ (self, scalar): return Vector (self.x * scalar, self.y * scalar) def __imul__ (self, scalar): self.x *= scalar self.y *= scalar def __str__ (self): return str(self.x) + ' ' + str(self.y)"""
# Image/video streams PATH_IMAGE_SNAPSHOT = '/img/snapshot.cgi' PATH_IMAGE_MJPEG = '/img/video.mjpeg' PATH_IMAGE_RTSP = '/img/media.sav' # PTZ Control PATH_PAN_TILT = '/pt/ptctrl.cgi' PARAM_PAN_TILT_DIRECTIONS = ('U', 'D', 'L', 'R', 'UL', 'UR', 'DL', 'DR') # Configuration Groups PATH_GET_GROUP = '/adm/get_group.cgi' PATH_SET_GROUP = '/adm/set_group.cgi' # System info PATH_INFO_STATUS = '/util/query.cgi?extension=yes' PATH_INFO_VERSIONS = '/adm/sysinfo.cgi' # Telnetd backdoor PATH_TELNETD = '/adm/file.cgi?todo=inject_telnetd' USER_TELNETD = 'root' PASS_TELNETD = 'Aq0+0009' # Possible event triggers EVENT_TRIGGERS = ['in1', 'in2', 'mt', 'pir', 'httpc', 'audio']
####################################### # Computes the proper motion distance # ####################################### def PropMotion(M1,L1,K1,function,p): if p == 1: file = open(function+'_'+str(M1)+'_'+str(L1)+'.txt','wt') PropD = [] x =[] a=0 if (L1 == 0.0): for z in drange(0,5,0.1): x.append(z) PropD.append(2.0*(2.0-M1*(1.0-z)-(2.0-M1)*math.sqrt(1.0+M1*z))/(math.pow(M1,2)*(1.0+z))) if p ==1: file.writelines(str(z)+" "+str(PropD[a])+"\n") a+=1 plot(x,PropD) else: args = (M1,L1,K1) for z in drange(0,5,0.1): x.append(z) result, err = integrate.quad(E_z,0,z,args) PropD.append(result) if p ==1: file.writelines(str(z)+" "+str(result)+"\n") plot(x,PropD) if p ==1: file.close ylabel('Proper Motion Distance $D_m/D_h$') xlabel('Redshift z') if p!= 1: show()
# ''' # https://practice.geeksforgeeks.org/problems/next-larger-element/0 # ''' # x = [8,7,3,2,4,9,5,4,6] # i = len(x)-1 # stack = [] # ans = [None] * len(x) # def isempty(st): # if len(st) == 0: # return True # else: # return False # while(i>=0): # if not isempty(stack): # top = stack[-1] # prev = x[i] # while(len(stack) > 0 and top<=prev): # stack.pop() # if(isempty(stack)): # break # top = stack[-1] # if(isempty(stack)): # ans[i] = -1 # else: # ans[i] = stack[-1] # stack.append(x[i]) # i -= 1 # print (ans) def isempty(s): if len(s) == 0: return True else: return False def getsolution(x): i = len(x)-1 stack = [] solution = [None]*len(x) while(i>=0): if not len(stack) == 0: top = stack[-1] prev = x[i] while(len(stack)>0 and top<=prev): stack.pop() if len(stack) == 0: break top = stack[-1] if len(stack) == 0: solution[i] = -1 else: solution[i] = stack[-1] stack.append(x[i]) i -= 1 return solution # return solution t = int(input()) while(t !=0): N = int(input()) x = list(map(int,input().strip(' ').split(' '))) solution = getsolution(x) print (*solution) t = t-1
def areYouPlayingBanjo(name): # Implement me! if (name.startswith("R") |name.startswith("r") ): return name + " "+"plays banjo" else: return name +" "+ "does not play banjo" # return name def areYouPlayingBanjo2(name): return name + (' plays' if name[0].lower() == 'r' else ' does not play') + " banjo";
''' Auteur : Cantin L. Site web : https://itliocorp.fr Version : 0.2 License : MIT 3.0 Sujet : Afficher Hello World en python Notions : Variable, Types de variable, Afficher une variable, Fonction, Commentaires Fonction à utiliser : type(...) print(...) def ...(): if (): ''' def main() : a =("Hello World") print(type(a)) print(a) if (__name__ == '__main__'): main()
class settings: DATABASE = { 'test': { 'url': 'postgresql://admin:password@localhost:5432/test' } }
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Grad op is not registered for Ops in EMPTY_GRAD_OP_LIST, so check grad # will not be required. EMPTY_GRAD_OP_LIST = [ 'fill_zeros_like2', 'gaussian_random_batch_size_like', 'fill_constant_batch_size_like', 'iou_similarity', 'where', 'uniform_random_batch_size_like', 'box_coder', 'equal', 'greater_equal', 'greater_than', 'less_equal', 'sequence_enumerate', 'logical_and', 'logical_not', 'logical_or', 'logical_xor', 'unique', 'fusion_seqconv_eltadd_relu', 'prior_box', 'decayed_adagrad', 'crf_decoding', 'mine_hard_examples', 'fusion_seqpool_concat', 'fused_embedding_fc_lstm', 'top_k', 'uniform_random', 'multihead_matmul', 'edit_distance', 'shard_index', 'generate_proposals', 'density_prior_box', 'round', 'floor', 'ceil', 'precision_recall', 'proximal_adagrad', 'cast', 'isinf', 'isfinite', 'isnan', 'fill_constant', 'fusion_seqpool_cvm_concat', 'accuracy', 'fc', 'sgd', 'anchor_generator', 'fake_channel_wise_quantize_abs_max', 'fake_quantize_dequantize_moving_average_abs_max', 'fake_quantize_abs_max', 'fake_quantize_range_abs_max', 'moving_average_abs_max_scale', 'fake_quantize_moving_average_abs_max', 'fill_any_like', 'one_hot', 'gather_tree', 'lookup_sparse_table', 'lamb', 'fusion_squared_mat_sub', 'range', 'box_decoder_and_assign', 'one_hot_v2', 'shape', 'fusion_transpose_flatten_concat', 'lars_momentum', 'momentum', 'fusion_lstm', 'assign_value', 'polygon_box_transform', 'retinanet_detection_output', 'generate_proposal_labels', 'ctc_align', 'sequence_erase', 'fake_channel_wise_dequantize_max_abs', 'fake_dequantize_max_abs', 'generate_mask_labels', 'elementwise_floordiv', 'sum', 'ftrl', 'fusion_repeated_fc_relu', 'size', 'bipartite_match', 'elementwise_mod', 'multiclass_nms2', 'multiclass_nms', 'fill_zeros_like', 'adadelta', 'conv2d_fusion', 'adamax', 'sampling_id', 'dpsgd', 'target_assign', 'random_crop', 'mean_iou', 'reduce_all', 'reduce_any', 'attention_lstm', 'fusion_seqexpand_concat_fc', 'dequantize_abs_max', 'clip_by_norm', 'diag', 'yolo_box', 'adam', 'fusion_gru', 'locality_aware_nms', 'ref_by_trainer_id', 'linspace', 'box_clip', 'similarity_focus', 'detection_map', 'sequence_mask', 'coalesce_tensor', 'arg_min', 'arg_max', 'split_ids', 'adagrad', 'fill', 'argsort', 'dequantize', 'merge_ids', 'fused_fc_elementwise_layernorm', 'retinanet_target_assign', 'rpn_target_assign', 'requantize', 'distribute_fpn_proposals', 'auc', 'quantize', 'positive_negative_pair', 'hash', 'less_than', 'not_equal', 'eye', 'chunk_eval', 'is_empty', 'proximal_gd', 'collect_fpn_proposals', 'unique_with_counts', 'seed' ]
""" Given a sorted array of n distinct integers where each integer is in the range from 0 to m-1 and m > n. Find the smallest number that is missing from the array. """ def smallest_missing(arr: list) -> int: """ A modified version of binary search can be applied. If the number mid index == value, then the missing value is on the right, else on the left side. Time Complexity: O(log(n)) """ beg, end = 0, len(arr) - 1 while beg <= end: if arr[beg] != beg: return beg m = (beg + end) >> 1 if arr[m] == m: beg = m + 1 else: end = m - 1 return end + 1 if __name__ == "__main__": print(smallest_missing([])) print(smallest_missing([0])) print(smallest_missing([0, 1, 2, 3, 4, 5, 6, 7, 9, 10])) print(smallest_missing([0, 2, 3, 4, 5, 6, 7, 8, 9, 10])) print(smallest_missing([0, 1, 3, 4, 5, 6, 7, 8, 9, 10])) print(smallest_missing([0, 1, 2, 3, 5, 6, 7, 8, 9, 10]))
# Chest in the Lord Pirate PQ LORD_PIRATE_ENRAGED_KRU = 9300115 LORD_PIRATE_ENRAGED_CAPTAIN = 9300116 reactor.incHitCount() if reactor.getHitCount() >= 1: i = 1 while i < 5: sm.spawnMob(LORD_PIRATE_ENRAGED_KRU, sm.getPosition(objectID).getX(), sm.getPosition(objectID).getY(), False) sm.spawnMob(LORD_PIRATE_ENRAGED_CAPTAIN, sm.getPosition(objectID).getX(), sm.getPosition(objectID).getY(), False) i += 1 sm.removeReactor() sm.dispose()
# %% [markdown] # # 8 - Collections # %% [markdown] # #### 1 - Lists # %% # Declare and assign the names names = ["John", "Paul", "George"] # Print the list of names print(names) # Add a new name names.append("Jane") # Declare and ass the scores numbers = [100, 80, 90] # Print the scores print(numbers) # Add a new score numbers.append(70) # Create a list of numbers and names my_list = [100, 90, 80, "John", "Jane"] # Print my_list print(my_list) # Add a new name my_list.append("Paul") # Add a new number my_list.append(70) # Print my_list print(my_list) # sorting a list will not work if the list contains more than 1 type of data #my_list.sort() numbers = numbers.sort() print(numbers) names.sort() print(names) # %% [markdown] # #### 2 - Arrays # # Arrays can only contain one type of data # %% # Declare and create an array of numbers numbers = [2, 6, 5, 4, 3] # Print numbers print(numbers) # Add a new number numbers.append(1) # Print numbers print(numbers) # Declare and assign the names names = ["John", "Paul", "George"] # Insert a new value in the list names.insert(1, "Pauline") # Insert Pauline at index 1 and move the others to the right print(names) # Get the length of the list print(len(names)) # %% [markdown] # #### 3 - Common operations # %% # Declare and create an array of numbers numbers = [2, 6, 5, 4, 3] # Sort the numbers and save it in the same variable print(sorted(numbers)) numbers.sort(reverse=False) print(numbers) # print number at index 1 print(numbers[1]) # Print a range of numbers print(numbers[1:3]) print(numbers[:3]) print(numbers[1:]) # %% [markdown] # #### 4 - Dictionaries # %% # Create a person dictionary person = { "first_name": "John", "last_name": "Doe", "age": 30, "city": "Beirut", "country": "Lebabon" } # Print the first name of the person print(person["first_name"]) # %% # Tuples # Tuples are immutable # Once assigned they cannot be changed my_tuple = ("John", "Paul", 2) print(my_tuple) # %%
#Classe de Parâmetros do Algoritmo Label Propagation. class ParametersLabelPropagation: def __init__(self, max_iterations): self.max_iterations = max_iterations #Classe de Parâmetros do Algoritmo Asynchronous Label Propagation. class ParametersAsynchronousLabelPropagation: def __init__(self, weight, seed, max_iterations): self.weight = weight self.seed = seed self.max_iterations = max_iterations #Classe de Parâmetros do Algoritmo Greedy Modularity. class ParametersGreedyModularity: def __init__(self, weight, max_iterations): self.weight = weight self.max_iterations = max_iterations #Classe de Parâmetros do Algoritmo Girvan Newman. class ParametersGirvanNewman: def __init__(self, most_valuable_edge, max_iterations): self.most_valuable_edge = most_valuable_edge self.max_iterations = max_iterations class ParametersEdgeBetweennessCentrality: def __init__(self, normalized, weight, max_iterations): self.normalized = normalized self.weight = weight self.max_iterations = max_iterations #Classe de Parâmetros do Algoritmo gerador da rede KNN. class ParametersKNNNetwork: def __init__(self, proximity_measure, number_of_neighbours): self.proximity_measure = proximity_measure self.number_of_neighbours = number_of_neighbours
# * -- utf-8 -- * # python3 # Author: Tang Time:2018/4/17 '''简述:要求输入某年某月某日 提问:求判断输入日期是当年中的第几天?''' year = int(input('请输入年份:')) month = int(input('请输入月份:')) day = int(input('请输入日期:')) if day >31: print ('请正确输入') if month > 12: print('请正确输入') list1 = [31,59,90,130,151,181,212,243,273,304,334] if (year % 4) == 0 or (year % 100) == 0 or (year % 400) == 0 and month >= 2: data = list1[month - 2] + day +1 if month == 1: data = day if month == 2: data = 31 + day print("这一天是这一年第"+str(data)+"天")
class MarathonError(Exception): pass class MarathonHttpError(MarathonError): def __init__(self, response): """ :param :class:`requests.Response` response: HTTP response """ content = response.json() self.status_code = response.status_code self.error_message = content.get('message') super(MarathonHttpError, self).__init__(self.__str__()) def __repr__(self): return 'MarathonHttpError: HTTP %s returned with message, "%s"' % \ (self.status_code, self.error_message) def __str__(self): return self.__repr__() class NotFoundError(MarathonHttpError): pass class InternalServerError(MarathonHttpError): pass class InvalidChoiceError(MarathonError): def __init__(self, param, value, options): super(InvalidChoiceError, self).__init__( 'Invalid choice "{value}" for param "{param}". Must be one of {options}'.format( param=param, value=value, options=options ) )
"""Utils for photos_time_warp""" def pluralize(count, singular, plural): """Return singular or plural based on count""" if count == 1: return singular else: return plural def noop(*args, **kwargs): """No-op function for use as verbose if verbose not set""" pass def red(msg: str) -> str: """Return red string in rich markdown""" return f"[red]{msg}[/red]" def green(msg: str) -> str: """Return green string in rich markdown""" return f"[green]{msg}[/green]"
class NLPData(object): def __init__(self, sentences): """ :type sentences: list[str] """ self.__sentences = sentences @property def sentences(self): return self.__sentences
getObject = { 'id': 37401, 'memoryCapacity': 242, 'modifyDate': '', 'name': 'test-dedicated', 'diskCapacity': 1200, 'createDate': '2017-10-16T12:50:23-05:00', 'cpuCount': 56, 'accountId': 1199911 } getAvailableRouters = [ {'hostname': 'bcr01a.dal05', 'id': 12345}, {'hostname': 'bcr02a.dal05', 'id': 12346}, {'hostname': 'bcr03a.dal05', 'id': 12347}, {'hostname': 'bcr04a.dal05', 'id': 12348} ] getObjectById = { 'datacenter': { 'id': 12345, 'name': 'dal05', 'longName': 'Dallas 5' }, 'memoryCapacity': 242, 'modifyDate': '2017-11-06T11:38:20-06:00', 'name': 'test-dedicated', 'diskCapacity': 1200, 'backendRouter': { 'domain': 'test.com', 'hostname': 'bcr01a.dal05', 'id': 12345 }, 'guestCount': 1, 'cpuCount': 56, 'guests': [{ 'domain': 'test.com', 'hostname': 'test-dedicated', 'id': 12345, 'uuid': 'F9329795-4220-4B0A-B970-C86B950667FA' }], 'billingItem': { 'nextInvoiceTotalRecurringAmount': 1515.556, 'orderItem': { 'id': 12345, 'order': { 'status': 'APPROVED', 'privateCloudOrderFlag': False, 'modifyDate': '2017-11-02T11:42:50-07:00', 'orderQuoteId': '', 'userRecordId': 12345, 'createDate': '2017-11-02T11:40:56-07:00', 'impersonatingUserRecordId': '', 'orderTypeId': 7, 'presaleEventId': '', 'userRecord': { 'username': 'test-dedicated' }, 'id': 12345, 'accountId': 12345 } }, 'id': 12345, 'children': [ { 'nextInvoiceTotalRecurringAmount': 0.0, 'categoryCode': 'dedicated_host_ram' }, { 'nextInvoiceTotalRecurringAmount': 0.0, 'categoryCode': 'dedicated_host_disk' } ] }, 'id': 12345, 'createDate': '2017-11-02T11:40:56-07:00' } deleteObject = True getGuests = [{ 'id': 200, 'hostname': 'vs-test1', 'domain': 'test.sftlyr.ws', 'fullyQualifiedDomainName': 'vs-test1.test.sftlyr.ws', 'status': {'keyName': 'ACTIVE', 'name': 'Active'}, 'datacenter': {'id': 50, 'name': 'TEST00', 'description': 'Test Data Center'}, 'powerState': {'keyName': 'RUNNING', 'name': 'Running'}, 'maxCpu': 2, 'maxMemory': 1024, 'primaryIpAddress': '172.16.240.2', 'globalIdentifier': '1a2b3c-1701', 'primaryBackendIpAddress': '10.45.19.37', 'hourlyBillingFlag': False, 'billingItem': { 'id': 6327, 'recurringFee': 1.54, 'orderItem': { 'order': { 'userRecord': { 'username': 'chechu', } } } }, }, { 'id': 202, 'hostname': 'vs-test2', 'domain': 'test.sftlyr.ws', 'fullyQualifiedDomainName': 'vs-test2.test.sftlyr.ws', 'status': {'keyName': 'ACTIVE', 'name': 'Active'}, 'datacenter': {'id': 50, 'name': 'TEST00', 'description': 'Test Data Center'}, 'powerState': {'keyName': 'RUNNING', 'name': 'Running'}, 'maxCpu': 4, 'maxMemory': 4096, 'primaryIpAddress': '172.16.240.7', 'globalIdentifier': '05a8ac-6abf0', 'primaryBackendIpAddress': '10.45.19.35', 'hourlyBillingFlag': True, 'billingItem': { 'id': 6327, 'recurringFee': 1.54, 'orderItem': { 'order': { 'userRecord': { 'username': 'chechu', } } } } }]
class FileSystemAuditRule(AuditRule): """ Represents an abstraction of an access control entry (ACE) that defines an audit rule for a file or directory. This class cannot be inherited. FileSystemAuditRule(identity: IdentityReference,fileSystemRights: FileSystemRights,flags: AuditFlags) FileSystemAuditRule(identity: IdentityReference,fileSystemRights: FileSystemRights,inheritanceFlags: InheritanceFlags,propagationFlags: PropagationFlags,flags: AuditFlags) FileSystemAuditRule(identity: str,fileSystemRights: FileSystemRights,flags: AuditFlags) FileSystemAuditRule(identity: str,fileSystemRights: FileSystemRights,inheritanceFlags: InheritanceFlags,propagationFlags: PropagationFlags,flags: AuditFlags) """ @staticmethod def __new__(self,identity,fileSystemRights,*__args): """ __new__(cls: type,identity: IdentityReference,fileSystemRights: FileSystemRights,flags: AuditFlags) __new__(cls: type,identity: IdentityReference,fileSystemRights: FileSystemRights,inheritanceFlags: InheritanceFlags,propagationFlags: PropagationFlags,flags: AuditFlags) __new__(cls: type,identity: str,fileSystemRights: FileSystemRights,flags: AuditFlags) __new__(cls: type,identity: str,fileSystemRights: FileSystemRights,inheritanceFlags: InheritanceFlags,propagationFlags: PropagationFlags,flags: AuditFlags) """ pass AccessMask=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the access mask for this rule. """ FileSystemRights=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the System.Security.AccessControl.FileSystemRights flags associated with the current System.Security.AccessControl.FileSystemAuditRule object. Get: FileSystemRights(self: FileSystemAuditRule) -> FileSystemRights """
""" Small collection of custom objects. Sometimes used for their custom names only. """ class CouldNotLoadError(ResourceWarning): def __init__(self, *args, study_id=None): super(CouldNotLoadError, self).__init__(*args) self.study_id = study_id class ChannelNotFoundError(CouldNotLoadError): def __init__(self, *args, **kwargs): super(ChannelNotFoundError, self).__init__(*args, **kwargs) class H5ChannelRootError(KeyError): pass class H5VariableAttributesError(ValueError): pass class MissingHeaderFieldError(KeyError): pass class HeaderFieldTypeError(TypeError): pass class LengthZeroSignalError(ValueError): pass class NotLoadedError(ResourceWarning): pass class StripError(RuntimeError): pass class MarginError(ValueError): def __init__(self, *args, shift=None, **kwargs): super(MarginError, self).__init__(*args, **kwargs) self.shift = shift
# By using two pointer sum method to count if any 2 numbers in arr equals the given sum def check_sum(arr, n, sum): l = 0 r = n-1 count = 0 while l < r: cur_sum = arr[l] + arr[r] if cur_sum == sum: print(sum, arr[l], arr[r], end = ' ') count +=1 l+=1 elif cur_sum < sum: l+=1 else: r-=1 # print() return count def count_triplets(arr, n): count = 0 arr.sort() print('Triplets are :') for i in range(n-1, -1, -1): count += check_sum(arr[:i]+arr[(i+1):], n-1, arr[i]) print('Count is', end = ' ') return count if count > 0 else -1 if __name__ == "__main__": T = int(input()) for i in range(T): n = int(input()) arr = list(map(int, input().strip().split())) print(count_triplets(arr, n))
# # PySNMP MIB module WYSE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WYSE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:32:11 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ObjectIdentity, Counter64, Unsigned32, ModuleIdentity, Integer32, NotificationType, TimeTicks, Counter32, Gauge32, IpAddress, enterprises, MibIdentifier, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, iso = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Counter64", "Unsigned32", "ModuleIdentity", "Integer32", "NotificationType", "TimeTicks", "Counter32", "Gauge32", "IpAddress", "enterprises", "MibIdentifier", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "iso") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") wyse = MibIdentifier((1, 3, 6, 1, 4, 1, 714)) product = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1)) old = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 1)) thinClient = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2)) wysenet = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 1, 1)) wbt3 = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3)) wbt3Memory = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1)) wbt3PCCard = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2)) wbt3IODevice = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 3)) wbt3Display = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4)) wbt3DhcpInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5)) wbt3BuildInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6)) wbt3CustomFields = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 7)) wbt3Administration = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8)) wbt3TrapsInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9)) wbt3MibRev = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 10)) wbt3Network = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11)) wbt3Apps = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12)) wbt3Connections = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13)) wbt3Users = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14)) wbt3Ram = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1)) wbt3Rom = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2)) wbt3RamNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RamNum.setStatus('mandatory') wbt3RamTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1, 2), ) if mibBuilder.loadTexts: wbt3RamTable.setStatus('mandatory') wbt3RamEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3RamIndex")) if mibBuilder.loadTexts: wbt3RamEntry.setStatus('mandatory') wbt3RamIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RamIndex.setStatus('mandatory') wbt3RamType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("base", 1), ("video", 2), ("extend", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RamType.setStatus('mandatory') wbt3RamSize = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 1, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RamSize.setStatus('mandatory') wbt3RomNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RomNum.setStatus('mandatory') wbt3RomTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2, 2), ) if mibBuilder.loadTexts: wbt3RomTable.setStatus('mandatory') wbt3RomEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3RomIndex")) if mibBuilder.loadTexts: wbt3RomEntry.setStatus('mandatory') wbt3RomIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RomIndex.setStatus('mandatory') wbt3RomType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("boot", 1), ("os", 2), ("option", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RomType.setStatus('mandatory') wbt3RomSize = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 1, 2, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RomSize.setStatus('mandatory') wbt3PCCardNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3PCCardNum.setStatus('mandatory') wbt3PCCardTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2, 2), ) if mibBuilder.loadTexts: wbt3PCCardTable.setStatus('mandatory') wbt3PCCardEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3PCCardIndex")) if mibBuilder.loadTexts: wbt3PCCardEntry.setStatus('mandatory') wbt3PCCardIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3PCCardIndex.setStatus('mandatory') wbt3PCCardType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(256, 0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("empty", 256), ("multifunction", 0), ("memory", 1), ("serial-port-modem", 2), ("parallel-port", 3), ("fixed-disk", 4), ("video-adaptor", 5), ("lan-adapter", 6), ("aims", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3PCCardType.setStatus('mandatory') wbt3PCCardVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 2, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3PCCardVendor.setStatus('mandatory') wbt3IODevAttached = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3IODevAttached.setStatus('mandatory') wbt3kbLanguage = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24))).clone(namedValues=NamedValues(("english-us", 0), ("english-uk", 1), ("french", 2), ("german", 3), ("spanish", 4), ("italian", 5), ("swedish", 6), ("danish", 7), ("norwegian", 8), ("dutch", 9), ("belgian-french", 10), ("finnish", 11), ("swiss-french", 12), ("swiss-german", 13), ("japanese", 14), ("canadian-french", 15), ("belgian-dutch", 16), ("portuguese", 17), ("brazilian-abnt", 18), ("italian-142", 19), ("latin-american", 20), ("us-international", 21), ("canadian-fr-multi", 22), ("canadian-eng-multi", 23), ("spanish-variation", 24)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3kbLanguage.setStatus('mandatory') wbt3CharacterRepeatDelay = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(250, 500, 750, 1000))).clone(namedValues=NamedValues(("delay-250", 250), ("delay-500", 500), ("delay-750", 750), ("delay-1000", 1000)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3CharacterRepeatDelay.setStatus('mandatory') wbt3CharacterRepeatRate = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 3, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3CharacterRepeatRate.setStatus('mandatory') wbt3DispCharacteristic = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 1)) wbt3DispCapability = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 2)) wbt3EnergySaver = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("screensaver", 1), ("monitoroff", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3EnergySaver.setStatus('mandatory') wbt3ScreenTimeOut = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1440))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ScreenTimeOut.setStatus('mandatory') wbt3TouchScreen = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("com1", 1), ("com2", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TouchScreen.setStatus('mandatory') wbt3DispFreq = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3DispFreq.setStatus('mandatory') wbt3DispHorizPix = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3DispHorizPix.setStatus('mandatory') wbt3DispVertPix = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3DispVertPix.setStatus('mandatory') wbt3DispColor = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DispColor.setStatus('mandatory') wbt3DispUseDDC = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3DispUseDDC.setStatus('mandatory') wbt3DispFreqMax = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 256))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DispFreqMax.setStatus('mandatory') wbt3DispHorizPixMax = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DispHorizPixMax.setStatus('mandatory') wbt3DispVertPixMax = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 2, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DispVertPixMax.setStatus('mandatory') wbt3DispColorMax = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 4, 2, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DispColorMax.setStatus('mandatory') wbt3DhcpInfoNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DhcpInfoNum.setStatus('mandatory') wbt3DhcpInfoTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2), ) if mibBuilder.loadTexts: wbt3DhcpInfoTable.setStatus('mandatory') wbt3DHCPoptionIDs = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3)) wbt3DhcpInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3DhcpInfoIndex")) if mibBuilder.loadTexts: wbt3DhcpInfoEntry.setStatus('mandatory') wbt3DhcpInfoIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DhcpInfoIndex.setStatus('mandatory') wbt3InterfaceNum = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3InterfaceNum.setStatus('mandatory') wbt3ServerIP = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3ServerIP.setStatus('mandatory') wbt3Username = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3Username.setStatus('mandatory') wbt3Domain = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3Domain.setStatus('mandatory') wbt3Password = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("nopassword", 0), ("password", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3Password.setStatus('mandatory') wbt3CommandLine = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CommandLine.setStatus('mandatory') wbt3WorkingDir = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3WorkingDir.setStatus('mandatory') wbt3FileServer = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3FileServer.setStatus('mandatory') wbt3FileRootPath = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3FileRootPath.setStatus('mandatory') wbt3TrapServerList = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3TrapServerList.setStatus('mandatory') wbt3SetCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ignored", 0), ("provided", 1), ("notprovided", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3SetCommunity.setStatus('mandatory') wbt3RDPstartApp = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 13), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RDPstartApp.setStatus('mandatory') wbt3EmulationMode = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 14), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3EmulationMode.setStatus('mandatory') wbt3TerminalID = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 15), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3TerminalID.setStatus('mandatory') wbt3VirtualPortServer = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 2, 1, 16), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3VirtualPortServer.setStatus('mandatory') remoteServer = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: remoteServer.setStatus('mandatory') logonUserName = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: logonUserName.setStatus('mandatory') domain = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: domain.setStatus('mandatory') password = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: password.setStatus('mandatory') commandLine = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: commandLine.setStatus('mandatory') workingDirectory = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: workingDirectory.setStatus('mandatory') fTPFileServer = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fTPFileServer.setStatus('mandatory') fTPRootPath = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: fTPRootPath.setStatus('mandatory') trapServerList = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: trapServerList.setStatus('mandatory') setCommunity = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: setCommunity.setStatus('mandatory') rDPStartupApp = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rDPStartupApp.setStatus('mandatory') emulationMode = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: emulationMode.setStatus('mandatory') terminalID = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: terminalID.setStatus('mandatory') virtualPortServer = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 5, 3, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(128, 254))).setMaxAccess("readwrite") if mibBuilder.loadTexts: virtualPortServer.setStatus('mandatory') wbt3CurrentInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1)) wbt3DhcpUpdateInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2)) wbt3CurInfoNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurInfoNum.setStatus('mandatory') wbt3CurInfoTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2), ) if mibBuilder.loadTexts: wbt3CurInfoTable.setStatus('mandatory') wbt3CurInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3DhcpInfoIndex")) if mibBuilder.loadTexts: wbt3CurInfoEntry.setStatus('mandatory') wbt3CurInfoIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurInfoIndex.setStatus('mandatory') wbt3CurBuildNum = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurBuildNum.setStatus('mandatory') wbt3CurOEMBuildNum = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurOEMBuildNum.setStatus('mandatory') wbt3CurModBuildDate = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurModBuildDate.setStatus('mandatory') wbt3CurOEM = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurOEM.setStatus('mandatory') wbt3CurHWPlatform = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurHWPlatform.setStatus('mandatory') wbt3CurOS = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 1, 2, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3CurOS.setStatus('mandatory') wbt3DUpInfoNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DUpInfoNum.setStatus('mandatory') wbt3DUpInfoTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2), ) if mibBuilder.loadTexts: wbt3DUpInfoTable.setStatus('mandatory') wbt3DUpInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3DUpInfoIndex")) if mibBuilder.loadTexts: wbt3DUpInfoEntry.setStatus('mandatory') wbt3DUpInfoIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DUpInfoIndex.setStatus('mandatory') wbt3DUpBuildNum = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DUpBuildNum.setStatus('mandatory') wbt3DUpOEMBuildNum = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DUpOEMBuildNum.setStatus('mandatory') wbt3DUpModBuildDate = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DUpModBuildDate.setStatus('mandatory') wbt3DUpOEMBuildDate = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 6, 2, 2, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3DUpOEMBuildDate.setStatus('mandatory') wbt3CustomField1 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 7, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3CustomField1.setStatus('mandatory') wbt3CustomField2 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 7, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3CustomField2.setStatus('mandatory') wbt3CustomField3 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 7, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3CustomField3.setStatus('mandatory') wbt3UpDnLoad = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1)) wbt3Action = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 2)) wbt3FTPsetting = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3)) wbt3SNMPupdate = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3SNMPupdate.setStatus('mandatory') wbt3DHCPupdate = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3DHCPupdate.setStatus('mandatory') wbt3UpDnLoadNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadNum.setStatus('mandatory') wbt3UpDnLoadTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2), ) if mibBuilder.loadTexts: wbt3UpDnLoadTable.setStatus('mandatory') wbt3AcceptReq = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AcceptReq.setStatus('mandatory') wbt3SubmitLoadJob = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("notready", 0), ("ready", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3SubmitLoadJob.setStatus('mandatory') wbt3UpDnLoadEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3UpDnLoadIndex")) if mibBuilder.loadTexts: wbt3UpDnLoadEntry.setStatus('mandatory') wbt3UpDnLoadIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadIndex.setStatus('mandatory') wbt3UpDnLoadId = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadId.setStatus('mandatory') wbt3UpDnLoadOp = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("upload", 0), ("download", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadOp.setStatus('mandatory') wbt3UpDnLoadSrcFile = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadSrcFile.setStatus('mandatory') wbt3UpDnLoadDstFile = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadDstFile.setStatus('mandatory') wbt3UpDnLoadFileType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("binary", 0), ("ascii", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadFileType.setStatus('mandatory') wbt3UpDnLoadProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ftp", 0), ("tftp", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadProtocol.setStatus('mandatory') wbt3UpDnLoadFServer = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadFServer.setStatus('mandatory') wbt3UpDnLoadTimeFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("immediate", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UpDnLoadTimeFlag.setStatus('mandatory') wbt3RebootRequest = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noreboot", 0), ("rebootnow", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RebootRequest.setStatus('mandatory') wbt3ResetToFactoryDefault = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("noreset", 0), ("resetnow", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ResetToFactoryDefault.setStatus('mandatory') wbt3ServerName = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ServerName.setStatus('mandatory') wbt3Directory = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Directory.setStatus('mandatory') wbt3UserID = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UserID.setStatus('mandatory') wbt3Password2 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Password2.setStatus('mandatory') wbt3SavePassword = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3SavePassword.setStatus('mandatory') wbt3InfoLocation = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 3, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("uselocalinfo", 0), ("usedhcpinfo", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3InfoLocation.setStatus('mandatory') wbt3Security = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7)) wbt3SecurityEnable = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3SecurityEnable.setStatus('mandatory') wbt3HideConfigTab = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3HideConfigTab.setStatus('mandatory') wbt3FailOverEnable = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3FailOverEnable.setStatus('mandatory') wbt3MultipleConnect = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3MultipleConnect.setStatus('mandatory') wbt3PingBeforeConnect = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3PingBeforeConnect.setStatus('mandatory') wbt3Verbose = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Verbose.setStatus('mandatory') wbt3AutoLoginEnable = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoLoginEnable.setStatus('mandatory') wbt3AutoLoginUserName = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoLoginUserName.setStatus('mandatory') wbt3SingleButtonConnect = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3SingleButtonConnect.setStatus('mandatory') wbt3AutoFailRecovery = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 8, 7, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoFailRecovery.setStatus('mandatory') wbt3TrapStatus = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28))).clone(namedValues=NamedValues(("ls-done", 0), ("ls-done-sameversion", 1), ("ls-notready", 2), ("ls-fail-shutdown", 3), ("ls-fail-noupd", 4), ("ls-fail-dnld-blocked", 5), ("ls-fail-filenotfound", 6), ("ls-fail-dir", 7), ("ls-fail-upld-blocked", 8), ("ls-fail-noserv", 9), ("ls-fail-prot", 10), ("ls-fail-nomem", 11), ("ls-fail-noresource", 12), ("ls-fail-resolvename", 13), ("ls-fail-notbundle", 14), ("ls-fail-checksum", 15), ("ls-fail-flasherror", 16), ("ls-fail-dnld-flash", 17), ("ls-fail-usercancel", 18), ("ls-fail-norflash", 19), ("ls-fail-protnsupport", 20), ("ls-fail-parsereg", 21), ("ls-fail-parsereg-verincomp", 22), ("ls-fail-parsereg-platfincomp", 23), ("ls-fail-parsereg-osincomp", 24), ("ls-fail-reset-defaultfactory", 25), ("ls-fail-paraminifilenotfound", 26), ("ls-invalid-bootstrap", 27), ("ls-fail-badkey", 28)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3TrapStatus.setStatus('mandatory') wbt3TrapReqId = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3TrapReqId.setStatus('mandatory') wbt3TrapServers = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 3)) wbt3TrapServer1 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 3, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TrapServer1.setStatus('mandatory') wbt3TrapServer2 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 3, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TrapServer2.setStatus('mandatory') wbt3TrapServer3 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 3, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TrapServer3.setStatus('mandatory') wbt3TrapServer4 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 9, 3, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TrapServer4.setStatus('mandatory') wbt3MibRevMajor = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 10, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3MibRevMajor.setStatus('mandatory') wbt3MibRevMinor = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 10, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3MibRevMinor.setStatus('mandatory') wbt3NetworkNum = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3NetworkNum.setStatus('mandatory') wbt3NetworkTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2), ) if mibBuilder.loadTexts: wbt3NetworkTable.setStatus('mandatory') wbt3NetworkEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3NetworkIndex")) if mibBuilder.loadTexts: wbt3NetworkEntry.setStatus('mandatory') wbt3NetworkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3NetworkIndex.setStatus('mandatory') wbt3dhcpEnable = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3dhcpEnable.setStatus('mandatory') wbt3NetworkAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3NetworkAddress.setStatus('mandatory') wbt3SubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3SubnetMask.setStatus('mandatory') wbt3Gateway = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Gateway.setStatus('mandatory') wbt3dnsEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3dnsEnable.setStatus('mandatory') wbt3defaultDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3defaultDomain.setStatus('mandatory') wbt3primaryDNSserverIPaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3primaryDNSserverIPaddress.setStatus('mandatory') wbt3secondaryDNSserverIPaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3secondaryDNSserverIPaddress.setStatus('mandatory') wbt3winsEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3winsEnable.setStatus('mandatory') wbt3primaryWINSserverIPaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 11), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3primaryWINSserverIPaddress.setStatus('mandatory') wbt3secondaryWINSserverIPaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 12), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3secondaryWINSserverIPaddress.setStatus('mandatory') wbt3NetworkSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 9, 8, 7, 6))).clone(namedValues=NamedValues(("auto-detect", 0), ("mbs-10halfduplex", 9), ("mbs-10fullduplex", 8), ("mbs-100halfduplex", 7), ("mbs-100fullduplex", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3NetworkSpeed.setStatus('mandatory') wbt3NetworkProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 11, 2, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 256))).clone(namedValues=NamedValues(("tcp-ip", 0), ("unknown", 256)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3NetworkProtocol.setStatus('mandatory') wbt3RDPencryption = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("enable", 0), ("disable", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPencryption.setStatus('mandatory') wbt3VirtualPortServerIPaddress = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3VirtualPortServerIPaddress.setStatus('mandatory') wbt3com1Share = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("yes", 0), ("no", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3com1Share.setStatus('mandatory') wbt3com2Share = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("yes", 0), ("no", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3com2Share.setStatus('mandatory') wbt3parallelShare = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("yes", 0), ("no", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3parallelShare.setStatus('mandatory') iCADefaultHotkeys = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6), ) if mibBuilder.loadTexts: iCADefaultHotkeys.setStatus('mandatory') defaultHotkeysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1), ) if mibBuilder.loadTexts: defaultHotkeysEntry.setStatus('mandatory') iCAStatusDialog = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ctrl", 0), ("shift", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAStatusDialog.setStatus('mandatory') iCAStatusDialog2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAStatusDialog2.setStatus('mandatory') iCACloseRemoteApplication = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ctrl", 0), ("shift", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCACloseRemoteApplication.setStatus('mandatory') iCACloseRemoteApplication2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCACloseRemoteApplication2.setStatus('mandatory') iCAtoggleTitleBar = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ctrl", 0), ("shift", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAtoggleTitleBar.setStatus('mandatory') iCAtoggleTitleBar2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAtoggleTitleBar2.setStatus('mandatory') iCActrlAltDel = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("ctrl", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCActrlAltDel.setStatus('mandatory') iCActrlAltDel2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCActrlAltDel2.setStatus('mandatory') iCActrlEsc = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("ctrl", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCActrlEsc.setStatus('mandatory') iCActrlEsc2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCActrlEsc2.setStatus('mandatory') iCAaltEsc = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ctrl", 0), ("shift", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAaltEsc.setStatus('mandatory') iCAaltEsc2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAaltEsc2.setStatus('mandatory') iCAaltTab = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ctrl", 0), ("shift", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAaltTab.setStatus('mandatory') iCAaltTab2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAaltTab2.setStatus('mandatory') iCAaltBackTab = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("ctrl", 0), ("shift", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAaltBackTab.setStatus('mandatory') iCAaltBackTab2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 12, 6, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("nb-0", 0), ("nb-1", 1), ("nb-2", 2), ("nb-3", 3), ("nb-4", 4), ("nb-5", 5), ("nb-6", 6), ("nb-7", 7), ("nb-8", 8), ("nb-9", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: iCAaltBackTab2.setStatus('mandatory') wbt3ConnectionsTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 2), ) if mibBuilder.loadTexts: wbt3ConnectionsTable.setStatus('mandatory') wbt3ConnectionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3ConnectionName")) if mibBuilder.loadTexts: wbt3ConnectionEntry.setStatus('mandatory') wbt3ConnectionName = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 2, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ConnectionName.setStatus('mandatory') wbt3ConnectionType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("rdp", 0), ("ica", 1), ("tec", 2), ("dialup", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ConnectionType.setStatus('mandatory') wbt3ConnectionEntryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ConnectionEntryStatus.setStatus('mandatory') wbt3RDPConnections = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3)) wbt3RDPConnTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1), ) if mibBuilder.loadTexts: wbt3RDPConnTable.setStatus('mandatory') wbt3RDPConnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1), ) if mibBuilder.loadTexts: wbt3RDPConnEntry.setStatus('mandatory') wbt3RDPConnName = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RDPConnName.setStatus('mandatory') wbt3RDPConnServer = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnServer.setStatus('mandatory') wbt3RDPConnLowSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnLowSpeed.setStatus('mandatory') wbt3RDPConnAutoLogon = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnAutoLogon.setStatus('mandatory') wbt3RDPConnUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnUsername.setStatus('mandatory') wbt3RDPConnDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnDomain.setStatus('mandatory') wbt3RDPConnStartApplication = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("desktop", 0), ("filename", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnStartApplication.setStatus('mandatory') wbt3RDPConnFilename = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnFilename.setStatus('mandatory') wbt3RDPConnWorkingDir = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 10), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3RDPConnWorkingDir.setStatus('mandatory') wbt3RDPConnModifiable = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 3, 1, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3RDPConnModifiable.setStatus('mandatory') wbt3ICAConnections = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4)) wbt3ICAConnTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1), ) if mibBuilder.loadTexts: wbt3ICAConnTable.setStatus('mandatory') wbt3ICAConnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1), ) if mibBuilder.loadTexts: wbt3ICAConnEntry.setStatus('mandatory') wbt3ICAConnName = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3ICAConnName.setStatus('mandatory') wbt3ICAConnCommType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("network", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnCommType.setStatus('mandatory') wbt3ICAConnServer = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnServer.setStatus('mandatory') wbt3ICAConnCommandLine = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnCommandLine.setStatus('mandatory') wbt3ICAConnWorkingDir = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnWorkingDir.setStatus('mandatory') wbt3ICAConnUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnUsername.setStatus('mandatory') wbt3ICAConnDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnDomain.setStatus('mandatory') wbt3ICAConnColors = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("nb-16", 0), ("nb-256", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnColors.setStatus('mandatory') wbt3ICAConnDataCompress = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnDataCompress.setStatus('mandatory') wbt3ICAConnSoundQuality = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("low", 1), ("medium", 2), ("high", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3ICAConnSoundQuality.setStatus('mandatory') wbt3ICAConnModifiable = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 4, 1, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3ICAConnModifiable.setStatus('mandatory') wbt3TermConnections = MibIdentifier((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5)) wbt3TermConnTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1), ) if mibBuilder.loadTexts: wbt3TermConnTable.setStatus('mandatory') wbt3TermConnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1), ) if mibBuilder.loadTexts: wbt3TermConnEntry.setStatus('mandatory') wbt3TermConnName = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3TermConnName.setStatus('mandatory') wbt3TermConnCommType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("network", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnCommType.setStatus('mandatory') wbt3TermConnServer = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnServer.setStatus('mandatory') wbt3TermConnEmuType = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("vt52", 0), ("vt100", 1), ("vt400-7-bit", 3), ("vt400-8-bit", 4), ("ansi-bbs", 5), ("sco-console", 6), ("ibm3270", 7), ("ibm3151", 8), ("ibm5250", 9), ("wy50", 10), ("wy50-plus", 11), ("tvi910", 12), ("tvi920", 13), ("tvi925", 14), ("adds-a2", 15), ("hz1500", 16), ("wy60", 17)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnEmuType.setStatus('mandatory') wbt3TermConnVTEmuModel = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 256))).clone(namedValues=NamedValues(("vt100", 0), ("vt101", 1), ("vt102", 2), ("vt125", 3), ("vt220", 4), ("vt240", 5), ("vt320", 6), ("vt340", 7), ("vt420", 8), ("vt131", 9), ("vt132", 10), ("not-applicable", 256)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnVTEmuModel.setStatus('mandatory') wbt3TermConnIBM3270EmuModel = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 256))).clone(namedValues=NamedValues(("ibm3278-2", 0), ("ibm3278-3", 1), ("ibm3278-4", 2), ("ibm3278-5", 3), ("ibm3278-2-e", 4), ("ibm3278-3-e", 5), ("ibm3278-4-e", 6), ("ibm3278-5-e", 7), ("ibm3279-2", 8), ("ibm3279-3", 9), ("ibm3279-4", 10), ("ibm3279-5", 11), ("ibm3287-1", 12), ("not-applicable", 256)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnIBM3270EmuModel.setStatus('mandatory') wbt3TermConnIBM5250EmuModel = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 256))).clone(namedValues=NamedValues(("ibm5291-1", 0), ("ibm5292-2", 1), ("ibm5251-11", 2), ("ibm3179-2", 3), ("ibm3196-a1", 4), ("ibm3180-2", 5), ("ibm3477-fc", 6), ("ibm3477-fg", 7), ("ibm3486-ba", 8), ("ibm3487-ha", 9), ("ibm3487-hc", 10), ("not-applicable", 256)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnIBM5250EmuModel.setStatus('mandatory') wbt3TermConnPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnPortNumber.setStatus('mandatory') wbt3TermConnTelnetName = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 11), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnTelnetName.setStatus('mandatory') wbt3TermConnPrinterPort = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("lpt1", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnPrinterPort.setStatus('mandatory') wbt3TermConnFormFeed = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnFormFeed.setStatus('mandatory') wbt3TermConnAutoLineFeed = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnAutoLineFeed.setStatus('mandatory') wbt3TermConnScript = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 15), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3TermConnScript.setStatus('mandatory') wbt3TermConnModifiable = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 13, 5, 1, 1, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wbt3TermConnModifiable.setStatus('mandatory') wbt3UsersTable = MibTable((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2), ) if mibBuilder.loadTexts: wbt3UsersTable.setStatus('mandatory') wbt3UsersEntry = MibTableRow((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1), ).setIndexNames((0, "WYSE-MIB", "wbt3userName")) if mibBuilder.loadTexts: wbt3UsersEntry.setStatus('mandatory') wbt3UsersStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UsersStatus.setStatus('mandatory') wbt3userName = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3userName.setStatus('mandatory') wbt3password = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3password.setStatus('mandatory') wbt3privilege = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("admin", 0), ("user", 1), ("guest", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3privilege.setStatus('mandatory') wbt3Connection1 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection1.setStatus('mandatory') wbt3Connection2 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 8), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection2.setStatus('mandatory') wbt3Connection3 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 9), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection3.setStatus('mandatory') wbt3Connection4 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 10), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection4.setStatus('mandatory') wbt3Connection5 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 11), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection5.setStatus('mandatory') wbt3Connection6 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 12), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection6.setStatus('mandatory') wbt3Connection7 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 13), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection7.setStatus('mandatory') wbt3Connection8 = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 14), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3Connection8.setStatus('mandatory') wbt3AutoStart1 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart1.setStatus('mandatory') wbt3AutoStart2 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart2.setStatus('mandatory') wbt3AutoStart3 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart3.setStatus('mandatory') wbt3AutoStart4 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart4.setStatus('mandatory') wbt3AutoStart5 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart5.setStatus('mandatory') wbt3AutoStart6 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart6.setStatus('mandatory') wbt3AutoStart7 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart7.setStatus('mandatory') wbt3AutoStart8 = MibScalar((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3AutoStart8.setStatus('mandatory') wbt3UserPasswordChange = MibTableColumn((1, 3, 6, 1, 4, 1, 714, 1, 2, 3, 14, 2, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no", 0), ("yes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wbt3UserPasswordChange.setStatus('mandatory') wbt3TrapDHCPBuildMismatch = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,1)).setObjects(("WYSE-MIB", "wbt3CurBuildNum"), ("WYSE-MIB", "wbt3CurOEMBuildNum"), ("WYSE-MIB", "wbt3CurModBuildDate"), ("WYSE-MIB", "wbt3DUpBuildNum"), ("WYSE-MIB", "wbt3DUpOEMBuildNum"), ("WYSE-MIB", "wbt3DUpOEMBuildDate")) wbt3TrapDHCPUpdDone = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,2)).setObjects(("WYSE-MIB", "wbt3CurBuildNum"), ("WYSE-MIB", "wbt3CurOEMBuildNum"), ("WYSE-MIB", "wbt3CurModBuildDate"), ("WYSE-MIB", "wbt3DUpBuildNum"), ("WYSE-MIB", "wbt3DUpOEMBuildNum"), ("WYSE-MIB", "wbt3DUpOEMBuildDate")) wbt3TrapDHCPUpdNotComplete = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,3)).setObjects(("WYSE-MIB", "wbt3CurBuildNum"), ("WYSE-MIB", "wbt3CurOEMBuildNum"), ("WYSE-MIB", "wbt3CurModBuildDate"), ("WYSE-MIB", "wbt3DUpBuildNum"), ("WYSE-MIB", "wbt3DUpOEMBuildNum"), ("WYSE-MIB", "wbt3DUpOEMBuildDate"), ("WYSE-MIB", "wbt3TrapStatus")) wbt3TrapSNMPAccptLd = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,4)).setObjects(("WYSE-MIB", "wbt3SubmitLoadJob")) wbt3TrapSNMPLdDone = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,5)).setObjects(("WYSE-MIB", "wbt3TrapReqId")) wbt3TrapSNMPLdNotComplete = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,6)).setObjects(("WYSE-MIB", "wbt3TrapReqId"), ("WYSE-MIB", "wbt3TrapStatus")) wbt3TrapRebootNotComplete = NotificationType((1, 3, 6, 1, 4, 1, 714, 1, 2, 3) + (0,7)).setObjects(("WYSE-MIB", "wbt3TrapStatus")) mibBuilder.exportSymbols("WYSE-MIB", wbt3CustomField1=wbt3CustomField1, wbt3PCCardIndex=wbt3PCCardIndex, wbt3EnergySaver=wbt3EnergySaver, wbt3HideConfigTab=wbt3HideConfigTab, wbt3TrapServer3=wbt3TrapServer3, wbt3SetCommunity=wbt3SetCommunity, wbt3UpDnLoad=wbt3UpDnLoad, wbt3CurInfoNum=wbt3CurInfoNum, wbt3UpDnLoadIndex=wbt3UpDnLoadIndex, wbt3FailOverEnable=wbt3FailOverEnable, wbt3RDPConnections=wbt3RDPConnections, wbt3ICAConnColors=wbt3ICAConnColors, logonUserName=logonUserName, wbt3Connection6=wbt3Connection6, wbt3DispVertPixMax=wbt3DispVertPixMax, wbt3CharacterRepeatDelay=wbt3CharacterRepeatDelay, wbt3DhcpInfoIndex=wbt3DhcpInfoIndex, wbt3RDPConnUsername=wbt3RDPConnUsername, iCACloseRemoteApplication=iCACloseRemoteApplication, wbt3RDPencryption=wbt3RDPencryption, wbt3TrapDHCPUpdNotComplete=wbt3TrapDHCPUpdNotComplete, domain=domain, emulationMode=emulationMode, wbt3CurOEMBuildNum=wbt3CurOEMBuildNum, wbt3DHCPupdate=wbt3DHCPupdate, wbt3CustomField3=wbt3CustomField3, wbt3DUpOEMBuildDate=wbt3DUpOEMBuildDate, wbt3UpDnLoadTable=wbt3UpDnLoadTable, wbt3DUpOEMBuildNum=wbt3DUpOEMBuildNum, wbt3DispFreq=wbt3DispFreq, wbt3UpDnLoadProtocol=wbt3UpDnLoadProtocol, iCAaltBackTab2=iCAaltBackTab2, wbt3Username=wbt3Username, wbt3RDPConnStartApplication=wbt3RDPConnStartApplication, wbt3Password2=wbt3Password2, wbt3DispHorizPixMax=wbt3DispHorizPixMax, wbt3VirtualPortServerIPaddress=wbt3VirtualPortServerIPaddress, iCACloseRemoteApplication2=iCACloseRemoteApplication2, wbt3AutoStart1=wbt3AutoStart1, wbt3TrapSNMPAccptLd=wbt3TrapSNMPAccptLd, wbt3TrapSNMPLdNotComplete=wbt3TrapSNMPLdNotComplete, wbt3NetworkIndex=wbt3NetworkIndex, iCActrlEsc2=iCActrlEsc2, wbt3Password=wbt3Password, trapServerList=trapServerList, wbt3PingBeforeConnect=wbt3PingBeforeConnect, thinClient=thinClient, wbt3InfoLocation=wbt3InfoLocation, wbt3InterfaceNum=wbt3InterfaceNum, wysenet=wysenet, remoteServer=remoteServer, wbt3TrapStatus=wbt3TrapStatus, wbt3TrapServerList=wbt3TrapServerList, wbt3DhcpInfoEntry=wbt3DhcpInfoEntry, iCAaltEsc2=iCAaltEsc2, wbt3SubmitLoadJob=wbt3SubmitLoadJob, wbt3com1Share=wbt3com1Share, wbt3CurOS=wbt3CurOS, wbt3CurInfoIndex=wbt3CurInfoIndex, wbt3UsersEntry=wbt3UsersEntry, wbt3Domain=wbt3Domain, wbt3dhcpEnable=wbt3dhcpEnable, wbt3PCCard=wbt3PCCard, wbt3DUpInfoNum=wbt3DUpInfoNum, wbt3DUpInfoTable=wbt3DUpInfoTable, wbt3ICAConnCommandLine=wbt3ICAConnCommandLine, wbt3CurHWPlatform=wbt3CurHWPlatform, wbt3MibRev=wbt3MibRev, wbt3RDPConnFilename=wbt3RDPConnFilename, wbt3AutoLoginUserName=wbt3AutoLoginUserName, wbt3CommandLine=wbt3CommandLine, wbt3TermConnServer=wbt3TermConnServer, wbt3TrapServer1=wbt3TrapServer1, wbt3ConnectionEntry=wbt3ConnectionEntry, iCAtoggleTitleBar2=iCAtoggleTitleBar2, wbt3ICAConnWorkingDir=wbt3ICAConnWorkingDir, wbt3RomNum=wbt3RomNum, iCAtoggleTitleBar=iCAtoggleTitleBar, wbt3TermConnFormFeed=wbt3TermConnFormFeed, wbt3CurBuildNum=wbt3CurBuildNum, wbt3DispColorMax=wbt3DispColorMax, wbt3CurModBuildDate=wbt3CurModBuildDate, wbt3MultipleConnect=wbt3MultipleConnect, iCActrlAltDel2=iCActrlAltDel2, wbt3Connection2=wbt3Connection2, wbt3Directory=wbt3Directory, wbt3ICAConnTable=wbt3ICAConnTable, wbt3TermConnIBM5250EmuModel=wbt3TermConnIBM5250EmuModel, wbt3TrapSNMPLdDone=wbt3TrapSNMPLdDone, wbt3UpDnLoadOp=wbt3UpDnLoadOp, iCAStatusDialog2=iCAStatusDialog2, product=product, wbt3primaryWINSserverIPaddress=wbt3primaryWINSserverIPaddress, iCAStatusDialog=iCAStatusDialog, wbt3NetworkEntry=wbt3NetworkEntry, wbt3RomSize=wbt3RomSize, wbt3ConnectionsTable=wbt3ConnectionsTable, wbt3SecurityEnable=wbt3SecurityEnable, wbt3ICAConnServer=wbt3ICAConnServer, wbt3Connection1=wbt3Connection1, wbt3primaryDNSserverIPaddress=wbt3primaryDNSserverIPaddress, wbt3DhcpInfo=wbt3DhcpInfo, wbt3UserPasswordChange=wbt3UserPasswordChange, wbt3RebootRequest=wbt3RebootRequest, wbt3RDPstartApp=wbt3RDPstartApp, wbt3CharacterRepeatRate=wbt3CharacterRepeatRate, wbt3TermConnPrinterPort=wbt3TermConnPrinterPort, wbt3Connection7=wbt3Connection7, wbt3CurInfoEntry=wbt3CurInfoEntry, wbt3AutoStart3=wbt3AutoStart3, wbt3Rom=wbt3Rom, wbt3SubnetMask=wbt3SubnetMask, wbt3AutoStart2=wbt3AutoStart2, wbt3DispVertPix=wbt3DispVertPix, wbt3PCCardEntry=wbt3PCCardEntry, wbt3parallelShare=wbt3parallelShare, iCAaltBackTab=iCAaltBackTab, wbt3ICAConnDomain=wbt3ICAConnDomain, wbt3NetworkProtocol=wbt3NetworkProtocol, wbt3TermConnections=wbt3TermConnections, wbt3AutoStart8=wbt3AutoStart8, wbt3RDPConnServer=wbt3RDPConnServer, wbt3IODevice=wbt3IODevice, wbt3ICAConnUsername=wbt3ICAConnUsername, wbt3TermConnPortNumber=wbt3TermConnPortNumber, wbt3ICAConnCommType=wbt3ICAConnCommType, wbt3CurInfoTable=wbt3CurInfoTable, wbt3NetworkSpeed=wbt3NetworkSpeed, iCAaltTab=iCAaltTab, wbt3TermConnAutoLineFeed=wbt3TermConnAutoLineFeed, fTPFileServer=fTPFileServer, wbt3TermConnModifiable=wbt3TermConnModifiable, wbt3Connection8=wbt3Connection8, wbt3TrapServer4=wbt3TrapServer4, wbt3DispCharacteristic=wbt3DispCharacteristic, wbt3ICAConnModifiable=wbt3ICAConnModifiable, wbt3AutoStart7=wbt3AutoStart7, wbt3winsEnable=wbt3winsEnable, wbt3UpDnLoadDstFile=wbt3UpDnLoadDstFile, wbt3Memory=wbt3Memory, wbt3Connection5=wbt3Connection5, wbt3ServerName=wbt3ServerName, wbt3VirtualPortServer=wbt3VirtualPortServer, virtualPortServer=virtualPortServer, iCAaltEsc=iCAaltEsc, wbt3PCCardType=wbt3PCCardType, wbt3MibRevMajor=wbt3MibRevMajor, wbt3PCCardVendor=wbt3PCCardVendor, wbt3DhcpInfoTable=wbt3DhcpInfoTable, wbt3Verbose=wbt3Verbose, wbt3UpDnLoadId=wbt3UpDnLoadId, wbt3RamNum=wbt3RamNum, wbt3dnsEnable=wbt3dnsEnable, wbt3Network=wbt3Network, wbt3TouchScreen=wbt3TouchScreen, wbt3RomType=wbt3RomType, wbt3ConnectionEntryStatus=wbt3ConnectionEntryStatus, wbt3RDPConnLowSpeed=wbt3RDPConnLowSpeed, wbt3ICAConnections=wbt3ICAConnections, wbt3UserID=wbt3UserID, wbt3ICAConnDataCompress=wbt3ICAConnDataCompress, wbt3Gateway=wbt3Gateway, wbt3RamType=wbt3RamType, wbt3SavePassword=wbt3SavePassword, fTPRootPath=fTPRootPath, wbt3ICAConnEntry=wbt3ICAConnEntry, terminalID=terminalID, wbt3ConnectionType=wbt3ConnectionType, wbt3Connection4=wbt3Connection4, wbt3RomEntry=wbt3RomEntry, wbt3AutoStart4=wbt3AutoStart4, wbt3Connections=wbt3Connections, wbt3PCCardTable=wbt3PCCardTable, iCAaltTab2=iCAaltTab2, wbt3Display=wbt3Display, wbt3Apps=wbt3Apps, wbt3TermConnVTEmuModel=wbt3TermConnVTEmuModel, wbt3RomIndex=wbt3RomIndex, rDPStartupApp=rDPStartupApp, wbt3TrapRebootNotComplete=wbt3TrapRebootNotComplete, wbt3CustomFields=wbt3CustomFields, wbt3SingleButtonConnect=wbt3SingleButtonConnect, wbt3FTPsetting=wbt3FTPsetting, wbt3UpDnLoadEntry=wbt3UpDnLoadEntry, wbt3TermConnEmuType=wbt3TermConnEmuType, wbt3AutoFailRecovery=wbt3AutoFailRecovery, wbt3RamTable=wbt3RamTable, wbt3DispCapability=wbt3DispCapability, wbt3NetworkAddress=wbt3NetworkAddress, wbt3RDPConnName=wbt3RDPConnName, wbt3RDPConnEntry=wbt3RDPConnEntry, wbt3NetworkNum=wbt3NetworkNum, wbt3DispHorizPix=wbt3DispHorizPix, wbt3BuildInfo=wbt3BuildInfo, wbt3CurrentInfo=wbt3CurrentInfo, wbt3RDPConnWorkingDir=wbt3RDPConnWorkingDir, wbt3RDPConnTable=wbt3RDPConnTable, wbt3kbLanguage=wbt3kbLanguage, wbt3TerminalID=wbt3TerminalID, wbt3DUpModBuildDate=wbt3DUpModBuildDate, wbt3Security=wbt3Security, wbt3RamSize=wbt3RamSize, wbt3ResetToFactoryDefault=wbt3ResetToFactoryDefault, wbt3TrapServer2=wbt3TrapServer2, wbt3Administration=wbt3Administration, wbt3WorkingDir=wbt3WorkingDir, wbt3DUpBuildNum=wbt3DUpBuildNum, wbt3UpDnLoadNum=wbt3UpDnLoadNum, wbt3UsersStatus=wbt3UsersStatus, wbt3Connection3=wbt3Connection3, wbt3RDPConnDomain=wbt3RDPConnDomain, password=password, old=old, wbt3DUpInfoEntry=wbt3DUpInfoEntry, wbt3RomTable=wbt3RomTable, wbt3TrapReqId=wbt3TrapReqId, wbt3secondaryWINSserverIPaddress=wbt3secondaryWINSserverIPaddress, wbt3ScreenTimeOut=wbt3ScreenTimeOut, wbt3TrapDHCPUpdDone=wbt3TrapDHCPUpdDone, wbt3com2Share=wbt3com2Share, wbt3SNMPupdate=wbt3SNMPupdate, wbt3UsersTable=wbt3UsersTable, wbt3privilege=wbt3privilege, wbt3FileServer=wbt3FileServer, wbt3RamIndex=wbt3RamIndex, wbt3AutoLoginEnable=wbt3AutoLoginEnable, wbt3DispUseDDC=wbt3DispUseDDC, workingDirectory=workingDirectory, wbt3DUpInfoIndex=wbt3DUpInfoIndex, iCActrlEsc=iCActrlEsc, wbt3CurOEM=wbt3CurOEM, wbt3TermConnTable=wbt3TermConnTable, wbt3TermConnName=wbt3TermConnName, defaultHotkeysEntry=defaultHotkeysEntry, wbt3EmulationMode=wbt3EmulationMode, iCADefaultHotkeys=iCADefaultHotkeys, wbt3AutoStart6=wbt3AutoStart6, wbt3DhcpUpdateInfo=wbt3DhcpUpdateInfo, wbt3TermConnScript=wbt3TermConnScript, wbt3Action=wbt3Action, wbt3ICAConnName=wbt3ICAConnName, wbt3Ram=wbt3Ram, wbt3DispColor=wbt3DispColor, wbt3DispFreqMax=wbt3DispFreqMax, wbt3=wbt3, setCommunity=setCommunity, wbt3DhcpInfoNum=wbt3DhcpInfoNum, iCActrlAltDel=iCActrlAltDel, wbt3TrapsInfo=wbt3TrapsInfo, wbt3AcceptReq=wbt3AcceptReq, wbt3NetworkTable=wbt3NetworkTable, wbt3ConnectionName=wbt3ConnectionName, wbt3UpDnLoadTimeFlag=wbt3UpDnLoadTimeFlag, wbt3ICAConnSoundQuality=wbt3ICAConnSoundQuality) mibBuilder.exportSymbols("WYSE-MIB", wbt3TermConnIBM3270EmuModel=wbt3TermConnIBM3270EmuModel, wbt3userName=wbt3userName, wbt3secondaryDNSserverIPaddress=wbt3secondaryDNSserverIPaddress, wbt3DHCPoptionIDs=wbt3DHCPoptionIDs, wbt3ServerIP=wbt3ServerIP, wbt3AutoStart5=wbt3AutoStart5, wbt3RDPConnModifiable=wbt3RDPConnModifiable, wbt3RamEntry=wbt3RamEntry, wbt3IODevAttached=wbt3IODevAttached, wbt3TrapServers=wbt3TrapServers, wbt3password=wbt3password, wbt3Users=wbt3Users, wbt3TermConnTelnetName=wbt3TermConnTelnetName, wbt3PCCardNum=wbt3PCCardNum, wbt3MibRevMinor=wbt3MibRevMinor, wbt3FileRootPath=wbt3FileRootPath, wbt3CustomField2=wbt3CustomField2, wbt3defaultDomain=wbt3defaultDomain, wbt3RDPConnAutoLogon=wbt3RDPConnAutoLogon, wbt3UpDnLoadSrcFile=wbt3UpDnLoadSrcFile, wbt3TermConnEntry=wbt3TermConnEntry, wbt3TermConnCommType=wbt3TermConnCommType, commandLine=commandLine, wbt3TrapDHCPBuildMismatch=wbt3TrapDHCPBuildMismatch, wbt3UpDnLoadFileType=wbt3UpDnLoadFileType, wbt3UpDnLoadFServer=wbt3UpDnLoadFServer, wyse=wyse)
age = input("How old are you? ") height = input("How tall are you? ") # "TypeError: input expected at most 1 arguments, got 2" will raise if more than 1 string is pu inside input() weight = input("How much do you weight? ") print(f"So, you're {age} old, {height} tall and {weight} heavy.") #------------------------------------------------------------------- print("-------------------------------------------------------------") #Some extension based on above statement age = int(input("How old are you? ")) height = input(f"You are {age}? Nice. \nHow tall are you? ") weight = input("How much do you weight? ") print(f"So, you're {age} old, {height} tall and {weight} heavy.") # python -m pydoc input
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright SquirrelNetwork class Config(object): ########################### ## DATABASE SETTINGS ## ########################## HOST = 'localhost' PORT = 3306 USER = 'usr' PASSWORD = 'pws' DBNAME = 'dbname' ########################### ## TELEGRAM SETTINGS ## ########################## BOT_TOKEN = 'INSERT TOKEN HERE' SUPERADMIN = { 'foo': 123456789, 'bar': 123456789 } OWNER = { 'foo': 123456789, 'bar': 123456789 } DEFAULT_WELCOME = "Welcome {} to the {} group" DEFAULT_RULES = "https://github.com/Squirrel-Network/GroupRules" DEFAULT_LOG_CHANNEL = -123456789 DEFAULT_STAFF_GROUP = -123456789 ########################### ## PROJECT SETTINGS ## ########################## OPENWEATHER_API = 'Insert Token' ENABLE_PLUGINS = True DEFAULT_LANGUAGE = "EN" VERSION = '8.0.2' VERSION_NAME = 'Hatterene' REPO = 'https://github.com/Squirrel-Network/nebula8' DEBUG = True
#!/usr/bin/env python3 class TrieNode(object): """ This class represents a node in a trie """ def __init__(self, text: str): """ Constructor: initialize a trie node with a given text string :param text: text string at this trie node """ self.__text = text self.__children = {} self.__ends_word = False def get_ends_word(self): """ Does this node end a word? :return: True if this node ends a word, False otherwise """ return self.__ends_word def set_ends_word(self, ends_word: bool): """ Set whether or not this node ends a word in a trie :param ends_word: value determining whether this node ends a word :return: None """ self.__ends_word = ends_word def get_child(self, char: str): """ Return the child trie node that is found when you follow the link from the given character :param char: the character in the key :return: the trie node the given character links to, or None if that link is not in trie """ if char in self.__children.keys(): return self.__children[char] else: return None def insert(self, char: str): """ Insert a character at this trie node :param char: the character to be inserted :return: the newly created trie node, or None if the character is already in the trie """ if char not in self.__children: next_node = TrieNode(self.__text + char) self.__children[char] = next_node return next_node else: return None
# --- Day 12: Passage Pathing --- # With your submarine's subterranean subsystems subsisting suboptimally, the only way you're getting out of this cave anytime soon is by finding a path yourself. Not just a path - the only way to know if you've found the best path is to find all of them. # # Fortunately, the sensors are still mostly working, and so you build a rough map of the remaining caves (your puzzle input). For example: # # start-A # start-b # A-c # A-b # b-d # A-end # b-end # This is a list of how all of the caves are connected. You start in the cave named start, and your destination is the cave named end. An entry like b-d means that cave b is connected to cave d - that is, you can move between them. # # So, the above cave system looks roughly like this: # # start # / \ # c--A-----b--d # \ / # end # Your goal is to find the number of distinct paths that start at start, end at end, and don't visit small caves more than once. There are two types of caves: big caves (written in uppercase, like A) and small caves (written in lowercase, like b). It would be a waste of time to visit any small cave more than once, but big caves are large enough that it might be worth visiting them multiple times. So, all paths you find should visit small caves at most once, and can visit big caves any number of times. # # Given these rules, there are 10 paths through this example cave system: # # start,A,b,A,c,A,end # start,A,b,A,end # start,A,b,end # start,A,c,A,b,A,end # start,A,c,A,b,end # start,A,c,A,end # start,A,end # start,b,A,c,A,end # start,b,A,end # start,b,end # (Each line in the above list corresponds to a single path; the caves visited by that path are listed in the order they are visited and separated by commas.) # # Note that in this cave system, cave d is never visited by any path: to do so, cave b would need to be visited twice (once on the way to cave d and a second time when returning from cave d), and since cave b is small, this is not allowed. # # Here is a slightly larger example: # # dc-end # HN-start # start-kj # dc-start # dc-HN # LN-dc # HN-end # kj-sa # kj-HN # kj-dc # The 19 paths through it are as follows: # # start,HN,dc,HN,end # start,HN,dc,HN,kj,HN,end # start,HN,dc,end # start,HN,dc,kj,HN,end # start,HN,end # start,HN,kj,HN,dc,HN,end # start,HN,kj,HN,dc,end # start,HN,kj,HN,end # start,HN,kj,dc,HN,end # start,HN,kj,dc,end # start,dc,HN,end # start,dc,HN,kj,HN,end # start,dc,end # start,dc,kj,HN,end # start,kj,HN,dc,HN,end # start,kj,HN,dc,end # start,kj,HN,end # start,kj,dc,HN,end # start,kj,dc,end # Finally, this even larger example has 226 paths through it: # # fs-end # he-DX # fs-he # start-DX # pj-DX # end-zg # zg-sl # zg-pj # pj-he # RW-he # fs-DX # pj-RW # zg-RW # start-pj # he-WI # zg-he # pj-fs # start-RW # How many paths through this cave system are there that visit small caves at most once? # # Your puzzle answer was 5457. # # --- Part Two --- # After reviewing the available paths, you realize you might have time to visit a single small cave twice. Specifically, big caves can be visited any number of times, a single small cave can be visited at most twice, and the remaining small caves can be visited at most once. However, the caves named start and end can only be visited exactly once each: once you leave the start cave, you may not return to it, and once you reach the end cave, the path must end immediately. # # Now, the 36 possible paths through the first example above are: # # start,A,b,A,b,A,c,A,end # start,A,b,A,b,A,end # start,A,b,A,b,end # start,A,b,A,c,A,b,A,end # start,A,b,A,c,A,b,end # start,A,b,A,c,A,c,A,end # start,A,b,A,c,A,end # start,A,b,A,end # start,A,b,d,b,A,c,A,end # start,A,b,d,b,A,end # start,A,b,d,b,end # start,A,b,end # start,A,c,A,b,A,b,A,end # start,A,c,A,b,A,b,end # start,A,c,A,b,A,c,A,end # start,A,c,A,b,A,end # start,A,c,A,b,d,b,A,end # start,A,c,A,b,d,b,end # start,A,c,A,b,end # start,A,c,A,c,A,b,A,end # start,A,c,A,c,A,b,end # start,A,c,A,c,A,end # start,A,c,A,end # start,A,end # start,b,A,b,A,c,A,end # start,b,A,b,A,end # start,b,A,b,end # start,b,A,c,A,b,A,end # start,b,A,c,A,b,end # start,b,A,c,A,c,A,end # start,b,A,c,A,end # start,b,A,end # start,b,d,b,A,c,A,end # start,b,d,b,A,end # start,b,d,b,end # start,b,end # The slightly larger example above now has 103 paths through it, and the even larger example now has 3509 paths through it. # # Given these new rules, how many paths through this cave system are there? # # Your puzzle answer was 128506. # # Both parts of this puzzle are complete! They provide two gold stars: ** def load_input(file_name): a_file = open(file_name, "r") input = [] for line in a_file: route = line.strip().split('-') input.append(Path(route[0], route[1])) return input class Path: start: str end: str def __init__(self, start, end): self.start = start self.end = end class Route: nodes: [] allow_one_double_visit: bool def __init__(self, nodes, allow_one_double_visit=False): self.nodes = nodes self.allow_one_double_visit = allow_one_double_visit def end(self): return self.nodes[-1] def can_pass_by(self, node): if node == 'start' and 'start' in self.nodes: return False if node.islower() and node in self.nodes: if not self.allow_one_double_visit: return False elif not self.has_double(): return True else: return False else: return True def has_double(self): lower_nodes = [] for node in self.nodes: if not node.islower(): continue elif node in lower_nodes: return True else: lower_nodes.append(node) return False def finished(self): if self.nodes[-1] == 'end': return True else: return False def __str__(self): to_string = '' for node in self.nodes: to_string += node + ',' return to_string[:-1] def problem_a(): # paths = load_input("day_12_sample.txt") paths = load_input("day_12.txt") new_routes = [Route(['start'])] completed_routes = [] while len(new_routes) > 0: new_routes, completed = routes_step(new_routes, paths, False) completed_routes += completed print_routes(completed_routes) print("Result: ", len(completed_routes)) def problem_b(): # paths = load_input("day_12_sample.txt") paths = load_input("day_12.txt") new_routes = [Route(['start'])] completed_routes = [] while len(new_routes) > 0: new_routes, completed = routes_step(new_routes, paths, True) completed_routes += completed print_routes(completed_routes) print("Result: ", len(completed_routes)) def routes_step(routes, paths, allow_double): new_routes = [] completed_routes = [] for route in routes: if route.finished(): completed_routes.append(route) continue for path in paths: if route.end() == path.start: if route.can_pass_by(path.end): new_nodes = route.nodes.copy() + [path.end] new_routes.append(Route(new_nodes, allow_double)) elif route.end() == path.end: if route.can_pass_by(path.start): new_nodes = route.nodes.copy() + [path.start] new_routes.append(Route(new_nodes, allow_double)) return new_routes, completed_routes def print_routes(routes): for route in routes: print(route) if __name__ == '__main__': problem_b()
class Perfil: def __init__(self,username,tipo="user"): self.username = username self.carritoDCompras = [] self.tipo = tipo def AgregarACarrito(self, item): self.carritoDCompras.append(item) class Administrador(Perfil): def __init__(self,username, tipo = "Admin"): super().__init__(username, tipo) self.tipo = "Admin" def printUserData(self,username): print(f'Data on {username.username}: Type= {username.tipo}') print("En carrito de compras:",username.carritoDCompras) class Reporter(Perfil): def __init__(self,username,tipo="Reporter"): super().__init__(username, tipo) self.tipo = "Reporter" def CheckCarrito(self,userVar): print("En carrito de compras:",userVar.carritoDCompras) user1 = Perfil("pepito") user2 = Administrador("admin") user3 = Reporter("reportero") user1.AgregarACarrito("leche") user1.AgregarACarrito("pan") user1.AgregarACarrito("queso") user2.printUserData(user1) user3.CheckCarrito(user1) # No me gusta como quedo.. no entendi muy bien el ejercicio...
# vim: fileencoding=utf-8 """ AppHtml settings @author Toshiya NISHIO(http://www.toshiya240.com) """ defaultTemplate = { '1) 小さいボタン': '${badgeS}', '2) 大きいボタン': '${badgeL}', '3) テキストのみ': '${textonly}', "4) アイコン付き(小)": u"""<span class="appIcon"><img class="appIconImg" height="60" src="${icon60url}" style="float:left;margin: 0px 15px 15px 5px;"></span> <span class="appName"><strong><a href="${url}" target="itunes_store">${name}</a></strong></span><br> <span class="appCategory">カテゴリ: ${category}</span><br> <span class="badgeS" style="display:inline-block; margin:6px">${badgeS}</span><br style="clear:both;"> """, "5) アイコン付き(大)": u"""<span class="appIcon"><img class="appIconImg" height="100" src="${icon100url}" style="float:left;;margin: 0px 15px 15px 5px;"></span> <span class="appName"><strong><a href="${url}" target="itunes_store">${name}</a></strong></span><br> <span class="appCategory">カテゴリ: ${category}</span><br> <span class="badgeL" style="display:inline-block; margin:4px">${badgeL}</span><br style="clear:both;"> """ } settings = { 'phg': "", 'cnt': 8, 'scs': { 'iphone': 320, 'ipad': 320, 'mac': 480 }, 'template': { 'software': defaultTemplate, 'iPadSoftware': defaultTemplate, 'macSoftware': defaultTemplate, 'song': defaultTemplate, 'album': defaultTemplate, 'movie': defaultTemplate, 'ebook': defaultTemplate } }
# # PySNMP MIB module EFDATA-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EFDATA-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:59: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) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, iso, Counter64, Counter32, Integer32, ModuleIdentity, enterprises, Unsigned32, ObjectIdentity, Gauge32, TimeTicks, MibIdentifier, NotificationType, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "iso", "Counter64", "Counter32", "Integer32", "ModuleIdentity", "enterprises", "Unsigned32", "ObjectIdentity", "Gauge32", "TimeTicks", "MibIdentifier", "NotificationType", "Bits") PhysAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "PhysAddress", "TextualConvention", "DisplayString") efdata = MibIdentifier((1, 3, 6, 1, 4, 1, 6247)) spectracast = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3)) dtmx5000 = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1)) cbGateway = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1)) cbStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1)) cbStatGeneral = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1)) cbStatNumBytesTXed = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatNumBytesTXed.setStatus('mandatory') if mibBuilder.loadTexts: cbStatNumBytesTXed.setDescription('Number of bytes transmitted since last statistics reset.') cbStatNumOfPackets = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatNumOfPackets.setStatus('mandatory') if mibBuilder.loadTexts: cbStatNumOfPackets.setDescription('Number of data packets transmitted since last statistics reset.') cbStatAvrPktSize = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatAvrPktSize.setStatus('mandatory') if mibBuilder.loadTexts: cbStatAvrPktSize.setDescription('Average packet size since last statistics reset.') cbStatAvrBytesPerSec = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatAvrBytesPerSec.setStatus('mandatory') if mibBuilder.loadTexts: cbStatAvrBytesPerSec.setDescription('Average speed in bytes per second since last statistics reset.') cbStatNumPacketDiscarded = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatNumPacketDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: cbStatNumPacketDiscarded.setDescription('Number of data packets that were discarded since last statistics reset.') cbStatNumNMSFrames = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatNumNMSFrames.setStatus('mandatory') if mibBuilder.loadTexts: cbStatNumNMSFrames.setDescription('Number of NMS packets received since last statistics reset.') cbCPULoad = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCPULoad.setStatus('mandatory') if mibBuilder.loadTexts: cbCPULoad.setDescription('Current CPU Load in percents (0-100).') cbMemoryUsage = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbMemoryUsage.setStatus('mandatory') if mibBuilder.loadTexts: cbMemoryUsage.setDescription('Current Memory Usage in percents (0-100).') cbStatReset = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: cbStatReset.setStatus('mandatory') if mibBuilder.loadTexts: cbStatReset.setDescription('Set to cbTrue in order to reset the general statistics values (either in active or non-active mode).') cbStatNumClients = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbStatNumClients.setStatus('mandatory') if mibBuilder.loadTexts: cbStatNumClients.setDescription('Number of clients currently connected to the Gateway. It is not part of the General Statistics since the cbStatReset does not change its value.') cbStatClient = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2)) cbClientIP = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbClientIP.setStatus('mandatory') if mibBuilder.loadTexts: cbClientIP.setDescription('The IP address of the client. The rest of the params in cbStatClient reffers to this IP. In order to get a statistics on a single clients, set cbClientIP to the IP of the desired client and get the results under cbClientStatistics. Continuously get operations of the rest of the params will give the updated statistics values without a need to set cbClientIP again and again.') cbClientStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2)) cbClNumSeconds = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClNumSeconds.setStatus('mandatory') if mibBuilder.loadTexts: cbClNumSeconds.setDescription('The number of seconds since the client statistics are active. The statistics values are reset automaticaly by the gateway (as well as by setting cbClReset) according to the value of cbFreqClientsInfoReset.') cbClNumKBytes = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClNumKBytes.setStatus('mandatory') if mibBuilder.loadTexts: cbClNumKBytes.setDescription('Number of bytes transmitted to IP==cbClientIP in the last cbClNumSeconds seconds.') cbClNumPackets = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClNumPackets.setStatus('mandatory') if mibBuilder.loadTexts: cbClNumPackets.setDescription('Number of packets transmitted to IP==cbClientIP in the last cbClNumSeconds seconds.') cbClAvrBytesPerSecond = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClAvrBytesPerSecond.setStatus('mandatory') if mibBuilder.loadTexts: cbClAvrBytesPerSecond.setDescription('Average transfer rate in bytes per second for this client.') cbClNumPacketsDiscarded = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClNumPacketsDiscarded.setStatus('mandatory') if mibBuilder.loadTexts: cbClNumPacketsDiscarded.setDescription('Number of packets discarded to IP==cbClientIP in the last cbClNumSeconds seconds.') cbClStatReset = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: cbClStatReset.setStatus('mandatory') if mibBuilder.loadTexts: cbClStatReset.setDescription('Set ot non-zero - Reset the statistics values for the client cbClientIP.') cbClEncrEnbled = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 2, 2, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClEncrEnbled.setStatus('mandatory') if mibBuilder.loadTexts: cbClEncrEnbled.setDescription('If this variable is True then the user desire encryption. This value may not changed and it is NOT changed by setting cbClStatReset.') cbStatClTable = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3)) cbClTable = MibTable((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1), ) if mibBuilder.loadTexts: cbClTable.setStatus('mandatory') if mibBuilder.loadTexts: cbClTable.setDescription('This table contains updated statistics of all clients known to the gateway.') cbClTableNode = MibTableRow((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1), ).setIndexNames((0, "EFDATA-MIB", "cbClTableIP")) if mibBuilder.loadTexts: cbClTableNode.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableNode.setDescription('Information about a particular client.') cbClTableIP = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTableIP.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableIP.setDescription('The clients IP.') cbClTableStampTime = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTableStampTime.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableStampTime.setDescription('The clients Stamp Time.') cbClTableStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTableStartTime.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableStartTime.setDescription('The clients Start Time.') cbClTableTotalPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTableTotalPackets.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableTotalPackets.setDescription('Total Packets transmitted to this client.') cbClTableBytesInSec = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTableBytesInSec.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableBytesInSec.setDescription('The clients Rate in Bytes/Sec.') cbClTablePacketsDiscr = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTablePacketsDiscr.setStatus('mandatory') if mibBuilder.loadTexts: cbClTablePacketsDiscr.setDescription('The Total Packets which were discarded to this client') cbClTableKBytesTxed = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbClTableKBytesTxed.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableKBytesTxed.setDescription('The Total KBytes transmitted to this client.') cbClTableReset = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 1, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbNo", 0), ("cbYes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbClTableReset.setStatus('mandatory') if mibBuilder.loadTexts: cbClTableReset.setDescription('Reset the client statistics.') cbConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2)) cbNetworkParam = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1)) cbNetGatewayMngIP = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbNetGatewayMngIP.setStatus('mandatory') if mibBuilder.loadTexts: cbNetGatewayMngIP.setDescription('C&M IP Address. Changing this parameter will affect after system reset.') cbNetGatewayMngSubnetMask = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbNetGatewayMngSubnetMask.setStatus('mandatory') if mibBuilder.loadTexts: cbNetGatewayMngSubnetMask.setDescription('C&M subnet mask. Changing this parameter will affect after system reset.') cbNetDefaultGateway = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetDefaultGateway.setStatus('mandatory') if mibBuilder.loadTexts: cbNetDefaultGateway.setDescription('The default gateway IP Address. The term gateway here, is reffering to another station in the same LAN of the CATV-Gateway. All IP packets that the CATV-Gateway is sending to the LAN (and not over the viedo) and their IP Address do not belong to the CATV-Gateway local ring will be sent to this gateway station unless cbNetDefaultGateway is 0.0.0.0 Changing this parameter will affect after system reset.') cbNetPromiscuous = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetPromiscuous.setStatus('mandatory') if mibBuilder.loadTexts: cbNetPromiscuous.setDescription('Enables/Disables Promiscuous Mode. Changing this parameter will affect after system reset.') cbNetUnregisteredUsers = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetUnregisteredUsers.setStatus('mandatory') if mibBuilder.loadTexts: cbNetUnregisteredUsers.setDescription('Enables/Disables Unregistered Users.') cbNetMulticast = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetMulticast.setStatus('mandatory') if mibBuilder.loadTexts: cbNetMulticast.setDescription('Enables/Disables receive Multicast Packets.') cbNetDualNIC = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetDualNIC.setStatus('mandatory') if mibBuilder.loadTexts: cbNetDualNIC.setDescription('Enables/Disables Transportation NIC Changing this parameter will affect after system reset.') cbNetGatewayDataIP = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 8), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetGatewayDataIP.setStatus('mandatory') if mibBuilder.loadTexts: cbNetGatewayDataIP.setDescription('Transportation IP Address. Changing this parameter will affect after system reset.') cbNetGatewayDataSubnetMask = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 9), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetGatewayDataSubnetMask.setStatus('mandatory') if mibBuilder.loadTexts: cbNetGatewayDataSubnetMask.setDescription('Transportation subnet mask. Changing this parameter will affect after system reset.') cbNetTelnet = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetTelnet.setStatus('mandatory') if mibBuilder.loadTexts: cbNetTelnet.setDescription('Enables/Disables the Telnet Server') cbNetFTP = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbNetFTP.setStatus('mandatory') if mibBuilder.loadTexts: cbNetFTP.setDescription('Enables/Disables the FTP Server') cbDVBOutputParam = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2)) cbDVBOutputBitRate = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBOutputBitRate.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBOutputBitRate.setDescription('PLL Frequency') cbDVBPAT = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBPAT.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBPAT.setDescription('PAT Rate') cbDVBPMT = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBPMT.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBPMT.setDescription('PMT Rate') cbDVBFraming = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cbFraming188", 1), ("cbFraming204", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBFraming.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBFraming.setDescription('188/204 Framing.') cbStuffingMode = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbFFStuffing", 0), ("cbAdaptationField", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStuffingMode.setStatus('mandatory') if mibBuilder.loadTexts: cbStuffingMode.setDescription('Stuffing mode: either FF stuffing or Adaptation field stuffing') cbMpeMode = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbPacked", 0), ("cbNotPacked", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMpeMode.setStatus('mandatory') if mibBuilder.loadTexts: cbMpeMode.setDescription('MPE mode: Packed MPE mode or Not packed MPE mode.') cbCRCMode = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("cbZero", 0), ("cbCheckSum", 1), ("cbCRC", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCRCMode.setStatus('mandatory') if mibBuilder.loadTexts: cbCRCMode.setDescription('CRC type') cbDVBClockPolarity = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbNotInverted", 0), ("cbInverted", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cbDVBClockPolarity.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBClockPolarity.setDescription('DVB Clock Polarity. (read only value - may be changed in CFG.INI only).') cbDVBAuxInput = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBAuxInput.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBAuxInput.setDescription('Aux Input Enable') cbDVBAuxNullPackets = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBAuxNullPackets.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBAuxNullPackets.setDescription('Aux Null Packets') cbDVBAuxInputType = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbASI", 1), ("cbLVDS", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBAuxInputType.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBAuxInputType.setDescription('Aux Input Type') cbDVBLlcSnap = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 2, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDVBLlcSnap.setStatus('mandatory') if mibBuilder.loadTexts: cbDVBLlcSnap.setDescription('Enable LLC-SNAP in MPE') cbGeneralParam = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3)) cbGatewayEnabled = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGatewayEnabled.setStatus('mandatory') if mibBuilder.loadTexts: cbGatewayEnabled.setDescription('Enables/Disables all the Gateway operations.') cbGatewaySWReset = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: cbGatewaySWReset.setStatus('mandatory') if mibBuilder.loadTexts: cbGatewaySWReset.setDescription('CAUTION: Setting this param to cbTrue cause a S/W reset of the gateway.') cbTraceInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 3)) cbTraceMask = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 3, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbTraceMask.setStatus('mandatory') if mibBuilder.loadTexts: cbTraceMask.setDescription('Mask to select elements for trace.') cbTraceLevel = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 3, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbTraceLevel.setStatus('mandatory') if mibBuilder.loadTexts: cbTraceLevel.setDescription('Trace level for elements specified by cbTraceMask') cbTraceOutputChannel = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("cbTraceToVGA", 1), ("cbTraceToCOM1", 2), ("cbTraceToCOM2", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbTraceOutputChannel.setStatus('mandatory') if mibBuilder.loadTexts: cbTraceOutputChannel.setDescription('Trace output channel.') cbPktEncrypt = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbPktEncrypt.setStatus('mandatory') if mibBuilder.loadTexts: cbPktEncrypt.setDescription('Enable/Disable encryption of the the transmitted packets. If cbPktEncrypt==cbTrue, packets will be encrypted only if cbClEncrEnable==cbTrue for that client.') cbGatewayDescription = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGatewayDescription.setStatus('mandatory') if mibBuilder.loadTexts: cbGatewayDescription.setDescription('A general description of this gateway. The description may be changed as needed.') cbSWVersion = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbSWVersion.setStatus('mandatory') if mibBuilder.loadTexts: cbSWVersion.setDescription('TV Gateway Software Version.') cbApplicationFileName = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 7), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbApplicationFileName.setStatus('mandatory') if mibBuilder.loadTexts: cbApplicationFileName.setDescription('TV Gateway Application Software File Name. Changing this parameter will affect after system reset.') cbDataMappingMode = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("cbDataStreaming", 2), ("cbProtocolEncapsulation", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDataMappingMode.setStatus('mandatory') if mibBuilder.loadTexts: cbDataMappingMode.setDescription('Data Boradcast Mode - Encodding mode of data from network.') cbMaxAllowableDelay = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMaxAllowableDelay.setStatus('mandatory') if mibBuilder.loadTexts: cbMaxAllowableDelay.setDescription('The Maximum allowable time (in mSec) which a packet can be delayed in the gateway. ') cbQualityOfService = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 10)) cbQOSMode = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 10, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("cbPermissive", 1), ("cbRestrictive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbQOSMode.setStatus('mandatory') if mibBuilder.loadTexts: cbQOSMode.setDescription('Permissive mode will allow transmit to users obove their maximum rate when when band-width is available. Restrictive mode will not transmit any data to users above their maximum rate even if band-width is available.') cbQOSActive = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 10, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbFalse", 0), ("cbTrue", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbQOSActive.setStatus('mandatory') if mibBuilder.loadTexts: cbQOSActive.setDescription('Turn on (cbTrue) or off (cbFalse) the Quality of Service mechanism. When Quality of Service is turned off, the minimum CIR promised to users is ignored and data is transffered to users in the order it is received from the Ethernet by the gateway.') cbFlushing = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbNo", 0), ("cbYes", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbFlushing.setStatus('mandatory') if mibBuilder.loadTexts: cbFlushing.setDescription('Flushing packets on IDLE') cbFPGAFileName = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 3, 13), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbFPGAFileName.setStatus('mandatory') if mibBuilder.loadTexts: cbFPGAFileName.setDescription("A string that holds the MCS file name loaded to the Gateway's Encoder. Changing this parameter will affect after system reset.") cbGroupsTable = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4)) cbGrTable = MibTable((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1), ) if mibBuilder.loadTexts: cbGrTable.setStatus('mandatory') if mibBuilder.loadTexts: cbGrTable.setDescription('This table contains the Groups definitions.') cbGroupsTableNode = MibTableRow((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1, 1), ).setIndexNames((0, "EFDATA-MIB", "cbGrTableIndex")) if mibBuilder.loadTexts: cbGroupsTableNode.setStatus('mandatory') if mibBuilder.loadTexts: cbGroupsTableNode.setDescription('Information about a particular group.') cbGrTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGrTableIndex.setStatus('mandatory') if mibBuilder.loadTexts: cbGrTableIndex.setDescription('Group Index.') cbGrTablePID = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGrTablePID.setStatus('mandatory') if mibBuilder.loadTexts: cbGrTablePID.setDescription('The Group PID.') cbGrTableQosMode = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbIndividual", 0), ("cbGlobal", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGrTableQosMode.setStatus('mandatory') if mibBuilder.loadTexts: cbGrTableQosMode.setDescription('The Group Qos Mode.') cbGrTableMinRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGrTableMinRate.setStatus('mandatory') if mibBuilder.loadTexts: cbGrTableMinRate.setDescription('The Group Minimum rate. This parameter affects only if QosMode=Global') cbGrTableMaxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 4, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbGrTableMaxRate.setStatus('mandatory') if mibBuilder.loadTexts: cbGrTableMaxRate.setDescription('The Group Maximum rate. This parameter affects only if QosMode=Global') cbConfigSTUTable = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5)) cbStaticUserTable = MibTable((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1), ) if mibBuilder.loadTexts: cbStaticUserTable.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserTable.setDescription('This table contains the all the static users.') cbStaticUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1), ).setIndexNames((0, "EFDATA-MIB", "cbStaticUserIP")) if mibBuilder.loadTexts: cbStaticUserEntry.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserEntry.setDescription('Information about a particular static user.') cbStaticUserIP = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStaticUserIP.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserIP.setDescription('IP of static user.') cbStaticUserMask = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStaticUserMask.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserMask.setDescription('The static user mask.') cbStaticUserGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStaticUserGroup.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserGroup.setDescription("The static user's Group.") cbStaticUserMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1, 4), PhysAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStaticUserMAC.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserMAC.setDescription('The group in which the static user resides.') cbStaticUserMinRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStaticUserMinRate.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserMinRate.setDescription('The static user Minimum rate (CIR).') cbStaticUserMaxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 5, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbStaticUserMaxRate.setStatus('mandatory') if mibBuilder.loadTexts: cbStaticUserMaxRate.setDescription('The static user Maximum rate.') cbConfigMulticastTable = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6)) cbMulticastTable = MibTable((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1), ) if mibBuilder.loadTexts: cbMulticastTable.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastTable.setDescription('This table contains the all the multicasts.') cbMulticastEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1, 1), ).setIndexNames((0, "EFDATA-MIB", "cbMulticastIP")) if mibBuilder.loadTexts: cbMulticastEntry.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastEntry.setDescription('Information about a particular multicast.') cbMulticastIP = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMulticastIP.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastIP.setDescription('IP of multicast.') cbMulticastGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMulticastGroup.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastGroup.setDescription("The multicast's Group.") cbMulticastSID = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMulticastSID.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastSID.setDescription('The group in which the multicast resides.') cbMulticastMinRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMulticastMinRate.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastMinRate.setDescription('The multicast Minimum rate (CIR).') cbMulticastMaxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 6, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbMulticastMaxRate.setStatus('mandatory') if mibBuilder.loadTexts: cbMulticastMaxRate.setDescription('The multicast Maximum rate.') cbConfigClTable = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7)) cbCfgClTable = MibTable((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1), ) if mibBuilder.loadTexts: cbCfgClTable.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTable.setDescription('This table contains updated configuration of all clients known to the gateway.') cbCfgClTableNode = MibTableRow((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1), ).setIndexNames((0, "EFDATA-MIB", "cbCfgClTableIP")) if mibBuilder.loadTexts: cbCfgClTableNode.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableNode.setDescription('Information about a particular client configuration.') cbCfgClTableIP = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableIP.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableIP.setDescription('The clients IP.') cbCfgClTableMask = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableMask.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableMask.setDescription('The clients IP Mask.') cbCfgClTableMAC = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 3), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableMAC.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableMAC.setDescription('The clients MAC Address.') cbCfgClTableGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableGroup.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableGroup.setDescription('The clients Group.') cbCfgClTableBy = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableBy.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableBy.setDescription('By whom the client was added.') cbCfgClTableMinRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableMinRate.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableMinRate.setDescription('The clients Minimum rate (CIR).') cbCfgClTableMaxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableMaxRate.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableMaxRate.setDescription('The clients Maximum rate.') cbCfgClTableEncrypt = MibTableColumn((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 7, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("cbFalse", 0), ("cbTrue", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cbCfgClTableEncrypt.setStatus('mandatory') if mibBuilder.loadTexts: cbCfgClTableEncrypt.setDescription('The clients Encryption parameter True/False.') cbTimeDate = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 8)) cbTime = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 8, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbTime.setStatus('mandatory') if mibBuilder.loadTexts: cbTime.setDescription('A string in the form HH:MM:SS that represents the gateway idea of the current time. Single digits should be preceeded by 0. Examples: 12:35:27 01:50:00 09:01:59') cbDate = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 8, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDate.setStatus('mandatory') if mibBuilder.loadTexts: cbDate.setDescription('A string representing the gateway idea of the current date. In order to set a different date, use the following format: <Full Month Name> <1 or 2 Digits of Day of Month>,<4 Digits of Year> Examples: September 1,1998 Januray 12, 2002') cbClientsInfoReset = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbClientsInfoReset.setStatus('mandatory') if mibBuilder.loadTexts: cbClientsInfoReset.setDescription('This parameter is applicable only for clients that were NOT added by the CCU. The gateway will delete from its lists clients information (statistics and encryption parameters) for each client registered in the system for more then cbTClientsInfoReset seconds. cbTClientsInfoReset must be greater then 0.') cbCCUParam = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10)) cbCCU1 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU1.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU1.setDescription('IP of CCU Server #1 (set to 0.0.0.0 to disable CCU #1)') cbCCU2 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU2.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU2.setDescription('IP of CCU Server #2 (set to 0.0.0.0 to disable CCU #2)') cbCCU3 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU3.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU3.setDescription('IP of CCU Server #3 (set to 0.0.0.0 to disable CCU #3)') cbCCU4 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 4), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU4.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU4.setDescription('IP of CCU Server #4 (set to 0.0.0.0 to disable CCU #4)') cbCCU5 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU5.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU5.setDescription('IP of CCU Server #5 (set to 0.0.0.0 to disable CCU #5)') cbCCU6 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 6), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU6.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU6.setDescription('IP of CCU Server #6 (set to 0.0.0.0 to disable CCU #6)') cbCCU7 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 7), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU7.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU7.setDescription('IP of CCU Server #7 (set to 0.0.0.0 to disable CCU #7)') cbCCU8 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 8), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU8.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU8.setDescription('IP of CCU Server #8 (set to 0.0.0.0 to disable CCU #8)') cbCCU9 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 9), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU9.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU9.setDescription('IP of CCU Server #9 (set to 0.0.0.0 to disable CCU #9)') cbCCU10 = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 10, 10), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbCCU10.setStatus('mandatory') if mibBuilder.loadTexts: cbCCU10.setDescription('IP of CCU Server #10 (set to 0.0.0.0 to disable CCU #10)') cbHASParam = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 11)) cbHasEnable = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 11, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbEnabled", 1), ("cbDisabled", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbHasEnable.setStatus('mandatory') if mibBuilder.loadTexts: cbHasEnable.setDescription('Enables/Disables High Availability Mode.') cbHasCpu = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 11, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbHasCpu.setStatus('mandatory') if mibBuilder.loadTexts: cbHasCpu.setDescription('Maximum CPU') cbHasMemory = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 2, 11, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbHasMemory.setStatus('mandatory') if mibBuilder.loadTexts: cbHasMemory.setDescription('Maximum Memory Usage') cbDiagnostics = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 3)) cbDiagTestTx = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 3, 1)) cbDiagTestTxParam = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 3, 1, 1)) cbTestTxDestIP = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 3, 1, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbTestTxDestIP.setStatus('mandatory') if mibBuilder.loadTexts: cbTestTxDestIP.setDescription('Test Transfer Packet ID') cbTestTxType = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("cbTestTypeOnePacket", 1), ("cbTestTypeLowSpeedCont", 2), ("cbTestTypeHighSpeedCont", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbTestTxType.setStatus('mandatory') if mibBuilder.loadTexts: cbTestTxType.setDescription('READ/WRITE Test Transfer Type: cbTestTypeOnePacket - one packet, cbTestTypeLowSpeedCont - Low Speed Continuous. cbTestTypeHighSpeedCont - High Speed Continuous.') cbDiagTestTxActive = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbDiagTestTxActive.setStatus('mandatory') if mibBuilder.loadTexts: cbDiagTestTxActive.setDescription('Set to 0 in order to stop Test Transfer. Set to non-0 in order to activate it. (in case cbTestTxType = 1, set to 0 and to non-zero in order to re-send the single test packet)') cbSWDownload = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4)) cbSWServerIP = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbSWServerIP.setStatus('mandatory') if mibBuilder.loadTexts: cbSWServerIP.setDescription('The TFTP server IP address. The S/W file will be TFTPed from this station. Use 0.0.0.0 to load a different local file (without TFTP).') cbAppDownload = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 2)) cbSWSourceFileName = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 2, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbSWSourceFileName.setStatus('mandatory') if mibBuilder.loadTexts: cbSWSourceFileName.setDescription('The software file name and its optional path (relative to the TFTP server root definition) to be downloaded from the server. Example: catvgw.dat') cbSWTargetFileName = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 2, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbSWTargetFileName.setStatus('mandatory') if mibBuilder.loadTexts: cbSWTargetFileName.setDescription('The S/W file name (without path) on the Gateway. Example: ram.abs WARNING: cbApplicationFileName (under cbGeneralParam) is the name of the running S/W. If cbSWTargetFileName is different from cbApplicationFileName, it will be just downloaded to the Gateway and not used until cbApplicationFileName will be changed (in CFG.INI) to be equal to cbSWTargetFileName.') cbSWDownloadStart = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: cbSWDownloadStart.setStatus('mandatory') if mibBuilder.loadTexts: cbSWDownloadStart.setDescription('Set cbSWDownloadStart to cbTrue in order to start the S/W download process. Set cbSWDownloadStart to cbFalse to interrupt (and stop) S/W download in progress (when cbSWDownloadStatus = cbDownloadInProgress).') cbSWDownloadStatus = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("cbIdle", 0), ("cbDownloadInProgress", 1), ("cbERRORTFTPServernotFound", 2), ("cbERRORFileNotFound", 3), ("cbERRORNotASWFile", 4), ("cbERRORBadChecksum", 5), ("cbERRORCommunicationFailed", 6), ("cbDownloadAborted", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cbSWDownloadStatus.setStatus('mandatory') if mibBuilder.loadTexts: cbSWDownloadStatus.setDescription('Status of SW Download: cbIdle - Download has not started yet or has comleted and gateway already restarted with new version (not an error). cbDownloadInProgress - Download is currently in progrees (not an error). cbERRORTFTPServernotFound - Cannot find a TFTP server in the specified IP address - check and correct cbSWServerIP. cbERRORFileNotFound - Cannot find the specified file - check and correct cbSWFileName. cbERRORNotaSWFile - The specified file is not a SW file - check and correct cbSWFileName. cbERRORBadChecksum - Bad checksum - try to download again. cbERRORCommunicationFailed - Communication with server failed - try to download again. cbDownloadAborted - Download aborted by SNMP manager (cbSWDownloadStart was set to cbFalse during download).') cbFPGADownload = MibIdentifier((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 3)) cbFPGASourceFileName = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 3, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbFPGASourceFileName.setStatus('mandatory') if mibBuilder.loadTexts: cbFPGASourceFileName.setDescription('The FPGA file name and its optional path (relative to the TFTP server root definition) to be downloaded from the server. Example: FPGA.DAT') cbFPGATargetFileName = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 3, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cbFPGATargetFileName.setStatus('mandatory') if mibBuilder.loadTexts: cbFPGATargetFileName.setDescription('The FPGA file name (without path) on the Gateway. Example: FPGA.DAT') cbFPGADownloadStart = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("cbTrue", 1), ("cbFalse", 0)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: cbFPGADownloadStart.setStatus('mandatory') if mibBuilder.loadTexts: cbFPGADownloadStart.setDescription('Set cbFPGADownloadStart to cbTrue in order to start the FPGA download process. Set cbFPGADownloadStart to cbFalse to interrupt (and stop) FPGA download in progress (when cbFPGADownloadStatus = cbDownloadInProgress).') cbFPGADownloadStatus = MibScalar((1, 3, 6, 1, 4, 1, 6247, 3, 1, 1, 4, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("cbIdle", 0), ("cbDownloadInProgress", 1), ("cbERRORTFTPServernotFound", 2), ("cbERRORFileNotFound", 3), ("cbERRORNotASWFile", 4), ("cbERRORBadChecksum", 5), ("cbERRORCommunicationFailed", 6), ("cbDownloadAborted", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cbFPGADownloadStatus.setStatus('mandatory') if mibBuilder.loadTexts: cbFPGADownloadStatus.setDescription('Status of FPGA Download: cbIdle - Download has not started yet or has comleted and gateway already restarted with new version (not an error). cbDownloadInProgress - Download is currently in progrees (not an error). cbERRORTFTPServernotFound - Cannot find a TFTP server in the specified IP address - check and correct cbSWServerIP. cbERRORFileNotFound - Cannot find the specified file - check and correct cbFPGAFileName. cbERRORNotaSWFile - The specified file is not a SW file - check and correct cbFPGAFileName. cbERRORBadChecksum - Bad checksum - try to download again. cbERRORCommunicationFailed - Communication with server failed - try to download again. cbDownloadAborted - Download aborted by SNMP manager (cbFPGADownloadStart was set to cbFalse during download).') mibBuilder.exportSymbols("EFDATA-MIB", cbClNumPacketsDiscarded=cbClNumPacketsDiscarded, cbClStatReset=cbClStatReset, cbNetGatewayDataSubnetMask=cbNetGatewayDataSubnetMask, cbStatClient=cbStatClient, cbSWDownloadStart=cbSWDownloadStart, cbFPGASourceFileName=cbFPGASourceFileName, cbStatAvrBytesPerSec=cbStatAvrBytesPerSec, cbStatNumOfPackets=cbStatNumOfPackets, cbQOSMode=cbQOSMode, cbFlushing=cbFlushing, cbStatNumPacketDiscarded=cbStatNumPacketDiscarded, cbClNumKBytes=cbClNumKBytes, cbStatAvrPktSize=cbStatAvrPktSize, cbStaticUserMaxRate=cbStaticUserMaxRate, cbGrTableMaxRate=cbGrTableMaxRate, cbStaticUserEntry=cbStaticUserEntry, cbQualityOfService=cbQualityOfService, cbGroupsTableNode=cbGroupsTableNode, cbCfgClTableMask=cbCfgClTableMask, cbMulticastEntry=cbMulticastEntry, cbFPGADownload=cbFPGADownload, cbDVBFraming=cbDVBFraming, cbClientStatistics=cbClientStatistics, cbCfgClTableMAC=cbCfgClTableMAC, cbCCU2=cbCCU2, cbDataMappingMode=cbDataMappingMode, cbCCU3=cbCCU3, cbGatewaySWReset=cbGatewaySWReset, cbStaticUserIP=cbStaticUserIP, cbCCU4=cbCCU4, cbCfgClTableMinRate=cbCfgClTableMinRate, cbClTableIP=cbClTableIP, cbClientIP=cbClientIP, cbCCU7=cbCCU7, cbDVBOutputBitRate=cbDVBOutputBitRate, cbGroupsTable=cbGroupsTable, cbCfgClTableEncrypt=cbCfgClTableEncrypt, dtmx5000=dtmx5000, cbMulticastGroup=cbMulticastGroup, spectracast=spectracast, cbSWTargetFileName=cbSWTargetFileName, cbMpeMode=cbMpeMode, cbStaticUserTable=cbStaticUserTable, cbAppDownload=cbAppDownload, cbMulticastSID=cbMulticastSID, cbPktEncrypt=cbPktEncrypt, cbCfgClTableBy=cbCfgClTableBy, cbFPGADownloadStart=cbFPGADownloadStart, cbConfigClTable=cbConfigClTable, cbClTableStampTime=cbClTableStampTime, cbDVBPMT=cbDVBPMT, cbStatNumBytesTXed=cbStatNumBytesTXed, cbHasEnable=cbHasEnable, cbCCU6=cbCCU6, cbNetGatewayMngIP=cbNetGatewayMngIP, cbCCU10=cbCCU10, cbTestTxDestIP=cbTestTxDestIP, cbTraceOutputChannel=cbTraceOutputChannel, cbStatNumNMSFrames=cbStatNumNMSFrames, cbSWDownloadStatus=cbSWDownloadStatus, cbHasCpu=cbHasCpu, cbClTableStartTime=cbClTableStartTime, cbQOSActive=cbQOSActive, cbConfigMulticastTable=cbConfigMulticastTable, efdata=efdata, cbDate=cbDate, cbDVBOutputParam=cbDVBOutputParam, cbDVBAuxInputType=cbDVBAuxInputType, cbDVBAuxNullPackets=cbDVBAuxNullPackets, cbDVBAuxInput=cbDVBAuxInput, cbNetGatewayDataIP=cbNetGatewayDataIP, cbStatReset=cbStatReset, cbClTableNode=cbClTableNode, cbGrTableQosMode=cbGrTableQosMode, cbNetFTP=cbNetFTP, cbDiagTestTxParam=cbDiagTestTxParam, cbGrTablePID=cbGrTablePID, cbNetTelnet=cbNetTelnet, cbApplicationFileName=cbApplicationFileName, cbDiagnostics=cbDiagnostics, cbMemoryUsage=cbMemoryUsage, cbTimeDate=cbTimeDate, cbClTableBytesInSec=cbClTableBytesInSec, cbCfgClTableGroup=cbCfgClTableGroup, cbGeneralParam=cbGeneralParam, cbStaticUserMinRate=cbStaticUserMinRate, cbClientsInfoReset=cbClientsInfoReset, cbTraceLevel=cbTraceLevel, cbClAvrBytesPerSecond=cbClAvrBytesPerSecond, cbHasMemory=cbHasMemory, cbNetworkParam=cbNetworkParam, cbStaticUserMAC=cbStaticUserMAC, cbStatGeneral=cbStatGeneral, cbMulticastTable=cbMulticastTable, cbConfig=cbConfig, cbDVBClockPolarity=cbDVBClockPolarity, cbFPGADownloadStatus=cbFPGADownloadStatus, cbClTablePacketsDiscr=cbClTablePacketsDiscr, cbClEncrEnbled=cbClEncrEnbled, cbClTableReset=cbClTableReset, cbCCU9=cbCCU9, cbNetPromiscuous=cbNetPromiscuous, cbCfgClTableMaxRate=cbCfgClTableMaxRate, cbMulticastMaxRate=cbMulticastMaxRate, cbClNumSeconds=cbClNumSeconds, cbSWVersion=cbSWVersion, cbGateway=cbGateway, cbDiagTestTx=cbDiagTestTx, cbTraceMask=cbTraceMask, cbTestTxType=cbTestTxType, cbCRCMode=cbCRCMode, cbClTableKBytesTxed=cbClTableKBytesTxed, cbCCU5=cbCCU5, cbHASParam=cbHASParam, cbTraceInfo=cbTraceInfo, cbTime=cbTime, cbClNumPackets=cbClNumPackets, cbStatNumClients=cbStatNumClients, cbGatewayEnabled=cbGatewayEnabled, cbDVBPAT=cbDVBPAT, cbNetDefaultGateway=cbNetDefaultGateway, cbMulticastIP=cbMulticastIP, cbStatistics=cbStatistics, cbCPULoad=cbCPULoad, cbCfgClTableIP=cbCfgClTableIP, cbFPGATargetFileName=cbFPGATargetFileName, cbStaticUserMask=cbStaticUserMask, cbCCU1=cbCCU1, cbCfgClTableNode=cbCfgClTableNode, cbSWServerIP=cbSWServerIP, cbClTable=cbClTable, cbStaticUserGroup=cbStaticUserGroup, cbNetGatewayMngSubnetMask=cbNetGatewayMngSubnetMask, cbCCUParam=cbCCUParam, cbCfgClTable=cbCfgClTable, cbConfigSTUTable=cbConfigSTUTable, cbGatewayDescription=cbGatewayDescription, cbNetUnregisteredUsers=cbNetUnregisteredUsers, cbStuffingMode=cbStuffingMode, cbSWDownload=cbSWDownload, cbCCU8=cbCCU8, cbNetDualNIC=cbNetDualNIC, cbNetMulticast=cbNetMulticast, cbDVBLlcSnap=cbDVBLlcSnap, cbFPGAFileName=cbFPGAFileName, cbGrTableIndex=cbGrTableIndex, cbClTableTotalPackets=cbClTableTotalPackets, cbGrTableMinRate=cbGrTableMinRate, cbMulticastMinRate=cbMulticastMinRate, cbMaxAllowableDelay=cbMaxAllowableDelay, cbGrTable=cbGrTable, cbStatClTable=cbStatClTable, cbSWSourceFileName=cbSWSourceFileName, cbDiagTestTxActive=cbDiagTestTxActive)
# Cutting a Rod # Given a rod of length n inches and an array of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if length of the rod is 8 and the values of different pieces are given as following, then the maximum obtainable value is 22 (by cutting in two pieces of lengths 2 and 6) def rodCutting(pieces, n): cut = [0 for _ in range(n+1)] cut[0] = 0 for i in range(1, n+1): mv = -9999999 for j in range(i): mv = max(mv, pieces[j] + cut[i-j-1]) cut[i] = mv return cut[n] pieces = list(map(int, input().split(', '))) print(rodCutting(pieces, len(pieces)))
""" programa que leia vários números inteiros pelo teclado. No final da execução, mostre a média entre todos os valores e qual foi o maior e menor valores lidos. O programa deve perguntar ao usuário se ele quer ou não continuar a digitar valores """ resp = 'S' media = quantidade = soma = maior = menor = 0 while resp in 'Ss': numero = int(input('Digite um número: ')) soma += numero quantidade += 1 resp = str(input('Quer continuar? [S/N]: ')).upper().strip()[0] if quantidade == 1: maior = menor = numero else: if numero > maior: maior = numero elif numero < menor: menor = numero media = soma / quantidade print(f'Você informou {quantidade} numeros') print(f'A médias dos valores informados é {media}') print(f'O maior valor foi {maior} e o menor foi {menor}')
print('\033[4;33;45mPrograma de financiamento\033[m') casa=float(input('Qual o valor da casa? ')) salário=float(input('Qual o seu salário? ')) tempo=int(input('Quantos anos para pagar? ')) tempo_meses=int(tempo * 12) salário_usável=salário * 0.30 prestação = casa/tempo_meses cálculo=salário_usável * tempo_meses if cálculo >= casa: print('Empréstimo aprovado e o valor da prestação será {:.2f}'.format((prestação))) elif cálculo < casa: print('Empréstimo negado.')
#!/usr/bin/python ################################################################################ # # class that represents a shift register object # ################################################################################ class Shifter: # pins connected to the 74HC595's GPIO_CLOCK=-1 # clock pin GPIO_DATA=-1 # data pin GPIO_LATCH=-1 # latch pin GPIO=None # reference to the calling programs GPIO instance # initialize shifter def __init__(self,gpio,clock,data,latch): # store the pin numbers used for GPIO self.GPIO=gpio self.GPIO_CLOCK=clock self.GPIO_DATA=data self.GPIO_LATCH=latch # shift one bit out def shiftOut(self,bit): # set or clear data bit self.GPIO.output(self.GPIO_DATA,self.GPIO.LOW if (bit==0) else self.GPIO.HIGH) # strobe clock self.GPIO.output(self.GPIO_CLOCK, self.GPIO.HIGH) self.GPIO.output(self.GPIO_CLOCK, self.GPIO.LOW) # shift n bits out def shiftNBitsOut(self,bits,numBits): # loop through numBits bits starting with LSB while numBits>0: # shift out the lowest bit self.shiftOut(0 if (bits & 1) == 0 else 1) # shift all bits to the right (discarding lowest bit) bits>>=1 # decrement the number of bits needed to send and loop numBits-=1 # latch the output def latch(self): #strobe latch self.GPIO.output(self.GPIO_LATCH, self.GPIO.HIGH) self.GPIO.output(self.GPIO_LATCH, self.GPIO.LOW)
#!/bin/python3 def minimum_range_activations(locations): n = len(locations) dp = [-1] * n for i in range(n): left_index = max(i - locations[i], 0) right_index = min(i + (locations[i] + 1), n) dp[left_index] = max(dp[left_index], right_index) # Initializations, starting range count = 1 right_index = dp[0] next_index = dp[i] for i in range(n): next_index = max(next_index, dp[i]) # Reaching end of current range if (i == right_index): # Adding to count count += 1 # Moving to rightmost index found thus far right_index = next_index return count a = [2, 1, 1] print(minimum_range_activations(a))
#!/usr/bin/env python ''' Copyright (C) 2020, WAFW00F Developers. See the LICENSE file for copying permission. ''' NAME = 'Sitelock (TrueShield)' # Well this is confusing, Sitelock itself uses Incapsula from Imperva # So the fingerprints obtained on blockpage are similar to those of Incapsula. def is_waf(self): schemes = [ self.matchContent(r"SiteLock will remember you"), self.matchContent(r"Sitelock is leader in Business Website Security Services"), self.matchContent(r"sitelock[_\-]shield([_\-]logo|[\-_]badge)?"), self.matchContent(r'SiteLock incident ID') ] if any(i for i in schemes): return True return False
# Habitat configs # This should be sourced by the training script, # which must save a sacred experiment in the variable "ex" # For descriptions of all fields, see configs/core.py #################################### # Standard methods #################################### @ex.named_config def taskonomy_features(): ''' Implements an agent with some mid-level feature. From the paper: From Learning to Navigate Using Mid-Level Visual Priors (Sax et al. '19) Taskonomy: Disentangling Task Transfer Learning Amir R. Zamir, Alexander Sax*, William B. Shen*, Leonidas Guibas, Jitendra Malik, Silvio Savarese. 2018 Viable feature options are: [] ''' uuid = 'habitat_taskonomy_feature' cfg = {} cfg['learner'] = { 'perception_network': 'TaskonomyFeaturesOnlyNet', 'perception_network_kwargs': { 'extra_kwargs': { 'main_perception_network': 'TaskonomyFeaturesOnlyNet', # for sidetune } } } cfg['env'] = { 'env_specific_kwargs': { 'target_dim': 16, # Taskonomy reps: 16, scratch: 9, map_only: 1 }, 'transform_fn_pre_aggregation_fn': 'TransformFactory.independent', 'transform_fn_pre_aggregation_kwargs': { 'names_to_transforms': { 'taskonomy':'rescale_centercrop_resize((3,256,256))', }, }, 'transform_fn_post_aggregation_fn': 'TransformFactory.independent', 'transform_fn_post_aggregation_kwargs': { 'names_to_transforms': { 'taskonomy':"taskonomy_features_transform('/mnt/models/curvature_encoder.dat')", }, 'keep_unnamed': True, } } @ex.named_config def blind(): ''' Implements a blinded agent. This has no visual input, but is still able to reason about its movement via path integration. ''' uuid = 'blind' cfg = {} cfg['learner'] = { 'perception_network': 'TaskonomyFeaturesOnlyNet', } cfg['env'] = { 'env_specific_kwargs': { 'target_dim': 16, # Taskonomy reps: 16, scratch: 9, map_only: 1 }, 'transform_fn_pre_aggregation_fn': 'TransformFactory.independent', 'transform_fn_pre_aggregation_kwargs': { 'names_to_transforms': { 'taskonomy': 'blind((8,16,16))', # 'rgb_filled': 'rescale_centercrop_resize((3,84,84))', }, }, } @ex.named_config def midtune(): # Specific type of finetune where we train the policy then open the representation to be learned. # Specifically, we take trained midlevel agents and finetune all the weights. uuid = 'habitat_midtune' cfg = {} cfg['learner'] = { 'perception_network_reinit': True, # reinitialize the perception_module, used when checkpoint is used 'rollout_value_batch_multiplier': 1, 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'main_perception_network': 'TaskonomyFeaturesOnlyNet', # for sidetune 'sidetune_kwargs': { 'n_channels_in': 3, 'n_channels_out': 8, 'normalize_pre_transfer': False, 'base_class': 'FCN5', 'base_kwargs': {'normalize_outputs': False}, 'base_weights_path': None, # user needs to specify 'side_class': 'FCN5', 'side_kwargs': {'normalize_outputs': False}, 'side_weights_path': None, # user needs to specify } } }, } cfg['saving'] = { 'checkpoint': None, } cfg['env'] = { 'env_specific_kwargs': { 'target_dim': 16, # Taskonomy reps: 16, scratch: 9, map_only: 1 }, 'transform_fn_pre_aggregation_fn': 'TransformFactory.independent', 'transform_fn_pre_aggregation_kwargs': { 'names_to_transforms': { 'rgb_filled': 'rescale_centercrop_resize((3,256,256))', }, }, } @ex.named_config def finetune(): uuid = 'habitat_finetune' cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'main_perception_network': 'TaskonomyFeaturesOnlyNet', # for sidetune 'sidetune_kwargs': { 'n_channels_in': 3, 'n_channels_out': 8, 'normalize_pre_transfer': False, 'side_class': 'FCN5', 'side_kwargs': {'normalize_outputs': False}, 'side_weights_path': None, # user needs to specify } } }, 'rollout_value_batch_multiplier': 1, } cfg['env'] = { 'env_specific_kwargs': { 'target_dim': 16, # Taskonomy reps: 16, scratch: 9, map_only: 1 }, 'transform_fn_pre_aggregation_fn': 'TransformFactory.independent', 'transform_fn_pre_aggregation_kwargs': { 'names_to_transforms': { 'rgb_filled': 'rescale_centercrop_resize((3,256,256))', }, }, } @ex.named_config def sidetune(): uuid = 'habitat_sidetune' cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'n_channels_in': 3, 'n_channels_out': 8, 'normalize_pre_transfer': False, 'base_class': 'TaskonomyEncoder', 'base_weights_path': None, 'base_kwargs': {'eval_only': True, 'normalize_outputs': False}, 'side_class': 'FCN5', 'side_kwargs': {'normalize_outputs': False}, 'side_weights_path': None, 'alpha_blend': True, }, 'attrs_to_remember': ['base_encoding', 'side_output', 'merged_encoding'], # things to remember for supp. losses / visualization } }, 'rollout_value_batch_multiplier': 1, } cfg['env'] = { 'transform_fn_pre_aggregation_fn': 'TransformFactory.independent', 'transform_fn_pre_aggregation_kwargs': { 'names_to_transforms': { 'rgb_filled': 'rescale_centercrop_resize((3,256,256))', }, }, } #################################### # Base Network #################################### @ex.named_config def rlgsn_base_resnet50(): # base is frozen by default cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'base_class': 'TaskonomyEncoder', 'base_weights_path': None, # user needs to input 'base_kwargs': {'eval_only': True, 'normalize_outputs': False}, } } }, } @ex.named_config def rlgsn_base_fcn5s(): # base is frozen by default cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'base_class': 'FCN5', 'base_weights_path': None, # user needs to input 'base_kwargs': {'eval_only': True, 'normalize_outputs': False}, } } }, } @ex.named_config def rlgsn_base_learned(): cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'base_kwargs': {'eval_only': False}, } } }, } #################################### # Side Network #################################### @ex.named_config def rlgsn_side_resnet50(): # side is learned by default cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'side_class': 'TaskonomyEncoder', 'side_weights_path': None, # user needs to input 'side_kwargs': {'eval_only': False, 'normalize_outputs': False}, } } }, } @ex.named_config def rlgsn_side_fcn5s(): # side is learned by default cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'side_class': 'FCN5', 'side_weights_path': None, # user needs to input 'side_kwargs': {'eval_only': False, 'normalize_outputs': False}, } } }, } @ex.named_config def rlgsn_side_frozen(): cfg = {} cfg['learner'] = { 'perception_network': 'RLSidetuneWrapper', 'perception_network_kwargs': { 'extra_kwargs': { 'sidetune_kwargs': { 'side_kwargs': {'eval_only': True}, } } }, }
f=open("./CoA/2020/data/03a.txt","r") count1=0 positionr1=0 count3=0 positionr3=0 count5=0 positionr5=0 count7=0 positionr7=0 countdouble=0 positionrdouble=0 line_count=0 for line in f: line=line.strip() relpos1=positionr1%(len(line)) relpos3=positionr3%(len(line)) relpos5=positionr5%(len(line)) relpos7=positionr7%(len(line)) relposdouble=positionrdouble%(len(line)) if line[relpos1]=="#": count1+=1 if line[relpos3]=="#": count3+=1 if line[relpos5]=="#": count5+=1 if line[relpos7]=="#": count7+=1 if line_count%2==0: if line[relposdouble]=="#": countdouble+=1 positionrdouble+=1 positionr1+=1 positionr3+=3 positionr5+=5 positionr7+=7 line_count+=1 print(count1) print(count3) print(count5) print(count7) print(countdouble) print(count1*count3*count5*count7*countdouble)
target_module = "streamcontrol.obsmanager" def test_obs_websocket_manager_new(get_handler): """Should create an inner instance when called""" ows = get_handler(target_module) myt = ows.OBSWebSocketManager.__new__(ows.OBSWebSocketManager) assert isinstance(myt.instance, ows.OBSWebSocketManager) def test_obs_websocket_manager_enter(get_handler): """Must return self""" ows = get_handler(target_module) enter_out = ows.OBSWebSocketManager.__enter__(ows) assert enter_out == ows def test_obs_websocket_manager_exit(get_handler, mocker): """Must disconnect websocket""" ows = get_handler(target_module) exit_mock = mocker.Mock() ows.OBSWebSocketManager.__exit__(exit_mock, 1, 2, 3) assert exit_mock.disconnect.called def test_obs_websocket_manager_init(get_handler, mocker): """Should connect websocket if not connected""" ows = get_handler(target_module) init_mock = mocker.Mock() init_mock.is_connected.return_value = False ows.OBSWebSocketManager.__init__(init_mock) assert init_mock.connect.called init_mock.reset_mock() init_mock.is_connected.return_value = True ows.OBSWebSocketManager.__init__(init_mock) assert init_mock.connect.called is False def test_obs_websocket_manager_is_connected(get_handler, mocker): ows = get_handler(target_module) connect_mock = mocker.Mock() """Should return true if connected""" assert ows.OBSWebSocketManager.is_connected(connect_mock) """Should return false if None""" connect_mock.ws = None assert not ows.OBSWebSocketManager.is_connected(connect_mock) """Should return false if ws not found""" mocker.patch.object(ows, "hasattr", return_value=False) assert not ows.OBSWebSocketManager.is_connected(connect_mock) def test_obs_websocket_manager_connect(get_handler, mocker): ows = get_handler(target_module) ws_mock = mocker.Mock() mocker.patch.object(ows, "obsws", return_value=ws_mock) """Should not connect if already connected""" ws_mock.is_connected.return_value = True ows.OBSWebSocketManager.connect(ws_mock) ws_mock.ws.connect.assert_not_called() """Should connect if not connected""" ws_mock.is_connected.return_value = False ows.OBSWebSocketManager.connect(ws_mock) ws_mock.ws.connect.assert_called() def test_obs_websocket_manager_disconnect(get_handler, mocker): ows = get_handler(target_module) disconnect_mock = mocker.Mock() """Should not not disconnect if not connected""" disconnect_mock.is_connected.return_value = False ows.OBSWebSocketManager.disconnect(disconnect_mock) disconnect_mock.ws.disconnect.assert_not_called() """Should disconnect if connected""" disconnect_mock.is_connected.return_value = True ows.OBSWebSocketManager.disconnect(disconnect_mock) disconnect_mock.ws.disconnect.assert_called()
# Returns strand-sensitive order between two genomic coordinates def leq_strand(coord1, coord2, strand_mode): if strand_mode == "+": return coord1 <= coord2 else: # strand_mode == "-" return coord1 >= coord2 # Converts a binary adjacency matrix to a list of directed edges def to_adj_list(adj_matrix): adj_list = [] assert(adj_matrix.shape[0] == adj_matrix.shape[1]) for idx in range(adj_matrix.shape[0]): for jdx in range(adj_matrix.shape[0]): if adj_matrix[idx, jdx] == 1 and idx <= jdx: adj_list.append([idx, jdx]) return adj_list # Returns a list of successors by vertex, sensitive to the read strand def to_adj_succ_list(adj_matrix, vertex_map, read_strand): succ_list = {} assert(adj_matrix.shape[0] == adj_matrix.shape[1]) for idx in range(adj_matrix.shape[0]): succ_list[idx] = [] for jdx in range(adj_matrix.shape[0]): if adj_matrix[idx, jdx] == 1: if read_strand == "+" and vertex_map[0][idx] <= vertex_map[0][jdx] or read_strand == "-" \ and vertex_map[1][idx] >= vertex_map[1][jdx]: succ_list[idx].append(jdx) return succ_list # Prints adjacency list representation of matrix def print_adj_list(adj_list): print("EDGES: ") for edge in adj_list: print("{} -> {}".format(edge[0], edge[1])) # Translate a DNA sequence encoding a peptide to amino-acid sequence via RNA def translate_dna_to_peptide(dna_str): codontable = { 'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M', 'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T', 'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K', 'AGC': 'S', 'AGT': 'S', 'AGA': 'R', 'AGG': 'R', 'CTA': 'L', 'CTC': 'L', 'CTG': 'L', 'CTT': 'L', 'CCA': 'P', 'CCC': 'P', 'CCG': 'P', 'CCT': 'P', 'CAC': 'H', 'CAT': 'H', 'CAA': 'Q', 'CAG': 'Q', 'CGA': 'R', 'CGC': 'R', 'CGG': 'R', 'CGT': 'R', 'GTA': 'V', 'GTC': 'V', 'GTG': 'V', 'GTT': 'V', 'GCA': 'A', 'GCC': 'A', 'GCG': 'A', 'GCT': 'A', 'GAC': 'D', 'GAT': 'D', 'GAA': 'E', 'GAG': 'E', 'GGA': 'G', 'GGC': 'G', 'GGG': 'G', 'GGT': 'G', 'TCA': 'S', 'TCC': 'S', 'TCG': 'S', 'TCT': 'S', 'TTC': 'F', 'TTT': 'F', 'TTA': 'L', 'TTG': 'L', 'TAC': 'Y', 'TAT': 'Y', 'TAA': '_', 'TAG': '_', 'TGC': 'C', 'TGT': 'C', 'TGA': '_', 'TGG': 'W' } dna_str = dna_str.upper() aa_str = list("X"*(len(dna_str)/3)) for idx in range(0, len(dna_str), 3): codon = dna_str[idx:idx+3] if len(codon) < 3: break if "N" in codon: aa_str[idx/3] = 'X' else: aa_str[idx/3] = codontable[codon] return "".join(aa_str) # Returns true if there is a stop codon in the sequence. All codons that are fully in the # interval [start_coord<->end_coord] are checked. # seq: Nucleotide sequence of vertex/CDS region # start_coord: Read start coordinate # stop_coord: Read stop coordinate # strand: Read direction, one of {"+","-"} def has_stop_codon_initial(seq, start_coord, end_coord, strand): if strand == "+": assert(start_coord <= end_coord) substr = seq[start_coord-1:end_coord] else: # strand=="-" assert(start_coord >= end_coord) substr = complementary_seq(seq[end_coord-1:start_coord][::-1]) for idx in range(0, len(substr)-2, 3): nuc_frame = substr[idx:idx+3] if nuc_frame.lower() in ["tag", "taa", "tga"]: return True return False # Returns the to-from peptide frame depending on read strand and read_frame of the emitting vertex, returns # the stop codon in the second result. # <emitting_frame>: Read frame of the emitting exon # <strand>: Read strand # <peptide_prop_seq_ref>: Reference sequence of the propagating exon # <peptide_accept_seq_ref>: Reference sequence of the accepting exon # <peptide_prop_seq_mut>: Mutated sequence of the propagating exon # <peptide_accept_seq_mut>: Mutated sequence of the accepting exon # <peptide_prop_coord>: Gene coordinate of the propagating exon # <peptide_accept_coord>: Gene coordinate of the accepting exon def cross_peptide_result(emitting_frame, strand, peptide_prop_seq_ref, peptide_accept_seq_ref, peptide_prop_seq_mut, peptide_accept_seq_mut, peptide_prop_coord, peptide_accept_coord): assert(len(peptide_prop_seq_mut) == len(peptide_prop_seq_ref)) assert(len(peptide_accept_seq_mut) == len(peptide_accept_seq_ref)) comp_read_frame = (3-emitting_frame) % 3 prop_rest = (len(peptide_prop_seq_mut)-emitting_frame) % 3 accept_rest = (len(peptide_accept_seq_mut)-comp_read_frame) % 3 cor_accept_rest = -1*accept_rest if accept_rest > 0 else len(peptide_accept_seq_mut) if strand == "+": peptide_dna_str_mut = peptide_prop_seq_mut[prop_rest:]+peptide_accept_seq_mut[:cor_accept_rest] peptide_dna_str_ref = peptide_prop_seq_ref[prop_rest:]+peptide_accept_seq_ref[:cor_accept_rest] peptide_start_coord_v1 = peptide_prop_coord[0]+prop_rest peptide_stop_coord_v1 = peptide_prop_coord[1] peptide_start_coord_v2 = peptide_accept_coord[0] peptide_stop_coord_v2 = peptide_accept_coord[1]-accept_rest else: # strand=="-" peptide_dna_str_mut = complementary_seq(peptide_prop_seq_mut[::-1][prop_rest:]+peptide_accept_seq_mut[::-1][:cor_accept_rest]) peptide_dna_str_ref = complementary_seq(peptide_prop_seq_ref[::-1][prop_rest:]+peptide_accept_seq_ref[::-1][:cor_accept_rest]) peptide_stop_coord_v1 = peptide_prop_coord[1]-prop_rest peptide_start_coord_v1 = peptide_prop_coord[0] peptide_stop_coord_v2 = peptide_accept_coord[1] peptide_start_coord_v2 = peptide_accept_coord[0]+accept_rest assert(len(peptide_dna_str_mut) == len(peptide_dna_str_ref)) peptide_mut = translate_dna_to_peptide(peptide_dna_str_mut) peptide_ref = translate_dna_to_peptide(peptide_dna_str_ref) stop_codon_mut = False assert(len(peptide_dna_str_mut) % 3 == 0) # Detect pre/post junction stop codon in the sequence for idx in range(0, len(peptide_dna_str_mut), 3): nuc_frame = peptide_dna_str_mut[idx:idx+3] if nuc_frame.lower() in ["tag", "taa", "tga"]: stop_codon_mut = True break return (peptide_mut, peptide_ref, peptide_start_coord_v1+1, peptide_stop_coord_v1, peptide_start_coord_v2+1, peptide_stop_coord_v2, stop_codon_mut) # Returns true if there is a stop codon found spanning the two sequences # seq_prop: Propagating sequence # seq_accept: Accepting sequence # read_frame: Read frame of propagating vertex # strand: Direction of read strand def has_stop_codon_cross(seq_prop, seq_accept, read_frame, strand): if strand == "+": check_seq = seq_prop[-read_frame:]+seq_accept else: # strand=="-" check_seq = seq_prop[::-1][-read_frame:]+seq_accept[::-1] for idx in range(0, len(check_seq)-2, 3): nuc_frame = check_seq[idx:idx+3] if nuc_frame.lower() in ["tag", "taa", "tga"]: return True return False # Yields the complementary DNA sequence # dna_seq: Input nucleotide sequence def complementary_seq(dna_seq): comp_dict = {"A": "T", "T": "A", "C": "G", "G": "C"} comp_dict_keys = comp_dict.keys() return "".join(map(lambda nuc: comp_dict[nuc] if nuc in comp_dict_keys else nuc, dna_seq)) # Encodes chromosome to same cn def encode_chromosome(in_num): convert_dict = {23: "X", 24: "Y", 25: "MT"} return convert_dict[in_num] if in_num in convert_dict.keys() else str(in_num)
""" Projeto: Boletim com listas compostas """ studentGrade = [] counter = 0 while True: studentGrade.append(["", [float(), float()]]) # Outra opção seria criar 3 variáveis e utilizar o append para colocar cada uma em sua posição. studentGrade[counter][0] = input('Nome: ') studentGrade[counter][1][0] = float(input('Nota1: ')) studentGrade[counter][1][1] = float(input('Nota2: ')) option = input('Deseja continuar? [S/N] ') if option in 'nN': break else: counter += 1 print(f'{"N°":<4} {"NOME":<7} {"MÉDIA":>8}') print('---------------------') for number, student in enumerate(studentGrade): print(f'{number:<5}', end='') print(f'{student[0]:<7}', end='') media = sum(student[1]) / 2 print(f'{media:>8.1f}') print('---------------------') while True: number = int(input('Digite o número do aluno para ver suas notas: (000 para parar) ')) if number == 000: break print(f'As notas de {studentGrade[number][0]} são {studentGrade[number][1]}')
a = 3 if a ==2: print("A") if a==3: print("B") if a==4: print("C") else: print("D")
def data_splitter(data, idxs): subsample = data[idxs] return subsample ## Note: matrices are indexed like mat[rows, cols]. If only one is provided, it is interpreted as mat[rows].
#!/usr/bin/env python # -*- coding: utf-8 -*- def read_version(CMakeLists): version = [] with open(CMakeLists, 'r') as fp: for row in fp: if len(version) == 3: break if 'RSGD_MAJOR' in row: version.append(row.split('RSGD_MAJOR')[-1]) elif 'RSGD_MINOR' in row: version.append(row.split('RSGD_MINOR')[-1]) elif 'RSGD_REVISION' in row: version.append(row.split('RSGD_REVISION')[-1]) version = [v.strip().replace(')', '').replace('(', '') for v in version] version = map(int, version) return tuple(version) __package__ = 'version' __author__ = ['Nico Curti (nico.curit2@unibo.it)', "Daniele Dall'Olio (daniele.dallolio@studio.unibo.it)"] VERSION = read_version('./CMakeLists.txt') __version__ = '.'.join(map(str, VERSION))
""" File: a_to_z.py Prompts the user for a file name, then outputs each of the unique words from the file in alphabetical order """ unique = [] input_filename = input('Enter the input file name: ') print() with open(input_filename, "r") as f: lines = f.readlines() for line in lines: words = line.split() for word in words: word = word.strip() if word not in unique: unique.append(word) unique = sorted(unique) for i in unique: print(i)
""" opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EXTENDED_ARG"] cmp_op = ('<', '<=', '==', '!=', '>', '>=', 'in', 'not in', 'is', 'is not', 'exception match', 'BAD') hasconst = [] hasname = [] hasjrel = [] hasjabs = [] haslocal = [] hascompare = [] hasfree = [] opmap = {} opname = [''] * 256 for op in range(256): opname[op] = '<%r>' % (op,) del op def def_op(name, op): opname[op] = name opmap[name] = op def name_op(name, op): def_op(name, op) hasname.append(op) def jrel_op(name, op): def_op(name, op) hasjrel.append(op) def jabs_op(name, op): def_op(name, op) hasjabs.append(op) # Instruction opcodes for compiled code # Blank lines correspond to available opcodes def_op('STOP_CODE', 0) def_op('POP_TOP', 1) def_op('ROT_TWO', 2) def_op('ROT_THREE', 3) def_op('DUP_TOP', 4) def_op('ROT_FOUR', 5) def_op('NOP', 9) def_op('UNARY_POSITIVE', 10) def_op('UNARY_NEGATIVE', 11) def_op('UNARY_NOT', 12) def_op('UNARY_CONVERT', 13) def_op('UNARY_INVERT', 15) def_op('DUP_TOP_TWO', 16) def_op('DUP_TOP_THREE', 17) def_op('LIST_APPEND', 18) def_op('BINARY_POWER', 19) def_op('BINARY_MULTIPLY', 20) def_op('BINARY_DIVIDE', 21) def_op('BINARY_MODULO', 22) def_op('BINARY_ADD', 23) def_op('BINARY_SUBTRACT', 24) def_op('BINARY_SUBSCR', 25) def_op('BINARY_FLOOR_DIVIDE', 26) def_op('BINARY_TRUE_DIVIDE', 27) def_op('INPLACE_FLOOR_DIVIDE', 28) def_op('INPLACE_TRUE_DIVIDE', 29) def_op('SLICE_NONE', 30) def_op('SLICE_LEFT', 31) def_op('SLICE_RIGHT', 32) def_op('SLICE_BOTH', 33) def_op('RAISE_VARARGS_ZERO', 34) def_op('RAISE_VARARGS_ONE', 35) def_op('RAISE_VARARGS_TWO', 36) def_op('RAISE_VARARGS_THREE', 37) def_op('BUILD_SLICE_TWO', 38) def_op('BUILD_SLICE_THREE', 39) def_op('STORE_SLICE_NONE', 40) def_op('STORE_SLICE_LEFT', 41) def_op('STORE_SLICE_RIGHT', 42) def_op('STORE_SLICE_BOTH', 43) def_op('DELETE_SLICE_NONE', 50) def_op('DELETE_SLICE_LEFT', 51) def_op('DELETE_SLICE_RIGHT', 52) def_op('DELETE_SLICE_BOTH', 53) def_op('STORE_MAP', 54) def_op('INPLACE_ADD', 55) def_op('INPLACE_SUBTRACT', 56) def_op('INPLACE_MULTIPLY', 57) def_op('INPLACE_DIVIDE', 58) def_op('INPLACE_MODULO', 59) def_op('STORE_SUBSCR', 60) def_op('DELETE_SUBSCR', 61) def_op('BINARY_LSHIFT', 62) def_op('BINARY_RSHIFT', 63) def_op('BINARY_AND', 64) def_op('BINARY_XOR', 65) def_op('BINARY_OR', 66) def_op('INPLACE_POWER', 67) def_op('GET_ITER', 68) # def_op('PRINT_EXPR', 70) Replaced with the #@displayhook function. # def_op('PRINT_ITEM', 71) Other PRINT_* opcodes replaced by #@print_stmt(). # def_op('PRINT_NEWLINE', 72) # def_op('PRINT_ITEM_TO', 73) # def_op('PRINT_NEWLINE_TO', 74) def_op('INPLACE_LSHIFT', 75) def_op('INPLACE_RSHIFT', 76) def_op('INPLACE_AND', 77) def_op('INPLACE_XOR', 78) def_op('INPLACE_OR', 79) def_op('BREAK_LOOP', 80) def_op('WITH_CLEANUP', 81) # def_op('LOAD_LOCALS', 82) Replaced with a function call to #@locals. def_op('RETURN_VALUE', 83) # def_op('IMPORT_STAR', 84) Replaced with a function call to #@import_star. # def_op('EXEC_STMT', 85) Replaced with a function call to #@exec. def_op('YIELD_VALUE', 86) def_op('POP_BLOCK', 87) def_op('END_FINALLY', 88) # def_op('BUILD_CLASS', xxx) Replaced with a function call to #@buildclass. def_op('IMPORT_NAME', 89) HAVE_ARGUMENT = 90 # Opcodes from here have an argument: name_op('STORE_NAME', 90) # Index in name list name_op('DELETE_NAME', 91) # "" def_op('UNPACK_SEQUENCE', 92) # Number of tuple items jrel_op('FOR_ITER', 93) name_op('STORE_ATTR', 95) # Index in name list name_op('DELETE_ATTR', 96) # "" name_op('STORE_GLOBAL', 97) # "" name_op('DELETE_GLOBAL', 98) # "" def_op('LOAD_CONST', 100) # Index in const list hasconst.append(100) name_op('LOAD_NAME', 101) # Index in name list def_op('BUILD_TUPLE', 102) # Number of tuple items def_op('BUILD_LIST', 103) # Number of list items def_op('BUILD_MAP', 104) # Number of dict entries (upto 255) name_op('LOAD_ATTR', 105) # Index in name list def_op('COMPARE_OP', 106) # Comparison operator hascompare.append(106) # name_op('IMPORT_FROM', 108) # Replaced by #@import_from. jrel_op('JUMP_FORWARD', 110) # Number of bytes to skip jabs_op('JUMP_IF_FALSE_OR_POP', 111) # Target byte offset from beginning of code jabs_op('JUMP_IF_TRUE_OR_POP', 112) # "" jabs_op('JUMP_ABSOLUTE', 113) # "" jabs_op('POP_JUMP_IF_FALSE', 114) # "" jabs_op('POP_JUMP_IF_TRUE', 115) # "" name_op('LOAD_GLOBAL', 116) # Index in name list jabs_op('CONTINUE_LOOP', 119) # Target address jrel_op('SETUP_LOOP', 120) # Distance to target address jrel_op('SETUP_EXCEPT', 121) # "" jrel_op('SETUP_FINALLY', 122) # "" def_op('LOAD_FAST', 124) # Local variable number haslocal.append(124) def_op('STORE_FAST', 125) # Local variable number haslocal.append(125) def_op('DELETE_FAST', 126) # Local variable number haslocal.append(126) def_op('CALL_FUNCTION', 131) # #args + (#kwargs << 8) # def_op('MAKE_FUNCTION', 132) Replaced by #@make_function calls. def_op('MAKE_CLOSURE', 134) def_op('LOAD_CLOSURE', 135) hasfree.append(135) def_op('LOAD_DEREF', 136) hasfree.append(136) def_op('STORE_DEREF', 137) hasfree.append(137) def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8) def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8) def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8) def_op('EXTENDED_ARG', 143) EXTENDED_ARG = 143 del def_op, name_op, jrel_op, jabs_op
Experiment(description='Testing the pure linear kernel', data_dir='../data/tsdlr/', max_depth=10, random_order=False, k=1, debug=False, local_computation=False, n_rand=9, sd=2, jitter_sd=0.1, max_jobs=500, verbose=False, make_predictions=False, skip_complete=True, results_dir='../results/2013-10-01-pure-lin/', iters=250, base_kernels='SE,PureLin,Const,Exp,Fourier,Noise', zero_mean=True, random_seed=1, period_heuristic=5, subset=True, subset_size=250, full_iters=10, bundle_size=5, additive_form=True, model_noise=True, no_noise=True)
class FuzzyPaletteInvalidRepresentation(Exception): """ An Exception indicating that not enough classes have been provided to represent the fuzzy sets. """ def __init__(self, provided_labels: int, needed_labels: int): super().__init__(f"{needed_labels} labels are needed to represent the selected method. " f"Only {provided_labels} are provided.")
class Observer: def update(self, obj, *args, **kwargs): raise NotImplemented class Observable: def __init__(self): self._observers = [] def add_observer(self, observer): self._observers.append(observer) def remove_observer(self, observer): self._observers.remove(observer) def notify_observer(self, *args, **kwargs): for observer in self._observers: observer.update(self, *args, **kwargs) class Task1: def __init__(self): self.name = self.__class__.__name__ self.state = "Running" def mark_complete(self): print(f"Marking {self.name} complete.") self.state = "Complete" class Task2: def __init__(self): self.name = self.__class__.__name__ self.state = "Running" def mark_complete(self): print(f"Marking {self.name} complete.") self.state = "Complete" class Task3: def __init__(self): self.name = self.__class__.__name__ self.state = "Running" def mark_complete(self): print(f"Marking {self.name} complete.") self.state = "Complete" class TaskAdapter(Observable): _initialized = False def __init__(self, task, **kwargs): super().__init__() self.task = task for key, val in kwargs.items(): func = getattr(self.task, val) self.__setattr__(key, func) self._initialized = True def __getattr__(self, item): return getattr(self.task, item) def __setattr__(self, key, value): if not self._initialized: super().__setattr__(key, value) else: setattr(self.task, key, value) self.notify_observer(key=key, value=value, msg="Attribute Change") # notifying observer class Developer(Observer): def update(self, obj, *args, **kwargs): print("\nUpdate Received...") print(f'You received an update from {obj} with info: {args}, {kwargs}') class TaskFacade: task_adapters = None @classmethod def create_tasks(cls): print("Initializing tasks...") cls.task_adapters = [ TaskAdapter(Task1(), complete='mark_complete'), TaskAdapter(Task2(), complete='mark_complete'), TaskAdapter(Task3(), complete='mark_complete') ] @classmethod def mark_all_complete(cls): print("Marking all tasks as complete.") for adapter in cls.task_adapters: adapter.mark_complete() adapter.notify_observer(name=adapter.name, state=adapter.state, msg="Task complete") @classmethod def monitor_task(cls, observer): print('Adding observers...') for eachAdapter in cls.task_adapters: eachAdapter.add_observer(observer) if __name__ == '__main__': dev = Developer() TaskFacade.create_tasks() TaskFacade.monitor_task(dev) TaskFacade.mark_all_complete()
def my_func(): result = 3 * 2 return result print(my_func()) def format_name(f_name, l_name): """Take first and last name and format it and returns title version""" name = '' name += f_name.title() name += ' ' name += l_name.title() return name print(format_name('eddie', 'wang'))
class ConstraintDeduplicatorMixin(object): def __init__(self, *args, **kwargs): super(ConstraintDeduplicatorMixin, self).__init__(*args, **kwargs) self._constraint_hashes = set() def _blank_copy(self, c): super(ConstraintDeduplicatorMixin, self)._blank_copy(c) c._constraint_hashes = set() def _copy(self, c): super(ConstraintDeduplicatorMixin, self)._copy(c) c._constraint_hashes = set(self._constraint_hashes) # # Serialization # def _ana_getstate(self): return self._constraint_hashes, super(ConstraintDeduplicatorMixin, self)._ana_getstate() def _ana_setstate(self, s): self._constraint_hashes, base_state = s super(ConstraintDeduplicatorMixin, self)._ana_setstate(base_state) def simplify(self, **kwargs): added = super(ConstraintDeduplicatorMixin, self).simplify(**kwargs) # we only add to the constraint hashes because we want to # prevent previous (now simplified) constraints from # being re-added self._constraint_hashes.update(map(hash, added)) return added def add(self, constraints, **kwargs): filtered = tuple(c for c in constraints if hash(c) not in self._constraint_hashes) if len(filtered) == 0: return filtered added = super(ConstraintDeduplicatorMixin, self).add(filtered, **kwargs) self._constraint_hashes.update(map(hash, added)) return added
def chainResult(num): while num != 1 and num != 89: s = str(num) num = 0 for c in s: num += int(c) * int(c) return num count = 0 for num in range(1,10000000): if chainResult(num) == 89: count += 1 print(count)
""" Time: O(N) Space: O(1) Keep updating the minimum element (`min1`) and the second minimum element (`min2`). When a new element comes up there are 3 possibilities. 0. Equals to min1 or min2 => do nothing. 1. Smaller than min1 => update min1. 2. Larger than min1 and smaller than min2 => update min2. 3. Larger than min2 => return True. """ class Solution(object): def increasingTriplet(self, nums): min1 = min2 = float('inf') for n in nums: if n<min1: min1 = n elif min1<n and n<min2: min2 = n elif min2<n: return True return False
""" Created on 12.02.2010 @author: jupp """ def compute_similarity(lattice): similarity_index = {} for c1 in lattice: for c2 in lattice: if not (c1.concept_id in similarity_index and c2.concept_id in similarity_index[c1.concept_id]): if c1.concept_id not in similarity_index: similarity_index[c1.concept_id] = {} if c2.concept_id not in similarity_index: similarity_index[c2.concept_id] = {} if c1 == c2: similarity_index[c1.concept_id][c2.concept_id] = similarity_index[c2.concept_id][c1.concept_id] = .0 continue n1 = float(len(set(c1.extent).intersection(set(c2.extent)))) d1 = float(len(set(c1.extent))+len(set(c2.extent))) n2 = float(len(set(c1.intent).intersection(set(c2.intent)))) d2 = float(len(set(c1.intent))+len(set(c2.intent))) p1 = 0 p2 = 0 if d1 != 0: p1 = n1 / d1 if d2 != 0: p2 = n2 / d2 sim = p1 + p2 similarity_index[c1.concept_id][c2.concept_id] = similarity_index[c2.concept_id][c1.concept_id] = sim return similarity_index
""" ccextractor-web | forms.py Author : Saurabh Shrivastava Email : saurabh.shrivastava54+ccextractorweb[at]gmail.com Link : https://github.com/saurabhshri """
def solution(board, moves): basket = [] answer = 0 for move in moves: for row in board: if row[move - 1] != 0: basket.append(row[move - 1]) row[move - 1] = 0 if len(basket) >= 2 and basket[-1] == basket[-2]: basket.pop() basket.pop() answer += 1 break return answer * 2
class Const: board_width = 19 board_height = 19 n_in_row = 5 # n to win! train_core = "keras" check_freq = 10 # auto save current model check_freq_best = 500 # auto save best model
""" 携程海洋馆中有 n 只萌萌的小海豚,初始均为 0 岁, 每只小海豚的寿命是 m 岁,且这些小海豚会在 birthYear[i] 这些年份生产出一位宝宝海豚(1 <= birthYear[i] <= m), 每位宝宝海豚刚出生为 0 岁。 问 x 年时,携程海洋馆有多少只小海豚? 输入 n(初始海豚数) m(海豚寿命) 海豚生宝宝的年份数量 (假设为 p) 海豚生宝宝的年份 1 ... 海豚生宝宝的年份 p x(几年后) 输出 x 年后,共有多少只小海豚 样例: 5 5 2 2 4 5 输出 20 """ def solve(n, m, indexs, x): """ ij 表示 第i年j岁的小海豚 DP[i][j] = DP[i-1][j-1] DP[i][0] = sum(DP[i][age], age in ages) 压缩到 只需要 pre 和 cur """ pre = [0] * (m + 1) pre[0] = n for i in range(x): cur = [0] * (m + 1) for j in range(1, m + 1): cur[j] = pre[j - 1] for idx in indexs: cur[0] += cur[idx] pre = cur[:] return sum(cur) if __name__ == '__main__': n = int(input()) m = int(input()) p = int(input()) years = [] for i in range(p): years.append(int(input())) x = int(input()) print(solve(n, m, years, x))
# -*- coding: utf-8 -*- # Copyright 2019 Julian Betz # # 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. class Language: """Resources of a specific language. Stores information about the language and provides methods for text analysis that are tailored to that language. """ _LANGUAGES = dict() def __init__(self, code, name, *, loader, tokenizer, extractor, parallel_extractor): if code in Language._LANGUAGES: raise ValueError('Language code has to be unique') self._CODE = code self._NAME = name self._LOADER = loader self._TOKENIZER = tokenizer self._EXTRACTOR = extractor self._PARALLEL_EXTRACTOR = parallel_extractor Language._LANGUAGES[code] = self @staticmethod def by_code(code): """Look up a language by its unique identifier.""" return Language._LANGUAGES[code] @property def code(self): """The unique identifier of this language. This is usually the ISO 639-3 language code of this language. """ return self._CODE @property def load(self): """Function to load corpus sentences in this language. The order of sentences is randomized (independently of the number of samples requested and consistently in between calls requesting the same number of samples). Does not necessarily load the sentences themselves, but may provide IDs if :py:meth:`tokenize`, :py:meth:`extract` and :py:meth:`extract_parallel` can handle this format. :param int n_samples: The number of sample sentences to load. If ``None``, load all samples. :return: A tuple of sentences or sentence IDs. """ return self._LOADER @property def tokenize(self): """Function to tokenize a sentence in this language. :param sentence: A sentence or sentence ID. :return: A tuple of tuples of tokens. A token is represented as a dictionary of the following form: .. code-block:: python { 'surface_form': {'graphic': ..., 'phonetic': ...}, 'base_form': {'graphic': ..., 'phonetic': ...}, 'lemma': {'graphic': ..., 'phonetic': ...}, 'pos': <list of POS tags as strings>, 'inflection': <list of POS/inflection tags> } "Surface form" refers to the graphic variant used in an original document and its pronunciation. "Base form" refers to a lemmatized version of the surface form. "Lemma" a normalized version of the base form. (In Japanese, for example, there is a single lemma for multiple graphical variants of the base form which mean the same thing.) The POS and inflection lists are meant to be read by a :class:`..features.tree.TemplateTree`. """ return self._TOKENIZER @property def extract(self): """Function to turn an iterable of tokens into language model input. Differs from :meth:`extract_parallel` only for character-level extracts. :param tokens: An iterable of tokens (see :meth:`tokenize` for the token representation). :return: An iterable of token identifiers that is understood by the language model. """ return self._EXTRACTOR @property def extract_parallel(self): """Function to turn an iterable of tokens into language model input. Differs from :meth:`extract` only for character-level extracts. :param tokens: An iterable of tokens (see :meth:`tokenize` for the token representation). :return: An iterable of token identifiers that are understood by the language model. """ return self._PARALLEL_EXTRACTOR def __repr__(self): return '<%s %s>' % (type(self).__name__, self._CODE) def __str__(self): return self._NAME