content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# Conditionals # Allows for decision making based on the values of our variables def main(): x = 1000 y = 10 if (x < y): st = " x is less than y" elif (x == y): st = " x is the same as y" else: st = "x is greater than y" print(st) print("\nAlternatively:...") # python's more specific if/else statement = "x is less than y" if (x<y) else "x is greater than or the same as" print(statement) if __name__ == "__main__": main()
def main(): x = 1000 y = 10 if x < y: st = ' x is less than y' elif x == y: st = ' x is the same as y' else: st = 'x is greater than y' print(st) print('\nAlternatively:...') statement = 'x is less than y' if x < y else 'x is greater than or the same as' print(statement) if __name__ == '__main__': main()
#!/usr/bin/env python # # Class implementing a serial (console) user interface for the Manchester Baby (SSEM) # #------------------------------------------------------------------------------ # # Class construction. # #------------------------------------------------------------------------------ class ConsoleUserInterface: '''This object will implement a console user interface for the Manchester Baby (SSEM).''' def __init__(self): pass #------------------------------------------------------------------------------ # # Methods. # #------------------------------------------------------------------------------ def UpdateDisplayTube(self, storeLines): '''Update the display tube with the current contents od the store lines. @param: storeLines The store lines to be displayed. ''' storeLines.Print() print() def UpdateProgress(self, numberOfLines): '''Show the number of the lines executed so far. @param: numberOfLines The number of lines that have been executed so far. ''' print('Executed', numberOfLines, 'lines') def DisplayError(self, errorMessage): '''Show the error that has just occurred. @param: errorMessage Message to be displayed. ''' print('Error:', errorMessage) #------------------------------------------------------------------------------ # # Tests. # #------------------------------------------------------------------------------ if (__name__ == '__main__'): ui = ConsoleUserInterface() ui.UpdateProgress(1000) ui.DisplayError('Syntax error') print('ConsoleUserInterface tests completed successfully.')
class Consoleuserinterface: """This object will implement a console user interface for the Manchester Baby (SSEM).""" def __init__(self): pass def update_display_tube(self, storeLines): """Update the display tube with the current contents od the store lines. @param: storeLines The store lines to be displayed. """ storeLines.Print() print() def update_progress(self, numberOfLines): """Show the number of the lines executed so far. @param: numberOfLines The number of lines that have been executed so far. """ print('Executed', numberOfLines, 'lines') def display_error(self, errorMessage): """Show the error that has just occurred. @param: errorMessage Message to be displayed. """ print('Error:', errorMessage) if __name__ == '__main__': ui = console_user_interface() ui.UpdateProgress(1000) ui.DisplayError('Syntax error') print('ConsoleUserInterface tests completed successfully.')
a,b=map(str,input().split()) z=[] x,c="","" if a[0].islower(): x=x+a[0].upper() if b[0].islower(): c=c+b[0].upper() for i in range(1,len(a)): if a[i].isupper() or a[i].islower(): x=x+a[i].lower() for i in range(1,len(b)): if b[i].isupper() or b[i].islower(): c=c+b[i].lower() z.append(x) z.append(c) print(*z)
(a, b) = map(str, input().split()) z = [] (x, c) = ('', '') if a[0].islower(): x = x + a[0].upper() if b[0].islower(): c = c + b[0].upper() for i in range(1, len(a)): if a[i].isupper() or a[i].islower(): x = x + a[i].lower() for i in range(1, len(b)): if b[i].isupper() or b[i].islower(): c = c + b[i].lower() z.append(x) z.append(c) print(*z)
#tutorials 3: Execute the below instructions in the interpreter #execute the below command "Hello World!" print("Hello World!") #execute using single quote 'Hello World!' print('Hello World!') #use \' to escape single quote 'can\'t' print('can\'t') #or use double quotes "can't" print("can't") #more examples 1- using print function print( '" I won\'t," she said.' ) #more examples 2 a = 'First Line. \n Second Line' print(a) #String concatenation print("\n-->string concatenation example without using +") print('Py''thon') #String concatenation using + print("\n-->string concatenation: concatenating two literals using +") print("Hi "+"there!") #String and variable concatenation using + print("\n-->string concatenation: concatenating two literals using +") a="Hello" print( a +" there!") #concatenation of two variables print("\n-->string concatenation: concatenating two String variables using +") b= " World!" print(a+b) # String indexing print("\n-->string Indexing: Declare a String variable and access the elements using index") word = "Python" print("word-->"+word) print("\n--> word[0]") print(word[0]) print("\n--> word[5]") print(word[5]) print("\n--> word[-6]") print(word[-6]) print("\n -->if you type word[7]], you would get an error as shown below, as it is out of range") print(" File \"<stdin>\", line 1") print(" word[7]]") print(" ^") print("SyntaxError: invalid syntax") print(" \")") print("-->Notice the index for each of the letters in the word 'PYTHON' both forward and backward") print("\n --> P Y T H O N") print(" --> 0 1 2 3 4 5") print(" --> -6 -5 -4 -3 -2 -1") print("--> word[0:4]") print(word[0:4]) print("--> word[:2]") print(word[:2]) print("--> word[4:]") print(word[4:]) print("--> word[-4]") print(word[-4]) print("--> word[2]='N' --> String is immutable and hence cannot be changed.\nif we try to, we would get the below error.But we can always create a new String") print("\nTraceback (most recent call last):") print(" File \"<stdin>\", line 1, in <module>") print("TypeError: 'str' object does not support item assignment") print("\ncreation of a new String") print("\nrun the command--> word[:2]+'new'") print (word[:2]+'new') print("\nprinting word") print (word) print("\nlength of word is") print (len(word))
"""Hello World!""" print('Hello World!') 'Hello World!' print('Hello World!') "can't" print("can't") "can't" print("can't") print('" I won\'t," she said.') a = 'First Line. \n Second Line' print(a) print('\n-->string concatenation example without using +') print('Python') print('\n-->string concatenation: concatenating two literals using +') print('Hi ' + 'there!') print('\n-->string concatenation: concatenating two literals using +') a = 'Hello' print(a + ' there!') print('\n-->string concatenation: concatenating two String variables using +') b = ' World!' print(a + b) print('\n-->string Indexing: Declare a String variable and access the elements using index') word = 'Python' print('word-->' + word) print('\n--> word[0]') print(word[0]) print('\n--> word[5]') print(word[5]) print('\n--> word[-6]') print(word[-6]) print('\n -->if you type word[7]], you would get an error as shown below, as it is out of range') print(' File "<stdin>", line 1') print(' word[7]]') print(' ^') print('SyntaxError: invalid syntax') print('\t ")') print("-->Notice the index for each of the letters in the word 'PYTHON' both forward and backward") print('\n --> P Y T H O N') print(' --> 0 1 2 3 4 5') print(' --> -6 -5 -4 -3 -2 -1') print('--> word[0:4]') print(word[0:4]) print('--> word[:2]') print(word[:2]) print('--> word[4:]') print(word[4:]) print('--> word[-4]') print(word[-4]) print("--> word[2]='N' --> String is immutable and hence cannot be changed.\nif we try to, we would get the below error.But we can always create a new String") print('\nTraceback (most recent call last):') print(' File "<stdin>", line 1, in <module>') print("TypeError: 'str' object does not support item assignment") print('\ncreation of a new String') print("\nrun the command--> word[:2]+'new'") print(word[:2] + 'new') print('\nprinting word') print(word) print('\nlength of word is') print(len(word))
k = int(input("k: ")) array = [10,2,3,6,18] fulfilled = False i = 0 while i < len(array): if k-array[i] in array: fulfilled = True i += 1 if fulfilled == True: print("True") else: print("False")
k = int(input('k: ')) array = [10, 2, 3, 6, 18] fulfilled = False i = 0 while i < len(array): if k - array[i] in array: fulfilled = True i += 1 if fulfilled == True: print('True') else: print('False')
# https://www.codewars.com/kata/570ac43a1618ef634000087f/train/python ''' Instructions: Nova polynomial add This kata is from a series on polynomial handling. ( #1 #2 #3 #4 ) Consider a polynomial in a list where each element in the list element corresponds to a factor. The factor order is the position in the list. The first element is the zero order factor (the constant). p = [a0, a1, a2, a3] signifies the polynomial a0 + a1x + a2x^2 + a3*x^3 In this kata add two polynomials: poly_add ( [1, 2], [1] ) = [2, 2] ''' def poly_add(p1, p2): if p1 and p2: if len(p1)>len(p2): p2 = p2 + [0 for i in range(len(p1)-len(p2))] return list(map(int.__add__, p1, p2)) else: p1 = p1 + [0 for i in range(len(p2)-len(p1))] return list(map(int.__add__, p1, p2)) elif not p1: return p2 elif not p2: return p1
""" Instructions: Nova polynomial add This kata is from a series on polynomial handling. ( #1 #2 #3 #4 ) Consider a polynomial in a list where each element in the list element corresponds to a factor. The factor order is the position in the list. The first element is the zero order factor (the constant). p = [a0, a1, a2, a3] signifies the polynomial a0 + a1x + a2x^2 + a3*x^3 In this kata add two polynomials: poly_add ( [1, 2], [1] ) = [2, 2] """ def poly_add(p1, p2): if p1 and p2: if len(p1) > len(p2): p2 = p2 + [0 for i in range(len(p1) - len(p2))] return list(map(int.__add__, p1, p2)) else: p1 = p1 + [0 for i in range(len(p2) - len(p1))] return list(map(int.__add__, p1, p2)) elif not p1: return p2 elif not p2: return p1
# https://leetcode.com/problems/simplify-path/ class Solution: def simplifyPath(self, path: str) -> str: directories = path.split('/') directory_stack = list() for directory in directories: if not directory == '' and not directory == '.': if not directory == '..': directory_stack.append(directory) elif directory_stack: directory_stack.pop() return f"/{'/'.join(directory_stack)}"
class Solution: def simplify_path(self, path: str) -> str: directories = path.split('/') directory_stack = list() for directory in directories: if not directory == '' and (not directory == '.'): if not directory == '..': directory_stack.append(directory) elif directory_stack: directory_stack.pop() return f"/{'/'.join(directory_stack)}"
#------------------------------------------------------------------------------- # Name: misc_python # Purpose: misc python utilities # # Author: matthewl9 # # Version: 1.0 # # Contains: write to file, quicksort, import_list # # Created: 21/02/2018 # Copyright: (c) matthewl9 2018 # Licence: <your licence> #------------------------------------------------------------------------------- def write(filepath, list1): filepath = str(filepath) file = open(filepath,"w") for count in range (len(list1)): file.write(list1[count]) if count < (len(list1)-1): file.write("\n") file.close def partition(data): pivot = data[0] less, equal, greater = [], [], [] for elm in data: if elm < pivot: less.append(elm) elif elm > pivot: greater.append(elm) else: equal.append(elm) return less, equal, greater def quicksort(data): if data: less, equal, greater = partition(data) return qsort2(less) + equal + qsort2(greater) return data def import_list(filepath): filepath = str(filepath) txt = open(filepath, "r") shuff = txt.read().splitlines() txt.close() return(shuff)
def write(filepath, list1): filepath = str(filepath) file = open(filepath, 'w') for count in range(len(list1)): file.write(list1[count]) if count < len(list1) - 1: file.write('\n') file.close def partition(data): pivot = data[0] (less, equal, greater) = ([], [], []) for elm in data: if elm < pivot: less.append(elm) elif elm > pivot: greater.append(elm) else: equal.append(elm) return (less, equal, greater) def quicksort(data): if data: (less, equal, greater) = partition(data) return qsort2(less) + equal + qsort2(greater) return data def import_list(filepath): filepath = str(filepath) txt = open(filepath, 'r') shuff = txt.read().splitlines() txt.close() return shuff
NONE = 0 HALT = 1 << 0 FAULT = 1 << 1 BREAK = 1 << 2 def VMStateStr(_VMState): if _VMState == NONE: return "NONE" state = [] if _VMState & HALT: state.append("HALT") if _VMState & FAULT: state.append("FAULT") if _VMState & BREAK: state.append("BREAK") return ", ".join(state)
none = 0 halt = 1 << 0 fault = 1 << 1 break = 1 << 2 def vm_state_str(_VMState): if _VMState == NONE: return 'NONE' state = [] if _VMState & HALT: state.append('HALT') if _VMState & FAULT: state.append('FAULT') if _VMState & BREAK: state.append('BREAK') return ', '.join(state)
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ # { # 'target_name': 'byte_reader', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'content_metadata_provider', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'content_metadata_provider_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'exif_constants', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'exif_parser', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'exif_parser_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'external_metadata_provider', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'external_metadata_provider_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'file_system_metadata_provider', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'file_system_metadata_provider_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'function_parallel', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'function_sequence', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'id3_parser', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'image_orientation', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'image_orientation_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'image_parsers', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_cache_item', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_cache_item_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_cache_set', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_cache_set_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_dispatcher', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_item', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_model', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_model_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'metadata_parser', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'mpeg_parser', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'multi_metadata_provider', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'multi_metadata_provider_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'new_metadata_provider', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'thumbnail_model', # 'includes': ['../../../../compile_js2.gypi'], # }, # { # 'target_name': 'thumbnail_model_unittest', # 'includes': ['../../../../compile_js2.gypi'], # }, ], }
{'targets': []}
#!/usr/bin/env python3 ''' lib/subl/constants.py Constants for use in sublime apis, including plugin-specific settings. ''' ''' Settings file name. This name is passed to sublime when loading the settings. ''' # pylint: disable=pointless-string-statement SUBLIME_SETTINGS_FILENAME = 'sublime-ycmd.sublime-settings' ''' Settings keys. The "watch" key is used to register an on-change event for the settings. The "recognized" keys are used for debugging and logging/pretty-printing. The "server" keys are used for configuring ycmd servers. Changes to these settings should trigger a restart on all running ycmd servers. The "task pool" keys are used for configuring the thread pool. Changes to these settings should trigger a task pool restart. ''' SUBLIME_SETTINGS_WATCH_KEY = 'syplugin' SUBLIME_SETTINGS_RECOGNIZED_KEYS = [ 'ycmd_root_directory', 'ycmd_default_settings_path', 'ycmd_python_binary_path', 'ycmd_language_whitelist', 'ycmd_language_blacklist', 'ycmd_language_filetype', 'ycmd_idle_suicide_seconds', 'ycmd_check_interval_seconds', 'ycmd_log_level', 'ycmd_log_file', 'ycmd_keep_logs', 'ycmd_force_semantic_completion', 'sublime_ycmd_log_level', 'sublime_ycmd_log_file', 'sublime_ycmd_background_threads', ] SUBLIME_SETTINGS_YCMD_SERVER_KEYS = [ 'ycmd_root_directory', 'ycmd_default_settings_path', 'ycmd_python_binary_path', 'ycmd_language_filetype', 'ycmd_idle_suicide_seconds', 'ycmd_check_interval_seconds', 'ycmd_log_level', 'ycmd_log_file', 'ycmd_keep_logs', ] SUBLIME_SETTINGS_TASK_POOL_KEYS = [ 'sublime_ycmd_background_threads', ] ''' Sane defaults for settings. This will be part of `SUBLIME_SETTINGS_FILENAME` already, so it's mainly here for reference. The scope mapping is used to map syntax scopes to ycmd file types. They don't line up exactly, so this scope mapping defines the required transformations. For example, the syntax defines 'c++', but ycmd expects 'cpp'. The language scope prefix is stripped off any detected scopes to get the syntax base name (e.g. 'c++'). The scope mapping is applied after this step. ''' SUBLIME_DEFAULT_LANGUAGE_FILETYPE_MAPPING = { 'c++': 'cpp', 'js': 'javascript', } SUBLIME_LANGUAGE_SCOPE_PREFIX = 'source.'
""" lib/subl/constants.py Constants for use in sublime apis, including plugin-specific settings. """ '\nSettings file name.\n\nThis name is passed to sublime when loading the settings.\n' sublime_settings_filename = 'sublime-ycmd.sublime-settings' '\nSettings keys.\n\nThe "watch" key is used to register an on-change event for the settings.\n\nThe "recognized" keys are used for debugging and logging/pretty-printing.\n\nThe "server" keys are used for configuring ycmd servers. Changes to these\nsettings should trigger a restart on all running ycmd servers.\n\nThe "task pool" keys are used for configuring the thread pool. Changes to these\nsettings should trigger a task pool restart.\n' sublime_settings_watch_key = 'syplugin' sublime_settings_recognized_keys = ['ycmd_root_directory', 'ycmd_default_settings_path', 'ycmd_python_binary_path', 'ycmd_language_whitelist', 'ycmd_language_blacklist', 'ycmd_language_filetype', 'ycmd_idle_suicide_seconds', 'ycmd_check_interval_seconds', 'ycmd_log_level', 'ycmd_log_file', 'ycmd_keep_logs', 'ycmd_force_semantic_completion', 'sublime_ycmd_log_level', 'sublime_ycmd_log_file', 'sublime_ycmd_background_threads'] sublime_settings_ycmd_server_keys = ['ycmd_root_directory', 'ycmd_default_settings_path', 'ycmd_python_binary_path', 'ycmd_language_filetype', 'ycmd_idle_suicide_seconds', 'ycmd_check_interval_seconds', 'ycmd_log_level', 'ycmd_log_file', 'ycmd_keep_logs'] sublime_settings_task_pool_keys = ['sublime_ycmd_background_threads'] "\nSane defaults for settings. This will be part of `SUBLIME_SETTINGS_FILENAME`\nalready, so it's mainly here for reference.\n\nThe scope mapping is used to map syntax scopes to ycmd file types. They don't\nline up exactly, so this scope mapping defines the required transformations.\nFor example, the syntax defines 'c++', but ycmd expects 'cpp'.\n\nThe language scope prefix is stripped off any detected scopes to get the syntax\nbase name (e.g. 'c++'). The scope mapping is applied after this step.\n" sublime_default_language_filetype_mapping = {'c++': 'cpp', 'js': 'javascript'} sublime_language_scope_prefix = 'source.'
class Method: BEGIN = 'calling.begin' ANSWER = 'calling.answer' END = 'calling.end' CONNECT = 'calling.connect' DISCONNECT = 'calling.disconnect' PLAY = 'calling.play' RECORD = 'calling.record' RECEIVE_FAX = 'calling.receive_fax' SEND_FAX = 'calling.send_fax' SEND_DIGITS = 'calling.send_digits' TAP = 'calling.tap' DETECT = 'calling.detect' PLAY_AND_COLLECT = 'calling.play_and_collect' class Notification: STATE = 'calling.call.state' CONNECT = 'calling.call.connect' RECORD = 'calling.call.record' PLAY = 'calling.call.play' COLLECT = 'calling.call.collect' RECEIVE = 'calling.call.receive' FAX = 'calling.call.fax' DETECT = 'calling.call.detect' TAP = 'calling.call.tap' SEND_DIGITS = 'calling.call.send_digits' class CallState: ALL = ['created', 'ringing', 'answered', 'ending', 'ended'] NONE = 'none' CREATED = 'created' RINGING = 'ringing' ANSWERED = 'answered' ENDING = 'ending' ENDED = 'ended' class ConnectState: DISCONNECTED = 'disconnected' CONNECTING = 'connecting' CONNECTED = 'connected' FAILED = 'failed' class DisconnectReason: ERROR = 'error' BUSY = 'busy' class CallPlayState: PLAYING = 'playing' ERROR = 'error' FINISHED = 'finished' class PromptState: ERROR = 'error' NO_INPUT = 'no_input' NO_MATCH = 'no_match' DIGIT = 'digit' SPEECH = 'speech' class MediaType: AUDIO = 'audio' TTS = 'tts' SILENCE = 'silence' RINGTONE = 'ringtone' class CallRecordState: RECORDING = 'recording' NO_INPUT = 'no_input' FINISHED = 'finished' class RecordType: AUDIO = 'audio' class CallFaxState: PAGE = 'page' ERROR = 'error' FINISHED = 'finished' class CallSendDigitsState: FINISHED = 'finished' class CallTapState: TAPPING = 'tapping' FINISHED = 'finished' class TapType: AUDIO = 'audio' class DetectType: FAX = 'fax' MACHINE = 'machine' DIGIT = 'digit' class DetectState: ERROR = 'error' FINISHED = 'finished' CED = 'CED' CNG = 'CNG' MACHINE = 'MACHINE' HUMAN = 'HUMAN' UNKNOWN = 'UNKNOWN' READY = 'READY' NOT_READY = 'NOT_READY'
class Method: begin = 'calling.begin' answer = 'calling.answer' end = 'calling.end' connect = 'calling.connect' disconnect = 'calling.disconnect' play = 'calling.play' record = 'calling.record' receive_fax = 'calling.receive_fax' send_fax = 'calling.send_fax' send_digits = 'calling.send_digits' tap = 'calling.tap' detect = 'calling.detect' play_and_collect = 'calling.play_and_collect' class Notification: state = 'calling.call.state' connect = 'calling.call.connect' record = 'calling.call.record' play = 'calling.call.play' collect = 'calling.call.collect' receive = 'calling.call.receive' fax = 'calling.call.fax' detect = 'calling.call.detect' tap = 'calling.call.tap' send_digits = 'calling.call.send_digits' class Callstate: all = ['created', 'ringing', 'answered', 'ending', 'ended'] none = 'none' created = 'created' ringing = 'ringing' answered = 'answered' ending = 'ending' ended = 'ended' class Connectstate: disconnected = 'disconnected' connecting = 'connecting' connected = 'connected' failed = 'failed' class Disconnectreason: error = 'error' busy = 'busy' class Callplaystate: playing = 'playing' error = 'error' finished = 'finished' class Promptstate: error = 'error' no_input = 'no_input' no_match = 'no_match' digit = 'digit' speech = 'speech' class Mediatype: audio = 'audio' tts = 'tts' silence = 'silence' ringtone = 'ringtone' class Callrecordstate: recording = 'recording' no_input = 'no_input' finished = 'finished' class Recordtype: audio = 'audio' class Callfaxstate: page = 'page' error = 'error' finished = 'finished' class Callsenddigitsstate: finished = 'finished' class Calltapstate: tapping = 'tapping' finished = 'finished' class Taptype: audio = 'audio' class Detecttype: fax = 'fax' machine = 'machine' digit = 'digit' class Detectstate: error = 'error' finished = 'finished' ced = 'CED' cng = 'CNG' machine = 'MACHINE' human = 'HUMAN' unknown = 'UNKNOWN' ready = 'READY' not_ready = 'NOT_READY'
construction = ['Owner Authorization', 'Bidding & Contract Documents', 'Plans', 'Spedifications', 'Addenda', 'Submittals', 'Shop Drawings', 'Bonds', 'Insurance Certificates', 'Design Clarifications', 'Baseline Schedule', 'Schedule Revisions', 'Permits', 'Meeting Minutes', 'Payment Requests', 'Correspondence', 'Progress Reports', 'Progress Photographs', 'Change Orders', 'Substantial Completion', 'Punch List - Final Completion', 'Certificate of Occupancy', 'Maintenance & Operating Manuals', 'Guarantees - Warrantees', 'As-Built Documents', 'Reporting', 'Budget']
construction = ['Owner Authorization', 'Bidding & Contract Documents', 'Plans', 'Spedifications', 'Addenda', 'Submittals', 'Shop Drawings', 'Bonds', 'Insurance Certificates', 'Design Clarifications', 'Baseline Schedule', 'Schedule Revisions', 'Permits', 'Meeting Minutes', 'Payment Requests', 'Correspondence', 'Progress Reports', 'Progress Photographs', 'Change Orders', 'Substantial Completion', 'Punch List - Final Completion', 'Certificate of Occupancy', 'Maintenance & Operating Manuals', 'Guarantees - Warrantees', 'As-Built Documents', 'Reporting', 'Budget']
#python program to display odd numbers print("Odd numbers are as follows") for i in range(1,100,2): print(i) print("End of the program")
print('Odd numbers are as follows') for i in range(1, 100, 2): print(i) print('End of the program')
#!/usr/bin/python3 def img_splitter(img): img_lines = img.splitlines() longest = 0 for ind, line in enumerate(img_lines): if line == "": img_lines.pop(ind) if len(line) > longest: longest = len(line) for line in img_lines: if len(line) < longest: line.format(n=longest, c=" ") return img_lines def encrypt(): imgList = [] letterDICT = {'A': path + 'A.txt', 'B': path + 'B.txt', 'C': path + 'C.txt', 'D': path + 'D.txt', 'E': path + 'E.txt', 'F': path + 'F.txt', 'G': path + 'G.txt', 'H': path + 'H.txt', 'I': path + 'I.txt', 'J': path + 'J.txt', 'K': path + 'K.txt', 'L': path + 'L.txt', 'M': path + 'M.txt', 'N': path + 'N.txt', 'O': path + 'O.txt', 'P': path + 'P.txt', 'Q': path + 'Q.txt', 'R': path + 'R.txt', 'S': path + 'S.txt', 'T': path + 'T.txt', 'U': path + 'U.txt', 'V': path + 'V.txt', 'W': path + 'W.txt', 'X': path + 'X.txt', 'Y': path + 'Y.txt', 'Z': path + 'Z.txt'} letterScan = list(engLetters) for alphabet in letterScan: if alphabet in letterDICT: txtScan = letterDICT[alphabet] with open(txtScan, 'r') as fr: data = fr.read() imgList.append(img_splitter(data)) numLetters = len(imgList) zipped = zip(*imgList) for line in zipped: match numLetters: case 1: print(line[0]) case 2: print(line[0], line[1]) case 3: print(line[0], line[1], line[2]) case 4: print(line[0], line[1], line[2], line[3]) case 5: print(line[0], line[1], line[2], line[3], line[4]) case 6: print(line[0], line[1], line[2], line[3], line[4], line[5]) case 7: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6]) case 8: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7]) case 9: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8]) case 10: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9]) case 11: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10]) case 12: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10], line[11]) case 13: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10], line[11], line[12]) case 14: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10], line[11], line[12], line[13]) print('\n') path = 'ASCII arts/' message = input("What is your name: ") engLetters = message.upper() encrypt() vm = path + "vending_machine.txt" with open(vm, 'r') as fr: print(fr.read(), end='\n') exchange = input("Would you like something to drink? Enter Y/N ") if exchange.upper() == 'Y': print("Sorry the machine is being hacked by the Aliens") print("They want to know your choice by using their language") decision = input("Would you like do use the decoder to purchase the drink [Y/N]") if decision.upper() == 'N': message = "bye" engLetters = message.upper() print(message) encrypt() elif decision.upper() == 'Y': bev_choice = input("Enter you drink types [coke], [sprite], [fanta], [water], and [lemonade]") bev_choice = bev_choice.upper() engLetters = bev_choice encrypt() bev_dict = {'COKE': path + "coke.txt", 'SPRITE': path + 'sprite.txt', 'FANTA': path + 'fanta.txt', 'WATER': path + 'water.txt', 'LEMONADE': path + 'lemonade.txt'} if bev_choice in bev_dict: bevtxt = bev_dict[bev_choice] print("Getting your item... please wait...") with open(str(bevtxt), "r") as bf: # indent to keep the building object open # loop across the lines in the file for svr in bf: # print and end without a newline print(svr, end="") print() print("Here you go! Enjoy it!") print("Thanks for purchasing! ") elif exchange.upper() == 'N': print("Please Come back when you are thirsty")
def img_splitter(img): img_lines = img.splitlines() longest = 0 for (ind, line) in enumerate(img_lines): if line == '': img_lines.pop(ind) if len(line) > longest: longest = len(line) for line in img_lines: if len(line) < longest: line.format(n=longest, c=' ') return img_lines def encrypt(): img_list = [] letter_dict = {'A': path + 'A.txt', 'B': path + 'B.txt', 'C': path + 'C.txt', 'D': path + 'D.txt', 'E': path + 'E.txt', 'F': path + 'F.txt', 'G': path + 'G.txt', 'H': path + 'H.txt', 'I': path + 'I.txt', 'J': path + 'J.txt', 'K': path + 'K.txt', 'L': path + 'L.txt', 'M': path + 'M.txt', 'N': path + 'N.txt', 'O': path + 'O.txt', 'P': path + 'P.txt', 'Q': path + 'Q.txt', 'R': path + 'R.txt', 'S': path + 'S.txt', 'T': path + 'T.txt', 'U': path + 'U.txt', 'V': path + 'V.txt', 'W': path + 'W.txt', 'X': path + 'X.txt', 'Y': path + 'Y.txt', 'Z': path + 'Z.txt'} letter_scan = list(engLetters) for alphabet in letterScan: if alphabet in letterDICT: txt_scan = letterDICT[alphabet] with open(txtScan, 'r') as fr: data = fr.read() imgList.append(img_splitter(data)) num_letters = len(imgList) zipped = zip(*imgList) for line in zipped: match numLetters: case 1: print(line[0]) case 2: print(line[0], line[1]) case 3: print(line[0], line[1], line[2]) case 4: print(line[0], line[1], line[2], line[3]) case 5: print(line[0], line[1], line[2], line[3], line[4]) case 6: print(line[0], line[1], line[2], line[3], line[4], line[5]) case 7: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6]) case 8: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7]) case 9: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8]) case 10: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9]) case 11: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10]) case 12: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10], line[11]) case 13: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10], line[11], line[12]) case 14: print(line[0], line[1], line[2], line[3], line[4], line[5], line[6].line[7], line[8], line[9], line[10], line[11], line[12], line[13]) print('\n') path = 'ASCII arts/' message = input('What is your name: ') eng_letters = message.upper() encrypt() vm = path + 'vending_machine.txt' with open(vm, 'r') as fr: print(fr.read(), end='\n') exchange = input('Would you like something to drink? Enter Y/N ') if exchange.upper() == 'Y': print('Sorry the machine is being hacked by the Aliens') print('They want to know your choice by using their language') decision = input('Would you like do use the decoder to purchase the drink [Y/N]') if decision.upper() == 'N': message = 'bye' eng_letters = message.upper() print(message) encrypt() elif decision.upper() == 'Y': bev_choice = input('Enter you drink types [coke], [sprite], [fanta], [water], and [lemonade]') bev_choice = bev_choice.upper() eng_letters = bev_choice encrypt() bev_dict = {'COKE': path + 'coke.txt', 'SPRITE': path + 'sprite.txt', 'FANTA': path + 'fanta.txt', 'WATER': path + 'water.txt', 'LEMONADE': path + 'lemonade.txt'} if bev_choice in bev_dict: bevtxt = bev_dict[bev_choice] print('Getting your item... please wait...') with open(str(bevtxt), 'r') as bf: for svr in bf: print(svr, end='') print() print('Here you go! Enjoy it!') print('Thanks for purchasing! ') elif exchange.upper() == 'N': print('Please Come back when you are thirsty')
class BinaryMatrix(object): def __init__(self, mat): self.mat = mat def get(self, x: int, y: int) -> int: return self.mat[x][y] def dimensions(self): n = len(self.mat) m = len(self.mat[0]) return n, m class Solution: def leftMostColumnWithOne(self, binaryMatrix: 'BinaryMatrix') -> int: n, m = binaryMatrix.dimensions() res = float('inf') for i in range(n): low = 0 high = m - 1 while low + 1 < high: mid = low + (high - low) // 2 if binaryMatrix.get(i, mid) == 1: high = mid else: low = mid if binaryMatrix.get(i, low) == 1: res = min(res, low) elif binaryMatrix.get(i, high) == 1: res = min(res, high) return res if __name__ == '__main__': s = Solution() mat = [[0,0,0,1],[0,0,1,1],[0,1,1,1]] matrix = BinaryMatrix(mat) res = s.leftMostColumnWithOne(matrix) print(res)
class Binarymatrix(object): def __init__(self, mat): self.mat = mat def get(self, x: int, y: int) -> int: return self.mat[x][y] def dimensions(self): n = len(self.mat) m = len(self.mat[0]) return (n, m) class Solution: def left_most_column_with_one(self, binaryMatrix: 'BinaryMatrix') -> int: (n, m) = binaryMatrix.dimensions() res = float('inf') for i in range(n): low = 0 high = m - 1 while low + 1 < high: mid = low + (high - low) // 2 if binaryMatrix.get(i, mid) == 1: high = mid else: low = mid if binaryMatrix.get(i, low) == 1: res = min(res, low) elif binaryMatrix.get(i, high) == 1: res = min(res, high) return res if __name__ == '__main__': s = solution() mat = [[0, 0, 0, 1], [0, 0, 1, 1], [0, 1, 1, 1]] matrix = binary_matrix(mat) res = s.leftMostColumnWithOne(matrix) print(res)
USER_AGENTS = [ ( "Mozilla/5.0 (X11; Linux x86_64) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/57.0.2987.110 " "Safari/537.36" ), # chrome ( "Mozilla/5.0 (X11; Linux x86_64) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/61.0.3163.79 " "Safari/537.36" ), # chrome ( "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) " "Gecko/20100101 " "Firefox/55.0" ), # firefox ( "Mozilla/5.0 (X11; Linux x86_64) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/61.0.3163.91 " "Safari/537.36" ), # chrome ( "Mozilla/5.0 (X11; Linux x86_64) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/62.0.3202.89 " "Safari/537.36" ), # chrome ( "Mozilla/5.0 (X11; Linux x86_64) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/63.0.3239.108 " "Safari/537.36" ), # chrome ] BaseURL = "https://azemikalaw.com/" # BaseURL = "https://forum.mobilism.org/viewtopic.php?f=399&t=3558945" WEB_DRIVER_PATH = "/usr/bin/firefox-dev"
user_agents = ['Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36'] base_url = 'https://azemikalaw.com/' web_driver_path = '/usr/bin/firefox-dev'
# Block No 99997 # Block Bits 453281356 # Difficulty 14,484.16 _bits = input("* block's BITS ? : "); hexBits = hex(int(_bits)); _hexHead = hexBits[:4]; _hexTail = '0x'+hexBits[4:]; print("- BITS in hexadecimal : ", hexBits); print(" ", _hexHead); print(" ", _hexTail); # print hex(int("0xAD4", 16) + int("0x200", 16)) # 0xcd4 max_difficulty = hex(0x00000000FFFF0000000000000000000000000000000000000000000000000000); cur_difficulty = hex(int(_hexTail, 16)*2**(8*(int(_hexHead, 16)-3))); print("- maximum difficulty : ", max_difficulty); print("- this block's difficulty : ", cur_difficulty); print("- this block's NONCE : ", (int(max_difficulty, 16)/int(cur_difficulty, 16)));
_bits = input("* block's BITS ? : ") hex_bits = hex(int(_bits)) _hex_head = hexBits[:4] _hex_tail = '0x' + hexBits[4:] print('- BITS in hexadecimal : ', hexBits) print(' ', _hexHead) print(' ', _hexTail) max_difficulty = hex(26959535291011309493156476344723991336010898738574164086137773096960) cur_difficulty = hex(int(_hexTail, 16) * 2 ** (8 * (int(_hexHead, 16) - 3))) print('- maximum difficulty : ', max_difficulty) print("- this block's difficulty : ", cur_difficulty) print("- this block's NONCE : ", int(max_difficulty, 16) / int(cur_difficulty, 16))
class BaseConfig: SECRET_KEY = None class DevelopmentConfig(BaseConfig): FLASK_ENV="development" class ProductionConfig(BaseConfig): FLASK_ENV="production"
class Baseconfig: secret_key = None class Developmentconfig(BaseConfig): flask_env = 'development' class Productionconfig(BaseConfig): flask_env = 'production'
class Analyzer(): ''' Analyzer holds image data, hooks to pre-processed and intermediate data and the methods to analyze and output visualizations start: 2017-05-27, Nathan Ing ''' def __init__(self): pass
class Analyzer: """ Analyzer holds image data, hooks to pre-processed and intermediate data and the methods to analyze and output visualizations start: 2017-05-27, Nathan Ing """ def __init__(self): pass
arr = [] for i in range(5): dum = list(map(int, input().split())) arr.append(dum) def sol(arr): for i in range(5): for j in range(5): if arr[i][j] == 1: return abs(2-i) + abs(2-j) print(sol(arr))
arr = [] for i in range(5): dum = list(map(int, input().split())) arr.append(dum) def sol(arr): for i in range(5): for j in range(5): if arr[i][j] == 1: return abs(2 - i) + abs(2 - j) print(sol(arr))
# coding: utf-8 # This example is the python implementation of nowait.1.f from OpenMP 4.5 examples n = 100 m = 100 a = zeros(n, double) b = zeros(n, double) y = zeros(m, double) z = zeros(m, double) #$ omp parallel #$ omp do schedule(runtime) for i in range(0, m): z[i] = i*1.0 #$ omp end do nowait #$ omp do for i in range(1, n): b[i] = (a[i] + a[i-1]) / 2.0 #$ omp end do nowait #$ omp do for i in range(1, m): y[i] = sqrt(z[i]) #$ omp end do nowait #$ omp end parallel
n = 100 m = 100 a = zeros(n, double) b = zeros(n, double) y = zeros(m, double) z = zeros(m, double) for i in range(0, m): z[i] = i * 1.0 for i in range(1, n): b[i] = (a[i] + a[i - 1]) / 2.0 for i in range(1, m): y[i] = sqrt(z[i])
#!/usr/bin/env python3v ## create file object in "r"ead mode filename = input("Name of file: ") with open(f"{filename}", "r") as configfile: ## readlines() creates a list by reading target ## file line by line configlist = configfile.readlines() ## file was just auto closed (no more indenting) ## each item of the list now has the "\n" characters back print(configlist) num_lines = len(configlist) print(f"Using the len() function, we see there are: {num_lines} line")
filename = input('Name of file: ') with open(f'{filename}', 'r') as configfile: configlist = configfile.readlines() print(configlist) num_lines = len(configlist) print(f'Using the len() function, we see there are: {num_lines} line')
execfile('ex-3.02.py') assert dtype.size == MPI.DOUBLE.size + MPI.CHAR.size assert dtype.extent >= dtype.size dtype.Free()
execfile('ex-3.02.py') assert dtype.size == MPI.DOUBLE.size + MPI.CHAR.size assert dtype.extent >= dtype.size dtype.Free()
class Solution: def largestBSTSubtree(self, root: TreeNode) -> int: return self._post_order(root)[0] def _post_order(self, root): if not root: return 0, True, None, None if not root.left and not root.right: return 1, True, root.val, root.val ln, lbst, lmin, lmax = self._post_order(root.left) rn, rbst, rmin, rmax = self._post_order(root.right) if not lbst or not rbst or (lmax and root.val <= lmax) or (rmin and root.val >= rmin): return max(ln, rn), False, None, None return ln + rn + 1, True, lmin if lmin else root.val, rmax if rmax else root.val
class Solution: def largest_bst_subtree(self, root: TreeNode) -> int: return self._post_order(root)[0] def _post_order(self, root): if not root: return (0, True, None, None) if not root.left and (not root.right): return (1, True, root.val, root.val) (ln, lbst, lmin, lmax) = self._post_order(root.left) (rn, rbst, rmin, rmax) = self._post_order(root.right) if not lbst or not rbst or (lmax and root.val <= lmax) or (rmin and root.val >= rmin): return (max(ln, rn), False, None, None) return (ln + rn + 1, True, lmin if lmin else root.val, rmax if rmax else root.val)
# print function range value for value in range(1, 5): print(value) numbers = list(range(1, 6)) print(numbers) even_numbers = list(range(2, 11)) print(even_numbers)
for value in range(1, 5): print(value) numbers = list(range(1, 6)) print(numbers) even_numbers = list(range(2, 11)) print(even_numbers)
def is_odd(n): return n % 2 == 1 def is_weird(n): if is_odd(n): return True else: # n is even if 2 <= n <= 5: return False elif 6 <= n <= 20: return True elif 20 < n: return False n = int(input()) if (is_weird(n)): print("Weird") else: print("Not Weird")
def is_odd(n): return n % 2 == 1 def is_weird(n): if is_odd(n): return True elif 2 <= n <= 5: return False elif 6 <= n <= 20: return True elif 20 < n: return False n = int(input()) if is_weird(n): print('Weird') else: print('Not Weird')
class calculos(): def __init__(self): self.funcoes = { "soma": self.soma, "subtracao": self.subtracao, "multiplicacao": self.multiplicacao, "divisao": self.divisao, "quadrado": self.quadrado, "raiz_quadrada": self.raiz_quadrada, "porcentagem": self.porcentagem } def soma(self, x, y): return x + y def subtracao(self, x, y): return x - y def multiplicacao(self, x, y): return x * y def divisao(self, x, y): return x / y def quadrado(self, x): return x ** 2 def raiz_quadrada(self, x): return x ** (1/2) def porcentagem(self, x, y): return (x * y) / 100 if __name__ == '__main__': calculos = calculos() resultado = calculos.funcoes['soma'](1, 4) print(resultado)
class Calculos: def __init__(self): self.funcoes = {'soma': self.soma, 'subtracao': self.subtracao, 'multiplicacao': self.multiplicacao, 'divisao': self.divisao, 'quadrado': self.quadrado, 'raiz_quadrada': self.raiz_quadrada, 'porcentagem': self.porcentagem} def soma(self, x, y): return x + y def subtracao(self, x, y): return x - y def multiplicacao(self, x, y): return x * y def divisao(self, x, y): return x / y def quadrado(self, x): return x ** 2 def raiz_quadrada(self, x): return x ** (1 / 2) def porcentagem(self, x, y): return x * y / 100 if __name__ == '__main__': calculos = calculos() resultado = calculos.funcoes['soma'](1, 4) print(resultado)
# Print the list created by using list comprehension names = ['George', 'Harry', 'Weasely', 'Ron', 'Potter', 'Hermione'] best_list = [name for name in names if len(name) >= 6] print(best_list) # Range Objects # Create a range object that goes from 0 to 5 nums = range(6) print(type(nums)) # Convert nums to a list nums_list = list(nums) print(nums_list) # Create a new list of odd numbers from 1 to 11 by unpacking a range object nums_list2 = [*range(1,12,2)] # This unpacks the range object to a list print(nums_list2) # Enumerate Objects names = ['Jerry', 'Kramer', 'Elaine', 'George', 'Newman'] # Rewrite the for loop to use enumerate indexed_names = [] for i,name in enumerate(names): index_name = (i,name) indexed_names.append(index_name) print(indexed_names) # Rewrite the above for loop using list comprehension indexed_names_comp = [(i,name) for i,name in enumerate(names)] print(indexed_names_comp) # Unpack an enumerate object with a starting index of one indexed_names_unpack = [*enumerate(names, start=1)] print(indexed_names_unpack) # Map Objects # Use map to apply str.upper to each element in names names_map = map(str.upper, names) # Print the type of the names_map print(type(names_map)) # Unpack names_map into a list names_uppercase = [*names_map] # Print the list created above print(names_uppercase)
names = ['George', 'Harry', 'Weasely', 'Ron', 'Potter', 'Hermione'] best_list = [name for name in names if len(name) >= 6] print(best_list) nums = range(6) print(type(nums)) nums_list = list(nums) print(nums_list) nums_list2 = [*range(1, 12, 2)] print(nums_list2) names = ['Jerry', 'Kramer', 'Elaine', 'George', 'Newman'] indexed_names = [] for (i, name) in enumerate(names): index_name = (i, name) indexed_names.append(index_name) print(indexed_names) indexed_names_comp = [(i, name) for (i, name) in enumerate(names)] print(indexed_names_comp) indexed_names_unpack = [*enumerate(names, start=1)] print(indexed_names_unpack) names_map = map(str.upper, names) print(type(names_map)) names_uppercase = [*names_map] print(names_uppercase)
# -*- coding:utf-8 -*- def read_files(path): file = open(path, 'r+') str_ = file.read() print(str_) file.close()
def read_files(path): file = open(path, 'r+') str_ = file.read() print(str_) file.close()
for a in range (2,21): if a > 1: for i in range(2,a): if (a % i) == 0: break else: print(a)
for a in range(2, 21): if a > 1: for i in range(2, a): if a % i == 0: break else: print(a)
#!/usr/bin/env python3 # Simple data processing, extraction of GPGGA and GPRMC entries # Source filename FILENAME = "../data/GNSS_34_2020-02-23_16-20-44.txt" # Output filename OUTFILE = "../output/track.nmea" if __name__ == "__main__": outfile = open(OUTFILE, 'w') with open(FILENAME, 'r') as f: for line in f.readlines(): try: data = line.split(';')[1].strip() if data.startswith("$GPGGA") or data.startswith("$GPRMC"): print(data) outfile.write(data + '\n') except: pass outfile.close() f.close()
filename = '../data/GNSS_34_2020-02-23_16-20-44.txt' outfile = '../output/track.nmea' if __name__ == '__main__': outfile = open(OUTFILE, 'w') with open(FILENAME, 'r') as f: for line in f.readlines(): try: data = line.split(';')[1].strip() if data.startswith('$GPGGA') or data.startswith('$GPRMC'): print(data) outfile.write(data + '\n') except: pass outfile.close() f.close()
registry = {} def unmarshal(typestr, x): try: unmarshaller = registry[typestr] except KeyError: raise TypeError("No unmarshaller registered for '{}'".format(typestr)) return unmarshaller(x) def register(typestr, unmarshaller): if typestr in registry: raise NameError( "An unmarshaller is already registered for '{}'".format(typestr) ) registry[typestr] = unmarshaller def identity(x): return x def astype(typ): "Unmarshal by casting into ``typ``, if not already an instance of ``typ``" def unmarshaller(x): return typ(x) if not isinstance(x, typ) else x return unmarshaller def unpack_into(typ): "Unmarshal by unpacking a dict into the constructor for ``typ``" def unmarshaller(x): return typ(**x) return unmarshaller __all__ = ["unmarshal", "register", "identity", "unpack_into"]
registry = {} def unmarshal(typestr, x): try: unmarshaller = registry[typestr] except KeyError: raise type_error("No unmarshaller registered for '{}'".format(typestr)) return unmarshaller(x) def register(typestr, unmarshaller): if typestr in registry: raise name_error("An unmarshaller is already registered for '{}'".format(typestr)) registry[typestr] = unmarshaller def identity(x): return x def astype(typ): """Unmarshal by casting into ``typ``, if not already an instance of ``typ``""" def unmarshaller(x): return typ(x) if not isinstance(x, typ) else x return unmarshaller def unpack_into(typ): """Unmarshal by unpacking a dict into the constructor for ``typ``""" def unmarshaller(x): return typ(**x) return unmarshaller __all__ = ['unmarshal', 'register', 'identity', 'unpack_into']
def play(n=None): if n is None: while True: try: n = int(input('Input the grid size: ')) except ValueError: print('Invalid input') continue if n <= 0: print('Invalid input') continue break grids = [[0]*n for _ in range(n)] user = 1 print('Current board:') print(*grids, sep='\n') while True: user_input = get_input(user, grids, n) place_piece(user_input, user, grids) print('Current board:') print(*grids, sep='\n') if check_won(user_input, user, n, grids): print('Player', user, 'has won') return if not any(0 in grid for grid in grids): return user = 2 if user == 1 else 1 def get_input(user, grids, n): instr = 'Input a slot player {0} from 1 to {1}: '.format(user, n) while True: try: user_input = int(input(instr)) except ValueError: print('invalid input:', user_input) continue if 0 > user_input or user_input > n+1: print('invalid input:', user_input) elif grids[0][user_input-1] != 0: print('slot', user_input, 'is full try again') else: return user_input-1 def place_piece(user_input, user, grids): for grid in grids[::-1]: if not grid[user_input]: grid[user_input] = user return # def check_won(user_input, user, n, grids): # column = [i[user_input] for i in grids] # print("column") # print(column) # if grids[user_input].count(user) == 4: # print("aaaa"+ grids[user_input]) # return True # index = 0 # for i in column: # if i == 0: # index += 1 # print(index) # print("index: "+str(index)) # if column.count(user) == 4: # return True #play()
def play(n=None): if n is None: while True: try: n = int(input('Input the grid size: ')) except ValueError: print('Invalid input') continue if n <= 0: print('Invalid input') continue break grids = [[0] * n for _ in range(n)] user = 1 print('Current board:') print(*grids, sep='\n') while True: user_input = get_input(user, grids, n) place_piece(user_input, user, grids) print('Current board:') print(*grids, sep='\n') if check_won(user_input, user, n, grids): print('Player', user, 'has won') return if not any((0 in grid for grid in grids)): return user = 2 if user == 1 else 1 def get_input(user, grids, n): instr = 'Input a slot player {0} from 1 to {1}: '.format(user, n) while True: try: user_input = int(input(instr)) except ValueError: print('invalid input:', user_input) continue if 0 > user_input or user_input > n + 1: print('invalid input:', user_input) elif grids[0][user_input - 1] != 0: print('slot', user_input, 'is full try again') else: return user_input - 1 def place_piece(user_input, user, grids): for grid in grids[::-1]: if not grid[user_input]: grid[user_input] = user return
def get_rate(numbers, is_o2): nb_bits = len(numbers[0]) assert all([len(n) == nb_bits for n in numbers]) current_numbers = [n for n in numbers] i = 0 while len(current_numbers) > 1: nb_ones = sum([elem[i] == '1' for elem in current_numbers]) nb_zeros = sum([elem[i] == '0' for elem in current_numbers]) bit_o2 = '1' if nb_ones >= nb_zeros else '0' bit_co2 = '0' if nb_zeros <= nb_ones else '1' bit = bit_o2 if is_o2 else bit_co2 current_numbers = [n for n in current_numbers if n[i] == bit] i += 1 assert(1 == len(current_numbers)) result = int(current_numbers[0], base=2) return result def get_life_support(numbers): o2_rate = get_rate(numbers, is_o2=True) co2_rate = get_rate(numbers, is_o2=False) result = o2_rate * co2_rate return result if __name__ == '__main__': input_filename = 'input.txt' # input_filename = 'sample-input.txt' with open(input_filename, 'r') as input_file: fc = input_file.read() split = fc.split() print(get_life_support(split))
def get_rate(numbers, is_o2): nb_bits = len(numbers[0]) assert all([len(n) == nb_bits for n in numbers]) current_numbers = [n for n in numbers] i = 0 while len(current_numbers) > 1: nb_ones = sum([elem[i] == '1' for elem in current_numbers]) nb_zeros = sum([elem[i] == '0' for elem in current_numbers]) bit_o2 = '1' if nb_ones >= nb_zeros else '0' bit_co2 = '0' if nb_zeros <= nb_ones else '1' bit = bit_o2 if is_o2 else bit_co2 current_numbers = [n for n in current_numbers if n[i] == bit] i += 1 assert 1 == len(current_numbers) result = int(current_numbers[0], base=2) return result def get_life_support(numbers): o2_rate = get_rate(numbers, is_o2=True) co2_rate = get_rate(numbers, is_o2=False) result = o2_rate * co2_rate return result if __name__ == '__main__': input_filename = 'input.txt' with open(input_filename, 'r') as input_file: fc = input_file.read() split = fc.split() print(get_life_support(split))
# Returns the sum of all multipliers of x for numbers from 1 to end. def sumOfMultipliers(end, x): n = end / x return (n * (n + 1) / 2) * x end = 999 # below 1000 x = 3 y = 5 # We have to subtract one sum of the multipliers of x * y because these multipliers take part in both of the sums of the multipliers of x and y and hence contribute twice in the final sum. sum = sumOfMultipliers(end, x) + sumOfMultipliers(end, y) - sumOfMultipliers(end, x * y) print(sum)
def sum_of_multipliers(end, x): n = end / x return n * (n + 1) / 2 * x end = 999 x = 3 y = 5 sum = sum_of_multipliers(end, x) + sum_of_multipliers(end, y) - sum_of_multipliers(end, x * y) print(sum)
def cmdissue(toissue, activesession): ssh_stdin, ssh_stdout, ssh_stderr = activesession.exec_command(toissue) return ssh_stdout.read().decode('UTF-8') def commands_list(sshsession, commands): for x in commands: ## call our imported function and save the value returned resp = cmdissue(x, sshsession) ## if returned response is not null, print it out if resp != "": print(resp)
def cmdissue(toissue, activesession): (ssh_stdin, ssh_stdout, ssh_stderr) = activesession.exec_command(toissue) return ssh_stdout.read().decode('UTF-8') def commands_list(sshsession, commands): for x in commands: resp = cmdissue(x, sshsession) if resp != '': print(resp)
List1 = [] List2 = [] List3 = [] List4 = [] List5 = [13,31,2,19,96] statusList1 = 0 while statusList1 < 13: inputList1 = str(input("Masukkan hewan bersayap : ")) statusList1 += 1 List1.append(inputList1) print() statusList2 = 0 while statusList2 < 5: inputList2 = str(input("Masukkan hewan berkaki 2 : ")) statusList2 += 1 List2.append(inputList2) print() statusList3 = 0 while statusList3 < 5: inputList3 = str(input("Masukkan nama teman terdekat anda : ")) statusList3 += 1 List3.append(inputList3) print() statusList4 = 0 while statusList4 < 5: inputList4 = int(input("Masukkan tanggal lahir teman tersebut : ")) statusList4 += 1 List4.append(inputList4) print(List1[0:5]+List4,'\n') List3[4] = 'Rio' print(List3,'\n') tempList5 = List5.copy() del tempList5[4] del tempList5[2] print(tempList5,'\n') print(List4 + List5) print("Nilai Max dari List 4 dan List 5 adalah",max(List4 + List5)) print("Nilai Min dari List 4 dan List 5 adalah",min(List4 + List5))
list1 = [] list2 = [] list3 = [] list4 = [] list5 = [13, 31, 2, 19, 96] status_list1 = 0 while statusList1 < 13: input_list1 = str(input('Masukkan hewan bersayap : ')) status_list1 += 1 List1.append(inputList1) print() status_list2 = 0 while statusList2 < 5: input_list2 = str(input('Masukkan hewan berkaki 2 : ')) status_list2 += 1 List2.append(inputList2) print() status_list3 = 0 while statusList3 < 5: input_list3 = str(input('Masukkan nama teman terdekat anda : ')) status_list3 += 1 List3.append(inputList3) print() status_list4 = 0 while statusList4 < 5: input_list4 = int(input('Masukkan tanggal lahir teman tersebut : ')) status_list4 += 1 List4.append(inputList4) print(List1[0:5] + List4, '\n') List3[4] = 'Rio' print(List3, '\n') temp_list5 = List5.copy() del tempList5[4] del tempList5[2] print(tempList5, '\n') print(List4 + List5) print('Nilai Max dari List 4 dan List 5 adalah', max(List4 + List5)) print('Nilai Min dari List 4 dan List 5 adalah', min(List4 + List5))
class dataStore: dataList=[] symbolList=[] optionList=[] def __init__(self): self.dataList=[] self.symbolList=[] self.optionList=[] def reset(self): self.dataList=[] self.symbolList=[] self.optionList=[]
class Datastore: data_list = [] symbol_list = [] option_list = [] def __init__(self): self.dataList = [] self.symbolList = [] self.optionList = [] def reset(self): self.dataList = [] self.symbolList = [] self.optionList = []
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # @author jsbxyyx # @since 1.0 class MessageType(object): TYPE_GLOBAL_BEGIN = 1 TYPE_GLOBAL_BEGIN_RESULT = 2 TYPE_GLOBAL_COMMIT = 7 TYPE_GLOBAL_COMMIT_RESULT = 8 TYPE_GLOBAL_ROLLBACK = 9 TYPE_GLOBAL_ROLLBACK_RESULT = 10 TYPE_GLOBAL_STATUS = 15 TYPE_GLOBAL_STATUS_RESULT = 16 TYPE_GLOBAL_REPORT = 17 TYPE_GLOBAL_REPORT_RESULT = 18 TYPE_GLOBAL_LOCK_QUERY = 21 TYPE_GLOBAL_LOCK_QUERY_RESULT = 22 TYPE_BRANCH_COMMIT = 3 TYPE_BRANCH_COMMIT_RESULT = 4 TYPE_BRANCH_ROLLBACK = 5 TYPE_BRANCH_ROLLBACK_RESULT = 6 TYPE_BRANCH_REGISTER = 11 TYPE_BRANCH_REGISTER_RESULT = 12 TYPE_BRANCH_STATUS_REPORT = 13 TYPE_BRANCH_STATUS_REPORT_RESULT = 14 TYPE_SEATA_MERGE = 59 TYPE_SEATA_MERGE_RESULT = 60 TYPE_REG_CLT = 101 TYPE_REG_CLT_RESULT = 102 TYPE_REG_RM = 103 TYPE_REG_RM_RESULT = 104 TYPE_RM_DELETE_UNDOLOG = 111 TYPE_HEARTBEAT_MSG = 120 def __init__(self): pass
class Messagetype(object): type_global_begin = 1 type_global_begin_result = 2 type_global_commit = 7 type_global_commit_result = 8 type_global_rollback = 9 type_global_rollback_result = 10 type_global_status = 15 type_global_status_result = 16 type_global_report = 17 type_global_report_result = 18 type_global_lock_query = 21 type_global_lock_query_result = 22 type_branch_commit = 3 type_branch_commit_result = 4 type_branch_rollback = 5 type_branch_rollback_result = 6 type_branch_register = 11 type_branch_register_result = 12 type_branch_status_report = 13 type_branch_status_report_result = 14 type_seata_merge = 59 type_seata_merge_result = 60 type_reg_clt = 101 type_reg_clt_result = 102 type_reg_rm = 103 type_reg_rm_result = 104 type_rm_delete_undolog = 111 type_heartbeat_msg = 120 def __init__(self): pass
def scoreOfParentheses(S): total = 0 cur = 0 for i in range(len(S)): if S[i] == "(": cur += 1 elif S[i] == ")": cur -= 1 if S[i-1] == "(": total += 2**cur return total print(scoreOfParentheses("()")) # 1 print(scoreOfParentheses("()()")) # 2 print(scoreOfParentheses("((()))")) # 4 print(scoreOfParentheses("(()(()))")) # 6 print(scoreOfParentheses("(((()))()())")) # 12
def score_of_parentheses(S): total = 0 cur = 0 for i in range(len(S)): if S[i] == '(': cur += 1 elif S[i] == ')': cur -= 1 if S[i - 1] == '(': total += 2 ** cur return total print(score_of_parentheses('()')) print(score_of_parentheses('()()')) print(score_of_parentheses('((()))')) print(score_of_parentheses('(()(()))')) print(score_of_parentheses('(((()))()())'))
c = input().split() W, H, x, y, r = int(c[0]), int(c[1]), int(c[2]), int(c[3]), int(c[4]) if r <= x <= W - r and r <= y <= H - r: print("Yes") else: print("No")
c = input().split() (w, h, x, y, r) = (int(c[0]), int(c[1]), int(c[2]), int(c[3]), int(c[4])) if r <= x <= W - r and r <= y <= H - r: print('Yes') else: print('No')
# -*- coding: utf-8 -*- numeros = [] for x in range(100): numeros.append(int(input())) print(max(numeros)) print(numeros.index(max(numeros))+1)
numeros = [] for x in range(100): numeros.append(int(input())) print(max(numeros)) print(numeros.index(max(numeros)) + 1)
# Python Program to Differentiate Between type() and isinstance() class Polygon: def sides_no(self): pass class Triangle(Polygon): def area(self): pass obj_polygon = Polygon() obj_triangle = Triangle() print(type(obj_triangle) == Triangle) # true print(type(obj_triangle) == Polygon) # false print(isinstance(obj_polygon, Polygon)) # true print(isinstance(obj_triangle, Polygon)) # true
class Polygon: def sides_no(self): pass class Triangle(Polygon): def area(self): pass obj_polygon = polygon() obj_triangle = triangle() print(type(obj_triangle) == Triangle) print(type(obj_triangle) == Polygon) print(isinstance(obj_polygon, Polygon)) print(isinstance(obj_triangle, Polygon))
s1 = (2, 1.3, 'love', 5.6, 9, 12, False) s2 = [True, 5, 'smile'] print('s1=',s1) print('s1[:5]=',s1[:5]) print('s1[2:]=',s1[2:]) print('s1[0:5:2]=',s1[0:5:2]) print('s1[2:0:-1]=',s1[2:0:-1]) print('s1[-1]=',s1[-1]) print('s1[-3]=',s1[-3])
s1 = (2, 1.3, 'love', 5.6, 9, 12, False) s2 = [True, 5, 'smile'] print('s1=', s1) print('s1[:5]=', s1[:5]) print('s1[2:]=', s1[2:]) print('s1[0:5:2]=', s1[0:5:2]) print('s1[2:0:-1]=', s1[2:0:-1]) print('s1[-1]=', s1[-1]) print('s1[-3]=', s1[-3])
r = requests.get('https://api.github.com/user', auth=('user', 'pass')) r.status_code # -> 200 r.headers['content-type'] # -> 'application/json; charset=utf8' r.encoding # -> 'utf-8' r.text # -> u'{"type":"User"...' r.json() # -> {u'private_gists': 419, u'total_private_repos': 77, ...}
r = requests.get('https://api.github.com/user', auth=('user', 'pass')) r.status_code r.headers['content-type'] r.encoding r.text r.json()
class Joint: def __init__(self, name, min_angle: float, max_angle: float): self.name = name self.min_angle = min_angle self.max_angle = max_angle
class Joint: def __init__(self, name, min_angle: float, max_angle: float): self.name = name self.min_angle = min_angle self.max_angle = max_angle
# # PySNMP MIB module SONOMASYSTEMS-SONOMA-ATM-E3-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SONOMASYSTEMS-SONOMA-ATM-E3-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:09:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") iso, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, NotificationType, ObjectIdentity, Bits, Counter32, Integer32, ModuleIdentity, IpAddress, Counter64, MibIdentifier, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "NotificationType", "ObjectIdentity", "Bits", "Counter32", "Integer32", "ModuleIdentity", "IpAddress", "Counter64", "MibIdentifier", "Unsigned32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") sonomaATM, = mibBuilder.importSymbols("SONOMASYSTEMS-SONOMA-MIB", "sonomaATM") sonomaE3ATMAdapterGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3)) atmE3ConfGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1)) atmE3StatsGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2)) atmE3ConfPhyTable = MibTable((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1), ) if mibBuilder.loadTexts: atmE3ConfPhyTable.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPhyTable.setDescription('A table of physical layer configuration for the E3 interface') atmE3ConfPhyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1), ).setIndexNames((0, "SONOMASYSTEMS-SONOMA-ATM-E3-MIB", "atmE3ConfPhysIndex")) if mibBuilder.loadTexts: atmE3ConfPhyEntry.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPhyEntry.setDescription('A entry in the table, containing information about the physical layer of a E3 interface') atmE3ConfPhysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3ConfPhysIndex.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPhysIndex.setDescription('The physical interface index.') atmE3ConfFraming = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2))).clone(namedValues=NamedValues(("framingE3", 2))).clone('framingE3')).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3ConfFraming.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfFraming.setDescription('Indicates the type of framing supported.') atmE3ConfInsGFCBits = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfInsGFCBits.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfInsGFCBits.setDescription('Enable/disable the insertion of GFC bits.') atmE3ConfSerBipolarIO = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfSerBipolarIO.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfSerBipolarIO.setDescription('Enable/disable bipolar serial I/O.') atmE3ConfPayloadScrambling = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfPayloadScrambling.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPayloadScrambling.setDescription('Enable/disable payload scrambling.') atmE3ConfOverheadProcessing = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfOverheadProcessing.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfOverheadProcessing.setDescription('Enable/disable Overhead processing.') atmE3ConfHDB3Encoding = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfHDB3Encoding.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfHDB3Encoding.setDescription('Enable/disable HDB3 (High Density Bipolar 3) Encoding.') atmE3ConfLoopback = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disabled", 1), ("internal", 2), ("external", 3))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfLoopback.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfLoopback.setDescription('This object is used to modify the state of internal loopback....') atmE3ConfCableLength = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("notGreaterThan225Feet", 1), ("greaterThan225Feet", 2))).clone('notGreaterThan225Feet')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfCableLength.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfCableLength.setDescription('Configure for the length of the cable.') atmE3ConfInternalEqualizer = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("use", 1), ("bypass", 2))).clone('use')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfInternalEqualizer.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfInternalEqualizer.setDescription('Configure to use or bypass the internal equalizer.') atmE3ConfFillerCells = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("unassigned", 1), ("idle", 2))).clone('unassigned')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfFillerCells.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfFillerCells.setDescription('This parameter indicates the type of filler cells to send when there are no data cells.') atmE3ConfGenerateClock = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3ConfGenerateClock.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfGenerateClock.setDescription('Enable/disable clock generation.') atmE3StatsTable = MibTable((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1), ) if mibBuilder.loadTexts: atmE3StatsTable.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsTable.setDescription('A table of physical layer statistics information for the E3 interface') atmE3StatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1), ).setIndexNames((0, "SONOMASYSTEMS-SONOMA-ATM-E3-MIB", "atmE3StatsPhysIndex")) if mibBuilder.loadTexts: atmE3StatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsEntry.setDescription('A entry in the table, containing information about the physical layer of a E3 interface') atmE3StatsPhysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsPhysIndex.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsPhysIndex.setDescription('The physical interface index.') atmE3StatsNoSignals = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsNoSignals.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsNoSignals.setDescription('No signal error counter.') atmE3StatsNoE3Frames = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsNoE3Frames.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsNoE3Frames.setDescription('No E3 frames error counter.') atmE3StatsFrameErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsFrameErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFrameErrors.setDescription('A count of the number of Frames in error.') atmE3StatsHECErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsHECErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsHECErrors.setDescription('HEC (Header Error Check) error counter.') atmE3StatsEMErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsEMErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsEMErrors.setDescription('EM (error monitoring) error counter.') atmE3StatsFeBlockErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsFeBlockErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFeBlockErrors.setDescription('Far End Block error counter.') atmE3StatsBpvErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsBpvErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsBpvErrors.setDescription('Bipolar Violation error counter.') atmE3StatsPayloadTypeMismatches = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatches.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatches.setDescription('Payload Type Mismatches error counter.') atmE3StatsTimingMarkers = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsTimingMarkers.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsTimingMarkers.setDescription('Timing Markers error counter.') atmE3StatsAISDetects = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsAISDetects.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsAISDetects.setDescription('AIS (Alarm Indication Signal) detect counter.') atmE3StatsRDIDetects = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsRDIDetects.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsRDIDetects.setDescription('RDI (Remote Defect Indication) error counter.') atmE3StatsSignalLoss = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsSignalLoss.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsSignalLoss.setDescription('Signal loss indication.') atmE3StatsFrameLoss = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsFrameLoss.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFrameLoss.setDescription('Frame loss indication.') atmE3StatsSyncLoss = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsSyncLoss.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsSyncLoss.setDescription('Synchronization loss counter.') atmE3StatsOutOfCell = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsOutOfCell.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsOutOfCell.setDescription('ATM out-of-cell delineation.') atmE3StatsFIFOOverflow = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsFIFOOverflow.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFIFOOverflow.setDescription('ATM FIFO overflow.') atmE3StatsPayloadTypeMismatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatch.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatch.setDescription('The Payload Type Mismatch state.') atmE3StatsTimingMarker = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsTimingMarker.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsTimingMarker.setDescription('The Timing Marker state.') atmE3StatsAISDetect = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsAISDetect.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsAISDetect.setDescription('The AIS (Alarm Indication Signal) state.') atmE3StatsRDIDetect = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atmE3StatsRDIDetect.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsRDIDetect.setDescription('RDI (Remote Defect Indication) state.') atmE3StatsClearCounters = MibTableColumn((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2))).clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: atmE3StatsClearCounters.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsClearCounters.setDescription('Clear all counters in this group ONLY.') mibBuilder.exportSymbols("SONOMASYSTEMS-SONOMA-ATM-E3-MIB", atmE3ConfLoopback=atmE3ConfLoopback, atmE3StatsRDIDetect=atmE3StatsRDIDetect, atmE3StatsOutOfCell=atmE3StatsOutOfCell, atmE3ConfPhyTable=atmE3ConfPhyTable, atmE3ConfInternalEqualizer=atmE3ConfInternalEqualizer, atmE3StatsNoE3Frames=atmE3StatsNoE3Frames, atmE3StatsHECErrors=atmE3StatsHECErrors, atmE3ConfSerBipolarIO=atmE3ConfSerBipolarIO, atmE3ConfOverheadProcessing=atmE3ConfOverheadProcessing, atmE3ConfHDB3Encoding=atmE3ConfHDB3Encoding, atmE3StatsFeBlockErrors=atmE3StatsFeBlockErrors, atmE3StatsSignalLoss=atmE3StatsSignalLoss, atmE3ConfPhysIndex=atmE3ConfPhysIndex, atmE3ConfPhyEntry=atmE3ConfPhyEntry, atmE3StatsFrameLoss=atmE3StatsFrameLoss, atmE3ConfPayloadScrambling=atmE3ConfPayloadScrambling, atmE3StatsNoSignals=atmE3StatsNoSignals, atmE3StatsTimingMarker=atmE3StatsTimingMarker, atmE3StatsEMErrors=atmE3StatsEMErrors, atmE3StatsClearCounters=atmE3StatsClearCounters, atmE3ConfGenerateClock=atmE3ConfGenerateClock, atmE3StatsTable=atmE3StatsTable, sonomaE3ATMAdapterGroup=sonomaE3ATMAdapterGroup, atmE3StatsPayloadTypeMismatch=atmE3StatsPayloadTypeMismatch, atmE3ConfInsGFCBits=atmE3ConfInsGFCBits, atmE3ConfFraming=atmE3ConfFraming, atmE3StatsRDIDetects=atmE3StatsRDIDetects, atmE3StatsEntry=atmE3StatsEntry, atmE3ConfFillerCells=atmE3ConfFillerCells, atmE3StatsPhysIndex=atmE3StatsPhysIndex, atmE3ConfCableLength=atmE3ConfCableLength, atmE3StatsBpvErrors=atmE3StatsBpvErrors, atmE3StatsTimingMarkers=atmE3StatsTimingMarkers, atmE3StatsAISDetect=atmE3StatsAISDetect, atmE3ConfGroup=atmE3ConfGroup, atmE3StatsFrameErrors=atmE3StatsFrameErrors, atmE3StatsPayloadTypeMismatches=atmE3StatsPayloadTypeMismatches, atmE3StatsSyncLoss=atmE3StatsSyncLoss, atmE3StatsGroup=atmE3StatsGroup, atmE3StatsAISDetects=atmE3StatsAISDetects, atmE3StatsFIFOOverflow=atmE3StatsFIFOOverflow)
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_range_constraint, constraints_intersection, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (iso, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, time_ticks, notification_type, object_identity, bits, counter32, integer32, module_identity, ip_address, counter64, mib_identifier, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'TimeTicks', 'NotificationType', 'ObjectIdentity', 'Bits', 'Counter32', 'Integer32', 'ModuleIdentity', 'IpAddress', 'Counter64', 'MibIdentifier', 'Unsigned32') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') (sonoma_atm,) = mibBuilder.importSymbols('SONOMASYSTEMS-SONOMA-MIB', 'sonomaATM') sonoma_e3_atm_adapter_group = mib_identifier((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3)) atm_e3_conf_group = mib_identifier((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1)) atm_e3_stats_group = mib_identifier((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2)) atm_e3_conf_phy_table = mib_table((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1)) if mibBuilder.loadTexts: atmE3ConfPhyTable.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPhyTable.setDescription('A table of physical layer configuration for the E3 interface') atm_e3_conf_phy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1)).setIndexNames((0, 'SONOMASYSTEMS-SONOMA-ATM-E3-MIB', 'atmE3ConfPhysIndex')) if mibBuilder.loadTexts: atmE3ConfPhyEntry.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPhyEntry.setDescription('A entry in the table, containing information about the physical layer of a E3 interface') atm_e3_conf_phys_index = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3ConfPhysIndex.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPhysIndex.setDescription('The physical interface index.') atm_e3_conf_framing = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2))).clone(namedValues=named_values(('framingE3', 2))).clone('framingE3')).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3ConfFraming.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfFraming.setDescription('Indicates the type of framing supported.') atm_e3_conf_ins_gfc_bits = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfInsGFCBits.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfInsGFCBits.setDescription('Enable/disable the insertion of GFC bits.') atm_e3_conf_ser_bipolar_io = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfSerBipolarIO.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfSerBipolarIO.setDescription('Enable/disable bipolar serial I/O.') atm_e3_conf_payload_scrambling = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfPayloadScrambling.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfPayloadScrambling.setDescription('Enable/disable payload scrambling.') atm_e3_conf_overhead_processing = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfOverheadProcessing.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfOverheadProcessing.setDescription('Enable/disable Overhead processing.') atm_e3_conf_hdb3_encoding = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfHDB3Encoding.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfHDB3Encoding.setDescription('Enable/disable HDB3 (High Density Bipolar 3) Encoding.') atm_e3_conf_loopback = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('disabled', 1), ('internal', 2), ('external', 3))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfLoopback.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfLoopback.setDescription('This object is used to modify the state of internal loopback....') atm_e3_conf_cable_length = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('notGreaterThan225Feet', 1), ('greaterThan225Feet', 2))).clone('notGreaterThan225Feet')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfCableLength.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfCableLength.setDescription('Configure for the length of the cable.') atm_e3_conf_internal_equalizer = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('use', 1), ('bypass', 2))).clone('use')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfInternalEqualizer.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfInternalEqualizer.setDescription('Configure to use or bypass the internal equalizer.') atm_e3_conf_filler_cells = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('unassigned', 1), ('idle', 2))).clone('unassigned')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfFillerCells.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfFillerCells.setDescription('This parameter indicates the type of filler cells to send when there are no data cells.') atm_e3_conf_generate_clock = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 1, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3ConfGenerateClock.setStatus('mandatory') if mibBuilder.loadTexts: atmE3ConfGenerateClock.setDescription('Enable/disable clock generation.') atm_e3_stats_table = mib_table((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1)) if mibBuilder.loadTexts: atmE3StatsTable.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsTable.setDescription('A table of physical layer statistics information for the E3 interface') atm_e3_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1)).setIndexNames((0, 'SONOMASYSTEMS-SONOMA-ATM-E3-MIB', 'atmE3StatsPhysIndex')) if mibBuilder.loadTexts: atmE3StatsEntry.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsEntry.setDescription('A entry in the table, containing information about the physical layer of a E3 interface') atm_e3_stats_phys_index = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsPhysIndex.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsPhysIndex.setDescription('The physical interface index.') atm_e3_stats_no_signals = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsNoSignals.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsNoSignals.setDescription('No signal error counter.') atm_e3_stats_no_e3_frames = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsNoE3Frames.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsNoE3Frames.setDescription('No E3 frames error counter.') atm_e3_stats_frame_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsFrameErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFrameErrors.setDescription('A count of the number of Frames in error.') atm_e3_stats_hec_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsHECErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsHECErrors.setDescription('HEC (Header Error Check) error counter.') atm_e3_stats_em_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsEMErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsEMErrors.setDescription('EM (error monitoring) error counter.') atm_e3_stats_fe_block_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsFeBlockErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFeBlockErrors.setDescription('Far End Block error counter.') atm_e3_stats_bpv_errors = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsBpvErrors.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsBpvErrors.setDescription('Bipolar Violation error counter.') atm_e3_stats_payload_type_mismatches = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatches.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatches.setDescription('Payload Type Mismatches error counter.') atm_e3_stats_timing_markers = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsTimingMarkers.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsTimingMarkers.setDescription('Timing Markers error counter.') atm_e3_stats_ais_detects = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsAISDetects.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsAISDetects.setDescription('AIS (Alarm Indication Signal) detect counter.') atm_e3_stats_rdi_detects = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsRDIDetects.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsRDIDetects.setDescription('RDI (Remote Defect Indication) error counter.') atm_e3_stats_signal_loss = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsSignalLoss.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsSignalLoss.setDescription('Signal loss indication.') atm_e3_stats_frame_loss = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsFrameLoss.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFrameLoss.setDescription('Frame loss indication.') atm_e3_stats_sync_loss = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsSyncLoss.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsSyncLoss.setDescription('Synchronization loss counter.') atm_e3_stats_out_of_cell = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsOutOfCell.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsOutOfCell.setDescription('ATM out-of-cell delineation.') atm_e3_stats_fifo_overflow = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsFIFOOverflow.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsFIFOOverflow.setDescription('ATM FIFO overflow.') atm_e3_stats_payload_type_mismatch = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatch.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsPayloadTypeMismatch.setDescription('The Payload Type Mismatch state.') atm_e3_stats_timing_marker = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsTimingMarker.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsTimingMarker.setDescription('The Timing Marker state.') atm_e3_stats_ais_detect = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsAISDetect.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsAISDetect.setDescription('The AIS (Alarm Indication Signal) state.') atm_e3_stats_rdi_detect = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atmE3StatsRDIDetect.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsRDIDetect.setDescription('RDI (Remote Defect Indication) state.') atm_e3_stats_clear_counters = mib_table_column((1, 3, 6, 1, 4, 1, 2926, 25, 7, 3, 2, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2))).clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: atmE3StatsClearCounters.setStatus('mandatory') if mibBuilder.loadTexts: atmE3StatsClearCounters.setDescription('Clear all counters in this group ONLY.') mibBuilder.exportSymbols('SONOMASYSTEMS-SONOMA-ATM-E3-MIB', atmE3ConfLoopback=atmE3ConfLoopback, atmE3StatsRDIDetect=atmE3StatsRDIDetect, atmE3StatsOutOfCell=atmE3StatsOutOfCell, atmE3ConfPhyTable=atmE3ConfPhyTable, atmE3ConfInternalEqualizer=atmE3ConfInternalEqualizer, atmE3StatsNoE3Frames=atmE3StatsNoE3Frames, atmE3StatsHECErrors=atmE3StatsHECErrors, atmE3ConfSerBipolarIO=atmE3ConfSerBipolarIO, atmE3ConfOverheadProcessing=atmE3ConfOverheadProcessing, atmE3ConfHDB3Encoding=atmE3ConfHDB3Encoding, atmE3StatsFeBlockErrors=atmE3StatsFeBlockErrors, atmE3StatsSignalLoss=atmE3StatsSignalLoss, atmE3ConfPhysIndex=atmE3ConfPhysIndex, atmE3ConfPhyEntry=atmE3ConfPhyEntry, atmE3StatsFrameLoss=atmE3StatsFrameLoss, atmE3ConfPayloadScrambling=atmE3ConfPayloadScrambling, atmE3StatsNoSignals=atmE3StatsNoSignals, atmE3StatsTimingMarker=atmE3StatsTimingMarker, atmE3StatsEMErrors=atmE3StatsEMErrors, atmE3StatsClearCounters=atmE3StatsClearCounters, atmE3ConfGenerateClock=atmE3ConfGenerateClock, atmE3StatsTable=atmE3StatsTable, sonomaE3ATMAdapterGroup=sonomaE3ATMAdapterGroup, atmE3StatsPayloadTypeMismatch=atmE3StatsPayloadTypeMismatch, atmE3ConfInsGFCBits=atmE3ConfInsGFCBits, atmE3ConfFraming=atmE3ConfFraming, atmE3StatsRDIDetects=atmE3StatsRDIDetects, atmE3StatsEntry=atmE3StatsEntry, atmE3ConfFillerCells=atmE3ConfFillerCells, atmE3StatsPhysIndex=atmE3StatsPhysIndex, atmE3ConfCableLength=atmE3ConfCableLength, atmE3StatsBpvErrors=atmE3StatsBpvErrors, atmE3StatsTimingMarkers=atmE3StatsTimingMarkers, atmE3StatsAISDetect=atmE3StatsAISDetect, atmE3ConfGroup=atmE3ConfGroup, atmE3StatsFrameErrors=atmE3StatsFrameErrors, atmE3StatsPayloadTypeMismatches=atmE3StatsPayloadTypeMismatches, atmE3StatsSyncLoss=atmE3StatsSyncLoss, atmE3StatsGroup=atmE3StatsGroup, atmE3StatsAISDetects=atmE3StatsAISDetects, atmE3StatsFIFOOverflow=atmE3StatsFIFOOverflow)
def shift(a): last = a[-1] a.insert(0, last) a.pop() return a def f(a,b): a = list(a) b = list(b) for i in range(len(a)): a = shift(a) if a == b: return True return False f('abcde', 'abced')
def shift(a): last = a[-1] a.insert(0, last) a.pop() return a def f(a, b): a = list(a) b = list(b) for i in range(len(a)): a = shift(a) if a == b: return True return False f('abcde', 'abced')
class BaloneyInterpreter(object): def __init__(self, prog): self.prog = prog def run(self): self.vars = {} # All variables self.lists = {} # List variables self.error = 0 # Indicates program error self.stat = list(self.prog) # Ordered list of all line numbers self.stat.sort() print(self.stat)
class Baloneyinterpreter(object): def __init__(self, prog): self.prog = prog def run(self): self.vars = {} self.lists = {} self.error = 0 self.stat = list(self.prog) self.stat.sort() print(self.stat)
def ascii(arg): pass def filter(pred, iterable): pass def hex(arg): pass def map(func, *iterables): pass def oct(arg): pass
def ascii(arg): pass def filter(pred, iterable): pass def hex(arg): pass def map(func, *iterables): pass def oct(arg): pass
#!/usr/bin/python3 '''General Class which is used for all the class ''' class GeneralSeller: def __init__(self,mechant_i): pass def start_product(self): pass class WishSeller(GeneralSeller): ''' ''' class AmazonSeller(GeneralSeller): pass class AlibabaSeller(GeneralSeller): pass class EbaySeller(GeneralSeller): pass class DhgateSeller(GeneralSeller): pass
"""General Class which is used for all the class """ class Generalseller: def __init__(self, mechant_i): pass def start_product(self): pass class Wishseller(GeneralSeller): """ """ class Amazonseller(GeneralSeller): pass class Alibabaseller(GeneralSeller): pass class Ebayseller(GeneralSeller): pass class Dhgateseller(GeneralSeller): pass
upTo = int(input()) res = 0 for i in range(upTo): res += i print(res)
up_to = int(input()) res = 0 for i in range(upTo): res += i print(res)
class Solution(object): def intersect(self, nums1, nums2): nums1_counter = collections.Counter(nums1) nums2_counter = collections.Counter(nums2) result = [] for k in nums1_counter.keys(): if k in nums2_counter: result.extend([k] * min(nums1_counter[k], nums2_counter[k])) return result
class Solution(object): def intersect(self, nums1, nums2): nums1_counter = collections.Counter(nums1) nums2_counter = collections.Counter(nums2) result = [] for k in nums1_counter.keys(): if k in nums2_counter: result.extend([k] * min(nums1_counter[k], nums2_counter[k])) return result
class CandidateViewer: def __init__(self, df): self.df = df def show_candidates(self): best_players_selections = ['2 players', '3 players', '4 players', '5 or more players'] weight_selections = [(1, 1.4), (1.5, 1.9), (1.9, 2.5), (2.5, 3.1), (3.1, 4)] cols = ['title', 'year', 'weight', 'best_for', 'final_score', 'category-cluster', 'mechanics-cluster', 'url'] for n_players in best_players_selections: for weight_range in weight_selections: selection = (self.df['best_for'] == n_players) & (self.df['weight'] >= weight_range[0]) & \ (self.df['weight'] <= weight_range[1]) & (self.df['year'] >= 2000) & (self.df['weight_votes'] >= 10) & \ (self.df['final_score'] >= 15) print('Weight: {} to {} - Best for {}'.format(weight_range[0], weight_range[1], n_players)) print('-'*80) selected = self.df[selection][cols].sort_values('final_score', ascending=False).head(10) for idx, row in selected.iterrows(): print('{:<35} ({}) - {:.2f}, {}, {:.1f}, Cat: {}, Mech: {}\n\t\t{}'\ .format(row['title'][:35], row['year'], row['weight'], row['best_for'], row['final_score'], row['category-cluster'][0], row['mechanics-cluster'][0], row['url'])) print('\n\n')
class Candidateviewer: def __init__(self, df): self.df = df def show_candidates(self): best_players_selections = ['2 players', '3 players', '4 players', '5 or more players'] weight_selections = [(1, 1.4), (1.5, 1.9), (1.9, 2.5), (2.5, 3.1), (3.1, 4)] cols = ['title', 'year', 'weight', 'best_for', 'final_score', 'category-cluster', 'mechanics-cluster', 'url'] for n_players in best_players_selections: for weight_range in weight_selections: selection = (self.df['best_for'] == n_players) & (self.df['weight'] >= weight_range[0]) & (self.df['weight'] <= weight_range[1]) & (self.df['year'] >= 2000) & (self.df['weight_votes'] >= 10) & (self.df['final_score'] >= 15) print('Weight: {} to {} - Best for {}'.format(weight_range[0], weight_range[1], n_players)) print('-' * 80) selected = self.df[selection][cols].sort_values('final_score', ascending=False).head(10) for (idx, row) in selected.iterrows(): print('{:<35} ({}) - {:.2f}, {}, {:.1f}, Cat: {}, Mech: {}\n\t\t{}'.format(row['title'][:35], row['year'], row['weight'], row['best_for'], row['final_score'], row['category-cluster'][0], row['mechanics-cluster'][0], row['url'])) print('\n\n')
def main(): q = int(input()) pre = [ 3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253, 3313, 3517, 3733, 4021, 4057, 4177, 4261, 4273, 4357, 4441, 4561, 4621, 4933, 5077, 5101, 5113, 5233, 5413, 5437, 5581, 5701, 6037, 6073, 6121, 6133, 6217, 6337, 6361, 6373, 6637, 6661, 6781, 6997, 7057, 7213, 7393, 7417, 7477, 7537, 7753, 7933, 8053, 8101, 8221, 8317, 8353, 8461, 8521, 8677, 8713, 8893, 9013, 9133, 9181, 9241, 9277, 9601, 9661, 9721, 9817, 9901, 9973, 10333, 10357, 10453, 10837, 10861, 10957, 11113, 11161, 11317, 11497, 11677, 11701, 12073, 12157, 12241, 12301, 12421, 12433, 12457, 12541, 12553, 12601, 12721, 12757, 12841, 12853, 13093, 13381, 13417, 13681, 13921, 13933, 14437, 14593, 14737, 14821, 15013, 15073, 15121, 15241, 15277, 15361, 15373, 15733, 15901, 16033, 16333, 16381, 16417, 16573, 16633, 16657, 16921, 17041, 17053, 17077, 17257, 17293, 17377, 17881, 18013, 18097, 18133, 18181, 18217, 18253, 18301, 18313, 18397, 18481, 18553, 18637, 18793, 19237, 19441, 19477, 19717, 19801, 19813, 19861, 20353, 20533, 20641, 20857, 21001, 21061, 21193, 21277, 21313, 21577, 21661, 21673, 21817, 22093, 22501, 22573, 22621, 22993, 23053, 23173, 23557, 23677, 23773, 23917, 24097, 24421, 24481, 24781, 24841, 25033, 25153, 25237, 25561, 25657, 25933, 26017, 26293, 26317, 26437, 26497, 26821, 26833, 26881, 26953, 27073, 27253, 27337, 27361, 27457, 27997, 28057, 28297, 28393, 28813, 28837, 28921, 29101, 29473, 29641, 30181, 30241, 30517, 30553, 30577, 30637, 30661, 30697, 30781, 30853, 31081, 31237, 31321, 31333, 31357, 31477, 31573, 31873, 31981, 32173, 32377, 32497, 32533, 32833, 33037, 33301, 33457, 33493, 33757, 33961, 34057, 34213, 34273, 34381, 34513, 34897, 34981, 35317, 35521, 35677, 35977, 36097, 36241, 36433, 36457, 36793, 36877, 36901, 36913, 37273, 37321, 37357, 37573, 37717, 37957, 38281, 38461, 38833, 38953, 38977, 39217, 39373, 39397, 39733, 40093, 40177, 40213, 40693, 40813, 41017, 41221, 41281, 41413, 41617, 41893, 42061, 42337, 42373, 42793, 42961, 43117, 43177, 43201, 43321, 43573, 43597, 43633, 43717, 44053, 44101, 44221, 44257, 44293, 44893, 45061, 45337, 45433, 45481, 45553, 45613, 45841, 46021, 46141, 46261, 46861, 46993, 47017, 47161, 47353, 47521, 47533, 47653, 47713, 47737, 47797, 47857, 48121, 48193, 48337, 48673, 48757, 48781, 49033, 49261, 49393, 49417, 49597, 49681, 49957, 50221, 50341, 50377, 50821, 50893, 51157, 51217, 51241, 51481, 51517, 51637, 52057, 52081, 52237, 52321, 52453, 52501, 52813, 52861, 52957, 53077, 53113, 53281, 53401, 53917, 54121, 54133, 54181, 54217, 54421, 54517, 54541, 54673, 54721, 54973, 55057, 55381, 55501, 55633, 55837, 55921, 55933, 56053, 56101, 56113, 56197, 56401, 56437, 56701, 56773, 56821, 56857, 56893, 57073, 57097, 57193, 57241, 57373, 57457, 57853, 58153, 58417, 58441, 58537, 58573, 58693, 59053, 59197, 59221, 59281, 59341, 59833, 60217, 60337, 60373, 60637, 60733, 60937, 61057, 61153, 61261, 61297, 61561, 61657, 61681, 61717, 61861, 62137, 62473, 62497, 62533, 62653, 62773, 63313, 63397, 63541, 63697, 63781, 63913, 64153, 64237, 64381, 64513, 64717, 65173, 65293, 65413, 65437, 65497, 65557, 65677, 65881, 66301, 66361, 66601, 66697, 66853, 66973, 67057, 67153, 67273, 67477, 67537, 67741, 67777, 67933, 67993, 68113, 68281, 68521, 68737, 69001, 69073, 69457, 69493, 69697, 69877, 70117, 70177, 70297, 70501, 70621, 70921, 70981, 71233, 71341, 71353, 71593, 71821, 72073, 72481, 72613, 72901, 72937, 73141, 73417, 73477, 73561, 73693, 74077, 74317, 74377, 74713, 75013, 75133, 75181, 75721, 75793, 75913, 76333, 76561, 76597, 76753, 77137, 77641, 78157, 78193, 78277, 78877, 78901, 79333, 79357, 79537, 79657, 79693, 79801, 79873, 80077, 80173, 80221, 80473, 80701, 80713, 80917, 81013, 81181, 81517, 81637, 81853, 82021, 82153, 82261, 82561, 82981, 83077, 83221, 83233, 83437, 83617, 83701, 83773, 84121, 84313, 84673, 84697, 84793, 84913, 85297, 85333, 85453, 85717, 85933, 86353, 86413, 87181, 87253, 87337, 87421, 87433, 87517, 87553, 87973, 88117, 88177, 88237, 88261, 88513, 88741, 88897, 88993, 89293, 89833, 89917, 90121, 91081, 91381, 91393, 91513, 91957, 92041, 92557, 92761, 92821, 92893, 92941, 93097, 93133, 93493, 93637, 93913, 94033, 94117, 94273, 94321, 94441, 94573, 94777, 94837, 94993, 95257, 95317, 95401, 95581, 95617, 95713, 95737, 96097, 96157, 96181, 96493, 96517, 96973, 97081, 97177, 97501, 97561, 97777, 97813, 98017, 98737, 98953, 99277, 99577, 99661, 99877 ] for _ in range(q): l,r = map(int,input().split()) ans = 0 for e in pre: if e > r: break if e >= l: ans += 1 print(ans) if __name__ == "__main__": main()
def main(): q = int(input()) pre = [3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253, 3313, 3517, 3733, 4021, 4057, 4177, 4261, 4273, 4357, 4441, 4561, 4621, 4933, 5077, 5101, 5113, 5233, 5413, 5437, 5581, 5701, 6037, 6073, 6121, 6133, 6217, 6337, 6361, 6373, 6637, 6661, 6781, 6997, 7057, 7213, 7393, 7417, 7477, 7537, 7753, 7933, 8053, 8101, 8221, 8317, 8353, 8461, 8521, 8677, 8713, 8893, 9013, 9133, 9181, 9241, 9277, 9601, 9661, 9721, 9817, 9901, 9973, 10333, 10357, 10453, 10837, 10861, 10957, 11113, 11161, 11317, 11497, 11677, 11701, 12073, 12157, 12241, 12301, 12421, 12433, 12457, 12541, 12553, 12601, 12721, 12757, 12841, 12853, 13093, 13381, 13417, 13681, 13921, 13933, 14437, 14593, 14737, 14821, 15013, 15073, 15121, 15241, 15277, 15361, 15373, 15733, 15901, 16033, 16333, 16381, 16417, 16573, 16633, 16657, 16921, 17041, 17053, 17077, 17257, 17293, 17377, 17881, 18013, 18097, 18133, 18181, 18217, 18253, 18301, 18313, 18397, 18481, 18553, 18637, 18793, 19237, 19441, 19477, 19717, 19801, 19813, 19861, 20353, 20533, 20641, 20857, 21001, 21061, 21193, 21277, 21313, 21577, 21661, 21673, 21817, 22093, 22501, 22573, 22621, 22993, 23053, 23173, 23557, 23677, 23773, 23917, 24097, 24421, 24481, 24781, 24841, 25033, 25153, 25237, 25561, 25657, 25933, 26017, 26293, 26317, 26437, 26497, 26821, 26833, 26881, 26953, 27073, 27253, 27337, 27361, 27457, 27997, 28057, 28297, 28393, 28813, 28837, 28921, 29101, 29473, 29641, 30181, 30241, 30517, 30553, 30577, 30637, 30661, 30697, 30781, 30853, 31081, 31237, 31321, 31333, 31357, 31477, 31573, 31873, 31981, 32173, 32377, 32497, 32533, 32833, 33037, 33301, 33457, 33493, 33757, 33961, 34057, 34213, 34273, 34381, 34513, 34897, 34981, 35317, 35521, 35677, 35977, 36097, 36241, 36433, 36457, 36793, 36877, 36901, 36913, 37273, 37321, 37357, 37573, 37717, 37957, 38281, 38461, 38833, 38953, 38977, 39217, 39373, 39397, 39733, 40093, 40177, 40213, 40693, 40813, 41017, 41221, 41281, 41413, 41617, 41893, 42061, 42337, 42373, 42793, 42961, 43117, 43177, 43201, 43321, 43573, 43597, 43633, 43717, 44053, 44101, 44221, 44257, 44293, 44893, 45061, 45337, 45433, 45481, 45553, 45613, 45841, 46021, 46141, 46261, 46861, 46993, 47017, 47161, 47353, 47521, 47533, 47653, 47713, 47737, 47797, 47857, 48121, 48193, 48337, 48673, 48757, 48781, 49033, 49261, 49393, 49417, 49597, 49681, 49957, 50221, 50341, 50377, 50821, 50893, 51157, 51217, 51241, 51481, 51517, 51637, 52057, 52081, 52237, 52321, 52453, 52501, 52813, 52861, 52957, 53077, 53113, 53281, 53401, 53917, 54121, 54133, 54181, 54217, 54421, 54517, 54541, 54673, 54721, 54973, 55057, 55381, 55501, 55633, 55837, 55921, 55933, 56053, 56101, 56113, 56197, 56401, 56437, 56701, 56773, 56821, 56857, 56893, 57073, 57097, 57193, 57241, 57373, 57457, 57853, 58153, 58417, 58441, 58537, 58573, 58693, 59053, 59197, 59221, 59281, 59341, 59833, 60217, 60337, 60373, 60637, 60733, 60937, 61057, 61153, 61261, 61297, 61561, 61657, 61681, 61717, 61861, 62137, 62473, 62497, 62533, 62653, 62773, 63313, 63397, 63541, 63697, 63781, 63913, 64153, 64237, 64381, 64513, 64717, 65173, 65293, 65413, 65437, 65497, 65557, 65677, 65881, 66301, 66361, 66601, 66697, 66853, 66973, 67057, 67153, 67273, 67477, 67537, 67741, 67777, 67933, 67993, 68113, 68281, 68521, 68737, 69001, 69073, 69457, 69493, 69697, 69877, 70117, 70177, 70297, 70501, 70621, 70921, 70981, 71233, 71341, 71353, 71593, 71821, 72073, 72481, 72613, 72901, 72937, 73141, 73417, 73477, 73561, 73693, 74077, 74317, 74377, 74713, 75013, 75133, 75181, 75721, 75793, 75913, 76333, 76561, 76597, 76753, 77137, 77641, 78157, 78193, 78277, 78877, 78901, 79333, 79357, 79537, 79657, 79693, 79801, 79873, 80077, 80173, 80221, 80473, 80701, 80713, 80917, 81013, 81181, 81517, 81637, 81853, 82021, 82153, 82261, 82561, 82981, 83077, 83221, 83233, 83437, 83617, 83701, 83773, 84121, 84313, 84673, 84697, 84793, 84913, 85297, 85333, 85453, 85717, 85933, 86353, 86413, 87181, 87253, 87337, 87421, 87433, 87517, 87553, 87973, 88117, 88177, 88237, 88261, 88513, 88741, 88897, 88993, 89293, 89833, 89917, 90121, 91081, 91381, 91393, 91513, 91957, 92041, 92557, 92761, 92821, 92893, 92941, 93097, 93133, 93493, 93637, 93913, 94033, 94117, 94273, 94321, 94441, 94573, 94777, 94837, 94993, 95257, 95317, 95401, 95581, 95617, 95713, 95737, 96097, 96157, 96181, 96493, 96517, 96973, 97081, 97177, 97501, 97561, 97777, 97813, 98017, 98737, 98953, 99277, 99577, 99661, 99877] for _ in range(q): (l, r) = map(int, input().split()) ans = 0 for e in pre: if e > r: break if e >= l: ans += 1 print(ans) if __name__ == '__main__': main()
class FileListing: dictionary: dict def __init__(self, dictionary: dict): self.dictionary = dictionary def __eq__(self, other): return self.dictionary == other.dictionary def __repr__(self): return {'dictionary': self.dictionary} @property def tenant(self): return self.dictionary.get("tenant") @property def file_path(self): return self.dictionary.get("filePath") @property def last_modified(self): return self.dictionary.get("lastModified") @property def size(self): return self.dictionary.get("size")
class Filelisting: dictionary: dict def __init__(self, dictionary: dict): self.dictionary = dictionary def __eq__(self, other): return self.dictionary == other.dictionary def __repr__(self): return {'dictionary': self.dictionary} @property def tenant(self): return self.dictionary.get('tenant') @property def file_path(self): return self.dictionary.get('filePath') @property def last_modified(self): return self.dictionary.get('lastModified') @property def size(self): return self.dictionary.get('size')
# Builds #T# Table of contents #C# Compiling to bytecode #C# Building a project to binary #T# Beginning of content #C# Compiling to bytecode # |------------------------------------------------------------- #T# Python code is compiled from .py source code files, to .pyc bytecode files #T# in the operating system shell, the py_compile script can be run to compile a .py file into .pyc # SYNTAX python3 -m py_compile script1.py #T# the script1.py is compiled, python3 is the Python executable, -m is a Python option to run py_compile (see the file titled Interpreter) #T# the output file is stored in a directory named __pycache__/ under the directory of script1.py, named something like __pycache__/script1.cpython-38.pyc, the cpython-38 part of the name stands for the Python version, in this case version 3.8 #T# in the operating system shell, a compiled .pyc file can be executed like a source code script # SYNTAX python3 __pycache__/script1.cpython-38.pyc #T# python3 is the Python executable, this syntax executes script1.cpython-38.pyc which gives the same output as executing script1.py # |------------------------------------------------------------- #C# Building a project to binary # |------------------------------------------------------------- #T# a Python project is formed by several related Python files whose execution starts at a main file, a project can be built into a binary executable so that the whole project resides in a single file, which doesn't depend on the Python interpreter to be executed #T# in the operating system shell, the PyInstaller module can be executed to build a Python project (it can be installed with pip) # SYNTAX pyinstaller --onefile main1.py dir1/module1.py dir1/dir1_1/script1.py #T# this creates an executable file named main1 in a directory under the working directory named dist/, so the executable file is dist/main1, the --onefile option makes it so that dist/ only contains one file print("Built") # |-------------------------------------------------------------
print('Built')
def get_profile(name, age: int, *sports, **awards): if type(age) != int: raise ValueError if len(sports) > 5: raise ValueError if sports and not awards: sports = sorted(list(sports)) return {'name': name, 'age': age, 'sports': sports} if not sports and awards: return {'name': name, 'age': age, 'awards': awards} if not sports and not awards: return {'name': name, 'age': age} sports = sorted(list(sports)) return {'name': name, 'age': age, 'sports': sports, 'awards': awards} pass
def get_profile(name, age: int, *sports, **awards): if type(age) != int: raise ValueError if len(sports) > 5: raise ValueError if sports and (not awards): sports = sorted(list(sports)) return {'name': name, 'age': age, 'sports': sports} if not sports and awards: return {'name': name, 'age': age, 'awards': awards} if not sports and (not awards): return {'name': name, 'age': age} sports = sorted(list(sports)) return {'name': name, 'age': age, 'sports': sports, 'awards': awards} pass
a = int(input("a= ")) b = int(input("b= ")) c = int(input("c= ")) if a == 0: if b != 0: print("La solution est", -c / b) else: if c == 0: print("INF") else: print("Aucune solution") else: delta = (b ** 2) - 4 * a * c if delta > 0: print( "Les deux solutions sont ", (- b - (delta ** 0.5)) / (2 * a), "et", (- b + (delta ** 0.5)) / (2 * a), ) elif delta == 0: print("La solution est", -b / (2 * a)) else: print("Pas de solutions reelles")
a = int(input('a= ')) b = int(input('b= ')) c = int(input('c= ')) if a == 0: if b != 0: print('La solution est', -c / b) elif c == 0: print('INF') else: print('Aucune solution') else: delta = b ** 2 - 4 * a * c if delta > 0: print('Les deux solutions sont ', (-b - delta ** 0.5) / (2 * a), 'et', (-b + delta ** 0.5) / (2 * a)) elif delta == 0: print('La solution est', -b / (2 * a)) else: print('Pas de solutions reelles')
class Solution: def checkIfExist(self, arr: List[int]) -> bool: s = set() for v in arr: if v * 2 in s or (v % 2 == 0 and v / 2 in s): return True s.add(v) return False
class Solution: def check_if_exist(self, arr: List[int]) -> bool: s = set() for v in arr: if v * 2 in s or (v % 2 == 0 and v / 2 in s): return True s.add(v) return False
n = int(input("Dame un numero entero: ")) def factorial( n ): if n == 1: return n else: #llamada recursiva return n * factorial( n - 1 ) print("El factorial de: ",n,"es", factorial(n))
n = int(input('Dame un numero entero: ')) def factorial(n): if n == 1: return n else: return n * factorial(n - 1) print('El factorial de: ', n, 'es', factorial(n))
#!/bin/python3 rd = open("06.input", "r") fullSum = 0 validLetters = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" } while True: letters = {} count = 0 while True: line = rd.readline().strip() if not line or line == "": break count += 1 for c in line: if c in validLetters: if c in letters: letters[c] += 1 else: letters[c] = 1 if len(letters) == 0: break for key in letters.keys(): if letters[key] == count: fullSum += 1 print(fullSum)
rd = open('06.input', 'r') full_sum = 0 valid_letters = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'} while True: letters = {} count = 0 while True: line = rd.readline().strip() if not line or line == '': break count += 1 for c in line: if c in validLetters: if c in letters: letters[c] += 1 else: letters[c] = 1 if len(letters) == 0: break for key in letters.keys(): if letters[key] == count: full_sum += 1 print(fullSum)
''' done ''' ipAddress = '127.0.0.1' port = 21 name = "Pustakalupi" pi = 3.14 #tidak ada constant dalam Python 3 print("ipAddress bertipe :", type(ipAddress)) print("port bertipe :", type(port)) print("name bertipe :", type(name)) print("pi bertipe :", type(pi)) print(pi) del pi print(pi)
""" done """ ip_address = '127.0.0.1' port = 21 name = 'Pustakalupi' pi = 3.14 print('ipAddress bertipe :', type(ipAddress)) print('port bertipe :', type(port)) print('name bertipe :', type(name)) print('pi bertipe :', type(pi)) print(pi) del pi print(pi)
class Originator: _state = None class Memento: def __init__(self, state): self._state = state def setState(self, state): self._state = state def getState(self): return self._state def __init__(self, state = None): self._state = state def set(self, state): if state != None: self._state = state def createMemento(self): return self.Memento(self._state) def restore(self, memento): self._state = memento.getState() return self._state class Caretaker: pointer = 0 savedStates = [] def saveMemento(self, element): self.pointer += 1 self.savedStates.append(element) def getMemento(self, index): return self.savedStates[index-1] def undo(self): if self.pointer > 0: self.pointer -= 1 return self.getMemento(self.pointer) else: return None def redo(self): if self.pointer < len(self.savedStates): self.pointer += 1 return self.getMemento(self.pointer) else: return None caretaker = Caretaker() originator = Originator() #Testing code originator.set("Message") caretaker.saveMemento(originator.createMemento()) print(originator.restore(caretaker.getMemento(caretaker.pointer))) originator.set("Typo") caretaker.saveMemento(originator.createMemento()) print(originator.restore(caretaker.getMemento(caretaker.pointer))) originator.set(caretaker.undo()) print(originator.restore(caretaker.getMemento(caretaker.pointer))) originator.set(caretaker.redo()) print(originator.restore(caretaker.getMemento(caretaker.pointer)))
class Originator: _state = None class Memento: def __init__(self, state): self._state = state def set_state(self, state): self._state = state def get_state(self): return self._state def __init__(self, state=None): self._state = state def set(self, state): if state != None: self._state = state def create_memento(self): return self.Memento(self._state) def restore(self, memento): self._state = memento.getState() return self._state class Caretaker: pointer = 0 saved_states = [] def save_memento(self, element): self.pointer += 1 self.savedStates.append(element) def get_memento(self, index): return self.savedStates[index - 1] def undo(self): if self.pointer > 0: self.pointer -= 1 return self.getMemento(self.pointer) else: return None def redo(self): if self.pointer < len(self.savedStates): self.pointer += 1 return self.getMemento(self.pointer) else: return None caretaker = caretaker() originator = originator() originator.set('Message') caretaker.saveMemento(originator.createMemento()) print(originator.restore(caretaker.getMemento(caretaker.pointer))) originator.set('Typo') caretaker.saveMemento(originator.createMemento()) print(originator.restore(caretaker.getMemento(caretaker.pointer))) originator.set(caretaker.undo()) print(originator.restore(caretaker.getMemento(caretaker.pointer))) originator.set(caretaker.redo()) print(originator.restore(caretaker.getMemento(caretaker.pointer)))
# please excuse me, I'm a C# and Rust developer with only minor Python experience :D # let's give it a go though! MAP = { 'a': "100000", 'n': "101110", 'b': "110000", 'o': "101010", 'c': "100100", 'p': "111100", 'd': "100110", 'q': "111110", 'e': "100010", 'r': "111010", 'f': "110100", 's': "011100", 'g': "110110", 't': "011110", 'h': "110010", 'u': "101001", 'i': "010100", 'v': "111001", 'j': "010110", 'w': "010111", 'k': "101000", 'x': "101101", 'l': "111000", 'y': "101111", 'm': "101100", 'z': "101011", ' ': "000000" } def solution(s): mapped = [] for c in s: if c.isupper(): # upper-case escape string mapped.append("000001") mapped.append(MAP[c.lower()]) return "".join(mapped) if __name__ == "__main__": assert solution("The quick brown fox jumps over the lazy dog") == "000001011110110010100010000000111110101001010100100100101000000000110000111010101010010111101110000000110100101010101101000000010110101001101100111100011100000000101010111001100010111010000000011110110010100010000000111000100000101011101111000000100110101010110110"
map = {'a': '100000', 'n': '101110', 'b': '110000', 'o': '101010', 'c': '100100', 'p': '111100', 'd': '100110', 'q': '111110', 'e': '100010', 'r': '111010', 'f': '110100', 's': '011100', 'g': '110110', 't': '011110', 'h': '110010', 'u': '101001', 'i': '010100', 'v': '111001', 'j': '010110', 'w': '010111', 'k': '101000', 'x': '101101', 'l': '111000', 'y': '101111', 'm': '101100', 'z': '101011', ' ': '000000'} def solution(s): mapped = [] for c in s: if c.isupper(): mapped.append('000001') mapped.append(MAP[c.lower()]) return ''.join(mapped) if __name__ == '__main__': assert solution('The quick brown fox jumps over the lazy dog') == '000001011110110010100010000000111110101001010100100100101000000000110000111010101010010111101110000000110100101010101101000000010110101001101100111100011100000000101010111001100010111010000000011110110010100010000000111000100000101011101111000000100110101010110110'
# Desafio066: Desafio criar um programa que leia varios numeros de o valor total digitado e pare quando digitado 999. nu = int (0) controle = int(0) print('Se precisar sair digite 999') while True: nu = int(input('Digite um numero ')) if nu == 999: break controle = controle + nu print(controle)
nu = int(0) controle = int(0) print('Se precisar sair digite 999') while True: nu = int(input('Digite um numero ')) if nu == 999: break controle = controle + nu print(controle)
__author__ = 'tony petrov' DEFAULT_SOCIAL_MEDIA_CYCLE = 3600 # 1 hour since most social media websites have a 1 hour timeout # tasks TASK_EXPLORE = 0 TASK_BULK_RETRIEVE = 1 TASK_FETCH_LISTS = 2 TASK_FETCH_USER = 3 TASK_UPDATE_WALL = 4 TASK_FETCH_STREAM = 5 TASK_GET_DASHBOARD = 6 TASK_GET_TAGGED = 7 TASK_GET_BLOG_POSTS = 8 TASK_GET_FACEBOOK_WALL = 9 TASK_FETCH_FACEBOOK_USERS = 10 TASK_TWITTER_SEARCH = 11 TOTAL_TASKS = 12 # twitter control constants POLITENESS_VALUE = 0.5 # how long the worker should sleep for used to prevent twitter from getting overloaded TWITTER_MAX_LIST_SIZE = 5000 TWITTER_MAX_NUMBER_OF_LISTS = 900 #can be changed to 1000 but retrieval of tweets from all lists not guaranteed TWITTER_MAX_NUMBER_OF_NON_FOLLOWED_USERS = 900 TWITTER_BULK_LIST_SIZE = 100 TWITTER_MAX_NUM_OF_BULK_LISTS_PER_REQUEST_CYCLE = 900 TWITTER_MAX_NUM_OF_REQUESTS_PER_CYCLE = 180 TWITTER_MAX_FOLLOW_REQUESTS = 10 TWITTER_ADD_TO_LIST_LIMIT = 100 MAX_TWITTER_TRENDS_REQUESTS = 15 TWITTER_CYCLES_PER_HOUR = 4 TWITTER_CYCLE_DURATION = 15 RUNNING_CYCLE = 900 # 15*60seconds MAX_TWEETS_PER_CYCLE = 25 MAX_TRACKABLE_TOPICS = 400 MAX_FOLLOWABLE_USERS = 5000 # tumblr control TUMBLR_MAX_REQUESTS_PER_DAY = 5000 TUMBLR_MAX_REQUESTS_PER_HOUR = 250 # facebook control FACEBOOK_MAX_REQUESTS_PER_HOUR = 200 # storage locations TWITTER_BULK_LIST_STORAGE = 'data/twitter/bulk_lists' TWITTER_LIST_STORAGE = 'data/twitter/lists' TWITTER_USER_STORAGE = 'data/twitter/users' TWITTER_WALL_STORAGE = 'data/twitter/home' TWITTER_CANDIDATES_STORAGE = 'data/twitter/remaining' TWITTER_CREDENTIALS = 'data/twitter/login' PROXY_LOCATION = 'data/proxies' RANKING_FILTER_CLASSIFIER = 'data/classifier' RANKING_FILTER_TOPIC_CLASSIFIER = 'data/topic_classifier' # Model names TWITTER_STREAMING_BUCKET_MODEL = 'stream' TWITTER_CYCLE_HARVESTER = 'harvester' TWITTER_HYBRID_MODEL = 'hybrid' TWITTER_STREAMING_HARVESTER_NON_HYBRID = 'both' # Service plugins CRAWLER_PLUGIN_SERVICE = 1 # redirect all outputs to the plugin TWITTER_PLUGIN_SERVICE = 100 # redirect output from all twitter crawler models to the plugin TWITTER_HARVESTER_PLUGIN_SERVICE = 101 # redirect output from the twitter model to the plugin TWITTER_STREAMING_PLUGIN_SERVICE = 102 # redirect output from the twitter stream api to the plugin TUMBLR_PLUGIN_SERVICE = 103 # redirect tumblr output to plugin FACEBOOK_PLUGIN_SERVICE = 104 # redirect facebook output to plugin # Ranking Classifiers PERCEPTRON_CLASSIFIER = 201 DEEP_NEURAL_NETWORK_CLASSIFIER = 202 K_MEANS_CLASSIFIER = 203 # other control constants and variables TESTING = False EXPLORING = False COLLECTING_DATA_ONLY = False RANK_RESET_TIME = 600 # every 10 mins TIME_TO_UPDATE_TRENDS = 0 FILTER_STREAM = False FRESH_TWEETS_ONLY = False # set to true to reduce the number of overlapping tweets PARTITION_FACTOR = 0.5 TWITTER_ACCOUNTS_COUNT = 1 MIN_TWITTER_STATUSES_COUNT = 150
__author__ = 'tony petrov' default_social_media_cycle = 3600 task_explore = 0 task_bulk_retrieve = 1 task_fetch_lists = 2 task_fetch_user = 3 task_update_wall = 4 task_fetch_stream = 5 task_get_dashboard = 6 task_get_tagged = 7 task_get_blog_posts = 8 task_get_facebook_wall = 9 task_fetch_facebook_users = 10 task_twitter_search = 11 total_tasks = 12 politeness_value = 0.5 twitter_max_list_size = 5000 twitter_max_number_of_lists = 900 twitter_max_number_of_non_followed_users = 900 twitter_bulk_list_size = 100 twitter_max_num_of_bulk_lists_per_request_cycle = 900 twitter_max_num_of_requests_per_cycle = 180 twitter_max_follow_requests = 10 twitter_add_to_list_limit = 100 max_twitter_trends_requests = 15 twitter_cycles_per_hour = 4 twitter_cycle_duration = 15 running_cycle = 900 max_tweets_per_cycle = 25 max_trackable_topics = 400 max_followable_users = 5000 tumblr_max_requests_per_day = 5000 tumblr_max_requests_per_hour = 250 facebook_max_requests_per_hour = 200 twitter_bulk_list_storage = 'data/twitter/bulk_lists' twitter_list_storage = 'data/twitter/lists' twitter_user_storage = 'data/twitter/users' twitter_wall_storage = 'data/twitter/home' twitter_candidates_storage = 'data/twitter/remaining' twitter_credentials = 'data/twitter/login' proxy_location = 'data/proxies' ranking_filter_classifier = 'data/classifier' ranking_filter_topic_classifier = 'data/topic_classifier' twitter_streaming_bucket_model = 'stream' twitter_cycle_harvester = 'harvester' twitter_hybrid_model = 'hybrid' twitter_streaming_harvester_non_hybrid = 'both' crawler_plugin_service = 1 twitter_plugin_service = 100 twitter_harvester_plugin_service = 101 twitter_streaming_plugin_service = 102 tumblr_plugin_service = 103 facebook_plugin_service = 104 perceptron_classifier = 201 deep_neural_network_classifier = 202 k_means_classifier = 203 testing = False exploring = False collecting_data_only = False rank_reset_time = 600 time_to_update_trends = 0 filter_stream = False fresh_tweets_only = False partition_factor = 0.5 twitter_accounts_count = 1 min_twitter_statuses_count = 150
class Professor: def __init__(self, nome): self.__nome = nome #conceito de encapusulamento self.__salaDeAula = None def nome(self): return self.__nome def salaDeAula(self, sala): self.__salaDeAula = sala def EmAula(self): return 'Em aula' class Sala: def __init__(self, numero): self.__numero = numero def numero(self): return self.__numero def FecharSala(self): return 'Porta foi fechada!'
class Professor: def __init__(self, nome): self.__nome = nome self.__salaDeAula = None def nome(self): return self.__nome def sala_de_aula(self, sala): self.__salaDeAula = sala def em_aula(self): return 'Em aula' class Sala: def __init__(self, numero): self.__numero = numero def numero(self): return self.__numero def fechar_sala(self): return 'Porta foi fechada!'
#!/usr/bin/env python # -*- coding: utf-8 -*- def init(): pass def servers(): return {}
def init(): pass def servers(): return {}
def processArray(l2): loss=[];mloss=0 for i in range(0,len(l2)): loss.append(l2[i][0]-l2[i][len(l2[i])-1]) if(len(loss)>0): mloss=loss.index(max(loss)) print(len(l2[mloss])) l=[] while True: a=int(input()) if(a<0): break l.append(a) ans=[] i=0 while(i<len(l)): k=l[i] tmp=[] tmp.append(l[i]) for j in range(i+1,len(l)): if(l[j]>k): break else: tmp.append(l[j]) k=l[j] i=j+1 print(tmp) if(len(tmp)>1): ans.append(tmp) processArray(ans)
def process_array(l2): loss = [] mloss = 0 for i in range(0, len(l2)): loss.append(l2[i][0] - l2[i][len(l2[i]) - 1]) if len(loss) > 0: mloss = loss.index(max(loss)) print(len(l2[mloss])) l = [] while True: a = int(input()) if a < 0: break l.append(a) ans = [] i = 0 while i < len(l): k = l[i] tmp = [] tmp.append(l[i]) for j in range(i + 1, len(l)): if l[j] > k: break else: tmp.append(l[j]) k = l[j] i = j + 1 print(tmp) if len(tmp) > 1: ans.append(tmp) process_array(ans)
class Solution: def hammingWeight(self, n: int) -> int: n = bin(n)[2:] str_n = str(n) return str_n.count("1")
class Solution: def hamming_weight(self, n: int) -> int: n = bin(n)[2:] str_n = str(n) return str_n.count('1')
def coordinate_input(): x, y = input("X, Y Coordinates ==> ").strip().split(",") return float(x), float(y) def main(): coordinates = [] print("Type the coordinates in order; it means A,B,C...") while True: try: point = coordinate_input() coordinates.append(point) except: break sumatory = 0 for index, point in enumerate(coordinates): if index == len(coordinates) - 1: sumatory += point[0] * coordinates[0][1] - point[1] * coordinates[0][0] else: sumatory += point[0] * coordinates[index+1][1] - point[1] * coordinates[index+1][0] print("Area:", abs(sumatory / 2)) if __name__ == '__main__': main()
def coordinate_input(): (x, y) = input('X, Y Coordinates ==> ').strip().split(',') return (float(x), float(y)) def main(): coordinates = [] print('Type the coordinates in order; it means A,B,C...') while True: try: point = coordinate_input() coordinates.append(point) except: break sumatory = 0 for (index, point) in enumerate(coordinates): if index == len(coordinates) - 1: sumatory += point[0] * coordinates[0][1] - point[1] * coordinates[0][0] else: sumatory += point[0] * coordinates[index + 1][1] - point[1] * coordinates[index + 1][0] print('Area:', abs(sumatory / 2)) if __name__ == '__main__': main()
''' Exemplo 1 c = 1 while c < 11: print(c) c += 1 print('Fim') ''' '''eXEMPLO 2 n = 1 while n!= 0: n = int(input('Digite um valor: ')) print('Fim') ''' ''' Exemplo 3 r = 'S' while r == 'S': n = int(input('Digite um valor: ')) r = str(input('Quer continuar? [S/N] ')).upper() print('Fim')''' ''' Exemplo 4 n = 1 par = impar = 0 while n != 0: n = int(input('Digite um numero: ')) if n != 0: if n % 2 == 0: par +=1 else: impar += 1 print('Voce digitou {} numeros pares e {} numeros impares!'.format(par, impar))''' '''Exemplo 5 from random import randint computador = randint(1, 10) print('Sou seu computador... Acabei de pensar em um numero entre 0 e 10.') acertou = False palpites = 0 while not acertou: jogador = int(input('Qual o seu palpite: ')) palpites += 1 if jogador == computador: acertou = True else: if jogador < computador: print('Mais... tente mais uma vez.') elif jogador > computador: print('Menos... tente mais uma vez') print('Acertou com {} tentativas. Parabens!!'.format(palpites))''' n = int(input('digite um numero:')) c = 0 while c < 5: c += 1 print('Menor ' if n < 3 else 'Maior')
""" Exemplo 1 c = 1 while c < 11: print(c) c += 1 print('Fim') """ "eXEMPLO 2 \nn = 1\nwhile n!= 0:\n n = int(input('Digite um valor: '))\nprint('Fim') " " Exemplo 3\nr = 'S'\nwhile r == 'S':\n n = int(input('Digite um valor: '))\n r = str(input('Quer continuar? [S/N] ')).upper()\nprint('Fim')" " Exemplo 4\nn = 1\npar = impar = 0\nwhile n != 0:\n n = int(input('Digite um numero: '))\n if n != 0:\n if n % 2 == 0:\n par +=1\n else:\n impar += 1\nprint('Voce digitou {} numeros pares e {} numeros impares!'.format(par, impar))" "Exemplo 5\nfrom random import randint\ncomputador = randint(1, 10)\nprint('Sou seu computador... Acabei de pensar em um numero entre 0 e 10.')\nacertou = False\npalpites = 0\nwhile not acertou:\n jogador = int(input('Qual o seu palpite: '))\n palpites += 1\n if jogador == computador:\n acertou = True\n else:\n if jogador < computador:\n print('Mais... tente mais uma vez.')\n elif jogador > computador:\n print('Menos... tente mais uma vez')\nprint('Acertou com {} tentativas. Parabens!!'.format(palpites))" n = int(input('digite um numero:')) c = 0 while c < 5: c += 1 print('Menor ' if n < 3 else 'Maior')
#!/home/user/code/Django-Sample/django_venv/bin/python2.7 # EASY-INSTALL-SCRIPT: 'Django==1.11.3','django-admin.py' __requires__ = 'Django==1.11.3' __import__('pkg_resources').run_script('Django==1.11.3', 'django-admin.py')
__requires__ = 'Django==1.11.3' __import__('pkg_resources').run_script('Django==1.11.3', 'django-admin.py')
def LB2idx(lev, band, nlevs, nbands): ''' convert level and band to dictionary index ''' # reset band to match matlab version band += (nbands-1) if band > nbands-1: band = band - nbands if lev == 0: idx = 0 elif lev == nlevs-1: # (Nlevels - ends)*Nbands + ends -1 (because zero indexed) idx = (((nlevs-2)*nbands)+2)-1 else: # (level-first level) * nbands + first level + current band idx = (nbands*lev)-band - 1 return idx
def lb2idx(lev, band, nlevs, nbands): """ convert level and band to dictionary index """ band += nbands - 1 if band > nbands - 1: band = band - nbands if lev == 0: idx = 0 elif lev == nlevs - 1: idx = (nlevs - 2) * nbands + 2 - 1 else: idx = nbands * lev - band - 1 return idx
# https://www.hackerrank.com/challenges/s10-standard-deviation/problem # Enter your code here. Read input from STDIN. Print output to STDOUT n = int(input().strip()) all1 = [int(i) for i in input().strip().split()] u = sum(all1) / n v = sum(((i - u) ** 2) for i in all1)/n sd = v ** 0.5 print("{0:0.1f}".format(sd))
n = int(input().strip()) all1 = [int(i) for i in input().strip().split()] u = sum(all1) / n v = sum(((i - u) ** 2 for i in all1)) / n sd = v ** 0.5 print('{0:0.1f}'.format(sd))
context_mapping = { "schema": "http://www.w3.org/2001/XMLSchema#", "brick": "http://brickschema.org/schema/1.0.3/Brick#", "brickFrame": "http://brickschema.org/schema/1.0.3/BrickFrame#", "BUDO-M": "https://git.rwth-aachen.de/EBC/Team_BA/misc/Machine-Learning/tree/MA_fst-bll/building_ml_platform/BUDO-M/Platform_Application_AI_Buildings_MA_Llopis/OntologyToModelica/CoTeTo/ebc_jsonld#", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "Equipment": {"@id": "brick: Equipment"}, "Point": {"@id": "brick: Point"}, "BUDOSystem": {"@id": "BUDO-M: BUDOSystem"}, "ModelicaModel": {"@id": "BUDO-M: ModelicaModel"}, "portHeatflow": {"@id": "BUDO-M: portHeatflow"}, "EquipmentPointParameter": {"@id": "BUDO-M: EquipmentPointParameter"}, "EquipmentPointUnits": {"@id": "BUDO-M: EquipmentPointUnits"}, "EquipmentPointExplanation": {"@id": "BUDO-M: EquipmentPointExplanation"}, "portParameter": {"@id": "BUDO-M: portParameter"}, "portUnits": {"@id": "BUDO-M: portUnits"}, "portExplanation": {"@id": "BUDO-M: portExplanation"}, "Pump": {"@id":"brick:Pump"}, "Boiler": {"@id":"brick:Boiler"}, "Valve": {"@id":"brick:Valve"}, "Temperature_Sensor": {"@id":"brick:Temperature_Sensor"}, "Heat_Pump": {"@id":"brick:Heat_Pump"}, "Combined_Heat_Power": {"@id":"brick:Combined_Heat_Power"}, "Heat_Exchanger": {"@id":"brick:Heat_Exchanger"}, "ItemList": {"@id":"schema:ItemList"}, "itemListElement": {"@id":"schema:itemListElement"}, "T_Piece": {"@id":"BUDO-M:T_Piece"} } doc_mapping_brick={ "@context": context_mapping, "@type": "ItemList", "itemListElement": [{ "Pump":{ "Point":"Hot_Water_Pump/Chilled_Water_Pump", "BUDOSystem":"PU", "ModelicaModel": "1", "portHeatflow": "1", "EquipmentPointParameter":"signalpath.massflow", "EquipmentPointUnits":"kg/s", "EquipmentPointExplanation":"mat file directory for input signal: prescribed mass flow rate for pump", "portParameter":"massFlow.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium", "portUnits":"kg/s,kg/s,pa,-", "portExplanation":"-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity" } }, { "Boiler": { "Point":"Boiler", "BUDOSystem":"BOI", "ModelicaModel": "5", "portHeatflow": "1", "EquipmentPointParameter": "signalpath.status/signalpath.mode/signalpath.temperature", "EquipmentPointUnits":"-,-,K", "EquipmentPointExplanation": "mat file directory for input signal: boiler on off status , boolean value required/mat file directory for input signal: boiler switch to night mode, boolean value required/mat file directory for input signal: ambient temperature", "portParameter":"massFlow.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium", "portUnits":"kg/s,kg/s,pa,-", "portExplanation":"-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity" } }, { "Valve": { "Point":"Heating_Valve", "BUDOSystem":"VAL", "ModelicaModel": "1", "portHeatflow": "2", "EquipmentPointParameter":"signalpath.position", "EquipmentPointUnits":"-", "EquipmentPointExplanation":"mat file directory for input signal: actuator position, value in range [0,1] required (0: closed, 1: open)", "portParameter":"massFlow.nominal/pressureDifference.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium", "portUnits":"kg/s,pa,kg/s,pa,-", "portExplanation":"-/-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity" } }, { "Temperature_Sensor": { "Point":"Hot_Water_Supply_Temperature_Sensor/Hot_Water_Return_Temperature_Sensor/Chilled_Water_Supply_Temperature_Sensor/Chilled_Water_Return_Temperature_Sensor", "BUDOSystem":"MEA.T", "ModelicaModel": "0", "portHeatflow": "0", "EquipmentPointParameter": "massFlow.nominal/medium", "EquipmentPointUnits": "kg/s,-", "EquipmentPointExplanation":"- /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity", "portParameter":"", "portUnits":"", "portExplanation":"" } }, { "Heat_Pump": { "Point":"Heat_Pump", "BUDOSystem":"HP", "ModelicaModel": "1", "portHeatflow": "2", "EquipmentPointParameter":"CoefficientOfPerformance/compressorPower.nominal/signalpath.loadratio", "EquipmentPointUnits":"-,W,-", "EquipmentPointExplanation":"-/-/mat file directory for input signal: part load ratio of compressor in heat pump, value in range [0,1] required", "portParameter":"massFlow.nominal/pressureDifference.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/temperatureDifference.nominal/temperature.average.nominal/medium", "portUnits":"kg/s,pa,kg/s,pa,K,K,-", "portExplanation":"-/-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /temperature difference outlet-inlet in condenser for portHeatflow.prim, in evaporator for portHeatflow .sec/nominal average temperature in condenser for portHeatflow.prim, in evaporator for portHeatflow .sec/medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity" } }, { "Combined_Heat_Power": { "Point":"Combined_Heat_Power", "BUDOSystem":"CHP", "ModelicaModel": "3", "portHeatflow":"1", "EquipmentPointParameter":"signalpath.status/signalpath.temperature", "EquipmentPointUnits":"-,K", "EquipmentPointExplanation":"mat file directory for input signal: CHP on off status, boolean value required/mat file directory for input signal: CHP temperature setpoint, boolean value required", "portParameter":"massFlow.nominal/medium", "portUnits":"kg/s,-", "portExplanation":"-/medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity" } }, { "Heat_Exchanger": { "Point":"Heat_Exchanger", "BUDOSystem":"HX", "ModelicaModel":"0", "portHeatflow":"2", "EquipmentPointParameter":"", "EquipmentPointUnits":"", "EquipmentPointExplanation":"", "portParameter":"massFlow.nominal/pressureDifference.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium", "portUnits":"kg/s,pa,kg/s,pa,K,K,-", "portExplanation":"-/-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /-/-/medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity " } }] } doc_mapping_BUDO={ "@context": context_mapping, "@type": "ItemList", "itemListElement": [ { "T_Piece": { "Point":"T_Piece", "BUDOSystem":"TP", "ModelicaModel": "0", "portHeatflow": "2", "EquipmentPointParameter": "0", "EquipmentPointUnits": "0", "EquipmentPointExplanation": "0", "portParameter": "medium", "portUnits":"-", "portExplanation":"medium in modelica model" } } ] }
context_mapping = {'schema': 'http://www.w3.org/2001/XMLSchema#', 'brick': 'http://brickschema.org/schema/1.0.3/Brick#', 'brickFrame': 'http://brickschema.org/schema/1.0.3/BrickFrame#', 'BUDO-M': 'https://git.rwth-aachen.de/EBC/Team_BA/misc/Machine-Learning/tree/MA_fst-bll/building_ml_platform/BUDO-M/Platform_Application_AI_Buildings_MA_Llopis/OntologyToModelica/CoTeTo/ebc_jsonld#', 'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#', 'Equipment': {'@id': 'brick: Equipment'}, 'Point': {'@id': 'brick: Point'}, 'BUDOSystem': {'@id': 'BUDO-M: BUDOSystem'}, 'ModelicaModel': {'@id': 'BUDO-M: ModelicaModel'}, 'portHeatflow': {'@id': 'BUDO-M: portHeatflow'}, 'EquipmentPointParameter': {'@id': 'BUDO-M: EquipmentPointParameter'}, 'EquipmentPointUnits': {'@id': 'BUDO-M: EquipmentPointUnits'}, 'EquipmentPointExplanation': {'@id': 'BUDO-M: EquipmentPointExplanation'}, 'portParameter': {'@id': 'BUDO-M: portParameter'}, 'portUnits': {'@id': 'BUDO-M: portUnits'}, 'portExplanation': {'@id': 'BUDO-M: portExplanation'}, 'Pump': {'@id': 'brick:Pump'}, 'Boiler': {'@id': 'brick:Boiler'}, 'Valve': {'@id': 'brick:Valve'}, 'Temperature_Sensor': {'@id': 'brick:Temperature_Sensor'}, 'Heat_Pump': {'@id': 'brick:Heat_Pump'}, 'Combined_Heat_Power': {'@id': 'brick:Combined_Heat_Power'}, 'Heat_Exchanger': {'@id': 'brick:Heat_Exchanger'}, 'ItemList': {'@id': 'schema:ItemList'}, 'itemListElement': {'@id': 'schema:itemListElement'}, 'T_Piece': {'@id': 'BUDO-M:T_Piece'}} doc_mapping_brick = {'@context': context_mapping, '@type': 'ItemList', 'itemListElement': [{'Pump': {'Point': 'Hot_Water_Pump/Chilled_Water_Pump', 'BUDOSystem': 'PU', 'ModelicaModel': '1', 'portHeatflow': '1', 'EquipmentPointParameter': 'signalpath.massflow', 'EquipmentPointUnits': 'kg/s', 'EquipmentPointExplanation': 'mat file directory for input signal: prescribed mass flow rate for pump', 'portParameter': 'massFlow.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium', 'portUnits': 'kg/s,kg/s,pa,-', 'portExplanation': '-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity'}}, {'Boiler': {'Point': 'Boiler', 'BUDOSystem': 'BOI', 'ModelicaModel': '5', 'portHeatflow': '1', 'EquipmentPointParameter': 'signalpath.status/signalpath.mode/signalpath.temperature', 'EquipmentPointUnits': '-,-,K', 'EquipmentPointExplanation': 'mat file directory for input signal: boiler on off status , boolean value required/mat file directory for input signal: boiler switch to night mode, boolean value required/mat file directory for input signal: ambient temperature', 'portParameter': 'massFlow.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium', 'portUnits': 'kg/s,kg/s,pa,-', 'portExplanation': '-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity'}}, {'Valve': {'Point': 'Heating_Valve', 'BUDOSystem': 'VAL', 'ModelicaModel': '1', 'portHeatflow': '2', 'EquipmentPointParameter': 'signalpath.position', 'EquipmentPointUnits': '-', 'EquipmentPointExplanation': 'mat file directory for input signal: actuator position, value in range [0,1] required (0: closed, 1: open)', 'portParameter': 'massFlow.nominal/pressureDifference.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium', 'portUnits': 'kg/s,pa,kg/s,pa,-', 'portExplanation': '-/-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity'}}, {'Temperature_Sensor': {'Point': 'Hot_Water_Supply_Temperature_Sensor/Hot_Water_Return_Temperature_Sensor/Chilled_Water_Supply_Temperature_Sensor/Chilled_Water_Return_Temperature_Sensor', 'BUDOSystem': 'MEA.T', 'ModelicaModel': '0', 'portHeatflow': '0', 'EquipmentPointParameter': 'massFlow.nominal/medium', 'EquipmentPointUnits': 'kg/s,-', 'EquipmentPointExplanation': '- /medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity', 'portParameter': '', 'portUnits': '', 'portExplanation': ''}}, {'Heat_Pump': {'Point': 'Heat_Pump', 'BUDOSystem': 'HP', 'ModelicaModel': '1', 'portHeatflow': '2', 'EquipmentPointParameter': 'CoefficientOfPerformance/compressorPower.nominal/signalpath.loadratio', 'EquipmentPointUnits': '-,W,-', 'EquipmentPointExplanation': '-/-/mat file directory for input signal: part load ratio of compressor in heat pump, value in range [0,1] required', 'portParameter': 'massFlow.nominal/pressureDifference.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/temperatureDifference.nominal/temperature.average.nominal/medium', 'portUnits': 'kg/s,pa,kg/s,pa,K,K,-', 'portExplanation': '-/-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /temperature difference outlet-inlet in condenser for portHeatflow.prim, in evaporator for portHeatflow .sec/nominal average temperature in condenser for portHeatflow.prim, in evaporator for portHeatflow .sec/medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity'}}, {'Combined_Heat_Power': {'Point': 'Combined_Heat_Power', 'BUDOSystem': 'CHP', 'ModelicaModel': '3', 'portHeatflow': '1', 'EquipmentPointParameter': 'signalpath.status/signalpath.temperature', 'EquipmentPointUnits': '-,K', 'EquipmentPointExplanation': 'mat file directory for input signal: CHP on off status, boolean value required/mat file directory for input signal: CHP temperature setpoint, boolean value required', 'portParameter': 'massFlow.nominal/medium', 'portUnits': 'kg/s,-', 'portExplanation': '-/medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity'}}, {'Heat_Exchanger': {'Point': 'Heat_Exchanger', 'BUDOSystem': 'HX', 'ModelicaModel': '0', 'portHeatflow': '2', 'EquipmentPointParameter': '', 'EquipmentPointUnits': '', 'EquipmentPointExplanation': '', 'portParameter': 'massFlow.nominal/pressureDifference.nominal/massFlow.nominal.Pipe.out/pressureDifference.nominal.Pipe.out/medium', 'portUnits': 'kg/s,pa,kg/s,pa,K,K,-', 'portExplanation': '-/-/nominal mass flow rate in the pipe connected to this port /nominal pressure drop in the pipe connected to this port /-/-/medium flowing in this component, example: AixLib.Media.Specialized.Water.TemperatureDependentDensity '}}]} doc_mapping_budo = {'@context': context_mapping, '@type': 'ItemList', 'itemListElement': [{'T_Piece': {'Point': 'T_Piece', 'BUDOSystem': 'TP', 'ModelicaModel': '0', 'portHeatflow': '2', 'EquipmentPointParameter': '0', 'EquipmentPointUnits': '0', 'EquipmentPointExplanation': '0', 'portParameter': 'medium', 'portUnits': '-', 'portExplanation': 'medium in modelica model'}}]}
OBJECT( 'VALUE', attributes = [ A( 'ANY', 'value' ), ] )
object('VALUE', attributes=[a('ANY', 'value')])
# Reading Error Messages # Read the Python code and the resulting traceback below, # and answer the following questions: # How many levels does the traceback have? # What is the function name where the error occurred? # On which line number in this function did the error occur? # What is the type of error? # What is the error message? # This code has an intentional error. Do not type it directly; # use it for reference to understand the error message below. def print_message(day): messages = { "monday": "Hello, world!", "tuesday": "Today is Tuesday!", "wednesday": "It is the middle of the week.", "thursday": "Today is Donnerstag in German!", "friday": "Last day of the week!", "saturday": "Hooray for the weekend!", "sunday": "Aw, the weekend is almost over." } print(messages[day]) def print_friday_message(): print_message("Friday") print_friday_message()
def print_message(day): messages = {'monday': 'Hello, world!', 'tuesday': 'Today is Tuesday!', 'wednesday': 'It is the middle of the week.', 'thursday': 'Today is Donnerstag in German!', 'friday': 'Last day of the week!', 'saturday': 'Hooray for the weekend!', 'sunday': 'Aw, the weekend is almost over.'} print(messages[day]) def print_friday_message(): print_message('Friday') print_friday_message()
def cons(a, b): def pair(f): return f(a, b) return pair def car(pair): return pair((lambda a, b: a)) def cdr(pair): return pair((lambda a, b: a))
def cons(a, b): def pair(f): return f(a, b) return pair def car(pair): return pair(lambda a, b: a) def cdr(pair): return pair(lambda a, b: a)
# Testing site base_url = 'http://localhost:80/demo' # Login account admin_auth_data = {'name': 'admin', 'password': 'admin'} login_url = base_url + '/api/auth' header = dict()
base_url = 'http://localhost:80/demo' admin_auth_data = {'name': 'admin', 'password': 'admin'} login_url = base_url + '/api/auth' header = dict()
def add(x,y): '''Add two nos''' return x+y def subtract(x,y): '''Subtract two nos''' return y-x
def add(x, y): """Add two nos""" return x + y def subtract(x, y): """Subtract two nos""" return y - x
def word2features(sent, i): word = sent[i][0] postag = sent[i][1] features = [ 'bias', 'word.lower=' + word.lower(), 'word[-3:]=' + word[-3:], 'word[-2:]=' + word[-2:], 'word.isupper=%s' % word.isupper(), 'word.istitle=%s' % word.istitle(), 'word.isdigit=%s' % word.isdigit(), 'postag=' + postag, 'postag[:2]=' + postag[:2], ] if i > 0: word1 = sent[i-1][0] postag1 = sent[i-1][1] features.extend([ '-1:word.lower=' + word1.lower(), '-1:word.istitle=%s' % word1.istitle(), '-1:word.isupper=%s' % word1.isupper(), '-1:postag=' + postag1, '-1:postag[:2]=' + postag1[:2], ]) else: features.append('BOS') if i < len(sent)-1: word1 = sent[i+1][0] postag1 = sent[i+1][1] features.extend([ '+1:word.lower=' + word1.lower(), '+1:word.istitle=%s' % word1.istitle(), '+1:word.isupper=%s' % word1.isupper(), '+1:postag=' + postag1, '+1:postag[:2]=' + postag1[:2], ]) else: features.append('EOS') return features def sent2features(sent): return [word2features(sent, i) for i in range(len(sent))] def sent2labels(sent): return [label for token, postag, label in sent] def sent2tokens(sent): return [token for token, postag, label in sent]
def word2features(sent, i): word = sent[i][0] postag = sent[i][1] features = ['bias', 'word.lower=' + word.lower(), 'word[-3:]=' + word[-3:], 'word[-2:]=' + word[-2:], 'word.isupper=%s' % word.isupper(), 'word.istitle=%s' % word.istitle(), 'word.isdigit=%s' % word.isdigit(), 'postag=' + postag, 'postag[:2]=' + postag[:2]] if i > 0: word1 = sent[i - 1][0] postag1 = sent[i - 1][1] features.extend(['-1:word.lower=' + word1.lower(), '-1:word.istitle=%s' % word1.istitle(), '-1:word.isupper=%s' % word1.isupper(), '-1:postag=' + postag1, '-1:postag[:2]=' + postag1[:2]]) else: features.append('BOS') if i < len(sent) - 1: word1 = sent[i + 1][0] postag1 = sent[i + 1][1] features.extend(['+1:word.lower=' + word1.lower(), '+1:word.istitle=%s' % word1.istitle(), '+1:word.isupper=%s' % word1.isupper(), '+1:postag=' + postag1, '+1:postag[:2]=' + postag1[:2]]) else: features.append('EOS') return features def sent2features(sent): return [word2features(sent, i) for i in range(len(sent))] def sent2labels(sent): return [label for (token, postag, label) in sent] def sent2tokens(sent): return [token for (token, postag, label) in sent]
words_single = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] words_teens = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] words_tens = ['','ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'] hudred = 'hundred' def spell_out(num): if num > 1000 or num < 0: raise Exception('no man') if num == 1000: return 'one thousand' if num < 10: return words_single[num] if num < 20: return words_teens[num-10] if num < 100: return words_tens[int(num/10)] + (spell_out(num%10) if num%10 > 0 else '') return words_single[int(num/100)] + ' hundred ' + (('and ' + spell_out(num%100)) if num%100 > 0 else '') def count(words): return len(words.translate(str.maketrans('', '', ' '))) total = 0 for i in range(1,1001): print(spell_out(i)) spelled = spell_out(i) total += count(spelled) print(total)
words_single = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] words_teens = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] words_tens = ['', 'ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'] hudred = 'hundred' def spell_out(num): if num > 1000 or num < 0: raise exception('no man') if num == 1000: return 'one thousand' if num < 10: return words_single[num] if num < 20: return words_teens[num - 10] if num < 100: return words_tens[int(num / 10)] + (spell_out(num % 10) if num % 10 > 0 else '') return words_single[int(num / 100)] + ' hundred ' + ('and ' + spell_out(num % 100) if num % 100 > 0 else '') def count(words): return len(words.translate(str.maketrans('', '', ' '))) total = 0 for i in range(1, 1001): print(spell_out(i)) spelled = spell_out(i) total += count(spelled) print(total)
def test_Compare(): a: bool a = 5 > 4 a = 5 <= 4 a = 5 < 4 a = 5.6 >= 5.59999 a = 3.3 == 3.3 a = 3.3 != 3.4 a = complex(3, 4) == complex(3., 4.)
def test__compare(): a: bool a = 5 > 4 a = 5 <= 4 a = 5 < 4 a = 5.6 >= 5.59999 a = 3.3 == 3.3 a = 3.3 != 3.4 a = complex(3, 4) == complex(3.0, 4.0)
def spaces(n, i): countSpace= n-i spaces = " "*countSpace return spaces def staircase(n): for i in range(1, n+1): cadena = spaces(n,i) steps = "#"*i cadena = cadena+steps print(cadena) if __name__ == "__main__": tamanio = int(input("Ingresa el numero de escalones: ")) staircase(tamanio)
def spaces(n, i): count_space = n - i spaces = ' ' * countSpace return spaces def staircase(n): for i in range(1, n + 1): cadena = spaces(n, i) steps = '#' * i cadena = cadena + steps print(cadena) if __name__ == '__main__': tamanio = int(input('Ingresa el numero de escalones: ')) staircase(tamanio)
''' QUESTION: 344. Reverse String Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. You may assume all the characters consist of printable ascii characters. Example 1: Input: ["h","e","l","l","o"] Output: ["o","l","l","e","h"] Example 2: Input: ["H","a","n","n","a","h"] Output: ["h","a","n","n","a","H"] ''' class Solution(object): def reverseString(self, s): leftindex = 0 rightindex = len(s) - 1 while (leftindex < rightindex): s[leftindex], s[rightindex] = s[rightindex], s[leftindex] leftindex += 1 rightindex -= 1 ''' Ideas/thoughts: As need to modify in place, without creating new array. As python can do pair value assign, assign left to right, right value to left until leftindex is less than right. No need to return anything '''
""" QUESTION: 344. Reverse String Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. You may assume all the characters consist of printable ascii characters. Example 1: Input: ["h","e","l","l","o"] Output: ["o","l","l","e","h"] Example 2: Input: ["H","a","n","n","a","h"] Output: ["h","a","n","n","a","H"] """ class Solution(object): def reverse_string(self, s): leftindex = 0 rightindex = len(s) - 1 while leftindex < rightindex: (s[leftindex], s[rightindex]) = (s[rightindex], s[leftindex]) leftindex += 1 rightindex -= 1 '\nIdeas/thoughts:\nAs need to modify in place, without creating new array.\nAs python can do pair value assign,\nassign left to right, right value to left until leftindex is less than right.\n\nNo need to return anything\n\n'
{ "targets":[ { "target_name":"stp", "sources":["calc_grid.cc"] } ] }
{'targets': [{'target_name': 'stp', 'sources': ['calc_grid.cc']}]}
s = input() hachi = set() if len(s) < 3: if int(s) % 8 == 0 or int(s[::-1]) % 8 == 0: print("Yes") else: print("No") exit() t = 104 while t < 1000: hachi.add(str(t)) t += 8 counter = [0 for _ in range(10)] for i in s: counter[int(i)] += 1 for h in hachi: count = [0 for _ in range(10)] for i in str(h): count[int(i)] += 1 for i in range(10): if counter[i] < count[i]: break else: print("Yes") exit() print("No")
s = input() hachi = set() if len(s) < 3: if int(s) % 8 == 0 or int(s[::-1]) % 8 == 0: print('Yes') else: print('No') exit() t = 104 while t < 1000: hachi.add(str(t)) t += 8 counter = [0 for _ in range(10)] for i in s: counter[int(i)] += 1 for h in hachi: count = [0 for _ in range(10)] for i in str(h): count[int(i)] += 1 for i in range(10): if counter[i] < count[i]: break else: print('Yes') exit() print('No')
# # PySNMP MIB module DLINK-3100-BRIDGEMIBOBJECTS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLINK-3100-BRIDGEMIBOBJECTS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:33:05 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") SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion") Timeout, BridgeId, dot1dBasePort = mibBuilder.importSymbols("BRIDGE-MIB", "Timeout", "BridgeId", "dot1dBasePort") rnd, = mibBuilder.importSymbols("DLINK-3100-MIB", "rnd") InterfaceIndex, ifIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "ifIndex") PortList, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, Counter64, TimeTicks, ModuleIdentity, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, ObjectIdentity, NotificationType, MibIdentifier, Integer32, Gauge32, Unsigned32, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Counter64", "TimeTicks", "ModuleIdentity", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "ObjectIdentity", "NotificationType", "MibIdentifier", "Integer32", "Gauge32", "Unsigned32", "Counter32") RowStatus, TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TruthValue", "TextualConvention", "DisplayString") rlpBridgeMIBObjects = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57)) rlpBridgeMIBObjects.setRevisions(('2007-01-02 00:00',)) if mibBuilder.loadTexts: rlpBridgeMIBObjects.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlpBridgeMIBObjects.setOrganization('Dlink, Inc. Dlink Semiconductor, Inc.') rldot1dPriority = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1)) rldot1dPriorityMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dPriorityMibVersion.setStatus('current') rldot1dPriorityPortGroupTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 2), ) if mibBuilder.loadTexts: rldot1dPriorityPortGroupTable.setStatus('current') rldot1dPriorityPortGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 2, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dBasePort")) if mibBuilder.loadTexts: rldot1dPriorityPortGroupEntry.setStatus('current') rldot1dPriorityPortGroupNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dPriorityPortGroupNumber.setStatus('current') rldot1dStp = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2)) rldot1dStpMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpMibVersion.setStatus('current') rldot1dStpType = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4))).clone(namedValues=NamedValues(("perDevice", 1), ("mstp", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpType.setStatus('current') rldot1dStpEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 3), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpEnable.setStatus('current') rldot1dStpPortMustBelongToVlan = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 4), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortMustBelongToVlan.setStatus('current') rldot1dStpExtendedPortNumberFormat = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 5), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpExtendedPortNumberFormat.setStatus('current') rldot1dStpVlanTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6), ) if mibBuilder.loadTexts: rldot1dStpVlanTable.setStatus('current') rldot1dStpVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1dStpVlan")) if mibBuilder.loadTexts: rldot1dStpVlanEntry.setStatus('current') rldot1dStpVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlan.setStatus('current') rldot1dStpVlanEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 2), TruthValue().clone('true')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpVlanEnable.setStatus('current') rldot1dStpTimeSinceTopologyChange = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpTimeSinceTopologyChange.setStatus('current') rldot1dStpTopChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpTopChanges.setStatus('current') rldot1dStpDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 5), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpDesignatedRoot.setStatus('current') rldot1dStpRootCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpRootCost.setStatus('current') rldot1dStpRootPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpRootPort.setStatus('current') rldot1dStpMaxAge = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 8), Timeout()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpMaxAge.setStatus('current') rldot1dStpHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 9), Timeout()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpHelloTime.setStatus('current') rldot1dStpHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpHoldTime.setStatus('current') rldot1dStpForwardDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 11), Timeout()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpForwardDelay.setStatus('current') rldot1dStpVlanPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7), ) if mibBuilder.loadTexts: rldot1dStpVlanPortTable.setStatus('current') rldot1dStpVlanPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1dStpVlanPortVlan"), (0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1dStpVlanPortPort")) if mibBuilder.loadTexts: rldot1dStpVlanPortEntry.setStatus('current') rldot1dStpVlanPortVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortVlan.setStatus('current') rldot1dStpVlanPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortPort.setStatus('current') rldot1dStpVlanPortPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpVlanPortPriority.setStatus('current') rldot1dStpVlanPortState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("disabled", 1), ("blocking", 2), ("listening", 3), ("learning", 4), ("forwarding", 5), ("broken", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortState.setStatus('current') rldot1dStpVlanPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpVlanPortEnable.setStatus('current') rldot1dStpVlanPortPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpVlanPortPathCost.setStatus('current') rldot1dStpVlanPortDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 7), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedRoot.setStatus('current') rldot1dStpVlanPortDesignatedCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedCost.setStatus('current') rldot1dStpVlanPortDesignatedBridge = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 9), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedBridge.setStatus('current') rldot1dStpVlanPortDesignatedPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedPort.setStatus('current') rldot1dStpVlanPortForwardTransitions = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpVlanPortForwardTransitions.setStatus('current') rldot1dStpTrapVariable = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 8)) rldot1dStpTrapVrblifIndex = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 8, 1), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpTrapVrblifIndex.setStatus('current') rldot1dStpTrapVrblVID = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 8, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpTrapVrblVID.setStatus('current') rldot1dStpTypeAfterReset = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4))).clone(namedValues=NamedValues(("perDevice", 1), ("mstp", 4))).clone('perDevice')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpTypeAfterReset.setStatus('current') rldot1dStpMonitorTime = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 20)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpMonitorTime.setStatus('current') rldot1dStpBpduCount = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 60)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpBpduCount.setStatus('current') rldot1dStpLastChanged = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 12), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpLastChanged.setStatus('current') rldot1dStpPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13), ) if mibBuilder.loadTexts: rldot1dStpPortTable.setStatus('current') rldot1dStpPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1dStpPortPort")) if mibBuilder.loadTexts: rldot1dStpPortEntry.setStatus('current') rldot1dStpPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortPort.setStatus('current') rldot1dStpPortDampEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortDampEnable.setStatus('current') rldot1dStpPortDampStable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 3), TruthValue().clone('true')).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortDampStable.setStatus('current') rldot1dStpPortFilterBpdu = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("false", 0), ("true", 1), ("none", 2))).clone('none')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortFilterBpdu.setStatus('current') rldot1dStpPortBpduSent = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortBpduSent.setStatus('current') rldot1dStpPortBpduReceived = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortBpduReceived.setStatus('current') rldot1dStpPortRole = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 0), ("disabled", 1), ("alternate", 2), ("backup", 3), ("root", 4), ("designated", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortRole.setStatus('current') rldot1dStpBpduType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("stp", 0), ("rstp", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpBpduType.setStatus('current') rldot1dStpPortRestrictedRole = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 9), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortRestrictedRole.setStatus('current') rldot1dStpPortAutoEdgePort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 10), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortAutoEdgePort.setStatus('current') rldot1dStpPortLoopback = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 11), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortLoopback.setStatus('current') rldot1dStpPortBpduOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("filter", 0), ("flood", 1), ("bridge", 2), ("stp", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortBpduOperStatus.setStatus('current') rldot1dStpPortsEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 14), TruthValue().clone('true')).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortsEnable.setStatus('current') rldot1dStpTaggedFlooding = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 15), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpTaggedFlooding.setStatus('current') rldot1dStpPortBelongToVlanDefault = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 16), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpPortBelongToVlanDefault.setStatus('current') rldot1dStpEnableByDefault = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 17), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpEnableByDefault.setStatus('current') rldot1dStpPortToDefault = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 18), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortToDefault.setStatus('current') rldot1dStpSupportedType = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("perDevice", 1), ("perVlan", 2), ("mstp", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpSupportedType.setStatus('current') rldot1dStpEdgeportSupportInStp = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 20), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dStpEdgeportSupportInStp.setStatus('current') rldot1dStpFilterBpdu = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 21), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpFilterBpdu.setStatus('current') rldot1dStpFloodBpduMethod = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("classic", 0), ("bridging", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpFloodBpduMethod.setStatus('current') rldot1dStpSeparatedBridges = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23)) rldot1dStpPortBpduGuardTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 24), ) if mibBuilder.loadTexts: rldot1dStpPortBpduGuardTable.setStatus('current') rldot1dStpPortBpduGuardEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 24, 1), ).setIndexNames((0, "BRIDGE-MIB", "dot1dBasePort")) if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEntry.setStatus('current') rldot1dStpPortBpduGuardEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 24, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEnable.setStatus('current') rldot1dStpLoopbackGuardEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 25), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpLoopbackGuardEnable.setStatus('current') rldot1dStpSeparatedBridgesTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 1), ) if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesTable.setStatus('current') rldot1dStpSeparatedBridgesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEntry.setStatus('current') rldot1dStpSeparatedBridgesPortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesPortEnable.setStatus('current') rldot1dStpSeparatedBridgesEnable = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEnable.setStatus('current') rldot1dStpSeparatedBridgesAutoConfig = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesAutoConfig.setStatus('current') rldot1dExtBase = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 3)) rldot1dExtBaseMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dExtBaseMibVersion.setStatus('current') rldot1dDeviceCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 3, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dDeviceCapabilities.setStatus('current') rldot1wRStp = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4)) rldot1wRStpVlanEdgePortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1), ) if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortTable.setStatus('current') rldot1wRStpVlanEdgePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1wRStpVlanEdgePortVlan"), (0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1wRStpVlanEdgePortPort")) if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortEntry.setStatus('current') rldot1wRStpVlanEdgePortVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortVlan.setStatus('current') rldot1wRStpVlanEdgePortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortPort.setStatus('current') rldot1wRStpEdgePortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1wRStpEdgePortStatus.setStatus('current') rldot1wRStpForceVersionTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2), ) if mibBuilder.loadTexts: rldot1wRStpForceVersionTable.setStatus('current') rldot1wRStpForceVersionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1wRStpForceVersionVlan")) if mibBuilder.loadTexts: rldot1wRStpForceVersionEntry.setStatus('current') rldot1wRStpForceVersionVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4095))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1wRStpForceVersionVlan.setStatus('current') rldot1wRStpForceVersionState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2, 1, 2), Integer32().clone(2)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1wRStpForceVersionState.setStatus('current') rldot1pPriorityMap = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5)) rldot1pPriorityMapState = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1pPriorityMapState.setStatus('current') rldot1pPriorityMapTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2), ) if mibBuilder.loadTexts: rldot1pPriorityMapTable.setStatus('current') rldot1pPriorityMapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1pPriorityMapName")) if mibBuilder.loadTexts: rldot1pPriorityMapEntry.setStatus('current') rldot1pPriorityMapName = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 25))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1pPriorityMapName.setStatus('current') rldot1pPriorityMapPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(8, 8)).setFixedLength(8)).setMaxAccess("readcreate") if mibBuilder.loadTexts: rldot1pPriorityMapPriority.setStatus('current') rldot1pPriorityMapPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 3), PortList()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rldot1pPriorityMapPort.setStatus('current') rldot1pPriorityMapPortList = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 4), PortList()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1pPriorityMapPortList.setStatus('current') rldot1pPriorityMapStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rldot1pPriorityMapStatus.setStatus('current') rldot1sMstp = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6)) rldot1sMstpInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1), ) if mibBuilder.loadTexts: rldot1sMstpInstanceTable.setStatus('current') rldot1sMstpInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstanceId")) if mibBuilder.loadTexts: rldot1sMstpInstanceEntry.setStatus('current') rldot1sMstpInstanceId = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceId.setStatus('current') rldot1sMstpInstanceEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceEnable.setStatus('current') rldot1sMstpInstanceTimeSinceTopologyChange = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceTimeSinceTopologyChange.setStatus('current') rldot1sMstpInstanceTopChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceTopChanges.setStatus('current') rldot1sMstpInstanceDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 5), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceDesignatedRoot.setStatus('current') rldot1sMstpInstanceRootCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceRootCost.setStatus('current') rldot1sMstpInstanceRootPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceRootPort.setStatus('current') rldot1sMstpInstanceMaxAge = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 8), Timeout()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceMaxAge.setStatus('current') rldot1sMstpInstanceHelloTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 9), Timeout()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceHelloTime.setStatus('current') rldot1sMstpInstanceHoldTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceHoldTime.setStatus('current') rldot1sMstpInstanceForwardDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 11), Timeout()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceForwardDelay.setStatus('current') rldot1sMstpInstancePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 61440))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpInstancePriority.setStatus('current') rldot1sMstpInstanceRemainingHopes = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstanceRemainingHopes.setStatus('current') rldot1sMstpInstancePortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2), ) if mibBuilder.loadTexts: rldot1sMstpInstancePortTable.setStatus('current') rldot1sMstpInstancePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstancePortMstiId"), (0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpInstancePortPort")) if mibBuilder.loadTexts: rldot1sMstpInstancePortEntry.setStatus('current') rldot1sMstpInstancePortMstiId = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortMstiId.setStatus('current') rldot1sMstpInstancePortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortPort.setStatus('current') rldot1sMstpInstancePortPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 240))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpInstancePortPriority.setStatus('current') rldot1sMstpInstancePortState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("disabled", 1), ("blocking", 2), ("listening", 3), ("learning", 4), ("forwarding", 5), ("broken", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortState.setStatus('current') rldot1sMstpInstancePortEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortEnable.setStatus('current') rldot1sMstpInstancePortPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 200000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortPathCost.setStatus('current') rldot1sMstpInstancePortDesignatedRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 7), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedRoot.setStatus('current') rldot1sMstpInstancePortDesignatedCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedCost.setStatus('current') rldot1sMstpInstancePortDesignatedBridge = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 9), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedBridge.setStatus('current') rldot1sMstpInstancePortDesignatedPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedPort.setStatus('current') rldot1sMstpInstancePortForwardTransitions = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpInstancePortForwardTransitions.setStatus('current') rldot1sMStpInstancePortAdminPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200000000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMStpInstancePortAdminPathCost.setStatus('current') rldot1sMStpInstancePortRole = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 0), ("disabled", 1), ("alternate", 2), ("backup", 3), ("root", 4), ("designated", 5), ("master", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMStpInstancePortRole.setStatus('current') rldot1sMstpMaxHopes = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 40)).clone(20)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpMaxHopes.setStatus('current') rldot1sMstpConfigurationName = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 4), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpConfigurationName.setStatus('current') rldot1sMstpRevisionLevel = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpRevisionLevel.setStatus('current') rldot1sMstpVlanTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6), ) if mibBuilder.loadTexts: rldot1sMstpVlanTable.setStatus('current') rldot1sMstpVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpVlan")) if mibBuilder.loadTexts: rldot1sMstpVlanEntry.setStatus('current') rldot1sMstpVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpVlan.setStatus('current') rldot1sMstpGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpGroup.setStatus('current') rldot1sMstpPendingGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpPendingGroup.setStatus('current') rldot1sMstpExtPortTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7), ) if mibBuilder.loadTexts: rldot1sMstpExtPortTable.setStatus('current') rldot1sMstpExtPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1), ).setIndexNames((0, "DLINK-3100-BRIDGEMIBOBJECTS-MIB", "rldot1sMstpExtPortPort")) if mibBuilder.loadTexts: rldot1sMstpExtPortEntry.setStatus('current') rldot1sMstpExtPortPort = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpExtPortPort.setStatus('current') rldot1sMstpExtPortInternalOperPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 200000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpExtPortInternalOperPathCost.setStatus('current') rldot1sMstpExtPortDesignatedRegionalRoot = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 3), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalRoot.setStatus('current') rldot1sMstpExtPortDesignatedRegionalCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalCost.setStatus('current') rldot1sMstpExtPortBoundary = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 5), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpExtPortBoundary.setStatus('current') rldot1sMstpExtPortInternalAdminPathCost = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 200000000))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpExtPortInternalAdminPathCost.setStatus('current') rldot1sMstpDesignatedMaxHopes = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 40))).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpDesignatedMaxHopes.setStatus('current') rldot1sMstpRegionalRoot = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 9), BridgeId()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpRegionalRoot.setStatus('current') rldot1sMstpRegionalRootCost = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpRegionalRootCost.setStatus('current') rldot1sMstpPendingConfigurationName = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 11), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpPendingConfigurationName.setStatus('current') rldot1sMstpPendingRevisionLevel = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpPendingRevisionLevel.setStatus('current') rldot1sMstpPendingAction = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("copyPendingActive", 1), ("copyActivePending", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rldot1sMstpPendingAction.setStatus('current') rldot1sMstpRemainingHops = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1sMstpRemainingHops.setStatus('current') rldot1dTpAgingTime = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 7)) rldot1dTpAgingTimeMin = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 7, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dTpAgingTimeMin.setStatus('current') rldot1dTpAgingTimeMax = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 7, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rldot1dTpAgingTimeMax.setStatus('current') mibBuilder.exportSymbols("DLINK-3100-BRIDGEMIBOBJECTS-MIB", rldot1dStpVlanPortDesignatedBridge=rldot1dStpVlanPortDesignatedBridge, rldot1pPriorityMapEntry=rldot1pPriorityMapEntry, rldot1sMStpInstancePortRole=rldot1sMStpInstancePortRole, rldot1sMstpInstancePriority=rldot1sMstpInstancePriority, rldot1pPriorityMapPriority=rldot1pPriorityMapPriority, rldot1dStpVlan=rldot1dStpVlan, rldot1sMstpExtPortInternalAdminPathCost=rldot1sMstpExtPortInternalAdminPathCost, rldot1dStpVlanPortPriority=rldot1dStpVlanPortPriority, rldot1sMstpInstancePortPathCost=rldot1sMstpInstancePortPathCost, rlpBridgeMIBObjects=rlpBridgeMIBObjects, rldot1dStpMibVersion=rldot1dStpMibVersion, rldot1sMstpExtPortPort=rldot1sMstpExtPortPort, rldot1sMstpInstanceHoldTime=rldot1sMstpInstanceHoldTime, rldot1dStpPortBpduSent=rldot1dStpPortBpduSent, rldot1sMstpInstancePortPort=rldot1sMstpInstancePortPort, rldot1sMstpConfigurationName=rldot1sMstpConfigurationName, rldot1dStpSeparatedBridgesTable=rldot1dStpSeparatedBridgesTable, rldot1dStpTopChanges=rldot1dStpTopChanges, rldot1dStpTypeAfterReset=rldot1dStpTypeAfterReset, rldot1dStpHoldTime=rldot1dStpHoldTime, rldot1dExtBaseMibVersion=rldot1dExtBaseMibVersion, rldot1dTpAgingTime=rldot1dTpAgingTime, rldot1sMstpInstancePortDesignatedBridge=rldot1sMstpInstancePortDesignatedBridge, rldot1dTpAgingTimeMin=rldot1dTpAgingTimeMin, rldot1dStpVlanPortForwardTransitions=rldot1dStpVlanPortForwardTransitions, rldot1dExtBase=rldot1dExtBase, rldot1dStpBpduType=rldot1dStpBpduType, rldot1sMstpInstanceId=rldot1sMstpInstanceId, rldot1sMstp=rldot1sMstp, rldot1sMstpRegionalRootCost=rldot1sMstpRegionalRootCost, rldot1dStpSeparatedBridgesEntry=rldot1dStpSeparatedBridgesEntry, rldot1dStpPortBpduReceived=rldot1dStpPortBpduReceived, rldot1sMstpGroup=rldot1sMstpGroup, rldot1sMstpPendingGroup=rldot1sMstpPendingGroup, rldot1dStpSeparatedBridgesEnable=rldot1dStpSeparatedBridgesEnable, rldot1dPriorityPortGroupTable=rldot1dPriorityPortGroupTable, rldot1dStpRootPort=rldot1dStpRootPort, rldot1dStpPortsEnable=rldot1dStpPortsEnable, rldot1sMstpInstanceTimeSinceTopologyChange=rldot1sMstpInstanceTimeSinceTopologyChange, rldot1pPriorityMapName=rldot1pPriorityMapName, rldot1pPriorityMap=rldot1pPriorityMap, rldot1sMstpInstanceRootCost=rldot1sMstpInstanceRootCost, rldot1dStpDesignatedRoot=rldot1dStpDesignatedRoot, rldot1dStp=rldot1dStp, rldot1sMstpInstancePortPriority=rldot1sMstpInstancePortPriority, rldot1dDeviceCapabilities=rldot1dDeviceCapabilities, rldot1sMstpPendingConfigurationName=rldot1sMstpPendingConfigurationName, rldot1sMstpInstanceEnable=rldot1sMstpInstanceEnable, rldot1dPriorityPortGroupEntry=rldot1dPriorityPortGroupEntry, rldot1dStpPortLoopback=rldot1dStpPortLoopback, rldot1sMstpRegionalRoot=rldot1sMstpRegionalRoot, rldot1pPriorityMapStatus=rldot1pPriorityMapStatus, rldot1sMstpInstanceTable=rldot1sMstpInstanceTable, rldot1dStpVlanEntry=rldot1dStpVlanEntry, rldot1dStpMaxAge=rldot1dStpMaxAge, rldot1sMstpMaxHopes=rldot1sMstpMaxHopes, rldot1dStpPortPort=rldot1dStpPortPort, rldot1sMStpInstancePortAdminPathCost=rldot1sMStpInstancePortAdminPathCost, rldot1dStpTrapVrblifIndex=rldot1dStpTrapVrblifIndex, rldot1wRStpForceVersionEntry=rldot1wRStpForceVersionEntry, rldot1dTpAgingTimeMax=rldot1dTpAgingTimeMax, rldot1dStpBpduCount=rldot1dStpBpduCount, rldot1sMstpPendingRevisionLevel=rldot1sMstpPendingRevisionLevel, rldot1dStpPortBpduGuardEntry=rldot1dStpPortBpduGuardEntry, rldot1dStpPortTable=rldot1dStpPortTable, rldot1dStpVlanPortDesignatedPort=rldot1dStpVlanPortDesignatedPort, rldot1dStpExtendedPortNumberFormat=rldot1dStpExtendedPortNumberFormat, rldot1dStpVlanPortVlan=rldot1dStpVlanPortVlan, rldot1wRStpForceVersionState=rldot1wRStpForceVersionState, rldot1sMstpInstancePortForwardTransitions=rldot1sMstpInstancePortForwardTransitions, rldot1dStpVlanEnable=rldot1dStpVlanEnable, rldot1sMstpInstanceForwardDelay=rldot1sMstpInstanceForwardDelay, rldot1dStpPortFilterBpdu=rldot1dStpPortFilterBpdu, rldot1dStpPortBpduGuardTable=rldot1dStpPortBpduGuardTable, rldot1dPriorityPortGroupNumber=rldot1dPriorityPortGroupNumber, rldot1dStpTrapVrblVID=rldot1dStpTrapVrblVID, rldot1dStpSeparatedBridges=rldot1dStpSeparatedBridges, rldot1dStpVlanTable=rldot1dStpVlanTable, rldot1dStpMonitorTime=rldot1dStpMonitorTime, rldot1sMstpExtPortInternalOperPathCost=rldot1sMstpExtPortInternalOperPathCost, rldot1pPriorityMapPort=rldot1pPriorityMapPort, rldot1dStpPortRole=rldot1dStpPortRole, rldot1wRStpForceVersionVlan=rldot1wRStpForceVersionVlan, rldot1pPriorityMapTable=rldot1pPriorityMapTable, rldot1dStpVlanPortEntry=rldot1dStpVlanPortEntry, rldot1dStpSeparatedBridgesPortEnable=rldot1dStpSeparatedBridgesPortEnable, rldot1sMstpInstancePortDesignatedRoot=rldot1sMstpInstancePortDesignatedRoot, rldot1sMstpInstanceEntry=rldot1sMstpInstanceEntry, rldot1sMstpVlanTable=rldot1sMstpVlanTable, PYSNMP_MODULE_ID=rlpBridgeMIBObjects, rldot1dPriority=rldot1dPriority, rldot1dStpPortBpduOperStatus=rldot1dStpPortBpduOperStatus, rldot1wRStpVlanEdgePortEntry=rldot1wRStpVlanEdgePortEntry, rldot1pPriorityMapState=rldot1pPriorityMapState, rldot1dStpPortDampEnable=rldot1dStpPortDampEnable, rldot1sMstpExtPortDesignatedRegionalRoot=rldot1sMstpExtPortDesignatedRegionalRoot, rldot1sMstpInstancePortTable=rldot1sMstpInstancePortTable, rldot1dStpType=rldot1dStpType, rldot1dStpPortDampStable=rldot1dStpPortDampStable, rldot1dStpPortEntry=rldot1dStpPortEntry, rldot1dStpVlanPortPathCost=rldot1dStpVlanPortPathCost, rldot1dStpEdgeportSupportInStp=rldot1dStpEdgeportSupportInStp, rldot1sMstpExtPortEntry=rldot1sMstpExtPortEntry, rldot1sMstpInstanceRootPort=rldot1sMstpInstanceRootPort, rldot1sMstpVlanEntry=rldot1sMstpVlanEntry, rldot1wRStp=rldot1wRStp, rldot1sMstpInstanceTopChanges=rldot1sMstpInstanceTopChanges, rldot1dStpVlanPortDesignatedCost=rldot1dStpVlanPortDesignatedCost, rldot1sMstpDesignatedMaxHopes=rldot1sMstpDesignatedMaxHopes, rldot1dStpHelloTime=rldot1dStpHelloTime, rldot1dPriorityMibVersion=rldot1dPriorityMibVersion, rldot1dStpTaggedFlooding=rldot1dStpTaggedFlooding, rldot1dStpPortBpduGuardEnable=rldot1dStpPortBpduGuardEnable, rldot1dStpEnable=rldot1dStpEnable, rldot1wRStpVlanEdgePortPort=rldot1wRStpVlanEdgePortPort, rldot1wRStpVlanEdgePortTable=rldot1wRStpVlanEdgePortTable, rldot1sMstpInstanceRemainingHopes=rldot1sMstpInstanceRemainingHopes, rldot1wRStpVlanEdgePortVlan=rldot1wRStpVlanEdgePortVlan, rldot1dStpPortToDefault=rldot1dStpPortToDefault, rldot1dStpLastChanged=rldot1dStpLastChanged, rldot1sMstpPendingAction=rldot1sMstpPendingAction, rldot1dStpRootCost=rldot1dStpRootCost, rldot1sMstpInstancePortDesignatedPort=rldot1sMstpInstancePortDesignatedPort, rldot1dStpForwardDelay=rldot1dStpForwardDelay, rldot1wRStpEdgePortStatus=rldot1wRStpEdgePortStatus, rldot1sMstpExtPortTable=rldot1sMstpExtPortTable, rldot1sMstpInstanceDesignatedRoot=rldot1sMstpInstanceDesignatedRoot, rldot1sMstpInstancePortEnable=rldot1sMstpInstancePortEnable, rldot1dStpVlanPortDesignatedRoot=rldot1dStpVlanPortDesignatedRoot, rldot1sMstpInstancePortDesignatedCost=rldot1sMstpInstancePortDesignatedCost, rldot1dStpTimeSinceTopologyChange=rldot1dStpTimeSinceTopologyChange, rldot1dStpVlanPortState=rldot1dStpVlanPortState, rldot1pPriorityMapPortList=rldot1pPriorityMapPortList, rldot1sMstpInstancePortMstiId=rldot1sMstpInstancePortMstiId, rldot1sMstpInstanceMaxAge=rldot1sMstpInstanceMaxAge, rldot1sMstpInstancePortEntry=rldot1sMstpInstancePortEntry, rldot1dStpPortBelongToVlanDefault=rldot1dStpPortBelongToVlanDefault, rldot1sMstpExtPortBoundary=rldot1sMstpExtPortBoundary, rldot1dStpEnableByDefault=rldot1dStpEnableByDefault, rldot1sMstpRemainingHops=rldot1sMstpRemainingHops, rldot1dStpFloodBpduMethod=rldot1dStpFloodBpduMethod, rldot1dStpSeparatedBridgesAutoConfig=rldot1dStpSeparatedBridgesAutoConfig, rldot1dStpPortRestrictedRole=rldot1dStpPortRestrictedRole, rldot1dStpTrapVariable=rldot1dStpTrapVariable, rldot1dStpVlanPortEnable=rldot1dStpVlanPortEnable, rldot1sMstpInstanceHelloTime=rldot1sMstpInstanceHelloTime, rldot1dStpSupportedType=rldot1dStpSupportedType, rldot1dStpLoopbackGuardEnable=rldot1dStpLoopbackGuardEnable, rldot1wRStpForceVersionTable=rldot1wRStpForceVersionTable, rldot1sMstpInstancePortState=rldot1sMstpInstancePortState, rldot1sMstpVlan=rldot1sMstpVlan, rldot1dStpPortAutoEdgePort=rldot1dStpPortAutoEdgePort, rldot1sMstpRevisionLevel=rldot1sMstpRevisionLevel, rldot1dStpFilterBpdu=rldot1dStpFilterBpdu, rldot1dStpVlanPortTable=rldot1dStpVlanPortTable, rldot1sMstpExtPortDesignatedRegionalCost=rldot1sMstpExtPortDesignatedRegionalCost, rldot1dStpVlanPortPort=rldot1dStpVlanPortPort, rldot1dStpPortMustBelongToVlan=rldot1dStpPortMustBelongToVlan)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion') (timeout, bridge_id, dot1d_base_port) = mibBuilder.importSymbols('BRIDGE-MIB', 'Timeout', 'BridgeId', 'dot1dBasePort') (rnd,) = mibBuilder.importSymbols('DLINK-3100-MIB', 'rnd') (interface_index, if_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'ifIndex') (port_list,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'PortList') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (iso, counter64, time_ticks, module_identity, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, object_identity, notification_type, mib_identifier, integer32, gauge32, unsigned32, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Counter64', 'TimeTicks', 'ModuleIdentity', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'ObjectIdentity', 'NotificationType', 'MibIdentifier', 'Integer32', 'Gauge32', 'Unsigned32', 'Counter32') (row_status, truth_value, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TruthValue', 'TextualConvention', 'DisplayString') rlp_bridge_mib_objects = module_identity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57)) rlpBridgeMIBObjects.setRevisions(('2007-01-02 00:00',)) if mibBuilder.loadTexts: rlpBridgeMIBObjects.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlpBridgeMIBObjects.setOrganization('Dlink, Inc. Dlink Semiconductor, Inc.') rldot1d_priority = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1)) rldot1d_priority_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dPriorityMibVersion.setStatus('current') rldot1d_priority_port_group_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 2)) if mibBuilder.loadTexts: rldot1dPriorityPortGroupTable.setStatus('current') rldot1d_priority_port_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 2, 1)).setIndexNames((0, 'BRIDGE-MIB', 'dot1dBasePort')) if mibBuilder.loadTexts: rldot1dPriorityPortGroupEntry.setStatus('current') rldot1d_priority_port_group_number = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 1, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dPriorityPortGroupNumber.setStatus('current') rldot1d_stp = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2)) rldot1d_stp_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpMibVersion.setStatus('current') rldot1d_stp_type = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4))).clone(namedValues=named_values(('perDevice', 1), ('mstp', 4)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpType.setStatus('current') rldot1d_stp_enable = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 3), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpEnable.setStatus('current') rldot1d_stp_port_must_belong_to_vlan = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 4), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortMustBelongToVlan.setStatus('current') rldot1d_stp_extended_port_number_format = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 5), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpExtendedPortNumberFormat.setStatus('current') rldot1d_stp_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6)) if mibBuilder.loadTexts: rldot1dStpVlanTable.setStatus('current') rldot1d_stp_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpVlan')) if mibBuilder.loadTexts: rldot1dStpVlanEntry.setStatus('current') rldot1d_stp_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlan.setStatus('current') rldot1d_stp_vlan_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 2), truth_value().clone('true')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpVlanEnable.setStatus('current') rldot1d_stp_time_since_topology_change = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 3), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpTimeSinceTopologyChange.setStatus('current') rldot1d_stp_top_changes = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpTopChanges.setStatus('current') rldot1d_stp_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 5), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpDesignatedRoot.setStatus('current') rldot1d_stp_root_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpRootCost.setStatus('current') rldot1d_stp_root_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpRootPort.setStatus('current') rldot1d_stp_max_age = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 8), timeout()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpMaxAge.setStatus('current') rldot1d_stp_hello_time = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 9), timeout()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpHelloTime.setStatus('current') rldot1d_stp_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpHoldTime.setStatus('current') rldot1d_stp_forward_delay = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 6, 1, 11), timeout()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpForwardDelay.setStatus('current') rldot1d_stp_vlan_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7)) if mibBuilder.loadTexts: rldot1dStpVlanPortTable.setStatus('current') rldot1d_stp_vlan_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpVlanPortVlan'), (0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpVlanPortPort')) if mibBuilder.loadTexts: rldot1dStpVlanPortEntry.setStatus('current') rldot1d_stp_vlan_port_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortVlan.setStatus('current') rldot1d_stp_vlan_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortPort.setStatus('current') rldot1d_stp_vlan_port_priority = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpVlanPortPriority.setStatus('current') rldot1d_stp_vlan_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('disabled', 1), ('blocking', 2), ('listening', 3), ('learning', 4), ('forwarding', 5), ('broken', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortState.setStatus('current') rldot1d_stp_vlan_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpVlanPortEnable.setStatus('current') rldot1d_stp_vlan_port_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpVlanPortPathCost.setStatus('current') rldot1d_stp_vlan_port_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 7), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedRoot.setStatus('current') rldot1d_stp_vlan_port_designated_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedCost.setStatus('current') rldot1d_stp_vlan_port_designated_bridge = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 9), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedBridge.setStatus('current') rldot1d_stp_vlan_port_designated_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortDesignatedPort.setStatus('current') rldot1d_stp_vlan_port_forward_transitions = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 7, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpVlanPortForwardTransitions.setStatus('current') rldot1d_stp_trap_variable = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 8)) rldot1d_stp_trap_vrblif_index = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 8, 1), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpTrapVrblifIndex.setStatus('current') rldot1d_stp_trap_vrbl_vid = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 8, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpTrapVrblVID.setStatus('current') rldot1d_stp_type_after_reset = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4))).clone(namedValues=named_values(('perDevice', 1), ('mstp', 4))).clone('perDevice')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpTypeAfterReset.setStatus('current') rldot1d_stp_monitor_time = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 10), integer32().subtype(subtypeSpec=value_range_constraint(1, 20)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpMonitorTime.setStatus('current') rldot1d_stp_bpdu_count = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 60)).clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpBpduCount.setStatus('current') rldot1d_stp_last_changed = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 12), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpLastChanged.setStatus('current') rldot1d_stp_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13)) if mibBuilder.loadTexts: rldot1dStpPortTable.setStatus('current') rldot1d_stp_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1dStpPortPort')) if mibBuilder.loadTexts: rldot1dStpPortEntry.setStatus('current') rldot1d_stp_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortPort.setStatus('current') rldot1d_stp_port_damp_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 2), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortDampEnable.setStatus('current') rldot1d_stp_port_damp_stable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 3), truth_value().clone('true')).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortDampStable.setStatus('current') rldot1d_stp_port_filter_bpdu = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('false', 0), ('true', 1), ('none', 2))).clone('none')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortFilterBpdu.setStatus('current') rldot1d_stp_port_bpdu_sent = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortBpduSent.setStatus('current') rldot1d_stp_port_bpdu_received = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortBpduReceived.setStatus('current') rldot1d_stp_port_role = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 0), ('disabled', 1), ('alternate', 2), ('backup', 3), ('root', 4), ('designated', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortRole.setStatus('current') rldot1d_stp_bpdu_type = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('stp', 0), ('rstp', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpBpduType.setStatus('current') rldot1d_stp_port_restricted_role = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 9), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortRestrictedRole.setStatus('current') rldot1d_stp_port_auto_edge_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 10), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortAutoEdgePort.setStatus('current') rldot1d_stp_port_loopback = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 11), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortLoopback.setStatus('current') rldot1d_stp_port_bpdu_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 13, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('filter', 0), ('flood', 1), ('bridge', 2), ('stp', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortBpduOperStatus.setStatus('current') rldot1d_stp_ports_enable = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 14), truth_value().clone('true')).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortsEnable.setStatus('current') rldot1d_stp_tagged_flooding = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 15), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpTaggedFlooding.setStatus('current') rldot1d_stp_port_belong_to_vlan_default = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 16), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpPortBelongToVlanDefault.setStatus('current') rldot1d_stp_enable_by_default = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 17), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpEnableByDefault.setStatus('current') rldot1d_stp_port_to_default = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 18), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortToDefault.setStatus('current') rldot1d_stp_supported_type = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('perDevice', 1), ('perVlan', 2), ('mstp', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpSupportedType.setStatus('current') rldot1d_stp_edgeport_support_in_stp = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 20), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dStpEdgeportSupportInStp.setStatus('current') rldot1d_stp_filter_bpdu = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 21), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpFilterBpdu.setStatus('current') rldot1d_stp_flood_bpdu_method = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('classic', 0), ('bridging', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpFloodBpduMethod.setStatus('current') rldot1d_stp_separated_bridges = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23)) rldot1d_stp_port_bpdu_guard_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 24)) if mibBuilder.loadTexts: rldot1dStpPortBpduGuardTable.setStatus('current') rldot1d_stp_port_bpdu_guard_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 24, 1)).setIndexNames((0, 'BRIDGE-MIB', 'dot1dBasePort')) if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEntry.setStatus('current') rldot1d_stp_port_bpdu_guard_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 24, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpPortBpduGuardEnable.setStatus('current') rldot1d_stp_loopback_guard_enable = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 25), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpLoopbackGuardEnable.setStatus('current') rldot1d_stp_separated_bridges_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 1)) if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesTable.setStatus('current') rldot1d_stp_separated_bridges_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEntry.setStatus('current') rldot1d_stp_separated_bridges_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 1, 1, 1), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesPortEnable.setStatus('current') rldot1d_stp_separated_bridges_enable = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 2), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesEnable.setStatus('current') rldot1d_stp_separated_bridges_auto_config = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 2, 23, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1dStpSeparatedBridgesAutoConfig.setStatus('current') rldot1d_ext_base = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 3)) rldot1d_ext_base_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 3, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dExtBaseMibVersion.setStatus('current') rldot1d_device_capabilities = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 3, 2), octet_string().subtype(subtypeSpec=value_size_constraint(1, 1)).setFixedLength(1)).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dDeviceCapabilities.setStatus('current') rldot1w_r_stp = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4)) rldot1w_r_stp_vlan_edge_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1)) if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortTable.setStatus('current') rldot1w_r_stp_vlan_edge_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1wRStpVlanEdgePortVlan'), (0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1wRStpVlanEdgePortPort')) if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortEntry.setStatus('current') rldot1w_r_stp_vlan_edge_port_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortVlan.setStatus('current') rldot1w_r_stp_vlan_edge_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1wRStpVlanEdgePortPort.setStatus('current') rldot1w_r_stp_edge_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 1, 1, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1wRStpEdgePortStatus.setStatus('current') rldot1w_r_stp_force_version_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2)) if mibBuilder.loadTexts: rldot1wRStpForceVersionTable.setStatus('current') rldot1w_r_stp_force_version_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1wRStpForceVersionVlan')) if mibBuilder.loadTexts: rldot1wRStpForceVersionEntry.setStatus('current') rldot1w_r_stp_force_version_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4095))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1wRStpForceVersionVlan.setStatus('current') rldot1w_r_stp_force_version_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 4, 2, 1, 2), integer32().clone(2)).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1wRStpForceVersionState.setStatus('current') rldot1p_priority_map = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5)) rldot1p_priority_map_state = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1pPriorityMapState.setStatus('current') rldot1p_priority_map_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2)) if mibBuilder.loadTexts: rldot1pPriorityMapTable.setStatus('current') rldot1p_priority_map_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1pPriorityMapName')) if mibBuilder.loadTexts: rldot1pPriorityMapEntry.setStatus('current') rldot1p_priority_map_name = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 25))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1pPriorityMapName.setStatus('current') rldot1p_priority_map_priority = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(8, 8)).setFixedLength(8)).setMaxAccess('readcreate') if mibBuilder.loadTexts: rldot1pPriorityMapPriority.setStatus('current') rldot1p_priority_map_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 3), port_list()).setMaxAccess('readcreate') if mibBuilder.loadTexts: rldot1pPriorityMapPort.setStatus('current') rldot1p_priority_map_port_list = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 4), port_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1pPriorityMapPortList.setStatus('current') rldot1p_priority_map_status = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 5, 2, 1, 5), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: rldot1pPriorityMapStatus.setStatus('current') rldot1s_mstp = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6)) rldot1s_mstp_instance_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1)) if mibBuilder.loadTexts: rldot1sMstpInstanceTable.setStatus('current') rldot1s_mstp_instance_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstanceId')) if mibBuilder.loadTexts: rldot1sMstpInstanceEntry.setStatus('current') rldot1s_mstp_instance_id = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceId.setStatus('current') rldot1s_mstp_instance_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 2), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceEnable.setStatus('current') rldot1s_mstp_instance_time_since_topology_change = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 3), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceTimeSinceTopologyChange.setStatus('current') rldot1s_mstp_instance_top_changes = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceTopChanges.setStatus('current') rldot1s_mstp_instance_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 5), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceDesignatedRoot.setStatus('current') rldot1s_mstp_instance_root_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceRootCost.setStatus('current') rldot1s_mstp_instance_root_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceRootPort.setStatus('current') rldot1s_mstp_instance_max_age = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 8), timeout()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceMaxAge.setStatus('current') rldot1s_mstp_instance_hello_time = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 9), timeout()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceHelloTime.setStatus('current') rldot1s_mstp_instance_hold_time = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceHoldTime.setStatus('current') rldot1s_mstp_instance_forward_delay = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 11), timeout()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceForwardDelay.setStatus('current') rldot1s_mstp_instance_priority = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 61440))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpInstancePriority.setStatus('current') rldot1s_mstp_instance_remaining_hopes = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 1, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstanceRemainingHopes.setStatus('current') rldot1s_mstp_instance_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2)) if mibBuilder.loadTexts: rldot1sMstpInstancePortTable.setStatus('current') rldot1s_mstp_instance_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstancePortMstiId'), (0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpInstancePortPort')) if mibBuilder.loadTexts: rldot1sMstpInstancePortEntry.setStatus('current') rldot1s_mstp_instance_port_msti_id = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortMstiId.setStatus('current') rldot1s_mstp_instance_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortPort.setStatus('current') rldot1s_mstp_instance_port_priority = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 240))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpInstancePortPriority.setStatus('current') rldot1s_mstp_instance_port_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('disabled', 1), ('blocking', 2), ('listening', 3), ('learning', 4), ('forwarding', 5), ('broken', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortState.setStatus('current') rldot1s_mstp_instance_port_enable = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortEnable.setStatus('current') rldot1s_mstp_instance_port_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 200000000))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortPathCost.setStatus('current') rldot1s_mstp_instance_port_designated_root = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 7), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedRoot.setStatus('current') rldot1s_mstp_instance_port_designated_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedCost.setStatus('current') rldot1s_mstp_instance_port_designated_bridge = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 9), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedBridge.setStatus('current') rldot1s_mstp_instance_port_designated_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 10), octet_string().subtype(subtypeSpec=value_size_constraint(2, 2)).setFixedLength(2)).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortDesignatedPort.setStatus('current') rldot1s_mstp_instance_port_forward_transitions = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpInstancePortForwardTransitions.setStatus('current') rldot1s_m_stp_instance_port_admin_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 200000000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMStpInstancePortAdminPathCost.setStatus('current') rldot1s_m_stp_instance_port_role = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 2, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('unknown', 0), ('disabled', 1), ('alternate', 2), ('backup', 3), ('root', 4), ('designated', 5), ('master', 6)))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMStpInstancePortRole.setStatus('current') rldot1s_mstp_max_hopes = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 40)).clone(20)).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpMaxHopes.setStatus('current') rldot1s_mstp_configuration_name = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 4), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpConfigurationName.setStatus('current') rldot1s_mstp_revision_level = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpRevisionLevel.setStatus('current') rldot1s_mstp_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6)) if mibBuilder.loadTexts: rldot1sMstpVlanTable.setStatus('current') rldot1s_mstp_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpVlan')) if mibBuilder.loadTexts: rldot1sMstpVlanEntry.setStatus('current') rldot1s_mstp_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpVlan.setStatus('current') rldot1s_mstp_group = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpGroup.setStatus('current') rldot1s_mstp_pending_group = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 6, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 64))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpPendingGroup.setStatus('current') rldot1s_mstp_ext_port_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7)) if mibBuilder.loadTexts: rldot1sMstpExtPortTable.setStatus('current') rldot1s_mstp_ext_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1)).setIndexNames((0, 'DLINK-3100-BRIDGEMIBOBJECTS-MIB', 'rldot1sMstpExtPortPort')) if mibBuilder.loadTexts: rldot1sMstpExtPortEntry.setStatus('current') rldot1s_mstp_ext_port_port = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4096))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpExtPortPort.setStatus('current') rldot1s_mstp_ext_port_internal_oper_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 200000000))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpExtPortInternalOperPathCost.setStatus('current') rldot1s_mstp_ext_port_designated_regional_root = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 3), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalRoot.setStatus('current') rldot1s_mstp_ext_port_designated_regional_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpExtPortDesignatedRegionalCost.setStatus('current') rldot1s_mstp_ext_port_boundary = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 5), truth_value()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpExtPortBoundary.setStatus('current') rldot1s_mstp_ext_port_internal_admin_path_cost = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 7, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 200000000))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpExtPortInternalAdminPathCost.setStatus('current') rldot1s_mstp_designated_max_hopes = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 40))).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpDesignatedMaxHopes.setStatus('current') rldot1s_mstp_regional_root = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 9), bridge_id()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpRegionalRoot.setStatus('current') rldot1s_mstp_regional_root_cost = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpRegionalRootCost.setStatus('current') rldot1s_mstp_pending_configuration_name = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 11), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpPendingConfigurationName.setStatus('current') rldot1s_mstp_pending_revision_level = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpPendingRevisionLevel.setStatus('current') rldot1s_mstp_pending_action = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('copyPendingActive', 1), ('copyActivePending', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rldot1sMstpPendingAction.setStatus('current') rldot1s_mstp_remaining_hops = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 6, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1sMstpRemainingHops.setStatus('current') rldot1d_tp_aging_time = mib_identifier((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 7)) rldot1d_tp_aging_time_min = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 7, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dTpAgingTimeMin.setStatus('current') rldot1d_tp_aging_time_max = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 57, 7, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rldot1dTpAgingTimeMax.setStatus('current') mibBuilder.exportSymbols('DLINK-3100-BRIDGEMIBOBJECTS-MIB', rldot1dStpVlanPortDesignatedBridge=rldot1dStpVlanPortDesignatedBridge, rldot1pPriorityMapEntry=rldot1pPriorityMapEntry, rldot1sMStpInstancePortRole=rldot1sMStpInstancePortRole, rldot1sMstpInstancePriority=rldot1sMstpInstancePriority, rldot1pPriorityMapPriority=rldot1pPriorityMapPriority, rldot1dStpVlan=rldot1dStpVlan, rldot1sMstpExtPortInternalAdminPathCost=rldot1sMstpExtPortInternalAdminPathCost, rldot1dStpVlanPortPriority=rldot1dStpVlanPortPriority, rldot1sMstpInstancePortPathCost=rldot1sMstpInstancePortPathCost, rlpBridgeMIBObjects=rlpBridgeMIBObjects, rldot1dStpMibVersion=rldot1dStpMibVersion, rldot1sMstpExtPortPort=rldot1sMstpExtPortPort, rldot1sMstpInstanceHoldTime=rldot1sMstpInstanceHoldTime, rldot1dStpPortBpduSent=rldot1dStpPortBpduSent, rldot1sMstpInstancePortPort=rldot1sMstpInstancePortPort, rldot1sMstpConfigurationName=rldot1sMstpConfigurationName, rldot1dStpSeparatedBridgesTable=rldot1dStpSeparatedBridgesTable, rldot1dStpTopChanges=rldot1dStpTopChanges, rldot1dStpTypeAfterReset=rldot1dStpTypeAfterReset, rldot1dStpHoldTime=rldot1dStpHoldTime, rldot1dExtBaseMibVersion=rldot1dExtBaseMibVersion, rldot1dTpAgingTime=rldot1dTpAgingTime, rldot1sMstpInstancePortDesignatedBridge=rldot1sMstpInstancePortDesignatedBridge, rldot1dTpAgingTimeMin=rldot1dTpAgingTimeMin, rldot1dStpVlanPortForwardTransitions=rldot1dStpVlanPortForwardTransitions, rldot1dExtBase=rldot1dExtBase, rldot1dStpBpduType=rldot1dStpBpduType, rldot1sMstpInstanceId=rldot1sMstpInstanceId, rldot1sMstp=rldot1sMstp, rldot1sMstpRegionalRootCost=rldot1sMstpRegionalRootCost, rldot1dStpSeparatedBridgesEntry=rldot1dStpSeparatedBridgesEntry, rldot1dStpPortBpduReceived=rldot1dStpPortBpduReceived, rldot1sMstpGroup=rldot1sMstpGroup, rldot1sMstpPendingGroup=rldot1sMstpPendingGroup, rldot1dStpSeparatedBridgesEnable=rldot1dStpSeparatedBridgesEnable, rldot1dPriorityPortGroupTable=rldot1dPriorityPortGroupTable, rldot1dStpRootPort=rldot1dStpRootPort, rldot1dStpPortsEnable=rldot1dStpPortsEnable, rldot1sMstpInstanceTimeSinceTopologyChange=rldot1sMstpInstanceTimeSinceTopologyChange, rldot1pPriorityMapName=rldot1pPriorityMapName, rldot1pPriorityMap=rldot1pPriorityMap, rldot1sMstpInstanceRootCost=rldot1sMstpInstanceRootCost, rldot1dStpDesignatedRoot=rldot1dStpDesignatedRoot, rldot1dStp=rldot1dStp, rldot1sMstpInstancePortPriority=rldot1sMstpInstancePortPriority, rldot1dDeviceCapabilities=rldot1dDeviceCapabilities, rldot1sMstpPendingConfigurationName=rldot1sMstpPendingConfigurationName, rldot1sMstpInstanceEnable=rldot1sMstpInstanceEnable, rldot1dPriorityPortGroupEntry=rldot1dPriorityPortGroupEntry, rldot1dStpPortLoopback=rldot1dStpPortLoopback, rldot1sMstpRegionalRoot=rldot1sMstpRegionalRoot, rldot1pPriorityMapStatus=rldot1pPriorityMapStatus, rldot1sMstpInstanceTable=rldot1sMstpInstanceTable, rldot1dStpVlanEntry=rldot1dStpVlanEntry, rldot1dStpMaxAge=rldot1dStpMaxAge, rldot1sMstpMaxHopes=rldot1sMstpMaxHopes, rldot1dStpPortPort=rldot1dStpPortPort, rldot1sMStpInstancePortAdminPathCost=rldot1sMStpInstancePortAdminPathCost, rldot1dStpTrapVrblifIndex=rldot1dStpTrapVrblifIndex, rldot1wRStpForceVersionEntry=rldot1wRStpForceVersionEntry, rldot1dTpAgingTimeMax=rldot1dTpAgingTimeMax, rldot1dStpBpduCount=rldot1dStpBpduCount, rldot1sMstpPendingRevisionLevel=rldot1sMstpPendingRevisionLevel, rldot1dStpPortBpduGuardEntry=rldot1dStpPortBpduGuardEntry, rldot1dStpPortTable=rldot1dStpPortTable, rldot1dStpVlanPortDesignatedPort=rldot1dStpVlanPortDesignatedPort, rldot1dStpExtendedPortNumberFormat=rldot1dStpExtendedPortNumberFormat, rldot1dStpVlanPortVlan=rldot1dStpVlanPortVlan, rldot1wRStpForceVersionState=rldot1wRStpForceVersionState, rldot1sMstpInstancePortForwardTransitions=rldot1sMstpInstancePortForwardTransitions, rldot1dStpVlanEnable=rldot1dStpVlanEnable, rldot1sMstpInstanceForwardDelay=rldot1sMstpInstanceForwardDelay, rldot1dStpPortFilterBpdu=rldot1dStpPortFilterBpdu, rldot1dStpPortBpduGuardTable=rldot1dStpPortBpduGuardTable, rldot1dPriorityPortGroupNumber=rldot1dPriorityPortGroupNumber, rldot1dStpTrapVrblVID=rldot1dStpTrapVrblVID, rldot1dStpSeparatedBridges=rldot1dStpSeparatedBridges, rldot1dStpVlanTable=rldot1dStpVlanTable, rldot1dStpMonitorTime=rldot1dStpMonitorTime, rldot1sMstpExtPortInternalOperPathCost=rldot1sMstpExtPortInternalOperPathCost, rldot1pPriorityMapPort=rldot1pPriorityMapPort, rldot1dStpPortRole=rldot1dStpPortRole, rldot1wRStpForceVersionVlan=rldot1wRStpForceVersionVlan, rldot1pPriorityMapTable=rldot1pPriorityMapTable, rldot1dStpVlanPortEntry=rldot1dStpVlanPortEntry, rldot1dStpSeparatedBridgesPortEnable=rldot1dStpSeparatedBridgesPortEnable, rldot1sMstpInstancePortDesignatedRoot=rldot1sMstpInstancePortDesignatedRoot, rldot1sMstpInstanceEntry=rldot1sMstpInstanceEntry, rldot1sMstpVlanTable=rldot1sMstpVlanTable, PYSNMP_MODULE_ID=rlpBridgeMIBObjects, rldot1dPriority=rldot1dPriority, rldot1dStpPortBpduOperStatus=rldot1dStpPortBpduOperStatus, rldot1wRStpVlanEdgePortEntry=rldot1wRStpVlanEdgePortEntry, rldot1pPriorityMapState=rldot1pPriorityMapState, rldot1dStpPortDampEnable=rldot1dStpPortDampEnable, rldot1sMstpExtPortDesignatedRegionalRoot=rldot1sMstpExtPortDesignatedRegionalRoot, rldot1sMstpInstancePortTable=rldot1sMstpInstancePortTable, rldot1dStpType=rldot1dStpType, rldot1dStpPortDampStable=rldot1dStpPortDampStable, rldot1dStpPortEntry=rldot1dStpPortEntry, rldot1dStpVlanPortPathCost=rldot1dStpVlanPortPathCost, rldot1dStpEdgeportSupportInStp=rldot1dStpEdgeportSupportInStp, rldot1sMstpExtPortEntry=rldot1sMstpExtPortEntry, rldot1sMstpInstanceRootPort=rldot1sMstpInstanceRootPort, rldot1sMstpVlanEntry=rldot1sMstpVlanEntry, rldot1wRStp=rldot1wRStp, rldot1sMstpInstanceTopChanges=rldot1sMstpInstanceTopChanges, rldot1dStpVlanPortDesignatedCost=rldot1dStpVlanPortDesignatedCost, rldot1sMstpDesignatedMaxHopes=rldot1sMstpDesignatedMaxHopes, rldot1dStpHelloTime=rldot1dStpHelloTime, rldot1dPriorityMibVersion=rldot1dPriorityMibVersion, rldot1dStpTaggedFlooding=rldot1dStpTaggedFlooding, rldot1dStpPortBpduGuardEnable=rldot1dStpPortBpduGuardEnable, rldot1dStpEnable=rldot1dStpEnable, rldot1wRStpVlanEdgePortPort=rldot1wRStpVlanEdgePortPort, rldot1wRStpVlanEdgePortTable=rldot1wRStpVlanEdgePortTable, rldot1sMstpInstanceRemainingHopes=rldot1sMstpInstanceRemainingHopes, rldot1wRStpVlanEdgePortVlan=rldot1wRStpVlanEdgePortVlan, rldot1dStpPortToDefault=rldot1dStpPortToDefault, rldot1dStpLastChanged=rldot1dStpLastChanged, rldot1sMstpPendingAction=rldot1sMstpPendingAction, rldot1dStpRootCost=rldot1dStpRootCost, rldot1sMstpInstancePortDesignatedPort=rldot1sMstpInstancePortDesignatedPort, rldot1dStpForwardDelay=rldot1dStpForwardDelay, rldot1wRStpEdgePortStatus=rldot1wRStpEdgePortStatus, rldot1sMstpExtPortTable=rldot1sMstpExtPortTable, rldot1sMstpInstanceDesignatedRoot=rldot1sMstpInstanceDesignatedRoot, rldot1sMstpInstancePortEnable=rldot1sMstpInstancePortEnable, rldot1dStpVlanPortDesignatedRoot=rldot1dStpVlanPortDesignatedRoot, rldot1sMstpInstancePortDesignatedCost=rldot1sMstpInstancePortDesignatedCost, rldot1dStpTimeSinceTopologyChange=rldot1dStpTimeSinceTopologyChange, rldot1dStpVlanPortState=rldot1dStpVlanPortState, rldot1pPriorityMapPortList=rldot1pPriorityMapPortList, rldot1sMstpInstancePortMstiId=rldot1sMstpInstancePortMstiId, rldot1sMstpInstanceMaxAge=rldot1sMstpInstanceMaxAge, rldot1sMstpInstancePortEntry=rldot1sMstpInstancePortEntry, rldot1dStpPortBelongToVlanDefault=rldot1dStpPortBelongToVlanDefault, rldot1sMstpExtPortBoundary=rldot1sMstpExtPortBoundary, rldot1dStpEnableByDefault=rldot1dStpEnableByDefault, rldot1sMstpRemainingHops=rldot1sMstpRemainingHops, rldot1dStpFloodBpduMethod=rldot1dStpFloodBpduMethod, rldot1dStpSeparatedBridgesAutoConfig=rldot1dStpSeparatedBridgesAutoConfig, rldot1dStpPortRestrictedRole=rldot1dStpPortRestrictedRole, rldot1dStpTrapVariable=rldot1dStpTrapVariable, rldot1dStpVlanPortEnable=rldot1dStpVlanPortEnable, rldot1sMstpInstanceHelloTime=rldot1sMstpInstanceHelloTime, rldot1dStpSupportedType=rldot1dStpSupportedType, rldot1dStpLoopbackGuardEnable=rldot1dStpLoopbackGuardEnable, rldot1wRStpForceVersionTable=rldot1wRStpForceVersionTable, rldot1sMstpInstancePortState=rldot1sMstpInstancePortState, rldot1sMstpVlan=rldot1sMstpVlan, rldot1dStpPortAutoEdgePort=rldot1dStpPortAutoEdgePort, rldot1sMstpRevisionLevel=rldot1sMstpRevisionLevel, rldot1dStpFilterBpdu=rldot1dStpFilterBpdu, rldot1dStpVlanPortTable=rldot1dStpVlanPortTable, rldot1sMstpExtPortDesignatedRegionalCost=rldot1sMstpExtPortDesignatedRegionalCost, rldot1dStpVlanPortPort=rldot1dStpVlanPortPort, rldot1dStpPortMustBelongToVlan=rldot1dStpPortMustBelongToVlan)
def has_doi(bib_info): return "doi" in bib_info def get_doi(bib_info): return bib_info["doi"] def has_title(bib_info): return "title" in bib_info def get_title(bib_info): return bib_info["title"] def has_url(bib_info): return "url" in bib_info def get_url(bib_info): if "url" in bib_info: return bib_info["url"] else: return "" def has_author(bib_info): return "author" in bib_info def get_author(bib_info): return bib_info["author"]
def has_doi(bib_info): return 'doi' in bib_info def get_doi(bib_info): return bib_info['doi'] def has_title(bib_info): return 'title' in bib_info def get_title(bib_info): return bib_info['title'] def has_url(bib_info): return 'url' in bib_info def get_url(bib_info): if 'url' in bib_info: return bib_info['url'] else: return '' def has_author(bib_info): return 'author' in bib_info def get_author(bib_info): return bib_info['author']
payload_mass=5 payload_fairing_height=1 stage1_height=7.5 stage1_burnTime=74 stage1_propellant_mass=15000 stage1_engine_mass=1779 stage1_thrust=469054 stage1_isp=235.88175331294596 stage1_coastTime=51 stage2_height=3.35 stage2_burnTime=64 stage2_propellant_mass=5080 stage2_engine_mass=527 stage2_thrust=220345 stage2_isp=282.97655453618756 stage2_coastTime=164 stage3_height=2.1 stage3_burnTime=46 stage3_propellant_mass=1760 stage3_engine_mass=189 stage3_thrust=106212 stage3_isp=282.97655453618756 stage3_coastTime=50 outside_diameter=1.405 propulsion_modifier=0.02 voltage = 28.8
payload_mass = 5 payload_fairing_height = 1 stage1_height = 7.5 stage1_burn_time = 74 stage1_propellant_mass = 15000 stage1_engine_mass = 1779 stage1_thrust = 469054 stage1_isp = 235.88175331294596 stage1_coast_time = 51 stage2_height = 3.35 stage2_burn_time = 64 stage2_propellant_mass = 5080 stage2_engine_mass = 527 stage2_thrust = 220345 stage2_isp = 282.97655453618756 stage2_coast_time = 164 stage3_height = 2.1 stage3_burn_time = 46 stage3_propellant_mass = 1760 stage3_engine_mass = 189 stage3_thrust = 106212 stage3_isp = 282.97655453618756 stage3_coast_time = 50 outside_diameter = 1.405 propulsion_modifier = 0.02 voltage = 28.8
digit1 = 999 digit2 = 999 largestpal = 0 #always save the largest palindrome #nested loop for 3digit product while digit1 >= 1: while digit2 >= 1: #get string from int p1 = str(digit1 * digit2) #check string for palindrome by comparing first-last, etc. for i in range(0, (len(p1) - 1)): #no pal? go on if p1[i] != p1[len(p1)-i-1]: break #pal? save if larger than current elif i >= (len(p1)-1)/2: if largestpal < int(p1): largestpal = digit1 * digit2 print (largestpal) digit2 -= 1 digit1 -= 1 digit2 = 999 print (largestpal)
digit1 = 999 digit2 = 999 largestpal = 0 while digit1 >= 1: while digit2 >= 1: p1 = str(digit1 * digit2) for i in range(0, len(p1) - 1): if p1[i] != p1[len(p1) - i - 1]: break elif i >= (len(p1) - 1) / 2: if largestpal < int(p1): largestpal = digit1 * digit2 print(largestpal) digit2 -= 1 digit1 -= 1 digit2 = 999 print(largestpal)
class InvalidMoveException(Exception): pass class InvalidPlayerException(Exception): pass class InvalidGivenBallsException(Exception): pass class GameIsOverException(Exception): pass
class Invalidmoveexception(Exception): pass class Invalidplayerexception(Exception): pass class Invalidgivenballsexception(Exception): pass class Gameisoverexception(Exception): pass
while True: try: dinheiro = [] nota = input() cent = input() if(len(cent) < 2): cent += '0' cent = cent[::-1] dinheiro += '.' + cent print(dinheiro) except EOFError: break
while True: try: dinheiro = [] nota = input() cent = input() if len(cent) < 2: cent += '0' cent = cent[::-1] dinheiro += '.' + cent print(dinheiro) except EOFError: break
''' Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert a value into the HashSet. contains(value) : Return whether the value exists in the HashSet or not. remove(value): Remove a value in the HashSet. If the value does not exist in the HashSet, do nothing. Example: MyHashSet hashSet = new MyHashSet(); hashSet.add(1); hashSet.add(2); hashSet.contains(1); // returns true hashSet.contains(3); // returns false (not found) hashSet.add(2); hashSet.contains(2); // returns true hashSet.remove(2); hashSet.contains(2); // returns false (already removed) Note: All values will be in the range of [0, 1000000]. The number of operations will be in the range of [1, 10000]. Please do not use the built-in HashSet library. ''' class MyHashSet: def eval_hash(self, key): return ((key*1031237) & (1<<20) - 1)>>5 def __init__(self): self.a = [[] for _ in range(1<<15)] def add(self, key: int) -> None: pos = self.eval_hash(key) #calling function foa a key to generate a position using hash formula if key not in self.a[pos]: self.a[pos].append(key) def remove(self, key: int) -> None: pos = self.eval_hash(key) if key in self.a[pos]: self.a[pos].remove(key) def contains(self, key: int) -> bool: pos = self.eval_hash(key) print(pos,self.a[pos]) if key in self.a[pos]: return True return False ''' The idea is to have hash function in the following form. image Here we use the following notations: K is our number (key), we want to hash. a is some big odd number (sometimes good idea to use prime number) I choose a = 1031237 without any special reason, it is just random odd number. m is length in bits of output we wan to have. We are given, that we have no more than 10000 operations overall, so we can choose such m, so that 2^m > 10000. I chose m = 15, so in this case we have less collistions. if you go to wikipedia, you can read that w is size of machine word. Here we do not really matter, what is this size, we can choose any w > m. I chose m = 20. So, everything is ready for function eval_hash(key): ((key*1031237) & (1<<20) - 1)>>5. Here I also used trick for fast bit operation modulo 2^t: for any s: s % (2^t) = s & (1<<t) - 1.'''
""" Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert a value into the HashSet. contains(value) : Return whether the value exists in the HashSet or not. remove(value): Remove a value in the HashSet. If the value does not exist in the HashSet, do nothing. Example: MyHashSet hashSet = new MyHashSet(); hashSet.add(1); hashSet.add(2); hashSet.contains(1); // returns true hashSet.contains(3); // returns false (not found) hashSet.add(2); hashSet.contains(2); // returns true hashSet.remove(2); hashSet.contains(2); // returns false (already removed) Note: All values will be in the range of [0, 1000000]. The number of operations will be in the range of [1, 10000]. Please do not use the built-in HashSet library. """ class Myhashset: def eval_hash(self, key): return (key * 1031237 & (1 << 20) - 1) >> 5 def __init__(self): self.a = [[] for _ in range(1 << 15)] def add(self, key: int) -> None: pos = self.eval_hash(key) if key not in self.a[pos]: self.a[pos].append(key) def remove(self, key: int) -> None: pos = self.eval_hash(key) if key in self.a[pos]: self.a[pos].remove(key) def contains(self, key: int) -> bool: pos = self.eval_hash(key) print(pos, self.a[pos]) if key in self.a[pos]: return True return False '\nThe idea is to have hash function in the following form.\nimage\n\nHere we use the following notations:\n\nK is our number (key), we want to hash.\na is some big odd number (sometimes good idea to use prime number) I choose a = 1031237 without any special reason, it is just random odd number.\nm is length in bits of output we wan to have. We are given, that we have no more than 10000 operations overall, so we can choose such m, so that 2^m > 10000. I chose m = 15, so in this case we have less collistions.\nif you go to wikipedia, you can read that w is size of machine word. Here we do not really matter, what is this size, we can choose any w > m. I chose m = 20.\nSo, everything is ready for function eval_hash(key): ((key*1031237) & (1<<20) - 1)>>5. Here I also used trick for fast bit operation modulo 2^t: for any s: s % (2^t) = s & (1<<t) - 1.'
# -*- coding: UTF-8 -*- class MyClass(object): def __init__(self): pass def __eq__(self, other): return type(self) == type(other) if __name__ == '__main__': print (MyClass()) print (MyClass()) print (MyClass() == MyClass()) print (MyClass() == 42)
class Myclass(object): def __init__(self): pass def __eq__(self, other): return type(self) == type(other) if __name__ == '__main__': print(my_class()) print(my_class()) print(my_class() == my_class()) print(my_class() == 42)
# 2020.08.02 # Problem Statement: # https://leetcode.com/problems/substring-with-concatenation-of-all-words/ class Solution: def findSubstring(self, s: str, words: List[str]) -> List[int]: # check if s is empty or words is empty if len(s) * len(words) == 0: return [] # length is the total length of words # word_length is the length per word in words (all the same) # word_dict is the hash table to store words and their occurance times length = len(words) * len(words[0]) word_length = len(words[0]) word_dict = {} # initialize the occurances to all 0 for word in words: word_dict[word] = 0 # calculate for occurance times for word in words: word_dict[word] = word_dict[word] + 1 # do a deep copy for word_dict word_dict_copy = deepcopy(word_dict) # initialize answer to return answer = [] # start index can be any index between [0, len(s)-length] for start in range(0, len(s)-length+1): # if this substring is legal add = True # check all the potential matched words in substring for word_index in range(0, len(words)): # get the single word word = s[start+word_index*word_length: start+(word_index+1)*word_length] # not match, this substring should not count if word not in word_dict.keys(): add = False break # match else: # check occurance time, should have 1 less occurance time remaining word_dict[word] = word_dict[word] - 1 # exceed the occurance times if word_dict[word] < 0: add = False break # add the result if add: answer.append(start) # get back the orginal word_dict word_dict = deepcopy(word_dict_copy) return answer
class Solution: def find_substring(self, s: str, words: List[str]) -> List[int]: if len(s) * len(words) == 0: return [] length = len(words) * len(words[0]) word_length = len(words[0]) word_dict = {} for word in words: word_dict[word] = 0 for word in words: word_dict[word] = word_dict[word] + 1 word_dict_copy = deepcopy(word_dict) answer = [] for start in range(0, len(s) - length + 1): add = True for word_index in range(0, len(words)): word = s[start + word_index * word_length:start + (word_index + 1) * word_length] if word not in word_dict.keys(): add = False break else: word_dict[word] = word_dict[word] - 1 if word_dict[word] < 0: add = False break if add: answer.append(start) word_dict = deepcopy(word_dict_copy) return answer
print("hello") print("hello") print("hello") print("hello") print("It's me") print("I'm here")
print('hello') print('hello') print('hello') print('hello') print("It's me") print("I'm here")