content
stringlengths
7
1.05M
#!/usr/bin/python3 ############## # Load input # ############## rules = dict() with open("input.txt", "r") as f: initial_state = f.readline().strip().split(" ")[2] f.readline() for line in f.readlines(): rules[line.split(" => ")[0]] = line.strip().split(" => ")[1] ############## # Solution 1 # ############## current_state = "...." + initial_state + "...." # Pad out non-plants on either end for step in range(20): new_state = "" for idx in range(len(current_state)-4): # Iterate as far as possible new_state += rules.get(current_state[idx:idx+5], '.') current_state = "...." + new_state + "...." # Pad out non-plants on either end # Count padding to get back to the original plant numbers offset = int((len(current_state) - len(initial_state))/2) answer = sum([idx-offset for idx, plant in enumerate(current_state) if plant=="#"]) print(f"Solution to part 1 is {answer}") ############## # Solution 2 # ############## # Find a pattern old_answer = 0 current_state = "...." + initial_state + "...." # Pad out non-plants on either end for step in range(1, 110): new_state = "" for idx in range(len(current_state)-4): # Iterate as far as possible new_state += rules.get(current_state[idx:idx+5], '.') current_state = "...." + new_state + "...." # Pad out non-plants on either end # Count padding to get back to the original plant numbers offset = int((len(current_state) - len(initial_state))/2) answer = sum([idx-offset for idx, plant in enumerate(current_state) if plant=="#"]) # Compare to the previous step #print(step, answer, answer - old_answer) old_answer = answer # On the 100 iterations it reaches a stable state, so no need to iterate 50 billion times: num_steps = 50000000000 answer = 883 + num_steps * 51 print(f"Solution to part 2 is {answer}")
a = int(input("Please enter the first number: ")) b = int(input("Please enter the second number: ")) count = 0 for i in range(a, b + 1): if i % 2 == 0: count += i print(count)
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: domainbounds.py # # Tests: libsim - connecting to simulation and retrieving data from it. # mesh - 3D rectilinear mesh # # Programmer: Kathleen Biagas # Date: June 17, 2014 # # Modifications: # # ---------------------------------------------------------------------------- # Create our simulation object. sim = TestSimulation("domainbounds", "domainbounds.sim2") # Test that we can start and connect to the simulation. started, connected = TestSimStartAndConnect("domainbounds00", sim) # Perform our tests. if connected: # Make sure the metadata is right. TestSimMetaData("domainbounds01", sim.metadata()) AddPlot("Subset", "Domains") DrawPlots() v = GetView3D() v.viewNormal = (0.672727, 0.569817, 0.471961) v.viewUp = (-0.252634, 0.776445, -0.57733) SetView3D(v) Test("domainbounds02") DeleteAllPlots() AddPlot("Pseudocolor", "zonal") DrawPlots() Test("domainbounds03") DeleteAllPlots() # Close down the simulation. if started: sim.endsim() Exit()
__author__ = 'Devon Evans dle4qw' def main(): greeting('hello') def greeting(msg): print(msg) if __name__=='__main__': main()
""" Module: 'uasyncio.core' on esp8266 v1.9.4 """ # MCU: (sysname='esp8266', nodename='esp8266', release='2.2.0-dev(9422289)', version='v1.9.4-8-ga9a3caad0 on 2018-05-11', machine='ESP module with ESP8266') # Stubber: 1.1.2 class CancelledError: '' DEBUG = 0 class EventLoop: '' def call_at_(): pass def call_later(): pass def call_later_ms(): pass def call_soon(): pass def close(): pass def create_task(): pass def run_forever(): pass def run_until_complete(): pass def stop(): pass def time(): pass def wait(): pass class IORead: ''
## emails ## from_email = "" to_email = "" smtp = ""
class Item: ''' Component defines entity as an item ''' def __init__(self, use_function=None, targeting=False, targeting_message=None, **kwargs): self.use_function = use_function self.targeting = targeting self.targeting_message = targeting_message self.function_kwargs = kwargs
class Solution(object): def rotate(self, matrix): """ :type matrix: List[List[int]] :rtype: None Do not return anything, modify matrix in-place instead. n=4:0,0->0,3;1,0->0,2;3,0->0,0;0,1->1,3;2,2->2,1;3,2->2,0; n:[i,j]->[j,n+1-i];[j,n+1-i]->[n+1-i,n+1-j];[n+1-i,n+1-j]->[n+1-j,i];[n+1-j, i]->[i,j] n=3:0,0->0,2;0,1->1,2 """ n=len(matrix) if n % 2 == 0: for i in range((n)//2): for j in range((n)//2): temp = matrix[i][j] matrix[i][j] = matrix[n-1-j][i] matrix[n - 1 - j][i] = matrix[n-1-i][n-1-j] matrix[n-1-i][n-1-j] = matrix[j][n-1-i] matrix[j][n - 1 - i] = temp # 逆时针 # matrix[i][j] = matrix[j][n-1-i] # matrix[j][n-1-i] = matrix[n-1-i][n-1-j] # matrix[n-1-i][n-1-j] = matrix[n-1-j][i] # matrix[n-1-j][i] = temp else: for i in range((n-1)//2): for j in range((n+1)//2): temp = matrix[i][j] matrix[i][j] = matrix[n - 1 - j][i] matrix[n - 1 - j][i] = matrix[n - 1 - i][n - 1 - j] matrix[n - 1 - i][n - 1 - j] = matrix[j][n - 1 - i] matrix[j][n - 1 - i] = temp # matrix[i][j] = matrix[j][n-1-i] # matrix[j][n-1-i] = matrix[n-1-i][n-1-j] # matrix[n-1-i][n-1-j] = matrix[n-1-j][i] # matrix[n-1-j][i] = temp # matrix = [[1, 2, 3],[4, 5, 6],[7, 8, 9]] matrix = [ [ 5, 1, 9, 11], [ 2, 4, 8, 10], [13, 3, 6, 7], [15, 14, 12, 16] ] s=Solution() s.rotate(matrix) print(1)
# # # "3 is not equal to 5". # Save the above proposition in ans1 using the # # == or != operator. # # ans1 = None # # # "21 is a number greater than 5*10." # Save the above proposition in ans2 using # # # or < operator. # # ans2 = None # # # "5/3 share is greater than or equal to 1". # Save the above proposition in ans3 using the # #>= or <= operator. # # ans3 = None # # Check the true and false by outputting the above three variables. You don't have to modify the code below. # print(ans1, ans2, ans3) # Let's put the proposition True into ans1 using the # Q1. = or != operator. ans1 = 1!=0 # Let's put the False proposition into ans2 using # Q2. > or < operator. ans2 = 2<1 # Let's put the proposition True into ans3 using the # Q3. >= or <= operator. ans3 = 2<=3 # Let's print out the above three variables and check whether they are True or False. print(ans1, ans2, ans3)
""" SeleniumBase constants are stored in this file. """ class Environment: # Usage Example => "--env=qa" => Then access value in tests with "self.env" QA = "qa" STAGING = "staging" DEVELOP = "develop" PRODUCTION = "production" MASTER = "master" LOCAL = "local" TEST = "test" class Files: DOWNLOADS_FOLDER = "downloaded_files" ARCHIVED_DOWNLOADS_FOLDER = "archived_files" class SavedCookies: STORAGE_FOLDER = "saved_cookies" class Tours: EXPORTED_TOURS_FOLDER = "tours_exported" class VisualBaseline: STORAGE_FOLDER = "visual_baseline" class JQuery: VER = "3.4.1" MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/jquery/%s/jquery.min.js" % VER # MIN_JS = ( # "https://ajax.aspnetcdn.com/ajax/jQuery/jquery-%s.min.js" % VER) # MIN_JS = ( # "https://ajax.googleapis.com/ajax/libs/jquery/%s/jquery.min.js" % VER) class Messenger: VER = "1.5.0" MIN_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/messenger.min.css" % VER MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/js/messenger.min.js" % VER THEME_FLAT_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/js/messenger-theme-flat.js" % VER THEME_FUTURE_JS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/js/messenger-theme-future.js" % VER ) THEME_FLAT_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/messenger-theme-flat.min.css" % VER ) THEME_FUTURE_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/" "messenger-theme-future.min.css" % VER ) THEME_BLOCK_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/messenger-theme-block.min.css" % VER ) THEME_AIR_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/messenger-theme-air.min.css" % VER ) THEME_ICE_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/messenger-theme-ice.min.css" % VER ) SPINNER_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "messenger/%s/css/messenger-spinner.min.css" % VER class Underscore: VER = "1.9.1" MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "underscore.js/%s/underscore-min.js" % VER class Backbone: VER = "1.4.0" MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "backbone.js/%s/backbone-min.js" % VER class HtmlInspector: VER = "0.8.2" MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "html-inspector/%s/html-inspector.min.js" % VER class BootstrapTour: VER = "0.11.0" MIN_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "bootstrap-tour/%s/css/bootstrap-tour-standalone.min.css" % VER ) MIN_JS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "bootstrap-tour/%s/js/bootstrap-tour-standalone.min.js" % VER ) class Hopscotch: VER = "0.3.1" MIN_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "hopscotch/%s/css/hopscotch.min.css" % VER MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "hopscotch/%s/js/hopscotch.min.js" % VER class IntroJS: VER = "2.9.3" MIN_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "intro.js/%s/introjs.css" % VER MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "intro.js/%s/intro.min.js" % VER class JqueryConfirm: VER = "3.3.4" MIN_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "jquery-confirm/%s/jquery-confirm.min.css" % VER MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "jquery-confirm/%s/jquery-confirm.min.js" % VER class Shepherd: VER = "1.8.1" MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/js/shepherd.min.js" % VER THEME_ARROWS_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/css/shepherd-theme-arrows.css" % VER ) THEME_ARR_FIX_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/css/shepherd-theme-arrows-fix.css" % VER ) THEME_DEFAULT_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/css/shepherd-theme-default.css" % VER ) THEME_DARK_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/css/shepherd-theme-dark.css" % VER THEME_SQ_CSS = "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/css/shepherd-theme-square.css" % VER THEME_SQ_DK_CSS = ( "https://cdnjs.cloudflare.com/ajax/libs/" "shepherd/%s/css/shepherd-theme-square-dark.css" % VER ) class Tether: VER = "1.4.7" MIN_JS = "https://cdnjs.cloudflare.com/ajax/libs/" "tether/%s/js/tether.min.js" % VER class ValidBrowsers: valid_browsers = [ "chrome", "edge", "firefox", "ie", "opera", "phantomjs", "safari", "android", "iphone", "ipad", "remote", ] class Browser: GOOGLE_CHROME = "chrome" EDGE = "edge" FIREFOX = "firefox" INTERNET_EXPLORER = "ie" OPERA = "opera" PHANTOM_JS = "phantomjs" SAFARI = "safari" ANDROID = "android" IPHONE = "iphone" IPAD = "ipad" REMOTE = "remote" VERSION = { "chrome": None, "edge": None, "firefox": None, "ie": None, "opera": None, "phantomjs": None, "safari": None, "android": None, "iphone": None, "ipad": None, "remote": None, } LATEST = { "chrome": None, "edge": None, "firefox": None, "ie": None, "opera": None, "phantomjs": None, "safari": None, "android": None, "iphone": None, "ipad": None, "remote": None, } class State: NOTRUN = "NotRun" ERROR = "Error" FAILURE = "Fail" PASS = "Pass" SKIP = "Skip" BLOCKED = "Blocked" DEPRECATED = "Deprecated"
#Configuration details of user uname = "Guru HariHaraun" email = "[email protected]" district_id = 560 # The 506 is the district code for trichy. vaccine_type = "COVAXIN" # Either user COVISHIED or COVAXIN All should be in UPPERCASE fee_type ="Free" # The fee type should be Paid or Free All should be in UPPERCASE age_limit = 45 # Enter Your Age Here attempt = 1 # Number of days the application should periodically check wait_time = 300 # 5 minutes in seconds #SMTP Email Configuration SMTP_SERVER = 'smtp.gmail.com' SMTP_PORT = 587 SMTP_USER_NAME = '[email protected]' SMTP_PASSWORD = 'qwerty@1234' #Should Not Modify The variables below isUserNotified = 0 # Setting up a flag to say that the user has been notified available_flag_break = 0 # To break the process after notified to user
gitignore = """ # Dolphin .directory # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* nohup.out .cache nosetests.xml coverage.xml *.cover .hypothesis/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # pyenv .python-version # celery beat schedule file celerybeat-schedule* # SageMath parsed files *.sage.py # dotenv .env # virtualenv .venv venv/ ENV/ env/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject/ # mkdocs documentation /site # mypy .mypy_cache/ # PyCharm .idea/ .*~ # Jekyll Documentation _site .sass-cache .jekyll-metadata .jekyll-cache/* .jekyll-cache/* # nohup.out files *.out stime """
# 7из49 + Выигрышные номера последних 4 тиражей def test_7x49_winning_numbers_last_4_draws(app): app.ResultAndPrizes.open_page_results_and_prizes() app.ResultAndPrizes.click_game_7x49() app.ResultAndPrizes.click_winning_numbers_of_the_last_4_draws() app.ResultAndPrizes.button_get_report_winners() app.ResultAndPrizes.parser_report_text_winners() assert "ВЫИГРЫШНЫЕ НОМЕРА" in app.ResultAndPrizes.parser_report_text_winners() app.ResultAndPrizes.message_id_33_7x49_winning_numbers_4_last_draw() app.ResultAndPrizes.comeback_main_page()
# A P I - K E Y S # --------------- keys = ['XXXX'] # S F T P - S E R V E R # --------------------- hostname = 'XXXX' username = 'XXXX' password = 'XXXX' path = 'XXXX' # P O R T - C O D E #------------------ port_num = 'XXXX'
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License in the top-level directory # of this distribution and at: # # http://www.apache.org/licenses/LICENSE-2.0 # # No part of the project, including this file, may be copied, # modified, propagated, or distributed except according to the # terms contained in the LICENSE file. """Defines common Object Oriented Patterns One should re-use these instead of defining their owns. """ # ========================== # Singleton Design Pattern # ========================== class SingletonMetaClass(type): """Metaclass for singleton design pattern. .. warning:: This metaclass should not be used directly. To declare a class using the singleton pattern, one should use the :class:`Singleton` class instead. """ _instances = {} def __call__(mcs, *args, **kwargs): if mcs not in mcs._instances: mcs._instances[mcs] = \ super(SingletonMetaClass, mcs).__call__(*args, **kwargs) return mcs._instances[mcs] # Metaclass compatible with python 2 and 3. Inherit from this for singletons Singleton = SingletonMetaClass('Singleton', (object,), {}) """Base class for singleton This class implements the singleton design pattern. One can inherit from this base class to make a class implement the singleton design pattern. .. code-block:: python # a class implementing a singleton class aParametricSingleton(Singleton): # do some stuff here pass # let us verify that it is really a singleton print(id(aParametricSingleton()) print(id(aParametricSingleton()) """ # ===================================== # Parametric Singleton Design Pattern # ===================================== class ParametricSingletonMetaClass(type): """Metaclass for parametric singleton design pattern .. warning:: This metaclass should not be used directly. To declare a class using the singleton pattern, one should use the :class:`ParametricSingleton` class instead and precise the parameter used for the dict using a class method named ``depends_on``. """ _instances = {} def __call__(mcs, *args, **kwargs): # check for "depends_on" attribute if "depends_on" not in kwargs and not hasattr(mcs, "depends_on"): raise TypeError("argument or attribute 'depends_on' not defined") # check for unbound methods if "depends_on" in kwargs and \ (not kwargs["depends_on"] or not callable(kwargs["depends_on"])): raise TypeError("function in parameter 'depends_on' is not bound") elif hasattr(mcs, "depends_on") and \ (not getattr(mcs, "depends_on") or not callable(getattr(mcs, "depends_on"))): raise TypeError("function in attribute 'depends_on' is not bound") # call depends_on to get the key if "depends_on" in kwargs: key = kwargs["depends_on"](mcs, args, kwargs) del kwargs["depends_on"] else: key = getattr(mcs, "depends_on")(mcs, args, kwargs) # check for instance if mcs not in mcs._instances: mcs._instances[mcs] = {} if key not in mcs._instances[mcs]: mcs._instances[mcs][key] = \ super(ParametricSingletonMetaClass, mcs).\ __call__(*args, **kwargs) return mcs._instances[mcs][key] def update_key(mcs, old_key, new_key): mcs._instances[mcs][new_key] = mcs._instances[mcs].pop(old_key) def remove_key(mcs, key): if key in mcs._instances: del mcs._instances[mcs][key] # Metaclass compatible with python 2 and 3. # Inherit from this for parametric singletons ParametricSingleton = ParametricSingletonMetaClass('ParametricSingleton', (object,), {}) """Base class for parametric singletons This class implements the parametric singleton design pattern. One can inherit from this base class to make a class implement a parametric singleton pattern. Pass either an argument ``depends_on`` in the constructor or define a class method called ``depends_on`` that specifies how to compute the parameter value used for the hash table storing the instances: * example with a **static method**: .. code-block:: python class aParametricSingleton(ParametricSingleton): @staticmethod def depends_on(*args, **kwargs): return "my key" * example with a **``lambda`` wrapped with a static method**: .. code-block:: python class aParametricSingleton(ParametricSingleton): depends_on = staticmethod(lambda *args, **kwargs: "my key") """ class PluginMetaClass(type): """Metaclass for auto-registering plugin pattern .. warning:: This metaclass should not be used directly. To declare a class using the plugin pattern, one should use the :class:`Plugin` class instead. """ # =================== # class constructor # =================== def __init__(mcs, name, bases, attrs): # small hack to skip Plugin base class when initializing if not len(attrs): return # Begin to register all classes that derives from Plugin base class if not hasattr(mcs, '_plugins'): # This branch only executes when processing the mount point itself. # So, since this is a new plugin type, not an implementation, this # class shouldn't be registered as a plugin. Instead, it sets up a # list where plugins can be registered later. mcs._plugins = [] else: # This must be a plugin implementation, which should be registered. # Simply appending it to the list is all that's needed to keep # track of it later. mcs._plugins.append(mcs) # ================= # Plugin metadata # ================= _plugin_name = None _plugin_version = None _plugin_description = None _plugin_dependencies = None # ===================== # Setters and getters # ===================== @property def plugin_name(mcs): return mcs._plugin_name @property def plugin_version(mcs): return mcs._plugin_version @property def plugin_description(mcs): return mcs._plugin_description @property def plugin_dependencies(mcs): return mcs._plugin_dependencies @property def plugins(mcs): return mcs._plugins # ================= # Utility methods # ================= def get_plugins(mcs, *args, **kwargs): """return instances of plugins""" return [plugin(*args, **kwargs) for plugin in mcs._plugins] def get_plugin(mcs, name, *args, **kwargs): """return instance of a named plugin""" plugin = [x for x in mcs._plugins if x.plugin_name == name] return plugin[0] if plugin else None # Metaclass compatible with python 2 and 3. Inherit from this for Plugins Plugin = PluginMetaClass('Plugin', (object,), {})
''' Author: Justin Muirhead ''' room = 0 rooms = [ 'Hall', 'Hall2', 'Courtyard', 'Hall3', 'Kitchen', 'Hall4', 'Hall5', 'Bedroom', 'CheeseRoom' ] desc = [ 'Hall with carpet', 'Hall with paintings', 'Courtyard with paving stones', 'Hallway with plants', 'Kitchen has old moldy food', 'Hallway has rat droppings', 'Hallway has dusty cobwebs', 'Bedroom has a bed in it', 'Has cheese in it' ] n = [1, 2, 3, 4, 99, 99, 99, 99, 99] s = [99, 0, 1, 2, 3, 99, 99, 99, 99] e = [99, 99, 6, 99, 99, 2, 8, 5, 99] w = [99, 99, 5, 99, 99, 7, 2, 99, 6] while True: print("You are in", rooms[room], desc[room]) if n[room] != 99: print("You can go north") if s[room] != 99: print("You can go south") if e[room] != 99: print("You can go east") if w[room] != 99: print("You can go west") move = input("Enter [n][s][e][w]: ") if move == 'n': room = n[room] elif move == 's': room = s[room] elif move == 'e': room = e[room] elif move == 'w': room = w[room]
def fqname_for(cls: type) -> str: """ Returns the fully qualified name of ``cls``. Parameters ---------- cls The class we are interested in. Returns ------- str The fully qualified name of ``cls``. """ return f"{cls.__module__}.{cls.__qualname__}"
def main(): n = int(input()) *s, = map(int, input().split()) *t, = map(int, input().split()) inf = 1 << 60 for i in range(2 * n): i %= n j = (i + 1) % n t[j] = min( t[j], t[i] + s[i], ) print(*t, sep='\n') main()
inp = int(input()) sum = 0 for i in range(1, inp + 1): sum += i print(sum)
#!/usr/bin/env python3 if __name__ == '__main__': mark_1 = int(input('Enter the first number: ')) mark_2 = int(input('Enter the second number: ')) mark_3 = int(input('Enter the third number: ')) mark_4 = int(input('Enter the fourth number: ')) mark_5 = int(input('Enter the fifth number: ')) max_mark = max([mark_1, mark_2, mark_3, mark_4, mark_5]) min_mark = min([mark_1, mark_2, mark_3, mark_4, mark_5]) avg_mark = sum([mark_1, mark_2, mark_3, mark_4, mark_5]) / 5 print() print(f'Max Mark: {max_mark}') print(f'Min Mark: {min_mark}') print(f'Average Mark: {avg_mark:.2f}')
def sieve_of_sundaram(n): res = [] if n > 2: res.append(2) n = int((n - 1) / 2) table = [0] * (n + 1) for i in range(1, n + 1): j = i while (i + j + 2 * i * j) <= n: table[i + j + 2 * i * j] = 1 j += 1 for i in range(1, n + 1): if table[i] == 0: res.append((2 * i + 1)) return res
class FastLRUCache(object): __slots__ = ['__key2value', '__max_size', '__weights'] def __init__(self, max_size: int): self.__max_size = max_size self.__key2value = {} # key->value self.__weights = [] # keys ordered in LRU def __update_weight(self, key): try: self.__weights.remove(key) except ValueError: pass self.__weights.append(key) # add key to end if len(self.__weights) > self.__max_size: _key = self.__weights.pop(0) # remove first key self.__key2value.pop(_key) def __getitem__(self, key): try: value = self.__key2value[key] self.__update_weight(key) return value except KeyError: raise KeyError("key %s not found" % key) def get(self, key, default=None): try: value = self.__key2value[key] self.__update_weight(key) return value except KeyError: return default def __setitem__(self, key, value): self.__key2value[key] = value self.__update_weight(key) def __str__(self): return str(self.__key2value) def size(self): return len(self.__key2value)
weight = int(input("enter your weight ---> " )) unit = input("(L)bs or (K)g ---> ") if unit.upper() == "K": weight_lbs = weight / 0.45 print("your weight in lbs is --->", weight_lbs) elif unit.upper() == "L": weight_kg = weight * 0.45 print("your weight in kg is --->", weight_kg)
#!/usr/bin/env python3 class ExtraComputationWarning(UserWarning): """ Warning thrown when a GP model does extra computation that it is not designed to do. This is mostly designed for :obj:`~gpytorch.variational.UnwhitenedVariationalStrategy`, which should cache most of its solves up front. """ pass class GPInputWarning(UserWarning): """ Warning thrown when a GP model receives an unexpected input. For example, when an :obj:`~gpytorch.models.ExactGP` in eval mode receives the training data as input. """ pass class NumericalWarning(RuntimeWarning): """ Warning thrown when convergence criteria are not met, or when comptuations require extra stability. """ pass class OldVersionWarning(UserWarning): """ Warning thrown when loading a saved model from an outdated version of GPyTorch. """ pass
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None """ Slicing an array is expensive. It's better to pass bounds of array into recursive calls! """ class Solution: def sortedArrayToBST(self, nums): """ :type nums: List[int] :rtype: TreeNode """ if not nums: return None root = None root = self._convertion(0, len(nums) - 1, nums) return root def _convertion(self, l, r, nums): if l > r: return None mid = (l + r) // 2 node = TreeNode(nums[mid]) node.left = self._convertion(l, mid - 1, nums) node.right = self._convertion(mid + 1, r, nums) return node def convertion(self, node, lnums, rnums): if lnums: lmid = len(lnums) // 2 node.left = TreeNode(lnums[lmid]) self.convertion(node.left, lnums[:lmid], lnums[lmid+1:]) else: node.left = None if rnums: rmid = len(rnums) // 2 node.right = TreeNode(rnums[rmid]) self.convertion(node.right, rnums[:rmid], rnums[rmid+1:]) else: node.right = None
while True: correto = True try: expressao = input() parenteses_aberto = [] for e in expressao: if e == '(': parenteses_aberto.append(e) if e == ')': if len(parenteses_aberto) > 0: parenteses_aberto.pop() else: correto = False break if correto and len(parenteses_aberto) == 0: print('correct') else: print('incorrect') except EOFError: break
""" Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ def get_input_masks(nx_node, nx_graph): """ Return input masks for all inputs of nx_node. """ input_edges = list(nx_graph.in_edges(nx_node['key'])) input_masks = [nx_graph.nodes[input_node]['output_mask'] for input_node, _ in input_edges] return input_masks def identity_mask_propagation(nx_node, nx_graph): """ Propagates input mask through nx_node. """ input_masks = get_input_masks(nx_node, nx_graph) assert len(input_masks) == 1 nx_node['input_masks'] = input_masks nx_node['output_mask'] = input_masks[0]
# Fibannci-ser def recur_fibo(n): if n <= 1: return n else: return(recur_fibo(n-1) + recur_fibo(n-2)) nterms = int(input("How many terms? ")) if nterms <= 0: print("Plese enter a positive integer") else: print("Fibonacci sequence:") for i in range(nterms): print(recur_fibo(i))
""" 里氏替换原则 父类出现的地方子类一定能够出现 """ class Database: def connect(self): pass def close_connect(self): pass def execute(self): pass def command(self): pass def insert(self, **kwargs): pass def select(self, username: str): pass def update(self, username): pass def delete(self, username): pass class UserService: def __init__(self, db: Database): self._db = db @property def db(self): return self._db def create_user(self, username, password, *args, **kwargs): return self.db.insert(username=username, password=password) def find_user(self, username): return self.db.select(username) def update_user_info(self, username): return self.db.update(username) def delete_user(self, username): return self.db.delete(username) class MysqlDatabase(Database): def __init__(self, db_type, db_host, db_port, db_name, db_user, db_password, *args, **kwargs): pass def insert(self, user): self.db.insert() def update(self, username): pass def select(self, username: str): pass def delete(self, username): pass class OracleDatabase(Database): pass def test(): # 数据在mysql userService = UserService(MysqlDatabase()) # 数据在Oracle userService = UserService(OracleDatabase()) if __name__ == '__main__': test()
# Marcelo Campos de Medeiros # ADS UNIFIP # REVISÃO DE PYTHON # AULA 14 LAÇO DE REPETIÇÃO WHILE ---> GUSTAVO GUANABARA ''' Faça um Programa que leia o sexo de uma pessoas, mas só aceite os valores "M" ou "F". caso esteja errado peça a digitação novamente até ter um valor correto. ''' print('='*30) print('{:*^30}'.format(' CADASTRO SEXO "M" e "F" ')) print('='*30) print() #variável str qual sexo "M" ou "F". colocar upper[0] pegar a primeira letra sexo = str(input('Informe seu sexo escrevendo:\n"M" para masculino ou "F" para feminino.\nQual seu sexo: ')).strip().upper()[0] # loop infinito até digitar M ou F while sexo not in 'MF': sexo = str(input('\nDados invalidos!\nPor favor, informe corretamente seu sexo.\n\nEscrevendo:\n"M" para masculino ou "F" para feminino.\nQual seu sexo:')).strip().upper()[0] print() print(f'Sexo {sexo} registrado com sucesso.')
# management canister interface `aaaaa-aa` # wrap basic interfaces provided by the management canister: # create_canister, install_code, canister_status, etc. class Management: pass
''' XMODEM Protocol bytes ===================== .. data:: SOH Indicates a packet length of 128 (X/Y) .. data:: STX Indicates a packet length of 1024 (X/Y) .. data:: EOT End of transmission (X/Y) .. data:: ACK Acknowledgement (X/Y) .. data:: XON Enable out of band flow control (Z) .. data:: XOFF Disable out of band flow control (Z) .. data:: NAK Negative acknowledgement (X/Y) .. data:: CAN Cancel (X/Y) .. data:: CRC Cyclic redundancy check (X/Y) ZMODEM Protocol bytes ===================== .. data:: TIMEOUT Timeout or invalid data. .. data:: ZPAD Pad character; frame begins .. data:: ZDLE Escape sequence .. data:: ZDLEE Escaped ``ZDLE`` .. data:: ZBIN, ZVBIN Binary frame indicator (using CRC16) .. data:: ZHEX, ZVHEX Hex frame indicator (using CRC16) .. data:: ZBIN32, ZVBIN32 Binary frame indicator (using CRC32) .. data:: ZBINR32, ZVBINR32 Run length encoded binary frame (using CRC32) .. data:: ZRESC Run length encoding flag or escape character ZMODEM Frame types ================== .. data:: ZRQINIT Request receive init (s->r) .. data:: ZRINIT Receive init (r->s) .. data:: ZSINIT Send init sequence (optional) (s->r) .. data:: ZACK Ack to ZRQINIT ZRINIT or ZSINIT (s<->r) .. data:: ZFILE File name (s->r) .. data:: ZSKIP Skip this file (r->s) .. data:: ZNAK Last packet was corrupted (?) .. data:: ZABORT Abort batch transfers (?) .. data:: ZFIN Finish session (s<->r) .. data:: ZRPOS Resume data transmission here (r->s) .. data:: ZDATA Data packet(s) follow (s->r) .. data:: ZEOF End of file reached (s->r) .. data:: ZFERR Fatal read or write error detected (?) .. data:: ZCRC Request for file CRC and response (?) .. data:: ZCHALLENGE Security challenge (r->s) .. data:: ZCOMPL Request is complete (?) .. data:: ZCAN Pseudo frame; other end cancelled session with 5* CAN .. data:: ZFREECNT Request free bytes on file system (s->r) .. data:: ZCOMMAND Issue command (s->r) .. data:: ZSTDERR Output data to stderr (??) ZMODEM ZDLE sequences ===================== .. data:: ZCRCE CRC next, frame ends, header packet follows .. data:: ZCRCG CRC next, frame continues nonstop .. data:: ZCRCQ CRC next, frame continuous, ZACK expected .. data:: ZCRCW CRC next, ZACK expected, end of frame .. data:: ZRUB0 Translate to rubout 0x7f .. data:: ZRUB1 Translate to rubout 0xff ZMODEM receiver capability flags ================================ .. data:: CANFDX Receiver can send and receive true full duplex .. data:: CANOVIO Receiver can receive data during disk I/O .. data:: CANBRK Receiver can send a break signal .. data:: CANCRY Receiver can decrypt .. data:: CANLZW Receiver can uncompress .. data:: CANFC32 Receiver can use 32 bit Frame Check .. data:: ESCCTL Receiver expects ctl chars to be escaped .. data:: ESC8 Receiver expects 8th bit to be escaped ZMODEM ZRINIT frame =================== .. data:: ZF0_CANFDX Receiver can send and receive true full duplex .. data:: ZF0_CANOVIO Receiver can receive data during disk I/O .. data:: ZF0_CANBRK Receiver can send a break signal .. data:: ZF0_CANCRY Receiver can decrypt DONT USE .. data:: ZF0_CANLZW Receiver can uncompress DONT USE .. data:: ZF0_CANFC32 Receiver can use 32 bit Frame Check .. data:: ZF0_ESCCTL Receiver expects ctl chars to be escaped .. data:: ZF0_ESC8 Receiver expects 8th bit to be escaped .. data:: ZF1_CANVHDR Variable headers OK ZMODEM ZSINIT frame =================== .. data:: ZF0_TESCCTL Transmitter expects ctl chars to be escaped .. data:: ZF0_TESC8 Transmitter expects 8th bit to be escaped ''' SOH = bytes([0x01]) STX = bytes([0x02]) EOT = bytes([0x04]) ACK = bytes([0x06]) XON = bytes([0x11]) XOFF = bytes([0x13]) NAK = bytes([0x15]) CAN = bytes([0x18]) CRC = bytes([0x43]) TIMEOUT = None ZPAD = 0x2a ZDLE = 0x18 ZDLEE = 0x58 ZBIN = 0x41 ZHEX = 0x42 ZBIN32 = 0x43 ZBINR32 = 0x44 ZVBIN = 0x61 ZVHEX = 0x62 ZVBIN32 = 0x63 ZVBINR32 = 0x64 ZRESC = 0x7e # ZMODEM Frame types ZRQINIT = 0x00 ZRINIT = 0x01 ZSINIT = 0x02 ZACK = 0x03 ZFILE = 0x04 ZSKIP = 0x05 ZNAK = 0x06 ZABORT = 0x07 ZFIN = 0x08 ZRPOS = 0x09 ZDATA = 0x0a ZEOF = 0x0b ZFERR = 0x0c ZCRC = 0x0d ZCHALLENGE = 0x0e ZCOMPL = 0x0f ZCAN = 0x10 ZFREECNT = 0x11 ZCOMMAND = 0x12 ZSTDERR = 0x13 # ZMODEM ZDLE sequences ZCRCE = 0x68 ZCRCG = 0x69 ZCRCQ = 0x6a ZCRCW = 0x6b ZRUB0 = 0x6c ZRUB1 = 0x6d # ZMODEM Receiver capability flags CANFDX = 0x01 CANOVIO = 0x02 CANBRK = 0x04 CANCRY = 0x08 CANLZW = 0x10 CANFC32 = 0x20 ESCCTL = 0x40 ESC8 = 0x80 # ZMODEM ZRINIT frame ZF0_CANFDX = 0x01 ZF0_CANOVIO = 0x02 ZF0_CANBRK = 0x04 ZF0_CANCRY = 0x08 ZF0_CANLZW = 0x10 ZF0_CANFC32 = 0x20 ZF0_ESCCTL = 0x40 ZF0_ESC8 = 0x80 ZF1_CANVHDR = 0x01 # ZMODEM ZSINIT frame ZF0_TESCCTL = 0x40 ZF0_TESC8 = 0x80 # ZMODEM Byte positions within header array ZF0, ZF1, ZF2, ZF3 = range(4, 0, -1) ZP0, ZP1, ZP2, ZP3 = range(1, 5) # ZMODEM Frame contents ENDOFFRAME = 0x50 FRAMEOK = 0x51 TIMEOUT = -1 # Rx routine did not receive a character within timeout INVHDR = -2 # Invalid header received; but within timeout INVDATA = -3 # Invalid data subpacket received ZDLEESC = 0x8000 # One of ZCRCE/ZCRCG/ZCRCQ/ZCRCW was ZDLE escaped # MODEM Protocol types PROTOCOL_XMODEM = 0x00 PROTOCOL_XMODEMCRC = 0x01 PROTOCOL_XMODEM1K = 0x02 PROTOCOL_YMODEM = 0x03 PROTOCOL_ZMODEM = 0x04 PACKET_SIZE = { PROTOCOL_XMODEM: 128, PROTOCOL_XMODEMCRC: 128, PROTOCOL_XMODEM1K: 1024, PROTOCOL_YMODEM: 1024, PROTOCOL_ZMODEM: 1024, } # CRC tab calculated by Mark G. Mendel, Network Systems Corporation CRC16_MAP = [ 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0, ] # CRC tab calculated by Gary S. Brown CRC32_MAP = [ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d ]
km = float(input('Qual a distância da viagem? ')) print('Você está prestes a começar uma viagem de {}Km.') if km < 200: print('Você deverá pagar R${}'.format(km * 0.5)) else: print('Você deverá pagar R${}'.format(km * 0.45))
def countingSort(arr): n = len(arr) max_of_arr = max(arr) count = [0 for i in range(max_of_arr+1)] for i in arr: count[i] += 1 ind = 0 for i in range(max_of_arr+1): c = count[i] while c: arr[ind] = i ind += 1 c -= 1 return arr n = int(input("Enter the size of array : ")) arr = list(map(int, input("Enter the array elements :\n").strip().split()))[:n] print("Array entered") print(arr) countingSort(arr) print("Array after sorting the elements") print(arr)
class VendoringError(Exception): """Errors originating from this package.""" class ConfigurationError(VendoringError): """Errors related to configuration handling.""" class RequirementsError(VendoringError): """Errors related to requirements.txt handling."""
# data config trainroot = '/data2/dataset/ICD15/train' testroot = '/data2/dataset/ICD15/test' output_dir = 'output/east_icd15' data_shape = 512 # train config gpu_id = '2' workers = 12 start_epoch = 0 epochs = 600 lr = 0.0001 lr_decay_step = 10000 lr_gamma = 0.94 train_batch_size_per_gpu = 14 init_type = 'xavier' display_interval = 10 show_images_interval = 50 pretrained = True restart_training = True checkpoint = '' seed = 2
n1 = float(input('Digite o primeiro valor: ')) n2 = float(input('Digite o segundo valor: ')) opcao = 0 while opcao != 5: print(''' [1] Somar [2] Multiplicar [3] Maior [4] Novos números [5] Sair do programa''') opcao = int(input('Digite a opção desejada: ')) if opcao == 1: soma = n1 + n2 print('A soma entre {} e {} vale {}'.format(n1, n2, soma)) elif opcao == 2: produto = n1 * n2 print('O produto entre {} e {} vale {}'.format(n1, n2, produto)) elif opcao == 3: if n1 > n2: maior = n1 print('O maior número entre {} e {} é {}'.format(n1, n2, maior)) elif n1 == n2: print('Não existe número maior') else: maior = n2 print('O maior número entre {} e {} é {}'.format(n1, n2, maior)) elif opcao == 4: n1 = float(input('Digite o primeiro valor: ')) n2 = float(input('Digite o segundo valor: ')) elif opcao == 5: print('Finalizando...') else: print('Opção inválida, tente novamente')
""" Module: motiv.version Description: contains constants defining the package version Note: - In case of a bugfix/hotfix increment BUILD_NUMBER - In case of adding a feature that modifies the package, but does not break interfaces, increment VERSION_MINOR - In case of introducing a change that breaks backward-comptability, increment VERSION_MAJOR """ def get_version(): VERSION_MAJOR = 0 VERSION_MINOR = 1 BUILD_NUMBER = 1 VERSION = f"{VERSION_MAJOR}.{VERSION_MINOR}.{BUILD_NUMBER}" return VERSION __version__ = get_version() __all__ = ['__version__']
"""Defines current AXT versions and dependencies. Ensure UsageTrackerRegistry is updated accordingly when incrementing version numbers. """ # AXT versions RUNNER_VERSION = "1.4.1-alpha03" # stable 1.4.0 RULES_VERSION = "1.4.1-alpha03" # stable 1.4.0 MONITOR_VERSION = "1.5.0-rc01" # stable 1.4.0 ESPRESSO_VERSION = "3.5.0-alpha03" # stable 3.4.0 CORE_VERSION = "1.4.1-alpha03" # stable 1.4.0 ANDROIDX_JUNIT_VERSION = "1.1.4-alpha03" # stable 1.1.3 ANDROIDX_TRUTH_VERSION = "1.5.0-alpha03" # stable 1.4.0 UIAUTOMATOR_VERSION = "2.2.0" JANK_VERSION = "1.0.1" SERVICES_VERSION = "1.4.1-rc01" # stable 1.4.0 ORCHESTRATOR_VERSION = "1.4.1-rc01" # stable 1.4.0 ANNOTATION_VERSION = "1.0.0-rc01" # Maven dependency versions ANDROIDX_ANNOTATION_VERSION = "1.2.0" ANDROIDX_ANNOTATION_EXPERIMENTAL_VERSION = "1.1.0" ANDROIDX_COMPAT_VERSION = "1.3.1" ANDROIDX_CONCURRENT_VERSION = "1.1.0" ANDROIDX_CORE_VERSION = "1.6.0" ANDROIDX_FRAGMENT_VERSION = "1.3.6" ANDROIDX_CURSOR_ADAPTER_VERSION = "1.0.0" ANDROIDX_DRAWER_LAYOUT_VERSION = "1.1.1" ANDROIDX_LEGACY_SUPPORT_VERSION = "1.0.0" ANDROIDX_LIFECYCLE_VERSION = "2.3.1" ANDROIDX_MULTIDEX_VERSION = "2.0.0" ANDROIDX_RECYCLERVIEW_VERSION = "1.2.1" TRACING_VERSION = "1.0.0" ANDROIDX_VIEWPAGER_VERSION = "1.0.0" GOOGLE_MATERIAL_VERSION = "1.4.0" KOTLIN_VERSION = "1.5.31" # accessibilitytestframework ATF_VERSION = "3.1.2" JUNIT_VERSION = "4.13.2" HAMCREST_VERSION = "1.3" TRUTH_VERSION = "1.1.3" GUAVA_VERSION = "30.1.1-android" GUAVA_LISTENABLEFUTURE_VERSION = "1.0"
SERVER_HOST_1 = "127.0.0.1" SERVER_PORT_1 = 2779 SERVER_HOST_2 = "127.0.0.1" SERVER_PORT_2 = 2775
class Texture(object): def __init__(self): self.file_path = None self.file = None self.data = None def read(self, files): for file_path in files: self.file_path = file_path self.file = open(self.file_path, "rb") self.data = self.file.read() break # print 'tex', self.file_path if self.file is not None: self.file.close() def write(self, data): self.file = open(self.file_path, "wb") # print 'Writing', self.file_path self.file.write(data) self.file.close()
class Flight: counter = 1 def __init__(self, origin, destination, duration): # Keep track of id number self.id = Flight.counter Flight.counter += 1 # Keep track of passengers self.passengers = [] # Details about flight self.origin = origin self.destination = destination self.duration = duration def print_info(self): print(f"Flight origin: {self.origin}") print(f"Flight destination: {self.destination}") print(f"Flight duration: {self.duration}") print(f"Flight id: {self.id}") print() print("passengers:") for passenger in self.passengers: print(f"{passenger.name}") def delay(self, amount): self.duration += amount def add_passenger(self, p): self.passengers.append(p) p.flight_id = self.id class Passenger: def __init__(self, name): self.name = name def main(): # Create Flight f1 = Flight(origin="New York", destination="Paris", duration=540) # Create passengers alice = Passenger(name="Alice") bob = Passenger(name="Bob") f1.add_passenger(alice) f1.add_passenger(bob) f1.print_info() if __name__ == '__main__': main()
# Super Hero class Hero: def __init__(self, gender, age): self.gender = gender self.age = age self.poderes = [""] self.debilidad = [""] def __str__(self): return f'Mi Super Heroe es {self.gender} y tiene {self.age} años de edad con los siguientes poderes: {"".join(self.poderes[:-1])} y {self.poderes[-1]}, y su debilidad es {self.debilidad[-1]}' # Concrete Builder (Builder) class HeroBuilder(): def __init__(self, gender, age): self.hero = Hero(gender, age) def addVolar(self): self.hero.poderes.append("volar") def addSfuerza(self): self.hero.poderes.append("super fuerza") def addVlaser(self): self.hero.poderes.append("vision laser") def addSvel(self): self.hero.poderes.append("super velocidad") def addProca(self): self.hero.poderes.append("piel roca") def addTelepatia(self): self.hero.poderes.append("telepatia") def addFuego(self): self.hero.debilidad.append("fuego") def addKripto(self): self.hero.debilidad.append("kriptonita") def addElectricidad(self): self.hero.debilidad.append("electricidad") def addHielo(self): self.hero.debilidad.append("hielo") def addBplata(self): self.hero.debilidad.append("balas de plata") def build(self): return self.hero
### Model Architecture hyper parameters embedding_size = 32 # sequence_length = 500 sequence_length = 33 LSTM_units = 128 ### Training parameters batch_size = 64 epochs = 20 ### Preprocessing parameters # words that occur less than n times to be deleted from dataset N = 10 # test size in ratio, train size is 1 - test_size test_size = 0.2
result = 0 def solution(numbers, target): findNum(numbers, 0, 0, target) return result def findNum(numbers, index, acc, target): global result if len(numbers) == index: if acc == target: result += 1 return num = numbers[index] findNum(numbers, index + 1, acc - num, target) findNum(numbers, index + 1, acc + num, target) print(solution([1, 1, 1, 1, 1], 3))
soma = 0 quant = 0 while True: num = int(input('Digite um número: ')) if num == 999: break quant = quant + 1 soma = soma + num print(f'Você digitou {quant} números e a soma entre eles foi {soma}.')
def find_the_secret(f): for x in f.__code__.co_consts: if isinstance(x,str) and len(x) == 32: return x return ''
def swap(arr,i,j): arr[i],arr[j] = arr[j],arr[i] def partition(arr,l,r): pivot = arr[r] i = l-1 j = l for j in range(l,r): if arr[j] < pivot: i+=1 swap(arr,i,j) i+=1 swap(arr,i,r) return i def quickSort(arr,l,r): if l<r : newIndex = partition(arr,l,r) quickSort(arr,newIndex+1,r) quickSort(arr,l,newIndex-1) arr = [-2,3,4,1,5,0] print("Before:",arr) quickSort(arr,0,len(arr)-1) print('After :',arr)
# app config APP_CONFIG=dict( SECRET_KEY="SECRET", WTF_CSRF_SECRET_KEY="SECRET", # Webservice config WS_URL="http://localhost:5057", # ws del modello in locale DATASET_REQ = "/dataset", OPERATIVE_CENTERS_REQ = "/operative-centers", OC_DATE_REQ = "/oc-date", OC_DATA_REQ = "/oc-data", PREDICT_REQ = "/predict", DATA_CHARSET ='ISO-8859-1' ) # Application domain config
class Solution: def bestTeamScore(self, scores: List[int], ages: List[int]) -> int: """ TLE at the 132/148 test cases """ age_score = [(age, score) for age, score in zip(ages, scores)] age_score.sort(key = lambda x: x) age_score.append((0, 0)) # an artificial point as boundary @functools.lru_cache(maxsize=None) def dfs(curr_index, last_index): if curr_index == len(scores): return 0 last_age, last_score = age_score[last_index] curr_age, curr_score = age_score[curr_index] max_score = 0 if curr_age == last_age or curr_score >= last_score: # can add this person to the current team option1 = curr_score + dfs(curr_index+1, curr_index) max_score = max(max_score, option1) # skip this person option2 = dfs(curr_index+1, last_index) max_score = max(max_score, option2) #print(curr_index, last_index, max_score) return max_score return dfs(0, len(scores)) class Solution: def bestTeamScore(self, scores: List[int], ages: List[int]) -> int: """ Another TLE solution """ age_score = [(age, score) for age, score in zip(ages, scores)] age_score.sort(key = lambda x: x) age_score.append((0, 0)) # an artificial point as boundary dp = dict() N = len(scores) for last_index in range(N+1): dp[(N, last_index)] = 0 last_index = N for curr_index in range(N-1, -1, -1): for last_index in range(N, -1, -1): last_age, last_score = age_score[last_index] curr_age, curr_score = age_score[curr_index] max_score = 0 if curr_age == last_age or curr_score >= last_score: # can add this person to the current team option1 = curr_score + dp[(curr_index+1, curr_index)] max_score = max(max_score, option1) # skip this person option2 = dp[(curr_index+1, last_index)] max_score = max(max_score, option2) dp[(curr_index, last_index)] = max_score return dp[(0, N)] class Solution: def bestTeamScore(self, scores: List[int], ages: List[int]) -> int: age_score = [(age, score) for age, score in zip(ages, scores)] age_score.sort(key = lambda x: x) N = len(scores) # dp[i]: maximum score for a team # including "i" with all other possible members before ith element dp = [0] * N global_max = 0 for curr_index in range(0, N): curr_age, curr_score = age_score[curr_index] max_score = curr_score for prev_index in range(0, curr_index): prev_age, prev_score = age_score[prev_index] if prev_score <= curr_score: max_score = max(max_score, curr_score + dp[prev_index]) dp[curr_index] = max_score global_max = max(global_max, max_score) return global_max
def sum(num1, num2): """ This function takes the sum of two numbers. Paramaters ---------- num1, float A number. num2, float A number. """ return num1 + num2 def product(num1, num2): """ This function takes the product of two numbers. """ return num1 * num2
__all__ = ['__version__'] # major, minor, patch version_info = 1, 4, 0 # suffix suffix = None # version string __version__ = '.'.join(map(str, version_info)) + (f'.{suffix}' if suffix else '')
#percorrendo itens do dicionario com for dicionario = {'chave1':'valor1','chave2':'valor2','chave3':3} for a,b in dicionario.items(): print(a,b)
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = 'default', kineticsEstimator = 'rate rules', ) # List of species species( label='ethane', reactive=True, structure=SMILES("CC"), ) species( label='O2', reactive=True, structure=SMILES('[O][O]') ) species( label='N2', reactive=False, structure=SMILES('N#N'), ) # Reaction systems simpleReactor( temperature=[(1000,'K'),(1500,'K')], pressure=[(1.0,'bar'),(10.0,'bar')], nSims=3, initialMoleFractions={ "ethane": [0.05,0.15], "O2": 0.1, "N2": 0.9, }, terminationConversion={ 'ethane': 0.1, }, terminationTime=(1e1,'s'), balanceSpecies = "N2", ) simulator( atol=1e-16, rtol=1e-8, ) model( toleranceKeepInEdge=0.001, toleranceMoveToCore=0.01, toleranceInterruptSimulation=1e8, maximumEdgeSpecies=20, filterReactions=True, minCoreSizeForPrune=5, ) options( units='si', generateOutputHTML=False, generatePlots=False, saveEdgeSpecies=False, saveSimulationProfiles=False, )
#BEGIN_HEADER #END_HEADER class pranjan77ContigFilter: ''' Module Name: pranjan77ContigFilter Module Description: A KBase module: pranjan77ContigFilter ''' ######## WARNING FOR GEVENT USERS ####### # Since asynchronous IO can lead to methods - even the same method - # interrupting each other, you must be *very* careful when using global # state. A method could easily clobber the state set by another while # the latter method is running. ######################################### #BEGIN_CLASS_HEADER #END_CLASS_HEADER # config contains contents of config file in a hash or None if it couldn't # be found def __init__(self, config): #BEGIN_CONSTRUCTOR #END_CONSTRUCTOR pass
# The sum of the squares of the first ten natural numbers is, # 1^2 + 2^2 + ... + 10^2 = 385 # The square of the sum of the first ten natural numbers is, # (1 + 2 + ... + 10)^2 = 55^2 = 3025 # Hence the difference between the sum of the squares of the first ten natural # numbers and the square of the sum is 3025 − 385 = 2640. # Find the difference between the sum of the squares of the first one hundred # natural numbers and the square of the sum. max = 100 sumsquare = 0 squaresum = (max * (max + 1) / 2) ** 2 for i in range(max+1): sumsquare += i ** 2 print(squaresum - sumsquare)
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyPandas(PythonPackage): """pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming language.""" homepage = "https://pandas.pydata.org/" pypi = "pandas/pandas-1.2.0.tar.gz" maintainers = ['adamjstewart'] version('1.3.5', sha256='1e4285f5de1012de20ca46b188ccf33521bff61ba5c5ebd78b4fb28e5416a9f1') version('1.3.4', sha256='a2aa18d3f0b7d538e21932f637fbfe8518d085238b429e4790a35e1e44a96ffc') version('1.3.3', sha256='272c8cb14aa9793eada6b1ebe81994616e647b5892a370c7135efb2924b701df') version('1.3.2', sha256='cbcb84d63867af3411fa063af3de64902665bb5b3d40b25b2059e40603594e87') version('1.3.1', sha256='341935a594db24f3ff07d1b34d1d231786aa9adfa84b76eab10bf42907c8aed3') version('1.3.0', sha256='c554e6c9cf2d5ea1aba5979cc837b3649539ced0e18ece186f055450c86622e2') version('1.2.5', sha256='14abb8ea73fce8aebbb1fb44bec809163f1c55241bcc1db91c2c780e97265033') version('1.2.4', sha256='649ecab692fade3cbfcf967ff936496b0cfba0af00a55dfaacd82bdda5cb2279') version('1.2.3', sha256='df6f10b85aef7a5bb25259ad651ad1cc1d6bb09000595cab47e718cbac250b1d') version('1.2.2', sha256='14ed84b463e9b84c8ff9308a79b04bf591ae3122a376ee0f62c68a1bd917a773') version('1.2.1', sha256='5527c5475d955c0bc9689c56865aaa2a7b13c504d6c44f0aadbf57b565af5ebd') version('1.2.0', sha256='e03386615b970b8b41da6a68afe717626741bb2431cec993640685614c0680e4') version('1.1.5', sha256='f10fc41ee3c75a474d3bdf68d396f10782d013d7f67db99c0efbfd0acb99701b') version('1.1.4', sha256='a979d0404b135c63954dea79e6246c45dd45371a88631cdbb4877d844e6de3b6') version('1.1.3', sha256='babbeda2f83b0686c9ad38d93b10516e68cdcd5771007eb80a763e98aaf44613') version('1.1.2', sha256='b64ffd87a2cfd31b40acd4b92cb72ea9a52a48165aec4c140e78fd69c45d1444') version('1.1.1', sha256='53328284a7bb046e2e885fd1b8c078bd896d7fc4575b915d4936f54984a2ba67') version('1.1.0', sha256='b39508562ad0bb3f384b0db24da7d68a2608b9ddc85b1d931ccaaa92d5e45273') version('1.0.5', sha256='69c5d920a0b2a9838e677f78f4dde506b95ea8e4d30da25859db6469ded84fa8') version('1.0.4', sha256='b35d625282baa7b51e82e52622c300a1ca9f786711b2af7cbe64f1e6831f4126') version('1.0.3', sha256='32f42e322fb903d0e189a4c10b75ba70d90958cc4f66a1781ed027f1a1d14586') version('1.0.2', sha256='76334ba36aa42f93b6b47b79cbc32187d3a178a4ab1c3a478c8f4198bcd93a73') version('1.0.1', sha256='3c07765308f091d81b6735d4f2242bb43c332cc3461cae60543df6b10967fe27') version('1.0.0', sha256='3ea6cc86931f57f18b1240572216f09922d91b19ab8a01cf24734394a3db3bec') version('0.25.3', sha256='52da74df8a9c9a103af0a72c9d5fdc8e0183a90884278db7f386b5692a2220a4') version('0.25.2', sha256='ca91a19d1f0a280874a24dca44aadce42da7f3a7edb7e9ab7c7baad8febee2be') version('0.25.1', sha256='cb2e197b7b0687becb026b84d3c242482f20cbb29a9981e43604eb67576da9f6') version('0.25.0', sha256='914341ad2d5b1ea522798efa4016430b66107d05781dbfe7cf05eba8f37df995') version('0.24.2', sha256='4f919f409c433577a501e023943e582c57355d50a724c589e78bc1d551a535a2') version('0.24.1', sha256='435821cb2501eabbcee7e83614bd710940dc0cf28b5afbc4bdb816c31cec71af') version('0.23.4', sha256='5b24ca47acf69222e82530e89111dd9d14f9b970ab2cd3a1c2c78f0c4fbba4f4') version('0.21.1', sha256='c5f5cba88bf0659554c41c909e1f78139f6fce8fa9315a29a23692b38ff9788a') version('0.20.0', sha256='54f7a2bb2a7832c0446ad51d779806f07ec4ea2bb7c9aea4b83669fa97e778c4') version('0.19.2', sha256='6f0f4f598c2b16746803c8bafef7c721c57e4844da752d36240c0acf97658014') version('0.19.0', sha256='4697606cdf023c6b7fcb74e48aaf25cf282a1a00e339d2d274cf1b663748805b') version('0.18.0', sha256='c975710ce8154b50f39a46aa3ea88d95b680191d1d9d4b5dd91eae7215e01814') version('0.16.1', sha256='570d243f8cb068bf780461b9225d2e7bef7c90aa10d43cf908fe541fc92df8b6') version('0.16.0', sha256='4013de6f8796ca9d2871218861823bd9878a8dfacd26e08ccf9afdd01bbad9f1') # Required dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#dependencies depends_on('[email protected]:', type=('build', 'run'), when='@1.2:') depends_on('[email protected]:', type=('build', 'run'), when='@1:') depends_on('[email protected]:', type=('build', 'run'), when='@0.25:') # https://pandas.pydata.org/docs/whatsnew/v1.0.0.html#build-changes depends_on('[email protected]:2', type='build', when='@1:') depends_on('[email protected]:2', type='build', when='@1.1:') depends_on('[email protected]:2', type='build', when='@1.1.3:') depends_on('[email protected]:2', type='build', when='@1.3.4:') depends_on('[email protected]:', type='build') depends_on('[email protected]:', type='build', when='@1.3:') depends_on('[email protected]:', type='build', when='@1.3.2:') depends_on('py-numpy', type=('build', 'run')) # 'NUMPY_IMPORT_ARRAY_RETVAL' was removed in [email protected] depends_on('py-numpy@:1.18', type=('build', 'run'), when='@:0.25') depends_on('[email protected]:', type=('build', 'run'), when='@0.25:') depends_on('[email protected]:', type=('build', 'run'), when='@1.1:') depends_on('[email protected]:', type=('build', 'run'), when='@1.2:') depends_on('[email protected]:', type=('build', 'run'), when='@1.3:') depends_on('py-python-dateutil', type=('build', 'run')) depends_on('[email protected]:', type=('build', 'run'), when='@0.25:') depends_on('[email protected]:', type=('build', 'run'), when='@1.1:') depends_on('[email protected]:', type=('build', 'run')) depends_on('[email protected]:', type=('build', 'run'), when='@1.2:') # Recommended dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#recommended-dependencies depends_on('py-numexpr', type=('build', 'run')) depends_on('[email protected]:', type=('build', 'run'), when='@0.25:') depends_on('[email protected]:', type=('build', 'run'), when='@1.2:') depends_on('[email protected]:', type=('build', 'run'), when='@1.3:') depends_on('py-bottleneck', type=('build', 'run')) depends_on('[email protected]:', type=('build', 'run'), when='@0.25:') # Optional dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies @property def import_modules(self): modules = super(PythonPackage, self).import_modules ignored_imports = ["pandas.tests", "pandas.plotting._matplotlib"] return [i for i in modules if not any(map(i.startswith, ignored_imports))]
""" Module with useful utilities. """ def escape_double_quotes(name): escaped_name = name.replace('"', '""') quoted_name = f'"{escaped_name}"' return quoted_name
a = float( input('give a number: ') ) b = float( input('give a number: ') ) print(a, '+', b, '=', a+b) print(a, '-', b, '=', a-b) print(a, '*', b, '=', a*b) print(a, '/', b, '=', a/b)
class Menu: """ ## Steak N' Shake helpers with OOP This is a subset of Steak N' Shake menu that covers a. Burgers b. Chili Intallation: pip install -i https://test.pypi.org/simple/ Order Imports: from helper.menu import Burger, Chili, Menu Menu Methods: a. Add price of any two available items print(c1 + b2) b. Number of Products available print (Menu.num_of_products) c. Computes discounted price print (b2.apply_discount()) """ # class variables num_of_products = 0 discount = 0.95 def __init__(self, name, price, calory): self.name = name self.price = price self.calory = calory Menu.num_of_products += 1 # dunder method to add any two available items' prices def __add__(self, other): return self.price + other.price class Burger(Menu): """ class Burger inherits Menu attributes and class variables. Burger Methods: a. apply_discount(self) # function where potential discount can be applied b. burger_type(self) # function describing burger type, price and calories Sample results: print (b1.burger_type()) print(b2.price) print(b2.name) print(b4.lettuce) """ def __init__(self, name, price, calory, lettuce): super(). __init__(name, price, calory) self.lettuce = lettuce # function describing burger type, price and calories def burger_type(self): return '{} {} {} {} {}'. format(self.name, '$', self.price, self.calory, 'cal') # function where potential discount can be applied def apply_discount(self): self.price = float(self.price * self.discount) return '{} {}'. format('Discounted price is: $', self.price) # Function whether it has lettuce or not def with_lettuce(self): if self.lettuce is True: return "This burger has lettuce." else: return "This burger does not have lettuce." class Chili(Menu): """ class Chili inherits Menu attributes and class variables. Chili Methods: a. chili_type(self) # function describing chili type, price, calories, cheese content Sample results: print (c1.chili_type()) print(c2.price) print(c2.name) print(c4.cheese) """ def __init__(self, name, price, calory, cheese): super(). __init__(name, price, calory) self.cheese = cheese # function describing chili type, price and calories def chili_type(self): return '{} {} {} {} {}'. format(self.name, '$', self.price, self.calory, 'cal') if __name__ == "__main__": #Chili Instances c1 = Chili('Chili Mac', 4.49, 1200, 'With Cheese') c2 = Chili('Chili Mac Supreme', 4.99, 1410, 'No Cheese') c3 = Chili('Chili 3-Way', 4.99, 710, 'With Cheese') c4 = Chili('Chili 5- Way', 4.99, 1160, 'With Cheese') c5 = Chili('Genuine Chili', 4.99, 550, 'No Cheese') c6 = Chili('Chili Deluxe', 4.99, 1000, 'With Cheese') # Burger instances b1 = Burger('Pork Belly Double', 6.49, 740, True) b2 = Burger('Original Double n Cheese', 3.99, 770, True) b3 = Burger('Single n Cheese', 3.79, 630, False) b4 = Burger('Triple Steakburger n Fries', 3.99, 850, False) b5 = Burger('Frisco Melt n Fries', 5.49, 1200, True) # Sample results print(b1.burger_type()) print(b2.price) print (b2.apply_discount()) print (Menu.num_of_products) print (c1.chili_type()) print(c2.price) print ('Price of two items is ' , c2 + b1) print (c2.cheese)
# These are all the settings that are specific to a jurisdiction ############################### # These settings are required # ############################### OCD_JURISDICTION_ID = 'ocd-jurisdiction/country:us/state:il/place:chicago/government' OCD_CITY_COUNCIL_ID = 'ocd-organization/ef168607-9135-4177-ad8e-c1f7a4806c3a' CITY_COUNCIL_NAME = 'Sacramento City Council' LEGISLATIVE_SESSIONS = ['2007', '2011', '2015'] # the last one in this list should be the current legislative session CITY_NAME = 'Chicago' CITY_NAME_SHORT = 'Chicago' # VOCAB SETTINGS FOR FRONT-END DISPLAY CITY_VOCAB = { 'MUNICIPAL_DISTRICT': 'Ward', # e.g. 'District' 'SOURCE': 'Chicago City Clerk', 'COUNCIL_MEMBER': 'Alderman', # e.g. 'Council Member' 'COUNCIL_MEMBERS': 'Aldermen', # e.g. 'Council Members' 'EVENTS': 'Meetings', # label for the events listing, e.g. 'Events' } APP_NAME = 'city' ######################### # The rest are optional # ######################### # this is for populating meta tags SITE_META = { 'site_name' : '', # e.g. 'Chicago Councilmatc' 'site_desc' : '', # e.g. 'City Council, demystified. Keep tabs on Chicago legislation, aldermen, & meetings.' 'site_author' : '', # e.g. 'DataMade' 'site_url' : '', # e.g. 'https://chicago.councilmatic.org' 'twitter_site': '', # e.g. '@DataMadeCo' 'twitter_creator': '', # e.g. '@DataMadeCo' } LEGISTAR_URL = '' # e.g. 'https://chicago.legistar.com/Legislation.aspx' # this is for the boundaries of municipal districts, to add # shapes to posts & ultimately display a map with the council # member listing. the boundary set should be the relevant # slug from the ocd api's boundary service # available boundary sets here: http://ocd.datamade.us/boundary-sets/ BOUNDARY_SET = '' # e.g. 'chicago-wards-2015' # this is for configuring a map of council districts using data from the posts # set MAP_CONFIG = None to hide map MAP_CONFIG = { 'center': [41.8369, -87.6847], 'zoom': 10, 'color': "#54afe8", 'highlight_color': "#C00000", } FOOTER_CREDITS = [ { 'name': '', # e.g. 'DataMade' 'url': '', # e.g. 'http://datamade.us' 'image': '', # e.g. 'datamade-logo.png' }, ] # this is the default text in search bars SEARCH_PLACEHOLDER_TEXT = '' # e.g. 'police, zoning, O2015-7825, etc.' # these should live in APP_NAME/static/ IMAGES = { 'favicon': 'images/favicon.ico', 'logo': 'images/logo.png', } # THE FOLLOWING ARE VOCAB SETTINGS RELEVANT TO DATA MODELS, LOGIC # (this is diff from VOCAB above, which is all for the front end) # this is the name of the meetings where the entire city council meets # as stored in legistar CITY_COUNCIL_MEETING_NAME = 'City Council' # this is the name of the role of committee chairs, e.g. 'CHAIRPERSON' or 'Chair' # as stored in legistar # if this is set, committees will display chairs COMMITTEE_CHAIR_TITLE = 'Chairman' # this is the anme of the role of committee members, # as stored in legistar COMMITTEE_MEMBER_TITLE = 'Member' # this is for convenience, & used to populate a table # describing legislation types on the default about page template LEGISLATION_TYPE_DESCRIPTIONS = [ { 'name': 'Ordinance', 'search_term': 'Ordinance', 'fa_icon': 'file-text-o', 'html_desc': True, 'desc': '', }, { 'name': 'Claim', 'search_term': 'Claim', 'fa_icon': 'dollar', 'html_desc': True, 'desc': '', }, ] # these keys should match committee slugs COMMITTEE_DESCRIPTIONS = { # e.g. "committee-on-aviation" : "The Committee on Aviation has jurisdiction over matters relating to aviation and airports.", } # these blurbs populate the wells on the committees, events, & council members pages ABOUT_BLURBS = { "COMMITTEES" : "", "EVENTS": "", "COUNCIL_MEMBERS": "", } # these override the headshots that are automatically populated # the keys should match a person's slug MANUAL_HEADSHOTS = { # e.g. 'emanuel-rahm': {'source': 'cityofchicago.org', 'image': 'manual-headshots/emanuel-rahm.jpg' }, } # notable positions that aren't district representatives, e.g. mayor & city clerk # keys should match person slugs EXTRA_TITLES = { # e.g. 'emanuel-rahm': 'Mayor', }
"""***************************************************************************** * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * responsibility to comply with third party license terms applicable to your * use of third party software (including open source software) that may * accompany Microchip software. * * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A * PARTICULAR PURPOSE. * * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. *****************************************************************************""" ################################################################################ #### Register Information #### ################################################################################ cmpValGrp_CMx_CON_CCH = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/value-group@[name="CM1CON__CCH"]') cmpValGrp_CMx_CON_CREF = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/value-group@[name="CM1CON__CREF"]') cmpValGrp_CMx_CON_EVPOL = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/value-group@[name="CM1CON__EVPOL"]') cmpBitFld_CMSTAT_SIDL = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CMSTAT"]/bitfield@[name="SIDL"]') cmpBitFld_CMx_CON_CCH = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="CCH"]') cmpBitFld_CMx_CON_CREF = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="CREF"]') cmpBitFld_CMx_CON_EVPOL = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="EVPOL"]') cmpBitFld_CMx_CON_AMPMOD = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="AMPMOD"]') cmpBitFld_CMx_CON_OAO = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="OAO"]') cmpBitFld_CMx_CON_CPOL = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="CPOL"]') cmpBitFld_CMx_CON_COE = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1CON"]/bitfield@[name="COE"]') if( ("PIC32MK" in Variables.get("__PROCESSOR")) and (("MC" in Variables.get("__PROCESSOR"))) ): #Register information for Blanking Function cmpValGrp_CMx_MSKCON_SELSRCA = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/value-group@[name="CM1MSKCON__SELSRCA"]') cmpBitFld_CMx_MSKCON_AANEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="AANEN"]') cmpBitFld_CMx_MSKCON_AAEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="AAEN"]') cmpBitFld_CMx_MSKCON_ABNEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="ABNEN"]') cmpBitFld_CMx_MSKCON_ABEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="ABEN"]') cmpBitFld_CMx_MSKCON_ACNEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="ACNEN"]') cmpBitFld_CMx_MSKCON_ACEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="ACEN"]') cmpBitFld_CMx_MSKCON_PAGS = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="PAGS"]') cmpBitFld_CMx_MSKCON_NAGS = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="NAGS"]') cmpBitFld_CMx_MSKCON_OANEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="OANEN"]') cmpBitFld_CMx_MSKCON_OAEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="OAEN"]') cmpBitFld_CMx_MSKCON_OBNEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="OBNEN"]') cmpBitFld_CMx_MSKCON_OBEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="OBEN"]') cmpBitFld_CMx_MSKCON_OCNEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="OCNEN"]') cmpBitFld_CMx_MSKCON_OCEN = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="OCEN"]') cmpBitFld_CMx_MSKCON_HLMS = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="HLMS"]') cmpBitFld_CMx_MSKCON_SELSRCA = ATDF.getNode('/avr-tools-device-file/modules/module@[name="CMP"]/register-group@[name="CMP"]/register@[name="CM1MSKCON"]/bitfield@[name="SELSRCA"]') ################################################################################ #### Global Variables #### ################################################################################ global interruptsChildren interruptsChildren = ATDF.getNode('/avr-tools-device-file/devices/device/interrupts').getChildren() ################################################################################ #### Business Logic #### ################################################################################ def _get_bitfield_names(node, outputList): valueNodes = node.getChildren() for bitfield in reversed(valueNodes): ## do this for all <value > entries for this bitfield dict = {} if bitfield.getAttribute("caption").lower() != "reserved": ## skip (unused) reserved fields dict["desc"] = bitfield.getAttribute("caption") dict["key"] = bitfield.getAttribute("caption") ## Get rid of leading '0x', and convert to int if was hex value = bitfield.getAttribute("value") if(value[:2] == "0x"): temp = value[2:] tempint = int(temp, 16) else: tempint = int(value) dict["value"] = str(tempint) outputList.append(dict) def _get_enblReg_parms(vectorNumber): # This takes in vector index for interrupt, and returns the IECx register name as well as # mask and bit location within it for given interrupt index = int(vectorNumber / 32) regName = "IEC" + str(index) return regName def _get_statReg_parms(vectorNumber): # This takes in vector index for interrupt, and returns the IFSx register name as well as # mask and bit location within it for given interrupt index = int(vectorNumber / 32) regName = "IFS" + str(index) return regName def getIRQnumber(string): for param in interruptsChildren: modInst = param.getAttribute("name") if string == modInst: irq_index = param.getAttribute("index") return irq_index def setCMPxInterruptData(status, cmp_id): comparator_id = str(cmp_id) cmpxInterruptVector = "COMPARATOR_" + comparator_id + "_INTERRUPT_ENABLE" cmpxInterruptHandler = "COMPARATOR_" + comparator_id + "_INTERRUPT_HANDLER" cmpxInterruptHandlerLock = "COMPARATOR_" + comparator_id + "_INTERRUPT_HANDLER_LOCK" cmpxInterruptVectorUpdate ="COMPARATOR_" + comparator_id + "_INTERRUPT_ENABLE_UPDATE" Database.setSymbolValue("core", cmpxInterruptVector, status, 1) Database.setSymbolValue("core", cmpxInterruptHandlerLock, status, 1) interruptName = cmpxInterruptHandler.split("_INTERRUPT_HANDLER")[0] if status == True: Database.setSymbolValue("core", cmpxInterruptHandler, interruptName + "_InterruptHandler", 1) else: Database.setSymbolValue("core", cmpxInterruptHandler, interruptName + "_Handler", 1) def updateCMPxInterruptData(MySymbol, event): dep_symbol = event["symbol"].getID() symbol_parts = (dep_symbol.split('_', 2)) cmp_id = int(symbol_parts[1]) cmpxInterruptVectorUpdate = "COMPARATOR_" + str(cmp_id) + "_INTERRUPT_ENABLE_UPDATE" cmpxEvpolId = "CMP_" + str(cmp_id) + "_CON_EVPOL" #Comparator IDs starts from 1 but the array index starts from 0 #Use 'cmp_id - 1' when accessing config value arrays status = int(cmpSym_CMx_CON_EVPOL[cmp_id - 1].getSelectedValue()) != 0 if event["id"] == cmpxEvpolId: setCMPxInterruptData(status, cmp_id) if Database.getSymbolValue("core", cmpxInterruptVectorUpdate) == True and status == True: MySymbol.setVisible(True) else: MySymbol.setVisible(False) def combineCMxCONConfigValues(MySymbol, event): dep_symbol = event["symbol"].getID() symbol_parts = (dep_symbol.split('_', 2)) cmp_id = int(symbol_parts[1]) - 1 cchValue = cmpSym_CMx_CON_CCH[cmp_id].getValue() << 0 crefValue = cmpSym_CMx_CON_CREF[cmp_id].getValue() << 4 evpolValue = cmpSym_CMx_CON_EVPOL[cmp_id].getValue() << 6 ampmodValue = cmpSym_CMx_CON_AMPMOD[cmp_id].getValue() << 10 oaoValue = cmpSym_CMx_CON_OAO[cmp_id].getValue() << 11 cpolValue = cmpSym_CMx_CON_CPOL[cmp_id].getValue() << 13 coeValue = cmpSym_CMx_CON_COE[cmp_id].getValue() << 14 cmconValue = crefValue + cchValue + evpolValue + ampmodValue + oaoValue + cpolValue + coeValue MySymbol.setValue(cmconValue, 2) #Control HLMS visibility def setHLMSVisibility(MySymbol, event): dep_symbol = event["symbol"].getID() symbol_parts = (dep_symbol.split('_', 2)) cmp_id = int(symbol_parts[1]) - 1 symObj = event["symbol"] if symObj.getValue() == True: cmpSym_CMx_MSKCON_HLMS[cmp_id].setValue(False,2) else: cmpSym_CMx_MSKCON_HLMS[cmp_id].setValue(True,2) def combineCMxMSKCONConfigValues(MySymbol, event): dep_symbol = event["symbol"].getID() symbol_parts = (dep_symbol.split('_', 2)) cmp_id = int(symbol_parts[1]) - 1 aanenValue = cmpSym_CMx_MSKCON_AANEN[cmp_id].getValue() << 0 aaenValue = cmpSym_CMx_MSKCON_AAEN[cmp_id].getValue() << 1 abnenValue = cmpSym_CMx_MSKCON_ABNEN[cmp_id].getValue() << 2 abenValue = cmpSym_CMx_MSKCON_ABEN[cmp_id].getValue() << 3 acnenValue = cmpSym_CMx_MSKCON_ACNEN[cmp_id].getValue() << 4 acenValue = cmpSym_CMx_MSKCON_ACEN[cmp_id].getValue() << 5 pagsValue = cmpSym_CMx_MSKCON_PAGS[cmp_id].getValue() << 6 nagsValue = cmpSym_CMx_MSKCON_NAGS[cmp_id].getValue() << 7 oanenValue = cmpSym_CMx_MSKCON_OANEN[cmp_id].getValue() << 8 oaenValue = cmpSym_CMx_MSKCON_OAEN[cmp_id].getValue() << 9 obnenValue = cmpSym_CMx_MSKCON_OBNEN[cmp_id].getValue() << 10 obenValue = cmpSym_CMx_MSKCON_OBEN[cmp_id].getValue() << 11 ocnenValue = cmpSym_CMx_MSKCON_OCNEN[cmp_id].getValue() << 12 ocenValue = cmpSym_CMx_MSKCON_OCEN[cmp_id].getValue() << 13 hlmsValue = cmpSym_CMx_MSKCON_HLMS[cmp_id].getValue() << 15 selsrcaValue = cmpSym_CMx_MSKCON_SELSRCA[cmp_id].getValue() << 16 selsrcbValue = cmpSym_CMx_MSKCON_SELSRCB[cmp_id].getValue() << 20 selsrccValue = cmpSym_CMx_MSKCON_SELSRCC[cmp_id].getValue() << 24 cmxmskconValue = aanenValue + aaenValue + abnenValue + abenValue + acnenValue + acenValue + pagsValue + nagsValue + oanenValue + oaenValue + obnenValue + obenValue + ocnenValue + ocenValue + hlmsValue + selsrcaValue + selsrcbValue + selsrccValue MySymbol.setValue(cmxmskconValue, 2) def updateCMPxClockWarningStatus(symbol, event): symbol.setVisible(not event["value"]) def updateOPAMPxClockData(symbol, event): opampId = symbol.getID().split("_")[0] index = opampId.replace("OPAMP", "") #Comparator IDs starts from 1 but the array index starts from 0 #Use 'cmp_id - 1' when accessing config value arrays status = cmpSym_CMx_CON_AMPMOD[int(index) - 1].getValue() if "_CON_AMPMOD" in event["id"]: Database.setSymbolValue("core", opampId + "_CLOCK_ENABLE", event["value"], 1) if Database.getSymbolValue("core", opampId + "_CLOCK_ENABLE") == False and status == True: symbol.setVisible(True) else: symbol.setVisible(False) ################################################################################ #### Component #### ################################################################################ def instantiateComponent(cmpComponent): global cmpInstanceName global cmpxIEC cmpxIEC = [] global cmpxIFS cmpxIFS = [] global cmp_x_InterruptVector cmp_x_InterruptVector = [] global cmp_x_InterruptHandlerLock cmp_x_InterruptHandlerLock = [] global cmp_x_InterruptHandler cmp_x_InterruptHandlerLock = [] global cmp_x_InterruptVectorUpdate cmp_x_InterruptVectorUpdate = [] global cmpSym_CMx_CON_CREF cmpSym_CMx_CON_CREF = [] global cmpSym_CMx_CON_CCH cmpSym_CMx_CON_CCH = [] global cmpSym_CMx_CON_EVPOL cmpSym_CMx_CON_EVPOL = [] global cmpSym_CMx_CON_AMPMOD cmpSym_CMx_CON_AMPMOD = [] global cmpSym_CMx_CON_OAO cmpSym_CMx_CON_OAO = [] global cmpSym_CMx_CON_CPOL cmpSym_CMx_CON_CPOL = [] global cmpSym_CMx_CON_COE cmpSym_CMx_CON_COE = [] global cmpSym_CMxCON cmpSym_CMxCON = [] global cmpSym_CMxMSKCON cmpSym_CMxMSKCON = [] global cmpSymIntxEnComment cmpSymIntxEnComment = [] global cmpSym_CMx_CON_STRING cmpSym_CMx_CON_STRING = [] if( ("PIC32MK" in Variables.get("__PROCESSOR")) and (("MC" in Variables.get("__PROCESSOR"))) ): global cmpSym_CMx_MSKCON_STRING cmpSym_CMx_MSKCON_STRING = [] global cmpSym_CMx_MSKCON_SUBMENU_MASKA cmpSym_CMx_MSKCON_SUBMENU_MASKA = [] global cmpSym_CMx_MSKCON_SUBMENU_MASKB cmpSym_CMx_MSKCON_SUBMENU_MASKB = [] global cmpSym_CMx_MSKCON_SUBMENU_MASKC cmpSym_CMx_MSKCON_SUBMENU_MASKC = [] global cmpSym_CMx_MSKCON_SELSRCA cmpSym_CMx_MSKCON_SELSRCA = [] global cmpSym_CMx_MSKCON_SELSRCB cmpSym_CMx_MSKCON_SELSRCB = [] global cmpSym_CMx_MSKCON_SELSRCC cmpSym_CMx_MSKCON_SELSRCC = [] global cmpSym_CMx_MSKCON_AANEN cmpSym_CMx_MSKCON_AANEN = [] global cmpSym_CMx_MSKCON_AAEN cmpSym_CMx_MSKCON_AAEN = [] global cmpSym_CMx_MSKCON_ABNEN cmpSym_CMx_MSKCON_ABNEN = [] global cmpSym_CMx_MSKCON_ABEN cmpSym_CMx_MSKCON_ABEN = [] global cmpSym_CMx_MSKCON_ACNEN cmpSym_CMx_MSKCON_ACNEN = [] global cmpSym_CMx_MSKCON_ACEN cmpSym_CMx_MSKCON_ACEN = [] global cmpSym_CMx_MSKCON_PAGS cmpSym_CMx_MSKCON_PAGS = [] global cmpSym_CMx_MSKCON_NAGS cmpSym_CMx_MSKCON_NAGS = [] global cmpSym_CMx_MSKCON_OANEN cmpSym_CMx_MSKCON_OANEN = [] global cmpSym_CMx_MSKCON_OAEN cmpSym_CMx_MSKCON_OAEN = [] global cmpSym_CMx_MSKCON_OBNEN cmpSym_CMx_MSKCON_OBNEN = [] global cmpSym_CMx_MSKCON_OBEN cmpSym_CMx_MSKCON_OBEN = [] global cmpSym_CMx_MSKCON_OCNEN cmpSym_CMx_MSKCON_OCNEN = [] global cmpSym_CMx_MSKCON_OCEN cmpSym_CMx_MSKCON_OCEN = [] global cmpSym_CMx_MSKCON_HLMS cmpSym_CMx_MSKCON_HLMS = [] cmpInstanceName = cmpComponent.createStringSymbol("CMP_INSTANCE_NAME", None) cmpInstanceName.setVisible(False) cmpInstanceName.setDefaultValue(cmpComponent.getID().upper()) print("Running " + cmpInstanceName.getValue()) #Stop in Idle mode if device is not cmpSym_CMSTAT_SIDL = cmpComponent.createBooleanSymbol("CMP_CMSTAT_SIDL", None) cmpSym_CMSTAT_SIDL.setLabel(cmpBitFld_CMSTAT_SIDL.getAttribute("caption")) cmpSym_CMSTAT_SIDL.setDefaultValue(False) #Generate menu for all comparators and Op Amps in the CMP peripheral for id in range(0, 5): cmpSym_CMx_CON_STRING.append(id) cmpSym_CMx_CON_STRING[id] = cmpComponent.createCommentSymbol("cmp_x_STRING_" + str(id + 1), None) cmpSym_CMx_CON_STRING[id].setLabel("Comparator " + str(id + 1)) #Clock enable Database.setSymbolValue("core", "CMP" + str(id + 1) + "_CLOCK_ENABLE", True, 1) #Positive input of Comparator x cmp_x_CREF_names = [] cmpSym_CMx_CON_CREF.append(id) _get_bitfield_names(cmpValGrp_CMx_CON_CREF, cmp_x_CREF_names) cmpSym_CMx_CON_CREF[id] = cmpComponent.createKeyValueSetSymbol("CMP_" + str(id + 1) + "_CON_CREF", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_CREF[id].setLabel(cmpBitFld_CMx_CON_CREF.getAttribute("caption")) cmpSym_CMx_CON_CREF[id].setDefaultValue(0) cmpSym_CMx_CON_CREF[id].setOutputMode("Value") cmpSym_CMx_CON_CREF[id].setDisplayMode("Description") for ii in cmp_x_CREF_names: cmpSym_CMx_CON_CREF[id].addKey( ii['desc'], ii['value'], ii['key'] ) #Negative input of Comparator x cmp_x_CCH_names = [] cmpSym_CMx_CON_CCH.append(id) _get_bitfield_names(cmpValGrp_CMx_CON_CCH, cmp_x_CCH_names) cmpSym_CMx_CON_CCH[id] = cmpComponent.createKeyValueSetSymbol("CMP_" + str(id + 1) + "_CON_CCH", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_CCH[id].setLabel(cmpValGrp_CMx_CON_CCH.getAttribute("caption")) cmpSym_CMx_CON_CCH[id].setDefaultValue(0) cmpSym_CMx_CON_CCH[id].setOutputMode("Value") cmpSym_CMx_CON_CCH[id].setDisplayMode("Description") for ii in cmp_x_CCH_names: cmpSym_CMx_CON_CCH[id].addKey( ii['desc'], ii['value'], ii['key'] ) #Edge selection for interrupt generation cmp_x_EVPOL_names = [] cmpSym_CMx_CON_EVPOL.append(id) _get_bitfield_names(cmpValGrp_CMx_CON_EVPOL, cmp_x_EVPOL_names) cmpSym_CMx_CON_EVPOL[id] = cmpComponent.createKeyValueSetSymbol("CMP_" + str(id + 1) + "_CON_EVPOL", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_EVPOL[id].setLabel(cmpBitFld_CMx_CON_EVPOL.getAttribute("caption")) cmpSym_CMx_CON_EVPOL[id].setDefaultValue(0) cmpSym_CMx_CON_EVPOL[id].setOutputMode("Value") cmpSym_CMx_CON_EVPOL[id].setDisplayMode("Description") for ii in cmp_x_EVPOL_names: cmpSym_CMx_CON_EVPOL[id].addKey( ii['desc'], ii['value'], ii['key'] ) #Op amp Mode Enable #Not available on Op Amp Comparator 4 (CM4) cmpSym_CMx_CON_AMPMOD.append(id) if id != 3: cmpSym_CMx_CON_AMPMOD[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_CON_AMPMOD", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_AMPMOD[id].setLabel(cmpBitFld_CMx_CON_AMPMOD.getAttribute("caption")) #Op amp Output Enable #Not available on Op Amp Comparator 4 (CM4) cmpSym_CMx_CON_OAO.append(id) if id != 3: cmpSym_CMx_CON_OAO[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_CON_OAO", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_OAO[id].setLabel(cmpBitFld_CMx_CON_OAO.getAttribute("caption")) #Comparator output invert cmpSym_CMx_CON_CPOL.append(id) cmpSym_CMx_CON_CPOL[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_CON_CPOL", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_CPOL[id].setLabel(cmpBitFld_CMx_CON_CPOL.getAttribute("caption")) #Comparator output on pin cmpSym_CMx_CON_COE.append(id) cmpSym_CMx_CON_COE[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_CON_COE", cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_CON_COE[id].setLabel(cmpBitFld_CMx_CON_COE.getAttribute("caption")) #Collecting user input to combine into CMPxCON register #CMPxCON is updated every time a user selection changes cmpSym_CMxCON.append(id) cmpSym_CMxCON[id] = cmpComponent.createHexSymbol("CMP_" + str(id + 1) + "_CON_VALUE", None) cmpSym_CMxCON[id].setDefaultValue(0) cmpSym_CMxCON[id].setVisible(False) cmpSym_CMxCON[id].setDependencies(combineCMxCONConfigValues, ["CMP_" + str(id + 1) + "_CON_CREF", "CMP_" + str(id + 1) + "_CON_CCH", "CMP_" + str(id + 1) + "_CON_EVPOL", "CMP_" + str(id + 1) + "_CON_AMPMOD", "CMP_" + str(id + 1) + "_CON_OAO", "CMP_" + str(id + 1) + "_CON_CPOL", "CMP_" + str(id + 1) + "_CON_COE"]) #Menu item for output blanking. Only available on PIC32MKxxMCxx devices. if( ("PIC32MK" in Variables.get("__PROCESSOR")) and (("MC" in Variables.get("__PROCESSOR"))) ): cmpSym_CMx_MSKCON_STRING.append(id) cmpSym_CMx_MSKCON_STRING[id] = cmpComponent.createCommentSymbol("cmp_x_MSKCON_STRING_" + str(id + 1), cmpSym_CMx_CON_STRING[id]) cmpSym_CMx_MSKCON_STRING[id].setLabel("Output Blanking") #High or Low Level Masking Select #Takes the inverted value of CPOL cmpSym_CMx_MSKCON_HLMS.append(id) cmpSym_CMx_MSKCON_HLMS[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_HLMS", cmpSym_CMx_MSKCON_STRING[id]) cmpSym_CMx_MSKCON_HLMS[id].setLabel(cmpBitFld_CMx_MSKCON_HLMS.getAttribute("caption")) cmpSym_CMx_MSKCON_HLMS[id].setVisible(False) cmpSym_CMx_MSKCON_HLMS[id].setDependencies(setHLMSVisibility, ["CMP_" + str(id + 1) + "_CON_CPOL"]) #SubMenu item for Mask A configuration cmpSym_CMx_MSKCON_SUBMENU_MASKA.append(id) cmpSym_CMx_MSKCON_SUBMENU_MASKA[id] = cmpComponent.createCommentSymbol("cmp_x_SUBMENU_MASKA" + str(id + 1), cmpSym_CMx_MSKCON_STRING[id]) cmpSym_CMx_MSKCON_SUBMENU_MASKA[id].setLabel("Mask A configuration") #Mask A Input Select cmp_x_SELSRCA_names = [] cmpSym_CMx_MSKCON_SELSRCA.append(id) _get_bitfield_names(cmpValGrp_CMx_MSKCON_SELSRCA, cmp_x_SELSRCA_names) cmpSym_CMx_MSKCON_SELSRCA[id] = cmpComponent.createKeyValueSetSymbol("CMP_" + str(id + 1) + "_MSKCON_SELSRCA", cmpSym_CMx_MSKCON_SUBMENU_MASKA[id]) cmpSym_CMx_MSKCON_SELSRCA[id].setLabel("Mask A Input Select bits") cmpSym_CMx_MSKCON_SELSRCA[id].setDefaultValue(0) cmpSym_CMx_MSKCON_SELSRCA[id].setOutputMode("Value") cmpSym_CMx_MSKCON_SELSRCA[id].setDisplayMode("Description") for ii in cmp_x_SELSRCA_names: cmpSym_CMx_MSKCON_SELSRCA[id].addKey( ii['desc'], ii['value'], ii['key'] ) #AND Gate 'A' Inverted Input Enable cmpSym_CMx_MSKCON_AANEN.append(id) cmpSym_CMx_MSKCON_AANEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_AANEN", cmpSym_CMx_MSKCON_SUBMENU_MASKA[id]) cmpSym_CMx_MSKCON_AANEN[id].setLabel(cmpBitFld_CMx_MSKCON_AANEN.getAttribute("caption")) #AND Gate 'A' Input Enable cmpSym_CMx_MSKCON_AAEN.append(id) cmpSym_CMx_MSKCON_AAEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_AAEN", cmpSym_CMx_MSKCON_SUBMENU_MASKA[id]) cmpSym_CMx_MSKCON_AAEN[id].setLabel(cmpBitFld_CMx_MSKCON_AAEN.getAttribute("caption")) #OR Gate 'A' Inverted Input Enable cmpSym_CMx_MSKCON_OANEN.append(id) cmpSym_CMx_MSKCON_OANEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_OANEN", cmpSym_CMx_MSKCON_SUBMENU_MASKA[id]) cmpSym_CMx_MSKCON_OANEN[id].setLabel(cmpBitFld_CMx_MSKCON_OANEN.getAttribute("caption")) #OR Gate 'A' Input Enable cmpSym_CMx_MSKCON_OAEN.append(id) cmpSym_CMx_MSKCON_OAEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_OAEN", cmpSym_CMx_MSKCON_SUBMENU_MASKA[id]) cmpSym_CMx_MSKCON_OAEN[id].setLabel(cmpBitFld_CMx_MSKCON_OAEN.getAttribute("caption")) #SubMenu item for Mask B configuration cmpSym_CMx_MSKCON_SUBMENU_MASKB.append(id) cmpSym_CMx_MSKCON_SUBMENU_MASKB[id] = cmpComponent.createCommentSymbol("cmp_x_SUBMENU_MASKB"+str(id+1), cmpSym_CMx_MSKCON_STRING[id]) cmpSym_CMx_MSKCON_SUBMENU_MASKB[id].setLabel("Mask B configuration") #Mask B Input Select cmpSym_CMx_MSKCON_SELSRCB.append(id) cmpSym_CMx_MSKCON_SELSRCB[id] = cmpComponent.createKeyValueSetSymbol("CMP_" + str(id + 1) + "_MSKCON_SELSRCB", cmpSym_CMx_MSKCON_SUBMENU_MASKB[id]) cmpSym_CMx_MSKCON_SELSRCB[id].setLabel("Mask B Input Select bits") cmpSym_CMx_MSKCON_SELSRCB[id].setDefaultValue(0) cmpSym_CMx_MSKCON_SELSRCB[id].setOutputMode("Value") cmpSym_CMx_MSKCON_SELSRCB[id].setDisplayMode("Description") for ii in cmp_x_SELSRCA_names: cmpSym_CMx_MSKCON_SELSRCB[id].addKey( ii['desc'], ii['value'], ii['key'] ) #AND Gate 'B' Inverted Input Enable cmpSym_CMx_MSKCON_ABNEN.append(id) cmpSym_CMx_MSKCON_ABNEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_ABNEN", cmpSym_CMx_MSKCON_SUBMENU_MASKB[id]) cmpSym_CMx_MSKCON_ABNEN[id].setLabel(cmpBitFld_CMx_MSKCON_ABNEN.getAttribute("caption")) #AND Gate 'B' Input Enable cmpSym_CMx_MSKCON_ABEN.append(id) cmpSym_CMx_MSKCON_ABEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_ABEN", cmpSym_CMx_MSKCON_SUBMENU_MASKB[id]) cmpSym_CMx_MSKCON_ABEN[id].setLabel(cmpBitFld_CMx_MSKCON_ABEN.getAttribute("caption")) #OR Gate 'B' Inverted Input Enable cmpSym_CMx_MSKCON_OBNEN.append(id) cmpSym_CMx_MSKCON_OBNEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_OBNEN", cmpSym_CMx_MSKCON_SUBMENU_MASKB[id]) cmpSym_CMx_MSKCON_OBNEN[id].setLabel(cmpBitFld_CMx_MSKCON_OBNEN.getAttribute("caption")) #OR Gate 'B' Input Enable cmpSym_CMx_MSKCON_OBEN.append(id) cmpSym_CMx_MSKCON_OBEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_OBEN", cmpSym_CMx_MSKCON_SUBMENU_MASKB[id]) cmpSym_CMx_MSKCON_OBEN[id].setLabel(cmpBitFld_CMx_MSKCON_OBEN.getAttribute("caption")) #SubMenu item for Mask C configuration cmpSym_CMx_MSKCON_SUBMENU_MASKC.append(id) cmpSym_CMx_MSKCON_SUBMENU_MASKC[id] = cmpComponent.createCommentSymbol("cmp_x_SUBMENU_MASKC"+str(id+1), cmpSym_CMx_MSKCON_STRING[id]) cmpSym_CMx_MSKCON_SUBMENU_MASKC[id].setLabel("Mask C configuration") #Mask C Input Select cmpSym_CMx_MSKCON_SELSRCC.append(id) cmpSym_CMx_MSKCON_SELSRCC[id] = cmpComponent.createKeyValueSetSymbol("CMP_" + str(id + 1) + "_MSKCON_SELSRCC", cmpSym_CMx_MSKCON_SUBMENU_MASKC[id]) cmpSym_CMx_MSKCON_SELSRCC[id].setLabel("Mask C Input Select bits") cmpSym_CMx_MSKCON_SELSRCC[id].setDefaultValue(0) cmpSym_CMx_MSKCON_SELSRCC[id].setOutputMode("Value") cmpSym_CMx_MSKCON_SELSRCC[id].setDisplayMode("Description") for ii in cmp_x_SELSRCA_names: cmpSym_CMx_MSKCON_SELSRCC[id].addKey( ii['desc'], ii['value'], ii['key'] ) #AND Gate 'C' Inverted Input Enable cmpSym_CMx_MSKCON_ACNEN.append(id) cmpSym_CMx_MSKCON_ACNEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_ACNEN", cmpSym_CMx_MSKCON_SUBMENU_MASKC[id]) cmpSym_CMx_MSKCON_ACNEN[id].setLabel(cmpBitFld_CMx_MSKCON_ACNEN.getAttribute("caption")) #AND Gate 'C' Input Enable cmpSym_CMx_MSKCON_ACEN.append(id) cmpSym_CMx_MSKCON_ACEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_ACEN", cmpSym_CMx_MSKCON_SUBMENU_MASKC[id]) cmpSym_CMx_MSKCON_ACEN[id].setLabel(cmpBitFld_CMx_MSKCON_ACEN.getAttribute("caption")) #OR Gate 'C' Inverted Input Enable cmpSym_CMx_MSKCON_OCNEN.append(id) cmpSym_CMx_MSKCON_OCNEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_OCNEN", cmpSym_CMx_MSKCON_SUBMENU_MASKC[id]) cmpSym_CMx_MSKCON_OCNEN[id].setLabel(cmpBitFld_CMx_MSKCON_OCNEN.getAttribute("caption")) #OR Gate 'C' Input Enable cmpSym_CMx_MSKCON_OCEN.append(id) cmpSym_CMx_MSKCON_OCEN[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_OCEN", cmpSym_CMx_MSKCON_SUBMENU_MASKC[id]) cmpSym_CMx_MSKCON_OCEN[id].setLabel(cmpBitFld_CMx_MSKCON_OCEN.getAttribute("caption")) #Positive AND Gate Output Select cmpSym_CMx_MSKCON_PAGS.append(id) cmpSym_CMx_MSKCON_PAGS[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_PAGS", cmpSym_CMx_MSKCON_STRING[id]) cmpSym_CMx_MSKCON_PAGS[id].setLabel(cmpBitFld_CMx_MSKCON_PAGS.getAttribute("caption")) #Negative AND Gate Output Select cmpSym_CMx_MSKCON_NAGS.append(id) cmpSym_CMx_MSKCON_NAGS[id] = cmpComponent.createBooleanSymbol("CMP_" + str(id + 1) + "_MSKCON_NAGS", cmpSym_CMx_MSKCON_STRING[id]) cmpSym_CMx_MSKCON_NAGS[id].setLabel(cmpBitFld_CMx_MSKCON_NAGS.getAttribute("caption")) #Collecting user input to combine into CMxMSKCON register #CMxMSKCON is updated every time a user selection changes cmpSym_CMxMSKCON.append(id) cmpSym_CMxMSKCON[id] = cmpComponent.createHexSymbol("CMP_" + str(id + 1) + "_CMxMSKCON_VALUE", None) cmpSym_CMxMSKCON[id].setDefaultValue(0) cmpSym_CMxMSKCON[id].setVisible(False) cmpSym_CMxMSKCON[id].setDependencies(combineCMxMSKCONConfigValues, ["CMP_" + str(id + 1) + "_MSKCON_HLMS", "CMP_" + str(id + 1) + "_MSKCON_SELSRCA", "CMP_" + str(id + 1) + "_MSKCON_AANEN", "CMP_" + str(id + 1) + "_MSKCON_AAEN", "CMP_" + str(id + 1) + "_MSKCON_OANEN", "CMP_" + str(id + 1) + "_MSKCON_OAEN", "CMP_" + str(id + 1) + "_MSKCON_SELSRCB", "CMP_" + str(id + 1) + "_MSKCON_ABNEN", "CMP_" + str(id + 1) + "_MSKCON_ABEN", "CMP_" + str(id + 1) + "_MSKCON_OBNEN", "CMP_" + str(id + 1) + "_MSKCON_OBEN", "CMP_" + str(id + 1) + "_MSKCON_SELSRCC", "CMP_" + str(id + 1) + "_MSKCON_ACNEN", "CMP_" + str(id + 1) + "_MSKCON_ACEN", "CMP_" + str(id + 1) + "_MSKCON_OCNEN", "CMP_" + str(id + 1) + "_MSKCON_OCEN", "CMP_" + str(id + 1) + "_MSKCON_PAGS", "CMP_" + str(id + 1) + "_MSKCON_NAGS"]) #Calculate the interrupt register using IRQ# cmpxIrq = "COMPARATOR_" + str(id + 1) cmpxIrq_index = int(getIRQnumber(cmpxIrq)) cmpxEnblRegName = _get_enblReg_parms(cmpxIrq_index) cmpxStatRegName = _get_statReg_parms(cmpxIrq_index) #CMPx IEC REG cmpxIEC.append(id) cmpxIEC[id] = cmpComponent.createStringSymbol("CMP_" + str(id + 1) + "_IEC_REG", None) cmpxIEC[id].setDefaultValue(cmpxEnblRegName) cmpxIEC[id].setVisible(False) #CMPx IFS REG cmpxIFS.append(id) cmpxIFS[id] = cmpComponent.createStringSymbol("CMP_" + str(id + 1) + "_IFS_REG", None) cmpxIFS[id].setDefaultValue(cmpxStatRegName) cmpxIFS[id].setVisible(False) ############################################################################ #### Dependency #### ############################################################################ # EVIC Dynamic settings # If the user disables interrupt via Interrupt configuration menu in 'System' component # The following comment will be made visible. cmpSymIntxEnComment.append(id) cmpSymIntxEnComment[id] = cmpComponent.createCommentSymbol("CMP_" + str(id + 1) + "_INTERRUPT_ENABLE_COMMENT", cmpSym_CMx_CON_STRING[id]) cmpSymIntxEnComment[id].setVisible(False) cmpSymIntxEnComment[id].setLabel("Warning!!! Comparator " + str(id + 1) + " Interrupt is Disabled in Interrupt Manager") cmpSymIntxEnComment[id].setDependencies(updateCMPxInterruptData, ["CMP_" + str(id + 1) + "_CON_EVPOL", "core." + "COMPARATOR_" + str(id + 1) + "_INTERRUPT_ENABLE_UPDATE"]) # Clock Warning status cmpSym_ClkxEnComment = cmpComponent.createCommentSymbol("CMP" + str(id + 1) + "_CLOCK_ENABLE_COMMENT", cmpSym_CMx_CON_STRING[id]) cmpSym_ClkxEnComment.setLabel("Warning!!! Comparator " + str(id + 1) + " Peripheral Clock is Disabled in Clock Manager") cmpSym_ClkxEnComment.setVisible(False) cmpSym_ClkxEnComment.setDependencies(updateCMPxClockWarningStatus, ["core.CMP" + str(id + 1) + "_CLOCK_ENABLE"]) if id != 3: # Clock Warning status opampSym_ClkxEnComment = cmpComponent.createCommentSymbol("OPAMP" + str(id + 1) + "_CLOCK_ENABLE_COMMENT", cmpSym_CMx_CON_STRING[id]) opampSym_ClkxEnComment.setLabel("Warning!!! OPAMP" + str(id + 1) + " Peripheral Clock is Disabled in Clock Manager") opampSym_ClkxEnComment.setVisible(False) opampSym_ClkxEnComment.setDependencies(updateOPAMPxClockData, ["core.OPAMP" + str(id + 1) + "_CLOCK_ENABLE", "CMP_" + str(id + 1) + "_CON_AMPMOD"]) ############################################################################ #### Code Generation #### ############################################################################ configName = Variables.get("__CONFIGURATION_NAME") cmpHeader1File = cmpComponent.createFileSymbol("CMP_HEADER1", None) cmpHeader1File.setMarkup(True) cmpHeader1File.setSourcePath("../peripheral/cmp_01427/templates/plib_cmp.h.ftl") cmpHeader1File.setOutputName("plib_" + cmpInstanceName.getValue().lower() + ".h") cmpHeader1File.setDestPath("peripheral/cmp/") cmpHeader1File.setProjectPath("config/" + configName + "/peripheral/cmp/") cmpHeader1File.setType("HEADER") cmpHeader1File.setOverwrite(True) cmpSource1File = cmpComponent.createFileSymbol("CMP_SOURCE1", None) cmpSource1File.setMarkup(True) cmpSource1File.setSourcePath("../peripheral/cmp_01427/templates/plib_cmp.c.ftl") cmpSource1File.setOutputName("plib_" + cmpInstanceName.getValue().lower() + ".c") cmpSource1File.setDestPath("peripheral/cmp/") cmpSource1File.setProjectPath("config/" + configName + "/peripheral/cmp/") cmpSource1File.setType("SOURCE") cmpSource1File.setOverwrite(True) cmpSystemInitFile = cmpComponent.createFileSymbol("CMP_INIT", None) cmpSystemInitFile.setType("STRING") cmpSystemInitFile.setOutputName("core.LIST_SYSTEM_INIT_C_SYS_INITIALIZE_PERIPHERALS") cmpSystemInitFile.setSourcePath("../peripheral/cmp_01427/templates/system/system_initialize.c.ftl") cmpSystemInitFile.setMarkup(True) cmpSystemDefFile = cmpComponent.createFileSymbol("CMP_DEF", None) cmpSystemDefFile.setType("STRING") cmpSystemDefFile.setOutputName("core.LIST_SYSTEM_DEFINITIONS_H_INCLUDES") cmpSystemDefFile.setSourcePath("../peripheral/cmp_01427/templates/system/system_definitions.h.ftl") cmpSystemDefFile.setMarkup(True)
{ "targets": [ { "target_name": "cld-c", "type": "static_library", "include_dirs": [ "internal", ], "sources": [ "internal/cldutil.cc", "internal/cldutil_shared.cc", "internal/compact_lang_det.cc", "internal/compact_lang_det_hint_code.cc", "internal/compact_lang_det_impl.cc", "internal/debug.cc", "internal/fixunicodevalue.cc", "internal/generated_entities.cc", "internal/generated_language.cc", "internal/generated_ulscript.cc", "internal/getonescriptspan.cc", "internal/lang_script.cc", "internal/offsetmap.cc", "internal/scoreonescriptspan.cc", "internal/tote.cc", "internal/utf8statetable.cc", "internal/cld_generated_cjk_uni_prop_80.cc", "internal/cld2_generated_cjk_compatible.cc", "internal/cld_generated_cjk_delta_bi_32.cc", "internal/generated_distinct_bi_0.cc", "internal/cld2_generated_quad0122.cc", "internal/cld2_generated_deltaocta0122.cc", "internal/cld2_generated_deltaoctachrome.cc", "internal/cld2_generated_distinctocta0122.cc", "internal/cld2_generated_distinctoctachrome.cc", "internal/cld2_generated_quadchrome_16.cc", "internal/cld2_generated_quadchrome_2.cc", "internal/cld_generated_score_quad_octa_0122.cc", "internal/cld_generated_score_quad_octa_2.cc" ], "defines": [], "cflags_cc": ["-w", "-std=gnu++98"], "cflags_cc!": ["-std=gnu++0x"], "link_settings" : { "ldflags": ["-z", "muldefs"] }, "xcode_settings": { "OTHER_CFLAGS": ["-w"], 'CLANG_CXX_LANGUAGE_STANDARD': 'c++98' } } ] }
#MousePressed def setup(): size(240, 120) strokeWeight(30) def draw(): background(204) stroke(102) line(40, 0, 70, height) if mousePressed == True: # outra opção seria 'if mousePressed:', ou seja, a comparação não é obrigatória stroke(0) else: stroke(255) line(0, 70, width, 50)
def handle(event, context): # This lambda function will be triggered by a CloudWatch cron-job. # Collect a list of BD phone numbers and the recipient name # from some file located in an s3 and store in `recipient` variable. # You can collect phone numbers from your google contacts. # Now, validate the phone numbers. If all the numbers are valid, # set value for "action" key as `send` and add "phone_numbers" # key in the response and its value is a list if dict as the # following format. Invalid phone numbers is collected in # the following format too. # [{"name": "Rayhan", "phone": "+8801xxxxxxxxx"}] # Invalid phone numbers and their names. invalid_numbers = [{"name": "Abdullah", "phone": "+8819xxxxxxxx"}] # Value for this variable is set based on the validation. It's # False if some percentage of phone numbers are invalid, otherwise # it's True. It's been sent in event now for simplicity and to check # the state machine functionality. is_valid = event["is_valid"] # Value for this variable will be calculated dynamically. recipients = [{"name": "Rayhan", "phone": "+88018xxxxxxxx"}] message = event.get("message_body") if is_valid: response = { "action": "send", "recipients": recipients, "message": message } else: response = { "action": "reject", "admin_phone": "+88017xxxxxxxx", "invalid_numbers": invalid_numbers } return response # Based on the output from this lambda, the state machine will # decide whether to proceed next. If action is `send`, it invokes # sender_lambda. Otherwise, it invokes rejection_lambda
print('---------- If Condition ----------') a = 1 if a > 0: print('A is a positive number') print('---------- If Else ----------') a = -1 if a > 0: print('A is a positive number') else: print('A is a negative number') print('---------- If Elif Else ----------') a = 0 if a > 0: print('A is a positive number') elif a < 0: print('A is a negative number') else: print('A is zero') print('---------- Short Hand ----------') a = 1 print('A is positive') if a > 0 else print('A is negative') # first condition met, 'A is positive' will be printed print('---------- Nested Conditions ----------') a = 3 if a > 0: if a % 2 == 0: print('A is a positive and even integer') else: print('A is a positive number') elif a == 0: print('A is zero') else: print('A is a negative number') print('---------- If Condition and Logical Operators ---------') a = 2 if a > 0 and a % 2 == 0: print('A is a positive and even integer') elif a > 0 and a % 2 != 0: print('A is a positive number') elif a == 0: print('A is zero') else: print('A is a negative number') print('---------- If and Or Logical Operators ---------') user = 'ZhangSan' access_level = 1 if user == 'admin' or access_level >= 9: print('Access granted!') else: print('Access denied!')
load( "@bazel_toolchains//rules:docker_config.bzl", "docker_toolchain_autoconfig", ) def _tensorflow_rbe_config(name, compiler, python_version, cuda_version = None, cudnn_version = None, tensorrt_version = None): base = "@ubuntu16.04//image" config_repos = [ "local_config_python", "local_config_cc", ] env = { "ABI_VERSION": "gcc", "ABI_LIBC_VERSION": "glibc_2.19", "BAZEL_COMPILER": compiler, "BAZEL_HOST_SYSTEM": "i686-unknown-linux-gnu", "BAZEL_TARGET_LIBC": "glibc_2.19", "BAZEL_TARGET_CPU": "k8", "BAZEL_TARGET_SYSTEM": "x86_64-unknown-linux-gnu", "CC_TOOLCHAIN_NAME": "linux_gnu_x86", "CC": compiler, "PYTHON_BIN_PATH": "/usr/bin/python%s" % python_version, "CLEAR_CACHE": "1", } if cuda_version != None: base = "@cuda%s-cudnn%s-ubuntu14.04//image" % (cuda_version, cudnn_version) # The cuda toolchain currently contains its own C++ toolchain definition, # so we do not fetch local_config_cc. config_repos = [ "local_config_python", "local_config_cuda", "local_config_tensorrt", ] env.update({ "TF_NEED_CUDA": "1", "TF_CUDA_CLANG": "1" if compiler == "clang" else "0", "TF_CUDA_COMPUTE_CAPABILITIES": "3.0", "TF_ENABLE_XLA": "1", "TF_CUDNN_VERSION": cudnn_version, "TF_CUDA_VERSION": cuda_version, "CUDNN_INSTALL_PATH": "/usr/lib/x86_64-linux-gnu", "TF_NEED_TENSORRT" : "1", "TF_TENSORRT_VERSION": tensorrt_version, "TENSORRT_INSTALL_PATH": "/usr/lib/x86_64-linux-gnu", }) docker_toolchain_autoconfig( name = name, base = base, bazel_version = "0.21.0", config_repos = config_repos, env = env, mount_project = "$(mount_project)", tags = ["manual"], incompatible_changes_off = True, ) tensorflow_rbe_config = _tensorflow_rbe_config
# # PySNMP MIB module Unisphere-Data-COPS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Unisphere-Data-COPS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:23:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") iso, Unsigned32, Bits, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, NotificationType, Gauge32, TimeTicks, Integer32, Counter64, ModuleIdentity, Counter32, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Unsigned32", "Bits", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "NotificationType", "Gauge32", "TimeTicks", "Integer32", "Counter64", "ModuleIdentity", "Counter32", "ObjectIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") usDataMibs, = mibBuilder.importSymbols("Unisphere-Data-MIBs", "usDataMibs") UsdName, = mibBuilder.importSymbols("Unisphere-Data-TC", "UsdName") usdCopsProtocolMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37)) usdCopsProtocolMIB.setRevisions(('2002-01-14 19:01', '2000-02-22 00:00',)) if mibBuilder.loadTexts: usdCopsProtocolMIB.setLastUpdated('200201141901Z') if mibBuilder.loadTexts: usdCopsProtocolMIB.setOrganization('Unisphere Networks, Inc.') usdCopsProtocolObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1)) usdCopsProtocolCfg = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 1)) usdCopsProtocolStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 2)) usdCopsProtocolStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3)) usdCopsProtocolSession = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4)) usdCopsProtocolStatisticsScalars = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1)) usdCopsProtocolSessionsCreated = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionsCreated.setStatus('current') usdCopsProtocolSessionsDeleted = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionsDeleted.setStatus('current') usdCopsProtocolCurrentSessions = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolCurrentSessions.setStatus('current') usdCopsProtocolBytesReceived = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolBytesReceived.setStatus('current') usdCopsProtocolPacketsReceived = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolPacketsReceived.setStatus('current') usdCopsProtocolBytesSent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolBytesSent.setStatus('current') usdCopsProtocolPacketsSent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolPacketsSent.setStatus('current') usdCopsProtocolKeepAlivesReceived = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolKeepAlivesReceived.setStatus('current') usdCopsProtocolKeepAlivesSent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolKeepAlivesSent.setStatus('current') usdCopsProtocolSessionTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1), ) if mibBuilder.loadTexts: usdCopsProtocolSessionTable.setStatus('current') usdCopsProtocolSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1), ).setIndexNames((0, "Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionClientType")) if mibBuilder.loadTexts: usdCopsProtocolSessionEntry.setStatus('current') usdCopsProtocolSessionClientType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: usdCopsProtocolSessionClientType.setStatus('current') usdCopsProtocolSessionRemoteAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionRemoteAddress.setStatus('current') usdCopsProtocolSessionRemotePort = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionRemotePort.setStatus('current') usdCopsProtocolSessionBytesReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionBytesReceived.setStatus('current') usdCopsProtocolSessionPacketsReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionPacketsReceived.setStatus('current') usdCopsProtocolSessionBytesSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionBytesSent.setStatus('current') usdCopsProtocolSessionPacketsSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionPacketsSent.setStatus('current') usdCopsProtocolSessionREQSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionREQSent.setStatus('current') usdCopsProtocolSessionDECReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionDECReceived.setStatus('current') usdCopsProtocolSessionRPTSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionRPTSent.setStatus('current') usdCopsProtocolSessionDRQSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionDRQSent.setStatus('current') usdCopsProtocolSessionSSQSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionSSQSent.setStatus('current') usdCopsProtocolSessionOPNSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionOPNSent.setStatus('current') usdCopsProtocolSessionCATReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionCATReceived.setStatus('current') usdCopsProtocolSessionCCSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionCCSent.setStatus('current') usdCopsProtocolSessionCCReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionCCReceived.setStatus('current') usdCopsProtocolSessionSSCSent = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionSSCSent.setStatus('current') usdCopsProtocolSessionLocalAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 18), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionLocalAddress.setStatus('current') usdCopsProtocolSessionTransportRouterName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 1, 4, 1, 1, 19), UsdName()).setMaxAccess("readonly") if mibBuilder.loadTexts: usdCopsProtocolSessionTransportRouterName.setStatus('current') usdCopsProtocolMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4)) usdCopsProtocolMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4, 1)) usdCopsProtocolMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4, 2)) usdCopsProtocolAuthCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4, 1, 1)).setObjects(("Unisphere-Data-COPS-MIB", "usdCopsProtocolGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdCopsProtocolAuthCompliance = usdCopsProtocolAuthCompliance.setStatus('obsolete') usdCopsProtocolAuthCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4, 1, 2)).setObjects(("Unisphere-Data-COPS-MIB", "usdCopsProtocolGroup2")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdCopsProtocolAuthCompliance2 = usdCopsProtocolAuthCompliance2.setStatus('current') usdCopsProtocolGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4, 2, 1)).setObjects(("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionsCreated"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionsDeleted"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolCurrentSessions"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolBytesReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolPacketsReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolBytesSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolPacketsSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolKeepAlivesReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolKeepAlivesSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionRemoteAddress"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionRemotePort"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionBytesReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionPacketsReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionBytesSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionPacketsSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionREQSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionDECReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionRPTSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionDRQSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionSSQSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionOPNSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionCATReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionCCSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionCCReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionSSCSent")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdCopsProtocolGroup = usdCopsProtocolGroup.setStatus('obsolete') usdCopsProtocolGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 37, 4, 2, 2)).setObjects(("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionsCreated"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionsDeleted"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolCurrentSessions"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolBytesReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolPacketsReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolBytesSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolPacketsSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolKeepAlivesReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolKeepAlivesSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionRemoteAddress"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionRemotePort"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionBytesReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionPacketsReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionBytesSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionPacketsSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionREQSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionDECReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionRPTSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionDRQSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionSSQSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionOPNSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionCATReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionCCSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionCCReceived"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionSSCSent"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionLocalAddress"), ("Unisphere-Data-COPS-MIB", "usdCopsProtocolSessionTransportRouterName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): usdCopsProtocolGroup2 = usdCopsProtocolGroup2.setStatus('current') mibBuilder.exportSymbols("Unisphere-Data-COPS-MIB", usdCopsProtocolSessionCCSent=usdCopsProtocolSessionCCSent, usdCopsProtocolMIBGroups=usdCopsProtocolMIBGroups, usdCopsProtocolCurrentSessions=usdCopsProtocolCurrentSessions, usdCopsProtocolSessionREQSent=usdCopsProtocolSessionREQSent, usdCopsProtocolStatisticsScalars=usdCopsProtocolStatisticsScalars, usdCopsProtocolAuthCompliance=usdCopsProtocolAuthCompliance, usdCopsProtocolMIB=usdCopsProtocolMIB, usdCopsProtocolSessionPacketsReceived=usdCopsProtocolSessionPacketsReceived, usdCopsProtocolSessionDRQSent=usdCopsProtocolSessionDRQSent, usdCopsProtocolSessionsCreated=usdCopsProtocolSessionsCreated, usdCopsProtocolSessionClientType=usdCopsProtocolSessionClientType, usdCopsProtocolKeepAlivesSent=usdCopsProtocolKeepAlivesSent, usdCopsProtocolSessionTransportRouterName=usdCopsProtocolSessionTransportRouterName, usdCopsProtocolSessionLocalAddress=usdCopsProtocolSessionLocalAddress, usdCopsProtocolSessionDECReceived=usdCopsProtocolSessionDECReceived, usdCopsProtocolSessionTable=usdCopsProtocolSessionTable, usdCopsProtocolSessionPacketsSent=usdCopsProtocolSessionPacketsSent, usdCopsProtocolBytesSent=usdCopsProtocolBytesSent, usdCopsProtocolSessionRPTSent=usdCopsProtocolSessionRPTSent, usdCopsProtocolPacketsSent=usdCopsProtocolPacketsSent, usdCopsProtocolMIBConformance=usdCopsProtocolMIBConformance, usdCopsProtocolGroup2=usdCopsProtocolGroup2, usdCopsProtocolObjects=usdCopsProtocolObjects, usdCopsProtocolCfg=usdCopsProtocolCfg, usdCopsProtocolSessionEntry=usdCopsProtocolSessionEntry, usdCopsProtocolSessionRemotePort=usdCopsProtocolSessionRemotePort, usdCopsProtocolSessionBytesReceived=usdCopsProtocolSessionBytesReceived, usdCopsProtocolSessionSSQSent=usdCopsProtocolSessionSSQSent, usdCopsProtocolSessionBytesSent=usdCopsProtocolSessionBytesSent, usdCopsProtocolSessionOPNSent=usdCopsProtocolSessionOPNSent, usdCopsProtocolBytesReceived=usdCopsProtocolBytesReceived, usdCopsProtocolMIBCompliances=usdCopsProtocolMIBCompliances, usdCopsProtocolStatistics=usdCopsProtocolStatistics, usdCopsProtocolKeepAlivesReceived=usdCopsProtocolKeepAlivesReceived, usdCopsProtocolSessionCCReceived=usdCopsProtocolSessionCCReceived, usdCopsProtocolPacketsReceived=usdCopsProtocolPacketsReceived, PYSNMP_MODULE_ID=usdCopsProtocolMIB, usdCopsProtocolSessionCATReceived=usdCopsProtocolSessionCATReceived, usdCopsProtocolSessionSSCSent=usdCopsProtocolSessionSSCSent, usdCopsProtocolSessionsDeleted=usdCopsProtocolSessionsDeleted, usdCopsProtocolGroup=usdCopsProtocolGroup, usdCopsProtocolSession=usdCopsProtocolSession, usdCopsProtocolAuthCompliance2=usdCopsProtocolAuthCompliance2, usdCopsProtocolStatus=usdCopsProtocolStatus, usdCopsProtocolSessionRemoteAddress=usdCopsProtocolSessionRemoteAddress)
def run(proj,OG): n1 = int(proj.parameters['n1']) OG.add("base","o") for i in range(n1): OG.add("level1",str(i),{},OG["base"]) OG.add("level2","o", {}, OG["base"] + OG["level1"])
if __name__ == '__main__': n = int(input()) arr = list(map(int, input().rstrip().split())) arr.reverse() for i in arr: print(i, end= " ")
# -*- coding: utf-8 -*- # Authors: Y. Jia <[email protected]> """ Given preorder and inorder traversal of a tree, construct the binary tree. https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/ """ # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def buildTree(self, preorder, inorder): """ :type preorder: List[int] :type inorder: List[int] :rtype: TreeNode """ if len(preorder) == 0: return None root = TreeNode(preorder[0]) ind = inorder.index(root.val) root.left = self.buildTree(preorder[1:ind + 1], inorder[0:ind]) root.right = self.buildTree(preorder[ind + 1:], inorder[ind + 1:]) return root
class map_config: width=500 height=500 obstacle=[ {"shape":"rectangle","center":(60,70),"width":30,"height":40}, {"shape":"rectangle","center":(350,370),"width":20,"height":50}, {"shape":"circle","center":(250,250),"radius":50}, {"shape":"circle","center":(50,150),"radius":30}, {"shape":"circle","center":(170,110),"radius":20} ] start=(50,100) end=(400,400)
# Basic Sekeleton of Plan - Storing - At Particular Date - City where Tourist is supposed to be # And storing travelling period(starting and ending time of travel) on that day class SkeletonEvent: def __init__(self, planid, date, city, startingTime, endingTime, stayingHotel) -> None: self.planid = planid self.date = date self.city = city self.startingTime = startingTime self.endingTime = endingTime self.stayingHotel = stayingHotel
stock_dict = { 'GE': 'General Electric', 'CAT': 'Caterpillar', 'GM': 'General Motors' } purchases = [ ( 'GE', 100, '10-sep-2001', 48 ), ( 'CAT', 100, '1-apr-1999', 24 ), ( 'GM', 200, '1-jul-1998', 56 ), ( 'GM', 150, '3-jul-1998', 47 ) ] total_portfolio_value = 0 for transaction in purchases: # each transaction is a tuple. stock_ticker = transaction[0] number_of_shares = transaction[1] transaction_date = transaction[2] stock_price = transaction[3] company_name = stock_dict[stock_ticker] purchase_price = number_of_shares * stock_price total_portfolio_value += purchase_price output = ['I bought {0} shares '.format(number_of_shares)] output.append('of {0} stock '.format(company_name)) output.append('at {0} dollars per share, '.format(stock_price)) output.append('for a total price of ${0}.'.format(purchase_price)) print(''.join(partial for partial in output)) # output = ['The total value of my investment in {0} is '.format()] output = ['The total value of my stock portfolio is {0}'.format(total_portfolio_value)] print(output) # could also be something like this: # [print ('I own {0} shares of {1} stock at ${2} for a total of ${3}'.format(p[3], p[0], p[1], (p[1] * p[3])) for p in purchases]
N, M, *C = map(int, open(0).read().split()) C.sort() for i in range(N): M -= C[i] if M <= 0: break if M >= 0: print(i + 1) elif M < 0: print(i)
"""Lab 2: Lambda Expressions and Higher Order Functions""" # Lambda Functions def lambda_curry2(func): """ Returns a Curried version of a two-argument function FUNC. >>> from operator import add >>> curried_add = lambda_curry2(add) >>> add_three = curried_add(3) >>> add_three(5) 8 """ "*** YOUR CODE HERE ***" return lambda x: lambda y: func(x,y) def count_cond(condition): """Returns a function with one parameter N that counts all the numbers from 1 to N that satisfy the two-argument predicate function Condition, where the first argument for Condition is N and the second argument is the number from 1 to N. >>> count_factors = count_cond(lambda n, i: n % i == 0) >>> count_factors(2) # 1, 2 2 >>> count_factors(4) # 1, 2, 4 3 >>> count_factors(12) # 1, 2, 3, 4, 6, 12 6 >>> is_prime = lambda n, i: count_factors(i) == 2 >>> count_primes = count_cond(is_prime) >>> count_primes(2) # 2 1 >>> count_primes(3) # 2, 3 2 >>> count_primes(4) # 2, 3 2 >>> count_primes(5) # 2, 3, 5 3 >>> count_primes(20) # 2, 3, 5, 7, 11, 13, 17, 19 8 """ "*** YOUR CODE HERE ***" def count(n): i, c = 1, 0 while i <= n: if condition(n,i): c += 1 i += 1 return c return count
"""HTML character entity references.""" __all__ = ['html5', 'name2codepoint', 'codepoint2name', 'entitydefs'] name2codepoint = {'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 192, 'Alpha': 913, 'Aring': 197, 'Atilde': 195, 'Auml': 196, 'Beta': 914, 'Ccedil': 199, 'Chi': 935, 'Dagger': 8225, 'Delta': 916, 'ETH': 208, 'Eacute': 201, 'Ecirc': 202, 'Egrave': 200, 'Epsilon': 917, 'Eta': 919, 'Euml': 203, 'Gamma': 915, 'Iacute': 205, 'Icirc': 206, 'Igrave': 204, 'Iota': 921, 'Iuml': 207, 'Kappa': 922, 'Lambda': 923, 'Mu': 924, 'Ntilde': 209, 'Nu': 925, 'OElig': 338, 'Oacute': 211, 'Ocirc': 212, 'Ograve': 210, 'Omega': 937, 'Omicron': 927, 'Oslash': 216, 'Otilde': 213, 'Ouml': 214, 'Phi': 934, 'Pi': 928, 'Prime': 8243, 'Psi': 936, 'Rho': 929, 'Scaron': 352, 'Sigma': 931, 'THORN': 222, 'Tau': 932, 'Theta': 920, 'Uacute': 218, 'Ucirc': 219, 'Ugrave': 217, 'Upsilon': 933, 'Uuml': 220, 'Xi': 926, 'Yacute': 221, 'Yuml': 376, 'Zeta': 918, 'aacute': 225, 'acirc': 226, 'acute': 180, 'aelig': 230, 'agrave': 224, 'alefsym': 8501, 'alpha': 945, 'amp': 38, 'and': 8743, 'ang': 8736, 'aring': 229, 'asymp': 8776, 'atilde': 227, 'auml': 228, 'bdquo': 8222, 'beta': 946, 'brvbar': 166, 'bull': 8226, 'cap': 8745, 'ccedil': 231, 'cedil': 184, 'cent': 162, 'chi': 967, 'circ': 710, 'clubs': 9827, 'cong': 8773, 'copy': 169, 'crarr': 8629, 'cup': 8746, 'curren': 164, 'dArr': 8659, 'dagger': 8224, 'darr': 8595, 'deg': 176, 'delta': 948, 'diams': 9830, 'divide': 247, 'eacute': 233, 'ecirc': 234, 'egrave': 232, 'empty': 8709, 'emsp': 8195, 'ensp': 8194, 'epsilon': 949, 'equiv': 8801, 'eta': 951, 'eth': 240, 'euml': 235, 'euro': 8364, 'exist': 8707, 'fnof': 402, 'forall': 8704, 'frac12': 189, 'frac14': 188, 'frac34': 190, 'frasl': 8260, 'gamma': 947, 'ge': 8805, 'gt': 62, 'hArr': 8660, 'harr': 8596, 'hearts': 9829, 'hellip': 8230, 'iacute': 237, 'icirc': 238, 'iexcl': 161, 'igrave': 236, 'image': 8465, 'infin': 8734, 'int': 8747, 'iota': 953, 'iquest': 191, 'isin': 8712, 'iuml': 239, 'kappa': 954, 'lArr': 8656, 'lambda': 955, 'lang': 9001, 'laquo': 171, 'larr': 8592, 'lceil': 8968, 'ldquo': 8220, 'le': 8804, 'lfloor': 8970, 'lowast': 8727, 'loz': 9674, 'lrm': 8206, 'lsaquo': 8249, 'lsquo': 8216, 'lt': 60, 'macr': 175, 'mdash': 8212, 'micro': 181, 'middot': 183, 'minus': 8722, 'mu': 956, 'nabla': 8711, 'nbsp': 160, 'ndash': 8211, 'ne': 8800, 'ni': 8715, 'not': 172, 'notin': 8713, 'nsub': 8836, 'ntilde': 241, 'nu': 957, 'oacute': 243, 'ocirc': 244, 'oelig': 339, 'ograve': 242, 'oline': 8254, 'omega': 969, 'omicron': 959, 'oplus': 8853, 'or': 8744, 'ordf': 170, 'ordm': 186, 'oslash': 248, 'otilde': 245, 'otimes': 8855, 'ouml': 246, 'para': 182, 'part': 8706, 'permil': 8240, 'perp': 8869, 'phi': 966, 'pi': 960, 'piv': 982, 'plusmn': 177, 'pound': 163, 'prime': 8242, 'prod': 8719, 'prop': 8733, 'psi': 968, 'quot': 34, 'rArr': 8658, 'radic': 8730, 'rang': 9002, 'raquo': 187, 'rarr': 8594, 'rceil': 8969, 'rdquo': 8221, 'real': 8476, 'reg': 174, 'rfloor': 8971, 'rho': 961, 'rlm': 8207, 'rsaquo': 8250, 'rsquo': 8217, 'sbquo': 8218, 'scaron': 353, 'sdot': 8901, 'sect': 167, 'shy': 173, 'sigma': 963, 'sigmaf': 962, 'sim': 8764, 'spades': 9824, 'sub': 8834, 'sube': 8838, 'sum': 8721, 'sup': 8835, 'sup1': 185, 'sup2': 178, 'sup3': 179, 'supe': 8839, 'szlig': 223, 'tau': 964, 'there4': 8756, 'theta': 952, 'thetasym': 977, 'thinsp': 8201, 'thorn': 254, 'tilde': 732, 'times': 215, 'trade': 8482, 'uArr': 8657, 'uacute': 250, 'uarr': 8593, 'ucirc': 251, 'ugrave': 249, 'uml': 168, 'upsih': 978, 'upsilon': 965, 'uuml': 252, 'weierp': 8472, 'xi': 958, 'yacute': 253, 'yen': 165, 'yuml': 255, 'zeta': 950, 'zwj': 8205, 'zwnj': 8204} html5 = {'Aacute': 'Á', 'aacute': 'á', 'Aacute;': 'Á', 'aacute;': 'á', 'Abreve;': 'Ă', 'abreve;': 'ă', 'ac;': '∾', 'acd;': '∿', 'acE;': '∾̳', 'Acirc': 'Â', 'acirc': 'â', 'Acirc;': 'Â', 'acirc;': 'â', 'acute': '´', 'acute;': '´', 'Acy;': 'А', 'acy;': 'а', 'AElig': 'Æ', 'aelig': 'æ', 'AElig;': 'Æ', 'aelig;': 'æ', 'af;': '\u2061', 'Afr;': '𝔄', 'afr;': '𝔞', 'Agrave': 'À', 'agrave': 'à', 'Agrave;': 'À', 'agrave;': 'à', 'alefsym;': 'ℵ', 'aleph;': 'ℵ', 'Alpha;': 'Α', 'alpha;': 'α', 'Amacr;': 'Ā', 'amacr;': 'ā', 'amalg;': '⨿', 'AMP': '&', 'amp': '&', 'AMP;': '&', 'amp;': '&', 'And;': '⩓', 'and;': '∧', 'andand;': '⩕', 'andd;': '⩜', 'andslope;': '⩘', 'andv;': '⩚', 'ang;': '∠', 'ange;': '⦤', 'angle;': '∠', 'angmsd;': '∡', 'angmsdaa;': '⦨', 'angmsdab;': '⦩', 'angmsdac;': '⦪', 'angmsdad;': '⦫', 'angmsdae;': '⦬', 'angmsdaf;': '⦭', 'angmsdag;': '⦮', 'angmsdah;': '⦯', 'angrt;': '∟', 'angrtvb;': '⊾', 'angrtvbd;': '⦝', 'angsph;': '∢', 'angst;': 'Å', 'angzarr;': '⍼', 'Aogon;': 'Ą', 'aogon;': 'ą', 'Aopf;': '𝔸', 'aopf;': '𝕒', 'ap;': '≈', 'apacir;': '⩯', 'apE;': '⩰', 'ape;': '≊', 'apid;': '≋', 'apos;': "'", 'ApplyFunction;': '\u2061', 'approx;': '≈', 'approxeq;': '≊', 'Aring': 'Å', 'aring': 'å', 'Aring;': 'Å', 'aring;': 'å', 'Ascr;': '𝒜', 'ascr;': '𝒶', 'Assign;': '≔', 'ast;': '*', 'asymp;': '≈', 'asympeq;': '≍', 'Atilde': 'Ã', 'atilde': 'ã', 'Atilde;': 'Ã', 'atilde;': 'ã', 'Auml': 'Ä', 'auml': 'ä', 'Auml;': 'Ä', 'auml;': 'ä', 'awconint;': '∳', 'awint;': '⨑', 'backcong;': '≌', 'backepsilon;': '϶', 'backprime;': '‵', 'backsim;': '∽', 'backsimeq;': '⋍', 'Backslash;': '∖', 'Barv;': '⫧', 'barvee;': '⊽', 'Barwed;': '⌆', 'barwed;': '⌅', 'barwedge;': '⌅', 'bbrk;': '⎵', 'bbrktbrk;': '⎶', 'bcong;': '≌', 'Bcy;': 'Б', 'bcy;': 'б', 'bdquo;': '„', 'becaus;': '∵', 'Because;': '∵', 'because;': '∵', 'bemptyv;': '⦰', 'bepsi;': '϶', 'bernou;': 'ℬ', 'Bernoullis;': 'ℬ', 'Beta;': 'Β', 'beta;': 'β', 'beth;': 'ℶ', 'between;': '≬', 'Bfr;': '𝔅', 'bfr;': '𝔟', 'bigcap;': '⋂', 'bigcirc;': '◯', 'bigcup;': '⋃', 'bigodot;': '⨀', 'bigoplus;': '⨁', 'bigotimes;': '⨂', 'bigsqcup;': '⨆', 'bigstar;': '★', 'bigtriangledown;': '▽', 'bigtriangleup;': '△', 'biguplus;': '⨄', 'bigvee;': '⋁', 'bigwedge;': '⋀', 'bkarow;': '⤍', 'blacklozenge;': '⧫', 'blacksquare;': '▪', 'blacktriangle;': '▴', 'blacktriangledown;': '▾', 'blacktriangleleft;': '◂', 'blacktriangleright;': '▸', 'blank;': '␣', 'blk12;': '▒', 'blk14;': '░', 'blk34;': '▓', 'block;': '█', 'bne;': '=⃥', 'bnequiv;': '≡⃥', 'bNot;': '⫭', 'bnot;': '⌐', 'Bopf;': '𝔹', 'bopf;': '𝕓', 'bot;': '⊥', 'bottom;': '⊥', 'bowtie;': '⋈', 'boxbox;': '⧉', 'boxDL;': '╗', 'boxDl;': '╖', 'boxdL;': '╕', 'boxdl;': '┐', 'boxDR;': '╔', 'boxDr;': '╓', 'boxdR;': '╒', 'boxdr;': '┌', 'boxH;': '═', 'boxh;': '─', 'boxHD;': '╦', 'boxHd;': '╤', 'boxhD;': '╥', 'boxhd;': '┬', 'boxHU;': '╩', 'boxHu;': '╧', 'boxhU;': '╨', 'boxhu;': '┴', 'boxminus;': '⊟', 'boxplus;': '⊞', 'boxtimes;': '⊠', 'boxUL;': '╝', 'boxUl;': '╜', 'boxuL;': '╛', 'boxul;': '┘', 'boxUR;': '╚', 'boxUr;': '╙', 'boxuR;': '╘', 'boxur;': '└', 'boxV;': '║', 'boxv;': '│', 'boxVH;': '╬', 'boxVh;': '╫', 'boxvH;': '╪', 'boxvh;': '┼', 'boxVL;': '╣', 'boxVl;': '╢', 'boxvL;': '╡', 'boxvl;': '┤', 'boxVR;': '╠', 'boxVr;': '╟', 'boxvR;': '╞', 'boxvr;': '├', 'bprime;': '‵', 'Breve;': '˘', 'breve;': '˘', 'brvbar': '¦', 'brvbar;': '¦', 'Bscr;': 'ℬ', 'bscr;': '𝒷', 'bsemi;': '⁏', 'bsim;': '∽', 'bsime;': '⋍', 'bsol;': '\\', 'bsolb;': '⧅', 'bsolhsub;': '⟈', 'bull;': '•', 'bullet;': '•', 'bump;': '≎', 'bumpE;': '⪮', 'bumpe;': '≏', 'Bumpeq;': '≎', 'bumpeq;': '≏', 'Cacute;': 'Ć', 'cacute;': 'ć', 'Cap;': '⋒', 'cap;': '∩', 'capand;': '⩄', 'capbrcup;': '⩉', 'capcap;': '⩋', 'capcup;': '⩇', 'capdot;': '⩀', 'CapitalDifferentialD;': 'ⅅ', 'caps;': '∩︀', 'caret;': '⁁', 'caron;': 'ˇ', 'Cayleys;': 'ℭ', 'ccaps;': '⩍', 'Ccaron;': 'Č', 'ccaron;': 'č', 'Ccedil': 'Ç', 'ccedil': 'ç', 'Ccedil;': 'Ç', 'ccedil;': 'ç', 'Ccirc;': 'Ĉ', 'ccirc;': 'ĉ', 'Cconint;': '∰', 'ccups;': '⩌', 'ccupssm;': '⩐', 'Cdot;': 'Ċ', 'cdot;': 'ċ', 'cedil': '¸', 'cedil;': '¸', 'Cedilla;': '¸', 'cemptyv;': '⦲', 'cent': '¢', 'cent;': '¢', 'CenterDot;': '·', 'centerdot;': '·', 'Cfr;': 'ℭ', 'cfr;': '𝔠', 'CHcy;': 'Ч', 'chcy;': 'ч', 'check;': '✓', 'checkmark;': '✓', 'Chi;': 'Χ', 'chi;': 'χ', 'cir;': '○', 'circ;': 'ˆ', 'circeq;': '≗', 'circlearrowleft;': '↺', 'circlearrowright;': '↻', 'circledast;': '⊛', 'circledcirc;': '⊚', 'circleddash;': '⊝', 'CircleDot;': '⊙', 'circledR;': '®', 'circledS;': 'Ⓢ', 'CircleMinus;': '⊖', 'CirclePlus;': '⊕', 'CircleTimes;': '⊗', 'cirE;': '⧃', 'cire;': '≗', 'cirfnint;': '⨐', 'cirmid;': '⫯', 'cirscir;': '⧂', 'ClockwiseContourIntegral;': '∲', 'CloseCurlyDoubleQuote;': '”', 'CloseCurlyQuote;': '’', 'clubs;': '♣', 'clubsuit;': '♣', 'Colon;': '∷', 'colon;': ':', 'Colone;': '⩴', 'colone;': '≔', 'coloneq;': '≔', 'comma;': ',', 'commat;': '@', 'comp;': '∁', 'compfn;': '∘', 'complement;': '∁', 'complexes;': 'ℂ', 'cong;': '≅', 'congdot;': '⩭', 'Congruent;': '≡', 'Conint;': '∯', 'conint;': '∮', 'ContourIntegral;': '∮', 'Copf;': 'ℂ', 'copf;': '𝕔', 'coprod;': '∐', 'Coproduct;': '∐', 'COPY': '©', 'copy': '©', 'COPY;': '©', 'copy;': '©', 'copysr;': '℗', 'CounterClockwiseContourIntegral;': '∳', 'crarr;': '↵', 'Cross;': '⨯', 'cross;': '✗', 'Cscr;': '𝒞', 'cscr;': '𝒸', 'csub;': '⫏', 'csube;': '⫑', 'csup;': '⫐', 'csupe;': '⫒', 'ctdot;': '⋯', 'cudarrl;': '⤸', 'cudarrr;': '⤵', 'cuepr;': '⋞', 'cuesc;': '⋟', 'cularr;': '↶', 'cularrp;': '⤽', 'Cup;': '⋓', 'cup;': '∪', 'cupbrcap;': '⩈', 'CupCap;': '≍', 'cupcap;': '⩆', 'cupcup;': '⩊', 'cupdot;': '⊍', 'cupor;': '⩅', 'cups;': '∪︀', 'curarr;': '↷', 'curarrm;': '⤼', 'curlyeqprec;': '⋞', 'curlyeqsucc;': '⋟', 'curlyvee;': '⋎', 'curlywedge;': '⋏', 'curren': '¤', 'curren;': '¤', 'curvearrowleft;': '↶', 'curvearrowright;': '↷', 'cuvee;': '⋎', 'cuwed;': '⋏', 'cwconint;': '∲', 'cwint;': '∱', 'cylcty;': '⌭', 'Dagger;': '‡', 'dagger;': '†', 'daleth;': 'ℸ', 'Darr;': '↡', 'dArr;': '⇓', 'darr;': '↓', 'dash;': '‐', 'Dashv;': '⫤', 'dashv;': '⊣', 'dbkarow;': '⤏', 'dblac;': '˝', 'Dcaron;': 'Ď', 'dcaron;': 'ď', 'Dcy;': 'Д', 'dcy;': 'д', 'DD;': 'ⅅ', 'dd;': 'ⅆ', 'ddagger;': '‡', 'ddarr;': '⇊', 'DDotrahd;': '⤑', 'ddotseq;': '⩷', 'deg': '°', 'deg;': '°', 'Del;': '∇', 'Delta;': 'Δ', 'delta;': 'δ', 'demptyv;': '⦱', 'dfisht;': '⥿', 'Dfr;': '𝔇', 'dfr;': '𝔡', 'dHar;': '⥥', 'dharl;': '⇃', 'dharr;': '⇂', 'DiacriticalAcute;': '´', 'DiacriticalDot;': '˙', 'DiacriticalDoubleAcute;': '˝', 'DiacriticalGrave;': '`', 'DiacriticalTilde;': '˜', 'diam;': '⋄', 'Diamond;': '⋄', 'diamond;': '⋄', 'diamondsuit;': '♦', 'diams;': '♦', 'die;': '¨', 'DifferentialD;': 'ⅆ', 'digamma;': 'ϝ', 'disin;': '⋲', 'div;': '÷', 'divide': '÷', 'divide;': '÷', 'divideontimes;': '⋇', 'divonx;': '⋇', 'DJcy;': 'Ђ', 'djcy;': 'ђ', 'dlcorn;': '⌞', 'dlcrop;': '⌍', 'dollar;': '$', 'Dopf;': '𝔻', 'dopf;': '𝕕', 'Dot;': '¨', 'dot;': '˙', 'DotDot;': '⃜', 'doteq;': '≐', 'doteqdot;': '≑', 'DotEqual;': '≐', 'dotminus;': '∸', 'dotplus;': '∔', 'dotsquare;': '⊡', 'doublebarwedge;': '⌆', 'DoubleContourIntegral;': '∯', 'DoubleDot;': '¨', 'DoubleDownArrow;': '⇓', 'DoubleLeftArrow;': '⇐', 'DoubleLeftRightArrow;': '⇔', 'DoubleLeftTee;': '⫤', 'DoubleLongLeftArrow;': '⟸', 'DoubleLongLeftRightArrow;': '⟺', 'DoubleLongRightArrow;': '⟹', 'DoubleRightArrow;': '⇒', 'DoubleRightTee;': '⊨', 'DoubleUpArrow;': '⇑', 'DoubleUpDownArrow;': '⇕', 'DoubleVerticalBar;': '∥', 'DownArrow;': '↓', 'Downarrow;': '⇓', 'downarrow;': '↓', 'DownArrowBar;': '⤓', 'DownArrowUpArrow;': '⇵', 'DownBreve;': '̑', 'downdownarrows;': '⇊', 'downharpoonleft;': '⇃', 'downharpoonright;': '⇂', 'DownLeftRightVector;': '⥐', 'DownLeftTeeVector;': '⥞', 'DownLeftVector;': '↽', 'DownLeftVectorBar;': '⥖', 'DownRightTeeVector;': '⥟', 'DownRightVector;': '⇁', 'DownRightVectorBar;': '⥗', 'DownTee;': '⊤', 'DownTeeArrow;': '↧', 'drbkarow;': '⤐', 'drcorn;': '⌟', 'drcrop;': '⌌', 'Dscr;': '𝒟', 'dscr;': '𝒹', 'DScy;': 'Ѕ', 'dscy;': 'ѕ', 'dsol;': '⧶', 'Dstrok;': 'Đ', 'dstrok;': 'đ', 'dtdot;': '⋱', 'dtri;': '▿', 'dtrif;': '▾', 'duarr;': '⇵', 'duhar;': '⥯', 'dwangle;': '⦦', 'DZcy;': 'Џ', 'dzcy;': 'џ', 'dzigrarr;': '⟿', 'Eacute': 'É', 'eacute': 'é', 'Eacute;': 'É', 'eacute;': 'é', 'easter;': '⩮', 'Ecaron;': 'Ě', 'ecaron;': 'ě', 'ecir;': '≖', 'Ecirc': 'Ê', 'ecirc': 'ê', 'Ecirc;': 'Ê', 'ecirc;': 'ê', 'ecolon;': '≕', 'Ecy;': 'Э', 'ecy;': 'э', 'eDDot;': '⩷', 'Edot;': 'Ė', 'eDot;': '≑', 'edot;': 'ė', 'ee;': 'ⅇ', 'efDot;': '≒', 'Efr;': '𝔈', 'efr;': '𝔢', 'eg;': '⪚', 'Egrave': 'È', 'egrave': 'è', 'Egrave;': 'È', 'egrave;': 'è', 'egs;': '⪖', 'egsdot;': '⪘', 'el;': '⪙', 'Element;': '∈', 'elinters;': '⏧', 'ell;': 'ℓ', 'els;': '⪕', 'elsdot;': '⪗', 'Emacr;': 'Ē', 'emacr;': 'ē', 'empty;': '∅', 'emptyset;': '∅', 'EmptySmallSquare;': '◻', 'emptyv;': '∅', 'EmptyVerySmallSquare;': '▫', 'emsp13;': '\u2004', 'emsp14;': '\u2005', 'emsp;': '\u2003', 'ENG;': 'Ŋ', 'eng;': 'ŋ', 'ensp;': '\u2002', 'Eogon;': 'Ę', 'eogon;': 'ę', 'Eopf;': '𝔼', 'eopf;': '𝕖', 'epar;': '⋕', 'eparsl;': '⧣', 'eplus;': '⩱', 'epsi;': 'ε', 'Epsilon;': 'Ε', 'epsilon;': 'ε', 'epsiv;': 'ϵ', 'eqcirc;': '≖', 'eqcolon;': '≕', 'eqsim;': '≂', 'eqslantgtr;': '⪖', 'eqslantless;': '⪕', 'Equal;': '⩵', 'equals;': '=', 'EqualTilde;': '≂', 'equest;': '≟', 'Equilibrium;': '⇌', 'equiv;': '≡', 'equivDD;': '⩸', 'eqvparsl;': '⧥', 'erarr;': '⥱', 'erDot;': '≓', 'Escr;': 'ℰ', 'escr;': 'ℯ', 'esdot;': '≐', 'Esim;': '⩳', 'esim;': '≂', 'Eta;': 'Η', 'eta;': 'η', 'ETH': 'Ð', 'eth': 'ð', 'ETH;': 'Ð', 'eth;': 'ð', 'Euml': 'Ë', 'euml': 'ë', 'Euml;': 'Ë', 'euml;': 'ë', 'euro;': '€', 'excl;': '!', 'exist;': '∃', 'Exists;': '∃', 'expectation;': 'ℰ', 'ExponentialE;': 'ⅇ', 'exponentiale;': 'ⅇ', 'fallingdotseq;': '≒', 'Fcy;': 'Ф', 'fcy;': 'ф', 'female;': '♀', 'ffilig;': 'ffi', 'fflig;': 'ff', 'ffllig;': 'ffl', 'Ffr;': '𝔉', 'ffr;': '𝔣', 'filig;': 'fi', 'FilledSmallSquare;': '◼', 'FilledVerySmallSquare;': '▪', 'fjlig;': 'fj', 'flat;': '♭', 'fllig;': 'fl', 'fltns;': '▱', 'fnof;': 'ƒ', 'Fopf;': '𝔽', 'fopf;': '𝕗', 'ForAll;': '∀', 'forall;': '∀', 'fork;': '⋔', 'forkv;': '⫙', 'Fouriertrf;': 'ℱ', 'fpartint;': '⨍', 'frac12': '½', 'frac12;': '½', 'frac13;': '⅓', 'frac14': '¼', 'frac14;': '¼', 'frac15;': '⅕', 'frac16;': '⅙', 'frac18;': '⅛', 'frac23;': '⅔', 'frac25;': '⅖', 'frac34': '¾', 'frac34;': '¾', 'frac35;': '⅗', 'frac38;': '⅜', 'frac45;': '⅘', 'frac56;': '⅚', 'frac58;': '⅝', 'frac78;': '⅞', 'frasl;': '⁄', 'frown;': '⌢', 'Fscr;': 'ℱ', 'fscr;': '𝒻', 'gacute;': 'ǵ', 'Gamma;': 'Γ', 'gamma;': 'γ', 'Gammad;': 'Ϝ', 'gammad;': 'ϝ', 'gap;': '⪆', 'Gbreve;': 'Ğ', 'gbreve;': 'ğ', 'Gcedil;': 'Ģ', 'Gcirc;': 'Ĝ', 'gcirc;': 'ĝ', 'Gcy;': 'Г', 'gcy;': 'г', 'Gdot;': 'Ġ', 'gdot;': 'ġ', 'gE;': '≧', 'ge;': '≥', 'gEl;': '⪌', 'gel;': '⋛', 'geq;': '≥', 'geqq;': '≧', 'geqslant;': '⩾', 'ges;': '⩾', 'gescc;': '⪩', 'gesdot;': '⪀', 'gesdoto;': '⪂', 'gesdotol;': '⪄', 'gesl;': '⋛︀', 'gesles;': '⪔', 'Gfr;': '𝔊', 'gfr;': '𝔤', 'Gg;': '⋙', 'gg;': '≫', 'ggg;': '⋙', 'gimel;': 'ℷ', 'GJcy;': 'Ѓ', 'gjcy;': 'ѓ', 'gl;': '≷', 'gla;': '⪥', 'glE;': '⪒', 'glj;': '⪤', 'gnap;': '⪊', 'gnapprox;': '⪊', 'gnE;': '≩', 'gne;': '⪈', 'gneq;': '⪈', 'gneqq;': '≩', 'gnsim;': '⋧', 'Gopf;': '𝔾', 'gopf;': '𝕘', 'grave;': '`', 'GreaterEqual;': '≥', 'GreaterEqualLess;': '⋛', 'GreaterFullEqual;': '≧', 'GreaterGreater;': '⪢', 'GreaterLess;': '≷', 'GreaterSlantEqual;': '⩾', 'GreaterTilde;': '≳', 'Gscr;': '𝒢', 'gscr;': 'ℊ', 'gsim;': '≳', 'gsime;': '⪎', 'gsiml;': '⪐', 'GT': '>', 'gt': '>', 'GT;': '>', 'Gt;': '≫', 'gt;': '>', 'gtcc;': '⪧', 'gtcir;': '⩺', 'gtdot;': '⋗', 'gtlPar;': '⦕', 'gtquest;': '⩼', 'gtrapprox;': '⪆', 'gtrarr;': '⥸', 'gtrdot;': '⋗', 'gtreqless;': '⋛', 'gtreqqless;': '⪌', 'gtrless;': '≷', 'gtrsim;': '≳', 'gvertneqq;': '≩︀', 'gvnE;': '≩︀', 'Hacek;': 'ˇ', 'hairsp;': '\u200a', 'half;': '½', 'hamilt;': 'ℋ', 'HARDcy;': 'Ъ', 'hardcy;': 'ъ', 'hArr;': '⇔', 'harr;': '↔', 'harrcir;': '⥈', 'harrw;': '↭', 'Hat;': '^', 'hbar;': 'ℏ', 'Hcirc;': 'Ĥ', 'hcirc;': 'ĥ', 'hearts;': '♥', 'heartsuit;': '♥', 'hellip;': '…', 'hercon;': '⊹', 'Hfr;': 'ℌ', 'hfr;': '𝔥', 'HilbertSpace;': 'ℋ', 'hksearow;': '⤥', 'hkswarow;': '⤦', 'hoarr;': '⇿', 'homtht;': '∻', 'hookleftarrow;': '↩', 'hookrightarrow;': '↪', 'Hopf;': 'ℍ', 'hopf;': '𝕙', 'horbar;': '―', 'HorizontalLine;': '─', 'Hscr;': 'ℋ', 'hscr;': '𝒽', 'hslash;': 'ℏ', 'Hstrok;': 'Ħ', 'hstrok;': 'ħ', 'HumpDownHump;': '≎', 'HumpEqual;': '≏', 'hybull;': '⁃', 'hyphen;': '‐', 'Iacute': 'Í', 'iacute': 'í', 'Iacute;': 'Í', 'iacute;': 'í', 'ic;': '\u2063', 'Icirc': 'Î', 'icirc': 'î', 'Icirc;': 'Î', 'icirc;': 'î', 'Icy;': 'И', 'icy;': 'и', 'Idot;': 'İ', 'IEcy;': 'Е', 'iecy;': 'е', 'iexcl': '¡', 'iexcl;': '¡', 'iff;': '⇔', 'Ifr;': 'ℑ', 'ifr;': '𝔦', 'Igrave': 'Ì', 'igrave': 'ì', 'Igrave;': 'Ì', 'igrave;': 'ì', 'ii;': 'ⅈ', 'iiiint;': '⨌', 'iiint;': '∭', 'iinfin;': '⧜', 'iiota;': '℩', 'IJlig;': 'IJ', 'ijlig;': 'ij', 'Im;': 'ℑ', 'Imacr;': 'Ī', 'imacr;': 'ī', 'image;': 'ℑ', 'ImaginaryI;': 'ⅈ', 'imagline;': 'ℐ', 'imagpart;': 'ℑ', 'imath;': 'ı', 'imof;': '⊷', 'imped;': 'Ƶ', 'Implies;': '⇒', 'in;': '∈', 'incare;': '℅', 'infin;': '∞', 'infintie;': '⧝', 'inodot;': 'ı', 'Int;': '∬', 'int;': '∫', 'intcal;': '⊺', 'integers;': 'ℤ', 'Integral;': '∫', 'intercal;': '⊺', 'Intersection;': '⋂', 'intlarhk;': '⨗', 'intprod;': '⨼', 'InvisibleComma;': '\u2063', 'InvisibleTimes;': '\u2062', 'IOcy;': 'Ё', 'iocy;': 'ё', 'Iogon;': 'Į', 'iogon;': 'į', 'Iopf;': '𝕀', 'iopf;': '𝕚', 'Iota;': 'Ι', 'iota;': 'ι', 'iprod;': '⨼', 'iquest': '¿', 'iquest;': '¿', 'Iscr;': 'ℐ', 'iscr;': '𝒾', 'isin;': '∈', 'isindot;': '⋵', 'isinE;': '⋹', 'isins;': '⋴', 'isinsv;': '⋳', 'isinv;': '∈', 'it;': '\u2062', 'Itilde;': 'Ĩ', 'itilde;': 'ĩ', 'Iukcy;': 'І', 'iukcy;': 'і', 'Iuml': 'Ï', 'iuml': 'ï', 'Iuml;': 'Ï', 'iuml;': 'ï', 'Jcirc;': 'Ĵ', 'jcirc;': 'ĵ', 'Jcy;': 'Й', 'jcy;': 'й', 'Jfr;': '𝔍', 'jfr;': '𝔧', 'jmath;': 'ȷ', 'Jopf;': '𝕁', 'jopf;': '𝕛', 'Jscr;': '𝒥', 'jscr;': '𝒿', 'Jsercy;': 'Ј', 'jsercy;': 'ј', 'Jukcy;': 'Є', 'jukcy;': 'є', 'Kappa;': 'Κ', 'kappa;': 'κ', 'kappav;': 'ϰ', 'Kcedil;': 'Ķ', 'kcedil;': 'ķ', 'Kcy;': 'К', 'kcy;': 'к', 'Kfr;': '𝔎', 'kfr;': '𝔨', 'kgreen;': 'ĸ', 'KHcy;': 'Х', 'khcy;': 'х', 'KJcy;': 'Ќ', 'kjcy;': 'ќ', 'Kopf;': '𝕂', 'kopf;': '𝕜', 'Kscr;': '𝒦', 'kscr;': '𝓀', 'lAarr;': '⇚', 'Lacute;': 'Ĺ', 'lacute;': 'ĺ', 'laemptyv;': '⦴', 'lagran;': 'ℒ', 'Lambda;': 'Λ', 'lambda;': 'λ', 'Lang;': '⟪', 'lang;': '⟨', 'langd;': '⦑', 'langle;': '⟨', 'lap;': '⪅', 'Laplacetrf;': 'ℒ', 'laquo': '«', 'laquo;': '«', 'Larr;': '↞', 'lArr;': '⇐', 'larr;': '←', 'larrb;': '⇤', 'larrbfs;': '⤟', 'larrfs;': '⤝', 'larrhk;': '↩', 'larrlp;': '↫', 'larrpl;': '⤹', 'larrsim;': '⥳', 'larrtl;': '↢', 'lat;': '⪫', 'lAtail;': '⤛', 'latail;': '⤙', 'late;': '⪭', 'lates;': '⪭︀', 'lBarr;': '⤎', 'lbarr;': '⤌', 'lbbrk;': '❲', 'lbrace;': '{', 'lbrack;': '[', 'lbrke;': '⦋', 'lbrksld;': '⦏', 'lbrkslu;': '⦍', 'Lcaron;': 'Ľ', 'lcaron;': 'ľ', 'Lcedil;': 'Ļ', 'lcedil;': 'ļ', 'lceil;': '⌈', 'lcub;': '{', 'Lcy;': 'Л', 'lcy;': 'л', 'ldca;': '⤶', 'ldquo;': '“', 'ldquor;': '„', 'ldrdhar;': '⥧', 'ldrushar;': '⥋', 'ldsh;': '↲', 'lE;': '≦', 'le;': '≤', 'LeftAngleBracket;': '⟨', 'LeftArrow;': '←', 'Leftarrow;': '⇐', 'leftarrow;': '←', 'LeftArrowBar;': '⇤', 'LeftArrowRightArrow;': '⇆', 'leftarrowtail;': '↢', 'LeftCeiling;': '⌈', 'LeftDoubleBracket;': '⟦', 'LeftDownTeeVector;': '⥡', 'LeftDownVector;': '⇃', 'LeftDownVectorBar;': '⥙', 'LeftFloor;': '⌊', 'leftharpoondown;': '↽', 'leftharpoonup;': '↼', 'leftleftarrows;': '⇇', 'LeftRightArrow;': '↔', 'Leftrightarrow;': '⇔', 'leftrightarrow;': '↔', 'leftrightarrows;': '⇆', 'leftrightharpoons;': '⇋', 'leftrightsquigarrow;': '↭', 'LeftRightVector;': '⥎', 'LeftTee;': '⊣', 'LeftTeeArrow;': '↤', 'LeftTeeVector;': '⥚', 'leftthreetimes;': '⋋', 'LeftTriangle;': '⊲', 'LeftTriangleBar;': '⧏', 'LeftTriangleEqual;': '⊴', 'LeftUpDownVector;': '⥑', 'LeftUpTeeVector;': '⥠', 'LeftUpVector;': '↿', 'LeftUpVectorBar;': '⥘', 'LeftVector;': '↼', 'LeftVectorBar;': '⥒', 'lEg;': '⪋', 'leg;': '⋚', 'leq;': '≤', 'leqq;': '≦', 'leqslant;': '⩽', 'les;': '⩽', 'lescc;': '⪨', 'lesdot;': '⩿', 'lesdoto;': '⪁', 'lesdotor;': '⪃', 'lesg;': '⋚︀', 'lesges;': '⪓', 'lessapprox;': '⪅', 'lessdot;': '⋖', 'lesseqgtr;': '⋚', 'lesseqqgtr;': '⪋', 'LessEqualGreater;': '⋚', 'LessFullEqual;': '≦', 'LessGreater;': '≶', 'lessgtr;': '≶', 'LessLess;': '⪡', 'lesssim;': '≲', 'LessSlantEqual;': '⩽', 'LessTilde;': '≲', 'lfisht;': '⥼', 'lfloor;': '⌊', 'Lfr;': '𝔏', 'lfr;': '𝔩', 'lg;': '≶', 'lgE;': '⪑', 'lHar;': '⥢', 'lhard;': '↽', 'lharu;': '↼', 'lharul;': '⥪', 'lhblk;': '▄', 'LJcy;': 'Љ', 'ljcy;': 'љ', 'Ll;': '⋘', 'll;': '≪', 'llarr;': '⇇', 'llcorner;': '⌞', 'Lleftarrow;': '⇚', 'llhard;': '⥫', 'lltri;': '◺', 'Lmidot;': 'Ŀ', 'lmidot;': 'ŀ', 'lmoust;': '⎰', 'lmoustache;': '⎰', 'lnap;': '⪉', 'lnapprox;': '⪉', 'lnE;': '≨', 'lne;': '⪇', 'lneq;': '⪇', 'lneqq;': '≨', 'lnsim;': '⋦', 'loang;': '⟬', 'loarr;': '⇽', 'lobrk;': '⟦', 'LongLeftArrow;': '⟵', 'Longleftarrow;': '⟸', 'longleftarrow;': '⟵', 'LongLeftRightArrow;': '⟷', 'Longleftrightarrow;': '⟺', 'longleftrightarrow;': '⟷', 'longmapsto;': '⟼', 'LongRightArrow;': '⟶', 'Longrightarrow;': '⟹', 'longrightarrow;': '⟶', 'looparrowleft;': '↫', 'looparrowright;': '↬', 'lopar;': '⦅', 'Lopf;': '𝕃', 'lopf;': '𝕝', 'loplus;': '⨭', 'lotimes;': '⨴', 'lowast;': '∗', 'lowbar;': '_', 'LowerLeftArrow;': '↙', 'LowerRightArrow;': '↘', 'loz;': '◊', 'lozenge;': '◊', 'lozf;': '⧫', 'lpar;': '(', 'lparlt;': '⦓', 'lrarr;': '⇆', 'lrcorner;': '⌟', 'lrhar;': '⇋', 'lrhard;': '⥭', 'lrm;': '\u200e', 'lrtri;': '⊿', 'lsaquo;': '‹', 'Lscr;': 'ℒ', 'lscr;': '𝓁', 'Lsh;': '↰', 'lsh;': '↰', 'lsim;': '≲', 'lsime;': '⪍', 'lsimg;': '⪏', 'lsqb;': '[', 'lsquo;': '‘', 'lsquor;': '‚', 'Lstrok;': 'Ł', 'lstrok;': 'ł', 'LT': '<', 'lt': '<', 'LT;': '<', 'Lt;': '≪', 'lt;': '<', 'ltcc;': '⪦', 'ltcir;': '⩹', 'ltdot;': '⋖', 'lthree;': '⋋', 'ltimes;': '⋉', 'ltlarr;': '⥶', 'ltquest;': '⩻', 'ltri;': '◃', 'ltrie;': '⊴', 'ltrif;': '◂', 'ltrPar;': '⦖', 'lurdshar;': '⥊', 'luruhar;': '⥦', 'lvertneqq;': '≨︀', 'lvnE;': '≨︀', 'macr': '¯', 'macr;': '¯', 'male;': '♂', 'malt;': '✠', 'maltese;': '✠', 'Map;': '⤅', 'map;': '↦', 'mapsto;': '↦', 'mapstodown;': '↧', 'mapstoleft;': '↤', 'mapstoup;': '↥', 'marker;': '▮', 'mcomma;': '⨩', 'Mcy;': 'М', 'mcy;': 'м', 'mdash;': '—', 'mDDot;': '∺', 'measuredangle;': '∡', 'MediumSpace;': '\u205f', 'Mellintrf;': 'ℳ', 'Mfr;': '𝔐', 'mfr;': '𝔪', 'mho;': '℧', 'micro': 'µ', 'micro;': 'µ', 'mid;': '∣', 'midast;': '*', 'midcir;': '⫰', 'middot': '·', 'middot;': '·', 'minus;': '−', 'minusb;': '⊟', 'minusd;': '∸', 'minusdu;': '⨪', 'MinusPlus;': '∓', 'mlcp;': '⫛', 'mldr;': '…', 'mnplus;': '∓', 'models;': '⊧', 'Mopf;': '𝕄', 'mopf;': '𝕞', 'mp;': '∓', 'Mscr;': 'ℳ', 'mscr;': '𝓂', 'mstpos;': '∾', 'Mu;': 'Μ', 'mu;': 'μ', 'multimap;': '⊸', 'mumap;': '⊸', 'nabla;': '∇', 'Nacute;': 'Ń', 'nacute;': 'ń', 'nang;': '∠⃒', 'nap;': '≉', 'napE;': '⩰̸', 'napid;': '≋̸', 'napos;': 'ʼn', 'napprox;': '≉', 'natur;': '♮', 'natural;': '♮', 'naturals;': 'ℕ', 'nbsp': '\xa0', 'nbsp;': '\xa0', 'nbump;': '≎̸', 'nbumpe;': '≏̸', 'ncap;': '⩃', 'Ncaron;': 'Ň', 'ncaron;': 'ň', 'Ncedil;': 'Ņ', 'ncedil;': 'ņ', 'ncong;': '≇', 'ncongdot;': '⩭̸', 'ncup;': '⩂', 'Ncy;': 'Н', 'ncy;': 'н', 'ndash;': '–', 'ne;': '≠', 'nearhk;': '⤤', 'neArr;': '⇗', 'nearr;': '↗', 'nearrow;': '↗', 'nedot;': '≐̸', 'NegativeMediumSpace;': '\u200b', 'NegativeThickSpace;': '\u200b', 'NegativeThinSpace;': '\u200b', 'NegativeVeryThinSpace;': '\u200b', 'nequiv;': '≢', 'nesear;': '⤨', 'nesim;': '≂̸', 'NestedGreaterGreater;': '≫', 'NestedLessLess;': '≪', 'NewLine;': '\n', 'nexist;': '∄', 'nexists;': '∄', 'Nfr;': '𝔑', 'nfr;': '𝔫', 'ngE;': '≧̸', 'nge;': '≱', 'ngeq;': '≱', 'ngeqq;': '≧̸', 'ngeqslant;': '⩾̸', 'nges;': '⩾̸', 'nGg;': '⋙̸', 'ngsim;': '≵', 'nGt;': '≫⃒', 'ngt;': '≯', 'ngtr;': '≯', 'nGtv;': '≫̸', 'nhArr;': '⇎', 'nharr;': '↮', 'nhpar;': '⫲', 'ni;': '∋', 'nis;': '⋼', 'nisd;': '⋺', 'niv;': '∋', 'NJcy;': 'Њ', 'njcy;': 'њ', 'nlArr;': '⇍', 'nlarr;': '↚', 'nldr;': '‥', 'nlE;': '≦̸', 'nle;': '≰', 'nLeftarrow;': '⇍', 'nleftarrow;': '↚', 'nLeftrightarrow;': '⇎', 'nleftrightarrow;': '↮', 'nleq;': '≰', 'nleqq;': '≦̸', 'nleqslant;': '⩽̸', 'nles;': '⩽̸', 'nless;': '≮', 'nLl;': '⋘̸', 'nlsim;': '≴', 'nLt;': '≪⃒', 'nlt;': '≮', 'nltri;': '⋪', 'nltrie;': '⋬', 'nLtv;': '≪̸', 'nmid;': '∤', 'NoBreak;': '\u2060', 'NonBreakingSpace;': '\xa0', 'Nopf;': 'ℕ', 'nopf;': '𝕟', 'not': '¬', 'Not;': '⫬', 'not;': '¬', 'NotCongruent;': '≢', 'NotCupCap;': '≭', 'NotDoubleVerticalBar;': '∦', 'NotElement;': '∉', 'NotEqual;': '≠', 'NotEqualTilde;': '≂̸', 'NotExists;': '∄', 'NotGreater;': '≯', 'NotGreaterEqual;': '≱', 'NotGreaterFullEqual;': '≧̸', 'NotGreaterGreater;': '≫̸', 'NotGreaterLess;': '≹', 'NotGreaterSlantEqual;': '⩾̸', 'NotGreaterTilde;': '≵', 'NotHumpDownHump;': '≎̸', 'NotHumpEqual;': '≏̸', 'notin;': '∉', 'notindot;': '⋵̸', 'notinE;': '⋹̸', 'notinva;': '∉', 'notinvb;': '⋷', 'notinvc;': '⋶', 'NotLeftTriangle;': '⋪', 'NotLeftTriangleBar;': '⧏̸', 'NotLeftTriangleEqual;': '⋬', 'NotLess;': '≮', 'NotLessEqual;': '≰', 'NotLessGreater;': '≸', 'NotLessLess;': '≪̸', 'NotLessSlantEqual;': '⩽̸', 'NotLessTilde;': '≴', 'NotNestedGreaterGreater;': '⪢̸', 'NotNestedLessLess;': '⪡̸', 'notni;': '∌', 'notniva;': '∌', 'notnivb;': '⋾', 'notnivc;': '⋽', 'NotPrecedes;': '⊀', 'NotPrecedesEqual;': '⪯̸', 'NotPrecedesSlantEqual;': '⋠', 'NotReverseElement;': '∌', 'NotRightTriangle;': '⋫', 'NotRightTriangleBar;': '⧐̸', 'NotRightTriangleEqual;': '⋭', 'NotSquareSubset;': '⊏̸', 'NotSquareSubsetEqual;': '⋢', 'NotSquareSuperset;': '⊐̸', 'NotSquareSupersetEqual;': '⋣', 'NotSubset;': '⊂⃒', 'NotSubsetEqual;': '⊈', 'NotSucceeds;': '⊁', 'NotSucceedsEqual;': '⪰̸', 'NotSucceedsSlantEqual;': '⋡', 'NotSucceedsTilde;': '≿̸', 'NotSuperset;': '⊃⃒', 'NotSupersetEqual;': '⊉', 'NotTilde;': '≁', 'NotTildeEqual;': '≄', 'NotTildeFullEqual;': '≇', 'NotTildeTilde;': '≉', 'NotVerticalBar;': '∤', 'npar;': '∦', 'nparallel;': '∦', 'nparsl;': '⫽⃥', 'npart;': '∂̸', 'npolint;': '⨔', 'npr;': '⊀', 'nprcue;': '⋠', 'npre;': '⪯̸', 'nprec;': '⊀', 'npreceq;': '⪯̸', 'nrArr;': '⇏', 'nrarr;': '↛', 'nrarrc;': '⤳̸', 'nrarrw;': '↝̸', 'nRightarrow;': '⇏', 'nrightarrow;': '↛', 'nrtri;': '⋫', 'nrtrie;': '⋭', 'nsc;': '⊁', 'nsccue;': '⋡', 'nsce;': '⪰̸', 'Nscr;': '𝒩', 'nscr;': '𝓃', 'nshortmid;': '∤', 'nshortparallel;': '∦', 'nsim;': '≁', 'nsime;': '≄', 'nsimeq;': '≄', 'nsmid;': '∤', 'nspar;': '∦', 'nsqsube;': '⋢', 'nsqsupe;': '⋣', 'nsub;': '⊄', 'nsubE;': '⫅̸', 'nsube;': '⊈', 'nsubset;': '⊂⃒', 'nsubseteq;': '⊈', 'nsubseteqq;': '⫅̸', 'nsucc;': '⊁', 'nsucceq;': '⪰̸', 'nsup;': '⊅', 'nsupE;': '⫆̸', 'nsupe;': '⊉', 'nsupset;': '⊃⃒', 'nsupseteq;': '⊉', 'nsupseteqq;': '⫆̸', 'ntgl;': '≹', 'Ntilde': 'Ñ', 'ntilde': 'ñ', 'Ntilde;': 'Ñ', 'ntilde;': 'ñ', 'ntlg;': '≸', 'ntriangleleft;': '⋪', 'ntrianglelefteq;': '⋬', 'ntriangleright;': '⋫', 'ntrianglerighteq;': '⋭', 'Nu;': 'Ν', 'nu;': 'ν', 'num;': '#', 'numero;': '№', 'numsp;': '\u2007', 'nvap;': '≍⃒', 'nVDash;': '⊯', 'nVdash;': '⊮', 'nvDash;': '⊭', 'nvdash;': '⊬', 'nvge;': '≥⃒', 'nvgt;': '>⃒', 'nvHarr;': '⤄', 'nvinfin;': '⧞', 'nvlArr;': '⤂', 'nvle;': '≤⃒', 'nvlt;': '<⃒', 'nvltrie;': '⊴⃒', 'nvrArr;': '⤃', 'nvrtrie;': '⊵⃒', 'nvsim;': '∼⃒', 'nwarhk;': '⤣', 'nwArr;': '⇖', 'nwarr;': '↖', 'nwarrow;': '↖', 'nwnear;': '⤧', 'Oacute': 'Ó', 'oacute': 'ó', 'Oacute;': 'Ó', 'oacute;': 'ó', 'oast;': '⊛', 'ocir;': '⊚', 'Ocirc': 'Ô', 'ocirc': 'ô', 'Ocirc;': 'Ô', 'ocirc;': 'ô', 'Ocy;': 'О', 'ocy;': 'о', 'odash;': '⊝', 'Odblac;': 'Ő', 'odblac;': 'ő', 'odiv;': '⨸', 'odot;': '⊙', 'odsold;': '⦼', 'OElig;': 'Œ', 'oelig;': 'œ', 'ofcir;': '⦿', 'Ofr;': '𝔒', 'ofr;': '𝔬', 'ogon;': '˛', 'Ograve': 'Ò', 'ograve': 'ò', 'Ograve;': 'Ò', 'ograve;': 'ò', 'ogt;': '⧁', 'ohbar;': '⦵', 'ohm;': 'Ω', 'oint;': '∮', 'olarr;': '↺', 'olcir;': '⦾', 'olcross;': '⦻', 'oline;': '‾', 'olt;': '⧀', 'Omacr;': 'Ō', 'omacr;': 'ō', 'Omega;': 'Ω', 'omega;': 'ω', 'Omicron;': 'Ο', 'omicron;': 'ο', 'omid;': '⦶', 'ominus;': '⊖', 'Oopf;': '𝕆', 'oopf;': '𝕠', 'opar;': '⦷', 'OpenCurlyDoubleQuote;': '“', 'OpenCurlyQuote;': '‘', 'operp;': '⦹', 'oplus;': '⊕', 'Or;': '⩔', 'or;': '∨', 'orarr;': '↻', 'ord;': '⩝', 'order;': 'ℴ', 'orderof;': 'ℴ', 'ordf': 'ª', 'ordf;': 'ª', 'ordm': 'º', 'ordm;': 'º', 'origof;': '⊶', 'oror;': '⩖', 'orslope;': '⩗', 'orv;': '⩛', 'oS;': 'Ⓢ', 'Oscr;': '𝒪', 'oscr;': 'ℴ', 'Oslash': 'Ø', 'oslash': 'ø', 'Oslash;': 'Ø', 'oslash;': 'ø', 'osol;': '⊘', 'Otilde': 'Õ', 'otilde': 'õ', 'Otilde;': 'Õ', 'otilde;': 'õ', 'Otimes;': '⨷', 'otimes;': '⊗', 'otimesas;': '⨶', 'Ouml': 'Ö', 'ouml': 'ö', 'Ouml;': 'Ö', 'ouml;': 'ö', 'ovbar;': '⌽', 'OverBar;': '‾', 'OverBrace;': '⏞', 'OverBracket;': '⎴', 'OverParenthesis;': '⏜', 'par;': '∥', 'para': '¶', 'para;': '¶', 'parallel;': '∥', 'parsim;': '⫳', 'parsl;': '⫽', 'part;': '∂', 'PartialD;': '∂', 'Pcy;': 'П', 'pcy;': 'п', 'percnt;': '%', 'period;': '.', 'permil;': '‰', 'perp;': '⊥', 'pertenk;': '‱', 'Pfr;': '𝔓', 'pfr;': '𝔭', 'Phi;': 'Φ', 'phi;': 'φ', 'phiv;': 'ϕ', 'phmmat;': 'ℳ', 'phone;': '☎', 'Pi;': 'Π', 'pi;': 'π', 'pitchfork;': '⋔', 'piv;': 'ϖ', 'planck;': 'ℏ', 'planckh;': 'ℎ', 'plankv;': 'ℏ', 'plus;': '+', 'plusacir;': '⨣', 'plusb;': '⊞', 'pluscir;': '⨢', 'plusdo;': '∔', 'plusdu;': '⨥', 'pluse;': '⩲', 'PlusMinus;': '±', 'plusmn': '±', 'plusmn;': '±', 'plussim;': '⨦', 'plustwo;': '⨧', 'pm;': '±', 'Poincareplane;': 'ℌ', 'pointint;': '⨕', 'Popf;': 'ℙ', 'popf;': '𝕡', 'pound': '£', 'pound;': '£', 'Pr;': '⪻', 'pr;': '≺', 'prap;': '⪷', 'prcue;': '≼', 'prE;': '⪳', 'pre;': '⪯', 'prec;': '≺', 'precapprox;': '⪷', 'preccurlyeq;': '≼', 'Precedes;': '≺', 'PrecedesEqual;': '⪯', 'PrecedesSlantEqual;': '≼', 'PrecedesTilde;': '≾', 'preceq;': '⪯', 'precnapprox;': '⪹', 'precneqq;': '⪵', 'precnsim;': '⋨', 'precsim;': '≾', 'Prime;': '″', 'prime;': '′', 'primes;': 'ℙ', 'prnap;': '⪹', 'prnE;': '⪵', 'prnsim;': '⋨', 'prod;': '∏', 'Product;': '∏', 'profalar;': '⌮', 'profline;': '⌒', 'profsurf;': '⌓', 'prop;': '∝', 'Proportion;': '∷', 'Proportional;': '∝', 'propto;': '∝', 'prsim;': '≾', 'prurel;': '⊰', 'Pscr;': '𝒫', 'pscr;': '𝓅', 'Psi;': 'Ψ', 'psi;': 'ψ', 'puncsp;': '\u2008', 'Qfr;': '𝔔', 'qfr;': '𝔮', 'qint;': '⨌', 'Qopf;': 'ℚ', 'qopf;': '𝕢', 'qprime;': '⁗', 'Qscr;': '𝒬', 'qscr;': '𝓆', 'quaternions;': 'ℍ', 'quatint;': '⨖', 'quest;': '?', 'questeq;': '≟', 'QUOT': '"', 'quot': '"', 'QUOT;': '"', 'quot;': '"', 'rAarr;': '⇛', 'race;': '∽̱', 'Racute;': 'Ŕ', 'racute;': 'ŕ', 'radic;': '√', 'raemptyv;': '⦳', 'Rang;': '⟫', 'rang;': '⟩', 'rangd;': '⦒', 'range;': '⦥', 'rangle;': '⟩', 'raquo': '»', 'raquo;': '»', 'Rarr;': '↠', 'rArr;': '⇒', 'rarr;': '→', 'rarrap;': '⥵', 'rarrb;': '⇥', 'rarrbfs;': '⤠', 'rarrc;': '⤳', 'rarrfs;': '⤞', 'rarrhk;': '↪', 'rarrlp;': '↬', 'rarrpl;': '⥅', 'rarrsim;': '⥴', 'Rarrtl;': '⤖', 'rarrtl;': '↣', 'rarrw;': '↝', 'rAtail;': '⤜', 'ratail;': '⤚', 'ratio;': '∶', 'rationals;': 'ℚ', 'RBarr;': '⤐', 'rBarr;': '⤏', 'rbarr;': '⤍', 'rbbrk;': '❳', 'rbrace;': '}', 'rbrack;': ']', 'rbrke;': '⦌', 'rbrksld;': '⦎', 'rbrkslu;': '⦐', 'Rcaron;': 'Ř', 'rcaron;': 'ř', 'Rcedil;': 'Ŗ', 'rcedil;': 'ŗ', 'rceil;': '⌉', 'rcub;': '}', 'Rcy;': 'Р', 'rcy;': 'р', 'rdca;': '⤷', 'rdldhar;': '⥩', 'rdquo;': '”', 'rdquor;': '”', 'rdsh;': '↳', 'Re;': 'ℜ', 'real;': 'ℜ', 'realine;': 'ℛ', 'realpart;': 'ℜ', 'reals;': 'ℝ', 'rect;': '▭', 'REG': '®', 'reg': '®', 'REG;': '®', 'reg;': '®', 'ReverseElement;': '∋', 'ReverseEquilibrium;': '⇋', 'ReverseUpEquilibrium;': '⥯', 'rfisht;': '⥽', 'rfloor;': '⌋', 'Rfr;': 'ℜ', 'rfr;': '𝔯', 'rHar;': '⥤', 'rhard;': '⇁', 'rharu;': '⇀', 'rharul;': '⥬', 'Rho;': 'Ρ', 'rho;': 'ρ', 'rhov;': 'ϱ', 'RightAngleBracket;': '⟩', 'RightArrow;': '→', 'Rightarrow;': '⇒', 'rightarrow;': '→', 'RightArrowBar;': '⇥', 'RightArrowLeftArrow;': '⇄', 'rightarrowtail;': '↣', 'RightCeiling;': '⌉', 'RightDoubleBracket;': '⟧', 'RightDownTeeVector;': '⥝', 'RightDownVector;': '⇂', 'RightDownVectorBar;': '⥕', 'RightFloor;': '⌋', 'rightharpoondown;': '⇁', 'rightharpoonup;': '⇀', 'rightleftarrows;': '⇄', 'rightleftharpoons;': '⇌', 'rightrightarrows;': '⇉', 'rightsquigarrow;': '↝', 'RightTee;': '⊢', 'RightTeeArrow;': '↦', 'RightTeeVector;': '⥛', 'rightthreetimes;': '⋌', 'RightTriangle;': '⊳', 'RightTriangleBar;': '⧐', 'RightTriangleEqual;': '⊵', 'RightUpDownVector;': '⥏', 'RightUpTeeVector;': '⥜', 'RightUpVector;': '↾', 'RightUpVectorBar;': '⥔', 'RightVector;': '⇀', 'RightVectorBar;': '⥓', 'ring;': '˚', 'risingdotseq;': '≓', 'rlarr;': '⇄', 'rlhar;': '⇌', 'rlm;': '\u200f', 'rmoust;': '⎱', 'rmoustache;': '⎱', 'rnmid;': '⫮', 'roang;': '⟭', 'roarr;': '⇾', 'robrk;': '⟧', 'ropar;': '⦆', 'Ropf;': 'ℝ', 'ropf;': '𝕣', 'roplus;': '⨮', 'rotimes;': '⨵', 'RoundImplies;': '⥰', 'rpar;': ')', 'rpargt;': '⦔', 'rppolint;': '⨒', 'rrarr;': '⇉', 'Rrightarrow;': '⇛', 'rsaquo;': '›', 'Rscr;': 'ℛ', 'rscr;': '𝓇', 'Rsh;': '↱', 'rsh;': '↱', 'rsqb;': ']', 'rsquo;': '’', 'rsquor;': '’', 'rthree;': '⋌', 'rtimes;': '⋊', 'rtri;': '▹', 'rtrie;': '⊵', 'rtrif;': '▸', 'rtriltri;': '⧎', 'RuleDelayed;': '⧴', 'ruluhar;': '⥨', 'rx;': '℞', 'Sacute;': 'Ś', 'sacute;': 'ś', 'sbquo;': '‚', 'Sc;': '⪼', 'sc;': '≻', 'scap;': '⪸', 'Scaron;': 'Š', 'scaron;': 'š', 'sccue;': '≽', 'scE;': '⪴', 'sce;': '⪰', 'Scedil;': 'Ş', 'scedil;': 'ş', 'Scirc;': 'Ŝ', 'scirc;': 'ŝ', 'scnap;': '⪺', 'scnE;': '⪶', 'scnsim;': '⋩', 'scpolint;': '⨓', 'scsim;': '≿', 'Scy;': 'С', 'scy;': 'с', 'sdot;': '⋅', 'sdotb;': '⊡', 'sdote;': '⩦', 'searhk;': '⤥', 'seArr;': '⇘', 'searr;': '↘', 'searrow;': '↘', 'sect': '§', 'sect;': '§', 'semi;': ';', 'seswar;': '⤩', 'setminus;': '∖', 'setmn;': '∖', 'sext;': '✶', 'Sfr;': '𝔖', 'sfr;': '𝔰', 'sfrown;': '⌢', 'sharp;': '♯', 'SHCHcy;': 'Щ', 'shchcy;': 'щ', 'SHcy;': 'Ш', 'shcy;': 'ш', 'ShortDownArrow;': '↓', 'ShortLeftArrow;': '←', 'shortmid;': '∣', 'shortparallel;': '∥', 'ShortRightArrow;': '→', 'ShortUpArrow;': '↑', 'shy': '\xad', 'shy;': '\xad', 'Sigma;': 'Σ', 'sigma;': 'σ', 'sigmaf;': 'ς', 'sigmav;': 'ς', 'sim;': '∼', 'simdot;': '⩪', 'sime;': '≃', 'simeq;': '≃', 'simg;': '⪞', 'simgE;': '⪠', 'siml;': '⪝', 'simlE;': '⪟', 'simne;': '≆', 'simplus;': '⨤', 'simrarr;': '⥲', 'slarr;': '←', 'SmallCircle;': '∘', 'smallsetminus;': '∖', 'smashp;': '⨳', 'smeparsl;': '⧤', 'smid;': '∣', 'smile;': '⌣', 'smt;': '⪪', 'smte;': '⪬', 'smtes;': '⪬︀', 'SOFTcy;': 'Ь', 'softcy;': 'ь', 'sol;': '/', 'solb;': '⧄', 'solbar;': '⌿', 'Sopf;': '𝕊', 'sopf;': '𝕤', 'spades;': '♠', 'spadesuit;': '♠', 'spar;': '∥', 'sqcap;': '⊓', 'sqcaps;': '⊓︀', 'sqcup;': '⊔', 'sqcups;': '⊔︀', 'Sqrt;': '√', 'sqsub;': '⊏', 'sqsube;': '⊑', 'sqsubset;': '⊏', 'sqsubseteq;': '⊑', 'sqsup;': '⊐', 'sqsupe;': '⊒', 'sqsupset;': '⊐', 'sqsupseteq;': '⊒', 'squ;': '□', 'Square;': '□', 'square;': '□', 'SquareIntersection;': '⊓', 'SquareSubset;': '⊏', 'SquareSubsetEqual;': '⊑', 'SquareSuperset;': '⊐', 'SquareSupersetEqual;': '⊒', 'SquareUnion;': '⊔', 'squarf;': '▪', 'squf;': '▪', 'srarr;': '→', 'Sscr;': '𝒮', 'sscr;': '𝓈', 'ssetmn;': '∖', 'ssmile;': '⌣', 'sstarf;': '⋆', 'Star;': '⋆', 'star;': '☆', 'starf;': '★', 'straightepsilon;': 'ϵ', 'straightphi;': 'ϕ', 'strns;': '¯', 'Sub;': '⋐', 'sub;': '⊂', 'subdot;': '⪽', 'subE;': '⫅', 'sube;': '⊆', 'subedot;': '⫃', 'submult;': '⫁', 'subnE;': '⫋', 'subne;': '⊊', 'subplus;': '⪿', 'subrarr;': '⥹', 'Subset;': '⋐', 'subset;': '⊂', 'subseteq;': '⊆', 'subseteqq;': '⫅', 'SubsetEqual;': '⊆', 'subsetneq;': '⊊', 'subsetneqq;': '⫋', 'subsim;': '⫇', 'subsub;': '⫕', 'subsup;': '⫓', 'succ;': '≻', 'succapprox;': '⪸', 'succcurlyeq;': '≽', 'Succeeds;': '≻', 'SucceedsEqual;': '⪰', 'SucceedsSlantEqual;': '≽', 'SucceedsTilde;': '≿', 'succeq;': '⪰', 'succnapprox;': '⪺', 'succneqq;': '⪶', 'succnsim;': '⋩', 'succsim;': '≿', 'SuchThat;': '∋', 'Sum;': '∑', 'sum;': '∑', 'sung;': '♪', 'sup1': '¹', 'sup1;': '¹', 'sup2': '²', 'sup2;': '²', 'sup3': '³', 'sup3;': '³', 'Sup;': '⋑', 'sup;': '⊃', 'supdot;': '⪾', 'supdsub;': '⫘', 'supE;': '⫆', 'supe;': '⊇', 'supedot;': '⫄', 'Superset;': '⊃', 'SupersetEqual;': '⊇', 'suphsol;': '⟉', 'suphsub;': '⫗', 'suplarr;': '⥻', 'supmult;': '⫂', 'supnE;': '⫌', 'supne;': '⊋', 'supplus;': '⫀', 'Supset;': '⋑', 'supset;': '⊃', 'supseteq;': '⊇', 'supseteqq;': '⫆', 'supsetneq;': '⊋', 'supsetneqq;': '⫌', 'supsim;': '⫈', 'supsub;': '⫔', 'supsup;': '⫖', 'swarhk;': '⤦', 'swArr;': '⇙', 'swarr;': '↙', 'swarrow;': '↙', 'swnwar;': '⤪', 'szlig': 'ß', 'szlig;': 'ß', 'Tab;': '\t', 'target;': '⌖', 'Tau;': 'Τ', 'tau;': 'τ', 'tbrk;': '⎴', 'Tcaron;': 'Ť', 'tcaron;': 'ť', 'Tcedil;': 'Ţ', 'tcedil;': 'ţ', 'Tcy;': 'Т', 'tcy;': 'т', 'tdot;': '⃛', 'telrec;': '⌕', 'Tfr;': '𝔗', 'tfr;': '𝔱', 'there4;': '∴', 'Therefore;': '∴', 'therefore;': '∴', 'Theta;': 'Θ', 'theta;': 'θ', 'thetasym;': 'ϑ', 'thetav;': 'ϑ', 'thickapprox;': '≈', 'thicksim;': '∼', 'ThickSpace;': '\u205f\u200a', 'thinsp;': '\u2009', 'ThinSpace;': '\u2009', 'thkap;': '≈', 'thksim;': '∼', 'THORN': 'Þ', 'thorn': 'þ', 'THORN;': 'Þ', 'thorn;': 'þ', 'Tilde;': '∼', 'tilde;': '˜', 'TildeEqual;': '≃', 'TildeFullEqual;': '≅', 'TildeTilde;': '≈', 'times': '×', 'times;': '×', 'timesb;': '⊠', 'timesbar;': '⨱', 'timesd;': '⨰', 'tint;': '∭', 'toea;': '⤨', 'top;': '⊤', 'topbot;': '⌶', 'topcir;': '⫱', 'Topf;': '𝕋', 'topf;': '𝕥', 'topfork;': '⫚', 'tosa;': '⤩', 'tprime;': '‴', 'TRADE;': '™', 'trade;': '™', 'triangle;': '▵', 'triangledown;': '▿', 'triangleleft;': '◃', 'trianglelefteq;': '⊴', 'triangleq;': '≜', 'triangleright;': '▹', 'trianglerighteq;': '⊵', 'tridot;': '◬', 'trie;': '≜', 'triminus;': '⨺', 'TripleDot;': '⃛', 'triplus;': '⨹', 'trisb;': '⧍', 'tritime;': '⨻', 'trpezium;': '⏢', 'Tscr;': '𝒯', 'tscr;': '𝓉', 'TScy;': 'Ц', 'tscy;': 'ц', 'TSHcy;': 'Ћ', 'tshcy;': 'ћ', 'Tstrok;': 'Ŧ', 'tstrok;': 'ŧ', 'twixt;': '≬', 'twoheadleftarrow;': '↞', 'twoheadrightarrow;': '↠', 'Uacute': 'Ú', 'uacute': 'ú', 'Uacute;': 'Ú', 'uacute;': 'ú', 'Uarr;': '↟', 'uArr;': '⇑', 'uarr;': '↑', 'Uarrocir;': '⥉', 'Ubrcy;': 'Ў', 'ubrcy;': 'ў', 'Ubreve;': 'Ŭ', 'ubreve;': 'ŭ', 'Ucirc': 'Û', 'ucirc': 'û', 'Ucirc;': 'Û', 'ucirc;': 'û', 'Ucy;': 'У', 'ucy;': 'у', 'udarr;': '⇅', 'Udblac;': 'Ű', 'udblac;': 'ű', 'udhar;': '⥮', 'ufisht;': '⥾', 'Ufr;': '𝔘', 'ufr;': '𝔲', 'Ugrave': 'Ù', 'ugrave': 'ù', 'Ugrave;': 'Ù', 'ugrave;': 'ù', 'uHar;': '⥣', 'uharl;': '↿', 'uharr;': '↾', 'uhblk;': '▀', 'ulcorn;': '⌜', 'ulcorner;': '⌜', 'ulcrop;': '⌏', 'ultri;': '◸', 'Umacr;': 'Ū', 'umacr;': 'ū', 'uml': '¨', 'uml;': '¨', 'UnderBar;': '_', 'UnderBrace;': '⏟', 'UnderBracket;': '⎵', 'UnderParenthesis;': '⏝', 'Union;': '⋃', 'UnionPlus;': '⊎', 'Uogon;': 'Ų', 'uogon;': 'ų', 'Uopf;': '𝕌', 'uopf;': '𝕦', 'UpArrow;': '↑', 'Uparrow;': '⇑', 'uparrow;': '↑', 'UpArrowBar;': '⤒', 'UpArrowDownArrow;': '⇅', 'UpDownArrow;': '↕', 'Updownarrow;': '⇕', 'updownarrow;': '↕', 'UpEquilibrium;': '⥮', 'upharpoonleft;': '↿', 'upharpoonright;': '↾', 'uplus;': '⊎', 'UpperLeftArrow;': '↖', 'UpperRightArrow;': '↗', 'Upsi;': 'ϒ', 'upsi;': 'υ', 'upsih;': 'ϒ', 'Upsilon;': 'Υ', 'upsilon;': 'υ', 'UpTee;': '⊥', 'UpTeeArrow;': '↥', 'upuparrows;': '⇈', 'urcorn;': '⌝', 'urcorner;': '⌝', 'urcrop;': '⌎', 'Uring;': 'Ů', 'uring;': 'ů', 'urtri;': '◹', 'Uscr;': '𝒰', 'uscr;': '𝓊', 'utdot;': '⋰', 'Utilde;': 'Ũ', 'utilde;': 'ũ', 'utri;': '▵', 'utrif;': '▴', 'uuarr;': '⇈', 'Uuml': 'Ü', 'uuml': 'ü', 'Uuml;': 'Ü', 'uuml;': 'ü', 'uwangle;': '⦧', 'vangrt;': '⦜', 'varepsilon;': 'ϵ', 'varkappa;': 'ϰ', 'varnothing;': '∅', 'varphi;': 'ϕ', 'varpi;': 'ϖ', 'varpropto;': '∝', 'vArr;': '⇕', 'varr;': '↕', 'varrho;': 'ϱ', 'varsigma;': 'ς', 'varsubsetneq;': '⊊︀', 'varsubsetneqq;': '⫋︀', 'varsupsetneq;': '⊋︀', 'varsupsetneqq;': '⫌︀', 'vartheta;': 'ϑ', 'vartriangleleft;': '⊲', 'vartriangleright;': '⊳', 'Vbar;': '⫫', 'vBar;': '⫨', 'vBarv;': '⫩', 'Vcy;': 'В', 'vcy;': 'в', 'VDash;': '⊫', 'Vdash;': '⊩', 'vDash;': '⊨', 'vdash;': '⊢', 'Vdashl;': '⫦', 'Vee;': '⋁', 'vee;': '∨', 'veebar;': '⊻', 'veeeq;': '≚', 'vellip;': '⋮', 'Verbar;': '‖', 'verbar;': '|', 'Vert;': '‖', 'vert;': '|', 'VerticalBar;': '∣', 'VerticalLine;': '|', 'VerticalSeparator;': '❘', 'VerticalTilde;': '≀', 'VeryThinSpace;': '\u200a', 'Vfr;': '𝔙', 'vfr;': '𝔳', 'vltri;': '⊲', 'vnsub;': '⊂⃒', 'vnsup;': '⊃⃒', 'Vopf;': '𝕍', 'vopf;': '𝕧', 'vprop;': '∝', 'vrtri;': '⊳', 'Vscr;': '𝒱', 'vscr;': '𝓋', 'vsubnE;': '⫋︀', 'vsubne;': '⊊︀', 'vsupnE;': '⫌︀', 'vsupne;': '⊋︀', 'Vvdash;': '⊪', 'vzigzag;': '⦚', 'Wcirc;': 'Ŵ', 'wcirc;': 'ŵ', 'wedbar;': '⩟', 'Wedge;': '⋀', 'wedge;': '∧', 'wedgeq;': '≙', 'weierp;': '℘', 'Wfr;': '𝔚', 'wfr;': '𝔴', 'Wopf;': '𝕎', 'wopf;': '𝕨', 'wp;': '℘', 'wr;': '≀', 'wreath;': '≀', 'Wscr;': '𝒲', 'wscr;': '𝓌', 'xcap;': '⋂', 'xcirc;': '◯', 'xcup;': '⋃', 'xdtri;': '▽', 'Xfr;': '𝔛', 'xfr;': '𝔵', 'xhArr;': '⟺', 'xharr;': '⟷', 'Xi;': 'Ξ', 'xi;': 'ξ', 'xlArr;': '⟸', 'xlarr;': '⟵', 'xmap;': '⟼', 'xnis;': '⋻', 'xodot;': '⨀', 'Xopf;': '𝕏', 'xopf;': '𝕩', 'xoplus;': '⨁', 'xotime;': '⨂', 'xrArr;': '⟹', 'xrarr;': '⟶', 'Xscr;': '𝒳', 'xscr;': '𝓍', 'xsqcup;': '⨆', 'xuplus;': '⨄', 'xutri;': '△', 'xvee;': '⋁', 'xwedge;': '⋀', 'Yacute': 'Ý', 'yacute': 'ý', 'Yacute;': 'Ý', 'yacute;': 'ý', 'YAcy;': 'Я', 'yacy;': 'я', 'Ycirc;': 'Ŷ', 'ycirc;': 'ŷ', 'Ycy;': 'Ы', 'ycy;': 'ы', 'yen': '¥', 'yen;': '¥', 'Yfr;': '𝔜', 'yfr;': '𝔶', 'YIcy;': 'Ї', 'yicy;': 'ї', 'Yopf;': '𝕐', 'yopf;': '𝕪', 'Yscr;': '𝒴', 'yscr;': '𝓎', 'YUcy;': 'Ю', 'yucy;': 'ю', 'yuml': 'ÿ', 'Yuml;': 'Ÿ', 'yuml;': 'ÿ', 'Zacute;': 'Ź', 'zacute;': 'ź', 'Zcaron;': 'Ž', 'zcaron;': 'ž', 'Zcy;': 'З', 'zcy;': 'з', 'Zdot;': 'Ż', 'zdot;': 'ż', 'zeetrf;': 'ℨ', 'ZeroWidthSpace;': '\u200b', 'Zeta;': 'Ζ', 'zeta;': 'ζ', 'Zfr;': 'ℨ', 'zfr;': '𝔷', 'ZHcy;': 'Ж', 'zhcy;': 'ж', 'zigrarr;': '⇝', 'Zopf;': 'ℤ', 'zopf;': '𝕫', 'Zscr;': '𝒵', 'zscr;': '𝓏', 'zwj;': '\u200d', 'zwnj;': '\u200c'} codepoint2name = {} entitydefs = {} for name, codepoint in name2codepoint.items(): codepoint2name[codepoint] = name entitydefs[name] = chr(codepoint) del name, codepoint
lista, ent = [], float(input()) # Cria a lista e pede oi número inicial for x in range(100): lista.append('{:.4f}'.format(ent)) # Add o número na lista print("N[{}] = {}" .format(x, lista[x])) # Mostra a posição e o valor ent /= 2 # Devide pela metade (2)
# # PySNMP MIB module ESI-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ESI-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:06:33 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibIdentifier, Bits, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Integer32, ObjectIdentity, Unsigned32, iso, enterprises, Counter32, ModuleIdentity, Counter64, NotificationType, Gauge32, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Bits", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Integer32", "ObjectIdentity", "Unsigned32", "iso", "enterprises", "Counter32", "ModuleIdentity", "Counter64", "NotificationType", "Gauge32", "NotificationType") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") esi = MibIdentifier((1, 3, 6, 1, 4, 1, 683)) general = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 1)) commands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 2)) esiSNMP = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 3)) esiSNMPCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 3, 2)) driver = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 4)) tokenRing = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 5)) printServers = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6)) psGeneral = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 1)) psOutput = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 2)) psProtocols = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3)) genProtocols = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 1, 15)) outputCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 2, 2)) outputConfigure = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 2, 3)) outputJobLog = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 2, 6)) trCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 5, 2)) trConfigure = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 5, 3)) tcpip = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 1)) netware = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 2)) vines = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 3)) lanManager = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 4)) eTalk = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 5)) tcpipCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 3)) tcpipConfigure = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4)) tcpipStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 5)) nwCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 3)) nwConfigure = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4)) nwStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 5)) bvCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 3)) bvConfigure = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4)) bvStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5)) eTalkCommands = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 3)) eTalkConfigure = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4)) eTalkStatus = MibIdentifier((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 5)) genGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: genGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: genGroupVersion.setDescription('The version for the general group.') genMIBVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: genMIBVersion.setStatus('mandatory') if mibBuilder.loadTexts: genMIBVersion.setDescription('The version of the MIB.') genProductName = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readonly") if mibBuilder.loadTexts: genProductName.setStatus('mandatory') if mibBuilder.loadTexts: genProductName.setDescription('A textual description of the device.') genProductNumber = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 5))).setMaxAccess("readonly") if mibBuilder.loadTexts: genProductNumber.setStatus('mandatory') if mibBuilder.loadTexts: genProductNumber.setDescription('The product number of the device.') genSerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: genSerialNumber.setStatus('mandatory') if mibBuilder.loadTexts: genSerialNumber.setDescription('The serial number of the device.') genHWAddress = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readonly") if mibBuilder.loadTexts: genHWAddress.setStatus('mandatory') if mibBuilder.loadTexts: genHWAddress.setDescription("The device's hardware address.") genCableType = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("tenbase2", 1), ("tenbaseT", 2), ("aui", 3), ("utp", 4), ("stp", 5), ("fiber100fx", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: genCableType.setStatus('mandatory') if mibBuilder.loadTexts: genCableType.setDescription('Indicates the network cable type connected to the device.') genDateCode = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: genDateCode.setStatus('mandatory') if mibBuilder.loadTexts: genDateCode.setDescription("The device's datecode.") genVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readonly") if mibBuilder.loadTexts: genVersion.setStatus('mandatory') if mibBuilder.loadTexts: genVersion.setDescription('A string indicating the version of the firmware.') genConfigurationDirty = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: genConfigurationDirty.setStatus('mandatory') if mibBuilder.loadTexts: genConfigurationDirty.setDescription("A variable's value has been changed which will require that the device be reset or power cycled before it will take effect. Set cmdReset to take this action. A list of critical variables that will cause genConfigurationDirty to be set follows: snmpGetCommunityName, snmpSetCommunityName, trPriority, trEarlyTokenRelease, trPacketSize, trRouting, trLocallyAdminAddr, psJetAdminEnabled, outputType, outputHandshake, tcpipEnabled, tcpipIPAddress, tcpipDefaultGateway, tcpipSubnetMask, tcpipUsingNetProtocols, tcpipBootProtocolsEnabled, tcpipRawPortNumber, tcpipMLPTCPPort, tcpipMLPPort, nwEnabled, nwSetFrameFormat, nwMode, nwPrintServerName, nwPrintServerPassword, nwQueueScanTime, nwFileServerName, nwPortPrinterNumber, nwPortFontDownload, nwPortPCLQueue, nwPortPSQueue, nwPortFormsOn, nwPortNotification, bvEnabled, bvSetSequencedRouting, bvLoginName, bvLoginPassword, bvPrintServiceName, bvPrintServiceRouting, lmEnabled, eTalkEnabled") genCompanyName = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: genCompanyName.setStatus('mandatory') if mibBuilder.loadTexts: genCompanyName.setDescription('A string indicating the manufacturer of the device.') genCompanyLoc = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: genCompanyLoc.setStatus('mandatory') if mibBuilder.loadTexts: genCompanyLoc.setDescription('A string indicating the location of the manufacturer of the device.') genCompanyPhone = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readonly") if mibBuilder.loadTexts: genCompanyPhone.setStatus('mandatory') if mibBuilder.loadTexts: genCompanyPhone.setDescription('A string indicating the phone number of the manufacturer of the device.') genCompanyTechSupport = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: genCompanyTechSupport.setStatus('mandatory') if mibBuilder.loadTexts: genCompanyTechSupport.setDescription('A string indicating the technical support information for the device.') genNumProtocols = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 15, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: genNumProtocols.setStatus('mandatory') if mibBuilder.loadTexts: genNumProtocols.setDescription('The number of network protocols supported on the device.') genProtocolTable = MibTable((1, 3, 6, 1, 4, 1, 683, 1, 15, 2), ) if mibBuilder.loadTexts: genProtocolTable.setStatus('mandatory') if mibBuilder.loadTexts: genProtocolTable.setDescription('A list of network protocols. The number of entries is given by the value of genNumProtocols.') genProtocolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 1, 15, 2, 1), ).setIndexNames((0, "ESI-MIB", "genProtocolIndex")) if mibBuilder.loadTexts: genProtocolEntry.setStatus('mandatory') if mibBuilder.loadTexts: genProtocolEntry.setDescription('A network protocol supported on the device.') genProtocolIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 1, 15, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: genProtocolIndex.setStatus('mandatory') if mibBuilder.loadTexts: genProtocolIndex.setDescription("A unique value for each network protocol. Its value ranges between 1 and the value of genNumProtocols. The value for each protocol must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization.") genProtocolDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 1, 15, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: genProtocolDescr.setStatus('mandatory') if mibBuilder.loadTexts: genProtocolDescr.setDescription('A textual string describing the network protocol.') genProtocolID = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 1, 15, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("tcp-ip", 1), ("netware", 2), ("vines", 3), ("lanmanger", 4), ("ethertalk", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: genProtocolID.setStatus('mandatory') if mibBuilder.loadTexts: genProtocolID.setDescription('A unique identification number for the network protocol.') genSysUpTimeString = MibScalar((1, 3, 6, 1, 4, 1, 683, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 35))).setMaxAccess("readonly") if mibBuilder.loadTexts: genSysUpTimeString.setStatus('mandatory') if mibBuilder.loadTexts: genSysUpTimeString.setDescription('A string indicating the system up time for the device.') cmdGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cmdGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: cmdGroupVersion.setDescription('The version for the commands group.') cmdReset = MibScalar((1, 3, 6, 1, 4, 1, 683, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmdReset.setStatus('optional') if mibBuilder.loadTexts: cmdReset.setDescription('A value of 2 will reset the device. The following list of variables will also cause the device to reset itself. cmdRestoreDefaults, snmpRestoreDefaults, trRestoreDefaults, outputRestoreDefaults, tcpipRestoreDefaults, tcpipFirmwareUpgrade, nwRestoreDefaults, nwFirmwareUpgrade, bvRestoreDefaults, bvFirmwareUpgrade, eTalkRestoreDefaults') cmdPrintConfig = MibScalar((1, 3, 6, 1, 4, 1, 683, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmdPrintConfig.setStatus('optional') if mibBuilder.loadTexts: cmdPrintConfig.setDescription('A value of 2 will cause the device to print a configuration page.') cmdRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 2, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cmdRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: cmdRestoreDefaults.setDescription('A value of 2 will restore all parameters on the device to factory defaults, as well as reset the device.') snmpGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: snmpGroupVersion.setDescription('The version for the snmp group.') snmpRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 3, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: snmpRestoreDefaults.setDescription('A value of 2 will restore all SNMP parameters on the device to factory defaults, as well as reset the device.') snmpGetCommunityName = MibScalar((1, 3, 6, 1, 4, 1, 683, 3, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpGetCommunityName.setStatus('optional') if mibBuilder.loadTexts: snmpGetCommunityName.setDescription('Get community name for the managed node. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') snmpSetCommunityName = MibScalar((1, 3, 6, 1, 4, 1, 683, 3, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpSetCommunityName.setStatus('optional') if mibBuilder.loadTexts: snmpSetCommunityName.setDescription('Set community name for the managed node. This value cannot be read, just set. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') snmpTrapCommunityName = MibScalar((1, 3, 6, 1, 4, 1, 683, 3, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpTrapCommunityName.setStatus('optional') if mibBuilder.loadTexts: snmpTrapCommunityName.setDescription('Trap community name for the managed node.') driverGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: driverGroupVersion.setDescription('The version for the driver group.') driverRXPackets = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverRXPackets.setStatus('mandatory') if mibBuilder.loadTexts: driverRXPackets.setDescription('The number of packets received.') driverTXPackets = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverTXPackets.setStatus('mandatory') if mibBuilder.loadTexts: driverTXPackets.setDescription('The number of packets transmitted.') driverRXPacketsUnavailable = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverRXPacketsUnavailable.setStatus('mandatory') if mibBuilder.loadTexts: driverRXPacketsUnavailable.setDescription('The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol due to a lack of buffer space.') driverRXPacketErrors = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverRXPacketErrors.setStatus('mandatory') if mibBuilder.loadTexts: driverRXPacketErrors.setDescription('The number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.') driverTXPacketErrors = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverTXPacketErrors.setStatus('mandatory') if mibBuilder.loadTexts: driverTXPacketErrors.setDescription('The number of outbound packets that could not be transmitted because of errors.') driverTXPacketRetries = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverTXPacketRetries.setStatus('mandatory') if mibBuilder.loadTexts: driverTXPacketRetries.setDescription('The number of retransmitted packets.') driverChecksumErrors = MibScalar((1, 3, 6, 1, 4, 1, 683, 4, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: driverChecksumErrors.setStatus('mandatory') if mibBuilder.loadTexts: driverChecksumErrors.setDescription('The number of packets containing checksum errors received.') trGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: trGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: trGroupVersion.setDescription('The version for the tokenRing group.') trRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: trRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: trRestoreDefaults.setDescription('A value of 2 will restore all token-ring parameters on the device to factory defaults, as well as reset the device.') trPriority = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 6))).setMaxAccess("readwrite") if mibBuilder.loadTexts: trPriority.setStatus('optional') if mibBuilder.loadTexts: trPriority.setDescription('The token which is passed around the ring until a station needs it can be assigned a priority from 0 to 6. Priority 0 is the lowest and 6 is the highest. The priority of the device can be increased to improve performance. However, the performance of file servers and crucial stations could be affected. In order for changes to this variable to take effect, the device must be reset. See cmdReset to do this.') trEarlyTokenRelease = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: trEarlyTokenRelease.setStatus('optional') if mibBuilder.loadTexts: trEarlyTokenRelease.setDescription('Early token release allows the device to release the token immediately after transmitting data but only on 16 Mbps systems. This feature enhances ring performance. In order for changes to this variable to take effect, the device must be reset. See cmdReset to do this.') trPacketSize = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("one-k", 1), ("two-k", 2), ("four-k", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: trPacketSize.setStatus('optional') if mibBuilder.loadTexts: trPacketSize.setDescription('You should only change the packet size if you are using a driver for your Token Ring adapter which allows packet sizes greater than One_K. In order for changes to this variable to take effect, the device must be reset. See cmdReset to do this.') trRouting = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("off", 1), ("all-None", 2), ("single-All", 3), ("single-None", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: trRouting.setStatus('optional') if mibBuilder.loadTexts: trRouting.setDescription('Set this variable to change the source routing configuration on the device. Off: No source routing. All, None: All-routes broadcast, nonbroadcast return. The frame will be transmitted on every route within the network resulting in multiple copies on a given ring. Single, All: Single-route broadcast, all routes broadcast return. The frame will be transmitted across the designated bridges, which will result in the frame appearing only once on each ring. The response frame is on all routes broadcast to the originator. Single, None: Single-route broadcast, nonbroadcast return. The frame will be transmitted across designated bridges, which will result in the frame appearing only once each ring. In order for changes to this variable to take effect, the device must be reset. See cmdReset to do this.') trLocallyAdminAddr = MibScalar((1, 3, 6, 1, 4, 1, 683, 5, 3, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readwrite") if mibBuilder.loadTexts: trLocallyAdminAddr.setStatus('optional') if mibBuilder.loadTexts: trLocallyAdminAddr.setDescription('This is the locally administered node address for the device. Valid values are 000000000000 and between 400000000000 and 7FFFFFFFFFFF. A value of 000000000000 indicates that a locally administered address is not in use.') psGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: psGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: psGroupVersion.setDescription('The version for the psGeneral group.') psJetAdminEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: psJetAdminEnabled.setStatus('mandatory') if mibBuilder.loadTexts: psJetAdminEnabled.setDescription('Indicates whether or not the JetAdmin support is enabled on the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') psVerifyConfiguration = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("getvalue", 0), ("serial-configuration", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: psVerifyConfiguration.setStatus('optional') if mibBuilder.loadTexts: psVerifyConfiguration.setDescription('This variable is used to force the print server to verify valid configuration settings. Setting the variable to the appropriate enumeration will cause the print server to verify the settings for that enumeration. If the settings are valid, the result of the set will be OK. If the settings are not valid, the result will be BadValue. Gets on this variable will always return 0. 1 - Indicates whether or not the current serial configuration is valid. Valid configurations - If the serial port is set in bidirectional mode, the baud rate must be less than 115200 and the handshaking must be set to hardware handshaking. 2 - Not used yet. ') outputGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: outputGroupVersion.setDescription('The version for the output group.') outputRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 2, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputRestoreDefaults.setStatus('mandatory') if mibBuilder.loadTexts: outputRestoreDefaults.setDescription('A value of 2 will restore all output parameters on the print server to factory defaults, as well as reset the print server.') outputCommandsTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 2, 2, 2), ) if mibBuilder.loadTexts: outputCommandsTable.setStatus('mandatory') if mibBuilder.loadTexts: outputCommandsTable.setDescription('A list of physical output ports. The number of entries is given by the value of outputNumPorts.') outputCommandsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 2, 2, 2, 1), ).setIndexNames((0, "ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: outputCommandsEntry.setStatus('mandatory') if mibBuilder.loadTexts: outputCommandsEntry.setDescription('A physical output port on the print server.') outputCancelCurrentJob = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputCancelCurrentJob.setStatus('optional') if mibBuilder.loadTexts: outputCancelCurrentJob.setDescription('A value of 2 will cancel the job currently printing on that port.') outputNumPorts = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputNumPorts.setStatus('mandatory') if mibBuilder.loadTexts: outputNumPorts.setDescription('The number of physical output ports on the print server.') outputTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2), ) if mibBuilder.loadTexts: outputTable.setStatus('mandatory') if mibBuilder.loadTexts: outputTable.setDescription('A list of physical output ports. The number of entries is given by the value of outputNumPorts.') outputEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1), ).setIndexNames((0, "ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: outputEntry.setStatus('mandatory') if mibBuilder.loadTexts: outputEntry.setDescription('A physical output port on the print server.') outputIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputIndex.setStatus('mandatory') if mibBuilder.loadTexts: outputIndex.setDescription("A unique value for each physical output port. Its value ranges between 1 and the value of outputNumPorts. The value for each protocol must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization.") outputName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputName.setStatus('mandatory') if mibBuilder.loadTexts: outputName.setDescription('A textual description of the output port.') outputStatusString = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputStatusString.setStatus('mandatory') if mibBuilder.loadTexts: outputStatusString.setDescription('A string indicating the status of the physical output port.') outputStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on-Line", 1), ("off-Line", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputStatus.setStatus('mandatory') if mibBuilder.loadTexts: outputStatus.setDescription('Indicates status of the printer. Get outputExtendedStatus for further information.') outputExtendedStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 15))).clone(namedValues=NamedValues(("none", 1), ("no-Printer-Attached", 2), ("toner-Low", 3), ("paper-Out", 4), ("paper-Jam", 5), ("door-Open", 6), ("printer-Error", 15)))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputExtendedStatus.setStatus('mandatory') if mibBuilder.loadTexts: outputExtendedStatus.setDescription('Indicates printer status to be used in conjunction with outputStatus.') outputPrinter = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("hp-III", 1), ("hp-IIISi", 2), ("ibm", 3), ("no-Specific-Printer", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputPrinter.setStatus('optional') if mibBuilder.loadTexts: outputPrinter.setDescription('The type of printer the output port is attached to. Even if the group is supported, this variable may not be supported.') outputLanguageSwitching = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("off", 1), ("pcl", 2), ("postScript", 3), ("als", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputLanguageSwitching.setStatus('optional') if mibBuilder.loadTexts: outputLanguageSwitching.setDescription('Indicates the language switching option for the physical port. Even if the group is supported, this variable may not be supported.') outputConfigLanguage = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("text", 1), ("pcl", 2), ("postScript", 3), ("off", 4), ("epl-zpl", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputConfigLanguage.setStatus('mandatory') if mibBuilder.loadTexts: outputConfigLanguage.setDescription('Indicates the language that configuration pages will be printed in. If set to off, a config sheet will not be printed on this port.') outputPCLString = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(127, 127)).setFixedLength(127)).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputPCLString.setStatus('optional') if mibBuilder.loadTexts: outputPCLString.setDescription('This string will be sent out the physical port if (1) outputLanguageSwitching is set to PCL or outputLanguageSwitching is set to Auto and the job is determined to be PCL, and (2) outputPrinter is set to No_Specific_Printer. Even if the group is supported, this variable may not be supported.') outputPSString = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(127, 127)).setFixedLength(127)).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputPSString.setStatus('optional') if mibBuilder.loadTexts: outputPSString.setDescription('This string will be sent out the physical port if (1) outputLanguageSwitching is set to PostScript or outputLanguageSwitching is set to Auto and the job is determined to be PostScript, and (2) outputPrinter is set to No_Specific_Printer. Even if the group is supported, this variable may not be supported.') outputCascaded = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputCascaded.setStatus('optional') if mibBuilder.loadTexts: outputCascaded.setDescription("A value of 2 indicates that the physical output port is connected to an Extended System's printer sharing device. Even if the group is supported, this variable may not be supported.") outputSetting = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(32758, 32759, 32760, 32761, 32762, 32763, 32764, 32765, 32766, 32767))).clone(namedValues=NamedValues(("serial-infrared", 32758), ("serial-bidirectional", 32759), ("serial-unidirectional", 32760), ("serial-input", 32761), ("parallel-compatibility-no-bidi", 32762), ("ieee-1284-std-nibble-mode", 32763), ("z-Link", 32764), ("internal", 32765), ("ieee-1284-ecp-or-fast-nibble-mode", 32766), ("extendedLink", 32767)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputSetting.setStatus('mandatory') if mibBuilder.loadTexts: outputSetting.setDescription('Indicates the type (and optionally speed) for the physical output port. Setting this variable to physical connections (such as Parallel) will result in an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') outputOwner = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("no-Owner", 1), ("tcpip", 2), ("netware", 3), ("vines", 4), ("lanManager", 5), ("etherTalk", 6), ("config-Page", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputOwner.setStatus('mandatory') if mibBuilder.loadTexts: outputOwner.setDescription('Indicates which protocol or task currently is printing on the port.') outputBIDIStatusEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputBIDIStatusEnabled.setStatus('optional') if mibBuilder.loadTexts: outputBIDIStatusEnabled.setDescription('A value of 2 indicates that the BIDI status system is enabled.') outputPrinterModel = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 60))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputPrinterModel.setStatus('optional') if mibBuilder.loadTexts: outputPrinterModel.setDescription('A string indicating the printer model attached to the output port.') outputPrinterDisplay = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputPrinterDisplay.setStatus('optional') if mibBuilder.loadTexts: outputPrinterDisplay.setDescription('A string indicating the message on the attached printer front panel.') outputCapabilities = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 8, 16, 32, 64, 128, 256, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824))).clone(namedValues=NamedValues(("serial-Uni-Baud-9600", 1), ("serial-Uni-Baud-19200", 2), ("serial-Uni-Baud-38400", 4), ("serial-Uni-Baud-57600", 8), ("serial-Uni-Baud-115200", 16), ("serial-bidi-Baud-9600", 32), ("serial-bidi-Baud-19200", 64), ("serial-bidi-Baud-38400", 128), ("serial-bidi-Baud-57600", 256), ("zpl-epl-capable", 262144), ("serial-irin", 524288), ("serial-in", 1048576), ("serial-config-settings", 2097152), ("parallel-compatibility-no-bidi", 4194304), ("ieee-1284-std-nibble-mode", 8388608), ("z-link", 16777216), ("bidirectional", 33554432), ("serial-Software-Handshake", 67108864), ("serial-Output", 134217728), ("extendedLink", 268435456), ("internal", 536870912), ("ieee-1284-ecp-or-fast-nibble-mode", 1073741824)))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputCapabilities.setStatus('mandatory') if mibBuilder.loadTexts: outputCapabilities.setDescription('This field is implemented as a BIT mask. If the bit is set then the port is capable of functioning in this mode. Bit Property --- ------------------------ 0 Serial Unidirectional Baud 9600 1 Serial Unidirectional Baud 19200 2 Serial Unidirectional Baud 38400 3 Serial Unidirectional Baud 57600 4 Serial Unidirectional Baud 115200 5 Serial Bidirectional Baud 9600 6 Serial Bidirectional Baud 19200 7 Serial Bidirectional Baud 38400 8 Serial Bidirectional Baud 57600 19 Infrared Input on serial port 20 Serial Input 21 Serial Configuration Settings 22 Parallel Compatibility Mode (no bidi) 23 IEEE 1284 Standard Nibble Mode 24 ZLink 25 Bidirectional Support (PJL status) 26 Serial Software Handshaking 27 Serial Output 28 Extended Link Technology 29 Printer Internal (MIO) 30 IEEE 1284 ECP or Fast Nibble Mode') outputHandshake = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("not-Supported", 1), ("hardware-Software", 2), ("hardware", 3), ("software", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputHandshake.setStatus('optional') if mibBuilder.loadTexts: outputHandshake.setDescription("If the port in serial mode operation this indicates the handshaking method being used. Setting this value to 'not- supported' will result in an error. Setting this value on non serial capable ports will result in an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.") outputDataBits = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(7, 8, 255))).clone(namedValues=NamedValues(("seven-bits", 7), ("eight-bits", 8), ("not-Supported", 255)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputDataBits.setStatus('optional') if mibBuilder.loadTexts: outputDataBits.setDescription("If the port in serial mode operation this indicates the number of data bits being used. Setting this value to 'not- supported' will result in an error. Setting this value on non serial capable ports will result in an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.") outputStopBits = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 255))).clone(namedValues=NamedValues(("one-bit", 1), ("two-bits", 2), ("not-Supported", 255)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputStopBits.setStatus('optional') if mibBuilder.loadTexts: outputStopBits.setDescription("If the port in serial mode operation this indicates the number of stop bits being used. Setting this value to 'not- supported' will result in an error. Setting this value on non serial capable ports will result in an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.") outputParity = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 255))).clone(namedValues=NamedValues(("none", 1), ("odd", 2), ("even", 3), ("not-Supported", 255)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputParity.setStatus('optional') if mibBuilder.loadTexts: outputParity.setDescription("If the port in serial mode operation this indicates the parity checking method being used. Setting this value to 'not- supported' will result in an error. Setting this value on non serial capable ports will result in an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.") outputBaudRate = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("unidirectional-9600", 1), ("unidirectional-19200", 2), ("unidirectional-38400", 3), ("unidirectional-57600", 4), ("unidirectional-115200", 5), ("bidirectional-9600", 6), ("bidirectional-19200", 7), ("bidirectional-38400", 8), ("bidirectional-57600", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputBaudRate.setStatus('optional') if mibBuilder.loadTexts: outputBaudRate.setDescription('If the port in serial mode operation this indicates the baud rate being used. Setting this value on non serial capable ports will result in an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') outputProtocolManager = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 3, 2, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("protocol-none", 0), ("protocol-compatibility", 1), ("protocol-1284-4", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputProtocolManager.setStatus('optional') if mibBuilder.loadTexts: outputProtocolManager.setDescription(' Indicates the type of output protocol manager being used on the port. Protocol-none means either there is no printer attached or the print server has not yet determined which output managers are supported on the printer. Protocol-compatibility means the printer does not support any of the protocol managers supported by the print server. Protocol-1284-4 means the output is using the 1284.4 logical port protocol manager. ') outputDisplayMask = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 2, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputDisplayMask.setStatus('mandatory') if mibBuilder.loadTexts: outputDisplayMask.setDescription('Bit mask describing what should be displayed by the utilities bit Description --- ----------- 0 outputCancelCurrentJob (Includes all CancelCurrentJob info) 1 outputName 2 outputStatusString 3 outputStatus 4 outputExtendedStatus 5 outputPrinter 6 outputLanguageSwitching 7 outputConfigLanguage 8 outputString (Includes outputPCLString and outputPSString) 9 outputCascaded 10 outputSetting 11 outputOwner 12 outputBIDIStatusEnabled 13 outputPrinterModel 14 outputPrinterDisplay 15 outputHandshake 16 outputJobLog (includes all job logging) 17 outputSerialConfig') outputAvailableTrapsMask = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 2, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputAvailableTrapsMask.setStatus('mandatory') if mibBuilder.loadTexts: outputAvailableTrapsMask.setDescription('Bit mask describing what output printer traps are available bit Description --- ----------- 0 online 1 offline 2 printer attached 3 toner low 4 paper out 5 paper jam 6 door open 7 printer error') outputNumLogEntries = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputNumLogEntries.setStatus('mandatory') if mibBuilder.loadTexts: outputNumLogEntries.setDescription('The number of job log entries per output port.') outputJobLogTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 2), ) if mibBuilder.loadTexts: outputJobLogTable.setStatus('mandatory') if mibBuilder.loadTexts: outputJobLogTable.setDescription('A 2 dimensional list of Job log entries indexed by the output port number and the log entry index (1 through outputNumJobLogEntries). The number of entries per output port is given by the value of outputNumJobLogEntries.') outputJobLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 2, 1), ).setIndexNames((0, "ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: outputJobLogEntry.setStatus('mandatory') if mibBuilder.loadTexts: outputJobLogEntry.setDescription('A Job log entry.') outputJobLogInformation = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 100))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputJobLogInformation.setStatus('mandatory') if mibBuilder.loadTexts: outputJobLogInformation.setDescription('A textual description of print job information. The protocol, source, and file size are always included. Other information such as File Server, Queue, File Name, etc will be included if available.') outputJobLogTime = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readonly") if mibBuilder.loadTexts: outputJobLogTime.setStatus('mandatory') if mibBuilder.loadTexts: outputJobLogTime.setDescription('A string indicating the elasped time since the last job was printed. Reported in form X hours X minutes X seconds.') outputTotalJobTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 3), ) if mibBuilder.loadTexts: outputTotalJobTable.setStatus('mandatory') if mibBuilder.loadTexts: outputTotalJobTable.setDescription('Table showing the total number of jobs printed for each port.') outputTotalJobEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 3, 1), ).setIndexNames((0, "ESI-MIB", "outputTotalJobIndex")) if mibBuilder.loadTexts: outputTotalJobEntry.setStatus('mandatory') if mibBuilder.loadTexts: outputTotalJobEntry.setDescription('An entry in the outputTotalJobTable.') outputTotalJobIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputTotalJobIndex.setStatus('mandatory') if mibBuilder.loadTexts: outputTotalJobIndex.setDescription('A unique value for entry in the outputTotalJobTable. Its value ranges between 1 and the value of numPorts.') outputTotalJobsLogged = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 2, 6, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: outputTotalJobsLogged.setStatus('mandatory') if mibBuilder.loadTexts: outputTotalJobsLogged.setDescription('The total number of jobs printed by the port since the print server was powered on. ') tcpipGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: tcpipGroupVersion.setDescription('The version for the tcpip group.') tcpipEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipEnabled.setStatus('optional') if mibBuilder.loadTexts: tcpipEnabled.setDescription('Indicates whether or not the tcpip protocol stack is enabled on the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: tcpipRestoreDefaults.setDescription('A value of 2 will restore all tcpip parameters on the print server to factory defaults, as well as reset the print server.') tcpipFirmwareUpgrade = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipFirmwareUpgrade.setStatus('optional') if mibBuilder.loadTexts: tcpipFirmwareUpgrade.setDescription('A value of 2 will put the print server into firmware upgrade mode waiting to receive a firmware upgrade file via tftp.') tcpipIPAddress = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipIPAddress.setStatus('optional') if mibBuilder.loadTexts: tcpipIPAddress.setDescription('The Internet Address. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipDefaultGateway = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipDefaultGateway.setStatus('optional') if mibBuilder.loadTexts: tcpipDefaultGateway.setDescription('The default gateway for the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipSubnetMask = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSubnetMask.setStatus('optional') if mibBuilder.loadTexts: tcpipSubnetMask.setDescription('The subnet mask for the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipUsingNetProtocols = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipUsingNetProtocols.setStatus('optional') if mibBuilder.loadTexts: tcpipUsingNetProtocols.setDescription('A value of 2 indicates that the print server is using a combination of RARP, BOOTP, default IP address, or gleaning to determine its IP address. See tcpipBootProtocolsEnabled to determine which boot protocols are enabled. If the value of tcpipUsingNetProtocols is 1, the IP address is stored permanently in flash memory. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipBootProtocolsEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipBootProtocolsEnabled.setStatus('optional') if mibBuilder.loadTexts: tcpipBootProtocolsEnabled.setDescription("This is the 16 bit mask which determines which boot protocols will be used to determine the print server's IP address. BIT Boot Protocol Enabled --- -------------------------- 0 RARP 1 BootP 2 DHCP 3 Gleaning 4 Default Address Enabled (If no address after 2 minutes timeout and go to 198.102.102.254) A value of 31 indicates that all boot protocols are enabled. These protocols will only be used if tcpipUsingNetProtocols is set to 2. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.") tcpipIPAddressSource = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("permanent", 1), ("default", 2), ("rarp", 3), ("bootp", 4), ("dhcp", 5), ("glean", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipIPAddressSource.setStatus('optional') if mibBuilder.loadTexts: tcpipIPAddressSource.setDescription('This variable indicates how the IP address for the print server was determined.') tcpipIPAddressServerAddress = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 7), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipIPAddressServerAddress.setStatus('optional') if mibBuilder.loadTexts: tcpipIPAddressServerAddress.setDescription('This variable indicates the source of the IP address if a boot protocol was used. This value will be 0.0.0.0 if no boot server was used.') tcpipTimeoutChecking = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipTimeoutChecking.setStatus('optional') if mibBuilder.loadTexts: tcpipTimeoutChecking.setDescription('A value of 2 indicates that a packet timeout will be active on all tcp connections. If a packet has not been received from the connection within this timeout the connection will be reset. To set this timeout, see tcpipTimeoutCheckingValue') tcpipNumTraps = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipNumTraps.setStatus('mandatory') if mibBuilder.loadTexts: tcpipNumTraps.setDescription('The number of UDP trap destinations.') tcpipTrapTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10), ) if mibBuilder.loadTexts: tcpipTrapTable.setStatus('mandatory') if mibBuilder.loadTexts: tcpipTrapTable.setDescription('A list of UDP trap definitions. The number of entries is given by the value of tcpipNumTraps.') tcpipTrapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10, 1), ).setIndexNames((0, "ESI-MIB", "tcpipTrapIndex")) if mibBuilder.loadTexts: tcpipTrapEntry.setStatus('mandatory') if mibBuilder.loadTexts: tcpipTrapEntry.setDescription('An entry in the tcpipTrapTable.') tcpipTrapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipTrapIndex.setStatus('mandatory') if mibBuilder.loadTexts: tcpipTrapIndex.setDescription('A unique value for entry in the tcpipTrapTable. Its value ranges between 1 and the value of tcpipNumTraps.') tcpipTrapDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipTrapDestination.setStatus('optional') if mibBuilder.loadTexts: tcpipTrapDestination.setDescription('This is the IP address that traps are sent to. A value of 0.0.0.0 will disable traps over UDP.') tcpipProtocolTrapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipProtocolTrapMask.setStatus('optional') if mibBuilder.loadTexts: tcpipProtocolTrapMask.setDescription('This is the 16 bit mask which determines which protocol specific traps will be sent out via UDP. Currently no protocol specific traps are supported.') tcpipPrinterTrapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipPrinterTrapMask.setStatus('optional') if mibBuilder.loadTexts: tcpipPrinterTrapMask.setDescription('This is the 16 bit mask which determines which printer specific traps will be sent out via UDP. A value of 65535 indicates that all printer specific traps should be reported via UDP. BIT CONDITION --- -------------------------- 0 On-line (Condition cleared) 1 Off-line 2 No printer attached 3 Toner Low 4 Paper Out 5 Paper Jam 6 Door Open 15 Printer Error') tcpipOutputTrapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 10, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipOutputTrapMask.setStatus('optional') if mibBuilder.loadTexts: tcpipOutputTrapMask.setDescription('This is the 16 bit mask which determines which physical output ports will be checked when generating printer specific traps to be sent out via UDP. A value of 65535 indicates that all physical output ports will generate traps. BIT CONDITION --- -------------------------- 0 Port 1 1 Port 2 2 Port 3 3 Port 4 ... ...') tcpipBanners = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipBanners.setStatus('optional') if mibBuilder.loadTexts: tcpipBanners.setDescription('A value of 2 indicates that banners will be printed with tcpip jobs. Even if the group is supported, this variable may not be supported.') tcpipWinsAddress = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 12), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWinsAddress.setStatus('optional') if mibBuilder.loadTexts: tcpipWinsAddress.setDescription('The IP address of the WINS server. The print server will register its sysName to this WINS server.') tcpipWinsAddressSource = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("dhcp", 1), ("permanent", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWinsAddressSource.setStatus('optional') if mibBuilder.loadTexts: tcpipWinsAddressSource.setDescription('The source of the WINS server address. If set to dhcp, the print server will use the WINS address supplied with dhcp. If it is set to permanent, it will use the WINS address stored in flash.') tcpipConfigPassword = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(5, 24))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipConfigPassword.setStatus('optional') if mibBuilder.loadTexts: tcpipConfigPassword.setDescription('The print server html/telnet configuration password. This value cannot be read, just set.') tcpipTimeoutCheckingValue = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipTimeoutCheckingValue.setStatus('optional') if mibBuilder.loadTexts: tcpipTimeoutCheckingValue.setDescription('The TCP connection timeout in seconds. A value of 0 has the same effect as disabling timeout checking.') tcpipArpInterval = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipArpInterval.setStatus('optional') if mibBuilder.loadTexts: tcpipArpInterval.setDescription('The ARP interval in minutes. The print server will ARP itself once when this timer expires. Set to 0 to disable.') tcpipRawPortNumber = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 17), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipRawPortNumber.setStatus('optional') if mibBuilder.loadTexts: tcpipRawPortNumber.setDescription('The raw TCP port number the print server will listen for print jobs on. On multiple port devices, additional ports will sequentially follow this port number. The default port is 9100. Setting this value to a TCP port that is in use by another TCP application will return an error. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipNumSecurity = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipNumSecurity.setStatus('mandatory') if mibBuilder.loadTexts: tcpipNumSecurity.setDescription('The number of secure IP address ranges.') tcpipSecurityTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19), ) if mibBuilder.loadTexts: tcpipSecurityTable.setStatus('mandatory') if mibBuilder.loadTexts: tcpipSecurityTable.setDescription('A list of secure IP address ranges. This adds security for both printing and admin rights. AdminEnabled: When the admin enabled field is set to yes for a secure address range, the print server may only be configured via IP from IP address within that range. If the admin field is not set for any address ranges, the print server will accept admin commands from any IP address which has the valid community names and/or passwords. PortMask: When there is a port mask set for a secure IP address range, the print server will only accept TCP/IP print jobs from hosts that are in the secure address range. If there are no ranges with a port mask set, the print server will accept TCP/IP print jobs from any host. The number of entries is given by the value of tcpipNumSecurity.') tcpipSecurityEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19, 1), ).setIndexNames((0, "ESI-MIB", "tcpipSecurityIndex")) if mibBuilder.loadTexts: tcpipSecurityEntry.setStatus('mandatory') if mibBuilder.loadTexts: tcpipSecurityEntry.setDescription('An entry in the tcpipSecurityTable.') tcpipSecurityIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipSecurityIndex.setStatus('mandatory') if mibBuilder.loadTexts: tcpipSecurityIndex.setDescription('A unique value for entry in the tcpipSecurityTable. Its value ranges between 1 and the value of tcpipNumSecurity.') tcpipSecureStartIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSecureStartIPAddress.setStatus('optional') if mibBuilder.loadTexts: tcpipSecureStartIPAddress.setDescription('This is the starting IP address for the secure IP address range. A value of 0.0.0.0 for both tcpipStartIPAddress and tcpipEndIPAddress will disable the address range.') tcpipSecureEndIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSecureEndIPAddress.setStatus('optional') if mibBuilder.loadTexts: tcpipSecureEndIPAddress.setDescription('This is the ending IP address for the secure IP address range. A value of 0.0.0.0 for both tcpipStartIPAddress and tcpipEndIPAddress will disable the address range.') tcpipSecurePrinterMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSecurePrinterMask.setStatus('optional') if mibBuilder.loadTexts: tcpipSecurePrinterMask.setDescription('This is the 8 bit mask which determines which physical output ports this range of IP addresses can print to. A value of 127 indicates that the range of IP addresses can print to any of the output ports. This value can not be configured until a valid start and end address range have been configured. BIT CONDITION --- -------------------------- 0 Port 1 1 Port 2 2 Port 3 3 Port 4 ... ... 8 Reserved, must be set to 0.') tcpipSecureAdminEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 19, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSecureAdminEnabled.setStatus('optional') if mibBuilder.loadTexts: tcpipSecureAdminEnabled.setDescription(' This allows an advanced level of admin security for IP. Setting this will restrict which IP addresses can configure the print server. The correct community names and passwords are still required if this is used, it just adds another level of security. Indicates whether or not admin rights are enabled for this range of IP addresses. If no range of addresses has this enabled, then any IP address can configure the print server if it has the correct community names and/or passwords. If this field is set to yes for any range of addresses, the print server will only be configurable via IP from that range of addresses. This value can not be configured until a valid start and end address range have been configured.') tcpipLowBandwidth = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipLowBandwidth.setStatus('optional') if mibBuilder.loadTexts: tcpipLowBandwidth.setDescription('A value of 2 will optimize the TCP stack for low bandwidth networks. A value of 1 will optimize the TCP stack for high bandwidth networks.') tcpipNumLogicalPrinters = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipNumLogicalPrinters.setStatus('mandatory') if mibBuilder.loadTexts: tcpipNumLogicalPrinters.setDescription('The number of available logical printers.') tcpipMLPTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22), ) if mibBuilder.loadTexts: tcpipMLPTable.setStatus('mandatory') if mibBuilder.loadTexts: tcpipMLPTable.setDescription('A table of the available logical printers. The number of entries is given by the value of tcpipNumLogicalPrinters.') tcpipMLPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1), ).setIndexNames((0, "ESI-MIB", "tcpipMLPIndex")) if mibBuilder.loadTexts: tcpipMLPEntry.setStatus('mandatory') if mibBuilder.loadTexts: tcpipMLPEntry.setDescription('An entry in the tcpipMLPTable.') tcpipMLPIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipMLPIndex.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPIndex.setDescription('A unique value for entry in the tcpipMLPTable. Its value ranges between 1 and the value of tcpipNumLogicalPrinters.') tcpipMLPName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipMLPName.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPName.setDescription('Contains the name of the logical printer. This name is also the LPR remote queue name associated with the logical printer.') tcpipMLPPort = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipMLPPort.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPPort.setDescription('The number of the physical output port associated with the logical printer. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipMLPTCPPort = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipMLPTCPPort.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPTCPPort.setDescription('The TCP port associated with the logical printer. Any print data sent to this TCP port will be processed through this logical printer entry. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') tcpipMLPPreString = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipMLPPreString.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPPreString.setDescription("This contains any data that should be sent down to the printer at the beginning of jobs sent to this logical printer. To enter non-printable ascii characters in the string, enclose the decimal value inside of <>. For example, to enter an ESC-E the string would be '<27>E'.") tcpipMLPPostString = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipMLPPostString.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPPostString.setDescription("This contains any data that should be sent down to the printer at the end of jobs sent to this logical printer. To enter non-printable ascii characters in the string, enclose the decimal value inside of <>. For example, to enter an ESC-E the string would be '<27>E'.") tcpipMLPDeleteBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 22, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipMLPDeleteBytes.setStatus('optional') if mibBuilder.loadTexts: tcpipMLPDeleteBytes.setDescription('The number of bytes that will be deleted from the beginning of jobs sent to this logical printer.') tcpipSmtpServerAddr = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 23), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSmtpServerAddr.setStatus('optional') if mibBuilder.loadTexts: tcpipSmtpServerAddr.setDescription('The IP address of the e-mail server which will be used to send e-mail notification of printer status conditions. This address must contain the valid IP address of an e-mail server before any of the contents of the SmtpTable are used.') tcpipNumSmtpDestinations = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 24), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipNumSmtpDestinations.setStatus('mandatory') if mibBuilder.loadTexts: tcpipNumSmtpDestinations.setDescription('The number of configurable e-mail destinations to receive printer status conditions. ') tcpipSmtpTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25), ) if mibBuilder.loadTexts: tcpipSmtpTable.setStatus('mandatory') if mibBuilder.loadTexts: tcpipSmtpTable.setDescription('A list of SMTP e-mail addresses and printer status conditions to send e-mails for. The number of entries is given by the value of tcpipNumSmtpDestinations.') tcpipSmtpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25, 1), ).setIndexNames((0, "ESI-MIB", "tcpipSmtpIndex")) if mibBuilder.loadTexts: tcpipSmtpEntry.setStatus('mandatory') if mibBuilder.loadTexts: tcpipSmtpEntry.setDescription('An entry in the tcpipSmtpTable.') tcpipSmtpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipSmtpIndex.setStatus('mandatory') if mibBuilder.loadTexts: tcpipSmtpIndex.setDescription('A unique value for entry in the tcpipSmtpTable. Its value ranges between 1 and the value of tcpipNumSmtpDestinations.') tcpipSmtpEmailAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).setFixedLength(64)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSmtpEmailAddr.setStatus('optional') if mibBuilder.loadTexts: tcpipSmtpEmailAddr.setDescription('This is the e-mail address that printer status conditions are sent to. If this string is empty the status conditions will not be sent.') tcpipSmtpProtocolMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSmtpProtocolMask.setStatus('optional') if mibBuilder.loadTexts: tcpipSmtpProtocolMask.setDescription('This is the 16 bit mask which determines which protocol specific conditions will be sent out via e-mail. Currently no protocol specific conditions are supported.') tcpipSmtpPrinterMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSmtpPrinterMask.setStatus('optional') if mibBuilder.loadTexts: tcpipSmtpPrinterMask.setDescription('This is the 16 bit mask which determines which printer specific conditions will be sent out via e-mail. A value of 65535 indicates that all printer specific conditions should be reported via e-mail. BIT CONDITION --- -------------------------- 0 On-line (Condition cleared) 1 Off-line 2 No printer attached 3 Toner Low 4 Paper Out 5 Paper Jam 6 Door Open 15 Printer Error') tcpipSmtpOutputMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 25, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipSmtpOutputMask.setStatus('optional') if mibBuilder.loadTexts: tcpipSmtpOutputMask.setDescription('This is the 16 bit mask which determines which physical output ports will be checked when generating printer specific conditions to be sent out via e-mail. A value of 65535 indicates that all physical output ports will generate e-mails upon a change in status. BIT CONDITION --- -------------------------- 0 Port 1 1 Port 2 2 Port 3 3 Port 4 ... ...') tcpipWebAdminName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 26), OctetString().subtype(subtypeSpec=ValueSizeConstraint(25, 25)).setFixedLength(25)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebAdminName.setStatus('optional') if mibBuilder.loadTexts: tcpipWebAdminName.setDescription('This is the admin name used by web configuration for login.') tcpipWebAdminPassword = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 27), OctetString().subtype(subtypeSpec=ValueSizeConstraint(25, 25)).setFixedLength(25)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebAdminPassword.setStatus('optional') if mibBuilder.loadTexts: tcpipWebAdminPassword.setDescription('This is the admin password used by web configuration for login.') tcpipWebUserName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 28), OctetString().subtype(subtypeSpec=ValueSizeConstraint(25, 25)).setFixedLength(25)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebUserName.setStatus('optional') if mibBuilder.loadTexts: tcpipWebUserName.setDescription('This is the user name used by web configuration for login. Not currently used. ') tcpipWebUserPassword = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 29), OctetString().subtype(subtypeSpec=ValueSizeConstraint(25, 25)).setFixedLength(25)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebUserPassword.setStatus('optional') if mibBuilder.loadTexts: tcpipWebUserPassword.setDescription('This is the user password used by web configuration for login. Not currently used.') tcpipWebHtttpPort = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 30), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebHtttpPort.setStatus('optional') if mibBuilder.loadTexts: tcpipWebHtttpPort.setDescription('The port number used to communicate over http. Must be between 0 and 65535. It must not be the same as any other port used. Other ports used are 20, 21, 23, 515, & raw port numbers (9100, 9101, ... if at default)') tcpipWebFaqURL = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 31), OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).setFixedLength(64)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebFaqURL.setStatus('optional') if mibBuilder.loadTexts: tcpipWebFaqURL.setDescription('This is the URL for FAQ at the ESI (or other OEM) website.') tcpipWebUpdateURL = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 32), OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).setFixedLength(64)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebUpdateURL.setStatus('optional') if mibBuilder.loadTexts: tcpipWebUpdateURL.setDescription('This is the URL for finding firmware updates at the ESI (or other OEM) website.') tcpipWebCustomLinkName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 33), OctetString().subtype(subtypeSpec=ValueSizeConstraint(25, 25)).setFixedLength(25)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebCustomLinkName.setStatus('optional') if mibBuilder.loadTexts: tcpipWebCustomLinkName.setDescription('This is the name assigned to the custom link defined by the user.') tcpipWebCustomLinkURL = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 34), OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).setFixedLength(64)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipWebCustomLinkURL.setStatus('optional') if mibBuilder.loadTexts: tcpipWebCustomLinkURL.setDescription('This is the URL for a custom link specified by the user.') tcpipPOP3ServerAddress = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 35), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipPOP3ServerAddress.setStatus('optional') if mibBuilder.loadTexts: tcpipPOP3ServerAddress.setDescription('The IP address of the POP3 server from which email will be retrieved. This address must contain the valid IP address of a POP3 server before any attempts to retrieve email will be made.') tcpipPOP3PollInterval = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 36), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipPOP3PollInterval.setStatus('mandatory') if mibBuilder.loadTexts: tcpipPOP3PollInterval.setDescription('The number of seconds between attempts to retrieve mail from the POP3 server. ') tcpipPOP3UserName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 37), OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).setFixedLength(64)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipPOP3UserName.setStatus('optional') if mibBuilder.loadTexts: tcpipPOP3UserName.setDescription("This is the user name for the print server's email account on the POP3 server.") tcpipPOP3Password = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 38), OctetString().subtype(subtypeSpec=ValueSizeConstraint(20, 20)).setFixedLength(20)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipPOP3Password.setStatus('optional') if mibBuilder.loadTexts: tcpipPOP3Password.setDescription("This is the password for the print server's email account on the POP3 server.") tcpipDomainName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 4, 39), OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).setFixedLength(64)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpipDomainName.setStatus('optional') if mibBuilder.loadTexts: tcpipDomainName.setDescription('This is the Domain name used by POP3 and SMTP.') tcpipError = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 5, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipError.setStatus('optional') if mibBuilder.loadTexts: tcpipError.setDescription('Contains any tcpip specific error information.') tcpipDisplayMask = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpipDisplayMask.setStatus('mandatory') if mibBuilder.loadTexts: tcpipDisplayMask.setDescription('Bit mask describing what should be displayed by the utilities bit Description --- ----------- 0 tcpipAddress (Includes tcpipDefaultGateway and tcpipSubnetMask) 1 tcpipUsingNetProtocols (Includes tcpipBootProtocolsEnabled, tcpipAddressSource, tcpipAddressServerAddress) 2 tcpipTimeoutChecking 3 tcpipTraps (Includes all trap info) 4 tcpipBanners 5 tcpipSecurity (Includes all security info) 6 tcpipWinsAddress (Includes tcpipWinsAddressSource) 7 tcpipConfigPassword 8 tcpipTimeoutCheckingValue 9 tcpipArpInterval 10 tcpipRawPortNumber 11 tcpipError 12 tcpipLowBandwidth 13 tcpipMLP (Includes all logical printer settings)') nwGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: nwGroupVersion.setDescription('The version for the netware group.') nwEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwEnabled.setStatus('optional') if mibBuilder.loadTexts: nwEnabled.setDescription('Indicates whether or not the NetWare protocol stack is enabled on the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: nwRestoreDefaults.setDescription('A value of 2 will restore all NetWare parameters on the print server to factory defaults, as well as reset the print server.') nwFirmwareUpgrade = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwFirmwareUpgrade.setStatus('optional') if mibBuilder.loadTexts: nwFirmwareUpgrade.setDescription('A value of 2 will put the print server into firmware upgrade mode.') nwFrameFormat = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("unknown", 1), ("ethernet-II", 2), ("ethernet-802-3", 3), ("ethernet-802-2", 4), ("ethernet-Snap", 5), ("token-Ring", 6), ("token-Ring-Snap", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwFrameFormat.setStatus('optional') if mibBuilder.loadTexts: nwFrameFormat.setDescription('Indicates the frame format that the print server is using. See nwSetFrameFormat to determine which frame frame format the print server is configured for.') nwSetFrameFormat = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("auto-Sense", 1), ("forced-Ethernet-II", 2), ("forced-Ethernet-802-3", 3), ("forced-Ethernet-802-2", 4), ("forced-Ethernet-Snap", 5), ("forced-Token-Ring", 6), ("forced-Token-Ring-Snap", 7)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwSetFrameFormat.setStatus('optional') if mibBuilder.loadTexts: nwSetFrameFormat.setDescription('Indicates the frame format that the print server is using. Setting this value to 1 (Auto_Sense) indicates that automatic frame format sensing will be used. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwMode = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("pserver", 2), ("rprinter", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwMode.setStatus('optional') if mibBuilder.loadTexts: nwMode.setDescription('Mode the print server is running in. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPrintServerName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPrintServerName.setStatus('optional') if mibBuilder.loadTexts: nwPrintServerName.setDescription('Contains print server name. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPrintServerPassword = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 9))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPrintServerPassword.setStatus('optional') if mibBuilder.loadTexts: nwPrintServerPassword.setDescription('The print server password. This value cannot be read, just set. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwQueueScanTime = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwQueueScanTime.setStatus('optional') if mibBuilder.loadTexts: nwQueueScanTime.setDescription('Determines how often, in tenths of a second that the print server will scan the queues for jobs. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwNetworkNumber = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: nwNetworkNumber.setStatus('optional') if mibBuilder.loadTexts: nwNetworkNumber.setDescription("The print server's network number.") nwMaxFileServers = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwMaxFileServers.setStatus('optional') if mibBuilder.loadTexts: nwMaxFileServers.setDescription('The print server maximum number of file servers which it can be attached to at once.') nwFileServerTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 9), ) if mibBuilder.loadTexts: nwFileServerTable.setStatus('optional') if mibBuilder.loadTexts: nwFileServerTable.setDescription('A table of file servers to service.') nwFileServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 9, 1), ).setIndexNames((0, "ESI-MIB", "nwFileServerIndex")) if mibBuilder.loadTexts: nwFileServerEntry.setStatus('optional') if mibBuilder.loadTexts: nwFileServerEntry.setDescription('A file server for the print server to service.') nwFileServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 9, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwFileServerIndex.setStatus('optional') if mibBuilder.loadTexts: nwFileServerIndex.setDescription("A unique value for each file server. Its value ranges between 1 and the value of nwMaxFileServers. The value for each server must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization. The first entry in the table is the default file server.") nwFileServerName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 9, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwFileServerName.setStatus('optional') if mibBuilder.loadTexts: nwFileServerName.setDescription('The file server name. This name will be NULL if there is no file server to be serviced. Only the default file server (the first entry in the table) can be set. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwFileServerConnectionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 9, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 258, 261, 276, 512, 515, 768, 769, 32767))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("startupInProgress", 3), ("serverReattaching", 4), ("serverNeverAttached", 5), ("pse-UNKNOWN-FILE-SERVER", 258), ("pse-NO-RESPONSE", 261), ("pse-CANT-LOGIN", 276), ("pse-NO-SUCH-QUEUE", 512), ("pse-UNABLE-TO-ATTACH-TO-QUEUE", 515), ("bad-CONNECTION", 768), ("bad-SERVICE-CONNECTION", 769), ("other", 32767)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwFileServerConnectionStatus.setStatus('optional') if mibBuilder.loadTexts: nwFileServerConnectionStatus.setDescription('The value describes the status of the connection between the file server and the print server.') nwPortTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10), ) if mibBuilder.loadTexts: nwPortTable.setStatus('optional') if mibBuilder.loadTexts: nwPortTable.setDescription('A table of NetWare port specific information.') nwPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1), ).setIndexNames((0, "ESI-MIB", "nwPortIndex")) if mibBuilder.loadTexts: nwPortEntry.setStatus('optional') if mibBuilder.loadTexts: nwPortEntry.setDescription('An entry of NetWare port specific information.') nwPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwPortIndex.setStatus('optional') if mibBuilder.loadTexts: nwPortIndex.setDescription("A unique value for each physical output port. Its value ranges between 1 and the value of outputNumPorts. The value for each port must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization.") nwPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwPortStatus.setStatus('optional') if mibBuilder.loadTexts: nwPortStatus.setDescription('A string indicating the NetWare specific status of the physical output port.') nwPortPrinterNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortPrinterNumber.setStatus('optional') if mibBuilder.loadTexts: nwPortPrinterNumber.setDescription('Indicates the printer number for the print server to use when running in RPRinter mode. A value of 255 indicates that the port is unconfigured for RPRinter mode. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPortFontDownload = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disabled", 1), ("enabled-No-Power-Sense", 2), ("enabled-Power-Sense", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortFontDownload.setStatus('optional') if mibBuilder.loadTexts: nwPortFontDownload.setDescription('This variable controls the font downloading feature of the print server. Disabled - Do not download fonts. Enabled, without Printer Sense - Only download fonts after the print server has been reset or power cycled. Enabled, with Printer Sense - Download fonts after the print server has been reset or power-cycled, or after the printer has been power-cycled. This option is only available on certain print servers. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPortPCLQueue = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortPCLQueue.setStatus('optional') if mibBuilder.loadTexts: nwPortPCLQueue.setDescription('A string indicating the name of the queue containing the PCL fonts to download when font downloading is enabled. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPortPSQueue = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortPSQueue.setStatus('optional') if mibBuilder.loadTexts: nwPortPSQueue.setDescription('A string indicating the name of the queue containing the PS fonts to download when font downloading is enabled. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPortFormsOn = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortFormsOn.setStatus('optional') if mibBuilder.loadTexts: nwPortFormsOn.setDescription('A value of 2 will enable forms checking. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') nwPortFormNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortFormNumber.setStatus('optional') if mibBuilder.loadTexts: nwPortFormNumber.setDescription('Indicates the form number to check jobs against when nwPortFormsOn is enabled.') nwPortNotification = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 10, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPortNotification.setStatus('optional') if mibBuilder.loadTexts: nwPortNotification.setDescription('A value of 2 will enable job notification.') nwNumTraps = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwNumTraps.setStatus('mandatory') if mibBuilder.loadTexts: nwNumTraps.setDescription('The number of IPX trap destinations.') nwTrapTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12), ) if mibBuilder.loadTexts: nwTrapTable.setStatus('mandatory') if mibBuilder.loadTexts: nwTrapTable.setDescription('A list of IPX trap definitions. The number of entries is given by the value of nwNumTraps.') nwTrapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1), ).setIndexNames((0, "ESI-MIB", "nwTrapIndex")) if mibBuilder.loadTexts: nwTrapEntry.setStatus('mandatory') if mibBuilder.loadTexts: nwTrapEntry.setDescription('An entry in the nwTrapTable.') nwTrapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwTrapIndex.setStatus('mandatory') if mibBuilder.loadTexts: nwTrapIndex.setDescription('A unique value for entry in the nwTrapTable. Its value ranges between 1 and the value of nwNumTraps.') nwTrapDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwTrapDestination.setStatus('optional') if mibBuilder.loadTexts: nwTrapDestination.setDescription('This is the network address that IPX traps are sent to. A value of 00 00 00 00 00 00 in conjunction with a nwTrapDestinationNet of 00 00 00 00 will disable traps over IPX.') nwTrapDestinationNet = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwTrapDestinationNet.setStatus('mandatory') if mibBuilder.loadTexts: nwTrapDestinationNet.setDescription('This is the network number that IPX traps are sent to. A value of 00 00 00 00 in conjunction with a nwTrapDestination of 00 00 00 00 00 00 will disable traps over IPX.') nwProtocolTrapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwProtocolTrapMask.setStatus('optional') if mibBuilder.loadTexts: nwProtocolTrapMask.setDescription('This is the 16 bit mask which determines which protocol specific traps will be sent out via IPX. Currently no protocol specific traps are supported.') nwPrinterTrapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwPrinterTrapMask.setStatus('optional') if mibBuilder.loadTexts: nwPrinterTrapMask.setDescription('This is the 16 bit mask which determines which printer specific traps will be sent out via IPX. A value of 65535 indicates that all printer specific traps should be reported via IPX. BIT CONDITION --- -------------------------- 0 On-line (Condition cleared) 1 Off-line 2 No printer attached 3 Toner Low 4 Paper Out 5 Paper Jam 6 Door Open 15 Printer Error') nwOutputTrapMask = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 12, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwOutputTrapMask.setStatus('optional') if mibBuilder.loadTexts: nwOutputTrapMask.setDescription('This is the 16 bit mask which determines which physical output ports will be checked when generating printer specific traps to be sent out via IPX. A value of 65535 indicates that all physical output ports will generate traps. BIT CONDITION --- -------------------------- 0 Port 1 1 Port 2 2 Port 3 3 Port 4 ... ...') nwNDSPrintServerName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 512))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwNDSPrintServerName.setStatus('optional') if mibBuilder.loadTexts: nwNDSPrintServerName.setDescription('Directory Services object used by the print server to connect to the NDS tree. This string contains the entire canonicalized name. NOTE: This variable must be stored in Unicode.') nwNDSPreferredDSTree = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 14), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwNDSPreferredDSTree.setStatus('optional') if mibBuilder.loadTexts: nwNDSPreferredDSTree.setDescription('Directory Services tree to which the NDS print server initially connects.') nwNDSPreferredDSFileServer = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 47))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwNDSPreferredDSFileServer.setStatus('optional') if mibBuilder.loadTexts: nwNDSPreferredDSFileServer.setDescription('The NetWare server to which the NDS print server initially makes a bindery connection.') nwNDSPacketCheckSumEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 16), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwNDSPacketCheckSumEnabled.setStatus('optional') if mibBuilder.loadTexts: nwNDSPacketCheckSumEnabled.setDescription('Compute the checksum for packets. 1 = disabled 2 = enabled') nwNDSPacketSignatureLevel = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 17), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwNDSPacketSignatureLevel.setStatus('optional') if mibBuilder.loadTexts: nwNDSPacketSignatureLevel.setDescription('Packet signature is a security method to prevent packet forging. 1 = disabled 2 = enabled 3 = preferred 4 = required') nwAvailablePrintModes = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwAvailablePrintModes.setStatus('optional') if mibBuilder.loadTexts: nwAvailablePrintModes.setDescription('Reports which NetWare print modes are available. BIT CONDITION --- -------------------------- 0 PServer 1 RPrinter 2 NDS 3 SPX Direct 4 JetAdmin ') nwDirectPrintEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwDirectPrintEnabled.setStatus('optional') if mibBuilder.loadTexts: nwDirectPrintEnabled.setDescription('Indicates whether or not direct mode ipx/spx printing is enabled.') nwJAConfig = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwJAConfig.setStatus('optional') if mibBuilder.loadTexts: nwJAConfig.setDescription('Indicates whether or not JetAdmin was used to configure the netware settings.') nwDisableSAP = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 4, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: nwDisableSAP.setStatus('optional') if mibBuilder.loadTexts: nwDisableSAP.setDescription('Indicates whether or not SAPs are enabled.') nwError = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 5, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 160))).setMaxAccess("readonly") if mibBuilder.loadTexts: nwError.setStatus('optional') if mibBuilder.loadTexts: nwError.setDescription('Contains any NetWare specific error information.') nwDisplayMask = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 2, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nwDisplayMask.setStatus('mandatory') if mibBuilder.loadTexts: nwDisplayMask.setDescription('Bit mask describing what should be displayed by the utilities bit Description --- ----------- 0 nwFrameFormat 1 nwJetAdmin 2 nwFileServer (Includes all file server info) 3 nwMode 4 nwPrintServerName 5 nwPrintServerPassword 6 nwQueueScanTime 7 nwNetworkNumber 8 nwPortStatus 9 nwPortPrinterNumber 10 nwPortFontDownload (Includes nwPortPCLQueue and nwPortPSQueue) 11 nwPortFormsOn (Includes nwPortFormsNumber) 12 nwPortNotification 13 nwTraps (Includes all trap info) 14 nwNDSPrintServerName 15 nwNDSPreferredDSTree 16 nwNDSPreferredDSFileServer 17 nwNDSPacketCheckSumEnabled 18 nwNDSPacketSignatureLevel 19 nwDirectPrintEnabled 20 nwError 21 nwSapDisable') bvGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bvGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: bvGroupVersion.setDescription('The version for the vines group.') bvEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvEnabled.setStatus('optional') if mibBuilder.loadTexts: bvEnabled.setDescription('Indicates whether or not the Banyan VINES protocol stack is enabled on the print server.') bvRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: bvRestoreDefaults.setDescription('A value of 2 will restore all VINES parameters on the print server to factory defaults, as well as reset the device.') bvFirmwareUpgrade = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvFirmwareUpgrade.setStatus('optional') if mibBuilder.loadTexts: bvFirmwareUpgrade.setDescription('A value of 2 will put the print server into firmware upgrade mode.') bvSetSequenceRouting = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 3, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("automatic-Routing", 1), ("force-Sequenced-Routing", 2), ("force-Non-Sequenced-Routing", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvSetSequenceRouting.setStatus('optional') if mibBuilder.loadTexts: bvSetSequenceRouting.setDescription('Sets the VINES Routing selection. Automatic - Utilizes Sequenced Routing if available, otherwise uses Non-Sequenced Routing. Force-Sequenced - Will only use Sequenced Routing. Force-Non-Sequenced - Will only use Non-Sequenced Routing In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this. WARNING - Sequential Routing requires a VINES 5.5 or greater server on the same subnet.') bvDisableVPMan = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 3, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvDisableVPMan.setStatus('optional') if mibBuilder.loadTexts: bvDisableVPMan.setDescription('A value of 2 will disable VPMan access to the print server for one minute.') bvLoginName = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(5, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvLoginName.setStatus('optional') if mibBuilder.loadTexts: bvLoginName.setDescription('The StreetTalk name the device will use to login with. This value will be ESIxxxxxxxx where xxxxxxx is the Serial number of the device if it is unconfigured. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') bvLoginPassword = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvLoginPassword.setStatus('optional') if mibBuilder.loadTexts: bvLoginPassword.setDescription('The password for the login name, bvLoginName. This value cannot be read, just set. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') bvNumberPrintServices = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bvNumberPrintServices.setStatus('optional') if mibBuilder.loadTexts: bvNumberPrintServices.setDescription('The number of Print Services this device supports.') bvPrintServiceTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 4), ) if mibBuilder.loadTexts: bvPrintServiceTable.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceTable.setDescription('Table of Print Services for this device.') bvPrintServiceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 4, 1), ).setIndexNames((0, "ESI-MIB", "bvPrintServiceIndex")) if mibBuilder.loadTexts: bvPrintServiceEntry.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceEntry.setDescription('Print Services Table entry.') bvPrintServiceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bvPrintServiceIndex.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceIndex.setDescription('A unique value for each print service.') bvPrintServiceName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvPrintServiceName.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceName.setDescription('The StreetTalk Name for this Print Service. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') bvPrintServiceRouting = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 4, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvPrintServiceRouting.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceRouting.setDescription('The output port that the print service will print to. This value will range from 0 to the number of output ports, see outputNumPorts. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') bvPnicDescription = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 4, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: bvPnicDescription.setStatus('optional') if mibBuilder.loadTexts: bvPnicDescription.setDescription('Contains the VINES PNIC description.') bvError = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 48))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvError.setStatus('optional') if mibBuilder.loadTexts: bvError.setDescription('Contains any VINES specific error information.') bvRouting = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 32766, 32767))).clone(namedValues=NamedValues(("sequenced-Routing", 1), ("non-Sequenced-Routing", 2), ("unknown-Routing", 32766), ("protocol-Disabled", 32767)))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvRouting.setStatus('optional') if mibBuilder.loadTexts: bvRouting.setDescription('The current VINES Routing being used by the device.') bvNumPrintServices = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bvNumPrintServices.setStatus('optional') if mibBuilder.loadTexts: bvNumPrintServices.setDescription('The number of Print Services this device supports.') bvPrintServiceStatusTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4), ) if mibBuilder.loadTexts: bvPrintServiceStatusTable.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceStatusTable.setDescription("Table of Print Service Status Entry's.") bvPrintServiceStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1), ).setIndexNames((0, "ESI-MIB", "bvPSStatusIndex")) if mibBuilder.loadTexts: bvPrintServiceStatusEntry.setStatus('optional') if mibBuilder.loadTexts: bvPrintServiceStatusEntry.setDescription('Print Service Status Entry.') bvPSStatusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bvPSStatusIndex.setStatus('optional') if mibBuilder.loadTexts: bvPSStatusIndex.setDescription('A unique value for each status entry.') bvPSName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvPSName.setStatus('optional') if mibBuilder.loadTexts: bvPSName.setDescription('The StreetTalk Name for this Print Service.') bvPSStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 48))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvPSStatus.setStatus('optional') if mibBuilder.loadTexts: bvPSStatus.setDescription('Print Service Status.') bvPSDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: bvPSDestination.setStatus('optional') if mibBuilder.loadTexts: bvPSDestination.setDescription('Port Destination for this print service.') bvPrinterStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvPrinterStatus.setStatus('optional') if mibBuilder.loadTexts: bvPrinterStatus.setDescription('Printer status for this Print Service.') bvJobActive = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvJobActive.setStatus('optional') if mibBuilder.loadTexts: bvJobActive.setDescription('Whether there is a VINES job active for this print service.') bvJobSource = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvJobSource.setStatus('optional') if mibBuilder.loadTexts: bvJobSource.setDescription('The active print jobs source.') bvJobTitle = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvJobTitle.setStatus('optional') if mibBuilder.loadTexts: bvJobTitle.setDescription('The title of the active print job.') bvJobSize = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 9))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvJobSize.setStatus('optional') if mibBuilder.loadTexts: bvJobSize.setDescription('The size of the active print job.') bvJobNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 3, 5, 4, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 4))).setMaxAccess("readonly") if mibBuilder.loadTexts: bvJobNumber.setStatus('optional') if mibBuilder.loadTexts: bvJobNumber.setDescription('The VINES job number of the active print job.') lmGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 4, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: lmGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: lmGroupVersion.setDescription('The version for the lanManger group.') lmEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 4, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: lmEnabled.setStatus('optional') if mibBuilder.loadTexts: lmEnabled.setDescription('Indicates whether or not the Lan Manager protocol stack is enabled on the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') eTalkGroupVersion = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkGroupVersion.setStatus('mandatory') if mibBuilder.loadTexts: eTalkGroupVersion.setDescription('The version for the eTalk group.') eTalkEnabled = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkEnabled.setStatus('optional') if mibBuilder.loadTexts: eTalkEnabled.setDescription('Indicates whether or not the EtherTalk protocol stack is enabled on the print server. In order for changes to this variable to take effect, the print server must be reset. See cmdReset to do this.') eTalkRestoreDefaults = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 3, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkRestoreDefaults.setStatus('optional') if mibBuilder.loadTexts: eTalkRestoreDefaults.setDescription('A value of 2 will restore all EtherTalk parameters on the print server to factory defaults, as well as reset the print server.') eTalkNetwork = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkNetwork.setStatus('optional') if mibBuilder.loadTexts: eTalkNetwork.setDescription('Indicates the EtherTalk network number that the print server is currently using.') eTalkNode = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkNode.setStatus('optional') if mibBuilder.loadTexts: eTalkNode.setDescription('Indicates the EtherTalk node number that the print server is currently using.') eTalkNumPorts = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkNumPorts.setStatus('optional') if mibBuilder.loadTexts: eTalkNumPorts.setDescription('Indicates the number of physical output ports that are EtherTalk compatible.') eTalkPortTable = MibTable((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4), ) if mibBuilder.loadTexts: eTalkPortTable.setStatus('optional') if mibBuilder.loadTexts: eTalkPortTable.setDescription('A table of EtherTalk specific port configuration information.') eTalkPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1), ).setIndexNames((0, "ESI-MIB", "eTalkPortIndex")) if mibBuilder.loadTexts: eTalkPortEntry.setStatus('optional') if mibBuilder.loadTexts: eTalkPortEntry.setDescription('An entry of EtherTalk port specific information.') eTalkPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkPortIndex.setStatus('optional') if mibBuilder.loadTexts: eTalkPortIndex.setDescription("A unique value for each physical output port which is compatible with EtherTalk. Its value ranges between 1 and the value of eTalkNumPorts. The value for each port must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization.") eTalkPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkPortEnable.setStatus('optional') if mibBuilder.loadTexts: eTalkPortEnable.setDescription('Indicates whether or not the physical output port is enabled to print via EtherTalk and will show up in the Chooser.') eTalkName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkName.setStatus('optional') if mibBuilder.loadTexts: eTalkName.setDescription('This is the EtherTalk name for the print server.') eTalkActiveName = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkActiveName.setStatus('optional') if mibBuilder.loadTexts: eTalkActiveName.setDescription('This is the EtherTalk name for the print server that is currently being used.') eTalkType1 = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkType1.setStatus('optional') if mibBuilder.loadTexts: eTalkType1.setDescription('Indicates the first EtherTalk type. This type is mandatory.') eTalkType2 = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkType2.setStatus('optional') if mibBuilder.loadTexts: eTalkType2.setDescription('Indicates the second EtherTalk type. This type is optional. Setting this name to NULL will disable it.') eTalkZone = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: eTalkZone.setStatus('optional') if mibBuilder.loadTexts: eTalkZone.setDescription('Indicates the EtherTalk zone. This must be defined on the router.') eTalkActiveZone = MibTableColumn((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 4, 4, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkActiveZone.setStatus('optional') if mibBuilder.loadTexts: eTalkActiveZone.setDescription('Indicates the EtherTalk zone that is currently being used. This must be defined on the router.') eTalkError = MibScalar((1, 3, 6, 1, 4, 1, 683, 6, 3, 5, 5, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: eTalkError.setStatus('optional') if mibBuilder.loadTexts: eTalkError.setDescription('Shows any errors for the EtherTalk protocol.') trapPrinterOnline = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,1)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterOnline.setDescription('The printer is on-line. This trap will be sent out after a printer error condition has been cleared.') trapPrinterOffline = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,2)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterOffline.setDescription('The printer is off-line.') trapNoPrinterAttached = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,3)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapNoPrinterAttached.setDescription('No printer is attached to the output port.') trapPrinterTonerLow = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,4)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterTonerLow.setDescription('The printer toner is low.') trapPrinterPaperOut = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,5)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterPaperOut.setDescription('The printer is out of paper.') trapPrinterPaperJam = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,6)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterPaperJam.setDescription('The printer has a paper jam.') trapPrinterDoorOpen = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,7)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterDoorOpen.setDescription('The printer door is open.') trapPrinterError = NotificationType((1, 3, 6, 1, 4, 1, 683, 6) + (0,16)).setObjects(("ESI-MIB", "outputIndex")) if mibBuilder.loadTexts: trapPrinterError.setDescription('General printer error.') mibBuilder.exportSymbols("ESI-MIB", eTalkNode=eTalkNode, bvPrintServiceRouting=bvPrintServiceRouting, nwPortNotification=nwPortNotification, outputDisplayMask=outputDisplayMask, tcpipBootProtocolsEnabled=tcpipBootProtocolsEnabled, bvStatus=bvStatus, nwNDSPreferredDSFileServer=nwNDSPreferredDSFileServer, bvGroupVersion=bvGroupVersion, nwMaxFileServers=nwMaxFileServers, bvEnabled=bvEnabled, trCommands=trCommands, tcpipSecureStartIPAddress=tcpipSecureStartIPAddress, nwTrapDestination=nwTrapDestination, trapPrinterOffline=trapPrinterOffline, tcpipError=tcpipError, driverRXPacketErrors=driverRXPacketErrors, lmGroupVersion=lmGroupVersion, general=general, genVersion=genVersion, outputNumLogEntries=outputNumLogEntries, driverTXPacketRetries=driverTXPacketRetries, tcpipNumSecurity=tcpipNumSecurity, genProtocolIndex=genProtocolIndex, cmdRestoreDefaults=cmdRestoreDefaults, eTalkName=eTalkName, tcpipIPAddressSource=tcpipIPAddressSource, esiSNMP=esiSNMP, tcpipSmtpEmailAddr=tcpipSmtpEmailAddr, nwQueueScanTime=nwQueueScanTime, trapPrinterPaperJam=trapPrinterPaperJam, nwPortTable=nwPortTable, tcpipSmtpPrinterMask=tcpipSmtpPrinterMask, tcpipWinsAddress=tcpipWinsAddress, nwGroupVersion=nwGroupVersion, nwEnabled=nwEnabled, nwMode=nwMode, genCableType=genCableType, outputHandshake=outputHandshake, tcpipPOP3ServerAddress=tcpipPOP3ServerAddress, nwConfigure=nwConfigure, outputJobLogTable=outputJobLogTable, nwStatus=nwStatus, bvJobActive=bvJobActive, eTalkActiveZone=eTalkActiveZone, eTalkZone=eTalkZone, nwFileServerTable=nwFileServerTable, eTalkPortEntry=eTalkPortEntry, trRestoreDefaults=trRestoreDefaults, outputEntry=outputEntry, snmpTrapCommunityName=snmpTrapCommunityName, outputExtendedStatus=outputExtendedStatus, tcpipWebUpdateURL=tcpipWebUpdateURL, eTalkError=eTalkError, outputTable=outputTable, outputBIDIStatusEnabled=outputBIDIStatusEnabled, tcpipOutputTrapMask=tcpipOutputTrapMask, tcpipMLPPort=tcpipMLPPort, eTalkEnabled=eTalkEnabled, eTalkRestoreDefaults=eTalkRestoreDefaults, trRouting=trRouting, outputCommandsEntry=outputCommandsEntry, tcpipSecurityEntry=tcpipSecurityEntry, tcpipPOP3PollInterval=tcpipPOP3PollInterval, nwDisplayMask=nwDisplayMask, cmdGroupVersion=cmdGroupVersion, trapPrinterPaperOut=trapPrinterPaperOut, psOutput=psOutput, nwOutputTrapMask=nwOutputTrapMask, lanManager=lanManager, nwTrapIndex=nwTrapIndex, tcpip=tcpip, bvPnicDescription=bvPnicDescription, outputCommands=outputCommands, tcpipSubnetMask=tcpipSubnetMask, tcpipWinsAddressSource=tcpipWinsAddressSource, tcpipWebAdminName=tcpipWebAdminName, genProtocolTable=genProtocolTable, driverTXPacketErrors=driverTXPacketErrors, bvPrinterStatus=bvPrinterStatus, tcpipTrapEntry=tcpipTrapEntry, tcpipTrapDestination=tcpipTrapDestination, eTalkPortIndex=eTalkPortIndex, outputTotalJobsLogged=outputTotalJobsLogged, outputNumPorts=outputNumPorts, bvLoginName=bvLoginName, vines=vines, trConfigure=trConfigure, tcpipSmtpProtocolMask=tcpipSmtpProtocolMask, lmEnabled=lmEnabled, psGroupVersion=psGroupVersion, tcpipSecurePrinterMask=tcpipSecurePrinterMask, tcpipDomainName=tcpipDomainName, trapNoPrinterAttached=trapNoPrinterAttached, outputPCLString=outputPCLString, outputCommandsTable=outputCommandsTable, nwNDSPacketSignatureLevel=nwNDSPacketSignatureLevel, bvJobSize=bvJobSize, tcpipWebUserPassword=tcpipWebUserPassword, eTalkConfigure=eTalkConfigure, bvConfigure=bvConfigure, tcpipNumLogicalPrinters=tcpipNumLogicalPrinters, outputDataBits=outputDataBits, nwSetFrameFormat=nwSetFrameFormat, outputIndex=outputIndex, eTalkStatus=eTalkStatus, outputProtocolManager=outputProtocolManager, nwJAConfig=nwJAConfig, tokenRing=tokenRing, tcpipNumTraps=tcpipNumTraps, psJetAdminEnabled=psJetAdminEnabled, tcpipMLPIndex=tcpipMLPIndex, genCompanyLoc=genCompanyLoc, nwTrapDestinationNet=nwTrapDestinationNet, nwPortFormsOn=nwPortFormsOn, genSysUpTimeString=genSysUpTimeString, tcpipMLPPostString=tcpipMLPPostString, tcpipSecurityIndex=tcpipSecurityIndex, tcpipWebHtttpPort=tcpipWebHtttpPort, tcpipPrinterTrapMask=tcpipPrinterTrapMask, nwPortPrinterNumber=nwPortPrinterNumber, nwTrapTable=nwTrapTable, bvSetSequenceRouting=bvSetSequenceRouting, bvLoginPassword=bvLoginPassword, genProtocolID=genProtocolID, eTalkGroupVersion=eTalkGroupVersion, outputBaudRate=outputBaudRate, tcpipWebAdminPassword=tcpipWebAdminPassword, outputStatus=outputStatus, outputPrinterModel=outputPrinterModel, outputParity=outputParity, trGroupVersion=trGroupVersion, genProductNumber=genProductNumber, outputTotalJobIndex=outputTotalJobIndex, outputPSString=outputPSString, nwPortIndex=nwPortIndex, trapPrinterError=trapPrinterError, nwNDSPacketCheckSumEnabled=nwNDSPacketCheckSumEnabled, nwPortFontDownload=nwPortFontDownload, genCompanyName=genCompanyName, cmdPrintConfig=cmdPrintConfig, outputCascaded=outputCascaded, outputConfigure=outputConfigure, bvPSName=bvPSName, outputStopBits=outputStopBits, outputTotalJobEntry=outputTotalJobEntry, tcpipSmtpIndex=tcpipSmtpIndex, nwPrinterTrapMask=nwPrinterTrapMask, tcpipWebFaqURL=tcpipWebFaqURL, outputCapabilities=outputCapabilities, printServers=printServers, outputCancelCurrentJob=outputCancelCurrentJob, driver=driver, tcpipRawPortNumber=tcpipRawPortNumber, tcpipWebUserName=tcpipWebUserName, nwNDSPreferredDSTree=nwNDSPreferredDSTree, tcpipMLPDeleteBytes=tcpipMLPDeleteBytes, tcpipTrapIndex=tcpipTrapIndex, tcpipEnabled=tcpipEnabled, tcpipSmtpEntry=tcpipSmtpEntry, psProtocols=psProtocols, driverRXPacketsUnavailable=driverRXPacketsUnavailable, tcpipMLPTable=tcpipMLPTable, nwDisableSAP=nwDisableSAP, bvPrintServiceStatusEntry=bvPrintServiceStatusEntry, esi=esi, genMIBVersion=genMIBVersion, tcpipWebCustomLinkName=tcpipWebCustomLinkName, eTalkPortTable=eTalkPortTable, bvNumPrintServices=bvNumPrintServices, tcpipSecurityTable=tcpipSecurityTable, nwPrintServerName=nwPrintServerName, eTalkType1=eTalkType1, tcpipPOP3Password=tcpipPOP3Password, nwNumTraps=nwNumTraps, outputJobLog=outputJobLog, tcpipDefaultGateway=tcpipDefaultGateway, nwTrapEntry=nwTrapEntry, netware=netware, tcpipMLPEntry=tcpipMLPEntry, genProtocolEntry=genProtocolEntry, trPriority=trPriority, bvPrintServiceStatusTable=bvPrintServiceStatusTable, snmpRestoreDefaults=snmpRestoreDefaults, tcpipConfigPassword=tcpipConfigPassword, nwPortEntry=nwPortEntry, tcpipCommands=tcpipCommands, driverRXPackets=driverRXPackets, tcpipLowBandwidth=tcpipLowBandwidth, bvPSDestination=bvPSDestination, nwDirectPrintEnabled=nwDirectPrintEnabled, tcpipRestoreDefaults=tcpipRestoreDefaults, tcpipGroupVersion=tcpipGroupVersion, tcpipSecureAdminEnabled=tcpipSecureAdminEnabled, outputGroupVersion=outputGroupVersion, tcpipTimeoutChecking=tcpipTimeoutChecking, trapPrinterDoorOpen=trapPrinterDoorOpen, tcpipTimeoutCheckingValue=tcpipTimeoutCheckingValue, nwFileServerName=nwFileServerName, tcpipMLPPreString=tcpipMLPPreString, outputJobLogInformation=outputJobLogInformation, snmpGroupVersion=snmpGroupVersion, tcpipSecureEndIPAddress=tcpipSecureEndIPAddress, nwPortPCLQueue=nwPortPCLQueue, tcpipIPAddress=tcpipIPAddress, bvPSStatus=bvPSStatus, genProtocolDescr=genProtocolDescr, outputAvailableTrapsMask=outputAvailableTrapsMask, driverTXPackets=driverTXPackets, nwFileServerIndex=nwFileServerIndex, nwPortStatus=nwPortStatus, outputConfigLanguage=outputConfigLanguage, tcpipTrapTable=tcpipTrapTable, trapPrinterOnline=trapPrinterOnline, nwFileServerConnectionStatus=nwFileServerConnectionStatus, eTalkNetwork=eTalkNetwork, trEarlyTokenRelease=trEarlyTokenRelease, nwPortPSQueue=nwPortPSQueue, eTalkCommands=eTalkCommands, genDateCode=genDateCode, bvJobTitle=bvJobTitle, genConfigurationDirty=genConfigurationDirty, psVerifyConfiguration=psVerifyConfiguration, tcpipUsingNetProtocols=tcpipUsingNetProtocols, tcpipStatus=tcpipStatus, psGeneral=psGeneral, genNumProtocols=genNumProtocols, bvRouting=bvRouting, bvCommands=bvCommands, driverGroupVersion=driverGroupVersion, genGroupVersion=genGroupVersion, cmdReset=cmdReset, tcpipArpInterval=tcpipArpInterval, nwNetworkNumber=nwNetworkNumber, bvNumberPrintServices=bvNumberPrintServices, bvJobSource=bvJobSource, tcpipWebCustomLinkURL=tcpipWebCustomLinkURL, nwCommands=nwCommands, nwAvailablePrintModes=nwAvailablePrintModes, tcpipFirmwareUpgrade=tcpipFirmwareUpgrade, eTalkNumPorts=eTalkNumPorts, tcpipIPAddressServerAddress=tcpipIPAddressServerAddress, bvPrintServiceIndex=bvPrintServiceIndex, genHWAddress=genHWAddress, genCompanyPhone=genCompanyPhone, bvPrintServiceEntry=bvPrintServiceEntry, eTalkType2=eTalkType2, tcpipMLPName=tcpipMLPName, bvRestoreDefaults=bvRestoreDefaults, tcpipBanners=tcpipBanners, tcpipPOP3UserName=tcpipPOP3UserName, genSerialNumber=genSerialNumber, bvError=bvError, outputLanguageSwitching=outputLanguageSwitching, bvPrintServiceName=bvPrintServiceName) mibBuilder.exportSymbols("ESI-MIB", tcpipDisplayMask=tcpipDisplayMask, nwProtocolTrapMask=nwProtocolTrapMask, nwPrintServerPassword=nwPrintServerPassword, bvFirmwareUpgrade=bvFirmwareUpgrade, bvJobNumber=bvJobNumber, outputJobLogEntry=outputJobLogEntry, outputJobLogTime=outputJobLogTime, nwNDSPrintServerName=nwNDSPrintServerName, tcpipMLPTCPPort=tcpipMLPTCPPort, trapPrinterTonerLow=trapPrinterTonerLow, driverChecksumErrors=driverChecksumErrors, trLocallyAdminAddr=trLocallyAdminAddr, tcpipConfigure=tcpipConfigure, nwRestoreDefaults=nwRestoreDefaults, bvPSStatusIndex=bvPSStatusIndex, tcpipNumSmtpDestinations=tcpipNumSmtpDestinations, outputName=outputName, outputStatusString=outputStatusString, tcpipProtocolTrapMask=tcpipProtocolTrapMask, genProductName=genProductName, bvPrintServiceTable=bvPrintServiceTable, eTalk=eTalk, eTalkActiveName=eTalkActiveName, outputPrinterDisplay=outputPrinterDisplay, commands=commands, genProtocols=genProtocols, nwFirmwareUpgrade=nwFirmwareUpgrade, tcpipSmtpServerAddr=tcpipSmtpServerAddr, outputRestoreDefaults=outputRestoreDefaults, outputSetting=outputSetting, outputOwner=outputOwner, nwFrameFormat=nwFrameFormat, nwError=nwError, nwPortFormNumber=nwPortFormNumber, genCompanyTechSupport=genCompanyTechSupport, nwFileServerEntry=nwFileServerEntry, bvDisableVPMan=bvDisableVPMan, eTalkPortEnable=eTalkPortEnable, esiSNMPCommands=esiSNMPCommands, snmpGetCommunityName=snmpGetCommunityName, tcpipSmtpOutputMask=tcpipSmtpOutputMask, trPacketSize=trPacketSize, outputTotalJobTable=outputTotalJobTable, tcpipSmtpTable=tcpipSmtpTable, outputPrinter=outputPrinter, snmpSetCommunityName=snmpSetCommunityName)
SEED1_DUNGEON = [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ... ', ' .@. ', ' ... ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] CMD_STR = 'kHhhKK' CMD_STR5 = 'llljln' SEED1_DUNGEON2 = [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' --- ', ' +@. ', ' |.S ', ' | ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] SEED1_DUNGEON3 = [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' S.. ', ' .@. ', ' +-- ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] SEED1_DUNGEON_CLEAR = [ ' ', '######################### ----------------- -------------------- ', ' # |.............*.| |..................| ', '####### ############# ### ######+...............| |...*...........%..| ', '# # # # # # |...............+##+..................| ', '### ##### ############*###### ---------------+- --+----------------- ', ' # # ### ', ' ############## ######## # ', ' # ---------------+- # ', ' -----+- ############+...............| -+---- ', ' |.....| # |...............| #######+....| ', ' |.....+###### |......*........+## |..*.| ', ' |....*| |...............| |....| ', ' ----+-- |...............| ------ ', ' ### --------+-------- ', ' # #### ', ' ----+----------- -+-------- --------------- ', ' |..............| |........| |........*....| ', ' |..............| |.......*| |.............| ', ' |.....*........+###### |........| #+.............| ', ' |............@.| #########+........+#####################|.............| ', ' ---------------- ---------- --------------- ', ' ', ' '] CMD_STR2 = 'kLLjLlKkLkkLKkLKklLlkLL>' CMD_STR3 = 'nLLLlnl>' CMD_STR4 = 'JHHKHJHKLKHKHKKlllll>'
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Given a source tree and a matching RPM spec file, runs `rpmbuild` inside the given image layer, and outputs a new layer with the resulting RPM(s) available in a pre-determined location: `/rpmbuild/RPMS`. """ load("//antlir/bzl:constants.bzl", "REPO_CFG") load("//antlir/bzl:flavor_helpers.bzl", "flavor_helpers") load("//antlir/bzl:image.bzl", "image") load("//antlir/bzl:image_layer.bzl", "image_layer") load("//antlir/bzl:maybe_export_file.bzl", "maybe_export_file") load("//antlir/bzl:oss_shim.bzl", "buck_genrule", "get_visibility") load("//antlir/bzl:sha256.bzl", "sha256_b64") load("//antlir/bzl/image/feature:install.bzl", "feature_install") load("//antlir/bzl/image/feature:remove.bzl", "feature_remove") load("//antlir/bzl/image/feature:tarball.bzl", "feature_tarball") load("//antlir/bzl/image_actions:ensure_dirs_exist.bzl", "image_ensure_subdirs_exist") RPMBUILD_LAYER_SUFFIX = "rpmbuild-build" # Builds RPM(s) based on the provided specfile and sources, copies them to an # output directory, and signs them. # The end result will be a directory containing all the signed RPM(s). # # If you need to access the intermediate image layers to debug a build issue, # you can use the "//<project>:<name>-<RPMBUILD_LAYER_SUFFIX>" image_layer # target. This layer is where the `rpmbuild` command is run to produce the # unsigned RPM(s). def image_rpmbuild( name, # The name of a specfile target (i.e. a single file made accessible # with `export_file()`). specfile, # The name of the target that has the source files for the RPM # (i.e. made accessible with `export_file()`). # Be aware that depending on the buck rule, the sources may not # have the intended directory structure (i.e. may or may not include # the top directory) when installed in the layer. You can look at the # test TARGETS for "toy-rpm" to see how the sources target is set up # so that there is no "toy_srcs" top directory. # It can be helpful to do # `buck run //<project>:<name>-rpmbuild-setup=container` to inspect the # setup layer and experiment with building, but do not depend on it for # production targets. source, # A binary target that takes an RPM file path as an argument and signs # the RPM in place. Used to sign the RPM(s) built. # Signers should not modify anything except the signatures on the RPMs. # This is verified after each call to sign an RPM. signer, # An `image.layer` target, on top of which the current layer will # build the RPM. This should have `rpm-build`, optionally macro # packages like `redhat-rpm-config`, and any of the spec file's # build dependencies installed. parent_layer = None, # The `flavor` of the images generated by this function. # This is used to determine compatibility between images. flavor = REPO_CFG.flavor_default, **image_layer_kwargs): parent_layer = parent_layer or flavor_helpers.default_flavor_build_appliance private_image_rpmbuild_impl( name, specfile, source, signer, parent_layer, flavor = flavor, **image_layer_kwargs ) def private_image_rpmbuild_impl( name, specfile, source, signer, parent_layer, # Additional setup features used by wrapper command setup_features = None, # A wrapper command to run rpmbuild instead of running it standalone wrapper_cmd = None, visibility = None, flavor = REPO_CFG.flavor_default, **image_layer_kwargs): """ Implementation of image_rpmbuild, see docs in `image_rpmbuild`. """ visibility = get_visibility(visibility, name) # Future: We tar the source directory and untar it inside the subvolume # before building because the "install_*_trees" feature does not yet # exist. source_tarball = name + "-source.tgz" buck_genrule( name = source_tarball, out = source_tarball, bash = ''' tar --sort=name --mtime=2018-01-01 --owner=0 --group=0 \ --numeric-owner -C $(location {source}) -czf "$OUT" . '''.format(source = maybe_export_file(source)), visibility = [], antlir_rule = "user-internal", ) rpmbuild_dir = "/rpmbuild" specfile_path = "/rpmbuild/SPECS/specfile.spec" setup_layer = name + "-rpmbuild-setup" image_layer( name = setup_layer, parent_layer = parent_layer, features = [ feature_install(specfile, specfile_path), image_ensure_subdirs_exist("/", "rpmbuild"), image_ensure_subdirs_exist("/rpmbuild", "BUILD"), image_ensure_subdirs_exist("/rpmbuild", "BUILDROOT"), image_ensure_subdirs_exist("/rpmbuild", "RPMS"), image_ensure_subdirs_exist("/rpmbuild", "SOURCES"), image_ensure_subdirs_exist("/rpmbuild", "SPECS"), feature_tarball(":" + source_tarball, "/rpmbuild/SOURCES"), ] + (setup_features or []), visibility = [], antlir_rule = "user-internal", ) # Figure out which build command to use to install dependencies in the # <name>-rpmbuild-install-deps layer. installer = getattr( flavor_helpers.get_flavor_config( flavor, image_layer_kwargs.get("flavor_config_override"), ), "rpm_installer", flavor_helpers.get_rpm_installer(REPO_CFG.flavor_default), ) install_deps_layer = name + "-rpmbuild-install-deps" image.genrule_layer( name = install_deps_layer, rule_type = "rpmbuild_install_deps_layer", parent_layer = ":" + setup_layer, # Auto-installing RPM dependencies requires `root`. user = "root", cmd = [ installer, "builddep", # Hack: our `yum` wrapper maps this to `yum-builddep` # Define the build directory for this project "--define=_topdir {}".format(rpmbuild_dir), "--assumeyes", specfile_path, ], container_opts = struct( # Serve default snapshots for the RPM installers that define # one. So, we may start `repo-server`s for both `yum` and `dnf` # -- this minor inefficiency is worth the simplicity. # # In the unlikely event we need support for a non-default snapshot, # we can expose a flag that chooses between enabling shadowing, or # serving a specific snapshot. shadow_proxied_binaries = True, ), antlir_rule = "user-internal", visibility = [], **image_layer_kwargs ) build_layer = name + "-rpmbuild-build" image.genrule_layer( name = build_layer, rule_type = "rpmbuild_build_layer", parent_layer = ":" + install_deps_layer, # While it's possible to want to support unprivileged builds, the # typical case will want to auto-install dependencies, which # requires `root`. user = "root", cmd = (wrapper_cmd or []) + [ "rpmbuild", # Change the destination for the built RPMs "--define=_topdir {}".format(rpmbuild_dir), # Don't include the version in the resulting RPM filenames "--define=_rpmfilename %%{NAME}.rpm", "-bb", # Only build the binary packages (no SRPMs) "{}/SPECS/specfile.spec".format(rpmbuild_dir), ], antlir_rule = "user-facing", visibility = visibility, **image_layer_kwargs ) buck_genrule( name = name, bash = ''' set -ue -o pipefail mkdir "$OUT" # copy the RPMs out of the rpmbuild_layer binary_path=( $(exe //antlir:find-built-subvol) ) layer_loc="$(location {rpmbuild_layer})" sv_path=\\$( "${{binary_path[@]}}" "$layer_loc" ) find "$sv_path/rpmbuild/RPMS/" -name '*.rpm' -print0 | xargs -0 cp --no-clobber --target-directory "$OUT" # call the signer binary to sign the RPMs signer_binary_path=( $(exe {signer_target}) ) for rpm in $OUT/*.rpm; do "${{signer_binary_path[@]}}" "$rpm" rpm_basename=\\$( basename "$rpm") orig_rpm="$sv_path/rpmbuild/RPMS/$rpm_basename" # verify that the contents match # Future: we can probably use --queryformat to print the content # hashes and avoid comparing contents directly if we dig around # and find a checksum stronger than MD5. diff <(rpm2cpio "$orig_rpm") <(rpm2cpio "$rpm") # diff the rest of the metadata, ignoring the signature line # --nosignature passed to `rpm` silences warning about unrecognized keys diff -I "^Signature" <(rpm --scripts --nosignature -qilp "$orig_rpm") <(rpm --scripts --nosignature -qilp "$rpm") done '''.format( rpmbuild_layer = ":" + build_layer, signer_target = signer, ), antlir_rule = "user-facing", visibility = visibility, ) # You typically don't need this if you're installing an RPM signed with a key # that is already imported in a RPM repo in your image. However, if you're # signing with a custom key pair that has not been used/installed before (as in # the case of the tests) you can use this to import the public key for # verification into the destination layer before you install the RPM(s) signed # with the custom key. def image_import_rpm_public_key_layer( name, # A list of `image.source` (see `image_source.bzl`) and/or targets # exporting a public key file. pubkeys, # An `image.layer`to import the key into. This should have the `rpm` # RPM installed. parent_layer, **image_layer_kwargs): gpg_key_dir = "/antlir-rpm-gpg-keys" install_keys = [] for src in pubkeys: dest = gpg_key_dir + "/RPM-GPG-KEY-" + sha256_b64(str(src)) install_keys.append(feature_install(src, dest)) if not install_keys: fail("cannot import an empty set of keys") copy_layer = name + "-key-copy" image_layer( name = copy_layer, parent_layer = parent_layer, features = [image_ensure_subdirs_exist("/", gpg_key_dir[1:])] + install_keys, **image_layer_kwargs ) import_layer = name + "-key-import" image.genrule_layer( name = import_layer, rule_type = "import_rpm_public_key_layer", parent_layer = ":" + copy_layer, # Need to be root to modify the RPM DB. user = "root", cmd = ["/bin/bash", "-c", "rpm --import {}/*".format(gpg_key_dir)], antlir_rule = "user-internal", **image_layer_kwargs ) # Remove the directory of keys so as not to leave artifacts in the layers. # Since the key is imported in the RPM DB the file isn't needed. image_layer( name = name, parent_layer = ":" + import_layer, features = [feature_remove(gpg_key_dir)], **image_layer_kwargs )
# TODO: Migrate templates to files TEMPLATE__INIT__ = """ \""" Django Environments {VERSION} \""" from .common import * try: from .__habitat__ import * print("Using %s environment" % ENVIRONMENT_NAME) if len(ENVIRONMENT_VERSION_CODE) > 0: VERSION += "." + ENVIRONMENT_VERSION_CODE except ImportError: print("Environment starting fail!") print("Set the DEVELOP environment running: \\"python manage.py switch-habitat develop\\"") """ TEMPLATE_ENVIRONMENT = """ \""" Django Environments {VERSION} All settings here will override another ones \""" import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ENVIRONMENT_NAME = "{ENVIRONMENT_NAME}" ENVIRONMENT_VERSION_CODE = "{ENVIRONMENT_VERSION_CODE}" """ def process_template(template, output_path, **kwargs): with open(output_path, "w+") as file: file.write(template.format(**kwargs)) def process_init_template(output_path, **kwargs): process_template(TEMPLATE__INIT__, output_path, **kwargs) def process_environment_template(output_path, **kwargs): process_template(TEMPLATE_ENVIRONMENT, output_path, **kwargs)
#!/usr/bin/python # -*- coding: utf-8 -*- gn = "http://www.geonames.org/ontology#" stb_base = 'https://enrich.acdh.oeaw.ac.at/entityhub/site/' URL_geonames = stb_base + "geoNames_%s/query" wgs84_pos = "http://www.w3.org/2003/01/geo/wgs84_pos#" gnd_geo = "http://www.opengis.net/ont/geosparql#" stb_find = stb_base + u'{}/find' GenderMappingGND = {'male': 'http://d-nb.info/standards/vocab/gnd/Gender#male', 'männlich': 'http://d-nb.info/standards/vocab/gnd/Gender#male', 'Mann': 'http://d-nb.info/standards/vocab/gnd/Gender#male', 'female': 'http://d-nb.info/standards/vocab/gnd/Gender#female', 'weiblich': 'http://d-nb.info/standards/vocab/gnd/Gender#female', 'Frau': 'http://d-nb.info/standards/vocab/gnd/Gender#female'} def date_conversion(date): return "{}T00:00:00.000Z".format(date) autocomp_settings = { 'score': u'http://stanbol.apache.org/ontology/entityhub/query#score', 'uri': 'id', 'label': u'http://www.w3.org/2000/01/rdf-schema#label', 'Place': [ {'source': 'Geonames', 'type': False, 'url': stb_find.format('geoNames_S_P_A'), 'fields': { 'descr': (gn + 'featureCode', 'String'), 'name': (gn + 'name','String'), 'long': (wgs84_pos + 'long', 'String'), 'lat': (wgs84_pos + 'lat', 'String') }}, {'source': 'GeonamesRGN', 'type': False, 'url': stb_find.format('geoNames_RGN'), 'fields': { 'descr': (gn + 'featureCode','String'), 'name': (gn + 'name','String'), 'long': (wgs84_pos + 'long','String'), 'lat': (wgs84_pos + 'lat','String') }}, {'source': 'GeonamesVAL', 'type': False, 'url': stb_find.format('geoNames_VAL'), 'fields': { 'descr': (gn + 'featureCode','String'), 'name': (gn + 'name','String'), 'long': (wgs84_pos + 'long','String'), 'lat': (wgs84_pos + 'lat','String') }}, {'source': 'GND', 'type': u'http://d-nb.info/standards/elementset/gnd#TerritorialCorporateBodyOrAdministrativeUnit', 'url': stb_find.format('gndTerritorialCorporateBodyOrAdministrativeUnits'), 'fields': { 'name': (u'http://d-nb.info/standards/elementset/gnd#preferredNameForThePlaceOrGeographicName','String'), 'descr': (u'http://d-nb.info/standards/elementset/gnd#definition','String'), 'long': (gnd_geo + 'asWKT', 'gndLong'), 'lat': (wgs84_pos + 'lat','String') }}, ], 'Institution': [{ 'source': 'GND', 'type': u'http://d-nb.info/standards/elementset/gnd#CorporateBody', 'url': stb_find.format('gndCorporateBodyAndOrganOfCorporateBody'), 'fields': { 'descr': (u'http://d-nb.info/standards/elementset/gnd#definition','String'), 'name': (u'http://d-nb.info/standards/elementset/gnd#preferredNameForTheCorporateBody','String')}}, { 'source': 'GND', 'type': u'http://d-nb.info/standards/elementset/gnd#OrganOfCorporateBody', 'url': stb_find.format('gndCorporateBodyAndOrganOfCorporateBody'), 'fields': { 'descr': (u'http://d-nb.info/standards/elementset/gnd#definition','String'), 'name': (u'http://d-nb.info/standards/elementset/gnd#preferredNameForTheCorporateBody','String')}}], 'Person': [{ 'source': 'GND', 'type': u'http://d-nb.info/standards/elementset/gnd#DifferentiatedPerson', 'url': stb_find.format('gndPersons'), 'search fields': {'gender': ('http://d-nb.info/standards/elementset/gnd#gender', GenderMappingGND, 'reference'), 'start_date': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_exact'), 'end_date': ('http://d-nb.info/standards/elementset/gnd#dateOfDeath', date_conversion, 'date_exact'), 'start_date__gt': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_gt'), 'start_date__lt': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_lt'), 'end_date__gt': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_gt'), 'end_date__lt': ('http://d-nb.info/standards/elementset/gnd#dateOfDeath', date_conversion, 'date_lt')}, 'fields': { 'descr': (u'http://d-nb.info/standards/elementset/gnd#biographicalOrHistoricalInformation','String'), 'name': (u'http://d-nb.info/standards/elementset/gnd#preferredNameForThePerson','String'), 'dateOfBirth': (u'http://d-nb.info/standards/elementset/gnd#dateOfBirth', 'GNDDate'), 'dateOfDeath': (u'http://d-nb.info/standards/elementset/gnd#dateOfDeath', 'GNDDate')}}, { 'source': 'GND', 'type': u'http://enrich.acdh.oeaw.ac.at/stanbol/entityhub/site/gndRoyalOrMemberOfARoyalHouse/', 'url': stb_find.format('gndRoyalOrMemberOfARoyalHouse'), 'search fields': {'gender': ('http://d-nb.info/standards/elementset/gnd#gender', GenderMappingGND, 'reference'), 'start_date': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_exact'), 'end_date': ('http://d-nb.info/standards/elementset/gnd#dateOfDeath', date_conversion, 'date_exact'), 'start_date__gt': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_gt'), 'start_date__lt': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_lt'), 'end_date__gt': ('http://d-nb.info/standards/elementset/gnd#dateOfBirth', date_conversion, 'date_gt'), 'end_date__lt': ('http://d-nb.info/standards/elementset/gnd#dateOfDeath', date_conversion, 'date_lt')}, 'fields': { 'descr': (u'http://d-nb.info/standards/elementset/gnd#biographicalOrHistoricalInformation','String'), 'name': (u'http://d-nb.info/standards/elementset/gnd#preferredNameForThePerson','String'), 'dateOfBirth': (u'http://d-nb.info/standards/elementset/gnd#dateOfBirth', 'GNDDate'), 'dateOfDeath': (u'http://d-nb.info/standards/elementset/gnd#dateOfDeath', 'GNDDate')}} ], 'Event': [{ 'source': 'GND', 'type': u'http://d-nb.info/standards/elementset/gnd#HistoricSingleEventOrEra', 'url': stb_find.format('gndHistoricEvent'), 'fields': { 'descr': (u'http://d-nb.info/standards/elementset/gnd#definition','String'), 'name': (u'http://d-nb.info/standards/elementset/gnd#preferredNameForTheSubjectHeading','String')}}], 'Work': [] } geonames_feature_codes = { "ADM1": ( "first-order administrative division", "a primary administrative division of a country, such as a state in the United States"), "ADM1H": ( "historical first-order administrative division", "a former first-order administrative division"), "ADM2": ( "second-order administrative division", "a subdivision of a first-order administrative division"), "ADM2H": ( "historical second-order administrative division", "a former second-order administrative division"), "ADM3": ( "third-order administrative division", "a subdivision of a second-order administrative division"), "ADM3H": ( "historical third-order administrative division", "a former third-order administrative division"), "ADM4": ( "fourth-order administrative division", "a subdivision of a third-order administrative division"), "ADM4H": ( "historical fourth-order administrative division", "a former fourth-order administrative division"), "ADM5": ( "fifth-order administrative division", "a subdivision of a fourth-order administrative division"), "ADMD": ( "administrative division", "an administrative division of a country, undifferentiated as to administrative level"), "ADMDH": ( "historical administrative division", "a former administrative division of a political entity, \ undifferentiated as to administrative level"), "LTER": ( "leased area", "a tract of land leased to another country, usually for military installations"), "PCL": ("political entity", ""), "PCLD": ("dependent political entity", ""), "PCLF": ("freely associated state", ""), "PCLH": ("historical political entity", "a former political entity"), "PCLI": ("independent political entity", ""), "PCLIX": ("section of independent political entity", ""), "PCLS": ("semi-independent political entity", ""), "PRSH": ("parish", "an ecclesiastical district"), "TERR": ("territory", ""), "ZN": ("zone", ""), "ZNB": ( "buffer zone", "a zone recognized as a buffer between two nations in which \ military presence is minimal or absent"), "PPL": ( "populated place", "a city, town, village, or other agglomeration of buildings where people live and work"), "PPLA": ( "seat of a first-order administrative division", "seat of a first-order administrative division (PPLC takes precedence over PPLA),"), "PPLA2": ("seat of a second-order administrative division", ""), "PPLA3": ("seat of a third-order administrative division", ""), "PPLA4": ("seat of a fourth-order administrative division", ""), "PPLC": ("capital of a political entity", ""), "PPLCH": ( "historical capital of a political entity", "a former capital of a political entity"), "PPLF": ( "farm village", "a populated place where the population is largely engaged in agricultural activities"), "PPLG": ("seat of government of a political entity", ""), "PPLH": ( "historical populated place", "a populated place that no longer exists"), "PPLL": ( "populated locality", "an area similar to a locality but with a small group of dwellings or other buildings"), "PPLQ": ("abandoned populated place", ""), "PPLR": ( "religious populated place", "a populated place whose population is largely engaged in religious occupations"), "PPLS": ( "populated places", "cities, towns, villages, or other agglomerations of buildings where people live and work"), "PPLW": ( "destroyed populated place", "a village, town or city destroyed by a natural disaster, or by war"), "PPLX": ("section of populated place", ""), "STLMT": ("israeli settlement", ""), "RGN": ("region", "an area distinguished by one or more observable physical or cultural characteristics")} class StbGeoQuerySettings: def __init__(self, kind='place'): self.kind = kind self.score = u'http://stanbol.apache.org/ontology/entityhub/query#score' self.uri = 'id' self.label = u'http://www.w3.org/2000/01/rdf-schema#label' self.kind = kind self.last_selected = 0 if kind == 'place': self.selected = [gn+'name', gn+'parentPCLI', gn+'parentCountry', gn+'parentADM1', gn+'parentADM2', gn+'parentADM3', gn+'population', gn+'featureCode', wgs84_pos+'lat', wgs84_pos+'long', gn+'alternateName', gn+'officialName', gn+'shortName', gn+'countryCode', gn+'parentFeature'] self.stored_feature = { 'feature': gn+'PPLC', 'URL': URL_geonames % 'PPLC' } self.features = [{ 'feature': gn+'PPLC', 'URL': URL_geonames % 'PPLC' }, { 'feature': gn+'PPLA', 'URL': URL_geonames % 'PPLA' }, { 'feature': gn+'PPLA2', 'URL': URL_geonames % 'PPLA2' }, { 'feature': gn+'PPLA3', 'URL': URL_geonames % 'PPLA3' }, { 'feature': gn+'PPLA4', 'URL': URL_geonames % 'PPLA4' }, { 'feature': gn+'PPL', 'URL': URL_geonames % 'PPL' }] elif kind == 'admin': self.selected = [gn+'featureCode'] self.stored_feature = { 'feature': gn+'PCLI', 'URL': URL_geonames % 'PCLI' } self.features = [{ 'feature': gn+'PCLI', 'URL': URL_geonames % 'PCLI' }, { 'feature': gn+'ADM1', 'URL': URL_geonames % 'ADM1' }, { 'feature': gn+'ADM2', 'URL': URL_geonames % 'ADM2' }, { 'feature': gn+'ADM3', 'URL': URL_geonames % 'ADM3' } ] def get_next_feature(self, ft=False): if self.last_selected > len(self.features)-1: self.stored_feature = False return False if not ft: ft = self.features[self.last_selected]['feature'] for idnx, x in enumerate(self.features): if x['feature'] == ft: try: self.last_selected = idnx+1 self.stored_feature = self.features[idnx+1] return self.features[idnx+1] except: return None return self.features[0] def get_data(self, query, adm=False): if self.kind == 'place' and adm: data = { 'limit': 20, 'constraints': [{ 'type': 'text', 'field': 'http://www.w3.org/2000/01/rdf-schema#label', 'text': query}, {'type': 'reference', 'field': adm[1], 'value': adm[0]} ], 'selected': self.selected } else: data = { 'limit': 20, 'constraints': [{ 'type': 'text', 'field': 'http://www.w3.org/2000/01/rdf-schema#label', 'text': query}, ], 'selected': self.selected} return data
''' If an element in an MxN matrix is 0, set the entire row and column to 0 ''' def setZero(mat): m = len(mat) n = len(mat[0]) zero_rows = [] zero_cols = [] for i in range(m): for j in range(n): if mat[i][j] == 0 and i not in zero_rows and j not in zero_cols: mat[i] = [0]*n for k in range(m): mat[k][j] = 0 zero_rows.append(i) zero_cols.append(j) return mat mat = [[1, 2, 0], [0, 5, 6], [3, 6, 7]] mat = setZero(mat) for i in range(len(mat)): print(mat[i][:]) print() mat = [[1, 2, 1], [0, 5, 6], [3, 6, 7]] mat = setZero(mat) for i in range(len(mat)): print(mat[i][:])
class CachePolicy(basestring): """ Cache Policy Name """ @staticmethod def get_api_name(): return "cache-policy"
""" https://leetcode.com/problems/validate-binary-search-tree/ Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right subtrees must also be binary search trees. Example 1: 2 / \ 1 3 Input: [2,1,3] Output: true Example 2: 5 / \ 1 4 / \ 3 6 Input: [5,1,4,null,null,3,6] Output: false Explanation: The root node's value is 5 but its right child's value is 4. """ # time complexity: O(n), space complexity: O(height of the tree) # the idea is to check each node and see if it violates the lower and upper bound on it # 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 isValidBST(self, root: TreeNode) -> bool: if root is None: return True left = self.valid(root.left, None, root.val) if not left: return False right = self.valid(root.right, root.val, None) return right def valid(self, root: TreeNode, lower, upper) -> bool: if root is None: return True if lower is not None and root.val <= lower or upper is not None and root.val >= upper: return False left = self.valid(root.left, lower, root.val) if not left: return False right = self.valid(root.right, root.val, upper) return right
class Badge: def __init__(self,scale=1): self.scale=scale def gen_badge(self): return { "novice" : f""" <g xmlns="http://www.w3.org/2000/svg" transform="translate({str(345*self.scale)},15),scale(0.5)"> <path id="Selection_novice" fill="#52cd95" stroke="none" stroke-width="1" d="M 80.00,139.00 C 80.00,139.00 104.00,139.00 104.00,139.00 106.03,139.01 108.84,138.87 110.59,140.02 113.17,141.73 113.62,145.81 116.64,150.00 121.38,156.57 128.97,160.41 137.00,160.91 154.96,162.01 168.57,144.06 163.70,127.00 161.26,118.45 154.63,111.27 146.00,108.79 138.73,106.70 134.72,110.37 130.32,103.94 130.32,103.94 120.58,87.00 120.58,87.00 119.54,85.19 116.23,79.69 115.84,78.00 114.97,74.24 118.42,71.18 120.00,68.00 122.07,63.84 123.25,57.61 122.56,53.00 118.59,26.46 86.18,22.85 74.11,41.00 69.58,47.81 68.53,58.36 71.47,66.00 72.72,69.26 76.50,74.35 76.45,77.00 76.41,79.35 74.02,82.96 72.80,85.00 72.80,85.00 64.72,99.00 64.72,99.00 63.32,101.46 61.25,105.54 58.79,106.98 55.03,109.17 50.54,106.52 43.00,109.90 31.03,115.28 25.65,128.46 28.53,141.00 34.77,168.20 75.56,167.31 80.00,139.00 Z M 92.00,39.39 C 98.98,38.45 104.86,39.26 109.61,45.04 117.52,54.69 112.35,70.34 100.00,72.92 77.88,77.54 69.87,46.04 92.00,39.39 Z M 107.00,81.00 C 107.00,81.00 124.00,111.00 124.00,111.00 124.00,111.00 115.22,122.00 115.22,122.00 115.22,122.00 111.30,129.01 111.30,129.01 111.30,129.01 104.00,130.00 104.00,130.00 104.00,130.00 80.00,130.00 80.00,130.00 80.00,130.00 75.07,119.01 75.07,119.01 75.07,119.01 69.81,111.83 69.81,111.83 69.81,111.83 73.15,103.00 73.15,103.00 73.15,103.00 86.00,81.00 86.00,81.00 99.97,83.63 93.67,82.80 107.00,81.00 Z M 50.00,117.39 C 56.98,116.45 62.86,117.26 67.61,123.04 75.52,132.69 70.35,148.34 58.00,150.92 35.88,155.54 27.87,124.04 50.00,117.39 Z M 134.00,117.39 C 140.98,116.45 146.86,117.26 151.61,123.04 159.52,132.69 154.35,148.34 142.00,150.92 119.88,155.54 111.87,124.04 134.00,117.39 Z" /></g> """, "contributor" : f""" <g xmlns="http://www.w3.org/2000/svg" transform="translate({str(345*self.scale)},15),scale(0.5)"> <path id="Selection" fill="#24bfff" stroke="none" stroke-width="1" d="M 87.00,8.53 C 75.93,11.83 68.32,20.18 68.01,32.00 67.77,41.71 69.68,43.85 69.53,45.72 69.40,47.30 68.74,48.00 67.76,49.17 67.76,49.17 55.00,62.00 55.00,62.00 52.97,64.02 49.73,67.65 47.00,68.23 47.00,68.23 37.00,68.23 37.00,68.23 27.79,67.91 20.48,70.23 14.79,78.01 2.28,95.11 14.69,122.45 37.00,120.68 40.29,120.41 47.94,117.98 50.00,118.55 52.47,119.23 55.20,122.22 57.00,124.00 57.00,124.00 69.72,137.00 69.72,137.00 73.53,142.29 68.78,143.57 68.09,152.00 67.03,164.95 71.42,175.38 84.00,180.65 101.14,187.84 122.34,174.21 120.67,155.00 120.04,147.72 116.49,142.26 116.54,140.28 116.59,137.87 119.42,135.59 121.01,133.99 121.01,133.99 133.00,122.00 133.00,122.00 134.46,120.55 137.64,117.07 139.58,116.58 139.58,116.58 155.00,120.67 155.00,120.67 169.76,121.95 182.82,108.42 182.82,94.00 182.82,80.93 172.21,68.68 159.00,68.11 159.00,68.11 151.00,68.11 151.00,68.11 146.29,68.77 144.32,70.81 141.00,69.19 138.48,67.96 126.76,55.82 124.01,53.00 122.09,51.04 119.58,48.83 119.11,46.00 118.71,43.63 121.10,36.82 120.67,32.00 119.07,13.77 103.77,5.79 87.00,8.53 Z M 90.00,17.39 C 96.98,16.45 102.86,17.26 107.61,23.04 115.52,32.69 110.35,48.34 98.00,50.92 75.88,55.54 67.87,24.04 90.00,17.39 Z M 111.00,54.00 C 116.67,58.06 122.02,64.01 127.00,69.00 128.83,70.84 132.98,74.63 133.71,77.00 134.88,80.81 130.72,83.29 130.09,91.00 129.15,102.62 133.69,104.53 131.88,109.00 130.67,111.98 118.09,123.96 115.00,127.00 113.16,128.80 110.57,131.62 108.00,132.19 104.19,133.05 102.64,129.54 92.00,130.04 84.92,130.37 82.79,133.41 79.00,131.88 76.09,130.70 65.82,119.88 63.01,117.00 61.21,115.16 58.44,112.73 58.28,110.00 58.17,108.15 60.96,102.85 61.66,100.00 64.03,90.36 61.07,83.47 55.00,76.00 58.91,70.53 64.21,65.75 69.00,61.00 70.69,59.32 73.71,56.03 76.00,55.44 79.53,54.53 81.68,58.17 90.00,60.10 97.48,61.83 105.03,58.26 111.00,54.00 Z M 32.00,77.39 C 38.98,76.45 44.86,77.26 49.61,83.04 57.52,92.69 52.35,108.34 40.00,110.92 17.88,115.54 9.87,84.04 32.00,77.39 Z M 152.00,77.39 C 158.98,76.45 164.86,77.26 169.61,83.04 177.52,92.69 172.35,108.34 160.00,110.92 137.88,115.54 129.87,84.04 152.00,77.39 Z M 90.00,139.39 C 96.98,138.45 102.86,139.26 107.61,145.04 115.52,154.69 110.35,170.34 98.00,172.92 75.88,177.54 67.87,146.04 90.00,139.39 Z" /></g> """, "expert" : f""" <g xmlns="http://www.w3.org/2000/svg" transform="translate({str(345*self.scale)},15),scale(0.5)"> <path id="Selectionexpert" fill="#96518e" stroke="none" stroke-width="1" d="M 32.00,106.00 C 32.00,106.00 42.00,137.00 42.00,137.00 29.26,141.34 24.97,158.31 29.47,170.00 34.72,183.68 49.39,190.70 63.00,184.65 66.52,183.09 69.98,180.88 72.47,177.91 75.75,174.00 77.22,169.95 78.00,165.00 78.00,165.00 104.00,165.00 104.00,165.00 106.03,165.01 108.84,164.87 110.59,166.02 113.17,167.73 113.56,171.70 116.64,176.00 121.31,182.53 128.03,186.21 136.00,186.82 150.86,187.94 163.83,173.55 162.68,159.00 162.33,154.61 161.07,149.78 158.79,146.00 157.13,143.26 153.45,139.77 152.97,137.00 152.64,135.08 154.11,130.98 154.72,129.00 154.72,129.00 160.39,112.02 160.39,112.02 163.34,104.99 169.24,106.33 174.99,102.40 186.06,94.83 189.56,81.17 184.27,69.00 179.15,57.21 169.19,52.95 157.00,54.10 151.00,54.67 148.93,57.67 145.00,56.44 145.00,56.44 119.00,39.00 119.00,39.00 124.37,21.45 114.27,4.00 95.00,4.00 89.76,4.00 86.59,4.22 82.00,7.13 74.04,12.18 70.10,19.72 70.25,29.00 70.25,29.00 70.25,40.49 70.25,40.49 69.73,42.50 65.78,45.02 64.00,46.29 64.00,46.29 49.04,57.03 49.04,57.03 43.07,60.80 43.33,55.82 35.00,54.33 25.59,52.64 16.70,54.76 10.21,62.04 -5.73,79.93 10.07,111.22 32.00,106.00 Z M 91.00,13.39 C 97.94,12.45 102.92,13.31 107.61,19.04 115.15,28.26 110.84,43.81 99.00,46.79 78.82,51.87 69.90,20.19 91.00,13.39 Z M 153.00,105.00 C 153.00,105.00 144.00,134.00 144.00,134.00 134.92,134.00 129.36,133.73 122.00,140.19 119.56,142.33 116.89,145.20 115.22,148.00 114.06,149.94 112.90,153.81 111.30,155.01 109.63,156.26 106.04,156.00 104.00,156.00 104.00,156.00 78.00,156.00 78.00,156.00 75.85,146.87 70.66,139.91 62.00,135.91 56.09,133.19 53.21,134.82 50.84,132.40 49.40,130.93 48.03,126.10 47.33,124.00 47.33,124.00 41.00,103.00 41.00,103.00 49.26,97.71 53.93,90.99 54.40,81.00 54.90,70.52 48.77,69.35 56.05,63.58 59.29,61.01 72.83,50.36 76.00,50.00 79.65,49.59 81.88,53.13 88.00,55.24 97.37,58.47 108.06,54.85 114.00,47.00 120.20,49.41 126.48,55.04 132.00,59.00 133.96,60.40 137.84,62.84 138.59,65.17 139.54,68.12 136.60,70.81 136.09,77.00 135.03,90.12 141.37,99.29 153.00,105.00 Z M 25.00,63.39 C 31.94,62.45 36.92,63.31 41.61,69.04 49.15,78.26 44.84,93.81 33.00,96.79 12.82,101.87 3.90,70.19 25.00,63.39 Z M 157.00,63.39 C 163.94,62.45 168.92,63.31 173.61,69.04 181.15,78.26 176.84,93.81 165.00,96.79 144.82,101.87 135.90,70.19 157.00,63.39 Z M 49.00,143.39 C 55.94,142.45 60.92,143.31 65.61,149.04 73.15,158.26 68.84,173.81 57.00,176.79 36.82,181.87 27.90,150.19 49.00,143.39 Z M 133.00,143.39 C 139.94,142.45 144.92,143.31 149.61,149.04 157.15,158.26 152.84,173.81 141.00,176.79 120.82,181.87 111.90,150.19 133.00,143.39 Z" /></g> """, "master" : f""" <g xmlns="http://www.w3.org/2000/svg" transform="translate({str(345*self.scale)},15),scale(0.5)"> <path id="Selectionmaster" fill="#fa692b" stroke="none" stroke-width="1" d="M 73.00,35.00 C 65.80,37.10 55.32,45.06 52.00,45.37 47.86,45.76 45.80,41.49 38.00,41.04 35.40,40.89 30.45,40.92 28.00,41.55 15.51,44.77 9.69,58.06 12.53,70.00 13.68,74.85 17.04,79.43 21.01,82.37 23.11,83.92 26.63,85.27 27.98,87.39 29.71,90.10 29.00,104.95 29.00,109.00 9.36,112.73 6.04,139.89 22.04,150.44 28.00,154.38 36.29,155.04 43.00,152.75 45.50,151.90 48.88,149.66 51.00,149.47 54.22,149.20 65.17,155.73 67.90,157.90 73.11,162.05 69.73,164.99 71.93,173.00 74.71,183.17 84.36,190.40 95.00,189.90 104.40,189.45 113.55,183.21 116.21,174.00 117.83,168.40 116.09,163.47 118.02,160.38 119.19,158.51 122.13,156.93 124.00,155.80 126.69,154.18 135.91,148.22 138.58,148.46 141.65,148.72 145.14,153.57 154.00,153.96 176.55,154.95 184.63,131.07 174.36,117.01 166.34,106.02 159.22,112.76 159.00,101.00 158.95,98.11 158.59,90.53 160.02,88.30 161.95,85.29 166.71,85.49 171.82,80.67 179.74,73.20 180.83,60.03 175.03,51.00 169.23,41.97 158.07,38.66 148.00,41.79 141.98,43.67 140.28,47.30 136.72,46.24 136.72,46.24 116.00,35.00 116.00,35.00 116.67,32.25 116.92,30.85 116.99,28.00 117.09,23.58 116.99,20.10 115.09,16.00 102.92,-10.25 61.22,6.68 73.00,35.00 Z M 91.00,12.39 C 96.25,11.69 100.78,12.03 104.61,16.21 111.48,23.73 108.30,37.25 98.00,39.61 79.47,43.86 72.28,18.43 91.00,12.39 Z M 134.00,55.00 C 132.28,63.55 131.19,69.49 137.27,77.00 146.09,87.89 149.83,82.30 150.00,92.00 150.00,92.00 150.00,109.00 150.00,109.00 137.33,112.70 131.76,122.33 132.95,135.00 133.11,136.76 133.28,138.05 132.23,139.62 130.80,141.79 116.64,150.20 114.00,150.62 110.81,151.12 108.54,148.50 106.00,146.99 103.05,145.23 99.41,144.08 96.00,143.70 85.88,142.59 80.25,149.82 77.00,150.72 73.75,151.62 59.64,143.52 57.80,140.62 56.30,138.31 57.56,135.52 57.80,133.00 58.17,129.46 57.49,125.25 56.03,122.00 54.19,117.88 49.83,113.34 46.00,111.00 44.01,109.79 40.15,108.77 38.99,107.28 37.50,105.34 37.99,97.67 38.00,95.00 38.00,92.90 37.76,89.29 39.02,87.56 40.93,84.93 45.89,85.41 51.81,78.96 59.04,71.09 58.76,63.55 56.00,54.00 56.00,54.00 77.00,43.20 77.00,43.20 77.00,43.20 93.00,48.96 93.00,48.96 93.00,48.96 103.00,47.17 103.00,47.17 103.00,47.17 111.00,43.22 111.00,43.22 111.00,43.22 119.00,46.42 119.00,46.42 119.00,46.42 134.00,55.00 134.00,55.00 Z M 34.00,49.47 C 38.76,49.73 43.33,51.06 46.30,55.10 52.73,63.86 46.96,77.12 36.00,77.88 18.14,79.13 14.45,52.14 34.00,49.47 Z M 155.00,49.47 C 174.44,50.56 174.33,76.06 157.00,77.80 139.03,79.61 134.28,52.30 155.00,49.47 Z M 90.00,74.52 C 85.06,75.85 80.94,77.35 77.33,81.18 62.44,96.97 75.22,125.02 100.00,119.71 114.59,116.58 121.63,98.94 114.59,86.00 109.77,77.15 99.69,73.01 90.00,74.52 Z M 92.00,83.33 C 111.63,81.64 114.16,108.86 96.00,111.49 85.30,113.05 76.98,101.90 81.01,92.00 83.12,86.80 86.81,84.62 92.00,83.33 Z M 31.00,117.39 C 36.10,116.70 40.54,116.65 44.47,120.53 52.34,128.27 49.32,142.36 38.00,144.66 19.82,148.35 13.90,122.92 31.00,117.39 Z M 152.00,117.39 C 155.59,116.91 158.64,116.75 162.00,118.45 175.61,125.35 170.35,146.30 154.00,144.89 139.36,143.63 135.46,122.73 152.00,117.39 Z M 93.00,152.37 C 112.45,151.78 113.17,178.55 96.00,180.77 84.08,182.32 75.97,169.18 82.09,159.04 84.59,154.88 88.50,153.37 93.00,152.37 Z" /></g> """, "grandmaster" : f""" <g xmlns="http://www.w3.org/2000/svg" transform="translate({str(345*self.scale)},15),scale(0.5)"> <path id="Selection" fill="#dfac19" stroke="none" stroke-width="1" d="M 84.00,171.00 C 87.87,171.00 102.01,170.32 104.59,172.02 106.86,173.52 107.38,176.73 109.80,179.91 113.54,184.81 119.91,187.69 126.00,187.96 141.24,188.63 150.16,177.77 148.91,163.00 148.15,154.11 142.65,154.44 148.04,147.00 149.96,144.35 155.07,137.45 158.04,136.54 161.22,135.55 164.40,138.15 170.00,137.52 183.48,136.00 190.31,127.24 189.99,114.00 189.78,105.76 184.67,98.43 177.00,95.23 172.37,93.29 169.11,94.78 166.73,92.40 165.18,90.85 162.66,80.41 162.61,78.02 162.49,72.85 166.90,72.71 171.66,66.98 177.06,60.49 178.17,52.82 175.19,45.00 168.77,28.17 144.29,25.92 137.00,41.00 137.00,41.00 117.00,32.00 117.00,32.00 121.22,17.13 111.64,4.01 96.00,4.01 92.27,4.01 89.43,4.29 86.00,5.92 80.70,8.43 76.56,13.37 74.94,19.00 73.19,25.05 75.44,28.05 69.94,31.65 68.10,32.85 59.14,37.46 57.28,37.48 54.26,37.51 52.78,34.16 46.00,32.05 35.40,28.76 23.41,33.45 19.13,44.00 16.42,50.67 16.42,57.67 20.08,64.00 22.20,67.67 25.38,69.78 26.10,73.00 26.61,75.24 23.83,87.46 22.86,89.94 21.06,94.56 15.82,94.40 12.01,96.81 4.28,101.73 1.80,108.18 2.01,117.00 2.32,129.46 12.68,138.31 25.00,137.35 26.60,137.37 28.38,136.89 29.99,137.35 33.74,137.96 40.45,146.65 42.37,150.00 44.96,154.54 42.54,156.55 41.53,161.00 40.48,165.63 40.88,171.69 42.92,176.00 51.61,194.36 80.14,191.32 84.00,171.00 Z M 92.00,13.43 C 96.31,12.78 100.31,12.57 103.95,15.43 112.10,21.83 110.08,35.12 99.00,38.19 84.78,42.13 75.25,20.09 92.00,13.43 Z M 91.00,77.00 C 82.39,79.45 82.92,82.36 75.00,76.19 72.20,74.02 62.13,66.37 60.80,63.91 59.32,61.27 60.51,58.77 60.80,56.00 61.17,52.90 60.32,48.28 62.57,45.96 64.85,43.62 74.80,38.85 78.00,39.70 80.34,40.32 82.91,42.90 85.00,44.31 89.90,47.61 90.88,46.33 91.00,53.00 91.00,53.00 91.00,77.00 91.00,77.00 Z M 37.00,40.34 C 55.40,38.67 56.91,62.36 42.00,65.60 26.45,68.98 18.26,45.38 37.00,40.34 Z M 100.00,47.00 C 109.22,44.81 109.69,40.82 114.00,40.70 116.44,40.63 121.66,43.58 124.00,44.75 133.80,49.65 132.43,48.64 133.11,57.00 133.49,59.10 133.96,60.82 133.11,62.83 131.62,65.43 124.55,70.74 122.00,72.80 119.41,74.90 114.17,79.88 111.00,80.22 109.16,80.41 107.60,79.60 106.00,78.84 99.63,75.81 100.01,74.69 100.00,68.00 100.00,68.00 100.00,47.00 100.00,47.00 Z M 152.00,40.40 C 171.05,38.23 172.98,62.79 157.00,65.66 146.90,67.47 139.07,57.48 142.74,48.00 144.40,43.71 147.87,41.72 152.00,40.40 Z M 31.00,95.00 C 31.00,95.00 35.93,76.60 35.93,76.60 35.93,76.60 44.00,74.24 44.00,74.24 44.00,74.24 53.00,71.24 53.00,71.24 53.00,71.24 59.00,74.22 59.00,74.22 59.00,74.22 74.76,88.04 74.76,88.04 74.76,88.04 74.76,93.00 74.76,93.00 74.76,93.00 73.01,99.27 73.01,99.27 73.01,99.27 56.00,104.37 56.00,104.37 56.00,104.37 45.18,106.23 45.18,106.23 45.18,106.23 39.68,101.17 39.68,101.17 39.68,101.17 31.00,95.00 31.00,95.00 Z M 153.00,75.00 C 153.00,75.00 156.31,95.83 156.31,95.83 156.31,95.83 148.00,108.00 148.00,108.00 148.00,108.00 127.00,102.37 127.00,102.37 124.79,101.82 120.42,101.07 118.99,99.28 118.11,98.18 117.95,96.33 117.70,94.98 117.44,93.60 116.88,91.36 117.11,90.01 117.79,86.07 126.77,79.78 130.00,77.08 132.09,75.34 136.46,71.30 139.00,70.82 141.09,70.41 149.51,74.20 153.00,75.00 Z M 93.00,85.39 C 97.98,84.76 102.01,85.28 105.61,89.21 112.19,96.40 108.62,108.45 99.00,110.61 83.18,114.16 75.56,91.03 93.00,85.39 Z M 24.00,102.74 C 41.68,104.46 39.83,126.66 25.00,128.44 13.97,129.77 7.10,117.05 13.01,108.10 15.64,104.12 19.52,103.04 24.00,102.74 Z M 169.00,102.73 C 186.05,104.68 184.42,126.71 170.00,128.44 157.84,129.91 150.23,114.97 159.22,106.34 162.24,103.44 165.01,102.91 169.00,102.73 Z M 73.00,109.36 C 76.12,109.50 76.95,109.59 79.36,111.86 84.84,117.03 80.06,122.37 77.25,128.00 75.77,130.95 70.50,142.60 68.37,143.97 68.37,143.97 54.01,145.94 54.01,145.94 50.31,145.87 48.32,142.62 46.20,140.00 44.63,138.05 41.43,134.41 41.01,132.00 40.78,130.72 45.08,118.72 46.01,117.43 47.65,115.13 51.39,114.53 54.00,113.87 54.00,113.87 73.00,109.36 73.00,109.36 Z M 151.00,128.00 C 148.60,131.79 139.91,144.15 135.96,145.11 132.81,146.09 131.26,143.70 123.00,145.11 119.28,138.46 110.26,121.73 109.00,115.00 109.00,115.00 116.09,109.69 116.09,109.69 116.09,109.69 138.00,114.27 138.00,114.27 138.00,114.27 145.28,116.82 145.28,116.82 145.28,116.82 151.00,128.00 151.00,128.00 Z M 106.00,162.00 C 106.00,162.00 84.00,162.00 84.00,162.00 84.00,162.00 77.69,148.00 77.69,148.00 77.69,148.00 81.75,138.00 81.75,138.00 81.75,138.00 91.00,119.00 91.00,119.00 91.00,119.00 100.37,120.99 100.37,120.99 100.37,120.99 111.24,141.00 111.24,141.00 111.24,141.00 113.19,148.00 113.19,148.00 113.19,148.00 106.00,162.00 106.00,162.00 Z M 62.00,153.39 C 80.10,153.87 79.74,177.87 64.00,179.21 53.10,180.14 46.04,168.25 52.01,159.09 54.49,155.28 57.76,154.14 62.00,153.39 Z M 126.00,153.42 C 144.11,153.47 144.43,177.13 129.00,179.15 112.81,181.27 107.52,157.37 126.00,153.42 Z" /></g> """, "staff" : f""" <g xmlns="http://www.w3.org/2000/svg" transform="translate({str(345*self.scale)},15),scale(0.5)"> <path id="Selection" fill="#008abc" stroke="none" stroke-width="1" d="M 83.00,139.00 C 83.00,139.00 99.21,159.00 99.21,159.00 101.73,162.20 105.60,167.47 109.09,169.43 112.07,171.11 114.72,170.98 118.00,171.00 126.33,171.04 145.78,173.40 142.43,159.00 141.45,154.78 137.52,150.41 134.88,147.00 134.88,147.00 118.00,126.00 118.00,126.00 115.96,123.46 108.88,115.91 109.01,113.00 109.13,110.08 114.90,105.10 117.00,103.00 117.00,103.00 132.91,87.18 132.91,87.18 136.17,84.09 139.59,81.66 140.60,77.00 142.61,67.74 135.61,65.04 128.00,65.00 123.84,64.98 111.24,64.58 108.01,65.70 104.11,67.05 100.85,71.10 97.99,74.00 97.99,74.00 83.00,89.00 83.00,89.00 83.00,89.00 83.00,32.00 83.00,32.00 82.95,21.71 79.36,18.13 69.00,18.00 62.84,17.93 52.57,17.07 49.74,24.04 48.87,26.19 49.00,29.66 49.00,32.00 49.00,32.00 49.00,157.00 49.00,157.00 49.01,160.79 48.67,164.71 51.43,167.67 55.86,172.56 76.07,172.47 80.49,167.67 84.39,163.31 83.00,145.29 83.00,139.00 Z M 74.00,27.00 C 74.00,27.00 74.00,110.00 74.00,110.00 80.48,105.36 93.50,91.29 99.75,84.72 102.78,81.53 107.17,76.09 111.00,74.09 115.12,72.11 127.53,72.73 132.00,74.09 129.17,79.98 125.70,81.91 121.00,86.17 121.00,86.17 106.00,101.00 106.00,101.00 103.77,103.23 97.17,109.00 96.96,112.00 96.74,115.10 104.26,123.33 106.40,126.00 106.40,126.00 123.26,147.00 123.26,147.00 127.15,151.78 131.56,156.28 134.00,162.00 128.36,162.00 115.54,163.40 111.46,159.69 111.46,159.69 91.88,135.00 91.88,135.00 90.25,132.89 85.33,125.99 82.83,125.62 79.73,125.17 75.55,130.41 74.60,133.00 73.51,135.96 74.00,157.23 74.00,162.00 74.00,162.00 66.00,162.00 66.00,162.00 63.70,162.00 59.59,162.38 58.02,160.40 56.77,158.81 57.00,154.99 57.00,153.00 57.00,153.00 57.00,129.00 57.00,129.00 57.00,129.00 57.00,36.00 57.00,36.00 57.00,34.01 56.77,30.19 58.02,28.60 59.98,26.12 70.71,27.00 74.00,27.00 Z" /></g> """ }
# # PySNMP MIB module ALTIGA-GLOBAL-REG (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALTIGA-GLOBAL-REG # Produced by pysmi-0.3.4 at Mon Apr 29 17:05:29 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") ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") NotificationType, Gauge32, Unsigned32, Counter32, TimeTicks, enterprises, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Bits, Integer32, IpAddress, iso, ModuleIdentity, ObjectIdentity, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Gauge32", "Unsigned32", "Counter32", "TimeTicks", "enterprises", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Bits", "Integer32", "IpAddress", "iso", "ModuleIdentity", "ObjectIdentity", "Counter64") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") altigaGlobalRegModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 3076, 1, 1, 1, 1)) altigaGlobalRegModule.setRevisions(('2005-01-05 00:00', '2003-10-20 00:00', '2003-04-25 00:00', '2002-07-10 00:00',)) if mibBuilder.loadTexts: altigaGlobalRegModule.setLastUpdated('200501050000Z') if mibBuilder.loadTexts: altigaGlobalRegModule.setOrganization('Cisco Systems, Inc.') altigaRoot = MibIdentifier((1, 3, 6, 1, 4, 1, 3076)) altigaReg = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1)) altigaModules = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1)) alGlobalRegModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 1)) alCapModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 2)) alMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 3)) alComplModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 4)) alVersionMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 6)) alAccessMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 7)) alEventMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 8)) alAuthMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 9)) alPptpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 10)) alPppMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 11)) alHttpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 12)) alIpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 13)) alFilterMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 14)) alUserMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 15)) alTelnetMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 16)) alFtpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 17)) alTftpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 18)) alSnmpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 19)) alIpSecMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 20)) alL2tpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 21)) alSessionMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 22)) alDnsMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 23)) alAddressMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 24)) alDhcpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 25)) alWatchdogMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 26)) alHardwareMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 27)) alNatMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 28)) alLan2LanMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 29)) alGeneralMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 30)) alSslMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 31)) alCertMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 32)) alNtpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 33)) alNetworkListMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 34)) alSepMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 35)) alIkeMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 36)) alSyncMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 37)) alT1E1MibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 38)) alMultiLinkMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39)) alSshMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 40)) alLBSSFMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 41)) alDhcpServerMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 42)) alAutoUpdateMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 43)) alAdminAuthMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 44)) alPPPoEMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 45)) alXmlMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 46)) alCtcpMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 47)) alFwMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 48)) alGroupMatchMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 49)) alACEServerMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 50)) alNatTMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 51)) alBwMgmtMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 52)) alIpSecPreFragMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 53)) alFipsMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 54)) alBackupL2LMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 55)) alNotifyMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 56)) alRebootStatusMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 57)) alAuthorizationModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 58)) alWebPortalMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 59)) alWebEmailMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 60)) alPortForwardMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 61)) alRemoteServerMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 62)) alWebvpnAclMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 63)) alNbnsMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 64)) alSecureDesktopMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 65)) alSslTunnelClientMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 66)) alNacMibModule = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 67)) altigaGeneric = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 2)) altigaProducts = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 3)) altigaCaps = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 4)) altigaReqs = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 5)) altigaExpr = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 6)) altigaHw = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2)) altigaVpnHw = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1)) altigaVpnChassis = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1)) altigaVpnIntf = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 2)) altigaVpnEncrypt = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 3)) vpnConcentrator = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 1)) vpnRemote = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 2)) vpnClient = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 3)) vpnConcentratorRev1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 1, 1)) if mibBuilder.loadTexts: vpnConcentratorRev1.setStatus('current') vpnConcentratorRev2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 1, 2)) if mibBuilder.loadTexts: vpnConcentratorRev2.setStatus('current') vpnRemoteRev1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 2, 1)) if mibBuilder.loadTexts: vpnRemoteRev1.setStatus('current') vpnClientRev1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 3076, 1, 2, 1, 1, 3, 1)) if mibBuilder.loadTexts: vpnClientRev1.setStatus('current') mibBuilder.exportSymbols("ALTIGA-GLOBAL-REG", alTelnetMibModule=alTelnetMibModule, altigaVpnChassis=altigaVpnChassis, alIpSecMibModule=alIpSecMibModule, alPPPoEMibModule=alPPPoEMibModule, alPortForwardMibModule=alPortForwardMibModule, altigaModules=altigaModules, alACEServerMibModule=alACEServerMibModule, alSepMibModule=alSepMibModule, alSslTunnelClientMibModule=alSslTunnelClientMibModule, alGroupMatchMibModule=alGroupMatchMibModule, alGeneralMibModule=alGeneralMibModule, alWebPortalMibModule=alWebPortalMibModule, alPppMibModule=alPppMibModule, altigaVpnHw=altigaVpnHw, vpnClient=vpnClient, alAccessMibModule=alAccessMibModule, vpnRemoteRev1=vpnRemoteRev1, alSshMibModule=alSshMibModule, alNacMibModule=alNacMibModule, PYSNMP_MODULE_ID=altigaGlobalRegModule, alAuthMibModule=alAuthMibModule, altigaReqs=altigaReqs, alWebEmailMibModule=alWebEmailMibModule, alIpMibModule=alIpMibModule, alAutoUpdateMibModule=alAutoUpdateMibModule, altigaProducts=altigaProducts, alCapModule=alCapModule, alDnsMibModule=alDnsMibModule, alAdminAuthMibModule=alAdminAuthMibModule, alSslMibModule=alSslMibModule, alXmlMibModule=alXmlMibModule, vpnClientRev1=vpnClientRev1, altigaHw=altigaHw, altigaGlobalRegModule=altigaGlobalRegModule, vpnConcentrator=vpnConcentrator, alCertMibModule=alCertMibModule, alHttpMibModule=alHttpMibModule, alIkeMibModule=alIkeMibModule, alMultiLinkMibModule=alMultiLinkMibModule, alMibModule=alMibModule, alGlobalRegModule=alGlobalRegModule, alRemoteServerMibModule=alRemoteServerMibModule, alFilterMibModule=alFilterMibModule, vpnConcentratorRev1=vpnConcentratorRev1, alDhcpMibModule=alDhcpMibModule, alWatchdogMibModule=alWatchdogMibModule, alNotifyMibModule=alNotifyMibModule, alAuthorizationModule=alAuthorizationModule, vpnConcentratorRev2=vpnConcentratorRev2, alWebvpnAclMibModule=alWebvpnAclMibModule, alFipsMibModule=alFipsMibModule, alTftpMibModule=alTftpMibModule, alNetworkListMibModule=alNetworkListMibModule, alUserMibModule=alUserMibModule, alRebootStatusMibModule=alRebootStatusMibModule, alDhcpServerMibModule=alDhcpServerMibModule, vpnRemote=vpnRemote, altigaRoot=altigaRoot, alPptpMibModule=alPptpMibModule, alSyncMibModule=alSyncMibModule, alSnmpMibModule=alSnmpMibModule, altigaVpnEncrypt=altigaVpnEncrypt, alEventMibModule=alEventMibModule, alNatTMibModule=alNatTMibModule, alSecureDesktopMibModule=alSecureDesktopMibModule, alT1E1MibModule=alT1E1MibModule, alCtcpMibModule=alCtcpMibModule, alLan2LanMibModule=alLan2LanMibModule, alBwMgmtMibModule=alBwMgmtMibModule, altigaReg=altigaReg, alFwMibModule=alFwMibModule, alNtpMibModule=alNtpMibModule, altigaVpnIntf=altigaVpnIntf, alLBSSFMibModule=alLBSSFMibModule, alComplModule=alComplModule, alNbnsMibModule=alNbnsMibModule, altigaCaps=altigaCaps, alSessionMibModule=alSessionMibModule, alNatMibModule=alNatMibModule, alL2tpMibModule=alL2tpMibModule, alAddressMibModule=alAddressMibModule, alBackupL2LMibModule=alBackupL2LMibModule, alHardwareMibModule=alHardwareMibModule, alIpSecPreFragMibModule=alIpSecPreFragMibModule, alFtpMibModule=alFtpMibModule, altigaExpr=altigaExpr, alVersionMibModule=alVersionMibModule, altigaGeneric=altigaGeneric)
''' Write a function that accepts an array of 10 integers (between 0 and 9), that returns a string of those numbers in the form of a phone number. Example: create_phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]]) # => returns "(123) 456-7890" The returned format must be correct in order to complete this challenge. Don't forget the space after the closing parenthesis! ''' def create_phone_number(n): n = [str(x) for x in n] n.insert(0, '(') n.insert(4, ')') n.insert(5, ' ') n.insert(9, '-') return ''.join(n) # best answer I think def create_phone_number1(n): return "({}{}{}) {}{}{}-{}{}{}{}".format(*n) ''' 关于对list使用*的解释。 自动把list解释成对应的需要的参数。 If the syntax *expression appears in the function call, expression must evaluate to an iterable. Elements from these iterables are treated as if they were additional positional arguments. For the call f(x1, x2, *y, x3, x4), if y evaluates to a sequence y1, …, yM, this is equivalent to a call with M+4 positional arguments x1, x2, y1, …, yM, x3, x4. ''' # use map,another def create_phone_number2(n): n = ''.join(map(str, n)) return '(%s) %s-%s' % (n[:3], n[3:6], n[6:]) if __name__ == '__main__': print(create_phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]))
# -*- coding: utf-8 -*- class Modifier(object): def __init__(self): self.is_disable = False self.is_show_only = False self.is_debug = False self.is_transparent = False def turn_on_disable(self): self.is_disable = True def turn_off_disable(self): self.is_disable = False def turn_on_show_only(self): self.is_show_only = True def turn_off_show_only(self): self.is_show_only = False def turn_on_debug(self): self.is_debug = True def turn_off_debug(self): self.is_debug = False def turn_on_transparent(self): self.is_transparent = True def turn_off_transparent(self): self.is_transparent = False def get_prefix(self): prefix = '' if self.is_disable: prefix += '*' if self.is_show_only: prefix += '!' if self.is_debug: prefix += '#' if self.is_transparent: prefix += '%' return prefix class ModifierMixin(object): def __init__(self): super(ModifierMixin, self).__init__() self.mod = Modifier() def turn_on_disable(self): self.mod.is_disable = True return self def turn_off_disable(self): self.mod.is_disable = False return self def turn_on_show_only(self): self.mod.is_show_only = True return self def turn_off_show_only(self): self.mod.is_show_only = False return self def turn_on_debug(self): self.mod.is_debug = True return self def turn_off_debug(self): self.mod.is_debug = False return self def turn_on_transparent(self): self.mod.is_transparent = True return self def turn_off_transparent(self): self.mod.is_transparent = False return self # Shorthand def disable(self): return self.turn_on_disable() def show_only(self): return self.turn_on_show_only() def debug(self): return self.turn_on_debug() def transparent(self): return self.turn_on_transparent()
# -*- coding: utf-8 -*- """ Editor: Zhao Xinlu School: BUPT Date: 2018-04-01 算法思想:中序序列与后序序列重构二叉树--递归 """ # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def buildTree(self, inorder, postorder): """ :type inorder: List[int] :type postorder: List[int] :rtype: TreeNode """ if len(inorder) <= 0 or len(postorder) <= 0: return None root = TreeNode(postorder[len(postorder)-1]) for idx in range(len(inorder)): if inorder[idx] == root.val: break root.left = self.buildTree(inorder[:idx], postorder[:idx]) root.right = self.buildTree(inorder[idx+1:], postorder[idx:-1]) return root
# import libraries here ... # Stickbreak function def stickbreak(v): batch_ndims = len(v.shape) - 1 cumprod_one_minus_v = tf.math.cumprod(1 - v, axis=-1) one_v = tf.pad(v, [[0, 0]] * batch_ndims + [[0, 1]], "CONSTANT", constant_values=1) c_one = tf.pad(cumprod_one_minus_v, [[0, 0]] * batch_ndims + [[1, 0]], "CONSTANT", constant_values=1) return one_v * c_one # See: https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/MixtureSameFamily # See: https://www.tensorflow.org/probability/examples/Bayesian_Gaussian_Mixture_Model # Define model builder. def create_dp_sb_gmm(nobs, K, dtype=np.float64): return tfd.JointDistributionNamed(dict( # Mixture means mu = tfd.Independent( tfd.Normal(np.zeros(K, dtype), 3), reinterpreted_batch_ndims=1 ), # Mixture scales sigma = tfd.Independent( tfd.LogNormal(loc=np.full(K, - 2, dtype), scale=0.5), reinterpreted_batch_ndims=1 ), # Mixture weights (stick-breaking construction) alpha = tfd.Gamma(concentration=np.float64(1.0), rate=10.0), v = lambda alpha: tfd.Independent( # tfd.Beta(np.ones(K - 1, dtype), alpha), # NOTE: Dave Moore suggests doing this instead, to ensure # that a batch dimension in alpha doesn't conflict with # the other parameters. tfd.Beta(np.ones(K - 1, dtype), alpha[..., tf.newaxis]), reinterpreted_batch_ndims=1 ), # Observations (likelihood) obs = lambda mu, sigma, v: tfd.Sample(tfd.MixtureSameFamily( # This will be marginalized over. mixture_distribution=tfd.Categorical(probs=stickbreak(v)), # mixture_distribution=tfd.Categorical(probs=v), components_distribution=tfd.Normal(mu, sigma)), sample_shape=nobs) )) # Number of mixture components. ncomponents = 10 # Create model. model = create_dp_sb_gmm(nobs=len(simdata['y']), K=ncomponents) # Define log unnormalized joint posterior density. def target_log_prob_fn(mu, sigma, alpha, v): return model.log_prob(obs=y, mu=mu, sigma=sigma, alpha=alpha, v=v) # NOTE: Read data y here ... # Here, y (a vector of length 500) is noisy univariate draws from a # mixture distribution with 4 components. ### ADVI ### # Prep work for ADVI. Credit: Thanks to Dave Moore at BayesFlow for helping # with the implementation! # ADVI is quite sensitive to initial distritbution. tf.random.set_seed(7) # 7 # Create variational parameters. qmu_loc = tf.Variable(tf.random.normal([ncomponents], dtype=np.float64) * 3, name='qmu_loc') qmu_rho = tf.Variable(tf.random.normal([ncomponents], dtype=np.float64) * 2, name='qmu_rho') qsigma_loc = tf.Variable(tf.random.normal([ncomponents], dtype=np.float64) - 2, name='qsigma_loc') qsigma_rho = tf.Variable(tf.random.normal([ncomponents], dtype=np.float64) - 2, name='qsigma_rho') qv_loc = tf.Variable(tf.random.normal([ncomponents - 1], dtype=np.float64) - 2, name='qv_loc') qv_rho = tf.Variable(tf.random.normal([ncomponents - 1], dtype=np.float64) - 1, name='qv_rho') qalpha_loc = tf.Variable(tf.random.normal([], dtype=np.float64), name='qalpha_loc') qalpha_rho = tf.Variable(tf.random.normal([], dtype=np.float64), name='qalpha_rho') # Create variational distribution. surrogate_posterior = tfd.JointDistributionNamed(dict( # qmu mu=tfd.Independent(tfd.Normal(qmu_loc, tf.nn.softplus(qmu_rho)), reinterpreted_batch_ndims=1), # qsigma sigma=tfd.Independent(tfd.LogNormal(qsigma_loc, tf.nn.softplus(qsigma_rho)), reinterpreted_batch_ndims=1), # qv v=tfd.Independent(tfd.LogitNormal(qv_loc, tf.nn.softplus(qv_rho)), reinterpreted_batch_ndims=1), # qalpha alpha=tfd.LogNormal(qalpha_loc, tf.nn.softplus(qalpha_rho)))) # Run ADVI. losses = tfp.vi.fit_surrogate_posterior( target_log_prob_fn=target_log_prob_fn, surrogate_posterior=surrogate_posterior, optimizer=tf.optimizers.Adam(learning_rate=1e-2), sample_size=100, seed=1, num_steps=2000) # 9 seconds ### MCMC (HMC/NUTS) ### # Creates initial values for HMC, NUTS. def generate_initial_state(seed=None): tf.random.set_seed(seed) return [ tf.zeros(ncomponents, dtype, name='mu'), tf.ones(ncomponents, dtype, name='sigma') * 0.1, tf.ones([], dtype, name='alpha') * 0.5, tf.fill(ncomponents - 1, value=np.float64(0.5), name='v') ] # Create bijectors to transform unconstrained to and from constrained # parameters-space. For example, if X ~ Exponential(theta), then X is # constrained to be positive. A transformation that puts X onto an # unconstrained # space is Y = log(X). In that case, the bijector used should # be the **inverse-transform**, which is exp(.) (i.e. so that X = exp(Y)). # # NOTE: Define the inverse-transforms for each parameter in sequence. bijectors = [ tfb.Identity(), # mu tfb.Exp(), # sigma tfb.Exp(), # alpha tfb.Sigmoid() # v ] # Define HMC sampler. @tf.function(autograph=False, experimental_compile=True) def hmc_sample(num_results, num_burnin_steps, current_state, step_size=0.01, num_leapfrog_steps=100): return tfp.mcmc.sample_chain( num_results=num_results, num_burnin_steps=num_burnin_steps, current_state=current_state, kernel = tfp.mcmc.SimpleStepSizeAdaptation( tfp.mcmc.TransformedTransitionKernel( inner_kernel=tfp.mcmc.HamiltonianMonteCarlo( target_log_prob_fn=target_log_prob_fn, step_size=step_size, num_leapfrog_steps=num_leapfrog_steps, seed=1), bijector=bijectors), num_adaptation_steps=num_burnin_steps), trace_fn = lambda _, pkr: pkr.inner_results.inner_results.is_accepted) # Define NUTS sampler. @tf.function(autograph=False, experimental_compile=True) def nuts_sample(num_results, num_burnin_steps, current_state, max_tree_depth=10): return tfp.mcmc.sample_chain( num_results=num_results, num_burnin_steps=num_burnin_steps, current_state=current_state, kernel = tfp.mcmc.SimpleStepSizeAdaptation( tfp.mcmc.TransformedTransitionKernel( inner_kernel=tfp.mcmc.NoUTurnSampler( target_log_prob_fn=target_log_prob_fn, max_tree_depth=max_tree_depth, step_size=0.01, seed=1), bijector=bijectors), num_adaptation_steps=num_burnin_steps, # should be smaller than burn-in. target_accept_prob=0.8), trace_fn = lambda _, pkr: pkr.inner_results.inner_results.is_accepted) # Run HMC sampler. current_state = generate_initial_state() [mu, sigma, alpha, v], is_accepted = hmc_sample(500, 500, current_state) hmc_output = dict(mu=mu, sigma=sigma, alpha=alpha, v=v, acceptance_rate=is_accepted.numpy().mean()) # Run NUTS sampler. current_state = generate_initial_state() [mu, sigma, alpha, v], is_accepted = nuts_sample(500, 500, current_state) nuts_output = dict(mu=mu, sigma=sigma, alpha=alpha, v=v, acceptance_rate=is_accepted.numpy().mean())
def build_uri(asset_uri, site_uri): asset_uri = asset_uri.strip("..") if asset_uri.startswith("http"): return asset_uri separator = "" if not asset_uri.startswith("/"): separator = "/" return "%s%s%s" % (site_uri, separator, asset_uri) def join_uri(site_uri, file_path): return "%s%s" % (site_uri, file_path)
# rotate a list N places to the left def rotate(n, l): return l[n:] + l[0:n] def test_rotate(): l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'] expected = ['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'a', 'b', 'c'] assert rotate(3,l) == expected expected = ['j', 'k', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'] assert rotate(-2, l) == expected assert rotate(0, l) == l assert rotate(0, ['a']) == ['a'] assert rotate(1, ['a']) == ['a'] assert rotate(-1, ['a']) == ['a'] assert rotate(100, ['a']) == ['a'] assert rotate(0, ['a', 'b']) == ['a', 'b'] assert rotate(1, ['a', 'b']) == ['b', 'a'] assert rotate(2, ['a', 'b']) == ['a', 'b'] # not sure how it should work when n > len(list), but this is by default assert rotate(3, ['a', 'b']) == ['a', 'b']
# Puzzle Input ---------- with open('Day04-Input.txt', 'r') as file: puzzle = file.read().split('\n\n') with open('Day04-Test01.txt', 'r') as file: test01 = file.read().split('\n\n') # Main Code ---------- # Convert the board string into a list def process_board(raw_board): new_board = [] for row in raw_board.split('\n'): new_board += [row.split()] return new_board # Find the set of all the numbers on a board def find_numbers(board): nums = [] for row in board: nums += [item for item in row] return set(nums) # Find all lines (rows and columns) on a board, save them as a set def find_lines(board): lines = [] # Save the rows and organize the columns columns = list([] for _ in range(len(board))) for row in board: lines += [set(row)] for index, item in enumerate(row): columns[index] += [item] # Save the columns for col in columns: lines += [set(col)] return lines # Simple Bingo Board class class BingoBoard: def __init__(self, raw_board): self.board = process_board(raw_board) self.numbers = find_numbers(self.board) self.lines = find_lines(self.board) # Determine the first winner and return its score def find_first_winner(boards): # Numbers that were picked num_order = boards[0].split(',') # Bingo Boards bingo_boards = [BingoBoard(b) for b in boards[1:]] # Find the winner and the score winner, score = None, None for max_index, _ in enumerate(num_order): # All numbers until now nums = set(num_order[:max_index + 5]) # Test for every row if that row if in the set of all numbers chosen until now for board in bingo_boards: for line in board.lines: if len(nums.intersection(line)) == 5: winner = board break if winner: break # Calculate the score for the winner if winner: unmarked = winner.numbers.difference(nums) score = sum(list(map(int, list(unmarked)))) * int(num_order[max_index + 4]) break return score # Tests and Solution ---------- print(find_first_winner(test01)) print(find_first_winner(puzzle))
print("Hi, are you having trouble making a password?") print("let me help you!") number = input("give me a number from 1-3") password = number animal = input("do you prefer dogs or cats?") password = number + animal color=input("what is your favorite color?") password = color+number+animal book=input("ok, last question. What is your favorite book?(the longer the title, the longer the password!") password=book+password
# settings.py # sdNum = subdomain number # p1 = spatial bandwidth # p2 = temporal bandwidth # p3 = spatial resolution # p4 = temporal resolution # p5 = number of points threshold (T1) # p6 = buffer ratio threshold (T2) # dir1 = point files (resulting from decomposition) # dir2 = time files (resulting from decomposition) # cList = keeps track of the number of cut circles for each candidate split # pList = stores the number of times each candidate split was chosen def init(): global sdNum, p1, p2, p3, p4, p5, p6, dir1, dir2, pList, cList sdNum, p1, p2, p3, p4, p5, p6, dir1, dir2, pList, cList = 0, 0, 0, 0, 0, 0, 0, 0, 0, [0,0,0,0,0], [0,0,0,0,0]
# -*- coding: utf-8 -*- """ pip_services_runtime.State ~~~~~~~~~~~~~~~~~~~~~~~~~~ Component state enumeration :copyright: Digital Living Software Corp. 2015-2016, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ class State(object): """ State in lifecycle of components or the entire microservice """ Undefined = -1 """ Undefined state """ Initial = 0 """ Initial state right after creation """ Configured = 1 """ Configuration was successfully completed """ Linked = 2 """ Links between components were successfully set """ Opened = 3 """ Ready to perform operations """ Ready = 3 """ Ready to perform operations. This is a duplicate for Opened. """ Closed = 4 """ Closed but can be reopened """
class AutoTrackConfig: hog_cell_size=4 hog_n_dim=31 gray_cell_size=4 cn_use_for_gray=False cn_cell_size=4 cn_n_dim=10 search_area_shape = 'square' # the shape of the samples search_area_scale = 5.0 # the scaling of the target size to get the search area min_image_sample_size = 150 ** 2 # minimum area of image samples max_image_sample_size = 200 ** 2 # maximum area of image samples feature_downsample_ratio=4 reg_window_max=1e5 reg_window_min=1e-3 # detection parameters refinement_iterations = 1 # number of iterations used to refine the resulting position in a frame newton_iterations = 5 # the number of Netwon iterations used for optimizing the detection score clamp_position = False # clamp the target position to be inside the image # learning parameters output_sigma_factor = 0.06 # label function sigma # ADMM params max_iterations=3 init_penalty_factor=1 max_penalty_factor=10000 penalty_scale_step=10 admm_lambda=1 epsilon=1 zeta=13 delta=0.2 nu=0.2 # scale parameters number_of_scales = 33 # number of scales to run the detector scale_step = 1.03 # the scale factor use_scale_filter = True # use the fDSST scale filter or not # scale_type='LP' # class ScaleConfig: # learning_rate_scale = 0.015 # scale_sz_window = (64, 64) # # scale_config=ScaleConfig() scale_type = 'normal' class ScaleConfig: scale_sigma_factor = 0.5 # scale label function sigma scale_lambda=0.0001 scale_learning_rate = 0.025 # scale filter learning rate number_of_scales_filter = 33 # number of scales number_of_interp_scales = 33 # number of interpolated scales scale_model_factor = 1.0 # scaling of the scale model scale_step_filter = 1.03 # the scale factor of the scale sample patch scale_model_max_area = 32 * 16 # maximume area for the scale sample patch scale_feature = 'HOG4' # features for the scale filter (only HOG4 supported) s_num_compressed_dim = 'MAX' # number of compressed feature dimensions in the scale filter lamBda = 1e-4 # scale filter regularization do_poly_interp = False scale_config = ScaleConfig() # normalize_power = 2 # Lp normalization with this p normalize_size = True # also normalize with respect to the spatial size of the feature normalize_dim = True # also normalize with respect to the dimensionality of the feature square_root_normalization = False
# # PySNMP MIB module TPLINK-DHCPSERVER-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TPLINK-DHCPSERVER-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:17:01 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") SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, ModuleIdentity, IpAddress, TimeTicks, Counter32, Gauge32, ObjectIdentity, Bits, Counter64, Integer32, NotificationType, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "ModuleIdentity", "IpAddress", "TimeTicks", "Counter32", "Gauge32", "ObjectIdentity", "Bits", "Counter64", "Integer32", "NotificationType", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") tplinkMgmt, = mibBuilder.importSymbols("TPLINK-MIB", "tplinkMgmt") TPRowStatus, = mibBuilder.importSymbols("TPLINK-TC-MIB", "TPRowStatus") tplinkDhcpServerMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11863, 6, 38)) tplinkDhcpServerMIB.setRevisions(('2012-11-29 00:00',)) if mibBuilder.loadTexts: tplinkDhcpServerMIB.setLastUpdated('201211290000Z') if mibBuilder.loadTexts: tplinkDhcpServerMIB.setOrganization('TP-LINK') tplinkDhcpServerMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1)) tplinkDhcpServerNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 2)) tpDhcpServerEnable = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disable", 0), ("enable", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerEnable.setStatus('current') tpDhcpServerVendorClassId = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerVendorClassId.setStatus('current') tpDhcpServerCapwapAcIp = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerCapwapAcIp.setStatus('current') tpDhcpServerUnusedIpTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4), ) if mibBuilder.loadTexts: tpDhcpServerUnusedIpTable.setStatus('current') tpDhcpServerUnusedIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerUnusedStartIp")) if mibBuilder.loadTexts: tpDhcpServerUnusedIpEntry.setStatus('current') tpDhcpServerUnusedStartIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerUnusedStartIp.setStatus('current') tpDhcpServerUnusedEndIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 2), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerUnusedEndIp.setStatus('current') tpDhcpServerUnusedIpStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 4, 1, 3), TPRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerUnusedIpStatus.setStatus('current') tpDhcpServerAddrPoolTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5), ) if mibBuilder.loadTexts: tpDhcpServerAddrPoolTable.setStatus('current') tpDhcpServerAddrPoolEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerAddrPoolNetwork")) if mibBuilder.loadTexts: tpDhcpServerAddrPoolEntry.setStatus('current') tpDhcpServerAddrPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolName.setStatus('current') tpDhcpServerAddrPoolNetwork = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 2), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNetwork.setStatus('current') tpDhcpServerAddrPoolSubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolSubnetMask.setStatus('current') tpDhcpServerAddrPoolRentTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 4), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolRentTime.setStatus('current') tpDhcpServerAddrPoolGateWayA = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 5), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayA.setStatus('current') tpDhcpServerAddrPoolGateWayB = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 6), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayB.setStatus('current') tpDhcpServerAddrPoolGateWayC = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 7), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayC.setStatus('current') tpDhcpServerAddrPoolGateWayD = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 8), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayD.setStatus('current') tpDhcpServerAddrPoolGateWayE = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 9), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayE.setStatus('current') tpDhcpServerAddrPoolGateWayF = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 10), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayF.setStatus('current') tpDhcpServerAddrPoolGateWayG = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 11), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayG.setStatus('current') tpDhcpServerAddrPoolGateWayH = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 12), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolGateWayH.setStatus('current') tpDhcpServerAddrPoolDnsA = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 13), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsA.setStatus('current') tpDhcpServerAddrPoolDnsB = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 14), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsB.setStatus('current') tpDhcpServerAddrPoolDnsC = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 15), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsC.setStatus('current') tpDhcpServerAddrPoolDnsD = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 16), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsD.setStatus('current') tpDhcpServerAddrPoolDnsE = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 17), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsE.setStatus('current') tpDhcpServerAddrPoolDnsF = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 18), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsF.setStatus('current') tpDhcpServerAddrPoolDnsG = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 19), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsG.setStatus('current') tpDhcpServerAddrPoolDnsH = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 20), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDnsH.setStatus('current') tpDhcpServerAddrPoolNBNServerA = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 21), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerA.setStatus('current') tpDhcpServerAddrPoolNBNServerB = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 22), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerB.setStatus('current') tpDhcpServerAddrPoolNBNServerC = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 23), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerC.setStatus('current') tpDhcpServerAddrPoolNBNServerD = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 24), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerD.setStatus('current') tpDhcpServerAddrPoolNBNServerE = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 25), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerE.setStatus('current') tpDhcpServerAddrPoolNBNServerF = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 26), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerF.setStatus('current') tpDhcpServerAddrPoolNBNServerG = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 27), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerG.setStatus('current') tpDhcpServerAddrPoolNBNServerH = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 28), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNBNServerH.setStatus('current') tpDhcpServerAddrPoolNetbiosNodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 4, 8))).clone(namedValues=NamedValues(("none", 0), ("broadcast", 1), ("peer-to-peer", 2), ("mixed", 4), ("hybrid", 8)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNetbiosNodeType.setStatus('current') tpDhcpServerAddrPoolNextServer = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 30), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolNextServer.setStatus('current') tpDhcpServerAddrPoolDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 31), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolDomainName.setStatus('current') tpDhcpServerAddrPoolBootfile = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 32), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolBootfile.setStatus('current') tpDhcpServerAddrPoolStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 5, 1, 33), TPRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerAddrPoolStatus.setStatus('current') tpDhcpServerStaticBindTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6), ) if mibBuilder.loadTexts: tpDhcpServerStaticBindTable.setStatus('current') tpDhcpServerStaticBindEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerBindIpAddr")) if mibBuilder.loadTexts: tpDhcpServerStaticBindEntry.setStatus('current') tpDhcpServerStaticAddrPoolName = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerStaticAddrPoolName.setStatus('current') tpDhcpServerBindIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 2), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerBindIpAddr.setStatus('current') tpDhcpServerStaticClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerStaticClientId.setStatus('current') tpDhcpServerMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerMacAddr.setStatus('current') tpDhcpServerHardwareType = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-2, -1, 1, 6))).clone(namedValues=NamedValues(("ascii", -2), ("hex", -1), ("ethernet", 1), ("ieee802", 6)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerHardwareType.setStatus('current') tpDhcpServerStaticBindStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 6, 1, 6), TPRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerStaticBindStatus.setStatus('current') tpDhcpServerBindingTable = MibTable((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7), ) if mibBuilder.loadTexts: tpDhcpServerBindingTable.setStatus('current') tpDhcpServerBindingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1), ).setIndexNames((0, "TPLINK-DHCPSERVER-MIB", "tpDhcpServerBindingIp")) if mibBuilder.loadTexts: tpDhcpServerBindingEntry.setStatus('current') tpDhcpServerBindingIp = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerBindingIp.setStatus('current') tpDhcpServerBindingClientId = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 200))).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerBindingClientId.setStatus('current') tpDhcpServerBindingMac = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerBindingMac.setStatus('current') tpDhcpServerBindingType = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("automatic", 0), ("manual", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerBindingType.setStatus('current') tpDhcpServerBindingRemainTime = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerBindingRemainTime.setStatus('current') tpDhcpServerBindingStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 7, 1, 6), TPRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: tpDhcpServerBindingStatus.setStatus('current') tpDhcpServerBindingClear = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("remain", 0), ("clear", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerBindingClear.setStatus('current') tpDhcpServerStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9)) tpDhcpServerStatisticsBootRequest = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 1), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsBootRequest.setStatus('current') tpDhcpServerStatisticsDiscover = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsDiscover.setStatus('current') tpDhcpServerStatisticsRequest = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsRequest.setStatus('current') tpDhcpServerStatisticsDecline = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsDecline.setStatus('current') tpDhcpServerStatisticsRelease = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsRelease.setStatus('current') tpDhcpServerStatisticsInform = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsInform.setStatus('current') tpDhcpServerStatisticsBootReply = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsBootReply.setStatus('current') tpDhcpServerStatisticsOffer = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsOffer.setStatus('current') tpDhcpServerStatisticsAck = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsAck.setStatus('current') tpDhcpServerStatisticsNak = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tpDhcpServerStatisticsNak.setStatus('current') tpDhcpServerStatisticsClear = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 9, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("remain", 0), ("clear", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerStatisticsClear.setStatus('current') tpDhcpServerPingPackets = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerPingPackets.setStatus('current') tpDhcpServerPingTimeout = MibScalar((1, 3, 6, 1, 4, 1, 11863, 6, 38, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(100, 10000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tpDhcpServerPingTimeout.setStatus('current') mibBuilder.exportSymbols("TPLINK-DHCPSERVER-MIB", tplinkDhcpServerMIB=tplinkDhcpServerMIB, tpDhcpServerMacAddr=tpDhcpServerMacAddr, tpDhcpServerAddrPoolNetbiosNodeType=tpDhcpServerAddrPoolNetbiosNodeType, tpDhcpServerAddrPoolBootfile=tpDhcpServerAddrPoolBootfile, tpDhcpServerBindingEntry=tpDhcpServerBindingEntry, tpDhcpServerUnusedIpEntry=tpDhcpServerUnusedIpEntry, tpDhcpServerAddrPoolNetwork=tpDhcpServerAddrPoolNetwork, tpDhcpServerStatisticsDecline=tpDhcpServerStatisticsDecline, tpDhcpServerAddrPoolGateWayF=tpDhcpServerAddrPoolGateWayF, tpDhcpServerAddrPoolNBNServerG=tpDhcpServerAddrPoolNBNServerG, tpDhcpServerAddrPoolDomainName=tpDhcpServerAddrPoolDomainName, tpDhcpServerStaticBindTable=tpDhcpServerStaticBindTable, tpDhcpServerAddrPoolGateWayA=tpDhcpServerAddrPoolGateWayA, tpDhcpServerAddrPoolGateWayB=tpDhcpServerAddrPoolGateWayB, tpDhcpServerAddrPoolStatus=tpDhcpServerAddrPoolStatus, tpDhcpServerAddrPoolEntry=tpDhcpServerAddrPoolEntry, tpDhcpServerUnusedStartIp=tpDhcpServerUnusedStartIp, tpDhcpServerAddrPoolDnsH=tpDhcpServerAddrPoolDnsH, tpDhcpServerAddrPoolSubnetMask=tpDhcpServerAddrPoolSubnetMask, tpDhcpServerAddrPoolNBNServerB=tpDhcpServerAddrPoolNBNServerB, tpDhcpServerAddrPoolGateWayD=tpDhcpServerAddrPoolGateWayD, tpDhcpServerUnusedIpStatus=tpDhcpServerUnusedIpStatus, tpDhcpServerStatisticsOffer=tpDhcpServerStatisticsOffer, tpDhcpServerStaticClientId=tpDhcpServerStaticClientId, tpDhcpServerAddrPoolNextServer=tpDhcpServerAddrPoolNextServer, tpDhcpServerStatisticsBootReply=tpDhcpServerStatisticsBootReply, tpDhcpServerStatisticsDiscover=tpDhcpServerStatisticsDiscover, tpDhcpServerUnusedEndIp=tpDhcpServerUnusedEndIp, tpDhcpServerStaticBindStatus=tpDhcpServerStaticBindStatus, tpDhcpServerAddrPoolDnsD=tpDhcpServerAddrPoolDnsD, tpDhcpServerStatisticsAck=tpDhcpServerStatisticsAck, tpDhcpServerStatisticsBootRequest=tpDhcpServerStatisticsBootRequest, tpDhcpServerBindingIp=tpDhcpServerBindingIp, tplinkDhcpServerMIBObjects=tplinkDhcpServerMIBObjects, tpDhcpServerAddrPoolGateWayH=tpDhcpServerAddrPoolGateWayH, PYSNMP_MODULE_ID=tplinkDhcpServerMIB, tpDhcpServerAddrPoolDnsC=tpDhcpServerAddrPoolDnsC, tpDhcpServerStatistics=tpDhcpServerStatistics, tpDhcpServerBindingMac=tpDhcpServerBindingMac, tplinkDhcpServerNotifications=tplinkDhcpServerNotifications, tpDhcpServerBindingStatus=tpDhcpServerBindingStatus, tpDhcpServerStatisticsNak=tpDhcpServerStatisticsNak, tpDhcpServerAddrPoolNBNServerE=tpDhcpServerAddrPoolNBNServerE, tpDhcpServerBindingType=tpDhcpServerBindingType, tpDhcpServerBindingTable=tpDhcpServerBindingTable, tpDhcpServerAddrPoolDnsA=tpDhcpServerAddrPoolDnsA, tpDhcpServerAddrPoolDnsB=tpDhcpServerAddrPoolDnsB, tpDhcpServerAddrPoolNBNServerC=tpDhcpServerAddrPoolNBNServerC, tpDhcpServerStaticAddrPoolName=tpDhcpServerStaticAddrPoolName, tpDhcpServerBindingClear=tpDhcpServerBindingClear, tpDhcpServerAddrPoolGateWayE=tpDhcpServerAddrPoolGateWayE, tpDhcpServerEnable=tpDhcpServerEnable, tpDhcpServerAddrPoolDnsE=tpDhcpServerAddrPoolDnsE, tpDhcpServerStatisticsInform=tpDhcpServerStatisticsInform, tpDhcpServerPingTimeout=tpDhcpServerPingTimeout, tpDhcpServerAddrPoolGateWayC=tpDhcpServerAddrPoolGateWayC, tpDhcpServerStaticBindEntry=tpDhcpServerStaticBindEntry, tpDhcpServerAddrPoolTable=tpDhcpServerAddrPoolTable, tpDhcpServerAddrPoolNBNServerA=tpDhcpServerAddrPoolNBNServerA, tpDhcpServerAddrPoolName=tpDhcpServerAddrPoolName, tpDhcpServerStatisticsClear=tpDhcpServerStatisticsClear, tpDhcpServerAddrPoolDnsG=tpDhcpServerAddrPoolDnsG, tpDhcpServerBindingClientId=tpDhcpServerBindingClientId, tpDhcpServerBindIpAddr=tpDhcpServerBindIpAddr, tpDhcpServerCapwapAcIp=tpDhcpServerCapwapAcIp, tpDhcpServerUnusedIpTable=tpDhcpServerUnusedIpTable, tpDhcpServerStatisticsRelease=tpDhcpServerStatisticsRelease, tpDhcpServerAddrPoolNBNServerH=tpDhcpServerAddrPoolNBNServerH, tpDhcpServerStatisticsRequest=tpDhcpServerStatisticsRequest, tpDhcpServerAddrPoolDnsF=tpDhcpServerAddrPoolDnsF, tpDhcpServerVendorClassId=tpDhcpServerVendorClassId, tpDhcpServerHardwareType=tpDhcpServerHardwareType, tpDhcpServerAddrPoolNBNServerF=tpDhcpServerAddrPoolNBNServerF, tpDhcpServerAddrPoolRentTime=tpDhcpServerAddrPoolRentTime, tpDhcpServerBindingRemainTime=tpDhcpServerBindingRemainTime, tpDhcpServerPingPackets=tpDhcpServerPingPackets, tpDhcpServerAddrPoolGateWayG=tpDhcpServerAddrPoolGateWayG, tpDhcpServerAddrPoolNBNServerD=tpDhcpServerAddrPoolNBNServerD)