content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
def fatorial(N): cont = N-1 fat = N if(N == 0): fat = 1 else: while(cont>1): fat = fat * cont cont -=1 return fat N = int(input()) print(fatorial(N))
def fatorial(N): cont = N - 1 fat = N if N == 0: fat = 1 else: while cont > 1: fat = fat * cont cont -= 1 return fat n = int(input()) print(fatorial(N))
class ColumnAttachment(object,IDisposable): """ An object representing the attachment of the top or bottom of a column to some target: a floor,roof,ceiling,beam,or brace. """ @staticmethod def AddColumnAttachment(doc,column,target,baseOrTop,cutColumnStyle,justification,attachOffset): """ AddColumnAttachment(doc: Document,column: FamilyInstance,target: Element,baseOrTop: int,cutColumnStyle: ColumnAttachmentCutStyle,justification: ColumnAttachmentJustification,attachOffset: float) Attaches the column to the target. If an attachment already exists with the same "baseOrTop" value,no attachment is made. doc: The document containing column and target. column: A column. target: A target element. baseOrTop: 0 to attach the column base,1 to attach the column top. cutColumnStyle: Control the handling of columns that intersect their targets. justification: Control the column extent in cases where the target is not a uniform height. attachOffset: An additional offset for the bottom. If positive,the column base or top will be higher than the attachment point; if negative,lower. """ pass def Dispose(self): """ Dispose(self: ColumnAttachment) """ pass @staticmethod def GetColumnAttachment(column,*__args): """ GetColumnAttachment(column: FamilyInstance,baseOrTop: int) -> ColumnAttachment Look up a column attachment. There is at most one attachment on the base and one on the top. column: A column. baseOrTop: 0 for base,1 for top. Returns: The column attachment for the base or top of the column,or ll if that end of the column is unattached. GetColumnAttachment(column: FamilyInstance,targetId: ElementId) -> ColumnAttachment Look up a column attachment by specifying the target id. column: A column. targetId: Id of a target element. Returns: The column attachment attaching the column to the target,or ll if there is no such attachment. """ pass @staticmethod def IsValidColumn(familyInstance): """ IsValidColumn(familyInstance: FamilyInstance) -> bool Says whether a FamilyInstance supports column attachments. familyInstance: A column. """ pass @staticmethod def IsValidTarget(*__args): """ IsValidTarget(column: FamilyInstance,target: Element) -> bool Says whether the element can be used as a target for a new attachment. column: The column to attach. If the target is a beam or brace,the column will be checked to see if it is slanted. Otherwise,this argument is not used and may be omitted. target: A proposed target element for a column attachment. IsValidTarget(forSlantedColumn: bool,target: Element) -> bool Says whether the element can be used as a target for a new attachment. forSlantedColumn: If true,check whether the target is valid for a slanted column; if false, check whether the target is valid for a vertical column. target: A proposed target element for a column attachment. """ pass def ReleaseUnmanagedResources(self,*args): """ ReleaseUnmanagedResources(self: ColumnAttachment,disposing: bool) """ pass @staticmethod def RemoveColumnAttachment(column,*__args): """ RemoveColumnAttachment(column: FamilyInstance,baseOrTop: int) Removes an attachment at the top or base of a column,if there is one. column: A column. baseOrTop: 0 for base,1 for top. RemoveColumnAttachment(column: FamilyInstance,targetId: ElementId) Removes any attachment of the column to the specified target. column: A column. targetId: Id of a target element. """ pass def SetJustification(self,justification): """ SetJustification(self: ColumnAttachment,justification: ColumnAttachmentJustification) Setter of ColumnAttachmentJustification """ pass def __enter__(self,*args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self,*args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self,*args): """ __repr__(self: object) -> str """ pass AttachOffset=property(lambda self: object(),lambda self,v: None,lambda self: None) """The offset of the column attachment. Get: AttachOffset(self: ColumnAttachment) -> float Set: AttachOffset(self: ColumnAttachment)=value """ BaseOrTop=property(lambda self: object(),lambda self,v: None,lambda self: None) """Identifies if this ColumnAttachment is at the base or top of the column. Get: BaseOrTop(self: ColumnAttachment) -> int """ CutStyle=property(lambda self: object(),lambda self,v: None,lambda self: None) """Identifies whether the column,or the attached element should be cut (or if neither should be cut). Get: CutStyle(self: ColumnAttachment) -> ColumnAttachmentCutStyle """ IsValidObject=property(lambda self: object(),lambda self,v: None,lambda self: None) """Specifies whether the .NET object represents a valid Revit entity. Get: IsValidObject(self: ColumnAttachment) -> bool """ Justification=property(lambda self: object(),lambda self,v: None,lambda self: None) """Identifies the type of justification to apply to this ColumnAttachment. Get: Justification(self: ColumnAttachment) -> ColumnAttachmentJustification """ TargetId=property(lambda self: object(),lambda self,v: None,lambda self: None) """The id of the element that is attached to the column and is described by this ColumnAttachment. Get: TargetId(self: ColumnAttachment) -> ElementId """
class Columnattachment(object, IDisposable): """ An object representing the attachment of the top or bottom of a column to some target: a floor,roof,ceiling,beam,or brace. """ @staticmethod def add_column_attachment(doc, column, target, baseOrTop, cutColumnStyle, justification, attachOffset): """ AddColumnAttachment(doc: Document,column: FamilyInstance,target: Element,baseOrTop: int,cutColumnStyle: ColumnAttachmentCutStyle,justification: ColumnAttachmentJustification,attachOffset: float) Attaches the column to the target. If an attachment already exists with the same "baseOrTop" value,no attachment is made. doc: The document containing column and target. column: A column. target: A target element. baseOrTop: 0 to attach the column base,1 to attach the column top. cutColumnStyle: Control the handling of columns that intersect their targets. justification: Control the column extent in cases where the target is not a uniform height. attachOffset: An additional offset for the bottom. If positive,the column base or top will be higher than the attachment point; if negative,lower. """ pass def dispose(self): """ Dispose(self: ColumnAttachment) """ pass @staticmethod def get_column_attachment(column, *__args): """ GetColumnAttachment(column: FamilyInstance,baseOrTop: int) -> ColumnAttachment Look up a column attachment. There is at most one attachment on the base and one on the top. column: A column. baseOrTop: 0 for base,1 for top. Returns: The column attachment for the base or top of the column,or ll if that end of the column is unattached. GetColumnAttachment(column: FamilyInstance,targetId: ElementId) -> ColumnAttachment Look up a column attachment by specifying the target id. column: A column. targetId: Id of a target element. Returns: The column attachment attaching the column to the target,or ll if there is no such attachment. """ pass @staticmethod def is_valid_column(familyInstance): """ IsValidColumn(familyInstance: FamilyInstance) -> bool Says whether a FamilyInstance supports column attachments. familyInstance: A column. """ pass @staticmethod def is_valid_target(*__args): """ IsValidTarget(column: FamilyInstance,target: Element) -> bool Says whether the element can be used as a target for a new attachment. column: The column to attach. If the target is a beam or brace,the column will be checked to see if it is slanted. Otherwise,this argument is not used and may be omitted. target: A proposed target element for a column attachment. IsValidTarget(forSlantedColumn: bool,target: Element) -> bool Says whether the element can be used as a target for a new attachment. forSlantedColumn: If true,check whether the target is valid for a slanted column; if false, check whether the target is valid for a vertical column. target: A proposed target element for a column attachment. """ pass def release_unmanaged_resources(self, *args): """ ReleaseUnmanagedResources(self: ColumnAttachment,disposing: bool) """ pass @staticmethod def remove_column_attachment(column, *__args): """ RemoveColumnAttachment(column: FamilyInstance,baseOrTop: int) Removes an attachment at the top or base of a column,if there is one. column: A column. baseOrTop: 0 for base,1 for top. RemoveColumnAttachment(column: FamilyInstance,targetId: ElementId) Removes any attachment of the column to the specified target. column: A column. targetId: Id of a target element. """ pass def set_justification(self, justification): """ SetJustification(self: ColumnAttachment,justification: ColumnAttachmentJustification) Setter of ColumnAttachmentJustification """ pass def __enter__(self, *args): """ __enter__(self: IDisposable) -> object """ pass def __exit__(self, *args): """ __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """ pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass attach_offset = property(lambda self: object(), lambda self, v: None, lambda self: None) 'The offset of the column attachment.\n\n\n\nGet: AttachOffset(self: ColumnAttachment) -> float\n\n\n\nSet: AttachOffset(self: ColumnAttachment)=value\n\n' base_or_top = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Identifies if this ColumnAttachment is at the base or top of the column.\n\n\n\nGet: BaseOrTop(self: ColumnAttachment) -> int\n\n\n\n' cut_style = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Identifies whether the column,or the attached element should be cut (or if neither should be cut).\n\n\n\nGet: CutStyle(self: ColumnAttachment) -> ColumnAttachmentCutStyle\n\n\n\n' is_valid_object = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Specifies whether the .NET object represents a valid Revit entity.\n\n\n\nGet: IsValidObject(self: ColumnAttachment) -> bool\n\n\n\n' justification = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Identifies the type of justification to apply to this ColumnAttachment.\n\n\n\nGet: Justification(self: ColumnAttachment) -> ColumnAttachmentJustification\n\n\n\n' target_id = property(lambda self: object(), lambda self, v: None, lambda self: None) 'The id of the element that is attached to the column and is described by this ColumnAttachment.\n\n\n\nGet: TargetId(self: ColumnAttachment) -> ElementId\n\n\n\n'
"""! @brief Examples of usage of various utils. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """
"""! @brief Examples of usage of various utils. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """
class EncryptedCredentials: """This class contains data required for decrypting and authenticating :ref:`object_encrypted_passport_element`\ See https://core.telegram.org/passport#receiving-information for further information :param data: Base64 encoded encrypted JSON-serialized data with unique user's payload,d ata hashed and secrets\ required for :ref:`object_encrypted_passport_element` decryption and authentication :type data: str :param hash_data: Base64 encoded data hash for data authentication :type hash_data: str :param secret: Base64 encoded secret, encrypted with the bot's public RSA key, required for data decryption :type secret: str """ def __init__(self, *, data, hash_data, secret): self.data = data self.hash_data = hash_data self.secret = secret
class Encryptedcredentials: """This class contains data required for decrypting and authenticating :ref:`object_encrypted_passport_element` See https://core.telegram.org/passport#receiving-information for further information :param data: Base64 encoded encrypted JSON-serialized data with unique user's payload,d ata hashed and secrets required for :ref:`object_encrypted_passport_element` decryption and authentication :type data: str :param hash_data: Base64 encoded data hash for data authentication :type hash_data: str :param secret: Base64 encoded secret, encrypted with the bot's public RSA key, required for data decryption :type secret: str """ def __init__(self, *, data, hash_data, secret): self.data = data self.hash_data = hash_data self.secret = secret
""" This calculation feature/object for calculating some math """ class calculation: def __init__(self): pass def addition(self,a,b): return a + b def subtraction(self,a,b): return a - b
""" This calculation feature/object for calculating some math """ class Calculation: def __init__(self): pass def addition(self, a, b): return a + b def subtraction(self, a, b): return a - b
def minPathSum(self, grid: [[int]]) -> int: for i in range(len(grid)): for j in range(len(grid[0])): if i == j == 0: continue elif i == 0: grid[i][j] = grid[i][j - 1] + grid[i][j] elif j == 0: grid[i][j] = grid[i - 1][j] + grid[i][j] else: grid[i][j] = min(grid[i - 1][j], grid[i][j - 1]) + grid[i][j] return grid[-1][-1]
def min_path_sum(self, grid: [[int]]) -> int: for i in range(len(grid)): for j in range(len(grid[0])): if i == j == 0: continue elif i == 0: grid[i][j] = grid[i][j - 1] + grid[i][j] elif j == 0: grid[i][j] = grid[i - 1][j] + grid[i][j] else: grid[i][j] = min(grid[i - 1][j], grid[i][j - 1]) + grid[i][j] return grid[-1][-1]
class DataframeTypeHolder: """ Seperates the features based off of dtypes to better keep track of feature changes over time. Should only be used for manipulation of features. """ def __init__(self, df): self.__bool_features = set(df.select_dtypes(include=["bool"]).columns) self.__categorical_features = set( df.select_dtypes(include=["object"]).columns) self.__integer_features = set(df.select_dtypes(include=["int"]).columns) self.__float_features = set(df.select_dtypes(include=["float"]).columns) self.__numerical_features = self.__float_features | self.__integer_features # --- Getters def get_numerical_features(self): return list(self.__numerical_features) def get_integer_features(self): return list(self.__integer_features) def get_float_features(self): return list(self.__float_features) def get_categorical_features(self): return list(self.__categorical_features) def get_bool_features(self): return list(self.__float_features) # --- Appenders def append_categorical_features(self, feature_name): self.__categorical_features |= set(feature_name) def append_categorical_features(self, feature_name): self.__bool_features |= set(feature_name) def append_float_features(self, feature_name): self.__float_features |= set(feature_name) self.__numerical_features |= set(feature_name) def append_integer_features(self, feature_name): self.__integer_features |= set(feature_name) self.__numerical_features |= set(feature_name) # ---Remover def remove(self, feature_name): try: self.__categorical_features.remove(feature_name) except KeyError: pass try: self.__numerical_features.remove(feature_name) except KeyError: pass try: self.__integer_features.remove(feature_name) except KeyError: pass try: self.__float_features.remove(feature_name) except KeyError: pass try: self.__bool_features.remove(feature_name) except KeyError: pass def display_all(self): print("Categorical Features: {0}\n".format( self.__categorical_features)) print("Bool Features: {0}\n".format( self.__bool_features)) print("---------"*10) print("Numerical Features: {0}\n".format( self.__numerical_features)) print("Integer Features: {0}\n".format( self.__integer_features)) print("Float Features: {0}\n".format( self.__float_features))
class Dataframetypeholder: """ Seperates the features based off of dtypes to better keep track of feature changes over time. Should only be used for manipulation of features. """ def __init__(self, df): self.__bool_features = set(df.select_dtypes(include=['bool']).columns) self.__categorical_features = set(df.select_dtypes(include=['object']).columns) self.__integer_features = set(df.select_dtypes(include=['int']).columns) self.__float_features = set(df.select_dtypes(include=['float']).columns) self.__numerical_features = self.__float_features | self.__integer_features def get_numerical_features(self): return list(self.__numerical_features) def get_integer_features(self): return list(self.__integer_features) def get_float_features(self): return list(self.__float_features) def get_categorical_features(self): return list(self.__categorical_features) def get_bool_features(self): return list(self.__float_features) def append_categorical_features(self, feature_name): self.__categorical_features |= set(feature_name) def append_categorical_features(self, feature_name): self.__bool_features |= set(feature_name) def append_float_features(self, feature_name): self.__float_features |= set(feature_name) self.__numerical_features |= set(feature_name) def append_integer_features(self, feature_name): self.__integer_features |= set(feature_name) self.__numerical_features |= set(feature_name) def remove(self, feature_name): try: self.__categorical_features.remove(feature_name) except KeyError: pass try: self.__numerical_features.remove(feature_name) except KeyError: pass try: self.__integer_features.remove(feature_name) except KeyError: pass try: self.__float_features.remove(feature_name) except KeyError: pass try: self.__bool_features.remove(feature_name) except KeyError: pass def display_all(self): print('Categorical Features: {0}\n'.format(self.__categorical_features)) print('Bool Features: {0}\n'.format(self.__bool_features)) print('---------' * 10) print('Numerical Features: {0}\n'.format(self.__numerical_features)) print('Integer Features: {0}\n'.format(self.__integer_features)) print('Float Features: {0}\n'.format(self.__float_features))
# Ask for a sentence # Print the length of the sentence # Ask for a file name (.txt) # Write the sentence to the file # Run the program from your command line sentence = input("Enter a sentence: ") sentence_length = len(sentence) print(sentence_length) file_name = input("Enter a file name: " ) file_name = f"{file_name}.txt" with open(file_name, "w") as f: f.write(sentence) f.close() print(f"You've written {sentence_length} characters to {file_name}")
sentence = input('Enter a sentence: ') sentence_length = len(sentence) print(sentence_length) file_name = input('Enter a file name: ') file_name = f'{file_name}.txt' with open(file_name, 'w') as f: f.write(sentence) f.close() print(f"You've written {sentence_length} characters to {file_name}")
obj_dict = dict( {'a':{'b':{'c':'d'}}}) keys_str = input("Enter the key for which value to be fetched : (use '/' as delemeter ) \n") keys = keys_str.split("/") # ['a', 'b', 'c'] val = obj_dict isFound = True for key in keys: val = val.get(key, None) if val == None: isFound = False break if isFound == True and val != None: print(val)
obj_dict = dict({'a': {'b': {'c': 'd'}}}) keys_str = input("Enter the key for which value to be fetched : (use '/' as delemeter ) \n") keys = keys_str.split('/') val = obj_dict is_found = True for key in keys: val = val.get(key, None) if val == None: is_found = False break if isFound == True and val != None: print(val)
class Settings: """A class to manage game settings.""" card_values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] card_suits = ["Spades", "Clubs", "Hearts", "Diamonds"] card_names = ["ACE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "KNIGHT", "QUEEN", "KING"] max_n_players = 26 min_n_players = 2 def __init__(self, values=None, suits=None, names=None): """Initialize settings attributes""" # Load deck with above settings if names is None: self.names = Settings.card_names else: self.names = names if suits is None: self.suits = Settings.card_suits else: self.suits = suits if values is None: self.values = Settings.card_values else: self.values = values self.number_of_players = 2 self.set_num_players() def set_num_players(self): """Set number of players for the game""" while True: try: n_players = int(input("Please enter the number of players: ")) if n_players < Settings.min_n_players or n_players > Settings.max_n_players: print(f"The number of players must be between " f"{Settings.min_n_players} and {Settings.max_n_players}") else: break except ValueError as ex: print("The entered number was not an integer. Try again.") self.number_of_players = n_players
class Settings: """A class to manage game settings.""" card_values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] card_suits = ['Spades', 'Clubs', 'Hearts', 'Diamonds'] card_names = ['ACE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'TEN', 'KNIGHT', 'QUEEN', 'KING'] max_n_players = 26 min_n_players = 2 def __init__(self, values=None, suits=None, names=None): """Initialize settings attributes""" if names is None: self.names = Settings.card_names else: self.names = names if suits is None: self.suits = Settings.card_suits else: self.suits = suits if values is None: self.values = Settings.card_values else: self.values = values self.number_of_players = 2 self.set_num_players() def set_num_players(self): """Set number of players for the game""" while True: try: n_players = int(input('Please enter the number of players: ')) if n_players < Settings.min_n_players or n_players > Settings.max_n_players: print(f'The number of players must be between {Settings.min_n_players} and {Settings.max_n_players}') else: break except ValueError as ex: print('The entered number was not an integer. Try again.') self.number_of_players = n_players
# start by creating lists for the quadrants. we'll learn a better way to do this next lesson. nw_addresses = [] ne_addresses = [] sw_addresses = [] se_addresses = [] no_quadrant = [] for entry in range(3): # do this three times: address = raw_input("What is your DC address? ") # get the address from the user address = address.split(" ") # split address into a list based on the spaces if 'NW' in address: nw_addresses.append(' '.join(address)) # if 'NW' appears in address, add the address (joined back as a string) to the proper list elif 'NE' in address: ne_addresses.append(' '.join(address)) elif 'SW' in address: sw_addresses.append(' '.join(address)) elif 'SE' in address: se_addresses.append(' '.join(address)) else: # In all other instances no_quadrant.append(' '.join(address)) print("NW addresses include: {0}".format(nw_addresses)) print("NE addresses include: {0}".format(ne_addresses)) print("SW addresses include: {0}".format(sw_addresses)) print("SE addresses include: {0}".format(se_addresses)) print("Addresses without a quadrant include: {0}".format(no_quadrant)) # Things to think about: # 1) Which list would 1500 CORNWALL ST be added to? Why is that? # 2) In other words, how does the 'in' operator work when you use it on a string versus on a list? # 3) Thinking about it another way, if you commented out line 12 and ran that address through, you'd get a different result.
nw_addresses = [] ne_addresses = [] sw_addresses = [] se_addresses = [] no_quadrant = [] for entry in range(3): address = raw_input('What is your DC address? ') address = address.split(' ') if 'NW' in address: nw_addresses.append(' '.join(address)) elif 'NE' in address: ne_addresses.append(' '.join(address)) elif 'SW' in address: sw_addresses.append(' '.join(address)) elif 'SE' in address: se_addresses.append(' '.join(address)) else: no_quadrant.append(' '.join(address)) print('NW addresses include: {0}'.format(nw_addresses)) print('NE addresses include: {0}'.format(ne_addresses)) print('SW addresses include: {0}'.format(sw_addresses)) print('SE addresses include: {0}'.format(se_addresses)) print('Addresses without a quadrant include: {0}'.format(no_quadrant))
""" paper: Independently Recurrent Neural Network (IndRNN): Building A Longer and Deeper RNN authors: Shuai Li, Wanqing Li, Chris Cook, Ce Zhu, Yanbo Gao paper link: https://arxiv.org/pdf/1803.04831.pdf code: https://github.com/batzner/indrnn """ # TODO. copy cell
""" paper: Independently Recurrent Neural Network (IndRNN): Building A Longer and Deeper RNN authors: Shuai Li, Wanqing Li, Chris Cook, Ce Zhu, Yanbo Gao paper link: https://arxiv.org/pdf/1803.04831.pdf code: https://github.com/batzner/indrnn """
BASE = 2**30 class BigUInt: def __init__(self, digits=[]): for digit in digits: if digit >= BASE: raise ValueError("digit is too large!") self.digits = digits def __int__(self): total = 0 for i, digit in enumerate(self.digits): total += digit * (BASE ** i) return total def __str__(self): return str(int(self)) x = BigUInt([]) y = BigUInt([57]) z = BigUInt([10000, 1]) print(x) print(y) print(z)
base = 2 ** 30 class Biguint: def __init__(self, digits=[]): for digit in digits: if digit >= BASE: raise value_error('digit is too large!') self.digits = digits def __int__(self): total = 0 for (i, digit) in enumerate(self.digits): total += digit * BASE ** i return total def __str__(self): return str(int(self)) x = big_u_int([]) y = big_u_int([57]) z = big_u_int([10000, 1]) print(x) print(y) print(z)
# check if dependencies are available hard_dependencies = ('numpy','cv2','skimage','scipy') missing_dependencies = [] for dependency in hard_dependencies: try: __import__(dependency) except ImportError as e: missing_dependencies.append(f"{dependency}: {e}") if missing_dependencies: raise ImportError("image-super-resolution: Unable to import required dependencies: \n"+"\n".join(missing_dependencies)) else: print("#####################################################") print("image-super-resolution: All dependencies available !") print("#####################################################") print("") del hard_dependencies, dependency, missing_dependencies
hard_dependencies = ('numpy', 'cv2', 'skimage', 'scipy') missing_dependencies = [] for dependency in hard_dependencies: try: __import__(dependency) except ImportError as e: missing_dependencies.append(f'{dependency}: {e}') if missing_dependencies: raise import_error('image-super-resolution: Unable to import required dependencies: \n' + '\n'.join(missing_dependencies)) else: print('#####################################################') print('image-super-resolution: All dependencies available !') print('#####################################################') print('') del hard_dependencies, dependency, missing_dependencies
""" Meme-module for "efficiently" checking whether a given day is a weekday/weekend, with multi-language support. Languages supported: -English -German -Spanish -French """ def weekday(day: str) -> bool: """ Checks if a string is the name of a weekday in the supported languages. :param day: Any string, ideally one that actually represents a day :return: True if it is a weekday. """ day = day.lower() if day[-1] in "ghy": return day[0] != "s" elif day[-1] in "iesoa": return day[2] not in "mb" return True def weekend(day: str) -> bool: """ Checks if a string is the name of a weekend in the supported languages. :param day: Any string, ideally one that actually represents a day :return: True if it is a weekend. """ return not weekday(day)
""" Meme-module for "efficiently" checking whether a given day is a weekday/weekend, with multi-language support. Languages supported: -English -German -Spanish -French """ def weekday(day: str) -> bool: """ Checks if a string is the name of a weekday in the supported languages. :param day: Any string, ideally one that actually represents a day :return: True if it is a weekday. """ day = day.lower() if day[-1] in 'ghy': return day[0] != 's' elif day[-1] in 'iesoa': return day[2] not in 'mb' return True def weekend(day: str) -> bool: """ Checks if a string is the name of a weekend in the supported languages. :param day: Any string, ideally one that actually represents a day :return: True if it is a weekend. """ return not weekday(day)
def clamp(value, max_value, min_value): value = min(value, max_value) value = max(value, min_value) return value
def clamp(value, max_value, min_value): value = min(value, max_value) value = max(value, min_value) return value
__author__ = 'wenqihe' class AbstractFeature(object): def apply(self, sentence, mention, features): raise NotImplementedError('Should have implemented this')
__author__ = 'wenqihe' class Abstractfeature(object): def apply(self, sentence, mention, features): raise not_implemented_error('Should have implemented this')
# PROGRAM : To accept some inputs of different types and print them using positional parameters format i.e. {} # FILE : positionalParameter.py # CREATED BY : Santosh Hembram # DATED : 16-09-20 x = int(input("Enter an integer value: ")) y = float(input("Enter a float value: ")) z = (input("Enter a string: ")) print("============Printing using positional parameter=============") print("x = {0}".format(x)) print("y = {0}".format(y)) print("z = {0}".format(z)) print(" ") print("x = {0} and y = {1} and z = {2}".format(x,y,z))
x = int(input('Enter an integer value: ')) y = float(input('Enter a float value: ')) z = input('Enter a string: ') print('============Printing using positional parameter=============') print('x = {0}'.format(x)) print('y = {0}'.format(y)) print('z = {0}'.format(z)) print(' ') print('x = {0} and y = {1} and z = {2}'.format(x, y, z))
def number_increment(numbers): def increase(): return [x+1 for x in numbers] return increase()
def number_increment(numbers): def increase(): return [x + 1 for x in numbers] return increase()
def _convert_playlist_url_to_embed(url): return url.replace("/playlist/", "/embed/playlist/") def transform_spotify_playlist_to_thisdayinmusic_playlist(playlist): url_embed = _convert_playlist_url_to_embed(playlist["external_urls"]["spotify"]) return {"id": playlist["id"], "url": url_embed} def transform_spotify_user_to_thisdayinmusic_user(user): return user["id"]
def _convert_playlist_url_to_embed(url): return url.replace('/playlist/', '/embed/playlist/') def transform_spotify_playlist_to_thisdayinmusic_playlist(playlist): url_embed = _convert_playlist_url_to_embed(playlist['external_urls']['spotify']) return {'id': playlist['id'], 'url': url_embed} def transform_spotify_user_to_thisdayinmusic_user(user): return user['id']
""" Create-dist Generates compiled files to dist/ @licence MIT @author Pablo Pizarro @ppizarror.com """ """ Genenerates a compiled file """ def generate_file(main, files): w = open(main, 'w') for i in files: f = open(i, 'r') for j in f: w.write(j) f.close() w.close() # Main files CSS_FILE = 'dist/notification.min.css' JS_FILE = 'dist/notification.min.js' # Project files to add CSS = ['notification.min.css'] JS = ['notification.min.js'] # Generate compiled files generate_file(CSS_FILE, CSS) generate_file(JS_FILE, JS)
""" Create-dist Generates compiled files to dist/ @licence MIT @author Pablo Pizarro @ppizarror.com """ '\nGenenerates a compiled file\n' def generate_file(main, files): w = open(main, 'w') for i in files: f = open(i, 'r') for j in f: w.write(j) f.close() w.close() css_file = 'dist/notification.min.css' js_file = 'dist/notification.min.js' css = ['notification.min.css'] js = ['notification.min.js'] generate_file(CSS_FILE, CSS) generate_file(JS_FILE, JS)
# ScriptName: functions.py # Author: Brendon Purchase 119473576 # template for calling functions in another file def print_function(): print("I'm in another file :)") def count(list, value): ''' function - count how many times <value> occurs in <list> :param list: - <list> input :param value: - <value> to search for :return: ''' # set counter i = 0 # accumulator to count how many times <value> occurs # set to zero to cover no <value> in <list> num_values = 0 # loop over the length of the <list> while i < len(list): # if <value> and <list> index i are the same if list[i] == value: # increment the accumulator num_values += 1 # increment the counter i += 1 # return how many times <value> occurs in <list> return num_values def index(list, value): ''' function - return the first index that <value> occurs in <list> :param list: - <list> input :param value: - <value> to search for :return: ''' # counter i = 0 # accumulator to count the first index that <value> occurs # set to zero to cover no <value> in <list> # num_index = 0 # loop over the length of list while i < len(list): if list[i] == value: # COUNTS INDEX return i # num_index += 1 i += 1 # RETURNS INDEX return -1 def get_value(list, index): ''' function - return the value that occurs in <list> at <index> :param list: - list input :param index: - value to return :return: ''' # set counter i = 0 while index < len(list): if i == index: return list[i] i += 1 def insert(lst, index, value): ''' function - function to return <list> ,after you have added <value> at <index> :param lst: - list input :param index: - specifies where <value> is added :param value: - value to add :return: ''' i = 0 lst = list(lst) while i < len(lst): if i == index: lst[i] = value return ''.join(lst) i += 1 lst.append(value) return ''.join(lst) def value_in_list(mylist, value): ''' function - function to return True or False if <value> occurs in <list> :param mylist: - list input :param value: - value which may occur :return: ''' i = 0 while i < len(mylist): if mylist[i] == value: return mylist i += 1 return mylist def concat(list1, list2): ''' function - function to return a new list, which is a combination of list1 and list2 :param list1: - list :param list2: - list :return: ''' i = 0 list = [list1, list2] con = " ".join(list) while i < len(list1 + list2): print(con) break def remove(mylist, value): ''' :param mylist: :param value: :return: ''' i = 0 mylist = list(mylist) while i < len(mylist): if mylist[i] == value: del(mylist[i]) break i += 1 return ''.join(mylist)
def print_function(): print("I'm in another file :)") def count(list, value): """ function - count how many times <value> occurs in <list> :param list: - <list> input :param value: - <value> to search for :return: """ i = 0 num_values = 0 while i < len(list): if list[i] == value: num_values += 1 i += 1 return num_values def index(list, value): """ function - return the first index that <value> occurs in <list> :param list: - <list> input :param value: - <value> to search for :return: """ i = 0 while i < len(list): if list[i] == value: return i i += 1 return -1 def get_value(list, index): """ function - return the value that occurs in <list> at <index> :param list: - list input :param index: - value to return :return: """ i = 0 while index < len(list): if i == index: return list[i] i += 1 def insert(lst, index, value): """ function - function to return <list> ,after you have added <value> at <index> :param lst: - list input :param index: - specifies where <value> is added :param value: - value to add :return: """ i = 0 lst = list(lst) while i < len(lst): if i == index: lst[i] = value return ''.join(lst) i += 1 lst.append(value) return ''.join(lst) def value_in_list(mylist, value): """ function - function to return True or False if <value> occurs in <list> :param mylist: - list input :param value: - value which may occur :return: """ i = 0 while i < len(mylist): if mylist[i] == value: return mylist i += 1 return mylist def concat(list1, list2): """ function - function to return a new list, which is a combination of list1 and list2 :param list1: - list :param list2: - list :return: """ i = 0 list = [list1, list2] con = ' '.join(list) while i < len(list1 + list2): print(con) break def remove(mylist, value): """ :param mylist: :param value: :return: """ i = 0 mylist = list(mylist) while i < len(mylist): if mylist[i] == value: del mylist[i] break i += 1 return ''.join(mylist)
points = [(1.0, 2.0), (3.0, 1.0), (1.0, 1.0), (2.0, 2.0), (4.0, 2.0)] lines = [ (points[1], points[4]), (points[3], points[4]), (points[1], points[2]), (points[2], points[3]), (points[0], points[3]) ] xrefs = {p: [l for l in lines if p in l] for p in points} starts = [k for k in xrefs.keys() if len(xrefs[k]) == 1] cp = [] cl = [] for p in starts: cp.append(p) cl.append(xrefs[p][0]) del xrefs[p] while xrefs: for k in xrefs.keys(): if len(xrefs[k]) == 0: del xrefs[k] continue if cl[-1] in xrefs[k]: xrefs[k].remove(cl[-1]) cp.append(k) if len(xrefs[k]) > 0: cl.append(xrefs[k].pop(0)) p = k break
points = [(1.0, 2.0), (3.0, 1.0), (1.0, 1.0), (2.0, 2.0), (4.0, 2.0)] lines = [(points[1], points[4]), (points[3], points[4]), (points[1], points[2]), (points[2], points[3]), (points[0], points[3])] xrefs = {p: [l for l in lines if p in l] for p in points} starts = [k for k in xrefs.keys() if len(xrefs[k]) == 1] cp = [] cl = [] for p in starts: cp.append(p) cl.append(xrefs[p][0]) del xrefs[p] while xrefs: for k in xrefs.keys(): if len(xrefs[k]) == 0: del xrefs[k] continue if cl[-1] in xrefs[k]: xrefs[k].remove(cl[-1]) cp.append(k) if len(xrefs[k]) > 0: cl.append(xrefs[k].pop(0)) p = k break
class ProductionConfig(): TESTING = False SQLALCHEMY_DATABASE_URI = 'sqlite:///../app.db' SQLALCHEMY_ECHO = False SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = '12345567890' # Unsecure default, overridden in secret_key.py WTF_CSRF_ENABLED = False class TestingConfig(): TESTING = True SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:' SQLALCHEMY_ECHO = True SECRET_KEY = '12345567890' # Unsecure default WTF_CSRF_ENABLED = False LOGIN_DISABLED = True
class Productionconfig: testing = False sqlalchemy_database_uri = 'sqlite:///../app.db' sqlalchemy_echo = False sqlalchemy_track_modifications = False secret_key = '12345567890' wtf_csrf_enabled = False class Testingconfig: testing = True sqlalchemy_database_uri = 'sqlite:///:memory:' sqlalchemy_echo = True secret_key = '12345567890' wtf_csrf_enabled = False login_disabled = True
# This is a an example file to be tokenized def two(): return 1 + 1
def two(): return 1 + 1
A = int(input()) B = int(input()) C = int(input()) X = int(input()) count = 0 for i in range(A+1): for j in range(B+1): for k in range(C+1): if 500*i + 100*j + 50*k == X: count += 1 print(count)
a = int(input()) b = int(input()) c = int(input()) x = int(input()) count = 0 for i in range(A + 1): for j in range(B + 1): for k in range(C + 1): if 500 * i + 100 * j + 50 * k == X: count += 1 print(count)
class Temperature_convertedersion: '''Convert given temperature to celsius, fahrenheit or kelvin''' def __init__(self, temp): self.temp = temp def celsius_to_fahrenheit(self): converted = (9 / 5) * self.temp + 32 return f'{self.temp}C = {converted}F' def celsius_to_kelvin(self): converted = self.temp + 273 return f'{self.temp}C = {converted}K' def fahrenheit_to_celsius(self): converted = (5 / 9) * self.temp - 32 return f'{self.temp}F = {converted}C' def fahrenheit_to_kelvin(self): converted = (5 * self.temp - 2617) / 9 return f'{self.temp}F = {converted}K' def kelvin_to_celsius(self): converted = self.temp - 273 return f'{self.temp}K = {converted}C' def kelvin_to_fahrenheit(self): converted = (9 * self.temp + 2167) / 5 return f'{self.temp}K = {converted}F' if __name__ == '__main__': temp_converted = Temperature_convertedersion(100) print(temp_converted.celsius_to_fahrenheit()) print(temp_converted.celsius_to_kelvin(), end='\n\n') print(temp_converted.fahrenheit_to_celsius()) print(temp_converted.fahrenheit_to_kelvin(), end='\n\n') print(temp_converted.kelvin_to_celsius()) print(temp_converted.kelvin_to_fahrenheit())
class Temperature_Convertedersion: """Convert given temperature to celsius, fahrenheit or kelvin""" def __init__(self, temp): self.temp = temp def celsius_to_fahrenheit(self): converted = 9 / 5 * self.temp + 32 return f'{self.temp}C = {converted}F' def celsius_to_kelvin(self): converted = self.temp + 273 return f'{self.temp}C = {converted}K' def fahrenheit_to_celsius(self): converted = 5 / 9 * self.temp - 32 return f'{self.temp}F = {converted}C' def fahrenheit_to_kelvin(self): converted = (5 * self.temp - 2617) / 9 return f'{self.temp}F = {converted}K' def kelvin_to_celsius(self): converted = self.temp - 273 return f'{self.temp}K = {converted}C' def kelvin_to_fahrenheit(self): converted = (9 * self.temp + 2167) / 5 return f'{self.temp}K = {converted}F' if __name__ == '__main__': temp_converted = temperature_convertedersion(100) print(temp_converted.celsius_to_fahrenheit()) print(temp_converted.celsius_to_kelvin(), end='\n\n') print(temp_converted.fahrenheit_to_celsius()) print(temp_converted.fahrenheit_to_kelvin(), end='\n\n') print(temp_converted.kelvin_to_celsius()) print(temp_converted.kelvin_to_fahrenheit())
# Copyright (c) Microsoft Corporation and contributors. # Licensed under the MIT License. _PRECISION = 1e-8 _LINE = "_" * 9 _INDENTATION = " " * 9 # Explicit optimization parameters of ExponentiatedGradient # A multiplier controlling the automatic setting of nu. _ACCURACY_MUL = 0.5 # Parameters controlling adaptive shrinking of the learning rate. _REGRET_CHECK_START_T = 5 _REGRET_CHECK_INCREASE_T = 1.6 _SHRINK_REGRET = 0.8 _SHRINK_ETA = 0.8 # The smallest number of iterations after which ExponentiatedGradient terminates. _MIN_ITER = 5
_precision = 1e-08 _line = '_' * 9 _indentation = ' ' * 9 _accuracy_mul = 0.5 _regret_check_start_t = 5 _regret_check_increase_t = 1.6 _shrink_regret = 0.8 _shrink_eta = 0.8 _min_iter = 5
data = [ [775, 785, 361], [622, 375, 125], [297, 839, 375], [245, 38, 891], [503, 463, 849], [731, 482, 759], [ 29, 734, 734], [245, 771, 269], [261, 315, 904], [669, 96, 581], [570, 745, 156], [124, 678, 684], [472, 360, 73], [174, 251, 926], [406, 408, 976], [413, 238, 571], [375, 554, 22], [211, 379, 590], [271, 821, 847], [696, 253, 116], [513, 972, 959], [539, 557, 752], [168, 362, 550], [690, 236, 284], [434, 91, 818], [859, 393, 779], [620, 313, 56], [188, 983, 783], [799, 900, 573], [932, 359, 565], [357, 670, 69], [525, 71, 52], [640, 654, 43], [695, 781, 907], [676, 680, 938], [ 63, 507, 570], [985, 492, 587], [984, 34, 333], [ 25, 489, 399], [470, 158, 43], [715, 491, 617], [508, 412, 607], [365, 446, 743], [504, 189, 378], [225, 424, 517], [473, 45, 649], [847, 927, 424], [455, 889, 697], [ 64, 230, 846], [579, 368, 881], [639, 536, 74], [433, 803, 943], [ 14, 629, 963], [432, 481, 136], [781, 625, 323], [836, 215, 201], [620, 614, 366], [801, 679, 673], [745, 376, 326], [891, 957, 751], [ 64, 430, 347], [784, 534, 237], [740, 485, 470], [570, 894, 790], [905, 979, 90], [571, 526, 716], [810, 602, 259], [ 20, 41, 648], [816, 566, 848], [891, 883, 616], [801, 797, 341], [ 99, 119, 584], [175, 40, 994], [ 8, 234, 831], [184, 254, 958], [625, 999, 945], [326, 385, 266], [475, 644, 785], [345, 769, 650], [427, 410, 680], [689, 887, 40], [380, 109, 842], [342, 640, 785], [164, 546, 554], [843, 871, 419], [873, 687, 74], [ 84, 192, 465], [186, 777, 83], [180, 130, 726], [315, 860, 652], [ 88, 273, 735], [859, 684, 791], [806, 655, 299], [763, 409, 636], [310, 532, 897], [891, 163, 855], [631, 200, 986], [104, 559, 294], [555, 679, 989], [770, 437, 935], [997, 189, 711], [830, 300, 983], [566, 325, 793], [ 7, 694, 911], [574, 490, 138], [596, 230, 973], [855, 377, 552], [969, 150, 518], [453, 653, 525], [753, 556, 47], [858, 509, 551], [103, 545, 325], [660, 215, 284], [566, 509, 591], [647, 97, 650], [993, 597, 775], [970, 566, 802], [242, 922, 349], [693, 932, 502], [872, 267, 657], [526, 87, 944], [395, 85, 188], [134, 129, 901], [ 56, 244, 785], [ 1, 733, 300], [ 55, 698, 552], [372, 933, 480], [548, 459, 792], [631, 653, 983], [443, 320, 23], [555, 117, 715], [665, 268, 704], [804, 899, 736], [654, 823, 13], [441, 250, 736], [229, 324, 580], [ 41, 389, 857], [215, 103, 753], [933, 311, 835], [955, 234, 744], [113, 141, 315], [790, 130, 235], [464, 464, 129], [328, 386, 315], [787, 735, 301], [839, 744, 299], [ 77, 119, 23], [407, 321, 190], [968, 962, 904], [653, 752, 732], [962, 145, 723], [175, 452, 717], [868, 474, 195], [ 10, 273, 943], [308, 388, 626], [296, 133, 647], [851, 474, 336], [839, 777, 975], [514, 651, 867], [949, 947, 886], [802, 92, 113], [167, 938, 941], [840, 627, 166], [825, 72, 754], [166, 661, 677], [759, 71, 279], [705, 70, 113], [849, 4, 295], [563, 679, 588], [343, 76, 636], [842, 669, 45], [892, 597, 431], [ 26, 864, 580], [889, 509, 641], [696, 267, 506], [608, 778, 297], [293, 867, 667], [662, 469, 97], [243, 184, 809], [785, 434, 715], [691, 568, 759], [599, 4, 164], [444, 566, 816], [486, 145, 595], [787, 41, 538], [953, 151, 842], [861, 877, 759], [228, 972, 678], [846, 114, 915], [253, 41, 621], [ 59, 989, 405], [222, 948, 665], [478, 631, 364], [524, 717, 175], [752, 94, 474], [ 47, 421, 419], [113, 510, 343], [ 99, 733, 667], [787, 651, 708], [703, 557, 486], [489, 637, 702], [510, 287, 529], [483, 308, 545], [454, 177, 87], [433, 735, 242], [638, 734, 172], [208, 702, 285], [999, 157, 251], [776, 76, 341], [689, 164, 553], [477, 938, 456], [ 45, 848, 863], [466, 255, 644], [578, 396, 93], [471, 419, 368], [411, 27, 320], [317, 291, 732], [303, 42, 605], [597, 313, 473], [ 70, 419, 120], [101, 440, 745], [ 35, 176, 656], [236, 329, 198], [ 74, 296, 40], [272, 78, 233], [864, 404, 510], [ 37, 368, 531], [828, 35, 50], [191, 272, 396], [238, 548, 387], [129, 527, 13], [464, 600, 194], [385, 42, 341], [ 81, 596, 432], [589, 663, 943], [256, 704, 723], [671, 152, 505], [873, 532, 364], [758, 755, 202], [378, 621, 563], [735, 463, 555], [806, 910, 409], [809, 897, 276], [546, 755, 608], [609, 852, 79], [279, 133, 527], [106, 696, 980], [ 63, 981, 360], [ 90, 440, 832], [127, 860, 495], [714, 395, 480], [815, 485, 59], [792, 91, 507], [249, 524, 138], [567, 452, 486], [923, 544, 768], [913, 253, 767], [456, 582, 293], [706, 507, 577], [187, 619, 644], [569, 978, 602], [ 88, 886, 291], [448, 712, 211], [517, 815, 258], [743, 397, 816], [977, 793, 795], [847, 905, 668], [690, 869, 162], [426, 541, 257], [637, 586, 272], [ 82, 950, 821], [785, 936, 350], [812, 31, 490], [318, 253, 159], [515, 688, 479], [423, 855, 407], [931, 830, 651], [496, 241, 28], [491, 924, 624], [864, 966, 133], [171, 438, 712], [736, 867, 734], [551, 548, 267], [288, 455, 474], [557, 622, 273], [494, 74, 507], [541, 628, 390], [288, 583, 310], [411, 63, 353], [487, 527, 295], [520, 567, 536], [739, 816, 848], [349, 681, 269], [898, 902, 676], [647, 759, 892], [573, 512, 75], [186, 252, 895], [804, 320, 772], [730, 934, 107], [198, 651, 774], [625, 535, 985], [568, 499, 235], [159, 42, 837], [854, 617, 695], [ 34, 299, 670], [823, 733, 41], [830, 615, 789], [825, 652, 562], [697, 105, 504], [114, 103, 540], [ 18, 141, 106], [ 94, 121, 479], [859, 774, 177], [464, 873, 208], [790, 125, 305], [982, 586, 811], [521, 386, 478], [916, 329, 620], [764, 91, 351], [526, 684, 103], [314, 749, 283], [510, 226, 378], [160, 269, 278], [638, 368, 120], [616, 540, 475], [863, 637, 89], [744, 172, 445], [856, 391, 269], [768, 276, 634], [940, 610, 820], [289, 254, 649], [254, 364, 98], [304, 613, 620], [164, 652, 257], [890, 74, 483], [813, 640, 710], [884, 99, 735], [707, 881, 380], [954, 983, 971], [487, 911, 275], [256, 920, 43], [384, 772, 313], [863, 120, 903], [703, 821, 82], [765, 731, 957], [ 55, 935, 516], [162, 785, 801], [140, 161, 927], [460, 139, 84], [926, 139, 965], [764, 3, 976], [765, 487, 42], [377, 835, 277], [897, 734, 256], [345, 320, 55], [515, 755, 504], [615, 623, 562], [412, 280, 6], [382, 392, 468], [365, 625, 461], [542, 406, 610], [360, 200, 801], [562, 221, 627], [556, 557, 141], [372, 231, 212], [523, 457, 272], [ 80, 701, 676], [940, 59, 871], [906, 695, 987], [715, 922, 573], [618, 446, 552], [196, 849, 62], [772, 867, 608], [735, 377, 418], [676, 607, 236], [ 25, 447, 830], [187, 270, 738], [214, 175, 990], [438, 790, 816], [456, 396, 534], [220, 628, 356], [384, 935, 215], [377, 593, 802], [566, 651, 650], [648, 529, 999], [128, 884, 472], [688, 951, 661], [312, 722, 722], [ 48, 526, 696], [266, 347, 903], [698, 21, 354], [933, 404, 570], [303, 417, 685], [ 46, 562, 897], [566, 931, 14], [539, 747, 911], [374, 623, 743], [868, 353, 513], [927, 903, 481], [207, 765, 560], [351, 956, 215], [540, 945, 512], [362, 322, 651], [820, 555, 190], [548, 301, 467], [405, 931, 842], [598, 347, 150], [276, 971, 814], [450, 480, 361], [577, 538, 493], [139, 104, 181], [716, 233, 697], [494, 647, 287], [511, 782, 575], [809, 728, 107], [895, 167, 85], [741, 746, 141], [ 23, 115, 83], [173, 147, 549], [191, 208, 581], [313, 356, 284], [357, 393, 123], [ 60, 322, 363], [830, 87, 661], [403, 711, 713], [433, 651, 101], [783, 738, 792], [574, 821, 764], [705, 214, 263], [256, 243, 334], [341, 152, 444], [520, 140, 131], [975, 461, 313], [319, 441, 161], [791, 47, 309], [228, 973, 235], [583, 305, 398], [389, 876, 277], [551, 974, 351], [822, 786, 876], [364, 347, 874], [523, 130, 173], [806, 90, 462], [304, 146, 402], [748, 760, 239], [164, 345, 704], [833, 817, 628], [239, 739, 640], [284, 296, 234], [127, 711, 415], [435, 590, 402], [480, 250, 914], [282, 379, 914], [547, 845, 267], [922, 795, 324], [600, 500, 447], [342, 464, 53], [404, 341, 143], [641, 129, 90], [375, 730, 138], [263, 32, 124], [450, 749, 251], [588, 697, 89], [688, 431, 603], [156, 614, 617], [604, 259, 349], [475, 282, 45], [572, 197, 308], [743, 749, 686], [770, 811, 907], [117, 543, 845], [ 41, 179, 766], [147, 555, 742], [130, 410, 169], [476, 62, 627], [652, 879, 240], [678, 852, 508], [953, 795, 413], [699, 597, 444], [324, 577, 846], [919, 79, 727], [908, 719, 125], [128, 776, 714], [299, 256, 118], [513, 222, 115], [624, 75, 181], [ 1, 605, 162], [ 55, 106, 230], [ 58, 672, 286], [639, 558, 549], [150, 662, 435], [662, 695, 222], [461, 173, 344], [428, 354, 647], [ 56, 405, 653], [699, 631, 995], [967, 608, 269], [365, 853, 794], [768, 606, 943], [413, 601, 128], [362, 427, 919], [735, 448, 566], [276, 354, 377], [604, 657, 544], [913, 192, 592], [811, 762, 62], [120, 720, 606], [618, 232, 392], [ 85, 19, 764], [603, 241, 541], [993, 997, 840], [818, 894, 266], [247, 305, 682], [280, 964, 511], [559, 967, 455], [531, 38, 674], [878, 731, 684], [783, 156, 390], [617, 742, 604], [370, 770, 896], [592, 667, 353], [222, 921, 736], [741, 508, 285], [759, 395, 156], [ 37, 128, 254], [209, 631, 716], [237, 423, 613], [ 65, 856, 439], [942, 526, 288], [862, 811, 341], [753, 840, 59], [369, 67, 907], [817, 947, 802], [768, 945, 137], [356, 557, 207], [716, 9, 205], [361, 558, 1], [310, 889, 719], [ 97, 128, 887], [361, 776, 873], [ 86, 181, 892], [284, 865, 808], [218, 859, 279], [299, 649, 624], [542, 583, 624], [617, 66, 48], [921, 459, 75], [921, 672, 759], [800, 345, 814], [572, 975, 685], [720, 980, 867], [522, 135, 267], [139, 376, 86], [362, 399, 585], [330, 206, 511], [419, 194, 679], [293, 374, 3], [560, 272, 676], [224, 926, 717], [685, 927, 347], [555, 786, 943], [591, 776, 538], [326, 835, 471], [635, 67, 464], [276, 916, 913], [304, 965, 2], [ 50, 110, 912], [893, 200, 307], [445, 248, 596], [725, 128, 681], [279, 602, 888], [ 7, 204, 766], [284, 429, 191], [264, 503, 351], [531, 335, 140], [381, 220, 292], [518, 905, 824], [416, 477, 600], [405, 663, 511], [531, 92, 321], [824, 131, 534], [409, 113, 431], [ 12, 192, 485], [864, 557, 391], [858, 390, 756], [ 28, 465, 231], [188, 216, 825], [177, 316, 910], [766, 41, 329], [202, 105, 219], [787, 125, 542], [639, 108, 5], [639, 10, 525], [ 17, 105, 532], [586, 498, 918], [630, 389, 19], [317, 361, 903], [185, 575, 708], [679, 532, 355], [851, 367, 844], [775, 68, 120], [644, 45, 194], [802, 44, 242], [852, 214, 601], [595, 525, 281], [258, 450, 415], [534, 121, 561], [117, 33, 620], [576, 147, 318], [217, 953, 365], [863, 686, 803], [751, 694, 680], [502, 669, 546], [385, 204, 399], [740, 760, 650], [105, 567, 227], [526, 574, 378], [496, 858, 216], [248, 475, 19], [790, 358, 887], [556, 713, 866], [348, 334, 937], [364, 364, 88], [396, 58, 915], [871, 418, 645], [438, 507, 449], [967, 924, 960], [435, 153, 47], [831, 861, 835], [787, 958, 832], [376, 231, 602], [487, 528, 782], [485, 532, 607], [820, 96, 256], [856, 177, 549], [302, 240, 751], [146, 412, 332], [268, 715, 463], [309, 584, 399], [939, 548, 465], [966, 854, 412], [517, 385, 574], [425, 809, 919], [ 88, 796, 924], [468, 317, 287], [195, 131, 961], [ 10, 485, 229], [190, 374, 827], [573, 178, 842], [575, 255, 358], [220, 359, 713], [401, 853, 206], [736, 904, 667], [450, 209, 798], [865, 42, 300], [806, 373, 182], [383, 403, 258], [397, 51, 691], [492, 146, 568], [814, 179, 584], [545, 851, 182], [606, 135, 208], [135, 934, 183], [733, 365, 561], [215, 97, 642], [617, 418, 209], [641, 297, 106], [400, 876, 246], [399, 665, 156], [424, 20, 222], [954, 860, 194], [930, 875, 34], [883, 469, 376], [111, 576, 753], [995, 515, 461], [535, 380, 786], [117, 578, 780], [646, 803, 965], [243, 951, 886], [563, 935, 879], [520, 91, 879], [390, 332, 402], [955, 471, 221], [810, 398, 527], [312, 876, 131], [256, 371, 527], [293, 945, 501], [724, 900, 650], [798, 526, 908], [199, 510, 377], [285, 338, 780], [729, 157, 584], [866, 259, 438], [ 91, 680, 717], [982, 618, 786], [918, 255, 178], [ 66, 257, 416], [288, 223, 81], [237, 405, 404], [597, 762, 518], [671, 661, 39], [976, 431, 502], [524, 337, 919], [524, 194, 343], [ 23, 167, 623], [882, 993, 129], [741, 572, 465], [694, 830, 394], [353, 846, 895], [312, 254, 903], [ 52, 614, 101], [300, 513, 706], [976, 310, 698], [929, 736, 22], [732, 248, 113], [816, 471, 405], [230, 466, 355], [749, 854, 492], [956, 286, 554], [833, 928, 239], [334, 883, 528], [782, 968, 977], [715, 608, 898], [264, 576, 100], [530, 705, 344], [779, 189, 245], [560, 692, 658], [550, 325, 931], [ 22, 757, 277], [860, 962, 567], [695, 542, 611], [227, 936, 116], [812, 696, 604], [889, 520, 282], [512, 180, 350], [735, 582, 392], [511, 400, 667], [754, 871, 309], [899, 133, 582], [986, 66, 309], [186, 183, 367], [543, 242, 522], [132, 255, 887], [538, 225, 934], [ 57, 276, 438], [452, 396, 382], [501, 608, 195], [292, 741, 619], [ 69, 671, 801], [331, 731, 279], [485, 350, 380], [ 81, 926, 182], [513, 834, 298], [165, 801, 799], [204, 426, 521], [245, 650, 330], [716, 716, 155], [693, 699, 658], [305, 69, 710], [661, 744, 698], [599, 327, 957], [577, 593, 903], [924, 117, 176], [949, 808, 323], [267, 710, 257], [ 91, 683, 927], [404, 262, 918], [347, 716, 109], [155, 266, 483], [142, 676, 512], [216, 501, 103], [923, 110, 424], [856, 329, 617], [229, 332, 231], [466, 803, 573], [498, 388, 827], [ 38, 788, 587], [770, 367, 435], [736, 584, 445], [ 93, 569, 834], [ 65, 948, 479], [172, 630, 581], [239, 369, 396], [820, 270, 656], [ 32, 515, 348], [803, 324, 969], [ 70, 188, 635], [219, 766, 279], [166, 736, 640], [257, 604, 851], [555, 616, 822], [589, 345, 165], [166, 196, 64], [909, 185, 700], [870, 119, 693], [ 20, 565, 737], [680, 198, 244], [700, 486, 825], [194, 812, 67], [236, 756, 407], [ 64, 905, 344], [ 92, 755, 905], [748, 349, 681], [707, 781, 811], [505, 50, 456], [471, 889, 672], [ 35, 891, 334], [899, 411, 164], [663, 459, 232], [539, 446, 322], [ 57, 785, 718], [273, 421, 308], [308, 744, 501], [ 45, 819, 416], [936, 258, 466], [980, 825, 841], [100, 33, 345], [898, 904, 750], [920, 903, 453], [947, 9, 765], [580, 979, 375], [753, 977, 844], [402, 174, 156], [573, 827, 782], [975, 663, 644], [179, 358, 353], [ 55, 777, 834], [221, 871, 631], [120, 714, 199], [663, 369, 217], [599, 713, 135], [ 11, 472, 765], [803, 445, 746], [797, 30, 284], [259, 776, 677], [598, 707, 675], [484, 339, 3], [298, 750, 162], [119, 820, 168], [180, 69, 9], [433, 332, 676], [142, 164, 343], [435, 233, 414], [153, 977, 263], [532, 54, 244], [600, 999, 25], [394, 756, 311], [354, 196, 703], [666, 858, 760], [227, 312, 525], [389, 419, 436], [218, 311, 744], [318, 531, 245], [324, 939, 509], [183, 997, 543], [944, 598, 70], [790, 486, 828], [710, 745, 880], [546, 368, 219], [316, 668, 29], [398, 360, 218], [702, 453, 987], [774, 462, 373], [722, 829, 947], [541, 732, 44], [310, 494, 582], [239, 596, 548], [579, 810, 907], [490, 169, 62], [926, 883, 915], [281, 414, 595], [845, 412, 609], [632, 106, 618], [112, 404, 492], [864, 460, 314], [842, 93, 436], [412, 805, 874], [353, 686, 465], [240, 393, 800], [788, 654, 346], [666, 78, 185], [418, 608, 404], [658, 537, 960], [794, 449, 680], [711, 324, 489], [ 59, 525, 330], [323, 259, 544], [359, 745, 542], [877, 701, 403], [119, 897, 533], [977, 392, 227], [528, 340, 194], [398, 180, 283], [538, 301, 123], [775, 263, 195], [ 53, 385, 630], [749, 253, 686], [533, 30, 624], [678, 187, 590], [937, 218, 50], [205, 466, 918], [796, 672, 47], [818, 203, 963], [461, 953, 881], [739, 457, 696], [661, 711, 220], [624, 121, 663], [908, 173, 644], [602, 185, 70], [168, 957, 159], [283, 341, 934], [196, 845, 939], [494, 354, 543], [796, 422, 87], [430, 762, 478], [526, 762, 859], [535, 600, 926], [ 28, 555, 651], [170, 748, 379], [117, 745, 33], [ 52, 1, 351], [946, 796, 446], [148, 844, 920], [950, 131, 740], [392, 490, 118], [286, 465, 667], [202, 101, 662], [326, 629, 556], [773, 661, 219], [540, 683, 613], [406, 314, 525], [154, 947, 451], [401, 661, 186], [574, 690, 796], [558, 730, 855], [153, 244, 156], [618, 37, 10], [856, 991, 363], [820, 959, 370], [644, 700, 800], [421, 469, 908], [422, 233, 288], [416, 281, 707], [370, 430, 487], [284, 525, 916], [535, 713, 354], [210, 576, 524], [432, 930, 215], [712, 374, 612], [686, 508, 102], [ 40, 141, 616], [979, 525, 663], [838, 696, 326], [472, 261, 357], [321, 910, 663], [228, 153, 536], [223, 940, 896], [137, 39, 506], [139, 706, 187], [ 4, 666, 483], [944, 856, 119], [720, 602, 93], [410, 260, 85], [601, 647, 520], [162, 474, 317], [599, 742, 313], [242, 886, 381], [250, 78, 353], [109, 916, 117], [597, 926, 673], [318, 114, 309], [892, 819, 424], [491, 682, 85], [765, 657, 682], [558, 60, 721], [990, 634, 160], [640, 461, 410], [430, 839, 535], [ 42, 961, 686], [752, 251, 690], [747, 931, 3], [439, 930, 85], [ 44, 628, 953], [465, 961, 874], [313, 447, 913], [249, 600, 859], [359, 896, 472], [698, 187, 657], [ 57, 957, 805], [721, 977, 239], [782, 93, 96], [860, 159, 250], [368, 142, 218], [565, 157, 46], [622, 403, 383], [ 63, 546, 382], [ 63, 774, 308], [446, 495, 475], [467, 831, 310], [448, 77, 798], [930, 281, 189], [767, 289, 644], [514, 765, 524], [330, 827, 992], [340, 284, 964], [600, 97, 785], [418, 432, 755], [983, 442, 58], [872, 435, 725], [107, 344, 315], [917, 682, 547], [ 24, 613, 561], [665, 448, 238], [680, 872, 737], [108, 180, 449], [220, 545, 583], [268, 676, 863], [796, 791, 2], [694, 992, 39], [788, 767, 41], [235, 572, 377], [975, 864, 883], [953, 448, 608], [909, 888, 452], [ 93, 850, 414], [852, 48, 49], [136, 558, 842], [300, 428, 776], [427, 814, 64], [223, 45, 283], [100, 562, 659], [290, 519, 828], [678, 786, 346], [371, 711, 934], [686, 276, 826], [808, 208, 669], [832, 198, 6], [317, 11, 675], [504, 182, 448], [162, 745, 642], [623, 791, 687], [408, 947, 693], [247, 267, 641], [328, 693, 758], [773, 411, 149], [ 66, 2, 589], [786, 407, 527], [ 81, 760, 803], [946, 696, 552], [878, 698, 994], [190, 203, 649], [548, 713, 634], [657, 724, 676], [195, 397, 887], [175, 346, 118], [356, 264, 981], [191, 919, 468], [490, 470, 570], [583, 740, 151], [340, 773, 889], [176, 446, 314], [206, 384, 935], [172, 996, 620], [362, 842, 497], [208, 786, 731], [207, 395, 750], [368, 819, 87], [524, 524, 702], [609, 761, 554], [753, 975, 290], [559, 932, 731], [584, 203, 140], [477, 100, 982], [784, 162, 876], [371, 209, 67], [236, 754, 108], [439, 633, 163], [734, 717, 626], [808, 216, 639], [133, 521, 94], [180, 813, 208], [136, 770, 844], [ 57, 867, 871], [700, 900, 740], [ 96, 75, 662], [628, 893, 284], [843, 851, 196], [546, 427, 607], [797, 471, 664], [180, 363, 117], [961, 775, 95], [846, 969, 210], [535, 269, 666], [216, 585, 490], [736, 521, 335], [489, 493, 602], [627, 574, 723], [857, 217, 629], [385, 808, 433], [615, 115, 361], [687, 705, 455], [898, 390, 177], [737, 393, 476], [355, 727, 371], [533, 526, 69], [615, 467, 157], [614, 683, 202], [876, 892, 581], [949, 165, 357], [ 86, 766, 432], [233, 47, 702], [448, 407, 821], [227, 364, 424], [158, 372, 933], [966, 405, 365], [913, 512, 813], [585, 698, 482], [720, 171, 716], [172, 868, 740], [ 96, 489, 33], [531, 882, 552], [618, 949, 523], [425, 860, 424], [909, 676, 116], [806, 770, 430], [836, 868, 355], [640, 561, 523], [858, 353, 411], [400, 149, 612], [872, 364, 491], [940, 469, 870], [127, 256, 47], [561, 306, 322], [626, 147, 276], [ 13, 547, 289], [218, 561, 705], [234, 16, 842], [301, 663, 261], [ 81, 415, 368], [301, 945, 593], [232, 855, 760], [522, 649, 929], [401, 847, 376], [764, 542, 452], [774, 536, 929], [ 10, 935, 499], [710, 262, 94], [ 72, 475, 524], [722, 618, 481], [515, 135, 637], [962, 115, 303], [665, 88, 416], [544, 303, 735], [828, 488, 680], [827, 575, 354], [ 44, 999, 437], [232, 985, 128], [226, 36, 346], [310, 325, 307], [473, 809, 315], [184, 487, 91], [778, 310, 926], [749, 260, 988], [869, 216, 878], [663, 790, 458], [914, 237, 476], [258, 935, 201], [956, 796, 313], [888, 105, 282], [160, 874, 42], [715, 524, 451], [477, 604, 886], [596, 111, 554], [524, 510, 388], [778, 878, 320], [894, 453, 574], [210, 808, 633], [340, 77, 956], [159, 872, 426], [ 4, 756, 333], [528, 697, 677], [530, 474, 442], [ 75, 427, 536], [874, 706, 437], [944, 536, 357], [726, 919, 349], [911, 791, 637], [447, 224, 483], [742, 941, 693], [632, 42, 918], [302, 907, 547], [204, 618, 927], [ 86, 765, 15], [280, 396, 926], [857, 422, 560], [801, 355, 368], [ 53, 718, 577], [613, 946, 933], [641, 378, 563], [ 39, 928, 423], [252, 906, 454], [626, 318, 81], [477, 838, 407], [ 85, 531, 475], [129, 622, 419], [184, 372, 147], [364, 805, 559], [445, 128, 302], [656, 813, 724], [485, 140, 509], [537, 267, 549], [164, 184, 89], [464, 231, 881], [111, 63, 706], [383, 283, 567], [408, 31, 455], [698, 864, 501], [692, 887, 753], [573, 681, 783], [453, 393, 338], [171, 707, 850], [ 68, 663, 190], [342, 588, 284], [309, 218, 102], [121, 743, 56], [321, 722, 379], [307, 99, 357], [444, 485, 636], [548, 419, 517], [407, 101, 714], [168, 496, 140], [111, 520, 594], [ 55, 129, 476], [706, 849, 93], [529, 200, 416], [848, 680, 470], [731, 189, 61], [591, 689, 20], [801, 777, 52], [395, 449, 821], [337, 421, 292], [618, 208, 674], [116, 13, 66], [459, 790, 615], [429, 796, 565], [891, 795, 903], [929, 443, 263], [ 49, 694, 890], [708, 929, 577], [764, 786, 554], [971, 473, 236], [271, 483, 440], [666, 506, 858], [582, 959, 594], [470, 918, 457], [583, 662, 551], [777, 446, 214], [609, 503, 929], [861, 691, 766], [256, 201, 940], [894, 386, 172], [624, 397, 17], [615, 9, 159], [454, 494, 344], [606, 717, 995], [251, 333, 688], [714, 910, 670], [531, 346, 227], [693, 754, 745], [947, 8, 411], [ 9, 862, 598], [937, 858, 601], [309, 977, 18], [731, 684, 943], [579, 384, 958], [359, 647, 495], [ 8, 355, 476], [363, 459, 21], [712, 383, 997], [892, 71, 981], [374, 433, 156], [ 86, 194, 341], [ 60, 298, 385], [ 31, 110, 452], [813, 501, 635], [249, 82, 215], [895, 585, 456], [571, 961, 784], [734, 746, 854], [742, 268, 73], [575, 7, 583], [660, 643, 908], [559, 643, 336], [222, 725, 935], [660, 82, 939], [709, 745, 41], [277, 504, 918], [604, 679, 913], [717, 419, 183], [613, 306, 732], [491, 694, 742], [628, 707, 108], [885, 867, 527], [970, 740, 567], [147, 267, 119], [288, 766, 969], [132, 190, 372], [175, 862, 992], [942, 468, 639], [ 63, 908, 581], [939, 703, 830], [328, 186, 554], [936, 130, 355], [865, 270, 479], [253, 104, 444], [ 99, 378, 107], [342, 385, 340], [651, 480, 324], [ 14, 841, 249], [635, 538, 79], [229, 415, 530], [489, 931, 329], [654, 828, 719], [911, 703, 693], [202, 425, 201], [897, 314, 745], [126, 606, 323], [201, 459, 307], [ 79, 719, 51], [595, 913, 432], [261, 980, 554], [708, 272, 591], [423, 754, 58], [175, 538, 449], [552, 671, 418], [871, 86, 809], [ 5, 579, 309], [877, 635, 850], [607, 621, 470], [584, 166, 732], [443, 666, 887], [305, 612, 454], [547, 252, 90], [324, 431, 510], [827, 912, 501], [329, 868, 593], [524, 944, 461], [ 10, 709, 299], [902, 76, 539], [894, 783, 448], [304, 883, 270], [358, 716, 346], [626, 192, 530], [900, 47, 880], [807, 796, 757], [672, 774, 885], [596, 391, 358], [300, 355, 318], [617, 44, 310], [363, 51, 907], [138, 183, 704], [243, 184, 234], [977, 406, 460], [811, 692, 579], [412, 459, 196], [509, 346, 366], [697, 646, 777], [247, 930, 583], [383, 268, 54], [387, 11, 471], [434, 273, 444], [462, 191, 917], [474, 236, 605], [924, 192, 348], [515, 15, 128], [398, 609, 300], [608, 627, 296], [289, 624, 427], [ 16, 448, 70], [280, 329, 492], [186, 448, 444], [709, 27, 239], [566, 472, 535], [395, 737, 535], [666, 108, 512], [398, 788, 762], [187, 46, 733], [689, 389, 690], [717, 350, 106], [243, 988, 623], [ 13, 950, 830], [247, 379, 679], [654, 150, 272], [157, 229, 213], [710, 232, 314], [585, 591, 948], [193, 624, 781], [504, 553, 685], [135, 76, 444], [998, 845, 416], [901, 917, 69], [885, 266, 328], [ 32, 236, 487], [877, 223, 312], [602, 264, 297], [429, 852, 180], [558, 833, 380], [579, 341, 829], [708, 823, 603], [480, 625, 551], [168, 995, 465], [ 24, 236, 898], [180, 770, 985], [827, 126, 352], [790, 491, 324], [198, 379, 105], [953, 609, 224], [793, 519, 389], [988, 303, 169], [636, 575, 937], [460, 869, 500], [859, 552, 819], [647, 650, 366], [838, 643, 233], [223, 170, 244], [689, 381, 542], [ 15, 293, 371], [696, 443, 796], [549, 128, 525], [919, 719, 231], [651, 599, 417], [413, 80, 413], [864, 940, 344], [753, 989, 342], [583, 816, 28], [399, 818, 894], [522, 1, 884], [105, 122, 148], [ 2, 868, 301], [100, 945, 306], [990, 516, 458], [604, 484, 27], [587, 36, 468], [774, 726, 241], [931, 993, 277], [908, 406, 352], [783, 586, 706], [760, 27, 469], [ 42, 611, 958], [ 72, 118, 399], [526, 638, 55], [598, 737, 392], [134, 84, 825], [734, 804, 273], [600, 778, 888], [788, 539, 691], [ 57, 854, 592], [824, 629, 286], [359, 24, 824], [548, 857, 646], [820, 831, 194], [ 29, 842, 939], [966, 133, 201], [992, 709, 970], [357, 44, 29], [320, 649, 356], [ 35, 611, 379], [407, 894, 581], [408, 940, 680], [652, 367, 124], [630, 200, 182], [652, 271, 828], [ 65, 296, 786], [821, 42, 341], [ 84, 24, 562], [894, 29, 500], [739, 799, 310], [289, 461, 385], [540, 731, 430], [393, 303, 389], [756, 560, 731], [637, 470, 761], [105, 314, 202], [339, 437, 717], [256, 526, 810], [639, 382, 381], [ 11, 289, 290], [638, 450, 336], [602, 415, 901], [671, 494, 718], [460, 507, 186], [596, 160, 528], [766, 811, 389], [319, 955, 281], [ 24, 317, 562], [489, 870, 295], [514, 924, 477], [386, 887, 49], [479, 940, 432], [558, 523, 416], [343, 53, 46], [542, 803, 597], [696, 784, 565], [474, 495, 650], [613, 692, 465], [352, 841, 199], [911, 927, 640], [273, 693, 512], [701, 468, 597], [144, 915, 630], [949, 967, 185], [952, 293, 538], [642, 426, 249], [788, 408, 678], [457, 32, 579], [571, 462, 686], [650, 752, 651], [260, 681, 182], [158, 89, 312], [693, 336, 517], [812, 355, 634], [216, 507, 591], [643, 520, 310], [769, 18, 896], [630, 852, 677], [566, 912, 185], [643, 621, 739], [433, 347, 52], [691, 413, 758], [262, 458, 761], [882, 877, 576], [914, 254, 194], [407, 919, 511], [826, 345, 490], [551, 187, 611], [501, 163, 507], [ 59, 749, 708], [364, 502, 718], [390, 317, 38], [316, 77, 424], [400, 834, 339], [296, 868, 102], [360, 533, 38], [326, 607, 529], [442, 962, 544], [773, 371, 300], [ 22, 6, 300], [789, 378, 386], [643, 461, 14], [486, 312, 75], [901, 428, 73], [275, 734, 871], [384, 793, 475], [197, 59, 798], [662, 682, 342], [812, 638, 459], [461, 59, 642], [895, 253, 990], [693, 128, 596], [415, 270, 537], [587, 193, 575], [265, 644, 638], [745, 661, 61], [465, 712, 251], [269, 617, 285], [257, 958, 442], [387, 120, 612], [776, 833, 198], [734, 948, 726], [946, 539, 878], [ 58, 776, 787], [970, 235, 143], [129, 875, 350], [561, 999, 180], [496, 609, 390], [460, 184, 184], [618, 137, 25], [866, 189, 170], [959, 997, 911], [631, 636, 728], [466, 947, 468], [ 76, 708, 913], [ 70, 15, 811], [ 65, 713, 307], [110, 503, 597], [776, 808, 944], [854, 330, 755], [978, 207, 896], [850, 835, 978], [378, 937, 657], [403, 421, 492], [716, 530, 63], [854, 249, 518], [657, 998, 958], [355, 921, 346], [761, 267, 642], [980, 83, 943], [691, 726, 115], [342, 724, 842], [859, 144, 504], [978, 822, 631], [198, 929, 453], [657, 423, 603], [687, 450, 417], [297, 44, 260], [158, 460, 781], [ 29, 108, 744], [136, 486, 409], [941, 659, 831], [ 71, 606, 640], [908, 251, 372], [403, 180, 857], [458, 598, 52], [184, 594, 880], [ 38, 861, 395], [302, 850, 883], [262, 580, 667], [ 2, 905, 843], [474, 825, 794], [473, 209, 96], [926, 833, 585], [903, 119, 532], [ 23, 712, 831], [875, 558, 406], [146, 635, 851], [844, 703, 511], [900, 530, 612], [824, 21, 356], [746, 511, 721], [737, 445, 326], [644, 162, 309], [892, 291, 17], [105, 581, 795], [318, 869, 402], [408, 289, 535], [656, 444, 83], [647, 754, 133], [ 43, 901, 205], [386, 420, 766], [549, 90, 859], [756, 436, 188], [664, 491, 753], [700, 402, 573], [403, 590, 189], [258, 982, 20], [ 4, 553, 529], [264, 718, 538], [206, 647, 136], [257, 860, 279], [338, 449, 249], [421, 569, 865], [188, 640, 124], [487, 538, 796], [276, 358, 748], [269, 260, 625], [ 83, 106, 309], [496, 340, 467], [456, 953, 179], [461, 643, 367], [411, 722, 222], [519, 763, 677], [550, 39, 539], [135, 828, 760], [979, 742, 988], [868, 428, 315], [423, 535, 869], [677, 757, 875], [853, 415, 618], [591, 425, 937], [585, 896, 318], [207, 695, 782], [200, 904, 131], [ 95, 563, 623], [176, 675, 532], [493, 704, 628], [707, 685, 521], [690, 484, 543], [584, 766, 673], [667, 933, 617], [276, 416, 577], [808, 966, 321], [327, 875, 145], [660, 722, 453], [769, 544, 355], [ 83, 391, 382], [837, 184, 553], [111, 352, 193], [ 67, 385, 397], [127, 100, 475], [167, 121, 87], [621, 84, 120], [592, 110, 124], [476, 484, 664], [646, 435, 664], [929, 385, 129], [371, 31, 282], [570, 442, 547], [298, 433, 796], [682, 807, 556], [629, 869, 112], [141, 661, 444], [246, 498, 865], [605, 545, 105], [618, 524, 898], [728, 826, 402], [976, 826, 883], [304, 8, 714], [211, 644, 195], [752, 978, 580], [556, 493, 603], [517, 486, 92], [ 77, 111, 153], [518, 506, 227], [ 72, 281, 637], [764, 717, 633], [696, 727, 639], [463, 375, 93], [258, 772, 590], [266, 460, 593], [886, 950, 90], [699, 747, 433], [950, 411, 516], [372, 990, 673], [ 69, 319, 843], [333, 679, 523], [394, 606, 175], [640, 923, 772], [893, 657, 638], [563, 285, 244], [874, 579, 433], [387, 758, 253], [389, 114, 809], [736, 269, 738], [345, 173, 126], [248, 793, 502], [422, 271, 583], [399, 528, 654], [825, 956, 348], [822, 378, 52], [ 7, 658, 313], [729, 371, 395], [553, 267, 475], [624, 287, 671], [806, 34, 693], [254, 201, 711], [667, 234, 785], [875, 934, 782], [107, 45, 809], [967, 946, 30], [443, 882, 753], [554, 808, 536], [876, 672, 580], [482, 72, 824], [559, 645, 766], [784, 597, 76], [495, 619, 558], [323, 879, 460], [178, 829, 454], [ 12, 230, 592], [ 90, 283, 832], [ 81, 203, 452], [201, 978, 785], [643, 869, 591], [647, 180, 854], [343, 624, 137], [744, 771, 278], [717, 272, 303], [304, 298, 799], [107, 418, 960], [353, 378, 798], [544, 642, 606], [475, 300, 383], [445, 801, 935], [778, 582, 638], [938, 608, 375], [342, 481, 512], [666, 72, 708], [349, 725, 780], [368, 797, 163], [342, 815, 441], [167, 959, 681], [499, 199, 813], [475, 461, 495], [354, 462, 532], [390, 730, 369], [202, 623, 877], [656, 139, 883], [495, 666, 8], [348, 955, 976], [998, 356, 906], [725, 645, 938], [353, 539, 438], [982, 470, 636], [651, 140, 906], [895, 706, 538], [895, 721, 203], [158, 26, 649], [489, 249, 520], [320, 157, 751], [810, 274, 812], [327, 315, 921], [639, 56, 738], [941, 360, 442], [117, 419, 127], [167, 535, 403], [118, 834, 388], [ 97, 644, 669], [390, 330, 691], [339, 469, 119], [164, 434, 309], [777, 876, 305], [668, 893, 507], [946, 326, 440], [822, 645, 197], [339, 480, 252], [ 75, 569, 274], [548, 378, 698], [617, 548, 817], [725, 752, 282], [850, 763, 510], [167, 9, 642], [641, 927, 895], [201, 870, 909], [744, 614, 678], [ 44, 16, 322], [127, 164, 930], [163, 163, 672], [945, 865, 251], [647, 817, 352], [315, 69, 100], [ 66, 973, 330], [450, 972, 211], [401, 38, 225], [561, 765, 753], [554, 753, 193], [222, 13, 800], [124, 178, 456], [475, 703, 602], [420, 659, 990], [487, 94, 748], [578, 284, 577], [776, 355, 190], [194, 801, 566], [ 42, 124, 401], [179, 871, 669], [303, 123, 957], [596, 503, 820], [846, 424, 985], [522, 882, 254], [835, 811, 405], [796, 94, 209], [185, 355, 394], [387, 145, 223], [300, 240, 395], [381, 826, 899], [503, 868, 606], [121, 675, 467], [159, 456, 724], [ 28, 477, 233], [165, 43, 566], [159, 404, 26], [969, 413, 725], [927, 389, 733], [720, 345, 38], [752, 197, 879], [219, 196, 866], [583, 195, 84], [654, 996, 364], [234, 941, 298], [136, 890, 732], [147, 296, 874], [245, 948, 627], [633, 404, 794], [443, 689, 477], [819, 923, 324], [391, 821, 683], [774, 255, 339], [684, 856, 391], [751, 420, 608], [594, 884, 207], [280, 903, 472], [365, 916, 620], [421, 1, 760], [ 66, 913, 227], [ 73, 631, 787], [471, 266, 393], [469, 629, 525], [534, 210, 781], [765, 198, 630], [654, 236, 771], [939, 865, 265], [362, 849, 243], [670, 22, 225], [269, 644, 843], [ 30, 586, 15], [266, 178, 849], [237, 547, 926], [908, 33, 574], [788, 525, 895], [717, 448, 413], [951, 4, 254], [931, 447, 158], [254, 856, 371], [941, 803, 322], [697, 678, 99], [339, 508, 155], [958, 608, 661], [639, 356, 692], [121, 320, 969], [222, 47, 76], [130, 273, 957], [243, 85, 734], [696, 302, 809], [665, 375, 287] ]
data = [[775, 785, 361], [622, 375, 125], [297, 839, 375], [245, 38, 891], [503, 463, 849], [731, 482, 759], [29, 734, 734], [245, 771, 269], [261, 315, 904], [669, 96, 581], [570, 745, 156], [124, 678, 684], [472, 360, 73], [174, 251, 926], [406, 408, 976], [413, 238, 571], [375, 554, 22], [211, 379, 590], [271, 821, 847], [696, 253, 116], [513, 972, 959], [539, 557, 752], [168, 362, 550], [690, 236, 284], [434, 91, 818], [859, 393, 779], [620, 313, 56], [188, 983, 783], [799, 900, 573], [932, 359, 565], [357, 670, 69], [525, 71, 52], [640, 654, 43], [695, 781, 907], [676, 680, 938], [63, 507, 570], [985, 492, 587], [984, 34, 333], [25, 489, 399], [470, 158, 43], [715, 491, 617], [508, 412, 607], [365, 446, 743], [504, 189, 378], [225, 424, 517], [473, 45, 649], [847, 927, 424], [455, 889, 697], [64, 230, 846], [579, 368, 881], [639, 536, 74], [433, 803, 943], [14, 629, 963], [432, 481, 136], [781, 625, 323], [836, 215, 201], [620, 614, 366], [801, 679, 673], [745, 376, 326], [891, 957, 751], [64, 430, 347], [784, 534, 237], [740, 485, 470], [570, 894, 790], [905, 979, 90], [571, 526, 716], [810, 602, 259], [20, 41, 648], [816, 566, 848], [891, 883, 616], [801, 797, 341], [99, 119, 584], [175, 40, 994], [8, 234, 831], [184, 254, 958], [625, 999, 945], [326, 385, 266], [475, 644, 785], [345, 769, 650], [427, 410, 680], [689, 887, 40], [380, 109, 842], [342, 640, 785], [164, 546, 554], [843, 871, 419], [873, 687, 74], [84, 192, 465], [186, 777, 83], [180, 130, 726], [315, 860, 652], [88, 273, 735], [859, 684, 791], [806, 655, 299], [763, 409, 636], [310, 532, 897], [891, 163, 855], [631, 200, 986], [104, 559, 294], [555, 679, 989], [770, 437, 935], [997, 189, 711], [830, 300, 983], [566, 325, 793], [7, 694, 911], [574, 490, 138], [596, 230, 973], [855, 377, 552], [969, 150, 518], [453, 653, 525], [753, 556, 47], [858, 509, 551], [103, 545, 325], [660, 215, 284], [566, 509, 591], [647, 97, 650], [993, 597, 775], [970, 566, 802], [242, 922, 349], [693, 932, 502], [872, 267, 657], [526, 87, 944], [395, 85, 188], [134, 129, 901], [56, 244, 785], [1, 733, 300], [55, 698, 552], [372, 933, 480], [548, 459, 792], [631, 653, 983], [443, 320, 23], [555, 117, 715], [665, 268, 704], [804, 899, 736], [654, 823, 13], [441, 250, 736], [229, 324, 580], [41, 389, 857], [215, 103, 753], [933, 311, 835], [955, 234, 744], [113, 141, 315], [790, 130, 235], [464, 464, 129], [328, 386, 315], [787, 735, 301], [839, 744, 299], [77, 119, 23], [407, 321, 190], [968, 962, 904], [653, 752, 732], [962, 145, 723], [175, 452, 717], [868, 474, 195], [10, 273, 943], [308, 388, 626], [296, 133, 647], [851, 474, 336], [839, 777, 975], [514, 651, 867], [949, 947, 886], [802, 92, 113], [167, 938, 941], [840, 627, 166], [825, 72, 754], [166, 661, 677], [759, 71, 279], [705, 70, 113], [849, 4, 295], [563, 679, 588], [343, 76, 636], [842, 669, 45], [892, 597, 431], [26, 864, 580], [889, 509, 641], [696, 267, 506], [608, 778, 297], [293, 867, 667], [662, 469, 97], [243, 184, 809], [785, 434, 715], [691, 568, 759], [599, 4, 164], [444, 566, 816], [486, 145, 595], [787, 41, 538], [953, 151, 842], [861, 877, 759], [228, 972, 678], [846, 114, 915], [253, 41, 621], [59, 989, 405], [222, 948, 665], [478, 631, 364], [524, 717, 175], [752, 94, 474], [47, 421, 419], [113, 510, 343], [99, 733, 667], [787, 651, 708], [703, 557, 486], [489, 637, 702], [510, 287, 529], [483, 308, 545], [454, 177, 87], [433, 735, 242], [638, 734, 172], [208, 702, 285], [999, 157, 251], [776, 76, 341], [689, 164, 553], [477, 938, 456], [45, 848, 863], [466, 255, 644], [578, 396, 93], [471, 419, 368], [411, 27, 320], [317, 291, 732], [303, 42, 605], [597, 313, 473], [70, 419, 120], [101, 440, 745], [35, 176, 656], [236, 329, 198], [74, 296, 40], [272, 78, 233], [864, 404, 510], [37, 368, 531], [828, 35, 50], [191, 272, 396], [238, 548, 387], [129, 527, 13], [464, 600, 194], [385, 42, 341], [81, 596, 432], [589, 663, 943], [256, 704, 723], [671, 152, 505], [873, 532, 364], [758, 755, 202], [378, 621, 563], [735, 463, 555], [806, 910, 409], [809, 897, 276], [546, 755, 608], [609, 852, 79], [279, 133, 527], [106, 696, 980], [63, 981, 360], [90, 440, 832], [127, 860, 495], [714, 395, 480], [815, 485, 59], [792, 91, 507], [249, 524, 138], [567, 452, 486], [923, 544, 768], [913, 253, 767], [456, 582, 293], [706, 507, 577], [187, 619, 644], [569, 978, 602], [88, 886, 291], [448, 712, 211], [517, 815, 258], [743, 397, 816], [977, 793, 795], [847, 905, 668], [690, 869, 162], [426, 541, 257], [637, 586, 272], [82, 950, 821], [785, 936, 350], [812, 31, 490], [318, 253, 159], [515, 688, 479], [423, 855, 407], [931, 830, 651], [496, 241, 28], [491, 924, 624], [864, 966, 133], [171, 438, 712], [736, 867, 734], [551, 548, 267], [288, 455, 474], [557, 622, 273], [494, 74, 507], [541, 628, 390], [288, 583, 310], [411, 63, 353], [487, 527, 295], [520, 567, 536], [739, 816, 848], [349, 681, 269], [898, 902, 676], [647, 759, 892], [573, 512, 75], [186, 252, 895], [804, 320, 772], [730, 934, 107], [198, 651, 774], [625, 535, 985], [568, 499, 235], [159, 42, 837], [854, 617, 695], [34, 299, 670], [823, 733, 41], [830, 615, 789], [825, 652, 562], [697, 105, 504], [114, 103, 540], [18, 141, 106], [94, 121, 479], [859, 774, 177], [464, 873, 208], [790, 125, 305], [982, 586, 811], [521, 386, 478], [916, 329, 620], [764, 91, 351], [526, 684, 103], [314, 749, 283], [510, 226, 378], [160, 269, 278], [638, 368, 120], [616, 540, 475], [863, 637, 89], [744, 172, 445], [856, 391, 269], [768, 276, 634], [940, 610, 820], [289, 254, 649], [254, 364, 98], [304, 613, 620], [164, 652, 257], [890, 74, 483], [813, 640, 710], [884, 99, 735], [707, 881, 380], [954, 983, 971], [487, 911, 275], [256, 920, 43], [384, 772, 313], [863, 120, 903], [703, 821, 82], [765, 731, 957], [55, 935, 516], [162, 785, 801], [140, 161, 927], [460, 139, 84], [926, 139, 965], [764, 3, 976], [765, 487, 42], [377, 835, 277], [897, 734, 256], [345, 320, 55], [515, 755, 504], [615, 623, 562], [412, 280, 6], [382, 392, 468], [365, 625, 461], [542, 406, 610], [360, 200, 801], [562, 221, 627], [556, 557, 141], [372, 231, 212], [523, 457, 272], [80, 701, 676], [940, 59, 871], [906, 695, 987], [715, 922, 573], [618, 446, 552], [196, 849, 62], [772, 867, 608], [735, 377, 418], [676, 607, 236], [25, 447, 830], [187, 270, 738], [214, 175, 990], [438, 790, 816], [456, 396, 534], [220, 628, 356], [384, 935, 215], [377, 593, 802], [566, 651, 650], [648, 529, 999], [128, 884, 472], [688, 951, 661], [312, 722, 722], [48, 526, 696], [266, 347, 903], [698, 21, 354], [933, 404, 570], [303, 417, 685], [46, 562, 897], [566, 931, 14], [539, 747, 911], [374, 623, 743], [868, 353, 513], [927, 903, 481], [207, 765, 560], [351, 956, 215], [540, 945, 512], [362, 322, 651], [820, 555, 190], [548, 301, 467], [405, 931, 842], [598, 347, 150], [276, 971, 814], [450, 480, 361], [577, 538, 493], [139, 104, 181], [716, 233, 697], [494, 647, 287], [511, 782, 575], [809, 728, 107], [895, 167, 85], [741, 746, 141], [23, 115, 83], [173, 147, 549], [191, 208, 581], [313, 356, 284], [357, 393, 123], [60, 322, 363], [830, 87, 661], [403, 711, 713], [433, 651, 101], [783, 738, 792], [574, 821, 764], [705, 214, 263], [256, 243, 334], [341, 152, 444], [520, 140, 131], [975, 461, 313], [319, 441, 161], [791, 47, 309], [228, 973, 235], [583, 305, 398], [389, 876, 277], [551, 974, 351], [822, 786, 876], [364, 347, 874], [523, 130, 173], [806, 90, 462], [304, 146, 402], [748, 760, 239], [164, 345, 704], [833, 817, 628], [239, 739, 640], [284, 296, 234], [127, 711, 415], [435, 590, 402], [480, 250, 914], [282, 379, 914], [547, 845, 267], [922, 795, 324], [600, 500, 447], [342, 464, 53], [404, 341, 143], [641, 129, 90], [375, 730, 138], [263, 32, 124], [450, 749, 251], [588, 697, 89], [688, 431, 603], [156, 614, 617], [604, 259, 349], [475, 282, 45], [572, 197, 308], [743, 749, 686], [770, 811, 907], [117, 543, 845], [41, 179, 766], [147, 555, 742], [130, 410, 169], [476, 62, 627], [652, 879, 240], [678, 852, 508], [953, 795, 413], [699, 597, 444], [324, 577, 846], [919, 79, 727], [908, 719, 125], [128, 776, 714], [299, 256, 118], [513, 222, 115], [624, 75, 181], [1, 605, 162], [55, 106, 230], [58, 672, 286], [639, 558, 549], [150, 662, 435], [662, 695, 222], [461, 173, 344], [428, 354, 647], [56, 405, 653], [699, 631, 995], [967, 608, 269], [365, 853, 794], [768, 606, 943], [413, 601, 128], [362, 427, 919], [735, 448, 566], [276, 354, 377], [604, 657, 544], [913, 192, 592], [811, 762, 62], [120, 720, 606], [618, 232, 392], [85, 19, 764], [603, 241, 541], [993, 997, 840], [818, 894, 266], [247, 305, 682], [280, 964, 511], [559, 967, 455], [531, 38, 674], [878, 731, 684], [783, 156, 390], [617, 742, 604], [370, 770, 896], [592, 667, 353], [222, 921, 736], [741, 508, 285], [759, 395, 156], [37, 128, 254], [209, 631, 716], [237, 423, 613], [65, 856, 439], [942, 526, 288], [862, 811, 341], [753, 840, 59], [369, 67, 907], [817, 947, 802], [768, 945, 137], [356, 557, 207], [716, 9, 205], [361, 558, 1], [310, 889, 719], [97, 128, 887], [361, 776, 873], [86, 181, 892], [284, 865, 808], [218, 859, 279], [299, 649, 624], [542, 583, 624], [617, 66, 48], [921, 459, 75], [921, 672, 759], [800, 345, 814], [572, 975, 685], [720, 980, 867], [522, 135, 267], [139, 376, 86], [362, 399, 585], [330, 206, 511], [419, 194, 679], [293, 374, 3], [560, 272, 676], [224, 926, 717], [685, 927, 347], [555, 786, 943], [591, 776, 538], [326, 835, 471], [635, 67, 464], [276, 916, 913], [304, 965, 2], [50, 110, 912], [893, 200, 307], [445, 248, 596], [725, 128, 681], [279, 602, 888], [7, 204, 766], [284, 429, 191], [264, 503, 351], [531, 335, 140], [381, 220, 292], [518, 905, 824], [416, 477, 600], [405, 663, 511], [531, 92, 321], [824, 131, 534], [409, 113, 431], [12, 192, 485], [864, 557, 391], [858, 390, 756], [28, 465, 231], [188, 216, 825], [177, 316, 910], [766, 41, 329], [202, 105, 219], [787, 125, 542], [639, 108, 5], [639, 10, 525], [17, 105, 532], [586, 498, 918], [630, 389, 19], [317, 361, 903], [185, 575, 708], [679, 532, 355], [851, 367, 844], [775, 68, 120], [644, 45, 194], [802, 44, 242], [852, 214, 601], [595, 525, 281], [258, 450, 415], [534, 121, 561], [117, 33, 620], [576, 147, 318], [217, 953, 365], [863, 686, 803], [751, 694, 680], [502, 669, 546], [385, 204, 399], [740, 760, 650], [105, 567, 227], [526, 574, 378], [496, 858, 216], [248, 475, 19], [790, 358, 887], [556, 713, 866], [348, 334, 937], [364, 364, 88], [396, 58, 915], [871, 418, 645], [438, 507, 449], [967, 924, 960], [435, 153, 47], [831, 861, 835], [787, 958, 832], [376, 231, 602], [487, 528, 782], [485, 532, 607], [820, 96, 256], [856, 177, 549], [302, 240, 751], [146, 412, 332], [268, 715, 463], [309, 584, 399], [939, 548, 465], [966, 854, 412], [517, 385, 574], [425, 809, 919], [88, 796, 924], [468, 317, 287], [195, 131, 961], [10, 485, 229], [190, 374, 827], [573, 178, 842], [575, 255, 358], [220, 359, 713], [401, 853, 206], [736, 904, 667], [450, 209, 798], [865, 42, 300], [806, 373, 182], [383, 403, 258], [397, 51, 691], [492, 146, 568], [814, 179, 584], [545, 851, 182], [606, 135, 208], [135, 934, 183], [733, 365, 561], [215, 97, 642], [617, 418, 209], [641, 297, 106], [400, 876, 246], [399, 665, 156], [424, 20, 222], [954, 860, 194], [930, 875, 34], [883, 469, 376], [111, 576, 753], [995, 515, 461], [535, 380, 786], [117, 578, 780], [646, 803, 965], [243, 951, 886], [563, 935, 879], [520, 91, 879], [390, 332, 402], [955, 471, 221], [810, 398, 527], [312, 876, 131], [256, 371, 527], [293, 945, 501], [724, 900, 650], [798, 526, 908], [199, 510, 377], [285, 338, 780], [729, 157, 584], [866, 259, 438], [91, 680, 717], [982, 618, 786], [918, 255, 178], [66, 257, 416], [288, 223, 81], [237, 405, 404], [597, 762, 518], [671, 661, 39], [976, 431, 502], [524, 337, 919], [524, 194, 343], [23, 167, 623], [882, 993, 129], [741, 572, 465], [694, 830, 394], [353, 846, 895], [312, 254, 903], [52, 614, 101], [300, 513, 706], [976, 310, 698], [929, 736, 22], [732, 248, 113], [816, 471, 405], [230, 466, 355], [749, 854, 492], [956, 286, 554], [833, 928, 239], [334, 883, 528], [782, 968, 977], [715, 608, 898], [264, 576, 100], [530, 705, 344], [779, 189, 245], [560, 692, 658], [550, 325, 931], [22, 757, 277], [860, 962, 567], [695, 542, 611], [227, 936, 116], [812, 696, 604], [889, 520, 282], [512, 180, 350], [735, 582, 392], [511, 400, 667], [754, 871, 309], [899, 133, 582], [986, 66, 309], [186, 183, 367], [543, 242, 522], [132, 255, 887], [538, 225, 934], [57, 276, 438], [452, 396, 382], [501, 608, 195], [292, 741, 619], [69, 671, 801], [331, 731, 279], [485, 350, 380], [81, 926, 182], [513, 834, 298], [165, 801, 799], [204, 426, 521], [245, 650, 330], [716, 716, 155], [693, 699, 658], [305, 69, 710], [661, 744, 698], [599, 327, 957], [577, 593, 903], [924, 117, 176], [949, 808, 323], [267, 710, 257], [91, 683, 927], [404, 262, 918], [347, 716, 109], [155, 266, 483], [142, 676, 512], [216, 501, 103], [923, 110, 424], [856, 329, 617], [229, 332, 231], [466, 803, 573], [498, 388, 827], [38, 788, 587], [770, 367, 435], [736, 584, 445], [93, 569, 834], [65, 948, 479], [172, 630, 581], [239, 369, 396], [820, 270, 656], [32, 515, 348], [803, 324, 969], [70, 188, 635], [219, 766, 279], [166, 736, 640], [257, 604, 851], [555, 616, 822], [589, 345, 165], [166, 196, 64], [909, 185, 700], [870, 119, 693], [20, 565, 737], [680, 198, 244], [700, 486, 825], [194, 812, 67], [236, 756, 407], [64, 905, 344], [92, 755, 905], [748, 349, 681], [707, 781, 811], [505, 50, 456], [471, 889, 672], [35, 891, 334], [899, 411, 164], [663, 459, 232], [539, 446, 322], [57, 785, 718], [273, 421, 308], [308, 744, 501], [45, 819, 416], [936, 258, 466], [980, 825, 841], [100, 33, 345], [898, 904, 750], [920, 903, 453], [947, 9, 765], [580, 979, 375], [753, 977, 844], [402, 174, 156], [573, 827, 782], [975, 663, 644], [179, 358, 353], [55, 777, 834], [221, 871, 631], [120, 714, 199], [663, 369, 217], [599, 713, 135], [11, 472, 765], [803, 445, 746], [797, 30, 284], [259, 776, 677], [598, 707, 675], [484, 339, 3], [298, 750, 162], [119, 820, 168], [180, 69, 9], [433, 332, 676], [142, 164, 343], [435, 233, 414], [153, 977, 263], [532, 54, 244], [600, 999, 25], [394, 756, 311], [354, 196, 703], [666, 858, 760], [227, 312, 525], [389, 419, 436], [218, 311, 744], [318, 531, 245], [324, 939, 509], [183, 997, 543], [944, 598, 70], [790, 486, 828], [710, 745, 880], [546, 368, 219], [316, 668, 29], [398, 360, 218], [702, 453, 987], [774, 462, 373], [722, 829, 947], [541, 732, 44], [310, 494, 582], [239, 596, 548], [579, 810, 907], [490, 169, 62], [926, 883, 915], [281, 414, 595], [845, 412, 609], [632, 106, 618], [112, 404, 492], [864, 460, 314], [842, 93, 436], [412, 805, 874], [353, 686, 465], [240, 393, 800], [788, 654, 346], [666, 78, 185], [418, 608, 404], [658, 537, 960], [794, 449, 680], [711, 324, 489], [59, 525, 330], [323, 259, 544], [359, 745, 542], [877, 701, 403], [119, 897, 533], [977, 392, 227], [528, 340, 194], [398, 180, 283], [538, 301, 123], [775, 263, 195], [53, 385, 630], [749, 253, 686], [533, 30, 624], [678, 187, 590], [937, 218, 50], [205, 466, 918], [796, 672, 47], [818, 203, 963], [461, 953, 881], [739, 457, 696], [661, 711, 220], [624, 121, 663], [908, 173, 644], [602, 185, 70], [168, 957, 159], [283, 341, 934], [196, 845, 939], [494, 354, 543], [796, 422, 87], [430, 762, 478], [526, 762, 859], [535, 600, 926], [28, 555, 651], [170, 748, 379], [117, 745, 33], [52, 1, 351], [946, 796, 446], [148, 844, 920], [950, 131, 740], [392, 490, 118], [286, 465, 667], [202, 101, 662], [326, 629, 556], [773, 661, 219], [540, 683, 613], [406, 314, 525], [154, 947, 451], [401, 661, 186], [574, 690, 796], [558, 730, 855], [153, 244, 156], [618, 37, 10], [856, 991, 363], [820, 959, 370], [644, 700, 800], [421, 469, 908], [422, 233, 288], [416, 281, 707], [370, 430, 487], [284, 525, 916], [535, 713, 354], [210, 576, 524], [432, 930, 215], [712, 374, 612], [686, 508, 102], [40, 141, 616], [979, 525, 663], [838, 696, 326], [472, 261, 357], [321, 910, 663], [228, 153, 536], [223, 940, 896], [137, 39, 506], [139, 706, 187], [4, 666, 483], [944, 856, 119], [720, 602, 93], [410, 260, 85], [601, 647, 520], [162, 474, 317], [599, 742, 313], [242, 886, 381], [250, 78, 353], [109, 916, 117], [597, 926, 673], [318, 114, 309], [892, 819, 424], [491, 682, 85], [765, 657, 682], [558, 60, 721], [990, 634, 160], [640, 461, 410], [430, 839, 535], [42, 961, 686], [752, 251, 690], [747, 931, 3], [439, 930, 85], [44, 628, 953], [465, 961, 874], [313, 447, 913], [249, 600, 859], [359, 896, 472], [698, 187, 657], [57, 957, 805], [721, 977, 239], [782, 93, 96], [860, 159, 250], [368, 142, 218], [565, 157, 46], [622, 403, 383], [63, 546, 382], [63, 774, 308], [446, 495, 475], [467, 831, 310], [448, 77, 798], [930, 281, 189], [767, 289, 644], [514, 765, 524], [330, 827, 992], [340, 284, 964], [600, 97, 785], [418, 432, 755], [983, 442, 58], [872, 435, 725], [107, 344, 315], [917, 682, 547], [24, 613, 561], [665, 448, 238], [680, 872, 737], [108, 180, 449], [220, 545, 583], [268, 676, 863], [796, 791, 2], [694, 992, 39], [788, 767, 41], [235, 572, 377], [975, 864, 883], [953, 448, 608], [909, 888, 452], [93, 850, 414], [852, 48, 49], [136, 558, 842], [300, 428, 776], [427, 814, 64], [223, 45, 283], [100, 562, 659], [290, 519, 828], [678, 786, 346], [371, 711, 934], [686, 276, 826], [808, 208, 669], [832, 198, 6], [317, 11, 675], [504, 182, 448], [162, 745, 642], [623, 791, 687], [408, 947, 693], [247, 267, 641], [328, 693, 758], [773, 411, 149], [66, 2, 589], [786, 407, 527], [81, 760, 803], [946, 696, 552], [878, 698, 994], [190, 203, 649], [548, 713, 634], [657, 724, 676], [195, 397, 887], [175, 346, 118], [356, 264, 981], [191, 919, 468], [490, 470, 570], [583, 740, 151], [340, 773, 889], [176, 446, 314], [206, 384, 935], [172, 996, 620], [362, 842, 497], [208, 786, 731], [207, 395, 750], [368, 819, 87], [524, 524, 702], [609, 761, 554], [753, 975, 290], [559, 932, 731], [584, 203, 140], [477, 100, 982], [784, 162, 876], [371, 209, 67], [236, 754, 108], [439, 633, 163], [734, 717, 626], [808, 216, 639], [133, 521, 94], [180, 813, 208], [136, 770, 844], [57, 867, 871], [700, 900, 740], [96, 75, 662], [628, 893, 284], [843, 851, 196], [546, 427, 607], [797, 471, 664], [180, 363, 117], [961, 775, 95], [846, 969, 210], [535, 269, 666], [216, 585, 490], [736, 521, 335], [489, 493, 602], [627, 574, 723], [857, 217, 629], [385, 808, 433], [615, 115, 361], [687, 705, 455], [898, 390, 177], [737, 393, 476], [355, 727, 371], [533, 526, 69], [615, 467, 157], [614, 683, 202], [876, 892, 581], [949, 165, 357], [86, 766, 432], [233, 47, 702], [448, 407, 821], [227, 364, 424], [158, 372, 933], [966, 405, 365], [913, 512, 813], [585, 698, 482], [720, 171, 716], [172, 868, 740], [96, 489, 33], [531, 882, 552], [618, 949, 523], [425, 860, 424], [909, 676, 116], [806, 770, 430], [836, 868, 355], [640, 561, 523], [858, 353, 411], [400, 149, 612], [872, 364, 491], [940, 469, 870], [127, 256, 47], [561, 306, 322], [626, 147, 276], [13, 547, 289], [218, 561, 705], [234, 16, 842], [301, 663, 261], [81, 415, 368], [301, 945, 593], [232, 855, 760], [522, 649, 929], [401, 847, 376], [764, 542, 452], [774, 536, 929], [10, 935, 499], [710, 262, 94], [72, 475, 524], [722, 618, 481], [515, 135, 637], [962, 115, 303], [665, 88, 416], [544, 303, 735], [828, 488, 680], [827, 575, 354], [44, 999, 437], [232, 985, 128], [226, 36, 346], [310, 325, 307], [473, 809, 315], [184, 487, 91], [778, 310, 926], [749, 260, 988], [869, 216, 878], [663, 790, 458], [914, 237, 476], [258, 935, 201], [956, 796, 313], [888, 105, 282], [160, 874, 42], [715, 524, 451], [477, 604, 886], [596, 111, 554], [524, 510, 388], [778, 878, 320], [894, 453, 574], [210, 808, 633], [340, 77, 956], [159, 872, 426], [4, 756, 333], [528, 697, 677], [530, 474, 442], [75, 427, 536], [874, 706, 437], [944, 536, 357], [726, 919, 349], [911, 791, 637], [447, 224, 483], [742, 941, 693], [632, 42, 918], [302, 907, 547], [204, 618, 927], [86, 765, 15], [280, 396, 926], [857, 422, 560], [801, 355, 368], [53, 718, 577], [613, 946, 933], [641, 378, 563], [39, 928, 423], [252, 906, 454], [626, 318, 81], [477, 838, 407], [85, 531, 475], [129, 622, 419], [184, 372, 147], [364, 805, 559], [445, 128, 302], [656, 813, 724], [485, 140, 509], [537, 267, 549], [164, 184, 89], [464, 231, 881], [111, 63, 706], [383, 283, 567], [408, 31, 455], [698, 864, 501], [692, 887, 753], [573, 681, 783], [453, 393, 338], [171, 707, 850], [68, 663, 190], [342, 588, 284], [309, 218, 102], [121, 743, 56], [321, 722, 379], [307, 99, 357], [444, 485, 636], [548, 419, 517], [407, 101, 714], [168, 496, 140], [111, 520, 594], [55, 129, 476], [706, 849, 93], [529, 200, 416], [848, 680, 470], [731, 189, 61], [591, 689, 20], [801, 777, 52], [395, 449, 821], [337, 421, 292], [618, 208, 674], [116, 13, 66], [459, 790, 615], [429, 796, 565], [891, 795, 903], [929, 443, 263], [49, 694, 890], [708, 929, 577], [764, 786, 554], [971, 473, 236], [271, 483, 440], [666, 506, 858], [582, 959, 594], [470, 918, 457], [583, 662, 551], [777, 446, 214], [609, 503, 929], [861, 691, 766], [256, 201, 940], [894, 386, 172], [624, 397, 17], [615, 9, 159], [454, 494, 344], [606, 717, 995], [251, 333, 688], [714, 910, 670], [531, 346, 227], [693, 754, 745], [947, 8, 411], [9, 862, 598], [937, 858, 601], [309, 977, 18], [731, 684, 943], [579, 384, 958], [359, 647, 495], [8, 355, 476], [363, 459, 21], [712, 383, 997], [892, 71, 981], [374, 433, 156], [86, 194, 341], [60, 298, 385], [31, 110, 452], [813, 501, 635], [249, 82, 215], [895, 585, 456], [571, 961, 784], [734, 746, 854], [742, 268, 73], [575, 7, 583], [660, 643, 908], [559, 643, 336], [222, 725, 935], [660, 82, 939], [709, 745, 41], [277, 504, 918], [604, 679, 913], [717, 419, 183], [613, 306, 732], [491, 694, 742], [628, 707, 108], [885, 867, 527], [970, 740, 567], [147, 267, 119], [288, 766, 969], [132, 190, 372], [175, 862, 992], [942, 468, 639], [63, 908, 581], [939, 703, 830], [328, 186, 554], [936, 130, 355], [865, 270, 479], [253, 104, 444], [99, 378, 107], [342, 385, 340], [651, 480, 324], [14, 841, 249], [635, 538, 79], [229, 415, 530], [489, 931, 329], [654, 828, 719], [911, 703, 693], [202, 425, 201], [897, 314, 745], [126, 606, 323], [201, 459, 307], [79, 719, 51], [595, 913, 432], [261, 980, 554], [708, 272, 591], [423, 754, 58], [175, 538, 449], [552, 671, 418], [871, 86, 809], [5, 579, 309], [877, 635, 850], [607, 621, 470], [584, 166, 732], [443, 666, 887], [305, 612, 454], [547, 252, 90], [324, 431, 510], [827, 912, 501], [329, 868, 593], [524, 944, 461], [10, 709, 299], [902, 76, 539], [894, 783, 448], [304, 883, 270], [358, 716, 346], [626, 192, 530], [900, 47, 880], [807, 796, 757], [672, 774, 885], [596, 391, 358], [300, 355, 318], [617, 44, 310], [363, 51, 907], [138, 183, 704], [243, 184, 234], [977, 406, 460], [811, 692, 579], [412, 459, 196], [509, 346, 366], [697, 646, 777], [247, 930, 583], [383, 268, 54], [387, 11, 471], [434, 273, 444], [462, 191, 917], [474, 236, 605], [924, 192, 348], [515, 15, 128], [398, 609, 300], [608, 627, 296], [289, 624, 427], [16, 448, 70], [280, 329, 492], [186, 448, 444], [709, 27, 239], [566, 472, 535], [395, 737, 535], [666, 108, 512], [398, 788, 762], [187, 46, 733], [689, 389, 690], [717, 350, 106], [243, 988, 623], [13, 950, 830], [247, 379, 679], [654, 150, 272], [157, 229, 213], [710, 232, 314], [585, 591, 948], [193, 624, 781], [504, 553, 685], [135, 76, 444], [998, 845, 416], [901, 917, 69], [885, 266, 328], [32, 236, 487], [877, 223, 312], [602, 264, 297], [429, 852, 180], [558, 833, 380], [579, 341, 829], [708, 823, 603], [480, 625, 551], [168, 995, 465], [24, 236, 898], [180, 770, 985], [827, 126, 352], [790, 491, 324], [198, 379, 105], [953, 609, 224], [793, 519, 389], [988, 303, 169], [636, 575, 937], [460, 869, 500], [859, 552, 819], [647, 650, 366], [838, 643, 233], [223, 170, 244], [689, 381, 542], [15, 293, 371], [696, 443, 796], [549, 128, 525], [919, 719, 231], [651, 599, 417], [413, 80, 413], [864, 940, 344], [753, 989, 342], [583, 816, 28], [399, 818, 894], [522, 1, 884], [105, 122, 148], [2, 868, 301], [100, 945, 306], [990, 516, 458], [604, 484, 27], [587, 36, 468], [774, 726, 241], [931, 993, 277], [908, 406, 352], [783, 586, 706], [760, 27, 469], [42, 611, 958], [72, 118, 399], [526, 638, 55], [598, 737, 392], [134, 84, 825], [734, 804, 273], [600, 778, 888], [788, 539, 691], [57, 854, 592], [824, 629, 286], [359, 24, 824], [548, 857, 646], [820, 831, 194], [29, 842, 939], [966, 133, 201], [992, 709, 970], [357, 44, 29], [320, 649, 356], [35, 611, 379], [407, 894, 581], [408, 940, 680], [652, 367, 124], [630, 200, 182], [652, 271, 828], [65, 296, 786], [821, 42, 341], [84, 24, 562], [894, 29, 500], [739, 799, 310], [289, 461, 385], [540, 731, 430], [393, 303, 389], [756, 560, 731], [637, 470, 761], [105, 314, 202], [339, 437, 717], [256, 526, 810], [639, 382, 381], [11, 289, 290], [638, 450, 336], [602, 415, 901], [671, 494, 718], [460, 507, 186], [596, 160, 528], [766, 811, 389], [319, 955, 281], [24, 317, 562], [489, 870, 295], [514, 924, 477], [386, 887, 49], [479, 940, 432], [558, 523, 416], [343, 53, 46], [542, 803, 597], [696, 784, 565], [474, 495, 650], [613, 692, 465], [352, 841, 199], [911, 927, 640], [273, 693, 512], [701, 468, 597], [144, 915, 630], [949, 967, 185], [952, 293, 538], [642, 426, 249], [788, 408, 678], [457, 32, 579], [571, 462, 686], [650, 752, 651], [260, 681, 182], [158, 89, 312], [693, 336, 517], [812, 355, 634], [216, 507, 591], [643, 520, 310], [769, 18, 896], [630, 852, 677], [566, 912, 185], [643, 621, 739], [433, 347, 52], [691, 413, 758], [262, 458, 761], [882, 877, 576], [914, 254, 194], [407, 919, 511], [826, 345, 490], [551, 187, 611], [501, 163, 507], [59, 749, 708], [364, 502, 718], [390, 317, 38], [316, 77, 424], [400, 834, 339], [296, 868, 102], [360, 533, 38], [326, 607, 529], [442, 962, 544], [773, 371, 300], [22, 6, 300], [789, 378, 386], [643, 461, 14], [486, 312, 75], [901, 428, 73], [275, 734, 871], [384, 793, 475], [197, 59, 798], [662, 682, 342], [812, 638, 459], [461, 59, 642], [895, 253, 990], [693, 128, 596], [415, 270, 537], [587, 193, 575], [265, 644, 638], [745, 661, 61], [465, 712, 251], [269, 617, 285], [257, 958, 442], [387, 120, 612], [776, 833, 198], [734, 948, 726], [946, 539, 878], [58, 776, 787], [970, 235, 143], [129, 875, 350], [561, 999, 180], [496, 609, 390], [460, 184, 184], [618, 137, 25], [866, 189, 170], [959, 997, 911], [631, 636, 728], [466, 947, 468], [76, 708, 913], [70, 15, 811], [65, 713, 307], [110, 503, 597], [776, 808, 944], [854, 330, 755], [978, 207, 896], [850, 835, 978], [378, 937, 657], [403, 421, 492], [716, 530, 63], [854, 249, 518], [657, 998, 958], [355, 921, 346], [761, 267, 642], [980, 83, 943], [691, 726, 115], [342, 724, 842], [859, 144, 504], [978, 822, 631], [198, 929, 453], [657, 423, 603], [687, 450, 417], [297, 44, 260], [158, 460, 781], [29, 108, 744], [136, 486, 409], [941, 659, 831], [71, 606, 640], [908, 251, 372], [403, 180, 857], [458, 598, 52], [184, 594, 880], [38, 861, 395], [302, 850, 883], [262, 580, 667], [2, 905, 843], [474, 825, 794], [473, 209, 96], [926, 833, 585], [903, 119, 532], [23, 712, 831], [875, 558, 406], [146, 635, 851], [844, 703, 511], [900, 530, 612], [824, 21, 356], [746, 511, 721], [737, 445, 326], [644, 162, 309], [892, 291, 17], [105, 581, 795], [318, 869, 402], [408, 289, 535], [656, 444, 83], [647, 754, 133], [43, 901, 205], [386, 420, 766], [549, 90, 859], [756, 436, 188], [664, 491, 753], [700, 402, 573], [403, 590, 189], [258, 982, 20], [4, 553, 529], [264, 718, 538], [206, 647, 136], [257, 860, 279], [338, 449, 249], [421, 569, 865], [188, 640, 124], [487, 538, 796], [276, 358, 748], [269, 260, 625], [83, 106, 309], [496, 340, 467], [456, 953, 179], [461, 643, 367], [411, 722, 222], [519, 763, 677], [550, 39, 539], [135, 828, 760], [979, 742, 988], [868, 428, 315], [423, 535, 869], [677, 757, 875], [853, 415, 618], [591, 425, 937], [585, 896, 318], [207, 695, 782], [200, 904, 131], [95, 563, 623], [176, 675, 532], [493, 704, 628], [707, 685, 521], [690, 484, 543], [584, 766, 673], [667, 933, 617], [276, 416, 577], [808, 966, 321], [327, 875, 145], [660, 722, 453], [769, 544, 355], [83, 391, 382], [837, 184, 553], [111, 352, 193], [67, 385, 397], [127, 100, 475], [167, 121, 87], [621, 84, 120], [592, 110, 124], [476, 484, 664], [646, 435, 664], [929, 385, 129], [371, 31, 282], [570, 442, 547], [298, 433, 796], [682, 807, 556], [629, 869, 112], [141, 661, 444], [246, 498, 865], [605, 545, 105], [618, 524, 898], [728, 826, 402], [976, 826, 883], [304, 8, 714], [211, 644, 195], [752, 978, 580], [556, 493, 603], [517, 486, 92], [77, 111, 153], [518, 506, 227], [72, 281, 637], [764, 717, 633], [696, 727, 639], [463, 375, 93], [258, 772, 590], [266, 460, 593], [886, 950, 90], [699, 747, 433], [950, 411, 516], [372, 990, 673], [69, 319, 843], [333, 679, 523], [394, 606, 175], [640, 923, 772], [893, 657, 638], [563, 285, 244], [874, 579, 433], [387, 758, 253], [389, 114, 809], [736, 269, 738], [345, 173, 126], [248, 793, 502], [422, 271, 583], [399, 528, 654], [825, 956, 348], [822, 378, 52], [7, 658, 313], [729, 371, 395], [553, 267, 475], [624, 287, 671], [806, 34, 693], [254, 201, 711], [667, 234, 785], [875, 934, 782], [107, 45, 809], [967, 946, 30], [443, 882, 753], [554, 808, 536], [876, 672, 580], [482, 72, 824], [559, 645, 766], [784, 597, 76], [495, 619, 558], [323, 879, 460], [178, 829, 454], [12, 230, 592], [90, 283, 832], [81, 203, 452], [201, 978, 785], [643, 869, 591], [647, 180, 854], [343, 624, 137], [744, 771, 278], [717, 272, 303], [304, 298, 799], [107, 418, 960], [353, 378, 798], [544, 642, 606], [475, 300, 383], [445, 801, 935], [778, 582, 638], [938, 608, 375], [342, 481, 512], [666, 72, 708], [349, 725, 780], [368, 797, 163], [342, 815, 441], [167, 959, 681], [499, 199, 813], [475, 461, 495], [354, 462, 532], [390, 730, 369], [202, 623, 877], [656, 139, 883], [495, 666, 8], [348, 955, 976], [998, 356, 906], [725, 645, 938], [353, 539, 438], [982, 470, 636], [651, 140, 906], [895, 706, 538], [895, 721, 203], [158, 26, 649], [489, 249, 520], [320, 157, 751], [810, 274, 812], [327, 315, 921], [639, 56, 738], [941, 360, 442], [117, 419, 127], [167, 535, 403], [118, 834, 388], [97, 644, 669], [390, 330, 691], [339, 469, 119], [164, 434, 309], [777, 876, 305], [668, 893, 507], [946, 326, 440], [822, 645, 197], [339, 480, 252], [75, 569, 274], [548, 378, 698], [617, 548, 817], [725, 752, 282], [850, 763, 510], [167, 9, 642], [641, 927, 895], [201, 870, 909], [744, 614, 678], [44, 16, 322], [127, 164, 930], [163, 163, 672], [945, 865, 251], [647, 817, 352], [315, 69, 100], [66, 973, 330], [450, 972, 211], [401, 38, 225], [561, 765, 753], [554, 753, 193], [222, 13, 800], [124, 178, 456], [475, 703, 602], [420, 659, 990], [487, 94, 748], [578, 284, 577], [776, 355, 190], [194, 801, 566], [42, 124, 401], [179, 871, 669], [303, 123, 957], [596, 503, 820], [846, 424, 985], [522, 882, 254], [835, 811, 405], [796, 94, 209], [185, 355, 394], [387, 145, 223], [300, 240, 395], [381, 826, 899], [503, 868, 606], [121, 675, 467], [159, 456, 724], [28, 477, 233], [165, 43, 566], [159, 404, 26], [969, 413, 725], [927, 389, 733], [720, 345, 38], [752, 197, 879], [219, 196, 866], [583, 195, 84], [654, 996, 364], [234, 941, 298], [136, 890, 732], [147, 296, 874], [245, 948, 627], [633, 404, 794], [443, 689, 477], [819, 923, 324], [391, 821, 683], [774, 255, 339], [684, 856, 391], [751, 420, 608], [594, 884, 207], [280, 903, 472], [365, 916, 620], [421, 1, 760], [66, 913, 227], [73, 631, 787], [471, 266, 393], [469, 629, 525], [534, 210, 781], [765, 198, 630], [654, 236, 771], [939, 865, 265], [362, 849, 243], [670, 22, 225], [269, 644, 843], [30, 586, 15], [266, 178, 849], [237, 547, 926], [908, 33, 574], [788, 525, 895], [717, 448, 413], [951, 4, 254], [931, 447, 158], [254, 856, 371], [941, 803, 322], [697, 678, 99], [339, 508, 155], [958, 608, 661], [639, 356, 692], [121, 320, 969], [222, 47, 76], [130, 273, 957], [243, 85, 734], [696, 302, 809], [665, 375, 287]]
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def upb_deps(): maybe( http_archive, name = "com_google_absl", url = "https://github.com/abseil/abseil-cpp/archive/b9b925341f9e90f5e7aa0cf23f036c29c7e454eb.zip", strip_prefix = "abseil-cpp-b9b925341f9e90f5e7aa0cf23f036c29c7e454eb", sha256 = "bb2a0b57c92b6666e8acb00f4cbbfce6ddb87e83625fb851b0e78db581340617", ) maybe( git_repository, name = "com_google_protobuf", commit = "2f91da585e96a7efe43505f714f03c7716a94ecb", remote = "https://github.com/protocolbuffers/protobuf.git", patches = [ "//bazel:protobuf.patch", ], patch_cmds = [ "rm python/google/protobuf/__init__.py", "rm python/google/protobuf/pyext/__init__.py", "rm python/google/protobuf/internal/__init__.py", ], ) rules_python_version = "740825b7f74930c62f44af95c9a4c1bd428d2c53" # Latest @ 2021-06-23 maybe( http_archive, name = "rules_python", strip_prefix = "rules_python-{}".format(rules_python_version), url = "https://github.com/bazelbuild/rules_python/archive/{}.zip".format(rules_python_version), sha256 = "09a3c4791c61b62c2cbc5b2cbea4ccc32487b38c7a2cc8f87a794d7a659cc742", ) maybe( http_archive, name = "bazel_skylib", strip_prefix = "bazel-skylib-main", urls = ["https://github.com/bazelbuild/bazel-skylib/archive/main.tar.gz"], )
load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository') load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive') load('@bazel_tools//tools/build_defs/repo:utils.bzl', 'maybe') def upb_deps(): maybe(http_archive, name='com_google_absl', url='https://github.com/abseil/abseil-cpp/archive/b9b925341f9e90f5e7aa0cf23f036c29c7e454eb.zip', strip_prefix='abseil-cpp-b9b925341f9e90f5e7aa0cf23f036c29c7e454eb', sha256='bb2a0b57c92b6666e8acb00f4cbbfce6ddb87e83625fb851b0e78db581340617') maybe(git_repository, name='com_google_protobuf', commit='2f91da585e96a7efe43505f714f03c7716a94ecb', remote='https://github.com/protocolbuffers/protobuf.git', patches=['//bazel:protobuf.patch'], patch_cmds=['rm python/google/protobuf/__init__.py', 'rm python/google/protobuf/pyext/__init__.py', 'rm python/google/protobuf/internal/__init__.py']) rules_python_version = '740825b7f74930c62f44af95c9a4c1bd428d2c53' maybe(http_archive, name='rules_python', strip_prefix='rules_python-{}'.format(rules_python_version), url='https://github.com/bazelbuild/rules_python/archive/{}.zip'.format(rules_python_version), sha256='09a3c4791c61b62c2cbc5b2cbea4ccc32487b38c7a2cc8f87a794d7a659cc742') maybe(http_archive, name='bazel_skylib', strip_prefix='bazel-skylib-main', urls=['https://github.com/bazelbuild/bazel-skylib/archive/main.tar.gz'])
base_request = { 'route': { 'type': 'string', 'required': True }, 'type': { 'type': 'string', 'required': True, 'allowed': ['open', 'close'] }, 'stream': { 'type': 'string', 'required': True }, 'session': { 'type': 'string', 'required': False }, 'message': { 'type': 'dict', 'required': True, 'allow_unknown': True, 'schema': {} } }
base_request = {'route': {'type': 'string', 'required': True}, 'type': {'type': 'string', 'required': True, 'allowed': ['open', 'close']}, 'stream': {'type': 'string', 'required': True}, 'session': {'type': 'string', 'required': False}, 'message': {'type': 'dict', 'required': True, 'allow_unknown': True, 'schema': {}}}
set_name(0x801379C4, "PresOnlyTestRoutine__Fv", SN_NOWARN) set_name(0x801379EC, "FeInitBuffer__Fv", SN_NOWARN) set_name(0x80137A14, "FeAddEntry__Fii8TXT_JUSTUsP7FeTableP5CFont", SN_NOWARN) set_name(0x80137A88, "FeAddTable__FP11FeMenuTablei", SN_NOWARN) set_name(0x80137B04, "FeDrawBuffer__Fv", SN_NOWARN) set_name(0x80137EF4, "FeNewMenu__FP7FeTable", SN_NOWARN) set_name(0x80137F74, "FePrevMenu__Fv", SN_NOWARN) set_name(0x80137FF8, "FeSelUp__Fi", SN_NOWARN) set_name(0x801380E0, "FeSelDown__Fi", SN_NOWARN) set_name(0x801381C4, "FeGetCursor__Fv", SN_NOWARN) set_name(0x801381D8, "FeSelect__Fv", SN_NOWARN) set_name(0x8013821C, "FeMainKeyCtrl__FP7CScreen", SN_NOWARN) set_name(0x80138428, "InitDummyMenu__Fv", SN_NOWARN) set_name(0x80138430, "InitFrontEnd__FP9FE_CREATE", SN_NOWARN) set_name(0x801384F0, "FeInitMainMenu__Fv", SN_NOWARN) set_name(0x8013854C, "FeInitNewGameMenu__Fv", SN_NOWARN) set_name(0x80138598, "FeNewGameMenuCtrl__Fv", SN_NOWARN) set_name(0x8013868C, "FeInitPlayer1ClassMenu__Fv", SN_NOWARN) set_name(0x801386FC, "FeInitPlayer2ClassMenu__Fv", SN_NOWARN) set_name(0x8013876C, "FePlayerClassMenuCtrl__Fv", SN_NOWARN) set_name(0x801387B4, "FeDrawChrClass__Fv", SN_NOWARN) set_name(0x80138C50, "FeInitNewP1NameMenu__Fv", SN_NOWARN) set_name(0x80138CA0, "FeInitNewP2NameMenu__Fv", SN_NOWARN) set_name(0x80138CF0, "FeNewNameMenuCtrl__Fv", SN_NOWARN) set_name(0x80139240, "FeCopyPlayerInfoForReturn__Fv", SN_NOWARN) set_name(0x80139310, "FeEnterGame__Fv", SN_NOWARN) set_name(0x80139338, "FeInitLoadMemcardSelect__Fv", SN_NOWARN) set_name(0x801393A0, "FeInitLoadChar1Menu__Fv", SN_NOWARN) set_name(0x8013940C, "FeInitLoadChar2Menu__Fv", SN_NOWARN) set_name(0x80139478, "FeInitDifficultyMenu__Fv", SN_NOWARN) set_name(0x801394BC, "FeDifficultyMenuCtrl__Fv", SN_NOWARN) set_name(0x80139574, "FeInitBackgroundMenu__Fv", SN_NOWARN) set_name(0x801395BC, "FeInitBook1Menu__Fv", SN_NOWARN) set_name(0x80139608, "FeInitBook2Menu__Fv", SN_NOWARN) set_name(0x80139654, "FeBackBookMenuCtrl__Fv", SN_NOWARN) set_name(0x80139850, "PlayDemo__Fv", SN_NOWARN) set_name(0x80139864, "FadeFEOut__FP7CScreen", SN_NOWARN) set_name(0x80139908, "FrontEndTask__FP4TASK", SN_NOWARN) set_name(0x80139CC4, "McMainCharKeyCtrl__Fv", SN_NOWARN) set_name(0x8013A0CC, "DrawFeTwinkle__Fii", SN_NOWARN) set_name(0x8013A18C, "___6Dialog", SN_NOWARN) set_name(0x8013A1B4, "__6Dialog", SN_NOWARN) set_name(0x8013A210, "___7CScreen", SN_NOWARN) set_name(0x8013ADD4, "InitCredits__Fv", SN_NOWARN) set_name(0x8013AE10, "PrintCredits__FPciiiii", SN_NOWARN) set_name(0x8013B630, "DrawCreditsTitle__Fiiiii", SN_NOWARN) set_name(0x8013B6FC, "DrawCreditsSubTitle__Fiiiii", SN_NOWARN) set_name(0x8013B7D8, "DoCredits__Fv", SN_NOWARN) set_name(0x8013BA4C, "PRIM_GetPrim__FPP8POLY_FT4", SN_NOWARN) set_name(0x8013BAC8, "GetCharHeight__5CFontc", SN_NOWARN) set_name(0x8013BB00, "GetCharWidth__5CFontc", SN_NOWARN) set_name(0x8013BB58, "___7CScreen_addr_8013BB58", SN_NOWARN) set_name(0x8013BB78, "GetFr__7TextDati", SN_NOWARN) set_name(0x80140170, "endian_swap__FPUci", SN_NOWARN) set_name(0x801401A4, "to_sjis__Fc", SN_NOWARN) set_name(0x80140224, "to_ascii__FUs", SN_NOWARN) set_name(0x801402A4, "ascii_to_sjis__FPcPUs", SN_NOWARN) set_name(0x80140338, "sjis_to_ascii__FPUsPc", SN_NOWARN) set_name(0x801403C0, "test_hw_event__Fv", SN_NOWARN) set_name(0x80140450, "read_card_directory__Fi", SN_NOWARN) set_name(0x80140688, "test_card_format__Fi", SN_NOWARN) set_name(0x80140718, "checksum_data__FPci", SN_NOWARN) set_name(0x80140754, "delete_card_file__Fii", SN_NOWARN) set_name(0x8014084C, "read_card_file__FiiiPc", SN_NOWARN) set_name(0x80140A04, "format_card__Fi", SN_NOWARN) set_name(0x80140AB4, "write_card_file__FiiPcT2PUcPUsiT4", SN_NOWARN) set_name(0x80140DFC, "new_card__Fi", SN_NOWARN) set_name(0x80140E78, "service_card__Fi", SN_NOWARN) set_name(0x8015B068, "GetFileNumber__FiPc", SN_NOWARN) set_name(0x8015B128, "DoSaveCharacter__FPc", SN_NOWARN) set_name(0x8015B1F0, "DoSaveGame__Fv", SN_NOWARN) set_name(0x8015B2B0, "DoLoadGame__Fv", SN_NOWARN) set_name(0x8015B2F0, "DoFrontEndLoadCharacter__FPc", SN_NOWARN) set_name(0x8015B34C, "McInitLoadCard1Menu__Fv", SN_NOWARN) set_name(0x8015B398, "McInitLoadCard2Menu__Fv", SN_NOWARN) set_name(0x8015B3E4, "ChooseCardLoad__Fv", SN_NOWARN) set_name(0x8015B498, "McInitLoadCharMenu__Fv", SN_NOWARN) set_name(0x8015B4C0, "McInitLoadGameMenu__Fv", SN_NOWARN) set_name(0x8015B51C, "McMainKeyCtrl__Fv", SN_NOWARN) set_name(0x8015B6D8, "ShowAlertBox__Fv", SN_NOWARN) set_name(0x8015B878, "GetLoadStatusMessage__FPc", SN_NOWARN) set_name(0x8015B8F8, "GetSaveStatusMessage__FiPc", SN_NOWARN) set_name(0x8015B9D0, "SetRGB__6DialogUcUcUc", SN_NOWARN) set_name(0x8015B9F0, "SetBack__6Dialogi", SN_NOWARN) set_name(0x8015B9F8, "SetBorder__6Dialogi", SN_NOWARN) set_name(0x8015BA00, "SetOTpos__6Dialogi", SN_NOWARN) set_name(0x8015BA0C, "___6Dialog_addr_8015BA0C", SN_NOWARN) set_name(0x8015BA34, "__6Dialog_addr_8015BA34", SN_NOWARN) set_name(0x8015BA90, "ILoad__Fv", SN_NOWARN) set_name(0x8015BAE4, "LoadQuest__Fi", SN_NOWARN) set_name(0x8015BBAC, "ISave__Fi", SN_NOWARN) set_name(0x8015BC0C, "SaveQuest__Fi", SN_NOWARN) set_name(0x8015BCD8, "PSX_GM_SaveGame__FiPcT1", SN_NOWARN) set_name(0x8015BFA0, "PSX_GM_LoadGame__FUcii", SN_NOWARN) set_name(0x8015C29C, "PSX_CH_LoadGame__Fii", SN_NOWARN) set_name(0x8015C3C4, "PSX_CH_SaveGame__FiPcT1", SN_NOWARN) set_name(0x8015C544, "RestorePads__Fv", SN_NOWARN) set_name(0x8015C604, "StorePads__Fv", SN_NOWARN) set_name(0x8015C6C0, "GetIcon__Fv", SN_NOWARN) set_name(0x8015C6FC, "PSX_OPT_LoadGame__Fii", SN_NOWARN) set_name(0x8015C7A4, "PSX_OPT_SaveGame__Fi", SN_NOWARN) set_name(0x8013A2E4, "CreditsTitle", SN_NOWARN) set_name(0x8013A48C, "CreditsSubTitle", SN_NOWARN) set_name(0x8013A928, "CreditsText", SN_NOWARN) set_name(0x8013AA40, "CreditsTable", SN_NOWARN) set_name(0x8013BC70, "card_dir", SN_NOWARN) set_name(0x8013C170, "card_header", SN_NOWARN) set_name(0x8013BB94, "sjis_table", SN_NOWARN) set_name(0x80141068, "save_buffer", SN_NOWARN) set_name(0x80140FE4, "McLoadGameMenu", SN_NOWARN) set_name(0x80140FC4, "CharFileList", SN_NOWARN) set_name(0x80140FD8, "Classes", SN_NOWARN) set_name(0x80141000, "McLoadCharMenu", SN_NOWARN) set_name(0x8014101C, "McLoadCard1Menu", SN_NOWARN) set_name(0x80141038, "McLoadCard2Menu", SN_NOWARN)
set_name(2148760004, 'PresOnlyTestRoutine__Fv', SN_NOWARN) set_name(2148760044, 'FeInitBuffer__Fv', SN_NOWARN) set_name(2148760084, 'FeAddEntry__Fii8TXT_JUSTUsP7FeTableP5CFont', SN_NOWARN) set_name(2148760200, 'FeAddTable__FP11FeMenuTablei', SN_NOWARN) set_name(2148760324, 'FeDrawBuffer__Fv', SN_NOWARN) set_name(2148761332, 'FeNewMenu__FP7FeTable', SN_NOWARN) set_name(2148761460, 'FePrevMenu__Fv', SN_NOWARN) set_name(2148761592, 'FeSelUp__Fi', SN_NOWARN) set_name(2148761824, 'FeSelDown__Fi', SN_NOWARN) set_name(2148762052, 'FeGetCursor__Fv', SN_NOWARN) set_name(2148762072, 'FeSelect__Fv', SN_NOWARN) set_name(2148762140, 'FeMainKeyCtrl__FP7CScreen', SN_NOWARN) set_name(2148762664, 'InitDummyMenu__Fv', SN_NOWARN) set_name(2148762672, 'InitFrontEnd__FP9FE_CREATE', SN_NOWARN) set_name(2148762864, 'FeInitMainMenu__Fv', SN_NOWARN) set_name(2148762956, 'FeInitNewGameMenu__Fv', SN_NOWARN) set_name(2148763032, 'FeNewGameMenuCtrl__Fv', SN_NOWARN) set_name(2148763276, 'FeInitPlayer1ClassMenu__Fv', SN_NOWARN) set_name(2148763388, 'FeInitPlayer2ClassMenu__Fv', SN_NOWARN) set_name(2148763500, 'FePlayerClassMenuCtrl__Fv', SN_NOWARN) set_name(2148763572, 'FeDrawChrClass__Fv', SN_NOWARN) set_name(2148764752, 'FeInitNewP1NameMenu__Fv', SN_NOWARN) set_name(2148764832, 'FeInitNewP2NameMenu__Fv', SN_NOWARN) set_name(2148764912, 'FeNewNameMenuCtrl__Fv', SN_NOWARN) set_name(2148766272, 'FeCopyPlayerInfoForReturn__Fv', SN_NOWARN) set_name(2148766480, 'FeEnterGame__Fv', SN_NOWARN) set_name(2148766520, 'FeInitLoadMemcardSelect__Fv', SN_NOWARN) set_name(2148766624, 'FeInitLoadChar1Menu__Fv', SN_NOWARN) set_name(2148766732, 'FeInitLoadChar2Menu__Fv', SN_NOWARN) set_name(2148766840, 'FeInitDifficultyMenu__Fv', SN_NOWARN) set_name(2148766908, 'FeDifficultyMenuCtrl__Fv', SN_NOWARN) set_name(2148767092, 'FeInitBackgroundMenu__Fv', SN_NOWARN) set_name(2148767164, 'FeInitBook1Menu__Fv', SN_NOWARN) set_name(2148767240, 'FeInitBook2Menu__Fv', SN_NOWARN) set_name(2148767316, 'FeBackBookMenuCtrl__Fv', SN_NOWARN) set_name(2148767824, 'PlayDemo__Fv', SN_NOWARN) set_name(2148767844, 'FadeFEOut__FP7CScreen', SN_NOWARN) set_name(2148768008, 'FrontEndTask__FP4TASK', SN_NOWARN) set_name(2148768964, 'McMainCharKeyCtrl__Fv', SN_NOWARN) set_name(2148769996, 'DrawFeTwinkle__Fii', SN_NOWARN) set_name(2148770188, '___6Dialog', SN_NOWARN) set_name(2148770228, '__6Dialog', SN_NOWARN) set_name(2148770320, '___7CScreen', SN_NOWARN) set_name(2148773332, 'InitCredits__Fv', SN_NOWARN) set_name(2148773392, 'PrintCredits__FPciiiii', SN_NOWARN) set_name(2148775472, 'DrawCreditsTitle__Fiiiii', SN_NOWARN) set_name(2148775676, 'DrawCreditsSubTitle__Fiiiii', SN_NOWARN) set_name(2148775896, 'DoCredits__Fv', SN_NOWARN) set_name(2148776524, 'PRIM_GetPrim__FPP8POLY_FT4', SN_NOWARN) set_name(2148776648, 'GetCharHeight__5CFontc', SN_NOWARN) set_name(2148776704, 'GetCharWidth__5CFontc', SN_NOWARN) set_name(2148776792, '___7CScreen_addr_8013BB58', SN_NOWARN) set_name(2148776824, 'GetFr__7TextDati', SN_NOWARN) set_name(2148794736, 'endian_swap__FPUci', SN_NOWARN) set_name(2148794788, 'to_sjis__Fc', SN_NOWARN) set_name(2148794916, 'to_ascii__FUs', SN_NOWARN) set_name(2148795044, 'ascii_to_sjis__FPcPUs', SN_NOWARN) set_name(2148795192, 'sjis_to_ascii__FPUsPc', SN_NOWARN) set_name(2148795328, 'test_hw_event__Fv', SN_NOWARN) set_name(2148795472, 'read_card_directory__Fi', SN_NOWARN) set_name(2148796040, 'test_card_format__Fi', SN_NOWARN) set_name(2148796184, 'checksum_data__FPci', SN_NOWARN) set_name(2148796244, 'delete_card_file__Fii', SN_NOWARN) set_name(2148796492, 'read_card_file__FiiiPc', SN_NOWARN) set_name(2148796932, 'format_card__Fi', SN_NOWARN) set_name(2148797108, 'write_card_file__FiiPcT2PUcPUsiT4', SN_NOWARN) set_name(2148797948, 'new_card__Fi', SN_NOWARN) set_name(2148798072, 'service_card__Fi', SN_NOWARN) set_name(2148905064, 'GetFileNumber__FiPc', SN_NOWARN) set_name(2148905256, 'DoSaveCharacter__FPc', SN_NOWARN) set_name(2148905456, 'DoSaveGame__Fv', SN_NOWARN) set_name(2148905648, 'DoLoadGame__Fv', SN_NOWARN) set_name(2148905712, 'DoFrontEndLoadCharacter__FPc', SN_NOWARN) set_name(2148905804, 'McInitLoadCard1Menu__Fv', SN_NOWARN) set_name(2148905880, 'McInitLoadCard2Menu__Fv', SN_NOWARN) set_name(2148905956, 'ChooseCardLoad__Fv', SN_NOWARN) set_name(2148906136, 'McInitLoadCharMenu__Fv', SN_NOWARN) set_name(2148906176, 'McInitLoadGameMenu__Fv', SN_NOWARN) set_name(2148906268, 'McMainKeyCtrl__Fv', SN_NOWARN) set_name(2148906712, 'ShowAlertBox__Fv', SN_NOWARN) set_name(2148907128, 'GetLoadStatusMessage__FPc', SN_NOWARN) set_name(2148907256, 'GetSaveStatusMessage__FiPc', SN_NOWARN) set_name(2148907472, 'SetRGB__6DialogUcUcUc', SN_NOWARN) set_name(2148907504, 'SetBack__6Dialogi', SN_NOWARN) set_name(2148907512, 'SetBorder__6Dialogi', SN_NOWARN) set_name(2148907520, 'SetOTpos__6Dialogi', SN_NOWARN) set_name(2148907532, '___6Dialog_addr_8015BA0C', SN_NOWARN) set_name(2148907572, '__6Dialog_addr_8015BA34', SN_NOWARN) set_name(2148907664, 'ILoad__Fv', SN_NOWARN) set_name(2148907748, 'LoadQuest__Fi', SN_NOWARN) set_name(2148907948, 'ISave__Fi', SN_NOWARN) set_name(2148908044, 'SaveQuest__Fi', SN_NOWARN) set_name(2148908248, 'PSX_GM_SaveGame__FiPcT1', SN_NOWARN) set_name(2148908960, 'PSX_GM_LoadGame__FUcii', SN_NOWARN) set_name(2148909724, 'PSX_CH_LoadGame__Fii', SN_NOWARN) set_name(2148910020, 'PSX_CH_SaveGame__FiPcT1', SN_NOWARN) set_name(2148910404, 'RestorePads__Fv', SN_NOWARN) set_name(2148910596, 'StorePads__Fv', SN_NOWARN) set_name(2148910784, 'GetIcon__Fv', SN_NOWARN) set_name(2148910844, 'PSX_OPT_LoadGame__Fii', SN_NOWARN) set_name(2148911012, 'PSX_OPT_SaveGame__Fi', SN_NOWARN) set_name(2148770532, 'CreditsTitle', SN_NOWARN) set_name(2148770956, 'CreditsSubTitle', SN_NOWARN) set_name(2148772136, 'CreditsText', SN_NOWARN) set_name(2148772416, 'CreditsTable', SN_NOWARN) set_name(2148777072, 'card_dir', SN_NOWARN) set_name(2148778352, 'card_header', SN_NOWARN) set_name(2148776852, 'sjis_table', SN_NOWARN) set_name(2148798568, 'save_buffer', SN_NOWARN) set_name(2148798436, 'McLoadGameMenu', SN_NOWARN) set_name(2148798404, 'CharFileList', SN_NOWARN) set_name(2148798424, 'Classes', SN_NOWARN) set_name(2148798464, 'McLoadCharMenu', SN_NOWARN) set_name(2148798492, 'McLoadCard1Menu', SN_NOWARN) set_name(2148798520, 'McLoadCard2Menu', SN_NOWARN)
def get_ticket_status(ticket_num, ticket_desc_str, e1): status_ticketnum_count = ticket_desc_str.count(ticket_num) if(status_ticketnum_count == 1): status_startpos = ticket_desc_str.index(ticket_num,0,len(ticket_desc_str)) endpos = status_startpos e = 3 while(e != 0): status_endpos = ticket_desc_str.index('</span>',endpos+3,len(ticket_desc_str)) endpos = status_endpos + 3 e -= 1 # app_logger.info("end position of Status*+ is " , status_startpos) # app_logger.info("end position of Status*+ is " , status_endpos , "\n") status_str = ticket_desc_str[status_startpos:status_endpos] status = status_str.split('">')[-1] else: endpos = 0 e = 2 while(e != 0): status_startpos = ticket_desc_str.index(ticket_num,endpos,len(ticket_desc_str)) endpos = status_startpos + 3 e -= 1 e1 = e1 endpos = status_startpos while(e1 != 0): status_endpos = ticket_desc_str.index('</span>',endpos+3,len(ticket_desc_str)) endpos = status_endpos + 3 e1 -= 1 status_str = ticket_desc_str[status_startpos:status_endpos] status_str = ticket_desc_str[status_startpos:status_endpos] # ticket_desc status = status_str.split('">')[-1] status = status.strip('\n').strip().lower() return status def get_ticket_details(ticket_num, ticket_desc_str, pos): status_ticketnum_count = ticket_desc_str.count(ticket_num) if(status_ticketnum_count == 1): status_startpos = ticket_desc_str.index(ticket_num,0,len(ticket_desc_str)) endpos = status_startpos e = 3 while(e != 0): status_endpos = ticket_desc_str.index('</span>',endpos+3,len(ticket_desc_str)) endpos = status_endpos + 3 e -= 1 # app_logger.info("end position of Status*+ is " , status_startpos) # app_logger.info("end position of Status*+ is " , status_endpos , "\n") status_str = ticket_desc_str[status_startpos:status_endpos] status = status_str.split('">')[-1] else: endpos = 0 e = 2 while(e != 0): status_startpos = ticket_desc_str.index(ticket_num,endpos,len(ticket_desc_str)) endpos = status_startpos + 3 e -= 1 e = pos endpos = status_startpos while(e != 0): status_endpos = ticket_desc_str.index('</span>',endpos+3,len(ticket_desc_str)) endpos = status_endpos + 3 e -= 1 # ticket_elements_str = ticket_desc_str[status_startpos:status_endpos] ticket_elements_str = ticket_desc_str[status_startpos:status_endpos] # ticket_desc ticket_elements = ticket_elements_str.split('">')[-1] ticket_elements = ticket_elements.strip('\n').strip().lower() return ticket_elements f = open('pagesource.txt', 'r') ticket_details = f.read() ticket_details e1 =7 print("Priority") print(get_ticket_details('INCC00008570697', ticket_details, e1), e1) print("assigned group") e1 =8 print(get_ticket_details('INCC00008570697', ticket_details, e1), e1) e1 =9 print("assigned to") print(get_ticket_details('INCC00008570697', ticket_details, e1), e1) e1 = 2 while(True): print(get_ticket_details('INCC00008570697', ticket_details, e1), e1)
def get_ticket_status(ticket_num, ticket_desc_str, e1): status_ticketnum_count = ticket_desc_str.count(ticket_num) if status_ticketnum_count == 1: status_startpos = ticket_desc_str.index(ticket_num, 0, len(ticket_desc_str)) endpos = status_startpos e = 3 while e != 0: status_endpos = ticket_desc_str.index('</span>', endpos + 3, len(ticket_desc_str)) endpos = status_endpos + 3 e -= 1 status_str = ticket_desc_str[status_startpos:status_endpos] status = status_str.split('">')[-1] else: endpos = 0 e = 2 while e != 0: status_startpos = ticket_desc_str.index(ticket_num, endpos, len(ticket_desc_str)) endpos = status_startpos + 3 e -= 1 e1 = e1 endpos = status_startpos while e1 != 0: status_endpos = ticket_desc_str.index('</span>', endpos + 3, len(ticket_desc_str)) endpos = status_endpos + 3 e1 -= 1 status_str = ticket_desc_str[status_startpos:status_endpos] status_str = ticket_desc_str[status_startpos:status_endpos] status = status_str.split('">')[-1] status = status.strip('\n').strip().lower() return status def get_ticket_details(ticket_num, ticket_desc_str, pos): status_ticketnum_count = ticket_desc_str.count(ticket_num) if status_ticketnum_count == 1: status_startpos = ticket_desc_str.index(ticket_num, 0, len(ticket_desc_str)) endpos = status_startpos e = 3 while e != 0: status_endpos = ticket_desc_str.index('</span>', endpos + 3, len(ticket_desc_str)) endpos = status_endpos + 3 e -= 1 status_str = ticket_desc_str[status_startpos:status_endpos] status = status_str.split('">')[-1] else: endpos = 0 e = 2 while e != 0: status_startpos = ticket_desc_str.index(ticket_num, endpos, len(ticket_desc_str)) endpos = status_startpos + 3 e -= 1 e = pos endpos = status_startpos while e != 0: status_endpos = ticket_desc_str.index('</span>', endpos + 3, len(ticket_desc_str)) endpos = status_endpos + 3 e -= 1 ticket_elements_str = ticket_desc_str[status_startpos:status_endpos] ticket_elements = ticket_elements_str.split('">')[-1] ticket_elements = ticket_elements.strip('\n').strip().lower() return ticket_elements f = open('pagesource.txt', 'r') ticket_details = f.read() ticket_details e1 = 7 print('Priority') print(get_ticket_details('INCC00008570697', ticket_details, e1), e1) print('assigned group') e1 = 8 print(get_ticket_details('INCC00008570697', ticket_details, e1), e1) e1 = 9 print('assigned to') print(get_ticket_details('INCC00008570697', ticket_details, e1), e1) e1 = 2 while True: print(get_ticket_details('INCC00008570697', ticket_details, e1), e1)
class BaseVisualizer(object): """Base saliency visualizer""" def visualize(self, *args, **kwargs): """Main visualization routine Each concrete subclass should implement this method """ raise NotImplementedError
class Basevisualizer(object): """Base saliency visualizer""" def visualize(self, *args, **kwargs): """Main visualization routine Each concrete subclass should implement this method """ raise NotImplementedError
''' a = Yellow Crystal b = Blue Crystal P = Yellow Ball Q = Green Ball R = Blue Ball ''' a, b = list(map(int, input().split())) P, Q, R = list(map(int, input().split())) # the problem states that P = 2a | Q = ab | R = 3b print(max(2*P+Q-a,0)+max(3*R+Q-b, 0))
""" a = Yellow Crystal b = Blue Crystal P = Yellow Ball Q = Green Ball R = Blue Ball """ (a, b) = list(map(int, input().split())) (p, q, r) = list(map(int, input().split())) print(max(2 * P + Q - a, 0) + max(3 * R + Q - b, 0))
# START LAB EXERCISE 02 print('Lab Exercise 02 \n') # BACKGROUND # On Wednesday, August 28, 1963, a march to advocate for the civil and economic rights # of African Americans was held in Washington, D.C. It was called # the March on Washington for Jobs and Freedom and was organized by A. Philip Randolph # and Bayard Rustin. Around 250,000 people participated with speakers from civil rights, # labor and religious organizations. The march helped spur passage of the # Civil Rights Act of 1964 which outlawed discrimination based on race, color, religion, # sex or national origin. # PROBLEM 1 (10 points) # BEGIN PROBLEM 1 SOLUTION # Uncomment the variable name and assigned value that adheres to the Python style guide. # class = 'March on Washington' # event name = 'March on Washington' # $event_name = 'March on Washington' event_name = 'March on Washington' # Concatenate the text "for Jobs and Freedom" to the value of the variable selected. # Write code below. event_name += ' for Jobs and Freedom' # print() the variable below. print(event_name) # Determine the number of characters of your new string value. num_chars = len(event_name) # Note the use of the f-string notation to include a variable in a string. print(f'num_chars = {num_chars}\n') # END PROBLEM 1 SOLUTION # PROBLEM 2 (10 points) # SETUP - DO NOT MODIFY # The multi-line string < i_have_a_dream > is an excerpt from the powerful speech given # by Dr. Martin Luther King, Jr., on the steps of the Lincoln Memorial in Washington, D.C., # on August 28, 1963. i_have_a_dream = """ I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all men are created equal." I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood. I have a dream that one day even the state of Mississippi, a state sweltering with the heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice. I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character. I have a dream today! I have a dream that one day, down in Alabama, with its vicious racists, with its governor having his lips dripping with the words of "interposition" and "nullification" -- one day right there in Alabama little black boys and black girls will be able to join hands with little white boys and white girls as sisters and brothers. I have a dream today! I have a dream that one day every valley shall be exalted, and every hill and mountain shall be made low, the rough places will be made plain, and the crooked places will be made straight; "and the glory of the Lord shall be revealed and all flesh shall see it together." """ # END SETUP # BEGIN PROBLEM 2 SOLUTION # Determine the number of words and lines in < i_have_a_dream >. number_words = len(i_have_a_dream.split()) number_lines = len(i_have_a_dream.splitlines()) # Note the use of the built-in str() function to format < num_char_chunks > as a string, # and then the use of ''.join() to join all of the elements of the list with an # empty string. print(''.join(['number_words=', str(number_words), '\n'])) print(''.join(['number_lines=', str(number_lines), '\n'])) # END PROBLEM 2 SOLUTION # END LAB EXERCISE
print('Lab Exercise 02 \n') event_name = 'March on Washington' event_name += ' for Jobs and Freedom' print(event_name) num_chars = len(event_name) print(f'num_chars = {num_chars}\n') i_have_a_dream = '\nI have a dream that one day this nation will rise up\nand live out the true meaning of its creed:\n"We hold these truths to be self-evident, that all men are created equal."\n\nI have a dream that one day on the red hills of Georgia,\nthe sons of former slaves and the sons of former slave owners\nwill be able to sit down together at the table of brotherhood.\n\nI have a dream that one day even the state of Mississippi,\na state sweltering with the heat of injustice,\nsweltering with the heat of oppression,\nwill be transformed into an oasis of freedom and justice.\n\nI have a dream that my four little children will one day live in a nation where they will\nnot be judged by the color of their skin but by the content of their character.\n\nI have a dream today!\n\nI have a dream that one day, down in Alabama, with its vicious racists,\nwith its governor having his lips dripping with the words of "interposition" and "nullification"\n-- one day right there in Alabama little black boys and black girls will be able to join hands\nwith little white boys and white girls as sisters and brothers.\n\nI have a dream today!\n\nI have a dream that one day every valley shall be exalted,\nand every hill and mountain shall be made low,\nthe rough places will be made plain,\nand the crooked places will be made straight;\n"and the glory of the Lord shall be revealed and all flesh shall see it together."\n' number_words = len(i_have_a_dream.split()) number_lines = len(i_have_a_dream.splitlines()) print(''.join(['number_words=', str(number_words), '\n'])) print(''.join(['number_lines=', str(number_lines), '\n']))
class ResourceDirectoryManager: def addResource (self, fileInfo): raise NotImplementedError def getResourceInfo (self, fileUID): raise NotImplementedError def getResourceList (self): raise NotImplementedError def appendFileInfo2CacheControlFile (self, fileInfo = False): raise NotImplementedError def calculateChunksNumber (self, size): raise NotImplementedError def addHostToResource (self, uid, host): raise NotImplementedError
class Resourcedirectorymanager: def add_resource(self, fileInfo): raise NotImplementedError def get_resource_info(self, fileUID): raise NotImplementedError def get_resource_list(self): raise NotImplementedError def append_file_info2_cache_control_file(self, fileInfo=False): raise NotImplementedError def calculate_chunks_number(self, size): raise NotImplementedError def add_host_to_resource(self, uid, host): raise NotImplementedError
class Solution: def maxIncreaseKeepingSkyline(self, grid: List[List[int]]) -> int: row_maxes = [max(row) for row in grid] col_maxes = [max(col) for col in zip(*grid)] return sum(min(row_maxes[r], col_maxes[c]) - val for r, row in enumerate(grid) for c, val in enumerate(row))
class Solution: def max_increase_keeping_skyline(self, grid: List[List[int]]) -> int: row_maxes = [max(row) for row in grid] col_maxes = [max(col) for col in zip(*grid)] return sum((min(row_maxes[r], col_maxes[c]) - val for (r, row) in enumerate(grid) for (c, val) in enumerate(row)))
def foo(num): for i in range(1,num+1): if(i%105==0): print('Fizz Buzz Fun') elif(i%15==0): print('Fizz Buzz') elif(i%21==0): print('Fizz Fun') elif(i%35==0): print('Buzz Fun') elif(i%3==0): print('Fizz') elif(i%5==0): print('Buzz') elif(i%7==0): print('Fun') else: print(i) if __name__=='__main__': num=50 foo(num)
def foo(num): for i in range(1, num + 1): if i % 105 == 0: print('Fizz Buzz Fun') elif i % 15 == 0: print('Fizz Buzz') elif i % 21 == 0: print('Fizz Fun') elif i % 35 == 0: print('Buzz Fun') elif i % 3 == 0: print('Fizz') elif i % 5 == 0: print('Buzz') elif i % 7 == 0: print('Fun') else: print(i) if __name__ == '__main__': num = 50 foo(num)
def selection_sort(input_list): for i in range(len(input_list)): min_idx = i for j in range(i+1, len(input_list)): if input_list[min_idx] > input_list[j]: min_idx = j input_list[i], input_list[min_idx] = input_list[min_idx], input_list[i] return input_list
def selection_sort(input_list): for i in range(len(input_list)): min_idx = i for j in range(i + 1, len(input_list)): if input_list[min_idx] > input_list[j]: min_idx = j (input_list[i], input_list[min_idx]) = (input_list[min_idx], input_list[i]) return input_list
a = 0 a *= 1 + 3 a += 2 a += a + 20 + 2
a = 0 a *= 1 + 3 a += 2 a += a + 20 + 2
# # PySNMP MIB module HPN-ICF-VOICE-DIAL-CONTROL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-VOICE-DIAL-CONTROL-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:41:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint") AbsoluteCounter32, = mibBuilder.importSymbols("DIAL-CONTROL-MIB", "AbsoluteCounter32") hpnicfVoice, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfVoice") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, TimeTicks, Gauge32, ObjectIdentity, IpAddress, Bits, Counter64, Unsigned32, NotificationType, Counter32, Integer32, MibIdentifier, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "TimeTicks", "Gauge32", "ObjectIdentity", "IpAddress", "Bits", "Counter64", "Unsigned32", "NotificationType", "Counter32", "Integer32", "MibIdentifier", "iso") RowStatus, TextualConvention, TruthValue, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TextualConvention", "TruthValue", "DisplayString") hpnicfVoiceEntityControl = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14)) hpnicfVoiceEntityControl.setRevisions(('2009-04-16 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setRevisionsDescriptions(('The initial version of this MIB file.',)) if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setLastUpdated('200904160000Z') if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setOrganization('') if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setContactInfo('') if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setDescription('This MIB file is to provide the definition of voice dial control configuration.') class HpnicfCodecType(TextualConvention, Integer32): description = 'Type of Codec.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) namedValues = NamedValues(("g711a", 1), ("g711u", 2), ("g723r53", 3), ("g723r63", 4), ("g729r8", 5), ("g729a", 6), ("g726r16", 7), ("g726r24", 8), ("g726r32", 9), ("g726r40", 10), ("unknown", 11), ("g729br8", 12)) class HpnicfOutBandMode(TextualConvention, Integer32): description = 'Type of OutBandMode.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("voice", 1), ("h245AlphaNumeric", 2), ("h225", 3), ("sip", 4), ("nte", 5), ("vofr", 6)) class HpnicfFaxProtocolType(TextualConvention, Integer32): description = 'Type of FaxProtocol.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("t38", 1), ("standardt38", 2), ("pcmG711alaw", 3), ("pcmG711ulaw", 4)) class HpnicfFaxBaudrateType(TextualConvention, Integer32): description = 'Type of FaxBaudrate.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("disable", 1), ("voice", 2), ("b2400", 3), ("b4800", 4), ("b9600", 5), ("b14400", 6)) class HpnicfFaxTrainMode(TextualConvention, Integer32): description = 'Type of FaxTrainMode.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("local", 1), ("ppp", 2)) class HpnicfRegisterdStatus(TextualConvention, Integer32): description = 'Type of Registerd Status.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("other", 1), ("offline", 2), ("online", 3), ("login", 4), ("logout", 5)) hpnicfVoEntityObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1)) hpnicfVoEntityCreateTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1), ) if mibBuilder.loadTexts: hpnicfVoEntityCreateTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCreateTable.setDescription('The table contains the voice entity information that is used to create an ifIndexed row.') hpnicfVoEntityCreateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1), ).setIndexNames((0, "HPN-ICF-VOICE-DIAL-CONTROL-MIB", "hpnicfVoEntityIndex")) if mibBuilder.loadTexts: hpnicfVoEntityCreateEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCreateEntry.setDescription('The entry of hpnicfVoEntityCreateTable.') hpnicfVoEntityIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoEntityIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicfVoEntityType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("pots", 1), ("voip", 2), ("vofr", 3)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfVoEntityType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityType.setDescription('Specify the type of voice related encapsulation.') hpnicfVoEntityRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfVoEntityRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityRowStatus.setDescription(' This object is used to create, delete or modify a row in this table. The hpnicfVoEntityType object should not be modified once the new row has been created.') hpnicfVoEntityCommonConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2), ) if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigTable.setDescription('This table contains the general voice entity information.') hpnicfVoEntityCommonConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1), ).setIndexNames((0, "HPN-ICF-VOICE-DIAL-CONTROL-MIB", "hpnicfVoEntityCfgIndex")) if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigEntry.setDescription('The entry of hpnicfVoEntityCommonConfigTable.') hpnicfVoEntityCfgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoEntityCfgIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicfVoEntityCfgCodec1st = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 2), HpnicfCodecType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec1st.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec1st.setDescription('This object indicates the first desirable CODEC of speech of this dial entity.') hpnicfVoEntityCfgCodec2nd = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 3), HpnicfCodecType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec2nd.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec2nd.setDescription('This object indicates the second desirable CODEC of speech of this dial entity.') hpnicfVoEntityCfgCodec3rd = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 4), HpnicfCodecType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec3rd.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec3rd.setDescription('This object indicates the third desirable CODEC of speech of this dial entity.') hpnicfVoEntityCfgCodec4th = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 5), HpnicfCodecType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec4th.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec4th.setDescription('This object indicates the forth desirable CODEC of speech of this dial entity.') hpnicfVoEntityCfgDSCP = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgDSCP.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgDSCP.setDescription('This object indicates the DSCP(Different Service Code Point) value of voice packets.') hpnicfVoEntityCfgVADEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 7), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgVADEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgVADEnable.setDescription('This object indicates whether the VAD(Voice Activity Detection) is enabled.') hpnicfVoEntityCfgOutbandMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 8), HpnicfOutBandMode()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgOutbandMode.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgOutbandMode.setDescription('This object indicates the DTMF(Dual Tone Multi-Frequency) outband type of this dial entity.') hpnicfVoEntityCfgFaxLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-60, -3))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLevel.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLevel.setDescription('This object indicates the fax level of this dial entity.') hpnicfVoEntityCfgFaxBaudrate = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 10), HpnicfFaxBaudrateType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxBaudrate.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxBaudrate.setDescription('This object indicates the fax baudrate of this dial entity.') hpnicfVoEntityCfgFaxLocalTrainPara = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLocalTrainPara.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLocalTrainPara.setDescription('This object indicates the fax local train threshold of this dial entity.') hpnicfVoEntityCfgFaxProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 12), HpnicfFaxProtocolType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxProtocol.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxProtocol.setDescription('This object indicates the fax protocol of this dial entity.') hpnicfVoEntityCfgFaxHRPackNum = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxHRPackNum.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxHRPackNum.setDescription('This object indicates the high speed redundancy packet numbers of t38 and standard-t38.') hpnicfVoEntityCfgFaxLRPackNum = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 5))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLRPackNum.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLRPackNum.setDescription('This object indicates the low speed redundancy packet numbers of t38 and standard-t38.') hpnicfVoEntityCfgFaxSendNSFEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 15), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxSendNSFEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxSendNSFEnable.setDescription('This object indicates whether sends NSF(Non-Standard Faculty) to fax of this dial entity.') hpnicfVoEntityCfgFaxTrainMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 16), HpnicfFaxTrainMode()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxTrainMode.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxTrainMode.setDescription('This object indicates the fax train mode of this dial entity.') hpnicfVoEntityCfgFaxEcm = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 17), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxEcm.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxEcm.setDescription('This object indicates whether the ECM(Error Correct Mode) is enabled.') hpnicfVoEntityCfgPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgPriority.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgPriority.setDescription('This object indicates the priority of this dial entity.') hpnicfVoEntityCfgDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityCfgDescription.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgDescription.setDescription('This object indicates the textual description of this dial entity.') hpnicfVoPOTSEntityConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3), ) if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigTable.setDescription('This table contains the POTS(Public Switched Telephone Network) entity information.') hpnicfVoPOTSEntityConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1), ).setIndexNames((0, "HPN-ICF-VOICE-DIAL-CONTROL-MIB", "hpnicfVoPOTSEntityConfigIndex")) if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigEntry.setDescription('The entry of hpnicfVoPOTSEntityConfigTable.') hpnicfVoPOTSEntityConfigIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicfVoPOTSEntityConfigPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 31))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigPrefix.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigPrefix.setDescription('This object indicates the prefix which is added to the called number.') hpnicfVoPOTSEntityConfigSubLine = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 3), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSubLine.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSubLine.setDescription('This object indicates the voice subscriber line of this dial entity.') hpnicfVoPOTSEntityConfigSendNum = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 31), ValueRangeConstraint(65534, 65534), ValueRangeConstraint(65535, 65535), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSendNum.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSendNum.setDescription('This object indicates the digit of phone number to be sent to the destination. 0..31: Number of digits (that are extracted from the end of a number) to be sent, in the range of 0 to 31. It is not greater than the total number of digits of the called number. 65534: Sends all digits of a called number. 65535: Sends a truncated called number.') hpnicfVoVoIPEntityConfigTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4), ) if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigTable.setDescription('This table contains the VoIP entity information.') hpnicfVoVoIPEntityConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1), ).setIndexNames((0, "HPN-ICF-VOICE-DIAL-CONTROL-MIB", "hpnicfVoVoIPEntityCfgIndex")) if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigEntry.setDescription('The entry of hpnicfVoVoIPEntityConfigTable.') hpnicfVoVoIPEntityCfgIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicfVoVoIPEntityCfgTargetType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("ras", 2), ("h323IpAddress", 3), ("sipIpAddress", 4), ("sipProxy", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetType.setDescription('This object indicates the type of the session target of this entity.') hpnicfVoVoIPEntityCfgTargetAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 3), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddrType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddrType.setDescription('The IP address type of object hpnicfVoVoIPEntityCfgTargetAddr.') hpnicfVoVoIPEntityCfgTargetAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 4), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddr.setDescription('This object indicates the target IP address.') hpnicfVoEntityNumberTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5), ) if mibBuilder.loadTexts: hpnicfVoEntityNumberTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberTable.setDescription('The table contains the number management information.') hpnicfVoEntityNumberEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1), ).setIndexNames((0, "HPN-ICF-VOICE-DIAL-CONTROL-MIB", "hpnicfVoEntityIndex")) if mibBuilder.loadTexts: hpnicfVoEntityNumberEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberEntry.setDescription('The entry of hpnicfVoEntityNumberTable. HpnicfVoEntityIndex is used to uniquely identify these numbers registered on the server. The same value of hpnicfVoEntityIndex used in the corresponding HPN-ICFVoEntityCommonConfigTable is used here.') hpnicfVoEntityNumberAuthUser = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityNumberAuthUser.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberAuthUser.setDescription('This object indicates the username of the entity number to authorize.') hpnicfVoEntityNumberPasswordType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityNumberPasswordType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberPasswordType.setDescription('This object indicates the password type of the entity number to authorize. The encrypting type of password: 0 : password simple, means password is clean text. 1 : password cipher, means password is encrypted text. default is 65535.') hpnicfVoEntityNumberPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 3), OctetString().subtype(subtypeSpec=ConstraintsUnion(ValueSizeConstraint(0, 16), ValueSizeConstraint(24, 24), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfVoEntityNumberPassword.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberPassword.setDescription('This object indicates the password of the entity number to authorize.') hpnicfVoEntityNumberStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 4), HpnicfRegisterdStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfVoEntityNumberStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberStatus.setDescription('This object indicates the current state of the entity number.') hpnicfVoEntityNumberExpires = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 5), Integer32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfVoEntityNumberExpires.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberExpires.setDescription('This is the interval time for entity number updating registered message.') mibBuilder.exportSymbols("HPN-ICF-VOICE-DIAL-CONTROL-MIB", hpnicfVoEntityNumberStatus=hpnicfVoEntityNumberStatus, hpnicfVoEntityCreateTable=hpnicfVoEntityCreateTable, hpnicfVoEntityCfgFaxProtocol=hpnicfVoEntityCfgFaxProtocol, hpnicfVoEntityNumberAuthUser=hpnicfVoEntityNumberAuthUser, hpnicfVoEntityCreateEntry=hpnicfVoEntityCreateEntry, hpnicfVoEntityCfgCodec3rd=hpnicfVoEntityCfgCodec3rd, hpnicfVoVoIPEntityCfgTargetType=hpnicfVoVoIPEntityCfgTargetType, hpnicfVoEntityCfgFaxTrainMode=hpnicfVoEntityCfgFaxTrainMode, hpnicfVoEntityNumberTable=hpnicfVoEntityNumberTable, hpnicfVoEntityNumberExpires=hpnicfVoEntityNumberExpires, hpnicfVoEntityCfgDescription=hpnicfVoEntityCfgDescription, hpnicfVoPOTSEntityConfigIndex=hpnicfVoPOTSEntityConfigIndex, hpnicfVoPOTSEntityConfigSubLine=hpnicfVoPOTSEntityConfigSubLine, HpnicfRegisterdStatus=HpnicfRegisterdStatus, hpnicfVoEntityCfgVADEnable=hpnicfVoEntityCfgVADEnable, hpnicfVoVoIPEntityCfgTargetAddr=hpnicfVoVoIPEntityCfgTargetAddr, hpnicfVoEntityCfgIndex=hpnicfVoEntityCfgIndex, hpnicfVoPOTSEntityConfigPrefix=hpnicfVoPOTSEntityConfigPrefix, hpnicfVoEntityCfgPriority=hpnicfVoEntityCfgPriority, hpnicfVoVoIPEntityConfigEntry=hpnicfVoVoIPEntityConfigEntry, hpnicfVoVoIPEntityCfgIndex=hpnicfVoVoIPEntityCfgIndex, hpnicfVoVoIPEntityConfigTable=hpnicfVoVoIPEntityConfigTable, hpnicfVoEntityCfgFaxEcm=hpnicfVoEntityCfgFaxEcm, hpnicfVoEntityCfgFaxHRPackNum=hpnicfVoEntityCfgFaxHRPackNum, PYSNMP_MODULE_ID=hpnicfVoiceEntityControl, hpnicfVoPOTSEntityConfigSendNum=hpnicfVoPOTSEntityConfigSendNum, HpnicfFaxBaudrateType=HpnicfFaxBaudrateType, HpnicfFaxTrainMode=HpnicfFaxTrainMode, hpnicfVoEntityRowStatus=hpnicfVoEntityRowStatus, hpnicfVoVoIPEntityCfgTargetAddrType=hpnicfVoVoIPEntityCfgTargetAddrType, hpnicfVoEntityCfgFaxSendNSFEnable=hpnicfVoEntityCfgFaxSendNSFEnable, HpnicfOutBandMode=HpnicfOutBandMode, hpnicfVoEntityCfgCodec1st=hpnicfVoEntityCfgCodec1st, hpnicfVoEntityCfgFaxLRPackNum=hpnicfVoEntityCfgFaxLRPackNum, hpnicfVoPOTSEntityConfigEntry=hpnicfVoPOTSEntityConfigEntry, hpnicfVoiceEntityControl=hpnicfVoiceEntityControl, hpnicfVoEntityIndex=hpnicfVoEntityIndex, hpnicfVoEntityCfgCodec4th=hpnicfVoEntityCfgCodec4th, hpnicfVoEntityCfgDSCP=hpnicfVoEntityCfgDSCP, hpnicfVoEntityCfgOutbandMode=hpnicfVoEntityCfgOutbandMode, hpnicfVoEntityCfgFaxLocalTrainPara=hpnicfVoEntityCfgFaxLocalTrainPara, hpnicfVoEntityNumberPassword=hpnicfVoEntityNumberPassword, hpnicfVoEntityNumberPasswordType=hpnicfVoEntityNumberPasswordType, hpnicfVoEntityCommonConfigEntry=hpnicfVoEntityCommonConfigEntry, HpnicfFaxProtocolType=HpnicfFaxProtocolType, hpnicfVoEntityNumberEntry=hpnicfVoEntityNumberEntry, hpnicfVoEntityCfgFaxLevel=hpnicfVoEntityCfgFaxLevel, hpnicfVoEntityCfgFaxBaudrate=hpnicfVoEntityCfgFaxBaudrate, hpnicfVoPOTSEntityConfigTable=hpnicfVoPOTSEntityConfigTable, hpnicfVoEntityCfgCodec2nd=hpnicfVoEntityCfgCodec2nd, hpnicfVoEntityObjects=hpnicfVoEntityObjects, hpnicfVoEntityType=hpnicfVoEntityType, hpnicfVoEntityCommonConfigTable=hpnicfVoEntityCommonConfigTable, HpnicfCodecType=HpnicfCodecType)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_union, constraints_intersection, single_value_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint') (absolute_counter32,) = mibBuilder.importSymbols('DIAL-CONTROL-MIB', 'AbsoluteCounter32') (hpnicf_voice,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicfVoice') (inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (mib_scalar, mib_table, mib_table_row, mib_table_column, module_identity, time_ticks, gauge32, object_identity, ip_address, bits, counter64, unsigned32, notification_type, counter32, integer32, mib_identifier, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ModuleIdentity', 'TimeTicks', 'Gauge32', 'ObjectIdentity', 'IpAddress', 'Bits', 'Counter64', 'Unsigned32', 'NotificationType', 'Counter32', 'Integer32', 'MibIdentifier', 'iso') (row_status, textual_convention, truth_value, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'TextualConvention', 'TruthValue', 'DisplayString') hpnicf_voice_entity_control = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14)) hpnicfVoiceEntityControl.setRevisions(('2009-04-16 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setRevisionsDescriptions(('The initial version of this MIB file.',)) if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setLastUpdated('200904160000Z') if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setOrganization('') if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setContactInfo('') if mibBuilder.loadTexts: hpnicfVoiceEntityControl.setDescription('This MIB file is to provide the definition of voice dial control configuration.') class Hpnicfcodectype(TextualConvention, Integer32): description = 'Type of Codec.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)) named_values = named_values(('g711a', 1), ('g711u', 2), ('g723r53', 3), ('g723r63', 4), ('g729r8', 5), ('g729a', 6), ('g726r16', 7), ('g726r24', 8), ('g726r32', 9), ('g726r40', 10), ('unknown', 11), ('g729br8', 12)) class Hpnicfoutbandmode(TextualConvention, Integer32): description = 'Type of OutBandMode.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('voice', 1), ('h245AlphaNumeric', 2), ('h225', 3), ('sip', 4), ('nte', 5), ('vofr', 6)) class Hpnicffaxprotocoltype(TextualConvention, Integer32): description = 'Type of FaxProtocol.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4)) named_values = named_values(('t38', 1), ('standardt38', 2), ('pcmG711alaw', 3), ('pcmG711ulaw', 4)) class Hpnicffaxbaudratetype(TextualConvention, Integer32): description = 'Type of FaxBaudrate.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('disable', 1), ('voice', 2), ('b2400', 3), ('b4800', 4), ('b9600', 5), ('b14400', 6)) class Hpnicffaxtrainmode(TextualConvention, Integer32): description = 'Type of FaxTrainMode.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('local', 1), ('ppp', 2)) class Hpnicfregisterdstatus(TextualConvention, Integer32): description = 'Type of Registerd Status.' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5)) named_values = named_values(('other', 1), ('offline', 2), ('online', 3), ('login', 4), ('logout', 5)) hpnicf_vo_entity_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1)) hpnicf_vo_entity_create_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1)) if mibBuilder.loadTexts: hpnicfVoEntityCreateTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCreateTable.setDescription('The table contains the voice entity information that is used to create an ifIndexed row.') hpnicf_vo_entity_create_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1)).setIndexNames((0, 'HPN-ICF-VOICE-DIAL-CONTROL-MIB', 'hpnicfVoEntityIndex')) if mibBuilder.loadTexts: hpnicfVoEntityCreateEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCreateEntry.setDescription('The entry of hpnicfVoEntityCreateTable.') hpnicf_vo_entity_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoEntityIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicf_vo_entity_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('pots', 1), ('voip', 2), ('vofr', 3)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfVoEntityType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityType.setDescription('Specify the type of voice related encapsulation.') hpnicf_vo_entity_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 1, 1, 3), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfVoEntityRowStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityRowStatus.setDescription(' This object is used to create, delete or modify a row in this table. The hpnicfVoEntityType object should not be modified once the new row has been created.') hpnicf_vo_entity_common_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2)) if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigTable.setDescription('This table contains the general voice entity information.') hpnicf_vo_entity_common_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1)).setIndexNames((0, 'HPN-ICF-VOICE-DIAL-CONTROL-MIB', 'hpnicfVoEntityCfgIndex')) if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCommonConfigEntry.setDescription('The entry of hpnicfVoEntityCommonConfigTable.') hpnicf_vo_entity_cfg_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoEntityCfgIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicf_vo_entity_cfg_codec1st = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 2), hpnicf_codec_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec1st.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec1st.setDescription('This object indicates the first desirable CODEC of speech of this dial entity.') hpnicf_vo_entity_cfg_codec2nd = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 3), hpnicf_codec_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec2nd.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec2nd.setDescription('This object indicates the second desirable CODEC of speech of this dial entity.') hpnicf_vo_entity_cfg_codec3rd = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 4), hpnicf_codec_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec3rd.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec3rd.setDescription('This object indicates the third desirable CODEC of speech of this dial entity.') hpnicf_vo_entity_cfg_codec4th = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 5), hpnicf_codec_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec4th.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgCodec4th.setDescription('This object indicates the forth desirable CODEC of speech of this dial entity.') hpnicf_vo_entity_cfg_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgDSCP.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgDSCP.setDescription('This object indicates the DSCP(Different Service Code Point) value of voice packets.') hpnicf_vo_entity_cfg_vad_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 7), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgVADEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgVADEnable.setDescription('This object indicates whether the VAD(Voice Activity Detection) is enabled.') hpnicf_vo_entity_cfg_outband_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 8), hpnicf_out_band_mode()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgOutbandMode.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgOutbandMode.setDescription('This object indicates the DTMF(Dual Tone Multi-Frequency) outband type of this dial entity.') hpnicf_vo_entity_cfg_fax_level = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(-60, -3))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLevel.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLevel.setDescription('This object indicates the fax level of this dial entity.') hpnicf_vo_entity_cfg_fax_baudrate = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 10), hpnicf_fax_baudrate_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxBaudrate.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxBaudrate.setDescription('This object indicates the fax baudrate of this dial entity.') hpnicf_vo_entity_cfg_fax_local_train_para = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 100))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLocalTrainPara.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLocalTrainPara.setDescription('This object indicates the fax local train threshold of this dial entity.') hpnicf_vo_entity_cfg_fax_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 12), hpnicf_fax_protocol_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxProtocol.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxProtocol.setDescription('This object indicates the fax protocol of this dial entity.') hpnicf_vo_entity_cfg_fax_hr_pack_num = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 2))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxHRPackNum.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxHRPackNum.setDescription('This object indicates the high speed redundancy packet numbers of t38 and standard-t38.') hpnicf_vo_entity_cfg_fax_lr_pack_num = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 5))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLRPackNum.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxLRPackNum.setDescription('This object indicates the low speed redundancy packet numbers of t38 and standard-t38.') hpnicf_vo_entity_cfg_fax_send_nsf_enable = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 15), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxSendNSFEnable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxSendNSFEnable.setDescription('This object indicates whether sends NSF(Non-Standard Faculty) to fax of this dial entity.') hpnicf_vo_entity_cfg_fax_train_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 16), hpnicf_fax_train_mode()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxTrainMode.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxTrainMode.setDescription('This object indicates the fax train mode of this dial entity.') hpnicf_vo_entity_cfg_fax_ecm = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 17), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxEcm.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgFaxEcm.setDescription('This object indicates whether the ECM(Error Correct Mode) is enabled.') hpnicf_vo_entity_cfg_priority = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 10))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgPriority.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgPriority.setDescription('This object indicates the priority of this dial entity.') hpnicf_vo_entity_cfg_description = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 2, 1, 19), octet_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityCfgDescription.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityCfgDescription.setDescription('This object indicates the textual description of this dial entity.') hpnicf_vo_pots_entity_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3)) if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigTable.setDescription('This table contains the POTS(Public Switched Telephone Network) entity information.') hpnicf_vo_pots_entity_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1)).setIndexNames((0, 'HPN-ICF-VOICE-DIAL-CONTROL-MIB', 'hpnicfVoPOTSEntityConfigIndex')) if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigEntry.setDescription('The entry of hpnicfVoPOTSEntityConfigTable.') hpnicf_vo_pots_entity_config_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicf_vo_pots_entity_config_prefix = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 31))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigPrefix.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigPrefix.setDescription('This object indicates the prefix which is added to the called number.') hpnicf_vo_pots_entity_config_sub_line = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 3), octet_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSubLine.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSubLine.setDescription('This object indicates the voice subscriber line of this dial entity.') hpnicf_vo_pots_entity_config_send_num = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 31), value_range_constraint(65534, 65534), value_range_constraint(65535, 65535)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSendNum.setStatus('current') if mibBuilder.loadTexts: hpnicfVoPOTSEntityConfigSendNum.setDescription('This object indicates the digit of phone number to be sent to the destination. 0..31: Number of digits (that are extracted from the end of a number) to be sent, in the range of 0 to 31. It is not greater than the total number of digits of the called number. 65534: Sends all digits of a called number. 65535: Sends a truncated called number.') hpnicf_vo_vo_ip_entity_config_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4)) if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigTable.setDescription('This table contains the VoIP entity information.') hpnicf_vo_vo_ip_entity_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1)).setIndexNames((0, 'HPN-ICF-VOICE-DIAL-CONTROL-MIB', 'hpnicfVoVoIPEntityCfgIndex')) if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityConfigEntry.setDescription('The entry of hpnicfVoVoIPEntityConfigTable.') hpnicf_vo_vo_ip_entity_cfg_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgIndex.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgIndex.setDescription('An arbitrary index that uniquely identifies a voice entity.') hpnicf_vo_vo_ip_entity_cfg_target_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('ras', 2), ('h323IpAddress', 3), ('sipIpAddress', 4), ('sipProxy', 5)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetType.setDescription('This object indicates the type of the session target of this entity.') hpnicf_vo_vo_ip_entity_cfg_target_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 3), inet_address_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddrType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddrType.setDescription('The IP address type of object hpnicfVoVoIPEntityCfgTargetAddr.') hpnicf_vo_vo_ip_entity_cfg_target_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 4, 1, 4), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfVoVoIPEntityCfgTargetAddr.setDescription('This object indicates the target IP address.') hpnicf_vo_entity_number_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5)) if mibBuilder.loadTexts: hpnicfVoEntityNumberTable.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberTable.setDescription('The table contains the number management information.') hpnicf_vo_entity_number_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1)).setIndexNames((0, 'HPN-ICF-VOICE-DIAL-CONTROL-MIB', 'hpnicfVoEntityIndex')) if mibBuilder.loadTexts: hpnicfVoEntityNumberEntry.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberEntry.setDescription('The entry of hpnicfVoEntityNumberTable. HpnicfVoEntityIndex is used to uniquely identify these numbers registered on the server. The same value of hpnicfVoEntityIndex used in the corresponding HPN-ICFVoEntityCommonConfigTable is used here.') hpnicf_vo_entity_number_auth_user = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityNumberAuthUser.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberAuthUser.setDescription('This object indicates the username of the entity number to authorize.') hpnicf_vo_entity_number_password_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 2), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityNumberPasswordType.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberPasswordType.setDescription('This object indicates the password type of the entity number to authorize. The encrypting type of password: 0 : password simple, means password is clean text. 1 : password cipher, means password is encrypted text. default is 65535.') hpnicf_vo_entity_number_password = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 3), octet_string().subtype(subtypeSpec=constraints_union(value_size_constraint(0, 16), value_size_constraint(24, 24)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfVoEntityNumberPassword.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberPassword.setDescription('This object indicates the password of the entity number to authorize.') hpnicf_vo_entity_number_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 4), hpnicf_registerd_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfVoEntityNumberStatus.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberStatus.setDescription('This object indicates the current state of the entity number.') hpnicf_vo_entity_number_expires = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 39, 14, 1, 5, 1, 5), integer32()).setUnits('seconds').setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfVoEntityNumberExpires.setStatus('current') if mibBuilder.loadTexts: hpnicfVoEntityNumberExpires.setDescription('This is the interval time for entity number updating registered message.') mibBuilder.exportSymbols('HPN-ICF-VOICE-DIAL-CONTROL-MIB', hpnicfVoEntityNumberStatus=hpnicfVoEntityNumberStatus, hpnicfVoEntityCreateTable=hpnicfVoEntityCreateTable, hpnicfVoEntityCfgFaxProtocol=hpnicfVoEntityCfgFaxProtocol, hpnicfVoEntityNumberAuthUser=hpnicfVoEntityNumberAuthUser, hpnicfVoEntityCreateEntry=hpnicfVoEntityCreateEntry, hpnicfVoEntityCfgCodec3rd=hpnicfVoEntityCfgCodec3rd, hpnicfVoVoIPEntityCfgTargetType=hpnicfVoVoIPEntityCfgTargetType, hpnicfVoEntityCfgFaxTrainMode=hpnicfVoEntityCfgFaxTrainMode, hpnicfVoEntityNumberTable=hpnicfVoEntityNumberTable, hpnicfVoEntityNumberExpires=hpnicfVoEntityNumberExpires, hpnicfVoEntityCfgDescription=hpnicfVoEntityCfgDescription, hpnicfVoPOTSEntityConfigIndex=hpnicfVoPOTSEntityConfigIndex, hpnicfVoPOTSEntityConfigSubLine=hpnicfVoPOTSEntityConfigSubLine, HpnicfRegisterdStatus=HpnicfRegisterdStatus, hpnicfVoEntityCfgVADEnable=hpnicfVoEntityCfgVADEnable, hpnicfVoVoIPEntityCfgTargetAddr=hpnicfVoVoIPEntityCfgTargetAddr, hpnicfVoEntityCfgIndex=hpnicfVoEntityCfgIndex, hpnicfVoPOTSEntityConfigPrefix=hpnicfVoPOTSEntityConfigPrefix, hpnicfVoEntityCfgPriority=hpnicfVoEntityCfgPriority, hpnicfVoVoIPEntityConfigEntry=hpnicfVoVoIPEntityConfigEntry, hpnicfVoVoIPEntityCfgIndex=hpnicfVoVoIPEntityCfgIndex, hpnicfVoVoIPEntityConfigTable=hpnicfVoVoIPEntityConfigTable, hpnicfVoEntityCfgFaxEcm=hpnicfVoEntityCfgFaxEcm, hpnicfVoEntityCfgFaxHRPackNum=hpnicfVoEntityCfgFaxHRPackNum, PYSNMP_MODULE_ID=hpnicfVoiceEntityControl, hpnicfVoPOTSEntityConfigSendNum=hpnicfVoPOTSEntityConfigSendNum, HpnicfFaxBaudrateType=HpnicfFaxBaudrateType, HpnicfFaxTrainMode=HpnicfFaxTrainMode, hpnicfVoEntityRowStatus=hpnicfVoEntityRowStatus, hpnicfVoVoIPEntityCfgTargetAddrType=hpnicfVoVoIPEntityCfgTargetAddrType, hpnicfVoEntityCfgFaxSendNSFEnable=hpnicfVoEntityCfgFaxSendNSFEnable, HpnicfOutBandMode=HpnicfOutBandMode, hpnicfVoEntityCfgCodec1st=hpnicfVoEntityCfgCodec1st, hpnicfVoEntityCfgFaxLRPackNum=hpnicfVoEntityCfgFaxLRPackNum, hpnicfVoPOTSEntityConfigEntry=hpnicfVoPOTSEntityConfigEntry, hpnicfVoiceEntityControl=hpnicfVoiceEntityControl, hpnicfVoEntityIndex=hpnicfVoEntityIndex, hpnicfVoEntityCfgCodec4th=hpnicfVoEntityCfgCodec4th, hpnicfVoEntityCfgDSCP=hpnicfVoEntityCfgDSCP, hpnicfVoEntityCfgOutbandMode=hpnicfVoEntityCfgOutbandMode, hpnicfVoEntityCfgFaxLocalTrainPara=hpnicfVoEntityCfgFaxLocalTrainPara, hpnicfVoEntityNumberPassword=hpnicfVoEntityNumberPassword, hpnicfVoEntityNumberPasswordType=hpnicfVoEntityNumberPasswordType, hpnicfVoEntityCommonConfigEntry=hpnicfVoEntityCommonConfigEntry, HpnicfFaxProtocolType=HpnicfFaxProtocolType, hpnicfVoEntityNumberEntry=hpnicfVoEntityNumberEntry, hpnicfVoEntityCfgFaxLevel=hpnicfVoEntityCfgFaxLevel, hpnicfVoEntityCfgFaxBaudrate=hpnicfVoEntityCfgFaxBaudrate, hpnicfVoPOTSEntityConfigTable=hpnicfVoPOTSEntityConfigTable, hpnicfVoEntityCfgCodec2nd=hpnicfVoEntityCfgCodec2nd, hpnicfVoEntityObjects=hpnicfVoEntityObjects, hpnicfVoEntityType=hpnicfVoEntityType, hpnicfVoEntityCommonConfigTable=hpnicfVoEntityCommonConfigTable, HpnicfCodecType=HpnicfCodecType)
{ "includes": [ "../common.gypi" ], "targets": [ { "target_name": "libgdal_ogr_gtm_frmt", "type": "static_library", "sources": [ "../gdal/ogr/ogrsf_frmts/gtm/gtm.cpp", "../gdal/ogr/ogrsf_frmts/gtm/gtmtracklayer.cpp", "../gdal/ogr/ogrsf_frmts/gtm/gtmwaypointlayer.cpp", "../gdal/ogr/ogrsf_frmts/gtm/ogrgtmdatasource.cpp", "../gdal/ogr/ogrsf_frmts/gtm/ogrgtmdriver.cpp", "../gdal/ogr/ogrsf_frmts/gtm/ogrgtmlayer.cpp" ], "include_dirs": [ "../gdal/ogr/ogrsf_frmts/gtm" ] } ] }
{'includes': ['../common.gypi'], 'targets': [{'target_name': 'libgdal_ogr_gtm_frmt', 'type': 'static_library', 'sources': ['../gdal/ogr/ogrsf_frmts/gtm/gtm.cpp', '../gdal/ogr/ogrsf_frmts/gtm/gtmtracklayer.cpp', '../gdal/ogr/ogrsf_frmts/gtm/gtmwaypointlayer.cpp', '../gdal/ogr/ogrsf_frmts/gtm/ogrgtmdatasource.cpp', '../gdal/ogr/ogrsf_frmts/gtm/ogrgtmdriver.cpp', '../gdal/ogr/ogrsf_frmts/gtm/ogrgtmlayer.cpp'], 'include_dirs': ['../gdal/ogr/ogrsf_frmts/gtm']}]}
def errorbar(ax, y, yerr, barlabels, convertlabels=True, **kwargs): sizedata = len(barlabels) mykwargs = {"alpha":1., "lw":1.5, "color":'goldenrod', "ecolor":'k', 'error_kw':{'lw':1.5}, "align":"center"} # We overwrite these mykwargs with any user-specified kwargs: mykwargs.update(kwargs) ax.yaxis.grid(True) ax.bar(range(sizedata), y, yerr=yerr, **mykwargs) ax.set_xticks(range(sizedata)) if convertlabels: barlabels = [r"${:d}$".format(l) for l in barlabels] ax.set_xticklabels(barlabels) ax.set_xlim([-1, sizedata]) ax.set_ylabel(r"$\mathrm{Feature\ importance}$")
def errorbar(ax, y, yerr, barlabels, convertlabels=True, **kwargs): sizedata = len(barlabels) mykwargs = {'alpha': 1.0, 'lw': 1.5, 'color': 'goldenrod', 'ecolor': 'k', 'error_kw': {'lw': 1.5}, 'align': 'center'} mykwargs.update(kwargs) ax.yaxis.grid(True) ax.bar(range(sizedata), y, yerr=yerr, **mykwargs) ax.set_xticks(range(sizedata)) if convertlabels: barlabels = ['${:d}$'.format(l) for l in barlabels] ax.set_xticklabels(barlabels) ax.set_xlim([-1, sizedata]) ax.set_ylabel('$\\mathrm{Feature\\ importance}$')
def add_argument(group): group.add_argument('--input_dim_a', type=int, default=3, help='# of input channels for domain A') group.add_argument('--input_dim_b', type=int, default=3, help='# of input channels for domain B') group.add_argument('--gen_norm', type=str, default='Instance', help='normalization layer in generator [None, Batch, Instance, Layer]') group.add_argument('--dis_scale', type=int, default=1, help='scale of discriminator') group.add_argument('--dis_norm', type=str, default='Instance', help='normalization layer in discriminator [None, Batch, Instance, Layer]') group.add_argument('--dis_spectral_norm', action='store_true', help='use spectral normalization in discriminator') group.add_argument('--adl', type=bool, default=False, help='use Adaptive Data Loss') group.add_argument('--adl_interval', type=int, default=10, help='update interval of data loss')
def add_argument(group): group.add_argument('--input_dim_a', type=int, default=3, help='# of input channels for domain A') group.add_argument('--input_dim_b', type=int, default=3, help='# of input channels for domain B') group.add_argument('--gen_norm', type=str, default='Instance', help='normalization layer in generator [None, Batch, Instance, Layer]') group.add_argument('--dis_scale', type=int, default=1, help='scale of discriminator') group.add_argument('--dis_norm', type=str, default='Instance', help='normalization layer in discriminator [None, Batch, Instance, Layer]') group.add_argument('--dis_spectral_norm', action='store_true', help='use spectral normalization in discriminator') group.add_argument('--adl', type=bool, default=False, help='use Adaptive Data Loss') group.add_argument('--adl_interval', type=int, default=10, help='update interval of data loss')
people = [] # people.append("Joe") # people.append("Max") # people.append("Martha") # people.insert(2, "Gloria") # people.pop(1) # # print(people) counter = 0 while counter < 4: counter += 1 print("Give me a name:") name = input("> ") people.append(name) print(people)
people = [] counter = 0 while counter < 4: counter += 1 print('Give me a name:') name = input('> ') people.append(name) print(people)
a=int(input()) b=int(input()) # The first line should contain the result of integer division, a//b . The second line should contain the result of float division, a/b . print(a//b) print(a/b)
a = int(input()) b = int(input()) print(a // b) print(a / b)
class Dyn(object): def __repr__(self): return str(self) def __eq__(self, other): if not isinstance(other, Dyn): return False if (self.A() != other.A()).any() or (self.b() != other.b()).any(): return False return True
class Dyn(object): def __repr__(self): return str(self) def __eq__(self, other): if not isinstance(other, Dyn): return False if (self.A() != other.A()).any() or (self.b() != other.b()).any(): return False return True
_params = { "unicode": True, } def rtb_set_param(param, value): _params[param] = value def rtb_get_param(param): return _params[param]
_params = {'unicode': True} def rtb_set_param(param, value): _params[param] = value def rtb_get_param(param): return _params[param]
""" Given an integer, , print the following values for each integer from to : Decimal Octal Hexadecimal (capitalized) Binary The four values must be printed on a single line in the order specified above for each from to . Each value should be space-padded to match the width of the binary value of . Input Format A single integer denoting . Constraints Output Format Print lines where each line (in the range ) contains the respective decimal, octal, capitalized hexadecimal, and binary values of . Each printed value must be formatted to the width of the binary value of . Sample Input 17 Sample Output 1 1 1 1 2 2 2 10 3 3 3 11 4 4 4 100 5 5 5 101 6 6 6 110 7 7 7 111 8 10 8 1000 9 11 9 1001 10 12 A 1010 11 13 B 1011 12 14 C 1100 13 15 D 1101 14 16 E 1110 15 17 F 1111 16 20 10 10000 17 21 11 10001 """ def print_formatted(number): assert 1 <= number <= 99 w = len(str(bin(number)).replace("0b", "")) for n in range(1, number + 1): num = str(int(n)).rjust(w, " ") o = oct(int(n)).replace("0o", "").rjust(w, " ") h = hex(int(n)).replace("0x", "").upper().rjust(w, " ") b = bin(int(n)).replace("0b", "").rjust(w, " ") print(num, o, h, b) if __name__ == '__main__': n = int(17) print_formatted(n)
""" Given an integer, , print the following values for each integer from to : Decimal Octal Hexadecimal (capitalized) Binary The four values must be printed on a single line in the order specified above for each from to . Each value should be space-padded to match the width of the binary value of . Input Format A single integer denoting . Constraints Output Format Print lines where each line (in the range ) contains the respective decimal, octal, capitalized hexadecimal, and binary values of . Each printed value must be formatted to the width of the binary value of . Sample Input 17 Sample Output 1 1 1 1 2 2 2 10 3 3 3 11 4 4 4 100 5 5 5 101 6 6 6 110 7 7 7 111 8 10 8 1000 9 11 9 1001 10 12 A 1010 11 13 B 1011 12 14 C 1100 13 15 D 1101 14 16 E 1110 15 17 F 1111 16 20 10 10000 17 21 11 10001 """ def print_formatted(number): assert 1 <= number <= 99 w = len(str(bin(number)).replace('0b', '')) for n in range(1, number + 1): num = str(int(n)).rjust(w, ' ') o = oct(int(n)).replace('0o', '').rjust(w, ' ') h = hex(int(n)).replace('0x', '').upper().rjust(w, ' ') b = bin(int(n)).replace('0b', '').rjust(w, ' ') print(num, o, h, b) if __name__ == '__main__': n = int(17) print_formatted(n)
class DeviceType: HUB = "Hub" HUB_PLUS = "Hub Plus" HUB_MINI = "Hub Mini" BOT = "Bot" CURTAIN = "Curtain" PLUG = "Plug" PLUG_MINI_US = "Plug Mini (US)" PLUG_MINI_JP = "Plug Mini (JP)" METER = "Meter" MOTION_SENSOR = "Motion Sensor" CONTACT_SENSOR = "Contact Sensor" COLOR_BULB = "Color Bulb" HUMIDIFIER = "Humidifier" SMART_FAN = "Smart Fan" STRIP_LIGHT = "Strip Light" INDOOR_CAM = "Indoor Cam" REMOTE = "Remote" # undocumented in official api reference? class RemoteType: AIR_CONDITIONER = "Air Conditioner" TV = "TV" LIGHT = "Light" IPTV_STREAMER = "IPTV/Streamer" SET_TOP_BOX = "Set Top Box" DVD = "DVD" FAN = "Fan" PROJECTOR = "Projector" CAMERA = "Camera" AIR_PURIFIER = "Air Purifier" SPEAKER = "Speaker" WATER_HEATER = "Water Heater" VACUUM_CLEANER = "Vacuum Cleaner" OTHERS = "Others" class ControlCommand: class Bot: TURN_ON = "turnOn" TURN_OFF = "turnOff" PRESS = "press" class Plug: TURN_ON = "turnOn" TURN_OFF = "turnOff" class PlugMiniUs: TURN_ON = "turnOn" TURN_OFF = "turnOff" TOGGLE = "toggle" class PlugMiniJp: TURN_ON = "turnOn" TURN_OFF = "turnOff" TOGGLE = "toggle" class Curtain: TURN_ON = "turnOn" TURN_OFF = "turnOff" SET_POSITION = "setPosition" class Humidifier: TURN_ON = "turnOn" TURN_OFF = "turnOff" SET_MODE = "setMode" class ColorBulb: TURN_ON = "turnOn" TURN_OFF = "turnOff" TOGGLE = "toggle" SET_BRIGHTNESS = "setBrightness" SET_COLOR = "setColor" SET_COLOR_TEMPERATURE = "setColorTemperature" class SmartFan: TURN_ON = "turnOn" TURN_OFF = "turnOff" SET_ALL_STATUS = "setAllStatus" class StripLight: TURN_ON = "turnOn" TURN_OFF = "turnOff" TOGGLE = "toggle" SET_BRIGHTNESS = "setBrightness" SET_COLOR = "setColor" class VirtualInfrared: TURN_ON = "turnOn" TURN_OFF = "turnOff" SET_ALL = "setAll" SET_CHANNEL = "SetChannel" VOLUME_ADD = "volumeAdd" VOLUME_SUB = "volumeSub" CHANNEL_ADD = "channelAdd" CHANNEL_SUB = "channelSub" SET_MUTE = "setMute" FAST_FORWARD = "FastForward" REWIND = "Rewind" NEXT = "Next" PREVIOUS = "Previous" PAUSE = "Pause" PLAY = "Play" STOP = "Stop" SWING = "swing" TIMER = "timer" LOW_SPEED = "lowSpeed" MIDDLE_SPEED = "middleSpeed" HIGH_SPEED = "highSpeed" BRIGHTNESS_UP = "brightnessUp" BRIGHTNESS_DOWN = "brightnessDown"
class Devicetype: hub = 'Hub' hub_plus = 'Hub Plus' hub_mini = 'Hub Mini' bot = 'Bot' curtain = 'Curtain' plug = 'Plug' plug_mini_us = 'Plug Mini (US)' plug_mini_jp = 'Plug Mini (JP)' meter = 'Meter' motion_sensor = 'Motion Sensor' contact_sensor = 'Contact Sensor' color_bulb = 'Color Bulb' humidifier = 'Humidifier' smart_fan = 'Smart Fan' strip_light = 'Strip Light' indoor_cam = 'Indoor Cam' remote = 'Remote' class Remotetype: air_conditioner = 'Air Conditioner' tv = 'TV' light = 'Light' iptv_streamer = 'IPTV/Streamer' set_top_box = 'Set Top Box' dvd = 'DVD' fan = 'Fan' projector = 'Projector' camera = 'Camera' air_purifier = 'Air Purifier' speaker = 'Speaker' water_heater = 'Water Heater' vacuum_cleaner = 'Vacuum Cleaner' others = 'Others' class Controlcommand: class Bot: turn_on = 'turnOn' turn_off = 'turnOff' press = 'press' class Plug: turn_on = 'turnOn' turn_off = 'turnOff' class Plugminius: turn_on = 'turnOn' turn_off = 'turnOff' toggle = 'toggle' class Plugminijp: turn_on = 'turnOn' turn_off = 'turnOff' toggle = 'toggle' class Curtain: turn_on = 'turnOn' turn_off = 'turnOff' set_position = 'setPosition' class Humidifier: turn_on = 'turnOn' turn_off = 'turnOff' set_mode = 'setMode' class Colorbulb: turn_on = 'turnOn' turn_off = 'turnOff' toggle = 'toggle' set_brightness = 'setBrightness' set_color = 'setColor' set_color_temperature = 'setColorTemperature' class Smartfan: turn_on = 'turnOn' turn_off = 'turnOff' set_all_status = 'setAllStatus' class Striplight: turn_on = 'turnOn' turn_off = 'turnOff' toggle = 'toggle' set_brightness = 'setBrightness' set_color = 'setColor' class Virtualinfrared: turn_on = 'turnOn' turn_off = 'turnOff' set_all = 'setAll' set_channel = 'SetChannel' volume_add = 'volumeAdd' volume_sub = 'volumeSub' channel_add = 'channelAdd' channel_sub = 'channelSub' set_mute = 'setMute' fast_forward = 'FastForward' rewind = 'Rewind' next = 'Next' previous = 'Previous' pause = 'Pause' play = 'Play' stop = 'Stop' swing = 'swing' timer = 'timer' low_speed = 'lowSpeed' middle_speed = 'middleSpeed' high_speed = 'highSpeed' brightness_up = 'brightnessUp' brightness_down = 'brightnessDown'
class ScheduleType: # Remind the next time the parametric transformer is ready PARAMETRIC_TRANSFORMER = "parametric" # Remind to do a task at a specific time ONCE = "simple" # Remind to do a task every so often REPEAT = "recurrent"
class Scheduletype: parametric_transformer = 'parametric' once = 'simple' repeat = 'recurrent'
class StatsEvents: # common ERROR = 'error' # voteban SELF_BAN = 'self-ban' VOTEBAN_CALL = 'voteban-call' VOTEBAN_CONFIRM = 'voteban-confirm' VOTEBAN_VOTE = 'voteban-vote' VOTEBAN_UNVOTE = 'voteban-unvote' ADMIN_BAN = 'admin-ban' ADMIN_KICK = 'admin-kick' # nsfw NSFW = 'nsfw' # captcha_button JOIN_CHAT = 'join-chat' CAPTCHA_TIMEOUT = 'captcha-timeout' CAPTCHA_PASSED = 'captcha-passed' CAPTCHA_ERROR = 'captcha-error' # Tempban TEMPBAN = 'admin-tempban'
class Statsevents: error = 'error' self_ban = 'self-ban' voteban_call = 'voteban-call' voteban_confirm = 'voteban-confirm' voteban_vote = 'voteban-vote' voteban_unvote = 'voteban-unvote' admin_ban = 'admin-ban' admin_kick = 'admin-kick' nsfw = 'nsfw' join_chat = 'join-chat' captcha_timeout = 'captcha-timeout' captcha_passed = 'captcha-passed' captcha_error = 'captcha-error' tempban = 'admin-tempban'
# # @lc app=leetcode id=1305 lang=python3 # # [1305] All Elements in Two Binary Search Trees # # https://leetcode.com/problems/all-elements-in-two-binary-search-trees/description/ # # algorithms # Medium (78.63%) # Likes: 1498 # Dislikes: 49 # Total Accepted: 118.2K # Total Submissions: 150K # Testcase Example: '[2,1,4]\n[1,0,3]' # # Given two binary search trees root1 and root2, return a list containing all # the integers from both trees sorted in ascending order. # # # Example 1: # # # Input: root1 = [2,1,4], root2 = [1,0,3] # Output: [0,1,1,2,3,4] # # # Example 2: # # # Input: root1 = [1,null,8], root2 = [8,1] # Output: [1,1,8,8] # # # # Constraints: # # # The number of nodes in each tree is in the range [0, 5000]. # -10^5 <= Node.val <= 10^5 # # # # @lc code=start # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def getAllElements(self, root1: TreeNode, root2: TreeNode) -> List[int]: # get inorder traversal val1 = self.inorder(root1) val2 = self.inorder(root2) result = [] # merge list while val1 and val2: if val1[-1] < val2[-1]: result.append(val2.pop()) else: result.append(val1.pop()) while val1: result.append(val1.pop()) while val2: result.append(val2.pop()) return result[::-1] def inorder(self, r: TreeNode): return self.inorder(r.left) + [r.val] + self.inorder(r.right) if r else [] # @lc code=end
class Solution: def get_all_elements(self, root1: TreeNode, root2: TreeNode) -> List[int]: val1 = self.inorder(root1) val2 = self.inorder(root2) result = [] while val1 and val2: if val1[-1] < val2[-1]: result.append(val2.pop()) else: result.append(val1.pop()) while val1: result.append(val1.pop()) while val2: result.append(val2.pop()) return result[::-1] def inorder(self, r: TreeNode): return self.inorder(r.left) + [r.val] + self.inorder(r.right) if r else []
# <auto-generated> # This code was generated by the UnitCodeGenerator tool # # Changes to this file will be lost if the code is regenerated # </auto-generated> def to_talbot(value): return value * 3600.0 def to_lumen_minute(value): return value * 60.0 def to_lumen_second(value): return value * 3600.0
def to_talbot(value): return value * 3600.0 def to_lumen_minute(value): return value * 60.0 def to_lumen_second(value): return value * 3600.0
# -*- coding: utf-8 -*- class ContentConfigurator(object): """ Base OP Content Configuration adapter """ name = "Base Openprocurement Content Configurator" def __init__(self, context, request): self.context = context self.request = request def __repr__(self): return "<Configuration adapter for %s>" % type(self.context)
class Contentconfigurator(object): """ Base OP Content Configuration adapter """ name = 'Base Openprocurement Content Configurator' def __init__(self, context, request): self.context = context self.request = request def __repr__(self): return '<Configuration adapter for %s>' % type(self.context)
side_a = int(input()) side_b = int(input()) area = side_a * side_b print(area)
side_a = int(input()) side_b = int(input()) area = side_a * side_b print(area)
# Copyright (c) 2012 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. ANY_NAMESPACE = 'json_schema_compiler::any' ANY_CLASS = ANY_NAMESPACE + '::Any' class AnyHelper(object): """A util class that generates code that uses tools/json_schema_compiler/any.cc. """ def Init(self, any_prop, src, dst): """Initialize |dst|.|any_prop| to |src|. src: Value* dst: Type* """ if any_prop.optional: return '%s->%s->Init(*%s)' % (dst, any_prop.name, src) else: return '%s->%s.Init(*%s)' % (dst, any_prop.name, src) def GetValue(self, any_prop, var): """Get |var| as a const Value&. var: Any* or Any """ if any_prop.optional: return '%s->value()' % var else: return '%s.value()' % var
any_namespace = 'json_schema_compiler::any' any_class = ANY_NAMESPACE + '::Any' class Anyhelper(object): """A util class that generates code that uses tools/json_schema_compiler/any.cc. """ def init(self, any_prop, src, dst): """Initialize |dst|.|any_prop| to |src|. src: Value* dst: Type* """ if any_prop.optional: return '%s->%s->Init(*%s)' % (dst, any_prop.name, src) else: return '%s->%s.Init(*%s)' % (dst, any_prop.name, src) def get_value(self, any_prop, var): """Get |var| as a const Value&. var: Any* or Any """ if any_prop.optional: return '%s->value()' % var else: return '%s.value()' % var
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class Link: """A link""" def __init__(self, url, title): self.title = title self.url = url def __str__(self): return "<a href='%s'>%s</a>" % (self.url, self.title)
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class Link: """A link""" def __init__(self, url, title): self.title = title self.url = url def __str__(self): return "<a href='%s'>%s</a>" % (self.url, self.title)
# WARNING: this uses `eval`, don't run it on untrusted inputs class Node: def __init__(self, value, parent = None): self.parent = parent self.nest = (parent.nest + 1) if parent else 0 if type(value) == list: self.pair = True self.left, self.right = map(lambda n:Node(n,self), value) elif type(value) == Node: self.pair = value.pair if self.pair: self.left, self.right = Node(value.left, self), Node(value.right, self) else: self.val = value.val else: self.val = value self.pair = False def __repr__(self): if not self.pair: return repr(self.val) return '[%s,%s]' % (self.left, self.right); def findExplode(self): if self.pair: if self.nest >= 4: return self return self.left.findExplode() or self.right.findExplode() return False def findSplit(self): if not self.pair: if self.val >= 10: return self return False return self.left.findSplit() or self.right.findSplit() def firstValL(self): if self.pair: return self.left.firstValL() return self def firstValR(self): if self.pair: return self.right.firstValR() return self @staticmethod def _findLeft(root, val): if not root: return False if root.left == val: return Node._findLeft(root.parent, root) return root.left.firstValR() def findLeft(self): return Node._findLeft(self.parent, self) @staticmethod def _findRight(root, val): if not root: return False if root.right == val: return Node._findRight(root.parent, root) return root.right.firstValL() def findRight(self): return Node._findRight(self.parent, self) def explode(self): expl = self.findExplode() if not expl: return False if fL := expl.findLeft(): fL.val += expl.left.val if fR := expl.findRight(): fR.val += expl.right.val expl.pair = False expl.val = 0 return True def split(self): splt = self.findSplit() if not splt: return False splt.pair = True splt.left = Node(splt.val // 2, splt) splt.right = Node(splt.val - splt.val // 2, splt) return True def reduce(self): action = True while action: action = self.explode() if not action: action = self.split() return self def magnitude(self): if not self.pair: return self.val return 3 * self.left.magnitude() + 2 * self.right.magnitude() def __add__(self, node2): return Node([self, node2]).reduce() nodes=[*map(Node,map(eval,open("inputday18")))] print(sum(nodes[1:],nodes[0]).magnitude(),max([(i+j).magnitude() for i in nodes for j in nodes if i!=j]))
class Node: def __init__(self, value, parent=None): self.parent = parent self.nest = parent.nest + 1 if parent else 0 if type(value) == list: self.pair = True (self.left, self.right) = map(lambda n: node(n, self), value) elif type(value) == Node: self.pair = value.pair if self.pair: (self.left, self.right) = (node(value.left, self), node(value.right, self)) else: self.val = value.val else: self.val = value self.pair = False def __repr__(self): if not self.pair: return repr(self.val) return '[%s,%s]' % (self.left, self.right) def find_explode(self): if self.pair: if self.nest >= 4: return self return self.left.findExplode() or self.right.findExplode() return False def find_split(self): if not self.pair: if self.val >= 10: return self return False return self.left.findSplit() or self.right.findSplit() def first_val_l(self): if self.pair: return self.left.firstValL() return self def first_val_r(self): if self.pair: return self.right.firstValR() return self @staticmethod def _find_left(root, val): if not root: return False if root.left == val: return Node._findLeft(root.parent, root) return root.left.firstValR() def find_left(self): return Node._findLeft(self.parent, self) @staticmethod def _find_right(root, val): if not root: return False if root.right == val: return Node._findRight(root.parent, root) return root.right.firstValL() def find_right(self): return Node._findRight(self.parent, self) def explode(self): expl = self.findExplode() if not expl: return False if (f_l := expl.findLeft()): fL.val += expl.left.val if (f_r := expl.findRight()): fR.val += expl.right.val expl.pair = False expl.val = 0 return True def split(self): splt = self.findSplit() if not splt: return False splt.pair = True splt.left = node(splt.val // 2, splt) splt.right = node(splt.val - splt.val // 2, splt) return True def reduce(self): action = True while action: action = self.explode() if not action: action = self.split() return self def magnitude(self): if not self.pair: return self.val return 3 * self.left.magnitude() + 2 * self.right.magnitude() def __add__(self, node2): return node([self, node2]).reduce() nodes = [*map(Node, map(eval, open('inputday18')))] print(sum(nodes[1:], nodes[0]).magnitude(), max([(i + j).magnitude() for i in nodes for j in nodes if i != j]))
HOST = "0.0.0.0" DEBUG = True PORT = 8000 WORKERS = 4
host = '0.0.0.0' debug = True port = 8000 workers = 4
# -*- coding: utf-8 -*- # Re-partitions the feature lookup blocks to conform to a specific max. block size filename = "feature US.txt" outfilename = "frag feature US.txt" with open(outfilename, "wt") as fout: with open(filename, "rt") as fin: lookupsize = 50 lookupcount = 0 count = 0 wascontextual = False calt = False for line in fin: if calt: if count == 0: startenclose = ' lookup lu%03d useExtension{\n' % (lookupcount,) fout.write(startenclose) count += 1 if ('{' not in line) and ('}' not in line) and (';' in line): if not(wascontextual == ("'" in line)): # group contextual substitutions and ligature in respective lookup blocks wascontextual = not wascontextual endenclose = ' } lu%03d;\n\n' % (lookupcount,) fout.write(endenclose) lookupcount += 1 startenclose = ' lookup lu%03d useExtension{\n' % (lookupcount,) fout.write(startenclose) count = 0 fout.write(line) count += 1 if count == lookupsize: endenclose = ' } lu%03d;\n\n' % (lookupcount,) fout.write(endenclose) lookupcount += 1 count = 0 else: fout.write(line) if 'liga;' in line: calt = True fout.write('feature calt {\n') if count != lookupsize: endenclose = ' } lu%03d;\n\n' % (lookupcount,) fout.write(endenclose) fout.write('} calt;\n')
filename = 'feature US.txt' outfilename = 'frag feature US.txt' with open(outfilename, 'wt') as fout: with open(filename, 'rt') as fin: lookupsize = 50 lookupcount = 0 count = 0 wascontextual = False calt = False for line in fin: if calt: if count == 0: startenclose = ' lookup lu%03d useExtension{\n' % (lookupcount,) fout.write(startenclose) count += 1 if '{' not in line and '}' not in line and (';' in line): if not wascontextual == ("'" in line): wascontextual = not wascontextual endenclose = ' } lu%03d;\n\n' % (lookupcount,) fout.write(endenclose) lookupcount += 1 startenclose = ' lookup lu%03d useExtension{\n' % (lookupcount,) fout.write(startenclose) count = 0 fout.write(line) count += 1 if count == lookupsize: endenclose = ' } lu%03d;\n\n' % (lookupcount,) fout.write(endenclose) lookupcount += 1 count = 0 else: fout.write(line) if 'liga;' in line: calt = True fout.write('feature calt {\n') if count != lookupsize: endenclose = ' } lu%03d;\n\n' % (lookupcount,) fout.write(endenclose) fout.write('} calt;\n')
class MenuItem: pass # Create an instance of the MenuItem class menu_item1 = MenuItem()
class Menuitem: pass menu_item1 = menu_item()
#!/usr/bin/env python # # Copyright 2007 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """Errors thrown by `apiproxy.MakeSyncCall`. """ class Error(Exception): """Base `APIProxy` error type.""" class RPCFailedError(Error): """Raised by `APIProxy` calls when the RPC to the application server fails.""" class CallNotFoundError(Error): """Raised by `APIProxy` calls when the requested method cannot be found.""" class ArgumentError(Error): """Raised by `APIProxy` calls if there is an error parsing the arguments.""" class DeadlineExceededError(Error): """Raised by `APIProxy` calls if the call took too long to respond. Not to be confused with `runtime.DeadlineExceededError`. That one is raised when the overall HTTP response deadline is exceeded. """ class CancelledError(Error): """Raised by `APIProxy` calls if the call was cancelled, such as when the user's request is exiting.""" class ApplicationError(Error): """Raised by `APIProxy` in the event of an application-level error.""" def __init__(self, application_error, error_detail=''): self.application_error = application_error self.error_detail = error_detail Error.__init__(self, application_error) def __str__(self): return 'ApplicationError: %d %s' % (self.application_error, self.error_detail) class OverQuotaError(Error): """Raised by `APIProxy` calls when they have been blocked due to a lack of available quota.""" class RequestTooLargeError(Error): """Raised by APIProxy calls if the request was too large.""" class ResponseTooLargeError(Error): """Raised by APIProxy calls if the response was too large.""" class CapabilityDisabledError(Error): """Raised by `APIProxy` when API calls are temporarily disabled.""" class FeatureNotEnabledError(Error): """Raised by `APIProxy` when the app must enable a feature to use this call.""" class InterruptedError(Error): """Raised by `APIProxy.Wait()` when the wait is interrupted by an uncaught exception from some callback. The callback does not necessarily associated with the RPC in question. """ def __init__(self, exception, rpc): self.args = ("The Wait() request was interrupted by an exception from " "another callback:", exception) self.__rpc = rpc self.__exception = exception @property def rpc(self): return self.__rpc @property def exception(self): return self.__exception class RpcAuthorityError(Error): """Raised by `APIProxy` when loading RPC authority from the environment."""
"""Errors thrown by `apiproxy.MakeSyncCall`. """ class Error(Exception): """Base `APIProxy` error type.""" class Rpcfailederror(Error): """Raised by `APIProxy` calls when the RPC to the application server fails.""" class Callnotfounderror(Error): """Raised by `APIProxy` calls when the requested method cannot be found.""" class Argumenterror(Error): """Raised by `APIProxy` calls if there is an error parsing the arguments.""" class Deadlineexceedederror(Error): """Raised by `APIProxy` calls if the call took too long to respond. Not to be confused with `runtime.DeadlineExceededError`. That one is raised when the overall HTTP response deadline is exceeded. """ class Cancellederror(Error): """Raised by `APIProxy` calls if the call was cancelled, such as when the user's request is exiting.""" class Applicationerror(Error): """Raised by `APIProxy` in the event of an application-level error.""" def __init__(self, application_error, error_detail=''): self.application_error = application_error self.error_detail = error_detail Error.__init__(self, application_error) def __str__(self): return 'ApplicationError: %d %s' % (self.application_error, self.error_detail) class Overquotaerror(Error): """Raised by `APIProxy` calls when they have been blocked due to a lack of available quota.""" class Requesttoolargeerror(Error): """Raised by APIProxy calls if the request was too large.""" class Responsetoolargeerror(Error): """Raised by APIProxy calls if the response was too large.""" class Capabilitydisablederror(Error): """Raised by `APIProxy` when API calls are temporarily disabled.""" class Featurenotenablederror(Error): """Raised by `APIProxy` when the app must enable a feature to use this call.""" class Interruptederror(Error): """Raised by `APIProxy.Wait()` when the wait is interrupted by an uncaught exception from some callback. The callback does not necessarily associated with the RPC in question. """ def __init__(self, exception, rpc): self.args = ('The Wait() request was interrupted by an exception from another callback:', exception) self.__rpc = rpc self.__exception = exception @property def rpc(self): return self.__rpc @property def exception(self): return self.__exception class Rpcauthorityerror(Error): """Raised by `APIProxy` when loading RPC authority from the environment."""
def canonicalize_string(val): """ Return version of string in UPPERCASE and without redundant whitespace. """ try: return " ".join(val.upper().split()) except AttributeError: # was not upper-able, so was not a string return val canonicalizable = ["address_line", "city_name", "county_na", "state_nam", "province", "place_of_performance_city"] # Some field names like 'place_of_perform_county_na' are truncated def fields_by_partial_names(model, substrings): """ For any model, all field names containing any substring from `substrings`. """ for f in model._meta.fields: for substring in substrings: if substring in f.name: yield f.name continue def canonicalize_location_dict(dct): """ Canonicalize location-related values in `dct` according to the rules in `canonicalize_string`. """ for partial_field_name in canonicalizable: for field in dct: if partial_field_name in field: dct[field] = canonicalize_string(dct[field]) return dct def canonicalize_location_instance(loc): """ Canonicalize location-related values in a model instance according to the rules in `canonicalize_string`. """ for field in fields_by_partial_names(loc, canonicalizable): current_val = getattr(loc, field) if current_val: setattr(loc, field, canonicalize_string(current_val)) loc.save()
def canonicalize_string(val): """ Return version of string in UPPERCASE and without redundant whitespace. """ try: return ' '.join(val.upper().split()) except AttributeError: return val canonicalizable = ['address_line', 'city_name', 'county_na', 'state_nam', 'province', 'place_of_performance_city'] def fields_by_partial_names(model, substrings): """ For any model, all field names containing any substring from `substrings`. """ for f in model._meta.fields: for substring in substrings: if substring in f.name: yield f.name continue def canonicalize_location_dict(dct): """ Canonicalize location-related values in `dct` according to the rules in `canonicalize_string`. """ for partial_field_name in canonicalizable: for field in dct: if partial_field_name in field: dct[field] = canonicalize_string(dct[field]) return dct def canonicalize_location_instance(loc): """ Canonicalize location-related values in a model instance according to the rules in `canonicalize_string`. """ for field in fields_by_partial_names(loc, canonicalizable): current_val = getattr(loc, field) if current_val: setattr(loc, field, canonicalize_string(current_val)) loc.save()
{ "targets" : [{ "target_name" : "nof", "sources" : [ "src/nof.cc", "src/mpi/node_mpi.cc", "src/osuflow/osuflow.cc", "src/osuflow/field.cc" ], "include_dirs" : ["deps/osuflow/include"], "libraries" : [ "../deps/osuflow/lib/libOSUFlow.so", "../deps/osuflow/lib/libdiy.so" ] }] }
{'targets': [{'target_name': 'nof', 'sources': ['src/nof.cc', 'src/mpi/node_mpi.cc', 'src/osuflow/osuflow.cc', 'src/osuflow/field.cc'], 'include_dirs': ['deps/osuflow/include'], 'libraries': ['../deps/osuflow/lib/libOSUFlow.so', '../deps/osuflow/lib/libdiy.so']}]}
def compute(n: int) -> int: combinations = [1] + [0] * n for i in range(1, n): for j in range(i, n + 1): combinations[j] += combinations[j - i] return combinations[-1]
def compute(n: int) -> int: combinations = [1] + [0] * n for i in range(1, n): for j in range(i, n + 1): combinations[j] += combinations[j - i] return combinations[-1]
"""Example B. """ def is_match(a, b): return a is b print(is_match(1, 1))
"""Example B. """ def is_match(a, b): return a is b print(is_match(1, 1))
# API email tester demo def default( server, postData = None, getData = None ): print("email tester") server.email( postData['to'], 'Test Subject', 'Test Body' ) server.respondJson( True )
def default(server, postData=None, getData=None): print('email tester') server.email(postData['to'], 'Test Subject', 'Test Body') server.respondJson(True)
"""Data pipelines allow large amounts of data to be processed without loading into memory at once.""" print("\n############# PULL PIPELINES ##############") print("\ngenerators can be used for iteration based data pipelines...") def pipeline_stage_one_a(limit): num = 0 while num <= limit: print("stage 1 yield") yield num num += 1 def pipeline_stage_two(previous_stage_generator): for value in previous_stage_generator: print("stage 2 yield") yield value * value def pipeline_stage_three(previous_stage_generator): for squared_value in previous_stage_generator: squared_value += 1 print("stage 3 yield") yield squared_value print("\ncreate a data pipeline using generators...") stage1 = pipeline_stage_one_a(limit=10) # create initial generator - returns generator object, no execution stage2 = pipeline_stage_two(stage1) # pass it to the next in the pipeline stage3 = pipeline_stage_three(stage2) # pass it to the next in the pipeline print("use iteration to pull data through pipeline") for i in stage3: print("x^2 + 1 =", i) print("\nsame can be done using generator comprehensions...") stage1 = (x for x in range(10)) # create initial generator stage2 = (x*x for x in stage1) # pass it to the next in the pipeline stage3 = (x+1 for x in stage2) # pass it to the next in the pipeline # here we use iteration to pull the data through the pipeline from the end for i in stage3: print("x^2 + 1 =", i) def pipeline_stage_one_b(limit): num = 0 while num <= limit: print("stage 1a yield") yield f"(x = {num})" num += 1 def pipeline_stage_multiplex(previous_stage_generator_a, previous_stage_generator_b): for squared_value, value_label in zip(previous_stage_generator_a, previous_stage_generator_b): squared_value += 1 print("stage 3 yield") yield f"{squared_value} {value_label}" print("\nyou can create many-to-one generators in the pipeline with zip...") stage1a = pipeline_stage_one_a(limit=10) # create first generator stage1b = pipeline_stage_one_b(limit=10) # create second generator stage2 = pipeline_stage_two(stage1a) # pass first to the next in the pipeline stage3 = pipeline_stage_multiplex(stage2, stage1b) # pass two generators to the next in the pipeline for i in stage3: print("x^2 + 1 =", i) print("\n############# PUSH PIPELINES ##############") # see http://www.dabeaz.com/coroutines/ print("\ncoroutines can be used to create producer-consumer data pipelines...") def pipeline_producer(next_stage_coroutine, limit): num = 0 _return_value = next_stage_coroutine.send(None) # prime the next stage in the pipeline while num <= limit: print("stage producer send") _return_value = next_stage_coroutine.send(num) print("return value from producer send =", _return_value) num += 1 next_stage_coroutine.close() def pipeline_stage_one(next_stage_coroutine): _return_value = next_stage_coroutine.send(None) while True: print("stage 1 yield") value = (yield _return_value) # yield back up the pipeline print("stage 1 send") _return_value = next_stage_coroutine.send(value * value) # send down the pipeline def pipeline_stage_two(next_stage_coroutine): _return_value = next_stage_coroutine.send(None) while True: print("stage 2 yield") value = (yield _return_value) print("stage 2 send") _return_value = next_stage_coroutine.send(value + 1) def pipeline_stage_consumer(prefix_string): while True: print("stage consumer yield") value = (yield 'Consumed') print(prefix_string, value) print("\ncreate a data pipeline using coroutines...") stage_consumer = pipeline_stage_consumer("x^2 + 1 =") stage2 = pipeline_stage_two(stage_consumer) stage1 = pipeline_stage_one(stage2) print("push data data through the pipeline by calling producer") pipeline_producer(stage1, 10) def pipeline_stage_broadcaster(next_stage_coroutines): for _sink in next_stage_coroutines: _sink.send(None) while True: print("stage broadcast yield") value = (yield 'Broadcasting') print("stage broadcasting") for _sink in next_stage_coroutines: _sink.send(value) print("\ncreate a data pipeline with broadcasting coroutines...") stage_consumer1 = pipeline_stage_consumer("consumer1: x^2 + 1 =") stage_consumer2 = pipeline_stage_consumer("consumer2: x^2 + 1 =") stage_broadcaster = pipeline_stage_broadcaster([stage_consumer1, stage_consumer2]) stage2 = pipeline_stage_two(stage_broadcaster) stage1 = pipeline_stage_one(stage2) print("again push data data through the pipeline by calling producer") pipeline_producer(stage1, 10)
"""Data pipelines allow large amounts of data to be processed without loading into memory at once.""" print('\n############# PULL PIPELINES ##############') print('\ngenerators can be used for iteration based data pipelines...') def pipeline_stage_one_a(limit): num = 0 while num <= limit: print('stage 1 yield') yield num num += 1 def pipeline_stage_two(previous_stage_generator): for value in previous_stage_generator: print('stage 2 yield') yield (value * value) def pipeline_stage_three(previous_stage_generator): for squared_value in previous_stage_generator: squared_value += 1 print('stage 3 yield') yield squared_value print('\ncreate a data pipeline using generators...') stage1 = pipeline_stage_one_a(limit=10) stage2 = pipeline_stage_two(stage1) stage3 = pipeline_stage_three(stage2) print('use iteration to pull data through pipeline') for i in stage3: print('x^2 + 1 =', i) print('\nsame can be done using generator comprehensions...') stage1 = (x for x in range(10)) stage2 = (x * x for x in stage1) stage3 = (x + 1 for x in stage2) for i in stage3: print('x^2 + 1 =', i) def pipeline_stage_one_b(limit): num = 0 while num <= limit: print('stage 1a yield') yield f'(x = {num})' num += 1 def pipeline_stage_multiplex(previous_stage_generator_a, previous_stage_generator_b): for (squared_value, value_label) in zip(previous_stage_generator_a, previous_stage_generator_b): squared_value += 1 print('stage 3 yield') yield f'{squared_value} {value_label}' print('\nyou can create many-to-one generators in the pipeline with zip...') stage1a = pipeline_stage_one_a(limit=10) stage1b = pipeline_stage_one_b(limit=10) stage2 = pipeline_stage_two(stage1a) stage3 = pipeline_stage_multiplex(stage2, stage1b) for i in stage3: print('x^2 + 1 =', i) print('\n############# PUSH PIPELINES ##############') print('\ncoroutines can be used to create producer-consumer data pipelines...') def pipeline_producer(next_stage_coroutine, limit): num = 0 _return_value = next_stage_coroutine.send(None) while num <= limit: print('stage producer send') _return_value = next_stage_coroutine.send(num) print('return value from producer send =', _return_value) num += 1 next_stage_coroutine.close() def pipeline_stage_one(next_stage_coroutine): _return_value = next_stage_coroutine.send(None) while True: print('stage 1 yield') value = (yield _return_value) print('stage 1 send') _return_value = next_stage_coroutine.send(value * value) def pipeline_stage_two(next_stage_coroutine): _return_value = next_stage_coroutine.send(None) while True: print('stage 2 yield') value = (yield _return_value) print('stage 2 send') _return_value = next_stage_coroutine.send(value + 1) def pipeline_stage_consumer(prefix_string): while True: print('stage consumer yield') value = (yield 'Consumed') print(prefix_string, value) print('\ncreate a data pipeline using coroutines...') stage_consumer = pipeline_stage_consumer('x^2 + 1 =') stage2 = pipeline_stage_two(stage_consumer) stage1 = pipeline_stage_one(stage2) print('push data data through the pipeline by calling producer') pipeline_producer(stage1, 10) def pipeline_stage_broadcaster(next_stage_coroutines): for _sink in next_stage_coroutines: _sink.send(None) while True: print('stage broadcast yield') value = (yield 'Broadcasting') print('stage broadcasting') for _sink in next_stage_coroutines: _sink.send(value) print('\ncreate a data pipeline with broadcasting coroutines...') stage_consumer1 = pipeline_stage_consumer('consumer1: x^2 + 1 =') stage_consumer2 = pipeline_stage_consumer('consumer2: x^2 + 1 =') stage_broadcaster = pipeline_stage_broadcaster([stage_consumer1, stage_consumer2]) stage2 = pipeline_stage_two(stage_broadcaster) stage1 = pipeline_stage_one(stage2) print('again push data data through the pipeline by calling producer') pipeline_producer(stage1, 10)
def genhtml(sites): ############################################## html = r'''<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Passme JS</title> <style type="text/css"> fieldset { margin: 0; padding: 0.75em; background: #efe; border: solid 1px #999; border-bottom-width: 0; line-height: 1.3em; border-top-left-radius: 0.5em; -moz-border-radius-topleft: 0.5em; -webkit-border-top-left-radius: 0.5em; border-top-right-radius: 0.5em; -moz-border-radius-topright: 0.5em; -webkit-border-top-right-radius: 0.5em; } fieldset.siteinfo { line-height: 2.5em; } fieldset label { display: block; float: left; margin-right: 0.75em; } fieldset div.Field { overflow: hidden; } fieldset div.Field input { width: 100%; background: none; border: none; outline: none; -webkit-appearance: none; } input.Result { width: 98%; background: #ada; } input.Copy { width: 100%; background: #ddd; font-size: 1em; padding: 0.5em; } </style> <script type="text/javascript" src="https://caligatio.github.io/jsSHA/sha.js"></script> <script type="text/javascript"> function CopyText(arg){ element = document.getElementById(arg) element.focus(); element.setSelectionRange(0, 9999); document.execCommand("copy"); element.blur(); document.getElementById("Result").value = "Copied"; document.getElementById("master").value = ""; } function calcHash() { try { var master = document.getElementById("master"); <!-- ------------------------------------------------ Site information --------------------------- --> ''' ###################################################### html = html + \ ('site = "{0}" <!-- Default selection -->'.format(sites[0][0])) html = html + ''' var sitekey = new Object({ ''' for i in sites: site = i[0] key = [i[1]['hash'], i[1]['char'], int(i[1]['len']), i[1]['seed']] for c in i[1]['comment'].split('\n'): key.append(c) html = html + (' "{0}" : {1},\n'.format(site, key)) html = html.rstrip(',\n') ###################################################### html = html + r''' }); <!-- -------------------------------------------------------------------------------------------- --> var seed = document.getElementsByName('seed'); for (i = 0; i < seed.length; i++) { if (seed[i].checked) { site = seed[i].value; } } SiteInfo = "<fieldset class=\"siteinfo\">"; for (var key in sitekey) { if (site == key) { checked = "checked=\"checked\" "; } else { checked = ""; } SiteInfo = SiteInfo + "<input type=\"radio\" name=\"seed\" value=\"" + key + "\" " + checked + "onclick=\"calcHash()\">" + key; } SiteInfo = SiteInfo + "</fieldset>"; site = sitekey[site]; var hash = site[0]; var char = site[1]; var plen = site[2]; var seed = site[3]; if (site.length > 4) { SiteInfo = SiteInfo + "<ul>"; for (var i = 4; i < site.length; i++) { var SiteInfo = SiteInfo + "<li>" + site[i].replace(/((http:|https:)\/\/[\x21-\x26\x28-\x7e]+)/gi, "<a href='$1'>$1</a>") + "</li>"; } SiteInfo = SiteInfo + "</ul>" } hash = hash.replace("sha3_","SHA3-").replace("sha","SHA-"); <!-- convert from Python hashlib --> var Password = document.getElementById("Result"); var SiteInfoOutput = document.getElementById("SiteInfo"); var hashObj = new jsSHA(hash, "BYTES"); hashObj.update(master.value + seed); base = hashObj.getHash("B64"); switch (char) { case "base64": p = base; break; case "an": p = base.replace(/[+/=]/g,""); break; case "a": p = base.replace(/[0-9+/=]/g,""); break; case "n": p = hashObj.getHash("HEX").replace(/[a-f]/g,""); break; case "ans": symbol = "#[$-=?@]_!" p = base.replace(/=/g,""); a = p.charCodeAt(0) % symbol.length; symbol = symbol.slice(a,-1) + symbol.slice(0,a) for (var i = 0; i < symbol.length; i++) { p = p.split(p.charAt(0)).join(symbol.charAt(i)).slice(1,-1) + p.charAt(0); } break; default: p = "Error"; break; } Password.value = p.slice(0,plen); if (SiteInfo > "") {SiteInfoOutput.innerHTML = SiteInfo;} document.getElementById("master").focus(); } catch(e) { Password.value = e.message } } </script> </head> <body onload="calcHash()"> <h1>Passme JS</h1> <form action="#" method="get"> <div id="SiteInfo"></div> <fieldset id="PasswdField" onclick="document.getElementById('Passwd').focus();"> <label id="PasswdLabel" for="master">Master</label> <div class="Field"> <input type="text" name="master" id="master" onkeyup="calcHash()"> </div> </fieldset> <div> <input class="Result" type="text" name="Result" id="Result"> </div> <div> <input class="Copy" type="button" name="Copy" value="Copy" onClick="CopyText('Result');"> </div> </form> <p><a href="https://github.com/sekika/passme">Passme</a></p> </body> </html> ''' ###################################################### return html
def genhtml(sites): html = '<!DOCTYPE html>\n<html lang="ja">\n<head>\n<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<title>Passme JS</title>\n\n<style type="text/css">\n fieldset {\n margin: 0; padding: 0.75em; background: #efe; border: solid 1px #999; border-bottom-width: 0; line-height: 1.3em;\n border-top-left-radius: 0.5em; -moz-border-radius-topleft: 0.5em; -webkit-border-top-left-radius: 0.5em;\n border-top-right-radius: 0.5em; -moz-border-radius-topright: 0.5em; -webkit-border-top-right-radius: 0.5em;\n }\n fieldset.siteinfo {\n line-height: 2.5em;\n }\n fieldset label { display: block; float: left; margin-right: 0.75em; }\n fieldset div.Field { overflow: hidden; }\n fieldset div.Field input {\n width: 100%; background: none; border: none; outline: none; -webkit-appearance: none;\n }\n input.Result { width: 98%; background: #ada; }\n input.Copy { width: 100%; background: #ddd; font-size: 1em; padding: 0.5em; }\n</style>\n\n<script type="text/javascript" src="https://caligatio.github.io/jsSHA/sha.js"></script>\n\n<script type="text/javascript">\nfunction CopyText(arg){\n element = document.getElementById(arg)\n element.focus();\n element.setSelectionRange(0, 9999);\n document.execCommand("copy");\n element.blur();\n document.getElementById("Result").value = "Copied";\n document.getElementById("master").value = "";\n}\nfunction calcHash() {\ntry {\n var master = document.getElementById("master");\n\n<!-- ------------------------------------------------ Site information --------------------------- -->\n\n' html = html + 'site = "{0}" <!-- Default selection -->'.format(sites[0][0]) html = html + '\n\n var sitekey = new Object({\n\n' for i in sites: site = i[0] key = [i[1]['hash'], i[1]['char'], int(i[1]['len']), i[1]['seed']] for c in i[1]['comment'].split('\n'): key.append(c) html = html + ' "{0}" : {1},\n'.format(site, key) html = html.rstrip(',\n') html = html + '\n });\n\n<!-- -------------------------------------------------------------------------------------------- -->\n\n var seed = document.getElementsByName(\'seed\');\n for (i = 0; i < seed.length; i++) {\n if (seed[i].checked) {\n site = seed[i].value;\n }\n }\n\n SiteInfo = "<fieldset class=\\"siteinfo\\">";\n for (var key in sitekey) {\n if (site == key) {\n checked = "checked=\\"checked\\" ";\n } else {\n checked = "";\n }\n SiteInfo = SiteInfo + "<input type=\\"radio\\" name=\\"seed\\" value=\\"" + key + "\\" " + checked + "onclick=\\"calcHash()\\">" + key;\n }\n SiteInfo = SiteInfo + "</fieldset>";\n\n site = sitekey[site];\n\n var hash = site[0];\n var char = site[1];\n var plen = site[2];\n var seed = site[3];\n\n if (site.length > 4) {\n SiteInfo = SiteInfo + "<ul>";\n for (var i = 4; i < site.length; i++) {\n var SiteInfo = SiteInfo + "<li>" + site[i].replace(/((http:|https:)\\/\\/[\\x21-\\x26\\x28-\\x7e]+)/gi, "<a href=\'$1\'>$1</a>") + "</li>";\n }\n SiteInfo = SiteInfo + "</ul>"\n }\n\n hash = hash.replace("sha3_","SHA3-").replace("sha","SHA-"); <!-- convert from Python hashlib -->\n var Password = document.getElementById("Result");\n var SiteInfoOutput = document.getElementById("SiteInfo");\n\n var hashObj = new jsSHA(hash, "BYTES");\n hashObj.update(master.value + seed);\n\n base = hashObj.getHash("B64");\n\n switch (char) {\n case "base64":\n p = base;\n break;\n case "an":\n p = base.replace(/[+/=]/g,"");\n break;\n case "a":\n p = base.replace(/[0-9+/=]/g,"");\n break;\n case "n":\n p = hashObj.getHash("HEX").replace(/[a-f]/g,"");\n break;\n case "ans":\n symbol = "#[$-=?@]_!"\n p = base.replace(/=/g,"");\n a = p.charCodeAt(0) % symbol.length;\n symbol = symbol.slice(a,-1) + symbol.slice(0,a)\n for (var i = 0; i < symbol.length; i++) {\n p = p.split(p.charAt(0)).join(symbol.charAt(i)).slice(1,-1) + p.charAt(0);\n }\n break;\n default:\n p = "Error";\n break;\n }\n Password.value = p.slice(0,plen);\n if (SiteInfo > "") {SiteInfoOutput.innerHTML = SiteInfo;}\n document.getElementById("master").focus();\n } catch(e) {\n Password.value = e.message\n }\n}\n</script>\n</head>\n<body onload="calcHash()">\n<h1>Passme JS</h1>\n\n<form action="#" method="get">\n\n<div id="SiteInfo"></div>\n\n<fieldset id="PasswdField" onclick="document.getElementById(\'Passwd\').focus();">\n <label id="PasswdLabel" for="master">Master</label>\n <div class="Field">\n <input type="text" name="master" id="master" onkeyup="calcHash()">\n </div>\n</fieldset>\n<div>\n <input class="Result" type="text" name="Result" id="Result">\n</div>\n<div>\n <input class="Copy" type="button" name="Copy" value="Copy" onClick="CopyText(\'Result\');">\n</div>\n</form>\n\n<p><a href="https://github.com/sekika/passme">Passme</a></p>\n</body>\n</html>\n' return html
def get_bright(r, g, b): return sum([r, g, b]) / 3
def get_bright(r, g, b): return sum([r, g, b]) / 3
_base_ = [ '../_base_/models/hv_pointpillars_fpn_nus.py', '../_base_/datasets/nus-3d.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py', ] # Note that the order of class names should be consistent with # the following anchors' order point_cloud_range = [-50, -50, -5, 50, 50, 3] class_names = [ 'bicycle', 'motorcycle', 'pedestrian', 'traffic_cone', 'barrier', 'car', 'truck', 'trailer', 'bus', 'construction_vehicle' ] train_pipeline = [ dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict( type='GlobalRotScaleTrans', rot_range=[-0.3925, 0.3925], scale_ratio_range=[0.95, 1.05], translation_std=[0, 0, 0]), dict( type='RandomFlip3D', sync_2d=False, flip_ratio_bev_horizontal=0.5, flip_ratio_bev_vertical=0.5), dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range), dict(type='PointShuffle'), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d']) ] test_pipeline = [ dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), dict( type='MultiScaleFlipAug3D', img_scale=(1333, 800), pts_scale_ratio=1, flip=False, transforms=[ dict( type='GlobalRotScaleTrans', rot_range=[0, 0], scale_ratio_range=[1., 1.], translation_std=[0, 0, 0]), dict(type='RandomFlip3D'), dict( type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict( type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['points']) ]) ] data = dict( samples_per_gpu=2, workers_per_gpu=4, train=dict(pipeline=train_pipeline, classes=class_names), val=dict(pipeline=test_pipeline, classes=class_names), test=dict(pipeline=test_pipeline, classes=class_names)) # model settings model = dict( pts_voxel_layer=dict(max_num_points=20), pts_voxel_encoder=dict(feat_channels=[64, 64]), pts_neck=dict( _delete_=True, type='SECONDFPN', norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01), in_channels=[64, 128, 256], upsample_strides=[1, 2, 4], out_channels=[128, 128, 128]), pts_bbox_head=dict( _delete_=True, type='ShapeAwareHead', num_classes=10, in_channels=384, feat_channels=384, use_direction_classifier=True, anchor_generator=dict( type='AlignedAnchor3DRangeGeneratorPerCls', ranges=[[-50, -50, -1.67339111, 50, 50, -1.67339111], [-50, -50, -1.71396371, 50, 50, -1.71396371], [-50, -50, -1.61785072, 50, 50, -1.61785072], [-50, -50, -1.80984986, 50, 50, -1.80984986], [-50, -50, -1.76396500, 50, 50, -1.76396500], [-50, -50, -1.80032795, 50, 50, -1.80032795], [-50, -50, -1.74440365, 50, 50, -1.74440365], [-50, -50, -1.68526504, 50, 50, -1.68526504], [-50, -50, -1.80673031, 50, 50, -1.80673031], [-50, -50, -1.64824291, 50, 50, -1.64824291]], sizes=[ [0.60058911, 1.68452161, 1.27192197], # bicycle [0.76279481, 2.09973778, 1.44403034], # motorcycle [0.66344886, 0.72564370, 1.75748069], # pedestrian [0.39694519, 0.40359262, 1.06232151], # traffic cone [2.49008838, 0.48578221, 0.98297065], # barrier [1.95017717, 4.60718145, 1.72270761], # car [2.45609390, 6.73778078, 2.73004906], # truck [2.87427237, 12.01320693, 3.81509561], # trailer [2.94046906, 11.1885991, 3.47030982], # bus [2.73050468, 6.38352896, 3.13312415] # construction vehicle ], custom_values=[0, 0], rotations=[0, 1.57], reshape_out=False), tasks=[ dict( num_class=2, class_names=['bicycle', 'motorcycle'], shared_conv_channels=(64, 64), shared_conv_strides=(1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01)), dict( num_class=1, class_names=['pedestrian'], shared_conv_channels=(64, 64), shared_conv_strides=(1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01)), dict( num_class=2, class_names=['traffic_cone', 'barrier'], shared_conv_channels=(64, 64), shared_conv_strides=(1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01)), dict( num_class=1, class_names=['car'], shared_conv_channels=(64, 64, 64), shared_conv_strides=(2, 1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01)), dict( num_class=4, class_names=[ 'truck', 'trailer', 'bus', 'construction_vehicle' ], shared_conv_channels=(64, 64, 64), shared_conv_strides=(2, 1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=1e-3, momentum=0.01)) ], assign_per_class=True, diff_rad_by_sin=True, dir_offset=0.7854, # pi/4 dir_limit_offset=0, bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=9), loss_cls=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_dir=dict( type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)), # model training and testing settings train_cfg=dict( _delete_=True, pts=dict( assigner=[ dict( # bicycle type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.35, min_pos_iou=0.35, ignore_iof_thr=-1), dict( # motorcycle type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.3, min_pos_iou=0.3, ignore_iof_thr=-1), dict( # pedestrian type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict( # traffic cone type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict( # barrier type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.55, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict( # car type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6, neg_iou_thr=0.45, min_pos_iou=0.45, ignore_iof_thr=-1), dict( # truck type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.55, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict( # trailer type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.35, min_pos_iou=0.35, ignore_iof_thr=-1), dict( # bus type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.55, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict( # construction vehicle type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.35, min_pos_iou=0.35, ignore_iof_thr=-1) ], allowed_border=0, code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2], pos_weight=-1, debug=False)))
_base_ = ['../_base_/models/hv_pointpillars_fpn_nus.py', '../_base_/datasets/nus-3d.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py'] point_cloud_range = [-50, -50, -5, 50, 50, 3] class_names = ['bicycle', 'motorcycle', 'pedestrian', 'traffic_cone', 'barrier', 'car', 'truck', 'trailer', 'bus', 'construction_vehicle'] train_pipeline = [dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), dict(type='LoadAnnotations3D', with_bbox_3d=True, with_label_3d=True), dict(type='GlobalRotScaleTrans', rot_range=[-0.3925, 0.3925], scale_ratio_range=[0.95, 1.05], translation_std=[0, 0, 0]), dict(type='RandomFlip3D', sync_2d=False, flip_ratio_bev_horizontal=0.5, flip_ratio_bev_vertical=0.5), dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict(type='ObjectRangeFilter', point_cloud_range=point_cloud_range), dict(type='PointShuffle'), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['points', 'gt_bboxes_3d', 'gt_labels_3d'])] test_pipeline = [dict(type='LoadPointsFromFile', coord_type='LIDAR', load_dim=5, use_dim=5), dict(type='LoadPointsFromMultiSweeps', sweeps_num=10), dict(type='MultiScaleFlipAug3D', img_scale=(1333, 800), pts_scale_ratio=1, flip=False, transforms=[dict(type='GlobalRotScaleTrans', rot_range=[0, 0], scale_ratio_range=[1.0, 1.0], translation_std=[0, 0, 0]), dict(type='RandomFlip3D'), dict(type='PointsRangeFilter', point_cloud_range=point_cloud_range), dict(type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['points'])])] data = dict(samples_per_gpu=2, workers_per_gpu=4, train=dict(pipeline=train_pipeline, classes=class_names), val=dict(pipeline=test_pipeline, classes=class_names), test=dict(pipeline=test_pipeline, classes=class_names)) model = dict(pts_voxel_layer=dict(max_num_points=20), pts_voxel_encoder=dict(feat_channels=[64, 64]), pts_neck=dict(_delete_=True, type='SECONDFPN', norm_cfg=dict(type='naiveSyncBN2d', eps=0.001, momentum=0.01), in_channels=[64, 128, 256], upsample_strides=[1, 2, 4], out_channels=[128, 128, 128]), pts_bbox_head=dict(_delete_=True, type='ShapeAwareHead', num_classes=10, in_channels=384, feat_channels=384, use_direction_classifier=True, anchor_generator=dict(type='AlignedAnchor3DRangeGeneratorPerCls', ranges=[[-50, -50, -1.67339111, 50, 50, -1.67339111], [-50, -50, -1.71396371, 50, 50, -1.71396371], [-50, -50, -1.61785072, 50, 50, -1.61785072], [-50, -50, -1.80984986, 50, 50, -1.80984986], [-50, -50, -1.763965, 50, 50, -1.763965], [-50, -50, -1.80032795, 50, 50, -1.80032795], [-50, -50, -1.74440365, 50, 50, -1.74440365], [-50, -50, -1.68526504, 50, 50, -1.68526504], [-50, -50, -1.80673031, 50, 50, -1.80673031], [-50, -50, -1.64824291, 50, 50, -1.64824291]], sizes=[[0.60058911, 1.68452161, 1.27192197], [0.76279481, 2.09973778, 1.44403034], [0.66344886, 0.7256437, 1.75748069], [0.39694519, 0.40359262, 1.06232151], [2.49008838, 0.48578221, 0.98297065], [1.95017717, 4.60718145, 1.72270761], [2.4560939, 6.73778078, 2.73004906], [2.87427237, 12.01320693, 3.81509561], [2.94046906, 11.1885991, 3.47030982], [2.73050468, 6.38352896, 3.13312415]], custom_values=[0, 0], rotations=[0, 1.57], reshape_out=False), tasks=[dict(num_class=2, class_names=['bicycle', 'motorcycle'], shared_conv_channels=(64, 64), shared_conv_strides=(1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=0.001, momentum=0.01)), dict(num_class=1, class_names=['pedestrian'], shared_conv_channels=(64, 64), shared_conv_strides=(1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=0.001, momentum=0.01)), dict(num_class=2, class_names=['traffic_cone', 'barrier'], shared_conv_channels=(64, 64), shared_conv_strides=(1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=0.001, momentum=0.01)), dict(num_class=1, class_names=['car'], shared_conv_channels=(64, 64, 64), shared_conv_strides=(2, 1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=0.001, momentum=0.01)), dict(num_class=4, class_names=['truck', 'trailer', 'bus', 'construction_vehicle'], shared_conv_channels=(64, 64, 64), shared_conv_strides=(2, 1, 1), norm_cfg=dict(type='naiveSyncBN2d', eps=0.001, momentum=0.01))], assign_per_class=True, diff_rad_by_sin=True, dir_offset=0.7854, dir_limit_offset=0, bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=9), loss_cls=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_dir=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)), train_cfg=dict(_delete_=True, pts=dict(assigner=[dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.35, min_pos_iou=0.35, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.3, min_pos_iou=0.3, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.55, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6, neg_iou_thr=0.45, min_pos_iou=0.45, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.55, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.35, min_pos_iou=0.35, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.55, neg_iou_thr=0.4, min_pos_iou=0.4, ignore_iof_thr=-1), dict(type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5, neg_iou_thr=0.35, min_pos_iou=0.35, ignore_iof_thr=-1)], allowed_border=0, code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2], pos_weight=-1, debug=False)))
# # PySNMP MIB module ZHONE-COM-VOIP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZHONE-COM-VOIP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:41:09 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") applIndex, = mibBuilder.importSymbols("NETWORK-SERVICES-MIB", "applIndex") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") TimeTicks, NotificationType, iso, ModuleIdentity, ObjectIdentity, Bits, Counter64, Integer32, Unsigned32, IpAddress, Gauge32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "NotificationType", "iso", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter64", "Integer32", "Unsigned32", "IpAddress", "Gauge32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32") TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention") ZhoneCodecType, = mibBuilder.importSymbols("ZHONE-GEN-SUBSCRIBER", "ZhoneCodecType") zhoneVoice, = mibBuilder.importSymbols("Zhone", "zhoneVoice") ZhoneRowStatus, = mibBuilder.importSymbols("Zhone-TC", "ZhoneRowStatus") zhoneVoip = ModuleIdentity((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4)) zhoneVoip.setRevisions(('2014-10-16 23:33', '2014-08-26 10:40', '2014-07-03 02:40', '2014-06-16 21:40', '2014-05-22 14:09', '2014-01-02 22:13', '2012-09-17 23:42', '2012-09-17 23:39', '2011-12-22 02:24', '2011-10-20 12:14', '2011-07-25 11:44', '2009-10-07 01:41', '2009-03-21 02:08', '2008-10-31 01:12', '2008-08-27 23:02', '2008-06-11 17:40', '2007-07-16 02:45', '2006-04-13 15:53', '2005-10-11 11:46', '2005-07-12 10:25', '2005-07-07 16:06', '2005-07-07 15:12', '2005-06-01 11:09', '2005-05-19 15:46', '2005-05-14 21:24', '2005-02-28 10:49', '2004-11-01 14:34', '2004-03-03 17:40', '2004-02-24 12:36', '2004-01-06 15:37', '2003-11-06 10:08', '2003-10-16 14:53', '2003-08-27 11:30', '2003-08-08 17:19', '2003-05-28 12:00', '2003-03-31 18:03', '2003-02-18 14:32',)) if mibBuilder.loadTexts: zhoneVoip.setLastUpdated('201408261040Z') if mibBuilder.loadTexts: zhoneVoip.setOrganization('Zhone Technologies.') zhoneVoipSystem = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1)) if mibBuilder.loadTexts: zhoneVoipSystem.setStatus('deprecated') zhoneVoipSystemProtocol = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("sip", 1), ("mgcp", 2))).clone('sip')).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneVoipSystemProtocol.setStatus('deprecated') zhoneVoipSystemSendCallProceedingTone = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipSystemSendCallProceedingTone.setStatus('deprecated') zhoneVoipSystemRtcpEnabled = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipSystemRtcpEnabled.setStatus('deprecated') zhoneVoipSystemRtcpPacketInterval = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2500, 10000)).clone(5000)).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipSystemRtcpPacketInterval.setStatus('deprecated') zhoneVoipSystemInterdigitTimeout = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 5), Integer32().clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipSystemInterdigitTimeout.setStatus('deprecated') zhoneVoipSystemIpTos = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipSystemIpTos.setStatus('deprecated') zhoneVoipSystemDomainName = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 7), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneVoipSystemDomainName.setStatus('deprecated') zhoneVoipObjects = ObjectGroup((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 2)).setObjects(("ZHONE-COM-VOIP-MIB", "nextVoipSipDialPlanId"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialString"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialIpAddr"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialPlanRowStatus"), ("ZHONE-COM-VOIP-MIB", "nextZhoneVoipHuntGroupId"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipHuntGroupDestUri"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipHuntGroupRowStatus"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialPrefixAdd"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialPrefixStrip"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialNumOfDigits"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialDestName"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipHuntGroupPortMembers"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipHuntGroupDefaultCodec"), ("ZHONE-COM-VOIP-MIB", "nextVoipMaliciousCallerId"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipMaliciousCallerUri"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerId"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerUdpPortNumber"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerAddr"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerAddrType"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerRowStatus"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialPlanType"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionTimer"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionExpiration"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionMinSE"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionCallerReqTimer"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionCalleeReqTimer"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionCallerSpecifyRefresher"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerSessionCalleeSpecifyRefresher"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerExpiresInvite"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerExpiresRegister"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerHeaderMethod"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipMaliciousCallerRowStatus"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipMaliciousCallerEnable"), ("ZHONE-COM-VOIP-MIB", "zhoneVoipServerBehaviorStringOne")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): zhoneVoipObjects = zhoneVoipObjects.setStatus('current') zhoneVoipSipDialPlan = MibIdentifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3)) nextVoipSipDialPlanId = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nextVoipSipDialPlanId.setStatus('current') zhoneVoipSipDialPlanTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2), ) if mibBuilder.loadTexts: zhoneVoipSipDialPlanTable.setStatus('current') zhoneVoipSipDialPlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1), ).setIndexNames((0, "ZHONE-COM-VOIP-MIB", "zhoneVoipSipDialPlanId")) if mibBuilder.loadTexts: zhoneVoipSipDialPlanEntry.setStatus('current') zhoneVoipSipDialPlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: zhoneVoipSipDialPlanId.setStatus('current') zhoneVoipSipDialString = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 128))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialString.setStatus('current') zhoneVoipSipDialIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialIpAddr.setStatus('current') zhoneVoipSipDialPlanRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 4), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialPlanRowStatus.setStatus('current') zhoneVoipSipDialDestName = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 5), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialDestName.setStatus('current') zhoneVoipSipDialNumOfDigits = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialNumOfDigits.setStatus('current') zhoneVoipSipDialPrefixStrip = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialPrefixStrip.setStatus('current') zhoneVoipSipDialPrefixAdd = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 8), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialPrefixAdd.setStatus('current') zhoneVoipSipDialPlanType = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("normal", 1), ("callpark", 2), ("esa", 3), ("isdnsig", 4), ("intercom", 5))).clone('normal')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialPlanType.setStatus('current') zhoneVoipServerEntryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerEntryIndex.setStatus('current') zhoneVoipOverrideInterdigitTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 11), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipOverrideInterdigitTimeout.setStatus('current') zhoneVoipSipDialPlanClass = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 12), Bits().clone(namedValues=NamedValues(("emergency", 0)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSipDialPlanClass.setStatus('current') zhoneVoipSipDialPlanDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 13), SnmpAdminString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipSipDialPlanDescription.setStatus('current') zhoneVoipHuntGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4)) nextZhoneVoipHuntGroupId = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nextZhoneVoipHuntGroupId.setStatus('current') zhoneVoipHuntGroupTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3), ) if mibBuilder.loadTexts: zhoneVoipHuntGroupTable.setStatus('current') zhoneVoipHuntGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1), ).setIndexNames((0, "ZHONE-COM-VOIP-MIB", "zhoneVoipHuntGroupId")) if mibBuilder.loadTexts: zhoneVoipHuntGroupEntry.setStatus('current') zhoneVoipHuntGroupId = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: zhoneVoipHuntGroupId.setStatus('current') zhoneVoipHuntGroupDestUri = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 128))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipHuntGroupDestUri.setStatus('current') zhoneVoipHuntGroupDefaultCodec = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 3), ZhoneCodecType().clone('g711mu')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipHuntGroupDefaultCodec.setStatus('current') zhoneVoipHuntGroupPortMembers = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 4), Bits().clone(namedValues=NamedValues(("port1", 0), ("port2", 1), ("port3", 2), ("port4", 3), ("port5", 4), ("port6", 5), ("port7", 6), ("port8", 7), ("port9", 8), ("port10", 9), ("port11", 10), ("port12", 11), ("port13", 12), ("port14", 13), ("port15", 14), ("port16", 15), ("port17", 16), ("port18", 17), ("port19", 18), ("port20", 19), ("port21", 20), ("port22", 21), ("port23", 22), ("port24", 23)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipHuntGroupPortMembers.setStatus('current') zhoneVoipHuntGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 5), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipHuntGroupRowStatus.setStatus('current') zhoneVoipMaliciousCaller = MibIdentifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5)) nextVoipMaliciousCallerId = MibScalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: nextVoipMaliciousCallerId.setStatus('current') zhoneVoipMaliciousCallerTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2), ) if mibBuilder.loadTexts: zhoneVoipMaliciousCallerTable.setStatus('current') zhoneVoipMaliciousCallerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1), ).setIndexNames((0, "ZHONE-COM-VOIP-MIB", "zhoneVoipMaliciousCallerId")) if mibBuilder.loadTexts: zhoneVoipMaliciousCallerEntry.setStatus('current') zhoneVoipMaliciousCallerId = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: zhoneVoipMaliciousCallerId.setStatus('current') zhoneVoipMaliciousCallerUri = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 2), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipMaliciousCallerUri.setStatus('current') zhoneVoipMaliciousCallerEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 3), TruthValue().clone('true')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipMaliciousCallerEnable.setStatus('current') zhoneVoipMaliciousCallerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 4), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipMaliciousCallerRowStatus.setStatus('current') zhoneVoipServerCfg = MibIdentifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6)) zhoneVoipServerTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1), ) if mibBuilder.loadTexts: zhoneVoipServerTable.setStatus('current') zhoneVoipServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1), ).setIndexNames((0, "NETWORK-SERVICES-MIB", "applIndex"), (0, "ZHONE-COM-VOIP-MIB", "zhoneVoipServerAddressIndex")) if mibBuilder.loadTexts: zhoneVoipServerEntry.setStatus('current') zhoneVoipServerAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 1), Unsigned32()) if mibBuilder.loadTexts: zhoneVoipServerAddressIndex.setStatus('current') zhoneVoipServerRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 2), ZhoneRowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerRowStatus.setStatus('current') zhoneVoipServerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 3), InetAddressType().clone('ipv4')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerAddrType.setStatus('current') zhoneVoipServerAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 4), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerAddr.setStatus('current') zhoneVoipServerUdpPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(2427)).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerUdpPortNumber.setStatus('current') zhoneVoipServerId = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38))).clone(namedValues=NamedValues(("longboard", 1), ("asterisk", 2), ("sipexpressrouter", 3), ("metaswitch", 4), ("sylantro", 5), ("broadsoft", 6), ("ubiquity", 7), ("generalbandwidth", 8), ("tekelec-T6000", 9), ("generic", 10), ("sonus", 11), ("siemens", 12), ("tekelec-T9000", 13), ("lucent-telica", 14), ("nortel-cs2000", 15), ("nuera", 16), ("lucent-imerge", 17), ("coppercom", 18), ("newcross", 19), ("cisco-bts", 20), ("cirpack-utp", 21), ("italtel-issw", 22), ("cisco-pgw", 23), ("microtrol-msk10", 24), ("nortel-dms10", 25), ("verso-clarent-c5cm", 26), ("cedarpoint-safari", 27), ("huawei-softx3000", 28), ("nortel-cs1500", 29), ("taqua-t7000", 30), ("utstarcom-mswitch", 31), ("broadsoft-broadworks", 32), ("broadsoft-m6", 33), ("genband-g9", 34), ("netcentrex", 35), ("genband-g6", 36), ("alu-5060", 37), ("ericsson-apz60", 38))).clone('generic')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerId.setStatus('current') zhoneVoipServerProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("sip", 1), ("mgcp", 2), ("megaco", 3), ("ncs", 4))).clone('sip')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerProtocol.setStatus('current') zhoneVoipServerSendCallProceedingTone = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 8), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSendCallProceedingTone.setStatus('current') zhoneVoipServerRtcpEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 9), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerRtcpEnabled.setStatus('current') zhoneVoipServerRtcpPacketInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 10), Integer32().clone(5000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerRtcpPacketInterval.setStatus('current') zhoneVoipServerInterDigitTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 11), Integer32().clone(10)).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerInterDigitTimeout.setStatus('current') zhoneVoipServerIpTos = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 12), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerIpTos.setStatus('current') zhoneVoipServerDomainName = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 13), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerDomainName.setStatus('current') zhoneVoipServerExpiresInvite = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 14), Unsigned32()).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerExpiresInvite.setStatus('current') zhoneVoipServerExpiresRegister = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 15), Unsigned32()).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerExpiresRegister.setStatus('current') zhoneVoipServerHeaderMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 16), Bits().clone(namedValues=NamedValues(("invite", 0), ("register", 1)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerHeaderMethod.setStatus('current') zhoneVoipServerSessionTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2))).clone('off')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionTimer.setStatus('current') zhoneVoipServerSessionExpiration = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(90, 2147483647)).clone(180)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionExpiration.setStatus('current') zhoneVoipServerSessionMinSE = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 19), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(90, 2147483647)).clone(180)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionMinSE.setStatus('current') zhoneVoipServerSessionCallerReqTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2))).clone('no')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionCallerReqTimer.setStatus('current') zhoneVoipServerSessionCalleeReqTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2))).clone('no')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionCalleeReqTimer.setStatus('current') zhoneVoipServerSessionCallerSpecifyRefresher = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("uac", 1), ("uas", 2), ("omit", 3))).clone('omit')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionCallerSpecifyRefresher.setStatus('current') zhoneVoipServerSessionCalleeSpecifyRefresher = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("uac", 1), ("uas", 2))).clone('uac')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSessionCalleeSpecifyRefresher.setStatus('current') zhoneVoipServerDtmfMode = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inband", 1), ("rfc2833", 2), ("rfc2833only", 3))).clone('rfc2833')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerDtmfMode.setStatus('current') zhoneVoipServerBehaviorStringOne = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 25), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 512))).setUnits('characters').setMaxAccess("readonly") if mibBuilder.loadTexts: zhoneVoipServerBehaviorStringOne.setStatus('current') zhoneVoipServerRtpTermIdSyntax = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 26), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 96))).setUnits('characters').setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipServerRtpTermIdSyntax.setStatus('current') zhoneVoipServerRtpDSCP = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 27), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 8))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerRtpDSCP.setStatus('current') zhoneVoipServerSignalingDSCP = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 28), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 8))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerSignalingDSCP.setStatus('current') zhoneVoipServerDtmfPayloadId = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(96, 127)).clone(101)).setMaxAccess("readwrite") if mibBuilder.loadTexts: zhoneVoipServerDtmfPayloadId.setStatus('current') zhoneVoipServerRegisterReadyTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 30), Unsigned32().clone(10)).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerRegisterReadyTimeout.setStatus('current') zhoneVoipServerMessageRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 31), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerMessageRetryCount.setStatus('current') zhoneVoipServerFeatures = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 32), Bits().clone(namedValues=NamedValues(("sip-outbound", 0), ("gruu", 1)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerFeatures.setStatus('current') zhoneVoipServerTransportProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("udp", 1), ("tcp", 2))).clone('udp')).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipServerTransportProtocol.setStatus('current') zhoneVoipSigLocalPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 34), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(5060)).setMaxAccess("readcreate") if mibBuilder.loadTexts: zhoneVoipSigLocalPortNumber.setStatus('current') mibBuilder.exportSymbols("ZHONE-COM-VOIP-MIB", nextZhoneVoipHuntGroupId=nextZhoneVoipHuntGroupId, PYSNMP_MODULE_ID=zhoneVoip, zhoneVoipHuntGroupRowStatus=zhoneVoipHuntGroupRowStatus, zhoneVoipServerSessionCalleeReqTimer=zhoneVoipServerSessionCalleeReqTimer, zhoneVoipHuntGroupEntry=zhoneVoipHuntGroupEntry, zhoneVoipHuntGroupId=zhoneVoipHuntGroupId, zhoneVoipServerDomainName=zhoneVoipServerDomainName, zhoneVoipServerSendCallProceedingTone=zhoneVoipServerSendCallProceedingTone, zhoneVoipSigLocalPortNumber=zhoneVoipSigLocalPortNumber, zhoneVoipServerTransportProtocol=zhoneVoipServerTransportProtocol, zhoneVoipServerRtcpEnabled=zhoneVoipServerRtcpEnabled, nextVoipMaliciousCallerId=nextVoipMaliciousCallerId, zhoneVoipServerDtmfPayloadId=zhoneVoipServerDtmfPayloadId, zhoneVoipServerCfg=zhoneVoipServerCfg, zhoneVoipServerRowStatus=zhoneVoipServerRowStatus, zhoneVoipSystemRtcpPacketInterval=zhoneVoipSystemRtcpPacketInterval, zhoneVoipSystemDomainName=zhoneVoipSystemDomainName, zhoneVoipSystemIpTos=zhoneVoipSystemIpTos, zhoneVoipServerSessionTimer=zhoneVoipServerSessionTimer, zhoneVoipSystemSendCallProceedingTone=zhoneVoipSystemSendCallProceedingTone, zhoneVoipHuntGroupTable=zhoneVoipHuntGroupTable, zhoneVoipServerEntryIndex=zhoneVoipServerEntryIndex, zhoneVoipServerSessionCalleeSpecifyRefresher=zhoneVoipServerSessionCalleeSpecifyRefresher, zhoneVoipServerRtpTermIdSyntax=zhoneVoipServerRtpTermIdSyntax, zhoneVoipServerFeatures=zhoneVoipServerFeatures, zhoneVoipServerRtpDSCP=zhoneVoipServerRtpDSCP, zhoneVoipServerHeaderMethod=zhoneVoipServerHeaderMethod, zhoneVoipSystem=zhoneVoipSystem, zhoneVoipServerExpiresRegister=zhoneVoipServerExpiresRegister, zhoneVoipMaliciousCallerRowStatus=zhoneVoipMaliciousCallerRowStatus, zhoneVoipServerAddrType=zhoneVoipServerAddrType, zhoneVoipSipDialPrefixStrip=zhoneVoipSipDialPrefixStrip, zhoneVoipServerAddressIndex=zhoneVoipServerAddressIndex, zhoneVoipServerId=zhoneVoipServerId, zhoneVoipSipDialPlanTable=zhoneVoipSipDialPlanTable, zhoneVoipHuntGroupDestUri=zhoneVoipHuntGroupDestUri, zhoneVoipServerSessionMinSE=zhoneVoipServerSessionMinSE, zhoneVoip=zhoneVoip, zhoneVoipOverrideInterdigitTimeout=zhoneVoipOverrideInterdigitTimeout, zhoneVoipSystemRtcpEnabled=zhoneVoipSystemRtcpEnabled, zhoneVoipSipDialIpAddr=zhoneVoipSipDialIpAddr, zhoneVoipSipDialPlanEntry=zhoneVoipSipDialPlanEntry, zhoneVoipServerMessageRetryCount=zhoneVoipServerMessageRetryCount, zhoneVoipSipDialNumOfDigits=zhoneVoipSipDialNumOfDigits, zhoneVoipServerSessionCallerReqTimer=zhoneVoipServerSessionCallerReqTimer, zhoneVoipSipDialPlanRowStatus=zhoneVoipSipDialPlanRowStatus, zhoneVoipServerRegisterReadyTimeout=zhoneVoipServerRegisterReadyTimeout, zhoneVoipServerDtmfMode=zhoneVoipServerDtmfMode, zhoneVoipServerSignalingDSCP=zhoneVoipServerSignalingDSCP, zhoneVoipMaliciousCallerUri=zhoneVoipMaliciousCallerUri, zhoneVoipServerAddr=zhoneVoipServerAddr, zhoneVoipServerSessionCallerSpecifyRefresher=zhoneVoipServerSessionCallerSpecifyRefresher, zhoneVoipSipDialPlanId=zhoneVoipSipDialPlanId, zhoneVoipServerIpTos=zhoneVoipServerIpTos, zhoneVoipSipDialDestName=zhoneVoipSipDialDestName, zhoneVoipServerUdpPortNumber=zhoneVoipServerUdpPortNumber, zhoneVoipSipDialPlanType=zhoneVoipSipDialPlanType, zhoneVoipServerBehaviorStringOne=zhoneVoipServerBehaviorStringOne, zhoneVoipHuntGroupPortMembers=zhoneVoipHuntGroupPortMembers, zhoneVoipServerRtcpPacketInterval=zhoneVoipServerRtcpPacketInterval, zhoneVoipServerInterDigitTimeout=zhoneVoipServerInterDigitTimeout, zhoneVoipSipDialPlanDescription=zhoneVoipSipDialPlanDescription, zhoneVoipServerEntry=zhoneVoipServerEntry, zhoneVoipHuntGroup=zhoneVoipHuntGroup, zhoneVoipMaliciousCallerId=zhoneVoipMaliciousCallerId, zhoneVoipSipDialPlanClass=zhoneVoipSipDialPlanClass, zhoneVoipSystemProtocol=zhoneVoipSystemProtocol, zhoneVoipMaliciousCallerTable=zhoneVoipMaliciousCallerTable, zhoneVoipServerExpiresInvite=zhoneVoipServerExpiresInvite, zhoneVoipSipDialPlan=zhoneVoipSipDialPlan, zhoneVoipObjects=zhoneVoipObjects, zhoneVoipMaliciousCallerEntry=zhoneVoipMaliciousCallerEntry, zhoneVoipHuntGroupDefaultCodec=zhoneVoipHuntGroupDefaultCodec, zhoneVoipServerSessionExpiration=zhoneVoipServerSessionExpiration, nextVoipSipDialPlanId=nextVoipSipDialPlanId, zhoneVoipServerTable=zhoneVoipServerTable, zhoneVoipMaliciousCaller=zhoneVoipMaliciousCaller, zhoneVoipSipDialPrefixAdd=zhoneVoipSipDialPrefixAdd, zhoneVoipMaliciousCallerEnable=zhoneVoipMaliciousCallerEnable, zhoneVoipSystemInterdigitTimeout=zhoneVoipSystemInterdigitTimeout, zhoneVoipServerProtocol=zhoneVoipServerProtocol, zhoneVoipSipDialString=zhoneVoipSipDialString)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, single_value_constraint, value_size_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion') (inet_address, inet_address_type) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddress', 'InetAddressType') (appl_index,) = mibBuilder.importSymbols('NETWORK-SERVICES-MIB', 'applIndex') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (time_ticks, notification_type, iso, module_identity, object_identity, bits, counter64, integer32, unsigned32, ip_address, gauge32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'NotificationType', 'iso', 'ModuleIdentity', 'ObjectIdentity', 'Bits', 'Counter64', 'Integer32', 'Unsigned32', 'IpAddress', 'Gauge32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32') (truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention') (zhone_codec_type,) = mibBuilder.importSymbols('ZHONE-GEN-SUBSCRIBER', 'ZhoneCodecType') (zhone_voice,) = mibBuilder.importSymbols('Zhone', 'zhoneVoice') (zhone_row_status,) = mibBuilder.importSymbols('Zhone-TC', 'ZhoneRowStatus') zhone_voip = module_identity((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4)) zhoneVoip.setRevisions(('2014-10-16 23:33', '2014-08-26 10:40', '2014-07-03 02:40', '2014-06-16 21:40', '2014-05-22 14:09', '2014-01-02 22:13', '2012-09-17 23:42', '2012-09-17 23:39', '2011-12-22 02:24', '2011-10-20 12:14', '2011-07-25 11:44', '2009-10-07 01:41', '2009-03-21 02:08', '2008-10-31 01:12', '2008-08-27 23:02', '2008-06-11 17:40', '2007-07-16 02:45', '2006-04-13 15:53', '2005-10-11 11:46', '2005-07-12 10:25', '2005-07-07 16:06', '2005-07-07 15:12', '2005-06-01 11:09', '2005-05-19 15:46', '2005-05-14 21:24', '2005-02-28 10:49', '2004-11-01 14:34', '2004-03-03 17:40', '2004-02-24 12:36', '2004-01-06 15:37', '2003-11-06 10:08', '2003-10-16 14:53', '2003-08-27 11:30', '2003-08-08 17:19', '2003-05-28 12:00', '2003-03-31 18:03', '2003-02-18 14:32')) if mibBuilder.loadTexts: zhoneVoip.setLastUpdated('201408261040Z') if mibBuilder.loadTexts: zhoneVoip.setOrganization('Zhone Technologies.') zhone_voip_system = object_identity((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1)) if mibBuilder.loadTexts: zhoneVoipSystem.setStatus('deprecated') zhone_voip_system_protocol = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('sip', 1), ('mgcp', 2))).clone('sip')).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneVoipSystemProtocol.setStatus('deprecated') zhone_voip_system_send_call_proceeding_tone = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 2), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipSystemSendCallProceedingTone.setStatus('deprecated') zhone_voip_system_rtcp_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 3), truth_value().clone('false')).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipSystemRtcpEnabled.setStatus('deprecated') zhone_voip_system_rtcp_packet_interval = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(2500, 10000)).clone(5000)).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipSystemRtcpPacketInterval.setStatus('deprecated') zhone_voip_system_interdigit_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 5), integer32().clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipSystemInterdigitTimeout.setStatus('deprecated') zhone_voip_system_ip_tos = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipSystemIpTos.setStatus('deprecated') zhone_voip_system_domain_name = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 1, 7), snmp_admin_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneVoipSystemDomainName.setStatus('deprecated') zhone_voip_objects = object_group((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 2)).setObjects(('ZHONE-COM-VOIP-MIB', 'nextVoipSipDialPlanId'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialString'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialIpAddr'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialPlanRowStatus'), ('ZHONE-COM-VOIP-MIB', 'nextZhoneVoipHuntGroupId'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipHuntGroupDestUri'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipHuntGroupRowStatus'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialPrefixAdd'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialPrefixStrip'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialNumOfDigits'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialDestName'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipHuntGroupPortMembers'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipHuntGroupDefaultCodec'), ('ZHONE-COM-VOIP-MIB', 'nextVoipMaliciousCallerId'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipMaliciousCallerUri'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerId'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerUdpPortNumber'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerAddr'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerAddrType'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerRowStatus'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialPlanType'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionTimer'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionExpiration'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionMinSE'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionCallerReqTimer'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionCalleeReqTimer'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionCallerSpecifyRefresher'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerSessionCalleeSpecifyRefresher'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerExpiresInvite'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerExpiresRegister'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerHeaderMethod'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipMaliciousCallerRowStatus'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipMaliciousCallerEnable'), ('ZHONE-COM-VOIP-MIB', 'zhoneVoipServerBehaviorStringOne')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): zhone_voip_objects = zhoneVoipObjects.setStatus('current') zhone_voip_sip_dial_plan = mib_identifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3)) next_voip_sip_dial_plan_id = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: nextVoipSipDialPlanId.setStatus('current') zhone_voip_sip_dial_plan_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2)) if mibBuilder.loadTexts: zhoneVoipSipDialPlanTable.setStatus('current') zhone_voip_sip_dial_plan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1)).setIndexNames((0, 'ZHONE-COM-VOIP-MIB', 'zhoneVoipSipDialPlanId')) if mibBuilder.loadTexts: zhoneVoipSipDialPlanEntry.setStatus('current') zhone_voip_sip_dial_plan_id = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: zhoneVoipSipDialPlanId.setStatus('current') zhone_voip_sip_dial_string = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 128))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialString.setStatus('current') zhone_voip_sip_dial_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 3), ip_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialIpAddr.setStatus('current') zhone_voip_sip_dial_plan_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 4), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialPlanRowStatus.setStatus('current') zhone_voip_sip_dial_dest_name = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 5), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialDestName.setStatus('current') zhone_voip_sip_dial_num_of_digits = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 32))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialNumOfDigits.setStatus('current') zhone_voip_sip_dial_prefix_strip = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 32))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialPrefixStrip.setStatus('current') zhone_voip_sip_dial_prefix_add = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 8), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialPrefixAdd.setStatus('current') zhone_voip_sip_dial_plan_type = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('normal', 1), ('callpark', 2), ('esa', 3), ('isdnsig', 4), ('intercom', 5))).clone('normal')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialPlanType.setStatus('current') zhone_voip_server_entry_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerEntryIndex.setStatus('current') zhone_voip_override_interdigit_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 11), integer32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipOverrideInterdigitTimeout.setStatus('current') zhone_voip_sip_dial_plan_class = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 12), bits().clone(namedValues=named_values(('emergency', 0)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSipDialPlanClass.setStatus('current') zhone_voip_sip_dial_plan_description = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 3, 2, 1, 13), snmp_admin_string()).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipSipDialPlanDescription.setStatus('current') zhone_voip_hunt_group = mib_identifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4)) next_zhone_voip_hunt_group_id = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: nextZhoneVoipHuntGroupId.setStatus('current') zhone_voip_hunt_group_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3)) if mibBuilder.loadTexts: zhoneVoipHuntGroupTable.setStatus('current') zhone_voip_hunt_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1)).setIndexNames((0, 'ZHONE-COM-VOIP-MIB', 'zhoneVoipHuntGroupId')) if mibBuilder.loadTexts: zhoneVoipHuntGroupEntry.setStatus('current') zhone_voip_hunt_group_id = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: zhoneVoipHuntGroupId.setStatus('current') zhone_voip_hunt_group_dest_uri = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 128))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipHuntGroupDestUri.setStatus('current') zhone_voip_hunt_group_default_codec = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 3), zhone_codec_type().clone('g711mu')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipHuntGroupDefaultCodec.setStatus('current') zhone_voip_hunt_group_port_members = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 4), bits().clone(namedValues=named_values(('port1', 0), ('port2', 1), ('port3', 2), ('port4', 3), ('port5', 4), ('port6', 5), ('port7', 6), ('port8', 7), ('port9', 8), ('port10', 9), ('port11', 10), ('port12', 11), ('port13', 12), ('port14', 13), ('port15', 14), ('port16', 15), ('port17', 16), ('port18', 17), ('port19', 18), ('port20', 19), ('port21', 20), ('port22', 21), ('port23', 22), ('port24', 23)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipHuntGroupPortMembers.setStatus('current') zhone_voip_hunt_group_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 4, 3, 1, 5), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipHuntGroupRowStatus.setStatus('current') zhone_voip_malicious_caller = mib_identifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5)) next_voip_malicious_caller_id = mib_scalar((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: nextVoipMaliciousCallerId.setStatus('current') zhone_voip_malicious_caller_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2)) if mibBuilder.loadTexts: zhoneVoipMaliciousCallerTable.setStatus('current') zhone_voip_malicious_caller_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1)).setIndexNames((0, 'ZHONE-COM-VOIP-MIB', 'zhoneVoipMaliciousCallerId')) if mibBuilder.loadTexts: zhoneVoipMaliciousCallerEntry.setStatus('current') zhone_voip_malicious_caller_id = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))) if mibBuilder.loadTexts: zhoneVoipMaliciousCallerId.setStatus('current') zhone_voip_malicious_caller_uri = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 2), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipMaliciousCallerUri.setStatus('current') zhone_voip_malicious_caller_enable = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 3), truth_value().clone('true')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipMaliciousCallerEnable.setStatus('current') zhone_voip_malicious_caller_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 5, 2, 1, 4), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipMaliciousCallerRowStatus.setStatus('current') zhone_voip_server_cfg = mib_identifier((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6)) zhone_voip_server_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1)) if mibBuilder.loadTexts: zhoneVoipServerTable.setStatus('current') zhone_voip_server_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1)).setIndexNames((0, 'NETWORK-SERVICES-MIB', 'applIndex'), (0, 'ZHONE-COM-VOIP-MIB', 'zhoneVoipServerAddressIndex')) if mibBuilder.loadTexts: zhoneVoipServerEntry.setStatus('current') zhone_voip_server_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 1), unsigned32()) if mibBuilder.loadTexts: zhoneVoipServerAddressIndex.setStatus('current') zhone_voip_server_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 2), zhone_row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerRowStatus.setStatus('current') zhone_voip_server_addr_type = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 3), inet_address_type().clone('ipv4')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerAddrType.setStatus('current') zhone_voip_server_addr = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 4), inet_address()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerAddr.setStatus('current') zhone_voip_server_udp_port_number = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(2427)).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerUdpPortNumber.setStatus('current') zhone_voip_server_id = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38))).clone(namedValues=named_values(('longboard', 1), ('asterisk', 2), ('sipexpressrouter', 3), ('metaswitch', 4), ('sylantro', 5), ('broadsoft', 6), ('ubiquity', 7), ('generalbandwidth', 8), ('tekelec-T6000', 9), ('generic', 10), ('sonus', 11), ('siemens', 12), ('tekelec-T9000', 13), ('lucent-telica', 14), ('nortel-cs2000', 15), ('nuera', 16), ('lucent-imerge', 17), ('coppercom', 18), ('newcross', 19), ('cisco-bts', 20), ('cirpack-utp', 21), ('italtel-issw', 22), ('cisco-pgw', 23), ('microtrol-msk10', 24), ('nortel-dms10', 25), ('verso-clarent-c5cm', 26), ('cedarpoint-safari', 27), ('huawei-softx3000', 28), ('nortel-cs1500', 29), ('taqua-t7000', 30), ('utstarcom-mswitch', 31), ('broadsoft-broadworks', 32), ('broadsoft-m6', 33), ('genband-g9', 34), ('netcentrex', 35), ('genband-g6', 36), ('alu-5060', 37), ('ericsson-apz60', 38))).clone('generic')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerId.setStatus('current') zhone_voip_server_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('sip', 1), ('mgcp', 2), ('megaco', 3), ('ncs', 4))).clone('sip')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerProtocol.setStatus('current') zhone_voip_server_send_call_proceeding_tone = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 8), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSendCallProceedingTone.setStatus('current') zhone_voip_server_rtcp_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 9), truth_value().clone('false')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerRtcpEnabled.setStatus('current') zhone_voip_server_rtcp_packet_interval = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 10), integer32().clone(5000)).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerRtcpPacketInterval.setStatus('current') zhone_voip_server_inter_digit_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 11), integer32().clone(10)).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerInterDigitTimeout.setStatus('current') zhone_voip_server_ip_tos = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 12), integer32()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerIpTos.setStatus('current') zhone_voip_server_domain_name = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 13), snmp_admin_string()).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerDomainName.setStatus('current') zhone_voip_server_expires_invite = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 14), unsigned32()).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerExpiresInvite.setStatus('current') zhone_voip_server_expires_register = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 15), unsigned32()).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerExpiresRegister.setStatus('current') zhone_voip_server_header_method = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 16), bits().clone(namedValues=named_values(('invite', 0), ('register', 1)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerHeaderMethod.setStatus('current') zhone_voip_server_session_timer = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2))).clone('off')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionTimer.setStatus('current') zhone_voip_server_session_expiration = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(90, 2147483647)).clone(180)).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionExpiration.setStatus('current') zhone_voip_server_session_min_se = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 19), unsigned32().subtype(subtypeSpec=value_range_constraint(90, 2147483647)).clone(180)).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionMinSE.setStatus('current') zhone_voip_server_session_caller_req_timer = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2))).clone('no')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionCallerReqTimer.setStatus('current') zhone_voip_server_session_callee_req_timer = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 21), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2))).clone('no')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionCalleeReqTimer.setStatus('current') zhone_voip_server_session_caller_specify_refresher = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('uac', 1), ('uas', 2), ('omit', 3))).clone('omit')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionCallerSpecifyRefresher.setStatus('current') zhone_voip_server_session_callee_specify_refresher = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('uac', 1), ('uas', 2))).clone('uac')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSessionCalleeSpecifyRefresher.setStatus('current') zhone_voip_server_dtmf_mode = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('inband', 1), ('rfc2833', 2), ('rfc2833only', 3))).clone('rfc2833')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerDtmfMode.setStatus('current') zhone_voip_server_behavior_string_one = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 25), octet_string().subtype(subtypeSpec=value_size_constraint(0, 512))).setUnits('characters').setMaxAccess('readonly') if mibBuilder.loadTexts: zhoneVoipServerBehaviorStringOne.setStatus('current') zhone_voip_server_rtp_term_id_syntax = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 26), octet_string().subtype(subtypeSpec=value_size_constraint(0, 96))).setUnits('characters').setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipServerRtpTermIdSyntax.setStatus('current') zhone_voip_server_rtp_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 27), octet_string().subtype(subtypeSpec=value_size_constraint(1, 8))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerRtpDSCP.setStatus('current') zhone_voip_server_signaling_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 28), octet_string().subtype(subtypeSpec=value_size_constraint(1, 8))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerSignalingDSCP.setStatus('current') zhone_voip_server_dtmf_payload_id = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(96, 127)).clone(101)).setMaxAccess('readwrite') if mibBuilder.loadTexts: zhoneVoipServerDtmfPayloadId.setStatus('current') zhone_voip_server_register_ready_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 30), unsigned32().clone(10)).setUnits('seconds').setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerRegisterReadyTimeout.setStatus('current') zhone_voip_server_message_retry_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 31), integer32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(1)).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerMessageRetryCount.setStatus('current') zhone_voip_server_features = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 32), bits().clone(namedValues=named_values(('sip-outbound', 0), ('gruu', 1)))).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerFeatures.setStatus('current') zhone_voip_server_transport_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 33), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('udp', 1), ('tcp', 2))).clone('udp')).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipServerTransportProtocol.setStatus('current') zhone_voip_sig_local_port_number = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 4, 3, 4, 6, 1, 1, 34), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(5060)).setMaxAccess('readcreate') if mibBuilder.loadTexts: zhoneVoipSigLocalPortNumber.setStatus('current') mibBuilder.exportSymbols('ZHONE-COM-VOIP-MIB', nextZhoneVoipHuntGroupId=nextZhoneVoipHuntGroupId, PYSNMP_MODULE_ID=zhoneVoip, zhoneVoipHuntGroupRowStatus=zhoneVoipHuntGroupRowStatus, zhoneVoipServerSessionCalleeReqTimer=zhoneVoipServerSessionCalleeReqTimer, zhoneVoipHuntGroupEntry=zhoneVoipHuntGroupEntry, zhoneVoipHuntGroupId=zhoneVoipHuntGroupId, zhoneVoipServerDomainName=zhoneVoipServerDomainName, zhoneVoipServerSendCallProceedingTone=zhoneVoipServerSendCallProceedingTone, zhoneVoipSigLocalPortNumber=zhoneVoipSigLocalPortNumber, zhoneVoipServerTransportProtocol=zhoneVoipServerTransportProtocol, zhoneVoipServerRtcpEnabled=zhoneVoipServerRtcpEnabled, nextVoipMaliciousCallerId=nextVoipMaliciousCallerId, zhoneVoipServerDtmfPayloadId=zhoneVoipServerDtmfPayloadId, zhoneVoipServerCfg=zhoneVoipServerCfg, zhoneVoipServerRowStatus=zhoneVoipServerRowStatus, zhoneVoipSystemRtcpPacketInterval=zhoneVoipSystemRtcpPacketInterval, zhoneVoipSystemDomainName=zhoneVoipSystemDomainName, zhoneVoipSystemIpTos=zhoneVoipSystemIpTos, zhoneVoipServerSessionTimer=zhoneVoipServerSessionTimer, zhoneVoipSystemSendCallProceedingTone=zhoneVoipSystemSendCallProceedingTone, zhoneVoipHuntGroupTable=zhoneVoipHuntGroupTable, zhoneVoipServerEntryIndex=zhoneVoipServerEntryIndex, zhoneVoipServerSessionCalleeSpecifyRefresher=zhoneVoipServerSessionCalleeSpecifyRefresher, zhoneVoipServerRtpTermIdSyntax=zhoneVoipServerRtpTermIdSyntax, zhoneVoipServerFeatures=zhoneVoipServerFeatures, zhoneVoipServerRtpDSCP=zhoneVoipServerRtpDSCP, zhoneVoipServerHeaderMethod=zhoneVoipServerHeaderMethod, zhoneVoipSystem=zhoneVoipSystem, zhoneVoipServerExpiresRegister=zhoneVoipServerExpiresRegister, zhoneVoipMaliciousCallerRowStatus=zhoneVoipMaliciousCallerRowStatus, zhoneVoipServerAddrType=zhoneVoipServerAddrType, zhoneVoipSipDialPrefixStrip=zhoneVoipSipDialPrefixStrip, zhoneVoipServerAddressIndex=zhoneVoipServerAddressIndex, zhoneVoipServerId=zhoneVoipServerId, zhoneVoipSipDialPlanTable=zhoneVoipSipDialPlanTable, zhoneVoipHuntGroupDestUri=zhoneVoipHuntGroupDestUri, zhoneVoipServerSessionMinSE=zhoneVoipServerSessionMinSE, zhoneVoip=zhoneVoip, zhoneVoipOverrideInterdigitTimeout=zhoneVoipOverrideInterdigitTimeout, zhoneVoipSystemRtcpEnabled=zhoneVoipSystemRtcpEnabled, zhoneVoipSipDialIpAddr=zhoneVoipSipDialIpAddr, zhoneVoipSipDialPlanEntry=zhoneVoipSipDialPlanEntry, zhoneVoipServerMessageRetryCount=zhoneVoipServerMessageRetryCount, zhoneVoipSipDialNumOfDigits=zhoneVoipSipDialNumOfDigits, zhoneVoipServerSessionCallerReqTimer=zhoneVoipServerSessionCallerReqTimer, zhoneVoipSipDialPlanRowStatus=zhoneVoipSipDialPlanRowStatus, zhoneVoipServerRegisterReadyTimeout=zhoneVoipServerRegisterReadyTimeout, zhoneVoipServerDtmfMode=zhoneVoipServerDtmfMode, zhoneVoipServerSignalingDSCP=zhoneVoipServerSignalingDSCP, zhoneVoipMaliciousCallerUri=zhoneVoipMaliciousCallerUri, zhoneVoipServerAddr=zhoneVoipServerAddr, zhoneVoipServerSessionCallerSpecifyRefresher=zhoneVoipServerSessionCallerSpecifyRefresher, zhoneVoipSipDialPlanId=zhoneVoipSipDialPlanId, zhoneVoipServerIpTos=zhoneVoipServerIpTos, zhoneVoipSipDialDestName=zhoneVoipSipDialDestName, zhoneVoipServerUdpPortNumber=zhoneVoipServerUdpPortNumber, zhoneVoipSipDialPlanType=zhoneVoipSipDialPlanType, zhoneVoipServerBehaviorStringOne=zhoneVoipServerBehaviorStringOne, zhoneVoipHuntGroupPortMembers=zhoneVoipHuntGroupPortMembers, zhoneVoipServerRtcpPacketInterval=zhoneVoipServerRtcpPacketInterval, zhoneVoipServerInterDigitTimeout=zhoneVoipServerInterDigitTimeout, zhoneVoipSipDialPlanDescription=zhoneVoipSipDialPlanDescription, zhoneVoipServerEntry=zhoneVoipServerEntry, zhoneVoipHuntGroup=zhoneVoipHuntGroup, zhoneVoipMaliciousCallerId=zhoneVoipMaliciousCallerId, zhoneVoipSipDialPlanClass=zhoneVoipSipDialPlanClass, zhoneVoipSystemProtocol=zhoneVoipSystemProtocol, zhoneVoipMaliciousCallerTable=zhoneVoipMaliciousCallerTable, zhoneVoipServerExpiresInvite=zhoneVoipServerExpiresInvite, zhoneVoipSipDialPlan=zhoneVoipSipDialPlan, zhoneVoipObjects=zhoneVoipObjects, zhoneVoipMaliciousCallerEntry=zhoneVoipMaliciousCallerEntry, zhoneVoipHuntGroupDefaultCodec=zhoneVoipHuntGroupDefaultCodec, zhoneVoipServerSessionExpiration=zhoneVoipServerSessionExpiration, nextVoipSipDialPlanId=nextVoipSipDialPlanId, zhoneVoipServerTable=zhoneVoipServerTable, zhoneVoipMaliciousCaller=zhoneVoipMaliciousCaller, zhoneVoipSipDialPrefixAdd=zhoneVoipSipDialPrefixAdd, zhoneVoipMaliciousCallerEnable=zhoneVoipMaliciousCallerEnable, zhoneVoipSystemInterdigitTimeout=zhoneVoipSystemInterdigitTimeout, zhoneVoipServerProtocol=zhoneVoipServerProtocol, zhoneVoipSipDialString=zhoneVoipSipDialString)
''' Created on Aug 29 2015 @author: kevin.chien@94301.ca ''' class FlamesStatus(object): def __init__(self, code, key, message): self.code = code self.key = key self.message = message def __eq__(self, other): if isinstance(other, FlamesStatus): return other.code == self.code return False def __ne__(self, other): return not self.__eq__(other) # server info status code OK = FlamesStatus(0, 'common.ok', 'OK.') # server error status code UNEXPECTED_EXCEPTION = FlamesStatus(1000001, 'common.unexpected_exception', 'Unknown Error.') UNKNOWN_RESOURCE = FlamesStatus(1000002, 'common.unknown_resource', 'Unknown Resource.') PARAMETER_VALIDATED_FAILED = FlamesStatus(1000003, 'common.parameter_validated_failed', 'Parameter validated error : {messages}') AUTH_FAILED = FlamesStatus(1000004, 'common.auth_failed', "Authorization failed : {messages}") JSON_PARSING_FAILED = FlamesStatus(1000004, 'common.json_parsing_failed', 'Parsing json string failed : {message}') USER_DUPLICATE = FlamesStatus(1080001, "user_duplicate", "'{user_id}' is existed") USER_NOT_FOUND = FlamesStatus(1080002, "user_not_found", "'{user_id}' is not found")
""" Created on Aug 29 2015 @author: kevin.chien@94301.ca """ class Flamesstatus(object): def __init__(self, code, key, message): self.code = code self.key = key self.message = message def __eq__(self, other): if isinstance(other, FlamesStatus): return other.code == self.code return False def __ne__(self, other): return not self.__eq__(other) ok = flames_status(0, 'common.ok', 'OK.') unexpected_exception = flames_status(1000001, 'common.unexpected_exception', 'Unknown Error.') unknown_resource = flames_status(1000002, 'common.unknown_resource', 'Unknown Resource.') parameter_validated_failed = flames_status(1000003, 'common.parameter_validated_failed', 'Parameter validated error : {messages}') auth_failed = flames_status(1000004, 'common.auth_failed', 'Authorization failed : {messages}') json_parsing_failed = flames_status(1000004, 'common.json_parsing_failed', 'Parsing json string failed : {message}') user_duplicate = flames_status(1080001, 'user_duplicate', "'{user_id}' is existed") user_not_found = flames_status(1080002, 'user_not_found', "'{user_id}' is not found")
#def ask_ok(prompt, retries=4, reminder='Please try again!'): #while True: #ok = input(prompt) #if ok in ('y', 'ye', 'yes'): #return True #if ok in ('n', 'no', 'nop', 'nope'): #return False #retries = retries - 1 #if retries < 0: #raise ValueError('invalid user response') #print(reminder) #ask_ok("overwrite file?") #------------------------------------------------------------------------------- #s = 9 #x = str(s) #z = x[::-1] #print(z) #-------------------------------------------------------------------------------- #Alps = range(1,5,1) #Rockies = range(1,5,1) #for a,b in zip(Alps,Rockies): #p = a*b #newRange = [p] #print(newRange) #---------------------------------------------------------------------------------- #def isPalin(n): # """Function tests whether a number is a palindrome or not""" # z = str(n) # creates a string from number,integer,etc. # s = z[::-1] # this reverses the order of the string # if z == s: # return "True" # else: # return "False" #----------------------------------------------------------------------------- #def isPalarray(x): # """Function returns a list of palindromes""" # palindromes = [] # while x < 100: # this loop adds palindromes to the list if it is one # if isPalin(x) == "True": # see isPalin definition # palindromes.append(x) # x = x + 1 # elif isPalin(x) == "False": # x = x + 1 # return(palindromes) #def iterate(t): # """Function iterate i and then j""" # myRange = [] # q = 1000 # limits the range for a # r = 1000 # limit the range for b # for b in range (899,q,1): # for a in range(899,r,1): # p = a*b # myRange.append(p) # adds p to the range "myRange" # myRange.sort() # sorts the range # v = [] # for l in myRange: # if l not in v: # creates a new list that takes away all the duplicates from the original list # v.append(l) # return (v) #y = 1 #ans = iterate(y) #print(ans) #x = 1 #u = isPalarray(x) #print(u) #------------------------------------------------------------------------------------------ #Range1 = [] #i = 3 #while i < 100: # i = i + 2 # Range1.append(i) #Range2 = [] #x = 2 #y = 1 #j = 2*(x*y) #while j < 100: # Range2.append(j) # x = x + 1 # y = y + 1 # j = 2*(x*y) #--------------------------------------------------------------------------------- #n = 20 #Alps = [] #while n != 0: # for b in range (1,21,1): # if n % b == 0: # print(n) # break # else: # n = n + 20 cubes = [0,1,2,3,4] letters = cubes print(letters) hi=[] pp=[] def splits(name): if name == hi: return("hi") elif name == pp: return("heya!") else: pass print(splits(pp))
cubes = [0, 1, 2, 3, 4] letters = cubes print(letters) hi = [] pp = [] def splits(name): if name == hi: return 'hi' elif name == pp: return 'heya!' else: pass print(splits(pp))
# with open("status.json","w") as outf: # print('{"status":"ok"}',file=outf) with open("status.json","w") as outf: print('{"status":"updating"}',file=outf)
with open('status.json', 'w') as outf: print('{"status":"updating"}', file=outf)
#Write a program that calculates how many hours an architect will need to draw projects of several construction sites. #The preparation of a project takes approximately three hours. name=input() number_of_projects=int(input()) required_hours=number_of_projects*3 print(f'The architect {name} will need {required_hours} hours to complete {number_of_projects} project/s.')
name = input() number_of_projects = int(input()) required_hours = number_of_projects * 3 print(f'The architect {name} will need {required_hours} hours to complete {number_of_projects} project/s.')
with open('day17.txt') as f: lines = [line.strip() for line in f] xmin,xmax,ymin,ymax,zmin,zmax,wmin,wmax = 0,0,0,0,0,0,0,0 active = set() for row in range(len(lines)): for col in range(len(lines[0])): if lines[row][col] == '#': xmin = min(xmin, col) xmax = max(xmax, col) ymin = min(ymin, row) ymax = max(ymax, row) active.add((col, row, 0, 0)) def count_active_neighbors(x,y,z,w): count = 0 for hyper in range(w - 1, w + 2): for layer in range(z - 1, z + 2): for row in range(y - 1, y + 2): for col in range (x - 1, x + 2): if layer == z and row == y and col == x and hyper == w: continue if (col, row, layer, hyper) in active: count += 1 return count ITER = 6 for iteration in range(ITER): active_copy = set(active) for hyper in range(wmin - 1, wmax + 2): for layer in range(zmin - 1, zmax + 2): for row in range(ymin - 1, ymax + 2): for col in range(xmin - 1, xmax + 2): pos = (col, row, layer, hyper) current_is_active = pos in active active_neighbor_count = count_active_neighbors(*pos) if current_is_active and (active_neighbor_count < 2 or active_neighbor_count > 3): active_copy.remove(pos) elif not current_is_active and active_neighbor_count == 3: xmin = min(xmin, col) xmax = max(xmax, col) ymin = min(ymin, row) ymax = max(ymax, row) zmin = min(zmin, layer) zmax = max(zmax, layer) wmin = min(wmin, hyper) wmax = max(wmax, hyper) active_copy.add(pos) active = active_copy print(len(active))
with open('day17.txt') as f: lines = [line.strip() for line in f] (xmin, xmax, ymin, ymax, zmin, zmax, wmin, wmax) = (0, 0, 0, 0, 0, 0, 0, 0) active = set() for row in range(len(lines)): for col in range(len(lines[0])): if lines[row][col] == '#': xmin = min(xmin, col) xmax = max(xmax, col) ymin = min(ymin, row) ymax = max(ymax, row) active.add((col, row, 0, 0)) def count_active_neighbors(x, y, z, w): count = 0 for hyper in range(w - 1, w + 2): for layer in range(z - 1, z + 2): for row in range(y - 1, y + 2): for col in range(x - 1, x + 2): if layer == z and row == y and (col == x) and (hyper == w): continue if (col, row, layer, hyper) in active: count += 1 return count iter = 6 for iteration in range(ITER): active_copy = set(active) for hyper in range(wmin - 1, wmax + 2): for layer in range(zmin - 1, zmax + 2): for row in range(ymin - 1, ymax + 2): for col in range(xmin - 1, xmax + 2): pos = (col, row, layer, hyper) current_is_active = pos in active active_neighbor_count = count_active_neighbors(*pos) if current_is_active and (active_neighbor_count < 2 or active_neighbor_count > 3): active_copy.remove(pos) elif not current_is_active and active_neighbor_count == 3: xmin = min(xmin, col) xmax = max(xmax, col) ymin = min(ymin, row) ymax = max(ymax, row) zmin = min(zmin, layer) zmax = max(zmax, layer) wmin = min(wmin, hyper) wmax = max(wmax, hyper) active_copy.add(pos) active = active_copy print(len(active))
# "Global" users list. users = [] while True: # Initialize a new user. This uses fromkeys as a shorthand for literally # creating a new dictionary and setting its values to None, which is fine. # But, show this to users, since it's much faster. # user = dict.fromkeys(['first_name', 'last_name', 'middle_initial', 'address','email', 'phone_number']) user = { "first_name": "", "last_name": "", "middle_initial": "", "address": "", "email": "", "phone_number": "" } # Prompt user for user's identification information... user['first_name'] = input('Please enter your first name. ') user['last_name'] = input('Please enter your last name. ') user['middle_initial'] = input('Please enter your middle initial. ') # Prompt user for user's contact information... user['address'] = input('Please enter your address. ') user['email'] = input('Please enter your email. ') user['phone_number'] = input('Please enter your phone_number. ') # Print a separator... print('-' * 18) # Print all to the console... for key, value in user.items(): print('your {0} is {1}.'.format(key, value)) # Print a separator... print('-' * 18) # Prompt for confirmation. Use lower so users can enter either Y or y. if input('Is this information correct? (Y/n) ').lower() == 'y': users.append(user) print(users) # Prompt users to add more user information. if input ('Would you like to input another user\'s information? (Y/n)').lower() == 'y': continue else: print('You\'ve entered the following user profiles:') print('-' * 18) # Print information for every user in the list. for user in users: for key, value in user.items(): print('your {0} is {1}.'.format(key, value)) print('-' * 18) break
users = [] while True: user = {'first_name': '', 'last_name': '', 'middle_initial': '', 'address': '', 'email': '', 'phone_number': ''} user['first_name'] = input('Please enter your first name. ') user['last_name'] = input('Please enter your last name. ') user['middle_initial'] = input('Please enter your middle initial. ') user['address'] = input('Please enter your address. ') user['email'] = input('Please enter your email. ') user['phone_number'] = input('Please enter your phone_number. ') print('-' * 18) for (key, value) in user.items(): print('your {0} is {1}.'.format(key, value)) print('-' * 18) if input('Is this information correct? (Y/n) ').lower() == 'y': users.append(user) print(users) if input("Would you like to input another user's information? (Y/n)").lower() == 'y': continue else: print("You've entered the following user profiles:") print('-' * 18) for user in users: for (key, value) in user.items(): print('your {0} is {1}.'.format(key, value)) print('-' * 18) break
""" Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. Basically, the deletion can be divided into two stages: Search for a node to remove. If the node is found, delete the node. Note: Time complexity should be O(height of tree). Example: root = [5,3,6,2,4,null,7] key = 3 5 / \ 3 6 / \ \ 2 4 7 Given key to delete is 3. So we find the node with value 3 and delete it. One valid answer is [5,4,6,2,null,null,7], shown in the following BST. 5 / \ 4 6 / \ 2 7 Another valid answer is [5,2,6,null,4,null,7]. 5 / \ 2 6 \ \ 4 7 """ # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def deleteNode(self, root, key): """ :type root: TreeNode :type key: int :rtype: TreeNode """ # target, pre = self.searchBST(root, None, key) # if not target: # return root # if not pre: # return self.adjustTree(target) # if pre.left == target: # pre.left = self.adjustTree(target) # elif pre.right == target: # pre.right = self.adjustTree(target) # return root # # def searchBST(self, root, pre, val): # if not root: # return None, pre # if root.val == val: # return root, pre # if root.val > val: # return self.searchBST(root.left, root, val) # return self.searchBST(root.right, root, val) # # def adjustTree(self, node): # if not node.left: # return node.right # if not node.right: # return node.left # # new_root = node.left # cur = new_root # while cur.right: # cur = cur.right # cur.right = node.right # return new_root if root == None: return None if root.val == key: if root.left == None: return root.right if root.right == None: return root.left node = self.nextNode(root) root.val = node.val root.right = self.deleteNode(root.right, root.val) elif key < root.val: root.left = self.deleteNode(root.left, key) else: root.right = self.deleteNode(root.right, key) return root def nextNode(self, node): curr = node.right while curr != None and curr.left != None: curr = curr.left return curr
""" Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. Basically, the deletion can be divided into two stages: Search for a node to remove. If the node is found, delete the node. Note: Time complexity should be O(height of tree). Example: root = [5,3,6,2,4,null,7] key = 3 5 / 3 6 / \\ 2 4 7 Given key to delete is 3. So we find the node with value 3 and delete it. One valid answer is [5,4,6,2,null,null,7], shown in the following BST. 5 / 4 6 / 2 7 Another valid answer is [5,2,6,null,4,null,7]. 5 / 2 6 \\ 4 7 """ class Solution(object): def delete_node(self, root, key): """ :type root: TreeNode :type key: int :rtype: TreeNode """ if root == None: return None if root.val == key: if root.left == None: return root.right if root.right == None: return root.left node = self.nextNode(root) root.val = node.val root.right = self.deleteNode(root.right, root.val) elif key < root.val: root.left = self.deleteNode(root.left, key) else: root.right = self.deleteNode(root.right, key) return root def next_node(self, node): curr = node.right while curr != None and curr.left != None: curr = curr.left return curr
nome = 'Pedro Paulo Barros Correia da Silva' print(nome.upper()) print(nome.lower()) nome_sem_espaco = (nome.replace(' ','')) print(len(nome_sem_espaco))
nome = 'Pedro Paulo Barros Correia da Silva' print(nome.upper()) print(nome.lower()) nome_sem_espaco = nome.replace(' ', '') print(len(nome_sem_espaco))
# -*- coding: utf-8 -*- """ Created on Wed Sep 15 13:22:40 2021 @author: Victor """ annual_salary = float(input("Enter your annual salary: ")) portion_saved = float(input("Enter the percent of your salary to save, as a decimal: ")) monthly_salary = annual_salary/12 monthly_savings = monthly_salary * portion_saved total_cost = float(input("Enter the cost of your dream home: ")) portion_down_payment = 0.25 #25% down_payment = portion_down_payment * total_cost r = 0.04 current_savings = 0.0 number_of_months = 0 while current_savings < down_payment: current_savings += (monthly_savings + (current_savings * (r/12))) number_of_months += 1 if current_savings == down_payment: break print("Number of months:",number_of_months) #print(current_savings) - to find the current savings available
""" Created on Wed Sep 15 13:22:40 2021 @author: Victor """ annual_salary = float(input('Enter your annual salary: ')) portion_saved = float(input('Enter the percent of your salary to save, as a decimal: ')) monthly_salary = annual_salary / 12 monthly_savings = monthly_salary * portion_saved total_cost = float(input('Enter the cost of your dream home: ')) portion_down_payment = 0.25 down_payment = portion_down_payment * total_cost r = 0.04 current_savings = 0.0 number_of_months = 0 while current_savings < down_payment: current_savings += monthly_savings + current_savings * (r / 12) number_of_months += 1 if current_savings == down_payment: break print('Number of months:', number_of_months)
def test_passwd_file(File): passwd = File("/etc/passwd") assert passwd.contains("root") assert passwd.user == "root" assert passwd.group == "root" assert passwd.mode == 0o644 def test_nginx_is_installed(Package): nginx = Package("nginx") assert nginx.is_installed assert nginx.version.startswith("1.2") def test_nginx_running_and_enabled(Service): nginx = Service("nginx") assert nginx.is_running assert nginx.is_enabled
def test_passwd_file(File): passwd = file('/etc/passwd') assert passwd.contains('root') assert passwd.user == 'root' assert passwd.group == 'root' assert passwd.mode == 420 def test_nginx_is_installed(Package): nginx = package('nginx') assert nginx.is_installed assert nginx.version.startswith('1.2') def test_nginx_running_and_enabled(Service): nginx = service('nginx') assert nginx.is_running assert nginx.is_enabled
#!/usr/bin/python3.5 print('Running ETL For Riders') # Brings data using the Cloudstitch API # into staging tables for further processing by other parts # of the process
print('Running ETL For Riders')
# # PySNMP MIB module Juniper-PPP-Profile-CONF (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-PPP-Profile-CONF # Produced by pysmi-0.3.4 at Mon Apr 29 19:53:03 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion") juniProfileAgents, = mibBuilder.importSymbols("Juniper-Agents", "juniProfileAgents") AgentCapabilities, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "AgentCapabilities", "NotificationGroup", "ModuleCompliance") ModuleIdentity, Counter64, NotificationType, ObjectIdentity, Counter32, Bits, IpAddress, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Unsigned32, Gauge32, TimeTicks, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Counter64", "NotificationType", "ObjectIdentity", "Counter32", "Bits", "IpAddress", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Unsigned32", "Gauge32", "TimeTicks", "Integer32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") juniPppProfileAgent = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3)) juniPppProfileAgent.setRevisions(('2009-09-18 07:24', '2009-08-10 14:23', '2007-07-12 12:15', '2005-10-19 16:26', '2003-11-03 21:32', '2003-03-13 16:47', '2002-09-06 16:54', '2002-09-03 22:38', '2002-01-25 14:10', '2002-01-16 17:58', '2002-01-08 19:43', '2001-10-17 17:10',)) if mibBuilder.loadTexts: juniPppProfileAgent.setLastUpdated('200909180724Z') if mibBuilder.loadTexts: juniPppProfileAgent.setOrganization('Juniper Networks, Inc.') juniPppProfileAgentV1 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 1)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV1 = juniPppProfileAgentV1.setProductRelease('Version 1 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 3.0 through\n 3.2 system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV1 = juniPppProfileAgentV1.setStatus('obsolete') juniPppProfileAgentV2 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 2)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV2 = juniPppProfileAgentV2.setProductRelease('Version 2 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 3.3 system\n release.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV2 = juniPppProfileAgentV2.setStatus('obsolete') juniPppProfileAgentV3 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 3)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV3 = juniPppProfileAgentV3.setProductRelease('Version 3 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 3.4 and\n subsequent 3.x system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV3 = juniPppProfileAgentV3.setStatus('obsolete') juniPppProfileAgentV4 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 4)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV4 = juniPppProfileAgentV4.setProductRelease('Version 4 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 4.0 system\n releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV4 = juniPppProfileAgentV4.setStatus('obsolete') juniPppProfileAgentV5 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 5)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV5 = juniPppProfileAgentV5.setProductRelease('Version 5 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 4.1 through\n 5.0 system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV5 = juniPppProfileAgentV5.setStatus('obsolete') juniPppProfileAgentV6 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 6)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV6 = juniPppProfileAgentV6.setProductRelease('Version 6 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 5.1 and 5.2\n system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV6 = juniPppProfileAgentV6.setStatus('obsolete') juniPppProfileAgentV7 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 7)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV7 = juniPppProfileAgentV7.setProductRelease('Version 7 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 5.3 through\n 7.2 system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV7 = juniPppProfileAgentV7.setStatus('obsolete') juniPppProfileAgentV8 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 8)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV8 = juniPppProfileAgentV8.setProductRelease('Version 8 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 7.2 system\n releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV8 = juniPppProfileAgentV8.setStatus('obsolete') juniPppProfileAgentV9 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 9)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV9 = juniPppProfileAgentV9.setProductRelease('Version 9 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 7.3 and\n subsequent system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV9 = juniPppProfileAgentV9.setStatus('obsolete') juniPppProfileAgentV10 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 10)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV10 = juniPppProfileAgentV10.setProductRelease('Version 10 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 11.0 and\n subsequent system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV10 = juniPppProfileAgentV10.setStatus('obsolete') juniPppProfileAgentV11 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 11)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV11 = juniPppProfileAgentV11.setProductRelease('Version 11 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 11.1 and\n subsequent system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juniPppProfileAgentV11 = juniPppProfileAgentV11.setStatus('current') mibBuilder.exportSymbols("Juniper-PPP-Profile-CONF", juniPppProfileAgentV9=juniPppProfileAgentV9, juniPppProfileAgentV10=juniPppProfileAgentV10, juniPppProfileAgentV2=juniPppProfileAgentV2, juniPppProfileAgentV11=juniPppProfileAgentV11, juniPppProfileAgentV7=juniPppProfileAgentV7, juniPppProfileAgentV5=juniPppProfileAgentV5, juniPppProfileAgentV8=juniPppProfileAgentV8, juniPppProfileAgentV1=juniPppProfileAgentV1, PYSNMP_MODULE_ID=juniPppProfileAgent, juniPppProfileAgentV3=juniPppProfileAgentV3, juniPppProfileAgent=juniPppProfileAgent, juniPppProfileAgentV4=juniPppProfileAgentV4, juniPppProfileAgentV6=juniPppProfileAgentV6)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_range_constraint, value_size_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion') (juni_profile_agents,) = mibBuilder.importSymbols('Juniper-Agents', 'juniProfileAgents') (agent_capabilities, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'AgentCapabilities', 'NotificationGroup', 'ModuleCompliance') (module_identity, counter64, notification_type, object_identity, counter32, bits, ip_address, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, unsigned32, gauge32, time_ticks, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'Counter64', 'NotificationType', 'ObjectIdentity', 'Counter32', 'Bits', 'IpAddress', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Unsigned32', 'Gauge32', 'TimeTicks', 'Integer32') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') juni_ppp_profile_agent = module_identity((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3)) juniPppProfileAgent.setRevisions(('2009-09-18 07:24', '2009-08-10 14:23', '2007-07-12 12:15', '2005-10-19 16:26', '2003-11-03 21:32', '2003-03-13 16:47', '2002-09-06 16:54', '2002-09-03 22:38', '2002-01-25 14:10', '2002-01-16 17:58', '2002-01-08 19:43', '2001-10-17 17:10')) if mibBuilder.loadTexts: juniPppProfileAgent.setLastUpdated('200909180724Z') if mibBuilder.loadTexts: juniPppProfileAgent.setOrganization('Juniper Networks, Inc.') juni_ppp_profile_agent_v1 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 1)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v1 = juniPppProfileAgentV1.setProductRelease('Version 1 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 3.0 through\n 3.2 system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v1 = juniPppProfileAgentV1.setStatus('obsolete') juni_ppp_profile_agent_v2 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 2)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v2 = juniPppProfileAgentV2.setProductRelease('Version 2 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 3.3 system\n release.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v2 = juniPppProfileAgentV2.setStatus('obsolete') juni_ppp_profile_agent_v3 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 3)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v3 = juniPppProfileAgentV3.setProductRelease('Version 3 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 3.4 and\n subsequent 3.x system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v3 = juniPppProfileAgentV3.setStatus('obsolete') juni_ppp_profile_agent_v4 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 4)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v4 = juniPppProfileAgentV4.setProductRelease('Version 4 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 4.0 system\n releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v4 = juniPppProfileAgentV4.setStatus('obsolete') juni_ppp_profile_agent_v5 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 5)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v5 = juniPppProfileAgentV5.setProductRelease('Version 5 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 4.1 through\n 5.0 system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v5 = juniPppProfileAgentV5.setStatus('obsolete') juni_ppp_profile_agent_v6 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 6)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v6 = juniPppProfileAgentV6.setProductRelease('Version 6 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component was supported in JUNOSe 5.1 and 5.2\n system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v6 = juniPppProfileAgentV6.setStatus('obsolete') juni_ppp_profile_agent_v7 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 7)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v7 = juniPppProfileAgentV7.setProductRelease('Version 7 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 5.3 through\n 7.2 system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v7 = juniPppProfileAgentV7.setStatus('obsolete') juni_ppp_profile_agent_v8 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 8)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v8 = juniPppProfileAgentV8.setProductRelease('Version 8 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 7.2 system\n releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v8 = juniPppProfileAgentV8.setStatus('obsolete') juni_ppp_profile_agent_v9 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 9)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v9 = juniPppProfileAgentV9.setProductRelease('Version 9 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 7.3 and\n subsequent system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v9 = juniPppProfileAgentV9.setStatus('obsolete') juni_ppp_profile_agent_v10 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 10)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v10 = juniPppProfileAgentV10.setProductRelease('Version 10 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 11.0 and\n subsequent system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v10 = juniPppProfileAgentV10.setStatus('obsolete') juni_ppp_profile_agent_v11 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 34, 3, 11)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v11 = juniPppProfileAgentV11.setProductRelease('Version 11 of the PPP Profile component of the JUNOSe SNMP agent. This\n version of the PPP Profile component is supported in JUNOSe 11.1 and\n subsequent system releases.') if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): juni_ppp_profile_agent_v11 = juniPppProfileAgentV11.setStatus('current') mibBuilder.exportSymbols('Juniper-PPP-Profile-CONF', juniPppProfileAgentV9=juniPppProfileAgentV9, juniPppProfileAgentV10=juniPppProfileAgentV10, juniPppProfileAgentV2=juniPppProfileAgentV2, juniPppProfileAgentV11=juniPppProfileAgentV11, juniPppProfileAgentV7=juniPppProfileAgentV7, juniPppProfileAgentV5=juniPppProfileAgentV5, juniPppProfileAgentV8=juniPppProfileAgentV8, juniPppProfileAgentV1=juniPppProfileAgentV1, PYSNMP_MODULE_ID=juniPppProfileAgent, juniPppProfileAgentV3=juniPppProfileAgentV3, juniPppProfileAgent=juniPppProfileAgent, juniPppProfileAgentV4=juniPppProfileAgentV4, juniPppProfileAgentV6=juniPppProfileAgentV6)
load( "@com_activestate_rules_vendor//private:dependencies.bzl", _vendor_dependencies = "vendor_dependencies" ) load( "@com_activestate_rules_vendor//private:generate.bzl", _vendor_generate = "vendor_generate" ) vendor_dependencies = _vendor_dependencies vendor_generate = _vendor_generate
load('@com_activestate_rules_vendor//private:dependencies.bzl', _vendor_dependencies='vendor_dependencies') load('@com_activestate_rules_vendor//private:generate.bzl', _vendor_generate='vendor_generate') vendor_dependencies = _vendor_dependencies vendor_generate = _vendor_generate
# OpenWeatherMap API Key weather_api_key = "532f8d0abc1e638795cea2ce10729a26" # Google API Key g_key = "AIzaSyBIgvIa9rZosgo9uoIOjJL9Cgdz5ZIdj9Q"
weather_api_key = '532f8d0abc1e638795cea2ce10729a26' g_key = 'AIzaSyBIgvIa9rZosgo9uoIOjJL9Cgdz5ZIdj9Q'
class Solution: def isAnagram(self, s: str, t: str) -> bool: if s == t: return True if len(s) != len(t) or len(s) == 0 or len(t) == 0: return False pre_map = {} for i in s: if pre_map.__contains__(i): pre_map[i] += 1 else: pre_map[i] = 1 for j in t: if not pre_map.__contains__(j): return False pre_map[j] -= 1 if pre_map[j] == 0: del pre_map[j] if len(pre_map) == 0: return True else: return False slu = Solution() print(slu.isAnagram("anagram", "nagaram"))
class Solution: def is_anagram(self, s: str, t: str) -> bool: if s == t: return True if len(s) != len(t) or len(s) == 0 or len(t) == 0: return False pre_map = {} for i in s: if pre_map.__contains__(i): pre_map[i] += 1 else: pre_map[i] = 1 for j in t: if not pre_map.__contains__(j): return False pre_map[j] -= 1 if pre_map[j] == 0: del pre_map[j] if len(pre_map) == 0: return True else: return False slu = solution() print(slu.isAnagram('anagram', 'nagaram'))
class Solution: def findNumberOfLIS(self, nums: List[int]) -> int: n = len(nums) if n < 2: return n length, cnt = [1] * n, [1] * n for idx, _ in enumerate(nums): for j in range(idx): if nums[j] < _: if length[idx] == length[j]: length[idx] += 1 cnt[idx] = cnt[j] elif length[idx] == length[j] + 1: cnt[idx] += cnt[j] longest = max(length) return sum([x[1] for x in enumerate(cnt) if length[x[0]] == longest]) ''' l = 1 cnt = 0 def helper(idx, tmp): nonlocal cnt, l if len(tmp) == l: cnt += 1 elif len(tmp) > l: l = len(tmp) cnt = 1 for i in range(idx, len(nums)): if tmp == []: helper(i + 1, [nums[i]]) else: if nums[i] > tmp[-1]: helper(i + 1, tmp + [nums[i]]) helper(0, []) return cnt '''
class Solution: def find_number_of_lis(self, nums: List[int]) -> int: n = len(nums) if n < 2: return n (length, cnt) = ([1] * n, [1] * n) for (idx, _) in enumerate(nums): for j in range(idx): if nums[j] < _: if length[idx] == length[j]: length[idx] += 1 cnt[idx] = cnt[j] elif length[idx] == length[j] + 1: cnt[idx] += cnt[j] longest = max(length) return sum([x[1] for x in enumerate(cnt) if length[x[0]] == longest]) ' \n l = 1\n cnt = 0\n def helper(idx, tmp):\n nonlocal cnt, l\n if len(tmp) == l:\n cnt += 1\n elif len(tmp) > l:\n l = len(tmp)\n cnt = 1\n for i in range(idx, len(nums)):\n if tmp == []:\n helper(i + 1, [nums[i]])\n else:\n if nums[i] > tmp[-1]:\n helper(i + 1, tmp + [nums[i]])\n helper(0, [])\n return cnt\n '
# Finding Bridges in Undirected Graph def computeBridges(l): id = 0 n = len(l) # No of vertices in graph low = [0] * n visited = [False] * n def dfs(at, parent, bridges, id): visited[at] = True low[at] = id id += 1 for to in l[at]: if to == parent: pass elif not visited[to]: dfs(to, at, bridges, id) low[at] = min(low[at], low[to]) if at < low[to]: bridges.append([at, to]) else: # This edge is a back edge and cannot be a bridge low[at] = min(low[at], to) bridges = [] for i in range(n): if not visited[i]: dfs(i, -1, bridges, id) print(bridges) l = { 0: [1, 2], 1: [0, 2], 2: [0, 1, 3, 5], 3: [2, 4], 4: [3], 5: [2, 6, 8], 6: [5, 7], 7: [6, 8], 8: [5, 7], } computeBridges(l)
def compute_bridges(l): id = 0 n = len(l) low = [0] * n visited = [False] * n def dfs(at, parent, bridges, id): visited[at] = True low[at] = id id += 1 for to in l[at]: if to == parent: pass elif not visited[to]: dfs(to, at, bridges, id) low[at] = min(low[at], low[to]) if at < low[to]: bridges.append([at, to]) else: low[at] = min(low[at], to) bridges = [] for i in range(n): if not visited[i]: dfs(i, -1, bridges, id) print(bridges) l = {0: [1, 2], 1: [0, 2], 2: [0, 1, 3, 5], 3: [2, 4], 4: [3], 5: [2, 6, 8], 6: [5, 7], 7: [6, 8], 8: [5, 7]} compute_bridges(l)
class BaseError(Exception): pass class ResourceNotFoundError(BaseError): name = "ResourceNotFoundError" status = 404 def __init__(self, message=None): self.body = { "message": message or "Resource not found" } class BadParametersError(BaseError): name = "BadParametersError" status = 400 def __init__(self, message=None): self.body = { "message": message or "Bad Parameters" } class MissingParameterError(BaseError): name = "MissingParameterError" status = 400 def __init__(self, message=None, missing_params=None): self.body = { "message": message or "Missing Parameters Error", "missing_params": missing_params } class MissingRequiredHeader(BaseError): name = "MissingRequiredHeader" status = 400 body = {"message": "Missing Required Header"} def __init__(self, message=None): self.body = { "message": message or "Missing Required Header" } class ForbiddenError(BaseError): name = "ForbiddenError" status = 403 def __init__(self, message=None): self.body = { "message": message or "Forbidden error" } class ConflictError(BaseError): name = "ConflictError" status = 409 body = {"message": "Resource Conflict"} class UnauthorizedError(BaseError): name = "UnauthorizedError" status = 401 def __init__(self, message=None): self.body = { "message": message or "Unauthorized Error" } class RemoteAPIError(BaseError): name = "RemoteAPIError" status = 502 def __init__(self, message=None, remote_error=None, remote_message=None, sent_params={}): self.body = { "message": message or "Remote API Error", "remote_error": remote_error, "remote_message": remote_message, "sent_params": sent_params } class UnknownError(BaseError): name = "UnknownError" status = 500 def __init__(self, message=None): self.body = { "message": message or "UnknownError", }
class Baseerror(Exception): pass class Resourcenotfounderror(BaseError): name = 'ResourceNotFoundError' status = 404 def __init__(self, message=None): self.body = {'message': message or 'Resource not found'} class Badparameterserror(BaseError): name = 'BadParametersError' status = 400 def __init__(self, message=None): self.body = {'message': message or 'Bad Parameters'} class Missingparametererror(BaseError): name = 'MissingParameterError' status = 400 def __init__(self, message=None, missing_params=None): self.body = {'message': message or 'Missing Parameters Error', 'missing_params': missing_params} class Missingrequiredheader(BaseError): name = 'MissingRequiredHeader' status = 400 body = {'message': 'Missing Required Header'} def __init__(self, message=None): self.body = {'message': message or 'Missing Required Header'} class Forbiddenerror(BaseError): name = 'ForbiddenError' status = 403 def __init__(self, message=None): self.body = {'message': message or 'Forbidden error'} class Conflicterror(BaseError): name = 'ConflictError' status = 409 body = {'message': 'Resource Conflict'} class Unauthorizederror(BaseError): name = 'UnauthorizedError' status = 401 def __init__(self, message=None): self.body = {'message': message or 'Unauthorized Error'} class Remoteapierror(BaseError): name = 'RemoteAPIError' status = 502 def __init__(self, message=None, remote_error=None, remote_message=None, sent_params={}): self.body = {'message': message or 'Remote API Error', 'remote_error': remote_error, 'remote_message': remote_message, 'sent_params': sent_params} class Unknownerror(BaseError): name = 'UnknownError' status = 500 def __init__(self, message=None): self.body = {'message': message or 'UnknownError'}
class Antibiotico: def __init__(self, nombre, tipoAnimal, dosis, precio): self.__nombre = nombre self.__tipoAnimal = tipoAnimal self.__dosis = dosis self.__precio = precio @property def nombre(self): return self.__nombre @property def tipoAnimal(self): return self.__tipoAnimal @property def dosis(self): return self.__dosis @property def precio(self): return self.__precio
class Antibiotico: def __init__(self, nombre, tipoAnimal, dosis, precio): self.__nombre = nombre self.__tipoAnimal = tipoAnimal self.__dosis = dosis self.__precio = precio @property def nombre(self): return self.__nombre @property def tipo_animal(self): return self.__tipoAnimal @property def dosis(self): return self.__dosis @property def precio(self): return self.__precio
""" BIAflows problem classes """ CLASS_OBJSEG = "ObjSeg" CLASS_SPTCNT = "SptCnt" CLASS_PIXCLA = "PixCla" CLASS_TRETRC = "TreTrc" CLASS_LOOTRC = "LooTrc" CLASS_OBJDET = "ObjDet" CLASS_PRTTRK = "PrtTrk" CLASS_OBJTRK = "ObjTrk" CLASS_LNDDET = "LndDet"
""" BIAflows problem classes """ class_objseg = 'ObjSeg' class_sptcnt = 'SptCnt' class_pixcla = 'PixCla' class_tretrc = 'TreTrc' class_lootrc = 'LooTrc' class_objdet = 'ObjDet' class_prttrk = 'PrtTrk' class_objtrk = 'ObjTrk' class_lnddet = 'LndDet'
{ "targets": [ { "target_name": "unidecode", "sources": [ "src/addon.cxx" ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ], "cflags": ["-g"], 'cflags_cc!': [ '-fno-exceptions' ], 'conditions': [ ['OS=="mac"', { 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' } }] ] }, { "target_name": "action_after_build", "type": "none", "dependencies": [ "<(module_name)" ], "copies": [ { "files": [ "<(PRODUCT_DIR)/<(module_name).node" ], "destination": "<(module_path)" } ] } ] }
{'targets': [{'target_name': 'unidecode', 'sources': ['src/addon.cxx'], 'include_dirs': ['<!(node -e "require(\'nan\')")'], 'cflags': ['-g'], 'cflags_cc!': ['-fno-exceptions'], 'conditions': [['OS=="mac"', {'xcode_settings': {'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'}}]]}, {'target_name': 'action_after_build', 'type': 'none', 'dependencies': ['<(module_name)'], 'copies': [{'files': ['<(PRODUCT_DIR)/<(module_name).node'], 'destination': '<(module_path)'}]}]}
#!/usr/bin/python # not_kwd.py grades = ["A", "B", "C", "D", "E", "F"] grade = "L" if grade not in grades: print ("Unknown grade")
grades = ['A', 'B', 'C', 'D', 'E', 'F'] grade = 'L' if grade not in grades: print('Unknown grade')
def setup(bot): return DISCORD_EPOCH = 1420070400000 def ReadableTime(first, last): readTime = int(last-first) weeks = int(readTime/604800) days = int((readTime-(weeks*604800))/86400) hours = int((readTime-(days*86400 + weeks*604800))/3600) minutes = int((readTime-(hours*3600 + days*86400 + weeks*604800))/60) seconds = int(readTime-(minutes*60 + hours*3600 + days*86400 + weeks*604800)) msg = '' if weeks > 0: msg += '1 week, ' if weeks == 1 else '{:,} weeks, '.format(weeks) if weeks > 0: msg += "1 week, " if weeks == 1 else "{:,} weeks, ".format(weeks) if days > 0: msg += "1 day, " if days == 1 else "{:,} days, ".format(days) if hours > 0: msg += "1 hour, " if hours == 1 else "{:,} hours, ".format(hours) if minutes > 0: msg += "1 minute, " if minutes == 1 else "{:,} minutes, ".format(minutes) if seconds > 0: msg += "1 second, " if seconds == 1 else "{:,} seconds, ".format(seconds) if msg == "": return "0 seconds" else: return msg[:-2]
def setup(bot): return discord_epoch = 1420070400000 def readable_time(first, last): read_time = int(last - first) weeks = int(readTime / 604800) days = int((readTime - weeks * 604800) / 86400) hours = int((readTime - (days * 86400 + weeks * 604800)) / 3600) minutes = int((readTime - (hours * 3600 + days * 86400 + weeks * 604800)) / 60) seconds = int(readTime - (minutes * 60 + hours * 3600 + days * 86400 + weeks * 604800)) msg = '' if weeks > 0: msg += '1 week, ' if weeks == 1 else '{:,} weeks, '.format(weeks) if weeks > 0: msg += '1 week, ' if weeks == 1 else '{:,} weeks, '.format(weeks) if days > 0: msg += '1 day, ' if days == 1 else '{:,} days, '.format(days) if hours > 0: msg += '1 hour, ' if hours == 1 else '{:,} hours, '.format(hours) if minutes > 0: msg += '1 minute, ' if minutes == 1 else '{:,} minutes, '.format(minutes) if seconds > 0: msg += '1 second, ' if seconds == 1 else '{:,} seconds, '.format(seconds) if msg == '': return '0 seconds' else: return msg[:-2]
EXAMPLES1 = ( ('09-exemple1.txt', 15), ) EXAMPLES2 = ( ('09-exemple1.txt', 1134), ) INPUT = '09.txt' def read_data(fn): data = list() with open(fn) as f: for line in f: line = line.strip() data.append(line) return data def neighbours(data, i, j): neigh = ((i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1)) return [x for x in neigh if 0 <= x[0] < len(data) and 0 <= x[1] < len(data[0])] def low_points(data): points = list() for i, line in enumerate(data): for j, c in enumerate(line): if all(data[i2][j2] > c for i2, j2 in neighbours(data, i, j)): points.append((i, j)) return points def code1(data): score = 0 for i, j in low_points(data): score += int(data[i][j]) + 1 return score def make_bassin(data, bassin, i, j): for i2, j2 in neighbours(data, i, j): if (i2, j2) in bassin or data[i2][j2] == '9': pass else: bassin.add((i2, j2)) bassin = make_bassin(data, bassin, i2, j2) return bassin def code2(data): size_bassins = list() for i, j in low_points(data): bassin = set() bassin.add((i, j)) bassin = make_bassin(data, bassin, i, j) size_bassins.append(len(bassin)) x, y, z = sorted(size_bassins, reverse=True)[:3] return x * y * z def test(n, code, examples, myinput): for fn, result in examples: data = read_data(fn) assert result is None or code(data) == result, (data, result, code(data)) print(f'{n}>', code(read_data(myinput))) test(1, code1, EXAMPLES1, INPUT) test(2, code2, EXAMPLES2, INPUT)
examples1 = (('09-exemple1.txt', 15),) examples2 = (('09-exemple1.txt', 1134),) input = '09.txt' def read_data(fn): data = list() with open(fn) as f: for line in f: line = line.strip() data.append(line) return data def neighbours(data, i, j): neigh = ((i - 1, j), (i + 1, j), (i, j - 1), (i, j + 1)) return [x for x in neigh if 0 <= x[0] < len(data) and 0 <= x[1] < len(data[0])] def low_points(data): points = list() for (i, line) in enumerate(data): for (j, c) in enumerate(line): if all((data[i2][j2] > c for (i2, j2) in neighbours(data, i, j))): points.append((i, j)) return points def code1(data): score = 0 for (i, j) in low_points(data): score += int(data[i][j]) + 1 return score def make_bassin(data, bassin, i, j): for (i2, j2) in neighbours(data, i, j): if (i2, j2) in bassin or data[i2][j2] == '9': pass else: bassin.add((i2, j2)) bassin = make_bassin(data, bassin, i2, j2) return bassin def code2(data): size_bassins = list() for (i, j) in low_points(data): bassin = set() bassin.add((i, j)) bassin = make_bassin(data, bassin, i, j) size_bassins.append(len(bassin)) (x, y, z) = sorted(size_bassins, reverse=True)[:3] return x * y * z def test(n, code, examples, myinput): for (fn, result) in examples: data = read_data(fn) assert result is None or code(data) == result, (data, result, code(data)) print(f'{n}>', code(read_data(myinput))) test(1, code1, EXAMPLES1, INPUT) test(2, code2, EXAMPLES2, INPUT)
# Selecting Indices # Explain in simple terms what idxmin and idxmax do in the short program below. # When would you use these methods? data = pd.read_csv('../../data/gapminder_gdp_europe.csv', index_col='country') print(data.idxmin()) print(data.idxmax())
data = pd.read_csv('../../data/gapminder_gdp_europe.csv', index_col='country') print(data.idxmin()) print(data.idxmax())
# status: testado com exemplos da prova if __name__ == '__main__': char = input() all_words = input().split() words = [word for word in all_words if char in word] print("{0:.1f}".format(len(words) / len(all_words) * 100))
if __name__ == '__main__': char = input() all_words = input().split() words = [word for word in all_words if char in word] print('{0:.1f}'.format(len(words) / len(all_words) * 100))