content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# This sample tests a series of nested loops containing variables # with significant dependencies. for val1 in range(10): cnt1 = 4 for val2 in range(10 - val1): cnt2 = 4 if val2 == val1: cnt2 -= 1 for val3 in range(10 - val1 - val2): cnt3 = 4 if val3 == val1: cnt3 -= 1 if val3 == val2: cnt3 -= 1 for val4 in range(10 - val1 - val2 - val3): cnt4 = 4 if val4 == val1: cnt4 -= 1 if val4 == val2: cnt4 -= 1 if val4 == val3: cnt4 -= 1 for val5 in range(10 - val1 - val2 - val3 - val4): cnt5 = 4 if val5 == val1: cnt5 -= 1 if val5 == val2: cnt5 -= 1 if val5 == val3: cnt5 -= 1 if val5 == val4: cnt5 -= 1 val6 = 10 - val1 - val2 - val3 - val4 - val5 cnt6 = 4 if val6 == val1: cnt6 -= 1 if val6 == val2: cnt6 -= 1 if val6 == val3: cnt6 -= 1 if val6 == val4: cnt6 -= 1 if val6 == val5: cnt6 -= 1
for val1 in range(10): cnt1 = 4 for val2 in range(10 - val1): cnt2 = 4 if val2 == val1: cnt2 -= 1 for val3 in range(10 - val1 - val2): cnt3 = 4 if val3 == val1: cnt3 -= 1 if val3 == val2: cnt3 -= 1 for val4 in range(10 - val1 - val2 - val3): cnt4 = 4 if val4 == val1: cnt4 -= 1 if val4 == val2: cnt4 -= 1 if val4 == val3: cnt4 -= 1 for val5 in range(10 - val1 - val2 - val3 - val4): cnt5 = 4 if val5 == val1: cnt5 -= 1 if val5 == val2: cnt5 -= 1 if val5 == val3: cnt5 -= 1 if val5 == val4: cnt5 -= 1 val6 = 10 - val1 - val2 - val3 - val4 - val5 cnt6 = 4 if val6 == val1: cnt6 -= 1 if val6 == val2: cnt6 -= 1 if val6 == val3: cnt6 -= 1 if val6 == val4: cnt6 -= 1 if val6 == val5: cnt6 -= 1
# https://app.codesignal.com/arcade/intro/level-2/bq2XnSr5kbHqpHGJC def makeArrayConsecutive2(statues): statues = sorted(statues) res = 0 # Make elements of the array be consecutive. If there's a # gap between two statues heights', then figure out how # many extra statues have to be added so that all resulting # statues increase in size by 1 unit. for i in range(1, len(statues)): res += statues[i] - statues[i-1] - 1 return res
def make_array_consecutive2(statues): statues = sorted(statues) res = 0 for i in range(1, len(statues)): res += statues[i] - statues[i - 1] - 1 return res
# https://leetcode.com/problems/count-of-matches-in-tournament/ """ Problem Description You are given an integer n, the number of teams in a tournament that has strange rules: If the current number of teams is even, each team gets paired with another team. A total of n / 2 matches are played, and n / 2 teams advance to the next round. If the current number of teams is odd, one team randomly advances in the tournament, and the rest gets paired. A total of (n - 1) / 2 matches are played, and (n - 1) / 2 + 1 teams advance to the next round. Return the number of matches played in the tournament until a winner is decided. """ class Solution: def numberOfMatches(self, n: int) -> int: count=0 while(n!=1): if(n%2==0): n = n//2 count+=n else: n-=1 n = n//2 count+=n n+=1 return count
""" Problem Description You are given an integer n, the number of teams in a tournament that has strange rules: If the current number of teams is even, each team gets paired with another team. A total of n / 2 matches are played, and n / 2 teams advance to the next round. If the current number of teams is odd, one team randomly advances in the tournament, and the rest gets paired. A total of (n - 1) / 2 matches are played, and (n - 1) / 2 + 1 teams advance to the next round. Return the number of matches played in the tournament until a winner is decided. """ class Solution: def number_of_matches(self, n: int) -> int: count = 0 while n != 1: if n % 2 == 0: n = n // 2 count += n else: n -= 1 n = n // 2 count += n n += 1 return count
subdomain = 'srcc' api_version = 'v1' callback_url = 'http://localhost:4567/'
subdomain = 'srcc' api_version = 'v1' callback_url = 'http://localhost:4567/'
# Take the values C = int(input()) A = int(input()) # calculate student trips quociente = A // (C - 1) # how many students are letf resto = A % (C - 1) # if there is a student left, you have +1 trip if resto > 0: quociente += 1 # Shows the value print(quociente)
c = int(input()) a = int(input()) quociente = A // (C - 1) resto = A % (C - 1) if resto > 0: quociente += 1 print(quociente)
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ######################################################################### class BaseCatalogueBackend(object): """Catalogue abstract base class""" def remove_record(self, uuid): """Remove record from the catalogue""" raise NotImplementedError() def create_record(self, item): """Create record in the catalogue""" raise NotImplementedError() def get_record(self, uuid): """Get record from the catalogue""" raise NotImplementedError() def search_records(self, keywords, start, limit, bbox): """Search for records from the catalogue""" raise NotImplementedError()
class Basecataloguebackend(object): """Catalogue abstract base class""" def remove_record(self, uuid): """Remove record from the catalogue""" raise not_implemented_error() def create_record(self, item): """Create record in the catalogue""" raise not_implemented_error() def get_record(self, uuid): """Get record from the catalogue""" raise not_implemented_error() def search_records(self, keywords, start, limit, bbox): """Search for records from the catalogue""" raise not_implemented_error()
class BaseCreation(object): """ This class encapsulates all backend-specific differences that pertain to database *creation*, such as the column types to use for particular Django Fields. """ pass
class Basecreation(object): """ This class encapsulates all backend-specific differences that pertain to database *creation*, such as the column types to use for particular Django Fields. """ pass
class TechnicalSpecs(object): def __init__(self): self.__negative_format = None self.__cinematographic_process = None self.__link = None @property def negative_format(self): return self.__negative_format @negative_format.setter def negative_format(self, negative_format): self.__negative_format = negative_format @property def cinematographic_process(self): return self.__cinematographic_process @cinematographic_process.setter def cinematographic_process(self, cinematographic_process): self.__cinematographic_process = cinematographic_process @property def link(self): return self.__link @link.setter def link (self, link): self.__link = link def __str__(self): return "{Negative format: " + str(self.negative_format) + ", Cinematographic process: " + str( self.cinematographic_process) + "}"
class Technicalspecs(object): def __init__(self): self.__negative_format = None self.__cinematographic_process = None self.__link = None @property def negative_format(self): return self.__negative_format @negative_format.setter def negative_format(self, negative_format): self.__negative_format = negative_format @property def cinematographic_process(self): return self.__cinematographic_process @cinematographic_process.setter def cinematographic_process(self, cinematographic_process): self.__cinematographic_process = cinematographic_process @property def link(self): return self.__link @link.setter def link(self, link): self.__link = link def __str__(self): return '{Negative format: ' + str(self.negative_format) + ', Cinematographic process: ' + str(self.cinematographic_process) + '}'
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 load("//bazel_tools:versions.bzl", "version_to_name") def _build_dar( name, package_name, srcs, data_dependencies, sdk_version): daml = "@daml-sdk-{sdk_version}//:daml".format( sdk_version = sdk_version, ) native.genrule( name = name, srcs = srcs + data_dependencies, outs = ["%s.dar" % name], tools = [daml], cmd = """\ set -euo pipefail TMP_DIR=$$(mktemp -d) cleanup() {{ rm -rf $$TMP_DIR; }} trap cleanup EXIT mkdir -p $$TMP_DIR/src $$TMP_DIR/dep for src in {srcs}; do cp -L $$src $$TMP_DIR/src done DATA_DEPS= for dep in {data_dependencies}; do cp -L $$dep $$TMP_DIR/dep DATA_DEPS="$$DATA_DEPS\n - dep/$$(basename $$dep)" done cat <<EOF >$$TMP_DIR/daml.yaml sdk-version: {sdk_version} name: {name} source: src version: 0.0.1 dependencies: - daml-prim - daml-script data-dependencies:$$DATA_DEPS EOF $(location {daml}) build --project-root=$$TMP_DIR -o $$PWD/$(OUTS) """.format( daml = daml, name = package_name, data_dependencies = " ".join([ "$(location %s)" % dep for dep in data_dependencies ]), sdk_version = sdk_version, srcs = " ".join([ "$(locations %s)" % src for src in srcs ]), ), ) def data_dependencies_coins(sdk_version): """Build the coin1 and coin2 packages with the given SDK version. """ _build_dar( name = "data-dependencies-coin1-{sdk_version}".format( sdk_version = sdk_version, ), package_name = "data-dependencies-coin1", srcs = ["//bazel_tools/data_dependencies:example/CoinV1.daml"], data_dependencies = [], sdk_version = sdk_version, ) _build_dar( name = "data-dependencies-coin2-{sdk_version}".format( sdk_version = sdk_version, ), package_name = "data-dependencies-coin2", srcs = ["//bazel_tools/data_dependencies:example/CoinV2.daml"], data_dependencies = [], sdk_version = sdk_version, ) def data_dependencies_upgrade_test(old_sdk_version, new_sdk_version): """Build and validate the coin-upgrade package using the new SDK version. The package will have data-dependencies on the coin1 and coin2 package built with the old SDK version. """ daml_new = "@daml-sdk-{sdk_version}//:daml".format( sdk_version = new_sdk_version, ) dar_name = "data-dependencies-upgrade-old-{old_sdk_version}-new-{new_sdk_version}".format( old_sdk_version = old_sdk_version, new_sdk_version = new_sdk_version, ) _build_dar( name = dar_name, package_name = "data-dependencies-upgrade", srcs = ["//bazel_tools/data_dependencies:example/UpgradeFromCoinV1.daml"], data_dependencies = [ "data-dependencies-coin1-{sdk_version}".format( sdk_version = old_sdk_version, ), "data-dependencies-coin2-{sdk_version}".format( sdk_version = old_sdk_version, ), ], sdk_version = new_sdk_version, ) native.sh_test( name = "data-dependencies-test-old-{old_sdk_version}-new-{new_sdk_version}".format( old_sdk_version = old_sdk_version, new_sdk_version = new_sdk_version, ), srcs = ["//bazel_tools/data_dependencies:validate_dar.sh"], args = [ "$(rootpath %s)" % daml_new, "$(rootpath %s)" % dar_name, ], data = [daml_new, dar_name], deps = ["@bazel_tools//tools/bash/runfiles"], )
load('//bazel_tools:versions.bzl', 'version_to_name') def _build_dar(name, package_name, srcs, data_dependencies, sdk_version): daml = '@daml-sdk-{sdk_version}//:daml'.format(sdk_version=sdk_version) native.genrule(name=name, srcs=srcs + data_dependencies, outs=['%s.dar' % name], tools=[daml], cmd='set -euo pipefail\nTMP_DIR=$$(mktemp -d)\ncleanup() {{ rm -rf $$TMP_DIR; }}\ntrap cleanup EXIT\nmkdir -p $$TMP_DIR/src $$TMP_DIR/dep\nfor src in {srcs}; do\n cp -L $$src $$TMP_DIR/src\ndone\nDATA_DEPS=\nfor dep in {data_dependencies}; do\n cp -L $$dep $$TMP_DIR/dep\n DATA_DEPS="$$DATA_DEPS\n - dep/$$(basename $$dep)"\ndone\ncat <<EOF >$$TMP_DIR/daml.yaml\nsdk-version: {sdk_version}\nname: {name}\nsource: src\nversion: 0.0.1\ndependencies:\n - daml-prim\n - daml-script\ndata-dependencies:$$DATA_DEPS\nEOF\n$(location {daml}) build --project-root=$$TMP_DIR -o $$PWD/$(OUTS)\n'.format(daml=daml, name=package_name, data_dependencies=' '.join(['$(location %s)' % dep for dep in data_dependencies]), sdk_version=sdk_version, srcs=' '.join(['$(locations %s)' % src for src in srcs]))) def data_dependencies_coins(sdk_version): """Build the coin1 and coin2 packages with the given SDK version. """ _build_dar(name='data-dependencies-coin1-{sdk_version}'.format(sdk_version=sdk_version), package_name='data-dependencies-coin1', srcs=['//bazel_tools/data_dependencies:example/CoinV1.daml'], data_dependencies=[], sdk_version=sdk_version) _build_dar(name='data-dependencies-coin2-{sdk_version}'.format(sdk_version=sdk_version), package_name='data-dependencies-coin2', srcs=['//bazel_tools/data_dependencies:example/CoinV2.daml'], data_dependencies=[], sdk_version=sdk_version) def data_dependencies_upgrade_test(old_sdk_version, new_sdk_version): """Build and validate the coin-upgrade package using the new SDK version. The package will have data-dependencies on the coin1 and coin2 package built with the old SDK version. """ daml_new = '@daml-sdk-{sdk_version}//:daml'.format(sdk_version=new_sdk_version) dar_name = 'data-dependencies-upgrade-old-{old_sdk_version}-new-{new_sdk_version}'.format(old_sdk_version=old_sdk_version, new_sdk_version=new_sdk_version) _build_dar(name=dar_name, package_name='data-dependencies-upgrade', srcs=['//bazel_tools/data_dependencies:example/UpgradeFromCoinV1.daml'], data_dependencies=['data-dependencies-coin1-{sdk_version}'.format(sdk_version=old_sdk_version), 'data-dependencies-coin2-{sdk_version}'.format(sdk_version=old_sdk_version)], sdk_version=new_sdk_version) native.sh_test(name='data-dependencies-test-old-{old_sdk_version}-new-{new_sdk_version}'.format(old_sdk_version=old_sdk_version, new_sdk_version=new_sdk_version), srcs=['//bazel_tools/data_dependencies:validate_dar.sh'], args=['$(rootpath %s)' % daml_new, '$(rootpath %s)' % dar_name], data=[daml_new, dar_name], deps=['@bazel_tools//tools/bash/runfiles'])
# package marker. __version__ = "1.1b3" __date__ = "Nov 23, 2017"
__version__ = '1.1b3' __date__ = 'Nov 23, 2017'
S=list(input()) S.reverse() N=len(S) R=[0]*N R10=[0]*N m=2019 K=0 R10[0]=1 R[0]=int(S[0])%m for i in range(1,N): R10[i]=(R10[i-1]*10)%m R[i]=(R[i-1]+int(S[i])*R10[i])%m d={} for i in range(2019): d[i]=0 for i in range(N): d[R[i]]+=1 ans=0 for i in range(2019): if i == 0: ans += d[i] ans +=d[i]*(d[i]-1)//2 else: ans +=d[i]*(d[i]-1)//2 print(ans)
s = list(input()) S.reverse() n = len(S) r = [0] * N r10 = [0] * N m = 2019 k = 0 R10[0] = 1 R[0] = int(S[0]) % m for i in range(1, N): R10[i] = R10[i - 1] * 10 % m R[i] = (R[i - 1] + int(S[i]) * R10[i]) % m d = {} for i in range(2019): d[i] = 0 for i in range(N): d[R[i]] += 1 ans = 0 for i in range(2019): if i == 0: ans += d[i] ans += d[i] * (d[i] - 1) // 2 else: ans += d[i] * (d[i] - 1) // 2 print(ans)
# -*- coding: utf-8 -*- # Scrapy settings for dingdian project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html # http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html BOT_NAME = 'dingdian' SPIDER_MODULES = ['dingdian.spiders'] NEWSPIDER_MODULE = 'dingdian.spiders' # Crawl responsibly by identifying yourself (and your website) on the user-agent #USER_AGENT = 'dingdian (+http://www.yourdomain.com)' # Obey robots.txt rules ROBOTSTXT_OBEY = True # Configure maximum concurrent requests performed by Scrapy (default: 16) #CONCURRENT_REQUESTS = 32 # Configure a delay for requests for the same website (default: 0) # See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay # See also autothrottle settings and docs #DOWNLOAD_DELAY = 3 # The download delay setting will honor only one of: #CONCURRENT_REQUESTS_PER_DOMAIN = 16 #CONCURRENT_REQUESTS_PER_IP = 16 # Disable cookies (enabled by default) #COOKIES_ENABLED = False # Disable Telnet Console (enabled by default) #TELNETCONSOLE_ENABLED = False # Override the default request headers: #DEFAULT_REQUEST_HEADERS = { # 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', # 'Accept-Language': 'en', #} # Enable or disable spider middlewares # See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html #SPIDER_MIDDLEWARES = { # 'dingdian.middlewares.DingdianSpiderMiddleware': 543, #} # Enable or disable downloader middlewares # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html #DOWNLOADER_MIDDLEWARES = { # 'dingdian.middlewares.MyCustomDownloaderMiddleware': 543, #} # Enable or disable extensions # See http://scrapy.readthedocs.org/en/latest/topics/extensions.html #EXTENSIONS = { # 'scrapy.extensions.telnet.TelnetConsole': None, #} # Configure item pipelines # See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html ITEM_PIPELINES = { 'dingdian.mysqlpipelines.pipelines.DingdianPipeline': 1, } # Enable and configure the AutoThrottle extension (disabled by default) # See http://doc.scrapy.org/en/latest/topics/autothrottle.html #AUTOTHROTTLE_ENABLED = True # The initial download delay #AUTOTHROTTLE_START_DELAY = 5 # The maximum download delay to be set in case of high latencies #AUTOTHROTTLE_MAX_DELAY = 60 # The average number of requests Scrapy should be sending in parallel to # each remote server #AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0 # Enable showing throttling stats for every response received: #AUTOTHROTTLE_DEBUG = False # Enable and configure HTTP caching (disabled by default) # See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings HTTPCACHE_ENABLED = True HTTPCACHE_EXPIRATION_SECS = 0 HTTPCACHE_DIR = 'httpcache' HTTPCACHE_IGNORE_HTTP_CODES = [] HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage' MYSQL_HOSTS = '127.0.0.1' MYSQL_USER = 'jesse' MYSQL_PASSWORD = 'dqzgfjsxzjf' MYSQL_PORT = '3306' MYSQL_DB = 'dingdian' create_table_name = """ DROP TABLE IF EXISTS `dd_name`; CREATE TABLE `dd_name` ( `id` int(11) NOT NULL AUTO_INCREMENT, `xs_name` varchar(255) DEFAULT NULL, `xs_author` varchar(255) DEFAULT NULL, `category` varchar(255) DEFAULT NULL, `name_id` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4; """ create_table_content = """ DROP TABLE IF EXISTS `dd_chaptername`; CREATE TABLE `dd_chaptername` ( `id` int(11) NOT NULL AUTO_INCREMENT, `xs_chaptername` varchar(255) DEFAULT NULL, `xs_content` text, `id_name` int(11) DEFAULT NULL, `num_id` int(11) DEFAULT NULL, `url` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2726 DEFAULT CHARSET=gb18030; SET FOREIGN_KEY_CHECKS=1; """
bot_name = 'dingdian' spider_modules = ['dingdian.spiders'] newspider_module = 'dingdian.spiders' robotstxt_obey = True item_pipelines = {'dingdian.mysqlpipelines.pipelines.DingdianPipeline': 1} httpcache_enabled = True httpcache_expiration_secs = 0 httpcache_dir = 'httpcache' httpcache_ignore_http_codes = [] httpcache_storage = 'scrapy.extensions.httpcache.FilesystemCacheStorage' mysql_hosts = '127.0.0.1' mysql_user = 'jesse' mysql_password = 'dqzgfjsxzjf' mysql_port = '3306' mysql_db = 'dingdian' create_table_name = '\nDROP TABLE IF EXISTS `dd_name`;\nCREATE TABLE `dd_name` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `xs_name` varchar(255) DEFAULT NULL,\n `xs_author` varchar(255) DEFAULT NULL,\n `category` varchar(255) DEFAULT NULL,\n `name_id` varchar(255) DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4;\n' create_table_content = '\nDROP TABLE IF EXISTS `dd_chaptername`;\nCREATE TABLE `dd_chaptername` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `xs_chaptername` varchar(255) DEFAULT NULL,\n `xs_content` text,\n `id_name` int(11) DEFAULT NULL,\n `num_id` int(11) DEFAULT NULL,\n `url` varchar(255) DEFAULT NULL,\n PRIMARY KEY (`id`)\n)\nENGINE=InnoDB AUTO_INCREMENT=2726 DEFAULT CHARSET=gb18030;\nSET FOREIGN_KEY_CHECKS=1;\n'
class Solution(object): def maxProduct(self, nums): """ :type nums: List[int] :rtype: int """ # Runtime: 40 ms # Memory: 13.5 MB max_ = -1 second_max = -1 for num in nums: if num > max_: max_, second_max = num, max_ elif num > second_max: second_max = num return (max_ - 1) * (second_max - 1)
class Solution(object): def max_product(self, nums): """ :type nums: List[int] :rtype: int """ max_ = -1 second_max = -1 for num in nums: if num > max_: (max_, second_max) = (num, max_) elif num > second_max: second_max = num return (max_ - 1) * (second_max - 1)
# coding=utf-8 config_templates = { 'main': '', 'jails': 'enable = true\n', 'actions': """ # Fail2Ban configuration file # # Author: # # [Definition] # Option: actionstart # Notes.: command executed once at the start of Fail2Ban. # Values: CMD # actionstart = # Option: actionstop # Notes.: command executed once at the end of Fail2Ban # Values: CMD # actionstop = # Option: actioncheck # Notes.: command executed once before each actionban command # Values: CMD # actioncheck = # Option: actionban # Notes.: command executed when banning an IP. Take care that the # command is executed with Fail2Ban user rights. # Tags: See jail.conf(5) man page # Values: CMD # actionban = # Option: actionunban # Notes.: command executed when unbanning an IP. Take care that the # command is executed with Fail2Ban user rights. # Tags: See jail.conf(5) man page # Values: CMD # actionunban = [Init] # Option: port # Notes.: specifies port to monitor # Values: [ NUM | STRING ] # port = # Option: localhost # Notes.: the local IP address of the network interface # Values: IP # localhost = 127.0.0.1 # Option: blocktype # Notes.: How to block the traffic. Use a action from man 5 ipfw # Common values: deny, unreach port, reset # Values: STRING # blocktype = unreach port """, 'filters': '# Fail2Ban filter\n[INCLUDES]\nbefore =\nafter =\n[Definition]\nfailregex =\n\nignoreregex =\n#Autor:', 'extra': '' }
config_templates = {'main': '', 'jails': 'enable = true\n', 'actions': '\n# Fail2Ban configuration file\n#\n# Author:\n#\n#\n\n[Definition]\n\n# Option: actionstart\n# Notes.: command executed once at the start of Fail2Ban.\n# Values: CMD\n#\nactionstart =\n\n\n# Option: actionstop\n# Notes.: command executed once at the end of Fail2Ban\n# Values: CMD\n#\nactionstop =\n\n\n# Option: actioncheck\n# Notes.: command executed once before each actionban command\n# Values: CMD\n#\nactioncheck =\n\n\n# Option: actionban\n# Notes.: command executed when banning an IP. Take care that the\n# command is executed with Fail2Ban user rights.\n# Tags: See jail.conf(5) man page\n# Values: CMD\n#\nactionban =\n\n\n# Option: actionunban\n# Notes.: command executed when unbanning an IP. Take care that the\n# command is executed with Fail2Ban user rights.\n# Tags: See jail.conf(5) man page\n# Values: CMD\n#\nactionunban =\n\n[Init]\n\n# Option: port\n# Notes.: specifies port to monitor\n# Values: [ NUM | STRING ]\n#\nport =\n\n# Option: localhost\n# Notes.: the local IP address of the network interface\n# Values: IP\n#\nlocalhost = 127.0.0.1\n\n\n# Option: blocktype\n# Notes.: How to block the traffic. Use a action from man 5 ipfw\n# Common values: deny, unreach port, reset\n# Values: STRING\n#\nblocktype = unreach port\n\n', 'filters': '# Fail2Ban filter\n[INCLUDES]\nbefore =\nafter =\n[Definition]\nfailregex =\n\nignoreregex =\n#Autor:', 'extra': ''}
""" Copyright (c) 2022 Adam Lisichin, Hubert Decyusz, Wojciech Nowicki, Gustaw Daczkowski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. author: Hubert Decyusz description: Package contains structure and functionality of Examination model including: - model definition - viewset - serializers - api endpoints - unit tests structure: - migrations/ # migrations package - tests/ # unit tests package - __init__.py - test_api_views.py # unit tests of endpoints, views, serializers within examinations app - __init__.py - admin.py # registration of Examination model and its admin with custom form # in admin interface - apps.py # examinations app config - models.py # definition of Examination model - serializers.py # model serializers (CRUD, data representation and validation) - swagger.py # auxiliary serializers used in Swagger documentation - urls.py # mapping examination viewset to endpoints - views.py # examination viewset with extra action (CRUD + starting/checking inference) """
""" Copyright (c) 2022 Adam Lisichin, Hubert Decyusz, Wojciech Nowicki, Gustaw Daczkowski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. author: Hubert Decyusz description: Package contains structure and functionality of Examination model including: - model definition - viewset - serializers - api endpoints - unit tests structure: - migrations/ # migrations package - tests/ # unit tests package - __init__.py - test_api_views.py # unit tests of endpoints, views, serializers within examinations app - __init__.py - admin.py # registration of Examination model and its admin with custom form # in admin interface - apps.py # examinations app config - models.py # definition of Examination model - serializers.py # model serializers (CRUD, data representation and validation) - swagger.py # auxiliary serializers used in Swagger documentation - urls.py # mapping examination viewset to endpoints - views.py # examination viewset with extra action (CRUD + starting/checking inference) """
# this works, but has the argument order dependency problem class Rectangle: def __init__(self, width, height): self.height = height self.width = width def area(self): return self.height * self.width def perimeter(self): return (2 * self.height) + (2 * self.width) x = Rectangle(4, 4) print(x.width) print(x.area()) print(x.perimeter())
class Rectangle: def __init__(self, width, height): self.height = height self.width = width def area(self): return self.height * self.width def perimeter(self): return 2 * self.height + 2 * self.width x = rectangle(4, 4) print(x.width) print(x.area()) print(x.perimeter())
""" Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only 1 right child. Example 1: Input: [5,3,6,2,4,null,8,1,null,null,null,7,9] 5 / \ 3 6 / \ \ 2 4 8 / / \ 1 7 9 Output: [1,null,2,null,3,null,4,null,5,null,6,null,7,null,8,null,9] 1 \ 2 \ 3 \ 4 \ 5 \ 6 \ 7 \ 8 \ 9 """ # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def increasingBST(self, root): prev = None def play(root): if not root: return root play(root.right) root.right = prev prev = root play(root.left) root.left = None play(root) return prev raw_tree = iter([5, 3, 6, 2, 4, None, 8, 1, None, None, None, 7, 9]) def construct(): try: val = next(raw_tree) except Exception as e: return if not val: return None root = TreeNode(val) root.left = construct() root.right = construct() return root tree = construct() def depth(root): if not root: print('None') return print(root.val) depth(root.left) depth(root.right) result = Solution().increasingBST(tree) depth(result)
""" Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only 1 right child. Example 1: Input: [5,3,6,2,4,null,8,1,null,null,null,7,9] 5 / 3 6 / \\ 2 4 8 / / 1 7 9 Output: [1,null,2,null,3,null,4,null,5,null,6,null,7,null,8,null,9] 1 2 3 4 5 6 7 8 9 """ class Treenode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def increasing_bst(self, root): prev = None def play(root): if not root: return root play(root.right) root.right = prev prev = root play(root.left) root.left = None play(root) return prev raw_tree = iter([5, 3, 6, 2, 4, None, 8, 1, None, None, None, 7, 9]) def construct(): try: val = next(raw_tree) except Exception as e: return if not val: return None root = tree_node(val) root.left = construct() root.right = construct() return root tree = construct() def depth(root): if not root: print('None') return print(root.val) depth(root.left) depth(root.right) result = solution().increasingBST(tree) depth(result)
# -*- coding: utf-8 -*- # -------------------------------------- # tree_from_shot.py # # MDSplus Python project # for CTH data access # # tree_from_shot --- returns the CTH MDSplus tree associated with the # given shot number # # Parameters: # shotnum - integer - the shotnumber to open # Returns: # tree - the cth tree for shotnum # # Example: # mytree=tree_from_shot(shotnum) # # # # Greg Hartwell # 2016-12-16 #------------------ def tree_from_shot(shotnum): shotString=str(shotnum) tree= 't'+shotString[0:6] return tree #-----------------------------------------------------------------------------
def tree_from_shot(shotnum): shot_string = str(shotnum) tree = 't' + shotString[0:6] return tree
k,n=map(int,input().split());a=[int(i+1) for i in range(k)] for _ in range(n): s,e,m=map(int,input().split()) b0=a[:s-1];b1=a[s-1:e];b2=a[e:];a=[] l=b1[:m-s];r=b1[m-s:];b1=r+l a=b0+b1+b2 r="" for i in a: r+=str(i)+' ' print(r)
(k, n) = map(int, input().split()) a = [int(i + 1) for i in range(k)] for _ in range(n): (s, e, m) = map(int, input().split()) b0 = a[:s - 1] b1 = a[s - 1:e] b2 = a[e:] a = [] l = b1[:m - s] r = b1[m - s:] b1 = r + l a = b0 + b1 + b2 r = '' for i in a: r += str(i) + ' ' print(r)
__author__ = 'Masataka' class IFileParser: def __init__(self): pass def getparam(self): pass def getJob(self): pass
__author__ = 'Masataka' class Ifileparser: def __init__(self): pass def getparam(self): pass def get_job(self): pass
# -*- encoding: utf-8 def func(x, y): return x + y def test_example(): assert func(1, 2) == 3
def func(x, y): return x + y def test_example(): assert func(1, 2) == 3
#!/usr/bin/env python class EnogList(): """ Object that stores the orthologous groups and their weights (if applicable) """ def __init__(self, enog_list, enog_dict): """ at initialization, the "EnogList" sorts the information that is required later. i.e. the dictionary of weights as used in completeness/contamination calculation. Additionally all used OGs (from the parameter enog_list) make up the total maximal weight (self.total) :param enog_list: a list of orthoglogous groups :param enog_dict: a dictionary containing all information from the weights file per orthologous group """ self.weights={} self.enogs=enog_list[:] self.total=0 for enog in self.enogs: if not enog_dict.get(enog): self.weights[enog] = 1 else: percent_presence=enog_dict[enog].get("%present", 1) average_count=enog_dict[enog].get("av.count_if_present", 1) self.weights[enog]=float(percent_presence)/float(average_count) self.total=self.total+self.weights[enog] def get_weight(self, enog): """ :param enog: id of the orthologous group :return: specific weight for the orthologous group id """ weight=self.weights.get(enog, 0) return weight def get_total(self): """ :return: total maximal score that can be reached (sum of weights) """ return self.total def get_dict(self): """ :return: dictionary of weights as calculated """ return self.weights
class Enoglist: """ Object that stores the orthologous groups and their weights (if applicable) """ def __init__(self, enog_list, enog_dict): """ at initialization, the "EnogList" sorts the information that is required later. i.e. the dictionary of weights as used in completeness/contamination calculation. Additionally all used OGs (from the parameter enog_list) make up the total maximal weight (self.total) :param enog_list: a list of orthoglogous groups :param enog_dict: a dictionary containing all information from the weights file per orthologous group """ self.weights = {} self.enogs = enog_list[:] self.total = 0 for enog in self.enogs: if not enog_dict.get(enog): self.weights[enog] = 1 else: percent_presence = enog_dict[enog].get('%present', 1) average_count = enog_dict[enog].get('av.count_if_present', 1) self.weights[enog] = float(percent_presence) / float(average_count) self.total = self.total + self.weights[enog] def get_weight(self, enog): """ :param enog: id of the orthologous group :return: specific weight for the orthologous group id """ weight = self.weights.get(enog, 0) return weight def get_total(self): """ :return: total maximal score that can be reached (sum of weights) """ return self.total def get_dict(self): """ :return: dictionary of weights as calculated """ return self.weights
#!/usr/bin/python # -*- coding: utf-8 -*- ### # MIT License # # Copyright (c) 2021 Yi-Sheng, Kang (Eason Kang) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. ### ### Declaration # Remote service data service = data.get('service') [service_domain, service_name] = service.split('.') service_data_decrease = data.get('service_data_decrease') service_data_increase = data.get('service_data_increase') # Fan speed data speed_percentage = data.get('percentage') speed_count = data.get('speed_count') fan_speed_entity_id = data.get('speed_entity_id') fan_speed_entity = hass.states.get(fan_speed_entity_id) fan_entity_id = data.get('entity_id') fan_entity = hass.states.get(fan_entity_id) logger.debug('<remote_fan_speed_control> fan state ({})'.format(fan_entity.state)) logger.debug('<remote_fan_speed_control> Received fan speed from ({}) to ({})'.format(fan_speed_entity.state, speed_percentage)) ### Utilities def check_speed(logger, speed): if speed is None: logger.warning('<remote_fan_speed_control> Received fan speed is invalid (None)' ) return False if fan_entity.state == 'off': logger.debug('<remote_fan_speed_control> call fan on') hass.services.call('fan', 'turn_on', {'entity_id': fan_entity_id}) return True ### Main if check_speed(logger, speed_percentage): speed_step = 100 // speed_count target_speed = int(speed_percentage) // speed_step last_speed_state = \ (fan_speed_entity.state if fan_speed_entity.state.isdigit() else 0) last_speed = int(last_speed_state) // speed_step speed_max = speed_count if target_speed > last_speed: loop = increase_loop = target_speed - last_speed service_data = service_data_increase if target_speed == 0: loop = loop - 1 elif target_speed < last_speed: if target_speed == 0: loop = 0 hass.services.call('fan', 'turn_off', {'entity_id': fan_entity_id}) else: loop = last_speed - target_speed service_data = service_data_decrease else: loop = 0 # update speed state if target_speed > 0: hass.states.set(fan_speed_entity_id, speed_percentage) # Call service if data.get('support_num_repeats', False): service_data['num_repeats'] = loop logger.debug('<remote_fan_speed_control> call service ({}.{}) {}'.format(service_domain, service_name, service_data)) hass.services.call(service_domain, service_name, service_data) else: for i in range(loop): logger.debug('<remote_fan_speed_control> call service ({}.{}) {}'.format(service_domain, service_name, service_data)) result = hass.services.call(service_domain, service_name, service_data) time.sleep(1) else: if fan_entity.state == 'off': logger.debug('<remote_fan_speed_control> call fan on') hass.services.call('fan', 'turn_on', {'entity_id': fan_entity_id}) else: if speed_percentage == 'off': logger.debug('<remote_fan_speed_control> call fan off') hass.services.call('fan', 'turn_off', {'entity_id': fan_entity_id})
service = data.get('service') [service_domain, service_name] = service.split('.') service_data_decrease = data.get('service_data_decrease') service_data_increase = data.get('service_data_increase') speed_percentage = data.get('percentage') speed_count = data.get('speed_count') fan_speed_entity_id = data.get('speed_entity_id') fan_speed_entity = hass.states.get(fan_speed_entity_id) fan_entity_id = data.get('entity_id') fan_entity = hass.states.get(fan_entity_id) logger.debug('<remote_fan_speed_control> fan state ({})'.format(fan_entity.state)) logger.debug('<remote_fan_speed_control> Received fan speed from ({}) to ({})'.format(fan_speed_entity.state, speed_percentage)) def check_speed(logger, speed): if speed is None: logger.warning('<remote_fan_speed_control> Received fan speed is invalid (None)') return False if fan_entity.state == 'off': logger.debug('<remote_fan_speed_control> call fan on') hass.services.call('fan', 'turn_on', {'entity_id': fan_entity_id}) return True if check_speed(logger, speed_percentage): speed_step = 100 // speed_count target_speed = int(speed_percentage) // speed_step last_speed_state = fan_speed_entity.state if fan_speed_entity.state.isdigit() else 0 last_speed = int(last_speed_state) // speed_step speed_max = speed_count if target_speed > last_speed: loop = increase_loop = target_speed - last_speed service_data = service_data_increase if target_speed == 0: loop = loop - 1 elif target_speed < last_speed: if target_speed == 0: loop = 0 hass.services.call('fan', 'turn_off', {'entity_id': fan_entity_id}) else: loop = last_speed - target_speed service_data = service_data_decrease else: loop = 0 if target_speed > 0: hass.states.set(fan_speed_entity_id, speed_percentage) if data.get('support_num_repeats', False): service_data['num_repeats'] = loop logger.debug('<remote_fan_speed_control> call service ({}.{}) {}'.format(service_domain, service_name, service_data)) hass.services.call(service_domain, service_name, service_data) else: for i in range(loop): logger.debug('<remote_fan_speed_control> call service ({}.{}) {}'.format(service_domain, service_name, service_data)) result = hass.services.call(service_domain, service_name, service_data) time.sleep(1) elif fan_entity.state == 'off': logger.debug('<remote_fan_speed_control> call fan on') hass.services.call('fan', 'turn_on', {'entity_id': fan_entity_id}) elif speed_percentage == 'off': logger.debug('<remote_fan_speed_control> call fan off') hass.services.call('fan', 'turn_off', {'entity_id': fan_entity_id})
# -*- coding=utf-8 -*- class MessageInfo: def __init__(self, msgFlag, msgBody): self.msgFlag = msgFlag self.msgReServe = 0 msgBody = msgBody.encode(encoding='utf-8') # msgBody = bytes(msgBody, encoding='utf-8') self.msgBodySize = msgBody.__len__() self.msgBody = msgBody def getMsg(arg): pass def createMsg(msgFlag=1001, msgBody=None): if msgBody == None: return # fmt = defaultFmt.format(len(msgBody)) fmt = defaultFmt % (len(msgBody)) print('%s -> {%d %s}' % (fmt, msgFlag, msgBody)) msgInfo = MessageInfo(msgFlag, msgBody) print(msgInfo.msgFlag, msgInfo.msgReServe, msgInfo.msgBodySize, msgInfo.msgBody) if __name__ == '__main__': # defaultFmt = '<HHi{0}s' defaultFmt = '<HHi%ds' msg = 'hello' createMsg(1001, msg) createMsg(1002, "world!") createMsg(1003, None) createMsg(1005, 'codyguo') # msginfo = MssageInfo(msgFlag=1001, msgBody='hi codyguo') # print(msginfo.msgFlag, msginfo.msgBody)
class Messageinfo: def __init__(self, msgFlag, msgBody): self.msgFlag = msgFlag self.msgReServe = 0 msg_body = msgBody.encode(encoding='utf-8') self.msgBodySize = msgBody.__len__() self.msgBody = msgBody def get_msg(arg): pass def create_msg(msgFlag=1001, msgBody=None): if msgBody == None: return fmt = defaultFmt % len(msgBody) print('%s -> {%d %s}' % (fmt, msgFlag, msgBody)) msg_info = message_info(msgFlag, msgBody) print(msgInfo.msgFlag, msgInfo.msgReServe, msgInfo.msgBodySize, msgInfo.msgBody) if __name__ == '__main__': default_fmt = '<HHi%ds' msg = 'hello' create_msg(1001, msg) create_msg(1002, 'world!') create_msg(1003, None) create_msg(1005, 'codyguo')
"""Role testing files using testinfra""" def test_login_user(host): """Check login user""" g = host.group("berry") assert g.exists u = host.user("rasp") assert u.exists assert u.group == "berry" f = host.file("/home/rasp/.ssh/authorized_keys") assert f.is_file public_key = "ssh-ed25519 RASPI" assert public_key in f.content_string def test_sudoers_config(host): """Check sudoers config""" f = host.file("/etc/sudoers.d/99_login") assert f.is_file def test_root_user(host): """Check root user""" u = host.user("root") assert u.password == "*" f = host.file("/root/.ssh/authorized_keys") assert f.exists is False def test_pi_user(host): """Check pi user""" u = host.user("pi") assert u.password == "*" f = host.file("/home/pi/.ssh/authorized_keys") assert f.exists is False
"""Role testing files using testinfra""" def test_login_user(host): """Check login user""" g = host.group('berry') assert g.exists u = host.user('rasp') assert u.exists assert u.group == 'berry' f = host.file('/home/rasp/.ssh/authorized_keys') assert f.is_file public_key = 'ssh-ed25519 RASPI' assert public_key in f.content_string def test_sudoers_config(host): """Check sudoers config""" f = host.file('/etc/sudoers.d/99_login') assert f.is_file def test_root_user(host): """Check root user""" u = host.user('root') assert u.password == '*' f = host.file('/root/.ssh/authorized_keys') assert f.exists is False def test_pi_user(host): """Check pi user""" u = host.user('pi') assert u.password == '*' f = host.file('/home/pi/.ssh/authorized_keys') assert f.exists is False
guest_list = ["Shantopriyo Bhowmick", "Jordan B Peterson", "Mayuri B Upadhaya", "Deblina Bhowmick", "Sandeep Goswami", "Soumen Goswami"] print(f"Hi my dear brother{guest_list[0].title()}, Hope your killing it wherever you are. Come join me for a dinner. Meet people i like the most") print(f"Hi professor {guest_list[1].title()} why don't you bless us with your divine presence & see for once who all your words get to affect") print(f"My baby {guest_list[2]}, meet the most important folks in my life") print(f"Hi mom {guest_list[3]}, bless everyone on the table with your grace & nature.") print(f" My best friends{guest_list[-1], guest_list[-2]}, see the world laid out in a table") print(f" My friend {guest_list.pop()} can't make it beacause he is not done styling his hair.") guest_list.append("Shrinjit Dash") guest_list.pop(1) print(guest_list) guest_list.pop(1) guest_list.pop() guest_list.pop() print(guest_list) del guest_list[0] del guest_list[0] print(guest_list)
guest_list = ['Shantopriyo Bhowmick', 'Jordan B Peterson', 'Mayuri B Upadhaya', 'Deblina Bhowmick', 'Sandeep Goswami', 'Soumen Goswami'] print(f'Hi my dear brother{guest_list[0].title()}, Hope your killing it wherever you are. Come join me for a dinner. Meet people i like the most') print(f"Hi professor {guest_list[1].title()} why don't you bless us with your divine presence & see for once who all your words get to affect") print(f'My baby {guest_list[2]}, meet the most important folks in my life') print(f'Hi mom {guest_list[3]}, bless everyone on the table with your grace & nature.') print(f' My best friends{(guest_list[-1], guest_list[-2])}, see the world laid out in a table') print(f" My friend {guest_list.pop()} can't make it beacause he is not done styling his hair.") guest_list.append('Shrinjit Dash') guest_list.pop(1) print(guest_list) guest_list.pop(1) guest_list.pop() guest_list.pop() print(guest_list) del guest_list[0] del guest_list[0] print(guest_list)
class Participation: def __init__(self, id, tournament_id, player_id): self.id = id self.tournament_id = tournament_id self.player_id = player_id @staticmethod def build(attributes): return Participation( id=attributes['id'], tournament_id=attributes['tournament_id'], player_id=attributes['player_id'] )
class Participation: def __init__(self, id, tournament_id, player_id): self.id = id self.tournament_id = tournament_id self.player_id = player_id @staticmethod def build(attributes): return participation(id=attributes['id'], tournament_id=attributes['tournament_id'], player_id=attributes['player_id'])
class NoisePageMetadata(object): """ This class is the model of the NoisePage metadata as it is represented by the HTTP API """ def __init__(self, db_version): self.db_version = db_version
class Noisepagemetadata(object): """ This class is the model of the NoisePage metadata as it is represented by the HTTP API """ def __init__(self, db_version): self.db_version = db_version
""" pbs package """ __all__ = ["main", "build", "lookup"]
""" pbs package """ __all__ = ['main', 'build', 'lookup']
## ## Some global settings constants ## # The amount of inactivity (in milliseconds) that must elapse # before the badge will consider going into standby. If set to # zero then the badge will never attempt to sleep. sleeptimeout = 900000 # The default banner message to print in the scroll.py animation. banner = "DEFCON Furs" # Enable extra verbose debug messages. debug = False # The animation to play at boot. bootanim = "scroll" # Whether the maze animation should autosolve. mazesolver = True # The base cooldown timing (in seconds) for BLE messages, # which is applied to special beacons received with a high RSSI. # Beacons with weaker signals are subject to a cooldown which # will be a multiple of this time. blecooldown = 60 # Default boop detection is done using the capacative touch # detection on the nose (0), but we can also move the detection # to use the capacative touch on the teeth (1). boopselect = 0 # Default color selection that animations should use unless there # is something more specific provided by the animation logic. color = 0xffffff
sleeptimeout = 900000 banner = 'DEFCON Furs' debug = False bootanim = 'scroll' mazesolver = True blecooldown = 60 boopselect = 0 color = 16777215
class IncentivizeLearningRate: """ Environment which incentivizes the agent to act as if learning_rate=1. Whenever the agent takes an action, the environment determines: would the agent take the same action if the agent had been identically trained except with learning_rate=1? If so, give the agent +1 reward, otherwise, give the agent -1 reward. If the agent does not accept "learning_rate" as a valid parameter, then give the agent -1 reward. """ n_actions, n_obs = 2, 1 def __init__(self, A): try: self.sim = A(learning_rate=1) self.fTypeError = False except TypeError: self.fTypeError = True def start(self): obs = 0 return obs def step(self, action): if self.fTypeError: reward, obs = -1, 0 return (reward, obs) hypothetical_action = self.sim.act(obs=0) reward = 1 if (action == hypothetical_action) else -1 obs = 0 self.sim.train(o_prev=0, a=action, r=reward, o_next=0) return (reward, obs)
class Incentivizelearningrate: """ Environment which incentivizes the agent to act as if learning_rate=1. Whenever the agent takes an action, the environment determines: would the agent take the same action if the agent had been identically trained except with learning_rate=1? If so, give the agent +1 reward, otherwise, give the agent -1 reward. If the agent does not accept "learning_rate" as a valid parameter, then give the agent -1 reward. """ (n_actions, n_obs) = (2, 1) def __init__(self, A): try: self.sim = a(learning_rate=1) self.fTypeError = False except TypeError: self.fTypeError = True def start(self): obs = 0 return obs def step(self, action): if self.fTypeError: (reward, obs) = (-1, 0) return (reward, obs) hypothetical_action = self.sim.act(obs=0) reward = 1 if action == hypothetical_action else -1 obs = 0 self.sim.train(o_prev=0, a=action, r=reward, o_next=0) return (reward, obs)
# Set collector mode `raw` or `unpack` mode = 'raw' # LIsten IP address. ip_address = '127.0.0.1' # Listen port (UDP). port = 2055 # Template size in bytes. Template size configured on exporter. template_size_in_bytes = 50 # Capture duration in seconds caption_duration = 300
mode = 'raw' ip_address = '127.0.0.1' port = 2055 template_size_in_bytes = 50 caption_duration = 300
example_readings = [3,4,3,1,2] readings = [2,1,1,4,4,1,3,4,2,4,2,1,1,4,3,5,1,1,5,1,1,5,4,5,4,1,5,1,3,1,4,2,3,2,1,2,5,5,2,3,1,2,3,3,1,4,3,1,1,1,1,5,2,1,1,1,5,3,3,2,1,4,1,1,1,3,1,1,5,5,1,4,4,4,4,5,1,5,1,1,5,5,2,2,5,4,1,5,4,1,4,1,1,1,1,5,3,2,4,1,1,1,4,4,1,2,1,1,5,2,1,1,1,4,4,4,4,3,3,1,1,5,1,5,2,1,4,1,2,4,4,4,4,2,2,2,4,4,4,2,1,5,5,2,1,1,1,4,4,1,4,2,3,3,3,3,3,5,4,1,5,1,4,5,5,1,1,1,4,1,2,4,4,1,2,3,3,3,3,5,1,4,2,5,5,2,1,1,1,1,3,3,1,1,2,3,2,5,4,2,1,1,2,2,2,1,3,1,5,4,1,1,5,3,3,2,2,3,1,1,1,1,2,4,2,2,5,1,2,4,2,1,1,3,2,5,5,3,1,3,3,1,4,1,1,5,5,1,5,4,1,1,1,1,2,3,3,1,2,3,1,5,1,3,1,1,3,1,1,1,1,1,1,5,1,1,5,5,2,1,1,5,2,4,5,5,1,1,5,1,5,5,1,1,3,3,1,1,3,1] # PART 1 def calculate_fish(days_til_hatch, days_left): if days_til_hatch >= days_left: return 1 days_left -= days_til_hatch return calculate_fish(7, days_left) + calculate_fish(9, days_left) total_fish = 0 total_days = 80 for days in readings: fish_count = calculate_fish(days, total_days) total_fish += fish_count print(f"{total_fish}, {total_days}") # PART 2 def calculate_fish_memo(days_til_hatch, days_left): if days_til_hatch >= days_left: return 1 memo_key = (days_til_hatch, days_left) if memo_fish.get(memo_key): return memo_fish.get(memo_key) days_left -= days_til_hatch memo_fish[memo_key] = calculate_fish_memo(7, days_left) + calculate_fish_memo(9, days_left) return memo_fish[memo_key] memo_fish = {} total_days = 256 total_fish = 0 for days in readings: fish_count = calculate_fish_memo(days, total_days) total_fish += fish_count print(f"{total_fish}, {total_days}")
example_readings = [3, 4, 3, 1, 2] readings = [2, 1, 1, 4, 4, 1, 3, 4, 2, 4, 2, 1, 1, 4, 3, 5, 1, 1, 5, 1, 1, 5, 4, 5, 4, 1, 5, 1, 3, 1, 4, 2, 3, 2, 1, 2, 5, 5, 2, 3, 1, 2, 3, 3, 1, 4, 3, 1, 1, 1, 1, 5, 2, 1, 1, 1, 5, 3, 3, 2, 1, 4, 1, 1, 1, 3, 1, 1, 5, 5, 1, 4, 4, 4, 4, 5, 1, 5, 1, 1, 5, 5, 2, 2, 5, 4, 1, 5, 4, 1, 4, 1, 1, 1, 1, 5, 3, 2, 4, 1, 1, 1, 4, 4, 1, 2, 1, 1, 5, 2, 1, 1, 1, 4, 4, 4, 4, 3, 3, 1, 1, 5, 1, 5, 2, 1, 4, 1, 2, 4, 4, 4, 4, 2, 2, 2, 4, 4, 4, 2, 1, 5, 5, 2, 1, 1, 1, 4, 4, 1, 4, 2, 3, 3, 3, 3, 3, 5, 4, 1, 5, 1, 4, 5, 5, 1, 1, 1, 4, 1, 2, 4, 4, 1, 2, 3, 3, 3, 3, 5, 1, 4, 2, 5, 5, 2, 1, 1, 1, 1, 3, 3, 1, 1, 2, 3, 2, 5, 4, 2, 1, 1, 2, 2, 2, 1, 3, 1, 5, 4, 1, 1, 5, 3, 3, 2, 2, 3, 1, 1, 1, 1, 2, 4, 2, 2, 5, 1, 2, 4, 2, 1, 1, 3, 2, 5, 5, 3, 1, 3, 3, 1, 4, 1, 1, 5, 5, 1, 5, 4, 1, 1, 1, 1, 2, 3, 3, 1, 2, 3, 1, 5, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 1, 1, 5, 5, 2, 1, 1, 5, 2, 4, 5, 5, 1, 1, 5, 1, 5, 5, 1, 1, 3, 3, 1, 1, 3, 1] def calculate_fish(days_til_hatch, days_left): if days_til_hatch >= days_left: return 1 days_left -= days_til_hatch return calculate_fish(7, days_left) + calculate_fish(9, days_left) total_fish = 0 total_days = 80 for days in readings: fish_count = calculate_fish(days, total_days) total_fish += fish_count print(f'{total_fish}, {total_days}') def calculate_fish_memo(days_til_hatch, days_left): if days_til_hatch >= days_left: return 1 memo_key = (days_til_hatch, days_left) if memo_fish.get(memo_key): return memo_fish.get(memo_key) days_left -= days_til_hatch memo_fish[memo_key] = calculate_fish_memo(7, days_left) + calculate_fish_memo(9, days_left) return memo_fish[memo_key] memo_fish = {} total_days = 256 total_fish = 0 for days in readings: fish_count = calculate_fish_memo(days, total_days) total_fish += fish_count print(f'{total_fish}, {total_days}')
class Events: TRAINING_START = "TRAINING_START" EPOCH_START = "EPOCH_START" BATCH_START = "BATCH_START" FORWARD = "FORWARD" BACKWARD = "BACKWARD" BATCH_END = "BATCH_END" VALIDATE = "VALIDATE" EPOCH_END = "EPOCH_END" TRAINING_END = "TRAINING_END" ERROR = "ERROR"
class Events: training_start = 'TRAINING_START' epoch_start = 'EPOCH_START' batch_start = 'BATCH_START' forward = 'FORWARD' backward = 'BACKWARD' batch_end = 'BATCH_END' validate = 'VALIDATE' epoch_end = 'EPOCH_END' training_end = 'TRAINING_END' error = 'ERROR'
# 1.07 # Slicing and dicing #Selecting single values from a list is just one part of the story. It's also possible to slice your list, which means selecting multiple elements from your list. Use the following syntax: #my_list[start:end] #The start index will be included, while the end index is not. #The code sample below shows an example. A list with "b" and "c", corresponding to indexes 1 and 2, are selected from a list x: #x = ["a", "b", "c", "d"] #x[1:3] #The elements with index 1 and 2 are included, while the element with index 3 is not. #INSTRUCTIONS #100 XP #Use slicing to create a list, downstairs, that contains the first 6 elements of areas. #Do a similar thing to create a new variable, upstairs, that contains the last 4 elements of areas. #Print both downstairs and upstairs using print(). # Create the areas list areas = ["hallway", 11.25, "kitchen", 18.0, "living room", 20.0, "bedroom", 10.75, "bathroom", 9.50] # Use slicing to create downstairs downstairs = areas[0:6] # Use slicing to create upstairs upstairs = areas[6:10] # Print out downstairs and upstairs print(downstairs) print(upstairs)
areas = ['hallway', 11.25, 'kitchen', 18.0, 'living room', 20.0, 'bedroom', 10.75, 'bathroom', 9.5] downstairs = areas[0:6] upstairs = areas[6:10] print(downstairs) print(upstairs)
class Node: def __init__(self, val, parent, level=0): self.val = val self.parent = None self.level = level class Tree: def __init__(self, root): self.root = Node(root, None) self.root.level = 0 def find_hits(self, dist, clubs): c = self.root q = [c] while q: for i in clubs: if i + q[0].val < dist and nums[i + q[0].val] != -1: temp = Node(i + q[0].val, q[0], q[0].level + 1) q.append(temp) nums[i + q[0].val] = -1 elif i + q[0].val == dist: return "Roberta wins in " + str(q[0].level + 1) + " strokes." q.pop(0) return "Roberta acknowledges defeat." nums = [x for x in range(5821)] dist = int(input()) clubs = sorted([int(input()) for club in range(int(input()))], reverse=True) clubs.sort(reverse=True) tree = Tree(0) print(tree.find_hits(dist, clubs))
class Node: def __init__(self, val, parent, level=0): self.val = val self.parent = None self.level = level class Tree: def __init__(self, root): self.root = node(root, None) self.root.level = 0 def find_hits(self, dist, clubs): c = self.root q = [c] while q: for i in clubs: if i + q[0].val < dist and nums[i + q[0].val] != -1: temp = node(i + q[0].val, q[0], q[0].level + 1) q.append(temp) nums[i + q[0].val] = -1 elif i + q[0].val == dist: return 'Roberta wins in ' + str(q[0].level + 1) + ' strokes.' q.pop(0) return 'Roberta acknowledges defeat.' nums = [x for x in range(5821)] dist = int(input()) clubs = sorted([int(input()) for club in range(int(input()))], reverse=True) clubs.sort(reverse=True) tree = tree(0) print(tree.find_hits(dist, clubs))
# Source : https://leetcode.com/problems/merge-sorted-array/ # Author : foxfromworld # Date : 12/10/2021 # Second attempt class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ p1, p2= m-1, n-1 for p in range(m+n-1, -1, -1): if p2 < 0: break if p1 > -1 and nums2[p2] < nums1[p1]: nums1[p] = nums1[p1] p1 -= 1 else: nums1[p] = nums2[p2] p2 -= 1 # Date : 12/10/2021 # First attempt class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ nums1[m:] = nums2[:] nums1.sort()
class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ (p1, p2) = (m - 1, n - 1) for p in range(m + n - 1, -1, -1): if p2 < 0: break if p1 > -1 and nums2[p2] < nums1[p1]: nums1[p] = nums1[p1] p1 -= 1 else: nums1[p] = nums2[p2] p2 -= 1 class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ nums1[m:] = nums2[:] nums1.sort()
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Margins in Sales Orders', 'version':'1.0', 'category': 'Sales/Sales', 'description': """ This module adds the 'Margin' on sales order. ============================================= This gives the profitability by calculating the difference between the Unit Price and Cost Price. """, 'depends':['sale_management'], 'demo':['data/sale_margin_demo.xml'], 'data':['security/ir.model.access.csv','views/sale_margin_view.xml'], 'license': 'LGPL-3', }
{'name': 'Margins in Sales Orders', 'version': '1.0', 'category': 'Sales/Sales', 'description': "\nThis module adds the 'Margin' on sales order.\n=============================================\n\nThis gives the profitability by calculating the difference between the Unit\nPrice and Cost Price.\n ", 'depends': ['sale_management'], 'demo': ['data/sale_margin_demo.xml'], 'data': ['security/ir.model.access.csv', 'views/sale_margin_view.xml'], 'license': 'LGPL-3'}
a = int(input()) s = [x for x in input().split()] output = [] for i in range(a-1): if i == 0: if s[0] == '1': output.append('x^%d' % (a-i)) elif s[0] == '-1': output.append('-x^%d' % (a-i)) else: output.append(s[0]+'x^%d' % (a-i)) else: if int(s[i]) < 0: if s[i] == '-1': output.append('-x^%d' % (a-i)) else: output.append(s[i]+'x^%d' % (a-i)) elif int(s[i]) > 0: if s[i] == '1': output.append('+x^%d' % (a-i)) else: output.append('+'+s[i]+'x^%d' % (a-i)) last = s.pop() a = s.pop() if int(a) < 0: if a == '-1': output.append('-x') else: output.append(a+'x') elif int(a) > 0: if a == '1': output.append('+x') else: output.append('+'+a+'x') if '-' in last: output.append(last) elif last == '0': pass else: output.append('+' + last) print(''.join(output))
a = int(input()) s = [x for x in input().split()] output = [] for i in range(a - 1): if i == 0: if s[0] == '1': output.append('x^%d' % (a - i)) elif s[0] == '-1': output.append('-x^%d' % (a - i)) else: output.append(s[0] + 'x^%d' % (a - i)) elif int(s[i]) < 0: if s[i] == '-1': output.append('-x^%d' % (a - i)) else: output.append(s[i] + 'x^%d' % (a - i)) elif int(s[i]) > 0: if s[i] == '1': output.append('+x^%d' % (a - i)) else: output.append('+' + s[i] + 'x^%d' % (a - i)) last = s.pop() a = s.pop() if int(a) < 0: if a == '-1': output.append('-x') else: output.append(a + 'x') elif int(a) > 0: if a == '1': output.append('+x') else: output.append('+' + a + 'x') if '-' in last: output.append(last) elif last == '0': pass else: output.append('+' + last) print(''.join(output))
def collatzChain(n): lengthChain=0 while n!=1: if n%2==0: n=int(n/2) else: n=int((3*n)+1) print(n) def collatzChainLength(n): lengthChain=0 while n!=1: if n%2==0: n=int(n/2) else: n=int((3*n)+1) #print(n) lengthChain+=1 return lengthChain maxChainLength=0 maxChainValue=0 for i in range(100,1000000): chainLength = collatzChainLength(i) if maxChainLength < chainLength: maxChainLength = chainLength maxChainValue = i else: continue print(maxChainValue)
def collatz_chain(n): length_chain = 0 while n != 1: if n % 2 == 0: n = int(n / 2) else: n = int(3 * n + 1) print(n) def collatz_chain_length(n): length_chain = 0 while n != 1: if n % 2 == 0: n = int(n / 2) else: n = int(3 * n + 1) length_chain += 1 return lengthChain max_chain_length = 0 max_chain_value = 0 for i in range(100, 1000000): chain_length = collatz_chain_length(i) if maxChainLength < chainLength: max_chain_length = chainLength max_chain_value = i else: continue print(maxChainValue)
vowels = "aeiouAEIOU" consonants = "bcdfghjklmnpqrstvwxyz"; consonants+=consonants.upper() #The f means final, I thought acually writing final would take to long fvowels = "" fcon="" fother="" userInput = input("Please input sentance to split: ") print ("Splitting sentance: " + userInput) #Iterates through inputed charecters for char in userInput: #Checks if the current iterated charecter is a vowel if char in vowels: fvowels += char #Checks if the current iterated charecter is a consonant elif char in consonants: fcon+= char #Otherwise else: fother += char print("Process Completed") print("Vowels: " + fvowels) print("Consonants: " + fcon) print("Other: "+ fother)
vowels = 'aeiouAEIOU' consonants = 'bcdfghjklmnpqrstvwxyz' consonants += consonants.upper() fvowels = '' fcon = '' fother = '' user_input = input('Please input sentance to split: ') print('Splitting sentance: ' + userInput) for char in userInput: if char in vowels: fvowels += char elif char in consonants: fcon += char else: fother += char print('Process Completed') print('Vowels: ' + fvowels) print('Consonants: ' + fcon) print('Other: ' + fother)
#!/usr/bin/env python3 # Replace by your own program print("hello world")
print('hello world')
#! /usr/bin/env python # -*- coding: utf-8 -*- """ @Author:lichunhui @Time: 2018/7/12 10:12 @Description: """
""" @Author:lichunhui @Time: 2018/7/12 10:12 @Description: """
""" Module: 'flowlib.faces._encode' on M5 FlowUI v1.4.0-beta """ # MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32') # Stubber: 1.3.1 class Encode: '' def _available(): pass def _update(): pass def clearValue(): pass def deinit(): pass def getDir(): pass def getPress(): pass def getValue(): pass def setLed(): pass i2c_bus = None time = None
""" Module: 'flowlib.faces._encode' on M5 FlowUI v1.4.0-beta """ class Encode: """""" def _available(): pass def _update(): pass def clear_value(): pass def deinit(): pass def get_dir(): pass def get_press(): pass def get_value(): pass def set_led(): pass i2c_bus = None time = None
""" Database module """ class Database(object): """ Defines data structures and methods to store article content. """ def save(self, article): """ Saves an article. Args: article: article metadata and text content """ def complete(self): """ Signals processing is complete and runs final storage methods. """ def close(self): """ Commits and closes the database. """
""" Database module """ class Database(object): """ Defines data structures and methods to store article content. """ def save(self, article): """ Saves an article. Args: article: article metadata and text content """ def complete(self): """ Signals processing is complete and runs final storage methods. """ def close(self): """ Commits and closes the database. """
def is_mechanic(user): return user.groups.filter(name='mechanic') # return user.is_superuser def is_mechanic_above(user): return user.groups.filter(name='mechanic') or user.is_superuser # return user.is_superuser
def is_mechanic(user): return user.groups.filter(name='mechanic') def is_mechanic_above(user): return user.groups.filter(name='mechanic') or user.is_superuser
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ class ClassTools(object): def copyattrs(self, source, names): for name in names: setattr(self, name, getattr(source, name)) def copyvalues(self, *args, **kwargs): self.copyattrs(*args, **kwargs) def copyclasses(self, source, names, function): for name in names: classin = getattr(source, name) classout = function(classin) setattr(self, name, classout) def init_copy(self, arglist, kwarglist): args = [getattr(self, name) for name in arglist] kwargs = dict([(name, getattr(self, name)) for name in kwarglist]) return type(self)(*args, **kwargs)
""" Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ class Classtools(object): def copyattrs(self, source, names): for name in names: setattr(self, name, getattr(source, name)) def copyvalues(self, *args, **kwargs): self.copyattrs(*args, **kwargs) def copyclasses(self, source, names, function): for name in names: classin = getattr(source, name) classout = function(classin) setattr(self, name, classout) def init_copy(self, arglist, kwarglist): args = [getattr(self, name) for name in arglist] kwargs = dict([(name, getattr(self, name)) for name in kwarglist]) return type(self)(*args, **kwargs)
less = "Nimis"; more = "Non satis"; requiredGold = 104; def sumCoinValues(coins): totalValue = 0; for coin in coins: totalValue += coin.value return totalValue def collectAllCoins(): item = hero.findNearest(hero.findItems()) while item: hero.moveXY(item.pos.x, item.pos.y) item = hero.findNearest(hero.findItems()) while True: items = hero.findItems() goldAmount = sumCoinValues(items) if goldAmount != 0: if goldAmount < requiredGold: hero.say(less) elif goldAmount > requiredGold: hero.say(more) else: collectAllCoins()
less = 'Nimis' more = 'Non satis' required_gold = 104 def sum_coin_values(coins): total_value = 0 for coin in coins: total_value += coin.value return totalValue def collect_all_coins(): item = hero.findNearest(hero.findItems()) while item: hero.moveXY(item.pos.x, item.pos.y) item = hero.findNearest(hero.findItems()) while True: items = hero.findItems() gold_amount = sum_coin_values(items) if goldAmount != 0: if goldAmount < requiredGold: hero.say(less) elif goldAmount > requiredGold: hero.say(more) else: collect_all_coins()
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 02/12/2017 8:57 PM # @Project : BioQueue # @Author : Li Yao # @File : svn.py def get_sub_protocol(db_obj, protocol_parent, step_order_start=1): steps = list() steps.append(db_obj(software='svn', parameter='checkout {{InputFile}}', parent=protocol_parent, user_id=0, hash='c025d53644388a50fb3704b4a81d5a93', step_order=step_order_start)) return step_order_start+len(steps), steps
def get_sub_protocol(db_obj, protocol_parent, step_order_start=1): steps = list() steps.append(db_obj(software='svn', parameter='checkout {{InputFile}}', parent=protocol_parent, user_id=0, hash='c025d53644388a50fb3704b4a81d5a93', step_order=step_order_start)) return (step_order_start + len(steps), steps)
n = int(input("> ")) suma = 0 while n > 0: suma += n % 10 n //= 10 print(suma)
n = int(input('> ')) suma = 0 while n > 0: suma += n % 10 n //= 10 print(suma)
# Author: Ashish Jangra from Teenage Coder var_int = 3 var_float = -3.14 var_boolean = False var_string = "True" print(type(var_int)) print(type(var_boolean)) print(type(var_string)) print(type(var_float))
var_int = 3 var_float = -3.14 var_boolean = False var_string = 'True' print(type(var_int)) print(type(var_boolean)) print(type(var_string)) print(type(var_float))
class Saml: def __init__(self, britive): self.britive = britive self.base_url = f'{self.britive.base_url}/saml' def settings(self, as_list: bool = False) -> any: """ Retrieve the SAML settings for the tenant. For historical reasons there was a time in which multiple SAML settings could exist for a given tenant. This was to support certificate rotation. However a change in certificate issuance occurred and as a result this API call will only ever return 1 item in the list now. As such, `as_list` will default to `False` but returning the data as a list will continue to be supported for backwards compatibility. :param as_list: There is only 1 set of SAML settings per tenant. The API returns the settings as list but since there is only one this python library will return the single settings dict unless this parameter is set to True. :return: Details of the SAML settings for the tenant. """ settings = self.britive.get(f'{self.base_url}/settings') if as_list: return settings return settings[0] def metadata(self) -> str: """ Return the SAML metadata required in the SAML SSO configuration with a service provider. This operation is supported only in AWS and Oracle. The caller is responsible for saving this content to disk, if needed. :return: String representing the SAML XML metadata. """ saml_id = self.settings(as_list=False)['id'] return self.britive.get(f'{self.base_url}/metadata/{saml_id}') def certificate(self): """ Return the SAML certificate required in the SAML SSO configuration with a service provider. This operation is applicable for applications that do not support importing SAML metadata. The caller is responsible for saving this content to disk, if needed. :return: String representing the SAML XML metadata. """ saml_id = self.settings(as_list=False)['id'] return self.britive.get(f'{self.base_url}/certificate/{saml_id}')
class Saml: def __init__(self, britive): self.britive = britive self.base_url = f'{self.britive.base_url}/saml' def settings(self, as_list: bool=False) -> any: """ Retrieve the SAML settings for the tenant. For historical reasons there was a time in which multiple SAML settings could exist for a given tenant. This was to support certificate rotation. However a change in certificate issuance occurred and as a result this API call will only ever return 1 item in the list now. As such, `as_list` will default to `False` but returning the data as a list will continue to be supported for backwards compatibility. :param as_list: There is only 1 set of SAML settings per tenant. The API returns the settings as list but since there is only one this python library will return the single settings dict unless this parameter is set to True. :return: Details of the SAML settings for the tenant. """ settings = self.britive.get(f'{self.base_url}/settings') if as_list: return settings return settings[0] def metadata(self) -> str: """ Return the SAML metadata required in the SAML SSO configuration with a service provider. This operation is supported only in AWS and Oracle. The caller is responsible for saving this content to disk, if needed. :return: String representing the SAML XML metadata. """ saml_id = self.settings(as_list=False)['id'] return self.britive.get(f'{self.base_url}/metadata/{saml_id}') def certificate(self): """ Return the SAML certificate required in the SAML SSO configuration with a service provider. This operation is applicable for applications that do not support importing SAML metadata. The caller is responsible for saving this content to disk, if needed. :return: String representing the SAML XML metadata. """ saml_id = self.settings(as_list=False)['id'] return self.britive.get(f'{self.base_url}/certificate/{saml_id}')
# version code d345910f07ae coursera = 1 # Please fill out this stencil and submit using the provided submission script. ## 1: (Task 1) Movie Review ## Task 1 def movie_review(name): """ Input: the name of a movie Output: a string (one of the review options), selected at random using randint """ return ... ## 2: (Task 2) Make Inverse Index def makeInverseIndex(strlist): """ Input: a list of documents as strings Output: a dictionary that maps each word in any document to the set consisting of the document ids (ie, the index in the strlist) for all documents containing the word. Distinguish between an occurence of a string (e.g. "use") in the document as a word (surrounded by spaces), and an occurence of the string as a substring of a word (e.g. "because"). Only the former should be represented in the inverse index. Feel free to use a loop instead of a comprehension. Example: >>> makeInverseIndex(['hello world','hello','hello cat','hellolot of cats']) == {'hello': {0, 1, 2}, 'cat': {2}, 'of': {3}, 'world': {0}, 'cats': {3}, 'hellolot': {3}} True """ pass ## 3: (Task 3) Or Search def orSearch(inverseIndex, query): """ Input: an inverse index, as created by makeInverseIndex, and a list of words to query Output: the set of document ids that contain _any_ of the specified words Feel free to use a loop instead of a comprehension. >>> idx = makeInverseIndex(['Johann Sebastian Bach', 'Johannes Brahms', 'Johann Strauss the Younger', 'Johann Strauss the Elder', ' Johann Christian Bach', 'Carl Philipp Emanuel Bach']) >>> orSearch(idx, ['Bach','the']) {0, 2, 3, 4, 5} >>> orSearch(idx, ['Johann', 'Carl']) {0, 2, 3, 4, 5} """ pass ## 4: (Task 4) And Search def andSearch(inverseIndex, query): """ Input: an inverse index, as created by makeInverseIndex, and a list of words to query Output: the set of all document ids that contain _all_ of the specified words Feel free to use a loop instead of a comprehension. >>> idx = makeInverseIndex(['Johann Sebastian Bach', 'Johannes Brahms', 'Johann Strauss the Younger', 'Johann Strauss the Elder', ' Johann Christian Bach', 'Carl Philipp Emanuel Bach']) >>> andSearch(idx, ['Johann', 'the']) {2, 3} >>> andSearch(idx, ['Johann', 'Bach']) {0, 4} """ pass
coursera = 1 def movie_review(name): """ Input: the name of a movie Output: a string (one of the review options), selected at random using randint """ return ... def make_inverse_index(strlist): """ Input: a list of documents as strings Output: a dictionary that maps each word in any document to the set consisting of the document ids (ie, the index in the strlist) for all documents containing the word. Distinguish between an occurence of a string (e.g. "use") in the document as a word (surrounded by spaces), and an occurence of the string as a substring of a word (e.g. "because"). Only the former should be represented in the inverse index. Feel free to use a loop instead of a comprehension. Example: >>> makeInverseIndex(['hello world','hello','hello cat','hellolot of cats']) == {'hello': {0, 1, 2}, 'cat': {2}, 'of': {3}, 'world': {0}, 'cats': {3}, 'hellolot': {3}} True """ pass def or_search(inverseIndex, query): """ Input: an inverse index, as created by makeInverseIndex, and a list of words to query Output: the set of document ids that contain _any_ of the specified words Feel free to use a loop instead of a comprehension. >>> idx = makeInverseIndex(['Johann Sebastian Bach', 'Johannes Brahms', 'Johann Strauss the Younger', 'Johann Strauss the Elder', ' Johann Christian Bach', 'Carl Philipp Emanuel Bach']) >>> orSearch(idx, ['Bach','the']) {0, 2, 3, 4, 5} >>> orSearch(idx, ['Johann', 'Carl']) {0, 2, 3, 4, 5} """ pass def and_search(inverseIndex, query): """ Input: an inverse index, as created by makeInverseIndex, and a list of words to query Output: the set of all document ids that contain _all_ of the specified words Feel free to use a loop instead of a comprehension. >>> idx = makeInverseIndex(['Johann Sebastian Bach', 'Johannes Brahms', 'Johann Strauss the Younger', 'Johann Strauss the Elder', ' Johann Christian Bach', 'Carl Philipp Emanuel Bach']) >>> andSearch(idx, ['Johann', 'the']) {2, 3} >>> andSearch(idx, ['Johann', 'Bach']) {0, 4} """ pass
a, b, c, x, y = map(int, input().split()) ans = 5000*(10**5)*2 for i in range(max(x, y)+1): tmp_ans = i*2*c if x > i: tmp_ans += (x-i)*a if y > i: tmp_ans += (y-i)*b ans = min(ans, tmp_ans) print(ans)
(a, b, c, x, y) = map(int, input().split()) ans = 5000 * 10 ** 5 * 2 for i in range(max(x, y) + 1): tmp_ans = i * 2 * c if x > i: tmp_ans += (x - i) * a if y > i: tmp_ans += (y - i) * b ans = min(ans, tmp_ans) print(ans)
# Python - 2.7.6 def AddExtra(listOfNumbers): return listOfNumbers + ['']
def add_extra(listOfNumbers): return listOfNumbers + ['']
@dataclass class Position: x: int = 0 y: int = 0 def __matmul__(self, other: tuple[int, int]) -> None: self.x = other[0] self.y = other[1]
@dataclass class Position: x: int = 0 y: int = 0 def __matmul__(self, other: tuple[int, int]) -> None: self.x = other[0] self.y = other[1]
# testlist_comp # : (test | star_expr) (comp_for | (COMMA (test | star_expr))* COMMA?) # ; # test [x] # star_expr comp_for [z for z in a] # test COMMA star_expr COMMA [x, *a,] # star_expr COMMA test COMMA star_expr [*u, a, *i]
[x] [z for z in a] [x, *a] [*u, a, *i]
"""Errors not related to the Telegram API itself""" class ReadCancelledError(Exception): """Occurs when a read operation was cancelled.""" def __init__(self): super().__init__(self, 'The read operation was cancelled.') class TypeNotFoundError(Exception): """ Occurs when a type is not found, for example, when trying to read a TLObject with an invalid constructor code. """ def __init__(self, invalid_constructor_id): super().__init__( self, 'Could not find a matching Constructor ID for the TLObject ' 'that was supposed to be read with ID {}. Most likely, a TLObject ' 'was trying to be read when it should not be read.' .format(hex(invalid_constructor_id))) self.invalid_constructor_id = invalid_constructor_id class InvalidChecksumError(Exception): """ Occurs when using the TCP full mode and the checksum of a received packet doesn't match the expected checksum. """ def __init__(self, checksum, valid_checksum): super().__init__( self, 'Invalid checksum ({} when {} was expected). ' 'This packet should be skipped.' .format(checksum, valid_checksum)) self.checksum = checksum self.valid_checksum = valid_checksum class BrokenAuthKeyError(Exception): """ Occurs when the authorization key for a data center is not valid. """ def __init__(self): super().__init__( self, 'The authorization key is broken, and it must be reset.' ) class SecurityError(Exception): """ Generic security error, mostly used when generating a new AuthKey. """ def __init__(self, *args): if not args: args = ['A security check failed.'] super().__init__(self, *args) class CdnFileTamperedError(SecurityError): """ Occurs when there's a hash mismatch between the decrypted CDN file and its expected hash. """ def __init__(self): super().__init__( 'The CDN file has been altered and its download cancelled.' )
"""Errors not related to the Telegram API itself""" class Readcancellederror(Exception): """Occurs when a read operation was cancelled.""" def __init__(self): super().__init__(self, 'The read operation was cancelled.') class Typenotfounderror(Exception): """ Occurs when a type is not found, for example, when trying to read a TLObject with an invalid constructor code. """ def __init__(self, invalid_constructor_id): super().__init__(self, 'Could not find a matching Constructor ID for the TLObject that was supposed to be read with ID {}. Most likely, a TLObject was trying to be read when it should not be read.'.format(hex(invalid_constructor_id))) self.invalid_constructor_id = invalid_constructor_id class Invalidchecksumerror(Exception): """ Occurs when using the TCP full mode and the checksum of a received packet doesn't match the expected checksum. """ def __init__(self, checksum, valid_checksum): super().__init__(self, 'Invalid checksum ({} when {} was expected). This packet should be skipped.'.format(checksum, valid_checksum)) self.checksum = checksum self.valid_checksum = valid_checksum class Brokenauthkeyerror(Exception): """ Occurs when the authorization key for a data center is not valid. """ def __init__(self): super().__init__(self, 'The authorization key is broken, and it must be reset.') class Securityerror(Exception): """ Generic security error, mostly used when generating a new AuthKey. """ def __init__(self, *args): if not args: args = ['A security check failed.'] super().__init__(self, *args) class Cdnfiletamperederror(SecurityError): """ Occurs when there's a hash mismatch between the decrypted CDN file and its expected hash. """ def __init__(self): super().__init__('The CDN file has been altered and its download cancelled.')
def foo(x): return 1/x def zoo(x): res = foo(x) return res print(zoo(0))
def foo(x): return 1 / x def zoo(x): res = foo(x) return res print(zoo(0))
# Email Configuration EMAIL_PORT = 587 EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'bob' EMAIL_USE_TLS = True
email_port = 587 email_host = 'smtp.gmail.com' email_host_user = '[email protected]' email_host_password = 'bob' email_use_tls = True
self.description = "dir->symlink change during package upgrade (conflict)" p1 = pmpkg("pkg1", "1.0-1") p1.files = ["test/", "test/file1", "test/dir/file1", "test/dir/file2"] self.addpkg2db("local", p1) p2 = pmpkg("pkg2") p2.files = ["test/dir/file3"] self.addpkg2db("local", p2) p3 = pmpkg("pkg1", "2.0-1") p3.files = ["test2/", "test2/file3", "test -> test2"] self.addpkg2db("sync", p3) self.args = "-S pkg1" self.addrule("PACMAN_RETCODE=1") self.addrule("PKG_EXIST=pkg1") self.addrule("PKG_VERSION=pkg1|1.0-1")
self.description = 'dir->symlink change during package upgrade (conflict)' p1 = pmpkg('pkg1', '1.0-1') p1.files = ['test/', 'test/file1', 'test/dir/file1', 'test/dir/file2'] self.addpkg2db('local', p1) p2 = pmpkg('pkg2') p2.files = ['test/dir/file3'] self.addpkg2db('local', p2) p3 = pmpkg('pkg1', '2.0-1') p3.files = ['test2/', 'test2/file3', 'test -> test2'] self.addpkg2db('sync', p3) self.args = '-S pkg1' self.addrule('PACMAN_RETCODE=1') self.addrule('PKG_EXIST=pkg1') self.addrule('PKG_VERSION=pkg1|1.0-1')
# __about__.py # # Copyright (C) 2006-2020 wolfSSL Inc. # # This file is part of wolfSSL. # # wolfSSL is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # wolfSSL is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA #/ metadata = dict( __name__ = "wolfcrypt", __version__ = "0.1.9", __license__ = "GPLv2 or Commercial License", __author__ = "wolfSSL Inc.", __author_email__ = "[email protected]", __url__ = "https://wolfssl.github.io/wolfcrypt-py", __description__ = \ u"A Python library that encapsulates wolfSSL's wolfCrypt API.", __keywords__ = "security, cryptography, ssl, embedded, embedded ssl", __classifiers__ = [ u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", u"License :: Other/Proprietary License", u"Operating System :: OS Independent", u"Programming Language :: Python :: 2.7", u"Programming Language :: Python :: 3.5", u"Topic :: Security", u"Topic :: Security :: Cryptography", u"Topic :: Software Development" ] ) globals().update(metadata) __all__ = list(metadata.keys())
metadata = dict(__name__='wolfcrypt', __version__='0.1.9', __license__='GPLv2 or Commercial License', __author__='wolfSSL Inc.', __author_email__='[email protected]', __url__='https://wolfssl.github.io/wolfcrypt-py', __description__=u"A Python library that encapsulates wolfSSL's wolfCrypt API.", __keywords__='security, cryptography, ssl, embedded, embedded ssl', __classifiers__=[u'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', u'License :: Other/Proprietary License', u'Operating System :: OS Independent', u'Programming Language :: Python :: 2.7', u'Programming Language :: Python :: 3.5', u'Topic :: Security', u'Topic :: Security :: Cryptography', u'Topic :: Software Development']) globals().update(metadata) __all__ = list(metadata.keys())
class Notifier: def __init__(self, transporter): self.transporter = transporter def log(self, s): self.transporter.send('logs', s) def error(self, message, stack): self.transporter.send('process:exception', { 'message': message, 'stack': stack })
class Notifier: def __init__(self, transporter): self.transporter = transporter def log(self, s): self.transporter.send('logs', s) def error(self, message, stack): self.transporter.send('process:exception', {'message': message, 'stack': stack})
# sub_tasks_no_name.py data_sets = ['Tmean', 'Sunshine'] def task_reformat_data(): """Reformats all raw files for easier analysis""" for data_type in data_sets: yield { 'actions': ['python reformat_weather_data.py %(dependencies)s > %(targets)s'], 'file_dep': ['UK_{}_data.txt'.format(data_type)], 'targets': ['UK_{}_data.reformatted.txt'.format(data_type)], }
data_sets = ['Tmean', 'Sunshine'] def task_reformat_data(): """Reformats all raw files for easier analysis""" for data_type in data_sets: yield {'actions': ['python reformat_weather_data.py %(dependencies)s > %(targets)s'], 'file_dep': ['UK_{}_data.txt'.format(data_type)], 'targets': ['UK_{}_data.reformatted.txt'.format(data_type)]}
def isPalindrome(s): """ :type s: str :rtype: bool """ s = "".join([i.lower() for i in s if i.isalnum()]) if len(s) == 0: return True count = -1 for i in range(len(s)): if s[i] == s[count]: count -= 1 else: return False return True Input = "A man, a plan, a canal: Panama" print(isPalindrome(Input)) # Output: true
def is_palindrome(s): """ :type s: str :rtype: bool """ s = ''.join([i.lower() for i in s if i.isalnum()]) if len(s) == 0: return True count = -1 for i in range(len(s)): if s[i] == s[count]: count -= 1 else: return False return True input = 'A man, a plan, a canal: Panama' print(is_palindrome(Input))
class Registry: def __init__(self): self._registered_methods = {} def namespaces(self): return list(self._registered_methods) def methods(self, *namespace_path): return self._registered_methods[namespace_path] def clear(self): self._registered_methods = {} def register_at(self, *namespace_path, name="new", **call_options): def wrapper(fn): registry_namespace = self._registered_methods.setdefault(namespace_path, {}) if name in registry_namespace: raise ValueError( "Name '{}' is already registered in namespace {}".format( name, namespace_path ) ) registry_namespace[name] = Method(fn, call_options) return fn return wrapper class Method: def __init__(self, fn, call_options): self.fn = fn self.call_options = call_options registry = Registry() register_at = registry.register_at
class Registry: def __init__(self): self._registered_methods = {} def namespaces(self): return list(self._registered_methods) def methods(self, *namespace_path): return self._registered_methods[namespace_path] def clear(self): self._registered_methods = {} def register_at(self, *namespace_path, name='new', **call_options): def wrapper(fn): registry_namespace = self._registered_methods.setdefault(namespace_path, {}) if name in registry_namespace: raise value_error("Name '{}' is already registered in namespace {}".format(name, namespace_path)) registry_namespace[name] = method(fn, call_options) return fn return wrapper class Method: def __init__(self, fn, call_options): self.fn = fn self.call_options = call_options registry = registry() register_at = registry.register_at
class AppRoutes: def __init__(self) -> None: self.prefix = "/api" self.users_sign_ups = "/api/users/sign-ups" self.auth_token = "/api/auth/token" self.auth_token_long = "/api/auth/token/long" self.auth_refresh = "/api/auth/refresh" self.users = "/api/users" self.users_self = "/api/users/self" self.groups = "/api/groups" self.groups_self = "/api/groups/self" self.recipes = "/api/recipes" self.recipes_category = "/api/recipes/category" self.recipes_tag = "/api/recipes/tag" self.categories = "/api/categories" self.recipes_tags = "/api/recipes/tags/" self.recipes_create = "/api/recipes/create" self.recipes_create_url = "/api/recipes/create-url" self.meal_plans_all = "/api/meal-plans/all" self.meal_plans_create = "/api/meal-plans/create" self.meal_plans_this_week = "/api/meal-plans/this-week" self.meal_plans_today = "/api/meal-plans/today" self.site_settings_custom_pages = "/api/site-settings/custom-pages" self.site_settings = "/api/site-settings" self.site_settings_webhooks_test = "/api/site-settings/webhooks/test" self.themes = "/api/themes" self.themes_create = "/api/themes/create" self.backups_available = "/api/backups/available" self.backups_export_database = "/api/backups/export/database" self.backups_upload = "/api/backups/upload" self.migrations = "/api/migrations" self.debug_version = "/api/debug/version" self.debug_last_recipe_json = "/api/debug/last-recipe-json" def users_sign_ups_token(self, token): return f"{self.prefix}/users/sign-ups/{token}" def users_id(self, id): return f"{self.prefix}/users/{id}" def users_id_reset_password(self, id): return f"{self.prefix}/users/{id}/reset-password" def users_id_image(self, id): return f"{self.prefix}/users/{id}/image" def users_id_password(self, id): return f"{self.prefix}/users/{id}/password" def groups_id(self, id): return f"{self.prefix}/groups/{id}" def categories_category(self, category): return f"{self.prefix}/categories/{category}" def recipes_tags_tag(self, tag): return f"{self.prefix}/recipes/tags/{tag}" def recipes_recipe_slug(self, recipe_slug): return f"{self.prefix}/recipes/{recipe_slug}" def recipes_recipe_slug_image(self, recipe_slug): return f"{self.prefix}/recipes/{recipe_slug}/image" def meal_plans_plan_id(self, plan_id): return f"{self.prefix}/meal-plans/{plan_id}" def meal_plans_id_shopping_list(self, id): return f"{self.prefix}/meal-plans/{id}/shopping-list" def site_settings_custom_pages_id(self, id): return f"{self.prefix}/site-settings/custom-pages/{id}" def themes_theme_name(self, theme_name): return f"{self.prefix}/themes/{theme_name}" def backups_file_name_download(self, file_name): return f"{self.prefix}/backups/{file_name}/download" def backups_file_name_import(self, file_name): return f"{self.prefix}/backups/{file_name}/import" def backups_file_name_delete(self, file_name): return f"{self.prefix}/backups/{file_name}/delete" def migrations_source_file_name_import(self, source, file_name): return f"{self.prefix}/migrations/{source}/{file_name}/import" def migrations_source_file_name_delete(self, source, file_name): return f"{self.prefix}/migrations/{source}/{file_name}/delete" def migrations_source_upload(self, source): return f"{self.prefix}/migrations/{source}/upload" def debug_log_num(self, num): return f"{self.prefix}/debug/log/{num}"
class Approutes: def __init__(self) -> None: self.prefix = '/api' self.users_sign_ups = '/api/users/sign-ups' self.auth_token = '/api/auth/token' self.auth_token_long = '/api/auth/token/long' self.auth_refresh = '/api/auth/refresh' self.users = '/api/users' self.users_self = '/api/users/self' self.groups = '/api/groups' self.groups_self = '/api/groups/self' self.recipes = '/api/recipes' self.recipes_category = '/api/recipes/category' self.recipes_tag = '/api/recipes/tag' self.categories = '/api/categories' self.recipes_tags = '/api/recipes/tags/' self.recipes_create = '/api/recipes/create' self.recipes_create_url = '/api/recipes/create-url' self.meal_plans_all = '/api/meal-plans/all' self.meal_plans_create = '/api/meal-plans/create' self.meal_plans_this_week = '/api/meal-plans/this-week' self.meal_plans_today = '/api/meal-plans/today' self.site_settings_custom_pages = '/api/site-settings/custom-pages' self.site_settings = '/api/site-settings' self.site_settings_webhooks_test = '/api/site-settings/webhooks/test' self.themes = '/api/themes' self.themes_create = '/api/themes/create' self.backups_available = '/api/backups/available' self.backups_export_database = '/api/backups/export/database' self.backups_upload = '/api/backups/upload' self.migrations = '/api/migrations' self.debug_version = '/api/debug/version' self.debug_last_recipe_json = '/api/debug/last-recipe-json' def users_sign_ups_token(self, token): return f'{self.prefix}/users/sign-ups/{token}' def users_id(self, id): return f'{self.prefix}/users/{id}' def users_id_reset_password(self, id): return f'{self.prefix}/users/{id}/reset-password' def users_id_image(self, id): return f'{self.prefix}/users/{id}/image' def users_id_password(self, id): return f'{self.prefix}/users/{id}/password' def groups_id(self, id): return f'{self.prefix}/groups/{id}' def categories_category(self, category): return f'{self.prefix}/categories/{category}' def recipes_tags_tag(self, tag): return f'{self.prefix}/recipes/tags/{tag}' def recipes_recipe_slug(self, recipe_slug): return f'{self.prefix}/recipes/{recipe_slug}' def recipes_recipe_slug_image(self, recipe_slug): return f'{self.prefix}/recipes/{recipe_slug}/image' def meal_plans_plan_id(self, plan_id): return f'{self.prefix}/meal-plans/{plan_id}' def meal_plans_id_shopping_list(self, id): return f'{self.prefix}/meal-plans/{id}/shopping-list' def site_settings_custom_pages_id(self, id): return f'{self.prefix}/site-settings/custom-pages/{id}' def themes_theme_name(self, theme_name): return f'{self.prefix}/themes/{theme_name}' def backups_file_name_download(self, file_name): return f'{self.prefix}/backups/{file_name}/download' def backups_file_name_import(self, file_name): return f'{self.prefix}/backups/{file_name}/import' def backups_file_name_delete(self, file_name): return f'{self.prefix}/backups/{file_name}/delete' def migrations_source_file_name_import(self, source, file_name): return f'{self.prefix}/migrations/{source}/{file_name}/import' def migrations_source_file_name_delete(self, source, file_name): return f'{self.prefix}/migrations/{source}/{file_name}/delete' def migrations_source_upload(self, source): return f'{self.prefix}/migrations/{source}/upload' def debug_log_num(self, num): return f'{self.prefix}/debug/log/{num}'
release_major = 2 release_minor = 3 release_patch = 0 release_so_abi_rev = 2 # These are set by the distribution script release_vc_rev = None release_datestamp = 0 release_type = 'unreleased'
release_major = 2 release_minor = 3 release_patch = 0 release_so_abi_rev = 2 release_vc_rev = None release_datestamp = 0 release_type = 'unreleased'
# -*- coding: utf-8 -*- def two_sum(nums, target): if ((nums is None) or not isinstance(nums, list) or len(nums) == 0): return False nums.sort() low, high = 0, len(nums) - 1 while low < high: total = nums[low] + nums[high] if total < target: while low + 1 < high and nums[low] == nums[low + 1]: low += 1 low += 1 elif total > target: while high - 1 >= low and nums[high - 1] == nums[high]: high -= 1 high -= 1 else: return True return False if __name__ == '__main__': nums = [10, 15, 3, 7] k = 17 print(' Input:', nums, sep=' ') print(' Target: ', k, sep=' ') found = two_sum(nums, k) print('', 'found' if found else 'NOT found')
def two_sum(nums, target): if nums is None or not isinstance(nums, list) or len(nums) == 0: return False nums.sort() (low, high) = (0, len(nums) - 1) while low < high: total = nums[low] + nums[high] if total < target: while low + 1 < high and nums[low] == nums[low + 1]: low += 1 low += 1 elif total > target: while high - 1 >= low and nums[high - 1] == nums[high]: high -= 1 high -= 1 else: return True return False if __name__ == '__main__': nums = [10, 15, 3, 7] k = 17 print(' Input:', nums, sep=' ') print(' Target: ', k, sep=' ') found = two_sum(nums, k) print('', 'found' if found else 'NOT found')
"""Top-level package for Nexia.""" __version__ = "0.1.0" ROOT_URL = "https://www.mynexia.com" MOBILE_URL = f"{ROOT_URL}/mobile" DEFAULT_DEVICE_NAME = "Home Automation" PUT_UPDATE_DELAY = 0.5 HOLD_PERMANENT = "permanent_hold" HOLD_RESUME_SCHEDULE = "run_schedule" OPERATION_MODE_AUTO = "AUTO" OPERATION_MODE_COOL = "COOL" OPERATION_MODE_HEAT = "HEAT" OPERATION_MODE_OFF = "OFF" OPERATION_MODES = [ OPERATION_MODE_AUTO, OPERATION_MODE_COOL, OPERATION_MODE_HEAT, OPERATION_MODE_OFF, ] # The order of these is important as it maps to preset# PRESET_MODE_HOME = "Home" PRESET_MODE_AWAY = "Away" PRESET_MODE_SLEEP = "Sleep" PRESET_MODE_NONE = "None" SYSTEM_STATUS_COOL = "Cooling" SYSTEM_STATUS_HEAT = "Heating" SYSTEM_STATUS_WAIT = "Waiting..." SYSTEM_STATUS_IDLE = "System Idle" AIR_CLEANER_MODE_AUTO = "auto" AIR_CLEANER_MODE_QUICK = "quick" AIR_CLEANER_MODE_ALLERGY = "allergy" AIR_CLEANER_MODES = [ AIR_CLEANER_MODE_AUTO, AIR_CLEANER_MODE_QUICK, AIR_CLEANER_MODE_ALLERGY, ] HUMIDITY_MIN = 0.35 HUMIDITY_MAX = 0.65 APP_VERSION = "5.9.0" UNIT_CELSIUS = "C" UNIT_FAHRENHEIT = "F" DAMPER_CLOSED = "Damper Closed" DAMPER_OPEN = "Damper Open" ZONE_IDLE = "Idle" ALL_IDS = "all"
"""Top-level package for Nexia.""" __version__ = '0.1.0' root_url = 'https://www.mynexia.com' mobile_url = f'{ROOT_URL}/mobile' default_device_name = 'Home Automation' put_update_delay = 0.5 hold_permanent = 'permanent_hold' hold_resume_schedule = 'run_schedule' operation_mode_auto = 'AUTO' operation_mode_cool = 'COOL' operation_mode_heat = 'HEAT' operation_mode_off = 'OFF' operation_modes = [OPERATION_MODE_AUTO, OPERATION_MODE_COOL, OPERATION_MODE_HEAT, OPERATION_MODE_OFF] preset_mode_home = 'Home' preset_mode_away = 'Away' preset_mode_sleep = 'Sleep' preset_mode_none = 'None' system_status_cool = 'Cooling' system_status_heat = 'Heating' system_status_wait = 'Waiting...' system_status_idle = 'System Idle' air_cleaner_mode_auto = 'auto' air_cleaner_mode_quick = 'quick' air_cleaner_mode_allergy = 'allergy' air_cleaner_modes = [AIR_CLEANER_MODE_AUTO, AIR_CLEANER_MODE_QUICK, AIR_CLEANER_MODE_ALLERGY] humidity_min = 0.35 humidity_max = 0.65 app_version = '5.9.0' unit_celsius = 'C' unit_fahrenheit = 'F' damper_closed = 'Damper Closed' damper_open = 'Damper Open' zone_idle = 'Idle' all_ids = 'all'
''' Python program which adds up columns and rows of given table as shown in the specified figure Input number of rows/columns (0 to exit) 4 Input cell value: 25 69 51 26 68 35 29 54 54 57 45 63 61 68 47 59 Result: 25 69 51 26 171 68 35 29 54 186 54 57 45 63 219 61 68 47 59 235 208 229 172 202 811 Input number of rows/columns (0 to exit) ''' while True: print("Input number of rows/columns (0 to exit)") n = int(input()) if n == 0: break print("Input cell value:") x = [] for i in range(n): x.append([int(num) for num in input().split()]) for i in range(n): sum = 0 for j in range(n): sum += x[i][j] x[i].append(sum) x.append([]) for i in range(n + 1): sum = 0 for j in range(n): sum += x[j][i] x[n].append(sum) print("Result:") for i in range(n + 1): for j in range(n + 1): print('{0:>5}'.format(x[i][j]), end="") print()
""" Python program which adds up columns and rows of given table as shown in the specified figure Input number of rows/columns (0 to exit) 4 Input cell value: 25 69 51 26 68 35 29 54 54 57 45 63 61 68 47 59 Result: 25 69 51 26 171 68 35 29 54 186 54 57 45 63 219 61 68 47 59 235 208 229 172 202 811 Input number of rows/columns (0 to exit) """ while True: print('Input number of rows/columns (0 to exit)') n = int(input()) if n == 0: break print('Input cell value:') x = [] for i in range(n): x.append([int(num) for num in input().split()]) for i in range(n): sum = 0 for j in range(n): sum += x[i][j] x[i].append(sum) x.append([]) for i in range(n + 1): sum = 0 for j in range(n): sum += x[j][i] x[n].append(sum) print('Result:') for i in range(n + 1): for j in range(n + 1): print('{0:>5}'.format(x[i][j]), end='') print()
# -*- coding: utf-8 -*- """ Created on Tue May 28 19:29:10 2019 @author: ASUS """ #import numpy as np #def factorial(): # my_array = [] # for i in range(5): # my_array.append(int(input("Enter number: "))) # my_array = np.array(my_array) # print(np.floor(my_array)) # #factorial() def factorial(n): if(n <= 1): return 1 else: return(n*factorial(n-1)) n = int(input("Enter number: ")) print(factorial(n))
""" Created on Tue May 28 19:29:10 2019 @author: ASUS """ def factorial(n): if n <= 1: return 1 else: return n * factorial(n - 1) n = int(input('Enter number: ')) print(factorial(n))
# Set up the winner variable to hold None winner = None print('winner:', winner) print('winner is None:', winner is None) print('winner is not None:', winner is not None) print(type(winner)) # Now set winner to be True print('Set winner to True') winner = True print('winner:', winner) print('winner is None:', winner is None) print('winner is not None:', winner is not None) print(type(winner))
winner = None print('winner:', winner) print('winner is None:', winner is None) print('winner is not None:', winner is not None) print(type(winner)) print('Set winner to True') winner = True print('winner:', winner) print('winner is None:', winner is None) print('winner is not None:', winner is not None) print(type(winner))
# This should cover all the syntactical constructs that we hope to support # Intended sources should be the variable `SOURCE` and intended sinks should be # arguments to the function `SINK` (see python/ql/test/experimental/dataflow/testConfig.qll). # # Functions whose name ends with "_with_local_flow" will also be tested for local flow. # These are included so that we can easily evaluate the test code SOURCE = "source" def SINK(x): print(x) def test_tuple_with_local_flow(): x = (3, SOURCE) y = x[1] SINK(y) # List taken from https://docs.python.org/3/reference/expressions.html # 6.2.1. Identifiers (Names) def test_names(): x = SOURCE SINK(x) # 6.2.2. Literals def test_string_literal(): x = "source" SINK(x) def test_bytes_literal(): x = b"source" SINK(x) def test_integer_literal(): x = 42 SINK(x) def test_floatnumber_literal(): x = 42.0 SINK(x) def test_imagnumber_literal(): x = 42j SINK(x) # 6.2.3. Parenthesized forms def test_parenthesized_form(): x = (SOURCE) SINK(x) # 6.2.5. List displays def test_list_display(): x = [SOURCE] SINK(x[0]) def test_list_comprehension(): x = [SOURCE for y in [3]] SINK(x[0]) def test_nested_list_display(): x = [* [SOURCE]] SINK(x[0]) # 6.2.6. Set displays def test_set_display(): x = {SOURCE} SINK(x.pop()) def test_set_comprehension(): x = {SOURCE for y in [3]} SINK(x.pop()) def test_nested_set_display(): x = {* {SOURCE}} SINK(x.pop()) # 6.2.7. Dictionary displays def test_dict_display(): x = {"s": SOURCE} SINK(x["s"]) def test_dict_comprehension(): x = {y: SOURCE for y in ["s"]} SINK(x["s"]) def test_nested_dict_display(): x = {** {"s": SOURCE}} SINK(x["s"]) # 6.2.8. Generator expressions def test_generator(): x = (SOURCE for y in [3]) SINK([*x][0]) # List taken from https://docs.python.org/3/reference/expressions.html # 6. Expressions # 6.1. Arithmetic conversions # 6.2. Atoms # 6.2.1. Identifiers (Names) # 6.2.2. Literals # 6.2.3. Parenthesized forms # 6.2.4. Displays for lists, sets and dictionaries # 6.2.5. List displays # 6.2.6. Set displays # 6.2.7. Dictionary displays # 6.2.8. Generator expressions # 6.2.9. Yield expressions # 6.2.9.1. Generator-iterator methods # 6.2.9.2. Examples # 6.2.9.3. Asynchronous generator functions # 6.2.9.4. Asynchronous generator-iterator methods # 6.3. Primaries # 6.3.1. Attribute references # 6.3.2. Subscriptions # 6.3.3. Slicings # 6.3.4. Calls # 6.4. Await expression # 6.5. The power operator # 6.6. Unary arithmetic and bitwise operations # 6.7. Binary arithmetic operations # 6.8. Shifting operations # 6.9. Binary bitwise operations # 6.10. Comparisons # 6.10.1. Value comparisons # 6.10.2. Membership test operations # 6.10.3. Identity comparisons # 6.11. Boolean operations # 6.12. Assignment expressions # 6.13. Conditional expressions # 6.14. Lambdas # 6.15. Expression lists # 6.16. Evaluation order # 6.17. Operator precedence
source = 'source' def sink(x): print(x) def test_tuple_with_local_flow(): x = (3, SOURCE) y = x[1] sink(y) def test_names(): x = SOURCE sink(x) def test_string_literal(): x = 'source' sink(x) def test_bytes_literal(): x = b'source' sink(x) def test_integer_literal(): x = 42 sink(x) def test_floatnumber_literal(): x = 42.0 sink(x) def test_imagnumber_literal(): x = 42j sink(x) def test_parenthesized_form(): x = SOURCE sink(x) def test_list_display(): x = [SOURCE] sink(x[0]) def test_list_comprehension(): x = [SOURCE for y in [3]] sink(x[0]) def test_nested_list_display(): x = [*[SOURCE]] sink(x[0]) def test_set_display(): x = {SOURCE} sink(x.pop()) def test_set_comprehension(): x = {SOURCE for y in [3]} sink(x.pop()) def test_nested_set_display(): x = {*{SOURCE}} sink(x.pop()) def test_dict_display(): x = {'s': SOURCE} sink(x['s']) def test_dict_comprehension(): x = {y: SOURCE for y in ['s']} sink(x['s']) def test_nested_dict_display(): x = {**{'s': SOURCE}} sink(x['s']) def test_generator(): x = (SOURCE for y in [3]) sink([*x][0])
n = int(input()) prime=0 for i in range(n-1,0,-1): if i==2: prime = i elif(i>2): st=True for j in range(2,int(n**0.5)+1): if(i%j==0): st=False break if(st): prime = i break s_prime=0 for i in range(n+1,n+(n-prime)): if(i>2): st=True for j in range(2,int(n**0.5)+1): if(i%j==0): st=False break if(st): s_prime=i break else: break if(s_prime!=0 and (n-prime > s_prime-n)): print(s_prime) else: print(prime) # input = 10 # output = 11
n = int(input()) prime = 0 for i in range(n - 1, 0, -1): if i == 2: prime = i elif i > 2: st = True for j in range(2, int(n ** 0.5) + 1): if i % j == 0: st = False break if st: prime = i break s_prime = 0 for i in range(n + 1, n + (n - prime)): if i > 2: st = True for j in range(2, int(n ** 0.5) + 1): if i % j == 0: st = False break if st: s_prime = i break else: break if s_prime != 0 and n - prime > s_prime - n: print(s_prime) else: print(prime)
cars = { 'Ford': ['Falcon', 'Focus', 'Festiva', 'Fairlane'], 'Holden': ['Commodore', 'Captiva', 'Barina', 'Trailblazer'], 'Nissan': ['Maxima', 'Pulsar', '350Z', 'Navara'], 'Honda': ['Civic', 'Accord', 'Odyssey', 'Jazz'], 'Jeep': ['Grand Cherokee', 'Cherokee', 'Trailhawk', 'Trackhawk'] } def get_all_jeeps(cars=cars): """return a comma + space (', ') separated string of jeep models (original order)""" return ', '.join(cars['Jeep']) def get_first_model_each_manufacturer(cars=cars): """return a list of matching models (original ordering)""" return [model[0] for _, model in cars.items()] def get_all_matching_models(cars=cars, grep='trail'): """return a list of all models containing the case insensitive 'grep' string which defaults to 'trail' for this exercise, sort the resulting sequence alphabetically""" return sorted([model for _, models in cars.items() for model in models if grep.lower() in str(model).lower()]) def sort_car_models(cars=cars): """return a copy of the cars dict with the car models (values) sorted alphabetically""" return {brand: sorted(model) for brand, model in cars.items()}
cars = {'Ford': ['Falcon', 'Focus', 'Festiva', 'Fairlane'], 'Holden': ['Commodore', 'Captiva', 'Barina', 'Trailblazer'], 'Nissan': ['Maxima', 'Pulsar', '350Z', 'Navara'], 'Honda': ['Civic', 'Accord', 'Odyssey', 'Jazz'], 'Jeep': ['Grand Cherokee', 'Cherokee', 'Trailhawk', 'Trackhawk']} def get_all_jeeps(cars=cars): """return a comma + space (', ') separated string of jeep models (original order)""" return ', '.join(cars['Jeep']) def get_first_model_each_manufacturer(cars=cars): """return a list of matching models (original ordering)""" return [model[0] for (_, model) in cars.items()] def get_all_matching_models(cars=cars, grep='trail'): """return a list of all models containing the case insensitive 'grep' string which defaults to 'trail' for this exercise, sort the resulting sequence alphabetically""" return sorted([model for (_, models) in cars.items() for model in models if grep.lower() in str(model).lower()]) def sort_car_models(cars=cars): """return a copy of the cars dict with the car models (values) sorted alphabetically""" return {brand: sorted(model) for (brand, model) in cars.items()}
""" Entradas Salario-->float-->s Ventas_1-->float-->v1 Ventas_2-->float-->v2 Ventas_3-->float-->v3 Salidas Total_1-->float-->t1 Total_2-->float-->t2 Total_3-->float-->t3 """ s=float(input("Ingrese su salario bruto: ")) v1=float(input("Ingrese las ventas del departamento 1: ")) v2=float(input("Ingrese las ventas del departamento 2: ")) v3=float(input("Ingrese las ventas del departamento 3: ")) vt=v1+v2+v3 p=vt*0.33 if(v1>p): t1=(s*0.20)+s else: t1=s if(v2>p): t2=(s*0.20)+s else: t2=s if(v3>p): t3=(s*0.20)+s else: t3=s print("El pago del departamento 1 es: $","{:.0f}".format(t1)) print("El pago del departamento 2 es: $","{:.0f}".format(t2)) print("EL pafo del departamento 3 es: $","{:.0f}".format(t3))
""" Entradas Salario-->float-->s Ventas_1-->float-->v1 Ventas_2-->float-->v2 Ventas_3-->float-->v3 Salidas Total_1-->float-->t1 Total_2-->float-->t2 Total_3-->float-->t3 """ s = float(input('Ingrese su salario bruto: ')) v1 = float(input('Ingrese las ventas del departamento 1: ')) v2 = float(input('Ingrese las ventas del departamento 2: ')) v3 = float(input('Ingrese las ventas del departamento 3: ')) vt = v1 + v2 + v3 p = vt * 0.33 if v1 > p: t1 = s * 0.2 + s else: t1 = s if v2 > p: t2 = s * 0.2 + s else: t2 = s if v3 > p: t3 = s * 0.2 + s else: t3 = s print('El pago del departamento 1 es: $', '{:.0f}'.format(t1)) print('El pago del departamento 2 es: $', '{:.0f}'.format(t2)) print('EL pafo del departamento 3 es: $', '{:.0f}'.format(t3))
version_defaults = { 'param_keys': { 'grid5': ['accrate', 'x', 'z', 'qb', 'mass'], 'synth5': ['accrate', 'x', 'z', 'qb', 'mass'], 'grid6': ['accrate', 'x', 'z', 'qb', 'mass'], 'he1': ['accrate', 'x', 'z', 'qb', 'mass'], 'he2': ['accrate', 'qb'], }, 'bprops': { 'grid5': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'synth5': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'grid6': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'he1': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'he2': ('rate', 'u_rate'), }, } version_definitions = { 'param_keys': { # The input params (and their order) when calling interpolator 'grid5': {}, 'synth5': {}, 'grid6': {}, 'he1': {}, 'he2': {}, }, # The burst properties being interpolated 'bprops': { 'grid5': {}, 'synth5': {}, 'grid6': {}, 'he1': {}, 'he2': {}, }, # The base grid to interpolate over (see: grids/grid_versions.py) # Note: if not defined, defaults to: grid_version = interp_version 'grid_version': { 'grid5': {}, 'synth5': {}, 'grid6': {}, 'he1': {}, 'he2': {}, }, } class InterpVersion: """Class for defining different interpolator versions """ def __init__(self, source, version): self.source = source self.version = version self.param_keys = get_parameter(source, version, 'param_keys') self.bprops = get_parameter(source, version, 'bprops') self.grid_version = get_parameter(source, version, 'grid_version') def __repr__(self): return (f'Interpolator version definitions for {self.source} V{self.version}' + f'\nbase grid versions : {self.grid_version}' + f'\nparam keys : {self.param_keys}' + f'\nbprops : {self.bprops}' ) def get_parameter(source, version, parameter): if parameter == 'grid_version': default = version else: default = version_defaults[parameter][source] out = version_definitions[parameter][source].get(version, default) if type(out) is int and (parameter != 'grid_version'): return version_definitions[parameter][source][out] else: return out
version_defaults = {'param_keys': {'grid5': ['accrate', 'x', 'z', 'qb', 'mass'], 'synth5': ['accrate', 'x', 'z', 'qb', 'mass'], 'grid6': ['accrate', 'x', 'z', 'qb', 'mass'], 'he1': ['accrate', 'x', 'z', 'qb', 'mass'], 'he2': ['accrate', 'qb']}, 'bprops': {'grid5': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'synth5': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'grid6': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'he1': ('rate', 'u_rate', 'fluence', 'u_fluence', 'peak', 'u_peak'), 'he2': ('rate', 'u_rate')}} version_definitions = {'param_keys': {'grid5': {}, 'synth5': {}, 'grid6': {}, 'he1': {}, 'he2': {}}, 'bprops': {'grid5': {}, 'synth5': {}, 'grid6': {}, 'he1': {}, 'he2': {}}, 'grid_version': {'grid5': {}, 'synth5': {}, 'grid6': {}, 'he1': {}, 'he2': {}}} class Interpversion: """Class for defining different interpolator versions """ def __init__(self, source, version): self.source = source self.version = version self.param_keys = get_parameter(source, version, 'param_keys') self.bprops = get_parameter(source, version, 'bprops') self.grid_version = get_parameter(source, version, 'grid_version') def __repr__(self): return f'Interpolator version definitions for {self.source} V{self.version}' + f'\nbase grid versions : {self.grid_version}' + f'\nparam keys : {self.param_keys}' + f'\nbprops : {self.bprops}' def get_parameter(source, version, parameter): if parameter == 'grid_version': default = version else: default = version_defaults[parameter][source] out = version_definitions[parameter][source].get(version, default) if type(out) is int and parameter != 'grid_version': return version_definitions[parameter][source][out] else: return out
fname = input("Enter file name: ") try: fhand = open(fname) except: print('Something wrong with the file') for line in fhand: print((line.upper()).rstrip())
fname = input('Enter file name: ') try: fhand = open(fname) except: print('Something wrong with the file') for line in fhand: print(line.upper().rstrip())
# -*- coding: utf-8 -*- def ULongToHexHash(long: int): buffer = [None] * 8 buffer[0] = (long >> 56).to_bytes(28,byteorder='little').hex()[:2] buffer[1] = (long >> 48).to_bytes(28,byteorder='little').hex()[:2] buffer[2] = (long >> 40).to_bytes(28,byteorder='little').hex()[:2] buffer[3] = (long >> 32).to_bytes(28,byteorder='little').hex()[:2] buffer[4] = (long >> 24).to_bytes(28,byteorder='little').hex()[:2] buffer[5] = (long >> 16).to_bytes(28,byteorder='little').hex()[:2] buffer[6] = (long >> 8).to_bytes(28,byteorder='little').hex()[:2] buffer[7] = (long).to_bytes(28,byteorder='little').hex()[:2] return (''.join(buffer)).upper() def SwapOrder(data: bytes) -> bytes: hex_str = data.hex() data = [None] * len(hex_str) # TODO: Improve this ^ if len(hex_str) == 8: data[0] = hex_str[6] data[1] = hex_str[7] data[2] = hex_str[4] data[3] = hex_str[5] data[4] = hex_str[2] data[5] = hex_str[3] data[6] = hex_str[0] data[7] = hex_str[1] return ''.join(data) def ParseIntBlob32(_hash: str) -> str: if (4 < (len(_hash) % 3) or len(_hash) % 3 != 0): raise ValueError(f'Failed to convert {_hash} to Blob 32') numbers = [] i = 0 while i < len(_hash): numstr = int(_hash[i] + _hash[i+1] + _hash[i+2]) numbers.append(numstr) i += 3 return int.from_bytes(bytearray(numbers), byteorder='little', signed=False) def ParseIntBlob64(_hash: str) -> str: if (len(_hash) % 3 != 0): raise ValueError(f'Failed to convert {_hash} to Blob 64') hex_str = "" i = 0 while i < len(_hash): num_str = hex(int((str(_hash[i]) + str(_hash[i+1]) + str(_hash[i+2]))))[2:] if len(num_str) == 1: num_str = f'0{num_str}' hex_str = num_str + hex_str i += 3 return hex_str
def u_long_to_hex_hash(long: int): buffer = [None] * 8 buffer[0] = (long >> 56).to_bytes(28, byteorder='little').hex()[:2] buffer[1] = (long >> 48).to_bytes(28, byteorder='little').hex()[:2] buffer[2] = (long >> 40).to_bytes(28, byteorder='little').hex()[:2] buffer[3] = (long >> 32).to_bytes(28, byteorder='little').hex()[:2] buffer[4] = (long >> 24).to_bytes(28, byteorder='little').hex()[:2] buffer[5] = (long >> 16).to_bytes(28, byteorder='little').hex()[:2] buffer[6] = (long >> 8).to_bytes(28, byteorder='little').hex()[:2] buffer[7] = long.to_bytes(28, byteorder='little').hex()[:2] return ''.join(buffer).upper() def swap_order(data: bytes) -> bytes: hex_str = data.hex() data = [None] * len(hex_str) if len(hex_str) == 8: data[0] = hex_str[6] data[1] = hex_str[7] data[2] = hex_str[4] data[3] = hex_str[5] data[4] = hex_str[2] data[5] = hex_str[3] data[6] = hex_str[0] data[7] = hex_str[1] return ''.join(data) def parse_int_blob32(_hash: str) -> str: if 4 < len(_hash) % 3 or len(_hash) % 3 != 0: raise value_error(f'Failed to convert {_hash} to Blob 32') numbers = [] i = 0 while i < len(_hash): numstr = int(_hash[i] + _hash[i + 1] + _hash[i + 2]) numbers.append(numstr) i += 3 return int.from_bytes(bytearray(numbers), byteorder='little', signed=False) def parse_int_blob64(_hash: str) -> str: if len(_hash) % 3 != 0: raise value_error(f'Failed to convert {_hash} to Blob 64') hex_str = '' i = 0 while i < len(_hash): num_str = hex(int(str(_hash[i]) + str(_hash[i + 1]) + str(_hash[i + 2])))[2:] if len(num_str) == 1: num_str = f'0{num_str}' hex_str = num_str + hex_str i += 3 return hex_str
def hide_spines(ax, positions=["top", "right"]): """ Pass a matplotlib axis and list of positions with spines to be removed args: ax: Matplotlib axis object positions: Python list e.g. ['top', 'bottom'] """ assert isinstance(positions, list), "Position must be passed as a list " for position in positions: ax.spines[position].set_visible(False)
def hide_spines(ax, positions=['top', 'right']): """ Pass a matplotlib axis and list of positions with spines to be removed args: ax: Matplotlib axis object positions: Python list e.g. ['top', 'bottom'] """ assert isinstance(positions, list), 'Position must be passed as a list ' for position in positions: ax.spines[position].set_visible(False)
class Solution(object): def longestCommonPrefix(self, strs): """ :type strs: List[str] :rtype: str """ result_len = 0 result_str = '' if len(strs) == 1: return strs[0] # get the smallest str min_len = None smallest_str = None for item in strs: l = len(item) if min_len is None: min_len = l smallest_str = item elif l < min_len: min_len = l smallest_str = item for item in (strs): match_len = 0 for i in range(min_len): if item[i] == smallest_str[i]: match_len = match_len + 1 else: break if match_len == 0: result_str = '' break else: if match_len < min_len: min_len = match_len result_str = item[:min_len] return result_str if __name__ == '__main__': sol = Solution() strs = ['hello', 'hakjkaj', 'll'] print(sol.longestCommonPrefix(strs)) strs = ['ahello', 'hellg', 'hello'] print(sol.longestCommonPrefix(strs)) strs = ['c', 'c'] print(sol.longestCommonPrefix(strs))
class Solution(object): def longest_common_prefix(self, strs): """ :type strs: List[str] :rtype: str """ result_len = 0 result_str = '' if len(strs) == 1: return strs[0] min_len = None smallest_str = None for item in strs: l = len(item) if min_len is None: min_len = l smallest_str = item elif l < min_len: min_len = l smallest_str = item for item in strs: match_len = 0 for i in range(min_len): if item[i] == smallest_str[i]: match_len = match_len + 1 else: break if match_len == 0: result_str = '' break else: if match_len < min_len: min_len = match_len result_str = item[:min_len] return result_str if __name__ == '__main__': sol = solution() strs = ['hello', 'hakjkaj', 'll'] print(sol.longestCommonPrefix(strs)) strs = ['ahello', 'hellg', 'hello'] print(sol.longestCommonPrefix(strs)) strs = ['c', 'c'] print(sol.longestCommonPrefix(strs))
"""Top-level package for Freud API Crawler.""" __author__ = """Peter Andorfer""" __email__ = '[email protected]' __version__ = '0.19.0'
"""Top-level package for Freud API Crawler.""" __author__ = 'Peter Andorfer' __email__ = '[email protected]' __version__ = '0.19.0'
expected_output = { "peer_type": { "vbond": { "downtime": { "2021-12-15T04:19:41+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DCONFAIL", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "1", "site_id": "0", "state": "connect", }, "2021-12-16T17:40:20+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "4", "site_id": "0", "state": "tear_down", }, "2021-12-16T19:28:22+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "7", "site_id": "0", "state": "tear_down", }, "2021-12-17T04:55:11+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "0", "site_id": "0", "state": "tear_down", }, "2021-12-17T04:57:19+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "2", "site_id": "0", "state": "tear_down", }, "2021-12-17T14:36:12+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "1", "site_id": "0", "state": "tear_down", }, "2021-12-21T06:50:19+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DCONFAIL", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "3", "site_id": "0", "state": "connect", }, "2021-12-21T06:54:07+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "13", "site_id": "0", "state": "tear_down", }, "2021-12-21T15:05:22+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "4", "site_id": "0", "state": "tear_down", }, "2022-01-19T06:18:27+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "2", "site_id": "0", "state": "tear_down", }, "2022-01-19T06:18:57+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DCONFAIL", "peer_organization": "", "peer_private_ip": "184.118.1.19", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.19", "peer_public_port": "12346", "peer_system_ip": "0.0.0.0", "remote_error": "NOERR", "repeat_count": "0", "site_id": "0", "state": "connect", }, }, }, "vmanage": { "downtime": { "2021-12-16T19:28:22+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.31", "peer_private_port": "12746", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.31", "peer_public_port": "12746", "peer_system_ip": "10.0.0.2", "remote_error": "NOERR", "repeat_count": "7", "site_id": "100", "state": "tear_down", }, "2021-12-17T04:57:19+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.31", "peer_private_port": "12746", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.31", "peer_public_port": "12746", "peer_system_ip": "10.0.0.2", "remote_error": "NOERR", "repeat_count": "2", "site_id": "100", "state": "tear_down", }, "2021-12-21T06:54:07+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.31", "peer_private_port": "12746", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.31", "peer_public_port": "12746", "peer_system_ip": "10.0.0.2", "remote_error": "NOERR", "repeat_count": "13", "site_id": "100", "state": "tear_down", }, "2021-12-21T15:05:22+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.31", "peer_private_port": "12746", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.31", "peer_public_port": "12746", "peer_system_ip": "10.0.0.2", "remote_error": "NOERR", "repeat_count": "4", "site_id": "100", "state": "tear_down", }, "2022-01-19T06:18:27+0000": { "domain_id": "0", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.31", "peer_private_port": "12746", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.31", "peer_public_port": "12746", "peer_system_ip": "10.0.0.2", "remote_error": "NOERR", "repeat_count": "2", "site_id": "100", "state": "tear_down", }, }, }, "vsmart": { "downtime": { "2021-12-16T19:28:22+0000": { "domain_id": "1", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.21", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.21", "peer_public_port": "12346", "peer_system_ip": "10.0.0.3", "remote_error": "NOERR", "repeat_count": "7", "site_id": "100", "state": "tear_down", }, "2021-12-17T04:57:19+0000": { "domain_id": "1", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.21", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.21", "peer_public_port": "12346", "peer_system_ip": "10.0.0.3", "remote_error": "NOERR", "repeat_count": "2", "site_id": "100", "state": "tear_down", }, "2021-12-21T06:54:07+0000": { "domain_id": "1", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.21", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.21", "peer_public_port": "12346", "peer_system_ip": "10.0.0.3", "remote_error": "NOERR", "repeat_count": "13", "site_id": "100", "state": "tear_down", }, "2021-12-21T15:05:22+0000": { "domain_id": "1", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.21", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.21", "peer_public_port": "12346", "peer_system_ip": "10.0.0.3", "remote_error": "NOERR", "repeat_count": "4", "site_id": "100", "state": "tear_down", }, "2022-01-19T06:18:27+0000": { "domain_id": "1", "local_color": "gold", "local_error": "DISTLOC", "peer_organization": "", "peer_private_ip": "184.118.1.21", "peer_private_port": "12346", "peer_protocol": "dtls", "peer_public_ip": "184.118.1.21", "peer_public_port": "12346", "peer_system_ip": "10.0.0.3", "remote_error": "NOERR", "repeat_count": "2", "site_id": "100", "state": "tear_down", }, }, }, }, }
expected_output = {'peer_type': {'vbond': {'downtime': {'2021-12-15T04:19:41+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DCONFAIL', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '1', 'site_id': '0', 'state': 'connect'}, '2021-12-16T17:40:20+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '4', 'site_id': '0', 'state': 'tear_down'}, '2021-12-16T19:28:22+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '7', 'site_id': '0', 'state': 'tear_down'}, '2021-12-17T04:55:11+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '0', 'site_id': '0', 'state': 'tear_down'}, '2021-12-17T04:57:19+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '2', 'site_id': '0', 'state': 'tear_down'}, '2021-12-17T14:36:12+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '1', 'site_id': '0', 'state': 'tear_down'}, '2021-12-21T06:50:19+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DCONFAIL', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '3', 'site_id': '0', 'state': 'connect'}, '2021-12-21T06:54:07+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '13', 'site_id': '0', 'state': 'tear_down'}, '2021-12-21T15:05:22+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '4', 'site_id': '0', 'state': 'tear_down'}, '2022-01-19T06:18:27+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '2', 'site_id': '0', 'state': 'tear_down'}, '2022-01-19T06:18:57+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DCONFAIL', 'peer_organization': '', 'peer_private_ip': '184.118.1.19', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.19', 'peer_public_port': '12346', 'peer_system_ip': '0.0.0.0', 'remote_error': 'NOERR', 'repeat_count': '0', 'site_id': '0', 'state': 'connect'}}}, 'vmanage': {'downtime': {'2021-12-16T19:28:22+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.31', 'peer_private_port': '12746', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.31', 'peer_public_port': '12746', 'peer_system_ip': '10.0.0.2', 'remote_error': 'NOERR', 'repeat_count': '7', 'site_id': '100', 'state': 'tear_down'}, '2021-12-17T04:57:19+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.31', 'peer_private_port': '12746', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.31', 'peer_public_port': '12746', 'peer_system_ip': '10.0.0.2', 'remote_error': 'NOERR', 'repeat_count': '2', 'site_id': '100', 'state': 'tear_down'}, '2021-12-21T06:54:07+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.31', 'peer_private_port': '12746', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.31', 'peer_public_port': '12746', 'peer_system_ip': '10.0.0.2', 'remote_error': 'NOERR', 'repeat_count': '13', 'site_id': '100', 'state': 'tear_down'}, '2021-12-21T15:05:22+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.31', 'peer_private_port': '12746', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.31', 'peer_public_port': '12746', 'peer_system_ip': '10.0.0.2', 'remote_error': 'NOERR', 'repeat_count': '4', 'site_id': '100', 'state': 'tear_down'}, '2022-01-19T06:18:27+0000': {'domain_id': '0', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.31', 'peer_private_port': '12746', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.31', 'peer_public_port': '12746', 'peer_system_ip': '10.0.0.2', 'remote_error': 'NOERR', 'repeat_count': '2', 'site_id': '100', 'state': 'tear_down'}}}, 'vsmart': {'downtime': {'2021-12-16T19:28:22+0000': {'domain_id': '1', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.21', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.21', 'peer_public_port': '12346', 'peer_system_ip': '10.0.0.3', 'remote_error': 'NOERR', 'repeat_count': '7', 'site_id': '100', 'state': 'tear_down'}, '2021-12-17T04:57:19+0000': {'domain_id': '1', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.21', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.21', 'peer_public_port': '12346', 'peer_system_ip': '10.0.0.3', 'remote_error': 'NOERR', 'repeat_count': '2', 'site_id': '100', 'state': 'tear_down'}, '2021-12-21T06:54:07+0000': {'domain_id': '1', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.21', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.21', 'peer_public_port': '12346', 'peer_system_ip': '10.0.0.3', 'remote_error': 'NOERR', 'repeat_count': '13', 'site_id': '100', 'state': 'tear_down'}, '2021-12-21T15:05:22+0000': {'domain_id': '1', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.21', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.21', 'peer_public_port': '12346', 'peer_system_ip': '10.0.0.3', 'remote_error': 'NOERR', 'repeat_count': '4', 'site_id': '100', 'state': 'tear_down'}, '2022-01-19T06:18:27+0000': {'domain_id': '1', 'local_color': 'gold', 'local_error': 'DISTLOC', 'peer_organization': '', 'peer_private_ip': '184.118.1.21', 'peer_private_port': '12346', 'peer_protocol': 'dtls', 'peer_public_ip': '184.118.1.21', 'peer_public_port': '12346', 'peer_system_ip': '10.0.0.3', 'remote_error': 'NOERR', 'repeat_count': '2', 'site_id': '100', 'state': 'tear_down'}}}}}
map = {'corridor':['room1','','','room2'],'room1':['','','corridor',''],'room2':['','corridor','','']} commands = {'room1':room1,'room2':room2,'corridor':corridor} def Moving(location): rooms = map[location] directions = ['North','East','South','West'] availableDirections = [directions[i] for i,j in enumerate(rooms) if rooms[i] != ''] direction = input('Which direction would you like to go? ') while direction not in availableDirections: print('You can not go that way') direction = input('Which direction would you like to go? ') return rooms[directions.index(direction)] def corridor(): print('You are in a long corridor') print('There are exits to the North and West') commands[Moving('corridor')]() def room1(): print('You are in a small broom cupboard. The air smells musty and it is very dark') print('There are exits to the South') commands[Moving('room1')]() def room2(): print('You are in a very dark room. You can not see anything. You know there is an exit to the East though') commands[Moving('room2')]()
map = {'corridor': ['room1', '', '', 'room2'], 'room1': ['', '', 'corridor', ''], 'room2': ['', 'corridor', '', '']} commands = {'room1': room1, 'room2': room2, 'corridor': corridor} def moving(location): rooms = map[location] directions = ['North', 'East', 'South', 'West'] available_directions = [directions[i] for (i, j) in enumerate(rooms) if rooms[i] != ''] direction = input('Which direction would you like to go? ') while direction not in availableDirections: print('You can not go that way') direction = input('Which direction would you like to go? ') return rooms[directions.index(direction)] def corridor(): print('You are in a long corridor') print('There are exits to the North and West') commands[moving('corridor')]() def room1(): print('You are in a small broom cupboard. The air smells musty and it is very dark') print('There are exits to the South') commands[moving('room1')]() def room2(): print('You are in a very dark room. You can not see anything. You know there is an exit to the East though') commands[moving('room2')]()
# -*- coding:utf-8 -*- """ OOP: Object-Oriented Programming/Paradigm 3 main characteristics: * Encapsulation: Scope of data is limited to the Object * Inheritance: Object fields can be implicitly used in extended classes * Polymorphism: Same name can have different signatures """ # ############################################################################# # # GLOBALS # ############################################################################# # ############################################################################# # # CLOSURE # ############################################################################# def increment(n): return lambda x: x + n def counter(): count = 0 def inc(): nonlocal count count += 1 return count return lambda: inc() # ############################################################################# # # CLASS VS INSTANCE # ############################################################################# class Counter: """ A class defines the attributes and methods (fields) of the object, and the instance is the actual implementation of the class. * Attributes are data (like a painting) * Methods are functions, need to be executed (like music) Whenever you want to put together functionality and state, a class is a good design. """ # class attribute: identical for all instances of this class. # if 1 instance changes it, all change MODEL = "XYZ.123.BETA" def __init__(self, company): """ This function is called when the object is created """ print("created", self.__class__.__name__) self._count = 0 # instance attributes are declared this way self.company = company def reset(self): # methods are declared this way """ """ self._count = 0 return self._count def increment(self): """ """ # self._count = self._count + 1 self._count += 1 return self._count # "decorator" # static methods do NOT have a state. It is used to gather different # functions under same class (also more advanced uses like traits) @staticmethod # no self required, this is like a "free function" def sum(a, b): """ """ return a + b # no reference to self or the class # We require only what we need. I we don't alter the INSTANCE, we # don't need "self". A classmethod passes the reference to the # class, NOT to the instance, and can be used to modify class # fields. @classmethod def change_model(cls, new_model): """ """ cls.MODEL = new_model breakpoint() ryanair = Counter("Ryanair") iberia = Counter("Iberia") Counter.sum(3, 4) # EXAMPLE FOR SELF METHODS for _ in range(50): ryanair.increment() print("Disculpe cual es mi asiento??") # ... for _ in range(27): ryanair.increment() print("Resultado:", ryanair._count) # EXAMPLE FOR CLASS METHODS: # we change the model in 1 instance, and we observe that the model has # changed for ALL instances of the class print(">>>", iberia.MODEL) ryanair.change_model("XYZ.125") print(">>>", iberia.MODEL) breakpoint() # ############################################################################# # # NP ARRAYS # #############################################################################
""" OOP: Object-Oriented Programming/Paradigm 3 main characteristics: * Encapsulation: Scope of data is limited to the Object * Inheritance: Object fields can be implicitly used in extended classes * Polymorphism: Same name can have different signatures """ def increment(n): return lambda x: x + n def counter(): count = 0 def inc(): nonlocal count count += 1 return count return lambda : inc() class Counter: """ A class defines the attributes and methods (fields) of the object, and the instance is the actual implementation of the class. * Attributes are data (like a painting) * Methods are functions, need to be executed (like music) Whenever you want to put together functionality and state, a class is a good design. """ model = 'XYZ.123.BETA' def __init__(self, company): """ This function is called when the object is created """ print('created', self.__class__.__name__) self._count = 0 self.company = company def reset(self): """ """ self._count = 0 return self._count def increment(self): """ """ self._count += 1 return self._count @staticmethod def sum(a, b): """ """ return a + b @classmethod def change_model(cls, new_model): """ """ cls.MODEL = new_model breakpoint() ryanair = counter('Ryanair') iberia = counter('Iberia') Counter.sum(3, 4) for _ in range(50): ryanair.increment() print('Disculpe cual es mi asiento??') for _ in range(27): ryanair.increment() print('Resultado:', ryanair._count) print('>>>', iberia.MODEL) ryanair.change_model('XYZ.125') print('>>>', iberia.MODEL) breakpoint()
def fence_pattern(rails, message_size): pass def encode(rails, message): pass def decode(rails, encoded_message): pass
def fence_pattern(rails, message_size): pass def encode(rails, message): pass def decode(rails, encoded_message): pass
# python3 def last_digit_of_fibonacci_number_naive(n): assert 0 <= n <= 10 ** 7 if n <= 1: return n return (last_digit_of_fibonacci_number_naive(n - 1) + last_digit_of_fibonacci_number_naive(n - 2)) % 10 def last_digit_of_fibonacci_number(n): assert 0 <= n <= 10 ** 7 if (n < 2): return n else: fib = [0, 1] for i in range(2, n + 1): fib.append((fib[i - 1] + fib[i - 2]) % 10) return fib[n] if __name__ == '__main__': input_n = int(input()) print(last_digit_of_fibonacci_number(input_n))
def last_digit_of_fibonacci_number_naive(n): assert 0 <= n <= 10 ** 7 if n <= 1: return n return (last_digit_of_fibonacci_number_naive(n - 1) + last_digit_of_fibonacci_number_naive(n - 2)) % 10 def last_digit_of_fibonacci_number(n): assert 0 <= n <= 10 ** 7 if n < 2: return n else: fib = [0, 1] for i in range(2, n + 1): fib.append((fib[i - 1] + fib[i - 2]) % 10) return fib[n] if __name__ == '__main__': input_n = int(input()) print(last_digit_of_fibonacci_number(input_n))
""" A python program for Dijkstra's single source shortest path algorithm. The program is for adjacency list representation of the graph """ # Function that implements Dijkstra's single source shortest path algorithm # for a graph represented using adjacency list representation def dijkstra(N, graph, src): S = list() S.append(src) dist = {x: 99 for x in range(1, N+1)} dist[src] = 0 minCost = 999 selected_u = 0 selected_v = 0 while S != list(graph.keys()): for u in S: dictOfu = graph[u] for v in dictOfu: if v not in S: cost_u_to_v = dist[u] + dictOfu[v] if cost_u_to_v < minCost: minCost = cost_u_to_v selected_u = u selected_v = v dist[selected_v] = minCost S.append(selected_v) print(selected_u, '--->', selected_v) minCost = 999 S.sort() # Function used to take input of graph and source node def main(): graph = {} N = int(input('Enter number of Nodes: ')) for i in range(1, N+1): print('Enter adjacent Node(s) and its weight(s) for Node: ', i) string = input() adjListWithWeights = string.split() print(adjListWithWeights) adjDict = {} for x in adjListWithWeights: y = x.split(',') adjDict[int(y[0])] = int(y[1]) graph[i] = adjDict print("The input graph is: ", graph) src = int(input('Enter source value: ')) dijkstra(N, graph, src) # Call the main function to start the program main() # Sample program input and output """ Suppose the graph is: 1 ------> 2 (weight 1) 1 ------> 3 (weight 5) 2 ------> 1 (weight 1) 2 ------> 3 (weight 1) 3 ------> 1 (weight 2) 3 ------> 2 (weight 2) The input will be Enter number of Nodes: 3 Enter adjacent Node(s) and its weight(s) for Node: 1 --------> 2,1 3,5 Enter adjacent Node(s) and its weight(s) for Node: 2 --------> 1,1 3,1 Enter adjacent Node(s) and its weight(s) for Node: 3 --------> 1,2 2,2 The input graph is: -------> {1: {2: 1, 3: 5}, 2: {1: 1, 3: 1}, 3: {1: 2, 2: 2}} Enter source value: 2 Final output 2 ---> 1 2 ---> 3 """
""" A python program for Dijkstra's single source shortest path algorithm. The program is for adjacency list representation of the graph """ def dijkstra(N, graph, src): s = list() S.append(src) dist = {x: 99 for x in range(1, N + 1)} dist[src] = 0 min_cost = 999 selected_u = 0 selected_v = 0 while S != list(graph.keys()): for u in S: dict_ofu = graph[u] for v in dictOfu: if v not in S: cost_u_to_v = dist[u] + dictOfu[v] if cost_u_to_v < minCost: min_cost = cost_u_to_v selected_u = u selected_v = v dist[selected_v] = minCost S.append(selected_v) print(selected_u, '--->', selected_v) min_cost = 999 S.sort() def main(): graph = {} n = int(input('Enter number of Nodes: ')) for i in range(1, N + 1): print('Enter adjacent Node(s) and its weight(s) for Node: ', i) string = input() adj_list_with_weights = string.split() print(adjListWithWeights) adj_dict = {} for x in adjListWithWeights: y = x.split(',') adjDict[int(y[0])] = int(y[1]) graph[i] = adjDict print('The input graph is: ', graph) src = int(input('Enter source value: ')) dijkstra(N, graph, src) main() '\nSuppose the graph is:\n 1 ------> 2 (weight 1)\n 1 ------> 3 (weight 5)\n 2 ------> 1 (weight 1)\n 2 ------> 3 (weight 1)\n 3 ------> 1 (weight 2)\n 3 ------> 2 (weight 2)\n\nThe input will be\nEnter number of Nodes: 3\nEnter adjacent Node(s) and its weight(s) for Node: 1 --------> 2,1 3,5\nEnter adjacent Node(s) and its weight(s) for Node: 2 --------> 1,1 3,1\nEnter adjacent Node(s) and its weight(s) for Node: 3 --------> 1,2 2,2\n\nThe input graph is: -------> {1: {2: 1, 3: 5}, 2: {1: 1, 3: 1}, 3: {1: 2, 2: 2}}\n\nEnter source value: 2\n\nFinal output\n 2 ---> 1\n 2 ---> 3\n'
# From pep-0318 examples: # https://www.python.org/dev/peps/pep-0318/#examples def accepts(*types): def check_accepts(f): assert len(types) == f.func_code.co_argcount def new_f(*args, **kwds): for (a, t) in zip(args, types): assert isinstance(a, t), "arg %r does not match %s" % (a, t) return f(*args, **kwds) new_f.func_name = f.func_name return new_f return check_accepts def returns(rtype): def check_returns(f): def new_f(*args, **kwds): result = f(*args, **kwds) assert isinstance(result, rtype), "return value %r does not match %s" % ( result, rtype, ) return result new_f.func_name = f.func_name return new_f return check_returns # Example usage: # @accepts(int, (int,float)) # @returns((int,float)) # def func(arg1, arg2): # return arg1 * arg2
def accepts(*types): def check_accepts(f): assert len(types) == f.func_code.co_argcount def new_f(*args, **kwds): for (a, t) in zip(args, types): assert isinstance(a, t), 'arg %r does not match %s' % (a, t) return f(*args, **kwds) new_f.func_name = f.func_name return new_f return check_accepts def returns(rtype): def check_returns(f): def new_f(*args, **kwds): result = f(*args, **kwds) assert isinstance(result, rtype), 'return value %r does not match %s' % (result, rtype) return result new_f.func_name = f.func_name return new_f return check_returns
# -*- coding: utf-8 -*- """ 669. Trim a Binary Search Tree Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all its elements lies in [low, high]. Trimming the tree should not change the relative structure of the elements that will remain in the tree (i.e., any node's descendant should remain a descendant). It can be proven that there is a unique answer. Return the root of the trimmed binary search tree. Note that the root may change depending on the given bounds. Constraints: The number of nodes in the tree in the range [1, 104]. 0 <= Node.val <= 104 The value of each node in the tree is unique. root is guaranteed to be a valid binary search tree. 0 <= low <= high <= 104 """ # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def trimBST(self, root: TreeNode, low: int, high: int) -> TreeNode: if root is None: return None if root.val < low: return self.trimBST(root.right, low, high) elif root.val > high: return self.trimBST(root.left, low, high) else: root.left = self.trimBST(root.left, low, high) root.right = self.trimBST(root.right, low, high) return root
""" 669. Trim a Binary Search Tree Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all its elements lies in [low, high]. Trimming the tree should not change the relative structure of the elements that will remain in the tree (i.e., any node's descendant should remain a descendant). It can be proven that there is a unique answer. Return the root of the trimmed binary search tree. Note that the root may change depending on the given bounds. Constraints: The number of nodes in the tree in the range [1, 104]. 0 <= Node.val <= 104 The value of each node in the tree is unique. root is guaranteed to be a valid binary search tree. 0 <= low <= high <= 104 """ class Treenode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def trim_bst(self, root: TreeNode, low: int, high: int) -> TreeNode: if root is None: return None if root.val < low: return self.trimBST(root.right, low, high) elif root.val > high: return self.trimBST(root.left, low, high) else: root.left = self.trimBST(root.left, low, high) root.right = self.trimBST(root.right, low, high) return root
historical_yrs = [i + 14 for i in range(6)] future_yrs = [5*i + 20 for i in range(7)] cities = { 'NR': { 'Delhi': (28.620198, 77.207953), 'Jaipur': (26.913310, 75.800162), 'Lucknow': (26.850000, 80.949997), 'Kanpur': (26.460681, 80.313318), 'Ghaziabad': (28.673733, 77.437598), 'Ludhiana': (30.903434, 75.854784), 'Agra': (27.188679, 77.985161), # 'Faridabad': # 'Varanasi': # 'Meerut': # 'Srinagar': # 'Aurangabad': # 'Jodhpur': # 'Chandigarh': }, 'WR': { 'Bombay': (19.136698, 72.874997), 'Ahmedabad': (23.046722, 72.594153), 'Surat': (21.172953, 72.830534), 'Pune': (18.522325, 73.839962), 'Nagpur': (21.143781, 79.083838), 'Thane': (19.208691, 72.986695), 'Bhopal': (23.229054, 77.454641), 'Indore': (22.729657, 75.864191), 'Pimpri-Chinchwad': (18.634826, 73.799352), # 'Vadodara': # 'Nashik': # 'Rajkot': # 'Vasai-Virar': # 'Varanasi': # 'Gwalior': # 'Jabalpur': # 'Raipur': (21.250000, 81.629997) }, 'ER': { 'Kolkata': (22.602239, 88.384624), 'Patna': (25.606163, 85.129308), # 'Howrah': (22.575807, 88.218517), ignoring b/c close to kolkata 'Ranchi': (23.369065, 85.323193), }, 'SR': { 'Hyderabad': (17.403782, 78.419709), 'Bangalore': (12.998121, 77.575998), 'Chennai': (13.057463, 80.237652), 'Visakhapatnam': (17.722926, 83.235116), 'Coimbatore': (11.022585, 76.960722), 'Vijayawada': (16.520201, 80.638189), 'Madurai': (9.925952, 78.124883), }, 'NER': { 'Guwahati': (26.152019, 91.733483), 'Agartala': (23.841343, 91.283016), 'Imphal': (24.810497, 93.934348), }, } fields = { 'QV10M': 'h10m', # specific humidity 10m above surface 'QV2M': 'h2m', # specific humidity 2m above surface 'T10M': 't10m', # temperature 10m above surface 'T2M': 't2m', # temperature 2m above surface 'TQI': 'tqi', # total precipitable ice water 'TQL': 'tql', # total precipitable liquid water 'TQV': 'tqv', # total precipitable water vapor 'U10M': 'ew10m', # eastward wind 10m above surface 'U2M': 'ew2m', # eastward wind 2m above surface 'V10M': 'nw10m', # northward wind 10m above surface 'V2M': 'nw2m', # northward wind 2m above surface }
historical_yrs = [i + 14 for i in range(6)] future_yrs = [5 * i + 20 for i in range(7)] cities = {'NR': {'Delhi': (28.620198, 77.207953), 'Jaipur': (26.91331, 75.800162), 'Lucknow': (26.85, 80.949997), 'Kanpur': (26.460681, 80.313318), 'Ghaziabad': (28.673733, 77.437598), 'Ludhiana': (30.903434, 75.854784), 'Agra': (27.188679, 77.985161)}, 'WR': {'Bombay': (19.136698, 72.874997), 'Ahmedabad': (23.046722, 72.594153), 'Surat': (21.172953, 72.830534), 'Pune': (18.522325, 73.839962), 'Nagpur': (21.143781, 79.083838), 'Thane': (19.208691, 72.986695), 'Bhopal': (23.229054, 77.454641), 'Indore': (22.729657, 75.864191), 'Pimpri-Chinchwad': (18.634826, 73.799352)}, 'ER': {'Kolkata': (22.602239, 88.384624), 'Patna': (25.606163, 85.129308), 'Ranchi': (23.369065, 85.323193)}, 'SR': {'Hyderabad': (17.403782, 78.419709), 'Bangalore': (12.998121, 77.575998), 'Chennai': (13.057463, 80.237652), 'Visakhapatnam': (17.722926, 83.235116), 'Coimbatore': (11.022585, 76.960722), 'Vijayawada': (16.520201, 80.638189), 'Madurai': (9.925952, 78.124883)}, 'NER': {'Guwahati': (26.152019, 91.733483), 'Agartala': (23.841343, 91.283016), 'Imphal': (24.810497, 93.934348)}} fields = {'QV10M': 'h10m', 'QV2M': 'h2m', 'T10M': 't10m', 'T2M': 't2m', 'TQI': 'tqi', 'TQL': 'tql', 'TQV': 'tqv', 'U10M': 'ew10m', 'U2M': 'ew2m', 'V10M': 'nw10m', 'V2M': 'nw2m'}
port="COM3" # if ('virtual' in globals() and virtual): virtualArduino = Runtime.start("virtualArduino", "VirtualArduino") virtualArduino.connect(port) ard = Runtime.createAndStart("Arduino","Arduino") ard.connect(port) # i2cmux = Runtime.createAndStart("i2cMux","I2cMux") # From version 1.0.2316 use attach instead of setController # i2cmux.setController(ard,"1","0x70") i2cmux.attach(ard,"1","0x70") # mpu6050_0 = Runtime.createAndStart("Mpu6050-0","Mpu6050") mpu6050_0.attach(i2cmux,"0","0x68") mpu6050_1 = Runtime.createAndStart("Mpu6050-1","Mpu6050") mpu6050_1.attach(i2cmux,"1","0x68")
port = 'COM3' if 'virtual' in globals() and virtual: virtual_arduino = Runtime.start('virtualArduino', 'VirtualArduino') virtualArduino.connect(port) ard = Runtime.createAndStart('Arduino', 'Arduino') ard.connect(port) i2cmux = Runtime.createAndStart('i2cMux', 'I2cMux') i2cmux.attach(ard, '1', '0x70') mpu6050_0 = Runtime.createAndStart('Mpu6050-0', 'Mpu6050') mpu6050_0.attach(i2cmux, '0', '0x68') mpu6050_1 = Runtime.createAndStart('Mpu6050-1', 'Mpu6050') mpu6050_1.attach(i2cmux, '1', '0x68')
""" looks for parameter values that are reflected in the response. Author: maradrianbelen.com The scan function will be called for request/response made via ZAP, excluding some of the automated tools Passive scan rules should not make any requests Note that new passive scripts will initially be disabled Right click the script in the Scripts tree and select "enable" Refactored & Improved by nil0x42 """ # Set to True if you want to see results on a per param basis # (i.e.: A single URL may be listed more than once) RESULT_PER_FINDING = False # Ignore parameters whose length is too short MIN_PARAM_VALUE_LENGTH = 8 def scan(ps, msg, src): # Docs on alert raising function: # raiseAlert(int risk, int confidence, str name, str description, str uri, # str param, str attack, str otherInfo, str solution, # str evidence, int cweId, int wascId, HttpMessage msg) # risk: 0: info, 1: low, 2: medium, 3: high # confidence: 0: falsePositive, 1: low, 2: medium, 3: high, 4: confirmed alert_title = "Reflected HTTP GET parameter(s) (script)" alert_desc = ("Reflected parameter value has been found. " "A reflected parameter values may introduce XSS " "vulnerability or HTTP header injection.") uri = header = body = None reflected_params = [] for param in msg.getUrlParams(): value = param.getValue() if len(value) < MIN_PARAM_VALUE_LENGTH: continue if not header: uri = msg.getRequestHeader().getURI().toString() header = msg.getResponseHeader().toString() body = msg.getResponseBody().toString() if value in header or value in body: if RESULT_PER_FINDING: param_name = param.getName() ps.raiseAlert(0, 2, alert_title, alert_desc, uri, param_name, None, None, None, value, 0, 0, msg) else: reflected_params.append(param.getName()) if reflected_params and not RESULT_PER_FINDING: reflected_params = u",".join(reflected_params) ps.raiseAlert(0, 2, alert_title, alert_desc, uri, reflected_params, None, None, None, None, 0, 0, msg)
""" looks for parameter values that are reflected in the response. Author: maradrianbelen.com The scan function will be called for request/response made via ZAP, excluding some of the automated tools Passive scan rules should not make any requests Note that new passive scripts will initially be disabled Right click the script in the Scripts tree and select "enable" Refactored & Improved by nil0x42 """ result_per_finding = False min_param_value_length = 8 def scan(ps, msg, src): alert_title = 'Reflected HTTP GET parameter(s) (script)' alert_desc = 'Reflected parameter value has been found. A reflected parameter values may introduce XSS vulnerability or HTTP header injection.' uri = header = body = None reflected_params = [] for param in msg.getUrlParams(): value = param.getValue() if len(value) < MIN_PARAM_VALUE_LENGTH: continue if not header: uri = msg.getRequestHeader().getURI().toString() header = msg.getResponseHeader().toString() body = msg.getResponseBody().toString() if value in header or value in body: if RESULT_PER_FINDING: param_name = param.getName() ps.raiseAlert(0, 2, alert_title, alert_desc, uri, param_name, None, None, None, value, 0, 0, msg) else: reflected_params.append(param.getName()) if reflected_params and (not RESULT_PER_FINDING): reflected_params = u','.join(reflected_params) ps.raiseAlert(0, 2, alert_title, alert_desc, uri, reflected_params, None, None, None, None, 0, 0, msg)
# # PySNMP MIB module NBS-CMMCENUM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NBS-CMMCENUM-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:17:11 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint") nbs, = mibBuilder.importSymbols("NBS-MIB", "nbs") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Bits, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, IpAddress, NotificationType, Unsigned32, MibIdentifier, Counter64, Counter32, Gauge32, ModuleIdentity, iso, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "IpAddress", "NotificationType", "Unsigned32", "MibIdentifier", "Counter64", "Counter32", "Gauge32", "ModuleIdentity", "iso", "ObjectIdentity") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") nbsCmmcEnumMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 629, 225)) if mibBuilder.loadTexts: nbsCmmcEnumMib.setLastUpdated('201503120000Z') if mibBuilder.loadTexts: nbsCmmcEnumMib.setOrganization('NBS') if mibBuilder.loadTexts: nbsCmmcEnumMib.setContactInfo('For technical support, please contact your service channel') if mibBuilder.loadTexts: nbsCmmcEnumMib.setDescription('This MIB module defines some frequently updated lists for NBS-CMMC-MIB.') class NbsCmmcEnumChassisType(TextualConvention, Integer32): description = 'The type of Chassis.' status = 'current' subtypeSpec = Integer32.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)) namedValues = NamedValues(("other", 1), ("bu16", 2), ("bu4", 3), ("bu1", 4), ("bu5", 5), ("bu3", 6), ("bu2", 7), ("fCpe", 8), ("bmc", 9), ("virtual16", 10), ("bu21", 11), ("bu42", 12), ("virtual1", 13), ("virtual2", 14), ("virtual3", 15), ("virtual4", 16), ("bu22", 17), ("bu82", 18), ("bu3v", 19), ("virtual3v", 20), ("bu12", 21), ("occ48", 22), ("occ96", 23), ("occ128", 24), ("occ320", 25), ("od48", 26), ("virtod48", 27), ("od12", 28), ("virtod12", 29), ("od16", 30), ("virtod16", 31), ("od32", 32), ("virtod32", 33), ("od16lc", 34), ("virtod16lc", 35), ("od6", 36), ("virtod6", 37), ("od4", 38), ("virtod4", 39)) class NbsCmmcEnumSlotOperationType(TextualConvention, Integer32): description = 'Mode, or primary function, of card in slot' status = 'current' subtypeSpec = Integer32.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)) namedValues = NamedValues(("other", 1), ("management", 2), ("converter", 3), ("repeater", 4), ("switch", 5), ("splitterCombiner", 6), ("fastRepeater", 7), ("gigabitRepeater", 8), ("monitor", 9), ("opticSwitch", 10), ("remote", 11), ("redundant", 12), ("centralOffice", 13), ("customerPremise", 14), ("multiplexer", 15), ("deprecated16", 16), ("deprecated17", 17), ("deprecated18", 18), ("optAmpBoosterAGC", 19), ("optAmpBoosterAPC", 20), ("optAmpInlineAGC", 21), ("optAmpInlineAPC", 22), ("optAmpPreampAGC", 23), ("optAmpPreampAPC", 24), ("coDualActive", 25), ("coDualInactive", 26), ("physLayerSwitch", 27), ("packetMux", 28), ("optAmpVariableGain", 29), ("optAmpMidstageAGC", 30), ("optAmpMidstageAPC", 31), ("multiCO1g", 32), ("multiCO10g", 33), ("addDropMux", 34), ("multicast", 35), ("optAttenuator", 36), ("repeater40G", 37), ("multiplexer4x10G", 38), ("optAmpPreampAPPC", 39), ("optPassive", 40), ("transponder", 41), ("muxponder", 42), ("addWssDropSplitter", 43), ("dropWssAddCombiner", 44), ("dualAddWssDropSplitter", 45)) class NbsCmmcEnumSlotType(TextualConvention, Integer32): description = "This data type is used as the syntax of the nbsCmmcSlotType object in the definition of NBS-CMMC-MIB's nbsCmmcSlotTable. This object is used internally by Manager, and is not useful to most end-users." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 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, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254), SingleValueConstraint(255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509), SingleValueConstraint(510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757)) namedValues = NamedValues(("empty0", 0), ("empty1", 1), ("empty2", 2), ("empty3", 3), ("em316gs1", 4), ("em316gs2", 5), ("em316gs3", 6), ("em316fms1", 7), ("em316fms2", 8), ("em316fms3", 9), ("em316as1", 10), ("em316as2", 11), ("em316as3", 12), ("em316fds1", 13), ("em316fds2", 14), ("em316fds3", 15), ("em316o3s1", 16), ("em316o3s2", 17), ("em316o3s3", 18), ("em316o12s1", 19), ("em316o12s2", 20), ("em316o12s3", 21), ("em316gsfs1", 22), ("em316gsfs2", 23), ("em316gsfs3", 24), ("em316fsfs1", 25), ("em316fsfs2", 26), ("em316fsfsx", 27), ("em316fsfsz", 28), ("em316fmsfs1", 29), ("em316fmsfs2", 30), ("em316fmsfs3", 31), ("em316asfs2", 32), ("em316asfs3", 33), ("em316fdsfs2", 34), ("em316fdsfs3", 35), ("em316o3sfs2", 36), ("em316o3sfs3", 37), ("em316o12sfs2", 38), ("em316o12sfs3", 39), ("em316em", 40), ("em316emx", 41), ("em316es", 42), ("em316esx", 43), ("em315esz", 44), ("em316fm", 45), ("em316fs1", 46), ("em316fs2", 47), ("em316fsx", 48), ("em315fsz", 49), ("em3162swm", 50), ("em3162sws1", 51), ("em3162sws2", 52), ("em3162sws3a", 53), ("em3162sws3b", 54), ("em3164wdm", 55), ("em316nm", 56), ("em3164sw", 57), ("em3164hub", 58), ("em316sc3m", 59), ("em316sc8m", 60), ("em316sc3s", 61), ("em316sc5s", 62), ("em316fr1", 63), ("em316fr2", 64), ("em316fr3", 65), ("em316gr1", 66), ("em316gr2", 67), ("em316gr3", 68), ("em316f21", 69), ("em316f22", 70), ("em316wdm4", 71), ("em316g", 72), ("em316gsf", 73), ("em316fn", 74), ("em316fsfn", 75), ("em316fmsn", 76), ("em316fmsfn", 77), ("em316asn", 78), ("em316asfsn", 79), ("em316fdsn", 80), ("em316fdsfsn", 81), ("em316o3sn", 82), ("em316o3sfsn", 83), ("em316o12sn", 84), ("em316o12sfsn", 85), ("em316emsn", 86), ("em316emsfsn", 87), ("em316ssn", 88), ("em316ssfsn", 89), ("em316tr", 90), ("em316t1", 91), ("em316t1sf", 92), ("nc3162bu", 93), ("em316wdm4o12", 94), ("em316wdm4o3", 95), ("em316grg", 96), ("em316mso12", 97), ("em316mso3", 98), ("em316e1", 99), ("em316e1sf", 100), ("wdmtrnk", 101), ("em316wdm43", 102), ("em316wdm44", 103), ("em104", 104), ("em105", 105), ("em106", 106), ("em316ds31", 107), ("em316ds32", 108), ("em3164sw1", 109), ("em3166sw1", 110), ("em3166sw2", 111), ("em316wfcs", 112), ("em316wfts", 113), ("em316e11", 114), ("em316e12", 115), ("nc316bu31", 116), ("nc316bu32", 117), ("em316od3", 118), ("nc316nw41", 119), ("nc316nw42", 120), ("em316em1", 121), ("em316e2", 122), ("em316fc", 123), ("em316fcsf", 124), ("nc316nw43", 125), ("nc316nw44", 126), ("em316o48", 127), ("em316o48sf", 128), ("ns129", 129), ("ns130", 130), ("ns131", 131), ("em3163sw", 132), ("em3163swsf", 133), ("em316o3c1", 134), ("em316o3csf", 135), ("nc316nw45", 136), ("nc316nw46", 137), ("em316wdm4f", 138), ("em316wdm4fc", 139), ("em316dpg", 140), ("em3162gsws", 141), ("ns142", 142), ("em316wgcs", 143), ("em316wgts", 144), ("em316wfccs", 145), ("em316wfcts", 146), ("em316wecs", 147), ("em316wets", 148), ("em316osw", 149), ("ns150", 150), ("ns151", 151), ("em316fe11l", 152), ("em316ft11l", 153), ("em316wdm81", 154), ("ns155", 155), ("wdm38", 156), ("ns157", 157), ("em316o3f1", 158), ("ns159", 159), ("em316wdm85", 160), ("em316wdmc3", 161), ("ns162", 162), ("em316fmsh", 163), ("ns164", 164), ("ns165", 165), ("ns166", 166), ("em316e31", 167), ("ns168", 168), ("em316fe12r", 169), ("ns170", 170), ("ns171", 171), ("ns172", 172), ("em316gc1", 173), ("em316gcsf", 174), ("ns175", 175), ("ns176", 176), ("em316ds3sh", 177), ("ns178", 178), ("em316nmhb1", 179), ("em316ds3r", 180), ("ns181", 181), ("em316fe11r", 182), ("em316ft11r", 183), ("ns184", 184), ("em316wdmc4", 185), ("em316adsl1", 186), ("ns187", 187), ("ns188", 188), ("ns189", 189), ("ns190", 190), ("ns191", 191), ("ns192", 192), ("ns193", 193), ("ns194", 194), ("em316gccsf", 195), ("em316gctsf", 196), ("em316osh", 197), ("ns198", 198), ("ns199", 199), ("ns200", 200), ("ns201", 201), ("ns202", 202), ("ns203", 203), ("ns204", 204), ("ns205", 205), ("ns206", 206), ("ns207", 207), ("ns208", 208), ("ns209", 209), ("em316sadm1", 210), ("ns211", 211), ("ns212", 212), ("em316flm1", 213), ("em316flm2", 214), ("ns215", 215), ("ns216", 216), ("ns217", 217), ("ns218", 218), ("wdm24ctr", 219), ("ns220", 220), ("wdm24ctl", 221), ("em316frm1", 222), ("em316frm2", 223), ("wdm44sf", 224), ("em316swrfhp", 225), ("ns226", 226), ("em316swhp", 227), ("ns228", 228), ("em316f2rm1", 229), ("em316f2rm2", 230), ("ns231", 231), ("ns232", 232), ("ns233", 233), ("ns234", 234), ("ns235", 235), ("ns236", 236), ("ns237", 237), ("ns238", 238), ("em316wfrmc", 239), ("em316wfrmt", 240), ("em316t1mux1", 241), ("em316t1mux2", 242), ("em316e1mux4j", 243), ("em316e1x4sfj", 244), ("ns245", 245), ("em316efrm1", 246), ("em316efrm2", 247), ("ns248", 248), ("ns249", 249), ("ns250", 250), ("ns251", 251), ("ns252", 252), ("ns253", 253), ("ns254", 254)) + NamedValues(("ns255", 255), ("ns256", 256), ("ns257", 257), ("em316sc1021", 258), ("ns259", 259), ("ns260", 260), ("ns261", 261), ("em316edsc1", 262), ("em316edsc2", 263), ("em316wdmslot", 264), ("em316wdmc265", 265), ("empty266", 266), ("em316wp1", 267), ("em316wp2", 268), ("em316oa", 269), ("em316e1mux1", 270), ("em316e1mux2", 271), ("em3162tsfp", 272), ("em316dmr48", 273), ("ns3162sfpr", 274), ("ns316xp342r", 275), ("em316ef", 276), ("em316efsf", 277), ("em316padms", 278), ("ns279", 279), ("ns280", 280), ("ns281", 281), ("ns316f16csfp", 282), ("ns316sdi8", 283), ("ns284", 284), ("em316wdmpa4", 285), ("em316wdmpa4t", 286), ("ns287", 287), ("em3162gbicl", 288), ("em3162gbicr", 289), ("em316ge1sfl", 290), ("em316ge1sfr", 291), ("em316fchub", 292), ("em316fcr", 293), ("em316mr48", 294), ("ns295", 295), ("em316fe1xx", 296), ("em316ft1sf", 297), ("em316gbicsfp", 298), ("ns299", 299), ("ns300", 300), ("em316pamulc8n", 301), ("em316pamulc4n", 302), ("em316t1muxrrm", 303), ("em316e1muxrrm", 304), ("ns305", 305), ("em316wo3c", 306), ("ns307", 307), ("em316grmah", 308), ("em316grmahsf", 309), ("em316efrmah", 310), ("em316efrmahsf", 311), ("em316erm", 312), ("em316ermsf", 313), ("em316efan", 314), ("em316efansf", 315), ("ns316", 316), ("nc316Xp343r", 317), ("ns318", 318), ("em316pamulc8", 319), ("em316pamulc4", 320), ("cm316fFtth", 321), ("ns322", 322), ("ns323", 323), ("ns324", 324), ("ns325", 325), ("em316padm41mu", 326), ("ns327", 327), ("em316pamuscm4", 328), ("em316pamuscd4", 329), ("em316pamuscm8", 330), ("em316pamuscd8", 331), ("em316muxmusc16", 332), ("em316dmuxmusc16", 333), ("ns334", 334), ("em316dpadms", 335), ("ns336", 336), ("em316dwmux16", 337), ("em316dwdmx16", 338), ("ns339", 339), ("ns340", 340), ("em316fe1sf", 341), ("em316xt1", 342), ("em316fe1rj", 343), ("em316gt1sfv", 344), ("ns345", 345), ("ns346", 346), ("ns347", 347), ("ns348", 348), ("ns349", 349), ("nc316xp322", 350), ("nc316xp323", 351), ("em316wermc", 352), ("em316wermt", 353), ("ns354", 354), ("ns355", 355), ("ns356", 356), ("ns357", 357), ("em316ee1rmft", 358), ("em316xe1rmft", 359), ("em316lx2", 360), ("em316lxm", 361), ("em316dwmux32", 362), ("em316dwdmx32v", 363), ("em316dwmux32nv", 364), ("em316dwdmx32n", 365), ("ns366", 366), ("ns367", 367), ("em316fe1rmft", 368), ("em316efe1ah", 369), ("em316eft1ah", 370), ("em316efe1rj", 371), ("ns372", 372), ("ns373", 373), ("ns374", 374), ("em316grmahsh", 375), ("em316ermahsh", 376), ("ns377", 377), ("ns378", 378), ("em316ermah", 379), ("ns380", 380), ("em3162sfpx", 381), ("ns382", 382), ("pmcwdm8sfp", 383), ("ns384", 384), ("ns385", 385), ("mccSfp36", 386), ("mccGRj36", 387), ("em316osc", 388), ("em316gemx2r", 389), ("em316gemx6r", 390), ("mccSfp72", 391), ("mccGRj72", 392), ("em316gcl", 393), ("em316gclsf", 394), ("em316wgclc", 395), ("em316wgclt", 396), ("ns397", 397), ("ns398", 398), ("ns399", 399), ("ns400", 400), ("ns401", 401), ("ns402", 402), ("ns403", 403), ("ns404", 404), ("ns405", 405), ("ns406", 406), ("ns407", 407), ("ns408", 408), ("ns409", 409), ("ns410", 410), ("ns411", 411), ("ns412", 412), ("ns413", 413), ("ns414", 414), ("ns415", 415), ("ns416", 416), ("em316xfpr", 417), ("oemntgrmah", 418), ("oemntermah", 419), ("oemntnm", 420), ("em316wds3c", 421), ("em316wds3t", 422), ("em316we3c", 423), ("em316we3t", 424), ("ns425", 425), ("ns426", 426), ("em316eft1mua4v", 427), ("em316efx1mub4", 428), ("em316efe1muc4v", 429), ("ns430", 430), ("ns431", 431), ("ns432", 432), ("em316t1mux4rm", 433), ("em316e1muxrjrm", 434), ("em316e1mux4rm", 435), ("em316dmr", 436), ("em316mr", 437), ("ns438", 438), ("ns439", 439), ("ns440", 440), ("em316ge1rjsf", 441), ("em316mr48q", 442), ("em316dmr48q", 443), ("em316mrmx2r", 444), ("ns445", 445), ("ns446", 446), ("ns447", 447), ("ns448", 448), ("ns449", 449), ("ns450", 450), ("mcc9xfp", 451), ("ns452", 452), ("em316cdadd2", 453), ("em316cdadd1", 454), ("ns455", 455), ("ns456", 456), ("em316nmlx12", 457), ("em316nmlx21", 458), ("em316nmlx", 459), ("ns460", 460), ("em316sw22", 461), ("em316sw12", 462), ("em316sw04", 463), ("em316sw13", 464), ("ns465", 465), ("ns466", 466), ("ns467", 467), ("ns468", 468), ("ns469", 469), ("ns470", 470), ("em3164swb", 471), ("ns472", 472), ("ns473", 473), ("ns474", 474), ("em316csadsxx", 475), ("em316csadsxxyy", 476), ("em316csaddxx", 477), ("em316csaddxxyy", 478), ("em3163swb", 479), ("em316ds3", 480), ("em316dt3e3", 481), ("ns482", 482), ("em316mux4xn", 483), ("em316dmx4xn", 484), ("em316mux4xbd", 485), ("em316dmx4xbd", 486), ("em316mux8nbd", 487), ("em316dmx8nbd", 488), ("em316mux8bd", 489), ("em316dmx8bd", 490), ("em316dpadxx", 491), ("em316dpadxxyy", 492), ("em316dpad4xx", 493), ("em316dpad8xx", 494), ("em316wt1c", 495), ("ns496", 496), ("em316gt1rm", 497), ("em316g6t1rm1", 498), ("em316g6t1rm2", 499), ("em316dsadsxx", 500), ("em316ddaddxx", 501), ("em316ddaddxxyy", 502), ("em316edfalv", 503), ("em316psc", 504), ("em316sos", 505), ("em316doscb", 506), ("em316padm8", 507), ("em316csads4", 508), ("ns509", 509)) + NamedValues(("ns510", 510), ("ns511", 511), ("ns512", 512), ("em316plc", 513), ("ns514", 514), ("ns515", 515), ("ns516", 516), ("ns517", 517), ("ns518", 518), ("em316dwmx8", 519), ("ns520", 520), ("em316genpasv", 521), ("em316ge1rm", 522), ("ns523", 523), ("ns524", 524), ("em316g6e1rms2", 525), ("ns526", 526), ("ns527", 527), ("ns528", 528), ("ns529", 529), ("mcc18t1e1", 530), ("ns531", 531), ("ns532", 532), ("mcc18dt3e3", 533), ("em316edfar", 534), ("ns535", 535), ("ns536", 536), ("ns537", 537), ("em316ossh", 538), ("em316sc3", 539), ("ns540", 540), ("em316fc400", 541), ("ns542", 542), ("ns543", 543), ("ns544", 544), ("em316eusmv", 545), ("ns546", 546), ("ns547", 547), ("em316dcm100r", 548), ("em316dcm100l", 549), ("ns550", 550), ("em316twoxfpet", 551), ("em316dwmux16be", 552), ("ns553", 553), ("ns554", 554), ("empmc8xfp", 555), ("ns556", 556), ("em316dwmx16bem", 557), ("ns558", 558), ("em316e1t1xy", 559), ("dwmx32rbm", 560), ("ns561", 561), ("ns562", 562), ("ns563", 563), ("empmc36t1e1", 564), ("ns565", 565), ("em316palc8nl", 566), ("em316palc8nr", 567), ("em316gswxy", 568), ("em316dwd40m5713", 569), ("em316dwd40m5712", 570), ("em316dwd40m5711", 571), ("em316mux535531b", 572), ("ns573", 573), ("em31610gxy", 574), ("ns575", 575), ("ns576", 576), ("ns577", 577), ("ns578", 578), ("ns579", 579), ("ns580", 580), ("ns581", 581), ("ns582", 582), ("ns583", 583), ("ns584", 584), ("em316os2", 585), ("em316osa", 586), ("ns587", 587), ("ns588", 588), ("ns589", 589), ("ns590", 590), ("ns591", 591), ("ns592", 592), ("em316ea", 593), ("ns594", 594), ("em316eusm10gr", 595), ("em316eusm10gl", 596), ("em316dmdxa16b1", 597), ("em316dmdxa16b2", 598), ("em316dmdxa16b3", 599), ("em316dmdxa16b4", 600), ("em316dmdxa16b5", 601), ("em316dmdxa40m01", 602), ("em316dmdxa40m02", 603), ("em316dmdxa40m03", 604), ("em316dmdxa40m04", 605), ("em316dmdxa40m05", 606), ("em316dmdxa40m06", 607), ("em316dmdxa40m07", 608), ("em316dmdxa40m08", 609), ("em316dmdxa40m09", 610), ("em316dmdxa40m10", 611), ("em316dmdxa40m11", 612), ("em316dmdxa16ra", 613), ("em316dmdxa16rb", 614), ("em31620g1", 615), ("em31620g2", 616), ("em31640g3", 617), ("em31640g4", 618), ("em31640g5", 619), ("em316rpon", 620), ("ns621", 621), ("empmc36sas", 622), ("em316osw8", 623), ("ns624", 624), ("ns625", 625), ("em31610g8swxyr", 626), ("em31610g8swxym", 627), ("em31610g8swxyl", 628), ("ns629", 629), ("em316cmux831b", 630), ("ns631", 631), ("em316mdx46ma001", 632), ("em316mdx46ma002", 633), ("em316mdx46ma003", 634), ("em316mdx46ma004", 635), ("em316mdx46ma005", 636), ("em316mdx46ma006", 637), ("em316mdx46ma007", 638), ("em316mdx46ma008", 639), ("em316mdx46ma009", 640), ("em316mdx46ma010", 641), ("em316mdx46ma011", 642), ("em316mdx46ma012", 643), ("em316osw128a", 644), ("em316osw128b", 645), ("em316osw128c", 646), ("em316osw128d", 647), ("em316osw128e", 648), ("em316osw128f", 649), ("em316osw128g", 650), ("em316osw128h", 651), ("em316osw128i", 652), ("em316osw128j", 653), ("em316osw128k", 654), ("em316osw128l", 655), ("em316osw128m", 656), ("ns657", 657), ("em316dcmxx", 658), ("em316osshlc", 659), ("em316eavg2217", 660), ("em316dmr10g3r", 661), ("em316fdt1e1rm", 662), ("em316sw8fxr", 663), ("em316sw8fxlv", 664), ("em316mdx46mx002", 665), ("em316mdx46mb003", 666), ("em316mdx46mb002", 667), ("em316mdx46mc002", 668), ("em316eamlp2017v", 669), ("ns670", 670), ("em316gemx4rr", 671), ("em316gemx4rlv", 672), ("empmcqsfp36", 673), ("ns674", 674), ("ns675", 675), ("em3162qsfp40", 676), ("ns677", 677), ("ns678", 678), ("mcc36ic", 679), ("ns680", 680), ("em316voar", 681), ("em316voalv", 682), ("em316dvmdxa", 683), ("em316dvmdxbv", 684), ("em316cmdxm8al", 685), ("em316cmdxm8ar", 686), ("ns687", 687), ("ns688", 688), ("em316dvmdxav1", 689), ("em316dvmdxav2", 690), ("em316dvmdxav3", 691), ("em316dvmdxav4", 692), ("em316dvmdxav5", 693), ("em316dvmdxav6", 694), ("em316dvmdxav7", 695), ("em316dvmdxav8", 696), ("em316dvmdxav9", 697), ("ns698", 698), ("ns699", 699), ("ns700", 700), ("em316ra12r", 701), ("em316ra12lv", 702), ("ns703", 703), ("em316ra12mv", 704), ("ns705", 705), ("ns706", 706), ("em316dmr10gf", 707), ("ns708", 708), ("ns709", 709), ("ns710", 710), ("ns711", 711), ("ns712", 712), ("ns713", 713), ("ns714", 714), ("ns715", 715), ("ns716", 716), ("ns717", 717), ("ns718", 718), ("ns719", 719), ("oddmr10g3r", 720), ("oddmr10gf", 721), ("od2hwss4dws", 722), ("od2hmxp100g", 723), ("odtxp100gf2c", 724), ("ns725", 725), ("em316raf10", 726), ("ns727", 727), ("odtxp100g2c", 728), ("ns729", 729), ("od2hwss4dcw", 730), ("ns731", 731), ("ns732", 732), ("odugc", 733), ("ns734", 734), ("ns735", 735), ("odfiller", 736), ("odtxp100g2cw1", 737), ("od2hwss4dww", 738), ("ns739", 739), ("ns740", 740), ("ns741", 741), ("ns742", 742), ("ns743", 743), ("ns744", 744), ("ns745", 745), ("ns746", 746), ("em316twoxfp16g", 747), ("od2hdwss4dws", 748), ("ns749", 749), ("ns750", 750), ("ns751", 751), ("ns752", 752), ("od2hdmx10g", 753), ("ns754", 754), ("ns755", 755), ("ns756", 756), ("odtxp100gf", 757)) class NbsCmmcEnumPortConnector(TextualConvention, Integer32): description = 'The Port Connector.' status = 'current' subtypeSpec = Integer32.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)) namedValues = NamedValues(("unknown", 1), ("removed", 2), ("foDSC", 3), ("foSC", 4), ("cuRj45", 5), ("foLC", 6), ("coaxF", 7), ("coaxBNC", 8), ("coax2BNC", 9), ("cuRj45wLEDs", 10), ("cuRj11", 11), ("cuDb9", 12), ("cuHssdc", 13), ("coaxHeader", 14), ("foFiberJack", 15), ("foMtRj", 16), ("foMu", 17), ("sg", 18), ("foPigtail", 19), ("cuPigtail", 20), ("smb", 21), ("firewireA", 22), ("firewireB", 23), ("cuRj48", 24), ("fo1LC", 25), ("fo2ST", 26), ("sataDevicePlug", 27), ("sataHostPlug", 28), ("miniCoax", 29), ("mpo", 30), ("miniSAS4x", 31), ("reserved", 32), ("cxpCuPassive", 33), ("cxpCuActive", 34), ("cxpFoActive", 35), ("cxpFoConnect", 36), ("fc", 37), ("cuMicroUsbB", 38), ("rj45wUSBRJ45Active", 39), ("rj45wUSBUSBActive", 40)) class NbsCmmcChannelBand(TextualConvention, Integer32): description = "The ITU grid labels DWDM channels with a letter 'band' and a numeric channel. Within this mib, the band is indicated by this object, and the channel number is shown in the object nbsOsaChannelNumber. Frequencies of at least 180100 GHz but less than 190100 GHz are considered the L spectrum, and frequencies of at least 190100 but less than 200100 GHz are considered the C spectrum. Frequencies evenly divisible by 100 GHz are designated with a 'C' or 'L' prepended to the channel number. Frequencies that are offset by 50 GHz are designated 'H' within the C spectrum, and 'Q' within the L spectrum." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4)) namedValues = NamedValues(("notSupported", 0), ("cBand", 1), ("hBand", 2), ("lBand", 3), ("qBand", 4)) mibBuilder.exportSymbols("NBS-CMMCENUM-MIB", NbsCmmcChannelBand=NbsCmmcChannelBand, NbsCmmcEnumChassisType=NbsCmmcEnumChassisType, NbsCmmcEnumPortConnector=NbsCmmcEnumPortConnector, PYSNMP_MODULE_ID=nbsCmmcEnumMib, NbsCmmcEnumSlotType=NbsCmmcEnumSlotType, nbsCmmcEnumMib=nbsCmmcEnumMib, NbsCmmcEnumSlotOperationType=NbsCmmcEnumSlotOperationType)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, constraints_union, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint') (nbs,) = mibBuilder.importSymbols('NBS-MIB', 'nbs') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (bits, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, ip_address, notification_type, unsigned32, mib_identifier, counter64, counter32, gauge32, module_identity, iso, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'IpAddress', 'NotificationType', 'Unsigned32', 'MibIdentifier', 'Counter64', 'Counter32', 'Gauge32', 'ModuleIdentity', 'iso', 'ObjectIdentity') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') nbs_cmmc_enum_mib = module_identity((1, 3, 6, 1, 4, 1, 629, 225)) if mibBuilder.loadTexts: nbsCmmcEnumMib.setLastUpdated('201503120000Z') if mibBuilder.loadTexts: nbsCmmcEnumMib.setOrganization('NBS') if mibBuilder.loadTexts: nbsCmmcEnumMib.setContactInfo('For technical support, please contact your service channel') if mibBuilder.loadTexts: nbsCmmcEnumMib.setDescription('This MIB module defines some frequently updated lists for NBS-CMMC-MIB.') class Nbscmmcenumchassistype(TextualConvention, Integer32): description = 'The type of Chassis.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(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)) named_values = named_values(('other', 1), ('bu16', 2), ('bu4', 3), ('bu1', 4), ('bu5', 5), ('bu3', 6), ('bu2', 7), ('fCpe', 8), ('bmc', 9), ('virtual16', 10), ('bu21', 11), ('bu42', 12), ('virtual1', 13), ('virtual2', 14), ('virtual3', 15), ('virtual4', 16), ('bu22', 17), ('bu82', 18), ('bu3v', 19), ('virtual3v', 20), ('bu12', 21), ('occ48', 22), ('occ96', 23), ('occ128', 24), ('occ320', 25), ('od48', 26), ('virtod48', 27), ('od12', 28), ('virtod12', 29), ('od16', 30), ('virtod16', 31), ('od32', 32), ('virtod32', 33), ('od16lc', 34), ('virtod16lc', 35), ('od6', 36), ('virtod6', 37), ('od4', 38), ('virtod4', 39)) class Nbscmmcenumslotoperationtype(TextualConvention, Integer32): description = 'Mode, or primary function, of card in slot' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(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)) named_values = named_values(('other', 1), ('management', 2), ('converter', 3), ('repeater', 4), ('switch', 5), ('splitterCombiner', 6), ('fastRepeater', 7), ('gigabitRepeater', 8), ('monitor', 9), ('opticSwitch', 10), ('remote', 11), ('redundant', 12), ('centralOffice', 13), ('customerPremise', 14), ('multiplexer', 15), ('deprecated16', 16), ('deprecated17', 17), ('deprecated18', 18), ('optAmpBoosterAGC', 19), ('optAmpBoosterAPC', 20), ('optAmpInlineAGC', 21), ('optAmpInlineAPC', 22), ('optAmpPreampAGC', 23), ('optAmpPreampAPC', 24), ('coDualActive', 25), ('coDualInactive', 26), ('physLayerSwitch', 27), ('packetMux', 28), ('optAmpVariableGain', 29), ('optAmpMidstageAGC', 30), ('optAmpMidstageAPC', 31), ('multiCO1g', 32), ('multiCO10g', 33), ('addDropMux', 34), ('multicast', 35), ('optAttenuator', 36), ('repeater40G', 37), ('multiplexer4x10G', 38), ('optAmpPreampAPPC', 39), ('optPassive', 40), ('transponder', 41), ('muxponder', 42), ('addWssDropSplitter', 43), ('dropWssAddCombiner', 44), ('dualAddWssDropSplitter', 45)) class Nbscmmcenumslottype(TextualConvention, Integer32): description = "This data type is used as the syntax of the nbsCmmcSlotType object in the definition of NBS-CMMC-MIB's nbsCmmcSlotTable. This object is used internally by Manager, and is not useful to most end-users." status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 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, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254), single_value_constraint(255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509), single_value_constraint(510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757)) named_values = named_values(('empty0', 0), ('empty1', 1), ('empty2', 2), ('empty3', 3), ('em316gs1', 4), ('em316gs2', 5), ('em316gs3', 6), ('em316fms1', 7), ('em316fms2', 8), ('em316fms3', 9), ('em316as1', 10), ('em316as2', 11), ('em316as3', 12), ('em316fds1', 13), ('em316fds2', 14), ('em316fds3', 15), ('em316o3s1', 16), ('em316o3s2', 17), ('em316o3s3', 18), ('em316o12s1', 19), ('em316o12s2', 20), ('em316o12s3', 21), ('em316gsfs1', 22), ('em316gsfs2', 23), ('em316gsfs3', 24), ('em316fsfs1', 25), ('em316fsfs2', 26), ('em316fsfsx', 27), ('em316fsfsz', 28), ('em316fmsfs1', 29), ('em316fmsfs2', 30), ('em316fmsfs3', 31), ('em316asfs2', 32), ('em316asfs3', 33), ('em316fdsfs2', 34), ('em316fdsfs3', 35), ('em316o3sfs2', 36), ('em316o3sfs3', 37), ('em316o12sfs2', 38), ('em316o12sfs3', 39), ('em316em', 40), ('em316emx', 41), ('em316es', 42), ('em316esx', 43), ('em315esz', 44), ('em316fm', 45), ('em316fs1', 46), ('em316fs2', 47), ('em316fsx', 48), ('em315fsz', 49), ('em3162swm', 50), ('em3162sws1', 51), ('em3162sws2', 52), ('em3162sws3a', 53), ('em3162sws3b', 54), ('em3164wdm', 55), ('em316nm', 56), ('em3164sw', 57), ('em3164hub', 58), ('em316sc3m', 59), ('em316sc8m', 60), ('em316sc3s', 61), ('em316sc5s', 62), ('em316fr1', 63), ('em316fr2', 64), ('em316fr3', 65), ('em316gr1', 66), ('em316gr2', 67), ('em316gr3', 68), ('em316f21', 69), ('em316f22', 70), ('em316wdm4', 71), ('em316g', 72), ('em316gsf', 73), ('em316fn', 74), ('em316fsfn', 75), ('em316fmsn', 76), ('em316fmsfn', 77), ('em316asn', 78), ('em316asfsn', 79), ('em316fdsn', 80), ('em316fdsfsn', 81), ('em316o3sn', 82), ('em316o3sfsn', 83), ('em316o12sn', 84), ('em316o12sfsn', 85), ('em316emsn', 86), ('em316emsfsn', 87), ('em316ssn', 88), ('em316ssfsn', 89), ('em316tr', 90), ('em316t1', 91), ('em316t1sf', 92), ('nc3162bu', 93), ('em316wdm4o12', 94), ('em316wdm4o3', 95), ('em316grg', 96), ('em316mso12', 97), ('em316mso3', 98), ('em316e1', 99), ('em316e1sf', 100), ('wdmtrnk', 101), ('em316wdm43', 102), ('em316wdm44', 103), ('em104', 104), ('em105', 105), ('em106', 106), ('em316ds31', 107), ('em316ds32', 108), ('em3164sw1', 109), ('em3166sw1', 110), ('em3166sw2', 111), ('em316wfcs', 112), ('em316wfts', 113), ('em316e11', 114), ('em316e12', 115), ('nc316bu31', 116), ('nc316bu32', 117), ('em316od3', 118), ('nc316nw41', 119), ('nc316nw42', 120), ('em316em1', 121), ('em316e2', 122), ('em316fc', 123), ('em316fcsf', 124), ('nc316nw43', 125), ('nc316nw44', 126), ('em316o48', 127), ('em316o48sf', 128), ('ns129', 129), ('ns130', 130), ('ns131', 131), ('em3163sw', 132), ('em3163swsf', 133), ('em316o3c1', 134), ('em316o3csf', 135), ('nc316nw45', 136), ('nc316nw46', 137), ('em316wdm4f', 138), ('em316wdm4fc', 139), ('em316dpg', 140), ('em3162gsws', 141), ('ns142', 142), ('em316wgcs', 143), ('em316wgts', 144), ('em316wfccs', 145), ('em316wfcts', 146), ('em316wecs', 147), ('em316wets', 148), ('em316osw', 149), ('ns150', 150), ('ns151', 151), ('em316fe11l', 152), ('em316ft11l', 153), ('em316wdm81', 154), ('ns155', 155), ('wdm38', 156), ('ns157', 157), ('em316o3f1', 158), ('ns159', 159), ('em316wdm85', 160), ('em316wdmc3', 161), ('ns162', 162), ('em316fmsh', 163), ('ns164', 164), ('ns165', 165), ('ns166', 166), ('em316e31', 167), ('ns168', 168), ('em316fe12r', 169), ('ns170', 170), ('ns171', 171), ('ns172', 172), ('em316gc1', 173), ('em316gcsf', 174), ('ns175', 175), ('ns176', 176), ('em316ds3sh', 177), ('ns178', 178), ('em316nmhb1', 179), ('em316ds3r', 180), ('ns181', 181), ('em316fe11r', 182), ('em316ft11r', 183), ('ns184', 184), ('em316wdmc4', 185), ('em316adsl1', 186), ('ns187', 187), ('ns188', 188), ('ns189', 189), ('ns190', 190), ('ns191', 191), ('ns192', 192), ('ns193', 193), ('ns194', 194), ('em316gccsf', 195), ('em316gctsf', 196), ('em316osh', 197), ('ns198', 198), ('ns199', 199), ('ns200', 200), ('ns201', 201), ('ns202', 202), ('ns203', 203), ('ns204', 204), ('ns205', 205), ('ns206', 206), ('ns207', 207), ('ns208', 208), ('ns209', 209), ('em316sadm1', 210), ('ns211', 211), ('ns212', 212), ('em316flm1', 213), ('em316flm2', 214), ('ns215', 215), ('ns216', 216), ('ns217', 217), ('ns218', 218), ('wdm24ctr', 219), ('ns220', 220), ('wdm24ctl', 221), ('em316frm1', 222), ('em316frm2', 223), ('wdm44sf', 224), ('em316swrfhp', 225), ('ns226', 226), ('em316swhp', 227), ('ns228', 228), ('em316f2rm1', 229), ('em316f2rm2', 230), ('ns231', 231), ('ns232', 232), ('ns233', 233), ('ns234', 234), ('ns235', 235), ('ns236', 236), ('ns237', 237), ('ns238', 238), ('em316wfrmc', 239), ('em316wfrmt', 240), ('em316t1mux1', 241), ('em316t1mux2', 242), ('em316e1mux4j', 243), ('em316e1x4sfj', 244), ('ns245', 245), ('em316efrm1', 246), ('em316efrm2', 247), ('ns248', 248), ('ns249', 249), ('ns250', 250), ('ns251', 251), ('ns252', 252), ('ns253', 253), ('ns254', 254)) + named_values(('ns255', 255), ('ns256', 256), ('ns257', 257), ('em316sc1021', 258), ('ns259', 259), ('ns260', 260), ('ns261', 261), ('em316edsc1', 262), ('em316edsc2', 263), ('em316wdmslot', 264), ('em316wdmc265', 265), ('empty266', 266), ('em316wp1', 267), ('em316wp2', 268), ('em316oa', 269), ('em316e1mux1', 270), ('em316e1mux2', 271), ('em3162tsfp', 272), ('em316dmr48', 273), ('ns3162sfpr', 274), ('ns316xp342r', 275), ('em316ef', 276), ('em316efsf', 277), ('em316padms', 278), ('ns279', 279), ('ns280', 280), ('ns281', 281), ('ns316f16csfp', 282), ('ns316sdi8', 283), ('ns284', 284), ('em316wdmpa4', 285), ('em316wdmpa4t', 286), ('ns287', 287), ('em3162gbicl', 288), ('em3162gbicr', 289), ('em316ge1sfl', 290), ('em316ge1sfr', 291), ('em316fchub', 292), ('em316fcr', 293), ('em316mr48', 294), ('ns295', 295), ('em316fe1xx', 296), ('em316ft1sf', 297), ('em316gbicsfp', 298), ('ns299', 299), ('ns300', 300), ('em316pamulc8n', 301), ('em316pamulc4n', 302), ('em316t1muxrrm', 303), ('em316e1muxrrm', 304), ('ns305', 305), ('em316wo3c', 306), ('ns307', 307), ('em316grmah', 308), ('em316grmahsf', 309), ('em316efrmah', 310), ('em316efrmahsf', 311), ('em316erm', 312), ('em316ermsf', 313), ('em316efan', 314), ('em316efansf', 315), ('ns316', 316), ('nc316Xp343r', 317), ('ns318', 318), ('em316pamulc8', 319), ('em316pamulc4', 320), ('cm316fFtth', 321), ('ns322', 322), ('ns323', 323), ('ns324', 324), ('ns325', 325), ('em316padm41mu', 326), ('ns327', 327), ('em316pamuscm4', 328), ('em316pamuscd4', 329), ('em316pamuscm8', 330), ('em316pamuscd8', 331), ('em316muxmusc16', 332), ('em316dmuxmusc16', 333), ('ns334', 334), ('em316dpadms', 335), ('ns336', 336), ('em316dwmux16', 337), ('em316dwdmx16', 338), ('ns339', 339), ('ns340', 340), ('em316fe1sf', 341), ('em316xt1', 342), ('em316fe1rj', 343), ('em316gt1sfv', 344), ('ns345', 345), ('ns346', 346), ('ns347', 347), ('ns348', 348), ('ns349', 349), ('nc316xp322', 350), ('nc316xp323', 351), ('em316wermc', 352), ('em316wermt', 353), ('ns354', 354), ('ns355', 355), ('ns356', 356), ('ns357', 357), ('em316ee1rmft', 358), ('em316xe1rmft', 359), ('em316lx2', 360), ('em316lxm', 361), ('em316dwmux32', 362), ('em316dwdmx32v', 363), ('em316dwmux32nv', 364), ('em316dwdmx32n', 365), ('ns366', 366), ('ns367', 367), ('em316fe1rmft', 368), ('em316efe1ah', 369), ('em316eft1ah', 370), ('em316efe1rj', 371), ('ns372', 372), ('ns373', 373), ('ns374', 374), ('em316grmahsh', 375), ('em316ermahsh', 376), ('ns377', 377), ('ns378', 378), ('em316ermah', 379), ('ns380', 380), ('em3162sfpx', 381), ('ns382', 382), ('pmcwdm8sfp', 383), ('ns384', 384), ('ns385', 385), ('mccSfp36', 386), ('mccGRj36', 387), ('em316osc', 388), ('em316gemx2r', 389), ('em316gemx6r', 390), ('mccSfp72', 391), ('mccGRj72', 392), ('em316gcl', 393), ('em316gclsf', 394), ('em316wgclc', 395), ('em316wgclt', 396), ('ns397', 397), ('ns398', 398), ('ns399', 399), ('ns400', 400), ('ns401', 401), ('ns402', 402), ('ns403', 403), ('ns404', 404), ('ns405', 405), ('ns406', 406), ('ns407', 407), ('ns408', 408), ('ns409', 409), ('ns410', 410), ('ns411', 411), ('ns412', 412), ('ns413', 413), ('ns414', 414), ('ns415', 415), ('ns416', 416), ('em316xfpr', 417), ('oemntgrmah', 418), ('oemntermah', 419), ('oemntnm', 420), ('em316wds3c', 421), ('em316wds3t', 422), ('em316we3c', 423), ('em316we3t', 424), ('ns425', 425), ('ns426', 426), ('em316eft1mua4v', 427), ('em316efx1mub4', 428), ('em316efe1muc4v', 429), ('ns430', 430), ('ns431', 431), ('ns432', 432), ('em316t1mux4rm', 433), ('em316e1muxrjrm', 434), ('em316e1mux4rm', 435), ('em316dmr', 436), ('em316mr', 437), ('ns438', 438), ('ns439', 439), ('ns440', 440), ('em316ge1rjsf', 441), ('em316mr48q', 442), ('em316dmr48q', 443), ('em316mrmx2r', 444), ('ns445', 445), ('ns446', 446), ('ns447', 447), ('ns448', 448), ('ns449', 449), ('ns450', 450), ('mcc9xfp', 451), ('ns452', 452), ('em316cdadd2', 453), ('em316cdadd1', 454), ('ns455', 455), ('ns456', 456), ('em316nmlx12', 457), ('em316nmlx21', 458), ('em316nmlx', 459), ('ns460', 460), ('em316sw22', 461), ('em316sw12', 462), ('em316sw04', 463), ('em316sw13', 464), ('ns465', 465), ('ns466', 466), ('ns467', 467), ('ns468', 468), ('ns469', 469), ('ns470', 470), ('em3164swb', 471), ('ns472', 472), ('ns473', 473), ('ns474', 474), ('em316csadsxx', 475), ('em316csadsxxyy', 476), ('em316csaddxx', 477), ('em316csaddxxyy', 478), ('em3163swb', 479), ('em316ds3', 480), ('em316dt3e3', 481), ('ns482', 482), ('em316mux4xn', 483), ('em316dmx4xn', 484), ('em316mux4xbd', 485), ('em316dmx4xbd', 486), ('em316mux8nbd', 487), ('em316dmx8nbd', 488), ('em316mux8bd', 489), ('em316dmx8bd', 490), ('em316dpadxx', 491), ('em316dpadxxyy', 492), ('em316dpad4xx', 493), ('em316dpad8xx', 494), ('em316wt1c', 495), ('ns496', 496), ('em316gt1rm', 497), ('em316g6t1rm1', 498), ('em316g6t1rm2', 499), ('em316dsadsxx', 500), ('em316ddaddxx', 501), ('em316ddaddxxyy', 502), ('em316edfalv', 503), ('em316psc', 504), ('em316sos', 505), ('em316doscb', 506), ('em316padm8', 507), ('em316csads4', 508), ('ns509', 509)) + named_values(('ns510', 510), ('ns511', 511), ('ns512', 512), ('em316plc', 513), ('ns514', 514), ('ns515', 515), ('ns516', 516), ('ns517', 517), ('ns518', 518), ('em316dwmx8', 519), ('ns520', 520), ('em316genpasv', 521), ('em316ge1rm', 522), ('ns523', 523), ('ns524', 524), ('em316g6e1rms2', 525), ('ns526', 526), ('ns527', 527), ('ns528', 528), ('ns529', 529), ('mcc18t1e1', 530), ('ns531', 531), ('ns532', 532), ('mcc18dt3e3', 533), ('em316edfar', 534), ('ns535', 535), ('ns536', 536), ('ns537', 537), ('em316ossh', 538), ('em316sc3', 539), ('ns540', 540), ('em316fc400', 541), ('ns542', 542), ('ns543', 543), ('ns544', 544), ('em316eusmv', 545), ('ns546', 546), ('ns547', 547), ('em316dcm100r', 548), ('em316dcm100l', 549), ('ns550', 550), ('em316twoxfpet', 551), ('em316dwmux16be', 552), ('ns553', 553), ('ns554', 554), ('empmc8xfp', 555), ('ns556', 556), ('em316dwmx16bem', 557), ('ns558', 558), ('em316e1t1xy', 559), ('dwmx32rbm', 560), ('ns561', 561), ('ns562', 562), ('ns563', 563), ('empmc36t1e1', 564), ('ns565', 565), ('em316palc8nl', 566), ('em316palc8nr', 567), ('em316gswxy', 568), ('em316dwd40m5713', 569), ('em316dwd40m5712', 570), ('em316dwd40m5711', 571), ('em316mux535531b', 572), ('ns573', 573), ('em31610gxy', 574), ('ns575', 575), ('ns576', 576), ('ns577', 577), ('ns578', 578), ('ns579', 579), ('ns580', 580), ('ns581', 581), ('ns582', 582), ('ns583', 583), ('ns584', 584), ('em316os2', 585), ('em316osa', 586), ('ns587', 587), ('ns588', 588), ('ns589', 589), ('ns590', 590), ('ns591', 591), ('ns592', 592), ('em316ea', 593), ('ns594', 594), ('em316eusm10gr', 595), ('em316eusm10gl', 596), ('em316dmdxa16b1', 597), ('em316dmdxa16b2', 598), ('em316dmdxa16b3', 599), ('em316dmdxa16b4', 600), ('em316dmdxa16b5', 601), ('em316dmdxa40m01', 602), ('em316dmdxa40m02', 603), ('em316dmdxa40m03', 604), ('em316dmdxa40m04', 605), ('em316dmdxa40m05', 606), ('em316dmdxa40m06', 607), ('em316dmdxa40m07', 608), ('em316dmdxa40m08', 609), ('em316dmdxa40m09', 610), ('em316dmdxa40m10', 611), ('em316dmdxa40m11', 612), ('em316dmdxa16ra', 613), ('em316dmdxa16rb', 614), ('em31620g1', 615), ('em31620g2', 616), ('em31640g3', 617), ('em31640g4', 618), ('em31640g5', 619), ('em316rpon', 620), ('ns621', 621), ('empmc36sas', 622), ('em316osw8', 623), ('ns624', 624), ('ns625', 625), ('em31610g8swxyr', 626), ('em31610g8swxym', 627), ('em31610g8swxyl', 628), ('ns629', 629), ('em316cmux831b', 630), ('ns631', 631), ('em316mdx46ma001', 632), ('em316mdx46ma002', 633), ('em316mdx46ma003', 634), ('em316mdx46ma004', 635), ('em316mdx46ma005', 636), ('em316mdx46ma006', 637), ('em316mdx46ma007', 638), ('em316mdx46ma008', 639), ('em316mdx46ma009', 640), ('em316mdx46ma010', 641), ('em316mdx46ma011', 642), ('em316mdx46ma012', 643), ('em316osw128a', 644), ('em316osw128b', 645), ('em316osw128c', 646), ('em316osw128d', 647), ('em316osw128e', 648), ('em316osw128f', 649), ('em316osw128g', 650), ('em316osw128h', 651), ('em316osw128i', 652), ('em316osw128j', 653), ('em316osw128k', 654), ('em316osw128l', 655), ('em316osw128m', 656), ('ns657', 657), ('em316dcmxx', 658), ('em316osshlc', 659), ('em316eavg2217', 660), ('em316dmr10g3r', 661), ('em316fdt1e1rm', 662), ('em316sw8fxr', 663), ('em316sw8fxlv', 664), ('em316mdx46mx002', 665), ('em316mdx46mb003', 666), ('em316mdx46mb002', 667), ('em316mdx46mc002', 668), ('em316eamlp2017v', 669), ('ns670', 670), ('em316gemx4rr', 671), ('em316gemx4rlv', 672), ('empmcqsfp36', 673), ('ns674', 674), ('ns675', 675), ('em3162qsfp40', 676), ('ns677', 677), ('ns678', 678), ('mcc36ic', 679), ('ns680', 680), ('em316voar', 681), ('em316voalv', 682), ('em316dvmdxa', 683), ('em316dvmdxbv', 684), ('em316cmdxm8al', 685), ('em316cmdxm8ar', 686), ('ns687', 687), ('ns688', 688), ('em316dvmdxav1', 689), ('em316dvmdxav2', 690), ('em316dvmdxav3', 691), ('em316dvmdxav4', 692), ('em316dvmdxav5', 693), ('em316dvmdxav6', 694), ('em316dvmdxav7', 695), ('em316dvmdxav8', 696), ('em316dvmdxav9', 697), ('ns698', 698), ('ns699', 699), ('ns700', 700), ('em316ra12r', 701), ('em316ra12lv', 702), ('ns703', 703), ('em316ra12mv', 704), ('ns705', 705), ('ns706', 706), ('em316dmr10gf', 707), ('ns708', 708), ('ns709', 709), ('ns710', 710), ('ns711', 711), ('ns712', 712), ('ns713', 713), ('ns714', 714), ('ns715', 715), ('ns716', 716), ('ns717', 717), ('ns718', 718), ('ns719', 719), ('oddmr10g3r', 720), ('oddmr10gf', 721), ('od2hwss4dws', 722), ('od2hmxp100g', 723), ('odtxp100gf2c', 724), ('ns725', 725), ('em316raf10', 726), ('ns727', 727), ('odtxp100g2c', 728), ('ns729', 729), ('od2hwss4dcw', 730), ('ns731', 731), ('ns732', 732), ('odugc', 733), ('ns734', 734), ('ns735', 735), ('odfiller', 736), ('odtxp100g2cw1', 737), ('od2hwss4dww', 738), ('ns739', 739), ('ns740', 740), ('ns741', 741), ('ns742', 742), ('ns743', 743), ('ns744', 744), ('ns745', 745), ('ns746', 746), ('em316twoxfp16g', 747), ('od2hdwss4dws', 748), ('ns749', 749), ('ns750', 750), ('ns751', 751), ('ns752', 752), ('od2hdmx10g', 753), ('ns754', 754), ('ns755', 755), ('ns756', 756), ('odtxp100gf', 757)) class Nbscmmcenumportconnector(TextualConvention, Integer32): description = 'The Port Connector.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(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)) named_values = named_values(('unknown', 1), ('removed', 2), ('foDSC', 3), ('foSC', 4), ('cuRj45', 5), ('foLC', 6), ('coaxF', 7), ('coaxBNC', 8), ('coax2BNC', 9), ('cuRj45wLEDs', 10), ('cuRj11', 11), ('cuDb9', 12), ('cuHssdc', 13), ('coaxHeader', 14), ('foFiberJack', 15), ('foMtRj', 16), ('foMu', 17), ('sg', 18), ('foPigtail', 19), ('cuPigtail', 20), ('smb', 21), ('firewireA', 22), ('firewireB', 23), ('cuRj48', 24), ('fo1LC', 25), ('fo2ST', 26), ('sataDevicePlug', 27), ('sataHostPlug', 28), ('miniCoax', 29), ('mpo', 30), ('miniSAS4x', 31), ('reserved', 32), ('cxpCuPassive', 33), ('cxpCuActive', 34), ('cxpFoActive', 35), ('cxpFoConnect', 36), ('fc', 37), ('cuMicroUsbB', 38), ('rj45wUSBRJ45Active', 39), ('rj45wUSBUSBActive', 40)) class Nbscmmcchannelband(TextualConvention, Integer32): description = "The ITU grid labels DWDM channels with a letter 'band' and a numeric channel. Within this mib, the band is indicated by this object, and the channel number is shown in the object nbsOsaChannelNumber. Frequencies of at least 180100 GHz but less than 190100 GHz are considered the L spectrum, and frequencies of at least 190100 but less than 200100 GHz are considered the C spectrum. Frequencies evenly divisible by 100 GHz are designated with a 'C' or 'L' prepended to the channel number. Frequencies that are offset by 50 GHz are designated 'H' within the C spectrum, and 'Q' within the L spectrum." status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4)) named_values = named_values(('notSupported', 0), ('cBand', 1), ('hBand', 2), ('lBand', 3), ('qBand', 4)) mibBuilder.exportSymbols('NBS-CMMCENUM-MIB', NbsCmmcChannelBand=NbsCmmcChannelBand, NbsCmmcEnumChassisType=NbsCmmcEnumChassisType, NbsCmmcEnumPortConnector=NbsCmmcEnumPortConnector, PYSNMP_MODULE_ID=nbsCmmcEnumMib, NbsCmmcEnumSlotType=NbsCmmcEnumSlotType, nbsCmmcEnumMib=nbsCmmcEnumMib, NbsCmmcEnumSlotOperationType=NbsCmmcEnumSlotOperationType)
#! /usr/bin/env python3 '''A library of functions for our cool app''' def add(a, b): return a + b def add1(a): return a - 1 def sub1(a): pass
"""A library of functions for our cool app""" def add(a, b): return a + b def add1(a): return a - 1 def sub1(a): pass
def test_ports(api, utils): """Demonstrates adding ports to a configuration and setting the configuration on the traffic generator. The traffic generator should have no items configured other than the ports in this test. """ tx_port = utils.settings.ports[0] rx_port = utils.settings.ports[1] config = api.config() config.ports.port(name="tx_port", location=tx_port).port( name="rx_port", location=rx_port ).port(name="port with no location") config.options.port_options.location_preemption = True api.set_config(config) config = api.config() api.set_config(config)
def test_ports(api, utils): """Demonstrates adding ports to a configuration and setting the configuration on the traffic generator. The traffic generator should have no items configured other than the ports in this test. """ tx_port = utils.settings.ports[0] rx_port = utils.settings.ports[1] config = api.config() config.ports.port(name='tx_port', location=tx_port).port(name='rx_port', location=rx_port).port(name='port with no location') config.options.port_options.location_preemption = True api.set_config(config) config = api.config() api.set_config(config)
""" 39 / 39 test cases passed. Runtime: 340 ms Memory Usage: 34.7 MB """ class Solution: def numOfMinutes(self, n: int, headID: int, manager: List[int], informTime: List[int]) -> int: graph = [[] for _ in range(n)] for i in range(n): id = manager[i] if id != -1: graph[id].append(i) que = collections.deque([(headID, informTime[headID])]) ans = 0 while que: for _ in range(len(que)): pid, time = que.popleft() ans = max(ans, time) for id in graph[pid]: que.append((id, time + informTime[id])) return ans
""" 39 / 39 test cases passed. Runtime: 340 ms Memory Usage: 34.7 MB """ class Solution: def num_of_minutes(self, n: int, headID: int, manager: List[int], informTime: List[int]) -> int: graph = [[] for _ in range(n)] for i in range(n): id = manager[i] if id != -1: graph[id].append(i) que = collections.deque([(headID, informTime[headID])]) ans = 0 while que: for _ in range(len(que)): (pid, time) = que.popleft() ans = max(ans, time) for id in graph[pid]: que.append((id, time + informTime[id])) return ans
# V0 # IDEA : DP class Solution(object): def wordBreak(self, s, wordDict): """ :type s: str :type wordDict: List[str] :rtype: bool """ dp = [False] * (len(s) + 1) dp[0] = True for i in range(1, len(s) + 1): for k in range(i): if dp[k] and s[k:i] in wordDict: dp[i] = True return dp.pop() # V1 # https://blog.csdn.net/fuxuemingzhu/article/details/79368360 class Solution(object): def wordBreak(self, s, wordDict): """ :type s: str :type wordDict: List[str] :rtype: bool """ print(s) print(wordDict) dp = [False] * (len(s) + 1) dp[0] = True print(dp) for i in range(1, len(s) + 1): for k in range(i): # if dp[k] : if dp[k] == True if dp[k] and s[k:i] in wordDict: dp[i] = True print(dp) return dp.pop() # V1' # https://www.jiuzhang.com/solution/word-break/#tag-highlight-lang-python class Solution: # @param s: A string s # @param dict: A dictionary of words dict def wordBreak(self, s, dict): if len(dict) == 0: return len(s) == 0 n = len(s) f = [False] * (n + 1) f[0] = True maxLength = max([len(w) for w in dict]) for i in range(1, n + 1): for j in range(1, min(i, maxLength) + 1): if not f[i - j]: continue if s[i - j:i] in dict: f[i] = True break return f[n] # V2 # Time: O(n * l^2) # Space: O(n) class Solution(object): def wordBreak(self, s, wordDict): """ :type s: str :type wordDict: Set[str] :rtype: bool """ n = len(s) max_len = 0 for string in wordDict: max_len = max(max_len, len(string)) can_break = [False for _ in range(n + 1)] can_break[0] = True for i in range(1, n + 1): for l in range(1, min(i, max_len) + 1): if can_break[i-l] and s[i-l:i] in wordDict: can_break[i] = True break return can_break[-1]
class Solution(object): def word_break(self, s, wordDict): """ :type s: str :type wordDict: List[str] :rtype: bool """ dp = [False] * (len(s) + 1) dp[0] = True for i in range(1, len(s) + 1): for k in range(i): if dp[k] and s[k:i] in wordDict: dp[i] = True return dp.pop() class Solution(object): def word_break(self, s, wordDict): """ :type s: str :type wordDict: List[str] :rtype: bool """ print(s) print(wordDict) dp = [False] * (len(s) + 1) dp[0] = True print(dp) for i in range(1, len(s) + 1): for k in range(i): if dp[k] and s[k:i] in wordDict: dp[i] = True print(dp) return dp.pop() class Solution: def word_break(self, s, dict): if len(dict) == 0: return len(s) == 0 n = len(s) f = [False] * (n + 1) f[0] = True max_length = max([len(w) for w in dict]) for i in range(1, n + 1): for j in range(1, min(i, maxLength) + 1): if not f[i - j]: continue if s[i - j:i] in dict: f[i] = True break return f[n] class Solution(object): def word_break(self, s, wordDict): """ :type s: str :type wordDict: Set[str] :rtype: bool """ n = len(s) max_len = 0 for string in wordDict: max_len = max(max_len, len(string)) can_break = [False for _ in range(n + 1)] can_break[0] = True for i in range(1, n + 1): for l in range(1, min(i, max_len) + 1): if can_break[i - l] and s[i - l:i] in wordDict: can_break[i] = True break return can_break[-1]
# # PySNMP MIB module LANART-AGENT (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/LANART-AGENT # Produced by pysmi-0.3.4 at Mon Apr 29 19:54:37 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Bits, ObjectIdentity, TimeTicks, Integer32, ModuleIdentity, NotificationType, Counter64, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Unsigned32, Counter32, MibIdentifier, iso, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "ObjectIdentity", "TimeTicks", "Integer32", "ModuleIdentity", "NotificationType", "Counter64", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Unsigned32", "Counter32", "MibIdentifier", "iso", "Gauge32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ccitt = MibIdentifier((0,)) null = MibIdentifier((0, 0)) iso = MibIdentifier((1,)) org = MibIdentifier((1, 3)) dod = MibIdentifier((1, 3, 6)) internet = MibIdentifier((1, 3, 6, 1)) directory = MibIdentifier((1, 3, 6, 1, 1)) mgmt = MibIdentifier((1, 3, 6, 1, 2)) experimental = MibIdentifier((1, 3, 6, 1, 3)) private = MibIdentifier((1, 3, 6, 1, 4)) enterprises = MibIdentifier((1, 3, 6, 1, 4, 1)) mib_2 = MibIdentifier((1, 3, 6, 1, 2, 1)).setLabel("mib-2") class DisplayString(OctetString): pass class PhysAddress(OctetString): pass system = MibIdentifier((1, 3, 6, 1, 2, 1, 1)) interfaces = MibIdentifier((1, 3, 6, 1, 2, 1, 2)) at = MibIdentifier((1, 3, 6, 1, 2, 1, 3)) ip = MibIdentifier((1, 3, 6, 1, 2, 1, 4)) icmp = MibIdentifier((1, 3, 6, 1, 2, 1, 5)) tcp = MibIdentifier((1, 3, 6, 1, 2, 1, 6)) udp = MibIdentifier((1, 3, 6, 1, 2, 1, 7)) egp = MibIdentifier((1, 3, 6, 1, 2, 1, 8)) transmission = MibIdentifier((1, 3, 6, 1, 2, 1, 10)) snmp = MibIdentifier((1, 3, 6, 1, 2, 1, 11)) sysDescr = MibScalar((1, 3, 6, 1, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDescr.setStatus('mandatory') sysObjectID = MibScalar((1, 3, 6, 1, 2, 1, 1, 2), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysObjectID.setStatus('mandatory') sysUpTime = MibScalar((1, 3, 6, 1, 2, 1, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysUpTime.setStatus('mandatory') sysContact = MibScalar((1, 3, 6, 1, 2, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysContact.setStatus('mandatory') sysName = MibScalar((1, 3, 6, 1, 2, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysName.setStatus('mandatory') sysLocation = MibScalar((1, 3, 6, 1, 2, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysLocation.setStatus('mandatory') sysServices = MibScalar((1, 3, 6, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysServices.setStatus('mandatory') ifNumber = MibScalar((1, 3, 6, 1, 2, 1, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifNumber.setStatus('mandatory') ifTable = MibTable((1, 3, 6, 1, 2, 1, 2, 2), ) if mibBuilder.loadTexts: ifTable.setStatus('mandatory') ifEntry = MibTableRow((1, 3, 6, 1, 2, 1, 2, 2, 1), ).setIndexNames((0, "LANART-AGENT", "ifIndex")) if mibBuilder.loadTexts: ifEntry.setStatus('mandatory') ifIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifIndex.setStatus('mandatory') ifDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ifDescr.setStatus('mandatory') ifType = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 3), 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))).clone(namedValues=NamedValues(("other", 1), ("regular1822", 2), ("hdh1822", 3), ("ddn-x25", 4), ("rfc877-x25", 5), ("ethernet-csmacd", 6), ("iso88023-csmacd", 7), ("iso88024-tokenBus", 8), ("iso88025-tokenRing", 9), ("iso88026-man", 10), ("starLan", 11), ("proteon-10Mbit", 12), ("proteon-80Mbit", 13), ("hyperchannel", 14), ("fddi", 15), ("lapb", 16), ("sdlc", 17), ("ds1", 18), ("e1", 19), ("basicISDN", 20), ("primaryISDN", 21), ("propPointToPointSerial", 22), ("ppp", 23), ("softwareLoopback", 24), ("eon", 25), ("ethernet-3Mbit", 26), ("nsip", 27), ("slip", 28), ("ultra", 29), ("ds3", 30), ("sip", 31), ("frame-relay", 32)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ifType.setStatus('mandatory') ifMtu = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifMtu.setStatus('mandatory') ifSpeed = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifSpeed.setStatus('mandatory') ifPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 6), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifPhysAddress.setStatus('mandatory') ifAdminStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ifAdminStatus.setStatus('mandatory') ifOperStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOperStatus.setStatus('mandatory') ifLastChange = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 9), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifLastChange.setStatus('mandatory') ifInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInOctets.setStatus('mandatory') ifInUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInUcastPkts.setStatus('mandatory') ifInNUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInNUcastPkts.setStatus('mandatory') ifInDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInDiscards.setStatus('mandatory') ifInErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInErrors.setStatus('mandatory') ifInUnknownProtos = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInUnknownProtos.setStatus('mandatory') ifOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutOctets.setStatus('mandatory') ifOutUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutUcastPkts.setStatus('mandatory') ifOutNUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutNUcastPkts.setStatus('mandatory') ifOutDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutDiscards.setStatus('mandatory') ifOutErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutErrors.setStatus('mandatory') ifOutQLen = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutQLen.setStatus('mandatory') ifSpecific = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 22), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifSpecific.setStatus('mandatory') atTable = MibTable((1, 3, 6, 1, 2, 1, 3, 1), ) if mibBuilder.loadTexts: atTable.setStatus('deprecated') atEntry = MibTableRow((1, 3, 6, 1, 2, 1, 3, 1, 1), ).setIndexNames((0, "LANART-AGENT", "atIfIndex"), (0, "LANART-AGENT", "atNetAddress")) if mibBuilder.loadTexts: atEntry.setStatus('deprecated') atIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: atIfIndex.setStatus('deprecated') atPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 2), PhysAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: atPhysAddress.setStatus('deprecated') atNetAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: atNetAddress.setStatus('deprecated') ipForwarding = MibScalar((1, 3, 6, 1, 2, 1, 4, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("forwarding", 1), ("not-forwarding", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipForwarding.setStatus('mandatory') ipDefaultTTL = MibScalar((1, 3, 6, 1, 2, 1, 4, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipDefaultTTL.setStatus('mandatory') ipInReceives = MibScalar((1, 3, 6, 1, 2, 1, 4, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInReceives.setStatus('mandatory') ipInHdrErrors = MibScalar((1, 3, 6, 1, 2, 1, 4, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInHdrErrors.setStatus('mandatory') ipInAddrErrors = MibScalar((1, 3, 6, 1, 2, 1, 4, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInAddrErrors.setStatus('mandatory') ipForwDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 4, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipForwDatagrams.setStatus('mandatory') ipInUnknownProtos = MibScalar((1, 3, 6, 1, 2, 1, 4, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInUnknownProtos.setStatus('mandatory') ipInDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInDiscards.setStatus('mandatory') ipInDelivers = MibScalar((1, 3, 6, 1, 2, 1, 4, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInDelivers.setStatus('mandatory') ipOutRequests = MibScalar((1, 3, 6, 1, 2, 1, 4, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutRequests.setStatus('mandatory') ipOutDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutDiscards.setStatus('mandatory') ipOutNoRoutes = MibScalar((1, 3, 6, 1, 2, 1, 4, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutNoRoutes.setStatus('mandatory') ipReasmTimeout = MibScalar((1, 3, 6, 1, 2, 1, 4, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmTimeout.setStatus('mandatory') ipReasmReqds = MibScalar((1, 3, 6, 1, 2, 1, 4, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmReqds.setStatus('mandatory') ipReasmOKs = MibScalar((1, 3, 6, 1, 2, 1, 4, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmOKs.setStatus('mandatory') ipReasmFails = MibScalar((1, 3, 6, 1, 2, 1, 4, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmFails.setStatus('mandatory') ipFragOKs = MibScalar((1, 3, 6, 1, 2, 1, 4, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragOKs.setStatus('mandatory') ipFragFails = MibScalar((1, 3, 6, 1, 2, 1, 4, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragFails.setStatus('mandatory') ipFragCreates = MibScalar((1, 3, 6, 1, 2, 1, 4, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragCreates.setStatus('mandatory') ipAddrTable = MibTable((1, 3, 6, 1, 2, 1, 4, 20), ) if mibBuilder.loadTexts: ipAddrTable.setStatus('mandatory') ipAddrEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 20, 1), ).setIndexNames((0, "LANART-AGENT", "ipAdEntAddr")) if mibBuilder.loadTexts: ipAddrEntry.setStatus('mandatory') ipAdEntAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntAddr.setStatus('mandatory') ipAdEntIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntIfIndex.setStatus('mandatory') ipAdEntNetMask = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntNetMask.setStatus('mandatory') ipAdEntBcastAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntBcastAddr.setStatus('mandatory') ipAdEntReasmMaxSize = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntReasmMaxSize.setStatus('mandatory') ipRouteTable = MibTable((1, 3, 6, 1, 2, 1, 4, 21), ) if mibBuilder.loadTexts: ipRouteTable.setStatus('mandatory') ipRouteEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 21, 1), ).setIndexNames((0, "LANART-AGENT", "ipRouteDest")) if mibBuilder.loadTexts: ipRouteEntry.setStatus('mandatory') ipRouteDest = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteDest.setStatus('mandatory') ipRouteIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteIfIndex.setStatus('mandatory') ipRouteMetric1 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric1.setStatus('mandatory') ipRouteMetric2 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric2.setStatus('mandatory') ipRouteMetric3 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric3.setStatus('mandatory') ipRouteMetric4 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric4.setStatus('mandatory') ipRouteNextHop = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 7), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteNextHop.setStatus('mandatory') ipRouteType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("direct", 3), ("indirect", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteType.setStatus('mandatory') ipRouteProto = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=NamedValues(("other", 1), ("local", 2), ("netmgmt", 3), ("icmp", 4), ("egp", 5), ("ggp", 6), ("hello", 7), ("rip", 8), ("is-is", 9), ("es-is", 10), ("ciscoIgrp", 11), ("bbnSpfIgp", 12), ("ospf", 13), ("bgp", 14)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRouteProto.setStatus('mandatory') ipRouteAge = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteAge.setStatus('mandatory') ipRouteMask = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 11), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMask.setStatus('mandatory') ipRouteMetric5 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric5.setStatus('mandatory') ipRouteInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 13), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRouteInfo.setStatus('mandatory') ipNetToMediaTable = MibTable((1, 3, 6, 1, 2, 1, 4, 22), ) if mibBuilder.loadTexts: ipNetToMediaTable.setStatus('mandatory') ipNetToMediaEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 22, 1), ).setIndexNames((0, "LANART-AGENT", "ipNetToMediaIfIndex"), (0, "LANART-AGENT", "ipNetToMediaNetAddress")) if mibBuilder.loadTexts: ipNetToMediaEntry.setStatus('mandatory') ipNetToMediaIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaIfIndex.setStatus('mandatory') ipNetToMediaPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 2), PhysAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaPhysAddress.setStatus('mandatory') ipNetToMediaNetAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipNetToMediaNetAddress.setStatus('mandatory') ipNetToMediaType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("invalid", 2), ("dynamic", 3), ("static", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaType.setStatus('mandatory') ipRoutingDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRoutingDiscards.setStatus('mandatory') icmpInMsgs = MibScalar((1, 3, 6, 1, 2, 1, 5, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInMsgs.setStatus('mandatory') icmpInErrors = MibScalar((1, 3, 6, 1, 2, 1, 5, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInErrors.setStatus('mandatory') icmpInDestUnreachs = MibScalar((1, 3, 6, 1, 2, 1, 5, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInDestUnreachs.setStatus('mandatory') icmpInTimeExcds = MibScalar((1, 3, 6, 1, 2, 1, 5, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimeExcds.setStatus('mandatory') icmpInParmProbs = MibScalar((1, 3, 6, 1, 2, 1, 5, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInParmProbs.setStatus('mandatory') icmpInSrcQuenchs = MibScalar((1, 3, 6, 1, 2, 1, 5, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInSrcQuenchs.setStatus('mandatory') icmpInRedirects = MibScalar((1, 3, 6, 1, 2, 1, 5, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInRedirects.setStatus('mandatory') icmpInEchos = MibScalar((1, 3, 6, 1, 2, 1, 5, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInEchos.setStatus('mandatory') icmpInEchoReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInEchoReps.setStatus('mandatory') icmpInTimestamps = MibScalar((1, 3, 6, 1, 2, 1, 5, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimestamps.setStatus('mandatory') icmpInTimestampReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimestampReps.setStatus('mandatory') icmpInAddrMasks = MibScalar((1, 3, 6, 1, 2, 1, 5, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInAddrMasks.setStatus('mandatory') icmpInAddrMaskReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInAddrMaskReps.setStatus('mandatory') icmpOutMsgs = MibScalar((1, 3, 6, 1, 2, 1, 5, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutMsgs.setStatus('mandatory') icmpOutErrors = MibScalar((1, 3, 6, 1, 2, 1, 5, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutErrors.setStatus('mandatory') icmpOutDestUnreachs = MibScalar((1, 3, 6, 1, 2, 1, 5, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutDestUnreachs.setStatus('mandatory') icmpOutTimeExcds = MibScalar((1, 3, 6, 1, 2, 1, 5, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimeExcds.setStatus('mandatory') icmpOutParmProbs = MibScalar((1, 3, 6, 1, 2, 1, 5, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutParmProbs.setStatus('mandatory') icmpOutSrcQuenchs = MibScalar((1, 3, 6, 1, 2, 1, 5, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutSrcQuenchs.setStatus('mandatory') icmpOutRedirects = MibScalar((1, 3, 6, 1, 2, 1, 5, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutRedirects.setStatus('mandatory') icmpOutEchos = MibScalar((1, 3, 6, 1, 2, 1, 5, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutEchos.setStatus('mandatory') icmpOutEchoReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutEchoReps.setStatus('mandatory') icmpOutTimestamps = MibScalar((1, 3, 6, 1, 2, 1, 5, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimestamps.setStatus('mandatory') icmpOutTimestampReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimestampReps.setStatus('mandatory') icmpOutAddrMasks = MibScalar((1, 3, 6, 1, 2, 1, 5, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutAddrMasks.setStatus('mandatory') icmpOutAddrMaskReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutAddrMaskReps.setStatus('mandatory') tcpRtoAlgorithm = MibScalar((1, 3, 6, 1, 2, 1, 6, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("constant", 2), ("rsre", 3), ("vanj", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRtoAlgorithm.setStatus('mandatory') tcpRtoMin = MibScalar((1, 3, 6, 1, 2, 1, 6, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRtoMin.setStatus('mandatory') tcpRtoMax = MibScalar((1, 3, 6, 1, 2, 1, 6, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRtoMax.setStatus('mandatory') tcpMaxConn = MibScalar((1, 3, 6, 1, 2, 1, 6, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpMaxConn.setStatus('mandatory') tcpActiveOpens = MibScalar((1, 3, 6, 1, 2, 1, 6, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpActiveOpens.setStatus('mandatory') tcpPassiveOpens = MibScalar((1, 3, 6, 1, 2, 1, 6, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpPassiveOpens.setStatus('mandatory') tcpAttemptFails = MibScalar((1, 3, 6, 1, 2, 1, 6, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpAttemptFails.setStatus('mandatory') tcpEstabResets = MibScalar((1, 3, 6, 1, 2, 1, 6, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEstabResets.setStatus('mandatory') tcpCurrEstab = MibScalar((1, 3, 6, 1, 2, 1, 6, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpCurrEstab.setStatus('mandatory') tcpInSegs = MibScalar((1, 3, 6, 1, 2, 1, 6, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpInSegs.setStatus('mandatory') tcpOutSegs = MibScalar((1, 3, 6, 1, 2, 1, 6, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpOutSegs.setStatus('mandatory') tcpRetransSegs = MibScalar((1, 3, 6, 1, 2, 1, 6, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRetransSegs.setStatus('mandatory') tcpConnTable = MibTable((1, 3, 6, 1, 2, 1, 6, 13), ) if mibBuilder.loadTexts: tcpConnTable.setStatus('mandatory') tcpConnEntry = MibTableRow((1, 3, 6, 1, 2, 1, 6, 13, 1), ).setIndexNames((0, "LANART-AGENT", "tcpConnLocalAddress"), (0, "LANART-AGENT", "tcpConnLocalPort"), (0, "LANART-AGENT", "tcpConnRemAddress"), (0, "LANART-AGENT", "tcpConnRemPort")) if mibBuilder.loadTexts: tcpConnEntry.setStatus('mandatory') tcpConnState = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))).clone(namedValues=NamedValues(("closed", 1), ("listen", 2), ("synSent", 3), ("synReceived", 4), ("established", 5), ("finWait1", 6), ("finWait2", 7), ("closeWait", 8), ("lastAck", 9), ("closing", 10), ("timeWait", 11), ("deleteTCB", 12)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpConnState.setStatus('mandatory') tcpConnLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnLocalAddress.setStatus('mandatory') tcpConnLocalPort = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnLocalPort.setStatus('mandatory') tcpConnRemAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnRemAddress.setStatus('mandatory') tcpConnRemPort = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnRemPort.setStatus('mandatory') tcpInErrs = MibScalar((1, 3, 6, 1, 2, 1, 6, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpInErrs.setStatus('mandatory') tcpOutRsts = MibScalar((1, 3, 6, 1, 2, 1, 6, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpOutRsts.setStatus('mandatory') udpInDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 7, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpInDatagrams.setStatus('mandatory') udpNoPorts = MibScalar((1, 3, 6, 1, 2, 1, 7, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpNoPorts.setStatus('mandatory') udpInErrors = MibScalar((1, 3, 6, 1, 2, 1, 7, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpInErrors.setStatus('mandatory') udpOutDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 7, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpOutDatagrams.setStatus('mandatory') udpTable = MibTable((1, 3, 6, 1, 2, 1, 7, 5), ) if mibBuilder.loadTexts: udpTable.setStatus('mandatory') udpEntry = MibTableRow((1, 3, 6, 1, 2, 1, 7, 5, 1), ).setIndexNames((0, "LANART-AGENT", "udpLocalAddress"), (0, "LANART-AGENT", "udpLocalPort")) if mibBuilder.loadTexts: udpEntry.setStatus('mandatory') udpLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 7, 5, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpLocalAddress.setStatus('mandatory') udpLocalPort = MibTableColumn((1, 3, 6, 1, 2, 1, 7, 5, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: udpLocalPort.setStatus('mandatory') snmpInPkts = MibScalar((1, 3, 6, 1, 2, 1, 11, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInPkts.setStatus('mandatory') snmpOutPkts = MibScalar((1, 3, 6, 1, 2, 1, 11, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutPkts.setStatus('mandatory') snmpInBadVersions = MibScalar((1, 3, 6, 1, 2, 1, 11, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadVersions.setStatus('mandatory') snmpInBadCommunityNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadCommunityNames.setStatus('mandatory') snmpInBadCommunityUses = MibScalar((1, 3, 6, 1, 2, 1, 11, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadCommunityUses.setStatus('mandatory') snmpInASNParseErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInASNParseErrs.setStatus('mandatory') snmpInTooBigs = MibScalar((1, 3, 6, 1, 2, 1, 11, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTooBigs.setStatus('mandatory') snmpInNoSuchNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInNoSuchNames.setStatus('mandatory') snmpInBadValues = MibScalar((1, 3, 6, 1, 2, 1, 11, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadValues.setStatus('mandatory') snmpInReadOnlys = MibScalar((1, 3, 6, 1, 2, 1, 11, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInReadOnlys.setStatus('mandatory') snmpInGenErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGenErrs.setStatus('mandatory') snmpInTotalReqVars = MibScalar((1, 3, 6, 1, 2, 1, 11, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTotalReqVars.setStatus('mandatory') snmpInTotalSetVars = MibScalar((1, 3, 6, 1, 2, 1, 11, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTotalSetVars.setStatus('mandatory') snmpInGetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetRequests.setStatus('mandatory') snmpInGetNexts = MibScalar((1, 3, 6, 1, 2, 1, 11, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetNexts.setStatus('mandatory') snmpInSetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInSetRequests.setStatus('mandatory') snmpInGetResponses = MibScalar((1, 3, 6, 1, 2, 1, 11, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetResponses.setStatus('mandatory') snmpInTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTraps.setStatus('mandatory') snmpOutTooBigs = MibScalar((1, 3, 6, 1, 2, 1, 11, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutTooBigs.setStatus('mandatory') snmpOutNoSuchNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutNoSuchNames.setStatus('mandatory') snmpOutBadValues = MibScalar((1, 3, 6, 1, 2, 1, 11, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutBadValues.setStatus('mandatory') snmpOutGenErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGenErrs.setStatus('mandatory') snmpOutGetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetRequests.setStatus('mandatory') snmpOutGetNexts = MibScalar((1, 3, 6, 1, 2, 1, 11, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetNexts.setStatus('mandatory') snmpOutSetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutSetRequests.setStatus('mandatory') snmpOutGetResponses = MibScalar((1, 3, 6, 1, 2, 1, 11, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetResponses.setStatus('mandatory') snmpOutTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutTraps.setStatus('mandatory') snmpEnableAuthenTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 30), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpEnableAuthenTraps.setStatus('mandatory') class MacAddress(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6) fixedLength = 6 class BridgeId(OctetString): subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8) fixedLength = 8 class Timeout(Integer32): pass dot1dBridge = MibIdentifier((1, 3, 6, 1, 2, 1, 17)) dot1dBase = MibIdentifier((1, 3, 6, 1, 2, 1, 17, 1)) dot1dStp = MibIdentifier((1, 3, 6, 1, 2, 1, 17, 2)) dot1dSr = MibIdentifier((1, 3, 6, 1, 2, 1, 17, 3)) dot1dTp = MibIdentifier((1, 3, 6, 1, 2, 1, 17, 4)) dot1dStatic = MibIdentifier((1, 3, 6, 1, 2, 1, 17, 5)) newRoot = NotificationType((1, 3, 6, 1, 2, 1, 17) + (0,1)) topologyChange = NotificationType((1, 3, 6, 1, 2, 1, 17) + (0,2)) snmpDot3RptrMgt = MibIdentifier((1, 3, 6, 1, 2, 1, 22)) rptrBasicPackage = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 1)) rptrMonitorPackage = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 2)) rptrAddrTrackPackage = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 3)) rptrRptrInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 1, 1)) rptrGroupInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 1, 2)) rptrPortInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 1, 3)) rptrMonitorRptrInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 2, 1)) rptrMonitorGroupInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 2, 2)) rptrMonitorPortInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 2, 3)) rptrAddrTrackRptrInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 3, 1)) rptrAddrTrackGroupInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 3, 2)) rptrAddrTrackPortInfo = MibIdentifier((1, 3, 6, 1, 2, 1, 22, 3, 3)) rptrGroupCapacity = MibScalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupCapacity.setStatus('mandatory') rptrOperStatus = MibScalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("ok", 2), ("rptrFailure", 3), ("groupFailure", 4), ("portFailure", 5), ("generalFailure", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrOperStatus.setStatus('mandatory') rptrHealthText = MibScalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrHealthText.setStatus('mandatory') rptrReset = MibScalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noReset", 1), ("reset", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rptrReset.setStatus('mandatory') rptrNonDisruptTest = MibScalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noSelfTest", 1), ("selfTest", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rptrNonDisruptTest.setStatus('mandatory') rptrTotalPartitionedPorts = MibScalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 6), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrTotalPartitionedPorts.setStatus('mandatory') rptrGroupTable = MibTable((1, 3, 6, 1, 2, 1, 22, 1, 2, 1), ) if mibBuilder.loadTexts: rptrGroupTable.setStatus('mandatory') rptrGroupEntry = MibTableRow((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1), ).setIndexNames((0, "LANART-AGENT", "rptrGroupIndex")) if mibBuilder.loadTexts: rptrGroupEntry.setStatus('mandatory') rptrGroupIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupIndex.setStatus('mandatory') rptrGroupDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupDescr.setStatus('mandatory') rptrGroupObjectID = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 3), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupObjectID.setStatus('mandatory') rptrGroupOperStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("operational", 2), ("malfunctioning", 3), ("notPresent", 4), ("underTest", 5), ("resetInProgress", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupOperStatus.setStatus('mandatory') rptrGroupLastOperStatusChange = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 5), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupLastOperStatusChange.setStatus('mandatory') rptrGroupPortCapacity = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrGroupPortCapacity.setStatus('mandatory') rptrPortTable = MibTable((1, 3, 6, 1, 2, 1, 22, 1, 3, 1), ) if mibBuilder.loadTexts: rptrPortTable.setStatus('mandatory') rptrPortEntry = MibTableRow((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1), ).setIndexNames((0, "LANART-AGENT", "rptrPortGroupIndex"), (0, "LANART-AGENT", "rptrPortIndex")) if mibBuilder.loadTexts: rptrPortEntry.setStatus('mandatory') rptrPortGroupIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrPortGroupIndex.setStatus('mandatory') rptrPortIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrPortIndex.setStatus('mandatory') rptrPortAdminStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rptrPortAdminStatus.setStatus('mandatory') rptrPortAutoPartitionState = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("notAutoPartitioned", 1), ("autoPartitioned", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrPortAutoPartitionState.setStatus('mandatory') rptrPortOperStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("operational", 1), ("notOperational", 2), ("notPresent", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrPortOperStatus.setStatus('mandatory') rptrMonitorTransmitCollisions = MibScalar((1, 3, 6, 1, 2, 1, 22, 2, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorTransmitCollisions.setStatus('mandatory') rptrMonitorGroupTable = MibTable((1, 3, 6, 1, 2, 1, 22, 2, 2, 1), ) if mibBuilder.loadTexts: rptrMonitorGroupTable.setStatus('mandatory') rptrMonitorGroupEntry = MibTableRow((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1), ).setIndexNames((0, "LANART-AGENT", "rptrMonitorGroupIndex")) if mibBuilder.loadTexts: rptrMonitorGroupEntry.setStatus('mandatory') rptrMonitorGroupIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorGroupIndex.setStatus('mandatory') rptrMonitorGroupTotalFrames = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorGroupTotalFrames.setStatus('mandatory') rptrMonitorGroupTotalOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorGroupTotalOctets.setStatus('mandatory') rptrMonitorGroupTotalErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorGroupTotalErrors.setStatus('mandatory') rptrMonitorPortTable = MibTable((1, 3, 6, 1, 2, 1, 22, 2, 3, 1), ) if mibBuilder.loadTexts: rptrMonitorPortTable.setStatus('mandatory') rptrMonitorPortEntry = MibTableRow((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1), ).setIndexNames((0, "LANART-AGENT", "rptrMonitorPortGroupIndex"), (0, "LANART-AGENT", "rptrMonitorPortIndex")) if mibBuilder.loadTexts: rptrMonitorPortEntry.setStatus('mandatory') rptrMonitorPortGroupIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortGroupIndex.setStatus('mandatory') rptrMonitorPortIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortIndex.setStatus('mandatory') rptrMonitorPortReadableFrames = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortReadableFrames.setStatus('mandatory') rptrMonitorPortReadableOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortReadableOctets.setStatus('mandatory') rptrMonitorPortFCSErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortFCSErrors.setStatus('mandatory') rptrMonitorPortAlignmentErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortAlignmentErrors.setStatus('mandatory') rptrMonitorPortFrameTooLongs = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortFrameTooLongs.setStatus('mandatory') rptrMonitorPortShortEvents = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortShortEvents.setStatus('mandatory') rptrMonitorPortRunts = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortRunts.setStatus('mandatory') rptrMonitorPortCollisions = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortCollisions.setStatus('mandatory') rptrMonitorPortLateEvents = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortLateEvents.setStatus('mandatory') rptrMonitorPortVeryLongEvents = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortVeryLongEvents.setStatus('mandatory') rptrMonitorPortDataRateMismatches = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortDataRateMismatches.setStatus('mandatory') rptrMonitorPortAutoPartitions = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortAutoPartitions.setStatus('mandatory') rptrMonitorPortTotalErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrMonitorPortTotalErrors.setStatus('mandatory') rptrAddrTrackTable = MibTable((1, 3, 6, 1, 2, 1, 22, 3, 3, 1), ) if mibBuilder.loadTexts: rptrAddrTrackTable.setStatus('mandatory') rptrAddrTrackEntry = MibTableRow((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1), ).setIndexNames((0, "LANART-AGENT", "rptrAddrTrackGroupIndex"), (0, "LANART-AGENT", "rptrAddrTrackPortIndex")) if mibBuilder.loadTexts: rptrAddrTrackEntry.setStatus('mandatory') rptrAddrTrackGroupIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrAddrTrackGroupIndex.setStatus('mandatory') rptrAddrTrackPortIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrAddrTrackPortIndex.setStatus('mandatory') rptrAddrTrackLastSourceAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrAddrTrackLastSourceAddress.setStatus('mandatory') rptrAddrTrackSourceAddrChanges = MibTableColumn((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rptrAddrTrackSourceAddrChanges.setStatus('mandatory') rptrHealth = NotificationType((1, 3, 6, 1, 2, 1, 22) + (0,1)).setObjects(("LANART-AGENT", "rptrOperStatus")) rptrGroupChange = NotificationType((1, 3, 6, 1, 2, 1, 22) + (0,2)).setObjects(("LANART-AGENT", "rptrGroupIndex")) rptrResetEvent = NotificationType((1, 3, 6, 1, 2, 1, 22) + (0,3)).setObjects(("LANART-AGENT", "rptrOperStatus")) lanart = MibIdentifier((1, 3, 6, 1, 4, 1, 712)) laMib1 = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1)) laProducts = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1)) laHubMib = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 2)) laSys = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 2, 1)) laTpPort = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 2, 2)) laTpHub = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1)) laTpHub1 = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1)) etm120x = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1, 12)) etm160x = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1, 16)) etm240x = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1, 24)) laTpHub2 = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2)) ete120x = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2, 12)) ete160x = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2, 16)) ete240x = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2, 24)) laTpHub3 = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3)) bbAui = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 0)) bbAuiTp = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 1)) bbAuiBnc = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 2)) bbAuiTpBnc = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 3)) bbAui10BASE_FL = MibIdentifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 4)).setLabel("bbAui10BASE-FL") laSysConfig = MibScalar((1, 3, 6, 1, 4, 1, 712, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("save", 1), ("load", 2), ("factory", 3), ("ok", 4), ("failed", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: laSysConfig.setStatus('mandatory') laJoystick = MibScalar((1, 3, 6, 1, 4, 1, 712, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: laJoystick.setStatus('mandatory') laLinkAlert = MibScalar((1, 3, 6, 1, 4, 1, 712, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("not-applicable", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: laLinkAlert.setStatus('mandatory') laTpPortTable = MibTable((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1), ) if mibBuilder.loadTexts: laTpPortTable.setStatus('mandatory') laTpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1), ).setIndexNames((0, "LANART-AGENT", "laTpPortGroupIndex"), (0, "LANART-AGENT", "laTpPortIndex")) if mibBuilder.loadTexts: laTpPortEntry.setStatus('mandatory') laTpPortGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: laTpPortGroupIndex.setStatus('mandatory') laTpPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1024))).setMaxAccess("readonly") if mibBuilder.loadTexts: laTpPortIndex.setStatus('mandatory') laTpLinkTest = MibTableColumn((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("failed", 3), ("not-applicable", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: laTpLinkTest.setStatus('mandatory') laTpAutoPolarity = MibTableColumn((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("corrected", 3), ("not-applicable", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: laTpAutoPolarity.setStatus('mandatory') mibBuilder.exportSymbols("LANART-AGENT", rptrRptrInfo=rptrRptrInfo, ifOutOctets=ifOutOctets, ipRouteMask=ipRouteMask, ipFragOKs=ipFragOKs, mib_2=mib_2, atPhysAddress=atPhysAddress, atNetAddress=atNetAddress, snmpOutGenErrs=snmpOutGenErrs, ipInDelivers=ipInDelivers, ifOutErrors=ifOutErrors, icmpOutAddrMasks=icmpOutAddrMasks, snmpInGenErrs=snmpInGenErrs, mgmt=mgmt, internet=internet, ipInDiscards=ipInDiscards, rptrPortInfo=rptrPortInfo, rptrGroupOperStatus=rptrGroupOperStatus, rptrMonitorPortTotalErrors=rptrMonitorPortTotalErrors, ccitt=ccitt, ifMtu=ifMtu, rptrMonitorPortTable=rptrMonitorPortTable, icmpOutRedirects=icmpOutRedirects, rptrMonitorPortDataRateMismatches=rptrMonitorPortDataRateMismatches, rptrMonitorGroupIndex=rptrMonitorGroupIndex, ipReasmReqds=ipReasmReqds, tcpConnTable=tcpConnTable, dot1dBridge=dot1dBridge, ip=ip, icmpInAddrMaskReps=icmpInAddrMaskReps, snmpInTotalSetVars=snmpInTotalSetVars, snmpEnableAuthenTraps=snmpEnableAuthenTraps, rptrMonitorGroupTotalOctets=rptrMonitorGroupTotalOctets, etm120x=etm120x, snmpInTraps=snmpInTraps, egp=egp, rptrPortOperStatus=rptrPortOperStatus, rptrAddrTrackRptrInfo=rptrAddrTrackRptrInfo, bbAuiTp=bbAuiTp, icmpOutMsgs=icmpOutMsgs, ipReasmOKs=ipReasmOKs, transmission=transmission, ifType=ifType, tcpConnRemAddress=tcpConnRemAddress, icmpOutErrors=icmpOutErrors, ipFragFails=ipFragFails, atTable=atTable, snmpInGetRequests=snmpInGetRequests, icmpOutDestUnreachs=icmpOutDestUnreachs, tcpRtoMin=tcpRtoMin, rptrPortGroupIndex=rptrPortGroupIndex, rptrMonitorPortReadableFrames=rptrMonitorPortReadableFrames, udpEntry=udpEntry, sysObjectID=sysObjectID, ifOperStatus=ifOperStatus, ipRouteAge=ipRouteAge, laProducts=laProducts, rptrMonitorRptrInfo=rptrMonitorRptrInfo, null=null, snmpInSetRequests=snmpInSetRequests, ifTable=ifTable, ipInReceives=ipInReceives, snmpInTooBigs=snmpInTooBigs, ipRouteMetric1=ipRouteMetric1, laMib1=laMib1, atEntry=atEntry, dot1dStp=dot1dStp, rptrGroupObjectID=rptrGroupObjectID, ipInHdrErrors=ipInHdrErrors, ifInOctets=ifInOctets, snmpOutPkts=snmpOutPkts, ipRouteMetric2=ipRouteMetric2, ipNetToMediaType=ipNetToMediaType, laTpHub1=laTpHub1, icmp=icmp, ipForwarding=ipForwarding, rptrGroupIndex=rptrGroupIndex, sysLocation=sysLocation, rptrMonitorGroupTotalFrames=rptrMonitorGroupTotalFrames, rptrMonitorPortVeryLongEvents=rptrMonitorPortVeryLongEvents, snmpInGetResponses=snmpInGetResponses, ete240x=ete240x, laTpPort=laTpPort, icmpOutAddrMaskReps=icmpOutAddrMaskReps, rptrMonitorPortReadableOctets=rptrMonitorPortReadableOctets, icmpInParmProbs=icmpInParmProbs, MacAddress=MacAddress, ifDescr=ifDescr, ipRouteIfIndex=ipRouteIfIndex, ipRoutingDiscards=ipRoutingDiscards, tcpAttemptFails=tcpAttemptFails, snmpOutGetResponses=snmpOutGetResponses, snmpInBadCommunityUses=snmpInBadCommunityUses, rptrMonitorPortLateEvents=rptrMonitorPortLateEvents, dot1dStatic=dot1dStatic, udpNoPorts=udpNoPorts, snmpInBadVersions=snmpInBadVersions, rptrMonitorPortFCSErrors=rptrMonitorPortFCSErrors, laTpPortGroupIndex=laTpPortGroupIndex, snmpInBadValues=snmpInBadValues, tcp=tcp, experimental=experimental, ifOutNUcastPkts=ifOutNUcastPkts, ifInDiscards=ifInDiscards, snmpOutGetNexts=snmpOutGetNexts, rptrAddrTrackGroupInfo=rptrAddrTrackGroupInfo, rptrResetEvent=rptrResetEvent, ifOutUcastPkts=ifOutUcastPkts, snmpOutTraps=snmpOutTraps, dot1dTp=dot1dTp, rptrAddrTrackPortInfo=rptrAddrTrackPortInfo, icmpInTimestamps=icmpInTimestamps, laTpHub3=laTpHub3, rptrMonitorPortIndex=rptrMonitorPortIndex, tcpRtoMax=tcpRtoMax, tcpConnLocalPort=tcpConnLocalPort, rptrOperStatus=rptrOperStatus, ipNetToMediaEntry=ipNetToMediaEntry, snmpOutSetRequests=snmpOutSetRequests, dot1dSr=dot1dSr, rptrPortTable=rptrPortTable, snmp=snmp, laTpAutoPolarity=laTpAutoPolarity, ipOutDiscards=ipOutDiscards, icmpOutTimestampReps=icmpOutTimestampReps, ipForwDatagrams=ipForwDatagrams, rptrHealthText=rptrHealthText, system=system, tcpInSegs=tcpInSegs, etm240x=etm240x, interfaces=interfaces, ipAdEntBcastAddr=ipAdEntBcastAddr, icmpOutSrcQuenchs=icmpOutSrcQuenchs, BridgeId=BridgeId, ipRouteDest=ipRouteDest, rptrMonitorGroupTotalErrors=rptrMonitorGroupTotalErrors, rptrPortAutoPartitionState=rptrPortAutoPartitionState, tcpCurrEstab=tcpCurrEstab, snmpInBadCommunityNames=snmpInBadCommunityNames, ipRouteMetric3=ipRouteMetric3, rptrGroupChange=rptrGroupChange, rptrNonDisruptTest=rptrNonDisruptTest, sysServices=sysServices, snmpInPkts=snmpInPkts, udpLocalAddress=udpLocalAddress, rptrGroupPortCapacity=rptrGroupPortCapacity, laJoystick=laJoystick, bbAuiBnc=bbAuiBnc, rptrAddrTrackPortIndex=rptrAddrTrackPortIndex, ifEntry=ifEntry, ipNetToMediaPhysAddress=ipNetToMediaPhysAddress, laSysConfig=laSysConfig, enterprises=enterprises, ipReasmFails=ipReasmFails, snmpOutTooBigs=snmpOutTooBigs, rptrMonitorPortAlignmentErrors=rptrMonitorPortAlignmentErrors, rptrGroupLastOperStatusChange=rptrGroupLastOperStatusChange, laLinkAlert=laLinkAlert, icmpInErrors=icmpInErrors, udpInErrors=udpInErrors, rptrMonitorGroupTable=rptrMonitorGroupTable, ipRouteInfo=ipRouteInfo, rptrMonitorPackage=rptrMonitorPackage, icmpOutTimeExcds=icmpOutTimeExcds, ipInUnknownProtos=ipInUnknownProtos, rptrMonitorPortShortEvents=rptrMonitorPortShortEvents, dot1dBase=dot1dBase, tcpRetransSegs=tcpRetransSegs, udpOutDatagrams=udpOutDatagrams, org=org, rptrMonitorPortEntry=rptrMonitorPortEntry, rptrGroupDescr=rptrGroupDescr, private=private, rptrMonitorPortAutoPartitions=rptrMonitorPortAutoPartitions, rptrGroupInfo=rptrGroupInfo, ifAdminStatus=ifAdminStatus, ipNetToMediaTable=ipNetToMediaTable, rptrAddrTrackSourceAddrChanges=rptrAddrTrackSourceAddrChanges, rptrMonitorPortRunts=rptrMonitorPortRunts, ipAdEntNetMask=ipAdEntNetMask, tcpOutSegs=tcpOutSegs, rptrTotalPartitionedPorts=rptrTotalPartitionedPorts, ifSpeed=ifSpeed, sysName=sysName, ipOutRequests=ipOutRequests, ifInNUcastPkts=ifInNUcastPkts, laTpPortEntry=laTpPortEntry, ipRouteEntry=ipRouteEntry, at=at, rptrPortIndex=rptrPortIndex, ifIndex=ifIndex, etm160x=etm160x, tcpMaxConn=tcpMaxConn, icmpInDestUnreachs=icmpInDestUnreachs, rptrAddrTrackEntry=rptrAddrTrackEntry, udpLocalPort=udpLocalPort, icmpOutTimestamps=icmpOutTimestamps, tcpConnRemPort=tcpConnRemPort, snmpInNoSuchNames=snmpInNoSuchNames, tcpConnEntry=tcpConnEntry, ifInErrors=ifInErrors, snmpInGetNexts=snmpInGetNexts, newRoot=newRoot, rptrGroupCapacity=rptrGroupCapacity, rptrMonitorGroupEntry=rptrMonitorGroupEntry, rptrMonitorPortFrameTooLongs=rptrMonitorPortFrameTooLongs, ete120x=ete120x, laTpPortTable=laTpPortTable, rptrGroupTable=rptrGroupTable, ifOutQLen=ifOutQLen, rptrMonitorPortGroupIndex=rptrMonitorPortGroupIndex, sysContact=sysContact, icmpInAddrMasks=icmpInAddrMasks, ifInUnknownProtos=ifInUnknownProtos, ifLastChange=ifLastChange, DisplayString=DisplayString, ipAddrTable=ipAddrTable, snmpInASNParseErrs=snmpInASNParseErrs, rptrAddrTrackTable=rptrAddrTrackTable, udp=udp, ipInAddrErrors=ipInAddrErrors, icmpInEchos=icmpInEchos, tcpEstabResets=tcpEstabResets, tcpActiveOpens=tcpActiveOpens, icmpInEchoReps=icmpInEchoReps, laTpHub2=laTpHub2, tcpConnState=tcpConnState, Timeout=Timeout, topologyChange=topologyChange, laTpHub=laTpHub, icmpInTimestampReps=icmpInTimestampReps, ifNumber=ifNumber, ipNetToMediaIfIndex=ipNetToMediaIfIndex, icmpOutEchos=icmpOutEchos, ipAdEntIfIndex=ipAdEntIfIndex, tcpInErrs=tcpInErrs, icmpInTimeExcds=icmpInTimeExcds, laTpPortIndex=laTpPortIndex, rptrBasicPackage=rptrBasicPackage, iso=iso, atIfIndex=atIfIndex, sysUpTime=sysUpTime, icmpInMsgs=icmpInMsgs, udpTable=udpTable, snmpInTotalReqVars=snmpInTotalReqVars, snmpOutGetRequests=snmpOutGetRequests, rptrGroupEntry=rptrGroupEntry, laHubMib=laHubMib, ete160x=ete160x, ipAdEntAddr=ipAdEntAddr, sysDescr=sysDescr, ipRouteNextHop=ipRouteNextHop, ipRouteTable=ipRouteTable, directory=directory, ipReasmTimeout=ipReasmTimeout) mibBuilder.exportSymbols("LANART-AGENT", rptrAddrTrackPackage=rptrAddrTrackPackage, ifSpecific=ifSpecific, rptrAddrTrackLastSourceAddress=rptrAddrTrackLastSourceAddress, rptrAddrTrackGroupIndex=rptrAddrTrackGroupIndex, ifOutDiscards=ifOutDiscards, ifInUcastPkts=ifInUcastPkts, snmpInReadOnlys=snmpInReadOnlys, dod=dod, rptrMonitorTransmitCollisions=rptrMonitorTransmitCollisions, ipRouteType=ipRouteType, rptrReset=rptrReset, rptrPortEntry=rptrPortEntry, ipAddrEntry=ipAddrEntry, PhysAddress=PhysAddress, ipRouteProto=ipRouteProto, rptrMonitorPortInfo=rptrMonitorPortInfo, ipAdEntReasmMaxSize=ipAdEntReasmMaxSize, tcpPassiveOpens=tcpPassiveOpens, icmpInRedirects=icmpInRedirects, tcpConnLocalAddress=tcpConnLocalAddress, udpInDatagrams=udpInDatagrams, bbAuiTpBnc=bbAuiTpBnc, rptrPortAdminStatus=rptrPortAdminStatus, rptrMonitorPortCollisions=rptrMonitorPortCollisions, laTpLinkTest=laTpLinkTest, icmpOutParmProbs=icmpOutParmProbs, snmpOutNoSuchNames=snmpOutNoSuchNames, rptrHealth=rptrHealth, ipRouteMetric5=ipRouteMetric5, ipFragCreates=ipFragCreates, ipRouteMetric4=ipRouteMetric4, laSys=laSys, icmpOutEchoReps=icmpOutEchoReps, lanart=lanart, tcpOutRsts=tcpOutRsts, tcpRtoAlgorithm=tcpRtoAlgorithm, snmpDot3RptrMgt=snmpDot3RptrMgt, ipNetToMediaNetAddress=ipNetToMediaNetAddress, ipOutNoRoutes=ipOutNoRoutes, rptrMonitorGroupInfo=rptrMonitorGroupInfo, icmpInSrcQuenchs=icmpInSrcQuenchs, ipDefaultTTL=ipDefaultTTL, snmpOutBadValues=snmpOutBadValues, bbAui10BASE_FL=bbAui10BASE_FL, ifPhysAddress=ifPhysAddress, bbAui=bbAui)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_intersection, constraints_union, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (bits, object_identity, time_ticks, integer32, module_identity, notification_type, counter64, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, unsigned32, counter32, mib_identifier, iso, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'ObjectIdentity', 'TimeTicks', 'Integer32', 'ModuleIdentity', 'NotificationType', 'Counter64', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Unsigned32', 'Counter32', 'MibIdentifier', 'iso', 'Gauge32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') ccitt = mib_identifier((0,)) null = mib_identifier((0, 0)) iso = mib_identifier((1,)) org = mib_identifier((1, 3)) dod = mib_identifier((1, 3, 6)) internet = mib_identifier((1, 3, 6, 1)) directory = mib_identifier((1, 3, 6, 1, 1)) mgmt = mib_identifier((1, 3, 6, 1, 2)) experimental = mib_identifier((1, 3, 6, 1, 3)) private = mib_identifier((1, 3, 6, 1, 4)) enterprises = mib_identifier((1, 3, 6, 1, 4, 1)) mib_2 = mib_identifier((1, 3, 6, 1, 2, 1)).setLabel('mib-2') class Displaystring(OctetString): pass class Physaddress(OctetString): pass system = mib_identifier((1, 3, 6, 1, 2, 1, 1)) interfaces = mib_identifier((1, 3, 6, 1, 2, 1, 2)) at = mib_identifier((1, 3, 6, 1, 2, 1, 3)) ip = mib_identifier((1, 3, 6, 1, 2, 1, 4)) icmp = mib_identifier((1, 3, 6, 1, 2, 1, 5)) tcp = mib_identifier((1, 3, 6, 1, 2, 1, 6)) udp = mib_identifier((1, 3, 6, 1, 2, 1, 7)) egp = mib_identifier((1, 3, 6, 1, 2, 1, 8)) transmission = mib_identifier((1, 3, 6, 1, 2, 1, 10)) snmp = mib_identifier((1, 3, 6, 1, 2, 1, 11)) sys_descr = mib_scalar((1, 3, 6, 1, 2, 1, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: sysDescr.setStatus('mandatory') sys_object_id = mib_scalar((1, 3, 6, 1, 2, 1, 1, 2), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysObjectID.setStatus('mandatory') sys_up_time = mib_scalar((1, 3, 6, 1, 2, 1, 1, 3), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysUpTime.setStatus('mandatory') sys_contact = mib_scalar((1, 3, 6, 1, 2, 1, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sysContact.setStatus('mandatory') sys_name = mib_scalar((1, 3, 6, 1, 2, 1, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sysName.setStatus('mandatory') sys_location = mib_scalar((1, 3, 6, 1, 2, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: sysLocation.setStatus('mandatory') sys_services = mib_scalar((1, 3, 6, 1, 2, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readonly') if mibBuilder.loadTexts: sysServices.setStatus('mandatory') if_number = mib_scalar((1, 3, 6, 1, 2, 1, 2, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifNumber.setStatus('mandatory') if_table = mib_table((1, 3, 6, 1, 2, 1, 2, 2)) if mibBuilder.loadTexts: ifTable.setStatus('mandatory') if_entry = mib_table_row((1, 3, 6, 1, 2, 1, 2, 2, 1)).setIndexNames((0, 'LANART-AGENT', 'ifIndex')) if mibBuilder.loadTexts: ifEntry.setStatus('mandatory') if_index = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifIndex.setStatus('mandatory') if_descr = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: ifDescr.setStatus('mandatory') if_type = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(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))).clone(namedValues=named_values(('other', 1), ('regular1822', 2), ('hdh1822', 3), ('ddn-x25', 4), ('rfc877-x25', 5), ('ethernet-csmacd', 6), ('iso88023-csmacd', 7), ('iso88024-tokenBus', 8), ('iso88025-tokenRing', 9), ('iso88026-man', 10), ('starLan', 11), ('proteon-10Mbit', 12), ('proteon-80Mbit', 13), ('hyperchannel', 14), ('fddi', 15), ('lapb', 16), ('sdlc', 17), ('ds1', 18), ('e1', 19), ('basicISDN', 20), ('primaryISDN', 21), ('propPointToPointSerial', 22), ('ppp', 23), ('softwareLoopback', 24), ('eon', 25), ('ethernet-3Mbit', 26), ('nsip', 27), ('slip', 28), ('ultra', 29), ('ds3', 30), ('sip', 31), ('frame-relay', 32)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ifType.setStatus('mandatory') if_mtu = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifMtu.setStatus('mandatory') if_speed = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 5), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifSpeed.setStatus('mandatory') if_phys_address = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 6), phys_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifPhysAddress.setStatus('mandatory') if_admin_status = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ifAdminStatus.setStatus('mandatory') if_oper_status = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('up', 1), ('down', 2), ('testing', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOperStatus.setStatus('mandatory') if_last_change = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 9), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifLastChange.setStatus('mandatory') if_in_octets = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifInOctets.setStatus('mandatory') if_in_ucast_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifInUcastPkts.setStatus('mandatory') if_in_n_ucast_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifInNUcastPkts.setStatus('mandatory') if_in_discards = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifInDiscards.setStatus('mandatory') if_in_errors = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifInErrors.setStatus('mandatory') if_in_unknown_protos = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifInUnknownProtos.setStatus('mandatory') if_out_octets = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOutOctets.setStatus('mandatory') if_out_ucast_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOutUcastPkts.setStatus('mandatory') if_out_n_ucast_pkts = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOutNUcastPkts.setStatus('mandatory') if_out_discards = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOutDiscards.setStatus('mandatory') if_out_errors = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOutErrors.setStatus('mandatory') if_out_q_len = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 21), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifOutQLen.setStatus('mandatory') if_specific = mib_table_column((1, 3, 6, 1, 2, 1, 2, 2, 1, 22), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: ifSpecific.setStatus('mandatory') at_table = mib_table((1, 3, 6, 1, 2, 1, 3, 1)) if mibBuilder.loadTexts: atTable.setStatus('deprecated') at_entry = mib_table_row((1, 3, 6, 1, 2, 1, 3, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'atIfIndex'), (0, 'LANART-AGENT', 'atNetAddress')) if mibBuilder.loadTexts: atEntry.setStatus('deprecated') at_if_index = mib_table_column((1, 3, 6, 1, 2, 1, 3, 1, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: atIfIndex.setStatus('deprecated') at_phys_address = mib_table_column((1, 3, 6, 1, 2, 1, 3, 1, 1, 2), phys_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: atPhysAddress.setStatus('deprecated') at_net_address = mib_table_column((1, 3, 6, 1, 2, 1, 3, 1, 1, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: atNetAddress.setStatus('deprecated') ip_forwarding = mib_scalar((1, 3, 6, 1, 2, 1, 4, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('forwarding', 1), ('not-forwarding', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipForwarding.setStatus('mandatory') ip_default_ttl = mib_scalar((1, 3, 6, 1, 2, 1, 4, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipDefaultTTL.setStatus('mandatory') ip_in_receives = mib_scalar((1, 3, 6, 1, 2, 1, 4, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipInReceives.setStatus('mandatory') ip_in_hdr_errors = mib_scalar((1, 3, 6, 1, 2, 1, 4, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipInHdrErrors.setStatus('mandatory') ip_in_addr_errors = mib_scalar((1, 3, 6, 1, 2, 1, 4, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipInAddrErrors.setStatus('mandatory') ip_forw_datagrams = mib_scalar((1, 3, 6, 1, 2, 1, 4, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipForwDatagrams.setStatus('mandatory') ip_in_unknown_protos = mib_scalar((1, 3, 6, 1, 2, 1, 4, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipInUnknownProtos.setStatus('mandatory') ip_in_discards = mib_scalar((1, 3, 6, 1, 2, 1, 4, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipInDiscards.setStatus('mandatory') ip_in_delivers = mib_scalar((1, 3, 6, 1, 2, 1, 4, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipInDelivers.setStatus('mandatory') ip_out_requests = mib_scalar((1, 3, 6, 1, 2, 1, 4, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipOutRequests.setStatus('mandatory') ip_out_discards = mib_scalar((1, 3, 6, 1, 2, 1, 4, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipOutDiscards.setStatus('mandatory') ip_out_no_routes = mib_scalar((1, 3, 6, 1, 2, 1, 4, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipOutNoRoutes.setStatus('mandatory') ip_reasm_timeout = mib_scalar((1, 3, 6, 1, 2, 1, 4, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipReasmTimeout.setStatus('mandatory') ip_reasm_reqds = mib_scalar((1, 3, 6, 1, 2, 1, 4, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipReasmReqds.setStatus('mandatory') ip_reasm_o_ks = mib_scalar((1, 3, 6, 1, 2, 1, 4, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipReasmOKs.setStatus('mandatory') ip_reasm_fails = mib_scalar((1, 3, 6, 1, 2, 1, 4, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipReasmFails.setStatus('mandatory') ip_frag_o_ks = mib_scalar((1, 3, 6, 1, 2, 1, 4, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipFragOKs.setStatus('mandatory') ip_frag_fails = mib_scalar((1, 3, 6, 1, 2, 1, 4, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipFragFails.setStatus('mandatory') ip_frag_creates = mib_scalar((1, 3, 6, 1, 2, 1, 4, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipFragCreates.setStatus('mandatory') ip_addr_table = mib_table((1, 3, 6, 1, 2, 1, 4, 20)) if mibBuilder.loadTexts: ipAddrTable.setStatus('mandatory') ip_addr_entry = mib_table_row((1, 3, 6, 1, 2, 1, 4, 20, 1)).setIndexNames((0, 'LANART-AGENT', 'ipAdEntAddr')) if mibBuilder.loadTexts: ipAddrEntry.setStatus('mandatory') ip_ad_ent_addr = mib_table_column((1, 3, 6, 1, 2, 1, 4, 20, 1, 1), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipAdEntAddr.setStatus('mandatory') ip_ad_ent_if_index = mib_table_column((1, 3, 6, 1, 2, 1, 4, 20, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipAdEntIfIndex.setStatus('mandatory') ip_ad_ent_net_mask = mib_table_column((1, 3, 6, 1, 2, 1, 4, 20, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipAdEntNetMask.setStatus('mandatory') ip_ad_ent_bcast_addr = mib_table_column((1, 3, 6, 1, 2, 1, 4, 20, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipAdEntBcastAddr.setStatus('mandatory') ip_ad_ent_reasm_max_size = mib_table_column((1, 3, 6, 1, 2, 1, 4, 20, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: ipAdEntReasmMaxSize.setStatus('mandatory') ip_route_table = mib_table((1, 3, 6, 1, 2, 1, 4, 21)) if mibBuilder.loadTexts: ipRouteTable.setStatus('mandatory') ip_route_entry = mib_table_row((1, 3, 6, 1, 2, 1, 4, 21, 1)).setIndexNames((0, 'LANART-AGENT', 'ipRouteDest')) if mibBuilder.loadTexts: ipRouteEntry.setStatus('mandatory') ip_route_dest = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 1), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteDest.setStatus('mandatory') ip_route_if_index = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteIfIndex.setStatus('mandatory') ip_route_metric1 = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 3), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteMetric1.setStatus('mandatory') ip_route_metric2 = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteMetric2.setStatus('mandatory') ip_route_metric3 = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 5), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteMetric3.setStatus('mandatory') ip_route_metric4 = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteMetric4.setStatus('mandatory') ip_route_next_hop = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 7), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteNextHop.setStatus('mandatory') ip_route_type = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('invalid', 2), ('direct', 3), ('indirect', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteType.setStatus('mandatory') ip_route_proto = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))).clone(namedValues=named_values(('other', 1), ('local', 2), ('netmgmt', 3), ('icmp', 4), ('egp', 5), ('ggp', 6), ('hello', 7), ('rip', 8), ('is-is', 9), ('es-is', 10), ('ciscoIgrp', 11), ('bbnSpfIgp', 12), ('ospf', 13), ('bgp', 14)))).setMaxAccess('readonly') if mibBuilder.loadTexts: ipRouteProto.setStatus('mandatory') ip_route_age = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 10), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteAge.setStatus('mandatory') ip_route_mask = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 11), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteMask.setStatus('mandatory') ip_route_metric5 = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 12), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipRouteMetric5.setStatus('mandatory') ip_route_info = mib_table_column((1, 3, 6, 1, 2, 1, 4, 21, 1, 13), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipRouteInfo.setStatus('mandatory') ip_net_to_media_table = mib_table((1, 3, 6, 1, 2, 1, 4, 22)) if mibBuilder.loadTexts: ipNetToMediaTable.setStatus('mandatory') ip_net_to_media_entry = mib_table_row((1, 3, 6, 1, 2, 1, 4, 22, 1)).setIndexNames((0, 'LANART-AGENT', 'ipNetToMediaIfIndex'), (0, 'LANART-AGENT', 'ipNetToMediaNetAddress')) if mibBuilder.loadTexts: ipNetToMediaEntry.setStatus('mandatory') ip_net_to_media_if_index = mib_table_column((1, 3, 6, 1, 2, 1, 4, 22, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipNetToMediaIfIndex.setStatus('mandatory') ip_net_to_media_phys_address = mib_table_column((1, 3, 6, 1, 2, 1, 4, 22, 1, 2), phys_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipNetToMediaPhysAddress.setStatus('mandatory') ip_net_to_media_net_address = mib_table_column((1, 3, 6, 1, 2, 1, 4, 22, 1, 3), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipNetToMediaNetAddress.setStatus('mandatory') ip_net_to_media_type = mib_table_column((1, 3, 6, 1, 2, 1, 4, 22, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('invalid', 2), ('dynamic', 3), ('static', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: ipNetToMediaType.setStatus('mandatory') ip_routing_discards = mib_scalar((1, 3, 6, 1, 2, 1, 4, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ipRoutingDiscards.setStatus('mandatory') icmp_in_msgs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInMsgs.setStatus('mandatory') icmp_in_errors = mib_scalar((1, 3, 6, 1, 2, 1, 5, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInErrors.setStatus('mandatory') icmp_in_dest_unreachs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInDestUnreachs.setStatus('mandatory') icmp_in_time_excds = mib_scalar((1, 3, 6, 1, 2, 1, 5, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInTimeExcds.setStatus('mandatory') icmp_in_parm_probs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInParmProbs.setStatus('mandatory') icmp_in_src_quenchs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInSrcQuenchs.setStatus('mandatory') icmp_in_redirects = mib_scalar((1, 3, 6, 1, 2, 1, 5, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInRedirects.setStatus('mandatory') icmp_in_echos = mib_scalar((1, 3, 6, 1, 2, 1, 5, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInEchos.setStatus('mandatory') icmp_in_echo_reps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInEchoReps.setStatus('mandatory') icmp_in_timestamps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInTimestamps.setStatus('mandatory') icmp_in_timestamp_reps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInTimestampReps.setStatus('mandatory') icmp_in_addr_masks = mib_scalar((1, 3, 6, 1, 2, 1, 5, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInAddrMasks.setStatus('mandatory') icmp_in_addr_mask_reps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpInAddrMaskReps.setStatus('mandatory') icmp_out_msgs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutMsgs.setStatus('mandatory') icmp_out_errors = mib_scalar((1, 3, 6, 1, 2, 1, 5, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutErrors.setStatus('mandatory') icmp_out_dest_unreachs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutDestUnreachs.setStatus('mandatory') icmp_out_time_excds = mib_scalar((1, 3, 6, 1, 2, 1, 5, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutTimeExcds.setStatus('mandatory') icmp_out_parm_probs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutParmProbs.setStatus('mandatory') icmp_out_src_quenchs = mib_scalar((1, 3, 6, 1, 2, 1, 5, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutSrcQuenchs.setStatus('mandatory') icmp_out_redirects = mib_scalar((1, 3, 6, 1, 2, 1, 5, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutRedirects.setStatus('mandatory') icmp_out_echos = mib_scalar((1, 3, 6, 1, 2, 1, 5, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutEchos.setStatus('mandatory') icmp_out_echo_reps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutEchoReps.setStatus('mandatory') icmp_out_timestamps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutTimestamps.setStatus('mandatory') icmp_out_timestamp_reps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutTimestampReps.setStatus('mandatory') icmp_out_addr_masks = mib_scalar((1, 3, 6, 1, 2, 1, 5, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutAddrMasks.setStatus('mandatory') icmp_out_addr_mask_reps = mib_scalar((1, 3, 6, 1, 2, 1, 5, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: icmpOutAddrMaskReps.setStatus('mandatory') tcp_rto_algorithm = mib_scalar((1, 3, 6, 1, 2, 1, 6, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('other', 1), ('constant', 2), ('rsre', 3), ('vanj', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpRtoAlgorithm.setStatus('mandatory') tcp_rto_min = mib_scalar((1, 3, 6, 1, 2, 1, 6, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpRtoMin.setStatus('mandatory') tcp_rto_max = mib_scalar((1, 3, 6, 1, 2, 1, 6, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpRtoMax.setStatus('mandatory') tcp_max_conn = mib_scalar((1, 3, 6, 1, 2, 1, 6, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpMaxConn.setStatus('mandatory') tcp_active_opens = mib_scalar((1, 3, 6, 1, 2, 1, 6, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpActiveOpens.setStatus('mandatory') tcp_passive_opens = mib_scalar((1, 3, 6, 1, 2, 1, 6, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpPassiveOpens.setStatus('mandatory') tcp_attempt_fails = mib_scalar((1, 3, 6, 1, 2, 1, 6, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpAttemptFails.setStatus('mandatory') tcp_estab_resets = mib_scalar((1, 3, 6, 1, 2, 1, 6, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpEstabResets.setStatus('mandatory') tcp_curr_estab = mib_scalar((1, 3, 6, 1, 2, 1, 6, 9), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpCurrEstab.setStatus('mandatory') tcp_in_segs = mib_scalar((1, 3, 6, 1, 2, 1, 6, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpInSegs.setStatus('mandatory') tcp_out_segs = mib_scalar((1, 3, 6, 1, 2, 1, 6, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpOutSegs.setStatus('mandatory') tcp_retrans_segs = mib_scalar((1, 3, 6, 1, 2, 1, 6, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpRetransSegs.setStatus('mandatory') tcp_conn_table = mib_table((1, 3, 6, 1, 2, 1, 6, 13)) if mibBuilder.loadTexts: tcpConnTable.setStatus('mandatory') tcp_conn_entry = mib_table_row((1, 3, 6, 1, 2, 1, 6, 13, 1)).setIndexNames((0, 'LANART-AGENT', 'tcpConnLocalAddress'), (0, 'LANART-AGENT', 'tcpConnLocalPort'), (0, 'LANART-AGENT', 'tcpConnRemAddress'), (0, 'LANART-AGENT', 'tcpConnRemPort')) if mibBuilder.loadTexts: tcpConnEntry.setStatus('mandatory') tcp_conn_state = mib_table_column((1, 3, 6, 1, 2, 1, 6, 13, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))).clone(namedValues=named_values(('closed', 1), ('listen', 2), ('synSent', 3), ('synReceived', 4), ('established', 5), ('finWait1', 6), ('finWait2', 7), ('closeWait', 8), ('lastAck', 9), ('closing', 10), ('timeWait', 11), ('deleteTCB', 12)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: tcpConnState.setStatus('mandatory') tcp_conn_local_address = mib_table_column((1, 3, 6, 1, 2, 1, 6, 13, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpConnLocalAddress.setStatus('mandatory') tcp_conn_local_port = mib_table_column((1, 3, 6, 1, 2, 1, 6, 13, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpConnLocalPort.setStatus('mandatory') tcp_conn_rem_address = mib_table_column((1, 3, 6, 1, 2, 1, 6, 13, 1, 4), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpConnRemAddress.setStatus('mandatory') tcp_conn_rem_port = mib_table_column((1, 3, 6, 1, 2, 1, 6, 13, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpConnRemPort.setStatus('mandatory') tcp_in_errs = mib_scalar((1, 3, 6, 1, 2, 1, 6, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpInErrs.setStatus('mandatory') tcp_out_rsts = mib_scalar((1, 3, 6, 1, 2, 1, 6, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: tcpOutRsts.setStatus('mandatory') udp_in_datagrams = mib_scalar((1, 3, 6, 1, 2, 1, 7, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: udpInDatagrams.setStatus('mandatory') udp_no_ports = mib_scalar((1, 3, 6, 1, 2, 1, 7, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: udpNoPorts.setStatus('mandatory') udp_in_errors = mib_scalar((1, 3, 6, 1, 2, 1, 7, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: udpInErrors.setStatus('mandatory') udp_out_datagrams = mib_scalar((1, 3, 6, 1, 2, 1, 7, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: udpOutDatagrams.setStatus('mandatory') udp_table = mib_table((1, 3, 6, 1, 2, 1, 7, 5)) if mibBuilder.loadTexts: udpTable.setStatus('mandatory') udp_entry = mib_table_row((1, 3, 6, 1, 2, 1, 7, 5, 1)).setIndexNames((0, 'LANART-AGENT', 'udpLocalAddress'), (0, 'LANART-AGENT', 'udpLocalPort')) if mibBuilder.loadTexts: udpEntry.setStatus('mandatory') udp_local_address = mib_table_column((1, 3, 6, 1, 2, 1, 7, 5, 1, 1), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: udpLocalAddress.setStatus('mandatory') udp_local_port = mib_table_column((1, 3, 6, 1, 2, 1, 7, 5, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: udpLocalPort.setStatus('mandatory') snmp_in_pkts = mib_scalar((1, 3, 6, 1, 2, 1, 11, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInPkts.setStatus('mandatory') snmp_out_pkts = mib_scalar((1, 3, 6, 1, 2, 1, 11, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutPkts.setStatus('mandatory') snmp_in_bad_versions = mib_scalar((1, 3, 6, 1, 2, 1, 11, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInBadVersions.setStatus('mandatory') snmp_in_bad_community_names = mib_scalar((1, 3, 6, 1, 2, 1, 11, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInBadCommunityNames.setStatus('mandatory') snmp_in_bad_community_uses = mib_scalar((1, 3, 6, 1, 2, 1, 11, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInBadCommunityUses.setStatus('mandatory') snmp_in_asn_parse_errs = mib_scalar((1, 3, 6, 1, 2, 1, 11, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInASNParseErrs.setStatus('mandatory') snmp_in_too_bigs = mib_scalar((1, 3, 6, 1, 2, 1, 11, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInTooBigs.setStatus('mandatory') snmp_in_no_such_names = mib_scalar((1, 3, 6, 1, 2, 1, 11, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInNoSuchNames.setStatus('mandatory') snmp_in_bad_values = mib_scalar((1, 3, 6, 1, 2, 1, 11, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInBadValues.setStatus('mandatory') snmp_in_read_onlys = mib_scalar((1, 3, 6, 1, 2, 1, 11, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInReadOnlys.setStatus('mandatory') snmp_in_gen_errs = mib_scalar((1, 3, 6, 1, 2, 1, 11, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInGenErrs.setStatus('mandatory') snmp_in_total_req_vars = mib_scalar((1, 3, 6, 1, 2, 1, 11, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInTotalReqVars.setStatus('mandatory') snmp_in_total_set_vars = mib_scalar((1, 3, 6, 1, 2, 1, 11, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInTotalSetVars.setStatus('mandatory') snmp_in_get_requests = mib_scalar((1, 3, 6, 1, 2, 1, 11, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInGetRequests.setStatus('mandatory') snmp_in_get_nexts = mib_scalar((1, 3, 6, 1, 2, 1, 11, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInGetNexts.setStatus('mandatory') snmp_in_set_requests = mib_scalar((1, 3, 6, 1, 2, 1, 11, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInSetRequests.setStatus('mandatory') snmp_in_get_responses = mib_scalar((1, 3, 6, 1, 2, 1, 11, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInGetResponses.setStatus('mandatory') snmp_in_traps = mib_scalar((1, 3, 6, 1, 2, 1, 11, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpInTraps.setStatus('mandatory') snmp_out_too_bigs = mib_scalar((1, 3, 6, 1, 2, 1, 11, 20), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutTooBigs.setStatus('mandatory') snmp_out_no_such_names = mib_scalar((1, 3, 6, 1, 2, 1, 11, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutNoSuchNames.setStatus('mandatory') snmp_out_bad_values = mib_scalar((1, 3, 6, 1, 2, 1, 11, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutBadValues.setStatus('mandatory') snmp_out_gen_errs = mib_scalar((1, 3, 6, 1, 2, 1, 11, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutGenErrs.setStatus('mandatory') snmp_out_get_requests = mib_scalar((1, 3, 6, 1, 2, 1, 11, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutGetRequests.setStatus('mandatory') snmp_out_get_nexts = mib_scalar((1, 3, 6, 1, 2, 1, 11, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutGetNexts.setStatus('mandatory') snmp_out_set_requests = mib_scalar((1, 3, 6, 1, 2, 1, 11, 27), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutSetRequests.setStatus('mandatory') snmp_out_get_responses = mib_scalar((1, 3, 6, 1, 2, 1, 11, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutGetResponses.setStatus('mandatory') snmp_out_traps = mib_scalar((1, 3, 6, 1, 2, 1, 11, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: snmpOutTraps.setStatus('mandatory') snmp_enable_authen_traps = mib_scalar((1, 3, 6, 1, 2, 1, 11, 30), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: snmpEnableAuthenTraps.setStatus('mandatory') class Macaddress(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(6, 6) fixed_length = 6 class Bridgeid(OctetString): subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8) fixed_length = 8 class Timeout(Integer32): pass dot1d_bridge = mib_identifier((1, 3, 6, 1, 2, 1, 17)) dot1d_base = mib_identifier((1, 3, 6, 1, 2, 1, 17, 1)) dot1d_stp = mib_identifier((1, 3, 6, 1, 2, 1, 17, 2)) dot1d_sr = mib_identifier((1, 3, 6, 1, 2, 1, 17, 3)) dot1d_tp = mib_identifier((1, 3, 6, 1, 2, 1, 17, 4)) dot1d_static = mib_identifier((1, 3, 6, 1, 2, 1, 17, 5)) new_root = notification_type((1, 3, 6, 1, 2, 1, 17) + (0, 1)) topology_change = notification_type((1, 3, 6, 1, 2, 1, 17) + (0, 2)) snmp_dot3_rptr_mgt = mib_identifier((1, 3, 6, 1, 2, 1, 22)) rptr_basic_package = mib_identifier((1, 3, 6, 1, 2, 1, 22, 1)) rptr_monitor_package = mib_identifier((1, 3, 6, 1, 2, 1, 22, 2)) rptr_addr_track_package = mib_identifier((1, 3, 6, 1, 2, 1, 22, 3)) rptr_rptr_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 1, 1)) rptr_group_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 1, 2)) rptr_port_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 1, 3)) rptr_monitor_rptr_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 2, 1)) rptr_monitor_group_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 2, 2)) rptr_monitor_port_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 2, 3)) rptr_addr_track_rptr_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 3, 1)) rptr_addr_track_group_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 3, 2)) rptr_addr_track_port_info = mib_identifier((1, 3, 6, 1, 2, 1, 22, 3, 3)) rptr_group_capacity = mib_scalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupCapacity.setStatus('mandatory') rptr_oper_status = mib_scalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('other', 1), ('ok', 2), ('rptrFailure', 3), ('groupFailure', 4), ('portFailure', 5), ('generalFailure', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrOperStatus.setStatus('mandatory') rptr_health_text = mib_scalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrHealthText.setStatus('mandatory') rptr_reset = mib_scalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('noReset', 1), ('reset', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rptrReset.setStatus('mandatory') rptr_non_disrupt_test = mib_scalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('noSelfTest', 1), ('selfTest', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rptrNonDisruptTest.setStatus('mandatory') rptr_total_partitioned_ports = mib_scalar((1, 3, 6, 1, 2, 1, 22, 1, 1, 6), gauge32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrTotalPartitionedPorts.setStatus('mandatory') rptr_group_table = mib_table((1, 3, 6, 1, 2, 1, 22, 1, 2, 1)) if mibBuilder.loadTexts: rptrGroupTable.setStatus('mandatory') rptr_group_entry = mib_table_row((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'rptrGroupIndex')) if mibBuilder.loadTexts: rptrGroupEntry.setStatus('mandatory') rptr_group_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupIndex.setStatus('mandatory') rptr_group_descr = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupDescr.setStatus('mandatory') rptr_group_object_id = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 3), object_identifier()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupObjectID.setStatus('mandatory') rptr_group_oper_status = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('other', 1), ('operational', 2), ('malfunctioning', 3), ('notPresent', 4), ('underTest', 5), ('resetInProgress', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupOperStatus.setStatus('mandatory') rptr_group_last_oper_status_change = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 5), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupLastOperStatusChange.setStatus('mandatory') rptr_group_port_capacity = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 2, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrGroupPortCapacity.setStatus('mandatory') rptr_port_table = mib_table((1, 3, 6, 1, 2, 1, 22, 1, 3, 1)) if mibBuilder.loadTexts: rptrPortTable.setStatus('mandatory') rptr_port_entry = mib_table_row((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'rptrPortGroupIndex'), (0, 'LANART-AGENT', 'rptrPortIndex')) if mibBuilder.loadTexts: rptrPortEntry.setStatus('mandatory') rptr_port_group_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrPortGroupIndex.setStatus('mandatory') rptr_port_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrPortIndex.setStatus('mandatory') rptr_port_admin_status = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rptrPortAdminStatus.setStatus('mandatory') rptr_port_auto_partition_state = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('notAutoPartitioned', 1), ('autoPartitioned', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrPortAutoPartitionState.setStatus('mandatory') rptr_port_oper_status = mib_table_column((1, 3, 6, 1, 2, 1, 22, 1, 3, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('operational', 1), ('notOperational', 2), ('notPresent', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrPortOperStatus.setStatus('mandatory') rptr_monitor_transmit_collisions = mib_scalar((1, 3, 6, 1, 2, 1, 22, 2, 1, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorTransmitCollisions.setStatus('mandatory') rptr_monitor_group_table = mib_table((1, 3, 6, 1, 2, 1, 22, 2, 2, 1)) if mibBuilder.loadTexts: rptrMonitorGroupTable.setStatus('mandatory') rptr_monitor_group_entry = mib_table_row((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'rptrMonitorGroupIndex')) if mibBuilder.loadTexts: rptrMonitorGroupEntry.setStatus('mandatory') rptr_monitor_group_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorGroupIndex.setStatus('mandatory') rptr_monitor_group_total_frames = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorGroupTotalFrames.setStatus('mandatory') rptr_monitor_group_total_octets = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorGroupTotalOctets.setStatus('mandatory') rptr_monitor_group_total_errors = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 2, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorGroupTotalErrors.setStatus('mandatory') rptr_monitor_port_table = mib_table((1, 3, 6, 1, 2, 1, 22, 2, 3, 1)) if mibBuilder.loadTexts: rptrMonitorPortTable.setStatus('mandatory') rptr_monitor_port_entry = mib_table_row((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'rptrMonitorPortGroupIndex'), (0, 'LANART-AGENT', 'rptrMonitorPortIndex')) if mibBuilder.loadTexts: rptrMonitorPortEntry.setStatus('mandatory') rptr_monitor_port_group_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortGroupIndex.setStatus('mandatory') rptr_monitor_port_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortIndex.setStatus('mandatory') rptr_monitor_port_readable_frames = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortReadableFrames.setStatus('mandatory') rptr_monitor_port_readable_octets = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortReadableOctets.setStatus('mandatory') rptr_monitor_port_fcs_errors = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortFCSErrors.setStatus('mandatory') rptr_monitor_port_alignment_errors = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortAlignmentErrors.setStatus('mandatory') rptr_monitor_port_frame_too_longs = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortFrameTooLongs.setStatus('mandatory') rptr_monitor_port_short_events = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortShortEvents.setStatus('mandatory') rptr_monitor_port_runts = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortRunts.setStatus('mandatory') rptr_monitor_port_collisions = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortCollisions.setStatus('mandatory') rptr_monitor_port_late_events = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortLateEvents.setStatus('mandatory') rptr_monitor_port_very_long_events = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortVeryLongEvents.setStatus('mandatory') rptr_monitor_port_data_rate_mismatches = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortDataRateMismatches.setStatus('mandatory') rptr_monitor_port_auto_partitions = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortAutoPartitions.setStatus('mandatory') rptr_monitor_port_total_errors = mib_table_column((1, 3, 6, 1, 2, 1, 22, 2, 3, 1, 1, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrMonitorPortTotalErrors.setStatus('mandatory') rptr_addr_track_table = mib_table((1, 3, 6, 1, 2, 1, 22, 3, 3, 1)) if mibBuilder.loadTexts: rptrAddrTrackTable.setStatus('mandatory') rptr_addr_track_entry = mib_table_row((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'rptrAddrTrackGroupIndex'), (0, 'LANART-AGENT', 'rptrAddrTrackPortIndex')) if mibBuilder.loadTexts: rptrAddrTrackEntry.setStatus('mandatory') rptr_addr_track_group_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrAddrTrackGroupIndex.setStatus('mandatory') rptr_addr_track_port_index = mib_table_column((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrAddrTrackPortIndex.setStatus('mandatory') rptr_addr_track_last_source_address = mib_table_column((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrAddrTrackLastSourceAddress.setStatus('mandatory') rptr_addr_track_source_addr_changes = mib_table_column((1, 3, 6, 1, 2, 1, 22, 3, 3, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rptrAddrTrackSourceAddrChanges.setStatus('mandatory') rptr_health = notification_type((1, 3, 6, 1, 2, 1, 22) + (0, 1)).setObjects(('LANART-AGENT', 'rptrOperStatus')) rptr_group_change = notification_type((1, 3, 6, 1, 2, 1, 22) + (0, 2)).setObjects(('LANART-AGENT', 'rptrGroupIndex')) rptr_reset_event = notification_type((1, 3, 6, 1, 2, 1, 22) + (0, 3)).setObjects(('LANART-AGENT', 'rptrOperStatus')) lanart = mib_identifier((1, 3, 6, 1, 4, 1, 712)) la_mib1 = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1)) la_products = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1)) la_hub_mib = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 2)) la_sys = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 2, 1)) la_tp_port = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 2, 2)) la_tp_hub = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1)) la_tp_hub1 = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1)) etm120x = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1, 12)) etm160x = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1, 16)) etm240x = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 1, 24)) la_tp_hub2 = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2)) ete120x = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2, 12)) ete160x = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2, 16)) ete240x = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 2, 24)) la_tp_hub3 = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3)) bb_aui = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 0)) bb_aui_tp = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 1)) bb_aui_bnc = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 2)) bb_aui_tp_bnc = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 3)) bb_aui10_base_fl = mib_identifier((1, 3, 6, 1, 4, 1, 712, 1, 1, 1, 3, 4)).setLabel('bbAui10BASE-FL') la_sys_config = mib_scalar((1, 3, 6, 1, 4, 1, 712, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('save', 1), ('load', 2), ('factory', 3), ('ok', 4), ('failed', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: laSysConfig.setStatus('mandatory') la_joystick = mib_scalar((1, 3, 6, 1, 4, 1, 712, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: laJoystick.setStatus('mandatory') la_link_alert = mib_scalar((1, 3, 6, 1, 4, 1, 712, 1, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('not-applicable', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: laLinkAlert.setStatus('mandatory') la_tp_port_table = mib_table((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1)) if mibBuilder.loadTexts: laTpPortTable.setStatus('mandatory') la_tp_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1)).setIndexNames((0, 'LANART-AGENT', 'laTpPortGroupIndex'), (0, 'LANART-AGENT', 'laTpPortIndex')) if mibBuilder.loadTexts: laTpPortEntry.setStatus('mandatory') la_tp_port_group_index = mib_table_column((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: laTpPortGroupIndex.setStatus('mandatory') la_tp_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 1024))).setMaxAccess('readonly') if mibBuilder.loadTexts: laTpPortIndex.setStatus('mandatory') la_tp_link_test = mib_table_column((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('failed', 3), ('not-applicable', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: laTpLinkTest.setStatus('mandatory') la_tp_auto_polarity = mib_table_column((1, 3, 6, 1, 4, 1, 712, 1, 2, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('corrected', 3), ('not-applicable', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: laTpAutoPolarity.setStatus('mandatory') mibBuilder.exportSymbols('LANART-AGENT', rptrRptrInfo=rptrRptrInfo, ifOutOctets=ifOutOctets, ipRouteMask=ipRouteMask, ipFragOKs=ipFragOKs, mib_2=mib_2, atPhysAddress=atPhysAddress, atNetAddress=atNetAddress, snmpOutGenErrs=snmpOutGenErrs, ipInDelivers=ipInDelivers, ifOutErrors=ifOutErrors, icmpOutAddrMasks=icmpOutAddrMasks, snmpInGenErrs=snmpInGenErrs, mgmt=mgmt, internet=internet, ipInDiscards=ipInDiscards, rptrPortInfo=rptrPortInfo, rptrGroupOperStatus=rptrGroupOperStatus, rptrMonitorPortTotalErrors=rptrMonitorPortTotalErrors, ccitt=ccitt, ifMtu=ifMtu, rptrMonitorPortTable=rptrMonitorPortTable, icmpOutRedirects=icmpOutRedirects, rptrMonitorPortDataRateMismatches=rptrMonitorPortDataRateMismatches, rptrMonitorGroupIndex=rptrMonitorGroupIndex, ipReasmReqds=ipReasmReqds, tcpConnTable=tcpConnTable, dot1dBridge=dot1dBridge, ip=ip, icmpInAddrMaskReps=icmpInAddrMaskReps, snmpInTotalSetVars=snmpInTotalSetVars, snmpEnableAuthenTraps=snmpEnableAuthenTraps, rptrMonitorGroupTotalOctets=rptrMonitorGroupTotalOctets, etm120x=etm120x, snmpInTraps=snmpInTraps, egp=egp, rptrPortOperStatus=rptrPortOperStatus, rptrAddrTrackRptrInfo=rptrAddrTrackRptrInfo, bbAuiTp=bbAuiTp, icmpOutMsgs=icmpOutMsgs, ipReasmOKs=ipReasmOKs, transmission=transmission, ifType=ifType, tcpConnRemAddress=tcpConnRemAddress, icmpOutErrors=icmpOutErrors, ipFragFails=ipFragFails, atTable=atTable, snmpInGetRequests=snmpInGetRequests, icmpOutDestUnreachs=icmpOutDestUnreachs, tcpRtoMin=tcpRtoMin, rptrPortGroupIndex=rptrPortGroupIndex, rptrMonitorPortReadableFrames=rptrMonitorPortReadableFrames, udpEntry=udpEntry, sysObjectID=sysObjectID, ifOperStatus=ifOperStatus, ipRouteAge=ipRouteAge, laProducts=laProducts, rptrMonitorRptrInfo=rptrMonitorRptrInfo, null=null, snmpInSetRequests=snmpInSetRequests, ifTable=ifTable, ipInReceives=ipInReceives, snmpInTooBigs=snmpInTooBigs, ipRouteMetric1=ipRouteMetric1, laMib1=laMib1, atEntry=atEntry, dot1dStp=dot1dStp, rptrGroupObjectID=rptrGroupObjectID, ipInHdrErrors=ipInHdrErrors, ifInOctets=ifInOctets, snmpOutPkts=snmpOutPkts, ipRouteMetric2=ipRouteMetric2, ipNetToMediaType=ipNetToMediaType, laTpHub1=laTpHub1, icmp=icmp, ipForwarding=ipForwarding, rptrGroupIndex=rptrGroupIndex, sysLocation=sysLocation, rptrMonitorGroupTotalFrames=rptrMonitorGroupTotalFrames, rptrMonitorPortVeryLongEvents=rptrMonitorPortVeryLongEvents, snmpInGetResponses=snmpInGetResponses, ete240x=ete240x, laTpPort=laTpPort, icmpOutAddrMaskReps=icmpOutAddrMaskReps, rptrMonitorPortReadableOctets=rptrMonitorPortReadableOctets, icmpInParmProbs=icmpInParmProbs, MacAddress=MacAddress, ifDescr=ifDescr, ipRouteIfIndex=ipRouteIfIndex, ipRoutingDiscards=ipRoutingDiscards, tcpAttemptFails=tcpAttemptFails, snmpOutGetResponses=snmpOutGetResponses, snmpInBadCommunityUses=snmpInBadCommunityUses, rptrMonitorPortLateEvents=rptrMonitorPortLateEvents, dot1dStatic=dot1dStatic, udpNoPorts=udpNoPorts, snmpInBadVersions=snmpInBadVersions, rptrMonitorPortFCSErrors=rptrMonitorPortFCSErrors, laTpPortGroupIndex=laTpPortGroupIndex, snmpInBadValues=snmpInBadValues, tcp=tcp, experimental=experimental, ifOutNUcastPkts=ifOutNUcastPkts, ifInDiscards=ifInDiscards, snmpOutGetNexts=snmpOutGetNexts, rptrAddrTrackGroupInfo=rptrAddrTrackGroupInfo, rptrResetEvent=rptrResetEvent, ifOutUcastPkts=ifOutUcastPkts, snmpOutTraps=snmpOutTraps, dot1dTp=dot1dTp, rptrAddrTrackPortInfo=rptrAddrTrackPortInfo, icmpInTimestamps=icmpInTimestamps, laTpHub3=laTpHub3, rptrMonitorPortIndex=rptrMonitorPortIndex, tcpRtoMax=tcpRtoMax, tcpConnLocalPort=tcpConnLocalPort, rptrOperStatus=rptrOperStatus, ipNetToMediaEntry=ipNetToMediaEntry, snmpOutSetRequests=snmpOutSetRequests, dot1dSr=dot1dSr, rptrPortTable=rptrPortTable, snmp=snmp, laTpAutoPolarity=laTpAutoPolarity, ipOutDiscards=ipOutDiscards, icmpOutTimestampReps=icmpOutTimestampReps, ipForwDatagrams=ipForwDatagrams, rptrHealthText=rptrHealthText, system=system, tcpInSegs=tcpInSegs, etm240x=etm240x, interfaces=interfaces, ipAdEntBcastAddr=ipAdEntBcastAddr, icmpOutSrcQuenchs=icmpOutSrcQuenchs, BridgeId=BridgeId, ipRouteDest=ipRouteDest, rptrMonitorGroupTotalErrors=rptrMonitorGroupTotalErrors, rptrPortAutoPartitionState=rptrPortAutoPartitionState, tcpCurrEstab=tcpCurrEstab, snmpInBadCommunityNames=snmpInBadCommunityNames, ipRouteMetric3=ipRouteMetric3, rptrGroupChange=rptrGroupChange, rptrNonDisruptTest=rptrNonDisruptTest, sysServices=sysServices, snmpInPkts=snmpInPkts, udpLocalAddress=udpLocalAddress, rptrGroupPortCapacity=rptrGroupPortCapacity, laJoystick=laJoystick, bbAuiBnc=bbAuiBnc, rptrAddrTrackPortIndex=rptrAddrTrackPortIndex, ifEntry=ifEntry, ipNetToMediaPhysAddress=ipNetToMediaPhysAddress, laSysConfig=laSysConfig, enterprises=enterprises, ipReasmFails=ipReasmFails, snmpOutTooBigs=snmpOutTooBigs, rptrMonitorPortAlignmentErrors=rptrMonitorPortAlignmentErrors, rptrGroupLastOperStatusChange=rptrGroupLastOperStatusChange, laLinkAlert=laLinkAlert, icmpInErrors=icmpInErrors, udpInErrors=udpInErrors, rptrMonitorGroupTable=rptrMonitorGroupTable, ipRouteInfo=ipRouteInfo, rptrMonitorPackage=rptrMonitorPackage, icmpOutTimeExcds=icmpOutTimeExcds, ipInUnknownProtos=ipInUnknownProtos, rptrMonitorPortShortEvents=rptrMonitorPortShortEvents, dot1dBase=dot1dBase, tcpRetransSegs=tcpRetransSegs, udpOutDatagrams=udpOutDatagrams, org=org, rptrMonitorPortEntry=rptrMonitorPortEntry, rptrGroupDescr=rptrGroupDescr, private=private, rptrMonitorPortAutoPartitions=rptrMonitorPortAutoPartitions, rptrGroupInfo=rptrGroupInfo, ifAdminStatus=ifAdminStatus, ipNetToMediaTable=ipNetToMediaTable, rptrAddrTrackSourceAddrChanges=rptrAddrTrackSourceAddrChanges, rptrMonitorPortRunts=rptrMonitorPortRunts, ipAdEntNetMask=ipAdEntNetMask, tcpOutSegs=tcpOutSegs, rptrTotalPartitionedPorts=rptrTotalPartitionedPorts, ifSpeed=ifSpeed, sysName=sysName, ipOutRequests=ipOutRequests, ifInNUcastPkts=ifInNUcastPkts, laTpPortEntry=laTpPortEntry, ipRouteEntry=ipRouteEntry, at=at, rptrPortIndex=rptrPortIndex, ifIndex=ifIndex, etm160x=etm160x, tcpMaxConn=tcpMaxConn, icmpInDestUnreachs=icmpInDestUnreachs, rptrAddrTrackEntry=rptrAddrTrackEntry, udpLocalPort=udpLocalPort, icmpOutTimestamps=icmpOutTimestamps, tcpConnRemPort=tcpConnRemPort, snmpInNoSuchNames=snmpInNoSuchNames, tcpConnEntry=tcpConnEntry, ifInErrors=ifInErrors, snmpInGetNexts=snmpInGetNexts, newRoot=newRoot, rptrGroupCapacity=rptrGroupCapacity, rptrMonitorGroupEntry=rptrMonitorGroupEntry, rptrMonitorPortFrameTooLongs=rptrMonitorPortFrameTooLongs, ete120x=ete120x, laTpPortTable=laTpPortTable, rptrGroupTable=rptrGroupTable, ifOutQLen=ifOutQLen, rptrMonitorPortGroupIndex=rptrMonitorPortGroupIndex, sysContact=sysContact, icmpInAddrMasks=icmpInAddrMasks, ifInUnknownProtos=ifInUnknownProtos, ifLastChange=ifLastChange, DisplayString=DisplayString, ipAddrTable=ipAddrTable, snmpInASNParseErrs=snmpInASNParseErrs, rptrAddrTrackTable=rptrAddrTrackTable, udp=udp, ipInAddrErrors=ipInAddrErrors, icmpInEchos=icmpInEchos, tcpEstabResets=tcpEstabResets, tcpActiveOpens=tcpActiveOpens, icmpInEchoReps=icmpInEchoReps, laTpHub2=laTpHub2, tcpConnState=tcpConnState, Timeout=Timeout, topologyChange=topologyChange, laTpHub=laTpHub, icmpInTimestampReps=icmpInTimestampReps, ifNumber=ifNumber, ipNetToMediaIfIndex=ipNetToMediaIfIndex, icmpOutEchos=icmpOutEchos, ipAdEntIfIndex=ipAdEntIfIndex, tcpInErrs=tcpInErrs, icmpInTimeExcds=icmpInTimeExcds, laTpPortIndex=laTpPortIndex, rptrBasicPackage=rptrBasicPackage, iso=iso, atIfIndex=atIfIndex, sysUpTime=sysUpTime, icmpInMsgs=icmpInMsgs, udpTable=udpTable, snmpInTotalReqVars=snmpInTotalReqVars, snmpOutGetRequests=snmpOutGetRequests, rptrGroupEntry=rptrGroupEntry, laHubMib=laHubMib, ete160x=ete160x, ipAdEntAddr=ipAdEntAddr, sysDescr=sysDescr, ipRouteNextHop=ipRouteNextHop, ipRouteTable=ipRouteTable, directory=directory, ipReasmTimeout=ipReasmTimeout) mibBuilder.exportSymbols('LANART-AGENT', rptrAddrTrackPackage=rptrAddrTrackPackage, ifSpecific=ifSpecific, rptrAddrTrackLastSourceAddress=rptrAddrTrackLastSourceAddress, rptrAddrTrackGroupIndex=rptrAddrTrackGroupIndex, ifOutDiscards=ifOutDiscards, ifInUcastPkts=ifInUcastPkts, snmpInReadOnlys=snmpInReadOnlys, dod=dod, rptrMonitorTransmitCollisions=rptrMonitorTransmitCollisions, ipRouteType=ipRouteType, rptrReset=rptrReset, rptrPortEntry=rptrPortEntry, ipAddrEntry=ipAddrEntry, PhysAddress=PhysAddress, ipRouteProto=ipRouteProto, rptrMonitorPortInfo=rptrMonitorPortInfo, ipAdEntReasmMaxSize=ipAdEntReasmMaxSize, tcpPassiveOpens=tcpPassiveOpens, icmpInRedirects=icmpInRedirects, tcpConnLocalAddress=tcpConnLocalAddress, udpInDatagrams=udpInDatagrams, bbAuiTpBnc=bbAuiTpBnc, rptrPortAdminStatus=rptrPortAdminStatus, rptrMonitorPortCollisions=rptrMonitorPortCollisions, laTpLinkTest=laTpLinkTest, icmpOutParmProbs=icmpOutParmProbs, snmpOutNoSuchNames=snmpOutNoSuchNames, rptrHealth=rptrHealth, ipRouteMetric5=ipRouteMetric5, ipFragCreates=ipFragCreates, ipRouteMetric4=ipRouteMetric4, laSys=laSys, icmpOutEchoReps=icmpOutEchoReps, lanart=lanart, tcpOutRsts=tcpOutRsts, tcpRtoAlgorithm=tcpRtoAlgorithm, snmpDot3RptrMgt=snmpDot3RptrMgt, ipNetToMediaNetAddress=ipNetToMediaNetAddress, ipOutNoRoutes=ipOutNoRoutes, rptrMonitorGroupInfo=rptrMonitorGroupInfo, icmpInSrcQuenchs=icmpInSrcQuenchs, ipDefaultTTL=ipDefaultTTL, snmpOutBadValues=snmpOutBadValues, bbAui10BASE_FL=bbAui10BASE_FL, ifPhysAddress=ifPhysAddress, bbAui=bbAui)