content
stringlengths
7
1.05M
cidade = 'São francisco' cidade2 = 'santo antonio' cidade2 = cidade2.split() print('santo' == cidade[0]) print('santo' == cidade2[0]) #solucao professor cid = str(input('digite o nome de sua cidade')).strip() print(cid[:5].upper() == 'SANTO')
class AdditionExpression: def __init__(self, left, right): self.right = right self.left = left def print(self, buffer): buffer.append('(') self.left.print(buffer) buffer.append('+') self.right.print(buffer) buffer.append(')') def eval(self): return self.left.eval() + self.right.eval()
''' 3. Swap string variable values fname = "rahul" lname = "dravid" Swap the value of variable with fname & fname with lname Output:: print(fname) # dravid print(lname) # rahul ''' fname = "rahul" lname = "dravid" #fname.swap(lname) #lname.swap(fname) fname="dravid" lname="rahul" print(fname) print(lname) print('-------------------------------------') fname = "rahul" lname = "dravid" fname, lname = lname, fname print(fname) print(lname)
{ 'includes': [ '../common.gypi', '../config.gypi', ], 'targets': [ { 'target_name': 'linuxapp', 'product_name': 'mapbox-gl', 'type': 'executable', 'sources': [ './main.cpp', '../common/settings_json.cpp', '../common/settings_json.hpp', '../common/platform_default.cpp', '../common/glfw_view.hpp', '../common/glfw_view.cpp', '../common/curl_request.cpp', '../common/stderr_log.hpp', '../common/stderr_log.cpp', ], 'conditions': [ ['OS == "mac"', # Mac OS X { 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS':[ '<@(glfw3_cflags)', '<@(curl_cflags)', ], 'OTHER_LDFLAGS': [ '<@(glfw3_libraries)', '<@(curl_libraries)', ], } }, # Non-Mac OS X { 'cflags': [ '<@(glfw3_cflags)', '<@(curl_cflags)', ], 'link_settings': { 'libraries': [ '<@(glfw3_libraries)', '<@(curl_libraries)', '-lboost_regex' ], }, }], ], 'dependencies': [ '../mapboxgl.gyp:mapboxgl', '../mapboxgl.gyp:copy_styles', '../mapboxgl.gyp:copy_certificate_bundle', ], }, ], }
#Source : https://leetcode.com/problems/linked-list-cycle/ #Author : Yuan Wang #Date : 2018-08-01 ''' ********************************************************************************** *Given a linked list, determine if it has a cycle in it. * *Follow up: *Can you solve it without using extra space? **********************************************************************************/ ''' #Self solution, Time complexity:O(n) Space complexity:O(n) def hasCycle(self, head): """ :type head: ListNode :rtype: bool """ if not head: return False dic={} current=head while current != None: if current not in dic: dic[current]=False else: return True current=current.next return False ''' Other solution, Time complexity:O(n) Space complexity:O(1) Algorithm The space complexity can be reduced to O(1)O(1) by considering two pointers at different speed - a slow pointer and a fast pointer. The slow pointer moves one step at a time while the fast pointer moves two steps at a time. If there is no cycle in the list, the fast pointer will eventually reach the end and we can return false in this case. Now consider a cyclic list and imagine the slow and fast pointers are two runners racing around a circle track. The fast runner will eventually meet the slow runner. Why? Consider this case (we name it case A) - The fast runner is just one step behind the slow runner. In the next iteration, they both increment one and two steps respectively and meet each other. How about other cases? For example, we have not considered cases where the fast runner is two or three steps behind the slow runner yet. This is simple, because in the next or next's next iteration, this case will be reduced to case A mentioned above. ''' def hasCycle(self, head): """ :type head: ListNode :rtype: bool """ try: slow = head fast = head.next while slow is not fast: slow = slow.next fast = fast.next.next return True except: return False
""" Farey Sequence The Farey sequence of order n is the set of all fractions with a denominator between 1 and n, reduced and returned in ascending order. Given n, return the Farey sequence as a list, with each fraction being represented by a string in the form "numerator/denominator". Examples farey(1) ➞ ["0/1", "1/1"] farey(4) ➞ ["0/1", "1/4", "1/3", "1/2", "2/3", "3/4", "1/1"] farey(5) ➞ ["0/1", "1/5", "1/4", "1/3", "2/5", "1/2", "3/5", "2/3", "3/4", "4/5", "1/1"] Notes The Farey sequence will always begin with "0/1" and end with "1/1". """ def farey(n): a, b, c, d = [], [], [],[] for i in range(n+1): for j in range(i): if not ((j+1)/i) in a: b.append((j+1)) c.append(i) a.append((j+1)/i) s= sorted(a) for i in range(len(s)): d.append(a.index(s[i])) result=["0/1"] for i in d: result.append(str(b[i])+"/"+str(c[i])) return result #farey(1) #➞ ["0/1", "1/1"] #farey(4) #➞ ["0/1", "1/4", "1/3", "1/2", "2/3", "3/4", "1/1"] farey(5) #➞ ["0/1", "1/5", "1/4", "1/3", "2/5", "1/2", "3/5", "2/3", "3/4", "4/5", "1/1"]
class State: def __init__(self): self.StateId = 0 self.StateName = "" class City: def __init__(self): self.CityId = 0 self.CityName = "" self.StateId = 0 class Properties: def __init__(self): self.Area=0 self.Age=0 self.Rooms=0 self.CityId=0 self.Price=0 self.Type=0
# substituindo com o metodo replace s1 = 'Um mafagafinho, dois mafagafinhos, tres mafagafinhos...' print(s1.replace('mafagafinho', 'gatinho')) # podemos adicionar a quantidade substituicao que sera feitas print(s1.replace('mafagafinho', 'gatinho', 1))
class Movies(object): def __init__(self, **kwargs): short_plot = kwargs.get('Plot')[0:170] self.title = kwargs.get('Title') self.poster_link = kwargs.get('Poster') self.rated = kwargs.get('Rated') self.type = kwargs.get('Type') self.awards = kwargs.get('Awards') self.year = kwargs.get('Year') self.released = kwargs.get('Released') self.genre = kwargs.get('Genre') self.runtime = kwargs.get('Runtime') self.actors = kwargs.get('Actors') self.director = kwargs.get('Director') self.writer = kwargs.get('Writer') self.link_id = 'http://www.imdb.com/title/' + kwargs.get('imdbID') self.plot = short_plot # self.plot = kwargs.get('Plot') self.imdb_rating = kwargs.get('imdbRating') self.imdb_votes = kwargs.get('imdbVotes') self.language = kwargs.get('Language') self.trailer = kwargs.get('trailer') def __str__(self): return str(self.title) def get_imdb_link(self): pass def get_youtube_trailer_link(self): pass
class Solution: def maxLength(self, arr: List[str]) -> int: results = [""] max_len = 0 for word in arr: for concat_str in results: new_str = concat_str + word if len(new_str) == len(set(new_str)): results.append(new_str) max_len = max(max_len, len(new_str)) return max_len class Solution: def maxLength(self, arr: List[str]) -> int: str_bitmap = {} refined_array = [] def str_to_bitmap(string): bitmap = 0 for letter in string: next_bitmap = bitmap | (1 << (ord(letter) - ord('a'))) if next_bitmap == bitmap: return False, None bitmap = next_bitmap return True, bitmap # Filter out strings that contain duplicated characters # convert the string to its corresponding bitmap for string in arr: is_unique, bitmap = str_to_bitmap(string) if is_unique: refined_array.append(string) str_bitmap[string] = bitmap max_len = float('-inf') # generate all possible permutations def backtrack(curr_index, curr_bitmap, curr_len): nonlocal max_len max_len = max(max_len, curr_len) for next_index in range(curr_index, len(refined_array)): string = refined_array[next_index] # check there is no duplicate when appending a new string concat_bitmap = str_bitmap[string] | curr_bitmap check_bitmap = str_bitmap[string] ^ curr_bitmap if concat_bitmap == check_bitmap: backtrack(next_index+1, concat_bitmap, curr_len + len(string)) backtrack(0, 0, 0) return max_len
# Escreve os 10 primeiros termos de uma PA(Progresão Aritmétrica) dado o # primeiro termo e a razão. # Baseado no desafio051, mas em vez de usar estrutura "For", usar com "While". primeiro = int(input('Digite o primeiro termo da PA(Progressão Aritmétrica): ')) r = int(input('Digite o valor da razão da PA(Progressão Aritmétrica): ')) i = primeiro ultimo = primeiro + (10 - 1) * r while i != (ultimo + r): print('{} -> '.format(i), end=' ') i = i + r print('Fim.') # Código abaixo comentado faz o mesmo que o acima, porém, com "For", como no programa original desafio051. #for i in range(primeiro, ultimo + r, r): # print('{} -> '.format(i), end =' ') #print('Fim.')
class Solution: def longestCommonSubsequence(self, text1: str, text2: str) -> int: # The idea is to use 2D dynamic programming from the top-left # if the characters are match, # we set the cell = 1 + top-left # if the characters aren't match, # we set the cell = max(top or left) dp = [[0 for _ in range(len(text2))] for _ in range(len(text1))] for i in range(len(text1)): for j in range(len(text2)): if text1[i] == text2[j]: dp[i][j] = 1 + (dp[i-1][j-1] if (i > 0 and j > 0) else 0) else: dp[i][j] = max(dp[i-1][j] if i > 0 else 0, dp[i][j-1] if j > 0 else 0) return dp[-1][-1]
N=int(input()) for i in range (-(N-1),N): for j in range (-2*(N-1),2*(N-1)+1): if j%2==0 and (abs(j//2)+abs(i))< N: print (chr(abs(j//2)+abs(i)+ord('a')),end='') else: print('-',end='') print()
# coding: utf8 # try something like def index(): rows = db((db.activity.type=='project')&(db.activity.status=='accepted')).select() if rows: return dict(projects=rows) else: return plugin_flatpage() @auth.requires_login() def apply(): project = db.activity[request.args(1)] partaker = db((db.partaker.activity == request.args(1)) & (db.partaker.user_id == auth.user_id)).select().first() db.partaker.user_id.default = auth.user_id db.partaker.user_id.writable = False db.partaker.user_id.readable = False db.partaker.activity.default = request.args(1) db.partaker.activity.writable = False db.partaker.activity.readable = False if partaker is None: form = SQLFORM(db.partaker) if form.accepts(request.vars, session, formname="new"): if not form.vars.activity in (None, ""): db.partaker.insert(user_id=auth.user_id, activity=form.vars.activity) session.flash = T("Thanks for joining the partakers list") redirect(URL(c="projects", f="index")) else: db.partaker.id.readable = False form = SQLFORM(db.partaker, partaker.id) if form.accepts(request.vars, session, formname="update"): session.flash = T("Your project's info was updated") redirect(URL(c="projects", f="index")) return dict(form=form, partaker=partaker, project=project) @auth.requires_login() def dismiss(): partaker = db.partaker[request.args(1)] project = partaker.activity partaker.delete_record() session.flash = T("You dismissed the project" + " " + str(project.title)) redirect(URL(c="projects", f="index")) @auth.requires(user_is_author_or_manager(activity_id=request.args(1))) def partakers(): project = db.activity[request.args(1)] partakers = db(db.partaker.activity == project.id).select() return dict(partakers=partakers, project=project)
N = int(input()) C = set() for _ in range(N): S, T = map(str, input().split()) C.add(tuple([S, T])) if len(C) == N: print("No") else: print("Yes")
class DoubleLinkedList: def __init__(self, value): self.prev = self self.next = self self.value = value def get_next(self): return self.next def get_prev(self): return self.prev def get_value(self): return self.value def move_clockwise(self, steps=1): node = self for i in range(steps): node = node.get_next() return node def move_counter_clockwise(self, steps=1): node = self for i in range(steps): node = node.get_prev() return node def insert_node(self, node): node.prev = self node.next = self.next self.next.prev = node self.next = node def remove_node(self): self.prev.next = self.next self.next.prev = self.prev return self.next
golfcube = dm.sample_data.golf() stratcube = dm.cube.StratigraphyCube.from_DataCube(golfcube, dz=0.05) stratcube.register_section('demo', dm.section.StrikeSection(distance_idx=10)) fig, ax = plt.subplots(5, 1, sharex=True, sharey=True, figsize=(12, 9)) ax = ax.flatten() for i, var in enumerate(['time', 'eta', 'velocity', 'discharge', 'sandfrac']): stratcube.show_section('demo', var, ax=ax[i], label=True, style='shaded', data='stratigraphy')
def tam(): '''Futuramente facilitar o mudo de como mundar o tamanho das peças.''' tel = 1.25 return tel
# Квадратное уравнение - 1 def quadratic_equation_1(a, b, c): d = b**2 - (4 * a * c) if d == 0 and a != 0: x = (- b / (2 * a)) ans = (round(x, 2), ) elif d > 0: x1 = round((- b - d**0.5) / (2 * a), 6) x2 = round((- b + d**0.5) / (2 * a), 5) ans = (x2, x1) if x1 > x2 else (x1, x2) else: ans = "" return ans if __name__ == '__main__': a = float(input()) b = float(input()) c = float(input()) print(*quadratic_equation_1(a, b, c))
def test_malware_have_actors(attck_fixture): """ All MITRE Enterprise ATT&CK Malware should have Actors Args: attck_fixture ([type]): our default MITRE Enterprise ATT&CK JSON fixture """ for malware in attck_fixture.enterprise.malwares: if malware.actors: assert getattr(malware,'actors') def test_malware_have_techniques(attck_fixture): """ All MITRE Enterprise ATT&CK Malware should havre techniques Args: attck_fixture ([type]): our default MITRE Enterprise ATT&CK JSON fixture """ for malware in attck_fixture.enterprise.malwares: if malware.techniques: assert getattr(malware,'techniques')
__all__ = ['USBQException', 'USBQInvocationError', 'USBQDeviceNotConnected'] class USBQException(Exception): 'Base of all USBQ exceptions' class USBQInvocationError(USBQException): 'Error invoking USBQ' class USBQDeviceNotConnected(USBQException): 'USBQ device not connected.'
""" [2017-11-13] Challenge #340 [Easy] First Recurring Character https://www.reddit.com/r/dailyprogrammer/comments/7cnqtw/20171113_challenge_340_easy_first_recurring/ # Description Write a program that outputs the first recurring character in a string. # Formal Inputs & Outputs ## Input Description A string of alphabetical characters. Example: ABCDEBC ## Output description The first recurring character from the input. From the above example: B # Challenge Input IKEUNFUVFV PXLJOUDJVZGQHLBHGXIW *l1J?)yn%R[}9~1"=k7]9;0[$ # Bonus Return the index (0 or 1 based, but please specify) where the original character is found in the string. # Credit This challenge was suggested by user /u/HydratedCabbage, many thanks! Have a good challenge idea? Consider submitting it to /r/dailyprogrammer_ideas and there's a good chance we'll use it. """ def main(): pass if __name__ == "__main__": main()
print('=' * 30) print('{:^30}'.format('LOJA ALBUQUERQUE')) print('=' * 30) tot = contmil = cont = menor = 0 batato = '' while True: continuar = ' ' produto = str(input('Nome do Produto: ')).capitalize() preco = float(input('Preço: R$')) tot = tot + preco cont = cont + 1 if cont == 1: menor = preco barato = produto else: if preco < menor: menor = preco barato = produto if preco > 1000: contmil = contmil + 1 while continuar not in 'SN': continuar = str(input('Quer continuar? [S/N] ')).upper().strip()[0] if continuar == 'N': break print('------ FIM DO PROGRAMA ------') print(f'O total da compra foi R${tot:.2f}') print(f'Temos {contmil} produtos custando mais de R$1000.00') print(f'O produto mais barato foi {barato} que custa R${menor:.2f}')
def test_exposed(ua): """Test if the UnitAgent exposes all required methods.""" assert ua.update_forecast is ua.model.update_forecast assert ua.init_negotiation is ua.planner.init_negotiation assert ua.stop_negotiation is ua.planner.stop_negotiation assert ua.set_schedule is ua.unit.set_schedule assert ua.update is ua.planner.update def test_registered(ua, ctrl_mock): """Test if the UnitAgents registers with the ControllerAgent.""" assert len(ctrl_mock.registered) == 1 print(ctrl_mock.registered) assert ctrl_mock.registered[0][0]._path[-1] == ua.addr[-1] # Test proxy assert ctrl_mock.registered[0][1] == ua.addr
# skrypt do wykonywania w trybie REPL # każda linia jako kolejne polecenie name = input() print(name) name = input("Please, give me your name:") print(f"Your name is: {name}") current_year = input("What is current year? ") print(f"Current year is: {current_year}") type(current_year)
test = { 'name': 'nodots', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" scm> (nodots '(1 . 2)) (1 2) """, 'hidden': False, 'locked': False }, { 'code': r""" scm> (nodots '(1 2 . 3)) (1 2 3) """, 'hidden': False, 'locked': False }, { 'code': r""" scm> (nodots '((1 . 2) 3)) ((1 2) 3) """, 'hidden': False, 'locked': False }, { 'code': r""" scm> (nodots '(1 (2 3 . 4) . 3)) (1 (2 3 4) 3) """, 'hidden': False, 'locked': False }, { 'code': r""" scm> (nodots '(1 . ((2 3 . 4) . 3))) (1 (2 3 4) 3) """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': r""" scm> (load 'hw08) """, 'teardown': '', 'type': 'scheme' } ] }
# Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'security_tests', 'type': 'shared_library', 'sources': [ '../../../sandbox/win/tests/validation_tests/commands.cc', '../../../sandbox/win/tests/validation_tests/commands.h', 'ipc_security_tests.cc', 'ipc_security_tests.h', 'security_tests.cc', ], }, ], }
""" generates high value cutoff filtered versions for case study 1 and 2 converted delay measurements """ DATA_PATHS = [ 'CS1_SendFixed_50ms_JoinDupFilter', 'CS1_SendFixed_50ms_JoinNoFilter', 'CS1_SendFixed_100ms_JoinDupFilter', 'CS1_SendFixed_100ms_JoinNoFilter', 'CS1_SendVariable_50ms_JoinDupFilter', 'CS1_SendVariable_50ms_JoinNoFilter', 'CS1_SendVariable_100ms_JoinDupFilter', 'CS1_SendVariable_100ms_JoinNoFilter', 'CS2_SendFixed_50ms_JoinDupFilter', 'CS2_SendFixed_50ms_JoinNoFilter', 'CS2_SendFixed_100ms_JoinDupFilter', 'CS2_SendFixed_100ms_JoinNoFilter', 'CS2_SendVariable_50ms_JoinDupFilter', 'CS2_SendVariable_50ms_JoinNoFilter', 'CS2_SendVariable_100ms_JoinDupFilter', 'CS2_SendVariable_100ms_JoinNoFilter', ] filepaths = ['D:/temp/' + d + '/delay_converted.log' for d in DATA_PATHS] converted_filepaths = ['D:/temp/' + d + '/delay_converted_filtered.log' for d in DATA_PATHS] for idx, fp in enumerate(filepaths): with open(fp, mode='r') as file: content = file.readlines() filtered_content = filter(lambda x: int(x.split(' ')[1]) < 1000, content) with open(converted_filepaths[idx], mode='w') as file: file.writelines(filtered_content)
""" 0845. Longest Mountain in Array Medium Let's call any (contiguous) subarray B (of A) a mountain if the following properties hold: B.length >= 3 There exists some 0 < i < B.length - 1 such that B[0] < B[1] < ... B[i-1] < B[i] > B[i+1] > ... > B[B.length - 1] (Note that B could be any subarray of A, including the entire array A.) Given an array A of integers, return the length of the longest mountain. Return 0 if there is no mountain. Example 1: Input: [2,1,4,7,3,2,5] Output: 5 Explanation: The largest mountain is [1,4,7,3,2] which has length 5. Example 2: Input: [2,2,2] Output: 0 Explanation: There is no mountain. Note: 0 <= A.length <= 10000 0 <= A[i] <= 10000 Follow up: Can you solve it using only one pass? Can you solve it in O(1) space? """ class Solution: def longestMountain(self, A: List[int]) -> int: res = up = down = 0 for i in range(1, len(A)): if down and A[i-1] < A[i] or A[i-1] == A[i]: up = down = 0 up += A[i-1] < A[i] down += A[i-1] > A[i] if up and down: res = max(res, up + down + 1) return res
#!/usr/bin/env python # encoding: utf-8 ''' @author: Jason Lee @license: (C) Copyright @ Jason Lee @contact: [email protected] @file: money_dp.py @time: 2019/4/22 23:17 @desc: find least number of money to achieve a total amount ''' def money_dp(total): money = [1, 5, 11] # value of each money number = [0]*(total+1) # we need number[i] changes to achieve totally i money for i in range(1, total + 1): cost = float('inf') if i - money[2] >= 0: cost = min(cost, number[i - money[2]] + 1) if i - money[1] >= 0: cost = min(cost, number[i - money[1]] + 1) if i - money[0] >= 0: cost = min(cost, number[i - money[0]] + 1) number[i] = cost print(f"f[{i}] = {number[i]}") return number[total] def money_dp_output(total): money = [1, 5, 11] number = [0]*(total+1) vector = [0]*(total+1) for i in range(1, total+1): cost = float('inf') value = 0 for j in money: if i-j >= 0 and cost > number[i-j] + 1: cost = number[i-j] + 1 value = j number[i] = cost vector[i] = value print(f"f[{i}] = {number[i]}") return number[total], vector if __name__ == '__main__': total = 5 _, vector = money_dp_output(total) combine = [] k = total while k>0: combine.append(vector[k]) k = k - vector[k] print(combine)
class Solution: def majorityElement(self, nums) -> int: dic={} for num in nums: dic[num]=dic.get(num,0)+1 #guess,dic.get(num,0)=dic.get(num,0)+1 is non-existential,for in syntax field,we can't assign to function call for num in nums: if dic.get(num,0)>=len(nums)/2: return num
class BaseAnnotationAdapter(object): def __iter__(self): return self def __next__(self): """ Needs to be implemented in order to iterate through the annotations :return: A tuple (leaf_annotation, image_path, i) where leaf annotation is a list of coordinates [x,y,x,y,x,y,...] image_path is a full or relative path to the image i is a running index used for example to name the leaf picture """ raise NotImplementedError() class RotatableAdapter(BaseAnnotationAdapter): def __next__(self): raise NotImplementedError() def get_point(self, index): """ Get the points of a leaf if they exist in the annotation file :param index: Index passed with the leaf annotation by the collection :return: A tuple of arrays ([x, y],[x,y]) with the location of the points if they exist if points doesn't exists for this leaf, returns None """ raise NotImplementedError()
[2,8,"t","pncmjxlvckfbtrjh"], [8,9,"l","lzllllldsl"], [3,11,"c","ccchcccccclxnkcmc"], [3,10,"h","xcvxkdqshh"], [4,5,"s","gssss"], [7,14,"m","mmcmqmmxmmmnmmrmcxc"], [3,12,"n","grnxnbsmzttnzbnnn"], [5,9,"j","ddqwznjhjcjn"], [8,9,"d","fddddddmd"], [6,8,"t","qtlwttsqg"], [7,15,"m","lxzxrdbmmtvwhgm"], [6,10,"h","hhnhhhhxhkh"], [6,8,"z","zhgztgjzzfzqzzvnbmv"], [5,6,"j","jjjjgt"], [2,3,"m","mmmfxzm"], [6,7,"n","nnnqgdnn"], [8,13,"b","bbbbbbbbqjbbb"], [7,8,"k","kkgkkbskkk"], [1,3,"g","gdmvgb"], [5,15,"g","gggzgpsgsgglxgqdfggg"], [12,16,"s","snhsmxszbsszzclp"], [2,3,"n","vhnnn"], [5,7,"l","slllclllkc"], [2,4,"g","rnggggdkhjm"], [1,3,"x","wxcxhxx"], [7,12,"c","cxzcwcjqgcmpccchc"], [4,5,"x","lnfsxjxwxx"], [9,10,"n","nnnnnngnzxnnn"], [3,4,"h","rhhk"], [3,11,"r","xrrcnrjrrzsvrrplr"], [6,11,"r","rrrwrrrrrrrrrrrr"], [3,4,"x","xmxz"], [1,2,"l","lllllk"], [5,11,"h","cmxhhhhhrhd"], [2,11,"h","mhzlzshjvtcrrcf"], [6,15,"g","ggggfgwggkcggqz"], [3,4,"q","qqsc"], [2,8,"m","wmwxvmsmfqlkgzwhxqdv"], [3,9,"b","pnrdsgbbbrbgb"], [1,7,"w","ddqtjwwxgwkqsgswvwkl"], [3,4,"t","lxtt"], [4,6,"g","ggxngg"], [12,13,"d","dddddddddddjjd"], [10,20,"n","nnnnnnnnnnnnnnnnnnnp"], [15,20,"j","kjjjljjjjjjjjjjhjjjn"], [5,11,"r","rwrrrrvrbrrrrr"], [2,4,"w","wwww"], [6,10,"v","vvvbvsvvvv"], [3,6,"d","tkbcdddzddd"], [10,13,"r","rrrrrrrrrlrrhrr"], [3,6,"w","ggsxkwjzfpnmkw"], [2,6,"b","bbqbbq"], [7,8,"t","tztttwtttvt"], [1,3,"t","twrttzbfdhrkvdzgn"], [4,10,"c","jxcxvcpnfccvc"], [8,17,"r","rrrrrrlvrrrrrrcsrrrh"], [1,3,"g","gsggjsn"], [6,8,"l","lllclmjllf"], [11,15,"b","bbbzbbbhbbbbbnbb"], [7,9,"l","lflblhzllml"], [9,12,"v","pvtvrvvvrvvhgmvnv"], [1,3,"t","zbrtjt"], [5,6,"f","ffffcf"], [3,4,"q","cqtz"], [13,14,"n","wnnnnnnnngnnnhpnnsn"], [1,12,"d","bdddmdqcsdhd"], [9,11,"h","hhhhhxhhhjqh"], [7,11,"w","wwwwwwswtkww"], [12,14,"m","mmmmbmdmmmmmmmzmjmv"], [1,7,"x","qdtjxmxhw"], [3,5,"n","nnnnn"], [10,13,"d","ldcrdvcvvxdpd"], [4,8,"m","mrfmwmzgmrp"], [3,8,"s","ssssssssss"], [1,7,"h","qhhhhhhhhh"], [9,10,"q","kqqqqqqmhqqqqhqr"], [5,6,"c","cmcccl"], [3,4,"q","qqqw"], [2,8,"v","vtvvvvvvv"], [1,5,"z","zzzzqz"], [7,8,"k","kkkrkqmkkkkk"], [14,16,"j","jjjjjjjjjjjjjjjs"], [6,7,"t","tttttpc"], [3,5,"s","xsxsss"], [4,5,"v","gvvpjv"], [3,5,"t","vqgft"], [3,4,"c","ccwcc"], [3,7,"s","sslwsss"], [2,5,"t","tnbgprqgzm"], [16,20,"b","bbbbbbbsjbbbbbbbbgbd"], [6,8,"p","ppqppwph"], [12,13,"m","mmmmmmmmmmmml"], [10,13,"r","rrrntrrrrhrrr"], [9,11,"f","fffhffffhfcfmf"], [4,8,"l","lmsrlllllzmlll"], [4,11,"p","sxpnpbzpjppgbn"], [3,8,"c","fcccqmfcccxrhmccw"], [6,7,"s","sqsjdbssbsrssd"], [3,4,"g","gggt"], [1,3,"t","tstnsnksfsbgt"], [3,4,"v","vvvcv"], [13,18,"g","tggggppggggggwgggpg"], [4,8,"m","mmmlmfdm"], [1,3,"z","fzzz"], [1,12,"f","ffzfffffmffrnff"], [10,11,"f","ffkffffffff"], [11,12,"m","mmpmdmmrmmmtmmm"], [9,11,"k","zkkkfkkkkkzkkh"], [16,19,"b","bbbbbbbbbbbbbbbvbbjb"], [3,4,"v","vvvhvz"], [1,6,"l","xllllll"], [8,15,"c","cccccccccccccccccc"], [10,12,"m","mmvmlzrmrnmmmm"], [1,3,"c","whcc"], [2,3,"q","kqgq"], [2,13,"s","sbssscrslnssldsxtssg"], [2,4,"v","bfdr"], [7,19,"c","ccccccccckfgpgcmccf"], [7,9,"f","fxvfffffsf"], [1,5,"n","nnnns"], [13,15,"g","gggggggggggghggg"], [9,10,"w","hdwcwqswpwwwwww"], [14,17,"j","jjjjjmjjjjjjfqjjjjj"], [2,5,"k","pkrfrdtfbvkkrkk"], [2,3,"s","ssss"], [1,8,"d","vsxtlvdqpltcj"], [3,7,"b","nlqhbbb"], [6,10,"x","xfxxxrmxxxdx"], [5,6,"n","nnnnnm"], [5,6,"r","rrrprr"], [6,7,"t","dfttttqtwktttgrkkj"], [1,2,"p","npnf"], [6,8,"p","ppppptppp"], [4,8,"k","bkkkkqkkq"], [11,12,"l","kmlnhhmkdlhl"], [14,16,"b","bmbbbbbbbbbbbcbbb"], [3,5,"r","rrfrrrr"], [5,10,"v","glglvvmvkvvvgvrv"], [2,3,"h","whhcsqjhtx"], [7,8,"d","ddddbpddddhdhdddddd"], [2,3,"k","kkkkkkksgkkkkg"], [2,6,"n","cnrpdmtgwncklll"], [3,14,"s","sssckrswlqxshdts"], [3,4,"w","wwgww"], [15,19,"q","qqpqxqqqqqqwqsqqqqz"], [1,5,"t","vrtkttttj"], [2,7,"z","lmpzjbh"], [11,15,"g","gkghtgpwrgngggggvng"], [4,17,"b","bbbbbbbbbbbbbbbbbb"], [4,6,"c","bswcml"], [3,4,"v","vvxg"], [2,4,"m","mmmmm"], [2,4,"w","kwqwjwt"], [7,14,"x","ghflqcwxcrxzrxm"], [6,7,"f","fffjffsff"], [11,12,"s","sssssssssssr"], [3,13,"v","vvzcvrvjgxvkcvh"], [3,8,"k","jkhgbzgkkfwvt"], [6,7,"l","llltllljl"], [8,10,"p","pppppppkvp"], [1,12,"l","lbhxdplkxdstmllwncnl"], [2,6,"c","cqcwrwnbjc"], [2,5,"v","vvkvvvbbv"], [3,4,"g","ggnkg"], [3,4,"z","rczzhbwmszgzhfszd"], [8,10,"t","fvrttqnwjtft"], [11,17,"l","cllqltnlldcllnwnllll"], [2,9,"r","jrrwrrcjrr"], [3,5,"s","skmsssh"], [5,6,"q","qqqqtq"], [7,16,"k","ktzxwrxcdrmkqfpk"], [7,12,"s","hfsssssssssmsk"], [3,11,"s","gssjsdxdxsqgpns"], [9,11,"s","sssssssssss"], [5,9,"t","xtwthrdtvj"], [5,7,"q","qjqxqjq"], [2,10,"r","zlrrrrrtrr"], [2,18,"w","trwqhcfwrmqwwwqfgwww"], [2,5,"k","kkkkwkp"], [1,4,"s","fqss"], [1,4,"l","xtflz"], [10,12,"q","qqqqqqqqqnssq"], [3,4,"s","sssd"], [10,20,"m","mnmmmmqwmjnpbmmmmbmn"], [3,5,"l","clpln"], [2,11,"v","mhrvdkgsxvvvdxvhgv"], [15,16,"j","jjjjjjjjjjsjjjkj"], [2,5,"f","gzvzffsnxdcf"], [8,10,"m","jmmmmmmrmmmmm"], [1,2,"k","fmhkpmssvdkh"], [4,7,"l","vgtldqpbmmj"], [2,3,"v","kdvcgvnw"], [15,17,"g","ggggggggnggggglgj"], [4,5,"w","kjwnw"], [6,16,"j","fjjrjkbjsjjvljzjjdj"], [2,4,"g","bgvgqs"], [9,12,"k","lkkgkkkkzfkqkcj"], [6,13,"b","bbbbbmbbbcbbqb"], [7,8,"m","mmcmmmmp"], [4,5,"v","vvvvg"], [11,15,"n","nnqxnnnnnqmnnnnfnpn"], [1,5,"z","gkvwtv"], [4,5,"l","llllk"], [3,4,"d","ddss"], [1,4,"v","vvvl"], [2,3,"v","vjcvvvvq"], [9,13,"v","vvvvbvvvvgppv"], [11,14,"d","ldhdddddddwpdddddddd"], [2,12,"p","rrpppwppxjplprpp"], [5,11,"p","spfcjpmplbpzpppgpp"], [3,6,"q","lkqfqcq"], [2,4,"x","xvxwxv"], [2,12,"x","bxxxxjxxxtxhktkx"], [1,14,"c","cccccccccccccpc"], [5,16,"t","qstttfxttmtvvgtzt"], [7,8,"q","kqqqqqwq"], [5,6,"c","cccccdcccccc"], [7,9,"v","dvnbvvjmh"], [5,7,"s","sdssswvr"], [1,2,"t","vtsttt"], [6,8,"d","dgdwdcdd"], [5,18,"j","qjjjjjjtjjjjjjjljlj"], [2,16,"r","ksrtrrrrrlchrljrz"], [5,7,"m","mmmkmmvmxbflctjhhfxc"], [4,10,"f","mfftfrfffff"], [6,12,"x","xxxxxxxxxxxbx"], [9,12,"s","ssssssssdsshs"], [12,14,"v","vvvhvvvvvzvvvrzvlvg"], [14,17,"d","ddhdddddddddddpdd"], [1,5,"c","rcchc"], [1,9,"n","npnnnrxnh"], [1,4,"n","mnnn"], [2,3,"q","qklxpwr"], [7,8,"j","djjjjfjnjjv"], [4,5,"h","hhrcbhc"], [6,8,"t","txtfclvtz"], [8,11,"w","grhwwqwhwwww"], [1,5,"r","rrkrxl"], [3,6,"v","jgtdsvlpgx"], [14,18,"r","rrrrrrrrrsrrrhrrrr"], [5,13,"g","xggsggggggggggn"], [18,19,"x","xxxxxxxxxxxxxxxxxfx"], [4,5,"n","dpnnnwnntpwgntqnj"], [4,12,"c","ccccmcccczrspfrcpx"], [15,16,"h","hwhzhnhhhhshhhhhhhhh"], [3,4,"v","vvvg"], [3,4,"j","jpjs"], [10,13,"h","bhhhhhrhhhhhsdh"], [2,4,"v","svvclvv"], [12,13,"k","zkkkkkdskkkpkwwkk"], [8,9,"b","bxbhjbbjb"], [1,10,"k","kpkmkstkhtkl"], [5,6,"d","qddddx"], [1,3,"m","mmmm"], [1,5,"r","trrrrrr"], [2,5,"l","llvlnlllm"], [9,18,"d","dddjhddddvdddtddddd"], [9,20,"j","nxfjfjjbjjljjjjcjjjj"], [5,7,"v","zkvvzpxvtctvmcvvvvv"], [1,6,"d","lmcmvwdwq"], [1,5,"v","dbdvv"], [6,11,"n","snnzlnnnwnd"], [11,17,"l","lwlltvlplldlllllsll"], [6,8,"k","kkkkktkkp"], [9,14,"q","nclswjgmqwvhjrs"], [7,10,"c","cgccfccccl"], [2,3,"z","zqkzzj"], [14,15,"v","vvvvvvvvvvvvvvg"], [7,9,"z","zzzztzzqtz"], [11,17,"n","vnnnnnnnrnnnnnnnqn"], [15,16,"l","lllllqlllllllllz"], [1,14,"t","pgskddftttttxtflt"], [2,3,"d","bdpqd"], [3,18,"k","dkkpkkkkkjjtjgkkkxs"], [6,10,"p","qlptppdjppllppp"], [8,9,"s","sssssssss"], [11,16,"q","qqjqqqhqqqqqdqqmq"], [7,8,"p","pprqppvhpqp"], [5,12,"q","qqqqbqqqqqqqqqqqqq"], [1,5,"b","wbbbjbb"], [9,17,"m","fdhmxtmmccxpmmfbmtbm"], [2,5,"b","tbbptwkghzvsbvcb"], [12,16,"w","wwwwwfwwwwvwfwwww"], [4,5,"h","hfhggh"], [11,16,"z","zlzzdrzzxtxzzzzqz"], [3,6,"x","xxwxxm"], [3,9,"w","vmpsthqww"], [5,9,"q","qqqqpqqqq"], [17,18,"g","gggggggggggggggggw"], [3,8,"s","sscmsssssf"], [7,15,"v","vvvvzvttvvvvvvgvvvv"], [14,19,"h","mdpmhtmhsdsxxhthhhd"], [1,3,"h","hbhcbvhxfmjqdgt"], [15,17,"p","xmnhkrgcxxrdtpprzhfh"], [2,5,"w","dqqrwwbvq"], [16,17,"c","ccccccccccccccccc"], [1,4,"p","plcvxpp"], [10,15,"b","bbbnbbbbbvlzbvgb"], [9,10,"g","gggwggggcp"], [3,4,"d","dtdcd"], [1,5,"v","vjslbjjtxldvvknn"], [2,4,"n","fhgnl"], [2,3,"x","xnjm"], [3,8,"j","tzvjbjvxchjk"], [1,10,"g","wgggggghghggq"], [5,7,"q","dqlwqqqkqqhq"], [6,7,"d","dddrddhdld"], [2,4,"x","kxbxxmchtx"], [1,2,"w","wwjg"], [19,20,"r","hfjrqwdxppgzppwchrjr"], [10,16,"r","rrrrrzrrrrrvrrrt"], [1,3,"m","cmmlm"], [14,17,"h","hhhhhhhhhhhhzhlbphh"], [2,4,"f","bfhf"], [3,6,"j","mkdmmmpjjbqmk"], [6,7,"x","flxxxqxxx"], [12,15,"q","qqqqnqqqqqqnqqs"], [9,10,"w","wgwdwxrlwgwwwmwwcgd"], [6,7,"k","kdnrppkkkkkkrj"], [2,3,"n","pntsmsnb"], [1,5,"c","cqcctccqcccccn"], [9,10,"f","txffffffffcff"], [2,6,"b","smtckkcqrsbkzjbtpbtb"], [10,14,"k","kkckkkkkkhkkkd"], [9,11,"m","jnwmbmjmmqsfz"], [9,10,"h","hhhhhhhhhh"], [5,6,"h","hhhhhvh"], [3,6,"c","cccccr"], [10,11,"l","llllllgplll"], [6,11,"r","prprnrrrqrr"], [13,14,"p","pppppppppppphp"], [5,8,"j","pkjjqjjjjh"], [7,9,"f","zfjfcfhcfkffffxv"], [9,10,"w","wwwwwwwwwhw"], [2,3,"z","tzszz"], [2,3,"t","ntdt"], [7,10,"l","llllllqllkl"], [4,10,"j","bmsjjtjjjlbp"], [1,3,"t","kbrxpnstztz"], [2,3,"h","chbwpmvdh"], [2,11,"p","qwqzlpdbpvpxp"], [8,11,"c","tzcbpcccgfj"], [4,5,"g","rgcdg"], [1,8,"t","pwtkzttdlrd"], [2,3,"l","ldlrvsl"], [4,5,"j","jjjrj"], [2,4,"k","vkfk"], [18,20,"v","vvvvvvvfvvvvvvvvvvvj"], [5,11,"w","gbjwwwwzxsl"], [10,12,"d","ddddddddddqd"], [1,4,"r","rrqr"], [7,8,"p","pppppzpp"], [7,8,"c","cccscmcfch"], [6,7,"c","crncccvtc"], [6,8,"z","zkzlxzcb"], [3,4,"h","hhfs"], [12,13,"t","ttttttttttthmt"], [2,12,"x","xdxxxxxxxxxxxxx"], [2,5,"n","cnnnknnn"], [10,11,"x","xxxxxxxxxsx"], [3,9,"q","fgfqjqxzqtlqqmgk"], [1,4,"g","gzsk"], [11,14,"h","hhhrhwhhsqhchxclhhh"], [5,15,"q","nqzqqqqnqkqfqqqqqq"], [10,14,"b","bbbbbbbbbhbbbqbb"], [5,6,"v","rpfvdvjvvvvvdxjgwc"], [6,7,"r","rrrrzwrhrdv"], [3,4,"f","fffb"], [9,12,"q","qqqqqqqqqqqqqqqqq"], [15,19,"c","cccclcccxcccctccccs"], [2,3,"b","jbwqq"], [5,6,"h","hhchpm"], [11,12,"f","fffffffffffl"], [5,9,"s","fsggxprbsssklhhbsl"], [12,15,"f","ffffcfzfffkrfffnh"], [1,2,"s","fstz"], [1,6,"b","nbfbhb"], [2,11,"k","xfdjrwptgrkk"], [18,20,"k","kkkwkkkkkkkpkkkkkkkr"], [4,8,"r","rgcsrgkdrrrrtwr"], [3,5,"k","kkkkvgkkkkn"], [9,13,"b","bjgbkxqzbbbjtbx"], [1,2,"n","rmbgdnjt"], [3,6,"k","kqnkkk"], [3,6,"c","gzggcpxszscccccc"], [15,17,"r","rrjnrrrrtrrrrhrrxrr"], [11,12,"d","dddddddddddx"], [4,8,"s","sxztltlssksqwthss"], [12,13,"l","llxllllskllqvdlll"], [4,6,"j","cjxdvjjlx"], [1,4,"t","mwttttttttttttt"], [7,8,"p","pbpdpbdpmppjpp"], [11,13,"l","lkjlgdllkllvnl"], [9,10,"b","sbbbbbbbrb"], [9,13,"l","lzlllllllljlllll"], [6,7,"r","tnkpjrhkxzdzwwxv"], [1,4,"x","hdnxxlx"], [4,5,"b","kvhwb"], [1,2,"p","pxmhbcp"], [2,5,"s","csgfssjssstcq"], [3,7,"k","htnkkhprxkc"], [14,20,"c","rlkhpgccjsjchccjmkbg"], [2,3,"t","ttxt"], [13,18,"p","pppppppppppwvppppq"], [9,10,"j","jjqjjjjjdbj"], [10,12,"m","mmmmmmgmmlmm"], [5,11,"l","qrwgblsqjxtll"], [1,5,"m","mqwnn"], [7,12,"p","pppppppppppppppppp"], [4,8,"d","bdrntdzdd"], [14,15,"g","gggggggggggzggc"], [3,4,"m","mmmc"], [2,9,"d","hsqjddjfdcqzsjr"], [5,9,"h","hhhhsffhk"], [5,7,"f","ffffcff"], [6,8,"z","wzkzzzzjzzczg"], [2,9,"q","dqqqgbqdnlfqqws"], [6,11,"m","mhmmpmxmxtxmp"], [7,11,"n","nvjtglngnzmbnnqjnjgp"], [11,12,"v","vvvvvvvvvvdg"], [2,3,"z","vmzz"], [6,8,"z","zzzzzzzbzzzzzzzzzzz"], [6,13,"k","hkvkhpkqkkkkwsdkmk"], [1,9,"k","gkkkkkkkkk"], [2,5,"g","gngggxg"], [12,14,"m","mmmmmmmjmmmrmhm"], [1,6,"f","cqffffsb"], [10,11,"p","xppxpqbplpp"], [3,17,"j","wdjldqqbxqxbcrbkjfth"], [5,8,"w","wlhwvkwwwzkww"], [4,6,"t","vtthtt"], [6,9,"m","rkmtgbzrfmg"], [10,11,"g","gggrgggsggbgmg"], [5,7,"x","xxxxrxdxx"], [9,12,"k","kbgkkgpkkrkkqv"], [10,14,"z","nzzwjznbpzztzm"], [7,16,"t","ttttttwbtltttcltt"], [13,18,"l","lllllltllllltllllll"], [5,18,"v","mvvvzjvvvvvmvvsnjzv"], [12,19,"b","bbsbbbbbbmbbbwbbbbdb"], [15,16,"n","nndgcnnnnnnnnnnpnnnf"], [4,11,"j","gqdkjblvkgbwjjmtfjg"], [12,13,"s","ssssssstssmpbsss"], [5,7,"j","jmgxjjw"], [4,9,"p","pptlvpppp"], [13,17,"q","fqqqqqqqrqqqhqqqqngq"], [4,6,"j","xzjcxjjpcrl"], [4,10,"w","swwwspwwql"], [10,13,"s","sssssssssjsss"], [2,4,"k","nktjkkkm"], [2,6,"z","vzqzfzncz"], [4,10,"l","llplslghlwvlh"], [5,6,"d","ddhdvqd"], [5,10,"r","rrrrrbrrrjrd"], [1,5,"d","ddddn"], [2,4,"t","tttr"], [4,7,"d","dsddpdkfsdd"], [3,8,"r","klrclrkzbrrscrpd"], [16,18,"j","jjjjjjjjwjjjjjjzjj"], [18,20,"p","tppjpppppppppppppcpp"], [9,11,"m","mmmmmmmmmmt"], [8,12,"d","dtxdvddpddmq"], [4,8,"d","qdcddddcd"], [16,17,"w","wwwwwwwwwwwwwwwzwww"], [3,4,"v","hpvhvvpvxnd"], [3,5,"x","dpxxj"], [18,19,"d","ddddddddddddddddddbd"], [13,16,"z","pzzzzhzzqzzzmzzzzzg"], [2,6,"b","bglglbnbdb"], [9,10,"t","ttttttttxmttt"], [1,7,"g","fgggvgm"], [8,11,"t","ttmrwtttttp"], [7,8,"d","ddxddddrddddgdddddd"], [1,4,"p","mpdbdkghzqpkpxbp"], [8,10,"d","dddjdddzdxd"], [3,4,"l","lllwl"], [6,9,"m","mmmmmfmmm"], [2,6,"d","dvjddj"], [5,19,"n","ctnnnnnnvngnnqndwnn"], [4,7,"z","zzwdzdpzzd"], [9,12,"w","wwwwwwwwkpwww"], [13,14,"t","tttttttttttwztt"], [2,3,"z","zzwp"], [4,12,"q","hqtqshlcjsmqjrt"], [6,13,"s","bssqsssstflsw"], [15,16,"l","llllllllllllllllll"], [9,10,"c","ccccccccgq"], [14,15,"m","mrmmrmmmmmbmmmcmm"], [1,6,"r","rrrrrcrrrrr"], [4,6,"s","zqrdvshjbgpssj"], [3,6,"h","mmhxthhbshhb"], [17,19,"q","qqqqqqqqqqqqqqqqrqqq"], [4,12,"x","fqvxcghgqxkwx"], [2,5,"q","qqxqdrjrqxkfmq"], [3,8,"z","wfzzzzzz"], [6,7,"c","ccccqmc"], [1,5,"h","hhhhh"], [3,4,"f","svsf"], [7,8,"x","xxxxxxxsx"], [4,8,"g","gggggggngggg"], [4,5,"w","lwwwx"], [2,3,"g","ggsqg"], [4,6,"q","qqqqqq"], [3,7,"j","jtjdjncjq"], [7,9,"k","kkkkkkkcf"], [4,11,"z","pvdzfbzxzfhbf"], [6,17,"n","nnvnnxnnnnnnnnnnnnn"], [2,5,"c","ccrlttnnccdlcmjvx"], [3,9,"l","llllllllpl"], [1,2,"c","vccc"], [2,6,"c","qfcncx"], [1,3,"k","kkvkkkk"], [1,5,"q","qqjkhq"], [3,8,"p","pvpppzpgpp"], [4,7,"b","bbbbbbhbb"], [8,15,"x","xxxvxlvxxdknxxxxx"], [5,6,"n","nnnnnv"], [4,7,"h","hhhbhhth"], [9,16,"h","hxhhhhhhqhhhpbhlh"], [8,10,"k","kkkkkghkkkwnk"], [4,12,"w","bwwwwmwwwwwmwwwwswww"], [1,5,"q","mzhmqtzlbzvtlwqzpxf"], [11,12,"x","xxxxxxxxxxds"], [16,17,"s","sssssrssssssssspwsw"], [1,4,"q","qwqcq"], [1,12,"w","wwwwrpwwwwwqwwmwlw"], [5,6,"m","tlgzvmqcjt"], [12,18,"c","ccccccccccccccccccc"], [6,10,"g","jpgggdgbddgg"], [11,14,"w","hwwkxwhhkfwcjfdkkwfn"], [3,4,"n","nmdnlnbjxcjsp"], [3,4,"w","bwvj"], [12,14,"f","cmqznmfzlsbpfd"], [1,3,"t","txsttsttzqls"], [3,4,"w","sdsw"], [6,12,"b","sbfbqvbbbstb"], [17,19,"g","nggggggggggggggxngtg"], [15,17,"h","hhhhhhhhhhhhhhrhh"], [2,3,"p","ppcpp"], [5,9,"n","nvnnncqnnhnn"], [1,4,"r","rzrrrr"], [2,10,"b","zbbbkbbctkbbwngbbbsl"], [1,3,"r","rrpn"], [3,6,"q","mmlqxqqq"], [12,13,"x","xxxxxxxxjqxkxtxx"], [3,5,"l","nlllhpcc"], [3,11,"x","jxxgcxxbfxpxxfml"], [3,6,"l","nllqlln"], [9,14,"j","jjjjjjjjhjjjjj"], [11,13,"j","jjjjjjjbsjjjj"], [19,20,"k","kkkkkkkkkkkkkkkkkkkv"], [7,11,"n","ndnnnnxfnbnnnn"], [5,6,"g","gggtgh"], [1,9,"f","nfffbnffffc"], [4,6,"d","sdxlgtrmd"], [18,20,"n","nnnnwnnnnnnnnnnnnhnn"], [9,11,"j","jjjdjljjjljtj"], [3,4,"z","bwcsnqzzz"], [1,4,"j","jzjj"], [9,13,"k","cdvwnnwqklwplbzk"], [5,9,"q","hvqpqqtqh"], [2,7,"f","vdkrwpz"], [12,13,"z","zzhzzpwmzzzzq"], [7,13,"s","nsssssfssssss"], [4,6,"s","kgmksst"], [17,19,"p","pfbcgcnxkbpptcbxpsp"], [12,13,"s","ssssssssssspm"], [11,12,"g","gggggggvggsg"], [6,8,"g","gggggzgz"], [1,3,"j","jjjj"], [5,7,"d","ddddgdd"], [6,7,"r","kmrjsbpkrrnpr"], [6,9,"m","mmmmmmmmmm"], [5,6,"b","bxbbvbb"], [5,10,"h","thxgvlhchhzhnfhhhhh"], [11,13,"l","vcllllnhlllvvllll"], [1,9,"j","wjjjjjjjnjjjj"], [4,8,"n","xnlbndngnn"], [4,5,"f","fffmfz"], [7,8,"c","pwmzcxvc"], [15,17,"z","zzzzfzzzzzzzzzzzx"], [4,8,"d","krddfddxddd"], [1,2,"w","wpzxcbxmcktpjmspw"], [4,14,"t","ptcdtvtttbpwtttt"], [8,13,"f","fmfkffdffqfff"], [6,7,"j","jwnxpjlnrlxdjxvzhsll"], [2,5,"m","mmmmmm"], [3,4,"c","cccc"], [3,11,"f","fffrvfzqnmffd"], [3,5,"k","kkxrkkk"], [5,8,"k","kkkvskvkkkhsk"], [12,14,"k","jkkkkdkkkmfzkknkpkk"], [1,2,"h","vhspjh"], [3,4,"p","pppn"], [5,6,"v","vrvdvg"], [7,8,"j","jxrjjjtdjjj"], [3,12,"z","fzzxzgzzzzzhzz"], [10,12,"v","vvvvvvvvgvxxv"], [12,13,"k","kkkplnlpvwkkkkkt"], [4,8,"t","dvjtltttptt"], [15,16,"z","zzzzlzzzzzlwzzzhzz"], [15,17,"n","nnnnnnnnnnnnnnlnn"], [12,15,"z","zjzzzzzzzzzzzzs"], [7,8,"x","hzxnxlxlfxxxxvxxxnx"], [9,10,"r","rrrrrwrrrp"], [1,7,"r","vrfslcr"], [6,15,"t","tttttsttttttttt"], [3,6,"j","wjjdnjznwfclpskvdq"], [2,4,"v","vzlvls"], [9,10,"j","jjjjjjjjwj"], [8,9,"r","kxrrrtqnr"], [14,16,"h","hhhhhhhhhhhfhlhjhhh"], [14,15,"x","xxxxxxxxxxxxxmx"], [8,10,"h","hhhhhhhhhhh"], [10,11,"m","mmmmmmmmmnnmm"], [3,17,"r","fwmqrcjkgrkhzcnfrb"], [1,15,"q","qqqmqzqgcnrqqlkrq"], [2,13,"w","wdwwwwwwwtwww"], [1,8,"l","lllbllln"], [4,7,"n","nnnnnnbnnn"], [11,18,"l","lkllnllqktnllzllll"], [4,5,"d","gddbrlb"], [12,13,"l","llllllnllllztl"], [2,6,"m","lbhptlvgcsmksqspmtk"], [1,2,"t","wtctt"], [3,4,"w","wwbw"], [9,12,"g","gcggvzggqzgggggsgnt"], [2,6,"b","bbrcbc"], [9,12,"m","mmgmkmmmbmmm"], [14,17,"m","mgpjmmqmmmmmmmmmt"], [6,8,"p","dpvzpskp"], [12,18,"x","xxxxxxxxxxxtxxxxxf"], [7,12,"r","xvjvrrrprrrvrrrcbr"], [3,5,"q","rqqxhqq"], [6,16,"s","ssssskssssssssssss"], [6,9,"c","cccqccccxc"], [8,16,"r","rrrrrrrrrrcrrrhr"], [5,9,"t","ctwttthtjl"], [16,18,"t","ttttttttmttttttttgtt"], [13,16,"t","zrtttgttttttmttttt"], [6,10,"k","kntkplgkkkkkmh"], [2,4,"c","vhsccfcc"], [1,4,"v","vvvqvvgpvvvvvzzv"], [3,4,"g","grgvgd"], [5,9,"p","pppbppppdv"], [3,4,"x","lxxxx"], [8,9,"q","qqqqqqzqqqqq"], [14,15,"c","cpcccccccmcccdcc"], [7,10,"p","ppfppppppppg"], [1,2,"h","thrk"], [1,3,"m","mzlzmtmqrm"], [3,5,"x","xxxxp"], [4,6,"t","gtstvvjzqtxdtsrfc"], [6,15,"p","pppwppwspppcppn"], [4,5,"g","tkhgj"], [10,14,"m","mmmmmmmmmnrmmmm"], [2,3,"b","pnbxfzxxbbrt"], [5,16,"b","tfvlbmbzbvxbtdjl"], [16,19,"w","wwwwwwwwjwwlbwwvwwwr"], [14,15,"w","wwwwwwwwwwwwwgwww"], [3,6,"n","npvzfntbfvngns"], [8,10,"s","sgsssssssz"], [2,5,"n","nnnkcnkn"], [12,15,"n","nnnnnnnnnnqnnnq"], [1,4,"p","qppk"], [5,10,"h","ghdhhcsxtzsdphwh"], [5,7,"k","kkkkkkb"], [10,11,"f","ffhlfffcnffmfrffcnff"], [6,7,"f","fffjfxf"], [11,17,"j","jjjjjjjjnjjjjjjjj"], [2,4,"z","wgrdp"], [5,6,"d","dpmdddfmxzgwd"], [8,12,"h","qhhhxhnhhhsmhlhh"], [7,19,"w","wwwwwwwwwwwwwwwwwwmw"], [1,4,"x","mmlxlc"], [1,9,"g","mgggggggggggg"], [1,12,"z","mtkfgpzmjrgs"], [7,8,"v","vvvgvvzvd"], [10,12,"j","djjjjjjjjbjj"], [3,4,"r","srjsfjbrp"], [1,4,"r","trrr"], [3,8,"j","jjjjjjjpj"], [6,7,"l","lltllwl"], [13,14,"g","gggggggggggggg"], [1,4,"w","wwrxww"], [1,10,"l","xfllllldll"], [5,7,"s","xmwsqpsr"], [6,17,"p","pkpnpppznppppplpl"], [11,12,"s","sssssssssdsf"], [14,19,"c","bsxlpshjmwcflcdhlhcr"], [8,12,"b","xbnbbbbbmbbkbbbb"], [14,16,"w","wwwcwwwwwwtwwswww"], [13,14,"f","zfsfbbffffffsf"], [13,15,"s","swssssssjsssxss"], [1,3,"v","vvnvxrwbrbgdc"], [8,10,"t","mkstnqtttt"], [14,15,"g","gggptgggggggggtg"], [12,15,"r","rrrrrrrrrrrrrrkr"], [2,5,"w","cjwpg"], [13,14,"w","wwwwwwwwwwwwqw"], [5,12,"s","bkrrcczsgsfshpwjr"], [4,9,"w","wwwwwwwwwsnw"], [3,4,"x","xxxzv"], [3,6,"g","rggghqvgfk"], [9,12,"h","hhhdhshwhhkrqhh"], [8,11,"q","zqqqqqqmqqhq"], [5,7,"j","ngxjlbhjjjj"], [8,9,"p","rpxpdqcpkp"], [11,13,"d","htbdddddddjdddd"], [2,3,"p","hpbp"], [3,4,"x","xxxq"], [4,7,"m","mmmlmmm"], [7,8,"r","rrrrrrqr"], [9,11,"x","xxxxxxxxxxx"], [5,8,"h","hhhhflbv"], [1,2,"k","vkrkzjpwtbk"], [8,10,"p","pppppppxpg"], [9,10,"h","lhbhhhhhnqhh"], [3,9,"x","xxmqxxxxgx"], [17,18,"p","ppppppppppppppzpqwp"], [8,9,"x","xxxxxxxxx"], [1,6,"l","lrblvjllhll"], [1,4,"k","klkk"], [6,8,"m","mmmmmbmmmm"], [1,6,"h","hhvhqkh"], [5,7,"n","nnnnwnss"], [6,7,"k","kkkkkzkksl"], [6,9,"b","bbbbbbbbm"], [9,14,"k","kbkkfkkkkkchtklkg"], [3,4,"f","fcjpff"], [6,12,"f","fzfxfrqlvhwflfglftpb"], [7,8,"j","djjjjjjsj"], [13,15,"v","vvvvvvvrvvvvvbvvvvv"], [2,11,"p","qpnpfmppphxpp"], [3,4,"g","ggwgg"], [1,4,"q","nqqq"], [4,9,"t","thpqpkxntg"], [1,16,"l","dllllllljlllllllll"], [3,8,"w","dbwwhxwzqwph"], [13,15,"p","ppppppppppppqpm"], [4,5,"b","bbmbqbthmbn"], [2,4,"d","zddq"], [2,7,"x","vpmchtzdbxxxxnxd"], [11,13,"x","xxxxxxxxxxjxxx"], [7,9,"m","mmdjmmmnm"], [10,12,"j","jjjjjjjjjjjx"], [12,14,"j","wfcvflhjvblzdf"], [2,12,"j","lqfjjjzncbgjhj"], [2,7,"j","jtlfjqjbjgqrxgjm"], [4,5,"t","ttttc"], [5,8,"v","vvvvvbvpvv"], [4,10,"b","qghbgkcbbs"], [12,14,"n","nnnnnnnnnnnnnhnn"], [13,19,"v","vvvvvvvvvvvrvvvvvvv"], [4,16,"z","znzvzzzwgzzzzzzzzdz"], [4,13,"q","qqqlqqqqqnqqlqqm"], [9,10,"q","qqqqqqqqrs"], [2,12,"q","qpqszqxqqqqkq"], [10,16,"v","vvfvvvvvsxvznfvv"], [1,3,"f","fvjpkglwfjbcgnbc"], [2,7,"v","vfvqvvv"], [6,8,"l","llllcllllll"], [9,14,"v","vvvvvvvvzvvvvwb"], [10,11,"s","ssmsssssssxsls"], [9,10,"b","bxbbfbbxbzbzjbbm"], [3,15,"x","xcxxxxpxxxxxdgxg"], [10,13,"k","kkkpkjmkscgxkhkbkgd"], [2,4,"j","djqhc"], [9,10,"c","cccccrccds"], [7,10,"v","vvbvvvvjjpvkv"], [13,16,"n","nnnnnnndnnnnqnnsnnnc"], [2,4,"g","qfgg"], [3,13,"v","hvvvvvzrvqvcpvvhj"], [5,12,"n","rnsnnpnnnnntnnn"], [7,8,"p","pppptpppp"], [1,6,"d","cdddqdddddd"], [3,5,"h","cwzhhhbwlhtd"], [8,17,"j","jnjdscnljmhrljrjjmjj"], [3,4,"j","jccj"], [4,14,"m","mmjkmmhwqbkjqmg"], [2,4,"b","bbbd"], [4,7,"v","vhlvvvq"], [1,4,"p","jppm"], [9,12,"g","vggzgppggggnggcdfp"], [5,6,"r","rrrrrp"], [6,13,"t","bxztttrtbttrm"], [17,19,"d","ddddddrddddwddddpdk"], [1,3,"w","jwjwwc"], [5,6,"k","kkkkkk"], [5,6,"f","ffffjxff"], [8,10,"x","xxxxxxxwxl"], [6,8,"q","qqqqqqqq"], [5,8,"d","fddtdbfdkddddddjd"], [7,15,"k","kkkkklnfkqkkxqkkvkk"], [2,5,"x","cqzxxx"], [3,4,"j","jjjb"], [7,8,"w","wwwwwwlw"], [18,20,"g","gggggggggggggggggggg"], [10,11,"w","hwwwwwwwnwmwws"], [2,10,"d","xsdjqqrqzdnhgmvlhkgm"], [2,3,"s","rsxhms"], [7,8,"n","tdnnznwpnnn"], [10,12,"g","gggggggggggg"], [7,13,"z","zfxzqzzmzzzrndzkvz"], [11,12,"k","kkkkkkkkkkkk"], [6,7,"t","ttjxxtc"], [4,6,"n","nwzlfxnnn"], [4,6,"j","jjjdmj"], [8,14,"p","xgspprprpppppppp"], [6,7,"k","kkkjkkzktn"], [5,8,"d","dddddmdt"], [4,6,"j","jfhjjb"], [3,4,"k","jrkckdwqjbcctpklm"], [6,9,"w","wwwqwxqwzkwgwwwvqbs"], [1,4,"t","gthttttttt"], [3,4,"h","bhhb"], [4,6,"t","ttqltktv"], [11,17,"v","vvvvdvvvvvpvvvvvvvv"], [13,14,"d","ddndddwddkcdvkddddkn"], [3,4,"b","xhdb"], [3,7,"w","zwcptvwlkswv"], [8,11,"p","pptpppppppm"], [5,14,"p","wpmpnplrppppppptp"], [1,3,"q","stqdkc"], [10,11,"c","ccccccccccv"], [1,7,"s","msszslsps"], [12,14,"h","hhghhnhhhhhhhmh"], [14,16,"g","gscwmsggggdgggmg"], [7,12,"z","htztzwzzkzzkrzzzlz"], [3,6,"n","dcnnvn"], [3,7,"k","kkkkkkj"], [2,3,"m","vmlkkjn"], [12,13,"r","rrrrlrrrrrrrrr"], [6,7,"z","zzzzhxxczzsd"], [2,7,"g","htjgfggbllbgxggq"], [13,17,"m","xhhnpmdxfpvsmjzwb"], [7,9,"h","hhhhhhhhjh"], [3,4,"z","zrzzz"], [1,5,"l","llgwlszllvxxmflglldt"], [7,9,"v","vvvvvvmvcq"], [5,7,"r","rrzcwsmrrgrwxnrg"], [14,16,"t","twttpttntttttttlt"], [7,14,"j","qjsmcdzdqjgjpjjcjj"], [2,3,"s","sshscbks"], [3,10,"p","vppkpwpplpvp"], [2,5,"t","ftrrt"], [3,7,"c","cgrsczccpcpcc"], [9,10,"v","vvvvvvvvvxvvvvv"], [2,3,"v","vvsvw"], [9,11,"d","dddddxdjddbd"], [3,4,"p","pdpgrpj"], [9,10,"p","pwppppwpvpp"], [4,18,"r","hmrdmwvrnggrcgrsrrwg"], [3,4,"n","nnnnnf"], [1,8,"x","tblrxhhxwjb"], [10,19,"f","ffbffffpfffhfksflfkf"], [5,12,"s","sssjtsssssss"], [5,6,"z","zzzzfz"], [7,8,"n","nfnnnnrn"], [8,9,"x","xxxcxxxxx"], [4,8,"x","tcdxxxxdx"], [3,4,"x","xxwc"], [6,8,"h","whnhrvdlhhhhhhhxkd"], [14,15,"q","qqqjqmrnnqktdtq"], [5,9,"f","fhffkhfxhc"], [6,8,"c","cccccccwc"], [17,19,"s","ssssssssssmssssszss"], [10,12,"f","hffffffffzff"], [6,7,"k","nkmkkdkk"], [4,9,"v","bvvvvvxvwnvcv"], [19,20,"v","vvvvvvvvvvvvvvvvvvvv"], [4,8,"h","nhnhhhhvtvfh"], [12,13,"l","lltllllllllqll"], [13,17,"s","ssssssssssssnsssgs"], [6,9,"g","gdvctgcgzgrgf"], [13,15,"w","wwwwwwwwwwwwswb"], [4,8,"l","lllfllcglllljl"], [8,9,"q","flqqqqqrrqq"], [4,5,"w","wwwmww"], [2,5,"v","dqkgvhlmqvv"], [6,8,"g","gvtggvgg"], [3,11,"t","ntvttnqtgltttttt"], [3,7,"m","mmqmjmmm"], [9,13,"d","dddzddddddddndd"], [3,7,"j","jjqjhjt"], [13,14,"q","qqqqqqqqqqqqbq"], [5,11,"x","lxxxhxxxckxx"], [5,6,"q","qnqqqwqqq"], [2,5,"z","hzzskzzckj"], [2,3,"j","jjzm"], [3,4,"g","wggs"], [1,3,"v","vzsbsvv"], [2,4,"z","mrnz"], [16,19,"x","fxxxxbxxxxxxxxjxxxf"], [6,7,"x","xxxxxtx"], [1,6,"v","qvrvvvv"], [4,5,"w","hwwdww"], [3,4,"d","tljd"], [6,13,"v","nvcdjvjrvvvmqj"], [6,10,"v","gfqjlnxfvhw"], [6,8,"f","kzvffvffff"], [5,6,"r","rvrctrrwcrvr"], [6,11,"s","csfcvsxhgcsvh"], [8,11,"b","bbbwwmdbbbjjbtb"], [5,13,"x","lvxxbvtxbhvdx"], [3,6,"h","dhhhvmscwwbhbrbk"], [4,5,"s","gmpqsw"], [2,12,"z","pzncbwqpfbhsfzzz"], [5,6,"w","dwwbwqhgb"], [2,13,"l","llllllllllllcllllll"], [1,9,"v","vjjvvvvnvvvtvvd"], [12,14,"f","ffjffzftfcfrffbf"], [2,5,"b","brwzbs"], [6,10,"s","tnfszsnjvbwzzhtwqg"], [5,6,"p","pfkppppppppp"], [3,5,"n","vstnnnprjn"], [9,18,"s","sssssssssssssssssr"], [1,6,"d","wdldddnvdndfqvd"], [3,5,"t","kttjlcpttzt"], [5,7,"z","zzzzhlzz"], [2,9,"p","ppppppppjp"], [7,9,"v","vvzvvvvvvvvcv"], [3,6,"r","zrrtrrfpwgzbrtskt"], [9,12,"s","mptshmsssssslssss"], [5,10,"c","nccmccchjjthdtlcj"], [18,20,"r","rrrrrrrrrmrrrrrrrxrr"], [2,14,"f","frplctstcgdfff"], [9,15,"h","hfhzhhhhhvmfjhhfjhhh"], [1,6,"w","wwwwrpm"], [4,6,"f","hfffhcfjfszdzbbg"], [7,10,"w","xwwwwzhwrpwkw"], [9,10,"r","rrrrrrrrzr"], [14,16,"n","pngnnnnnnvnnnnnsnn"], [14,15,"p","gppppdpppjppzptpppp"], [1,4,"n","wnnnnnn"], [12,13,"t","tttttttttttgt"], [4,5,"n","nnwsd"], [9,10,"l","vlllllllln"], [5,16,"p","pppfxpxpspppmpkgppp"], [1,10,"v","vlvvtvlkvmgcdwvvtrv"], [14,15,"s","ssssssssjssskrg"], [4,5,"n","gxnnnn"], [4,10,"b","lvbqbjbbbbw"], [5,6,"k","xkrkfldcs"], [5,6,"n","nnsnnznfjnf"], [6,9,"v","gqvvmvvvpb"], [14,18,"f","sdffffwffflffsfffn"], [2,4,"m","mmdm"], [11,12,"g","ggnmgdmfhrpgzgr"], [14,15,"z","zzzzzzhzzzzzmzcz"], [7,13,"s","ssssssstssssj"], [4,6,"g","zgtbcg"], [2,7,"t","rttskmdpmvk"], [6,20,"n","nnkpnnnlnfnnbnpnnnnm"], [9,10,"w","zfpwwhwjwdwwwpwwjww"], [3,9,"d","ddldddddwdddd"], [4,5,"f","hfftmfcq"], [1,2,"w","zwbjt"], [7,11,"g","cggggkxggvgggtbmm"], [5,9,"d","dwgfdltddgndwd"], [3,4,"b","rbrbb"], [6,10,"z","fzzzzxzzkzxz"], [4,5,"z","zzhzjzffcz"], [8,10,"x","wwsxdbkxgd"], [9,10,"t","lttttfttdtttc"], [13,17,"d","dddddddtdnddddddrdd"], [13,15,"w","wwcwwwwwwwwwlwdwq"], [4,18,"r","rvrrrkwtrmrbrrrzfwlj"], [11,14,"j","jxjjjjjjtjjjjjv"], [8,15,"m","mkmmlmmmmmmmmrqmmm"], [1,3,"g","gsng"], [3,11,"n","ttdplnfpkmnrwcrqwbvr"], [5,10,"n","wgnqrlcnnnnnnn"], [7,9,"c","jgwbrcclt"], [1,4,"l","flml"], [8,13,"s","sjssqssrgssrz"], [6,7,"x","xlxbclxxxzxbwqx"], [12,19,"g","qlzcctgmgfmrvxgwvgzj"], [4,5,"w","wwwrr"], [11,18,"m","kmgxmjskmmmmmmmmmz"], [12,16,"f","ffqlfhzflqffffkfz"], [1,6,"k","kzkhrfxkkk"], [10,11,"x","vxfxxxbxxxxx"], [4,6,"d","gvqdwrclzsdmhglrz"], [5,9,"d","dwjddjddd"], [1,3,"n","ndcqcn"], [4,5,"r","rrrrh"], [5,10,"g","pkbxgvczgn"], [4,6,"w","wggwpfww"], [2,4,"g","glgggg"], [7,8,"h","hhhhhhhh"], [12,16,"h","nkvzdqlbsptvnrzh"], [8,14,"w","bwlwbwghwwwwtwwl"], [4,11,"q","vqsllpqnqdcbbtvqrqxb"], [2,5,"x","xkxxx"], [4,10,"c","cccjncjsccr"], [10,18,"h","xkswshrhghxlnmhqzr"], [5,18,"k","kkkkkkkhkkkklkkkknk"], [9,10,"t","ttttttttnt"], [10,11,"x","xxxxxxxxxcv"],
# Rename this to keys.py if running locally, # and replace the API keys with your own information. # This project uses an EC2 instance with # Elasticache providing the redis broker and an # RDS instance of postgresql. EMAIL_HOST_USER = '[email protected]' EMAIL_HOST_PASSWORD = 'YOUR_EMAIL_PASSWORD' SETTINGS_KEY = 'YOUR_SETTINGS_KEY' SITE_URL = 'LOCALHOST_OR_YOUR_URL' TWILIO_SID = 'YOUR_TWILIO_SID' TWILIO_TOKEN = 'YOUR_TWILIO_TOKEN' SERVER_NUMBER = 'YOUR_TWILIO_NUMBER' TWILIO_CALLBACK_URL = 'http://YOUR_SITE_URL.com/api/calls/call_data/' TWITTER_CONS_KEY = 'YOUR_TWITTER_CONSUMER_KEY' TWITTER_SECRET = 'YOUR_TWITTER_SECRET_KEY' TWITTER_TOKEN_KEY = 'YOUR_TWITTER_TOKEN_KEY' TWITTER_TOKEN_SECRET = 'YOUR_TWITTER_TOKEN_SECRET' TWITTER_SCREEN_NAME = 'YOUR_TWITTER_HANDLE' POSTGRES_PW = 'YOUR_POSTGRES_PASSWORD' POSTGRES_USER = 'YOUR_POSTGRES_USER' POSTGRES_NAME = 'YOUR_POSTGRES_NAME' POSTGRES_HOST = 'YOUR_POSTGRES_AWS_URL' POSTGRES_PORT = 'YOUR_POSTGRES_PORT'
a = [2, 3] for n in range(5, 10 ** 7, 2): i = 1 while a[i] <= n ** .5: if n % a[i] == 0: break i = i + 1 else: a.append(n) print(a)
listaMaster = [[], []] for c in range(1, 8): num = int(input(f'Digite o {c}º valor: ')) if num % 2 == 0: listaMaster[0].append(num) else: listaMaster[1].append(num) listaMaster[0].sort() listaMaster[1].sort() print('==-' * 10) print(f'Os valores pares: {listaMaster[0]}') print(f'Os valores ímpares: {listaMaster[1]}')
# Time: O(n + m), m is the number of targets # Space: O(n) class Solution(object): def findReplaceString(self, S, indexes, sources, targets): """ :type S: str :type indexes: List[int] :type sources: List[str] :type targets: List[str] :rtype: str """ S = list(S) bucket = [None] * len(S) for i in xrange(len(indexes)): if all(indexes[i]+k < len(S) and S[indexes[i]+k] == sources[i][k] for k in xrange(len(sources[i]))): bucket[indexes[i]] = (len(sources[i]), list(targets[i])) result = [] last = 0 for i in xrange(len(S)): if bucket[i]: result.extend(bucket[i][1]) last = i + bucket[i][0] elif i >= last: result.append(S[i]) return "".join(result) # Time: O(mlogm + m * n) # Space: O(n + m) class Solution2(object): def findReplaceString(self, S, indexes, sources, targets): """ :type S: str :type indexes: List[int] :type sources: List[str] :type targets: List[str] :rtype: str """ for i, s, t in sorted(zip(indexes, sources, targets), reverse=True): if S[i:i+len(s)] == s: S = S[:i] + t + S[i+len(s):] return S
# Crie um programa que simule o funcionamento de um caixa eletrônico. # No início, pergunte ao usuário qual será o valor a ser sacado (número inteiro) e # o programa vai informar quantas cédulas de cada valor serão entregues. OBS: # # considere que o caixa possui cédulas de R$50, R$20, R$10 e R$1. print('=' * 30) print('{:^30}'.format('BANCO CEV')) print('=' * 30) valor = int(input('Qual valor você deseja sacar? R$')) total = valor cédula = 50 totced = 0 while True: if total >= cédula: total -= cédula totced += 1 else: if totced > 0: print(f'Total de {totced} cédulas de {cédula}') if cédula == 50: cédula = 20 elif cédula == 20: cédula = 10 elif cédula == 10: cédula = 1 totced = 0 if total == 0: break
""" The Procedure to add new version: 1.New Version created 2.Add the new version to GATHER_COMMANDS_VERSION dictionary 3.Ask the developer about new files on new version 4.Add file names to relevant list OCS4.6 Link: https://github.com/openshift/ocs-operator/blob/fefc8a0e04e314801809df2e5292a20fae8456b8/must-gather/collection-scripts/ OCS4.5 Link: https://github.com/openshift/ocs-operator/blob/de48c9c00f8964f0f8813d7b3ddd25f7bc318449/must-gather/collection-scripts/ """ GATHER_COMMANDS_CEPH = [ "ceph-volume_raw_list", "ceph_auth_list", "ceph_balancer_status", "ceph_config-key_ls", "ceph_config_dump", "ceph_crash_stat", "ceph_device_ls", "ceph_df", "ceph_fs_dump", "ceph_fs_ls", "ceph_fs_status", "ceph_fs_subvolume_ls_ocs-storagecluster-cephfilesystem_csi", "ceph_fs_subvolumegroup_ls_ocs-storagecluster-cephfilesystem", "ceph_health_detail", "ceph_mds_stat", "ceph_mgr_dump", "ceph_mgr_module_ls", "ceph_mgr_services", "ceph_mon_dump", "ceph_mon_stat", "ceph_osd_blocked-by", "ceph_osd_crush_class_ls", "ceph_osd_crush_dump", "ceph_osd_crush_rule_dump", "ceph_osd_crush_rule_ls", "ceph_osd_crush_show-tunables", "ceph_osd_crush_weight-set_dump", "ceph_osd_df", "ceph_osd_df_tree", "ceph_osd_dump", "ceph_osd_getmaxosd", "ceph_osd_lspools", "ceph_osd_numa-status", "ceph_osd_perf", "ceph_osd_pool_ls_detail", "ceph_osd_stat", "ceph_osd_tree", "ceph_osd_utilization", "ceph_pg_dump", "ceph_pg_stat", "ceph_progress", "ceph_quorum_status", "ceph_report", "ceph_service_dump", "ceph_status", "ceph_time-sync-status", "ceph_versions", ] GATHER_COMMANDS_JSON = [ "ceph_auth_list_--format_json-pretty", "ceph_balancer_pool_ls_--format_json-pretty", "ceph_balancer_status_--format_json-pretty", "ceph_config-key_ls_--format_json-pretty", "ceph_config_dump_--format_json-pretty", "ceph_crash_ls_--format_json-pretty", "ceph_crash_stat_--format_json-pretty", "ceph_device_ls_--format_json-pretty", "ceph_df_--format_json-pretty", "ceph_fs_dump_--format_json-pretty", "ceph_fs_ls_--format_json-pretty", "ceph_fs_status_--format_json-pretty", "ceph_fs_subvolume_ls_ocs-storagecluster-cephfilesystem_csi_--format_json-pretty", "ceph_fs_subvolumegroup_ls_ocs-storagecluster-cephfilesystem_--format_json-pretty", "ceph_health_detail_--format_json-pretty", "ceph_mds_stat_--format_json-pretty", "ceph_mgr_dump_--format_json-pretty", "ceph_mgr_module_ls_--format_json-pretty", "ceph_mgr_services_--format_json-pretty", "ceph_mon_dump_--format_json-pretty", "ceph_mon_stat_--format_json-pretty", "ceph_osd_blacklist_ls_--format_json-pretty", "ceph_osd_blocked-by_--format_json-pretty", "ceph_osd_crush_class_ls_--format_json-pretty", "ceph_osd_crush_dump_--format_json-pretty", "ceph_osd_crush_rule_dump_--format_json-pretty", "ceph_osd_crush_rule_ls_--format_json-pretty", "ceph_osd_crush_show-tunables_--format_json-pretty", "ceph_osd_crush_weight-set_dump_--format_json-pretty", "ceph_osd_crush_weight-set_ls_--format_json-pretty", "ceph_osd_df_--format_json-pretty", "ceph_osd_df_tree_--format_json-pretty", "ceph_osd_dump_--format_json-pretty", "ceph_osd_getmaxosd_--format_json-pretty", "ceph_osd_lspools_--format_json-pretty", "ceph_osd_numa-status_--format_json-pretty", "ceph_osd_perf_--format_json-pretty", "ceph_osd_pool_ls_detail_--format_json-pretty", "ceph_osd_stat_--format_json-pretty", "ceph_osd_tree_--format_json-pretty", "ceph_osd_utilization_--format_json-pretty", "ceph_pg_dump_--format_json-pretty", "ceph_pg_stat_--format_json-pretty", "ceph_progress_--format_json-pretty", "ceph_progress_json", "ceph_progress_json_--format_json-pretty", "ceph_quorum_status_--format_json-pretty", "ceph_report_--format_json-pretty", "ceph_service_dump_--format_json-pretty", "ceph_status_--format_json-pretty", "ceph_time-sync-status_--format_json-pretty", "ceph_versions_--format_json-pretty", ] GATHER_COMMANDS_OTHERS = [ "buildconfigs.yaml", "builds.yaml", "configmaps.yaml", "cronjobs.yaml", "daemonsets.yaml", "db-noobaa-db-0.yaml", "deploymentconfigs.yaml", "deployments.yaml", "endpoints.yaml", "events.yaml", "horizontalpodautoscalers.yaml", "imagestreams.yaml", "jobs.yaml", "my-alertmanager-claim-alertmanager-main-0.yaml", "my-alertmanager-claim-alertmanager-main-1.yaml", "my-alertmanager-claim-alertmanager-main-2.yaml", "my-prometheus-claim-prometheus-k8s-0.yaml", "my-prometheus-claim-prometheus-k8s-1.yaml", "noobaa-core-0.log", "noobaa-core-0.yaml", "noobaa-db-0.log", "noobaa-db-0.yaml", "noobaa-default-backing-store.yaml", "noobaa-default-bucket-class.yaml", "noobaa.yaml", "ocs-storagecluster-cephblockpool.yaml", "ocs-storagecluster-cephcluster.yaml", "ocs-storagecluster-cephfilesystem.yaml", "openshift-storage.yaml", "persistentvolumeclaims.yaml", "pods.yaml", "pools_rbd_ocs-storagecluster-cephblockpool", "registry-cephfs-rwx-pvc.yaml", "replicasets.yaml", "replicationcontrollers.yaml", "routes.yaml", "secrets.yaml", "services.yaml", "statefulsets.yaml", "storagecluster.yaml", ] GATHER_COMMANDS_CEPH_4_5 = [ "ceph_osd_blacklist_ls", ] GATHER_COMMANDS_JSON_4_5 = [] GATHER_COMMANDS_OTHERS_4_5 = [ "describe_nodes", "describe_pods_-n_openshift-storage", "get_clusterversion_-oyaml", "get_csv_-n_openshift-storage", "get_events_-n_openshift-storage", "get_infrastructures.config_-oyaml", "get_installplan_-n_openshift-storage", "get_nodes_--show-labels", "get_pods_-owide_-n_openshift-storage", "get_pv", "get_pvc_--all-namespaces", "get_sc", "get_subscription_-n_openshift-storage", ] GATHER_COMMANDS_CEPH_4_6 = [] GATHER_COMMANDS_JSON_4_6 = [] GATHER_COMMANDS_OTHERS_4_6 = [ "volumesnapshotclass", "storagecluster", "get_clusterrole", "desc_clusterrole", "desc_nodes", "get_infrastructures.config", "get_clusterrolebinding", "desc_pv", "get_clusterversion", "get_sc", "desc_clusterrolebinding", "get_nodes_-o_wide_--show-labels", "desc_clusterversion", "get_pv", "desc_sc", "desc_infrastructures.config", "csv", "rolebinding", "all", "role", "storagecluster.yaml", "admin.yaml", "aggregate-olm-edit.yaml", "aggregate-olm-view.yaml", "alertmanager-main.yaml", "alertmanager-main.yaml", "backingstores.noobaa.io-v1alpha1-admin.yaml", "backingstores.noobaa.io-v1alpha1-crdview.yaml", "backingstores.noobaa.io-v1alpha1-edit.yaml", "backingstores.noobaa.io-v1alpha1-view.yaml", "basic-user.yaml", "basic-users.yaml", "bucketclasses.noobaa.io-v1alpha1-admin.yaml", "bucketclasses.noobaa.io-v1alpha1-crdview.yaml", "bucketclasses.noobaa.io-v1alpha1-edit.yaml", "bucketclasses.noobaa.io-v1alpha1-view.yaml", "cephblockpools.ceph.rook.io-v1-admin.yaml", "cephblockpools.ceph.rook.io-v1-crdview.yaml", "cephblockpools.ceph.rook.io-v1-edit.yaml", "cephblockpools.ceph.rook.io-v1-view.yaml", "cephclients.ceph.rook.io-v1-admin.yaml", "cephclients.ceph.rook.io-v1-crdview.yaml", "cephclients.ceph.rook.io-v1-edit.yaml", "cephclients.ceph.rook.io-v1-view.yaml", "cephclusters.ceph.rook.io-v1-admin.yaml", "cephclusters.ceph.rook.io-v1-crdview.yaml", "cephclusters.ceph.rook.io-v1-edit.yaml", "cephclusters.ceph.rook.io-v1-view.yaml", "cephfilesystems.ceph.rook.io-v1-admin.yaml", "cephfilesystems.ceph.rook.io-v1-crdview.yaml", "cephfilesystems.ceph.rook.io-v1-edit.yaml", "cephfilesystems.ceph.rook.io-v1-view.yaml", "cephnfses.ceph.rook.io-v1-admin.yaml", "cephnfses.ceph.rook.io-v1-crdview.yaml", "cephnfses.ceph.rook.io-v1-edit.yaml", "cephnfses.ceph.rook.io-v1-view.yaml", "cephobjectrealms.ceph.rook.io-v1-admin.yaml", "cephobjectrealms.ceph.rook.io-v1-crdview.yaml", "cephobjectrealms.ceph.rook.io-v1-edit.yaml", "cephobjectrealms.ceph.rook.io-v1-view.yaml", "cephobjectstores.ceph.rook.io-v1-admin.yaml", "cephobjectstores.ceph.rook.io-v1-crdview.yaml", "cephobjectstores.ceph.rook.io-v1-edit.yaml", "cephobjectstores.ceph.rook.io-v1-view.yaml", "cephobjectstoreusers.ceph.rook.io-v1-admin.yaml", "cephobjectstoreusers.ceph.rook.io-v1-crdview.yaml", "cephobjectstoreusers.ceph.rook.io-v1-edit.yaml", "cephobjectstoreusers.ceph.rook.io-v1-view.yaml", "cephobjectzonegroups.ceph.rook.io-v1-admin.yaml", "cephobjectzonegroups.ceph.rook.io-v1-crdview.yaml", "cephobjectzonegroups.ceph.rook.io-v1-edit.yaml", "cephobjectzonegroups.ceph.rook.io-v1-view.yaml", "cephobjectzones.ceph.rook.io-v1-admin.yaml", "cephobjectzones.ceph.rook.io-v1-crdview.yaml", "cephobjectzones.ceph.rook.io-v1-edit.yaml", "cephobjectzones.ceph.rook.io-v1-view.yaml", "cephrbdmirrors.ceph.rook.io-v1-admin.yaml", "cephrbdmirrors.ceph.rook.io-v1-crdview.yaml", "cephrbdmirrors.ceph.rook.io-v1-edit.yaml", "cephrbdmirrors.ceph.rook.io-v1-view.yaml", "cloud-credential-operator-role.yaml", "cloud-credential-operator-rolebinding.yaml", "cluster-admin.yaml", "cluster-admin.yaml", "cluster-admins.yaml", "cluster-autoscaler-operator.yaml", "cluster-autoscaler-operator.yaml", "cluster-autoscaler-operator:cluster-reader.yaml", "cluster-autoscaler.yaml", "cluster-autoscaler.yaml", "cluster-debugger.yaml", "cluster-image-registry-operator.yaml", "cluster-monitoring-operator.yaml", "cluster-monitoring-operator.yaml", "cluster-monitoring-view.yaml", "cluster-node-tuning-operator.yaml", "cluster-node-tuning-operator.yaml", "cluster-node-tuning:tuned.yaml", "cluster-node-tuning:tuned.yaml", "cluster-reader.yaml", "cluster-readers.yaml", "cluster-samples-operator-proxy-reader.yaml", "cluster-samples-operator-proxy-reader.yaml", "cluster-samples-operator.yaml", "cluster-samples-operator.yaml", "cluster-status-binding.yaml", "cluster-status.yaml", "cluster-storage-operator-role.yaml", "cluster-version-operator.yaml", "cluster.yaml", "console-extensions-reader.yaml", "console-extensions-reader.yaml", "console-operator-auth-delegator.yaml", "console-operator.yaml", "console-operator.yaml", "console.yaml", "console.yaml", "default-account-cluster-image-registry-operator.yaml", "default-account-cluster-network-operator.yaml", "default-account-openshift-machine-config-operator.yaml", "endpointslices.yaml", "events", "insights-operator-auth.yaml", "insights-operator-gather-reader.yaml", "insights-operator-gather.yaml", "insights-operator-gather.yaml", "insights-operator.yaml", "insights-operator.yaml", "installplan", "node-exporter.yaml", "node-exporter.yaml", "ocs-storagecluster-cephfs.yaml", "ocs-storagecluster-cephfsplugin-snapclass.yaml", "ocs-storagecluster-rbdplugin-snapclass.yaml", "ocsinitializations.ocs.openshift.io-v1-admin.yaml", "ocsinitializations.ocs.openshift.io-v1-crdview.yaml", "ocsinitializations.ocs.openshift.io-v1-edit.yaml", "ocsinitializations.ocs.openshift.io-v1-view.yaml", "olm-operator-binding-openshift-operator-lifecycle-manager.yaml", "olm-operators-admin.yaml", "olm-operators-edit.yaml", "olm-operators-view.yaml", "openshift-cluster-monitoring-admin.yaml", "openshift-cluster-monitoring-edit.yaml", "openshift-cluster-monitoring-view.yaml", "openshift-csi-snapshot-controller-role.yaml", "openshift-csi-snapshot-controller-runner.yaml", "openshift-dns-operator.yaml", "openshift-dns-operator.yaml", "openshift-dns.yaml", "openshift-dns.yaml", "openshift-image-registry-pruner.yaml", "openshift-ingress-operator.yaml", "openshift-ingress-operator.yaml", "openshift-ingress-router.yaml", "openshift-ingress-router.yaml", "openshift-sdn-controller.yaml", "openshift-sdn-controller.yaml", "openshift-sdn.yaml", "openshift-sdn.yaml", "openshift-state-metrics.yaml", "openshift-state-metrics.yaml", "openshift-storage-operatorgroup-admin.yaml", "openshift-storage-operatorgroup-edit.yaml", "openshift-storage-operatorgroup-view.yaml", "openshift-storage.noobaa.io.yaml", "operatorhub-config-reader.yaml", "packagemanifests-v1-admin.yaml", "packagemanifests-v1-edit.yaml", "packagemanifests-v1-view.yaml", "packageserver-service-system:auth-delegator.yaml", "pods", "pods_-owide", "prometheus-adapter-view.yaml", "prometheus-adapter.yaml", "prometheus-adapter.yaml", "prometheus-k8s.yaml", "prometheus-k8s.yaml", "prometheus-operator.yaml", "prometheus-operator.yaml", "pvc_all_namespaces", "registry-admin.yaml", "registry-editor.yaml", "registry-monitoring.yaml", "registry-monitoring.yaml", "registry-registry-role.yaml", "registry-viewer.yaml", "self-access-reviewer.yaml", "self-access-reviewers.yaml", "self-provisioner.yaml", "self-provisioners.yaml", "storage-admin.yaml", "storage-version-migration-migrator.yaml", "storagecluster", "storageclusters.ocs.openshift.io-v1-admin.yaml", "storageclusters.ocs.openshift.io-v1-crdview.yaml", "storageclusters.ocs.openshift.io-v1-edit.yaml", "storageclusters.ocs.openshift.io-v1-view.yaml", "subscription", "sudoer.yaml", "system-bootstrap-node-bootstrapper.yaml", "system-bootstrap-node-renewal.yaml", "system:aggregate-to-admin.yaml", "system:aggregate-to-edit.yaml", "system:aggregate-to-view.yaml", "system:aggregated-metrics-reader.yaml", "system:auth-delegator.yaml", "system:basic-user.yaml", "system:basic-user.yaml", "system:build-strategy-custom.yaml", "system:build-strategy-docker-binding.yaml", "system:build-strategy-docker.yaml", "system:build-strategy-jenkinspipeline-binding.yaml", "system:build-strategy-jenkinspipeline.yaml", "system:build-strategy-source-binding.yaml", "system:build-strategy-source.yaml", "system:certificates.k8s.io:certificatesigningrequests:nodeclient.yaml", "system:certificates.k8s.io:certificatesigningrequests:selfnodeclient.yaml", "system:certificates.k8s.io:kube-apiserver-client-approver.yaml", "system:certificates.k8s.io:kube-apiserver-client-kubelet-approver.yaml", "system:certificates.k8s.io:kubelet-serving-approver.yaml", "system:certificates.k8s.io:legacy-unknown-approver.yaml", "system:controller:attachdetach-controller.yaml", "system:controller:attachdetach-controller.yaml", "system:controller:certificate-controller.yaml", "system:controller:certificate-controller.yaml", "system:controller:clusterrole-aggregation-controller.yaml", "system:controller:clusterrole-aggregation-controller.yaml", "system:controller:cronjob-controller.yaml", "system:controller:cronjob-controller.yaml", "system:controller:daemon-set-controller.yaml", "system:controller:daemon-set-controller.yaml", "system:controller:deployment-controller.yaml", "system:controller:deployment-controller.yaml", "system:controller:disruption-controller.yaml", "system:controller:disruption-controller.yaml", "system:controller:endpoint-controller.yaml", "system:controller:endpoint-controller.yaml", "system:controller:endpointslice-controller.yaml", "system:controller:endpointslice-controller.yaml", "system:controller:endpointslicemirroring-controller.yaml", "system:controller:endpointslicemirroring-controller.yaml", "system:controller:expand-controller.yaml", "system:controller:expand-controller.yaml", "system:controller:generic-garbage-collector.yaml", "system:controller:generic-garbage-collector.yaml", "system:controller:horizontal-pod-autoscaler.yaml", "system:controller:horizontal-pod-autoscaler.yaml", "system:controller:job-controller.yaml", "system:controller:job-controller.yaml", "system:controller:namespace-controller.yaml", "system:controller:namespace-controller.yaml", "system:controller:node-controller.yaml", "system:controller:node-controller.yaml", "system:controller:operator-lifecycle-manager.yaml", "system:controller:persistent-volume-binder.yaml", "system:controller:persistent-volume-binder.yaml", "system:controller:pod-garbage-collector.yaml", "system:controller:pod-garbage-collector.yaml", "system:controller:pv-protection-controller.yaml", "system:controller:pv-protection-controller.yaml", "system:controller:pvc-protection-controller.yaml", "system:controller:pvc-protection-controller.yaml", "system:controller:replicaset-controller.yaml", "system:controller:replicaset-controller.yaml", "system:controller:replication-controller.yaml", "system:controller:replication-controller.yaml", "system:controller:resourcequota-controller.yaml", "system:controller:resourcequota-controller.yaml", "system:controller:route-controller.yaml", "system:controller:route-controller.yaml", "system:controller:service-account-controller.yaml", "system:controller:service-account-controller.yaml", "system:controller:service-controller.yaml", "system:controller:service-controller.yaml", "system:controller:statefulset-controller.yaml", "system:controller:statefulset-controller.yaml", "system:controller:ttl-controller.yaml", "system:controller:ttl-controller.yaml", "system:deployer.yaml", "system:deployer.yaml", "system:discovery.yaml", "system:discovery.yaml", "system:heapster.yaml", "system:image-auditor.yaml", "system:image-builder.yaml", "system:image-builder.yaml", "system:image-pruner.yaml", "system:image-puller.yaml", "system:image-puller.yaml", "system:image-pusher.yaml", "system:image-signer.yaml", "system:kube-aggregator.yaml", "system:kube-controller-manager.yaml", "system:kube-controller-manager.yaml", "system:kube-dns.yaml", "system:kube-dns.yaml", "system:kube-scheduler.yaml", "system:kube-scheduler.yaml", "system:kubelet-api-admin.yaml", "system:master.yaml", "system:masters.yaml", "system:node-admin.yaml", "system:node-admin.yaml", "system:node-admins.yaml", "system:node-bootstrapper.yaml", "system:node-bootstrapper.yaml", "system:node-problem-detector.yaml", "system:node-proxier.yaml", "system:node-proxier.yaml", "system:node-proxiers.yaml", "system:node-reader.yaml", "system:node.yaml", "system:node.yaml", "system:oauth-token-deleter.yaml", "system:oauth-token-deleters.yaml", "system:openshift:aggregate-snapshots-to-admin.yaml", "system:openshift:aggregate-snapshots-to-basic-user.yaml", "system:openshift:aggregate-snapshots-to-storage-admin.yaml", "system:openshift:aggregate-snapshots-to-view.yaml", "system:openshift:aggregate-to-admin.yaml", "system:openshift:aggregate-to-basic-user.yaml", "system:openshift:aggregate-to-cluster-reader.yaml", "system:openshift:aggregate-to-edit.yaml", "system:openshift:aggregate-to-storage-admin.yaml", "system:openshift:aggregate-to-view.yaml", "system:openshift:cloud-credential-operator:cluster-reader.yaml", "system:openshift:cluster-config-operator:cluster-reader.yaml", "system:openshift:cluster-samples-operator:cluster-reader.yaml", "system:openshift:controller:build-config-change-controller.yaml", "system:openshift:controller:build-config-change-controller.yaml", "system:openshift:controller:build-controller.yaml", "system:openshift:controller:build-controller.yaml", "system:openshift:controller:check-endpoints-crd-reader.yaml", "system:openshift:controller:check-endpoints-node-reader.yaml", "system:openshift:controller:check-endpoints.yaml", "system:openshift:controller:cluster-quota-reconciliation-controller.yaml", "system:openshift:controller:cluster-quota-reconciliation-controller.yaml", "system:openshift:controller:default-rolebindings-controller.yaml", "system:openshift:controller:default-rolebindings-controller.yaml", "system:openshift:controller:deployer-controller.yaml", "system:openshift:controller:deployer-controller.yaml", "system:openshift:controller:deploymentconfig-controller.yaml", "system:openshift:controller:deploymentconfig-controller.yaml", "system:openshift:controller:horizontal-pod-autoscaler.yaml", "system:openshift:controller:horizontal-pod-autoscaler.yaml", "system:openshift:controller:image-import-controller.yaml", "system:openshift:controller:image-import-controller.yaml", "system:openshift:controller:image-trigger-controller.yaml", "system:openshift:controller:image-trigger-controller.yaml", "system:openshift:controller:kube-apiserver-check-endpoints-auth-delegator.yaml", "system:openshift:controller:kube-apiserver-check-endpoints-crd-reader.yaml", "system:openshift:controller:kube-apiserver-check-endpoints-node-reader.yaml", "system:openshift:controller:machine-approver.yaml", "system:openshift:controller:machine-approver.yaml", "system:openshift:controller:namespace-security-allocation-controller.yaml", "system:openshift:controller:namespace-security-allocation-controller.yaml", "system:openshift:controller:origin-namespace-controller.yaml", "system:openshift:controller:origin-namespace-controller.yaml", "system:openshift:controller:pv-recycler-controller.yaml", "system:openshift:controller:pv-recycler-controller.yaml", "system:openshift:controller:resourcequota-controller.yaml", "system:openshift:controller:resourcequota-controller.yaml", "system:openshift:controller:service-ca.yaml", "system:openshift:controller:service-ca.yaml", "system:openshift:controller:service-ingress-ip-controller.yaml", "system:openshift:controller:service-ingress-ip-controller.yaml", "system:openshift:controller:service-serving-cert-controller.yaml", "system:openshift:controller:service-serving-cert-controller.yaml", "system:openshift:controller:serviceaccount-controller.yaml", "system:openshift:controller:serviceaccount-controller.yaml", "system:openshift:controller:serviceaccount-pull-secrets-controller.yaml", "system:openshift:controller:serviceaccount-pull-secrets-controller.yaml", "system:openshift:controller:template-instance-controller.yaml", "system:openshift:controller:template-instance-controller.yaml", "system:openshift:controller:template-instance-controller:admin.yaml", "system:openshift:controller:template-instance-finalizer-controller.yaml", "system:openshift:controller:template-instance-finalizer-controller.yaml", "system:openshift:controller:template-instance-finalizer-controller:admin.yaml", "system:openshift:controller:template-service-broker.yaml", "system:openshift:controller:template-service-broker.yaml", "system:openshift:controller:unidling-controller.yaml", "system:openshift:controller:unidling-controller.yaml", "system:openshift:discovery.yaml", "system:openshift:discovery.yaml", "system:openshift:kube-controller-manager:gce-cloud-provider.yaml", "system:openshift:kube-controller-manager:gce-cloud-provider.yaml", "system:openshift:machine-config-operator:cluster-reader.yaml", "system:openshift:oauth-apiserver.yaml", "system:openshift:openshift-apiserver.yaml", "system:openshift:openshift-authentication.yaml", "system:openshift:openshift-controller-manager.yaml", "system:openshift:openshift-controller-manager.yaml", "system:openshift:openshift-controller-manager:ingress-to-route-controller.yaml", "system:openshift:openshift-controller-manager:ingress-to-route-controller.yaml", "system:openshift:operator:authentication.yaml", "system:openshift:operator:cluster-kube-scheduler-operator.yaml", "system:openshift:operator:etcd-operator.yaml", "system:openshift:operator:kube-apiserver-operator.yaml", "system:openshift:operator:kube-apiserver-recovery.yaml", "system:openshift:operator:kube-controller-manager-operator.yaml", "system:openshift:operator:kube-controller-manager-recovery.yaml", "system:openshift:operator:kube-scheduler-recovery.yaml", "system:openshift:operator:kube-scheduler:public-2.yaml", "system:openshift:operator:kube-storage-version-migrator-operator.yaml", "system:openshift:operator:openshift-apiserver-operator.yaml", "system:openshift:operator:openshift-config-operator.yaml", "system:openshift:operator:openshift-controller-manager-operator.yaml", "system:openshift:operator:openshift-etcd-installer.yaml", "system:openshift:operator:openshift-kube-apiserver-installer.yaml", "system:openshift:operator:openshift-kube-controller-manager-installer.yaml", "system:openshift:operator:openshift-kube-scheduler-installer.yaml", "system:openshift:operator:service-ca-operator.yaml", "system:openshift:public-info-viewer.yaml", "system:openshift:public-info-viewer.yaml", "system:openshift:scc:anyuid.yaml", "system:openshift:scc:hostaccess.yaml", "system:openshift:scc:hostmount.yaml", "system:openshift:scc:hostnetwork.yaml", "system:openshift:scc:nonroot.yaml", "system:openshift:scc:privileged.yaml", "system:openshift:scc:restricted.yaml", "system:openshift:templateservicebroker-client.yaml", "system:openshift:tokenreview-openshift-controller-manager.yaml", "system:openshift:tokenreview-openshift-controller-manager.yaml", "system:persistent-volume-provisioner.yaml", "system:public-info-viewer.yaml", "system:public-info-viewer.yaml", "system:registry.yaml", "system:router.yaml", "system:scope-impersonation.yaml", "system:scope-impersonation.yaml", "system:sdn-manager.yaml", "system:sdn-reader.yaml", "system:sdn-readers.yaml", "system:volume-scheduler.yaml", "system:volume-scheduler.yaml", "system:webhook.yaml", "system:webhooks.yaml", "telemeter-client-view.yaml", "telemeter-client.yaml", "telemeter-client.yaml", "thanos-querier.yaml", "thanos-querier.yaml", "version.yaml", "view.yaml", "volumesnapshotclass", "whereabouts-cni.yaml", ] GATHER_COMMANDS_OTHERS_EXTERNAL = GATHER_COMMANDS_OTHERS + [ "ocs-external-storagecluster-ceph-rbd.yaml", "ocs-external-storagecluster-ceph-rgw.yaml", "ocs-external-storagecluster-cephfs.yaml", ] GATHER_COMMANDS_OTHERS_EXTERNAL_EXCLUDE = [ "ocs-storagecluster-cephblockpool.yaml", "ocs-storagecluster-cephcluster.yaml", "ocs-storagecluster-cephfilesystem.yaml", "pools_rbd_ocs-storagecluster-cephblockpool", "ocs-storagecluster-ceph-rbd.yaml", "ocs-storagecluster-ceph-rgw.yaml", "ocs-storagecluster-cephfs.yaml", "ocs-storagecluster-cephfsplugin-snapclass.yaml", "ocs-storagecluster-rbdplugin-snapclass.yaml", ] # TODO: Remove monitoring_registry_pvc_list once issue #3465 is fixed # https://github.com/red-hat-storage/ocs-ci/issues/3465 monitoring_registry_pvc_list = [ "my-alertmanager-claim-alertmanager-main-0.yaml", "my-alertmanager-claim-alertmanager-main-1.yaml", "my-alertmanager-claim-alertmanager-main-2.yaml", "my-prometheus-claim-prometheus-k8s-0.yaml", "my-prometheus-claim-prometheus-k8s-1.yaml", "registry-cephfs-rwx-pvc.yaml", ] GATHER_COMMANDS_OTHERS_EXTERNAL_EXCLUDE.extend(monitoring_registry_pvc_list) GATHER_COMMANDS_OTHERS_EXTERNAL_4_5 = list( set(GATHER_COMMANDS_OTHERS_EXTERNAL + GATHER_COMMANDS_OTHERS_4_5) - set(GATHER_COMMANDS_OTHERS_EXTERNAL_EXCLUDE) ) GATHER_COMMANDS_OTHERS_EXTERNAL_4_6 = list( set(GATHER_COMMANDS_OTHERS_EXTERNAL + GATHER_COMMANDS_OTHERS_4_6) - set(GATHER_COMMANDS_OTHERS_EXTERNAL_EXCLUDE) ) + [ "ocs-external-storagecluster-cephfsplugin-snapclass.yaml", "ocs-external-storagecluster-rbdplugin-snapclass.yaml", ] GATHER_COMMANDS_VERSION = { 4.5: { "CEPH": GATHER_COMMANDS_CEPH + GATHER_COMMANDS_CEPH_4_5, "JSON": GATHER_COMMANDS_JSON + GATHER_COMMANDS_JSON_4_5, "OTHERS": GATHER_COMMANDS_OTHERS + GATHER_COMMANDS_OTHERS_4_5, "OTHERS_EXTERNAL": GATHER_COMMANDS_OTHERS_EXTERNAL_4_5, }, 4.6: { "CEPH": GATHER_COMMANDS_CEPH + GATHER_COMMANDS_CEPH_4_6, "JSON": GATHER_COMMANDS_JSON + GATHER_COMMANDS_JSON_4_6, "OTHERS": GATHER_COMMANDS_OTHERS + GATHER_COMMANDS_OTHERS_4_6, "OTHERS_EXTERNAL": GATHER_COMMANDS_OTHERS_EXTERNAL_4_6, }, }
""" Write a function named uses_only that takes a word and a string of letters, and that returns True if the word contains only letters in the list. Can you make a sentence using only the letters acefhlo? Other than “Hoe alfalfa”? """ def uses_only(word, only): for letter in word.lower(): if letter not in only: return False return True only_letters = str(input("\nEnter a string with the allowed letters: ")).lower() words_allowed = 0 fin = open('think-python-2e-exercises/words.txt') for line in fin: word = line.strip() if uses_only(word, only_letters): words_allowed += 1 print(f"\nThere are {words_allowed} words that use only the letters in '{only_letters}'.")
def extract_coupon(description): coupon = '' for s in range(len(description)): if description[s].isnumeric() or description[s] == '.': coupon = coupon + description[s] #print(c) if description[s] == '%': break try: float(coupon) except: coupon = coupon[1:] float(coupon) return coupon
key = [int(num) for num in input().split()] data = input() length = len(key) results_dict = {} while not data == 'find': message = "" counter = 0 for el in data: if counter == length: counter = 0 asc = ord(el) asc -= key[counter] ord_asc = chr(asc) message += ord_asc counter += 1 find_item = message.find('&') find_position = message.find('<') type_found = "" coordinates = "" for sym in range(find_item + 1, len(message) + 1): if message[sym] == "&": break type_found += message[sym] for sym in range(find_position + 1, len(message) + 1): if message[sym] == ">": break coordinates += message[sym] if type_found not in results_dict: results_dict[type_found] = coordinates data = input() for item, numbers in results_dict.items(): print(f"Found {item} at {numbers}")
# use the with key word to open file ass mb_object with open("mbox-short.txt", "r") as mb_object: # Iterate over each line and remove leading spaces; # print contents after converting them to uppercase for line in mb_object: line = line.strip() print(line.upper())
################ # First class functions allow us to treat functions as any other variables or objects # Closures are functions that are local inner functions within outer functions that remember the arguments passed to the outer functions ################# def square(x): return x*x def my_map_function(func , arg_list): result = [] for item in arg_list: result.append(func(item)) return result int_array = [1,2,3,4,5] f = my_map_function(square , int_array) #print(f) #print(my_map_function(square , int_array)) def logger(msg): def log_message(): print('Log:' , msg) return log_message log_hi = logger('Hi') log_hi() #Closure Example def my_log(msg): def logging(*args): print('Log Message {} , Logging Message {} '.format(msg , args)) return logging log_hi = my_log('Console 1') log_hi('Hi')
#Faça um Programa que leia um vetor de 10 números reais #e mostre-os na ordem inversa. vetor=[] for c in range(0,5): vetor.append(int(input("Informe um numero: "))) print(vetor) vetor.reverse() print(vetor)
class AbstractPlayer: def __init__(self): raise NotImplementedError() def explain(self, word, n_words): raise NotImplementedError() def guess(self, words, n_words): raise NotImplementedError() class LocalDummyPlayer(AbstractPlayer): def __init__(self): pass def explain(self, word, n_words): return "Hi! My name is LocalDummyPlayer! What's yours?".split()[:n_words] def guess(self, words, n_words): return "I guess it's a word, but don't have any idea which one!".split()[:n_words] class LocalFasttextPlayer(AbstractPlayer): def __init__(self, model): self.model = model def find_words_for_sentence(self, sentence, n_closest): neighbours = self.model.get_nearest_neighbors(sentence) words = [word for similariry, word in neighbours][:n_closest] return words def explain(self, word, n_words): return self.find_words_for_sentence(word, n_words) def guess(self, words, n_words): words_for_sentence = self.find_words_for_sentence(" ".join(words), n_words) return words_for_sentence
""" 1108. Defanging an IP Address Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" Output: "1[.]1[.]1[.]1" Example 2: Input: address = "255.100.50.0" Output: "255[.]100[.]50[.]0" Constraints: The given address is a valid IPv4 address. """ class Solution(object): def defangIPaddr(self, address): """ :type address: str :rtype: str """ return address.replace(".","[.]")
def dados(jog='<desconhecido>', gol=0): print(f'O jogador {jog} fez {gol} gol(s) no campeonato!') jogador = str(input('Nome do jogador: ')) gols = str(input('Número de gols: ')) if gols.isnumeric(): gols = int(gols) else: gols = 0 if jogador.strip() == '': dados(gol=gols) else: dados(jogador, gols)
# coding: utf-8 def g(): n = 0 r = yield while r != 'exit': n += 1 r = yield n return 'over' def f(g): g.send(None) while True: s = input('press [exit] to stop: ') try: n = g.send(s) print('natural number:', n) except StopIteration as e: print('return value:', e.value) break f(g())
# Acesso as elementos da tupla numeros = 1,2,3,5,7,11 print(numeros[0]) print(numeros[1]) print(numeros[2]) print(numeros[3]) print(numeros[4]) print(numeros[5])
__title__ = 'contactTree-api' __package_name = 'contactTree-api' __version__ = '0.1.0' __description__ = '' __author__ = 'Dionisis Pettas' __email__ = '' __github__ = 'https://github.com/deepettas/contact-tree' __licence__ = 'MIT'
def add_native_methods(clazz): def nOpen__int__(a0, a1): raise NotImplementedError() def nClose__long__(a0, a1): raise NotImplementedError() def nSendShortMessage__long__int__long__(a0, a1, a2, a3): raise NotImplementedError() def nSendLongMessage__long__byte____int__long__(a0, a1, a2, a3, a4): raise NotImplementedError() def nGetTimeStamp__long__(a0, a1): raise NotImplementedError() clazz.nOpen__int__ = nOpen__int__ clazz.nClose__long__ = nClose__long__ clazz.nSendShortMessage__long__int__long__ = nSendShortMessage__long__int__long__ clazz.nSendLongMessage__long__byte____int__long__ = nSendLongMessage__long__byte____int__long__ clazz.nGetTimeStamp__long__ = nGetTimeStamp__long__
""" django: https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts https://docs.djangoproject.com/en/3.0/ref/settings/#internal-ips """ ALLOWED_HOSTS = "*" INTERNAL_IPS = ("127.0.0.1", "localhost", "172.18.0.1")
i = 4 # variation on testWhile.py while (i < 9): i = i+2 print(i)
"""TODO Ecrire un paquet de tools Ecrire un outil XSS Ecrire un README avec https://github.com/RichardLitt/standard-readme/blob/master/README.md Completer touts les script avec PayloadAllTheThing pour ajouter des payloads a chaque exploit Rassembler toutes les LFI dans une classe / pareil pour les RFI -Faire un analyser pour le dispatcher (analyser l'url, la page, recuperer des forms, ect...) (en sortie une liste de dictionnaire avec {'url':url,'exploit':['XSS','LFI','PHP_ASSERT']} -Faire un dispatcher pour le crawler """
class RelayOutput: def enable_relay(self, name: str): pass def reset(self): pass
''' Create a tuple with some words. Show for each word its vowels. ''' vowels = ('a', 'e', 'i', 'o', 'u') words = ( 'Learn', 'Programming', 'Language', 'Python', 'Course', 'Free', 'Study', 'Practice', 'Work', 'Market', 'Programmer', 'Future' ) for word in words: print(f'\nThe word \033[34m{word}\033[m contains', end=' -> ') for letter in word: if letter in vowels: print(f'\033[32m{letter}\033[m', end=' ')
f = open('surf.txt') maior = 0 for linha in f: nome, pontos = linha.split() if float(pontos) > maior: maior = float(pontos) f.close() print (maior)
""" errors module """ class PyungoError(Exception): """ pyungo custom exception """ pass
#!/usr/bin.env python # Copyright (C) Pearson Assessments - 2020. All Rights Reserved. # Proprietary - Use with Pearson Written Permission Only memo = {} class Solution(object): def wordBreak(self, s, wordDict): """ :type s: str :type wordDict: List[str] :rtype: bool """ if s in memo: return memo[s] if len(s) == 0: return False if len(s) == 1: return (s in wordDict) if s in wordDict: return True for word in wordDict: len_word = len(word) if len_word > len(s): continue left = s[:len_word + 1] right = s[len_word + 1:] if left in wordDict: if right in wordDict: memo[s] = True return True else: right_verdict = self.wordBreak(right, wordDict) memo[s] = right_verdict if right_verdict: return True memo[s] = False return False obj = Solution() #print(obj.wordBreak("leetcode", ["leet", "code"])) print(obj.wordBreak("applepenapple", ["apple", "pen"])) #print(obj.wordBreak("a", ["apple", "pen", "a"])) #print(obj.wordBreak("catsandog", ["cats", "dog", "sand", "and", "cat"])) # print(obj.wordBreak( # "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab", # ["a","aa","aaa","aaaa","aaaaa","aaaaaa","aaaaaaa","aaaaaaaa", # "aaaaaaaaa","aaaaaaaaaa"])) print(memo)
'''https://leetcode.com/problems/palindrome-linked-list/''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None # Solution 1 # Time Complexity - O(n) # Space Complexity - O(n) class Solution: def isPalindrome(self, head: ListNode) -> bool: s = [] while head: s+= [head.val] head = head.next return s==s[::-1] # Solution 1 # Time Complexity - O(n) # Space Complexity - O(1) class Solution: def isPalindrome(self, head: ListNode) -> bool: #find mid element slow = fast = head while fast and fast.next: slow = slow.next fast = fast.next.next #reverse second half prev = None #will store the reversed array while slow: nxt = slow.next slow.next = prev prev = slow slow = nxt #compare first half and reversed second half while head and prev: if prev.val != head.val: return False head = head.next prev = prev.next return True
print('=' * 12 + 'Desafio 83' + '=' * 12) pilha = [] str = input('Digite a expressão: ') resposta = True for char in str: if char == '(': pilha.append(char) elif char == ')': if len(pilha) == 0: resposta = False break else: pilha.pop() if len(pilha) != 0: resposta = False if resposta: print('A expressão é válida!') else: print('A expressão não é válida!')
def calculate(**kwargs): operation_lookup = { 'add': kwargs.get('first', 0) + kwargs.get('second', 0), 'subtract': kwargs.get('first', 0) - kwargs.get('second', 0), 'divide': kwargs.get('first', 0) / kwargs.get('second', 1), 'multiply': kwargs.get('first', 0) * kwargs.get('second', 0) } is_float = kwargs.get('make_float', False) operation_value = operation_lookup[kwargs.get('operation', '')] if is_float: final = "{} {}".format(kwargs.get( 'message', 'The result is'), float(operation_value)) else: final = "{} {}".format(kwargs.get( 'message', 'the result is'), int(operation_value)) return final # print(calculate(make_float=False, operation='add', message='You just added', # first=2, second=4)) # "You just added 6" # print(calculate(make_float=True, operation='divide', # first=3.5, second=5)) # "The result is 0.7" def greet_boss(employee = None, boss = None): print(f"{employee} greets {boss}") names = {"boss": "Bob", "employee": "Colt"} greet_boss() greet_boss(**names) cube = lambda num: num**3 print(cube(2)) print(cube(3)) print(cube(8))
# --------------------------------------------------------------------------------------- # # Title: Permutations # # Link: https://leetcode.com/problems/permutations/ # # Difficulty: Medium # # Language: Python # # --------------------------------------------------------------------------------------- class Permutations: def permute(self, nums): return self.phelper(nums, [], []) def phelper(self, nums, x, y): for i in nums: if i not in x: x.append(i) if len(x) == len(nums): y.append(x.copy()) else: y = self.phelper(nums,x,y) del x[len(x)-1] return y if __name__ == "__main__": p = [1,2,3] z = Permutations() print( z.permute(p) )
"""Top-level package for nesc-coo.""" __author__ = """Betterme""" __email__ = '[email protected]' __version__ = '0.0.0'
"""APIv3-specific CLI settings """ __all__ = [] # Abaco settings # Aloe settings # Keys settings
''' modifier: 01 eqtime: 25 ''' def main(): info('Jan Air Script x1') gosub('jan:WaitForMiniboneAccess') gosub('jan:PrepareForAirShot') gosub('jan:EvacPipette2') gosub('common:FillPipette2') gosub('jan:PrepareForAirShotExpansion') gosub('common:ExpandPipette2')
def SaveOrder(orderDict): file = open("orderLog.txt", 'w') total = 0 for item, price in orderDict.items(): file.write(item+'-->'+str(price)+'\n') total += price file.write('Total = '+str(total)) file.close() def main(): order = { 'Pizza':100, 'Snaks':200, 'Pasta':500, 'Coke' :50 } SaveOrder(order) print("Log successfully added") main()
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # author: bigfoolliu """ 类继承 """ """ 1.让子类重写了父类的方法但是仍然调用父类的方法 """ class A(object): def show(self): print("A show") class B(A): def show(self): print("B show") class C(object): def print(self): # 输入类的名字 print('name of the class is":{}'.format(self.__class__.__name__)) if __name__ == "__main__": obj = B() obj.show() # B show obj1 = B() obj1.__class__ = A # 通过class方法指定类对象 obj1.show() # A show C().print()
# Generator A starts with 783 # Generator B starts with 325 REAL_START=[783, 325] SAMPLE_START=[65, 8921] FACTORS=[16807, 48271] DIVISOR=2147483647 # 0b1111111111111111111111111111111 2^31 def next_a_value(val, factor): while True: val = (val * factor) % DIVISOR if val & 3 == 0: return val def next_b_value(val, factor): while True: val = (val * factor) % DIVISOR if val & 7 == 0: return val def calc_16_bit_matches(times, start): matches = 0 a, b = start for i in range(times): a = next_a_value(a, FACTORS[0]) b = next_b_value(b, FACTORS[1]) if a & 0b1111111111111111 == b & 0b1111111111111111: matches +=1 return matches print(calc_16_bit_matches(5_000_000, REAL_START)) # 336
# -*- coding: utf-8 -*- class ArgumentTypeError(TypeError): pass class ArgumentValueError(ValueError): pass
""" Manage stakeholders like a pro! """ __author__ = "critical-path" __version__ = "0.1.6"
# VALIDAR SE A CIDADE DIGITADA INICIA COM O NOME SANTO: cidade = str(input('Digite a cidade em que nasceu... ')).strip() print(cidade[:5].upper() == 'SANTO')
ls = list(map(int, input().split())) count = 0 for i in ls: if ls[i] == 1: count += 1 print(count)
def abc(a,b,c): for i in a: b(a) if c(): if b(a) > 100: b(a) elif 100 > 0: b(a) else: b(a) else: b(100) return 100 def ex(): try: fh = open("testfile", "w") fh.write("a") except IOError: print("b") else: print("c") fh.close() def funa(a): b = a(3) def funab(f): return f(5) def funac(f): return f(5) def funcb(f): return funab(f) return funab(b) def funb(): while 1: for i in range(10): if 1: for j in range(100): print(j) return 1 elif 2: return 2 else: return 3 def func(): if 1: for j in range(100): print(j) return 1 elif 2: return 2 else: return 3
# 4. Write a Python program to check a list is empty or not. Take few lists with one of them empty. fruits = ['apple', 'cherry', 'pear', 'lemon', 'banana'] fruits1 = [] fruits2 = ['mango', 'strawberry', 'peach'] # print (fruits[3]) # print (fruits[-2]) # print (fruits[1]) # # # print (fruits[0]) # print (fruits) # # fruits = [] # print (fruits) fruits. append('apple') fruits.append('banana') fruits.append ('pear') fruits.append('cherry') print(fruits) fruits. append('apple') fruits.append('banana') fruits.append ('pear') fruits.append('cherry') print(fruits) # # # print (fruits[0]) # print (fruits2[2]) #
# convert taco label to detect-waste labels # based on polish recykling standards # by Katrzyna łagocka def taco_to_detectwaste(label): glass = ['Glass bottle','Broken glass','Glass jar'] metals_and_plastics = ['Aluminium foil', "Clear plastic bottle","Other plastic bottle", "Plastic bottle cap","Metal bottle cap","Aerosol","Drink can", "Food can","Drink carton","Disposable plastic cup","Other plastic cup", "Plastic lid","Metal lid","Single-use carrier bag","Polypropylene bag", "Plastic Film","Six pack rings","Spread tub","Tupperware", "Disposable food container","Other plastic container", "Plastic glooves","Plastic utensils","Pop tab","Scrap metal", "Plastic straw","Other plastic", "Plastic film", "Food Can"] non_recyclable = ["Aluminium blister pack","Carded blister pack", "Meal carton","Pizza box","Cigarette","Paper cup", "Meal carton","Foam cup","Glass cup","Wrapping paper", "Magazine paper","Garbage bag","Plastified paper bag", "Crisp packet","Other plastic wrapper","Foam food container", "Rope","Shoe","Squeezable tube","Paper straw","Styrofoam piece", "Rope & strings", "Tissues"] other = ["Battery"] paper = ["Corrugated carton","Egg carton","Toilet tube","Other carton", "Normal paper", "Paper bag"] bio = ["Food waste"] unknown = ["Unlabeled litter"] if (label in glass): label="glass" elif (label in metals_and_plastics): label="metals_and_plastics" elif(label in non_recyclable): label="non-recyclable" elif(label in other): label="other" elif (label in paper): label="paper" elif(label in bio): label="bio" elif(label in unknown): label="unknown" else: print(label, "is non-taco label") label = "unknown" return label def epi_to_detectwaste(epi_id): new_id = 6 if epi_id == 5: new_id = 0 if epi_id == 6: new_id = 1 if epi_id == 3: new_id = 2 if epi_id == 2: new_id = 3 if epi_id == 1: new_id = 4 if epi_id == 7: new_id = 5 if epi_id == 4: new_id = 6 return new_id
class Solution: def isPalindrome(self, x): """ :type x: int :rtype: bool """ y = [i for i in str(x)] y.reverse() try: y = int(''.join(y)) except ValueError: pass return x == y
include("common.py") def cyanamidationGen(): r = RuleGen("Cyanamidation") r.left.extend([ '# H2NCN', 'edge [ source 0 target 1 label "#" ]', '# The other', 'edge [ source 105 target 150 label "-" ]', ]) r.context.extend([ '# H2NCN', 'node [ id 0 label "N" ]', 'node [ id 1 label "C" ]', 'node [ id 2 label "N" ]', 'node [ id 3 label "H" ]', 'node [ id 4 label "H" ]', 'edge [ source 2 target 3 label "-" ]', 'edge [ source 2 target 4 label "-" ]', 'edge [ source 1 target 2 label "-" ]', '# The other', 'node [ id 150 label "H" ]', ]) r.right.extend([ 'edge [ source 0 target 1 label "=" ]', 'edge [ source 0 target 150 label "-" ]', 'edge [ source 1 target 105 label "-" ]', ]) rOld = r for atom in "SN": r = rOld.clone() r.name += ", %s" % atom r.context.extend([ 'node [ id 105 label "%s" ]' % atom, ]) if atom == "S": for end in "CH": r1 = r.clone() r1.name += end r1.context.extend([ '# C or H', 'node [ id 100 label "%s" ]' % end, 'edge [ source 100 target 105 label "-" ]', ]) yield r1.loadRule() continue assert atom == "N" for r in attach_2_H_C(r, 105, 100, True): yield r.loadRule() cyanamidation = [a for a in cyanamidationGen()]
number = int(input()) divider = number // 2 numbers = '' while divider != 1: if 0 == number % divider: numbers += " " + str(divider) divider -= 1 if 0 == len(numbers): print('Prime Number') else: print(numbers[1:])
class Solution: def XXX(self, nums: List[int]) -> List[List[int]]: return reduce(lambda x, y: x + [i + [y] for i in x], nums, [[]])
sal = float(input('Qual é o salário do funcionário? R$')) ajuste = sal + (sal*15/100) print('Um funcionário que ganhava R${}, com 15%de aumento, passa a receber R${}'.format(sal, ajuste))
HEARTBEAT = "0" TESTREQUEST = "1" RESENDREQUEST = "2" REJECT = "3" SEQUENCERESET = "4" LOGOUT = "5" IOI = "6" ADVERTISEMENT = "7" EXECUTIONREPORT = "8" ORDERCANCELREJECT = "9" QUOTESTATUSREQUEST = "a" LOGON = "A" DERIVATIVESECURITYLIST = "AA" NEWORDERMULTILEG = "AB" MULTILEGORDERCANCELREPLACE = "AC" TRADECAPTUREREPORTREQUEST = "AD" TRADECAPTUREREPORT = "AE" ORDERMASSSTATUSREQUEST = "AF" QUOTEREQUESTREJECT = "AG" RFQREQUEST = "AH" QUOTESTATUSREPORT = "AI" QUOTERESPONSE = "AJ" CONFIRMATION = "AK" POSITIONMAINTENANCEREQUEST = "AL" POSITIONMAINTENANCEREPORT = "AM" REQUESTFORPOSITIONS = "AN" REQUESTFORPOSITIONSACK = "AO" POSITIONREPORT = "AP" TRADECAPTUREREPORTREQUESTACK = "AQ" TRADECAPTUREREPORTACK = "AR" ALLOCATIONREPORT = "AS" ALLOCATIONREPORTACK = "AT" CONFIRMATIONACK = "AU" SETTLEMENTINSTRUCTIONREQUEST = "AV" ASSIGNMENTREPORT = "AW" COLLATERALREQUEST = "AX" COLLATERALASSIGNMENT = "AY" COLLATERALRESPONSE = "AZ" NEWS = "B" MASSQUOTEACKNOWLEDGEMENT = "b" COLLATERALREPORT = "BA" COLLATERALINQUIRY = "BB" NETWORKCOUNTERPARTYSYSTEMSTATUSREQUEST = "BC" NETWORKCOUNTERPARTYSYSTEMSTATUSRESPONSE = "BD" USERREQUEST = "BE" USERRESPONSE = "BF" COLLATERALINQUIRYACK = "BG" CONFIRMATIONREQUEST = "BH" EMAIL = "C" SECURITYDEFINITIONREQUEST = "c" SECURITYDEFINITION = "d" NEWORDERSINGLE = "D" SECURITYSTATUSREQUEST = "e" NEWORDERLIST = "E" ORDERCANCELREQUEST = "F" SECURITYSTATUS = "f" ORDERCANCELREPLACEREQUEST = "G" TRADINGSESSIONSTATUSREQUEST = "g" ORDERSTATUSREQUEST = "H" TRADINGSESSIONSTATUS = "h" MASSQUOTE = "i" BUSINESSMESSAGEREJECT = "j" ALLOCATIONINSTRUCTION = "J" BIDREQUEST = "k" LISTCANCELREQUEST = "K" BIDRESPONSE = "l" LISTEXECUTE = "L" LISTSTRIKEPRICE = "m" LISTSTATUSREQUEST = "M" XMLNONFIX = "n" LISTSTATUS = "N" REGISTRATIONINSTRUCTIONS = "o" REGISTRATIONINSTRUCTIONSRESPONSE = "p" ALLOCATIONINSTRUCTIONACK = "P" ORDERMASSCANCELREQUEST = "q" DONTKNOWTRADEDK = "Q" QUOTEREQUEST = "R" ORDERMASSCANCELREPORT = "r" QUOTE = "S" NEWORDERCROSS = "s" SETTLEMENTINSTRUCTIONS = "T" CROSSORDERCANCELREPLACEREQUEST = "t" CROSSORDERCANCELREQUEST = "u" MARKETDATAREQUEST = "V" SECURITYTYPEREQUEST = "v" SECURITYTYPES = "w" MARKETDATASNAPSHOTFULLREFRESH = "W" SECURITYLISTREQUEST = "x" MARKETDATAINCREMENTALREFRESH = "X" MARKETDATAREQUESTREJECT = "Y" SECURITYLIST = "y" QUOTECANCEL = "Z" DERIVATIVESECURITYLISTREQUEST = "z" sessionMessageTypes = [HEARTBEAT, TESTREQUEST, RESENDREQUEST, REJECT, SEQUENCERESET, LOGOUT, LOGON, XMLNONFIX] tags = {} for x in dir(): tags[str(globals()[x])] = x def msgTypeToName(n): try: return tags[n] except KeyError: return str(n)
# Given two integers, swap them with no additional variable # 1. With temporal variable t def swap(a,b): t = b a = b b = t return a, b # 2. With no variable def swap(a,b): a = b - a b = b - a # b = b -(b-a) = a a = b + a # b = a + b - a = b...Swapped return a, b # With bitwise operator XOR def swap(a,b): a = a ^ b b = a ^ b # b = a ^ b ^ b = a ^ 0 = a a = b ^ a # a = a ^ a^ b = a^a^b = b^0 = b return a, b
# Definiran je rjecnik s parovima ime_osobe:pin_kartice rj = {"Branka":3241, "Stipe":5623, "Doris":3577, "Ana":7544} # Napišite program koji od korisnika prima ime osobe, a zatim traži pin. Ukoliko je unesen ispravan pin, korisnik unosi novi pin koji se pohranjuje u rječniku rj = {'Branka':3241,'Stipe':5623,'Doris':3577,'Ana':7544} ime = str(input("Unesi ime: ")) pin = rj[ime.capitalize()] pin_in = int(input("Unesite pin: ")) if pin == pin_in: pin_in = int(input("Unesite novi PIN: ")) rj.update({ime.capitalize():pin_in}) else: print("PIN neispravan!")
# Time: O(n) # Space: O(1) # dp class Solution(object): def minimumTime(self, s): """ :type s: str :rtype: int """ left = 0 result = left+(len(s)-0) for i in xrange(1, len(s)+1): left = min(left+2*(s[i-1] == '1'), i) result = min(result, left+(len(s)-i)) return result # Time: O(n) # Space: O(n) # dp class Solution2(object): def minimumTime(self, s): """ :type s: str :rtype: int """ result, right = len(s), [0]*(len(s)+1) for i in reversed(xrange(len(s))): right[i] = min(right[i+1]+2*(s[i] == '1'), len(s)-i) left = 0 result = left+right[0] for i in xrange(1, len(s)+1): left = min(left+2*(s[i-1] == '1'), i) result = min(result, left+right[i]) return result
class Solution: def subarrayBitwiseORs(self, A): """ :type A: List[int] :rtype: int """ res, cur = set(), set() for x in A: cur = {x | y for y in cur} | {x} res |= cur return len(res)
def merge_sort(sorting_list): """ Sorts a list in ascending order Returns a new sorted list Divide: Find the midpoint of the list and divide into sublist Conquer: Recursively sort the sublist created in previous step Combine: Merge the sorted sublist created in previous step Takes O(n log n) time """ if len(sorting_list) <= 1: return sorting_list left_half, right_half = split(sorting_list) left = merge_sort(left_half) right = merge_sort(right_half) return merge(left, right) def split(sorting_list): """ Divide the unsorted list at midpoint into sublist Returns two sublist - left and right Takes overall O(log n) time """ mid = len(sorting_list) // 2 left = sorting_list[: mid] right = sorting_list[mid:] return left, right def merge(left, right): """ Merges two lists (arrays), sorting them in the process Returns a new merged list Takes overall O(n) time """ l = [] i = 0 j = 0 while i < len(left) and j < len(right): if left[i] < right[j]: l.append(left[i]) i += 1 else: l.append(right[j]) j += 1 while i < len(left): l.append(left[i]) i += 1 while j < len(right): l.append(right[j]) j += 1 return l def verify(sorted_list): n = len(sorted_list) if n == 0 or n == 1: return True return sorted_list[0] < sorted_list[1] and verify(sorted_list[1:]) a_list = [23, 61, 1, 2, 63, 7, 3, 9, 54, 66] result = merge_sort(a_list) print(verify(result))
# -*- coding: utf-8 -*- """ Created on Wed Jun 8 11:21:27 2016 @author: ericgrimson """ mysum = 0 for i in range(5, 11, 2): mysum += i if mysum == 5: break print(mysum)
# coding: utf-8 def test_default_value(printer): assert printer._inverse is False def test_changing_no_value(printer): printer.inverse() assert printer._inverse is False def test_changing_state_on(printer): printer.inverse(True) assert printer._inverse is True def test_changing_state_off(printer): printer.inverse(False) assert printer._inverse is False def test_reset_value(printer): printer.reset() assert printer._inverse is False
# -*- coding: utf-8 -*- # Copyright 2019 Cohesity Inc. class RenameObjectParamProto(object): """Implementation of the 'RenameObjectParamProto' model. Message to specify the prefix/suffix added to rename an object. At least one of prefix or suffix must be specified. Please note that both prefix and suffix can be specified. Attributes: prefix (string): Prefix to be added to a name. suffix (string): Suffix to be added to a name. """ # Create a mapping from Model property names to API property names _names = { "prefix":'prefix', "suffix":'suffix' } def __init__(self, prefix=None, suffix=None): """Constructor for the RenameObjectParamProto class""" # Initialize members of the class self.prefix = prefix self.suffix = suffix @classmethod def from_dictionary(cls, dictionary): """Creates an instance of this model from a dictionary Args: dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server's response. The keys MUST match property names in the API description. Returns: object: An instance of this structure class. """ if dictionary is None: return None # Extract variables from the dictionary prefix = dictionary.get('prefix') suffix = dictionary.get('suffix') # Return an object of this model return cls(prefix, suffix)
# program to merge two linked list class Node: def __init__(self, data, next): self.data = data self.next = next def merge(L1,L2): L3 = Node(None, None) prev = L3 while L1 != None and L2 != None: if L1.data <= L2.data: prev.next = L2.data L1 = L1.next else: prev.data = L1.data L2 = L2.next prev = prev.next if L1.data == None: prev.next = L2 elif L2.data == None: prev.next = L1 return L3.next if __name__ == '__main__': n3 = Node(10, None) n2 = Node(n3, 7) n1 = Node(n2, 5) L1 = n1 n7 = Node(12, None) n6 = Node(n7, 9) n5 = Node(n6, 6) n4 = Node(n5, 2) L2 = n4 merged = merge(L1, L2) while merged != None: print(str(merged.data) + '->') merged = merged.next print('None')
local_webserver = '/var/www/html' ssh = dict( host = '', username = '', password = '', remote_path = '' )
class FibIterator(object): def __init__(self, n): self.n = n self.current = 0 self.num1 = 0 self.num2 = 1 def __next__(self): if self.current < self.n: item = self.num1 self.num1, self.num2 = self.num2, self.num1+self.num2 self.current += 1 return item else: raise StopIteration def __iter__(self): return self if __name__ == '__main__': fib = FibIterator(20) for num in fib: print(num, end=" ") print("\n", list(FibIterator(10)))
''' @author: Sergio Rojas @contact: [email protected] -------------------------- Contenido bajo Atribución-NoComercial-CompartirIgual 3.0 Venezuela (CC BY-NC-SA 3.0 VE) http://creativecommons.org/licenses/by-nc-sa/3.0/ve/ Creado en abril 21, 2016 ''' def biseccion(f, a, b, tol=1.e-6): """ Funcion que implenta el metodo de biseccion usando la instruccion for para encontrar raices reales de una funcion. f: es la funcion a la cual se le determina alguna raiz a: valor menor del interval b: valor mayor del intervalo tol: es la tolerancia """ fa = f(a) if fa*f(b) > 0: return None, None, None itera = [0] # variable que acumula las iteraciones for i in itera: c = (a + b)*0.5 fmed = f(c) if abs(b-a) < tol: return i, c, fmed if fa*fmed <= 0: b = c # La raiz esta en el intervalo [a,c] else: a = c # La raiz esta en el intervalo [c,b] fa = fmed itera.append(i + 1) itera[i] = None #print(itera) def f(x): """ Define la funcion para la cual queremos encontrar alguna raiz """ return (x**2 + 4.0*x - 4.0) # usar (-6,-4) tol = 1e-10 a, b = 0, 2 # raiz por buscar a, b = -6, -4 # raiz en la grafica iter, x, fx = biseccion(f, a, b, tol) if x is None: print('\t f(x) NO cambia signo en el intervalo [{0:g},{1:g}]'.format(a, b)) else: print('\t En {0:d} iteraciones y con tolerancia de {1:g} la raiz es:' .format(iter,tol)) print('\t x = {0:g}, generando f({0:g}) = {1:g}'.format(x,fx))
cpgf._import(None, "builtin.debug"); cpgf._import(None, "builtin.core"); class SAppContext: device = None, counter = 0, listbox = None Context = SAppContext(); GUI_ID_QUIT_BUTTON = 101; GUI_ID_NEW_WINDOW_BUTTON = 102; GUI_ID_FILE_OPEN_BUTTON = 103; GUI_ID_TRANSPARENCY_SCROLL_BAR = 104; def makeMyEventReceiver(receiver) : def OnEvent(me, event) : if event.EventType == irr.EET_GUI_EVENT : id = event.GUIEvent.Caller.getID(); env = Context.device.getGUIEnvironment(); if event.GUIEvent.EventType == irr.EGET_SCROLL_BAR_CHANGED : if id == GUI_ID_TRANSPARENCY_SCROLL_BAR : pos = cpgf.cast(event.GUIEvent.Caller, irr.IGUIScrollBar).getPos(); skin = env.getSkin(); for i in range(irr.EGDC_COUNT) : col = skin.getColor(i); col.setAlpha(pos); skin.setColor(i, col); elif event.GUIEvent.EventType == irr.EGET_BUTTON_CLICKED : if id == GUI_ID_QUIT_BUTTON : Context.device.closeDevice(); return True; elif id == GUI_ID_NEW_WINDOW_BUTTON : Context.listbox.addItem("Window created"); Context.counter = Context.counter + 30; if Context.counter > 200 : Context.counter = 0; window = env.addWindow(irr.rect_s32(100 + Context.counter, 100 + Context.counter, 300 + Context.counter, 200 + Context.counter), False, "Test window"); env.addStaticText("Please close me", irr.rect_s32(35,35,140,50), True, False, window); return True; elif id == GUI_ID_FILE_OPEN_BUTTON : Context.listbox.addItem("File open"); env.addFileOpenDialog("Please choose a file."); return True; return False; receiver.OnEvent = OnEvent; def start() : driverType = irr.driverChoiceConsole(); if driverType == irr.EDT_COUNT : return 1; device = irr.createDevice(driverType, irr.dimension2d_u32(640, 480)); if device == None : return 1; device.setWindowCaption("cpgf Irrlicht Python Binding - User Interface Demo"); device.setResizable(True); driver = device.getVideoDriver(); env = device.getGUIEnvironment(); skin = env.getSkin(); font = env.getFont("../../media/fonthaettenschweiler.bmp"); if font : skin.setFont(font); skin.setFont(env.getBuiltInFont(), irr.EGDF_TOOLTIP); env.addButton(irr.rect_s32(10,240,110,240 + 32), None, GUI_ID_QUIT_BUTTON, "Quit", "Exits Program"); env.addButton(irr.rect_s32(10,280,110,280 + 32), None, GUI_ID_NEW_WINDOW_BUTTON, "New Window", "Launches a Window"); env.addButton(irr.rect_s32(10,320,110,320 + 32), None, GUI_ID_FILE_OPEN_BUTTON, "File Open", "Opens a file"); env.addStaticText("Transparent Control:", irr.rect_s32(150,20,350,40), True); scrollbar = env.addScrollBar(True, irr.rect_s32(150, 45, 350, 60), None, GUI_ID_TRANSPARENCY_SCROLL_BAR); scrollbar.setMax(255); scrollbar.setPos(env.getSkin().getColor(irr.EGDC_WINDOW).getAlpha()); env.addStaticText("Logging ListBox:", irr.rect_s32(50,110,250,130), True); listbox = env.addListBox(irr.rect_s32(50, 140, 250, 210)); env.addEditBox("Editable Text", irr.rect_s32(350, 80, 550, 100)); Context.device = device; Context.counter = 0; Context.listbox = listbox; MyEventReceiver = cpgf.cloneClass(irr.IEventReceiverWrapper); makeMyEventReceiver(MyEventReceiver); receiver = MyEventReceiver(); device.setEventReceiver(receiver); env.addImage(driver.getTexture("../../media/irrlichtlogo2.png"), irr.position2d_s32(10,10)); while device.run() and driver : if device.isWindowActive() : driver.beginScene(True, True, irr.SColor(0,200,200,200)); env.drawAll(); driver.endScene(); device.drop(); return 0; start();
""" The api endpoint paths stored as constants """ PLACE_ORDER = 'PlaceOrder' MODIFY_ORDER = 'ModifyOrder' CANCEL_ORDER = 'CancelOrder' EXIT_SNO_ORDER = 'ExitSNOOrder' GET_ORDER_MARGIN = 'GetOrderMargin' GET_BASKET_MARGIN = 'GetBasketMargin' ORDER_BOOK = 'OrderBook' MULTILEG_ORDER_BOOK = 'MultiLegOrderBook' SINGLE_ORDER_HISTORY = 'SingleOrdHist' TRADE_BOOK = 'TradeBook' POSITION_BOOK = 'PositionBook' CONVERT_PRODUCT = 'ProductConversion'
class SoftplusParams: __slots__ = ["beta"] def __init__(self, beta=100): self.beta = beta class GeometricInitParams: __slots__ = ["bias"] def __init__(self, bias=0.6): self.bias = bias class IDRHyperParams: def __init__(self, softplus=None, geometric_init=None): self.softplus = softplus if softplus is None: self.softplus = SoftplusParams() self.geometric_init = geometric_init if geometric_init is None: self.geometric_init = GeometricInitParams()
# Coin Change 8 class Solution: def change(self, amount, coins): # Classic DP problem? dp = [0] * (amount + 1) dp[0] = 1 for coin in coins: for am in range(1, amount + 1): if am >= coin: dp[am] += dp[am - coin] return dp[amount] if __name__ == "__main__": sol = Solution() amount = 5 coins = [1, 2, 5] print(sol.change(amount, coins))
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def insertIntoMaxTree(self, root: TreeNode, val: int) -> TreeNode: if root is None or root.val < val: node = TreeNode(val) node.left = root return node else: root.right = self.insertIntoMaxTree(root.right, val) return root class Solution2: def insertIntoMaxTree(self, root: TreeNode, val: int) -> TreeNode: prev = None curr = root while curr and curr.val > val: prev = curr curr = curr.right node = TreeNode(val) node.left = curr if prev: prev.right = node return root if prev else node