content
stringlengths
7
1.05M
class PathNotSetError(Exception): """database path not set error""" def __init__(self,message): super(PathNotSetError, self).__init__(message) self.message = message class SetPasswordError(Exception): """session password not set error""" def __init__(self, message): super(SetPasswordError, self).__init__(message) self.message = message class ValidationError(Exception): """not logged in""" def __init__(self, message): super(ValidationError, self).__init__(message) self.message = message class NotAStringError(Exception): """where clause not a string""" def __init__(self,message): super(NotAStringError,self).__init__(message) self.message = message #################################### ##########postgres################## class NullConnectionError(Exception): """db server is not connected""" def __init__(self,message): super(NullConnectionError,self).__init__(message) self.message = message class NoColumnsGivenError(Exception): def __init__(self, message): super(NoColumnsGivenError, self).__init__(message) self.message = message class NoDataTypesGivenError(Exception): def __init__(self,message): super(NoDataTypesGivenError, self).__init__(message) self.message = message class CountDontMatchError(Exception): def __init__(self,message): super(CountDontMatchError, self).__init__(message) self.message = message class NoPrimaryKeyError(Exception): def __init__(self,message): super(NoPrimaryKeyError, self).__init__(message) self.message = message class DataTypeError(Exception): def __init__(self,message): super(DataTypeError, self).__init__(message) self.message = message class NoValuesGivenError(Exception): def __init__(self, message): super(NoValuesGivenError, self).__init__(message) self.message = message
RICK_DB_VERSION = ["0", "9", "4"] def get_version(): return ".".join(RICK_DB_VERSION)
### Given two strings, determine whether one is permutations of the other # Solution: Two strings are permutations of each other if they have the same characters in different order. # So, you can sort them and compare them # Clarify if they are case sensitive, or if they contain space. # Answer 1: Brute force, sort and compare def permutation_str(str1, str2): if len(str1) != len(str2): return False if sorted(str1) == sorted(str2): return True # Concise answer 2: Count the number of individual characters in each string ## and compare the counts. def string_permutation(s1,s2): """ Edge case: If the strings are not the same length, they are not permutations of each other. Count the occurence of each individual character in each string. If the counts are the same, the strings are permutations of each other. Counts are stored in array of 128 size. This is an assumption that we are using ASCII characters. The number of characters in ASCII is 128. """ if len(s1) != len(s2): return False count_s1 = [0] * 128 for char in s1: count_s1[ord(char)] += 1 count_s2 = [0] * 128 for char in s2: count_s2[ord(char)] += 1 if count_s1 == count_s2: return True else: return False ## There is something off in the implementation: Solved # Test the algorithm on many inputs strings: It works ## Testing the algoritm on different inputs #string_permutation('foo','ofo') ## Output: True #string_permutation('foo','hhdnd') ## Output: False #string_permutation('foo','gbf') ## Output: False #string_permutation('foo','fcd') #Output: False #string_permutation('foo','fog') ## Output: False
#Displays Bot Username ***Required*** name = '#Insert Bot Username Here#' #Bot User ID ***Required*** uid = '#Insert Bot User ID Here#' #Banner List (This is for On-Account-Creation Banner RNG) banner_list = ['https://cdn.discordapp.com/attachments/461057214749081600/468314847147196416/image.gif', 'https://cdn.discordapp.com/attachments/455987115407441921/469294412082446346/image-4.gif', 'https://cdn.discordapp.com/attachments/455987115407441921/469294413332480000/image-5.gif', 'https://cdn.discordapp.com/attachments/455987115407441921/469294414091780106/test3-1.gif'] #Bot Profile URL ***Required*** url = '#Insert the URL of the image you use for the bot here' #Bot Token **REQUIRED (BOT IS NOT RUNNABLE WITHOUT TOKEN)** token = 'Put your Token Here' #Prefix ***REQUIRED*** prefix = '~~' #Color color = 0x00000
class YandexAPIError(Exception): error_codes = { 401: "ERR_KEY_INVALID", 402: "ERR_KEY_BLOCKED", 403: "ERR_DAILY_REQ_LIMIT_EXCEEDED", 413: "ERR_TEXT_TOO_LONG", 501: "ERR_LANG_NOT_SUPPORTED", } def __init__(self, response: dict = None): status_code = response.get('code') message = response.get('message') error_name = self.error_codes.get(status_code, "UNKNOWN_ERROR") super(YandexAPIError, self).__init__(status_code, error_name, message) class YandexDictionaryError(Exception): pass
class InsertConflictError(Exception): pass class OptimisticLockError(Exception): pass
# puzzle easy // https://www.codingame.com/ide/puzzle/sudoku-validator # needed values row_, column_, grid_3x3, sol = [], [], [], [] valid = [1, 2, 3, 4, 5, 6, 7, 8, 9] subgrid = False # needed functions def check(arr): for _ in arr: tmp = valid.copy() for s in _: if s in tmp: tmp.remove(s) if tmp != []: return False return True # sudoku in [row][cal] for i in range(9): tmp = [] for j in input().split(): tmp.append(int(j)) row_+=[tmp] # sudoku in [cal][row] for row in range(len(row_)): tmp = [] for cal in range(len(row_)): tmp.append(row_[cal][row]) column_+=[tmp] # sudoku in 3x3 subgrids for _ in [[1,1],[1,4],[1,7],[4,1],[4,4],[4,7],[7,1],[7,4],[7,7]]: tmp = [row_[_[0]][_[1]]] # root tmp.append(row_[_[0]-1][_[1]]); tmp.append(row_[_[0]+1][_[1]]) # up/ down tmp.append(row_[_[0]][_[1]+1]); tmp.append(row_[_[0]][_[1]-1]) # left/ right tmp.append(row_[_[0]-1][_[1]-1]); tmp.append(row_[_[0]-1][_[1]+1]) # diagonal up tmp.append(row_[_[0]+1][_[1]-1]); tmp.append(row_[_[0]+1][_[1]+1]) # diagonal down if sum(tmp) != 45: subgrid = False; break else: subgrid = True # check if row and column values are different for _ in [row_, column_]: sol.append(check(_)) # print solution if sol[0] is True and sol[1] is True and subgrid is True: print('true') else: print('false')
# # (c) Copyright 2021 Micro Focus or one of its affiliates. # class ErrorMessage: GENERAL_ERROR = "Something went wrong" OA_SERVICE_CAN_NOT_BE_NONE = "service_endpoint can not be empty" MAX_ATTEMPTS_CAN_NOT_BE_NONE = "max_attempts can not be empty" USERNAME_CAN_NOT_BE_NONE = "username can not be empty" PASSWORD_CAN_NOT_BE_NONE = "password can not be empty" OKTA_CLIENT_CAN_NOT_BE_NONE = "client_id can not be empty" OKTA_AUTH_ENDPOINT_CAN_NOT_BE_NONE = "auth_endpont can not be empty" LOGIN_FAILED_BAD_USERNAME_OR_PASSWORD = "Failed to login, please check your okta url, username and password." ERROR_CONFIG_CONFIG_NOT_EXIST = "config file does not exists, please run: va config" ERROR_CONFIG_CONFIG_NOT_READABLE = "config file can not be read, please check permission" ERROR_CONFIG_CONFIG_NOT_WRITEABLE = "config file can not be write, please check permission" ERROR_CREDENTIAL_CONFIG_NOT_EXIST = "credential file does not exists, please run: va config" ERROR_CREDENTIAL_CONFIG_NOT_READABLE = "credential file can not be read, please check permission" ERROR_CREDENTIAL_CONFIG_NOT_WRITEABLE = "credential file can not be write, please check permission" ERROR_STATE_PARAM_VERIFY_FAILED = "failed to verify state param" ERROR_VERIFY_ACCESS_TOKEN_FAIL = "Error in verifying the access_token, please login and try again." ERROR_ACCESS_TOKEN_FILE_NOT_FOUND = "Access token file not found, please login and try again."
DEBUG=False # bool value # True for debug output ADC_URL='http://192.168.1.1' # str value # URL to FortiADC Management/API interface ADC_USERNAME='certificate_admin' # str value # Administrator account on FortiADC # Account requires only System Read-Write Access Profile ADC_PASSWORD='ChangeThisPassword' # str value # Administrator account password on FortiADC CERT_NAME='letsencrypt_certificate' # str value # Name of certificate in FortiADC SQUASH_SSL=True # bool value # True to squash SSL warnings
############################################# # Author: Hongwei Fan # # E-mail: hwnorm@outlook.com # # Homepage: https://github.com/hwfan # ############################################# def format_size(num_size): try: num_size = float(num_size) KB = num_size / 1024 except: return "Error" if KB >= 1024: M = KB / 1024 if M >= 1024: G = M / 1024 return '%.3f GB' % G else: return '%.3f MB' % M else: return '%.3f KB' % KB
ACRONYM = "PMC" def promoter(**identifier_properties): unique_data_string = [ identifier_properties.get("name", "NoName"), identifier_properties.get("pos1", "NoPos1"), identifier_properties.get("transcriptionStartSite", {}).get("leftEndPosition", "NoTSSLEND"), identifier_properties.get("transcriptionStartSite", {}).get("rightEndPosition", "NoTSSREND") ] return unique_data_string
# Configuration values # Edit this file to match your server settings and options config = { 'usenet_server': 'news.easynews.com', 'usenet_port': 119, 'usenet_username': '', 'usenet_password': '', 'database_server': 'localhost', 'database_port': 27017, 'max_run_size': 1000000 # Max number of articles (not NZBs) to process in a single run. }
class TarsError(Exception): pass class SyncError(TarsError): pass class PackageError(TarsError): pass
class Deque: """ Deque implementation using python list as underlying storage """ def __init__(self): """ Creates an empty deque """ self._data = [] def __len__(self): """ Returns the length of the deque """ return len(self._data) def display(self): return self._data def is_empty(self): """ Returns true if the deque is empty, false otherwise """ return len(self._data) == 0 def first(self): """ Returns (but do not remove) the first element from the deque """ if self.is_empty(): raise Empty('Deque is empty') return self._data[-1] def last(self): """ Returns (but do not remove) the last element from the deque """ if self.is_empty(): raise Empty('Deque is empty') return self._data[0] def add_first(self, element): """ Adds an element to the front of the deque """ self._data.append(element) def add_last(self, element): """ Adds an element to the back of the deque """ self._data.insert(0, element) def remove_first(self): """ Removes an element from the front of the deque """ return self._data.pop() def remove_last(self): """ Removes an element from the back of the deque """ return self._data.pop(0) class Empty(Exception): """ Error attempting to access an element from an empty container """ pass
MAGIC = { "xls": "{D0 CF 11}", "html": None }
def generate_key(n): letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" key = {} cnt = 0 for c in letters: key[c] = letters[(cnt + n) % len(letters)] cnt += 1 return key def encrypt(key, message): cipher = "" for c in message: if c in key: cipher += key[c] else: cipher += c return cipher def get_decryption_key(key): dkey = {} for c in key: dkey[key[c]] = c return dkey key = generate_key(3) cipher = encrypt(key, "YOU ARE AWESOME") print(cipher) dkey = get_decryption_key(key) message = encrypt(dkey, cipher) print(message)
# Library targets for DashToHls. These minimize external dependencies (such # as OpenSSL) so other projects can depend on them without bringing in # unnecessary dependencies. { 'target_defaults': { 'xcode_settings': { 'CLANG_ENABLE_OBJC_ARC': [ 'YES' ], }, }, 'targets': [ { 'target_name': 'DashToHlsLibrary', 'type': 'static_library', 'xcode_settings': { 'GCC_PREFIX_HEADER': 'DashToHls_osx.pch', 'CLANG_CXX_LIBRARY': 'libc++', }, 'direct_dependent_settings': { 'include_dirs': [ '../include', '..', ] }, 'include_dirs': [ '..', ], 'conditions': [ ['OS=="mac"', { 'defines': [ 'USE_AVFRAMEWORK', ], 'sources': [ 'dash_to_hls_api_avframework.h', 'dash_to_hls_api_avframework.mm', ], }], ['OS=="ios"', { 'defines': [ 'USE_AVFRAMEWORK', ], 'sources': [ 'dash_to_hls_api_avframework.h', 'dash_to_hls_api_avframework.mm', ], }], ], 'sources': [ '../include/DashToHlsApi.h', '../include/DashToHlsApiAVFramework.h', 'dash_to_hls_api.cc', 'dash_to_hls_session.h', 'utilities.cc', 'utilities.h', ], 'dependencies': [ 'DashToHlsDash', 'DashToHlsDefaultDiagnosticCallback', 'DashToHlsPs', 'DashToHlsTs', ], }, { 'target_name': 'DashToHlsDash', 'type': 'static_library', 'xcode_settings': { 'GCC_PREFIX_HEADER': 'DashToHls_osx.pch', 'CLANG_CXX_LIBRARY': 'libc++', }, 'include_dirs': [ '..', ], 'direct_dependent_settings': { 'include_dirs': [ '..', ], }, 'sources': [ 'bit_reader.cc', 'bit_reader.h', 'utilities.h', 'utilities.cc', '<!@(find dash -type f -name "*.h")', '<!@(find dash -type f -name "*.cc" ! -name "*_test.cc")', ], }, { 'target_name': 'DashToHlsPs', 'type': 'static_library', 'xcode_settings': { 'GCC_PREFIX_HEADER': 'DashToHls_osx.pch', 'CLANG_CXX_LIBRARY': 'libc++', }, 'include_dirs': [ '..', ], 'sources': [ 'utilities.h', 'utilities.cc', '<!@(find ps -type f -name "*.h")', '<!@(find ps -type f -name "*.cc" ! -name "*_test.cc")', ], }, { 'target_name': 'DashToHlsTs', 'type': 'static_library', 'xcode_settings': { 'GCC_PREFIX_HEADER': 'DashToHls_osx.pch', 'CLANG_CXX_LIBRARY': 'libc++', }, 'include_dirs': [ '..', ], 'sources': [ 'adts/adts_out.cc', 'adts/adts_out.h', 'ts/transport_stream_out.cc', 'ts/transport_stream_out.h', ], }, # Note: If you depend on any of the sub-libraries here, you either need to # depend on this to implement the DashToHlsDefaultDiagnosticCallback # function, or, implement it yourself. Otherwise, the project will fail to # link. { 'target_name': 'DashToHlsDefaultDiagnosticCallback', 'type': 'static_library', 'xcode_settings': { 'GCC_PREFIX_HEADER': 'DashToHls_osx.pch', 'CLANG_CXX_LIBRARY': 'libc++', }, 'sources': [ 'dash_to_hls_default_diagnostic_callback.mm', ], } ] }
class DreamingAboutCarrots: def carrotsBetweenCarrots(self, x1, y1, x2, y2): (x1, x2), (y1, y2) = sorted([x1, x2]), sorted([y1, y2]) dx, dy = x2-x1, y2-y1 return sum( (x-x1)*dy - (y-y1)*dx == 0 for x in xrange(x1, x2+1) for y in xrange(y1, y2+1) ) - 2
class Solution: def numFriendRequests(self, ages): """ :type ages: List[int] :rtype: int """ cntr, res = collections.Counter(ages), 0 for A in cntr: for B in cntr: if B <= 0.5 * A + 7 or B > A: continue if A == B: res += cntr[A] *(cntr[A] - 1) else: res += cntr[A] * cntr[B] return res
# TODO: Implement class StorageMan(): """ Storage Manager """ def __init__(self): pass def stroe_info(self): pass def store_result(self): pass def _get_file_path(self): pass
#spotify spotify_token = "" spotify_client_id = "" user_id='' #youtube #scopes = ["https://www.googleapis.com/auth/youtube.force-ssl"]
def peak(A): start = 0 end = len(A) - 1 while(start <= end): mid = start + (end - start)//2 if(mid > 0 and mid < len(A)-1): if(A[mid] > A[mid-1] and A[mid] > A[mid+1]): return A[mid] elif(A[mid] < A[mid-1]): end = mid -1 else: start = mid + 1 elif(mid == 0): if(A[0] > A[mid]): return 0 else: return 1 elif(mid == len(A)-1): if(A[-1] > A[len(A) -2]): return len(A)-1 else: return len(A) -2 A = [5, 1, 4, 3, 6, 8, 10, 7, 9] print(peak(A))
async def dm(user, **kwargs): """functions the same as a send function""" dm = user.dm_channel if dm is None: dm = await user.create_dm() await dm.send(**kwargs)
{ SchemaConfigRoot: { SchemaType: SchemaTypeArray, SchemaRule: [ CheckForeachAsType(PDBConst.DB) ] }, PDBConst.DB: { SchemaType: SchemaTypeDict, SchemaRule: [ HasKey(PDBConst.Name, PDBConst.Tables) ] }, PDBConst.Name: { SchemaType: SchemaTypeString }, PDBConst.Tables: { SchemaType: SchemaTypeArray, SchemaRule: [ CheckForeachAsType(PDBConst.Table) ] }, PDBConst.Table: { SchemaType: SchemaTypeDict, SchemaRule: [ HasKey(PDBConst.Name, PDBConst.Columns) ] }, PDBConst.Columns: { SchemaType: SchemaTypeArray, SchemaRule: [ CheckForeachAsType(PDBConst.Column) ] }, PDBConst.Column: { SchemaType: SchemaTypeDict, SchemaRule: [ HasKey(PDBConst.Name, PDBConst.Attributes) ] }, PDBConst.Attributes: { SchemaType: SchemaTypeArray }, PDBConst.Initials: { SchemaType: SchemaTypeArray, }, PDBConst.Value: { SchemaType: SchemaTypeString }, PDBConst.PrimaryKey: { SchemaType: SchemaTypeArray } }
class Card(object): """Cards in the deck.""" pass
class OSContainerError(Exception): """General container data processing error""" def __init__(self, *args, **kwargs): super(OSContainerError, self).__init__(*args, **kwargs)
# Time: init:O(len(nums)), update: O(logn), sumRange: O(logn) # Space: init:O(len(nums)), update: O(1), sumRange: O(1) class NumArray: def __init__(self, nums: List[int]): self.n = len(nums) self.arr = [None]*(2*self.n-1) last_row_index = 0 for index in range(self.n-1, 2*self.n-1): self.arr[index] = nums[last_row_index] last_row_index+=1 for index in range(self.n-2,-1,-1): self.arr[index] = self.arr[index*2+1] + self.arr[index*2+2] # print(self.arr) def update(self, i: int, val: int) -> None: i = self.n+i-1 diff = val-self.arr[i] while i>=0: self.arr[i]+=diff if i%2==0: # right_child i = i//2-1 else: # left_child i = i//2 # print(self.arr) def sumRange(self, i: int, j: int) -> int: i = self.n+i-1 j = self.n+j-1 cur_sum = 0 while i<=j: # print(i,j) if i%2==0: # right_child cur_sum+=self.arr[i] i+=1 if j%2==1: # left_child cur_sum+=self.arr[j] j-=1 i = i//2 # index i is guaranteed to be left_child j = j//2-1 # index j is guaranteed to be right_child return cur_sum # Your NumArray object will be instantiated and called as such: # obj = NumArray(nums) # obj.update(i,val) # param_2 = obj.sumRange(i,j)
# Author: Melissa Perez # Date: --/--/-- # Description: # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]: l1_runner = l1 l2_runner = l2 sum_list = ListNode() sum_list_runner = sum_list carry = 0 while l1_runner or l2_runner: if l1_runner and l2_runner: digit_sum = l1_runner.val + l2_runner.val + carry elif l2_runner is None: digit_sum = carry + l1_runner.val elif l1_runner is None: digit_sum = carry + l2_runner.val result = digit_sum % 10 carry = 1 if digit_sum >= 10 else 0 sum_list_runner.next = ListNode(val=result) sum_list_runner = sum_list_runner.next if l2_runner is not None: l2_runner = l2_runner.next if l1_runner is not None: l1_runner = l1_runner.next if carry: sum_list_runner.next = ListNode(val=carry) return sum_list.next
""" Contains a class that implements an unweighted and undirected graph. This module implements an API that define the fundamental graph operations. It contains only one class, called Graph, that implements an unweighted and undirected graph. @Author: Gabriel Nogueira (Talendar) """ class Graph: """ Implementation of an unweighted and undirected graph. Attributes: _adj_lists: Stores the adjacency lists for the graph's vertices. Each index is associated with a vertex. _symbol2index: Dictionary that maps the name of a vertex (string) to its index. _index2symbol: Maps the index of a vertex to its name (string). """ def __init__(self): """ Inits an empty unweighted and undirected graph. """ self._adj_lists = [] self._symbol2index = {} self._index2symbol = [] def num_vertices(self): """ Returns the number of vertices in the graph. """ return len(self._adj_lists) def nameof(self, v): """ Given the index of a vertex, returns its name. :param v: The index of the vertex (index). :return: The name of the vertex (string). """ return self._index2symbol[v] def indexof(self, v): """ Given a vertex's name, returns its index. :param v: Name of the vertex. :return: The index of the vertex. """ return self._symbol2index[v] def contains(self, v): """ Checks whether the graph contains the given vertex. :param v: The vertex's index (integer) or name (string). :return: True if the vertex is in the graph and False otherwise. """ if type(v) is int: return 0 <= v < len(self._adj_lists) else: return v in self._symbol2index def add_vertex(self, v: str): """ Adds a vertex to the graph. :param v: String containing an unique identifier for the vertex. :return: - :raises ValueError: The vertex is already present in the graph. """ if self.contains(v): raise ValueError("The vertex is already present in the graph!") self._adj_lists.append([]) self._symbol2index[v] = len(self._adj_lists) - 1 self._index2symbol.append(v) def add_edge(self, v, w): """ Adds an edge connecting the vertices v and w. Use this method to add an undirected and unweighted edge connecting the vertices v and w. If either v or w is not yet present in the graph, this method will add it. The params v and w expects strings containing unique identifiers for v and w, respectively. This method doesn't check whether the two vertices are already neighbours, so it allows the adding of multiple edges between a same pair of vertices! :param v: String containing the ID (name) of a vertex (present in the graph or yet to be added). :param w: String containing the ID (name) of a vertex (present in the graph or yet to be added). :return: - """ if v not in self._symbol2index: self.add_vertex(v) if w not in self._symbol2index: self.add_vertex(w) self._adj_lists[ self.indexof(v) ].append( self.indexof(w) ) self._adj_lists[ self.indexof(w) ].append( self.indexof(v) ) def adj(self, v): """ Returns the adjacency list of vertex v. Use this function in order to retrieve a list containing all the neighbours of the given vertex. :param v: The index (integer) or name (string) of the vertex. :return: The adjacency list of the vertex (list containing the indexes of v's neighbours). Returns an empty list if v has no neighbours. """ if type(v) is int: return self._adj_lists[v] else: return self._adj_lists[ self.indexof(v) ] def __str__(self): """ Represents the graph in a string. Each line of the string represents a vertex followed by its adjacency list. :return: A string representing the graph. """ lines_list = [] for i, v in enumerate(self._adj_lists): lines_list.append( "> %s[%d]: " % (self.nameof(i), i) + "".join(["%s[%d] " % (self.nameof(w), w) for w in v]) + "\n") return "".join(lines_list) def read_graph(): """ Creates a graph from the information retrieved from STDIN. :return: The generated graph. """ graph = Graph() edges_count = int(input()) for i in range(edges_count): v, w = input().split(" ") graph.add_edge(v, w) return graph
class Solution(object): def maxProfit(self, prices): if not prices or len(prices)<=1: return 0 N = len(prices) buy = [-prices[0], max(-prices[1], -prices[0])] sell = [0, max(prices[1]+buy[0], 0)] for i in xrange(2, N): buy.append(max(sell[i-2]-prices[i], buy[i-1])) sell.append(max(prices[i]+buy[i-1], sell[i-1])) return max(buy[-1], sell[-1], 0) """ Three rules: 1. Need to buy before sell. 2. After sell, next day need to rest (cannot buy). 3. When buying, we spend money, which is a negative profit. There are two possible end state. buy or sell. So we need to consider both. Only considering prices 0~i, buy[i] stores the max profit that the last action is "buy". Only considering prices 0~i, sell[i] stores the max profit that the last action is "sell". Let's sort this out. When i==0: buy: -prices[0] sell: 0, since we cannot sell at i==0. When i==1: buy: max(-prices[1], -prices[0]) Now, we must not have sell yet. So no need to consider it. If we buy at i==1, the profit will be `-prices[1]`. But we also had the option not to buy. buy[0] is the max profit if we don't buy at i==1. Again, we are considering, when the end state is "buy", what is the max profit? Thus, `max(-prices[1], buy[0])`. sell: max(prices[1]+buy[0], 0) If we sell at i==1, the profit will be `prices[1]+buy[0]`. But we also had the option not to sell. 0 is the max profit if we don't sell at i==1. Again, we are considering, when the end state is "sell", what is the max profit? Thus, `max(prices[1]+buy[0], sell[0])` When i>=2: """
namespace = "reflex_takktile2" takktile2_config = {} all_joint_names = ["%s_f1"%namespace, "%s_f2"%namespace, "%s_f3"%namespace, "%s_preshape"%namespace] joint_limits = [{'lower': 0.0, 'upper': 3.14}, {'lower': 0.0, 'upper': 3.14}, {'lower': 0.0, 'upper': 3.14}, {'lower': 0.0, 'upper': 3.14/2}] takktile2_config['all_joint_names'] = all_joint_names takktile2_config['joint_limits'] = joint_limits
r""" tk.PanedWindow based """ class Handler: pass
numeros = list() maiorPosicao = list() menorPosicao = list() for i in (range(5)): numeros.append(int(input('Digite o valor: '))) maior = max(numeros) menor = min(numeros) for c, i in enumerate(numeros): if i == maior: maiorPosicao.append(c) if i == menor: menorPosicao.append(c) print(f'Voce digitou os valores {numeros}') print(f'{maior} é o maior número e está nas posicões {maiorPosicao}') print(f'{menor} é o menor número e está nas posicões {menorPosicao}')
class Paths(object): qradio_path = '' python_path = '' def __init__(self): qradio_path = 'path_to_cli_qradio.py' python_path = ''
# Copyright (c) 2010 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. { 'variables': { 'chromium_code': 1, # Use higher warning level. }, 'target_defaults': { 'conditions': [ # Linux shared libraries should always be built -fPIC. # # TODO(ajwong): For internal pepper plugins, which are statically linked # into chrome, do we want to build w/o -fPIC? If so, how can we express # that in the build system? ['OS=="linux" or OS=="openbsd" or OS=="freebsd" or OS=="solaris"', { 'cflags': ['-fPIC', '-fvisibility=hidden'], # This is needed to make the Linux shlib build happy. Without this, # -fvisibility=hidden gets stripped by the exclusion in common.gypi # that is triggered when a shared library build is specified. 'cflags/': [['include', '^-fvisibility=hidden$']], }], ], }, 'includes': [ 'ppapi_cpp.gypi', 'ppapi_gl.gypi', 'ppapi_shared_proxy.gypi', 'ppapi_tests.gypi', ], }
''' basic datatypes --------------- bool -> boolean int -> integer float -> decimals/float str -> string dict -> dictionaries (aka. hash map in some languages) list -> lists (aka. arrays in some langauges) tuples -> basically lists, but immutable None -> special object, singleton that means, well, nothing. ''' # there's no variable declaration/initialization - just name as you go # variable names may contain A-Z, a-z, 0-9, _, but cannot start with a number. foo = 'bar' # set variable named foo to contain string 'bar' total = 1 * 2 * 3 # set variable named total to result of 1 x 2 x 3 (6) # Booleans # -------- # there's true... and there's false truth = True falsehood = False # Integers/Floats # --------------- # integers are just numbers integer_1 = 1 the_ultimate_answer_to_question_of_life_universe_and_everything = 42 # declare a float by just using . naturally in math pi = 3.1415926535897932384626433832795028841971693 # Strings # ------- # a string is typically surrounded by '', "" foo1 = "bar" foo2 = 'bar' # no difference # a '' quoted string cannot contain ' # a "" quoted string cannot contain " # (unless you escape it) foo3 = "\"bar\"" foo4 = '\rbar\'' # so it's better to mix them foo5 = '"bar"' foo6 = "'bar'" # a string must finish on the same line, unless you use \ at the end foo7 = "a multiple\ line string" # alternatively, use ''' and """ to denote multi-line strings without having # any of the above difficulties foo8 = '''python is a simple yet complicated programming language for "adults"''' # use index to access string position print(foo1[0]) # and slicing to indicate a sub-string print(foo7[2:10]) # there are many useful, built-in string methods 'python'.title() # Python 'uppercase'.upper() # UPPERCASE 'LOWERCASE'.lower() # lowercase 'a b c'.split() # ['a', 'b', 'c'] ' a good day '.strip() # 'a good day' # concatenate strings by adding them ironman = "Tony" + " " + "Stark" # Dictionary # ---------- # a dictionary comprises of key-value pairs # dictionaries are unordered (order of insertion is lost) character = {} character['firstname'] = "tony" character['lastname'] = "stark" character['nickname'] = "ironman" # alternatively, create it in one shot character = {'firstname': 'tony', 'lastname': 'stark', 'nickname': 'ironman'} # some basic methods of a dictionary print(character['firstname'], character['lastname']) charater.pop('firstname') charater.setdefault('home_automation', 'J.A.R.V.I.S') character.update(firstname = "Tony", lastname = "Stark") all_keys = character.keys() all_values = character.values() key_value_pairs = character.items() # Lists & Tuples # -------------- # lists are extremly versatile, and can contain anything (including other lists) # lists are ordered. movies = ['A New Hope', 'The Empire Strikes Back', 'Return of the Jedi'] combo = ["Arthur Dent", 42, list1] # lists are indexed by integer position starting from 0 # negative numbers starts from the end of the list (starting from -1) print(movies[0], movies[1], movies[2]) print(movies[-1], movies[-2], movies[-3]) # typical list operations movies.append("The Phantom Menace") movies.extend(["Attack of the Clones", "Revenge of the Sith"]) movies[0] = "Episode IV - A New Hope" combo.pop(-1) # -1 means last item # slicing worsk too movies[3:] # everything from 3 onwards # tuples are the exact same as lists, but you cannot modify it. movies = ('A New Hope', 'The Empire Strikes Back', 'Return of the Jedi') # None # ---- # None is special nothing = None # Typecasting # ----------- # many things can be casted around number = "42" # starting with a string number = int(number) # cast to integer number = str(number) # casted back to string languages = ['Python', 'C#', 'Ruby'] # start with a list languages = tuple(languages) # cast to tuple
# coding=utf-8 def get_procurement_type_xpath(mode): procurement_type_xpath = { "belowThreshold": "//*[@value='belowThreshold']", "openua": "//*[@name='tender[procedure_type]_2']", "openeu": "//*[@name='tender[procedure_type]_3']", "negotiation": "//*[@name='tender[procedure_type]_6']" } return procurement_type_xpath[mode] def get_item_xpath(field_name, item_id, index): item_xpath = { 'description': "//*[contains(@value, '" + item_id + "')]", 'deliveryDate.startDate': "//*[contains(@name,'tender[items][" + index + "][reception_from]')]", 'deliveryDate.endDate': "//*[contains(@name,'tender[items][" + index + "][reception_to]')]", 'deliveryLocation.latitude': "//*[contains(@name,'tender[items][" + index + "][latitude]')]", 'deliveryLocation.longitude': "//*[contains(@name,'tender[items][" + index + "][longitude]')]", 'deliveryAddress.countryName': "//*[contains(@name,'tender[items][" + index + "][country]')]", 'deliveryAddress.postalCode': "//*[contains(@name,'tender[items][" + index + "][post_index]')]", 'deliveryAddress.region': "//*[contains(@name,'tender[items][" + index + "][region]')]", 'deliveryAddress.locality': "//*[contains(@name,'tender[items][" + index + "][locality]')]", 'deliveryAddress.streetAddress': "//*[contains(@name,'tender[items][" + index + "][address]')]", 'classification.scheme': "//*[contains(@name,'tender[items][" + index + "][dk_021_2015][scheme]')]", 'classification.id': "//*[contains(@name,'tender[items][" + index + "][dk_021_2015][id]')]", 'classification.description': "//*[contains(@name,'tender[items][" + index + "][dk_021_2015][title]')]", 'additionalClassifications.scheme': "//*[contains(@name,'tender[items][" + index + "][dk_moz_mnn]')]", 'additionalClassifications.id': "//*[contains(@name,'tender[items][" + index + "][dk_moz_mnn][id]')]", 'additionalClassifications.description': "//*[contains(text(), '" + item_id + "')][dk_moz_mnn][title]", 'additionalClassifications[index].scheme': "//*[contains(@name,'tender[items][" + index + "][dk_moz_mnn]')]", 'additionalClassifications[index].id': "//*[contains(@name,'tender[items][" + index + "][dk_moz_mnn][id]')]", 'additionalClassifications[index].description': "//*[contains(text(), '" + item_id + "')][dk_moz_mnn][title]", 'unit.name': "//*[contains(@name,'tender[items][" + index + "][unit_name]')]", 'unit.code': "//*[contains(@name,'tender[items][" + index + "][unit]')]", 'quantity': "//*[contains(@name,'tender[items][" + index + "][item_quantity]')]" } return item_xpath[field_name] def get_lot_xpath(field_name, lot_id, mode): lot_xpath = { 'title': "//*[contains(@value, '" +lot_id+ "')]", 'description': "//*[contains(@name, 'tender[lots][" +mode+ "][description]')]", 'value.amount': "//*[contains(@name, 'tender[lots][" +mode+ "][amount]')]", 'value.currency': "//*[contains(@name, 'tender[lots][" +mode+ "][currency]')]", 'minimalStep.currency': "//*[contains(@name, 'tender[lots][" +mode+ "][currency]')]", 'value.valueAddedTaxIncluded': "//*[contains(@value, '" +mode+ "')]//ancestor::tbody/tr[9]/td[2]//td[1]//input", 'minimalStep.amount': "//*[contains(@name, 'tender[lots][" +mode+ "][minimal_step]')]", 'minimalStep.valueAddedTaxIncluded': "//*[contains(@value, '" +mode+ "')]//ancestor::tbody/tr[9]/td[2]//td[1]//input" } return lot_xpath[field_name] def get_document_xpath(field, doc_id): doc_xpath = { 'title': "//a[contains(., '"+ doc_id +"')]", 'documentOf': "//a[contains(text(), '"+ doc_id +"')]@data-document-of", } return doc_xpath[field] def get_question_xpath(field_name, question_id): question_xpath = { 'title': "//h3[contains(., '" + question_id + "')]", 'description': "//span[contains(@title-question-id, '" + question_id + "') and contains(@data-name,'question[description]')]", 'answer': "//span[contains(@title-question-id, '" + question_id + "') and contains(@data-name,'question[answer]')]" } return question_xpath[field_name] def get_claims_xpath(field_name): claims_xpath = { 'title': "//*[@id='mForm:data:title']", 'description': "//*[@id='mForm:data:description']", 'status': "//*[text()='Статус']//ancestor::tr/td[2]", 'resolutionType': "//*[@id='mForm:data:resolutionType_label']", 'resolution': "//*[@id='mForm:data:resolution']", 'satisfied': "//*[@id='mForm:data:satisfied_label']", 'complaintID': "//*[@id='mForm:NBid']", 'cancellationReason': "//*[@id='mForm:data:cancellationReason']" } return claims_xpath[field_name] def get_bid_xpath(field): #def get_bid_xpath(field, lot_id): # id = lot_id[0] if field == 'status': xpath = "//*[@name='bid[status]']" else: xpath = "//input[@id='edit-bid-lot-cost-0']" return xpath
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # DryRun 操作,代表请求将会是成功的,只是多传了 DryRun 参数。 DRYRUNOPERATION = 'DryRunOperation' # 操作失败。 FAILEDOPERATION = 'FailedOperation' # 实名认证失败。 FAILEDOPERATION_ACCOUNTVERIFYFAIL = 'FailedOperation.AccountVerifyFail' # 16岁以下不提供电子签服务。 FAILEDOPERATION_AGENOTACHIEVENORMALLEGAL = 'FailedOperation.AgeNotAchieveNormalLegal' # 流程已关联文档。 FAILEDOPERATION_FLOWHASDOCUMENT = 'FailedOperation.FlowHasDocument' # 模版无资源信息。 FAILEDOPERATION_TEMPLATEHASNORESOURCE = 'FailedOperation.TemplateHasNoResource' # 内部错误。 INTERNALERROR = 'InternalError' # 缓存错误。 INTERNALERROR_CACHE = 'InternalError.Cache' # 数据库异常。 INTERNALERROR_DB = 'InternalError.Db' # 内部错误,数据库查询失败,请稍后重试。 INTERNALERROR_DBREAD = 'InternalError.DbRead' # 解密失败。 INTERNALERROR_DECRYPTION = 'InternalError.Decryption' # 依赖的第三方API返回错误。 INTERNALERROR_DEPENDSAPI = 'InternalError.DependsApi' # 数据库执行错误。 INTERNALERROR_DEPENDSDB = 'InternalError.DependsDb' # 加密失败。 INTERNALERROR_ENCRYPTION = 'InternalError.Encryption' # Pdf错误。 INTERNALERROR_PDF = 'InternalError.Pdf' # 系统错误。 INTERNALERROR_SYSTEM = 'InternalError.System' # 参数错误。 INVALIDPARAMETER = 'InvalidParameter' # 数据已存在。 INVALIDPARAMETER_DATAEXISTS = 'InvalidParameter.DataExists' # 数据不存在。 INVALIDPARAMETER_DATANOTFOUND = 'InvalidParameter.DataNotFound' # 参数为空。 INVALIDPARAMETER_EMPTYPARAMS = 'InvalidParameter.EmptyParams' # Channel不正确。 INVALIDPARAMETER_INVALIDCHANNEL = 'InvalidParameter.InvalidChannel' # OpenId不正确。 INVALIDPARAMETER_INVALIDOPENID = 'InvalidParameter.InvalidOpenId' # 操作人ID不正确。 INVALIDPARAMETER_INVALIDOPERATORID = 'InvalidParameter.InvalidOperatorId' # 机构ID不正确。 INVALIDPARAMETER_INVALIDORGANIZATIONID = 'InvalidParameter.InvalidOrganizationId' # 组织机构名称不正确。 INVALIDPARAMETER_INVALIDORGANIZATIONNAME = 'InvalidParameter.InvalidOrganizationName' # 角色ID不正确。 INVALIDPARAMETER_INVALIDROLEID = 'InvalidParameter.InvalidRoleId' # 角色名称不正确。 INVALIDPARAMETER_INVALIDROLENAME = 'InvalidParameter.InvalidRoleName' # 实名认证渠道不正确。 INVALIDPARAMETER_INVALIDVERIFYCHANNEL = 'InvalidParameter.InvalidVerifyChannel' # 验证码不正确。 INVALIDPARAMETER_INVALIDVERIFYCODE = 'InvalidParameter.InvalidVerifyCode' # 参数错误。 INVALIDPARAMETER_PARAMERROR = 'InvalidParameter.ParamError' # 参数Status不正确。 INVALIDPARAMETER_STATUS = 'InvalidParameter.Status' # 参数取值错误。 INVALIDPARAMETERVALUE = 'InvalidParameterValue' # 需要屏蔽的告警。 INVALIDPARAMETERVALUE_MASK = 'InvalidParameterValue.Mask' # 超过配额限制。 LIMITEXCEEDED = 'LimitExceeded' # 缺少参数错误。 MISSINGPARAMETER = 'MissingParameter' # 操作被拒绝。 OPERATIONDENIED = 'OperationDenied' # 禁止此项操作。 OPERATIONDENIED_FORBID = 'OperationDenied.Forbid' # 未通过个人实名认证。 OPERATIONDENIED_NOIDENTITYVERIFY = 'OperationDenied.NoIdentityVerify' # 流程配额不足。 OPERATIONDENIED_NOQUOTA = 'OperationDenied.NoQuota' # 企业未激活。 OPERATIONDENIED_ORGANIZATIONNOTACTIVATED = 'OperationDenied.OrganizationNotActivated' # 请求的次数超过了频率限制。 REQUESTLIMITEXCEEDED = 'RequestLimitExceeded' # 资源被占用。 RESOURCEINUSE = 'ResourceInUse' # 资源不足。 RESOURCEINSUFFICIENT = 'ResourceInsufficient' # 资源不存在。 RESOURCENOTFOUND = 'ResourceNotFound' # 应用号不存在或已删除。 RESOURCENOTFOUND_APPLICATION = 'ResourceNotFound.Application' # 流程不存在。 RESOURCENOTFOUND_FLOW = 'ResourceNotFound.Flow' # 电子文档不存在。 RESOURCENOTFOUND_NOTEXISTDOCUMENT = 'ResourceNotFound.NotExistDocument' # 流程不存在。 RESOURCENOTFOUND_NOTEXISTFLOW = 'ResourceNotFound.NotExistFlow' # 资源不存在。 RESOURCENOTFOUND_RESOURCE = 'ResourceNotFound.Resource' # 模版不存在。 RESOURCENOTFOUND_TEMPLATE = 'ResourceNotFound.Template' # 资源不可用。 RESOURCEUNAVAILABLE = 'ResourceUnavailable' # 未授权操作。 UNAUTHORIZEDOPERATION = 'UnauthorizedOperation' # 未知参数错误。 UNKNOWNPARAMETER = 'UnknownParameter' # 操作不支持。 UNSUPPORTEDOPERATION = 'UnsupportedOperation'
class Bike: name = '' color= ' ' price = 0 def info(self, name, color, price): self.name, self.color, self.price = name,color,price print("{}: {} and {}".format(self.name,self.color,self.price))
# # PySNMP MIB module DISMAN-EXPRESSION-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/DISMAN-EXPRESSION-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:07:59 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( ObjectIdentifier, Integer, OctetString, ) = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint") ( SnmpAdminString, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ( ModuleCompliance, NotificationGroup, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") ( sysUpTime, ) = mibBuilder.importSymbols("SNMPv2-MIB", "sysUpTime") ( Gauge32, Bits, Unsigned32, Counter64, ObjectIdentity, zeroDotZero, TimeTicks, ModuleIdentity, Integer32, IpAddress, Counter32, mib_2, iso, NotificationType, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Bits", "Unsigned32", "Counter64", "ObjectIdentity", "zeroDotZero", "TimeTicks", "ModuleIdentity", "Integer32", "IpAddress", "Counter32", "mib-2", "iso", "NotificationType", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") ( DisplayString, TruthValue, TimeStamp, TextualConvention, RowStatus, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "TimeStamp", "TextualConvention", "RowStatus") dismanExpressionMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 90)).setRevisions(("2000-10-16 00:00",)) if mibBuilder.loadTexts: dismanExpressionMIB.setLastUpdated('200010160000Z') if mibBuilder.loadTexts: dismanExpressionMIB.setOrganization('IETF Distributed Management Working Group') if mibBuilder.loadTexts: dismanExpressionMIB.setContactInfo('Ramanathan Kavasseri\n Cisco Systems, Inc.\n 170 West Tasman Drive,\n San Jose CA 95134-1706.\n Phone: +1 408 527 2446\n Email: ramk@cisco.com') if mibBuilder.loadTexts: dismanExpressionMIB.setDescription('The MIB module for defining expressions of MIB objects for\n management purposes.') dismanExpressionMIBObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 1)) expResource = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 1, 1)) expDefine = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 1, 2)) expValue = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 1, 3)) expResourceDeltaMinimum = MibScalar((1, 3, 6, 1, 2, 1, 90, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(-1,-1),ValueRangeConstraint(1,600),))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: expResourceDeltaMinimum.setDescription("The minimum expExpressionDeltaInterval this system will\n accept. A system may use the larger values of this minimum to\n lessen the impact of constantly computing deltas. For larger\n delta sampling intervals the system samples less often and\n suffers less overhead. This object provides a way to enforce\n such lower overhead for all expressions created after it is\n set.\n\n The value -1 indicates that expResourceDeltaMinimum is\n irrelevant as the system will not accept 'deltaValue' as a\n value for expObjectSampleType.\n\n Unless explicitly resource limited, a system's value for\n this object should be 1, allowing as small as a 1 second\n interval for ongoing delta sampling.\n\n Changing this value will not invalidate an existing setting\n of expObjectSampleType.") expResourceDeltaWildcardInstanceMaximum = MibScalar((1, 3, 6, 1, 2, 1, 90, 1, 1, 2), Unsigned32()).setUnits('instances').setMaxAccess("readwrite") if mibBuilder.loadTexts: expResourceDeltaWildcardInstanceMaximum.setDescription("For every instance of a deltaValue object, one dynamic instance\n entry is needed for holding the instance value from the previous\n sample, i.e. to maintain state.\n\n This object limits maximum number of dynamic instance entries\n this system will support for wildcarded delta objects in\n expressions. For a given delta expression, the number of\n dynamic instances is the number of values that meet all criteria\n to exist times the number of delta values in the expression.\n\n A value of 0 indicates no preset limit, that is, the limit\n is dynamic based on system operation and resources.\n\n Unless explicitly resource limited, a system's value for\n this object should be 0.\n\n\n Changing this value will not eliminate or inhibit existing delta\n wildcard instance objects but will prevent the creation of more\n such objects.\n\n An attempt to allocate beyond the limit results in expErrorCode\n being tooManyWildcardValues for that evaluation attempt.") expResourceDeltaWildcardInstances = MibScalar((1, 3, 6, 1, 2, 1, 90, 1, 1, 3), Gauge32()).setUnits('instances').setMaxAccess("readonly") if mibBuilder.loadTexts: expResourceDeltaWildcardInstances.setDescription('The number of currently active instance entries as\n defined for expResourceDeltaWildcardInstanceMaximum.') expResourceDeltaWildcardInstancesHigh = MibScalar((1, 3, 6, 1, 2, 1, 90, 1, 1, 4), Gauge32()).setUnits('instances').setMaxAccess("readonly") if mibBuilder.loadTexts: expResourceDeltaWildcardInstancesHigh.setDescription('The highest value of expResourceDeltaWildcardInstances\n that has occurred since initialization of the managed\n system.') expResourceDeltaWildcardInstanceResourceLacks = MibScalar((1, 3, 6, 1, 2, 1, 90, 1, 1, 5), Counter32()).setUnits('instances').setMaxAccess("readonly") if mibBuilder.loadTexts: expResourceDeltaWildcardInstanceResourceLacks.setDescription('The number of times this system could not evaluate an\n expression because that would have created a value instance in\n excess of expResourceDeltaWildcardInstanceMaximum.') expExpressionTable = MibTable((1, 3, 6, 1, 2, 1, 90, 1, 2, 1), ) if mibBuilder.loadTexts: expExpressionTable.setDescription('A table of expression definitions.') expExpressionEntry = MibTableRow((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1), ).setIndexNames((0, "DISMAN-EXPRESSION-MIB", "expExpressionOwner"), (0, "DISMAN-EXPRESSION-MIB", "expExpressionName")) if mibBuilder.loadTexts: expExpressionEntry.setDescription("Information about a single expression. New expressions\n can be created using expExpressionRowStatus.\n\n To create an expression first create the named entry in this\n table. Then use expExpressionName to populate expObjectTable.\n For expression evaluation to succeed all related entries in\n expExpressionTable and expObjectTable must be 'active'. If\n these conditions are not met the corresponding values in\n expValue simply are not instantiated.\n\n Deleting an entry deletes all related entries in expObjectTable\n and expErrorTable.\n\n Because of the relationships among the multiple tables for an\n expression (expExpressionTable, expObjectTable, and\n expValueTable) and the SNMP rules for independence in setting\n object values, it is necessary to do final error checking when\n an expression is evaluated, that is, when one of its instances\n in expValueTable is read or a delta interval expires. Earlier\n checking need not be done and an implementation may not impose\n any ordering on the creation of objects related to an\n expression.\n\n To maintain security of MIB information, when creating a new row in\n this table, the managed system must record the security credentials\n of the requester. These security credentials are the parameters\n necessary as inputs to isAccessAllowed from the Architecture for\n\n Describing SNMP Management Frameworks. When obtaining the objects\n that make up the expression, the system must (conceptually) use\n isAccessAllowed to ensure that it does not violate security.\n\n The evaluation of the expression takes place under the\n security credentials of the creator of its expExpressionEntry.\n\n Values of read-write objects in this table may be changed\n\n at any time.") expExpressionOwner = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0,32))) if mibBuilder.loadTexts: expExpressionOwner.setDescription('The owner of this entry. The exact semantics of this\n string are subject to the security policy defined by the\n security administrator.') expExpressionName = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1,32))) if mibBuilder.loadTexts: expExpressionName.setDescription('The name of the expression. This is locally unique, within\n the scope of an expExpressionOwner.') expExpression = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1,1024))).setMaxAccess("readcreate") if mibBuilder.loadTexts: expExpression.setDescription("The expression to be evaluated. This object is the same\n as a DisplayString (RFC 1903) except for its maximum length.\n\n Except for the variable names the expression is in ANSI C\n syntax. Only the subset of ANSI C operators and functions\n listed here is allowed.\n\n Variables are expressed as a dollar sign ('$') and an\n\n integer that corresponds to an expObjectIndex. An\n example of a valid expression is:\n\n ($1-$5)*100\n\n Expressions must not be recursive, that is although an expression\n may use the results of another expression, it must not contain\n any variable that is directly or indirectly a result of its own\n evaluation. The managed system must check for recursive\n expressions.\n\n The only allowed operators are:\n\n ( )\n - (unary)\n + - * / %\n & | ^ << >> ~\n ! && || == != > >= < <=\n\n Note the parentheses are included for parenthesizing the\n expression, not for casting data types.\n\n The only constant types defined are:\n\n int (32-bit signed)\n long (64-bit signed)\n unsigned int\n unsigned long\n hexadecimal\n character\n string\n oid\n\n The default type for a positive integer is int unless it is too\n large in which case it is long.\n\n All but oid are as defined for ANSI C. Note that a\n hexadecimal constant may end up as a scalar or an array of\n 8-bit integers. A string constant is enclosed in double\n quotes and may contain back-slashed individual characters\n as in ANSI C.\n\n An oid constant comprises 32-bit, unsigned integers and at\n least one period, for example:\n\n 0.\n .0\n 1.3.6.1\n\n No additional leading or trailing subidentifiers are automatically\n added to an OID constant. The constant is taken as expressed.\n\n Integer-typed objects are treated as 32- or 64-bit, signed\n or unsigned integers, as appropriate. The results of\n mixing them are as for ANSI C, including the type of the\n result. Note that a 32-bit value is thus promoted to 64 bits\n only in an operation with a 64-bit value. There is no\n provision for larger values to handle overflow.\n\n Relative to SNMP data types, a resulting value becomes\n unsigned when calculating it uses any unsigned value,\n including a counter. To force the final value to be of\n data type counter the expression must explicitly use the\n counter32() or counter64() function (defined below).\n\n OCTET STRINGS and OBJECT IDENTIFIERs are treated as\n one-dimensioned arrays of unsigned 8-bit integers and\n unsigned 32-bit integers, respectively.\n\n IpAddresses are treated as 32-bit, unsigned integers in\n network byte order, that is, the hex version of 255.0.0.0 is\n 0xff000000.\n\n Conditional expressions result in a 32-bit, unsigned integer\n of value 0 for false or 1 for true. When an arbitrary value\n is used as a boolean 0 is false and non-zero is true.\n\n Rules for the resulting data type from an operation, based on\n the operator:\n\n For << and >> the result is the same as the left hand operand.\n\n For &&, ||, ==, !=, <, <=, >, and >= the result is always\n Unsigned32.\n\n For unary - the result is always Integer32.\n\n For +, -, *, /, %, &, |, and ^ the result is promoted according\n to the following rules, in order from most to least preferred:\n\n If left hand and right hand operands are the same type,\n use that.\n\n If either side is Counter64, use that.\n\n If either side is IpAddress, use that.\n\n\n If either side is TimeTicks, use that.\n\n If either side is Counter32, use that.\n\n Otherwise use Unsigned32.\n\n The following rules say what operators apply with what data\n types. Any combination not explicitly defined does not work.\n\n For all operators any of the following can be the left hand or\n right hand operand: Integer32, Counter32, Unsigned32, Counter64.\n\n The operators +, -, *, /, %, <, <=, >, and >= work with\n TimeTicks.\n\n The operators &, |, and ^ work with IpAddress.\n\n The operators << and >> work with IpAddress but only as the\n left hand operand.\n\n The + operator performs a concatenation of two OCTET STRINGs or\n two OBJECT IDENTIFIERs.\n\n The operators &, | perform bitwise operations on OCTET STRINGs.\n If the OCTET STRING happens to be a DisplayString the results\n may be meaningless, but the agent system does not check this as\n some such systems do not have this information.\n\n The operators << and >> perform bitwise operations on OCTET\n STRINGs appearing as the left hand operand.\n\n The only functions defined are:\n\n counter32\n counter64\n arraySection\n stringBegins\n stringEnds\n stringContains\n oidBegins\n oidEnds\n oidContains\n average\n maximum\n minimum\n sum\n exists\n\n\n The following function definitions indicate their parameters by\n naming the data type of the parameter in the parameter's position\n in the parameter list. The parameter must be of the type indicated\n and generally may be a constant, a MIB object, a function, or an\n expression.\n\n counter32(integer) - wrapped around an integer value counter32\n forces Counter32 as a data type.\n\n counter64(integer) - similar to counter32 except that the\n resulting data type is 'counter64'.\n\n arraySection(array, integer, integer) - selects a piece of an\n array (i.e. part of an OCTET STRING or OBJECT IDENTIFIER). The\n integer arguments are in the range 0 to 4,294,967,295. The\n first is an initial array index (one-dimensioned) and the second\n is an ending array index. A value of 0 indicates first or last\n element, respectively. If the first element is larger than the\n array length the result is 0 length. If the second integer is\n less than or equal to the first, the result is 0 length. If the\n second is larger than the array length it indicates last\n element.\n\n stringBegins/Ends/Contains(octetString, octetString) - looks for\n the second string (which can be a string constant) in the first\n and returns the one-dimensioned arrayindex where the match began.\n A return value of 0 indicates no match (i.e. boolean false).\n\n oidBegins/Ends/Contains(oid, oid) - looks for the second OID\n (which can be an OID constant) in the first and returns the\n the one-dimensioned index where the match began. A return value\n of 0 indicates no match (i.e. boolean false).\n\n average/maximum/minimum(integer) - calculates the average,\n minimum, or maximum value of the integer valued object over\n multiple sample times. If the object disappears for any\n sample period, the accumulation and the resulting value object\n cease to exist until the object reappears at which point the\n calculation starts over.\n\n sum(integerObject*) - sums all available values of the\n wildcarded integer object, resulting in an integer scalar. Must\n be used with caution as it wraps on overflow with no\n notification.\n\n exists(anyTypeObject) - verifies the object instance exists. A\n return value of 0 indicates NoSuchInstance (i.e. boolean\n false).") expExpressionValueType = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8,))).clone(namedValues=NamedValues(("counter32", 1), ("unsigned32", 2), ("timeTicks", 3), ("integer32", 4), ("ipAddress", 5), ("octetString", 6), ("objectId", 7), ("counter64", 8),)).clone('counter32')).setMaxAccess("readcreate") if mibBuilder.loadTexts: expExpressionValueType.setDescription('The type of the expression value. One and only one of the\n value objects in expValueTable will be instantiated to match\n this type.\n\n If the result of the expression can not be made into this type,\n an invalidOperandType error will occur.') expExpressionComment = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 5), SnmpAdminString().clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: expExpressionComment.setDescription('A comment to explain the use or meaning of the expression.') expExpressionDeltaInterval = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0,86400))).setUnits('seconds').setMaxAccess("readcreate") if mibBuilder.loadTexts: expExpressionDeltaInterval.setDescription("Sampling interval for objects in this expression with\n expObjectSampleType 'deltaValue'.\n\n This object has no effect if the the expression has no\n deltaValue objects.\n\n A value of 0 indicates no automated sampling. In this case\n the delta is the difference from the last time the expression\n was evaluated. Note that this is subject to unpredictable\n delta times in the face of retries or multiple managers.\n\n A value greater than zero is the number of seconds between\n automated samples.\n\n Until the delta interval has expired once the delta for the\n\n object is effectively not instantiated and evaluating\n the expression has results as if the object itself were not\n instantiated.\n\n Note that delta values potentially consume large amounts of\n system CPU and memory. Delta state and processing must\n continue constantly even if the expression is not being used.\n That is, the expression is being evaluated every delta interval,\n even if no application is reading those values. For wildcarded\n objects this can be substantial overhead.\n\n Note that delta intervals, external expression value sampling\n intervals and delta intervals for expressions within other\n expressions can have unusual interactions as they are impossible\n to synchronize accurately. In general one interval embedded\n below another must be enough shorter that the higher sample\n sees relatively smooth, predictable behavior. So, for example,\n to avoid the higher level getting the same sample twice, the\n lower level should sample at least twice as fast as the higher\n level does.") expExpressionPrefix = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 7), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: expExpressionPrefix.setDescription('An object prefix to assist an application in determining\n the instance indexing to use in expValueTable, relieving the\n application of the need to scan the expObjectTable to\n determine such a prefix.\n\n See expObjectTable for information on wildcarded objects.\n\n If the expValueInstance portion of the value OID may\n be treated as a scalar (that is, normally, 0) the value of\n expExpressionPrefix is zero length, that is, no OID at all.\n Note that zero length implies a null OID, not the OID 0.0.\n\n Otherwise, the value of expExpressionPrefix is the expObjectID\n value of any one of the wildcarded objects for the expression.\n This is sufficient, as the remainder, that is, the instance\n fragment relevant to instancing the values, must be the same for\n all wildcarded objects in the expression.') expExpressionErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: expExpressionErrors.setDescription('The number of errors encountered while evaluating this\n expression.\n\n Note that an object in the expression not being accessible,\n is not considered an error. An example of an inaccessible\n object is when the object is excluded from the view of the\n user whose security credentials are used in the expression\n evaluation. In such cases, it is a legitimate condition\n that causes the corresponding expression value not to be\n instantiated.') expExpressionEntryStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 1, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: expExpressionEntryStatus.setDescription('The control that allows creation and deletion of entries.') expErrorTable = MibTable((1, 3, 6, 1, 2, 1, 90, 1, 2, 2), ) if mibBuilder.loadTexts: expErrorTable.setDescription('A table of expression errors.') expErrorEntry = MibTableRow((1, 3, 6, 1, 2, 1, 90, 1, 2, 2, 1), ).setIndexNames((0, "DISMAN-EXPRESSION-MIB", "expExpressionOwner"), (0, "DISMAN-EXPRESSION-MIB", "expExpressionName")) if mibBuilder.loadTexts: expErrorEntry.setDescription('Information about errors in processing an expression.\n\n Entries appear in this table only when there is a matching\n expExpressionEntry and then only when there has been an\n error for that expression as reflected by the error codes\n defined for expErrorCode.') expErrorTime = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 2, 1, 1), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: expErrorTime.setDescription('The value of sysUpTime the last time an error caused a\n failure to evaluate this expression.') expErrorIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: expErrorIndex.setDescription('The one-dimensioned character array index into\n expExpression for where the error occurred. The value\n zero indicates irrelevance.') expErrorCode = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,))).clone(namedValues=NamedValues(("invalidSyntax", 1), ("undefinedObjectIndex", 2), ("unrecognizedOperator", 3), ("unrecognizedFunction", 4), ("invalidOperandType", 5), ("unmatchedParenthesis", 6), ("tooManyWildcardValues", 7), ("recursion", 8), ("deltaTooShort", 9), ("resourceUnavailable", 10), ("divideByZero", 11),))).setMaxAccess("readonly") if mibBuilder.loadTexts: expErrorCode.setDescription("The error that occurred. In the following explanations the\n expected timing of the error is in parentheses. 'S' means\n the error occurs on a Set request. 'E' means the error\n\n occurs on the attempt to evaluate the expression either due to\n Get from expValueTable or in ongoing delta processing.\n\n invalidSyntax the value sent for expExpression is not\n valid Expression MIB expression syntax\n (S)\n undefinedObjectIndex an object reference ($n) in\n expExpression does not have a matching\n instance in expObjectTable (E)\n unrecognizedOperator the value sent for expExpression held an\n unrecognized operator (S)\n unrecognizedFunction the value sent for expExpression held an\n unrecognized function name (S)\n invalidOperandType an operand in expExpression is not the\n right type for the associated operator\n or result (SE)\n unmatchedParenthesis the value sent for expExpression is not\n correctly parenthesized (S)\n tooManyWildcardValues evaluating the expression exceeded the\n limit set by\n expResourceDeltaWildcardInstanceMaximum\n (E)\n recursion through some chain of embedded\n expressions the expression invokes itself\n (E)\n deltaTooShort the delta for the next evaluation passed\n before the system could evaluate the\n present sample (E)\n resourceUnavailable some resource, typically dynamic memory,\n was unavailable (SE)\n divideByZero an attempt to divide by zero occurred\n (E)\n\n For the errors that occur when the attempt is made to set\n expExpression Set request fails with the SNMP error code\n 'wrongValue'. Such failures refer to the most recent failure to\n Set expExpression, not to the present value of expExpression\n which must be either unset or syntactically correct.\n\n Errors that occur during evaluation for a Get* operation return\n the SNMP error code 'genErr' except for 'tooManyWildcardValues'\n and 'resourceUnavailable' which return the SNMP error code\n 'resourceUnavailable'.") expErrorInstance = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 2, 1, 4), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: expErrorInstance.setDescription('The expValueInstance being evaluated when the error\n occurred. A zero-length indicates irrelevance.') expObjectTable = MibTable((1, 3, 6, 1, 2, 1, 90, 1, 2, 3), ) if mibBuilder.loadTexts: expObjectTable.setDescription('A table of object definitions for each expExpression.\n\n Wildcarding instance IDs:\n\n It is legal to omit all or part of the instance portion for\n some or all of the objects in an expression. (See the\n DESCRIPTION of expObjectID for details. However, note that\n if more than one object in the same expression is wildcarded\n in this way, they all must be objects where that portion of\n the instance is the same. In other words, all objects may be\n in the same SEQUENCE or in different SEQUENCEs but with the\n same semantic index value (e.g., a value of ifIndex)\n for the wildcarded portion.') expObjectEntry = MibTableRow((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1), ).setIndexNames((0, "DISMAN-EXPRESSION-MIB", "expExpressionOwner"), (0, "DISMAN-EXPRESSION-MIB", "expExpressionName"), (0, "DISMAN-EXPRESSION-MIB", "expObjectIndex")) if mibBuilder.loadTexts: expObjectEntry.setDescription('Information about an object. An application uses\n expObjectEntryStatus to create entries in this table while\n in the process of defining an expression.\n\n Values of read-create objects in this table may be\n changed at any time.') expObjectIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1,4294967295))) if mibBuilder.loadTexts: expObjectIndex.setDescription("Within an expression, a unique, numeric identification for an\n object. Prefixed with a dollar sign ('$') this is used to\n reference the object in the corresponding expExpression.") expObjectID = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 2), ObjectIdentifier()).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectID.setDescription('The OBJECT IDENTIFIER (OID) of this object. The OID may be\n fully qualified, meaning it includes a complete instance\n identifier part (e.g., ifInOctets.1 or sysUpTime.0), or it\n may not be fully qualified, meaning it may lack all or part\n of the instance identifier. If the expObjectID is not fully\n qualified, then expObjectWildcard must be set to true(1).\n The value of the expression will be multiple\n values, as if done for a GetNext sweep of the object.\n\n An object here may itself be the result of an expression but\n recursion is not allowed.\n\n NOTE: The simplest implementations of this MIB may not allow\n wildcards.') expObjectIDWildcard = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 3), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectIDWildcard.setDescription('A true value indicates the expObjecID of this row is a wildcard\n object. False indicates that expObjectID is fully instanced.\n If all expObjectWildcard values for a given expression are FALSE,\n\n expExpressionPrefix will reflect a scalar object (i.e. will\n be 0.0).\n\n NOTE: The simplest implementations of this MIB may not allow\n wildcards.') expObjectSampleType = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("absoluteValue", 1), ("deltaValue", 2), ("changedValue", 3),)).clone('absoluteValue')).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectSampleType.setDescription("The method of sampling the selected variable.\n\n An 'absoluteValue' is simply the present value of the object.\n\n A 'deltaValue' is the present value minus the previous value,\n which was sampled expExpressionDeltaInterval seconds ago.\n This is intended primarily for use with SNMP counters, which are\n meaningless as an 'absoluteValue', but may be used with any\n integer-based value.\n\n A 'changedValue' is a boolean for whether the present value is\n different from the previous value. It is applicable to any data\n type and results in an Unsigned32 with value 1 if the object's\n value is changed and 0 if not. In all other respects it is as a\n 'deltaValue' and all statements and operation regarding delta\n values apply to changed values.\n\n When an expression contains both delta and absolute values\n the absolute values are obtained at the end of the delta\n period.") sysUpTimeInstance = MibIdentifier((1, 3, 6, 1, 2, 1, 1, 3, 0)) expObjectDeltaDiscontinuityID = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 5), ObjectIdentifier().clone((1, 3, 6, 1, 2, 1, 1, 3, 0))).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectDeltaDiscontinuityID.setDescription("The OBJECT IDENTIFIER (OID) of a TimeTicks, TimeStamp, or\n DateAndTime object that indicates a discontinuity in the value\n at expObjectID.\n\n\n This object is instantiated only if expObjectSampleType is\n 'deltaValue' or 'changedValue'.\n\n The OID may be for a leaf object (e.g. sysUpTime.0) or may\n be wildcarded to match expObjectID.\n\n This object supports normal checking for a discontinuity in a\n counter. Note that if this object does not point to sysUpTime\n discontinuity checking must still check sysUpTime for an overall\n discontinuity.\n\n If the object identified is not accessible no discontinuity\n check will be made.") expObjectDiscontinuityIDWildcard = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 6), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectDiscontinuityIDWildcard.setDescription("A true value indicates the expObjectDeltaDiscontinuityID of\n this row is a wildcard object. False indicates that\n expObjectDeltaDiscontinuityID is fully instanced.\n\n This object is instantiated only if expObjectSampleType is\n 'deltaValue' or 'changedValue'.\n\n NOTE: The simplest implementations of this MIB may not allow\n wildcards.") expObjectDiscontinuityIDType = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("timeTicks", 1), ("timeStamp", 2), ("dateAndTime", 3),)).clone('timeTicks')).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectDiscontinuityIDType.setDescription("The value 'timeTicks' indicates the expObjectDeltaDiscontinuityID\n of this row is of syntax TimeTicks. The value 'timeStamp' indicates\n syntax TimeStamp. The value 'dateAndTime indicates syntax\n DateAndTime.\n\n This object is instantiated only if expObjectSampleType is\n 'deltaValue' or 'changedValue'.") expObjectConditional = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 8), ObjectIdentifier().clone((0, 0))).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectConditional.setDescription('The OBJECT IDENTIFIER (OID) of an object that overrides\n whether the instance of expObjectID is to be considered\n usable. If the value of the object at expObjectConditional\n is 0 or not instantiated, the object at expObjectID is\n treated as if it is not instantiated. In other words,\n expObjectConditional is a filter that controls whether or\n not to use the value at expObjectID.\n\n The OID may be for a leaf object (e.g. sysObjectID.0) or may be\n wildcarded to match expObjectID. If expObject is wildcarded and\n expObjectID in the same row is not, the wild portion of\n expObjectConditional must match the wildcarding of the rest of\n the expression. If no object in the expression is wildcarded\n but expObjectConditional is, use the lexically first instance\n (if any) of expObjectConditional.\n\n If the value of expObjectConditional is 0.0 operation is\n as if the value pointed to by expObjectConditional is a\n non-zero (true) value.\n\n Note that expObjectConditional can not trivially use an object\n of syntax TruthValue, since the underlying value is not 0 or 1.') expObjectConditionalWildcard = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 9), TruthValue().clone('false')).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectConditionalWildcard.setDescription('A true value indicates the expObjectConditional of this row is\n a wildcard object. False indicates that expObjectConditional is\n fully instanced.\n\n NOTE: The simplest implementations of this MIB may not allow\n wildcards.') expObjectEntryStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 2, 3, 1, 10), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: expObjectEntryStatus.setDescription('The control that allows creation/deletion of entries.\n\n Objects in this table may be changed while\n expObjectEntryStatus is in any state.') expValueTable = MibTable((1, 3, 6, 1, 2, 1, 90, 1, 3, 1), ) if mibBuilder.loadTexts: expValueTable.setDescription('A table of values from evaluated expressions.') expValueEntry = MibTableRow((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1), ).setIndexNames((0, "DISMAN-EXPRESSION-MIB", "expExpressionOwner"), (0, "DISMAN-EXPRESSION-MIB", "expExpressionName"), (1, "DISMAN-EXPRESSION-MIB", "expValueInstance")) if mibBuilder.loadTexts: expValueEntry.setDescription("A single value from an evaluated expression. For a given\n instance, only one 'Val' object in the conceptual row will be\n instantiated, that is, the one with the appropriate type for\n the value. For values that contain no objects of\n expObjectSampleType 'deltaValue' or 'changedValue', reading a\n value from the table causes the evaluation of the expression\n for that value. For those that contain a 'deltaValue' or\n 'changedValue' the value read is as of the last sampling\n interval.\n\n If in the attempt to evaluate the expression one or more\n of the necessary objects is not available, the corresponding\n entry in this table is effectively not instantiated.\n\n To maintain security of MIB information, when creating a new\n row in this table, the managed system must record the security\n credentials of the requester. These security credentials are\n the parameters necessary as inputs to isAccessAllowed from\n [RFC2571]. When obtaining the objects that make up the\n expression, the system must (conceptually) use isAccessAllowed to\n ensure that it does not violate security.\n\n The evaluation of that expression takes place under the\n\n security credentials of the creator of its expExpressionEntry.\n\n To maintain security of MIB information, expression evaluation must\n take place using security credentials for the implied Gets of the\n objects in the expression as inputs (conceptually) to\n isAccessAllowed from the Architecture for Describing SNMP\n Management Frameworks. These are the security credentials of the\n creator of the corresponding expExpressionEntry.") expValueInstance = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 1), ObjectIdentifier()) if mibBuilder.loadTexts: expValueInstance.setDescription("The final instance portion of a value's OID according to\n the wildcarding in instances of expObjectID for the\n expression. The prefix of this OID fragment is 0.0,\n leading to the following behavior.\n\n If there is no wildcarding, the value is 0.0.0. In other\n words, there is one value which standing alone would have\n been a scalar with a 0 at the end of its OID.\n\n If there is wildcarding, the value is 0.0 followed by\n a value that the wildcard can take, thus defining one value\n instance for each real, possible value of the wildcard.\n So, for example, if the wildcard worked out to be an ifIndex,\n there is an expValueInstance for each applicable ifIndex.") expValueCounter32Val = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueCounter32Val.setDescription("The value when expExpressionValueType is 'counter32'.") expValueUnsigned32Val = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueUnsigned32Val.setDescription("The value when expExpressionValueType is 'unsigned32'.") expValueTimeTicksVal = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueTimeTicksVal.setDescription("The value when expExpressionValueType is 'timeTicks'.") expValueInteger32Val = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueInteger32Val.setDescription("The value when expExpressionValueType is 'integer32'.") expValueIpAddressVal = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 6), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueIpAddressVal.setDescription("The value when expExpressionValueType is 'ipAddress'.") expValueOctetStringVal = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,65536))).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueOctetStringVal.setDescription("The value when expExpressionValueType is 'octetString'.") expValueOidVal = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 8), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueOidVal.setDescription("The value when expExpressionValueType is 'objectId'.") expValueCounter64Val = MibTableColumn((1, 3, 6, 1, 2, 1, 90, 1, 3, 1, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: expValueCounter64Val.setDescription("The value when expExpressionValueType is 'counter64'.") dismanExpressionMIBConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 3)) dismanExpressionMIBCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 3, 1)) dismanExpressionMIBGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 90, 3, 2)) dismanExpressionMIBCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 90, 3, 1, 1)).setObjects(*(("DISMAN-EXPRESSION-MIB", "dismanExpressionResourceGroup"), ("DISMAN-EXPRESSION-MIB", "dismanExpressionDefinitionGroup"), ("DISMAN-EXPRESSION-MIB", "dismanExpressionValueGroup"),)) if mibBuilder.loadTexts: dismanExpressionMIBCompliance.setDescription('The compliance statement for entities which implement\n the Expression MIB.') dismanExpressionResourceGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 90, 3, 2, 1)).setObjects(*(("DISMAN-EXPRESSION-MIB", "expResourceDeltaMinimum"), ("DISMAN-EXPRESSION-MIB", "expResourceDeltaWildcardInstanceMaximum"), ("DISMAN-EXPRESSION-MIB", "expResourceDeltaWildcardInstances"), ("DISMAN-EXPRESSION-MIB", "expResourceDeltaWildcardInstancesHigh"), ("DISMAN-EXPRESSION-MIB", "expResourceDeltaWildcardInstanceResourceLacks"),)) if mibBuilder.loadTexts: dismanExpressionResourceGroup.setDescription('Expression definition resource management.') dismanExpressionDefinitionGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 90, 3, 2, 2)).setObjects(*(("DISMAN-EXPRESSION-MIB", "expExpression"), ("DISMAN-EXPRESSION-MIB", "expExpressionValueType"), ("DISMAN-EXPRESSION-MIB", "expExpressionComment"), ("DISMAN-EXPRESSION-MIB", "expExpressionDeltaInterval"), ("DISMAN-EXPRESSION-MIB", "expExpressionPrefix"), ("DISMAN-EXPRESSION-MIB", "expExpressionErrors"), ("DISMAN-EXPRESSION-MIB", "expExpressionEntryStatus"), ("DISMAN-EXPRESSION-MIB", "expErrorTime"), ("DISMAN-EXPRESSION-MIB", "expErrorIndex"), ("DISMAN-EXPRESSION-MIB", "expErrorCode"), ("DISMAN-EXPRESSION-MIB", "expErrorInstance"), ("DISMAN-EXPRESSION-MIB", "expObjectID"), ("DISMAN-EXPRESSION-MIB", "expObjectIDWildcard"), ("DISMAN-EXPRESSION-MIB", "expObjectSampleType"), ("DISMAN-EXPRESSION-MIB", "expObjectDeltaDiscontinuityID"), ("DISMAN-EXPRESSION-MIB", "expObjectDiscontinuityIDWildcard"), ("DISMAN-EXPRESSION-MIB", "expObjectDiscontinuityIDType"), ("DISMAN-EXPRESSION-MIB", "expObjectConditional"), ("DISMAN-EXPRESSION-MIB", "expObjectConditionalWildcard"), ("DISMAN-EXPRESSION-MIB", "expObjectEntryStatus"),)) if mibBuilder.loadTexts: dismanExpressionDefinitionGroup.setDescription('Expression definition.') dismanExpressionValueGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 90, 3, 2, 3)).setObjects(*(("DISMAN-EXPRESSION-MIB", "expValueCounter32Val"), ("DISMAN-EXPRESSION-MIB", "expValueUnsigned32Val"), ("DISMAN-EXPRESSION-MIB", "expValueTimeTicksVal"), ("DISMAN-EXPRESSION-MIB", "expValueInteger32Val"), ("DISMAN-EXPRESSION-MIB", "expValueIpAddressVal"), ("DISMAN-EXPRESSION-MIB", "expValueOctetStringVal"), ("DISMAN-EXPRESSION-MIB", "expValueOidVal"), ("DISMAN-EXPRESSION-MIB", "expValueCounter64Val"),)) if mibBuilder.loadTexts: dismanExpressionValueGroup.setDescription('Expression value.') mibBuilder.exportSymbols("DISMAN-EXPRESSION-MIB", dismanExpressionMIBCompliances=dismanExpressionMIBCompliances, expExpressionComment=expExpressionComment, expObjectDiscontinuityIDType=expObjectDiscontinuityIDType, expObjectDiscontinuityIDWildcard=expObjectDiscontinuityIDWildcard, expValueTable=expValueTable, expResource=expResource, expExpressionPrefix=expExpressionPrefix, expObjectTable=expObjectTable, expValueIpAddressVal=expValueIpAddressVal, expObjectDeltaDiscontinuityID=expObjectDeltaDiscontinuityID, expErrorInstance=expErrorInstance, expObjectEntry=expObjectEntry, dismanExpressionResourceGroup=dismanExpressionResourceGroup, expObjectConditional=expObjectConditional, expExpressionEntryStatus=expExpressionEntryStatus, expExpressionTable=expExpressionTable, expValueCounter32Val=expValueCounter32Val, expErrorTable=expErrorTable, PYSNMP_MODULE_ID=dismanExpressionMIB, expExpressionDeltaInterval=expExpressionDeltaInterval, expValueInstance=expValueInstance, expExpression=expExpression, expValueTimeTicksVal=expValueTimeTicksVal, expErrorTime=expErrorTime, expResourceDeltaWildcardInstanceResourceLacks=expResourceDeltaWildcardInstanceResourceLacks, expValueEntry=expValueEntry, dismanExpressionMIB=dismanExpressionMIB, dismanExpressionMIBGroups=dismanExpressionMIBGroups, expObjectIndex=expObjectIndex, expObjectConditionalWildcard=expObjectConditionalWildcard, dismanExpressionMIBObjects=dismanExpressionMIBObjects, expValueOidVal=expValueOidVal, dismanExpressionMIBConformance=dismanExpressionMIBConformance, expResourceDeltaMinimum=expResourceDeltaMinimum, sysUpTimeInstance=sysUpTimeInstance, expResourceDeltaWildcardInstances=expResourceDeltaWildcardInstances, expExpressionEntry=expExpressionEntry, expExpressionValueType=expExpressionValueType, expObjectSampleType=expObjectSampleType, expErrorCode=expErrorCode, expDefine=expDefine, expExpressionErrors=expExpressionErrors, expValueUnsigned32Val=expValueUnsigned32Val, expValueCounter64Val=expValueCounter64Val, expExpressionOwner=expExpressionOwner, dismanExpressionDefinitionGroup=dismanExpressionDefinitionGroup, dismanExpressionMIBCompliance=dismanExpressionMIBCompliance, expObjectID=expObjectID, expErrorIndex=expErrorIndex, expResourceDeltaWildcardInstancesHigh=expResourceDeltaWildcardInstancesHigh, expValueOctetStringVal=expValueOctetStringVal, expObjectEntryStatus=expObjectEntryStatus, dismanExpressionValueGroup=dismanExpressionValueGroup, expObjectIDWildcard=expObjectIDWildcard, expExpressionName=expExpressionName, expErrorEntry=expErrorEntry, expValueInteger32Val=expValueInteger32Val, expResourceDeltaWildcardInstanceMaximum=expResourceDeltaWildcardInstanceMaximum, expValue=expValue)
q = int(input()) for i in range(q): l1,r1,l2,r2 = map(int, input().split()) if l2 < l1 and r2 < r1: print(l1, l2) else: print(l1,r2)
API_URL = "https://keel.algida.me/electra/api/promo" AppKey = "4125C97A-D92E-4F60-82C2-CC6CA5A3E683" LoginResponse = { "key": "Message", "wrong": { "values": ["Girmiş olduğunuz cep telefonu numarası sistemde kayıtlı değildir, lütfen kontrol edip tekrar deneyiniz"], "code": 1 }, "correct": { "values": ["Lütfen giriş yapmak için cep telefonunuza gönderilen kodu giriniz"], "code": 0 }, "error": { "values": ["Kısa bir süre içerisinde çok fazla istekte bulundunuz, lütfen daha sonra tekrar deneyiniz"], "code": 2 } } OtpResponse = { "key": "Message", "wrong": { "values": ["Girdiğiniz kod doğrulanamamıştır, lütfen tekrar deneyiniz."], "code": 1 }, "correct": { "values": ["Algida dünyasına yönlendiriliyorsun."], "code": 0, "auth": [ "CustomerID", "Token", "RefreshToken", "UCID" ] }, "error": { "values": ["Kısa bir süre içerisinde çok fazla istekte bulundunuz, lütfen daha sonra tekrar deneyiniz"], "code": 2 } } LogFile = "logs.txt" ErrorFile = "errors.txt"
"proto_scala_library.bzl provides a scala_library for proto files." load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") def proto_scala_library(**kwargs): scala_library(**kwargs)
isbn = input().split('-') offset = 0 weight = 1 for i in range(3): for j in isbn[i]: offset = offset + int(j) * weight weight += 1 offset = offset % 11 if offset == 10 and isbn[3] == 'X': print('Right') elif offset < 10 and str(offset) == isbn[3]: print('Right') else: if offset == 10: offset = 'X' print('-'.join([isbn[0], isbn[1], isbn[2], str(offset)]))
def find_missing( current_list, target_list ): return [ x for x in target_list if x not in current_list ] def compare( current_list, target_list ): additions_list = find_missing( current_list, target_list ) deletions_list = find_missing( target_list, current_list ) return { 'additions': additions_list, 'deletions': deletions_list }
# Escreva um programa que vai ler a velocidade de um carro. Se ele ultrapassar 80Km/h, # mostre uma mensagem caso ultrapasse os 80Km/h dizendo que ele foi multado. # A multa vai custar R$ 7,00 por Km acima da média. Calcule o valor da multa e mostre junto da mensagem também. print('A velocidade máxima é de 80Km/h! Caso ultrapasse terá multa de R$7,00 por Km infringido!') currentSpeed = float(input('Olá, informe a sua velocidade atual: ')) if currentSpeed > 80: trafficTicketValue = (currentSpeed - 80) * 7 print('Você está à {} Km/h, {} Km/h acima do limite!'.format(currentSpeed, currentSpeed - 80)) print('Você deve pagar R$ {:.2f} de multa!'.format(trafficTicketValue)) else: print('Você está dentro do limite de velocidade, tenha um bom dia!')
def __len__(self): """Method to behave like a list and iterate in the object""" if self.nb_simu != None: return self.nb_simu else: return len(self.output_list)
# # PySNMP MIB module Wellfleet-AT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-AT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:32:44 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") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ObjectIdentity, MibIdentifier, ModuleIdentity, Bits, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, TimeTicks, Integer32, Unsigned32, IpAddress, Counter64, NotificationType, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "MibIdentifier", "ModuleIdentity", "Bits", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "TimeTicks", "Integer32", "Unsigned32", "IpAddress", "Counter64", "NotificationType", "Counter32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") wfAppletalkGroup, = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfAppletalkGroup") wfAppleBase = MibIdentifier((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1)) wfAppleBaseDelete = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseDelete.setStatus('mandatory') wfAppleBaseDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseDisable.setStatus('mandatory') wfAppleBaseState = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3), ("notpres", 4))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleBaseState.setStatus('mandatory') wfAppleBaseDebugLevel = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseDebugLevel.setStatus('mandatory') wfAppleBaseDdpQueLen = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 2147483647)).clone(20)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseDdpQueLen.setStatus('mandatory') wfAppleBaseHomedPort = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseHomedPort.setStatus('mandatory') wfAppleBaseTotalNets = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleBaseTotalNets.setStatus('mandatory') wfAppleBaseTotalZones = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleBaseTotalZones.setStatus('mandatory') wfAppleBaseTotalZoneNames = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleBaseTotalZoneNames.setStatus('mandatory') wfAppleBaseTotalAarpEntries = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleBaseTotalAarpEntries.setStatus('mandatory') wfAppleBaseEstimatedNets = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 11), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseEstimatedNets.setStatus('mandatory') wfAppleBaseEstimatedHosts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleBaseEstimatedHosts.setStatus('mandatory') wfAppleMacIPBaseDelete = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('deleted')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleMacIPBaseDelete.setStatus('mandatory') wfAppleMacIPBaseDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleMacIPBaseDisable.setStatus('mandatory') wfAppleMacIPBaseState = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3), ("notpres", 4))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleMacIPBaseState.setStatus('mandatory') wfAppleMacIPZone = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 16), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleMacIPZone.setStatus('mandatory') wfMacIPAddress1 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 17), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPAddress1.setStatus('mandatory') wfMacIPLowerIpAddress1 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 254)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPLowerIpAddress1.setStatus('mandatory') wfMacIPUpperIpAddress1 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 254)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPUpperIpAddress1.setStatus('mandatory') wfMacIPAddress2 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 20), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPAddress2.setStatus('mandatory') wfMacIPLowerIpAddress2 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 254)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPLowerIpAddress2.setStatus('mandatory') wfMacIPUpperIpAddress2 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 254)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPUpperIpAddress2.setStatus('mandatory') wfMacIPAddress3 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 23), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPAddress3.setStatus('mandatory') wfMacIPLowerIpAddress3 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 254)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPLowerIpAddress3.setStatus('mandatory') wfMacIPUpperIpAddress3 = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 254)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfMacIPUpperIpAddress3.setStatus('mandatory') wfAppleMacIPAddressTimeOut = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleMacIPAddressTimeOut.setStatus('mandatory') wfAppleMacIPServerRequests = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 27), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleMacIPServerRequests.setStatus('mandatory') wfAppleMacIPServerResponces = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 1, 28), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleMacIPServerResponces.setStatus('mandatory') wfAppleRtmpTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2), ) if mibBuilder.loadTexts: wfAppleRtmpTable.setStatus('mandatory') wfAppleRtmpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfAppleRtmpNetStart"), (0, "Wellfleet-AT-MIB", "wfAppleRtmpNetEnd")) if mibBuilder.loadTexts: wfAppleRtmpEntry.setStatus('mandatory') wfAppleRtmpNetStart = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpNetStart.setStatus('mandatory') wfAppleRtmpNetEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpNetEnd.setStatus('mandatory') wfAppleRtmpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpPort.setStatus('mandatory') wfAppleRtmpHops = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpHops.setStatus('mandatory') wfAppleRtmpNextHopNet = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpNextHopNet.setStatus('mandatory') wfAppleRtmpNextHopNode = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpNextHopNode.setStatus('mandatory') wfAppleRtmpState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("good", 1), ("suspect", 2), ("goingbad", 3), ("bad", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpState.setStatus('mandatory') wfAppleRtmpProto = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("rtmp", 1), ("aurp", 2), ("static", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpProto.setStatus('mandatory') wfAppleRtmpAurpNextHopIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 2, 1, 9), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleRtmpAurpNextHopIpAddress.setStatus('mandatory') wfApplePortTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3), ) if mibBuilder.loadTexts: wfApplePortTable.setStatus('mandatory') wfApplePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfApplePortCircuit")) if mibBuilder.loadTexts: wfApplePortEntry.setStatus('mandatory') wfApplePortDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortDelete.setStatus('mandatory') wfApplePortDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortDisable.setStatus('mandatory') wfApplePortCircuit = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCircuit.setStatus('mandatory') wfApplePortState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortState.setStatus('mandatory') wfApplePortType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortType.setStatus('mandatory') wfApplePortCksumDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortCksumDisable.setStatus('mandatory') wfApplePortTrEndStation = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortTrEndStation.setStatus('mandatory') wfApplePortGniForever = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortGniForever.setStatus('obsolete') wfApplePortAarpFlush = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortAarpFlush.setStatus('mandatory') wfApplePortMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 10), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortMacAddress.setStatus('mandatory') wfApplePortNodeId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 11), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortNodeId.setStatus('mandatory') wfApplePortNetwork = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortNetwork.setStatus('mandatory') wfApplePortNetStart = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 13), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortNetStart.setStatus('mandatory') wfApplePortNetEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortNetEnd.setStatus('mandatory') wfApplePortDfltZone = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 15), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortDfltZone.setStatus('mandatory') wfApplePortCurMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 16), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCurMacAddress.setStatus('mandatory') wfApplePortCurNodeId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCurNodeId.setStatus('mandatory') wfApplePortCurNetwork = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCurNetwork.setStatus('mandatory') wfApplePortCurNetStart = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCurNetStart.setStatus('mandatory') wfApplePortCurNetEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCurNetEnd.setStatus('mandatory') wfApplePortCurDfltZone = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 21), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortCurDfltZone.setStatus('mandatory') wfApplePortAarpProbeRxs = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortAarpProbeRxs.setStatus('mandatory') wfApplePortAarpProbeTxs = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortAarpProbeTxs.setStatus('mandatory') wfApplePortAarpReqRxs = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortAarpReqRxs.setStatus('mandatory') wfApplePortAarpReqTxs = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortAarpReqTxs.setStatus('mandatory') wfApplePortAarpRspRxs = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortAarpRspRxs.setStatus('mandatory') wfApplePortAarpRspTxs = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortAarpRspTxs.setStatus('mandatory') wfApplePortDdpOutRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpOutRequests.setStatus('mandatory') wfApplePortDdpInReceives = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpInReceives.setStatus('mandatory') wfApplePortDdpInLocalDatagrams = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpInLocalDatagrams.setStatus('mandatory') wfApplePortDdpNoProtocolHandlers = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpNoProtocolHandlers.setStatus('mandatory') wfApplePortDdpTooShortErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpTooShortErrors.setStatus('mandatory') wfApplePortDdpTooLongErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpTooLongErrors.setStatus('mandatory') wfApplePortDdpChecksumErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpChecksumErrors.setStatus('mandatory') wfApplePortDdpForwRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpForwRequests.setStatus('mandatory') wfApplePortDdpOutNoRoutes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpOutNoRoutes.setStatus('mandatory') wfApplePortDdpBroadcastErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 37), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpBroadcastErrors.setStatus('mandatory') wfApplePortDdpHopCountErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortDdpHopCountErrors.setStatus('mandatory') wfApplePortRtmpInDataPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpInDataPkts.setStatus('mandatory') wfApplePortRtmpOutDataPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpOutDataPkts.setStatus('mandatory') wfApplePortRtmpInRequestPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 41), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpInRequestPkts.setStatus('mandatory') wfApplePortRtmpNextIREqualChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpNextIREqualChanges.setStatus('mandatory') wfApplePortRtmpNextIRLessChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 43), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpNextIRLessChanges.setStatus('mandatory') wfApplePortRtmpRouteDeletes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpRouteDeletes.setStatus('mandatory') wfApplePortRtmpNetworkMismatchErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 45), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpNetworkMismatchErrors.setStatus('mandatory') wfApplePortRtmpRoutingTableOverflows = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 46), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortRtmpRoutingTableOverflows.setStatus('mandatory') wfApplePortZipInZipQueries = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 47), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInZipQueries.setStatus('mandatory') wfApplePortZipInZipReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 48), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInZipReplies.setStatus('mandatory') wfApplePortZipOutZipReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 49), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutZipReplies.setStatus('mandatory') wfApplePortZipInZipExtendedReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 50), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInZipExtendedReplies.setStatus('mandatory') wfApplePortZipOutZipExtendedReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 51), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutZipExtendedReplies.setStatus('mandatory') wfApplePortZipInGetZoneLists = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 52), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInGetZoneLists.setStatus('mandatory') wfApplePortZipOutGetZoneListReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 53), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutGetZoneListReplies.setStatus('mandatory') wfApplePortZipInGetLocalZones = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 54), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInGetLocalZones.setStatus('mandatory') wfApplePortZipOutGetLocalZoneReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 55), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutGetLocalZoneReplies.setStatus('mandatory') wfApplePortZipInGetMyZones = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 56), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInGetMyZones.setStatus('obsolete') wfApplePortZipOutGetMyZoneReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 57), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutGetMyZoneReplies.setStatus('obsolete') wfApplePortZipZoneConflictErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 58), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipZoneConflictErrors.setStatus('mandatory') wfApplePortZipInGetNetInfos = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 59), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInGetNetInfos.setStatus('mandatory') wfApplePortZipOutGetNetInfoReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 60), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutGetNetInfoReplies.setStatus('mandatory') wfApplePortZipZoneOutInvalids = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 61), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipZoneOutInvalids.setStatus('mandatory') wfApplePortZipAddressInvalids = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 62), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipAddressInvalids.setStatus('mandatory') wfApplePortZipOutGetNetInfos = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 63), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutGetNetInfos.setStatus('mandatory') wfApplePortZipInGetNetInfoReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 64), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInGetNetInfoReplies.setStatus('mandatory') wfApplePortZipOutZipQueries = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 65), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipOutZipQueries.setStatus('mandatory') wfApplePortZipInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 66), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortZipInErrors.setStatus('mandatory') wfApplePortNbpInLookUpRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 67), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpInLookUpRequests.setStatus('mandatory') wfApplePortNbpInLookUpReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 68), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpInLookUpReplies.setStatus('mandatory') wfApplePortNbpInBroadcastRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 69), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpInBroadcastRequests.setStatus('mandatory') wfApplePortNbpInForwardRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 70), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpInForwardRequests.setStatus('mandatory') wfApplePortNbpOutLookUpRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 71), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpOutLookUpRequests.setStatus('mandatory') wfApplePortNbpOutLookUpReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 72), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpOutLookUpReplies.setStatus('mandatory') wfApplePortNbpOutBroadcastRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 73), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpOutBroadcastRequests.setStatus('mandatory') wfApplePortNbpOutForwardRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 74), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpOutForwardRequests.setStatus('mandatory') wfApplePortNbpRegistrationFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 75), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpRegistrationFailures.setStatus('mandatory') wfApplePortNbpInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 76), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortNbpInErrors.setStatus('mandatory') wfApplePortEchoRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 77), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortEchoRequests.setStatus('mandatory') wfApplePortEchoReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 78), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfApplePortEchoReplies.setStatus('mandatory') wfApplePortInterfaceCost = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 79), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(15))).clone(namedValues=NamedValues(("cost", 15)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortInterfaceCost.setStatus('mandatory') wfApplePortWanBroadcastAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 80), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortWanBroadcastAddress.setStatus('mandatory') wfApplePortWanSplitHorizonDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 81), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortWanSplitHorizonDisable.setStatus('mandatory') wfApplePortZoneFilterType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 82), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("allow", 1), ("deny", 2), ("partallow", 3), ("partdeny", 4))).clone('deny')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortZoneFilterType.setStatus('mandatory') wfApplePortMacIPDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 3, 1, 83), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfApplePortMacIPDisable.setStatus('mandatory') wfAppleLclZoneTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 4), ) if mibBuilder.loadTexts: wfAppleLclZoneTable.setStatus('mandatory') wfAppleLclZoneEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 4, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfAppleLclZonePortCircuit"), (0, "Wellfleet-AT-MIB", "wfAppleLclZoneIndex")) if mibBuilder.loadTexts: wfAppleLclZoneEntry.setStatus('mandatory') wfAppleLclZoneDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 4, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleLclZoneDelete.setStatus('mandatory') wfAppleLclZonePortCircuit = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 4, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleLclZonePortCircuit.setStatus('mandatory') wfAppleLclZoneIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 4, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleLclZoneIndex.setStatus('mandatory') wfAppleLclZoneName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 4, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleLclZoneName.setStatus('mandatory') wfAppleAarpTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 5), ) if mibBuilder.loadTexts: wfAppleAarpTable.setStatus('mandatory') wfAppleAarpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 5, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfAppleAarpNet"), (0, "Wellfleet-AT-MIB", "wfAppleAarpNode"), (0, "Wellfleet-AT-MIB", "wfAppleAarpIfIndex")) if mibBuilder.loadTexts: wfAppleAarpEntry.setStatus('mandatory') wfAppleAarpIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 5, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAarpIfIndex.setStatus('mandatory') wfAppleAarpNet = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 5, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAarpNet.setStatus('mandatory') wfAppleAarpNode = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 5, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAarpNode.setStatus('mandatory') wfAppleAarpPhysAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 5, 1, 4), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAarpPhysAddress.setStatus('mandatory') wfAppleZipTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6), ) if mibBuilder.loadTexts: wfAppleZipTable.setStatus('mandatory') wfAppleZipEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfAppleZipZoneNetStart"), (0, "Wellfleet-AT-MIB", "wfAppleZipIndex")) if mibBuilder.loadTexts: wfAppleZipEntry.setStatus('mandatory') wfAppleZipZoneNetStart = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleZipZoneNetStart.setStatus('mandatory') wfAppleZipZoneNetEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleZipZoneNetEnd.setStatus('mandatory') wfAppleZipIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleZipIndex.setStatus('mandatory') wfAppleZipZoneName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleZipZoneName.setStatus('mandatory') wfAppleZipZoneState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("valid", 1), ("invalid", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleZipZoneState.setStatus('mandatory') wfAppleZoneFilterTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7), ) if mibBuilder.loadTexts: wfAppleZoneFilterTable.setStatus('mandatory') wfAppleZoneFilterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfAppleZoneFilterIndex")) if mibBuilder.loadTexts: wfAppleZoneFilterEntry.setStatus('mandatory') wfAppleZoneFilterDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleZoneFilterDelete.setStatus('mandatory') wfAppleZoneFilterCircuit = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleZoneFilterCircuit.setStatus('mandatory') wfAppleZoneFilterIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleZoneFilterIpAddress.setStatus('mandatory') wfAppleZoneFilterCircuitType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("rtmp", 1), ("aurp", 2))).clone('rtmp')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleZoneFilterCircuitType.setStatus('mandatory') wfAppleZoneFilterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleZoneFilterIndex.setStatus('mandatory') wfAppleZoneFilterName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 7, 1, 6), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleZoneFilterName.setStatus('mandatory') wfAppleAurpBase = MibIdentifier((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8)) wfAppleAurpBaseDelete = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpBaseDelete.setStatus('mandatory') wfAppleAurpBaseDisable = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpBaseDisable.setStatus('mandatory') wfAppleAurpBaseState = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("init", 3), ("notpres", 4))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpBaseState.setStatus('mandatory') wfAppleAurpBaseDomain = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 4), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpBaseDomain.setStatus('mandatory') wfAppleAurpBaseIpAddress = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 5), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpBaseIpAddress.setStatus('mandatory') wfAppleAurpBasePromiscuous = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("notpromisc", 1), ("promisc", 2))).clone('notpromisc')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpBasePromiscuous.setStatus('mandatory') wfAppleAurpBaseInAcceptedOpenReqs = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpBaseInAcceptedOpenReqs.setStatus('mandatory') wfAppleAurpBaseInRejectedOpenReqs = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpBaseInRejectedOpenReqs.setStatus('mandatory') wfAppleAurpBaseInRouterDowns = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpBaseInRouterDowns.setStatus('mandatory') wfAppleAurpBaseInPktsNoPeers = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpBaseInPktsNoPeers.setStatus('mandatory') wfAppleAurpBaseInInvalidVerions = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 8, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpBaseInInvalidVerions.setStatus('mandatory') wfAppleAurpTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9), ) if mibBuilder.loadTexts: wfAppleAurpTable.setStatus('mandatory') wfAppleAurpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1), ).setIndexNames((0, "Wellfleet-AT-MIB", "wfAppleAurpEntryIpAddress")) if mibBuilder.loadTexts: wfAppleAurpEntry.setStatus('mandatory') wfAppleAurpEntryDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryDelete.setStatus('mandatory') wfAppleAurpEntryDisable = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryDisable.setStatus('mandatory') wfAppleAurpEntryState = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2))).clone('down')).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryState.setStatus('mandatory') wfAppleAurpEntryIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryIpAddress.setStatus('mandatory') wfAppleAurpEntryZoneFilterType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("allow", 1), ("deny", 2), ("partallow", 3), ("partdeny", 4))).clone('deny')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryZoneFilterType.setStatus('mandatory') wfAppleAurpEntryTimeoutCommand = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000)).clone(3)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryTimeoutCommand.setStatus('mandatory') wfAppleAurpEntryRetryCommand = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100)).clone(3)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryRetryCommand.setStatus('mandatory') wfAppleAurpEntryUpdateRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 604800)).clone(30)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryUpdateRate.setStatus('mandatory') wfAppleAurpEntryLhfTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(30, 31536000)).clone(90)).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryLhfTimeout.setStatus('mandatory') wfAppleAurpEntryHopCountReduction = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryHopCountReduction.setStatus('mandatory') wfAppleAurpEntryInterfaceCost = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 11), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryInterfaceCost.setStatus('mandatory') wfAppleAurpEntrySuiFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(30720))).clone(namedValues=NamedValues(("all", 30720))).clone('all')).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntrySuiFlags.setStatus('mandatory') wfAppleAurpEntryType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 13), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryType.setStatus('mandatory') wfAppleAurpEntryPeerDomainId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 14), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryPeerDomainId.setStatus('mandatory') wfAppleAurpEntryPeerUpdateRate = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryPeerUpdateRate.setStatus('mandatory') wfAppleAurpEntryPeerEnvironment = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryPeerEnvironment.setStatus('mandatory') wfAppleAurpEntryPeerSuiFlags = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryPeerSuiFlags.setStatus('mandatory') wfAppleAurpEntryCliConnId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryCliConnId.setStatus('mandatory') wfAppleAurpEntrySrvConnId = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntrySrvConnId.setStatus('mandatory') wfAppleAurpEntryCliSeqNum = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryCliSeqNum.setStatus('mandatory') wfAppleAurpEntrySrvSeqNum = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntrySrvSeqNum.setStatus('mandatory') wfAppleAurpEntryCommandRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryCommandRetries.setStatus('mandatory') wfAppleAurpEntryInDelayedDuplicates = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInDelayedDuplicates.setStatus('mandatory') wfAppleAurpEntryInInvalidConnIds = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInInvalidConnIds.setStatus('mandatory') wfAppleAurpEntryInInvalidCommands = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInInvalidCommands.setStatus('mandatory') wfAppleAurpEntryInInvalidSubCodes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInInvalidSubCodes.setStatus('mandatory') wfAppleAurpEntryInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInPkts.setStatus('mandatory') wfAppleAurpEntryOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutPkts.setStatus('mandatory') wfAppleAurpEntryInDdpPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInDdpPkts.setStatus('mandatory') wfAppleAurpEntryOutDdpPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutDdpPkts.setStatus('mandatory') wfAppleAurpEntryOutNoRoutes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutNoRoutes.setStatus('mandatory') wfAppleAurpEntryHopCountErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryHopCountErrors.setStatus('mandatory') wfAppleAurpEntryHopCountAdjustments = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryHopCountAdjustments.setStatus('mandatory') wfAppleAurpEntryInAurpPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInAurpPkts.setStatus('mandatory') wfAppleAurpEntryOutAurpPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutAurpPkts.setStatus('mandatory') wfAppleAurpEntryInOpenRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInOpenRequests.setStatus('mandatory') wfAppleAurpEntryOutOpenRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 37), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutOpenRequests.setStatus('mandatory') wfAppleAurpEntryInOpenResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInOpenResponses.setStatus('mandatory') wfAppleAurpEntryOutOpenResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutOpenResponses.setStatus('mandatory') wfAppleAurpEntryInRiRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInRiRequests.setStatus('mandatory') wfAppleAurpEntryOutRiRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 41), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutRiRequests.setStatus('mandatory') wfAppleAurpEntryInRiResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInRiResponses.setStatus('mandatory') wfAppleAurpEntryOutRiResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 43), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutRiResponses.setStatus('mandatory') wfAppleAurpEntryInRiAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInRiAcks.setStatus('mandatory') wfAppleAurpEntryOutRiAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 45), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutRiAcks.setStatus('mandatory') wfAppleAurpEntryInRiUpdates = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 46), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInRiUpdates.setStatus('mandatory') wfAppleAurpEntryOutRiUpdates = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 47), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutRiUpdates.setStatus('mandatory') wfAppleAurpEntryInUpdateNullEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 48), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateNullEvents.setStatus('mandatory') wfAppleAurpEntryOutUpdateNullEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 49), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateNullEvents.setStatus('mandatory') wfAppleAurpEntryInUpdateNetAdds = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 50), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateNetAdds.setStatus('mandatory') wfAppleAurpEntryOutUpdateNetAdds = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 51), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateNetAdds.setStatus('mandatory') wfAppleAurpEntryInUpdateNetDeletes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 52), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateNetDeletes.setStatus('mandatory') wfAppleAurpEntryOutUpdateNetDeletes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 53), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateNetDeletes.setStatus('mandatory') wfAppleAurpEntryInUpdateNetRouteChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 54), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateNetRouteChanges.setStatus('mandatory') wfAppleAurpEntryOutUpdateNetRouteChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 55), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateNetRouteChanges.setStatus('mandatory') wfAppleAurpEntryInUpdateNetDistanceChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 56), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateNetDistanceChanges.setStatus('mandatory') wfAppleAurpEntryOutUpdateNetDistanceChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 57), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateNetDistanceChanges.setStatus('mandatory') wfAppleAurpEntryInUpdateZoneChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 58), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateZoneChanges.setStatus('mandatory') wfAppleAurpEntryOutUpdateZoneChanges = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 59), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateZoneChanges.setStatus('mandatory') wfAppleAurpEntryInUpdateInvalidEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 60), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInUpdateInvalidEvents.setStatus('mandatory') wfAppleAurpEntryOutUpdateInvalidEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 61), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutUpdateInvalidEvents.setStatus('mandatory') wfAppleAurpEntryInZiRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 62), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInZiRequests.setStatus('mandatory') wfAppleAurpEntryOutZiRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 63), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutZiRequests.setStatus('mandatory') wfAppleAurpEntryInZiResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 64), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInZiResponses.setStatus('mandatory') wfAppleAurpEntryOutZiResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 65), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutZiResponses.setStatus('mandatory') wfAppleAurpEntryInGdzlRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 66), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInGdzlRequests.setStatus('mandatory') wfAppleAurpEntryOutGdzlRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 67), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutGdzlRequests.setStatus('mandatory') wfAppleAurpEntryInGdzlResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 68), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInGdzlResponses.setStatus('mandatory') wfAppleAurpEntryOutGdzlResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 69), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutGdzlResponses.setStatus('mandatory') wfAppleAurpEntryInGznRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 70), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInGznRequests.setStatus('mandatory') wfAppleAurpEntryOutGznRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 71), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutGznRequests.setStatus('mandatory') wfAppleAurpEntryInGznResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 72), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInGznResponses.setStatus('mandatory') wfAppleAurpEntryOutGznResponses = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 73), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutGznResponses.setStatus('mandatory') wfAppleAurpEntryInTickles = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 74), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInTickles.setStatus('mandatory') wfAppleAurpEntryOutTickles = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 75), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutTickles.setStatus('mandatory') wfAppleAurpEntryInTickleAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 76), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInTickleAcks.setStatus('mandatory') wfAppleAurpEntryOutTickleAcks = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 77), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutTickleAcks.setStatus('mandatory') wfAppleAurpEntryInRouterDowns = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 78), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryInRouterDowns.setStatus('mandatory') wfAppleAurpEntryOutRouterDowns = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 79), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAurpEntryOutRouterDowns.setStatus('mandatory') wfAppleAurpEntryZoneFiltDfltZone = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 9, 1, 80), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: wfAppleAurpEntryZoneFiltDfltZone.setStatus('mandatory') wfAppleAggrStats = MibIdentifier((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10)) wfAppleAggrInPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInPkts.setStatus('mandatory') wfAppleAggrOutPkts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrOutPkts.setStatus('mandatory') wfAppleAggrFwdDatagrams = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrFwdDatagrams.setStatus('mandatory') wfAppleAggrInXsumErrs = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInXsumErrs.setStatus('mandatory') wfAppleAggrInHopCountErrs = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInHopCountErrs.setStatus('mandatory') wfAppleAggrInTooShorts = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInTooShorts.setStatus('mandatory') wfAppleAggrInTooLongs = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInTooLongs.setStatus('mandatory') wfAppleAggrOutNoRoutes = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrOutNoRoutes.setStatus('mandatory') wfAppleAggrInLocalDests = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInLocalDests.setStatus('mandatory') wfAppleAggrInRtmps = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrInRtmps.setStatus('mandatory') wfAppleAggrOutRtmps = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 5, 4, 10, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wfAppleAggrOutRtmps.setStatus('mandatory') mibBuilder.exportSymbols("Wellfleet-AT-MIB", wfAppleZipZoneNetStart=wfAppleZipZoneNetStart, wfAppleAurpEntryOutRiAcks=wfAppleAurpEntryOutRiAcks, wfAppleBaseEstimatedHosts=wfAppleBaseEstimatedHosts, wfApplePortAarpRspTxs=wfApplePortAarpRspTxs, wfAppleAurpBaseDomain=wfAppleAurpBaseDomain, wfAppleAurpEntryInRiUpdates=wfAppleAurpEntryInRiUpdates, wfAppleAurpEntryOutGznRequests=wfAppleAurpEntryOutGznRequests, wfAppleZoneFilterCircuitType=wfAppleZoneFilterCircuitType, wfApplePortZipInZipQueries=wfApplePortZipInZipQueries, wfApplePortNodeId=wfApplePortNodeId, wfApplePortAarpProbeTxs=wfApplePortAarpProbeTxs, wfAppleAurpEntryInUpdateNullEvents=wfAppleAurpEntryInUpdateNullEvents, wfAppleAurpEntryOutUpdateInvalidEvents=wfAppleAurpEntryOutUpdateInvalidEvents, wfApplePortWanBroadcastAddress=wfApplePortWanBroadcastAddress, wfAppleAurpBasePromiscuous=wfAppleAurpBasePromiscuous, wfApplePortEntry=wfApplePortEntry, wfApplePortNetStart=wfApplePortNetStart, wfAppleAurpEntryLhfTimeout=wfAppleAurpEntryLhfTimeout, wfAppleAurpEntryPeerUpdateRate=wfAppleAurpEntryPeerUpdateRate, wfAppleAarpNet=wfAppleAarpNet, wfAppleAurpEntryRetryCommand=wfAppleAurpEntryRetryCommand, wfAppleAurpEntryInDdpPkts=wfAppleAurpEntryInDdpPkts, wfAppleAurpEntryState=wfAppleAurpEntryState, wfAppleAggrInTooLongs=wfAppleAggrInTooLongs, wfMacIPLowerIpAddress2=wfMacIPLowerIpAddress2, wfAppleAurpEntryInTickleAcks=wfAppleAurpEntryInTickleAcks, wfApplePortZipInGetNetInfos=wfApplePortZipInGetNetInfos, wfAppleBaseState=wfAppleBaseState, wfAppleAggrInRtmps=wfAppleAggrInRtmps, wfAppleAurpBaseDelete=wfAppleAurpBaseDelete, wfAppleLclZoneIndex=wfAppleLclZoneIndex, wfApplePortAarpReqTxs=wfApplePortAarpReqTxs, wfAppleZoneFilterEntry=wfAppleZoneFilterEntry, wfApplePortDdpForwRequests=wfApplePortDdpForwRequests, wfAppleAurpEntry=wfAppleAurpEntry, wfApplePortInterfaceCost=wfApplePortInterfaceCost, wfAppleBaseTotalZones=wfAppleBaseTotalZones, wfAppleAurpEntryInUpdateInvalidEvents=wfAppleAurpEntryInUpdateInvalidEvents, wfApplePortCircuit=wfApplePortCircuit, wfAppleMacIPBaseDelete=wfAppleMacIPBaseDelete, wfAppleAurpEntryOutOpenRequests=wfAppleAurpEntryOutOpenRequests, wfAppleAggrOutNoRoutes=wfAppleAggrOutNoRoutes, wfAppleZoneFilterTable=wfAppleZoneFilterTable, wfApplePortGniForever=wfApplePortGniForever, wfApplePortNbpInBroadcastRequests=wfApplePortNbpInBroadcastRequests, wfAppleAurpEntryOutUpdateNullEvents=wfAppleAurpEntryOutUpdateNullEvents, wfApplePortZipOutGetNetInfos=wfApplePortZipOutGetNetInfos, wfAppleLclZoneTable=wfAppleLclZoneTable, wfMacIPAddress2=wfMacIPAddress2, wfAppleAurpEntryInInvalidCommands=wfAppleAurpEntryInInvalidCommands, wfAppleAurpEntryInAurpPkts=wfAppleAurpEntryInAurpPkts, wfAppleAurpEntryOutOpenResponses=wfAppleAurpEntryOutOpenResponses, wfAppleAurpEntryInGdzlResponses=wfAppleAurpEntryInGdzlResponses, wfApplePortDdpOutNoRoutes=wfApplePortDdpOutNoRoutes, wfAppleZipEntry=wfAppleZipEntry, wfAppleAurpBaseInRejectedOpenReqs=wfAppleAurpBaseInRejectedOpenReqs, wfApplePortDdpInLocalDatagrams=wfApplePortDdpInLocalDatagrams, wfApplePortCurNetEnd=wfApplePortCurNetEnd, wfAppleLclZoneName=wfAppleLclZoneName, wfAppleAurpBaseInInvalidVerions=wfAppleAurpBaseInInvalidVerions, wfAppleAurpEntryOutRiRequests=wfAppleAurpEntryOutRiRequests, wfAppleAggrOutRtmps=wfAppleAggrOutRtmps, wfApplePortDdpBroadcastErrors=wfApplePortDdpBroadcastErrors, wfAppleAurpBaseInRouterDowns=wfAppleAurpBaseInRouterDowns, wfAppleAurpBaseInPktsNoPeers=wfAppleAurpBaseInPktsNoPeers, wfApplePortZipAddressInvalids=wfApplePortZipAddressInvalids, wfAppleAurpEntryInGznResponses=wfAppleAurpEntryInGznResponses, wfApplePortRtmpRouteDeletes=wfApplePortRtmpRouteDeletes, wfAppleZipIndex=wfAppleZipIndex, wfApplePortDelete=wfApplePortDelete, wfAppleAurpEntryInRiResponses=wfAppleAurpEntryInRiResponses, wfApplePortTrEndStation=wfApplePortTrEndStation, wfAppleAurpEntryOutUpdateZoneChanges=wfAppleAurpEntryOutUpdateZoneChanges, wfAppleAurpEntryInGdzlRequests=wfAppleAurpEntryInGdzlRequests, wfApplePortDdpTooLongErrors=wfApplePortDdpTooLongErrors, wfAppleAarpNode=wfAppleAarpNode, wfAppleRtmpHops=wfAppleRtmpHops, wfAppleBaseTotalAarpEntries=wfAppleBaseTotalAarpEntries, wfApplePortRtmpInDataPkts=wfApplePortRtmpInDataPkts, wfAppleAurpBaseInAcceptedOpenReqs=wfAppleAurpBaseInAcceptedOpenReqs, wfAppleAurpEntryHopCountReduction=wfAppleAurpEntryHopCountReduction, wfApplePortDdpOutRequests=wfApplePortDdpOutRequests, wfApplePortNbpInLookUpRequests=wfApplePortNbpInLookUpRequests, wfAppleAurpEntryOutUpdateNetAdds=wfAppleAurpEntryOutUpdateNetAdds, wfApplePortZipOutZipReplies=wfApplePortZipOutZipReplies, wfAppleAurpEntryOutPkts=wfAppleAurpEntryOutPkts, wfApplePortZipInGetZoneLists=wfApplePortZipInGetZoneLists, wfAppleAurpEntryCliSeqNum=wfAppleAurpEntryCliSeqNum, wfAppleAurpEntryPeerDomainId=wfAppleAurpEntryPeerDomainId, wfAppleAurpEntryHopCountAdjustments=wfAppleAurpEntryHopCountAdjustments, wfApplePortRtmpNextIREqualChanges=wfApplePortRtmpNextIREqualChanges, wfAppleAurpEntryOutRiResponses=wfAppleAurpEntryOutRiResponses, wfAppleAarpEntry=wfAppleAarpEntry, wfApplePortRtmpNetworkMismatchErrors=wfApplePortRtmpNetworkMismatchErrors, wfAppleAurpEntryInUpdateZoneChanges=wfAppleAurpEntryInUpdateZoneChanges, wfApplePortZipInGetLocalZones=wfApplePortZipInGetLocalZones, wfAppleMacIPBaseDisable=wfAppleMacIPBaseDisable, wfAppleAurpBaseIpAddress=wfAppleAurpBaseIpAddress, wfAppleAurpEntryDisable=wfAppleAurpEntryDisable, wfAppleAurpEntryInOpenRequests=wfAppleAurpEntryInOpenRequests, wfApplePortState=wfApplePortState, wfMacIPAddress1=wfMacIPAddress1, wfAppleAggrStats=wfAppleAggrStats, wfMacIPUpperIpAddress3=wfMacIPUpperIpAddress3, wfApplePortRtmpRoutingTableOverflows=wfApplePortRtmpRoutingTableOverflows, wfAppleAurpEntryInRiAcks=wfAppleAurpEntryInRiAcks, wfAppleAurpEntryOutZiResponses=wfAppleAurpEntryOutZiResponses, wfApplePortAarpReqRxs=wfApplePortAarpReqRxs, wfApplePortCurNodeId=wfApplePortCurNodeId, wfApplePortDdpChecksumErrors=wfApplePortDdpChecksumErrors, wfAppleZipZoneName=wfAppleZipZoneName, wfApplePortEchoReplies=wfApplePortEchoReplies, wfMacIPAddress3=wfMacIPAddress3, wfApplePortMacAddress=wfApplePortMacAddress, wfAppleZoneFilterDelete=wfAppleZoneFilterDelete, wfApplePortRtmpInRequestPkts=wfApplePortRtmpInRequestPkts, wfApplePortNbpOutForwardRequests=wfApplePortNbpOutForwardRequests, wfAppleAurpEntryPeerSuiFlags=wfAppleAurpEntryPeerSuiFlags, wfAppleZoneFilterIpAddress=wfAppleZoneFilterIpAddress, wfAppleAurpEntryOutZiRequests=wfAppleAurpEntryOutZiRequests, wfAppleLclZoneDelete=wfAppleLclZoneDelete, wfAppleAurpEntryInUpdateNetAdds=wfAppleAurpEntryInUpdateNetAdds, wfAppleMacIPServerResponces=wfAppleMacIPServerResponces, wfApplePortCurNetStart=wfApplePortCurNetStart, wfApplePortZipOutZipExtendedReplies=wfApplePortZipOutZipExtendedReplies, wfApplePortCksumDisable=wfApplePortCksumDisable, wfAppleRtmpPort=wfAppleRtmpPort, wfAppleRtmpNetEnd=wfAppleRtmpNetEnd, wfApplePortNbpOutBroadcastRequests=wfApplePortNbpOutBroadcastRequests, wfAppleAurpEntryZoneFiltDfltZone=wfAppleAurpEntryZoneFiltDfltZone, wfAppleBaseTotalNets=wfAppleBaseTotalNets, wfAppleAurpEntryCliConnId=wfAppleAurpEntryCliConnId, wfAppleZoneFilterName=wfAppleZoneFilterName, wfAppleAurpEntrySrvSeqNum=wfAppleAurpEntrySrvSeqNum, wfAppleAurpEntryInInvalidConnIds=wfAppleAurpEntryInInvalidConnIds, wfApplePortDisable=wfApplePortDisable, wfApplePortZipOutZipQueries=wfApplePortZipOutZipQueries, wfApplePortType=wfApplePortType, wfApplePortNbpInLookUpReplies=wfApplePortNbpInLookUpReplies, wfApplePortWanSplitHorizonDisable=wfApplePortWanSplitHorizonDisable, wfAppleRtmpTable=wfAppleRtmpTable, wfAppleAurpBaseDisable=wfAppleAurpBaseDisable, wfAppleAurpEntryCommandRetries=wfAppleAurpEntryCommandRetries, wfAppleRtmpNetStart=wfAppleRtmpNetStart, wfApplePortZipZoneConflictErrors=wfApplePortZipZoneConflictErrors, wfAppleAurpEntryOutRiUpdates=wfAppleAurpEntryOutRiUpdates, wfApplePortEchoRequests=wfApplePortEchoRequests, wfAppleAurpEntryOutRouterDowns=wfAppleAurpEntryOutRouterDowns, wfApplePortAarpProbeRxs=wfApplePortAarpProbeRxs, wfAppleBaseDebugLevel=wfAppleBaseDebugLevel, wfAppleBaseDdpQueLen=wfAppleBaseDdpQueLen, wfAppleMacIPZone=wfAppleMacIPZone, wfApplePortTable=wfApplePortTable, wfMacIPLowerIpAddress1=wfMacIPLowerIpAddress1, wfAppleRtmpEntry=wfAppleRtmpEntry, wfAppleAurpEntryOutAurpPkts=wfAppleAurpEntryOutAurpPkts, wfAppleLclZonePortCircuit=wfAppleLclZonePortCircuit, wfAppleBaseDelete=wfAppleBaseDelete, wfApplePortZipZoneOutInvalids=wfApplePortZipZoneOutInvalids, wfAppleRtmpProto=wfAppleRtmpProto, wfApplePortZipInZipExtendedReplies=wfApplePortZipInZipExtendedReplies, wfApplePortMacIPDisable=wfApplePortMacIPDisable, wfAppleAurpEntryOutTickles=wfAppleAurpEntryOutTickles, wfAppleRtmpAurpNextHopIpAddress=wfAppleRtmpAurpNextHopIpAddress, wfAppleAurpEntryInZiResponses=wfAppleAurpEntryInZiResponses, wfApplePortDdpNoProtocolHandlers=wfApplePortDdpNoProtocolHandlers, wfMacIPUpperIpAddress1=wfMacIPUpperIpAddress1, wfAppleZipZoneNetEnd=wfAppleZipZoneNetEnd, wfAppleMacIPAddressTimeOut=wfAppleMacIPAddressTimeOut, wfAppleAurpEntryInDelayedDuplicates=wfAppleAurpEntryInDelayedDuplicates, wfAppleAggrInPkts=wfAppleAggrInPkts, wfAppleAurpBase=wfAppleAurpBase, wfAppleAurpEntryInZiRequests=wfAppleAurpEntryInZiRequests, wfApplePortNbpInForwardRequests=wfApplePortNbpInForwardRequests, wfApplePortNbpInErrors=wfApplePortNbpInErrors, wfAppleZoneFilterCircuit=wfAppleZoneFilterCircuit, wfAppleAurpEntryPeerEnvironment=wfAppleAurpEntryPeerEnvironment, wfAppleLclZoneEntry=wfAppleLclZoneEntry, wfAppleAurpEntryInTickles=wfAppleAurpEntryInTickles, wfAppleAurpEntryInUpdateNetDeletes=wfAppleAurpEntryInUpdateNetDeletes, wfAppleAurpEntryOutNoRoutes=wfAppleAurpEntryOutNoRoutes, wfApplePortDdpInReceives=wfApplePortDdpInReceives, wfAppleZoneFilterIndex=wfAppleZoneFilterIndex, wfAppleBaseHomedPort=wfAppleBaseHomedPort, wfApplePortZoneFilterType=wfApplePortZoneFilterType, wfAppleBaseTotalZoneNames=wfAppleBaseTotalZoneNames, wfApplePortCurMacAddress=wfApplePortCurMacAddress, wfAppleAurpEntryIpAddress=wfAppleAurpEntryIpAddress, wfAppleAggrInTooShorts=wfAppleAggrInTooShorts, wfApplePortZipInZipReplies=wfApplePortZipInZipReplies, wfApplePortZipOutGetLocalZoneReplies=wfApplePortZipOutGetLocalZoneReplies, wfMacIPUpperIpAddress2=wfMacIPUpperIpAddress2, wfAppleAurpEntryInUpdateNetRouteChanges=wfAppleAurpEntryInUpdateNetRouteChanges, wfAppleAggrInHopCountErrs=wfAppleAggrInHopCountErrs, wfAppleZipTable=wfAppleZipTable, wfAppleAurpEntryInPkts=wfAppleAurpEntryInPkts, wfAppleAurpBaseState=wfAppleAurpBaseState, wfApplePortNetwork=wfApplePortNetwork, wfApplePortZipInErrors=wfApplePortZipInErrors, wfAppleBase=wfAppleBase, wfApplePortAarpRspRxs=wfApplePortAarpRspRxs, wfAppleAurpEntryOutDdpPkts=wfAppleAurpEntryOutDdpPkts, wfMacIPLowerIpAddress3=wfMacIPLowerIpAddress3, wfAppleAurpTable=wfAppleAurpTable, wfAppleAurpEntryInRiRequests=wfAppleAurpEntryInRiRequests, wfAppleAggrInXsumErrs=wfAppleAggrInXsumErrs, wfApplePortCurNetwork=wfApplePortCurNetwork, wfApplePortZipOutGetZoneListReplies=wfApplePortZipOutGetZoneListReplies, wfApplePortZipOutGetMyZoneReplies=wfApplePortZipOutGetMyZoneReplies, wfAppleRtmpNextHopNet=wfAppleRtmpNextHopNet, wfAppleAggrInLocalDests=wfAppleAggrInLocalDests, wfApplePortNetEnd=wfApplePortNetEnd, wfAppleBaseEstimatedNets=wfAppleBaseEstimatedNets, wfAppleAurpEntryInterfaceCost=wfAppleAurpEntryInterfaceCost, wfAppleAurpEntryInOpenResponses=wfAppleAurpEntryInOpenResponses, wfAppleAurpEntryOutGdzlRequests=wfAppleAurpEntryOutGdzlRequests, wfAppleAurpEntryOutUpdateNetDistanceChanges=wfAppleAurpEntryOutUpdateNetDistanceChanges, wfAppleAurpEntryHopCountErrors=wfAppleAurpEntryHopCountErrors, wfAppleAurpEntrySrvConnId=wfAppleAurpEntrySrvConnId, wfAppleAarpTable=wfAppleAarpTable, wfAppleAggrOutPkts=wfAppleAggrOutPkts, wfAppleAurpEntryType=wfAppleAurpEntryType, wfAppleAurpEntryDelete=wfAppleAurpEntryDelete, wfApplePortRtmpNextIRLessChanges=wfApplePortRtmpNextIRLessChanges, wfApplePortRtmpOutDataPkts=wfApplePortRtmpOutDataPkts, wfAppleAarpPhysAddress=wfAppleAarpPhysAddress, wfAppleAurpEntryInUpdateNetDistanceChanges=wfAppleAurpEntryInUpdateNetDistanceChanges, wfApplePortDfltZone=wfApplePortDfltZone, wfAppleRtmpState=wfAppleRtmpState, wfAppleAurpEntryUpdateRate=wfAppleAurpEntryUpdateRate, wfAppleRtmpNextHopNode=wfAppleRtmpNextHopNode, wfApplePortZipInGetMyZones=wfApplePortZipInGetMyZones, wfAppleAurpEntryInGznRequests=wfAppleAurpEntryInGznRequests, wfApplePortZipOutGetNetInfoReplies=wfApplePortZipOutGetNetInfoReplies, wfApplePortCurDfltZone=wfApplePortCurDfltZone, wfAppleAurpEntryOutUpdateNetDeletes=wfAppleAurpEntryOutUpdateNetDeletes, wfAppleAurpEntryOutGdzlResponses=wfAppleAurpEntryOutGdzlResponses, wfAppleZipZoneState=wfAppleZipZoneState, wfApplePortAarpFlush=wfApplePortAarpFlush, wfApplePortDdpTooShortErrors=wfApplePortDdpTooShortErrors, wfApplePortZipInGetNetInfoReplies=wfApplePortZipInGetNetInfoReplies, wfAppleAurpEntryTimeoutCommand=wfAppleAurpEntryTimeoutCommand, wfAppleAurpEntryInInvalidSubCodes=wfAppleAurpEntryInInvalidSubCodes, wfAppleAurpEntryOutGznResponses=wfAppleAurpEntryOutGznResponses, wfApplePortNbpOutLookUpReplies=wfApplePortNbpOutLookUpReplies, wfAppleBaseDisable=wfAppleBaseDisable, wfAppleMacIPBaseState=wfAppleMacIPBaseState, wfAppleAurpEntryOutUpdateNetRouteChanges=wfAppleAurpEntryOutUpdateNetRouteChanges, wfAppleAurpEntryInRouterDowns=wfAppleAurpEntryInRouterDowns, wfAppleAarpIfIndex=wfAppleAarpIfIndex, wfAppleAurpEntryZoneFilterType=wfAppleAurpEntryZoneFilterType, wfApplePortDdpHopCountErrors=wfApplePortDdpHopCountErrors, wfAppleAurpEntrySuiFlags=wfAppleAurpEntrySuiFlags, wfApplePortNbpOutLookUpRequests=wfApplePortNbpOutLookUpRequests) mibBuilder.exportSymbols("Wellfleet-AT-MIB", wfAppleAurpEntryOutTickleAcks=wfAppleAurpEntryOutTickleAcks, wfAppleMacIPServerRequests=wfAppleMacIPServerRequests, wfAppleAggrFwdDatagrams=wfAppleAggrFwdDatagrams, wfApplePortNbpRegistrationFailures=wfApplePortNbpRegistrationFailures)
def findOrder(numCourses, prerequisites): """ :type numCourse: int :type prerequirements: List[List[int]] :rtype:list """ L = [] in_degrees = [0 for _ in range(numCourses)] graph = [[] for _ in range(numCourses)] # Construct the graph for u, v in prerequisites: graph[v].append(u) in_degrees[u] += 1 Q = [i for i in range(len(in_degrees)) if in_degrees[i] == 0] # collect nodes without pre-edges while Q: # while Q is not empty start = Q.pop() # remove a node from Q L.append(start) # add n to tail of L for v in graph[start]: # for each node v with a edge e in_degrees[v] -= 1 # remove edge if in_degrees[v] == 0: Q.append(v) for i in range(len(in_degrees)): # if graph has edge if in_degrees[i] > 0: # 这里的in_degrees check是大于0 return [] return L # test numCourses = 4 prerequisites = [[1,0],[2,0],[3,1],[3,2]] # numCourses = 1 # prerequisites = [] print(findOrder(numCourses, prerequisites))
# https://paiza.jp/poh/hatsukoi/challenge/hatsukoi_hair4 def func1(des): count = 0 for [d, e] in des: if d == e: count += 1 if count >= 3: print('OK') else: print('NG') def func2(des): count = 0 for d,e in des: if d == e: count += 1 return 'OK' if count >= 3 else 'NG' def func3(des): is_same = lambda d, e: d == e count = len([[d, e] for d, e in des if is_same(d, e)]) return 'OK' if count >= 3 else 'NG' def display(s): print(s) if __name__ == '__main__': des = [input().split(' ') for _ in range(5)] display(func3(des))
class Solution: def interpret(self, command: str) -> str: result = "" for i in range(len(command)): if command[i] == 'G': result += command[i] elif command[i] == '(': if command[i+1] == ')': result += 'o' else: result += 'al' return result
# cook your dish here for i in range(int(input())): x=int(input()) cars=x//4 left=x-(cars*4) bikes=left//2 leftafter=left-(bikes*2) if bikes>0: print("YES") else: print("NO")
nota1 = float(input('Digite a sua nota: ')) nota2 = float(input('Digite outra nota: ')) media = (nota1 + nota2)/2 print(f'A sua primeira nota é {nota1}, a sua segunda nota é {nota2}, \n' f'A média entre elas é {media :.1f}')
"""Constants for JSON keys used primarily in the PR recorder.""" class TOP_LEVEL: """The top-level keys.""" REPO_SLUG = "repoSlug" class PR: """Keys for PR metadata.""" SECTION_KEY = "prMetadata" URL = "url" CREATED_AT = "createdAt" CLOSED_AT = "closedAt" MERGED_AT = "mergedAt" REPO_SLUG = "repoSlug" NUMBER = "number" STATE = "state" IS_MERGED = "isMerged" class DIFF: """Keys for diff data.""" SECTION_KEY = "diffs" INITIAL = "initial" FINAL = "final" class RECORD: """Keys for record metadata.""" SECTION_KEY = "recordMetadata" CREATED_AT = "createdAt" LAST_MODIFIED = "lastModified" IS_LEGACY = "isLegacyRecord" class MANUAL_EDITS: """Keys for the manual edits data.""" SECTION_KEY = "manualEdits" BEFORE_OPEN_PR = "beforeOpenPr" AFTER_OPEN_PR = "afterOpenPr" class SORALD_STATS: """Keys for the Sorald statistics.""" SECTION_KEY = "soraldStatistics" REPAIRS = "repairs" RULE_KEY = "ruleKey" VIOLATIONS_BEFORE = "nbViolationsBefore" VIOLATIONS_AFTER = "nbViolationsAfter" NUM_PERFORMED_REPAIRS = "nbPerformedRepairs" NUM_CRASHED_REPAIRS = "nbCrashedRepairs" class LEGACY: REPO_SLUG = "repo_slug" PR_URL = "PR_url" RULE_KEY = "rule_id" NUM_VIOLATIONS = "nb_violations"
NUMBERS = (-10, -21, -4, -45, -66, -93, 11) def count_positives(lst: list[int] | tuple[int]) -> int: return len([num for num in lst if num >= 1]) # return len(list(filter(lambda x: x >= 0, lst))) POS_COUNT = count_positives(NUMBERS) if __name__ == "__main__": print(f"Positive numbers in the list: {POS_COUNT}.") print(f"Negative numbers in the list: {len(NUMBERS) - POS_COUNT}.")
#!/usr/bin/python3 CARDS = """Hesper Starkey Paracelsus Archibald Alderton Elladora Ketteridge Gaspard Shingleton Glover Hipworth Gregory the Smarmy Laverne DeMontmorency Ignatia Wildsmith Sacharissa Tugwood Glanmore Peakes Balfour Blane Felix Summerbee Greta Catchlove Honouria Nutcombe Gifford Ollerton Jocunda Sykes Quong Po Dorcas Wellbeloved Merwyn the Malicious Morgan le Fay Crispin Cronk Ethelred the EverReady Beatrix Bloxam Alberta Toothill Xavier Rastrick Yardley Platt Dymphna Furmage Fulbert the Fearful Wendelin the Weird Tilly Toke Carlotta Pinkstone Edgar Stroulger Havelock Sweeting Flavius Belby Justus Pilliwickle Norvel Twonk Oswald Beamish Cornelius Agrippa Gulliver Pokeby Newt Scamander Glenda Chittock Adalbert Waffling Perpetua Fancourt Cassandra Vablatsky Mopsus Blenheim Stalk Alberic Grunnion Merlin Elfrida Clagg Grogan Stump Burdock Muldoon Almerick Sawbridge Artemisia Lufkin Gondoline Oliphant Montague Knightley Harry Potter Derwent Shimpling Gunhilda of Gorsemoor Cliodne Beaumont Marjoribanks Chauncey Oldridge Mungo Bonham Wilfred Elphick Bridget Wenlock Godric Gryffindor Miranda Goshawk Salazar Slytherin Queen Maeve Helga Hufflepuff Rowena Ravenclaw Hengist of Woodcroft Daisy Dodderidge Albus Dumbledore Donaghan Tremlett Musidora Barkwith Gideon Crumb Herman Wintringham Kirley Duke Myron Wagtail Orsino Thruston Celestina Warbeck Heathcote Barbary Merton Graves Bowman Wright Joscelind Wadcock Gwenog Jones Cyprian Youdle Devlin Whitehorn Dunbar Oglethorpe Leopoldina Smethwyck Roderick Plumpton Roland Kegg Herpo the Foul Andros the Invincible Uric the Oddball Lord Stoddard Withers Circe Mirabella Plunkett Bertie Bott Thaddeus Thurkell Unknown""".split('\n') rom = open("hp1.gbc", "rb") class NotPointerException(ValueError): pass def readpointer(bank=None): if not bank: bank = rom.tell()/0x4000 s = readshort() if 0x4000 > s or 0x8000 <= s: raise NotPointerException(s) return (bank * 0x4000) + (s - 0x4000) def readshort(): return readbyte() + (readbyte() << 8) def readbyte(): return ord(rom.read(1)) decks = [] for d in range(4): sets = [] for i in range(3): set_ = [] rom.seek(6*0x4000 + 0x1ad5 + i*2) x = readshort() rom.seek(x) num = readbyte() x += 1 for c in range(num): rom.seek(x+c) rom.seek(6*0x4000 + 0x1aff + readbyte()*4 + d) set_.append(readbyte()) sets.append(set_) decks.append(sets) for d, sets in enumerate(decks): print("When collecting deck {}:".format(d)) for i, set_ in enumerate(sets): print(" Set {} cards:".format(i)) for c in set_: print(" - {}. {}".format(c, CARDS[c])) print print("---")
class train_config: datasets = {'glove':{'N':1183514,'d':100}, 'Sift-128':{'N':1000000, 'd':128} } dataset_name = 'glove' inp_dim = datasets[dataset_name]['d'] n_classes = datasets[dataset_name]['N'] #### n_cores = 1 # core count for TF REcord data loader B = 3000 R = 16 gpus = [4,5,6,7] num_gpus = len(gpus) batch_size = 256 hidden_dim = 1024 #### train_data_loc = '../../LTH/data/'+dataset_name+'/' tfrecord_loc = '../../LTH/data/'+dataset_name+'/tfrecords/' model_save_loc = '../saved_models/'+dataset_name+'/b_'+str(B)+'/' lookups_loc = '../lookups/'+dataset_name+'/b_'+str(B)+'/' logfolder = '../logs/'+dataset_name+'/b_'+str(B)+'/' # Only used if training multiple repetitions from the same script R_per_gpu = 2
def palindrome(s): l = len(s) if l == 0 or l == 1: return True return (s[0] == s[l-1]) and palindrome(s[1:l-1])
n = int(input()) sum = 0 for i in range(n): num = int(input()) sum += num print(sum)
# noqa: D104 # pylint: disable=missing-module-docstring __version__ = "0.0.18"
#!/usr/bin/env python # encoding: utf-8 ''' @author: Jason Lee @license: (C) Copyright @ Jason Lee @contact: jiansenll@163.com @file: 11.py @time: 2019/5/27 13:35 @desc: ''' class Solution: def maxArea(self, height: List[int]) -> int: # f(n) = max{f(n-1), max[min(ai, an)*(n-i)]} f = [0 for i in range(len(height))] f[1] = min(height[0], height[1]) * 1 for i in range(2, len(height)): # get max{min(aj,ai)*(i-j)} max_w = 0 for j in range(i): temp = min(height[j], height[i]) * (i - j) if temp > max_w: max_w = temp f[i] = max(f[i-1], max_w) return f[-1] def better(self, height): # 对于开头和结果的两个点i, j。如果i<j,则以i为边界能得到的最大值就是i~j区间。 # 因此,使i++,即不再考虑以i为边界的情况。 # 若i>j,则以j为边界能得到的最大值就是i~j区间,使j--,即不再考虑以j为边界的情况。 # 若i==j,则同时满足以上两种情况。 i, j = 0, len(height) - 1 water = 0 while i < j: water = max(water, min(height[i], height[j]) * (j - i)) if height[i] < height[j]: i += 1 else: j -= 1 return water def best(self, height): # 跟上面的better方法一样,只是进一步做了优化: # 1. i<j时,增大i的时候j-i变小了,因此需要一直增大i,直到height[i]比原本的值大,才有可能得到新的最大值 # 2. 同上,减小j的时候j-i也变小了,因此需要一直减小j,直到height[j]比原本的值大才行。 i, j = 0, len(height) - 1 water = 0 while i < j: area = 0 if height[i] < height[j]: area = height[i] * (j - i) temp = height[i] while height[i] <= temp: # 这里i的值不会超过j i += 1 else: area = height[j] * (j - i) temp = height[j] while height[j] <= temp and j: # 防止j<0 j -= 1 water = area if area > water else water return water
''' DESENVOLVA UM PROGRAMA QUE LEIA 6 NÚMEROS INTEIROS E MOSTRE A SOMA APENAS DAQUELES QUE FOREM PARES. SE O VALOR INFORMADO FOR ÍMPAR DESCONSIDERE''' s = 0 for i in range(1, 7): n = int(input('Informe um número inteiro: ')) if (n % 2) == 0: s += n print('A soma dos números pares dentre os informados é {}'.format(s))
class Node: def __init__(self, data): self.data = data self.left = None self.right = None def __repr__(self): return "{} => (l: {}, r: {})".format( self.data, self.left, self.right) def get_tree(seq): head = Node(seq[-1]) if len(seq) == 1: return head for i in range(len(seq) - 1): if seq[i] > head.data: sep_ind = i break leq, gt = seq[:sep_ind], seq[sep_ind:-1] head.left = get_tree(leq) if leq else None head.right = get_tree(gt) if gt else None return head # Tests tree = get_tree([2, 4, 3, 8, 7, 5]) assert tree.data == 5 assert tree.left.data == 3 assert tree.right.data == 7 assert tree.left.left.data == 2 assert tree.left.right.data == 4 assert tree.right.right.data == 8
#Definicion de variables y otros print("ajercicio 01: Area de un Trianfulo ") #Datos de entrada mediante dispositivos de entrada b=int(input("Ingrese Base:")) h=int(input("Ingrese altura:")) #preceso area=(b*h)/2 #datos de salida print("El area es:", area)
#!/usr/bin/env python """ Difficulty: 4 You are stuck on the Moon and need to get back to Earth! To be able to get back to Earth, we need to solve a linear system of equations. Don't ask how solving a linear system of equation helps you getting back to the Earth. It just does. Unfortunately, the Internet connection on the Moon is very bad. Therefore, we cannot download third-party libraries (like numpy) to solve the task for us. We can only use list comprehension and (maybe) built-in modules in python. In addition, because the Internet is very bad, we generally need to solve each task with A SINGLE LINE OF CODE (that do not exceed 88 characters), indentation included[1]. We need to implement the following methods: * transpose [easy] * matrix multiplication [easy] * submatrix [medium] * determinant [hard] If all methods are correctly implemented, we will be able to solve the linear system of equations, and hopefully we will get back to Earth. :-) --- The solution should be the insertion a single line of code for all functions that we need to define (see above). One exception, though: you can use several lines on the `determinant` function (which should be around 1 - 10 lines inserted if solved appropriately). The solution need not have good performance. We don't design tests that have large inputs. So a slow solution is completely fine! [1] if you feel sneaky, you can adjust the indendation level to a single space instead of the current 4 spaces, and you get 3 extra characters available! """ ############################################################################## # Helper functions ############################################################################## def shape(X): I, J = len(X), len(X[0]) return I, J def add(X, value): """Add `value` to all elements of `X`""" return [[a + value for a in row] for row in X] def mul(X, factor): """Multiply `factor` to all elements of `X`""" return [[a * factor for a in row] for row in X] def dot(x, y): """Dot product of two lists of equal length""" return sum(x_ * y_ for (x_, y_) in zip(x, y)) ############################################################################## # Solve these ############################################################################## def transpose(X): """Transpose of a matrix `X`. Implement the transpose operator with only one line of code! More than one line of code do not qualify. See [1] for definition. Args: X: list of lists, with `len(X) == i` and `len(X[0]) == j` and i, j > 0. References: [1] https://en.wikipedia.org/wiki/Transpose """ raise NotImplementedError def matmul(X, Y): """Matric multiplication of two matrices `X` and `Y`. Implement the matrix multiplication operator with only one line of code! More than one line of code do not qualify. See [1] for definition. Notes: Use the `dot` helper function if you like. Maybe you also want to use some previously defined helper function, as well. :-) Args: X: list of lists, with `len(X) == I` and `len(X[0]) == J` and I, J > 0. Y: list of lists. with `len(Y) == J` and `len(X[0]) == k` and J, K > 0. References: [1] https://en.wikipedia.org/wiki/Matrix_multiplication """ raise NotImplementedError assert len(X[0]) == len(Y), "Shape mismatch. Can't do matrix multiplication." def submatrix(X, i, j): """Calculate the submatrix of `X` by removing row `i` and column `j`. See [1] for reference. Args; X: list of lists, with `len(X) == I` and `len(X[0]) == J` and I > 0 Returns: Y: A list of lists, with `len(Y) == I-1` and `len(Y[0]) == J - 1` Example: >>> X = [[1, 2, 3], >>> [4, 5, 6], >>> [7, 8, 9]] >>> submatrix(X, 1, 1) [[1, 3], [7, 9]] References: [1] https://en.wikipedia.org/wiki/Minor_(linear_algebra) """ raise NotImplementedError I, J = shape(X) assert I > 1 or J > 1, "Matrix too small to find submatrix" def determinant(X) -> float: """Determinant of a matrix `X`. Determinant calculation must be done using Laplace expansion. See [1] for an example. For simplicity, you can just do Laplace expansion along the first row. The implementation should be foremost CORRECT and CLEAN. We don't care about performance. If we wanted performance, we would probably not implement matrix operations directly in Python, and we would certainly not use the Laplace expansion method. There's not much to do on the Moon anyways, so algorithm speed is no problem. Args: X: list of lists, with `len(X) == I` and `len(X[0]) == I` with I > 0 Returns: The determinant of matrix `X` (a single float value). Notes: The matrix `X` is square! We cannot find the determinant of non-square matrices. Also, we expect that you will implement a recursive function here, because the Laplace transform has a more-or-less recursive definition. References: [1] https://en.wikipedia.org/wiki/Laplace_expansion """ raise NotImplementedError # NOTE: You can use more than 1 line of code to implement this. :-)
class ClassicalModel(object): """ The model for a classical erasure channel. """ def __init__(self): self._length = 0 self._transmission_p = 1.0 @property def length(self): """ Length of the channel in Km Returns: (float) : Length of the channel in Km """ return self._length @length.setter def length(self, length): """ Set the length of the channel Args: length (float) : Length of the channel in m """ if not isinstance(length, int) and not isinstance(length, float): raise ValueError("Length must be float or int") elif length < 0: raise ValueError("Length must be non-negative") else: self._length = length @property def transmission_p(self): """ Transmission probability of the channel Returns: (float) : Probability that a qubit is transmitted """ return self._transmission_p @transmission_p.setter def transmission_p(self, probability): """ Set the transmission probability of the channel Args probability (float) : Probability that a classical packet is transmitted """ if not isinstance(probability, int) and not isinstance(probability, float): raise ValueError("Transmission probability must be float or int") elif probability < 0 or probability > 1: raise ValueError("Transmission probability must lie in the interval [0, 1]") else: self._transmission_p = probability
def collatz ( n ): ''' collatz: According to Collatz Conjecture generates a sequence that terminates at 1. n: positive integer that starts the sequence ''' # recursion unrolling while n != 1: print(n) if n % 2 ==0: # n is even n //= 2 else: # n is odd n = n * 3 + 1 print(n) # recursive collatz conjecture def collatz ( n ): print(n) if n == 1: # base case return if n % 2 == 0: # n is even n = n // 2 else: # n is odd n = n * 3 + 1 return collatz(n) collatz(4)
#SUBPROGRAMAS def menordist(pontos, centroide): menorind = 0 for index, ponto in enumerate(pontos): dist = ((ponto[0]-centroide[0])**2 + (ponto[1]-centroide[1])**2)**(1/2) if index == 0: menordist = dist else: if dist < menordist: menorind = index menordist = dist stringmenor = f'{pontos[menorind][0]}, {pontos[menorind][1]}' return stringmenor # PROGRAMA PRINCIPAL somax = 0.0 somay = 0.0 qtdpontos = 0 arqentrada = input() listapontos = list() try: with open(arqentrada, 'r') as entradas: for ponto in entradas: pontocoord = ponto.split() pontocoord[0] = float(pontocoord[0]) pontocoord[1] = float(pontocoord[1]) listapontos.append(pontocoord) somax += pontocoord[0] somay += pontocoord[1] qtdpontos += 1 except OSError: print('Erro na leitura do arquivo de entrada') if qtdpontos != 0: centroidex = somax/qtdpontos centroidey = somay/qtdpontos centroide = [centroidex, centroidey] print(f'Centroide: ({centroidex:.1f}, {centroidey:.1f})') print(f'Ponto Mais Próximo: ({menordist(listapontos, centroide)})')
class Solution: def dfs(self, nums, visit, cur, res): """ visit记录元素是否被使用 cur是一个排列 res是最后的结果 """ if len(cur) == len(nums): res.append(cur[:]) last = None for i in range(len(nums)): if visit[i]: continue elif last == nums[i]: continue else: # 深搜 cur.append(nums[i]) visit[i] = 1 last = nums[i] self.dfs(nums, visit, cur, res) # 回溯 visit[i] = 0 cur.pop() def permuteUnique(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ if len(nums) < 2: return [nums] nums.sort() visit = [0] * len(nums) cur = [] res = [] self.dfs(nums, visit, cur, res) return res
# hello4.py def hello(): print("Hello, world!") def test(): hello() if __name__ == '__main__': test()
#! python3 # aoc_07.py # Advent of code: # https://adventofcode.com/2021/day/7 # https://adventofcode.com/2021/day/7#part2 # def part_one(input) -> int: with open(input, 'r') as f: data = [[int(x) for x in line.strip()] for line in f.readlines()] return 0 def part_two(input) -> int: with open(input, 'r') as f: data = [[int(x) for x in line.strip()] for line in f.readlines()] return 0 if __name__ == "__main__": example_path = "./aoc_xx_example.txt" input_path = "./aoc_xx_input.txt" print("---Part One---") print(part_one(example_path)) print(part_one(input_path)) print("---Part Two---") print(part_two(input_path))
# # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 # ddo_dict = { "id": "did:op:e16a777d1f146dba369cf98d212f34c17d9de516fcda5c9546076cf043ba6e37", "version": "4.1.0", "chain_id": 8996, "metadata": { "created": "2021-12-29T13:34:27", "updated": "2021-12-29T13:34:27", "description": "Asset description", "copyrightHolder": "Asset copyright holder", "name": "Asset name", "author": "Asset Author", "license": "CC-0", "links": ["https://google.com"], "contentLanguage": "en-US", "categories": ["category 1"], "tags": ["tag 1"], "additionalInformation": {}, "type": "dataset", }, "services": [ { "index": 0, "id": "compute_1", "type": "compute", "name": "compute_1", "description": "compute_1", "datatokenAddress": "0x0951D2558F897317e5a68d1b9e743156D1681168", "serviceEndpoint": "http://172.15.0.4:8030/api/services", "files": "0x0442b53536ebb3f1ee0301288efc7a14b9f807e9d104647ca052b0fb67954440bf18f9b5143c94ac5e7dedbefacccbf38783728de2f4c8af8468dca630e1e92e5c7c03cb82b4956fcfecb9fe6f19771df19e7e8dd06b4d6665bbe5b3d5bf5dbf5781b4f3ee97c7864a98d903df4acea2ad39176aed782b3faad82808ca4709382ccd8fa42561830069293d7cd6685696a54fc752f6d78fe7b3ed598636c5447fa593ffe4929280f3e6720f159251474035a29bdc11ae73150d3871600010dd97bd7de63cb64b338d4f5c1a9b70c082df801864a7d4f6c19e5568361e3cf6a3e795f5ae7c8972019405c113a33b5ae09a4dd5cdeff0", "timeout": 3600, "compute": { "namespace": "test", "allowRawAlgorithm": True, "allowNetworkAccess": False, "publisherTrustedAlgorithmPublishers": [], "publisherTrustedAlgorithms": [ { "did": "did:op:706d7452b1a25b183051fe02f2ad902d54fc45a43fdcee26b20f21684b5dee72", "filesChecksum": "09903ddb8459c7ade1ea2bb639207c47f3474a060ae4ace9ba9581c71b9a3f54", "containerSectionChecksum": "743e3591b4c035906be7dbc9eb592089d096be3b2d752f8d8d52917dd609f31f", } ], }, }, { "index": 1, "id": "access_1", "type": "access", "name": "name doesn't affect tests", "description": "decription doesn't affect tests", "datatokenAddress": "0x12d1d7BaF6fE43805391097A63301ACfcF5f5720", "serviceEndpoint": "http://172.15.0.4:8030", "files": "0x0487db5b45655d0ce74cf6e4707c2dd40509cb4d8f80af76758790b4ab715d7658a1f71ee1ee744e7af87275113bd0fde5f8362431934407c8e8bd6f20b1216de4f94cb3d03b975b5c61c5c9e6ac3373e50fc2d181c1b2808f9bca18a59180b77baad213c4dda70ddd866e6cbb0d6eae1036b6e0e8e8c2e17ca0e55180b2afb00acaa27bc343117457bb8d56d670d1e42ed6834b52c4a7f2eb035cb4bd98e24e5ba28935b67071d77d0edcd914572da492c72d0c049ed47d37a84b56a6be311b27fde9aea893afe408d2e96ce330e46443c2ee02ba5ee8757c5d3ef917de9863d13f843fb37794accad4d029c960fe4a56c3cc3d70", "timeout": 3600, "compute_dict": None, }, ], "credentials": {"allow": [], "deny": []}, "nft": { "address": "0x7358776DACe83a4b48E698645F32B043481daCBA", "name": "Data NFT 1", "symbol": "DNFT1", "state": 0, "owner": "0xBE5449a6A97aD46c8558A3356267Ee5D2731ab5e", "created": "2021-12-29T13:34:28", }, "datatokens": [ { "address": "0x0951D2558F897317e5a68d1b9e743156D1681168", "name": "Datatoken 1", "symbol": "DT1", "serviceId": "compute_1", } ], "event": { "tx": "0xa73c332ba8d9615c438e7773d8f8db6a258cc615e43e47130e5500a9da729cea", "block": 121, "from": "0xBE5449a6A97aD46c8558A3356267Ee5D2731ab5e", "contract": "0x7358776DACe83a4b48E698645F32B043481daCBA", "datetime": "2021-12-29T13:34:28", }, "stats": {"consumes": -1, "isInPurgatory": "false"}, } alg_ddo_dict = { "id": "did:op:706d7452b1a25b183051fe02f2ad902d54fc45a43fdcee26b20f21684b5dee72", "version": "4.1.0", "chain_id": 8996, "metadata": { "created": "2021-12-29T13:34:18", "updated": "2021-12-29T13:34:18", "description": "Asset description", "copyrightHolder": "Asset copyright holder", "name": "Asset name", "author": "Asset Author", "license": "CC-0", "links": ["https://google.com"], "contentLanguage": "en-US", "categories": ["category 1"], "tags": ["tag 1"], "additionalInformation": {}, "type": "algorithm", "algorithm": { "language": "python", "version": "0.1.0", "container": { "entrypoint": "run.sh", "image": "my-docker-image", "tag": "latest", "checksum": "44e10daa6637893f4276bb8d7301eb35306ece50f61ca34dcab550", }, }, }, "services": [ { "index": 0, "id": "b4d208d6-0074-4002-9dd1-02d5d0ad352e", "type": "access", "name": "name doesn't affect tests", "description": "decription doesn't affect tests", "datatokenAddress": "0x12d1d7BaF6fE43805391097A63301ACfcF5f5720", "serviceEndpoint": "http://172.15.0.4:8030", "files": "0x0487db5b45655d0ce74cf6e4707c2dd40509cb4d8f80af76758790b4ab715d7658a1f71ee1ee744e7af87275113bd0fde5f8362431934407c8e8bd6f20b1216de4f94cb3d03b975b5c61c5c9e6ac3373e50fc2d181c1b2808f9bca18a59180b77baad213c4dda70ddd866e6cbb0d6eae1036b6e0e8e8c2e17ca0e55180b2afb00acaa27bc343117457bb8d56d670d1e42ed6834b52c4a7f2eb035cb4bd98e24e5ba28935b67071d77d0edcd914572da492c72d0c049ed47d37a84b56a6be311b27fde9aea893afe408d2e96ce330e46443c2ee02ba5ee8757c5d3ef917de9863d13f843fb37794accad4d029c960fe4a56c3cc3d70", "timeout": 3600, "compute_dict": None, }, { "index": 1, "id": "compute_1", "type": "compute", "name": "compute_1", "description": "compute_1", "datatokenAddress": "0x0951D2558F897317e5a68d1b9e743156D1681168", "serviceEndpoint": "http://172.15.0.4:8030/api/services", "files": "0x0442b53536ebb3f1ee0301288efc7a14b9f807e9d104647ca052b0fb67954440bf18f9b5143c94ac5e7dedbefacccbf38783728de2f4c8af8468dca630e1e92e5c7c03cb82b4956fcfecb9fe6f19771df19e7e8dd06b4d6665bbe5b3d5bf5dbf5781b4f3ee97c7864a98d903df4acea2ad39176aed782b3faad82808ca4709382ccd8fa42561830069293d7cd6685696a54fc752f6d78fe7b3ed598636c5447fa593ffe4929280f3e6720f159251474035a29bdc11ae73150d3871600010dd97bd7de63cb64b338d4f5c1a9b70c082df801864a7d4f6c19e5568361e3cf6a3e795f5ae7c8972019405c113a33b5ae09a4dd5cdeff0", "timeout": 3600, "compute": { "namespace": "test", "allowRawAlgorithm": True, "allowNetworkAccess": False, "publisherTrustedAlgorithmPublishers": [], "publisherTrustedAlgorithms": [ { "did": "did:op:706d7452b1a25b183051fe02f2ad902d54fc45a43fdcee26b20f21684b5dee72", "filesChecksum": "09903ddb8459c7ade1ea2bb639207c47f3474a060ae4ace9ba9581c71b9a3f54", "containerSectionChecksum": "743e3591b4c035906be7dbc9eb592089d096be3b2d752f8d8d52917dd609f31f", } ], }, }, ], "credentials": {"allow": [], "deny": []}, "nft": { "address": "0xa072B0D477fae1aBE3537Ff66A8389B184E18F4d", "name": "Data NFT 1", "symbol": "DNFT1", "state": 0, "owner": "0xBE5449a6A97aD46c8558A3356267Ee5D2731ab5e", "created": "2021-12-29T13:34:20", }, "datatokens": [ { "address": "0x12d1d7BaF6fE43805391097A63301ACfcF5f5720", "name": "Datatoken 1", "symbol": "DT1", "serviceId": "b4d208d6-0074-4002-9dd1-02d5d0ad352e", } ], "event": { "tx": "0x09366c3bf4b24eabbe6de4a1ee63c07fca82c768fcff76e18e8dd461197f2aba", "block": 116, "from": "0xBE5449a6A97aD46c8558A3356267Ee5D2731ab5e", "contract": "0xa072B0D477fae1aBE3537Ff66A8389B184E18F4d", "datetime": "2021-12-29T13:34:20", }, "stats": {"consumes": -1, "isInPurgatory": "false"}, }
num_pessoas = maior_idade = homens = menor_idade = 0 print('\033[1;31m CADASTRAMENTO \033[m') while True: print('-=' * 20) idade = int(input('Digite a idade: ')) if idade >= 18: maior_idade += 1 sexo = str(input('Digite o sexo [M/F]: ')).upper().strip()[0] while sexo not in 'MmFf': sexo = str(input('Digite o sexo [M/F]: ')).upper().strip()[0] if sexo in 'Mm': homens += 1 elif sexo in 'Ff' and idade < 20: menor_idade += 1 num_pessoas += 1 escolha = str(input('Deseja cadastrar mais uma pessoa [S/N]: ')).upper().strip()[0] while escolha not in 'NnSs': escolha = str(input('Deseja cadastrar mais uma pessoa [S/N]: ')).upper().strip()[0] if escolha in 'Nn': print('Está ok.') break print('-=' * 20) if maior_idade > 0: print(f'Tivemos {maior_idade} pessoas maiores de 18 anos cadastradas.') if homens > 0: print(f'Tivemos {homens} homen(s) cadastrados.') if menor_idade > 0: print(f'Tivemos {menor_idade} mulhere(s) com menos de 20 anos cadastrados.') print('Finalizando programa ....')
def solve(n, ss): inp_arr_unsorted = [int(k) for k in ss.split(' ')] inp_arr = sorted(inp_arr_unsorted)[::-1] flag = False counter = 0 n_fix = n candidate_ans = 0 while not flag: if inp_arr[counter] <= n: flag = True candidate_ans = n else: counter += 1 n -= 1 flag = (counter == n_fix) candidate_ans += 1 return candidate_ans t = int(input()) for ___ in range(t): n = int(input()) if n == 1: if int(input()) == 1: answer = 2 else: answer = 1 else: inp_str = input() answer = solve(n, inp_str) print(answer)
# print("Valdis") # # # # # we declare variables in Python when we first use them # my_name = "Valdis" # there are no types no val, no var no const nothing like that in Python # print(my_name) # print("my_name") # this is not a variable, this string literal # # # # variables do have data types in Python # print(type(my_name)) # # # so for any variables you can find out type with type(my_variable) # # # there are primitive types and compound(collection) types # my_num = 42 # print(my_num) # print(type(my_num)) # a = 42 # b = 42 # print(id(a), id(b), id(my_num)) # print(a,b,my_num) # b = 9001 # # c = 9_000_000 # you can use underscore _ for larger numbers just as a cosmetic , machine ignore it # my_result = b + c # new variable my_result is introduced # print(b,c,my_result) # googol = 10**100 # print(googol) # # # # print(id(b)) # this shows where in virtual memory the b points at # # print(id(c)) # this shows where in virtual memory the b points at # # # # print(my_name, type(my_name)) # my_name = 7 # so here dynamically Python changed where my_name points at # print("I do not want ot be a number!", my_name, type(my_name)) # so now my_name points to different content # # # but also my_name is now pointing to different data type all together # # # # # this is convenient at times # # # it is using so called duck typing - if it quacks like a duck, walks like a duck it is duck # # # # # so data type is inferred from the data we give our variables # # # this is so called dynamic typing # # # there are languages with static types it takes more code to write with static language # # # but for larger projects static languages are preferable for management reason # # # # # so Python really shines in prototypes, smaller projects # # # # # there are exceptions, like Dropbox which has those 3 million lines of Python :) # my_name = "Valdis" # president = "Valdis" # neighbor = "Valdis" # print(id(my_name), id(president), id(neighbor), sep="\n") # sep is what to use between , in print # neighbor = "Voldemars" # print(id(my_name), id(president), id(neighbor), sep="\n") # # # print(c) # c = c + 5000 # this is not algebra we are creating a new value on the left from the right # # # evaluation happens from the right side , assignment to the left # # # above is not an equality!! there is another symbol for equality (Day 3) # print(c) # # # c += 10_000 # shorter way of writing c = c + 10000 # print(c, type(c)) # # # c = c + 3.1415926 # we use . instead of , for decimals # print(c, type(c)) # # # my_pi = 3.1415926 # print(my_pi, type(my_pi)) # # # so if we expect for this to be constant # MY_PI = 3.1416 # print(MY_PI, type(MY_PI)) # # # # # Naming things are hard # # #Function and Variable Names # # # from https://www.python.org/dev/peps/pep-0008/#prescriptive-naming-conventions # # # Function names should be lowercase, with words separated by underscores as necessary to improve readability. # # # # # # Variable names follow the same convention as function names. # # # # # # mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility. # # # # # d = a # d points to the same value as a # # # print(a,d) # # # # # # a2 = 50 # we can do this but generally this smells of improvement # # # a3 = 51 # # # a4 = 52 # there are better data structures # # # # # # # one of the hardest things in programming is naming variables # # # # launch_codes_to_nuclear_weapons = "GoodBEEF" # a bit long # # # takes too long to type even on a good IDE # # # launch_codes should be better assuming your program a nuclear weapons program... # # # # # # # short variables which are fine # # # # x,y,z would be fine when dealing with coordinates # # # # # i for iterator, # # # # t for temporary, could be also temperature # # # # c for characters # # # # f for file # # # # # # # h for height # # # w - width would be okay # # # # l for length is a bit iffy, use of l is discouraged # # # # why? because l can be confused with 1 and I on some systems # # # # # # # all capital variable means that it really is a constant # RTU = "Riga Technical University" # print(RTU) # # RTU = "Tieto" # no body is going to stop you here but you should not do this if you have capital letters # print(RTU) # # # # we shouldn't change this # # # # # # # we use English # # kaķis = "my cat" # please do not do this :) # # print(kaķis) # my_cat = "mans kaķis Muris murrā" # that is fine # print(my_cat) # smiley_msg = "AHmm ! 🤩 😀 -> \u1F600" # this is 16bit Unicode and 0 # print(smiley_msg) # smiley_again = "Aha 😆 ! 😀 -> \U0001F600" # for Unicode encoded with more than 4 Hex symbols you need to use 32 # print(smiley_again) # # # # # so we have str, int, and float so far # # # there is also boolean (Day 3), None -> which is specific type for representing nothing # # # then we have more complext collections # print(type(True), type(False), type(None)) # two more primitive types # # my_str = "888.67" # this is str # my_float = float(my_str) # this is forced type casting we want to cast our text string into a number # my_int = int(my_float) # here I cast float to integer so naturally I lose everything after comma # # # # print(my_str, my_float, my_int) # # # # # not everthin will cast to number # # print(my_name) # # will_fail = int(my_name) # this will fail with an ValueError # # # there are ways of checking # # my_int_again = int(my_str) # also will fail # my_string_num = "007" # we can cast this to int no problem # my_int_again = int(my_string_num) # my_float_again = float(my_string_num) # # back_to_string = str(my_int_again) # so we will lose the extra zeros in front # print(my_string_num, back_to_string) # # # i think everything is castable to str(any_data_type) # # print(int("007 agent James")) # will not work, will need extra processing sq_root = 4**0.5 # square root square = 4**2 print(sq_root, square) result = 4 / 2 # this will be float result_without_reminder = 4 // 2 # so this will be int reminder = 7 % 5 # 2 which is int
# # PySNMP MIB module ALVARION-AAA-CLIENT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALVARION-AAA-CLIENT-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:21:57 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) # alvarionMgmtV2, = mibBuilder.importSymbols("ALVARION-SMI", "alvarionMgmtV2") AlvarionServerIndex, AlvarionProfileIndex, AlvarionServerIndexOrZero = mibBuilder.importSymbols("ALVARION-TC", "AlvarionServerIndex", "AlvarionProfileIndex", "AlvarionServerIndexOrZero") OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") TimeTicks, ObjectIdentity, IpAddress, iso, MibIdentifier, Counter32, Counter64, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, Gauge32, Integer32, ModuleIdentity, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "ObjectIdentity", "IpAddress", "iso", "MibIdentifier", "Counter32", "Counter64", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "Gauge32", "Integer32", "ModuleIdentity", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") alvarionAAAClientMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5)) if mibBuilder.loadTexts: alvarionAAAClientMIB.setLastUpdated('200710310000Z') if mibBuilder.loadTexts: alvarionAAAClientMIB.setOrganization('Alvarion Ltd.') if mibBuilder.loadTexts: alvarionAAAClientMIB.setContactInfo('Alvarion Ltd. Postal: 21a HaBarzel St. P.O. Box 13139 Tel-Aviv 69710 Israel Phone: +972 3 645 6262') if mibBuilder.loadTexts: alvarionAAAClientMIB.setDescription('Alvarion AAA Client MIB file.') alvarionAAAClientObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1)) alvarionAAAProfileGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1)) alvarionAAAServerGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2)) alvarionAAAProfileTable = MibTable((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1, 1), ) if mibBuilder.loadTexts: alvarionAAAProfileTable.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfileTable.setDescription('A table defining the AAA server profiles currently configured on the device.') alvarionAAAProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1, 1, 1), ).setIndexNames((0, "ALVARION-AAA-CLIENT-MIB", "alvarionAAAProfileIndex")) if mibBuilder.loadTexts: alvarionAAAProfileEntry.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfileEntry.setDescription('A AAA server profile configured in the device. alvarionAAAProfileIndex - Uniquely identifies the profile within the profile table.') alvarionAAAProfileIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1, 1, 1, 1), AlvarionProfileIndex()) if mibBuilder.loadTexts: alvarionAAAProfileIndex.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfileIndex.setDescription('Specifies the index of the AAA server profile.') alvarionAAAProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1, 1, 1, 2), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alvarionAAAProfileName.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfileName.setDescription('Specifies the name of the AAA server profile.') alvarionAAAProfilePrimaryServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1, 1, 1, 3), AlvarionServerIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAAProfilePrimaryServerIndex.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfilePrimaryServerIndex.setDescription('Indicates the index number of the primary server profile in the table. A value of zero indicates that no AAA server is defined.') alvarionAAAProfileSecondaryServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 1, 1, 1, 4), AlvarionServerIndexOrZero()).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAAProfileSecondaryServerIndex.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfileSecondaryServerIndex.setDescription('Indicates the index number of the secondary server profile in the table. A value of zero indicates that no AAA server is defined.') alvarionAAAServerTable = MibTable((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1), ) if mibBuilder.loadTexts: alvarionAAAServerTable.setStatus('current') if mibBuilder.loadTexts: alvarionAAAServerTable.setDescription('A table containing the AAA servers currently configured on the device.') alvarionAAAServerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1), ).setIndexNames((0, "ALVARION-AAA-CLIENT-MIB", "alvarionAAAServerIndex")) if mibBuilder.loadTexts: alvarionAAAServerEntry.setStatus('current') if mibBuilder.loadTexts: alvarionAAAServerEntry.setDescription('An AAA server configured on the device. alvarionAAAServerIndex - Uniquely identifies a server inside the server table.') alvarionAAAServerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 1), AlvarionServerIndex()) if mibBuilder.loadTexts: alvarionAAAServerIndex.setStatus('current') if mibBuilder.loadTexts: alvarionAAAServerIndex.setDescription('Specifies the index of the AAA server in the table.') alvarionAAAAuthenProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("radius", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAAAuthenProtocol.setStatus('current') if mibBuilder.loadTexts: alvarionAAAAuthenProtocol.setDescription('Indicates the protocol used by the AAA client to communicate with the AAA server.') alvarionAAAAuthenMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("pap", 1), ("chap", 2), ("mschap", 3), ("mschapv2", 4), ("eapMd5", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAAAuthenMethod.setStatus('current') if mibBuilder.loadTexts: alvarionAAAAuthenMethod.setDescription('Indicates the authentication method used by the AAA client to authenticate users via the AAA server.') alvarionAAAServerName = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alvarionAAAServerName.setStatus('current') if mibBuilder.loadTexts: alvarionAAAServerName.setDescription("Specifies the IP address of the AAA server. The string must be a valid IP address in the format 'nnn.nnn.nnn.nnn' Where 'nnn' is a number in the range [0..255]. The '.' character is mandatory between the fields.") alvarionAAASharedSecret = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 5), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alvarionAAASharedSecret.setStatus('current') if mibBuilder.loadTexts: alvarionAAASharedSecret.setDescription('Specifies the shared secret used by the AAA client and the AAA server. This attribute should only be set if AAA traffic between the AAA client and server is sent through a VPN tunnel. Reading this attribute will always return a zero-length string.') alvarionAAAAuthenticationPort = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAAAuthenticationPort.setStatus('current') if mibBuilder.loadTexts: alvarionAAAAuthenticationPort.setDescription('Indicates the port number used by the AAA client to send authentication requests to the AAA server.') alvarionAAAAccountingPort = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAAAccountingPort.setStatus('current') if mibBuilder.loadTexts: alvarionAAAAccountingPort.setDescription('Indicates the port number used by the AAA client to send accounting information to the AAA server.') alvarionAAATimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(3, 100))).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAATimeout.setStatus('current') if mibBuilder.loadTexts: alvarionAAATimeout.setDescription('Indicates how long the AAA client will wait for an answer to an authentication request.') alvarionAAANASId = MibTableColumn((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 1, 2, 1, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 253))).setMaxAccess("readonly") if mibBuilder.loadTexts: alvarionAAANASId.setStatus('current') if mibBuilder.loadTexts: alvarionAAANASId.setDescription('Indicates the network access server ID to be sent by the AAA client in each authentication request sent to the AAA server.') alvarionAAAClientMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 2)) alvarionAAAClientMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 2, 1)) alvarionAAAClientMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 2, 2)) alvarionAAAClientMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 2, 1, 1)).setObjects(("ALVARION-AAA-CLIENT-MIB", "alvarionAAAProfileMIBGroup"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAClientMIBGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alvarionAAAClientMIBCompliance = alvarionAAAClientMIBCompliance.setStatus('current') if mibBuilder.loadTexts: alvarionAAAClientMIBCompliance.setDescription('The compliance statement for entities which implement the Alvarion AAA client MIB.') alvarionAAAProfileMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 2, 2, 1)).setObjects(("ALVARION-AAA-CLIENT-MIB", "alvarionAAAProfileName"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAProfilePrimaryServerIndex"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAProfileSecondaryServerIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alvarionAAAProfileMIBGroup = alvarionAAAProfileMIBGroup.setStatus('current') if mibBuilder.loadTexts: alvarionAAAProfileMIBGroup.setDescription('A collection of objects providing the AAA profile capability.') alvarionAAAClientMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 12394, 1, 10, 5, 5, 2, 2, 2)).setObjects(("ALVARION-AAA-CLIENT-MIB", "alvarionAAAAuthenProtocol"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAAuthenMethod"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAServerName"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAASharedSecret"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAAuthenticationPort"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAAAccountingPort"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAATimeout"), ("ALVARION-AAA-CLIENT-MIB", "alvarionAAANASId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alvarionAAAClientMIBGroup = alvarionAAAClientMIBGroup.setStatus('current') if mibBuilder.loadTexts: alvarionAAAClientMIBGroup.setDescription('A collection of objects providing the AAA client MIB capability.') mibBuilder.exportSymbols("ALVARION-AAA-CLIENT-MIB", alvarionAAAProfilePrimaryServerIndex=alvarionAAAProfilePrimaryServerIndex, alvarionAAAServerTable=alvarionAAAServerTable, alvarionAAAClientMIBGroup=alvarionAAAClientMIBGroup, alvarionAAAAuthenMethod=alvarionAAAAuthenMethod, alvarionAAAAuthenticationPort=alvarionAAAAuthenticationPort, alvarionAAAClientObjects=alvarionAAAClientObjects, PYSNMP_MODULE_ID=alvarionAAAClientMIB, alvarionAAAAccountingPort=alvarionAAAAccountingPort, alvarionAAAServerIndex=alvarionAAAServerIndex, alvarionAAANASId=alvarionAAANASId, alvarionAAAClientMIBConformance=alvarionAAAClientMIBConformance, alvarionAAAClientMIB=alvarionAAAClientMIB, alvarionAAAProfileIndex=alvarionAAAProfileIndex, alvarionAAASharedSecret=alvarionAAASharedSecret, alvarionAAAClientMIBCompliance=alvarionAAAClientMIBCompliance, alvarionAAAClientMIBGroups=alvarionAAAClientMIBGroups, alvarionAAAClientMIBCompliances=alvarionAAAClientMIBCompliances, alvarionAAAProfileEntry=alvarionAAAProfileEntry, alvarionAAAAuthenProtocol=alvarionAAAAuthenProtocol, alvarionAAAProfileTable=alvarionAAAProfileTable, alvarionAAAProfileName=alvarionAAAProfileName, alvarionAAAServerEntry=alvarionAAAServerEntry, alvarionAAAServerName=alvarionAAAServerName, alvarionAAATimeout=alvarionAAATimeout, alvarionAAAProfileMIBGroup=alvarionAAAProfileMIBGroup, alvarionAAAProfileGroup=alvarionAAAProfileGroup, alvarionAAAServerGroup=alvarionAAAServerGroup, alvarionAAAProfileSecondaryServerIndex=alvarionAAAProfileSecondaryServerIndex)
begin_unit comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\n' comment|'#' nl|'\n' comment|'# Unless required by applicable law or agreed to in writing, software' nl|'\n' comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT' nl|'\n' comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the' nl|'\n' comment|'# License for the specific language governing permissions and limitations' nl|'\n' comment|'# under the License.' nl|'\n' nl|'\n' string|'"""Serial consoles module."""' newline|'\n' nl|'\n' name|'import' name|'socket' newline|'\n' nl|'\n' name|'from' name|'oslo_log' name|'import' name|'log' name|'as' name|'logging' newline|'\n' name|'import' name|'six' op|'.' name|'moves' newline|'\n' nl|'\n' name|'import' name|'nova' op|'.' name|'conf' newline|'\n' name|'from' name|'nova' name|'import' name|'exception' newline|'\n' name|'from' name|'nova' op|'.' name|'i18n' name|'import' name|'_LW' newline|'\n' name|'from' name|'nova' name|'import' name|'utils' newline|'\n' nl|'\n' DECL|variable|LOG name|'LOG' op|'=' name|'logging' op|'.' name|'getLogger' op|'(' name|'__name__' op|')' newline|'\n' nl|'\n' DECL|variable|ALLOCATED_PORTS name|'ALLOCATED_PORTS' op|'=' name|'set' op|'(' op|')' comment|'# in-memory set of already allocated ports' newline|'\n' DECL|variable|SERIAL_LOCK name|'SERIAL_LOCK' op|'=' string|"'serial-lock'" newline|'\n' nl|'\n' DECL|variable|CONF name|'CONF' op|'=' name|'nova' op|'.' name|'conf' op|'.' name|'CONF' newline|'\n' nl|'\n' comment|'# TODO(sahid): Add a method to initialize ALOCATED_PORTS with the' nl|'\n' comment|'# already binded TPC port(s). (cf from danpb: list all running guests and' nl|'\n' comment|'# query the XML in libvirt driver to find out the TCP port(s) it uses).' nl|'\n' nl|'\n' nl|'\n' op|'@' name|'utils' op|'.' name|'synchronized' op|'(' name|'SERIAL_LOCK' op|')' newline|'\n' DECL|function|acquire_port name|'def' name|'acquire_port' op|'(' name|'host' op|')' op|':' newline|'\n' indent|' ' string|'"""Returns a free TCP port on host.\n\n Find and returns a free TCP port on \'host\' in the range\n of \'CONF.serial_console.port_range\'.\n """' newline|'\n' nl|'\n' name|'start' op|',' name|'stop' op|'=' name|'_get_port_range' op|'(' op|')' newline|'\n' nl|'\n' name|'for' name|'port' name|'in' name|'six' op|'.' name|'moves' op|'.' name|'range' op|'(' name|'start' op|',' name|'stop' op|')' op|':' newline|'\n' indent|' ' name|'if' op|'(' name|'host' op|',' name|'port' op|')' name|'in' name|'ALLOCATED_PORTS' op|':' newline|'\n' indent|' ' name|'continue' newline|'\n' dedent|'' name|'try' op|':' newline|'\n' indent|' ' name|'_verify_port' op|'(' name|'host' op|',' name|'port' op|')' newline|'\n' name|'ALLOCATED_PORTS' op|'.' name|'add' op|'(' op|'(' name|'host' op|',' name|'port' op|')' op|')' newline|'\n' name|'return' name|'port' newline|'\n' dedent|'' name|'except' name|'exception' op|'.' name|'SocketPortInUseException' name|'as' name|'e' op|':' newline|'\n' indent|' ' name|'LOG' op|'.' name|'warning' op|'(' name|'e' op|'.' name|'format_message' op|'(' op|')' op|')' newline|'\n' nl|'\n' dedent|'' dedent|'' name|'raise' name|'exception' op|'.' name|'SocketPortRangeExhaustedException' op|'(' name|'host' op|'=' name|'host' op|')' newline|'\n' nl|'\n' nl|'\n' dedent|'' op|'@' name|'utils' op|'.' name|'synchronized' op|'(' name|'SERIAL_LOCK' op|')' newline|'\n' DECL|function|release_port name|'def' name|'release_port' op|'(' name|'host' op|',' name|'port' op|')' op|':' newline|'\n' indent|' ' string|'"""Release TCP port to be used next time."""' newline|'\n' name|'ALLOCATED_PORTS' op|'.' name|'discard' op|'(' op|'(' name|'host' op|',' name|'port' op|')' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|_get_port_range dedent|'' name|'def' name|'_get_port_range' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'config_range' op|'=' name|'CONF' op|'.' name|'serial_console' op|'.' name|'port_range' newline|'\n' name|'try' op|':' newline|'\n' indent|' ' name|'start' op|',' name|'stop' op|'=' name|'map' op|'(' name|'int' op|',' name|'config_range' op|'.' name|'split' op|'(' string|"':'" op|')' op|')' newline|'\n' name|'if' name|'start' op|'>=' name|'stop' op|':' newline|'\n' indent|' ' name|'raise' name|'ValueError' newline|'\n' dedent|'' dedent|'' name|'except' name|'ValueError' op|':' newline|'\n' indent|' ' name|'default_port_range' op|'=' name|'nova' op|'.' name|'conf' op|'.' name|'serial_console' op|'.' name|'DEFAULT_PORT_RANGE' newline|'\n' name|'LOG' op|'.' name|'warning' op|'(' name|'_LW' op|'(' string|'"serial_console.port_range should be <num>:<num>. "' nl|'\n' string|'"Given value %(port_range)s could not be parsed. "' nl|'\n' string|'"Taking the default port range %(default)s."' op|')' op|',' nl|'\n' op|'{' string|"'port_range'" op|':' name|'config_range' op|',' nl|'\n' string|"'default'" op|':' name|'default_port_range' op|'}' op|')' newline|'\n' name|'start' op|',' name|'stop' op|'=' name|'map' op|'(' name|'int' op|',' name|'default_port_range' op|'.' name|'split' op|'(' string|"':'" op|')' op|')' newline|'\n' dedent|'' name|'return' name|'start' op|',' name|'stop' newline|'\n' nl|'\n' nl|'\n' DECL|function|_verify_port dedent|'' name|'def' name|'_verify_port' op|'(' name|'host' op|',' name|'port' op|')' op|':' newline|'\n' indent|' ' name|'s' op|'=' name|'socket' op|'.' name|'socket' op|'(' op|')' newline|'\n' name|'try' op|':' newline|'\n' indent|' ' name|'s' op|'.' name|'bind' op|'(' op|'(' name|'host' op|',' name|'port' op|')' op|')' newline|'\n' dedent|'' name|'except' name|'socket' op|'.' name|'error' name|'as' name|'e' op|':' newline|'\n' indent|' ' name|'raise' name|'exception' op|'.' name|'SocketPortInUseException' op|'(' nl|'\n' name|'host' op|'=' name|'host' op|',' name|'port' op|'=' name|'port' op|',' name|'error' op|'=' name|'e' op|')' newline|'\n' dedent|'' name|'finally' op|':' newline|'\n' indent|' ' name|'s' op|'.' name|'close' op|'(' op|')' newline|'\n' dedent|'' dedent|'' endmarker|'' end_unit
chosenNumber = int(input("Number? ")) rangeNumber = 100 previousNumber = 0 count = 0 while count != 10: count += 1 rangeNumber = (100 - previousNumber) // 2 previousNumber = rangeNumber + previousNumber print("rangeNumber: %i; previousNumber: %i; try: %i" % (rangeNumber, previousNumber, count)) if previousNumber == chosenNumber: exit()
''' Copyright (c) 2012-2017, Agora Games, LLC All rights reserved. https://github.com/agoragames/kairos/blob/master/LICENSE.txt ''' class KairosException(Exception): '''Base class for all kairos exceptions''' class UnknownInterval(KairosException): '''The requested interval is not configured.'''
""" What you will lean: - What is a while loop - How to write a while - starting conditions for while loops - Exit conditions for while loops Okay so now we know if a "thing" is True of False. Now let's use that tool for something more powerful: loops. We will first do "while loops". Pretend you are drunk and on a mary-go-round: You friend bet that you cannot stay on for 10 loops on the mary-go-round. So of course you say you can. You get on and they start pushing you in circles. Now each you complete a rotation you count 1 closer to 10. Once you get to 10 you get off - and promptly puke. BUT THIS IS A FOR LOOP! while count < 10 go spin more then increase count. Note how in example 1 we create a starting condition (1)and an ending condition (10). Then we increase the value of out variable by 1 each time. IF WE DIDN't WE BE IN A INFINITE LOOP! As long as the expression i < 10 evaluates to True we keep running the loop. If we run Example 1 how what is the largest number printed? ... Think about why this is the case What you need to do: Pt 1 - Create a while loop that prints 0,2,4,6,8,10 - Create a while loop that prints 10,7,4,1 Pt 2 In Example 3 ... - Change the value of run to True - inside the while loop create an if statement that checks if k is the 4th multiple of 15. If this is True set run to False Pt 3 Challenge Problem (reuse your code form module 5!): Create a program that can ... - Create a while loop that counts from 0 to 100. - If the number count is divisible by only 3 print "foo" - If the number count is divisible by only 5 print "bar" - If the number count is divisible by both 5 and 3 print foobarr - If the number count is not divisible by either 3 or 5 print the number The first several rows of output should look like this: 1 2 foo 4 bar foo 7 8 foo 9 bar 11 foo 13 14 foobar """ # EX 1 i = 1 # starting condition while i < 10: print(i) i += 1 # this is the same as i = 1 + 1 # Ex 2 t = 10 while t > 0: print(t) t -= 1 # this is the same as t = t - 1 # Ex 3 run = False k = 1 while run: print(k) k += 1
#!/usr/bin/env python # -*- coding: UTF-8 -*- def test1(): letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] print(letters) letters[2:5] = ['C', 'D', 'E'] print(letters) letters[2:5] = [] print(letters) letters[:] = [] print(letters) def test2(): print('\ntest2') a = ['a', 'b', 'c'] n = [1, 2, 3] x = [a, n] print(x) print(x[0]) print(x[0][1]) def main(): test1() test2() if __name__ == "__main__": main()
DEFAULT_DOMAIN = "messages" DEFAULT_LOCALE_DIR_NAME = "locale" DEFAULT_IGNORE_PATTERNS = [ ".*", "*~", "CVS", "__pycache__", "*.pyc", ] DEFAULT_KEYWORDS = [ "_", "gettext", "L_", "gettext_lazy", "N_:1,2", "ngettext:1,2", "LN_:1,2", "ngettext_lazy:1,2", "P_:1c,2", "pgettext:1c,2", "LP_:1c,2", "pgettext_lazy:1c,2", "NP_:1c,2,3", "npgettext:1c,2,3", "LNP_:1c,2,3", "npgettext_lazy:1c,2,3", ]
a = 50 print('\033[32m_\033[m'*a) print('\033[1;32m{:=^{}}\033[m'.format('SISTEMA DE DETECÇAO DE NUMEROS', a)) print('\033[32m-\033[m'*a) nove = 0 par = '0' num1 = int(input('\033[35mDigite um numero inteiro: ')) num2 = int(input('\033[35mDigite um numero inteiro: ')) num3 = int(input('\033[35mDigite um numero inteiro: ')) num4 = int(input('\033[35mDigite um numero inteiro: ')) tupla = (num1, num2, num3, num4) for c in range(0,4): if tupla[c] == 9 : nove +=1 if tupla[c]%2 == 0: par[c] = str(tupla[c]) print('\033[33m-='*15) print(f'\033[1;34mApareceram {nove} vezes o valor 9.') print(f'\033[1;34mO valor 3 foi digitado primeiramente na {tupla.index(3)+1} posiçao.'if tupla.count(3) != 0 else 'Nao houve 3') print(par)
"""Function for building a diatomic molecule.""" def create_diatomic_molecule_geometry(species1, species2, bond_length): """Create a molecular geometry for a diatomic molecule. Args: species1 (str): Chemical symbol of the first atom, e.g. 'H'. species2 (str): Chemical symbol of the second atom. bond_length (float): bond distance. Returns: dict: a dictionary containing the coordinates of the atoms. """ geometry = {"sites": [ {'species': species1, 'x': 0, 'y': 0, 'z': 0}, {'species': species2, 'x': 0, 'y': 0, 'z': bond_length} ]} return geometry
X_threads = 16*2 Y_threads = 1 Invoc_count = 2 start_index = 0 end_index = 0 src_list = ["needle_kernel.cu", "needle.h"] SHARED_MEM_USE = True total_shared_mem_size = 2.18*1024 domi_list = [233] domi_val = [0]
# -*- coding: utf-8 -*- __author__ = 'luckydonald' CHARS_UNESCAPED = ["\\", "\n", "\r", "\t", "\b", "\a", "'"] CHARS_ESCAPED = ["\\\\", "\\n", "\\r", "\\t", "\\b", "\\a", "\\'"] def suppress_context(exc): exc.__context__ = None return exc def escape(string): for i in range(0, 7): string = string.replace(CHARS_UNESCAPED[i], CHARS_ESCAPED[i]) return string.join(["'", "'"]) # wrap with single quotes. def coroutine(func): """ Skips to the first yield when the generator is created. Used as decorator, @coroutine :param func: function (generator) with yield. :return: generator """ def start(*args, **kwargs): try: cr = func(*args, **kwargs) try: next(cr) except NameError: # not defined, python 2 cr.next() return cr except StopIteration: return except KeyboardInterrupt: raise StopIteration return start
#! /usr/bin/env python3 # coding: utf-8 def main(): file1 = open('input', 'r') Lines = file1.readlines() valid_passwords = 0 numbers = [] # Strips the newline character for line in Lines: print(line) firstPosition = int(line.split('-')[0]) secondPosition = int(line.split('-')[1].split(' ')[0]) letter = line.split('-')[1].split(' ')[1].split(':')[0] password = line.split(': ')[1] firstValid = letter == password[firstPosition-1] secondValid = letter == password[secondPosition-1] print("Line : firstPosition={}, secondPosition={}, letter={}, password={}, firstValid={}, secondValid={}".format(firstPosition,secondPosition,letter,password, firstValid, secondValid)) if firstValid ^ secondValid: valid_passwords += 1 print("Result: {}".format(valid_passwords)) if __name__ == '__main__': main()
# -*- coding: utf-8 -*- """ Created on Wed Apr 22 17:21:06 2020 @author: Ravi """ def MazeRunner(n,s): ans = '' for i in s: if i=='S': ans+='E' else: ans+='S' return ans t = int(input()) for i in range(t): n = int(input()) s = input() ans = MazeRunner(n,s) print("Case "+"#"+str(i)+": "+str(ans))
recipes_tuple = { "Chicken and chips": [ ("chicken", 100), ("potatoes", 3), ("salt", 1), ("malt vinegar", 5), ], } recipes_dict = { "Chicken and chips": { "chicken": 100, "potatoes": 3, "salt": 1, "malt vinegar": 5, }, } # using tuples for recipe, ingredients in recipes_tuple.items(): print(f"Ingredients for {recipe}") for ingredient, quantity in ingredients: # ingredients is a tuple print(ingredient, quantity, sep=', ') print() # using a dictionary for recipe, ingredients in recipes_dict.items(): print(f"Ingredients for {recipe}") for ingredient, quantity in ingredients.items(): # ingredients is a dict print(ingredient, quantity, sep=', ')
# ===================================== # generator=datazen # version=2.1.0 # hash=8d04b157255269c7d7ec7a9f5e0e3e02 # ===================================== """ Useful defaults and other package metadata. """ DESCRIPTION = "A collection of core Python utilities." PKG_NAME = "vcorelib" VERSION = "0.10.5" DEFAULT_INDENT = 2 DEFAULT_ENCODING = "utf-8"
class Scorer: """ Base class for an estimator scoring object. """ def __call__(self, estimator, X, y, sample_weight=None): """ Parameters ---------- estimator: Estimator The fit estimator to score. X: array-like, shape (n_samples, n_features) The covariate data to used for scoring. y: array-like, shape (n_samples, ) or (n_samples, n_responses) The response data to used for scoring. sample_weight: None, array-like (n_samples, ) (Optional) Sample weight to use for scoring. Output ------ scores: float The scores. For measures of fit larger scores should always indicate better fit. """ raise NotImplementedError("Subclass should overwrite") @property def name(self): """ Output ------ name: str Name of this scoring object. """ raise NotImplementedError("Subclass should overwrite") class MultiScorer: """ Base class for an estimator scoring object returning multiple scores. Parameters ---------- default: str Name of the default score to use. Attributes ---------- name: str Name of this score. """ def __call__(self, estimator, X, y, sample_weight=None): """ Output ------ scores: dict of float The scores. For measures of fit larger scores should always indicate better fit. """ raise NotImplementedError("Subclass should overwrite")
class RequestsError(Exception): pass def report_error(response): """ Report an error from a REST request. response A response object corresponding to an API request. The caller will be responsible for checking the status code for an error. """ url = response.url msg = (f'requests_error: {response.content}\nurl: {url} ') raise RequestsError(msg)
# always and forever MAGZP_REF = 30.0 # this is always true for the DES POSITION_OFFSET = 1 # never change these MEDSCONF = 'y3v02' PIFF_RUN = 'y3a1-v29'
# Ex: 059 - Crie um programa que leia dois valores e mostre um menu na tela: # [1]Somar; [2]Multiplicar; [3]Maior; [4]Novos números; [5] Sair do programa. # Seu programa deverá realizar a operação solicitada em cada caso. print(''' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --Seja bem-vindo! --Exercício 059 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ''') print('--Preencha os Dados') n1 = float(input('1° Valor: ')) n2 = float(input('2° Valor: ')) opcao = 0 while opcao != 5: print('''\nOpções: [ 1 ] Somar [ 2 ] Multiplicar [ 3 ] Maior [ 4 ] Novos Números [ 5 ] Sair do Programa''') opcao = int(input('Digite a opção desejada: ')) print('') if opcao > 5 or opcao == 0: print('Opção Inválida. Tente novamente...') False elif opcao == 4: print('--Preencha os Dados') n1 = float(input('1° Valor: ')) n2 = float(input('2° Valor: ')) False elif opcao == 3: if n1 > n2: print(f'O número {n1} é o maior...') elif n1 < n2: print(f'O número {n2} é o maior...') else: print(f'Os números {n1} e {n2} são iguais...') elif opcao == 2: multiplicacao = n1 * n2 print(f'{n1} x {n2} = {multiplicacao}') elif opcao == 1: soma = n1 + n2 print(f'{n1} + {n2} = {soma}') print('Programa finalizado. Volte sempre!') print(''' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --Obrigado pelo uso! --Desenvolvido por Thalles Torres -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-''')
#Ejercicio 1002 ''' radio = input() radio = float(radio) pi = float(3.14159) A = (pi*(radio**2)) print ("A={:.4f}".format(A)) */ ''' #Ejercicio 1003 ''' A = input() B = input() A = int(A) B = int(B) SOMA = A+B print("SOMA = {0}".format(SOMA)) ''' #Ejercicio 1004 ''' A = input() B = input() A = int(A) B = int(B) PROD = A*B print("PROD = {0}".format(PROD)) ''' #Ejercicio 1005 ''' A = input() B = input() A = float(A) B = float(B) PROD = ((A*.35)+(B*.75))/1.1 print ("MEDIA = {:.5f}".format(PROD)) ''' #Ejercicio 1006 ''' A = input() B = input() C = input() A = float(A) B = float(B) C = float(C) PROD = ((A*.2)+(B*.3)+(C*.5)) print ("MEDIA = {:.1f}".format(PROD)) '''
''' @author: Jakob Prange (jakpra) @copyright: Copyright 2020, Jakob Prange @license: Apache 2.0 ''' def open_par(s): return s == '(' def close_par(s): return s == ')' def open_angle(s): return s == '<' def close_angle(s): return s == '>' def open_bracket(s): return s == '[' def close_bracket(s): return s == ']' def slash(s): return s in ('/', '\\') def one_bit(s): return s == '1' def zero_bit(s): return s == '0' def tree_node(s): return s == 'T' def leaf_node(s): return s == 'L'
m_start = 'Привет!\nТы попал в анонимный чат знакомств!\n' \ 'Нажимай кнопку ниже, чтобы начать общение с собеседником. ' \ 'Если захочешь узнать человека поближе - жми кнопку like и при взаимной симпатии ' \ 'вы сможете узнать никнейм партнера. Если собеседник вам не по нраву, ' \ 'то смело жми кнопку dislike и начинай новый чат.\n' \ 'ВНИМАНИЕ! Для успешной работы бота у вас должен быть никнейм, ' \ 'проверьте настройки и убедитесь, что у вас он указан!\n' \ 'Чтобы завершить работу бота, вызовите команду /stop. ' \ 'Учтите, что все ваши данные при этом будут удалены, в противном случае вы останетесь в базе.' m_is_not_free_users = 'Извините, но в данный момент нет свободных пользователей. ' \ 'Как только зайдет еще один пользователь, мы вас соединим!' m_is_connect = 'Соединение установлено. Поприветствуйте собеседника!' m_play_again = 'Хотите еще с кем-нибудь пообщаться?' m_is_not_user_name = 'Извините, но в нашем боте возможно общаться только если вы имеет username' m_good_bye = 'Bot: До свидания, рады будем видеть Вас снова!' m_disconnect_user = 'Bot: Ваш собеседник отключился' m_failed = 'Bot: Произошла какая-то ошибка!' m_like = 'Bot: Отличный выбор!' m_dislike_user = 'Bot: Диалог окончен' m_dislike_user_to = 'Bot: Вы не понравились собеседнику, сожалеем' m_send_some_messages = 'Bot: нельзя пересылать собственные сообщения' m_has_not_dialog = 'Вы не состоите в диалоге' dislike_str = '\U0001F44E Dislike' like_str = '\U0001F44D Like' def m_all_like(x): return 'Вы понравились собеседнику\n' + 'Его логин: ' + str(x) + \ '\nУдачи вам в вашем общении!\nСпасибо что вы с нами!'
def fact(n): f = 1 while(n>=1): f = f * n n-= 1 print(f) def main(): n = int(input("Enter a number: ")) fact(n) if __name__ == "__main__": main()
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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. # # NOTE: This class is auto generated by the jdcloud code generator program. class DebugReturnMessage(object): def __init__(self, requestUrl=None, requestHeader=None, requestBody=None, responseCodeStatus=None, responseHeaderValue=None, responseBody=None): """ :param requestUrl: (Optional) 请求地址 :param requestHeader: (Optional) request中header信息 :param requestBody: (Optional) request中body信息 :param responseCodeStatus: (Optional) 响应状态码 :param responseHeaderValue: (Optional) header返回值 :param responseBody: (Optional) body返回值 """ self.requestUrl = requestUrl self.requestHeader = requestHeader self.requestBody = requestBody self.responseCodeStatus = responseCodeStatus self.responseHeaderValue = responseHeaderValue self.responseBody = responseBody
#VÊ SE UM NÚMERO É POSITIVO OU NÃO num = int(input("Digite um número:")) if num >=1: print("Número positivo") elif num < 0: print("Número negativo") else: print("Zero não pode, ele é neutro pô")