content
stringlengths
7
1.05M
#!/usr/bin/env python3 #!/usr/bin/env python LIMIT = 32 dict1 = {} def main(): squares() a1 = 0 while a1 < LIMIT: sums(a1) a1 += 1 results() def squares(): global dict1 for i1 in range(1, LIMIT * 2): # print "%s" % str(i1) s1 = i1 * i1 if not s1 in dict1: dict1[s1] = [] dict1[s1].append(i1) def results(): r1 = sorted(dict1.keys()) for k1 in r1: v1 = dict1[k1] print("%s %s" % (str(k1), str(sorted(v1)))) print("\nnot found") l1 = len(r1) lim1 = r1[l1 - 1] for x1 in range(lim1): if not x1 in r1: print("%s not found" % str(x1)) def sums(l0): global dict1 ret1 = False for k1 in sorted(dict1.keys()): v1 = dict1[k1] for i1 in range(1, l0): s1 = i1 * i1 t1 = s1 + k1 if not t1 in dict1 and not i1 in v1: ret1 = True dict1[t1] = [] dict1[t1].append(i1) for p1 in v1: dict1[t1].append(p1) return ret1 main() print("")
# -*-coding:utf-8-*- __author__ = "Allen Woo" DB_CONFIG = { "redis": { "host": [ "127.0.0.1" ], "password": "<Your password>", "port": [ "6379" ] }, "mongodb": { "web": { "dbname": "osr_web", "password": "<Your password>", "config": { "fsync": False, "replica_set": None }, "host": [ "127.0.0.1:27017" ], "username": "root" }, "user": { "dbname": "osr_user", "password": "<Your password>", "config": { "fsync": False, "replica_set": None }, "host": [ "127.0.0.1:27017" ], "username": "root" }, "sys": { "dbname": "osr_sys", "password": "<Your password>", "config": { "fsync": False, "replica_set": None }, "host": [ "127.0.0.1:27017" ], "username": "root" } } }
class NumArray: def __init__(self): self.__values = [] def __length_hint__(self): print('__length_hint__', len(self.__values)) return len(self.__values) n = NumArray() print(len(n)) # TypeError: object of type 'NumArray' has no len()
#!/usr/bin/env python '''XML Namespace Constants''' # # This should actually check for a value error # def xs_bool(in_string): '''Takes an XSD boolean value and converts it to a Python bool''' if in_string in ['true', '1']: return True return False
''' teachers and centers are lists of Teacher objects and ExamCenter objects respectively class Teacher and class ExamCentre and defined in locatable.py Both are subclass of Locatable class Link : https://github.com/aahnik/mapTeachersToCenters/blob/master/locatable.py ''' def sort(locatables, focal_centre): # sorts the list of objects of type Locatable in ascending order of distance from a given focal_centre # by using Insertion Sort algorithm for i in range(1, len(locatables)): key = locatables[i] key_dist = key.get_distance(focal_centre) j = i - 1 while j >= 0 and key_dist < locatables[j].get_distance(focal_centre): locatables[j+1] = locatables[j] j -= 1 locatables[j+1] = key def connect(teachers, centers): # algorithm v2.0 for center in centers: active_teachers = [t for t in teachers if t.allocated == False] sort(active_teachers, center) for teacher in active_teachers: if center.vacancy == 0: break teacher.allocated = True center.allocated_teachers.append(teacher) center.vacancy -= 1 # def optimize(centers): pass # AAHNIK 2020
list=[1,2,3.5,4,5] print(list) sum=0 for i in list: sum=sum+i sum/=i print(sum)
''' PURPOSE Analyze a string to check if it contains two of the same letter in a row. Your function must return True if there are two identical letters in a row in the string, and False otherwise. EXAMPLE The string "hello" has l twice in a row, while the string "nono" does not have two identical letters in a row. ''' def double_letters(input_str): print('String: {}'.format(input_str)) # load in two letters at a time in for loop for x in range(len(input_str)): # check there are still two letters left to grab if x+1 != len(input_str): # get two letters two_letters_str = input_str[x] + input_str[x+1] # check for matching letters if two_letters_str[0] == two_letters_str[1]: print('This pair of letters match: {}'.format(two_letters_str)) return True break # if function actually makes it out of the loop without breaking # no double letters have matched print('String does not contain two of the same letter in a row') return False input_str = "hello" # run the function double_letters(input_str)
# Python Program to check if there is a # negative weight cycle using Floyd Warshall Algorithm # Number of vertices in the graph V = 4 # Define Infinite as a large enough value. This # value will be used for vertices not connected to each other INF = 99999 # Returns true if graph has negative weight cycle else false. def negCyclefloydWarshall(graph): # dist[][] will be the output matrix that will # finally have the shortest distances between every pair of vertices dist=[[0 for i in range(V)]for j in range(V)] # Initialize the solution matrix same as input # graph matrix. Or we can say the initial values # of shortest distances are based on shortest # paths considering no intermediate vertex. for i in range(4): for j in range(V): dist[i][j] = graph[i][j] for item in dist: print(item) """ Add all vertices one by one to the set of intermediate vertices. ---> Before start of a iteration, we have shortest distances between all pairs of vertices such that the shortest distances consider only the vertices in set {0, 1, 2, .. k-1} as intermediate vertices. ----> After the end of a iteration, vertex no. k is added to the set of intermediate vertices and the set becomes {0, 1, 2, .. k}""" for k in range(V): # Pick all vertices as source one by one for i in range(V): # Pick all vertices as destination for the # above picked source for j in range(V): # If vertex k is on the shortest path from # i to j, then update the value of dist[i][j] if (dist[i][k] + dist[k][j]) < dist[i][j]: dist[i][j] = dist[i][k] + dist[k][j] # print(dist[i][j]) # print(dist) # print('changed', dist[i][k]) # If distance of any vertex from itself # becomes negative, then there is a negative weight cycle. for item in dist: print(item) for i in range(V): if (dist[i][i] < 0): return True return False graph = [[0, 1, INF, INF], [INF, 0, -1, INF], [INF, INF, 0, -1], [-1, INF, INF, 0]] if (negCyclefloydWarshall(graph)): print("Yes") else: print("No")
def leiaInt(num): while True: n = str(input(num)) if n.isnumeric(): n = int(n) break else: print('Erro! Digíte um número inteiro') return n n = leiaInt('Type a number: ') print(f'The number typed was {n}')
limit = int(input()) current = int(input()) multiply = int(input()) day = 0 total = current while total <= limit: day += 1 current *= multiply total += current # print('on day', day, ',', current, 'people are infected. and the total is', total) print(day)
class Node: def __init__(self, data): self.data = data self.next = None self.back = None # inserir na fila # remover da fila # consultar o primeiro elemento da fila class Fila: def __init__(self): self.first = None self.last = None self.size = 0 def inserirF(self, elem): #insere um elem na frente da fila node = Node(elem) if self.last == None: self.last = node else: self.last.next = node self.last = node if self.first == None: self.first = node self.size = self.size + 1 def inserirA(self, elem): #insere um elem atrás da fila node = Node(elem) if self.last == None: self.last = node else: self.first.back = node self.first = node if self.last == None: self.last = node self.size = self.size + 1 def removerF(self): #remove o elemento da frente da fila if self.size > 0: elem = self.first.data self.first = self.first.next self.size -= 1 return elem else: print ("fila vazia.") def removerA(self): #remove o elemento atrás da fila if self.size > 0: elem = self.last.data self.last = self.last.next self.size -= 1 return elem else: print ("fila vazia.") def consultar(self): #retorna o topo sem remover if self.first != None: elem = self.first.data return elem else: print ("fila vazia.") def destruir(self): #destrói a fila self.first = None self.last = None self.data = None
# Importação de bibliotecas # Título do programa print('\033[1;34;40mEXTRAINDO DADOS DE UMA LISTA\033[m') # Objetos lista = [] # Lógica while True: lista.append(int(input('Digite um valor: '))) continuar = ' ' while continuar not in 'SN': continuar = str(input('Continuar? [S/N] ')).strip().upper() if continuar == 'N': break lista.sort(reverse=True) print('-=' * 30) print(f'Você digitou {len(lista)} elementos') print(f'Os valores em ordem decrescente são {lista}') print(f'{"O valor 5 faz parte da lista" if 5 in lista else "O valor 5 não foi encontrado na lista"}')
train_sequence = ReportSequence(X_train, y_train) validation_sequence = ReportSequence(X_valid, y_valid) model = Sequential() forward_layer = LSTM(300, return_sequences=True) backward_layer = LSTM(300, go_backwards=True, return_sequences=True) model.add(Bidirectional(forward_layer, backward_layer=backward_layer, input_shape=(None, feature_vector_dimension))) model.add(Bidirectional(LSTM(30, return_sequences=True), backward_layer=LSTM(30, go_backwards=True, return_sequences=True))) model.add(Bidirectional(LSTM(3, return_sequences=True), backward_layer=LSTM(3, go_backwards=True, return_sequences=True))) model.add(GlobalAveragePooling1D()) model.add(Dense(1, activation='sigmoid')) model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']) accuracy_measurement = AccuracyMeasurement(model, train_sequence, validation_sequence, accuracy_results_cv) model.fit_generator(train_sequence, epochs=20, callbacks=[accuracy_measurement], validation_data=validation_sequence)
#!/usr/bin/env python # coding: utf-8 # ## next_permutation # Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. # # If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). # # The replacement must be in-place and use only constant extra memory. # # Here are some examples. Inputs are in the left-hand column and its corresponding outputs are in the right-hand column. # # <b>1,2,3 → 1,3,2</b><br> # <b>3,2,1 → 1,2,3</b><br> # <b>1,1,5 → 1,5,1</b> # # # # ![](https://leetcode.com/media/original_images/31_Next_Permutation.gif) # To illustrate the algorithm with an example, consider nums = [2,3,1,5,4,2]. <br> # It is easy to see that i = 2 is the first i (from the right) such that nums[i] < nums[i+1].<br> # Then we swap nums[2] = 1 with the smallest number in nums[3:] that is larger than 1, which is nums[5] = 2, after which we get nums = [2,3,2,5,4,1]. <br> # To get the lexicographically next greater permutation of nums, we just need to sort nums[3:] = [5,4,1] in-place. <br> # Finally, we reach nums = [2,3,2,1,4,5]. # In[39]: #SOLUTION WITHOUT COMMENTS def next_perm(ls): n = len(ls) for i in range(n-1, 0, -1): if ls[i] > ls[i-1]: j = i while j < n and ls[j] > ls[i-1]: idx = j j += 1 ls[idx], ls[i-1] = ls[i-1], ls[idx] for k in range((n-i)//2): ls[i+k], ls[n-1-k] = ls[n-1-k], ls[i+k] break else: ls.reverse() return ls print(next_perm([2,3,1,5,4,2])) print(next_perm([3,2,1])) print(next_perm([1,2,3])) print(next_perm([1,1,5])) # In[30]: #SOLUTION WITH COMMENTS def next_perm(ls): # Find the length of the list n = len(ls) print("Length of the list :", len(ls)) # Decreement from last element to the first for i in range(n-1, 0, -1): # if last element is greater then last previous. Then j =i # find the first decreasing element .in the above example 4 if ls[i] > ls[i-1]: print("Found the first decreasing element ls[i]",ls[i]) j = i print("Reset both the pointers",ls[i], i,j) #Here the pointer has been reset #find the number find the next element which is greater than 4 # Here we increement j till we ls[j] is greater than 4 in the above example it is 5 while j < n and ls[j] > ls[i-1]: idx = j j += 1 # swap the elements in the list 4 and 5 ls[idx], ls[i-1] = ls[i-1], ls[idx] # double-slash for “floor” division (rounds down to nearest whole number) for k in range((n-i)//2): ls[i+k], ls[n-1-k] = ls[n-1-k], ls[i+k] break else: ls.reverse() return ls print(next_perm([2,3,1,5,4,2])) """print(next_perm([3,2,1])) print(next_perm([1,1,5]))""" # # ![alt text](image/np.JPG) # In[47]: def next_perm(ls): # Find the length of the list print("ls",ls) n = len(ls) print("Length of the list :", len(ls)) # Decreement from last element to the first for i in range(n-1, 0, -1): # if last element is greater then last previous. Then j =i # find the first decreasing element .in the above example if ls[i] > ls[i-1]: print("\nFIND FIRST DECREASING ELEMENT") print("First decreasing element ls[i]:i",ls[i-1],i-1) j = i print("Reset both the pointers",i,j) print("ls",ls) #Here the pointer has been reset #find the number find the next element which is greater than 4 # Here we increement j till we ls[j] is greater than 4 in the above example it is 5 while j < n and ls[j] > ls[i-1]: print("\nFIND NEXT GREATEST ELEMENT") print("j : {},len n :{},ls[j]:{},ls[i-1] {}".format(j,n,ls[j],ls[i-1])) idx = j j += 1 print("idx is the pointer next greater num, idx {} ls[idx] {}".format(idx,ls[idx])) # swap the elements in the list 4 and 5 ls[idx], ls[i-1] = ls[i-1], ls[idx] print("After swap idx and ls[i-1](this was 2)".format(ls[idx],ls[i-1])) print("\n",ls) # double-slash for “floor” division (rounds down to nearest whole number) print("\nfind (n-i)//2) => ({} - {} )// 2 = {}".format(n,i,(n-i)//2)) for k in range((n-i)//2): print("\nREVERSE") print("n",n) print("i",i) print("ls[i]",ls[i]) print("(n-i)//2",(n-i)//2) print("k",k) print("ls[i+k]",ls[i+k]) print("ls[n-1]",ls[n-1]) print("ls[n-1-k]",ls[n-1-k]) ls[i+k], ls[n-1-k] = ls[n-1-k], ls[i+k] break else: ls.reverse() return ls print(next_perm([2,3,1,5,4,2])) """print(next_perm([3,2,1])) print(next_perm([1,1,5]))""" # In[35]: #BRUTE FORCE. DOES NOT SOLVE ALL CASE def next_perm(ls): # Check the max element in the list max_num=max(ls) min_num=min(ls) head =0 tail =len(ls)-1 #We know the max for the first element has been reached then swap the max element if ls[0] == max_num: temp= ls[-1] ls[-1]=ls[0] ls[0] =temp return ls while head <=tail: if ls[tail] > ls[tail-1]: temp= ls[tail] ls[tail]=ls[tail-1] ls[tail-1] =temp return ls head +=1 tail -=1 return ls print(next_perm([3,2,1])) print(next_perm([1,2,3])) print(next_perm([1,1,5]))
# Code generated by font-to-py.py. # Font: dsmb.ttf version = '0.26' def height(): return 16 def max_width(): return 9 def hmap(): return True def reverse(): return False def monospaced(): return False def min_ch(): return 32 def max_ch(): return 126 _font =\ b'\x09\x00\x00\x00\x78\x00\x8c\x00\x0c\x00\x1c\x00\x38\x00\x30\x00'\ b'\x30\x00\x30\x00\x00\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00\xc0\x00\xc0\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xcc\x00\xcc\x00\xcc\x00'\ b'\xcc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x19\x00\x1b\x00'\ b'\x1b\x00\x7f\x80\x36\x00\x36\x00\x36\x00\xff\x00\x64\x00\x6c\x00'\ b'\x6c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x10\x00\x10\x00'\ b'\x7c\x00\xd4\x00\xd0\x00\xf0\x00\x7c\x00\x1e\x00\x16\x00\x16\x00'\ b'\xd6\x00\x7c\x00\x10\x00\x10\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\x70\x00\x88\x00\x88\x00\x88\x00\x71\x80\x1e\x00\xe7\x00\x08\x80'\ b'\x08\x80\x08\x80\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x38\x00\x60\x00\x60\x00\x20\x00\x70\x00\x76\x00\xde\x00'\ b'\xde\x00\xdc\x00\xec\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x30\x00\x60\x00\x60\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x60\x00\x60\x00\x30\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\xc0\x00\x60\x00\x60\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x60\x00\x60\x00'\ b'\xc0\x00\x00\x00\x00\x00\x09\x00\x00\x00\x10\x00\xd6\x00\x7c\x00'\ b'\x7c\x00\xd6\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00'\ b'\x18\x00\x18\x00\x18\x00\xff\x00\xff\x00\x18\x00\x18\x00\x18\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00'\ b'\x60\x00\x60\x00\x60\x00\xc0\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\xf8\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x03\x00\x06\x00\x06\x00\x0c\x00\x0c\x00\x18\x00'\ b'\x18\x00\x30\x00\x30\x00\x60\x00\x60\x00\xc0\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x38\x00\x6c\x00\xc6\x00\xc6\x00\xd6\x00'\ b'\xd6\x00\xc6\x00\xc6\x00\xc6\x00\x6c\x00\x38\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\x70\x00\xb0\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\xfc\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x78\x00\x86\x00\x06\x00'\ b'\x06\x00\x0e\x00\x0c\x00\x1c\x00\x38\x00\x70\x00\xe0\x00\xfe\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x7c\x00\x86\x00'\ b'\x06\x00\x06\x00\x38\x00\x0c\x00\x06\x00\x06\x00\x06\x00\x8e\x00'\ b'\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x0c\x00'\ b'\x1c\x00\x3c\x00\x2c\x00\x6c\x00\xcc\x00\x8c\x00\xfe\x00\x0c\x00'\ b'\x0c\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\xfc\x00\xc0\x00\xc0\x00\xc0\x00\xf8\x00\x8c\x00\x06\x00\x06\x00'\ b'\x06\x00\x8c\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x38\x00\x64\x00\xc0\x00\xc0\x00\xfc\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\x46\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\xfe\x00\x06\x00\x0e\x00\x0c\x00\x0c\x00\x18\x00'\ b'\x18\x00\x38\x00\x30\x00\x30\x00\x60\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x7c\x00\xc6\x00\xc6\x00\xc6\x00\x38\x00'\ b'\x6c\x00\xc6\x00\xc6\x00\xc6\x00\xee\x00\x7c\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\x78\x00\xc4\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\x7e\x00\x06\x00\x06\x00\x4c\x00\x38\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x60\x00\x60\x00\x60\x00\x00\x00\x00\x00\x60\x00\x60\x00'\ b'\x60\x00\x60\x00\xc0\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00'\ b'\x00\x00\x01\x00\x0f\x00\x3c\x00\xe0\x00\xe0\x00\x3c\x00\x0f\x00'\ b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\xff\x00\xff\x00\x00\x00\x00\x00\xff\x00'\ b'\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x00\x00\x00\x00\x80\x00\xf0\x00\x3c\x00\x07\x00\x07\x00'\ b'\x3c\x00\xf0\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x78\x00\x8c\x00\x0c\x00\x1c\x00\x38\x00\x30\x00'\ b'\x30\x00\x30\x00\x00\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x00\x00\x1e\x00\x23\x00\x63\x00\xcf\x00'\ b'\xdb\x00\xdb\x00\xdb\x00\xdb\x00\xdb\x00\xcf\x00\x60\x00\x32\x00'\ b'\x1f\x00\x00\x00\x09\x00\x00\x00\x38\x00\x38\x00\x38\x00\x38\x00'\ b'\x6c\x00\x6c\x00\x6c\x00\x7c\x00\x6c\x00\xee\x00\xc6\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xfc\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xf8\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xfc\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x3c\x00\x62\x00'\ b'\x40\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x40\x00\x62\x00'\ b'\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xf8\x00'\ b'\xcc\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xcc\x00\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\xfe\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xfc\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\xfe\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xfc\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x3c\x00\x62\x00\x40\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xce\x00\xc6\x00\xc6\x00\x66\x00\x3e\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xfe\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\xfc\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\xfc\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x3e\x00\x06\x00\x06\x00'\ b'\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x86\x00\x7c\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xc6\x00\xce\x00'\ b'\xdc\x00\xd8\x00\xf0\x00\xf8\x00\xfc\x00\xcc\x00\xce\x00\xc6\x00'\ b'\xc7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\xee\x00\xee\x00\xee\x00\xee\x00\xee\x00\xfe\x00\xd6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\xe6\x00\xe6\x00\xe6\x00\xf6\x00\xf6\x00\xd6\x00\xde\x00'\ b'\xde\x00\xce\x00\xce\x00\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x38\x00\x6c\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\x6c\x00\x38\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\xfc\x00\xce\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xce\x00\xfc\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\x38\x00\x6c\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x6c\x00\x3c\x00\x0c\x00'\ b'\x04\x00\x00\x00\x00\x00\x09\x00\x00\x00\xfc\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\xf8\x00\xcc\x00\xce\x00\xc6\x00\xc7\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x3c\x00\xc2\x00'\ b'\xc0\x00\xc0\x00\xf0\x00\x7c\x00\x1e\x00\x06\x00\x06\x00\x86\x00'\ b'\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xff\x00'\ b'\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\xc6\x00\xc6\x00\x6c\x00\x6c\x00\x6c\x00\x6c\x00\x6c\x00'\ b'\x28\x00\x38\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\xc1\x80\xc1\x80\xc1\x80\xdd\x80\xdd\x80\x5d\x00'\ b'\x55\x00\x55\x00\x77\x00\x63\x00\x63\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\xc6\x00\x6c\x00\x6c\x00\x38\x00\x38\x00'\ b'\x10\x00\x38\x00\x38\x00\x6c\x00\x6c\x00\xc6\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\xe7\x00\x66\x00\x66\x00\x3c\x00'\ b'\x3c\x00\x3c\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xfe\x00\x06\x00\x0e\x00'\ b'\x1c\x00\x18\x00\x38\x00\x30\x00\x60\x00\xe0\x00\xc0\x00\xfe\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xf0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xf0\x00\x00\x00\x00\x00\x09\x00\x00\x00\xc0\x00'\ b'\x40\x00\x60\x00\x20\x00\x30\x00\x30\x00\x18\x00\x18\x00\x08\x00'\ b'\x0c\x00\x04\x00\x06\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\xf0\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\xf0\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x18\x00\x3c\x00\x66\x00\xc3\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x80\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\xc0\x00\x60\x00\x30\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00'\ b'\x46\x00\x06\x00\x7e\x00\xc6\x00\xc6\x00\xce\x00\x7e\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xfc\x00\xee\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xee\x00\xfc\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x3c\x00\x62\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x62\x00'\ b'\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x06\x00'\ b'\x06\x00\x06\x00\x7e\x00\xee\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xee\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x3c\x00\x46\x00\xc6\x00\xfe\x00\xc0\x00'\ b'\xc0\x00\x62\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x1e\x00\x30\x00\x30\x00\xfe\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x00\x6e\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\x6e\x00\x7e\x00\x06\x00\x46\x00\x3c\x00'\ b'\x00\x00\x09\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00\xfc\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x18\x00\x18\x00\x18\x00\x00\x00\x78\x00'\ b'\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\xff\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x09\x00\x18\x00\x18\x00\x18\x00\x00\x00'\ b'\x78\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\xf0\x00\x00\x00\x09\x00\x00\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xcc\x00\xd8\x00\xf0\x00\xf0\x00\xd8\x00\xd8\x00\xcc\x00'\ b'\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\xf0\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\xff\x00\xdb\x00\xdb\x00\xdb\x00\xdb\x00'\ b'\xdb\x00\xdb\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x6c\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\x6c\x00\x38\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\xee\x00'\ b'\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xee\x00\xfc\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x00'\ b'\xee\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xee\x00\x7e\x00\x06\x00'\ b'\x06\x00\x06\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xfc\x00\xe0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x7c\x00\xc2\x00\xc0\x00\xf8\x00\x3e\x00\x06\x00\x86\x00'\ b'\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00'\ b'\x30\x00\x30\x00\xfe\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00'\ b'\xc6\x00\xc6\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xee\x00\x6c\x00\x6c\x00'\ b'\x6c\x00\x28\x00\x38\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x80\xc1\x80\xc9\x80'\ b'\x5d\x00\x77\x00\x77\x00\x63\x00\x63\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\xee\x00\x6c\x00'\ b'\x38\x00\x38\x00\x38\x00\x3c\x00\x6c\x00\xee\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00'\ b'\x6e\x00\x6c\x00\x6c\x00\x3c\x00\x38\x00\x18\x00\x18\x00\x18\x00'\ b'\x30\x00\x70\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xfe\x00\x06\x00\x0c\x00\x18\x00\x30\x00\x60\x00\xc0\x00\xfe\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x1c\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\xc0\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x1c\x00\x00\x00\x09\x00\x00\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x09\x00\x00\x00'\ b'\xe0\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x0c\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\xe0\x00\x00\x00\x09\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x00\xff\x00'\ b'\x8e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ _index =\ b'\x00\x00\x22\x00\x22\x00\x44\x00\x44\x00\x66\x00\x66\x00\x88\x00'\ b'\x88\x00\xaa\x00\xaa\x00\xcc\x00\xcc\x00\xee\x00\xee\x00\x10\x01'\ b'\x10\x01\x32\x01\x32\x01\x54\x01\x54\x01\x76\x01\x76\x01\x98\x01'\ b'\x98\x01\xba\x01\xba\x01\xdc\x01\xdc\x01\xfe\x01\xfe\x01\x20\x02'\ b'\x20\x02\x42\x02\x42\x02\x64\x02\x64\x02\x86\x02\x86\x02\xa8\x02'\ b'\xa8\x02\xca\x02\xca\x02\xec\x02\xec\x02\x0e\x03\x0e\x03\x30\x03'\ b'\x30\x03\x52\x03\x52\x03\x74\x03\x74\x03\x96\x03\x96\x03\xb8\x03'\ b'\xb8\x03\xda\x03\xda\x03\xfc\x03\xfc\x03\x1e\x04\x1e\x04\x40\x04'\ b'\x40\x04\x62\x04\x62\x04\x84\x04\x84\x04\xa6\x04\xa6\x04\xc8\x04'\ b'\xc8\x04\xea\x04\xea\x04\x0c\x05\x0c\x05\x2e\x05\x2e\x05\x50\x05'\ b'\x50\x05\x72\x05\x72\x05\x94\x05\x94\x05\xb6\x05\xb6\x05\xd8\x05'\ b'\xd8\x05\xfa\x05\xfa\x05\x1c\x06\x1c\x06\x3e\x06\x3e\x06\x60\x06'\ b'\x60\x06\x82\x06\x82\x06\xa4\x06\xa4\x06\xc6\x06\xc6\x06\xe8\x06'\ b'\xe8\x06\x0a\x07\x0a\x07\x2c\x07\x2c\x07\x4e\x07\x4e\x07\x70\x07'\ b'\x70\x07\x92\x07\x92\x07\xb4\x07\xb4\x07\xd6\x07\xd6\x07\xf8\x07'\ b'\xf8\x07\x1a\x08\x1a\x08\x3c\x08\x3c\x08\x5e\x08\x5e\x08\x80\x08'\ b'\x80\x08\xa2\x08\xa2\x08\xc4\x08\xc4\x08\xe6\x08\xe6\x08\x08\x09'\ b'\x08\x09\x2a\x09\x2a\x09\x4c\x09\x4c\x09\x6e\x09\x6e\x09\x90\x09'\ b'\x90\x09\xb2\x09\xb2\x09\xd4\x09\xd4\x09\xf6\x09\xf6\x09\x18\x0a'\ b'\x18\x0a\x3a\x0a\x3a\x0a\x5c\x0a\x5c\x0a\x7e\x0a\x7e\x0a\xa0\x0a'\ b'\xa0\x0a\xc2\x0a\xc2\x0a\xe4\x0a\xe4\x0a\x06\x0b\x06\x0b\x28\x0b'\ b'\x28\x0b\x4a\x0b\x4a\x0b\x6c\x0b\x6c\x0b\x8e\x0b\x8e\x0b\xb0\x0b'\ b'\xb0\x0b\xd2\x0b\xd2\x0b\xf4\x0b\xf4\x0b\x16\x0c\x16\x0c\x38\x0c'\ b'\x38\x0c\x5a\x0c\x5a\x0c\x7c\x0c\x7c\x0c\x9e\x0c\x9e\x0c\xc0\x0c'\ _mvfont = memoryview(_font) def get_ch(ch): ordch = ord(ch) ordch = ordch + 1 if ordch >= 32 and ordch <= 126 else 63 idx_offs = 4 * (ordch - 32) offset = int.from_bytes(_index[idx_offs : idx_offs + 2], 'little') next_offs = int.from_bytes(_index[idx_offs + 2 : idx_offs + 4], 'little') width = int.from_bytes(_font[offset:offset + 2], 'little') return _mvfont[offset + 2:next_offs], 16, width
""" Выведите все четные элементы списка. Формат ввода Вводится список чисел. Все числа списка находятся на одной строке. Формат вывода Выведите ответ на задачу. """ print(*(i for i in input().split() if not int(i) % 2))
class Pessoa: #Atributos de classe são alocados apenas uma vez na memória olhos = 2 #Atributos de instância são alocados sempre que um objeto é criado def __init__(self, *filhos:list, nome=None, idade=None): self.nome = nome self.idade = idade self.filhos = list(filhos) def cumprimentar(self): return f'Oi! {id(self)}' #Método de classe usando o decorator @staticmethod @staticmethod def metodo_estatico(): return 42 #Método de classe usando o decorator @staticmethod @classmethod def get_nome_atributos_de_classe(cls): return f'Nome da classe: {cls} - Olhos: {cls.olhos}' if __name__ == '__main__': joaquim = Pessoa(nome='Joaquim') lucioano = Pessoa(joaquim, nome='Luciano') print(Pessoa.cumprimentar(lucioano)) print(id(lucioano)) print(lucioano.cumprimentar()) print(lucioano.nome) for filho in lucioano.filhos: print(f'Filho: {filho.nome}') print(1) lucioano.sobrenome = 'Ramalho' del lucioano.filhos lucioano.olhos = 1 del lucioano.olhos print(lucioano.__dict__) print(joaquim.__dict__) Pessoa.olhos = 3 print(Pessoa.olhos) print(lucioano.olhos) print(joaquim.olhos) print(id(Pessoa.olhos), id(lucioano.olhos), id(joaquim.olhos)) print(Pessoa.metodo_estatico(), lucioano.metodo_estatico()) print(Pessoa.get_nome_atributos_de_classe(), lucioano.get_nome_atributos_de_classe())
orgM = cmds.ls(sl=1,fl=1) newM = cmds.ls(sl=1,fl=1) for nm in newM: for om in orgM: if nm.split(':')[0] == om.split(':')[0]+'1': trans = cmds.xform(om,ws=1,piv=1,q=1) rot = cmds.xform(om,ws=1,ro=1,q=1) cmds.xform(nm,t=trans[0:3],ro=rot) cmds.namespace(ren=((nm.split(':')[0]),(nm.split(':')[1])))
class Solution: def isValid(self, s: str): count = 0 for i in s: if i == '(': count += 1 if i == ')': count -=1 if count < 0: return False return count == 0 def removeInvalidParentheses(self, s: str) -> List[str]: answers = set() queue = [s] visited = set() while len(queue) > 0: item = queue.pop(0) if item in visited: continue if self.isValid(item): answers.add(item) if len(answers)>0: continue for i in range(len(item)): if item[i] not in '()': continue l = list(item) del(l[i]) string = "".join(l) queue.append(string) visited.add(item) return list(answers)
""" Let's reverse engineer the process. Imagine you are standing at the last index i index i-1 will need the value>=1 to go to i (step_need=1) index i-2 will need the value>=2 to go to i (step_need=2) ... At a certain index x, the value>=step_need This means that, from x, we can go to i no problem. Now we are standing at x and reset step_need to 0. See if we can repeat the process until we reach the first index. """ class Solution(object): def canJump(self, nums): step_need = 0 for num in reversed(nums[:-1]): step_need+=1 if num>=step_need: step_need = 0 return step_need==0
# Copyright 2017 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. DEPS = [ 'chromium_tests', 'depot_tools/tryserver', 'recipe_engine/platform', 'recipe_engine/properties', ] def RunSteps(api): tests = [] if api.properties.get('local_gtest'): tests.append(api.chromium_tests.steps.LocalGTestTest('base_unittests')) if api.properties.get('swarming_gtest'): tests.append(api.chromium_tests.steps.SwarmingGTestTest('base_unittests')) if api.tryserver.is_tryserver: bot_config = api.chromium_tests.trybots[ api.properties['mastername']]['builders'][api.properties['buildername']] bot_config_object = api.chromium_tests.create_generalized_bot_config_object( bot_config['bot_ids']) else: bot_config_object = api.chromium_tests.create_bot_config_object( api.properties['mastername'], api.properties['buildername']) api.chromium_tests.configure_build(bot_config_object) with api.chromium_tests.wrap_chromium_tests(bot_config_object, tests=tests): pass def GenTests(api): yield ( api.test('require_device_steps') + api.properties.tryserver( mastername='tryserver.chromium.android', buildername='android_blink_rel', local_gtest=True) ) yield ( api.test('no_require_device_steps') + api.properties.generic( mastername='chromium.linux', buildername='Android Tests') ) yield ( api.test('win') + api.platform.name('win') + api.properties.tryserver( mastername='tryserver.chromium.win', buildername='win_chromium_rel_ng') ) yield ( api.test('isolated_targets') + api.properties.generic( mastername='chromium.linux', buildername='Linux Tests', swarming_gtest=True) )
# -*- coding: utf-8 -*- description = 'detectors' group = 'lowlevel' # is included by panda.py devices = dict( mcstas = device('nicos_virt_mlz.panda.devices.mcstas.PandaSimulation', description = 'McStas simulation', ), timer = device('nicos.devices.mcstas.McStasTimer', mcstas = 'mcstas', visibility = (), ), mon1 = device('nicos.devices.mcstas.McStasCounter', type = 'monitor', mcstas = 'mcstas', mcstasfile = 'PSD_mon1.psd', fmtstr = '%d', visibility = (), ), mon2 = device('nicos.devices.mcstas.McStasCounter', type = 'monitor', mcstas = 'mcstas', mcstasfile = 'PSD_mon2.psd', fmtstr = '%d', visibility = (), ), det1 = device('nicos.devices.mcstas.McStasCounter', type = 'counter', mcstas = 'mcstas', mcstasfile = 'PSD_det2.psd', # correct: in reality det1 is behind det2 fmtstr = '%d', visibility = (), ), det2 = device('nicos.devices.mcstas.McStasCounter', type = 'counter', mcstas = 'mcstas', mcstasfile = 'PSD_det1.psd', fmtstr = '%d', visibility = (), ), det = device('nicos.devices.generic.Detector', description = 'combined four channel single counter detector', timers = ['timer'], monitors = ['mon1', 'mon2'], counters = ['det1', 'det2'], images = [], maxage = 1, pollinterval = 1, ), ) startupcode = ''' SetDetectors(det) '''
k = float(input("Digite uma velocidade em km/h: ")) m = k/3.6 print("Essa velocidade convertida é de {:.2f} m/s" .format(m))
n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]] # Add your function here def flatten(lists): results = [] for i in range(len(lists)): for j in range(len(lists[i])): results.append(lists[i][j]) return results print(flatten(n))
age=int(input()) washing_machine_price=float(input()) toys_price=float(input()) toys_count = 0 money_amount = 0 for years in range(1,age+1): if years % 2 == 0: #price money_amount += years / 2 * 10 money_amount-=1 else: #toy toys_count+=1 toys_price=toys_count*toys_price total_amount = toys_price+money_amount if total_amount>=washing_machine_price: print(f'Yes! {total_amount - washing_machine_price:.2f}') else: print(f'No! {washing_machine_price- total_amount:.2f}')
#!/usr/bin/env python """Parse arguments for functions in the wmem package. """ def parse_common(parser): parser.add_argument( '-D', '--dataslices', nargs='*', type=int, help=""" Data slices, specified as triplets of <start> <stop> <step>; setting any <stop> to 0 or will select the full extent; provide triplets in the order of the input dataset. """ ) parser.add_argument( '-M', '--usempi', action='store_true', help='use mpi4py' ) parser.add_argument( '-S', '--save_steps', action='store_true', help='save intermediate results' ) parser.add_argument( '-P', '--protective', action='store_true', help='protect against overwriting data' ) parser.add_argument( '--blocksize', nargs='*', type=int, default=[], help='size of the datablock' ) parser.add_argument( '--blockmargin', nargs='*', type=int, default=[], help='the datablock overlap used' ) parser.add_argument( '--blockrange', nargs=2, type=int, default=[], help='a range of blocks to process' ) return parser def parse_downsample_slices(parser): parser.add_argument( 'inputdir', help='a directory with images' ) parser.add_argument( 'outputdir', help='the output directory' ) parser.add_argument( '-r', '--regex', default='*.tif', help='regular expression to select files' ) parser.add_argument( '-f', '--downsample_factor', type=int, default=4, help='the factor to downsample the images by' ) return parser def parse_series2stack(parser): parser.add_argument( 'inputpath', help='a directory with images' ) parser.add_argument( 'outputpath', help='the path to the output dataset' ) parser.add_argument( '-d', '--datatype', default=None, help='the numpy-style output datatype' ) parser.add_argument( '-i', '--inlayout', default=None, help='the data layout of the input' ) parser.add_argument( '-o', '--outlayout', default=None, help='the data layout for output' ) parser.add_argument( '-e', '--element_size_um', nargs='*', type=float, default=[], help='dataset element sizes in the order of outlayout' ) parser.add_argument( '-s', '--chunksize', type=int, nargs='*', default=[], help='hdf5 chunk sizes in the order of outlayout' ) return parser def parse_stack2stack(parser): parser.add_argument( 'inputpath', help='the inputfile' ) parser.add_argument( 'outputpath', help='the outputfile' ) parser.add_argument( '-p', '--dset_name', default='', help='the identifier of the datablock' ) parser.add_argument( '-b', '--blockoffset', type=int, default=[0, 0, 0], nargs='*', help='...' ) parser.add_argument( '-s', '--chunksize', type=int, nargs='*', help='hdf5 chunk sizes (in order of outlayout)' ) parser.add_argument( '-e', '--element_size_um', type=float, nargs='*', help='dataset element sizes (in order of outlayout)' ) parser.add_argument( '-i', '--inlayout', default=None, help='the data layout of the input' ) parser.add_argument( '-o', '--outlayout', default=None, help='the data layout for output' ) parser.add_argument( '-d', '--datatype', default=None, help='the numpy-style output datatype' ) parser.add_argument( '-u', '--uint8conv', action='store_true', help='convert data to uint8' ) return parser def parse_prob2mask(parser): parser.add_argument( 'inputpath', help='the path to the input dataset' ) parser.add_argument( 'outputpath', default='', help='the path to the output dataset' ) # parser.add_argument( # '-i', '--inputmask', # nargs=2, # default=None, # help='additional mask to apply to the output' # ) parser.add_argument( '-l', '--lower_threshold', type=float, default=0, help='the lower threshold to apply to the dataset' ) parser.add_argument( '-u', '--upper_threshold', type=float, default=1, help='the lower threshold to apply to the dataset' ) parser.add_argument( '-j', '--step', type=float, default=0.0, help='multiple lower thresholds between 0 and 1 using this step' ) parser.add_argument( '-s', '--size', type=int, default=0, help='remove any components smaller than this number of voxels' ) parser.add_argument( '-d', '--dilation', type=int, default=0, help='perform a mask dilation with a disk/ball-shaped selem of this size' ) parser.add_argument( '-g', '--go2D', action='store_true', help='process as 2D slices' ) return parser def parse_splitblocks(parser): parser.add_argument( 'inputpath', help='the path to the input dataset' ) parser.add_argument( '-d', '--dset_name', default='', help='the name of the input dataset' ) parser.add_argument( '-s', '--chunksize', type=int, nargs='*', help='hdf5 chunk sizes (in order of outlayout)' ) parser.add_argument( '-o', '--outlayout', default=None, help='the data layout for output' ) parser.add_argument( '--outputpath', default='', help="""path to the output directory""" ) return parser def parse_mergeblocks(parser): parser.add_argument( 'inputfiles', nargs='*', help="""paths to hdf5 datasets <filepath>.h5/<...>/<dataset>: datasets to merge together""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: merged dataset""" ) parser.add_argument( '-b', '--blockoffset', nargs=3, type=int, default=[0, 0, 0], help='offset of the datablock' ) parser.add_argument( '-s', '--fullsize', nargs=3, type=int, default=[], help='the size of the full dataset' ) parser.add_argument( '-l', '--is_labelimage', action='store_true', help='flag to indicate labelimage' ) parser.add_argument( '-r', '--relabel', action='store_true', help='apply incremental labeling to each block' ) parser.add_argument( '-n', '--neighbourmerge', action='store_true', help='merge overlapping labels' ) parser.add_argument( '-F', '--save_fwmap', action='store_true', help='save the forward map (.npy)' ) parser.add_argument( '-B', '--blockreduce', nargs=3, type=int, default=[], help='downsample the datablocks' ) parser.add_argument( '-f', '--func', default='np.amax', help='function used for downsampling' ) parser.add_argument( '-d', '--datatype', default='', help='the numpy-style output datatype' ) return parser def parse_downsample_blockwise(parser): parser.add_argument( 'inputpath', help='the path to the input dataset' ) parser.add_argument( 'outputpath', help='the path to the output dataset' ) parser.add_argument( '-B', '--blockreduce', nargs='*', type=int, help='the blocksize' ) parser.add_argument( '-f', '--func', default='np.amax', help='the function to use for blockwise reduction' ) parser.add_argument( '-s', '--fullsize', nargs=3, type=int, default=[], help='the size of the full dataset' ) return parser def parse_connected_components(parser): parser.add_argument( 'inputfile', help='the path to the input dataset' ) parser.add_argument( 'outputfile', default='', help='the path to the output dataset' ) parser.add_argument( '-m', '--mode', help='...' ) parser.add_argument( '-b', '--basename', default='', help='...' ) parser.add_argument( '--maskDS', default='', help='...' ) parser.add_argument( '--maskMM', default='', help='...' ) parser.add_argument( '--maskMB', default='', help='...' ) parser.add_argument( '-d', '--slicedim', type=int, default=0, help='...' ) parser.add_argument( '-p', '--map_propnames', nargs='*', help='...' ) parser.add_argument( '-q', '--min_size_maskMM', type=int, default=None, help='...' ) parser.add_argument( '-a', '--min_area', type=int, default=None, help='...' ) parser.add_argument( '-A', '--max_area', type=int, default=None, help='...' ) parser.add_argument( '-I', '--max_intensity_mb', type=float, default=None, help='...' ) parser.add_argument( '-E', '--max_eccentricity', type=float, default=None, help='...' ) parser.add_argument( '-e', '--min_euler_number', type=float, default=None, help='...' ) parser.add_argument( '-s', '--min_solidity', type=float, default=None, help='...' ) parser.add_argument( '-n', '--min_extent', type=float, default=None, help='...' ) return parser def parse_connected_components_clf(parser): parser.add_argument( 'classifierpath', help='the path to the classifier' ) parser.add_argument( 'scalerpath', help='the path to the scaler' ) parser.add_argument( '-m', '--mode', default='test', help='...' ) parser.add_argument( '-i', '--inputfile', default='', help='the path to the input dataset' ) parser.add_argument( '-o', '--outputfile', default='', help='the path to the output dataset' ) parser.add_argument( '-a', '--maskfile', default='', help='the path to the output dataset' ) parser.add_argument( '-A', '--max_area', type=int, default=None, help='...' ) parser.add_argument( '-I', '--max_intensity_mb', type=float, default=None, help='...' ) parser.add_argument( '-b', '--basename', default='', help='...' ) parser.add_argument( '-p', '--map_propnames', nargs='*', help='...' ) return parser def parse_merge_labels(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '-d', '--slicedim', type=int, default=0, help='...' ) parser.add_argument( '-m', '--merge_method', default='neighbours', help='neighbours, conncomp, and/or watershed' ) parser.add_argument( '-s', '--min_labelsize', type=int, default=0, help='...' ) parser.add_argument( '-R', '--remove_small_labels', action='store_true', help='remove the small labels before further processing' ) parser.add_argument( '-q', '--offsets', type=int, default=2, help='...' ) parser.add_argument( '-o', '--overlap_threshold', type=float, default=0.50, help='for neighbours' ) parser.add_argument( '-r', '--searchradius', nargs=3, type=int, default=[100, 30, 30], help='for watershed' ) parser.add_argument( '--data', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--maskMM', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--maskDS', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_merge_slicelabels(parser): parser.add_argument( 'inputfile', help='the path to the input dataset' ) parser.add_argument( 'outputfile', default='', help='the path to the output dataset' ) parser.add_argument( '--maskMM', default='', help='...' ) parser.add_argument( '-d', '--slicedim', type=int, default=0, help='...' ) parser.add_argument( '-m', '--mode', help='...' ) parser.add_argument( '-p', '--do_map_labels', action='store_true', help='...' ) parser.add_argument( '-q', '--offsets', type=int, default=2, help='...' ) parser.add_argument( '-o', '--threshold_overlap', type=float, default=None, help='...' ) parser.add_argument( '-s', '--min_labelsize', type=int, default=0, help='...' ) parser.add_argument( '-l', '--close', nargs='*', type=int, default=None, help='...' ) parser.add_argument( '-r', '--relabel_from', type=int, default=0, help='...' ) return parser def parse_fill_holes(parser): parser.add_argument( 'inputfile', help='the path to the input dataset' ) parser.add_argument( 'outputfile', default='', help='the path to the output dataset' ) parser.add_argument( '-m', '--methods', default="2", help='method(s) used for filling holes' ) # TODO: document methods parser.add_argument( '-s', '--selem', nargs='*', type=int, default=[3, 3, 3], help='the structuring element used in methods 1, 2 & 3' ) parser.add_argument( '-l', '--labelmask', default='', help='the path to a mask: labelvolume[~labelmask] = 0' ) parser.add_argument( '--maskDS', default='', help='the path to a dataset mask' ) parser.add_argument( '--maskMM', default='', help='the path to a mask of the myelin compartment' ) parser.add_argument( '--maskMX', default='', help='the path to a mask of a low-thresholded myelin compartment' ) parser.add_argument( '--outputholes', default='', help='the path to the output dataset (filled holes)' ) parser.add_argument( '--outputMA', default='', help='the path to the output dataset (updated myel. axon mask)' ) # TODO: then need to update labelvolume as well?! parser.add_argument( '--outputMM', default='', help='the path to the output dataset (updated myelin mask)' ) return parser def parse_separate_sheaths(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with myelinated axon labels used as seeds for watershed dilated with scipy's <grey_dilation(<dataset>, size=[3, 3, 3])>""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with separated myelin sheaths""" ) parser.add_argument( '--maskWS', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: maskvolume of the myelin space to which the watershed will be constrained""" ) parser.add_argument( '--maskDS', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: maskvolume of the data""" ) parser.add_argument( '--maskMM', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: maskvolume of the myelin compartment""" ) parser.add_argument( '-d', '--dilation_iterations', type=int, nargs='*', default=[1, 7, 7], help="""number of iterations for binary dilation of the myelinated axon compartment (as derived from inputfile): it determines the maximal extent the myelin sheath can be from the axon""" ) parser.add_argument( '--distance', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: distance map volume used in for watershed""" ) parser.add_argument( '--labelMM', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume used in calculating the median sheath thickness of each sheath for the sigmoid-weighted distance map""" ) parser.add_argument( '-w', '--sigmoidweighting', type=float, help="""the steepness of the sigmoid <scipy.special.expit(w * np.median(sheath_thickness)>""" ) parser.add_argument( '-m', '--margin', type=int, default=50, help="""margin of the box used when calculating the sigmoid-weighted distance map""" ) parser.add_argument( '--medwidth_file', default='', help="""pickle of dictionary with median widths {label: medwidth}""" ) return parser def parse_agglo_from_labelsets(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume of oversegmented supervoxels""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with agglomerated labels""" ) group = parser.add_mutually_exclusive_group(required=True) group.add_argument( '-l', '--labelset_files', nargs='*', default=[], help="""files with label mappings, either A.) pickled python dictionary {label_new1: [<label_1>, <label_2>, <...>], label_new2: [<label_6>, <label_3>, <...>]} B.) ascii files with on each line: <label_new1>: <label_1> <label_2> <...> <label_new2>: <label_6> <label_3> <...>""" ) group.add_argument( '-f', '--fwmap', help="""numpy .npy file with vector of length np.amax(<labels>) + 1 representing the forward map to apply, e.g. fwmap = np.array([0, 0, 4, 8, 8]) will map the values 0, 1, 2, 3, 4 in the labelvolume to the new values 0, 0, 4, 8, 8; i.e. it will delete label 1, relabel label 2 to 4, and merge labels 3 & 4 to new label value 8 """ ) return parser def parse_watershed_ics(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: input to the watershed algorithm""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with watershed oversegmentation""" ) parser.add_argument( '--mask_in', default='', help="""""" ) parser.add_argument( '--seedimage', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with seeds to the watershed""" ) parser.add_argument( '-l', '--lower_threshold', type=float, default=0.00, help='the lower threshold for generating seeds from the dataset' ) parser.add_argument( '-u', '--upper_threshold', type=float, default=1.00, help='the upper threshold for generating seeds from the dataset' ) parser.add_argument( '-s', '--seed_size', type=int, default=64, help='the minimal size of a seed label' ) parser.add_argument( '-i', '--invert', action='store_true', help='invert the input volume' ) return parser def parse_agglo_from_labelmask(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume""" ) parser.add_argument( 'oversegmentation', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume of oversegmented supervoxels""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with agglomerated labels""" ) parser.add_argument( '-r', '--ratio_threshold', type=float, default=0, help='...' ) parser.add_argument( '-m', '--axon_mask', action='store_true', help='use axons as output mask' ) return parser def parse_remap_labels(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume with deleted/merged/split labels""" ) parser.add_argument( '-B', '--delete_labels', nargs='*', type=int, default=[], help='list of labels to delete' ) parser.add_argument( '-d', '--delete_files', nargs='*', default=[], help='list of files with labelsets to delete' ) parser.add_argument( '--except_files', nargs='*', default=[], help='...' ) parser.add_argument( '-E', '--merge_labels', nargs='*', type=int, default=[], help='list with pairs of labels to merge' ) parser.add_argument( '-e', '--merge_files', nargs='*', default=[], help='list of files with labelsets to merge' ) parser.add_argument( '-F', '--split_labels', nargs='*', type=int, default=[], help='list of labels to split' ) parser.add_argument( '-f', '--split_files', nargs='*', default=[], help='list of files with labelsets to split' ) parser.add_argument( '-A', '--aux_labelvolume', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: labelvolume from which to take alternative labels""" ) parser.add_argument( '-q', '--min_labelsize', type=int, default=0, help='the minimum size of the labels' ) parser.add_argument( '-p', '--min_segmentsize', type=int, default=0, help='the minimum segment size of non-contiguous labels' ) parser.add_argument( '-k', '--keep_only_largest', action='store_true', help='keep only the largest segment of a split label' ) parser.add_argument( '-O', '--conncomp', action='store_true', help='relabel split labels with connected component labeling' ) parser.add_argument( '-n', '--nifti_output', action='store_true', help='also write output to nifti' ) parser.add_argument( '-m', '--nifti_transpose', action='store_true', help='transpose the output before writing to nifti' ) return parser def parse_nodes_of_ranvier(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '-s', '--min_labelsize', type=int, default=0, help='...' ) parser.add_argument( '-R', '--remove_small_labels', action='store_true', help='remove the small labels before further processing' ) parser.add_argument( '--boundarymask', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '-m', '--merge_methods', nargs='*', default=['neighbours'], help='neighbours, conncomp, and/or watershed' ) parser.add_argument( '-o', '--overlap_threshold', type=int, default=20, help='for neighbours' ) parser.add_argument( '-r', '--searchradius', nargs=3, type=int, default=[100, 30, 30], help='for watershed' ) parser.add_argument( '--data', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--maskMM', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_filter_NoR(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--input2D', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_convert_dm3(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--input2D', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_seg_stats(parser): parser.add_argument( '--h5path_labelMA', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--h5path_labelMF', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--h5path_labelUA', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--stats', nargs='*', default=['area', 'AD', 'centroid', 'eccentricity', 'solidity'], help="""the statistics to export""" ) parser.add_argument( '--outputbasename', help="""basename for the output""" ) return parser def parse_correct_attributes(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'auxfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_combine_vols(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '-i', '--volidxs', nargs='*', type=int, default=[], help="""indices to the volumes""" ) parser.add_argument( '--bias_image', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_slicvoxels(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '--masks', nargs='*', default=[], help="""string of paths to hdf5 datasets <filepath>.h5/<...>/<dataset> and logical functions (NOT, AND, OR, XOR) to add the hdf5 masks together (NOT operates on the following dataset), e.g. NOT <f1>.h5/<m1> AND <f1>.h5/<m2> will first invert m1, then combine the result with m2 through the AND operator starting point is np.ones(<in>.shape[:3], dtype='bool')""" ) parser.add_argument( '-l', '--slicvoxelsize', type=int, default=500, help="""target size of the slicvoxels""", ) parser.add_argument( '-c', '--compactness', type=float, default=0.2, help="""compactness of the slicvoxels""", ) parser.add_argument( '-s', '--sigma', type=float, default=1, help='Gaussian smoothing sigma for preprocessing', ) parser.add_argument( '-e', '--enforce_connectivity', action='store_true', help='enforce connectivity of the slicvoxels', ) return parser def parse_image_ops(parser): parser.add_argument( 'inputfile', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '-s', '--sigma', nargs='*', type=float, default=[0.0], help='Gaussian smoothing sigma (in um)', ) return parser def parse_combine_labels(parser): parser.add_argument( 'inputfile1', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( 'inputfile2', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) parser.add_argument( '-m', '--method', help="""add/subtract/merge/...""" ) parser.add_argument( 'outputfile', default='', help="""path to hdf5 dataset <filepath>.h5/<...>/<dataset>: """ ) return parser def parse_neuroblender(parser): return parser
#Ejercicio precio = float(input("Ingrese el precio: ")) descuento = precio * 0.15 precio_final = precio - descuento print (f"el precio final a pagar es: {precio_final:.2f}") print (descuento)
# write your code here user_field = input("Enter cells: ") game_board = [] player_1 = "X" player_2 = "O" def print_field(field): global game_board coordinates = list() game_board = [[field[0], field[1], field[2]], [field[3], field[4], field[5]], [field[6], field[7], field[8]]] def printer(board): print("---------") print("| " + " ".join(board[0]) + " |") print("| " + " ".join(board[1]) + " |") print("| " + " ".join(board[2]) + " |") print("---------") printer(game_board) field = input("Enter the coordinates: ").split() def validation(user_input): # validate input type for item in user_input: if item.isnumeric(): if 1 <= int(item) <= 3: # - 1 to match matrix coordinate (0-2 vs 1-3) coordinates.append(int(item) - 1) else: print("Coordinates should be from 1 to 3!") coordinates.clear() return False else: print("You should enter numbers!") coordinates.clear() return False del coordinates[2:] # adjust coordinates for matrix output coordinates[1] = abs(coordinates[1] - 2) coordinates.reverse() print("CALCULATED coordinates ", coordinates) if game_board[coordinates[0]][coordinates[1]] == "_": # trim extra input items if coordinate list is too long return coordinates, True else: print("This cell is occupied! Choose another one!") coordinates.clear() return False while validation(field) is False: field = input("Enter the NEW coordinates: ").split() # update game board with new move game_board[coordinates[0]][coordinates[1]] = player_1 printer(game_board) return field def print_game_status(): def win_status(player): # check rows for row in game_board: if row.count(player) == 3: return True # check columns column = [[], [], []] for x in range(0, 3): for row in game_board: column[x].append(row[x]) if column[x].count(player) == 3: return True # check diagonals diagonal_1 = [game_board[0][0], game_board[1][1], game_board[2][2]] diagonal_2 = [game_board[0][2], game_board[1][1], game_board[2][0]] if diagonal_1.count(player) == 3 or diagonal_2.count(player) == 3: return True def finished(board): for i in range(len(board)): if "_" in board[i]: return True def too_many(x, o): num_x = [square for row in game_board for square in row if square == x] num_y = [square for row in game_board for square in row if square == o] if abs(len(num_x) - len(num_y)) >= 2: return True def print_outcome(x, o): win_status(x) win_status(o) if win_status(x) and win_status(o): print("Impossible") elif too_many(x, o) is True: print("Impossible") elif win_status(x): print(f"{x} wins") elif win_status(o): print(f"{o} wins") elif win_status(x) is not True and win_status(o) is not True: if finished(game_board) is True: print("Game not finished") else: print("Draw") print_outcome(player_1, player_2) print_field(user_field) print_game_status()
# takes two inputs and adds them together as ints; # outputs solution print(int(input()) + int(input()))
""" PASSENGERS """ numPassengers = 2757 passenger_arriving = ( (3, 9, 6, 2, 3, 0, 9, 5, 3, 3, 1, 0), # 0 (2, 11, 10, 1, 1, 0, 2, 4, 2, 2, 0, 0), # 1 (1, 10, 5, 3, 2, 0, 5, 12, 6, 3, 1, 0), # 2 (5, 8, 7, 2, 1, 0, 6, 7, 5, 5, 1, 0), # 3 (3, 5, 5, 3, 2, 0, 9, 8, 4, 0, 1, 0), # 4 (1, 9, 11, 4, 1, 0, 7, 7, 6, 4, 0, 0), # 5 (3, 8, 5, 3, 0, 0, 6, 9, 1, 6, 1, 0), # 6 (3, 6, 7, 2, 1, 0, 2, 2, 5, 1, 1, 0), # 7 (4, 4, 2, 2, 0, 0, 7, 8, 2, 5, 1, 0), # 8 (8, 7, 4, 4, 1, 0, 1, 9, 4, 6, 4, 0), # 9 (2, 5, 8, 5, 3, 0, 7, 8, 2, 6, 0, 0), # 10 (4, 10, 2, 2, 1, 0, 7, 7, 6, 4, 6, 0), # 11 (5, 10, 5, 4, 4, 0, 3, 10, 8, 6, 3, 0), # 12 (4, 11, 7, 5, 0, 0, 10, 9, 4, 4, 2, 0), # 13 (4, 11, 5, 4, 2, 0, 7, 7, 5, 5, 3, 0), # 14 (1, 8, 3, 3, 0, 0, 3, 7, 3, 4, 2, 0), # 15 (1, 10, 8, 1, 3, 0, 8, 7, 7, 9, 3, 0), # 16 (8, 9, 7, 3, 4, 0, 7, 6, 5, 2, 1, 0), # 17 (4, 11, 6, 1, 0, 0, 5, 4, 7, 3, 2, 0), # 18 (3, 10, 7, 5, 2, 0, 5, 4, 5, 4, 0, 0), # 19 (5, 10, 6, 4, 2, 0, 1, 13, 8, 7, 3, 0), # 20 (4, 4, 7, 5, 1, 0, 7, 8, 1, 9, 5, 0), # 21 (4, 6, 4, 3, 2, 0, 7, 10, 1, 6, 2, 0), # 22 (1, 5, 6, 7, 2, 0, 4, 5, 6, 3, 2, 0), # 23 (4, 10, 10, 0, 1, 0, 8, 4, 2, 6, 3, 0), # 24 (4, 8, 4, 3, 1, 0, 4, 6, 5, 2, 5, 0), # 25 (3, 13, 9, 5, 4, 0, 3, 10, 5, 4, 1, 0), # 26 (2, 10, 5, 6, 3, 0, 8, 6, 3, 1, 2, 0), # 27 (6, 9, 8, 5, 6, 0, 4, 10, 8, 3, 1, 0), # 28 (2, 9, 5, 3, 3, 0, 4, 11, 3, 5, 0, 0), # 29 (6, 7, 7, 2, 1, 0, 5, 8, 7, 4, 1, 0), # 30 (5, 3, 5, 3, 1, 0, 4, 5, 7, 6, 2, 0), # 31 (3, 9, 7, 4, 0, 0, 5, 5, 8, 3, 1, 0), # 32 (3, 6, 7, 1, 3, 0, 4, 5, 2, 4, 2, 0), # 33 (2, 8, 13, 5, 1, 0, 8, 4, 9, 4, 5, 0), # 34 (5, 11, 5, 3, 4, 0, 4, 6, 9, 5, 1, 0), # 35 (3, 9, 8, 3, 2, 0, 7, 9, 7, 3, 5, 0), # 36 (2, 8, 0, 2, 2, 0, 7, 10, 11, 4, 3, 0), # 37 (1, 13, 5, 4, 0, 0, 5, 6, 1, 5, 1, 0), # 38 (4, 10, 5, 3, 2, 0, 13, 7, 5, 5, 4, 0), # 39 (5, 6, 10, 4, 3, 0, 2, 10, 4, 2, 1, 0), # 40 (4, 9, 4, 1, 2, 0, 5, 10, 3, 1, 3, 0), # 41 (3, 7, 7, 5, 1, 0, 3, 9, 7, 2, 6, 0), # 42 (4, 7, 9, 2, 2, 0, 4, 8, 4, 4, 1, 0), # 43 (3, 9, 7, 3, 4, 0, 5, 9, 6, 1, 2, 0), # 44 (1, 10, 5, 2, 3, 0, 10, 7, 5, 0, 1, 0), # 45 (5, 8, 8, 2, 2, 0, 6, 4, 6, 5, 4, 0), # 46 (3, 5, 8, 1, 1, 0, 2, 7, 1, 3, 3, 0), # 47 (1, 3, 6, 3, 2, 0, 7, 9, 6, 7, 2, 0), # 48 (4, 8, 5, 6, 0, 0, 5, 5, 3, 6, 4, 0), # 49 (8, 1, 6, 9, 3, 0, 5, 5, 3, 3, 4, 0), # 50 (4, 7, 4, 4, 2, 0, 6, 5, 5, 5, 5, 0), # 51 (6, 6, 7, 1, 3, 0, 10, 3, 6, 2, 0, 0), # 52 (5, 7, 5, 4, 3, 0, 5, 5, 7, 3, 1, 0), # 53 (4, 6, 0, 3, 2, 0, 9, 11, 2, 1, 2, 0), # 54 (6, 9, 6, 1, 3, 0, 3, 6, 7, 4, 1, 0), # 55 (3, 7, 7, 4, 2, 0, 7, 8, 5, 4, 2, 0), # 56 (3, 10, 5, 4, 1, 0, 5, 7, 6, 1, 0, 0), # 57 (3, 12, 4, 3, 2, 0, 4, 6, 7, 10, 0, 0), # 58 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59 ) station_arriving_intensity = ( (3.1795818700614573, 8.15575284090909, 9.59308322622108, 7.603532608695652, 8.571634615384614, 5.708152173913044), # 0 (3.20942641205736, 8.246449918455387, 9.644898645029993, 7.6458772644927535, 8.635879807692307, 5.706206567028985), # 1 (3.238930172666081, 8.335801683501682, 9.695484147386459, 7.687289855072463, 8.69876923076923, 5.704201449275362), # 2 (3.268068107989464, 8.42371171875, 9.744802779562981, 7.727735054347824, 8.760245192307693, 5.702137092391305), # 3 (3.296815174129353, 8.510083606902358, 9.792817587832047, 7.767177536231884, 8.82025, 5.700013768115941), # 4 (3.3251463271875914, 8.594820930660775, 9.839491618466152, 7.805581974637681, 8.87872596153846, 5.697831748188405), # 5 (3.353036523266023, 8.677827272727273, 9.88478791773779, 7.842913043478261, 8.935615384615383, 5.695591304347826), # 6 (3.380460718466491, 8.75900621580387, 9.92866953191945, 7.879135416666666, 8.990860576923078, 5.693292708333334), # 7 (3.40739386889084, 8.83826134259259, 9.971099507283634, 7.914213768115941, 9.044403846153847, 5.6909362318840575), # 8 (3.4338109306409126, 8.915496235795453, 10.012040890102828, 7.9481127717391304, 9.0961875, 5.68852214673913), # 9 (3.459686859818554, 8.990614478114479, 10.051456726649528, 7.980797101449276, 9.146153846153846, 5.68605072463768), # 10 (3.4849966125256073, 9.063519652251683, 10.089310063196228, 8.012231431159421, 9.194245192307692, 5.683522237318841), # 11 (3.509715144863916, 9.134115340909089, 10.125563946015424, 8.042380434782608, 9.240403846153844, 5.680936956521738), # 12 (3.5338174129353224, 9.20230512678872, 10.160181421379605, 8.071208786231884, 9.284572115384616, 5.678295153985506), # 13 (3.5572783728416737, 9.267992592592593, 10.193125535561265, 8.098681159420288, 9.326692307692307, 5.6755971014492745), # 14 (3.5800729806848106, 9.331081321022726, 10.224359334832902, 8.124762228260868, 9.36670673076923, 5.672843070652174), # 15 (3.6021761925665783, 9.391474894781144, 10.25384586546701, 8.149416666666665, 9.404557692307693, 5.6700333333333335), # 16 (3.6235629645888205, 9.449076896569863, 10.281548173736075, 8.172609148550725, 9.4401875, 5.667168161231884), # 17 (3.64420825285338, 9.503790909090908, 10.307429305912597, 8.194304347826087, 9.473538461538464, 5.664247826086956), # 18 (3.664087013462101, 9.555520515046295, 10.331452308269066, 8.214466938405796, 9.504552884615384, 5.661272599637681), # 19 (3.683174202516827, 9.604169297138045, 10.353580227077975, 8.2330615942029, 9.533173076923077, 5.658242753623187), # 20 (3.7014447761194034, 9.649640838068178, 10.373776108611827, 8.250052989130435, 9.559341346153845, 5.655158559782609), # 21 (3.7188736903716704, 9.69183872053872, 10.3920029991431, 8.26540579710145, 9.582999999999998, 5.652020289855073), # 22 (3.7354359013754754, 9.730666527251683, 10.408223944944302, 8.279084692028986, 9.604091346153846, 5.6488282155797105), # 23 (3.75110636523266, 9.76602784090909, 10.422401992287917, 8.291054347826087, 9.62255769230769, 5.645582608695652), # 24 (3.7658600380450684, 9.797826244212962, 10.434500187446444, 8.301279438405798, 9.638341346153844, 5.642283740942029), # 25 (3.779671875914545, 9.825965319865318, 10.444481576692374, 8.309724637681159, 9.651384615384615, 5.63893188405797), # 26 (3.792516834942932, 9.85034865056818, 10.452309206298198, 8.316354619565217, 9.661629807692309, 5.635527309782609), # 27 (3.804369871232075, 9.870879819023568, 10.457946122536418, 8.321134057971014, 9.66901923076923, 5.632070289855072), # 28 (3.815205940883816, 9.887462407933501, 10.461355371679518, 8.324027626811594, 9.673495192307692, 5.628561096014493), # 29 (3.8249999999999997, 9.9, 10.4625, 8.325, 9.674999999999999, 5.625), # 30 (3.834164434143222, 9.910414559659088, 10.461641938405796, 8.324824387254901, 9.674452393617022, 5.620051511744128), # 31 (3.843131010230179, 9.920691477272728, 10.459092028985506, 8.324300980392156, 9.672821276595744, 5.612429710144928), # 32 (3.8519037563938614, 9.930829474431818, 10.45488668478261, 8.323434926470588, 9.670124202127658, 5.6022092203898035), # 33 (3.860486700767263, 9.940827272727272, 10.449062318840578, 8.32223137254902, 9.666378723404256, 5.589464667666167), # 34 (3.8688838714833755, 9.950683593749998, 10.441655344202898, 8.320695465686274, 9.661602393617022, 5.574270677161419), # 35 (3.8770992966751923, 9.96039715909091, 10.432702173913043, 8.318832352941177, 9.655812765957448, 5.556701874062968), # 36 (3.885137004475703, 9.96996669034091, 10.422239221014491, 8.316647181372549, 9.64902739361702, 5.536832883558221), # 37 (3.893001023017902, 9.979390909090908, 10.410302898550723, 8.314145098039214, 9.641263829787233, 5.514738330834581), # 38 (3.900695380434782, 9.988668536931817, 10.396929619565215, 8.31133125, 9.632539627659574, 5.490492841079459), # 39 (3.908224104859335, 9.997798295454546, 10.382155797101449, 8.308210784313726, 9.62287234042553, 5.464171039480259), # 40 (3.915591224424552, 10.006778906249998, 10.366017844202899, 8.304788848039216, 9.612279521276594, 5.435847551224389), # 41 (3.9228007672634266, 10.015609090909093, 10.348552173913044, 8.301070588235293, 9.600778723404256, 5.40559700149925), # 42 (3.929856761508952, 10.024287571022725, 10.329795199275361, 8.297061151960785, 9.5883875, 5.373494015492254), # 43 (3.936763235294117, 10.032813068181818, 10.309783333333334, 8.292765686274508, 9.575123404255319, 5.339613218390804), # 44 (3.9435242167519178, 10.041184303977271, 10.288552989130435, 8.288189338235293, 9.561003989361701, 5.304029235382309), # 45 (3.9501437340153456, 10.0494, 10.266140579710147, 8.28333725490196, 9.546046808510638, 5.266816691654173), # 46 (3.956625815217391, 10.05745887784091, 10.24258251811594, 8.278214583333332, 9.530269414893617, 5.228050212393803), # 47 (3.962974488491049, 10.065359659090909, 10.217915217391303, 8.272826470588234, 9.513689361702127, 5.187804422788607), # 48 (3.9691937819693086, 10.073101065340907, 10.19217509057971, 8.26717806372549, 9.49632420212766, 5.146153948025987), # 49 (3.9752877237851663, 10.080681818181816, 10.165398550724637, 8.261274509803922, 9.478191489361702, 5.103173413293353), # 50 (3.9812603420716113, 10.088100639204544, 10.137622010869565, 8.255120955882353, 9.459308776595744, 5.0589374437781105), # 51 (3.987115664961637, 10.09535625, 10.10888188405797, 8.248722549019607, 9.439693617021277, 5.013520664667666), # 52 (3.992857720588235, 10.10244737215909, 10.079214583333332, 8.24208443627451, 9.419363563829787, 4.966997701149425), # 53 (3.9984905370843995, 10.109372727272726, 10.04865652173913, 8.235211764705882, 9.398336170212765, 4.919443178410794), # 54 (4.00401814258312, 10.116131036931817, 10.017244112318838, 8.22810968137255, 9.376628989361702, 4.87093172163918), # 55 (4.0094445652173905, 10.122721022727271, 9.985013768115941, 8.220783333333333, 9.354259574468085, 4.821537956021989), # 56 (4.014773833120205, 10.129141406250001, 9.952001902173912, 8.213237867647058, 9.331245478723403, 4.771336506746626), # 57 (4.0200099744245525, 10.135390909090907, 9.91824492753623, 8.20547843137255, 9.307604255319148, 4.7204019990005), # 58 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59 ) passenger_arriving_acc = ( (3, 9, 6, 2, 3, 0, 9, 5, 3, 3, 1, 0), # 0 (5, 20, 16, 3, 4, 0, 11, 9, 5, 5, 1, 0), # 1 (6, 30, 21, 6, 6, 0, 16, 21, 11, 8, 2, 0), # 2 (11, 38, 28, 8, 7, 0, 22, 28, 16, 13, 3, 0), # 3 (14, 43, 33, 11, 9, 0, 31, 36, 20, 13, 4, 0), # 4 (15, 52, 44, 15, 10, 0, 38, 43, 26, 17, 4, 0), # 5 (18, 60, 49, 18, 10, 0, 44, 52, 27, 23, 5, 0), # 6 (21, 66, 56, 20, 11, 0, 46, 54, 32, 24, 6, 0), # 7 (25, 70, 58, 22, 11, 0, 53, 62, 34, 29, 7, 0), # 8 (33, 77, 62, 26, 12, 0, 54, 71, 38, 35, 11, 0), # 9 (35, 82, 70, 31, 15, 0, 61, 79, 40, 41, 11, 0), # 10 (39, 92, 72, 33, 16, 0, 68, 86, 46, 45, 17, 0), # 11 (44, 102, 77, 37, 20, 0, 71, 96, 54, 51, 20, 0), # 12 (48, 113, 84, 42, 20, 0, 81, 105, 58, 55, 22, 0), # 13 (52, 124, 89, 46, 22, 0, 88, 112, 63, 60, 25, 0), # 14 (53, 132, 92, 49, 22, 0, 91, 119, 66, 64, 27, 0), # 15 (54, 142, 100, 50, 25, 0, 99, 126, 73, 73, 30, 0), # 16 (62, 151, 107, 53, 29, 0, 106, 132, 78, 75, 31, 0), # 17 (66, 162, 113, 54, 29, 0, 111, 136, 85, 78, 33, 0), # 18 (69, 172, 120, 59, 31, 0, 116, 140, 90, 82, 33, 0), # 19 (74, 182, 126, 63, 33, 0, 117, 153, 98, 89, 36, 0), # 20 (78, 186, 133, 68, 34, 0, 124, 161, 99, 98, 41, 0), # 21 (82, 192, 137, 71, 36, 0, 131, 171, 100, 104, 43, 0), # 22 (83, 197, 143, 78, 38, 0, 135, 176, 106, 107, 45, 0), # 23 (87, 207, 153, 78, 39, 0, 143, 180, 108, 113, 48, 0), # 24 (91, 215, 157, 81, 40, 0, 147, 186, 113, 115, 53, 0), # 25 (94, 228, 166, 86, 44, 0, 150, 196, 118, 119, 54, 0), # 26 (96, 238, 171, 92, 47, 0, 158, 202, 121, 120, 56, 0), # 27 (102, 247, 179, 97, 53, 0, 162, 212, 129, 123, 57, 0), # 28 (104, 256, 184, 100, 56, 0, 166, 223, 132, 128, 57, 0), # 29 (110, 263, 191, 102, 57, 0, 171, 231, 139, 132, 58, 0), # 30 (115, 266, 196, 105, 58, 0, 175, 236, 146, 138, 60, 0), # 31 (118, 275, 203, 109, 58, 0, 180, 241, 154, 141, 61, 0), # 32 (121, 281, 210, 110, 61, 0, 184, 246, 156, 145, 63, 0), # 33 (123, 289, 223, 115, 62, 0, 192, 250, 165, 149, 68, 0), # 34 (128, 300, 228, 118, 66, 0, 196, 256, 174, 154, 69, 0), # 35 (131, 309, 236, 121, 68, 0, 203, 265, 181, 157, 74, 0), # 36 (133, 317, 236, 123, 70, 0, 210, 275, 192, 161, 77, 0), # 37 (134, 330, 241, 127, 70, 0, 215, 281, 193, 166, 78, 0), # 38 (138, 340, 246, 130, 72, 0, 228, 288, 198, 171, 82, 0), # 39 (143, 346, 256, 134, 75, 0, 230, 298, 202, 173, 83, 0), # 40 (147, 355, 260, 135, 77, 0, 235, 308, 205, 174, 86, 0), # 41 (150, 362, 267, 140, 78, 0, 238, 317, 212, 176, 92, 0), # 42 (154, 369, 276, 142, 80, 0, 242, 325, 216, 180, 93, 0), # 43 (157, 378, 283, 145, 84, 0, 247, 334, 222, 181, 95, 0), # 44 (158, 388, 288, 147, 87, 0, 257, 341, 227, 181, 96, 0), # 45 (163, 396, 296, 149, 89, 0, 263, 345, 233, 186, 100, 0), # 46 (166, 401, 304, 150, 90, 0, 265, 352, 234, 189, 103, 0), # 47 (167, 404, 310, 153, 92, 0, 272, 361, 240, 196, 105, 0), # 48 (171, 412, 315, 159, 92, 0, 277, 366, 243, 202, 109, 0), # 49 (179, 413, 321, 168, 95, 0, 282, 371, 246, 205, 113, 0), # 50 (183, 420, 325, 172, 97, 0, 288, 376, 251, 210, 118, 0), # 51 (189, 426, 332, 173, 100, 0, 298, 379, 257, 212, 118, 0), # 52 (194, 433, 337, 177, 103, 0, 303, 384, 264, 215, 119, 0), # 53 (198, 439, 337, 180, 105, 0, 312, 395, 266, 216, 121, 0), # 54 (204, 448, 343, 181, 108, 0, 315, 401, 273, 220, 122, 0), # 55 (207, 455, 350, 185, 110, 0, 322, 409, 278, 224, 124, 0), # 56 (210, 465, 355, 189, 111, 0, 327, 416, 284, 225, 124, 0), # 57 (213, 477, 359, 192, 113, 0, 331, 422, 291, 235, 124, 0), # 58 (213, 477, 359, 192, 113, 0, 331, 422, 291, 235, 124, 0), # 59 ) passenger_arriving_rate = ( (3.1795818700614573, 6.524602272727271, 5.755849935732647, 3.0414130434782605, 1.7143269230769227, 0.0, 5.708152173913044, 6.857307692307691, 4.562119565217391, 3.8372332904884314, 1.6311505681818177, 0.0), # 0 (3.20942641205736, 6.597159934764309, 5.786939187017996, 3.0583509057971012, 1.7271759615384612, 0.0, 5.706206567028985, 6.908703846153845, 4.587526358695652, 3.857959458011997, 1.6492899836910773, 0.0), # 1 (3.238930172666081, 6.668641346801345, 5.817290488431875, 3.074915942028985, 1.7397538461538458, 0.0, 5.704201449275362, 6.959015384615383, 4.612373913043478, 3.8781936589545833, 1.6671603367003363, 0.0), # 2 (3.268068107989464, 6.738969375, 5.846881667737788, 3.091094021739129, 1.7520490384615384, 0.0, 5.702137092391305, 7.0081961538461535, 4.636641032608694, 3.897921111825192, 1.68474234375, 0.0), # 3 (3.296815174129353, 6.808066885521885, 5.875690552699228, 3.106871014492753, 1.76405, 0.0, 5.700013768115941, 7.0562, 4.66030652173913, 3.9171270351328187, 1.7020167213804713, 0.0), # 4 (3.3251463271875914, 6.87585674452862, 5.903694971079691, 3.122232789855072, 1.775745192307692, 0.0, 5.697831748188405, 7.102980769230768, 4.6833491847826085, 3.9357966473864603, 1.718964186132155, 0.0), # 5 (3.353036523266023, 6.942261818181818, 5.930872750642674, 3.137165217391304, 1.7871230769230766, 0.0, 5.695591304347826, 7.148492307692306, 4.705747826086957, 3.953915167095116, 1.7355654545454544, 0.0), # 6 (3.380460718466491, 7.007204972643096, 5.95720171915167, 3.1516541666666664, 1.7981721153846155, 0.0, 5.693292708333334, 7.192688461538462, 4.727481249999999, 3.97146781276778, 1.751801243160774, 0.0), # 7 (3.40739386889084, 7.0706090740740715, 5.982659704370181, 3.165685507246376, 1.8088807692307691, 0.0, 5.6909362318840575, 7.2355230769230765, 4.7485282608695645, 3.9884398029134536, 1.7676522685185179, 0.0), # 8 (3.4338109306409126, 7.132396988636362, 6.007224534061696, 3.179245108695652, 1.8192374999999996, 0.0, 5.68852214673913, 7.2769499999999985, 4.768867663043478, 4.004816356041131, 1.7830992471590905, 0.0), # 9 (3.459686859818554, 7.1924915824915825, 6.030874035989717, 3.19231884057971, 1.829230769230769, 0.0, 5.68605072463768, 7.316923076923076, 4.7884782608695655, 4.020582690659811, 1.7981228956228956, 0.0), # 10 (3.4849966125256073, 7.250815721801346, 6.053586037917737, 3.204892572463768, 1.8388490384615384, 0.0, 5.683522237318841, 7.355396153846153, 4.807338858695652, 4.0357240252784905, 1.8127039304503365, 0.0), # 11 (3.509715144863916, 7.30729227272727, 6.0753383676092545, 3.2169521739130427, 1.8480807692307688, 0.0, 5.680936956521738, 7.392323076923075, 4.825428260869565, 4.050225578406169, 1.8268230681818176, 0.0), # 12 (3.5338174129353224, 7.361844101430976, 6.096108852827762, 3.228483514492753, 1.8569144230769232, 0.0, 5.678295153985506, 7.427657692307693, 4.84272527173913, 4.0640725685518415, 1.840461025357744, 0.0), # 13 (3.5572783728416737, 7.414394074074074, 6.115875321336759, 3.2394724637681147, 1.8653384615384612, 0.0, 5.6755971014492745, 7.461353846153845, 4.859208695652172, 4.077250214224506, 1.8535985185185184, 0.0), # 14 (3.5800729806848106, 7.46486505681818, 6.134615600899742, 3.249904891304347, 1.873341346153846, 0.0, 5.672843070652174, 7.493365384615384, 4.874857336956521, 4.089743733933161, 1.866216264204545, 0.0), # 15 (3.6021761925665783, 7.513179915824915, 6.152307519280206, 3.259766666666666, 1.8809115384615382, 0.0, 5.6700333333333335, 7.523646153846153, 4.889649999999999, 4.101538346186803, 1.8782949789562287, 0.0), # 16 (3.6235629645888205, 7.55926151725589, 6.168928904241645, 3.26904365942029, 1.8880374999999998, 0.0, 5.667168161231884, 7.552149999999999, 4.903565489130435, 4.11261926949443, 1.8898153793139725, 0.0), # 17 (3.64420825285338, 7.603032727272725, 6.184457583547558, 3.2777217391304343, 1.8947076923076926, 0.0, 5.664247826086956, 7.578830769230771, 4.916582608695652, 4.122971722365039, 1.9007581818181813, 0.0), # 18 (3.664087013462101, 7.644416412037035, 6.198871384961439, 3.285786775362318, 1.9009105769230765, 0.0, 5.661272599637681, 7.603642307692306, 4.928680163043477, 4.132580923307626, 1.9111041030092588, 0.0), # 19 (3.683174202516827, 7.683335437710435, 6.2121481362467845, 3.2932246376811594, 1.9066346153846152, 0.0, 5.658242753623187, 7.626538461538461, 4.93983695652174, 4.14143209083119, 1.9208338594276086, 0.0), # 20 (3.7014447761194034, 7.719712670454542, 6.224265665167096, 3.3000211956521737, 1.911868269230769, 0.0, 5.655158559782609, 7.647473076923076, 4.950031793478261, 4.14951044344473, 1.9299281676136355, 0.0), # 21 (3.7188736903716704, 7.753470976430976, 6.23520179948586, 3.3061623188405793, 1.9165999999999994, 0.0, 5.652020289855073, 7.666399999999998, 4.959243478260869, 4.15680119965724, 1.938367744107744, 0.0), # 22 (3.7354359013754754, 7.784533221801346, 6.244934366966581, 3.311633876811594, 1.920818269230769, 0.0, 5.6488282155797105, 7.683273076923076, 4.967450815217392, 4.163289577977721, 1.9461333054503365, 0.0), # 23 (3.75110636523266, 7.812822272727271, 6.25344119537275, 3.3164217391304347, 1.9245115384615379, 0.0, 5.645582608695652, 7.6980461538461515, 4.974632608695652, 4.168960796915166, 1.9532055681818177, 0.0), # 24 (3.7658600380450684, 7.838260995370368, 6.260700112467866, 3.320511775362319, 1.9276682692307685, 0.0, 5.642283740942029, 7.710673076923074, 4.980767663043479, 4.173800074978577, 1.959565248842592, 0.0), # 25 (3.779671875914545, 7.860772255892254, 6.266688946015424, 3.3238898550724634, 1.9302769230769228, 0.0, 5.63893188405797, 7.721107692307691, 4.985834782608695, 4.177792630676949, 1.9651930639730635, 0.0), # 26 (3.792516834942932, 7.8802789204545425, 6.2713855237789184, 3.326541847826087, 1.9323259615384616, 0.0, 5.635527309782609, 7.729303846153846, 4.98981277173913, 4.180923682519278, 1.9700697301136356, 0.0), # 27 (3.804369871232075, 7.8967038552188535, 6.2747676735218505, 3.328453623188405, 1.9338038461538458, 0.0, 5.632070289855072, 7.735215384615383, 4.992680434782608, 4.183178449014567, 1.9741759638047134, 0.0), # 28 (3.815205940883816, 7.9099699263468, 6.276813223007711, 3.3296110507246373, 1.9346990384615383, 0.0, 5.628561096014493, 7.738796153846153, 4.994416576086956, 4.184542148671807, 1.9774924815867, 0.0), # 29 (3.8249999999999997, 7.92, 6.2775, 3.3299999999999996, 1.9349999999999996, 0.0, 5.625, 7.739999999999998, 4.994999999999999, 4.185, 1.98, 0.0), # 30 (3.834164434143222, 7.92833164772727, 6.276985163043477, 3.3299297549019604, 1.9348904787234043, 0.0, 5.620051511744128, 7.739561914893617, 4.994894632352941, 4.184656775362318, 1.9820829119318175, 0.0), # 31 (3.843131010230179, 7.936553181818182, 6.275455217391303, 3.329720392156862, 1.9345642553191487, 0.0, 5.612429710144928, 7.738257021276595, 4.994580588235293, 4.1836368115942015, 1.9841382954545455, 0.0), # 32 (3.8519037563938614, 7.944663579545454, 6.272932010869566, 3.329373970588235, 1.9340248404255314, 0.0, 5.6022092203898035, 7.736099361702125, 4.994060955882353, 4.181954673913044, 1.9861658948863634, 0.0), # 33 (3.860486700767263, 7.952661818181817, 6.269437391304347, 3.3288925490196077, 1.9332757446808508, 0.0, 5.589464667666167, 7.733102978723403, 4.993338823529411, 4.179624927536231, 1.9881654545454543, 0.0), # 34 (3.8688838714833755, 7.960546874999998, 6.264993206521739, 3.328278186274509, 1.9323204787234043, 0.0, 5.574270677161419, 7.729281914893617, 4.9924172794117645, 4.176662137681159, 1.9901367187499994, 0.0), # 35 (3.8770992966751923, 7.968317727272727, 6.259621304347825, 3.3275329411764707, 1.9311625531914893, 0.0, 5.556701874062968, 7.724650212765957, 4.9912994117647065, 4.173080869565217, 1.9920794318181818, 0.0), # 36 (3.885137004475703, 7.975973352272726, 6.253343532608695, 3.3266588725490194, 1.9298054787234038, 0.0, 5.536832883558221, 7.719221914893615, 4.989988308823529, 4.168895688405796, 1.9939933380681816, 0.0), # 37 (3.893001023017902, 7.983512727272726, 6.246181739130434, 3.325658039215685, 1.9282527659574464, 0.0, 5.514738330834581, 7.713011063829786, 4.988487058823528, 4.164121159420289, 1.9958781818181814, 0.0), # 38 (3.900695380434782, 7.990934829545453, 6.238157771739129, 3.3245324999999997, 1.9265079255319146, 0.0, 5.490492841079459, 7.7060317021276585, 4.98679875, 4.1587718478260856, 1.9977337073863632, 0.0), # 39 (3.908224104859335, 7.998238636363636, 6.229293478260869, 3.32328431372549, 1.924574468085106, 0.0, 5.464171039480259, 7.698297872340424, 4.984926470588236, 4.1528623188405795, 1.999559659090909, 0.0), # 40 (3.915591224424552, 8.005423124999998, 6.219610706521739, 3.321915539215686, 1.9224559042553186, 0.0, 5.435847551224389, 7.689823617021275, 4.982873308823529, 4.146407137681159, 2.0013557812499996, 0.0), # 41 (3.9228007672634266, 8.012487272727274, 6.209131304347826, 3.320428235294117, 1.920155744680851, 0.0, 5.40559700149925, 7.680622978723404, 4.980642352941175, 4.1394208695652175, 2.0031218181818184, 0.0), # 42 (3.929856761508952, 8.01943005681818, 6.1978771195652165, 3.3188244607843136, 1.9176774999999997, 0.0, 5.373494015492254, 7.670709999999999, 4.978236691176471, 4.131918079710144, 2.004857514204545, 0.0), # 43 (3.936763235294117, 8.026250454545455, 6.18587, 3.317106274509803, 1.9150246808510636, 0.0, 5.339613218390804, 7.660098723404254, 4.975659411764705, 4.123913333333333, 2.0065626136363637, 0.0), # 44 (3.9435242167519178, 8.032947443181817, 6.1731317934782615, 3.315275735294117, 1.91220079787234, 0.0, 5.304029235382309, 7.64880319148936, 4.972913602941175, 4.115421195652174, 2.008236860795454, 0.0), # 45 (3.9501437340153456, 8.03952, 6.159684347826087, 3.313334901960784, 1.9092093617021275, 0.0, 5.266816691654173, 7.63683744680851, 4.970002352941176, 4.106456231884058, 2.00988, 0.0), # 46 (3.956625815217391, 8.045967102272726, 6.1455495108695635, 3.3112858333333324, 1.9060538829787232, 0.0, 5.228050212393803, 7.624215531914893, 4.966928749999999, 4.097033007246376, 2.0114917755681816, 0.0), # 47 (3.962974488491049, 8.052287727272727, 6.130749130434782, 3.309130588235293, 1.9027378723404254, 0.0, 5.187804422788607, 7.610951489361701, 4.96369588235294, 4.087166086956521, 2.013071931818182, 0.0), # 48 (3.9691937819693086, 8.058480852272725, 6.115305054347826, 3.306871225490196, 1.899264840425532, 0.0, 5.146153948025987, 7.597059361702128, 4.960306838235294, 4.076870036231884, 2.014620213068181, 0.0), # 49 (3.9752877237851663, 8.064545454545453, 6.099239130434782, 3.3045098039215683, 1.8956382978723403, 0.0, 5.103173413293353, 7.582553191489361, 4.956764705882353, 4.066159420289854, 2.016136363636363, 0.0), # 50 (3.9812603420716113, 8.070480511363634, 6.082573206521739, 3.302048382352941, 1.8918617553191486, 0.0, 5.0589374437781105, 7.567447021276594, 4.953072573529411, 4.055048804347826, 2.0176201278409085, 0.0), # 51 (3.987115664961637, 8.076284999999999, 6.065329130434782, 3.299489019607843, 1.8879387234042553, 0.0, 5.013520664667666, 7.551754893617021, 4.949233529411765, 4.043552753623188, 2.0190712499999997, 0.0), # 52 (3.992857720588235, 8.081957897727271, 6.047528749999999, 3.2968337745098037, 1.8838727127659571, 0.0, 4.966997701149425, 7.5354908510638285, 4.945250661764706, 4.0316858333333325, 2.020489474431818, 0.0), # 53 (3.9984905370843995, 8.08749818181818, 6.0291939130434775, 3.294084705882353, 1.8796672340425529, 0.0, 4.919443178410794, 7.5186689361702115, 4.941127058823529, 4.019462608695651, 2.021874545454545, 0.0), # 54 (4.00401814258312, 8.092904829545454, 6.010346467391303, 3.2912438725490194, 1.8753257978723403, 0.0, 4.87093172163918, 7.501303191489361, 4.936865808823529, 4.006897644927535, 2.0232262073863634, 0.0), # 55 (4.0094445652173905, 8.098176818181816, 5.991008260869564, 3.288313333333333, 1.8708519148936167, 0.0, 4.821537956021989, 7.483407659574467, 4.9324699999999995, 3.994005507246376, 2.024544204545454, 0.0), # 56 (4.014773833120205, 8.103313125, 5.971201141304347, 3.285295147058823, 1.8662490957446805, 0.0, 4.771336506746626, 7.464996382978722, 4.927942720588234, 3.980800760869564, 2.02582828125, 0.0), # 57 (4.0200099744245525, 8.108312727272725, 5.950946956521738, 3.2821913725490197, 1.8615208510638295, 0.0, 4.7204019990005, 7.446083404255318, 4.923287058823529, 3.9672979710144918, 2.0270781818181813, 0.0), # 58 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59 ) passenger_allighting_rate = ( (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58 (0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59 ) """ parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html """ #initial entropy entropy = 258194110137029475889902652135037600173 #index for seed sequence child child_seed_index = ( 1, # 0 44, # 1 )
triggers = { 'lumos': 'automation.potter_pi_spell_lumos', 'nox': 'automation.potter_pi_spell_nox', 'revelio': 'automation.potter_pi_spell_revelio' }
fh= open("romeo.txt") lst= list() for line in fh: wds= line.split() for word in wds: if word in wds: lst.append(word) lst.sort() print(lst)
# coding: utf8 { '%(give2la)s collects Personally Identifiable information (PII) that includes Name, Address, Email address and Telephone number. The City will make every reasonable effort to protect your privacy. It restricts access to your personal identifiable information to those employees that will respond to your request. The City does not intentionally disclose any personal information about our users to any third parties inside or outside the City except as required by law.': '%(give2la)s 收集的個人識別資訊 (PII) 包括姓名、地址、電子郵件地址和電話號碼。本市會採取所有合理的措施保護您的隱私,只有需要回應您要求的員工才能存取您的個人識別資訊。除非法律規定,本市不會蓄意透露使用者的任何個人資訊給本市內部或外部的第三方。', '%(give2la)s is the official website for the City of Los Angeles that provides information on volunteer and donation opportunities to support emergency preparedness, response, and recovery. Tax deductible contributions for Cash and Corporate in-kind items can be made through one or more of the non-profit organizations listed.': '%(give2la)s 是 Los Angeles 市的官方網站,提供有關志工和捐助機會的資訊,支持急難準備、應變和復原。可抵稅的現金捐款和企業實物捐贈,可捐給所列的一家或多家非營利組織。', '%(system_name)s - Verify Email': '%(system_name)s - 確認電子郵件', '%(system_name)s access granted': '%(system_name)s access granted', '%I:%M %p': '%I:%M %p', '%I:%M:%S %p': '%I:%M:%S %p', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S', '%m-%d-%Y': '%m-%d-%Y', '%m-%d-%Y %H:%M': '%m-%d-%Y %H:%M', '%m-%d-%Y %I:%M %p': '%m-%d-%Y %I:%M %p', '%m-%d-%Y %I:%M:%S %p': '%m-%d-%Y %I:%M:%S %p', "'APPLY'": '「申請」', "'CLICK HERE TO REGISTER'": '「點選此處註冊」', "'I ACCEPT, CREATE MY ACCOUNT'": '「我接受,請建立我的帳戶」', "'My Assignments'": '「我的任務分派」', "'My Profile'": '「我的基本資料」', "'Print Volunteer Assignment Form'": '「列印志工任務分派表」', "'Sign-In'": '「登入」', '(filtered from _MAX_ total entries)': '(自全部 _MAX_ 項中篩選)', '* Required Fields': '* 必填欄位', '300 character limit.': '300 個字元限制。', '800 character limit.': '800 character limit.', 'A Marker assigned to an individual Location is set if there is a need to override the Marker assigned to the Feature Class.': '如果需要覆蓋指定到功能類的標記,就會設定指定到個別地點的標記。', 'A brief description of the group (optional)': '團體的簡要描述 (非必填)', 'A file in GPX format taken from a GPS.': '從 GPS 取得的 GPX 格式檔案。', 'A more comprehensive privacy policy for the city of Los Angeles can be found at': '更完整的 Los Angeles 市隱私權政策可於此網址查詢', 'A new Volunteer Opportunity has become available at GIVE2LA web site. Please log-in to view and indicated your availability. Thank you.': 'GIVE2LA 網站現在提供一個新的志工機會。請登入查看,並表示您是否能夠參與。謝謝您。', 'A task is a piece of work that an individual or team can do in 1-2 days': '任務是指個人或團隊可以在 1-2 天內完成的工作。', 'APPLY': '「申請」', 'Abbreviation': '縮寫', 'Accept Push': '接受主動傳送', 'Accept Pushes': '接受主動傳送', 'Accepted by': '接受人', 'Accounting': '會計', 'Acronym': '縮寫', "Acronym of the organization's name, eg. IFRC.": '組織的名稱縮寫,例如 IFRC。', 'Activity': '活動', 'Activity Details': '活動詳情', 'Add Address': 'Add Address', 'Add Alternative Item': 'Add Alternative Item', 'Add Application': 'Add Application', 'Add Assignment': 'Add Assignment', 'Add Brand': 'Add Brand', 'Add Catalog': 'Add Catalog', 'Add Catalog Item': 'Add Catalog Item', 'Add Certificate': '新增證明', 'Add Certification': 'Add Certification', 'Add Competency Rating': '新增能力評級', 'Add Contact Information': 'Add Contact Information', 'Add Course': 'Add Course', 'Add Course Certicate': 'Add Course Certicate', 'Add Credential': 'Add Credential', 'Add Donor': '新增捐贈者', 'Add Emergency Contact': '新增緊急聯絡人', 'Add Facility': '新增機構', 'Add Group': 'Add Group', 'Add Human Resource': 'Add Human Resource', 'Add Identity': 'Add Identity', 'Add Image': 'Add Image', 'Add Incident': 'Add Incident', 'Add Item': 'Add Item', 'Add Item Category': 'Add Item Category', 'Add Item Unit': 'Add Item Unit', 'Add Item to Catalog': 'Add Item to Catalog', 'Add Item to Commitment': 'Add Item to Commitment', 'Add Item to Request': 'Add Item to Request', 'Add Job Role': '新增工作角色', 'Add Location': 'Add Location', 'Add Map Configuration': 'Add Map Configuration', 'Add Mission': 'Add Mission', 'Add New Address': 'Add New Address', 'Add New Alternative Item': 'Add New Alternative Item', 'Add New Brand': 'Add New Brand', 'Add New Catalog': 'Add New Catalog', 'Add New Commitment Item': 'Add New Commitment Item', 'Add New Event': 'Add New Event', 'Add New Facility': 'Add New Facility', 'Add New Group': 'Add New Group', 'Add New Human Resource': 'Add New Human Resource', 'Add New Identity': 'Add New Identity', 'Add New Image': 'Add New Image', 'Add New Incident': 'Add New Incident', 'Add New Item': 'Add New Item', 'Add New Item Category': 'Add New Item Category', 'Add New Item Pack': 'Add New Item Pack', 'Add New Location': 'Add New Location', 'Add New Map Configuration': 'Add New Map Configuration', 'Add New Organization': 'Add New Organization', 'Add New Person to Commitment': 'Add New Person to Commitment', 'Add New Record': 'Add New Record', 'Add New Request Item': 'Add New Request Item', 'Add New Request for Volunteers': 'Add New Request for Volunteers', 'Add New Room': 'Add New Room', 'Add New Sector': 'Add New Sector', 'Add New Setting': 'Add New Setting', 'Add New Subsector': 'Add New Subsector', 'Add Organization': '新增組織', 'Add Person': 'Add Person', 'Add Person to Commitment': 'Add Person to Commitment', 'Add Project': '新增專案', 'Add Record': 'Add Record', 'Add Request Fulfilment Details': 'Add Request Fulfilment Details', 'Add Room': '新增房間', 'Add Roster Email Address': 'Add Roster Email Address', 'Add Sector': 'Add Sector', 'Add Setting': 'Add Setting', 'Add Skill': 'Add Skill', 'Add Skill Equivalence': 'Add Skill Equivalence', 'Add Skill Type': '新增技能類型', 'Add Skills': '新增技能', 'Add Skills Required': 'Add Skills Required', 'Add Subsector': 'Add Subsector', 'Add Task': '新增任務', 'Add Training': 'Add Training', 'Add Volunteers to Request': 'Add Volunteers to Request', 'Add a Person': 'Add a Person', 'Add a new certificate to the catalog.': '新增證明到目錄中。 ', 'Add a new competency rating to the catalog.': '新增能力等級到目錄中。 ', 'Add a new job role to the catalog.': '新增工作角色到目錄中。 ', 'Add a new skill type to the catalog.': '新增技能類型到目錄中。 ', 'Add all': '新增全部', 'Add new project.': '新增專案。', 'Add...': 'Add...', 'Additional Documents': 'Additional Documents', 'Additional Information': '其他資訊', 'Additional Skills & Information': '其他技能和資訊', 'Additional comments about this voucher distribution.': '有關本抵用券分配的其他註釋。', 'Additional comments concerning this donation drive.': '有關此捐助活動的其他註釋。', 'Additional comments on the performance of the volunteer on this assignment.': '關於此任務分派的志工表現的其他註釋。', 'Additional comments on this assignment.': '本任務分派的其他意見。', 'Additional information like %(notifications)s and other volunteer agency affiliations also can be updated in this page.': '其他資訊也能在此頁更新,例如 %(notifications)s 和其他志工機構關係。', 'Address 1': '地址 1', 'Address 2': '地址 2', 'Address Details': 'Address Details', 'Address Type': '地址類型', 'Address added': 'Address added', 'Address deleted': 'Address deleted', 'Address is required': '地址為必填', 'Address updated': 'Address updated', 'Addresses': 'Addresses', 'Administration': 'Administration', 'Administrative Assistant': '行政助理', 'Advanced Search': 'Advanced Search', 'Affiliation with other volunteer organizations': '與其他志工組織的關係', 'After you are signed-in, please follow these steps to edit your profile: ': '登入後,請遵循以下步驟編輯基本資料: ', 'Age group': '年齡組別 ', 'All': '全部', 'Already registered?': '已經註冊了?', 'Alternative Item Details': 'Alternative Item Details', 'Alternative Item added': 'Alternative Item added', 'Alternative Item deleted': 'Alternative Item deleted', 'Alternative Item updated': 'Alternative Item updated', 'Alternative Items': 'Alternative Items', 'American Red Cross': 'American Red Cross', 'Application Details': 'Application Details', 'Application cancelled': 'Application cancelled', 'Application created': 'Application created', 'Application updated': 'Application updated', 'Applications': 'Applications', 'Apply': '申請', 'Approved By': '核准人', 'Approver': '核准人', 'Are you affiliated with other volunteer organizations?': '您與其他志工組織有關係嗎?', 'Are you sure you want to delete this record?': '您確定要刪除此紀錄嗎?', 'Art & Design': '藝術和設計 ', 'As a Disaster Service Worker (DSW) volunteer, I agree to comply with all %(dsw_program_regulations)s including being registered by an accredited disaster council or its authorized designee, subscribing to the loyalty oath, and performing eligible disaster service duties.': '身為 Disaster Service Worker (DSW) 的志工,我同意遵守全部 %(dsw_program_regulations)s,包括由政府立案的災害委員會或其授權指定人註冊、宣誓效忠,以及執行合格災害服務的職責。', 'As a volunteer working to assist disaster survivors and in disaster recovery efforts, you will be required to fill out and sign the %(give2la_forms)s.': '做為協助災害倖存者和協助災害復原工作的志工,您必須填寫並簽署 %(give2la_forms)s 。', 'As a volunteer working to assist disaster survivors and in disaster recovery efforts, you will be required to fill out and sign the %(give2la_forms)s. Please print these forms and bring them to the Volunteering Location. The forms are in English only.': '做為協助災害倖存者和協助災害復原工作的志工,您必須填寫並簽署 %(give2la_forms)s 表格。請印出這些表格,然後帶至志工服務地點。表格僅有英文版。', 'Assigned To': '分派對象', 'Assignment': '任務分派', 'Assignment Details': 'Assignment Details', 'Assignment created': 'Assignment created', 'Assignment deleted': 'Assignment deleted', 'Assignment updated': 'Assignment updated', 'Assignments': '任務分派', 'Attribution': '屬性', 'Available Records': 'Available Records', 'Available in Viewer?': '在檢視器中可用?', 'Average': '平均', 'BOC Status': 'BOC 狀態', 'Background Color': '背景顏色', 'Base Layer?': '底層?', 'Base Location': '基地位置', 'Base URL of the remote Sahana-Eden site': '遠端 Sahana-Eden 網站的基底網址', 'Benefits Administration': '福利管理', 'Body': '團體', 'Braille': '盲人點字', 'Brand': '品牌', 'Brand Details': 'Brand Details', 'Brand added': 'Brand added', 'Brand deleted': 'Brand deleted', 'Brand updated': 'Brand updated', 'Brands': 'Brands', 'Buffer': '緩衝', 'Building Architect': '建築設計師', 'Building Name': '建築物名稱', 'Bus Driving': '巴士駕駛', 'By Inventory': '按倉儲分類', "By clicking on 'I accept' below you are agreeing to the %(privacy_policy)s.": '點選以下「我接受」 即表示您同意 %(privacy_policy)s。', 'CANCEL ASSIGNMENT': '取消任務分派', 'CERT': 'CERT', 'CLICK HERE TO REGISTER': '「點選此處註冊」', 'CLICK HERE TO REGISTER.': '點選此處註冊。', 'CLICK HERE TO VIEW DONATION OPPORTUNITIES.': '點選此處查看捐助機會。', 'CLICK HERE TO VIEW REQUEST FOR VOLUNTEERS.': '點選此處查看志工需求。', 'COMMIT': '承諾', 'Can I bring a friend to volunteer?': '我可以帶朋友一起做志工嗎?', 'Can I donate cash to support the City of Los Angeles?': '我可以捐贈現金支持 Los Angeles 市嗎?', 'Can I provide feedback or evaluation for an assignment after volunteering?': '我可以在擔任志工後針對分派的工作提供意見或進行評估嗎?', 'Cancel': '取消', 'Cannot be empty': '不可空白', 'Cashier': '出納', 'Catalog': '目錄', 'Catalog Details': 'Catalog Details', 'Catalog Item added': 'Catalog Item added', 'Catalog Item deleted': 'Catalog Item deleted', 'Catalog Item updated': 'Catalog Item updated', 'Catalog Items': 'Catalog Items', 'Catalog added': 'Catalog added', 'Catalog deleted': 'Catalog deleted', 'Catalog updated': 'Catalog updated', 'Catalogs': 'Catalogs', 'Category': '類別', 'Cell Phone': '手機號碼', 'Cell Phone Number': 'Cell Phone Number', 'Certificate': '證明', 'Certificate Catalog': 'Certificate Catalog', 'Certificate Details': 'Certificate Details', 'Certificate Status': '認證狀態', 'Certificate added': 'Certificate added', 'Certificate deleted': 'Certificate deleted', 'Certificate updated': 'Certificate updated', 'Certificates': 'Certificates', 'Certification Details': 'Certification Details', 'Certification added': 'Certification added', 'Certification deleted': 'Certification deleted', 'Certification updated': 'Certification updated', 'Certifications': 'Certifications', 'Certifying Organization': '認證組織', 'Change Password': 'Change Password', 'Check all that apply': '勾選所有適用項目', 'Check here to agree to these conditions:': '勾選此處表示同意這些條件:', 'Check to delete:': '勾選以刪除: ', 'Check-In NOW': '立即報到', 'Check-Out NOW': '立即離開', 'Check-in': '報到', 'Check-out': '離開', 'Chinese': '中文', 'Chinese (Simplified)': '中文 (簡體)', 'Chinese (Traditional)': '中文 (繁體)', 'City': '城市 ', 'City of Los Angeles Emergency Management Department': 'Los Angeles 市急難管理局', 'City of Los Angeles Emergency Management Department Website': 'Los Angeles 市急難管理局網站', 'City of Los Angeles Website': 'Los Angeles 市網站', 'Civil Engineer / Field Engineer': '土木工程師 / 實地工程師', 'Click here to register your Volunteer Organization or Group.': '點選此處註冊您的志工組織或團體。', "Click on the 'Details' button of the Volunteer Task you have completed.": '點選您已完成的志工任務的「詳情」按鈕。', 'Click on the link %(base_url)s/default/user/reset_password/%(key)s to reset your password.': '點選連結 %(base_url)s/default/user/reset_password/%(key)s 即可重設密碼。', 'Click on the link %(base_url)s/default/user/verify_email/%(key)s to verify your email.': '點選連結 %(base_url)s/default/user/verify_email/%(key)s 即可確認電子郵件。', 'Click on the link http://127.0.0.1:8000/eden/default/user/reset_password/%(key)s to reset your password.': '點選連結 http://127.0.0.1:8000/eden/default/user/reset_password/%(key)s 即可重設密碼。', 'Click the %s sign next to the skill(s) that best describes how you can support the City.': '點選位於技能旁邊,最能描述您能如何支持本市的 %s 記號。', 'Client IP': '客戶端 IP', 'Climb stairs': '爬樓梯', 'Close': 'Close', 'Close map': '關閉地圖', 'Closed': '已關閉', 'Cluster Distance': '叢集距離', 'Cluster Threshold': '叢集閾值', 'Code': '代碼', 'Collected By Organization': '由組織收集', 'Collection At': '收集地點', 'Comments': '註釋', 'Commit': '承諾', 'Commit. Status': '承諾狀態', 'Commitment': '承諾', 'Commitment Item Details': 'Commitment Item Details', 'Commitment Item added': 'Commitment Item added', 'Commitment Item deleted': 'Commitment Item deleted', 'Commitment Item updated': 'Commitment Item updated', 'Commitment Items': 'Commitment Items', 'Committed People': 'Committed People', 'Committed Person Details': 'Committed Person Details', 'Committed Person updated': 'Committed Person updated', 'Competency': '能力', 'Competency Rating Catalog': 'Competency Rating Catalog', 'Competency Rating Details': 'Competency Rating Details', 'Competency Rating added': 'Competency Rating added', 'Competency Rating deleted': 'Competency Rating deleted', 'Competency Rating updated': 'Competency Rating updated', 'Competency Ratings': 'Competency Ratings', 'Completed Request for Donations Form': 'Completed Request for Donations Form', 'Computer repair': '電腦維修 ', 'Confirming Organization': '確認組織', 'Conflict Policy': '衝突政策', 'Conflict policy': '衝突政策', 'Construction': '建造', 'Contact': '聯絡我們', 'Contact Details': 'Contact Details', 'Contact Email': '聯絡電子郵件', 'Contact Information': 'Contact Information', 'Contact Information Added': 'Contact Information Added', 'Contact Information Deleted': 'Contact Information Deleted', 'Contact Information Updated': 'Contact Information Updated', 'Contact Method': '聯絡方法', 'Contact Name': '聯絡人姓名', 'Contact Person': '聯絡人', 'Contact us': '聯絡我們', 'Cooking': '烹飪', 'Corporation': '公司', 'Corporation/Organization': 'Corporation/Organization', 'Corporations & Organizations': '企業和組織', 'Corporations and Organizations': '企業和組織', 'Corporations and Organizations can donate to support the City of Los Angeles, and also receive Situation Awareness Reports.': '企業和組織均可捐助,加入支持 Los Angeles 市的行列,也能收到情況瞭解報告 (Situation Awareness Reports)。', 'Country': '國家', 'County': '郡', 'Course': '航向', 'Course Catalog': 'Course Catalog', 'Course Certicate Details': 'Course Certicate Details', 'Course Certicate added': 'Course Certicate added', 'Course Certicate deleted': 'Course Certicate deleted', 'Course Certicate updated': 'Course Certicate updated', 'Course Certicates': 'Course Certicates', 'Course Details': 'Course Details', 'Course added': 'Course added', 'Course deleted': 'Course deleted', 'Course updated': 'Course updated', 'Courses': 'Courses', 'Crafts / Sewing': '手工藝 / 縫紉', 'Create Group Entry': '建立團體項目', 'Create a group entry in the registry.': '在登錄檔中建立團體項目。', 'Credential Details': 'Credential Details', 'Credential added': 'Credential added', 'Credential deleted': 'Credential deleted', 'Credential updated': 'Credential updated', 'Credentialling Organization': '資格認證組織', 'Credentials': 'Credentials', 'Currency': '貨幣', 'Current Assignments': '目前任務分派', 'Current Identities': 'Current Identities', 'Current Location': '目前位置 ', 'Currently no Certifications registered': 'Currently no Certifications registered', 'Currently no Course Certicates registered': 'Currently no Course Certicates registered', 'Currently no Credentials registered': 'Currently no Credentials registered', 'Currently no Missions registered': 'Currently no Missions registered', 'Currently no Roster Email Addresses defined': 'Currently no Roster Email Addresses defined', 'Currently no Skill Equivalences registered': 'Currently no Skill Equivalences registered', 'Currently no Skills registered': 'Currently no Skills registered', 'Currently no Trainings registered': 'Currently no Trainings registered', 'Currently no applications defined': 'Currently no applications defined', 'Currently no assignments defined': '目前無已定義的任務分派', 'Currently no emergency contact defined': 'Currently no emergency contact defined', 'Currently no entries in the catalog': 'Currently no entries in the catalog', 'Currently no skills defined': 'Currently no skills defined', 'Currently there are no Requests for Volunteers to apply for. Please register to receive updates of new Requests for Volunteers.': '目前無志工需求供申請。請註冊以取得志工需求的最新動態。', 'DECLINE': '拒絕', 'DONATE': '捐贈', 'DONATE CASH': '捐贈現金', 'DONATE ITEMS': '捐贈物品', 'DSW Program regulations': 'DSW 方案規定', 'Data': '資料', 'Data Entry': '資料輸入', 'Database': 'Database', 'Date + Time': '日期 + 時間 ', 'Date Expected': '預計日期', 'Date Generated: %(date)s': '產生日期:%(date)s', 'Date Received': '收件日期 ', 'Date Requested': '需求日期', 'Date Required': '需求日期', 'Date Required Until': '需求截止日期', 'Date Sent': '發送日期', 'Date of Birth': '出生日期', 'Date+Time': '日期 + 時間', 'Date+Time Available': '可用的日期 + 時間', 'Date+Time Donor Identified': '捐贈者確認的日期 + 時間', 'Date+Time Returned': '返回日期 + 時間', 'Date/Time': '日期 / 時間 ', 'Debris Removal': '清除廢棄物', 'Defines the icon used for display of features on interactive map & KML exports.': '定義用於顯示互動地圖上的功能和 KML 匯出的圖示。', 'Delete': '刪除', 'Delete Alternative Item': 'Delete Alternative Item', 'Delete Application': 'Delete Application', 'Delete Assignment': '刪除任務分派', 'Delete Brand': 'Delete Brand', 'Delete Catalog': 'Delete Catalog', 'Delete Catalog Item': 'Delete Catalog Item', 'Delete Certificate': 'Delete Certificate', 'Delete Certification': 'Delete Certification', 'Delete Commitment Item': 'Delete Commitment Item', 'Delete Competency Rating': 'Delete Competency Rating', 'Delete Contact Information': 'Delete Contact Information', 'Delete Course': 'Delete Course', 'Delete Course Certicate': 'Delete Course Certicate', 'Delete Credential': 'Delete Credential', 'Delete Donation': 'Delete Donation', 'Delete Emergency Contact': 'Delete Emergency Contact', 'Delete Event': 'Delete Event', 'Delete Facility': 'Delete Facility', 'Delete Group': 'Delete Group', 'Delete Image': 'Delete Image', 'Delete Item': 'Delete Item', 'Delete Item Category': 'Delete Item Category', 'Delete Item Pack': 'Delete Item Pack', 'Delete Job Role': 'Delete Job Role', 'Delete Location': 'Delete Location', 'Delete Mission': 'Delete Mission', 'Delete Organization': 'Delete Organization', 'Delete Person': 'Delete Person', 'Delete Received Shipment': 'Delete Received Shipment', 'Delete Record': 'Delete Record', 'Delete Request Item': 'Delete Request Item', 'Delete Request for Volunteers': 'Delete Request for Volunteers', 'Delete Room': 'Delete Room', 'Delete Sector': 'Delete Sector', 'Delete Skill': 'Delete Skill', 'Delete Skill Equivalence': 'Delete Skill Equivalence', 'Delete Skill Type': 'Delete Skill Type', 'Delete Skills': 'Delete Skills', 'Delete Subsector': 'Delete Subsector', 'Delete Surplus Item': 'Delete Surplus Item', 'Delete Training': 'Delete Training', 'Delivery of Donation Received By': 'Delivery of Donation Received By', 'Department Fax': '管理局傳真', 'Department Telephone': '管理局電話', 'Deployment Location': '部署位置', 'Describe the procedure which this record relates to (e.g. "medical examination")': '說明與此紀錄相關的程序 (例如「醫療檢驗」)', 'Description': '說明', 'Destination': '目的地', 'Details': '詳情', 'Details field is required!': '詳情欄位必填!', 'Direction': '方向', 'Disaster Healthcare Volunteers': '災害健康照護志工', 'Disclaimer': '免責聲明', 'Display Routes?': '顯示路線?', 'Display Tracks?': '顯示航跡?', 'Display Waypoints?': '顯示航點?', 'Distributed At': '分發地點', 'Distributed By Organization': '由組織分發', 'Distribution Comments': '分配註釋', 'Do I have to be a U.S. citizen or legal U.S. resident to volunteer?': '我必須是美國公民或美國合法居民才能擔任志工嗎?', 'Do I have to live in the City of Los Angeles to volunteer?': '我必須住在 Los Angeles 市才能擔任志工嗎?', 'Do you really want to delete these records?': 'Do you really want to delete these records?', 'Documents': 'Documents', 'Domain': '網域', 'Donate': '捐贈', 'Donate Cash...': '捐贈現金...', 'Donate Page': '捐贈頁面', 'Donate to organizations that support the City of Los Angeles': '捐助支持 Los Angeles 市的組織', 'Donate to the City of Los Angeles': '捐贈給 Los Angeles 市', 'Donate. Volunteer. Serve.': '捐贈。志願。服務。', 'Donated By Corporation/Organisation': '公司 / 組織捐助', 'Donates Resources': 'Donates Resources', 'Donation Comments': '捐助註釋', 'Donation Commitment Status': 'Donation Commitment Status', 'Donation Commitment Status Added': 'Donation Commitment Status Added', 'Donation Commitment Status Canceled': 'Donation Commitment Status Canceled', 'Donation Commitment Status Details': 'Donation Commitment Status Details', 'Donation Commitment Status Updated': 'Donation Commitment Status Updated', 'Donation Documents': '捐助文件', 'Donation Item Specifications': '捐贈物品規格', 'Donation Phone #': '捐贈專線', 'Donation Resource Specifications': 'Donation Resource Specifications', 'Donations': 'Donations', 'Download the Give2LA Volunteer Registration Forms, complete the forms, and take them with you to your Volunteer Assignment.': '下載 Give2LA 志工註冊表、填妥表格,然後帶著表格到您志工任務分派的服務地點。', 'Driving': '駕駛', 'Dzongkha': '不丹語', 'E-mail': '電子郵件', 'EMD Comments': 'EMD 註釋', 'EMD Evaluation': 'EMD 評估', 'EOC Staff who accepts the donation and coordinates its delivery.': 'EOC Staff who accepts the donation and coordinates its delivery.', 'EOC Status': 'EOC 狀態', 'EVALUATION OF ASSIGNMENT': '任務分派評估', 'Edit Address': 'Edit Address', 'Edit Alternative Item': 'Edit Alternative Item', 'Edit Application': 'Edit Application', 'Edit Brand': 'Edit Brand', 'Edit Catalog': 'Edit Catalog', 'Edit Catalog Item': 'Edit Catalog Item', 'Edit Certificate': 'Edit Certificate', 'Edit Certification': 'Edit Certification', 'Edit Commitment Item': 'Edit Commitment Item', 'Edit Committed Person': 'Edit Committed Person', 'Edit Competency Rating': 'Edit Competency Rating', 'Edit Contact Information': 'Edit Contact Information', 'Edit Course': 'Edit Course', 'Edit Course Certicate': 'Edit Course Certicate', 'Edit Credential': 'Edit Credential', 'Edit Event': 'Edit Event', 'Edit Facility': 'Edit Facility', 'Edit Group': 'Edit Group', 'Edit Human Resource': 'Edit Human Resource', 'Edit Identity': 'Edit Identity', 'Edit Image Details': 'Edit Image Details', 'Edit Incident': 'Edit Incident', 'Edit Item': 'Edit Item', 'Edit Item Category': 'Edit Item Category', 'Edit Item Pack': 'Edit Item Pack', 'Edit Job Role': 'Edit Job Role', 'Edit Location': 'Edit Location', 'Edit Map Configuration': 'Edit Map Configuration', 'Edit Mission': 'Edit Mission', 'Edit Organization': 'Edit Organization', 'Edit Person Details': 'Edit Person Details', 'Edit Received Shipment': 'Edit Received Shipment', 'Edit Record': 'Edit Record', 'Edit Request Fulfilment Details': 'Edit Request Fulfilment Details', 'Edit Request Item': 'Edit Request Item', 'Edit Request for Volunteers': 'Edit Request for Volunteers', 'Edit Requested Volunteers': 'Edit Requested Volunteers', 'Edit Room': 'Edit Room', 'Edit Roster Email Address': 'Edit Roster Email Address', 'Edit Sector': 'Edit Sector', 'Edit Setting': 'Edit Setting', 'Edit Skill': 'Edit Skill', 'Edit Skill Equivalence': 'Edit Skill Equivalence', 'Edit Skill Type': 'Edit Skill Type', 'Edit Subsector': 'Edit Subsector', 'Edit Surplus Item': 'Edit Surplus Item', 'Edit Training': 'Edit Training', 'Electrician & Electrical Technician': '電工', 'Email': '電子郵件', 'Email Address': 'Email Address', 'Emergency Contact Details': 'Emergency Contact Details', 'Emergency Contact Name': '緊急聯絡人姓名', 'Emergency Contact Phone Number': '緊急聯絡電話號碼 ', 'Emergency Contact Relationship': '緊急聯絡人關係', 'Emergency Contact added': '緊急聯絡人已新增', 'Emergency Contact deleted': 'Emergency Contact deleted', 'Emergency Contact updated': '緊急聯絡人已更新', 'Emergency Contacts': '緊急聯絡人', 'End': '結束', 'End Date': '結束日期', 'End date': '結束日期', 'English': '英文', 'English – Written': '英文 - 書寫', 'Enter a valid date before': '輸入有效的日期,須早於', 'Enter a valid future date': '輸入有效的未來日期', 'Enter a valid past date': '輸入有效的過去日期', 'Enter some characters to bring up a list of possible matches': '輸入一些字元,列出可能相符的結果清單', 'Enter the Mandatory details and click on the button %(accept)s at the bottom of the screen to register': '輸入必填資料,再點選畫面底部的 %(accept)s 按鈕註冊', 'Enter the evaluation details; and click %(save)s': '輸入評估詳情,然後點選 %(save)s', 'Enter the same password as above': '輸入與上面相同的密碼', 'Enter your E-Mail and Password information.': '輸入您的電子郵件和密碼資訊。', 'Enter your firstname': '輸入您的名字', 'Enter your information into the Required Fields. After you have entered your information, click %(accept)s to register.': '在必填欄位輸入您的資訊。輸入資訊後,點選 %(accept)s 註冊。', 'Est. Delivery Date': '預計交付日期', 'Estimated Value ($) per Unit': '預估每單位價值 ($)', 'Evaluation of Assignment': '任務分派評估', 'Event': '活動', 'Event Details': 'Event Details', 'Event Planning': '活動規劃', 'Event added': 'Event added', 'Event deleted': 'Event deleted', 'Event updated': 'Event updated', 'Events': 'Events', 'Every day, men and women like you donate to the American Red Cross Los Angeles Region to help us change lives. Once the decision to make a gift is made, careful planning will ensure the most cost-effective result for the donor and the most beneficial result for those who are helped by the American Red Cross. The Red Cross provides relief for victims of house and apartment fires, earthquakes, floods, hazardous material spills, transportation accidents, explosions and other natural or man-made disasters --- 24 hours a day.': '每天和您一樣的許多人都會向 American Red Cross Los Angeles Region 提供捐贈,幫助我們改變人們的生活。一旦決定提供捐贈品,我們便會仔細規劃,確保為捐贈者帶來最符合成本效益的結果,為接受 American Red Cross 協助的人創造最有利的結果。每天 24 小時,Red Cross 為房屋和公寓火災、地震、水災、有害物質洩漏、交通事故、爆炸和其他天災或人為災害的受害者提供救援。', 'Every donation that you %(give2la)s counts. Your tax deductable contribution will be used to support our community disaster preparedness, response, and recovery needs. No donation is ever too small - Your generosity and kind consideration is greatly appreciated!': '您每一次的 %(give2la)s 捐贈都意義重大。您的捐助可以抵稅,款項將用來支持社區所需的災害準備、應變和復原工作。捐助永遠都不嫌少 - 非常感謝您慷慨解囊!', 'Excellent': '優', 'Exercise': '練習', 'Exercise?': '練習?', 'Exercises mean all screens have a watermark & all notifications have a prefix.': '練習是指所有畫面均有一個浮水印,所有通知也都有前綴。', 'Expiry Date': '到期日', 'Export in KML format': '以 KML 格式匯出 ', 'Export in PDF format': '以 PDF 格式匯出 ', 'Export in RSS format': '以 RSS 格式匯出 ', 'Export in XLS format': '以 XLS 格式匯出 ', 'FAQ': '常見問題', 'Facilities': 'Facilities', 'Facility': '機構', 'Facility Details': 'Facility Details', 'Facility Maintenance': '設施維護', 'Facility added': 'Facility added', 'Facility deleted': 'Facility deleted', 'Facility removed': 'Facility removed', 'Facility updated': 'Facility updated', 'Fax': '傳真', 'Feature Namespace': 'Namespace 功能', 'Feature Type': '功能類型', 'Feel like you want to help your fellow citizens in the aftermath of a terrible disaster? Some agencies and organizations rely on volunteers such as you in those situations. Following a disaster, first point of contact a survivor has is often a caring volunteer. Why not let that volunteer be you.': '您想要幫助遭逢巨大災害重創的同胞嗎?在這些情況下,有些機構和組織仰賴像您這樣的志工。災害之後,倖存者首先接觸到的人通常是充滿愛心的志工。何不加入志願工作的行列。', 'File name': '檔案名稱', 'Filter': '篩選條件', 'Filter Field': '篩選欄位', 'Filter Value': '篩選值', 'First': '第一項', 'First Name': '名字', 'First name': '名字', 'Focal Point': '聯絡點', 'Follow these steps, to register': '遵循這些步驟,進行註冊', 'Follow these steps, to register:': '遵循這些步驟,進行註冊:', 'Food Service': '餐飲服務', 'Format': '格式', "Format the list of attribute values & the RGB value to use for these as a JSON object, e.g.: {Red: '#FF0000', Green: '#00FF00', Yellow: '#FFFF00'}": "把要用的屬性值清單和 RGB 值格式化為 JSON 物件,例如:{Red:'#FF0000', Green:'#00FF00', Yellow:'#FFFF00'}", 'Frequently Asked Questions': '常見問題', 'From Inventory': '從詳細目錄', 'From Location': '從位置', 'From Organization': '從組織', 'From WebEOC.': '從 WebEOC。', 'Fulfil. Status': '完成。狀態', 'Funding Organization': '資金提供組織', 'Fundraising': '募款', 'GIS Analyst': 'GIS 分析師', 'GPS Marker': 'GPS 標記', 'GPS Track': 'GPS 航跡', 'GPS Track File': 'GPS 航跡檔案', 'GRN Status': 'GRN 狀態', 'Gardening / Landscaping': '園藝 / 景觀設計', 'Gender': '性別', 'Geometry Name': '幾何名稱', 'Get Adobe Reader': '下載 Adobe Reader', 'Give a brief description of the image, e.g. what can be seen where on the picture (optional).': '簡單描述影像,例如圖片包含哪些內容 (非必填)。', 'Give to Los Angeles Logo': 'Give to Los Angeles 標誌', 'Give2LA': 'Give2LA', 'Give2LA Policy': 'Give2LA 政策', 'Give2LA Registration Forms': 'Give2LA 註冊表', 'Good': '佳', 'Grade': '等級', 'Greater than 10 matches. Please refine search further': '10 筆以上的資料符合條件。請縮小搜尋範圍', 'Group': '團體', 'Group Description': '團體說明', 'Group Details': 'Group Details', 'Group ID': '團體 ID', 'Group Name': '團體名稱', 'Group Type': '團體類型', 'Group added': 'Group added', 'Group deleted': 'Group deleted', 'Group description': '團體說明', 'Group updated': 'Group updated', 'Groups': 'Groups', 'Has Volunteers': 'Has Volunteers', 'Has the Certificate for receipt of the shipment been given to the sender?': '收貨證明是否已給寄件人?', 'Has the GRN (Goods Received Note) been completed?': 'GRN (收貨單) 是否已填妥?', 'Height (m)': '高度 (公尺) ', 'Help': '說明', 'High': '高', 'Home': '首頁', 'Home Country': '母國', 'Home phone': '住家電話', 'Hour': '小時', 'Hours': '小時', 'How data shall be transferred': '資料傳輸方式', 'How do I apply for a Volunteer Request after I have registered with Give2LA?': '完成 Give2LA 註冊後,我該如何申請志工需求?', 'How do I register as a volunteer?': '我要如何註冊擔任志工?', 'How do I update my Profile, Skills and Emergency Details?': '如何更新我的基本資料、技能和緊急聯絡詳情?', 'How local records shall be updated': '本機紀錄應該如何更新', 'Human Resource': '人力資源', 'Human Resource Details': 'Human Resource Details', 'Human Resource added': 'Human Resource added', 'Human Resource removed': 'Human Resource removed', 'Human Resource updated': 'Human Resource updated', 'Human Resources': 'Human Resources', 'I ACCEPT, CREATE MY ACCOUNT': '「我接受,請建立我的帳戶」', 'I accept. Create my account.': '我接受。建立我的帳戶。', 'I am 18 or over': '我已滿 18 歲', 'I am a U.S. Citizen': '我是美國公民', 'I will comply with all %(program_regulations)s including being registered by an accredited disaster council or its authorized designee.': '我會遵守所有 %(program_regulations)s,包括由政府立案的災害委員會或其授權指定人註冊。', 'I will subscribe to the %(loyalty_oath)s and perform eligible disaster service duties.': '我會 %(loyalty_oath)s 並履行合格災害服務的職責。', 'I would like to register my corporation for donations, what is the process?': '我想為我的公司註冊以提供捐贈,請問流程為何?', 'ID Tag Number': 'ID 標籤編號', 'ID type': 'ID 類型', 'Identifier which the repository identifies itself with when sending synchronization requests': '發送同步化要求時,存放庫自我辨識的識別碼', 'Identity Details': 'Identity Details', 'Identity added': 'Identity added', 'Identity deleted': 'Identity deleted', 'Identity updated': 'Identity updated', 'If a user verifies that they own an Email Address with this domain, the Approver field is used to determine whether & by whom further approval is required.': '若使用者確認擁有該網域的電子郵件地址,核准人欄位將用來判定是否需要進一步核准以及誰該負責核准。', 'If it is a URL leading to HTML, then this will downloaded.': '如果此網址導向 HTML 頁面,便會下載。', 'If neither are defined, then the Default Marker is used.': '如果都沒有定義,則使用預設標記。 ', 'If the request is for %s, please enter the details on the next screen.': '如果需求是 %s,請在下一個畫面輸入詳情。', 'If the request type is "Other", please enter request details here.': '如果需求類型是「其他」,請在此輸入需求詳情。', 'If this field is populated then a user with the Domain specified will automatically be assigned as a Staff of this Organization': '若此欄位已填入資訊,指定網域的使用者將自動被指派為該組織的工作人員', 'If this record should be restricted then select which role is required to access the record here.': '如果應該限制存取此紀錄,請在此選擇哪個角色才能存取。', 'If this record should be restricted then select which role(s) are permitted to access the record here.': '如果應該限制存取此紀錄,請在此選取允許哪些角色存取。', 'If you are a Medical or Health Professional and wish to volunteer in a professional capacity, please register at': '如果您是醫療或健康專業人員,希望提供專業領域的志工服務,請於下註冊', 'If you are not a US citizen, you may not register to apply to be a volunteer. Thank you for your interest in our volunteer opportunities.': '如果您不是美國公民,即不得註冊申請成為志工。感謝您有心瞭解擔任我們志工的機會。', 'If you are under the age 18, you may not register to apply to be a volunteer. Thank you for your interest in our volunteer opportunities.': '如果您未滿 18 歲,即不得註冊申請擔任志工。感謝您有心瞭解擔任我們志工的機會。', "If you don't see the Facility in the list, you can add a new one by clicking link 'Add Facility'.": '如果清單中沒有看到該機構,點選「新增機構」連結即可新增。', "If you don't see the Organization in the list, you can add a new one by clicking link 'Add Organization'.": "If you don't see the Organization in the list, you can add a new one by clicking link 'Add Organization'.", 'If you have the required skills, click to %(apply_button)s': '如果您具備所需的技能,請點選 %(apply_button)s', 'If you select an Organization here then they will be notified of this request. Organizations will also be able to see any requests publshed to the public site.': '如果您在此選取組織,他們便會收到此需求的通知。組織也能看到發布到公共網站的需求。', 'If you select an Organization(s) here then they will be notified of this request. Organizations will also be able to see any requests publshed to the public site.': 'If you select an Organization(s) here then they will be notified of this request. Organizations will also be able to see any requests publshed to the public site.', 'If you want several values, then separate with': '如果您要幾個值,請用下列方式分隔', 'If your skill(s) is not listed, you may enter it in the %(extraSkills)s field below.': '如果您的技能不在清單上,可在以下 %(extraSkills)s 欄位輸入。', 'Image': '影像', 'Image Details': 'Image Details', 'Image Type': '影像類型', 'Image added': 'Image added', 'Image deleted': 'Image deleted', 'Image updated': 'Image updated', 'Images': 'Images', 'Import': '匯入', 'Import File': '匯入檔案', 'Incident': '事故', 'Incident Details': 'Incident Details', 'Incident added': 'Incident added', 'Incident removed': 'Incident removed', 'Incident updated': 'Incident updated', 'Incidents': 'Incidents', 'Include any special requirements such as equipment which they need to bring, specific location, parking, accessibility.': '包括任何特殊要求,例如,需要攜帶的器材、特定位置、停車、交通便利性。', 'Individuals or Volunteer Units/Organizations interested in assisting during public health emergencies (i.e. Mass vaccine/medication dispensing sites or PODs) please register at': '有意願在公共衛生急難期間 (即大規模接種疫苗 / 配藥地點或 POD) 提供協助的個人或志工單位 / 組織,請於下註冊', 'Infrastructure Architect': '基礎系統架構師', 'Instructions for Return or Surplus': '歸還或剩餘物資說明', 'Insufficient Privileges': '權限不足', 'Insufficient privileges': '權限不足', 'Insurance Details': '保險詳情', 'Insured': '被保人', 'Invalid email': '電子郵件無效', 'Invalid login': '登入無效', 'Inventory': '詳細目錄', 'Inventory Item': '詳細目錄項目', 'Inventory Items': '詳細目錄項目', 'Inventory Management': '倉儲管理', 'Is my donation tax deductible?': '我的捐款可以扣稅嗎?', 'Is there a minimum age limit to volunteer?': '擔任志工是否有最低年齡限制?', 'Issuing Authority': '發證機關', "It's what Angelenos do when disasters happen. Whether you are an individual, business, community group or a faith based organization, you can make a difference in helping survivors recover from a disaster. Whatever your contribution - whether it's time, goods or money - when you %(give2la)s your assistance aids in a variety of support efforts. Simply put - It is the spirit and value of charity that helps survivors get back on their feet and get their lives back on track.": '這是 Los Angeles 民眾在災害發生時會做的事。無論您是個人、公司、社區團體或宗教組織,您都能在幫助災害倖存者復原方面發揮功效。無論是貢獻時間、貨品或金錢,只要參與 %(give2la)s 時,您都能協助各項支援工作。簡單地說,這就是慈善的精神和價值 - 幫助倖存者振作,生活回到正軌。', 'Item': '物品', 'Item Catalog Details': 'Item Catalog Details', 'Item Categories': 'Item Categories', 'Item Category Details': 'Item Category Details', 'Item Category added': 'Item Category added', 'Item Category deleted': 'Item Category deleted', 'Item Category updated': 'Item Category updated', 'Item Details': 'Item Details', 'Item Pack Details': 'Item Pack Details', 'Item Pack added': 'Item Pack added', 'Item Pack deleted': 'Item Pack deleted', 'Item Pack updated': 'Item Pack updated', 'Item Packs': 'Item Packs', 'Item Unit': '物品單位', 'Item Units': '物品單位', 'Item added': 'Item added', 'Item deleted': 'Item deleted', 'Item updated': 'Item updated', 'Items': 'Items', 'Items in Category can be Assets': '類別中的項目可以是資產', 'Japanese': '日文', 'Job Role': '工作角色', 'Job Role Catalog': 'Job Role Catalog', 'Job Role Details': 'Job Role Details', 'Job Role added': 'Job Role added', 'Job Role deleted': 'Job Role deleted', 'Job Role updated': 'Job Role updated', 'Job Roles': 'Job Roles', 'Job Title': '職稱', 'Known Identities': 'Known Identities', 'Korean': '韓文', 'L.A. Works is a 501(c)3 nonprofit, volunteer action center that creates and implements hands-on community service projects throughout the greater LA area.': 'L.A. Works 為 501(c)3 的非營利、志工行動中心,負責在整個大 LA 地區建立並執行務實的社區服務專案。', 'LA County Disaster Healthcare Volunteers, comprised of 4 volunteer units, is led by the County of LA Departments of Health Services, Emergency Medical Services Agency and Public Health Emergency Preparedness and Response Program. It is specifically for licensed medical, health, mental health, and other volunteers who want to volunteer their professional skills for public health emergencies or other large scale disasters. Actively licensed health professionals are encouraged to register with one of the four units (MRC LA, LA County Surge Unit, Long Beach MRC, Beach Cities Health District MRC) on the State of California Disaster Healthcare Volunteers (DHV) site in advance of the next disaster.': 'LA 郡災害健康照護志工由 4 個志工單位組成,並由 LA 郡健康服務部、緊急醫療服務局及公共衛生急難準備和應變方案共同領導。這是特別針對願意在公共健康急難或其他大規模災害發生時,貢獻專業技能的持照醫療、健康、精神健康和其他志工。我們鼓勵現在持有有效執照的健康專業人員,在下一次災害發生前,先到 California 州災害健康照護志工 (DHV) 網站上向四個單位 (MRC LA、LA 郡緊急應變單位、Long Beach MRC、Beach Cities 健康區 MRC) 之一註冊。', 'LA Works': 'LA Works', 'Language': '語言', 'Last': '最後一項', 'Last Name': '姓氏', 'Last name': '姓氏', 'Last status': '最後狀態', 'Last synchronized on': '最後同步化時間', 'Last updated ': '最後更新時間 ', 'Latitude': '緯度', 'Latitude & Longitude': '緯度和經度', 'Latitude is North-South (Up-Down).': '緯度是南北向 (上下)。', 'Latitude is zero on the equator and positive in the northern hemisphere and negative in the southern hemisphere.': '緯度在赤道為零,向北半球為正值,向南半球則負值。 ', 'Latitude should be between': '緯度應介於', 'Lawyer': '律師', 'Layer Name': '圖層名稱', 'Layers': '圖層', 'Lead Time': 'Lead Time', 'Legal Aid For Individuals': '個人法律援助', 'Legal, Insurance, etc': 'Legal, Insurance, etc', 'Length (m)': '長度 (公尺) ', 'Letter': '信函', 'Level': '級別', 'License Number': '牌照證號', 'Link opens a new window': '連結開啟新視窗', 'Link will open to new Window': '連結將開啟新的視窗', 'List Alternative Items': 'List Alternative Items', 'List Applications': '列出應用程式', 'List Assignments': 'List Assignments', 'List Brands': 'List Brands', 'List Catalog Items': 'List Catalog Items', 'List Catalogs': 'List Catalogs', 'List Certificates': 'List Certificates', 'List Certifications': 'List Certifications', 'List Commitment Items': 'List Commitment Items', 'List Committed People': 'List Committed People', 'List Competency Ratings': 'List Competency Ratings', 'List Contact Information': 'List Contact Information', 'List Course Certicates': 'List Course Certicates', 'List Courses': 'List Courses', 'List Credentials': 'List Credentials', 'List Donation Commitment Statuses': 'List Donation Commitment Statuses', 'List Emergency Contacts': '列出緊急聯絡人', 'List Events': 'List Events', 'List Facilities': 'List Facilities', 'List Fulfilment Details': 'List Fulfilment Details', 'List Groups': 'List Groups', 'List Human Resources': 'List Human Resources', 'List Identities': 'List Identities', 'List Images': 'List Images', 'List Incidents': 'List Incidents', 'List Item Categories': 'List Item Categories', 'List Item Packs': 'List Item Packs', 'List Items': 'List Items', 'List Job Roles': 'List Job Roles', 'List Locations': 'List Locations', 'List Map Configurations': 'List Map Configurations', 'List Missions': 'List Missions', 'List Organizations': 'List Organizations', 'List Persons': 'List Persons', 'List Received Shipments': 'List Received Shipments', 'List Records': 'List Records', 'List Request Items': 'List Request Items', 'List Requested Volunteers': 'List Requested Volunteers', 'List Requests for Volunteers': '列出志工需求', 'List Rooms': 'List Rooms', 'List Roster Email Addresses': 'List Roster Email Addresses', 'List Sectors': 'List Sectors', 'List Settings': 'List Settings', 'List Skill Equivalences': 'List Skill Equivalences', 'List Skill Types': 'List Skill Types', 'List Skills': '列出技能', 'List Subsectors': 'List Subsectors', 'List Surplus Items': 'List Surplus Items', 'List Trainings': 'List Trainings', 'List of Requests for Volunteers': '志工需求清單', 'List of addresses': 'List of addresses', 'Loan Value per. Day': '每日貸款價值', 'Local Name': '本機名稱', 'Locate the %(register)s for Corporations and Organizations on the Home Page and click on it.': '在首頁找到並點選企業和組織的 %(register)s 連結。', 'Location': '位置', 'Location Details': '位置詳情', 'Location added': 'Location added', 'Location deleted': 'Location deleted', 'Location updated': 'Location updated', 'Locations': 'Locations', 'Longitude': '經度', 'Longitude is West-East (sideways).': '經度是東西向 (左右)。', 'Longitude is zero on the prime meridian (Greenwich Mean Time) and is positive to the east, across Europe and Asia. Longitude is negative to the west, across the Atlantic and the Americas.': '經度以本初子午線 (格林威治標準時間) 為零,向東 (橫跨歐洲和亞洲) 為正值;向西 (橫跨大西洋和美洲) 為負值。', 'Longitude should be between': '經度應介於', 'Lost Password': '忘記密碼', 'Low': '低', 'Make a Request for Volunteers': 'Make a Request for Volunteers', 'Manager': '經理人', 'Mandatory. In GeoServer, this is the Layer Name. Within the WFS getCapabilities, this is the FeatureType Name part after the colon(:).': '必填。在 GeoServer 中,這是圖層名稱。在 WFS getCapabilities 內,這是冒號 (:) 後面的 FeatureType 名稱部分。', 'Mandatory. The URL to access the service.': '必填。存取服務的網址。', 'Map': '地圖', 'Map Configuration': '地圖配置', 'Map Configuration Details': 'Map Configuration Details', 'Map Configuration added': 'Map Configuration added', 'Map Configuration removed': 'Map Configuration removed', 'Map Configuration updated': 'Map Configuration updated', 'Map Configurations': 'Map Configurations', 'Marker': '標記', 'Marketing': '行銷', 'Master Data': 'Master Data', 'Match Requested Item in WebEOC to Catalog Item in WebEOC.': '使 WebEOC 中的要求項目和 WebEOC 中的目錄項目一致。', 'Match Requested Resource in WebEOC to Catalog Item in Give2LA.': 'Match Requested Resource in WebEOC to Catalog Item in Give2LA.', 'Match Requested Resource in WebEOC to Catalog Resource in Give2LA.': 'Match Requested Resource in WebEOC to Catalog Resource in Give2LA.', 'Match To Catalog Item': '符合目錄項目', 'Match To Catalog Resource': 'Match To Catalog Resource', 'Matching Catalog Items': 'Matching Catalog Items', 'Matching Items': 'Matching Items', 'Matching Records': 'Matching Records', 'Mayor %(mayor_name)s': '%(mayor_name)s 巿長', 'Medium': '中', 'Middle Name': '中間名', 'Minute': '分鐘', 'Mission Details': 'Mission Details', 'Mission added': 'Mission added', 'Mission deleted': 'Mission deleted', 'Mission updated': 'Mission updated', 'Missions': 'Missions', 'Mobile Phone Number': 'Mobile Phone Number', 'Mode': '模式', 'Model/Type': '型號 / 類型', 'Module': '模組', 'My Assignments': '我的任務分派', 'My Profile': '我的基本資料', 'My Skills': 'My Skills', 'My Volunteering': '我的志願工作', 'Name': '名稱', 'Name of the person in local language and script (optional).': '個人當地語言的姓名 (非必填)。', 'Name of the repository (for you own reference)': '存放庫名稱 (供您自己參考)', 'Nationality': '國籍', 'Nationality of the person.': '個人國籍。', 'Need Type': '需求類型', 'Neighborhood': '社區', 'New Event': 'New Event', 'Next': '後一項', 'No Alternative Items currently registered': 'No Alternative Items currently registered', 'No Brands currently registered': 'No Brands currently registered', 'No Catalog Items currently registered': 'No Catalog Items currently registered', 'No Catalogs currently registered': 'No Catalogs currently registered', 'No Commitment Items currently registered': 'No Commitment Items currently registered', 'No Donation Commitment Status': 'No Donation Commitment Status', 'No Donation Drives Scheduled. Please check back later': '無預定的捐助活動。請稍後回來查詢', 'No Events currently registered': 'No Events currently registered', 'No Facilities currently registered': 'No Facilities currently registered', 'No Facilities currently registered in this event': 'No Facilities currently registered in this event', 'No Groups currently registered': 'No Groups currently registered', 'No Human Resources currently registered in this event': 'No Human Resources currently registered in this event', 'No Identities currently registered': 'No Identities currently registered', 'No Images currently registered': 'No Images currently registered', 'No Incidents currently registered in this event': 'No Incidents currently registered in this event', 'No Item Categories currently registered': 'No Item Categories currently registered', 'No Item Packs currently registered': 'No Item Packs currently registered', 'No Items currently registered': 'No Items currently registered', 'No Locations currently available': 'No Locations currently available', 'No Map Configurations currently registered in this event': 'No Map Configurations currently registered in this event', 'No Matching Catalog Items': 'No Matching Catalog Items', 'No Matching Items': 'No Matching Items', 'No Matching Records': '無相符的紀錄', 'No Organizations currently registered': 'No Organizations currently registered', 'No Packs for Item': '物品無包裝', 'No People currently committed': 'No People currently committed', 'No Persons currently registered': 'No Persons currently registered', 'No Ratings for Skill Type': '技能類型無評級', 'No Received Shipments': 'No Received Shipments', 'No Records currently available': 'No Records currently available', 'No Request Fulfilments': 'No Request Fulfilments', 'No Request Items currently registered': 'No Request Items currently registered', 'No Requests for Volunteers': 'No Requests for Volunteers', 'No Rooms currently registered': 'No Rooms currently registered', 'No Sectors currently registered': 'No Sectors currently registered', 'No Settings currently defined': 'No Settings currently defined', 'No Skills Required': '無需特定技能', 'No Subsectors currently registered': 'No Subsectors currently registered', 'No Surplus Items currently Recorded': 'No Surplus Items currently Recorded', 'No Volunteers currently requested': 'No Volunteers currently requested', 'No contact information available': 'No contact information available', 'No data available in table': '表格中沒有可用的資料', 'No entries found': 'No entries found', 'No match': '不相符', 'No matching records': 'No matching records', 'No matching records found': '找不到相符的紀錄', 'No past assignments': '無過去的任務分派', "No, anyone may register to support the City of Los Angeles' volunteer efforts.": '不必,任何人都能註冊,加入 Los Angeles 市的志工行列。', 'No, unless it is otherwise stated on the Volunteer Assignment.': '不會,除非志工任務分派上另有說明。', 'No. of Hours': '時數', 'No. of Volunteers': '志工人數', "Non-city web sites may be linked through the City's web site. Many non-city sites may or may not be subject to the Public Records Act and may or may not be subject to other sections of California Code or federal law. Visitors to such sites are advised to check the privacy statements of such sites and to be cautious about providing personally identifiable information without a clear understanding of how the information will be used.": '市政府網站可連結至非市政府網站。許多非市政府網站未必受公共紀錄法案 (Public Records Act) 約束,也未必受加州法典或聯邦法律其他條款約束。建議這類網站的訪客應查看其隱私權聲明,未清楚瞭解這些資訊的用途之前,請謹慎考慮是否應提供個人識別資訊。', 'None': '無', 'Note that this will may incur costs from your carrier.': '請注意,電信公司可能會向您收取費用。', 'Notifications': '通知', 'Number of Households': '戶數', 'Number of People Assigned': '已指派人數', 'Number of People Checked In': '報到人數', 'Number of People Required': '需求人數', 'Number of Volunteers': '志工人數', 'Number of Volunteers Still Needed': '仍需志工人數', 'Number of Volunteers to Commit': '承諾志工人數', 'Number or Label on the identification tag this person is wearing (if any).': '該個人配帶的識別標籤上的號碼或標示 (若有)。', 'Observer': '觀察者', 'Obsolete': '已過時', 'Office Administration': '辦公室管理', 'On by default?': '預設為開啟嗎?', 'On by default? (only applicable to Overlays)': '預設為開啟嗎?(僅適用重疊)', "On the Home Page, click the 'Volunteer' link. Review the 'List of Requests for Volunteers'. To select a %(request)s (Volunteer Task), click on %(apply)s; OR You can register by clicking the 'Register' link located on the top of the web page.": '點選首頁的「志工」連結。查看「志工需求清單」。欲選取 %(request)s (志工任務),請點選 %(apply)s;您也能點選網頁上方的「註冊」連結,即可註冊。', 'On the left menu, click %(assignments)s.': '在左邊功能表點選 %(assignments)s。', 'On the left menu, click %(profile)s .': '在左邊功能表點選 %(profile)s。', 'On the left menu, click %(skills)s.': '在左邊功能表點選 %(skills)s。', 'On the top menu, click %(volunteer)s.': '在上方功能表上,點選 %(volunteer)s。', 'On this page, you can update your profile.': '您可以在此頁更新基本資料。', 'Opacity (1 for opaque, 0 for fully-transparent)': '不透明度 (不透明為 1,全透明為 0)', 'Open': 'Open', 'Open Map': 'Open Map', 'Opinion Poll Survey': '意見調查', 'Optional selection of a MapServer map.': 'MapServer 地圖的自選項目。', 'Optional selection of a background color.': '背景顏色的自選項目。', 'Optional selection of an alternate style.': '替代樣式的自選項目。', 'Optional. If you wish to style the features based on values of an attribute, select the attribute to use here.': '非必填。如果您根據屬性值調整功能的樣式,請在此選取要使用的屬性。', 'Optional. In GeoServer, this is the Workspace Namespace URI (not the name!). Within the WFS getCapabilities, this is the FeatureType Name part before the colon(:).': '非必填。在 GeoServer 中,這是 Workspace Namespace URI (不是名稱!)。在 WFS getCapabilities 內,這是冒號 (:) 前面的 FeatureType 名稱部分。', 'Optional. The name of an element whose contents should be a URL of an Image file put into Popups.': '非必填。內容應該是放入快顯視窗的影像檔案網址的元素之名稱。', 'Optional. The name of an element whose contents should be put into Popups.': '非必填。內容應放入快顯視窗的元素之名稱。', "Optional. The name of the geometry column. In PostGIS this defaults to 'the_geom'.": '非必填。幾何欄位名稱。在 PostGIS 中,此預設為「the_geom」。', 'Optional. The name of the schema. In Geoserver this has the form http://host_name/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=workspace_name:layer_name.': '非必填。架構名稱。在 Geoserver 中,此格式為 http://host_name/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=workspace_name:layer_name。', 'Organization': '組織', 'Organization Activities': '組織活動', 'Organization Assignments': '組織任務分派', 'Organization Details': 'Organization Details', 'Organization Profile': '組織基本資料', 'Organization added': 'Organization added', 'Organization deleted': 'Organization deleted', 'Organization updated': 'Organization updated', 'Organizations': '組織', 'Organizations & Groups': '組織和團體', 'Organizations and Groups can volunteer to support the City of Los Angeles, and also receive Situation Awareness Reports.': '組織和團體均可加入支持 Los Angeles 市的志工行列,也能收到情況瞭解報告 (Situation Awareness Reports)。', 'Origin': '國籍', 'Other Organizations that you are registered with.': '您註冊的其他組織。', 'Other Volunteering Opportunities': '其他志工機會', 'PRINT CERTIFICATE': '列印證明', 'PRINT VOLUNTEER ASSIGNMENT FORM': '列印志工任務分派表', 'Parent': '父母', 'Parent Office': '家長會辦公室', 'Password': '密碼', "Password fields don't match": '密碼欄位不符', 'Password reset': '密碼已重設', 'Password to use for authentication at the remote site': '在遠端網站驗證所用的密碼', 'Past Assignments': '過去的任務分派', 'Path': '路徑', 'Penalty for Late Return': '逾期歸還罰款', 'People Needing Food': '需要食物的人', 'People Needing Shelter': '需要住所的人', 'People Needing Water': '需要水的人', 'Performance Rating': '表現評級', 'Person': '個人', 'Person Details': 'Person Details', 'Person added': 'Person added', 'Person added to Commitment': 'Person added to Commitment', 'Person deleted': 'Person deleted', 'Person details updated': 'Person details updated', 'Person removed from Commitment': 'Person removed from Commitment', 'Person who has actually seen the person/group.': '已經實際看過該個人 / 團體的個人。', 'Person who initially requested this resource': 'Person who initially requested this resource', 'Persons': 'Persons', 'Phone': '電話', 'Phone 2': '電話 2', "Phone number to donate to this organization's relief efforts.": '捐贈給該組織救濟工作的電話號碼。', 'Photography': '攝影', 'Physically lift at least 10 Lbs': '至少提舉 10 磅', 'Physically lift at least 25 Lbs': '至少提舉 25 磅', 'Physically lift at least 50 Lbs': '至少提舉 50 磅', 'Picture': '圖片', 'Pilot': '飛行員', 'Place': '地方', 'Please %(give2la)s and do your part to ensure LA is ready for a disaster.': '請參與 %(give2la)s,盡一己之力,確保 LA 能從容面對災害。', 'Please %(register)s to volunteer with %(give2la)s and receive updates of new Requests for Volunteers.': '請 %(register)s 擔任 %(give2la)s 志工,收到志工需求的最新消息。', "Please check that you have the required skills for this assignment as you've not specified that you have all the required skills.": '請確認您具備此任務分派所需的技能,因為您並未指明您具有全部所需的技能。', 'Please enter a number only': '請只輸入一個數字 ', 'Please enter a valid email address': '請輸入有效的電子郵件地址', 'Please enter any other additional skills & information': '請輸入任何其他額外的技能和資訊', 'Please enter any other additional skills you have which are not on the list or other information which may be relevant for your volunteer assignments, such as any special needs that you have.': '請輸入不在清單上但您具備的其他技能,或輸入可能與您的志工任務分派相關的其他資訊,例如您的特殊需要。', 'Please include information regarding the accessibility & mobility constraints of the volunteer task and location': 'Please include information regarding the accessibility & mobility constraints of the volunteer task and location', 'Please let us know in advance if you cannot report for your Volunteer Assignment by calling the Point of Contact listed below.': '如果您無法根據志工任務分派報到,請事先致電以上聯絡點通知我們。', 'Please make sure we have your accurate information. If you have personal information has changed, please update your profile. This will ensure you receive new volunteer opportunities and information.': '請務必提供正確的資訊。若您的個人資訊已有變更,請更新基本資料。 這將確保您收到新的志工機會和資訊。', 'Please refer to the %(privacy)s': '請參閱 %(privacy)s', 'Please use this field to record any additional information, including a history of the record if it is updated.': '請使用本欄位記錄其他資訊,包括紀錄更新歷史。', 'Plumber': '水電工', 'Point of Contact': '聯絡點', 'Poor': '差', 'Popup Fields': '快顯欄位', 'Popup Label': '快顯標籤', 'Portal at': '入口網站位置', 'Postcode': '郵遞區號', 'Powered by ': '技術支援 ', 'Powered by Sahana Eden': '技術支援:Sahana Eden', 'Preferred Name': '首選名稱', 'Presence Condition': '出席狀況', 'Previous': '前一項', 'Priority': '優先性', 'Priority from 1 to 9. 1 is most preferred.': '優先順序 1 至 9。1 為首選。', 'Privacy Policy': '隱私權政策', 'Procedure': '程序', 'Processed in BOC by': 'BOC 經辦人', 'Processing…': '處理中…', 'Profile': '基本資料', 'Profile updated': '基本資料已更新', 'Project': '專案', 'Project Status': '專案狀態', 'Projection': '預測', 'Provide a password': '提供密碼', 'Public Relations': '公共關係', 'Publish to Organizations': 'Publish to Organizations', 'Publish to Public Site?': '發布到公共網站?', 'Publish to Volunteer Organizations': '發布到志工組織', 'Purpose': '目的', 'Quantity': '數量 ', 'Quantity Donated': '捐贈數量', 'Quantity Received': '已收件數量', 'Quantity in Transit': '運輸中數量', 'REGISTER HERE': '在此註冊', 'ReadyLA Website': 'ReadyLA 網站', 'Receive Notifications via Email?': '接收電子郵件通知? ', 'Receive Notifications via SMS': '接收 SMS 通知 ', 'Receive Notifications via SMS?': '接收 SMS 通知? ', 'Receive Shipment': '收貨', 'Received By': '收件人', 'Received Shipment Details': 'Received Shipment Details', 'Received Shipment canceled': 'Received Shipment canceled', 'Received Shipment updated': 'Received Shipment updated', 'Received Shipments': 'Received Shipments', 'Receptionist': '接待員', 'Recipient of Surplus Items': '剩餘物品收件人', 'Recipient of Surplus Resources': 'Recipient of Surplus Resources', 'Record Details': 'Record Details', 'Record New Surplus Item': 'Record New Surplus Item', 'Record Surplus Items': 'Record Surplus Items', 'Record added': 'Record added', 'Record deleted': 'Record deleted', 'Record not found': '找不到紀錄', 'Record updated': 'Record updated', 'Refresh Rate (seconds)': '更新率 (秒)', 'Register': '註冊', 'Register to Volunteer for the City of Los Angeles': '註冊成為 Los Angeles 市的志工', 'Register with %(give2la)s to support the City of Los Angeles': '註冊 %(give2la)s,支持 Los Angeles 市', 'Registration Required': '必須註冊', 'Registration is still pending approval from Approver (%s) - please wait until confirmation received.': '註冊仍在等核准人 (%s) 核准 - 請等到收到確認為止。', 'Registration key': '註冊金鑰', 'Registration successful': '註冊成功', 'Reload': 'Reload', 'Remote Error': '遠端錯誤', 'Remove Facility from this event': 'Remove Facility from this event', 'Remove Human Resource from this event': 'Remove Human Resource from this event', 'Remove Incident from this event': 'Remove Incident from this event', 'Remove Map Configuration from this event': 'Remove Map Configuration from this event', 'Remove Person from Commitment': 'Remove Person from Commitment', 'Remove Request Fulfilment': 'Remove Request Fulfilment', 'Remove Roster Email Address': 'Remove Roster Email Address', 'Remove Skill': 'Remove Skill', 'Remove Volunteers from Request': 'Remove Volunteers from Request', 'Remove all': '移除全部', 'Repeat your password': '重複您的密碼', 'Report To Facility': '向機構報到', 'Reported To': '報告對象', 'Repository': '存放庫', 'Repository Base URL': '存放庫基底網址', 'Repository Name': '存放庫名稱', 'Repository UUID': '存放庫 UUID', 'Request': '要求', 'Request Fulfilment Details': 'Request Fulfilment Details', 'Request Fulfilment Details Added': 'Request Fulfilment Details Added', 'Request Fulfilment Details Deleted': 'Request Fulfilment Details Deleted', 'Request Fulfilment Details Updated': 'Request Fulfilment Details Updated', 'Request Fulfilments': 'Request Fulfilments', 'Request Item': '需求物品', 'Request Item Details': 'Request Item Details', 'Request Item added': 'Request Item added', 'Request Item deleted': 'Request Item deleted', 'Request Item updated': 'Request Item updated', 'Request Number': '需求數量', 'Request Priority': '需求優先性', 'Request Resource': 'Request Resource', 'Request Type': '需求類型', 'Request for Volunteers': '志工需求', 'Request for Volunteers Added': 'Request for Volunteers Added', 'Request for Volunteers Canceled': 'Request for Volunteers Canceled', 'Request for Volunteers Details': 'Request for Volunteers Details', 'Request for Volunteers Updated': 'Request for Volunteers Updated', 'Request reset password': '要求重設密碼', 'Requested For': '需求目的', 'Requested For Facility': '為機構提出需求', 'Requested Item': '需求物品', 'Requested Items': 'Requested Items', 'Requested Resource': 'Requested Resource', 'Requested Volunteers': 'Requested Volunteers', 'Requested Volunteers Details': 'Requested Volunteers Details', 'Requested Volunteers updated': 'Requested Volunteers updated', 'Requester': '需求者', 'Requests for Volunteers': '志工需求', 'Required Skills': '所需技能', 'Research': '研究', 'Resource': '資源', 'Resource Name': '資源名稱', 'Resource Unit': 'Resource Unit', 'Resource Units': 'Resource Units', 'Resources': 'Resources', 'Resources in Category can be Assets': 'Resources in Category can be Assets', 'Retrieve Password': '檢索密碼', 'Return Contact': '返回聯絡', 'Return by Date+Time': '返回期限 (日期 + 時間)', 'Return to Facility': '返回機構', 'Return to Home Page': '返回首頁', "Review the 'List of Requests for Volunteers'.": '查看「志工需求清單」。', "Review the 'Volunteer Assignment Details'. Enter your Emergency Contact information.": '檢視「志工任務分派詳情」。輸入緊急聯絡人資訊。', 'Review the Volunteer Application details.': '查看志工申請詳情。', 'Role': '角色', 'Role Required': '需求角色', 'Roles Permitted': '允許的角色', 'Room Details': 'Room Details', 'Room added': 'Room added', 'Room deleted': 'Room deleted', 'Room updated': 'Room updated', 'Rooms': 'Rooms', "Rooted in over a century's tradition of service to the community, the American Red Cross is one of the world's most renowned humanitarian organizations. American Red Cross volunteers assist with community emergency preparedness, services to the armed forces, emergency and disaster response, blood services, health and safety education, international services and other support volunteer services.": 'American Red Cross 立基於超過一個世紀服務社區的傳統,為世界上最負盛名的人道主義組織之一。American Red Cross 協助社區急難準備、爲武裝部隊提供服務、急難與災害應變、血液服務、健康與安全教育、國際服務,以及其他支援志工服務。', 'Roster Email Address Details': 'Roster Email Address Details', 'Roster Email Address added': 'Roster Email Address added', 'Roster Email Address removed': 'Roster Email Address removed', 'Roster Email Address updated': 'Roster Email Address updated', 'Roster Email Addresses': 'Roster Email Addresses', 'Roster Lead Time': '名冊前置時間', 'Save': '儲存', 'Save profile': '儲存基本資料', 'Scanned Copy': '掃描複本', 'Schema': '架構', "Scroll down to the bottom of the screen to get to 'Evaluation of Event'.": '往下捲動至畫面底部就能看到「活動評估」。', 'Search Addresses': 'Search Addresses', 'Search Alternative Items': 'Search Alternative Items', 'Search Applications': 'Search Applications', 'Search Assignments': 'Search Assignments', 'Search Brands': 'Search Brands', 'Search Catalog Items': 'Search Catalog Items', 'Search Catalogs': 'Search Catalogs', 'Search Certificates': 'Search Certificates', 'Search Certifications': 'Search Certifications', 'Search Commitment Items': 'Search Commitment Items', 'Search Committed People': 'Search Committed People', 'Search Competency Ratings': 'Search Competency Ratings', 'Search Contact Information': 'Search Contact Information', 'Search Course Certicates': 'Search Course Certicates', 'Search Courses': 'Search Courses', 'Search Credentials': 'Search Credentials', 'Search Criteria': '搜尋條件', 'Search Donation Commitment Statuses': 'Search Donation Commitment Statuses', 'Search Emergency Contacts': 'Search Emergency Contacts', 'Search Events': 'Search Events', 'Search Facilities': 'Search Facilities', 'Search Groups': 'Search Groups', 'Search Human Resources': 'Search Human Resources', 'Search Identity': 'Search Identity', 'Search Images': 'Search Images', 'Search Incidents': 'Search Incidents', 'Search Item Categories': 'Search Item Categories', 'Search Item Packs': 'Search Item Packs', 'Search Items': 'Search Items', 'Search Job Roles': 'Search Job Roles', 'Search Locations': 'Search Locations', 'Search Map Configurations': 'Search Map Configurations', 'Search Missions': 'Search Missions', 'Search Organizations': 'Search Organizations', 'Search Persons': 'Search Persons', 'Search Received Shipments': 'Search Received Shipments', 'Search Records': 'Search Records', 'Search Request Fulfilments': 'Search Request Fulfilments', 'Search Request Items': 'Search Request Items', 'Search Requested Volunteers': 'Search Requested Volunteers', 'Search Requests for Volunteers': 'Search Requests for Volunteers', 'Search Rooms': 'Search Rooms', 'Search Roster Email Addresses': 'Search Roster Email Addresses', 'Search Sectors': 'Search Sectors', 'Search Settings': 'Search Settings', 'Search Skill Equivalences': 'Search Skill Equivalences', 'Search Skill Types': 'Search Skill Types', 'Search Skills': 'Search Skills', 'Search Subsectors': 'Search Subsectors', 'Search Surplus Items': 'Search Surplus Items', 'Search Trainings': 'Search Trainings', 'Search:': '搜尋:', 'Secondary Server (Optional)': '第二伺服器 (選擇性)', 'Sector': '行業', 'Sector Details': 'Sector Details', 'Sector added': 'Sector added', 'Sector deleted': 'Sector deleted', 'Sector updated': 'Sector updated', 'Sectors': 'Sectors', 'Security Guard': '警衛', 'Security Guards': '警衛', 'Security Required': '安全需求', 'Select Items from the Request': '從要求選取項目', 'Select Items from this Inventory': '從此詳細目錄選取項目', 'Select Resources from the Request': 'Select Resources from the Request', "Select a Room from the list or click 'Add Room'": '從清單中選取房間或點選「新增房間」', 'Send Shipment': '送貨', 'Send Volunteer Roster Time': 'Send Volunteer Roster Time', 'Sent By': '寄件人', 'Sent By Person': '按人發送', 'Setting Details': 'Setting Details', 'Setting added': 'Setting added', 'Setting deleted': 'Setting deleted', 'Setting updated': 'Setting updated', 'Settings': 'Settings', 'Shipment Created': 'Shipment Created', 'Should receive notifications of new volunteer opportunities for this Organization': '應收到此組織新的志工機會的通知', 'Show _MENU_ entries': '顯示 _MENU_ 項目', 'Showing 0 to 0 of 0 entries': '顯示第 0 至 0 項,共 0 項', 'Showing _START_ to _END_ of _TOTAL_ entries': '顯示第 _START_ 至 _END_項,共 _TOTAL_ 項', 'Sign In': '登入', 'Sign Language Support': '手語支援', 'Sign Out': '登出', 'Sign in': '登入', 'Sign in here': '在此登入', 'Sign-In': '「登入」', 'Signed In': '已登入', 'Signed Out - Thank you for supporting the City of Los Angeles': '已登出 - 謝謝您支持 Los Angeles 市', 'Simple Search': 'Simple Search', 'Sit for 2 Hours': '坐 2 小時', 'Site': '網站', 'Site Map': '網站地圖', 'Sitemap': '網站地圖', 'Skill': '技能', 'Skill Catalog': 'Skill Catalog', 'Skill Details': 'Skill Details', 'Skill Equivalence Details': 'Skill Equivalence Details', 'Skill Equivalence added': 'Skill Equivalence added', 'Skill Equivalence deleted': 'Skill Equivalence deleted', 'Skill Equivalence updated': 'Skill Equivalence updated', 'Skill Equivalences': 'Skill Equivalences', 'Skill Type': '技能類型', 'Skill Type Catalog': 'Skill Type Catalog', 'Skill Type added': 'Skill Type added', 'Skill Type deleted': 'Skill Type deleted', 'Skill Type updated': 'Skill Type updated', 'Skill Types': 'Skill Types', 'Skill added': 'Skill added', 'Skill deleted': 'Skill deleted', 'Skill removed': 'Skill removed', 'Skill updated': 'Skill updated', 'Skills': '技能', 'Skills Details': 'Skills Details', 'Skills added': '技能已新增', 'Skills deleted': 'Skills deleted', 'Skills updated': '技能已更新', 'Sorry - the server has a problem, please try again later.': '抱歉,伺服器有問題,請稍候再試。', 'Spanish': '西班牙文', 'Specific Area (e.g. Building/Room) within the Location that this Person/Group is seen.': '在地點內看到此個人 / 團體的特定區域 (例如建築物 / 房間)。', 'Specifications': '規格', 'Specify a descriptive title for the image.': '為影像加上描述性標題。', 'Staff': '工作人員', 'Stand for 1 Hour': '站 1 小時', 'Stand for 2 Hours': '站 2 小時', 'Stand for 3 Hours': '站 3 小時', 'Start': '開始', 'Start Date': '開始日期', 'Start date': '開始日期', 'State': '州', 'Status': '狀態', 'Still Required': '仍需要', 'Strategy': '策略', 'Street Address': '街道地址', 'Strong': '強', 'Style': '樣式', 'Style Field': '樣式欄位', 'Style Values': '樣式值', 'Subject': '主旨', 'Submit': '送出', 'Subsector Details': 'Subsector Details', 'Subsector added': 'Subsector added', 'Subsector deleted': 'Subsector deleted', 'Subsector updated': 'Subsector updated', 'Subsectors': 'Subsectors', 'Support the City of Los Angeles': '支持 Los Angeles 市', 'Surplus Item Deleted': 'Surplus Item Deleted', 'Surplus Item Details': 'Surplus Item Details', 'Surplus Item Recoded': 'Surplus Item Recoded', 'Surplus Item Updated': 'Surplus Item Updated', 'Surplus Items': 'Surplus Items', 'Sweeper': '清潔工', 'Symbology': '符號', 'Synchronization': 'Synchronization', 'Synchronization mode': '同步化模式', 'Table name of the resource to synchronize': '要同步化的資源表格名稱', 'Tagalog': 'Tagalog', 'Task': '任務', 'Task Details': '任務詳情', 'Teaching': '教學', 'Team Leader': '組長', 'Telephone Work': '電話工作', 'Tells GeoServer to do MetaTiling which reduces the number of duplicate labels.': '告訴 GeoServer 做 MetaTiling,減少重複標籤的數量。', 'Tertiary Server (Optional)': '第三伺服器 (選擇性)', 'Thank you for Volunteering. Please print out your Volunteer Assignment Form as it contains important information about who, when, and where to report to for your Volunteer Assignment.': '謝謝您志願服務。請印出您的志工任務分派表,因為其中包含有關您的志工任務分派應向誰報到、報到的時間和地點等重要資訊。', 'Thank you for validating your email. Your user account is still pending for approval by the system administator (%s).You will get a notification by email when your account is activated.': '謝謝您確認電子郵件。您的使用者帳號仍在等待系統管理者 (%s) 核准。您會在帳號啟用時收到電子郵件通知。', 'Thanks for your assistance': '謝謝您的協助', 'The Administrative offices of the Emergency Management Department are located at': '急難管理局的行政辦公室位置', 'The City of Los Angeles has the following Requests for Volunteers.': 'Los Angeles 市有下列志工需求。', 'The City of Los Angeles is neither responsible nor liable for any viruses or other contamination of your system nor for any delays, inaccuracies, errors or omissions arising out of your use of the Site or with respect to the material contained on the Site, including without limitation, any material posted on the Site. This site and all materials contained on it are distributed and transmitted "as is" without warranties of any kind, either express or implied, including without limitation, warranties of title or implied warranties of merchantability or fitness for a particular purpose. The City of Los Angeles is not responsible for any special, indirect, incidental or consequential damages that may arise from the use of, or the inability to use, the site and/or the materials contained on the site whether the materials contained on the site are provided by the City of Los Angeles, or a third party': 'Los Angeles 市不負責亦不承擔因使用本網站所致或與網站資料 (包括但不限於任何發布於網站的資料) 相關的病毒或其他對您系統的污染,或任何延遲、不準確、錯誤或疏漏。本網站和其中所有資料均「按現狀」散布和傳輸,不提供任何種類的明示和暗示保證,包括但不限於所有權保證或可售性或特定目的合適性的暗示保證。Los Angeles 市不負責任何可能因使用或不能使用網站和 (或) 網站資料而引起的特殊、間接、隨附或衍生性損害,無論網站資料是否由 Los Angeles 市或第三方提供。', 'The City of Los Angeles prefers cash donations. In-kind items can be donated directly to the organization(s) listed under Donate Items or through any Upcoming Donation Drive on the %(donate)s': 'Los Angeles 市鼓勵以現金捐款為主。實物可直接捐給捐贈物品之下所列的組織,或透過在 %(donate)s 上的近期捐助活動捐贈。', 'The City only collects personally identifiable information that is required to provide service. You can decline to provide us with any personal information on any site on the Internet at any time. However, if you should choose to withhold requested information, we may not be able to provide you with the online services dependent upon the collection of that information.': '本市僅收集提供服務時所需的個人識別資訊。您任何時候都可以拒絕在網路上任何網站提供任何個人資訊給我們。不過,如果您選擇不提供所需資訊,我們也許無法為您提供必須透過收集該資訊方可提供的線上服務。', 'The Current Location of the Person/Group, which can be general (for Reporting) or precise (for displaying on a Map). Enter a few characters to search from available locations.': '個人/團體的目前位置,可以是籠統的 (供報告用) 或是精準的 (供地圖顯示用)。輸入幾個字元,從可用位置搜尋。', "The Donor(s) for this project. Multiple values can be selected by holding down the 'Control' key.": '此專案的捐贈者。按下「Control」鍵可選取多個值。', 'The Email Address to which approval requests are sent (normally this would be a Group mail rather than an individual). If the field is blank then requests are approved automatically if the domain matches.': '要求核准的電子郵件收件地址 (通常是群組而非個人郵件)。如果此欄位空白,只要網域相符便會自動核准要求。', 'The Location the Person has come from, which can be general (for Reporting) or precise (for displaying on a Map). Enter a few characters to search from available locations.': '個人的出發位置,可以是一般 (供報告用) 或精準 (供地圖顯示用)。輸入幾個字元,從可用位置搜尋。', 'The Location the Person is going to, which can be general (for Reporting) or precise (for displaying on a Map). Enter a few characters to search from available locations.': '個人的目標位置,可以是籠統的 (供報告用) 或是精準的 (供地圖顯示用)。輸入幾個字元,從可用位置搜尋。', 'The Los Angeles Emergency Preparedness Foundation is a registered 501C-3 non-profit and authorized by the City of Los Angeles as the official foundation supporting emergency preparedness efforts in Los Angeles.': 'Los Angeles Emergency Preparedness Foundation 是登記在案的 501C-3 非營利組織,經 Los Angeles 市授權成為支持 Los Angeles 急難準備的官方基金會。', 'The Los Angeles Fire Department Community Emergency Response Training Program (CERT), has been educating the citizens of Los Angeles in Disaster Preparedness since 1987.': 'Los Angeles 消防局社區應急反應訓練方案 (CERT) 自 1987 年以來便一直在災害準備上教育 Los Angeles 的民眾。', "The URL of the image file. If you don't upload an image file, then you must specify its location here.": '影像檔案的網址。若不上傳影像檔案,則須在此指定其位置。', 'The URL to access the service.': '存取服務的網址。', 'The Volunteer Center of Los Angeles (VCLA) is one of the largest civic action centers in the nation. We are the volunteer hub that connects people, communities, resources and businesses across Los Angeles. Our mission is to change lives and communities by connecting volunteers with community needs to make Los Angeles a safer, greener, healthier and more hopeful place to live and work.': 'Los Angeles 志工中心 (VCLA) 是全國最大的市民行動中心之一。我們是志工的樞紐,連繫整個 Los Angeles 的民眾、社區、資源和企業。我們的任務是要藉著將志工與社區的需要連結在一起,改善生活和社區,使得 Los Angeles 成為更安全、更環保、更健康、更充滿希望的生活工作地方。', 'The attribute which is used for the title of popups.': '快顯視窗標題使用的屬性。', 'The best way to assist during a disaster is to make a monetary donation; however, donations of gently used household goods and clothing can be accepted. The Salvation cannot guarantee that any individual gifts-in-kind donated now will be sent to the disaster area. In time of disaster, our stores fill these needs from existing, pre-sorted stock. By continuing to donate gently-used household goods to your local Salvation Army store, you not only help your community, you help us prepare for future disaster relief needs.': '災害期間最好的協助就是捐款;不過,也能接受狀況良好的家庭用品和衣物。Salvation 無法保證現在捐贈的任何個別物資都能運送到災區。災害期間,我們的分站會先用預先分類好的現有庫存物資來滿足相關需求。持續捐贈狀況良好的家庭用品到您當地的 Salvation Army 分站,不僅能幫助您的社區,也幫助我們為日後的賑災需求做好準備。', 'The default Facility for which you are acting.': '您所代理的預設機構。', 'The default Organization for whom you are acting.': '您所代理的預設組織。', 'The first or only name of the person (mandatory).': '該個人的名字或唯一名字 (必填)。', 'The language you wish the site to be displayed in.': '您希望網站顯示的語言。', 'The list of Brands are maintained by the Administrators.': '品牌清單由管理員維護。', 'The list of Catalogs are maintained by the Administrators.': '目錄清單由管理員維護。', 'The minimum number of characters is ': '最少字元數為 ', 'The minimum number of features to form a cluster.': '形成叢集的功能數下限。', 'The name to be used when calling for or directly addressing the person (optional).': '打電話或直接稱呼該個人時使用的姓名 (非必填)。', 'The number of Units of Measure of the Alternative Items which is equal to One Unit of Measure of the Item': '替代物品的計量單位數,等於該物品的一個計量單位。', 'The number of Units of Measure of the Alternative Resources which is equal to One Unit of Measure of the Resource': 'The number of Units of Measure of the Alternative Resources which is equal to One Unit of Measure of the Resource', 'The number of pixels apart that features need to be before they are clustered.': '叢集之前,功能所需的像素間隔數。', 'The number of tiles around the visible map to download. Zero means that the 1st page loads faster, higher numbers mean subsequent panning is faster.': '要下載的可見地圖周圍的底圖數。零表示第 1 頁載入較快,數字愈大表示隨後的平移愈快。', 'The purpose of the Public Health Emergency Volunteer (PHEV) Network is to increase the coordination and collaboration with established community volunteer units that are willing to assist the Department of Public Health in responding to public health emergencies by creating a system to engage, train, and deploy these groups.': '公共衛生急難志工 (PHEV) 網絡的宗旨在於,增加與願意協助公共衛生部因應公共衛生急難之既有社區志工單位的協調與合作,其方法為建立一套系統以整合、訓練並部署這些團體。', 'The spirit of philanthropy is an integral part of Los Angeles culture. %(give2la)s is a great way for individuals, groups, and organizations interested in volunteering to help worthy causes and efforts before, during, and after an emergency. Please register to receive notifications of future Requests for Volunteers and to apply for requests online.': '樂善好施是 Los Angeles 文化的重要組成部分。%(give2la)s 是一條最好的管道,讓有心參與志願工作的個人、團體和組織,能在急難前、中、後協助慈善事業和活動。請註冊,以便未來能收到志工需求通知並在線上申請相關工作。', 'The time at which the Event started.': '活動開始的時間。', 'The time difference between UTC and your timezone, specify as +HHMM for eastern or -HHMM for western timezones.': 'UTC 和您的時區之間的時差,向東時區以 +HHMM 表示,向西時區以 -HHMM 表示。', 'The way in which an item is normally distributed': '物品的一般分發方式', 'Then click %(commit)s.': '然後點選 %(commit)s。', 'Then click %(form)s and take them with you to your Volunteer Assignment.': '然後點選 %(form)s,並帶著表格到志工任務分派的服務地點。', 'Then click %(save)s': '然後點選 %(save)s', 'There is no address for this person yet. Add new address.': 'There is no address for this person yet. Add new address.', 'There was a problem, sorry, please try again later.': '很抱歉,剛才有個問題。請稍候再試。', 'These need to be added in Decimal Degrees.': '這些均須以十進制增加。', 'This email address is already in use': '此電子郵件地址已被使用', 'This field is required.': '此欄位必須填寫。', 'This link will open a new browser window.': '此連結將開啟新的瀏覽器視窗。', 'This setting can only be controlled by the Administrator.': '本設定只能由管理員控制。', 'Tickets': 'Tickets', 'Tiled': '分割', 'Time that Roster was emailed': '電子郵件發送名冊的時間', 'Time until Goods can be available for donation.': 'Time until Goods can be available for donation.', 'Timestamp': '時間戳記', 'Title': '標題', 'To Location': '至位置', 'To Person': '到個人', 'To select a Volunteer Task, click on %(apply)s.': '欲選取志工任務,請點選 %(apply)s。', 'Too Short': '太短', 'Total Beneficiaries': '總受益人', 'Total Requested': '總需求', 'Total Value of Vouchers': '抵用券的總價值', 'Tour Guide': '導遊', 'Training Details': 'Training Details', 'Training added': 'Training added', 'Training deleted': 'Training deleted', 'Training updated': 'Training updated', 'Trainings': 'Trainings', 'Transit Status': '載運狀態', 'Translator - Chinese': '翻譯人員 - 中文', 'Translator - English': '翻譯人員 - 英文', 'Translator - Japanese': '翻譯人員 - 日文', 'Translator - Korean': '翻譯人員 - 韓文', 'Translator - Spanish': '翻譯人員 - 西班牙文', 'Translator - Tagalog': '翻譯人員 - 塔加洛文', 'Translator - Vietnamese': '翻譯人員 - 越南文', 'Transparent?': '透明?', 'Transportation Required': '交通運輸需求', 'Truck Driving': '卡車駕駛', 'Twitter': 'Twitter', 'Twitter ID or #hashtag': 'Twitter ID 或 #hashtag', 'Type': '類型', 'Type of Donation': '捐贈類型', "Type the first few characters of one of the Person's names.": '輸入該個人姓氏或名字之一的前幾個字元。', 'URL': '網址', 'UTC Offset': 'UTC 偏移量', 'Unable to send email': '無法發送電子郵件', 'Under Warranty': '保固期間', 'Under which condition a local record shall be updated if it also has been modified locally since the last synchronization': '如果本機紀錄從上次同步化以來已有修正,什麼情況下本機紀錄也應該更新', 'Under which conditions local records shall be updated': '本機紀錄在哪些條件下應該更新', 'Unit': '單位', 'Unit of Measure': '計量單位', 'Units': '單位', 'Unsafe Password Word!': '這個密碼不安全!', 'Unsatisfactory': '不滿意', 'Upcoming Donation Drives': '近期捐助活動', 'Update Emergency Contact': '更新緊急聯絡人', 'Update Method': '更新方法', 'Update Policy': '更新政策', 'Update Profile': '更新基本資料', 'Update Skills': '更新技能', 'Upload a CSV file formatted according to the Template.': '上傳按照範本格式化的 CSV 檔案。 ', 'Upload an image file here.': '在此上傳影像。', "Upload an image file here. If you don't upload an image file, then you must specify its location in the URL field.": '在此上傳影像。若不上傳影像檔案,則須在網址欄位註明其位置。', 'Used in onHover Tooltip & Cluster Popups to differentiate between types.': '用於 onHover 工具提示和叢集快顯視窗,以區分類型。', 'Used to build onHover Tooltip & 1st field also used in Cluster Popups to differentiate between records.': '用於建立 onHover 工具提示且第 1 個欄位也用在叢集快顯視窗,以區分紀錄。', 'User %(id)s Logged-in': '使用者 %(id)s 已登入', 'User %(id)s Logged-out': '使用者 %(id)s 已登出', 'User %(id)s Password reset': '使用者 %(id)s 密碼已重設', 'User %(id)s Profile updated': '使用者 %(id)s 基本資料已更新', 'User %(id)s Registered': '使用者 %(id)s 已註冊', 'User ID': '使用者 ID', 'User Profile': '使用者基本資料', 'Username': '使用者名稱', 'Username to use for authentication at the remote site': '在遠端網站驗證用的使用者名稱', 'Users': 'Users', 'Uses the REST Query Format defined in': '使用 REST 查詢格式,定義來源', 'VOLUNTEER': '志工', 'Value': '值', 'Value ($) per Unit': '每單位價值 ($)', 'Verification Status': '確認狀態', 'Verify Password': '確認密碼', 'Version': '版本', 'Very Strong': '非常強', 'Very Weak': '非常弱', 'Veterinary Services': '獸醫服務', 'Vietnamese': '越南文', 'Volume (m3)': '體積 (立方公尺)', 'Volume Collected (cub. ft)': '收集的體積 (立方呎)', 'Volunteer': '志工', 'Volunteer Application': '志工申請', 'Volunteer Assignment': '志工任務分派', 'Volunteer Assignment Details': '志工任務分派詳情', 'Volunteer Center of Los Angeles': 'Los Angeles 志工中心', 'Volunteer Comments': '志工意見', 'Volunteer Evaluation': '志工評估', 'Volunteer List': 'Volunteer List', 'Volunteer Los Angeles, a service of Assistance League of Southern California, is committed to building a strong, viable network of concerned and compassionate people who believe volunteer action creates needed change and elevates our sense of community. Through two key programs, we partner closely with local government and nonprofits to support both health care workers as well as spontaneous, unaffiliated volunteers who want to serve in times of disaster.': 'Volunteer Los Angeles 是 Assistance League of Southern California 的服務之一,致力為相信志工行動可創造必要的改變並提高群體意識的熱心和善心人士,建立一個強大且能持續發展的網路。我們利用兩個主要方案,與地方政府和非營利組織密切合作,藉此在災害發生時支持健康照護工作者以及自動自發提供服務的獨立志工。', 'Volunteer Management': 'Volunteer Management', 'Volunteer Roster - Attendance': '志工名冊 - 出席', 'Volunteering Location': '志願服務地點', 'Volunteers': 'Volunteers', 'Volunteers Management': '志工管理', 'Volunteers added to Request': 'Volunteers added to Request', 'Volunteers removed from Request': 'Volunteers removed from Request', 'Voucher Comments': '抵用券註釋', 'Warehouse Support': '倉儲支援', 'We have tried': '我們已試過', 'Weak': '弱', 'Website': '網站', 'Weight (kg)': '重量 (公斤) ', 'Weight Collected (lbs)': '收集的重量 (磅)', 'Welcome to the %(system_name)s Portal at %(base_url)s. Thanks for your assistance.': '歡迎蒞臨 %(base_url)s 的 %(system_name)s 入口網站。感謝您的協助。', 'Well-Known Text': '眾所周知的文字', 'What is the Privacy policy of Give2LA?': 'Give2LA 的隱私權政策是什麼? ', 'What is the process for donating in-kind Items?': '捐贈實物的流程為何?', 'What order to be contacted in.': '聯絡順序', 'When a disaster happens, the generosity of volunteers makes the difference whether they take time to perform tasks such as filling sandbags for residents in flood areas, assisting in a Local Assistance Center, packing first-aid supplies, or helping unload trucks at a local donation center. When you volunteer it makes a difference no matter how much time you can %(give2la)s.': '災害發生時,無論是花時間執行任何任務,例如為淹水地區的居民堆沙包、協助當地援助中心、打包急救用品,或在當地捐助中心幫忙卡車卸貨,志工的慷慨義助都能發揮莫大的作用。無論您能給 %(give2la)s 多少時間,您的志願付出都能有所助益。', 'When you volunteer with Give2LA, you are an extension of the good will of the City of Los Angeles. For many survivors, volunteers are their first point of contact. Your respect, courtesy, and sensitivity during these difficult times are vital. In addition, following directions, procedures, and processes given to you by your supervisor are essential; failure to do so may exclude you from future volunteer assignments.': '參與 Give2LA 志願工作,您就是 Los Angeles 市慈善精神的延伸。對許多倖存者來說,志工是他們的第一個接觸點。在艱困的時候,您的尊重、禮貌和體貼十分關鍵。此外,遵循指導人的指示、程序和流程非常重要;否則,未來可能會被排除在志工任務分派之外。', 'Whether to accept unsolicited data transmissions from the repository': '是否在未經要求的情況下,接受存放庫的資料傳輸', 'Which methods to apply when importing data to the local repository': '資料匯入本機存放庫時應套用的方法', 'Why would you give to the City of Los Angeles?': '您為什麼要捐贈給 Los Angeles 市?', 'Why?': '理由?', 'Width (m)': '寬度 (公尺) ', 'Will I get any food or reimbursements for expenses while volunteering?': '志工服務期間我會得到任何餐飲或開銷的補償嗎?', 'Work Number': 'Work Number', 'Work phone': '工作電話', 'World Vision is a Christian humanitarian organization dedicated to working with children, families, and their communities worldwide to reach their full potential by tackling the causes of poverty and injustice.': 'World Vision 是基督教人道主義組織,致力從解決全球貧困和不公正的根源著手,協助兒童、家庭和社區充分發揮他們的潛力。', 'Would you work with this volunteer again?': '您會再與此志工合作嗎?', 'Year of Manufacture': '生產年份', 'Yes, but your friend must also %(register)s and apply to the same Volunteer Assignment.': '可以,但您的朋友也必須 %(register)s 並申請同一個志工任務分派。', "Yes, you can donate cash to the %(laepf)s who support the City of Los Angeles or other partner organizations listed on the %(donate)s. These links will take you directly to the organization's website to complete the cash donation transaction.": '可以。您可以捐贈現金給支援 Los Angeles 市的 %(laepf)s,或捐給 %(donate)s 所列的其他夥伴組織。點選連接便會直接連到該組織的網站,讓您完成捐款交易。', 'Yes, you have to be at least 18 years of age to Volunteer.': '是的,您必須至少 18 歲才能擔任志工。', 'Yes. After you have signed-in, follow these steps:': '是的。登入後,請遵循以下步驟:', 'Yes. All donations are tax deductible. The partner organization that receives your donation will provide a receipt for your donation. Please make sure you obtain your tax receipt from the organization and keep it in a safe place for tax purposes. The City of Los Angeles will not issue receipts for your donation.': '可以。 所有捐款均可扣稅。 收到捐款的夥伴組織將開立捐款收據給您。請務必向該組織索取抵稅收據並妥善存放,以供報稅時使用。Los Angeles 市不會開立捐款收據給您。', 'Yes. You must be a U.S. citizen, legal U.S. resident, or have gained legal entry into the United States.': '是的。您必須是美國公民、美國合法居民或合法入境美國。', 'You': '您', 'You are assigned to another request during this time period': '這段期間您被分派至另一個志工需求', 'You can apply by clicking the %(signin)s link located on the top of the web page.': '您可以點選網頁上方的 %(signin)s 連結進行申請。', 'You can donate your time by becoming a volunteer to aid survivors of disasters or local emergencies.': '您可以捐出時間擔任志工,援助災害或地方緊急情況的倖存者。', 'You can support our preparedness, response and recovery activities by making a monetary donation or by donating goods and services.': '您可以捐款、捐贈貨品和服務,支持我們的災害準備、應變和復原活動。', 'You do not have permission for any facility to make a request.': '您沒有得到使用任何機構的許可,因而無法提出需求。', "You have unsaved changes. Click Cancel now, then 'Save' to save them. Click OK now to discard them.": '您有變更內容尚未儲存。先點選取消,再點選「儲存」以儲存變更的內容。現在點選確定以放棄變更。', "You may also search for a skill by providing the first few characters in the search box. (Example: When searching for 'Driving' skills, enter the first letters of the word).": '您也能在搜尋方塊中輸入技能的前幾個字元,進行搜尋。(例如:搜尋「駕駛」技能時,可輸入第一個字元)。', "You may also update your Emergency Contacts information by clicking on 'Emergency Contacts' located on the left menu.": '您也可以點選左邊功能表的「緊急聯絡人」,更新緊急聯絡人的資訊。', 'You must comply with all program regulations': '您必須遵守所有方案規定', 'You must subscribe to the loyalty oath': '您必須宣誓效忠', 'Your application for this Volunteer Assignment has been successful': '您已成功申請此志工任務分派', 'Your application has been successfully withdrawn': '您已成功撤銷您的申請', 'ZIP Code': '郵遞區號', 'Zero Hour': '零小時', 'Zip': '郵遞區號', 'Zip is required': '郵遞區號為必填', 'Zoom Levels': '縮放比例', 'access granted': '授予的存取權', 'by %(person)s': '%(person)s 經辦', 'enter a number between %(min)g and %(max)g': '輸入介於 %(min)g 和 %(max)g 之間的數字', 'enter a value': '輸入一個值 ', 'enter an integer between %(min)g and %(max)g': '輸入介於 %(min)g 和 %(max)g 之間的整數', 'form data': '表格資料', 'getting': '取得', "if you provide your Cell phone then you can choose to subscribe to SMS notifications by selecting 'My Profile' once you have completed registration.": '如果您提供手機號碼,完成註冊後,您就可以選擇「我的基本資料」來訂閱 SMS 通知。', 'in Inv.': 'in Inv.', 'invalid expression': '無效的運算式', 'items selected': '選取項目', 'maxExtent': 'maxExtent', 'maxResolution': 'maxResolution', 'no options available': 'no options available', 'on %(date)s': '在 %(date)s', 'piece': '件數', 'program regulations': '方案規定', 'register': '註冊', 'retry': '重試', 'search': '搜尋', 'select all that apply': '選取所有適用項目', 'times and it is still not working. We give in. Sorry.': '次,但仍然沒有作用。我們放棄了。抱歉。', 'value already in database or empty': 'value already in database or empty', '電子郵件無效': '電子郵件無效', }
#Faça um programa que leia a largura e a altura de uma parede #em metros, calcule a sua área e a quantidade de tinta necessaria #para pinta-la, sabendo que cada litro de tinta, pinta uma area #de 2m² alt = float(input('Digite a altura: ')) lar = float(input('Digite a largura: ')) print('A quantida de tinta para pintar {}m² é de {} litros'.format(alt*lar, (alt*lar)/2))
""" 2675 : 문자열 반복 URL : https://www.acmicpc.net/problem/2675 Input : 2 3 ABC 5 /HTP Output : AAABBBCCC /////HHHHHTTTTTPPPPP """ T = int(input()) for _ in range(T): R, S = input().split() R = int(R) P = "" for s in S: P += (s * R) print(P)
OEMBED_URL_SCHEME_REGEXPS = { 'slideshare' : r'https?://(?:www\.)?slideshare\.(?:com|net)/.*', 'soundcloud' : r'https?://soundcloud.com/.*', 'vimeo' : r'https?://(?:www\.)?vimeo\.com/.*', 'youtube' : r'https?://(?:(www\.)?youtube\.com|youtu\.be)/.*', } OEMBED_BASE_URLS = { 'slideshare' : 'https://www.slideshare.net/api/oembed/2?url=%(url)s', 'soundcloud' : 'https://soundcloud.com/oembed?url=%(url)s&format=json', 'vimeo' : 'https://vimeo.com/api/oembed.json?url=%(url)s&maxwidth=400&maxheight=350', 'youtube' : 'https://www.youtube.com/oembed?url=%(url)s&format=json', }
X, M = tuple(map(int,input().split())) while X != 0 or M != 0: print(X*M) X, M = tuple(map(int,input().split()))
##HEADING: [PROBLEM NAME] #PROBLEM STATEMENT: """ [PROBLEM STATEMENT LINE1] [PROBLEM STATEMENT LINE1] [PROBLEM STATEMENT LINE1] """ #SOLUTION-1: ([METHOD DESCRIPTION LIKE BRUTE_FORCE, DP_ALGORITHM, GREEDY_ALGORITHM, ITERATIVE_ALGORITHM, RECURSIVE_ALGORITHM]) --> [TIME COMPLEXITY LIKE O(n), O(log2(n)), O(n^2), O(sqrt(n)), O(n/2)==O(n), O(n/3)==O(n)] #SOLUTION-2: ([METHOD DESCRIPTION LIKE BRUTE_FORCE, DP_ALGORITHM, GREEDY_ALGORITHM, ITERATIVE_ALGORITHM, RECURSIVE_ALGORITHM]) --> [TIME COMPLEXITY LIKE O(n), O(log2(n)), O(n^2), O(sqrt(n)), O(n/2)==O(n), O(n/3)==O(n)] #SOLUTION-3: ([METHOD DESCRIPTION LIKE BRUTE_FORCE, DP_ALGORITHM, GREEDY_ALGORITHM, ITERATIVE_ALGORITHM, RECURSIVE_ALGORITHM]) --> [TIME COMPLEXITY LIKE O(n), O(log2(n)), O(n^2), O(sqrt(n)), O(n/2)==O(n), O(n/3)==O(n)] #SOLUTION-4: ([METHOD DESCRIPTION LIKE BRUTE_FORCE, DP_ALGORITHM, GREEDY_ALGORITHM, ITERATIVE_ALGORITHM, RECURSIVE_ALGORITHM]) --> [TIME COMPLEXITY LIKE O(n), O(log2(n)), O(n^2), O(sqrt(n)), O(n/2)==O(n), O(n/3)==O(n)] #DESCRIPTION: """ [##DISCLAIMER: POINT TO BE NOTED BEFORE JUMPING INTO DESCRIPTION] [DESCRIPTION LINE1] [DESCRIPTION LINE2] [DESCRIPTION LINE3] [DESCRIPTION LINE4] [DESCRIPTION LINE5] [DESCRIPTION LINE6] [DESCRIPTION LINE7] [DESCRIPTION LINE8] [ADDITIONAL POINTS TO BE NOTED] [FURTHER MODIFICATIONS TO ALGORITHM] [NOTE: 1] [NOTE: 2] """ #APPLICATION-1: ([APPLICATION PROBLEM STATEMENT]) --> [TIME COMPLEXITY LIKE O(n), O(log2(n)), O(n^2), O(sqrt(n)), O(n/2)==O(n), O(n/3)==O(n)] #APPLICATION-2: ([APPLICATION PROBLEM STATEMENT]) --> [TIME COMPLEXITY LIKE O(n), O(log2(n)), O(n^2), O(sqrt(n)), O(n/2)==O(n), O(n/3)==O(n)] #DESCRIPTION: """ [DESCRIPTION LINE1] [DESCRIPTION LINE2] [DESCRIPTION LINE3] [DESCRIPTION LINE4] [DESCRIPTION LINE5] [NOTE: 1] """ #RELATED ALGORITHMS: """ -[RELATED ALGORITHM1] -[RELATED ALGORITHM2] -[RELATED ALGORITHM3] """
FLAG = 'QCTF{4e94227c6c003c0b6da6f81c9177c7e7}' def check(attempt, context): return Checked(attempt.answer == FLAG)
''' Created on Mar 3, 2014 @author: rgeorgi ''' class EvalException(Exception): ''' classdocs ''' def __init__(self, msg): ''' Constructor ''' self.message = msg class POSEvalException(Exception): def __init__(self, msg): Exception.__init__(self, msg)
class Solution: def lengthOfLastWord(self, s: str) -> int: n=0 last=0 for c in s: if c==" ": last=n if n>0 else last n=0 else: n=n+1 return n if n>0 else last
# -*- coding: utf-8 -*- # see LICENSE.rst # ---------------------------------------------------------------------------- # # TITLE : Data # AUTHOR : Nathaniel and Qing and Vivian # PROJECT : JAS1101FinalProject # # ---------------------------------------------------------------------------- """Data Management. Often data is packaged poorly and it can be difficult to understand how the data should be read. DON`T PANIC. This module provides functions to read the contained data. Routine Listings ---------------- """ __author__ = "Nathaniel and Qing and Vivian" # __credits__ = [""] # __all__ = [ # "" # ] ############################################################################### # IMPORTS ############################################################################### # CODE ############################################################################### # ------------------------------------------------------------------------ ############################################################################### # END
class BaseClause: def __init__(self): # call super as these classes will be used as mix-in # and we want the init chain to reach all extended classes in the user of these mix-in # Update: Its main purpose is to make IDE hint children constructors to call base one, # as not calling it in an overridden constructor breaks the chain. But not having a # constructor at all doesn't break it, it rather continues with the next defined # constructor in the chain. super().__init__()
"""Display system message.""" def display_exit_message(): """Display exit message and return a user choice.""" print("Tapez la lettre \"q\" pour confirmez l'arrêt de l'application : ") return input()
class RandomVariable: """ Basic class for random variable distribution """ def __init__(self): """ self.parameter is a dict for parameters in distribution """ self.parameter = {} def fit(self): pass def ml(self): pass def map(self): pass def bayes(self): pass def pdf(self): pass def sample(self): pass
#!/usr/bin/python # -*- coding: utf-8 -*- """This file is part of the Scribee project. """ __author__ = 'Emanuele Bertoldi <[email protected]>' __copyright__ = 'Copyright (c) 2011 Emanuele Bertoldi' __version__ = '0.0.1' def filter(block): block.filtered = '\n'.join([l.strip().replace('/*', "").replace("*/", "").strip(" *") for l in block.filtered.splitlines()])
""" https://leetcode.com/problems/reverse-integer/description/ """ class Solution: def reverse(self, x: int) -> int: # sign = -1 if x < 0 else 1 sign = [1, -1][x < 0] num = sign * x num_str = str(num) out = 0 for i in range(len(num_str))[::-1]: if out > (2 ** 31 - 1): return 0 out += 10 ** i * int(num_str[i]) return sign * out def reverse2(self, x: int) -> int: sign = [1, -1][x < 0] out = sign * int(str(abs(x))[::-1]) return out if -(2 ** 31) - 1 < out < 2 ** 31 else 0 if __name__ == '__main__': s = Solution() assert s.reverse(123) == 321 assert s.reverse(-123) == -321 assert s.reverse(120) == 21 assert s.reverse(100) == 1 assert s.reverse(2 ** 31) == 0 assert s.reverse(1534236496) == 0 assert s.reverse2(123) == 321 assert s.reverse2(-123) == -321 assert s.reverse2(120) == 21 assert s.reverse2(100) == 1 assert s.reverse2(2 ** 31) == 0 assert s.reverse(1534236496) == 0
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Title """ __author__ = "Hiroshi Kajino <[email protected]>" __copyright__ = "Copyright IBM Corp. 2019, 2021" MultipleRun_params = { 'DataPreprocessing_params': { 'in_dim': 50, 'train_size': 100, 'val_size': 100, 'test_size': 500}, 'Train_params': { 'model_kwargs': {'@alpha': [1e-4, 1e-3, 1e-2, 1e-1], '@fit_intercept': [True, False]} }, 'PerformanceEvaluation_params': {} }
# -*- coding: utf-8 -*- """ Name:LAVOE YAWA JENNIFER Stud. ID: 20653245 """ class Point ( object ): def __init__ (self , x, y): self .x = x self .y = y def __str__ ( self ): return f"({ self .x},{ self .y})" def __sub__ (self , other ): dx = self .x - other .x dy = self .y - other .y return dx , dy
# Exercise 1 # Напишете програма, която намира лицето на геометрична фигура като първо се въвежда вида на фигурата: # 1- квадрат # 2-правоъгълник # 3- прав.триъгълник # За пресмятане на лицето на отделните фигури да се напишат подходящи функции. def square(a): area = a*a return area def rectangle(a, b): area = a*b return area def triangle(a, h): area = (a*h)/2 return area x = input("Enter shape: ") if x.lower() == "square": a = int(input("Enter a: ")) square(a) elif x.lower() == "rectangle": a = int(input("Enter a: ")) b = int(input("Enter b: ")) rectangle(a, b) elif x.lower() == "triangle": a = int(input("Enter a: ")) h = int(input("Enter h: ")) triangle(a, h) # Exercise 2 # Напишете потребителска функция, проверяваща дали число е палиндром. # Функцията получава като аргумент число, връща като резултат 1, ако числото е палиндром и 0 ако числото не е палиндром. # Пример: 121 def palindrom(): x = input("Enter number: ") y = x[::-1] if x == y: return(bool(True)) else: return(bool(False)) print(palindrom()) # Exercise 3 # Програма, която реализира калкулатор за цели числа. Действията които изпълнява са : # Събиране + # Изваждане – # Умножение * # Деление / # Потребителя въвежда вида на операцията. # После въвежда две числа и резултата се извежда на екрана . Реализирайте отделни функции за отделните операции. operation = input("Choose operation(add, subtract, multiply, devide): ") a = int(input("Enter the first number: ")) b = int(input("Enter the second number: ")) def add(a, b): return a+b def subtract(a, b): return a-b def multiply(a, b): return a*b def devide(a, b): if b == 0: return("You can't devide by zero") else: return a/b if operation.lower() == "add": print(add(a, b)) elif operation.lower() == "subtract": print(subtract(a, b)) elif operation.lower() == "multiply": print(multiply(a, b)) elif operation.lower() == "devide": print(devide(a, b))
def get_breadcrumb(cat3): cat2 = cat3.parent cat1 = cat3.parent.parent cat1.url = cat1.goodschannel_set.all()[0].url breadcrumb = { 'cat1': cat1, 'cat2': cat2, 'cat3': cat3, } return breadcrumb
# -*- coding: utf-8 -*- i = int(input('Podaj i')) j = int(input('Podaj j')) print(i, j) if i ** j > j ** i: print(i ** j, " większe") elif j ** i > i ** j: print(j ** i, " większe") else: print("Są równe")
""" Crie um programa que gerencie o aproveitamento de um jogador de futebol. O programa vai ler o nome do jogador e quantas partidas ele jogou. Depois vai ler a quantidade de gols feitos em cada partida. No final, tudo isso será guarda- do em um dicionário, incluindo o total de gols feitos durante o campeonato. """ jogador = dict() jogador['nome'] = str(input('Nome do Jogador: ')).strip() partidas = int(input(f'Quantas partidas {jogador["nome"]} jogou? ')) gols = list() cont = 0 for i in range(0, partidas): gols.append(int(input(f'Quantos gols na partida {i}: '))) cont += gols[i] jogador['gols'] = gols[:] jogador['total'] = cont print(30*'-=') for k, v in jogador.items(): print(f'O campo {k} tem o valor {v}') print(30*'-=') print(f'O jogador {jogador["nome"]} jogou {partidas} partidas') for i in range(0, partidas): print(f' => Na partida {i}, fez {gols[i]} gols') print(f'Foi um total de {jogador["total"]} gols.')
class DynamicObjectSerializer: def __init__(self, value, many=False): self._objects = None self._object = None if many: value = tuple(v for v in value) self._objects = value else: self._object = value @property def objects(self): return self._objects @property def object(self): return self._object @property def data(self): if self.objects: return [self.to_dict(obj) for obj in self._objects] else: return self.to_dict(self._object) def to_dict(self, entity): data = {} for field in self.Meta.fields: if hasattr(entity, field): data[field] = getattr(entity, field) return data
myTup = 0, 2, 4, 5, 6, 7 i1, *i2, i3 = myTup print(i1) print(i2, type(i2)) print(i3)
""" Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Input: [1,3,5,4,7] Output: 3 Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3. Even though [1,3,5,7] is also an increasing subsequence, it's not a continuous one where 5 and 7 are separated by 4. Example 2: Input: [2,2,2,2,2] Output: 1 Explanation: The longest continuous increasing subsequence is [2], its length is 1. Note: Length of the array will not exceed 10,000. """ class Solution: def findLengthOfLCIS(self, nums): """ :type nums: List[int] :rtype: int """ """ Method 1: * Every (continuous) increasing subsequence is disjoint. * Keep an index pointer, a main counter and a temp counter for each subarray * As long as nums[index-1] < nums[index], keep incrementing the counter Your runtime beats 65.05 % of python3 submissions """ # #Handle boundary conditions if not nums: return 0 # #Initialize variables index = 1 count = -1 tempCount = 1 while index < len(nums): if nums[index - 1] < nums[index]: tempCount += 1 else: count = max(count, tempCount) tempCount = 1 index += 1 count = max(count, tempCount) return count
class Color: BACKGROUND = 236 FOREGROUND = 195 BUTTON_BACKGROUND = 66 FIELD_BACKGROUND = 238 #241 SCROLL_BAR_BACKGROUND = 242 TEXT = 1 INPUT_FIELD = 2 SCROLL_BAR = 3 BUTTON = 4 # color.py
def smallest_positive(arr): # Find the smallest positive number in the list min = None for num in arr: if num > 0: if min == None or num < min: min = num return min def when_offered(courses, course): output = [] for semester in courses: for course_names in courses[semester]: if course_names == course: output.append(semester) return output if __name__ == "__main__": choice = int(input("Which Program to execute? Smallest Positives (1) OR Offered Semester (2) [Numeric entry] ")) if choice == 1: testcases = dict(test1= [4, -6, 7, 2, -4, 10], test2= [.2, 5, 3, -.1, 7, 7, 6], test3= [-6, -9, -7], test4= [], test5= [88.22, -17.41, -26.53, 18.04, -44.81, 7.52, 0.0, 20.98, 11.76]) for key in testcases: print("Output for {} : {}". format(key,smallest_positive(testcases[key]))) if choice == 2: courses = { 'spring2020': {'cs101': {'name': 'Building a Search Engine', 'teacher': 'Dave', 'assistant': 'Peter C.'}, 'cs373': {'name': 'Programming a Robotic Car', 'teacher': 'Sebastian', 'assistant': 'Andy'}}, 'fall2020': {'cs101': {'name': 'Building a Search Engine', 'teacher': 'Dave', 'assistant': 'Sarah'}, 'cs212': {'name': 'The Design of Computer Programs', 'teacher': 'Peter N.', 'assistant': 'Andy', 'prereq': 'cs101'}, 'cs253': {'name': 'Web Application Engineering - Building a Blog', 'teacher': 'Steve', 'prereq': 'cs101'}, 'cs262': {'name': 'Programming Languages - Building a Web Browser', 'teacher': 'Wes', 'assistant': 'Peter C.', 'prereq': 'cs101'}, 'cs373': {'name': 'Programming a Robotic Car', 'teacher': 'Sebastian'}, 'cs387': {'name': 'Applied Cryptography', 'teacher': 'Dave'}}, 'spring2044': {'cs001': {'name': 'Building a Quantum Holodeck', 'teacher': 'Dorina'}, 'cs003': {'name': 'Programming a Robotic Robotics Teacher', 'teacher': 'Jasper'}, } } testcase = dict(test1= 'cs101', test2= 'bio893') for key in testcase: print("Output for {}: {}".format(key,when_offered(courses, testcase[key])))
def my_abs(x): if not isinstance(x, (int, float)): raise TypeError('bad operand type') if x >= 0: return x else: return -x
while True: a, b = map(int, input().split(" ")) if not a and not b: break print(a + b)
class Solution: """ @param x: An integer @return: The sqrt of x """ def sqrt(self, x): if x < 1: return 0 l, r = 1, x//2 + 1 while r > l: mid = (l + r) // 2 square = mid * mid if square > x: r = mid - 1 elif square < x: l = mid + 1 else: return mid if r * r > x: return r - 1 return r
class LetterFrequencyPair: def __init__(self, letter: str, frequency: int): self.letter: str = letter self.frequency: int = frequency def __str__(self): return '{}:{}'.format(self.letter, self.frequency) class HTreeNode: pass print(LetterFrequencyPair('A', 23))
class HashMap: def __init__(self, size): self.array_size = size self.array = [None] * size def hash(self, key, count_collisions = 0): return sum(key.encode()) + count_collisions def compressor(self, hash_code): return hash_code % self.array_size def assign(self, key, value): chosen_index = self.compressor(self.hash(key)) current_array_value = self.array[chosen_index] if not current_array_value: self.array[chosen_index] = [key, value] else: if current_array_value[0] == key: self.array[chosen_index][1] = value else: number_of_collisions = 1 while current_array_value != key: new_hash_code = self.hash(key, number_of_collisions) new_array_index = self.compressor(new_hash_code) new_array_value = self.array[new_array_index] if not new_array_value: self.array[new_array_index] = [key, value] return if new_array_value[0] == key: new_array_value[1] = value return number_of_collisions += 1 def retrieve(self, key): potential_index = self.compressor(self.hash(key)) possible_return_value = self.array[potential_index] if not possible_return_value: return None else: if possible_return_value[0] == key: return possible_return_value[1] else: retrieval_collisions = 1 while possible_return_value[0] != key: new_hash_code = self.hash(key, retrieval_collisions) retrieving_array_index = self.compressor(new_hash_code) possible_return_value = self.array[retrieving_array_index] if not possible_return_value: return None if possible_return_value[0] == key: return possible_return_value[1] retrieval_collisions += 1 flower_definitions = [['begonia', 'cautiousness'], ['chrysanthemum', 'cheerfulness'], ['carnation', 'memories'], ['daisy', 'innocence'], ['hyacinth', 'playfulness'], ['lavender', 'devotion'], ['magnolia', 'dignity'], ['morning glory', 'unrequited love'], ['periwinkle', 'new friendship'], ['poppy', 'rest'], ['rose', 'love'], ['snapdragon', 'grace'], ['sunflower', 'longevity'], ['wisteria', 'good luck']] h = HashMap(len(flower_definitions)) for i in flower_definitions: h.assign(i[0], i[1]) print(h.retrieve("daisy")) print(h.retrieve("magnolia")) print(h.retrieve("carnation")) print(h.retrieve("morning glory"))
info = { "%%fem-with-a": { "0": "a;", "1": "­una;", "(2, 'inf')": "=%%msco-with-a=;" }, "%%fem-with-i": { "0": "i;", "1": "­una;", "(2, 'inf')": "=%%msco-with-i=;" }, "%%fem-with-o": { "0": "o;", "1": "o­una;", "(2, 'inf')": "=%%msco-with-o=;" }, "%%lenient-parse": { "(0, 'inf')": "&[last primary ignorable ] << ' ' << ',' << '-' << '­';" }, "%%msc-no-final": { "(0, 19)": "=%spellout-cardinal-masculine=;", "(20, 29)": "vent>%%msc-with-i-nofinal>;", "(30, 39)": "trent>%%msc-with-a-nofinal>;", "(40, 49)": "quarant>%%msc-with-a-nofinal>;", "(50, 59)": "cinquant>%%msc-with-a-nofinal>;", "(60, 69)": "sessant>%%msc-with-a-nofinal>;", "(70, 79)": "settant>%%msc-with-a-nofinal>;", "(80, 89)": "ottant>%%msc-with-a-nofinal>;", "(90, 99)": "novant>%%msc-with-a-nofinal>;", "(100, 199)": "cent>%%msc-with-o-nofinal>;", "(200, 'inf')": "<<­cent>%%msc-with-o-nofinal>;" }, "%%msc-with-a": { "0": "a;", "1": "­un;", "(2, 'inf')": "=%%msco-with-a=;" }, "%%msc-with-a-nofinal": { "(0, 2)": "=%%msc-with-a=;", "3": "a­tre;", "(4, 'inf')": "=%%msc-with-a=;" }, "%%msc-with-i": { "0": "i;", "1": "­un;", "(2, 'inf')": "=%%msco-with-i=;" }, "%%msc-with-i-nofinal": { "(0, 2)": "=%%msc-with-i=;", "3": "a­tre;", "(4, 'inf')": "=%%msc-with-i=;" }, "%%msc-with-o": { "0": "o;", "1": "o­uno;", "2": "o­due;", "3": "o­tré;", "(4, 7)": "o­=%spellout-numbering=;", "8": "­otto;", "(9, 79)": "o­=%spellout-numbering=;", "(80, 89)": "­=%spellout-numbering=;", "(90, 'inf')": "o­=%spellout-numbering=;" }, "%%msc-with-o-nofinal": { "(0, 2)": "=%%msc-with-o=;", "3": "o­tre;", "(4, 'inf')": "=%%msc-with-o=;" }, "%%msco-with-a": { "0": "a;", "1": "­uno;", "2": "a­due;", "3": "a­tré;", "(4, 7)": "a­=%spellout-numbering=;", "8": "­otto;", "(9, 'inf')": "a­nove;" }, "%%msco-with-i": { "0": "i;", "1": "­uno;", "2": "i­due;", "3": "i­tré;", "(4, 7)": "i­=%spellout-numbering=;", "8": "­otto;", "(9, 'inf')": "i­nove;" }, "%%msco-with-o": { "0": "o;", "1": "o­uno;", "2": "o­due;", "3": "o­tré;", "(4, 7)": "o­=%spellout-numbering=;", "8": "­otto;", "(9, 79)": "o­=%spellout-numbering=;", "(80, 89)": "­=%spellout-numbering=;", "(90, 'inf')": "o­=%spellout-numbering=;" }, "%%ordinal-esima": { "0": "sima;", "1": "­unesima;", "2": "­duesima;", "3": "­treesima;", "4": "­quattresima;", "5": "­cinquesima;", "6": "­seiesima;", "7": "­settesima;", "8": "­ottesima;", "9": "­novesima;", "(10, 'inf')": "=%spellout-ordinal-feminine=;" }, "%%ordinal-esima-with-a": { "0": "esima;", "1": "­unesima;", "2": "a­duesima;", "3": "a­treesima;", "4": "a­quattresima;", "5": "a­cinquesima;", "6": "a­seiesima;", "7": "a­settesima;", "8": "­ottesima;", "9": "a­novesima;", "(10, 'inf')": "=%spellout-ordinal-feminine=;" }, "%%ordinal-esima-with-i": { "0": "esima;", "1": "­unesima;", "2": "i­duesima;", "3": "i­treesima;", "4": "i­quattresima;", "5": "i­cinquesima;", "6": "i­seiesima;", "7": "i­settesima;", "8": "­ottesima;", "9": "i­novesima;", "(10, 'inf')": "=%spellout-ordinal-feminine=;" }, "%%ordinal-esima-with-o": { "0": "esima;", "1": "­unesima;", "2": "o­duesima;", "3": "o­treesima;", "4": "o­quattresima;", "5": "o­cinquesima;", "6": "o­seiesima;", "7": "o­settesima;", "8": "­ottesima;", "9": "o­novesima;", "(10, 'inf')": "o­=%spellout-ordinal-feminine=;" }, "%%ordinal-esimo": { "0": "simo;", "1": "­unesimo;", "2": "­duesimo;", "3": "­treesimo;", "4": "­quattresimo;", "5": "­cinquesimo;", "6": "­seiesimo;", "7": "­settesimo;", "8": "­ottesimo;", "9": "­novesimo;", "(10, 'inf')": "=%spellout-ordinal-masculine=;" }, "%%ordinal-esimo-with-a": { "0": "esimo;", "1": "­unesimo;", "2": "a­duesimo;", "3": "a­treesimo;", "4": "a­quattresimo;", "5": "a­cinquesimo;", "6": "a­seiesimo;", "7": "a­settesimo;", "8": "­ottesimo;", "9": "a­novesimo;", "(10, 'inf')": "=%spellout-ordinal-masculine=;" }, "%%ordinal-esimo-with-i": { "0": "esimo;", "1": "­unesimo;", "2": "i­duesimo;", "3": "i­treesimo;", "4": "i­quattresimo;", "5": "i­cinquesimo;", "6": "i­seiesimo;", "7": "i­settesimo;", "8": "­ottesimo;", "9": "i­novesimo;", "(10, 'inf')": "=%spellout-ordinal-masculine=;" }, "%%ordinal-esimo-with-o": { "0": "esimo;", "1": "­unesimo;", "2": "o­duesimo;", "3": "o­treesimo;", "4": "o­quattresimo;", "5": "o­cinquesimo;", "6": "o­seiesimo;", "7": "o­settesimo;", "8": "­ottesimo;", "9": "o­novesimo;", "(10, 'inf')": "o­=%spellout-ordinal-masculine=;" }, "%spellout-cardinal-feminine": { "0": "zero;", "1": "una;", "(2, 19)": "=%spellout-numbering=;", "(20, 29)": "vent>%%fem-with-i>;", "(30, 39)": "trent>%%fem-with-a>;", "(40, 49)": "quarant>%%fem-with-a>;", "(50, 59)": "cinquant>%%fem-with-a>;", "(60, 69)": "sessant>%%fem-with-a>;", "(70, 79)": "settant>%%fem-with-a>;", "(80, 89)": "ottant>%%fem-with-a>;", "(90, 99)": "novant>%%fem-with-a>;", "(100, 199)": "cent>%%fem-with-o>;", "(200, 999)": "<<­cent>%%fem-with-o>;", "(1000, 1999)": "mille[­>>];", "(2000, 999999)": "<%%msc-no-final<­mila[­>>];", "(1000000, 1999999)": "un milione[ >>];", "(2000000, 999999999)": "<%spellout-cardinal-masculine< milioni[ >>];", "(1000000000, 1999999999)": "un miliardo[ >>];", "(2000000000, 999999999999)": "<%spellout-cardinal-masculine< miliardi[ >>];", "(1000000000000, 1999999999999)": "un bilione[ >>];", "(2000000000000, 999999999999999)": "<%spellout-cardinal-masculine< bilioni[ >>];", "(1000000000000000, 1999999999999999)": "un biliardo[ >>];", "(2000000000000000, 999999999999999999)": "<%spellout-cardinal-masculine< biliardi[ >>];", "(1000000000000000000, 'inf')": "=#,##0=;" }, "%spellout-cardinal-masculine": { "0": "zero;", "1": "un;", "(2, 19)": "=%spellout-numbering=;", "(20, 29)": "vent>%%msc-with-i>;", "(30, 39)": "trent>%%msc-with-a>;", "(40, 49)": "quarant>%%msc-with-a>;", "(50, 59)": "cinquant>%%msc-with-a>;", "(60, 69)": "sessant>%%msc-with-a>;", "(70, 79)": "settant>%%msc-with-a>;", "(80, 89)": "ottant>%%msc-with-a>;", "(90, 99)": "novant>%%msc-with-a>;", "(100, 199)": "cent>%%msc-with-o>;", "(200, 999)": "<<­cent>%%msc-with-o>;", "(1000, 1999)": "mille[­>>];", "(2000, 999999)": "<%%msc-no-final<­mila[­>>];", "(1000000, 1999999)": "un milione[ >>];", "(2000000, 999999999)": "<%spellout-cardinal-masculine< milioni[ >>];", "(1000000000, 1999999999)": "un miliardo[ >>];", "(2000000000, 999999999999)": "<%spellout-cardinal-masculine< miliardi[ >>];", "(1000000000000, 1999999999999)": "un bilione[ >>];", "(2000000000000, 999999999999999)": "<%spellout-cardinal-masculine< bilioni[ >>];", "(1000000000000000, 1999999999999999)": "un biliardo[ >>];", "(2000000000000000, 999999999999999999)": "<%spellout-cardinal-masculine< biliardi[ >>];", "(1000000000000000000, 'inf')": "=#,##0=;" }, "%spellout-numbering": { "0": "zero;", "1": "uno;", "2": "due;", "3": "tre;", "4": "quattro;", "5": "cinque;", "6": "sei;", "7": "sette;", "8": "otto;", "9": "nove;", "10": "dieci;", "11": "undici;", "12": "dodici;", "13": "tredici;", "14": "quattordici;", "15": "quindici;", "16": "sedici;", "17": "diciassette;", "18": "diciotto;", "19": "diciannove;", "(20, 29)": "vent>%%msco-with-i>;", "(30, 39)": "trent>%%msco-with-a>;", "(40, 49)": "quarant>%%msco-with-a>;", "(50, 59)": "cinquant>%%msco-with-a>;", "(60, 69)": "sessant>%%msco-with-a>;", "(70, 79)": "settant>%%msco-with-a>;", "(80, 89)": "ottant>%%msco-with-a>;", "(90, 99)": "novant>%%msco-with-a>;", "(100, 199)": "cent>%%msco-with-o>;", "(200, 999)": "<<­cent>%%msco-with-o>;", "(1000, 1999)": "mille[­>>];", "(2000, 999999)": "<%%msc-no-final<­mila[­>>];", "(1000000, 1999999)": "un milione[ >>];", "(2000000, 999999999)": "<%spellout-cardinal-masculine< milioni[ >>];", "(1000000000, 1999999999)": "un miliardo[ >>];", "(2000000000, 999999999999)": "<%spellout-cardinal-masculine< miliardi[ >>];", "(1000000000000, 1999999999999)": "un bilione[ >>];", "(2000000000000, 999999999999999)": "<%spellout-cardinal-masculine< bilioni[ >>];", "(1000000000000000, 1999999999999999)": "un biliardo[ >>];", "(2000000000000000, 999999999999999999)": "<%spellout-cardinal-masculine< biliardi[ >>];", "(1000000000000000000, 'inf')": "=#,##0=;" }, "%spellout-numbering-year": { "(0, 'inf')": "=%spellout-numbering=;" }, "%spellout-ordinal-feminine": { "0": "zeresima;", "1": "prima;", "2": "seconda;", "3": "terza;", "4": "quarta;", "5": "quinta;", "6": "sesta;", "7": "settima;", "8": "ottava;", "9": "nona;", "10": "decima;", "11": "undicesima;", "12": "dodicesima;", "13": "tredicesima;", "14": "quattordicesima;", "15": "quindicesima;", "16": "sedicesima;", "17": "diciassettesima;", "18": "diciottesima;", "19": "diciannovesima;", "(20, 29)": "vent>%%ordinal-esima-with-i>;", "(30, 39)": "trent>%%ordinal-esima-with-a>;", "(40, 49)": "quarant>%%ordinal-esima-with-a>;", "(50, 59)": "cinquant>%%ordinal-esima-with-a>;", "(60, 69)": "sessant>%%ordinal-esima-with-a>;", "(70, 79)": "settant>%%ordinal-esima-with-a>;", "(80, 89)": "ottant>%%ordinal-esima-with-a>;", "(90, 99)": "novant>%%ordinal-esima-with-a>;", "(100, 199)": "cent>%%ordinal-esima-with-o>;", "(200, 999)": "<%spellout-cardinal-feminine<­cent>%%ordinal-esima-with-o>;", "(1000, 1999)": "mille­>%%ordinal-esima>;", "2000": "<%spellout-cardinal-feminine<­mille­>%%ordinal-esima>;", "(2001, 999999)": "<%spellout-cardinal-feminine<­mila­>%%ordinal-esima>;", "(1000000, 1999999)": "milione­>%%ordinal-esima>;", "(2000000, 999999999)": "<%spellout-cardinal-feminine<milione­>%%ordinal-esima>;", "(1000000000, 1999999999)": "miliard­>%%ordinal-esima-with-o>;", "(2000000000, 999999999999)": "<%spellout-cardinal-feminine<miliard­>%%ordinal-esima-with-o>;", "(1000000000000, 1999999999999)": "bilione­>%%ordinal-esima>;", "(2000000000000, 999999999999999)": "<%spellout-cardinal-feminine<bilion­>%%ordinal-esima>;", "(1000000000000000, 1999999999999999)": "biliard­>%%ordinal-esima-with-o>;", "(2000000000000000, 999999999999999999)": "<%spellout-cardinal-feminine<biliard­>%%ordinal-esima-with-o>;", "(1000000000000000000, 'inf')": "=#,##0=;" }, "%spellout-ordinal-masculine": { "0": "zeresimo;", "1": "primo;", "2": "secondo;", "3": "terzo;", "4": "quarto;", "5": "quinto;", "6": "sesto;", "7": "settimo;", "8": "ottavo;", "9": "nono;", "10": "decimo;", "11": "undicesimo;", "12": "dodicesimo;", "13": "tredicesimo;", "14": "quattordicesimo;", "15": "quindicesimo;", "16": "sedicesimo;", "17": "diciassettesimo;", "18": "diciottesimo;", "19": "diciannovesimo;", "(20, 29)": "vent>%%ordinal-esimo-with-i>;", "(30, 39)": "trent>%%ordinal-esimo-with-a>;", "(40, 49)": "quarant>%%ordinal-esimo-with-a>;", "(50, 59)": "cinquant>%%ordinal-esimo-with-a>;", "(60, 69)": "sessant>%%ordinal-esimo-with-a>;", "(70, 79)": "settant>%%ordinal-esimo-with-a>;", "(80, 89)": "ottant>%%ordinal-esimo-with-a>;", "(90, 99)": "novant>%%ordinal-esimo-with-a>;", "(100, 199)": "cent>%%ordinal-esimo-with-o>;", "(200, 999)": "<%spellout-cardinal-masculine<­cent>%%ordinal-esimo-with-o>;", "(1000, 1999)": "mille­>%%ordinal-esimo>;", "2000": "<%spellout-cardinal-masculine<­mille­>%%ordinal-esimo>;", "(2001, 999999)": "<%spellout-cardinal-masculine<­mila­>%%ordinal-esimo>;", "(1000000, 1999999)": "milione­>%%ordinal-esimo>;", "(2000000, 999999999)": "<%spellout-cardinal-masculine<milione­>%%ordinal-esimo>;", "(1000000000, 1999999999)": "miliard­>%%ordinal-esimo-with-o>;", "(2000000000, 999999999999)": "<%spellout-cardinal-masculine<miliard­>%%ordinal-esimo-with-o>;", "(1000000000000, 1999999999999)": "bilione­>%%ordinal-esimo>;", "(2000000000000, 999999999999999)": "<%spellout-cardinal-masculine<bilion­>%%ordinal-esimo>;", "(1000000000000000, 1999999999999999)": "biliard­>%%ordinal-esimo-with-o>;", "(2000000000000000, 999999999999999999)": "<%spellout-cardinal-masculine<biliard­>%%ordinal-esimo-with-o>;", "(1000000000000000000, 'inf')": "=#,##0=;" } }
""" Contains a collection of useful functions when working with strings. """ def shorten_to(string: str, length: int, extension: bool = False): """ When a user uploaded a plugin with a pretty long file/URL name, it is useful to crop this file name to avoid weird UI behavior. This method takes a string (in this example the file name) and shortens it to the given length. If your string is a URL or link name, it will be cut to the given length and '...' will be appended indicating that this string has been shortened. If your string is a file name, only the middle part will be replaced by '...', so that the user is able to see the file extension of the file they are about to download. :param string: The string to shorten. :param length: The length to shorten the string to. :param extension: Whether this string represents a file name that contains a file extension. In this case, the file extension won't be cropped so that the user can see which file they are about to download. :return: The shortened string ("SuperNicePlugin.jar" -> 'Super...in.jar') """ if len(string) > length: if extension: ext = string.split(".")[-1] str_only = ".".join(string.split(".")[0:-1]) parts_len = round((length - 3 - len(ext)) / 2) return f"{str_only[0:parts_len]}...{str_only[-parts_len:]}.{ext}" return f"{string[0:length-3]}..." return string
def solution(n): n = str(n) if len(n) % 2 != 0: return False n = list(n) a,b = n[:len(n)//2], n[len(n)//2:] a,b = list(map(int, a)), list(map(int, b)) return sum(a) == sum(b)
def number(lines): """ Your team is writing a fancy new text editor and you've been tasked with implementing the line numbering. Write a function which takes a list of strings and returns each line prepended by the correct number. The numbering starts at 1. The format is n: string. Notice the colon and space in between. """ return [f'{index}: {value}' for index, value in enumerate(lines, 1)]
# Copyright 2022 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. """A wrapper for common operations on a device with Cast capabilities.""" CAST_BROWSERS = [ 'platform_app' ]
def main(): while True: userinput = input("Write something (quit ends): ") if(userinput == "quit"): break else: tester(userinput) def tester(givenstring="Too short"): if(len(givenstring) < 10): print("Too short") else: print(givenstring) if __name__ == "__main__": main()
df = pd.read_csv(DATA, delimiter=';') df[['EV1', 'EV2', 'EV3']] = df['Participants'].str.split(', ', expand=True) df['Duration'] = pd.to_timedelta(df['Duration']) result = (pd.concat([ df[['EV1', 'Duration']].rename(columns={'EV1': 'Astronaut'}), df[['EV2', 'Duration']].rename(columns={'EV2': 'Astronaut'}), df[['EV3', 'Duration']].rename(columns={'EV3': 'Astronaut'}) ], axis='rows') .groupby('Astronaut') .sum() .sort_values('Duration', ascending=False))
class Solution: def hasValidPath(self, grid): def dfs(x, y, d): if x == m or y == n: return True if grid[x][y] == 1: if d == 1: return dfs(x, y + 1, d) elif d == 3: return dfs(x, y - 1, d) elif grid[x][y] == 2: if d == 0: return dfs(x + 1, y, d) elif d == 2: return dfs(x - 1, y, d) elif grid[x][y] == 3: if d == 1: return dfs(x + 1, y, 0) elif d == 2: return dfs(x, y - 1, 3) elif grid[x][y] == 4: if d == 3: return dfs(x + 1, y, 0) elif d == 2: return dfs(x, y + 1, 1) elif grid[x][y] == 5: if d == 1: return dfs(x - 1, y, 2) elif d == 0: return dfs(x, y - 1, 3) elif grid[x][y] == 6: if d == 3: return dfs(x - 1, y, 2) elif d == 0: return dfs(x, y + 1, 1) return False m, n = len(grid), len(grid[0]) if m == 1 and n == 1: return True elif grid[0][0] == 5: return False elif grid[0][0] in [1, 6]: return n >= 2 and dfs(0, 1, 1) elif grid[0][0] in [2, 3]: return m >= 2 and dfs(1, 0, 0) elif grid[0][0] == 4: return n >= 2 and dfs(0, 1, 1) or m >= 1 and dfs(1, 0, 0)
class Solution(object): def trap(self, height): """ :type height: List[int] :rtype: int """ sum, max, maxIndex = 0, -1, -1 for i, h in enumerate(height): if max < h: max = h maxIndex = i prev = 0 for i in range(maxIndex): if height[i] > prev: sum += (height[i] - prev) * (maxIndex - i) prev = height[i] sum -= height[i] prev = 0 for i in range(len(height) - 1, maxIndex, -1): if height[i] > prev: sum += (height[i] - prev) * (i - maxIndex) prev = height[i] sum -= height[i] return sum
class fabrica: def __init__(self, tiempo, nombre, ruedas): self.tiempo = tiempo self.nombre = nombre self.ruedas = ruedas print("se creo el auto", self.nombre) def __str__(self): return "{}({})".format(self.nombre, self.tiempo) class listado: # autos = []# lista que contiene lso datos def __init__(self,autos=[]): # constructor self.autos = autos def agregar(self, obj): self.autos.append(obj) # agrego obj def mirar(self): for obj in self.autos: print(obj) a = fabrica(20, "automovil",4) # clase listado l = listado([a]) l.mirar() l.agregar(fabrica(123,"segundo",4)) l.mirar()
n1 = int(input('digite um valor: ')) n2 = int(input('digite outro valor: ')) s = n1 + n2 m = n1 * n2 p = n1 ** n2 print(f'a soma vale {s}, a mult vale {m}, e a potencia vale {p}', end=', ') print('testando end')
def make_diamond(letter): """ makes a diamond from the given letter :return: a diamond :rtype: list """ diamond = None # count how far the letter is from A and use that as counter size = ord(letter.upper()) - ord('A') for i in range(size, -1, -1): # gets 1 half of the top of the diamond half_row = ' ' * i + chr(i + ord('A')) + ' ' * (size - i) # gets the bottom half of the diamond row = ''.join(half_row[:0:-1]) + half_row if diamond: diamond = [row] + diamond + [row] else: diamond = [row] return "\n".join(diamond) + "\n"
file_name = 'data/PacMan.png' reader = itk.ImageFileReader.New(FileName=file_name) smoother = itk.RecursiveGaussianImageFilter.New(Input=reader.GetOutput()) smoother.SetSigma(5.0) smoother.Update() view(smoother.GetOutput(), ui_collapsed=True)
soma = 0 for n in range(1, 7): num = (int(input('Informe o {} valor: '.format(n)))) if num % 2 == 0: soma = soma + num print('A soma dos numeros pares é {}.'.format(soma))
# -*- coding: utf-8 -*- __all__ = ['Microblog', 'MICROBLOG_SESSION_PROFILE'] MICROBLOG_SESSION_PROFILE = 'mic_profile_session' class Microblog(object): def __init__(self): self.profile = None
# https://leetcode.com/problems/binary-tree-postorder-traversal/ # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: # DFS def postorderTraversal(self, root: TreeNode) -> List[int]: stack, res = [root], [] while stack: node = stack.pop() if node: res.append(node.val) stack.append(node.left) stack.append(node.right) return res[::-1] class Solution: # Visited flag def postorderTraversal(self, root: TreeNode) -> List[int]: traversal, stack = [], [(root, False)] while stack: node, visited = stack.pop() if node: if visited: traversal.append(node.val) else: stack.append((node, True)) stack.append((node.right, False)) stack.append((node.left, False)) return traversal def postorderTraversal1(self, root): # recursively res = [] self.dfs(root, res) return res def dfs(self, root, res): if root: self.dfs(root.left, res) self.dfs(root.right, res) res.append(root.val)
#!/usr/bin/env python # -*- coding:utf-8 -*- # file:codeblocktemplate.py # author:Nathan # datetime:2021/8/26 11:16 # software: PyCharm """ Code block template file for service layer code """ class CodeBlockTemplate(object): """ Code block template class for service layer code """ service_import = """import math from app import db from controller.{table_name}Controller import {table_name_initials_upper}Controller from models.{table_name}Model import {table_name_initials_upper}{foreign_import} from utils import commons from utils.response_code import RET from utils.loggings import loggings """ single_filter_condition = """ if kwargs.get('{colums_name}'): filter_list.append(cls.{colums_name} == kwargs.get('{colums_name}')) """ join_statement = '.join({target_table}, {table_name_initials_upper}.{table_key} == {target_table}.{target_key})' exception_return = "{'code': RET.DBERR, 'message': '数据库异常,获取信息失败', 'error': str(e)}" notdata_return = "{'code': RET.NODATA, 'message': '查无信息', 'error': '查无信息'}" success_return = "{'code': RET.OK, 'message': '查询成功', 'count': count, 'pages': pages, 'data': results}"
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc") def stardoc_for_prov(doc_prov): """Defines a `stardoc` target for a document provider. Args: doc_prov: A `struct` as returned from `providers.create()`. Returns: None. """ stardoc( name = doc_prov.name, out = doc_prov.out_basename, header_template = doc_prov.header_basename, input = doc_prov.stardoc_input, symbol_names = doc_prov.symbols, deps = doc_prov.deps, ) def stardoc_for_provs(doc_provs): """Defines a `stardoc` for each of the provided document providers. Args: doc_provs: A `list` of document provider `struct` values as returned from `providers.create()`. Returns: None. """ [ stardoc_for_prov( doc_prov = doc_prov, ) for doc_prov in doc_provs if doc_prov.is_stardoc ]
class Node(object): def __init__(self, data): self.data = data self.next = None def push(head, data): node = Node(data) node.next = head return node def build_one_two_three(): return push(push(Node(3), 2), 1)
""" Given two lists, find and print the elements that are present in both lists. For example: if given the list L1 = [a, b, c, d] and L2 = [a, c, e, f] then your program should output: "a c". """ def remove_elements(list1, list2): """ Returns a list with the repeated elements of the two lists """ removed_elements = [] for element in list1: if element in list2: removed_elements.append(element) # UNCOMMENT THE FOLLOWINF TO ALSO REMOVE THE REPEATED ELEMENTS IN THE LIST # list1.remove(element) # list2.remove(element) return removed_elements def main(): L1 = ["a", "b", "c", "d"] L2 = ["a", "c", "e", "f"] removed = remove_elements(L1, L2) for i in removed: print(i) # print(L1) # print(L2) if __name__ == "__main__": main()
string = "a" * ITERATIONS # --- for char in string: pass
# Tool Types BRACKEN = 'bracken_abundance_estimation' KRAKEN = 'kraken_taxonomy_profiling' KRAKENHLL = 'krakenhll_taxonomy_profiling' METAPHLAN2 = 'metaphlan2_taxonomy_profiling' HMP_SITES = 'hmp_site_dists' MICROBE_CENSUS = 'microbe_census' AMR_GENES = 'align_to_amr_genes' RESISTOME_AMRS = 'resistome_amrs' READ_CLASS_PROPS = 'read_classification_proportions' READ_STATS = 'read_stats' MICROBE_DIRECTORY = 'microbe_directory_annotate' ALPHA_DIVERSITY = 'alpha_diversity_stats' BETA_DIVERSITY = 'beta_diversity_stats' HUMANN2 = 'humann2_functional_profiling' HUMANN2_NORMALIZED = 'humann2_normalize_genes' METHYLS = 'align_to_methyltransferases' VFDB = 'vfdb_quantify' MACROBES = 'quantify_macrobial' ANCESTRY = 'human_ancestry'
A = [0] B = [0] C = [0] # change your R here R = [16.6] for i in range(1,4): # For A print("V"+str(i)+"(A) = max(0.8(-1+γ("+str(B[i-1])+")) + 0.2(-1+γ("+str(A[i-1])+"))," + "0.8(-1+γ("+str(C[i-1])+")) + 0.2(-1+γ("+str(A[i-1])+"))") print("= max(" + str( (0.8*(-1+(0.2*B[i-1]))) + 0.2*(-1+(0.2*A[i-1])) ) +" , "+ str((0.8*(-1+(0.2*C[i-1]))) + 0.2*(-1+(0.2*A[i-1]))) + ")") A.append(max((0.8*(-1+(0.2*B[i-1]))) + 0.2*(-1+(0.2*A[i-1])) , (0.8*(-1+(0.2*C[i-1]))) + 0.2*(-1+(0.2*A[i-1])))) print("A = "+str(A[i])) print("V"+str(i)+"(B) = max(0.8(-1+γ("+str(A[i-1])+")) + 0.2(-1+γ("+str(B[i-1])+"))," + "0.8(-4+γ("+str(R[0])+")) + 0.2(-1+γ("+str(B[i-1])+"))") print("= max(" + str( (0.8*(-1+(0.2*A[i-1]))) + 0.2*(-1+(0.2*B[i-1])) ) +" , "+ str((0.8*(-4+(0.2*R[0]))) + 0.2*(-1+(0.2*B[i-1])))+ ")") B.append( max((0.8*(-1+(0.2*A[i-1]))) + 0.2*(-1+(0.2*B[i-1])) , (0.8*(-4+(0.2*R[0]))) + 0.2*(-1+(0.2*B[i-1]))) ) print("B = "+str(B[i])) print("V"+str(i)+"(C) = max(0.8(-1+γ("+str(A[i-1])+")) + 0.2(-1+γ("+str(C[i-1])+"))," + "0.25(-3+γ("+str(R[0])+")) + 0.75(-1+γ("+str(C[i-1])+"))") print("= max(" + str( (0.8*(-1+(0.2*A[i-1]))) + 0.2*(-1+(0.2*C[i-1])) ) +" , "+ str((0.25*(-3+(0.2*R[0]))) + 0.75*(-1+(0.2*C[i-1])))+ ")") C.append( max((0.8*(-1+(0.2*A[i-1]))) + 0.2*(-1+(0.2*C[i-1])) , (0.25*(-3+(0.2*R[0]))) + 0.75*(-1+(0.2*C[i-1]))) ) print("C = "+str(C[i]))
begin_unit comment|'# Copyright 2010 United States Government as represented by the' nl|'\n' comment|'# Administrator of the National Aeronautics and Space Administration.' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'# Copyright (c) 2010 Citrix Systems, Inc.' nl|'\n' comment|'# Copyright 2011 Ken Pepple' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\n' comment|'#' nl|'\n' comment|'# Unless required by applicable law or agreed to in writing, software' nl|'\n' comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT' nl|'\n' comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the' nl|'\n' comment|'# License for the specific language governing permissions and limitations' nl|'\n' comment|'# under the License.' nl|'\n' nl|'\n' string|'"""Built-in instance properties."""' newline|'\n' nl|'\n' name|'import' name|'re' newline|'\n' name|'import' name|'uuid' newline|'\n' nl|'\n' name|'from' name|'oslo_config' name|'import' name|'cfg' newline|'\n' name|'from' name|'oslo_log' name|'import' name|'log' name|'as' name|'logging' newline|'\n' name|'from' name|'oslo_utils' name|'import' name|'strutils' newline|'\n' name|'import' name|'six' newline|'\n' nl|'\n' name|'from' name|'nova' op|'.' name|'api' op|'.' name|'validation' name|'import' name|'parameter_types' newline|'\n' name|'from' name|'nova' name|'import' name|'context' newline|'\n' name|'from' name|'nova' name|'import' name|'db' newline|'\n' name|'from' name|'nova' name|'import' name|'exception' newline|'\n' name|'from' name|'nova' op|'.' name|'i18n' name|'import' name|'_' newline|'\n' name|'from' name|'nova' op|'.' name|'i18n' name|'import' name|'_LE' newline|'\n' name|'from' name|'nova' name|'import' name|'objects' newline|'\n' name|'from' name|'nova' name|'import' name|'utils' newline|'\n' nl|'\n' DECL|variable|flavor_opts name|'flavor_opts' op|'=' op|'[' nl|'\n' name|'cfg' op|'.' name|'StrOpt' op|'(' string|"'default_flavor'" op|',' nl|'\n' DECL|variable|default name|'default' op|'=' string|"'m1.small'" op|',' nl|'\n' DECL|variable|help name|'help' op|'=' string|"'Default flavor to use for the EC2 API only. The Nova API '" nl|'\n' string|"'does not support a default flavor.'" op|')' op|',' nl|'\n' op|']' newline|'\n' nl|'\n' DECL|variable|CONF name|'CONF' op|'=' name|'cfg' op|'.' name|'CONF' newline|'\n' name|'CONF' op|'.' name|'register_opts' op|'(' name|'flavor_opts' op|')' newline|'\n' nl|'\n' DECL|variable|LOG name|'LOG' op|'=' name|'logging' op|'.' name|'getLogger' op|'(' name|'__name__' op|')' newline|'\n' nl|'\n' comment|'# NOTE(luisg): Flavor names can include non-ascii characters so that users can' nl|'\n' comment|'# create flavor names in locales that use them, however flavor IDs are limited' nl|'\n' comment|'# to ascii characters.' nl|'\n' DECL|variable|VALID_ID_REGEX name|'VALID_ID_REGEX' op|'=' name|'re' op|'.' name|'compile' op|'(' string|'"^[\\w\\.\\- ]*$"' op|')' newline|'\n' nl|'\n' comment|'# NOTE(dosaboy): This is supposed to represent the maximum value that we can' nl|'\n' comment|'# place into a SQL single precision float so that we can check whether values' nl|'\n' comment|'# are oversize. Postgres and MySQL both define this as their max whereas Sqlite' nl|'\n' comment|'# uses dynamic typing so this would not apply. Different dbs react in different' nl|'\n' comment|'# ways to oversize values e.g. postgres will raise an exception while mysql' nl|'\n' comment|'# will round off the value. Nevertheless we may still want to know prior to' nl|'\n' comment|'# insert whether the value is oversize.' nl|'\n' DECL|variable|SQL_SP_FLOAT_MAX name|'SQL_SP_FLOAT_MAX' op|'=' number|'3.40282e+38' newline|'\n' nl|'\n' comment|'# Validate extra specs key names.' nl|'\n' DECL|variable|VALID_EXTRASPEC_NAME_REGEX name|'VALID_EXTRASPEC_NAME_REGEX' op|'=' name|'re' op|'.' name|'compile' op|'(' string|'r"[\\w\\.\\- :]+$"' op|',' name|'re' op|'.' name|'UNICODE' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|_int_or_none name|'def' name|'_int_or_none' op|'(' name|'val' op|')' op|':' newline|'\n' indent|' ' name|'if' name|'val' name|'is' name|'not' name|'None' op|':' newline|'\n' indent|' ' name|'return' name|'int' op|'(' name|'val' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|variable|system_metadata_flavor_props dedent|'' dedent|'' name|'system_metadata_flavor_props' op|'=' op|'{' nl|'\n' string|"'id'" op|':' name|'int' op|',' nl|'\n' string|"'name'" op|':' name|'str' op|',' nl|'\n' string|"'memory_mb'" op|':' name|'int' op|',' nl|'\n' string|"'vcpus'" op|':' name|'int' op|',' nl|'\n' string|"'root_gb'" op|':' name|'int' op|',' nl|'\n' string|"'ephemeral_gb'" op|':' name|'int' op|',' nl|'\n' string|"'flavorid'" op|':' name|'str' op|',' nl|'\n' string|"'swap'" op|':' name|'int' op|',' nl|'\n' string|"'rxtx_factor'" op|':' name|'float' op|',' nl|'\n' string|"'vcpu_weight'" op|':' name|'_int_or_none' op|',' nl|'\n' op|'}' newline|'\n' nl|'\n' nl|'\n' DECL|variable|system_metadata_flavor_extra_props name|'system_metadata_flavor_extra_props' op|'=' op|'[' nl|'\n' string|"'hw:numa_cpus.'" op|',' string|"'hw:numa_mem.'" op|',' nl|'\n' op|']' newline|'\n' nl|'\n' nl|'\n' DECL|function|create name|'def' name|'create' op|'(' name|'name' op|',' name|'memory' op|',' name|'vcpus' op|',' name|'root_gb' op|',' name|'ephemeral_gb' op|'=' number|'0' op|',' name|'flavorid' op|'=' name|'None' op|',' nl|'\n' name|'swap' op|'=' number|'0' op|',' name|'rxtx_factor' op|'=' number|'1.0' op|',' name|'is_public' op|'=' name|'True' op|')' op|':' newline|'\n' indent|' ' string|'"""Creates flavors."""' newline|'\n' name|'if' name|'not' name|'flavorid' op|':' newline|'\n' indent|' ' name|'flavorid' op|'=' name|'uuid' op|'.' name|'uuid4' op|'(' op|')' newline|'\n' nl|'\n' dedent|'' name|'kwargs' op|'=' op|'{' nl|'\n' string|"'memory_mb'" op|':' name|'memory' op|',' nl|'\n' string|"'vcpus'" op|':' name|'vcpus' op|',' nl|'\n' string|"'root_gb'" op|':' name|'root_gb' op|',' nl|'\n' string|"'ephemeral_gb'" op|':' name|'ephemeral_gb' op|',' nl|'\n' string|"'swap'" op|':' name|'swap' op|',' nl|'\n' string|"'rxtx_factor'" op|':' name|'rxtx_factor' op|',' nl|'\n' op|'}' newline|'\n' nl|'\n' name|'if' name|'isinstance' op|'(' name|'name' op|',' name|'six' op|'.' name|'string_types' op|')' op|':' newline|'\n' indent|' ' name|'name' op|'=' name|'name' op|'.' name|'strip' op|'(' op|')' newline|'\n' comment|'# ensure name do not exceed 255 characters' nl|'\n' dedent|'' name|'utils' op|'.' name|'check_string_length' op|'(' name|'name' op|',' string|"'name'" op|',' name|'min_length' op|'=' number|'1' op|',' name|'max_length' op|'=' number|'255' op|')' newline|'\n' nl|'\n' comment|'# ensure name does not contain any special characters' nl|'\n' name|'valid_name' op|'=' name|'parameter_types' op|'.' name|'valid_name_regex_obj' op|'.' name|'search' op|'(' name|'name' op|')' newline|'\n' name|'if' name|'not' name|'valid_name' op|':' newline|'\n' indent|' ' name|'msg' op|'=' name|'_' op|'(' string|'"Flavor names can only contain printable characters "' nl|'\n' string|'"and horizontal spaces."' op|')' newline|'\n' name|'raise' name|'exception' op|'.' name|'InvalidInput' op|'(' name|'reason' op|'=' name|'msg' op|')' newline|'\n' nl|'\n' comment|'# NOTE(vish): Internally, flavorid is stored as a string but it comes' nl|'\n' comment|'# in through json as an integer, so we convert it here.' nl|'\n' dedent|'' name|'flavorid' op|'=' name|'six' op|'.' name|'text_type' op|'(' name|'flavorid' op|')' newline|'\n' nl|'\n' comment|'# ensure leading/trailing whitespaces not present.' nl|'\n' name|'if' name|'flavorid' op|'.' name|'strip' op|'(' op|')' op|'!=' name|'flavorid' op|':' newline|'\n' indent|' ' name|'msg' op|'=' name|'_' op|'(' string|'"id cannot contain leading and/or trailing whitespace(s)"' op|')' newline|'\n' name|'raise' name|'exception' op|'.' name|'InvalidInput' op|'(' name|'reason' op|'=' name|'msg' op|')' newline|'\n' nl|'\n' comment|'# ensure flavor id does not exceed 255 characters' nl|'\n' dedent|'' name|'utils' op|'.' name|'check_string_length' op|'(' name|'flavorid' op|',' string|"'id'" op|',' name|'min_length' op|'=' number|'1' op|',' nl|'\n' name|'max_length' op|'=' number|'255' op|')' newline|'\n' nl|'\n' comment|'# ensure flavor id does not contain any special characters' nl|'\n' name|'valid_flavor_id' op|'=' name|'VALID_ID_REGEX' op|'.' name|'search' op|'(' name|'flavorid' op|')' newline|'\n' name|'if' name|'not' name|'valid_flavor_id' op|':' newline|'\n' indent|' ' name|'msg' op|'=' name|'_' op|'(' string|'"Flavor id can only contain letters from A-Z (both cases), "' nl|'\n' string|'"periods, dashes, underscores and spaces."' op|')' newline|'\n' name|'raise' name|'exception' op|'.' name|'InvalidInput' op|'(' name|'reason' op|'=' name|'msg' op|')' newline|'\n' nl|'\n' comment|'# NOTE(wangbo): validate attributes of the creating flavor.' nl|'\n' comment|'# ram and vcpus should be positive ( > 0) integers.' nl|'\n' comment|'# disk, ephemeral and swap should be non-negative ( >= 0) integers.' nl|'\n' dedent|'' name|'flavor_attributes' op|'=' op|'{' nl|'\n' string|"'memory_mb'" op|':' op|'(' string|"'ram'" op|',' number|'1' op|')' op|',' nl|'\n' string|"'vcpus'" op|':' op|'(' string|"'vcpus'" op|',' number|'1' op|')' op|',' nl|'\n' string|"'root_gb'" op|':' op|'(' string|"'disk'" op|',' number|'0' op|')' op|',' nl|'\n' string|"'ephemeral_gb'" op|':' op|'(' string|"'ephemeral'" op|',' number|'0' op|')' op|',' nl|'\n' string|"'swap'" op|':' op|'(' string|"'swap'" op|',' number|'0' op|')' nl|'\n' op|'}' newline|'\n' nl|'\n' name|'for' name|'key' op|',' name|'value' name|'in' name|'flavor_attributes' op|'.' name|'items' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'kwargs' op|'[' name|'key' op|']' op|'=' name|'utils' op|'.' name|'validate_integer' op|'(' name|'kwargs' op|'[' name|'key' op|']' op|',' name|'value' op|'[' number|'0' op|']' op|',' name|'value' op|'[' number|'1' op|']' op|',' nl|'\n' name|'db' op|'.' name|'MAX_INT' op|')' newline|'\n' nl|'\n' comment|'# rxtx_factor should be a positive float' nl|'\n' dedent|'' name|'try' op|':' newline|'\n' indent|' ' name|'kwargs' op|'[' string|"'rxtx_factor'" op|']' op|'=' name|'float' op|'(' name|'kwargs' op|'[' string|"'rxtx_factor'" op|']' op|')' newline|'\n' name|'if' op|'(' name|'kwargs' op|'[' string|"'rxtx_factor'" op|']' op|'<=' number|'0' name|'or' nl|'\n' name|'kwargs' op|'[' string|"'rxtx_factor'" op|']' op|'>' name|'SQL_SP_FLOAT_MAX' op|')' op|':' newline|'\n' indent|' ' name|'raise' name|'ValueError' op|'(' op|')' newline|'\n' dedent|'' dedent|'' name|'except' name|'ValueError' op|':' newline|'\n' indent|' ' name|'msg' op|'=' op|'(' name|'_' op|'(' string|'"\'rxtx_factor\' argument must be a float between 0 and %g"' op|')' op|'%' nl|'\n' name|'SQL_SP_FLOAT_MAX' op|')' newline|'\n' name|'raise' name|'exception' op|'.' name|'InvalidInput' op|'(' name|'reason' op|'=' name|'msg' op|')' newline|'\n' nl|'\n' dedent|'' name|'kwargs' op|'[' string|"'name'" op|']' op|'=' name|'name' newline|'\n' name|'kwargs' op|'[' string|"'flavorid'" op|']' op|'=' name|'flavorid' newline|'\n' comment|'# ensure is_public attribute is boolean' nl|'\n' name|'try' op|':' newline|'\n' indent|' ' name|'kwargs' op|'[' string|"'is_public'" op|']' op|'=' name|'strutils' op|'.' name|'bool_from_string' op|'(' nl|'\n' name|'is_public' op|',' name|'strict' op|'=' name|'True' op|')' newline|'\n' dedent|'' name|'except' name|'ValueError' op|':' newline|'\n' indent|' ' name|'raise' name|'exception' op|'.' name|'InvalidInput' op|'(' name|'reason' op|'=' name|'_' op|'(' string|'"is_public must be a boolean"' op|')' op|')' newline|'\n' nl|'\n' dedent|'' name|'flavor' op|'=' name|'objects' op|'.' name|'Flavor' op|'(' name|'context' op|'=' name|'context' op|'.' name|'get_admin_context' op|'(' op|')' op|',' op|'**' name|'kwargs' op|')' newline|'\n' name|'flavor' op|'.' name|'create' op|'(' op|')' newline|'\n' name|'return' name|'flavor' newline|'\n' nl|'\n' nl|'\n' DECL|function|destroy dedent|'' name|'def' name|'destroy' op|'(' name|'name' op|')' op|':' newline|'\n' indent|' ' string|'"""Marks flavor as deleted."""' newline|'\n' name|'try' op|':' newline|'\n' indent|' ' name|'if' name|'not' name|'name' op|':' newline|'\n' indent|' ' name|'raise' name|'ValueError' op|'(' op|')' newline|'\n' dedent|'' name|'flavor' op|'=' name|'objects' op|'.' name|'Flavor' op|'(' name|'context' op|'=' name|'context' op|'.' name|'get_admin_context' op|'(' op|')' op|',' name|'name' op|'=' name|'name' op|')' newline|'\n' name|'flavor' op|'.' name|'destroy' op|'(' op|')' newline|'\n' dedent|'' name|'except' op|'(' name|'ValueError' op|',' name|'exception' op|'.' name|'NotFound' op|')' op|':' newline|'\n' indent|' ' name|'LOG' op|'.' name|'exception' op|'(' name|'_LE' op|'(' string|"'Instance type %s not found for deletion'" op|')' op|',' name|'name' op|')' newline|'\n' name|'raise' name|'exception' op|'.' name|'FlavorNotFoundByName' op|'(' name|'flavor_name' op|'=' name|'name' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|get_all_flavors_sorted_list dedent|'' dedent|'' name|'def' name|'get_all_flavors_sorted_list' op|'(' name|'ctxt' op|'=' name|'None' op|',' name|'filters' op|'=' name|'None' op|',' name|'sort_key' op|'=' string|"'flavorid'" op|',' nl|'\n' name|'sort_dir' op|'=' string|"'asc'" op|',' name|'limit' op|'=' name|'None' op|',' name|'marker' op|'=' name|'None' op|')' op|':' newline|'\n' indent|' ' string|'"""Get all non-deleted flavors as a sorted list.\n """' newline|'\n' name|'if' name|'ctxt' name|'is' name|'None' op|':' newline|'\n' indent|' ' name|'ctxt' op|'=' name|'context' op|'.' name|'get_admin_context' op|'(' op|')' newline|'\n' nl|'\n' dedent|'' name|'return' name|'objects' op|'.' name|'FlavorList' op|'.' name|'get_all' op|'(' name|'ctxt' op|',' name|'filters' op|'=' name|'filters' op|',' name|'sort_key' op|'=' name|'sort_key' op|',' nl|'\n' name|'sort_dir' op|'=' name|'sort_dir' op|',' name|'limit' op|'=' name|'limit' op|',' nl|'\n' name|'marker' op|'=' name|'marker' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|get_default_flavor dedent|'' name|'def' name|'get_default_flavor' op|'(' op|')' op|':' newline|'\n' indent|' ' string|'"""Get the default flavor."""' newline|'\n' name|'name' op|'=' name|'CONF' op|'.' name|'default_flavor' newline|'\n' name|'return' name|'get_flavor_by_name' op|'(' name|'name' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|get_flavor_by_name dedent|'' name|'def' name|'get_flavor_by_name' op|'(' name|'name' op|',' name|'ctxt' op|'=' name|'None' op|')' op|':' newline|'\n' indent|' ' string|'"""Retrieves single flavor by name."""' newline|'\n' name|'if' name|'name' name|'is' name|'None' op|':' newline|'\n' indent|' ' name|'return' name|'get_default_flavor' op|'(' op|')' newline|'\n' nl|'\n' dedent|'' name|'if' name|'ctxt' name|'is' name|'None' op|':' newline|'\n' indent|' ' name|'ctxt' op|'=' name|'context' op|'.' name|'get_admin_context' op|'(' op|')' newline|'\n' nl|'\n' dedent|'' name|'return' name|'objects' op|'.' name|'Flavor' op|'.' name|'get_by_name' op|'(' name|'ctxt' op|',' name|'name' op|')' newline|'\n' nl|'\n' nl|'\n' comment|'# TODO(termie): flavor-specific code should probably be in the API that uses' nl|'\n' comment|'# flavors.' nl|'\n' DECL|function|get_flavor_by_flavor_id dedent|'' name|'def' name|'get_flavor_by_flavor_id' op|'(' name|'flavorid' op|',' name|'ctxt' op|'=' name|'None' op|',' name|'read_deleted' op|'=' string|'"yes"' op|')' op|':' newline|'\n' indent|' ' string|'"""Retrieve flavor by flavorid.\n\n :raises: FlavorNotFound\n """' newline|'\n' name|'if' name|'ctxt' name|'is' name|'None' op|':' newline|'\n' indent|' ' name|'ctxt' op|'=' name|'context' op|'.' name|'get_admin_context' op|'(' name|'read_deleted' op|'=' name|'read_deleted' op|')' newline|'\n' nl|'\n' dedent|'' name|'return' name|'objects' op|'.' name|'Flavor' op|'.' name|'get_by_flavor_id' op|'(' name|'ctxt' op|',' name|'flavorid' op|',' name|'read_deleted' op|')' newline|'\n' nl|'\n' nl|'\n' DECL|function|get_flavor_access_by_flavor_id dedent|'' name|'def' name|'get_flavor_access_by_flavor_id' op|'(' name|'flavorid' op|',' name|'ctxt' op|'=' name|'None' op|')' op|':' newline|'\n' indent|' ' string|'"""Retrieve flavor access list by flavor id."""' newline|'\n' name|'if' name|'ctxt' name|'is' name|'None' op|':' newline|'\n' indent|' ' name|'ctxt' op|'=' name|'context' op|'.' name|'get_admin_context' op|'(' op|')' newline|'\n' nl|'\n' dedent|'' name|'flavor' op|'=' name|'objects' op|'.' name|'Flavor' op|'.' name|'get_by_flavor_id' op|'(' name|'ctxt' op|',' name|'flavorid' op|')' newline|'\n' name|'return' name|'flavor' op|'.' name|'projects' newline|'\n' nl|'\n' nl|'\n' comment|'# NOTE(danms): This method is deprecated, do not use it!' nl|'\n' comment|'# Use instance.{old_,new_,}flavor instead, as instances no longer' nl|'\n' comment|'# have flavor information in system_metadata.' nl|'\n' DECL|function|extract_flavor dedent|'' name|'def' name|'extract_flavor' op|'(' name|'instance' op|',' name|'prefix' op|'=' string|"''" op|')' op|':' newline|'\n' indent|' ' string|'"""Create a Flavor object from instance\'s system_metadata\n information.\n """' newline|'\n' nl|'\n' name|'flavor' op|'=' name|'objects' op|'.' name|'Flavor' op|'(' op|')' newline|'\n' name|'sys_meta' op|'=' name|'utils' op|'.' name|'instance_sys_meta' op|'(' name|'instance' op|')' newline|'\n' nl|'\n' name|'if' name|'not' name|'sys_meta' op|':' newline|'\n' indent|' ' name|'return' name|'None' newline|'\n' nl|'\n' dedent|'' name|'for' name|'key' name|'in' name|'system_metadata_flavor_props' op|'.' name|'keys' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'type_key' op|'=' string|"'%sinstance_type_%s'" op|'%' op|'(' name|'prefix' op|',' name|'key' op|')' newline|'\n' name|'setattr' op|'(' name|'flavor' op|',' name|'key' op|',' name|'sys_meta' op|'[' name|'type_key' op|']' op|')' newline|'\n' nl|'\n' comment|'# NOTE(danms): We do NOT save all of extra_specs, but only the' nl|'\n' comment|'# NUMA-related ones that we need to avoid an uglier alternative. This' nl|'\n' comment|'# should be replaced by a general split-out of flavor information from' nl|'\n' comment|'# system_metadata very soon.' nl|'\n' dedent|'' name|'extra_specs' op|'=' op|'[' op|'(' name|'k' op|',' name|'v' op|')' name|'for' name|'k' op|',' name|'v' name|'in' name|'sys_meta' op|'.' name|'items' op|'(' op|')' nl|'\n' name|'if' name|'k' op|'.' name|'startswith' op|'(' string|"'%sinstance_type_extra_'" op|'%' name|'prefix' op|')' op|']' newline|'\n' name|'if' name|'extra_specs' op|':' newline|'\n' indent|' ' name|'flavor' op|'.' name|'extra_specs' op|'=' op|'{' op|'}' newline|'\n' name|'for' name|'key' op|',' name|'value' name|'in' name|'extra_specs' op|':' newline|'\n' indent|' ' name|'extra_key' op|'=' name|'key' op|'[' name|'len' op|'(' string|"'%sinstance_type_extra_'" op|'%' name|'prefix' op|')' op|':' op|']' newline|'\n' name|'flavor' op|'.' name|'extra_specs' op|'[' name|'extra_key' op|']' op|'=' name|'value' newline|'\n' nl|'\n' dedent|'' dedent|'' name|'return' name|'flavor' newline|'\n' nl|'\n' nl|'\n' comment|'# NOTE(danms): This method is deprecated, do not use it!' nl|'\n' comment|'# Use instance.{old_,new_,}flavor instead, as instances no longer' nl|'\n' comment|'# have flavor information in system_metadata.' nl|'\n' DECL|function|save_flavor_info dedent|'' name|'def' name|'save_flavor_info' op|'(' name|'metadata' op|',' name|'instance_type' op|',' name|'prefix' op|'=' string|"''" op|')' op|':' newline|'\n' indent|' ' string|'"""Save properties from instance_type into instance\'s system_metadata,\n in the format of:\n\n [prefix]instance_type_[key]\n\n This can be used to update system_metadata in place from a type, as well\n as stash information about another instance_type for later use (such as\n during resize).\n """' newline|'\n' nl|'\n' name|'for' name|'key' name|'in' name|'system_metadata_flavor_props' op|'.' name|'keys' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'to_key' op|'=' string|"'%sinstance_type_%s'" op|'%' op|'(' name|'prefix' op|',' name|'key' op|')' newline|'\n' name|'metadata' op|'[' name|'to_key' op|']' op|'=' name|'instance_type' op|'[' name|'key' op|']' newline|'\n' nl|'\n' comment|'# NOTE(danms): We do NOT save all of extra_specs here, but only the' nl|'\n' comment|'# NUMA-related ones that we need to avoid an uglier alternative. This' nl|'\n' comment|'# should be replaced by a general split-out of flavor information from' nl|'\n' comment|'# system_metadata very soon.' nl|'\n' dedent|'' name|'extra_specs' op|'=' name|'instance_type' op|'.' name|'get' op|'(' string|"'extra_specs'" op|',' op|'{' op|'}' op|')' newline|'\n' name|'for' name|'extra_prefix' name|'in' name|'system_metadata_flavor_extra_props' op|':' newline|'\n' indent|' ' name|'for' name|'key' name|'in' name|'extra_specs' op|':' newline|'\n' indent|' ' name|'if' name|'key' op|'.' name|'startswith' op|'(' name|'extra_prefix' op|')' op|':' newline|'\n' indent|' ' name|'to_key' op|'=' string|"'%sinstance_type_extra_%s'" op|'%' op|'(' name|'prefix' op|',' name|'key' op|')' newline|'\n' name|'metadata' op|'[' name|'to_key' op|']' op|'=' name|'extra_specs' op|'[' name|'key' op|']' newline|'\n' nl|'\n' dedent|'' dedent|'' dedent|'' name|'return' name|'metadata' newline|'\n' nl|'\n' nl|'\n' comment|'# NOTE(danms): This method is deprecated, do not use it!' nl|'\n' comment|'# Instances no longer store flavor information in system_metadata' nl|'\n' DECL|function|delete_flavor_info dedent|'' name|'def' name|'delete_flavor_info' op|'(' name|'metadata' op|',' op|'*' name|'prefixes' op|')' op|':' newline|'\n' indent|' ' string|'"""Delete flavor instance_type information from instance\'s system_metadata\n by prefix.\n """' newline|'\n' nl|'\n' name|'for' name|'key' name|'in' name|'system_metadata_flavor_props' op|'.' name|'keys' op|'(' op|')' op|':' newline|'\n' indent|' ' name|'for' name|'prefix' name|'in' name|'prefixes' op|':' newline|'\n' indent|' ' name|'to_key' op|'=' string|"'%sinstance_type_%s'" op|'%' op|'(' name|'prefix' op|',' name|'key' op|')' newline|'\n' name|'del' name|'metadata' op|'[' name|'to_key' op|']' newline|'\n' nl|'\n' comment|'# NOTE(danms): We do NOT save all of extra_specs, but only the' nl|'\n' comment|'# NUMA-related ones that we need to avoid an uglier alternative. This' nl|'\n' comment|'# should be replaced by a general split-out of flavor information from' nl|'\n' comment|'# system_metadata very soon.' nl|'\n' dedent|'' dedent|'' name|'for' name|'key' name|'in' name|'list' op|'(' name|'metadata' op|'.' name|'keys' op|'(' op|')' op|')' op|':' newline|'\n' indent|' ' name|'for' name|'prefix' name|'in' name|'prefixes' op|':' newline|'\n' indent|' ' name|'if' name|'key' op|'.' name|'startswith' op|'(' string|"'%sinstance_type_extra_'" op|'%' name|'prefix' op|')' op|':' newline|'\n' indent|' ' name|'del' name|'metadata' op|'[' name|'key' op|']' newline|'\n' nl|'\n' dedent|'' dedent|'' dedent|'' name|'return' name|'metadata' newline|'\n' nl|'\n' nl|'\n' DECL|function|validate_extra_spec_keys dedent|'' name|'def' name|'validate_extra_spec_keys' op|'(' name|'key_names_list' op|')' op|':' newline|'\n' indent|' ' name|'for' name|'key_name' name|'in' name|'key_names_list' op|':' newline|'\n' indent|' ' name|'if' name|'not' name|'VALID_EXTRASPEC_NAME_REGEX' op|'.' name|'match' op|'(' name|'key_name' op|')' op|':' newline|'\n' indent|' ' name|'expl' op|'=' name|'_' op|'(' string|"'Key Names can only contain alphanumeric characters, '" nl|'\n' string|"'periods, dashes, underscores, colons and spaces.'" op|')' newline|'\n' name|'raise' name|'exception' op|'.' name|'InvalidInput' op|'(' name|'message' op|'=' name|'expl' op|')' newline|'\n' dedent|'' dedent|'' dedent|'' endmarker|'' end_unit
def predict(x_test, model): # predict y_pred = model.predict(x_test) y_pred_scores = model.predict_proba(x_test) return y_pred, y_pred_scores
""" Faça um programa que leia três números e mostre qual é o maior e qual é o menor. """ n1 = int(input('Primeiro número: ')) n2 = int(input('Segundo número: ')) n3 = int(input('Terceiro número: ')) maior = n1 menor = n2 if n2 > n1 and n2 > n3: maior = n2 if n3 > n2 and n3 > n1: maior = n3 if n1 < n2 and n1 < n3: menor = n1 if n3 < n2 and n3 < n1: menor = n3 print('==' * 10) print(f'O maior é o {maior} ') print('==' * 10) print(f'O menor é o {menor} ') print('==' * 10)
"""myeloma_snv cli tests.""" ''' from datetime import datetime from os.path import isfile, join from click.testing import CliRunner from myeloma_snv import cli def test_main_snv(tmpdir): """Test for main command.""" outdir = str(tmpdir) params = [] with open("../tests/test_args_snv.txt") as f: params = f.readlines() params = [x.strip() for x in params] params.append(join('--outdir', outdir)) runner = CliRunner() result = runner.invoke(cli.main, params) assert result.exit_code == 0 # Exit code is 2!! date = str(datetime.today()).split()[0].split("-") name = '/ID131074' name = '_'.join([name, '_'.join(date)]) expected_goodcalls_csv = join(outdir, name + '_goodcalls.csv') expected_badcalls_csv = join(outdir, name + '_badcalls.csv') expected_report_txt = join(outdir, name + '_report.txt') assert isfile(expected_goodcalls_csv) assert isfile(expected_badcalls_csv) assert isfile(expected_report_txt) # Something is not working here: # Exit code is not 0 # outdir does not seem to work # # Check if output file exists. Pass the tempdir as outdir to the function. # # Can make environmental variables in pytest.ini folder. # This can include dictionaries with variables to pass. '''
r = [int (r) for r in input().split()] renas = ['Rudolph','Dasher','Dancer','Prancer','Vixen','Comet','Cupid','Donner','Blitzen'] b = 0 for s in range(len(r)): b = b + r[s] resto = b%9 for t in range(0,9): if resto == t: print(renas[t])
""" Following mappings should be used to map csv headers and database columns for import and export. Keys are the columns from the CSV Files, values are col names returned by database query. For complex queries, it is much better to write them in pure sql. Return the table as named tuples and work with that and this mapping. """ # --- INTERNAL INTERNAL_COMMON_ELECTION_HEADERS = ( 'election_status', 'entity_id', 'entity_counted', 'entity_eligible_voters', 'entity_received_ballots', 'entity_blank_ballots', 'entity_invalid_ballots', 'entity_blank_votes', 'entity_invalid_votes', 'candidate_family_name', 'candidate_first_name', 'candidate_id', 'candidate_elected', 'candidate_votes', 'candidate_party', ) INTERNAL_PROPORZ_HEADERS = ( *INTERNAL_COMMON_ELECTION_HEADERS, 'list_name', 'list_id', 'list_number_of_mandates', 'list_votes', 'list_connection', 'list_connection_parent', ) INTERNAL_MAJORZ_HEADERS = ( *INTERNAL_COMMON_ELECTION_HEADERS, 'election_absolute_majority', ) ELECTION_PARTY_HEADERS = ( 'year', 'total_votes', 'name', 'id', 'color', 'mandates', 'votes', ) WABSTI_MAJORZ_HEADERS = ( 'anzmandate', # 'absolutesmehr' optional 'bfs', 'stimmber', # 'stimmabgegeben' or 'wzabgegeben' # 'wzleer' or 'stimmleer' # 'wzungueltig' or 'stimmungueltig' ) WABSTI_MAJORZ_HEADERS_CANDIDATES = ( 'kandid', ) WABSTI_PROPORZ_HEADERS = ( 'einheit_bfs', 'liste_kandid', 'kand_nachname', 'kand_vorname', 'liste_id', 'liste_code', 'kand_stimmentotal', 'liste_parteistimmentotal', ) WABSTI_PROPORZ_HEADERS_CONNECTIONS = ( 'liste', 'lv', 'luv', ) WABSTI_PROPORZ_HEADERS_CANDIDATES = ( 'liste_kandid', ) WABSTI_PROPORZ_HEADERS_STATS = ( 'einheit_bfs', 'einheit_name', 'stimbertotal', 'wzeingegangen', 'wzleer', 'wzungueltig', 'stmwzveraendertleeramtlleer', ) WABSTIC_MAJORZ_HEADERS_WM_WAHL = ( 'sortgeschaeft', # provides the link to the election 'absolutesmehr', # absolute majority 'anzpendentgde', # status ) WABSTIC_MAJORZ_HEADERS_WMSTATIC_GEMEINDEN = ( 'sortwahlkreis', # provides the link to the election 'sortgeschaeft', # provides the link to the election 'bfsnrgemeinde', # BFS 'stimmberechtigte', # eligible votes ) WABSTIC_MAJORZ_HEADERS_WM_GEMEINDEN = ( 'bfsnrgemeinde', # BFS 'stimmberechtigte', # eligible votes 'sperrung', # counted 'stmabgegeben', # received ballots 'stmleer', # blank ballots 'stmungueltig', # invalid ballots 'stimmenleer', # blank votes 'stimmenungueltig', # invalid votes ) WABSTIC_MAJORZ_HEADERS_WM_KANDIDATEN = ( 'sortgeschaeft', # provides the link to the election 'knr', # candidate id 'nachname', # familiy name 'vorname', # first name 'gewaehlt', # elected 'partei', # ) WABSTIC_MAJORZ_HEADERS_WM_KANDIDATENGDE = ( 'sortgeschaeft', # provides the link to the election 'bfsnrgemeinde', # BFS 'knr', # candidate id 'stimmen', # votes ) WABSTIC_PROPORZ_HEADERS_WP_WAHL = ( 'sortgeschaeft', # provides the link to the election 'anzpendentgde', # status ) WABSTIC_PROPORZ_HEADERS_WPSTATIC_GEMEINDEN = ( 'sortwahlkreis', # provides the link to the election 'sortgeschaeft', # provides the link to the election 'bfsnrgemeinde', # BFS 'stimmberechtigte', # eligible votes ) WABSTIC_PROPORZ_HEADERS_WP_GEMEINDEN = ( 'bfsnrgemeinde', # BFS 'stimmberechtigte', # eligible votes 'sperrung', # counted 'stmabgegeben', # received ballots 'stmleer', # blank ballots 'stmungueltig', # invalid ballots 'anzwzamtleer', # blank ballots ) WABSTIC_PROPORZ_HEADERS_WP_LISTEN = ( 'sortgeschaeft', # provides the link to the election 'listnr', 'listcode', 'sitze', 'listverb', 'listuntverb', ) WABSTIC_PROPORZ_HEADERS_WP_LISTENGDE = ( 'bfsnrgemeinde', # BFS 'listnr', 'stimmentotal', ) WABSTIC_PROPORZ_HEADERS_WPSTATIC_KANDIDATEN = ( 'sortgeschaeft', # provides the link to the election 'knr', # candidate id 'nachname', # familiy name 'vorname', # first name ) WABSTIC_PROPORZ_HEADERS_WP_KANDIDATEN = ( 'sortgeschaeft', # provides the link to the election 'knr', # candidate id 'gewaehlt', # elected ) WABSTIC_PROPORZ_HEADERS_WP_KANDIDATENGDE = ( 'bfsnrgemeinde', # BFS 'knr', # candidate id 'stimmen', # votes ) # VOTES DEFAULT_VOTE_HEADER = ( 'id', 'ja stimmen', 'nein stimmen', 'Stimmberechtigte', 'leere stimmzettel', 'ungültige stimmzettel' ) INTERNAL_VOTE_HEADERS = ( 'status', 'type', 'entity_id', 'counted', 'yeas', 'nays', 'invalid', 'empty', 'eligible_voters', ) WABSTI_VOTE_HEADERS = ( 'vorlage-nr.', 'bfs-nr.', 'stimmberechtigte', 'leere sz', 'ungultige sz', 'ja', 'nein', 'gegenvja', 'gegenvnein', 'stichfrja', 'stichfrnein', 'stimmbet', ) WABSTIC_VOTE_HEADERS_SG_GESCHAEFTE = ( 'art', # domain 'sortwahlkreis', 'sortgeschaeft', # vote number 'ausmittlungsstand', # for status, old 'anzgdependent' # for status, new ) WABSTIC_VOTE_HEADERS_SG_GEMEINDEN = ( 'art', # domain 'sortwahlkreis', 'sortgeschaeft', # vote number 'bfsnrgemeinde', # BFS 'sperrung', # counted 'stimmberechtigte', # eligible votes 'stmungueltig', # invalid 'stmleer', # empty (proposal if simple) 'stmhgja', # yeas (proposal) 'stmhgnein', # nays (proposal) 'stmhgohneaw', # empty (proposal if complex) 'stmn1ja', # yeas (counter-proposal) 'stmn1nein', # nays (counter-proposal) 'stmn1ohneaw', # empty (counter-proposal) 'stmn2ja', # yeas (tie-breaker) 'stmn2nein', # nays (tie-breaker) 'stmn2ohneaw', # empty (tie-breaker) ) WABSTIM_VOTE_HEADERS = ( 'freigegeben', 'stileer', 'stiungueltig', 'stijahg', 'stineinhg', 'stiohneawhg', 'stijan1', 'stineinn1', 'stiohneawN1', 'stijan2', 'stineinn2', 'stiohneawN2', 'stimmberechtigte', 'bfs', )
s = "MCMXCIV" sum = 0 # 累加数字 rome = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} i = 0 while i < len(s): if i < len(s) - 1 and rome.get(s[i]) < rome.get(s[i + 1]): sum += rome.get(s[i + 1]) - rome.get(s[i]) i += 2 continue sum += rome.get(s[i]) i += 1 print(sum)
# This exercise should be done in Jupyter and in the interpreter # Print your name print('My name is Anne.')
""" PigLatinTranslator.py Simple Programs Copyright (C) 2018 Ethan Dye. All rights reserved. """ print("Hello, World!")
n = input() while len(n) > 1: x = 1 for c in n: if c != '0': x *= int(c) n = str(x) print(n)
"""Utility to add editor syntax highlighting to literal code strings. Example: from google.colab import syntax query = syntax.sql(''' SELECT * from tablename ''') """ def html(s): """Noop function to enable HTML highlighting for its argument.""" return s def javascript(s): """Noop function to enable JavaScript highlighting for its argument.""" return s def sql(s): """Noop function to enable SQL highlighting for its argument.""" return s def css(s): """Noop function to enable CSS highlighting for its argument.""" return s
# from the paper `using cython to speedup numerical python programs' #pythran export timeloop(float, float, float, float, float, float list list, float list list, float list list) #pythran export timeloop(float, float, float, float, float, int list list, int list list, int list list) #bench A=[list(range(70)) for i in range(100)] ; B=[list(range(70)) for i in range(100)] ; C=[list(range(70)) for i in range(100)] ; timeloop(1.,2.,.01,.1,.18, A,B,C ) #runas A=[list(range(10)) for i in range(5)] ; B=[list(range(10)) for i in range(5)] ; C=[list(range(10)) for i in range(5)] ; timeloop(1.,2.,.1,.1,.2, A,B,C ) def timeloop(t, t_stop, dt, dx, dy, u, um, k): while t <= t_stop: t += dt new_u = calculate_u(dt, dx, dy, u, um, k) um = u u = new_u return u def calculate_u(dt, dx, dy, u, um, k): up = [ [0.]*len(u[0]) for i in range(len(u)) ] "omp parallel for" for i in range(1, len(u)-1): for j in range(1, len(u[0])-1): up[i][j] = 2*u[i][j] - um[i][j] + \ (dt/dx)**2*( (0.5*(k[i+1][j] + k[i][j])*(u[i+1][j] - u[i][j]) - 0.5*(k[i][j] + k[i-1][j])*(u[i][j] - u[i-1][j]))) + \ (dt/dy)**2*( (0.5*(k[i][j+1] + k[i][j])*(u[i][j+1] - u[i][j]) - 0.5*(k[i][j] + k[i][j-1])*(u[i][j] - u[i][j-1]))) return up
#Python task list example taskList = [] def commander(): print("\na to add, s to show list, q to quit") commandOrder = input("Command --> ") if commandOrder == "a": addTasks() if commandOrder == "s": printTasklist() if commandOrder == "q": print("Bye Bye Friend....") def addTasks(): print("Please enter a task (Q to stop adding):") while True: newTask = input("Task --> ") if str.lower(newTask) == "q": commander() taskList.append(newTask) def printTasklist(): print("\n\nTasklist:") print("----------------------------") taskCounter = 0 for task in taskList: taskCounter += 1 print(f"#{taskCounter} {task.title()}") commander() #program starts running here print("Python Tasklist v 1.0\n") commander()
""" 类型转换 语法: 结果 = 目标类型(待转数据) 适用性: 获取数据: 字 --> 数 显示结果: 数 --> 字 练习:exercise05 """ # input函数的结果一定是字符串类型str age = int(input("请输入年龄:")) + 1 print("明年" + str(age) + "岁了") # 1. str <--> int data01 = int("18") data02 = str(18) # 2. str <--> float data03 = float("18.6") data04 = str(18.6) # 3. float <--> int data05 = int(18.9) # 18 向下取整 data06 = float(18) # 18.0 print(data06) # 4. 注意 # 由字符串类型转换为其他类型,字符串的格式必须符合目标类型要求. # data07 = int("100+") # data07 = int("100.5") # data08 = float("100.5abc") data08 = float("100") print(data08)