content
stringlengths
7
1.05M
class BouncingBall(object): def __init__(self, x, y, dia, col): self.location = PVector(x, y) self.velocity = PVector(0, 0) self.d = dia self.col = col self.gravity = 0.1 self.dx = 2 def move(self): # self.location.x += self.dx self.velocity.y += self.gravity self.location.add(self.velocity) self.location.x += self.dx # check borders if self.location.y >= height: self.velocity.y *= -1 self.location.y = height if self.location.x >= width: self.location.x = width - self.d self.dx *= -1 if (self.location.x <= 0): self.location.x = 0 self.dx *= -1 def display(self): fill(self.col) ellipse(self.location.x, self.location.y, self.d, self.d)
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ @content : ๅ…จๅฑ€ๅ˜้‡้…็ฝฎๆจกๅ— db.py, getter.py, tester.py, scheduler.py @Author : ๅŒ—ๅ†ฅ็ฅžๅ› @File : setting.py @Software: PyCharm """ # โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”ๅŽไธฝๅˆ†ๅ‰ฒ็บฟโ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” # db.pyๆจกๅ—ๅ…จๅฑ€ๅ˜้‡ REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_KEY, MAX_SCORE, MIN_SCORE, INITIAL_SCORE # Redis้…็ฝฎ REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 REDIS_PASSWORD = None REDIS_KEY = 'proxies' # ไปฃ็†ๅˆ†ๆ•ฐ้…็ฝฎ MAX_SCORE = 100 MIN_SCORE = 0 INITIAL_SCORE = 10 # โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”ๅŽไธฝๅˆ†ๅ‰ฒ็บฟโ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” # getter.py ๅ…จๅฑ€ๅ˜้‡ POOL_UPPER_THRESHOLD # ไปฃ็†ๆฑ ๆ•ฐ้‡็•Œ้™ POOL_UPPER_THRESHOLD = 50000 # โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”ๅŽไธฝๅˆ†ๅ‰ฒ็บฟโ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” # tester.pyๅ…จๅฑ€ๅ˜้‡ TEST_URL, VALID_STATUS_CODES, BATCH_TEST_SIZE # ไปฃ็†ipๆต‹่ฏ•็ซ™็‚น๏ผŒๅปบ่ฎฎๆŠ“ๅ“ชไธช็ฝ‘็ซ™ๅกซ้‚ฃไธช TEST_URL = 'http://www.baidu.com' # ๆต‹่ฏ•ๅ“ๅบ”็Šถๆ€็  VALID_STATUS_CODES = [200, 302] # ๆœ€ๅคงๆ‰นๆต‹่ฏ•้‡ BATCH_TEST_SIZE = 10 # โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”ๅŽไธฝๅˆ†ๅ‰ฒ็บฟโ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” # scheduler.py ๅ…จๅฑ€ๅ˜้‡ TESTER_CYCLE, GETTER_CYCLE, API_HOST, API_PORT, TESTER_ENABLED, GETTER_ENABLED, API_ENABLED # ๆฃ€ๆŸฅๅ‘จๆœŸ TESTER_CYCLE = 20 # ่Žทๅ–ๅ‘จๆœŸ GETTER_CYCLE = 300 # web API้…็ฝฎ API_HOST = '0.0.0.0' API_PORT = 5555 # ๆต‹่ฏ•ๅ™จใ€่Žทๅ–ๅ™จใ€apiๆŽฅๅฃ ๅผ€ๅ…ณ TESTER_ENABLED = True GETTER_ENABLED = True API_ENABLED = True # โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”ๅŽไธฝๅˆ†ๅ‰ฒ็บฟโ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”
# Copyright 2020 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Implementation of ObjC/Swift Intent library rule.""" load( "@build_bazel_rules_apple//apple:providers.bzl", "AppleSupportToolchainInfo", ) load( "@build_bazel_rules_apple//apple/internal:resource_actions.bzl", "resource_actions", ) load( "@build_bazel_rules_apple//apple/internal:platform_support.bzl", "platform_support", ) load( "@build_bazel_apple_support//lib:apple_support.bzl", "apple_support", ) load( "@bazel_skylib//lib:dicts.bzl", "dicts", ) def _apple_intent_library_impl(ctx): """Implementation of the apple_intent_library.""" is_swift = ctx.attr.language == "Swift" if not is_swift and not ctx.attr.header_name: fail("A public header name is mandatory when generating Objective-C.") swift_output_src = None objc_output_srcs = None objc_output_hdrs = None objc_public_header = None if is_swift: swift_output_src = ctx.actions.declare_file("{}.swift".format(ctx.attr.name)) else: objc_output_srcs = ctx.actions.declare_directory("{}.srcs.m".format(ctx.attr.name)) objc_output_hdrs = ctx.actions.declare_directory("{}.hdrs.h".format(ctx.attr.name)) objc_public_header = ctx.actions.declare_file("{}.h".format(ctx.attr.header_name)) platform_prerequisites = platform_support.platform_prerequisites( apple_fragment = ctx.fragments.apple, config_vars = ctx.var, device_families = None, disabled_features = ctx.disabled_features, explicit_minimum_deployment_os = None, explicit_minimum_os = None, features = ctx.features, objc_fragment = None, platform_type_string = str(ctx.fragments.apple.single_arch_platform.platform_type), uses_swift = False, xcode_path_wrapper = ctx.executable._xcode_path_wrapper, xcode_version_config = ctx.attr._xcode_config[apple_common.XcodeVersionConfig], ) apple_toolchain_info = ctx.attr._toolchain[AppleSupportToolchainInfo] resource_actions.generate_intent_classes_sources( actions = ctx.actions, input_file = ctx.file.src, swift_output_src = swift_output_src, objc_output_srcs = objc_output_srcs, objc_output_hdrs = objc_output_hdrs, objc_public_header = objc_public_header, language = ctx.attr.language, class_prefix = ctx.attr.class_prefix, swift_version = ctx.attr.swift_version, class_visibility = ctx.attr.class_visibility, platform_prerequisites = platform_prerequisites, resolved_xctoolrunner = apple_toolchain_info.resolved_xctoolrunner, ) if is_swift: return [ DefaultInfo(files = depset([swift_output_src])), ] return [ DefaultInfo( files = depset([objc_output_srcs, objc_output_hdrs, objc_public_header]), ), OutputGroupInfo( srcs = depset([objc_output_srcs]), hdrs = depset([objc_output_hdrs, objc_public_header]), ), ] apple_intent_library = rule( implementation = _apple_intent_library_impl, attrs = dicts.add(apple_support.action_required_attrs(), { "src": attr.label( allow_single_file = [".intentdefinition"], mandatory = True, doc = """ Label to a single `.intentdefinition` files from which to generate sources files. """, ), "language": attr.string( mandatory = True, values = ["Objective-C", "Swift"], doc = "Language of generated classes (\"Objective-C\", \"Swift\")", ), "class_prefix": attr.string( doc = "Class prefix to use for the generated classes.", ), "swift_version": attr.string( doc = "Version of Swift to use for the generated classes.", ), "class_visibility": attr.string( values = ["public", "private", "project"], default = "", doc = "Visibility attribute for the generated classes (\"public\", \"private\", \"project\").", ), "header_name": attr.string( doc = "Name of the public header file (only when using Objective-C).", ), "_toolchain": attr.label( default = Label("@build_bazel_rules_apple//apple/internal:toolchain_support"), providers = [[AppleSupportToolchainInfo]], ), }), output_to_genfiles = True, fragments = ["apple"], doc = """ This rule supports the integration of Intents `.intentdefinition` files into Apple rules. It takes a single `.intentdefinition` file and creates a target that can be added as a dependency from `objc_library` or `swift_library` targets. It accepts the regular `objc_library` attributes too. This target generates a header named `<target_name>.h` that can be imported from within the package where this target resides. For example, if this target's label is `//my/package:intent`, you can import the header as `#import "my/package/intent.h"`. """, )
class errors(): # *********************************************************************** # # SpcErr.h = (c) Spectrum GmbH, 2006 # # *********************************************************************** # # error codes of the Spectrum drivers. Until may 2004 this file was # errors.h. Name has been changed because errors.h has been already in # use by windows. # # *********************************************************************** ERR_OK = 0x0000 # 0 No Error ERR_INIT = 0x0001 # 1 Initialisation error ERR_NR = 0x0002 # 2 Board number out of range ERR_TYP = 0x0003 # 3 Unknown board Typ ERR_FNCNOTSUPPORTED =0x0004 # 4 This function is not supported by the hardware ERR_BRDREMAP = 0x0005 # 5 The Board Index Remap table is wrong ERR_KERNELVERSION = 0x0006 # 6 The kernel version and the dll version are mismatching ERR_HWDRVVERSION = 0x0007 # 7 The driver version doesn't match the minimum requirements of the board ERR_ADRRANGE = 0x0008 # 8 The address range is disabled (fatal error) ERR_INVALIDHANDLE = 0x0009 # 9 Handle not valid ERR_BOARDNOTFOUND = 0x000A # 10 Card mit given name hasn't been found ERR_BOARDINUSE = 0x000B # 11 Card mit given name is already in use by another application ERR_LASTERR = 0x0010 # 16 Old Error waiting to be read ERR_ABORT = 0x0020 # 32 Abort of wait function ERR_BOARDLOCKED = 0x0030 # 48 Board acess already locked by another process. it's not possible to acess one board through multiple processes ERR_REG = 0x0100 #256 unknown Register for this Board ERR_VALUE = 0x0101 #257 Not a possible value in this state ERR_FEATURE = 0x0102 #258 Feature of the board not installed ERR_SEQUENCE = 0x0103 #259 Channel sequence not allowed ERR_READABORT = 0x0104 #260 Read not allowed after abort ERR_NOACCESS = 0x0105 #261 Access to this register denied ERR_POWERDOWN = 0x0106 #262 not allowed in Powerdown mode ERR_TIMEOUT = 0x0107 #263 timeout occured while waiting for interrupt ERR_CALLTYPE = 0x0108 #264 call type (int32 mux) is not allowed for this register ERR_EXCEEDSINT32 = 0x0109 #265 return value is int32 but software register exceeds the 32 bit integer range -> use 2x32 or 64 ERR_NOWRITEALLOWED = 0x010A #267 register cannot be written, read only ERR_SETUP = 0x010B #268 the setup isn't valid ERR_CHANNEL = 0x0110 #272 Wrong number of Channel to be read out ERR_NOTIFYSIZE = 0x0111 #273 Notify block size isn't valid ERR_RUNNING = 0x0120 #288 Board is running, changes not allowed ERR_ADJUST = 0x0130 #304 Auto Adjust has an error ERR_PRETRIGGERLEN = 0x0140 #320 pretrigger length exceeds allowed values ERR_DIRMISMATCH = 0x0141 #321 direction of card and memory transfer mismatch ERR_POSTEXCDSEGMENT= 0x0142 #322 posttrigger exceeds segment size in multiple recording mode ERR_SEGMENTINMEM = 0x0143 #323 memsize is not a multiple of segmentsize, last segment hasn't full length ERR_MULTIPLEPW = 0x0144 #324 multiple pulsewidth counters used but card only supports one at the time ERR_NOCHANNELPWOR = 0x0145 #325 channel pulsewidth can't be OR'd ERR_ANDORMASKOVRLAP= 0x0146 #326 AND mask and OR mask overlap in at least one channel -> not possible ERR_ANDMASKEDGE = 0x0147 #327 AND mask together with edge trigger mode is not allowed ERR_ORMASKLEVEL = 0x0148 #328 OR mask together with level trigger mode is not allowed ERR_EDGEPERMOD = 0x0149 #329 All trigger edges must be simular on one module ERR_DOLEVELMINDIFF = 0x014A #330 minimum difference between low output level and high output level not reached ERR_STARHUBENABLE = 0x014B #331 card holding the star-hub must be active for sync ERR_PATPWSMALLEDGE = 0x014C #332 Combination of pattern with pulsewidht smaller and edge is not allowed ERR_NOPCI = 0x0200 #512 No PCI bus found ERR_PCIVERSION = 0x0201 #513 Wrong PCI bus version ERR_PCINOBOARDS = 0x0202 #514 No Spectrum PCI boards found ERR_PCICHECKSUM = 0x0203 #515 Checksum error on PCI board ERR_DMALOCKED = 0x0204 #516 DMA buffer in use, try later ERR_MEMALLOC = 0x0205 #517 Memory Allocation error ERR_EEPROMLOAD = 0x0206 #518 EEProm load error, timeout occured ERR_CARDNOSUPPORT = 0x0207 #519 no support for that card in the library ERR_FIFOBUFOVERRUN = 0x0300 #768 Buffer overrun in FIFO mode ERR_FIFOHWOVERRUN = 0x0301 #769 Hardware buffer overrun in FIFO mode ERR_FIFOFINISHED = 0x0302 #770 FIFO transfer hs been finished. Number of buffers has been transferred ERR_FIFOSETUP = 0x0309 #777 FIFO setup not possible, transfer rate to high (max 250 MB/s) ERR_TIMESTAMP_SYNC = 0x0310 #784 Synchronisation to ref clock failed ERR_STARHUB = 0x0320 #800 Autorouting of Starhub failed ERR_INTERNAL_ERROR = 0xFFFF #65535 Internal hardware error detected, please check for update
def get_data_odor_num_val(): # get data odor = '' data = [] with open('mushrooms_data.txt') as f: lines = f.readlines() for line in lines: odor = line[10] if odor == 'a': # almond data.append(1) elif odor == 'l': # anise data.append(2) elif odor == 'c': # creosote data.append(3) elif odor == 'y': # fishy data.append(-1) elif odor == 'f': # foul data.append(-2) elif odor == 'm': # musty data.append(-3) elif odor == 'n': # none data.append(0) elif odor == 'p': # pungent data.append(4) elif odor == 's': # spicy data.append(5) data_size = len(data) learn_size = round(data_size*0.8) learn_data = data[0:learn_size] test_data = data[learn_size:] print(test_data)
# This problem can be solved analytically, but we can just as well use # a for loop. For a given shell of side n, the value at the top right # vertex is given by the area, n^2. Moving anticlockwise, the values at # the other vertex is always (n - 1) less than the previous vertex. n_max = 1001 ans = 1 + sum(4*n**2 - 6*(n - 1) for n in range(3, n_max + 1, 2)) print(ans) # Copyright Junipyr. All rights reserved. # https://github.com/Junipyr
#Create a converter that changes binary numbers to decimals and vice versa def b_to_d(number): var = str(number)[::-1] counter = 0 decimal = 0 while counter < len(var): if int(var[counter]) == 1: decimal += 2**counter counter += 1 return decimal def d_to_b(number): binary = '' while number > 0: binary += str(number % 2) number = number / 2 return binary[::-1] print("Enter 0 for binary to decimal conversion") print("Enter 1 for decimal to binary conversion") choice = input("Enter the conversion type: ") if choice == 0: number = input("Enter the number: ") print("The decimal of %s is %s" % (number, b_to_d(number))) elif choice == 1: number = input("Enter the number: ") print ("The binary of %s is %s" % (number, d_to_b(number))) else: print("Invalid choice")
#file operations with open('test.txt', 'r') as f: #print('file contents using f.read()', f.read()) #print('file contencts using f.readlines()', f.readlines()) #print('file read 1 line using f.readline', f.readline()) print('read line by line, so that there is no memeory issue') for line in f: print(line, end = '') print() with open('test.txt', 'r') as f: print('printing using specific size') size_to_read = 10 f_contents = f.read(size_to_read) while len(f_contents) > 0: print(f_contents, end = '*') f_contents = f.read(size_to_read) print('WRITING to a file') with open('test1.txt', 'w') as f: f.write('test file')
class Solution(object): def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ candidates.sort() return self.adding(candidates, 0, target, []) def adding(self, candidates, startIndex, target, output): if target == 0: return [output] result = [] for i in range(startIndex, len(candidates)): num = candidates[i] if num > target: break if i == startIndex or candidates[i-1] != num: result += self.adding(candidates, i + 1, target - num, output + [num]) return result class Solution2(object): def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ return self.helper(sorted(candidates), target) def helper(self, candidates, target): if target == 0: return [[]] if not candidates: return [] result = [] prev = float('-inf') for i in range(len(candidates)): candidate = candidates[i] if candidate > target: break if prev != candidate: rhs = self.combinationSum2(candidates[i+1:], target-candidate) for element in rhs: result.append([candidate]+element) prev = candidate return result
""" This program asks the user for 1) the name of a text file 2) a line number and prints the text from that line of the file. """ def main(): try: # Get a filename from the user. filename = input("Enter the name of text file: ") # Read the text file specified by the user into a list. text_lines = read_list(filename) # Get a line number from the user. linenum = int(input("Enter a line number: ")) # Get the line that the user requested from the list. line = text_lines[linenum - 1] # Print the line that the user requested. print() print(line) except FileNotFoundError as not_found_err: # This code will be executed if the user enters # the name of a file that doesn't exist. print() print(type(not_found_err).__name__, not_found_err, sep=": ") print(f"The file {filename} doesn't exist.") print("Run the program again and enter the" \ " name of an existing file.") except PermissionError as perm_err: # This code will be executed if the user enters the name # of a file and doesn't have permission to read that file. print() print(type(perm_err).__name__, perm_err, sep=": ") print(f"You don't have permission to read {filename}.") print("Run the program again and enter the name" \ " of a file that you are allowed to read.") except ValueError as val_err: # This code will be executed if the user enters # an invalid integer for the line number. print() print(type(val_err).__name__, val_err, sep=": ") print("You entered an invalid integer for the line number.") print("Run the program again and enter an integer for" \ " the line number.") except IndexError as index_err: # This code will be executed if the user enters a valid integer # for the line number, but the integer is negative or the # integer is greater than the number of lines in the file. print() print(type(index_err).__name__, index_err, sep=": ") length = len(text_lines) if linenum < 0: print(f"{linenum} is a negative integer.") else: print(f"{linenum} is greater than the number" \ f" of lines in {filename}.") print(f"There are only {length} lines in {filename}.") print(f"Run the program again and enter a line number" \ f" between 1 and {length}.") except Exception as excep: # This code will be executed if some # other type of exception occurs. print() print(type(excep).__name__, excep, sep=": ") def read_list(filename): """Read the contents of a text file into a list and return the list that contains the lines of text. Parameter filename: the name of the text file to read Return: a list of strings """ # Create an empty list named text_lines. text_lines = [] # Open the text file for reading and store a reference # to the opened file in a variable named text_file. with open(filename, "rt") as text_file: # Read the contents of the text # file one line at a time. for line in text_file: # Remove white space, if there is any, # from the beginning and end of the line. clean_line = line.strip() # Append the clean line of text # onto the end of the list. text_lines.append(clean_line) # Return the list that contains the lines of text. return text_lines # If this file was executed like this: # > python teach_solution.py # then call the main function. However, if this file # was simply imported, then skip the call to main. if __name__ == "__main__": main()
_base_ = [ '../../../_base_/datasets/fine_tune_based/few_shot_voc.py', '../../../_base_/schedules/schedule.py', '../../tfa_r101_fpn.py', '../../../_base_/default_runtime.py' ] # classes splits are predefined in FewShotVOCDataset # FewShotVOCDefaultDataset predefine ann_cfg for model reproducibility. data = dict( train=dict( type='FewShotVOCDefaultDataset', ann_cfg=[dict(method='TFA', setting='SPLIT2_10SHOT')], num_novel_shots=10, num_base_shots=10, classes='ALL_CLASSES_SPLIT2'), val=dict(classes='ALL_CLASSES_SPLIT2'), test=dict(classes='ALL_CLASSES_SPLIT2')) evaluation = dict( interval=40000, class_splits=['BASE_CLASSES_SPLIT2', 'NOVEL_CLASSES_SPLIT2']) checkpoint_config = dict(interval=40000) optimizer = dict(lr=0.005) lr_config = dict( warmup_iters=10, step=[ 36000, ]) runner = dict(max_iters=40000) # base model needs to be initialized with following script: # tools/detection/misc/initialize_bbox_head.py # please refer to configs/detection/tfa/README.md for more details. load_from = ('work_dirs/tfa_r101_fpn_voc-split2_base-training/' 'base_model_random_init_bbox_head.pth')
class LibraryException(Exception): pass class BookException(Exception): pass
a,b=map(int,input().split()) if b==0 and a>0: print("Gold") elif a==0 and b>0: print("Silver") elif a>0 and b>0: print("Alloy")
n = int(input()) h = int(input()) w = int(input()) print((n-h+1) * (n-w+1))
class custom_range: def __init__(self, start: int, end: int) -> None: self.start = start self.end = end def __iter__(self) -> iter: return self def __next__(self) -> int: if self.start <= self.end: i = self.start self.start += 1 return i raise StopIteration() if __name__ == '__main__': one_to_ten = custom_range(1, 10) for num in one_to_ten: print(num)
ADD_USER_CONTEXT = { "CyberArkPAS.Users(val.id == obj.id)": { "authenticationMethod": [ "AuthTypePass" ], "businessAddress": { "workCity": "", "workCountry": "", "workState": "", "workStreet": "", "workZip": "" }, "changePassOnNextLogon": True, "componentUser": False, "description": "new user for test", "distinguishedName": "", "enableUser": True, "expiryDate": -62135578800, "groupsMembership": [], "id": 123, "internet": { "businessEmail": "usertest@test.com", "homeEmail": "", "homePage": "", "otherEmail": "" }, "lastSuccessfulLoginDate": 1594756313, "location": "\\", "passwordNeverExpires": False, "personalDetails": { "city": "", "country": "", "department": "", "firstName": "user", "lastName": "test", "middleName": "", "organization": "", "profession": "testing integrations", "state": "", "street": "", "title": "", "zip": "" }, "phones": { "businessNumber": "", "cellularNumber": "", "faxNumber": "", "homeNumber": "", "pagerNumber": "" }, "source": "CyberArkPAS", "suspended": False, "unAuthorizedInterfaces": [], "userType": "EPVUser", "username": "TestUser", "vaultAuthorization": [] } } UPDATE_USER_CONTEXT = { "CyberArkPAS.Users(val.id == obj.id)": { "authenticationMethod": [ "AuthTypePass" ], "businessAddress": { "workCity": "", "workCountry": "", "workState": "", "workStreet": "", "workZip": "" }, "changePassOnNextLogon": True, "componentUser": False, "description": "updated description", "distinguishedName": "", "enableUser": True, "expiryDate": -62135578800, "groupsMembership": [], "id": 123, "internet": { "businessEmail": "update@test.com", "homeEmail": "", "homePage": "", "otherEmail": "" }, "lastSuccessfulLoginDate": 1594756313, "location": "\\", "passwordNeverExpires": False, "personalDetails": { "city": "", "country": "", "department": "", "firstName": "test1", "lastName": "updated-name", "middleName": "", "organization": "", "profession": "test1", "state": "", "street": "", "title": "", "zip": "" }, "phones": { "businessNumber": "", "cellularNumber": "", "faxNumber": "", "homeNumber": "", "pagerNumber": "" }, "source": "CyberArkPAS", "suspended": False, "unAuthorizedInterfaces": [], "userType": "EPVUser", "username": "TestUser1", "vaultAuthorization": [] } } GET_USERS_CONTEXT = { "CyberArkPAS.Users(val.id == obj.id)": [ { "componentUser": False, "id": 2, "location": "\\", "personalDetails": { "firstName": "", "lastName": "", "middleName": "" }, "source": "CyberArkPAS", "userType": "Built-InAdmins", "username": "Administrator", "vaultAuthorization": [ "AddUpdateUsers", "AddSafes", "AddNetworkAreas", "ManageDirectoryMapping", "ManageServerFileCategories", "AuditUsers", "BackupAllSafes", "RestoreAllSafes", "ResetUsersPasswords", "ActivateUsers" ] }, { "componentUser": False, "id": 3, "location": "\\", "personalDetails": { "firstName": "", "lastName": "", "middleName": "" }, "source": "CyberArkPAS", "userType": "Built-InAdmins", "username": "Auditor", "vaultAuthorization": [ "AuditUsers" ] } ] } ADD_SAFE_CONTEXT = { "CyberArkPAS.Safes(val.SafeName == obj.SafeName)": { "AutoPurgeEnabled": False, "Description": "safe for tests", "Location": "\\", "ManagingCPM": "", "NumberOfDaysRetention": 100, "NumberOfVersionsRetention": None, "OLACEnabled": True, "SafeName": "TestSafe" } } UPDATE_SAFE_CONTEXT = { "CyberArkPAS.Safes(val.SafeName == obj.SafeName)": { "AutoPurgeEnabled": False, "Description": "UpdatedSafe", "Location": "\\", "ManagingCPM": "", "NumberOfDaysRetention": 150, "NumberOfVersionsRetention": None, "OLACEnabled": True, "SafeName": "UpdatedName" } } GET_SAFE_BY_NAME_CONTEXT = { "CyberArkPAS.Safes(val.SafeName == obj.SafeName)": { "AutoPurgeEnabled": False, "Description": "safe for tests", "Location": "\\", "ManagingCPM": "", "NumberOfDaysRetention": 100, "NumberOfVersionsRetention": None, "OLACEnabled": True, "SafeName": "TestSafe" } } GET_LIST_SAFES_CONTEXT = { "CyberArkPAS.Safes(val.SafeName == obj.SafeName)": [ { "Description": "", "Location": "\\", "SafeName": "VaultInternal", "SafeUrlId": "VaultInternal" }, { "Description": "", "Location": "\\", "SafeName": "Notification Engine", "SafeUrlId": "Notification%20Engine" }]} ADD_SAFE_MEMBER_CONTEXT = { "CyberArkPAS.Safes.Members": { "MemberName": "TestUser", "MembershipExpirationDate": "", "Permissions": [ { "Key": "UseAccounts", "Value": False }, { "Key": "RetrieveAccounts", "Value": False }, { "Key": "ListAccounts", "Value": False }, { "Key": "AddAccounts", "Value": False }, { "Key": "UpdateAccountContent", "Value": False }, { "Key": "UpdateAccountProperties", "Value": False }, { "Key": "InitiateCPMAccountManagementOperations", "Value": False }, { "Key": "SpecifyNextAccountContent", "Value": False }, { "Key": "RenameAccounts", "Value": False }, { "Key": "DeleteAccounts", "Value": False }, { "Key": "UnlockAccounts", "Value": False }, { "Key": "ManageSafe", "Value": False }, { "Key": "ManageSafeMembers", "Value": False }, { "Key": "BackupSafe", "Value": False }, { "Key": "ViewAuditLog", "Value": False }, { "Key": "ViewSafeMembers", "Value": False }, { "Key": "AccessWithoutConfirmation", "Value": False }, { "Key": "CreateFolders", "Value": False }, { "Key": "DeleteFolders", "Value": False }, { "Key": "MoveAccountsAndFolders", "Value": False }, { "Key": "RequestsAuthorizationLevel", "Value": 0 } ], "SearchIn": "vault" } } UPDATE_SAFE_MEMBER_CONTEXT = { "CyberArkPAS.Safes.Members(val.TestUser == obj.TestUser)": { "MemberName": "TestUser", "MembershipExpirationDate": "", "Permissions": [ { "Key": "UseAccounts", "Value": True }, { "Key": "RetrieveAccounts", "Value": False }, { "Key": "ListAccounts", "Value": False }, { "Key": "AddAccounts", "Value": False }, { "Key": "UpdateAccountContent", "Value": False }, { "Key": "UpdateAccountProperties", "Value": False }, { "Key": "InitiateCPMAccountManagementOperations", "Value": False }, { "Key": "SpecifyNextAccountContent", "Value": False }, { "Key": "RenameAccounts", "Value": False }, { "Key": "DeleteAccounts", "Value": False }, { "Key": "UnlockAccounts", "Value": False }, { "Key": "ManageSafe", "Value": False }, { "Key": "ManageSafeMembers", "Value": False }, { "Key": "BackupSafe", "Value": False }, { "Key": "ViewAuditLog", "Value": False }, { "Key": "ViewSafeMembers", "Value": False }, { "Key": "AccessWithoutConfirmation", "Value": False }, { "Key": "CreateFolders", "Value": False }, { "Key": "DeleteFolders", "Value": False }, { "Key": "MoveAccountsAndFolders", "Value": False }, { "Key": "RequestsAuthorizationLevel", "Value": 0 } ], "SearchIn": "vault" } } LIST_SAFE_MEMBER_CONTEXT = { "CyberArkPAS.Safes.Members(val.MemberName == obj.MemberName)": [ { "IsExpiredMembershipEnable": False, "IsPredefinedUser": True, "MemberName": "Administrator", "MemberType": "User", "MembershipExpirationDate": None, "Permissions": { "AccessWithoutConfirmation": True, "AddAccounts": True, "BackupSafe": True, "CreateFolders": True, "DeleteAccounts": True, "DeleteFolders": True, "InitiateCPMAccountManagementOperations": True, "ListAccounts": True, "ManageSafe": True, "ManageSafeMembers": True, "MoveAccountsAndFolders": True, "RenameAccounts": True, "RequestsAuthorizationLevel1": True, "RequestsAuthorizationLevel2": False, "RetrieveAccounts": True, "SpecifyNextAccountContent": True, "UnlockAccounts": True, "UpdateAccountContent": True, "UpdateAccountProperties": True, "UseAccounts": True, "ViewAuditLog": True, "ViewSafeMembers": True } }, { "IsExpiredMembershipEnable": False, "IsPredefinedUser": True, "MemberName": "Master", "MemberType": "User", "MembershipExpirationDate": None, "Permissions": { "AccessWithoutConfirmation": True, "AddAccounts": True, "BackupSafe": True, "CreateFolders": True, "DeleteAccounts": True, "DeleteFolders": True, "InitiateCPMAccountManagementOperations": True, "ListAccounts": True, "ManageSafe": True, "ManageSafeMembers": True, "MoveAccountsAndFolders": True, "RenameAccounts": True, "RequestsAuthorizationLevel1": False, "RequestsAuthorizationLevel2": False, "RetrieveAccounts": True, "SpecifyNextAccountContent": True, "UnlockAccounts": True, "UpdateAccountContent": True, "UpdateAccountProperties": True, "UseAccounts": True, "ViewAuditLog": True, "ViewSafeMembers": True } }] } ADD_ACCOUNT_CONTEXT = { "CyberArkPAS.Accounts(val.id == obj.id)": { "address": "/", "categoryModificationTime": 1594835018, "createdTime": 1594838456, "id": "77_4", "name": "TestAccount1", "platformId": "WinServerLocal", "safeName": "TestSafe", "secretManagement": { "automaticManagementEnabled": True, "lastModifiedTime": 1594824056 }, "secretType": "password", "userName": "TestUser" } } UPDATE_ACCOUNT_CONTEXT = { "CyberArkPAS.Accounts(val.id == obj.id)": { "address": "/", "categoryModificationTime": 1594835018, "createdTime": 1594838456, "id": "77_4", "name": "NewName", "platformId": "WinServerLocal", "safeName": "TestSafe", "secretManagement": { "automaticManagementEnabled": True, "lastModifiedTime": 1594824056 }, "secretType": "password", "userName": "TestUser" } } GET_ACCOUNT_CONTEXT = { 'CyberArkPAS.Accounts(val.id == obj.id)': {'categoryModificationTime': 1597581174, 'id': '11_1', 'name': 'Operating System-UnixSSH', 'address': 'address', 'userName': 'firecall2', 'platformId': 'UnixSSH', 'safeName': 'Linux Accounts', 'secretType': 'password', 'platformAccountProperties': {'UseSudoOnReconcile': 'No', 'Tags': 'SSH'}, 'secretManagement': {'automaticManagementEnabled': True, 'status': 'success', 'lastModifiedTime': 1595417469, 'lastReconciledTime': 1576120341}, 'createdTime': 1595431869}} GET_LIST_ACCOUNT_CONTEXT = { "CyberArkPAS.Accounts(val.id == obj.id)": [ { "address": "string", "categoryModificationTime": 1594569595, "createdTime": 1594573679, "id": "2_6", "name": "account1", "platformAccountProperties": {}, "platformId": "Oracle", "safeName": "VaultInternal", "secretManagement": { "automaticManagementEnabled": True, "lastModifiedTime": 1594559279 }, "secretType": "password", "userName": "string" }, { "address": "10.0.0.5", "categoryModificationTime": 1583345933, "createdTime": 1573127750, "id": "2_3", "name": "cybr.com.pass", "platformAccountProperties": {}, "platformId": "WinDomain", "safeName": "VaultInternal", "secretManagement": { "automaticManagementEnabled": False, "lastModifiedTime": 1573109750, "manualManagementReason": "NoReason" }, "secretType": "password", "userName": "vaultbind@cybr.com" } ] } GET_LIST_ACCOUNT_ACTIVITIES_CONTEXT = { "CyberArkPAS.Activities": [ { "Action": "Rename File", "ActionID": 124, "Alert": False, "ClientID": "PVWA", "Date": 1594838533, "MoreInfo": "NewName", "Reason": "", "User": "Administrator" }, { "Action": "Store password", "ActionID": 294, "Alert": False, "ClientID": "PVWA", "Date": 1594838456, "Date": 1594838456, "MoreInfo": "", "Reason": "", "User": "Administrator" }]} INCIDENTS = [ {'name': 'CyberArk PAS Incident: 5f0b3064e4b0ba4baf5c1113.', 'occurred': '2020-07-12T15:46:44.000Z', 'severity': 1, 'rawJSON': '{"id": "5f0b3064e4b0ba4baf5c1113", "type": "VaultViaIrregularIp", "score": 29.414062500000004,' ' "createTime": 1594568804000, "lastUpdateTime": 1594568804000, "audits":' ' [{"id": "5f0b3064e4b0ba4baf5c1111", "type": "VAULT_LOGON", "sensorType": "VAULT",' ' "action": "Logon", "createTime": 1594568804000, "vaultUser": "Administrator",' ' "source": {"mOriginalAddress": "17.111.13.67", "mResolvedAddress":' ' {"mOriginalAddress": "17.111.13.67", "mAddress": "17.111.13.67", "mHostName": "17.111.13.67",' ' "mFqdn": "17.111.13.67.bb.netvision.net.il"}}, "cloudData": {}}], "additionalData":' ' {"station": "17.111.13.67", "reason": "ip", "vault_user": "administrator"}, "mStatus": "OPEN"}'}, {'name': 'CyberArk PAS Incident: 5f0b4320e4b0ba4baf5c2b05.', 'occurred': '2020-07-12T17:06:40.000Z', 'severity': 1, 'rawJSON': '{"id": "5f0b4320e4b0ba4baf5c2b05", "type": "VaultViaIrregularIp", "score": 29.414062500000004,' ' "createTime": 1594573600000, "lastUpdateTime": 1594573600000, "audits":' ' [{"id": "5f0b4320e4b0ba4baf5c2b03", "type": "VAULT_LOGON", "sensorType": "VAULT", "action": "Logon",' ' "createTime": 1594573600000, "vaultUser": "Administrator", "source": {"mOriginalAddress":' ' "17.111.13.67", "mResolvedAddress": {"mOriginalAddress": "17.111.13.67", "mAddress": "17.111.13.67",' ' "mHostName": "17.111.13.67", "mFqdn": "17.111.13.67.bb.netvision.net.il"}}, "cloudData": {}}],' ' "additionalData": {"station": "17.111.13.67", "reason": "ip", "vault_user": "administrator"},' ' "mStatus": "OPEN"}'}] INCIDENTS_AFTER_FETCH = [{'name': 'CyberArk PAS Incident: 5f0b4e53e4b0ba4baf5c43ed.', 'occurred': '2020-07-12T17:54:27.000Z', 'severity': 1, 'rawJSON': '{"id": "5f0b4e53e4b0ba4baf5c43ed", "type": "VaultViaIrregularIp", "score": 29.414062500000004, "createTime": 1594576467000, "lastUpdateTime": 1594576467000, "audits": [{"id": "5f0b4e53e4b0ba4baf5c43eb", "type": "VAULT_LOGON", "sensorType": "VAULT", "action": "Logon", "createTime": 1594576467000, "vaultUser": "Administrator", "source": {"mOriginalAddress": "17.111.13.67", "mResolvedAddress": {"mOriginalAddress": "17.111.13.67", "mAddress": "17.111.13.67", "mHostName": "17.111.13.67", "mFqdn": "17.111.13.67.bb.netvision.net.il"}}, "cloudData": {}}], "additionalData": {"station": "17.111.13.67", "reason": "ip", "vault_user": "administrator"}, "mStatus": "OPEN"}'}] INCIDENTS_LIMITED_BY_MAX_SIZE =[{'name': 'CyberArk PAS Incident: 5f13f770e4b0ba4baf5ee890.', 'occurred': '2020-07-19T07:34:08.000Z', 'rawJSON': '{"id": "5f13f770e4b0ba4baf5ee890", "type": ' '"VaultViaIrregularIp", "score": 27.656250000000004, ' '"createTime": 1595144048000, "lastUpdateTime": 1595144048000, ' '"audits": [{"id": "5f13f770e4b0ba4baf5ee88e", "type": ' '"VAULT_LOGON", "sensorType": "VAULT", "action": "Logon", ' '"createTime": 1595144048000, "vaultUser": "Administrator", ' '"source": {"mOriginalAddress": "17.111.13.67"}, "cloudData": ' '{}}], "additionalData": {"station": "17.111.13.67", "reason": ' '"ip", "vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 1}, {'name': 'CyberArk PAS Incident: 5f13f7ade4b0ba4baf5ee9b0.', 'occurred': '2020-07-19T07:35:09.000Z', 'rawJSON': '{"id": "5f13f7ade4b0ba4baf5ee9b0", "type": ' '"VaultViaIrregularIp", "score": 98.65625, "createTime": ' '1595144109000, "lastUpdateTime": 1595144109000, "audits": ' '[{"id": "5f13f7ade4b0ba4baf5ee9ad", "type": "VAULT_LOGON", ' '"sensorType": "VAULT", "action": "Logon", "createTime": ' '1595144109000, "vaultUser": "Administrator", "source": ' '{"mOriginalAddress": "17.111.13.67"}, "cloudData": {}}], ' '"additionalData": {"station": "17.111.13.67", "reason": "ip", ' '"vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 3}, {'name': 'CyberArk PAS Incident: 5f13f7e8e4b0ba4baf5eead5.', 'occurred': '2020-07-19T07:36:08.000Z', 'rawJSON': '{"id": "5f13f7e8e4b0ba4baf5eead5", "type": ' '"VaultViaIrregularIp", "score": 27.656250000000004, ' '"createTime": 1595144168000, "lastUpdateTime": 1595144168000, ' '"audits": [{"id": "5f13f7e8e4b0ba4baf5eead3", "type": ' '"VAULT_LOGON", "sensorType": "VAULT", "action": "Logon", ' '"createTime": 1595144168000, "vaultUser": "Administrator", ' '"source": {"mOriginalAddress": "17.111.13.67"}, "cloudData": ' '{}}], "additionalData": {"station": "17.111.13.67", "reason": ' '"ip", "vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 1}, {'name': 'CyberArk PAS Incident: 5f13f824e4b0ba4baf5eebf8.', 'occurred': '2020-07-19T07:37:08.000Z', 'rawJSON': '{"id": "5f13f824e4b0ba4baf5eebf8", "type": ' '"VaultViaIrregularIp", "score": 27.656250000000004, ' '"createTime": 1595144228000, "lastUpdateTime": 1595144228000, ' '"audits": [{"id": "5f13f824e4b0ba4baf5eebf6", "type": ' '"VAULT_LOGON", "sensorType": "VAULT", "action": "Logon", ' '"createTime": 1595144228000, "vaultUser": "Administrator", ' '"source": {"mOriginalAddress": "17.111.13.67"}, "cloudData": ' '{}}], "additionalData": {"station": "17.111.13.67", "reason": ' '"ip", "vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 1}, {'name': 'CyberArk PAS Incident: 5f13f861e4b0ba4baf5eed1c.', 'occurred': '2020-07-19T07:38:09.000Z', 'rawJSON': '{"id": "5f13f861e4b0ba4baf5eed1c", "type": ' '"VaultViaIrregularIp", "score": 27.656250000000004, ' '"createTime": 1595144289000, "lastUpdateTime": 1595144289000, ' '"audits": [{"id": "5f13f861e4b0ba4baf5eed1a", "type": ' '"VAULT_LOGON", "sensorType": "VAULT", "action": "Logon", ' '"createTime": 1595144289000, "vaultUser": "Administrator", ' '"source": {"mOriginalAddress": "17.111.13.67"}, "cloudData": ' '{}}], "additionalData": {"station": "17.111.13.67", "reason": ' '"ip", "vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 1}] INCIDENTS_FILTERED_BY_SCORE = [{'name': 'CyberArk PAS Incident: 5f13f7ade4b0ba4baf5ee9b0.', 'occurred': '2020-07-19T07:35:09.000Z', 'rawJSON': '{"id": "5f13f7ade4b0ba4baf5ee9b0", "type": ' '"VaultViaIrregularIp", "score": 98.65625, "createTime": ' '1595144109000, "lastUpdateTime": 1595144109000, "audits": ' '[{"id": "5f13f7ade4b0ba4baf5ee9ad", "type": "VAULT_LOGON", ' '"sensorType": "VAULT", "action": "Logon", "createTime": ' '1595144109000, "vaultUser": "Administrator", "source": ' '{"mOriginalAddress": "17.111.13.67"}, "cloudData": {}}], ' '"additionalData": {"station": "17.111.13.67", "reason": "ip", ' '"vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 3}, {'name': 'CyberArk PAS Incident: 5f13f89fe4b0ba4baf5eee4b.', 'occurred': '2020-07-19T07:39:11.000Z', 'rawJSON': '{"id": "5f13f89fe4b0ba4baf5eee4b", "type": ' '"VaultViaIrregularIp", "score": 50.65625000000001, "createTime": ' '1595144351000, "lastUpdateTime": 1595144351000, "audits": ' '[{"id": "5f13f89fe4b0ba4baf5eee49", "type": "VAULT_LOGON", ' '"sensorType": "VAULT", "action": "Logon", "createTime": ' '1595144351000, "vaultUser": "Administrator", "source": ' '{"mOriginalAddress": "17.111.13.67"}, "cloudData": {}}], ' '"additionalData": {"station": "17.111.13.67", "reason": "ip", ' '"vault_user": "administrator"}, "mStatus": "OPEN"}', 'severity': 2}, {'name': 'CyberArk PAS Incident: 5ebd5480e4b07501bd67d51c.', 'occurred': '2020-07-21T12:16:02.000Z', 'rawJSON': '{"id": "5ebd5480e4b07501bd67d51c", "type": ' '"InteractiveLogonWithServiceAccount", "score": 60.0, ' '"createTime": 1589466020171, "lastUpdateTime": 1595333762775, ' '"audits": [{"id": "5ebd5479e4b07501bd67d176", "type": ' '"WINDOWS_LOGON", "sensorType": "SIEM", "action": "Logon", ' '"createTime": 1589466020171, "account": {"accountAsStr": ' '"administrator@cybr.com", "type": "DOMAIN", "account": ' '{"mDomain": "cybr.com", "spnList": [], "mUser": ' '"administrator"}}, "source": {"mOriginalAddress": "10.0.0.5", ' '"mResolvedAddress": {"mOriginalAddress": "dc01.cybr.com", ' '"mAddress": "10.0.0.5", "mHostName": "dc01", "mFqdn": ' '"dc01.cybr.com"}}, "target": {"mOriginalAddress": ' '"dc01.cybr.com", "mResolvedAddress": {"mOriginalAddress": ' '"dc01.cybr.com", "mAddress": "10.0.0.5", "mHostName": "dc01", ' '"mFqdn": "dc01.cybr.com"}}, "cloudData": {}, "accountId": ' '"27_3"}], "additionalData": {"aggregation_count": 12}, ' '"mStatus": "OPEN"}', 'severity': 2}]
# Common training-related configs that are designed for "tools/lazyconfig_train_net.py" # You can use your own instead, together with your own train_net.py train = dict( output_dir="./output", init_checkpoint="detectron2://ImageNetPretrained/MSRA/R-50.pkl", max_iter=90000, amp=dict(enabled=False), # options for Automatic Mixed Precision ddp=dict( # options for DistributedDataParallel broadcast_buffers=False, find_unused_parameters=False, fp16_compression=False, ), checkpointer=dict(period=5000, max_to_keep=100), # options for PeriodicCheckpointer eval_period=5000, log_period=20, device="cuda" # ... )
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------------------------------------ class ObjectDict(dict): """ A dict subclass which allows access by named attribute. """ __slots__ = () def __getattr__(self, attr): if attr in self: return self[attr] msg = "'%s' object has no attribute '%s'" raise AttributeError(msg % (type(self).__name__, attr))
""" Base class for a projectile """ class CageProjectile(object): """ Simple projectile base class """ def __init__(self, world, projectileid): self.world = world self.projectileid = projectileid def next(self): """ Progress the game state to the next tick. """ pass def save(self): """ Override to save details of current projectile with total knowledge """ raise NotImplementedError('Override to save projectile') def load(self, jsonobj): """ Override to load details of current projectile """ raise NotImplementedError('Override to load projectile') def render(self, im): """ Render the display to an image for the provided game mp4 output """ raise NotImplementedError('Override to draw projectile')
s1 = "fairy tales" s2 = "rail safety" s1 = s1.replace(" ", "").lower() s2 = s2.replace(" ", "").lower() # Requires n log n time (since any comparison # based sorting algorithm requires at least # nlogn time to sort). print(sorted(s1) == sorted(s2)) # The Preferred Solution # This solution is of linear time complexity which is an improvement on O(nlogn) # O(nlogn). def is_anagram(s1, s2): ht = dict() # normalizing the strings s1 = s1.replace(" ", "").lower() s2 = s2.replace(" ", "").lower() print(s1, ' ', s2) if len(s1) != len(s2): return False for i in s1: if i in ht: ht[i] += 1 else: ht[i] = 1 for i in s2: if i in ht: ht[i] -= 1 else: ht[i] = 1 for i in ht: if ht[i] != 0: return False return True s1 = "fairy tales" s2 = "rail safety" print(is_anagram(s1, s2))
model = Model() i1 = Input("input", "TENSOR_QUANT8_ASYMM", "{4, 3, 2}, 0.8, 5") axis = Parameter("axis", "TENSOR_INT32", "{4}", [1, 0, -3, -3]) keepDims = False output = Output("output", "TENSOR_QUANT8_ASYMM", "{2}, 0.8, 5") model = model.Operation("REDUCE_MAX", i1, axis, keepDims).To(output) # Example 1. Input in operand 0, input0 = {i1: # input 0 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]} output0 = {output: # output 0 [23, 24]} # Instantiate an example Example((input0, output0))
def build_dataset(train_text): words = list() with open(train_text, 'r') as f: lines = f.readlines() for line in lines: # line -> line.split('\t')[1] sentence = line.split('\t')[1] if sentence: words.append(sentence) with open('./total_naver.txt','w') as f: for lines in words: f.write(lines+'\n') if __name__ == '__main__': build_dataset('๋„ค์ด๋ฒ„_ํฌ๋กค๋ง.txt')
#Your secret information. Make sure you don't tell anyone secret_key = '' public_key = '' url='https://api.paystack.co/transaction'
print("ๆˆ‘่ƒฝไธญ100ไธ‡") print("ๆˆ‘่ƒฝไธญ100ไธ‡") print("ๆˆ‘่ƒฝไธญ100ไธ‡") print("ๆˆ‘่ƒฝไธญ100ไธ‡") print("ๆˆ‘่ƒฝไธญ100ไธ‡") print("ๆˆ‘่ƒฝไธญ100ไธ‡") print('ๅฏไปฅ๏ผŒๅ“ˆๅ“ˆๅ“ˆๅ“ˆ')
class Solution: def find132pattern(self, nums: List[int]) -> bool: if len(nums) < 3: return False second_num = -math.inf stck = [] # Try to find nums[i] < second_num < stck[-1] for i in range(len(nums) - 1, -1, -1): if nums[i] < second_num: return True # always ensure stack can be popped in increasing order while stck and stck[-1] < nums[i]: # this will ensure second_num < stck[-1] for next iteration second_num = stck[-1] stck.pop() stck.append(nums[i]) return False
class Logger: # Logger channel. channel: str def __init__(self, channel: str): self.channel = channel def log(self, message): print(f'\033[92m[{self.channel}] {message}\033[0m') def info(self, message): print(f'\033[94m[{self.channel}] {message}\033[0m') def warning(self, message): print(f'\033[93m[{self.channel}] {message}\033[0m') def error(self, message): print(f'\033[91m[{self.channel}] {message}\033[0m')
#!/usr/bin/env python3 # ็”จๆ•ฐๅญ—1 2 2 3 4 5 ่ฟ™ๅ…ญไธชๆ•ฐๅญ—๏ผŒๅ†™ไธ€ไธชmainๅ‡ฝๆ•ฐ๏ผŒๆ‰“ๅฐๅ‡บๆ‰€ๆœ‰ไธๅŒ็š„ๆŽ’ๅˆ—๏ผŒ ไพ‹ๅฆ‚512234, 412345. # ่ฆๆฑ‚4ไธ่ƒฝๅœจ็ฌฌไธ‰ไฝ๏ผŒไธ”3่ทŸ5ไธ่ƒฝ็›ธ้‚ป # num_lis = [1, 2, 2, 3, 4, 5] # res_set = [] # for i1 in num_lis: # for i2 in [i for i in num_lis if i != i1]: # for i3 in [i for i in num_lis if i not in [i1, i2]]: # for i4 in [i for i in num_lis if i not in [i1, i2, i3]]: # for i5 in [ i for i in num_lis if i not in [i1, i2, i3, i4]]: # res = str(i1) + str(i2) + str(i3) + str(i4) + str(i5) + str(i6) # res_set.append(res) # no_rpt = (list(set(res_set))) # print(no_rpt) class NS: def __init__(self, arr): self.numbers = arr self.visited = [0] * len(self.numbers) self.graph = [([0] * len(self.numbers)) for i in range(len(self.numbers))] self.n = 6 self.combination = "" self.s = set() def dfs(self, start): self.visited[start] = True self.combination += str(self.numbers[start]) if len(self.combination) == self.n: if self.combination[2] != '4': self.s.add(self.combination) j = 0 while j < self.n: if self.graph[start][j] == 1 and self.visited[j] == False: self.dfs(j) j += 1 self.combination = self.combination[:-1] self.visited[start] = False def get_all_com(self): i = 0 while i < self.n: j = 0 while j < self.n: if i == j: self.graph[i][j] = 0 else: self.graph[i][j] = 1 j += 1 i += 1 self.graph[3][5] = 0 self.graph[5][3] = 0 print(self.graph) # ๅผ€ๅง‹้ๅކ i = 0 while i < self.n: self.dfs(i) i += 1 if __name__ == '__main__': arr = [1, 2, 2, 3, 4, 5] t = NS(arr) t.get_all_com() print(t.s)
r=' ' lista=list() while True: n=(int(input('digite um numero'))) if n in lista: print('numero duplicado nao adicionado...') r = str(input('quer continuar')) else: lista.append(n) print('numero adicionado com sucesso.') r=str(input('quer continuar')) if r == 'n': break print(f'os numeros adicionados foram {sorted(lista)}')
# Almost any value is evaluated to True if it has some sort of content. # # Any string is True, except empty strings. # # Any number is True, except 0. # # Any list, tuple, set, and dictionary are True, except empty ones. bool("abc") bool(123) bool(["apple", "cherry", "banana"])
# Distributed under the MIT software license, see the accompanying # file LICENSE or https://www.opensource.org/licenses/MIT. # List of words which are recognized in commands. The display_name method # also recognizes strings between these words as own words so not all words # appearing in command names have to be listed here but only enough to separate # all words. # # Keep the list ordered alphabetically so it's easier for a developer to see if # a word already is there word_list = ["abort", "account", "address", "balance", "block", "by", "chain", "change", "clear", "connection", "convert", "decode", "fee", "generate", "get", "hash", "header", "import", "info", "key", "label", "message", "multi", "network", "node", "out", "psbt", "pool", "priv", "pruned", "list", "raw", "save", "send", "smart", "totals", "transaction", "tx", "unspent", "wallet", ] # List of explicit display names which would otherwise wrongly generated from # the word list explicit_display_names = { "setban": "SetBan", "listaccounts": "ListAccounts", "listwallets": "ListWallets", "listtransactions": "ListTransactions", "sethdseed": "SetHdSeed", "getaddressesbylabel": "GetAddressesByLabel", "getaddressesbyaccount": "GetAddressesByAccount", "getnodeaddresses": "GetNodeAddresses", "joinpsbts": "JoinPsbts", "utxoupdatepsbt": "UtxoUpdatePsbt", "deriveaddresses": "DeriveAddresses", "listlabels": "ListLabels", } def capitalize(word): if len(word) > 1: return word[0].upper() + word[1:] else: return word.upper() def uncapitalize(word): if len(word) > 1: return word[0].lower() + word[1:] else: return word.lower() def display_name(command): if command in explicit_display_names: return explicit_display_names[command] name = "" last_word_index = 0 i = 0 while i < len(command): found_word = False for word in word_list: if command[i:i+len(word)] == word: if last_word_index < i: name += capitalize(command[last_word_index:i]) name += capitalize(word) i += len(word) last_word_index = i found_word = True break if not found_word: i += 1 if last_word_index < i: name += capitalize(command[last_word_index:i]) return capitalize(name)
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python APRS Module Tests.""" __author__ = 'Greg Albrecht W2GMD <oss@undef.net>' # NOQA pylint: disable=R0801 __copyright__ = 'Copyright 2017 Greg Albrecht and Contributors' # NOQA pylint: disable=R0801 __license__ = 'Apache License, Version 2.0' # NOQA pylint: disable=R0801
data = { "red": ((0.0, 0.0, 0.0), (1.0, 0.2, 0.2)), "green": ((0.0, 0.0, 0.0), (1.0, 0.2, 0.2)), "blue": ((0.0, 0.0, 0.0), (1.0, 1.0, 1.0)), }
# create template class DtlTemplateCreateModel: def __init__(self, name, subject, html_body): # required fields self.name = name self.subject = subject self.html_body = html_body self.template_setting_id = None self.unsubscribe_option = None def get_json_object(self): return { 'name': self.name, 'subject': self.subject, 'htmlBody': self.html_body, 'templateSettingId': self.template_setting_id, 'unsubscribeOption': self.unsubscribe_option, } # update template class DtlTemplatePatchModel: def __init__(self): self.name = None self.subject = None self.html_body = None self.template_setting_id = None self.unsubscribe_option = None def get_json_object(self): return { 'name': self.name, 'subject': self.subject, 'htmlBody': self.html_body, 'templateSettingId': self.template_setting_id, 'unsubscribeOption': self.unsubscribe_option, } # add reply template class DtlAddReplyTemplateModel: def __init__(self, reply_template_id): # required fields self.reply_template_id = reply_template_id self.schedule_time = None # default template settings time if null def get_json_object(self): return { 'replyTemplateId': self.reply_template_id, 'scheduleTime': self.schedule_time, }
ABSOLUTE_URL_OVERRIDES = {} ADMINS = () ADMIN_FOR = () ADMIN_MEDIA_PREFIX = '/static/admin/' ALLOWED_INCLUDE_ROOTS = () APPEND_SLASH = True AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',) BANNED_IPS = () CACHES = {} CACHE_MIDDLEWARE_ALIAS = 'default' CACHE_MIDDLEWARE_KEY_PREFIX = '' CACHE_MIDDLEWARE_SECONDS = 600 COMMENTS_ALLOW_PROFANITIES = False COMMENTS_BANNED_USERS_GROUP = None COMMENTS_FIRST_FEW = 0 COMMENTS_MODERATORS_GROUP = None COMMENTS_SKETCHY_USERS_GROUP = None CSRF_COOKIE_DOMAIN = None CSRF_COOKIE_NAME = 'csrftoken' CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' DATABASES = {'default': {'ENGINE': 'django.db.backends.', 'NAME': '', 'HOST': '', 'USER': '', 'PASSWORD': '', 'PORT': ''}} DATABASE_ENGINE = '' DATABASE_HOST = '' DATABASE_NAME = '' DATABASE_OPTIONS = {} DATABASE_PASSWORD = '' DATABASE_PORT = '' DATABASE_ROUTERS = [] DATABASE_USER = '' DATETIME_FORMAT = 'N j, Y, P' DATETIME_INPUT_FORMATS = ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y') DATE_FORMAT = 'N j, Y' DATE_INPUT_FORMATS = ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') DEBUG = True DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = '.' DEFAULT_CHARSET = 'utf-8' DEFAULT_CONTENT_TYPE = 'text/html' DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL = 'webmaster@localhost' DEFAULT_INDEX_TABLESPACE = '' DEFAULT_TABLESPACE = '' DISALLOWED_USER_AGENTS = () EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_HOST_PASSWORD = '' EMAIL_HOST_USER = '' EMAIL_PORT = 25 EMAIL_SUBJECT_PREFIX = '[Django] ' EMAIL_USE_TLS = False FILE_CHARSET = 'utf-8' FILE_UPLOAD_HANDLERS = ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 FILE_UPLOAD_PERMISSIONS = None FILE_UPLOAD_TEMP_DIR = None FIRST_DAY_OF_WEEK = 0 FIXTURE_DIRS = () FORCE_SCRIPT_NAME = None FORMAT_MODULE_PATH = None IGNORABLE_404_ENDS = ('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php') IGNORABLE_404_STARTS = ('/cgi-bin/', '/_vti_bin', '/_vti_inf') INSTALLED_APPS = ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles'] INTERNAL_IPS = () LANGUAGES = (('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('nb', 'Norwegian Bokmal'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) LANGUAGES_BIDI = ('he', 'ar', 'fa') LANGUAGE_CODE = 'en-us' LANGUAGE_COOKIE_NAME = 'django_language' LOCALE_PATHS = () LOGGING = {'loggers': {'django.request': {'level': 'ERROR', 'propagate': True, 'handlers': ['mail_admins']}}, 'version': 1, 'disable_existing_loggers': False, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR'}}} LOGGING_CONFIG = 'django.utils.log.dictConfig' LOGIN_REDIRECT_URL = '/accounts/profile/' LOGIN_URL = '/accounts/login/' LOGOUT_URL = '/accounts/logout/' MANAGERS = () MEDIA_ROOT = '' MEDIA_URL = '' MESSAGE_STORAGE = 'django.contrib.messages.storage.user_messages.LegacyFallbackStorage' MIDDLEWARE_CLASSES = ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') MONTH_DAY_FORMAT = 'F j' NUMBER_GROUPING = 0 PASSWORD_RESET_TIMEOUT_DAYS = 3 PREPEND_WWW = False PROFANITIES_LIST = () ROOT_URLCONF = 'project.urls' ### SECRET_KEY = '01234567890123456789012345678901234567890123456789' SEND_BROKEN_LINK_EMAILS = False SERVER_EMAIL = 'root@localhost' SESSION_COOKIE_AGE = 1209600 SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_HTTPONLY = False SESSION_COOKIE_NAME = 'sessionid' SESSION_COOKIE_PATH = '/' SESSION_COOKIE_SECURE = False SESSION_ENGINE = 'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_FILE_PATH = None SESSION_SAVE_EVERY_REQUEST = False SETTINGS_MODULE = 'project.settings' ### SHORT_DATETIME_FORMAT = 'm/d/Y P' SHORT_DATE_FORMAT = 'm/d/Y' SITE_ID = 1 ### STATICFILES_DIRS = () STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_ROOT = '' STATIC_URL = '/static/' TEMPLATE_CONTEXT_PROCESSORS = ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.contrib.messages.context_processors.messages') TEMPLATE_DEBUG = True TEMPLATE_DIRS = () TEMPLATE_LOADERS = ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') TEMPLATE_STRING_IF_INVALID = '' TEST_DATABASE_CHARSET = None TEST_DATABASE_COLLATION = None TEST_DATABASE_NAME = None TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' THOUSAND_SEPARATOR = ',' TIME_FORMAT = 'P' TIME_INPUT_FORMATS = ('%H:%M:%S', '%H:%M') TIME_ZONE = 'America/Chicago' TRANSACTIONS_MANAGED = False URL_VALIDATOR_USER_AGENT = 'Django/1.3 (http://www.djangoproject.com)' USE_ETAGS = False USE_I18N = True USE_L10N = True USE_THOUSAND_SEPARATOR = False YEAR_MONTH_FORMAT = 'F Y'
""" 104.ไบŒๅ‰ๆ ‘็š„ๆœ€ๅคงๆทฑๅบฆ ๆ—ถ้—ดๅคๆ‚ๅบฆ๏ผšO(logn) ็ฉบ้—ดๅคๆ‚ๅบฆ๏ผšO(1) """ class TreeNode: def __init__(self, val): self.val = val self.left = None self.right = None def createTreeNode(node_list): if not node_list[0]: return None root = TreeNode(node_list) Nodes = [root] j = 1 for node in Nodes: if node: node.left = (TreeNode(node_list[j]) if node_list[j] else None) Nodes.append(node.left) j += 1 if len(node_list) == j: return root node.right = (TreeNode(node_list[j]) if node_list[j] else None) Nodes.append(node.right) j += 1 if len(node_list) == j: return root class Solution: def minDepth(self, root: TreeNode) -> int: if root: if root.right and root.left: return 1 + min(self.minDepth(root.right), self.minDepth(root.left)) elif root.right: return 1 + self.minDepth(root.left) elif root.left: return 1 + self.minDepth(root.right) else: return 1 else: return 0 if __name__ == "__main__": node_list = [3, 9, 20, None, None, 15, 7] root = createTreeNode(node_list) s = Solution() ret = s.minDepth(root) print(ret)
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Visibility', 'units': 'm'}, {'abbr': 1, 'code': 1, 'title': 'Albedo', 'units': '%'}, {'abbr': 2, 'code': 2, 'title': 'Thunderstorm probability', 'units': '%'}, {'abbr': 3, 'code': 3, 'title': 'Mixed layer depth', 'units': 'm'}, {'abbr': 4, 'code': 4, 'title': 'Volcanic ash', 'units': 'Code table 4.206'}, {'abbr': 5, 'code': 5, 'title': 'Icing top', 'units': 'm'}, {'abbr': 6, 'code': 6, 'title': 'Icing base', 'units': 'm'}, {'abbr': 7, 'code': 7, 'title': 'Icing', 'units': 'Code table 4.207'}, {'abbr': 8, 'code': 8, 'title': 'Turbulence top', 'units': 'm'}, {'abbr': 9, 'code': 9, 'title': 'Turbulence base', 'units': 'm'}, {'abbr': 10, 'code': 10, 'title': 'Turbulence', 'units': 'Code table 4.208'}, {'abbr': 11, 'code': 11, 'title': 'Turbulent kinetic energy', 'units': 'J/kg'}, {'abbr': 12, 'code': 12, 'title': 'Planetary boundary-layer regime', 'units': 'Code table 4.209'}, {'abbr': 13, 'code': 13, 'title': 'Contrail intensity', 'units': 'Code table 4.210'}, {'abbr': 14, 'code': 14, 'title': 'Contrail engine type', 'units': 'Code table 4.211'}, {'abbr': 15, 'code': 15, 'title': 'Contrail top', 'units': 'm'}, {'abbr': 16, 'code': 16, 'title': 'Contrail base', 'units': 'm'}, {'abbr': 17, 'code': 17, 'title': 'Maximum snow albedo', 'units': '%'}, {'abbr': 18, 'code': 18, 'title': 'Snow free albedo', 'units': '%'}, {'abbr': 19, 'code': 19, 'title': 'Snow albedo', 'units': '%'}, {'abbr': 20, 'code': 20, 'title': 'Icing', 'units': '%'}, {'abbr': 21, 'code': 21, 'title': 'In-cloud turbulence', 'units': '%'}, {'abbr': 22, 'code': 22, 'title': 'Clear air turbulence (CAT)', 'units': '%'}, {'abbr': 23, 'code': 23, 'title': 'Supercooled large droplet probability', 'units': '%'}, {'abbr': 24, 'code': 24, 'title': 'Convective turbulent kinetic energy', 'units': 'J/kg'}, {'abbr': 25, 'code': 25, 'title': 'Weather', 'units': 'Code table 4.225'}, {'abbr': 26, 'code': 26, 'title': 'Convective outlook', 'units': 'Code table 4.224'}, {'abbr': 27, 'code': 27, 'title': 'Icing scenario', 'units': 'Code table 4.227'}, {'abbr': None, 'code': 255, 'title': 'Missing'})
IMAGE_PATH = "H:\Asu\mwdb\project-phase-0\CSE 515 Fall19 - Smaller Dataset\Phase-1\CSE 515 Fall19 - Smaller Dataset\Hand_0008110.jpg" IMAGE_FOLDER = "H:\Asu\mwdb\project-phase-0\CSE 515 Fall19 - Smaller Dataset\images" DATABASE_FOLDER = "H:\Asu\mwdb\project-phase-0\CSE 515 Fall19 - Smaller Dataset\Database\\" METADATA_FOLDER = "H:\Asu\mwdb\project-phase-0\CSE 515 Fall19 - Smaller Dataset\metadata\HandInfo.csv" frTechniqueDict = {"1": "CM", "2": "LBP", "3": "HOG", "4": "SIFT"} fdTechniqueDict = {"1": "PCA", "2": "LDA", "3": "SVD", "4": "NMF"} flTechniqueDict = {"1": "LEFT", "2": "RIGHT", "3": "DORSAL", "4": "PALMER", "5": "ACCESS", "6": "NOACCESS", "7": "MALE", "8": "FEMALE"}
def remove_duplicates(some_list): return list(set(some_list)) def run(): random_list = [1,1,2,2,4] print(remove_duplicates(random_list)) if __name__ == '__main__': run()
# -*- coding: utf-8 -*- # Copyright (c) 2016, 2017, 2018, 2019 Sqreen. All rights reserved. # Please refer to our terms for more information: # # https://www.sqreen.io/terms.html # __author__ = "Sqreen" __copyright__ = "Copyright 2016, 2017, 2018, 2019, Sqreen" __email__ = "contact@sqreen.io" __license__ = "proprietary" # The major version should strictly follow PowerWAF API version. __version__ = "0.4.1"
class Word(): def __init__(self, text): self.__text = text def __eq__(self, word2): return self.__text.lower() == word2.__text.lower() def __str__(self): ''' call once print(object of Word) ''' return self.__text def __repr__(self): ''' return more details call when tty(็ปˆ็ซฏ), ไบคไบ’่งฃ้‡Šๅ™จ ''' return 'Word("'+self.__text+'")' first = Word("hi, this is first") second = Word("hi, this is second") print('first==second',first==second) #False #Word("hi, this is first"), or run in tty print(first.__repr__()) print(first) #first is hi, this is first
# Copyright 2017 Michael Blondin, Alain Finkel, Christoph Haase, Serge Haddad # 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. # Configurations must be immutable class Configuration: def __init__(self): pass def __eq__(self, other): raise NotImplementedError() def __ne__(self, other): raise NotImplementedError() def __gt__(self, other): raise NotImplementedError() def __ge__(self, other): raise NotImplementedError() def __lt__(self, other): raise NotImplementedError() def __le__(self, other): raise NotImplementedError() def __hash__(self): raise NotImplementedError()
class Report(object): def __init__(self): self._packets_in_buffer = [] self._packet_wait_time = [] self._server_load = [] def update_state(self, packets_in_buffer, packet_wait_time, server_load): self._packets_in_buffer.append(packets_in_buffer) self._packet_wait_time.append(packet_wait_time) self._server_load.append(server_load)
# coding=utf-8 if __name__ == "__main__": print("developing...")
ITALY_CITIES = ['Roma', 'Milano'] GERMAN_CITIES = ['Berlin', 'Frankfurt'] US_CITIES = ['Boston', 'Los Angeles'] # Our restaurant is named differently in different # in different parts of the world def get_restaurant_name(city: str) -> str: if city in ITALY_CITIES: return "Trattoria Viafore" if city in GERMAN_CITIES: return "Pat's Kantine" if city in US_CITIES: return "Pat's Place" return None if get_restaurant_name('Boston'): print("Location Found!")
"""easyNeuron is the simplest way to design, build and test machine learnng models. Submodules ---------- easyneuron.math - The math tools needed for the module easyneuron.neighbours - KNearest and other neighbourb based ML models easyneuron.types - The custom types for the module """
km = int(input('Quantos KM dura a viagem ')) if km < 200: km_atualizado = km * 0.50 print("O valor da viagem รฉ R${:.2f} reais".format(km_atualizado)) else: km_atualizado_maior = km * 0.45 print('O valor da viagem รฉ R${:.2f} reais'.format(km_atualizado_maior)) print("BOA VIAGEM")
# Description: Imports needed for most uses of pymol in Jupyter. Combination of importPyMOL and importPythonDisplay. # Source: placeHolder """ cmd.do('from pymol import cmd') cmd.do('from IPython.display import Image') cmd.do('from IPython.core.display import HTML') cmd.do('PATH = "/Users/blaine/"') """ cmd.do('from pymol import cmd') cmd.do('from IPython.display import Image') cmd.do('from IPython.core.display import HTML') cmd.do('PATH = "/Users/blaine/"')
training_data_hparams = { 'shuffle': False, 'num_epochs': 1, 'batch_size': 5, 'allow_smaller_final_batch': False, 'source_dataset': { "files": ['data/iwslt14/train.de'], 'vocab_file': 'data/iwslt14/vocab.de', 'max_seq_length': 50 }, 'target_dataset': { 'files': ['data/iwslt14/train.en'], 'vocab_file': 'data/iwslt14/vocab.en', 'max_seq_length': 50 } } test_data_hparams = training_data_hparams valid_data_hparams = test_data_hparams
def foo(x): return x**2 def decorator(func): def wrapper(*args, **kwargs): print(func, args, kwargs) return func(*args, **kwargs) return wrapper _decorated_funcs = defaultdict(lambda: []) _applied_decorators = defaultdict(lambda: []) def apply_decorator(func, decorator): _decorated_funcs[func.__qualname__].append(func) # to undo _applied_decorators[func.__qualname__].append(decorator) func = decorator(func) apply_decorator(func, decorator)
# Created by MechAviv # ID :: [910150001] # Frozen Fairy Forest : Elluel sm.showEffect("Effect/Direction5.img/effect/mercedesInIce/merBalloon/8", 2000, 0, -100, 0, -2, False, 0) sm.sendDelay(2000) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False) sm.progressMessageFont(3, 20, 20, 0, "Press the Alt key to jump.")
print('Jรก atingiu a maior idade?') x = 0 s = 0 for c in range(1, 8): ano = int(input('Em que ano nasceu a {}ยช pessoa: '.format(c))) if ano < 2003: s = s + 1 print('Pessoas MAIORES de idade {} \nPessoas MENORES de idade {}'.format(s, 7 - s))
"""Constants for testing the Coinbase integration.""" GOOD_CURRENCY = "BTC" GOOD_CURRENCY_2 = "USD" GOOD_CURRENCY_3 = "EUR" GOOD_EXCHNAGE_RATE = "BTC" GOOD_EXCHNAGE_RATE_2 = "ATOM" BAD_CURRENCY = "ETH" BAD_EXCHANGE_RATE = "ETH" MOCK_ACCOUNTS_RESPONSE = [ { "balance": {"amount": "13.38", "currency": GOOD_CURRENCY_3}, "currency": GOOD_CURRENCY_3, "id": "ABCDEF", "name": "BTC Wallet", "native_balance": {"amount": "15.02", "currency": GOOD_CURRENCY_2}, }, { "balance": {"amount": "0.00001", "currency": GOOD_CURRENCY}, "currency": GOOD_CURRENCY, "id": "123456789", "name": "BTC Wallet", "native_balance": {"amount": "100.12", "currency": GOOD_CURRENCY_2}, }, { "balance": {"amount": "9.90", "currency": GOOD_CURRENCY_2}, "currency": "USD", "id": "987654321", "name": "USD Wallet", "native_balance": {"amount": "9.90", "currency": GOOD_CURRENCY_2}, }, ]
#!/usr/bin/env python3 input = int(input()) def scores_after_n_receipes(n): scores = [3, 7] elfs_positions = [0, 1] target_scores = n + 10 while len(scores) < target_scores: new_receipe_score = 0 for i, pos in enumerate(elfs_positions): new_receipe_score += scores[pos] scores.extend(map(int, str(new_receipe_score))) for i, pos in enumerate(elfs_positions): elfs_positions[i] = (elfs_positions[i] + scores[pos] + 1) % len(scores) # debug_scores = scores[:] # for i, s in enumerate(debug_scores): # if i not in elfs_positions: # debug_scores[i] = f' {s} ' # debug_scores[elfs_positions[0]] = f'({debug_scores[elfs_positions[0]]})' # debug_scores[elfs_positions[1]] = f'[{debug_scores[elfs_positions[1]]}]' # print(' '.join(map(str, debug_scores))) return scores[n:n+10] def after_how_many(next_scores): scores = [3, 7] elfs_positions = [0, 1] target_len = len(next_scores) while True: new_receipe_score = 0 for i, pos in enumerate(elfs_positions): new_receipe_score += scores[pos] for score in map(int, str(new_receipe_score)): scores.append(score) if ''.join(map(str, scores[-target_len:])) == next_scores: return len(scores) - target_len for i, pos in enumerate(elfs_positions): elfs_positions[i] = (elfs_positions[i] + scores[pos] + 1) % len(scores) print(''.join(map(str, scores_after_n_receipes(input)))) print(after_how_many(str(input)))
# try: # total = 1/0 # # this will not execute # except Exception: # total = 0 # print(total) # 0 # try: # total = 1/0 # print("This will not show up.") # except Exception: # print("Exception was caught") # Exception was caught # total = 0 # print(total) # 0 # num = input("What is a number? ") # What is a number? 10 # num = int(num) # print(num) # 10 num = input("What is a number? ") # What is a number? Python 301 num = int(num) print(num) # Traceback (most recent call last): # File "c:\Users\pgold\CarlsHub\CompletePython\ClassFiles\Python301\ObjectOrientatedProgramming\ErrorCatching\ErrorsExceptions.py", line 26, in <module> # num = int(num) # ValueError: invalid literal for int() with base 10: 'Python 301'
# python 3 # -*- Coding:utf-8 -*- class Fibo(object): def __init__(self): self.fibo_0 = 0 self.fibo_1 = 1 def fibo_top(self, n): ''' ่Žทๅ–ๅ‰nไธชๆ–ๆณข้‚ฃๅฅ‘ๆ•ฐ ''' fibo = [self.fibo_0, self.fibo_1] for i in range(2, n): # print(i) fibo.append(fibo[i-2] + fibo[i-1]) return fibo def fibo_before(self, n): ''' ่Žทๅ–ๅฐไบŽๆ•ฐๅญ—n็š„ๆ‰€ๆœ‰ๆ–ๆณข้‚ฃๅฅ‘ๆ•ฐ ''' fibo = [self.fibo_0, self.fibo_1] i = 2 while True: fibo.append(fibo[i-2] + fibo[i-1]) # print(i, fibo) if fibo[i] > n: return fibo[:-1] else: i += 1 if __name__ == '__main__': f= Fibo() top_n = 20 print('ๅ‰{0}ไธชๆ–ๆณข้‚ฃๅฅ‘ๆ•ฐ๏ผš\n{1}'.format(top_n, f.fibo_top(top_n))) before_n = 20000 print('ๅฐไบŽๆ•ฐๅญ—{0}็š„ๆ‰€ๆœ‰ๆ–ๆณข้‚ฃๅฅ‘ๆ•ฐ๏ผš\n{1}'.format(before_n,f.fibo_before(before_n)))
class ErroresLexicos(): ''' Parametros: - Descripcion:str Descripcion - linea y columna:numeric linea y columna - clase origen:str Sirve para decir en que clase del patron interprete trono ''' def __init__(self, descripcion, linea, columna, origen): self.descripcion = descripcion self.linea = linea self.columna = columna self.origen = origen ''' ______ _____ _____ ____ _____ | ____| __ \| __ \ / __ \| __ \ | |__ | |__) | |__) | | | | |__) | | __| | _ /| _ /| | | | _ / | |____| | \ \| | \ \| |__| | | \ \ |______|_| \_\_| \_\\____/|_| \_\ Descripcion: '''
# # PySNMP MIB module CISCO-PORT-CHANNEL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-PORT-CHANNEL-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:09:40 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") ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") PortMemberList, = mibBuilder.importSymbols("CISCO-ST-TC", "PortMemberList") InterfaceIndex, ifIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "ifIndex") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") Unsigned32, ObjectIdentity, IpAddress, iso, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Integer32, TimeTicks, NotificationType, Gauge32, MibIdentifier, ModuleIdentity, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "ObjectIdentity", "IpAddress", "iso", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Integer32", "TimeTicks", "NotificationType", "Gauge32", "MibIdentifier", "ModuleIdentity", "Counter64") TimeStamp, RowStatus, DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "RowStatus", "DisplayString", "TruthValue", "TextualConvention") ciscoPortChannelMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 285)) ciscoPortChannelMIB.setRevisions(('2004-09-13 00:00', '2004-06-08 00:00', '2004-03-11 00:00', '2003-05-28 00:00', '2002-10-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoPortChannelMIB.setRevisionsDescriptions(('Added new object portChannelExtOperChannelGrpMode to portChannelExtTable. Changed the SYNTAX of portChannelExtPersistent to INTEGER from TruthValue.', 'Added new tables portChannelGrpIfExtTable and portChannelExtTable. Also, added new object portChannelProtocolEnable.', 'Added portChannelMemberOperStatus to portChannelTable. ', 'Superceeded portChannelMIBCompliances with portChannelMIBCompliances1. Added portChannelAdminChannelMode object to portChannelMIBCompliances1. ', 'Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoPortChannelMIB.setLastUpdated('200409130000Z') if mibBuilder.loadTexts: ciscoPortChannelMIB.setOrganization('Cisco Systems Inc.') if mibBuilder.loadTexts: ciscoPortChannelMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553 -NETS E-mail: cs-san@cisco.com') if mibBuilder.loadTexts: ciscoPortChannelMIB.setDescription('The MIB module for management of Port Channel ports. In addition to this MIB, CISCO-FC-FE-MIB and interface mib (rfc2863) will also contain entries for Port Channel ports.') ciscoPortChannelObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 1)) portChannelMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 2)) portChannelConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1)) portChannelStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 2)) portChannelNotification = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 3)) portChannelNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 3, 0)) class PortChannelMode(TextualConvention, Integer32): description = 'Defines how a Port Channel does channeling. auto(1) - place the port into passive negotiation state, in which the port waits for its peer to initiate negotiation. on(2) - force the port to enable channeling. off(3) - channeling is disabled. desirable(4) - place the port into active negotiating state, in which the port initiates negotiations with its peer and if the peer end agrees, channeling is enabled between them. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("auto", 1), ("on", 2), ("off", 3), ("desirable", 4)) class PortChannelGroupMode(TextualConvention, Integer32): description = "Defines how a Port Channel does channeling. on(1) - the port shall operate as part of a port channel or remain inactive. The port channel protocol is turned off and peer port is assumed to be configured in 'on' mode. active(2)- indicates that port shall initiate port channel negotiation with peer port according to the port channel protocol regardless of the channel mode of the peer port." status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("on", 1), ("active", 2)) portChannelTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1), ) if mibBuilder.loadTexts: portChannelTable.setStatus('current') if mibBuilder.loadTexts: portChannelTable.setDescription("This table facilitates the creation and deletion of a Port Channel interface to achieve higher bandwidths than just one E_port. More than one E_port can be a member of an Port Channel port. NOTE:Only E_ports can be members of an Port Channel port. A port is added to a Port Channel port by setting portChannelMemberList,and the 'manner' in which the agent performs the type of addition is determined by the value of portChannelAddType. During the period when port(s) is being added to the Port Channel, the agent will not allow to change any parameters of the port(s) being added. Also if the operation is successful (i.e. port(s) is added to the Port Channel) then also the agent will not allow to change any parameters of the individual port(s) that is added. But any change done to the Port Channel port will also be applied to the port(s) which are member(s) of this Port channel port. Once a port(s) is removed from a Port Channel Port it will retain the values that it had when it was a member of the Port Channel port. It will not have the old values it had before joining the Port Channel port. The port(s) that are added/removed to/from a Port Channel port will be put into administratively down (ifAdminStatus='down') which results into operationally down(ifOperStatus='down'). To bring the port up again, the user has to set the port to be administratively up(ifAdminStatus='up'). Then the port goes through its initialization cycle to become active(ifOperStatus='up'). ") portChannelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1), ).setIndexNames((0, "CISCO-PORT-CHANNEL-MIB", "portChannelIndex")) if mibBuilder.loadTexts: portChannelEntry.setStatus('current') if mibBuilder.loadTexts: portChannelEntry.setDescription('There is one entry in this table for each created Port Channel port. ') portChannelIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 2048))) if mibBuilder.loadTexts: portChannelIndex.setStatus('current') if mibBuilder.loadTexts: portChannelIndex.setDescription('An index that uniquely identifies an entry in the portChannelTable table. ') portChannelIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 2), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelIfIndex.setStatus('current') if mibBuilder.loadTexts: portChannelIfIndex.setDescription('The ifIndex of this interface. ') portChannelAdminChannelMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 3), PortChannelMode().clone('on')).setMaxAccess("readcreate") if mibBuilder.loadTexts: portChannelAdminChannelMode.setStatus('current') if mibBuilder.loadTexts: portChannelAdminChannelMode.setDescription("The channel mode desired by the network manager. If this object is configured to be auto(1), then the 'portChannelOperChannelMode' will show the current operating channel mode of port. ") portChannelOperChannelMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 4), PortChannelMode()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelOperChannelMode.setStatus('current') if mibBuilder.loadTexts: portChannelOperChannelMode.setDescription('The current operating channel mode of the port. ') portChannelAddType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("normal", 1), ("force", 2))).clone('normal')).setMaxAccess("readcreate") if mibBuilder.loadTexts: portChannelAddType.setStatus('current') if mibBuilder.loadTexts: portChannelAddType.setDescription('The method to be adopted by the agent to add port(s) to a Port Channel port. If normal(1), then a compatibility check is done on the parameters of the port(s) being added to this Port Channel. The port(s) being added must have the same physical and configured parameters as the Port Channel port. If force(2), a compatibility check is done on only physical parameters. The port(s) being added to this Port Channel port must have same physical parameters. The operation will fail only if the physical parameters are not same. The configured parameters of the port(s) being added are overwritten by configured parameters of this Port Channel port. ') portChannelLastActionStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("successful", 1), ("failed", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelLastActionStatus.setStatus('current') if mibBuilder.loadTexts: portChannelLastActionStatus.setDescription('The status of the last operation (add or remove a member) done to change the member list of a Port Channel Port. When no ports are added or the last operation is successful then this object will be successful(1). If this value is failed(2) then the user can look at portChannelLastAddStatusCause to find the reason of failure. ') portChannelLastActionStatusCause = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 7), SnmpAdminString()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelLastActionStatusCause.setStatus('current') if mibBuilder.loadTexts: portChannelLastActionStatusCause.setDescription("The cause of failure to last operation (add or remove a member) done to change the member list of a Port Channel port. This object will be zero length string if 'portChannelLastActionStatus' is successful(1). ") portChannelLastActionTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 8), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelLastActionTime.setStatus('current') if mibBuilder.loadTexts: portChannelLastActionTime.setDescription('The timestamp indicating the time of last action performed on this entry. ') portChannelMemberList = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 9), PortMemberList().clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: portChannelMemberList.setStatus('current') if mibBuilder.loadTexts: portChannelMemberList.setDescription("The list of ifIndex's of the E_ports that are members of this Port Channel port. ") portChannelCreationTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 10), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelCreationTime.setStatus('current') if mibBuilder.loadTexts: portChannelCreationTime.setDescription("The timestamp of this entry's creation time. Note that at this creation time, a discontinuity occurs in the statistic/error counters which are defined in CISCO-FC-FE-MIB, and which are associated with this Port Channel. ") portChannelRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: portChannelRowStatus.setStatus('current') if mibBuilder.loadTexts: portChannelRowStatus.setDescription('The status of this conceptual row. ') portChannelMemberOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 1, 1, 12), PortMemberList().clone(hexValue="")).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelMemberOperStatus.setStatus('current') if mibBuilder.loadTexts: portChannelMemberOperStatus.setDescription("The list of port channel forwarding status of the E_ports that are members of this Port Channel port. Every four-byte is a status of the corresponding member port represented by ifIndex in portChannelMemberList. The portChannelMemberOperStatus may not be the same as ifOperStatus. A value of '00 00 00 01' means the corresponding member port is participating in the load balancing of the port channel. A value of '00 00 00 02' means the corresponding member port is not participating in the load balancing of the port channel. ") portChannelProtocolEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 2), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: portChannelProtocolEnable.setStatus('current') if mibBuilder.loadTexts: portChannelProtocolEnable.setDescription('Enables/disables Port Channel Protocol. If enabled, Port Channel Protocol provides following features: - detection and correction of mis-configurations of interfaces involved with a Port Channel. - automatic creation of Channel Groups (and therefore Port Channels) if both ends of the links are compatible with each other.') portChannelGrpIfExtTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 3), ) if mibBuilder.loadTexts: portChannelGrpIfExtTable.setStatus('current') if mibBuilder.loadTexts: portChannelGrpIfExtTable.setDescription('This table facilitates Channel Group specific interface configurations.') portChannelGrpIfExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: portChannelGrpIfExtEntry.setStatus('current') if mibBuilder.loadTexts: portChannelGrpIfExtEntry.setDescription('There is one entry in this table for each created Port Channel port.') portChannelGrpIfAutoCreation = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 3, 1, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: portChannelGrpIfAutoCreation.setStatus('current') if mibBuilder.loadTexts: portChannelGrpIfAutoCreation.setDescription('This object indicates if this interface may be part of automatically created Channel Groups (and therefore Port Channels).') portChannelExtTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 4), ) if mibBuilder.loadTexts: portChannelExtTable.setStatus('current') if mibBuilder.loadTexts: portChannelExtTable.setDescription('This table extends the portChannelTable to support Port Channel Protocol.') portChannelExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 4, 1), ) portChannelEntry.registerAugmentions(("CISCO-PORT-CHANNEL-MIB", "portChannelExtEntry")) portChannelExtEntry.setIndexNames(*portChannelEntry.getIndexNames()) if mibBuilder.loadTexts: portChannelExtEntry.setStatus('current') if mibBuilder.loadTexts: portChannelExtEntry.setDescription('There is one entry in this table for each created Port Channel port. It contains an entry for every Port Channel that is either automatically created or manually configured.') portChannelExtChannelGrpMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 4, 1, 1), PortChannelGroupMode()).setMaxAccess("readwrite") if mibBuilder.loadTexts: portChannelExtChannelGrpMode.setStatus('current') if mibBuilder.loadTexts: portChannelExtChannelGrpMode.setDescription('The admin channel group mode of this port channel.') portChannelExtAutoCreated = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 4, 1, 2), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelExtAutoCreated.setStatus('current') if mibBuilder.loadTexts: portChannelExtAutoCreated.setDescription('Indicates of this port channel was automatically created. Note that this object is valid only for Fibre Channel port channels.') portChannelExtPersistent = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noOp", 1), ("enable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: portChannelExtPersistent.setStatus('current') if mibBuilder.loadTexts: portChannelExtPersistent.setDescription("This object converts an auto-created port channel to a persistent port channel when it is set to 'enable'. No action is taken if this object is set to 'noOp'. The value of the object when read is always 'noOp'.") portChannelExtOperChannelGrpMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 285, 1, 1, 4, 1, 4), PortChannelGroupMode()).setMaxAccess("readonly") if mibBuilder.loadTexts: portChannelExtOperChannelGrpMode.setStatus('current') if mibBuilder.loadTexts: portChannelExtOperChannelGrpMode.setDescription('The operational channel group mode of this port channel.') portChannelMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 1)) portChannelMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 2)) portChannelMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 1, 1)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelMIBCompliance = portChannelMIBCompliance.setStatus('deprecated') if mibBuilder.loadTexts: portChannelMIBCompliance.setDescription('The compliance statement for entities which implement the CISCO-PORT-CHANNEL-MIB mib.') portChannelMIBCompliance1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 1, 2)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelMIBCompliance1 = portChannelMIBCompliance1.setStatus('deprecated') if mibBuilder.loadTexts: portChannelMIBCompliance1.setDescription('The compliance statement for entities which implement the CISCO-PORT-CHANNEL-MIB mib.') portChannelMIBCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 1, 3)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelGroup"), ("CISCO-PORT-CHANNEL-MIB", "portChannelGroupRev1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelMIBCompliance2 = portChannelMIBCompliance2.setStatus('deprecated') if mibBuilder.loadTexts: portChannelMIBCompliance2.setDescription('The compliance statement for entities which implement the CISCO-PORT-CHANNEL-MIB mib.') portChannelMIBCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 1, 4)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelGroup"), ("CISCO-PORT-CHANNEL-MIB", "portChannelGroupRev1"), ("CISCO-PORT-CHANNEL-MIB", "portChannelProtocolGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelMIBCompliance3 = portChannelMIBCompliance3.setStatus('current') if mibBuilder.loadTexts: portChannelMIBCompliance3.setDescription('The compliance statement for entities which implement the CISCO-PORT-CHANNEL-MIB mib.') portChannelGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 2, 1)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelIfIndex"), ("CISCO-PORT-CHANNEL-MIB", "portChannelAdminChannelMode"), ("CISCO-PORT-CHANNEL-MIB", "portChannelOperChannelMode"), ("CISCO-PORT-CHANNEL-MIB", "portChannelAddType"), ("CISCO-PORT-CHANNEL-MIB", "portChannelLastActionStatus"), ("CISCO-PORT-CHANNEL-MIB", "portChannelLastActionStatusCause"), ("CISCO-PORT-CHANNEL-MIB", "portChannelLastActionTime"), ("CISCO-PORT-CHANNEL-MIB", "portChannelMemberList"), ("CISCO-PORT-CHANNEL-MIB", "portChannelCreationTime"), ("CISCO-PORT-CHANNEL-MIB", "portChannelRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelGroup = portChannelGroup.setStatus('current') if mibBuilder.loadTexts: portChannelGroup.setDescription('A collection of objects related to Port Channel Interface parameters.') portChannelGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 2, 2)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelMemberOperStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelGroupRev1 = portChannelGroupRev1.setStatus('current') if mibBuilder.loadTexts: portChannelGroupRev1.setDescription('A collection of objects related to Port Channel Interface parameters.') portChannelProtocolGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 285, 2, 2, 3)).setObjects(("CISCO-PORT-CHANNEL-MIB", "portChannelProtocolEnable"), ("CISCO-PORT-CHANNEL-MIB", "portChannelGrpIfAutoCreation"), ("CISCO-PORT-CHANNEL-MIB", "portChannelExtChannelGrpMode"), ("CISCO-PORT-CHANNEL-MIB", "portChannelExtAutoCreated"), ("CISCO-PORT-CHANNEL-MIB", "portChannelExtPersistent"), ("CISCO-PORT-CHANNEL-MIB", "portChannelExtOperChannelGrpMode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): portChannelProtocolGroup = portChannelProtocolGroup.setStatus('current') if mibBuilder.loadTexts: portChannelProtocolGroup.setDescription('A collection of objects related to Port Channel Protocol mamagement.') mibBuilder.exportSymbols("CISCO-PORT-CHANNEL-MIB", portChannelExtTable=portChannelExtTable, portChannelMIBCompliance1=portChannelMIBCompliance1, portChannelMIBGroups=portChannelMIBGroups, portChannelGroup=portChannelGroup, portChannelLastActionTime=portChannelLastActionTime, portChannelNotification=portChannelNotification, portChannelGrpIfExtEntry=portChannelGrpIfExtEntry, portChannelMIBConformance=portChannelMIBConformance, portChannelMIBCompliance=portChannelMIBCompliance, portChannelMIBCompliance2=portChannelMIBCompliance2, portChannelProtocolGroup=portChannelProtocolGroup, portChannelIndex=portChannelIndex, portChannelNotifications=portChannelNotifications, portChannelMemberList=portChannelMemberList, portChannelCreationTime=portChannelCreationTime, portChannelTable=portChannelTable, portChannelExtOperChannelGrpMode=portChannelExtOperChannelGrpMode, portChannelGrpIfExtTable=portChannelGrpIfExtTable, PortChannelGroupMode=PortChannelGroupMode, portChannelExtEntry=portChannelExtEntry, portChannelMIBCompliance3=portChannelMIBCompliance3, portChannelProtocolEnable=portChannelProtocolEnable, portChannelGroupRev1=portChannelGroupRev1, portChannelAdminChannelMode=portChannelAdminChannelMode, PYSNMP_MODULE_ID=ciscoPortChannelMIB, portChannelMemberOperStatus=portChannelMemberOperStatus, portChannelMIBCompliances=portChannelMIBCompliances, ciscoPortChannelMIB=ciscoPortChannelMIB, portChannelAddType=portChannelAddType, portChannelExtPersistent=portChannelExtPersistent, portChannelOperChannelMode=portChannelOperChannelMode, portChannelIfIndex=portChannelIfIndex, ciscoPortChannelObjects=ciscoPortChannelObjects, portChannelLastActionStatusCause=portChannelLastActionStatusCause, portChannelStatistics=portChannelStatistics, portChannelConfig=portChannelConfig, portChannelEntry=portChannelEntry, portChannelRowStatus=portChannelRowStatus, PortChannelMode=PortChannelMode, portChannelLastActionStatus=portChannelLastActionStatus, portChannelGrpIfAutoCreation=portChannelGrpIfAutoCreation, portChannelExtAutoCreated=portChannelExtAutoCreated, portChannelExtChannelGrpMode=portChannelExtChannelGrpMode)
if __name__ == '__main__': na = int(input()) a = list(map(int,input().split())) nb = int(input()) b = list(map(int, input().split())) if len(a) == na and len(b) == nb: set_a = set(a) set_b = set(b) symmetric_diff = list(set_a.symmetric_difference(set_b)) symmetric_diff.sort() for num in symmetric_diff: print(num) else: print('Number of values entered are not equal to total values to be entered!')
"""Configurations for the RC car""" PICAMERA_RESOLUTION_WIDTH = 640 PICAMERA_RESOLUTION_HEIGHT = 480 PICAMERA_RESOLUTION = (PICAMERA_RESOLUTION_WIDTH, PICAMERA_RESOLUTION_HEIGHT) PICAMERA_FRAMERATE = 60 PICAMERA_WARM_UP_TIME = 2 BACK_MOTOR_DATA_ONE = 17 BACK_MOTOR_DATA_TWO = 27 BACK_MOTOR_ENABLE_PIN = 22 FRONT_MOTOR_DATA_ONE = 19 FRONT_MOTOR_DATA_TWO = 26 PWM_FREQUENCY = 1000 INITIAL_PWM_DUTY_CYCLE = 100 CLASSIFICATION_LABELS = ['forward', 'reverse', 'left', 'right', 'idle'] CLASSIFICATION_LABELS_AND_VALUES = { 'forward': [1, 0, 0, 0, 0], 'reverse': [0, 1, 0, 0, 0], 'left': [0, 0, 1, 0, 0], 'right': [0, 0, 0, 1, 0], 'idle': [0, 0, 0, 0, 1] } IMAGE_DIMENSIONS = (75, 75) LAMBDA = 0.0 HIDDEN_LAYER_SIZE = 50
def tune(scale, acc_rate): """ tune: bool Flag for tuning. Defaults to True. tune_interval: int The frequency of tuning. Defaults to 100 iterations. Module from pymc3 Tunes the scaling parameter for the proposal distribution according to the acceptance rate over the last tune_interval: Rate Variance adaptation ---- ------------------- <0.001 x 0.1 <0.05 x 0.5 <0.2 x 0.9 >0.5 x 1.1 >0.75 x 2 >0.95 x 10 """ if acc_rate < 0.001: # reduce by 90 percent return scale * 0.1 elif acc_rate < 0.05: # reduce by 50 percent return scale * 0.5 elif acc_rate < 0.2: # reduce by ten percent return scale * 0.9 elif acc_rate > 0.95: # increase by factor of ten return scale * 10.0 elif acc_rate > 0.75: # increase by double return scale * 2.0 elif acc_rate > 0.5: # increase by ten percent return scale * 1.1 return scale if not 0: print('h') print(not 0)
__author__ = "Dylan Hamel" __version__ = "0.1" __email__ = "dylan.hamel@protonmail.com" __status__ = "Prototype"
budget = float(input()) season = input() budget_spent = 0 destination = "" place = "" if budget <= 100: if season == "summer": budget_spent = budget * 0.30 destination = "Bulgaria" place = "Camp" else: budget_spent = budget * 0.70 destination = "Bulgaria" place = "Hotel" elif budget <= 1000: if season == "summer": budget_spent = budget * 0.40 destination = "Balkans" place = "Camp" else: budget_spent = budget * 0.80 destination = "Balkans" place = "Hotel" else: budget_spent = budget * 0.90 destination = "Europe" place = "Hotel" print(f"Somewhere in {destination}") print(f"{place} - {budget_spent:.2f}")
"""ๆ–‡ๅญ—ๅˆ—ๅŸบ็คŽ ๆ•ฐๅ€คๆ–‡ๅญ—้–ข้€ฃใฎๅˆคๅฎšใƒกใ‚ฝใƒƒใƒ‰ ๆ•ฐๅ€คๆ–‡ๅญ—ใงใ‚ใ‚‹ใ‹ใ‚’ๅˆคๅฎšใ™ใ‚‹ isnumeric [่ชฌๆ˜Žใƒšใƒผใ‚ธ] https://tech.nkhn37.net/python-isxxxxx/#_isnumeric """ print('=== isnumeric ===') print('ไธ€ไธ‡ไบ”ๅƒ'.isnumeric()) print('0b0101'.isnumeric())
def ma_methode(x = 0, y = 0): print(x,y) a = 1 b = 2 ma_methode() ma_methode(a) ma_methode(a,b) y = 10; ma_methode(y) ma_methode(y = 10)
class TestSettings(object): ETCD_PREFIX = '/config/etcd_settings' ETCD_ENV = 'test' ETCD_HOST = 'etcd' ETCD_PORT = 2379 ETCD_USERNAME = 'test' ETCD_PASSWORD = 'test' ETCD_DETAILS = dict( host='etcd', port=2379, prefix='/config/etcd_settings', username='test', password='test' ) settings = TestSettings()
def length_of_longest_substring(s): l, r, max_len = 0, 0, 0 while r < len(s): substring = s[l:r + 1] max_len = max(max_len, len(substring)) if r + 1 < len(s) and s[r + 1] in substring: l += 1 else: r += 1 return max_len def length_of_longest_substring_optimized(s): used = {} max_length = start = 0 for i, c in enumerate(s): if c in used and start <= used[c]: start = used[c] + 1 else: max_length = max(max_length, i - start + 1) used[c] = i return max_length # Test cases: print(length_of_longest_substring_optimized('abcabcbb') == 3) print(length_of_longest_substring('bbbbb') == 1) print(length_of_longest_substring('pwwkew') == 3)
# ------------------------------ # 340. Longest Substring with At Most K Distinct Characters # # Description: # Given a string, find the length of the longest substring T that contains at most k distinct characters. # For example, Given s = โ€œecebaโ€ and k = 2, # T is "ece" which its length is 3. # # Version: 1.0 # 11/07/17 by Jianfa # ------------------------------ class Solution(object): def lengthOfLongestSubstringKDistinct(self, s, k): """ :type s: str :type k: int :rtype: int """ char_dict = {} lowest = 0 res = 0 for i, char in enumerate(s): char_dict[char] = i if len(char_dict) > k: lowest = min(char_dict.values()) del char_dict[s[lowest]] lowest += 1 res = max(i - lowest + 1, res) return res if __name__ == "__main__": test = Solution() s = "eceba" k = 2 print(test.lengthOfLongestSubstringKDistinct(s, k)) # ------------------------------ # Summary: # Use hash table to serve as a sliding window. # The idea is from the discuss section. # Because the values in d represents the rightmost location of each character in the sliding window, in order to # find the longest substring T, we need to locate the smallest location, and remove it from the dictionary, and then record the return value.
def aoc(data): total = 0 min, max = data.split("-") for x in [str(x) for x in range(int(min), int(max))]: inc = True double = False for i, d in enumerate(x[1:]): if d < x[i]: inc = False break for i, d in enumerate(x): if d != (" " + x)[i] and d == (x + " ")[i + 1] and d != (x + " ")[i + 2]: double = True if double and inc: total += 1 return total
def swap_case(s): a="" for i in range(len(s)): if s[i].islower(): a=a+s[i].upper() else: a=a+s[i].lower() return a
"""lista = [] for i in range(5): valor = int(input('Digite um valor: ')) if i == 0 or valor > lista[-1]: lista.append(valor) print('Valor adicionado no final da lista...') else: posicao = 0 while posicao < len(lista): if valor <= lista[posicao]: lista.insert(posicao, valor) print(f"Valor adicionado na posiรงรฃo {posicao} da lista...") break posicao += 1 print('-=' * 30) print(f'Os valores digitados em ordem foram {lista}.')""" valores = [] j = posicao = 0 for i in range(5): valor = int(input("Digite um valor: ").strip()) if i == 0: valores.append(valor) print("Valor adicionado no final da lista...") else: for j in range(len(valores)): posicao = 0 if valor <= valores[j]: if valores[(len(valores) - 1)] == valor: valores.append(valor) print("Valor adicionado no final da lista...") break else: valores.insert(j, valor) print(f"Valor adicionado na posiรงรฃo {j}...") break elif valor > valores[j]: if len(valores) == 1: valores.append(valor) print("Valor adicionado no final da lista...") break else: for r in range(len(valores)): if valor > valores[r]: posicao = r + 1 if (len(valores)) == posicao: valores.append(valor) print("Valor adicionado no final da lista...") break else: valores.insert(posicao, valor) print(f"Valor adicionado na posiรงรฃo {posicao}...") break print("\n", "-="*30, f"\nVocรช digitou, em ordem crescente, os valores: {valores}.")
expected_output = { "backbone_fast": False, "bpdu_filter": False, "bpdu_guard": False, "bridge_assurance": True, "configured_pathcost": {"method": "short"}, "etherchannel_misconfig_guard": True, "extended_system_id": True, "loop_guard": False, "mode": { "rapid_pvst": { "VLAN0001": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN0115": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0116": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0118": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0119": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0121": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0180": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0501": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0502": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0503": { "blocking": 0, "forwarding": 3, "learning": 0, "listening": 0, "stp_active": 3, }, "VLAN0506": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0508": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0509": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0510": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0511": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0512": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0513": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0514": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0515": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0516": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0517": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0518": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0521": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0522": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0540": { "blocking": 0, "forwarding": 3, "learning": 0, "listening": 0, "stp_active": 3, }, "VLAN0601": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0602": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0603": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN0604": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0606": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN0701": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0801": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0802": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0803": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0804": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0805": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0806": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN0916": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1111": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1112": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1113": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1114": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1115": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1116": { "blocking": 0, "forwarding": 2, "learning": 0, "listening": 0, "stp_active": 2, }, "VLAN1125": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN1506": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN1509": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, "VLAN1601": { "blocking": 0, "forwarding": 1, "learning": 0, "listening": 0, "stp_active": 1, }, } }, "portfast_default": False, "pvst_simulation": True, "pvst_simulation_status": "inactive", "root_bridge_for": "VLAN0001, VLAN0115-VLAN0116, VLAN0118-VLAN0119, VLAN0121, VLAN0180, VLAN0501-VLAN0503, VLAN0506, VLAN0508-VLAN0518, VLAN0521-VLAN0522, VLAN0540, VLAN0601-VLAN0604, VLAN0606, VLAN0701, VLAN0801-VLAN0806, VLAN1111-VLAN1116, VLAN1506, VLAN1509, VLAN1601", "total_statistics": { "blockings": 0, "forwardings": 62, "learnings": 0, "listenings": 0, "num_of_vlans": 48, "stp_actives": 62, }, "uplink_fast": False, }
# -*- coding: utf-8 -*- # # michael a.g. aรฏvรกzis # orthologue # (c) 1998-2021 all rights reserved # class MixedComments: """ The mixed commenting strategy: both a block marker pair and an individual line marker """ # implemented interface def commentBlock(self, lines): """ Create a comment block out of the given {lines} """ # build the leader leader = self.leader + self.commentMarker # place the start comment block marker yield self.leader + self.startBlock # iterate over the {lines} for line in lines: # and render each one yield leader + ' ' + line # place the end comment block marker yield self.leader + ' ' + self.startBlock # all done return def commentLine(self, line): """ Mark {line} as a comment """ # build the leader leader = self.leader + self.commentMarker # if the line is non-empty if line: # mark it return leader + ' ' + line # otherwise, just return the comment characters return leader # private data endBlock = None startBlock = None commentMarker = None # end of file
class ComboBoxData(RibbonItemData): """ This class contains information necessary to construct a combo box in the Ribbon. ComboBoxData(name: str) """ @staticmethod def __new__(self, name): """ __new__(cls: type,name: str) """ pass Image = property(lambda self: object(), lambda self, v: None, lambda self: None) """The image shown on the ComboBox. Get: Image(self: ComboBoxData) -> ImageSource Set: Image(self: ComboBoxData)=value """
# # @lc app=leetcode.cn id=669 lang=python3 # # [669] ไฟฎๅ‰ชไบŒๅ‰ๆœ็ดขๆ ‘ # class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # ้€’ๅฝ’่ฐƒ็”จ # ๅˆ†ๆƒ…ๅ†ต่ฎจ่ฎบๆ น่Š‚็‚นๅ€ผไธŽๅŒบ้—ด[L,R]็š„ๅ…ณ็ณป def trimBST(self, root: TreeNode, L: int, R: int) -> TreeNode: try: if root is None: return None val = root.val # ๅช่€ƒ่™‘ๅณๅญๆ ‘ if val < L: return self.trimBST(root.right, L, R) # ๆ น่Š‚็‚นๅ’Œๅณๅญๆ ‘ elif val == L: root.left = None root.right = self.trimBST(root.right, L, R) return root # ๅชๅทฆๅญๆ ‘ elif val > R: return self.trimBST(root.left, L, R) # ๆ น่Š‚็‚นๅ’Œๅทฆๅญๆ ‘ elif val == R: root.right = None root.left = self.trimBST(root.left, L, R) return root else: root.right = self.trimBST(root.right, L, R) root.left = self.trimBST(root.left, L, R) return root except Exception as e: raise e
f = open('pierwsze.txt', 'w') for item in range(2,100+1): for number in range(2,item): if item % number == 0: break else: f.write(str(item)) f.write(" ") f.close()
def maximo (a, b, c): if a>b and a>c: return a elif b>a and b>c: return b elif c>b and c>a: return c else: return a x = int(input("primeiro numero")) y= int( input("Segundo numero")) z = int( input("terceiro numero")) w=maximo(x,y,z) print(w)
#Grace Kelly 07/03/2018 #Exercise 5 #Read iris data set #Print out four numerical values #Decimal places aligned #Space between columns with open("data/iris.csv") as f: for line in f: print(line.split(',') [:4])
# # PySNMP MIB module CISCOSB-rlIP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-rlIP-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:24:17 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, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint") switch001, = mibBuilder.importSymbols("CISCOSB-MIB", "switch001") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") InetAddressPrefixLength, InetAddressType, InetAddress, InetZoneIndex, InetVersion = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressPrefixLength", "InetAddressType", "InetAddress", "InetZoneIndex", "InetVersion") IpAddressStatusTC, IpAddressOriginTC = mibBuilder.importSymbols("IP-MIB", "IpAddressStatusTC", "IpAddressOriginTC") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") NotificationType, Counter32, IpAddress, mib_2, MibIdentifier, Counter64, Unsigned32, zeroDotZero, TimeTicks, ModuleIdentity, ObjectIdentity, iso, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter32", "IpAddress", "mib-2", "MibIdentifier", "Counter64", "Unsigned32", "zeroDotZero", "TimeTicks", "ModuleIdentity", "ObjectIdentity", "iso", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Integer32") TestAndIncr, TimeStamp, DisplayString, RowStatus, RowPointer, PhysAddress, TruthValue, TextualConvention, StorageType = mibBuilder.importSymbols("SNMPv2-TC", "TestAndIncr", "TimeStamp", "DisplayString", "RowStatus", "RowPointer", "PhysAddress", "TruthValue", "TextualConvention", "StorageType") rlIp = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250)) rlIp.setRevisions(('2013-06-16 12:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlIp.setRevisionsDescriptions(('Initial version of this MIB.',)) if mibBuilder.loadTexts: rlIp.setLastUpdated('201306161200Z') if mibBuilder.loadTexts: rlIp.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: rlIp.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>') if mibBuilder.loadTexts: rlIp.setDescription('The private MIB module definition for Auto Configured IPv6 Address representation.') class RlIpAddressOriginTC(TextualConvention, Integer32): description = 'The origin of the address. following are same as ipAddressOriginTC in standard MIB: manual(2) indicates that the address was manually configured to a specified address, e.g., by user configuration. dhcp(4) indicates an address that was assigned to this system by a DHCP server. linklayer(5) indicates an address created by IPv6 stateless auto-configuration. random(6) indicates an address chosen by the system at random, e.g., an IPv4 address within 169.254/16, or an RFC 3041 privacy address. following are additional to standard MIB: autoConfig(7) indicates that the address was auto configured configured to a specified address, e.g., not by user configuration. eui64(8) indicates that the address was partially configured configured to a specified address, e.g., address suffix is based on MAC address with EUI-64 representation. tunnelIsatap(9) indicates that the address an ISATATP tunnel representation. tunnelIsatap(10) indicates that the address an 6to4 tunnel representation. tunnelIsatap(11) indicates that the address was partially configured configured to a specified address, e.g., address prefix is preconfigured. ' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 6, 7, 8, 9, 10, 11)) namedValues = NamedValues(("other", 1), ("manual", 2), ("dhcp", 4), ("linklayer", 5), ("random", 6), ("autoConfig", 7), ("eui64", 8), ("tunnelIsatap", 9), ("tunnel6to4", 10), ("generalPrefix", 11)) rlIpAddressTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1), ) if mibBuilder.loadTexts: rlIpAddressTable.setStatus('current') if mibBuilder.loadTexts: rlIpAddressTable.setDescription("This table contains addressing information relevant to the entity's interfaces. in addition to ipAddressTable defined in standard MIB a represenattion of IPv6 addresses based on additionl address origin such as EUI-64, general prefix etc. In this case the address information is partial address information. Together with the address origin and the general prefix (when needed) user can construct full address information. The index (key) for this table includes this information additionally to the address.") rlIpAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1), ).setIndexNames((0, "CISCOSB-rlIP-MIB", "rlIpAddressAddrType"), (0, "CISCOSB-rlIP-MIB", "rlIpAddressAddr"), (0, "CISCOSB-rlIP-MIB", "rlIpAddressOrigin"), (0, "CISCOSB-rlIP-MIB", "rlIpAddressGeneralPrefixName")) if mibBuilder.loadTexts: rlIpAddressEntry.setStatus('current') if mibBuilder.loadTexts: rlIpAddressEntry.setDescription('An address mapping for a particular interface.') rlIpAddressAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 1), InetAddressType()) if mibBuilder.loadTexts: rlIpAddressAddrType.setStatus('current') if mibBuilder.loadTexts: rlIpAddressAddrType.setDescription('The address type of rlIpAddressAddr.') rlIpAddressAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 2), InetAddress()) if mibBuilder.loadTexts: rlIpAddressAddr.setStatus('current') if mibBuilder.loadTexts: rlIpAddressAddr.setDescription("The IP address to which this entry's addressing information pertains. The address type of this object is specified in rlIpAddressAddrType. In case of auto-configure address such as eui-64, general-prefix and others it contains the partial address before appropriate manipulation. Implementors need to be aware that if the size of rlIpAddressAddr exceeds 116 octets, then OIDS of instances of columns in this row will have more than 128 sub-identifiers and cannot be accessed using SNMPv1, SNMPv2c, or SNMPv3.") rlIpAddressOrigin = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 3), RlIpAddressOriginTC()) if mibBuilder.loadTexts: rlIpAddressOrigin.setStatus('current') if mibBuilder.loadTexts: rlIpAddressOrigin.setDescription('The origin of the address.') rlIpAddressGeneralPrefixName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 4), DisplayString()) if mibBuilder.loadTexts: rlIpAddressGeneralPrefixName.setStatus('current') if mibBuilder.loadTexts: rlIpAddressGeneralPrefixName.setDescription('The name assigned to the prefix.') rlIpAddressIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 5), InterfaceIndex()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlIpAddressIfIndex.setStatus('current') if mibBuilder.loadTexts: rlIpAddressIfIndex.setDescription("The index value that uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of the IF-MIB's ifIndex.") rlIpAddressExtdType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unicast", 1), ("anycast", 2), ("broadcast", 3), ("multicast", 4))).clone('unicast')).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlIpAddressExtdType.setStatus('current') if mibBuilder.loadTexts: rlIpAddressExtdType.setDescription('Extend standard field ipAddressType to multicast') rlIpAddressPrefix = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 7), RowPointer().clone((0, 0))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpAddressPrefix.setStatus('current') if mibBuilder.loadTexts: rlIpAddressPrefix.setDescription('A pointer to the row in the prefix table to which this address belongs. May be { 0 0 } if there is no such row.') rlIpAddressStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 8), IpAddressStatusTC().clone('preferred')).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlIpAddressStatus.setStatus('current') if mibBuilder.loadTexts: rlIpAddressStatus.setDescription('The status of the address, describing if the address can be used for communication. In the absence of other information, an IPv4 address is always preferred(1).') rlIpAddressCreated = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 9), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpAddressCreated.setStatus('current') if mibBuilder.loadTexts: rlIpAddressCreated.setDescription('The value of sysUpTime at the time this entry was created. If this entry was created prior to the last re- initialization of the local network management subsystem, then this object contains a zero value.') rlIpAddressLastChanged = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 10), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpAddressLastChanged.setStatus('current') if mibBuilder.loadTexts: rlIpAddressLastChanged.setDescription('The value of sysUpTime at the time this entry was last updated. If this entry was updated prior to the last re- initialization of the local network management subsystem, then this object contains a zero value.') rlIpAddressRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlIpAddressRowStatus.setStatus('current') if mibBuilder.loadTexts: rlIpAddressRowStatus.setDescription('The status of this conceptual row. The RowStatus TC requires that this DESCRIPTION clause states under which circumstances other objects in this row can be modified. The value of this object has no effect on whether other objects in this conceptual row can be modified. A conceptual row can not be made active until the rlIpAddressIfIndex has been set to a valid index.') rlIpAddressStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 12), StorageType().clone('volatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlIpAddressStorageType.setStatus('current') if mibBuilder.loadTexts: rlIpAddressStorageType.setDescription("The storage type for this conceptual row. If this object has a value of 'permanent', then no other objects are required to be able to be modified.") rlIpAddressExtdPrefixLength = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 13), InetAddressPrefixLength().clone(64)).setMaxAccess("readcreate") if mibBuilder.loadTexts: rlIpAddressExtdPrefixLength.setStatus('current') if mibBuilder.loadTexts: rlIpAddressExtdPrefixLength.setDescription('The prefix length of this address.') rlIpAddressCompleteAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 250, 1, 1, 14), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlIpAddressCompleteAddr.setStatus('current') if mibBuilder.loadTexts: rlIpAddressCompleteAddr.setDescription("The Complete IP address to which this entry's addressing information pertains. In case of auto-configure address such as eui-64, general-prefix and others it contains the complete address after appropriate manipulation") mibBuilder.exportSymbols("CISCOSB-rlIP-MIB", rlIpAddressAddr=rlIpAddressAddr, rlIpAddressTable=rlIpAddressTable, RlIpAddressOriginTC=RlIpAddressOriginTC, rlIpAddressEntry=rlIpAddressEntry, rlIpAddressOrigin=rlIpAddressOrigin, rlIpAddressCompleteAddr=rlIpAddressCompleteAddr, rlIpAddressCreated=rlIpAddressCreated, rlIpAddressExtdType=rlIpAddressExtdType, PYSNMP_MODULE_ID=rlIp, rlIpAddressAddrType=rlIpAddressAddrType, rlIpAddressPrefix=rlIpAddressPrefix, rlIpAddressRowStatus=rlIpAddressRowStatus, rlIpAddressIfIndex=rlIpAddressIfIndex, rlIpAddressExtdPrefixLength=rlIpAddressExtdPrefixLength, rlIpAddressStatus=rlIpAddressStatus, rlIp=rlIp, rlIpAddressStorageType=rlIpAddressStorageType, rlIpAddressGeneralPrefixName=rlIpAddressGeneralPrefixName, rlIpAddressLastChanged=rlIpAddressLastChanged)
def run(): inicial = int(input('ยฟCuรกntas porciones de pizza ordenarรกs? ')) print('El repartidor de pizza llegรณ. Te trajรณ {} porciones de pizza.'.format(inicial)) consumidas = int(input('ยฟCuรกntas porciones de pizza han comido? ')) return print("Aรบn quedan {} porciones de pizza.".format(inicial - consumidas)) if __name__ == '__main__': run()
class Solution: def isPalindrome(self, x: int) -> bool: if x < 0: return False digits = [] while x: digits.append(x % 10) x = int(x / 10) return digits == list(reversed(digits))
a = float(input()) b = float(input()) c = float(input()) d = float(input()) e = float(input()) f = float(input()) if a == 0 and b == 0 and c == 0 and d == 0 and e == 0 and f == 0: print(5) elif a * d == b * c and a * f != c * e: print(0) elif a == 0 and b == 0 and e != 0: print(0) elif c == 0 and d == 0 and f != 0: print(0) elif a == 0 and c == 0 and b * f != d * e: print(0) elif b == 0 and d == 0 and a * f != c * e: print(0) elif a * d == b * c and a * f == c * e: if b == 0 and d == 0: if a != 0 and c != 0: print(3, e / a) elif a == 0: if e == 0: print(3, f / c) elif c == 0: if f == 0: print(3, e / a) elif a == 0 and c == 0: if b != 0: print(4, e / b) elif d != 0: print(4, f / d) elif b != 0: print(1, -a / b, e / b) elif d != 0: print(1, -c / d, f / d) else: x = (e * d - b * f) / (a * d - b * c) y = (a * f - e * c) / (a * d - b * c) print(2, x, y)
""" Copyright (c) 2021 Anshul Patel This code is licensed under MIT license (see LICENSE.MD for details) @author: cheapBuy """
class Solution: def sumOfDistancesInTree(self, n: int, edges: List[List[int]]) -> List[int]: graph = collections.defaultdict(set) for u, v in edges: graph[u].add(v) graph[v].add(u) count = [1 for _ in range(n)] ans = [0 for _ in range(n)] def postorder(node = 0, parent = None): for child in graph[node]: if child == parent: continue postorder(child, node) count[node] += count[child] ans[node] += ans[child] + count[child] def inorder(node = 0, parent = None): for child in graph[node]: if child == parent: continue ans[child] = ans[node] - count[child] + n - count[child] inorder(child, node) postorder() inorder() return ans
# # PySNMP MIB module RFC1215-MIB (http://pysnmp.sf.net) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( ifIndex, ) = mibBuilder.importSymbols("IF-MIB", "ifIndex") ( egpNeighAddr, ) = mibBuilder.importSymbols("RFC1213-MIB", "egpNeighAddr") ( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, mib_2, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "mib-2", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") ( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") snmp = MibIdentifier((1, 3, 6, 1, 2, 1, 11)) coldStart = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,0)).setObjects(*()) warmStart = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,1)).setObjects(*()) linkDown = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,2)).setObjects(*(("RFC1215-MIB", "ifIndex"),)) linkUp = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,3)).setObjects(*(("RFC1215-MIB", "ifIndex"),)) authenticationFailure = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,4)).setObjects(*()) egpNeighborLoss = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,5)).setObjects(*(("RFC1215-MIB", "egpNeighAddr"),)) mibBuilder.exportSymbols("RFC1215-MIB", linkDown=linkDown, authenticationFailure=authenticationFailure, warmStart=warmStart, egpNeighborLoss=egpNeighborLoss, snmp=snmp, linkUp=linkUp, coldStart=coldStart)
# Deleting tuples my_tuple = ('p', 'r', 'o', 'g', 'r', 'a', 'm', 'i', 'z') # can't delete items # TypeError: 'tuple' object doesn't support item deletion # del my_tuple[3] # Must delete an entire tuple del my_tuple # NameError: name 'my_tuple' is not defined print(my_tuple)
class Solution: def largestSumAfterKNegations(self, A: List[int], K: int) -> int: heapq.heapify(A) for _ in range(K): val = heapq.heappop(A) heapq.heappush(A, -val) return sum(A)
# Category description for the widget registry NAME = "SRW ESRF Extension" DESCRIPTION = "Widgets for SRW" BACKGROUND = "#969fde" ICON = "icons/esrf2.png" PRIORITY = 204
price = 1000000 has_good_credit = True if has_good_credit: down_payment = 0.1 * price else: down_paymet = 0.2 * price print(f"Down Payment: ยฃ{down_payment}")
San_Francisco_polygon = [[37.837174338616975,-122.48725891113281],[37.83364941345965,-122.48485565185547],[37.83093781796035,-122.4814224243164],[37.82415839321614,-122.48004913330078],[37.8203616433087,-122.47970581054688],[37.81059767530207,-122.47798919677734],[37.806122091729485,-122.47627258300781],[37.79215110146845,-122.48039245605469],[37.78726741375342,-122.48519897460938],[37.78618210598413,-122.49927520751953],[37.78645343442073,-122.50614166259766],[37.779127216982424,-122.51232147216797],[37.772614414082014,-122.51163482666016],[37.76121562849642,-122.51197814941406],[37.75171529845649,-122.51060485839844],[37.74329970164702,-122.50957489013672],[37.735969208590504,-122.50717163085938],[37.73081027834234,-122.50717163085938],[37.72293542866175,-122.50682830810547],[37.715331331027045,-122.50442504882812],[37.714244967649265,-122.49893188476562],[37.71940505182832,-122.50030517578125],[37.724564776604836,-122.5030517578125],[37.729724141962045,-122.50167846679688],[37.7324394530424,-122.49549865722656],[37.72918106779786,-122.49378204345703],[37.729724141962045,-122.48828887939453],[37.72782336496339,-122.4807357788086],[37.73271097867418,-122.37945556640625],[37.74520008134973,-122.37533569335938],[37.74655746554895,-122.39112854003906],[37.75008654795525,-122.3873519897461],[37.754972691904946,-122.38391876220703],[37.76148704857093,-122.38597869873047],[37.769629187677005,-122.3876953125],[37.78265474565738,-122.38872528076172],[37.78781006166096,-122.3880386352539],[37.79594930209237,-122.37911224365234],[37.804358908571395,-122.36984252929688],[37.812767557570204,-122.3605728149414],[37.817649559511125,-122.35130310058594],[37.82009043941308,-122.332763671875],[37.823344820392535,-122.30632781982422],[37.8271414168374,-122.30701446533203],[37.824700770115996,-122.31765747070312],[37.82253123860035,-122.33139038085938],[37.8203616433087,-122.34615325927734],[37.81792077237497,-122.35576629638672],[37.81168262440736,-122.3653793334961],[37.803002585189645,-122.37396240234375],[37.790523241426946,-122.3880386352539],[37.79594930209237,-122.39490509033203],[37.80273131752431,-122.39936828613281],[37.80815648152641,-122.40726470947266],[37.80734273233311,-122.42305755615234],[37.807071480609274,-122.43267059326172],[37.80571520704469,-122.44194030761719],[37.80463017025873,-122.45189666748047],[37.80463017025873,-122.464599609375],[37.807071480609274,-122.47421264648438],[37.815208598896255,-122.47695922851562],[37.82768377181359,-122.47798919677734],[37.835276322922695,-122.48004913330078],[37.837174338616975,-122.48725891113281]] Boston_polygon = [[42.32453946380133,-71.13029479980469],[42.32758538845383,-71.0489273071289],[42.330631165629846,-71.03588104248047],[42.33316920061984,-71.02180480957031],[42.339513840022754,-71.02455139160156],[42.3397676122846,-71.04412078857422],[42.34611158596906,-71.02558135986328],[42.356514317057886,-71.02317810058594],[42.348648996207956,-71.00669860839844],[42.35829022102701,-71.00360870361328],[42.353469793490646,-70.99090576171875],[42.36057345238455,-70.98918914794922],[42.363110278811256,-71.00223541259766],[42.37883631647602,-70.99983215332031],[42.37756823359386,-71.00738525390625],[42.37224200585402,-71.01631164550781],[42.37680737157286,-71.02008819580078],[42.381879610913195,-71.015625],[42.38999434161929,-71.00704193115234],[42.40444610741266,-71.00395202636719],[42.40444610741266,-71.13029479980469],[42.32453946380133,-71.13029479980469]] Pittsburgh_polygon = [[40.603526799885884,-80.09445190429688],[40.564937785967224,-80.13427734375],[40.50126945841646,-80.14801025390625],[40.42290582797254,-80.12054443359375],[40.3549167507906,-80.1287841796875],[40.330842639095756,-80.14389038085938],[40.31199603742692,-80.16311645507812],[40.319325896602095,-79.9310302734375],[40.365381076021734,-79.80056762695312],[40.57119697629581,-79.7991943359375],[40.603526799885884,-80.09445190429688]] Greenville_polygon = [[34.96531080784271,-82.44483947753906],[34.946176590087454,-82.44140625],[34.92422301690582,-82.45994567871094],[34.89888467073924,-82.46818542480469],[34.871285134570016,-82.47367858886719],[34.837477162415986,-82.452392578125],[34.83015027082022,-82.54096984863281],[34.820004267650454,-82.53822326660156],[34.829022998858306,-82.45101928710938],[34.8047829195724,-82.44071960449219],[34.79068657192738,-82.44552612304688],[34.770383597610255,-82.47573852539062],[34.76192255039478,-82.47024536132812],[34.784483415461345,-82.44415283203125],[34.7483830709853,-82.31849670410156],[34.71847552413778,-82.25944519042969],[34.72073307506407,-82.24845886230469],[34.75740963726007,-82.28141784667969],[34.77263973038464,-82.26699829101562],[34.83184114982865,-82.28965759277344],[34.86058077988933,-82.24845886230469],[34.86790496256872,-82.25601196289062],[34.839167890957015,-82.30133056640625],[34.86903170200862,-82.34458923339844],[34.96531080784271,-82.44483947753906]] Norfolk_polygon = [[37.00693943418586,-76.32339477539062],[36.98884240936997,-76.31034851074219],[36.982260605282676,-76.30348205566406],[36.96799807635307,-76.30210876464844],[36.95976847846004,-76.27738952636719],[36.953732874654285,-76.2725830078125],[36.94769679250732,-76.28700256347656],[36.95098926024786,-76.29661560058594],[36.95757376878687,-76.30348205566406],[36.95976847846004,-76.31584167480469],[36.9669008480318,-76.32820129394531],[36.90323455156814,-76.32888793945312],[36.91366629380721,-76.31721496582031],[36.90927415514871,-76.28631591796875],[36.89499795802219,-76.28974914550781],[36.901587303978474,-76.30348205566406],[36.90323455156814,-76.31515502929688],[36.874127942666334,-76.32888793945312],[36.8631414329529,-76.30828857421875],[36.849955535919875,-76.32682800292969],[36.856548768788954,-76.34056091308594],[36.82852360193767,-76.33094787597656],[36.820278951308744,-76.34536743164062],[36.81203341240741,-76.34124755859375],[36.83017242546416,-76.28974914550781],[36.79993834872292,-76.2835693359375],[36.80323719192363,-76.19155883789062],[36.84116367417466,-76.19499206542969],[36.82137828938333,-76.1407470703125],[36.82577548376294,-76.04873657226562],[36.84281222525469,-76.04736328125],[36.85160389745116,-76.14280700683594],[36.92739009701458,-76.16065979003906],[36.93726970584893,-76.22039794921875],[36.96799807635307,-76.27670288085938],[36.96854668458301,-76.29592895507812],[36.98390610968992,-76.29936218261719],[37.00693943418586,-76.32339477539062]]
class EmptyQueueError(Exception): pass class DualStructureError(Exception): pass class ConservativeVolumeError(Exception): pass class PmsFluxFacesError(Exception): pass
# -*- coding: utf-8 -*- # # michael a.g. aรฏvรกzis # orthologue # (c) 1998-2021 all rights reserved # class Leaf: """ Mix-in class that provides an implementation of the subset of the interface of {Node} that requires traversals of the expression graph rooted at leaf nodes. """ # interface @property def span(self): """ Traverse my subgraph and yield all its nodes """ # just myself yield self # and nothing else return # end of file
dias = int(input('Digite os dias: ')) * 60 * 60 * 24 horas = int(input('Digite as horas: ')) * 60 * 60 minutos = int(input('Digite os minutos: ')) * 60 segundos = int(input('Digite os segundos: ')) print ('O total dias em segundos: %d' % dias) print ('O total de horas em segundos: %d' % horas) print ('O total de minutos em segundos: %d' % minutos) print ('O total de segundos: %d' % segundos)
def apply_formatting_options(func): def wrapper(self, *args, **kwargs): type_config_dict = getattr(self, 'type_config_dict') supplied_key = args[0] supplied_value = args[1] anonymized_value = func(self, supplied_key, supplied_value) if type_config_dict.get('upper'): anonymized_value = anonymized_value.upper() if type_config_dict.get('lower'): anonymized_value = anonymized_value.lower() return anonymized_value return wrapper
# nlantau, 2021-02-01 a1 = [-1,5,10,20,28,3] a2 = [26,134,135,15,17] sample_output = [28,26] def smallestDifference_passed7outof10(a, b): a.sort() b.sort() res = list() for i in a: t = max(a) + max(b) for j in b: if abs(j-i) < t: t = abs(j-i) res.clear() res.append(i) res.append(j) return res def smallestDifference(a,b): a.sort() b.sort() idx_one = 0 idx_two = 0 smallest = float("inf") curr = float("inf") res = list() while idx_one < len(a) and idx_two < len(b): first = a[idx_one] second = b[idx_two] if first < second: curr = second - first idx_one += 1 elif second < first: curr = first - second idx_two += 1 else: return [first, second] if smallest > curr: smallest = curr res = [first, second] return res print(smallestDifference(a1,a2))
# coding: utf-8 """ av-website ~~~~~~~~ App deployable on GAE, configured and customised with Bootstrap, Flask. Copyright (c) 2015 by Tiberiu CORBU. License MIT, see LICENSE for more details. """ __version__ = '3.3.4'
if __name__ == "__main__": result = 1 for i in range(100): result *= i + 1 result = str(result) res = 0 for i in result: res += int(i) print("100! = ", res, "\n")
name = 'therm_PRF.dat' fin = open(name,'r') fout = open(name+'_upper','w') for line in fin: fout.write(line.upper())
mozilla = [ 'Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:2.0b4) Gecko/20100818', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070330', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.3) Gecko/20100401 Lightningquail/3.6.3', 'Mozilla/5.0 (X11; ; Linux i686; rv:1.9.2.20) Gecko/20110805', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101203 iPhone', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13; ) Gecko/20101203', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3) Gecko/20090305', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.0.9) Gecko/2009040821', 'Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.8) Gecko/2009032711', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009032803', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.7) Gecko/2009021910 MEGAUPLOAD 1.0', 'Mozilla/5.0 (Windows; U; BeOS; en-US; rv:1.9.0.7) Gecko/2009021910', 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.6) Gecko/2009020911', 'Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.0.6) Gecko/20080528', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009020409', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 (Debian-3.0.1-1)', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092816', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008090713', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko Fedora/1.9.0.2-1.fc9', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009091010', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072610', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Ubuntu/8.04 (hardy) (Linux Mint)', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-au; rv:1.9.0.1) Gecko/2008070206', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9) Gecko/2008052906', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050702', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8b) Gecko/20050217', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050217', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a6) Gecko/20050111', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8a5) Gecko/20041122', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040927', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a4) Gecko/20040927', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040817', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a1) Gecko/20040520', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8a1) Gecko/20040520', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1a2) Gecko/20060512', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071022', 'Mozilla/5.001 (X11; U; Linux i686; rv:1.8.1.6; de-ch) Gecko/25250101 (ubuntu-feisty)', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070531', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070508 (Debian-1.8.1.4-2ubuntu5)', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Mozilla/5.0 (Linux Mint)', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201 MEGAUPLOAD 1.0 (Ubuntu-feisty)', 'Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.3) Gecko/20070310', 'Mozilla/5.0 (X11; ; Linux i686; en-US; rv:1.8.1.3) Gecko', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070321', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Mozilla/4.8 [en] (Windows NT 5.1; U)', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; nl-NL; rv:1.8.1.3) Gecko/20080722', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.2pre) Gecko/20070223', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070208', 'Mozilla/5.0 (compatible; Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8.1.15) Gecko/20080620 Mozilla/4.0', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080313', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.12) Gecko/20080201', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.1.11) Gecko/20071127 Mozilla', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071213', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071206', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061205 Mozilla/5.0 (Debian-2.0.0.1+dfsg-2)', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.1) Gecko/20061204', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.1) Gecko/20061204', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 KHTML/3.5.5', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060912 pango-text', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060508', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.14eol) Gecko/20070505 (Debian-1.8.0.15~pre080614d-0etch1)', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060126', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051111', 'Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040429', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7b) Gecko/20040316', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7b) Gecko/20040421', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.9) Gecko/20050711', 'Mozilla/5.0 (X11; U; Linux x86_64; de-AT; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1', 'Mozilla/5.0 (X11; U; Linux i686; rv:1.7.8) Gecko/20061113 Debian/1.7.8-1sarge8', 'Mozilla/5.0 (X11; U; Linux i686; rv:1.7.8) Gecko/20060904 Debian/1.7.8-1sarge7.2.2', 'Mozilla/5.0 (X11; U; Linux i686; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1', 'Mozilla/5.0 (X11; U; Linux i686; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3', 'Mozilla/5.0 (X11; U; Linux i686; rv:1.7.8) Gecko/20050831 Debian/1.7.8-1sarge2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050921', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050831 Debian/1.7.8-1sarge2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050610', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Red Hat/1.7.8-1.1.3.1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.8) Gecko/20050511 (No IDN)', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.8) Gecko/20050511', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.7) Gecko/20050421', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050427 Red Hat/1.7.7-1.1.3.4', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050420 Debian/1.7.7-2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.7) Gecko/20050415', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.7) Gecko/20050414', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.7) Gecko/20050414', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.7) Gecko/20050414', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050319', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041221', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041221', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041013', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.6) Gecko/2009011913 Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041221', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.5) Gecko/20041217', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.7.5) Gecko/20041217', 'Mozilla/5.0 (Windows NT 5.1; U; pt-br; rv:1.7.5) Gecko/20041110', 'Mozilla/5.0 (Windows NT 5.1; U; es-es; rv:1.7.5) Gecko/20041110', 'Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.7.5) Gecko/20041110', 'Mozilla/5.0 (Windows NT 5.1; U; de; rv:1.7.5) Gecko/20041110', 'Mozilla/5.0 (OS/2; U; Warp 4.5; de-DE; rv:1.7.5) Gecko/20050523', 'Mozilla/5.0 (Macintosh; Intel Mac OS X; U; nb; rv:1.7.5) Gecko/20041110', 'Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.7.3) Gecko/20050130', 'Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040913', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Win98; fr; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; es-ES; rv:1.7.3) Gecko/20040910', 'Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.2) Gecko/20040804', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040906', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.2) Gecko/20040906', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.2) Gecko/20040810 Debian/1.7.2-2', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.2) Gecko/20040804', 'Mozilla/5.0 (X11; U; FreeBSD i386; ja-JP; rv:1.7.2) Gecko/20050330', 'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.2) Gecko/20040709', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.2) Gecko/20040803', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803', 'Mozilla/5.0 (Windows; U; Win 9x 4.90; de-AT; rv:1.7.2) Gecko/20040803', 'Mozilla/5.0 (Windows; ; Windows NT 5.1; rv:1.7.2) Gecko/20040804', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.13) Gecko/20060509', 'Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.7.13) Gecko/20060901', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060717 Debian/1.7.13-0.2ubuntu1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060427 Debian/1.7.13-0ubuntu05.04', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417', 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.7.13) Gecko/20060417', 'Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20061230', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.7.13) Gecko/20060414', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.13) Gecko/20060414', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414', 'Mozilla/4.0 (compatible; Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414; Windows NT 5.1)', 'Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.12) Gecko/20050929', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060216 Debian/1.7.12-1.1ubuntu2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060205 Debian/1.7.12-1.1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060202 Fedora/1.7.12-1.5.2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051203', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051013 Debian/1.7.12-1ubuntu1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050926', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Red Hat/1.7.12-1.1.3.2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20060205 Debian/1.7.12-1.1', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20050923 Fedora/1.7.12-1.5.1', 'Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.7.12) Gecko/20050929', 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2', 'Mozilla/5.0 (X11; U; AIX 5.3; en-US; rv:1.7.12) Gecko/20051025', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.12) Gecko/20050915', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.11) Gecko/20050802', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050729', 'Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.11) Gecko/20050728 (No IDN)', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Win95; de-AT; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Windows; U; Win 9x 4.90; de-AT; rv:1.7.11) Gecko/20050728', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr-FR; rv:1.7.11) Gecko/20050727', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050811 Fedora/1.7.10-1.2.1.legacy', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.10) Gecko/20050727', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.10) Gecko/20050722', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716', 'Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.1) Gecko/20040707', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.1) Gecko/20040707', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.1) Gecko/20040707', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707', 'Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.1) Gecko/20040707', 'Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.7.0.13) Gecko/20060901', 'Mozilla/5.0 (X11; U; SunOS sun4v; en-US; rv:1.7) Gecko/20060120', 'Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.7) Gecko/20040621', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20060629', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20060120', 'Mozilla/5.0 (X11; U; SunOS sun4u; de-DE; rv:1.7) Gecko/20070606', 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20060627', 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20051122', 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20051027', 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20050502', 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20041221', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040514', 'Mozilla/5.0 (X11; U; FreeBSD; i386; it-IT; rv:1.7) Gecko', 'Mozilla/5.0 (X11; U; FreeBSD; i386; en-US; rv:1.7) Gecko', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040616', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7) Gecko/20040803 Firefox/0.9.3', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040616', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040616', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030', 'Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.6) Gecko/20040115', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040115', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.6) Gecko/20040429', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030827', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030718', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030718', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5.1) Gecko/20031120', 'Mozilla/5.0 (X11; U; SunOS5.10 sun4u; ja-JP; rv:1.5) Gecko/20031022', 'Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030916', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030916', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.5) Gecko/20031007', 'Mozilla/5.0 (Windows; U; WinNT4.0; it-IT; rv:1.4b) Gecko/20030507', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4b) Gecko/20030507', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030427', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4a) Gecko/20030318', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4a) Gecko/20030401', 'Mozilla/5.0 (X11; U; IRIX64 IP35; en-US; rv:1.4.3) Gecko/20040909', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040220', 'Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.1) Gecko/20031114', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20040406', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1) Gecko/20031008', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041224', 'Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030828', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030827 Debian/1.4-3', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030818', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030723', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030908 Debian/1.4-4', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030812', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030624', 'Mozilla/5.0 (X11; U; Linux i586; de-AT; rv:1.4) Gecko/20030908 Debian/1.4-4', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030529', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.4) Gecko/20030624', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.4) Gecko/20030624', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030612', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030125', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20021213', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030204', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3b) Gecko/20030210', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021212', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.3a) Gecko/20021212', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.3a) Gecko/20021212', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021212', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3.1) Gecko/20030509', 'Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.3.1) Gecko', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3) Gecko/20030318', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030523', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030413', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030401', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030327 Debian/1.3-4', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030326', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030320', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3) Gecko/20030430 Debian/1.3-5', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3) Gecko/20030327 Debian/1.3-4', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.3) Gecko/20030321', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2a) Gecko/20020910', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20030711', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20021217', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20021212', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20021205', 'Mozilla/5.0 (X11; U; Linux i686;en-US; rv:1.2.1) Gecko/20030225', 'Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.2.1) Gecko/20030225', 'Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.2.1) Gecko/20021130', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030427', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030409 Debian/1.2.1-9woody2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030113', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021208 Debian/1.2.1-2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021203', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20021204', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20021130', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2.1) Gecko/20021204', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2) Gecko/20021203', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2) Gecko/20050223', 'Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.2) Gecko/20021203', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2) Gecko/20021126', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.1b) Gecko/20020721', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1a) Gecko/20020611', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a) Gecko/20020611', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1a) Gecko/20020611', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1a) Gecko/20020610', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1a) Gecko/20020611', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a) Gecko/20020611', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020925', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020909', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827', 'Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020927', 'Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020829', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020828', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020913 Debian/1.1-1', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021223', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc3) Gecko/20020529 Debian/1.0rc3-1', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc3) Gecko/20020523', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0rc3) Gecko/20020523', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020510', 'Mozilla/5.0 (X11; U; AIX 005A471A4C00; en-US; rv:1.0rc2) Gecko/20020514', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.0rc2) Gecko/20020510', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0rc2) Gecko/20020510', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.0rc2) Gecko/20020510', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc1) Gecko/20020417', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.0.2) Gecko/20030208', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021216', 'Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20021216', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021203', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021122 Debian/1.0.1-2', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021110', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020919', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020912', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020815', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020826', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.0) Gecko/20020611', 'Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020622 Debian/1.0.0-0.woody.1', 'Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20021004', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020612', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020605', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1', 'Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.0.0) Gecko/20020605', 'Mozilla/5.0 (Windows; U; WinNT4.0; fr-FR; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020509', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.0.0) Gecko/20020530', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020423', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020313', 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.9) Gecko/20020513', 'Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.9) Gecko/20020311', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204', 'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:0.9.8) Gecko/20020204', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:0.9.8) Gecko/20020204', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7) Gecko/20011221', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011202', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.5) Gecko/20011011', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.5) Gecko/20011011', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010923', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801', 'Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.3) Gecko/20010802', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010809', 'Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101' ]
n1 = int(input("Digite um nรบmero: ")) print("{} x {} = {}" .format(n1,1,n1*1)) print("{} x {} = {}" .format(n1,2,n1*2)) print("{} x {} = {}" .format(n1,3,n1*3)) print("{} x {} = {}" .format(n1,4,n1*4)) print("{} x {} = {}" .format(n1,5,n1*5)) print("{} x {} = {}" .format(n1,6,n1*6)) print("{} x {} = {}" .format(n1,7,n1*7)) print("{} x {} = {}" .format(n1,8,n1*8)) print("{} x {} = {}" .format(n1,9,n1*9)) print("{} x {} = {}" .format(n1,10,n1*10))
class TicTacToe: def __init__(self, n: int): """ Initialize your data structure here. """ self.col = [0] * n self.row = [0] * n self.n = n self.diag, self.anti = 0, 0 def move(self, row: int, col: int, player: int) -> int: """ Player {player} makes a move at ({row}, {col}). @param row The row of the board. @param col The column of the board. @param player The player, can be either 1 or 2. @return The current winning condition, can be either: 0: No one wins. 1: Player 1 wins. 2: Player 2 wins. """ if player == 1: c = 1 else: c = -1 self.col[col] += c self.row[row] += c if row == col: self.diag += c if row + col == self.n - 1: self.anti += c target = c * self.n if self.col[col] == target or self.row[row] == target or self.anti == target or self.diag == target: return player return 0 # Your TicTacToe object will be instantiated and called as such: # obj = TicTacToe(n) # param_1 = obj.move(row,col,player)