content
stringlengths
7
1.05M
#!/usr/bin/env python for n in range(2, 10): print("== %d ==" % (n)) for x in range(2, n): print("x = ", x) if n % x == 0: print(n, 'equals', x, '*', n//x) break else: # loop fell through without finding a factor print(n, 'is a prime number')
# Copyright 2019 The Bazel 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. """Repository external dependency resolution functions.""" load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def _include_if_not_defined(repo_rule, name, **kwargs): if not native.existing_rule(name): repo_rule(name = name, **kwargs) JINJA2_BUILD_FILE = """ py_library( name = "jinja2", srcs = glob(["jinja2/*.py"]), srcs_version = "PY2AND3", deps = [ "@markupsafe_archive//:markupsafe", ], visibility = ["//visibility:public"], ) """ MARKUPSAFE_BUILD_FILE = """ py_library( name = "markupsafe", srcs = glob(["markupsafe/*.py"]), srcs_version = "PY2AND3", visibility = ["//visibility:public"], ) """ MISTUNE_BUILD_FILE = """ py_library( name = "mistune", srcs = ["mistune.py"], srcs_version = "PY2AND3", visibility = ["//visibility:public"], ) """ SIX_BUILD_FILE = """ py_library( name = "six", srcs = ["six.py"], srcs_version = "PY2AND3", visibility = ["//visibility:public"], ) """ def skydoc_repositories(): """Adds the external repositories used by the skylark rules.""" _include_if_not_defined( http_archive, name = "bazel_skylib", urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"], sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", ) _include_if_not_defined( http_archive, name = "io_bazel_rules_sass", urls = ["https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.tar.gz"], sha256 = "d868ce50d592ef4aad7dec4dd32ae68d2151261913450fac8390b3fd474bb898", strip_prefix = "rules_sass-8ccf4f1c351928b55d5dddf3672e3667f6978d60", ) _include_if_not_defined( http_archive, name = "markupsafe_archive", urls = ["https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz#md5=f5ab3deee4c37cd6a922fb81e730da6e"], sha256 = "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3", build_file_content = MARKUPSAFE_BUILD_FILE, strip_prefix = "MarkupSafe-0.23", ) native.bind( name = "markupsafe", actual = "@markupsafe_archive//:markupsafe", ) _include_if_not_defined( http_archive, name = "jinja2_archive", urls = ["https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz#md5=edb51693fe22c53cee5403775c71a99e"], sha256 = "bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4", build_file_content = JINJA2_BUILD_FILE, strip_prefix = "Jinja2-2.8", ) native.bind( name = "jinja2", actual = "@jinja2_archive//:jinja2", ) _include_if_not_defined( http_archive, name = "mistune_archive", urls = ["https://pypi.python.org/packages/source/m/mistune/mistune-0.7.1.tar.gz#md5=057bc28bf629d6a1283d680a34ed9d0f"], sha256 = "6076dedf768348927d991f4371e5a799c6a0158b16091df08ee85ee231d929a7", build_file_content = MISTUNE_BUILD_FILE, strip_prefix = "mistune-0.7.1", ) native.bind( name = "mistune", actual = "@mistune_archive//:mistune", ) _include_if_not_defined( http_archive, name = "six_archive", urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"], sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", build_file_content = SIX_BUILD_FILE, strip_prefix = "six-1.10.0", ) native.bind( name = "six", actual = "@six_archive//:six", ) _include_if_not_defined( http_archive, name = "rules_java", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip", ], sha256 = "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598", strip_prefix = "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178", )
class Solution: # 注意深度和高度的区别 def XXX(self, root: TreeNode) -> bool: if self.get_height(root) == -1: return False return True def get_height(self, root): if not root: return 0 left_height = self.get_height(root.left) if left_height == -1: return -1 right_height = self.get_height(root.right) if right_height == -1: return -1 if abs(left_height - right_height) > 1: return -1 else: return 1 + max(left_height, right_height)
class TvshowsData: def __init__(self): self.NetflixData=[] self.HBOData = [] self.DisneyData = [] def add_NetflixData(self,data): self.NetflixData.append(data) def get_NetflixData(self): return self.NetflixData def add_HBOData(self,data): self.HBOData.append(data) def get_HBOData(self): return self.HBOData def add_DisneyData(self,data): self.DisneyData.append(data) def get_DisneyData(self): return self.DisneyData class Action_and_Adventure(TvshowsData): def addData(self,Id,Name,Seasons,Episodes,IMDB_Ratings,Network): data = { 'Id':Id, 'Name':Name, 'Seasons':Seasons, 'Episodes':Episodes, 'IMDB_Ratings':IMDB_Ratings, 'Network':Network } if Network.lower() == 'netflix': self.add_NetflixData(data) elif Network.lower() == 'hbo': self.add_HBOData(data) elif Network.lower() == 'disney+': self.add_DisneyData(data) class Scifi(TvshowsData): def addData(self,Id,Name,Seasons,Episodes,IMDB_Ratings,Network): data = { 'Id':Id, 'Name':Name, 'Seasons':Seasons, 'Episodes':Episodes, 'IMDB_Ratings':IMDB_Ratings, 'Network':Network } if Network.lower() == 'netflix': self.add_NetflixData(data) elif Network.lower() == 'hbo': self.add_HBOData(data) elif Network.lower() == 'disney+': self.add_DisneyData(data) class Sitcom(TvshowsData): def addData(self,Id,Name,Seasons,Episodes,IMDB_Ratings,Network): data = { 'Id':Id, 'Name':Name, 'Seasons':Seasons, 'Episodes':Episodes, 'IMDB_Ratings':IMDB_Ratings, 'Network':Network } if Network.lower() == 'netflix': self.add_NetflixData(data) elif Network.lower() == 'hbo': self.add_HBOData(data) elif Network.lower() == 'disney+': self.add_DisneyData(data) #Driver Code ob_action = Action_and_Adventure() ob_scifi = Scifi() ob_sitcom = Sitcom() # NETFLIX def add_action_data(): ob_action.addData('N_01','The 100',1,9,8.1,'Netflix') ob_action.addData('N_02','The Witcher',1,8,8.2,'Netflix') ob_action.addData('N_03','The Umbrella Academy',2,20,8,'Netflix') ob_action.addData('H_01','The Legacies',3,45,7.4,'HBO') ob_action.addData('H_02','The DoomPetrol',1,8,8.2,'HBO') ob_action.addData('H_03','Genration',2,20,8,'HBO') ob_action.addData('D_01','Falcon and the Winter Soldier',1,10,8.4,'Disney+') ob_action.addData('D_02','The DoomPetrol',1,8,8.2,'Disney+') ob_action.addData('D_03','Genration',2,20,8,'Disney+') add_action_data() def add_scifi_data(): ob_scifi.addData('N_01','Stranger Things',3,25,8.1,'Netflix') ob_scifi.addData('N_02','Altered Carbon',2,16,7.6,'Netflix') ob_scifi.addData('N_03','Black Mirror',5,50,9,'Netflix') ob_scifi.addData('H_01','Titans',2,24,7.7,'HBO') ob_scifi.addData('H_02','His Dark Materials',2,16,7.9,'HBO') ob_scifi.addData('H_03','Raised by Wolves',5,50,9,'HBO') ob_scifi.addData('D_01','Loki',1,8,9,'Disney+') add_scifi_data() def add_sitcom_data(): ob_sitcom.addData('N_01','Friends',1,8,8.1,'Netflix') ob_sitcom.addData('H_01','Silicon Valley',5,90,10,'HBO') ob_sitcom.addData('D_01','WandaVision',1,8,8.9,'Disney+') add_sitcom_data() def get_Netflix_action_data(): return ob_action.get_NetflixData() def get_HBO_action_data(): return ob_action.get_HBOData() def get_Disney_action_data(): return ob_action.get_DisneyData() def get_Netflix_scifi_data(): return ob_scifi.get_NetflixData() def get_HBO_scifi_data(): return ob_scifi.get_HBOData() def get_Disney_scifi_data(): return ob_scifi.get_DisneyData() def get_Netflix_sitcom_data(): return ob_sitcom.get_NetflixData() def get_HBO_sitcom_data(): return ob_sitcom.get_HBOData() def get_Disney_sitcom_data(): return ob_sitcom.get_DisneyData() #print(get_HBO_action_data())
class ColumnAttachmentJustification(Enum,IComparable,IFormattable,IConvertible): """ Control the column extent in cases where the target is not a uniform height. enum ColumnAttachmentJustification,values: Maximum (2),Midpoint (1),Minimum (0),Tangent (3) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self,*args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self,*args): pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self,*args): pass def __lt__(self,*args): pass def __ne__(self,*args): pass def __reduce_ex__(self,*args): pass def __str__(self,*args): pass Maximum=None Midpoint=None Minimum=None Tangent=None value__=None
#!/usr/bin/env python admin_server_listen_address = os.environ['ADMIN_SERVER_LISTEN_ADDRESS'] admin_server_listen_port = os.environ['ADMIN_SERVER_LISTEN_PORT'] admin_username = os.environ['ADMIN_USERNAME'] admin_password = os.environ['ADMIN_PASSWORD'] managed_server_name = os.environ['MANAGED_SERVER_NAME'] ###################################################################### def set_server_tunning_config(_server_name): cd('/Servers/' + _server_name) cmo.setNativeIOEnabled(True) # cmo.setThreadPoolPercentSocketReaders(33) # cmo.setGatheredWritesEnabled(False) # cmo.setScatteredReadsEnabled(False) # cmo.setMaxOpenSockCount(-1) cmo.setStuckThreadMaxTime(600) # cmo.setStuckThreadTimerInterval(60) cmo.setAcceptBacklog(300) # cmo.setLoginTimeoutMillis(5000) # cmo.setReverseDNSAllowed(False) # cmo.setManagedServerIndependenceEnabled(True) cmo.setSelfTuningThreadPoolSizeMin(150) cmo.setSelfTuningThreadPoolSizeMax(150) # cmo.setPeriodLength(60000) # cmo.setIdlePeriodsUntilTimeout(4) # cmo.setDGCIdlePeriodsUntilTimeout(5) # cmo.setMuxerClass('weblogic.socket.NIOSocketMuxer') # cmo.setUseConcurrentQueueForRequestManager(False) ###################################################################### admin_server_url = 't3://' + admin_server_listen_address + ':' + admin_server_listen_port connect(admin_username, admin_password, admin_server_url) edit() startEdit() domain_version = cmo.getDomainVersion() set_server_tunning_config(managed_server_name) save() activate() exit()
''' 142. Linked List Cycle II https://leetcode.com/problems/linked-list-cycle-ii/ similar problem: "141. Linked List Cycle" https://leetcode.com/problems/linked-list-cycle/ Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where tail connects to. If pos is -1, then there is no cycle in the linked list. Note: Do not modify the linked list. Example 1: Input: head = [3,2,0,-4], pos = 1 Output: tail connects to node index 1 Explanation: There is a cycle in the linked list, where tail connects to the second node. ''' # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def detectCycle(self, head): """ :type head: ListNode :rtype: ListNode """ fast = slow = head # or fast, slow = head, head while fast and fast.next: fast = fast.next.next slow = slow.next if fast == slow: while slow != head: slow = slow.next head = head.next return slow return None # or class Solution(object): def detectCycle(self, head): """ :type head: ListNode :rtype: ListNode """ fast = slow = head # or fast, slow = head, head while fast and fast.next: fast = fast.next.next slow = slow.next if fast == slow: break while slow != head: slow = slow.next head = head.next return slow # or head return None ''' 思路: 大致意思是当Fast和Slow重合的时候,他们离开起始Loop的距离 # 和Head离开Loop起始的距离是相等的 '''
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # def f_gold ( arr , n ) : mpis = [ 0 ] * ( n ) for i in range ( n ) : mpis [ i ] = arr [ i ] for i in range ( 1 , n ) : for j in range ( i ) : if ( arr [ i ] > arr [ j ] and mpis [ i ] < ( mpis [ j ] * arr [ i ] ) ) : mpis [ i ] = mpis [ j ] * arr [ i ] return max ( mpis ) #TOFILL if __name__ == '__main__': param = [ ([1, 1, 4, 7, 7, 9, 12, 20, 45, 53, 58, 63, 65, 65, 86, 98, 98],12,), ([46, -58, 70, 60, 74, 42, 6, -26, 78, 32, 14, -56, -48, 86, -2, 94, -44, -62, -50, -8, -4, -36, -62, -98, -98, -78, 56, 92, 88],27,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],14,), ([13, 71, 93, 68, 43, 75, 44, 15, 1, 91, 7, 9, 65, 85, 46, 87, 37, 74, 19, 30, 87, 27, 82, 92, 12, 36, 6, 27, 76, 80, 30, 83, 67, 83, 65, 28, 81, 59, 63, 11, 70],20,), ([-96, -94, -92, -88, -84, -80, -74, -70, -62, -56, -48, -46, -40, -34, -32, -26, -22, -22, -12, -10, -8, -6, -2, 0, 2, 4, 6, 18, 18, 30, 34, 34, 38, 38, 40, 48, 54, 56, 60, 84, 88, 88, 90, 94, 96],30,), ([1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],22,), ([1, 1, 5, 5, 6, 7, 18, 35, 39, 51, 64, 73, 87, 90, 91, 92],11,), ([-54, 8, -92, -28, 72, 54, -74, 36, -10, 54, -30, -16, -72, -32, -92, 38, -76, -76, -50, -92, 48],19,), ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],26,), ([47, 57, 72, 40, 53, 46, 62, 51, 42, 89, 9, 91, 58, 67, 20, 91, 63, 50, 32, 6, 63, 49, 3, 89, 87, 54, 65, 72, 72, 62, 31, 6, 48, 87, 17, 95, 59, 57],30,) ] n_success = 0 for i, parameters_set in enumerate(param): if f_filled(*parameters_set) == f_gold(*parameters_set): n_success+=1 print("#Results: %i, %i" % (n_success, len(param)))
# -*- coding: utf-8 -*- """ Created on Wed Nov 24 20:14:29 2019 @author: nehap """ """ Input: 5 Output : 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 """ if __name__=="__main__": n = int(input("Input: ")) #Initial spaces k = 2*n-2 print("Output :") #Outer Loop - controlling number of rows for i in range(0, n): #Inner loop - controlling blank spaces for j in range(0, k): print(end=" ") #Inner loop - Printing pattern for j in range(i+1, 0, -1): print(j, end=" ") #reduce the spaces after each row/ k=k-2 print("\r")
#!/usr/bin/python # -*- coding: utf-8 -*- CONTRASTA = [0.84, 0.37, 0, 1] # orange CONTRASTB = [0.53, 0.53, 1, 1] # lightblue CONTRASTC = [0.84, 1, 0, 1] CONTRASTA = [0, 0.7, 0.8, 1] CONTRASTB = [1, 1, 1, 0.5] def show_detail(render, edges_coordinates, fn=None): render.clear_canvas() render_circle = render.circle small = render.pix*3. large = render.pix*10. render.set_line_width(render.pix) for vv in edges_coordinates: render.set_front([1, 0, 0, 0.4]) render_circle(vv[0], vv[1], r=large, fill=False) render_circle(vv[2], vv[3], r=large, fill=False) render.set_front([0, 0, 0, 0.8]) render_circle(vv[0], vv[1], r=small, fill=True) render_circle(vv[2], vv[3], r=small, fill=True) if fn: render.write_to_png(fn) def show(render, edges_coordinates, fn=None, r=None, clear=True): if not r: r = 2.5*render.pix if clear: render.clear_canvas() render_circles = render.circles for vv in edges_coordinates: render_circles(*vv, r=r, nmin=2) if fn: render.write_to_png(fn) def sandstroke(render, xys, grains=5, fn=None): render_sandstroke = render.sandstroke render_sandstroke(xys, grains=grains) if fn: render.write_to_png(fn) def dots(render, xys, fn=None): render_dot = render.dot for vv in xys: render_dot(*vv) if fn: render.write_to_png(fn) def show_closed(render, coords, fn=None, fill=True): render.clear_canvas() render.closed_path(coords) if fn: render.write_to_png(fn)
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def mergeKLists(self, lists: 'List[ListNode]') -> 'ListNode': res = [] for l in lists: while l: res.append(l.val) l = l.next return sorted(res)
def find_sum(arr): ''' using divide and conquer technique to recursively find the sum of a list of numbers ''' result = 0 if len(arr) == 1 : result = arr[0] else: result = arr.pop() + find_sum(arr) return result def count_list(arr): ''' recursive counter ''' count = 0 if len(arr) == 0: return count else: arr.pop() count = count + count_list(arr) + 1 return count arr = list(range(1,11)) # generates a sequence of natural numbers print(f'The sum of the array is {find_sum(arr)}') # expected answer is 55
environment = 'test' preservica_base_url = 'https://test_preservica_url' input_stream_name = 'shared_services_output_test' invalid_stream_name = 'message_invalid_test' error_stream_name = 'message_error_test' adaptor_aws_region = 'eu-west-2' organisation_buckets = { '44': 's3://some_bucket', }
# EXERCÍCIO 35 # Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas podem ou não formar um triângulo. print('-=-' * 20) print('Analisador de Triângulo') print('-=-' * 20) a = float(input('Primeiro segmento: ')) b = float(input('Segundo segmento: ')) c = float(input('Terceiro segmento: ')) if abs(b - c) < a < b + c and abs(a - c) < b < a + c and abs(a - b) < c < a + b: print('Os segmentos ({} - {} - {}) PODEM FORMAR um triângulo!'.format(a, b, c)) else: print('Os segmentos ({} - {} - {}) NÃO PODEM FORMAR um triângulo!'.format(a, b, c)) #OUTRA FORMA '''if a < b + c and b < a + c and c < a + b print('Os segmentos ({} - {} - {}) PODEM FORMAR um triângulo!'.format(a, b, c)) else: print('Os segmentos ({} - {} - {}) NÃO PODEM FORMAR um triângulo!'.format(a, b, c))'''
# _*_ coding: utf-8 _*_ """ Created by Allen7D on 2018/11/26. """ __author__ = 'Allen7D' get_address = { "parameters": [], "security": [ { "basicAuth": [] } ], "responses": { "200": { "description": "用户地址信息", "examples": {} } } } update_address = { "parameters": [], "security": [ { "basicAuth": [] } ], "responses": { "200": { "description": "更新成功: 用户地址", "examples": {} } } }
def soma_lista(x): soma = 0 for c in x: soma += c return soma print(soma_lista([1, 2, 3, 4, 5]))
with open("input.txt") as f: dat = f.readlines() dat = [line.strip() for line in dat] maxid = 0 for ele in dat: hr = 127 lr = 0 hc = 7 lc = 0 chrs = [ c for c in ele] chrsR = chrs[0:7] chrsC = chrs[7:] for c in chrsR: if(c == 'F'): hr = hr - ( hr - lr ) // 2 - 1 else: lr = lr + ( hr - lr ) // 2 + 1 for c2 in chrsC: if(c2 == 'F'): hc = hc - ( hc - lc ) // 2 - 1 else: lc = lc + ( hc - lc ) // 2 + 1 sid = hr * 8 + hc print('[',lr,hr,']') print('[',lc,hc,']') print(sid) if(sid > maxid): maxid = sid print(maxid)
# # PySNMP MIB module NSCPS32-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NSCPS32-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:15:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") nsc, nscProducts = mibBuilder.importSymbols("NSC-MIB", "nsc", "nscProducts") Party, = mibBuilder.importSymbols("RFC1353-MIB", "Party") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, Integer32, ModuleIdentity, Bits, NotificationType, ObjectIdentity, IpAddress, MibIdentifier, Unsigned32, experimental, Counter32, Counter64, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, enterprises, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Integer32", "ModuleIdentity", "Bits", "NotificationType", "ObjectIdentity", "IpAddress", "MibIdentifier", "Unsigned32", "experimental", "Counter32", "Counter64", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "enterprises", "TimeTicks") PhysAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "PhysAddress", "TextualConvention", "DisplayString") nscHippiSwitch = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4)) ps32General = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1)) ps32SwitchDescr = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchDescr.setStatus('mandatory') ps32SwitchVersion = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchVersion.setStatus('mandatory') ps32SwitchDate = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32SwitchDate.setStatus('mandatory') ps32SwitchTime = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32SwitchTime.setStatus('mandatory') ps32SwitchAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 1), ("enable", 2), ("disable", 3), ("reset", 4), ("programload", 5), ("test", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32SwitchAdminStatus.setStatus('mandatory') ps32SwitchOperStatus = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 10))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("testing", 3), ("operational", 4), ("resetInProgress", 5), ("warning", 6), ("nonFatalError", 7), ("fatalError", 8), ("loading", 10)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchOperStatus.setStatus('mandatory') ps32SwitchPhysicalChanges = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchPhysicalChanges.setStatus('mandatory') ps32SwitchDiagnosticReg = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchDiagnosticReg.setStatus('mandatory') ps32SwitchMiscellanReg = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchMiscellanReg.setStatus('mandatory') ps32SwitchDipSwitchReg = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SwitchDipSwitchReg.setStatus('mandatory') ps32PowerSupply = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2)) ps32NumPowerSupplies = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32NumPowerSupplies.setStatus('mandatory') ps32PowerSupplyTable = MibTable((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2), ) if mibBuilder.loadTexts: ps32PowerSupplyTable.setStatus('mandatory') ps32PowerSupplyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1), ).setIndexNames((0, "NSCPS32-MIB", "ps32PowerSupplyIndex")) if mibBuilder.loadTexts: ps32PowerSupplyEntry.setStatus('mandatory') ps32PowerSupplyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerSupplyIndex.setStatus('mandatory') ps32PowerSupplyDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerSupplyDescr.setStatus('mandatory') ps32PowerSupplyAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("enable", 2), ("disable", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PowerSupplyAdminStatus.setStatus('mandatory') ps32PowerSupplyOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("unknown", 1), ("empty", 2), ("disabled", 3), ("bad", 4), ("warning", 5), ("standby", 6), ("engaged", 7), ("redundant", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerSupplyOperStatus.setStatus('mandatory') ps32PowerSupplyHealthText = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerSupplyHealthText.setStatus('mandatory') ps32PowerSupplyWarnings = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerSupplyWarnings.setStatus('mandatory') ps32PowerSupplyFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerSupplyFailures.setStatus('mandatory') ps32NumPowerOutputs = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32NumPowerOutputs.setStatus('mandatory') ps32PowerOutputTable = MibTable((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4), ) if mibBuilder.loadTexts: ps32PowerOutputTable.setStatus('mandatory') ps32PowerOutputEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1), ).setIndexNames((0, "NSCPS32-MIB", "ps32PowerSupplyIndex"), (0, "NSCPS32-MIB", "ps32PowerOutputIndex")) if mibBuilder.loadTexts: ps32PowerOutputEntry.setStatus('mandatory') ps32PowerOutputIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerOutputIndex.setStatus('mandatory') ps32PowerOutputStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("bad", 2), ("warning", 3), ("good", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerOutputStatus.setStatus('mandatory') ps32PowerOutputNominalVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerOutputNominalVoltage.setStatus('mandatory') ps32PowerOutputOfferedVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerOutputOfferedVoltage.setStatus('mandatory') ps32PowerOutputWarnings = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerOutputWarnings.setStatus('mandatory') ps32PowerOutputFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 2, 4, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PowerOutputFailures.setStatus('mandatory') ps32Environ = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3)) ps32NumEnvironmentSensors = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32NumEnvironmentSensors.setStatus('mandatory') ps32EnvironTable = MibTable((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2), ) if mibBuilder.loadTexts: ps32EnvironTable.setStatus('mandatory') ps32EnvironEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1), ).setIndexNames((0, "NSCPS32-MIB", "ps32EnvironIndex")) if mibBuilder.loadTexts: ps32EnvironEntry.setStatus('mandatory') ps32EnvironIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironIndex.setStatus('mandatory') ps32EnvironSensor = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("logicovertemp", 2), ("fanfailure", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironSensor.setStatus('mandatory') ps32EnvironStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("bad", 2), ("warning", 3), ("good", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironStatus.setStatus('mandatory') ps32EnvironWarnings = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironWarnings.setStatus('mandatory') ps32EnvironFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironFailures.setStatus('mandatory') ps32EnvironDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironDescriptor.setStatus('mandatory') ps32EnvironHealthText = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 3, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32EnvironHealthText.setStatus('mandatory') ps32Slot = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4)) ps32NumSlots = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32NumSlots.setStatus('mandatory') ps32SlotTable = MibTable((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2), ) if mibBuilder.loadTexts: ps32SlotTable.setStatus('mandatory') ps32SlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2, 1), ).setIndexNames((0, "NSCPS32-MIB", "ps32SlotNumber")) if mibBuilder.loadTexts: ps32SlotEntry.setStatus('mandatory') ps32SlotNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 18))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SlotNumber.setStatus('mandatory') ps32SlotPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SlotPartNumber.setStatus('mandatory') ps32SlotBoardID = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 5))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SlotBoardID.setStatus('mandatory') ps32SlotBoardText = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 79))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SlotBoardText.setStatus('mandatory') ps32SlotLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 4, 2, 1, 5), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32SlotLastChange.setStatus('mandatory') ps32Port = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5)) ps32MaximumPorts = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32MaximumPorts.setStatus('mandatory') ps32InstalledPorts = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32InstalledPorts.setStatus('mandatory') ps32PortTable = MibTable((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3), ) if mibBuilder.loadTexts: ps32PortTable.setStatus('mandatory') ps32PortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1), ).setIndexNames((0, "NSCPS32-MIB", "ps32PortNumber")) if mibBuilder.loadTexts: ps32PortEntry.setStatus('mandatory') ps32PortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PortNumber.setStatus('mandatory') ps32PortBoard = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 2), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PortBoard.setStatus('mandatory') ps32PortInput = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 3), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PortInput.setStatus('mandatory') ps32PortOutput = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 4), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PortOutput.setStatus('mandatory') ps32PortForce = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PortForce.setStatus('mandatory') ps32PortCounterStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PortCounterStatus.setStatus('mandatory') ps32PortOverrunCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PortOverrunCount.setStatus('mandatory') ps32PortSwitchRejectCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PortSwitchRejectCount.setStatus('mandatory') ps32PortCamponDelayCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PortCamponDelayCount.setStatus('mandatory') ps32PortCurrentStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PortCurrentStatus.setStatus('mandatory') ps32PortAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))).clone(namedValues=NamedValues(("unknown", 1), ("enable", 2), ("disable", 3), ("reset", 4), ("test", 5), ("clrerrors", 6), ("clrpaths", 7), ("clrstats", 8), ("clrall", 9), ("rstrpath", 10), ("savecfg", 11), ("savepath", 12)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PortAdminStatus.setStatus('mandatory') ps32PortOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 5, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("unknown", 1), ("notinstalled", 2), ("disabled", 3), ("operational", 4), ("connected", 5), ("intest", 6), ("inerror", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PortOperStatus.setStatus('mandatory') ps32Pathway = MibIdentifier((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6)) ps32MaximumPathways = MibScalar((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32MaximumPathways.setStatus('mandatory') ps32PathwayTable = MibTable((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 2), ) if mibBuilder.loadTexts: ps32PathwayTable.setStatus('mandatory') ps32PathwayEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 2, 1), ).setIndexNames((0, "NSCPS32-MIB", "ps32PathwayPortNumber"), (0, "NSCPS32-MIB", "ps32PathwayHDA")) if mibBuilder.loadTexts: ps32PathwayEntry.setStatus('mandatory') ps32PathwayPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PathwayPortNumber.setStatus('mandatory') ps32PathwayHDA = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 2, 1, 2), PhysAddress().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: ps32PathwayHDA.setStatus('mandatory') ps32PathwayDest = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 2, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PathwayDest.setStatus('mandatory') ps32PathwayClear = MibTableColumn((1, 3, 6, 1, 4, 1, 10, 2, 1, 4, 6, 2, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ps32PathwayClear.setStatus('mandatory') mibBuilder.exportSymbols("NSCPS32-MIB", ps32PortOperStatus=ps32PortOperStatus, ps32PowerSupply=ps32PowerSupply, ps32SlotEntry=ps32SlotEntry, ps32PathwayHDA=ps32PathwayHDA, ps32EnvironStatus=ps32EnvironStatus, ps32PowerSupplyDescr=ps32PowerSupplyDescr, ps32NumSlots=ps32NumSlots, ps32PathwayDest=ps32PathwayDest, ps32SwitchDipSwitchReg=ps32SwitchDipSwitchReg, ps32PortCounterStatus=ps32PortCounterStatus, ps32MaximumPathways=ps32MaximumPathways, ps32SlotBoardText=ps32SlotBoardText, ps32PortAdminStatus=ps32PortAdminStatus, ps32General=ps32General, ps32PortForce=ps32PortForce, ps32PowerOutputNominalVoltage=ps32PowerOutputNominalVoltage, ps32PowerOutputTable=ps32PowerOutputTable, ps32NumEnvironmentSensors=ps32NumEnvironmentSensors, ps32SwitchPhysicalChanges=ps32SwitchPhysicalChanges, ps32SwitchTime=ps32SwitchTime, ps32PowerOutputWarnings=ps32PowerOutputWarnings, ps32Slot=ps32Slot, ps32PowerOutputFailures=ps32PowerOutputFailures, ps32SlotPartNumber=ps32SlotPartNumber, ps32PortOverrunCount=ps32PortOverrunCount, ps32PowerOutputEntry=ps32PowerOutputEntry, ps32PowerSupplyOperStatus=ps32PowerSupplyOperStatus, ps32Port=ps32Port, ps32PortEntry=ps32PortEntry, ps32PowerOutputOfferedVoltage=ps32PowerOutputOfferedVoltage, ps32EnvironTable=ps32EnvironTable, ps32Pathway=ps32Pathway, ps32NumPowerOutputs=ps32NumPowerOutputs, ps32SwitchVersion=ps32SwitchVersion, ps32PathwayTable=ps32PathwayTable, ps32SlotNumber=ps32SlotNumber, ps32SlotLastChange=ps32SlotLastChange, ps32SlotBoardID=ps32SlotBoardID, ps32PortOutput=ps32PortOutput, ps32PowerOutputIndex=ps32PowerOutputIndex, ps32SwitchMiscellanReg=ps32SwitchMiscellanReg, ps32PortBoard=ps32PortBoard, ps32PowerSupplyFailures=ps32PowerSupplyFailures, ps32EnvironFailures=ps32EnvironFailures, ps32EnvironDescriptor=ps32EnvironDescriptor, ps32PortTable=ps32PortTable, ps32SwitchOperStatus=ps32SwitchOperStatus, ps32MaximumPorts=ps32MaximumPorts, ps32PowerSupplyTable=ps32PowerSupplyTable, ps32InstalledPorts=ps32InstalledPorts, ps32EnvironWarnings=ps32EnvironWarnings, ps32PowerSupplyIndex=ps32PowerSupplyIndex, ps32SwitchDiagnosticReg=ps32SwitchDiagnosticReg, ps32PowerSupplyWarnings=ps32PowerSupplyWarnings, ps32EnvironIndex=ps32EnvironIndex, ps32SlotTable=ps32SlotTable, ps32PowerSupplyAdminStatus=ps32PowerSupplyAdminStatus, ps32PowerOutputStatus=ps32PowerOutputStatus, ps32SwitchDate=ps32SwitchDate, ps32EnvironEntry=ps32EnvironEntry, ps32PortInput=ps32PortInput, ps32PathwayPortNumber=ps32PathwayPortNumber, ps32SwitchDescr=ps32SwitchDescr, ps32SwitchAdminStatus=ps32SwitchAdminStatus, ps32EnvironSensor=ps32EnvironSensor, ps32PortSwitchRejectCount=ps32PortSwitchRejectCount, ps32PathwayClear=ps32PathwayClear, nscHippiSwitch=nscHippiSwitch, ps32Environ=ps32Environ, ps32PowerSupplyHealthText=ps32PowerSupplyHealthText, ps32PortCamponDelayCount=ps32PortCamponDelayCount, ps32PortNumber=ps32PortNumber, ps32PathwayEntry=ps32PathwayEntry, ps32PortCurrentStatus=ps32PortCurrentStatus, ps32NumPowerSupplies=ps32NumPowerSupplies, ps32PowerSupplyEntry=ps32PowerSupplyEntry, ps32EnvironHealthText=ps32EnvironHealthText)
def popen(command, mode='r', bufsize=-1): pass class _wrap_close: def close(self): pass
[ ## this file was manually modified by jt { 'functor' : { 'description' : ['Returns the exponent bits of the floating input as an integer value.', 'the other bits (sign and mantissa) are just masked.', '\par', 'The sign \\\\f$ \\\\pm \\\\f$, exponent e and mantissa m of a floating point entry a are related by', '\\\\f$a = \\\\pm m\\\\times 2^e\\\\f$, with m between zero and one'], 'return' : ['an integer value'], 'module' : 'boost', 'arity' : '1', 'call_types' : [], 'ret_arity' : '0', 'rturn' : { 'default' : 'typename boost::dispatch::meta::as_integer<T, signed>::type', }, 'simd_types' : ['real_'], 'type_defs' : [], 'types' : ['real_'], }, 'info' : 'manually modified', 'unit' : { 'global_header' : { 'first_stamp' : 'modified by jt the 04/12/2010', 'included' : ['#include <boost/simd/include/functions/ldexp.hpp>', '#include <boost/simd/include/functions/exponent.hpp>', '#include <boost/simd/include/functions/bits.hpp>'], 'no_ulp' : 'True', 'notes' : [], 'stamp' : 'modified by jt the 12/12/2010', }, 'ranges' : { 'real_' : [['T(-10000)', 'T(10000)']], }, 'specific_values' : { }, 'verif_test' : { 'property_call' : { 'default' : ['boost::simd::exponentbits(a0)'], }, 'property_value' : { 'default' : ['boost::simd::bits(boost::simd::ldexp(boost::simd::One<T>(),boost::simd::exponent(a0)))'], }, 'ulp_thresh' : { 'default' : ['0'], }, }, }, 'version' : '0.1', }, ]
a,b,c = [float(x) for x in input().split()] delta = ((b**2)-(4*a*c)) if a != 0 and delta > 0: sqrt_delta = (delta)**(1/2) r1 = (-b + sqrt_delta)/(2*a) r2 = (-b - sqrt_delta)/(2*a) print("R1 = {0:.5f}".format(r1)) print("R2 = {0:.5f}".format(r2)) else: print("Impossivel calcular")
'''Aprimore o defasio 0086, mostrando no final: A) A soma dos valores pares digitados. B) A soma dos valores da terceira coluna. C) O maior valor da segunda linha.''' m = [[0,0,0], [0,0,0], [0,0,0]] p = co = 0 for c in range(3): for i in range(3): m[c][i] = int(input(f'DIgie um valor para [{c},{i}]: ')) for c in range(0, 3): for i in range(0, 3): print(f'[{m[c][i]}]', end='') print() if m[c][i] %2 == 0: p+=m[c][i] if c == 2: co+=m[i][2] print(f'A soma dos valores pares digitados na coluna foi {p}') print(f'A soma dos valores digitados na terceira coluna foi {co}') print(f'O maior valor da 2ª linha foi {max(m[1])}')
def On(A, B): return ("On", A, B) def Clear(A): return ("Clear", A) def Smaller(A, B): return ("Smaller", A, B) class Towers(object): Pole1 = 'Pole1' Pole2 = 'Pole2' Pole3 = 'Pole3' POLES = ['Pole1', 'Pole2', 'Pole3'] @classmethod def On(cls, A, B): return On(A, B) @classmethod def Clear(cls, A): return Clear(A) @classmethod def Smaller(cls, A, B): return Smaller(A, B) @classmethod def Move(cls, STATE, Disk, Source, Dest): if Clear(Disk) in STATE and On(Disk, Source) in STATE and Clear(Dest) in STATE and Smaller(Disk, Dest) in STATE: STATE.add( On(Disk, Dest) ) STATE.remove( On(Disk, Source) ) STATE.remove( Clear( Dest ) ) STATE.add( Clear( Source ) ) return True else: return False @classmethod def UnMove(cls, STATE, Disk, Source, Dest): if On(Disk, Dest) in STATE and On(Disk, Source) not in STATE and Clear(Dest) not in STATE and Clear(Source) in STATE: STATE.remove( On(Disk, Dest) ) STATE.add( On(Disk, Source) ) STATE.add( Clear( Dest ) ) STATE.remove( Clear( Source ) ) return True else: return False # actions is just a list of pairs of functions to do or undo an action # in general we could make things general and check for function arity # but currently the code only works with Disk, Source, Dest # ACTIONS = [ (Move, UnMove) ] @classmethod def get_actions(cls): return [ (cls.Move, cls.UnMove) ] @classmethod def get_pole(cls, state, disk): """ get the pole of the disk given the state """ if disk in cls.POLES: return disk for p in state: if p[0] == 'On' and p[1] == disk: if p[2] in cls.POLES: return p[2] else: return cls.get_pole(state - set([p]), p[2]) return None # action primitives # move without getting stuff MOVES = { \ (Pole1, Pole2): [4, 1, 5], (Pole1, Pole3): [4, 1, 1, 5], (Pole2, Pole1): [5, 1, 4], (Pole2, Pole3): [4, 1, 5], (Pole3, Pole1): [5, 1, 1, 4], (Pole3, Pole2): [5, 1, 4] } # move with pick up and put down CARRY_MOVES = {} for (source, dest) in MOVES: CARRY_MOVES[(source, dest)] = [3] + MOVES[(source, dest)] + [2] class Towers2(Towers): Disk1 = 'Disk1' Disk2 = 'Disk2' Pole1 = 'Pole1' Pole2 = 'Pole2' Pole3 = 'Pole3' DISKS = ['Disk1', 'Disk2'] POLES = ['Pole1', 'Pole2', 'Pole3'] LITERALS = [Disk1, Disk2, Pole1, Pole2, Pole3] INIT = set([ Clear(Disk1), On(Disk1, Disk2), On(Disk2, Pole1), Clear(Pole2), Clear(Pole3), Smaller(Disk1, Pole1), Smaller(Disk1, Pole2), Smaller(Disk1, Pole3), Smaller(Disk1, Disk2), Smaller(Disk2, Pole1), Smaller(Disk2, Pole2), Smaller(Disk2, Pole3), ]) GOAL = set([ On(Disk1, Disk2), On(Disk2, Pole3) ]) class Towers3(Towers): Disk1 = 'Disk1' Disk2 = 'Disk2' Disk3 = 'Disk3' Pole1 = 'Pole1' Pole2 = 'Pole2' Pole3 = 'Pole3' DISKS = ['Disk1', 'Disk2', 'Disk3'] POLES = ['Pole1', 'Pole2', 'Pole3'] LITERALS = [Disk1, Disk2, Disk3, Pole1, Pole2, Pole3] INIT = set([ Clear(Disk1), On(Disk1, Disk2), On(Disk2, Disk3), On(Disk3, Pole1), Clear(Pole2), Clear(Pole3), Smaller(Disk1, Pole1), Smaller(Disk1, Pole2), Smaller(Disk1, Pole3), Smaller(Disk1, Disk2), Smaller(Disk1, Disk3), Smaller(Disk2, Pole1), Smaller(Disk2, Pole2), Smaller(Disk2, Pole3), Smaller(Disk2, Disk3), Smaller(Disk3, Pole1), Smaller(Disk3, Pole2), Smaller(Disk3, Pole3), ]) GOAL = set([ On(Disk1, Disk2), On(Disk2, Disk3), On(Disk3, Pole3) ])
class Solution: @staticmethod def naive(nums,target): dp = [0]*(target+1) dp[0]=1 for i in range(1,target+1): for n in nums: if i-n>=0: dp[i]+=dp[i-n] return dp[target]
mylist = [1,2,3] print(mylist) mylist.append(4) print(mylist) print(mylist.pop()) print(mylist) mylist.reverse() print(mylist) newlist = mylist mylist.reverse() print(newlist) print(mylist) mylist = mylist*3 print(mylist) mylist = mylist + newlist print(mylist) print(mylist[2:3]) print(mylist[4:5]) createlist = list([mylist[2:3][0],mylist[4:5][0]]) print(createlist)
d1 = 14.85 d2 = 14.8 d3 = 14.79 d4 = 14.84 d5 = 14.81 d0 = 14.8 d_average = d0 + 1 / 5 * (d1 - d0 + d2 - d0 + d3 - d0 + d4 - d0 + d5 - d0) dispersion = 1 / (5 * (5 - 1)) * ((pow(d1 - d0, 2) + pow(d2 - d0, 2) + pow(d3 - d0, 2) + pow(d4 - d0, 2) + pow(d5 - d0, 2)) - 5 * pow(d_average - d0, 2)) standard_deviation = pow(dispersion, 0.5) absolute_error = 2.57 * standard_deviation relative_error = absolute_error / d_average * 100 print("В результате определения диаметра цилиндра получены следующие значени" "я (в мм):\n14.85, 14.8, 14.79, 14.84, 14.81.\nd_0 = 14.8, а d_среднее" " = " + str(d_average) + ".\n\nСредне-квадратичная погрешность = " + str(dispersion) + ".\nСтандартное отклонение = " + str(standard_deviation) + ".\nАбсолютная погрешность = " + str(absolute_error) + ".\nОтносительная погрешность = " + str(relative_error) + ".")
class Container(object): """ Holds hashable objects. Objects may occur 0 or more times """ def __init__(self): """ Creates a new container with no objects in it. I.e., any object occurs 0 times in self. """ self.vals = {} def insert(self, e): """ assumes e is hashable Increases the number times e occurs in self by 1. """ try: self.vals[e] += 1 except: self.vals[e] = 1 def __str__(self): s = "" for i in sorted(self.vals.keys()): if self.vals[i] != 0: s += str(i)+":"+str(self.vals[i])+"\n" return s class Bag(Container): def remove(self, e): """ assumes e is hashable If e occurs in self, reduces the number of times it occurs in self by 1. Otherwise does nothing. """ try: self.vals[e] -= 1 except: pass def count(self, e): """ assumes e is hashable Returns the number of times e occurs in self. """ try: return self.vals[e] except: return 0 def __add__(self, other): newBag = Bag() for element in self.vals.keys(): for times in range(self.count(element)): newBag.insert(element) for element in other.vals.keys(): for times in range(other.count(element)): newBag.insert(element) return newBag a = Bag() a.insert(4) a.insert(3) b = Bag() b.insert(4) print(a+b)
""" # UNIQUE PATHS II A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and space is marked as 1 and 0 respectively in the grid. Example 1: Input: obstacleGrid = [[0,0,0],[0,1,0],[0,0,0]] Output: 2 Explanation: There is one obstacle in the middle of the 3x3 grid above. There are two ways to reach the bottom-right corner: 1. Right -> Right -> Down -> Down 2. Down -> Down -> Right -> Right Example 2: Input: obstacleGrid = [[0,1],[0,0]] Output: 1 Constraints: m == obstacleGrid.length n == obstacleGrid[i].length 1 <= m, n <= 100 obstacleGrid[i][j] is 0 or 1. """ def uniquePathsWithObstacles(obstacleGrid) -> int: m = len(obstacleGrid) n = len(obstacleGrid[0]) if obstacleGrid[m - 1][n - 1] == 1: return 0 known = [[None for _ in range(0, n)] for _ in range(0, m)] return unique(0, 0, m, n, known, obstacleGrid) def unique(posx, posy, m, n, known, obstacles): if posx == m - 1 and posy == n - 1: return 1 if posx >= m or posy >= n or obstacles[posx][posy] == 1: return 0 if known[posx][posy] != None: return known[posx][posy] count = unique(posx + 1, posy, m, n, known, obstacles) + unique(posx, posy + 1, m, n, known, obstacles) known[posx][posy] = count return count
class SimpleMean: def solution(self, value1, value2): mean = ((value1 * 3.5) + (value2 * 7.5)) / 11 return "MEDIA = " + "%.5f" % (mean)
#Basic Data Types Challenge 3: Temperature Conversion App print("Welcome to the Temperature Conversion App") #Gather user input temp_f = float(input("\nWhat is the given temperature in degrees Fahrenheit: ")) #Convert temps temp_c = (5/9)*(temp_f - 32) temp_k = temp_c + 273.15 #Round temps temp_f = round(temp_f, 4) temp_c = round(temp_c, 4) temp_k = round(temp_k, 4) #Summary table print("\nDegrees Fahrenheit:\t" + str(temp_f)) print("Degrees Celsius:\t" + str(temp_c)) print("Degrees Kelvin:\t\t" + str(temp_k))
# compare class # print class # -*- coding:utf-8 -*- def key_func(n): return n.score class TestClass: def __init__(self, code, name, score): self.code = code self.name = name self.score = score # can be printed if define __str__ def __str__(self): return '({}, {}, {})'.format(self.code, self.name, self.score) l = [ TestClass(1, 'Python', 100), TestClass(2, 'Ruby', 80), TestClass(3, 'Perl', 40) ] print(min(l, key=key_func)) print(max(l, key=key_func))
#!/usr/bin/python3 """ A rectangle class defination """ class Rectangle: """ A Rectangular class """ def __init__(self, width=0, height=0): """ Initialize the class""" self.width = width self.height = height @property def width(self): """ width getter method """ return self.__width @width.setter def width(self, value): """ width setter method """ if type(value) != int: raise TypeError("width must be an integer") if value < 0: raise ValueError("width must be >= 0") self.__width = value @property def height(self): """ height getter method """ return self.__height @height.setter def height(self, value): """ height setter method """ if type(value) != int: raise TypeError("height must be an integer") if value < 0: raise ValueError("height must be >= 0") self.__height = value def area(self): """ returns area of this rectangle """ return self.__height * self.__width def perimeter(self): """ returns perimeter of this rectangle""" if self.__width == 0 or self.__height == 0: return 0 else: return 2 * self.__width + 2 * self.__height
# coding=utf8 ROOT_RULE = 'statement -> [mquery]' GRAMMAR_DICTIONARY = {} GRAMMAR_DICTIONARY["statement"] = ['(mquery ws)'] GRAMMAR_DICTIONARY["mquery"] = [ '(ws select_clause ws from_clause ws where_clause ws groupby_clause ws having_clause ws orderby_clause ws limit)', '(ws select_clause ws from_clause ws where_clause ws groupby_clause ws having_clause ws orderby_clause)', '(ws select_clause ws from_clause ws where_clause ws groupby_clause ws having_clause)', '(ws select_clause ws from_clause ws where_clause ws groupby_clause ws orderby_clause ws limit)', '(ws select_clause ws from_clause ws where_clause ws groupby_clause ws orderby_clause)', '(ws select_clause ws from_clause ws where_clause ws groupby_clause)', '(ws select_clause ws from_clause ws where_clause ws orderby_clause ws limit)', '(ws select_clause ws from_clause ws where_clause ws orderby_clause)', '(ws select_clause ws from_clause ws where_clause)', '(ws select_clause ws from_clause ws groupby_clause ws having_clause ws orderby_clause ws limit)', '(ws select_clause ws from_clause ws groupby_clause ws having_clause ws orderby_clause)', '(ws select_clause ws from_clause ws groupby_clause ws having_clause)', '(ws select_clause ws from_clause ws groupby_clause ws orderby_clause ws limit)', '(ws select_clause ws from_clause ws groupby_clause ws orderby_clause)', '(ws select_clause ws from_clause ws groupby_clause)', '(ws select_clause ws from_clause ws orderby_clause ws limit)', '(ws select_clause ws from_clause ws orderby_clause)', '(ws select_clause ws from_clause)' ] # SELECT GRAMMAR_DICTIONARY["select_clause"] = [ '(select_with_distinct ws select_results)'] GRAMMAR_DICTIONARY["select_with_distinct"] = [ '(ws "select" ws "distinct")', '(ws "select")'] GRAMMAR_DICTIONARY["select_results"] = [ '(ws select_result ws "," ws select_results)', '(ws select_result)'] GRAMMAR_DICTIONARY["select_result"] = [ '(subject ws selectop ws subject)', '(subject wsp "as" wsp column_alias)', 'subject', ] # FROM GRAMMAR_DICTIONARY["from_clause"] = ['(ws "from" ws table_source ws join_clauses)', '(ws "from" ws source)'] GRAMMAR_DICTIONARY["join_clauses"] = [ '(join_clause ws join_clauses)', 'join_clause'] GRAMMAR_DICTIONARY["join_clause"] = [ 'joinop ws table_source ws "on" ws join_condition_clause'] GRAMMAR_DICTIONARY["joinop"] = ['"join"', '"left outer join"'] GRAMMAR_DICTIONARY["join_condition_clause"] = [ '(join_condition ws "and" ws join_condition_clause)', 'join_condition'] GRAMMAR_DICTIONARY["join_condition"] = ['ws col_ref ws "=" ws col_ref'] GRAMMAR_DICTIONARY["source"] = [ '(ws single_source ws "," ws source)', '(ws single_source)'] GRAMMAR_DICTIONARY["single_source"] = ['table_source', 'source_subq'] GRAMMAR_DICTIONARY["source_subq"] = ['("(" ws mquery ws ")" wsp "as" wsp table_alias)', '("(" ws mquery ws ")" wsp table_alias)', '("(" ws mquery ws ")")'] GRAMMAR_DICTIONARY["table_source"] = [ '(table_name ws "as" ws table_alias)', 'table_name'] # LIMIT GRAMMAR_DICTIONARY["limit"] = ['("limit" ws non_literal_number)'] # ORDER GRAMMAR_DICTIONARY["orderby_clause"] = ['ws "order" ws "by" ws order_clause'] GRAMMAR_DICTIONARY["order_clause"] = [ '(ordering_term ws "," ws order_clause)', 'ordering_term'] GRAMMAR_DICTIONARY["ordering_term"] = [ '(ws subject ws ordering)', '(ws subject)'] GRAMMAR_DICTIONARY["ordering"] = ['(ws "asc")', '(ws "desc")'] # WHERE GRAMMAR_DICTIONARY["where_clause"] = [ '(ws "where" wsp expr ws where_conj)', '(ws "where" wsp expr)'] GRAMMAR_DICTIONARY["where_conj"] = ['(ws "and" wsp expr ws where_conj)', '(ws "and" wsp expr)', '(ws "or" wsp expr ws where_conj)', '(ws "or" wsp expr)'] # GROUP BY GRAMMAR_DICTIONARY["groupby_clause"] = ['(ws "group" ws "by" ws group_clause)'] GRAMMAR_DICTIONARY["group_clause"] = [ '(ws subject ws "," ws group_clause)', '(ws subject)'] # HAVING GRAMMAR_DICTIONARY["having_clause"] = [ '(ws "having" wsp expr ws having_conj)', '(ws "having" wsp expr)'] GRAMMAR_DICTIONARY["having_conj"] = ['(ws "and" wsp expr ws having_conj)', '(ws "and" wsp expr)', '(ws "or" wsp expr ws having_conj)', '(ws "or" wsp expr)'] GRAMMAR_DICTIONARY["expr"] = [ '(subject wsp "not" wsp "in" wsp "(" ws mquery ws ")")', '(subject wsp "in" ws "(" ws mquery ws ")")', '(subject ws binaryop ws "all" ws "(" ws mquery ws ")")', '(subject ws binaryop ws "any" ws "(" ws mquery ws ")")', '(subject ws binaryop ws "(" ws mquery ws ")")', '(subject ws binaryop ws value)', ] GRAMMAR_DICTIONARY["value"] = ['non_literal_number', 'col_ref', 'string'] GRAMMAR_DICTIONARY["subject"] = ['function', 'col_ref'] GRAMMAR_DICTIONARY["col_ref"] = [ '(table_alias ws "." ws column_name)', 'column_name'] GRAMMAR_DICTIONARY["function"] = ['(fname ws "(" ws "distinct" ws col_ref ws ")")', '(fname ws "(" ws col_ref ws ")")'] GRAMMAR_DICTIONARY["fname"] = ['"count"', '"sum"', '"max"', '"min"', '"avg"', '"all"'] # TODO(MARK): This is not tight enough. AND/OR are strictly boolean value operators. GRAMMAR_DICTIONARY["binaryop"] = ['"="', '"!="', '"<>"', '">="', '"<="', '">"', '"<"', '"like"', '"not like"'] GRAMMAR_DICTIONARY['selectop'] = ['"/"', '"+"', '"-"'] GRAMMAR_DICTIONARY["ws"] = ['~"\s*"i'] GRAMMAR_DICTIONARY['wsp'] = ['~"\s+"i'] GRAMMAR_DICTIONARY["table_name"] = ['"state"', '"city"', '"lake"', '"river"', '"border_info"', '"highlow"', '"mountain"'] GRAMMAR_DICTIONARY["table_alias"] = [ '"statealias0"', '"statealias1"', '"statealias2"', '"statealias3"', '"statealias4"', '"statealias5"', '"cityalias0"', '"cityalias1"', '"cityalias2"', '"lakealias0"', '"mountainalias0"', '"mountainalias1"', '"riveralias0"', '"riveralias1"', '"riveralias2"', '"riveralias3"', '"border_infoalias0"', '"border_infoalias1"', '"border_infoalias2"', '"border_infoalias3"', '"highlowalias0"', '"highlowalias1"', '"derived_tablealias0"', '"derived_tablealias1"', '"tmp"', ] GRAMMAR_DICTIONARY["column_name"] = [ '"*"', '"city_name"', '"population"', '"country_name"', '"state_name"', # city '"border"', # border_info '"highest_elevation"', '"lowest_point"', '"highest_point"', '"lowest_elevation"', # highlow '"lake_name"', '"area"', '"country_name"', # lake '"mountain_name"', '"mountain_altitude"', # mountain '"river_name"', '"length"', '"traverse"', # river '"capital"', '"density"', # state, '"derived_fieldalias0"', '"derived_fieldalias1"', ] GRAMMAR_DICTIONARY['column_alias'] = [ '"derived_fieldalias0"', '"derived_fieldalias1"' # custom ] GRAMMAR_DICTIONARY["non_literal_number"] = [ '"150000"', '"750"', '"0"', '"1"', '"2"', '"3"', '"4"', ] GRAMMAR_DICTIONARY['string'] = ['"\'usa\'"', '"\'red\'"', '"750"', '"0"', '"150000"', '"\'oregon\'"', '"\'georgia\'"', '"\'wisconsin\'"', '"\'montana\'"', '"\'colorado\'"', '"\'west virginia\'"', '"\'hawaii\'"', '"\'new hampshire\'"', '"\'washington\'"', '"\'florida\'"', '"\'north dakota\'"', '"\'idaho\'"', '"\'minnesota\'"', '"\'tennessee\'"', '"\'vermont\'"', '"\'kentucky\'"', '"\'alabama\'"', '"\'oklahoma\'"', '"\'maryland\'"', '"\'nebraska\'"', '"\'iowa\'"', '"\'kansas\'"', '"\'california\'"', '"\'wyoming\'"', '"\'massachusetts\'"', '"\'missouri\'"', '"\'nevada\'"', '"\'south dakota\'"', '"\'utah\'"', '"\'rhode island\'"', '"\'new york\'"', '"\'new jersey\'"', '"\'indiana\'"', '"\'new mexico\'"', '"\'maine\'"', '"\'illinois\'"', '"\'louisiana\'"', '"\'michigan\'"', '"\'mississippi\'"', '"\'ohio\'"', '"\'south carolina\'"', '"\'arkansas\'"', '"\'texas\'"', '"\'virginia\'"', '"\'pennsylvania\'"', '"\'north carolina\'"', '"\'alaska\'"', '"\'arizona\'"', '"\'delaware\'"', '"\'north platte\'"', '"\'chattahoochee\'"', '"\'rio grande\'"', '"\'potomac\'"', '"\'mckinley\'"', '"\'whitney\'"', '"\'death valley\'"', '"\'mount mckinley\'"', '"\'guadalupe peak\'"', '"\'detroit\'"', '"\'plano\'"', '"\'des moines\'"', '"\'boston\'"', '"\'salem\'"', '"\'fort wayne\'"', '"\'houston\'"', '"\'portland\'"', '"\'montgomery\'"', '"\'minneapolis\'"', '"\'tempe\'"', '"\'boulder\'"', '"\'seattle\'"', '"\'columbus\'"', '"\'dover\'"', '"\'indianapolis\'"', '"\'san antonio\'"', '"\'albany\'"', '"\'flint\'"', '"\'chicago\'"', '"\'miami\'"', '"\'scotts valley\'"', '"\'san francisco\'"', '"\'springfield\'"', '"\'sacramento\'"', '"\'salt lake city\'"', '"\'new orleans\'"', '"\'atlanta\'"', '"\'tucson\'"', '"\'denver\'"', '"\'riverside\'"', '"\'erie\'"', '"\'san jose\'"', '"\'durham\'"', '"\'kalamazoo\'"', '"\'baton rouge\'"', '"\'san diego\'"', '"\'pittsburgh\'"', '"\'spokane\'"', '"\'austin\'"', '"\'rochester\'"', '"\'dallas\'"'] COPY_TERMINAL_SET = {'non_literal_number', 'string'}
""" Copyright (C) 2019 Interactive Brokers LLC. All rights reserved. This code is subject to the terms and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable. """ """ High level IB message info. """ # field types INT = 1 STR = 2 FLT = 3 # incoming msg id's class IN: TICK_PRICE = 1 TICK_SIZE = 2 ORDER_STATUS = 3 ERR_MSG = 4 OPEN_ORDER = 5 ACCT_VALUE = 6 PORTFOLIO_VALUE = 7 ACCT_UPDATE_TIME = 8 NEXT_VALID_ID = 9 CONTRACT_DATA = 10 EXECUTION_DATA = 11 MARKET_DEPTH = 12 MARKET_DEPTH_L2 = 13 NEWS_BULLETINS = 14 MANAGED_ACCTS = 15 RECEIVE_FA = 16 HISTORICAL_DATA = 17 BOND_CONTRACT_DATA = 18 SCANNER_PARAMETERS = 19 SCANNER_DATA = 20 TICK_OPTION_COMPUTATION = 21 TICK_GENERIC = 45 TICK_STRING = 46 TICK_EFP = 47 CURRENT_TIME = 49 REAL_TIME_BARS = 50 FUNDAMENTAL_DATA = 51 CONTRACT_DATA_END = 52 OPEN_ORDER_END = 53 ACCT_DOWNLOAD_END = 54 EXECUTION_DATA_END = 55 DELTA_NEUTRAL_VALIDATION = 56 TICK_SNAPSHOT_END = 57 MARKET_DATA_TYPE = 58 COMMISSION_REPORT = 59 POSITION_DATA = 61 POSITION_END = 62 ACCOUNT_SUMMARY = 63 ACCOUNT_SUMMARY_END = 64 VERIFY_MESSAGE_API = 65 VERIFY_COMPLETED = 66 DISPLAY_GROUP_LIST = 67 DISPLAY_GROUP_UPDATED = 68 VERIFY_AND_AUTH_MESSAGE_API = 69 VERIFY_AND_AUTH_COMPLETED = 70 POSITION_MULTI = 71 POSITION_MULTI_END = 72 ACCOUNT_UPDATE_MULTI = 73 ACCOUNT_UPDATE_MULTI_END = 74 SECURITY_DEFINITION_OPTION_PARAMETER = 75 SECURITY_DEFINITION_OPTION_PARAMETER_END = 76 SOFT_DOLLAR_TIERS = 77 FAMILY_CODES = 78 SYMBOL_SAMPLES = 79 MKT_DEPTH_EXCHANGES = 80 TICK_REQ_PARAMS = 81 SMART_COMPONENTS = 82 NEWS_ARTICLE = 83 TICK_NEWS = 84 NEWS_PROVIDERS = 85 HISTORICAL_NEWS = 86 HISTORICAL_NEWS_END = 87 HEAD_TIMESTAMP = 88 HISTOGRAM_DATA = 89 HISTORICAL_DATA_UPDATE = 90 REROUTE_MKT_DATA_REQ = 91 REROUTE_MKT_DEPTH_REQ = 92 MARKET_RULE = 93 PNL = 94 PNL_SINGLE = 95 HISTORICAL_TICKS = 96 HISTORICAL_TICKS_BID_ASK = 97 HISTORICAL_TICKS_LAST = 98 TICK_BY_TICK = 99 ORDER_BOUND = 100 COMPLETED_ORDER = 101 COMPLETED_ORDERS_END = 102 REPLACE_FA_END = 103 # outgoing msg id's class OUT: REQ_MKT_DATA = 1 CANCEL_MKT_DATA = 2 PLACE_ORDER = 3 CANCEL_ORDER = 4 REQ_OPEN_ORDERS = 5 REQ_ACCT_DATA = 6 REQ_EXECUTIONS = 7 REQ_IDS = 8 REQ_CONTRACT_DATA = 9 REQ_MKT_DEPTH = 10 CANCEL_MKT_DEPTH = 11 REQ_NEWS_BULLETINS = 12 CANCEL_NEWS_BULLETINS = 13 SET_SERVER_LOGLEVEL = 14 REQ_AUTO_OPEN_ORDERS = 15 REQ_ALL_OPEN_ORDERS = 16 REQ_MANAGED_ACCTS = 17 REQ_FA = 18 REPLACE_FA = 19 REQ_HISTORICAL_DATA = 20 EXERCISE_OPTIONS = 21 REQ_SCANNER_SUBSCRIPTION = 22 CANCEL_SCANNER_SUBSCRIPTION = 23 REQ_SCANNER_PARAMETERS = 24 CANCEL_HISTORICAL_DATA = 25 REQ_CURRENT_TIME = 49 REQ_REAL_TIME_BARS = 50 CANCEL_REAL_TIME_BARS = 51 REQ_FUNDAMENTAL_DATA = 52 CANCEL_FUNDAMENTAL_DATA = 53 REQ_CALC_IMPLIED_VOLAT = 54 REQ_CALC_OPTION_PRICE = 55 CANCEL_CALC_IMPLIED_VOLAT = 56 CANCEL_CALC_OPTION_PRICE = 57 REQ_GLOBAL_CANCEL = 58 REQ_MARKET_DATA_TYPE = 59 REQ_POSITIONS = 61 REQ_ACCOUNT_SUMMARY = 62 CANCEL_ACCOUNT_SUMMARY = 63 CANCEL_POSITIONS = 64 VERIFY_REQUEST = 65 VERIFY_MESSAGE = 66 QUERY_DISPLAY_GROUPS = 67 SUBSCRIBE_TO_GROUP_EVENTS = 68 UPDATE_DISPLAY_GROUP = 69 UNSUBSCRIBE_FROM_GROUP_EVENTS = 70 START_API = 71 VERIFY_AND_AUTH_REQUEST = 72 VERIFY_AND_AUTH_MESSAGE = 73 REQ_POSITIONS_MULTI = 74 CANCEL_POSITIONS_MULTI = 75 REQ_ACCOUNT_UPDATES_MULTI = 76 CANCEL_ACCOUNT_UPDATES_MULTI = 77 REQ_SEC_DEF_OPT_PARAMS = 78 REQ_SOFT_DOLLAR_TIERS = 79 REQ_FAMILY_CODES = 80 REQ_MATCHING_SYMBOLS = 81 REQ_MKT_DEPTH_EXCHANGES = 82 REQ_SMART_COMPONENTS = 83 REQ_NEWS_ARTICLE = 84 REQ_NEWS_PROVIDERS = 85 REQ_HISTORICAL_NEWS = 86 REQ_HEAD_TIMESTAMP = 87 REQ_HISTOGRAM_DATA = 88 CANCEL_HISTOGRAM_DATA = 89 CANCEL_HEAD_TIMESTAMP = 90 REQ_MARKET_RULE = 91 REQ_PNL = 92 CANCEL_PNL = 93 REQ_PNL_SINGLE = 94 CANCEL_PNL_SINGLE = 95 REQ_HISTORICAL_TICKS = 96 REQ_TICK_BY_TICK_DATA = 97 CANCEL_TICK_BY_TICK_DATA = 98 REQ_COMPLETED_ORDERS = 99
class SystemTopology(object): def __init__(self, topology, resolution="martini"): if resolution == "martini": lipid_indices = topology.select("all and not (name BB or (name =~ 'SC[1-9]'))") proteins_indices = topology.select("name BB or (name BB or (name =~ 'SC[1-9]'))") self.topology = topology self.dataframe = topology.to_dataframe()[0] self.l_indices = lipid_indices self.p_indices = proteins_indices self.pdf = self.dataframe.iloc[proteins_indices] self.ldf = self.dataframe.iloc[lipid_indices] def __str__(self): return "placeholder." def __repr__(self): return "placeholder." class Lipids(SystemTopology): def __init__(self, topology, mdtraj_selection_string=''): super().__init__(topology) if mdtraj_selection_string != '': self.l_indices = topology.select(mdtraj_selection_string) def lipid_names(self): return self.dataframe.iloc[self.l_indices].resName.unique() class Protein(object): def __init__(self, name): self.name = name self.counter = 1 self.dataframe = [] self.beads = 0 self.n_residues = 0 def get_indices(self, df=None): """ Return indices from a given residue array. """ if df is None: if len(self.dataframe) > 1: print ("Object has more than one dataframe. Using the first one.") else: print ("Using the available dataframe") df=self.dataframe[0] residues = df[df.name == "BB"].resSeq.to_list() indices = [df[df.resSeq == x].index.to_numpy() for x in residues] return indices def __str__(self): return "<prolint.Protein containing {} replicate(s) of {} and {} beads each>".format(self.counter, self.name, self.n_residues) def __repr__(self): return "<prolint.Protein containing {} replicate(s) of {} and {} beads each>".format(self.counter, self.name, self.n_residues) class Proteins(SystemTopology): def __init__(self, topology): super().__init__(topology) # Get start and end indices of proteins in the system. # The assumption here is that proteins are ordered and the start residue of the next # protein is always smaller than the last residue of the previous protein. resseq = self.pdf.resSeq.to_list() p0 = resseq[0] # system_proteins contains the start and end indices of all proteins. fi_li = [] fi = 0 for li, p in enumerate(resseq): if p < p0: fi_li.append((fi, li-1)) fi = li p0 = p fi_li.append((fi, li)) self.fi_li = fi_li def system_proteins(self): c = 0 proteins = [] # Two proteins are the same if residue number and all beads are equal between them. for values in self.fi_li: # first and last index fi = values[0] li = values[1] # Get the data for the current protein. current_protein_df = self.pdf[(self.pdf.index >= fi) & (self.pdf.index <= li)] curr_len = len(current_protein_df) curr_names = current_protein_df.name.to_list() new_protein = True for pc in proteins: if curr_names == pc.beads: pc.counter += 1 pc.dataframe.append(current_protein_df.copy()) new_protein = False if new_protein: protein = Protein(f'Protein{c}') protein.dataframe.append(current_protein_df.copy()) protein.beads = curr_names protein.n_residues = curr_len proteins.append(protein) c += 1 return proteins def __str__(self): return "class storing information on system proteins" def __repr__(self): return "class storing information on system proteins"
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # 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. CREATED = "created" UPDATED = "updated" DELETED = "deleted" PROMOTED = "promoted" VIEWED = "viewed" STATS = "stats" CLONED = "cloned" RESUMED = "resumed" STARTED = "started" RESTARTED = "restarted" COPIED = "copied" SUCCEEDED = "succeeded" FAILED = "failed" DONE = "done" STOPPED = "stopped" APPROVED = "approved" INVALIDATED = "invalidated" SKIPPED = "skipped" SETTINGS = "settings" BILLING = "billing" NEW_STATUS = "new_status" NEW_STAGE = "new_stage" NEW_ARTIFACTS = "new_artifacts" WRITE_ACTIONS = [ CREATED, UPDATED, DELETED, RESUMED, COPIED, CLONED, STOPPED, APPROVED, SETTINGS, PROMOTED, ]
class ActionBatchSm(object): def __init__(self): super(ActionBatchSm, self).__init__() def deleteNetworkSmUserAccessDevice(self, networkId: str, userAccessDeviceId: str): """ **Delete a User Access Device** https://developer.cisco.com/meraki/api-v1/#!delete-network-sm-user-access-device - networkId (string): (required) - userAccessDeviceId (string): (required) """ metadata = { 'tags': ['sm', 'configure', 'userAccessDevices'], 'operation': 'deleteNetworkSmUserAccessDevice' } resource = f'/networks/{networkId}/sm/userAccessDevices/{userAccessDeviceId}' action = { "resource": resource, "operation": "destroy", "body": payload } return action
''' 09 - Facetting multiple regressions lmplot() allows us to facet the data across multiple rows and columns. In the previous plot, the multiple lines were difficult to read in one plot. We can try creating multiple plots by Region to see if that is a more useful visualization. Instructions - Use lmplot() to look at the relationship between insurance_losses and premiums. - Create a plot for each Region of the country. - Display the plots across multiple rows. ''' # Create a regression plot with multiple rows sns.lmplot(data=df, x="insurance_losses", y="premiums", row="Region") # Show the plot plt.show()
jovem = 0 adulto = 0 idoso = 0 media = 0 cont = 0 soma = 0 while True: idade = int(input('Digite a idade(0 para encerrar): ')) soma += idade cont += 1 if 0 < idade < 26: print('Jovem') jovem += 1 elif 26 <= idade < 60: print('Adulto') adulto += 1 elif idade > 60: print('Idoso') idoso += 1 if idade == 0: break media = soma / cont if 0 < media < 26: turma = 'Jovens' elif 26 <= media < 60: turma = 'Adultos' elif media > 60: turma = 'Idosos' print(f'A turm é formada em sua maiória por {turma}')
# coding: utf-8 """ Given two int values, return their sum. Unless the two values are the same, then return double their sum. sum_double(1, 2) → 3 sum_double(3, 2) → 5 sum_double(2, 2) → 8 """ def sum_double(a, b): return (a + b if a != b else (a+b) * 2)
# -*- coding: utf-8 -*- # vi: set ft=python sw=4 : """SLRD base exception classes. This module defines main types of exceptions raised in SLRD project. The base class SLRDException indicates that the exception is related to SLRD program and was a result of program-specific causes. SLRDRuntimeException is a base class for exceptions that happen due to a dynimic input from a user or is a result of certain external factors. This type of exceptions should be caught and handled properly to provide a verbose explanation of the causes (bubble up to user interface etc). SLRDImplementationError is a base class for exceptions that are a result of an improper usage of SLRD internal modules (controllers etc.). This type of exceptions should not happen at all thus should not be caught or processed in any way except for ensuring graceful shutdown in extreme occasions. Classes: - SLRDException - SLRDRuntimeException - SLRDImplementationError """ class SLRDException(Exception): """Base exceptions class. Pass an already formatted exception message to its parent class to be printed out to STDOUT. """ def __init__(self, msg): """Initialization method. :param msg: message to print when being raised :type msg: str """ super().__init__(msg) class SLRDRuntimeException(SLRDException): """Base external input related exception class.""" class SLRDImplementationError(SLRDException): """Base internal error related exception class. In other words the error is critical and is a result of improper usage of internal modules. Should not be caught and generally should not happen at all. Think of it as a some kind of assertion. """
def get_context_vars(): return {"entity_type": "user", "date": "2018-10-20", "batch_size": "daily"} def get_metadata(): return { "extractor": {"params": {"input_path": "user/p_year=2018/p_month=10/p_day=20"}, "name": "JSONExtractor"}, "transformers": [ {"params": {"exploded_elem_name": "friends_element", "path_to_array": "friends"}, "name": "Exploder"}, {"params": {"filter_expression": "average_stars >= 2.5"}, "name": "Sieve"}, { "params": {"filter_expression": 'isnotnull(friends_element) and friends_element <> "None"'}, "name": "Sieve", }, { "params": { "mapping": [ ["user_id", "user_id", "StringType"], ["review_count", "review_count", "LongType"], ["average_stars", "average_stars", "DoubleType"], ["elite_years", "elite", "json_string"], ["friend", "friends_element", "StringType"], ] }, "name": "Mapper", }, {"params": {"thresholds": {"average_stars": {"max": 5, "min": 1}}}, "name": "ThresholdCleaner"}, {"params": {"group_by": ["user_id", "friend"], "order_by": ["review_count"]}, "name": "NewestByGroup"}, ], "context_variables": { "pipeline_type": "batch", "entity_type": "user", "value_ranges": {"average_stars": {"max": 5, "min": 1}}, "level_of_detail": "std", "level_of_detail_int": 5, "mapping": [ { "target_type": "StringType", "triviality": 1, "name": "user_id", "desc": "22 character unique user id, maps to the user in user.json", }, { "path": "name", "target_type": "StringType", "has_pii": "yes", "name": "first_name", "desc": "the user's first name - anonymized", }, { "target_type": "LongType", "triviality": 1, "name": "review_count", "desc": "the number of reviews they've written", }, { "target_type": "StringType", "name": "yelping_since", "desc": "when the user joined Yelp, formatted like YYYY-MM-DD", }, { "target_type": "DoubleType", "triviality": 1, "name": "average_stars", "desc": "average rating of all reviews", }, { "path": "elite", "target_type": "json_string", "triviality": 5, "name": "elite_years", "desc": "the years the user was elite", }, { "path": "friends_element", "target_type": "StringType", "triviality": 1, "name": "friend", "desc": "the user's friend as user_ids", }, { "target_type": "LongType", "triviality": 10, "name": "useful", "desc": "number of useful votes sent by the user", }, { "target_type": "LongType", "triviality": 10, "name": "funny", "desc": "number of funny votes sent by the user", }, { "target_type": "LongType", "triviality": 10, "name": "cool", "desc": "number of cool votes sent by the user", }, {"target_type": "LongType", "name": "fans", "desc": "number of fans the user has"}, { "target_type": "LongType", "triviality": 10, "name": "compliment_hot", "desc": "number of hot compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_more", "desc": "number of more compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_profile", "desc": "number of profile compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_cute", "desc": "number of cute compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_list", "desc": "number of list compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_note", "desc": "number of note compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_plain", "desc": "number of plain compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_cool", "desc": "number of cool compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_funny", "desc": "number of funny compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_writer", "desc": "number of writer compliments received by the user", }, { "target_type": "LongType", "triviality": 10, "name": "compliment_photos", "desc": "number of photo compliments received by the user", }, ], "batch_size": "daily", "time_range": "last_day", "filter_expressions": ["average_stars >= 2.5", 'isnotnull(friends_element) and friends_element <> "None"'], "output": { "partition_definitions": [ {"column_name": "p_year"}, {"column_name": "p_month"}, {"column_name": "p_day"}, ], "locality": "internal", "repartition_size": 10, "format": "table", }, "date": "2018-10-20", "input": {"locality": "internal", "container": "text", "base_path": "user", "format": "json"}, "schema": { "arrays_to_explode": ["friends"], "grouping_keys": ["user_id", "friend"], "needs_deduplication": "yes", "sorting_keys": ["review_count"], }, }, "loader": { "params": { "auto_create_table": True, "partition_definitions": [ {"default_value": 2018, "column_type": "IntegerType", "column_name": "p_year"}, {"default_value": 10, "column_type": "IntegerType", "column_name": "p_month"}, {"default_value": 20, "column_type": "IntegerType", "column_name": "p_day"}, ], "overwrite_partition_value": True, "repartition_size": 10, "clear_partition": True, "db_name": "user", "table_name": "users_daily_partitions", }, "name": "HiveLoader", }, }
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2017-8-30 @author: generated by @lolobosse script ''' LOCALE = [ ["agora mesmo", "daqui um pouco"], ["há %s segundos", "em %s segundos"], ["há um minuto", "em um minuto"], ["há %s minutos", "em %s minutos"], ["há uma hora", "em uma hora"], ["há %s horas", "em %s horas"], ["há um dia", "em um dia"], ["há %s dias", "em %s dias"], ["há uma semana", "em uma semana"], ["há %s semanas", "em %s semanas"], ["há um mês", "em um mês"], ["há %s meses", "em %s meses"], ["há um ano", "em um ano"], ["há %s anos", "em %s anos"] ]
def conv_output_shape(h_w, kernel_size=1, stride=1, pad=0, dilation=1): """ Utility function for computing output of convolutions takes a tuple of (h,w) and returns a tuple of (h,w) """ if type(h_w) is not tuple: h_w = (h_w, h_w) if type(kernel_size) is not tuple: kernel_size = (kernel_size, kernel_size) if type(stride) is not tuple: stride = (stride, stride) if pad == 'same': return h_w elif type(pad) is not tuple: pad = (pad, pad) h = (h_w[0] + (2 * pad[0]) - (dilation * (kernel_size[0] - 1)) - 1) // \ stride[0] + 1 w = (h_w[1] + (2 * pad[1]) - (dilation * (kernel_size[1] - 1)) - 1) // \ stride[1] + 1 return h, w
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ VERSION = "11.1.1" # type: str SDK_MONIKER = "search-documents/{}".format(VERSION) # type: str
class Solution: def lastStoneWeight(self, stones: List[int]) -> int: stones.sort() while len(stones) > 1: first = stones.pop() second = stones.pop() if first == second: continue else: diff = first - second done = True for i in range(len(stones)): if diff <= stones[i]: stones.insert(i, diff) done = False break if done: stones.append(diff) return len(stones) == 1 and stones[0] or 0
""" This file provides functions for converting deeprobust data to pytorch geometric data. """
def set_qmxgraph_debug(enabled): """ Enables/disables checks and other helpful debug features globally in QmxGraph. :param bool enabled: If enabled or not. """ global _QGRAPH_DEBUG _QGRAPH_DEBUG = bool(enabled) def is_qmxgraph_debug_enabled(): """ :rtype: bool :return: Are QmxGraph debug features enabled globally? """ return _QGRAPH_DEBUG _QGRAPH_DEBUG = False
B = [['m', 'm', '_', '_', '_'], ['m', 'm', '_', '_', '_'], ['_', '_', 'm', '_', '_']] M = len(B); N = len(B[0]) answer = [] for row in range(M): new_row = [] for column in range(N): if B[row][column]=='m': new_row.append('m') else: mine_number=0 if row>0 and B[row-1][column]=='m': #N mine_number+=1 if row<(M-1) and B[row+1][column]=='m': #S mine_number+=1 if column<(N-1) and B[row][column+1]=='m': #E mine_number+=1 if column>0 and B[row][column-1]=='m': #W mine_number+=1 new_row.append(mine_number) answer.append(new_row) print(answer)
def getPeople(): """ In practice, here I would have a reference of a collection in the database. The collection can be stored in a variable like config of the app, and later retrieved here using current_app module of Flask. Then on that collection we can perform a query. """ return 'Hello'
# DUNDER METHODS IS METHODS WITH __example___ class Number: def __init__(self, num): self.num = num def __add__(self, num2): print("lets add") return self.num + num2.num def __mul__(self, num2): print("lets multiply") return self.num * num2.num def __str__(self): return f"Decimal Number: {self.num}" def __len__(self): return 1 n1 = Number(4) n2 = Number(6) sum = n1 + n2 mul = n1 * n2 print(sum) print(mul) # OTHER DUNDER METHODS LIKE STR n= Number(9) print(n) print("the len is ", len(n))
class RecipeScrapersExceptions(Exception): def __init__(self, message): self.message = message super().__init__(message) def __str__(self): return f"recipe-scrapers exception: {self.message}" class WebsiteNotImplementedError(RecipeScrapersExceptions): """Error when website is not supported by this library.""" def __init__(self, domain): self.domain = domain message = f"Website ({self.domain}) not supported." super().__init__(message) class NoSchemaFoundInWildMode(RecipeScrapersExceptions): """Error when wild_mode fails to locate schema at the url""" def __init__(self, url): self.url = url message = f"No Recipe Schema found at {self.url}." super().__init__(message) class ElementNotFoundInHtml(RecipeScrapersExceptions): """Error when we cannot locate the HTML element on the page""" def __init__(self, element): self.element = element message = ( "Element not found in html (self.soup.find returned None). Check traceback." ) super().__init__(message) class SchemaOrgException(RecipeScrapersExceptions): """Error in parsing or missing portion of the Schema.org data org the page""" def __init__(self, message): super().__init__(message)
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ """ class TestHome: """Home page.""" def test_get_homepage_returns_200(self, testapp): """Get homepage successful.""" # Goes to homepage res = testapp.get('/') assert res.status_code == 200 class TestAbout: """About page.""" def test_get_about_returns_200(self, testapp): """Get about page successful.""" # Goes to homepage res = testapp.get('/about/') assert res.status_code == 200
def dfs(i): if visited[i]: return visited[i] = 1 for nbr in graph[i]: dfs(nbr) n,e = map(int,input().split()) graph = dict() visited = [0 for i in range(n+1)] for i in range(1,n+1): graph[i] = [] for i in range(e): u,v = map(int,input().split()) graph[u].append(v) graph[v].append(u) components = 1 for i in range(1,n+1): if not visited[i]: components += 1 dfs(i) print(components)
# # @lc app=leetcode id=88 lang=python # # [88] Merge Sorted Array # # https://leetcode.com/problems/merge-sorted-array/description/ # # algorithms # Easy (34.87%) # Total Accepted: 337K # Total Submissions: 962.2K # Testcase Example: '[1,2,3,0,0,0]\n3\n[2,5,6]\n3' # # Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as # one sorted array. # # Note: # # # The number of elements initialized in nums1 and nums2 are m and n # respectively. # You may assume that nums1 has enough space (size that is greater or equal to # m + n) to hold additional elements from nums2. # # # Example: # # # Input: # nums1 = [1,2,3,0,0,0], m = 3 # nums2 = [2,5,6], n = 3 # # Output: [1,2,2,3,5,6] # # # class Solution(object): def merge(self, nums1, m, nums2, n): """ :type nums1: List[int] :type m: int :type nums2: List[int] :type n: int :rtype: None Do not return anything, modify nums1 in-place instead. """ i = 0 j = 0 while j < n: if i >= m: self.insertAndBack(nums1, i, nums2[j]) m += 1 i += 1 j += 1 continue if nums1[i] < nums2[j]: i += 1 else: self.insertAndBack(nums1, i, nums2[j]) m += 1 i += 1 j += 1 def insertAndBack(self, nums, index, num): for i in range(len(nums)-1, index, -1): nums[i] = nums[i-1] nums[index] = num # if __name__ == "__main__": # s = Solution() # a = [1,2,3,0,0,0] # b = [2,5,6] # s.merge(a, 3, b, 3) # print a
""" A huge map of every Twitter API endpoint to a function definition in \ Twython. Parameters that need to be embedded in the URL are treated with mustaches,\ e.g: {{version}}, etc When creating new endpoint definitions, keep in mind that the name of the\ mustache will be replaced with the keyword that gets passed in to the \ function at call time. i.e, in this case, if I pass version = 47 to any function, {{version}} \ will be replaced with 47, instead of defaulting to 1\ (said defaulting takes place at conversion time). """ # Base Twitter API url, no need to repeat this junk... base_url = 'http://api.twitter.com/{{version}}' api_table = { 'getRateLimitStatus': { 'url': '/account/rate_limit_status.json', 'method': 'GET', }, 'verifyCredentials': { 'url': '/account/verify_credentials.json', 'method': 'GET', }, 'endSession' : { 'url': '/account/end_session.json', 'method': 'POST', }, # Timeline methods 'getPublicTimeline': { 'url': '/statuses/public_timeline.json', 'method': 'GET', }, 'getHomeTimeline': { 'url': '/statuses/home_timeline.json', 'method': 'GET', }, 'getUserTimeline': { 'url': '/statuses/user_timeline.json', 'method': 'GET', }, 'getFriendsTimeline': { 'url': '/statuses/friends_timeline.json', 'method': 'GET', }, # Interfacing with friends/followers 'getUserMentions': { 'url': '/statuses/mentions.json', 'method': 'GET', }, 'getFriendsStatus': { 'url': '/statuses/friends.json', 'method': 'GET', }, 'getFollowersStatus': { 'url': '/statuses/followers.json', 'method': 'GET', }, 'createFriendship': { 'url': '/friendships/create.json', 'method': 'POST', }, 'destroyFriendship': { 'url': '/friendships/destroy.json', 'method': 'POST', }, 'getFriendsIDs': { 'url': '/friends/ids.json', 'method': 'GET', }, 'getFollowersIDs': { 'url': '/followers/ids.json', 'method': 'GET', }, 'getIncomingFriendshipIDs': { 'url': '/friendships/incoming.json', 'method': 'GET', }, 'getOutgoingFriendshipIDs': { 'url': '/friendships/outgoing.json', 'method': 'GET', }, # Retweets 'reTweet': { 'url': '/statuses/retweet/{{id}}.json', 'method': 'POST', }, 'getRetweets': { 'url': '/statuses/retweets/{{id}}.json', 'method': 'GET', }, 'retweetedOfMe': { 'url': '/statuses/retweets_of_me.json', 'method': 'GET', }, 'retweetedByMe': { 'url': '/statuses/retweeted_by_me.json', 'method': 'GET', }, 'retweetedToMe': { 'url': '/statuses/retweeted_to_me.json', 'method': 'GET', }, # User methods 'showUser': { 'url': '/users/show.json', 'method': 'GET', }, 'searchUsers': { 'url': '/users/search.json', 'method': 'GET', }, # Status methods - showing, updating, destroying, etc. 'showStatus': { 'url': '/statuses/show/{{id}}.json', 'method': 'GET', }, 'updateStatus': { 'url': '/statuses/update.json', 'method': 'POST', }, 'destroyStatus': { 'url': '/statuses/destroy/{{id}}.json', 'method': 'POST', }, # Direct Messages - getting, sending, effing, etc. 'getDirectMessages': { 'url': '/direct_messages.json', 'method': 'GET', }, 'getSentMessages': { 'url': '/direct_messages/sent.json', 'method': 'GET', }, 'sendDirectMessage': { 'url': '/direct_messages/new.json', 'method': 'POST', }, 'destroyDirectMessage': { 'url': '/direct_messages/destroy/{{id}}.json', 'method': 'POST', }, # Friendship methods 'checkIfFriendshipExists': { 'url': '/friendships/exists.json', 'method': 'GET', }, 'showFriendship': { 'url': '/friendships/show.json', 'method': 'GET', }, # Profile methods 'updateProfile': { 'url': '/account/update_profile.json', 'method': 'POST', }, 'updateProfileColors': { 'url': '/account/update_profile_colors.json', 'method': 'POST', }, # Favorites methods 'getFavorites': { 'url': '/favorites.json', 'method': 'GET', }, 'createFavorite': { 'url': '/favorites/create/{{id}}.json', 'method': 'POST', }, 'destroyFavorite': { 'url': '/favorites/destroy/{{id}}.json', 'method': 'POST', }, # Blocking methods 'createBlock': { 'url': '/blocks/create/{{id}}.json', 'method': 'POST', }, 'destroyBlock': { 'url': '/blocks/destroy/{{id}}.json', 'method': 'POST', }, 'getBlocking': { 'url': '/blocks/blocking.json', 'method': 'GET', }, 'getBlockedIDs': { 'url': '/blocks/blocking/ids.json', 'method': 'GET', }, 'checkIfBlockExists': { 'url': '/blocks/exists.json', 'method': 'GET', }, # Trending methods 'getCurrentTrends': { 'url': '/trends/current.json', 'method': 'GET', }, 'getDailyTrends': { 'url': '/trends/daily.json', 'method': 'GET', }, 'getWeeklyTrends': { 'url': '/trends/weekly.json', 'method': 'GET', }, 'availableTrends': { 'url': '/trends/available.json', 'method': 'GET', }, 'trendsByLocation': { 'url': '/trends/{{woeid}}.json', 'method': 'GET', }, # Saved Searches 'getSavedSearches': { 'url': '/saved_searches.json', 'method': 'GET', }, 'showSavedSearch': { 'url': '/saved_searches/show/{{id}}.json', 'method': 'GET', }, 'createSavedSearch': { 'url': '/saved_searches/create.json', 'method': 'GET', }, 'destroySavedSearch': { 'url': '/saved_searches/destroy/{{id}}.json', 'method': 'GET', }, # List API methods/endpoints. Fairly exhaustive and annoying in general. ;P 'createList': { 'url': '/{{username}}/lists.json', 'method': 'POST', }, 'updateList': { 'url': '/{{username}}/lists/{{list_id}}.json', 'method': 'POST', }, 'showLists': { 'url': '/{{username}}/lists.json', 'method': 'GET', }, 'getListMemberships': { 'url': '/{{username}}/lists/memberships.json', 'method': 'GET', }, 'getListSubscriptions': { 'url': '/{{username}}/lists/subscriptions.json', 'method': 'GET', }, 'deleteList': { 'url': '/{{username}}/lists/{{list_id}}.json', 'method': 'DELETE', }, 'getListTimeline': { 'url': '/{{username}}/lists/{{list_id}}/statuses.json', 'method': 'GET', }, 'getSpecificList': { 'url': '/{{username}}/lists/{{list_id}}/statuses.json', 'method': 'GET', }, 'addListMember': { 'url': '/{{username}}/{{list_id}}/members.json', 'method': 'POST', }, 'getListMembers': { 'url': '/{{username}}/{{list_id}}/members.json', 'method': 'GET', }, 'deleteListMember': { 'url': '/{{username}}/{{list_id}}/members.json', 'method': 'DELETE', }, 'getListSubscribers': { 'url': '/{{username}}/{{list_id}}/subscribers.json', 'method': 'GET', }, 'subscribeToList': { 'url': '/{{username}}/{{list_id}}/subscribers.json', 'method': 'POST', }, 'unsubscribeFromList': { 'url': '/{{username}}/{{list_id}}/subscribers.json', 'method': 'DELETE', }, # The one-offs 'notificationFollow': { 'url': '/notifications/follow/follow.json', 'method': 'POST', }, 'notificationLeave': { 'url': '/notifications/leave/leave.json', 'method': 'POST', }, 'updateDeliveryService': { 'url': '/account/update_delivery_device.json', 'method': 'POST', }, 'reportSpam': { 'url': '/report_spam.json', 'method': 'POST', }, }
class Vote(object): def __init__(self, candidates_running, candidate_preferences): self.candidate_preferences = filter( lambda candidate: candidate in candidates_running, candidate_preferences ) self.value = 1 def is_exhausted(self): """ Returns true if this vote has no preferred candidates still running. """ return len(self.candidate_preferences) == 0 def preference_from(self, candidates): """ Returns the most preferred candidate from the list of candidates given, or None if there isn't one. """ matches = filter(lambda candidate: candidate in candidates, self.candidate_preferences) if len(matches) > 0: return matches[0] else: return None
"""sci_analysis module: graph Classes: Graph - The super class all other sci_analysis graphing classes descend from. GraphHisto - Draws a histogram. GraphScatter - Draws an x-by-y scatter plot. GraphBoxplot - Draws box plots of the provided data as well as an optional probability plot. """ # TODO: Add preferences back in a future version # from ..preferences.preferences import GraphPreferences # from six.moves import range _colors = ( (0.0, 0.3, 0.7), # blue (1.0, 0.1, 0.1), # red (0.0, 0.7, 0.3), # green (1.0, 0.5, 0.0), # orange (0.1, 1.0, 1.0), # cyan (1.0, 1.0, 0.0), # yellow (1.0, 0.0, 1.0), # magenta (0.5, 0.0, 1.0), # purple (0.5, 1.0, 0.0), # light green (0.0, 0.0, 0.0) # black ) _color_names = ( 'blue', 'red', 'green', 'orange', 'cyan', 'yellow', 'magenta', 'purple', 'light green', 'black' ) class Graph(object): """The super class all other sci_analysis graphing classes descend from. Classes that descend from Graph should implement the draw method at bare minimum. Graph members are _nrows, _ncols, _xsize, _ysize, _data, _xname and _yname. The _nrows member is the number of graphs that will span vertically. The _ncols member is the number of graphs that will span horizontally. The _xsize member is the horizontal size of the graph area. The _ysize member is the vertical size of the graph area. The _data member the data to be plotted. The _xname member is the x-axis label. The _yname member is the y-axis label. Parameters ---------- _nrows : int, static The number of graphs that will span vertically. _ncols : int, static The number of graphs that will span horizontally. _xsize : int, static The horizontal size of the graph area. _ysize : int, static The vertical size of the graph area. _min_size : int, static The minimum required length of the data to be graphed. _xname : str The x-axis label. _yname : str The y-axis label. _data : Data or list(d1, d2, ..., dn) The data to graph. Returns ------- pass """ _nrows = 1 _ncols = 1 _xsize = 5 _ysize = 5 _min_size = 1 def __init__(self, data, **kwargs): self._xname = kwargs['xname'] if 'xname' in kwargs else 'x' self._yname = kwargs['yname'] if 'yname' in kwargs else 'y' self._data = data def get_color_by_name(self, color='black'): """Return a color array based on the string color passed. Parameters ---------- color : str A string color name. Returns ------- color : tuple A color tuple that corresponds to the passed color string. """ return self.get_color(_color_names.index(color)) @staticmethod def get_color(num): """Return a color based on the given num argument. Parameters ---------- num : int A numeric value greater than zero that returns a corresponding color. Returns ------- color : tuple A color tuple calculated from the num argument. """ desired_color = [] floor = int(num) // len(_colors) remainder = int(num) % len(_colors) selected = _colors[remainder] if floor > 0: for value in selected: desired_color.append(value / (2.0 * floor) + 0.4) return tuple(desired_color) else: return selected def draw(self): """ Prepares and displays the graph based on the set class members. """ raise NotImplementedError
class Repeater: def __init__(self, value): self.value = value def __iter__(self): return RepeaterIterator(self) class RepeaterIterator: def __init__(self, source): self.source = source def __next__(self): return self.source.value
#### Init service_domain = data.get('service_domain') service = data.get('service') service_data_increase = data.get('service_data_increase') service_data_decrease = data.get('service_data_decrease') # fan speed data speed = data.get('fan_speed') speed_count = data.get('fan_speed_count') fan_speed_entity = hass.states.get(data.get('fan_speed_entity_id')) fan_entity = hass.states.get(data.get('fan_entity_id')) logger.debug('<fan_speed_control> fan state ({})'.format(fan_entity.state)) logger.debug('<fan_speed_control> Received fan speed from ({}) to ({})'.format(fan_speed_entity.state, speed)) ### def def check_speed(logger, speed): if speed is None: logger.warning('<fan_speed_control> Received fan speed is invalid (None)') return False if fan_entity.state is 'off': logger.warning('<fan_speed_control> can not change speed when fan is off') return False return True ### Run if check_speed(logger, speed): speed_step = 100 // speed_count target_speed = int(speed) // speed_step last_speed = int(fan_speed_entity.state) // speed_step if fan_speed_entity.state else 1 speed_max = speed_count if target_speed > last_speed: increase_loop = target_speed - last_speed decrease_loop = last_speed + speed_max - target_speed else: increase_loop = target_speed + speed_max - last_speed decrease_loop = last_speed - target_speed # check use increase or decrease if decrease_loop < increase_loop: loop = decrease_loop service_data = service_data_decrease else: loop = increase_loop service_data = service_data_increase # update speed state hass.states.set(data.get('fan_speed_entity_id'), speed) # Call service if data.get('support_num_repeats', False): service_data['num_repeats'] = loop logger.debug('<fan_speed_control> call service ({}.{}) {}'.format(service_domain, service, service_data)) hass.services.call(service_domain, service, service_data) else: for i in range(loop): logger.debug('<fan_speed_control> call service ({}.{}) {}'.format(service_domain, service, service_data)) result = hass.services.call(service_domain, service, service_data) time.sleep(0.75) elif fan_entity.state is not 'off' and speed == 'off': logger.debug('<fan_speed_control> call fan off') hass.services.call('fan', 'turn_off', { 'entity_id': data.get('fan_entity_id') })
class Error(Exception): """Base class for other exceptions""" def __init__(self, message): self.message = message super().__init__(self.message) def __str__(self): return self.message class ElasticSearchError(Error): """Raised when elasticsearch error"""
word = input() while word != "Stop": print(word) word = input()
# Copyright 2019 The Bazel 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. """Starlark transition support for Apple rules.""" load("@bazel_skylib//lib:dicts.bzl", "dicts") def _cpu_string(*, cpu, platform_type, settings): """Generates a <platform>_<arch> string for the current target based on the given parameters. Args: cpu: A valid Apple cpu command line option as a string, or None to infer a value from command line options passed through settings. platform_type: The Apple platform for which the rule should build its targets (`"ios"`, `"macos"`, `"tvos"`, or `"watchos"`). settings: A dictionary whose set of keys is defined by the inputs parameter, typically from the settings argument found on the implementation function of the current Starlark transition. Returns: A <platform>_<arch> string defined for the current target. """ if platform_type == "ios": if cpu: return "ios_{}".format(cpu) ios_cpus = settings["//command_line_option:ios_multi_cpus"] if ios_cpus: return "ios_{}".format(ios_cpus[0]) cpu_value = settings["//command_line_option:cpu"] if cpu_value.startswith("ios_"): return cpu_value return "ios_x86_64" if platform_type == "macos": if cpu: return "darwin_{}".format(cpu) macos_cpus = settings["//command_line_option:macos_cpus"] if macos_cpus: return "darwin_{}".format(macos_cpus[0]) return "darwin_x86_64" if platform_type == "tvos": if cpu: return "tvos_{}".format(cpu) tvos_cpus = settings["//command_line_option:tvos_cpus"] if tvos_cpus: return "tvos_{}".format(tvos_cpus[0]) return "tvos_x86_64" if platform_type == "watchos": if cpu: return "watchos_{}".format(cpu) watchos_cpus = settings["//command_line_option:watchos_cpus"] if watchos_cpus: return "watchos_{}".format(watchos_cpus[0]) return "watchos_i386" fail("ERROR: Unknown platform type: {}".format(platform_type)) def _min_os_version_or_none(*, minimum_os_version, platform, platform_type): if platform_type == platform: return minimum_os_version return None def _command_line_options(*, cpu = None, minimum_os_version, platform_type, settings): """Generates a dictionary of command line options suitable for the current target. Args: cpu: A valid Apple cpu command line option as a string, or None to infer a value from command line options passed through settings. minimum_os_version: A string representing the minimum OS version specified for this platform, represented as a dotted version number (for example, `"9.0"`). platform_type: The Apple platform for which the rule should build its targets (`"ios"`, `"macos"`, `"tvos"`, or `"watchos"`). settings: A dictionary whose set of keys is defined by the inputs parameter, typically from the settings argument found on the implementation function of the current Starlark transition. Returns: A dictionary of `"//command_line_option"`s defined for the current target. """ return { "//command_line_option:apple configuration distinguisher": "applebin_" + platform_type, "//command_line_option:apple_platform_type": platform_type, "//command_line_option:apple_split_cpu": cpu if cpu else "", "//command_line_option:compiler": settings["//command_line_option:apple_compiler"], "//command_line_option:cpu": _cpu_string( cpu = cpu, platform_type = platform_type, settings = settings, ), "//command_line_option:crosstool_top": ( settings["//command_line_option:apple_crosstool_top"] ), "//command_line_option:fission": [], "//command_line_option:grte_top": settings["//command_line_option:apple_grte_top"], "//command_line_option:ios_minimum_os": _min_os_version_or_none( minimum_os_version = minimum_os_version, platform = "ios", platform_type = platform_type, ), "//command_line_option:macos_minimum_os": _min_os_version_or_none( minimum_os_version = minimum_os_version, platform = "macos", platform_type = platform_type, ), "//command_line_option:tvos_minimum_os": _min_os_version_or_none( minimum_os_version = minimum_os_version, platform = "tvos", platform_type = platform_type, ), "//command_line_option:watchos_minimum_os": _min_os_version_or_none( minimum_os_version = minimum_os_version, platform = "watchos", platform_type = platform_type, ), } def _command_line_options_for_platform( *, minimum_os_version, platform_attr, platform_type, settings, target_environments): """Generates a dictionary of command line options keyed by 1:2+ transition for this platform. Args: minimum_os_version: A string representing the minimum OS version specified for this platform, represented as a dotted version number (for example, `"9.0"`). platform_attr: The attribute for the apple platform specifying in dictionary form which architectures to build for given a target environment as the key for this platform. platform_type: The Apple platform for which the rule should build its targets (`"ios"`, `"macos"`, `"tvos"`, or `"watchos"`). settings: A dictionary whose set of keys is defined by the inputs parameter, typically from the settings argument found on the implementation function of the current Starlark transition. target_environments: A list of strings representing target environments supported by the platform. Possible strings include "device" and "simulator". Returns: A dictionary of keys for each <platform>_<arch>_<target_environment> found with a corresponding dictionary of `"//command_line_option"`s as each key's value. """ output_dictionary = {} for target_environment in target_environments: if platform_attr.get(target_environment): cpus = platform_attr[target_environment] for cpu in cpus: found_cpu = { _cpu_string( cpu = cpu, platform_type = platform_type, settings = settings, ) + "_" + target_environment: _command_line_options( cpu = cpu, minimum_os_version = minimum_os_version, platform_type = platform_type, settings = settings, ), } output_dictionary = dicts.add(found_cpu, output_dictionary) return output_dictionary def _apple_rule_base_transition_impl(settings, attr): """Rule transition for Apple rules.""" return _command_line_options( minimum_os_version = attr.minimum_os_version, platform_type = attr.platform_type, settings = settings, ) # These flags are a mix of options defined in native Bazel from the following fragments: # - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java # - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java # - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java _apple_rule_common_transition_inputs = [ "//command_line_option:apple_compiler", "//command_line_option:apple_crosstool_top", "//command_line_option:apple_grte_top", ] _apple_rule_base_transition_inputs = _apple_rule_common_transition_inputs + [ "//command_line_option:cpu", "//command_line_option:ios_multi_cpus", "//command_line_option:macos_cpus", "//command_line_option:tvos_cpus", "//command_line_option:watchos_cpus", ] _apple_rule_base_transition_outputs = [ "//command_line_option:apple configuration distinguisher", "//command_line_option:apple_platform_type", "//command_line_option:apple_split_cpu", "//command_line_option:compiler", "//command_line_option:cpu", "//command_line_option:crosstool_top", "//command_line_option:fission", "//command_line_option:grte_top", "//command_line_option:ios_minimum_os", "//command_line_option:macos_minimum_os", "//command_line_option:tvos_minimum_os", "//command_line_option:watchos_minimum_os", ] _apple_rule_base_transition = transition( implementation = _apple_rule_base_transition_impl, inputs = _apple_rule_base_transition_inputs, outputs = _apple_rule_base_transition_outputs, ) def _apple_rule_arm64_as_arm64e_transition_impl(settings, attr): """Rule transition for Apple rules that map arm64 to arm64e.""" key = "//command_line_option:macos_cpus" # These additional settings are sent to both the base implementation and the final transition. additional_settings = {key: [cpu if cpu != "arm64" else "arm64e" for cpu in settings[key]]} return dicts.add( _apple_rule_base_transition_impl(dicts.add(settings, additional_settings), attr), additional_settings, ) _apple_rule_arm64_as_arm64e_transition = transition( implementation = _apple_rule_arm64_as_arm64e_transition_impl, inputs = _apple_rule_base_transition_inputs, outputs = _apple_rule_base_transition_outputs + ["//command_line_option:macos_cpus"], ) def _static_framework_transition_impl(settings, attr): """Attribute transition for static frameworks to enable swiftinterface generation.""" return { "@build_bazel_rules_swift//swift:emit_swiftinterface": True, } # This transition is used, for now, to enable swiftinterface generation on swift_library targets. # Once apple_common.split_transition is migrated to Starlark, this transition should be merged into # that one, being enabled by reading either a private attribute on the static framework rules, or # some other mechanism, so that it is only enabled on static framework rules and not all Apple # rules. _static_framework_transition = transition( implementation = _static_framework_transition_impl, inputs = [], outputs = [ "@build_bazel_rules_swift//swift:emit_swiftinterface", ], ) def _xcframework_transition_impl(settings, attr): """Starlark 1:2+ transition for generation of multiple frameworks for the current target.""" output_dictionary = {} if hasattr(attr, "macos"): command_line_options_for_platform = _command_line_options_for_platform( minimum_os_version = attr.minimum_os_versions.get("macos"), platform_attr = attr.macos, platform_type = "macos", settings = settings, target_environments = ["device"], ) output_dictionary = dicts.add(command_line_options_for_platform, output_dictionary) for platform_type in ["ios", "tvos", "watchos"]: if hasattr(attr, platform_type): command_line_options_for_platform = _command_line_options_for_platform( minimum_os_version = attr.minimum_os_versions.get(platform_type), platform_attr = getattr(attr, platform_type), platform_type = platform_type, settings = settings, target_environments = ["device", "simulator"], ) output_dictionary = dicts.add(command_line_options_for_platform, output_dictionary) return output_dictionary _xcframework_transition = transition( implementation = _xcframework_transition_impl, inputs = _apple_rule_common_transition_inputs, outputs = _apple_rule_base_transition_outputs, ) transition_support = struct( apple_rule_transition = _apple_rule_base_transition, apple_rule_arm64_as_arm64e_transition = _apple_rule_arm64_as_arm64e_transition, static_framework_transition = _static_framework_transition, xcframework_transition = _xcframework_transition, )
# -*- coding: utf-8 -*- ''' File name: code\number_mind\sol_185.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #185 :: Number Mind # # For more information see: # https://projecteuler.net/problem=185 # Problem Statement ''' The game Number Mind is a variant of the well known game Master Mind. Instead of coloured pegs, you have to guess a secret sequence of digits. After each guess you're only told in how many places you've guessed the correct digit. So, if the sequence was 1234 and you guessed 2036, you'd be told that you have one correct digit; however, you would NOT be told that you also have another digit in the wrong place. For instance, given the following guesses for a 5-digit secret sequence, 90342 ;2 correct 70794 ;0 correct 39458 ;2 correct 34109 ;1 correct 51545 ;2 correct 12531 ;1 correct The correct sequence 39542 is unique. Based on the following guesses, 5616185650518293 ;2 correct 3847439647293047 ;1 correct 5855462940810587 ;3 correct 9742855507068353 ;3 correct 4296849643607543 ;3 correct 3174248439465858 ;1 correct 4513559094146117 ;2 correct 7890971548908067 ;3 correct 8157356344118483 ;1 correct 2615250744386899 ;2 correct 8690095851526254 ;3 correct 6375711915077050 ;1 correct 6913859173121360 ;1 correct 6442889055042768 ;2 correct 2321386104303845 ;0 correct 2326509471271448 ;2 correct 5251583379644322 ;2 correct 1748270476758276 ;3 correct 4895722652190306 ;1 correct 3041631117224635 ;3 correct 1841236454324589 ;3 correct 2659862637316867 ;2 correct Find the unique 16-digit secret sequence. ''' # Solution # Solution Approach ''' '''
# Copyright 2020 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # generates fennel_rev0 revs = [0] inas = [ ('ina3221', '0x40:0', 'ppvar_sys', 7.7, 0.020, 'rem', True), # R91200 ('ina3221', '0x40:1', 'vbat', 7.7, 0.020, 'rem', True), # R90819 ('ina3221', '0x40:2', 'pp1800_h1', 1.8, 0.050, 'rem', True), # R90364 ('ina3221', '0x41:0', 'ppvar_bl', 7.7, 0.100, 'rem', True), # R391 ('ina3221', '0x41:1', 'pp1800_ec', 1.8, 0.050, 'rem', True), # R90366 ('ina3221', '0x41:2', 'pp3300_ctp', 3.3, 0.020, 'rem', True), # R90475 ('ina3221', '0x42:0', 'pp3300_h1', 3.3, 0.050, 'rem', True), # R90365 ('ina3221', '0x42:1', 'pp3300_wlan', 3.3, 0.020, 'rem', True), # R91136 ('ina3221', '0x42:2', 'pp1800_wlan', 1.8, 0.020, 'rem', True), # R91139 ('ina3221', '0x43:0', 'pp3300_lcm', 3.3, 0.020, 'rem', True), # R90518 ('ina3221', '0x43:1', 'pp5000_dram', 5.0, 0.020, 'rem', True), # R90649 ('ina3221', '0x43:2', 'pp5000_pmic', 5.0, 0.020, 'rem', True), # R90558 ('ina219', '0x44', 'pp3300_a', 3.3, 0.020, 'rem', True), # R90678 ('ina219', '0x45', 'ppvar_usb_c0_vbus', 20.0, 0.020, 'rem', True), # R90538 ('ina219', '0x46', 'pp1800_a', 1.8, 0.020, 'rem', True), # R90672 ]
tx_zips = [] with open('../data/texas-zip-codes.csv', 'r') as fin: reader = fin.readlines() i = 0 for row in reader: newrow = row.split(',') state = newrow[4].strip('"') if state == 'TX': tx_zips.append(newrow[0].strip('"')) i += 1 with open('tx-zips.txt', 'w') as fout: for zipcode in tx_zips: fout.write(zipcode + '\n')
# Hello World program in Python print("Python Dictionaries\n") print("In Python dictionaries are written with curly brackets, and they have keys and values.\n") # Create and print a dictionary: thisdict = { "name": "Alex", "roll_number": "234566", "passing_year": 1964 } print(thisdict) # You can access the items of a dictionary by referring to its key name: x = thisdict["roll_number"] print(x) # There is also a method called get() that will give you the same result: x = thisdict.get("roll_number") print(x) # You can change the value of a specific item by referring to its key name: thisdict["passing_year"] = 2018 print(thisdict) # You can loop through a dictionary by using a for loop. # Print all key names in the dictionary, one by one: for x in thisdict: print(x) # Print all values in the dictionary, one by one: for x in thisdict: print(thisdict[x]) # You can also use the values() function to return values of a dictionary: for x in thisdict.values(): print(x) # Loop through both keys and values, by using the items() function: for x, y in thisdict.items(): print(x, y) # Check if Key Exists: if "name" in thisdict: print("Yes, 'Name' is one of the keys in the thisdict dictionary") # Adding an item to the dictionary is done by using a new index key and assigning a value to it: thisdict["result"] = "70%" print(thisdict) # There are several methods to remove items from a dictionary: # 1--The pop() method removes the item with the specified key name: thisdict.pop("roll_number") print(thisdict) # in versions before 3.7, a random item is removed instead: thisdict.popitem() print(thisdict) # 2--The del keyword removes the item with the specified key name: del thisdict["name"] print(thisdict) # use the dict() constructor to make a dictionary: thisdict = dict(name="Alex", roll_number="3456667", passing_year=1964) print(thisdict)
def convert_token(token): cursor = 0 converted_token = '' while cursor < len(token): if cursor > 0 and token[cursor].isupper() and token[cursor - 1] != '_': converted_token += '_' + token[cursor].lower() elif cursor > 0 and token[cursor - 1].isupper() and converted_token[-1].islower(): converted_token += token[cursor].lower() else: converted_token += token[cursor] cursor += 1 return converted_token filename = input('Digit input file: ') input_file_content = open(filename).read() output_file = open('.'.join(filename.split('.')[:-1]) + '_.' + filename.split('.')[-1], 'w') cursor_1 = 0 cursor_2 = 0 valid = False while cursor_2 < len(input_file_content): if not valid and (input_file_content[cursor_2].isalpha() or input_file_content[cursor_2] == '_'): cursor_1 = cursor_2 valid = True elif valid and not (input_file_content[cursor_2].isalnum() or input_file_content[cursor_2] == '_'): valid = False token = input_file_content[cursor_1:cursor_2] output_file.write(convert_token(token)) output_file.write(input_file_content[cursor_2]) elif not valid and not (input_file_content[cursor_2].isalpha() or input_file_content[cursor_2] == '_'): output_file.write(input_file_content[cursor_2]) if input_file_content[cursor_2] == '\\': cursor_2 += 1 output_file.write(input_file_content[cursor_2]) cursor_2 += 1
# Aula 28 - 17-12-2019 # Revisão de listas # Faça uma função que receba a lista como parametro e retorne uma # string em que cada linha seja uma pessoa. lista = [['1', 'Arnaldo', '23', 'm', '[email protected]', '014908648117'], ['2', 'Haroldo', '44', 'f', '[email protected]', '050923172729'], ['3', 'Pilar', '50', 'm', '[email protected]', '018937341049'], ['4', 'Suzete Salvador', '45', 'f', '[email protected]', '056928409823'], ['5', 'Riane', '37', 'f', '[email protected]', '018916004377'], ['6', 'Waldir', '34', 'f', '[email protected]', '058903756441'], ['7', 'Lilian', '22', 'f', '[email protected]', '031958621596'], ['8', 'Matilde', '20', 'm', '[email protected]', '012941959390'], ['9', 'Samanta', '19', 'm', '[email protected]', '028964480437'], ['10', 'Margarida', '30', 'm', '[email protected]', '047903547580'], ['11', 'Evelyn', '31', 'm', '[email protected]', '053958638386'], ['12', 'Alessio', '29', 'm', '[email protected]', '033961294774'], ['13', 'Yolanda', '25', 'm', '[email protected]', '027903312626'], ['14', 'Germana', '33', 'f', '[email protected]', '053964603415'], ['15', 'Helio', '33', 'f', '[email protected]', '046997316461'], ['16', 'Liége', '21', 'f', '[email protected]', '056992948431'], ['17', 'Yan', '42', 'm', '[email protected]', '016963562866'], ['18', 'Silvain', '50', 'f', '[email protected]', '021963399433'], ['19', 'Brian', '33', 'f', '[email protected]', '027962676732'], ['20', 'Deoclides', '40', 'f', '[email protected]', '012961047979'], ['21', 'Jaqueline', '32', 'm', '[email protected]', '014958997782'], ['22', 'Rosamaria', '45', 'f', '[email protected]', '026944672627'], ['23', 'Carla', '42', 'm', '[email protected]', '046976625208'], ['24', 'Aida Santos', '30', 'f', '[email protected]', '034920819199'], ['25', 'Thomas', '19', 'm', '[email protected]', '030974027667'], ['26', 'Naiara', '23', 'm', '[email protected]', '018976696717'], ['27', 'Karyne', '17', 'm', '[email protected]', '054984689319'], ['28', 'Alenis Dias', '43', 'f', '[email protected]', '034980886309'], ['29', 'Grace', '38', 'm', '[email protected]', '041932906720'], ['30', 'Zacarias', '31', 'm', '[email protected]', '041926007066'], ['31', 'Marco', '29', 'f', '[email protected]', '050919604868'], ['32', 'Angélica', '43', 'f', '[email protected]', '031984219049'], ['33', 'Dionisio', '38', 'f', '[email protected]', '029971421524'], ['34', 'Cassio', '23', 'm', '[email protected]', '052974708463'], ['35', 'Selma', '17', 'f', '[email protected]', '051974848498'], ['36', 'Flávia', '21', 'm', '[email protected]', '033918718514'], ['37', 'Osni', '34', 'm', '[email protected]', '046975591151'], ['38', 'Timoteo', '30', 'f', '[email protected]', '040927395638'], ['39', 'Cristiane', '38', 'm', '[email protected]', '054918308625'], ['40', 'Else', '45', 'm', '[email protected]', '042908347369'], ['41', 'Cecília', '46', 'm', '[email protected]', '025963481920'], ['42', 'Giulliane', '25', 'm', '[email protected]', '027905662731'], ['43', 'Feliciano', '44', 'm', '[email protected]', '055985937562'], ['44', 'Cassiane', '41', 'm', '[email protected]', '025998359783'], ['45', 'Aléssia', '21', 'f', '[email protected]', '033950734254'], ['46', 'Josie', '32', 'm', '[email protected]', '033972950508'], ['47', 'Thayná', '42', 'm', '[email protected]', '028984798536'], ['48', 'Paola', '50', 'm', '[email protected]', '024966119466'], ['49', 'Silvio', '45', 'm', '[email protected]', '033986392040'], ['50', 'Vanusa', '23', 'm', '[email protected]', '015938655596']] # 1) Crie uma função que receba como parametro a lista e retorne 1 lista em que a lista[0] possua todas as listas # de mulheres e a lista[1] possua todas as listas de homens. # 2) Após receber a lista da função, imprima na tela a quantidade de mulheres e de homens que tem nesta lista. def lista_generos(lista): lista_masc = [] lista_femi = [] lista_genero = [] for i in lista: if i[3] == 'm': lista_masc.append(i) else: lista_femi.append(i) lista_genero.append(lista_masc) lista_genero.append(lista_femi) return lista_genero generos = lista_generos(lista) print(f'Lista do genero Masculino: ') for i in generos[0]: print(f'- {i}') print(f'Lista do genero Feminino: ') for i in generos[1]: print(f'- {i}')
__author__ = 'fengyuyao' class Template(object): def __init__(self, source): pass def render(self, **kwargs): pass
# # PySNMP MIB module CNTAU-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CNTAU-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:09:32 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") iso, Counter64, MibIdentifier, ModuleIdentity, Counter32, Unsigned32, Integer32, Gauge32, NotificationType, enterprises, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, NotificationType, IpAddress, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Counter64", "MibIdentifier", "ModuleIdentity", "Counter32", "Unsigned32", "Integer32", "Gauge32", "NotificationType", "enterprises", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "NotificationType", "IpAddress", "Bits") DisplayString, PhysAddress, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "PhysAddress", "TextualConvention") cnt = MibIdentifier((1, 3, 6, 1, 4, 1, 333)) cntau = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1)) cntsystem = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 1)) cntSysNodeAddress = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSysNodeAddress.setStatus('mandatory') cntSysTimeofDay = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSysTimeofDay.setStatus('mandatory') cntSysMsgTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 3), ) if mibBuilder.loadTexts: cntSysMsgTable.setStatus('mandatory') cntMsgEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1), ).setIndexNames((0, "CNTAU-MIB", "cntMsgIndex")) if mibBuilder.loadTexts: cntMsgEntry.setStatus('mandatory') cntMsgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgIndex.setStatus('mandatory') cntMsgSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("information-msg", 1), ("possible-error", 2), ("recoverable-error", 3), ("fatal-error", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgSeverity.setStatus('mandatory') cntMsgTaskName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgTaskName.setStatus('mandatory') cntMsgNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgNumber.setStatus('mandatory') cntMsgCpuNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgCpuNumber.setStatus('mandatory') cntMsgNodeNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgNodeNumber.setStatus('mandatory') cntMsgDateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgDateTime.setStatus('mandatory') cntMsgContent = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgContent.setStatus('mandatory') cntMsgSeqNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 3, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMsgSeqNumber.setStatus('mandatory') cntSysHardware = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 1, 4)) cntHwBBramType = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("bbram-6500", 1), ("bbram-6704", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwBBramType.setStatus('mandatory') cntHwBBramStatus = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("good", 1), ("failing", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwBBramStatus.setStatus('mandatory') cntHwFailedCpu = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("no-failure", 1), ("lcp-1", 2), ("lcp-2", 3), ("lcp-3", 4), ("lcp-4", 5), ("lcp-5", 6), ("lcp-6", 7), ("lcp-7", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwFailedCpu.setStatus('mandatory') cntHwMonCpu = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("no-failure", 1), ("lcp-1", 2), ("lcp-2", 3), ("lcp-3", 4), ("lcp-4", 5), ("lcp-5", 6), ("lcp-6", 7), ("lcp-7", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwMonCpu.setStatus('mandatory') cntHwFailStatus = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("not-up", 1), ("ok", 2), ("abort-switch", 3), ("abort-remote", 4), ("parity-error", 5), ("ac-failure", 6), ("system-failure", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwFailStatus.setStatus('mandatory') cntHwMonFailStatus = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("not-up", 1), ("ok", 2), ("failed", 3), ("mdm-error", 4), ("poll-error", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwMonFailStatus.setStatus('mandatory') cntHwFailDate = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwFailDate.setStatus('mandatory') cntHwReset1Why = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwReset1Why.setStatus('mandatory') cntHwReset1Date = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwReset1Date.setStatus('mandatory') cntHwReset2Why = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwReset2Why.setStatus('mandatory') cntHwReset2Date = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwReset2Date.setStatus('mandatory') cntHwReset3Why = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwReset3Why.setStatus('mandatory') cntHwReset3Date = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 13), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwReset3Date.setStatus('mandatory') cntHwPowerSupply = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("good", 1), ("bad", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwPowerSupply.setStatus('mandatory') cntHwCpuTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15), ) if mibBuilder.loadTexts: cntHwCpuTable.setStatus('mandatory') cntHwCpuEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1), ).setIndexNames((0, "CNTAU-MIB", "cntCpuNum")) if mibBuilder.loadTexts: cntHwCpuEntry.setStatus('mandatory') cntCpuNum = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuNum.setStatus('mandatory') cntCpuType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("no-cpu", 1), ("lcp-type1", 2), ("lcp-type2", 3), ("lcp-type3", 4), ("lcp-type4", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuType.setStatus('mandatory') cntCpuSemCount = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuSemCount.setStatus('mandatory') cntCpuSemLost = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuSemLost.setStatus('mandatory') cntCpuStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("not-up", 1), ("ok", 2), ("abort-switch", 3), ("abort-remote", 4), ("parity-error", 5), ("ac-failure", 6), ("system-failure", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuStatus.setStatus('mandatory') cntCpuMonStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("not-up", 1), ("ok", 2), ("failed", 3), ("mdm-error", 4), ("poll-error", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuMonStatus.setStatus('mandatory') cntCpuPollStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("none", 1), ("normal", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuPollStatus.setStatus('mandatory') cntCpuPolls = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuPolls.setStatus('mandatory') cntCpuResetDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuResetDelayTime.setStatus('mandatory') cntCpuMonBy = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuMonBy.setStatus('mandatory') cntCpuPort = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuPort.setStatus('mandatory') cntCpuUnclaims = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuUnclaims.setStatus('mandatory') cntCpuXtraInts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuXtraInts.setStatus('mandatory') cntCpuLevel7s = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuLevel7s.setStatus('mandatory') cntCpuMsgRets = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuMsgRets.setStatus('mandatory') cntCpuMsgHolds = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuMsgHolds.setStatus('mandatory') cntCpuResetFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("on", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuResetFlag.setStatus('mandatory') cntCpuUtil = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuUtil.setStatus('mandatory') cntCpuLastFailDate = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 19), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuLastFailDate.setStatus('mandatory') cntCpuLastChgDate = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 15, 1, 20), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuLastChgDate.setStatus('mandatory') cntHwStatusLED = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 4, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntHwStatusLED.setStatus('mandatory') cntSysBuild = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 1, 5)) cntRevDate = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRevDate.setStatus('mandatory') cntCustomer = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCustomer.setStatus('mandatory') cntMachineType = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMachineType.setStatus('mandatory') cntSerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSerialNumber.setStatus('mandatory') cntWorkOrderNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntWorkOrderNumber.setStatus('mandatory') cntChassisNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntChassisNumber.setStatus('mandatory') cntModelNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntModelNumber.setStatus('mandatory') cntReleaseLevel = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntReleaseLevel.setStatus('mandatory') cntRevEditDate = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 9), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRevEditDate.setStatus('mandatory') cntRevEditTime = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 10), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRevEditTime.setStatus('mandatory') cntFeatureTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 11), ) if mibBuilder.loadTexts: cntFeatureTable.setStatus('mandatory') cntFeatureEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 11, 1), ).setIndexNames((0, "CNTAU-MIB", "cntFeatureIndex")) if mibBuilder.loadTexts: cntFeatureEntry.setStatus('mandatory') cntFeatureIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 11, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFeatureIndex.setStatus('mandatory') cntFeatureName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 11, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFeatureName.setStatus('mandatory') cntFeatureQuantity = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 11, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFeatureQuantity.setStatus('mandatory') cntFeatureDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 11, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFeatureDescr.setStatus('mandatory') cntSlotTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12), ) if mibBuilder.loadTexts: cntSlotTable.setStatus('mandatory') cntSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1), ).setIndexNames((0, "CNTAU-MIB", "cntSlotIndex")) if mibBuilder.loadTexts: cntSlotEntry.setStatus('mandatory') cntSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotIndex.setStatus('mandatory') cntSlotName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotName.setStatus('mandatory') cntSlotPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotPartNumber.setStatus('mandatory') cntSlotSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotSerialNumber.setStatus('mandatory') cntSlotRevLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotRevLevel.setStatus('mandatory') cntSlotInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotInterface.setStatus('mandatory') cntSlotCpuNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotCpuNumber.setStatus('mandatory') cntSlotVMEbusGrant = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 12, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSlotVMEbusGrant.setStatus('mandatory') cntIOTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13), ) if mibBuilder.loadTexts: cntIOTable.setStatus('mandatory') cntIOEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1), ).setIndexNames((0, "CNTAU-MIB", "cntIOIndex")) if mibBuilder.loadTexts: cntIOEntry.setStatus('mandatory') cntIOIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIOIndex.setStatus('mandatory') cntIOName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIOName.setStatus('mandatory') cntIOPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIOPartNumber.setStatus('mandatory') cntIOSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIOSerialNumber.setStatus('mandatory') cntIORevLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIORevLevel.setStatus('mandatory') cntIOInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIOInterface.setStatus('mandatory') cntIOCpuNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 13, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIOCpuNumber.setStatus('mandatory') cntPowerTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14), ) if mibBuilder.loadTexts: cntPowerTable.setStatus('mandatory') cntPowerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14, 1), ).setIndexNames((0, "CNTAU-MIB", "cntPowerIndex")) if mibBuilder.loadTexts: cntPowerEntry.setStatus('mandatory') cntPowerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntPowerIndex.setStatus('mandatory') cntPowerName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntPowerName.setStatus('mandatory') cntPowerPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntPowerPartNumber.setStatus('mandatory') cntPowerSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntPowerSerialNumber.setStatus('mandatory') cntPowerRevLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 14, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntPowerRevLevel.setStatus('mandatory') cntSCRTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 15), ) if mibBuilder.loadTexts: cntSCRTable.setStatus('mandatory') cntSCREntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 15, 1), ).setIndexNames((0, "CNTAU-MIB", "cntSCRIndex")) if mibBuilder.loadTexts: cntSCREntry.setStatus('mandatory') cntSCRIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 15, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSCRIndex.setStatus('mandatory') cntSCRNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 15, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSCRNumber.setStatus('mandatory') cntSerialAlfaNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 5, 16), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSerialAlfaNumber.setStatus('mandatory') cntSysMemory = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 1, 6)) cntMemBBramAddress = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 6, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMemBBramAddress.setStatus('mandatory') cntMemBBramSpace = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 6, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMemBBramSpace.setStatus('mandatory') cntMemBBramFree = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 6, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMemBBramFree.setStatus('mandatory') cntMemSramAddress = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 6, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMemSramAddress.setStatus('mandatory') cntMemSramSpace = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 6, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMemSramSpace.setStatus('mandatory') cntMemSramFree = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 1, 6, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMemSramFree.setStatus('mandatory') cntSysCpuTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 7), ) if mibBuilder.loadTexts: cntSysCpuTable.setStatus('mandatory') cntSysCpuEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1), ).setIndexNames((0, "CNTAU-MIB", "cntCpuIndex")) if mibBuilder.loadTexts: cntSysCpuEntry.setStatus('mandatory') cntCpuIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuIndex.setStatus('mandatory') cntCpuMemSpace = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuMemSpace.setStatus('mandatory') cntCpuMemFree = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuMemFree.setStatus('mandatory') cntCpuTaskTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 4), ) if mibBuilder.loadTexts: cntCpuTaskTable.setStatus('mandatory') cntCpuTaskEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 4, 1), ).setIndexNames((0, "CNTAU-MIB", "cntCpuTaskIndex")) if mibBuilder.loadTexts: cntCpuTaskEntry.setStatus('mandatory') cntCpuTaskIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuTaskIndex.setStatus('mandatory') cntCpuTaskName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 1, 7, 1, 4, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCpuTaskName.setStatus('mandatory') cntinterfaces = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 2)) cntifTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 2, 1), ) if mibBuilder.loadTexts: cntifTable.setStatus('mandatory') cntifEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 2, 1, 1), ).setIndexNames((0, "CNTAU-MIB", "cntifIndex")) if mibBuilder.loadTexts: cntifEntry.setStatus('mandatory') cntifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntifIndex.setStatus('mandatory') cntifType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(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, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63))).clone(namedValues=NamedValues(("other", 1), ("regular1822", 2), ("hdh1822", 3), ("ddn-x25", 4), ("rfc877-x25", 5), ("ethernet", 6), ("ethernet88023", 7), ("tokenBus", 8), ("tokenRing", 9), ("smds", 10), ("starLan", 11), ("proteon-10MBit", 12), ("proteon-80MBit", 13), ("hyperchannel", 14), ("fddi", 15), ("lapb", 16), ("sdlc", 17), ("t1", 18), ("cept", 19), ("basicIsdn", 20), ("primaryIsdn", 21), ("maintenance", 22), ("ppp", 23), ("sofwareLoopback", 24), ("eon", 25), ("ethernet-3Mbit", 26), ("nsip", 27), ("slip", 28), ("ultra", 29), ("ds3", 30), ("sip", 31), ("frame-relay", 32), ("hssi-dte", 33), ("fibre-trunk", 34), ("hippi", 35), ("crayfullduplex", 36), ("pt-to-pt-fiber", 37), ("channel-to-channel", 38), ("peripheral-gateway", 39), ("tape-pipelining", 40), ("tape-dasd", 41), ("hssi-dce", 42), ("ibm-channel", 43), ("dual-trunk", 44), ("teradata", 45), ("cray-hyperchannel", 46), ("scsi-target", 47), ("snmp-gateway", 48), ("ppp-async", 49), ("escon-host", 50), ("escon-peripheral", 51), ("tapecontrol-rs232", 52), ("ultra-dte", 53), ("ultra-dce", 54), ("fddi-ss", 55), ("hssi-ss", 56), ("tunneling", 57), ("stackstarter", 58), ("ethernet-geni", 59), ("tokenring-geni", 60), ("atm", 61), ("scsi-initiator", 62), ("escon-srdf", 63)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntifType.setStatus('mandatory') cntifCpu = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntifCpu.setStatus('mandatory') cntifSubIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 2, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntifSubIndex.setStatus('mandatory') cntIfsState = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 2, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIfsState.setStatus('mandatory') cnticmp = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 5)) cnticmpInDuNets = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInDuNets.setStatus('mandatory') cnticmpInDuHosts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInDuHosts.setStatus('mandatory') cnticmpInDuProtos = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInDuProtos.setStatus('mandatory') cnticmpInDuPorts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInDuPorts.setStatus('mandatory') cnticmpInDuFrags = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInDuFrags.setStatus('mandatory') cnticmpInDuSources = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInDuSources.setStatus('mandatory') cnticmpInTmXceeds = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInTmXceeds.setStatus('mandatory') cnticmpInTmFrags = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInTmFrags.setStatus('mandatory') cnticmpInReNets = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInReNets.setStatus('mandatory') cnticmpInReHosts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInReHosts.setStatus('mandatory') cnticmpInReServnets = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInReServnets.setStatus('mandatory') cnticmpInReServhosts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpInReServhosts.setStatus('mandatory') cnticmpOutDuNets = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutDuNets.setStatus('mandatory') cnticmpOutDuHosts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutDuHosts.setStatus('mandatory') cnticmpOutDuProtos = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutDuProtos.setStatus('mandatory') cnticmpOutDuPorts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutDuPorts.setStatus('mandatory') cnticmpOutDuFrags = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutDuFrags.setStatus('mandatory') cnticmpOutDuSources = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutDuSources.setStatus('mandatory') cnticmpOutTmXceeds = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutTmXceeds.setStatus('mandatory') cnticmpOutTmFrags = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutTmFrags.setStatus('mandatory') cnticmpOutReNets = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutReNets.setStatus('mandatory') cnticmpOutReHosts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutReHosts.setStatus('mandatory') cnticmpOutReServnets = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutReServnets.setStatus('mandatory') cnticmpOutReServhosts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 5, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnticmpOutReServhosts.setStatus('mandatory') cnttransmission = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10)) cntdot3 = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10, 1)) cntdot3Table = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1), ) if mibBuilder.loadTexts: cntdot3Table.setStatus('mandatory') cntdot3Entry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1), ).setIndexNames((0, "CNTAU-MIB", "cntdot3Index")) if mibBuilder.loadTexts: cntdot3Entry.setStatus('mandatory') cntdot3Index = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3Index.setStatus('mandatory') cntdot3SoftwareID = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3SoftwareID.setStatus('mandatory') cntdot3BufsAllocated = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3BufsAllocated.setStatus('mandatory') cntdot3BufTooManys = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3BufTooManys.setStatus('mandatory') cntdot3BufNotAvails = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3BufNotAvails.setStatus('mandatory') cntdot3BufPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3BufPriority.setStatus('mandatory') cntdot3PICBusErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3PICBusErrs.setStatus('mandatory') cntdot3PICDMAErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3PICDMAErrs.setStatus('mandatory') cntdot3PICMemSeqErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3PICMemSeqErrs.setStatus('mandatory') cntdot3PICMemParityErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3PICMemParityErrs.setStatus('mandatory') cntdot3PICSpuriousInts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3PICSpuriousInts.setStatus('mandatory') cntdot3LanceInts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceInts.setStatus('mandatory') cntdot3LanceParityErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceParityErrs.setStatus('mandatory') cntdot3LanceMemErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceMemErrs.setStatus('mandatory') cntdot3LanceMissedPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceMissedPkts.setStatus('mandatory') cntdot3LanceUnderFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceUnderFlows.setStatus('mandatory') cntdot3LanceOverFlows = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceOverFlows.setStatus('mandatory') cntdot3LanceTxWaitQ = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LanceTxWaitQ.setStatus('mandatory') cntdot3DMAChan1RxErr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 5, 6, 7, 9, 10, 11, 13, 15, 16, 17))).clone(namedValues=NamedValues(("no-error", 0), ("config", 1), ("operation-timing", 2), ("address-mar", 5), ("address-dar", 6), ("address-bar", 7), ("buserr-mar", 9), ("buserr-dar", 10), ("buserr-bar", 11), ("count-mtc", 13), ("count-btc", 15), ("external-abort", 16), ("external-software-abort", 17)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan1RxErr.setStatus('mandatory') cntdot3DMAChan3RxErr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 6, 7, 8, 10, 11, 12, 14, 16, 17, 18))).clone(namedValues=NamedValues(("no-error", 1), ("config", 2), ("operation-timing", 3), ("address-mar", 6), ("address-dar", 7), ("address-bar", 8), ("buserr-mar", 10), ("buserr-dar", 11), ("buserr-bar", 12), ("count-mtc", 14), ("count-btc", 16), ("external-abort", 17), ("external-software-abort", 18)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan3RxErr.setStatus('mandatory') cntdot3DMAChan0TxErr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 6, 7, 8, 10, 11, 12, 14, 16, 17, 18))).clone(namedValues=NamedValues(("no-error", 1), ("config", 2), ("operation-timing", 3), ("address-mar", 6), ("address-dar", 7), ("address-bar", 8), ("buserr-mar", 10), ("buserr-dar", 11), ("buserr-bar", 12), ("count-mtc", 14), ("count-btc", 16), ("external-abort", 17), ("external-software-abort", 18)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan0TxErr.setStatus('mandatory') cntdot3DMAChan2TxErr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 6, 7, 8, 10, 11, 12, 14, 16, 17, 18))).clone(namedValues=NamedValues(("no-error", 1), ("config", 2), ("operation-timing", 3), ("address-mar", 6), ("address-dar", 7), ("address-bar", 8), ("buserr-mar", 10), ("buserr-dar", 11), ("buserr-bar", 12), ("count-mtc", 14), ("count-btc", 16), ("external-abort", 17), ("external-software-abort", 18)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan2TxErr.setStatus('mandatory') cntdot3DMAChan1RxErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan1RxErrs.setStatus('mandatory') cntdot3DMAChan3RxErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan3RxErrs.setStatus('mandatory') cntdot3DMAChan0TxErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan0TxErrs.setStatus('mandatory') cntdot3DMAChan2TxErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMAChan2TxErrs.setStatus('mandatory') cntdot3DMARxWaitQ = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 27), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMARxWaitQ.setStatus('mandatory') cntdot3DMATxWaitQ = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 28), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3DMATxWaitQ.setStatus('mandatory') cntdot3LPXParityErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3LPXParityErrs.setStatus('mandatory') cntdot3Chan1Misreads = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 1, 1, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdot3Chan1Misreads.setStatus('mandatory') cntfddi = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10, 2)) cntFddiSMT = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1)) cntFddiMAC = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2)) cntFddiPATH = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3)) cntFddiPORT = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4)) cntFddiSMTNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTNumber.setStatus('mandatory') cntFddiSMTTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2), ) if mibBuilder.loadTexts: cntFddiSMTTable.setStatus('mandatory') cntFddiSMTEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntFddiSMTIndex")) if mibBuilder.loadTexts: cntFddiSMTEntry.setStatus('mandatory') cntFddiSMTIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTIndex.setStatus('mandatory') cntFddiSMTManufacturerData = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 2), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTManufacturerData.setStatus('optional') cntFddiSMTUserData = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 3), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTUserData.setStatus('optional') cntFddiSMTReportLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTReportLimit.setStatus('optional') cntFddiSMTMsgTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 5), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTMsgTimeStamp.setStatus('mandatory') cntFddiSMTTransitionTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 6), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTTransitionTimeStamp.setStatus('mandatory') cntFddiSMTSetCount = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 7), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTSetCount.setStatus('optional') cntFddiSMTLastSetStationID = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 1, 2, 1, 8), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiSMTLastSetStationID.setStatus('optional') cntFddiMACNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACNumber.setStatus('mandatory') cntFddiMACTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2), ) if mibBuilder.loadTexts: cntFddiMACTable.setStatus('mandatory') cntFddiMACEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntFddiMACSMTIndex")) if mibBuilder.loadTexts: cntFddiMACEntry.setStatus('mandatory') cntFddiMACSMTIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACSMTIndex.setStatus('mandatory') cntFddiMACIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACIndex.setStatus('mandatory') cntFddiMACBridgeFunction = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBridgeFunction.setStatus('optional') cntFddiMACDownstreamNbr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 4), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACDownstreamNbr.setStatus('optional') cntFddiMACOldDownstreamNbr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 5), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACOldDownstreamNbr.setStatus('optional') cntFddiMACRootConcentratorMac = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACRootConcentratorMac.setStatus('optional') cntFddiMACLongAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACLongAlias.setStatus('optional') cntFddiMACShortAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACShortAlias.setStatus('optional') cntFddiMACLongGrpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACLongGrpAddr.setStatus('optional') cntFddiMACShortGrpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACShortGrpAddr.setStatus('optional') cntFddiMACTPri0 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri0.setStatus('optional') cntFddiMACTPri1 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri1.setStatus('optional') cntFddiMACTPri2 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri2.setStatus('optional') cntFddiMACTPri3 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri3.setStatus('optional') cntFddiMACTPri4 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri4.setStatus('optional') cntFddiMACTPri5 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri5.setStatus('optional') cntFddiMACTPri6 = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTPri6.setStatus('optional') cntFddiMACCopies = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACCopies.setStatus('optional') cntFddiMACTransmits = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTransmits.setStatus('optional') cntFddiMACTokens = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTokens.setStatus('optional') cntFddiMACTvxExpires = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACTvxExpires.setStatus('optional') cntFddiMACNotCopies = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACNotCopies.setStatus('optional') cntFddiMACLates = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACLates.setStatus('optional') cntFddiMACRingOps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACRingOps.setStatus('optional') cntFddiMACBaseFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseFrames.setStatus('optional') cntFddiMACBaseErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseErrs.setStatus('optional') cntFddiMACBaseLosts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseLosts.setStatus('optional') cntFddiMACBaseTimeFrameError = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 28), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseTimeFrameError.setStatus('optional') cntFddiMACBaseNotCopies = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseNotCopies.setStatus('optional') cntFddiMACBaseTimeNotCopied = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 30), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseTimeNotCopied.setStatus('optional') cntFddiMACNotCopiedThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 31), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACNotCopiedThreshold.setStatus('optional') cntFddiMACBaseCopies = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACBaseCopies.setStatus('optional') cntFddiMACNotCopiedRatio = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 33), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACNotCopiedRatio.setStatus('optional') cntFddiMACNotCopiedCondition = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 34), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACNotCopiedCondition.setStatus('optional') cntFddiMACLLCServiceAvailable = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 35), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACLLCServiceAvailable.setStatus('optional') cntFddiMACMasterSlaveLoopStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 36), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACMasterSlaveLoopStatus.setStatus('optional') cntFddiMACRootMACDownStreamPORTType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 37), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACRootMACDownStreamPORTType.setStatus('optional') cntFddiMACRootMACCurrentPath = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 2, 2, 1, 38), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiMACRootMACCurrentPath.setStatus('optional') cntFddiPATHNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHNumber.setStatus('mandatory') cntFddiPATHTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2), ) if mibBuilder.loadTexts: cntFddiPATHTable.setStatus('mandatory') cntFddiPATHEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntFddiPATHSMTIndex")) if mibBuilder.loadTexts: cntFddiPATHEntry.setStatus('mandatory') cntFddiPATHSMTIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHSMTIndex.setStatus('mandatory') cntFddiPATHIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHIndex.setStatus('mandatory') cntFddiPATHTraceMaxExpiration = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHTraceMaxExpiration.setStatus('mandatory') cntFddiPATHTVXLowerBound = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHTVXLowerBound.setStatus('optional') cntFddiPATHTMaxLowerBound = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHTMaxLowerBound.setStatus('optional') cntFddiPATHType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHType.setStatus('mandatory') cntFddiPATHPORTOrder = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHPORTOrder.setStatus('mandatory') cntFddiPATHRingLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHRingLatency.setStatus('optional') cntFddiPATHTraceStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHTraceStatus.setStatus('optional') cntFddiPATHSba = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHSba.setStatus('mandatory') cntFddiPATHSbaOverhead = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHSbaOverhead.setStatus('mandatory') cntFddiPATHStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHStatus.setStatus('mandatory') cntFddiPATHTRmode = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 3, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPATHTRmode.setStatus('optional') cntFddiPORTNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTNumber.setStatus('mandatory') cntFddiPORTTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2), ) if mibBuilder.loadTexts: cntFddiPORTTable.setStatus('mandatory') cntFddiPORTEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntFddiPORTSMTIndex")) if mibBuilder.loadTexts: cntFddiPORTEntry.setStatus('mandatory') cntFddiPORTSMTIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTSMTIndex.setStatus('mandatory') cntFddiPORTIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTIndex.setStatus('mandatory') cntFddiPORTFotxClass = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTFotxClass.setStatus('optional') cntFddiPORTMaintLineState = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTMaintLineState.setStatus('optional') cntFddiPORTEBErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTEBErrs.setStatus('optional') cntFddiPORTBaseLerEstimate = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTBaseLerEstimate.setStatus('mandatory') cntFddiPORTBaseLemRejects = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTBaseLemRejects.setStatus('mandatory') cntFddiPORTBaseLems = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTBaseLems.setStatus('mandatory') cntFddiPORTBaseLerTimeStamp = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 10, 2, 4, 2, 1, 9), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPORTBaseLerTimeStamp.setStatus('mandatory') cntsnmp = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 11)) cntsnmpconfig = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 11, 1)) cntMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMibVersion.setStatus('mandatory') cntMibObjectCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMibObjectCount.setStatus('mandatory') cntConfigVersion = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntConfigVersion.setStatus('mandatory') cntProxyStatus = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("no-proxy", 1), ("proxy-agent", 2), ("proxied-node", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntProxyStatus.setStatus('mandatory') cntProxyCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntProxyCount.setStatus('mandatory') cntSnmpBufferCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSnmpBufferCount.setStatus('mandatory') cntIfPollInterval = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIfPollInterval.setStatus('mandatory') cntIfNextPoll = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntIfNextPoll.setStatus('mandatory') cntDoDIPCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntDoDIPCount.setStatus('mandatory') cntDot3Count = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntDot3Count.setStatus('mandatory') cntFddiCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiCount.setStatus('mandatory') cntFddiPortCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiPortCount.setStatus('mandatory') cntDataLinkCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntDataLinkCount.setStatus('mandatory') cntLLC1Count = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntLLC1Count.setStatus('mandatory') cntCofiVersion = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 1, 15), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCofiVersion.setStatus('mandatory') cntsnmpstat = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 11, 2)) cntMib2Requests = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMib2Requests.setStatus('mandatory') cntFddiRequests = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntFddiRequests.setStatus('mandatory') cntDot3Requests = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntDot3Requests.setStatus('mandatory') cntCntRequests = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCntRequests.setStatus('mandatory') cntRowAdditions = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRowAdditions.setStatus('mandatory') cntRowModifies = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRowModifies.setStatus('mandatory') cntRowDeletions = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRowDeletions.setStatus('mandatory') cntRowErrors = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntRowErrors.setStatus('mandatory') cntBadVersions = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntBadVersions.setStatus('mandatory') cntNoBuffers = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntNoBuffers.setStatus('mandatory') cntMailTimeouts = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntMailTimeouts.setStatus('mandatory') cntCachedResponses = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntCachedResponses.setStatus('mandatory') cntUsedCaches = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 2, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntUsedCaches.setStatus('mandatory') cntsnmptrap = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 11, 3)) cntTrapDestCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntTrapDestCount.setStatus('mandatory') cntLastTrapMsg = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntLastTrapMsg.setStatus('mandatory') cntTrapTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3), ) if mibBuilder.loadTexts: cntTrapTable.setStatus('mandatory') cnttrapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3, 1), ).setIndexNames((0, "CNTAU-MIB", "cnttrapIndex")) if mibBuilder.loadTexts: cnttrapEntry.setStatus('mandatory') cnttrapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttrapIndex.setStatus('mandatory') cnttrapAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttrapAddress.setStatus('mandatory') cntsnmpTrapFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsnmpTrapFlags.setStatus('mandatory') cntTrapFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntTrapFlags.setStatus('mandatory') cnttrapIf = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 3, 3, 1, 5), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttrapIf.setStatus('mandatory') cntsnmpproxy = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 11, 4)) cntProxyTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 11, 4, 1), ) if mibBuilder.loadTexts: cntProxyTable.setStatus('mandatory') cntproxyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 11, 4, 1, 1), ).setIndexNames((0, "CNTAU-MIB", "cntproxyIndex")) if mibBuilder.loadTexts: cntproxyEntry.setStatus('mandatory') cntproxyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntproxyIndex.setStatus('mandatory') cntproxyAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 4, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntproxyAddress.setStatus('mandatory') cntproxyNode = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 11, 4, 1, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntproxyNode.setStatus('mandatory') cntdiagnostics = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 12)) cntTraceTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 12, 1), ) if mibBuilder.loadTexts: cntTraceTable.setStatus('mandatory') cnttraceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 12, 1, 1), ).setIndexNames((0, "CNTAU-MIB", "cnttraceIndex")) if mibBuilder.loadTexts: cnttraceEntry.setStatus('mandatory') cnttraceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttraceIndex.setStatus('mandatory') cnttraceType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttraceType.setStatus('mandatory') cnttraceCpu = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttraceCpu.setStatus('mandatory') cnttraceData = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 1, 1, 4), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cnttraceData.setStatus('mandatory') cntMailQueue = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 12, 2)) cntMDMTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 1), ) if mibBuilder.loadTexts: cntMDMTable.setStatus('mandatory') cntMDMEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 1, 1), ).setIndexNames((0, "CNTAU-MIB", "cntmdmQIndex")) if mibBuilder.loadTexts: cntMDMEntry.setStatus('mandatory') cntmdmQIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntmdmQIndex.setStatus('mandatory') cntmdmQName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntmdmQName.setStatus('mandatory') cntmdmQProcessId = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntmdmQProcessId.setStatus('mandatory') cntmdmQTaskId = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntmdmQTaskId.setStatus('mandatory') cntmdmQList = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 12, 2, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntmdmQList.setStatus('mandatory') cntdatalink = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 13)) cntdlNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 13, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlNumber.setStatus('mandatory') cntdlTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 13, 2), ) if mibBuilder.loadTexts: cntdlTable.setStatus('mandatory') cntdlEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntdlIndex")) if mibBuilder.loadTexts: cntdlEntry.setStatus('mandatory') cntdlIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlIndex.setStatus('mandatory') cntdlDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlDescr.setStatus('mandatory') cntdlType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("llc1", 1), ("llc2", 2), ("llc3", 3), ("snap", 4), ("cnet", 5), ("dnls", 6), ("strp", 7), ("ppp", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlType.setStatus('mandatory') cntdlTypeofService = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unacked-connectionless", 1), ("connection-oriented", 2), ("acked-connectionless", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlTypeofService.setStatus('mandatory') cntdlMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlMtu.setStatus('mandatory') cntdlPortAddrLen = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlPortAddrLen.setStatus('mandatory') cntdlMaxPort = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlMaxPort.setStatus('mandatory') cntdlActivePort = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlActivePort.setStatus('mandatory') cntdlInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlInOctets.setStatus('mandatory') cntdlInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlInUcastPkts.setStatus('mandatory') cntdlInNUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlInNUcastPkts.setStatus('mandatory') cntdlInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlInDiscards.setStatus('mandatory') cntdlInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlInErrors.setStatus('mandatory') cntdlInUnknownProtos = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlInUnknownProtos.setStatus('mandatory') cntdlOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlOutOctets.setStatus('mandatory') cntdlOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlOutUcastPkts.setStatus('mandatory') cntdlOutNUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlOutNUcastPkts.setStatus('mandatory') cntdlOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlOutDiscards.setStatus('mandatory') cntdlOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlOutErrors.setStatus('mandatory') cntdlOutQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 20), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlOutQLen.setStatus('mandatory') cntdlPortTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21), ) if mibBuilder.loadTexts: cntdlPortTable.setStatus('mandatory') cntdlPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21, 1), ).setIndexNames((0, "CNTAU-MIB", "cntdlPortIndex")) if mibBuilder.loadTexts: cntdlPortEntry.setStatus('mandatory') cntdlPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlPortIndex.setStatus('mandatory') cntdlState = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("connected", 1), ("data-transfer", 2), ("disconnected", 3), ("waiting-for-ack", 4), ("down", 5), ("closed", 6), ("listen", 7), ("ack-sent", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlState.setStatus('mandatory') cntdlSourcePort = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlSourcePort.setStatus('mandatory') cntdlDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlDestPort.setStatus('mandatory') cntdlPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 2, 1, 21, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("dod-ip", 1), ("arp", 2), ("snmp", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntdlPortType.setStatus('mandatory') cntllc1 = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 13, 3)) cntllc1ConfigTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1), ) if mibBuilder.loadTexts: cntllc1ConfigTable.setStatus('mandatory') cntllc1ConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1), ).setIndexNames((0, "CNTAU-MIB", "cntllc1ConfigIndex")) if mibBuilder.loadTexts: cntllc1ConfigEntry.setStatus('mandatory') cntllc1ConfigIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1ConfigIndex.setStatus('mandatory') cntllc1DriverType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("cnt-node", 1), ("fddi", 2), ("fibre-trunk", 3), ("native", 4), ("ethernet", 5), ("hippi", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1DriverType.setStatus('mandatory') cntllc1Addr = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 3), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1Addr.setStatus('mandatory') cntllc1InitFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("uninitialized", 1), ("initialized", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InitFlag.setStatus('mandatory') cntllc1TraceFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1TraceFlag.setStatus('mandatory') cntllc1BufCnt = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1BufCnt.setStatus('mandatory') cntllc1BusId = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1BusId.setStatus('mandatory') cntllc1CpuNum = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("lcp-1", 1), ("lcp-2", 2), ("lcp-3", 3), ("lcp-4", 4), ("lcp-5", 5), ("lcp-6", 6), ("lcp-7", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1CpuNum.setStatus('mandatory') cntllc1BufPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1BufPriority.setStatus('mandatory') cntllc1WaitTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 1, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1WaitTimeOut.setStatus('mandatory') cntllc1StatsTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2), ) if mibBuilder.loadTexts: cntllc1StatsTable.setStatus('mandatory') cntllc1StatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntllc1StatIndex")) if mibBuilder.loadTexts: cntllc1StatsEntry.setStatus('mandatory') cntllc1StatIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1StatIndex.setStatus('mandatory') cntllc1InXids = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InXids.setStatus('mandatory') cntllc1InTests = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InTests.setStatus('mandatory') cntllc1InUIs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InUIs.setStatus('mandatory') cntllc1InNoDsaps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InNoDsaps.setStatus('mandatory') cntllc1InXidOks = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InXidOks.setStatus('mandatory') cntllc1InTestOks = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InTestOks.setStatus('mandatory') cntllc1InSnapIps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InSnapIps.setStatus('mandatory') cntllc1InSnapArps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InSnapArps.setStatus('mandatory') cntllc1InSnapNoProts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InSnapNoProts.setStatus('mandatory') cntllc1InSnapNoTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InSnapNoTypes.setStatus('mandatory') cntllc1OutSnapIps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutSnapIps.setStatus('mandatory') cntllc1OutSnapArps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutSnapArps.setStatus('mandatory') cntllc1OutXids = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutXids.setStatus('mandatory') cntllc1OutXidResps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutXidResps.setStatus('mandatory') cntllc1OutTests = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutTests.setStatus('mandatory') cntllc1OutTestResps = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutTestResps.setStatus('mandatory') cntllc1OutRetOks = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutRetOks.setStatus('mandatory') cntllc1OutFragPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutFragPkts.setStatus('mandatory') cntllc1ErrorTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3), ) if mibBuilder.loadTexts: cntllc1ErrorTable.setStatus('mandatory') cntllc1ErrorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1), ).setIndexNames((0, "CNTAU-MIB", "cntllc1ErrorIndex")) if mibBuilder.loadTexts: cntllc1ErrorEntry.setStatus('mandatory') cntllc1ErrorIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1ErrorIndex.setStatus('mandatory') cntllc1ArpMailErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1ArpMailErrs.setStatus('mandatory') cntllc1IpMailErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1IpMailErrs.setStatus('mandatory') cntllc1OutXmitErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutXmitErrs.setStatus('mandatory') cntllc1OutMcastErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutMcastErrs.setStatus('mandatory') cntllc1XidErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1XidErrs.setStatus('mandatory') cntllc1TestErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1TestErrs.setStatus('mandatory') cntllc1InBadTypes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InBadTypes.setStatus('mandatory') cntllc1OutMismIpSizes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutMismIpSizes.setStatus('mandatory') cntllc1OutBadIpSizes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutBadIpSizes.setStatus('mandatory') cntllc1InMismIpSizes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InMismIpSizes.setStatus('mandatory') cntllc1InBadIpSizes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InBadIpSizes.setStatus('mandatory') cntllc1InLateXids = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InLateXids.setStatus('mandatory') cntllc1InLateTests = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1InLateTests.setStatus('mandatory') cntllc1OutTooBigs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutTooBigs.setStatus('mandatory') cntllc1OutNoRooms = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutNoRooms.setStatus('mandatory') cntllc1OutRetBads = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 13, 3, 3, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntllc1OutRetBads.setStatus('mandatory') cntlua = MibIdentifier((1, 3, 6, 1, 4, 1, 333, 1, 14)) cntLuaCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 1, 14, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntLuaCount.setStatus('mandatory') cntLuaTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 14, 2), ) if mibBuilder.loadTexts: cntLuaTable.setStatus('mandatory') cntluaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1), ).setIndexNames((0, "CNTAU-MIB", "cntluaIf")) if mibBuilder.loadTexts: cntluaEntry.setStatus('mandatory') cntluaIf = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntluaIf.setStatus('mandatory') cntluaNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntluaNumber.setStatus('mandatory') cntSubChanCount = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntSubChanCount.setStatus('mandatory') cntSubChanTable = MibTable((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4), ) if mibBuilder.loadTexts: cntSubChanTable.setStatus('mandatory') cntsubchanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1), ).setIndexNames((0, "CNTAU-MIB", "cntsctIndex")) if mibBuilder.loadTexts: cntsubchanEntry.setStatus('mandatory') cntsctIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctIndex.setStatus('mandatory') cntsctNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctNumber.setStatus('mandatory') cntsctTxStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctTxStatus.setStatus('mandatory') cntsctRxStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctRxStatus.setStatus('mandatory') cntsctSubChanStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctSubChanStatus.setStatus('mandatory') cntsctState = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctState.setStatus('mandatory') cntsctRxCredit = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctRxCredit.setStatus('mandatory') cntsctRxMsgs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctRxMsgs.setStatus('mandatory') cntsctRxMsgBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctRxMsgBytes.setStatus('mandatory') cntsctRxDataBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctRxDataBytes.setStatus('mandatory') cntsctTxMsgs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctTxMsgs.setStatus('mandatory') cntsctTxMsgBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctTxMsgBytes.setStatus('mandatory') cntsctTxDataBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctTxDataBytes.setStatus('mandatory') cntsctTxErrMsgs = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctTxErrMsgs.setStatus('mandatory') cntsctTotalBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctTotalBytes.setStatus('mandatory') cntsctDrecPid = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 16), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctDrecPid.setStatus('mandatory') cntsctDrecTask = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 1, 14, 2, 1, 4, 1, 17), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: cntsctDrecTask.setStatus('mandatory') cntInformationalMsg = NotificationType((1, 3, 6, 1, 4, 1, 333, 1) + (0,1)).setObjects(("CNTAU-MIB", "cntMsgTaskName"), ("CNTAU-MIB", "cntMsgNumber"), ("CNTAU-MIB", "cntMsgCpuNumber"), ("CNTAU-MIB", "cntMsgNodeNumber"), ("CNTAU-MIB", "cntMsgDateTime"), ("CNTAU-MIB", "cntMsgContent")) cntPossibleErrMsg = NotificationType((1, 3, 6, 1, 4, 1, 333, 1) + (0,2)).setObjects(("CNTAU-MIB", "cntMsgTaskName"), ("CNTAU-MIB", "cntMsgNumber"), ("CNTAU-MIB", "cntMsgCpuNumber"), ("CNTAU-MIB", "cntMsgNodeNumber"), ("CNTAU-MIB", "cntMsgDateTime"), ("CNTAU-MIB", "cntMsgContent")) cntSevereErrMsg = NotificationType((1, 3, 6, 1, 4, 1, 333, 1) + (0,3)).setObjects(("CNTAU-MIB", "cntMsgTaskName"), ("CNTAU-MIB", "cntMsgNumber"), ("CNTAU-MIB", "cntMsgCpuNumber"), ("CNTAU-MIB", "cntMsgNodeNumber"), ("CNTAU-MIB", "cntMsgDateTime"), ("CNTAU-MIB", "cntMsgContent")) cntCriticalErrMsg = NotificationType((1, 3, 6, 1, 4, 1, 333, 1) + (0,4)).setObjects(("CNTAU-MIB", "cntMsgTaskName"), ("CNTAU-MIB", "cntMsgNumber"), ("CNTAU-MIB", "cntMsgCpuNumber"), ("CNTAU-MIB", "cntMsgNodeNumber"), ("CNTAU-MIB", "cntMsgDateTime"), ("CNTAU-MIB", "cntMsgContent")) mibBuilder.exportSymbols("CNTAU-MIB", cntFeatureEntry=cntFeatureEntry, cntsystem=cntsystem, cntsctTxMsgs=cntsctTxMsgs, cntFddiPORTFotxClass=cntFddiPORTFotxClass, cntdot3PICDMAErrs=cntdot3PICDMAErrs, cntBadVersions=cntBadVersions, cntFddiMACLLCServiceAvailable=cntFddiMACLLCServiceAvailable, cntmdmQList=cntmdmQList, cntIfNextPoll=cntIfNextPoll, cntSysTimeofDay=cntSysTimeofDay, cntFddiPATHTable=cntFddiPATHTable, cntllc1OutSnapArps=cntllc1OutSnapArps, cntMachineType=cntMachineType, cnticmpInTmXceeds=cnticmpInTmXceeds, cntdlEntry=cntdlEntry, cntMDMEntry=cntMDMEntry, cntHwFailedCpu=cntHwFailedCpu, cntMsgIndex=cntMsgIndex, cntdatalink=cntdatalink, cntdot3Index=cntdot3Index, cntllc1CpuNum=cntllc1CpuNum, cntRowAdditions=cntRowAdditions, cntFddiSMTReportLimit=cntFddiSMTReportLimit, cntCpuMsgHolds=cntCpuMsgHolds, cntFddiMACBaseNotCopies=cntFddiMACBaseNotCopies, cntsctRxStatus=cntsctRxStatus, cntllc1OutMismIpSizes=cntllc1OutMismIpSizes, cntFddiPORTBaseLems=cntFddiPORTBaseLems, cntdlPortEntry=cntdlPortEntry, cntSysMemory=cntSysMemory, cntMemSramAddress=cntMemSramAddress, cntFddiPATHTVXLowerBound=cntFddiPATHTVXLowerBound, cntFddiPORTEBErrs=cntFddiPORTEBErrs, cntHwBBramStatus=cntHwBBramStatus, cntHwBBramType=cntHwBBramType, cntIOPartNumber=cntIOPartNumber, cntFddiMACRootMACDownStreamPORTType=cntFddiMACRootMACDownStreamPORTType, cntsnmpstat=cntsnmpstat, cntllc1ErrorTable=cntllc1ErrorTable, cntllc1XidErrs=cntllc1XidErrs, cntCpuPort=cntCpuPort, cntReleaseLevel=cntReleaseLevel, cnttransmission=cnttransmission, cntllc1OutFragPkts=cntllc1OutFragPkts, cntLuaTable=cntLuaTable, cnticmpInDuProtos=cnticmpInDuProtos, cntllc1InXidOks=cntllc1InXidOks, cntCpuMemSpace=cntCpuMemSpace, cntllc1WaitTimeOut=cntllc1WaitTimeOut, cntPossibleErrMsg=cntPossibleErrMsg, cntFddiMACTPri4=cntFddiMACTPri4, cntDataLinkCount=cntDataLinkCount, cntlua=cntlua, cntCpuMonBy=cntCpuMonBy, cntllc1TraceFlag=cntllc1TraceFlag, cntproxyEntry=cntproxyEntry, cntdot3DMAChan1RxErrs=cntdot3DMAChan1RxErrs, cntFddiMACNotCopiedCondition=cntFddiMACNotCopiedCondition, cntRevEditDate=cntRevEditDate, cntFddiPATHRingLatency=cntFddiPATHRingLatency, cntCpuPollStatus=cntCpuPollStatus, cntHwMonFailStatus=cntHwMonFailStatus, cntMemBBramAddress=cntMemBBramAddress, cntsctIndex=cntsctIndex, cntsnmpconfig=cntsnmpconfig, cntsctRxDataBytes=cntsctRxDataBytes, cntFddiSMTTable=cntFddiSMTTable, cntdlOutDiscards=cntdlOutDiscards, cntSCRTable=cntSCRTable, cntMibVersion=cntMibVersion, cntFddiPATHStatus=cntFddiPATHStatus, cntllc1OutRetBads=cntllc1OutRetBads, cntModelNumber=cntModelNumber, cntdot3DMAChan3RxErrs=cntdot3DMAChan3RxErrs, cntsctNumber=cntsctNumber, cntFddiPATHEntry=cntFddiPATHEntry, cntmdmQIndex=cntmdmQIndex, cntProxyStatus=cntProxyStatus, cntSCRIndex=cntSCRIndex, cntdlMtu=cntdlMtu, cntllc1DriverType=cntllc1DriverType, cntllc1ConfigTable=cntllc1ConfigTable, cntdot3LPXParityErrs=cntdot3LPXParityErrs, cntFddiMACNotCopiedThreshold=cntFddiMACNotCopiedThreshold, cntTrapDestCount=cntTrapDestCount, cntSysMsgTable=cntSysMsgTable, cntCpuPolls=cntCpuPolls, cnticmp=cnticmp, cntllc1BufCnt=cntllc1BufCnt, cntdot3LanceInts=cntdot3LanceInts, cntSysCpuEntry=cntSysCpuEntry, cntDot3Count=cntDot3Count, cntmdmQTaskId=cntmdmQTaskId, cntdlOutOctets=cntdlOutOctets, cntdot3DMARxWaitQ=cntdot3DMARxWaitQ, cnticmpInDuNets=cnticmpInDuNets, cntdlInNUcastPkts=cntdlInNUcastPkts, cntCpuSemLost=cntCpuSemLost, cntllc1=cntllc1, cnticmpInDuSources=cnticmpInDuSources, cntFddiPORT=cntFddiPORT, cntifCpu=cntifCpu, cntFddiPATHSba=cntFddiPATHSba, cntdlInOctets=cntdlInOctets, cntsctTxStatus=cntsctTxStatus, cntCpuStatus=cntCpuStatus, cntFddiMACDownstreamNbr=cntFddiMACDownstreamNbr, cntdot3LanceParityErrs=cntdot3LanceParityErrs, cnticmpOutDuProtos=cnticmpOutDuProtos, cntFeatureDescr=cntFeatureDescr, cntdlPortIndex=cntdlPortIndex, cntdlInUcastPkts=cntdlInUcastPkts, cntmdmQProcessId=cntmdmQProcessId, cntdlType=cntdlType, cntFeatureQuantity=cntFeatureQuantity, cntFddiMACTPri3=cntFddiMACTPri3, cntsubchanEntry=cntsubchanEntry, cntIOTable=cntIOTable, cntSlotCpuNumber=cntSlotCpuNumber, cntllc1InBadIpSizes=cntllc1InBadIpSizes, cntCpuTaskIndex=cntCpuTaskIndex, cntFddiMACNumber=cntFddiMACNumber, cntdot3DMAChan2TxErrs=cntdot3DMAChan2TxErrs, cntinterfaces=cntinterfaces, cntConfigVersion=cntConfigVersion, cntdot3DMAChan2TxErr=cntdot3DMAChan2TxErr, cntCpuSemCount=cntCpuSemCount, cntFddiPATHTMaxLowerBound=cntFddiPATHTMaxLowerBound, cntFddiMACRingOps=cntFddiMACRingOps, cntdot3PICSpuriousInts=cntdot3PICSpuriousInts, cntLuaCount=cntLuaCount, cnt=cnt, cnttraceType=cnttraceType, cntCpuLastFailDate=cntCpuLastFailDate, cntllc1BufPriority=cntllc1BufPriority, cntdlPortTable=cntdlPortTable, cntllc1InTestOks=cntllc1InTestOks, cntllc1InTests=cntllc1InTests, cntdot3LanceUnderFlows=cntdot3LanceUnderFlows, cntdlOutNUcastPkts=cntdlOutNUcastPkts, cnttrapIf=cnttrapIf, cntHwReset1Date=cntHwReset1Date, cntMsgDateTime=cntMsgDateTime, cntFddiSMTNumber=cntFddiSMTNumber, cntifIndex=cntifIndex, cntifSubIndex=cntifSubIndex, cntFddiSMTLastSetStationID=cntFddiSMTLastSetStationID, cntsctState=cntsctState, cntCachedResponses=cntCachedResponses, cntHwFailStatus=cntHwFailStatus, cntFddiPATHSMTIndex=cntFddiPATHSMTIndex, cntPowerPartNumber=cntPowerPartNumber, cntCpuLastChgDate=cntCpuLastChgDate, cntSysHardware=cntSysHardware, cntllc1ArpMailErrs=cntllc1ArpMailErrs, cntllc1StatIndex=cntllc1StatIndex, cnticmpInTmFrags=cnticmpInTmFrags, cntllc1OutSnapIps=cntllc1OutSnapIps, cntFddiMAC=cntFddiMAC, cntdot3PICBusErrs=cntdot3PICBusErrs, cntluaIf=cntluaIf, cnticmpInReHosts=cnticmpInReHosts, cntSlotEntry=cntSlotEntry, cntdlPortAddrLen=cntdlPortAddrLen, cntPowerName=cntPowerName, cntFddiMACTPri0=cntFddiMACTPri0, cntFddiPATH=cntFddiPATH, cntFeatureIndex=cntFeatureIndex, cntFddiPORTTable=cntFddiPORTTable, cntSnmpBufferCount=cntSnmpBufferCount, cntsctDrecPid=cntsctDrecPid, cnticmpInDuPorts=cnticmpInDuPorts, cntFddiMACTokens=cntFddiMACTokens, cnticmpOutReServhosts=cnticmpOutReServhosts, cntMemSramSpace=cntMemSramSpace, cntdot3LanceTxWaitQ=cntdot3LanceTxWaitQ, cntRowErrors=cntRowErrors, cntFddiPATHType=cntFddiPATHType, cntCpuType=cntCpuType, cntdot3BufPriority=cntdot3BufPriority, cntPowerSerialNumber=cntPowerSerialNumber, cntFddiPORTEntry=cntFddiPORTEntry, cntFddiMACRootMACCurrentPath=cntFddiMACRootMACCurrentPath, cntTrapTable=cntTrapTable, cntFddiPORTBaseLerTimeStamp=cntFddiPORTBaseLerTimeStamp, cntsctTotalBytes=cntsctTotalBytes, cnticmpOutDuNets=cnticmpOutDuNets, cntHwCpuEntry=cntHwCpuEntry, cntMailQueue=cntMailQueue, cntllc1ErrorIndex=cntllc1ErrorIndex, cntCntRequests=cntCntRequests, cntCpuMonStatus=cntCpuMonStatus, cntllc1OutNoRooms=cntllc1OutNoRooms, cntdot3BufsAllocated=cntdot3BufsAllocated, cntHwFailDate=cntHwFailDate, cntIOIndex=cntIOIndex, cnticmpInReNets=cnticmpInReNets, cntCofiVersion=cntCofiVersion, cnticmpOutReHosts=cnticmpOutReHosts, cntMsgSeqNumber=cntMsgSeqNumber, cntllc1ConfigEntry=cntllc1ConfigEntry, cntdot3LanceMemErrs=cntdot3LanceMemErrs, cntFddiMACNotCopies=cntFddiMACNotCopies, cntdot3BufTooManys=cntdot3BufTooManys, cntFddiMACTable=cntFddiMACTable, cntMsgNumber=cntMsgNumber, cntFddiPATHIndex=cntFddiPATHIndex, cntFddiMACCopies=cntFddiMACCopies, cntdlTypeofService=cntdlTypeofService, cntproxyNode=cntproxyNode, cntllc1InSnapIps=cntllc1InSnapIps, cntMsgTaskName=cntMsgTaskName, cntNoBuffers=cntNoBuffers, cntHwPowerSupply=cntHwPowerSupply, cntPowerRevLevel=cntPowerRevLevel, cntsctTxMsgBytes=cntsctTxMsgBytes, cntSysNodeAddress=cntSysNodeAddress, cntFddiMACLates=cntFddiMACLates, cntSlotIndex=cntSlotIndex, cntProxyCount=cntProxyCount, cntLLC1Count=cntLLC1Count, cntMsgEntry=cntMsgEntry, cntdot3LanceOverFlows=cntdot3LanceOverFlows, cntMib2Requests=cntMib2Requests, cntCpuUnclaims=cntCpuUnclaims, cntSubChanTable=cntSubChanTable, cntFddiMACShortGrpAddr=cntFddiMACShortGrpAddr, cntMsgCpuNumber=cntMsgCpuNumber, cnticmpOutDuSources=cnticmpOutDuSources, cntFddiPATHPORTOrder=cntFddiPATHPORTOrder, cntdiagnostics=cntdiagnostics, cntFddiMACBaseTimeNotCopied=cntFddiMACBaseTimeNotCopied, cntdot3Table=cntdot3Table, cntFddiPORTSMTIndex=cntFddiPORTSMTIndex, cntSlotTable=cntSlotTable, cntHwMonCpu=cntHwMonCpu, cntMemBBramSpace=cntMemBBramSpace, cntdot3BufNotAvails=cntdot3BufNotAvails, cntFddiPORTMaintLineState=cntFddiPORTMaintLineState, cntmdmQName=cntmdmQName, cntCpuTaskEntry=cntCpuTaskEntry, cntFddiMACIndex=cntFddiMACIndex, cntSubChanCount=cntSubChanCount, cntllc1ConfigIndex=cntllc1ConfigIndex, cntFddiCount=cntFddiCount, cntdlNumber=cntdlNumber, cntFddiSMTManufacturerData=cntFddiSMTManufacturerData, cntRowDeletions=cntRowDeletions, cntFddiPATHNumber=cntFddiPATHNumber, cntdot3LanceMissedPkts=cntdot3LanceMissedPkts, cntSlotSerialNumber=cntSlotSerialNumber, cntFddiPORTNumber=cntFddiPORTNumber, cntCpuUtil=cntCpuUtil, cntPowerEntry=cntPowerEntry) mibBuilder.exportSymbols("CNTAU-MIB", cntRevEditTime=cntRevEditTime, cntllc1InNoDsaps=cntllc1InNoDsaps, cntFddiPATHTraceStatus=cntFddiPATHTraceStatus, cntproxyAddress=cntproxyAddress, cntllc1InMismIpSizes=cntllc1InMismIpSizes, cntifType=cntifType, cntifTable=cntifTable, cnttrapEntry=cnttrapEntry, cntdlOutUcastPkts=cntdlOutUcastPkts, cntdlOutErrors=cntdlOutErrors, cntWorkOrderNumber=cntWorkOrderNumber, cntSCRNumber=cntSCRNumber, cntdlTable=cntdlTable, cntChassisNumber=cntChassisNumber, cntCpuMsgRets=cntCpuMsgRets, cntllc1Addr=cntllc1Addr, cntllc1InLateTests=cntllc1InLateTests, cntdot3DMAChan1RxErr=cntdot3DMAChan1RxErr, cntdlIndex=cntdlIndex, cntCpuNum=cntCpuNum, cntllc1IpMailErrs=cntllc1IpMailErrs, cnttraceEntry=cnttraceEntry, cntllc1OutMcastErrs=cntllc1OutMcastErrs, cntFddiMACBaseErrs=cntFddiMACBaseErrs, cntSlotName=cntSlotName, cntllc1InBadTypes=cntllc1InBadTypes, cntFddiPORTBaseLemRejects=cntFddiPORTBaseLemRejects, cnticmpInReServnets=cnticmpInReServnets, cntRevDate=cntRevDate, cntFddiSMTMsgTimeStamp=cntFddiSMTMsgTimeStamp, cnticmpInDuHosts=cnticmpInDuHosts, cntSlotPartNumber=cntSlotPartNumber, cntFddiPATHTraceMaxExpiration=cntFddiPATHTraceMaxExpiration, cntllc1TestErrs=cntllc1TestErrs, cntsnmpproxy=cntsnmpproxy, cntCpuResetDelayTime=cntCpuResetDelayTime, cntluaNumber=cntluaNumber, cntMDMTable=cntMDMTable, cntdlPortType=cntdlPortType, cntFeatureTable=cntFeatureTable, cntIOName=cntIOName, cntFddiMACLongAlias=cntFddiMACLongAlias, cntllc1StatsTable=cntllc1StatsTable, cntSevereErrMsg=cntSevereErrMsg, cntdlOutQLen=cntdlOutQLen, cntdot3DMATxWaitQ=cntdot3DMATxWaitQ, cntFddiSMTEntry=cntFddiSMTEntry, cnticmpOutDuPorts=cnticmpOutDuPorts, cntdot3PICMemSeqErrs=cntdot3PICMemSeqErrs, cntMemSramFree=cntMemSramFree, cntFddiMACTPri2=cntFddiMACTPri2, cntIOInterface=cntIOInterface, cntsctRxMsgBytes=cntsctRxMsgBytes, cntSerialNumber=cntSerialNumber, cntSysBuild=cntSysBuild, cnticmpInDuFrags=cnticmpInDuFrags, cntFddiSMTIndex=cntFddiSMTIndex, cntFddiPORTIndex=cntFddiPORTIndex, cntMemBBramFree=cntMemBBramFree, cntllc1OutXids=cntllc1OutXids, cntSerialAlfaNumber=cntSerialAlfaNumber, cntdot3=cntdot3, cntSlotVMEbusGrant=cntSlotVMEbusGrant, cntSlotRevLevel=cntSlotRevLevel, cntFddiSMTTransitionTimeStamp=cntFddiSMTTransitionTimeStamp, cntCpuTaskName=cntCpuTaskName, cntsctTxErrMsgs=cntsctTxErrMsgs, cntllc1InLateXids=cntllc1InLateXids, cntSCREntry=cntSCREntry, cntFddiMACSMTIndex=cntFddiMACSMTIndex, cntFddiMACBridgeFunction=cntFddiMACBridgeFunction, cntPowerTable=cntPowerTable, cntsctRxMsgs=cntsctRxMsgs, cntdot3SoftwareID=cntdot3SoftwareID, cntllc1InSnapNoProts=cntllc1InSnapNoProts, cntdlActivePort=cntdlActivePort, cnticmpOutTmXceeds=cnticmpOutTmXceeds, cntDot3Requests=cntDot3Requests, cntProxyTable=cntProxyTable, cntllc1OutRetOks=cntllc1OutRetOks, cntFddiMACOldDownstreamNbr=cntFddiMACOldDownstreamNbr, cntHwReset2Why=cntHwReset2Why, cntllc1OutTestResps=cntllc1OutTestResps, cnticmpOutDuFrags=cnticmpOutDuFrags, cntllc1OutXidResps=cntllc1OutXidResps, cntFddiMACBaseLosts=cntFddiMACBaseLosts, cntsctDrecTask=cntsctDrecTask, cntHwCpuTable=cntHwCpuTable, cntau=cntau, cntFddiMACBaseCopies=cntFddiMACBaseCopies, cntFddiRequests=cntFddiRequests, cntdot3Entry=cntdot3Entry, cntdlInDiscards=cntdlInDiscards, cntFddiMACTPri5=cntFddiMACTPri5, cntfddi=cntfddi, cntFddiPortCount=cntFddiPortCount, cntluaEntry=cntluaEntry, cntllc1InXids=cntllc1InXids, cnticmpOutDuHosts=cnticmpOutDuHosts, cntFddiMACTvxExpires=cntFddiMACTvxExpires, cntHwReset2Date=cntHwReset2Date, cntFddiMACMasterSlaveLoopStatus=cntFddiMACMasterSlaveLoopStatus, cntIOCpuNumber=cntIOCpuNumber, cntllc1InSnapNoTypes=cntllc1InSnapNoTypes, cntdlInUnknownProtos=cntdlInUnknownProtos, cntCpuXtraInts=cntCpuXtraInts, cnttraceCpu=cnttraceCpu, cntMsgSeverity=cntMsgSeverity, cnticmpOutReServnets=cnticmpOutReServnets, cntTrapFlags=cntTrapFlags, cnttraceIndex=cnttraceIndex, cntllc1InSnapArps=cntllc1InSnapArps, cntCustomer=cntCustomer, cntSlotInterface=cntSlotInterface, cntFddiMACRootConcentratorMac=cntFddiMACRootConcentratorMac, cntFddiSMT=cntFddiSMT, cntllc1StatsEntry=cntllc1StatsEntry, cntdlMaxPort=cntdlMaxPort, cntdlDescr=cntdlDescr, cntLastTrapMsg=cntLastTrapMsg, cntUsedCaches=cntUsedCaches, cntsctTxDataBytes=cntsctTxDataBytes, cnttrapAddress=cnttrapAddress, cntFddiMACLongGrpAddr=cntFddiMACLongGrpAddr, cntdot3DMAChan3RxErr=cntdot3DMAChan3RxErr, cntdot3PICMemParityErrs=cntdot3PICMemParityErrs, cntHwReset3Date=cntHwReset3Date, cntdot3DMAChan0TxErrs=cntdot3DMAChan0TxErrs, cntFddiMACTPri1=cntFddiMACTPri1, cntCpuIndex=cntCpuIndex, cntCpuResetFlag=cntCpuResetFlag, cntFddiPATHTRmode=cntFddiPATHTRmode, cntPowerIndex=cntPowerIndex, cntCpuTaskTable=cntCpuTaskTable, cntMibObjectCount=cntMibObjectCount, cntHwReset3Why=cntHwReset3Why, cntFddiSMTSetCount=cntFddiSMTSetCount, cntHwStatusLED=cntHwStatusLED, cntFddiMACTPri6=cntFddiMACTPri6, cntCriticalErrMsg=cntCriticalErrMsg, cnticmpOutReNets=cnticmpOutReNets, cntIfPollInterval=cntIfPollInterval, cntllc1OutXmitErrs=cntllc1OutXmitErrs, cntFddiMACShortAlias=cntFddiMACShortAlias, cntFddiPORTBaseLerEstimate=cntFddiPORTBaseLerEstimate, cntCpuLevel7s=cntCpuLevel7s, cntFddiPATHSbaOverhead=cntFddiPATHSbaOverhead, cntHwReset1Why=cntHwReset1Why, cntInformationalMsg=cntInformationalMsg, cntIOEntry=cntIOEntry, cnttraceData=cnttraceData, cntdlState=cntdlState, cntFddiMACNotCopiedRatio=cntFddiMACNotCopiedRatio, cntsnmp=cntsnmp, cntMsgNodeNumber=cntMsgNodeNumber, cntRowModifies=cntRowModifies, cntllc1OutTooBigs=cntllc1OutTooBigs, cntsnmpTrapFlags=cntsnmpTrapFlags, cnttrapIndex=cnttrapIndex, cntifEntry=cntifEntry, cntdot3Chan1Misreads=cntdot3Chan1Misreads, cntMsgContent=cntMsgContent, cntFddiMACBaseTimeFrameError=cntFddiMACBaseTimeFrameError, cntTraceTable=cntTraceTable, cntFddiMACTransmits=cntFddiMACTransmits, cntllc1OutBadIpSizes=cntllc1OutBadIpSizes, cntllc1OutTests=cntllc1OutTests, cnticmpOutTmFrags=cnticmpOutTmFrags, cntIORevLevel=cntIORevLevel, cntllc1InitFlag=cntllc1InitFlag, cntdlSourcePort=cntdlSourcePort, cntFeatureName=cntFeatureName, cntMailTimeouts=cntMailTimeouts, cntFddiMACEntry=cntFddiMACEntry, cntIfsState=cntIfsState, cntSysCpuTable=cntSysCpuTable, cntdlDestPort=cntdlDestPort, cntCpuMemFree=cntCpuMemFree, cntDoDIPCount=cntDoDIPCount, cntsctRxCredit=cntsctRxCredit, cntllc1InUIs=cntllc1InUIs, cntFddiMACBaseFrames=cntFddiMACBaseFrames, cntproxyIndex=cntproxyIndex, cntsnmptrap=cntsnmptrap, cntdot3DMAChan0TxErr=cntdot3DMAChan0TxErr, cntllc1BusId=cntllc1BusId, cntIOSerialNumber=cntIOSerialNumber, cntFddiSMTUserData=cntFddiSMTUserData, cntdlInErrors=cntdlInErrors, cntsctSubChanStatus=cntsctSubChanStatus, cnticmpInReServhosts=cnticmpInReServhosts, cntllc1ErrorEntry=cntllc1ErrorEntry)
class Location: __name: str = None def __init__(self, name: str) -> None: if type(name) != str: raise TypeError('name of Location must be a string') elif len(name) <= 0: raise ValueError("name of Location must be non-empty") self.__name = name @property def name(self) -> str: return self.__name def __eq__(self, other): if not isinstance(other, Location): return False return self.__name == other.__name def __hash__(self): return hash(self.__name) def __str__(self): return self.__name def __repr__(self): return "%s(\"%s\")" % (self.__class__.__name__, self.__name)
asset_permissions = {} asset_permissions["charge_market_fee"] = 0x01 asset_permissions["white_list"] = 0x02 asset_permissions["override_authority"] = 0x04 asset_permissions["transfer_restricted"] = 0x08 asset_permissions["disable_force_settle"] = 0x10 asset_permissions["global_settle"] = 0x20 asset_permissions["disable_confidential"] = 0x40 asset_permissions["witness_fed_asset"] = 0x80 asset_permissions["committee_fed_asset"] = 0x100 whitelist = {} whitelist["no_listing"] = 0x0 whitelist["white_listed"] = 0x1 whitelist["black_listed"] = 0x2 whitelist["white_and_black_listed"] = 0x1 | 0x2 def toint(permissions): permissions_int = 0 for p in permissions: if permissions[p]: permissions_int |= asset_permissions[p] return permissions_int def todict(number): r = {} for k, v in asset_permissions.items(): r[k] = bool(number & v) return r def force_flag(perms, flags): for p in flags: if flags[p]: perms |= asset_permissions[p] return perms def test_permissions(perms, flags): for p in flags: if not asset_permissions[p] & perms: raise Exception( "Permissions prevent you from changing %s!" % p ) return True
#!/usr/bin/env python # -*- coding: utf-8 -*- url = 'http://practiapinta.me/tepinta' sender = '[email protected]' password = '' smtp = 'owa.pragmaconsultores.net' body = ''
def main(): with open('input.txt') as file: data = file.read().strip().split('\n') n = int(data[0]) symbols = data[1] number = int(data[2]) cleaned_sumbols = '' for symbol in symbols: if symbol != ' ': cleaned_sumbols += symbol output = str(int(cleaned_sumbols)+number) for symbol in output: print(symbol, end=' ') if __name__ == '__main__': main()
test = { 'name': 'q3_3_1', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> # Fill in the row; >>> # time = ...; >>> # with something like:; >>> # time = 4.567; >>> # (except with the right number).; >>> time != ... True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # Read the text above the question to see what; >>> # time should be. ; >>> round(time, 5) 1.2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # Fill in the row; >>> # estimated_distance_m = ...; >>> # with something like:; >>> # estimated_distance_m = 4.567; >>> # (except with the right number). ; >>> estimated_distance_m != ... True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # Note that the units are meters, but the text used; >>> # centimeters.; >>> estimated_distance_m != 113 True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # Read the text above the question to see what; >>> # estimated_distance_m should be.; >>> round(estimated_distance_m, 5) 1.13 """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest' } ] }
# File: windowsdefenderatp_consts.py # Copyright (c) 2019 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # DEFENDERATP_PHANTOM_BASE_URL = '{phantom_base_url}rest' DEFENDERATP_PHANTOM_SYS_INFO_URL = '/system_info' DEFENDERATP_PHANTOM_ASSET_INFO_URL = '/asset/{asset_id}' DEFENDERATP_LOGIN_BASE_URL = 'https://login.microsoftonline.com' DEFENDERATP_SERVER_TOKEN_URL = '/{tenant_id}/oauth2/token' DEFENDERATP_AUTHORIZE_URL = '/{tenant_id}/oauth2/authorize?client_id={client_id}&redirect_uri={redirect_uri}' \ '&response_type={response_type}&state={state}&resource={resource}' DEFENDERATP_RESOURCE_URL = 'https://api.securitycenter.windows.com' DEFENDERATP_MSGRAPH_API_BASE_URL = 'https://api.securitycenter.windows.com/api' DEFENDERATP_MACHINES_ENDPOINT = '/machines' DEFENDERATP_IP_MACHINES_ENDPOINT = '/ips/{input}/machines' DEFENDERATP_DOMAIN_MACHINES_ENDPOINT = '/domains/{input}/machines' DEFENDERATP_FILE_MACHINES_ENDPOINT = '/files/{input}/machines' DEFENDERATP_ALERTS_ENDPOINT = '/alerts' DEFENDERATP_IP_ALERTS_ENDPOINT = '/ips/{input}/alerts' DEFENDERATP_DOMAIN_ALERTS_ENDPOINT = '/domains/{input}/alerts' DEFENDERATP_FILE_ALERTS_ENDPOINT = '/files/{input}/alerts' DEFENDERATP_ISOLATE_ENDPOINT = '/machines/{device_id}/isolate' DEFENDERATP_UNISOLATE_ENDPOINT = '/machines/{device_id}/unisolate' DEFENDERATP_SESSIONS_ENDPOINT = '/machines/{device_id}/logonusers' DEFENDERATP_FILE_QUARANTINE_ENDPOINT = '/machines/{device_id}/stopAndQuarantineFile' DEFENDERATP_MACHINEACTIONS_ENDPOINT = '/machineactions/{action_id}' DEFENDERATP_FILEMACHINEACTIONS_ENDPOINT = '/filemachineactions/{action_id}' DEFENDERATP_SCAN_DEVICE_ENDPOINT = '/machines/{device_id}/runAntiVirusScan' DEFENDERATP_UNBLOCK_HASH_ENDPOINT = '/files/{file_hash}/unblock' DEFENDERATP_FILE_BLOCK_ENDPOINT = '/files/{file_hash}/block' DEFENDERATP_TOKEN_EXPIRED = 'Access token has expired' DEFENDERATP_TOKEN_NOT_AVAILABLE_MSG = 'Token not available. Please run test connectivity first.' DEFENDERATP_BASE_URL_NOT_FOUND_MSG = 'Phantom Base URL not found in System Settings. ' \ 'Please specify this value in System Settings.' DEFENDERATP_TEST_CONNECTIVITY_FAILED_MSG = 'Test connectivity failed' DEFENDERATP_TEST_CONNECTIVITY_PASSED_MSG = 'Test connectivity passed' DEFENDERATP_AUTHORIZE_USER_MSG = 'Please authorize user in a separate tab using URL' DEFENDERATP_CODE_RECEIVED_MSG = 'Code Received' DEFENDERATP_MAKING_CONNECTION_MSG = 'Making Connection...' DEFENDERATP_OAUTH_URL_MSG = 'Using OAuth URL:' DEFENDERATP_GENERATING_ACCESS_TOKEN_MSG = 'Generating access token' DEFENDERATP_ALERTS_INFO_MSG = 'Getting info about alerts' DEFENDERATP_RECEIVED_ALERT_INFO_MSG = 'Received alert info' DEFENDERATP_ACTION_ID_UNAVAILABLE_MSG = 'Action ID not available. Please try again after sometime.' DEFENDERATP_FILE_HASH_UNBLOCKED_SUCCESS_MSG = 'File hash unblocked successfully' DEFENDERATP_NO_DATA_FOUND_MSG = 'No data found' DEFENDERATP_NO_DEVICE_FOUND_MSG = 'No devices found' DEFENDERATP_NO_FILE_DEVICE_FOUND_MSG = 'No devices or files found' DEFENDERATP_NO_EVENT_FOUND_MSG = 'No events found' DEFENDERATP_FILE_BLOCKED_MSG = 'File hash blocked successfully' DEFENDERATP_PARAM_VALIDATION_FAILED_MSG = 'Parameter validation failed. Invalid {}' DEFENDERATP_INPUT_REQUIRED_MSG = 'Input is required for the given type' DEFENDERATP_LIMIT_VALIDATION_MSG = 'Limit should be a positive integer' DEFENDERATP_TIMEOUT_VALIDATION_MSG = 'Timeout should be a positive integer' DEFENDERATP_CONFIG_TENANT_ID = 'tenant_id' DEFENDERATP_CONFIG_CLIENT_ID = 'client_id' DEFENDERATP_ALL_CONST = 'All' DEFENDERATP_IP_CONST = 'IP' DEFENDERATP_DOMAIN_CONST = 'Domain' DEFENDERATP_FILE_HASH_CONST = 'File Hash' DEFENDERATP_JSON_LIMIT = 'limit' DEFENDERATP_JSON_TIMEOUT = 'timeout' DEFENDERATP_JSON_INPUT = 'input' DEFENDERATP_JSON_DEVICE_ID = 'device_id' DEFENDERATP_JSON_SCAN_TYPE = 'scan_type' DEFENDERATP_JSON_COMMENT = 'comment' DEFENDERATP_JSON_FILE_HASH = 'file_hash' DEFENDERATP_JSON_TYPE = 'type' DEFENDERATP_EVENT_ID = 'event_id' DEFENDERATP_JSON_INPUT_TYPE = 'input_type' DEFENDERATP_STATUS_PROGRESS = 'InProgress' DEFENDERATP_TOKEN_STRING = 'token' DEFENDERATP_ACCESS_TOKEN_STRING = 'access_token' DEFENDERATP_REFRESH_TOKEN_STRING = 'refresh_token' DEFENDERATP_NEXT_LINK_STRING = '@odata.nextLink' DEFENDERATP_TC_FILE = 'oauth_task.out' DEFENDERATP_STATUS_CHECK_DEFAULT = 30 DEFENDERATP_STATUS_CHECK_SLEEP = 5 DEFENDERATP_TC_STATUS_SLEEP = 3 DEFENDERATP_AUTHORIZE_WAIT_TIME = 15 DEFENDERATP_ALERT_DEFAULT_LIMIT = 100 DEFENDERATP_QUARANTINE_TIMEOUT_MAX_LIMIT = 60 DEFENDERATP_SCAN_TIMEOUT_MAX_LIMIT = 3600
class Delete(object): def __init__(self, graphConnector, userPrincipalName='me'): """The Delete class deletes a message from a users mailbox. NOTE: Please note that this will do a soft delete and it is only recoverable via "Recoverable Items" feature on a mailbox. This also means that you will not see it in the users delete items folder. Args: graphConnector (GraphConnector): A generated GraphConnector object verify_ssl (bool, optional): Whether to verify SSL or not. Defaults to True. userPrincipalName (str, optional): Defaults to the current user, but can be any user defined or provided in this parameter. Defaults to 'me'. """ self.connector = graphConnector if userPrincipalName is not 'me': self.user = 'users/%s' % userPrincipalName else: self.user = userPrincipalName def delete(self, messageId): uri = '%s/messages/%s' % (self.user, messageId) response = self.connector.invoke('DELETE', uri) if response.status_code is '204': return True return False def delete_search_message(self, mailFolder, messageId): uri = '%s/mailFolders/%s/messages/%s' % (self.user, mailFolder, messageId) response = self.connector.invoke('DELETE', uri) if response.status_code is '204': return True return False
count=0 total=0 print('before', count,total) for numbers in [9,41,12,3,74,15]: count=count+1 total=total+numbers print (count,total,numbers) print('After', count, total, total/count)
def karatsuba_multiplication(x, y): x_digits = len(str(x)) y_digits = len(str(y)) # Base case for the recursion. if (x_digits == 1 or y_digits == 1): return x * y # Figure out where to split. n2 = max(x_digits, y_digits) / 2 factor = int(10 ** n2) # Break up the number into parts. a = x // factor b = x % factor c = y // factor d = y % factor # Calculate the result. z2 = karatsuba_multiplication(a, c) z0 = karatsuba_multiplication(b, d) z1 = karatsuba_multiplication(a + b, c + d) - z2 - z0 return (z2 * (factor ** 2)) + (z1 * factor) + z0 x = 5822 y = 4104 z = karatsuba_multiplication(x, y) print(f"{x} * {y} = {z}")
#!/usr/bin/env python active = { 'url': 'https://<SUBDOMAIN>.carbonblack.io/api/v1/process', 'key': '<API KEY>' } # ====================================================================== # Place API key and URL in 'active' to use with the cmdline-search.py # ====================================================================== env1 = { 'url': 'https://<SUBDOMAIN>.carbonblack.io/api/v1/process', 'key': '<API KEY>' } env2 = { 'url': 'https://<SUBDOMAIN>.carbonblack.io/api/v1/process', 'key': '<API KEY>' } etc = { 'url': 'https://<SUBDOMAIN>.carbonblack.io/api/v1/process', 'key': '<API KEY>' }
ctr = 1 while ctr != -1 : try: ctr = int(input('Enter a number ( -1 to exit) : ')) except ValueError: print("That was not a number") else: #Only executed when no exception happens print("No exception happened") finally: print("finally executed")
# # PySNMP MIB module CISCO-ATM-IF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ATM-IF-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:33:08 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint") atmInterfaceConfEntry, = mibBuilder.importSymbols("ATM-MIB", "atmInterfaceConfEntry") ciscoExperiment, = mibBuilder.importSymbols("CISCO-SMI", "ciscoExperiment") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") ObjectIdentity, Bits, Counter64, IpAddress, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Gauge32, Integer32, ModuleIdentity, NotificationType, TimeTicks, MibIdentifier, iso = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Bits", "Counter64", "IpAddress", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Gauge32", "Integer32", "ModuleIdentity", "NotificationType", "TimeTicks", "MibIdentifier", "iso") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") ciscoAtmIfMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 10, 14)) ciscoAtmIfMIB.setRevisions(('2002-02-13 00:00', '2001-08-08 00:00', '2001-05-21 00:00', '2000-04-11 00:00', '1999-03-11 00:00', '1997-11-30 00:00', '1997-09-10 00:00', '1996-11-01 00:00', '1996-10-14 00:00',)) if mibBuilder.loadTexts: ciscoAtmIfMIB.setLastUpdated('200202130000Z') if mibBuilder.loadTexts: ciscoAtmIfMIB.setOrganization('Cisco Systems, Inc.') ciscoAtmIfMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 14, 1)) class NsapAtmAddr(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(20, 20) fixedLength = 20 class AtmAddr(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(8, 8), ValueSizeConstraint(13, 13), ValueSizeConstraint(20, 20), ) class UpcMethod(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("passing", 1), ("tagging", 2), ("dropping", 3)) ciscoAtmIfIlmiAccessGlobalDefaultFilter = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("permitAll", 1), ("permitPrefix", 2), ("permitPrefixAndWellknownGroups", 3), ("permitPrefixAndAllGroups", 4))).clone('permitAll')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfIlmiAccessGlobalDefaultFilter.setStatus('current') ciscoAtmIfNotifsEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfNotifsEnabled.setStatus('current') ciscoAtmIfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1), ) if mibBuilder.loadTexts: ciscoAtmIfTable.setStatus('current') ciscoAtmIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1), ) atmInterfaceConfEntry.registerAugmentions(("CISCO-ATM-IF-MIB", "ciscoAtmIfEntry")) ciscoAtmIfEntry.setIndexNames(*atmInterfaceConfEntry.getIndexNames()) if mibBuilder.loadTexts: ciscoAtmIfEntry.setStatus('current') ciscoAtmIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("uni", 2), ("pnni", 3), ("iisp", 4), ("nniPvcOnly", 5), ("aini", 6))).clone('uni')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfType.setStatus('current') ciscoAtmIfSide = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("user", 1), ("network", 2), ("notApplicable", 3))).clone('network')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSide.setStatus('current') ciscoAtmIfUniType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("public", 1), ("private", 2))).clone('private')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfUniType.setStatus('current') ciscoAtmIfPVPs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfPVPs.setStatus('current') ciscoAtmIfPVCs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfPVCs.setStatus('current') ciscoAtmIfActiveSVPs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfActiveSVPs.setStatus('current') ciscoAtmIfActiveSVCs = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 7), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfActiveSVCs.setStatus('current') ciscoAtmIfTotalConnections = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 8), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfTotalConnections.setStatus('current') ciscoAtmIfConfVplIf = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfConfVplIf.setStatus('current') ciscoAtmIfPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(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))).clone(namedValues=NamedValues(("other", 1), ("cpu", 2), ("ethernet", 3), ("oc3Utp", 4), ("oc3SingleModeFiber", 5), ("oc3MultiModeFiber", 6), ("oc12SingleModeFiber", 7), ("ds3", 8), ("e3", 9), ("ds1", 10), ("e1", 11), ("oc3Utp3", 12), ("oc3Utp5", 13), ("oc3SmIr", 14), ("oc3SmIrPlus", 15), ("oc3SmLr", 16), ("oc3Pof", 17), ("oc12MultiModeFiber", 18), ("oc12SmIr", 19), ("oc12SmIrPlus", 20), ("oc12SmLr", 21), ("oc12Pof", 22), ("oc12SmLr2", 23), ("oc12SmLr3", 24), ("atm25", 25)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfPortType.setStatus('current') ciscoAtmIfXmitLed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("off", 1), ("steadyGreen", 2), ("steadyYellow", 3), ("steadyRed", 4), ("flashGreen", 5), ("flashYellow", 6), ("flashRed", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfXmitLed.setStatus('current') ciscoAtmIfRecvLed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("off", 1), ("steadyGreen", 2), ("steadyYellow", 3), ("steadyRed", 4), ("flashGreen", 5), ("flashYellow", 6), ("flashRed", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfRecvLed.setStatus('current') ciscoAtmIfXmitCells = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfXmitCells.setStatus('current') ciscoAtmIfRecvCells = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfRecvCells.setStatus('current') ciscoAtmIfSvcMinVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfSvcMinVci.setStatus('deprecated') ciscoAtmIfIlmiConfiguration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfIlmiConfiguration.setStatus('current') ciscoAtmIfIlmiAddressRegistration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfIlmiAddressRegistration.setStatus('current') ciscoAtmIfIlmiAutoConfiguration = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfIlmiAutoConfiguration.setStatus('current') ciscoAtmIfIlmiKeepAlive = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfIlmiKeepAlive.setStatus('current') ciscoAtmIfSoftVcDestAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 20), NsapAtmAddr()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfSoftVcDestAddress.setStatus('current') ciscoAtmIfUniSignallingVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("notApplicable", 1), ("atmfUni3Dot0", 2), ("atmfUni3Dot1", 3), ("atmfUni4Dot0", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfUniSignallingVersion.setStatus('current') ciscoAtmIfSvcUpcIntent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("passing", 1), ("tagging", 2), ("dropping", 3))).clone('passing')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSvcUpcIntent.setStatus('deprecated') ciscoAtmIfAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("nsap", 1), ("esi", 2), ("e164", 3), ("null", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfAddressType.setStatus('obsolete') ciscoAtmIfAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 24), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(6, 6), ValueSizeConstraint(8, 8), ValueSizeConstraint(20, 20), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfAddress.setStatus('obsolete') ciscoAtmIfWellKnownVcMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 31), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("automatic", 1), ("manual", 2), ("manualDeleteUponEntry", 3))).clone('automatic')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfWellKnownVcMode.setStatus('current') ciscoAtmIfSignallingAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSignallingAdminStatus.setStatus('current') ciscoAtmIfCdLed = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("off", 1), ("steadyGreen", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfCdLed.setStatus('current') ciscoAtmIfIlmiAccessFilter = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("permitAll", 1), ("permitPrefix", 2), ("permitPrefixAndWellknownGroups", 3), ("permitPrefixAndAllGroups", 4), ("useGlobalDefaultFilter", 5))).clone('useGlobalDefaultFilter')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfIlmiAccessFilter.setStatus('current') ciscoAtmIfConfigAESA = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 35), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(7, 7), ValueSizeConstraint(20, 20), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfConfigAESA.setStatus('current') ciscoAtmIfDerivedAESA = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 36), AtmAddr()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfDerivedAESA.setStatus('current') ciscoAtmIfE164Address = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 37), AtmAddr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfE164Address.setStatus('current') ciscoAtmIfE164AutoConversionOnly = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 38), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfE164AutoConversionOnly.setStatus('current') ciscoAtmIfRxCellUpcViolations = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfRxCellUpcViolations.setStatus('current') ciscoAtmIfRxCellDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfRxCellDiscards.setStatus('current') ciscoAtmIfIlmiFSMState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 41), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("down", 1), ("restarting", 2), ("waitDevType", 3), ("deviceAndPortTypeComplete", 4), ("awaitPnniConfig", 5), ("pnniConfigComplete", 6), ("awaitRestartAck", 7), ("upAndNormal", 8)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfIlmiFSMState.setStatus('current') ciscoAtmIfIlmiUpDownChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfIlmiUpDownChanges.setStatus('current') ciscoAtmIfSscopFSMState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 43), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("idle", 1), ("outgoingConnectionPending", 2), ("incomingConnectionPending", 3), ("dataTransferReady", 4), ("outgoingDisconnectionPending", 5), ("outgoingResyncPending", 6), ("incomingResyncPending", 7), ("outgoingRecoveryPending", 8), ("incomingRecoveryPending", 9), ("concurrentResyncPending", 10)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfSscopFSMState.setStatus('current') ciscoAtmIfSscopUpDownChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ciscoAtmIfSscopUpDownChanges.setStatus('current') ciscoAtmIfSvcUpcIntentCbr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 45), UpcMethod().clone('passing')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSvcUpcIntentCbr.setStatus('current') ciscoAtmIfSvcUpcIntentVbrRt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 46), UpcMethod().clone('passing')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSvcUpcIntentVbrRt.setStatus('current') ciscoAtmIfSvcUpcIntentVbrNrt = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 47), UpcMethod().clone('passing')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSvcUpcIntentVbrNrt.setStatus('current') ciscoAtmIfSvcUpcIntentAbr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 48), UpcMethod().clone('passing')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSvcUpcIntentAbr.setStatus('current') ciscoAtmIfSvcUpcIntentUbr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 10, 14, 1, 1, 1, 49), UpcMethod().clone('passing')).setMaxAccess("readwrite") if mibBuilder.loadTexts: ciscoAtmIfSvcUpcIntentUbr.setStatus('current') ciscoAtmIfMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 14, 0)) ciscoAtmIfEvent = NotificationType((1, 3, 6, 1, 4, 1, 9, 10, 14, 0, 1)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiFSMState"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSscopFSMState")) if mibBuilder.loadTexts: ciscoAtmIfEvent.setStatus('current') ciscoAtmIfMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 14, 3)) ciscoAtmIfMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1)) ciscoAtmIfMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2)) ciscoAtmIfMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 1)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance = ciscoAtmIfMIBCompliance.setStatus('obsolete') ciscoAtmIfMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 2)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup2")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance2 = ciscoAtmIfMIBCompliance2.setStatus('obsolete') ciscoAtmIfMIBCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 3)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup2"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup3")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance3 = ciscoAtmIfMIBCompliance3.setStatus('obsolete') ciscoAtmIfMIBCompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 4)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup2"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup3"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup4")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance4 = ciscoAtmIfMIBCompliance4.setStatus('obsolete') ciscoAtmIfMIBCompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 5)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup2"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup3"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup4"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup5")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance5 = ciscoAtmIfMIBCompliance5.setStatus('obsolete') ciscoAtmIfMIBCompliance6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 6)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup2"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup4"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup5"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup6"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup7")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance6 = ciscoAtmIfMIBCompliance6.setStatus('obsolete') ciscoAtmIfMIBCompliance7 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 7)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup4"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup5"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup6"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup7"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup8")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance7 = ciscoAtmIfMIBCompliance7.setStatus('deprecated') ciscoAtmIfMIBCompliance8 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 1, 8)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup4"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup5"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup6"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup7"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup8"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup9"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfMIBGroup10"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfNotifyGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBCompliance8 = ciscoAtmIfMIBCompliance8.setStatus('current') ciscoAtmIfMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 1)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSide"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfUniType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfPVPs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfPVCs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfActiveSVPs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfActiveSVCs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfTotalConnections"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfConfVplIf"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfPortType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfXmitLed"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfRecvLed"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfXmitCells"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfRecvCells"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcMinVci"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiConfiguration"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiAddressRegistration"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiAutoConfiguration"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiKeepAlive"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSoftVcDestAddress"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfCdLed")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup = ciscoAtmIfMIBGroup.setStatus('deprecated') ciscoAtmIfMIBGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 2)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfUniSignallingVersion"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcUpcIntent")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup2 = ciscoAtmIfMIBGroup2.setStatus('deprecated') ciscoAtmIfMIBGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 3)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfAddressType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfAddress"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfWellKnownVcMode"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSignallingAdminStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup3 = ciscoAtmIfMIBGroup3.setStatus('obsolete') ciscoAtmIfMIBGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 4)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiAccessGlobalDefaultFilter"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiAccessFilter")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup4 = ciscoAtmIfMIBGroup4.setStatus('current') ciscoAtmIfMIBGroup5 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 5)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfConfigAESA"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfDerivedAESA"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfE164Address"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfE164AutoConversionOnly")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup5 = ciscoAtmIfMIBGroup5.setStatus('current') ciscoAtmIfMIBGroup6 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 6)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfWellKnownVcMode"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSignallingAdminStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup6 = ciscoAtmIfMIBGroup6.setStatus('current') ciscoAtmIfMIBGroup7 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 7)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfRxCellUpcViolations"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfRxCellDiscards"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiFSMState"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiUpDownChanges"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSscopFSMState"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSscopUpDownChanges")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup7 = ciscoAtmIfMIBGroup7.setStatus('current') ciscoAtmIfMIBGroup8 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 8)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfUniSignallingVersion"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcUpcIntentCbr"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcUpcIntentVbrRt"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcUpcIntentVbrNrt"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcUpcIntentAbr"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSvcUpcIntentUbr")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup8 = ciscoAtmIfMIBGroup8.setStatus('current') ciscoAtmIfMIBGroup9 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 9)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSide"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfUniType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfPVPs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfPVCs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfActiveSVPs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfActiveSVCs"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfTotalConnections"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfConfVplIf"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfPortType"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfXmitLed"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfRecvLed"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfXmitCells"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfRecvCells"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiConfiguration"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiAddressRegistration"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiAutoConfiguration"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfIlmiKeepAlive"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfSoftVcDestAddress"), ("CISCO-ATM-IF-MIB", "ciscoAtmIfCdLed")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup9 = ciscoAtmIfMIBGroup9.setStatus('current') ciscoAtmIfMIBGroup10 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 10)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfNotifsEnabled")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfMIBGroup10 = ciscoAtmIfMIBGroup10.setStatus('current') ciscoAtmIfNotifyGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 10, 14, 3, 2, 11)).setObjects(("CISCO-ATM-IF-MIB", "ciscoAtmIfEvent")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoAtmIfNotifyGroup = ciscoAtmIfNotifyGroup.setStatus('current') mibBuilder.exportSymbols("CISCO-ATM-IF-MIB", ciscoAtmIfMIBGroup10=ciscoAtmIfMIBGroup10, ciscoAtmIfIlmiAccessFilter=ciscoAtmIfIlmiAccessFilter, ciscoAtmIfMIBGroup2=ciscoAtmIfMIBGroup2, ciscoAtmIfType=ciscoAtmIfType, ciscoAtmIfMIBGroup8=ciscoAtmIfMIBGroup8, ciscoAtmIfAddressType=ciscoAtmIfAddressType, ciscoAtmIfXmitLed=ciscoAtmIfXmitLed, ciscoAtmIfMIBConformance=ciscoAtmIfMIBConformance, ciscoAtmIfEvent=ciscoAtmIfEvent, ciscoAtmIfActiveSVPs=ciscoAtmIfActiveSVPs, ciscoAtmIfMIBGroup7=ciscoAtmIfMIBGroup7, ciscoAtmIfSvcUpcIntentAbr=ciscoAtmIfSvcUpcIntentAbr, ciscoAtmIfPortType=ciscoAtmIfPortType, ciscoAtmIfMIBCompliance7=ciscoAtmIfMIBCompliance7, ciscoAtmIfSvcMinVci=ciscoAtmIfSvcMinVci, ciscoAtmIfSvcUpcIntentCbr=ciscoAtmIfSvcUpcIntentCbr, ciscoAtmIfPVCs=ciscoAtmIfPVCs, ciscoAtmIfWellKnownVcMode=ciscoAtmIfWellKnownVcMode, ciscoAtmIfMIBCompliances=ciscoAtmIfMIBCompliances, ciscoAtmIfMIBGroups=ciscoAtmIfMIBGroups, ciscoAtmIfActiveSVCs=ciscoAtmIfActiveSVCs, ciscoAtmIfEntry=ciscoAtmIfEntry, ciscoAtmIfIlmiAccessGlobalDefaultFilter=ciscoAtmIfIlmiAccessGlobalDefaultFilter, ciscoAtmIfRxCellUpcViolations=ciscoAtmIfRxCellUpcViolations, ciscoAtmIfConfigAESA=ciscoAtmIfConfigAESA, ciscoAtmIfSignallingAdminStatus=ciscoAtmIfSignallingAdminStatus, ciscoAtmIfMIBGroup3=ciscoAtmIfMIBGroup3, ciscoAtmIfTable=ciscoAtmIfTable, ciscoAtmIfE164Address=ciscoAtmIfE164Address, ciscoAtmIfMIBGroup4=ciscoAtmIfMIBGroup4, ciscoAtmIfIlmiAutoConfiguration=ciscoAtmIfIlmiAutoConfiguration, ciscoAtmIfMIBGroup9=ciscoAtmIfMIBGroup9, ciscoAtmIfMIBNotifications=ciscoAtmIfMIBNotifications, ciscoAtmIfNotifyGroup=ciscoAtmIfNotifyGroup, ciscoAtmIfMIBCompliance6=ciscoAtmIfMIBCompliance6, ciscoAtmIfRecvCells=ciscoAtmIfRecvCells, ciscoAtmIfRecvLed=ciscoAtmIfRecvLed, NsapAtmAddr=NsapAtmAddr, ciscoAtmIfMIBGroup6=ciscoAtmIfMIBGroup6, ciscoAtmIfSvcUpcIntentVbrRt=ciscoAtmIfSvcUpcIntentVbrRt, ciscoAtmIfUniType=ciscoAtmIfUniType, ciscoAtmIfTotalConnections=ciscoAtmIfTotalConnections, ciscoAtmIfPVPs=ciscoAtmIfPVPs, ciscoAtmIfSvcUpcIntent=ciscoAtmIfSvcUpcIntent, ciscoAtmIfMIBGroup=ciscoAtmIfMIBGroup, ciscoAtmIfSscopUpDownChanges=ciscoAtmIfSscopUpDownChanges, ciscoAtmIfNotifsEnabled=ciscoAtmIfNotifsEnabled, PYSNMP_MODULE_ID=ciscoAtmIfMIB, ciscoAtmIfSide=ciscoAtmIfSide, ciscoAtmIfIlmiUpDownChanges=ciscoAtmIfIlmiUpDownChanges, ciscoAtmIfMIBGroup5=ciscoAtmIfMIBGroup5, ciscoAtmIfIlmiFSMState=ciscoAtmIfIlmiFSMState, ciscoAtmIfMIBCompliance5=ciscoAtmIfMIBCompliance5, ciscoAtmIfConfVplIf=ciscoAtmIfConfVplIf, ciscoAtmIfRxCellDiscards=ciscoAtmIfRxCellDiscards, ciscoAtmIfAddress=ciscoAtmIfAddress, ciscoAtmIfMIBCompliance8=ciscoAtmIfMIBCompliance8, ciscoAtmIfMIB=ciscoAtmIfMIB, ciscoAtmIfIlmiAddressRegistration=ciscoAtmIfIlmiAddressRegistration, ciscoAtmIfMIBCompliance2=ciscoAtmIfMIBCompliance2, ciscoAtmIfCdLed=ciscoAtmIfCdLed, ciscoAtmIfSvcUpcIntentVbrNrt=ciscoAtmIfSvcUpcIntentVbrNrt, ciscoAtmIfMIBCompliance4=ciscoAtmIfMIBCompliance4, ciscoAtmIfDerivedAESA=ciscoAtmIfDerivedAESA, ciscoAtmIfIlmiKeepAlive=ciscoAtmIfIlmiKeepAlive, ciscoAtmIfMIBObjects=ciscoAtmIfMIBObjects, ciscoAtmIfSscopFSMState=ciscoAtmIfSscopFSMState, ciscoAtmIfIlmiConfiguration=ciscoAtmIfIlmiConfiguration, ciscoAtmIfUniSignallingVersion=ciscoAtmIfUniSignallingVersion, ciscoAtmIfMIBCompliance=ciscoAtmIfMIBCompliance, ciscoAtmIfSoftVcDestAddress=ciscoAtmIfSoftVcDestAddress, ciscoAtmIfSvcUpcIntentUbr=ciscoAtmIfSvcUpcIntentUbr, UpcMethod=UpcMethod, AtmAddr=AtmAddr, ciscoAtmIfE164AutoConversionOnly=ciscoAtmIfE164AutoConversionOnly, ciscoAtmIfXmitCells=ciscoAtmIfXmitCells, ciscoAtmIfMIBCompliance3=ciscoAtmIfMIBCompliance3)
DEBUG = False LANGUAGES = (("en", "English"),) LANGUAGE_CODE = "en" USE_TZ = False USE_I18N = True SECRET_KEY = "fake-key" PASSWORD_EXPIRE_SECONDS = 10 * 60 # 10 minutes PASSWORD_EXPIRE_WARN_SECONDS = 5 * 60 # 5 minutes INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "django.contrib.messages", "password_expire", ] MIDDLEWARE = ( "django.middleware.common.CommonMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "password_expire.middleware.PasswordExpireMiddleware", "django.contrib.messages.middleware.MessageMiddleware", ) DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", "TEST_NAME": ":memory:", "USER": "", "PASSWORD": "", "PORT": "", }, }
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. """ Shell-based scheduler which records process name and user id. """ FIELDS = "name", "user" def fetch(ids): "Generate process names and user ids." for id in ids: yield dict(zip(FIELDS, id.rsplit(".", 1)))
# @Title: 回文链表 (Palindrome Linked List) # @Author: 18015528893 # @Date: 2021-02-12 21:29:36 # @Runtime: 76 ms # @Memory: 24.8 MB # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def isPalindrome(self, head: ListNode) -> bool: if head is None or head.next is None: return True s = f = head while f and f.next: f = f.next.next s = s.next if f is not None: s = s.next def reverse(head): pre = None cur = head while cur: tmp = cur.next cur.next = pre pre = cur cur = tmp return pre right = reverse(s) left = head while right: if right.val != left.val: return False right = right.next left = left.next return True
def test_image_name(add_product_with_image, find_product_image): print(type(find_product_image)) print(find_product_image) assert 'macbook_pro' in find_product_image
# yahoo.py # Trevor Pottinger # Fri Oct 18 22:57:23 PDT 2019 class Yahoo(object): @classmethod async def gen_s_and_p_history() -> None: url = 'https://finance.yahoo.com/quote/%5EGSPC/history?period1=1413529200&period2=1571295600&interval=1d&filter=history&frequency=1d'
# https://leetcode.com/problems/decode-string/ # Given an encoded string, return it's decoded string. # # The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a positive integer. # # You may assume that the input string is always valid; No extra white spaces, square brackets are well-formed, etc. # # Furthermore, you may assume that the original data does not contain any digits and that digits are only for those repeat numbers, k. For example, there won't be input like 3a or 2[4]. class Solution(object): def rle_decoding(self, strs): res_list, cnt_list, res_str, cnt, i = [], [], '', 0, 0 while i < len(strs): if strs[i].isdigit(): cnt=cnt*10+int(strs[i]) i += 1 continue else: j = i while j < len(strs) and not strs[j].isdigit(): j += 1 res_list.append(strs[i:j]) cnt_list.append(cnt) cnt = 0 i = j for k in range(len(res_list)): res_str += res_list[k] * cnt_list[k] return res_str #https://discuss.leetcode.com/topic/57212/python-rle-solution-for-encoding-problem/2 def decodeString(self, strs): stck = [] for i in range(len(strs)): if strs[i] == ']': tstr = [] while stck and stck[-1] != '[': tstr.insert(0,stck.pop()) if stck: # pop out the '[' stck.pop() # add the number while stck and stck[-1].isdigit(): tstr.insert(0,stck.pop()) # add to result stck.append(self.rle_decoding(''.join(tstr))) else: stck.append(strs[i]) return ''.join(stck) if stck else ''
# OOBE Stages OOBE_ASK_PHONE_TYPE = 0 OOBE_DOWNLOAD_MESSAGE = 1 OOBE_WAITING_ON_PHONE_TO_ENTER_CODE = 2 OOBE_WAITING_ON_PHONE_TO_ACCEPT_PAIRING = 3 OOBE_PAIRING_SUCCESS = 4 OOBE_CHECKING_FOR_UPDATE = 5 OOBE_STARTING_UPDATE = 6 OOBE_UPDATE_COMPLETE = 7 OOBE_WAITING_ON_PHONE_TO_COMPLETE_OOBE = 8 OOBE_PRESS_ACTION_BUTTON = 9 OOBE_ERROR_STATE = 10 OOBE_PAIR_MESSAGE = 11 OOBE_PRE_STATE_CHARGING = 100 OOBE_PRE_STATE_LANGUAGE_SELECT = 101
''' - Leetcode problem: 22 - Difficulty: Medium - Brief problem description: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ "((()))", "(()())", "(())()", "()(())", "()()()" ] - Solution Summary: Use backtrack to solve the problem. - Used Resources: --- Bo Zhou ''' class Solution: def backTrack(self, combined, left, right, n, result): if len(combined) == 2 * n: result.append(combined) return if left < n: combined += '(' self.backTrack(combined, left + 1, right, n, result) combined = combined[:-1] if left > right: combined += ')' self.backTrack(combined, left, right + 1, n, result) def generateParenthesis(self, n: int): result = [] if (n > 0): self.backTrack('', 0, 0, n, result) return result if __name__ == "__main__": solution = Solution() print(solution.generateParenthesis(3))
""" Interface for swappable strategies used for dealing with transactions in QueryManager Based on the strategy pattern https://en.wikipedia.org/wiki/Strategy_patter """ class QueryManagerStrategy(object): def account_balances_for_dates(self, company_id, account_ids, dates, with_counterparties, excl_interco, excl_contra, with_tags, excl_tags): """ :param company_id: the company id e.g. 'INC' :param account_ids: a list of account ids e.g. [ '3001', '3010' ] :param dates: dictionary of date ranges e.g. { '2015': { 'start': '2015-01-01', 'end': '2015-12-31' } } :param with_counterparties: list containing transaction counterparties that should be used to calculate the balance e.g. [ 'jpmc' ] :param excl_interco: boolean indicating intercompany (e.g. 'INC' transaction with 'LLC' contra) transactions should be excluded if INC and LLC both subs of same company. e.g. True :param excl_contra: a list of contra account ids to be excluded e.g. [ '3001' ] :param with_tags a list of tags for which to find GL entries e.g. ['yearend'] :param excl_tags a list of tags for which to exclude GL entries e.g. ['yearend'] :return: a dictionary of account balances, indexed by date e.g. { '2015': { '3001': '1503.23', '3010': '1626.23' } } """ raise Exception('Unimplemented: account_balances_for_dates') def transactions(self, company_id, account_ids, from_date, to_date, chunk_frequency, with_counterparties, excl_interco, excl_contra): """ :param company_id: the company id e.g. 'INC' :param account_ids: a list of account ids e.g. [ '3001', '7020' ] :param from_date: get transactions starting on this date e.g. '2015-01-01' :param to_date: get transactions up to and including this date e.g. '2015-01-31' :param chunk_frequency: when to break spanning transactions (e.g. depreciation) e.g. 'end-of-month' :param with_counterparties: list for filtering transaction list by a specific counterparty e.g. [ 'jpmc' ] :param excl_interco: boolean indicating intercompany (e.g. 'INC' transaction with 'LLC' contra) transactions should be excluded if INC and LLC both subs of same company. :param excl_contra: a list of contra account ids to be excluded e.g. [ '3001' ] :return: a list of transactions e.g. [ { date: Date(2015-01-05), id: '270076', comment: '8661368: Egnyte', account_id: '7020', contra_accts: '3000', counterparty: 'egnyte', amount: 90.00 }, { ... }, ... ] """ raise Exception('Unimplemented: transactions') def upsert_transaction(self, transaction): """ :param transaction: the transaction object to update/create. e.g. [{ 'id': 12345, 'company': 'INC', 'comment': 'TEST TEST TEST', 'date': '2015-05-15', 'date_end': '2015-05-16', 'object_id': 1234, 'lines': [ { 'account': '1002', 'amount': '-10.00', 'counterparty': '(courier)' }, { 'account': '1001', 'amount': '10.00', 'counterparty': '(courier)' } ] }] :return: None """ pass def delete_transaction(self, company_id, transaction_id): """ :param transaction_id: a string identifying the transaction to delete :return: None """ pass def create_gl_transactions(self, d2, lines, trans_id, bmo_id): """ :param :return: None """ pass def delete_bmo_transactions(self, company_id, bmo_id): """ :param bmo_id: a string identifying the BMO for which to delete transactions :return: None """ pass def erase(self, company_id): """ :param company_id: the company id e.g. 'INC' :return: None """ pass def set_fast_inserts(self, company_id, value): """ :param company_id: the company id e.g. 'INC' :param value: Boolean :return: """ pass def take_snapshot(self, company_id): """ :param company_id: the company id e.g. 'INC' :return: """ pass
""" Placeholders for missing VQ dependencies. """ C_INI_MEDIA_C_CODECS = None dictc01bit = {} v1_quant = None v2_quant = None v_codecs = None v_bits_sample = None def encode_vq(*args, **kwargs): return None def get_codebook_from_serial(*args, **kwargs): return None def get_vq_decoded_samples(*args, **kwargs): return None def get_group_of_serialized_codebooks_noencoding(*args, **kwargs): return None
class Solution: def isPerfectSquare(self, num: int) -> bool: left, right = 0, num while left <= right: mid = left + (right - left) // 2 if mid * mid == num: return True elif mid * mid > num: right = mid - 1 else: left = mid + 1 return False if __name__ == '__main__': num = int(input("Input: ")) print(f"Output: {Solution().isPerfectSquare(num)}")
# 1-2_find_num.py def solution(input_str): # - # - # - # - # - # - # - # - # - # - # - # - # - # - # # Write your code here. answer = "" for i in range(10): if str(i) in input_str: pass else: answer = str(i) break return answer # - # - # - # - # - # - # - # - # - # - # - # - # - # - # input_str1 = "012345678" input_str2 = "483750219" input_str3 = "242810485760109726496" print(solution(input_str1)+", "+solution(input_str2)+", "+solution(input_str3))
"""Library of helper classes of optimizer.""" class GradientsClipOption: """Gradients clip option for optimizer class. Attributes: clipnorm: float. If set, the gradient of each weight is individually clipped so that its norm is no higher than this value. clipvalue: float. If set, the gradient of each weight is clipped to be no higher than this value. global_clipnorm: float. If set, the gradient of all weights is clipped so that their global norm is no higher than this value. """ def __init__(self, clipnorm=None, clipvalue=None, global_clipnorm=None): if clipnorm is not None and global_clipnorm is not None: raise ValueError(f"At most one of `clipnorm` and `global_clipnorm` can " f"be set. Received: clipnorm={clipnorm}, " f"global_clipnorm={global_clipnorm}.") if clipnorm and clipnorm <= 0: raise ValueError("Clipnorm should be a positive number, but received " f"clipnorm={clipnorm}.") if global_clipnorm and global_clipnorm <= 0: raise ValueError("global_clipnorm should be a positive number, but " f"received global_clipnorm={global_clipnorm}.") if clipvalue and clipvalue <= 0: raise ValueError("clipvalue should be a positive number, but received " f"clipvalue={clipvalue}.") self.clipnorm = clipnorm self.global_clipnorm = global_clipnorm self.clipvalue = clipvalue def get_config(self): return { "clipnorm": self.clipnorm, "global_clipnorm": self.global_clipnorm, "clipvalue": self.clipvalue, } class EMAOption: # TODO(b/207532340): Add examples on how to use this EMAOption. """EMA option for optimizer class. Attributes: use_ema: boolean, default to False. If True, exponential moving average (EMA) is applied. EMA consists of computing an exponential moving average of the weights of the model (as the weight values change after each training batch), and periodically overwriting the weights with their moving average. ema_momentum: float, default to 0.99. Only used if `use_ema=True`. This is the momentum to use when computing the EMA of the model's weights: `new_average = ema_momentum * old_average + (1 - ema_momentum) * current_variable_value`. ema_overwrite_frequency: int or None, default to 100. Only used if `use_ema=True`. Every `ema_overwrite_frequency` steps of iterations, we overwrite the model variable by its stored moving average. If None, we do not overwrite model variables in the middle of training, and users need to explicitly overwrite the model variable by calling `finalize_variable_update()`. """ def __init__(self, use_ema=False, ema_momentum=0.99, ema_overwrite_frequency=100): self.use_ema = use_ema if use_ema: # Verify the arguments related to EMA. if ema_momentum > 1 or ema_momentum < 0: raise ValueError("`ema_momentum` must be in the range [0, 1]. " f"Received: ema_momentum={ema_momentum}") if ema_overwrite_frequency and not isinstance( ema_overwrite_frequency, int) or ema_overwrite_frequency < 1: raise ValueError( "`ema_overwrite_frequency` must be an integer > 1 or None. " f"Received: ema_overwrite_frequency={ema_overwrite_frequency}") self.ema_momentum = ema_momentum self.ema_overwrite_frequency = ema_overwrite_frequency def get_config(self): return { "use_ema": self.use_ema, "ema_momentum": self.ema_momentum, "ema_overwrite_frequency": self.ema_overwrite_frequency, }
# Total cheltuieli # De la tastatură se citește numele unui fișier. Acel fișier conține un text în care sunt specificate cheltuielile # efectuate de Ana într-o zi. Scrieți un program care să afișeze suma totală cheltuită de Ana în ziua respectivă. def isnumber(x): if x.isdecimal(): return True x = x.split(".") if len(x) == 2 and x[0].isdecimal() and x[1].isdecimal(): return True return False fhandle = open("cheltuieli.txt", "r") txt = fhandle.read() fhandle.close() words = txt.split() tmp = 0 total = 0 for wrd in words: if isnumber(wrd): if tmp == 0: tmp = float(wrd) else: total += tmp * float(wrd) tmp = 0 print(total)
"""Roaring Years.""" def reader(): return int(input()) def check_n(Y, n): if len(Y) == n: return True A = Y[-n:] Y = Y[:-n] if A[0] == "0": return False A = int(A) if len(str(A - 1)) != n: n -= 1 if len(Y) < n: return False B = int(Y[-n:]) if B == A - 1: return check_n(Y, n) return False def check(Y): Y = str(Y) N = len(Y) for n in range(int((N + 1) / 2), 0, -1): if check_n(Y, n): return True return False def solver(Y): Y += 1 if Y < 10: Y = 12 while True: if check(Y): return Y Y += 1 T = int(input()) for t in range(1, T + 1): print("Case #{}: {}".format(t, solver(reader())))
class Person: def __init__(self, name, race): self.name = name self.race = race self.stamina = 100 self.agility = 100 self.strenght = 100 self.health = 100 self.intellegence = 100 self.level = 1 self.armor = 20 self.speed = 20 self.damage = 40 self.expirience = 0 def lvlup(self, exp): exp_list = [20, 30, 40, 100, 500, 1000] i = 0 for i in range(len(exp_list)): i = self.level - 1 if exp_list[i] <= exp: print(exp) exp -= exp_list[i] self.level += 1 self.stamina += 13 self.agility += 13 self.strenght += 13 self.intellegence += 13 self.expirience = exp def equip(self, item): items_list = ['sword', 'boots', 'heavy_armor', 'light_armor', 'bow', 'staff', 'potion'] if item == 'sword': self.damage += 50 self.strenght += 40 elif item == 'boots': self.speed += 10 elif item == 'heavy_armor': self.armor += 50 self.stamina -= 50 self.speed -= 20 self.health += 500 self.strenght += 50 elif item == 'light_armor': self.armor += 10 self.stamina += 50 self.health += 200 self.strenght += 20 self.agility += 10 elif item == 'bow': self.agility += 40 self.damage += 50 elif item == 'staff': self.intellegence += 100 self.health += 70 elif item == 'potion': self.stamina += 2 self.agility += 2 self.strenght += 2 self.health += 2 self.intellegence += 2 self.armor += 2 self.speed += 2 self.damage += 2 person1 = Person(name='Garosh', race='Ork') person1.lvlup(2000) person1.check_exp() print(person1.expirience) print(person1.name, person1.race, person1.speed, person1.level, person1.agility,person1.strenght,person1.stamina,person1.damage, person1.health,person1.intellegence,person1.armor ) person1.equip('potion')
# -*- coding: utf-8 -*- """ Created on Sun Oct 18 15:53:10 2020 Error Handling @author: Ashish """ try: number = float(input("Enter a number: ")) print("The number is: ", number) except: print("Invalid number")