content
stringlengths
7
1.05M
# Find the set of maximums and minimums in a series, # with some tolerance for multiple max or minimums # if some highest or lowest values in a series are # tolerance_threshold away def find_maxs_or_mins_in_series(series, kind, tolerance_threshold): isolated_globals = [] if kind == "max": global_max_or_min = series.max() else: global_max_or_min = series.min() for idx, val in series.items(): if val == global_max_or_min or abs(global_max_or_min - val ) < tolerance_threshold: isolated_globals.append(idx) return isolated_globals # Find the average distance between High and Low price in a set of candles def avg_candle_range(candles): return max((candles.df.High - candles.df.Low).mean(), 0.01) # Find mean in a list of int or floats def mean(ls): total = 0 for n in ls: total+=n return total/len(ls)
load("//cipd/internal:cipd_client.bzl", "cipd_client_deps") def cipd_deps(): cipd_client_deps()
class Holding: """A single holding in a fund. Subclasses of Holding include Equity, Bond, and Cash.""" def __init__(self, name): self.name = name """The name of the security.""" self.identifier_cusip = None """The CUSIP identifier for the security, if available and applicable.""" self.identifier_isin = None """The ISIN identifier for the security, if available and applicable.""" self.identifier_figi = None """The FIGI identifier for the security, if available and applicable.""" self.identifier_sedol = None """The SEDOL identifier for the security, if available and applicable.""" self.percent_weighting = None """The percentage of the fund's resources that are contributed to this holding.""" self.market_value = None """The total market value of this holding. In almost all cases this will be in US Dollars unless otherwise indicated by the Cash object's currency field."""
''' Detect Cantor set membership Status: Accepted ''' ############################################################################### def main(): """Read input and print output""" while True: value = input() if value == 'END': break value = float(value) lhs, rhs, ternary = 0.0, 1.0, '' for _ in range(12): third = (rhs - lhs) / 3 if value <= lhs + third: ternary += '0' rhs = lhs + third elif value >= rhs - third: ternary += '2' lhs = rhs - third else: ternary += '1' break if ternary[-1] == '1': print('NON-MEMBER') else: print('MEMBER') ############################################################################### if __name__ == '__main__': main()
class State: def __init__(self): self.pixel = None self.keyboard = None self.keyboard_layout = None pass def start(self): pass def end(self): pass def onTick(self): pass def onButtonPress(self): pass def onButtonRelease(self): pass
def convert( s: str, numRows: int) -> str: print('hi') # Algorithm: # Output: Linearize the zig zagged string matrix # input: string and number of rows in which to make the string zag zag # Algorithm steps: # d and nd list /diagonal and nondiagonal lists #remove all prints if pasting in leetcode if numRows == 1: return s step = 1 pos = 1 lines = {} for c in s: if pos not in lines: print(pos, 'im pos', 'and im step',step) lines[pos] = c print(lines, 'when pos not in lines') else: print(pos, 'im pos', 'and im step',step) lines[pos] += c print(lines, 'when pos in lines'), pos += step if pos == 1 or pos == numRows: step *= -1 sol = "" for i in range(1, numRows + 1): try: sol += lines[i] print('im sol', sol) except: return sol return sol s1 = "PAYPALISHIRING" #14 numRows1 = 3 # Output: "PAHNAPLSIIGYIR" #7 columns s2 = "PAYPALISHIRING" #14 numRows2 = 4 print(convert(s2,numRows2)) # Output: "PINALSIGYAHRPI" #7 columns
class Node: """create a Node""" def __init__(self, val): self.val = val self.left = None self.right = None def __repr__(self): return 'Node Val: {}'.format(self.val) def __str__(self): return str(self.val)
#Receber altura e largura de uma parede, mostrar sua área e dizer quantos litros de tinta serão necessários para pintar altura = float(input("Digite a altura: ")); largura = float(input("Digite a largura: ")); area = (altura * largura); tinta= (area/2); print(f"A área de {altura} x {largura} calculada foi igual a {area} metros quadrados."); print(f"Serão necessários {tinta:.2f} latas de tinta para pintar essa superfície.");
class Solution: def reconstructQueue(self, people: list) -> list: if not people: return [] def func(x): return -x[0], x[1] people.sort(key=func) new_people = [people[0]] for i in people[1:]: new_people.insert(i[1], i) return new_people
# -*- coding: utf-8 -*- """ equip.visitors.classes ~~~~~~~~~~~~~~~~~~~~~~ Callback the visit method for each encountered class in the program. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ class ClassVisitor(object): """ A class visitor that is triggered for all encountered ``TypeDeclaration``. Example, listing all types declared in the bytecode:: class TypeDeclVisitor(ClassVisitor): def __init__(self): ClassVisitor.__init__(self) def visit(self, typeDecl): print "New type: %s (parentDecl=%s)" \\ % (typeDecl.type_name, typeDecl.parent) """ def __init__(self): pass def visit(self, typeDecl): pass
class Post(): def __init__(self, userIden, content, timestamp, image=None, score='0', replies=None): self.userIden = userIden self.content = content self.timestamp = timestamp self.image = image self.score = score self.replies = [] if not replies else replies
d = dict() d["nome"] = input('Nome: ') d["media"] = float(input('Média: ')) print(f'O nome é {d["nome"]} \nA média é {d["media"]}') if d["media"] < 4: print('A situação atual é REPROVADO!') elif d["media"] < 7: print('A situação atuai é RECUPERAÇÃO!') else: print('A situação atual é APROVADO!')
def radix_sort(alist, base=10): if alist == []: return def key_factory(digit, base): def key(alist, index): return ((alist[index]//(base**digit)) % base) return key largest = max(alist) exp = 0 while base**exp <= largest: alist = counting_sort(alist, base - 1, key_factory(exp, base)) exp = exp + 1 return alist def counting_sort(arr, exp1): n = len(arr) # The output array elements that will have sorted arr output = [0] * (n) # initialize count array as 0 count = [0] * (10) # Store count of occurrences in count[] for i in range(0, n): index = (arr[i]/exp1) count[ (index)%10 ] += 1 # Change count[i] so that count[i] now contains actual # position of this digit in output array for i in range(1,10): count[i] += count[i-1] # Build the output array i = n-1 while i>=0: index = (arr[i]/exp1) output[ count[ (index)%10 ] - 1] = arr[i] count[ (index)%10 ] -= 1 i -= 1 # Copying the output array to arr[], # so that arr now contains sorted numbers i = 0 for i in range(0,len(arr)): arr[i] = output[i] # def counting_sort(alist, largest, key): # c = [0]*(largest + 1) # for i in range(len(alist)): # c[key(alist, i)] = c[key(alist, i)] + 1 # # Find the last index for each element # c[0] = c[0] - 1 # to decrement each element for zero-based indexing # for i in range(1, largest + 1): # c[i] = c[i] + c[i - 1] # result = [None]*len(alist) # for i in range(len(alist) - 1, -1, -1): # result[c[key(alist, i)]] = alist[i] # c[key(alist, i)] = c[key(alist, i)] - 1 # return result
N, *A = map(int, open(0).read().split()) result = 0 for i in range(2, 1000): t = 0 for a in A: if a % i == 0: t += 1 result = max(result, t) print(result)
#{ #Driver Code Starts #Initial Template for Python 3 # } Driver Code Ends #User function Template for python3 # Function to calculate average def calc_average(nums): # Your code here mini = min(nums) maxi = max(nums) n = len(nums) s = sum(nums)-mini-maxi s = s//(n-2) return s #{ #Driver Code Starts. # Driver Code def main(): # Testcase input testcases = int(input()) # Looping through testcases while(testcases > 0): size_arr = int(input()) a = input().split() arr = list() for i in range(0, size_arr, 1): arr.append(int(a[i])) print (calc_average(arr)) testcases -= 1 if __name__ == '__main__': main() #} Driver Code Ends
# Remove all elements from a linked list of integers that have value val. # Example: # Input: 1->2->6->3->4->5->6, val = 6 # Output: 1->2->3->4->5 # Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def removeElements(self, head, val): """ :type head: ListNode :type val: int :rtype: ListNode """ # M1. 特殊处理头部待删除节点 if not head: return None p = head while p and p.val == val: p = p.next head = p pre = None while p: if p.val == val: pre.next = p.next else: pre = p p = p.next return head # M2. 使用dummy node处理头部待删除节点 sentinel = ListNode(0) sentinel.next = head prev, curr = sentinel, head while curr: if curr.val == val: prev.next = curr.next else: prev = curr curr = curr.next return sentinel.next
# in file: models/db_custom.py db.define_table('company', Field('name', notnull = True, unique = True), format = '%(name)s') db.define_table( 'contact', Field('name', notnull = True), Field('company', 'reference company'), Field('picture', 'upload'), Field('email', requires = IS_EMAIL()), Field('phone_number', requires = IS_MATCH('[\d\-\(\) ]+')), Field('address'), format = '%(name)s' ) db.define_table( 'logs', Field('body', 'text', notnull = True), Field('posted_on', 'datetime'), Field('contact', 'reference contact') )
meuCartao = int(input("Digite o número do cartão de crédito: ")) cartaolido = 1 encontreiMeuCartaoNaLista = False while cartaolido != 0 and not encontreiMeuCartaoNaLista: cartaolido = int(input("Digite o número do próximo cartão de crédito: ")) if cartaolido == meuCartao: encontreiMeuCartaoNaLista = True if encontreiMeuCartaoNaLista: print("Encontrei!!!") else: print("Não encontrei :(")
def main(): i = 0 while True: print(i) i += 1 if i > 5: break j = 10 while j < 100: print(j) j += 10 while 1: print(j + i) break while 0.1: print(j + i) break while 0: print("This never executes") while 0.0: print("This never executes") while None: print("This never executes") while False: print("This never executes") while "": print("This never executes") while "hi": print("This executes") break if __name__ == '__main__': main()
example = """ ..##....... #...#...#.. .#....#..#. ..#.#...#.# .#...##..#. ..#.##..... .#.#.#....# .#........# #.##...#... #...##....# .#..#...#.#""" example_list = [list(x) for x in example.split()] with open('test.in', mode='r') as f: puzzle_input = [list(x.strip()) for x in f.readlines()] def tree_hitting_function(right, down, tree_input): # Get the height and width based on the list lengths height = len(tree_input) width = len(tree_input[0]) # Set initial values trees = 0 step = 0 # Walk down the "hill" using range. for y in range(down, height, down): # We need to track steps down so we know how far to the right. step += 1 # Modulo trick to cycle through the width values and loop back around to the front x_axis = (step * right) % width # Check if a tree and increment if tree_input[y][x_axis] == "#": trees += 1 return trees def slope_multiplier(slopes, tree_input): total = 1 # Loop through the slopes and calc the trees hit. Multiply them together. for slope in slopes: right = slope[0] down = slope[1] total *= tree_hitting_function(right, down, tree_input) return total if __name__ == '__main__': print(tree_hitting_function(3, 1, puzzle_input)) slope_list = [ (1, 1), (3, 1), (5, 1), (7, 1), (1, 2) ] print(slope_multiplier(slope_list, puzzle_input))
''' Synchronization phenomena in networked dynamics ''' def kuramoto(G, k: float, w: Callable): ''' Kuramoto lattice k: coupling gain w: intrinsic frequency ''' phase = gds.node_gds(G) w_vec = np.array([w(x) for x in phase.X]) phase.set_evolution(dydt=lambda t, y: w_vec + k * phase.div(np.sin(phase.grad()))) amplitude = phase.project(GraphDomain.nodes, lambda t, y: np.sin(y)) return phase, amplitude
''' Determine sum of integer digits between two inclusive limits Status: Accepted ''' ############################################################################### def digit_sum(value): """Return the sum of all digits between 0 and input value""" result = 0 if value > 0: magnitude = value // 10 magnitude_sum = sum([int(i) for i in list(str(magnitude))]) result = digit_sum(magnitude - 1) * 10 result += 45 * magnitude for last_digit in range(1 + value % 10): result += magnitude_sum + last_digit return result ############################################################################### def main(): """Read input and print output for sum of digits between 2 numbers""" for _ in range(int(input().strip())): lo_value, hi_value = [int(i) for i in input().split()] if hi_value: if lo_value: print(str(digit_sum(hi_value) - digit_sum(lo_value - 1))) else: print(str(digit_sum(hi_value))) else: print('0') ############################################################################### if __name__ == '__main__': main()
def Markov1_3D_BC_taper_init(particle, fieldset, time): # Initialize random velocity magnitudes in the isopycnal plane u_iso_prime_abs = ParcelsRandom.normalvariate(0, math.sqrt(fieldset.nusquared)) v_iso_prime_abs = ParcelsRandom.normalvariate(0, math.sqrt(fieldset.nusquared)) # (double) derivatives in density field are assumed available # Computation of taper function Sx = - drhodx / drhodz Sy = - drhody / drhodz Sabs = math.sqrt(Sx**2 + Sy**2) # Tapering based on Danabasoglu and McWilliams, J. Clim. 1995 # Tapering is discrete outside of a given range, to prevent # it from having its own decay timescale if Sabs < fieldset.Sc - 3. * fieldset.Sd: taper1 = 1. elif Sabs > fieldset.Sc + 3. * fieldset.Sd: taper1 = 0. else: taper1 = 0.5 * (1 + math.tanh((fieldset.Sc - Sabs)/fieldset.Sd)) # Near boundaries, drop to 0 if fieldset.boundaryMask[particle] < 0.95: taper2 = 0. else: taper2 = 1. # Compute the gradient vector, which is perpendicular to the local isoneutral grad = [drhodx, drhody, drhodz] # Compute u in the isopycnal plane (arbitrary direction) # by ensuring dot(u_iso, grad) = 0 u_iso = [-(drhody+drhodz)/drhodx, 1, 1] u_iso_norm = math.sqrt(u_iso[0]**2 + u_iso[1]**2 + u_iso[2]**2) u_iso_normed = [u_iso[0]/u_iso_norm, u_iso[1]/u_iso_norm, u_iso[2]/u_iso_norm] # Fix v_iso by computing cross(u_iso, grad) v_iso = [grad[1]*u_iso[2] - grad[2]*u_iso[1], grad[2]*u_iso[0] - grad[0]*u_iso[2], grad[0]*u_iso[1] - grad[1]*u_iso[0]] v_iso_norm = math.sqrt(v_iso[0]**2 + v_iso[1]**2 + v_iso[2]**2) v_iso_normed = [v_iso[0]/v_iso_norm, v_iso[1]/v_iso_norm, v_iso[2]/v_iso_norm] # Compute the initial isopycnal velocity vector, which is a linear combination # of u_iso and v_iso vel_init = [u_iso_prime_abs * u_iso_normed[0] + v_iso_prime_abs * v_iso_normed[0], u_iso_prime_abs * u_iso_normed[1] + v_iso_prime_abs * v_iso_normed[1], u_iso_prime_abs * u_iso_normed[2] + v_iso_prime_abs * v_iso_normed[2]] particle.u_prime = taper1 * taper2 * vel_init[0] particle.v_prime = taper1 * taper2 * vel_init[1] particle.w_prime = taper1 * taper2 * vel_init[2]
def factorial(number): if(number == 0): return 1 return number * factorial(number - 1) def run(): number = int(input('\nIngresa un número para saber su factorial: ')) result = factorial(number) print('\nEl factorial de {} es: {} \n'.format(number, result)) if __name__ == '__main__': run()
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def verticalTraversalRec(self, root, row, col, columns): if not root: return columns[col].append((row, root.val)) self.verticalTraversalRec(root.left, row+1, col-1, columns) self.verticalTraversalRec(root.right, row+1, col+1, columns) def verticalTraversal(self, root: TreeNode) -> List[List[int]]: columns = collections.defaultdict(list) if not root: return [] self.verticalTraversalRec(root, 0, 0, columns) # sort by column first, and then sort each column verticalOrder = [] for col in sorted(columns): nodes = sorted(columns[col]) verticalOrder.append([node[1] for node in nodes]) return verticalOrder # O(nlgn) solution # def verticalTraversal(self, root: TreeNode) -> List[List[int]]: # # list of nodes - (col, row, value) # nodes = [] # if not root: # return [] # def BFS(root): # queue = collections.deque([(root, 0, 0)]) # while queue: # node, row, col = queue.popleft() # if node: # nodes.append((col, row, node.val)) # queue.append((node.left, row+1, col-1)) # queue.append((node.right, row+1, col+1)) # BFS(root) # nodes.sort() # columns = collections.OrderedDict() # for col, row, val in nodes: # if col in columns: # columns[col].append(val) # else: # columns[col] = [val] # return list(columns.values())
''' Author: Shuailin Chen Created Date: 2021-09-14 Last Modified: 2021-09-25 content: ''' _base_ = [ '../_base_/models/deeplabv3_r50a-d8.py', '../_base_/datasets/sn6_sar_pro.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_20k.py' ] model = dict( decode_head=dict(num_classes=2), auxiliary_head=dict(num_classes=2))
""" Module provides state and state history for agent. """ class AgentState(object): """ AgentState class. Agent state is a class that specifies current agent behaviour. It provides methods that describe the way agent cooperate with percepted stimulus coming from environment. @attention: You can redefine or change this class to provide new functionality to an agent. It is recommended to change AgentState or build inherited class instead of changing Agent class. @sort: __init__, clone, clone_state, get_state """ def __init__(self): """ Initialize an AgentState. @attention: You should specify type of AgentState. You can add new type of agent state by implementing new class and redefining this function. """ self.state = None def clone(self): """ Return a copy of whole current AgentState. @rtype: AgentState @return: Return new instance of AgentState. """ #return self.deepcopy() pass def clone_state(self): """ Return a copy of current agent low-level state. @attention: This function does not clone whole instance of AgentState. @rtype: state @return: Return new instance (copy) of low-level state. """ return self.state.clone() def get_state(self): """ Retrun object that represent concrete state. @rtype: state @return: Return object that keeps current information about agent state e.g. high-level classifier. """ return self.state def clean(self, environment, sensor): """ Alows agent state to clean up before dumping into file """ pass class StateHistory(object): """ StateHistory class. StateHistory class provides a set of states from agent history. @attention: This class does not keep whole AgentState objects, but low-level states. @sort: __init__, __len__, add_state, get_state """ def __init__(self, freq = None): """ Initialize a StateHistory for an agent. @type freq: number @param freq: Frequency of saving changed states to the history. @attention: You should specify frequency of saving states to history. In other case all states will be saved. """ if (freq is None): self.freq = 1 else: self.freq = freq self.counter = self.freq #counter used to skip states self.states = [] #list of states def __len__(self): """ Return the number of states in the history when requested by len(). @rtype: number @return: Size of the hypergraph. """ return len(self.states) def add_state(self, state): """ Add state to state history. @type state: state @param state: Current low-level state of agent. """ if (self.counter == self.freq): self.states.append(state.clone_state()) self.counter = 1 else: #skips state and increases counter self.counter += 1 def get_state(self, number): """ Return chosen state from history. @type number: number @param number: Chronological position of state in history. @rtype: state @return: Chosen state from agent history. """ return self.states[number]
#!/usr/bin/env python3 # -- coding: utf-8 -- if __name__ == '__main__': s1 = input("Введите первое слово: ") s2 = input("Введите второе слово: ") z = 0 for i in range(0, len(s1)): if s1[i] == s2[i]: z += 1 if z: print(f"{z} начальные буквы первого слова, совпадают со вторым") else: print("Совпадений нет")
# encoding=utf-8 d = dict(one=1, two=2) d1 = {'one': 1, "two": 2} d2 = dict() d2['one'] = 1 d2['two'] = 2 # [(key,value), (key, value)] my_dict = {}.setdefault().append(1) print(my_dict[1])
# Matrix Ops some helper functions for matrix operations # # Legal: # ============== # Copyright 2021 lukasjoc<[email protected]> # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to the following # conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # def get_rows(arr): """ return the rows for a given matrix """ return [arr[row] for row in range(len(arr))] def get_cols(arr): """ returns the cols for a given matrix """ cols = [] for row in range(len(arr)): for col in range(len(arr[0])): cols.append(arr[col][row]) return cols def get_diagonals(arr): """returns the diagonals for a given matrix """ d1, d2 = [], [] for row in range(len(arr)): forwardDiag = arr[row][row] d1.append(forwardDiag) backwardDiag = arr[row][len(arr[row]) - 1 - row] d2.append(backwardDiag) return d1, d2
"""Problem 001 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """ ans = sum(n for n in range(1000) if n % 3 == 0 or n % 5 == 0) print(ans)
@app.route('/home') def home(): return redirect(url_for('about', name='World')) @app.route('/about/<name>') def about(name): return f'Hello {name}'
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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. # # Const Class # this is a auto generated file generated by Cheetah # Libre Office Version: 7.3 # Namespace: com.sun.star.rendering class PanoseStrokeVariation(object): """ Const Class See Also: `API PanoseStrokeVariation <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1rendering_1_1PanoseStrokeVariation.html>`_ """ __ooo_ns__: str = 'com.sun.star.rendering' __ooo_full_ns__: str = 'com.sun.star.rendering.PanoseStrokeVariation' __ooo_type_name__: str = 'const' ANYTHING = 0 NO_FIT = 1 GRADUAL_DIAGONAL = 2 GRADUAL_TRANSITIONAL = 3 GRADUAL_VERTICAL = 4 GRADUAL_HORIZONTAL = 5 RAPID_VERTICAL = 6 RAPID_HORIZONTAL = 7 INSTANT_VERTICAL = 8 __all__ = ['PanoseStrokeVariation']
def Naturals(n): yield n yield from Naturals(n+1) s = Naturals(1) print("Natural #s", next(s), next(s), next(s), next(s)) def sieve(s): n = next(s) yield n yield from sieve(i for i in s if i%n != 0) p = sieve(Naturals(2)) print("Prime #s", next(p), next(p), next(p), \ next(p), next(p), next(p), next(p), next(p)) def gensend(): item = yield yield item g = gensend() next(g) print ( g.send("hello"))
""" Storage for script settings and parameter grids Authors: Vincent Yu Date: 12/03/2020 """ # GENERAL SETTINGS # Set to true to re-read the latest version of the dataset csv files update_dset = False # Set the rescale factor to inflate the dataset rescale = 1000 # FINE TUNING RELATED # Set the random grid search status random = True random_size_LSTM = 50 random_size_ARIMAX = 1 # MODEL RELATED # Set ARIMAX fine tuning parameters params_ARIMAX = { 'num_extra_states': [i for i in range(6)], 'p': [i for i in range(5, 10)], 'd': [i for i in range(2)], 'q': [i for i in range(2)] } # Set LSTM fine tuning parameters params_LSTM = { 'order': [i for i in range(15)], 'num_extra_states': [i for i in range(2, 7)], 'cases_lag': [i for i in range(11)], 'deaths_lag': [i for i in range(10)], 'aug_lag': [i for i in range(10)] } # Some LSTM related hyper-parameters batch_size = 10 epochs = 25 # PREDICTION RELATED # Testing or Predicted pred_mode = True # Rolling prediction iterations rolling_iters = 10
## ## parse argument ## ## written by @ciku370 ## def toxic(wibu_bau,bawang): shit = bawang.split(',') dan_buriq = 0 result = {} for i in wibu_bau: if i in shit: try: result.update({wibu_bau[dan_buriq]:wibu_bau[dan_buriq+1]}) except IndexError: continue dan_buriq += 1 return result
raise NotImplementedError("'str' object has no attribute named '__getitem__' looks like I can't index a string?") def countGroups(related): groups = 0 def follow_subusers(matrix_lookup, user_id, users_in_group): """ Recursive helper to follow users across matrix that have associations possibly separated from the original user. Examples didn't show what happened when associations don't pass from the originating user, and we assume we continue to chase them around the matrix until all degrees of users are represented from the originator. """ if user_id not in users_in_group: users_in_group.append(user_id) while len(matrix_lookup[user_id]) > 0: follow_subusers(matrix_lookup, matrix_lookup[user_id].pop(), users_in_group) # Let's make a scratch lookup table and remove connections as we create groups lookup = {} for row_i in range(len(related)): for col_i in range(len(related)): # It's square so it doesn't matter what we use to reference if related[row_i][col_i] == '1': if col_i not in lookup: lookup[col_i] = [row_i] else: lookup[col_i].append(row_i) for from_user_id in lookup.keys(): current_group = [] if len(lookup[from_user_id]) > 0: follow_subusers(lookup, from_user_id, current_group) if len(current_group) > 0: #print(f"Found group: {current_group}") groups += 1 return groups print(countGroups(["1100", "1110", "0110", "0001"]))
num = [8, 5, 9, 1] num[2] = 3 # as listas são mutáveis num.append(7) #num.sort(reverse=True) num.insert(2, 0) num.pop(2) if 4 in num: num.remove(4) else: print('Não encontrei o valor 4') print(num) print(f'Essa lista tem {len(num)} elementos')
for linha in range(5): for coluna in range(3): if (linha == 0 and coluna == 0) or (linha == 4 and coluna == 0): print(' ', end='') elif linha == 0 or linha == 4 or coluna == 0: print('*', end='') else: print(' ', end='') print()
IV = bytearray.fromhex("391e95a15847cfd95ecee8f7fe7efd66") CT = bytearray.fromhex("8473dcb86bc12c6b6087619c00b6657e") # Hashes from the description of challenge ORIGINAL_MESSAGE = bytearray.fromhex( "464952455f4e554b45535f4d454c4121") # FIRE_NUKES_MELA! ALTERED_MESSAGE = bytearray.fromhex( "53454e445f4e554445535f4d454c4121") # SEND_NUDES_MELA! ALTERED_IV = bytearray() # XOR for i in range(16): ALTERED_IV.append(ALTERED_MESSAGE[i] ^ ORIGINAL_MESSAGE[i] ^ IV[i]) print(f'Flag: flag{{{ALTERED_IV.hex()},{CT.hex()}}}')
def draw(stick: int, cx: str): """Function to draw of the board. Args: stick: nb of sticks left cx: past """ if stick == 11: print( "#######################\n | | | | | | | | | | | \n#######################" ) if stick == 10: print( "#######################\n | | | | | | | | | |", "# ", cx, " \n#######################", ) if stick == 9: print( "#######################\n | | | | | | | | |", "# ", cx, " \n#######################", ) if stick == 8: print( "#######################\n | | | | | | | |", "# ", cx, " \n#######################", ) if stick == 7: print( "######################\n | | | | | | |", "# ", cx, " \n#######################", ) if stick == 6: print( "#######################\n | | | | | |", "# ", cx, " \n#######################", ) if stick == 5: print( "########################\n | | | | |", "# ", cx, " \n#######################", ) if stick == 4: print( "#######################\n | | | |", "# ", cx, " \n#######################" ) if stick == 3: print("#######################\n | | |", "# ", cx, " \n#######################") if stick == 2: print("#######################\n | |", "# ", cx, " \n#######################") if stick == 1: print("#######################\n |", "# ", cx, " \n#######################")
#Check String '''To check if a certain phrase or character is present in a string, we can use the keyword in.''' #Check if "free" is present in the following text: txt = "The best things in life are free!" print("free" in txt) txt = "Hello buddie owo!" if "owo" in txt: print("Yes, 'owo' is present.") ''' Terminal: True Yes, 'owo' is present. ''' #Learn more about If statements in our Python If...Else chapter: https://www.w3schools.com/python/python_conditions.asp #https://www.w3schools.com/python/python_strings.asp
testes = int(input()) casos = [] for x in range(testes): casos_ = input().split() casos.append(casos_) for x in range(testes): a = int(casos[x][0]) b = int(casos[x][1]) print(a+b)
# led-control WS2812B LED Controller Server # Copyright 2021 jackw01. Released under the MIT License (see LICENSE for details). default = { 0: { 'name': 'Sunset Light', 'mode': 0, 'colors': [ [ 0.11311430089613972, 1, 1 ], [ 0.9936081381405101, 0.6497928024431981, 1 ], [ 0.9222222222222223, 0.9460097254004577, 1 ], [ 0.7439005234662223, 0.7002515180395283, 1 ], [ 0.6175635842715993, 0.6474992244615467, 1 ] ] }, 10: { 'name': 'Sunset Dark', 'mode': 0, 'colors': [ [ 0.11311430089613972, 1, 1 ], [ 0.0083333333333333, 0.8332790409753081, 1 ], [ 0.9222222222222223, 0.8539212428101706, 0.7776361353257123 ], [ 0.8833333333333333, 0.8974992244615467, 0.2942011216107537 ] ] }, 20: { 'name': 'Miami', 'mode': 0, 'colors': [ [ 0.973575367647059, 0.792691647597254, 1 ], [ 0.935202205882353, 0.8132866132723112, 1 ], [ 0.8012408088235294, 0.6622568649885584, 0.992876838235294 ], [ 0.59375, 0.6027602974828375, 1 ], [ 0.5480238970588235, 0.9482980549199085, 1 ], [ 0.5022977941176471, 0.9460097254004577, 1 ] ] }, 90: { 'name': 'Spectrum', 'mode': 0, 'colors': [ [ 0, 1, 1 ], [ 1, 1, 1 ] ] }, 30: { 'name': 'Lemonbars', 'mode': 0, 'colors': [ [ 1, 0.9989988558352403, 1 ], [ 0.7807904411764706, 0.9989988558352403, 1 ], [ 0.5985753676470589, 0.9979987139601192, 1 ] ], }, 40: { 'name': 'Viridis', 'mode': 0, 'colors': [ [ 0.7663143382352942, 0.9989988558352403, 0.6528033088235294 ], [ 0.6029411764705882, 0.9989988558352403, 1 ], [ 0.4028033088235295, 0.5249570938215103, 1 ], [ 0.12339154411764706, 0.9989988558352403, 1 ] ], }, 150: { 'name': 'Fire', 'mode': 0, 'colors': [ [ 0, 0.9989988558352403, 1 ], [ 0.04549632352941176, 0.9989988558352403, 1 ], [ 0.11, 0.9989988558352403, 1 ], [ 0.08639705882352941, 0.667, 1 ], [ 0, 0, 1 ] ] }, 160: { 'name': 'Golden Hour', 'mode': 0, 'colors': [ [ 0.09122242647058823, 0.9960014330660517, 1 ], [ 0.1484375, 0.9960014330660517, 1 ], [ 0.13947610294117646, 0.4311355835240275, 0.6178768382352942 ] ], }, 170: { 'name': 'Ocean', 'mode': 0, 'colors': [ [ 0.6190257352941176, 0.9969995733712004, 1 ], [ 0.5659466911764706, 0.9989988558352403, 1 ], [ 0.4834558823529411, 0.746925057208238, 1 ] ], }, 190: { 'name': 'Sky Blue', 'mode': 0, 'colors': [ [ 0.5824908088235294, 0.8762614416475973, 1 ], [ 0.5808823529411765, 0.8132866132723112, 1 ], [ 0.5659466911764706, 0.5821653318077803, 1 ] ], }, 200: { 'name': 'Purple', 'mode': 0, 'colors': [ [ 0.7456341911764706, 0.9969995733712004, 1 ], [ 0.6541819852941176, 0.9979987139601192, 1 ], [ 0.68359375, 0.5913186498855835, 1 ] ], }, 210: { 'name': 'Hot Pink', 'mode': 0, 'colors': [ [ 0.979549632352941, 0.9989988558352403, 1 ], [ 0.9338235294117647, 0.8727831807780321, 1 ], [ 0.9542738970588235, 0.7240417620137299, 1 ] ], }, }
class Solution: def myAtoi(self, s: str) -> int: s = s.strip(' ') s = s.rstrip('.') lens = len(s) if (not s) or s[0].isalpha() or (lens == 1 and not s[0].isdecimal()): return 0 string, i = '', 0 if s[0] in {'-', '+'}: i = 1 string += s[0] while i < lens: char = s[i] if char.isdecimal(): string += char else: break i += 1 if (not string) or (len(string) == 1 and not string[0].isdecimal()): return 0 sol, mini, maxi = int(string), -2147483648, 2147483647 if sol < mini: return mini elif sol > maxi: return maxi else: return sol
while(True): try: n,k=map(int,input().split()) text=input() except EOFError: break p=0 for i in range(1,n): if text[0:i]==text[n-i:n]: p=i #print(p) s=text+text[p:]*(k-1) print(s)
class ExileError(Exception): pass class SCardError(ExileError): pass class YKOATHError(ExileError): pass
class Team: def __init__(self, client): self.client = client async def info(self): result = await self.client.api_call('GET', 'team.info') return result['team']
def chunk_string(string, chunk_size=450): # Limit = 462, cutting off at 450 to be safe. string_chunks = [] while len(string) != 0: current_chunk = string[0:chunk_size] string_chunks.append(current_chunk) string = string[len(current_chunk):] return string_chunks
class Solution: def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ l, r = 0, len(numbers) - 1 while numbers[l] + numbers[r] != target: if numbers[l] + numbers[r] < target: l += 1 else: r -= 1 return [l + 1, r + 1] def twoSum2(self, nums, target): i, j = 0, len(numbers) - 1 while i < j: if numbers[i] + numbers[j] == target: return [i + 1, j + 1] elif numbers[i] + numbers[j] < target: i += 1 while i < j and numbers[i] == numbers[i - 1]: i += 1 else: j -= 1 while i < j and numbers[j] == numbers[j + 1]: j -= 1 """ @param nums: an array of integer @param target: An integer @return: An integer """ # two sum unique pair def twoSum6(self, nums, target): if not nums or len(nums) < 2: return 0 nums.sort() count = 0 left, right = 0, len(nums) - 1 while left < right: if nums[left] + nums[right] == target: count, left, right = count + 1, left + 1, right - 1 while left < right and nums[right] == nums[right + 1]: right -= 1 while left < right and nums[left] == nums[left - 1]: left += 1 elif nums[left] + nums[right] > target: right -= 1 else: left += 1 return count solver = Solution() print(solver.twoSum([2,7,11,15], 9))
def maiusculas(frase): palavra = '' for letra in frase: if ord(letra) >= 65 and ord(letra) <= 90: palavra += letra return palavra def maiusculas2(frase): palavra = '' for letra in frase: if letra.isupper(): palavra += letra return palavra
# SQRT(X) LEETCODE SOLUTION: # creating a class. class Solution(object): # creating a function to solve the problem. def mySqrt(self, x): # declaring a variable to track the output. i = 0 # creating a while-loop to run while the output variable squared is less than or equal to the desired value. while i * i <= x: # incrementing the output variable's value. i += 1 # returning the value of the output variable with modifications. return i - 1
with open("input_blocks.txt") as file: content = file.read() for idx, block in enumerate(content.strip().split("---\n")): with open(f"blocks/{idx+1}.txt", "w") as file: print(block.rstrip(), file=file)
# Defining a Function def iterPower(base, exp): # Making an Iterative Call result = 1 while exp > 0: result *= base exp -= 1 return result
class Solution: def isSolvable(self, words, result) -> bool: for word in words: if len(word) > len(result): return False words = [word[::-1] for word in words] result = result[::-1] c2i = [-1] * 26 i2c = [False] * 10 def dfs(idx, digit, s): if digit == len(result): return s == 0 if idx == len(words): if c2i[ord(result[digit]) - ord('A')] != -1: if s % 10 == c2i[ord(result[digit]) - ord('A')]: return dfs(0, digit + 1, s // 10) elif not i2c[s % 10]: if digit == len(result) - 1 and s % 10 == 0: return False c2i[ord(result[digit]) - ord('A')] = s % 10 i2c[s % 10] = True if dfs(0, digit + 1, s // 10): return True c2i[ord(result[digit]) - ord('A')] = -1 i2c[s % 10] = False return False if digit >= len(words[idx]): return dfs(idx + 1, digit, s) if c2i[ord(words[idx][digit]) - ord('A')] != -1: if digit == len(words[idx]) - 1 and len(words[idx]) > 1 and c2i[ord(words[idx][digit]) - ord('A')] == 0: return False return dfs(idx + 1, digit, s + c2i[ord(words[idx][digit]) - ord('A')]) for i in range(10): if i2c[i]: continue if i == 0 and digit == len(words[idx]) - 1 and len(words[idx]) > 1: continue c2i[ord(words[idx][digit]) - ord('A')] = i i2c[i] = True if dfs(idx + 1, digit, s + i): return True c2i[ord(words[idx][digit]) - ord('A')] = -1 i2c[i] = False return False return dfs(0, 0, 0)
""" Script to find positive array with max sum """ class MaxSumSubArray(): """ # @param A : list of integers # @return a list of integers """ def maxsub(self, A): """ Function """ if not isinstance(A, (tuple, list)): A = tuple([A]) n = len(A) maxsum = 0 i = 0 final = [] while i < n and A[i] < 0: mysum = 0 j = i while j < n and A[j] < 0: # print(i, j) mysum = mysum + A[j] if mysum >= maxsum: maxsum = mysum final.append((A[i:j+1], i, len(A[i:j+1]), mysum)) j = j + 1 i = i + 1 # print(maxsum) A1 = [(a, i, n) for (a, i, n, m) in final if m == maxsum] if len(final) == 0: res = [] elif len(A1) == 1: res = [a for (a, i, n) in A1][0] else: nmax = max([n for (a, i, n) in A1]) A2 = [(a, i) for (a, i, n) in A1 if n == nmax] if len(A2) == 1: res = [a for (a, i) in A2][0] else: i_min = min([i for (a, i) in A2]) res = [a for (a, i) in A2 if i == i_min][0] return res def maxset(self, A): """ Function """ if not isinstance(A, (tuple, list)): A = tuple([A]) n = len(A) ret_array = [] i = 0 while i < n: candidate_array = [] j = i # print(i, j, n) while j < n and A[j] >= 0: candidate_array.append(A[j]) if not candidate_array or sum(candidate_array) > sum(ret_array): ret_array = candidate_array j = j + 1 i = i + 1 return ret_array def main(): # A = [1, 2, 5, -7, 2, 3] # A = [10, -1, 2, 3, -4, 100] # A = (100) A = [-1, -1, -1] a = MaxSumSubArray() final = a.maxset(A) print(final) if __name__ == '__main__': main()
def findMin(l): min = -1 for i in l: print (i) if i<min: min = i print("the lowest value is: ",min) l=[12,0,15,-30,-24,40] findMin(l)
{ "targets": [ { "target_name": "towerdef", "sources": [ "./cpp/towerdef_Main.cpp", "./cpp/towerdef.cpp", "./cpp/towerdef_Map.cpp", "./cpp/towerdef_PathMap.cpp", "./cpp/towerdef_Structure.cpp", "./cpp/towerdef_oneTileStruct.cpp", "./cpp/towerdef_Struct_Wall.cpp", "./cpp/Grid.cpp", "./cpp/GameMap.cpp", "./cpp/PointList.cpp" ], "include_dirs" : [ "<!(node -e \"require('nan')\")" ] } ] }
def main(): T = int(input()) case_id = 1 while case_id <= T: num = int(input()) if num == 0: print("Case #{case_id}: INSOMNIA".format(case_id=case_id)) case_id += 1 continue all_nums = [] res = 0 cur_num = num while len(all_nums) != 10: cur_num_str = str(cur_num) for digit in cur_num_str: if digit not in all_nums: all_nums.append(digit) #print(cur_num, all_nums) cur_num += num res = cur_num-num print("Case #{case_id}: {res}".format(case_id=case_id, res=res)) case_id += 1 return if __name__ == "__main__": main()
#POO 2 - POLIFORMISMO # class Coche(): def desplazamiento(self): print("Me desplazo utilizando cuatro ruedas") class Moto(): def desplazamiento(self): print("Me Desplazo utilizando dos Ruedas") class Camion(): def desplazamiento(self): print("Me Desplazo utilizando seis Ruedas") #Polimorfismo def desplazamientovehiculo(vehiculo): vehiculo.desplazamiento() mivehiculo=Camion() desplazamientovehiculo(mivehiculo)
# ESTRUTURAS DE CONTROLE (REPETIÇÃO) '''for c in range(0, 6): print('OI') print('fim')''' # o ultimo número é ignorado '''for c in range(1,7): print(c) print('fim')''' # -1 que diz qual a ITERAÇÃO, neste caso, contagem regressiva '''for c in range(6,0,-1): print(c) print('fim')''' # Com a ITERAÇÃO 2 ele diz que a estura deve mostrar de 2 em 2 '''for c in range(0, 7, 2): print(c) print('FIM')''' # ITERAÇÃO COM INPUT (O N+1 É PARA MOSTRAR O NÚMERO FINAL DIGITADO) '''n = int(input('Digite um número: ')) for c in range(0, n+1): print(c) print('FIM')''' # Inicio, fim e de quanto em quantos passos desejo mostrar '''i = int(input('Início: ')) f = int(input('Fim: ')) p = int(input('Passo:')) for c in range(i,f+1, p): print(c) print('FIM')''' # Colocando o input dentro do for ele repete quantas vezes você desejar '''for c in range(0, 3): n = int(input('Digite um valor: ')) print('FIM')''' # Somatória dos números s = 0 for c in range(0, 4): n = int(input('Digite um valor: ')) s += n # S recebe(+=) N print('O somatório de todos os valores foi {}'.format(s))
a=int(input('Enter first number:')) b=int(input('Enter second number:')) a=a+b b=a-b a=a-b print('After swaping first number is=',a) print('After swaping second number is=',b)
class Iterable(object): """ 可迭代对象 """ def __iter__(self): return self def __next__(self): self.next()
# automatically generated by the FlatBuffers compiler, do not modify # namespace: papi class Side(object): Sell = -1 None_ = 0 Buy = 1
class DriverTarget: bone_target = None data_path = None id = None id_type = None transform_space = None transform_type = None
N = int(input()) road_ends = [] barns_list = [] for x in range(0, N): barns_list.append(x) for x in range(0, N): road_ends.append(-1) for x in range(0, N-1): temp_list = input().split() road_ends[int(temp_list[1])-1] = int(temp_list[0])-1 for x in range(0, N): wasthere = [] for y in range(0, N): wasthere.append(False) index = x while wasthere[index] == False and road_ends[index] != -1: wasthere[index] = True index = road_ends[index] wasthere[index] = True if False not in wasthere: print(x+1) exit() print(-1)
def grade(arg, key): if "flag{1_h4v3_4_br41n}".lower() == key.lower(): return True, "You are not insane!" else: return False, "..."
def selection_form(data, target, name, radio=False): body = '' for i in data: body += '<input value="{0}" name="{1}" type="{2}"> {0}</br>'.format(i, name, 'radio' if radio else 'checkbox') body += '</br><input type="submit" value="Submit">' return '<form method="post" action="{0}">{1}</form>'.format(target, body) def text_form(data, target): req_body = '' body = '' for param, required in data.items(): text = '{0}{1}</br><input name="{0}" type="text" class="input-xxlarge"></br>'.format(param, ' (required)' if required else '') if required: req_body += text else: body += text body += '</br><input type="submit" value="Submit">' return '<form method="post" action="{0}">{1}{2}</form>'.format(target, req_body, body) def show_error(message): body = '' for line in message.split('\n'): if line != '': body += '{0}</br>'.format(line) return '<div class="alert alert-danger">{0}</div>'.format(body)
def resolve(): ''' code here ''' N = int(input()) As = [int(item) for item in input().split()] Bs = [int(item) for item in input().split()] Ds = [a - b for a, b in zip(As, Bs)] cnt_minus = 0 total_minus = 0 minus_list = [] cnt_plus_to_drow = 0 plus_list = [] for item in Ds: if item < 0: cnt_minus += 1 total_minus += item else: plus_list.append(item) plus_list.sort() if sum(plus_list) >= abs(total_minus): for item in plus_list[::-1]: if total_minus >= 0: break total_minus += item cnt_plus_to_drow += 1 print(cnt_minus + cnt_plus_to_drow) else: print(-1) if __name__ == "__main__": resolve()
# We your solution for 1.4 here! def is_prime(x): t=1 while t<x: if x%t==0: if t!=1 and t!=x: return False t=t+1 return True print(is_prime(5191))
{ "targets": [ { "target_name": "knit_decoder", "sources": ["src/main.cpp", "src/context.hpp", "src/worker.hpp"], "include_dirs" : [ "<!(node -e \"require('nan')\")" ], "cflags_cc!": ["-fno-rtti", "-fno-exceptions"], "cflags!": ["-fno-exceptions", "-Wall", "-std=c++11"], "xcode_settings": { "OTHER_CPLUSPLUSFLAGS" : ["-std=c++11","-stdlib=libc++"], "OTHER_LDFLAGS": ["-stdlib=libc++"], "GCC_ENABLE_CPP_EXCEPTIONS": "YES" }, "conditions": [ ['OS=="mac"', { "include_dirs": [ "/usr/local/include" ], "libraries" : [ "-lavcodec", "-lavformat", "-lswscale", "-lavutil" ] }], ['OS=="linux"', { "include_dirs": [ "/usr/local/include" ], "libraries" : [ "-lavcodec", "-lavformat", "-lswscale", "-lavutil", ] }], ['OS=="win"', { "include_dirs": [ "$(LIBAV_PATH)include" ], "libraries" : [ "-l$(LIBAV_PATH)avcodec", "-l$(LIBAV_PATH)avformat", "-l$(LIBAV_PATH)swscale", "-l$(LIBAV_PATH)avutil" ] }] ], } ] }
""" :authors: v.oficerov :license: MIT :copyrighting: 2022 www.sqa.engineer """ __author__ = 'v.oficerov' __version__ = '0.3.1' __email__ = '[email protected]'
class Properties: def __init__(self, client): self.client = client def search(self, params={}): url = '/properties' property_params = {'property': params} return self.client.request('GET', url, property_params)
#Nicolas Andrade de Freitas - Turma 2190 #Exercicio 26 m2 = float(input("Digite o valor em m²")) h = m2*0.0001 print("o valor {}m² em hectares é:{}".format(m2,h))
''' 面试题55 - I. 二叉树的深度 输入一棵二叉树的根节点,求该树的深度。从根节点到叶节点依次经过的节点(含根、叶节点)形成树的一条路径,最长路径的长度为树的深度。 例如: 给定二叉树 [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 返回它的最大深度 3 。 提示: 节点总数 <= 10000 执行用时 :52 ms, 在所有 Python3 提交中击败了57.39%的用户 内存消耗 :14.9 MB, 在所有 Python3 提交中击败了100.00%的用户 ''' # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # test cases: # 1. empty tree: return 0 # 2. only one root node: return 1 # 3. function test class Solution: def maxDepth(self, root: TreeNode) -> int: if root==None: return 0 elif root.left==None and root.right==None: return 1 else: lDep = 0 rDep = 0 if root.left: lDep = self.maxDepth(root.left) if root.right: rDep = self.maxDepth(root.right) if lDep>rDep: return lDep+1 else: return rDep+1
DISCOUNT_TYPES = ( ('percent', 'درصدی'), ('fixed', 'مقدار ثابت'), ) DISCOUNT_ITEM_TYPES = ( ('hotel', 'هتل'), ('room', 'اتاق'), ) DISCOUNT_CACHE_KEY = 'discount_{}' DISCOUNT_ALL_INFO_CACHE_KEY = 'discount_detailed_{}'
class Solution: def longestPalindrome(self, s: str) -> int: total = 0 for i in collections.Counter(list(s)).values(): total += i // 2 * 2 if i % 2 == 1 and total % 2 == 0: total += 1 return total
def build_question_context(rendered_block, form): question = rendered_block["question"] context = { "block": rendered_block, "form": { "errors": form.errors, "question_errors": form.question_errors, "mapped_errors": form.map_errors(), "answer_errors": {}, "fields": {}, }, } answer_ids = [] for answer in question["answers"]: answer_ids.append(answer["id"]) if answer["type"] in ("Checkbox", "Radio"): for option in answer["options"]: if "detail_answer" in option: answer_ids.append(option["detail_answer"]["id"]) for answer_id in answer_ids: context["form"]["answer_errors"][answer_id] = form.answer_errors(answer_id) if answer_id in form: context["form"]["fields"][answer_id] = form[answer_id] return context
class Product: def __init__(self, id, isOwner, name, description, main_img): self.id = id self.isOwner = isOwner self.name = name self.description = description self.main_img = main_img self.images = [] self.stock = {} self.price = {} def add_image(self, image): self.images.append(image) def add_stock(self, store_id, stock): self.stock[store_id] = stock def add_price(self, store_id, price): self.price[store_id] = price class Product_shop: def __init__(self, id, name, description, main_img, price): self.id = id self.name = name self.description = description self.main_img = main_img self.price = price
# File: difference_of_squares.py # Purpose: To find th difference of squares of first n numbers # Programmer: Amal Shehu # Course: Exercism # Date: Saturday 3rd September 2016, 01:50 PM def sum_of_squares(number): return sum([i**2 for i in range(1, number+1)]) def square_of_sum(number): return sum(range(1, number+1)) ** 2 def difference(number): return square_of_sum(number) - sum_of_squares(number)
class InvalidOperationError(BaseException): pass class Node(): def __init__(self, value, next = None): self.value = value self.next = next class AnimalShelter(): def __init__(self): self.front = None self.rear = None def __str__(self): # FRONT -> { a } -> { b } -> { c } -> { d } REAR if self.front == None: return "NULL" output = 'FRONT -> ' front = self.front rear = self.rear while front: output += f'{front.value} -> ' front = front.next output += 'REAR' return output def enqueue(self, animal): animal = animal.lower() node = Node(animal) if self.is_empty(): self.front = self.rear = node else: self.rear.next = node self.rear = self.rear.next def dequeue(self, pref): pref = pref.lower() if self.is_empty(): raise InvalidOperationError("Method not allowed on empty collection") if pref == "cat" or pref == 'dog': node = self.front self.front = self.front.next return node.value else: return "null" def is_empty(self): if self.front == None: return True else: return False # if __name__ == "__main__": # a = AnimalShelter() # a.enqueue("dog") # a.enqueue("cat") # a.dequeue("cat") # print(a)
""" """ def compute(address, mask): """ Funkcja przeliczająca adres IP. Args: address (str): Adres IP. mask (str): Maska IP. Returns: str: Binary address name. str: Klasa. str: Adres rozgłoszeniowy. str: Zakres górny. str: Zakres dolny. """ address = address.split(".") mask = mask.split(".") if len(address) != 4 or len(mask) != 4: print("error") address = [bin(int(oktet))[2:] for oktet in address] mask = [bin(int(oktet))[2:] for oktet in mask] binary_address = [] for oktet in address: final = oktet while len(final) < 8: final = "0" + final binary_address.append(final) binary_mask = [] for oktet in mask: final = oktet while len(final) < 8: final = "0" + final binary_mask.append(final) binary_address_name = [] for x in range(len(binary_address)): oktet = "" for y in range(len(binary_address[x])): if binary_address[x][y] == "1" and binary_mask[x][y] == "1": oktet += "1" else: oktet += "0" binary_address_name.append(oktet) broadcast_address = [] for x in range(len(binary_address)): oktet = "" for y in range(len(binary_address[x])): if binary_mask[x][y] == "0": oktet += "1" else: oktet += binary_address[x][y] broadcast_address.append(oktet) binary_address_name = ".".join([str(int(oktet, 2)) for oktet in binary_address_name]) broadcast_address = ".".join([str(int(oktet, 2)) for oktet in broadcast_address]) if int(binary_address_name.split(".")[0]) >= 1 and int(binary_address_name.split(".")[0]) < 128: klasa = "A" elif int(binary_address_name.split(".")[0]) >= 128 and int(binary_address_name.split(".")[0]) < 192: klasa = "B" elif int(binary_address_name.split(".")[0]) >= 192 and int(binary_address_name.split(".")[0]) < 224: klasa = "C" elif int(binary_address_name.split(".")[0]) >= 224 and int(binary_address_name.split(".")[0]) < 240: klasa = "D" else: klasa = "E" range_down = ".".join(binary_address_name.split(".")[0:3]) + "." + str(int(binary_address_name.split(".")[3])+1) range_up = ".".join(broadcast_address.split(".")[0:3]) + "." + str(int(broadcast_address.split(".")[3])-1) return binary_address_name, klasa, broadcast_address, range_up, range_down
#!/usr/bin/env python3 """Adds commands that need to be executed after the container starts.""" ENTRYPOINT_FILE = "/usr/local/bin/docker-entrypoint.sh" UPDATE_HOSTS_COMMAND = ("echo 127.0.0.1 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10" " >> /etc/hosts\n") RUN_SSHD_COMMAND = "/usr/sbin/sshd\n" EXEC_LINE = 'exec "$@"\n' def main(): with open(ENTRYPOINT_FILE, 'r') as f: lines = f.readlines() lines = lines[:lines.index(EXEC_LINE)] lines.append(UPDATE_HOSTS_COMMAND) lines.append(RUN_SSHD_COMMAND) lines.append(EXEC_LINE) with open(ENTRYPOINT_FILE, 'w') as f: f.writelines(lines) if __name__ == '__main__': main()
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # If-else-if flow control. marks = 84 if 80 < marks and 100 >= marks: print("A") elif 60 < marks and 80 >= marks: print("B") elif 50 < marks and 60 >= marks: print("C") elif 35 < marks and 50 >= marks: print("S") else: print("F") # Iteration/loop flow control. my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for num in my_list: print(num) for num in my_list: if num % 2 == 0: print(f'Even number: {num}') # Even numbers. else: print(f'Odd number: {num}') # Odd numbers. list_sum = 0 for num in my_list: list_sum += num print(list_sum) my_string = "Hello World" for text in my_string: print(text) for _ in range(10): # _, if variable has no issue. print("Cool!") # Tuple un-packing. tup = (1, 2, 3, 4) for num in tup: print(num) my_list = [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)] print(f'Tuple length: {len(my_list)}') for item in my_list: print(item) # OR for a, b in my_list: # Tuple unpacking. print(f'First: {a}, Second: {b}') # Iterate through dictionaries. my_dict = {'k1': 1, 'k2': 2, 'k3': 3} for item in my_dict: print(item) # By default iterate through keys only. for item in my_dict.items(): print(item) # Now its tuple list that iterate. for key, value in my_dict.items(): print(f'Key: {key}, Value: {value}') # Tuple unpacking on dictionary. else: print("End") # Iteration/loop with 'while' loops. x = 0 while x < 5: print(f'Value of x is {x}') x += 1 else: print("X is not less than five") # break, continue and pass for item in range(5): pass # Just a placeholder , do nothing. # break and continue work just like with Java.
symbol748 = {} def _update(code_748, code_gbk, numchars): for i in range(numchars): symbol748[code_748 + i] = code_gbk + i _update(0x8EFF, 0x8E8F, 1) # 8EFF -> 8E8F _update(0x94FF, 0x94DA, 1) # 94FF -> 94DA _update(0x95FF, 0x95F1, 1) # 95FF -> 95F1 _update(0x9680, 0xB17E, 1) # 9680 -> B17E _update(0x9681, 0xB47E, 1) # 9681 -> B47E _update(0x9682, 0xB57E, 1) # 9682 -> B57E _update(0x9683, 0xB261, 1) # 9683 -> B261 _update(0xA081, 0x8940, 3) # A081-A083 -> 8940-8942 _update(0xA089, 0xA2A0, 1) # A089 -> A2A0 _update(0xA08A, 0x8943, 4) # A08A-A08D -> 8943-8946 _update(0xA0A1, 0xA1A0, 1) # A0A1 -> A1A0 _update(0xA0A2, 0xA3A2, 2) # A0A2-A0A3 -> A3A2-A3A3 _update(0xA0A4, 0xA1E7, 1) # A0A4 -> A1E7 _update(0xA0A5, 0xA3A5, 3) # A0A5-A0A7 -> A3A5-A3A7 _update(0xA0A8, 0xA39F, 2) # A0A8-A0A9 -> A39F-A3A0 _update(0xA0AA, 0xAAB3, 1) # A0AA -> AAB3 _update(0xA0AB, 0xA3AB, 1) # A0AB -> A3AB _update(0xA0AC, 0xA29F, 1) # A0AC -> A29F _update(0xA0AD, 0xA3AD, 13) # A0AD-A0B9 -> A3AD-A3B9 _update(0xA0BA, 0xA69F, 2) # A0BA-A0BB -> A69F-A6A0 _update(0xA0BC, 0xA3BC, 31) # A0BC-A0DA -> A3BC-A3DA _update(0xA0DB, 0xA49F, 1) # A0DB -> A49F _update(0xA0DC, 0xA3DC, 1) # A0DC -> A3DC _update(0xA0DD, 0xA4A0, 1) # A0DD -> A4A0 _update(0xA0DE, 0xA3DE, 29) # A0DE-A0FA -> A3DE-A3FA _update(0xA0FB, 0xA59F, 1) # A0FB -> A59F _update(0xA0FC, 0xA3FC, 1) # A0FC -> A3FC _update(0xA0FD, 0xA5A0, 1) # A0FD -> A5A0 _update(0xA0FE, 0xA3FE, 1) # A0FE -> A3FE _update(0xA100, 0x8240, 11) # A100-A10A -> 8240-824E _update(0xA10B, 0xB14B, 22) # A10B-A120 -> B14B-B160 _update(0xA121, 0xA140, 32) # A121-A15F -> A140-A17E _update(0xA160, 0xA180, 31) # A160-A17E -> A180-A19E _update(0xA180, 0xB180, 23) # A180-A196 -> B180-B196 _update(0xA200, 0xB240, 33) # A200-A220 -> B240-B260 _update(0xA221, 0xA240, 63) # A221-A25F -> A240-A27E _update(0xA260, 0xA280, 31) # A260-A27E -> A280-A29E _update(0xA280, 0xB280, 33) # A280-A2A0 -> B280-B2A0 _update(0xA2FF, 0xA2EF, 1) # A2FF -> A2EF _update(0xA300, 0xB340, 31) # A300-A31E -> B340-B35E _update(0xA321, 0xA340, 63) # A321-A35F -> A340-A37E _update(0xA360, 0xA380, 31) # A360-A37E -> A380-A39E _update(0xA380, 0xB380, 19) # A380-A392 -> B380-B392 _update(0xA393, 0xA1AD, 1) # A393 -> A1AD _update(0xA394, 0xB394, 13) # A394-A3A0 -> B394-B3A0 _update(0xA421, 0xA440, 63) # A421-A45F -> A440-A47E _update(0xA460, 0xA480, 31) # A460-A47E -> A480-A49E _update(0xA480, 0xB480, 33) # A480-A4A0 -> B480-B4A0 _update(0xA521, 0xA540, 63) # A521-A55F -> A540-A57E _update(0xA560, 0x97F2, 2) # A560-A561 -> 97F2-97F3 _update(0xA56F, 0xA58F, 5) # A56F-A573 -> A58F-A593 _update(0xA578, 0xA598, 7) # A578-A57E -> A598-A59E _update(0xA580, 0xB580, 33) # A580-A5A0 -> B580-B5A0 _update(0xA621, 0xA640, 56) # A621-A658 -> A640-A677 _update(0xA660, 0xA680, 14) # A660-A66D -> A680-A68D _update(0xA680, 0xB680, 31) # A680-A69E -> B680-B69E _update(0xA780, 0xB780, 32) # A780-A79F -> B780-B79F # A7A0 (no matches) _update(0xA7FF, 0xB7A0, 1) # A7FF -> B7A0 _update(0xA880, 0xB880, 30) # A880-A89D -> B880-B89D _update(0xA89F, 0xB89F, 2) # A89F-A8A0 -> B89F-B8A0 _update(0xA980, 0xB980, 30) # A980-A99D -> B980-B99D _update(0xA9FF, 0xB9A0, 1) # A9FF -> B9A0 _update(0xAA80, 0xBA80, 2) # AA80-AA81 -> BA80-BA81
# The method below seems to yield correct result but will end in TLE for large cases. # def candy(ratings) -> int: # n = len(ratings) # candies = [0]*n # while True: # changed = False # for i in range(1, n): # if ratings[i-1] < ratings[i] and candies[i-1] >= candies[i]: # candies[i] = candies[i-1] + 1 # changed = True # elif ratings[i-1] > ratings[i] and candies[i-1] <= candies[i]: # candies[i-1] = candies[i] + 1 # changed = True # iterations += 1 # if not changed: # break # return sum(candies) + n # Operating on a full list could end up having too long a list to handle, # def candy(ratings) -> int: n = len(ratings) last_one = 1 num_candies = 1 # last index i where a[i-1] <= a[i], such that plus 1 shouldn't propage through i. last_le = 0 # last index where a[idx-1] > a[idx] and a[idx - 1] - a[idx] > 1 # make it a list and append element like [diff, i] # because adding 1, especially multiple time might accumulate the diff and end up propagating through a big_diff point. last_big_diff = [] for i in range(1, n): if ratings[i] > ratings[i-1]: num_candies += (last_one + 1) last_one += 1 last_le = i elif ratings[i] == ratings[i-1]: num_candies += 1 last_one = 1 last_le = i elif ratings[i] < ratings[i-1] and last_one == 1: index_big_diff = 0 while len(last_big_diff) and last_big_diff[-1][0] == 1: del last_big_diff[-1] if len(last_big_diff) != 0: index_big_diff = last_big_diff[-1][1] last_big_diff[-1][0] -= 1 num_candies += (i - max(last_le, index_big_diff) + 1) last_one = 1 else: num_candies += 1 last_big_diff.append([last_one - 1,i]) last_one = 1 return num_candies def candy_1(ratings) -> int: n = len(ratings) candies = [1]*n for i in range(1, n): if ratings[i] > ratings[i-1]: candies[i] = candies[i-1] + 1 for i in reversed(range(1,n)): if ratings[i-1] > ratings[i] and candies[i-1] <= candies[i]: candies[i-1] = candies[i] + 1 return sum(candies) if __name__ == "__main__": print(candy_1([1,6,10,8,7,3,2]))
def InsertionSort(array): for i in range(1,len(array)): current = array[i] j = i-1 while(j >= 0 and current < array[j]): array[j+1] = array[j] j -= 1 array[j+1] = current array = [32,33,1,0,23,98,-19,15,7,-52,76] print("Before sort: ") print(*array,sep=', ') print("After sort: ") InsertionSort(array) print(*array,sep=', ')
"""Skylark extension for terraform_sut_component.""" load("//skylark:toolchains.bzl", "toolchain_container_images") load("//skylark:integration_tests.bzl", "sut_component") def terraform_sut_component(name, tf_files, setup_timeout_seconds=None, teardown_timeout_seconds=None): # Create a list of terraform file locations. tf_files_loc = ",".join(["$(location %s)" % tf_file for tf_file in tf_files]) # Creating the underlying sut_component rule. sut_component( name = name, docker_image = toolchain_container_images()["rbe-integration-test"], setups = [{ # The str(Label(...)) is necessary for proper namespace resolution in # cases where this repo is imported from another repo. "program" : str(Label("//skylark/terraform:tf_setup.sh")), "args" : ["--tf_files=%s" % tf_files_loc], "data" : tf_files, # for runtime. "deps" : tf_files, # for $location extraction in build time. "output_properties" : [ "sut_id", "address", ], "output_files" : [ "terraform.tfplan", ], "timeout_seconds" : setup_timeout_seconds, }], teardowns = [{ "program" : str(Label("//skylark/terraform:tf_teardown.sh")), "args" : [ "{sut_id}", ], "input_files" : [ "{terraform.tfplan}", ], "timeout_seconds" : teardown_timeout_seconds, }], )
class JobErrorCode: """ Error Codes returned by Job related operations """ NoError = 0 JobNotFound = 1 MultipleJobsFound = 2 JobFailed = 3 SubmitNotAllowed = 4 ErrorOccurred = 5 InternalSchedulerError = 6 JobUnsanitary = 7 ExecutableInvalid = 8 JobHeld = 9 PresubmitFailed = 10 Names = [ 'NoError', 'JobNotFound', 'MultipleJobsFound', 'JobFailed', 'SubmitNotAllowed', 'ErrorOccurred', 'InternalSchedulerError', 'JobUnsanitary', 'ExecutableInvalid', 'JobHeld', 'PresubmitFailed', ] def __init(self,code = NoError): self.error_code = code def __eq__(self,rhs): if self.error_code == rhs.error_code: return True return False def __ne__(self,rhs): if self.error_code != rhs.error_code: return True return False
HTTP_OK = 200 HTTP_UNAUTHORIZED = 401 HTTP_FOUND = 302 HTTP_BAD_REQUEST = 400 HTTP_NOT_FOUND = 404 HTTP_SERVICE_UNAVAILABLE = 503
x=int(input("enter x1")) y=int(input("enter x2")) c=x*y print(c)
mode = 2 host = "ftp.gportal.jaxa.jp" user = "id" pw = "pw" TargetFor = ".h5" lat = [0, 20] lon = [100, 150] start = [2021, 10, 10, 10] end = [2021, 10, 10, 12] delta = "H" ElementNum = -1 """ -----------------以下メモ欄----------------- 〇 mode : 0:ダウンロードのみ,1:データ処理のみ,2:ダウンロード・データ処理 〇 ElementNumのデータ種別(04Fは確認済み) -1 : データ内の略称名を見て決めたい方用 2 : Grid hourlyPrecipRate 3 : Grid satelliteInfoFlag 4 : Grid observationTimeFlag 5 : Grid hourlyPrecipRateGC 6 : Grid gaugeQualityInfo 7 : Grid snowProbability """
coordinates_E0E1E1 = ((126, 112), (126, 114), (126, 115), (126, 130), (126, 131), (127, 113), (127, 115), (127, 131), (128, 92), (128, 115), (128, 116), (128, 121), (128, 131), (129, 92), (129, 116), (129, 118), (129, 119), (129, 131), (130, 92), (130, 117), (130, 122), (130, 131), (131, 87), (131, 89), (131, 90), (131, 92), (131, 118), (131, 120), (131, 122), (131, 131), (132, 88), (132, 91), (132, 118), (132, 120), (132, 122), (132, 130), (133, 89), (133, 91), (133, 108), (133, 118), (133, 119), (133, 120), (133, 122), (133, 130), (134, 91), (134, 107), (134, 109), (134, 119), (134, 122), (134, 129), (134, 130), (134, 138), (135, 90), (135, 106), (135, 108), (135, 110), (135, 119), (135, 121), (135, 123), (135, 129), (135, 130), (135, 137), (136, 91), (136, 92), (136, 101), (136, 103), (136, 104), (136, 107), (136, 108), (136, 109), (136, 111), (136, 119), (136, 121), (136, 123), (136, 128), (136, 129), (136, 137), (137, 91), (137, 92), (137, 102), (137, 105), (137, 106), (137, 107), (137, 108), (137, 109), (137, 110), (137, 112), (137, 119), (137, 121), (137, 122), (137, 123), (137, 127), (137, 128), (137, 136), (138, 91), (138, 92), (138, 103), (138, 106), (138, 107), (138, 113), (138, 119), (138, 121), (138, 122), (138, 123), (138, 125), (138, 126), (138, 128), (138, 135), (139, 90), (139, 92), (139, 104), (139, 108), (139, 109), (139, 110), (139, 111), (139, 114), (139, 115), (139, 116), (139, 117), (139, 119), (139, 120), (139, 121), (139, 122), (139, 123), (139, 124), (139, 128), (139, 134), (140, 89), (140, 91), (140, 93), (140, 105), (140, 106), (140, 112), (140, 116), (140, 119), (140, 120), (140, 121), (140, 122), (140, 123), (140, 124), (140, 125), (140, 126), (140, 127), (140, 128), (140, 129), (140, 130), (140, 131), (140, 134), (141, 87), (141, 89), (141, 90), (141, 94), (141, 113), (141, 115), (141, 116), (141, 117), (141, 118), (141, 119), (141, 120), (141, 121), (141, 122), (141, 123), (141, 124), (141, 125), (141, 126), (141, 127), (141, 128), (141, 133), (142, 86), (142, 91), (142, 92), (142, 93), (142, 95), (142, 114), (142, 116), (142, 117), (142, 118), (142, 119), (142, 120), (142, 121), (142, 122), (142, 123), (142, 124), (142, 125), (142, 126), (142, 127), (142, 128), (142, 129), (142, 130), (142, 131), (142, 132), (142, 134), (143, 94), (143, 97), (143, 114), (143, 116), (143, 117), (143, 118), (143, 119), (143, 120), (143, 121), (143, 122), (143, 123), (143, 124), (143, 125), (143, 126), (143, 127), (143, 128), (143, 129), (143, 130), (143, 131), (143, 132), (143, 134), (143, 139), (144, 96), (144, 99), (144, 114), (144, 116), (144, 117), (144, 118), (144, 119), (144, 120), (144, 121), (144, 122), (144, 123), (144, 124), (144, 125), (144, 126), (144, 127), (144, 128), (144, 129), (144, 130), (144, 131), (144, 132), (144, 133), (144, 134), (144, 137), (145, 98), (145, 100), (145, 113), (145, 115), (145, 116), (145, 117), (145, 118), (145, 119), (145, 120), (145, 121), (145, 122), (145, 123), (145, 124), (145, 125), (145, 126), (145, 127), (145, 128), (145, 129), (145, 130), (145, 131), (145, 132), (145, 133), (145, 134), (145, 136), (146, 112), (146, 114), (146, 115), (146, 116), (146, 117), (146, 118), (146, 119), (146, 120), (146, 121), (146, 122), (146, 123), (146, 124), (146, 125), (146, 126), (146, 127), (146, 128), (146, 129), (146, 130), (146, 131), (146, 132), (146, 133), (146, 135), (147, 112), (147, 114), (147, 115), (147, 116), (147, 117), (147, 118), (147, 119), (147, 120), (147, 121), (147, 122), (147, 123), (147, 127), (147, 128), (147, 129), (147, 130), (147, 131), (147, 132), (147, 133), (147, 135), (148, 113), (148, 116), (148, 117), (148, 118), (148, 119), (148, 120), (148, 121), (148, 122), (148, 123), (148, 124), (148, 125), (148, 128), (148, 129), (148, 130), (148, 131), (148, 132), (148, 133), (148, 135), (149, 114), (149, 116), (149, 117), (149, 118), (149, 119), (149, 120), (149, 121), (149, 123), (149, 127), (149, 129), (149, 130), (149, 131), (149, 132), (149, 133), (149, 134), (149, 136), (150, 93), (150, 116), (150, 118), (150, 119), (150, 120), (150, 122), (150, 128), (150, 130), (150, 131), (150, 132), (150, 133), (150, 134), (150, 135), (150, 137), (151, 94), (151, 116), (151, 118), (151, 119), (151, 120), (151, 122), (151, 128), (151, 131), (151, 132), (151, 133), (151, 134), (151, 136), (152, 95), (152, 117), (152, 119), (152, 120), (152, 122), (152, 130), (152, 132), (152, 133), (152, 135), (153, 96), (153, 98), (153, 99), (153, 105), (153, 117), (153, 119), (153, 120), (153, 121), (153, 123), (153, 131), (153, 134), (154, 103), (154, 105), (154, 117), (154, 119), (154, 120), (154, 121), (154, 122), (154, 123), (154, 124), (154, 131), (154, 134), (155, 104), (155, 105), (155, 117), (155, 119), (155, 120), (155, 121), (155, 122), (155, 123), (155, 126), (155, 131), (155, 132), (155, 134), (156, 104), (156, 105), (156, 116), (156, 118), (156, 119), (156, 122), (156, 123), (156, 124), (156, 126), (156, 131), (156, 135), (157, 104), (157, 106), (157, 115), (157, 117), (157, 118), (157, 120), (157, 122), (157, 123), (157, 125), (157, 131), (157, 133), (157, 136), (158, 104), (158, 106), (158, 114), (158, 116), (158, 117), (158, 119), (158, 122), (158, 124), (158, 130), (158, 132), (159, 104), (159, 106), (159, 112), (159, 115), (159, 116), (159, 118), (159, 122), (159, 123), (159, 130), (159, 131), (160, 105), (160, 111), (160, 114), (160, 115), (160, 117), (160, 123), (160, 129), (160, 130), (161, 105), (161, 107), (161, 108), (161, 109), (161, 110), (161, 112), (161, 113), (161, 114), (161, 116), (161, 123), (161, 129), (161, 130), (162, 113), (162, 114), (162, 123), (162, 129), (163, 112), (163, 115), (163, 128), (163, 129), (164, 113), (164, 114), (164, 122), (164, 128), (165, 128), (166, 127), ) coordinates_E1E1E1 = ((79, 113), (80, 113), (80, 114), (80, 129), (81, 113), (81, 115), (81, 129), (82, 112), (82, 113), (82, 115), (82, 129), (83, 112), (83, 114), (83, 116), (83, 128), (83, 129), (84, 110), (84, 113), (84, 114), (84, 115), (84, 117), (84, 128), (84, 129), (85, 108), (85, 115), (85, 116), (85, 128), (85, 129), (86, 101), (86, 103), (86, 110), (86, 111), (86, 114), (86, 118), (86, 129), (86, 141), (86, 142), (87, 101), (87, 104), (87, 105), (87, 106), (87, 107), (87, 110), (87, 119), (87, 127), (87, 129), (87, 141), (87, 142), (88, 101), (88, 103), (88, 108), (88, 110), (88, 117), (88, 121), (88, 126), (88, 129), (89, 101), (89, 102), (89, 109), (89, 110), (89, 118), (89, 122), (89, 123), (89, 124), (89, 127), (89, 129), (90, 101), (90, 110), (90, 119), (90, 121), (90, 126), (90, 127), (90, 128), (90, 130), (90, 139), (91, 100), (91, 120), (91, 122), (91, 123), (91, 124), (91, 125), (91, 126), (91, 127), (91, 128), (91, 129), (91, 131), (91, 138), (91, 139), (92, 99), (92, 121), (92, 123), (92, 124), (92, 125), (92, 126), (92, 127), (92, 128), (92, 129), (92, 130), (92, 133), (92, 135), (92, 136), (92, 138), (93, 98), (93, 121), (93, 123), (93, 124), (93, 125), (93, 126), (93, 127), (93, 128), (93, 129), (93, 130), (93, 131), (93, 134), (93, 138), (94, 97), (94, 121), (94, 123), (94, 124), (94, 125), (94, 126), (94, 127), (94, 128), (94, 129), (94, 130), (94, 131), (94, 132), (94, 133), (94, 135), (94, 136), (94, 138), (95, 95), (95, 96), (95, 121), (95, 123), (95, 124), (95, 125), (95, 126), (95, 127), (95, 128), (95, 129), (95, 130), (95, 131), (95, 132), (95, 133), (95, 134), (95, 135), (95, 139), (96, 94), (96, 95), (96, 107), (96, 121), (96, 123), (96, 124), (96, 125), (96, 126), (96, 127), (96, 128), (96, 129), (96, 130), (96, 131), (96, 132), (96, 133), (96, 134), (96, 137), (96, 139), (97, 105), (97, 108), (97, 109), (97, 110), (97, 121), (97, 123), (97, 124), (97, 125), (97, 126), (97, 127), (97, 128), (97, 129), (97, 130), (97, 131), (97, 132), (97, 133), (97, 135), (98, 104), (98, 107), (98, 113), (98, 121), (98, 123), (98, 124), (98, 125), (98, 126), (98, 127), (98, 128), (98, 129), (98, 130), (98, 131), (98, 132), (98, 134), (99, 103), (99, 105), (99, 110), (99, 111), (99, 113), (99, 120), (99, 122), (99, 123), (99, 124), (99, 125), (99, 126), (99, 127), (99, 128), (99, 129), (99, 130), (99, 131), (99, 133), (100, 102), (100, 106), (100, 107), (100, 108), (100, 109), (100, 110), (100, 111), (100, 113), (100, 120), (100, 122), (100, 123), (100, 124), (100, 127), (100, 128), (100, 129), (100, 130), (100, 131), (100, 133), (101, 101), (101, 103), (101, 104), (101, 110), (101, 112), (101, 113), (101, 119), (101, 121), (101, 122), (101, 125), (101, 126), (101, 127), (101, 128), (101, 129), (101, 130), (101, 131), (101, 133), (102, 100), (102, 102), (102, 110), (102, 112), (102, 113), (102, 115), (102, 118), (102, 120), (102, 121), (102, 122), (102, 124), (102, 128), (102, 129), (102, 130), (102, 131), (102, 133), (102, 140), (102, 141), (103, 99), (103, 100), (103, 110), (103, 112), (103, 113), (103, 116), (103, 117), (103, 119), (103, 120), (103, 122), (103, 128), (103, 130), (103, 131), (103, 133), (103, 140), (104, 93), (104, 95), (104, 96), (104, 98), (104, 110), (104, 112), (104, 113), (104, 114), (104, 115), (104, 118), (104, 119), (104, 120), (104, 122), (104, 128), (104, 130), (104, 131), (104, 133), (104, 138), (104, 139), (105, 93), (105, 97), (105, 110), (105, 112), (105, 113), (105, 114), (105, 115), (105, 116), (105, 117), (105, 118), (105, 123), (105, 127), (105, 131), (105, 133), (105, 137), (105, 139), (106, 93), (106, 96), (106, 110), (106, 113), (106, 114), (106, 115), (106, 116), (106, 117), (106, 120), (106, 121), (106, 122), (106, 123), (106, 124), (106, 125), (106, 128), (106, 129), (106, 133), (106, 138), (107, 93), (107, 95), (107, 110), (107, 114), (107, 115), (107, 118), (107, 124), (107, 126), (107, 131), (107, 133), (107, 138), (108, 84), (108, 93), (108, 94), (108, 113), (108, 115), (108, 117), (108, 124), (108, 125), (108, 133), (108, 138), (109, 84), (109, 85), (109, 93), (109, 114), (109, 116), (109, 124), (109, 125), (109, 132), (109, 133), (110, 84), (110, 86), (110, 93), (110, 114), (110, 115), (110, 125), (110, 132), (110, 133), (111, 86), (111, 93), (111, 114), (111, 123), (111, 125), (111, 133), (112, 87), (112, 113), (112, 122), (112, 125), (112, 133), (113, 87), (113, 88), (113, 112), (113, 122), (113, 125), (113, 133), (114, 88), (114, 89), (114, 93), (114, 94), (114, 111), (114, 122), (114, 125), (115, 89), (115, 90), (115, 93), (115, 98), (115, 107), (115, 111), (115, 121), (115, 122), (115, 123), (115, 134), (116, 89), (116, 91), (116, 94), (116, 95), (116, 96), (116, 98), (116, 106), (116, 109), (116, 111), (116, 121), (116, 123), (116, 125), (116, 135), (117, 90), (117, 92), (117, 93), (117, 98), (117, 106), (117, 108), (117, 111), (117, 121), (117, 123), (118, 91), (118, 98), (118, 106), (118, 109), (118, 112), (118, 121), (118, 123), (119, 106), (119, 108), (119, 121), (120, 107), ) coordinates_781286 = ((103, 126), (104, 125), ) coordinates_DCF8A4 = ((109, 161), (110, 161), (111, 160), (111, 161), (112, 160), (113, 159), (114, 159), (115, 158), (116, 157), ) coordinates_DBF8A4 = ((133, 157), (134, 158), (141, 161), (142, 161), (143, 161), (144, 161), ) coordinates_60CC60 = ((83, 155), (83, 156), (83, 160), (84, 155), (84, 157), (84, 163), (85, 154), (85, 156), (85, 160), (85, 161), (85, 164), (86, 153), (86, 155), (86, 156), (86, 157), (86, 158), (86, 160), (86, 161), (86, 162), (86, 165), (87, 152), (87, 154), (87, 155), (87, 156), (87, 157), (87, 158), (87, 159), (87, 160), (87, 161), (87, 162), (87, 163), (87, 166), (88, 151), (88, 153), (88, 154), (88, 155), (88, 156), (88, 157), (88, 158), (88, 159), (88, 160), (88, 161), (88, 162), (88, 163), (88, 164), (89, 150), (89, 152), (89, 153), (89, 154), (89, 155), (89, 156), (89, 157), (89, 158), (89, 159), (89, 160), (89, 161), (89, 162), (89, 163), (89, 164), (89, 165), (89, 167), (90, 150), (90, 152), (90, 153), (90, 154), (90, 155), (90, 156), (90, 157), (90, 158), (90, 159), (90, 160), (90, 161), (90, 162), (90, 163), (90, 164), (90, 165), (90, 166), (90, 168), (91, 149), (91, 151), (91, 152), (91, 153), (91, 154), (91, 155), (91, 156), (91, 157), (91, 158), (91, 159), (91, 160), (91, 161), (91, 162), (91, 163), (91, 164), (91, 165), (91, 166), (91, 167), (91, 169), (92, 149), (92, 151), (92, 152), (92, 153), (92, 154), (92, 155), (92, 156), (92, 157), (92, 158), (92, 159), (92, 160), (92, 161), (92, 162), (92, 163), (92, 164), (92, 165), (92, 166), (92, 167), (92, 169), (93, 149), (93, 151), (93, 152), (93, 153), (93, 154), (93, 155), (93, 156), (93, 157), (93, 158), (93, 159), (93, 160), (93, 161), (93, 162), (93, 163), (93, 164), (93, 165), (93, 166), (93, 167), (93, 168), (93, 170), (94, 149), (94, 151), (94, 152), (94, 153), (94, 154), (94, 155), (94, 156), (94, 157), (94, 158), (94, 159), (94, 160), (94, 161), (94, 162), (94, 163), (94, 164), (94, 165), (94, 166), (94, 167), (94, 168), (94, 170), (95, 149), (95, 150), (95, 151), (95, 152), (95, 153), (95, 154), (95, 155), (95, 156), (95, 157), (95, 158), (95, 159), (95, 160), (95, 161), (95, 162), (95, 163), (95, 164), (95, 165), (95, 166), (95, 167), (95, 168), (95, 169), (95, 171), (96, 148), (96, 150), (96, 151), (96, 152), (96, 153), (96, 154), (96, 155), (96, 156), (96, 157), (96, 158), (96, 159), (96, 160), (96, 161), (96, 162), (96, 163), (96, 164), (96, 165), (96, 166), (96, 167), (96, 168), (96, 169), (96, 171), (97, 150), (97, 151), (97, 152), (97, 153), (97, 154), (97, 155), (97, 156), (97, 157), (97, 158), (97, 159), (97, 160), (97, 161), (97, 162), (97, 163), (97, 164), (97, 165), (97, 166), (97, 167), (97, 168), (97, 169), (97, 170), (97, 172), (98, 147), (98, 149), (98, 150), (98, 151), (98, 152), (98, 153), (98, 154), (98, 155), (98, 156), (98, 157), (98, 158), (98, 159), (98, 160), (98, 161), (98, 162), (98, 163), (98, 164), (98, 165), (98, 166), (98, 167), (98, 168), (98, 169), (98, 170), (98, 172), (99, 147), (99, 149), (99, 150), (99, 151), (99, 152), (99, 153), (99, 154), (99, 155), (99, 156), (99, 157), (99, 158), (99, 159), (99, 160), (99, 161), (99, 162), (99, 163), (99, 164), (99, 165), (99, 166), (99, 167), (99, 168), (99, 169), (99, 170), (99, 171), (99, 173), (100, 146), (100, 147), (100, 148), (100, 149), (100, 150), (100, 151), (100, 152), (100, 153), (100, 154), (100, 155), (100, 156), (100, 157), (100, 158), (100, 159), (100, 160), (100, 161), (100, 162), (100, 163), (100, 164), (100, 165), (100, 166), (100, 167), (100, 168), (100, 169), (100, 170), (100, 171), (100, 173), (101, 146), (101, 148), (101, 149), (101, 150), (101, 151), (101, 152), (101, 153), (101, 154), (101, 155), (101, 156), (101, 157), (101, 158), (101, 159), (101, 160), (101, 161), (101, 162), (101, 163), (101, 164), (101, 165), (101, 166), (101, 167), (101, 168), (101, 169), (101, 170), (101, 171), (101, 173), (102, 146), (102, 148), (102, 149), (102, 150), (102, 151), (102, 152), (102, 153), (102, 154), (102, 155), (102, 156), (102, 157), (102, 158), (102, 159), (102, 160), (102, 161), (102, 162), (102, 163), (102, 164), (102, 165), (102, 166), (102, 167), (102, 168), (102, 169), (102, 170), (102, 171), (102, 173), (103, 145), (103, 147), (103, 148), (103, 149), (103, 150), (103, 151), (103, 152), (103, 153), (103, 154), (103, 155), (103, 156), (103, 157), (103, 158), (103, 159), (103, 160), (103, 161), (103, 162), (103, 163), (103, 164), (103, 165), (103, 166), (103, 167), (103, 168), (103, 169), (103, 170), (103, 171), (103, 173), (104, 145), (104, 147), (104, 148), (104, 149), (104, 150), (104, 151), (104, 152), (104, 153), (104, 154), (104, 155), (104, 156), (104, 157), (104, 158), (104, 159), (104, 160), (104, 161), (104, 162), (104, 163), (104, 164), (104, 165), (104, 166), (104, 167), (104, 168), (104, 169), (104, 170), (104, 171), (104, 173), (105, 145), (105, 147), (105, 148), (105, 149), (105, 150), (105, 151), (105, 152), (105, 153), (105, 154), (105, 155), (105, 156), (105, 157), (105, 158), (105, 159), (105, 160), (105, 163), (105, 164), (105, 165), (105, 166), (105, 167), (105, 168), (105, 169), (105, 170), (105, 171), (105, 173), (106, 145), (106, 147), (106, 148), (106, 149), (106, 150), (106, 151), (106, 152), (106, 153), (106, 154), (106, 155), (106, 156), (106, 157), (106, 158), (106, 159), (106, 162), (106, 163), (106, 164), (106, 165), (106, 166), (106, 167), (106, 168), (106, 169), (106, 170), (106, 171), (106, 173), (107, 144), (107, 146), (107, 147), (107, 148), (107, 149), (107, 150), (107, 151), (107, 152), (107, 153), (107, 154), (107, 155), (107, 156), (107, 157), (107, 158), (107, 160), (107, 163), (107, 165), (107, 166), (107, 167), (107, 168), (107, 169), (107, 170), (107, 171), (107, 173), (108, 144), (108, 146), (108, 147), (108, 148), (108, 149), (108, 151), (108, 152), (108, 153), (108, 154), (108, 155), (108, 156), (108, 157), (108, 159), (108, 163), (108, 165), (108, 166), (108, 167), (108, 168), (108, 169), (108, 170), (108, 171), (108, 173), (109, 144), (109, 146), (109, 147), (109, 148), (109, 150), (109, 151), (109, 152), (109, 153), (109, 154), (109, 155), (109, 156), (109, 157), (109, 159), (109, 163), (109, 165), (109, 166), (109, 167), (109, 168), (109, 169), (109, 170), (109, 172), (110, 144), (110, 146), (110, 147), (110, 148), (110, 152), (110, 153), (110, 154), (110, 155), (110, 156), (110, 158), (110, 163), (110, 165), (110, 166), (110, 167), (110, 168), (110, 169), (110, 170), (110, 172), (111, 143), (111, 145), (111, 146), (111, 147), (111, 151), (111, 152), (111, 153), (111, 154), (111, 155), (111, 156), (111, 158), (111, 163), (111, 165), (111, 166), (111, 167), (111, 168), (111, 169), (111, 170), (111, 172), (112, 143), (112, 145), (112, 146), (112, 150), (112, 151), (112, 152), (112, 153), (112, 154), (112, 155), (112, 156), (112, 158), (112, 162), (112, 164), (112, 165), (112, 166), (112, 167), (112, 168), (112, 169), (112, 170), (112, 172), (113, 143), (113, 145), (113, 146), (113, 147), (113, 151), (113, 152), (113, 153), (113, 154), (113, 155), (113, 157), (113, 162), (113, 164), (113, 165), (113, 166), (113, 167), (113, 168), (113, 169), (113, 171), (114, 143), (114, 145), (114, 146), (114, 147), (114, 148), (114, 150), (114, 151), (114, 152), (114, 153), (114, 154), (114, 155), (114, 157), (114, 161), (114, 163), (114, 164), (114, 165), (114, 166), (114, 167), (114, 168), (114, 169), (114, 171), (115, 143), (115, 145), (115, 146), (115, 147), (115, 149), (115, 150), (115, 151), (115, 152), (115, 153), (115, 154), (115, 156), (115, 160), (115, 162), (115, 163), (115, 164), (115, 165), (115, 166), (115, 167), (115, 168), (115, 169), (115, 171), (116, 143), (116, 145), (116, 146), (116, 147), (116, 148), (116, 149), (116, 150), (116, 151), (116, 152), (116, 153), (116, 155), (116, 160), (116, 162), (116, 163), (116, 164), (116, 165), (116, 166), (116, 167), (116, 168), (116, 169), (116, 171), (117, 146), (117, 147), (117, 148), (117, 149), (117, 150), (117, 151), (117, 152), (117, 153), (117, 154), (117, 155), (117, 159), (117, 161), (117, 162), (117, 163), (117, 164), (117, 165), (117, 166), (117, 167), (117, 168), (117, 170), (118, 144), (118, 146), (118, 147), (118, 148), (118, 149), (118, 150), (118, 151), (118, 152), (118, 154), (118, 157), (118, 160), (118, 161), (118, 162), (118, 163), (118, 164), (118, 165), (118, 166), (118, 167), (118, 168), (118, 170), (119, 145), (119, 148), (119, 149), (119, 150), (119, 151), (119, 153), (119, 159), (119, 160), (119, 161), (119, 162), (119, 163), (119, 164), (119, 165), (119, 166), (119, 167), (119, 168), (119, 170), (120, 146), (120, 150), (120, 151), (120, 152), (120, 153), (120, 156), (120, 157), (120, 158), (120, 159), (120, 160), (120, 161), (120, 162), (120, 163), (120, 164), (120, 165), (120, 166), (120, 167), (120, 168), (120, 170), (121, 148), (121, 153), (121, 154), (121, 155), (121, 156), (121, 157), (121, 158), (121, 159), (121, 160), (121, 161), (121, 162), (121, 163), (121, 164), (121, 165), (121, 170), (122, 150), (122, 156), (122, 157), (122, 158), (122, 159), (122, 160), (122, 161), (122, 162), (122, 163), (122, 166), (122, 167), (123, 153), (123, 155), (123, 156), (124, 156), (124, 157), (124, 158), (124, 159), (124, 160), (124, 161), (124, 163), ) coordinates_5FCC60 = ((125, 153), (126, 152), (126, 154), (126, 155), (126, 156), (126, 157), (126, 158), (126, 159), (126, 160), (126, 161), (126, 163), (127, 150), (127, 164), (128, 149), (128, 152), (128, 153), (128, 154), (128, 155), (128, 156), (128, 157), (128, 158), (128, 159), (128, 160), (128, 161), (128, 162), (128, 165), (128, 166), (128, 167), (129, 147), (129, 150), (129, 151), (129, 152), (129, 153), (129, 154), (129, 155), (129, 156), (129, 157), (129, 158), (129, 159), (129, 160), (129, 161), (129, 162), (129, 163), (129, 164), (129, 169), (130, 145), (130, 149), (130, 150), (130, 151), (130, 152), (130, 153), (130, 154), (130, 155), (130, 156), (130, 157), (130, 158), (130, 159), (130, 160), (130, 161), (130, 162), (130, 163), (130, 164), (130, 165), (130, 166), (130, 167), (130, 169), (131, 144), (131, 147), (131, 148), (131, 149), (131, 150), (131, 151), (131, 152), (131, 153), (131, 154), (131, 155), (131, 156), (131, 157), (131, 158), (131, 159), (131, 160), (131, 161), (131, 162), (131, 163), (131, 164), (131, 165), (131, 166), (131, 167), (131, 168), (131, 170), (132, 144), (132, 146), (132, 147), (132, 148), (132, 149), (132, 150), (132, 151), (132, 152), (132, 153), (132, 154), (132, 155), (132, 156), (132, 157), (132, 158), (132, 159), (132, 160), (132, 161), (132, 162), (132, 163), (132, 164), (132, 165), (132, 166), (132, 167), (132, 168), (132, 170), (133, 144), (133, 146), (133, 147), (133, 148), (133, 149), (133, 150), (133, 151), (133, 152), (133, 153), (133, 154), (133, 155), (133, 156), (133, 157), (133, 158), (133, 159), (133, 160), (133, 161), (133, 162), (133, 163), (133, 164), (133, 165), (133, 166), (133, 167), (133, 168), (133, 169), (133, 171), (134, 144), (134, 146), (134, 147), (134, 148), (134, 149), (134, 150), (134, 151), (134, 152), (134, 153), (134, 154), (134, 155), (134, 156), (134, 157), (134, 158), (134, 159), (134, 160), (134, 161), (134, 162), (134, 163), (134, 164), (134, 165), (134, 166), (134, 167), (134, 168), (134, 169), (134, 171), (135, 144), (135, 146), (135, 147), (135, 148), (135, 149), (135, 150), (135, 151), (135, 152), (135, 153), (135, 154), (135, 155), (135, 156), (135, 157), (135, 158), (135, 159), (135, 160), (135, 161), (135, 162), (135, 163), (135, 164), (135, 165), (135, 166), (135, 167), (135, 168), (135, 169), (135, 171), (136, 144), (136, 146), (136, 147), (136, 148), (136, 149), (136, 150), (136, 151), (136, 152), (136, 153), (136, 154), (136, 155), (136, 156), (136, 157), (136, 158), (136, 159), (136, 160), (136, 161), (136, 162), (136, 163), (136, 164), (136, 165), (136, 166), (136, 167), (136, 168), (136, 169), (136, 171), (137, 145), (137, 147), (137, 148), (137, 149), (137, 150), (137, 151), (137, 152), (137, 153), (137, 154), (137, 155), (137, 156), (137, 157), (137, 158), (137, 159), (137, 160), (137, 161), (137, 162), (137, 163), (137, 164), (137, 165), (137, 166), (137, 167), (137, 168), (137, 169), (137, 171), (138, 145), (138, 147), (138, 148), (138, 149), (138, 150), (138, 151), (138, 152), (138, 153), (138, 154), (138, 155), (138, 156), (138, 157), (138, 158), (138, 159), (138, 160), (138, 161), (138, 162), (138, 163), (138, 164), (138, 165), (138, 166), (138, 167), (138, 168), (138, 169), (138, 171), (139, 145), (139, 147), (139, 148), (139, 149), (139, 150), (139, 151), (139, 152), (139, 153), (139, 154), (139, 155), (139, 156), (139, 157), (139, 158), (139, 159), (139, 160), (139, 161), (139, 162), (139, 163), (139, 164), (139, 165), (139, 166), (139, 167), (139, 168), (139, 169), (139, 171), (140, 145), (140, 147), (140, 148), (140, 149), (140, 150), (140, 151), (140, 152), (140, 153), (140, 154), (140, 155), (140, 156), (140, 157), (140, 158), (140, 159), (140, 160), (140, 161), (140, 162), (140, 163), (140, 164), (140, 165), (140, 166), (140, 167), (140, 168), (140, 169), (140, 170), (140, 172), (141, 145), (141, 147), (141, 148), (141, 149), (141, 150), (141, 151), (141, 152), (141, 153), (141, 154), (141, 155), (141, 156), (141, 157), (141, 158), (141, 159), (141, 160), (141, 161), (141, 162), (141, 163), (141, 164), (141, 165), (141, 166), (141, 167), (141, 168), (141, 169), (141, 170), (141, 172), (142, 145), (142, 147), (142, 148), (142, 149), (142, 150), (142, 151), (142, 152), (142, 153), (142, 154), (142, 155), (142, 156), (142, 157), (142, 158), (142, 159), (142, 160), (142, 161), (142, 162), (142, 163), (142, 164), (142, 165), (142, 166), (142, 167), (142, 168), (142, 169), (142, 170), (142, 172), (143, 146), (143, 148), (143, 149), (143, 150), (143, 151), (143, 152), (143, 153), (143, 154), (143, 155), (143, 156), (143, 157), (143, 158), (143, 159), (143, 160), (143, 161), (143, 162), (143, 163), (143, 164), (143, 165), (143, 166), (143, 167), (143, 168), (143, 169), (143, 170), (143, 172), (144, 146), (144, 148), (144, 149), (144, 150), (144, 151), (144, 152), (144, 153), (144, 154), (144, 155), (144, 156), (144, 157), (144, 158), (144, 159), (144, 160), (144, 161), (144, 162), (144, 163), (144, 164), (144, 165), (144, 166), (144, 167), (144, 168), (144, 169), (144, 170), (144, 172), (145, 146), (145, 148), (145, 149), (145, 150), (145, 151), (145, 152), (145, 153), (145, 154), (145, 155), (145, 156), (145, 157), (145, 158), (145, 159), (145, 160), (145, 161), (145, 162), (145, 163), (145, 164), (145, 165), (145, 166), (145, 167), (145, 168), (145, 169), (145, 170), (145, 172), (146, 146), (146, 148), (146, 149), (146, 150), (146, 151), (146, 152), (146, 153), (146, 154), (146, 155), (146, 156), (146, 157), (146, 158), (146, 159), (146, 160), (146, 161), (146, 162), (146, 163), (146, 164), (146, 165), (146, 166), (146, 167), (146, 168), (146, 169), (146, 170), (146, 172), (147, 146), (147, 148), (147, 149), (147, 150), (147, 151), (147, 152), (147, 153), (147, 154), (147, 155), (147, 156), (147, 157), (147, 158), (147, 159), (147, 160), (147, 161), (147, 162), (147, 163), (147, 164), (147, 165), (147, 166), (147, 167), (147, 168), (147, 169), (147, 170), (147, 172), (148, 146), (148, 148), (148, 149), (148, 150), (148, 151), (148, 152), (148, 153), (148, 154), (148, 155), (148, 156), (148, 157), (148, 158), (148, 159), (148, 160), (148, 161), (148, 162), (148, 163), (148, 164), (148, 165), (148, 166), (148, 167), (148, 168), (148, 169), (148, 170), (148, 172), (149, 146), (149, 148), (149, 149), (149, 150), (149, 151), (149, 152), (149, 153), (149, 154), (149, 155), (149, 156), (149, 157), (149, 158), (149, 159), (149, 160), (149, 161), (149, 162), (149, 163), (149, 164), (149, 165), (149, 166), (149, 167), (149, 168), (149, 169), (149, 171), (150, 146), (150, 148), (150, 149), (150, 150), (150, 151), (150, 152), (150, 153), (150, 154), (150, 155), (150, 156), (150, 157), (150, 158), (150, 159), (150, 160), (150, 161), (150, 162), (150, 163), (150, 164), (150, 165), (150, 166), (150, 167), (150, 168), (150, 170), (151, 146), (151, 148), (151, 149), (151, 150), (151, 151), (151, 152), (151, 153), (151, 154), (151, 155), (151, 156), (151, 157), (151, 158), (151, 159), (151, 160), (151, 161), (151, 162), (151, 163), (151, 164), (151, 165), (151, 166), (151, 167), (151, 169), (152, 146), (152, 148), (152, 149), (152, 150), (152, 151), (152, 152), (152, 153), (152, 154), (152, 155), (152, 156), (152, 157), (152, 158), (152, 159), (152, 160), (152, 161), (152, 162), (152, 163), (152, 164), (152, 165), (152, 166), (152, 168), (153, 146), (153, 148), (153, 149), (153, 150), (153, 151), (153, 152), (153, 153), (153, 154), (153, 155), (153, 156), (153, 157), (153, 158), (153, 159), (153, 160), (153, 161), (153, 162), (153, 163), (153, 164), (153, 165), (153, 167), (154, 148), (154, 150), (154, 151), (154, 152), (154, 153), (154, 154), (154, 155), (154, 156), (154, 157), (154, 158), (154, 159), (154, 160), (154, 161), (154, 162), (154, 163), (154, 164), (154, 165), (154, 167), (155, 148), (155, 150), (155, 151), (155, 152), (155, 153), (155, 154), (155, 155), (155, 156), (155, 157), (155, 158), (155, 159), (155, 160), (155, 161), (155, 162), (155, 163), (155, 164), (155, 165), (155, 167), (156, 148), (156, 150), (156, 151), (156, 152), (156, 153), (156, 154), (156, 155), (156, 156), (156, 157), (156, 158), (156, 159), (156, 160), (156, 161), (156, 162), (156, 163), (156, 164), (156, 165), (156, 167), (157, 148), (157, 150), (157, 151), (157, 152), (157, 153), (157, 154), (157, 155), (157, 156), (157, 157), (157, 158), (157, 159), (157, 160), (157, 161), (157, 162), (157, 163), (157, 164), (157, 165), (157, 167), (158, 150), (158, 151), (158, 152), (158, 153), (158, 154), (158, 155), (158, 156), (158, 157), (158, 158), (158, 159), (158, 160), (158, 161), (158, 162), (158, 163), (158, 164), (158, 165), (158, 167), (159, 148), (159, 151), (159, 152), (159, 153), (159, 154), (159, 155), (159, 156), (159, 157), (159, 158), (159, 159), (159, 160), (159, 161), (159, 162), (159, 163), (159, 164), (159, 166), (160, 149), (160, 152), (160, 153), (160, 154), (160, 155), (160, 156), (160, 157), (160, 158), (160, 159), (160, 160), (160, 161), (160, 162), (160, 163), (160, 165), (161, 151), (161, 153), (161, 154), (161, 155), (161, 156), (161, 159), (161, 160), (161, 161), (161, 164), (162, 152), (162, 154), (162, 155), (162, 158), (162, 163), (163, 153), (163, 156), (163, 159), (163, 161), (164, 155), (165, 154), ) coordinates_F4DEB3 = ((129, 79), (130, 79), (131, 79), (131, 82), (131, 85), (132, 80), (132, 83), (132, 85), (133, 80), (133, 83), (133, 84), (133, 86), (133, 94), (134, 81), (134, 82), (134, 86), (134, 87), (134, 97), (135, 87), (135, 88), (135, 94), (135, 97), (136, 94), (136, 97), (137, 88), (137, 89), (137, 94), (137, 97), (138, 87), (138, 89), (138, 94), (138, 97), (139, 86), (139, 88), (139, 95), (139, 97), (140, 84), (140, 95), (141, 84), (141, 96), (142, 81), (142, 84), (143, 81), (143, 84), (144, 81), (144, 83), (144, 84), (144, 85), (144, 88), (144, 90), (144, 91), (144, 92), (145, 82), (145, 87), (145, 88), (145, 89), (145, 91), (146, 83), (146, 85), (147, 85), ) coordinates_26408B = ((123, 90), (123, 92), (123, 93), (123, 94), (123, 95), (123, 96), (123, 97), (123, 98), (123, 99), (124, 88), (124, 99), (124, 100), (124, 101), (124, 102), (124, 103), (124, 104), (124, 105), (124, 107), (125, 87), (125, 90), (125, 91), (125, 93), (125, 94), (125, 95), (125, 96), (125, 97), (125, 98), (125, 99), (125, 107), (126, 86), (126, 88), (126, 89), (126, 90), (126, 91), (126, 94), (126, 95), (126, 96), (126, 97), (126, 98), (126, 99), (126, 100), (126, 101), (126, 102), (126, 103), (126, 104), (126, 105), (126, 107), (127, 80), (127, 84), (127, 87), (127, 88), (127, 89), (127, 91), (127, 95), (127, 97), (127, 98), (127, 99), (127, 100), (127, 101), (127, 102), (127, 103), (127, 104), (127, 106), (128, 80), (128, 82), (128, 90), (128, 95), (128, 97), (128, 98), (128, 99), (128, 100), (128, 101), (128, 106), (129, 81), (129, 83), (129, 84), (129, 85), (129, 86), (129, 87), (129, 88), (129, 90), (129, 94), (129, 103), (129, 105), (130, 94), (130, 96), (130, 97), (130, 98), (130, 99), (130, 100), (130, 101), (131, 94), ) coordinates_F5DEB3 = ((94, 106), (95, 104), (96, 103), (97, 102), (99, 100), (100, 82), (100, 84), (100, 99), (101, 81), (101, 85), (101, 96), (101, 98), (102, 81), (102, 83), (102, 85), (102, 90), (102, 92), (102, 93), (102, 94), (102, 95), (102, 97), (103, 81), (103, 83), (103, 85), (103, 89), (104, 80), (104, 82), (104, 83), (104, 84), (104, 86), (104, 89), (104, 91), (105, 80), (105, 82), (105, 85), (105, 90), (106, 80), (106, 82), (106, 84), (106, 86), (106, 90), (107, 79), (107, 81), (107, 82), (107, 87), (107, 88), (107, 90), (108, 79), (108, 82), (108, 86), (108, 88), (108, 89), (108, 91), (109, 79), (109, 82), (109, 87), (109, 89), (109, 91), (110, 78), (110, 80), (110, 82), (110, 88), (110, 91), (111, 78), (111, 80), (111, 82), (111, 89), (111, 91), (112, 78), (112, 81), (112, 91), (113, 78), (113, 80), (113, 91), (114, 79), (114, 91), ) coordinates_016400 = ((123, 130), (123, 133), (124, 130), (124, 132), (124, 134), (125, 134), (125, 136), (126, 134), (126, 137), (126, 139), (127, 133), (127, 135), (127, 136), (128, 133), (128, 135), (128, 136), (128, 137), (128, 138), (128, 140), (129, 133), (129, 135), (129, 136), (129, 137), (129, 138), (129, 140), (130, 133), (130, 135), (130, 136), (130, 137), (130, 139), (130, 141), (131, 133), (131, 135), (131, 136), (131, 139), (131, 140), (131, 142), (132, 133), (132, 135), (132, 137), (132, 140), (132, 142), (133, 133), (133, 136), (133, 140), (133, 142), (134, 133), (134, 136), (134, 140), (134, 142), (135, 132), (135, 135), (135, 140), (135, 142), (136, 131), (136, 134), (136, 135), (136, 139), (136, 142), (137, 130), (137, 133), (137, 138), (137, 140), (137, 142), (138, 130), (138, 131), (138, 137), (138, 139), (138, 140), (138, 141), (138, 142), (138, 143), (139, 136), (139, 138), (139, 139), (139, 140), (139, 141), (139, 143), (140, 136), (140, 141), (140, 143), (141, 136), (141, 138), (141, 139), (141, 140), (141, 141), (141, 143), (142, 136), (142, 137), (142, 141), (142, 143), (143, 141), (143, 143), (144, 140), (144, 143), (145, 139), (145, 144), (146, 137), (146, 139), (146, 140), (146, 141), (146, 142), (146, 144), ) coordinates_CC5B45 = ((146, 93), (147, 87), (147, 89), (147, 90), (147, 91), (147, 95), (147, 97), (148, 87), (148, 93), (149, 87), (149, 89), (149, 90), (149, 91), (149, 94), (149, 97), (150, 87), (150, 89), (150, 91), (150, 96), (151, 87), (151, 89), (151, 90), (151, 92), (152, 87), (152, 93), (153, 88), (153, 90), (153, 91), (153, 93), (154, 94), (155, 93), (155, 95), (156, 93), (156, 96), (157, 94), (157, 96), (158, 95), ) coordinates_27408B = ((104, 102), (104, 103), (105, 100), (105, 102), (106, 99), (106, 101), (107, 97), (107, 101), (108, 99), (108, 101), (109, 96), (109, 98), (109, 99), (109, 101), (110, 95), (110, 97), (110, 98), (110, 99), (110, 101), (111, 95), (111, 97), (111, 98), (111, 99), (111, 100), (111, 102), (112, 84), (112, 95), (112, 100), (112, 102), (113, 83), (113, 85), (113, 96), (113, 98), (113, 99), (113, 100), (113, 102), (114, 82), (114, 84), (114, 86), (114, 96), (114, 100), (114, 101), (115, 81), (115, 86), (115, 100), (115, 101), (116, 84), (116, 87), (116, 100), (117, 85), (117, 88), (117, 100), (118, 86), (118, 88), (118, 100), (119, 87), (119, 93), (119, 94), (119, 96), (119, 100), (120, 88), (120, 91), (120, 98), (120, 100), (121, 92), (121, 93), (121, 94), (121, 95), (121, 96), (121, 97), (121, 98), (121, 99), (121, 101), (122, 101), ) coordinates_006400 = ((106, 135), (106, 140), (107, 135), (107, 136), (107, 140), (107, 142), (108, 128), (108, 129), (108, 135), (108, 136), (108, 140), (108, 142), (109, 127), (109, 130), (109, 135), (109, 136), (109, 140), (109, 141), (110, 127), (110, 130), (110, 135), (110, 141), (111, 127), (111, 130), (111, 135), (111, 139), (111, 141), (112, 127), (112, 128), (112, 131), (112, 135), (112, 137), (112, 139), (112, 141), (113, 128), (113, 131), (113, 135), (113, 137), (113, 138), (113, 139), (113, 141), (114, 128), (114, 131), (114, 136), (114, 138), (114, 141), (115, 128), (115, 130), (115, 132), (115, 136), (116, 128), (116, 130), (116, 131), (116, 132), (116, 137), (116, 139), (117, 127), (117, 129), (117, 130), (117, 131), (117, 132), (117, 133), (117, 136), (117, 138), (118, 125), (118, 128), (118, 129), (118, 130), (118, 131), (118, 132), (118, 135), (118, 137), (119, 125), (119, 127), (119, 128), (119, 129), (119, 130), (119, 131), (119, 132), (119, 136), (120, 125), (120, 133), (120, 135), (121, 119), (121, 121), (121, 124), (121, 125), (121, 126), (121, 127), (121, 128), (121, 129), (121, 130), (121, 131), (121, 132), ) coordinates_CD5B45 = ((75, 105), (75, 106), (76, 104), (76, 106), (77, 103), (77, 106), (78, 102), (78, 104), (78, 106), (79, 102), (79, 104), (79, 106), (80, 101), (80, 103), (80, 104), (80, 106), (81, 100), (81, 102), (81, 103), (81, 104), (81, 106), (82, 98), (82, 101), (82, 102), (82, 103), (82, 104), (82, 106), (83, 97), (83, 100), (83, 106), (84, 96), (84, 99), (84, 101), (84, 102), (84, 103), (84, 104), (84, 106), (85, 95), (85, 97), (85, 99), (85, 106), (86, 94), (86, 96), (86, 97), (86, 99), (87, 90), (87, 92), (87, 93), (87, 95), (87, 96), (87, 97), (87, 99), (88, 89), (88, 94), (88, 95), (88, 96), (88, 97), (88, 99), (89, 91), (89, 92), (89, 93), (89, 94), (89, 95), (89, 96), (89, 98), (89, 105), (90, 88), (90, 90), (90, 91), (90, 92), (90, 93), (90, 94), (90, 95), (90, 96), (90, 98), (90, 105), (91, 87), (91, 89), (91, 90), (91, 91), (91, 92), (91, 93), (91, 94), (91, 95), (91, 98), (91, 103), (91, 105), (92, 86), (92, 88), (92, 89), (92, 90), (92, 91), (92, 92), (92, 93), (92, 94), (92, 97), (92, 102), (92, 106), (93, 86), (93, 88), (93, 89), (93, 90), (93, 91), (93, 92), (93, 95), (93, 101), (93, 104), (94, 85), (94, 87), (94, 88), (94, 89), (94, 90), (94, 91), (94, 94), (94, 100), (94, 103), (95, 85), (95, 87), (95, 88), (95, 89), (95, 90), (95, 92), (95, 99), (95, 102), (96, 85), (96, 87), (96, 88), (96, 89), (96, 91), (96, 98), (96, 101), (97, 85), (97, 87), (97, 88), (97, 89), (97, 90), (97, 91), (97, 97), (97, 100), (98, 85), (98, 88), (98, 89), (98, 90), (98, 91), (98, 92), (98, 93), (98, 94), (98, 95), (98, 99), (99, 86), (99, 97), (100, 88), (100, 90), (100, 91), (100, 92), (100, 93), (100, 94), ) coordinates_6395ED = ((124, 125), (124, 128), (125, 125), (125, 128), (126, 124), (126, 126), (126, 128), (127, 124), (127, 126), (127, 127), (127, 129), (128, 124), (128, 126), (128, 127), (128, 129), (129, 124), (129, 126), (129, 127), (129, 129), (130, 124), (130, 126), (130, 127), (130, 129), (131, 124), (131, 126), (131, 128), (132, 124), (132, 126), (132, 128), (133, 124), (133, 127), (134, 125), (134, 127), (135, 125), (136, 125), (136, 126), ) coordinates_00FFFE = ((148, 138), (148, 140), (148, 141), (148, 142), (148, 144), (149, 144), (150, 139), (150, 141), (150, 142), (150, 144), (151, 139), (151, 141), (151, 142), (151, 144), (152, 138), (152, 142), (152, 144), (153, 137), (153, 139), (153, 140), (153, 141), (153, 144), (154, 142), (154, 144), (155, 143), ) coordinates_F98072 = ((123, 124), (124, 109), (124, 111), (124, 112), (124, 115), (124, 116), (124, 117), (124, 118), (124, 119), (124, 120), (124, 121), (124, 123), (125, 109), (125, 110), (125, 116), (125, 122), (126, 109), (126, 110), (126, 117), (126, 121), (127, 109), (127, 110), (127, 118), (128, 108), (128, 110), (128, 111), (129, 108), (129, 110), (129, 114), (130, 110), (130, 111), (130, 112), (130, 115), (131, 103), (131, 105), (131, 108), (131, 111), (131, 112), (131, 113), (131, 115), (132, 102), (132, 106), (132, 110), (132, 112), (132, 113), (132, 114), (132, 116), (133, 102), (133, 105), (133, 111), (133, 113), (133, 114), (133, 116), (134, 102), (134, 104), (134, 112), (134, 114), (134, 115), (134, 117), (135, 112), (135, 115), (135, 117), (136, 113), (136, 117), (137, 114), (137, 117), ) coordinates_97FB98 = ((154, 129), (155, 128), (155, 129), (155, 137), (155, 140), (156, 128), (156, 129), (156, 137), (156, 142), (157, 127), (157, 129), (157, 138), (157, 140), (157, 143), (158, 126), (158, 128), (158, 138), (158, 140), (158, 142), (159, 128), (159, 134), (159, 136), (159, 137), (159, 138), (159, 139), (159, 140), (159, 142), (160, 125), (160, 127), (160, 132), (160, 138), (160, 139), (160, 140), (160, 142), (161, 121), (161, 125), (161, 127), (161, 132), (161, 134), (161, 135), (161, 136), (161, 137), (161, 138), (161, 139), (161, 140), (161, 142), (162, 121), (162, 125), (162, 126), (162, 132), (162, 134), (162, 135), (162, 136), (162, 137), (162, 138), (162, 139), (162, 140), (162, 142), (163, 125), (163, 126), (163, 131), (163, 133), (163, 134), (163, 135), (163, 136), (163, 137), (163, 138), (163, 139), (163, 140), (163, 142), (164, 120), (164, 124), (164, 126), (164, 131), (164, 133), (164, 135), (164, 136), (164, 137), (164, 138), (164, 139), (164, 141), (165, 120), (165, 124), (165, 125), (165, 130), (165, 132), (165, 136), (165, 137), (165, 138), (165, 139), (165, 141), (166, 120), (166, 122), (166, 125), (166, 130), (166, 132), (166, 137), (166, 138), (166, 139), (166, 141), (167, 119), (167, 121), (167, 124), (167, 125), (167, 129), (167, 132), (167, 136), (167, 141), (168, 119), (168, 121), (168, 122), (168, 123), (168, 124), (168, 125), (168, 126), (168, 127), (168, 132), (168, 137), (168, 140), (169, 119), (169, 121), (169, 122), (169, 123), (169, 124), (169, 125), (169, 126), (169, 131), (170, 119), (170, 127), (170, 129), (171, 120), (171, 122), (171, 123), (171, 124), (171, 125), (171, 126), ) coordinates_323287 = ((149, 100), (149, 106), (150, 102), (150, 103), (150, 104), (150, 107), (151, 98), (151, 100), (151, 101), (151, 104), (151, 109), (152, 107), (152, 110), (153, 107), (153, 109), (153, 112), (153, 113), (153, 128), (154, 100), (154, 101), (154, 108), (154, 110), (154, 115), (155, 98), (155, 100), (155, 102), (155, 108), (155, 110), (155, 111), (155, 112), (155, 114), (156, 98), (156, 100), (156, 102), (156, 108), (156, 110), (156, 111), (156, 113), (157, 98), (157, 100), (157, 102), (157, 108), (157, 112), (158, 98), (158, 100), (158, 102), (158, 108), (158, 111), (159, 98), (159, 102), (160, 100), (160, 102), (160, 119), (161, 101), (161, 103), (161, 119), (162, 101), (162, 103), (162, 118), (162, 119), (163, 102), (163, 105), (163, 106), (163, 107), (163, 108), (163, 110), (163, 117), (164, 103), (164, 111), (164, 117), (164, 118), (165, 103), (165, 105), (165, 106), (165, 107), (165, 108), (165, 109), (165, 112), (165, 116), (165, 118), (166, 104), (166, 106), (166, 107), (166, 108), (166, 109), (166, 110), (166, 111), (166, 113), (166, 114), (166, 117), (167, 104), (167, 107), (167, 108), (167, 109), (167, 110), (167, 111), (167, 112), (167, 117), (168, 105), (168, 110), (168, 111), (168, 115), (168, 117), (169, 107), (169, 109), (169, 112), (169, 113), (169, 114), (170, 110), (170, 111), ) coordinates_6495ED = ((108, 120), (108, 122), (109, 118), (109, 122), (110, 117), (110, 121), (111, 116), (111, 119), (111, 120), (111, 121), (112, 116), (112, 118), (112, 120), (113, 115), (113, 117), (113, 118), (113, 120), (114, 114), (114, 119), (115, 113), (115, 114), (115, 119), (116, 113), (116, 114), (116, 117), (116, 119), (117, 114), (117, 117), (117, 119), (118, 114), (118, 117), (118, 119), (119, 115), (119, 118), (120, 115), (120, 117), (121, 115), (121, 117), ) coordinates_01FFFF = ((92, 140), (93, 140), (93, 142), (93, 143), (93, 145), (94, 141), (94, 145), (95, 142), (95, 145), (96, 142), (96, 145), (97, 141), (97, 143), (97, 145), (98, 137), (98, 139), (98, 140), (98, 142), (98, 143), (98, 145), (99, 136), (99, 143), (99, 145), (100, 135), (100, 137), (100, 140), (100, 141), (100, 142), (100, 144), (101, 135), (101, 138), (101, 144), (102, 135), (102, 137), (102, 143), (103, 135), (103, 136), (103, 143), (104, 135), (104, 142), (104, 143), (105, 143), ) coordinates_FA8072 = ((102, 106), (102, 108), (103, 106), (103, 108), (104, 105), (104, 108), (105, 104), (105, 106), (105, 108), (106, 104), (106, 106), (106, 108), (107, 103), (107, 105), (107, 106), (107, 108), (108, 103), (108, 105), (108, 106), (108, 108), (109, 103), (109, 105), (109, 106), (109, 108), (109, 111), (110, 104), (110, 106), (110, 107), (110, 108), (110, 109), (110, 112), (111, 104), (111, 106), (111, 107), (111, 108), (111, 111), (112, 104), (112, 106), (112, 110), (113, 104), (113, 107), (113, 108), (114, 104), (114, 106), (115, 103), (115, 105), (116, 102), (116, 104), (117, 102), (117, 104), (118, 102), (118, 104), (119, 102), (119, 104), (119, 110), (120, 103), (120, 105), (120, 109), (120, 113), (121, 103), (121, 105), (121, 109), (121, 110), (121, 111), (121, 113), (122, 103), ) coordinates_98FB98 = ((77, 135), (77, 137), (77, 138), (77, 139), (77, 140), (78, 136), (78, 141), (78, 143), (79, 136), (79, 138), (79, 139), (79, 145), (80, 136), (80, 138), (80, 139), (80, 140), (80, 141), (80, 142), (80, 143), (80, 147), (81, 136), (81, 139), (81, 143), (81, 145), (81, 148), (82, 136), (82, 139), (82, 143), (82, 145), (82, 146), (82, 148), (83, 136), (83, 138), (83, 139), (83, 144), (83, 145), (83, 146), (83, 147), (83, 149), (84, 136), (84, 138), (84, 139), (84, 141), (84, 142), (84, 144), (84, 145), (84, 146), (84, 148), (85, 135), (85, 137), (85, 139), (85, 144), (85, 146), (85, 148), (86, 135), (86, 137), (86, 139), (86, 144), (86, 146), (86, 148), (87, 135), (87, 137), (87, 139), (87, 144), (87, 147), (88, 135), (88, 139), (88, 144), (88, 147), (89, 135), (89, 137), (89, 141), (89, 143), (89, 147), (90, 135), (90, 136), (90, 141), (90, 143), (90, 144), (90, 145), (90, 147), ) coordinates_FEC0CB = ((132, 100), (133, 99), (133, 100), (134, 99), (135, 99), (136, 99), (137, 99), (137, 100), (138, 99), (139, 99), (139, 101), (140, 99), (141, 101), (141, 104), (141, 109), (141, 110), (142, 99), (142, 102), (142, 105), (142, 106), (142, 107), (142, 108), (142, 112), (143, 100), (143, 103), (143, 104), (143, 109), (143, 110), (143, 112), (144, 102), (144, 104), (144, 105), (144, 106), (144, 107), (144, 108), (144, 109), (144, 111), (145, 103), (145, 105), (145, 106), (145, 107), (145, 108), (145, 109), (145, 111), (146, 103), (146, 104), (146, 107), (146, 108), (146, 110), (147, 99), (147, 101), (147, 105), (147, 106), (147, 110), (148, 102), (148, 104), (148, 107), (148, 110), (149, 109), (149, 111), (150, 110), (150, 112), (150, 125), (151, 112), (151, 114), (151, 126), ) coordinates_333287 = ((73, 119), (73, 121), (73, 122), (73, 123), (73, 124), (73, 126), (74, 110), (74, 112), (74, 114), (74, 118), (74, 127), (74, 128), (75, 108), (75, 116), (75, 117), (75, 119), (75, 120), (75, 121), (75, 122), (75, 123), (75, 124), (75, 125), (75, 126), (75, 129), (76, 108), (76, 110), (76, 111), (76, 114), (76, 118), (76, 119), (76, 120), (76, 121), (76, 122), (76, 123), (76, 124), (76, 125), (76, 126), (76, 127), (76, 128), (76, 131), (77, 108), (77, 110), (77, 111), (77, 112), (77, 113), (77, 116), (77, 117), (77, 118), (77, 119), (77, 120), (77, 121), (77, 122), (77, 123), (77, 124), (77, 125), (77, 126), (77, 127), (77, 133), (78, 108), (78, 111), (78, 117), (78, 118), (78, 119), (78, 120), (78, 121), (78, 122), (78, 123), (78, 124), (78, 125), (78, 126), (78, 127), (78, 129), (78, 131), (79, 108), (79, 111), (79, 117), (79, 118), (79, 119), (79, 120), (79, 121), (79, 122), (79, 123), (79, 124), (79, 125), (79, 127), (79, 131), (79, 134), (80, 108), (80, 111), (80, 116), (80, 118), (80, 119), (80, 120), (80, 121), (80, 122), (80, 123), (80, 124), (80, 125), (80, 126), (80, 127), (80, 131), (80, 134), (81, 108), (81, 111), (81, 117), (81, 119), (81, 120), (81, 121), (81, 122), (81, 123), (81, 124), (81, 126), (81, 131), (81, 134), (82, 108), (82, 110), (82, 118), (82, 120), (82, 121), (82, 122), (82, 123), (82, 124), (82, 126), (82, 131), (82, 132), (82, 134), (83, 108), (83, 109), (83, 118), (83, 120), (83, 121), (83, 122), (83, 123), (83, 124), (83, 126), (83, 131), (83, 134), (84, 119), (84, 121), (84, 122), (84, 123), (84, 124), (84, 126), (84, 131), (84, 133), (85, 120), (85, 122), (85, 123), (85, 124), (85, 126), (85, 131), (85, 133), (86, 121), (86, 125), (86, 131), (86, 133), (87, 122), (87, 124), (87, 131), (87, 133), (88, 112), (88, 114), (88, 131), (88, 133), (89, 107), (89, 112), (89, 115), (89, 132), (89, 133), (90, 107), (90, 108), (90, 112), (90, 113), (90, 114), (90, 133), (91, 109), (91, 112), (91, 113), (91, 114), (91, 115), (91, 118), (92, 108), (92, 110), (92, 113), (92, 114), (92, 115), (92, 116), (92, 118), (93, 110), (93, 111), (93, 112), (93, 116), (93, 118), (94, 114), (94, 115), (94, 118), (95, 118), ) coordinates_FFC0CB = ((94, 108), (95, 111), (96, 112), (96, 113), (96, 114), (96, 115), (97, 116), (97, 118), (98, 115), (98, 118), (99, 115), (99, 118), (100, 115), (100, 117), (100, 118), )
books = input().split("&") while True: commands = input().split(" | ") if commands[0] == "Done": print(", ".join(books)) break elif commands[0] == "Add Book": book_name = commands[1] if book_name not in books: ins = books.insert(0, book_name) else: continue elif commands[0] == "Take Book": books_names = commands[1] if books_names in books: rem = books.remove(books_names) else: continue elif commands[0] == "Swap Books": book1 = commands[1] book2 = commands[2] if book1 in books and book2 in books: idx1 = books.index(book1) idx2 = books.index(book2) rev = books[idx1], books[idx2] = books[idx2], books[idx1] else: continue elif commands[0] == "Insert Book": app_name_book = commands[1] append = books.append(app_name_book) elif commands[0] == "Check Book": index_book = int(commands[1]) if index_book >= 0 and index_book <= len(books): print(books[index_book]) else: continue
'''Crie um programa que leia duas notas de uma aluno e calcule sua média, mostrando uma mensagem no final, de acordo com a média atingida: -Média abaixo de 5.0: REPROVADO; -Média entre 5.0 e 6.9: RECUPERAÇÃO; -Média 7.0 ou superior: APROVADO''' nome = str(input('Qual o nome do aluno?: ')).strip().capitalize() na1 = float(input('Digite a nota da primeira avaliação: ')) na2 = float(input('Digite a nota da segunda avaliação: ')) na3 = float(input('Digite a nota da terceira avaliação: ')) na4 = float(input('Digite a nota da quarta avaliação: ')) np = float(input('Digite a nota da prova final: ')) mf = (np * 60/100) + (((na1 + na2 + na3 + na4) / 4) * 40/100) if mf >= 7: print('Parabéns {}! você foi \033[34mAPROVADO\033[m com Média Final {:.1f}.'.format(nome, mf)) elif 5 <= mf and mf <= 6.9: print('{}, você está na \033[35mRECUPERAÇÃO\033[m com Média Final {:.1f}.'.format(nome, mf)) else: print('Que pena {}, você foi \033[31mREPROVADO\033[m com Média Final {:.1f}.'.format(nome, mf))
''' This utility is for Custom Exceptions. a) Stop_Test_Exception You can raise a generic exceptions using just a string. This is particularly useful when you want to end a test midway based on some condition. ''' class Stop_Test_Exception(Exception): def __init__(self,message): self.message=message def __str__(self): return self.message
class Node: def __init__(self, value): self.val = value self.next = self.prev = None class MyLinkedList(object): def __init__(self): self.__head = self.__tail = Node(-1) self.__head.next = self.__tail self.__tail.prev = self.__head self.__size = 0 def get(self, index): if 0 <= index <= self.__size // 2: return self.__forward(0, index, self.__head.next).val elif self.__size // 2 < index < self.__size: return self.__backward(self.__size, index, self.__tail).val return -1 def addAtHead(self, val): self.__add(self.__head, val) def addAtTail(self, val): self.__add(self.__tail.prev, val) def addAtIndex(self, index, val): if 0 <= index <= self.__size // 2: self.__add(self.__forward(0, index, self.__head.next).prev, val) elif self.__size // 2 < index <= self.__size: self.__add(self.__backward(self.__size, index, self.__tail).prev, val) def deleteAtIndex(self, index): if 0 <= index <= self.__size // 2: self.__remove(self.__forward(0, index, self.__head.next)) elif self.__size // 2 < index < self.__size: self.__remove(self.__backward(self.__size, index, self.__tail)) def __add(self, preNode, val): node = Node(val) node.prev = preNode node.next = preNode.next node.prev.next = node.next.prev = node self.__size += 1 def __remove(self, node): node.prev.next = node.next node.next.prev = node.prev self.__size -= 1 def __forward(self, start, end, curr): while start != end: start += 1 curr = curr.next return curr def __backward(self, start, end, curr): while start != end: start -= 1 curr = curr.prev return curr
class NotFound(Exception): pass class HTTPError(Exception): pass
#!/usr/bin/env python """Common constants.""" IO_CHUNK_SIZE = 128
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'liyiqun' # microsrv_linkstat_url = 'http://127.0.0.1:32769/microsrv/link_stat' # microsrv_linkstat_url = 'http://127.0.0.1:33710/microsrv/link_stat' # microsrv_linkstat_url = 'http://10.9.63.208:7799/microsrv/ms_link/link/links' # microsrv_linkstat_url = 'http://219.141.189.72:10000/link/links' # microsrv_topo_url = 'http://10.9.63.208:7799/microsrv/ms_topo/' # microsrv_topo_url = 'http://127.0.0.1:33769/microsrv/topo' # microsrv_topo_url = 'http://127.0.0.1:33710/microsrv/topo' # microsrv_topo_url = 'http://10.9.63.208:7799/microsrv/ms_topo/' # microsrv_cust_url = 'http://10.9.63.208:7799/microsrv/ms_cust/' # microsrv_cust_url = 'http://127.0.0.1:33771/' # microsrv_cust_url = 'http://127.0.0.1:33710/microsrv/customer' # microsrv_flow_url = 'http://10.9.63.208:7799/microsrv/ms_flow/flow' # microsrv_flow_url = 'http://219.141.189.72:10001/flow' # microsrv_flow_url = 'http://127.0.0.1:32769/microsrv/flow' # microsrv_flow_url = 'http://127.0.0.1:33710/microsrv/flow' # microsrv_tunnel_url = 'http://10.9.63.208:7799/microsrv/ms_tunnel/' # microsrv_tunnel_url = 'http://127.0.0.1:33770/' # microsrv_tunnel_url = 'http://127.0.0.1:33710/microsrv/tunnel' # microsrv_controller_url = 'http://10.9.63.208:7799/microsrv/ms_controller/' # microsrv_controller_url = 'http://10.9.63.140:12727/' # microsrv_controller_url = 'http://127.0.0.1:33710/microsrv/controller' # te_topo_man_url = 'http://127.0.0.1:32769' # te_topo_man_url = 'http://10.9.63.208:7799/topo/' # te_flow_man_url = 'http://127.0.0.1:32770' # te_customer_man_url = 'http://127.0.0.1:32771' # te_lsp_man_url = 'http://127.0.0.1:32772' # te_lsp_man_url = 'http://10.9.63.208:7799/lsp/' # te_flow_sched_url = 'http://127.0.0.1:32773' te_flow_rest_port = 34770 te_sched_rest_port = 34773 te_protocol = 'http://' te_host_port_divider = ':' openo_ms_url_prefix = '/openoapi/microservices/v1/services' openo_dm_url_prefix = '/openoapi/drivermgr/v1/drivers' openo_esr_url_prefix = '/openoapi/extsys/v1/sdncontrollers' openo_brs_url_prefix = '/openoapi/sdnobrs/v1' #driver controller url microsrv_juniper_controller_host = "https://219.141.189.67:8443" # microsrv_zte_controller_host = "http://219.141.189.70:8181" microsrv_zte_controller_host = "http://127.0.0.1:33710" microsrv_alu_controller_host = "http://219.141.189.68" microsrvurl_dict = { 'openo_ms_url':'http://127.0.0.1:8086/openoapi/microservices/v1/services', 'openo_dm_url':'http://127.0.0.1:8086/openoapi/drivermgr/v1/drivers', # Get SDN Controller by id only need this Method:GET # /openoapi/extsys/v1/sdncontrollers/{sdnControllerId} 'openo_esr_url':'http://127.0.0.1:8086/openoapi/extsys/v1/sdncontrollers', # get: summary: query ManagedElement 'openo_brs_url':'http://127.0.0.1:8086/openoapi/sdnobrs/v1', 'te_topo_rest_port':8610, 'te_cust_rest_port':8600, 'te_lsp_rest_port':8620, 'te_driver_rest_port':8670, 'te_msb_rest_port':8086, 'te_msb_rest_host':'127.0.0.1', 'te_topo_rest_host':'127.0.0.1', 'te_cust_rest_host':'127.0.0.1', 'te_lsp_rest_host':'127.0.0.1', 'te_driver_rest_host':'127.0.0.1', 'microsrv_linkstat_url': 'http://127.0.0.1:33710/microsrv/link_stat', 'microsrv_topo_url': 'http://127.0.0.1:33710/microsrv/topo', 'microsrv_cust_url': 'http://127.0.0.1:33710/microsrv/customer', 'microsrv_flow_url': 'http://127.0.0.1:33710/microsrv/flow', 'microsrv_tunnel_url': 'http://127.0.0.1:33710/microsrv/tunnel', 'microsrv_controller_url': 'http://127.0.0.1:33710/microsrv/controller', 'te_topo_man_url': 'http://127.0.0.1:32769', 'te_flow_man_url': 'http://127.0.0.1:32770', 'te_customer_man_url': 'http://127.0.0.1:32771', 'te_lsp_man_url': 'http://127.0.0.1:32772', 'te_flow_sched_url': 'http://127.0.0.1:32773' }