content
stringlengths
7
1.05M
class Solution: def toGoatLatin(self, S: str) -> str: W = S.split(" ") out = '' for i, s in enumerate(W): if s[0].lower() in ['a', 'e', 'i', 'o', 'u']: s = s + "ma" else: s = s[1:] + s[0] s = s + "ma" while(i>=0): s = s + 'a' i = i-1 out = out + s + " " return out[0:len(out)-1]
# Local function definitions; returning functions def make_adder(n): """Return a function that takes one argument K and returns K + N. """ def adder(k): return k + n return adder add_three = make_adder(3) print(add_three(4)) # 7 print(make_adder(3)(4)) # 7 # Lambda expressions ''' x = 10 square = x * x square = lambda x: x * x print(square(4)) '''
current_max = 0 # x <= 1 stack = [] queries = int(input().strip()) for _ in range(queries): query = input().strip().split() if query[0] == '1': val = int(query[1]) current_max = max(val, stack[-1][1]) if stack else val stack.append((val, current_max),) elif query[0] == '2': stack.pop() current_max = stack[-1][1] if stack else 0 elif query[0] == '3': print(current_max) # cat solution_2_input_1.txt | python3 solution_2.txt # cat solution_2_input_2.txt | python3 solution_2.txt
# sqlite header def sqliteTest(filePath, file): file.seek(0) header = file.read(13) return header == b'SQLite format' # bplist header def bplistTest(filePath, file): # result = filePath[-6:] == '.plist' # if result: file.seek(0) header = file.read(8) result = header == b'bplist00' return result def xmlTest(filePath, file): return filePath[-4:] == '.xml' def wazeLogTest(filePath, file): return filePath[-12:] == 'waze_log.txt' def checkAll(filePath, file): if sqliteTest(filePath, file) or bplistTest(filePath, file) or xmlTest(filePath, file) or wazeLogTest(filePath, file): return True return False
def calc(x, y): return x * y # Display a welcome message for the program. print("\nWelcome to the fiber optic calculator 3000!\n") # Get the company name from the user. prompt1 = "What is the company's name for the order?\n" # Get the number of feet of fiber optic to be installed from the user. prompt2 = "How many feet are they looking to buy?\n" # Set up variables price = 0.87 company_name = "" feet = "" # Check the input company_name bad_input = True while bad_input: company_name = str(input(prompt1)) if not company_name: print("\nYou didn't type anything.\n") else: bad_input = False # Check the input feet bad_input = True while bad_input: try: feet = float(input(prompt2)) bad_input = False except ValueError: print("\nYour input didn't seem right, try again.\n") # Multiply the total cost as the number of feet times $0.87. cost = calc(price, feet) # Display the calculated information and company name. print( f"\nThe company {company_name} wishes to buy {feet} feet of fiber optic cable. This will cost ${cost}.\n" )
class Casa: def __init__(self, paredes): self.__paredes = paredes def paredes(self): return self.__paredes def superficie_cristal(self): superficie = 0 for pared in self.paredes(): superficie += pared.superficie_cristal() return superficie
# Escreva um programa que pergunte a quantidade de Km percorridos por um carro alugado e # a quantidade de dias pelos quais ele foi alugado. # Calcule o preço a pagar, sabendo que o carro custa R$60 por dia e R$0,15 por Km rodado. d = int(input('Quantos dias alugados? ')) km = int(input('Quantos Km foram rodados? ')) p = 60 * d + 0.15 * km print('O total a pagar foi R$ {:.2f}'.format(p))
# -*- coding: utf-8 -*- """ Created on Fri Feb 11 09:20:53 2022 @author: Diesel soft server """
{ "targets": [ { "target_name": "test_napi_arguments", "sources": [ "test_napi_arguments.c" ] }, { "target_name": "test_napi_array", "sources": [ "test_napi_array.c" ] }, { "target_name": "test_napi_async", "sources": [ "test_napi_async.c" ] }, { "target_name": "test_napi_buffer", "sources": [ "test_napi_buffer.c" ] }, { "target_name": "test_napi_construct", "sources": [ "test_napi_construct.c" ] }, { "target_name": "test_napi_conversions", "sources": [ "test_napi_conversions.c" ] }, { "target_name": "test_napi_env_compare", "sources": [ "test_napi_env_compare.c" ] }, { "target_name": "test_napi_env_store", "sources": [ "test_napi_env_store.c" ] }, { "target_name": "test_napi_error_handling", "sources": [ "test_napi_error_handling.c" ] }, { "target_name": "test_napi_general", "sources": [ "test_napi_general.c" ] }, { "target_name": "test_napi_make_callback", "sources": [ "test_napi_make_callback.c" ] }, { "target_name": "test_napi_object_wrap", "sources": [ "test_napi_object_wrap.c" ] }, { "target_name": "test_napi_handle_scope", "sources": [ "test_napi_handle_scope.c" ] }, { "target_name": "test_napi_promise", "sources": [ "test_napi_promise.c" ] }, { "target_name": "test_napi_properties", "sources": [ "test_napi_properties.c" ] }, { "target_name": "test_napi_reference", "sources": [ "test_napi_reference.c" ] }, { "target_name": "test_napi_strictequal_and_instanceof", "sources": [ "test_napi_strictequal_and_instanceof.c" ] }, { "target_name": "test_napi_string", "sources": [ "test_napi_string.c" ] }, { "target_name": "test_napi_symbol", "sources": [ "test_napi_symbol.c" ] } ] }
""" 11-14 我先用非闭包解决一下 """ origin = 0 def go(step): new_pos = origin + step # origin = new_pos 这一步注释掉,就不会报错了 return origin print(go(2)) print(go(5)) print(go(11)) # UnboundLocalError: local variable 'origin' referenced before assignment # 如果函数内部使用某个变量,而这个变量没有定义,会往上一级寻找.这里为什么报错,origin 没有赋值? # 为什么下面不给 origin 赋值,就可以成功地从上一级得到变量? # 因为 Python 把出现在等号左边的 origin 当作局部变量. Python 认为你既然有局部变量, 就不会去上一级寻找这个origin变量. # 我们希望全局变量 origin 能够记住最新的坐标. origin = 0 def go(step): global origin # gloabal 关键字 new_pos = origin + step origin = new_pos return new_pos print(go(2)) print(go(5)) print(go(11))
#Binary search tree class #This module includes: #The Node class implementation to represent the nodes on the tree #The BST class Which will construct a tree from the Node class #The testing code #Node implemented for binary tree use class Node: def __init__(self, data): self.data = data self.left_child = None self.right_child = None #Insert a node into the tree recursively if need be def insert(self, data): if data < self.data: if self.left_child is None: self.left_child = Node(data) else: self.left_child.insert(data) else: if self.right_child is None: self.right_child = Node(data) else: self.right_child.insert(data) #Remove a node from the tree recursively #In the event of their being a left and right child node attached #to the node we're removing, we select the smallest smallest number #from the right childs tree and set that to be the node we just #removed and then attach other nodes to it def remove(self, data, parent_node=None): if data < self.data: if self.left_child is not None: self.left_child.remove(data, self) elif data > self.data: if self.right_child is not None: self.right_child.remove(data, self) else: if self.left_child and self.right_child: self.data = self.right_child.get_min() self.right_child.remove(self.data, self) elif parent_node.left_child == self: #Attach branch of tree to the parent node if self.left_child: temp_node = self.left_child else: temp_node = self.right_child parent_node.left_child = temp_node elif parent_node.right_child == self: #Attach branch of tree to the parent node if self.left_child: temp_node = self.left_child else: temp_node = self.right_child parent_node.right_child = temp_node #Get the data that the node is holding def get_data(self): return self.data #Retrieve the smallest number from the tree recursively def get_min(self): if self.left_child is None: return self.data else: return self.left_child.get_min() #Retrieve the largest number from the tree recursively def get_max(self): if self.right_child is None: return self.data else: return self.right_child.get_max() #Traverse the tree in order (Ascending value) def traverse_in_order(self): if self.left_child is not None: self.left_child.traverse_in_order() print(self.data) if self.right_child is not None: self.right_child.traverse_in_order() #Binary search tree implementation class BST: def __init__(self): self.root_node = None #Insert a node into the tree def insert(self, data): if self.root_node is None: self.root_node = Node(data) else: self.root_node.insert(data) #Remove node from the tree def remove(self, data_to_remove): if self.root_node: if self.root_node.get_data() == data_to_remove: temp_node = Node(None) temp_node.left_child = self.root_node self.root_node.remove(data_to_remove, temp_node) else: self.root_node.remove(data_to_remove) #Get the max value from the tree if a root node is set def get_max(self): if self.root_node: return self.root_node.get_max() #get the minimum value from the tree if a root node is set def get_min(self): if self.root_node: return self.root_node.get_min() #Traverse the tree in ascending order if a root node is set def traverse_in_order(self): if self.root_node: print('Traversing the tree:') self.root_node.traverse_in_order() #Testing area to make sure the Binary search tree works, #It does! if __name__ == '__main__': bst = BST() bst.insert(12) bst.insert(10) bst.insert(-2) bst.insert(1) bst.traverse_in_order() bst.remove(10) bst.traverse_in_order()
#user tablet settings LEFT_HANDED = False #rotate pen and track 180 if true # playing with these pressure curves types PRESSURE_CURVE = False # LINEAR, SOFT, HARD #soft = sqrt(z); hard = x^2 #false means no additional calcs FULL_PRESSURE = 1.0 # force needed for full pressure, eg 0.8 pen pressure will give a full stroke
class SinglyLinkedList: def __init__(self, head): self.head = head def __str__(self): if not self.head: return "Error: This is an empty list." sll_list = [] curr = self.head while curr: sll_list.append(str(curr.val)) curr = curr.next return " -> ".join(sll_list) class Node: def __init__(self, val): self.val = val self.next = None class DoublyLinkedList: def __init__(self, head): self.head = head def __str__(self): if not self.head: return "Error: This is an empty list." dll_list = [] curr = self.head while curr: dll_list.append(str(curr.val)) curr = curr.next return " <-> ".join(dll_list) class DNode: def __init__(self, val): self.val = val self.next = None self.prev = None
def floodFill(image, sr, sc, newColor): if image[sr][sc] == newColor: return image origColor = image[sr][sc] def rec(r, c): if not (0 <= r < len(image) and 0 <= c < len(image[0])): return if image[r][c] != origColor: return image[r][c] = newColor rec(r+1, c) rec(r-1, c) rec(r, c+1) rec(r, c-1) rec(sr, sc) return image print(floodFill([[1, 1, 1], [1, 1, 0], [1, 0, 1]], 1, 1, 2)) # [[2, 2, 2], # [2, 2, 0], # [2, 0, 1]]) print(floodFill([[0, 0, 0], [0, 1, 1]], 1, 1, 1))
def uses_only(word, letters): for c in "".join(word.split()): #print c # test if c not in letters: return False return True print (uses_only("hoe alfalfa", "acefhlo" )) # Ace, lohf?
pattern_zero=[0.0, 0.015380859375, 0.0302734375, 0.03125, 0.044677734375, 0.046630859375, 0.05859375, 0.0615234375, 0.0625, 0.072021484375, 0.075927734375, 0.077880859375, 0.0849609375, 0.08984375, 0.0927734375, 0.09375, 0.097412109375, 0.103271484375, 0.107177734375, 0.109130859375, 0.109375, 0.1162109375, 0.120849609375, 0.12109375, 0.1240234375, 0.125, 0.128662109375, 0.1318359375, 0.134521484375, 0.138427734375, 0.140380859375, 0.140625, 0.142333984375, 0.1474609375, 0.152099609375, 0.15234375, 0.1552734375, 0.15625, 0.159912109375, 0.161865234375, 0.1630859375, 0.165771484375, 0.169677734375, 0.1708984375, 0.171630859375, 0.171875, 0.173583984375, 0.1787109375, 0.179443359375, 0.183349609375, 0.18359375, 0.1865234375, 0.1875, 0.191162109375, 0.193115234375, 0.1943359375, 0.195068359375, 0.197021484375, 0.200927734375, 0.2021484375, 0.202880859375, 0.203125, 0.204833984375, 0.208740234375, 0.2099609375, 0.210693359375, 0.214599609375, 0.21484375, 0.2177734375, 0.21875, 0.220458984375, 0.222412109375, 0.224365234375, 0.2255859375, 0.226318359375, 0.228271484375, 0.230224609375, 0.232177734375, 0.2333984375, 0.234130859375, 0.234375, 0.236083984375, 0.238037109375, 0.239990234375, 0.2412109375, 0.241943359375, 0.243896484375, 0.245849609375, 0.24609375, 0.247802734375, 0.2490234375, 0.249755859375, 0.25, 0.251708984375, 0.253662109375, 0.255615234375, 0.2568359375, 0.257568359375, 0.259521484375, 0.261474609375, 0.263427734375, 0.2646484375, 0.265380859375, 0.265625, 0.267333984375, 0.269287109375, 0.271240234375, 0.2724609375, 0.273193359375, 0.275146484375, 0.277099609375, 0.27734375, 0.279052734375, 0.2802734375, 0.281005859375, 0.28125, 0.282958984375, 0.284912109375, 0.286865234375, 0.2880859375, 0.288818359375, 0.290771484375, 0.292724609375, 0.294677734375, 0.2958984375, 0.296630859375, 0.296875, 0.298583984375, 0.300537109375, 0.302490234375, 0.3037109375, 0.304443359375, 0.306396484375, 0.308349609375, 0.30859375, 0.310302734375, 0.3115234375, 0.312255859375, 0.3125, 0.314208984375, 0.316162109375, 0.318115234375, 0.3193359375, 0.320068359375, 0.322021484375, 0.323974609375, 0.325927734375, 0.3271484375, 0.327880859375, 0.328125, 0.329833984375, 0.331787109375, 0.333740234375, 0.3349609375, 0.335693359375, 0.337646484375, 0.339599609375, 0.33984375, 0.341552734375, 0.3427734375, 0.343505859375, 0.34375, 0.345458984375, 0.347412109375, 0.349365234375, 0.3505859375, 0.351318359375, 0.353271484375, 0.355224609375, 0.357177734375, 0.3583984375, 0.359130859375, 0.359375, 0.361083984375, 0.363037109375, 0.364990234375, 0.3662109375, 0.366943359375, 0.368896484375, 0.370849609375, 0.37109375, 0.372802734375, 0.3740234375, 0.374755859375, 0.375, 0.376708984375, 0.378662109375, 0.380615234375, 0.3818359375, 0.382568359375, 0.384521484375, 0.386474609375, 0.388427734375, 0.3896484375, 0.390380859375, 0.390625, 0.392333984375, 0.394287109375, 0.396240234375, 0.3974609375, 0.398193359375, 0.400146484375, 0.402099609375, 0.40234375, 0.404052734375, 0.4052734375, 0.406005859375, 0.40625, 0.407958984375, 0.409912109375, 0.411865234375, 0.4130859375, 0.413818359375, 0.415771484375, 0.417724609375, 0.419677734375, 0.4208984375, 0.421630859375, 0.421875, 0.423583984375, 0.425537109375, 0.427490234375, 0.4287109375, 0.429443359375, 0.431396484375, 0.433349609375, 0.43359375, 0.435302734375, 0.4365234375, 0.437255859375, 0.4375, 0.439208984375, 0.441162109375, 0.443115234375, 0.4443359375, 0.445068359375, 0.447021484375, 0.448974609375, 0.450927734375, 0.4521484375, 0.452880859375, 0.453125, 0.454833984375, 0.456787109375, 0.458740234375, 0.4599609375, 0.460693359375, 0.462646484375, 0.464599609375, 0.46484375, 0.466552734375, 0.4677734375, 0.468505859375, 0.46875, 0.470458984375, 0.472412109375, 0.474365234375, 0.4755859375, 0.476318359375, 0.478271484375, 0.480224609375, 0.482177734375, 0.4833984375, 0.484130859375, 0.484375, 0.486083984375, 0.488037109375, 0.489990234375, 0.4912109375, 0.491943359375, 0.493896484375, 0.495849609375, 0.49609375, 0.497802734375, 0.4990234375, 0.499755859375, 0.5, 0.501708984375, 0.503662109375, 0.505615234375, 0.5068359375, 0.507568359375, 0.509521484375, 0.511474609375, 0.513427734375, 0.5146484375, 0.515380859375, 0.515625, 0.517333984375, 0.519287109375, 0.521240234375, 0.5224609375, 0.523193359375, 0.525146484375, 0.527099609375, 0.52734375, 0.529052734375, 0.5302734375, 0.531005859375, 0.53125, 0.532958984375, 0.534912109375, 0.536865234375, 0.5380859375, 0.538818359375, 0.540771484375, 0.542724609375, 0.544677734375, 0.5458984375, 0.546630859375, 0.546875, 0.548583984375, 0.550537109375, 0.552490234375, 0.5537109375, 0.554443359375, 0.556396484375, 0.558349609375, 0.55859375, 0.560302734375, 0.5615234375, 0.562255859375, 0.5625, 0.564208984375, 0.566162109375, 0.568115234375, 0.5693359375, 0.570068359375, 0.572021484375, 0.573974609375, 0.575927734375, 0.5771484375, 0.577880859375, 0.578125, 0.579833984375, 0.581787109375, 0.583740234375, 0.5849609375, 0.585693359375, 0.587646484375, 0.589599609375, 0.58984375, 0.591552734375, 0.5927734375, 0.593505859375, 0.59375, 0.595458984375, 0.597412109375, 0.599365234375, 0.6005859375, 0.601318359375, 0.603271484375, 0.605224609375, 0.607177734375, 0.6083984375, 0.609130859375, 0.609375, 0.611083984375, 0.613037109375, 0.614990234375, 0.6162109375, 0.616943359375, 0.618896484375, 0.620849609375, 0.62109375, 0.622802734375, 0.6240234375, 0.624755859375, 0.625, 0.626708984375, 0.628662109375, 0.630615234375, 0.6318359375, 0.632568359375, 0.634521484375, 0.636474609375, 0.638427734375, 0.6396484375, 0.640380859375, 0.640625, 0.642333984375, 0.644287109375, 0.646240234375, 0.6474609375, 0.648193359375, 0.650146484375, 0.652099609375, 0.65234375, 0.654052734375, 0.6552734375, 0.656005859375, 0.65625, 0.657958984375, 0.659912109375, 0.661865234375, 0.6630859375, 0.663818359375, 0.665771484375, 0.667724609375, 0.669677734375, 0.6708984375, 0.671630859375, 0.671875, 0.673583984375, 0.675537109375, 0.677490234375, 0.6787109375, 0.679443359375, 0.681396484375, 0.683349609375, 0.68359375, 0.685302734375, 0.6865234375, 0.687255859375, 0.6875, 0.689208984375, 0.691162109375, 0.693115234375, 0.6943359375, 0.695068359375, 0.697021484375, 0.698974609375, 0.700927734375, 0.7021484375, 0.702880859375, 0.703125, 0.704833984375, 0.706787109375, 0.708740234375, 0.7099609375, 0.710693359375, 0.712646484375, 0.714599609375, 0.71484375, 0.716552734375, 0.7177734375, 0.718505859375, 0.71875, 0.720458984375, 0.722412109375, 0.724365234375, 0.7255859375, 0.726318359375, 0.728271484375, 0.730224609375, 0.732177734375, 0.7333984375, 0.734130859375, 0.734375, 0.736083984375, 0.738037109375, 0.739990234375, 0.7412109375, 0.741943359375, 0.743896484375, 0.745849609375, 0.74609375, 0.747802734375, 0.7490234375, 0.749755859375, 0.75, 0.751708984375, 0.753662109375, 0.755615234375, 0.7568359375, 0.757568359375, 0.759521484375, 0.761474609375, 0.763427734375, 0.7646484375, 0.765380859375, 0.765625, 0.767333984375, 0.769287109375, 0.771240234375, 0.7724609375, 0.773193359375, 0.775146484375, 0.777099609375, 0.77734375, 0.779052734375, 0.7802734375, 0.781005859375, 0.78125, 0.782958984375, 0.784912109375, 0.786865234375, 0.7880859375, 0.788818359375, 0.790771484375, 0.792724609375, 0.794677734375, 0.7958984375, 0.796630859375, 0.796875, 0.798583984375, 0.800537109375, 0.802490234375, 0.8037109375, 0.804443359375, 0.806396484375, 0.808349609375, 0.80859375, 0.810302734375, 0.8115234375, 0.812255859375, 0.8125, 0.814208984375, 0.816162109375, 0.818115234375, 0.8193359375, 0.820068359375, 0.822021484375, 0.823974609375, 0.825927734375, 0.8271484375, 0.827880859375, 0.828125, 0.829833984375, 0.831787109375, 0.833740234375, 0.8349609375, 0.835693359375, 0.837646484375, 0.839599609375, 0.83984375, 0.841552734375, 0.8427734375, 0.843505859375, 0.84375, 0.845458984375, 0.847412109375, 0.849365234375, 0.8505859375, 0.851318359375, 0.853271484375, 0.855224609375, 0.857177734375, 0.8583984375, 0.859130859375, 0.859375, 0.861083984375, 0.863037109375, 0.864990234375, 0.8662109375, 0.866943359375, 0.868896484375, 0.870849609375, 0.87109375, 0.872802734375, 0.8740234375, 0.874755859375, 0.875, 0.876708984375, 0.878662109375, 0.880615234375, 0.8818359375, 0.882568359375, 0.884521484375, 0.886474609375, 0.888427734375, 0.8896484375, 0.890380859375, 0.890625, 0.892333984375, 0.894287109375, 0.896240234375, 0.8974609375, 0.898193359375, 0.900146484375, 0.902099609375, 0.90234375, 0.904052734375, 0.9052734375, 0.906005859375, 0.90625, 0.907958984375, 0.909912109375, 0.911865234375, 0.9130859375, 0.913818359375, 0.915771484375, 0.917724609375, 0.919677734375, 0.9208984375, 0.921630859375, 0.921875, 0.923583984375, 0.925537109375, 0.927490234375, 0.9287109375, 0.929443359375, 0.931396484375, 0.933349609375, 0.93359375, 0.935302734375, 0.9365234375, 0.937255859375, 0.9375, 0.939208984375, 0.941162109375, 0.943115234375, 0.9443359375, 0.945068359375, 0.947021484375, 0.948974609375, 0.950927734375, 0.9521484375, 0.952880859375, 0.953125, 0.954833984375, 0.956787109375, 0.958740234375, 0.9599609375, 0.960693359375, 0.962646484375, 0.964599609375, 0.96484375, 0.966552734375, 0.9677734375, 0.968505859375, 0.96875, 0.970458984375, 0.972412109375, 0.974365234375, 0.9755859375, 0.976318359375, 0.978271484375, 0.980224609375, 0.982177734375, 0.9833984375, 0.984130859375, 0.984375, 0.986083984375, 0.988037109375, 0.989990234375, 0.9912109375, 0.991943359375, 0.993896484375, 0.995849609375, 0.99609375, 0.997802734375, 0.9990234375, 0.999755859375] pattern_odd=[0.0, 0.001708984375, 0.003662109375, 0.005615234375, 0.0068359375, 0.007568359375, 0.009521484375, 0.011474609375, 0.013427734375, 0.0146484375, 0.015380859375, 0.015625, 0.017333984375, 0.019287109375, 0.021240234375, 0.0224609375, 0.023193359375, 0.025146484375, 0.027099609375, 0.02734375, 0.029052734375, 0.0302734375, 0.031005859375, 0.03125, 0.032958984375, 0.034912109375, 0.036865234375, 0.0380859375, 0.038818359375, 0.040771484375, 0.042724609375, 0.044677734375, 0.0458984375, 0.046630859375, 0.046875, 0.048583984375, 0.050537109375, 0.052490234375, 0.0537109375, 0.054443359375, 0.056396484375, 0.058349609375, 0.05859375, 0.060302734375, 0.0615234375, 0.062255859375, 0.0625, 0.064208984375, 0.066162109375, 0.068115234375, 0.0693359375, 0.070068359375, 0.072021484375, 0.073974609375, 0.075927734375, 0.0771484375, 0.077880859375, 0.078125, 0.079833984375, 0.081787109375, 0.083740234375, 0.0849609375, 0.085693359375, 0.087646484375, 0.089599609375, 0.08984375, 0.091552734375, 0.0927734375, 0.093505859375, 0.09375, 0.095458984375, 0.097412109375, 0.099365234375, 0.1005859375, 0.101318359375, 0.103271484375, 0.105224609375, 0.107177734375, 0.1083984375, 0.109130859375, 0.109375, 0.111083984375, 0.113037109375, 0.114990234375, 0.1162109375, 0.116943359375, 0.118896484375, 0.120849609375, 0.12109375, 0.122802734375, 0.1240234375, 0.124755859375, 0.125, 0.126708984375, 0.128662109375, 0.130615234375, 0.1318359375, 0.132568359375, 0.134521484375, 0.136474609375, 0.138427734375, 0.1396484375, 0.140380859375, 0.140625, 0.142333984375, 0.144287109375, 0.146240234375, 0.1474609375, 0.148193359375, 0.150146484375, 0.152099609375, 0.15234375, 0.154052734375, 0.1552734375, 0.156005859375, 0.15625, 0.157958984375, 0.159912109375, 0.161865234375, 0.1630859375, 0.163818359375, 0.165771484375, 0.167724609375, 0.169677734375, 0.1708984375, 0.171630859375, 0.171875, 0.173583984375, 0.175537109375, 0.177490234375, 0.1787109375, 0.179443359375, 0.181396484375, 0.183349609375, 0.18359375, 0.185302734375, 0.1865234375, 0.187255859375, 0.1875, 0.189208984375, 0.191162109375, 0.193115234375, 0.1943359375, 0.195068359375, 0.197021484375, 0.198974609375, 0.200927734375, 0.2021484375, 0.202880859375, 0.203125, 0.204833984375, 0.206787109375, 0.208740234375, 0.2099609375, 0.210693359375, 0.212646484375, 0.214599609375, 0.21484375, 0.216552734375, 0.2177734375, 0.218505859375, 0.21875, 0.220458984375, 0.222412109375, 0.224365234375, 0.2255859375, 0.226318359375, 0.228271484375, 0.230224609375, 0.232177734375, 0.2333984375, 0.234130859375, 0.234375, 0.236083984375, 0.238037109375, 0.239990234375, 0.2412109375, 0.241943359375, 0.243896484375, 0.245849609375, 0.24609375, 0.247802734375, 0.2490234375, 0.249755859375, 0.25, 0.251708984375, 0.253662109375, 0.255615234375, 0.2568359375, 0.257568359375, 0.259521484375, 0.261474609375, 0.263427734375, 0.2646484375, 0.265380859375, 0.265625, 0.267333984375, 0.269287109375, 0.271240234375, 0.2724609375, 0.273193359375, 0.275146484375, 0.277099609375, 0.27734375, 0.279052734375, 0.2802734375, 0.281005859375, 0.28125, 0.282958984375, 0.284912109375, 0.286865234375, 0.2880859375, 0.288818359375, 0.290771484375, 0.292724609375, 0.294677734375, 0.2958984375, 0.296630859375, 0.296875, 0.298583984375, 0.300537109375, 0.302490234375, 0.3037109375, 0.304443359375, 0.306396484375, 0.308349609375, 0.30859375, 0.310302734375, 0.3115234375, 0.312255859375, 0.3125, 0.314208984375, 0.316162109375, 0.318115234375, 0.3193359375, 0.320068359375, 0.322021484375, 0.323974609375, 0.325927734375, 0.3271484375, 0.327880859375, 0.328125, 0.329833984375, 0.331787109375, 0.333740234375, 0.3349609375, 0.335693359375, 0.337646484375, 0.339599609375, 0.33984375, 0.341552734375, 0.3427734375, 0.343505859375, 0.34375, 0.345458984375, 0.347412109375, 0.349365234375, 0.3505859375, 0.351318359375, 0.353271484375, 0.355224609375, 0.357177734375, 0.3583984375, 0.359130859375, 0.359375, 0.361083984375, 0.363037109375, 0.364990234375, 0.3662109375, 0.366943359375, 0.368896484375, 0.370849609375, 0.37109375, 0.372802734375, 0.3740234375, 0.374755859375, 0.375, 0.376708984375, 0.378662109375, 0.380615234375, 0.3818359375, 0.382568359375, 0.384521484375, 0.386474609375, 0.388427734375, 0.3896484375, 0.390380859375, 0.390625, 0.392333984375, 0.394287109375, 0.396240234375, 0.3974609375, 0.398193359375, 0.400146484375, 0.402099609375, 0.40234375, 0.404052734375, 0.4052734375, 0.406005859375, 0.40625, 0.407958984375, 0.409912109375, 0.411865234375, 0.4130859375, 0.413818359375, 0.415771484375, 0.417724609375, 0.419677734375, 0.4208984375, 0.421630859375, 0.421875, 0.423583984375, 0.425537109375, 0.427490234375, 0.4287109375, 0.429443359375, 0.431396484375, 0.433349609375, 0.43359375, 0.435302734375, 0.4365234375, 0.437255859375, 0.4375, 0.439208984375, 0.441162109375, 0.443115234375, 0.4443359375, 0.445068359375, 0.447021484375, 0.448974609375, 0.450927734375, 0.4521484375, 0.452880859375, 0.453125, 0.454833984375, 0.456787109375, 0.458740234375, 0.4599609375, 0.460693359375, 0.462646484375, 0.464599609375, 0.46484375, 0.466552734375, 0.4677734375, 0.468505859375, 0.46875, 0.470458984375, 0.472412109375, 0.474365234375, 0.4755859375, 0.476318359375, 0.478271484375, 0.480224609375, 0.482177734375, 0.4833984375, 0.484130859375, 0.484375, 0.486083984375, 0.488037109375, 0.489990234375, 0.4912109375, 0.491943359375, 0.493896484375, 0.495849609375, 0.49609375, 0.497802734375, 0.4990234375, 0.499755859375, 0.5, 0.501708984375, 0.503662109375, 0.505615234375, 0.5068359375, 0.507568359375, 0.509521484375, 0.511474609375, 0.513427734375, 0.5146484375, 0.515380859375, 0.515625, 0.517333984375, 0.519287109375, 0.521240234375, 0.5224609375, 0.523193359375, 0.525146484375, 0.527099609375, 0.52734375, 0.529052734375, 0.5302734375, 0.531005859375, 0.53125, 0.532958984375, 0.534912109375, 0.536865234375, 0.5380859375, 0.538818359375, 0.540771484375, 0.542724609375, 0.544677734375, 0.5458984375, 0.546630859375, 0.546875, 0.548583984375, 0.550537109375, 0.552490234375, 0.5537109375, 0.554443359375, 0.556396484375, 0.558349609375, 0.55859375, 0.560302734375, 0.5615234375, 0.562255859375, 0.5625, 0.564208984375, 0.566162109375, 0.568115234375, 0.5693359375, 0.570068359375, 0.572021484375, 0.573974609375, 0.575927734375, 0.5771484375, 0.577880859375, 0.578125, 0.579833984375, 0.581787109375, 0.583740234375, 0.5849609375, 0.585693359375, 0.587646484375, 0.589599609375, 0.58984375, 0.591552734375, 0.5927734375, 0.593505859375, 0.59375, 0.595458984375, 0.597412109375, 0.599365234375, 0.6005859375, 0.601318359375, 0.603271484375, 0.605224609375, 0.607177734375, 0.6083984375, 0.609130859375, 0.609375, 0.611083984375, 0.613037109375, 0.614990234375, 0.6162109375, 0.616943359375, 0.618896484375, 0.620849609375, 0.62109375, 0.622802734375, 0.6240234375, 0.624755859375, 0.625, 0.626708984375, 0.628662109375, 0.630615234375, 0.6318359375, 0.632568359375, 0.634521484375, 0.636474609375, 0.638427734375, 0.6396484375, 0.640380859375, 0.640625, 0.642333984375, 0.644287109375, 0.646240234375, 0.6474609375, 0.648193359375, 0.650146484375, 0.652099609375, 0.65234375, 0.654052734375, 0.6552734375, 0.656005859375, 0.65625, 0.657958984375, 0.659912109375, 0.661865234375, 0.6630859375, 0.663818359375, 0.665771484375, 0.667724609375, 0.669677734375, 0.6708984375, 0.671630859375, 0.671875, 0.673583984375, 0.675537109375, 0.677490234375, 0.6787109375, 0.679443359375, 0.681396484375, 0.683349609375, 0.68359375, 0.685302734375, 0.6865234375, 0.687255859375, 0.6875, 0.689208984375, 0.691162109375, 0.693115234375, 0.6943359375, 0.695068359375, 0.697021484375, 0.698974609375, 0.700927734375, 0.7021484375, 0.702880859375, 0.703125, 0.704833984375, 0.706787109375, 0.708740234375, 0.7099609375, 0.710693359375, 0.712646484375, 0.714599609375, 0.71484375, 0.716552734375, 0.7177734375, 0.718505859375, 0.71875, 0.720458984375, 0.722412109375, 0.724365234375, 0.7255859375, 0.726318359375, 0.728271484375, 0.730224609375, 0.732177734375, 0.7333984375, 0.734130859375, 0.734375, 0.736083984375, 0.738037109375, 0.739990234375, 0.7412109375, 0.741943359375, 0.743896484375, 0.745849609375, 0.74609375, 0.747802734375, 0.7490234375, 0.749755859375, 0.75, 0.751708984375, 0.753662109375, 0.755615234375, 0.7568359375, 0.757568359375, 0.759521484375, 0.761474609375, 0.763427734375, 0.7646484375, 0.765380859375, 0.765625, 0.767333984375, 0.769287109375, 0.771240234375, 0.7724609375, 0.773193359375, 0.775146484375, 0.777099609375, 0.77734375, 0.779052734375, 0.7802734375, 0.781005859375, 0.78125, 0.782958984375, 0.784912109375, 0.786865234375, 0.7880859375, 0.788818359375, 0.790771484375, 0.792724609375, 0.794677734375, 0.7958984375, 0.796630859375, 0.796875, 0.798583984375, 0.800537109375, 0.802490234375, 0.8037109375, 0.804443359375, 0.806396484375, 0.808349609375, 0.80859375, 0.810302734375, 0.8115234375, 0.812255859375, 0.8125, 0.814208984375, 0.816162109375, 0.818115234375, 0.8193359375, 0.820068359375, 0.822021484375, 0.823974609375, 0.825927734375, 0.8271484375, 0.827880859375, 0.828125, 0.829833984375, 0.831787109375, 0.833740234375, 0.8349609375, 0.835693359375, 0.837646484375, 0.839599609375, 0.83984375, 0.841552734375, 0.8427734375, 0.843505859375, 0.84375, 0.845458984375, 0.847412109375, 0.849365234375, 0.8505859375, 0.851318359375, 0.853271484375, 0.855224609375, 0.857177734375, 0.8583984375, 0.859130859375, 0.859375, 0.861083984375, 0.863037109375, 0.864990234375, 0.8662109375, 0.866943359375, 0.868896484375, 0.870849609375, 0.87109375, 0.872802734375, 0.8740234375, 0.874755859375, 0.875, 0.876708984375, 0.878662109375, 0.880615234375, 0.8818359375, 0.882568359375, 0.884521484375, 0.886474609375, 0.888427734375, 0.8896484375, 0.890380859375, 0.890625, 0.892333984375, 0.894287109375, 0.896240234375, 0.8974609375, 0.898193359375, 0.900146484375, 0.902099609375, 0.90234375, 0.904052734375, 0.9052734375, 0.906005859375, 0.90625, 0.907958984375, 0.909912109375, 0.911865234375, 0.9130859375, 0.913818359375, 0.915771484375, 0.917724609375, 0.919677734375, 0.9208984375, 0.921630859375, 0.921875, 0.923583984375, 0.925537109375, 0.927490234375, 0.9287109375, 0.929443359375, 0.931396484375, 0.933349609375, 0.93359375, 0.935302734375, 0.9365234375, 0.937255859375, 0.9375, 0.939208984375, 0.941162109375, 0.943115234375, 0.9443359375, 0.945068359375, 0.947021484375, 0.948974609375, 0.950927734375, 0.9521484375, 0.952880859375, 0.953125, 0.954833984375, 0.956787109375, 0.958740234375, 0.9599609375, 0.960693359375, 0.962646484375, 0.964599609375, 0.96484375, 0.966552734375, 0.9677734375, 0.968505859375, 0.96875, 0.970458984375, 0.972412109375, 0.974365234375, 0.9755859375, 0.976318359375, 0.978271484375, 0.980224609375, 0.982177734375, 0.9833984375, 0.984130859375, 0.984375, 0.986083984375, 0.988037109375, 0.989990234375, 0.9912109375, 0.991943359375, 0.993896484375, 0.995849609375, 0.99609375, 0.997802734375, 0.9990234375, 0.999755859375] pattern_even=[0.0, 0.001708984375, 0.003662109375, 0.005615234375, 0.0068359375, 0.007568359375, 0.009521484375, 0.011474609375, 0.013427734375, 0.0146484375, 0.015380859375, 0.015625, 0.017333984375, 0.019287109375, 0.021240234375, 0.0224609375, 0.023193359375, 0.025146484375, 0.027099609375, 0.02734375, 0.029052734375, 0.0302734375, 0.031005859375, 0.03125, 0.032958984375, 0.034912109375, 0.036865234375, 0.0380859375, 0.038818359375, 0.040771484375, 0.042724609375, 0.044677734375, 0.0458984375, 0.046630859375, 0.046875, 0.048583984375, 0.050537109375, 0.052490234375, 0.0537109375, 0.054443359375, 0.056396484375, 0.058349609375, 0.05859375, 0.060302734375, 0.0615234375, 0.062255859375, 0.0625, 0.064208984375, 0.066162109375, 0.068115234375, 0.0693359375, 0.070068359375, 0.072021484375, 0.073974609375, 0.075927734375, 0.0771484375, 0.077880859375, 0.078125, 0.079833984375, 0.081787109375, 0.083740234375, 0.0849609375, 0.085693359375, 0.087646484375, 0.089599609375, 0.08984375, 0.091552734375, 0.0927734375, 0.093505859375, 0.09375, 0.095458984375, 0.097412109375, 0.099365234375, 0.1005859375, 0.101318359375, 0.103271484375, 0.105224609375, 0.107177734375, 0.1083984375, 0.109130859375, 0.109375, 0.111083984375, 0.113037109375, 0.114990234375, 0.1162109375, 0.116943359375, 0.118896484375, 0.120849609375, 0.12109375, 0.122802734375, 0.1240234375, 0.124755859375, 0.125, 0.126708984375, 0.128662109375, 0.130615234375, 0.1318359375, 0.132568359375, 0.134521484375, 0.136474609375, 0.138427734375, 0.1396484375, 0.140380859375, 0.140625, 0.142333984375, 0.144287109375, 0.146240234375, 0.1474609375, 0.148193359375, 0.150146484375, 0.152099609375, 0.15234375, 0.154052734375, 0.1552734375, 0.156005859375, 0.15625, 0.157958984375, 0.159912109375, 0.161865234375, 0.1630859375, 0.163818359375, 0.165771484375, 0.167724609375, 0.169677734375, 0.1708984375, 0.171630859375, 0.171875, 0.173583984375, 0.175537109375, 0.177490234375, 0.1787109375, 0.179443359375, 0.181396484375, 0.183349609375, 0.18359375, 0.185302734375, 0.1865234375, 0.187255859375, 0.1875, 0.189208984375, 0.191162109375, 0.193115234375, 0.1943359375, 0.195068359375, 0.197021484375, 0.198974609375, 0.200927734375, 0.2021484375, 0.202880859375, 0.203125, 0.204833984375, 0.206787109375, 0.208740234375, 0.2099609375, 0.210693359375, 0.212646484375, 0.214599609375, 0.21484375, 0.216552734375, 0.2177734375, 0.218505859375, 0.21875, 0.220458984375, 0.222412109375, 0.224365234375, 0.2255859375, 0.226318359375, 0.228271484375, 0.230224609375, 0.232177734375, 0.2333984375, 0.234130859375, 0.234375, 0.236083984375, 0.238037109375, 0.239990234375, 0.2412109375, 0.241943359375, 0.243896484375, 0.245849609375, 0.24609375, 0.247802734375, 0.2490234375, 0.249755859375, 0.25, 0.251708984375, 0.253662109375, 0.255615234375, 0.2568359375, 0.257568359375, 0.259521484375, 0.261474609375, 0.263427734375, 0.2646484375, 0.265380859375, 0.265625, 0.267333984375, 0.269287109375, 0.271240234375, 0.2724609375, 0.273193359375, 0.275146484375, 0.277099609375, 0.27734375, 0.279052734375, 0.2802734375, 0.281005859375, 0.28125, 0.282958984375, 0.284912109375, 0.286865234375, 0.2880859375, 0.288818359375, 0.290771484375, 0.292724609375, 0.294677734375, 0.2958984375, 0.296630859375, 0.296875, 0.298583984375, 0.300537109375, 0.302490234375, 0.3037109375, 0.304443359375, 0.306396484375, 0.308349609375, 0.30859375, 0.310302734375, 0.3115234375, 0.312255859375, 0.3125, 0.314208984375, 0.316162109375, 0.318115234375, 0.3193359375, 0.320068359375, 0.322021484375, 0.323974609375, 0.325927734375, 0.3271484375, 0.327880859375, 0.328125, 0.329833984375, 0.331787109375, 0.333740234375, 0.3349609375, 0.335693359375, 0.337646484375, 0.339599609375, 0.33984375, 0.341552734375, 0.3427734375, 0.343505859375, 0.34375, 0.345458984375, 0.347412109375, 0.349365234375, 0.3505859375, 0.351318359375, 0.353271484375, 0.355224609375, 0.357177734375, 0.3583984375, 0.359130859375, 0.359375, 0.361083984375, 0.363037109375, 0.364990234375, 0.3662109375, 0.366943359375, 0.368896484375, 0.370849609375, 0.37109375, 0.372802734375, 0.3740234375, 0.374755859375, 0.375, 0.376708984375, 0.378662109375, 0.380615234375, 0.3818359375, 0.382568359375, 0.384521484375, 0.386474609375, 0.388427734375, 0.3896484375, 0.390380859375, 0.390625, 0.392333984375, 0.394287109375, 0.396240234375, 0.3974609375, 0.398193359375, 0.400146484375, 0.402099609375, 0.40234375, 0.404052734375, 0.4052734375, 0.406005859375, 0.40625, 0.407958984375, 0.409912109375, 0.411865234375, 0.4130859375, 0.413818359375, 0.415771484375, 0.417724609375, 0.419677734375, 0.4208984375, 0.421630859375, 0.421875, 0.423583984375, 0.425537109375, 0.427490234375, 0.4287109375, 0.429443359375, 0.431396484375, 0.433349609375, 0.43359375, 0.435302734375, 0.4365234375, 0.437255859375, 0.4375, 0.439208984375, 0.441162109375, 0.443115234375, 0.4443359375, 0.445068359375, 0.447021484375, 0.448974609375, 0.450927734375, 0.4521484375, 0.452880859375, 0.453125, 0.454833984375, 0.456787109375, 0.458740234375, 0.4599609375, 0.460693359375, 0.462646484375, 0.464599609375, 0.46484375, 0.466552734375, 0.4677734375, 0.468505859375, 0.46875, 0.470458984375, 0.472412109375, 0.474365234375, 0.4755859375, 0.476318359375, 0.478271484375, 0.480224609375, 0.482177734375, 0.4833984375, 0.484130859375, 0.484375, 0.486083984375, 0.488037109375, 0.489990234375, 0.4912109375, 0.491943359375, 0.493896484375, 0.495849609375, 0.49609375, 0.497802734375, 0.4990234375, 0.499755859375, 0.5, 0.501708984375, 0.503662109375, 0.505615234375, 0.5068359375, 0.507568359375, 0.509521484375, 0.511474609375, 0.513427734375, 0.5146484375, 0.515380859375, 0.515625, 0.517333984375, 0.519287109375, 0.521240234375, 0.5224609375, 0.523193359375, 0.525146484375, 0.527099609375, 0.52734375, 0.529052734375, 0.5302734375, 0.531005859375, 0.53125, 0.532958984375, 0.534912109375, 0.536865234375, 0.5380859375, 0.538818359375, 0.540771484375, 0.542724609375, 0.544677734375, 0.5458984375, 0.546630859375, 0.546875, 0.548583984375, 0.550537109375, 0.552490234375, 0.5537109375, 0.554443359375, 0.556396484375, 0.558349609375, 0.55859375, 0.560302734375, 0.5615234375, 0.562255859375, 0.5625, 0.564208984375, 0.566162109375, 0.568115234375, 0.5693359375, 0.570068359375, 0.572021484375, 0.573974609375, 0.575927734375, 0.5771484375, 0.577880859375, 0.578125, 0.579833984375, 0.581787109375, 0.583740234375, 0.5849609375, 0.585693359375, 0.587646484375, 0.589599609375, 0.58984375, 0.591552734375, 0.5927734375, 0.593505859375, 0.59375, 0.595458984375, 0.597412109375, 0.599365234375, 0.6005859375, 0.601318359375, 0.603271484375, 0.605224609375, 0.607177734375, 0.6083984375, 0.609130859375, 0.609375, 0.611083984375, 0.613037109375, 0.614990234375, 0.6162109375, 0.616943359375, 0.618896484375, 0.620849609375, 0.62109375, 0.622802734375, 0.6240234375, 0.624755859375, 0.625, 0.626708984375, 0.628662109375, 0.630615234375, 0.6318359375, 0.632568359375, 0.634521484375, 0.636474609375, 0.638427734375, 0.6396484375, 0.640380859375, 0.640625, 0.642333984375, 0.644287109375, 0.646240234375, 0.6474609375, 0.648193359375, 0.650146484375, 0.652099609375, 0.65234375, 0.654052734375, 0.6552734375, 0.656005859375, 0.65625, 0.657958984375, 0.659912109375, 0.661865234375, 0.6630859375, 0.663818359375, 0.665771484375, 0.667724609375, 0.669677734375, 0.6708984375, 0.671630859375, 0.671875, 0.673583984375, 0.675537109375, 0.677490234375, 0.6787109375, 0.679443359375, 0.681396484375, 0.683349609375, 0.68359375, 0.685302734375, 0.6865234375, 0.687255859375, 0.6875, 0.689208984375, 0.691162109375, 0.693115234375, 0.6943359375, 0.695068359375, 0.697021484375, 0.698974609375, 0.700927734375, 0.7021484375, 0.702880859375, 0.703125, 0.704833984375, 0.706787109375, 0.708740234375, 0.7099609375, 0.710693359375, 0.712646484375, 0.714599609375, 0.71484375, 0.716552734375, 0.7177734375, 0.718505859375, 0.71875, 0.720458984375, 0.722412109375, 0.724365234375, 0.7255859375, 0.726318359375, 0.728271484375, 0.730224609375, 0.732177734375, 0.7333984375, 0.734130859375, 0.734375, 0.736083984375, 0.738037109375, 0.739990234375, 0.7412109375, 0.741943359375, 0.743896484375, 0.745849609375, 0.74609375, 0.747802734375, 0.7490234375, 0.749755859375, 0.75, 0.751708984375, 0.753662109375, 0.755615234375, 0.7568359375, 0.757568359375, 0.759521484375, 0.761474609375, 0.763427734375, 0.7646484375, 0.765380859375, 0.765625, 0.767333984375, 0.769287109375, 0.771240234375, 0.7724609375, 0.773193359375, 0.775146484375, 0.777099609375, 0.77734375, 0.779052734375, 0.7802734375, 0.781005859375, 0.78125, 0.782958984375, 0.784912109375, 0.786865234375, 0.7880859375, 0.788818359375, 0.790771484375, 0.792724609375, 0.794677734375, 0.7958984375, 0.796630859375, 0.796875, 0.798583984375, 0.800537109375, 0.802490234375, 0.8037109375, 0.804443359375, 0.806396484375, 0.808349609375, 0.80859375, 0.810302734375, 0.8115234375, 0.812255859375, 0.8125, 0.814208984375, 0.816162109375, 0.818115234375, 0.8193359375, 0.820068359375, 0.822021484375, 0.823974609375, 0.825927734375, 0.8271484375, 0.827880859375, 0.828125, 0.829833984375, 0.831787109375, 0.833740234375, 0.8349609375, 0.835693359375, 0.837646484375, 0.839599609375, 0.83984375, 0.841552734375, 0.8427734375, 0.843505859375, 0.84375, 0.845458984375, 0.847412109375, 0.849365234375, 0.8505859375, 0.851318359375, 0.853271484375, 0.855224609375, 0.857177734375, 0.8583984375, 0.859130859375, 0.859375, 0.861083984375, 0.863037109375, 0.864990234375, 0.8662109375, 0.866943359375, 0.868896484375, 0.870849609375, 0.87109375, 0.872802734375, 0.8740234375, 0.874755859375, 0.875, 0.876708984375, 0.878662109375, 0.880615234375, 0.8818359375, 0.882568359375, 0.884521484375, 0.886474609375, 0.888427734375, 0.8896484375, 0.890380859375, 0.890625, 0.892333984375, 0.894287109375, 0.896240234375, 0.8974609375, 0.898193359375, 0.900146484375, 0.902099609375, 0.90234375, 0.904052734375, 0.9052734375, 0.906005859375, 0.90625, 0.907958984375, 0.909912109375, 0.911865234375, 0.9130859375, 0.913818359375, 0.915771484375, 0.917724609375, 0.919677734375, 0.9208984375, 0.921630859375, 0.921875, 0.923583984375, 0.925537109375, 0.927490234375, 0.9287109375, 0.929443359375, 0.931396484375, 0.933349609375, 0.93359375, 0.935302734375, 0.9365234375, 0.937255859375, 0.9375, 0.939208984375, 0.941162109375, 0.943115234375, 0.9443359375, 0.945068359375, 0.947021484375, 0.948974609375, 0.950927734375, 0.9521484375, 0.952880859375, 0.953125, 0.954833984375, 0.956787109375, 0.958740234375, 0.9599609375, 0.960693359375, 0.962646484375, 0.964599609375, 0.96484375, 0.966552734375, 0.9677734375, 0.968505859375, 0.96875, 0.970458984375, 0.972412109375, 0.974365234375, 0.9755859375, 0.976318359375, 0.978271484375, 0.980224609375, 0.982177734375, 0.9833984375, 0.984130859375, 0.984375, 0.986083984375, 0.988037109375, 0.989990234375, 0.9912109375, 0.991943359375, 0.993896484375, 0.995849609375, 0.99609375, 0.997802734375, 0.9990234375, 0.999755859375] averages_even={0.0: [0.25, 0.5, 0.75, 0.0], 0.001708984375: [0.328125, 0.671875], 0.216552734375: [0.453125, 0.546875], 0.974365234375: [0.796875, 0.203125], 0.0068359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.029052734375: [0.453125, 0.546875], 0.505615234375: [0.796875, 0.203125], 0.0693359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.681396484375: [0.421875, 0.578125], 0.425537109375: [0.390625, 0.609375], 0.732177734375: [0.953125, 0.046875], 0.892333984375: [0.828125, 0.171875], 0.5380859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.915771484375: [0.921875, 0.078125], 0.5: [0.5, 0.75, 0.0, 0.25], 0.4208984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.800537109375: [0.390625, 0.609375], 0.595458984375: [0.671875, 0.328125], 0.493896484375: [0.421875, 0.578125], 0.052490234375: [0.296875, 0.703125], 0.966552734375: [0.453125, 0.546875], 0.558349609375: [0.859375, 0.140625], 0.007568359375: [0.265625, 0.734375], 0.937255859375: [0.484375, 0.515625], 0.372802734375: [0.453125, 0.546875], 0.148193359375: [0.234375, 0.765625], 0.568115234375: [0.796875, 0.203125], 0.8115234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.695068359375: [0.734375, 0.265625], 0.65625: [0.5, 0.75, 0.0, 0.25], 0.251708984375: [0.328125, 0.671875], 0.441162109375: [0.890625, 0.109375], 0.40234375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.154052734375: [0.453125, 0.546875], 0.081787109375: [0.390625, 0.609375], 0.650146484375: [0.421875, 0.578125], 0.5693359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.5302734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.4365234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.831787109375: [0.390625, 0.609375], 0.320068359375: [0.265625, 0.734375], 0.28125: [0.25, 0.5, 0.75, 0.0], 0.7802734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.625: [0.5, 0.75, 0.0, 0.25], 0.054443359375: [0.234375, 0.765625], 0.589599609375: [0.859375, 0.140625], 0.968505859375: [0.484375, 0.515625], 0.388427734375: [0.953125, 0.046875], 0.156005859375: [0.484375, 0.515625], 0.8427734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.507568359375: [0.734375, 0.265625], 0.0771484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.267333984375: [0.828125, 0.171875], 0.456787109375: [0.390625, 0.609375], 0.794677734375: [0.953125, 0.046875], 0.085693359375: [0.765625, 0.234375], 0.6005859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.53125: [0.5, 0.75, 0.0, 0.25], 0.24609375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.4521484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.863037109375: [0.390625, 0.609375], 0.335693359375: [0.765625, 0.234375], 0.296875: [0.375, 0.625, 0.875, 0.125], 0.552490234375: [0.703125, 0.296875], 0.224365234375: [0.796875, 0.203125], 0.620849609375: [0.859375, 0.140625], 0.1240234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.999755859375: [0.484375, 0.515625], 0.404052734375: [0.453125, 0.546875], 0.163818359375: [0.265625, 0.734375], 0.759521484375: [0.921875, 0.078125], 0.125: [0.25, 0.5, 0.75, 0.0], 0.8740234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.757568359375: [0.734375, 0.265625], 0.71875: [0.5, 0.75, 0.0, 0.25], 0.282958984375: [0.328125, 0.671875], 0.015380859375: [0.984375, 0.015625], 0.825927734375: [0.953125, 0.046875], 0.089599609375: [0.859375, 0.140625], 0.407958984375: [0.328125, 0.671875], 0.4677734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.894287109375: [0.390625, 0.609375], 0.351318359375: [0.734375, 0.265625], 0.3125: [0.25, 0.5, 0.75, 0.0], 0.583740234375: [0.703125, 0.296875], 0.665771484375: [0.921875, 0.078125], 0.232177734375: [0.953125, 0.046875], 0.017333984375: [0.828125, 0.171875], 0.652099609375: [0.859375, 0.140625], 0.814208984375: [0.671875, 0.328125], 0.419677734375: [0.953125, 0.046875], 0.171630859375: [0.984375, 0.015625], 0.9052734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.509521484375: [0.921875, 0.078125], 0.0849609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.009521484375: [0.921875, 0.078125], 0.736083984375: [0.828125, 0.171875], 0.488037109375: [0.390625, 0.609375], 0.857177734375: [0.953125, 0.046875], 0.093505859375: [0.484375, 0.515625], 0.236083984375: [0.828125, 0.171875], 0.6630859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.546630859375: [0.984375, 0.015625], 0.4833984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.925537109375: [0.390625, 0.609375], 0.208740234375: [0.296875, 0.703125], 0.328125: [0.375, 0.625, 0.875, 0.125], 0.614990234375: [0.296875, 0.703125], 0.048583984375: [0.828125, 0.171875], 0.239990234375: [0.296875, 0.703125], 0.683349609375: [0.859375, 0.140625], 0.572021484375: [0.921875, 0.078125], 0.806396484375: [0.421875, 0.578125], 0.435302734375: [0.453125, 0.546875], 0.179443359375: [0.765625, 0.234375], 0.140625: [0.375, 0.625, 0.875, 0.125], 0.9365234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.820068359375: [0.734375, 0.265625], 0.78125: [0.5, 0.75, 0.0, 0.25], 0.314208984375: [0.328125, 0.671875], 0.46484375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.0537109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.097412109375: [0.890625, 0.109375], 0.6943359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.577880859375: [0.984375, 0.015625], 0.566162109375: [0.890625, 0.109375], 0.4990234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.956787109375: [0.390625, 0.609375], 0.382568359375: [0.734375, 0.265625], 0.34375: [0.5, 0.75, 0.0, 0.25], 0.646240234375: [0.703125, 0.296875], 0.626708984375: [0.328125, 0.671875], 0.247802734375: [0.453125, 0.546875], 0.714599609375: [0.859375, 0.140625], 0.261474609375: [0.359375, 0.640625], 0.02734375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.7568359375: [0.65625, 0.84375, 0.15625, 0.34375], 0.450927734375: [0.953125, 0.046875], 0.187255859375: [0.484375, 0.515625], 0.2568359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.0458984375: [0.21875, 0.28125, 0.71875, 0.78125], 0.9677734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.511474609375: [0.359375, 0.640625], 0.0927734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.329833984375: [0.828125, 0.171875], 0.126708984375: [0.328125, 0.671875], 0.919677734375: [0.953125, 0.046875], 0.101318359375: [0.265625, 0.734375], 0.161865234375: [0.796875, 0.203125], 0.7255859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.609130859375: [0.984375, 0.015625], 0.0625: [0.25, 0.5, 0.75, 0.0], 0.579833984375: [0.828125, 0.171875], 0.988037109375: [0.390625, 0.609375], 0.398193359375: [0.765625, 0.234375], 0.359375: [0.375, 0.625, 0.875, 0.125], 0.677490234375: [0.703125, 0.296875], 0.745849609375: [0.859375, 0.140625], 0.277099609375: [0.859375, 0.140625], 0.466552734375: [0.453125, 0.546875], 0.195068359375: [0.265625, 0.734375], 0.15625: [0.25, 0.5, 0.75, 0.0], 0.2724609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.822021484375: [0.921875, 0.078125], 0.9990234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.882568359375: [0.734375, 0.265625], 0.84375: [0.5, 0.75, 0.0, 0.25], 0.345458984375: [0.328125, 0.671875], 0.134521484375: [0.921875, 0.078125], 0.49609375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.950927734375: [0.953125, 0.046875], 0.105224609375: [0.359375, 0.640625], 0.363037109375: [0.390625, 0.609375], 0.640380859375: [0.984375, 0.015625], 0.413818359375: [0.734375, 0.265625], 0.375: [0.5, 0.75, 0.0, 0.25], 0.708740234375: [0.703125, 0.296875], 0.763427734375: [0.953125, 0.046875], 0.777099609375: [0.859375, 0.140625], 0.292724609375: [0.359375, 0.640625], 0.43359375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.482177734375: [0.953125, 0.046875], 0.202880859375: [0.984375, 0.015625], 0.790771484375: [0.921875, 0.078125], 0.534912109375: [0.890625, 0.109375], 0.663818359375: [0.734375, 0.265625], 0.513427734375: [0.953125, 0.046875], 0.1005859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.361083984375: [0.828125, 0.171875], 0.603271484375: [0.921875, 0.078125], 0.0615234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.109130859375: [0.984375, 0.015625], 0.7880859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.671630859375: [0.984375, 0.015625], 0.429443359375: [0.765625, 0.234375], 0.390625: [0.375, 0.625, 0.875, 0.125], 0.739990234375: [0.703125, 0.296875], 0.5458984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.808349609375: [0.859375, 0.140625], 0.845458984375: [0.671875, 0.328125], 0.077880859375: [0.984375, 0.015625], 0.861083984375: [0.828125, 0.171875], 0.497802734375: [0.453125, 0.546875], 0.210693359375: [0.234375, 0.765625], 0.3037109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.548583984375: [0.828125, 0.171875], 0.945068359375: [0.734375, 0.265625], 0.90625: [0.5, 0.75, 0.0, 0.25], 0.376708984375: [0.328125, 0.671875], 0.150146484375: [0.421875, 0.578125], 0.113037109375: [0.390625, 0.609375], 0.8193359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.5068359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.255615234375: [0.796875, 0.203125], 0.445068359375: [0.265625, 0.734375], 0.40625: [0.5, 0.75, 0.0, 0.25], 0.771240234375: [0.703125, 0.296875], 0.900146484375: [0.421875, 0.578125], 0.5771484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.839599609375: [0.859375, 0.140625], 0.323974609375: [0.359375, 0.640625], 0.913818359375: [0.734375, 0.265625], 0.875: [0.5, 0.75, 0.0, 0.25], 0.218505859375: [0.484375, 0.515625], 0.3193359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.597412109375: [0.890625, 0.109375], 0.55859375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.515380859375: [0.984375, 0.015625], 0.9375: [0.5, 0.75, 0.0, 0.25], 0.392333984375: [0.828125, 0.171875], 0.157958984375: [0.328125, 0.671875], 0.116943359375: [0.234375, 0.765625], 0.8505859375: [0.65625, 0.84375, 0.15625, 0.34375], 0.734130859375: [0.984375, 0.015625], 0.078125: [0.375, 0.625, 0.875, 0.125], 0.954833984375: [0.828125, 0.171875], 0.634521484375: [0.921875, 0.078125], 0.460693359375: [0.765625, 0.234375], 0.421875: [0.375, 0.625, 0.875, 0.125], 0.802490234375: [0.703125, 0.296875], 0.6083984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.870849609375: [0.859375, 0.140625], 0.339599609375: [0.859375, 0.140625], 0.982177734375: [0.953125, 0.046875], 0.560302734375: [0.453125, 0.546875], 0.09375: [0.25, 0.5, 0.75, 0.0], 0.226318359375: [0.265625, 0.734375], 0.1875: [0.25, 0.5, 0.75, 0.0], 0.021240234375: [0.296875, 0.703125], 0.628662109375: [0.890625, 0.109375], 0.58984375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.704833984375: [0.828125, 0.171875], 0.96875: [0.5, 0.75, 0.0, 0.25], 0.165771484375: [0.921875, 0.078125], 0.120849609375: [0.859375, 0.140625], 0.271240234375: [0.296875, 0.703125], 0.169677734375: [0.953125, 0.046875], 0.286865234375: [0.796875, 0.203125], 0.046630859375: [0.984375, 0.015625], 0.476318359375: [0.734375, 0.265625], 0.4375: [0.5, 0.75, 0.0, 0.25], 0.833740234375: [0.703125, 0.296875], 0.6396484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.6875: [0.5, 0.75, 0.0, 0.25], 0.902099609375: [0.859375, 0.140625], 0.355224609375: [0.359375, 0.640625], 0.591552734375: [0.453125, 0.546875], 0.234130859375: [0.984375, 0.015625], 0.3505859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.659912109375: [0.890625, 0.109375], 0.62109375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.517333984375: [0.828125, 0.171875], 0.1162109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.013427734375: [0.953125, 0.046875], 0.173583984375: [0.828125, 0.171875], 0.767333984375: [0.828125, 0.171875], 0.124755859375: [0.484375, 0.515625], 0.245849609375: [0.859375, 0.140625], 0.9130859375: [0.65625, 0.84375, 0.15625, 0.34375], 0.796630859375: [0.984375, 0.015625], 0.302490234375: [0.296875, 0.703125], 0.491943359375: [0.765625, 0.234375], 0.453125: [0.375, 0.625, 0.875, 0.125], 0.864990234375: [0.703125, 0.296875], 0.6708984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.554443359375: [0.765625, 0.234375], 0.933349609375: [0.859375, 0.140625], 0.370849609375: [0.859375, 0.140625], 0.622802734375: [0.453125, 0.546875], 0.064208984375: [0.328125, 0.671875], 0.005615234375: [0.796875, 0.203125], 0.241943359375: [0.765625, 0.234375], 0.203125: [0.375, 0.625, 0.875, 0.125], 0.3662109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.691162109375: [0.890625, 0.109375], 0.65234375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.962646484375: [0.421875, 0.578125], 0.439208984375: [0.328125, 0.671875], 0.181396484375: [0.421875, 0.578125], 0.015625: [0.375, 0.625, 0.875, 0.125], 0.796875: [0.375, 0.625, 0.875, 0.125], 0.21484375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.9443359375: [0.65625, 0.84375, 0.15625, 0.34375], 0.827880859375: [0.984375, 0.015625], 0.08984375: [0.1875, 0.3125, 0.6875, 0.9375, 0.0625, 0.4375, 0.5625, 0.8125], 0.318115234375: [0.796875, 0.203125], 0.538818359375: [0.734375, 0.265625], 0.6552734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.986083984375: [0.828125, 0.171875], 0.46875: [0.5, 0.75, 0.0, 0.25], 0.896240234375: [0.703125, 0.296875], 0.7021484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.585693359375: [0.765625, 0.234375], 0.546875: [0.375, 0.625, 0.875, 0.125], 0.964599609375: [0.859375, 0.140625], 0.386474609375: [0.359375, 0.640625], 0.654052734375: [0.453125, 0.546875], 0.068115234375: [0.796875, 0.203125], 0.618896484375: [0.421875, 0.578125], 0.4052734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.019287109375: [0.390625, 0.609375], 0.249755859375: [0.484375, 0.515625], 0.3818359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.722412109375: [0.890625, 0.109375], 0.68359375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.265380859375: [0.984375, 0.015625], 0.519287109375: [0.390625, 0.609375], 0.454833984375: [0.828125, 0.171875], 0.189208984375: [0.328125, 0.671875], 0.9755859375: [0.65625, 0.84375, 0.15625, 0.34375], 0.859130859375: [0.984375, 0.015625], 0.333740234375: [0.296875, 0.703125], 0.128662109375: [0.890625, 0.109375], 0.689208984375: [0.671875, 0.328125], 0.484375: [0.375, 0.625, 0.875, 0.125], 0.927490234375: [0.703125, 0.296875], 0.056396484375: [0.421875, 0.578125], 0.7333984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.616943359375: [0.765625, 0.234375], 0.578125: [0.375, 0.625, 0.875, 0.125], 0.995849609375: [0.859375, 0.140625], 0.402099609375: [0.859375, 0.140625], 0.685302734375: [0.453125, 0.546875], 0.072021484375: [0.921875, 0.078125], 0.1083984375: [0.21875, 0.28125, 0.71875, 0.78125], 0.21875: [0.25, 0.5, 0.75, 0.0], 0.3974609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.753662109375: [0.890625, 0.109375], 0.71484375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.281005859375: [0.484375, 0.515625], 0.470458984375: [0.328125, 0.671875], 0.197021484375: [0.921875, 0.078125], 0.931396484375: [0.421875, 0.578125], 0.304443359375: [0.765625, 0.234375], 0.890380859375: [0.984375, 0.015625], 0.349365234375: [0.796875, 0.203125], 0.702880859375: [0.984375, 0.015625], 0.136474609375: [0.359375, 0.640625], 0.958740234375: [0.703125, 0.296875], 0.7646484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.648193359375: [0.765625, 0.234375], 0.609375: [0.375, 0.625, 0.875, 0.125], 0.829833984375: [0.828125, 0.171875], 0.417724609375: [0.359375, 0.640625], 0.716552734375: [0.453125, 0.546875], 0.075927734375: [0.953125, 0.046875], 0.1318359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.265625: [0.375, 0.625, 0.875, 0.125], 0.2958984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.4130859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.784912109375: [0.890625, 0.109375], 0.74609375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.2880859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.773193359375: [0.765625, 0.234375], 0.521240234375: [0.703125, 0.296875], 0.486083984375: [0.828125, 0.171875], 0.204833984375: [0.828125, 0.171875], 0.542724609375: [0.359375, 0.640625], 0.921630859375: [0.984375, 0.015625], 0.364990234375: [0.296875, 0.703125], 0.144287109375: [0.390625, 0.609375], 0.989990234375: [0.703125, 0.296875], 0.7958984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.679443359375: [0.765625, 0.234375], 0.640625: [0.375, 0.625, 0.875, 0.125], 0.433349609375: [0.859375, 0.140625], 0.747802734375: [0.453125, 0.546875], 0.079833984375: [0.828125, 0.171875], 0.1396484375: [0.21875, 0.28125, 0.71875, 0.78125], 0.5537109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.234375: [0.375, 0.625, 0.875, 0.125], 0.027099609375: [0.859375, 0.140625], 0.296630859375: [0.984375, 0.015625], 0.77734375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.312255859375: [0.484375, 0.515625], 0.212646484375: [0.421875, 0.578125], 0.573974609375: [0.359375, 0.640625], 0.5146484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.380615234375: [0.796875, 0.203125], 0.152099609375: [0.859375, 0.140625], 0.472412109375: [0.890625, 0.109375], 0.710693359375: [0.765625, 0.234375], 0.671875: [0.375, 0.625, 0.875, 0.125], 0.259521484375: [0.921875, 0.078125], 0.6318359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.448974609375: [0.359375, 0.640625], 0.779052734375: [0.453125, 0.546875], 0.083740234375: [0.296875, 0.703125], 0.1474609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.5849609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.673583984375: [0.828125, 0.171875], 0.4443359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.847412109375: [0.890625, 0.109375], 0.80859375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.327880859375: [0.984375, 0.015625], 0.853271484375: [0.921875, 0.078125], 0.536865234375: [0.796875, 0.203125], 0.523193359375: [0.765625, 0.234375], 0.976318359375: [0.734375, 0.265625], 0.220458984375: [0.328125, 0.671875], 0.130615234375: [0.796875, 0.203125], 0.556396484375: [0.421875, 0.578125], 0.515625: [0.375, 0.625, 0.875, 0.125], 0.109375: [0.375, 0.625, 0.875, 0.125], 0.396240234375: [0.296875, 0.703125], 0.159912109375: [0.890625, 0.109375], 0.743896484375: [0.421875, 0.578125], 0.8583984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.741943359375: [0.765625, 0.234375], 0.703125: [0.375, 0.625, 0.875, 0.125], 0.275146484375: [0.421875, 0.578125], 0.111083984375: [0.828125, 0.171875], 0.464599609375: [0.859375, 0.140625], 0.810302734375: [0.453125, 0.546875], 0.087646484375: [0.421875, 0.578125], 0.1552734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.6162109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.4599609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.878662109375: [0.890625, 0.109375], 0.83984375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.343505859375: [0.484375, 0.515625], 0.4912109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.228271484375: [0.921875, 0.078125], 0.636474609375: [0.359375, 0.640625], 0.0146484375: [0.21875, 0.28125, 0.71875, 0.78125], 0.306396484375: [0.421875, 0.578125], 0.411865234375: [0.796875, 0.203125], 0.167724609375: [0.359375, 0.640625], 0.638427734375: [0.953125, 0.046875], 0.8896484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.058349609375: [0.859375, 0.140625], 0.734375: [0.375, 0.625, 0.875, 0.125], 0.290771484375: [0.921875, 0.078125], 0.480224609375: [0.359375, 0.640625], 0.841552734375: [0.453125, 0.546875], 0.091552734375: [0.453125, 0.546875], 0.1630859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.6474609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.4755859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.909912109375: [0.890625, 0.109375], 0.87109375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.359130859375: [0.984375, 0.015625], 0.599365234375: [0.796875, 0.203125], 0.525146484375: [0.421875, 0.578125], 0.978271484375: [0.921875, 0.078125], 0.0224609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.667724609375: [0.359375, 0.640625], 0.060302734375: [0.453125, 0.546875], 0.177490234375: [0.296875, 0.703125], 0.427490234375: [0.296875, 0.703125], 0.175537109375: [0.390625, 0.609375], 0.9208984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.804443359375: [0.765625, 0.234375], 0.765625: [0.375, 0.625, 0.875, 0.125], 0.720458984375: [0.328125, 0.671875], 0.587646484375: [0.421875, 0.578125], 0.062255859375: [0.484375, 0.515625], 0.495849609375: [0.859375, 0.140625], 0.872802734375: [0.453125, 0.546875], 0.1708984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.6787109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.562255859375: [0.484375, 0.515625], 0.031005859375: [0.484375, 0.515625], 0.941162109375: [0.890625, 0.109375], 0.90234375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.374755859375: [0.484375, 0.515625], 0.630615234375: [0.796875, 0.203125], 0.243896484375: [0.421875, 0.578125], 0.698974609375: [0.359375, 0.640625], 0.761474609375: [0.359375, 0.640625], 0.253662109375: [0.890625, 0.109375], 0.657958984375: [0.328125, 0.671875], 0.12109375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.443115234375: [0.796875, 0.203125], 0.183349609375: [0.859375, 0.140625], 0.775146484375: [0.421875, 0.578125], 0.9521484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.835693359375: [0.765625, 0.234375], 0.298583984375: [0.828125, 0.171875], 0.322021484375: [0.921875, 0.078125], 0.788818359375: [0.734375, 0.265625], 0.601318359375: [0.734375, 0.265625], 0.75: [0.5, 0.75, 0.0, 0.25], 0.904052734375: [0.453125, 0.546875], 0.099365234375: [0.203125, 0.796875], 0.1787109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.7099609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.593505859375: [0.484375, 0.515625], 0.972412109375: [0.890625, 0.109375], 0.93359375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.390380859375: [0.984375, 0.015625], 0.661865234375: [0.796875, 0.203125], 0.816162109375: [0.890625, 0.109375], 0.527099609375: [0.859375, 0.140625], 0.730224609375: [0.359375, 0.640625], 0.269287109375: [0.390625, 0.609375], 0.458740234375: [0.296875, 0.703125], 0.191162109375: [0.890625, 0.109375], 0.15234375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.2646484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.9599609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.798583984375: [0.828125, 0.171875], 0.9833984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.866943359375: [0.765625, 0.234375], 0.828125: [0.375, 0.625, 0.875, 0.125], 0.337646484375: [0.421875, 0.578125], 0.032958984375: [0.328125, 0.671875], 0.935302734375: [0.453125, 0.546875], 0.103271484375: [0.921875, 0.078125], 0.7412109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.624755859375: [0.484375, 0.515625], 0.96484375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.406005859375: [0.484375, 0.515625], 0.693115234375: [0.796875, 0.203125], 0.884521484375: [0.921875, 0.078125], 0.868896484375: [0.421875, 0.578125], 0.034912109375: [0.890625, 0.109375], 0.284912109375: [0.890625, 0.109375], 0.859375: [0.375, 0.625, 0.875, 0.125], 0.308349609375: [0.859375, 0.140625], 0.474365234375: [0.796875, 0.203125], 0.198974609375: [0.359375, 0.640625], 0.2802734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.898193359375: [0.765625, 0.234375], 0.366943359375: [0.765625, 0.234375], 0.353271484375: [0.921875, 0.078125], 0.138427734375: [0.953125, 0.046875], 0.05859375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.107177734375: [0.953125, 0.046875], 0.3349609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.7724609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.656005859375: [0.484375, 0.515625], 0.939208984375: [0.671875, 0.328125], 0.99609375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.724365234375: [0.796875, 0.203125], 0.952880859375: [0.984375, 0.015625], 0.642333984375: [0.828125, 0.171875], 0.529052734375: [0.453125, 0.546875], 0.1943359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.300537109375: [0.390625, 0.609375], 0.046875: [0.375, 0.625, 0.875, 0.125], 0.489990234375: [0.296875, 0.703125], 0.501708984375: [0.328125, 0.671875], 0.206787109375: [0.390625, 0.609375], 0.550537109375: [0.390625, 0.609375], 0.929443359375: [0.765625, 0.234375], 0.890625: [0.625, 0.875, 0.125, 0.375], 0.368896484375: [0.421875, 0.578125], 0.146240234375: [0.296875, 0.703125], 0.997802734375: [0.453125, 0.546875], 0.095458984375: [0.328125, 0.671875], 0.2021484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.8037109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.687255859375: [0.484375, 0.515625], 0.697021484375: [0.921875, 0.078125], 0.769287109375: [0.390625, 0.609375], 0.437255859375: [0.484375, 0.515625], 0.755615234375: [0.796875, 0.203125], 0.5615234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.8271484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.823974609375: [0.359375, 0.640625], 0.316162109375: [0.890625, 0.109375], 0.27734375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.712646484375: [0.421875, 0.578125], 0.1865234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.5224609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.984130859375: [0.984375, 0.015625], 0.214599609375: [0.859375, 0.140625], 0.3115234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.581787109375: [0.390625, 0.609375], 0.960693359375: [0.765625, 0.234375], 0.921875: [0.625, 0.875, 0.125, 0.375], 0.384521484375: [0.921875, 0.078125], 0.038818359375: [0.265625, 0.734375], 0.751708984375: [0.671875, 0.328125], 0.114990234375: [0.296875, 0.703125], 0.2099609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.8349609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.718505859375: [0.484375, 0.515625], 0.765380859375: [0.984375, 0.015625], 0.8818359375: [0.65625, 0.84375, 0.15625, 0.34375], 0.452880859375: [0.984375, 0.015625], 0.786865234375: [0.796875, 0.203125], 0.5927734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.531005859375: [0.484375, 0.515625], 0.855224609375: [0.640625, 0.359375], 0.331787109375: [0.390625, 0.609375], 0.792724609375: [0.359375, 0.640625], 0.544677734375: [0.953125, 0.046875], 0.726318359375: [0.734375, 0.265625], 0.222412109375: [0.890625, 0.109375], 0.18359375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.3271484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.613037109375: [0.390625, 0.609375], 0.991943359375: [0.765625, 0.234375], 0.953125: [0.375, 0.625, 0.875, 0.125], 0.040771484375: [0.921875, 0.078125], 0.118896484375: [0.421875, 0.578125], 0.2177734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.8662109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.749755859375: [0.484375, 0.515625], 0.279052734375: [0.453125, 0.546875], 0.468505859375: [0.484375, 0.515625], 0.818115234375: [0.796875, 0.203125], 0.6240234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.923583984375: [0.828125, 0.171875], 0.886474609375: [0.640625, 0.359375], 0.347412109375: [0.890625, 0.109375], 0.30859375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.575927734375: [0.953125, 0.046875], 0.263427734375: [0.953125, 0.046875], 0.876708984375: [0.671875, 0.328125], 0.230224609375: [0.359375, 0.640625], 0.3427734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.644287109375: [0.390625, 0.609375], 0.564208984375: [0.328125, 0.671875], 0.984375: [0.625, 0.875, 0.125, 0.375], 0.415771484375: [0.921875, 0.078125], 0.042724609375: [0.359375, 0.640625], 0.888427734375: [0.953125, 0.046875], 0.993896484375: [0.421875, 0.578125], 0.122802734375: [0.453125, 0.546875], 0.2255859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.8974609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.781005859375: [0.484375, 0.515625], 0.294677734375: [0.953125, 0.046875], 0.484130859375: [0.984375, 0.015625], 0.849365234375: [0.796875, 0.203125], 0.605224609375: [0.359375, 0.640625], 0.532958984375: [0.328125, 0.671875], 0.025146484375: [0.421875, 0.578125], 0.0302734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.917724609375: [0.640625, 0.359375], 0.036865234375: [0.796875, 0.203125], 0.607177734375: [0.953125, 0.046875], 0.140380859375: [0.984375, 0.015625], 0.003662109375: [0.890625, 0.109375], 0.238037109375: [0.390625, 0.609375], 0.3583984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.675537109375: [0.390625, 0.609375], 0.431396484375: [0.421875, 0.578125], 0.044677734375: [0.953125, 0.046875], 0.2333984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.9287109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.812255859375: [0.484375, 0.515625], 0.310302734375: [0.453125, 0.546875], 0.970458984375: [0.671875, 0.328125], 0.499755859375: [0.484375, 0.515625], 0.880615234375: [0.796875, 0.203125], 0.6865234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.570068359375: [0.734375, 0.265625], 0.948974609375: [0.359375, 0.640625], 0.378662109375: [0.890625, 0.109375], 0.33984375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.0380859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.066162109375: [0.890625, 0.109375], 0.171875: [0.375, 0.625, 0.875, 0.125], 0.011474609375: [0.359375, 0.640625], 0.3740234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.706787109375: [0.390625, 0.609375], 0.257568359375: [0.265625, 0.734375], 0.447021484375: [0.921875, 0.078125], 0.185302734375: [0.453125, 0.546875], 0.023193359375: [0.234375, 0.765625], 0.2412109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.4287109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.843505859375: [0.484375, 0.515625], 0.423583984375: [0.828125, 0.171875], 0.325927734375: [0.953125, 0.046875], 0.728271484375: [0.921875, 0.078125], 0.837646484375: [0.421875, 0.578125], 0.911865234375: [0.796875, 0.203125], 0.7177734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.503662109375: [0.890625, 0.109375], 0.5625: [0.5, 0.75, 0.0, 0.25], 0.947021484375: [0.921875, 0.078125], 0.980224609375: [0.640625, 0.359375], 0.394287109375: [0.390625, 0.609375], 0.669677734375: [0.953125, 0.046875], 0.070068359375: [0.265625, 0.734375], 0.52734375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.03125: [0.25, 0.5, 0.75, 0.0], 0.3896484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.738037109375: [0.390625, 0.609375], 0.273193359375: [0.765625, 0.234375], 0.907958984375: [0.671875, 0.328125], 0.462646484375: [0.421875, 0.578125], 0.193115234375: [0.796875, 0.203125], 0.782958984375: [0.671875, 0.328125], 0.2490234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.9912109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.874755859375: [0.484375, 0.515625], 0.341552734375: [0.453125, 0.546875], 0.132568359375: [0.265625, 0.734375], 0.851318359375: [0.734375, 0.265625], 0.943115234375: [0.796875, 0.203125], 0.7490234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.632568359375: [0.734375, 0.265625], 0.59375: [0.5, 0.75, 0.0, 0.25], 0.409912109375: [0.890625, 0.109375], 0.37109375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.700927734375: [0.953125, 0.046875], 0.073974609375: [0.359375, 0.640625], 0.421630859375: [0.984375, 0.015625], 0.142333984375: [0.828125, 0.171875], 0.050537109375: [0.390625, 0.609375], 0.288818359375: [0.265625, 0.734375], 0.25: [0.5, 0.75, 0.0, 0.25], 0.611083984375: [0.828125, 0.171875], 0.478271484375: [0.921875, 0.078125], 0.200927734375: [0.953125, 0.046875], 0.540771484375: [0.921875, 0.078125], 0.8125: [0.5, 0.75, 0.0, 0.25], 0.906005859375: [0.484375, 0.515625], 0.357177734375: [0.953125, 0.046875], 0.400146484375: [0.421875, 0.578125]} averages_odd={0.0: [0.25, 0.5, 0.75, 0.0], 0.001708984375: [0.328125, 0.671875], 0.216552734375: [0.453125, 0.546875], 0.974365234375: [0.796875, 0.203125], 0.0068359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.029052734375: [0.453125, 0.546875], 0.505615234375: [0.796875, 0.203125], 0.0693359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.681396484375: [0.421875, 0.578125], 0.425537109375: [0.390625, 0.609375], 0.732177734375: [0.953125, 0.046875], 0.892333984375: [0.828125, 0.171875], 0.5380859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.915771484375: [0.921875, 0.078125], 0.5: [0.5, 0.75, 0.0, 0.25], 0.4208984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.800537109375: [0.390625, 0.609375], 0.595458984375: [0.671875, 0.328125], 0.493896484375: [0.421875, 0.578125], 0.052490234375: [0.296875, 0.703125], 0.966552734375: [0.453125, 0.546875], 0.558349609375: [0.859375, 0.140625], 0.007568359375: [0.265625, 0.734375], 0.937255859375: [0.484375, 0.515625], 0.372802734375: [0.453125, 0.546875], 0.148193359375: [0.234375, 0.765625], 0.568115234375: [0.796875, 0.203125], 0.8115234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.695068359375: [0.734375, 0.265625], 0.65625: [0.5, 0.75, 0.0, 0.25], 0.251708984375: [0.328125, 0.671875], 0.441162109375: [0.890625, 0.109375], 0.40234375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.154052734375: [0.453125, 0.546875], 0.081787109375: [0.390625, 0.609375], 0.650146484375: [0.421875, 0.578125], 0.5693359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.5302734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.4365234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.831787109375: [0.390625, 0.609375], 0.320068359375: [0.265625, 0.734375], 0.28125: [0.25, 0.5, 0.75, 0.0], 0.7802734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.625: [0.5, 0.75, 0.0, 0.25], 0.054443359375: [0.234375, 0.765625], 0.589599609375: [0.859375, 0.140625], 0.968505859375: [0.484375, 0.515625], 0.388427734375: [0.953125, 0.046875], 0.156005859375: [0.484375, 0.515625], 0.8427734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.507568359375: [0.734375, 0.265625], 0.0771484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.267333984375: [0.828125, 0.171875], 0.456787109375: [0.390625, 0.609375], 0.794677734375: [0.953125, 0.046875], 0.085693359375: [0.765625, 0.234375], 0.6005859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.53125: [0.5, 0.75, 0.0, 0.25], 0.24609375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.4521484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.863037109375: [0.390625, 0.609375], 0.335693359375: [0.765625, 0.234375], 0.296875: [0.375, 0.625, 0.875, 0.125], 0.552490234375: [0.703125, 0.296875], 0.224365234375: [0.796875, 0.203125], 0.620849609375: [0.859375, 0.140625], 0.1240234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.999755859375: [0.484375, 0.515625], 0.404052734375: [0.453125, 0.546875], 0.163818359375: [0.265625, 0.734375], 0.759521484375: [0.921875, 0.078125], 0.125: [0.25, 0.5, 0.75, 0.0], 0.8740234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.757568359375: [0.734375, 0.265625], 0.71875: [0.5, 0.75, 0.0, 0.25], 0.282958984375: [0.328125, 0.671875], 0.015380859375: [0.984375, 0.015625], 0.825927734375: [0.953125, 0.046875], 0.089599609375: [0.859375, 0.140625], 0.407958984375: [0.328125, 0.671875], 0.4677734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.894287109375: [0.390625, 0.609375], 0.351318359375: [0.734375, 0.265625], 0.3125: [0.25, 0.5, 0.75, 0.0], 0.583740234375: [0.703125, 0.296875], 0.665771484375: [0.921875, 0.078125], 0.232177734375: [0.953125, 0.046875], 0.017333984375: [0.828125, 0.171875], 0.652099609375: [0.859375, 0.140625], 0.814208984375: [0.671875, 0.328125], 0.419677734375: [0.953125, 0.046875], 0.171630859375: [0.984375, 0.015625], 0.9052734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.509521484375: [0.921875, 0.078125], 0.0849609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.009521484375: [0.921875, 0.078125], 0.736083984375: [0.828125, 0.171875], 0.488037109375: [0.390625, 0.609375], 0.857177734375: [0.953125, 0.046875], 0.093505859375: [0.484375, 0.515625], 0.236083984375: [0.828125, 0.171875], 0.6630859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.546630859375: [0.984375, 0.015625], 0.4833984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.925537109375: [0.390625, 0.609375], 0.208740234375: [0.296875, 0.703125], 0.328125: [0.375, 0.625, 0.875, 0.125], 0.614990234375: [0.296875, 0.703125], 0.048583984375: [0.828125, 0.171875], 0.239990234375: [0.296875, 0.703125], 0.683349609375: [0.859375, 0.140625], 0.572021484375: [0.921875, 0.078125], 0.806396484375: [0.421875, 0.578125], 0.435302734375: [0.453125, 0.546875], 0.179443359375: [0.765625, 0.234375], 0.140625: [0.375, 0.625, 0.875, 0.125], 0.9365234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.820068359375: [0.734375, 0.265625], 0.78125: [0.5, 0.75, 0.0, 0.25], 0.314208984375: [0.328125, 0.671875], 0.46484375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.0537109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.097412109375: [0.890625, 0.109375], 0.6943359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.577880859375: [0.984375, 0.015625], 0.566162109375: [0.890625, 0.109375], 0.4990234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.956787109375: [0.390625, 0.609375], 0.382568359375: [0.734375, 0.265625], 0.34375: [0.5, 0.75, 0.0, 0.25], 0.646240234375: [0.703125, 0.296875], 0.626708984375: [0.328125, 0.671875], 0.247802734375: [0.453125, 0.546875], 0.714599609375: [0.859375, 0.140625], 0.261474609375: [0.359375, 0.640625], 0.02734375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.7568359375: [0.65625, 0.84375, 0.15625, 0.34375], 0.450927734375: [0.953125, 0.046875], 0.187255859375: [0.484375, 0.515625], 0.2568359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.0458984375: [0.21875, 0.28125, 0.71875, 0.78125], 0.9677734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.511474609375: [0.359375, 0.640625], 0.0927734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.329833984375: [0.828125, 0.171875], 0.126708984375: [0.328125, 0.671875], 0.919677734375: [0.953125, 0.046875], 0.101318359375: [0.265625, 0.734375], 0.161865234375: [0.796875, 0.203125], 0.7255859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.609130859375: [0.984375, 0.015625], 0.0625: [0.25, 0.5, 0.75, 0.0], 0.579833984375: [0.828125, 0.171875], 0.988037109375: [0.390625, 0.609375], 0.398193359375: [0.765625, 0.234375], 0.359375: [0.375, 0.625, 0.875, 0.125], 0.677490234375: [0.703125, 0.296875], 0.745849609375: [0.859375, 0.140625], 0.277099609375: [0.859375, 0.140625], 0.466552734375: [0.453125, 0.546875], 0.195068359375: [0.265625, 0.734375], 0.15625: [0.25, 0.5, 0.75, 0.0], 0.2724609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.822021484375: [0.921875, 0.078125], 0.9990234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.882568359375: [0.734375, 0.265625], 0.84375: [0.5, 0.75, 0.0, 0.25], 0.345458984375: [0.328125, 0.671875], 0.134521484375: [0.921875, 0.078125], 0.49609375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.950927734375: [0.953125, 0.046875], 0.105224609375: [0.359375, 0.640625], 0.363037109375: [0.390625, 0.609375], 0.640380859375: [0.984375, 0.015625], 0.413818359375: [0.734375, 0.265625], 0.375: [0.5, 0.75, 0.0, 0.25], 0.708740234375: [0.703125, 0.296875], 0.763427734375: [0.953125, 0.046875], 0.777099609375: [0.859375, 0.140625], 0.292724609375: [0.359375, 0.640625], 0.43359375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.482177734375: [0.953125, 0.046875], 0.202880859375: [0.984375, 0.015625], 0.790771484375: [0.921875, 0.078125], 0.534912109375: [0.890625, 0.109375], 0.663818359375: [0.734375, 0.265625], 0.513427734375: [0.953125, 0.046875], 0.1005859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.361083984375: [0.828125, 0.171875], 0.603271484375: [0.921875, 0.078125], 0.0615234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.109130859375: [0.984375, 0.015625], 0.7880859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.671630859375: [0.984375, 0.015625], 0.429443359375: [0.765625, 0.234375], 0.390625: [0.375, 0.625, 0.875, 0.125], 0.739990234375: [0.703125, 0.296875], 0.5458984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.808349609375: [0.859375, 0.140625], 0.845458984375: [0.671875, 0.328125], 0.077880859375: [0.984375, 0.015625], 0.861083984375: [0.828125, 0.171875], 0.497802734375: [0.453125, 0.546875], 0.210693359375: [0.234375, 0.765625], 0.3037109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.548583984375: [0.828125, 0.171875], 0.945068359375: [0.734375, 0.265625], 0.90625: [0.5, 0.75, 0.0, 0.25], 0.376708984375: [0.328125, 0.671875], 0.150146484375: [0.421875, 0.578125], 0.113037109375: [0.390625, 0.609375], 0.8193359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.5068359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.255615234375: [0.796875, 0.203125], 0.445068359375: [0.265625, 0.734375], 0.40625: [0.5, 0.75, 0.0, 0.25], 0.771240234375: [0.703125, 0.296875], 0.900146484375: [0.421875, 0.578125], 0.5771484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.839599609375: [0.859375, 0.140625], 0.323974609375: [0.359375, 0.640625], 0.913818359375: [0.734375, 0.265625], 0.875: [0.5, 0.75, 0.0, 0.25], 0.218505859375: [0.484375, 0.515625], 0.3193359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.597412109375: [0.890625, 0.109375], 0.55859375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.515380859375: [0.984375, 0.015625], 0.9375: [0.5, 0.75, 0.0, 0.25], 0.392333984375: [0.828125, 0.171875], 0.157958984375: [0.328125, 0.671875], 0.116943359375: [0.234375, 0.765625], 0.8505859375: [0.65625, 0.84375, 0.15625, 0.34375], 0.734130859375: [0.984375, 0.015625], 0.078125: [0.375, 0.625, 0.875, 0.125], 0.954833984375: [0.828125, 0.171875], 0.634521484375: [0.921875, 0.078125], 0.460693359375: [0.765625, 0.234375], 0.421875: [0.375, 0.625, 0.875, 0.125], 0.802490234375: [0.703125, 0.296875], 0.6083984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.870849609375: [0.859375, 0.140625], 0.339599609375: [0.859375, 0.140625], 0.982177734375: [0.953125, 0.046875], 0.560302734375: [0.453125, 0.546875], 0.09375: [0.25, 0.5, 0.75, 0.0], 0.226318359375: [0.265625, 0.734375], 0.1875: [0.25, 0.5, 0.75, 0.0], 0.021240234375: [0.296875, 0.703125], 0.628662109375: [0.890625, 0.109375], 0.58984375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.704833984375: [0.828125, 0.171875], 0.96875: [0.5, 0.75, 0.0, 0.25], 0.165771484375: [0.921875, 0.078125], 0.120849609375: [0.859375, 0.140625], 0.271240234375: [0.296875, 0.703125], 0.169677734375: [0.953125, 0.046875], 0.286865234375: [0.796875, 0.203125], 0.046630859375: [0.984375, 0.015625], 0.476318359375: [0.734375, 0.265625], 0.4375: [0.5, 0.75, 0.0, 0.25], 0.833740234375: [0.703125, 0.296875], 0.6396484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.6875: [0.5, 0.75, 0.0, 0.25], 0.902099609375: [0.859375, 0.140625], 0.355224609375: [0.359375, 0.640625], 0.591552734375: [0.453125, 0.546875], 0.234130859375: [0.984375, 0.015625], 0.3505859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.659912109375: [0.890625, 0.109375], 0.62109375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.517333984375: [0.828125, 0.171875], 0.1162109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.013427734375: [0.953125, 0.046875], 0.173583984375: [0.828125, 0.171875], 0.767333984375: [0.828125, 0.171875], 0.124755859375: [0.484375, 0.515625], 0.245849609375: [0.859375, 0.140625], 0.9130859375: [0.65625, 0.84375, 0.15625, 0.34375], 0.796630859375: [0.984375, 0.015625], 0.302490234375: [0.296875, 0.703125], 0.491943359375: [0.765625, 0.234375], 0.453125: [0.375, 0.625, 0.875, 0.125], 0.864990234375: [0.703125, 0.296875], 0.6708984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.554443359375: [0.765625, 0.234375], 0.933349609375: [0.859375, 0.140625], 0.370849609375: [0.859375, 0.140625], 0.622802734375: [0.453125, 0.546875], 0.064208984375: [0.328125, 0.671875], 0.005615234375: [0.796875, 0.203125], 0.241943359375: [0.765625, 0.234375], 0.203125: [0.375, 0.625, 0.875, 0.125], 0.3662109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.691162109375: [0.890625, 0.109375], 0.65234375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.962646484375: [0.421875, 0.578125], 0.439208984375: [0.328125, 0.671875], 0.181396484375: [0.421875, 0.578125], 0.015625: [0.375, 0.625, 0.875, 0.125], 0.796875: [0.375, 0.625, 0.875, 0.125], 0.21484375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.9443359375: [0.65625, 0.84375, 0.15625, 0.34375], 0.827880859375: [0.984375, 0.015625], 0.08984375: [0.1875, 0.3125, 0.6875, 0.9375, 0.0625, 0.4375, 0.5625, 0.8125], 0.318115234375: [0.796875, 0.203125], 0.538818359375: [0.734375, 0.265625], 0.6552734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.986083984375: [0.828125, 0.171875], 0.46875: [0.5, 0.75, 0.0, 0.25], 0.896240234375: [0.703125, 0.296875], 0.7021484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.585693359375: [0.765625, 0.234375], 0.546875: [0.375, 0.625, 0.875, 0.125], 0.964599609375: [0.859375, 0.140625], 0.386474609375: [0.359375, 0.640625], 0.654052734375: [0.453125, 0.546875], 0.068115234375: [0.796875, 0.203125], 0.618896484375: [0.421875, 0.578125], 0.4052734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.019287109375: [0.390625, 0.609375], 0.249755859375: [0.484375, 0.515625], 0.3818359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.722412109375: [0.890625, 0.109375], 0.68359375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.265380859375: [0.984375, 0.015625], 0.519287109375: [0.390625, 0.609375], 0.454833984375: [0.828125, 0.171875], 0.189208984375: [0.328125, 0.671875], 0.9755859375: [0.65625, 0.84375, 0.15625, 0.34375], 0.859130859375: [0.984375, 0.015625], 0.333740234375: [0.296875, 0.703125], 0.128662109375: [0.890625, 0.109375], 0.689208984375: [0.671875, 0.328125], 0.484375: [0.375, 0.625, 0.875, 0.125], 0.927490234375: [0.703125, 0.296875], 0.056396484375: [0.421875, 0.578125], 0.7333984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.616943359375: [0.765625, 0.234375], 0.578125: [0.375, 0.625, 0.875, 0.125], 0.995849609375: [0.859375, 0.140625], 0.402099609375: [0.859375, 0.140625], 0.685302734375: [0.453125, 0.546875], 0.072021484375: [0.921875, 0.078125], 0.1083984375: [0.21875, 0.28125, 0.71875, 0.78125], 0.21875: [0.25, 0.5, 0.75, 0.0], 0.3974609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.753662109375: [0.890625, 0.109375], 0.71484375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.281005859375: [0.484375, 0.515625], 0.470458984375: [0.328125, 0.671875], 0.197021484375: [0.921875, 0.078125], 0.931396484375: [0.421875, 0.578125], 0.304443359375: [0.765625, 0.234375], 0.890380859375: [0.984375, 0.015625], 0.349365234375: [0.796875, 0.203125], 0.702880859375: [0.984375, 0.015625], 0.136474609375: [0.359375, 0.640625], 0.958740234375: [0.703125, 0.296875], 0.7646484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.648193359375: [0.765625, 0.234375], 0.609375: [0.375, 0.625, 0.875, 0.125], 0.829833984375: [0.828125, 0.171875], 0.417724609375: [0.359375, 0.640625], 0.716552734375: [0.453125, 0.546875], 0.075927734375: [0.953125, 0.046875], 0.1318359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.265625: [0.375, 0.625, 0.875, 0.125], 0.2958984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.4130859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.784912109375: [0.890625, 0.109375], 0.74609375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.2880859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.773193359375: [0.765625, 0.234375], 0.521240234375: [0.703125, 0.296875], 0.486083984375: [0.828125, 0.171875], 0.204833984375: [0.828125, 0.171875], 0.542724609375: [0.359375, 0.640625], 0.921630859375: [0.984375, 0.015625], 0.364990234375: [0.296875, 0.703125], 0.144287109375: [0.390625, 0.609375], 0.989990234375: [0.703125, 0.296875], 0.7958984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.679443359375: [0.765625, 0.234375], 0.640625: [0.375, 0.625, 0.875, 0.125], 0.433349609375: [0.859375, 0.140625], 0.747802734375: [0.453125, 0.546875], 0.079833984375: [0.828125, 0.171875], 0.1396484375: [0.21875, 0.28125, 0.71875, 0.78125], 0.5537109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.234375: [0.375, 0.625, 0.875, 0.125], 0.027099609375: [0.859375, 0.140625], 0.296630859375: [0.984375, 0.015625], 0.77734375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.312255859375: [0.484375, 0.515625], 0.212646484375: [0.421875, 0.578125], 0.573974609375: [0.359375, 0.640625], 0.5146484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.380615234375: [0.796875, 0.203125], 0.152099609375: [0.859375, 0.140625], 0.472412109375: [0.890625, 0.109375], 0.710693359375: [0.765625, 0.234375], 0.671875: [0.375, 0.625, 0.875, 0.125], 0.259521484375: [0.921875, 0.078125], 0.6318359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.448974609375: [0.359375, 0.640625], 0.779052734375: [0.453125, 0.546875], 0.083740234375: [0.296875, 0.703125], 0.1474609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.5849609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.673583984375: [0.828125, 0.171875], 0.4443359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.847412109375: [0.890625, 0.109375], 0.80859375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.327880859375: [0.984375, 0.015625], 0.853271484375: [0.921875, 0.078125], 0.536865234375: [0.796875, 0.203125], 0.523193359375: [0.765625, 0.234375], 0.976318359375: [0.734375, 0.265625], 0.220458984375: [0.328125, 0.671875], 0.130615234375: [0.796875, 0.203125], 0.556396484375: [0.421875, 0.578125], 0.515625: [0.375, 0.625, 0.875, 0.125], 0.109375: [0.375, 0.625, 0.875, 0.125], 0.396240234375: [0.296875, 0.703125], 0.159912109375: [0.890625, 0.109375], 0.743896484375: [0.421875, 0.578125], 0.8583984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.741943359375: [0.765625, 0.234375], 0.703125: [0.375, 0.625, 0.875, 0.125], 0.275146484375: [0.421875, 0.578125], 0.111083984375: [0.828125, 0.171875], 0.464599609375: [0.859375, 0.140625], 0.810302734375: [0.453125, 0.546875], 0.087646484375: [0.421875, 0.578125], 0.1552734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.6162109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.4599609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.878662109375: [0.890625, 0.109375], 0.83984375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.343505859375: [0.484375, 0.515625], 0.4912109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.228271484375: [0.921875, 0.078125], 0.636474609375: [0.359375, 0.640625], 0.0146484375: [0.21875, 0.28125, 0.71875, 0.78125], 0.306396484375: [0.421875, 0.578125], 0.411865234375: [0.796875, 0.203125], 0.167724609375: [0.359375, 0.640625], 0.638427734375: [0.953125, 0.046875], 0.8896484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.058349609375: [0.859375, 0.140625], 0.734375: [0.375, 0.625, 0.875, 0.125], 0.290771484375: [0.921875, 0.078125], 0.480224609375: [0.359375, 0.640625], 0.841552734375: [0.453125, 0.546875], 0.091552734375: [0.453125, 0.546875], 0.1630859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.6474609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.4755859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.909912109375: [0.890625, 0.109375], 0.87109375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.359130859375: [0.984375, 0.015625], 0.599365234375: [0.796875, 0.203125], 0.525146484375: [0.421875, 0.578125], 0.978271484375: [0.921875, 0.078125], 0.0224609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.667724609375: [0.359375, 0.640625], 0.060302734375: [0.453125, 0.546875], 0.177490234375: [0.296875, 0.703125], 0.427490234375: [0.296875, 0.703125], 0.175537109375: [0.390625, 0.609375], 0.9208984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.804443359375: [0.765625, 0.234375], 0.765625: [0.375, 0.625, 0.875, 0.125], 0.720458984375: [0.328125, 0.671875], 0.587646484375: [0.421875, 0.578125], 0.062255859375: [0.484375, 0.515625], 0.495849609375: [0.859375, 0.140625], 0.872802734375: [0.453125, 0.546875], 0.1708984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.6787109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.562255859375: [0.484375, 0.515625], 0.031005859375: [0.484375, 0.515625], 0.941162109375: [0.890625, 0.109375], 0.90234375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.374755859375: [0.484375, 0.515625], 0.630615234375: [0.796875, 0.203125], 0.243896484375: [0.421875, 0.578125], 0.698974609375: [0.359375, 0.640625], 0.761474609375: [0.359375, 0.640625], 0.253662109375: [0.890625, 0.109375], 0.657958984375: [0.328125, 0.671875], 0.12109375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.443115234375: [0.796875, 0.203125], 0.183349609375: [0.859375, 0.140625], 0.775146484375: [0.421875, 0.578125], 0.9521484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.835693359375: [0.765625, 0.234375], 0.298583984375: [0.828125, 0.171875], 0.322021484375: [0.921875, 0.078125], 0.788818359375: [0.734375, 0.265625], 0.601318359375: [0.734375, 0.265625], 0.75: [0.5, 0.75, 0.0, 0.25], 0.904052734375: [0.453125, 0.546875], 0.099365234375: [0.203125, 0.796875], 0.1787109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.7099609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.593505859375: [0.484375, 0.515625], 0.972412109375: [0.890625, 0.109375], 0.93359375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.390380859375: [0.984375, 0.015625], 0.661865234375: [0.796875, 0.203125], 0.816162109375: [0.890625, 0.109375], 0.527099609375: [0.859375, 0.140625], 0.730224609375: [0.359375, 0.640625], 0.269287109375: [0.390625, 0.609375], 0.458740234375: [0.296875, 0.703125], 0.191162109375: [0.890625, 0.109375], 0.15234375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.2646484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.9599609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.798583984375: [0.828125, 0.171875], 0.9833984375: [0.71875, 0.78125, 0.21875, 0.28125], 0.866943359375: [0.765625, 0.234375], 0.828125: [0.375, 0.625, 0.875, 0.125], 0.337646484375: [0.421875, 0.578125], 0.032958984375: [0.328125, 0.671875], 0.935302734375: [0.453125, 0.546875], 0.103271484375: [0.921875, 0.078125], 0.7412109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.624755859375: [0.484375, 0.515625], 0.96484375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.406005859375: [0.484375, 0.515625], 0.693115234375: [0.796875, 0.203125], 0.884521484375: [0.921875, 0.078125], 0.868896484375: [0.421875, 0.578125], 0.034912109375: [0.890625, 0.109375], 0.284912109375: [0.890625, 0.109375], 0.859375: [0.375, 0.625, 0.875, 0.125], 0.308349609375: [0.859375, 0.140625], 0.474365234375: [0.796875, 0.203125], 0.198974609375: [0.359375, 0.640625], 0.2802734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.898193359375: [0.765625, 0.234375], 0.366943359375: [0.765625, 0.234375], 0.353271484375: [0.921875, 0.078125], 0.138427734375: [0.953125, 0.046875], 0.05859375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.107177734375: [0.953125, 0.046875], 0.3349609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.7724609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.656005859375: [0.484375, 0.515625], 0.939208984375: [0.671875, 0.328125], 0.99609375: [0.4375, 0.5625, 0.9375, 0.8125, 0.1875, 0.3125, 0.6875, 0.0625], 0.724365234375: [0.796875, 0.203125], 0.952880859375: [0.984375, 0.015625], 0.642333984375: [0.828125, 0.171875], 0.529052734375: [0.453125, 0.546875], 0.1943359375: [0.34375, 0.65625, 0.84375, 0.15625], 0.300537109375: [0.390625, 0.609375], 0.046875: [0.375, 0.625, 0.875, 0.125], 0.489990234375: [0.296875, 0.703125], 0.501708984375: [0.328125, 0.671875], 0.206787109375: [0.390625, 0.609375], 0.550537109375: [0.390625, 0.609375], 0.929443359375: [0.765625, 0.234375], 0.890625: [0.625, 0.875, 0.125, 0.375], 0.368896484375: [0.421875, 0.578125], 0.146240234375: [0.296875, 0.703125], 0.997802734375: [0.453125, 0.546875], 0.095458984375: [0.328125, 0.671875], 0.2021484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.8037109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.687255859375: [0.484375, 0.515625], 0.697021484375: [0.921875, 0.078125], 0.769287109375: [0.390625, 0.609375], 0.437255859375: [0.484375, 0.515625], 0.755615234375: [0.796875, 0.203125], 0.5615234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.8271484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.823974609375: [0.359375, 0.640625], 0.316162109375: [0.890625, 0.109375], 0.27734375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.712646484375: [0.421875, 0.578125], 0.1865234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.5224609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.984130859375: [0.984375, 0.015625], 0.214599609375: [0.859375, 0.140625], 0.3115234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.581787109375: [0.390625, 0.609375], 0.960693359375: [0.765625, 0.234375], 0.921875: [0.625, 0.875, 0.125, 0.375], 0.384521484375: [0.921875, 0.078125], 0.038818359375: [0.265625, 0.734375], 0.751708984375: [0.671875, 0.328125], 0.114990234375: [0.296875, 0.703125], 0.2099609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.8349609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.718505859375: [0.484375, 0.515625], 0.765380859375: [0.984375, 0.015625], 0.8818359375: [0.65625, 0.84375, 0.15625, 0.34375], 0.452880859375: [0.984375, 0.015625], 0.786865234375: [0.796875, 0.203125], 0.5927734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.531005859375: [0.484375, 0.515625], 0.855224609375: [0.640625, 0.359375], 0.331787109375: [0.390625, 0.609375], 0.792724609375: [0.359375, 0.640625], 0.544677734375: [0.953125, 0.046875], 0.726318359375: [0.734375, 0.265625], 0.222412109375: [0.890625, 0.109375], 0.18359375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.3271484375: [0.28125, 0.71875, 0.78125, 0.21875], 0.613037109375: [0.390625, 0.609375], 0.991943359375: [0.765625, 0.234375], 0.953125: [0.375, 0.625, 0.875, 0.125], 0.040771484375: [0.921875, 0.078125], 0.118896484375: [0.421875, 0.578125], 0.2177734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.8662109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.749755859375: [0.484375, 0.515625], 0.279052734375: [0.453125, 0.546875], 0.468505859375: [0.484375, 0.515625], 0.818115234375: [0.796875, 0.203125], 0.6240234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.923583984375: [0.828125, 0.171875], 0.886474609375: [0.640625, 0.359375], 0.347412109375: [0.890625, 0.109375], 0.30859375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.575927734375: [0.953125, 0.046875], 0.263427734375: [0.953125, 0.046875], 0.876708984375: [0.671875, 0.328125], 0.230224609375: [0.359375, 0.640625], 0.3427734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.644287109375: [0.390625, 0.609375], 0.564208984375: [0.328125, 0.671875], 0.984375: [0.625, 0.875, 0.125, 0.375], 0.415771484375: [0.921875, 0.078125], 0.042724609375: [0.359375, 0.640625], 0.888427734375: [0.953125, 0.046875], 0.993896484375: [0.421875, 0.578125], 0.122802734375: [0.453125, 0.546875], 0.2255859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.8974609375: [0.40625, 0.59375, 0.90625, 0.09375], 0.781005859375: [0.484375, 0.515625], 0.294677734375: [0.953125, 0.046875], 0.484130859375: [0.984375, 0.015625], 0.849365234375: [0.796875, 0.203125], 0.605224609375: [0.359375, 0.640625], 0.532958984375: [0.328125, 0.671875], 0.025146484375: [0.421875, 0.578125], 0.0302734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.917724609375: [0.640625, 0.359375], 0.036865234375: [0.796875, 0.203125], 0.607177734375: [0.953125, 0.046875], 0.140380859375: [0.984375, 0.015625], 0.003662109375: [0.890625, 0.109375], 0.238037109375: [0.390625, 0.609375], 0.3583984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.675537109375: [0.390625, 0.609375], 0.431396484375: [0.421875, 0.578125], 0.044677734375: [0.953125, 0.046875], 0.2333984375: [0.28125, 0.71875, 0.78125, 0.21875], 0.9287109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.812255859375: [0.484375, 0.515625], 0.310302734375: [0.453125, 0.546875], 0.970458984375: [0.671875, 0.328125], 0.499755859375: [0.484375, 0.515625], 0.880615234375: [0.796875, 0.203125], 0.6865234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.570068359375: [0.734375, 0.265625], 0.948974609375: [0.359375, 0.640625], 0.378662109375: [0.890625, 0.109375], 0.33984375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.0380859375: [0.34375, 0.65625, 0.84375, 0.15625], 0.066162109375: [0.890625, 0.109375], 0.171875: [0.375, 0.625, 0.875, 0.125], 0.011474609375: [0.359375, 0.640625], 0.3740234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.706787109375: [0.390625, 0.609375], 0.257568359375: [0.265625, 0.734375], 0.447021484375: [0.921875, 0.078125], 0.185302734375: [0.453125, 0.546875], 0.023193359375: [0.234375, 0.765625], 0.2412109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.4287109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.843505859375: [0.484375, 0.515625], 0.423583984375: [0.828125, 0.171875], 0.325927734375: [0.953125, 0.046875], 0.728271484375: [0.921875, 0.078125], 0.837646484375: [0.421875, 0.578125], 0.911865234375: [0.796875, 0.203125], 0.7177734375: [0.46875, 0.53125, 0.96875, 0.03125], 0.503662109375: [0.890625, 0.109375], 0.5625: [0.5, 0.75, 0.0, 0.25], 0.947021484375: [0.921875, 0.078125], 0.980224609375: [0.640625, 0.359375], 0.394287109375: [0.390625, 0.609375], 0.669677734375: [0.953125, 0.046875], 0.070068359375: [0.265625, 0.734375], 0.52734375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.03125: [0.25, 0.5, 0.75, 0.0], 0.3896484375: [0.71875, 0.78125, 0.21875, 0.28125], 0.738037109375: [0.390625, 0.609375], 0.273193359375: [0.765625, 0.234375], 0.907958984375: [0.671875, 0.328125], 0.462646484375: [0.421875, 0.578125], 0.193115234375: [0.796875, 0.203125], 0.782958984375: [0.671875, 0.328125], 0.2490234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.9912109375: [0.40625, 0.59375, 0.90625, 0.09375], 0.874755859375: [0.484375, 0.515625], 0.341552734375: [0.453125, 0.546875], 0.132568359375: [0.265625, 0.734375], 0.851318359375: [0.734375, 0.265625], 0.943115234375: [0.796875, 0.203125], 0.7490234375: [0.46875, 0.53125, 0.96875, 0.03125], 0.632568359375: [0.734375, 0.265625], 0.59375: [0.5, 0.75, 0.0, 0.25], 0.409912109375: [0.890625, 0.109375], 0.37109375: [0.3125, 0.4375, 0.8125, 0.6875, 0.0625, 0.1875, 0.5625, 0.9375], 0.700927734375: [0.953125, 0.046875], 0.073974609375: [0.359375, 0.640625], 0.421630859375: [0.984375, 0.015625], 0.142333984375: [0.828125, 0.171875], 0.050537109375: [0.390625, 0.609375], 0.288818359375: [0.265625, 0.734375], 0.25: [0.5, 0.75, 0.0, 0.25], 0.611083984375: [0.828125, 0.171875], 0.478271484375: [0.921875, 0.078125], 0.200927734375: [0.953125, 0.046875], 0.540771484375: [0.921875, 0.078125], 0.8125: [0.5, 0.75, 0.0, 0.25], 0.906005859375: [0.484375, 0.515625], 0.357177734375: [0.953125, 0.046875], 0.400146484375: [0.421875, 0.578125]}
def test_calc_hand_val(create_computer_hand): c = create_computer_hand # Check basevalue calculation assert c.calc_hand_value() == 17 # Check that calculation with trumpsuit is correct assert c.calc_hand_value(trumpsuit='Spades') == 36 # Ensure that cards are correctly reset to basevalue before recalculation assert c.calc_hand_value() == 17 def test_get_cards_matching_suit(create_computer_hand): c = create_computer_hand assert c.get_cards_matching_suit(suit="Diamonds") == [2, 3] def test_find_lowest_card(create_computer_hand): c = create_computer_hand # Check function with basevalue of cards assert c.find_lowest_card() == 5 # Recalculate value of cards and attempt again c.set_values(trumpsuit='Hearts', evaltrumpsuit=True) assert c.find_lowest_card() == 3 def test_find_highest_card(create_computer_hand): c = create_computer_hand # Check function with basevalue of cards assert c.find_highest_card() == 2 # Recalculate value of cards and attempt again c.set_values(trumpsuit='Hearts', evaltrumpsuit=True) assert c.find_highest_card() == 5 def test_computer_pick_up_bidcard(create_computer_hand, create_card): computer = create_computer_hand # Save the card which should be dropped for checking later card_to_drop = computer.cards[3] bidcard = create_card computer.pickup_bidcard(bidcard) # Check card added to hand assert bidcard in computer.cards.values() # Check card removed from hand assert card_to_drop not in computer.cards.values() def test_computer_trick_decide(create_computer_hand, create_card): computer = create_computer_hand played_card = create_card card_to_be_played = computer.cards[2] # The next step is normally performed in euchre.py prior to calling trickPhase computer.set_values(trumpsuit="Diamonds", evaltrumpsuit=True) # Check that the computer leads with the correct card assert computer.trick_decide() == card_to_be_played # The next step is normally performed in euchre.py prior to calling trickDecide computer.set_values(trumpsuit="Diamonds", leadsuit=played_card.get_suit()) card_to_be_played = computer.cards[5] # Check that the computer plays a matching suit if possible assert computer.trick_decide(playedcard=played_card) == card_to_be_played def test_computer_bid_decide(create_computer_hand, create_card): c = create_computer_hand bidcard = create_card # Check that computer passes on bidcard assert c.bid_decide(bidcard=bidcard) == 'pass' # Check that computer chooses 'Clubs' assert c.bid_decide(rnd=2, excludesuit='Hearts') == 'Clubs' # Set to nondealer c.dealer = False c.set_values(basevaluereset=True) # Should pass on bidcard assert c.bid_decide(bidcard=bidcard) == 'pass' # Then choose a suit assert c.bid_decide(rnd=2, excludesuit='Hearts') == 'pass' # If clubs is excluded, should pass assert c.bid_decide(rnd=2, excludesuit='Clubs') == 'pass' # TODO Add case for handvalue > 65 and nondealer # TODO Add case for order-up and accepts def test_set_dealer(create_computer_hand_nondealer): c = create_computer_hand_nondealer assert c.dealer is False c.set_dealer() assert c.dealer is True def test_user_bid_decide_dealer(create_user_hand, create_card, monkeypatch): user = create_user_hand user.set_dealer() bidcard = create_card list_of_responses_dealer = [1, 3, 2, 4] # accept, pass, choose suit def user_response_dealer(dummy1, dummy2): return list_of_responses_dealer.pop(0) monkeypatch.setattr("src.euchre.hands.get_user_response", user_response_dealer) decision = user.bid_decide(bidcard=bidcard) assert decision == 'accept' assert user.cards[3] == bidcard decision = user.bid_decide(bidcard=bidcard) assert decision == 'pass' decision = user.bid_decide(rnd=2, excludesuit='Clubs') assert decision == 'Hearts' def test_user_bid_decide_nondealer(create_user_hand, create_card, monkeypatch): user = create_user_hand bidcard = create_card list_of_responses_nondealer = [1, 2, 1, 3] # order-up, pass, pass, choose suit def user_response_nondealer(dummy1, dummy2): return list_of_responses_nondealer.pop(0) monkeypatch.setattr("src.euchre.hands.get_user_response", user_response_nondealer) decision = user.bid_decide(bidcard=bidcard) assert decision == 'order-up' decision = user.bid_decide(bidcard=bidcard) assert decision == 'pass' decision = user.bid_decide(rnd=2, excludesuit='Clubs') assert decision == 'pass' decision = user.bid_decide(rnd=2, excludesuit='Clubs') assert decision == 'Diamonds'
""" :;: What is meant by Hough Transform..?? :: It is a technique used to detect any shape in a image. If we can able to represent that shape in a mathematical expression we can find that shape in a image even if it is broken or distorted little bit. """ """ A line in an image space can be expressed in two ways: 1. y = m*x+c # In the Cartesian co-ordinate system 2. x*cos(theta) + y*sin(theta) = r # In the Polar co-ordinate system It would be easier to use the polar co-ordinate system rather than the Cartesian co-ordinate system. :;:Why..?? :: As we cannot represent the straight lines through the cartesian system compared to the Polar co-ordinate system. """ """ Using the Hough Transform Algorithm: It totally includes 4 steps: Step-1: Finding the edges of Image through any Edge Detection Technique(like CannyEdgeDetector) Step-2: Mapping of the edge points to the hough space and storing this in a accumulator.(Know what is the Accumulator) Step-3: Interpretation of the Accumulator data to yield the lines of the infinite length. (This interpretation is done by the Thresholding and some other constraints) Step-4: Conversion of the Infinite lengths to finite length. """ """ There are two methods in OpenCV for the Hough Line Transformation Method-1: The standard hough-lines transformation method i.e., cv2.HoughLines() Method-2: The probablistic Hough line transformation. i.e., cv2.HoughLinesP() Method-1: lines = HoughLines(img, rho, theta , threshold) img : The source image on which we would like to find the Houghline transformation rho : """
''' Subarray with given sum Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number. Find starting and ending positions(1 indexing) of first such occuring subarray from the left if sum equals to subarray, else print -1. Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 15 Output: 1, 5 ========================================= Adjust the start and end index, in each step increase start or end idx. If sum is bigger than K, remove element from the start idx from the sum. Else add element from the end idx to the sum. Time Complexity: O(N) Space Complexity: O(1) ''' ############ # Solution # ############ def find_subarray(arr, k): n = len(arr) if n == 0: return -1 start = 0 end = 0 current_sum = arr[0] while end < n: if current_sum == k: return (start + 1, end + 1) if current_sum < k: end += 1 current_sum += arr[end] else: current_sum -= arr[start] start += 1 return -1 ########### # Testing # ########### # Test 1 # Correct result => (1, 5) print(find_subarray([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 15)) # Test 2 # Correct result => (2, 4) print(find_subarray([1, 2, 3, 7, 5], 12)) # Test 3 # Correct result => (5, 5) print(find_subarray([6, 6, 6, 6, 3], 3))
#Part 1 f = open('day2.txt','r') i=0 for line in f: minmax, letter, password = line.split() min,max = minmax.split('-') letter = letter.split(':')[0] if letter in password: if int(min) <= password.count(letter) <= int(max): i+=1 #print(f'{i} -- {min} -- {max} --- {letter} --- {password}' ) print(f'Valid passwords {i}') f.close() #Part 2 f = open('day2.txt','r') i=0 for line in f: minmax, letter, password = line.split() min,max = minmax.split('-') min = int(min) max = int(max) letter = letter.split(':')[0] if letter in password: if (password[min-1] == letter and password[max-1] != letter) or (password[min-1] != letter and password[max-1] == letter): i+=1 #print(f'{i} -- {min} -- {max} --- {letter} --- {password}' ) print(f'Valid passwords {i}') f.close()
uctable = [ [ 40 ], [ 91 ], [ 123 ], [ 224, 188, 186 ], [ 224, 188, 188 ], [ 225, 154, 155 ], [ 226, 128, 154 ], [ 226, 128, 158 ], [ 226, 129, 133 ], [ 226, 129, 189 ], [ 226, 130, 141 ], [ 226, 140, 136 ], [ 226, 140, 138 ], [ 226, 140, 169 ], [ 226, 157, 168 ], [ 226, 157, 170 ], [ 226, 157, 172 ], [ 226, 157, 174 ], [ 226, 157, 176 ], [ 226, 157, 178 ], [ 226, 157, 180 ], [ 226, 159, 133 ], [ 226, 159, 166 ], [ 226, 159, 168 ], [ 226, 159, 170 ], [ 226, 159, 172 ], [ 226, 159, 174 ], [ 226, 166, 131 ], [ 226, 166, 133 ], [ 226, 166, 135 ], [ 226, 166, 137 ], [ 226, 166, 139 ], [ 226, 166, 141 ], [ 226, 166, 143 ], [ 226, 166, 145 ], [ 226, 166, 147 ], [ 226, 166, 149 ], [ 226, 166, 151 ], [ 226, 167, 152 ], [ 226, 167, 154 ], [ 226, 167, 188 ], [ 226, 184, 162 ], [ 226, 184, 164 ], [ 226, 184, 166 ], [ 226, 184, 168 ], [ 226, 185, 130 ], [ 227, 128, 136 ], [ 227, 128, 138 ], [ 227, 128, 140 ], [ 227, 128, 142 ], [ 227, 128, 144 ], [ 227, 128, 148 ], [ 227, 128, 150 ], [ 227, 128, 152 ], [ 227, 128, 154 ], [ 227, 128, 157 ], [ 239, 180, 191 ], [ 239, 184, 151 ], [ 239, 184, 181 ], [ 239, 184, 183 ], [ 239, 184, 185 ], [ 239, 184, 187 ], [ 239, 184, 189 ], [ 239, 184, 191 ], [ 239, 185, 129 ], [ 239, 185, 131 ], [ 239, 185, 135 ], [ 239, 185, 153 ], [ 239, 185, 155 ], [ 239, 185, 157 ], [ 239, 188, 136 ], [ 239, 188, 187 ], [ 239, 189, 155 ], [ 239, 189, 159 ], [ 239, 189, 162 ] ]
try: p =10 q = 5 p = q/0 f = open("abc.txt") # except Exception as e: #prints exception message as type # print(type(e)) # # # except Exception as e: #prints exception message # print(e) except ZeroDivisionError: print("Where is my Destiny.!") except FileNotFoundError as e: print("No such file or directory:", e.filename) except (FileNotFoundError, ZeroDivisionError): print("Kitne error krega bhai.!!")
class comment: def __init__(self, text): self.text = text def get_text(self): return f"<!-- {self.text} -->"
# coding: utf-8 n = int() b = int() m = int() n = 10 b = 2 p = n / b x = zeros((n,n), double) y = zeros((n,n), double) z = zeros((n,n), double) r = zeros((b,b), double) u = zeros((b,b), double) v = zeros((b,b), double) for i in range(0, p): for j in range(0, p): for k1 in range(0, b): for k2 in range(0, b): r[k1,k2] = z[i+k1,j+k2] for k in range(0, p): for k1 in range(0, b): for k2 in range(0, b): u[k1,k2] = x[i+k1,k+k2] v[k1,k2] = y[k+k1,j+k2] for ii in range(0, b): for jj in range(0, b): for kk in range(0, b): r[ii,jj] = r[ii,jj] + u[ii,kk]*v[kk,jj] for k1 in range(0, b): for k2 in range(0, b): z[i+k1,j+k2] = r[k1,k2]
ENVIRONMENT = 'sandbox' LOG_CONFIG = None def set_environment(env): global ENVIRONMENT ENVIRONMENT = env configure_logging(ENVIRONMENT) def get_env_parameter(property): return property.get(ENVIRONMENT, property['sandbox']) METRICS_ENABLED = True def configure_logging(env): global LOG_CONFIG LOG_CONFIG = { "version": 1, "disable_existing_loggers": False, "formatters": { "simple": { "format": "%(asctime)s - %(levelname)s %(name)s:%(funcName)s - %(message)s", "datefmt": "%Y-%m-%d %H:%M:%S" } }, "handlers": { "console": { "class": "logging.StreamHandler", "level": "DEBUG", "formatter": "simple", "stream": "ext://sys.stdout" }, }, "loggers": { "app": { "level": "INFO", "handlers": ["console"], "propagate": True }, } } configure_logging(ENVIRONMENT)
# # PySNMP MIB module AIDIALOUT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AIDIALOUT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:00:32 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") ModuleIdentity, enterprises, Counter64, ObjectIdentity, Bits, Counter32, TimeTicks, Integer32, Unsigned32, NotificationType, IpAddress, iso, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "enterprises", "Counter64", "ObjectIdentity", "Bits", "Counter32", "TimeTicks", "Integer32", "Unsigned32", "NotificationType", "IpAddress", "iso", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier") TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue") class PositiveInteger(Integer32): subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 2147483647) aii = MibIdentifier((1, 3, 6, 1, 4, 1, 539)) aiDialOut = ModuleIdentity((1, 3, 6, 1, 4, 1, 539, 36)) if mibBuilder.loadTexts: aiDialOut.setLastUpdated('9909151700Z') if mibBuilder.loadTexts: aiDialOut.setOrganization('Applied Innovation Inc.') aiDialOutTable = MibTable((1, 3, 6, 1, 4, 1, 539, 36, 1), ) if mibBuilder.loadTexts: aiDialOutTable.setStatus('current') aiDialOutEntry = MibTableRow((1, 3, 6, 1, 4, 1, 539, 36, 1, 1), ).setIndexNames((0, "AIDIALOUT-MIB", "aiDialOutLinkNumber")) if mibBuilder.loadTexts: aiDialOutEntry.setStatus('current') aiDialOutLinkNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 1), PositiveInteger()).setMaxAccess("readonly") if mibBuilder.loadTexts: aiDialOutLinkNumber.setStatus('current') aiDialOutStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 2), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: aiDialOutStatus.setStatus('current') aiDialOutPrimaryDialString = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 3), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: aiDialOutPrimaryDialString.setStatus('current') aiDialOutSecondaryDialString = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 4), DisplayString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: aiDialOutSecondaryDialString.setStatus('current') aiDialOutTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 300))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: aiDialOutTimeOut.setStatus('current') aiDialOutAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: aiDialOutAttempts.setStatus('current') aiDialOutInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 539, 36, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 300))).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: aiDialOutInterval.setStatus('current') mibBuilder.exportSymbols("AIDIALOUT-MIB", aiDialOut=aiDialOut, aiDialOutPrimaryDialString=aiDialOutPrimaryDialString, aiDialOutStatus=aiDialOutStatus, aiDialOutTable=aiDialOutTable, PYSNMP_MODULE_ID=aiDialOut, aiDialOutLinkNumber=aiDialOutLinkNumber, aii=aii, aiDialOutSecondaryDialString=aiDialOutSecondaryDialString, aiDialOutTimeOut=aiDialOutTimeOut, aiDialOutEntry=aiDialOutEntry, aiDialOutInterval=aiDialOutInterval, PositiveInteger=PositiveInteger, aiDialOutAttempts=aiDialOutAttempts)
vowels = ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"] word = input("Provide a word to search for vowels:") found = [] for letter in word: if letter in vowels: if letter not in found: found.append(letter) for vowels in found: print(vowels)
print("\tWelcome to the Yes or No Issue Polling App") #Pedimos el tema de la votación, la cantidad de votantes y la contraseña del admin vote = input("\nWhat is the yes or no issue you will be voting on today: ") v = int(input("What is the number of voters you will allow on the issue: ")) passw = input("Enter a password for polling results:") """"Creamos las variables donde se contabilizaran los votos y tambien creamos el diccionario donde se amacenaran los votantes con su voto""" af = 0 ec = 0 dic = {} #Creamos el bucle para realizar la votación for i in range(v): name = input("\nEnter your full name: ").title() if name not in dic: print("Here is our issue:",vote) c = input("What do you think...yes or no: ").lower() if c.startswith('y'): print("Thank you, ",name ,"! Your vote of yes has been recorded.") af += 1 dic[name] = 'yes' elif c.startswith('n'): print("Thank you, ",name ,"! Your vote of no has been recorded.") ec += 1 dic[name] = 'no' else: print("That is not a yes or no answer, but okay...") print("Thank you ",name,"! Your vote of ",c,". has been recorded.") elif name in dic: print("Sorry, it seems that someone with that name has already voted.") print("\nThe following ",len(dic.keys())," people voted: ") for i in dic.keys(): print(i) print("\nOn the following issue:",vote) if af > ec: print("Yes wins! ",af," votes to ",ec,".") elif af < ec: print("No wins! ",ec," votes to ",af,".") elif af == ec: print("It was a tie! ",af," votes to ",ec,".") #Pedimos la contraseña para visualizar los resultados passw2 = input("\nTo see the voting results enter the admin password: ") if passw2 == passw: for clave,valor in dic.items(): print("Voter: ",clave,"\t\tVote: ",valor) else: print("Sorry, that is not the correct password. Goodbye...") print("\nThank you for using the Yes or No Issue Polling App.")
class Solution(object): _num = [0] def numSquares(self, n): num = self._num while len(num) <= n: num += min(num[-i * i] for i in xrange(1, int(len(num) ** 0.5 + 1))) + 1 return num[n] n = 12 res = Solution().numSquares(n) print(res)
#Herencia Multiple class Telefono: def __init__(self): pass def llamar(self): print("llamando . . . ") def ocupado(self): print("ocpado . . .") class Camara: def __init__(self): pass def fotografia(self): print("tomando fotos..") class Reproduccion: def __init__(self): pass def reproducciondemusica(self): print("reproducir musica") def reproducirvideo(self): print("reproducir un video") class smartphone(Telefono, Camara, Reproduccion): def __del__(self): #este metodo es para limpiar recursos (destructor) print("telefono apagado") movil = smartphone() print(dir(movil)) #nos da las funciones que podemos usar print(movil.llamar())
""" PASSENGERS """ numPassengers = 4041 passenger_arriving = ( (3, 10, 7, 5, 3, 0, 7, 9, 4, 9, 3, 0), # 0 (1, 4, 8, 8, 1, 0, 10, 12, 4, 5, 2, 0), # 1 (6, 12, 13, 3, 1, 0, 10, 12, 3, 4, 5, 0), # 2 (7, 5, 7, 4, 3, 0, 5, 9, 5, 10, 1, 0), # 3 (6, 12, 8, 4, 4, 0, 11, 8, 5, 2, 5, 0), # 4 (3, 11, 6, 5, 2, 0, 8, 17, 13, 2, 3, 0), # 5 (5, 6, 7, 7, 3, 0, 5, 7, 3, 3, 3, 0), # 6 (1, 10, 3, 6, 3, 0, 12, 12, 5, 4, 2, 0), # 7 (3, 9, 4, 4, 4, 0, 9, 13, 9, 12, 4, 0), # 8 (7, 8, 6, 4, 1, 0, 4, 11, 8, 7, 2, 0), # 9 (5, 13, 17, 6, 0, 0, 6, 10, 5, 7, 2, 0), # 10 (1, 12, 10, 3, 1, 0, 6, 8, 8, 4, 1, 0), # 11 (6, 11, 5, 8, 2, 0, 10, 6, 4, 11, 1, 0), # 12 (2, 4, 11, 5, 3, 0, 9, 18, 8, 7, 4, 0), # 13 (5, 12, 13, 5, 3, 0, 7, 6, 7, 3, 2, 0), # 14 (6, 8, 6, 5, 3, 0, 17, 10, 5, 3, 4, 0), # 15 (2, 8, 11, 2, 2, 0, 3, 5, 6, 10, 4, 0), # 16 (5, 12, 10, 2, 1, 0, 10, 9, 10, 7, 3, 0), # 17 (9, 16, 10, 6, 1, 0, 7, 7, 7, 8, 6, 0), # 18 (2, 16, 12, 4, 4, 0, 7, 10, 8, 4, 1, 0), # 19 (5, 13, 11, 5, 1, 0, 10, 8, 12, 10, 3, 0), # 20 (6, 11, 16, 6, 2, 0, 5, 9, 5, 7, 6, 0), # 21 (4, 5, 14, 6, 4, 0, 8, 14, 7, 7, 4, 0), # 22 (11, 14, 11, 6, 1, 0, 8, 6, 5, 5, 3, 0), # 23 (3, 13, 9, 3, 4, 0, 8, 12, 8, 6, 5, 0), # 24 (5, 13, 9, 5, 2, 0, 6, 12, 5, 6, 5, 0), # 25 (6, 7, 9, 10, 5, 0, 10, 14, 7, 8, 3, 0), # 26 (3, 9, 9, 2, 5, 0, 8, 13, 9, 6, 2, 0), # 27 (4, 13, 9, 6, 4, 0, 8, 10, 4, 10, 2, 0), # 28 (8, 7, 13, 4, 4, 0, 4, 12, 10, 4, 4, 0), # 29 (5, 10, 9, 4, 2, 0, 6, 10, 3, 10, 4, 0), # 30 (1, 9, 16, 4, 2, 0, 8, 15, 8, 4, 2, 0), # 31 (4, 15, 10, 5, 2, 0, 7, 17, 7, 5, 0, 0), # 32 (5, 9, 13, 7, 3, 0, 9, 15, 8, 5, 1, 0), # 33 (5, 12, 10, 5, 4, 0, 6, 19, 3, 6, 2, 0), # 34 (8, 12, 9, 6, 3, 0, 9, 15, 10, 7, 4, 0), # 35 (8, 15, 11, 3, 2, 0, 10, 14, 5, 3, 7, 0), # 36 (8, 15, 8, 4, 4, 0, 5, 9, 10, 5, 3, 0), # 37 (5, 13, 13, 3, 5, 0, 3, 15, 7, 8, 8, 0), # 38 (6, 11, 7, 4, 7, 0, 3, 10, 6, 9, 7, 0), # 39 (3, 9, 12, 6, 4, 0, 12, 7, 4, 8, 5, 0), # 40 (7, 12, 14, 6, 6, 0, 4, 10, 7, 11, 3, 0), # 41 (6, 10, 6, 5, 6, 0, 8, 14, 6, 6, 4, 0), # 42 (12, 16, 9, 5, 5, 0, 15, 13, 1, 5, 6, 0), # 43 (9, 10, 10, 4, 2, 0, 11, 9, 5, 3, 2, 0), # 44 (7, 11, 9, 4, 1, 0, 11, 11, 8, 7, 3, 0), # 45 (2, 17, 11, 2, 3, 0, 4, 13, 9, 9, 5, 0), # 46 (5, 9, 11, 7, 3, 0, 7, 4, 8, 5, 2, 0), # 47 (5, 14, 13, 5, 5, 0, 5, 13, 8, 9, 10, 0), # 48 (6, 9, 14, 1, 1, 0, 5, 16, 2, 12, 3, 0), # 49 (6, 12, 12, 6, 1, 0, 6, 13, 5, 9, 2, 0), # 50 (1, 8, 4, 7, 4, 0, 5, 7, 9, 7, 1, 0), # 51 (4, 14, 7, 4, 0, 0, 2, 10, 6, 5, 1, 0), # 52 (6, 15, 7, 4, 2, 0, 10, 14, 5, 9, 4, 0), # 53 (4, 14, 7, 4, 5, 0, 7, 11, 8, 4, 5, 0), # 54 (8, 8, 5, 7, 1, 0, 8, 17, 6, 5, 5, 0), # 55 (4, 18, 10, 7, 2, 0, 7, 7, 2, 4, 5, 0), # 56 (5, 13, 9, 4, 2, 0, 7, 10, 8, 7, 2, 0), # 57 (2, 11, 5, 6, 2, 0, 4, 13, 14, 0, 2, 0), # 58 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59 ) station_arriving_intensity = ( (4.769372805092186, 12.233629261363635, 14.389624839331619, 11.405298913043477, 12.857451923076923, 8.562228260869567), # 0 (4.81413961808604, 12.369674877683082, 14.46734796754499, 11.46881589673913, 12.953819711538461, 8.559309850543478), # 1 (4.8583952589991215, 12.503702525252525, 14.54322622107969, 11.530934782608696, 13.048153846153847, 8.556302173913043), # 2 (4.902102161984196, 12.635567578125, 14.617204169344474, 11.591602581521737, 13.14036778846154, 8.553205638586958), # 3 (4.94522276119403, 12.765125410353535, 14.689226381748071, 11.650766304347826, 13.230375, 8.550020652173911), # 4 (4.987719490781387, 12.892231395991162, 14.759237427699228, 11.708372961956522, 13.318088942307691, 8.546747622282608), # 5 (5.029554784899035, 13.01674090909091, 14.827181876606687, 11.764369565217393, 13.403423076923078, 8.54338695652174), # 6 (5.0706910776997365, 13.138509323705808, 14.893004297879177, 11.818703125, 13.486290865384618, 8.5399390625), # 7 (5.1110908033362605, 13.257392013888888, 14.956649260925452, 11.871320652173912, 13.56660576923077, 8.536404347826087), # 8 (5.1507163959613695, 13.373244353693181, 15.018061335154243, 11.922169157608696, 13.644281249999999, 8.532783220108696), # 9 (5.1895302897278315, 13.485921717171717, 15.077185089974291, 11.971195652173915, 13.719230769230771, 8.529076086956522), # 10 (5.227494918788412, 13.595279478377526, 15.133965094794343, 12.018347146739131, 13.791367788461539, 8.525283355978262), # 11 (5.2645727172958745, 13.701173011363636, 15.188345919023137, 12.063570652173912, 13.860605769230768, 8.521405434782608), # 12 (5.3007261194029835, 13.803457690183082, 15.240272132069407, 12.106813179347826, 13.926858173076925, 8.51744273097826), # 13 (5.335917559262511, 13.90198888888889, 15.289688303341899, 12.148021739130433, 13.99003846153846, 8.513395652173912), # 14 (5.370109471027217, 13.996621981534089, 15.336539002249355, 12.187143342391304, 14.050060096153846, 8.509264605978261), # 15 (5.403264288849868, 14.087212342171718, 15.380768798200515, 12.224124999999999, 14.10683653846154, 8.50505), # 16 (5.4353444468832315, 14.173615344854797, 15.422322260604112, 12.258913722826087, 14.16028125, 8.500752241847827), # 17 (5.46631237928007, 14.255686363636363, 15.461143958868895, 12.291456521739132, 14.210307692307696, 8.496371739130435), # 18 (5.496130520193152, 14.333280772569443, 15.4971784624036, 12.321700407608695, 14.256829326923079, 8.491908899456522), # 19 (5.524761303775241, 14.40625394570707, 15.530370340616965, 12.349592391304348, 14.299759615384616, 8.487364130434782), # 20 (5.552167164179106, 14.47446125710227, 15.56066416291774, 12.375079483695652, 14.339012019230768, 8.482737839673913), # 21 (5.578310535557506, 14.537758080808082, 15.588004498714653, 12.398108695652175, 14.374499999999998, 8.47803043478261), # 22 (5.603153852063214, 14.595999790877526, 15.612335917416454, 12.418627038043478, 14.40613701923077, 8.473242323369567), # 23 (5.62665954784899, 14.649041761363636, 15.633602988431875, 12.43658152173913, 14.433836538461538, 8.468373913043479), # 24 (5.648790057067603, 14.696739366319445, 15.651750281169667, 12.451919157608696, 14.457512019230768, 8.463425611413044), # 25 (5.669507813871817, 14.738947979797977, 15.66672236503856, 12.464586956521739, 14.477076923076922, 8.458397826086957), # 26 (5.688775252414398, 14.77552297585227, 15.6784638094473, 12.474531929347828, 14.492444711538463, 8.453290964673915), # 27 (5.7065548068481124, 14.806319728535353, 15.68691918380463, 12.481701086956523, 14.503528846153845, 8.448105434782608), # 28 (5.722808911325724, 14.831193611900254, 15.69203305751928, 12.486041440217392, 14.510242788461538, 8.44284164402174), # 29 (5.7375, 14.85, 15.69375, 12.4875, 14.512500000000001, 8.4375), # 30 (5.751246651214834, 14.865621839488634, 15.692462907608693, 12.487236580882353, 14.511678590425532, 8.430077267616193), # 31 (5.7646965153452685, 14.881037215909092, 15.68863804347826, 12.486451470588234, 14.509231914893617, 8.418644565217393), # 32 (5.777855634590792, 14.896244211647728, 15.682330027173915, 12.485152389705883, 14.50518630319149, 8.403313830584706), # 33 (5.790730051150895, 14.91124090909091, 15.67359347826087, 12.483347058823531, 14.499568085106382, 8.38419700149925), # 34 (5.803325807225064, 14.926025390624996, 15.662483016304348, 12.481043198529411, 14.492403590425532, 8.361406015742128), # 35 (5.815648945012788, 14.940595738636366, 15.649053260869564, 12.478248529411767, 14.48371914893617, 8.335052811094453), # 36 (5.8277055067135555, 14.954950035511365, 15.63335883152174, 12.474970772058823, 14.47354109042553, 8.305249325337332), # 37 (5.839501534526853, 14.969086363636364, 15.615454347826088, 12.471217647058824, 14.461895744680852, 8.272107496251873), # 38 (5.851043070652174, 14.983002805397728, 15.595394429347825, 12.466996875000001, 14.44880944148936, 8.23573926161919), # 39 (5.862336157289003, 14.99669744318182, 15.573233695652176, 12.462316176470589, 14.434308510638296, 8.196256559220389), # 40 (5.873386836636828, 15.010168359374997, 15.549026766304348, 12.457183272058824, 14.418419281914893, 8.153771326836583), # 41 (5.88420115089514, 15.023413636363639, 15.522828260869566, 12.451605882352942, 14.401168085106384, 8.108395502248875), # 42 (5.894785142263428, 15.03643135653409, 15.494692798913043, 12.445591727941178, 14.38258125, 8.060241023238381), # 43 (5.905144852941176, 15.049219602272727, 15.464675, 12.439148529411764, 14.36268510638298, 8.009419827586207), # 44 (5.915286325127877, 15.061776455965909, 15.432829483695656, 12.43228400735294, 14.341505984042554, 7.956043853073464), # 45 (5.925215601023019, 15.074100000000003, 15.39921086956522, 12.425005882352941, 14.319070212765958, 7.90022503748126), # 46 (5.934938722826087, 15.086188316761364, 15.363873777173913, 12.417321874999999, 14.295404122340427, 7.842075318590705), # 47 (5.944461732736574, 15.098039488636365, 15.326872826086957, 12.409239705882353, 14.27053404255319, 7.7817066341829095), # 48 (5.953790672953963, 15.10965159801136, 15.288262635869566, 12.400767095588236, 14.24448630319149, 7.71923092203898), # 49 (5.96293158567775, 15.121022727272724, 15.248097826086958, 12.391911764705883, 14.217287234042553, 7.65476011994003), # 50 (5.971890513107417, 15.132150958806818, 15.206433016304347, 12.38268143382353, 14.188963164893616, 7.588406165667167), # 51 (5.980673497442456, 15.143034375, 15.163322826086954, 12.373083823529411, 14.159540425531915, 7.5202809970015), # 52 (5.989286580882353, 15.153671058238638, 15.118821875, 12.363126654411765, 14.129045345744682, 7.450496551724138), # 53 (5.9977358056266, 15.164059090909088, 15.072984782608694, 12.352817647058824, 14.09750425531915, 7.379164767616192), # 54 (6.00602721387468, 15.174196555397728, 15.02586616847826, 12.342164522058825, 14.064943484042553, 7.306397582458771), # 55 (6.014166847826087, 15.184081534090907, 14.977520652173913, 12.331175, 14.031389361702129, 7.232306934032984), # 56 (6.022160749680308, 15.193712109375003, 14.92800285326087, 12.319856801470587, 13.996868218085105, 7.15700476011994), # 57 (6.030014961636829, 15.203086363636363, 14.877367391304347, 12.308217647058825, 13.961406382978723, 7.0806029985007495), # 58 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59 ) passenger_arriving_acc = ( (3, 10, 7, 5, 3, 0, 7, 9, 4, 9, 3, 0), # 0 (4, 14, 15, 13, 4, 0, 17, 21, 8, 14, 5, 0), # 1 (10, 26, 28, 16, 5, 0, 27, 33, 11, 18, 10, 0), # 2 (17, 31, 35, 20, 8, 0, 32, 42, 16, 28, 11, 0), # 3 (23, 43, 43, 24, 12, 0, 43, 50, 21, 30, 16, 0), # 4 (26, 54, 49, 29, 14, 0, 51, 67, 34, 32, 19, 0), # 5 (31, 60, 56, 36, 17, 0, 56, 74, 37, 35, 22, 0), # 6 (32, 70, 59, 42, 20, 0, 68, 86, 42, 39, 24, 0), # 7 (35, 79, 63, 46, 24, 0, 77, 99, 51, 51, 28, 0), # 8 (42, 87, 69, 50, 25, 0, 81, 110, 59, 58, 30, 0), # 9 (47, 100, 86, 56, 25, 0, 87, 120, 64, 65, 32, 0), # 10 (48, 112, 96, 59, 26, 0, 93, 128, 72, 69, 33, 0), # 11 (54, 123, 101, 67, 28, 0, 103, 134, 76, 80, 34, 0), # 12 (56, 127, 112, 72, 31, 0, 112, 152, 84, 87, 38, 0), # 13 (61, 139, 125, 77, 34, 0, 119, 158, 91, 90, 40, 0), # 14 (67, 147, 131, 82, 37, 0, 136, 168, 96, 93, 44, 0), # 15 (69, 155, 142, 84, 39, 0, 139, 173, 102, 103, 48, 0), # 16 (74, 167, 152, 86, 40, 0, 149, 182, 112, 110, 51, 0), # 17 (83, 183, 162, 92, 41, 0, 156, 189, 119, 118, 57, 0), # 18 (85, 199, 174, 96, 45, 0, 163, 199, 127, 122, 58, 0), # 19 (90, 212, 185, 101, 46, 0, 173, 207, 139, 132, 61, 0), # 20 (96, 223, 201, 107, 48, 0, 178, 216, 144, 139, 67, 0), # 21 (100, 228, 215, 113, 52, 0, 186, 230, 151, 146, 71, 0), # 22 (111, 242, 226, 119, 53, 0, 194, 236, 156, 151, 74, 0), # 23 (114, 255, 235, 122, 57, 0, 202, 248, 164, 157, 79, 0), # 24 (119, 268, 244, 127, 59, 0, 208, 260, 169, 163, 84, 0), # 25 (125, 275, 253, 137, 64, 0, 218, 274, 176, 171, 87, 0), # 26 (128, 284, 262, 139, 69, 0, 226, 287, 185, 177, 89, 0), # 27 (132, 297, 271, 145, 73, 0, 234, 297, 189, 187, 91, 0), # 28 (140, 304, 284, 149, 77, 0, 238, 309, 199, 191, 95, 0), # 29 (145, 314, 293, 153, 79, 0, 244, 319, 202, 201, 99, 0), # 30 (146, 323, 309, 157, 81, 0, 252, 334, 210, 205, 101, 0), # 31 (150, 338, 319, 162, 83, 0, 259, 351, 217, 210, 101, 0), # 32 (155, 347, 332, 169, 86, 0, 268, 366, 225, 215, 102, 0), # 33 (160, 359, 342, 174, 90, 0, 274, 385, 228, 221, 104, 0), # 34 (168, 371, 351, 180, 93, 0, 283, 400, 238, 228, 108, 0), # 35 (176, 386, 362, 183, 95, 0, 293, 414, 243, 231, 115, 0), # 36 (184, 401, 370, 187, 99, 0, 298, 423, 253, 236, 118, 0), # 37 (189, 414, 383, 190, 104, 0, 301, 438, 260, 244, 126, 0), # 38 (195, 425, 390, 194, 111, 0, 304, 448, 266, 253, 133, 0), # 39 (198, 434, 402, 200, 115, 0, 316, 455, 270, 261, 138, 0), # 40 (205, 446, 416, 206, 121, 0, 320, 465, 277, 272, 141, 0), # 41 (211, 456, 422, 211, 127, 0, 328, 479, 283, 278, 145, 0), # 42 (223, 472, 431, 216, 132, 0, 343, 492, 284, 283, 151, 0), # 43 (232, 482, 441, 220, 134, 0, 354, 501, 289, 286, 153, 0), # 44 (239, 493, 450, 224, 135, 0, 365, 512, 297, 293, 156, 0), # 45 (241, 510, 461, 226, 138, 0, 369, 525, 306, 302, 161, 0), # 46 (246, 519, 472, 233, 141, 0, 376, 529, 314, 307, 163, 0), # 47 (251, 533, 485, 238, 146, 0, 381, 542, 322, 316, 173, 0), # 48 (257, 542, 499, 239, 147, 0, 386, 558, 324, 328, 176, 0), # 49 (263, 554, 511, 245, 148, 0, 392, 571, 329, 337, 178, 0), # 50 (264, 562, 515, 252, 152, 0, 397, 578, 338, 344, 179, 0), # 51 (268, 576, 522, 256, 152, 0, 399, 588, 344, 349, 180, 0), # 52 (274, 591, 529, 260, 154, 0, 409, 602, 349, 358, 184, 0), # 53 (278, 605, 536, 264, 159, 0, 416, 613, 357, 362, 189, 0), # 54 (286, 613, 541, 271, 160, 0, 424, 630, 363, 367, 194, 0), # 55 (290, 631, 551, 278, 162, 0, 431, 637, 365, 371, 199, 0), # 56 (295, 644, 560, 282, 164, 0, 438, 647, 373, 378, 201, 0), # 57 (297, 655, 565, 288, 166, 0, 442, 660, 387, 378, 203, 0), # 58 (297, 655, 565, 288, 166, 0, 442, 660, 387, 378, 203, 0), # 59 ) passenger_arriving_rate = ( (4.769372805092186, 9.786903409090908, 8.63377490359897, 4.56211956521739, 2.5714903846153843, 0.0, 8.562228260869567, 10.285961538461537, 6.843179347826086, 5.755849935732647, 2.446725852272727, 0.0), # 0 (4.81413961808604, 9.895739902146465, 8.680408780526994, 4.587526358695651, 2.5907639423076922, 0.0, 8.559309850543478, 10.363055769230769, 6.881289538043478, 5.786939187017995, 2.4739349755366162, 0.0), # 1 (4.8583952589991215, 10.00296202020202, 8.725935732647814, 4.612373913043478, 2.609630769230769, 0.0, 8.556302173913043, 10.438523076923076, 6.918560869565217, 5.817290488431875, 2.500740505050505, 0.0), # 2 (4.902102161984196, 10.1084540625, 8.770322501606683, 4.636641032608694, 2.628073557692308, 0.0, 8.553205638586958, 10.512294230769232, 6.954961548913042, 5.846881667737789, 2.527113515625, 0.0), # 3 (4.94522276119403, 10.212100328282828, 8.813535829048842, 4.66030652173913, 2.6460749999999997, 0.0, 8.550020652173911, 10.584299999999999, 6.990459782608696, 5.875690552699228, 2.553025082070707, 0.0), # 4 (4.987719490781387, 10.313785116792928, 8.855542456619537, 4.6833491847826085, 2.663617788461538, 0.0, 8.546747622282608, 10.654471153846153, 7.025023777173913, 5.90369497107969, 2.578446279198232, 0.0), # 5 (5.029554784899035, 10.413392727272727, 8.896309125964011, 4.705747826086957, 2.680684615384615, 0.0, 8.54338695652174, 10.72273846153846, 7.058621739130436, 5.930872750642674, 2.603348181818182, 0.0), # 6 (5.0706910776997365, 10.510807458964646, 8.935802578727506, 4.72748125, 2.697258173076923, 0.0, 8.5399390625, 10.789032692307693, 7.0912218750000005, 5.95720171915167, 2.6277018647411614, 0.0), # 7 (5.1110908033362605, 10.60591361111111, 8.97398955655527, 4.7485282608695645, 2.7133211538461537, 0.0, 8.536404347826087, 10.853284615384615, 7.122792391304347, 5.982659704370181, 2.6514784027777774, 0.0), # 8 (5.1507163959613695, 10.698595482954543, 9.010836801092546, 4.768867663043478, 2.7288562499999993, 0.0, 8.532783220108696, 10.915424999999997, 7.153301494565217, 6.007224534061697, 2.6746488707386358, 0.0), # 9 (5.1895302897278315, 10.788737373737373, 9.046311053984574, 4.7884782608695655, 2.743846153846154, 0.0, 8.529076086956522, 10.975384615384616, 7.182717391304348, 6.030874035989716, 2.697184343434343, 0.0), # 10 (5.227494918788412, 10.87622358270202, 9.080379056876605, 4.807338858695652, 2.7582735576923074, 0.0, 8.525283355978262, 11.03309423076923, 7.2110082880434785, 6.053586037917737, 2.719055895675505, 0.0), # 11 (5.2645727172958745, 10.960938409090907, 9.113007551413881, 4.825428260869565, 2.7721211538461534, 0.0, 8.521405434782608, 11.088484615384614, 7.238142391304347, 6.0753383676092545, 2.740234602272727, 0.0), # 12 (5.3007261194029835, 11.042766152146465, 9.144163279241644, 4.8427252717391305, 2.7853716346153847, 0.0, 8.51744273097826, 11.141486538461539, 7.264087907608696, 6.096108852827762, 2.760691538036616, 0.0), # 13 (5.335917559262511, 11.121591111111112, 9.173812982005138, 4.859208695652173, 2.7980076923076918, 0.0, 8.513395652173912, 11.192030769230767, 7.288813043478259, 6.115875321336759, 2.780397777777778, 0.0), # 14 (5.370109471027217, 11.19729758522727, 9.201923401349612, 4.874857336956521, 2.810012019230769, 0.0, 8.509264605978261, 11.240048076923076, 7.312286005434782, 6.134615600899742, 2.7993243963068175, 0.0), # 15 (5.403264288849868, 11.269769873737372, 9.228461278920308, 4.88965, 2.8213673076923076, 0.0, 8.50505, 11.28546923076923, 7.334474999999999, 6.152307519280206, 2.817442468434343, 0.0), # 16 (5.4353444468832315, 11.338892275883836, 9.253393356362468, 4.903565489130434, 2.83205625, 0.0, 8.500752241847827, 11.328225, 7.3553482336956515, 6.168928904241644, 2.834723068970959, 0.0), # 17 (5.46631237928007, 11.40454909090909, 9.276686375321336, 4.916582608695652, 2.842061538461539, 0.0, 8.496371739130435, 11.368246153846156, 7.374873913043479, 6.184457583547558, 2.8511372727272724, 0.0), # 18 (5.496130520193152, 11.466624618055553, 9.298307077442159, 4.928680163043477, 2.8513658653846155, 0.0, 8.491908899456522, 11.405463461538462, 7.393020244565217, 6.198871384961439, 2.866656154513888, 0.0), # 19 (5.524761303775241, 11.525003156565655, 9.318222204370178, 4.939836956521739, 2.859951923076923, 0.0, 8.487364130434782, 11.439807692307692, 7.409755434782609, 6.212148136246785, 2.8812507891414136, 0.0), # 20 (5.552167164179106, 11.579569005681815, 9.336398497750643, 4.95003179347826, 2.8678024038461536, 0.0, 8.482737839673913, 11.471209615384614, 7.425047690217391, 6.224265665167096, 2.894892251420454, 0.0), # 21 (5.578310535557506, 11.630206464646465, 9.352802699228791, 4.95924347826087, 2.8748999999999993, 0.0, 8.47803043478261, 11.499599999999997, 7.438865217391305, 6.235201799485861, 2.907551616161616, 0.0), # 22 (5.603153852063214, 11.67679983270202, 9.367401550449872, 4.967450815217391, 2.8812274038461534, 0.0, 8.473242323369567, 11.524909615384614, 7.451176222826087, 6.244934366966581, 2.919199958175505, 0.0), # 23 (5.62665954784899, 11.719233409090908, 9.380161793059125, 4.974632608695652, 2.8867673076923075, 0.0, 8.468373913043479, 11.54706923076923, 7.461948913043478, 6.25344119537275, 2.929808352272727, 0.0), # 24 (5.648790057067603, 11.757391493055556, 9.391050168701799, 4.980767663043478, 2.8915024038461534, 0.0, 8.463425611413044, 11.566009615384614, 7.471151494565217, 6.260700112467866, 2.939347873263889, 0.0), # 25 (5.669507813871817, 11.79115838383838, 9.400033419023135, 4.985834782608695, 2.8954153846153843, 0.0, 8.458397826086957, 11.581661538461537, 7.478752173913043, 6.266688946015424, 2.947789595959595, 0.0), # 26 (5.688775252414398, 11.820418380681815, 9.40707828566838, 4.989812771739131, 2.8984889423076923, 0.0, 8.453290964673915, 11.593955769230769, 7.484719157608696, 6.271385523778919, 2.9551045951704538, 0.0), # 27 (5.7065548068481124, 11.84505578282828, 9.412151510282778, 4.992680434782609, 2.9007057692307687, 0.0, 8.448105434782608, 11.602823076923075, 7.489020652173913, 6.274767673521851, 2.96126394570707, 0.0), # 28 (5.722808911325724, 11.864954889520202, 9.415219834511568, 4.994416576086956, 2.902048557692307, 0.0, 8.44284164402174, 11.608194230769229, 7.491624864130435, 6.276813223007712, 2.9662387223800506, 0.0), # 29 (5.7375, 11.879999999999999, 9.41625, 4.995, 2.9025, 0.0, 8.4375, 11.61, 7.4925, 6.277499999999999, 2.9699999999999998, 0.0), # 30 (5.751246651214834, 11.892497471590906, 9.415477744565216, 4.994894632352941, 2.9023357180851064, 0.0, 8.430077267616193, 11.609342872340426, 7.492341948529411, 6.276985163043476, 2.9731243678977264, 0.0), # 31 (5.7646965153452685, 11.904829772727274, 9.413182826086956, 4.994580588235293, 2.901846382978723, 0.0, 8.418644565217393, 11.607385531914892, 7.49187088235294, 6.275455217391303, 2.9762074431818184, 0.0), # 32 (5.777855634590792, 11.916995369318181, 9.40939801630435, 4.994060955882353, 2.9010372606382977, 0.0, 8.403313830584706, 11.60414904255319, 7.491091433823529, 6.272932010869566, 2.9792488423295453, 0.0), # 33 (5.790730051150895, 11.928992727272727, 9.40415608695652, 4.993338823529412, 2.899913617021276, 0.0, 8.38419700149925, 11.599654468085104, 7.490008235294118, 6.269437391304347, 2.9822481818181816, 0.0), # 34 (5.803325807225064, 11.940820312499996, 9.39748980978261, 4.9924172794117645, 2.898480718085106, 0.0, 8.361406015742128, 11.593922872340425, 7.488625919117647, 6.264993206521739, 2.985205078124999, 0.0), # 35 (5.815648945012788, 11.952476590909091, 9.389431956521738, 4.9912994117647065, 2.896743829787234, 0.0, 8.335052811094453, 11.586975319148936, 7.486949117647059, 6.259621304347825, 2.988119147727273, 0.0), # 36 (5.8277055067135555, 11.96396002840909, 9.380015298913044, 4.989988308823529, 2.8947082180851056, 0.0, 8.305249325337332, 11.578832872340422, 7.484982463235293, 6.253343532608695, 2.9909900071022726, 0.0), # 37 (5.839501534526853, 11.97526909090909, 9.369272608695653, 4.988487058823529, 2.89237914893617, 0.0, 8.272107496251873, 11.56951659574468, 7.4827305882352935, 6.246181739130434, 2.9938172727272727, 0.0), # 38 (5.851043070652174, 11.986402244318182, 9.357236657608695, 4.98679875, 2.8897618882978717, 0.0, 8.23573926161919, 11.559047553191487, 7.480198125, 6.23815777173913, 2.9966005610795454, 0.0), # 39 (5.862336157289003, 11.997357954545455, 9.343940217391305, 4.984926470588235, 2.886861702127659, 0.0, 8.196256559220389, 11.547446808510635, 7.477389705882353, 6.22929347826087, 2.999339488636364, 0.0), # 40 (5.873386836636828, 12.008134687499997, 9.329416059782607, 4.982873308823529, 2.8836838563829783, 0.0, 8.153771326836583, 11.534735425531913, 7.474309963235294, 6.219610706521738, 3.002033671874999, 0.0), # 41 (5.88420115089514, 12.01873090909091, 9.31369695652174, 4.980642352941176, 2.880233617021277, 0.0, 8.108395502248875, 11.520934468085107, 7.4709635294117644, 6.209131304347826, 3.0046827272727277, 0.0), # 42 (5.894785142263428, 12.02914508522727, 9.296815679347825, 4.978236691176471, 2.8765162499999994, 0.0, 8.060241023238381, 11.506064999999998, 7.467355036764706, 6.1978771195652165, 3.0072862713068176, 0.0), # 43 (5.905144852941176, 12.03937568181818, 9.278805, 4.975659411764705, 2.8725370212765955, 0.0, 8.009419827586207, 11.490148085106382, 7.4634891176470575, 6.1858699999999995, 3.009843920454545, 0.0), # 44 (5.915286325127877, 12.049421164772726, 9.259697690217394, 4.972913602941176, 2.8683011968085106, 0.0, 7.956043853073464, 11.473204787234042, 7.459370404411764, 6.1731317934782615, 3.0123552911931815, 0.0), # 45 (5.925215601023019, 12.059280000000001, 9.239526521739132, 4.970002352941176, 2.8638140425531913, 0.0, 7.90022503748126, 11.455256170212765, 7.455003529411765, 6.159684347826087, 3.0148200000000003, 0.0), # 46 (5.934938722826087, 12.06895065340909, 9.218324266304347, 4.966928749999999, 2.859080824468085, 0.0, 7.842075318590705, 11.43632329787234, 7.450393124999999, 6.145549510869564, 3.0172376633522724, 0.0), # 47 (5.944461732736574, 12.07843159090909, 9.196123695652174, 4.9636958823529405, 2.854106808510638, 0.0, 7.7817066341829095, 11.416427234042551, 7.445543823529412, 6.130749130434782, 3.0196078977272727, 0.0), # 48 (5.953790672953963, 12.087721278409088, 9.17295758152174, 4.960306838235294, 2.8488972606382976, 0.0, 7.71923092203898, 11.39558904255319, 7.4404602573529415, 6.115305054347826, 3.021930319602272, 0.0), # 49 (5.96293158567775, 12.096818181818177, 9.148858695652175, 4.956764705882353, 2.8434574468085105, 0.0, 7.65476011994003, 11.373829787234042, 7.43514705882353, 6.099239130434783, 3.0242045454545443, 0.0), # 50 (5.971890513107417, 12.105720767045453, 9.123859809782608, 4.953072573529411, 2.837792632978723, 0.0, 7.588406165667167, 11.351170531914892, 7.429608860294118, 6.082573206521738, 3.026430191761363, 0.0), # 51 (5.980673497442456, 12.114427499999998, 9.097993695652173, 4.949233529411764, 2.8319080851063827, 0.0, 7.5202809970015, 11.32763234042553, 7.4238502941176465, 6.065329130434781, 3.0286068749999995, 0.0), # 52 (5.989286580882353, 12.122936846590909, 9.071293125, 4.945250661764706, 2.8258090691489364, 0.0, 7.450496551724138, 11.303236276595745, 7.417875992647058, 6.04752875, 3.030734211647727, 0.0), # 53 (5.9977358056266, 12.13124727272727, 9.043790869565216, 4.941127058823529, 2.8195008510638297, 0.0, 7.379164767616192, 11.278003404255319, 7.411690588235294, 6.0291939130434775, 3.0328118181818176, 0.0), # 54 (6.00602721387468, 12.139357244318182, 9.015519701086955, 4.93686580882353, 2.8129886968085103, 0.0, 7.306397582458771, 11.251954787234041, 7.405298713235295, 6.010346467391304, 3.0348393110795455, 0.0), # 55 (6.014166847826087, 12.147265227272724, 8.986512391304348, 4.9324699999999995, 2.8062778723404254, 0.0, 7.232306934032984, 11.225111489361701, 7.398705, 5.991008260869565, 3.036816306818181, 0.0), # 56 (6.022160749680308, 12.154969687500001, 8.95680171195652, 4.927942720588234, 2.7993736436170207, 0.0, 7.15700476011994, 11.197494574468083, 7.391914080882352, 5.9712011413043475, 3.0387424218750003, 0.0), # 57 (6.030014961636829, 12.16246909090909, 8.926420434782608, 4.923287058823529, 2.792281276595744, 0.0, 7.0806029985007495, 11.169125106382976, 7.384930588235295, 5.950946956521738, 3.0406172727272724, 0.0), # 58 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59 ) passenger_allighting_rate = ( (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59 ) """ parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html """ #initial entropy entropy = 258194110137029475889902652135037600173 #index for seed sequence child child_seed_index = ( 1, # 0 55, # 1 )
""" Author: <REPLACE> Project: 100DaysPython File: module1_day13_continueBreak.py Creation Date: <REPLACE> Description: <REPLACE> """ motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \ "Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \ "Who's with me? Let's go!" output = "" for letter in motivation: if letter.lower() in 'bcdfghjklmnpqrstvwxyz': output += letter print(output) motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \ "Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \ "Who's with me? Let's go!" output = "" for letter in motivation: if letter.lower() not in 'bcdfghjklmnpqrstvwxyz': continue else: output += letter print(output) motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \ "Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \ "Who's with me? Let's go!" output = "" for letter in motivation: if letter.lower() in 'abcdefghijklmnopqrstuvwxyz': output += letter else: break print(output) motivation = "Over? Did you say 'over'? Nothing is over until we decide it is! Was it over when the Germans bombed " \ "Pearl Harbor? Hell no! And it ain't over now. 'Cause when the goin' gets tough...the tough get goin'! " \ "Who's with me? Let's go!" output = "" for letter in motivation: if letter.lower() in 'bcdfghjklmnpqrstvwxyz': output += letter print(output)
# ---- simple cubic O(n^3) time complexity / constant O(1) space complexity algorithm ---- DP = {} lines = [0] lines.extend(sorted([int(line.strip()) for line in open('day10.txt')])) lines.append(max(lines)+3) def dp(i): if i == len(lines)-1: return 1 if i in DP: return DP[i] ans = 0 for j in range(i+1, len(lines)): if lines[j] - lines[i] <= 3: ans += dp(j) DP[i] = ans return ans def solve(lines): nums = set(lines) ways = [0 for i in range(len(lines))] diffs = [0, 0, 0] cur = 0 while len(nums) > 0: p = 0 for i in (1,2,3): if cur+i in nums: p += 1 nums.remove(cur+i) diffs[i-1] += 1 cur = cur+i break parta = diffs[0], (diffs[2] + 1) return sum(ways) partb = diffs preamble_size = 25 nums = set() for i in range(len(lines)): found = False if len(nums) < preamble_size: nums.add(int(lines[i])) else: for n in lines[i-25:i]: for m in lines[i-25:i]: n, m = int(n), int(m) if n != m and n + m == int(lines[i]): found = True if not found: return int(lines[i]) return 0 flag = [i for i in range(len(lines)) if lines[i].split()[0] in {"nop", "jmp"}] for f in flag: acc = 0 cpu = 0 all_inst = set() while cpu not in all_inst: if cpu == len(lines): return acc all_inst.add(cpu) inst = lines[cpu].split() print(inst) if inst[0] == "nop" and cpu == f: cpu += int(inst[1]) cpu -= 1 if inst[0] == "acc": acc += int(inst[1]) if inst[0] == "jmp": if cpu != f: cpu += int(inst[1]) cpu -= 1 cpu += 1 d = dict() for line in lines: this_bag, other_bags = line.split(" contain ") d[this_bag] = [bag for bag in other_bags.split(", ")] return number_of(["shiny gold bag"], d, lines, 0) return len(unique_colors("shiny gold bag", d, lines, set())) if __name__ == '__main__': # read in input (get_data() returns string) #lines = [int(line.strip()) for line in open('day10.txt')] #submit(sol1(i)) #submit(sol1(i), part="a", day=2, year=2020) print(dp(0)) #submit(solve(lines))
# 计算当前时间点,是开市以来第几分钟 def get_minute_count(current_dt): ''' 9:30 -- 11:30 13:00 --- 15:00 ''' current_hour = current_dt.hour current_min = current_dt.minute if current_hour < 12: minute_count = (current_hour - 9) * 60 + current_min - 30 else: minute_count = (current_hour - 13) * 60 + current_min + 120 return minute_count def get_delta_minute(datetime1, datetime2): minute1 = get_minute_count(datetime1) minute2 = get_minute_count(datetime2) return abs(minute2 - minute1)
# MIT licensed # Copyright (c) 2013-2020 lilydjwg <lilydjwg@gmail.com>, et al. API_URL = 'https://crates.io/api/v1/crates/%s' async def get_version(name, conf, *, cache, **kwargs): name = conf.get('cratesio') or name data = await cache.get_json(API_URL % name) version = [v['num'] for v in data['versions'] if not v['yanked']][0] return version
{ "targets": [ { "target_name": "multihashing", "sources": [ "multihashing.cc", "argon2/argon2.c", "argon2/best.c", "argon2/blake2b.c", "argon2/core.c", "argon2/encoding.c", "argon2/thread.c", ], "include_dirs": [ "crypto", "<!(node -e \"require('nan')\")" ], "cflags_cc": [ "-std=c++0x" ], } ] }
#This syngas example is for testing Model Resurrection handling (recovery from solver errors) #The parameters chosen for this example were chosen to generate solver errors #(so this is not a good example to base an input file for a real job on) database( #overrides RMG thermo calculation of RMG with these values. #libraries found at http://rmg.mit.edu/database/thermo/libraries/ #if species exist in multiple libraries, the earlier libraries overwrite the #previous values thermoLibraries = ['primaryThermoLibrary'], #overrides RMG kinetics estimation if needed in the core of RMG. #list of libraries found at http://rmg.mit.edu/database/kinetics/libraries/ #libraries can be input as either a string or tuple of form ('library_name',True/False) #where a `True` indicates that all unused reactions will be automatically added #to the chemkin file at the end of the simulation. Placing just string values #defaults the tuple to `False`. The string input is sufficient in almost #all situations reactionLibraries = [], #seed mechanisms are reactionLibraries that are forced into the initial mechanism #in addition to species listed in this input file. #This is helpful for reducing run time for species you know will appear in #the mechanism. seedMechanisms = [], #this is normally not changed in general RMG runs. Usually used for testing with #outside kinetics databases kineticsDepositories = 'default', #lists specific families used to generate the model. 'default' uses a list of #families from RMG-Database/input/families/recommended.py #a visual list of families is available in PDF form at RMG-database/families kineticsFamilies = 'default', #specifies how RMG calculates rates. currently, the only option is 'rate rules' kineticsEstimator = 'rate rules', ) # List of species #list initial and expected species below to automatically put them into the core mechanism. #'structure' can utilize method of SMILES("put_SMILES_here"), #adjacencyList("""put_adj_list_here"""), or InChI("put_InChI_here") #for molecular oxygen, use the smiles string [O][O] so the triplet form is used species( label='N2', reactive=False, structure=SMILES("N#N") ) species( label='CO', reactive=True, structure=SMILES("[C-]#[O+]") ) species( label='H2', reactive=True, structure=SMILES("[H][H]"), ) species( label='O2', reactive=True, structure=SMILES("[O][O]") ) #Reaction systems #currently RMG models only constant temperature and pressure as homogeneous batch reactors. #two options are: simpleReactor for gas phase or liquidReactor for liquid phase #use can use multiple reactors in an input file for each condition you want to test. simpleReactor( #specifies reaction temperature with units temperature=(1000,'K'), #specifies reaction pressure with units pressure=(10.0,'bar'), #list initial mole fractions of compounds using the label from the 'species' label. #RMG will normalize if sum/=1 initialMoleFractions={ "CO": .6, "H2": .4, "O2": .5, "N2": 0, }, #the following two values specify when to determine the final output model #only one must be specified #the first condition to be satisfied will terminate the process terminationTime=(12,'s'), ) simpleReactor( #specifies reaction temperature with units temperature=(1000,'K'), #specifies reaction pressure with units pressure=(100.0,'bar'), #list initial mole fractions of compounds using the label from the 'species' label. #RMG will normalize if sum/=1 initialMoleFractions={ "CO": .6, "H2": .4, "O2": .5, "N2": 0, }, #the following two values specify when to determine the final output model #only one must be specified #the first condition to be satisfied will terminate the process terminationTime=(12,'s'), ) simpleReactor( #specifies reaction temperature with units temperature=(2000,'K'), #specifies reaction pressure with units pressure=(100.0,'bar'), #list initial mole fractions of compounds using the label from the 'species' label. #RMG will normalize if sum/=1 initialMoleFractions={ "CO": .6, "H2": .4, "O2": .5, "N2": 0, }, #the following two values specify when to determine the final output model #only one must be specified #the first condition to be satisfied will terminate the process terminationTime=(12,'s'), ) simpleReactor( #specifies reaction temperature with units temperature=(2000,'K'), #specifies reaction pressure with units pressure=(10.0,'bar'), #list initial mole fractions of compounds using the label from the 'species' label. #RMG will normalize if sum/=1 initialMoleFractions={ "CO": .6, "H2": .4, "O2": .5, "N2": 0, }, #the following two values specify when to determine the final output model #only one must be specified #the first condition to be satisfied will terminate the process terminationTime=(12,'s'), ) #1500 simpleReactor( #specifies reaction temperature with units temperature=(1500,'K'), #specifies reaction pressure with units pressure=(100.0,'bar'), #list initial mole fractions of compounds using the label from the 'species' label. #RMG will normalize if sum/=1 initialMoleFractions={ "CO": .6, "H2": .4, "O2": .5, "N2": 0, }, #the following two values specify when to determine the final output model #only one must be specified #the first condition to be satisfied will terminate the process terminationTime=(12,'s'), ) simpleReactor( #specifies reaction temperature with units temperature=(1500,'K'), #specifies reaction pressure with units pressure=(10.0,'bar'), #list initial mole fractions of compounds using the label from the 'species' label. #RMG will normalize if sum/=1 initialMoleFractions={ "CO": .6, "H2": .4, "O2": .5, "N2": 0, }, #the following two values specify when to determine the final output model #only one must be specified #the first condition to be satisfied will terminate the process terminationTime=(12,'s'), ) #determines absolute and relative tolerances for ODE solver and sensitivities. #normally this doesn't cause many issues and is modified after other issues are #ruled out simulator( atol=1e-16, rtol=1e-8, # sens_atol=1e-6, # sens_rtol=1e-4, ) #used to add species to the model and to reduce memory usage by removing unimportant additional species. #all relative values are normalized by a characteristic flux at that time point model( #determines the relative flux to put a species into the core. #A smaller value will result in a larger, more complex model #when running a new model, it is recommended to start with higher values and then decrease to converge on the model toleranceMoveToCore=0.01, #comment out the next three terms to disable pruning #determines the relative flux needed to not remove species from the model. #Lower values will keep more species and utilize more memory toleranceKeepInEdge=0.0, #determines when to stop a ODE run to add a species. #Lower values will improve speed. #if it is too low, may never get to the end simulation to prune species. toleranceInterruptSimulation=0.01, #number of edge species needed to accumulate before pruning occurs #larger values require more memory and will prune less often maximumEdgeSpecies=100000, #minimum number of core species needed before pruning occurs. #this prevents pruning when kinetic model is far away from completeness minCoreSizeForPrune=50, #make sure that the pruned edge species have existed for a set number of RMG iterations. #the user can specify to increase it from the default value of 2 minSpeciesExistIterationsForPrune=2, #filter the reactions during the enlarge step to omit species from reacting if their #concentration are deemed to be too low filterReactions=True, maxNumSpecies=24, ) options( #provides a name for the seed mechanism produced at the end of an rmg run default is 'Seed' name='Syngas', #if True every iteration it saves the current model as libraries/seeds #(and deletes the old one) #Unlike HTML this is inexpensive time-wise #note a seed mechanism will be generated at the end of a completed run and some incomplete #runs even if this is set as False generateSeedEachIteration=True, #If True the mechanism will also be saved directly as kinetics and thermo libraries in the database saveSeedToDatabase=False, #only option is 'si' units='si', #how often you want to save restart files. #takes significant amount of time. comment out if you don't want to save saveRestartPeriod=None, #Draws images of species and reactions and saves the model output to HTML. #May consume extra memory when running large models. generateOutputHTML=True, #generates plots of the RMG's performance statistics. Not helpful if you just want a model. generatePlots=False, #saves mole fraction of species in 'solver/' to help you create plots saveSimulationProfiles=True, #gets RMG to output comments on where kinetics were obtained in the chemkin file. #useful for debugging kinetics but increases memory usage of the chemkin output file verboseComments=False, #gets RMG to generate edge species chemkin files. Uses lots of memory in output. #Helpful for seeing why some reaction are not appearing in core model. saveEdgeSpecies=False, #Sets a time limit in the form DD:HH:MM:SS after which the RMG job will stop. Useful for profiling on jobs that #do not converge. #wallTime = '00:00:00', keepIrreversible=False, #Forces RMG to import library reactions as reversible (default). Otherwise, if set to True, RMG will import library #reactions while keeping the reversibility as as. ) # optional module allows for correction to unimolecular reaction rates at low pressures and/or temperatures. pressureDependence( #two methods available: 'modified strong collision' is faster and less accurate than 'reservoir state' method='modified strong collision', #these two categories determine how fine energy is descretized. #more grains increases accuracy but takes longer maximumGrainSize=(0.5,'kcal/mol'), minimumNumberOfGrains=250, #the conditions for the rate to be output over #parameter order is: low_value, high_value, units, internal points temperatures=(300,2200,'K',2), pressures=(0.01,100.01,'bar',3), #The two options for interpolation are 'PDepArrhenius' (no extra arguments) and #'Chebyshev' which is followed by the number of basis sets in #Temperature and Pressure. These values must be less than the number of #internal points specified above interpolation=('Chebyshev', 6, 4), #turns off pressure dependence for molecules with number of atoms greater than the number specified below #this is due to faster internal rate of energy transfer for larger molecules maximumAtoms=15, ) #optional block adds constraints on what RMG can output. #This is helpful for improving the efficiency of RMG, but wrong inputs can lead to many errors. generatedSpeciesConstraints( #allows exceptions to the following restrictions allowed=['input species','seed mechanisms','reaction libraries'], #maximum number of each atom in a molecule maximumCarbonAtoms=4, maximumOxygenAtoms=6, maximumNitrogenAtoms=0, maximumSiliconAtoms=0, maximumSulfurAtoms=0, #max number of non-hydrogen atoms #maximumHeavyAtoms=20, #maximum radicals on a molecule maximumRadicalElectrons=2, #If this is false or missing, RMG will throw an error if the more less-stable form of O2 is entered #which doesn't react in the RMG system. normally input O2 as triplet with SMILES [O][O] #allowSingletO2=False, # maximum allowed number of non-normal isotope atoms: #maximumIsotopicAtoms=2, )
__author__ = 'Hans-Werner Roitzsch' class SeriesFileReader: def __init__(self): self.attribute_count = 8 def read(self, file_path): lines = [] lines_attributes = [] with open(file_path) as opened_file: for index, line in enumerate(opened_file): if True: line_parts = line.split('\t', -1) line_parts = [elem.strip('\n') for elem in line_parts] # print(line_parts) if len(line_parts) == self.attribute_count: line_attributes = {} line_attributes['url'] = '' line_attributes['start_date'] = '' line_attributes['start_date_year'] = '' line_attributes['start_date_month'] = '' line_attributes['start_date_day'] = '' line_attributes['name'] = '' line_attributes['episode_count'] = '' line_attributes['producer_url'] = '' line_attributes['image_url'] = '' line_attributes['summary'] = '' if line_parts[0] != '': line_attributes['url'] = line_parts[0].strip('<>') if line_parts[1] != '': line_attributes['start_date'] = line_parts[1].split('"', -1)[1] start_date_parts = line_attributes['start_date'].split('-', -1) line_attributes['start_date_year'] = start_date_parts[0] line_attributes['start_date_month'] = start_date_parts[1] line_attributes['start_date_day'] = start_date_parts[2] if line_parts[2] != '': line_attributes['name'] = line_parts[2].split('"', -1)[1] if line_parts[3] != '': line_attributes['episode_count'] = line_parts[3].split('"', -1)[1] if line_parts[4] != '': line_attributes['producer_url'] = line_parts[4].strip('<>') if line_parts[6] != '': line_attributes['image_url'] = line_parts[6].strip('<>') if line_parts[7] != '': # print('PART #', index, ': ', line_parts[7], sep='') line_attributes['summary'] = line_parts[7].split('"', -1)[1] lines_attributes.append(line_attributes) else: pass # ignore the incomplete lines return lines_attributes
# Copyright 2016 HP Development Company, L.P. # SPDX-License-Identifier: MIT # """ A module for the hippy error types. """ class PySproutError(Exception): """ A PySproutError is raised if there is an error communicating with SoHal, or if SoHal responds to a request with an error message. """ def __init__(self, code, data, message): super(PySproutError, self).__init__() self.code = code self.data = data self.message = message def __str__(self): return self.message + " (" + self.data + ")"
# LTD simulation models / perturbances # Attribute name case sensitive. # Commented and empty lines are ignored # Double quoted variable names in sysPert parameters ignored # Perturbances mirror.sysPerturbances = [ 'gen 5 : step Pm 2 -50 rel', ] mirror.govDelay ={ 'delaygen1' : { 'genBus' : 1, 'genId' : None, # optional 'wDelay' : (0,0), 'PrefDelay' : (0, 0), }, #end of defined governor delays } mirror.sysBA = { 'BA1':{ 'Area':1, 'B': "1.0 : perload", # MW/0.1 Hz 'AGCActionTime': 5.00, # seconds 'ACEgain' : 0.0,#2.0, 'AGCType':'TLB : 0', # Tie-Line Bias 'UseAreaDroop' : False, 'AreaDroop' : 0.05, 'IncludeIACE' : True, 'IACEconditional': False, 'IACEwindow' : 15, # seconds - size of window - 0 for non window 'IACEscale' : 1/5, 'IACEdeadband' : 0, # Hz 'ACEFiltering': 'PI : 0.04 0.0001', 'AGCDeadband' : None, # MW? -> not implemented 'GovDeadbandType' : 'none', # step, None, ramp, nldroop 'GovDeadband' : .036, # Hz 'GovAlpha' : 0.016, # Hz - for nldroop 'GovBeta' : 0.036, # Hz - for nldroop 'CtrlGens': ['gen 1 : 1 : rampA'] }, 'BA2':{ 'Area':2, 'B': "1.0 : perload", # MW/0.1 Hz 'AGCActionTime': 5.00, # seconds 'ACEgain' : 0.0,#2.0, 'AGCType':'TLB : 0', # Tie-Line Bias 'UseAreaDroop' : False, 'AreaDroop' : 0.05, 'IncludeIACE' : True, 'IACEconditional': False, 'IACEwindow' : 15, # seconds - size of window - 0 for non window 'IACEscale' : 1/5, 'IACEdeadband' : 0, # Hz 'ACEFiltering': 'PI : 0.04 0.0001', 'AGCDeadband' : None, # MW? -> not implemented 'GovDeadbandType' : 'none', # step, None, ramp, nldroop 'GovDeadband' : .036, # Hz 'GovAlpha' : 0.016, # Hz - for nldroop 'GovBeta' : 0.036, # Hz - for nldroop 'CtrlGens': ['gen 3 : 1.0 : rampA',] }, }
class ResponseText: MESSAGE_REGISTER_USER = "User created successfully." MESSAGE_USER_PASSWORD_REQUIRED = "Username and password are required fields" DESCRIPTION_AUTH = "Invalid credentials" DESCRIPTION_AUTH_ERROR = "Request does not contain an access token" ERROR_AUTH = "Bad Request" ERROR_AUTH_TEXT = "Authorization Required" MESSAGE_ADD_USER_INFO = "User info created successfully." MESSAGE_UPDATE_USER_INFO = "User info updated successfully." MESSAGE_USER_NOT_FOUND = "User not found" MESSAGE_INFO_NOT_FOUND = "User info not found" MESSAGE_INFO_NOT_FOUND_DOT = "User info not found." MESSAGE_DELETE_USER_INFO = "User info deleted." MESSAGE_STORE_EXIST = "A store with name '{}' already exists." MESSAGE_STORE_NOT_FOUND = "Store not found"
class Vehiculo(): random = 150 def __init__(self, vel_max, kmtje, capcty): self.vel_max = vel_max self.kmtje = kmtje self.capcty = capcty def _str_(self): return f""" La velocidad máxima es: {self.vel_max}Km/h, Kilometraje: {self.kmtje}Km, Capacidad: {self.capcty} """ class Autobus(Vehiculo): def __init__(self, vel_max, kmtje, capcty): super().__init__(vel_max, kmtje, capcty) def tarifa(self): cargo_tarifa = self.capcty * 100 if issubclass(Vehiculo, Autobus): mnto_final = cargo_tarifa + (cargo_tarifa * 0.10) return mnto_final return cargo_tarifa def __str__(self): return f""" Mi velocidad máxima es de: {self.vel_max}Km/h, Mi Kilometraje es de: {self.kmtje}Km, Capacidad: {self.capcty} asientos, La tarifa es de: ${self.tarifa()} """ if __name__=='__main__': vehicles = [ ] vehicles.append(Vehiculo(160, 2300, 4)) vehicles.append(Vehiculo(240, 500, 2)) vehicles.append(Autobus(80, 53000, 15)) vehicles.append(Autobus(60, 150000, 10)) vehicles = [print(f'Soy un autobus! {vehicles[i]}') for i in range(len(vehicles)) if isinstance(vehicles[i], Autobus) ]
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- ''' geetest常用公共方法 ''' SPLIT_ARRAY_JS = ''' function getSplitArray() { for (var a, b = "6_11_7_10_4_12_3_1_0_5_2_9_8".split("_"), c = [], d = 0, e = 52; d < e; d++) a = 2 * parseInt(b[parseInt(d % 26 / 2)]) + d % 2, parseInt(d / 2) % 2 || (a += d % 2 ? -1 : 1), a += d < 26 ? 26 : 0, c.push(a); return c } ''' USERRESPONSE_JS = ''' function userresponse(a, b) { for (var c = b.slice(32), d = [], e = 0; e < c.length; e++) { var f = c.charCodeAt(e); d[e] = f > 57 ? f - 87 : f - 48 } c = 36 * d[0] + d[1]; var g = Math.round(a) + c; b = b.slice(0, 32); var h, i = [ [], [], [], [], [] ], j = {}, k = 0; e = 0; for (var l = b.length; e < l; e++) h = b.charAt(e), j[h] || (j[h] = 1, i[k].push(h), k++, k = 5 == k ? 0 : k); for (var m, n = g, o = 4, p = "", q = [1, 2, 5, 10, 50]; n > 0;) n - q[o] >= 0 ? (m = parseInt(Math.random() * i[o].length, 10), p += i[o][m], n -= q[o]) : (i.splice(o, 1), q.splice(o, 1), o -= 1); return p } ''' OFFLINE_SAMPLE = ((186, 1, 98), (82, 0, 136), (61, 5, 108), (128, 2, 7), (130, 4, 99), (189, 3, 65), (108, 5, 285), (136, 0, 36), (41, 0, 263), (124, 3, 185)) TRACE_JS = ''' var tracer = function () { c = function (traceArray) { for (var b, c, d, e = [], f = 0, g = [], h = 0, i = traceArray.length - 1; h < i; h++) { b = Math.round(traceArray[h + 1][0] - traceArray[h][0]), c = Math.round(traceArray[h + 1][1] - traceArray[h][1]), d = Math.round(traceArray[h + 1][2] - traceArray[h][2]), g.push([b, c, d]), 0 == b && 0 == c && 0 == d || (0 == b && 0 == c ? f += d : (e.push([b, c, d + f]), f = 0)); } return 0 !== f && e.push([b, c, f]), e }, d = function (a) { var b = "()*,-./0123456789:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqr", c = b.length, d = "", e = Math.abs(a), f = parseInt(e / c); f >= c && (f = c - 1), f && (d = b.charAt(f)), e %= c; var g = ""; return a < 0 && (g += "!"), d && (g += "$"), g + d + b.charAt(e) }, e = function (a) { for (var b = [ [1, 0], [2, 0], [1, -1], [1, 1], [0, 1], [0, -1], [3, 0], [2, -1], [2, 1] ], c = "stuvwxyz~", d = 0, e = b.length; d < e; d++) if (a[0] == b[d][0] && a[1] == b[d][1]) return c[d]; return 0 }, f = function (traceArray) { for (var b, f = c(traceArray), g = [], h = [], i = [], j = 0, k = f.length; j < k; j++) { b = e(f[j]), b ? h.push(b) : (g.push(d(f[j][0])), h.push(d(f[j][1]))), i.push(d(f[j][2])); } return g.join("") + "!!" + h.join("") + "!!" + i.join("") }, g = function (traceArray) { var a = f(traceArray); return encodeURIComponent(a) }; return { trace: g } }(); exports.tracer = tracer; '''
"""Exercício 11: Crie um algoritmo que execute os passos definidos na conjectura de Collatz, definidos abaixo: 1: Comece com um número n > 1 2: Encontre o número de Passos necessários pra chegar em 1 3: Se n é par, divida por 2 4: Se n é ímpar, multiplique por 3 e adicione 1 """ def conjectura_collatz(n: int): if n <= 1: return "O número deve ser maior que 1." passos = 0 while n > 1: if n % 2 == 0: # se o número é par n /= 2 else: n = n * 3 + 1 passos += 1 return passos print(conjectura_collatz(5))
print("2)") T = (0.1, 0.1) x = 0.0 for i in range(len(T)): for j in T: x += i + j print(x) print(i) print() ''' 2) 0.1 0.2 1.3 2.4 ''' print("3)") def f(s): print("current s:",s) if len(s) <= 1: print("return:",s) return s return f(f(s[1:])) + s[0] #Note double recursion print(f('math')) print() ''' 3) >> atm >> hatm ''' print("4)") """assumes: wordList is a list of words in lowercase. lStr is a str of lowercase letters. No letter occurs in lStr more than once returns: a list of all the words in wordList that contain each of the letters in lStr exactly once and no letters not in lStr.""" def findAll(wordList, lStr): result = [] letters = sorted(letters) for w in wordList: w = sorted(w) if w == letters: result.append(w) return result print() print("5)") def f(s, d): for k in d.keys(): d[k] = 0 for c in s: if c in d: d[c] += 1 else: d[c] = 0 return d def addUp(d): result = 0 for k in d: result += d[k] return result ''' d1 = {} d2 = d1 #reference d1 = f('abbc',d1) > { a: 0, b: 1, c:0} print addUp(d1) > 1 d2 = f('bbcaa', d2) > {a: 2, b: 2, c:1 } print addUp(d2) > 5 print f(' ', {}) > {" ": 0} print result > None ''' d1 = {} d2 = d1 d1 = f('abbc', d1) print(addUp(d1)) d2 = f('bbcaa', d2) print(addUp(d2)) print(f('', {})) # print(result) print("6)")
class ConnectorJointType(Enum,IComparable,IFormattable,IConvertible): """ Enum of connector joint type enum ConnectorJointType,values: Flanged (1),Glued (5),Grooved (4),Soldered (6),Threaded (3),Undefined (0),Welded (2) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self,*args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self,*args): pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self,*args): pass def __lt__(self,*args): pass def __ne__(self,*args): pass def __reduce_ex__(self,*args): pass def __str__(self,*args): pass Flanged=None Glued=None Grooved=None Soldered=None Threaded=None Undefined=None value__=None Welded=None
'''https://leetcode.com/problems/first-missing-positive/ 41. First Missing Positive Hard 7625 1170 Add to List Share Given an unsorted integer array nums, return the smallest missing positive integer. You must implement an algorithm that runs in O(n) time and uses constant extra space. Example 1: Input: nums = [1,2,0] Output: 3 Example 2: Input: nums = [3,4,-1,1] Output: 2 Example 3: Input: nums = [7,8,9,11,12] Output: 1 Constraints: 1 <= nums.length <= 5 * 105 -231 <= nums[i] <= 231 - 1''' class Solution: def firstMissingPositive(self, nums: List[int]) -> int: i = 0 n = len(nums) while (i < n): correct = nums[i] - 1 if (nums[i] > 0 and nums[i] <= n and nums[i] != nums[correct]): nums[i], nums[correct] = nums[correct], nums[i] else: i += 1 for index in range(n): if (nums[index] != index+1): return index+1 return n+1
print("selamat datang di aplikasi kalkulator full edition ") print("silahkan pilih") def tambah(a,b): #def pada disamping digunakan untuk membuat suatu fungsi untuk operasi matematika # return a+b def kurang(a,b): #yang dimana fungsi return itu adalah tetap walaupun variable diubah# return a-b def kali(a,b): return a*b def pangkat(a,b): return a**b def bagi(a,b): return a/b def mod(a,b): return a%b def factorial(a): hasil=1 for i in range(1,a+1): hasil=hasil*i return hasil def hitungpersegipanjang(p,l): return p*l def hitungsegitiga(a,t): return 1/2*a*t def hitungtrapesium(a,b,t): return 1/2*(a+b)*t def hitungpersegi(s): return s*s def menu(): print("1. tambah") print("2. KURANG") print("3. KALI") print("4. PANGKAT") print("5. BAGI") print("6. mod") #menu() bertujuan untuk menampilkan menu yang sudah ada di dalam fungsi tersebut# print("7. factorial") print("8. hitung luas") print("0. keluar") menu() pilihan="" #sebuah string kosong agar dikenali ole perintah while# while pilihan !=0: #apabila pilihan nya bukan angka 0 maka program akan terus berulang sampai pilih angka 0 baru berhenti# pilihan=int(input("silahkan masukkan pilihan : ")) if pilihan==1: angka1=float(input("masukkan angka pertama : ")) angka2=float(input("masukkan angka sekali lagi : ")) print(angka1,"+",angka2,"=",tambah(angka1,angka2)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==2: #Input ada adalam if masing masing agar pilihan tersebut tidak bercampur aduk contoh faktorial# angka1=float(input("masukkan angka : ")) #hanya membutuhkan satu buah input saja jika kita tidak memasukkan input dalam if maka semua inputnya jadi 2# angka2=float(input("masukkan angka sekali lagi : ")) print(angka1,"-",angka2,"=",kurang(angka1,angka2)) #tujuan dari input float adalah agar bisa menghitung operasi matematika yang berbentuk koma# print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==3: angka1=float(input("masukkan angka : ")) angka2=float(input("masukkan angka sekali lagi : ")) print(angka1,"x",angka2,"=",kali(angka1,angka2)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==4: angka1=float(input("masukkan angka : ")) angka2=float(input("masukkan angka sekali lagi : ")) print(angka1,"^",angka2,"=",pangkat(angka1,angka2)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==5: angka1=float(input("masukkan angka : ")) angka2=float(input("masukkan angka sekali lagi : ")) print(angka1,"/",angka2,"=",bagi(angka1,angka2)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==6: angka1=float(input("masukkan angka : ")) angka2=float(input("masukkan angka sekali lagi : ")) print(angka1,"%",angka2,"=",mod(angka1,angka2)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==7: angka1=int(input("masukkan satu angka : ")) print(angka1,"!","=",factorial(angka1)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==8: print("1.luas persegi panjang") print("2.luas segitiga") print("3.luas trapesium") print("4.luas persegi") choice=int(input("silahkan pilih : ")) if choice==1: panjang=float(input("masukkan panjang : ")) lebar=float(input("masukkan lebar : ")) print(panjang,"*",lebar,"=",hitungpersegipanjang(panjang,lebar)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif choice==2: alas=float(input("masukkan nilai alas : ")) tinggi=float(input("masukkan nilai tinggi : ")) print("1/2*",alas,"*",tinggi,"=",hitungsegitiga(alas,tinggi)) print("luas nya adalah = ",hitungsegitiga(alas,tinggi)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif choice==3: sisiAtas=float(input("masukkan nilai sisi atas : ")) sisiBawah=float(input("masukkan nilai sisi bawah : ")) tinggi=float(input("masukkan nilai tinggi : ")) print("1/2*(",sisiAtas,"+",sisiBawah,")","*",tinggi,"=",hitungtrapesium(sisiAtas,sisiBawah,tinggi)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif choice==4: sisi=float(input("masukkan nilai sisinya : ")) print(sisi,"*",sisi,"=",hitungpersegi(sisi)) print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() else: print("maaf tidak ad menu tersebut") print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu() elif pilihan==0: print("Jangan lupa beri rating ya") else: print("maaf tidak ad menu tersebut") print("selamat datang di aplikasi kalkulator full edition") print("silahkan pilih") menu()
""" Datos de salida contador-->range (97,1003) """ contador=0 for i in range(97,1003): if(i%2==0): contador=contador+i print(contador)
""" Global constants """ #keybinding = { # 'action': pygame.K_s, # 'jump': pygame.K_a, # 'left': pygame.K_LEFT, # 'right': pygame.K_RIGHT, # 'down': pygame.K_DOWN #} # Задать цвета black = ( 0, 0, 0) white = ( 255, 255, 255) red = ( 255, 0, 0) skyblue = ( 107, 140, 255) # Задать размер экрана screen_width = 700 screen_height = 400
class Solution: def getStrongest(self, arr: List[int], k: int) -> List[int]: arr.sort() n = len(arr) m = n//2 if n%2==0: m -= 1 result = [] left, right = 0, n-1 for i in range(k): if arr[m] - arr[left] > arr[right] - arr[m]: result.append(arr[left]) left += 1 else: result.append(arr[right]) right -= 1 return result
# This is a convenience function that can generate simple bar graph # 'title' is the Title of the graph (Just for visuals) # 'dataTitles' is a list of the titles of the individual data rows # 'data' should be a List of Tuples # Each tuple should contain as element 0 the main axis (Timestamp usually) # All other elements should contain the values to graph # Result is a massive string returned that can be dumped to a file def MakeChart(name, titles, dataTitles, data): color = ("red", "blue", "purple") chart = "" # chart += """<html> # <head> # <script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.0"></script> # <script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script> # <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom@1.1.1"></script> # <title>%s</title> # </head> # <body>""" chart += """ <script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.0"></script> <script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script> <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom@1.1.1"></script> <canvas id="%s"></canvas> <script> %s_chartData = { datasets: [ """ % (name, name) dataSets = list() # Skip element 0 because that's the x-Axis for element in range(1, len(data[0])): d = """{ type: 'bar', label: '%s', showLine: true, cubicInterpolationMode: 'default', tension: 0.2, radius: 0, data: [""" % dataTitles[element-1] dataElements = map(lambda x : "{x: '%s', y: %s}" % (x[0], x[element]), data) d += ','.join(dataElements) d += """], borderColor: '%s', backgroundColor: '%s' }""" % (color[element-1], color[element-1]) dataSets.append(d) chart += ','.join(dataSets) chart += """ ] }; const %s_config = { type: "bar", data: %s_chartData, options: { parsing: false, interaction: { mode: 'x', axis: 'x', intersect: false } } }; var %s = new Chart( document.getElementById('%s'), %s_config ); </script>""" % (name, name, name, name, name) # chart += """ # </body> # </html>""" return chart def MakeBWChart(name, titles, dataTitles, data): color = ("rgba(0,0,255,0.5)" , "purple","rgba(255,0,0,0.5)", "orange") chart = "" chart += """ <script src="https://cdn.jsdelivr.net/npm/chart.js@3.5.0"></script> <script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script> <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom@1.1.1"></script> <canvas id="%s"></canvas> <script> %s_chartData = { labels: [""" % (name, name) dataElements = map(lambda x : "'%s'" % x[0], data) chart += ','.join(dataElements) chart += """ ], datasets: [ """ dataSets = list() for N in range(0, int((len(data[0]) - 1) / 3)): element = (N *3) +1 # Skip element 0 because that's the x-Axis d = """{ type: 'bar', yAxisID: 'SLOPE', label: '%s', data: [""" % dataTitles[2*N] dataElements = map(lambda x : "[%s, %s]" % (round(x[element],3), round(x[element+1],3)), data) d += ','.join(dataElements) d += """], borderColor: '%s', backgroundColor: '%s' }""" % (color[2*N], color[2*N]) dataSets.append(d) d = """ { type: 'line', yAxisID: 'SLOPE', label: '%s', data:[""" %dataTitles[2*N +1] dataElements = map(lambda x : "%s" % (round(x[element +2],3)), data) d += ','.join(dataElements) d += """], borderColor: '%s', backgroundColor: '%s' }""" % (color[2*N+1], color[2*N+1]) dataSets.append(d) chart += ','.join(dataSets) chart += """ ] }; const %s_config = { type: "bar", data: %s_chartData, options: { scales: { 'SLOPE': { position: 'left', beginAtZero: false } } } }; var %s_myChart = new Chart( document.getElementById('%s'), %s_config ); </script>""" % (name, name, name, name, name) # chart += """ # </body> # </html>""" return chart
""" Write a program to calculate X^y. """ x = int(input("Enter the value of X: ")) y = int(input("Enter the value of Y: ")) print(pow(x, y))
class Tab: def __init__(self, tosh, prompt_key_bindings=False): self._tosh = tosh self.title = 'Tab' self.layout = None self.prompt_key_bindings = prompt_key_bindings def close(self): self._tosh.window.close_tab(self)
name= input("Enter file:") handle= open(name) counts= dict() for line in handle: words= line.split() for word in words: counts[word]= counts.get(word,0) + 1 bigcount= None bigword= None for word,count in counts.items(): if bigcount is None or count>bigcount: bigword= word bigcount= count print(bigword, bigcount)
""" mocks """ EMAIL_POST = { "subject": "unit test", "to": [{ "email": "recipient@sf.gov", "name": "recipient" }], "from": { "email": "sender@sf.gov", "name": "sender" }, "content": [{ "type": "text/plain", "value": "Hello world!" }], "attachments": [{ "content": "YmFzZTY0IHN0cmluZw==", "filename": "file1.txt", "type": "text/plain" },{ "filename": "test.pdf", "path": "https://www.sf.gov/test.pdf", "type": "application/pdf", "headers": { "api-key": "123ABC" } }], "cc": [{ "email": "cc-recipient@sf.gov", "name": "cc-recipient" }], "bcc": [{ "email": "bcc-recipient@sf.gov", "name": "bcc-recipient" }], "custom_args": { "foo": "bar", "hello": "world" }, "asm": { "group_id": 1, "groups_to_display": [1, 2] } } TEMPLATE_PARAMS = { "url": "", "replacements": { "what_knights_say": "ni" } } EMAIL_HTML = "<h1>Knights that say {{ what_knights_say }}!</h1>" UTC_DATETIME_STRING = "2021-09-30T20:56:58.000Z" PACIFIC_DATETIME_STRING = "Sep 30, 2021 1:56:58 PM" TEAM_MEMBERS = { "": False, "agent": True, "engineer": False, "architect": False, "contractor": False, "authorized agent": False, "AUTHORIZED AGENT-OTHERS": False, "agentWithPowerOfAttorney": False } UPLOADS = [ { "acl": "private", "key": "formio-live/fake_file-3a3144b5-1050-4ceb-8bdc.pdf", "url": "https://foo.s3.amazonaws.com/fake_file-3a3144b5-1050-4ceb-8bdc.pdf", "name": "fake_file-3a3144b5-1050-4ceb-8bdc.pdf", "size": 13264, "type": "application/pdf", "bucket": "bucket", "storage": "s3", "originalName": "fake_file.pdf" }, { "acl": "private", "key": "formio-live/fake_file-3a3144b5-1050-4ceb-8bdc2.pdf", "url": "https://foo.s3.amazonaws.com/fake_file-3a3144b5-1050-4ceb-8bdc2.pdf", "name": "fake_file-3a3144b5-1050-4ceb-8bdc2.pdf", "size": 13264, "type": "application/pdf", "bucket": "bucket", "storage": "s3", "originalName": "fake_file2.pdf" } ]
theme_colors = { 'header': '#015249', 'cell_color':'#535353', 'table_header_color':'#A5A5AF', 'table_background_color_odd':'#e4e4e7', 'grand_total':'#0074D9', 'text':'#535353' }
def recursive_multiply(a, b): A = max(a, b) B = min(a, b) return helper_recursive_multiply(A, B) def helper_recursive_multiply(a, b): if b == 1: return a if b == 0: return 0 half_b = int(b >> 1) if b > half_b + half_b: # odd b. shifting with truncation eliminates a 1 return a + helper_recursive_multiply(a << 1, half_b) # odd case else: return helper_recursive_multiply(a << 1, half_b) # even case
N=int(input()) M=int(input()) #N, M 입력받음 check = [False]*(N+1) # check가 False면 안쓰인것, True면 쓰인 것 a = [0]*M #M크기의 배열(수열 들어갈 배열) def algo(k,inc, N, M): if k == M: for i in range(M): print (a[i], end = ' ') #완성된 수열 출력 print() return else: for i in range(inc, N+1): if check[i]: continue check[i] = True #i 사용했다는 표시를 주고 a[k] = i #i 사용 algo(k+1,i+1,N, M) check[i] = False #한 줄 출력했으면 초기화 algo(0,1,N,M) #1이 맨 앞에 있을 때 2~4 출력 #2가 맨 앞에 있을 때 inc를 1 더해서 3~4출력하도록 함
# -*- coding:utf-8 -*- class Heap: def __init__(self,cmp_f): self.cmp = cmp_f self.heap = [] def siftDown(self,i): target= i left = 2*i + 1 right = 2*i + 2 if left < self.size() and self.cmp(self.heap[left],self.heap[target]): target = left if right < self.size() and self.cmp(self.heap[right],self.heap[target]): target = right if target != i: self.heap[target],self.heap[i] = self.heap[i],self.heap[target] self.siftDown(target) def size(self,): return len(self.heap) def pop(self,): if self.size() ==0: return None self.heap[0],self.heap[-1] = self.heap[-1],self.heap[0] elem = self.heap.pop() self.siftDown(0) return elem def insert(self,num): self.heap.append(num) i = self.size() - 1 parent = (i-1)>>1 while(i>0 and self.cmp(self.heap[i],self.heap[parent])): self.heap[parent],self.heap[i] = self.heap[i],self.heap[parent] i = parent parent = (i-1)>>1 def top(self,): return self.heap[0] class Solution: def __init__(self,): self.maxHeap = Heap(lambda x,y:x>y) self.minHeap = Heap(lambda x,y:x<y) def Insert(self, num): # write code here if self.maxHeap.size() == self.minHeap.size(): self.minHeap.insert(num) self.maxHeap.insert(self.minHeap.pop()) else: self.maxHeap.insert(num) self.minHeap.insert(self.maxHeap.pop()) def GetMedian(self,n=None): # write code here if self.maxHeap.size() == self.minHeap.size(): return (self.maxHeap.top()+self.minHeap.top())/2.0 else: return self.maxHeap.top()*1.0
# Queue # cf. Stack #10828 queue = [] for _ in range(int(input())): op = input().split() # operator, operand if op[0] == 'push': queue.append(op[1]) elif op[0] == 'pop': try: print(queue.pop(0)) except IndexError as e: print(-1) elif op[0] == 'size': print(len(queue)) elif op[0] == 'empty': if len(queue) == 0: print(1) else: print(0) elif op[0] == 'front': if len(queue) != 0: print(queue[0]) else: print(-1) elif op[0] == 'back': if len(queue) != 0: print(queue[-1]) else: print(-1)
# coding: utf-8 y1 = stencil(1, 3, 1) y2 = stencil((-1,1), (3,4), (2,2)) y3 = stencil((-1,0,1), (3,4,5), (2,2,2))
''' lamlight.constants ~~~~~~~~~~~~~~~~~~~ Module contains the constants used in the project. Module contains the following type of constats 1) error messages 2) console commands 3) logging messages 4) general constatns ''' LAMLIGHT_CONF = '.lamlight.config' # error_message NO_LAMBDA_FUNCTION = " Lambda function with '{}' name does not exist." SCAFFOLDING_ERROR = 'Could not create project Scaffolding.' CODE_PULLING_ERROR = "cannot load the code base for '{}' lambda " PACKAGIN_ERROR = "Could not create the code package." NO_LAMLIGHT_PROJECT = 'Not a Lamlight project. Get in lamlight by connection to one lambda function' LAMBDA_ALREADY_EXISTS = " Lambda function with '{}' name already exists." DIRECTORY_ALREADY_EXISTS = 'Directory with name {} already exists' # console commands PIP_UPGRADE = "pip install --upgrade pip" PIP_REQ_INSTALL = "pip install --upgrade --no-cache-dir -r requirements.txt -t temp_dependencies/" ZIP_DEPENDENCY = 'cd temp_dependencies && zip -r ../.requirements.zip .' # logger messages CONNECT_TO_LAMBDA = "Your project is connected to '{}' lambda function" # general DEPENDENCY_DIR = 'temp_dependencies/' BUCKET_NAME = 'lambda-code-{}-{}'
# Copyright 2018 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. load("@io_bazel_rules_k8s//k8s:object.bzl", "k8s_object") def _impl(ctx): args = [ "--output=%s" % ctx.outputs.output.path, "--name=%s" % ctx.label.name[:-len(".generated-yaml")], "--namespace=%s" % ctx.attr.namespace, ] for key, value in ctx.attr.labels.items(): args.append("--label=%s=%s" % (key, value)) # Build the {string: label} dict targets = {} for i, t in enumerate(ctx.attr.data_strings): targets[t] = ctx.attr.data_labels[i] for name, label in ctx.attr.data.items(): fp = targets[label].files.to_list()[0].path args.append(ctx.expand_location("--data=%s=%s" % (name, fp))) ctx.actions.run( inputs=ctx.files.data_labels, outputs=[ctx.outputs.output], executable=ctx.executable._writer, arguments=args, progress_message="creating %s..." % ctx.outputs.output.short_path, ) # See https://docs.bazel.build/versions/master/skylark/rules.html _k8s_configmap = rule( implementation = _impl, attrs={ # TODO(fejta): switch to string_keyed_label_dict once it exists "data": attr.string_dict(mandatory=True, allow_empty=False), "namespace": attr.string(), "cluster": attr.string(), "labels": attr.string_dict(), "output": attr.output(mandatory=True), # private attrs, the data_* are used to create a {string: label} dict "data_strings": attr.string_list(mandatory=True), "data_labels": attr.label_list(mandatory=True, allow_files=True), "_writer": attr.label(executable=True, cfg="host", allow_files=True, default=Label("//def/configmap")), }, ) # A macro to create a configmap object as well as rules to manage it. # # Usage: # k8s_configmap("something", data={"foo": "//path/to/foo.json"}) # # This is roughly equivalent to: # kubectl create configmap something --from-file=foo=path/to/foo.json # Supports cluster=kubectl_context, namespace="blah", labels={"app": "fancy"} # as well as any args k8s_object supports. # # Generates a k8s_object(kind="configmap") with the generated template. # # See also: # * https://docs.bazel.build/versions/master/skylark/macros.html # * https://github.com/bazelbuild/rules_k8s#k8s_object def k8s_configmap(name, data=None, namespace='', labels=None, cluster='', **kw): # Create the non-duplicated list of data values _data = data or {} _data_targets = {v: None for v in _data.values()}.keys() # Create the rule to generate the configmap _k8s_configmap( name = name + ".generated-yaml", data=data, namespace=namespace, labels=labels, output=name + "_configmap.yaml", data_strings=_data_targets, data_labels=_data_targets, ) # Run k8s_object with the generated configmap k8s_object( name = name, kind = "configmap", template = name + "_configmap.yaml", cluster = cluster, namespace = namespace, **kw)
# pylint: skip-file # This file is part of 'miniver': https://github.com/jbweston/miniver # # This file will be overwritten by setup.py when a source or binary # distribution is made. The magic value "__use_git__" is interpreted by # version.py. version = "__use_git__" # These values are only set if the distribution was created with 'git archive' refnames = "$Format:%D$" git_hash = "$Format:%h$"
data = ( ' @ ', # 0x00 ' ... ', # 0x01 ', ', # 0x02 '. ', # 0x03 ': ', # 0x04 ' // ', # 0x05 '', # 0x06 '-', # 0x07 ', ', # 0x08 '. ', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '[?]', # 0x0f '0', # 0x10 '1', # 0x11 '2', # 0x12 '3', # 0x13 '4', # 0x14 '5', # 0x15 '6', # 0x16 '7', # 0x17 '8', # 0x18 '9', # 0x19 '[?]', # 0x1a '[?]', # 0x1b '[?]', # 0x1c '[?]', # 0x1d '[?]', # 0x1e '[?]', # 0x1f 'a', # 0x20 'e', # 0x21 'i', # 0x22 'o', # 0x23 'u', # 0x24 'O', # 0x25 'U', # 0x26 'ee', # 0x27 'n', # 0x28 'ng', # 0x29 'b', # 0x2a 'p', # 0x2b 'q', # 0x2c 'g', # 0x2d 'm', # 0x2e 'l', # 0x2f 's', # 0x30 'sh', # 0x31 't', # 0x32 'd', # 0x33 'ch', # 0x34 'j', # 0x35 'y', # 0x36 'r', # 0x37 'w', # 0x38 'f', # 0x39 'k', # 0x3a 'kha', # 0x3b 'ts', # 0x3c 'z', # 0x3d 'h', # 0x3e 'zr', # 0x3f 'lh', # 0x40 'zh', # 0x41 'ch', # 0x42 '-', # 0x43 'e', # 0x44 'i', # 0x45 'o', # 0x46 'u', # 0x47 'O', # 0x48 'U', # 0x49 'ng', # 0x4a 'b', # 0x4b 'p', # 0x4c 'q', # 0x4d 'g', # 0x4e 'm', # 0x4f 't', # 0x50 'd', # 0x51 'ch', # 0x52 'j', # 0x53 'ts', # 0x54 'y', # 0x55 'w', # 0x56 'k', # 0x57 'g', # 0x58 'h', # 0x59 'jy', # 0x5a 'ny', # 0x5b 'dz', # 0x5c 'e', # 0x5d 'i', # 0x5e 'iy', # 0x5f 'U', # 0x60 'u', # 0x61 'ng', # 0x62 'k', # 0x63 'g', # 0x64 'h', # 0x65 'p', # 0x66 'sh', # 0x67 't', # 0x68 'd', # 0x69 'j', # 0x6a 'f', # 0x6b 'g', # 0x6c 'h', # 0x6d 'ts', # 0x6e 'z', # 0x6f 'r', # 0x70 'ch', # 0x71 'zh', # 0x72 'i', # 0x73 'k', # 0x74 'r', # 0x75 'f', # 0x76 'zh', # 0x77 '[?]', # 0x78 '[?]', # 0x79 '[?]', # 0x7a '[?]', # 0x7b '[?]', # 0x7c '[?]', # 0x7d '[?]', # 0x7e '[?]', # 0x7f '[?]', # 0x80 'H', # 0x81 'X', # 0x82 'W', # 0x83 'M', # 0x84 ' 3 ', # 0x85 ' 333 ', # 0x86 'a', # 0x87 'i', # 0x88 'k', # 0x89 'ng', # 0x8a 'c', # 0x8b 'tt', # 0x8c 'tth', # 0x8d 'dd', # 0x8e 'nn', # 0x8f 't', # 0x90 'd', # 0x91 'p', # 0x92 'ph', # 0x93 'ss', # 0x94 'zh', # 0x95 'z', # 0x96 'a', # 0x97 't', # 0x98 'zh', # 0x99 'gh', # 0x9a 'ng', # 0x9b 'c', # 0x9c 'jh', # 0x9d 'tta', # 0x9e 'ddh', # 0x9f 't', # 0xa0 'dh', # 0xa1 'ss', # 0xa2 'cy', # 0xa3 'zh', # 0xa4 'z', # 0xa5 'u', # 0xa6 'y', # 0xa7 'bh', # 0xa8 '\'', # 0xa9 '[?]', # 0xaa '[?]', # 0xab '[?]', # 0xac '[?]', # 0xad '[?]', # 0xae '[?]', # 0xaf '[?]', # 0xb0 '[?]', # 0xb1 '[?]', # 0xb2 '[?]', # 0xb3 '[?]', # 0xb4 '[?]', # 0xb5 '[?]', # 0xb6 '[?]', # 0xb7 '[?]', # 0xb8 '[?]', # 0xb9 '[?]', # 0xba '[?]', # 0xbb '[?]', # 0xbc '[?]', # 0xbd '[?]', # 0xbe '[?]', # 0xbf '[?]', # 0xc0 '[?]', # 0xc1 '[?]', # 0xc2 '[?]', # 0xc3 '[?]', # 0xc4 '[?]', # 0xc5 '[?]', # 0xc6 '[?]', # 0xc7 '[?]', # 0xc8 '[?]', # 0xc9 '[?]', # 0xca '[?]', # 0xcb '[?]', # 0xcc '[?]', # 0xcd '[?]', # 0xce '[?]', # 0xcf '[?]', # 0xd0 '[?]', # 0xd1 '[?]', # 0xd2 '[?]', # 0xd3 '[?]', # 0xd4 '[?]', # 0xd5 '[?]', # 0xd6 '[?]', # 0xd7 '[?]', # 0xd8 '[?]', # 0xd9 '[?]', # 0xda '[?]', # 0xdb '[?]', # 0xdc '[?]', # 0xdd '[?]', # 0xde '[?]', # 0xdf '[?]', # 0xe0 '[?]', # 0xe1 '[?]', # 0xe2 '[?]', # 0xe3 '[?]', # 0xe4 '[?]', # 0xe5 '[?]', # 0xe6 '[?]', # 0xe7 '[?]', # 0xe8 '[?]', # 0xe9 '[?]', # 0xea '[?]', # 0xeb '[?]', # 0xec '[?]', # 0xed '[?]', # 0xee '[?]', # 0xef '[?]', # 0xf0 '[?]', # 0xf1 '[?]', # 0xf2 '[?]', # 0xf3 '[?]', # 0xf4 '[?]', # 0xf5 '[?]', # 0xf6 '[?]', # 0xf7 '[?]', # 0xf8 '[?]', # 0xf9 '[?]', # 0xfa '[?]', # 0xfb '[?]', # 0xfc '[?]', # 0xfd '[?]', # 0xfe )
# Populate temporary table A TMP_VOID_A = """ SELECT gltr_rec.gltr_no as gltr_noa, gle_rec.jrnl_ref, gle_rec.doc_id as cknodoc_ida, gle_rec.doc_no as cknodoc_noa, gltr_rec.subs, gltr_rec.stat, gltr_rec.recon_stat FROM vch_rec, gle_rec, gltr_rec WHERE gle_rec.jrnl_ref = 'CK' AND vch_rec.amt_type = 'ACT' AND gle_rec.ctgry = 'VOID' AND gle_rec.jrnl_ref = vch_rec.vch_ref AND gle_rec.jrnl_no = vch_rec.jrnl_no AND gle_rec.jrnl_ref = gltr_rec.jrnl_ref AND gle_rec.jrnl_no = gltr_rec.jrnl_no AND gle_rec.gle_no = gltr_rec.ent_no AND gltr_rec.stat IN('P','xV') AND gltr_rec.recon_stat = 'O' ORDER BY cknodoc_noa INTO TEMP tmp_voida WITH NO LOG """ # select * from temporary table A for testing SELECT_VOID_A = """ SELECT * FROM tmp_voida ORDER BY cknodoc_noa, gltr_noa """ # Populate temporary table B TMP_VOID_B = """ SELECT gle_rec.doc_id as cknodoc_idb, gltr_rec.gltr_no as gltr_nob, gle_rec.jrnl_ref, gle_rec.jrnl_no, gle_rec.descr as GLEdescr, gle_rec.doc_no as cknodoc_nob, gle_rec.ctgry, gltr_rec.amt, gltr_rec.recon_stat FROM vch_rec, gle_rec, gltr_rec, tmp_voida WHERE gle_rec.jrnl_ref = 'CK' AND vch_rec.amt_type = 'ACT' AND gle_rec.jrnl_ref = vch_rec.vch_ref AND gle_rec.jrnl_no = vch_rec.jrnl_no AND gle_rec.jrnl_ref = gltr_rec.jrnl_ref AND gle_rec.jrnl_no = gltr_rec.jrnl_no AND gle_rec.gle_no = gltr_rec.ent_no AND gltr_rec.stat IN('P','xV') AND gltr_rec.recon_stat = 'O' AND tmp_voida.cknodoc_noa = gle_rec.doc_no AND tmp_voida.cknodoc_ida = gle_rec.doc_id AND tmp_voida.subs = gltr_rec.subs AND tmp_voida.stat = gltr_rec.stat AND tmp_voida.recon_stat = gltr_rec.recon_stat ORDER BY cknodoc_nob INTO TEMP tmp_voidb WITH NO LOG """ # select * from temporary table B and send the data to the business office SELECT_VOID_B = """ SELECT * FROM tmp_voidb ORDER BY cknodoc_nob, gltr_nob """ # Set reconciliation status to 'v' UPDATE_RECONCILIATION_STATUS = """ UPDATE gltr_rec SET gltr_rec.recon_stat = 'v' WHERE gltr_rec.gltr_no IN ( SELECT tmp_voidb.gltr_nob FROM tmp_voidb ) AND gltr_rec.recon_stat = 'O' """ # Find the duplicate cheque numbers and update those as 's'uspicious # select import_date and stick it in a temp table, for some reason SELECT_CURRENT_BATCH_DATE = """ SELECT Min(ccreconjb_rec.jbimprt_date) AS crrntbatchdate FROM ccreconjb_rec WHERE jbimprt_date >= '{import_date}' INTO TEMP tmp_maxbtchdate WITH NO LOG """ # select the duplicate cheques SELECT_DUPLICATES_1 = """ SELECT ccreconjb_rec.jbchkno, tmp_maxbtchdate.crrntbatchdate, Max(ccreconjb_rec.jbimprt_date) AS maxbatchdate, Min(ccreconjb_rec.jbimprt_date) AS minbatchdate, Count(ccreconjb_rec.jbseqno) AS countofjbseqno FROM ccreconjb_rec, tmp_maxbtchdate WHERE ccreconjb_rec.jbimprt_date >= '{import_date}' GROUP BY ccreconjb_rec.jbchkno, tmp_maxbtchdate.crrntbatchdate HAVING Count(ccreconjb_rec.jbseqno) > 1 INTO TEMP tmp_dupcknos WITH NO LOG """ # select cheques for updating SELECT_FOR_UPDATING = """ SELECT ccreconjb_rec.jbseqno, ccreconjb_rec.jbchkno, ccreconjb_rec.jbchknolnk, ccreconjb_rec.jbimprt_date, ccreconjb_rec.jbstatus, ccreconjb_rec.jbaction, ccreconjb_rec.jbaccount, ccreconjb_rec.jbamount, ccreconjb_rec.jbamountlnk, ccreconjb_rec.jbstatus_date, tmp_dupcknos.crrntbatchdate, tmp_dupcknos.maxbatchdate, tmp_dupcknos.minbatchdate, tmp_dupcknos.countofjbseqno FROM ccreconjb_rec, tmp_dupcknos WHERE ccreconjb_rec.jbimprt_date >= '{import_date}' AND ccreconjb_rec.jbchkno = tmp_dupcknos.jbchkno AND ccreconjb_rec.jbstatus = 'I' ORDER BY ccreconjb_rec.jbchkno, ccreconjb_rec.jbseqno INTO TEMP tmp_4updtstatus WITH NO LOG """ # select the records to be updated and send to the business office SELECT_RECORDS_FOR_UPDATE = """ SELECT * FROM tmp_4updtstatus ORDER BY jbchkno, jbseqno """ # update cheque status to 's'uspicious UPDATE_STATUS_SUSPICIOUS = """ UPDATE ccreconjb_rec SET ccreconjb_rec.jbstatus = 's' WHERE ccreconjb_rec.jbseqno IN ( SELECT tmp_4updtstatus.jbseqno FROM tmp_4updtstatus ) AND ccreconjb_rec.jbstatus = 'I' """ # send the results to the business office SELECT_DUPLICATES_2 = """ SELECT ccreconjb_rec.jbseqno, ccreconjb_rec.jbchkno, ccreconjb_rec.jbchknolnk, ccreconjb_rec.jbimprt_date, ccreconjb_rec.jbstatus, ccreconjb_rec.jbaction, ccreconjb_rec.jbaccount, ccreconjb_rec.jbamount, ccreconjb_rec.jbamountlnk, ccreconjb_rec.jbstatus_date, tmp_dupcknos.crrntbatchdate, tmp_dupcknos.maxbatchdate, tmp_dupcknos.minbatchdate, tmp_dupcknos.countofjbseqno FROM ccreconjb_rec, tmp_dupcknos WHERE ccreconjb_rec.jbimprt_date >= '{import_date}' AND ccreconjb_rec.jbchkno = tmp_dupcknos.jbchkno ORDER BY ccreconjb_rec.jbchkno, ccreconjb_rec.jbseqno """ # Find the cleared CheckNos and update gltr_rec as 'r'econciled # and ccreconjb_rec as 'ar' (auto-reconciled) SELECT_CLEARED_CHEQUES = """ SELECT ccreconjb_rec.jbimprt_date, ccreconjb_rec.jbseqno, ccreconjb_rec.jbchkno, ccreconjb_rec.jbchknolnk, ccreconjb_rec.jbstatus, ccreconjb_rec.jbaction, ccreconjb_rec.jbamount, ccreconjb_rec.jbamountlnk, ccreconjb_rec.jbaccount, ccreconjb_rec.jbstatus_date, ccreconjb_rec.jbpayee, gltr_rec.gltr_no, gle_rec.jrnl_ref, gle_rec.jrnl_no, gle_rec.doc_id as cknodoc_id, gltr_rec.amt, gle_rec.doc_no as cknodoc_no, gltr_rec.subs, gltr_rec.stat, gltr_rec.recon_stat FROM vch_rec, gle_rec, gltr_rec, ccreconjb_rec WHERE gle_rec.jrnl_ref = 'CK' AND vch_rec.amt_type = 'ACT' AND gle_rec.ctgry = 'CHK' AND gle_rec.jrnl_ref = vch_rec.vch_ref AND gle_rec.jrnl_no = vch_rec.jrnl_no AND gle_rec.jrnl_ref = gltr_rec.jrnl_ref AND gle_rec.jrnl_no = gltr_rec.jrnl_no AND gle_rec.gle_no = gltr_rec.ent_no AND gltr_rec.stat IN('P','xV') AND ccreconjb_rec.jbchknolnk = gle_rec.doc_no AND ccreconjb_rec.jbamountlnk = gltr_rec.amt AND ccreconjb_rec.jbstatus NOT IN("s","ar","er","mr") AND gltr_rec.recon_stat NOT IN("r","v") AND ccreconjb_rec.jbimprt_date >= '{import_date}' ORDER BY gle_rec.doc_no INTO TEMP tmp_reconupdta WITH NO LOG """ UPDATE_RECONCILED = """ UPDATE gltr_rec SET gltr_rec.recon_stat = 'r' WHERE gltr_rec.gltr_no IN ( SELECT tmp_reconupdta.gltr_no FROM tmp_reconupdta ) AND gltr_rec.recon_stat = 'O' """ UPDATE_STATUS_AUTO_REC = """ UPDATE ccreconjb_rec SET ccreconjb_rec.jbstatus = 'ar' WHERE ccreconjb_rec.jbseqno IN ( SELECT tmp_reconupdta.jbseqno FROM tmp_reconupdta ) AND ccreconjb_rec.jbstatus = 'I' """ # Display reconciled checks SELECT_RECONCILIATED = """ SELECT * FROM tmp_reconupdta ORDER BY tmp_reconupdta.cknodoc_no """ # Display any left over imported checks whose status has not changed SELECT_REMAINING_EYE = """ SELECT * FROM ccreconjb_rec where jbstatus = 'I' """
def test_admin_peers(web3, skip_if_testrpc): skip_if_testrpc(web3) assert web3.geth.admin.peers == []
# For the 1.x version def needs_host(func): @wraps(func) def inner(*args, **kwargs): return func(*args, **kwargs) return inner def local(command, capture=False, shell=None): pass @needs_host def run(command, shell=True, pty=True, combine_stderr=None, quiet=False, warn_only=False, stdout=None, stderr=None, timeout=None, shell_escape=None, capture_buffer_size=None): pass @needs_host def sudo(command, shell=True, pty=True, combine_stderr=None, user=None, quiet=False, warn_only=False, stdout=None, stderr=None, group=None, timeout=None, shell_escape=None, capture_buffer_size=None): pass
def capitalize(s): return s[0].upper() + s[1:] def sqlalchemy_column_types(field_type): if field_type == 'int': return('Integer') else: return('String')
class RecentCounter: def __init__(self): self.queue = [] def ping(self, t: int) -> int: self.queue.append(t) while t - self.queue[0] > 3000: self.queue.pop(0) return len(self.queue) # Your RecentCounter object will be instantiated and called as such: # obj = RecentCounter() # param_1 = obj.ping(t)
if __name__ == "__main__": print("Hello World!") l = [1, 2, 3, 4, 5] print("list =", l) print(f"format string list = {l}") print(f"sum of l = {sum(l)}")
""" Copyright (c) 2018 Fabian Affolter <fabian@affolter-engineering.ch> Licensed under MIT. All rights reserved. """ class PiHoleError(Exception): """General PiHoleError exception occurred.""" pass class PiHoleConnectionError(PiHoleError): """When a connection error is encountered.""" pass
class Chelovek: imja = "Maksim" def pokazatj_info(self): print("Privet, menja zovut", self.imja) chelovek1 = Chelovek() chelovek1.pokazatj_info() chelovek2 = Chelovek() chelovek2.imja = "Tanja" chelovek2.pokazatj_info()
# Generated by h2py from /usr/include/netinet/in.h # Included from sys/cdefs.h def __P(protos): return protos def __STRING(x): return #x def __XSTRING(x): return __STRING(x) def __P(protos): return () def __STRING(x): return "x" def __aligned(x): return __attribute__((__aligned__(x))) def __section(x): return __attribute__((__section__(x))) def __aligned(x): return __attribute__((__aligned__(x))) def __section(x): return __attribute__((__section__(x))) def __nonnull(x): return __attribute__((__nonnull__(x))) def __predict_true(exp): return __builtin_expect((exp), 1) def __predict_false(exp): return __builtin_expect((exp), 0) def __predict_true(exp): return (exp) def __predict_false(exp): return (exp) def __FBSDID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) def __RCSID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) def __RCSID_SOURCE(s): return __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) def __SCCSID(s): return __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) def __COPYRIGHT(s): return __IDSTRING(__CONCAT(__copyright_,__LINE__),s) _POSIX_C_SOURCE = 199009 _POSIX_C_SOURCE = 199209 __XSI_VISIBLE = 600 _POSIX_C_SOURCE = 200112 __XSI_VISIBLE = 500 _POSIX_C_SOURCE = 199506 _POSIX_C_SOURCE = 198808 __POSIX_VISIBLE = 200112 __ISO_C_VISIBLE = 1999 __POSIX_VISIBLE = 199506 __ISO_C_VISIBLE = 1990 __POSIX_VISIBLE = 199309 __ISO_C_VISIBLE = 1990 __POSIX_VISIBLE = 199209 __ISO_C_VISIBLE = 1990 __POSIX_VISIBLE = 199009 __ISO_C_VISIBLE = 1990 __POSIX_VISIBLE = 198808 __ISO_C_VISIBLE = 0 __POSIX_VISIBLE = 0 __XSI_VISIBLE = 0 __BSD_VISIBLE = 0 __ISO_C_VISIBLE = 1990 __POSIX_VISIBLE = 0 __XSI_VISIBLE = 0 __BSD_VISIBLE = 0 __ISO_C_VISIBLE = 1999 __POSIX_VISIBLE = 200112 __XSI_VISIBLE = 600 __BSD_VISIBLE = 1 __ISO_C_VISIBLE = 1999 # Included from sys/_types.h # Included from machine/_types.h # Included from machine/endian.h _QUAD_HIGHWORD = 1 _QUAD_LOWWORD = 0 _LITTLE_ENDIAN = 1234 _BIG_ENDIAN = 4321 _PDP_ENDIAN = 3412 _BYTE_ORDER = _LITTLE_ENDIAN LITTLE_ENDIAN = _LITTLE_ENDIAN BIG_ENDIAN = _BIG_ENDIAN PDP_ENDIAN = _PDP_ENDIAN BYTE_ORDER = _BYTE_ORDER __INTEL_COMPILER_with_FreeBSD_endian = 1 __INTEL_COMPILER_with_FreeBSD_endian = 1 def __word_swap_int_var(x): return \ def __word_swap_int_const(x): return \ def __word_swap_int(x): return __word_swap_int_var(x) def __byte_swap_int_var(x): return \ def __byte_swap_int_var(x): return \ def __byte_swap_int_const(x): return \ def __byte_swap_int(x): return __byte_swap_int_var(x) def __byte_swap_word_var(x): return \ def __byte_swap_word_const(x): return \ def __byte_swap_word(x): return __byte_swap_word_var(x) def __htonl(x): return __bswap32(x) def __htons(x): return __bswap16(x) def __ntohl(x): return __bswap32(x) def __ntohs(x): return __bswap16(x) IPPROTO_IP = 0 IPPROTO_ICMP = 1 IPPROTO_TCP = 6 IPPROTO_UDP = 17 def htonl(x): return __htonl(x) def htons(x): return __htons(x) def ntohl(x): return __ntohl(x) def ntohs(x): return __ntohs(x) IPPROTO_RAW = 255 INET_ADDRSTRLEN = 16 IPPROTO_HOPOPTS = 0 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 IPPROTO_IPV4 = 4 IPPROTO_IPIP = IPPROTO_IPV4 IPPROTO_ST = 7 IPPROTO_EGP = 8 IPPROTO_PIGP = 9 IPPROTO_RCCMON = 10 IPPROTO_NVPII = 11 IPPROTO_PUP = 12 IPPROTO_ARGUS = 13 IPPROTO_EMCON = 14 IPPROTO_XNET = 15 IPPROTO_CHAOS = 16 IPPROTO_MUX = 18 IPPROTO_MEAS = 19 IPPROTO_HMP = 20 IPPROTO_PRM = 21 IPPROTO_IDP = 22 IPPROTO_TRUNK1 = 23 IPPROTO_TRUNK2 = 24 IPPROTO_LEAF1 = 25 IPPROTO_LEAF2 = 26 IPPROTO_RDP = 27 IPPROTO_IRTP = 28 IPPROTO_TP = 29 IPPROTO_BLT = 30 IPPROTO_NSP = 31 IPPROTO_INP = 32 IPPROTO_SEP = 33 IPPROTO_3PC = 34 IPPROTO_IDPR = 35 IPPROTO_XTP = 36 IPPROTO_DDP = 37 IPPROTO_CMTP = 38 IPPROTO_TPXX = 39 IPPROTO_IL = 40 IPPROTO_IPV6 = 41 IPPROTO_SDRP = 42 IPPROTO_ROUTING = 43 IPPROTO_FRAGMENT = 44 IPPROTO_IDRP = 45 IPPROTO_RSVP = 46 IPPROTO_GRE = 47 IPPROTO_MHRP = 48 IPPROTO_BHA = 49 IPPROTO_ESP = 50 IPPROTO_AH = 51 IPPROTO_INLSP = 52 IPPROTO_SWIPE = 53 IPPROTO_NHRP = 54 IPPROTO_MOBILE = 55 IPPROTO_TLSP = 56 IPPROTO_SKIP = 57 IPPROTO_ICMPV6 = 58 IPPROTO_NONE = 59 IPPROTO_DSTOPTS = 60 IPPROTO_AHIP = 61 IPPROTO_CFTP = 62 IPPROTO_HELLO = 63 IPPROTO_SATEXPAK = 64 IPPROTO_KRYPTOLAN = 65 IPPROTO_RVD = 66 IPPROTO_IPPC = 67 IPPROTO_ADFS = 68 IPPROTO_SATMON = 69 IPPROTO_VISA = 70 IPPROTO_IPCV = 71 IPPROTO_CPNX = 72 IPPROTO_CPHB = 73 IPPROTO_WSN = 74 IPPROTO_PVP = 75 IPPROTO_BRSATMON = 76 IPPROTO_ND = 77 IPPROTO_WBMON = 78 IPPROTO_WBEXPAK = 79 IPPROTO_EON = 80 IPPROTO_VMTP = 81 IPPROTO_SVMTP = 82 IPPROTO_VINES = 83 IPPROTO_TTP = 84 IPPROTO_IGP = 85 IPPROTO_DGP = 86 IPPROTO_TCF = 87 IPPROTO_IGRP = 88 IPPROTO_OSPFIGP = 89 IPPROTO_SRPC = 90 IPPROTO_LARP = 91 IPPROTO_MTP = 92 IPPROTO_AX25 = 93 IPPROTO_IPEIP = 94 IPPROTO_MICP = 95 IPPROTO_SCCSP = 96 IPPROTO_ETHERIP = 97 IPPROTO_ENCAP = 98 IPPROTO_APES = 99 IPPROTO_GMTP = 100 IPPROTO_IPCOMP = 108 IPPROTO_PIM = 103 IPPROTO_PGM = 113 IPPROTO_PFSYNC = 240 IPPROTO_OLD_DIVERT = 254 IPPROTO_MAX = 256 IPPROTO_DONE = 257 IPPROTO_DIVERT = 258 IPPORT_RESERVED = 1024 IPPORT_HIFIRSTAUTO = 49152 IPPORT_HILASTAUTO = 65535 IPPORT_RESERVEDSTART = 600 IPPORT_MAX = 65535 def IN_CLASSA(i): return (((u_int32_t)(i) & (-2147483648)) == 0) IN_CLASSA_NET = (-16777216) IN_CLASSA_NSHIFT = 24 IN_CLASSA_HOST = 0x00ffffff IN_CLASSA_MAX = 128 def IN_CLASSB(i): return (((u_int32_t)(i) & (-1073741824)) == (-2147483648)) IN_CLASSB_NET = (-65536) IN_CLASSB_NSHIFT = 16 IN_CLASSB_HOST = 0x0000ffff IN_CLASSB_MAX = 65536 def IN_CLASSC(i): return (((u_int32_t)(i) & (-536870912)) == (-1073741824)) IN_CLASSC_NET = (-256) IN_CLASSC_NSHIFT = 8 IN_CLASSC_HOST = 0x000000ff def IN_CLASSD(i): return (((u_int32_t)(i) & (-268435456)) == (-536870912)) IN_CLASSD_NET = (-268435456) IN_CLASSD_NSHIFT = 28 IN_CLASSD_HOST = 0x0fffffff def IN_MULTICAST(i): return IN_CLASSD(i) def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456)) def IN_BADCLASS(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456)) INADDR_NONE = (-1) IN_LOOPBACKNET = 127 IP_OPTIONS = 1 IP_HDRINCL = 2 IP_TOS = 3 IP_TTL = 4 IP_RECVOPTS = 5 IP_RECVRETOPTS = 6 IP_RECVDSTADDR = 7 IP_SENDSRCADDR = IP_RECVDSTADDR IP_RETOPTS = 8 IP_MULTICAST_IF = 9 IP_MULTICAST_TTL = 10 IP_MULTICAST_LOOP = 11 IP_ADD_MEMBERSHIP = 12 IP_DROP_MEMBERSHIP = 13 IP_MULTICAST_VIF = 14 IP_RSVP_ON = 15 IP_RSVP_OFF = 16 IP_RSVP_VIF_ON = 17 IP_RSVP_VIF_OFF = 18 IP_PORTRANGE = 19 IP_RECVIF = 20 IP_IPSEC_POLICY = 21 IP_FAITH = 22 IP_ONESBCAST = 23 IP_FW_TABLE_ADD = 40 IP_FW_TABLE_DEL = 41 IP_FW_TABLE_FLUSH = 42 IP_FW_TABLE_GETSIZE = 43 IP_FW_TABLE_LIST = 44 IP_FW_ADD = 50 IP_FW_DEL = 51 IP_FW_FLUSH = 52 IP_FW_ZERO = 53 IP_FW_GET = 54 IP_FW_RESETLOG = 55 IP_DUMMYNET_CONFIGURE = 60 IP_DUMMYNET_DEL = 61 IP_DUMMYNET_FLUSH = 62 IP_DUMMYNET_GET = 64 IP_RECVTTL = 65 IP_DEFAULT_MULTICAST_TTL = 1 IP_DEFAULT_MULTICAST_LOOP = 1 IP_MAX_MEMBERSHIPS = 20 IP_PORTRANGE_DEFAULT = 0 IP_PORTRANGE_HIGH = 1 IP_PORTRANGE_LOW = 2 IPPROTO_MAXID = (IPPROTO_AH + 1) IPCTL_FORWARDING = 1 IPCTL_SENDREDIRECTS = 2 IPCTL_DEFTTL = 3 IPCTL_DEFMTU = 4 IPCTL_RTEXPIRE = 5 IPCTL_RTMINEXPIRE = 6 IPCTL_RTMAXCACHE = 7 IPCTL_SOURCEROUTE = 8 IPCTL_DIRECTEDBROADCAST = 9 IPCTL_INTRQMAXLEN = 10 IPCTL_INTRQDROPS = 11 IPCTL_STATS = 12 IPCTL_ACCEPTSOURCEROUTE = 13 IPCTL_FASTFORWARDING = 14 IPCTL_KEEPFAITH = 15 IPCTL_GIF_TTL = 16 IPCTL_MAXID = 17 def in_nullhost(x): return ((x).s_addr == INADDR_ANY) # Included from netinet6/in6.h __KAME_VERSION = "20010528/FreeBSD" IPV6PORT_RESERVED = 1024 IPV6PORT_ANONMIN = 49152 IPV6PORT_ANONMAX = 65535 IPV6PORT_RESERVEDMIN = 600 IPV6PORT_RESERVEDMAX = (IPV6PORT_RESERVED-1) INET6_ADDRSTRLEN = 46 IPV6_ADDR_INT32_ONE = 1 IPV6_ADDR_INT32_TWO = 2 IPV6_ADDR_INT32_MNL = (-16711680) IPV6_ADDR_INT32_MLL = (-16646144) IPV6_ADDR_INT32_SMP = 0x0000ffff IPV6_ADDR_INT16_ULL = 0xfe80 IPV6_ADDR_INT16_USL = 0xfec0 IPV6_ADDR_INT16_MLL = 0xff02 IPV6_ADDR_INT32_ONE = 0x01000000 IPV6_ADDR_INT32_TWO = 0x02000000 IPV6_ADDR_INT32_MNL = 0x000001ff IPV6_ADDR_INT32_MLL = 0x000002ff IPV6_ADDR_INT32_SMP = (-65536) IPV6_ADDR_INT16_ULL = 0x80fe IPV6_ADDR_INT16_USL = 0xc0fe IPV6_ADDR_INT16_MLL = 0x02ff def IN6_IS_ADDR_UNSPECIFIED(a): return \ def IN6_IS_ADDR_LOOPBACK(a): return \ def IN6_IS_ADDR_V4COMPAT(a): return \ def IN6_IS_ADDR_V4MAPPED(a): return \ IPV6_ADDR_SCOPE_NODELOCAL = 0x01 IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01 IPV6_ADDR_SCOPE_LINKLOCAL = 0x02 IPV6_ADDR_SCOPE_SITELOCAL = 0x05 IPV6_ADDR_SCOPE_ORGLOCAL = 0x08 IPV6_ADDR_SCOPE_GLOBAL = 0x0e __IPV6_ADDR_SCOPE_NODELOCAL = 0x01 __IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01 __IPV6_ADDR_SCOPE_LINKLOCAL = 0x02 __IPV6_ADDR_SCOPE_SITELOCAL = 0x05 __IPV6_ADDR_SCOPE_ORGLOCAL = 0x08 __IPV6_ADDR_SCOPE_GLOBAL = 0x0e def IN6_IS_ADDR_LINKLOCAL(a): return \ def IN6_IS_ADDR_SITELOCAL(a): return \ def IN6_IS_ADDR_MC_NODELOCAL(a): return \ def IN6_IS_ADDR_MC_INTFACELOCAL(a): return \ def IN6_IS_ADDR_MC_LINKLOCAL(a): return \ def IN6_IS_ADDR_MC_SITELOCAL(a): return \ def IN6_IS_ADDR_MC_ORGLOCAL(a): return \ def IN6_IS_ADDR_MC_GLOBAL(a): return \ def IN6_IS_ADDR_MC_NODELOCAL(a): return \ def IN6_IS_ADDR_MC_LINKLOCAL(a): return \ def IN6_IS_ADDR_MC_SITELOCAL(a): return \ def IN6_IS_ADDR_MC_ORGLOCAL(a): return \ def IN6_IS_ADDR_MC_GLOBAL(a): return \ def IN6_IS_SCOPE_LINKLOCAL(a): return \ def IFA6_IS_DEPRECATED(a): return \ def IFA6_IS_INVALID(a): return \ IPV6_OPTIONS = 1 IPV6_RECVOPTS = 5 IPV6_RECVRETOPTS = 6 IPV6_RECVDSTADDR = 7 IPV6_RETOPTS = 8 IPV6_SOCKOPT_RESERVED1 = 3 IPV6_UNICAST_HOPS = 4 IPV6_MULTICAST_IF = 9 IPV6_MULTICAST_HOPS = 10 IPV6_MULTICAST_LOOP = 11 IPV6_JOIN_GROUP = 12 IPV6_LEAVE_GROUP = 13 IPV6_PORTRANGE = 14 ICMP6_FILTER = 18 IPV6_2292PKTINFO = 19 IPV6_2292HOPLIMIT = 20 IPV6_2292NEXTHOP = 21 IPV6_2292HOPOPTS = 22 IPV6_2292DSTOPTS = 23 IPV6_2292RTHDR = 24 IPV6_2292PKTOPTIONS = 25 IPV6_CHECKSUM = 26 IPV6_V6ONLY = 27 IPV6_BINDV6ONLY = IPV6_V6ONLY IPV6_IPSEC_POLICY = 28 IPV6_FAITH = 29 IPV6_FW_ADD = 30 IPV6_FW_DEL = 31 IPV6_FW_FLUSH = 32 IPV6_FW_ZERO = 33 IPV6_FW_GET = 34 IPV6_RTHDRDSTOPTS = 35 IPV6_RECVPKTINFO = 36 IPV6_RECVHOPLIMIT = 37 IPV6_RECVRTHDR = 38 IPV6_RECVHOPOPTS = 39 IPV6_RECVDSTOPTS = 40 IPV6_RECVRTHDRDSTOPTS = 41 IPV6_USE_MIN_MTU = 42 IPV6_RECVPATHMTU = 43 IPV6_PATHMTU = 44 IPV6_REACHCONF = 45 IPV6_PKTINFO = 46 IPV6_HOPLIMIT = 47 IPV6_NEXTHOP = 48 IPV6_HOPOPTS = 49 IPV6_DSTOPTS = 50 IPV6_RTHDR = 51 IPV6_PKTOPTIONS = 52 IPV6_RECVTCLASS = 57 IPV6_AUTOFLOWLABEL = 59 IPV6_TCLASS = 61 IPV6_DONTFRAG = 62 IPV6_PREFER_TEMPADDR = 63 IPV6_RTHDR_LOOSE = 0 IPV6_RTHDR_STRICT = 1 IPV6_RTHDR_TYPE_0 = 0 IPV6_DEFAULT_MULTICAST_HOPS = 1 IPV6_DEFAULT_MULTICAST_LOOP = 1 IPV6_PORTRANGE_DEFAULT = 0 IPV6_PORTRANGE_HIGH = 1 IPV6_PORTRANGE_LOW = 2 IPV6PROTO_MAXID = (IPPROTO_PIM + 1) IPV6CTL_FORWARDING = 1 IPV6CTL_SENDREDIRECTS = 2 IPV6CTL_DEFHLIM = 3 IPV6CTL_DEFMTU = 4 IPV6CTL_FORWSRCRT = 5 IPV6CTL_STATS = 6 IPV6CTL_MRTSTATS = 7 IPV6CTL_MRTPROTO = 8 IPV6CTL_MAXFRAGPACKETS = 9 IPV6CTL_SOURCECHECK = 10 IPV6CTL_SOURCECHECK_LOGINT = 11 IPV6CTL_ACCEPT_RTADV = 12 IPV6CTL_KEEPFAITH = 13 IPV6CTL_LOG_INTERVAL = 14 IPV6CTL_HDRNESTLIMIT = 15 IPV6CTL_DAD_COUNT = 16 IPV6CTL_AUTO_FLOWLABEL = 17 IPV6CTL_DEFMCASTHLIM = 18 IPV6CTL_GIF_HLIM = 19 IPV6CTL_KAME_VERSION = 20 IPV6CTL_USE_DEPRECATED = 21 IPV6CTL_RR_PRUNE = 22 IPV6CTL_MAPPED_ADDR = 23 IPV6CTL_V6ONLY = 24 IPV6CTL_RTEXPIRE = 25 IPV6CTL_RTMINEXPIRE = 26 IPV6CTL_RTMAXCACHE = 27 IPV6CTL_USETEMPADDR = 32 IPV6CTL_TEMPPLTIME = 33 IPV6CTL_TEMPVLTIME = 34 IPV6CTL_AUTO_LINKLOCAL = 35 IPV6CTL_RIP6STATS = 36 IPV6CTL_PREFER_TEMPADDR = 37 IPV6CTL_ADDRCTLPOLICY = 38 IPV6CTL_MAXFRAGS = 41 IPV6CTL_MAXID = 42
class Mode(object): """Represents one of several interface modes""" BUTTON_PRESS=1 DPAD_MOVE=2 def __init__(self, name, color="#FFFFFF"): """Make an instance. :param string name: Name for reference and reporting :param string color: HEX code (hash optional) to light up on key presses on this mode """ self.name=name self.color=color self.actions = {} def _addAction(self, switches, action): switchBits = 0x0 if type(switches) is int: switchBits = 0x1 << switches elif isinstance(switches, (list, tuple)): for s in switches: sBits = 0x1 << s switchBits |= sBits self.actions[switchBits]= action def buttonPress(self, switches, buttonNum): self._addAction(switches, (Mode.BUTTON_PRESS, buttonNum)) def dpadMove(self, switches, x, y): self._addAction(switches, (Mode.DPAD_MOVE, x, y))
class AuthenticationScheme: """Authentication Scheme options.""" GUEST = 'guest' PLAIN = 'plain' TRANSPORT = 'transport' KEY = 'key' EXTERNAL = 'external'
__title__ = 'splitwise' __description__ = 'Splitwise Python SDK' __version__ = '2.1.0' __url__ = 'https://github.com/namaggarwal/splitwise' __download_url__ = 'https://github.com/namaggarwal/splitwise/tarball/v'+__version__ __build__ = 0x022400 __author__ = 'Naman Aggarwal' __author_email__ = 'aggarwal.nam@gmail.com' __license__ = 'MIT' __copyright__ = 'Copyright 2020 Naman Aggarwal'
# chapter 11 pdb print('This still works') 1/0 print('we should not reach this code.') # python3 -m pdb cp11_pdb.py
class Solution: def minWindow(self, s: str, t: str) -> str: # 1. Use two pointers: start and end to represent a window. # 2. Move end to find a valid window. # 3. When a valid window is found, move start to find a smaller window. if t == "": return "" countT, window = {}, {} # count chars in t string for char in t: countT[char] = 1 + countT.get(char, 0) # keep track of chars in window have, need = 0, len(countT) res, length = [-1, -1], float("inf") left = 0 for right in range(len(s)): c = s[right] window[c] = 1 + window.get(c, 0) if c in countT and window[c] == countT[c]: have += 1 while have == need: # update our result curr_window = right - left + 1 if curr_window < length: res = [left, right] length = curr_window # pop from left of our window window[s[left]] -= 1 if s[left] in countT and window[s[left]] < countT[s[left]]: have -= 1 left += 1 left, right = res return s[left: right+1] if length != float("inf") else ""
_base_ = [ '../_base_/models/fcn_hr18.py', '../_base_/datasets/stanford.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py' ] norm_cfg = dict(type='BN', requires_grad=True) model = dict( backbone = dict( norm_cfg = norm_cfg ), decode_head=dict( norm_cfg = norm_cfg, num_classes=8 ) ) runner = dict(max_iters = 1000) evaluation = dict(interval = 100) checkpoint_config = dict(interval = 1000)
n, a, b = map(int, input().split()) if abs(a - b) % 2 == 0: print("Alice") else: print("Borys")
class Solution: def robotSim(self, commands: List[int], obstacles: List[List[int]]) -> int: p, s, m = [0, 0, 90], set(tuple(o) for o in obstacles), 0 for c in commands: if c == -1: p[2] = (p[2] - 90) % 360 elif c == -2: p[2] = (p[2] + 90) % 360 else: j, k = 1 if p[2] % 180 else 0, 1 if not p[2] or p[2] == 90 else -1 for i in range(1, c+1): p[j] += k if (p[0], p[1]) in s: p[j] -= k break m = max(m, p[0]**2 + p[1]**2) return m
{ "targets": [ { "target_name": "waveshare5in83bv2", "cflags!": [ "-fno-exceptions", "-Wextra" ], "cflags_cc!": [ "-fno-exceptions" ], "sources": [ "./src/c/EPD_5in83b_V2_node.cc", "./src/c/DEV_Config.c", "./src/c/EPD_5in83b_V2.c", "./src/c/dev_hardware_SPI.c", "./src/c/RPI_sysfs_gpio.c" ], "defines": [ "RPI", "USE_DEV_LIB", "NAPI_DISABLE_CPP_EXCEPTIONS" ], "include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")" ], "libraries": [ "-lm" ] } ] }
# Open new tabs (middleclick/ctrl+click) in the background. # Type: Bool c.tabs.background = True # Mouse button with which to close tabs. # Type: String # Valid values: # - right: Close tabs on right-click. # - middle: Close tabs on middle-click. # - none: Don't close tabs using the mouse. c.tabs.close_mouse_button = "right" # How to behave when the close mouse button is pressed on the tab bar. # Type: String # Valid values: # - new-tab: Open a new tab. # - close-current: Close the current tab. # - close-last: Close the last tab. # - ignore: Don't do anything. c.tabs.close_mouse_button_on_bar = "new-tab" # Scaling factor for favicons in the tab bar. The tab size is unchanged, # so big favicons also require extra `tabs.padding`. # Type: Float c.tabs.favicons.scale = 1.0 # When to show favicons in the tab bar. # Type: String # Valid values: # - always: Always show favicons. # - never: Always hide favicons. # - pinned: Show favicons only on pinned tabs. c.tabs.favicons.show = "pinned" # How to behave when the last tab is closed. # Type: String # Valid values: # - ignore: Don't do anything. # - blank: Load a blank page. # - startpage: Load the start page. # - default-page: Load the default page. # - close: Close the window. c.tabs.last_close = "ignore" # Switch between tabs using the mouse wheel. # Type: Bool c.tabs.mousewheel_switching = False # Position of new tabs opened from another tab. See # `tabs.new_position.stacking` for controlling stacking behavior. # Type: NewTabPosition # Valid values: # - prev: Before the current tab. # - next: After the current tab. # - first: At the beginning. # - last: At the end. c.tabs.new_position.related = "next" # Position of new tabs which are not opened from another tab. See # `tabs.new_position.stacking` for controlling stacking behavior. # Type: NewTabPosition # Valid values: # - prev: Before the current tab. # - next: After the current tab. # - first: At the beginning. # - last: At the end. c.tabs.new_position.unrelated = "last" # Stack related tabs on top of each other when opened consecutively. # Only applies for `next` and `prev` values of # `tabs.new_position.related` and `tabs.new_position.unrelated`. # Type: Bool c.tabs.new_position.stacking = True # Padding (in pixels) around text for tabs. # Type: Padding c.tabs.padding = {"bottom": 2, "left": 5, "right": 5, "top": 3} # When switching tabs, what input mode is applied. # Type: String # Valid values: # - persist: Retain the current mode. # - restore: Restore previously saved mode. # - normal: Always revert to normal mode. c.tabs.mode_on_change = "normal" # Position of the tab bar. # Type: Position # Valid values: # - top # - bottom # - left # - right c.tabs.position = "bottom" # Which tab to select when the focused tab is removed. # Type: SelectOnRemove # Valid values: # - prev: Select the tab which came before the closed one (left in horizontal, above in vertical). # - next: Select the tab which came after the closed one (right in horizontal, below in vertical). # - last-used: Select the previously selected tab. c.tabs.select_on_remove = "next" # When to show the tab bar. # Type: String # Valid values: # - always: Always show the tab bar. # - never: Always hide the tab bar. # - multiple: Hide the tab bar if only one tab is open. # - switching: Show the tab bar when switching tabs. c.tabs.show = "multiple" # Duration (in milliseconds) to show the tab bar before hiding it when # tabs.show is set to 'switching'. # Type: Int c.tabs.show_switching_delay = 800 # Open a new window for every tab. # Type: Bool c.tabs.tabs_are_windows = False # Alignment of the text inside of tabs. # Type: TextAlignment # Valid values: # - left # - right # - center c.tabs.title.alignment = "center" # Format to use for the tab title. The following placeholders are # defined: * `{perc}`: Percentage as a string like `[10%]`. * # `{perc_raw}`: Raw percentage, e.g. `10`. * `{current_title}`: Title of # the current web page. * `{title_sep}`: The string ` - ` if a title is # set, empty otherwise. * `{index}`: Index of this tab. * `{id}`: # Internal tab ID of this tab. * `{scroll_pos}`: Page scroll position. * # `{host}`: Host of the current web page. * `{backend}`: Either # ''webkit'' or ''webengine'' * `{private}`: Indicates when private mode # is enabled. * `{current_url}`: URL of the current web page. * # `{protocol}`: Protocol (http/https/...) of the current web page. * # `{audio}`: Indicator for audio/mute status. # Type: FormatString c.tabs.title.format = "{audio}{index}: {perc}{current_title}" # Format to use for the tab title for pinned tabs. The same placeholders # like for `tabs.title.format` are defined. # Type: FormatString c.tabs.title.format_pinned = "{index}" # Width (in pixels or as percentage of the window) of the tab bar if # it's vertical. # Type: PercOrInt c.tabs.width = "20%" # Minimum width (in pixels) of tabs (-1 for the default minimum size # behavior). This setting only applies when tabs are horizontal. This # setting does not apply to pinned tabs, unless `tabs.pinned.shrink` is # False. # Type: Int c.tabs.min_width = -1 # Maximum width (in pixels) of tabs (-1 for no maximum). This setting # only applies when tabs are horizontal. This setting does not apply to # pinned tabs, unless `tabs.pinned.shrink` is False. This setting may # not apply properly if max_width is smaller than the minimum size of # tab contents, or smaller than tabs.min_width. # Type: Int c.tabs.max_width = -1 # Width (in pixels) of the progress indicator (0 to disable). # Type: Int c.tabs.indicator.width = 3 # Padding (in pixels) for tab indicators. # Type: Padding c.tabs.indicator.padding = {"bottom": 2, "left": 0, "right": 4, "top": 2} # Shrink pinned tabs down to their contents. # Type: Bool c.tabs.pinned.shrink = True # Force pinned tabs to stay at fixed URL. # Type: Bool c.tabs.pinned.frozen = True # Number of close tab actions to remember, per window (-1 for no # maximum). # Type: Int c.tabs.undo_stack_size = 100 # Wrap when changing tabs. # Type: Bool c.tabs.wrap = True
#criando uma lista de valores cores = ['vermelho', 'verde', 'azul', 'amarelo', 'laranja', 'roxo', 'marrom'] #print(cores) #print (type(cores)) #add uma cadeia de caracteres, float, inteiro e valor booliano a uma lista. #sortido = ['Laura', 3.14, 7, False] #print(sortido) #print (type(sortido)) #lista vazia #minha_lista = [] #Usando um índice para acessar elementos individuais #print (f'Indexação baseada em 0 na lista ... segundo item: {cores[1]}') #print(f'Último item da lista: {cores[-1]}') #print(f'Próximo ao último item da lista: {cores[-2]}') #criando fatias #print ('\nImprima uma fatia começando no índice 2 e excluindo o índice 5: ') #print(cores[2:5]) #print (type(cores[2:5])) #print ('\nImprima uma fatia começando no índice 0 ao índice 3: ') #print(cores[:3]) #print ('\nImprima uma fatia começando no índice 4 para o índice final da lista: ') #print(cores[4:]) #print ('\nImprima uma fatia começando do 4º ao final (mas não o último item): ') #print(cores[-4:-1]) #Reverter e classificar a lista #cores.reverse() #print(cores) #cores.sort() #print(cores) #Tratar a lista como uma fila #print(cores) #cor = cores.pop(0) #print('popped', cor) #print(cores) #Adicionar e remover elementos de uma lista #print(cores) #cores.append ('preto') #cores.append ('branco') #cores.remove ('amarelo') #cores.remove ('laranja') #print(cores) #Combinar uma nova lista com uma lista existente #novas_cores = ['pink', 'cinza'] #cores.extend(novas_cores) #print(cores) #Limpar todos os itens de uma lista print(cores) cores.clear() print(cores)
# Question Validation def hNvalidation(sentence): flag = 1 Length = len(sentence) if (Length > 4): for i in range(Length): if (i+4 < Length): if (sentence[i]==' ' and sentence[i+1]=='h' and sentence[i+2]==' ' and sentence[i+3]=='N' and sentence[i+4]==' '): flag = 0 return flag
class Solution(object): def _numTrees(self, n): """ :type n: int :rtype: int """ dp = [0] * (n + 1) dp[0] = dp[1] = 1 for i in range(2, n + 1): for j in range(1, i + 1): dp[i] += dp[j - 1] * dp[i - j] return dp[-1] def numTrees(self, n): ans = 1 for i in range(1, n + 1): ans = ans * (n + i) / i return ans / (n + 1)
__all__ = [ 'admin', 'backends', 'fixtures' 'migrations', 'models', 'schema', 'signals' 'tests', 'views', 'apps' ] default_app_config = 'app.apps.CruxAppConfig'
class Nodo: ''' class nodo '''
#!/usr/bin/env python3 def break_while(): """ A function illustrating the use of break in a while loop. Type 'quit' to quit. :return: None """ while True: i = input('Type something: ') if i == 'quit': break print('You typed:', i) def continue_while(numbers): """ A function illustrating the use of continue in a for loop. This one prints out the even numbers in an iterable. There are better ways of doing this, but we're using continue to illustrate its use. :return: Nothing """ for n in numbers: if n % 2: continue print(n) def else_while(n, numbers): """ A function illustrating the use of else with a loop. This function will determine if n is in the iterable numbers. :param n: The thing to search for. :param numbers: An iterable to search over. :return: True if the thing is in the iterable, false otherwise. """ # Loop over the numbers for e in numbers: # If we've found it, break out of the loop. if e == n: break else: # The else clause runs if we exited the loop normally (ie, didn't break) return False # Otherwise, if we execute break, then we get to here. return True if __name__ == '__main__': break_while() continue_while(range(10)) print(else_while(3, [1, 4, 2, 5, 2]))
""" Entradas: Lecturactual-->float-->act Lecturaanterior-->float-->ant Salidas: valorfactura-->float-->total """ act=float(input("Lectura actual: ")) ant=float(input("Lectura anterior: ")) consumo=(act-ant) if(consumo>=0 and consumo<=100): total=(consumo*4600) print("Monto a pagar: "+str(total)) elif(consumo>=101 and consumo<=300): total=(consumo*80000) print("Monto a pagar: "+str(total)) elif(consumo>=301 and consumo<=500): total=(consumo*100000) print("Monto a pagar: "+str(total)) elif(consumo>=501): total=(consumo*120000) print("Monto a pagar: "+str(total))
# Copyright (c) 2016 Cisco and/or its affiliates. # 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. """Test variables for ip6-ipsec-lispgpe-ip4 encapsulation test suite.""" # Lisp default global value locator_name = 'tst_locator' # Lisp default locator_set value duts_locator_set = {'locator_name': locator_name, 'priority': 1, 'weight': 1} # IPv6 Lisp static mapping configuration dut1_to_dut2_ip4 = '6.6.3.1' dut2_to_dut1_ip4 = '6.6.3.2' dut1_to_tg_ip6 = '2001:cdba:1::1' dut2_to_tg_ip6 = '2001:cdba:2::1' tg1_ip6 = '2001:cdba:1::2' tg2_ip6 = '2001:cdba:2::2' prefix4 = 24 prefix6 = 64 vhost_ip = '2001:cdba:6::3' lisp_gpe_int = 'lisp_gpe0' dut1_to_dut2_ip_static_adjacency = {'vni': 0, 'deid': '2001:cdba:2::0', 'seid': '2001:cdba:1::0', 'rloc': dut2_to_dut1_ip4, 'prefix': 64} dut2_to_dut1_ip_static_adjacency = {'vni': 0, 'deid': '2001:cdba:1::0', 'seid': '2001:cdba:2::0', 'rloc': dut1_to_dut2_ip4, 'prefix': 64} dut1_ip6_eid = {'locator_name': locator_name, 'vni': 0, 'eid': '2001:cdba:1::0', 'prefix': 64} dut2_ip6_eid = {'locator_name': locator_name, 'vni': 0, 'eid': '2001:cdba:2::0', 'prefix': 64} fib_table_1 = 1 dut1_dut2_vni = 1 dut2_spi = 1000 dut1_spi = 1001 ESP_PROTO = 50 sock1 = '/tmp/sock1' sock2 = '/tmp/sock2' bid = 10
""" QXPathEditor is an QtPy XPath editor. It can be used as a standalone application or as library in your PyQt/PySide application. """ __version__ = '0.1.0'
small_bottles = float(input("Inserisci il numero di bottiglie piccole")) big_bottles = float(input("Inserisci il numero di bottiglie grandi")) valore_totale=(small_bottles*0.1)+(big_bottles*0.25) print("hai guadagnato:",float(valore_totale))
""" https://leetcode.com/problems/partition-equal-subset-sum/ Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. Note: Each of the array element will not exceed 100. The array size will not exceed 200. Example 1: Input: [1, 5, 11, 5] Output: true Explanation: The array can be partitioned as [1, 5, 5] and [11]. Example 2: Input: [1, 2, 3, 5] Output: false Explanation: The array cannot be partitioned into equal sum subsets. """ class Solution(object): def canPartition(self, nums): """ The idea is that after processing each number, whether or not a value in the range of the target sum is reachable is a function of whether or not the value was previously reachable :type nums: List[int] :rtype: bool """ if len(nums) <= 1 or sum(nums) % 2 != 0: return False target_sum = int(sum(nums) / 2) dp = [True] + [False] * target_sum for num in nums: dp = [ dp[previous_sum] or (previous_sum >= num and dp[previous_sum - num]) for previous_sum in range(target_sum + 1) ] if dp[target_sum]: return True return False
n = int(input()) elements = set() for _ in range(n): data = input() if " " in data: data = data.split(" ") for el in data: elements.add(el) else: elements.add(data) for el in elements: print(el)
# OpenWeatherMap API Key weather_api_key = "TYPE YOUR KEY HERE!" # Google API Key g_key = "TYPE YOUR KEY HERE!"
# LIST pontos = [1, 4, 7, 3, 10, 55] pontos.remove(7) print(pontos) # [1, 4, 3, 10, 55] # TUPLE # países = ('Brasil', 'EUA', 'Alemanha', 'Canadá', 'Itália') # países.remove('EUA') # # AttributeError: 'tuple' object has no attribute 'remove'
r""" Yamanouchi Words A right (respectively left) Yamanouchi word on a completely ordered alphabet, for instance [1,2,...,n], is a word math such that any right (respectively left) factor of math contains more entries math than math. For example, the word [2, 3, 2, 2, 1, 3, 1, 2, 1, 1] is a right Yamanouchi one. The evaluation of a word math encodes the number of occurrences of each letter of math. In the case of Yamanouchi words, the evaluation is a partition. For example, the word [2, 3, 2, 2, 1, 3, 1, 2, 1, 1] has evaluation [4, 4, 2]. Yamanouchi words can be useful in the computation of Littlewood-Richardson coefficients `c_{\lambda, \mu}^\nu`. According to the Littlewood-Richardson rule, `c_{\lambda, \mu}^\nu` is the number of skew tableaux of shape `\nu / \lambda` and evaluation `\mu`, whose row readings are Yamanouchi words. """