content
stringlengths
7
1.05M
short_name = "anl" name = "Accidental Noise Library" major = 2 minor = 2 status = "dev"
""" Exercise 4 """ def exercise(now, alarm): return (now + (alarm % 24)) % 12 now = 3 alarm = 62 time = exercise(now, alarm) print(time) # second version now = int(input("Now time: ")) alarm = int(input("Waiting time: ")) time = exercise(now, alarm) print(time)
a= "sharad" b=25 c=3.18 d=True print(type(a)) print(type(b)) print(type(c)) print(type(d))
# -*- coding: utf-8 -*- """ gutils/constants """ class AugmentationType: """ Holds the augmentation transforms types """ PIXEL_LEVEL = 0 # Pixel-level transforms SPATIAL_LEVEL = 1 # Spatial-level transforms
class Solution: def multiply(self, num1: str, num2: str) -> str: if not num1 or not num2 or num1[0] == '0' or num2[0] == '0': return '0' nums = [[], []] for i, num in enumerate([num1, num2]): while True: num, sub = num[:-4], num[-4:] nums[i].append(int(sub)) if not num: break n1, n2 = len(nums[0]), len(nums[1]) result, product = '', [0] * (n1 + n2) for i in range(n1): for j in range(n2): product[i + j] += nums[0][i] * nums[1][j] for i in range(1, n1 + n2): product[i] += product[i - 1] // 10000 product[i - 1] = product[i - 1] % 10000 for i in range(n1 + n2 - 1, -1, -1): if not result or '0' == result: result = str(product[i]) else: result += '%04d' % product[i] return result def multiplyDirectly(self, num1: str, num2: str) -> str: if not num1 or not num2 or num1[0] == '0' or num2[0] == '0': return '0' n1, n2 = len(num1), len(num2); n = n1 + n2 result, product = '', [0] * n for i in range(n1 - 1, -1, -1): for j in range(n2 - 1, -1, -1): product[n - 2 - i - j] += int(num1[i]) * int(num2[j]) for i in range(1, n): product[i] += product[i - 1] // 10 product[i - 1] = product[i - 1] % 10 for i in range(n - 1, -1, -1): if not result or '0' == result: result = str(product[i]) else: result += str(product[i]) return result test = Solution().multiplyDirectly print(6, test('2', '3')) print(56088, test('123', '456')) print(2895899850190521, test('123456789', '23456789')) print(0, test('0', '45678')) # Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. # Example 1: # Input: num1 = "2", num2 = "3" # Output: "6" # Example 2: # Input: num1 = "123", num2 = "456" # Output: "56088" # Note: # The length of both num1 and num2 is < 110. # Both num1 and num2 contain only digits 0-9. # Both num1 and num2 do not contain any leading zero, except the number 0 itself. # You must not use any built-in BigInteger library or convert the inputs to integer directly. # 来源:力扣(LeetCode) # 链接:https://leetcode-cn.com/problems/multiply-strings # 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
#----------------------------------------------------------------------------- # Runtime: 36ms # Memory Usage: # Link: #----------------------------------------------------------------------------- class Solution: def isValid(self, s: str) -> bool: result = [] for ch in s: if ch == ')' or ch == ']' or ch == '}': if len(result) == 0: return False prev = result.pop() if not (ch == ')' and prev == '(') and not (ch == ']' and prev == '[') and not (ch == '}' and prev == '{'): return False else: result.append(ch) return len(result) == 0
# -*- coding: utf-8 -*- class OrganizationJSONPresenter: """Present an organization in the JSON format returned by API requests.""" def __init__(self, organization_context): self.context = organization_context self.organization = organization_context.organization def asdict(self): return self._model() def _model(self): model = { "id": self.context.id, "default": self.context.default, "logo": self.context.logo, "name": self.organization.name, } return model
a=int(input()) k=a%8 if k==1: print(1) elif k==2 or k==0: print(2) elif k==3 or k==7: print(3) elif k==4 or k==6: print(4) else: print(5)
def parse_profile(profile): kargs = {} try: for kv in profile.split(','): k, v = kv.split('=') kargs[k] = v except ValueError: # more informative error message raise ValueError( f"Failed to parse profile: {profile}. The expected format is:" " \"key1=value1,key2=value2,[...]\"" ) return kargs def parse_compare_directions(compare_directions): direcs = [] try: for direc in compare_directions.split(';'): left, right = direc.split('-') left, right = int(left), int(right) direcs.append((left, right)) except ValueError: # more informative error message raise ValueError( f"Failed to parse directions: {compare_directions}." " The expected format is: \"left1-right1;left2-right2;[...]\"" ) return direcs def parse_files(filenames): files = [] for f in filenames.split(';'): files.append(f) return files def parse_intfloat(s): try: return int(s) except ValueError: return float(s)
class _BaseOptimizer: def __init__(self, learning_rate=1e-4, reg=1e-3): self.learning_rate = learning_rate self.reg = reg def update(self, model): pass def apply_regularization(self, model): ''' Apply L2 penalty to the model. Update the gradient dictionary in the model :param model: The model with gradients :return: None, but the gradient dictionary of the model should be updated ''' ############################################################################# # TODO: # # 1) Apply L2 penalty to model weights based on the regularization # # coefficient # ############################################################################# # regulariwation on weights for wi in model.gradients: if wi[0].lower()=='w': model.gradients[wi]+= self.reg*model.weights[wi] # grad+ dL2/dw ############################################################################# # END OF YOUR CODE # #############################################################################
# Space: O(n) # Time: O(n) # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def isPalindrome(self, head): if not head: return True if head.next is None: return True temp = [] while head: temp.append(head.val) head = head.next return True if temp == temp[::-1] else False
# Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water. # Note: You may not slant the container and n is at least 2. class Solution: def maxArea(self, height: List[int]) -> int: # max = 0 # for i in range(len(height)): # for a in range(i, len(height)): # # length = abs(i - a) # # height_2 = min(height[i], height[a]) # container = (abs(i - a)) * (min(height[i], height[a])) # if max < container: # max = container # return max i, j = 0, len(height) - 1 water = 0 # i starts from the left, j starts from the right; testing possible combinations before they cross each other: while i < j: # the max of zero, or the width times the lower of (i or j): water = max(water, (j - i) * min(height[i], height[j])) # discarding the shorter line, and keep only the longer line; testing all possible combinations until i and j come across each other: if height[i] < height[j]: i += 1 else: j -= 1 return water
# -*- coding: utf-8; -*- # # @file __init__.py # @brief coll-gate messenger project init # @authors Frédéric SCHERMA (INRA UMR1095) # @date 2017-10-06 # @copyright Copyright (c) 2017 INRA/CIRAD # @license MIT (see LICENSE file) # @details __title__ = "INRA Coll-Gate" __copyright__ = "Copyright (c) 2017 INRA/CIRAD" __organisation__ = "INRA" __date__ = "2017-10-06" __author__ = "Frédéric Scherma" __maintainer__ = "Frédéric Scherma" __email__ = "frederic.scherma@inra.fr" __credits__ = ["Frédéric Scherma", "Medhi Boulenmour", "Nicolas Guilhot"] __license__ = 'Private' __version__ = '0.1.0' __build__ = 0x000100 __revision__ = "1" __status__ = "Development" __requires__ = ["igdectk"]
""" i2c interface part of hwpy: an OO hardware interface library home: https://www.github.com/wovo/hwpy """ class i2c_interface: """ I2C interface Implementations should implement at least the methods defined here. """ def read_command(self, address: int, command: int, n: int) -> list: raise NotImplementedError def write_command(self, address: int, command: int, data: list): raise NotImplementedError def write(self, address: int, data: list): raise NotImplementedError def read(self, address: int, count: int) -> list: raise NotImplementedError
def multiple(a, b): """Return the smallest number n that is a multiple of both a and b. >>> multiple(3, 4) 12 >>> multiple(14, 21) 42 """ "*** YOUR CODE HERE ***" base = 2 number = 1 while True: if a==1 and b==1: return number elif a%base==0: number = number*base a=a/base if b%base==0: b=b/base elif b%base==0 : number = number*base b=b/base else: base=base+1 def unique_digits(n): """Return the number of unique digits in positive integer n >>> unique_digits(8675309) # All are unique 7 >>> unique_digits(1313131) # 1 and 3 2 >>> unique_digits(13173131) # 1, 3, and 7 3 >>> unique_digits(10000) # 0 and 1 2 >>> unique_digits(101) # 0 and 1 2 >>> unique_digits(10) # 0 and 1 2 """ "*** YOUR CODE HERE ***" m=0 unique=0 while n != 0: if has_digit(m,n%10) == False: unique = unique+1 m = m*10+ n%10 n=n/10 return unique def has_digit(m,k): while m!=0: if m%10==k: return True else: m=m/10 return False
# Copyright 2019, OpenTelemetry Authors # # 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. SETTINGS_SERVICE = 'opentelemetry_trace_service' SETTINGS_TRACER = 'opentelemetry_tracer' SETTINGS_TRACE_ENABLED = 'opentelemetry_trace_enabled' SETTINGS_DISTRIBUTED_TRACING = 'opentelemetry_distributed_tracing' SETTINGS_ANALYTICS_ENABLED = 'opentelemetry_analytics_enabled' SETTINGS_ANALYTICS_SAMPLE_RATE = 'opentelemetry_analytics_sample_rate'
class QueryDeviceGroupMembersInDTO(object): def __init__(self): self.devGroupId = None self.accessAppId = None self.pageNo = None self.pageSize = None def getDevGroupId(self): return self.devGroupId def setDevGroupId(self, devGroupId): self.devGroupId = devGroupId def getAccessAppId(self): return self.accessAppId def setAccessAppId(self, accessAppId): self.accessAppId = accessAppId def getPageNo(self): return self.pageNo def setPageNo(self, pageNo): self.pageNo = pageNo def getPageSize(self): return self.pageSize def setPageSize(self, pageSize): self.pageSize = pageSize
# A non class to hold various constants # Plane colors colors = { 0 : 'r', 1 : 'g' , 2 : 'b' } cm2tick = 17.94 cm2wire = 3.3333
def p_e_m_disamb_redirect_wikinameid_maps(): wall_start = time.time() redirections = dict() with open(config.base_folder + "data/basic_data/wiki_redirects.txt") as fin: redirections_errors = 0 for line in fin: # line = line[:-1] line = line.rstrip() try: old_title, new_title = line.split("\t") redirections[old_title] = new_title except ValueError: redirections_errors += 1 print("load redirections. wall time:", (time.time() - wall_start)/60, " minutes") print("redirections_errors: ", redirections_errors) wall_start = time.time() disambiguations_ids = set() disambiguations_titles = set() disambiguations_errors = 0 with open(config.base_folder + "data/basic_data/wiki_disambiguation_pages.txt") as fin: for line in fin: line = line.rstrip() try: article_id, title = line.split("\t") disambiguations_ids.add(int(article_id)) disambiguations_titles.add(title) except ValueError: disambiguations_errors += 1 print("load disambiguations. wall time:", (time.time() - wall_start)/60, " minutes") print("disambiguations_errors: ", disambiguations_errors) wall_start = time.time() wiki_name_id_map = dict() wiki_name_id_map_lower = dict() # i lowercase the names wiki_id_name_map = dict() wiki_name_id_map_errors = 0 with open(config.base_folder + "data/basic_data/wiki_name_id_map.txt") as fin: for line in fin: line = line.rstrip() try: wiki_title, wiki_id = line.split("\t") wiki_name_id_map[wiki_title] = int(wiki_id) wiki_name_id_map_lower[wiki_title.lower()] = int(wiki_id) wiki_id_name_map[int(wiki_id)] = wiki_title except ValueError: wiki_name_id_map_errors += 1 print("load wiki_name_id_map. wall time:", (time.time() - wall_start)/60, " minutes") print("wiki_name_id_map_errors: ", wiki_name_id_map_errors) wall_start = time.time() p_e_m = dict() # for each mention we have a list of tuples (ent_id, score) p_e_m_errors = 0 line_cnt = 0 with open(config.base_folder + "data/p_e_m/prob_yago_crosswikis_wikipedia_p_e_m.txt") as fin: for line in fin: line = line.rstrip() try: temp = line.split("\t") mention, entities = temp[0], temp[2:2+config.cand_ent_num] res = [] for e in entities: ent_id, score, _ = e.split(',', 2) #print(ent_id, score) res.append((int(ent_id), float(score))) p_e_m[mention] = res # for each mention we have a list of tuples (ent_id, score) #print(repr(line)) #print(mention, p_e_m[mention]) #except ValueError: except Exception as esd: exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] print(exc_type, fname, exc_tb.tb_lineno) p_e_m_errors += 1 print("error in line: ", repr(line)) #line_cnt += 1 #if line_cnt > 100: # break print("end of p_e_m reading. wall time:", (time.time() - wall_start)/60, " minutes") print("p_e_m_errors: ", p_e_m_errors) with open(config.base_folder+"data/serializations/p_e_m_disamb_redirect_wikinameid_maps.pickle", 'wb') as handle: pickle.dump((p_e_m, config.cand_ent_num, disambiguations_ids, disambiguations_titles, redirections, \ wiki_name_id_map, wiki_id_name_map, wiki_name_id_map_lower), handle) return p_e_m, disambiguations_ids, redirections, wiki_name_id_map
num = 1 while num > 0: num = int( input() ) print(num) ######################### a = ['I', 3, 0.1, 'choongam'] for i in a: print(i) ######################### for i in range(-6, 5): print(i)
VERSION = "2.0.0" CONTRIBUTORS = [ { "name": "Kyuunex", "url": "https://github.com/Kyuunex", "role": "BDFL" }, { "name": "-Keitaro", "url": "https://github.com/rorre", "role": "some technical help" }, { "name": "eenpersoon64", "url": "https://github.com/eenpersoon64", "role": "few lines of code" } ]
class Cache: def __init__(self): self.data = [] def has_data(self, inp): if not self.data: [] else: for x in self.data: if x[0] == inp: return x[1] return [] def computation_val(self, inp, output): new_cache = [inp, output] if not self.data: self.data = [new_cache] else: self.data.append(new_cache)
class VaultInitError(Exception): pass class NotEnoughtKeysError(VaultInitError): def __init__(self, mandatory_count, used_count): self.mandatory = mandatory_count self.used = used_count def __str__(self): return f'NotEnoughKeys excepted {self.mandatory}, used {self.used}' class BadKeysProvided(VaultInitError): def __str__(self): return 'Provided keys cannot unseal vault server' class BadInitParameterValue(VaultInitError): def __init__(self, message): self.message = message def __str__(self): return f'Unable to init vault server - reason given ${self.message}'
print('Bem vindo ao 53') print('Crie um programa que leia uma frase qualquer e diga se ela é um palindromo') # Palavra que é lida tanto na frente quanto atrás e dá igual frase = str(input('Informe uma frase')).strip().upper() palavras = frase.split() # Aqui ela divide todas as palavras juntas = ''.join(palavras) inverso = '' for letra in range(len(juntas)-1,-1,-1): inverso = inverso + juntas[letra] print(juntas, inverso) if inverso == juntas: print('Temos um palindromo') else: print('Não é palindromo')
#!/usr/bin/env python """ version of prettypublictest ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use this for the version of the package. """ __version__ = "0.0.1"
#!/usr/bin/python3 """ 2.1 Shapes Build a class hierarchy for a primitive graphic editor figures data model. Two basic entities of a graphic editor are a Color and a Coordinates which are building blocks for all other entities. Coordinates can be defined in several ways (Linear, Cyllindric, Spheric) through static methods. A conversion logic between them is out of scope for this task, for simplicity just store a coordinates type in a field. There are several basic shapes: a Point, a Line, a Circle, a Rectangle, and a Triangle - each defined by a different combination of Color and Coordinates. A line can have a Pattern consisting of a list of (Color, length) tuples; more complex shapes can be filled with a Color or not (be transparent) and each their border can still have a Pattern. Within a course of this task no other methods than are necessary to create objects are required. """ class Color(object): pass available_types = ["Linear", "Cyllindric", "Spheric"] class Coordinate(object): type = "Linear" @staticmethod def set_coordinate(input_type): if input_type in available_types: Coordinate.type = input_type class Point(object): def __init__(self, color, center): self.color = color self.center = center class Line(object): def __init__(self, color, start, end): self.color = color self.start = start self.end = end class Circle(Point): def __init__(self, color, center, radius): super().__init__(color, center) self.radius = radius class Rectangle(object): def __init__(self, top, bottom, left, right): self.top = top self.bottom = bottom self.left = left self.right = right class Triangle(object): def __init__(self, first, second, third): self.first = first self.second = second self.third = third
username = '' # production user TOKEN = "" # production bot URL = "" # production server google_credentials = 'production/production_credentials.json' # prod credentials google_oath = 'production/production_oath.json' # prod oath main_folder_key = "" # production main folder id # checked ss_keys_file = 'production/production_ss_keys.json' # test ss_keys file
__version__ = "2.1.6"
class DimensionError(Exception): pass class MultivectorError(Exception): pass class FunctionError(Exception): pass class DiferentialFormError(Exception): pass class CasimirError(Exception): pass
def take_beer(fridge, number=1): if not isinstance(fridge, dict): raise TypeError("Invalid fridge") if "beer" not in fridge: raise ValueError("No more beer:(") if number > fridge["beer"]: raise ValueError("Not enough beer:(") fridge["beer"] -= number if __name__ == "__main__": fridge1 = {} fridge2 = "fridge_as_string" for fridge in (fridge1, fridge2): try: print("I wanna drink 1 bottle of beer...") take_beer(fridge) print("Oooh, great!") except TypeError as e: print("TypeError {} occured".format(e)) except ValueError as e: print("ValueError {} occured".format(e))
default_prefix = "COCOS" known_chains = { "COCOS": { "chain_id": "7d89b84f22af0b150780a2b121aa6c715b19261c8b7fe0fda3a564574ed7d3e9", "core_symbol": "COCOS", "prefix": "COCOS"}, # "COCOS": { # "chain_id": "9fc429a48b47447afa5e6618fde46d1a5f7b2266f00ce60866f9fdd92236e137", # "core_symbol": "COCOS", # "prefix": "COCOS"}, # "COCOS": { # "chain_id": "53b98adf376459cc29e5672075ed0c0b1672ea7dce42b0b1fe5e021c02bda640", # "core_symbol": "COCOS", # "prefix": "COCOS"}, }
class uart_interface(): # def __init__(self, ser): # pass def serial_read(self, ser, message, file, first_read=False): pass def serial_write(self, ser, message, file=None): pass
# パスカルの三角形 N, K = map(int, input().split()) m = 1000000007 n = max(K, N - K + 1) c = [[0] * (n + 1) for _ in range(n + 1)] c[0][0] = 1 for i in range(1, n + 1): c[i][0] = 1 for j in range(1, i + 1): c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % m result = [] for i in range(1, K + 1): result.append(c[K - 1][i - 1] * c[N - K + 1][i] % m) print(*result, sep='\n')
# David Markham 2019-02-17 # Solution to problem number 1 # Write a program that asks the user to input any positive integer # And outputs the sum of all numbers between one and that number. # Asks the user to input a positive integer number i = int(input("Please enter a positive integer")) # This will prevent the user from entering anything other than a positive integer. if i <= 0: print("Unfortunately this is not a positive integer") total = 0 while i > 0: total = total + i i = i - 1 # While 'i' is greater than 0 add the total and the current value of "i" and overwrite the current total. # This is called a compound statement using a while loop. # i = i -1: If the user inputs the positive integer of 10, the program subtracts one from the current value and so on, down to 0. # Prints the answer. print(total)
""" 复习 跨类调用 行为不同用类区分 数据不同用对象区分 方法1: class A: def func01(): b = B() b.func02() class B: def func02(): ... 方法2: class A: def __init__(self): self.b = B() def func01(): b.func02() class B: def func02(): ... 方法3: class A: def func01(obj): obj.func02() class B: def func02(): ... a = A() a.func01(B()) a.func01(C()) 属性 保护数据有效范围 语法: class A: def __init__(self,data): self.data = data @property def data(self): # 读取 return self.__data @data.setter def data(self,value): 写入 self.__data = value a = A(10): print(a.data) """
# -*- coding:utf-8 -*- ''' Created on 2013/07/31 @author: Jimmy Liu ''' DAY_PRICE_COLUMNS = ['date','open','high','close','low','amount','price_change','p_change','ma5','ma10','ma20','v_ma5','v_ma10','v_ma20','turnover'] TICK_COLUMNS = ['time','price','change','volume','cash','type'] TICK_PRICE_URL = 'http://market.finance.sina.com.cn/downxls.php?date=%s&symbol=%s' DAY_PRICE_URL = 'http://api.finance.ifeng.com/akdaily/?code=%s&type=last' SINA_DAY_PRICE_URL = 'http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?num=80&sort=changepercent&asc=0&node=hs_a&symbol=&_s_r_a=page&page=%s' DAY_TRADING_COLUMNS = ['code','symbol','name','changepercent','trade','open','high','low','settlement','volume','turnoverratio'] DAY_PRICE_PAGES = 38
def is_valid(isbn): digits = [ch if ch != 'X' else '10' for ch in isbn if ch != '-'] if len(digits) != 10 or '10' in digits[:9] or any(not n.isdigit() for n in digits): return False return sum(int(n) * i for n, i in zip(digits, range(10, 0, -1))) % 11 == 0
""" Fixtures automatically available when this plugin is installed. """ pytest_plugins = ['vws_test_fixtures.images']
""" Write a function - long_common_prefix to find and return the longest common prefix in a list of strings. If no common prefix is found, return an empty string. Example: input_list => [firecode, fireacb, fireac] commonPrefix(input_list) ==> "fir" """ def longestCommonPrefix(self, input_list): if not input_list: return "" longest_prefix = input_list[0] for i in range(1, len(input_list)): # update the longest_prefix word = input_list[i] j = 0 for j in range(min(len(word), len(longest_prefix))): if word[j] == longest_prefix[j]: j += 1 else: break longest_prefix = longest_prefix[:j] return longest_prefix
STOPWORDS = ['I', 'A', 'ABOVE', 'AFTER', 'AGAINST', 'ALL', 'ALONE', 'ALWAYS', 'AM', 'AMOUNT', 'AN', 'AND', 'ANY', 'ARE', 'AROUND', 'AS', 'AT', 'BACK', 'BE', 'BEFORE', 'BEHIND', 'BELOW', 'BETWEEN', 'BILL', 'BOTH', 'BOTTOM', 'BY', 'CALL', 'CAN', 'CO', 'CON', 'DE', 'DETAIL', 'DO', 'DONE', 'DOWN', 'DUE', 'DURING', 'EACH', 'EG', 'EIGHT', 'ELEVEN', 'EMPTY', 'EVER', 'EVERY', 'FEW', 'FILL', 'FIND', 'FIRE', 'FIRST', 'FIVE', 'FOR', 'FORMER', 'FOUR', 'FROM', 'FRONT', 'FULL', 'FURTHER', 'GET', 'GIVE', 'GO', 'HAD', 'HAS', 'HASNT', 'HE', 'HER', 'HERS', 'HIM', 'HIS', 'I', 'IE', 'IF', 'IN', 'INTO', 'IS', 'IT', 'LAST', 'LESS', 'LTD', 'MANY', 'MAY', 'ME', 'MILL', 'MINE', 'MORE', 'MOST', 'MOSTLY', 'MUST', 'MY', 'NAME', 'NEXT', 'NINE', 'NO', 'NONE', 'NOR', 'NOT', 'NOTHING', 'NOW', 'OF', 'OFF', 'OFTEN', 'ON', 'ONCE', 'ONE', 'ONLY', 'OR', 'OTHER', 'OTHERS', 'OUT', 'OVER', 'PART', 'PER', 'PUT', 'RE', 'SAME', 'SEE', 'SERIOUS', 'SEVERAL', 'SHE', 'SHOW', 'SIDE', 'SINCE', 'SIX', 'SO', 'SOME', 'SOMETIMES', 'STILL', 'TAKE', 'TEN', 'THE', 'THEN', 'THIRD', 'THIS', 'THICK', 'THIN', 'THREE', 'THROUGH', 'TO', 'TOGETHER', 'TOP', 'TOWARD', 'TOWARDS', 'TWELVE', 'TWO', 'UN', 'UNDER', 'UNTIL', 'UP', 'UPON', 'US', 'VERY', 'VIA', 'WAS', 'WE', 'WELL', 'WHEN', 'WHILE', 'WHO', 'WHOLE', 'WILL', 'WITH', 'WITHIN', 'WITHOUT', 'YOU', 'YOURSELF', 'YOURSELVE\'S']
def numberToRoman(self, number): digits = [ 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 ] symbolRoman = [ "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I" ] romanNumber = '' i = 0 while number > 0: for _ in range(number // digits[i]): romanNumber += symbolRoman[i] number -= digits[i] i += 1 return romanNumber
#!/usr/bin/env python3 def main(): print("Todo")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- classmates = ['Michael', 'Bob', 'Tracy'] print('classmates=',classmethod) print('len(classmates) =',len(classmates)) print('classmates[0]',classmates[0]) print('classmates[1]',classmates[1]) print('classmates[-1]',classmates[-1]) classmates.pop() print('classmates=',classmates)
# @file # # Copyright 2020, Verizon Media # SPDX-License-Identifier: Apache-2.0 # Test.Summary = ''' Multiple Remap Configurations. ''' # Point of this is to test two remap configs in isolation and then both as separate remap configs. tr = Test.TxnBoxTestAndRun("Multiple remap configurations", "multi-cfg.replay.yaml", remap=[ [ "http://one.ex", [ 'multi-cfg.1.yaml'] ] , [ "http://two.ex", [ 'multi-cfg.2.yaml'] ] , [ "http://both.ex", [ 'multi-cfg.1.yaml' , 'multi-cfg.2.yaml'] ] ] ) ts = tr.Variables.TS ts.Setup.Copy("multi-cfg.1.yaml", ts.Variables.CONFIGDIR) ts.Setup.Copy("multi-cfg.2.yaml", ts.Variables.CONFIGDIR) ts.Disk.records_config.update({ 'proxy.config.log.max_secs_per_buffer': 1 , 'proxy.config.diags.debug.enabled': 1 , 'proxy.config.diags.debug.tags': 'txn_box' })
numero = int(input('Insíra um número inteiro para saber se ele é par ou ímpar: ')) if numero%2==0: print('O número {} é par!'.format(numero)) else: print('O número {} é ímpar!'.format(numero))
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'debug': { 'format': '%(asctime)s %(name)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S', }, 'simple': { 'format': '%(asctime)s %(levelname)s %(message)s', 'datefmt': '%Y-%m-%d %H:%M:%S', }, }, 'handlers': { 'console': { 'level': 'DEBUG', 'filters': [], 'class': 'logging.StreamHandler', 'formatter': 'debug', }, 'info_handler': { 'level': 'INFO', 'class': 'logging.handlers.TimedRotatingFileHandler', 'when': 'midnight', 'backupCount': 7, 'filename': '/var/log/gdp/memory/info/server_monitor_access.log', 'formatter': 'simple', }, 'exception_handler': { 'level': 'WARNING', 'class': 'logging.handlers.TimedRotatingFileHandler', 'when': 'midnight', 'backupCount': 7, 'filename': '/var/log/gdp/memory/error/server_monitor_exception.log', 'formatter': 'simple', }, }, 'loggers': { '': { 'handlers': ['console', ], 'level': 'DEBUG', 'propagate': False, }, 'tornado.general': { 'handlers': ['info_handler', 'exception_handler'], 'level': 'INFO', 'propagate': True, }, } }
# encoding: utf-8 # module Tekla.Structures.Forming calls itself Forming # from Tekla.Structures,Version=2017.0.0.0,Culture=neutral,PublicKeyToken=2f04dbe497b71114 # by generator 1.145 # no doc # no imports # no functions # classes class DeformingType(Enum): """ enum DeformingType,values: DEFORMED (1),NOT_SPECIFIED (0),UNDEFORMED (2) """ DEFORMED=None NOT_SPECIFIED=None UNDEFORMED=None value__=None class FoldingType(Enum): """ enum FoldingType,values: FOLDED (1),NOT_SPECIFIED (0),UNFOLDED (2) """ FOLDED=None NOT_SPECIFIED=None UNFOLDED=None value__=None class FormingStates(object): """ FormingStates() FormingStates(deforming: DeformingType) FormingStates(folding: FoldingType) FormingStates(wrapping: WrappingType) FormingStates(deforming: DeformingType,folding: FoldingType,wrapping: WrappingType) """ def Clone(self): """ Clone(self: FormingStates) -> object """ pass @staticmethod def __new__(self,*__args): """ __new__(cls: type) __new__(cls: type,deforming: DeformingType) __new__(cls: type,folding: FoldingType) __new__(cls: type,wrapping: WrappingType) __new__(cls: type,deforming: DeformingType,folding: FoldingType,wrapping: WrappingType) """ pass Deforming=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Deforming(self: FormingStates) -> DeformingType Set: Deforming(self: FormingStates)=value """ Folding=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Folding(self: FormingStates) -> FoldingType Set: Folding(self: FormingStates)=value """ Wrapping=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Wrapping(self: FormingStates) -> WrappingType Set: Wrapping(self: FormingStates)=value """ class WrappingType(Enum): """ enum WrappingType,values: NOT_SPECIFIED (0),UNWRAPPED (2),WRAPPED (1) """ NOT_SPECIFIED=None UNWRAPPED=None value__=None WRAPPED=None
""" Given string str, transform it according to the following rules: Delete all the vowels from the string. Insert # in front of all the consonants. Change the case of all the letters of the string. Input: str = aBAcAba Output: #b#C#B Explanation: Vowels at position 0,2,4,6 are deleted. '#' is added before consonants at position 1,3,5 and their case is changed. """ def problem(Str): for i in Str: if ( i == "a" or i == "e" or i == "i" or i == "o" or i == "u" or i == "A" or i == "E" or i == "I" or i == "O" or i == "U" ): Str = Str.replace(i, "") hashtrick = "#" for j in Str: hashtrick = hashtrick + j + "#" final_string = hashtrick[0:-1].swapcase() if len(final_string) == 0: return "Empty String" return final_string Str = input("Enter the string: ") print(problem(Str))
class DataPreprocessor: types = ['fr_en', 'ja_en', 'zh_en'] sourceKG = { 'before': ['attrs_1', 'ent_ids_1'], 'after': ['att_triple_1', 'att2id_1', 'att_val2id_1'] } targetKG = { 'before': ['attrs_2', 'ent_ids_2'], 'after': ['att_triple_2', 'att2id_2', 'att_val2id_2'] } after_all = ['att_triple_all', 'att2id_all', 'att_value2id_all'] ent2id = {} att2id = {} att_val2id = {} att_triple2id = [] att_id = 0 # default if not exist att_val_id = 0 # default if not exist def getFile(self, types, filename): return './' + types + '/' + filename def reset(self): self.ent2id = {} self.att2id = {} self.att_val2id = {} self.att_triple2id = [] def process(self): self.transform() self.merge_all() return self def transform(self): KGS = [self.sourceKG, self.targetKG] for t in self.types: for kg in KGS: before = kg['before'] self.read(self.getFile(t, before[0]), self.getFile(t, before[1])) # './data/ja_en/atts_2', './data/ja_en/ent_ids_2' after = kg['after'] self.save_att_triple(self.getFile(t, after[0])) self.save_att2id(self.getFile(t, after[1])) self.save_att_val2id(self.getFile(t, after[2])) self.reset() self.att_id = 0 # default if not exist self.att_val_id = 0 def read(self, triple_datapath='./data/ja_en/atts_2', ent2id_datapath='./data/ja_en/ent_ids_2'): # 实体、属性值、属性 with open(ent2id_datapath, 'r') as r: ent2ids = r.readlines() print(ent2id_datapath, "\t", len(ent2ids)) for i in ent2ids: ent_id, ent = i.strip().split('\t', 1) self.ent2id[ent] = ent_id with open(triple_datapath, 'r') as r: lines = r.readlines() print(triple_datapath, "\t", len(lines)) for line in lines: line = line.strip() line = line.replace('<', '') line = line.replace('>', '') ent, att, att_val = line.split(' ', 2) # 实体 属性名 属性值 if att not in self.att2id.keys(): self.att2id[att] = self.att_id self.att_id += 1 if att_val not in self.att_val2id.keys(): self.att_val2id[att_val] = self.att_val_id self.att_val_id += 1 single_triple_id = [] single_triple_id.append(str(self.ent2id[ent])) single_triple_id.append(str(self.att_val2id[att_val])) single_triple_id.append(str(self.att2id[att])) d = '\t'.join(single_triple_id) self.att_triple2id.append(d) def save_att_triple(self, filepath='./data/ja_en/att_triple_2'): print(filepath, "\t", len(self.att_triple2id)) with open(filepath, 'w') as w: for i in self.att_triple2id: w.write(i+'\n') def save_att2id(self, filepath='./data/ja_en/att2id_2'): print(filepath, "\t", len(self.att2id)) with open(filepath, 'w') as w: for i in self.att2id: w.write(str(self.att2id[i])+'\t'+i+'\n') def save_att_val2id(self, filepath='./data/ja_en/att_val2id_2'): print(filepath, "\t", len(self.att_val2id)) with open(filepath, 'w') as w: for i in self.att_val2id: w.write(str(self.att_val2id[i])+'\t'+i+'\n') def merge_all(self): source_after = self.sourceKG['after'] target_after = self.targetKG['after'] for t in self.types: for i in range(3): a = self.getFile(t, source_after[i]) b = self.getFile(t, target_after[i]) c = self.getFile(t, self.after_all[i]) self.merge(a, b, c) a = self.getFile(t, 'ent_ids_1') b = self.getFile(t, 'ent_ids_2') c = self.getFile(t, 'ent_ids_all') self.merge(a, b, c) def merge(self, a, b, c): # a+b -> c # ent_ids_1 + ent_ids_2 -> ent_ids_all with open(c, 'w') as f_all: with open(a, 'r') as f_1: f_all.writelines(f_1.readlines()) with open(b, 'r') as f_2: f_all.writelines(f_2.readlines()) def report(self): print(self.types) source_after = self.sourceKG['after'] target_after = self.targetKG['after'] for t in self.types: for i in range(3): a = self.getFile(t, source_after[i]) b = self.getFile(t, target_after[i]) c = self.getFile(t, self.after_all[i]) self.report_lines(a) self.report_lines(b) self.report_lines(c) a = self.getFile(t, 'ent_ids_1') b = self.getFile(t, 'ent_ids_2') c = self.getFile(t, 'ent_ids_all') self.report_lines(a) self.report_lines(b) self.report_lines(c) def report_lines(self, path): with open(path, "r") as f: print(path, "\t\t", len(f.readlines())) DataPreprocessor().process() # open atts_2 ent_ids_2 # write att_triple_2 att2id_2 att_val2id_2
# Task 09. Factorial Division def factorial(n): if n > 1: return n * factorial(n-1) return 1 first_num = int(input()) second_num = int(input()) result = factorial(first_num) / factorial(second_num) print(f"{result:.2f}")
def repl(re,ye,word): for y in range(len(c)): if c[y]==word: n=input('yes or no') if n=="yes": c[y]=re else: pass k=' '.join(c) print(k) y=open(a,"w") y.write(k) y.close() def rep(re,ye,word): for y in range(len(c)): if c[y]==word: c[y]=re k=' '.join(c) print(k) y=open(a,"w") y.write(k) y.close() def word(): print(b) word=input('word to be searched') if word in c: d=c.count(word) print(d,word) re=input('replaceable word') ye=input('replace or 1.replace all') if ye=='1' or ye=='replace all': rep(re,ye,word) elif ye=='2' or ye=='replace': repl(re,ye,word) global a global b global c a=input('file name without format') b=open(a,"r").read() c=b.split(' ') word()
# # PySNMP MIB module RADLAN-DIGITALKEYMANAGE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-DIGITALKEYMANAGE-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:46:21 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint") rnd, = mibBuilder.importSymbols("RADLAN-MIB", "rnd") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Counter32, iso, TimeTicks, NotificationType, ModuleIdentity, Bits, ObjectIdentity, MibIdentifier, Unsigned32, Counter64, Gauge32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "iso", "TimeTicks", "NotificationType", "ModuleIdentity", "Bits", "ObjectIdentity", "MibIdentifier", "Unsigned32", "Counter64", "Gauge32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32") TruthValue, TextualConvention, RowStatus, DisplayString, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TextualConvention", "RowStatus", "DisplayString", "DateAndTime") rlDigitalKeyManage = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 86)) rlDigitalKeyManage.setRevisions(('2007-01-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlDigitalKeyManage.setRevisionsDescriptions(('Initial revision.',)) if mibBuilder.loadTexts: rlDigitalKeyManage.setLastUpdated('200701020000Z') if mibBuilder.loadTexts: rlDigitalKeyManage.setOrganization('Radlan - a MARVELL company. Marvell Semiconductor, Inc.') if mibBuilder.loadTexts: rlDigitalKeyManage.setContactInfo('www.marvell.com') if mibBuilder.loadTexts: rlDigitalKeyManage.setDescription('This private MIB module defines digital key manage private MIBs.') rlMD5KeyChainTable = MibTable((1, 3, 6, 1, 4, 1, 89, 86, 1), ) if mibBuilder.loadTexts: rlMD5KeyChainTable.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainTable.setDescription('Key-chains and keys') rlMD5KeyChainEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 86, 1, 1), ).setIndexNames((0, "RADLAN-DIGITALKEYMANAGE-MIB", "rlMD5KeyChainName"), (0, "RADLAN-DIGITALKEYMANAGE-MIB", "rlMD5KeyChainKeyId")) if mibBuilder.loadTexts: rlMD5KeyChainEntry.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainEntry.setDescription('Key-chain with key ID that belongs to this chain') rlMD5KeyChainName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlMD5KeyChainName.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainName.setDescription('Name of the key-chain to which belongs the secret authentication key') rlMD5KeyChainKeyId = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlMD5KeyChainKeyId.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyId.setDescription('A 8-bit identifier for the secret authentication key. This identifier unique only for specific key chain') rlMD5KeyChainKey = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlMD5KeyChainKey.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKey.setDescription('The 128-bit secret authentication key') rlMD5KeyChainKeyStartAccept = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 4), DateAndTime().clone(hexValue="00000000")).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlMD5KeyChainKeyStartAccept.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyStartAccept.setDescription('The time that the router will start accepting packets that have been created with the given key') rlMD5KeyChainKeyStartGenerate = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 5), DateAndTime().clone(hexValue="00000000")).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlMD5KeyChainKeyStartGenerate.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyStartGenerate.setDescription('The time that the router will start using the key for packet generation') rlMD5KeyChainKeyStopGenerate = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 6), DateAndTime().clone(hexValue="FFFFFFFF")).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlMD5KeyChainKeyStopGenerate.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyStopGenerate.setDescription('The time that the router will stop using the key for packet generation') rlMD5KeyChainKeyStopAccept = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 7), DateAndTime().clone(hexValue="FFFFFFFF")).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlMD5KeyChainKeyStopAccept.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyStopAccept.setDescription('The time that the router will stop accepting packets that have been created with the given key') rlMD5KeyChainKeyValidForAccept = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 8), TruthValue().clone('false')).setMaxAccess("readonly") if mibBuilder.loadTexts: rlMD5KeyChainKeyValidForAccept.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyValidForAccept.setDescription("A value of 'true' indicates that given key is valid for accepting packets") rlMD5KeyChainKeyValidForGenerate = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 9), TruthValue().clone('false')).setMaxAccess("readonly") if mibBuilder.loadTexts: rlMD5KeyChainKeyValidForGenerate.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainKeyValidForGenerate.setDescription("A value of 'true' indicates that given key is valid for packet generation") rlMD5KeyChainRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 86, 1, 1, 10), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlMD5KeyChainRowStatus.setStatus('current') if mibBuilder.loadTexts: rlMD5KeyChainRowStatus.setDescription('It is used to insert, update or delete an entry') mibBuilder.exportSymbols("RADLAN-DIGITALKEYMANAGE-MIB", rlMD5KeyChainKeyStartGenerate=rlMD5KeyChainKeyStartGenerate, rlDigitalKeyManage=rlDigitalKeyManage, rlMD5KeyChainTable=rlMD5KeyChainTable, rlMD5KeyChainKey=rlMD5KeyChainKey, rlMD5KeyChainRowStatus=rlMD5KeyChainRowStatus, rlMD5KeyChainKeyValidForGenerate=rlMD5KeyChainKeyValidForGenerate, rlMD5KeyChainKeyStopAccept=rlMD5KeyChainKeyStopAccept, rlMD5KeyChainKeyStopGenerate=rlMD5KeyChainKeyStopGenerate, PYSNMP_MODULE_ID=rlDigitalKeyManage, rlMD5KeyChainName=rlMD5KeyChainName, rlMD5KeyChainKeyValidForAccept=rlMD5KeyChainKeyValidForAccept, rlMD5KeyChainKeyId=rlMD5KeyChainKeyId, rlMD5KeyChainEntry=rlMD5KeyChainEntry, rlMD5KeyChainKeyStartAccept=rlMD5KeyChainKeyStartAccept)
# Time: O(n) # Space: O(t), t is the number of nodes in trie # In English, we have a concept called root, which can be followed by # some other words to form another longer word - let's call this word successor. # For example, the root an, followed by other, which can form another word another. # # Now, given a dictionary consisting of many roots and a sentence. # You need to replace all the successor in the sentence with the root forming it. # If a successor has many roots can form it, replace it with the root with the shortest length. # # You need to output the sentence after the replacement. # # Example 1: # Input: dict = ["cat", "bat", "rat"] # sentence = "the cattle was rattled by the battery" # Output: "the cat was rat by the bat" # Note: # The input will only have lower-case letters. # 1 <= dict words number <= 1000 # 1 <= sentence words number <= 1000 # 1 <= root length <= 100 # 1 <= sentence words length <= 1000 class Solution(object): def replaceWords(self, dict, sentence): """ :type dict: List[str] :type sentence: str :rtype: str """ _trie = lambda: collections.defaultdict(_trie) trie = _trie() for s in dict: curr = trie for c in s: curr = curr[c] curr.setdefault("_end") def replace(word): curr = trie for i, c in enumerate(word): if c not in curr: break curr = curr[c] if "_end" in curr: return word[:i+1] return word return " ".join(map(replace, sentence.split()))
# # PySNMP MIB module HUAWEI-EASY-OPERATION-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-EASY-OPERATION-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:44:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") hwDatacomm, = mibBuilder.importSymbols("HUAWEI-MIB", "hwDatacomm") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") EnabledStatus, = mibBuilder.importSymbols("P-BRIDGE-MIB", "EnabledStatus") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Integer32, Unsigned32, IpAddress, Counter64, Bits, NotificationType, Counter32, Gauge32, ObjectIdentity, TimeTicks, ModuleIdentity, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Integer32", "Unsigned32", "IpAddress", "Counter64", "Bits", "NotificationType", "Counter32", "Gauge32", "ObjectIdentity", "TimeTicks", "ModuleIdentity", "MibIdentifier") MacAddress, DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "DisplayString", "RowStatus", "TextualConvention") hwEasyOperationMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311)) hwEasyOperationMIB.setRevisions(('2014-09-09 00:00', '2014-06-04 00:00', '2013-12-30 00:00', '2013-08-05 00:00', '2013-03-18 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hwEasyOperationMIB.setRevisionsDescriptions(('Revisions made by HUAWEI.', 'Revisions made by HUAWEI.', 'Revisions made by HUAWEI.', 'Revisions made by HUAWEI.', 'Revisions made by HUAWEI.',)) if mibBuilder.loadTexts: hwEasyOperationMIB.setLastUpdated('201409090000Z') if mibBuilder.loadTexts: hwEasyOperationMIB.setOrganization('Huawei Technologies Co.,Ltd.') if mibBuilder.loadTexts: hwEasyOperationMIB.setContactInfo("Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com ") if mibBuilder.loadTexts: hwEasyOperationMIB.setDescription('Huawei Easy Opearation MIB.') hwEasyOperationGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1)) hwEasyOperationCommanderEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 1), EnabledStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationCommanderEnable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationCommanderEnable.setDescription('This object specifies the Easy Operation Commander operation mode.') hwEasyOperationCommanderIpAddress = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 2), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationCommanderIpAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationCommanderIpAddress.setDescription('The IP address of commander.') hwEasyOperationCommanderIpAddressType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 3), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationCommanderIpAddressType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationCommanderIpAddressType.setDescription('The IP address type of commander.') hwEasyOperationCommanderUdpPort = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationCommanderUdpPort.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationCommanderUdpPort.setDescription('The UDP port of commander.') hwEasyOperationServerType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("tftp", 1), ("ftp", 2), ("sftp", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationServerType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationServerType.setDescription('The type of file server.') hwEasyOperationServerIpAddress = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 6), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationServerIpAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationServerIpAddress.setDescription('The IP address of file server.') hwEasyOperationServerIpAddressType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 7), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationServerIpAddressType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationServerIpAddressType.setDescription('The IP address type of file server.') hwEasyOperationServerPort = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationServerPort.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationServerPort.setDescription('The port number of file server.') hwEasyOperationAutoClearEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 9), EnabledStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationAutoClearEnable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationAutoClearEnable.setDescription('Whether client would clear the old software file when the free space is not enough.') hwEasyOperationActivateMode = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("default", 1), ("reload", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationActivateMode.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationActivateMode.setDescription('The mode of activating file.') hwEasyOperationActivateDelayTime = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 11), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationActivateDelayTime.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationActivateDelayTime.setDescription('The delay time of activating file.The unit is second(s).') hwEasyOperationActivateInTime = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 12), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationActivateInTime.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationActivateInTime.setDescription('The specific time of activating file.') hwEasyOperationBackupConfigMode = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("overwrite", 1), ("duplicate", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationBackupConfigMode.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationBackupConfigMode.setDescription('The mode of file created on the server.') hwEasyOperationBackupConfigInterval = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationBackupConfigInterval.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationBackupConfigInterval.setDescription('The interval of configuration backup .The unit is hour(s)') hwEasyOperationDefaultSysSoftware = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 15), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultSysSoftware.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultSysSoftware.setDescription('The default name of software file.') hwEasyOperationDefaultSysSoftwareVer = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 16), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultSysSoftwareVer.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultSysSoftwareVer.setDescription('The version of default software file.') hwEasyOperationDefaultConfig = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 17), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultConfig.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultConfig.setDescription('The default name of configuration file.') hwEasyOperationDefaultPatch = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 18), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultPatch.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultPatch.setDescription('The default name of patch file.') hwEasyOperationDefaultWebfile = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 19), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultWebfile.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultWebfile.setDescription('The default name of WEB file.') hwEasyOperationDefaultLicense = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 20), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultLicense.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultLicense.setDescription('The default name of license file.') hwEasyOperationDefaultCustomfile1 = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 21), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultCustomfile1.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultCustomfile1.setDescription('The default name of custom file.') hwEasyOperationDefaultCustomfile2 = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 22), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultCustomfile2.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultCustomfile2.setDescription('The default name of custom file.') hwEasyOperationDefaultCustomfile3 = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 23), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationDefaultCustomfile3.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDefaultCustomfile3.setDescription('The default name of custom file.') hwEasyOperationClientAutoJoinEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 24), EnabledStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationClientAutoJoinEnable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientAutoJoinEnable.setDescription('Whether commander can receive the information of new clients.') hwEasyOperationTopologyEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 25), EnabledStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationTopologyEnable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyEnable.setDescription('Whether commander can collect the topology information of new clients.') hwEasyOperationClientAgingTime = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 1, 26), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationClientAgingTime.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientAgingTime.setDescription('The aging time of client which is lost. The unit is hour(s).') hwEasyOperationGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2)) hwEasyOperationTotalGroupNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTotalGroupNumber.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTotalGroupNumber.setDescription('The total number of group.') hwEasyOperationBuildInGroupNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationBuildInGroupNumber.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationBuildInGroupNumber.setDescription('The number of build-in group.') hwEasyOperationCustomGroupNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationCustomGroupNumber.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationCustomGroupNumber.setDescription('The number of custom group.') hwEasyOperationGroupTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4), ) if mibBuilder.loadTexts: hwEasyOperationGroupTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupTable.setDescription('Group table.') hwEasyOperationGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupIndex")) if mibBuilder.loadTexts: hwEasyOperationGroupEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupEntry.setDescription('The entry of group table.') hwEasyOperationGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: hwEasyOperationGroupIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupIndex.setDescription('The index of group table.') hwEasyOperationGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("buildIn", 1), ("macAddress", 2), ("esn", 3), ("model", 4), ("deviceType", 5), ("ipAddress", 6)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupType.setDescription('The type of group.') hwEasyOperationGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 3), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupName.setDescription('The name of group.') hwEasyOperationGroupSysSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 4), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupSysSoftware.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupSysSoftware.setDescription('The software file name of group.') hwEasyOperationGroupSysSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 5), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupSysSoftwareVer.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupSysSoftwareVer.setDescription('The software version of group.') hwEasyOperationGroupConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 6), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupConfig.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupConfig.setDescription('The configuration file name of group.') hwEasyOperationGroupPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 7), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupPatch.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupPatch.setDescription('The patch file name of group.') hwEasyOperationGroupWebfile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 8), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupWebfile.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupWebfile.setDescription('The WEB file name of group.') hwEasyOperationGroupLicense = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 9), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupLicense.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupLicense.setDescription('The license file name of group.') hwEasyOperationGroupCustomfile1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 10), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupCustomfile1.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupCustomfile1.setDescription('The custom file name of group.') hwEasyOperationGroupCustomfile2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 11), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupCustomfile2.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupCustomfile2.setDescription('The custom file name of group.') hwEasyOperationGroupCustomfile3 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 12), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupCustomfile3.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupCustomfile3.setDescription('The custom file name of group.') hwEasyOperationGroupActivateMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("default", 1), ("reload", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupActivateMode.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupActivateMode.setDescription('The mode of activating file of group.') hwEasyOperationGroupActivateDelayTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 14), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupActivateDelayTime.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupActivateDelayTime.setDescription('The delay time of activating file of group.The unit is second(s)') hwEasyOperationGroupActivateInTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 15), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupActivateInTime.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupActivateInTime.setDescription('The specific time of activating file of group.') hwEasyOperationGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 4, 1, 50), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupRowStatus.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupRowStatus.setDescription('The RowStatus of group table.') hwEasyOperationGroupMatchTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5), ) if mibBuilder.loadTexts: hwEasyOperationGroupMatchTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchTable.setDescription('The match rule of group.') hwEasyOperationGroupMatchEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupIndex"), (0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchIndex")) if mibBuilder.loadTexts: hwEasyOperationGroupMatchEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchEntry.setDescription('The entry of match rule of group.') hwEasyOperationGroupMatchIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: hwEasyOperationGroupMatchIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchIndex.setDescription('The index of match rule table.') hwEasyOperationGroupMatchMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 2), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchMacAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchMacAddress.setDescription('The match rule of MAC address.') hwEasyOperationGroupMatchMacMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 3), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchMacMask.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchMacMask.setDescription('The match rule of mask of MAC address.') hwEasyOperationGroupMatchEsn = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 4), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchEsn.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchEsn.setDescription('The match rule of ESN.') hwEasyOperationGroupMatchModel = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 5), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchModel.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchModel.setDescription('The match rule of model of device.') hwEasyOperationGroupMatchDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 6), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchDeviceType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchDeviceType.setDescription('The match rule of type of device.') hwEasyOperationGroupMatchIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 7), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchIpAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchIpAddress.setDescription('The match rule of IP address.') hwEasyOperationGroupMatchIpAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 8), InetAddressType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchIpAddressType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchIpAddressType.setDescription('The match rule of type of IP address.') hwEasyOperationGroupMatchIpAddressMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 9), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchIpAddressMask.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchIpAddressMask.setDescription('The match rule of mask of IP address.') hwEasyOperationGroupMatchRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 2, 5, 1, 50), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationGroupMatchRowStatus.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchRowStatus.setDescription('The RowStatus of match rule table.') hwEasyOperationClient = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5)) hwEasyOperationClientNumber = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientNumber.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientNumber.setDescription('The number of client.') hwEasyOperationClientInfoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2), ) if mibBuilder.loadTexts: hwEasyOperationClientInfoTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoTable.setDescription('The client table.') hwEasyOperationClientInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientIndex")) if mibBuilder.loadTexts: hwEasyOperationClientInfoEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoEntry.setDescription('The entry of client table.') hwEasyOperationClientInfoClientIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: hwEasyOperationClientInfoClientIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientIndex.setDescription('The index of client table.') hwEasyOperationClientInfoClientMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 2), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientMacAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientMacAddress.setDescription('The MAC address of client.') hwEasyOperationClientInfoClientEsn = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 3), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientEsn.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientEsn.setDescription('The ESN of client.') hwEasyOperationClientInfoClientHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientHostName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientHostName.setDescription('The host name of client.') hwEasyOperationClientInfoClientIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 5), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientIpAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientIpAddress.setDescription('The IP address of client.') hwEasyOperationClientInfoClientIpAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 6), InetAddressType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientIpAddressType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientIpAddressType.setDescription('The IP address type of client.') hwEasyOperationClientInfoClientModel = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientModel.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientModel.setDescription('The model of client.') hwEasyOperationClientInfoClientDeviceType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDeviceType.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDeviceType.setDescription('The device type of client.') hwEasyOperationClientInfoClientSysSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysSoftware.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysSoftware.setDescription('The startup software file name of client.') hwEasyOperationClientInfoClientSysSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysSoftwareVer.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysSoftwareVer.setDescription('The startup software version of client.') hwEasyOperationClientInfoClientSysConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysConfig.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysConfig.setDescription('The startup configuration file name of client.') hwEasyOperationClientInfoClientSysPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 12), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysPatch.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysPatch.setDescription('The startup patch file name of client.') hwEasyOperationClientInfoClientSysWebFile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 13), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysWebFile.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysWebFile.setDescription('The startup WEB file name of client.') hwEasyOperationClientInfoClientSysLicense = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 14), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysLicense.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientSysLicense.setDescription('The startup license file name of client.') hwEasyOperationClientInfoClientDownloadSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 15), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadSoftware.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadSoftware.setDescription('The software file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 16), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadSoftwareVer.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadSoftwareVer.setDescription('The software version of client in downloading status.') hwEasyOperationClientInfoClientDownloadConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 17), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadConfig.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadConfig.setDescription('The configuration file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 18), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadPatch.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadPatch.setDescription('The patch file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadWebFile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 19), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadWebFile.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadWebFile.setDescription('The WEB file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadLicense = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 20), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadLicense.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadLicense.setDescription('The license file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadCustomfile1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 21), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadCustomfile1.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadCustomfile1.setDescription('The custom file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadCustomfile2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 22), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadCustomfile2.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadCustomfile2.setDescription('The custom file name of client in downloading status.') hwEasyOperationClientInfoClientDownloadCustomfile3 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 23), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadCustomfile3.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadCustomfile3.setDescription('The custom file name of client in downloading status.') hwEasyOperationClientInfoClientMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 255))).clone(namedValues=NamedValues(("running", 1), ("upgrade", 2), ("zeroTouch", 3), ("usbDownload", 4), ("unknown", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientMethod.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientMethod.setDescription('The method of upgrading.') hwEasyOperationClientInfoClientPhase = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 255))).clone(namedValues=NamedValues(("initial", 1), ("requestIp", 2), ("getDownloadInfo", 3), ("downloadFile", 4), ("activateFile", 5), ("normalRunning", 6), ("unknown", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientPhase.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientPhase.setDescription('The downloading phase of client.') hwEasyOperationClientInfoClientOperateState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 255))).clone(namedValues=NamedValues(("finished", 1), ("downloadSoftware", 2), ("downloadConfig", 3), ("downloadPatch", 4), ("downloadWebFile", 5), ("downloadLicense", 6), ("downloadCustomFile1", 7), ("downloadCustomFile2", 8), ("downloadCustomFile3", 9), ("unknown", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientOperateState.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientOperateState.setDescription('The file type in downloading.') hwEasyOperationClientInfoClientDownloadPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 27), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadPercent.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientDownloadPercent.setDescription('The percentage of file downloading.') hwEasyOperationClientInfoClientErrorReason = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 28), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientErrorReason.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientErrorReason.setDescription('The error reason in processing.') hwEasyOperationClientInfoClientErrorDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 29), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientErrorDescr.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientErrorDescr.setDescription('The error description in processing.') hwEasyOperationClientInfoClientBackupErrorReason = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 30), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientBackupErrorReason.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientBackupErrorReason.setDescription('The error reason in backup configuration.') hwEasyOperationClientInfoClientBackupErrorDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 31), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientBackupErrorDescr.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientBackupErrorDescr.setDescription('The error description in backup configuration.') hwEasyOperationClientInfoClientRunState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 255))).clone(namedValues=NamedValues(("initial", 1), ("normalRunning", 2), ("upgrading", 3), ("lost", 4), ("configuring", 5), ("unknown", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientRunState.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientRunState.setDescription('The running state of client.') hwEasyOperationClientInfoClientCpuUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 33), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientCpuUsage.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientCpuUsage.setDescription('The cpu usage of client.') hwEasyOperationClientInfoClientMemoryUsage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 34), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientMemoryUsage.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientMemoryUsage.setDescription('The memory usage of client.') hwEasyOperationClientInfoClientRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 2, 1, 100), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientInfoClientRowStatus.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoClientRowStatus.setDescription('The RowStatus of client table.') hwEasyOperationClientReplaceTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3), ) if mibBuilder.loadTexts: hwEasyOperationClientReplaceTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceTable.setDescription('The replace client table.') hwEasyOperationClientReplaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceClientIndex")) if mibBuilder.loadTexts: hwEasyOperationClientReplaceEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceEntry.setDescription('The entry of replace client table.') hwEasyOperationClientReplaceClientIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4096))) if mibBuilder.loadTexts: hwEasyOperationClientReplaceClientIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceClientIndex.setDescription('The index of replace client table.') hwEasyOperationClientReplaceNewMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 2), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceNewMacAddress.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceNewMacAddress.setDescription('The MAC address of new device.') hwEasyOperationClientReplaceNewEsn = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 3), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceNewEsn.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceNewEsn.setDescription('The ESN of new device.') hwEasyOperationClientReplaceDownloadSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 4), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadSoftware.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadSoftware.setDescription('The software file name needs to be downloaded.') hwEasyOperationClientReplaceDownloadSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 5), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadSoftwareVer.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadSoftwareVer.setDescription('The software version needs to be downloaded.') hwEasyOperationClientReplaceDownloadPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 6), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadPatch.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadPatch.setDescription('The patch file name needs to be downloaded.') hwEasyOperationClientReplaceDownloadWebFile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 7), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadWebFile.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadWebFile.setDescription('The WEB file name needs to be downloaded.') hwEasyOperationClientReplaceDownloadLicense = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 8), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadLicense.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadLicense.setDescription('The license file name needs to be downloaded.') hwEasyOperationClientReplaceDownloadCustomfile1 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 9), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadCustomfile1.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadCustomfile1.setDescription('The custom file name needs to be downloaded.') hwEasyOperationClientReplaceDownloadCustomfile2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 10), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadCustomfile2.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadCustomfile2.setDescription('The custom file name needs to be downloaded.') hwEasyOperationClientReplaceDownloadCustomfile3 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 11), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadCustomfile3.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceDownloadCustomfile3.setDescription('The custom file name needs to be downloaded.') hwEasyOperationClientReplaceRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 5, 3, 1, 50), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwEasyOperationClientReplaceRowStatus.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceRowStatus.setDescription('The RowStatus of table.') hwEasyOperationNotification = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 6)) hwEasyOperationTrapVar = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 6, 1)) hwEasyOperationTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 6, 2)) hwEasyOperationClientAdded = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 6, 2, 1)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientHostName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientMacAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientEsn")) if mibBuilder.loadTexts: hwEasyOperationClientAdded.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientAdded.setDescription('The notification of client added.') hwEasyOperationClientLost = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 6, 2, 2)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientHostName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientMacAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientEsn")) if mibBuilder.loadTexts: hwEasyOperationClientLost.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientLost.setDescription('The notification of client lost.') hwEasyOperationClientJoinNotPermit = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 6, 2, 3)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientHostName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientMacAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientEsn")) if mibBuilder.loadTexts: hwEasyOperationClientJoinNotPermit.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientJoinNotPermit.setDescription('The notification of not permit client to join.') hwEasyOperationMonitor = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7)) hwEasyOperationPowerInfo = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1)) hwEasyOperationDevicePowerInfoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1), ) if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoTable.setDescription('The device power information table.') hwEasyOperationDevicePowerInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDevicePowerInfoIndex")) if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoEntry.setDescription('The entry of device power infomation table.') hwEasyOperationDevicePowerInfoIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1, 1, 1), Integer32()) if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoIndex.setDescription('The index of device power table.') hwEasyOperationDevicePowerInfoCurrentPower = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoCurrentPower.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoCurrentPower.setDescription('The current power of device.') hwEasyOperationDevicePowerInfoGauge = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("actual", 1), ("rated", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoGauge.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoGauge.setDescription('The gauge of device power.') hwEasyOperationDevicePowerInfoRatedPower = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoRatedPower.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoRatedPower.setDescription('The rated power of device.') hwEasyOperationDevicePowerInfoPowerManageMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("userDefined", 1), ("standard", 2), ("basic", 3), ("deep", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoPowerManageMode.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoPowerManageMode.setDescription('The power manage mode of device.') hwEasyOperationPortPowerInfoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2), ) if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoTable.setDescription('The port power information table.') hwEasyOperationPortPowerInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationPortPowerInfoDeviceIndex"), (0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationPortPowerInfoPortIndex")) if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoEntry.setDescription('The entry of port power table.') hwEasyOperationPortPowerInfoDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2, 1, 1), Integer32()) if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoDeviceIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoDeviceIndex.setDescription('The index of device.') hwEasyOperationPortPowerInfoPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2, 1, 2), Integer32()) if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoPortIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoPortIndex.setDescription('The index of port.') hwEasyOperationPortPowerInfoPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2, 1, 3), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoPortName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoPortName.setDescription('The port name.') hwEasyOperationPortPowerInfoCurrentPower = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoCurrentPower.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoCurrentPower.setDescription('The current power of port.') hwEasyOperationPortPowerInfoGauge = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("actual", 1), ("presumed", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoGauge.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoGauge.setDescription('The gauge of port power.') hwEasyOperationNetPowerHistoryInfoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 3), ) if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoTable.setDescription('The net power history information table.') hwEasyOperationNetPowerHistoryInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 3, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationNetPowerHistoryInfoIndex")) if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoEntry.setDescription('The entry of net power history table.') hwEasyOperationNetPowerHistoryInfoIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 3, 1, 1), Integer32()) if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoIndex.setDescription('The index of the table.') hwEasyOperationNetPowerHistoryInfoWholePower = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 1, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoWholePower.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoWholePower.setDescription('The total power of the whole network.') hwEasyOperationTopologyTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3), ) if mibBuilder.loadTexts: hwEasyOperationTopologyTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyTable.setDescription('The topology table.') hwEasyOperationTopologyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyHopIndex"), (0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyDeviceIndex")) if mibBuilder.loadTexts: hwEasyOperationTopologyEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyEntry.setDescription('The entry of topology table.') hwEasyOperationTopologyHopIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 1), Integer32()) if mibBuilder.loadTexts: hwEasyOperationTopologyHopIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyHopIndex.setDescription('The topoloy hop.') hwEasyOperationTopologyDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 2), Integer32()) if mibBuilder.loadTexts: hwEasyOperationTopologyDeviceIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyDeviceIndex.setDescription('The index of topology device.') hwEasyOperationTopologyLocalMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTopologyLocalMac.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyLocalMac.setDescription('The mac address of local topology node.') hwEasyOperationTopologyFatherMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 4), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTopologyFatherMac.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyFatherMac.setDescription('The mac address of father topology node.') hwEasyOperationTopologyLocalPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 5), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTopologyLocalPortName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyLocalPortName.setDescription('The port name of local topology node.') hwEasyOperationTopologyFatherPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 6), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTopologyFatherPortName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyFatherPortName.setDescription('The port name of father topology node.') hwEasyOperationTopologyLocalDeviceId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTopologyLocalDeviceId.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyLocalDeviceId.setDescription('The device id of local topology node.') hwEasyOperationTopologyFatherDeviceId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 3, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationTopologyFatherDeviceId.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyFatherDeviceId.setDescription('The device id of father topology node.') hwEasyOperationSavedTopologyTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4), ) if mibBuilder.loadTexts: hwEasyOperationSavedTopologyTable.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyTable.setDescription('The saved topology table.') hwEasyOperationSavedTopologyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1), ).setIndexNames((0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyHopIndex"), (0, "HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyDeviceIndex")) if mibBuilder.loadTexts: hwEasyOperationSavedTopologyEntry.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyEntry.setDescription('The entry of saved topology table.') hwEasyOperationSavedTopologyHopIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1, 1), Integer32()) if mibBuilder.loadTexts: hwEasyOperationSavedTopologyHopIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyHopIndex.setDescription('The index of saved topology hop.') hwEasyOperationSavedTopologyDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1, 2), Integer32()) if mibBuilder.loadTexts: hwEasyOperationSavedTopologyDeviceIndex.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyDeviceIndex.setDescription('The index of saved topology device.') hwEasyOperationSavedTopologyLocalMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationSavedTopologyLocalMac.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyLocalMac.setDescription('The mac address of saved local topology node.') hwEasyOperationSavedTopologyFatherMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1, 4), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationSavedTopologyFatherMac.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyFatherMac.setDescription('The mac address of saved father topology node.') hwEasyOperationSavedTopologyLocalPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1, 5), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationSavedTopologyLocalPortName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyLocalPortName.setDescription('The port name of saved local topology node.') hwEasyOperationSavedTopologyFatherPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 7, 4, 1, 6), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwEasyOperationSavedTopologyFatherPortName.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyFatherPortName.setDescription('The port name of saved father topology node.') hwEasyOperationCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGlobalObjectsGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupObjectsGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupTableGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchTableGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientObjectsGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationPortPowerInfoGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDevicePowerInfoGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationNotificationGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyGroup"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationNetPowerHistoryInfoGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationCompliance = hwEasyOperationCompliance.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationCompliance.setDescription('The compliance.') hwEasyOperationGlobalObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 1)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationCommanderIpAddressType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationBackupConfigMode"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationActivateInTime"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationActivateDelayTime"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationActivateMode"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationAutoClearEnable"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationServerIpAddressType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationServerIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationServerType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultSysSoftwareVer"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultConfig"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultPatch"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultWebfile"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultLicense"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultCustomfile1"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultCustomfile2"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultCustomfile3"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDefaultSysSoftware"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationBackupConfigInterval"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationCommanderUdpPort"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationServerPort"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientAgingTime"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyEnable"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationCommanderIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationCommanderEnable"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientAutoJoinEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationGlobalObjectsGroup = hwEasyOperationGlobalObjectsGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGlobalObjectsGroup.setDescription('The global objects group.') hwEasyOperationGroupObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 2)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTotalGroupNumber"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationBuildInGroupNumber"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationCustomGroupNumber")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationGroupObjectsGroup = hwEasyOperationGroupObjectsGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupObjectsGroup.setDescription('The group objects group.') hwEasyOperationGroupTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 3)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupSysSoftware"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupSysSoftwareVer"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupConfig"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupPatch"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupWebfile"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupLicense"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupCustomfile1"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupCustomfile2"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupCustomfile3"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupActivateMode"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupActivateDelayTime"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupActivateInTime"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationGroupTableGroup = hwEasyOperationGroupTableGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupTableGroup.setDescription('The group table group.') hwEasyOperationGroupMatchTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 4)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchMacAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchEsn"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchModel"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchDeviceType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchRowStatus"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchMacMask"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchIpAddressType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationGroupMatchIpAddressMask")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationGroupMatchTableGroup = hwEasyOperationGroupMatchTableGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationGroupMatchTableGroup.setDescription('The match rule table objects group.') hwEasyOperationClientObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 5)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientNumber")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationClientObjectsGroup = hwEasyOperationClientObjectsGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientObjectsGroup.setDescription('The client objects group.') hwEasyOperationClientInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 6)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientMacAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientEsn"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientModel"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDeviceType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientSysSoftware"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientSysSoftwareVer"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientSysConfig"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientSysPatch"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientSysWebFile"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientSysLicense"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadSoftware"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadSoftwareVer"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadConfig"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadPatch"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadWebFile"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadLicense"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadCustomfile1"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadCustomfile2"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadCustomfile3"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientErrorDescr"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientIpAddress"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientRowStatus"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientHostName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientBackupErrorDescr"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientBackupErrorReason"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientErrorReason"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientDownloadPercent"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientIpAddressType"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientMethod"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientPhase"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientOperateState"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientRunState"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientCpuUsage"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientInfoClientMemoryUsage")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationClientInfoGroup = hwEasyOperationClientInfoGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientInfoGroup.setDescription('The client table group.') hwEasyOperationClientReplaceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 7)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceRowStatus"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadCustomfile3"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadCustomfile2"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadCustomfile1"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadLicense"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadWebFile"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadPatch"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadSoftwareVer"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceDownloadSoftware"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceNewEsn"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientReplaceNewMacAddress")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationClientReplaceGroup = hwEasyOperationClientReplaceGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationClientReplaceGroup.setDescription('The replace client table group.') hwEasyOperationNotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 8)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientAdded"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationClientLost")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationNotificationGroup = hwEasyOperationNotificationGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationNotificationGroup.setDescription('The notification objects group.') hwEasyOperationDevicePowerInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 9)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDevicePowerInfoCurrentPower"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDevicePowerInfoGauge"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDevicePowerInfoRatedPower"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationDevicePowerInfoPowerManageMode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationDevicePowerInfoGroup = hwEasyOperationDevicePowerInfoGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationDevicePowerInfoGroup.setDescription('The device power information table group.') hwEasyOperationPortPowerInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 10)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationPortPowerInfoPortName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationPortPowerInfoCurrentPower"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationPortPowerInfoGauge")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationPortPowerInfoGroup = hwEasyOperationPortPowerInfoGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationPortPowerInfoGroup.setDescription('The port power information table group.') hwEasyOperationTopologyGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 11)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyLocalMac"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyFatherMac"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyLocalPortName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyFatherPortName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyLocalDeviceId"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationTopologyFatherDeviceId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationTopologyGroup = hwEasyOperationTopologyGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationTopologyGroup.setDescription('The topology table group.') hwEasyOperationSavedTopologyGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 12)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyLocalMac"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyFatherMac"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyLocalPortName"), ("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationSavedTopologyFatherPortName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationSavedTopologyGroup = hwEasyOperationSavedTopologyGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationSavedTopologyGroup.setDescription('The saved topology table group.') hwEasyOperationNetPowerHistoryInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 311, 100, 13)).setObjects(("HUAWEI-EASY-OPERATION-MIB", "hwEasyOperationNetPowerHistoryInfoWholePower")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwEasyOperationNetPowerHistoryInfoGroup = hwEasyOperationNetPowerHistoryInfoGroup.setStatus('current') if mibBuilder.loadTexts: hwEasyOperationNetPowerHistoryInfoGroup.setDescription('The power history of whole network table group.') mibBuilder.exportSymbols("HUAWEI-EASY-OPERATION-MIB", hwEasyOperationClientInfoClientDeviceType=hwEasyOperationClientInfoClientDeviceType, hwEasyOperationGroupCustomfile1=hwEasyOperationGroupCustomfile1, hwEasyOperationGroupMatchMacMask=hwEasyOperationGroupMatchMacMask, hwEasyOperationSavedTopologyFatherMac=hwEasyOperationSavedTopologyFatherMac, hwEasyOperationTopologyFatherMac=hwEasyOperationTopologyFatherMac, hwEasyOperationDevicePowerInfoGauge=hwEasyOperationDevicePowerInfoGauge, hwEasyOperationClientReplaceDownloadSoftware=hwEasyOperationClientReplaceDownloadSoftware, hwEasyOperationClientInfoGroup=hwEasyOperationClientInfoGroup, hwEasyOperationGroupMatchIpAddress=hwEasyOperationGroupMatchIpAddress, hwEasyOperationSavedTopologyFatherPortName=hwEasyOperationSavedTopologyFatherPortName, hwEasyOperationClientInfoClientSysWebFile=hwEasyOperationClientInfoClientSysWebFile, hwEasyOperationClientInfoClientDownloadSoftwareVer=hwEasyOperationClientInfoClientDownloadSoftwareVer, hwEasyOperationCommanderIpAddressType=hwEasyOperationCommanderIpAddressType, hwEasyOperationGroupMatchIpAddressType=hwEasyOperationGroupMatchIpAddressType, PYSNMP_MODULE_ID=hwEasyOperationMIB, hwEasyOperationClientInfoClientSysConfig=hwEasyOperationClientInfoClientSysConfig, hwEasyOperationClientInfoClientDownloadWebFile=hwEasyOperationClientInfoClientDownloadWebFile, hwEasyOperationClientInfoClientMethod=hwEasyOperationClientInfoClientMethod, hwEasyOperationClientInfoClientErrorDescr=hwEasyOperationClientInfoClientErrorDescr, hwEasyOperationDefaultWebfile=hwEasyOperationDefaultWebfile, hwEasyOperationGroupEntry=hwEasyOperationGroupEntry, hwEasyOperationSavedTopologyGroup=hwEasyOperationSavedTopologyGroup, hwEasyOperationGroupSysSoftwareVer=hwEasyOperationGroupSysSoftwareVer, hwEasyOperationCommanderEnable=hwEasyOperationCommanderEnable, hwEasyOperationGroupObjectsGroup=hwEasyOperationGroupObjectsGroup, hwEasyOperationDefaultConfig=hwEasyOperationDefaultConfig, hwEasyOperationClientReplaceDownloadLicense=hwEasyOperationClientReplaceDownloadLicense, hwEasyOperationTrapVar=hwEasyOperationTrapVar, hwEasyOperationClientInfoClientDownloadConfig=hwEasyOperationClientInfoClientDownloadConfig, hwEasyOperationClientObjectsGroup=hwEasyOperationClientObjectsGroup, hwEasyOperationNetPowerHistoryInfoGroup=hwEasyOperationNetPowerHistoryInfoGroup, hwEasyOperationSavedTopologyLocalMac=hwEasyOperationSavedTopologyLocalMac, hwEasyOperationDevicePowerInfoEntry=hwEasyOperationDevicePowerInfoEntry, hwEasyOperationClientReplaceGroup=hwEasyOperationClientReplaceGroup, hwEasyOperationClientInfoClientSysSoftwareVer=hwEasyOperationClientInfoClientSysSoftwareVer, hwEasyOperationClientReplaceDownloadSoftwareVer=hwEasyOperationClientReplaceDownloadSoftwareVer, hwEasyOperationSavedTopologyLocalPortName=hwEasyOperationSavedTopologyLocalPortName, hwEasyOperationGroup=hwEasyOperationGroup, hwEasyOperationClient=hwEasyOperationClient, hwEasyOperationNetPowerHistoryInfoTable=hwEasyOperationNetPowerHistoryInfoTable, hwEasyOperationDevicePowerInfoRatedPower=hwEasyOperationDevicePowerInfoRatedPower, hwEasyOperationClientInfoClientDownloadCustomfile2=hwEasyOperationClientInfoClientDownloadCustomfile2, hwEasyOperationClientInfoClientDownloadLicense=hwEasyOperationClientInfoClientDownloadLicense, hwEasyOperationGroupType=hwEasyOperationGroupType, hwEasyOperationGroupMatchTableGroup=hwEasyOperationGroupMatchTableGroup, hwEasyOperationGroupIndex=hwEasyOperationGroupIndex, hwEasyOperationAutoClearEnable=hwEasyOperationAutoClearEnable, hwEasyOperationActivateMode=hwEasyOperationActivateMode, hwEasyOperationSavedTopologyHopIndex=hwEasyOperationSavedTopologyHopIndex, hwEasyOperationClientInfoClientSysPatch=hwEasyOperationClientInfoClientSysPatch, hwEasyOperationDefaultCustomfile3=hwEasyOperationDefaultCustomfile3, hwEasyOperationGlobalObjectsGroup=hwEasyOperationGlobalObjectsGroup, hwEasyOperationPortPowerInfoCurrentPower=hwEasyOperationPortPowerInfoCurrentPower, hwEasyOperationGroupActivateDelayTime=hwEasyOperationGroupActivateDelayTime, hwEasyOperationCompliance=hwEasyOperationCompliance, hwEasyOperationNotificationGroup=hwEasyOperationNotificationGroup, hwEasyOperationClientInfoClientCpuUsage=hwEasyOperationClientInfoClientCpuUsage, hwEasyOperationGroupTable=hwEasyOperationGroupTable, hwEasyOperationServerType=hwEasyOperationServerType, hwEasyOperationTopologyDeviceIndex=hwEasyOperationTopologyDeviceIndex, hwEasyOperationGroupMatchMacAddress=hwEasyOperationGroupMatchMacAddress, hwEasyOperationTopologyLocalDeviceId=hwEasyOperationTopologyLocalDeviceId, hwEasyOperationGroupCustomfile3=hwEasyOperationGroupCustomfile3, hwEasyOperationDefaultPatch=hwEasyOperationDefaultPatch, hwEasyOperationClientReplaceNewMacAddress=hwEasyOperationClientReplaceNewMacAddress, hwEasyOperationClientAdded=hwEasyOperationClientAdded, hwEasyOperationClientInfoClientDownloadPercent=hwEasyOperationClientInfoClientDownloadPercent, hwEasyOperationSavedTopologyEntry=hwEasyOperationSavedTopologyEntry, hwEasyOperationClientInfoClientBackupErrorDescr=hwEasyOperationClientInfoClientBackupErrorDescr, hwEasyOperationCustomGroupNumber=hwEasyOperationCustomGroupNumber, hwEasyOperationClientInfoClientMacAddress=hwEasyOperationClientInfoClientMacAddress, hwEasyOperationTopologyEnable=hwEasyOperationTopologyEnable, hwEasyOperationDevicePowerInfoTable=hwEasyOperationDevicePowerInfoTable, hwEasyOperationServerIpAddressType=hwEasyOperationServerIpAddressType, hwEasyOperationGroupRowStatus=hwEasyOperationGroupRowStatus, hwEasyOperationGroupMatchDeviceType=hwEasyOperationGroupMatchDeviceType, hwEasyOperationClientInfoClientIndex=hwEasyOperationClientInfoClientIndex, hwEasyOperationDefaultSysSoftware=hwEasyOperationDefaultSysSoftware, hwEasyOperationClientInfoClientHostName=hwEasyOperationClientInfoClientHostName, hwEasyOperationGroupLicense=hwEasyOperationGroupLicense, hwEasyOperationGlobalObjects=hwEasyOperationGlobalObjects, hwEasyOperationTopologyTable=hwEasyOperationTopologyTable, hwEasyOperationGroupActivateMode=hwEasyOperationGroupActivateMode, hwEasyOperationClientInfoClientIpAddressType=hwEasyOperationClientInfoClientIpAddressType, hwEasyOperationBackupConfigMode=hwEasyOperationBackupConfigMode, hwEasyOperationDevicePowerInfoPowerManageMode=hwEasyOperationDevicePowerInfoPowerManageMode, hwEasyOperationClientInfoClientIpAddress=hwEasyOperationClientInfoClientIpAddress, hwEasyOperationClientReplaceDownloadCustomfile3=hwEasyOperationClientReplaceDownloadCustomfile3, hwEasyOperationPortPowerInfoDeviceIndex=hwEasyOperationPortPowerInfoDeviceIndex, hwEasyOperationPortPowerInfoTable=hwEasyOperationPortPowerInfoTable, hwEasyOperationClientInfoClientPhase=hwEasyOperationClientInfoClientPhase, hwEasyOperationTopologyFatherPortName=hwEasyOperationTopologyFatherPortName, hwEasyOperationTopologyLocalPortName=hwEasyOperationTopologyLocalPortName, hwEasyOperationSavedTopologyDeviceIndex=hwEasyOperationSavedTopologyDeviceIndex, hwEasyOperationServerPort=hwEasyOperationServerPort, hwEasyOperationDevicePowerInfoCurrentPower=hwEasyOperationDevicePowerInfoCurrentPower, hwEasyOperationGroupMatchModel=hwEasyOperationGroupMatchModel, hwEasyOperationClientInfoClientRowStatus=hwEasyOperationClientInfoClientRowStatus, hwEasyOperationCommanderUdpPort=hwEasyOperationCommanderUdpPort, hwEasyOperationTotalGroupNumber=hwEasyOperationTotalGroupNumber, hwEasyOperationClientInfoClientDownloadSoftware=hwEasyOperationClientInfoClientDownloadSoftware, hwEasyOperationDevicePowerInfoIndex=hwEasyOperationDevicePowerInfoIndex, hwEasyOperationClientReplaceClientIndex=hwEasyOperationClientReplaceClientIndex, hwEasyOperationClientInfoClientDownloadPatch=hwEasyOperationClientInfoClientDownloadPatch, hwEasyOperationGroupConfig=hwEasyOperationGroupConfig, hwEasyOperationPowerInfo=hwEasyOperationPowerInfo, hwEasyOperationGroupActivateInTime=hwEasyOperationGroupActivateInTime, hwEasyOperationMonitor=hwEasyOperationMonitor, hwEasyOperationClientAutoJoinEnable=hwEasyOperationClientAutoJoinEnable, hwEasyOperationNotification=hwEasyOperationNotification, hwEasyOperationClientReplaceEntry=hwEasyOperationClientReplaceEntry, hwEasyOperationTopologyHopIndex=hwEasyOperationTopologyHopIndex, hwEasyOperationClientInfoClientEsn=hwEasyOperationClientInfoClientEsn, hwEasyOperationClientInfoClientMemoryUsage=hwEasyOperationClientInfoClientMemoryUsage, hwEasyOperationBuildInGroupNumber=hwEasyOperationBuildInGroupNumber, hwEasyOperationClientInfoEntry=hwEasyOperationClientInfoEntry, hwEasyOperationNetPowerHistoryInfoIndex=hwEasyOperationNetPowerHistoryInfoIndex, hwEasyOperationClientJoinNotPermit=hwEasyOperationClientJoinNotPermit, hwEasyOperationGroupMatchRowStatus=hwEasyOperationGroupMatchRowStatus, hwEasyOperationTrap=hwEasyOperationTrap, hwEasyOperationNetPowerHistoryInfoEntry=hwEasyOperationNetPowerHistoryInfoEntry, hwEasyOperationTopologyFatherDeviceId=hwEasyOperationTopologyFatherDeviceId, hwEasyOperationGroupPatch=hwEasyOperationGroupPatch, hwEasyOperationDefaultCustomfile1=hwEasyOperationDefaultCustomfile1, hwEasyOperationDefaultLicense=hwEasyOperationDefaultLicense, hwEasyOperationGroupCustomfile2=hwEasyOperationGroupCustomfile2, hwEasyOperationNetPowerHistoryInfoWholePower=hwEasyOperationNetPowerHistoryInfoWholePower, hwEasyOperationClientReplaceDownloadCustomfile2=hwEasyOperationClientReplaceDownloadCustomfile2, hwEasyOperationGroupMatchIndex=hwEasyOperationGroupMatchIndex, hwEasyOperationClientAgingTime=hwEasyOperationClientAgingTime, hwEasyOperationClientReplaceDownloadPatch=hwEasyOperationClientReplaceDownloadPatch, hwEasyOperationServerIpAddress=hwEasyOperationServerIpAddress, hwEasyOperationClientLost=hwEasyOperationClientLost, hwEasyOperationClientReplaceRowStatus=hwEasyOperationClientReplaceRowStatus, hwEasyOperationDevicePowerInfoGroup=hwEasyOperationDevicePowerInfoGroup, hwEasyOperationClientInfoClientDownloadCustomfile1=hwEasyOperationClientInfoClientDownloadCustomfile1, hwEasyOperationCommanderIpAddress=hwEasyOperationCommanderIpAddress, hwEasyOperationTopologyGroup=hwEasyOperationTopologyGroup, hwEasyOperationClientInfoClientBackupErrorReason=hwEasyOperationClientInfoClientBackupErrorReason, hwEasyOperationClientReplaceNewEsn=hwEasyOperationClientReplaceNewEsn, hwEasyOperationActivateDelayTime=hwEasyOperationActivateDelayTime, hwEasyOperationPortPowerInfoPortName=hwEasyOperationPortPowerInfoPortName, hwEasyOperationActivateInTime=hwEasyOperationActivateInTime, hwEasyOperationMIB=hwEasyOperationMIB, hwEasyOperationClientInfoClientOperateState=hwEasyOperationClientInfoClientOperateState, hwEasyOperationClientReplaceDownloadWebFile=hwEasyOperationClientReplaceDownloadWebFile, hwEasyOperationGroupMatchIpAddressMask=hwEasyOperationGroupMatchIpAddressMask, hwEasyOperationGroupWebfile=hwEasyOperationGroupWebfile, hwEasyOperationPortPowerInfoPortIndex=hwEasyOperationPortPowerInfoPortIndex, hwEasyOperationClientInfoClientSysLicense=hwEasyOperationClientInfoClientSysLicense, hwEasyOperationGroupSysSoftware=hwEasyOperationGroupSysSoftware, hwEasyOperationClientInfoClientModel=hwEasyOperationClientInfoClientModel, hwEasyOperationGroupMatchTable=hwEasyOperationGroupMatchTable, hwEasyOperationGroupMatchEntry=hwEasyOperationGroupMatchEntry, hwEasyOperationGroupMatchEsn=hwEasyOperationGroupMatchEsn, hwEasyOperationTopologyLocalMac=hwEasyOperationTopologyLocalMac, hwEasyOperationGroupName=hwEasyOperationGroupName, hwEasyOperationBackupConfigInterval=hwEasyOperationBackupConfigInterval, hwEasyOperationPortPowerInfoEntry=hwEasyOperationPortPowerInfoEntry, hwEasyOperationDefaultCustomfile2=hwEasyOperationDefaultCustomfile2, hwEasyOperationClientInfoClientSysSoftware=hwEasyOperationClientInfoClientSysSoftware, hwEasyOperationClientInfoClientDownloadCustomfile3=hwEasyOperationClientInfoClientDownloadCustomfile3, hwEasyOperationClientInfoClientRunState=hwEasyOperationClientInfoClientRunState, hwEasyOperationClientInfoClientErrorReason=hwEasyOperationClientInfoClientErrorReason, hwEasyOperationClientReplaceDownloadCustomfile1=hwEasyOperationClientReplaceDownloadCustomfile1, hwEasyOperationSavedTopologyTable=hwEasyOperationSavedTopologyTable, hwEasyOperationGroupTableGroup=hwEasyOperationGroupTableGroup, hwEasyOperationClientReplaceTable=hwEasyOperationClientReplaceTable, hwEasyOperationTopologyEntry=hwEasyOperationTopologyEntry, hwEasyOperationPortPowerInfoGauge=hwEasyOperationPortPowerInfoGauge, hwEasyOperationDefaultSysSoftwareVer=hwEasyOperationDefaultSysSoftwareVer, hwEasyOperationClientInfoTable=hwEasyOperationClientInfoTable, hwEasyOperationClientNumber=hwEasyOperationClientNumber, hwEasyOperationPortPowerInfoGroup=hwEasyOperationPortPowerInfoGroup)
class Solution(): def minmoves(self, nums: list) -> int: steps = 0 min_num = min(nums) for num in nums: steps += abs(min_num - num) return steps def minmoves(self, nums: list) -> int: max_element = max(nums) res = 0 for i in range(len(nums)): if i == 0: res += max_element - nums[i] else: if nums[i] != nums[i - 1]: res += max_element - nums[i] res = res + nums.count(max_element) - 1 return res nums = [1, 2, 3] nums = [2, 3, 3, 4] # 3,4,3,5 # 4,4,4 # nums = [1, 1, 2147483647] s = Solution() print(s.minmoves(nums))
# # PySNMP MIB module Nortel-MsCarrier-MscPassport-AtmMpeMIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-AtmMpeMIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:19: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) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection") Unsigned32, DisplayString, InterfaceIndex, Integer32, Counter32, StorageType, RowStatus = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-StandardTextualConventionsMIB", "Unsigned32", "DisplayString", "InterfaceIndex", "Integer32", "Counter32", "StorageType", "RowStatus") Link, = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-TextualConventionsMIB", "Link") mscComponents, mscPassportMIBs = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-UsefulDefinitionsMIB", "mscComponents", "mscPassportMIBs") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Unsigned32, Counter64, ModuleIdentity, Counter32, TimeTicks, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, iso, Integer32, IpAddress, Bits, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Counter64", "ModuleIdentity", "Counter32", "TimeTicks", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "iso", "Integer32", "IpAddress", "Bits", "Gauge32") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") atmMpeMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65)) mscAtmMpe = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118)) mscAtmMpeRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 1), ) if mibBuilder.loadTexts: mscAtmMpeRowStatusTable.setStatus('mandatory') mscAtmMpeRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeRowStatusEntry.setStatus('mandatory') mscAtmMpeRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 1, 1, 1), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeRowStatus.setStatus('mandatory') mscAtmMpeComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeComponentName.setStatus('mandatory') mscAtmMpeStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeStorageType.setStatus('mandatory') mscAtmMpeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))) if mibBuilder.loadTexts: mscAtmMpeIndex.setStatus('mandatory') mscAtmMpeCidDataTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 10), ) if mibBuilder.loadTexts: mscAtmMpeCidDataTable.setStatus('mandatory') mscAtmMpeCidDataEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeCidDataEntry.setStatus('mandatory') mscAtmMpeCustomerIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 10, 1, 1), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 8191), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeCustomerIdentifier.setStatus('mandatory') mscAtmMpeIfEntryTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 11), ) if mibBuilder.loadTexts: mscAtmMpeIfEntryTable.setStatus('mandatory') mscAtmMpeIfEntryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeIfEntryEntry.setStatus('mandatory') mscAtmMpeIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 11, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3))).clone('up')).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeIfAdminStatus.setStatus('mandatory') mscAtmMpeIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 11, 1, 2), InterfaceIndex().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeIfIndex.setStatus('mandatory') mscAtmMpeProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 12), ) if mibBuilder.loadTexts: mscAtmMpeProvTable.setStatus('mandatory') mscAtmMpeProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 12, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeProvEntry.setStatus('mandatory') mscAtmMpeMaxTransmissionUnit = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 12, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(256, 9188)).clone(9188)).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeMaxTransmissionUnit.setStatus('mandatory') mscAtmMpeEncapType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 12, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("llcEncap", 1), ("ipVcEncap", 2), ("ipxVcEncap", 3))).clone('llcEncap')).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeEncapType.setStatus('mandatory') mscAtmMpeIlsForwarder = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 12, 1, 3), Link()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeIlsForwarder.setStatus('mandatory') mscAtmMpeMediaProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 13), ) if mibBuilder.loadTexts: mscAtmMpeMediaProvTable.setStatus('mandatory') mscAtmMpeMediaProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 13, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeMediaProvEntry.setStatus('mandatory') mscAtmMpeLinkToProtocolPort = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 13, 1, 1), Link()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeLinkToProtocolPort.setStatus('mandatory') mscAtmMpeStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 14), ) if mibBuilder.loadTexts: mscAtmMpeStateTable.setStatus('mandatory') mscAtmMpeStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 14, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeStateEntry.setStatus('mandatory') mscAtmMpeAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 14, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("locked", 0), ("unlocked", 1), ("shuttingDown", 2))).clone('unlocked')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAdminState.setStatus('mandatory') mscAtmMpeOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 14, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeOperationalState.setStatus('mandatory') mscAtmMpeUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 14, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("idle", 0), ("active", 1), ("busy", 2))).clone('idle')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeUsageState.setStatus('mandatory') mscAtmMpeOperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 15), ) if mibBuilder.loadTexts: mscAtmMpeOperStatusTable.setStatus('mandatory') mscAtmMpeOperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 15, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex")) if mibBuilder.loadTexts: mscAtmMpeOperStatusEntry.setStatus('mandatory') mscAtmMpeSnmpOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 15, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3))).clone('up')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeSnmpOperStatus.setStatus('mandatory') mscAtmMpeAc = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2)) mscAtmMpeAcRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 1), ) if mibBuilder.loadTexts: mscAtmMpeAcRowStatusTable.setStatus('mandatory') mscAtmMpeAcRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex"), (0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeAcIndex")) if mibBuilder.loadTexts: mscAtmMpeAcRowStatusEntry.setStatus('mandatory') mscAtmMpeAcRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 1, 1, 1), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeAcRowStatus.setStatus('mandatory') mscAtmMpeAcComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcComponentName.setStatus('mandatory') mscAtmMpeAcStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 1, 1, 4), StorageType()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcStorageType.setStatus('mandatory') mscAtmMpeAcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))) if mibBuilder.loadTexts: mscAtmMpeAcIndex.setStatus('mandatory') mscAtmMpeAcProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 10), ) if mibBuilder.loadTexts: mscAtmMpeAcProvTable.setStatus('mandatory') mscAtmMpeAcProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex"), (0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeAcIndex")) if mibBuilder.loadTexts: mscAtmMpeAcProvEntry.setStatus('mandatory') mscAtmMpeAcAtmConnection = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 10, 1, 1), Link()).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeAcAtmConnection.setStatus('mandatory') mscAtmMpeAcIpCoS = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 10, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 3))).setMaxAccess("readwrite") if mibBuilder.loadTexts: mscAtmMpeAcIpCoS.setStatus('mandatory') mscAtmMpeAcStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 11), ) if mibBuilder.loadTexts: mscAtmMpeAcStateTable.setStatus('mandatory') mscAtmMpeAcStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 11, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex"), (0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeAcIndex")) if mibBuilder.loadTexts: mscAtmMpeAcStateEntry.setStatus('mandatory') mscAtmMpeAcAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 11, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("locked", 0), ("unlocked", 1), ("shuttingDown", 2))).clone('unlocked')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcAdminState.setStatus('mandatory') mscAtmMpeAcOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcOperationalState.setStatus('mandatory') mscAtmMpeAcUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("idle", 0), ("active", 1), ("busy", 2))).clone('idle')).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcUsageState.setStatus('mandatory') mscAtmMpeAcOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 12), ) if mibBuilder.loadTexts: mscAtmMpeAcOperTable.setStatus('mandatory') mscAtmMpeAcOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 12, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex"), (0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeAcIndex")) if mibBuilder.loadTexts: mscAtmMpeAcOperEntry.setStatus('mandatory') mscAtmMpeAcSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 12, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcSpeed.setStatus('mandatory') mscAtmMpeAcStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13), ) if mibBuilder.loadTexts: mscAtmMpeAcStatsTable.setStatus('mandatory') mscAtmMpeAcStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeIndex"), (0, "Nortel-MsCarrier-MscPassport-AtmMpeMIB", "mscAtmMpeAcIndex")) if mibBuilder.loadTexts: mscAtmMpeAcStatsEntry.setStatus('mandatory') mscAtmMpeAcOutPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcOutPackets.setStatus('mandatory') mscAtmMpeAcOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcOutOctets.setStatus('mandatory') mscAtmMpeAcOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcOutDiscards.setStatus('mandatory') mscAtmMpeAcInPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcInPackets.setStatus('mandatory') mscAtmMpeAcInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcInOctets.setStatus('mandatory') mscAtmMpeAcInUnknownProtos = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcInUnknownProtos.setStatus('mandatory') mscAtmMpeAcInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 118, 2, 13, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: mscAtmMpeAcInErrors.setStatus('mandatory') atmMpeGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 1)) atmMpeGroupCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 1, 1)) atmMpeGroupCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 1, 1, 3)) atmMpeGroupCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 1, 1, 3, 2)) atmMpeCapabilities = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 3)) atmMpeCapabilitiesCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 3, 1)) atmMpeCapabilitiesCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 3, 1, 3)) atmMpeCapabilitiesCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 65, 3, 1, 3, 2)) mibBuilder.exportSymbols("Nortel-MsCarrier-MscPassport-AtmMpeMIB", mscAtmMpeAcIpCoS=mscAtmMpeAcIpCoS, mscAtmMpeIfIndex=mscAtmMpeIfIndex, mscAtmMpeAcOperEntry=mscAtmMpeAcOperEntry, mscAtmMpeAdminState=mscAtmMpeAdminState, mscAtmMpeIfEntryEntry=mscAtmMpeIfEntryEntry, mscAtmMpeIlsForwarder=mscAtmMpeIlsForwarder, mscAtmMpeAcRowStatus=mscAtmMpeAcRowStatus, atmMpeGroup=atmMpeGroup, mscAtmMpeStateEntry=mscAtmMpeStateEntry, mscAtmMpeIfEntryTable=mscAtmMpeIfEntryTable, mscAtmMpeAcOutDiscards=mscAtmMpeAcOutDiscards, mscAtmMpeLinkToProtocolPort=mscAtmMpeLinkToProtocolPort, mscAtmMpeAcSpeed=mscAtmMpeAcSpeed, mscAtmMpeRowStatusEntry=mscAtmMpeRowStatusEntry, mscAtmMpeMaxTransmissionUnit=mscAtmMpeMaxTransmissionUnit, atmMpeCapabilities=atmMpeCapabilities, mscAtmMpeProvEntry=mscAtmMpeProvEntry, mscAtmMpeAcStatsTable=mscAtmMpeAcStatsTable, mscAtmMpeAcRowStatusEntry=mscAtmMpeAcRowStatusEntry, mscAtmMpeAcOutPackets=mscAtmMpeAcOutPackets, mscAtmMpeAcIndex=mscAtmMpeAcIndex, mscAtmMpeMediaProvEntry=mscAtmMpeMediaProvEntry, mscAtmMpeAcAtmConnection=mscAtmMpeAcAtmConnection, mscAtmMpeAcInPackets=mscAtmMpeAcInPackets, mscAtmMpeAcInOctets=mscAtmMpeAcInOctets, atmMpeMIB=atmMpeMIB, mscAtmMpeIndex=mscAtmMpeIndex, mscAtmMpeCustomerIdentifier=mscAtmMpeCustomerIdentifier, atmMpeGroupCA=atmMpeGroupCA, atmMpeCapabilitiesCA=atmMpeCapabilitiesCA, mscAtmMpeAcStateEntry=mscAtmMpeAcStateEntry, mscAtmMpeOperStatusTable=mscAtmMpeOperStatusTable, atmMpeGroupCA02A=atmMpeGroupCA02A, mscAtmMpeEncapType=mscAtmMpeEncapType, mscAtmMpeAcStorageType=mscAtmMpeAcStorageType, mscAtmMpeAc=mscAtmMpeAc, mscAtmMpeOperStatusEntry=mscAtmMpeOperStatusEntry, mscAtmMpeCidDataEntry=mscAtmMpeCidDataEntry, mscAtmMpeProvTable=mscAtmMpeProvTable, mscAtmMpeOperationalState=mscAtmMpeOperationalState, mscAtmMpeComponentName=mscAtmMpeComponentName, mscAtmMpeStorageType=mscAtmMpeStorageType, mscAtmMpeStateTable=mscAtmMpeStateTable, mscAtmMpeAcOperationalState=mscAtmMpeAcOperationalState, mscAtmMpeRowStatus=mscAtmMpeRowStatus, mscAtmMpeAcStateTable=mscAtmMpeAcStateTable, mscAtmMpeAcOutOctets=mscAtmMpeAcOutOctets, mscAtmMpeAcInErrors=mscAtmMpeAcInErrors, mscAtmMpeSnmpOperStatus=mscAtmMpeSnmpOperStatus, atmMpeCapabilitiesCA02A=atmMpeCapabilitiesCA02A, mscAtmMpeRowStatusTable=mscAtmMpeRowStatusTable, mscAtmMpeUsageState=mscAtmMpeUsageState, mscAtmMpeAcInUnknownProtos=mscAtmMpeAcInUnknownProtos, mscAtmMpe=mscAtmMpe, mscAtmMpeCidDataTable=mscAtmMpeCidDataTable, mscAtmMpeAcComponentName=mscAtmMpeAcComponentName, mscAtmMpeAcOperTable=mscAtmMpeAcOperTable, mscAtmMpeAcUsageState=mscAtmMpeAcUsageState, mscAtmMpeAcStatsEntry=mscAtmMpeAcStatsEntry, mscAtmMpeMediaProvTable=mscAtmMpeMediaProvTable, mscAtmMpeAcProvEntry=mscAtmMpeAcProvEntry, atmMpeGroupCA02=atmMpeGroupCA02, atmMpeCapabilitiesCA02=atmMpeCapabilitiesCA02, mscAtmMpeIfAdminStatus=mscAtmMpeIfAdminStatus, mscAtmMpeAcRowStatusTable=mscAtmMpeAcRowStatusTable, mscAtmMpeAcAdminState=mscAtmMpeAcAdminState, mscAtmMpeAcProvTable=mscAtmMpeAcProvTable)
num = soma = cont = 0 while num != 999: num = int(input('Digite um número [999 para parar]: ')) soma += num cont += 1 print(f'Você digitou {cont - 1} número e a soma foi {soma - 999}')
# -*- coding: utf-8 -*- """Package errors.""" class Error(Exception): """Base class for exceptions in this module.""" pass class RequestError(Error): """Exception raised for errors with http requests. Typically these are the result of malformed SPARQL queries. Parameters ---------- response : str The text of the server reponse. """ def __init__(self, response): message = ('The server responded with the following message: ' '{0}'.format(response)) super(RequestError, self).__init__(message) self.message = message self.response = response class DateFormatError(Error): """Exception raised for errors parsing date strings. Parameters ---------- date_str : str The date string that could not be parsed. """ def __init__(self, date_str): message = ( 'Could not parse \'{0}\' as a date: ' 'use format \'YYYY-MM-DD\''.format(date_str)) super(DateFormatError, self).__init__(message) self.message = message self.date_str = date_str class MissingColumnError(Error): """Exception raised for errors handling dataframes with missing columms. Parameters ---------- colname : str The name of the column that could not be found. """ def __init__(self, colname): message = ('Could not find a column called \'{0}\''.format(colname)) super(MissingColumnError, self).__init__(message) self.message = message self.colname = colname
# -*- coding: utf-8 -*- """Top-level package for md2bibtex.""" __author__ = """Owen McGill""" __email__ = 'owen@owenmcgill.com' __version__ = '0.1.0'
class IntIdSequence: def __init__(self): self.next_id = 0 def __next__(self): self.next_id += 1 return self.next_id class RepositoryIterator: def __init__(self, repo): self.items = repo.find_all() self.next_id = -1 def __next__(self): self.next_id += 1 if self.next_id < len(self.items): return self.items[self.next_id] else: raise StopIteration class BookRepository: def __init__(self, books = {}, id_sequence = None): self.books = books self.id_sequence = id_sequence def __len__(self): return len(self.books) def __iter__(self): return RepositoryIterator(self) def find_all(self): return list(self.books.values()) def find_by_id(self, id): return self.books[id] def find_by_predicate(self, filter_predicate): return filter(filter_predicate, self.find_all()) def find_by_name_part(self, name_part): return self.find_by_predicate(lambda book : name_part in book.title) def find_by_name_descr_part(self, part): return self.find_by_predicate(lambda book : part in book.title or part in book.descr) def find_by_authors_part(self, part): return self.find_by_predicate(lambda book : part in ",".join(book.authors)) def insert(self, book): if len(str(book.id).strip()) == 0 and self.id_sequence is not None: book.id = next(self.id_sequence) self.books[book.id] = book return book def update(self, book): self.books[book.id] = book return book def delete_by_id(self, id): removed = self.books[id] del self.books[id] return removed def count(self): return self.__len__( self.books) # return BookRepository.__len__(self, self.books)
class ServiceNotFound(Exception): """Raised when a horseback service is not found.""" class ServicesDict(dict): """Dictionary of services. Only differs by raising a ServiceNotFound error instead of KeyError if key is not found. """ def __getitem__(self, key: str): try: return super().__getitem__(key) except KeyError: raise ServiceNotFound("Service '{}' not found.".format(key))
""" According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970." Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Each cell interacts with its eight neighbors (horizontal, vertical, diagonal) using the following four rules (taken from the above Wikipedia article): Any live cell with fewer than two live neighbors dies, as if caused by under-population. Any live cell with two or three live neighbors lives on to the next generation. Any live cell with more than three live neighbors dies, as if by over-population.. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction. Write a function to compute the next state (after one update) of the board given its current state. Follow up: Could you solve it in-place? Remember that the board needs to be updated at the same time: You cannot update some cells first and then use their updated values to update other cells. In this question, we represent the board using a 2D array. In principle, the board is infinite, which would cause problems when the active area encroaches the border of the array. How would you address these problems? Credits: Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. """ class Solution(object): def gameOfLife(self, board): """ :type board: List[List[int]] :rtype: void Do not return anything, modify board in-place instead. """ xLen = len(board) yLen = len(board[0]) xLoc = [-1, -1, -1, 0, 0, 1, 1, 1] yLoc = [-1, 0, 1, -1, 1, -1, 0, 1] for i in range(xLen): for j in range(yLen): nCount = 0 for k in range(8): nCount += self.getCurrentStatus(board, i + xLoc[k], j + yLoc[k]) if nCount == 2: board[i][j] += board[i][j] << 1 if nCount == 3: board[i][j] += 1 << 1 for i in range(xLen): for j in range(yLen): board[i][j] = board[i][j] >> 1 def getCurrentStatus(self, board, i, j): x = len(board) - 1 y = len(board[0]) - 1 if i < 0 or i > x: return 0 if j < 0 or j > y: return 0 return board[i][j] & 1 a = Solution() a.gameOfLife([[1, 1, 1], [1, 0, 1], [1, 1, 1]]) """ Note: state is binary, possible to save next state in higher digit and shift back """
""" По данному числу N распечатайте все целые степени двойки, не превосходящие N, в порядке возрастания.Операцией возведения в степень пользоваться нельзя! Формат ввода Вводится натуральное число. """ N = int(input()) k = 1 while k <= N: print(k, end=' ') k = k*2
# coding=utf-8 """ chimera.leetcode_43 ~~~~~~~~~~~~~~~~~~~ Multiply Strings Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: 1. The length of both num1 and num2 is < 110. 2. Both num1 and num2 contains only digits 0-9. 3. Both num1 and num2 does not contain any leading zero. You must not use any built-in BigInteger library or convert the inputs to integer directly. """ class Solution(object): def multiply(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ # return str(int(num1) * int(num2)) num1_len, num2_len = len(num1), len(num2) num1_bits = [int(b) for b in num1[::-1]] num2_bits = [int(b) for b in num2[::-1]] res = [] for inx, bit in enumerate(num2_bits): r = [0 for _ in xrange(inx)] r.extend(bit * b for b in num1_bits) r.extend(0 for _ in xrange(num2_len - inx - 1)) res.append(r) ret = [] for i in xrange(num1_len + num2_len - 1): ret.append(sum(s[i] for s in res)) for i in xrange(len(ret) - 1): ret[i + 1] += ret[i] / 10 ret[i] = ret[i] % 10 return ''.join(str(i) for i in ret[::-1]).lstrip('0') or '0'
def contaDigtos(d): cont = 0 for _ in d: cont += 1 return cont def ehBissexto(i): if contaDigtos(i) == 4: i = int(i) if i % 4 == 0 and i % 100 != 0 or i % 400 == 0: return True else: return False def Menssagem(z): if ehBissexto(z): z = int(z) atual = 2018 if z > atual: print(f'O ano {z} serah bissexto') elif z < atual: print(f'O ano {z} foi bissexto') else: print(f'O ano {z} não foi bissexto') ano = input() year = ano.split() for a in year: if contaDigtos(a) == 4: if ehBissexto(a): Menssagem(a) else: Menssagem(a) else: print('Ano inválido')
# (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): DOCUMENTATION = """ options: show_skipped_hosts: name: Show skipped hosts description: "Toggle to control displaying skipped task/host results in a task" default: True env: - name: DISPLAY_SKIPPED_HOSTS ini: - key: display_skipped_hosts section: defaults type: boolean show_custom_stats: name: Show custom stats description: 'This adds the custom stats set via the set_stats plugin to the play recap' default: False env: - name: ANSIBLE_SHOW_CUSTOM_STATS ini: - key: show_custom_stats section: defaults type: bool """
class InnerWidget: _index = 0 def __init__(self, master, WidgetClass) -> None: self.innerWidget = WidgetClass(master) self.index = self._index InnerWidget._index += 1
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def sortedArrayToBST(self, nums: List[int]) -> TreeNode: def BSTBuild(start: int, end: int) -> TreeNode: if start > end: return None mid = (start + end) // 2 root = TreeNode(nums[mid]) #递归构造 root.left = BSTBuild(start, mid - 1) root.right = BSTBuild(mid + 1, end) return root if nums == []: return None return BSTBuild(0, len(nums) - 1)
class Language: def __init__(self, name, extension, macro_prefix, generated_suffix, columns): self.name = name self.extension = extension self.macro_prefix = macro_prefix self.generated_suffix = generated_suffix self.columns = columns languages = [ Language('Python', '.py', '#SILP:', '#__SILP__\n', 80), Language('F#', '.fs', '//SILP:', '//__SILP__\n', 80), Language('C#', '.cs', '//SILP:', '//__SILP__\n', 80), Language('Go', '.go', '//SILP:', '//__SILP__\n', 80), Language('Freshrc', '.freshrc', '#SILP:', '#__SILP__\n', 80), Language('YML', '.yml', '#SILP:', '#__SILP__\n', 80), Language('Swift', '.swift', '//SILP:', '//__SILP__\n', 80), Language('Objective-C', '.m', '//SILP:', '//__SILP__\n', 80), Language('Objective-C++', '.mm', '//SILP:', '//__SILP__\n', 80), Language('Moonscript', '.moon', '--SILP:', '--__SILP__\n', 80), Language('Lua', '.lua', '--SILP:', '--__SILP__\n', 80), Language('Erlang', '.erl', '%SILP:', '%__SILP__\n', 80), Language('Erlang Include', '.hrl', '%SILP:', '%__SILP__\n', 80), Language('SQL', '.sql', '-- SILP:', '/*__SILP__*/\n', 80), Language('CS Proj', '.csproj', '<!--SILP:', '<!--__SILP__-->\n', 80), Language('Proj Items', '.projitems', '<!--SILP:', '<!--__SILP__-->\n', 80), Language('Shader', '.shader', '//SILP:', '//__SILP__\n', 80), Language('TypeScript', '.ts', '//SILP:', '//__SILP__\n', 80), ]
#!/usr/bin/env python ''' Author : Jonathan Lurie Email : lurie.jo@gmail.com Version : 0.1 Licence : MIT description : Declare some EXIF tag code we will need with piexif. ''' COPYRIGHT_FIELD = ("0th", 33432) DESCRIPTION_FIELD = ("0th", 270) DATE_FIELD = ("0th", 306)
class Solution(object): def threeSum(self, nums): res = [] amount = [0] * 200001 nums2 = sorted(nums) for v in nums: amount[v + 100000] += 1 # 3 different numbers for i in range(len(nums2)): if i > 0 and nums2[i] == nums2[i - 1]: continue for j in range(i+1, len(nums2)): if nums2[j] == nums2[i] or nums2[j] == nums2[j - 1]: continue diff = 0 - nums2[i] - nums2[j] if diff <= nums2[j]: continue if diff >= -100000 and diff <= 100000 and amount[diff + 100000] >0: res.append([nums2[i], nums2[j], diff]) # at least two equal numbers for i in range(len(nums2)): if i > 0 and nums2[i] == nums2[i - 1]: continue if i + 1 < len(nums2) and nums2[i + 1] == nums2[i]: diff = 0 - nums2[i] - nums2[i] if diff >= -100000 and diff <= 100000 and (nums2[i] != 0 and amount[diff + 100000] >0 or nums2[i] == 0 and amount[diff + 100000] > 2): res.append([nums2[i], nums2[i], diff]) return res
class MedianFinder: def __init__(self): self.stream = [] self.size = 0 def addNum(self, num: int) -> None: self.stream.append(num) self.size += 1 def findMedian(self) -> float: self.stream.sort() # first retrieve midpoint of stream mid = (self.size-1) // 2 # if odd sized datastream can just return mid if self.size % 2 != 0: return self.stream[mid] return (self.stream[mid] + self.stream[mid+1]) / 2 # Your MedianFinder object will be instantiated and called as such: # obj = MedianFinder() # obj.addNum(num) # param_2 = obj.findMedian()
def dict_interdiff(d1, d2): ''' d1, d2: dicts whose keys and values are integers Returns a tuple of dictionaries according to the instructions above ''' intersection = {} difference = {} shorterDict = (lambda x, y: x if len(x) <= len(y) else y)(d1, d2) longerDict = (lambda x, y: x if len(x) > len(y) else y)(d1, d2) for key_s in shorterDict: if key_s in longerDict: intersection[key_s] = (lambda x,y: x > y)(d1[key_s], d2[key_s]) else: difference[key_s] = shorterDict[key_s] for key_l in longerDict: if key_l not in intersection: difference[key_l] = longerDict[key_l] return (intersection, difference)
# 21.05.31 ''' 1. '부산'에 해당하는 value 출력 2. '천안' key가 존재하는지 확인 3. key 리스트 생성 4. value 리스트 생성 ''' filename_areacode = { '서울':'02', '대전':'042', '부산':'051', '광주':'062', '제주':'064' } # 1. print( filename_areacode ['부산'] ) # 딕셔너리변수['키값'] = value 값 출력 # 2. print( '천안' in filename_areacode ) # A in B = B안에 A가 있는지 조회 결과값 (True, False) filename_chk = filename_areacode.get( '천안' ) # get함수는 key값을 이용해 value값을 조회하는것. 없는 key를 넣으면 None 출력 print( filename_chk ) # 3. dict_keylist = list( filename_areacode.keys() ) # keys함수는 Dict내의 키값들을 조회할 수 있다. 출력 dict_keys('키값들') print( dict_keylist ) # 결과값이 list가 아니기 때문에 list()함수 안에 넣어 리스트를 만듦. #4. dct_valuelist = list( filename_areacode.values() ) # valuue함수는 Dict 내의 밸류값을 조회할 수 있다. 이외에 keys함수와 동일 print( dct_valuelist )
""" Multiples of 3 and 5 Problem 1 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ sum=0 for x in range(1, 1000): if x%3==0 or x%5==0: sum=sum+x print (sum)
def extractWuxiaLovers(item): """ Wuxia Lovers """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None if item['title'].startswith('CGA Chapter') or item['title'].startswith('CGA: Chapter'): return buildReleaseMessageWithType(item, 'Conquer God, Asura, and 1000 Beauties', vol, chp, frag=frag, postfix=postfix) if item['title'].startswith('Etranger Chapter'): return buildReleaseMessageWithType(item, 'Etranger', vol, chp, frag=frag, postfix=postfix) if item['title'].startswith('Q11 Chapter'): return buildReleaseMessageWithType(item, 'Queen of No.11 Agent 11', vol, chp, frag=frag, postfix=postfix) if item['title'].startswith('STS Chapter'): return buildReleaseMessageWithType(item, 'Sky Traversing Sword Master', vol, chp, frag=frag, postfix=postfix) if item['title'].startswith('DGM Chapter'): return buildReleaseMessageWithType(item, 'Descent of the God of Magic', vol, chp, frag=frag, postfix=postfix) if item['title'].startswith('The First Hunter Chapter'): return buildReleaseMessageWithType(item, 'The First Hunter', vol, chp, frag=frag, postfix=postfix) if item['title'].startswith('Slaughter System – '): return buildReleaseMessageWithType(item, 'Slaughter System', vol, chp, frag=frag, postfix=postfix, tl_type='oel') if item['title'].startswith('Getcha Skills Chapter '): return buildReleaseMessageWithType(item, 'Getcha Skills', vol, chp, frag=frag, postfix=postfix, tl_type='oel') if item['title'].startswith('Empyrean Ascent Chapter'): return buildReleaseMessageWithType(item, 'Empyrean Ascent', vol, chp, frag=frag, postfix=postfix, tl_type='oel') if item['title'].startswith('[Guardian] Chapter'): return buildReleaseMessageWithType(item, '[Guardian]', vol, chp, frag=frag, postfix=postfix, tl_type='oel') return False
def createFile(): f= open("loginInfo.txt", "w+") print("Input your username") f.write(input()+"\n") print("Input your password") f.write(input()+"\n") f.close()
#Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km/h, #mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$7,00 por cada Km acima do limite. v = int(input('Qual é a velocidade atual do carro: ')) if v > 80: print('\033[31m MULTADO! Você excedeu o limite permitido que é de 80Km/h') print('\033[31m Você deve pagar uma multa de \033[36mR${}! '.format((v-80)*7)) else: print('\033[32m Tenha um bom dia! Dirija com segurança!')
print() ''' 编写一个程序,当用户输入文件名和行数后,将该文件的前N行内容打印到屏幕上 如: 文件【xx】的前xx行的内容如下: XXXXX ''' def printLine(fileName,lines): f=open('resources/%s'%fileName) lines=int(lines) print('\n文件【%s】的前%d行的内容如下:\n'%(fileName,lines)) for i in range(lines): 'readline()也是需要用print打印出来的' print(f.readline()) f.close() fileName=input('请输入你要打开的文件名:') lines=input('请输入需要显示该文件前几行:') printLine(fileName,lines)
class Network(object): def __init__(self, variables, domains, constraints): self.variables = variables self.domains = domains self.constraints = constraints def copy(self): return Network(self.variables, self.domains.copy(), self.constraints)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def import_data(path): count = 0 result = [] train_path, train_dirs, train_files = next(os.walk(path)) train_files.sort() for i in range(len(train_files)): if "csv" in train_files[i]: try: result.append(pd.read_csv(train_path + "/" + train_files[i])) print(train_files[i] , ": import") except: print(train_files[i], " : passed") pass else: print(train_files[i],"is not csv_file") return result # train_set1_path, train_set2_path # ts = time.time() # set1 = import_data(train_set1_path) # set2 = import_data(train_set2_path) # print(time.time() - ts)
''' Instructions You are going to write a program that automatically prints the solution to the FizzBuzz game. Your program should print each number from 1 to 100 in turn. When the number is divisible by 3 then instead of printing the number it should print "Fizz". When the number is divisible by 5, then instead of printing the number it should print "Buzz".` And if the number is divisible by both 3 and 5 e.g. 15 then instead of the number it should print "FizzBuzz" e.g. it might start off like this: 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz .... etc. ''' # Write your code below this row 👇 for i in range(1, 101): if i % 3 == 0 and i % 5 == 0: print('FizzBuzz') elif i % 3 == 0: print('Fizz') elif i % 5 == 0: print('Buzz') else: print(i)
# Copyright (c) 2020 Hartmut Kaiser # # SPDX-License-Identifier: BSL-1.0 # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # This cmake-format configuration file is a suggested configuration file for # formatting CMake files for the HPX project. # PLEASE NOTE: This file has been created and tested with cmake-format V0.6.10 # ----------------------------- # Options affecting formatting. # ----------------------------- with section("format"): # If true, separate function names from parentheses with a space separate_fn_name_with_space = False # Format command names consistently as 'lower' or 'upper' case command_case = u"lower" # If the statement spelling length (including space and parenthesis) is # larger # than the tab width by more than this amount, then force reject un-nested # layouts. max_prefix_chars = 10 # If the trailing parenthesis must be 'dangled' on its own line, then align # it # to this reference: `prefix`: the start of the statement, `prefix-indent`: # the start of the statement, plus one indentation level, `child`: align to # the column of the arguments dangle_align = u"prefix" # If an argument group contains more than this many sub-groups (parg or kwarg # groups) then force it to a vertical layout. max_subgroups_hwrap = 2 # If the statement spelling length (including space and parenthesis) is # smaller than this amount, then force reject nested layouts. min_prefix_chars = 4 # If a positional argument group contains more than this many arguments, then # force it to a vertical layout. max_pargs_hwrap = 6 # If a candidate layout is wrapped horizontally but it exceeds this many # lines, then reject the layout. max_lines_hwrap = 2 # If true, the parsers may infer whether or not an argument list is sortable # (without annotation). autosort = False # What style line endings to use in the output. line_ending = u"auto" # How wide to allow formatted cmake files line_width = 80 # If a statement is wrapped to more than one line, than dangle the closing # parenthesis on its own line. dangle_parens = True # How many spaces to tab for indent tab_size = 2 # A list of command names which should always be wrapped always_wrap = [] # If true, separate flow control names from their parentheses with a space separate_ctrl_name_with_space = False # If a cmdline positional group consumes more than this many lines without # nesting, then invalidate the layout (and nest) max_rows_cmdline = 2 # By default, if cmake-format cannot successfully fit everything into the # desired linewidth it will apply the last, most aggressive attempt that it # made. If this flag is True, however, cmake-format will print error, exit # with non-zero status code, and write-out nothing require_valid_layout = False # Format keywords consistently as 'lower' or 'upper' case keyword_case = u"unchanged" # If true, the argument lists which are known to be sortable will be sorted # lexicographicall enable_sort = True # A dictionary mapping layout nodes to a list of wrap decisions. See the # documentation for more information. layout_passes = {} # ------------------------------------------------ # Options affecting comment reflow and formatting. # ------------------------------------------------ with section("markup"): # If comment markup is enabled, don't reflow any comment block which matches # this (regex) pattern. Default is `None` (disabled). literal_comment_pattern = None # If a comment line starts with at least this many consecutive hash # characters, then don't lstrip() them off. This allows for lazy hash rulers # where the first hash char is not separated by space hashruler_min_length = 10 # Regular expression to match preformat fences in comments default= # ``r'^\s*([`~]{3}[`~]*)(.*)$'`` fence_pattern = u"^\\s*([`~]{3}[`~]*)(.*)$" # If true, then insert a space between the first hash char and remaining hash # chars in a hash ruler, and normalize its length to fill the column canonicalize_hashrulers = True # If a comment line matches starts with this pattern then it is explicitly a # trailing comment for the preceding argument. Default is '#<' explicit_trailing_pattern = u"#<" # If comment markup is enabled, don't reflow the first comment block in each # listfile. Use this to preserve formatting of your copyright/license # statements. first_comment_is_literal = True # enable comment markup parsing and reflow enable_markup = True # Regular expression to match rulers in comments default= # ``r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'`` ruler_pattern = u"^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$" # What character to use as punctuation after numerals in an enumerated list enum_char = u"." # What character to use for bulleted lists bullet_char = u"*" # ---------------------------- # Options affecting the linter # ---------------------------- with section("lint"): # regular expression pattern describing valid function names function_pattern = u"[0-9a-z_]+" # regular expression pattern describing valid names for function/macro # arguments and loop variables. argument_var_pattern = u"[a-z][a-z0-9_]+" # a list of lint codes to disable disabled_codes = [] # Require at least this many newlines between statements min_statement_spacing = 1 # regular expression pattern describing valid macro names macro_pattern = u"[0-9A-Z_]+" # regular expression pattern describing valid names for public directory # variables public_var_pattern = u"[A-Z][0-9A-Z_]+" max_statements = 50 # In the heuristic for C0201, how many conditionals to match within a loop in # before considering the loop a parser. max_conditionals_custom_parser = 2 # regular expression pattern describing valid names for variables with global # (cache) scope global_var_pattern = u"[A-Z][0-9A-Z_]+" # regular expression pattern describing valid names for keywords used in # functions or macros keyword_pattern = u"[A-Z][0-9A-Z_]+" max_arguments = 5 # regular expression pattern describing valid names for privatedirectory # variables private_var_pattern = u"_[0-9a-z_]+" max_localvars = 15 max_branches = 12 # regular expression pattern describing valid names for variables with local # scope local_var_pattern = u"[a-z][a-z0-9_]+" # Require no more than this many newlines between statements max_statement_spacing = 2 # regular expression pattern describing valid names for variables with global # scope (but internal semantic) internal_var_pattern = u"_[A-Z][0-9A-Z_]+" max_returns = 6 # ------------------------------------- # Miscellaneous configurations options. # ------------------------------------- with section("misc"): # A dictionary containing any per-command configuration overrides. Currently # only `command_case` is supported. per_command = {} # ---------------------------------- # Options affecting listfile parsing # ---------------------------------- with section("parse"): # Specify structure for custom cmake functions # (the body of this structure was generated using # 'cmake-genparsers -f python cmake/HPX*.cmake' # additional_commands = { "hpx_local_add_compile_test": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "2+"}, }, "hpx_local_add_compile_test_target_dependencies": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "2+"}, }, "hpx_local_add_config_test": { "kwargs": { "ARGS": "+", "CMAKECXXFEATURE": 1, "COMPILE_DEFINITIONS": "+", "DEFINITIONS": "+", "INCLUDE_DIRECTORIES": "+", "LIBRARIES": "+", "LINK_DIRECTORIES": "+", "REQUIRED": "+", "ROOT": 1, "SOURCE": 1, }, "pargs": {"flags": ["FILE", "EXECUTE"], "nargs": "1+"}, }, "hpx_local_add_example_target_dependencies": { "kwargs": {}, "pargs": {"flags": ["DEPS_ONLY"], "nargs": "2+"}, }, "hpx_local_add_example_test": {"pargs": {"nargs": 2}}, "hpx_local_add_executable": { "kwargs": { "AUXILIARY": "+", "COMPILE_FLAGS": "+", "DEPENDENCIES": "+", "FOLDER": 1, "HEADERS": "+", "HEADER_GLOB": 1, "HEADER_ROOT": 1, "HPX_PREFIX": 1, "INI": 1, "INSTALL_SUFFIX": 1, "LANGUAGE": 1, "LINK_FLAGS": "+", "OUTPUT_SUFFIX": 1, "SOURCES": "+", "SOURCE_GLOB": 1, "SOURCE_ROOT": 1, }, "pargs": { "flags": [ "EXCLUDE_FROM_ALL", "EXCLUDE_FROM_DEFAULT_BUILD", "AUTOGLOB", "INTERNAL_FLAGS", "NOLIBS", "NOHPX_INIT", ], "nargs": "1+", }, }, "hpx_local_add_header_tests": { "kwargs": { "DEPENDENCIES": "+", "EXCLUDE": "+", "EXCLUDE_FROM_ALL": "+", "HEADERS": "+", "HEADER_ROOT": 1, }, "pargs": {"flags": ["NOLIBS"], "nargs": "1+"}, }, "hpx_local_add_headers_compile_test": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "2+"}, }, "hpx_local_add_library": { "kwargs": { "AUXILIARY": "+", "COMPILER_FLAGS": "+", "DEPENDENCIES": "+", "FOLDER": 1, "HEADERS": "+", "HEADER_GLOB": 1, "HEADER_ROOT": 1, "INSTALL_SUFFIX": 1, "LINK_FLAGS": "+", "OUTPUT_SUFFIX": 1, "SOURCES": "+", "SOURCE_GLOB": 1, "SOURCE_ROOT": 1, }, "pargs": { "flags": [ "EXCLUDE_FROM_ALL", "INTERNAL_FLAGS", "NOLIBS", "NOEXPORT", "AUTOGLOB", "STATIC", "NONAMEPREFIX", ], "nargs": "1+", }, }, "hpx_local_add_library_headers": { "kwargs": {"EXCLUDE": "+", "GLOBS": "+"}, "pargs": {"flags": ["APPEND"], "nargs": "2+"}, }, "hpx_local_add_library_headers_noglob": { "kwargs": {"EXCLUDE": "+", "HEADERS": "+"}, "pargs": {"flags": ["APPEND"], "nargs": "1+"}, }, "hpx_local_add_library_sources": { "kwargs": {"EXCLUDE": "+", "GLOBS": "+"}, "pargs": {"flags": ["APPEND"], "nargs": "2+"}, }, "hpx_local_add_library_sources_noglob": { "kwargs": {"EXCLUDE": "+", "SOURCES": "+"}, "pargs": {"flags": ["APPEND"], "nargs": "1+"}, }, "hpx_local_add_module": { "kwargs": { "CMAKE_SUBDIRS": "+", "COMPAT_HEADERS": "+", "DEPENDENCIES": "+", "EXCLUDE_FROM_GLOBAL_HEADER": "+", "GLOBAL_HEADER_GEN": 1, "HEADERS": "+", "OBJECTS": "+", "MODULE_DEPENDENCIES": "+", "SOURCES": "+", }, "pargs": { "flags": ["FORCE_LINKING_GEN", "CUDA", "CONFIG_FILES"], "nargs": "1+", }, }, "hpx_local_add_performance_test": {"pargs": {"nargs": 2}}, "hpx_local_add_pseudo_dependencies": {"pargs": {"nargs": 0}}, "hpx_local_add_pseudo_dependencies_no_shortening": {"pargs": {"nargs": 0}}, "hpx_local_add_pseudo_target": {"pargs": {"nargs": 0}}, "hpx_local_add_regression_compile_test": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "2+"}, }, "hpx_local_add_regression_test": {"pargs": {"nargs": 2}}, "hpx_local_add_source_group": { "kwargs": {"CLASS": 1, "NAME": 1, "ROOT": 1, "TARGETS": "+"}, "pargs": {"flags": [], "nargs": "*"}, }, "hpx_local_add_test": { "kwargs": { "ARGS": "+", "EXECUTABLE": 1, "LOCALITIES": 1, "PARCELPORTS": "+", "THREADS_PER_LOCALITY": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED"], "nargs": "2+"}, }, "hpx_local_add_test_target_dependencies": { "kwargs": {"PSEUDO_DEPS_NAME": 1}, "pargs": {"flags": [], "nargs": "2+"}, }, "hpx_local_add_unit_compile_test": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "2+"}, }, "hpx_local_add_unit_test": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "2+"}, }, "hpx_local_add_test_and_deps_compile_test": { "kwargs": { "DEPENDENCIES": "+", "FOLDER": 1, "SOURCES": "+", "SOURCE_ROOT": 1, }, "pargs": {"flags": ["FAILURE_EXPECTED", "NOLIBS"], "nargs": "3+"}, }, "hpx_local_add_test_and_deps_test": {"pargs": {"nargs": 3}}, "hpx_local_create_configuration_summary": {"pargs": {"nargs": 2}}, "hpx_local_create_symbolic_link": {"pargs": {"nargs": 2}}, "hpx_local_get_target_property": {"pargs": {"nargs": 3}}, "hpx_local_add_compile_flag": {"pargs": {"nargs": 0}}, "hpx_local_add_compile_flag_if_available": { "kwargs": {"CONFIGURATIONS": "+", "LANGUAGES": "+", "NAME": 1}, "pargs": {"flags": [], "nargs": "1+"}, }, "hpx_local_add_config_cond_define": {"pargs": {"nargs": 1}}, "hpx_local_add_config_define": {"pargs": {"nargs": 1}}, "hpx_local_add_config_define_namespace": { "kwargs": {"DEFINE": 1, "NAMESPACE": 1, "VALUE": "+"}, "pargs": {"flags": [], "nargs": "*"}, }, "hpx_local_add_link_flag": { "kwargs": {"CONFIGURATIONS": "+", "TARGETS": "+"}, "pargs": {"flags": [], "nargs": "1+"}, }, "hpx_local_add_link_flag_if_available": { "kwargs": {"NAME": 1, "TARGETS": "+"}, "pargs": {"flags": [], "nargs": "1+"}, }, "hpx_local_add_target_compile_definition": { "kwargs": {"CONFIGURATIONS": "+"}, "pargs": {"flags": ["PUBLIC"], "nargs": "1+"}, }, "hpx_local_add_target_compile_option": { "kwargs": {"CONFIGURATIONS": "+", "LANGUAGES": "+"}, "pargs": {"flags": ["PUBLIC"], "nargs": "1+"}, }, "hpx_local_add_target_compile_option_if_available": { "kwargs": {"CONFIGURATIONS": "+", "LANGUAGES": "+", "NAME": 1}, "pargs": {"flags": ["PUBLIC"], "nargs": "1+"}, }, "hpx_local_append_property": {"pargs": {"nargs": 2}}, "hpx_local_check_for_builtin_integer_pack": {"pargs": {"nargs": 0}}, "hpx_local_check_for_builtin_make_integer_seq": {"pargs": {"nargs": 0}}, "hpx_local_check_for_builtin_type_pack_element": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx11_std_atomic": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx11_std_atomic_128bit": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx11_std_quick_exit": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx11_std_shared_ptr_lwg3018": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx17_aligned_new": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx17_filesystem": {"pargs": {"nargs": 0}}, "hpx_local_check_for_cxx17_hardware_destructive_interference_size": { "pargs": {"nargs": 0} }, "hpx_local_check_for_libfun_std_experimental_optional": {"pargs": {"nargs": 0}}, "hpx_local_check_for_mm_prefetch": {"pargs": {"nargs": 0}}, "hpx_local_check_for_stable_inplace_merge": {"pargs": {"nargs": 0}}, "hpx_local_check_for_unistd_h": {"pargs": {"nargs": 0}}, "hpx_local_collect_usage_requirements": { "kwargs": {"EXCLUDE": "+"}, "pargs": {"flags": [], "nargs": "10+"}, }, "hpx_local_config_loglevel": {"pargs": {"nargs": 2}}, "hpx_local_construct_cflag_list": {"pargs": {"nargs": 6}}, "hpx_local_construct_library_list": {"pargs": {"nargs": 3}}, "hpx_local_cpuid": {"pargs": {"nargs": 2}}, "hpx_local_debug": {"pargs": {"nargs": 0}}, "hpx_local_error": {"pargs": {"nargs": 0}}, "hpx_local_export_modules_targets": {"pargs": {"nargs": 0}}, "hpx_local_export_targets": {"pargs": {"nargs": 0}}, "hpx_local_force_out_of_tree_build": {"pargs": {"nargs": 1}}, "hpx_local_generate_pkgconfig_from_target": { "kwargs": {"EXCLUDE": "+"}, "pargs": {"flags": [], "nargs": "3+"}, }, "hpx_local_handle_component_dependencies": {"pargs": {"nargs": 1}}, "hpx_local_info": {"pargs": {"nargs": 0}}, "hpx_local_message": {"pargs": {"nargs": 1}}, "hpx_local_option": { "kwargs": {"CATEGORY": 1, "MODULE": 1, "STRINGS": "+"}, "pargs": {"flags": ["ADVANCED"], "nargs": "4+"}, }, "hpx_local_perform_cxx_feature_tests": {"pargs": {"nargs": 0}}, "hpx_local_print_list": {"pargs": {"nargs": 3}}, "hpx_local_remove_link_flag": { "kwargs": {"CONFIGURATIONS": "+", "TARGETS": "+"}, "pargs": {"flags": [], "nargs": "1+"}, }, "hpx_local_remove_target_compile_option": { "kwargs": {"CONFIGURATIONS": "+"}, "pargs": {"flags": ["PUBLIC"], "nargs": "1+"}, }, "hpx_local_sanitize_usage_requirements": {"pargs": {"nargs": 2}}, "hpx_local_set_cmake_policy": {"pargs": {"nargs": 2}}, "hpx_local_set_lib_name": {"pargs": {"nargs": 2}}, "hpx_local_set_option": { "kwargs": {"HELPSTRING": 1, "TYPE": 1, "VALUE": 1}, "pargs": {"flags": ["FORCE"], "nargs": "1+"}, }, "hpx_local_setup_target": { "kwargs": { "COMPILE_FLAGS": "+", "DEPENDENCIES": "+", "FOLDER": 1, "HEADER_ROOT": 1, "HPX_PREFIX": 1, "INSTALL_FLAGS": "+", "INSTALL_PDB": "+", "LINK_FLAGS": "+", "NAME": 1, "SOVERSION": 1, "TYPE": 1, "VERSION": 1, }, "pargs": { "flags": [ "EXPORT", "INSTALL", "INSTALL_HEADERS", "INTERNAL_FLAGS", "NOLIBS", "NONAMEPREFIX", "NOTLLKEYWORD", ], "nargs": "1+", }, }, "hpx_local_warn": {"pargs": {"nargs": 0}}, "hpx_local_setup_mpi": {"pargs": {"nargs": 0}}, "hpx_local_shorten_pseudo_target": {"pargs": {"nargs": 2}}, "hpx_local_write_config_defines_file": { "kwargs": {"FILENAME": 1, "NAMESPACE": 1, "TEMPLATE": 1}, "pargs": {"flags": [], "nargs": "*"}, }, } # Specify property tags. proptags = [] # Specify variable tags. vartags = [] # ------------------------------- # Options affecting file encoding # ------------------------------- with section("encode"): # If true, emit the unicode byte-order mark (BOM) at the start of the file emit_byteorder_mark = False # Specify the encoding of the input file. Defaults to utf-8 input_encoding = u"utf-8" # Specify the encoding of the output file. Defaults to utf-8. Note that # cmake # only claims to support utf-8 so be careful when using anything else output_encoding = u"utf-8"
def Solve(N,A): # write your code here # return your answer min_diff, res_dict = None, dict() for i in A: if i==0: return 0 sign = -1 if i<0 else 1 min_diff = i*sign if min_diff is None else min(i*sign, min_diff) if min_diff==(i*sign): if (min_diff) in res_dict: res_dict[min_diff] = i if res_dict[min_diff]<i else res_dict[min_diff] else: res_dict[min_diff] = i return res_dict[min_diff] N = int(input()) A = list(map(int,input().split())) out_ = Solve(N,A) print(out_)
def maior(* num): cont = 0 for valor in num: cont = cont + 1 if cont == 1: maiore = valor else: if valor > maiore: maiore = valor print(f'analizando os valores passados.....') print(f'{num} foram informados {len(num)} ao todo.') print(f'o maior valor informado foi {maiore}') maior(9, 74, 20, 13, 17)
#!/usr/bin/env python3 """ Settings - modfy as you like encoding_format: the encoding_format may change on different os - tested on windows exiftool_directory: put here path/to/exiftool.exe (download: https://sno.phy.queensu.ca/~phil/exiftool/) if unset is same directory as settings googlemaps_api_key: if you want to use placeinfo.py - you need a api key of google loglevel: preset is DEBUG(10) if you want printed less - set it to INFO(20) photographer: Here comes your name """ includeSubdirs = True encoding_format = "latin" image_types = (".JPG", ".jpg", ".tif", ".tiff", ".hdr", ".exr", ".ufo", ".fpx", ".RW2", ".Raw", ".gif") video_types = (".MP4", ".mp4") project_types = (".data", ".hdrProject", ".pto") hdr_program = "franzis HDR projects" panorama_program = "Hugin" photographer = None standard_camera = "" googlemaps_api_key = "" exiftool_directory = r"" loglevel = 20
num1 = int(input("Me de um número ae meu chapa\n")) num2 = int(input("Me de outro número ae meu chapa\n")) print('Soma: ', num1 + num2)
# # PySNMP MIB module ZYXEL-OUT-OF-BAND-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZYXEL-OUT-OF-BAND-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:45:06 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, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") ModuleIdentity, Counter32, Unsigned32, iso, ObjectIdentity, IpAddress, TimeTicks, Gauge32, Integer32, Bits, NotificationType, MibIdentifier, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Counter32", "Unsigned32", "iso", "ObjectIdentity", "IpAddress", "TimeTicks", "Gauge32", "Integer32", "Bits", "NotificationType", "MibIdentifier", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") esMgmt, = mibBuilder.importSymbols("ZYXEL-ES-SMI", "esMgmt") zyxelOutOfBand = ModuleIdentity((1, 3, 6, 1, 4, 1, 890, 1, 15, 3, 58)) if mibBuilder.loadTexts: zyxelOutOfBand.setLastUpdated('201207010000Z') if mibBuilder.loadTexts: zyxelOutOfBand.setOrganization('Enterprise Solution ZyXEL') zyxelOutOfBandIpSetup = MibIdentifier((1, 3, 6, 1, 4, 1, 890, 1, 15, 3, 58, 1)) zyOutOfBandIpAddress = MibScalar((1, 3, 6, 1, 4, 1, 890, 1, 15, 3, 58, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zyOutOfBandIpAddress.setStatus('current') zyOutOfBandSubnetMask = MibScalar((1, 3, 6, 1, 4, 1, 890, 1, 15, 3, 58, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zyOutOfBandSubnetMask.setStatus('current') zyOutOfBandGateway = MibScalar((1, 3, 6, 1, 4, 1, 890, 1, 15, 3, 58, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: zyOutOfBandGateway.setStatus('current') mibBuilder.exportSymbols("ZYXEL-OUT-OF-BAND-MIB", zyOutOfBandGateway=zyOutOfBandGateway, zyOutOfBandSubnetMask=zyOutOfBandSubnetMask, zyxelOutOfBand=zyxelOutOfBand, zyOutOfBandIpAddress=zyOutOfBandIpAddress, PYSNMP_MODULE_ID=zyxelOutOfBand, zyxelOutOfBandIpSetup=zyxelOutOfBandIpSetup)
""" Class description goes here. """ __author__ = 'Alex Barcelo <alex.barcelo@bsc.es>' __copyright__ = '2015 Barcelona Supercomputing Center (BSC-CNS)' class DataClaySerializable(object): __slots__ = ()
# -*- coding: utf-8 -*- YEAR_CHOICES = ( ('', '---------'), ('1', 'Freshman'), ('2', 'Sophmore'), ('3', 'Junior'), ('4', 'Senior'), ) GRADUATE_DEGREE = ( ('M.S.', 'M.S.'), ('Ph.D', 'Ph.D'), ('M.D.', 'M.D.'), ('Other', 'Other'), ) GRANTS_PROCESS_STAGES = ( ('', '---------'), ('Pre-Award (Application Process)', 'Pre-Award (Application Process)'), ( 'Post-Award (Award Acceptance/Grant Management)', 'Post-Award (Award Acceptance/Grant Management)', ), ('Both', 'Both'), ) UNDERGRADUATE_DEGREE = ( ("Bachelor's degree", "Bachelor's degree"), ("Associate's degree/certificate", "Associate's degree/certificate"), ) WSGC_SCHOOL = ( ('Alverno College', 'Alverno College'), ('Carthage College', 'Carthage College'), ('Chief Dull Knife College', 'Chief Dull Knife College'), ('College of Menominee Nation', 'College of Menominee Nation'), ('Colorado School of Mines', 'Colorado School of Mines'), ('Concordia University', 'Concordia University'), ('Lawrence University', 'Lawrence University'), ('Leech Lake Tribal College', 'Leech Lake Tribal College'), ('Little Big Horn College', 'Little Big Horn College'), ('Marquette University', 'Marquette University'), ('Medical College of Wisconsin', 'Medical College of Wisconsin'), ('Milwaukee School of Engineering', 'Milwaukee School of Engineering'), ('Moraine Park Technical College', 'Moraine Park Technical College'), ('Northern Arizona University', 'Northern Arizona University'), ('Northwest Indian College', 'Northwest Indian College'), ('Ripon College', 'Ripon College'), ('St. Norbert College', 'St. Norbert College'), ('Turtle Mountain Community College', 'Turtle Mountain Community College'), ('University of Alaska-Fairbanks', 'University of Alaska-Fairbanks'), ('University of California-Los Angeles', 'University of California-Los Angeles'), ('UW Fox Valley', 'UW Fox Valley'), ('UW Green Bay', 'UW Green Bay'), ('UW LaCrosse', 'UW LaCrosse'), ('UW Madison', 'UW Madison'), ('UW Milwaukee', 'UW Milwaukee'), ('UW Oshkosh', 'UW Oshkosh'), ('UW Parkside', 'UW Parkside'), ('UW Platteville', 'UW Platteville'), ('UW River Falls', 'UW River Falls'), ('UW Sheboygan', 'UW Sheboygan'), ('UW Stevens Point', 'UW Stevens Point'), ('UW Stout', 'UW Stout'), ('UW Superior', 'UW Superior'), ('UW Washington County', 'UW Washington County'), ('UW Whitewater', 'UW Whitewater'), ('Utah State University-Eastern Blanding', 'Utah State University-Eastern Blanding'), ('Western Technical College', 'Western Technical College'), ('Wisconsin Lutheran College', 'Wisconsin Lutheran College'), ('Other', 'Other'), ) MAJORS = ( ('Aeronautical Engineering', 'Aeronautical Engineering'), ('Aerospace Engineering', 'Aerospace Engineering'), ('Applied Physics', 'Applied Physics'), ('Astronomy', 'Astronomy'), ('Astrophysics', 'Astrophysics'), ('Atmoshperic Sciences', 'Atmoshperic Sciences'), ('Biochemistry', 'Biochemistry'), ('Biology', 'Biology'), ('Biomedical Engineering', 'Biomedical Engineering'), ('Biomedical Science', 'Biomedical Science'), ('Biophysics', 'Biophysics'), ('Biotechnology', 'Biotechnology'), ('Chemical Engineering', 'Chemical Engineering'), ('Chemistry', 'Chemistry'), ('Civil Engineering', 'Civil Engineering'), ('Computer Engineering', 'Computer Engineering'), ('Computer Science', 'Computer Science'), ('Electrical Engineering', 'Electrical Engineering'), ('Environmental Science', 'Environmental Science'), ('Environmental Studies', 'Environmental Studies'), ('Geography', 'Geography'), ('Geology', 'Geology'), ('Geophysics', 'Geophysics'), ('Geoscience', 'Geoscience'), ('Industrial Engineering', 'Industrial Engineering'), ('Kinesiology', 'Kinesiology'), ('Mathematics', 'Mathematics'), ('Mechanical Engineering', 'Mechanical Engineering'), ('Meteorology', 'Meteorology'), ('Microbiology', 'Microbiology'), ('Molecular and Cell Biology', 'Molecular and Cell Biology'), ( 'Molecular and Environmental Plant Science', 'Molecular and Environmental Plant Science', ), ('Neuroscience', 'Neuroscience'), ('Nuclear Engineering', 'Nuclear Engineering'), ('Oceanography', 'Oceanography'), ('Other', 'Other'), ('Physics', 'Physics'), ('Statistics', 'Statistics'), ('Systems Engineering', 'Systems Engineering'), ) PROGRAM_CHOICES = ( ('AerospaceOutreach', 'Aerospace Outreach'), ('ClarkGraduateFellowship', 'Dr. Laurel Salton Clark Memorial Research Fellowship'), ('CollegiateRocketCompetition', 'Collegiate Rocket Competition'), ('EarlyStageInvestigator', 'Early-Stage Investigator'), ('FirstNationsRocketCompetition', 'First Nations Rocket Competition'), ('GraduateFellowship', 'WSGC Graduate and Professional Research Fellowship'), ('HighAltitudeBalloonLaunch', 'High Altitude Balloon Launch'), ('HighAltitudeBalloonPayload', 'High Altitude Balloon Payload'), ('HigherEducationInitiatives', 'Higher Education Initiatives'), ('IndustryInternship', 'Industry Internship'), ('MidwestHighPoweredRocketCompetition', 'Midwest High Powered Rocket Competition'), ('NasaCompetition', 'NASA Competition'), ('ProfessionalProgramStudent', 'Professional Program Student'), ('ResearchInfrastructure', 'Research Infrastructure'), ('RocketLaunchTeam', 'Rocket Launch Team'), ('SpecialInitiatives', 'Special Initiatives'), ('StemBridgeScholarship', 'STEM Bridge Scholarship'), ('UndergraduateResearch', 'Undergraduate Research Fellowship'), ('UndergraduateScholarship', 'Undergraduate Scholarship'), ( 'UnmannedAerialVehiclesResearchScholarship', 'Unmanned Aerial Vehicles Research Scholarship', ), ('WomenInAviationScholarship', 'Women in Aviation Scholarship'), )
legacy_dummy_settings = { "name": "Rosalind Franklin", "version": 42, "steps_per_mm": "M92 X80.00 Y80.00 Z400 A400 B768 C768", "gantry_steps_per_mm": {"X": 80.00, "Y": 80.00, "Z": 400, "A": 400}, "acceleration": {"X": 3, "Y": 2, "Z": 15, "A": 15, "B": 2, "C": 2}, "z_retract_distance": 2, "tip_length": 999, "left_mount_offset": [-34, 0, 0], "serial_speed": 888, "default_current": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, "low_current": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, "high_current": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, "default_max_speed": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, "default_pipette_configs": { "homePosition": 220, "maxTravel": 30, "stepsPerMM": 768, }, "log_level": "NADA", } migrated_dummy_settings = { "name": "Rosalind Franklin", "version": 4, "gantry_steps_per_mm": {"X": 80.0, "Y": 80.0, "Z": 400.0, "A": 400.0}, "acceleration": {"X": 3, "Y": 2, "Z": 15, "A": 15, "B": 2, "C": 2}, "z_retract_distance": 2, "left_mount_offset": [-34, 0, 0], "serial_speed": 888, "default_current": { "default": {"X": 1.25, "Y": 1.25, "Z": 0.5, "A": 0.5, "B": 0.05, "C": 0.05}, "2.1": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, }, "low_current": { "default": {"X": 0.7, "Y": 0.7, "Z": 0.1, "A": 0.1, "B": 0.05, "C": 0.05}, "2.1": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, }, "high_current": { "default": {"X": 1.25, "Y": 1.25, "Z": 0.5, "A": 0.5, "B": 0.05, "C": 0.05}, "2.1": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, }, "default_max_speed": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, "default_pipette_configs": { "homePosition": 220, "maxTravel": 30, "stepsPerMM": 768, }, "log_level": "NADA", } new_dummy_settings = { "name": "Marie Curie", "version": 4, "gantry_steps_per_mm": {"X": 80.0, "Y": 80.0, "Z": 400.0, "A": 400.0}, "acceleration": {"X": 3, "Y": 2, "Z": 15, "A": 15, "B": 2, "C": 2}, "z_retract_distance": 2, "left_mount_offset": [-34, 0, 0], "serial_speed": 888, "default_current": { "default": {"X": 1.25, "Y": 1.25, "Z": 0.8, "A": 0.8, "B": 0.05, "C": 0.05}, "2.1": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, }, "low_current": { "default": {"X": 0.7, "Y": 0.7, "Z": 0.7, "A": 0.7, "B": 0.7, "C": 0.7}, "2.1": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, }, "high_current": { "default": {"X": 0.7, "Y": 0.7, "Z": 0.7, "A": 0.7, "B": 0.7, "C": 0.7}, "2.1": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, }, "default_max_speed": {"X": 1, "Y": 2, "Z": 3, "A": 4, "B": 5, "C": 6}, "default_pipette_configs": { "homePosition": 220, "maxTravel": 30, "stepsPerMM": 768, }, "log_level": "NADA", }
#!/usr/bin/env python # -*- coding: utf-8 -*- # LeetCode 1832. Check if the Sentence Is Pangram # https://leetcode.com/problems/check-if-the-sentence-is-pangram/ class CheckIfTheSentenceIsPangram: def checkIfPangram(self, sentence: str) -> bool: return len(set(sentence)) == 26 if __name__ == "__main__": pass # EOF
#TODO: Complete os espaços em branco com uma solução possível n = int(input()) for i in range(n): num = int(input()) sum = 0 for j in range(1, (num+1)): if num%j == 0: sum += 1 if sum != (2): print( '{} nao eh primo'.format(num)) else: print( '{} eh primo'.format(num))
x = int(input('Digite o primeiro lado do triangulo: ')) y = int(input('Digite o segundo lado do triangulo: ')) z = int(input('Digite o terceiro lado do triangulo: ')) if x >= y + z or y >= z + x or z >= x + y: print('Não é um triangulo!') else: print('É um triangulo.') if x == y and x == z: print('É um triangulo equilatero.') if x == y or x == z or y == z: print('É um triangulo isosceles.')
#!/usr/bin/env python # Justin's shot at optimizing QAOA parameters def optimize_obj(obj_val, params=None): beta = 0.5 gamma = 0.7 return ( beta, gamma, obj_val(beta, gamma) ) # return some optimization trace. It will eventually go into optimize.optimize_modularity, so it should at least contain optimal angles
__title__ = 'evernote2' __description__ = 'another Evernote SDK for Python' __url__ = 'https://github.com/JackonYang/evernote2' __version__ = '1.0.0' # __build__ = 0x022500 __author__ = 'Jackon Yang' __author_email__ = 'i@jackon.me' __license__ = 'BSD' __copyright__ = 'Copyright 2020 Jackon Yang'
lw = np.linspace(.5, 15, 8) for i in xrange(8): plt.plot(x, i*y, colors[i], linewidth=lw[i]) plt.ylim([-1, 8]) plt.show()
# -*- coding: utf-8 -*- def main(): a = int(input()) b = int(input()) c = int(input()) d = int(input()) diff = a * b - c * d print('DIFERENCA =', diff) if __name__ == '__main__': main()
list_sv = { "A1": {"masv":"2017603001","name":"Hoang Xuan Thai","lop":"CNTT3","khoa":"12","vt":'A1',"check":"0"}, "A2": {"masv":"2017603002","name":"Tran Van Son","lop":"CNTT3","khoa":"12","vt":'A2',"check":"0"}, "A3": {"masv":"2017603003","name":"Doan Phung Tu","lop":"CNTT3","khoa":"12","vt":'A3',"check":"0"}, "A4": {"masv":"2017603004","name":"Trinh Van Quyen","lop":"CNTT3","khoa":"12","vt":'A4',"check":"0"}, "A5": {"masv":"2017603005","name":"Nguyen Duy Nghia","lop":"CNTT3","khoa":"12","vt":'A5',"check":"0"}, "A6": {"masv":"2017603006","name":"Ta Quang Truong","lop":"CNTT3","khoa":"12","vt":'A6',"check":"0"}, "A7": {"masv":"2017603007","name":"Nguyen Thanh Tung","lop":"CNTT3","khoa":"12","vt":'A7',"check":"0"}, "A8": {"masv":"2017603008","name":"Hoang Thi Bich Ngoc","lop":"CNTT3","khoa":"12","vt":'A8',"check":"0"}, "A9": {"masv":"2017603009","name":"Nguyen Đuc Linh","lop":"CNTT3","khoa":"12","vt":'A9',"check":"0"}, "A10": {"masv":"2017603010","name":"Luu Quang Nghia","lop":"CNTT3","khoa":"12","vt":'A10',"check":"0"}, "B1": {"masv":"2017603011","name":"Phan Thanh Trung","lop":"CNTT3","khoa":"12","vt":'B1',"check":"0"}, "B2": {"masv":"2017603012","name":"Nguyen Trung Hai","lop":"CNTT3","khoa":"12","vt":'B2',"check":"0"}, "B3": {"masv":"2017603013","name":"Pham Thi Hai Yen","lop":"CNTT3","khoa":"12","vt":'B3',"check":"0"}, "B4": {"masv":"2017603014","name":"Pham Linh Linh","lop":"CNTT3","khoa":"12","vt":'B4',"check":"0"}, "B5": {"masv":"2017603015","name":"Nguyen Anh Tu","lop":"CNTT3","khoa":"12","vt":'B5',"check":"0"}, "B6": {"masv":"2017603016","name":"Nguyen Thanh Tung","lop":"CNTT3","khoa":"12","vt":'B6',"check":"0"}, "B7": {"masv":"2017603017","name":"Hoang Thu Trang","lop":"CNTT3","khoa":"12","vt":'B7',"check":"0"}, "B8": {"masv":"2017603018","name":"Tran Hong Phi","lop":"CNTT3","khoa":"12","vt":'B8',"check":"0"}, "B9": {"masv":"2017603019","name":"Đao Thu Hoai","lop":"CNTT3","khoa":"12","vt":'B9',"check":"0"}, "B10": {"masv":"2017603020","name":"Nguyen Quoc Tuan","lop":"CNTT3","khoa":"12","vt":'B10',"check":"0"}, "C1": {"masv":"2017603021","name":"Dinh Trong Luan","lop":"CNTT3","khoa":"12","vt":'C1',"check":"0"}, "C2": {"masv":"2017603022","name":"Vu Thi Nghia","lop":"CNTT3","khoa":"12","vt":'C2',"check":"0"}, "C3": {"masv":"2017603023","name":"Hoang Duy Manh","lop":"CNTT3","khoa":"12","vt":'C3',"check":"0"}, "C4": {"masv":"2017603024","name":"Pham Hong Thai","lop":"CNTT3","khoa":"12","vt":'C4',"check":"0"}, "C5": {"masv":"2017603025","name":"Nguyen Thuy Linh","lop":"CNTT3","khoa":"12","vt":'C5',"check":"0"}, "C6": {"masv":"2017603026","name":"Phan Tuan Minh","lop":"CNTT3","khoa":"12","vt":'C6',"check":"0"}, "C7": {"masv":"2017603027","name":"Nguyen Thi Thuy","lop":"CNTT3","khoa":"12","vt":'C7',"check":"0"}, "C8": {"masv":"2017603028","name":"Khong Thi Nhung","lop":"CNTT3","khoa":"12","vt":'C8',"check":"0"}, "C9": {"masv":"2017603029","name":"Bui Tat Trung","lop":"CNTT3","khoa":"12","vt":'C9',"check":"0"}, "C10": {"masv":"2017603030","name":"Le Van Nam","lop":"CNTT3","khoa":"12","vt":'C10',"check":"0"} } encoding = [] name =[] def getlistsv(): l = [] for values in list_sv.values(): l.append(values) return l def getlistsv_train(): return list_sv def setlistsv(data={}): list_sv = data
class Solution: # Optimised Row by Row (Accepted), O(n) time and space, where n = total elems in pascal triangle def generate(self, numRows: int) -> List[List[int]]: n, res = 1, [[1]] while n < numRows: n += 1 l = [1]*n for i in range((n-1)//2): l[i+1] = l[n-2-i] = res[n-2][i] + res[n-2][i+1] res.append(l) return res # Map (Top Voted), O(n) time and space def generate(self, numRows): res = [[1]] for i in range(1, numRows): res.append( list(map(lambda x, y: x+y, res[-1] + [0], [0] + res[-1]))) return res # 4 Liner (Top Voted), O(n) time and space def generate(self, numRows): pascal = [[1]*(i+1) for i in range(numRows)] for i in range(numRows): for j in range(1, i): pascal[i][j] = pascal[i-1][j-1] + pascal[i-1][j] return pascal