content
stringlengths
7
1.05M
#todos os is #exemplo isnumeric,isalpha,islower etc a= input ('digite algo') print('o tipo primitivo desse valor é:',type(a)) print('é nuumerico?',a.isnumeric()) print('é alfa numerico?',a.isalnum()) print('é alfa?',a.isalpha()) #...a.islower() #...a.istitle() #...a.isdecimal()
class RequestManipulator: ''' This class can be used to inspect or manipulate output created by the sdc client. Output creation is done in three steps: first a pysdc.pysoap.soapenvelope.Soap12Envelope is created, then a (libxml) etree is created from its content, anf finally a bytestring is generated from the etree. The sdc client calls corresponding methods of the manipulator object after every step. If the method returns something different from None, this returned value will be used as input for the next step. ''' def __init__(self, cb_soapenvelope=None, cb_xml=None, cb_string=None): ''' :param cb_soapenvelope: a callback that gets the SoapEnvelope instance as parameter :param cb_xml: a callback that gets the etree instance as parameter :param cb_string: a callback that gets the output string as parameter ''' self.cb_soapenvelope = cb_soapenvelope self.cb_xml = cb_xml self.cb_string = cb_string def manipulate_soapenvelope(self, soap_envelope): if callable(self.cb_soapenvelope): return self.cb_soapenvelope(soap_envelope) def manipulate_domtree(self, domtree): if callable(self.cb_xml): return self.cb_xml(domtree) def manipulate_string(self, xml_string): if callable(self.cb_string): return self.cb_string(xml_string)
# https://leetcode.com/problems/single-element-in-a-sorted-array/ # You are given a sorted array consisting of only integers where every element # appears exactly twice, except for one element which appears exactly once. Find # this single element that appears only once. # Follow up: Your solution should run in O(log n) time and O(1) space. ################################################################################ # check if mid % 2 == 0 # if even, check nums[mid] == nums[mid + 1] # if odd, check nums[mid] == nums[mid - 1] class Solution: def singleNonDuplicate(self, nums: List[int]) -> int: if len(nums) == 1: return nums[0] left, right = 0, len(nums) - 1 while left + 1 < right: mid = left + (right - left) // 2 if mid % 2 == 0: # mid if even if nums[mid] == nums[mid + 1]: # single num is on right left = mid + 2 else: right = mid else: # mid if odd if nums[mid] == nums[mid - 1]: # single num is on right left = mid + 1 else: right = mid if right == len(nums) - 1: return nums[right] if nums[left] == nums[left - 1] else nums[left] else: return nums[left] if nums[right] == nums[right + 1] else nums[right]
class Solution: def findDuplicates(self, nums: List[int]) -> List[int]: if not len(nums): return nums l = [0 for i in range(len(nums)+1)] for i in range(len(nums)): n = nums[i] if l[n]==0: l[n]= 1 else: l[n]+=1 r = [] for i in range(1,len(l)): if l[i]>1: r.append(i) return r
# terrascript/resource/at-wat/ucodecov.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:29:37 UTC) __all__ = []
#Guess my number #Week 2 Finger Exercise 3 print ("Please think of a number between 0 and 100!") print ("Is your secret number 50?") s=[x for x in range (100)] i=input("Enter 'h' to indicate the guess is too high. Enter 'l' to indicate the guess is too low. Enter 'c' to indicate I guessed correctly.") j=0 k=len(s) m=50 while i!="c": if i!="l": if i!="h": if i!="c": print ("Sorry, I did not understand your input.") print ("Is your secret number "+str(s[m])+"?") i=input("Enter 'h' to indicate the guess is too high. Enter 'l' to indicate the guess is too low. Enter 'c' to indicate I guessed correctly.") if i == "h": k=m m=int((j+k)/2) print ("Is your secret number "+str(s[m])+"?") i=input("Enter 'h' to indicate the guess is too high. Enter 'l' to indicate the guess is too low. Enter 'c' to indicate I guessed correctly.") if i=="c": break elif i=="l": j=m m=int((j+k)/2) print ("Is your secret number "+str(s[m])+"?") i=input("Enter 'h' to indicate the guess is too high. Enter 'l' to indicate the guess is too low. Enter 'c' to indicate I guessed correctly.") if i=="c": break elif i=="c": break if i=="c": print ("Game over. Your secret number was: "+str(s[m]))
soma = 0 cont = 1 while cont <= 5: x = float(input("Digite a {} nota: ".format(cont))) soma = soma + x cont = cont + 1 media = soma / 5 print('A media final {}'.format(media))
#A program to count the words "to" and "the" present in a text file "poem.txt". countTo = 0 countThe = 0 file = open("poem.txt", "r") listObj = file.readlines() for index in listObj: word = index.split() for search in word: if search == "to": countTo += 1 elif search == "the": countThe += 1 print("Number of 'to': " ,countTo) print("Number of 'the': " ,countThe) file.close()
FirstLetter = "Hello" SecondLetter = "World" print(f"{FirstLetter} {SecondLetter}!")
# -*- coding: utf-8 -*- # The union() method returns a new set with all items from both sets: set1 = {"a", "b" , "c"} set2 = {1, 2, 3} set3 = set1.union(set2) print(set3) # Return a set that contains the items that exist in both set x, and set y: x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} z = x.intersection(y) print(z) # Keep the items that are not present in both sets: x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} x.symmetric_difference_update(y) print(z)
nums1 = {1, 2, 7, 3, 4, 5} nums2 = {4, 5, 6, 8} nums3 = {9, 10} distinct_nums = nums1.union(nums2, nums3) print( distinct_nums)
class Descriptor(object): """.""" def __init__(self, name=None): """.""" self.name = name def __get__(self, instance, owner): """.""" return instance.__dict__[self.name] def __set__(self, instance, value): """.""" instance.__dict__[self.name] = value def __delete__(self, instance): """.""" del instance.__dict__[self.name] class Typed(Descriptor): """.""" _type = object def __set__(self, instance, value): """.""" if not isinstance(value, self.__class__._type): order = (self.__class__._type.__name__, self.name, value.__class__.__name__) raise TypeError("Expected type '%s' for parameter '%s' but got '%s'" % order) super(Typed, self).__set__(instance, value)
class Solution: def maxAreaOfIsland(self, grid): """ :type grid: List[List[int]] :rtype: int """ maxArea = 0 for i in range(len(grid)): for j in range(len(grid[0])): if grid[i][j] == 1: maxArea = max(maxArea, self.dfs(grid, i, j)) return maxArea def dfs(self, grid, i, j): if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0: return 0 temMaxArea = 1 grid[i][j] = 0 temMaxArea = temMaxArea + self.dfs(grid, i - 1, j) + self.dfs(grid, i + 1, j) + self.dfs(grid, i, j - 1) + self.dfs(grid, i, j + 1) return temMaxArea
"""This script demonstrates the bubble sort algorithm in Python 3.""" AGES = [19, 20, 13, 1, 15, 7, 11, 3, 16, 10] def display(): """Prints all the items in the list.""" print("The ages are: ") for i in range(len(AGES)): print(AGES[i]) print("\n") def bubble_sort(array): """Repeatedly step through the list, compare adjacent items and swap them if they are in the wrong order. Time complexity of O(n^2). Parameters ---------- array : iterable A list of unsorted numbers Returns ------- array : iterable A list of sorted numbers """ for i in range(len(array) - 1): for j in range(len(array) - 1 - i): if array[j] > array[j + 1]: array[j], array[j + 1] = array[j + 1], array[j] return array if __name__ == '__main__': display() bubble_sort(AGES) display()
# fmt: off print(2.2j.real) print(2.2j.imag) print(1.1+0.5j.real) print(1.1+0.5j.imag)
#!/usr/bin/env python # # Decoder for Texecom Connect API/Protocol # # Copyright (C) 2018 Joseph Heenan # Updates Jul 2020 Charly Anderson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. class Area: """Information about an area and it's current state""" def __init__(self, area_number): self.number = area_number self.text = "Area{:d}".format(self.number) self.state = None self.state_text = None self.zones = {} def save_state(self, area_state): """save state and decoded text""" self.state = area_state self.state_text = [ "disarmed", "in exit", "in entry", "armed", "part armed", "in alarm", ][self.state]
def test_get_work_film(work_object_film): details = work_object_film.get_details() if not isinstance(details, dict): raise AssertionError() if not len(details) == 17: print(len(details)) raise AssertionError() def test_rating_work_film(work_object_film): main_rating = work_object_film.get_main_rating() if not isinstance(main_rating, str): raise AssertionError() if not main_rating == "7.3": raise AssertionError() def test_rating_details_work_film(work_object_film): rating_details = work_object_film.get_rating_details() if not isinstance(rating_details, dict): raise AssertionError() if not len(rating_details) == 10: raise AssertionError() def test_title_work_film(work_object_film): title = work_object_film.get_title() if not title == "Le Chant du loup": raise AssertionError() def test_year_work_film(work_object_film): year = work_object_film.get_year() if not year == "2019": raise AssertionError() def test_cover_url_work_film(work_object_film): cover_url = work_object_film.get_cover_url() if not isinstance(cover_url, str): raise AssertionError() if ( not cover_url == "https://media.senscritique.com/media/000018537250/160/Le_Chant_du_loup.jpg" ): raise AssertionError() def test_complementary_infos_work_film(work_object_film): complementary_infos = work_object_film.get_complementary_infos() if not isinstance(complementary_infos, dict): raise AssertionError() def test_review_count_work_film(work_object_film): review_count = work_object_film.get_review_count() if not isinstance(review_count, str): raise AssertionError() def test_vote_count_work_film(work_object_film): vote_count = work_object_film.get_vote_count() if not isinstance(vote_count, str): raise AssertionError() def test_favorite_count_work_film(work_object_film): favorite_count = work_object_film.get_favorite_count() if not isinstance(favorite_count, str): raise AssertionError() def test_wishlist_count_work_film(work_object_film): wishlist_count = work_object_film.get_wishlist_count() if not isinstance(wishlist_count, str): raise AssertionError() def test_in_progress_count_work_film(work_object_film): # movies don't have in_progress element in_progress_count = work_object_film.get_in_progress_count() if in_progress_count: raise AssertionError()
numbers_1 = [1, 2, 3, 4] numbers_2 = [3, 4, 5, 6] answer = [number for number in numbers_1 if number in numbers_2] print(answer) friends = ['Elie', 'Colt', 'Matt'] answer2 = [friend.lower()[::-1] for friend in friends] print(answer2)
# -*- coding: utf-8 -*- def GetCookie(raw_cookies): """Get raw_cookies with Chrome or Fiddler.""" COOKIE = {} for line in raw_cookies.split(';'): key, value = line.split("=", 1) COOKIE[key] = value return(COOKIE)
""" After years of study, scientists have discovered an alien language transmitted from a faraway planet. The alien language is very unique in that every word consists of exactly L lowercase letters. Also, there are exactly D words in this language. Once the dictionary of all the words in the alien language was built, the next breakthrough was to discover that the aliens have been transmitting messages to Earth for the past decade. Unfortunately, these signals are weakened due to the distance between our two planets and some of the words may be misinterpreted. In order to help them decipher these messages, the scientists have asked you to devise an algorithm that will determine the number of possible interpretations for a given pattern. A pattern consists of exactly L tokens. Each token is either a single lowercase letter (the scientists are very sure that this is the letter) or a group of unique lowercase letters surrounded by parenthesis ( and ). For example: (ab)d(dc) means the first letter is either a or b, the second letter is definitely d and the last letter is either d or c. Therefore, the pattern (ab)d(dc) can stand for either one of these 4 possibilities: add, adc, bdd, bdc. Please note that sample i/p and o/p is given in the link below Link [https://code.google.com/codejam/contest/90101/dashboard#s=p0] """ def extract(d): L = int(d[0]) D = int(d[1]) N = int(d[2]) d = d[3:] w_list = d[:D] inp = d[D:] return L, D, N, w_list, inp def separate(l): """ Sweeps through l from left to right and separates the format into a list of three. If parens found, goes into collection mode before adding to result list """ tmp = '' res = [] coll = False for i in l: # Collection mode enable/disable if i == '(': coll = True tmp = '' continue elif i == ')': coll = False res.append(tmp) continue # if collection mode, add to temp, else directly append to result list if coll: tmp += i else: res.append(i) return res def compare(length, i_list, w_list): n = 0 for w in w_list: for m in range(length): if w[m] not in i_list[m]: break else: n += 1 return n def main(): with open('A-large-practice.in') as f: data = f.read().split() L, D, N, w_list, inp = extract(data) for n, i in enumerate(inp): inp[n] = separate(i) out = compare(L, inp[n], w_list) print('Case #{}: {}'.format(n+1, out)) if __name__ == "__main__": main()
#!/usr/bin/python # Examples of function in Python 3.x # When you need a function? # When you want to perform a set of specific tasks and want to reuse that code whenever required # Also, for better modularity, readability and troubleshooting # How to write a function (Syntax)? '''def function_name(): { # some code here } ''' # Different ways to pass parameters # What to return through function # A basic function of adding two numbers def add_numbers(num1, num2): return num1+num2 # How to call a function? # most basic way to call a function is `function_name()` # Calling above function print(add_numbers(5,4)) # Function to find if a number is even def is_even(num): if num%2 == 0: return True return False num = 12 result = is_even(num) if result: print(f'{num} is even') else: print(f'{num} is not even')
#!/usr/bin/python3 """ 1-main """ FIFOCache = __import__('1-fifo_cache').FIFOCache my_cache = FIFOCache() my_cache.put("A", "Hello") my_cache.put("B", "World") my_cache.put("C", "Holberton") my_cache.put("D", "School") my_cache.print_cache() my_cache.put("E", "Battery") my_cache.print_cache() my_cache.put("C", "Street") my_cache.print_cache() my_cache.put("F", "Mission") my_cache.print_cache()
print("Welcome!") is_able_to_ride = "" first_rider_age = int(input("What is the age of the first rider? ")) first_rider_height = float(input("What is the height of the first rider? ")) is_a_second_rider = input("Is there a second rider (yes/no)? ") if is_a_second_rider == "yes": second_rider_age = int(input("What is the age of the second rider? ")) second_rider_height = float(input("What is the height of the second rider? ")) if first_rider_height >= 36 and second_rider_height >= 36: if first_rider_age >= 18 or second_rider_age >= 18: is_able_to_ride = True else: is_able_to_ride = False else: is_able_to_ride = False elif is_a_second_rider == "no": if first_rider_age >= 18 and first_rider_height >= 62: is_able_to_ride = True else: is_able_to_ride = False else: print("you should put yes or no") if is_able_to_ride: print("You can ride!") elif is_able_to_ride == False: print("You can't ride!")
def main(): pass # Run this when called from CLI if __name__ == "__main__": main()
# test for for x in range(10): print(x) for x in range(3, 10): print(x) for x in range(1, 10, 3): print(x) for i, v in enumerate(["a", "b", "c"]): print(i, v) for x in [1,2,3,4]: print(x) for k, v in d.items(): print(x) for a, b, c in [(1,2,3), (4,5,6)]: a = a + 1 b = b * 2 c = c / 3 d = a + b + c print(a,"x",b,"x",c) while True: print("forever") while x < 10: x += 1
class ErrorMessage: @staticmethod def inline_link_uid_not_exist(uid): return ( "error: DocumentIndex: " "the inline link references an " "object with an UID " "that does not exist: " f"{uid}." )
_logger = None def set_logger(logger): global _logger _logger = logger def get_logger(): return _logger class cached_property: """ Descriptor (non-data) for building an attribute on-demand on first use. ref: http://stackoverflow.com/a/4037979/3886899 """ __slots__ = ('_factory',) def __init__(self, factory): """ <factory> is called such: factory(instance) to build the attribute. """ self._factory = factory def __get__(self, instance, owner): # Build the attribute. attr = self._factory(instance) # Cache the value; hide ourselves. setattr(instance, self._factory.__name__, attr) return attr
''' You are given an array (which will have a length of at least 3, but could be very large) containing integers. The array is either entirely comprised of odd integers or entirely comprised of even integers except for a single integer N. Write a method that takes the array as an argument and returns this "outlier" N. Examples [2, 4, 0, 100, 4, 11, 2602, 36] Should return: 11 (the only odd number) [160, 3, 1719, 19, 11, 13, -21] Should return: 160 (the only even number) ''' #Solution 1 def find_outlier(integers): counter = 0 for count, i in enumerate(integers): if i % 2 == 0: counter += 1 else: counter -= 1 if count == 2: break if counter > 0: for j in integers: if j % 2 != 0: return j else: for k in integers: if k % 2 == 0: return k # Solution 2 - More efficient computationally def find_outlier(int): odds = [x for x in int if x%2!=0] evens= [x for x in int if x%2==0] return odds[0] if len(odds)<len(evens) else evens[0]
class Plugin: max = 1 min = 0 def __init__(self, name): self.name = name
def load(): data = [] targets = [] f = open('sonar.data', 'r+') line = f.readline() while line: s = line.strip().split(',') d = s[0:len(s)-1] t = 1 if s[len(s)-1] == 'M' else 0 for i in range(len(d)): d[i] = float(d[i]) data.append(d) targets.append(t) line = f.readline() f.close() return data, targets
class InstrumentStatus(object): def __init__(self, actuatorCommands, commandCounter): self._actuatorCommands= actuatorCommands self._commandCounter= commandCounter def commandCounter(self): return self._commandCounter def actuatorCommands(self): return self._actuatorCommands
pkgname = "startup-notification" pkgver = "0.12" pkgrel = 0 build_style = "gnu_configure" configure_args = ["lf_cv_sane_realloc=yes", "lf_cv_sane_malloc=yes"] hostmakedepends = ["pkgconf"] makedepends = ["libx11-devel", "libsm-devel", "xcb-util-devel"] pkgdesc = "Library for tracking application startup" maintainer = "q66 <q66@chimera-linux.org>" license = "LGPL-2.1-only" url = "https://www.freedesktop.org/wiki/Software/startup-notification" source = f"$(FREEDESKTOP_SITE)/{pkgname}/releases/{pkgname}-{pkgver}.tar.gz" sha256 = "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a" @subpackage("startup-notification-devel") def _devel(self): return self.default_devel()
# the defined voltage response from a type K thermocouple # from https://srdata.nist.gov/its90/download/type_k.tab ktype = { #temp in C: millivolt response -270: -6.458, -269: -6.457, -268: -6.456, -267: -6.455, -266: -6.453, -265: -6.452, -264: -6.450, -263: -6.448, -262: -6.446, -261: -6.444, -260: -6.441, -259: -6.438, -258: -6.435, -257: -6.432, -256: -6.429, -255: -6.425, -254: -6.421, -253: -6.417, -252: -6.413, -251: -6.408, -250: -6.404, -249: -6.399, -248: -6.393, -247: -6.388, -246: -6.382, -245: -6.377, -244: -6.370, -243: -6.364, -242: -6.358, -241: -6.351, -240: -6.344, -239: -6.337, -238: -6.329, -237: -6.322, -236: -6.314, -235: -6.306, -234: -6.297, -233: -6.289, -232: -6.280, -231: -6.271, -230: -6.262, -229: -6.252, -228: -6.243, -227: -6.233, -226: -6.223, -225: -6.213, -224: -6.202, -223: -6.192, -222: -6.181, -221: -6.170, -220: -6.158, -219: -6.147, -218: -6.135, -217: -6.123, -216: -6.111, -215: -6.099, -214: -6.087, -213: -6.074, -212: -6.061, -211: -6.048, -210: -6.035, -209: -6.021, -208: -6.007, -207: -5.994, -206: -5.980, -205: -5.965, -204: -5.951, -203: -5.936, -202: -5.922, -201: -5.907, -200: -5.891, -199: -5.876, -198: -5.861, -197: -5.845, -196: -5.829, -195: -5.813, -194: -5.797, -193: -5.780, -192: -5.763, -191: -5.747, -190: -5.730, -189: -5.713, -188: -5.695, -187: -5.678, -186: -5.660, -185: -5.642, -184: -5.624, -183: -5.606, -182: -5.588, -181: -5.569, -180: -5.550, -179: -5.531, -178: -5.512, -177: -5.493, -176: -5.474, -175: -5.454, -174: -5.435, -173: -5.415, -172: -5.395, -171: -5.374, -170: -5.354, -169: -5.333, -168: -5.313, -167: -5.292, -166: -5.271, -165: -5.250, -164: -5.228, -163: -5.207, -162: -5.185, -161: -5.163, -160: -5.141, -159: -5.119, -158: -5.097, -157: -5.074, -156: -5.052, -155: -5.029, -154: -5.006, -153: -4.983, -152: -4.960, -151: -4.936, -150: -4.913, -149: -4.889, -148: -4.865, -147: -4.841, -146: -4.817, -145: -4.793, -144: -4.768, -143: -4.744, -142: -4.719, -141: -4.694, -140: -4.669, -139: -4.644, -138: -4.618, -137: -4.593, -136: -4.567, -135: -4.542, -134: -4.516, -133: -4.490, -132: -4.463, -131: -4.437, -130: -4.411, -129: -4.384, -128: -4.357, -127: -4.330, -126: -4.303, -125: -4.276, -124: -4.249, -123: -4.221, -122: -4.194, -121: -4.166, -120: -4.138, -119: -4.110, -118: -4.082, -117: -4.054, -116: -4.025, -115: -3.997, -114: -3.968, -113: -3.939, -112: -3.911, -111: -3.882, -110: -3.852, -109: -3.823, -108: -3.794, -107: -3.764, -106: -3.734, -105: -3.705, -104: -3.675, -103: -3.645, -102: -3.614, -101: -3.584, -100: -3.554, -99: -3.523, -98: -3.492, -97: -3.462, -96: -3.431, -95: -3.400, -94: -3.368, -93: -3.337, -92: -3.306, -91: -3.274, -90: -3.243, -89: -3.211, -88: -3.179, -87: -3.147, -86: -3.115, -85: -3.083, -84: -3.050, -83: -3.018, -82: -2.986, -81: -2.953, -80: -2.920, -79: -2.887, -78: -2.854, -77: -2.821, -76: -2.788, -75: -2.755, -74: -2.721, -73: -2.688, -72: -2.654, -71: -2.620, -70: -2.587, -69: -2.553, -68: -2.519, -67: -2.485, -66: -2.450, -65: -2.416, -64: -2.382, -63: -2.347, -62: -2.312, -61: -2.278, -60: -2.243, -59: -2.208, -58: -2.173, -57: -2.138, -56: -2.103, -55: -2.067, -54: -2.032, -53: -1.996, -52: -1.961, -51: -1.925, -50: -1.889, -49: -1.854, -48: -1.818, -47: -1.782, -46: -1.745, -45: -1.709, -44: -1.673, -43: -1.637, -42: -1.600, -41: -1.564, -40: -1.527, -39: -1.490, -38: -1.453, -37: -1.417, -36: -1.380, -35: -1.343, -34: -1.305, -33: -1.268, -32: -1.231, -31: -1.194, -30: -1.156, -29: -1.119, -28: -1.081, -27: -1.043, -26: -1.006, -25: -0.968, -24: -0.930, -23: -0.892, -22: -0.854, -21: -0.816, -20: -0.778, -19: -0.739, -18: -0.701, -17: -0.663, -16: -0.624, -15: -0.586, -14: -0.547, -13: -0.508, -12: -0.470, -11: -0.431, -10: -0.392, -9: -0.353, -8: -0.314, -7: -0.275, -6: -0.236, -5: -0.197, -4: -0.157, -3: -0.118, -2: -0.079, -1: -0.039, -0: 0.000, 0: 0.000, 1: 0.039, 2: 0.079, 3: 0.119, 4: 0.158, 5: 0.198, 6: 0.238, 7: 0.277, 8: 0.317, 9: 0.357, 10: 0.397, 11: 0.437, 12: 0.477, 13: 0.517, 14: 0.557, 15: 0.597, 16: 0.637, 17: 0.677, 18: 0.718, 19: 0.758, 20: 0.798, 21: 0.838, 22: 0.879, 23: 0.919, 24: 0.960, 25: 1.000, 26: 1.041, 27: 1.081, 28: 1.122, 29: 1.163, 30: 1.203, 31: 1.244, 32: 1.285, 33: 1.326, 34: 1.366, 35: 1.407, 36: 1.448, 37: 1.489, 38: 1.530, 39: 1.571, 40: 1.612, 41: 1.653, 42: 1.694, 43: 1.735, 44: 1.776, 45: 1.817, 46: 1.858, 47: 1.899, 48: 1.941, 49: 1.982, 50: 2.023, 51: 2.064, 52: 2.106, 53: 2.147, 54: 2.188, 55: 2.230, 56: 2.271, 57: 2.312, 58: 2.354, 59: 2.395, 60: 2.436, 61: 2.478, 62: 2.519, 63: 2.561, 64: 2.602, 65: 2.644, 66: 2.685, 67: 2.727, 68: 2.768, 69: 2.810, 70: 2.851, 71: 2.893, 72: 2.934, 73: 2.976, 74: 3.017, 75: 3.059, 76: 3.100, 77: 3.142, 78: 3.184, 79: 3.225, 80: 3.267, 81: 3.308, 82: 3.350, 83: 3.391, 84: 3.433, 85: 3.474, 86: 3.516, 87: 3.557, 88: 3.599, 89: 3.640, 90: 3.682, 91: 3.723, 92: 3.765, 93: 3.806, 94: 3.848, 95: 3.889, 96: 3.931, 97: 3.972, 98: 4.013, 99: 4.055, 100: 4.096, 101: 4.138, 102: 4.179, 103: 4.220, 104: 4.262, 105: 4.303, 106: 4.344, 107: 4.385, 108: 4.427, 109: 4.468, 110: 4.509, 111: 4.550, 112: 4.591, 113: 4.633, 114: 4.674, 115: 4.715, 116: 4.756, 117: 4.797, 118: 4.838, 119: 4.879, 120: 4.920, 121: 4.961, 122: 5.002, 123: 5.043, 124: 5.084, 125: 5.124, 126: 5.165, 127: 5.206, 128: 5.247, 129: 5.288, 130: 5.328, 131: 5.369, 132: 5.410, 133: 5.450, 134: 5.491, 135: 5.532, 136: 5.572, 137: 5.613, 138: 5.653, 139: 5.694, 140: 5.735, 141: 5.775, 142: 5.815, 143: 5.856, 144: 5.896, 145: 5.937, 146: 5.977, 147: 6.017, 148: 6.058, 149: 6.098, 150: 6.138, 151: 6.179, 152: 6.219, 153: 6.259, 154: 6.299, 155: 6.339, 156: 6.380, 157: 6.420, 158: 6.460, 159: 6.500, 160: 6.540, 161: 6.580, 162: 6.620, 163: 6.660, 164: 6.701, 165: 6.741, 166: 6.781, 167: 6.821, 168: 6.861, 169: 6.901, 170: 6.941, 171: 6.981, 172: 7.021, 173: 7.060, 174: 7.100, 175: 7.140, 176: 7.180, 177: 7.220, 178: 7.260, 179: 7.300, 180: 7.340, 181: 7.380, 182: 7.420, 183: 7.460, 184: 7.500, 185: 7.540, 186: 7.579, 187: 7.619, 188: 7.659, 189: 7.699, 190: 7.739, 191: 7.779, 192: 7.819, 193: 7.859, 194: 7.899, 195: 7.939, 196: 7.979, 197: 8.019, 198: 8.059, 199: 8.099, 200: 8.138, 201: 8.178, 202: 8.218, 203: 8.258, 204: 8.298, 205: 8.338, 206: 8.378, 207: 8.418, 208: 8.458, 209: 8.499, 210: 8.539, 211: 8.579, 212: 8.619, 213: 8.659, 214: 8.699, 215: 8.739, 216: 8.779, 217: 8.819, 218: 8.860, 219: 8.900, 220: 8.940, 221: 8.980, 222: 9.020, 223: 9.061, 224: 9.101, 225: 9.141, 226: 9.181, 227: 9.222, 228: 9.262, 229: 9.302, 230: 9.343, 231: 9.383, 232: 9.423, 233: 9.464, 234: 9.504, 235: 9.545, 236: 9.585, 237: 9.626, 238: 9.666, 239: 9.707, 240: 9.747, 241: 9.788, 242: 9.828, 243: 9.869, 244: 9.909, 245: 9.950, 246: 9.991, 247: 10.031, 248: 10.072, 249: 10.113, 250: 10.153, 251: 10.194, 252: 10.235, 253: 10.276, 254: 10.316, 255: 10.357, 256: 10.398, 257: 10.439, 258: 10.480, 259: 10.520, 260: 10.561, 261: 10.602, 262: 10.643, 263: 10.684, 264: 10.725, 265: 10.766, 266: 10.807, 267: 10.848, 268: 10.889, 269: 10.930, 270: 10.971, 271: 11.012, 272: 11.053, 273: 11.094, 274: 11.135, 275: 11.176, 276: 11.217, 277: 11.259, 278: 11.300, 279: 11.341, 280: 11.382, 281: 11.423, 282: 11.465, 283: 11.506, 284: 11.547, 285: 11.588, 286: 11.630, 287: 11.671, 288: 11.712, 289: 11.753, 290: 11.795, 291: 11.836, 292: 11.877, 293: 11.919, 294: 11.960, 295: 12.001, 296: 12.043, 297: 12.084, 298: 12.126, 299: 12.167, 300: 12.209, 301: 12.250, 302: 12.291, 303: 12.333, 304: 12.374, 305: 12.416, 306: 12.457, 307: 12.499, 308: 12.540, 309: 12.582, 310: 12.624, 311: 12.665, 312: 12.707, 313: 12.748, 314: 12.790, 315: 12.831, 316: 12.873, 317: 12.915, 318: 12.956, 319: 12.998, 320: 13.040, 321: 13.081, 322: 13.123, 323: 13.165, 324: 13.206, 325: 13.248, 326: 13.290, 327: 13.331, 328: 13.373, 329: 13.415, 330: 13.457, 331: 13.498, 332: 13.540, 333: 13.582, 334: 13.624, 335: 13.665, 336: 13.707, 337: 13.749, 338: 13.791, 339: 13.833, 340: 13.874, 341: 13.916, 342: 13.958, 343: 14.000, 344: 14.042, 345: 14.084, 346: 14.126, 347: 14.167, 348: 14.209, 349: 14.251, 350: 14.293, 351: 14.335, 352: 14.377, 353: 14.419, 354: 14.461, 355: 14.503, 356: 14.545, 357: 14.587, 358: 14.629, 359: 14.671, 360: 14.713, 361: 14.755, 362: 14.797, 363: 14.839, 364: 14.881, 365: 14.923, 366: 14.965, 367: 15.007, 368: 15.049, 369: 15.091, 370: 15.133, 371: 15.175, 372: 15.217, 373: 15.259, 374: 15.301, 375: 15.343, 376: 15.385, 377: 15.427, 378: 15.469, 379: 15.511, 380: 15.554, 381: 15.596, 382: 15.638, 383: 15.680, 384: 15.722, 385: 15.764, 386: 15.806, 387: 15.849, 388: 15.891, 389: 15.933, 390: 15.975, 391: 16.017, 392: 16.059, 393: 16.102, 394: 16.144, 395: 16.186, 396: 16.228, 397: 16.270, 398: 16.313, 399: 16.355, 400: 16.397, 401: 16.439, 402: 16.482, 403: 16.524, 404: 16.566, 405: 16.608, 406: 16.651, 407: 16.693, 408: 16.735, 409: 16.778, 410: 16.820, 411: 16.862, 412: 16.904, 413: 16.947, 414: 16.989, 415: 17.031, 416: 17.074, 417: 17.116, 418: 17.158, 419: 17.201, 420: 17.243, 421: 17.285, 422: 17.328, 423: 17.370, 424: 17.413, 425: 17.455, 426: 17.497, 427: 17.540, 428: 17.582, 429: 17.624, 430: 17.667, 431: 17.709, 432: 17.752, 433: 17.794, 434: 17.837, 435: 17.879, 436: 17.921, 437: 17.964, 438: 18.006, 439: 18.049, 440: 18.091, 441: 18.134, 442: 18.176, 443: 18.218, 444: 18.261, 445: 18.303, 446: 18.346, 447: 18.388, 448: 18.431, 449: 18.473, 450: 18.516, 451: 18.558, 452: 18.601, 453: 18.643, 454: 18.686, 455: 18.728, 456: 18.771, 457: 18.813, 458: 18.856, 459: 18.898, 460: 18.941, 461: 18.983, 462: 19.026, 463: 19.068, 464: 19.111, 465: 19.154, 466: 19.196, 467: 19.239, 468: 19.281, 469: 19.324, 470: 19.366, 471: 19.409, 472: 19.451, 473: 19.494, 474: 19.537, 475: 19.579, 476: 19.622, 477: 19.664, 478: 19.707, 479: 19.750, 480: 19.792, 481: 19.835, 482: 19.877, 483: 19.920, 484: 19.962, 485: 20.005, 486: 20.048, 487: 20.090, 488: 20.133, 489: 20.175, 490: 20.218, 491: 20.261, 492: 20.303, 493: 20.346, 494: 20.389, 495: 20.431, 496: 20.474, 497: 20.516, 498: 20.559, 499: 20.602, 500: 20.644, 501: 20.687, 502: 20.730, 503: 20.772, 504: 20.815, 505: 20.857, 506: 20.900, 507: 20.943, 508: 20.985, 509: 21.028, 510: 21.071, 511: 21.113, 512: 21.156, 513: 21.199, 514: 21.241, 515: 21.284, 516: 21.326, 517: 21.369, 518: 21.412, 519: 21.454, 520: 21.497, 521: 21.540, 522: 21.582, 523: 21.625, 524: 21.668, 525: 21.710, 526: 21.753, 527: 21.796, 528: 21.838, 529: 21.881, 530: 21.924, 531: 21.966, 532: 22.009, 533: 22.052, 534: 22.094, 535: 22.137, 536: 22.179, 537: 22.222, 538: 22.265, 539: 22.307, 540: 22.350, 541: 22.393, 542: 22.435, 543: 22.478, 544: 22.521, 545: 22.563, 546: 22.606, 547: 22.649, 548: 22.691, 549: 22.734, 550: 22.776, 551: 22.819, 552: 22.862, 553: 22.904, 554: 22.947, 555: 22.990, 556: 23.032, 557: 23.075, 558: 23.117, 559: 23.160, 560: 23.203, 561: 23.245, 562: 23.288, 563: 23.331, 564: 23.373, 565: 23.416, 566: 23.458, 567: 23.501, 568: 23.544, 569: 23.586, 570: 23.629, 571: 23.671, 572: 23.714, 573: 23.757, 574: 23.799, 575: 23.842, 576: 23.884, 577: 23.927, 578: 23.970, 579: 24.012, 580: 24.055, 581: 24.097, 582: 24.140, 583: 24.182, 584: 24.225, 585: 24.267, 586: 24.310, 587: 24.353, 588: 24.395, 589: 24.438, 590: 24.480, 591: 24.523, 592: 24.565, 593: 24.608, 594: 24.650, 595: 24.693, 596: 24.735, 597: 24.778, 598: 24.820, 599: 24.863, 600: 24.905, 601: 24.948, 602: 24.990, 603: 25.033, 604: 25.075, 605: 25.118, 606: 25.160, 607: 25.203, 608: 25.245, 609: 25.288, 610: 25.330, 611: 25.373, 612: 25.415, 613: 25.458, 614: 25.500, 615: 25.543, 616: 25.585, 617: 25.627, 618: 25.670, 619: 25.712, 620: 25.755, 621: 25.797, 622: 25.840, 623: 25.882, 624: 25.924, 625: 25.967, 626: 26.009, 627: 26.052, 628: 26.094, 629: 26.136, 630: 26.179, 631: 26.221, 632: 26.263, 633: 26.306, 634: 26.348, 635: 26.390, 636: 26.433, 637: 26.475, 638: 26.517, 639: 26.560, 640: 26.602, 641: 26.644, 642: 26.687, 643: 26.729, 644: 26.771, 645: 26.814, 646: 26.856, 647: 26.898, 648: 26.940, 649: 26.983, 650: 27.025, 651: 27.067, 652: 27.109, 653: 27.152, 654: 27.194, 655: 27.236, 656: 27.278, 657: 27.320, 658: 27.363, 659: 27.405, 660: 27.447, 661: 27.489, 662: 27.531, 663: 27.574, 664: 27.616, 665: 27.658, 666: 27.700, 667: 27.742, 668: 27.784, 669: 27.826, 670: 27.869, 671: 27.911, 672: 27.953, 673: 27.995, 674: 28.037, 675: 28.079, 676: 28.121, 677: 28.163, 678: 28.205, 679: 28.247, 680: 28.289, 681: 28.332, 682: 28.374, 683: 28.416, 684: 28.458, 685: 28.500, 686: 28.542, 687: 28.584, 688: 28.626, 689: 28.668, 690: 28.710, 691: 28.752, 692: 28.794, 693: 28.835, 694: 28.877, 695: 28.919, 696: 28.961, 697: 29.003, 698: 29.045, 699: 29.087, 700: 29.129, 701: 29.171, 702: 29.213, 703: 29.255, 704: 29.297, 705: 29.338, 706: 29.380, 707: 29.422, 708: 29.464, 709: 29.506, 710: 29.548, 711: 29.589, 712: 29.631, 713: 29.673, 714: 29.715, 715: 29.757, 716: 29.798, 717: 29.840, 718: 29.882, 719: 29.924, 720: 29.965, 721: 30.007, 722: 30.049, 723: 30.090, 724: 30.132, 725: 30.174, 726: 30.216, 727: 30.257, 728: 30.299, 729: 30.341, 730: 30.382, 731: 30.424, 732: 30.466, 733: 30.507, 734: 30.549, 735: 30.590, 736: 30.632, 737: 30.674, 738: 30.715, 739: 30.757, 740: 30.798, 741: 30.840, 742: 30.881, 743: 30.923, 744: 30.964, 745: 31.006, 746: 31.047, 747: 31.089, 748: 31.130, 749: 31.172, 750: 31.213, 751: 31.255, 752: 31.296, 753: 31.338, 754: 31.379, 755: 31.421, 756: 31.462, 757: 31.504, 758: 31.545, 759: 31.586, 760: 31.628, 761: 31.669, 762: 31.710, 763: 31.752, 764: 31.793, 765: 31.834, 766: 31.876, 767: 31.917, 768: 31.958, 769: 32.000, 770: 32.041, 771: 32.082, 772: 32.124, 773: 32.165, 774: 32.206, 775: 32.247, 776: 32.289, 777: 32.330, 778: 32.371, 779: 32.412, 780: 32.453, 781: 32.495, 782: 32.536, 783: 32.577, 784: 32.618, 785: 32.659, 786: 32.700, 787: 32.742, 788: 32.783, 789: 32.824, 790: 32.865, 791: 32.906, 792: 32.947, 793: 32.988, 794: 33.029, 795: 33.070, 796: 33.111, 797: 33.152, 798: 33.193, 799: 33.234, 800: 33.275, 801: 33.316, 802: 33.357, 803: 33.398, 804: 33.439, 805: 33.480, 806: 33.521, 807: 33.562, 808: 33.603, 809: 33.644, 810: 33.685, 811: 33.726, 812: 33.767, 813: 33.808, 814: 33.848, 815: 33.889, 816: 33.930, 817: 33.971, 818: 34.012, 819: 34.053, 820: 34.093, 821: 34.134, 822: 34.175, 823: 34.216, 824: 34.257, 825: 34.297, 826: 34.338, 827: 34.379, 828: 34.420, 829: 34.460, 830: 34.501, 831: 34.542, 832: 34.582, 833: 34.623, 834: 34.664, 835: 34.704, 836: 34.745, 837: 34.786, 838: 34.826, 839: 34.867, 840: 34.908, 841: 34.948, 842: 34.989, 843: 35.029, 844: 35.070, 845: 35.110, 846: 35.151, 847: 35.192, 848: 35.232, 849: 35.273, 850: 35.313, 851: 35.354, 852: 35.394, 853: 35.435, 854: 35.475, 855: 35.516, 856: 35.556, 857: 35.596, 858: 35.637, 859: 35.677, 860: 35.718, 861: 35.758, 862: 35.798, 863: 35.839, 864: 35.879, 865: 35.920, 866: 35.960, 867: 36.000, 868: 36.041, 869: 36.081, 870: 36.121, 871: 36.162, 872: 36.202, 873: 36.242, 874: 36.282, 875: 36.323, 876: 36.363, 877: 36.403, 878: 36.443, 879: 36.484, 880: 36.524, 881: 36.564, 882: 36.604, 883: 36.644, 884: 36.685, 885: 36.725, 886: 36.765, 887: 36.805, 888: 36.845, 889: 36.885, 890: 36.925, 891: 36.965, 892: 37.006, 893: 37.046, 894: 37.086, 895: 37.126, 896: 37.166, 897: 37.206, 898: 37.246, 899: 37.286, 900: 37.326, 901: 37.366, 902: 37.406, 903: 37.446, 904: 37.486, 905: 37.526, 906: 37.566, 907: 37.606, 908: 37.646, 909: 37.686, 910: 37.725, 911: 37.765, 912: 37.805, 913: 37.845, 914: 37.885, 915: 37.925, 916: 37.965, 917: 38.005, 918: 38.044, 919: 38.084, 920: 38.124, 921: 38.164, 922: 38.204, 923: 38.243, 924: 38.283, 925: 38.323, 926: 38.363, 927: 38.402, 928: 38.442, 929: 38.482, 930: 38.522, 931: 38.561, 932: 38.601, 933: 38.641, 934: 38.680, 935: 38.720, 936: 38.760, 937: 38.799, 938: 38.839, 939: 38.878, 940: 38.918, 941: 38.958, 942: 38.997, 943: 39.037, 944: 39.076, 945: 39.116, 946: 39.155, 947: 39.195, 948: 39.235, 949: 39.274, 950: 39.314, 951: 39.353, 952: 39.393, 953: 39.432, 954: 39.471, 955: 39.511, 956: 39.550, 957: 39.590, 958: 39.629, 959: 39.669, 960: 39.708, 961: 39.747, 962: 39.787, 963: 39.826, 964: 39.866, 965: 39.905, 966: 39.944, 967: 39.984, 968: 40.023, 969: 40.062, 970: 40.101, 971: 40.141, 972: 40.180, 973: 40.219, 974: 40.259, 975: 40.298, 976: 40.337, 977: 40.376, 978: 40.415, 979: 40.455, 980: 40.494, 981: 40.533, 982: 40.572, 983: 40.611, 984: 40.651, 985: 40.690, 986: 40.729, 987: 40.768, 988: 40.807, 989: 40.846, 990: 40.885, 991: 40.924, 992: 40.963, 993: 41.002, 994: 41.042, 995: 41.081, 996: 41.120, 997: 41.159, 998: 41.198, 999: 41.237, 1000: 41.276, 1001: 41.315, 1002: 41.354, 1003: 41.393, 1004: 41.431, 1005: 41.470, 1006: 41.509, 1007: 41.548, 1008: 41.587, 1009: 41.626, 1010: 41.665, 1011: 41.704, 1012: 41.743, 1013: 41.781, 1014: 41.820, 1015: 41.859, 1016: 41.898, 1017: 41.937, 1018: 41.976, 1019: 42.014, 1020: 42.053, 1021: 42.092, 1022: 42.131, 1023: 42.169, 1024: 42.208, 1025: 42.247, 1026: 42.286, 1027: 42.324, 1028: 42.363, 1029: 42.402, 1030: 42.440, 1031: 42.479, 1032: 42.518, 1033: 42.556, 1034: 42.595, 1035: 42.633, 1036: 42.672, 1037: 42.711, 1038: 42.749, 1039: 42.788, 1040: 42.826, 1041: 42.865, 1042: 42.903, 1043: 42.942, 1044: 42.980, 1045: 43.019, 1046: 43.057, 1047: 43.096, 1048: 43.134, 1049: 43.173, 1050: 43.211, 1051: 43.250, 1052: 43.288, 1053: 43.327, 1054: 43.365, 1055: 43.403, 1056: 43.442, 1057: 43.480, 1058: 43.518, 1059: 43.557, 1060: 43.595, 1061: 43.633, 1062: 43.672, 1063: 43.710, 1064: 43.748, 1065: 43.787, 1066: 43.825, 1067: 43.863, 1068: 43.901, 1069: 43.940, 1070: 43.978, 1071: 44.016, 1072: 44.054, 1073: 44.092, 1074: 44.130, 1075: 44.169, 1076: 44.207, 1077: 44.245, 1078: 44.283, 1079: 44.321, 1080: 44.359, 1081: 44.397, 1082: 44.435, 1083: 44.473, 1084: 44.512, 1085: 44.550, 1086: 44.588, 1087: 44.626, 1088: 44.664, 1089: 44.702, 1090: 44.740, 1091: 44.778, 1092: 44.816, 1093: 44.853, 1094: 44.891, 1095: 44.929, 1096: 44.967, 1097: 45.005, 1098: 45.043, 1099: 45.081, 1100: 45.119, 1101: 45.157, 1102: 45.194, 1103: 45.232, 1104: 45.270, 1105: 45.308, 1106: 45.346, 1107: 45.383, 1108: 45.421, 1109: 45.459, 1110: 45.497, 1111: 45.534, 1112: 45.572, 1113: 45.610, 1114: 45.647, 1115: 45.685, 1116: 45.723, 1117: 45.760, 1118: 45.798, 1119: 45.836, 1120: 45.873, 1121: 45.911, 1122: 45.948, 1123: 45.986, 1124: 46.024, 1125: 46.061, 1126: 46.099, 1127: 46.136, 1128: 46.174, 1129: 46.211, 1130: 46.249, 1131: 46.286, 1132: 46.324, 1133: 46.361, 1134: 46.398, 1135: 46.436, 1136: 46.473, 1137: 46.511, 1138: 46.548, 1139: 46.585, 1140: 46.623, 1141: 46.660, 1142: 46.697, 1143: 46.735, 1144: 46.772, 1145: 46.809, 1146: 46.847, 1147: 46.884, 1148: 46.921, 1149: 46.958, 1150: 46.995, 1151: 47.033, 1152: 47.070, 1153: 47.107, 1154: 47.144, 1155: 47.181, 1156: 47.218, 1157: 47.256, 1158: 47.293, 1159: 47.330, 1160: 47.367, 1161: 47.404, 1162: 47.441, 1163: 47.478, 1164: 47.515, 1165: 47.552, 1166: 47.589, 1167: 47.626, 1168: 47.663, 1169: 47.700, 1170: 47.737, 1171: 47.774, 1172: 47.811, 1173: 47.848, 1174: 47.884, 1175: 47.921, 1176: 47.958, 1177: 47.995, 1178: 48.032, 1179: 48.069, 1180: 48.105, 1181: 48.142, 1182: 48.179, 1183: 48.216, 1184: 48.252, 1185: 48.289, 1186: 48.326, 1187: 48.363, 1188: 48.399, 1189: 48.436, 1190: 48.473, 1191: 48.509, 1192: 48.546, 1193: 48.582, 1194: 48.619, 1195: 48.656, 1196: 48.692, 1197: 48.729, 1198: 48.765, 1199: 48.802, 1200: 48.838, 1201: 48.875, 1202: 48.911, 1203: 48.948, 1204: 48.984, 1205: 49.021, 1206: 49.057, 1207: 49.093, 1208: 49.130, 1209: 49.166, 1210: 49.202, 1211: 49.239, 1212: 49.275, 1213: 49.311, 1214: 49.348, 1215: 49.384, 1216: 49.420, 1217: 49.456, 1218: 49.493, 1219: 49.529, 1220: 49.565, 1221: 49.601, 1222: 49.637, 1223: 49.674, 1224: 49.710, 1225: 49.746, 1226: 49.782, 1227: 49.818, 1228: 49.854, 1229: 49.890, 1230: 49.926, 1231: 49.962, 1232: 49.998, 1233: 50.034, 1234: 50.070, 1235: 50.106, 1236: 50.142, 1237: 50.178, 1238: 50.214, 1239: 50.250, 1240: 50.286, 1241: 50.322, 1242: 50.358, 1243: 50.393, 1244: 50.429, 1245: 50.465, 1246: 50.501, 1247: 50.537, 1248: 50.572, 1249: 50.608, 1250: 50.644, 1251: 50.680, 1252: 50.715, 1253: 50.751, 1254: 50.787, 1255: 50.822, 1256: 50.858, 1257: 50.894, 1258: 50.929, 1259: 50.965, 1260: 51.000, 1261: 51.036, 1262: 51.071, 1263: 51.107, 1264: 51.142, 1265: 51.178, 1266: 51.213, 1267: 51.249, 1268: 51.284, 1269: 51.320, 1270: 51.355, 1271: 51.391, 1272: 51.426, 1273: 51.461, 1274: 51.497, 1275: 51.532, 1276: 51.567, 1277: 51.603, 1278: 51.638, 1279: 51.673, 1280: 51.708, 1281: 51.744, 1282: 51.779, 1283: 51.814, 1284: 51.849, 1285: 51.885, 1286: 51.920, 1287: 51.955, 1288: 51.990, 1289: 52.025, 1290: 52.060, 1291: 52.095, 1292: 52.130, 1293: 52.165, 1294: 52.200, 1295: 52.235, 1296: 52.270, 1297: 52.305, 1298: 52.340, 1299: 52.375, 1300: 52.410, 1301: 52.445, 1302: 52.480, 1303: 52.515, 1304: 52.550, 1305: 52.585, 1306: 52.620, 1307: 52.654, 1308: 52.689, 1309: 52.724, 1310: 52.759, 1311: 52.794, 1312: 52.828, 1313: 52.863, 1314: 52.898, 1315: 52.932, 1316: 52.967, 1317: 53.002, 1318: 53.037, 1319: 53.071, 1320: 53.106, 1321: 53.140, 1322: 53.175, 1323: 53.210, 1324: 53.244, 1325: 53.279, 1326: 53.313, 1327: 53.348, 1328: 53.382, 1329: 53.417, 1330: 53.451, 1331: 53.486, 1332: 53.520, 1333: 53.555, 1334: 53.589, 1335: 53.623, 1336: 53.658, 1337: 53.692, 1338: 53.727, 1339: 53.761, 1340: 53.795, 1341: 53.830, 1342: 53.864, 1343: 53.898, 1344: 53.932, 1345: 53.967, 1346: 54.001, 1347: 54.035, 1348: 54.069, 1349: 54.104, 1350: 54.138, 1351: 54.172, 1352: 54.206, 1353: 54.240, 1354: 54.274, 1355: 54.308, 1356: 54.343, 1357: 54.377, 1358: 54.411, 1359: 54.445, 1360: 54.479, 1361: 54.513, 1362: 54.547, 1363: 54.581, 1364: 54.615, 1365: 54.649, 1366: 54.683, 1367: 54.717, 1368: 54.751, 1369: 54.785, 1370: 54.819, 1371: 54.852, 1372: 54.886}
""" 5.3 – Cores de alienígenas #1: Suponha que um alienígena acabou de ser atingido em um jogo. Crie uma variável chamada alien_color e atribua-lhe um alor igual a 'green', 'yellow' ou 'red'. • Escreva uma instrução if para testar se a cor do alienígena é verde. Se for, mostre uma mensagem informando que o jogador acabou de ganhar cinco pontos. • Escreva uma versão desse programa em que o teste if passe e outro em que ele falhe. (A versão que falha não terá nenhuma saída.) """ alien_color = 'green' if alien_color == 'green': print("Você acabou de ganhar 5 pontos!") if alien_color == 'yellow': pass if alien_color == 'green': print('Você acertou!')
''' author : https://github.com/Harnek Prim's algorithm is a minimum-spanning-tree algorithm (for weighted undirected graph) Complexity: Performance:: Adjacency matrix = O(|V|^2) Adjacency list with heap = O(|E| log|V|) ''' def prim(s, edges, n): wt = 0 V = set(range(1,n+1)) A = set() A.add(s) while A != V: for e in edges: if (e[0] in A and e[1] in V-A) or (e[1] in A and e[0] in V-A): A.add(e[0]) A.add(e[1]) wt += e[2] edges.remove(e) break return wt # n = no of vertices n = 4 edges = [[1, 2, 1], [4, 3, 99], [1, 4, 100], [3, 2, 150], [3, 1, 200]] edges.sort(key=lambda l: l[2]) print(prim(1, edges, n))
''' Problem Statement : GCD Choice Link : https://www.hackerearth.com/challenges/competitive/october-easy-20/algorithm/gcd-choice-f04433f3/ Score : partially accepted - 43 pts ''' def find_gcd(x, y): while(y): x, y = y, x % y return x n = int(input()) numbers = list(map(int,input().split())) if(n>2): minimum = min(numbers) n -= 1 numbers.remove(minimum) gcd=find_gcd(numbers[0],numbers[1]) for i in range(2,n): gcd=find_gcd(gcd,numbers[i]) print(gcd)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author: Tang Zhuangkun class OperateTargetVo: ''' 对标的物进行操作,支持更新,创建 所需用到的参数 ''' def __init__(self, target_type, operation, target_code, target_name, index_company, valuation_method, trigger_value, trigger_percent, buy_and_hold_strategy, sell_out_strategy, monitoring_frequency, holder, status,exchange_location, hold_or_not, trade): self._target_type = target_type self._operation = operation self._target_code = target_code self._target_name = target_name self._index_company = index_company self._valuation_method = valuation_method self._trigger_value = trigger_value self._trigger_percent = trigger_percent self._buy_and_hold_strategy = buy_and_hold_strategy self._sell_out_strategy = sell_out_strategy self._hold_or_not = hold_or_not self._monitoring_frequency = monitoring_frequency self._holder = holder self._status = status self._exchange_location = exchange_location self._trade = trade # 标的类型 @property def target_type(self): return self._target_type @target_type.setter def target_type(self, target_type): self._target = target_type # 操作 @property def operation(self): return self._operation @operation.setter def operation(self, operation): self._operation = operation # 标的代码 @property def target_code(self): return self._target_code @target_code.setter def target_code(self, target_code): self._target_code = target_code # 标的名称 @property def target_name(self): return self._target_name @target_name.setter def target_name(self, target_name): self._target_name = target_name # 指数开发公司 @property def index_company(self): return self._index_company @index_company.setter def index_company(self, index_company): self._index_company = index_company # 估值策略 @property def valuation_method(self): return self._valuation_method @valuation_method.setter def valuation_method(self, valuation_method): self._valuation_method = valuation_method # 估值触发绝对值值临界点 @property def trigger_value(self): return self._trigger_value @trigger_value.setter def trigger_value(self, trigger_value): self._trigger_value = trigger_value # 估值触发历史百分比临界点 @property def trigger_percent(self): return self._trigger_percent @trigger_percent.setter def trigger_percent(self, trigger_percent): self._trigger_percent = trigger_percent # 买入持有策略 @property def buy_and_hold_strategy(self): return self._buy_and_hold_strategy @buy_and_hold_strategy.setter def buy_and_hold_strategy(self, buy_and_hold_strategy): self._buy_and_hold_strategy = buy_and_hold_strategy # 卖出策略 @property def sell_out_strategy(self): return self._sell_out_strategy @sell_out_strategy.setter def sell_out_strategy(self, sell_out_strategy): self._sell_out_strategy = sell_out_strategy # 监控频率 @property def monitoring_frequency(self): return self._monitoring_frequency @monitoring_frequency.setter def monitoring_frequency(self, monitoring_frequency): self._monitoring_frequency = monitoring_frequency # 标的持有人 @property def holder(self): return self._holder @holder.setter def holder(self, holder): self._holder = holder # 标的策略状态 @property def status(self): return self._status @status.setter def status(self, status): self._status = status # 标的上市地, 如 sz, sh, hk @property def exchange_location(self): return self._exchange_location @exchange_location.setter def exchange_location(self, exchange_location): self._exchange_location = exchange_location # 当前是否持有,1为持有,0不持有 @property def hold_or_not(self): return self._hold_or_not @hold_or_not.setter def hold_or_not(self, hold_or_not): self._hold_or_not = hold_or_not # 交易方向,buy,sell @property def trade(self): return self._trade @trade.setter def trade(self, trade): self._trade = trade
teacher = "Mr. Zhang" print(teacher) print("53+28") print(53+28) first = 5 second = 3 print(first + second) third = first + second print(third) teacher_a="Mr. Zhang" teacher_b=teacher_a print(teacher_a) print(teacher_b) teacher_a="Mr.Yu" print(teacher_a) print(teacher_b) score=7 score = score + 1 print(score)
__all__ = [ "utils", "ascii_table", "astronomy", "data_plot", "h5T", "mesa", "nugridse", "ppn", "selftest", ]
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: enterprise_ssid short_description: Manage EnterpriseSsid objects of Wireless description: - Gets either one or all the enterprise SSID. - Creates enterprise SSID. - Deletes given enterprise SSID. version_added: '1.0.0' author: Rafael Campos (@racampos) options: ssid_name: description: - > Enter the enterprise SSID name that needs to be retrieved. If not entered, all the enterprise SSIDs will be retrieved. - Enter the SSID name to be deleted. - Required for state delete. type: str enableBroadcastSSID: description: - EnableBroadcastSSID, property of the request body. type: bool enableFastLane: description: - EnableFastLane, property of the request body. type: bool enableMACFiltering: description: - EnableMACFiltering, property of the request body. type: bool fastTransition: description: - Fast Transition, property of the request body. - Available values are 'Adaptive', 'Enable' and 'Disable'. type: str name: description: - Enter SSID Name, property of the request body. Constraint is maxLength set to 32. - Required for state create. type: str passphrase: description: - > Pass Phrase (Only applicable for SSID with PERSONAL security level), property of the request body. Constraints are maxLength set to 63 and minLength set to 8. type: str radioPolicy: description: - Radio Policy, property of the request body. - > Available values are 'Dual band operation (2.4GHz and 5GHz)', 'Dual band operation with band select', '5GHz only' and '2.4GHz only'. type: str securityLevel: description: - Security Level, property of the request body. - Available values are 'WPA2_ENTERPRISE', 'WPA2_PERSONAL' and 'OPEN'. - Required for state create. type: str trafficType: description: - Traffic Type, property of the request body. - Available values are 'voicedata' and 'data'. type: str requirements: - dnacentersdk seealso: # Reference by module name - module: cisco.dnac.plugins.module_utils.definitions.enterprise_ssid # Reference by Internet resource - name: EnterpriseSsid reference description: Complete reference of the EnterpriseSsid object model. link: https://developer.cisco.com/docs/dna-center/api/1-3-3-x # Reference by Internet resource - name: EnterpriseSsid reference description: SDK reference. link: https://dnacentersdk.readthedocs.io/en/latest/api/api.html#v2-1-1-summary """ EXAMPLES = r""" - name: get_enterprise_ssid cisco.dnac.enterprise_ssid: state: query # required ssid_name: SomeValue # string register: nm_get_enterprise_ssid - name: create_enterprise_ssid cisco.dnac.enterprise_ssid: state: create # required name: SomeValue # string, required securityLevel: # valid values are 'WPA2_ENTERPRISE', # 'WPA2_PERSONAL', # 'OPEN'. SomeValue # string, required enableBroadcastSSID: True # boolean enableFastLane: True # boolean enableMACFiltering: True # boolean fastTransition: # valid values are 'Adaptive', # 'Enable', # 'Disable'. SomeValue # string passphrase: SomeValue # string radioPolicy: # valid values are 'Dual band operation (2.4GHz and 5GHz)', # 'Dual band operation with band select', # '5GHz only', # '2.4GHz only'. SomeValue # string trafficType: # valid values are 'voicedata', # 'data'. SomeValue # string - name: delete_enterprise_ssid cisco.dnac.enterprise_ssid: state: delete # required ssid_name: SomeValue # string, required """ RETURN = r""" dnac_response: description: A dictionary with the response returned by the DNA Center Python SDK returned: always type: dict sample: {"response": 29, "version": "1.0"} sdk_function: description: The DNA Center SDK function used to execute the task returned: always type: str sample: wireless.create_enterprise_ssid missing_params: description: Provided arguments do not comply with the schema of the DNA Center Python SDK function returned: when the function request schema is not satisfied type: list sample: """
## https://leetcode.com/problems/implement-strstr/ ## problem is to find where the needle occurs in the haystack. ## do this in O(n) by looping over the characters in the haystack ## and checking if the string started by that index (and as long ## as the needle) is equal to the needle. ## return -1 if we get to the end cause it's not in there. ## comes in at 99.46th percentile for runtime, but only 10th ## for memory class Solution: def strStr(self, haystack: str, needle: str) -> int: nlen = len(needle) if not nlen: return 0 if not len(haystack): return -1 for ii in range(len(haystack)-nlen+1): if haystack[ii:ii+nlen] == needle: return ii return -1
# 4из20 + Результаты последнего тиража def test_4x20_results_last_draw(app): app.ResultAndPrizes.open_page_results_and_prizes() app.ResultAndPrizes.click_game_4x20() app.ResultAndPrizes.click_results_of_the_last_draw() app.ResultAndPrizes.button_get_report_winners() app.ResultAndPrizes.parser_report_text_winners() assert "РЕЗУЛЬТАТЫ ТИРАЖА" in app.ResultAndPrizes.parser_report_text_winners() app.ResultAndPrizes.message_id_33_4x20_results_last_draw() app.ResultAndPrizes.comeback_main_page()
text = """ //------------------------------------------------------------------------------ // Explicit instantiation. //------------------------------------------------------------------------------ #include "Geometry/Dimension.hh" #include "FSISPH/FSISpecificThermalEnergyPolicy.cc" namespace Spheral { template class FSISpecificThermalEnergyPolicy<Dim< %(ndim)s > >; } """
value = '16b87ecc17e3568c83d2d55d8c0d7260' # https://md5.gromweb.com/?md5=16b87ecc17e3568c83d2d55d8c0d7260 print('flippit')
class Storage(dict): """ A Storage object is like a dictionary except `obj.foo` can be used in addition to `obj['foo']`, and setting obj.foo = None deletes item foo. >>> o = Storage(a=1) >>> print o.a 1 >>> o['a'] 1 >>> o.a = 2 >>> print o['a'] 2 >>> del o.a >>> print o.a None """ __slots__ = () __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ __getitem__ = dict.get __getattr__ = dict.get __repr__ = lambda self: '<Storage %s>' % dict.__repr__(self) # http://stackoverflow.com/questions/5247250/why-does-pickle-getstate-accept-as-a-return-value-the-very-instance-it-requi __getstate__ = lambda self: None __copy__ = lambda self: Storage(self) def getlist(self, key): """ Return a Storage value as a list. If the value is a list it will be returned as-is. If object is None, an empty list will be returned. Otherwise, [value] will be returned. Example output for a query string of ?x=abc&y=abc&y=def >>> request = Storage() >>> request.vars = Storage() >>> request.vars.x = 'abc' >>> request.vars.y = ['abc', 'def'] >>> request.vars.getlist('x') ['abc'] >>> request.vars.getlist('y') ['abc', 'def'] >>> request.vars.getlist('z') [] """ value = self.get(key, []) if value is None or isinstance(value, (list, tuple)): return value else: return [value] def getfirst(self, key, default=None): """ Return the first or only value when given a request.vars-style key. If the value is a list, its first item will be returned; otherwise, the value will be returned as-is. Example output for a query string of ?x=abc&y=abc&y=def >>> request = Storage() >>> request.vars = Storage() >>> request.vars.x = 'abc' >>> request.vars.y = ['abc', 'def'] >>> request.vars.getfirst('x') 'abc' >>> request.vars.getfirst('y') 'abc' >>> request.vars.getfirst('z') """ values = self.getlist(key) return values[0] if values else default def getlast(self, key, default=None): """ Returns the last or only single value when given a request.vars-style key. If the value is a list, the last item will be returned; otherwise, the value will be returned as-is. Simulated output with a query string of ?x=abc&y=abc&y=def >>> request = Storage() >>> request.vars = Storage() >>> request.vars.x = 'abc' >>> request.vars.y = ['abc', 'def'] >>> request.vars.getlast('x') 'abc' >>> request.vars.getlast('y') 'def' >>> request.vars.getlast('z') """ values = self.getlist(key) return values[-1] if values else default
def paint(x, y): global a global pic if not (0 <= x < a and 0 <= y < a): return if pic[x][y] == '+': return pic[x][y] = '+' paint(x+1, y) paint(x-1, y) paint(x, y+1) paint(x, y-1) output = [] a = int(input()) pic = [] for i in range(a): pic.append(list(input())) pos_x, pos_y = [int(x) for x in input().split()] paint(pos_x, pos_y) for lines in pic: output.append(''.join(lines)) print('\n'.join(output))
""" TODO: - QualifiedName visitability.. somewhere - CreateOrReplaceTable (w/ prefixes) - batching for snowflake... - helper against sqla inserts with nonexisting columns :/ """
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Created by Ross on 19-3-18 """ 一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。 机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。 问总共有多少条不同的路径? 输入: m = 3, n = 2 输出: 3 解释: 从左上角开始,总共有 3 条路径可以到达右下角。 1. 向右 -> 向右 -> 向下 2. 向右 -> 向下 -> 向右 3. 向下 -> 向右 -> 向右 """ def solve(m: int, n: int) -> int: dp = [[0 for i in range(n)] for j in range(m)] for i in range(m): dp[i][0] = 1 for i in range(n): dp[0][i] = 1 for i in range(1, min(m, n)): for j in range(i, n): dp[i][j] = dp[i - 1][j] + dp[i][j - 1] for j in range(i, m): dp[j][i] = dp[j - 1][i] + dp[j][i - 1] return dp[m - 1][n - 1] if __name__ == '__main__': print(solve(7, 3))
OCTICON_MARK_GITHUB = """ <svg class="octicon octicon-mark-github" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg> """
COMMANDS = [ # OP Level 0-2 "placefeature" "advancement", "attribute", "bossbar", "clear", "clone", "data", "datapack", "debug", "defaultgamemode", "difficulty", "effect", "enchant", "execute", "experience", "fill", "forceload", "function", "gamemode", "gamerule", "give", "help", "item", "kill", "list", "locate", "locatebiome", "loot", "me", "msg", "particle", "playsound", "recipe", "reload", "say", "schedule", "scoreboard", "seed", "setblock", "setworldspawn", "spawnpoint", "spectate", "spreadplayers", "stopsound", "summon", "tag", "team", "teammsg", "teleport", "tell", "tellraw", "time", "title", "tm", "tp", "trigger", "w", "weather", "whitelist", "worldborder", "xp" # OP Level 3-4 "jfr", "perf", "publish", "save-all", "save-off", "save-on", "stop", "ban", "ban-ip", "banlist", "debug", "deop", "kick", "op", "pardon", "pardon-ip", "setidletimeout", "whitelist" ] """All vanilla command (first argument only)"""
# -*- coding: utf-8 -*- invoice_info = """ 购方名称:甘肃省水利水电勘测设计研究院 购方纳税人识别号:620102438002318 购方地址、电话:甘肃省兰州市城关区平凉路284号 0931-8806331 开户行及账号:农行兰州东方红广场支行 27-011101040003710 """ invoice_notice = """ 1.增值税发票不可折叠、涂抹 2.发票购方名称务必准确、发票纳税人识别号务必准确 """ hotel_expense = """ 以下费用为上限 省级城市:500 地市级城市:400 XXXX """ question_dict = { '开票信息': invoice_info, '发票信息': invoice_info, '发票注意事项': invoice_notice, '住宿标准': hotel_expense }
str1 = input("Enter the postfix expression:") list1 = str1.split() stack = list() print(list1) # 2 3 1 * + 9 - here the ans is -4 def isOperator(a): if a == '+' or a == '-' or a == '/' or a == '*': return 1 else: return 0 def evaluate(a, b, c): if a == '+': return b + c elif a == '-': return b - c elif a == '*': return b * c else: return b / c for i in range(len(list1)): if (isOperator(list1[i])) == 1: d = int(stack.pop()) c = int(stack.pop()) x = evaluate(list1[i], c, d) stack.append(x) else: stack.append(list1[i]) print(stack.pop())
# fruits = {} # # fruits["apple"] = "A sweet red fruit" # # fruits["mango"] = "King of all" # # print(fruits["apple"]) line = input() letter = {} for ch in line: if ch in letter: letter[ch] += 1 else: letter[ch] = 1 print(letter) print(letter.keys())
###Titulo: Exibe número ###Função: Este programa exibe os numeros de 50 a 100 ###Autor: Valmor Mantelli Jr. ###Data: 09/12/20148 ###Versão: 0.0.1 # Declaração de variáve x = 50 # Processamento while x <=100: # Saída print(x) x = x + 1
# from .initial_values import initial_values #----------STATE VARIABLE Genesis DICTIONARY--------------------------- genesis_states = { 'player_200' : False, 'player_250' : False, 'player_300' : False, 'player_350' : False, 'player_400' : False, 'game_200' : False, 'game_250' : False, 'game_300' : False, 'game_350' : False, 'game_400' : False, 'timestamp': '2018-10-01 15:16:24', #es5 }
#!/usr/bin/env vpython3 def onefile(fname): data = open(fname, 'rt').read() data = data.replace('FPDF_EXPORT', 'extern') data = data.replace('FPDF_CALLCONV', '') open(fname, 'wt').write(data) onefile('pdfium/include/fpdf_annot.h') onefile('pdfium/include/fpdf_attachment.h') onefile('pdfium/include/fpdf_catalog.h') onefile('pdfium/include/fpdf_dataavail.h') onefile('pdfium/include/fpdf_doc.h') onefile('pdfium/include/fpdf_edit.h') onefile('pdfium/include/fpdf_ext.h') onefile('pdfium/include/fpdf_flatten.h') onefile('pdfium/include/fpdf_formfill.h') onefile('pdfium/include/fpdf_fwlevent.h') onefile('pdfium/include/fpdf_javascript.h') onefile('pdfium/include/fpdf_ppo.h') onefile('pdfium/include/fpdf_progressive.h') onefile('pdfium/include/fpdf_save.h') onefile('pdfium/include/fpdf_searchex.h') onefile('pdfium/include/fpdf_signature.h') onefile('pdfium/include/fpdf_structtree.h') onefile('pdfium/include/fpdf_sysfontinfo.h') onefile('pdfium/include/fpdf_text.h') onefile('pdfium/include/fpdf_thumbnail.h') onefile('pdfium/include/fpdf_transformpage.h') onefile('pdfium/include/fpdfview.h')
def inequality(value): # Complete the if statement on the next line using value, the inequality operator (!=), and the number 13. if value != 13: ### Your code goes above this line ### return "Not Equal to 13" else: return "Equal to 13" print(inequality(100))
# -*- Mode: Python; test-case-name: test.test_pychecker_CodeChecks -*- # vi:si:et:sw=4:sts=4:ts=4 # trigger opcode 99, DUP_TOPX def duptopx(): d = {} for i in range(0, 9): d[i] = i for k in d: # the += on a dict member triggers DUP_TOPX d[k] += 1
####################################################### # # track.py # Python implementation of the Class track # Generated by Enterprise Architect # Created on: 11-Feb-2020 11:08:09 AM # Original author: Corvo # ####################################################### class track: # default constructor def __init__(self): speed = "0.00000000" # speed getter def getspeed(self): return self.speed # speed setter def setspeed(self, speed=0): self.speed=speed __course = "0.00000000" # course getter def getcourse(self): return self.course # course setter def setcourse(self, course=0): self.course=course
mylist=['hello',[2,3,4],[40,50,60],['hi'],'how',"bye"] print(mylist) print(mylist[1][1]) mylist=['hello',[2,3,4]] print(mylist[1][0]) num1=[0,32,444,4453,[23,43,54,12,3]] print(num1) num2=[0,32,444,4453] num2.extend([23,43,54,12,3]) print(num2)
nascido = 0 contador = 1 total = 0 while contador <= 10: contador += 1 nascido = int(input('Em que ano você nasceu: ')) demaior = (nascido - 2021) *-1 if demaior >= 18: total += 1 print ('{} São maiores de idade'.format (total))
def test(x, y): x + y test( 11111111, test(11111111, 1111111), test(11111111, 1111111), 222, 222, test(11111111, 1111111), test(11111111, 1111111), 222, test(11111111, 1111111), test(11111111, 1111111), test(11111111, 1111111), test(11111111, 1111111), test(11111111, 1111111), )
"""Define library wise constants""" __version__: str = '0.0.7' __author__: str = 'Igor Morgado' __author_email__: str = 'morgado.igor@gmail.com'
# dfs # Runtime: 52 ms, faster than 100.00% of Python3 online submissions for Path Sum III. # Memory Usage: 13.3 MB, less than 100.00% of Python3 online submissions for Path Sum III. # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def pathSum(self, root: 'TreeNode', sum: 'int') -> 'int': self.result = 0 # 定义全局结果 cache = {0: 1} # 定义全局路径 self.dfs(root, sum, 0, cache) # 递归来得到结果 return self.result def dfs(self, root, sum, curr_path_sum, cache): if root is None: return # 终止条件 curr_path_sum += root.val # 计算当前路径和 old_path_sum = curr_path_sum - sum # 必须的旧的路径和 self.result += cache.get(old_path_sum, 0) # 更新结果 cache[curr_path_sum] = cache.get(curr_path_sum, 0) + 1 # 更新中间存储 self.dfs(root.left, sum, curr_path_sum, cache) # dfs分解 self.dfs(root.right, sum, curr_path_sum, cache) cache[curr_path_sum] -= 1 # 当移动到其他分支时,当前路径和不再可用,因此删除一个 # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def pathSum(self, root: 'TreeNode', sum: 'int') -> 'int': self.count = 0 pre_dict = {0: 1} def dfs(p, sum, path_sum, pre_dict): if not p: return path_sum += p.val self.count += pre_dict.get(path_sum - sum, 0) pre_dict[path_sum] = pre_dict.get(path_sum, 0) + 1 dfs(p.left, sum, path_sum, pre_dict) dfs(p.right, sum, path_sum, pre_dict) pre_dict[path_sum] -= 1 dfs(root, sum, 0, pre_dict) return self.count # dfs 找起点,每次以这个起点遍历 # Runtime: 860 ms, faster than 37.35% of Python3 online submissions for Path Sum III. # Memory Usage: 13.4 MB, less than 100.00% of Python3 online submissions for Path Sum III. # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def pathSum(self, root: 'TreeNode', sum: 'int') -> 'int': self.num_of_path = 0 self.dfs(root, sum) return self.num_of_path def dfs(self, node, sum): if node is None: return self.test(node, sum) self.dfs(node.left, sum) self.dfs(node.right, sum) def test(self, node, sum): if node is None: return if node.val == sum: self.num_of_path += 1 self.test(node.left, sum - node.val) self.test(node.right, sum - node.val)
# # PySNMP MIB module CISCOTRAP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOTRAP-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:24:33 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") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") cisco, = mibBuilder.importSymbols("CISCO-SMI", "cisco") ifType, ifIndex, ifDescr = mibBuilder.importSymbols("IF-MIB", "ifType", "ifIndex", "ifDescr") locIfReason, = mibBuilder.importSymbols("OLD-CISCO-INTERFACES-MIB", "locIfReason") authAddr, whyReload = mibBuilder.importSymbols("OLD-CISCO-SYSTEM-MIB", "authAddr", "whyReload") loctcpConnInBytes, loctcpConnOutBytes, loctcpConnElapsed = mibBuilder.importSymbols("OLD-CISCO-TCP-MIB", "loctcpConnInBytes", "loctcpConnOutBytes", "loctcpConnElapsed") tsLineUser, tslineSesType = mibBuilder.importSymbols("OLD-CISCO-TS-MIB", "tsLineUser", "tslineSesType") egpNeighAddr, = mibBuilder.importSymbols("RFC1213-MIB", "egpNeighAddr") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") sysUpTime, snmp = mibBuilder.importSymbols("SNMPv2-MIB", "sysUpTime", "snmp") ObjectIdentity, iso, Gauge32, ModuleIdentity, Counter64, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, IpAddress, Unsigned32, Integer32, Bits, NotificationType, Counter32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "iso", "Gauge32", "ModuleIdentity", "Counter64", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "IpAddress", "Unsigned32", "Integer32", "Bits", "NotificationType", "Counter32", "TimeTicks") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") tcpConnState, = mibBuilder.importSymbols("TCP-MIB", "tcpConnState") coldStart = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,0)).setObjects(("SNMPv2-MIB", "sysUpTime"), ("OLD-CISCO-SYSTEM-MIB", "whyReload")) if mibBuilder.loadTexts: coldStart.setDescription("A coldStart trap signifies that the sending protocol entity is reinitializing itself such that the agent's configuration or the protocol entity implementation may be altered.") linkDown = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,2)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("IF-MIB", "ifType"), ("OLD-CISCO-INTERFACES-MIB", "locIfReason")) if mibBuilder.loadTexts: linkDown.setDescription("A linkDown trap signifies that the sending protocol entity recognizes a failure in one of the communication links represented in the agent's configuration.") linkUp = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,3)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("IF-MIB", "ifType"), ("OLD-CISCO-INTERFACES-MIB", "locIfReason")) if mibBuilder.loadTexts: linkUp.setDescription("A linkUp trap signifies that the sending protocol entity recognizes that one of the communication links represented in the agent's configuration has come up.") authenticationFailure = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,4)).setObjects(("OLD-CISCO-SYSTEM-MIB", "authAddr")) if mibBuilder.loadTexts: authenticationFailure.setDescription('An authenticationFailure trap signifies that the sending protocol entity is the addressee of a protocol message that is not properly authenticated. While implementations of the SNMP must be capable of generating this trap, they must also be capable of suppressing the emission of such traps via an implementation- specific mechanism.') egpNeighborLoss = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,5)).setObjects(("RFC1213-MIB", "egpNeighAddr")) if mibBuilder.loadTexts: egpNeighborLoss.setDescription('An egpNeighborLoss trap signifies that an EGP neighbor for whom the sending protocol entity was an EGP peer has been marked down and the peer relationship no longer obtains.') reload = NotificationType((1, 3, 6, 1, 4, 1, 9) + (0,0)).setObjects(("SNMPv2-MIB", "sysUpTime"), ("OLD-CISCO-SYSTEM-MIB", "whyReload")) if mibBuilder.loadTexts: reload.setDescription("A reload trap signifies that the sending protocol entity is reinitializing itself such that the agent's configuration or the protocol entity implementation may be altered.") tcpConnectionClose = NotificationType((1, 3, 6, 1, 4, 1, 9) + (0,1)).setObjects(("OLD-CISCO-TS-MIB", "tslineSesType"), ("TCP-MIB", "tcpConnState"), ("OLD-CISCO-TCP-MIB", "loctcpConnElapsed"), ("OLD-CISCO-TCP-MIB", "loctcpConnInBytes"), ("OLD-CISCO-TCP-MIB", "loctcpConnOutBytes"), ("OLD-CISCO-TS-MIB", "tsLineUser")) if mibBuilder.loadTexts: tcpConnectionClose.setDescription('A tty trap signifies that a TCP connection, previously established with the sending protocol entity for the purposes of a tty session, has been terminated.') mibBuilder.exportSymbols("CISCOTRAP-MIB", linkDown=linkDown, linkUp=linkUp, tcpConnectionClose=tcpConnectionClose, reload=reload, authenticationFailure=authenticationFailure, egpNeighborLoss=egpNeighborLoss, coldStart=coldStart)
data_s3_path = "riskified-research-files/research analysts/DO/representment/win_rate_prediction/exploration" data_file_name = "disputed_chbs_targil_6.csv" cat_features = [ # 'dispute_status', 'domestic_international', 'order_submission_type', 'bill_ship_mismatch', 'is_proxy', 'order_external_status', 'cvv_result', 'avs_result', 'mapped_source', 'formatted_credit_card_company' ] cont_features = [ 'ip_proxy_score_current', 'mean_risk_percentile', 'customer_age', 'effective_customer_age', 'effective_chargeback_score', 'effective_email_age', 'order_total_spent', ]
# # PySNMP MIB module GMS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/GMS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:06:21 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint") applIndex, = mibBuilder.importSymbols("NETWORK-SERVICES-MIB", "applIndex") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") iso, mib_2, ObjectIdentity, Unsigned32, Integer32, TimeTicks, Counter32, IpAddress, enterprises, Counter64, ModuleIdentity, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, snmpModules, MibIdentifier, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "mib-2", "ObjectIdentity", "Unsigned32", "Integer32", "TimeTicks", "Counter32", "IpAddress", "enterprises", "Counter64", "ModuleIdentity", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "snmpModules", "MibIdentifier", "Gauge32") DisplayString, TimeInterval, TextualConvention, TimeStamp, TestAndIncr = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TimeInterval", "TextualConvention", "TimeStamp", "TestAndIncr") gordano = ModuleIdentity((1, 3, 6, 1, 4, 1, 24534)) gordano.setRevisions(('1916-11-05 00:00',)) if mibBuilder.loadTexts: gordano.setLastUpdated('0909050000Z') if mibBuilder.loadTexts: gordano.setOrganization('Gordano Ltd') gmsAV = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 2)) gmsAS = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 3)) gmsSMTP = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 4)) gmsPOST = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 5)) gmsPOP = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 6)) gmsIMAP = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 7)) gmsWWW = MibIdentifier((1, 3, 6, 1, 4, 1, 24534, 8)) gmsApplTable = MibTable((1, 3, 6, 1, 4, 1, 24534, 1), ) if mibBuilder.loadTexts: gmsApplTable.setStatus('current') gmsApplEntry = MibTableRow((1, 3, 6, 1, 4, 1, 24534, 1, 1), ).setIndexNames((0, "NETWORK-SERVICES-MIB", "applIndex")) if mibBuilder.loadTexts: gmsApplEntry.setStatus('current') applHandleCount = MibTableColumn((1, 3, 6, 1, 4, 1, 24534, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: applHandleCount.setStatus('current') applPercentCPU = MibTableColumn((1, 3, 6, 1, 4, 1, 24534, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: applPercentCPU.setStatus('current') applRssKB = MibTableColumn((1, 3, 6, 1, 4, 1, 24534, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: applRssKB.setStatus('current') avEngineVersion = MibScalar((1, 3, 6, 1, 4, 1, 24534, 2, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: avEngineVersion.setStatus('current') avLastUpdate = MibScalar((1, 3, 6, 1, 4, 1, 24534, 2, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: avLastUpdate.setStatus('current') avMessagesScanned = MibScalar((1, 3, 6, 1, 4, 1, 24534, 2, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: avMessagesScanned.setStatus('current') avMessagesScannedLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: avMessagesScannedLow.setStatus('current') avVirusesFound = MibScalar((1, 3, 6, 1, 4, 1, 24534, 2, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: avVirusesFound.setStatus('current') avVirusesFoundLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: avVirusesFoundLow.setStatus('current') asLastUpdate = MibScalar((1, 3, 6, 1, 4, 1, 24534, 3, 1), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: asLastUpdate.setStatus('current') asMessagesChecked = MibScalar((1, 3, 6, 1, 4, 1, 24534, 3, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: asMessagesChecked.setStatus('current') asMessagesCheckedLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 3, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: asMessagesCheckedLow.setStatus('current') asMessagesRejected = MibScalar((1, 3, 6, 1, 4, 1, 24534, 3, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: asMessagesRejected.setStatus('current') asMessagesRejectedLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 3, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: asMessagesRejectedLow.setStatus('current') smtpThreadsTotal = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpThreadsTotal.setStatus('current') smtpThreadsActive = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpThreadsActive.setStatus('current') smtpSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpSessions.setStatus('current') smtpSSLSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpSSLSessions.setStatus('current') smtpOutOfThreads = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpOutOfThreads.setStatus('current') smtpSuccessfulAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpSuccessfulAuthentications.setStatus('current') smtpSuccessfulAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpSuccessfulAuthenticationsLow.setStatus('current') smtpFailedAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpFailedAuthentications.setStatus('current') smtpFailedAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 4, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: smtpFailedAuthenticationsLow.setStatus('current') postThreadsTotal = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postThreadsTotal.setStatus('current') postThreadsActive = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postThreadsActive.setStatus('current') postSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postSessions.setStatus('current') postSSLSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postSSLSessions.setStatus('current') postSuccessfulAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: postSuccessfulAuthentications.setStatus('current') postSuccessfulAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postSuccessfulAuthenticationsLow.setStatus('current') postFailedAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: postFailedAuthentications.setStatus('current') postFailedAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postFailedAuthenticationsLow.setStatus('current') postQueues = MibScalar((1, 3, 6, 1, 4, 1, 24534, 5, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: postQueues.setStatus('current') popThreadsTotal = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popThreadsTotal.setStatus('current') popThreadsActive = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popThreadsActive.setStatus('current') popSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popSessions.setStatus('current') popSSLSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popSSLSessions.setStatus('current') popLoggedOnUsers = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popLoggedOnUsers.setStatus('current') popOutOfThreads = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popOutOfThreads.setStatus('current') popSuccessfulAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popSuccessfulAuthentications.setStatus('current') popSuccessfulAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popSuccessfulAuthenticationsLow.setStatus('current') popFailedAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popFailedAuthentications.setStatus('current') popFailedAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popFailedAuthenticationsLow.setStatus('current') popRetrievedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popRetrievedVolume.setStatus('current') popRetrievedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popRetrievedVolumeLow.setStatus('current') popToppedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popToppedVolume.setStatus('current') popToppedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popToppedVolumeLow.setStatus('current') popXmitVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popXmitVolume.setStatus('current') popXmitVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popXmitVolumeLow.setStatus('current') popDeletedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popDeletedMessages.setStatus('current') popDeletedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popDeletedMessagesLow.setStatus('current') popRetrievedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popRetrievedMessages.setStatus('current') popRetrievedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popRetrievedMessagesLow.setStatus('current') popToppedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 21), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popToppedMessages.setStatus('current') popToppedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popToppedMessagesLow.setStatus('current') popXmitedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 23), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: popXmitedMessages.setStatus('current') popXmitedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: popXmitedMessagesLow.setStatus('current') popLastInboundActivity = MibScalar((1, 3, 6, 1, 4, 1, 24534, 6, 25), TimeInterval()).setMaxAccess("readonly") if mibBuilder.loadTexts: popLastInboundActivity.setStatus('current') imapThreadsTotal = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapThreadsTotal.setStatus('current') imapThreadsActive = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapThreadsActive.setStatus('current') imapSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapSessions.setStatus('current') imapSSLSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapSSLSessions.setStatus('current') imapIdleSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapIdleSessions.setStatus('current') imapLoggedOnUsers = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapLoggedOnUsers.setStatus('current') imapOutOfThreads = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapOutOfThreads.setStatus('current') imapSuccessfulAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapSuccessfulAuthentications.setStatus('current') imapSuccessfulAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapSuccessfulAuthenticationsLow.setStatus('current') imapFailedAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapFailedAuthentications.setStatus('current') imapFailedAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapFailedAuthenticationsLow.setStatus('current') imapDeletedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapDeletedMessages.setStatus('current') imapDeletedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapDeletedMessagesLow.setStatus('current') imapStoredMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapStoredMessages.setStatus('current') imapStoredMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapStoredMessagesLow.setStatus('current') imapAppendedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapAppendedMessages.setStatus('current') imapAppendedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapAppendedMessagesLow.setStatus('current') imapAppendedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 18), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapAppendedVolume.setStatus('current') imapAppendedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapAppendedVolumeLow.setStatus('current') imapFetchedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 20), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapFetchedMessages.setStatus('current') imapFetchedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapFetchedMessagesLow.setStatus('current') imapFetchedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 22), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapFetchedVolume.setStatus('current') imapFetchedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapFetchedVolumeLow.setStatus('current') imapCopiedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapCopiedMessages.setStatus('current') imapCopiedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapCopiedMessagesLow.setStatus('current') imapSearchedMessages = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 26), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapSearchedMessages.setStatus('current') imapSearchedMessagesLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapSearchedMessagesLow.setStatus('current') imapLastInboundActivity = MibScalar((1, 3, 6, 1, 4, 1, 24534, 7, 28), TimeInterval()).setMaxAccess("readonly") if mibBuilder.loadTexts: imapLastInboundActivity.setStatus('current') wwwThreadsTotal = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwThreadsTotal.setStatus('current') wwwThreadsActive = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwThreadsActive.setStatus('current') wwwSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSessions.setStatus('current') wwwProxySessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxySessions.setStatus('current') wwwScriptSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwScriptSessions.setStatus('current') wwwConnections = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwConnections.setStatus('current') wwwSSLConnections = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSSLConnections.setStatus('current') wwwProxyConnections = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxyConnections.setStatus('current') wwwProxySSLConnections = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxySSLConnections.setStatus('current') wwwScriptConnections = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwScriptConnections.setStatus('current') wwwLoggedOnUsers = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwLoggedOnUsers.setStatus('current') wwwOutOfThreads = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwOutOfThreads.setStatus('current') wwwOutOfSessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwOutOfSessions.setStatus('current') wwwOutOfProxySessions = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwOutOfProxySessions.setStatus('current') wwwSessionTimeouts = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSessionTimeouts.setStatus('current') wwwSessionTimeoutsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSessionTimeoutsLow.setStatus('current') wwwProxySessionTimeouts = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxySessionTimeouts.setStatus('current') wwwProxySessionTimeoutsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxySessionTimeoutsLow.setStatus('current') wwwScriptSessionTimeouts = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwScriptSessionTimeouts.setStatus('current') wwwScriptSessionTimeoutsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwScriptSessionTimeoutsLow.setStatus('current') wwwSuccessfulAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 21), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulAuthentications.setStatus('current') wwwSuccessfulAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulAuthenticationsLow.setStatus('current') wwwFailedAuthentications = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 23), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedAuthentications.setStatus('current') wwwFailedAuthenticationsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedAuthenticationsLow.setStatus('current') wwwReceivedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 25), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwReceivedVolume.setStatus('current') wwwReceivedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwReceivedVolumeLow.setStatus('current') wwwTransmittedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 27), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwTransmittedVolume.setStatus('current') wwwTransmittedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwTransmittedVolumeLow.setStatus('current') wwwProxyReceivedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 29), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxyReceivedVolume.setStatus('current') wwwProxyReceivedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxyReceivedVolumeLow.setStatus('current') wwwProxyTransmittedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 31), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxyTransmittedVolume.setStatus('current') wwwProxyTransmittedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwProxyTransmittedVolumeLow.setStatus('current') wwwReverseProxyReceivedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 33), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwReverseProxyReceivedVolume.setStatus('current') wwwReverseProxyReceivedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwReverseProxyReceivedVolumeLow.setStatus('current') wwwReverseProxyTransmittedVolume = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 35), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwReverseProxyTransmittedVolume.setStatus('current') wwwReverseProxyTransmittedVolumeLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwReverseProxyTransmittedVolumeLow.setStatus('current') wwwSuccessfulRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 37), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulRequests.setStatus('current') wwwSuccessfulRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulRequestsLow.setStatus('current') wwwFailedRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 39), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedRequests.setStatus('current') wwwFailedRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedRequestsLow.setStatus('current') wwwSuccessfulAdminRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 41), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulAdminRequests.setStatus('current') wwwSuccessfulAdminRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulAdminRequestsLow.setStatus('current') wwwFailedAdminRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 43), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedAdminRequests.setStatus('current') wwwFailedAdminRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedAdminRequestsLow.setStatus('current') wwwSuccessfulWebmailRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 45), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulWebmailRequests.setStatus('current') wwwSuccessfulWebmailRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 46), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulWebmailRequestsLow.setStatus('current') wwwFailedWebmailRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 47), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedWebmailRequests.setStatus('current') wwwFailedWebmailRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 48), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedWebmailRequestsLow.setStatus('current') wwwSuccessfulUserRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 49), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulUserRequests.setStatus('current') wwwSuccessfulUserRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 50), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulUserRequestsLow.setStatus('current') wwwFailedUserRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 51), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedUserRequests.setStatus('current') wwwFailedUserRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 52), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedUserRequestsLow.setStatus('current') wwwSuccessfulProxyRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 53), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulProxyRequests.setStatus('current') wwwSuccessfulProxyRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 54), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulProxyRequestsLow.setStatus('current') wwwFailedProxyRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 55), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedProxyRequests.setStatus('current') wwwFailedProxyRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 56), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedProxyRequestsLow.setStatus('current') wwwSuccessfulReverseProxyRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 57), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulReverseProxyRequests.setStatus('current') wwwSuccessfulReverseProxyRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 58), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulReverseProxyRequestsLow.setStatus('current') wwwFailedReverseProxyRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 59), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedReverseProxyRequests.setStatus('current') wwwFailedReverseProxyRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 60), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedReverseProxyRequestsLow.setStatus('current') wwwSuccessfulScriptRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 61), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulScriptRequests.setStatus('current') wwwSuccessfulScriptRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 62), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulScriptRequestsLow.setStatus('current') wwwFailedScriptRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 63), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedScriptRequests.setStatus('current') wwwFailedScriptRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 64), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedScriptRequestsLow.setStatus('current') wwwSuccessfulTimedRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 65), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulTimedRequests.setStatus('current') wwwSuccessfulTimedRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 66), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwSuccessfulTimedRequestsLow.setStatus('current') wwwFailedTimedRequests = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 67), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedTimedRequests.setStatus('current') wwwFailedTimedRequestsLow = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 68), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwFailedTimedRequestsLow.setStatus('current') wwwMMLErrors = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 69), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwMMLErrors.setStatus('current') wwwMessagesRead = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 70), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwMessagesRead.setStatus('current') wwwMessagesSent = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 71), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwMessagesSent.setStatus('current') wwwLastInboundActivity = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 72), TimeInterval()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwLastInboundActivity.setStatus('current') wwwLastOutboundActivity = MibScalar((1, 3, 6, 1, 4, 1, 24534, 8, 73), TimeInterval()).setMaxAccess("readonly") if mibBuilder.loadTexts: wwwLastOutboundActivity.setStatus('current') mibBuilder.exportSymbols("GMS-MIB", imapThreadsTotal=imapThreadsTotal, wwwReceivedVolume=wwwReceivedVolume, postQueues=postQueues, smtpThreadsActive=smtpThreadsActive, wwwFailedAuthenticationsLow=wwwFailedAuthenticationsLow, gmsAV=gmsAV, wwwFailedRequests=wwwFailedRequests, imapThreadsActive=imapThreadsActive, wwwSessionTimeouts=wwwSessionTimeouts, smtpThreadsTotal=smtpThreadsTotal, popToppedVolume=popToppedVolume, wwwFailedAdminRequests=wwwFailedAdminRequests, wwwProxyReceivedVolumeLow=wwwProxyReceivedVolumeLow, gmsApplEntry=gmsApplEntry, wwwSuccessfulAuthenticationsLow=wwwSuccessfulAuthenticationsLow, wwwFailedReverseProxyRequestsLow=wwwFailedReverseProxyRequestsLow, avMessagesScannedLow=avMessagesScannedLow, wwwFailedScriptRequests=wwwFailedScriptRequests, popRetrievedMessagesLow=popRetrievedMessagesLow, postFailedAuthentications=postFailedAuthentications, popSessions=popSessions, wwwFailedAuthentications=wwwFailedAuthentications, imapFetchedMessagesLow=imapFetchedMessagesLow, popXmitVolumeLow=popXmitVolumeLow, smtpSuccessfulAuthentications=smtpSuccessfulAuthentications, postSuccessfulAuthentications=postSuccessfulAuthentications, popThreadsActive=popThreadsActive, smtpFailedAuthentications=smtpFailedAuthentications, wwwProxyConnections=wwwProxyConnections, wwwFailedUserRequestsLow=wwwFailedUserRequestsLow, imapFailedAuthenticationsLow=imapFailedAuthenticationsLow, imapDeletedMessages=imapDeletedMessages, popOutOfThreads=popOutOfThreads, imapFetchedMessages=imapFetchedMessages, popFailedAuthentications=popFailedAuthentications, gmsAS=gmsAS, avVirusesFoundLow=avVirusesFoundLow, wwwFailedScriptRequestsLow=wwwFailedScriptRequestsLow, postFailedAuthenticationsLow=postFailedAuthenticationsLow, wwwSuccessfulUserRequests=wwwSuccessfulUserRequests, wwwFailedTimedRequestsLow=wwwFailedTimedRequestsLow, asMessagesRejectedLow=asMessagesRejectedLow, gmsPOP=gmsPOP, wwwFailedAdminRequestsLow=wwwFailedAdminRequestsLow, wwwReverseProxyReceivedVolumeLow=wwwReverseProxyReceivedVolumeLow, postSSLSessions=postSSLSessions, wwwSuccessfulAdminRequests=wwwSuccessfulAdminRequests, wwwFailedProxyRequests=wwwFailedProxyRequests, wwwMessagesSent=wwwMessagesSent, wwwOutOfThreads=wwwOutOfThreads, wwwScriptSessions=wwwScriptSessions, imapSSLSessions=imapSSLSessions, imapFetchedVolume=imapFetchedVolume, avMessagesScanned=avMessagesScanned, wwwSessions=wwwSessions, imapSearchedMessages=imapSearchedMessages, wwwOutOfProxySessions=wwwOutOfProxySessions, wwwProxySessionTimeoutsLow=wwwProxySessionTimeoutsLow, imapAppendedMessages=imapAppendedMessages, wwwScriptSessionTimeouts=wwwScriptSessionTimeouts, wwwSuccessfulWebmailRequestsLow=wwwSuccessfulWebmailRequestsLow, popLoggedOnUsers=popLoggedOnUsers, wwwFailedProxyRequestsLow=wwwFailedProxyRequestsLow, wwwProxyTransmittedVolumeLow=wwwProxyTransmittedVolumeLow, popXmitedMessagesLow=popXmitedMessagesLow, smtpSessions=smtpSessions, imapFetchedVolumeLow=imapFetchedVolumeLow, asMessagesRejected=asMessagesRejected, wwwScriptSessionTimeoutsLow=wwwScriptSessionTimeoutsLow, popDeletedMessagesLow=popDeletedMessagesLow, wwwSuccessfulTimedRequestsLow=wwwSuccessfulTimedRequestsLow, wwwTransmittedVolume=wwwTransmittedVolume, wwwFailedTimedRequests=wwwFailedTimedRequests, wwwSuccessfulUserRequestsLow=wwwSuccessfulUserRequestsLow, imapSuccessfulAuthentications=imapSuccessfulAuthentications, popFailedAuthenticationsLow=popFailedAuthenticationsLow, wwwLastOutboundActivity=wwwLastOutboundActivity, popSuccessfulAuthentications=popSuccessfulAuthentications, imapStoredMessages=imapStoredMessages, wwwFailedRequestsLow=wwwFailedRequestsLow, popSuccessfulAuthenticationsLow=popSuccessfulAuthenticationsLow, popXmitedMessages=popXmitedMessages, wwwTransmittedVolumeLow=wwwTransmittedVolumeLow, wwwProxyTransmittedVolume=wwwProxyTransmittedVolume, smtpSuccessfulAuthenticationsLow=smtpSuccessfulAuthenticationsLow, wwwThreadsActive=wwwThreadsActive, wwwSuccessfulAdminRequestsLow=wwwSuccessfulAdminRequestsLow, wwwFailedWebmailRequests=wwwFailedWebmailRequests, popRetrievedMessages=popRetrievedMessages, wwwSuccessfulWebmailRequests=wwwSuccessfulWebmailRequests, wwwLoggedOnUsers=wwwLoggedOnUsers, imapLoggedOnUsers=imapLoggedOnUsers, imapAppendedVolumeLow=imapAppendedVolumeLow, imapLastInboundActivity=imapLastInboundActivity, applRssKB=applRssKB, imapAppendedMessagesLow=imapAppendedMessagesLow, imapSuccessfulAuthenticationsLow=imapSuccessfulAuthenticationsLow, wwwSuccessfulProxyRequestsLow=wwwSuccessfulProxyRequestsLow, wwwSuccessfulReverseProxyRequests=wwwSuccessfulReverseProxyRequests, popLastInboundActivity=popLastInboundActivity, imapStoredMessagesLow=imapStoredMessagesLow, wwwProxySessions=wwwProxySessions, wwwReverseProxyReceivedVolume=wwwReverseProxyReceivedVolume, gmsIMAP=gmsIMAP, popThreadsTotal=popThreadsTotal, applHandleCount=applHandleCount, wwwMessagesRead=wwwMessagesRead, imapFailedAuthentications=imapFailedAuthentications, wwwSuccessfulAuthentications=wwwSuccessfulAuthentications, postThreadsTotal=postThreadsTotal, popToppedMessages=popToppedMessages, wwwThreadsTotal=wwwThreadsTotal, wwwMMLErrors=wwwMMLErrors, avVirusesFound=avVirusesFound, popSSLSessions=popSSLSessions, asMessagesChecked=asMessagesChecked, applPercentCPU=applPercentCPU, wwwFailedWebmailRequestsLow=wwwFailedWebmailRequestsLow, wwwFailedUserRequests=wwwFailedUserRequests, gmsWWW=gmsWWW, PYSNMP_MODULE_ID=gordano, wwwSuccessfulScriptRequests=wwwSuccessfulScriptRequests, wwwProxySSLConnections=wwwProxySSLConnections, wwwSessionTimeoutsLow=wwwSessionTimeoutsLow, gordano=gordano, wwwSuccessfulRequests=wwwSuccessfulRequests, imapDeletedMessagesLow=imapDeletedMessagesLow, imapCopiedMessagesLow=imapCopiedMessagesLow, popRetrievedVolumeLow=popRetrievedVolumeLow, popXmitVolume=popXmitVolume, wwwFailedReverseProxyRequests=wwwFailedReverseProxyRequests, wwwSuccessfulTimedRequests=wwwSuccessfulTimedRequests, popToppedMessagesLow=popToppedMessagesLow, gmsPOST=gmsPOST, wwwReceivedVolumeLow=wwwReceivedVolumeLow, popDeletedMessages=popDeletedMessages, imapSessions=imapSessions, wwwSSLConnections=wwwSSLConnections, gmsApplTable=gmsApplTable, imapOutOfThreads=imapOutOfThreads, imapIdleSessions=imapIdleSessions, imapAppendedVolume=imapAppendedVolume, wwwProxyReceivedVolume=wwwProxyReceivedVolume, wwwReverseProxyTransmittedVolume=wwwReverseProxyTransmittedVolume, postSessions=postSessions, wwwLastInboundActivity=wwwLastInboundActivity, wwwSuccessfulProxyRequests=wwwSuccessfulProxyRequests, popRetrievedVolume=popRetrievedVolume, popToppedVolumeLow=popToppedVolumeLow, wwwProxySessionTimeouts=wwwProxySessionTimeouts, wwwOutOfSessions=wwwOutOfSessions, wwwReverseProxyTransmittedVolumeLow=wwwReverseProxyTransmittedVolumeLow, postSuccessfulAuthenticationsLow=postSuccessfulAuthenticationsLow, imapSearchedMessagesLow=imapSearchedMessagesLow, gmsSMTP=gmsSMTP, wwwConnections=wwwConnections, wwwSuccessfulScriptRequestsLow=wwwSuccessfulScriptRequestsLow, avLastUpdate=avLastUpdate, wwwSuccessfulReverseProxyRequestsLow=wwwSuccessfulReverseProxyRequestsLow, asMessagesCheckedLow=asMessagesCheckedLow, asLastUpdate=asLastUpdate, wwwScriptConnections=wwwScriptConnections, smtpFailedAuthenticationsLow=smtpFailedAuthenticationsLow, postThreadsActive=postThreadsActive, avEngineVersion=avEngineVersion, wwwSuccessfulRequestsLow=wwwSuccessfulRequestsLow, smtpSSLSessions=smtpSSLSessions, smtpOutOfThreads=smtpOutOfThreads, imapCopiedMessages=imapCopiedMessages)
# Copyright (c) 2015 Vivaldi Technologies AS. All rights reserved { 'targets': [ { 'target_name': 'vivaldi_api_registration', 'type': 'static_library', 'msvs_disabled_warnings': [ 4267 ], 'includes': [ '../../chromium/build/json_schema_bundle_registration_compile.gypi', '../schema/vivaldi_schemas.gypi', ], 'dependencies': [ '../schema/vivaldi_api.gyp:vivaldi_chrome_api', # Different APIs include headers from these targets. "<(DEPTH)/content/content.gyp:content_browser", ], }, ], }
class Solution: def solve(self, nums, a, b, c): q = lambda x: a*(x**2)+b*x+c if not nums: return [] if len(nums) == 1: return list(map(q,nums)) if a == 0: if b > 0: return list(map(q,nums)) else: return list(map(q,reversed(nums))) if a > 0: i = bisect_left(nums, -b/(2*a)) j = i-1 else: i = 0 j = len(nums)-1 ans = [] while (i < len(nums) or j >= 0) and (a > 0 or i <= j): if i == len(nums): ans.append(q(nums[j])) j -= 1 elif j == -1: ans.append(q(nums[i])) i += 1 else: if q(nums[i]) < q(nums[j]): ans.append(q(nums[i])) i += 1 else: ans.append(q(nums[j])) j -= 1 return ans
# -*- coding: utf-8 -*- """ Created on Sat Mar 21 12:03:38 2020 @author: Ravi """ def CountSort(arr,n): count = [0]*100 for i in arr: count[i]+=1 i=0 for a in range(100): for c in range(count[a]): arr[i] = a i+=1 return arr
def Vertical_Concatenation(Test_list): Result = [] n = 0 while n != len(Test_list): temp = '' for indexes in Test_list: try: temp += indexes[n] except IndexError: pass n += 1 Result.append(temp) return Result Test_list = [["Gfg", "good"], ["is", "for"], ["Best"]] print(Vertical_Concatenation(Test_list))
#!/usr/bin/env python3 class UserError(Exception): pass
# Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def createList(self, list): h = head = ListNode(None) for l in list: head.next = ListNode(l) head = head.next return h.next def showList(self, head): while head is not None: print(head.val) head = head.next def sortList(self, head): """ :type head: ListNode :rtype: ListNode """ if not head or not head.next: return head slow = fast = head while fast.next and fast.next.next: fast = fast.next.next slow = slow.next fast = slow.next slow.next = None p1 = self.sortList(head) p2 = self.sortList(fast) return self.merge(p1, p2) def merge(self, list1, list2): h = p = ListNode(None) while list1 and list2: if list1.val <= list2.val: p.next = list1 list1 = list1.next else: p.next = list2 list2 = list2.next p = p.next if list1: p.next = list1 if list2: p.next = list2 return h.next s = Solution() head = s.createList(list=[3,2,1,4,5]) head2 = s.createList(list=[6,7,8]) head1 = s.sortList(head) s.showList(head1)
self.description = "check file type without mtree" self.filesystem = [ "bar/", "foo -> bar/" ] pkg = pmpkg("dummy") pkg.files = [ "foo/" ] self.addpkg2db("local",pkg) self.args = "-Qk" self.addrule("PACMAN_RETCODE=1") self.addrule("PACMAN_OUTPUT=warning.*(File type mismatch)")
#Solution-7 Lisa Murray # User needs to input number that they want to calculate the square root of: num = float(input("Please enter a positive number: ")) #square root is found by raising the number to the power of a half sqroot = num**(1/2) # round the square root number to one decimal place and cast as a string ans = str(round(sqroot, 1)) #print the answer in a formatted sentence print (f"The square root of {num} is approx. {ans}.")
# MadLib.py adjective = input("Please enter an adjective: ") noun = input("Please enter a noun: ") verb = input("Please enter a verb ending in -ed: ") print("Your MadLib:") print("The", adjective, noun, verb, "over the lazy brown dog.")
""" None """ class SnakeGame: def __init__(self, width: int, height: int, food: List[List[int]]): """ Initialize your data structure here. @param width - screen width @param height - screen height @param food - A list of food positions E.g food = [[1,1], [1,0]] means the first food is positioned at [1,1], the second is at [1,0]. """ self.width = width self.height = height self.food = food self.food_index = 0 self.shape = [(0, 0)] self.positions = set([(0, 0)]) def move(self, direction: str) -> int: """ Moves the snake. @param direction - 'U' = Up, 'L' = Left, 'R' = Right, 'D' = Down @return The game's score after the move. Return -1 if game over. Game over when snake crosses the screen boundary or bites its body. """ curr = self.shape[-1] mapping = { 'U': (-1, 0), 'L': (0, -1), 'R': (0, 1), 'D': (1, 0), } delta = mapping[direction] next_pos = (curr[0] + delta[0], curr[1] + delta[1]) if next_pos[0] < 0 or next_pos[0] >= self.height or next_pos[1] < 0 or next_pos[1] >= self.width: return -1 food_taken = False if self.food_index < len(self.food): if next_pos == tuple(self.food[self.food_index]): food_taken = True self.food_index += 1 if not food_taken: tail = self.shape[0] self.shape.pop(0) self.positions.remove(tail) if next_pos in self.positions: return -1 self.shape.append(next_pos) self.positions.add(next_pos) return len(self.shape) - 1 # Your SnakeGame object will be instantiated and called as such: # obj = SnakeGame(width, height, food) # param_1 = obj.move(direction)
""" Handling of options passed to the decorator to generate more rows of data. """ def _copy_rows(data, num_rows, base_row_index=0): """ Copies one list from a list of lists and adds it to the same list n times. Parameters ---------- data: [][] Dataset to apply the function to. This will be mutated. base_row_index: int The index of the row to copy num_rows: int The number of times to copy the base row. Returns ------- [][] List of lists, containing the additional copied data. """ copies = [data[base_row_index] for _ in range(num_rows)] return data + copies def _apply_func(data, func, num_rows, base_row_index=0, increment=False): """ Apply the function to the base row which returns a new row. This is then added to the dataset n times. Parameters ---------- data: [][] List to apply the function to. func: function The function to apply to the row. This won't alter the initial row it is applied to. base_row_index: int The index of the row to first apply the function to. num_rows: int The number of times this function should be applied. Will result in this many new rows added to the dataset. increment: boolean If true, the function will be applied to the newly created rows rather than the base row on further iterations. Returns ------- [][] The mutated list with the new rows added. """ row = list(data[base_row_index]) curr_index = base_row_index for _ in range(num_rows): data.append(func(row)) if increment: curr_index += 1 row = list(data[curr_index]) return data def apply_options(data, opts): """ Applies the passed options to the dataset. Parameters ---------- data: [][] List of lists containing the mock csv data. opts: dict Dictionary of options used to determine how to mutate the data. Options are as follows: add_rows: int The number of rows to add onto the mock dataset. row_pattern: str or function if str, should be 'copy' to apply the copy function. if function, will be used to create the new rows. base_row_index: int The index of the base row to apply the row pattern to. increment: boolean, If true and row_pattern is a function, the function will be applied incrementally on the dataset, rather than just on the base row over and over again. Returns ------- [][] The dataset with the new rows added. """ if not opts: return data if opts['row_pattern'] == 'copy': data = _copy_rows( data=data, num_rows=opts['add_rows'], base_row_index=opts.get('base_row_index') or 0 ) else: data = _apply_func( data=data, func=opts['row_pattern'], num_rows=opts['add_rows'], base_row_index=opts.get('base_row_index') or 0, increment=opts.get('increment') or False ) return data
class Node: def __init__(self,cargo,left=None,right=None): self.cargo = cargo self.left = left self.right = right def __str__(self) -> str: return str(self.cargo) def insert(root,key): if root is None: return Node(key) if root.cargo>key: if root.left is None: root.left = Node(key) else: insert(root.left,key) else: if root.right is None: root.right = Node(key) else: insert(root.right,key) def inorder(root): if root is not None: inorder(root.left) print(root,end=' ') inorder(root.right) if __name__ =='__main__': tree = Node(5) insert(tree,2) insert(tree,8) insert(tree,9) insert(tree,6) insert(tree,4) insert(tree,3) inorder(tree)
num1 = 1 num2 = 2 num3 = 3 num4 = 33 num6 = 66
class input_format(): def __init__(self,format_tag): self.tag = format_tag def print_sample_input(self): if self.tag =='FCC_BCC_Edge_Ternary': print(''' Sample JSON for using pseudo-ternary predictions of solid solution strength by Curtin edge dislocation model. ------------------------------------------------------------ { "material":"MnFeCoNiAl", "structure":"FCC", "pseudo-ternary":{ "increment": 1, "psA": {"grouped_elements":["Mn","Co"], "ratio": [1,1], "range":[0,100]}, "psB": {"grouped_elements":["Fe","Ni"], "ratio": [1,1], "range":[0,100]}, "psC": {"grouped_elements":["Al"], "ratio": [1], "range":[0,100]} }, "elements":{ "Co": {"Vn":11.12,"E":262.9,"G":101.7,"nu":0.292}, "Ni": {"Vn":10.94,"E":199.1,"G":76.0,"nu":0.309}, "Al": {"Vn":16.472,"E":65.5,"G":23.9,"nu":0.369}, "Mn": {"Vn":12.60,"E":197.7,"G":73.4,"nu":0.347}, "Fe": {"Vn":12.09,"E":194.3,"G":73.4} }, "uncertainty_level":{ "on/off":"on", "a":0.01, "elastic_constants":0.05 }, "conditions":{"temperature":300,"strain_r":0.001}, "model":{ "name":"FCC_Varvenne-Curtin-2016" }, "savefile":"MnFeCoNiAl_out" } ------------------------------------------------------------ Nesessary tags: "material": material name -- "structure": "FCC" or "BCC" -- "pseudo-ternary": containing "psA" "psB" 'psC' for pseudo-ternary components "psA": pseudo-ternary component, can be a single element or grouped element. "grouped_elements": # group specific elements in psA # eg. "grouped_elements":["Ni","Co"], Mn and Co are grouped "ratio": # specify the ratio between elements in A # eg. "ratio": [1,1], represent Co:Ni=1:1 "range": # specify the concentration range for "psA" # eg. "range":[0,100], range from 0 to 100 at.% -- "elements": input data for elements: "Co": element symbol for Co "Vn": atomic volume "a": lattice constant "b": Burgers vector # NOTE, just need to specify one of "Vn", "a" or "b" "E": Young's modulus "G": shear modulus "nu": Poisson's ratio # NOTE, in Voigt notation, as indicated in the paper. # Need to specify 2 of the "E", "G", and "nu" for isotropic. -- "conditions": experimental conditions "temperature": Kelvin "strain_r": experiment strain rate, typical tensile tests: 0.001 /s -- "model": IMPORTANT!!! "name": name of the model, use "FCC_Varvenne-Curtin-2016" for FCC and use "BCC_edge_Maresca-Curtin-2019" for BCC The following are adjustable parameters for the model "f1": # dimensionless pressure field parameter for athermal yield stress "f2": # dimensionless pressure field parameter for energy barrier "alpha": # dislocation line tension parameter IMPORTANT: If you don't know f1, f2, and alpha for your material, DO NOT change f1, f2 and alpha. The default values were optimized for FCC HEAs and BCC HEAs. Read Curtin's papers. ------- Optional tags: "uncertainty_level": allow uncertainty evaluation on input data. "on/off":"on" # turn on/off the uncertainty calculation # if off, no need to set the following tags # if on, specify the standard deviations for lattice constants and elastic constants "a": 0.01 # applied 1% standard deviation to lattice constants # 1000 data points were generated to evaluate the average and standar deviation # this means for each element, # a new lattice constant will be generated using normal distribution, # centered at the value "a" (lattice constants) in "elements" # with a standard deviation 0.01a. "elastic_constants": 0.05 # applied 5% standard deviation to elastic constants # 1000 data points were generated to evaluate the average and standar deviation # this means for each element, # new elastic constants will be generated using normal distribution, # centered at the values "E", "G", "nu" (elastic constants) in "elements" # with a standard deviation 0.01a. "savefile": output filename, CSV file. END ''') elif self.tag =='FCC_BCC_Edge_Composition_Temperature': print(''' Sample JSON for composition-temperature predictions of solid solution strength by Curtin edge dislocation model. ------------------------------------------------------------ { "material":"MnFeCoNi", "structure":"FCC", "elements":{ "Co": {"Vn":11.12,"E":262.9,"G":101.7,"nu":0.292}, "Ni": {"Vn":10.94,"E":199.1,"G":76.0,"nu":0.309}, "Mn": {"Vn":12.60,"E":197.7,"G":73.4,"nu":0.347}, "Fe": {"Vn":12.09,"E":194.3,"G":73.4} }, "compositions":{ "element_order": ["Co","Ni","Fe","Mn"], "concentrations": [ [25,25,25,25], [20,20,30,30], [30,30,20,20] ] }, "uncertainty_level":{ "on/off":"on", "a":0.01, "elastic_constants":0.05 }, "conditions":{ "temperature":{ "min": 300, "max": 600, "inc": 10 }, "strain_r":0.001 }, "model":{ "name":"FCC_Varvenne-Curtin-2016" }, "savefile":"MnFeCoNi_out" } ------------------------------------------------------------ Nesessary tags: "material": material name -- "structure": "FCC" or "BCC" -- "compositions": containing element symbols and concentrations for calculation. "element_order": a list of element symbols in order, be consistent with the "concentrations" "concentrations": a list of concentrations in at.% for elements in the "element_order", add up to 100. -- "elements": input data for elements: "Co": element symbol for Co "Vn": atomic volume "a": lattice constant "b": Burgers vector # NOTE, just need to specify one of "Vn", "a" or "b" "E": Young's modulus "G": shear modulus "nu": Poisson's ratio # NOTE, in Voigt notation, as indicated in the paper. # Need to specify 2 of the "E", "G", and "nu" for isotropic. -- "conditions": experimental conditions "temperature": specify temperature (Kelvin) range and increment for the calculations. "max": max T "min": min T "inc": increment. "strain_r": experiment strain rate, typical tensile tests: 0.001 /s -- "model": IMPORTANT!!! "name": name of the model, use "FCC_Varvenne-Curtin-2016" for FCC and use "BCC_edge_Maresca-Curtin-2019" for BCC The following are adjustable parameters for the model "f1": # dimensionless pressure field parameter for athermal yield stress "f2": # dimensionless pressure field parameter for energy barrier "alpha": # dislocation line tension parameter IMPORTANT: If you don't know f1, f2, and alpha for your material, DO NOT change f1, f2 and alpha. The default values were optimized for FCC HEAs and BCC HEAs. Read Curtin's papers. ------- Optional tags: "uncertainty_level": allow uncertainty evaluation on input data. "on/off":"on" # turn on/off the uncertainty calculation # if off, no need to set the following tags # if on, specify the standard deviations for lattice constants and elastic constants "a": 0.01 # applied 1% standard deviation to lattice constants # 1000 data points were generated to evaluate the average and standar deviation # this means for each element, # a new lattice constant will be generated using normal distribution, # centered at the value "a" (lattice constants) in "elements" # with a standard deviation 0.01a. "elastic_constants": 0.05 # applied 5% standard deviation to elastic constants # 1000 data points were generated to evaluate the average and standar deviation # this means for each element, # new elastic constants will be generated using normal distribution, # centered at the values "E", "G", "nu" (elastic constants) in "elements" # with a standard deviation 0.05*value. "savefile": output filename, CSV file. END ''') elif self.tag =='BCC_Screw_Curtin_Ternary': print(''' Sample JSON for predictions of solid solution strength for pseudo-ternary BCC by Curtin screw dislocation model. Screw dislocation in BCC. ------------------------------------------------------------ { "material":"NbMoW", "pseudo-ternary":{ "increment": 1, "psA": {"grouped_elements":["Nb"], "ratio": [1], "range":[0,100]}, "psB": {"grouped_elements":["Mo"], "ratio": [1], "range":[0,100]}, "psC": {"grouped_elements":["W"], "ratio": [1], "range":[0,100]} }, "elements":{ "Nb": {"a":3.30,"Delta_E_p":0.0345,"E_k":0.6400,"E_v":2.9899,"E_si":5.2563,"Delta_V_p":0.020}, "Mo": {"a":3.14,"Delta_E_p":0.1579,"E_k":0.5251,"E_v":2.9607,"E_si":7.3792,"Delta_V_p":0.020}, "W": {"a":3.16,"Delta_E_p":0.1493,"E_k":0.9057,"E_v":3.5655,"E_si":9.5417,"Delta_V_p":0.020} }, "adjustables":{ "kink_width":10, "Delta_V_p_scaler":1, "Delta_E_p_scaler":1 }, "conditions":{"temperature":300,"strain_r":0.001}, "model":{ "name":"BCC_screw_Maresca-Curtin-2019" }, "savefile":"NbMoW_out" } ------------------------------------------------------------ Nesessary tags: "material": material name -- "pseudo-ternary": containing "psA" "psB" 'psC' for pseudo-ternary components "psA": pseudo-ternary component, can be a single element or grouped elements. "grouped_elements": # group specific elements in psA # eg. "grouped_elements":["W","Ta"], Mn and Co are grouped "ratio": # specify the ratio between elements in A # eg. "ratio": [1,1], represent W:Ta=1:1 "range": # specify the concentration range for "psA" # eg. "range":[0,100], range from 0 to 100 at.% -- "elements": input data for elements: "W": element symbol for W below are necessary inputs. "a": lattice constant "E_k": screw dislocation kink formation energy (usually by DFT or MD calculations) "E_v": vacancy formation energy (usually by DFT or MD) "E_si": self-interstitial formation energy (usually by DFT or MD) "Delta_E_p": solute-dislocation interaction energy (usually by DFT or MD) "Delta_V_p": Peierls barrier (usually by DFT or MD) -- "adjustables": adjustable parameters for the model. Be VERY careful to change the values. "kink_width":10 kink width, default is 10, (unit: burgers vector), usually between 10b to 20b. "Delta_V_p_scaler":1, Peierls barrier scaler, DFT values are usually very high compared to experiments. So rescaling was taken to fit the experimental yield strengths. "Delta_E_p_scaler":1 Solute-dislocation interaction energy scaler. This is also rescaled for DFT/MD values. -- "conditions": experimental conditions "temperature": specify temperature (Kelvin) the calculations. "strain_r": experiment strain rate, typical tensile tests: 0.001 /s -- "model": "BCC_screw_Maresca-Curtin-2019", ------- Optional tags: "savefile": output filename, CSV file. END ''') elif self.tag =='BCC_Screw_Curtin_Composition_Temperature': print(''' Sample JSON for composition-temperature predictions of BCC solid solution strength by Curtin screw dislocation model. Screw dislocation in BCC. ------------------------------------------------------------ { "material":"Nb95Mo5", "model":"BCC_screw_Maresca-Curtin-2019", "properties":{ "a": 3.289, "E_k": 0.6342, "E_v": 2.989, "E_si": 5.361, "Delta_E_p": 0.0488, "Delta_V_p": 0.020 }, "conditions":{ "temperature":{ "max":500, "min":0, "inc":10 }, "strain_r":0.001 }, "adjustables":{ "kink_width":10, "Delta_V_p_scaler":1, "Delta_E_p_scaler":1 }, "savefile":"Nb95Mo5_out" } ------------------------------------------------------------ Nesessary tags: "material": material name -- "properties": input data for the material: "a": lattice constant "E_k": screw dislocation kink formation energy (usually by DFT or MD calculations) "E_v": vacancy formation energy (usually by DFT or MD) "E_si": self-interstitial formation energy (usually by DFT or MD) "Delta_E_p": solute-dislocation interaction energy (usually by DFT or MD) "Delta_V_p": Peierls barrier (usually by DFT or MD) -- "conditions": experimental conditions "temperature": specify temperature (Kelvin) range and increment for the calculations. "max": max T "min": min T "inc": increment. "strain_r": experiment strain rate, typical tensile tests: 0.001 /s -- "adjustables": adjustable parameters for the model. Be VERY careful to change the values. "kink_width":10 kink width, default is 10, (unit: burgers vector), usually between 10b to 20b. "Delta_V_p_scaler":1, Peierls barrier scaler, DFT values are usually very high compared to experiments. So rescaling was taken to fit the experimental yield strengths. "Delta_E_p_scaler":1 Solute-dislocation interaction energy scaler. This is also rescaled for DFT/MD values. -- "model": "BCC_screw_Maresca-Curtin-2019", ------- Optional tags: "savefile": output filename, CSV file. END ''') elif self.tag =='BCC_Screw_Suzuki_Temperature': print(''' Sample JSON for predictions of solid solution strength vs. temperature for BCC by Suzuki screw dislocation model. Screw dislocation in BCC. ------------------------------------------------------------ { "material":"Ti33Nb33Zr33", "model":"BCC_screw_Suzuki_RWASM-2020", "elements":{ "Nb": {"c":0.34,"a":3.30,"G":38,"nu":0.40,"E_w":0.054 ,"E_f_v":2.99,"E_f_si":5.25}, "Ti": {"c":0.33,"a":3.31,"G":44,"nu":0.32,"E_w":-0.028,"E_f_v":2.22,"E_f_si":2.4}, "Zr": {"c":0.33,"a":3.58,"G":33,"nu":0.34,"E_w":-0.053,"E_f_v":1.80,"E_f_si":3.5} }, "conditions":{ "temperature":{ "max":1400, "min":300, "inc":200 }, "strain_r":0.001 }, "adjustables":{ "kink_width":10, "tau_i_exponent":1, "dislocation_density":4e13, "trial_kappa":{ "min":1, "max":4, "inc":0.05 }, "trial_tau_k":5 }, "savefile":"TiNbZr_Suzuki_out" } ------------------------------------------------------------ Nesessary tags: "material": material name -- "elements": input data for elements: "Nb": element symbol for Nb below are necessary inputs. "c": concentration in at.% "a": lattice constant "E_w": solute-dislocation interaction (usually by DFT or MD calculations) "E_f_v": vacancy formation energy (usually by DFT or MD) "E_f_si": self-interstitial formation energy (usually by DFT or MD) "G": shear modulus "nu": Poisson ratio -- "adjustables": adjustable parameters for the model. Be VERY careful to change the values. "kink_width":10 kink width, default is 10, (unit: burgers vector), usually between 10b to 20b. "dislocation_density": mobile dislocation density default is 4e13, usually between 1e12 to 1e14 "tau_i_exponent": exponent for contributions of tau_y from different elements phenomenological equation for tau_y: q = tau_i_exponent tau_y = sum( tau_y_i^(1/q) )^q i for element_i for refractory metals, a safe value is 0.95-1. # same as the reference. "trial_kappa": The value of tau_y is obtained by minimizing tau_y over this kappa parameter. A range of kappa values are supplied to obtain tau_y vs. kappa curve. Then tau_y is found for minimum of the curve. Be careful to try different kappa range for convergence test. "trial_tau_k": Also needed for tau_y minimization. A fourth order equation must be solved for tau_k, before tau_y minimization. tau_k^4 + S * tau_k -R = 0 This trial_tau_k value provides the initial guess for scipy.optimize.root. Default value is 5, unit is MPa. -- "conditions": experimental conditions "temperature": specify temperature (Kelvin) range and increment for the calculations. "max": max T "min": min T "inc": increment. "strain_r": experiment strain rate, typical tensile tests: 0.001 /s -- "model": "BCC_screw_Suzuki_RWASM-2020" name of the Suzuki model # Paper: Rao, S.I., Woodward, C., Akdim, B., Senkov, O.N. and Miracle, D., 2021. # Theory of solid solution strengthening of BCC Chemically Complex Alloys. Acta Materialia, 209, p.116758. ------- Optional tags: "savefile": output filename, CSV file. END ''') elif self.tag =='BCC_Screw_Suzuki_Ternary': print(''' Sample JSON for predictions of solid solution strength for ternary/pseudo-ternary BCC by Suzuki screw dislocation model. ------------------------------------------------------------ { "material":"TiNbZr", "model":"BCC_screw_Suzuki_RWASM-2020", "pseudo-ternary":{ "increment": 5, "psA": {"grouped_elements":["Nb"], "ratio": [1], "range":[0,100]}, "psB": {"grouped_elements":["Ti"], "ratio": [1], "range":[0,100]}, "psC": {"grouped_elements":["Zr"], "ratio": [1], "range":[0,100]} }, "elements":{ "Nb": {"a":3.30,"G":38,"nu":0.40,"E_w":0.054 ,"E_f_v":2.99,"E_f_si":5.25}, "Ti": {"a":3.31,"G":44,"nu":0.32,"E_w":-0.028,"E_f_v":2.22,"E_f_si":2.4}, "Zr": {"a":3.58,"G":33,"nu":0.34,"E_w":-0.053,"E_f_v":1.80,"E_f_si":3.5} }, "conditions":{ "temperature":300, "strain_r":0.001 }, "adjustables":{ "kink_width":10, "tau_i_exponent":1, "dislocation_density":4e13, "trial_kappa":{ "min":1, "max":4, "inc":0.05 }, "trial_tau_k":5 }, "savefile":"TiNbZr_Suzuki_Ternary_out" } ------------------------------------------------------------ Nesessary tags: "material": material name -- "pseudo-ternary": containing "psA" "psB" 'psC' for pseudo-ternary components "psA": pseudo-ternary component, can be a single element or grouped elements. "grouped_elements": # group specific elements in psA # eg. "grouped_elements":["W","Ta"], Mn and Co are grouped "ratio": # specify the ratio between elements in A # eg. "ratio": [1,1], represent W:Ta=1:1 "range": # specify the concentration range for "psA" # eg. "range":[0,100], range from 0 to 100 at.% -- "elements": input data for elements: "Nb": element symbol for Nb below are necessary inputs. "a": lattice constant "E_w": solute-dislocation interaction (usually by DFT or MD calculations) "E_f_v": vacancy formation energy (usually by DFT or MD) "E_f_si": self-interstitial formation energy (usually by DFT or MD) "G": shear modulus "nu": Poisson ratio -- "adjustables": adjustable parameters for the model. Be VERY careful to change the values. "kink_width":10 kink width, default is 10, (unit: burgers vector), usually between 10b to 20b. "dislocation_density": mobile dislocation density default is 4e13, usually between 1e12 to 1e14 "tau_i_exponent": exponent for contributions of tau_y from different elements phenomenological equation for tau_y: q = tau_i_exponent tau_y = sum( tau_y_i^(1/q) )^q i for element_i for refractory metals, a safe value is 0.95-1. # same as the reference. "trial_kappa": The value of tau_y is obtained by minimizing tau_y over this kappa parameter. A range of kappa values are supplied to obtain tau_y vs. kappa curve. Then tau_y is found for minimum of the curve. Be careful to try different kappa range for convergence test. "trial_tau_k": Also needed for tau_y minimization. A fourth order equation must be solved for tau_k, before tau_y minimization. tau_k^4 + S * tau_k -R = 0 This trial_tau_k value provides the initial guess for scipy.optimize.root. Default value is 5, unit is MPa. -- "conditions": experimental conditions "temperature": specify temperature (Kelvin) the calculations. "strain_r": experiment strain rate, typical tensile tests: 0.001 /s -- "model": "BCC_screw_Suzuki_RWASM-2020" name of the Suzuki model # Paper: Rao, S.I., Woodward, C., Akdim, B., Senkov, O.N. and Miracle, D., 2021. # Theory of solid solution strengthening of BCC Chemically Complex Alloys. Acta Materialia, 209, p.116758. ------- Optional tags: "savefile": output filename, CSV file. END ''') else: print('NOT a valid name. Available input formats: \n' 'FCC_BCC_Edge_Ternary\n' 'FCC_BCC_Edge_Composition_Temperature\n' 'BCC_Screw_Curtin_Ternary\n' 'BCC_Screw_Curtin_Composition_Temperature\n' 'BCC_Screw_Suzuki_Temperature\n' 'BCC_Screw_Suzuki_Ternary\n')
'''l = ['cão', 'gato', 'peixe'] for c in l: print(c)''' cont = 0 palavra = input('digite a palavra: ') for c in palavra: if c in 'aeiou': print(c, end=' ') cont += 1 print(cont)
def main(): a = float(input("Number a: ")) b = float(input("Number b: ")) if a > b: print("A > b") elif a < b: print("A < B") else: print("A = B") if __name__ == '__main__': main()
# A sentence is a list of words that are separated by a single space with no leading or trailing spaces. Each of the words consists of only uppercase and lowercase English letters (no punctuation). # For example, "Hello World", "HELLO", and "hello world hello world" are all sentences. # You are given a sentence s​​​​​​ and an integer k​​​​​​. You want to truncate s​​​​​​ such that it contains only the first k​​​​​​ words. Return s​​​​​​ after truncating it. # Example 1: # Input: s = "Hello how are you Contestant", k = 4 # Output: "Hello how are you" # Explanation: # The words in s are ["Hello", "how" "are", "you", "Contestant"]. # The first 4 words are ["Hello", "how", "are", "you"]. # Hence, you should return "Hello how are you". # Example 2: # Input: s = "What is the solution to this problem", k = 4 # Output: "What is the solution" # Explanation: # The words in s are ["What", "is" "the", "solution", "to", "this", "problem"]. # The first 4 words are ["What", "is", "the", "solution"]. # Hence, you should return "What is the solution". # Example 3: # Input: s = "chopper is not a tanuki", k = 5 # Output: "chopper is not a tanuki" # Constraints: # 1 <= s.length <= 500 # k is in the range [1, the number of words in s]. # s consist of only lowercase and uppercase English letters and spaces. # The words in s are separated by a single space. # There are no leading or trailing spaces. # algorithm: #initialize a counter numberOfSpaces as 0 # initialize a counter i at 0 # initialize result as empty string '' # while numberOfSpaces is less than k # is string[i] a space? if so, increment numberOfSpaces. # result += string[i] # increment i # return result def truncateSentence(s: str, k: int) -> str: i = 1 result = s[0] numberOfSpaces = 0 while i < len(s): if s[i] == ' ': numberOfSpaces += 1 if numberOfSpaces >= k: break result += s[i] i += 1 return result assert truncateSentence('Hello how are you Contestant', 4) == "Hello how are you" assert truncateSentence("chopper is not a tanuki", 5) == "chopper is not a tanuki" # Input: s = "Hello how are you Contestant", k = 4 # Output: "Hello how are you"
class AuthSigner(object): """Signer for use with authenticated ADB, introduced in 4.4.x/KitKat.""" def sign(self, data): """Signs given data using a private key.""" raise NotImplementedError() def get_public_key(self): """Returns the public key in PEM format without headers or newlines.""" raise NotImplementedError() class AdbClient(object): def connect(self): raise NotImplementedError() def auth(self, message): raise NotImplementedError() def open(self, local_id, destination): pass def send(self, message): raise NotImplementedError() def send_okay(self, message): raise NotImplementedError() def read(self): raise NotImplementedError() class Handler(object): def __init__(self): self.handle = None def open(self): raise NotImplementedError() def read(self, length): raise NotImplementedError() def write(self, data): raise NotImplementedError() def close(self): raise NotImplementedError()
# MYSQL CREDENTIALS mysql_user = "root" mysql_pass = "clickhouse" # MYSQL8 CREDENTIALS mysql8_user = "root" mysql8_pass = "clickhouse" # POSTGRES CREDENTIALS pg_user = "postgres" pg_pass = "mysecretpassword" pg_db = "postgres" # MINIO CREDENTIALS minio_access_key = "minio" minio_secret_key = "minio123" # MONGODB CREDENTIALS mongo_user = "root" mongo_pass = "clickhouse" # ODBC CREDENTIALS odbc_mysql_uid = "root" odbc_mysql_pass = "clickhouse" odbc_mysql_db = "clickhouse" odbc_psql_db = "postgres" odbc_psql_user = "postgres" odbc_psql_pass = "mysecretpassword"
#! python3 """√ 2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ))) = 1.414213... In the first one-thousand expansions, how many fractions contain a numerator with more digits than denominator?""" answer = 0 n, d = 3, 2 for _ in range(1000): if len(str(n)) > len(str(d)): answer += 1 n, d = n + d + d, n + d print(answer)
# Find cure root using bisection search num = 43 eps = 1e-6 iteration = 0 croot = num/2 _high = num _low = 1 while abs(croot**3-num)>eps: iteration+=1 cube = croot**3 if cube==num: print(f'At Iteration {iteration} : Found It!, the cube root for {num} is {croot}') break elif cube>num: _high = croot elif cube<num: _low = croot print(f'At Iteration {iteration} : the cube root aproximation for {num} is {croot}') croot=(_high+_low)/2
level = 3 name = 'Kertasari' capital = 'Cibeureum' area = 152.07
#!/bin/python3 """ If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ def multiples_of_3_5(stop): """Compute sum numbers in range(1, stop) if numbers are divided by 3 or 5.""" # numbers divided by 3 or 5 make cycle length 15. frames = (stop - 1) // 15 # multiples for the first frame: 1-15 multiples = [i for i in range(1, 15 + 1) if i % 3 == 0 or i % 5 == 0] frame_sum = sum(multiples) # every next frame has sum increase 15 for every sum element frame_increase = 15 * len(multiples) # compute 0*frame_increase + 1*frame_increase + .... + (frames - 1) * frame_increase # use equation for sum integers from 1 to n-1 which is n * (n - 1) /2 s = frames * frame_sum + (frames - 1) * frames // 2 * frame_increase # add sum for ending part which is not full frame for k in range(frames * 15 + 1, stop): if k % 3 == 0 or k % 5 == 0: s += k return s if __name__ == "__main__": # print(multiples_of_3_5(1000)) t = int(input().strip()) for _ in range(t): n = int(input().strip()) print(multiples_of_3_5(n))
class IllegalValueException(Exception): def __init__(self, message): super().__init__(message) class IllegalCurrencyException(Exception): def __init__(self, message): super().__init__(message) class IllegalCoinException(Exception): def __init__(self, message): super().__init__(message) class IllegalNumberOfProductsException(Exception): def __init__(self, message): super().__init__(message) class IllegalAmountOfProductsException(Exception): def __init__(self, message): super().__init__(message)
n1 = float(input('Informe a nota 1: ')) n2 = float(input('Informe a nota 2: ')) m = (n1+n2)/2 print('A média é {}'.format(m))
class Solution(object): def maxProfit(self, k, prices): """ :type k: int :type prices: List[int] :rtype: int """ n = len(prices) if k >= n/2: ret = 0 for i in xrange(1, n): ret += max(prices[i]-prices[i-1], 0) return ret local_table = [0] * (k+1) global_table = [0] * (k+1) for i in xrange(1, n): diff = prices[i]-prices[i-1] for j in xrange(k, 0, -1): local_table[j] = max(global_table[j-1]+max(diff, 0), local_table[j]+diff) global_table[j] = max(global_table[j], local_table[j]) return global_table[-1]
class Solution: @lru_cache(None) def numRollsToTarget(self, d: int, f: int, target: int) -> int: if d==1: if f>=target:return 1 return 0 count=0 for i in range(1,f+1): if i<target: count += self.numRollsToTarget(d-1,f,target-i) return count%(10**9 + 7)
# Tags: Implementation # Difficulty: 1.5 # Priority: 5 # Date: 08-06-2017 hh, mm = map(int, input().split(':')) a = int( input() ) % ( 60 * 24 ) mm += a hh += mm // 60 mm %= 60 hh %= 24 print('%0.2d:%0.2d' %(hh, mm))
# # PySNMP MIB module HUAWEI-BRAS-SRVCFG-DEVICE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-BRAS-SRVCFG-DEVICE-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:43:28 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion") hwBRASMib, = mibBuilder.importSymbols("HUAWEI-MIB", "hwBRASMib") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") mplsVpnVrfName, = mibBuilder.importSymbols("MPLS-VPN-MIB", "mplsVpnVrfName") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") iso, Counter32, NotificationType, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, Gauge32, Unsigned32, ObjectIdentity, MibIdentifier, IpAddress, Integer32, Counter64, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Counter32", "NotificationType", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "Gauge32", "Unsigned32", "ObjectIdentity", "MibIdentifier", "IpAddress", "Integer32", "Counter64", "Bits") MacAddress, TruthValue, TextualConvention, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TruthValue", "TextualConvention", "RowStatus", "DisplayString") hwBRASSrvcfgDevice = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6)) if mibBuilder.loadTexts: hwBRASSrvcfgDevice.setLastUpdated('200403041608Z') if mibBuilder.loadTexts: hwBRASSrvcfgDevice.setOrganization('Huawei Technologies Co., Ltd. ') if mibBuilder.loadTexts: hwBRASSrvcfgDevice.setContactInfo(' NanJing Institute,Huawei Technologies Co.,Ltd. HuiHong Mansion,No.91 BaiXia Rd. NanJing, P.R. of China Zipcode:210001 Http://www.huawei.com E-mail:support@huawei.com ') if mibBuilder.loadTexts: hwBRASSrvcfgDevice.setDescription('The MIB contains objects of module SRVCFG.') hwSrvcfgDeviceMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1)) hwDeviceUserTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1), ) if mibBuilder.loadTexts: hwDeviceUserTable.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserTable.setDescription('The table of device user.') hwDeviceUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1), ).setIndexNames((0, "MPLS-VPN-MIB", "mplsVpnVrfName"), (0, "HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserStartIpAddr")) if mibBuilder.loadTexts: hwDeviceUserEntry.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserEntry.setDescription('Description.') hwDeviceUserStartIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserStartIpAddr.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserStartIpAddr.setDescription('The start ip address of device user.') hwDeviceUserEndIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 2), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserEndIpAddr.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserEndIpAddr.setDescription('The end ip address of device user.') hwDeviceUserIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 3), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserIfIndex.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserIfIndex.setDescription('The index of interface which device user was in.') hwDeviceUserIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 47))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserIfName.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserIfName.setDescription('The name of interface.') hwDeviceUserVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserVlan.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVlan.setDescription('The vlan of device user.') hwDeviceUserVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserVpi.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVpi.setDescription('The vpi of device user.') hwDeviceUserVci = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserVci.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVci.setDescription('The vci of device user.') hwDeviceUserMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 8), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserMac.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserMac.setDescription('The MAC address of device user.') hwDeviceUserDomain = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 200))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserDomain.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserDomain.setDescription('The domain which device user was part of.') hwDeviceUserStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("ready", 0), ("detecting", 1), ("deleting", 2), ("online", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserStatus.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserStatus.setDescription('The status of device user.') hwDeviceUserRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 11), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwDeviceUserRowStatus.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserRowStatus.setDescription('The row status of device user.') hwDeviceQinQUserVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceQinQUserVlan.setStatus('current') if mibBuilder.loadTexts: hwDeviceQinQUserVlan.setDescription('The QinQ vlan of device user.') hwDeviceUserTableV2 = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2), ) if mibBuilder.loadTexts: hwDeviceUserTableV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserTableV2.setDescription('The table of device user.(V2)') hwDeviceUserEntryV2 = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1), ).setIndexNames((0, "HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVrfNameV2"), (0, "HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserStartIpAddrV2")) if mibBuilder.loadTexts: hwDeviceUserEntryV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserEntryV2.setDescription('Description.(V2)') hwDeviceUserStartIpAddrV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserStartIpAddrV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserStartIpAddrV2.setDescription('The start ip address of device user.(V2)') hwDeviceUserEndIpAddrV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 2), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserEndIpAddrV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserEndIpAddrV2.setDescription('The end ip address of device user.(V2)') hwDeviceUserIfIndexV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 3), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserIfIndexV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserIfIndexV2.setDescription('The index of interface which device user was in.(V2)') hwDeviceUserIfNameV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 47))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserIfNameV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserIfNameV2.setDescription('The name of interface.(V2)') hwDeviceUserVlanV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserVlanV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVlanV2.setDescription('The vlan of device user.(V2)') hwDeviceUserVpiV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserVpiV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVpiV2.setDescription('The vpi of device user.(V2)') hwDeviceUserVciV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65534))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserVciV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVciV2.setDescription('The vci of device user.(V2)') hwDeviceUserMacV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 8), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserMacV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserMacV2.setDescription('The MAC address of device user.(V2)') hwDeviceUserDomainV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceUserDomainV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserDomainV2.setDescription('The domain which device user was part of.(V2)') hwDeviceUserStatusV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("ready", 0), ("detecting", 1), ("deleting", 2), ("online", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserStatusV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserStatusV2.setDescription('The status of device user.(V2)') hwDeviceUserRowStatusV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 11), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwDeviceUserRowStatusV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserRowStatusV2.setDescription('The row status of device user.(V2)') hwDeviceQinQUserVlanV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4094))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwDeviceQinQUserVlanV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceQinQUserVlanV2.setDescription('The QinQ vlan of device user.(V2)') hwDeviceUserVrfNameV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 1, 2, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwDeviceUserVrfNameV2.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserVrfNameV2.setDescription('The vpn instance of device user.(V2)') hwSrvcfgDeviceConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 2)) hwSrvcfgDeviceCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 2, 1)) hwSrvcfgDeviceCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 2, 1, 1)).setObjects(("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserGroup"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserV2Group")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwSrvcfgDeviceCompliance = hwSrvcfgDeviceCompliance.setStatus('current') if mibBuilder.loadTexts: hwSrvcfgDeviceCompliance.setDescription('The compliance statement for systems supporting the this module.') hwDeviceUserGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 2, 2)) hwDeviceUserGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 2, 2, 1)).setObjects(("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserStartIpAddr"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserEndIpAddr"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserIfIndex"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserIfName"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVlan"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVpi"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVci"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserMac"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserDomain"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserStatus"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserRowStatus"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceQinQUserVlan")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwDeviceUserGroup = hwDeviceUserGroup.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserGroup.setDescription('The Device User group.') hwDeviceUserV2Group = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 40, 6, 2, 2, 2)).setObjects(("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserStartIpAddrV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserEndIpAddrV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserIfIndexV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserIfNameV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVlanV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVpiV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVciV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserMacV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserDomainV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserStatusV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserRowStatusV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceQinQUserVlanV2"), ("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", "hwDeviceUserVrfNameV2")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwDeviceUserV2Group = hwDeviceUserV2Group.setStatus('current') if mibBuilder.loadTexts: hwDeviceUserV2Group.setDescription('The Device User group.(V2)') mibBuilder.exportSymbols("HUAWEI-BRAS-SRVCFG-DEVICE-MIB", hwDeviceUserIfIndexV2=hwDeviceUserIfIndexV2, hwDeviceUserMac=hwDeviceUserMac, hwDeviceUserStatusV2=hwDeviceUserStatusV2, hwDeviceUserVlanV2=hwDeviceUserVlanV2, hwDeviceUserStartIpAddrV2=hwDeviceUserStartIpAddrV2, hwDeviceUserGroup=hwDeviceUserGroup, hwDeviceUserTableV2=hwDeviceUserTableV2, hwDeviceUserEntry=hwDeviceUserEntry, hwDeviceUserTable=hwDeviceUserTable, hwDeviceUserVci=hwDeviceUserVci, hwDeviceQinQUserVlanV2=hwDeviceQinQUserVlanV2, hwDeviceUserVlan=hwDeviceUserVlan, hwDeviceUserVrfNameV2=hwDeviceUserVrfNameV2, hwDeviceUserMacV2=hwDeviceUserMacV2, hwDeviceUserIfNameV2=hwDeviceUserIfNameV2, hwDeviceUserStartIpAddr=hwDeviceUserStartIpAddr, hwSrvcfgDeviceConformance=hwSrvcfgDeviceConformance, hwDeviceUserRowStatusV2=hwDeviceUserRowStatusV2, hwDeviceUserEndIpAddr=hwDeviceUserEndIpAddr, hwSrvcfgDeviceCompliances=hwSrvcfgDeviceCompliances, hwSrvcfgDeviceCompliance=hwSrvcfgDeviceCompliance, hwDeviceUserEntryV2=hwDeviceUserEntryV2, hwDeviceUserVpiV2=hwDeviceUserVpiV2, hwDeviceUserVciV2=hwDeviceUserVciV2, hwDeviceUserDomain=hwDeviceUserDomain, hwDeviceUserStatus=hwDeviceUserStatus, hwDeviceUserGroups=hwDeviceUserGroups, hwBRASSrvcfgDevice=hwBRASSrvcfgDevice, hwDeviceUserDomainV2=hwDeviceUserDomainV2, hwSrvcfgDeviceMibObjects=hwSrvcfgDeviceMibObjects, hwDeviceUserIfIndex=hwDeviceUserIfIndex, hwDeviceUserIfName=hwDeviceUserIfName, hwDeviceUserRowStatus=hwDeviceUserRowStatus, hwDeviceUserEndIpAddrV2=hwDeviceUserEndIpAddrV2, hwDeviceUserVpi=hwDeviceUserVpi, PYSNMP_MODULE_ID=hwBRASSrvcfgDevice, hwDeviceQinQUserVlan=hwDeviceQinQUserVlan, hwDeviceUserV2Group=hwDeviceUserV2Group)
class Solution: def findOrder(self, numCourses: int, prerequisites: List[List[int]]) -> List[int]: child = collections.defaultdict(set) parent = collections.defaultdict(int) for c, p in prerequisites: child[p].add(c) parent[c] +=1 q = collections.deque() for i in range(numCourses): if parent[i] == 0: q.append(i) del parent[i] res = [] while q: course = q.popleft() res.append(course) for ch in child[course]: parent[ch] -= 1 if parent[ch] == 0: q.append(ch) del parent[ch] return res if len(res) == numCourses else []
''' URL: https://leetcode.com/problems/monotonic-array/ Difficulty: Easy Title: Monotonic Array ''' ################### Code ################### class Solution: def isMonotonic(self, A: List[int]) -> bool: if len(A) in [1, 2]: return True cmp = None for i in range(len(A) - 1): diff = A[i+1] - A[i] if diff != 0: if cmp is None: cmp = diff else: if not cmp * diff > 0: return False return True
#NUMBERS 10 #Numero Entero (integer) 10.4 #Numero Flotante (float) print(type(10)) print(type(10.4)) #INPUT age = input('Coloque su edad: ') print(type(age)) new_age = int(age) + 5 print(new_age)
''' In this problem, we should define dummy and cur as a listNode(0). Let dummy points to the start of cur. Everytime when we update cur.next, cur will move to cur.next. And if the length of l1 and l2 is not equal, cur.next points to the left list l1 or l2. Tips: It is like two pointers. But it is done with node. ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def mergeTwoLists(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ head1 = l1 head2 = l2 cur = dummy= ListNode(0) while head1 and head2: if head1.val > head2.val: cur.next = head2 head2 = head2.next else: cur.next = head1 head1 = head1.next cur = cur.next cur.next = head1 or head2 return dummy.next