content
stringlengths
7
1.05M
def get_landscape(region): """Takes the region and returns the correct landscape name Args: region (str): a AWS region name, such as 'eu-west-1' Returns: String """ return { 'us-east-1': 'na', 'eu-central-1': 'eu', 'eu-west-1': 'uk' }.get(region, 'eu') def get_environment(env): return { 'prod': 'production', 'preprod': 'preprod', 'production': 'production' }.get(env, 'preprod')
def line(a, b): def para(x): return a * x + b return para def count(x=0): def incre(): nonlocal x x += 1 return x return incre def my_avg(): data = list() def add(num): data.append(num) return sum(data)/len(data) return add if __name__ == '__main__': line1 = line(-2, 1) line2 = line(3, 6) c1 = count(5) c2 = count(50) avg = my_avg() print([line1(x) for x in range(-10, 10)]) print([line2(x) for x in range(-10, 10)]) for i in range(20): print(c1(), end=" ") print(c2(), end=" ") print(avg(line2(i)))
class Solution: def monotoneIncreasingDigits(self, n: int) -> int: if n < 10: return n break_point = None digits = [int(el) for el in str(n)] for i in range(len(digits) - 1): if digits[i] > digits[i + 1]: break_point = i break if break_point is None: return n # if break point is in a consecutive series of numbers, move it to the # index of first element of the abovesaid series of numbers while i > 0 and digits[i] == digits[i - 1]: break_point -= 1 i -= 1 digits[break_point] -= 1 digits[break_point + 1:] = [9] * (len(digits) - break_point - 1) return int("".join(map(str, digits)))
"""Class for handling strings""" def str2bin(msg): """Convert a binary string into a 16 bit binary message.""" assert isinstance(msg, bytes), 'must give a byte obj' return ''.join([bin(c)[2:].zfill(16) for c in msg]).encode() def bin2str(binary): """Convert biary 16 bit binary message into a string of chars.""" assert isinstance(binary, bytes), 'must give a byte obj' assert len(binary) % 16 == 0, 'must have 16 bit valuess' return ''.join([chr(int(binary[n: n+16], 2)) for n in range(0, len(binary), 16)]).encode()
""" Представлен список чисел. Определить элементы списка, не имеющие повторений. Сформировать итоговый массив чисел, соответствующих требованию. Элементы вывести в порядке их следования в исходном списке. Для выполнения задания обязательно использовать генератор. Пример исходного списка: [2, 2, 2, 7, 23, 1, 44, 44, 3, 2, 10, 7, 4, 11]. Результат: [23, 1, 3, 10, 4, 11] """ user_list = [2, 2, 2, 7, 23, 1, 44, 44, 3, 2, 10, 7, 4, 11] result_list = [el for el in user_list if user_list.count(el) == 1] print(result_list)
# -*- coding:utf-8 -*- # author: exchris # description: 今日头条文章python面试必考题(未知) # 下面这段代码的输出结果是什么 def extendList(val, lst=[]): lst.append(val) return lst list1 = extendList(10) list2 = extendList(123,[]) list3 = extendList('a') """ print("list1 = %s" % list1) print("list2 = %s" % list2) print("list3 = %s" % list3) 输出结果: list1 = [10,'a'] list2 = [123] list3 = [10, 'a'] """
begin = """#include "riscv_test.h" RVTEST_CODE_BEGIN """ middle = """ RVTEST_PASS RVTEST_CODE_END .data RVTEST_DATA_BEGIN""" end = """RVTEST_DATA_END""" put_str = """la a1, str{} jal put_str la a1, str_crlf jal put_str """ dot_string = '''str{}: .string "{:x}"''' num = 10 print(begin) for i in range(num): print(put_str.format(i)) print(middle) for i in range(num): print(dot_string.format(i, i)) print(end)
crypt_words = input().split() for word in crypt_words: first_number = "" second_part = "" for letter in word: if 48 <= ord(letter) <= 57: first_number += letter else: second_part += letter first_letter = chr(int(first_number)) half = first_letter + second_part current_list = [value for index, value in enumerate(half)] current_list[1], current_list[-1] = current_list[-1], current_list[1] print(''.join(current_list), end=" ")
# 🚨 Don't change the code below 👇 two_digit_number = input("Type a two digit number: ") # 🚨 Don't change the code above 👆 #################################### #Write your code below this line 👇 a = int(two_digit_number[0]) b = int(two_digit_number[1]) print(a+b)
class ExportBase: """ Base class to be inherited from other modules to export from the online model. It just provides that in writeLine of LineContainer Module always an event handler function is called """ def __init__(self): self.switch = 0 self.path = '' self.avoidPreset = 0 self.MapIndx = [] self.MapIndxSave = [] def isType(self, key): return 0 def demandMapID(self): return 0 def writeLine(self, line, seq): return def writeDrift(self, ele): return def writeVacuum(self, ele): self.writeMarker(ele) return def writeAlignment(self, ele): self.writeMarker(ele) return def writeBend(self, ele): return def writeQuadrupole(self, ele): return def writeCorrector(self, ele): return def writeSextupole(self, ele): return def writeRF(self, ele): return def writeUndulator(self, ele): return def writeDiagnostic(self, ele): return def writeMarker(self, ele): return def writeSolenoid(self, ele): return def writeDechirper(self,ele): return
PDAC_MODES = { "debug" : { "session-id" : "debug", "sources" : { "audio" : { "active" : False }, "video" : { "active" : True }, "heartrate" : { "active" : False }, }, "inference" : None, "transform" : False, "sinks" : { "rstp" : { "active" : True }, "file" : { "active" : False }, "window" : { "active" : False }, } }, "rtsp-only" : { "session-id" : "live", "sources" : { "audio" : { "active" : False }, "video" : { "active" : True }, "heartrate" : { "active" : False }, }, "inference" : None, "transform" : False, "sinks" : { "rstp" : { "active" : True }, "file" : { "active" : False }, "window" : { "active" : False }, } }, "face-extraction-rtsp" : { "session-id" : "face-extraction", "sources" : { "audio" : { "active" : False }, "video" : { "active" : True }, "heartrate" : { "active" : False }, }, "inference" : "face-extraction", "transform" : True, "sinks" : { "rstp" : { "active" : True }, "file" : { "active" : False }, "window" : { "active" : False }, } }, "pose-detection-rtsp" : { "session-id" : "pose-detection", "sources" : { "audio" : { "active" : False }, "video" : { "active" : True }, "heartrate" : { "active" : False }, }, "inference" : "pose-detection", "transform" : None, "sinks" : { "rstp" : { "active" : True }, "file" : { "active" : False }, "window" : { "active" : False }, } } }
# error lib? def typeError(expected, value): raise TypeError('expected \n |> %s \n but found \n |> %s' % (expected, type(value)))
n = int(input()) ar = list(map(int, input().split())) print(ar.count(max(ar)))
def main(): name = "John Doe" age = 40 print("The user's name is", name, "and his/her age is", age, end=".\n") print("Next year he/she will be", age+1, "years old.", end="\n\n") print("The characters of the user's name are:") for i in range(len(name)): print(name[i].upper(), end=" ") print("\nand the squared age is", age**2) print("\nIf we replace the user's character O by A we get", name.upper().replace("O","A")) if __name__ == '__main__': main()
a = input() b = int(input()) def calculate_price(product, qty): PRICE_LIST = { "coffee": 1.50, "water": 1.00, "coke": 1.40, "snacks": 2.00 } return '{:.2f}'.format(PRICE_LIST[product] * qty) print(calculate_price(a, b))
class JsonRPCError(Exception): def __init__(self, request_id, code, message, data, is_notification=False): super().__init__(message) self.request_id = request_id self.code = code self.message = message self.data = data self.is_notification = is_notification def format(self, request=None): if request: if 'id' not in request: self.is_notification = True else: self.request_id = request['id'] # if the request was a notification, return nothing if self.is_notification: return None return { "jsonrpc": "2.0", "error": { "code": self.code, "message": self.message, "data": self.data, }, "id": self.request_id } def __repr__(self): return "Json RPC Error ({}): {}".format(self.code, self.message) class JsonRPCInvalidParamsError(JsonRPCError): def __init__(self, *, request=None, data=None): super().__init__(request.get('id') if request else None, -32602, "Invalid params", data, 'id' not in request if request else False) class JsonRPCInternalError(JsonRPCError): def __init__(self, *, request=None, data=None): super().__init__(request.get('id') if request else None, -32603, "Internal Error", data, 'id' not in request if request else False)
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ 二叉树相关算法以及实现 一个中心,两个基本点,三种题型,四个重要概念,七个技巧。 一个中心 - 树的遍历,即将所有的节点都要访问一遍 两个基本点 - 深度优先遍历(DFS),又细分为前中后序遍历,属于盲目遍历 - 广度优先遍历(BFS),其中又分为'带层'和'不带层',核心在于求最短距离的时候可以提前终止,采用横向搜索的方式,数据结构上通常使用队列 注意:广度遍历不是层次遍历,层次遍历是一种不需要提前终止的广度遍历的副产物 三种题型 - 搜索类,数量最多,把握三个核心点,开始点,结束点,距离 - 构建类,普通二叉树的构建和二叉搜索树的构建 - 修改类, 四个重要概念 - 二叉搜索树 - 完全二叉树 - 路径 - 距离 七个技巧 - dfs(root),函数的入参都用root - 单/双递归,eg:任意节点开始xxx或所有xxx说法 - 前后遍历,二叉搜索树尽量使用中序遍历,大多数的题使用后序遍历比较简单 - 虚拟节点,当需要对树的根节点修改的时候或另一种当需要返回树中的某个非根节点 - 边界 - 参数扩展 - 返回元组/列表 树的遍历迭代写法,可以统一写法为:双色标记法 二叉树遍历的“颜色标记法”: 特点: - 兼具栈迭代方法的高效, - 像递归方法一样简洁易懂,这种方法对于前序、中序、后序遍历,能够写出完全一致的代码。 其核心思想如下: - 使用颜色标记节点的状态,新节点为白色,已访问的节点为灰色。 - 如果遇到的节点为白色,则将其标记为灰色,然后根据前序,中序,后序的顺序倒过来入栈(eg: 前序遍历的顺序为 根-左-右, 则倒过来的顺序为 右-左-根) - 如果遇到的节点为灰色,则将节点的值输出。 如要实现前序、后序遍历,只需要调整左右子节点的入栈顺序即可 """
# # Sets (kopas) # # unordered # # unique items # # use: get rid of duplicates, membership testing # # https://docs.python.org/3/tutorial/datastructures.html#sets # # https://realpython.com/python-sets/ # chars = set("abracadabra") # you pass an iterable to set(iterablehere) # print(chars) # print(len(chars)) # print('a' in chars) # set membership check will be faster than in lists and tuples # print('e' in chars) # # # # 'bl' in chars # print("".join(chars)) # so with join we will create a string from set # print(sorted("".join(chars))) # print("".join(sorted(chars))) # # # print(list(chars)) # # # # # recipe to sort characters unique characters into a list an then make a string # print("".join(sorted(set("abraValdiscadbra")))) # # str(chars) # not much point in this one # words = ['potato', 'potatoes', 'tomato', 'Valdis', 'potato'] # unique_words = set(words) # print(unique_words) # # # unique_words[1] # 'set' object is not subscriptable # # list_unique_words = list(unique_words) # # print(list_unique_words) # # # difference between set() and {setitem} # new_set = {'kartupelis'} # so not a dictionary but set # print(new_set) # food_item_set = set(['kartupelis']) # print(food_item_set) # chars = set("kartupelis") # you pass an iterable to set(iterablehere) # print(chars) # print(new_set == food_item_set) # # above two sets are equal # # food_set = set('katrupelis') # # print(food_set, sorted(food_set)) numbers = set(range(12)) print(numbers) n3_7 = set(range(3, 8)) print(n3_7) # # 4 in numbers # # 4 in n3_7 # # # below two are equal # print(n3_7.issubset(numbers)) # print(n3_7 <= numbers) # this lets you have equal sets # print(n3_7 < numbers )# this will be false if both sets are equal # # numbers <= numbers # # numbers < numbers # # # below two are euqal # # numbers.issuperset(n3_7) # # numbers >= n3_7 # # numbers > n3_7 n5_9 = set(range(5, 10)) print(n5_9) # # # below two are equal print(n3_7 | n5_9) print(n3_7.union(n5_9)) n3_9 = n3_7 | n5_9 # i could chain union more sets here print(n3_9) # # n3_7 | n5_9 | set(range(30, 35)) # # # below two are equal n5_7 = n3_7 & n5_9 print(n3_7.intersection(n5_9)) print(n5_7) n3_4 = n3_7 - n5_9 # this is not simmetrical print(n3_4) n8_9 = n5_9 - n3_7 # this is not simmetrical print(n8_9, n5_9.difference(n3_7)) # # # simmetrical difference n_sim = n3_7 ^ n5_9 print(n_sim, n3_7.symmetric_difference(n5_9)) # # n3_4.isdisjoint(n8_9) # # print(n_sim) n_sim.update([4, 1, 6, 1, 6, 13, 2]) print(n_sim) n_sim.update([-5, 5, 3, 6, 6, 8, 99, 9, 9]) print(n_sim) n_sim.remove(13) # Raises KeyError if you try to remove nonexistant value print(n_sim) n_sim.discard(13) # No error print(n_sim) new_set = n3_4 | n3_9 | set([45,7,4,7,6]) | n_sim print(new_set) unsorted_list = list(new_set) print(unsorted_list) new_list = sorted(new_set) print(new_list) # # random_pop = n_sim.pop() # # print(random_pop, n_sim) # # random_pop = n_sim.pop() # # print(random_pop, n_sim) # # n_sim.clear() # # print(n_sim) # # there is also a frozenset which is just like set, but immutable
def menu(): """ Handles the displaying of the main menu """ print('// Main Menu: ') print('1. Teams') print('2. Players') print('0. Exit') def teams_menu(): """ Handles the displaying of the teams menu """ print('// Teams Menu: ') print('1. Display basic team info') print('2. Display team\'s current active roster') print('3. Previous team game') print('4. Next team game') print('0. Return to main menu') def players_menu(): """ Handles the displaying of the players menu """ print('// Players Menu: ') print('1. Player search') print('0. Return to main menu')
largura = float(input('insira a largura da parede: ')) altura = float(input('insira a altura da parede: ')) m2 = largura * altura tinta = m2/2 print('sua parede tem dimensão de {}x{} e sua área é de {}m²'.format(largura, altura, m2)) print('para pintar sua parede você precisa de {}l de tinta'.format(tinta))
class Skill: def __init__(self, skill_data: dict): self.id = skill_data['id'] self.name = skill_data['skill_name'] self.explain = skill_data['explain'] self.en_explain = skill_data['explain_en'] self.skill_type = skill_data['skill_type'] self.judge_type = skill_data['judge_type'] self.trigger_type = skill_data['skill_trigger_type'] self.trigger_value = skill_data['skill_trigger_value'] self.cutin_type = skill_data['cutin_type'] self.condition = skill_data['condition'] self.value = skill_data['value'] self.value_2 = skill_data['value_2'] self.max_chance = skill_data['max_chance'] self.max_duration = skill_data['max_duration'] self.skill_type_id = skill_data['skill_type_id'] self.effect_length = skill_data['effect_length'] self.proc_chance = skill_data['proc_chance'] class LeadSkill: def __init__(self, skill_data: dict): self.id = skill_data['id'] self.name = skill_data['name'] self.explain = skill_data['explain'] self.en_explain = skill_data['explain_en'] self.type = skill_data['type'] self.need_cute = bool(skill_data['need_cute']) self.need_cool = bool(skill_data['need_cool']) self.need_passion = bool(skill_data['need_passion']) self.target_attribute = skill_data['target_attribute'] self.target_attribute_2 = skill_data['target_attribute_2'] self.target_param = skill_data['target_param'] self.target_param_2 = skill_data['target_param_2'] self.up_type = skill_data['up_type'] self.up_type_2 = skill_data['up_type_2'] self.up_value = skill_data['up_value'] self.up_value_2 = skill_data['up_value_2'] self.special_id = skill_data['special_id'] self.need_chara = skill_data['need_chara']
#!/usr/bin/env python # -*- coding: utf-8 -*- spinMultiplicity = 2 energy = { 'BMK/cbsb7': GaussianLog('CH3bmk.log'), 'CCSD(T)-F12/cc-pVTZ-F12': MolproLog('CH3bmk_f12.out'), } frequencies = GaussianLog('CH3bmkfreq.log') rotors = []
#!/usr/bin/env python3 # set Blinkt! brightness, IT BURNS MEEEEEE, 100 is the max BRIGHTNESS = 10 # define colour values for Blinkt! LEDs. Edit as you please... COLOUR_MAP = { 'level6': { 'r': 155, 'g': 0, 'b': 200, 'name': 'magenta' }, 'level5': { 'r': 255, 'g': 0, 'b': 0, 'name': 'red' }, 'level4': { 'r': 255, 'g': 30, 'b': 0, 'name': 'orange' }, 'level3': { 'r': 180, 'g': 100, 'b': 0, 'name': 'yellow' }, 'level2': { 'r': 0, 'g': 255, 'b': 0, 'name': 'green' }, 'level1': { 'r': 0, 'g': 160, 'b': 180, 'name': 'cyan' }, 'plunge': { 'r': 0, 'g': 0, 'b': 255, 'name': 'blue' }, } def price_to_colour(price: float) -> str: """edit this function to change price thresholds - be careful that you don't leave gaps in the numbers or strange things will very likely happen. prices are including VAT in p/kWh""" if price > 28: pixel_colour = 'level6' elif 28 >= price > 17: pixel_colour = 'level5' elif 17 >= price > 13.5: pixel_colour = 'level4' elif 13.5 >= price > 10: pixel_colour = 'level3' elif 10 >= price > 5: pixel_colour = 'level2' elif 5 >= price > 0: pixel_colour = 'level1' elif price <= 0: pixel_colour = 'plunge' else: raise SystemExit("Can't continue - price of " + str(price) +" doesn't make sense.") return pixel_colour
# -*- coding: utf-8 -*- DESC = "faceid-2018-03-01" INFO = { "GetDetectInfo": { "params": [ { "name": "BizToken", "desc": "人脸核身流程的标识,调用DetectAuth接口时生成。" }, { "name": "RuleId", "desc": "用于细分客户使用场景,由腾讯侧在线下对接时分配。" }, { "name": "InfoType", "desc": "指定拉取的结果信息,取值(0:全部;1:文本类;2:身份证正反面;3:视频最佳截图照片;4:视频)。\n如 134表示拉取文本类、视频最佳截图照片、视频。" } ], "desc": "完成验证后,用BizToken调用本接口获取结果信息,BizToken生成后三天内(3\\*24\\*3,600秒)可多次拉取。" }, "GetLiveCode": { "params": [], "desc": "使用数字活体检测模式前,需调用本接口获取数字验证码。" }, "GetActionSequence": { "params": [], "desc": "使用动作活体检测模式前,需调用本接口获取动作顺序。" }, "LivenessCompare": { "params": [ { "name": "ImageBase64", "desc": "用于人脸比对的照片,图片的BASE64值;\nBASE64编码后的图片数据大小不超过3M,仅支持jpg、png格式。" }, { "name": "VideoBase64", "desc": "用于活体检测的视频,视频的BASE64值;\nBASE64编码后的大小不超过5M,支持mp4、avi、flv格式。" }, { "name": "LivenessType", "desc": "活体检测类型,取值:LIP/ACTION/SILENT。\nLIP为数字模式,ACTION为动作模式,SILENT为静默模式,三种模式选择一种传入。" }, { "name": "ValidateData", "desc": "数字模式传参:数字验证码(1234),需先调用接口获取数字验证码;\n动作模式传参:传动作顺序(2,1 or 1,2),需先调用接口获取动作顺序;\n静默模式传参:空。" }, { "name": "Optional", "desc": "本接口不需要传递此参数。" } ], "desc": "传入视频和照片,先判断视频中是否为真人,判断为真人后,再判断该视频中的人与上传照片是否属于同一个人。" }, "BankCardVerification": { "params": [ { "name": "IdCard", "desc": "身份证号" }, { "name": "Name", "desc": "姓名" }, { "name": "BankCard", "desc": "银行卡" } ], "desc": "银行卡核验" }, "LivenessRecognition": { "params": [ { "name": "IdCard", "desc": "身份证号" }, { "name": "Name", "desc": "姓名。中文请使用UTF-8编码。" }, { "name": "VideoBase64", "desc": "用于活体检测的视频,视频的BASE64值;\nBASE64编码后的大小不超过5M,支持mp4、avi、flv格式。" }, { "name": "LivenessType", "desc": "活体检测类型,取值:LIP/ACTION/SILENT。\nLIP为数字模式,ACTION为动作模式,SILENT为静默模式,三种模式选择一种传入。" }, { "name": "ValidateData", "desc": "数字模式传参:数字验证码(1234),需先调用接口获取数字验证码;\n动作模式传参:传动作顺序(2,1 or 1,2),需先调用接口获取动作顺序;\n静默模式传参:空。" }, { "name": "Optional", "desc": "本接口不需要传递此参数。" } ], "desc": "传入视频和身份信息,先判断视频中是否为真人,判断为真人后,再判断该视频中的人与公安权威库的证件照是否属于同一个人。" }, "IdCardVerification": { "params": [ { "name": "IdCard", "desc": "身份证号" }, { "name": "Name", "desc": "姓名" } ], "desc": "传入姓名和身份证号,校验两者的真实性和一致性。" }, "ImageRecognition": { "params": [ { "name": "IdCard", "desc": "身份证号" }, { "name": "Name", "desc": "姓名。中文请使用UTF-8编码。" }, { "name": "ImageBase64", "desc": "用于人脸比对的照片,图片的BASE64值;\nBASE64编码后的图片数据大小不超过3M,仅支持jpg、png格式。" }, { "name": "Optional", "desc": "本接口不需要传递此参数。" } ], "desc": "传入照片和身份信息,判断该照片与公安权威库的证件照是否属于同一个人。" }, "DetectAuth": { "params": [ { "name": "RuleId", "desc": "用于细分客户使用场景,由腾讯侧在线下对接时分配。" }, { "name": "TerminalType", "desc": "本接口不需要传递此参数。" }, { "name": "IdCard", "desc": "身份标识(与公安权威库比对时必须是身份证号)。\n规则:a-zA-Z0-9组合。最长长度32位。" }, { "name": "Name", "desc": "姓名。最长长度32位。中文请使用UTF-8编码。" }, { "name": "RedirectUrl", "desc": "认证结束后重定向的回调链接地址。最长长度1024位。" }, { "name": "Extra", "desc": "透传字段,在获取验证结果时返回。" }, { "name": "ImageBase64", "desc": "用于人脸比对的照片,图片的BASE64值;\nBASE64编码后的图片数据大小不超过3M,仅支持jpg、png格式。" } ], "desc": "每次开始核身前,需先调用本接口获取BizToken,用来串联核身流程,在核身完成后,用于获取验证结果信息。" } }
class Solution: def largestRectangleArea(self, heights: list[int]) -> int: heights.append(0) stack: list[int] = [-1] ans = 0 for i, h in enumerate(heights): while stack and h <= heights[stack[-1]]: curH = heights[stack.pop()] if not stack: break curW = i-stack[-1]-1 ans = max(ans, curW*curH) stack.append(i) return ans
# Problem: Decode Ways # Difficulty: Medium # Category: String, DP # Leetcode 91: https://leetcode.com/problems/decode-ways/discuss/ """ A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number of ways to decode it. For example, Given encoded message "12", it could be decoded as "AB" (1 2) or "L" (12). The number of ways decoding "12" is 2. """ class Solution(object): def decode(self, s): if not s or len(s) == 0: return 0 dp = [0 for i in range(len(s) + 1)] dp[0] = 1 for i in range(1, len(s)+1): if s[i - 1] != '0': dp[i] += dp[i - 1] if i > 1 and s[i - 2:i] < '27' and s[i-2:i] > '09': dp[i] += dp[i - 2] return dp[-1] obj = Solution() s1 = '12' print(obj.decode(s1))
def solve(x: int) -> int: x = y # err z = x + 1 return y # err
number = int(input()) counter = int(input()) number_add = number list_numbers = [number] for i in range(counter - 1): number_add += number list_numbers.append(number_add) print(list_numbers)
# range pode receber até 3 parâmetros # Apenas 1 parâmetro diz que a variável vai de 0 até o valor estipulado (-1) arr1 = range(5) # 0, 1, 2, 3, 4 # Se utilizar dois argumentos, o primeiro será o início e o segundo o fim do arranjo arr2 = range(2, 6) # 2, 3, 4, 5 # O terceiro argumento é o espaçamento do arranjo arr3 = range(1, 8, 2) # 1, 3, 5, 7 arr4 = range(5, 0, -1) # 5, 4, 3, 2, 1 # Retorna o valor da variável print(arr1, arr2, arr3, arr4) # range(0, 5) range(2, 6) range(1, 8, 2) range(5, 0, -1) # Retorna o tipo print(type(arr1)) # <class 'range'>
# Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. # Example 1: # Input: "Let's take LeetCode contest" # Output: "s'teL ekat edoCteeL tsetnoc" class Solution(object): def reverseWords(self, s): """ :type s: str :rtype: str """ list1 = [word[::-1] for word in s.split(' ')] return ' '.join(list1)
def plot_data(data, ax, keys=None, width=0.5, colors=None): if keys is None: keys = ['Latent Test error', 'Test Information Loss'] if colors is None: colors = ['blue', 'red'] for i, entry in enumerate(data): h1 = entry[keys[0]] h2 = h1 + entry[keys[1]] ax.fill_between([i - width / 2.0, i + width / 2.0], [0, 0], [h1] * 2, label=keys[0] if i == 0 else None, color=colors[0]) ax.fill_between([i - width / 2.0, i + width / 2.0], [h1] * 2, [h2] * 2, label=keys[1] if i == 0 else None, color=colors[1]) ax.set_ylim(0) ax.set_xticks(range(len(data))) ax.set_xticklabels([entry['Model'] for entry in data], rotation=90) ax.set_xlim(-1, 10) ax.set_ylabel('Test error', size=15) ax.legend()
#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # # Constants for MIDI notes. # # For example: # F# in Octave 3: O3.Fs # C# in Octave -2: On2.Cs # D-flat in Octave 1: O1.Db # D in Octave 0: O0.D # E in Octave 2: O2.E class Octave: def __init__(self, base): self.C = base self.Cs = base + 1 self.Db = base + 1 self.D = base + 2 self.Ds = base + 3 self.Eb = base + 3 self.E = base + 4 self.F = base + 5 self.Fs = base + 6 self.Gb = base + 6 self.G = base + 7 self.Gs = base + 8 self.Ab = base + 8 self.A = base + 9 self.As = base + 10 self.Bb = base + 10 self.B = base + 11 On5 = Octave(0) # Octave -5 On4 = Octave(12) # Octave -4 On3 = Octave(24) # Octave -3 On2 = Octave(36) # Octave -2 On1 = Octave(48) # Octave -1 O0 = Octave(60) # Octave 0 O1 = Octave(72) # Octave 1 O2 = Octave(84) # Octave 2 O3 = Octave(96) # Octave 3 O4 = Octave(108) # Octave 4 O5 = Octave(120) # Octave 5 # Given a MIDI note number, return a note definition in terms of the # constants above. def def_for_note(note): OCTAVES = [ "On5", "On4", "On3", "On2", "On1", "O0", "O1", "O2", "O3", "O4", "O5", ] NOTES = ["C", "Cs", "D", "Ds", "E", "F", "Fs", "G", "Gs", "A", "As", "B"] return "%s.%s" % (OCTAVES[note // 12], NOTES[note % 12])
class Task: def __init__(self, id, title): self.title = title self.id = id self.status = "new"
""" Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. """ sum = 0 previous = 0 current = 1 while current < 4000000: previous, current = current, current + previous if current % 2 == 0: sum += current print(sum) # Output: 4613732
a = int(input('Digite um valor: ')) b = int(input('Digite outro valor: ')) c = int(input('Digite mais um valor: ')) lixta = [a, b, c] lixta.sort() print(f'O maior valor é: {lixta[2]}') print(f'o menor valor é: {lixta[0]}')
def problem(a): try: return float(a) * 50 + 6 except ValueError: return "Error"
class AccountInfo(): def __init__(self, row_id, email, password, cookies, status_id): self.row_id = row_id self.email = email self.password = password self.cookies = cookies self.status_id = status_id def __repr__(self): return f"id: {self.row_id}, email: {self.email}, password: {self.password}, status_id: {self.status_id}"
class Solution: def twoSum(self, numbers: List[int], target: int) -> List[int]: """ Given an array of integers numbers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. Return the indices of the two numbers (1-indexed) as an integer array answer of size 2, where 1 <= answer[0] < answer[1] <= numbers.length. You may assume that each input would have exactly one solution and you may not use the same element twice. """ lo, hi = 0, len(numbers)-1 while lo<hi: sum2 = numbers[lo]+numbers[hi] if sum2==target: return [lo+1, hi+1] elif sum2<target: lo+=1 else: hi-=1
""" coding: utf-8 Created on 17/11/2020 @author: github.com/edrmonteiro From: Hackerrank challenges Language: Python Title: Sorting: Bubble Sort Consider the following version of Bubble Sort: for (int i = 0; i < n; i++) { for (int j = 0; j < n - 1; j++) { // Swap adjacent elements if they are in decreasing order if (a[j] > a[j + 1]) { swap(a[j], a[j + 1]); } } } Given an array of integers, sort the array in ascending order using the Bubble Sort algorithm above. Once sorted, print the following three lines: Array is sorted in numSwaps swaps., where is the number of swaps that took place. First Element: firstElement, where is the first element in the sorted array. Last Element: lastElement, where is the last element in the sorted array. Hint: To complete this challenge, you must add a variable that keeps a running tally of all swaps that occur during execution. For example, given a worst-case but small array to sort: we go through the following steps: swap a 0 [6,4,1] 1 [4,6,1] 2 [4,1,6] 3 [1,4,6] It took swaps to sort the array. Output would be Array is sorted in 3 swaps. First Element: 1 Last Element: 6 Function Description Complete the function countSwaps in the editor below. It should print the three lines required, then return. countSwaps has the following parameter(s): a: an array of integers . Input Format The first line contains an integer, , the size of the array . The second line contains space-separated integers . Constraints Output Format You must print the following three lines of output: Array is sorted in numSwaps swaps., where is the number of swaps that took place. First Element: firstElement, where is the first element in the sorted array. Last Element: lastElement, where is the last element in the sorted array. Sample Input 0 3 1 2 3 Sample Output 0 Array is sorted in 0 swaps. First Element: 1 Last Element: 3 Explanation 0 The array is already sorted, so swaps take place and we print the necessary three lines of output shown above. Sample Input 1 3 3 2 1 Sample Output 1 Array is sorted in 3 swaps. First Element: 1 Last Element: 3 Explanation 1 The array is not sorted, and its initial values are: . The following swaps take place: At this point the array is sorted and we print the necessary three lines of output shown above. """ def countSwaps(a): n = len(a) swaps = 0 for i in range(0, n): for j in range(0, n - 1): # Swap adjacent elements if they are in decreasing order if (a[j] > a[j + 1]): a[j], a[j + 1] = a[j + 1], a[j] swaps += 1 print("Array is sorted in", swaps, "swaps.") print("First Element:", a[0]) print("Last Element:", a[len(a) - 1]) a = [6, 4, 1] print(countSwaps(a)) stop = True
""" day7-part1.py Created on 2020-12-07 Updated on 2020-12-20 Copyright © Ryan Kan """ # INPUT rules = {} with open("input.txt", "r") as f: lines = [line.strip()[:-1] for line in f.readlines()] rawRules = [[[y.split(" ")[:-1] for y in x.split(", ")] for x in line.split(" contain ")] for line in lines] for rule in rawRules: if " ".join(rule[1][0]) == "no other": # This bag contains nothing else, so just leave its contents as an empty list bagContents = [] else: # Put the quantity and the bag type into a tuple that is in a list bagContents = [(int(x[0]), " ".join(x[1:])) for x in rule[1]] # Update what each bag type should contain rules[" ".join(rule[0][0])] = bagContents f.close() # COMPUTATION queue = ["shiny gold"] # We have a shiny gold bag canHoldShinyGoldBag = set() while len(queue) != 0: bag = queue[0] # Search through the rules to find bags that can contain the current `bag` for containerBag in rules: possibleBags = rules[containerBag] # These are the bags that are contained within the `containerBag` for possibleBag in possibleBags: if possibleBag[1] == bag: # This possible bag is the desired `bag` canHoldShinyGoldBag = canHoldShinyGoldBag.union({containerBag}) queue.append(containerBag) # Now we need to process which bags can contain the `containerBag` queue.pop(0) # Remove the first item in the queue since we just processed it # OUTPUT print(len(canHoldShinyGoldBag))
class ssdict: def __init__(self, ss, param, collectiontype): factory = { 'projects': self.getProjects, 'reviews': self.getReviews, 'items': self.getItems, 'comments': self.getComments, } func = factory[collectiontype] self.collection = func(ss, param) def getProjects(self, ss, accountid): self.intro = '\nProjects in this account:\n' return ss.getProjects(accountid)['objects'] def getReviews(self, ss, projectid): self.intro = '\nReviews in the Project Under Test:\n' return ss.get_reviews_by_project_id(projectid)['objects'] def getItems(self, ss, reviewid): self.intro = '\nItems in the Review Under Test:\n' return ss.get_media_by_review_id(reviewid)['objects'] def getComments(self, ss, itemid): self.intro = '\nComments in the Item Under Test:\n' return ss.get_annotations(itemid)['objects'] def getCatalogue(self): catalogue = self.intro for item in self.collection: catalogue +='\t' for prop in ['id','name','text']: if prop in item: catalogue += str(item[prop]) + ' ' catalogue += '\n' catalogue += '\n' return catalogue
# Preços de água para cada faixa de consumo agua_residencial_normal = {10: 2.79, 15:3.61, 20:3.92, 50:6.71, "inf": 11.86} esgoto_residencial_normal = {10: 3.09, 15:3.97, 20:4.30, 50:7.38, "inf": 13.04} def dobra(x): """ Dobra o valor da entrada Parâmetros ---------- x : número O valor a ser dobrado Retorno ------- número O dobro da entrada """ return 2*x def calc_faixas_consumo(consumo): """ Quebra um consumo total nas 5 faixas de consumo (valores inteiros) definidas pela Cagece. As faixas são: 0 < x <= 10 11 < x <= 15 15 < x <= 20 20 < x <= 50 x > 50 Parâmetros ---------- consumo : int O consumo que deve ser quebrado em faixas Retorno ------- list[int] Uma lista contendo os valores de consumo em cada faixa. """ return [0] * 5 def calc_custo_agua(consumo): """Calcula o valor a ser pago de água Parâmetros ---------- consumo : int O consumo de água em metros cúbicos (inteiros) Retorno ------- float O valor a ser pago pela água""" return 0 def calc_custo_esgoto(consumo): """ Calcula o valor a ser pago de esgoto. O consumo de esgoto em metros cúbicos é calculado como 80% do consumo de água. Após isso, o consumo é quebrado nas mesmas faixas que o consumo de água, mas os valores cobrados são diferentes. Parâmetros ---------- consumo : int O consumo de água em metros cúbicos (inteiros) Retorno ------- float O valor a ser pago pela água """ consumo_esgoto = (0.8 * consumo) return 0
# # PySNMP MIB module CISCOSB-ippreflist-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-ippreflist-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:08:08 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") ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint") switch001, = mibBuilder.importSymbols("CISCOSB-MIB", "switch001") InetVersion, InetAddressType, InetAddress, InetZoneIndex, InetAddressPrefixLength = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetVersion", "InetAddressType", "InetAddress", "InetZoneIndex", "InetAddressPrefixLength") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Integer32, TimeTicks, NotificationType, ModuleIdentity, Gauge32, Bits, IpAddress, ObjectIdentity, Counter32, iso, MibIdentifier, Unsigned32, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "TimeTicks", "NotificationType", "ModuleIdentity", "Gauge32", "Bits", "IpAddress", "ObjectIdentity", "Counter32", "iso", "MibIdentifier", "Unsigned32", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") DateAndTime, TruthValue, TimeStamp, TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "TruthValue", "TimeStamp", "TextualConvention", "DisplayString", "RowStatus") rlIpPrefList = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212)) class RlIpPrefListEntryType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("rule", 1), ("description", 2)) class RlIpPrefListActionType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("drop", 1), ("permit", 2)) class RlIpPrefListType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("ipv4", 1), ("ipv6", 2)) rlIpPrefListTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1), ) if mibBuilder.loadTexts: rlIpPrefListTable.setStatus('current') rlIpPrefListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1), ).setIndexNames((0, "CISCOSB-ippreflist-MIB", "rlIpPrefListType"), (0, "CISCOSB-ippreflist-MIB", "rlIpPrefListName"), (0, "CISCOSB-ippreflist-MIB", "rlIpPrefListEntryIndex")) if mibBuilder.loadTexts: rlIpPrefListEntry.setStatus('current') rlIpPrefListType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 1), RlIpPrefListType()) if mibBuilder.loadTexts: rlIpPrefListType.setStatus('current') rlIpPrefListName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))) if mibBuilder.loadTexts: rlIpPrefListName.setStatus('current') rlIpPrefListEntryIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967294))) if mibBuilder.loadTexts: rlIpPrefListEntryIndex.setStatus('current') rlIpPrefListEntryType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 4), RlIpPrefListEntryType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListEntryType.setStatus('current') rlIpPrefListInetAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 5), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListInetAddrType.setStatus('current') rlIpPrefListInetAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 6), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListInetAddr.setStatus('current') rlIpPrefListPrefixLength = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListPrefixLength.setStatus('current') rlIpPrefListAction = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 8), RlIpPrefListActionType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListAction.setStatus('current') rlIpPrefListGeLength = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListGeLength.setStatus('current') rlIpPrefListLeLength = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListLeLength.setStatus('current') rlIpPrefListDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListDescription.setStatus('current') rlIpPrefListHitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 12), Integer32()) if mibBuilder.loadTexts: rlIpPrefListHitCount.setStatus('current') rlIpPrefListRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 1, 1, 13), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlIpPrefListRowStatus.setStatus('current') rlIpPrefListInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2), ) if mibBuilder.loadTexts: rlIpPrefListInfoTable.setStatus('current') rlIpPrefListInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2, 1), ).setIndexNames((0, "CISCOSB-ippreflist-MIB", "rlIpPrefListInfoType"), (0, "CISCOSB-ippreflist-MIB", "rlIpPrefListInfoName")) if mibBuilder.loadTexts: rlIpPrefListInfoEntry.setStatus('current') rlIpPrefListInfoType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2, 1, 1), RlIpPrefListType()) if mibBuilder.loadTexts: rlIpPrefListInfoType.setStatus('current') rlIpPrefListInfoName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))) if mibBuilder.loadTexts: rlIpPrefListInfoName.setStatus('current') rlIpPrefListInfoEntriesNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpPrefListInfoEntriesNumber.setStatus('current') rlIpPrefListInfoRangeEntries = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpPrefListInfoRangeEntries.setStatus('current') rlIpPrefListInfoNextFreeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 212, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpPrefListInfoNextFreeIndex.setStatus('current') mibBuilder.exportSymbols("CISCOSB-ippreflist-MIB", rlIpPrefListEntryType=rlIpPrefListEntryType, rlIpPrefListType=rlIpPrefListType, RlIpPrefListEntryType=RlIpPrefListEntryType, rlIpPrefListInfoRangeEntries=rlIpPrefListInfoRangeEntries, RlIpPrefListActionType=RlIpPrefListActionType, RlIpPrefListType=RlIpPrefListType, rlIpPrefListInfoNextFreeIndex=rlIpPrefListInfoNextFreeIndex, rlIpPrefListInfoTable=rlIpPrefListInfoTable, rlIpPrefListInfoType=rlIpPrefListInfoType, rlIpPrefListAction=rlIpPrefListAction, rlIpPrefListInfoName=rlIpPrefListInfoName, rlIpPrefListDescription=rlIpPrefListDescription, rlIpPrefList=rlIpPrefList, rlIpPrefListInetAddrType=rlIpPrefListInetAddrType, rlIpPrefListInfoEntry=rlIpPrefListInfoEntry, rlIpPrefListHitCount=rlIpPrefListHitCount, rlIpPrefListPrefixLength=rlIpPrefListPrefixLength, rlIpPrefListInetAddr=rlIpPrefListInetAddr, rlIpPrefListEntry=rlIpPrefListEntry, rlIpPrefListName=rlIpPrefListName, rlIpPrefListLeLength=rlIpPrefListLeLength, rlIpPrefListEntryIndex=rlIpPrefListEntryIndex, rlIpPrefListTable=rlIpPrefListTable, rlIpPrefListInfoEntriesNumber=rlIpPrefListInfoEntriesNumber, rlIpPrefListRowStatus=rlIpPrefListRowStatus, rlIpPrefListGeLength=rlIpPrefListGeLength)
""" Raincoat comments that are checked in acceptance tests """ def simple_function(): # Raincoat: pypi package: raincoat==0.1.4 path: raincoat/_acceptance_test.py element: use_umbrella # noqa # Raincoat: pypi package: raincoat==0.1.4 path: raincoat/_acceptance_test.py element: Umbrella.open # noqa # Raincoat: pypi package: raincoat==0.1.4 path: raincoat/_acceptance_test.py element: Umbrella # noqa # Raincoat: pypi package: raincoat==0.1.4 path: raincoat/_acceptance_test.py # noqa # Raincoat: pypi package: raincoat==0.1.4 path: raincoat/_acceptance_test.py element: non_existant # noqa # Raincoat: pypi package: raincoat==0.1.4 path: raincoat/non_existant.py # noqa # Raincoat: django ticket: #25981 # Raincoat: django ticket: #27754 # Raincoat: pygithub repo: peopledoc/raincoat@a35df1d path: raincoat/_acceptance_test.py element: Umbrella.open # noqa pass # this file should never be executed, only parsed. raise NotImplementedError
# Programa que calcule o preço a pagar pelo aluguel do carro # Tendo as seguintes regras: # R$: 60 por dia # R$: 0,15 por km rodado try: dias = int(input("Informe quantos dias o carro foi alugado: ")) km = float(input("Informe quantos km foi rodado: ")) preco = (dias * 60) + (km * 0.15) print(f"O preço do aluguel do carro é de R$: {preco}") except Exception as erro: print(f"Ocorreu um erro!\nO tipo de erro foi {erro.__class__}")
""" Day 3 - Maximum Subarray LeetCode Easy Problem Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6. Follow up: If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle. """ class Solution: def maxSubArray(self, nums: List[int]) -> int: max_so_far = nums[0] curr_max = nums[0] for num in nums[1:]: curr_max = max(curr_max + num, num) max_so_far = max(max_so_far, curr_max) return max_so_far
class c_iterateur(object): def __init__(self, obj): self.obj = obj self.length = len(obj) self.count = 0 def __iter__(self): return self def next(self): if self.count > self.length: raise StopIteration else: result = self.obj[self.count] self.count += 1 return result if __name__ == "__main__": chaine = [ [ ['hello-1.0',' My Beautifull-1.0 ','world-1.0'], ['hello-1.1',' My Beautifull-1.1 ','world-1.1'], ['hello-1.2',' My Beautifull-1.2 ','world-1.2'] ], [ ['hello-2.0',' My Beautifull-2.0 ','world-2.0'], ['hello-2.1',' My Beautifull-2.1 ','world-2.1'], ['hello-2.2',' My Beautifull-2.2 ','world-2.2'] ], [ ['hello-3.2',' My Beautifull-3.0 ','world-3.0'], ['hello-3.2',' My Beautifull-3.1 ','world-3.1'], ['hello-3.2',' My Beautifull-3.2 ','world-3.2'] ] ] iter1 =c_iterateur(chaine).__iter__() try: for i in range(len(chaine)): print("Idx 1D: " + str(i) + " : " + str(iter1.next())) iter2 =c_iterateur(chaine[i]).__iter__() try: for j in range(len(chaine[i])): print("___Idx 2D: " + str(j) + " : " + str(iter2.next())) iter3 = c_iterateur(chaine[j]).__iter__() try: for k in range(len(chaine[j])): print("______Idx 3D: " + str(k) + " : " + str(iter3.next())) except StopIteration: print("fin d'iteration 3") except StopIteration: print("fin d'iteration 2") except StopIteration: print("fin d'iteration 1")
# input number of strings in the set N = int(input()) trie = {} end = object() # input the strings for _ in range(N): s = input() t = trie for c in s[:-1]: if c in t: t = t[c] else: t[c] = {} t = t[c] # Print GOOD SET if the set is valid else, output BAD SET # followed by the first string for which the condition fails if t is end: print("BAD SET") print(s) exit() if s[-1] in t: print("BAD SET") print(s) exit() else: t[s[-1]] = end print("GOOD SET")
# Google Kickstart 2019 Round: Practice def solution(N, K, x1, y1, C, D, E1, E2, F): alarmList = [] alarmPowermap = [[] for i in range(K)] alarmPower = 0 # Calculate alarmList element = (x1 + y1) % F xPrev, yPrev = x1, y1 alarmList.append(element) for _ in range(N-1): xi = (C*xPrev + D*yPrev + E1) % F yi = (D*xPrev + C*yPrev + E2) % F element = (xi + yi) % F xPrev, yPrev = xi, yi alarmList.append(element) # Calculate Alarm Subsets alarmSubset = [] for i in range(1, N+1): for j in range(N-i+1): alarmSubset.append(alarmList[j:j+i]) # Calculate alarmPowermap for kthElement in range(K): for indexElement in range(1, N+1): alarmPowermap[kthElement].append(indexElement**(kthElement+1)) # Calculate alarmPowerList for kthElement in range(K): for subset in alarmSubset: for index, element in enumerate(subset): alarmPower += element*alarmPowermap[kthElement][index] return str(alarmPower % 1000000007) def kickstartAlarm(): T = int(input()) N, K, x1, y1, C, D, E1, E2, F = [0]*T, [0]*T, [0] * \ T, [0]*T, [0]*T, [0]*T, [0]*T, [0]*T, [0]*T for i in range(T): N[i], K[i], x1[i], y1[i], C[i], D[i], E1[i], E2[i], F[i] = map( int, input().split()) for i in range(T): print("Case #" + str(i+1) + ": " + solution(N[i], K[i], x1[i], y1[i], C[i], D[i], E1[i], E2[i], F[i])) kickstartAlarm() # solution(2, 3, 1, 2, 1, 2, 1, 1, 9) # solution(10, 10, 10001, 10002, 10003, 10004, 10005, 10006, 89273)
# -*- coding: utf-8 -*- """ Created on Tue Aug 11 19:22:52 2020 @author: abhi0 """ class Solution: def setZeroes(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ temp=[] tempPrime=[] for i in range(len(matrix)): if 0 in matrix[i]: temp.append(i) for j in range(len(matrix[i])): if matrix[i][j]==0: tempPrime.append(j) for i in temp: matrix[i]=[0]*len(matrix[i]) for j in tempPrime: for i in range(len(matrix)): matrix[i][j]=0
thistuple = ("apple", "banana", "cherry") print(thistuple) thistuple = ("apple", "banana", "cherry") print(thistuple[1]) thistuple = ("apple", "banana", "cherry") print(thistuple[-1]) thistuple = ("apple", "banana", "cherry", "orange", "kiwi", "melon", "mango") print(thistuple[2:5]) x = ("apple", "banana", "cherry") y = list(x) y[1] = "kiwi" x = tuple(y) print(x) thistuple = ("apple", "banana", "cherry") for x in thistuple: print(x) thistuple1 = (1,2,4,5,6,7,9,0,5) x = thistuple1.count(5) print(x)
def test_response_protocol_with_http1_0_request_(): pass def test_response_protocol_with_http1_1_request_(): pass def test_response_protocol_with_http1_1_request_and_http1_0_server(): pass def test_response_protocol_with_http0_9_request_(): pass def test_response_protocol_with_http2_0_request_(): pass
# -*- coding: utf-8 -*- """Version information for :mod:`seffnet`.""" __all__ = [ 'VERSION', ] VERSION = '0.0.1-dev'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Apr 25 18:24:38 2017 @author: dhingratul P 1.1 """ def isUnique(s): s2=s.upper() l=set(list(s2)) if len(l) == len(s2): return True else: return False # Main program print(isUnique("ABCc"))
plain_text = list(input("Enter plain text:\n")) encrypted_text = [] original_text = [] for char in plain_text: encrypted_text.append(chr(ord(char)+5)) for char in encrypted_text: original_text.append(chr(ord(char)-5)) print(encrypted_text) print(original_text)
''' Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 Explanation: [4,-1,2,1] has the largest sum = 6. Follow up: If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle. ''' class Solution: def maxSubArray(self, nums: List[int]) -> int: dp = [0 for x in range(len(nums))] dp[0] = nums[0] for x in range(len(nums) - 1): dp[x + 1] = max(nums[x + 1], dp[x] + nums[x + 1]) return max(dp)
POSSIBLE_MARKS = ( ("4", "4"), ("5", "5"), ("6", "6"), ("7", "7"), ("8", "8"), ("9", "9"), ("10", "10"), )
# # PySNMP MIB module IPAD-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IPAD-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:44:34 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") ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, TimeTicks, Counter32, Counter64, NotificationType, Gauge32, iso, Bits, enterprises, MibIdentifier, ObjectIdentity, Unsigned32, Integer32, IpAddress, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "TimeTicks", "Counter32", "Counter64", "NotificationType", "Gauge32", "iso", "Bits", "enterprises", "MibIdentifier", "ObjectIdentity", "Unsigned32", "Integer32", "IpAddress", "NotificationType") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") verilink = MibIdentifier((1, 3, 6, 1, 4, 1, 321)) hbu = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100)) ipad = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1)) ipadFrPort = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 1)) ipadService = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 2)) ipadChannel = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 3)) ipadDLCI = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 4)) ipadEndpoint = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 5)) ipadUser = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 6)) ipadPPP = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 7)) ipadModem = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 8)) ipadSvcAware = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 9)) ipadPktSwitch = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 10)) ipadTrapDest = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 11)) ipadMisc = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 12)) ipadRouter = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 13)) ipadSoftKey = MibIdentifier((1, 3, 6, 1, 4, 1, 321, 100, 1, 14)) ipadFrPortTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1), ) if mibBuilder.loadTexts: ipadFrPortTable.setStatus('optional') ipadFrPortTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadFrPortService")) if mibBuilder.loadTexts: ipadFrPortTableEntry.setStatus('mandatory') ipadFrPortService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortService.setStatus('mandatory') ipadFrPortActive = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortActive.setStatus('mandatory') ipadFrPortLMIType = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("ccitt", 2), ("ansi", 3), ("lmi", 4), ("none", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortLMIType.setStatus('mandatory') ipadFrPortLMIMode = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("sourcing", 2), ("monitoring", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortLMIMode.setStatus('mandatory') ipadFrPortRxInvAlmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadFrPortRxInvAlmThreshold.setStatus('mandatory') ipadFrPortRxInvAlmAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortRxInvAlmAlarm.setStatus('mandatory') ipadFrPortTxAlmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadFrPortTxAlmThreshold.setStatus('mandatory') ipadFrPortTxAlmAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortTxAlmAlarm.setStatus('mandatory') ipadFrPortRxAlmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadFrPortRxAlmThreshold.setStatus('mandatory') ipadFrPortRxAlmAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortRxAlmAlarm.setStatus('mandatory') ipadServiceTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 1), ) if mibBuilder.loadTexts: ipadServiceTable.setStatus('optional') ipadServiceTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadServiceIndex")) if mibBuilder.loadTexts: ipadServiceTableEntry.setStatus('mandatory') ipadServiceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadServiceIndex.setStatus('mandatory') ipadServiceifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("disabled", 0), ("supervisor", 1), ("network1", 2), ("network2", 3), ("user1", 4), ("user2", 5), ("ethernet", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadServiceifIndex.setStatus('mandatory') ipadServiceType = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("other", 1), ("tdm", 2), ("ppp", 3), ("pppMonitor", 4), ("frameRelay", 5), ("frameRelayMonitor", 6), ("ip", 7), ("serial", 8), ("tty", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadServiceType.setStatus('mandatory') ipadServicePair = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadServicePair.setStatus('mandatory') ipadServiceAddService = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("addService", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadServiceAddService.setStatus('mandatory') ipadServiceDeleteService = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 2, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadServiceDeleteService.setStatus('mandatory') ipadChannelTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1), ) if mibBuilder.loadTexts: ipadChannelTable.setStatus('optional') ipadChannelTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadChannelifIndex"), (0, "IPAD-MIB", "ipadChannelIndex")) if mibBuilder.loadTexts: ipadChannelTableEntry.setStatus('mandatory') ipadChannelifIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("supervisor", 1), ("network1", 2), ("network2", 3), ("user1", 4), ("user2", 5), ("ethernet", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadChannelifIndex.setStatus('mandatory') ipadChannelIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadChannelIndex.setStatus('mandatory') ipadChannelService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadChannelService.setStatus('mandatory') ipadChannelPair = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadChannelPair.setStatus('mandatory') ipadChannelRate = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("rate56", 2), ("rate64", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadChannelRate.setStatus('mandatory') ipadDLCITable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1), ) if mibBuilder.loadTexts: ipadDLCITable.setStatus('optional') ipadDLCITableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadDLCIservice"), (0, "IPAD-MIB", "ipadDLCInumber")) if mibBuilder.loadTexts: ipadDLCITableEntry.setStatus('mandatory') ipadDLCIservice = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIservice.setStatus('mandatory') ipadDLCInumber = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCInumber.setStatus('mandatory') ipadDLCIactive = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3), ("pending", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIactive.setStatus('mandatory') ipadDLCIcongestion = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIcongestion.setStatus('mandatory') ipadDLCIremote = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIremote.setStatus('mandatory') ipadDLCIremoteUnit = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIremoteUnit.setStatus('mandatory') ipadDLCIremoteEquipActive = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("inactive", 2), ("active", 3), ("sosAlarm", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIremoteEquipActive.setStatus('mandatory') ipadDLCIencapsulation = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("rfc1490", 2), ("proprietary", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIencapsulation.setStatus('mandatory') ipadDLCIproprietary = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("ip", 2), ("ipx", 3), ("ethertype", 4), ("none", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIproprietary.setStatus('mandatory') ipadDLCIpropOffset = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIpropOffset.setStatus('mandatory') ipadDLCIinBand = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIinBand.setStatus('mandatory') ipadDLCICIR = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCICIR.setStatus('mandatory') ipadDLCIBe = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 13), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIBe.setStatus('mandatory') ipadDLCIminBC = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 14), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIminBC.setStatus('mandatory') ipadDLCIrxMon = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIrxMon.setStatus('mandatory') ipadDLCIdEctrl = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIdEctrl.setStatus('mandatory') ipadDLCIenableDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("disable", 2), ("enable", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIenableDelay.setStatus('mandatory') ipadDLCItxExCIRThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 18), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCItxExCIRThreshold.setStatus('mandatory') ipadDLCItxExCIRAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCItxExCIRAlarm.setStatus('mandatory') ipadDLCItxExBeThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 20), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCItxExBeThreshold.setStatus('mandatory') ipadDLCItxExBeAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 21), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCItxExBeAlarm.setStatus('mandatory') ipadDLCIrxCongThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 22), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIrxCongThreshold.setStatus('mandatory') ipadDLCIrxCongAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIrxCongAlarm.setStatus('mandatory') ipadDLCIrxBECNinCIR = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("alarmCondition", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIrxBECNinCIR.setStatus('mandatory') ipadDLCIUASThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 25), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadDLCIUASThreshold.setStatus('mandatory') ipadDLCIUASAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIUASAlarm.setStatus('mandatory') ipadDLCILastChange = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 4, 2), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCILastChange.setStatus('mandatory') ipadEndpointTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1), ) if mibBuilder.loadTexts: ipadEndpointTable.setStatus('optional') ipadEndpointTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadEndpointIndex")) if mibBuilder.loadTexts: ipadEndpointTableEntry.setStatus('mandatory') ipadEndpointIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadEndpointIndex.setStatus('mandatory') ipadEndpointName = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointName.setStatus('mandatory') ipadEndpointService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointService.setStatus('mandatory') ipadEndpointDLCInumber = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointDLCInumber.setStatus('mandatory') ipadEndpointType = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("local", 2), ("switched", 3), ("ipRoute", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointType.setStatus('mandatory') ipadEndpointForward = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointForward.setStatus('mandatory') ipadEndpointBackup = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointBackup.setStatus('mandatory') ipadEndpointRefSLP = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointRefSLP.setStatus('mandatory') ipadEndpointRemoteIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 9), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointRemoteIpAddr.setStatus('mandatory') ipadEndpointRemoteIpMask = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 1, 1, 10), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointRemoteIpMask.setStatus('mandatory') ipadEndpointAddEndpoint = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointAddEndpoint.setStatus('mandatory') ipadEndpointDeleteEndpoint = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 11))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadEndpointDeleteEndpoint.setStatus('mandatory') ipadEndpointLastChange = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 5, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadEndpointLastChange.setStatus('mandatory') ipadUserTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1), ) if mibBuilder.loadTexts: ipadUserTable.setStatus('optional') ipadUserTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadUserIndex")) if mibBuilder.loadTexts: ipadUserTableEntry.setStatus('mandatory') ipadUserIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserIndex.setStatus('mandatory') ipadUserFilterByDLCI = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserFilterByDLCI.setStatus('mandatory') ipadUserService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserService.setStatus('mandatory') ipadUserDLCI = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserDLCI.setStatus('mandatory') ipadUserFilterByIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserFilterByIPAddress.setStatus('mandatory') ipadUserIPAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 6), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserIPAddress.setStatus('mandatory') ipadUserIPMask = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 7), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserIPMask.setStatus('mandatory') ipadUserFilterByIPPort = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disabled", 1), ("enabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserFilterByIPPort.setStatus('mandatory') ipadUserIPPort = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(5, 7, 11, 17, 20, 21, 23, 25, 31, 37, 42, 53, 66, 69, 70, 79, 80, 88, 92, 101, 107, 109, 110, 111, 113, 119, 137, 138, 139, 153, 161, 162, 163, 164, 169, 179, 194, 201, 202, 204, 206, 213, 395, 396, 444, 494, 533, 540, 541, 600, 749))).clone(namedValues=NamedValues(("rje", 5), ("echo", 7), ("systat", 11), ("qotd", 17), ("ftpdata", 20), ("ftp", 21), ("telnet", 23), ("smtp", 25), ("msgauth", 31), ("time", 37), ("nameserver", 42), ("domain", 53), ("sqlnet", 66), ("tftp", 69), ("gopher", 70), ("finger", 79), ("http", 80), ("kerberos", 88), ("npp", 92), ("hostname", 101), ("rtelnet", 107), ("pop2", 109), ("pop3", 110), ("sunrpc", 111), ("auth", 113), ("nntp", 119), ("netbiosns", 137), ("netbiosdgm", 138), ("netbiosssn", 139), ("sgmp", 153), ("snmp", 161), ("snmptrap", 162), ("cmipman", 163), ("cmipagent", 164), ("send", 169), ("bgp", 179), ("irc", 194), ("atrtmp", 201), ("atnbp", 202), ("atecho", 204), ("atzis", 206), ("ipx", 213), ("netcp", 395), ("netwareip", 396), ("snpp", 444), ("povray", 494), ("netwall", 533), ("uucp", 540), ("uucprlogin", 541), ("ipcserver", 600), ("kerberosadm", 749)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserIPPort.setStatus('mandatory') ipadUserTxAlmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserTxAlmThreshold.setStatus('mandatory') ipadUserTxAlmAlarm = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("noAlarm", 2), ("thresholdExceeded", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserTxAlmAlarm.setStatus('mandatory') ipadUserIPStatTimeRemaining = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserIPStatTimeRemaining.setStatus('mandatory') ipadUserIPStatTimeDuration = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserIPStatTimeDuration.setStatus('mandatory') ipadUserIPStatStartTime = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 4), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserIPStatStartTime.setStatus('mandatory') ipadUserIPStatRequestedReportSize = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserIPStatRequestedReportSize.setStatus('mandatory') ipadUserIPStatGrantedReportSize = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserIPStatGrantedReportSize.setStatus('mandatory') ipadUserIPStatReportNumber = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserIPStatReportNumber.setStatus('mandatory') ipadUserIPStatDiscardType = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 6, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("byTime", 1), ("byFrames", 2), ("byOctets", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadUserIPStatDiscardType.setStatus('mandatory') ipadPPPCfgTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1), ) if mibBuilder.loadTexts: ipadPPPCfgTable.setStatus('optional') ipadPPPCfgTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadPPPCfgService")) if mibBuilder.loadTexts: ipadPPPCfgTableEntry.setStatus('mandatory') ipadPPPCfgService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadPPPCfgService.setStatus('mandatory') ipadPPPCfgDialMode = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("direct", 2), ("dialup", 3), ("demanddial", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgDialMode.setStatus('mandatory') ipadPPPCfgInactivityTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgInactivityTimer.setStatus('mandatory') ipadPPPCfgNegotiationInit = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegotiationInit.setStatus('mandatory') ipadPPPCfgMRU = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgMRU.setStatus('mandatory') ipadPPPCfgACCM = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgACCM.setStatus('mandatory') ipadPPPCfgNegMRU = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegMRU.setStatus('mandatory') ipadPPPCfgNegACCM = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegACCM.setStatus('mandatory') ipadPPPCfgNegMagic = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegMagic.setStatus('mandatory') ipadPPPCfgNegCompression = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegCompression.setStatus('mandatory') ipadPPPCfgNegAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegAddress.setStatus('mandatory') ipadPPPCfgNegPAP = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegPAP.setStatus('mandatory') ipadPPPCfgNegCHAP = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegCHAP.setStatus('mandatory') ipadPPPCfgAllowPAP = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgAllowPAP.setStatus('mandatory') ipadPPPCfgAllowCHAP = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgAllowCHAP.setStatus('mandatory') ipadPPPCfgPAPUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgPAPUsername.setStatus('mandatory') ipadPPPCfgPAPPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgPAPPassword.setStatus('mandatory') ipadPPPCfgCHAPUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgCHAPUsername.setStatus('mandatory') ipadPPPCfgCHAPSecret = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 19), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgCHAPSecret.setStatus('mandatory') ipadPPPCfgPortIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 20), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgPortIpAddress.setStatus('mandatory') ipadPPPCfgPeerIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 21), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgPeerIpAddress.setStatus('mandatory') ipadPPPCfgNegIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegIpAddress.setStatus('mandatory') ipadPPPCfgNegIPCPCompression = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgNegIPCPCompression.setStatus('mandatory') ipadPPPCfgSubnetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 24), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgSubnetMask.setStatus('mandatory') ipadPPPCfgAuthChallengeInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 1, 1, 25), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCfgAuthChallengeInterval.setStatus('mandatory') ipadPPPPAPTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 2), ) if mibBuilder.loadTexts: ipadPPPPAPTable.setStatus('optional') ipadPPPPAPTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 2, 1), ).setIndexNames((0, "IPAD-MIB", "ipadPPPPAPTableIndex")) if mibBuilder.loadTexts: ipadPPPPAPTableEntry.setStatus('mandatory') ipadPPPPAPTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadPPPPAPTableIndex.setStatus('mandatory') ipadPPPPAPTableUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPPAPTableUsername.setStatus('mandatory') ipadPPPPAPTablePassword = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPPAPTablePassword.setStatus('mandatory') ipadPPPCHAPTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 3), ) if mibBuilder.loadTexts: ipadPPPCHAPTable.setStatus('optional') ipadPPPCHAPTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 3, 1), ).setIndexNames((0, "IPAD-MIB", "ipadPPPCHAPTableIndex")) if mibBuilder.loadTexts: ipadPPPCHAPTableEntry.setStatus('mandatory') ipadPPPCHAPTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadPPPCHAPTableIndex.setStatus('mandatory') ipadPPPCHAPTableUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCHAPTableUsername.setStatus('mandatory') ipadPPPCHAPTableSecret = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 7, 3, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPPPCHAPTableSecret.setStatus('mandatory') ipadModemDialTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1), ) if mibBuilder.loadTexts: ipadModemDialTable.setStatus('optional') ipadModemDialTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadModemDialTableIndex")) if mibBuilder.loadTexts: ipadModemDialTableEntry.setStatus('mandatory') ipadModemDialTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("supervisor", 1), ("network1", 2), ("network2", 3), ("user1", 4), ("user2", 5), ("ethernet", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadModemDialTableIndex.setStatus('mandatory') ipadModemDialDataIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialDataIndex.setStatus('mandatory') ipadModemDialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialNumber.setStatus('mandatory') ipadModemDialAbortTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialAbortTimer.setStatus('mandatory') ipadModemDialRedialAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialRedialAttempts.setStatus('mandatory') ipadModemDialDelayBeforeRedial = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialDelayBeforeRedial.setStatus('mandatory') ipadModemDialLoginScript = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialLoginScript.setStatus('mandatory') ipadModemDialUsername = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialUsername.setStatus('mandatory') ipadModemDialPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDialPassword.setStatus('mandatory') ipadModemDataTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2), ) if mibBuilder.loadTexts: ipadModemDataTable.setStatus('optional') ipadModemDataTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1), ).setIndexNames((0, "IPAD-MIB", "ipadModemDataTableIndex")) if mibBuilder.loadTexts: ipadModemDataTableEntry.setStatus('mandatory') ipadModemDataTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadModemDataTableIndex.setStatus('mandatory') ipadModemDataModemName = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 10))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDataModemName.setStatus('mandatory') ipadModemDataSetupScript = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDataSetupScript.setStatus('mandatory') ipadModemDataDialingScript = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDataDialingScript.setStatus('mandatory') ipadModemDataAnswerScript = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDataAnswerScript.setStatus('mandatory') ipadModemDataHangupScript = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 8, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadModemDataHangupScript.setStatus('mandatory') ipadFrPortStatsTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1), ) if mibBuilder.loadTexts: ipadFrPortStatsTable.setStatus('optional') ipadFrPortStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadFrPortStatsService"), (0, "IPAD-MIB", "ipadFrPortStatsPeriod")) if mibBuilder.loadTexts: ipadFrPortStatsEntry.setStatus('mandatory') ipadFrPortStatsService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsService.setStatus('mandatory') ipadFrPortStatsPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98))).clone(namedValues=NamedValues(("portStatsSummary", 1), ("portStatsCurrent", 2), ("portStatsperiod1", 3), ("portStatsperiod2", 4), ("portStatsperiod3", 5), ("portStatsperiod4", 6), ("portStatsperiod5", 7), ("portStatsperiod6", 8), ("portStatsperiod7", 9), ("portStatsperiod8", 10), ("portStatsperiod9", 11), ("portStatsperiod10", 12), ("portStatsperiod11", 13), ("portStatsperiod12", 14), ("portStatsperiod13", 15), ("portStatsperiod14", 16), ("portStatsperiod15", 17), ("portStatsperiod16", 18), ("portStatsperiod17", 19), ("portStatsperiod18", 20), ("portStatsperiod19", 21), ("portStatsperiod20", 22), ("portStatsperiod21", 23), ("portStatsperiod22", 24), ("portStatsperiod23", 25), ("portStatsperiod24", 26), ("portStatsperiod25", 27), ("portStatsperiod26", 28), ("portStatsperiod27", 29), ("portStatsperiod28", 30), ("portStatsperiod29", 31), ("portStatsperiod30", 32), ("portStatsperiod31", 33), ("portStatsperiod32", 34), ("portStatsperiod33", 35), ("portStatsperiod34", 36), ("portStatsperiod35", 37), ("portStatsperiod36", 38), ("portStatsperiod37", 39), ("portStatsperiod38", 40), ("portStatsperiod39", 41), ("portStatsperiod40", 42), ("portStatsperiod41", 43), ("portStatsperiod42", 44), ("portStatsperiod43", 45), ("portStatsperiod44", 46), ("portStatsperiod45", 47), ("portStatsperiod46", 48), ("portStatsperiod47", 49), ("portStatsperiod48", 50), ("portStatsperiod49", 51), ("portStatsperiod50", 52), ("portStatsperiod51", 53), ("portStatsperiod52", 54), ("portStatsperiod53", 55), ("portStatsperiod54", 56), ("portStatsperiod55", 57), ("portStatsperiod56", 58), ("portStatsperiod57", 59), ("portStatsperiod58", 60), ("portStatsperiod59", 61), ("portStatsperiod60", 62), ("portStatsperiod61", 63), ("portStatsperiod62", 64), ("portStatsperiod63", 65), ("portStatsperiod64", 66), ("portStatsperiod65", 67), ("portStatsperiod66", 68), ("portStatsperiod67", 69), ("portStatsperiod68", 70), ("portStatsperiod69", 71), ("portStatsperiod70", 72), ("portStatsperiod71", 73), ("portStatsperiod72", 74), ("portStatsperiod73", 75), ("portStatsperiod74", 76), ("portStatsperiod75", 77), ("portStatsperiod76", 78), ("portStatsperiod77", 79), ("portStatsperiod78", 80), ("portStatsperiod79", 81), ("portStatsperiod80", 82), ("portStatsperiod81", 83), ("portStatsperiod82", 84), ("portStatsperiod83", 85), ("portStatsperiod84", 86), ("portStatsperiod85", 87), ("portStatsperiod86", 88), ("portStatsperiod87", 89), ("portStatsperiod88", 90), ("portStatsperiod89", 91), ("portStatsperiod90", 92), ("portStatsperiod91", 93), ("portStatsperiod92", 94), ("portStatsperiod93", 95), ("portStatsperiod94", 96), ("portStatsperiod95", 97), ("portStatsperiod96", 98)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsPeriod.setStatus('mandatory') ipadFrPortStatsTxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsTxFrames.setStatus('mandatory') ipadFrPortStatsRxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxFrames.setStatus('mandatory') ipadFrPortStatsTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsTxOctets.setStatus('mandatory') ipadFrPortStatsRxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxOctets.setStatus('mandatory') ipadFrPortStatsTxMgmtFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsTxMgmtFrames.setStatus('mandatory') ipadFrPortStatsRxMgmtFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxMgmtFrames.setStatus('mandatory') ipadFrPortStatsTxMgmtOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsTxMgmtOctets.setStatus('mandatory') ipadFrPortStatsRxMgmtOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxMgmtOctets.setStatus('mandatory') ipadFrPortStatsRxFECN = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxFECN.setStatus('mandatory') ipadFrPortStatsRxBECN = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxBECN.setStatus('mandatory') ipadFrPortStatsRxInvalid = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxInvalid.setStatus('mandatory') ipadFrPortStatsTxStatInq = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsTxStatInq.setStatus('mandatory') ipadFrPortStatsRxStatInq = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxStatInq.setStatus('mandatory') ipadFrPortStatsTxStatResp = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsTxStatResp.setStatus('mandatory') ipadFrPortStatsRxStatResp = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxStatResp.setStatus('mandatory') ipadFrPortStatsRxInvLMI = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsRxInvLMI.setStatus('mandatory') ipadFrPortStatsPeak = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsPeak.setStatus('mandatory') ipadFrPortStatsAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 1, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadFrPortStatsAverage.setStatus('mandatory') ipadDLCIstatsTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2), ) if mibBuilder.loadTexts: ipadDLCIstatsTable.setStatus('optional') ipadDLCIstatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1), ).setIndexNames((0, "IPAD-MIB", "ipadDLCIstatsService"), (0, "IPAD-MIB", "ipadDLCIstatsDLCI"), (0, "IPAD-MIB", "ipadDLCIstatsPeriod")) if mibBuilder.loadTexts: ipadDLCIstatsEntry.setStatus('mandatory') ipadDLCIstatsService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsService.setStatus('mandatory') ipadDLCIstatsDLCI = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsDLCI.setStatus('mandatory') ipadDLCIstatsPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98))).clone(namedValues=NamedValues(("dlciStatsSummary", 1), ("dlciStatsCurrent", 2), ("dlciStatsperiod1", 3), ("dlciStatsperiod2", 4), ("dlciStatsperiod3", 5), ("dlciStatsperiod4", 6), ("dlciStatsperiod5", 7), ("dlciStatsperiod6", 8), ("dlciStatsperiod7", 9), ("dlciStatsperiod8", 10), ("dlciStatsperiod9", 11), ("dlciStatsperiod10", 12), ("dlciStatsperiod11", 13), ("dlciStatsperiod12", 14), ("dlciStatsperiod13", 15), ("dlciStatsperiod14", 16), ("dlciStatsperiod15", 17), ("dlciStatsperiod16", 18), ("dlciStatsperiod17", 19), ("dlciStatsperiod18", 20), ("dlciStatsperiod19", 21), ("dlciStatsperiod20", 22), ("dlciStatsperiod21", 23), ("dlciStatsperiod22", 24), ("dlciStatsperiod23", 25), ("dlciStatsperiod24", 26), ("dlciStatsperiod25", 27), ("dlciStatsperiod26", 28), ("dlciStatsperiod27", 29), ("dlciStatsperiod28", 30), ("dlciStatsperiod29", 31), ("dlciStatsperiod30", 32), ("dlciStatsperiod31", 33), ("dlciStatsperiod32", 34), ("dlciStatsperiod33", 35), ("dlciStatsperiod34", 36), ("dlciStatsperiod35", 37), ("dlciStatsperiod36", 38), ("dlciStatsperiod37", 39), ("dlciStatsperiod38", 40), ("dlciStatsperiod39", 41), ("dlciStatsperiod40", 42), ("dlciStatsperiod41", 43), ("dlciStatsperiod42", 44), ("dlciStatsperiod43", 45), ("dlciStatsperiod44", 46), ("dlciStatsperiod45", 47), ("dlciStatsperiod46", 48), ("dlciStatsperiod47", 49), ("dlciStatsperiod48", 50), ("dlciStatsperiod49", 51), ("dlciStatsperiod50", 52), ("dlciStatsperiod51", 53), ("dlciStatsperiod52", 54), ("dlciStatsperiod53", 55), ("dlciStatsperiod54", 56), ("dlciStatsperiod55", 57), ("dlciStatsperiod56", 58), ("dlciStatsperiod57", 59), ("dlciStatsperiod58", 60), ("dlciStatsperiod59", 61), ("dlciStatsperiod60", 62), ("dlciStatsperiod61", 63), ("dlciStatsperiod62", 64), ("dlciStatsperiod63", 65), ("dlciStatsperiod64", 66), ("dlciStatsperiod65", 67), ("dlciStatsperiod66", 68), ("dlciStatsperiod67", 69), ("dlciStatsperiod68", 70), ("dlciStatsperiod69", 71), ("dlciStatsperiod70", 72), ("dlciStatsperiod71", 73), ("dlciStatsperiod72", 74), ("dlciStatsperiod73", 75), ("dlciStatsperiod74", 76), ("dlciStatsperiod75", 77), ("dlciStatsperiod76", 78), ("dlciStatsperiod77", 79), ("dlciStatsperiod78", 80), ("dlciStatsperiod79", 81), ("dlciStatsperiod80", 82), ("dlciStatsperiod81", 83), ("dlciStatsperiod82", 84), ("dlciStatsperiod83", 85), ("dlciStatsperiod84", 86), ("dlciStatsperiod85", 87), ("dlciStatsperiod86", 88), ("dlciStatsperiod87", 89), ("dlciStatsperiod88", 90), ("dlciStatsperiod89", 91), ("dlciStatsperiod90", 92), ("dlciStatsperiod91", 93), ("dlciStatsperiod92", 94), ("dlciStatsperiod93", 95), ("dlciStatsperiod94", 96), ("dlciStatsperiod95", 97), ("dlciStatsperiod96", 98)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsPeriod.setStatus('mandatory') ipadDLCIstatsTxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsTxFrames.setStatus('mandatory') ipadDLCIstatsRxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxFrames.setStatus('mandatory') ipadDLCIstatsTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsTxOctets.setStatus('mandatory') ipadDLCIstatsRxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxOctets.setStatus('mandatory') ipadDLCIstatsRxFECN = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxFECN.setStatus('mandatory') ipadDLCIstatsRxBECN = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxBECN.setStatus('mandatory') ipadDLCIstatsRxDE = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxDE.setStatus('mandatory') ipadDLCIstatsTxExcessCIR = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsTxExcessCIR.setStatus('mandatory') ipadDLCIstatsTxExcessBe = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsTxExcessBe.setStatus('mandatory') ipadDLCIstatsTxMgmtFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsTxMgmtFrames.setStatus('mandatory') ipadDLCIstatsRxMgmtFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxMgmtFrames.setStatus('mandatory') ipadDLCIstatsTxMgmtOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsTxMgmtOctets.setStatus('mandatory') ipadDLCIstatsRxMgmtOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRxMgmtOctets.setStatus('mandatory') ipadDLCIstatsPeak = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsPeak.setStatus('mandatory') ipadDLCIstatsAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsAverage.setStatus('mandatory') ipadDLCIstatsDelayPeak = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsDelayPeak.setStatus('mandatory') ipadDLCIstatsDelayAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 20), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsDelayAverage.setStatus('mandatory') ipadDLCIstatsRoundTripTimeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 21), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsRoundTripTimeouts.setStatus('mandatory') ipadDLCIstatsUAS = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 2, 1, 22), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadDLCIstatsUAS.setStatus('mandatory') ipadUserStatsTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3), ) if mibBuilder.loadTexts: ipadUserStatsTable.setStatus('optional') ipadUserStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1), ).setIndexNames((0, "IPAD-MIB", "ipadUserStatsIndex"), (0, "IPAD-MIB", "ipadUserStatsPeriod")) if mibBuilder.loadTexts: ipadUserStatsEntry.setStatus('mandatory') ipadUserStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsIndex.setStatus('mandatory') ipadUserStatsPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98))).clone(namedValues=NamedValues(("userStatsSummary", 1), ("userStatsCurrent", 2), ("userStatsperiod1", 3), ("userStatsperiod2", 4), ("userStatsperiod3", 5), ("userStatsperiod4", 6), ("userStatsperiod5", 7), ("userStatsperiod6", 8), ("userStatsperiod7", 9), ("userStatsperiod8", 10), ("userStatsperiod9", 11), ("userStatsperiod10", 12), ("userStatsperiod11", 13), ("userStatsperiod12", 14), ("userStatsperiod13", 15), ("userStatsperiod14", 16), ("userStatsperiod15", 17), ("userStatsperiod16", 18), ("userStatsperiod17", 19), ("userStatsperiod18", 20), ("userStatsperiod19", 21), ("userStatsperiod20", 22), ("userStatsperiod21", 23), ("userStatsperiod22", 24), ("userStatsperiod23", 25), ("userStatsperiod24", 26), ("userStatsperiod25", 27), ("userStatsperiod26", 28), ("userStatsperiod27", 29), ("userStatsperiod28", 30), ("userStatsperiod29", 31), ("userStatsperiod30", 32), ("userStatsperiod31", 33), ("userStatsperiod32", 34), ("userStatsperiod33", 35), ("userStatsperiod34", 36), ("userStatsperiod35", 37), ("userStatsperiod36", 38), ("userStatsperiod37", 39), ("userStatsperiod38", 40), ("userStatsperiod39", 41), ("userStatsperiod40", 42), ("userStatsperiod41", 43), ("userStatsperiod42", 44), ("userStatsperiod43", 45), ("userStatsperiod44", 46), ("userStatsperiod45", 47), ("userStatsperiod46", 48), ("userStatsperiod47", 49), ("userStatsperiod48", 50), ("userStatsperiod49", 51), ("userStatsperiod50", 52), ("userStatsperiod51", 53), ("userStatsperiod52", 54), ("userStatsperiod53", 55), ("userStatsperiod54", 56), ("userStatsperiod55", 57), ("userStatsperiod56", 58), ("userStatsperiod57", 59), ("userStatsperiod58", 60), ("userStatsperiod59", 61), ("userStatsperiod60", 62), ("userStatsperiod61", 63), ("userStatsperiod62", 64), ("userStatsperiod63", 65), ("userStatsperiod64", 66), ("userStatsperiod65", 67), ("userStatsperiod66", 68), ("userStatsperiod67", 69), ("userStatsperiod68", 70), ("userStatsperiod69", 71), ("userStatsperiod70", 72), ("userStatsperiod71", 73), ("userStatsperiod72", 74), ("userStatsperiod73", 75), ("userStatsperiod74", 76), ("userStatsperiod75", 77), ("userStatsperiod76", 78), ("userStatsperiod77", 79), ("userStatsperiod78", 80), ("userStatsperiod79", 81), ("userStatsperiod80", 82), ("userStatsperiod81", 83), ("userStatsperiod82", 84), ("userStatsperiod83", 85), ("userStatsperiod84", 86), ("userStatsperiod85", 87), ("userStatsperiod86", 88), ("userStatsperiod87", 89), ("userStatsperiod88", 90), ("userStatsperiod89", 91), ("userStatsperiod90", 92), ("userStatsperiod91", 93), ("userStatsperiod92", 94), ("userStatsperiod93", 95), ("userStatsperiod94", 96), ("userStatsperiod95", 97), ("userStatsperiod96", 98)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsPeriod.setStatus('mandatory') ipadUserStatsTxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsTxFrames.setStatus('mandatory') ipadUserStatsRxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsRxFrames.setStatus('mandatory') ipadUserStatsTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsTxOctets.setStatus('mandatory') ipadUserStatsRxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsRxOctets.setStatus('mandatory') ipadUserStatsTxRatePeak = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsTxRatePeak.setStatus('mandatory') ipadUserStatsTxRateAverage = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 3, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadUserStatsTxRateAverage.setStatus('mandatory') ipadIPTopNStatsTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4), ) if mibBuilder.loadTexts: ipadIPTopNStatsTable.setStatus('optional') ipadIPTopNStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1), ).setIndexNames((0, "IPAD-MIB", "ipadIPTopNStatsIndex")) if mibBuilder.loadTexts: ipadIPTopNStatsEntry.setStatus('mandatory') ipadIPTopNStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsIndex.setStatus('mandatory') ipadIPTopNStatsAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsAddress.setStatus('mandatory') ipadIPTopNStatsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsTimestamp.setStatus('mandatory') ipadIPTopNStatsRxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsRxFrames.setStatus('mandatory') ipadIPTopNStatsRxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsRxOctets.setStatus('mandatory') ipadIPTopNStatsTxFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsTxFrames.setStatus('mandatory') ipadIPTopNStatsTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 9, 4, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadIPTopNStatsTxOctets.setStatus('mandatory') ipadPktSwOperatingMode = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("tdm", 2), ("monitor", 3), ("packet", 4), ("remoteConfig", 5)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwOperatingMode.setStatus('mandatory') ipadPktSwCfgTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2), ) if mibBuilder.loadTexts: ipadPktSwCfgTable.setStatus('optional') ipadPktSwCfgTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1), ).setIndexNames((0, "IPAD-MIB", "ipadPktSwCfgService")) if mibBuilder.loadTexts: ipadPktSwCfgTableEntry.setStatus('mandatory') ipadPktSwCfgService = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadPktSwCfgService.setStatus('mandatory') ipadPktSwCfgInterfaceType = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("uni", 1), ("ni", 2), ("nni", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgInterfaceType.setStatus('mandatory') ipadPktSwCfgLnkMgmtType = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("auto", 2), ("ccitt", 3), ("ansi", 4), ("lmi", 5), ("none", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgLnkMgmtType.setStatus('mandatory') ipadPktSwCfgMaxFrameSize = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgMaxFrameSize.setStatus('mandatory') ipadPktSwCfgnN1 = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgnN1.setStatus('mandatory') ipadPktSwCfgnN2 = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgnN2.setStatus('mandatory') ipadPktSwCfgnN3 = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 7), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgnN3.setStatus('mandatory') ipadPktSwCfgnT1 = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 8), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgnT1.setStatus('mandatory') ipadPktSwCfgDefCIR = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgDefCIR.setStatus('mandatory') ipadPktSwCfgDefExBurst = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgDefExBurst.setStatus('mandatory') ipadPktSwCfgCIREE = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgCIREE.setStatus('mandatory') ipadPktSwCfgLinkInjection = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("standard", 2), ("buffered", 3), ("forced", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgLinkInjection.setStatus('mandatory') ipadPktSwCfgAutoDiagnostic = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgAutoDiagnostic.setStatus('mandatory') ipadPktSwCfgAutoDiscovery = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("no", 2), ("yes", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgAutoDiscovery.setStatus('mandatory') ipadPktSwCfgMgmtDLCI = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 10, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4096))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadPktSwCfgMgmtDLCI.setStatus('mandatory') ipadTrapDestTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 11, 1), ) if mibBuilder.loadTexts: ipadTrapDestTable.setStatus('optional') ipadTrapDestTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 11, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadTrapDestIndex")) if mibBuilder.loadTexts: ipadTrapDestTableEntry.setStatus('mandatory') ipadTrapDestIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 11, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadTrapDestIndex.setStatus('mandatory') ipadTrapDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 11, 1, 1, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadTrapDestination.setStatus('mandatory') ipadFrPortRxInvalidFramesExceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25000)) ipadFrPortRxThroughputExceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25001)) ipadFrPortTxThroughputExceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25002)) ipadDLCItxCIRexceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25003)) ipadDLCItxBEexceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25004)) ipadDLCIRxCongestionExceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25005)) ipadUserTxExceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25006)) ipadDlciRxBECNinCIRAlarm = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25007)) ipadDlciUASExceeded = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25008)) ipadserialDteDTRAlarmExists = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25009)) ipadt1e1ESAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25010)) ipadt1e1SESAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25011)) ipadt1e1LOSSAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25012)) ipadt1e1UASAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25013)) ipadt1e1CSSAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25014)) ipadt1e1BPVSAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25015)) ipadt1e1OOFSAlarmDeclared = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25016)) ipadt1e1AISAlarmExists = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25017)) ipadt1e1RASAlarmExists = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25018)) ipadDLCIremoteSOSAlarm = NotificationType((1, 3, 6, 1, 4, 1, 321, 100) + (0,25019)) ipadMiscPortSettings = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 12, 1), ) if mibBuilder.loadTexts: ipadMiscPortSettings.setStatus('optional') ipadMiscPortSettingsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 12, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadMiscPortSettingsIndex")) if mibBuilder.loadTexts: ipadMiscPortSettingsEntry.setStatus('mandatory') ipadMiscPortSettingsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 12, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("supervisor", 1), ("network1", 2), ("network2", 3), ("user1", 4), ("user2", 5), ("ethernet", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadMiscPortSettingsIndex.setStatus('mandatory') ipadMiscPortSettingsSerialType = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 12, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("dce", 2), ("dte", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadMiscPortSettingsSerialType.setStatus('mandatory') ipadMiscClearStatusCounts = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 12, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("clear", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadMiscClearStatusCounts.setStatus('mandatory') ipadSoftKeyTable = MibTable((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 1), ) if mibBuilder.loadTexts: ipadSoftKeyTable.setStatus('mandatory') ipadSoftKeyTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 1, 1), ).setIndexNames((0, "IPAD-MIB", "ipadSoftKeyIndex")) if mibBuilder.loadTexts: ipadSoftKeyTableEntry.setStatus('mandatory') ipadSoftKeyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadSoftKeyIndex.setStatus('mandatory') ipadSoftKeyAcronym = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 3))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadSoftKeyAcronym.setStatus('mandatory') ipadSoftKeyDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadSoftKeyDescription.setStatus('mandatory') ipadSoftKeyExpirationDate = MibTableColumn((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipadSoftKeyExpirationDate.setStatus('mandatory') ipadSoftKeyEntry = MibScalar((1, 3, 6, 1, 4, 1, 321, 100, 1, 14, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipadSoftKeyEntry.setStatus('mandatory') mibBuilder.exportSymbols("IPAD-MIB", ipadFrPortStatsService=ipadFrPortStatsService, ipadt1e1SESAlarmDeclared=ipadt1e1SESAlarmDeclared, ipadDLCIrxCongAlarm=ipadDLCIrxCongAlarm, ipadTrapDest=ipadTrapDest, ipadPPPPAPTable=ipadPPPPAPTable, ipadEndpointDLCInumber=ipadEndpointDLCInumber, ipadDLCIstatsRxDE=ipadDLCIstatsRxDE, ipadPktSwCfgLinkInjection=ipadPktSwCfgLinkInjection, ipadPPPCHAPTable=ipadPPPCHAPTable, ipadDLCItxCIRexceeded=ipadDLCItxCIRexceeded, ipadPktSwCfgMaxFrameSize=ipadPktSwCfgMaxFrameSize, ipadFrPortStatsPeriod=ipadFrPortStatsPeriod, ipadIPTopNStatsRxOctets=ipadIPTopNStatsRxOctets, ipadEndpointType=ipadEndpointType, ipadFrPortStatsRxInvalid=ipadFrPortStatsRxInvalid, ipadPPPCfgAllowCHAP=ipadPPPCfgAllowCHAP, ipadFrPortStatsRxMgmtOctets=ipadFrPortStatsRxMgmtOctets, ipadDLCIstatsDelayAverage=ipadDLCIstatsDelayAverage, ipadPPPCfgAllowPAP=ipadPPPCfgAllowPAP, ipadDlciUASExceeded=ipadDlciUASExceeded, ipadUserTable=ipadUserTable, ipadDLCIstatsDelayPeak=ipadDLCIstatsDelayPeak, ipadMiscPortSettings=ipadMiscPortSettings, ipadDLCIBe=ipadDLCIBe, ipadFrPort=ipadFrPort, ipadFrPortStatsRxFECN=ipadFrPortStatsRxFECN, ipadModemDialNumber=ipadModemDialNumber, ipadIPTopNStatsAddress=ipadIPTopNStatsAddress, ipadChannelTableEntry=ipadChannelTableEntry, ipadDLCItxExCIRThreshold=ipadDLCItxExCIRThreshold, ipadModemDataDialingScript=ipadModemDataDialingScript, ipadChannelRate=ipadChannelRate, ipadDLCIremoteSOSAlarm=ipadDLCIremoteSOSAlarm, ipadUserIPStatGrantedReportSize=ipadUserIPStatGrantedReportSize, ipadModemDialUsername=ipadModemDialUsername, ipadPPPPAPTablePassword=ipadPPPPAPTablePassword, ipadUserStatsTxRateAverage=ipadUserStatsTxRateAverage, ipadDLCITableEntry=ipadDLCITableEntry, ipadDLCIcongestion=ipadDLCIcongestion, ipadDLCIstatsAverage=ipadDLCIstatsAverage, ipadPktSwCfgLnkMgmtType=ipadPktSwCfgLnkMgmtType, ipadServiceifIndex=ipadServiceifIndex, ipadTrapDestTableEntry=ipadTrapDestTableEntry, ipadUserFilterByDLCI=ipadUserFilterByDLCI, ipadUserIPPort=ipadUserIPPort, hbu=hbu, ipadFrPortActive=ipadFrPortActive, ipadUserStatsTxRatePeak=ipadUserStatsTxRatePeak, ipadUserStatsTable=ipadUserStatsTable, ipadChannelTable=ipadChannelTable, ipadDLCIrxBECNinCIR=ipadDLCIrxBECNinCIR, ipadFrPortRxInvAlmThreshold=ipadFrPortRxInvAlmThreshold, ipadDLCICIR=ipadDLCICIR, ipadFrPortStatsTxFrames=ipadFrPortStatsTxFrames, ipadPktSwCfgnT1=ipadPktSwCfgnT1, ipadFrPortService=ipadFrPortService, ipadDLCIrxMon=ipadDLCIrxMon, ipadEndpointTableEntry=ipadEndpointTableEntry, ipadModem=ipadModem, ipadChannelifIndex=ipadChannelifIndex, ipadEndpointRefSLP=ipadEndpointRefSLP, ipadPPPCHAPTableSecret=ipadPPPCHAPTableSecret, ipadUserStatsRxOctets=ipadUserStatsRxOctets, ipadMiscPortSettingsIndex=ipadMiscPortSettingsIndex, ipadChannelService=ipadChannelService, ipadModemDataSetupScript=ipadModemDataSetupScript, ipadDLCItxExCIRAlarm=ipadDLCItxExCIRAlarm, ipadPPPCfgNegMagic=ipadPPPCfgNegMagic, ipadPPPCfgNegIpAddress=ipadPPPCfgNegIpAddress, ipadModemDialDataIndex=ipadModemDialDataIndex, ipadDLCIstatsTxOctets=ipadDLCIstatsTxOctets, ipadEndpointService=ipadEndpointService, ipadUserFilterByIPAddress=ipadUserFilterByIPAddress, ipadDLCIstatsRxFrames=ipadDLCIstatsRxFrames, verilink=verilink, ipadDLCIenableDelay=ipadDLCIenableDelay, ipadDLCIremoteEquipActive=ipadDLCIremoteEquipActive, ipadDlciRxBECNinCIRAlarm=ipadDlciRxBECNinCIRAlarm, ipadPPPCfgNegPAP=ipadPPPCfgNegPAP, ipadDLCIUASThreshold=ipadDLCIUASThreshold, ipadPPPCfgAuthChallengeInterval=ipadPPPCfgAuthChallengeInterval, ipadDLCItxExBeThreshold=ipadDLCItxExBeThreshold, ipadDLCInumber=ipadDLCInumber, ipadPktSwCfgnN1=ipadPktSwCfgnN1, ipadModemDataTable=ipadModemDataTable, ipadPPPCfgDialMode=ipadPPPCfgDialMode, ipadPPPCfgCHAPSecret=ipadPPPCfgCHAPSecret, ipadModemDialAbortTimer=ipadModemDialAbortTimer, ipadPPPCfgNegCompression=ipadPPPCfgNegCompression, ipadDLCIstatsTxMgmtOctets=ipadDLCIstatsTxMgmtOctets, ipadPPPCfgCHAPUsername=ipadPPPCfgCHAPUsername, ipadModemDataTableIndex=ipadModemDataTableIndex, ipadDLCIstatsRxBECN=ipadDLCIstatsRxBECN, ipadPktSwCfgnN2=ipadPktSwCfgnN2, ipadIPTopNStatsTxOctets=ipadIPTopNStatsTxOctets, ipadFrPortTable=ipadFrPortTable, ipadDLCIstatsTxMgmtFrames=ipadDLCIstatsTxMgmtFrames, ipadDLCIstatsService=ipadDLCIstatsService, ipadPktSwCfgAutoDiscovery=ipadPktSwCfgAutoDiscovery, ipadPktSwCfgService=ipadPktSwCfgService, ipadFrPortStatsRxFrames=ipadFrPortStatsRxFrames, ipadPPPCfgNegIPCPCompression=ipadPPPCfgNegIPCPCompression, ipadModemDialDelayBeforeRedial=ipadModemDialDelayBeforeRedial, ipadFrPortStatsRxMgmtFrames=ipadFrPortStatsRxMgmtFrames, ipadUserIPStatStartTime=ipadUserIPStatStartTime, ipadEndpointRemoteIpMask=ipadEndpointRemoteIpMask, ipadEndpointName=ipadEndpointName, ipadUserTxAlmThreshold=ipadUserTxAlmThreshold, ipadPPPCfgACCM=ipadPPPCfgACCM, ipadTrapDestination=ipadTrapDestination, ipadMiscPortSettingsEntry=ipadMiscPortSettingsEntry, ipadUserIPStatDiscardType=ipadUserIPStatDiscardType, ipadFrPortStatsTxOctets=ipadFrPortStatsTxOctets, ipadFrPortStatsTxMgmtOctets=ipadFrPortStatsTxMgmtOctets, ipadEndpointDeleteEndpoint=ipadEndpointDeleteEndpoint, ipadRouter=ipadRouter, ipadUserDLCI=ipadUserDLCI, ipadDLCIencapsulation=ipadDLCIencapsulation, ipadModemDataAnswerScript=ipadModemDataAnswerScript, ipadPPPCfgPeerIpAddress=ipadPPPCfgPeerIpAddress, ipadEndpoint=ipadEndpoint, ipadServiceTableEntry=ipadServiceTableEntry, ipadFrPortRxInvAlmAlarm=ipadFrPortRxInvAlmAlarm, ipadFrPortTxAlmThreshold=ipadFrPortTxAlmThreshold, ipadFrPortRxAlmAlarm=ipadFrPortRxAlmAlarm, ipadEndpointBackup=ipadEndpointBackup, ipadUserTxAlmAlarm=ipadUserTxAlmAlarm, ipadDLCIstatsTable=ipadDLCIstatsTable, ipadTrapDestIndex=ipadTrapDestIndex, ipadDLCIstatsRxOctets=ipadDLCIstatsRxOctets, ipadDLCIstatsTxExcessBe=ipadDLCIstatsTxExcessBe, ipad=ipad, ipadServicePair=ipadServicePair, ipadPPPCfgSubnetMask=ipadPPPCfgSubnetMask, ipadPktSwCfgCIREE=ipadPktSwCfgCIREE, ipadSoftKeyExpirationDate=ipadSoftKeyExpirationDate, ipadPPPCfgInactivityTimer=ipadPPPCfgInactivityTimer, ipadUserIPMask=ipadUserIPMask, ipadPPPCHAPTableIndex=ipadPPPCHAPTableIndex, ipadIPTopNStatsIndex=ipadIPTopNStatsIndex, ipadDLCIstatsRxMgmtOctets=ipadDLCIstatsRxMgmtOctets, ipadFrPortLMIType=ipadFrPortLMIType, ipadModemDialTableEntry=ipadModemDialTableEntry, ipadDLCIstatsTxFrames=ipadDLCIstatsTxFrames, ipadt1e1CSSAlarmDeclared=ipadt1e1CSSAlarmDeclared, ipadModemDataTableEntry=ipadModemDataTableEntry, ipadPktSwCfgDefExBurst=ipadPktSwCfgDefExBurst, ipadUserTxExceeded=ipadUserTxExceeded, ipadSoftKeyAcronym=ipadSoftKeyAcronym, ipadDLCItxExBeAlarm=ipadDLCItxExBeAlarm, ipadChannelPair=ipadChannelPair, ipadPktSwCfgnN3=ipadPktSwCfgnN3, ipadSoftKeyEntry=ipadSoftKeyEntry, ipadEndpointLastChange=ipadEndpointLastChange, ipadPPPCfgTableEntry=ipadPPPCfgTableEntry, ipadDLCIstatsPeriod=ipadDLCIstatsPeriod, ipadDLCIstatsUAS=ipadDLCIstatsUAS, ipadFrPortStatsRxStatResp=ipadFrPortStatsRxStatResp, ipadUser=ipadUser, ipadFrPortStatsAverage=ipadFrPortStatsAverage, ipadPktSwOperatingMode=ipadPktSwOperatingMode, ipadModemDialLoginScript=ipadModemDialLoginScript, ipadDLCIUASAlarm=ipadDLCIUASAlarm, ipadUserStatsTxOctets=ipadUserStatsTxOctets, ipadDLCIactive=ipadDLCIactive, ipadUserIndex=ipadUserIndex, ipadEndpointRemoteIpAddr=ipadEndpointRemoteIpAddr, ipadDLCIremoteUnit=ipadDLCIremoteUnit, ipadServiceType=ipadServiceType, ipadPPPCfgNegMRU=ipadPPPCfgNegMRU, ipadUserFilterByIPPort=ipadUserFilterByIPPort, ipadFrPortStatsPeak=ipadFrPortStatsPeak, ipadDLCIstatsRxFECN=ipadDLCIstatsRxFECN, ipadFrPortStatsTxMgmtFrames=ipadFrPortStatsTxMgmtFrames, ipadPktSwitch=ipadPktSwitch, ipadDLCIpropOffset=ipadDLCIpropOffset, ipadPPPCfgService=ipadPPPCfgService, ipadPPPCfgNegCHAP=ipadPPPCfgNegCHAP, ipadService=ipadService, ipadPPPPAPTableEntry=ipadPPPPAPTableEntry, ipadIPTopNStatsTable=ipadIPTopNStatsTable, ipadDLCItxBEexceeded=ipadDLCItxBEexceeded, ipadChannel=ipadChannel, ipadPPPCfgNegAddress=ipadPPPCfgNegAddress, ipadIPTopNStatsRxFrames=ipadIPTopNStatsRxFrames, ipadDLCIstatsDLCI=ipadDLCIstatsDLCI, ipadt1e1RASAlarmExists=ipadt1e1RASAlarmExists, ipadPktSwCfgTable=ipadPktSwCfgTable, ipadUserIPStatTimeRemaining=ipadUserIPStatTimeRemaining, ipadModemDialPassword=ipadModemDialPassword, ipadUserStatsTxFrames=ipadUserStatsTxFrames, ipadModemDataHangupScript=ipadModemDataHangupScript, ipadt1e1ESAlarmDeclared=ipadt1e1ESAlarmDeclared, ipadEndpointTable=ipadEndpointTable, ipadDLCIstatsRxMgmtFrames=ipadDLCIstatsRxMgmtFrames, ipadt1e1AISAlarmExists=ipadt1e1AISAlarmExists, ipadPPPCfgPortIpAddress=ipadPPPCfgPortIpAddress, ipadUserIPStatRequestedReportSize=ipadUserIPStatRequestedReportSize, ipadDLCIminBC=ipadDLCIminBC, ipadt1e1BPVSAlarmDeclared=ipadt1e1BPVSAlarmDeclared, ipadserialDteDTRAlarmExists=ipadserialDteDTRAlarmExists, ipadMisc=ipadMisc, ipadPPPPAPTableIndex=ipadPPPPAPTableIndex, ipadDLCITable=ipadDLCITable, ipadServiceIndex=ipadServiceIndex, ipadDLCIinBand=ipadDLCIinBand, ipadDLCI=ipadDLCI, ipadPktSwCfgMgmtDLCI=ipadPktSwCfgMgmtDLCI, ipadFrPortStatsTxStatResp=ipadFrPortStatsTxStatResp, ipadEndpointForward=ipadEndpointForward, ipadUserStatsEntry=ipadUserStatsEntry, ipadPktSwCfgAutoDiagnostic=ipadPktSwCfgAutoDiagnostic, ipadTrapDestTable=ipadTrapDestTable, ipadModemDataModemName=ipadModemDataModemName, ipadMiscPortSettingsSerialType=ipadMiscPortSettingsSerialType, ipadPPPCfgTable=ipadPPPCfgTable, ipadUserIPStatReportNumber=ipadUserIPStatReportNumber, ipadDLCIproprietary=ipadDLCIproprietary, ipadIPTopNStatsTimestamp=ipadIPTopNStatsTimestamp, ipadServiceAddService=ipadServiceAddService, ipadUserService=ipadUserService, ipadFrPortTxThroughputExceeded=ipadFrPortTxThroughputExceeded, ipadPPPCfgPAPPassword=ipadPPPCfgPAPPassword, ipadIPTopNStatsTxFrames=ipadIPTopNStatsTxFrames, ipadPktSwCfgInterfaceType=ipadPktSwCfgInterfaceType, ipadFrPortRxInvalidFramesExceeded=ipadFrPortRxInvalidFramesExceeded, ipadModemDialTableIndex=ipadModemDialTableIndex, ipadFrPortStatsTxStatInq=ipadFrPortStatsTxStatInq, ipadFrPortTableEntry=ipadFrPortTableEntry, ipadPPPCfgNegACCM=ipadPPPCfgNegACCM, ipadPPPCfgPAPUsername=ipadPPPCfgPAPUsername, ipadModemDialRedialAttempts=ipadModemDialRedialAttempts, ipadFrPortStatsEntry=ipadFrPortStatsEntry, ipadDLCIservice=ipadDLCIservice, ipadDLCIRxCongestionExceeded=ipadDLCIRxCongestionExceeded, ipadSvcAware=ipadSvcAware, ipadDLCIremote=ipadDLCIremote, ipadEndpointAddEndpoint=ipadEndpointAddEndpoint, ipadModemDialTable=ipadModemDialTable, ipadIPTopNStatsEntry=ipadIPTopNStatsEntry, ipadPPPCHAPTableUsername=ipadPPPCHAPTableUsername, ipadUserIPStatTimeDuration=ipadUserIPStatTimeDuration, ipadPPPCfgMRU=ipadPPPCfgMRU, ipadDLCIstatsRoundTripTimeouts=ipadDLCIstatsRoundTripTimeouts, ipadDLCILastChange=ipadDLCILastChange, ipadt1e1UASAlarmDeclared=ipadt1e1UASAlarmDeclared, ipadDLCIdEctrl=ipadDLCIdEctrl, ipadDLCIstatsEntry=ipadDLCIstatsEntry, ipadSoftKey=ipadSoftKey, ipadSoftKeyDescription=ipadSoftKeyDescription, ipadFrPortStatsRxStatInq=ipadFrPortStatsRxStatInq, ipadFrPortStatsTable=ipadFrPortStatsTable, ipadPPP=ipadPPP, ipadUserStatsPeriod=ipadUserStatsPeriod) mibBuilder.exportSymbols("IPAD-MIB", ipadFrPortRxAlmThreshold=ipadFrPortRxAlmThreshold, ipadPPPPAPTableUsername=ipadPPPPAPTableUsername, ipadFrPortStatsRxBECN=ipadFrPortStatsRxBECN, ipadFrPortStatsRxInvLMI=ipadFrPortStatsRxInvLMI, ipadDLCIstatsPeak=ipadDLCIstatsPeak, ipadFrPortStatsRxOctets=ipadFrPortStatsRxOctets, ipadt1e1OOFSAlarmDeclared=ipadt1e1OOFSAlarmDeclared, ipadSoftKeyIndex=ipadSoftKeyIndex, ipadUserTableEntry=ipadUserTableEntry, ipadDLCIrxCongThreshold=ipadDLCIrxCongThreshold, ipadServiceTable=ipadServiceTable, ipadUserStatsRxFrames=ipadUserStatsRxFrames, ipadUserIPAddress=ipadUserIPAddress, ipadPPPCfgNegotiationInit=ipadPPPCfgNegotiationInit, ipadPktSwCfgDefCIR=ipadPktSwCfgDefCIR, ipadFrPortRxThroughputExceeded=ipadFrPortRxThroughputExceeded, ipadSoftKeyTableEntry=ipadSoftKeyTableEntry, ipadEndpointIndex=ipadEndpointIndex, ipadPktSwCfgTableEntry=ipadPktSwCfgTableEntry, ipadChannelIndex=ipadChannelIndex, ipadServiceDeleteService=ipadServiceDeleteService, ipadt1e1LOSSAlarmDeclared=ipadt1e1LOSSAlarmDeclared, ipadSoftKeyTable=ipadSoftKeyTable, ipadMiscClearStatusCounts=ipadMiscClearStatusCounts, ipadFrPortLMIMode=ipadFrPortLMIMode, ipadFrPortTxAlmAlarm=ipadFrPortTxAlmAlarm, ipadDLCIstatsTxExcessCIR=ipadDLCIstatsTxExcessCIR, ipadUserStatsIndex=ipadUserStatsIndex, ipadPPPCHAPTableEntry=ipadPPPCHAPTableEntry)
distancia = float(input('Digite a distancia em KM da viagem: ')) passag1 = distancia * 0.5 passag2 = distancia * 0.45 if distancia <= 200: print('Sua passagem vai custar R${:.2f}'.format(passag1)) else: print('Sua passagem vai custar R${:.2f}'.format(passag2))
f=float(8.11) print(f) i=int(f) print(i) j=7 print(type(j)) j=f print(j) print(type(j)) print(int(8.6))
def _impl(ctx): name = ctx.attr.name deps = ctx.attr.deps suites = ctx.attr.suites visibility = None # ctx.attr.visibility suites_mangled = [s.partition(".")[0].rpartition("/")[2] for s in suites] for s in suites_mangled: native.cc_test( name = "{}-{}".format(name, s), deps = deps, visibility = visibility, args = [s] ) native.test_suite( name = name, tests = [":{}-{}".format(name, s) for s in suites_mangled] ) persuite_bake_tests = rule( implementation = _impl, attrs = { "deps": attr.label_list(), "suites": attr.string_list(), }, )
while True: budget = float(input("Enter your budget : ")) available=budget break d ={"name":[], "quantity":[], "price":[]} l= list(d.values()) name = l[0] quantity= l[1] price = l[2] while True: ch = int(input("1.ADD\n2.EXIT\nEnter your choice : ")) if ch == 1 and available>0: pn = input("Enter product name : ") q = int(input("Enter quantity : ")) p = float(input("Enter price of the product : ")) if p>available: print("canot by product") continue else: if pn in name: ind = na.index(pn) price.remove(price[ind]) quantity.insert(ind, q) price.insert(ind, p) available = budget-sum(price) print("\namount left", available) else: name.append(pn) quantity.append(q) price.append(p) available= budget-sum(price) print("\namount left", available) elif available<= 0: print("no amount left") else: break print("\nAmount left : Rs.", available) if available in price: print("\nyou an buy", na[price.index(available)]) print("\n\n\nGROCERY LIST") for i in range(len(name)): print(name[i],quantity[i],price[i])
data="7.dat" s=0.0 c=0 with open(data) as fp: for line in fp: words=line.split(':') if(words[0]=="RMSE"): c+=1 # print(words[1]) s+=float(words[1]) # print(s) print("average:") print(s/c)
if __name__ == '__main__': n = int(input()) for num in range(n): print(num * num)
# # PySNMP MIB module ONEACCESS-CONFIGMGMT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ONEACCESS-CONFIGMGMT-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:34:15 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") ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion") oacExpIMManagement, oacRequirements, oacMIBModules = mibBuilder.importSymbols("ONEACCESS-GLOBAL-REG", "oacExpIMManagement", "oacRequirements", "oacMIBModules") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") Counter32, NotificationType, ObjectIdentity, Bits, Counter64, iso, ModuleIdentity, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Unsigned32, Gauge32, IpAddress, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "NotificationType", "ObjectIdentity", "Bits", "Counter64", "iso", "ModuleIdentity", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Unsigned32", "Gauge32", "IpAddress", "TimeTicks") DisplayString, TextualConvention, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "DateAndTime") oacConfigMgmtMIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 13191, 1, 100, 2001)) oacConfigMgmtMIBModule.setRevisions(('2011-10-27 00:00', '2010-07-08 10:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: oacConfigMgmtMIBModule.setRevisionsDescriptions(('Added MODULE-COMPLIANCE AND OBJECT GROUP, fixed some minor corrections.', "This MIB module describes a MIB for keeping track of changes on equipment's configuration.",)) if mibBuilder.loadTexts: oacConfigMgmtMIBModule.setLastUpdated('201110270000Z') if mibBuilder.loadTexts: oacConfigMgmtMIBModule.setOrganization(' OneAccess ') if mibBuilder.loadTexts: oacConfigMgmtMIBModule.setContactInfo('Pascal KESTELOOT Postal: ONE ACCESS 381 Avenue du Gnral de Gaulle 92140 Clamart, France FRANCE Tel: (+33) 01 41 87 70 00 Fax: (+33) 01 41 87 74 00 E-mail: [email protected]') if mibBuilder.loadTexts: oacConfigMgmtMIBModule.setDescription('Contact updated') oacExpIMConfigMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6)) oacConfigMgmtObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1)) oacCMHistory = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 1)) oacCMCopy = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2)) oacConfigMgmtNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 3)) oacCMHistoryRunningLastChanged = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 1, 1), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacCMHistoryRunningLastChanged.setStatus('current') if mibBuilder.loadTexts: oacCMHistoryRunningLastChanged.setDescription('The time when the running configuration was last changed.') oacCMHistoryRunningLastSaved = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 1, 2), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacCMHistoryRunningLastSaved.setStatus('current') if mibBuilder.loadTexts: oacCMHistoryRunningLastSaved.setDescription('The time when the running configuration was last saved (written).') oacCMHistoryStartupLastChanged = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 1, 3), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: oacCMHistoryStartupLastChanged.setStatus('current') if mibBuilder.loadTexts: oacCMHistoryStartupLastChanged.setDescription('The time when the startup configuration was last written to.') oacCMCopyIndex = MibScalar((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 1), IpAddress()) if mibBuilder.loadTexts: oacCMCopyIndex.setStatus('current') if mibBuilder.loadTexts: oacCMCopyIndex.setDescription('IP address used for configuration copy.') oacCMCopyTftpRunTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 2), ) if mibBuilder.loadTexts: oacCMCopyTftpRunTable.setStatus('current') if mibBuilder.loadTexts: oacCMCopyTftpRunTable.setDescription('Config Table for TFTP copy of running config.') oacCMCopyTftpRunEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 2, 1), ).setIndexNames((0, "ONEACCESS-CONFIGMGMT-MIB", "oacCMCopyIndex")) if mibBuilder.loadTexts: oacCMCopyTftpRunEntry.setStatus('current') if mibBuilder.loadTexts: oacCMCopyTftpRunEntry.setDescription('List of objects defining a conceptual copy tftp entry.') oacCMCopyTftpRun = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 2, 1, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacCMCopyTftpRun.setStatus('current') if mibBuilder.loadTexts: oacCMCopyTftpRun.setDescription('Name of the file on the server where the configuration script is located. This variable is in effect a write-only variable. Attempts to read this variable will result in a no-such-object response.') oacCMCopyRunTftpTable = MibTable((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 3), ) if mibBuilder.loadTexts: oacCMCopyRunTftpTable.setStatus('current') if mibBuilder.loadTexts: oacCMCopyRunTftpTable.setDescription('Config Table for copy of running config to tftp.') oacCMCopyRunTftpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 3, 1), ).setIndexNames((0, "ONEACCESS-CONFIGMGMT-MIB", "oacCMCopyIndex")) if mibBuilder.loadTexts: oacCMCopyRunTftpEntry.setStatus('current') if mibBuilder.loadTexts: oacCMCopyRunTftpEntry.setDescription('List of objects defining a conceptual copy tftp entry.') oacCMCopyRunTftp = MibTableColumn((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 2, 3, 1, 1), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: oacCMCopyRunTftp.setStatus('current') if mibBuilder.loadTexts: oacCMCopyRunTftp.setDescription('Name of the file on the server where the configuration script will be stored. This variable is in effect a write-only variable. Attempts to read this variable will result in a no-such-object response.') oacCMRunningConfigSaved = NotificationType((1, 3, 6, 1, 4, 1, 13191, 10, 3, 4, 6, 1, 3, 1)) if mibBuilder.loadTexts: oacCMRunningConfigSaved.setStatus('current') if mibBuilder.loadTexts: oacCMRunningConfigSaved.setDescription('The running configuration has been saved.') oacCMConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 5, 2001)) oacCMGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 5, 2001, 1)) oacCMCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 13191, 5, 2001, 2)) oacCMCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 13191, 5, 2001, 2, 1)).setObjects(("ONEACCESS-CONFIGMGMT-MIB", "oacCMGeneralGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): oacCMCompliance = oacCMCompliance.setStatus('current') if mibBuilder.loadTexts: oacCMCompliance.setDescription('The compliance statement for agents that support the ONEACCESS-CONFIGMGMT-MIB.') oacCMGeneralGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 13191, 5, 2001, 1, 1)).setObjects(("ONEACCESS-CONFIGMGMT-MIB", "oacCMHistoryRunningLastChanged"), ("ONEACCESS-CONFIGMGMT-MIB", "oacCMHistoryRunningLastSaved"), ("ONEACCESS-CONFIGMGMT-MIB", "oacCMHistoryStartupLastChanged")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): oacCMGeneralGroup = oacCMGeneralGroup.setStatus('current') if mibBuilder.loadTexts: oacCMGeneralGroup.setDescription('This group is mandatory for Configuration Management entity.') mibBuilder.exportSymbols("ONEACCESS-CONFIGMGMT-MIB", oacCMCompliances=oacCMCompliances, oacCMConformance=oacCMConformance, oacCMHistory=oacCMHistory, oacCMHistoryRunningLastChanged=oacCMHistoryRunningLastChanged, oacConfigMgmtMIBModule=oacConfigMgmtMIBModule, oacCMHistoryStartupLastChanged=oacCMHistoryStartupLastChanged, oacExpIMConfigMgmt=oacExpIMConfigMgmt, oacCMCopyRunTftp=oacCMCopyRunTftp, oacCMCopyTftpRunTable=oacCMCopyTftpRunTable, oacCMCopyTftpRunEntry=oacCMCopyTftpRunEntry, oacCMCopyRunTftpEntry=oacCMCopyRunTftpEntry, oacCMCopy=oacCMCopy, oacConfigMgmtObjects=oacConfigMgmtObjects, oacCMRunningConfigSaved=oacCMRunningConfigSaved, oacCMCopyIndex=oacCMCopyIndex, PYSNMP_MODULE_ID=oacConfigMgmtMIBModule, oacCMGroups=oacCMGroups, oacConfigMgmtNotifications=oacConfigMgmtNotifications, oacCMCopyTftpRun=oacCMCopyTftpRun, oacCMGeneralGroup=oacCMGeneralGroup, oacCMCompliance=oacCMCompliance, oacCMCopyRunTftpTable=oacCMCopyRunTftpTable, oacCMHistoryRunningLastSaved=oacCMHistoryRunningLastSaved)
coco_keypoints = [ "nose", # 0 "left_eye", # 1 "right_eye", # 2 "left_ear", # 3 "right_ear", # 4 "left_shoulder", # 5 "right_shoulder", # 6 "left_elbow", # 7 "right_elbow", # 8 "left_wrist", # 9 "right_wrist", # 10 "left_hip", # 11 "right_hip", # 12 "left_knee", # 13 "right_knee", # 14 "left_ankle", # 15 "right_ankle" # 16 ] coco_pairs = [ (0,1), # 0 nose to left_eye (0,2), # 1 nose to right_eye (1,3), # 2 left_eye to left_ear (2,4), # 3 right_eye to right_ear (5,6), # 4 left_shoulder to right_shoulder (5,7), # 5 left_shoulder to left_elbow (6,8), # 6 right_shoulder to right_elbow (7,9), # 7 left_elbow to left_wrist (8,10), # 8 right_elbow to right_wrist (11,12), # 9 left_hip to right_hip (11,13), # 10 left_hip to left_knee (12,14), # 11 right_hip to right_knee (13,15), # 12 left_knee to left_ankle (14,16) # 13 right_knee to right_ankle ]
#!/usr/bin/env python3 # https://codeforces.com/problemset/problem/675/A # 注意c可以是0或负数! def f(l): a,b,c = l if c==0: return a==b return (b-a)%c==0 and (b-a)//c>=0 l = list(map(int,input().split())) print('YES' if f(l) else 'NO')
# Return tracebacks with OperationOutcomes when an exceprion occurs DEBUG = False # How many items should we include in budles whwn count is not specified DEFAULT_BUNDLE_SIZE = 20 # Limit bundles to this size even if more are requested # TODO: Disable limiting when set to 0 MAX_BUNDLE_SIZE = 100 # Path to the models module MODELS_PATH = "models" # Which DB backend should be used # SQLAlchemy | DjangoORM | PyMODM DB_BACKEND = "SQLAlchemy" # Various settings related to how strictly the application handles # some situation. A value of True normally means that an error will be thrown STRICT_MODE = { # Throw or ignore attempts to set an attribute without having defined a setter func 'set_attribute_without_setter': False, # Throw when attempting to create a reference to an object that does not exist on the server 'set_non_existent_reference': False, }
peso = float(input('Digite o peso da pessoa \t')) engorda = peso + (peso*0.15) emagrece = peso - (peso*0.20) print('Se engordar , peso = ',engorda) print('Se emagrece , peso = ',emagrece)
#conditional tests- testing for equalities sanrio_1 = 'keroppi' print("Is sanrio == 'keroppi'? I predict True.") print(sanrio_1 == 'keroppi') sanrio_2 = 'hello kitty' print("Is sanrio == 'Hello Kitty'? I predict True.") print(sanrio_2 == 'hello kitty') sanrio_3 = 'pochacco' print("Is sanrio == 'Pochacco'? I predict True.") print(sanrio_3 == 'pochacco') sanrio_4 = 'chococat' print("Is sanrio == 'Chococat'? I predict True.") print(sanrio_4 == 'chococat') sanrio_5 = 'badtzmaru' print("Is sanrio == 'Badtzmaru'? I predict True.") print(sanrio_5 == 'badtzmaru') sanrio_6 = 'cinnamoroll' print("Is sanrio == 'Cinnamoroll'? I predict True.") print(sanrio_6 == 'cinnamoroll') sanrio_7 = 'gudetama' print("Is sanrio == 'Gudetama'? I predict True.") print(sanrio_7 == 'gudetama') sanrio_8 = 'my melody' print("Is sanrio == 'My Melody'? I predict True.") print(sanrio_8 == 'my melody') sanrio_9 = 'kuromi' print("Is sanrio == 'Kuromi'? I predict True.") print(sanrio_9 == 'kuromi') sanrio_10 = 'pompompurin' print("Is sanrio == 'Pompompurin'? I predict True.") print(sanrio_10 == 'pompompurin') #finding a false print("Is sanrio == 'Mickey'? I predict False.") print(sanrio_1 == 'mickey') print("Is sanrio == 'Minnie'? I predict False.") print(sanrio_2 == 'minnie') print("Is sanrio == 'Goffy'? I predict False.") print(sanrio_3 == 'goofy') print("Is sanrio == 'Donald'? I predict False.") print(sanrio_4 == 'donald') print("Is sanrio == 'Dasiy'? I predict False.") print(sanrio_5 == 'daisy') #testing for inequality sanrio_11 = 'aggretsuko' if sanrio_11 != 'pluto': print("\nThat is not a Sanrio character") #using the lower() method print(sanrio_11 == 'Aggretsuko') print(sanrio_11.lower() == 'aggretsuko') #checking if an item is on a list sanrio_friends = ['hello kitty', 'pochacco', 'keroppi'] friend = 'pickachu' if friend not in sanrio_friends: print(f"\n{friend.title()} is not part of the Sanrio friends.") #adult ages my_age = 28 print(my_age == 28) print(my_age < 50) print(my_age > 75) print(my_age <= 25) print(my_age >= 15) #if and else statements alien_colors = ['green', 'blue', 'yellow'] if 'green' in alien_colors: print("\n5 points for the green alien!") if 'blue' in alien_colors: print("10 points for a blue alien!") if 'yellow' in alien_colors: print("15 points for the yellow alien!") else: print("Looser!") favorite_fruits = ['strawberries', 'bananas', 'watermelon'] if 'strawberries' in favorite_fruits: print("\nStrawberry feilds forever!") if 'bananas' in favorite_fruits: print("\nThis ish is BANANAS!") if 'watermelon' in favorite_fruits: print("\nWatermelon-Sugar-HIGH!") else: print("\nThat is not a musically based fruit.") #if and elif statements with numbers dinseyland_guest_age = 28 if dinseyland_guest_age < 2: print("\nBabies are free of admission") elif dinseyland_guest_age < 4: print("\nToddlers are $25 for admission") elif dinseyland_guest_age < 13: print("\nChildren are $50 for admission") elif dinseyland_guest_age < 20: print("\nTeens are $75 for admission") elif dinseyland_guest_age < 65: print("\nAdults are $100 for admission") elif dinseyland_guest_age < 66: print("\nSeniors are $50 for admission") else: print("\nThe dead are not allowed.") #if statements with lists usernames = ['admin', 'assistant', 'supervisor'] for username in usernames: if username == 'admin': print("\nWelcome Admin. Would you like to see a status report?") else: print("\nHello, thank you for loggin in again.") #empty if statements logins = [] if logins: for login in logins: print(f"\nWe need to find some users") print("\nUser is here") else: print("\nUser failed to login.") #checking usernames- ensuring unique names within a list current_users = ['user1', 'user2', 'user3', 'user4', 'user5'] new_users = ['new1', 'new2', 'user3', 'new4', 'new5'] for new_user in new_users: if new_user in current_users: print("\nSorry, that username is taken. Please try again.") elif new_users == 'New1': print("\nUsername cannot be accepted as is. Try again") elif new_users == 'New2': print("\nUsername cannot be accepted as is. Try again") elif new_users == 'New4': print("\nUsername cannot be accepted as is. Try again") elif new_users == 'New5': print("\nUsername cannot be accepted as is. Try again") else: print("\nThis username is avaliable.") #ordinal numbers numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9] for number in numbers: if number == 1: print("1st") elif number == 2: print("2nd") elif number == 3: print("3rd") elif number == 4: print("4th") elif number == 5: print("5th") elif number == 6: print("6th") elif number == 7: print("7th") elif number == 8: print("8th") elif number == 9: print("9th") else: print("ERROR")
num =int(input(" Input a Number: ")) def factorsOf(num): factors=[] for i in range(1,num+1): if num%i==0: factors.append(i) print(factors) factorsOf(num)
# A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. # Write a function: that, given an array A consisting of N integers fulfilling the above conditions, returns the value of the unpaired element. def oddOccurancesInArray(A): if len(A) == 1: return A[0] A = sorted(A) # sort list # iterate through every other index for i in range(0 , len (A) , 2): # if next element is outside list, return last element if i+1 == len(A): return A[i] # if element doesnt match next element, return element if A[i] != A[i+1]: return A[i] print(oddOccurancesInArray([9, 3, 9, 3, 9, 7, 9]))
# Find which triangle numbers and which square numbers are the same # Written: 13 Jul 2016 by Alex Vear # Public domain. No rights reserved. STARTVALUE = 1 # set the start value for the program to test ENDVALUE = 1000000 # set the end value for the program to test for num in range(STARTVALUE, ENDVALUE): sqr = num*num for i in range(STARTVALUE, ENDVALUE): tri = ((i*(i+1))/2) if sqr == tri: print('Square Number:', sqr, ' ', 'Triangle Number:', tri, ' ', \ 'Squared:', num, ' ', 'Triangled:', i) else: continue
class Solution: def missingNumber(self, nums: List[int]) -> int: l = len(nums) return l * (1 + l) // 2 - sum(nums)
def quick_sort(data: list, first: int, last: int): if not isinstance(data, list): print(f'The data {data} MUST be of type list') return if not isinstance(first, int) or not isinstance(last, int): print(f'The args {first}, and {last} MUST be an index') return if first < last: # pi: Pivote Index pi = partitions(data, first, last) quick_sort(data, first, pi - 1) quick_sort(data, pi + 1, last) def partitions(data: list, first: int, last: int): if not isinstance(data, list): print(f'The data {data} MUST be of type list') return if not isinstance(first, int) or not isinstance(last, int): print(f'The args {first}, and {last} MUST be an index') return #pv: Pivot Value pv = data[first] lower = first + 1 upper = last done = False while not done: while lower <= upper and data[lower] <= pv: lower += 1 while data[upper] >= pv and upper >= lower: upper -= 1 if lower > upper: done = True else: data[lower], data[upper] = data[upper], data[lower] data[first], data[upper] = data[upper], data[first] return upper data = [87, 47, 23, 53, 20, 56, 6, 19, 8, 41] print(data) print( quick_sort(data, 0, len(data) - 1) ) print(data)
# ------------------------------ # 42. Trapping Rain Water # # Description: # Given n non-negative integers representing an elevation map where the width of each # bar is 1, compute how much water it is able to trap after raining. # (see picture on the website) # # Example: # Input: [0,1,0,2,1,0,1,3,2,1,2,1] # Output: 6 # # Version: 2.0 # 11/09/19 by Jianfa # ------------------------------ class Solution: def trap(self, height: List[int]) -> int: res = 0 current = 0 stack = [] while current < len(height): while stack and height[current] > height[stack[-1]]: last = stack.pop() if not stack: # if stack is empty after popping last out break distance = current - stack[-1] - 1 # get horizontal distance between current and left bar of the last height_diff = min(height[stack[-1]], height[current]) - height[last] # get the height distance between a lower bar and height[last] res += distance * height_diff stack.append(current) current += 1 return res # Used for testing if __name__ == "__main__": test = Solution() # ------------------------------ # Summary: # Stack solution from https://leetcode.com/problems/trapping-rain-water/solution/ # More concise than mine. It leverage the status of stack. If stack is empty, that means # current bar is the only higher bar than last bar so far. Otherwise, there must be a # left higher bar so that form a trap between it and current bar. # Repeat this until there is no lower bar than current one. # # O(n) time and O(n) space
# 并查集的代码模板 class UnionFind: def __init__(self, n: int): self.count = n self.parent = [i for i in range(n)] def find(self, p: int): temp = p while p != self.parent[p]: p = self.parent[p] while temp != self.parent[p]: temp, self.parent[temp] = self.parent[temp], p return p def union(self, p, q): pSet, qSet = self.find(p), self.find(q) if self.parent[pSet] != qSet: self.parent[pSet] = qSet self.count -= 1
# Scaler problem def solve(s, queries): left_most = [-1] * len(s) index = -1 for i in range(len(s) - 1, -1, -1): if s[i] == '1': index = i left_most[i] = index right_most = [-1] * len(s) index = -1 for i in range(len(s)): if s[i] == '1': index = i right_most[i] = index ones_count = [0] * len(s) count = 0 for i, ch in enumerate(s): if ch == '1': count += 1 ones_count[i] = count result = [] for left, right in queries: left = left_most[left - 1] right = right_most[right - 1] if -1 in (left, right) or left > right: result.append(0) continue total_bits = right - left + 1 ones = ones_count[right] - (0 if left == 0 else ones_count[left - 1]) result.append(total_bits - ones) return result res = solve("101010", [ [2, 2] ]) print(res)
class Solution(object): def majorityElement(self, nums): """ :type nums: List[int] :rtype: int """ hashmap = {} for num in nums: hashmap[num] = hashmap.setdefault(num, 0) + 1 max_value = -sys.maxint majority_element = None for num in hashmap.keys(): if hashmap[num] > max_value: max_value = hashmap[num] majority_element = num return majority_element
def getime(date): list1=[] for hour in range(8): for minute in range(0,56,5): if minute<10: time=str(date)+'-0'+str(hour)+':0'+str(minute)+':01' else: time=str(date)+'-0'+str(hour)+':'+str(minute)+':01' list1.append(time) for hour in range(8,24): if hour<10: for minute in range(0,60): if minute<10: time=str(date)+'-0'+str(hour)+':0'+str(minute)+':01' else: time=str(date)+'-0'+str(hour)+':'+str(minute)+':01' list1.append(time) else: for minute in range(0,60): if minute<10: time=str(date)+'-'+str(hour)+':0'+str(minute)+':01' else: time=str(date)+'-'+str(hour)+':'+str(minute)+':01' list1.append(time) return list1
HASH_KEY = 55 WORDS_LENGTH = 5 REQUIRED_WORDS = 365 MAX_GAME_ATTEMPTS = 6 WORDS_PATH = 'out/palabras5.txt' GAME_HISTORY_PATH = 'out/partidas.json' GAME_WORDS_PATH = 'out/palabras_por_fecha.json'
#hyperparameter hidden_size = 256 # hidden size of model layer_size = 3 # number of layers of model dropout = 0.2 # dropout rate in training bidirectional = True # use bidirectional RNN for encoder use_attention = True # use attention between encoder-decoder batch_size = 8 # batch size in training workers = 4 # number of workers in dataset loader max_epochs = 10 # number of max epochs in training lr = 1e-04 # learning rate teacher_forcing = 0.9 # teacher forcing ratio in decoder max_len = 80 # maximum characters of sentence seed = 1 # random seed mode = 'train' data_csv_path = './dataset/train/train_data/data_list.csv' DATASET_PATH = './dataset/train' # audio params SAMPLE_RATE = 16000 WINDOW_SIZE = 0.02 WINDOW_STRIDE = 0.01 WINDOW = 'hamming' # audio loader params SR = 22050 NUM_WORKERS = 4 BATCH_SIZE = 100 #600 #NUM_SAMPLES = 59049 # optimizer LR = 0.0001 WEIGHT_DECAY = 1e-5 EPS = 1e-8 # epoch MAX_EPOCH = 500 SEED = 123456 DEVICE_IDS=[0,1,2,3] # train params DROPOUT = 0.5 NUM_EPOCHS = 300
class ProcessorResults(): """ This class is a intended to be used as a standard results class to store every results object to be needed in the Processor class. """ def __init__(self): self.all_tracks = {}
''' write a function to sort a given list and return sorted list using sort() or sorted() functions''' def sorted_list(alist): return sorted(alist) sorted_me = sorted_list([5,2,1,7,8,3,2,9,4]) print(sorted_me) def sort_list(alist): return alist.sort() sort_me = sort_list([5,2,1,7,8,3,2,9,4]) print(sort_me)
# https://www.interviewbit.com/problems/sorted-insert-position/ # Sorted Insert Position # Given a sorted array and a target value, # return the index if the target is found. If not, # return the index where it would be if it were inserted in order. # [1,3,5,6], 5 → 2 # [1,3,5,6], 2 → 1 # [1,3,5,6], 7 → 4 # [1,3,5,6], 0 → 0 class Solution: # @param A : list of integers # @param B : integer # @return an integer def searchInsert(self, A, B): start = 0 end = len(A) while(start<end): mid = (start+end)//2 if A[mid]<B: start = mid + 1 else: end = mid return start
class Solution: def convert(self, s, numRows): """ :type s: str :type numRows: int :rtype: str """ if numRows == 1: return s else: p = [] placeholder = [] for _ in range(numRows): placeholder.append(p.copy()) bucket = 0 down = True for i in range(len(s)): placeholder[bucket].append(s[i]) if bucket == 0: down = True elif bucket == numRows - 1: down = False if down: bucket += 1 else: bucket -= 1 ret = '' for holder in placeholder: ret += ''.join(holder) return ret
""" Дана последовательность натуральных чисел, завершающаяся числом 0. Определите, какое наибольшее число подряд идущих элементов этой последовательности равны друг другу и что это за элемент. Т.е. если программе на вход подать последовательность [1, 2, 2, 3, 7, 4, 4, 4, 0, 5, 5, 5], то на печать программа должна вывести числа 4 и 3, где 4 - повторяющийся элемент, 3 - количество повторений """ def repeating_element(my_new_list: list) -> dict: #пустой словарь, в который занесем ключи, либо увеличим значения, если ключ уже имеется my_dict = {} #при появлении нового элемента его значение n = 1 n = 1 for i in my_new_list: if i not in my_dict: my_dict[i] = n else: my_dict[i] += 1 #переберем ключи, найдя наибольший my_new_dict = {} x = 0 for key, value in my_dict.items(): if value > x: my_new_dict.clear() my_new_dict[key] = value print(my_new_dict) if __name__ == "__main__": my_list = [1, 2, 2, 3, 7, 4, 4, 4, 0, 5, 5, 5] my_new_list = [] for i in my_list: if i != 0: my_new_list.append(i) else: break repeating_element(my_new_list)
# Parent key is matching the django language. # Child key is matching the VeeValidate lang codes # https://logaretm.github.io/vee-validate/guide/localization.html#using-the-default-i18n vv_locale = { "ar": { "ar": { "messages": { "alpha": "{_field_} يجب ان يحتوي على حروف فقط", "alpha_num": "{_field_} قد يحتوي فقط على حروف وارقام", "alpha_dash": "{_field_} قد يحتوي على حروف او الرموز - و _", "alpha_spaces": "{_field_} قد يحتوي فقط على حروف ومسافات", "between": "قيمة {_field_} يجب ان تكون ما بين {min} و {max}", "confirmed": "{_field_} لا يماثل التأكيد", "digits": "{_field_} يجب ان تحتوي فقط على ارقام والا يزيد عددها عن {length} رقم", "dimensions": "{_field_} يجب ان تكون بمقاس {width} بكسل في {height} بكسل", "email": "{_field_} يجب ان يكون بريدا اليكتروني صحيح", "excluded": "الحقل {_field_} غير صحيح", "ext": "نوع ملف {_field_} غير صحيح", "image": "{_field_} يجب ان تكون صورة", "integer": "الحقل {_field_} يجب ان يكون عدداً صحيحاً", "length": "حقل {_field_} يجب الا يزيد عن {length}", "max_value": "قيمة الحقل {_field_} يجب ان تكون اصغر من {min} او تساويها", "max": "الحقل {_field_} يجب ان يحتوي على {length} حروف على الأكثر", "mimes": "نوع ملف {_field_} غير صحيح", "min_value": "قيمة الحقل {_field_} يجب ان تكون اكبر من {min} او تساويها", "min": "الحقل {_field_} يجب ان يحتوي على {length} حروف على الأقل", "numeric": "{_field_} يمكن ان يحتوي فقط على ارقام", "oneOf": "الحقل {_field_} يجب ان يكون قيمة صحيحة", "regex": "الحقل {_field_} غير صحيح", "required": "{_field_} مطلوب", "required_if": "حقل {_field_} مطلوب", "size": "{_field_} يجب ان يكون اقل من {size} كيلوبايت", } } }, "en-us": { "en": { "messages": { "alpha": "The {_field_} field may only contain alphabetic characters", "alpha_num": "The {_field_} field may only contain alpha-numeric characters", "alpha_dash": "The {_field_} field may contain alpha-numeric characters as well as dashes and underscores", "alpha_spaces": "The {_field_} field may only contain alphabetic characters as well as spaces", "between": "The {_field_} field must be between {min} and {max}", "confirmed": "The {_field_} field confirmation does not match", "digits": "The {_field_} field must be numeric and exactly contain {length} digits", "dimensions": "The {_field_} field must be {width} pixels by {height} pixels", "email": "The {_field_} field must be a valid email", "excluded": "The {_field_} field is not a valid value", "ext": "The {_field_} field is not a valid file", "image": "The {_field_} field must be an image", "integer": "The {_field_} field must be an integer", "length": "The {_field_} field must be {length} long", "max_value": "The {_field_} field must be {max} or less", "max": "The {_field_} field may not be greater than {length} characters", "mimes": "The {_field_} field must have a valid file type", "min_value": "The {_field_} field must be {min} or more", "min": "The {_field_} field must be at least {length} characters", "numeric": "The {_field_} field may only contain numeric characters", "oneOf": "The {_field_} field is not a valid value", "regex": "The {_field_} field format is invalid", "required_if": "The {_field_} field is required", "required": "The {_field_} field is required", "size": "The {_field_} field size must be less than {size}KB", } } }, }
class Solution: """ Note: for UnionFind structure, see Structures/UnionFind/uf.py. """ def findRedundantConnection(self, edges: List[List[int]]) -> List[int]: # Yes, goes from 0-n+1 but we don't use 0. uf = UnionFind(range(len(edges)+1)) last = None for (u, v) in edges: if uf.find(u) == uf.find(v): last = [u, v] else: uf.union(u, v) return last
def extractXiakeluojiao侠客落脚(item): """ Xiakeluojiao 侠客落脚 """ badwords = [ 'korean drama', 'badword', ] if any([bad in item['tags'] for bad in badwords]): return None vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None tagmap = [ ('Princess Weiyang', 'The Princess Wei Yang', 'translated'), ] for tagname, name, tl_type in tagmap: if tagname in item['tags']: return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type) if item['title'].startswith("Chapter ") and item['tags'] == []: return buildReleaseMessageWithType(item, 'Zhu Xian', vol, chp, frag=frag, postfix=postfix) return False
def solution(A): h = set(A) l = len(h) for i in range(1, l+1): if i not in h: return i return -1 # final check print(solution([1, 2, 3, 4, 6]))
class BitmaskPrinter: bitmask_object_template = '''/* Autogenerated Code - do not edit directly */ #pragma once #include <stdint.h> #include <jude/core/c/jude_enum.h> #ifdef __cplusplus extern "C" { #endif typedef uint%SIZE%_t %BITMASK%_t; extern const jude_bitmask_map_t %BITMASK%_bitmask_map[]; #ifdef __cplusplus } #include <jude/jude.h> namespace jude { class %BITMASK% : public BitMask { public: enum Value { %VALUES%, __INVALID_VALUE }; %BITMASK%(Object& parent, jude_size_t fieldIndex, jude_size_t arrayIndex = 0) : BitMask(%BITMASK%_bitmask_map[0], parent, fieldIndex, arrayIndex) {} static const char* GetString(Value value); static const char* GetDescription(Value value); static const Value* FindValue(const char* name); static Value GetValue(const char* name); // Backwards compatibility static auto AsText(Value value) { return GetString(value); }; %BIT_ACCESSORS% }; } /* namespace jude */ #endif ''' bitmask_accessors_template = ''' bool Is_%BIT%() const { return BitMask::IsBitSet(%BIT%); } void Set_%BIT%() { return BitMask::SetBit(%BIT%); } void Clear_%BIT%() { return BitMask::ClearBit(%BIT%); } ''' bitmask_source_template = ''' #include "%BITMASK%.h" extern "C" const jude_bitmask_map_t %BITMASK%_bitmask_map[] = { %VALUES%, JUDE_ENUM_MAP_END }; namespace jude { const jude_size_t %BITMASK%_COUNT = (jude_size_t)(sizeof(%BITMASK%_bitmask_map) / sizeof(%BITMASK%_bitmask_map[0])); const char* %BITMASK%::GetString(%BITMASK%::Value value) { return jude_enum_find_string(%BITMASK%_bitmask_map, value); } const char* %BITMASK%::GetDescription(%BITMASK%::Value value) { return jude_enum_find_description(%BITMASK%_bitmask_map, value); } const %BITMASK%::Value* %BITMASK%::FindValue(const char* name) { return (const %BITMASK%::Value*)jude_enum_find_value(%BITMASK%_bitmask_map, name); } %BITMASK%::Value %BITMASK%::GetValue(const char* name) { return (%BITMASK%::Value)jude_enum_get_value(%BITMASK%_bitmask_map, name); } } ''' def __init__(self, importPrefix, name, bitmask_def): print("Parsing bitmask: ", name, "...") self.name = name self.importPrefix = importPrefix self.bits = [] self.size = 8 for label, data in bitmask_def.items(): bit = 0 description = '' if isinstance(data,dict): if not data.__contains__('bit'): raise SyntaxError("bitmask bit defined as dictionary but no 'bit' given: " + data) bit = int(data['bit']) if data.__contains__('description'): description = data['description'] elif isinstance(data,int): bit = data else: raise SyntaxError("bitmask element not defined as dictionary or int: " + bit) if bit < 0 or bit > 63: raise SyntaxError("bitmask bit value %d is not allowed, should be in range [0,63]" % bit) if bit > 7 and self.size < 16: self.size = 16 elif bit > 15 and self.size < 32: self.size = 32 if bit > 31: self.size = 64 self.bits.append((label, bit, description)) # sort list by the bit values self.bits = sorted(self.bits, key=lambda x: x[1]) def create_object(self): c_values = ',\n'.join([" %s = %d" % (x, y) for (x,y,z) in self.bits]) bit_accessors = ''.join([self.bitmask_accessors_template \ .replace("%BITMASK%", str(self.name))\ .replace("%BIT%", str(x)) for (x,y,z) in self.bits]) return self.bitmask_object_template.replace("%VALUES%", str(c_values)) \ .replace("%SIZE%", str(self.size)) \ .replace("%BITMASK%", str(self.name)) \ .replace("%BIT_ACCESSORS%", str(bit_accessors)) \ .replace("%FILE%", str(self.name).upper()) def create_source(self): values = ',\n'.join([' JUDE_ENUM_MAP_ENTRY(%s, %s, "%s")' % (x,y,z) for (x,y,z) in self.bits]) return self.bitmask_source_template.replace("%VALUES%", str(values)) \ .replace("%BITMASK%", str(self.name)) \ .replace("%FILE%", str(self.name).upper())
# -------------------------------------------------- class: AddonInstallSettings ------------------------------------------------- # class AddonInstallSettings: # --------------------------------------------------------- Init --------------------------------------------------------- # def __init__( self, path: str ): self.path = path # ---------------------------------------------------- Public methods ---------------------------------------------------- # def post_install_action( self, browser,#: Firefox, Chrome, etc. addon_id: str, internal_addon_id: str, addon_base_url: str ) -> None: return None # -------------------------------------------------------------------------------------------------------------------------------- #
''' Description: You are given the root of a binary tree with n nodes, where each node is uniquely assigned a value from 1 to n. You are also given a sequence of n values voyage, which is the desired pre-order traversal of the binary tree. Any node in the binary tree can be flipped by swapping its left and right subtrees. For example, flipping node 1 will have the following effect: Flip the smallest number of nodes so that the pre-order traversal of the tree matches voyage. Return a list of the values of all flipped nodes. You may return the answer in any order. If it is impossible to flip the nodes in the tree to make the pre-order traversal match voyage, return the list [-1]. Example 1: Input: root = [1,2], voyage = [2,1] Output: [-1] Explanation: It is impossible to flip the nodes such that the pre-order traversal matches voyage. Example 2: Input: root = [1,2,3], voyage = [1,3,2] Output: [1] Explanation: Flipping node 1 swaps nodes 2 and 3, so the pre-order traversal matches voyage. Example 3: Input: root = [1,2,3], voyage = [1,2,3] Output: [] Explanation: The tree's pre-order traversal already matches voyage, so no nodes need to be flipped. Constraints: The number of nodes in the tree is n. n == voyage.length 1 <= n <= 100 1 <= Node.val, voyage[i] <= n All the values in the tree are unique. All the values in voyage are unique. ''' class Solution: def flipMatchVoyage(self, root, voyage): # ------------------------------ def dfs(root): if not root: # base case aka stop condition # empty node or empty tree return True ## general cases if root.val != voyage[dfs.idx]: # current node mismatch, no chance to make correction by flip return False # voyage index moves forward dfs.idx += 1 if root.left and (root.left.val != voyage[dfs.idx]): # left child mismatch, flip with right child if right child exists root.right and result.append( root.val ) # check subtree in preorder DFS with child node flip return dfs(root.right) and dfs(root.left) else: # left child match, check subtree in preorder DFS return dfs(root.left) and dfs(root.right) # -------------------------- # flip sequence result = [] # voyage index during dfs dfs.idx = 0 # start checking from root node good = dfs(root) return result if good else [-1] # n : the number of nodes in binary tree ## Time Complexity: O( n ) # # The overhead in time is the cost of dfs traversal, which is of O( n ) ## Sapce Complexity: O( n ) # # The overhead in space is the storage for recursion call stack, which is of O( n )
""" b = [int(x) for x in input().split()] del b[0] prefix = 0 suffix = 0 ans = 0 for n in range(len(b)): prefix += b[n] suffix += b[-n-1] if prefix == suffix: ans += 1 print(ans) """ a = input() print(20156 if a.startswith('1') else 1)
# 计数器 flowFile = session.get() if flowFile != None: session.adjustCounter("SampleScriptCounter", 1, False) session.transfer(flowFile, REL_SUCCESS)
#!/usr/bin/env python3 """Utilities for building services in the Ride2Rail project.""" __version__ = '0.2.0' __all__ = ['cli_utils', 'cache_operations', 'logging', 'normalization']
#!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == '__main__': Named = str(input(" Введите название футбольной команды ")) s = int(len(Named)) for i in range(s): print(Named[i])
installed_extensions = [ 'azext_identitydirmgt_v1_0', 'azext_planner_v1_0', 'azext_identitysignins_v1_0', 'azext_schemaextensions_v1_0', 'azext_mail_v1_0', 'azext_files_v1_0', 'azext_notes_v1_0', 'azext_crossdeviceexperiences_v1_0', 'azext_cloudcommunications_v1_0', 'azext_directoryobjects_v1_0', 'azext_usersfunctions_v1_0', 'azext_applications_v1_0', 'azext_people_v1_0', 'azext_calendar_v1_0', 'azext_devicescorpmgt_v1_0', 'azext_changenotifications_v1_0', 'azext_usersactions_v1_0', 'azext_personalcontacts_v1_0', 'azext_reports_v1_0', 'azext_users_v1_0', 'azext_security_v1_0', 'azext_education_v1_0', ]
# Fields for the tables generated from the mysql dump table_fields = {"commits": [ "author_id", "committer_id", "project_id", "created_at" ], "counters": [ "id", "date", "commit_comments", "commit_parents", "commits", "followers", "organization_members", "projects", "users", "issues", "pull_requests", "issue_comments", "pull_request_comments", "pull_request_history", "watchers", "forks" ], "followers": [ "follower_id", "user_id" ], "forks": [ "forked_project_id", "forked_from_id", "created_at" ], "issues": [ "repo_id", "reporter_id", "assignee_id", "created_at" ], "organization_members": [ "org_id", "user_id", "created_at" ], "project_commits": [ "project_id", "commit_id" ], "project_members": [ "repo_id", "user_id", "created_at" ], "projects": [ "id", "owned_id", "name", "language", "created_at", "forked_from", "deleted" ], "pull_requests": [ "id", "head_repo_id", "base_repo_id", "head_commit_id", "base_commid_id", "user_id", "merged" ], "users": [ "id", "login", "name", "company", "location", "email", "created_at", "type" ], "watchers": [ "repo_id", "user_id", "created_at" ]}