content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
# ------------------------------ # 155. Min Stack # # Description: # Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. # push(x) -- Push element x onto stack. # pop() -- Removes the element on top of the stack. # top() -- Get the top element. # getMin() -- Retrieve the minimum element in the stack. # # Example: # MinStack minStack = new MinStack(); # minStack.push(-2); # minStack.push(0); # minStack.push(-3); # minStack.getMin(); --> Returns -3. # minStack.pop(); # minStack.top(); --> Returns 0. # minStack.getMin(); --> Returns -2. # # Version: 1.0 # 10/20/19 by Jianfa # ------------------------------ class MinStack: def __init__(self): """ initialize your data structure here. """ self.stack = [] self.minimum = sys.maxsize def push(self, x: int) -> None: if x <= self.minimum: # push the previous minimum to the stack if push operation will change the minimum # so it help record previous minimum if this element is popped out self.stack.append(self.minimum) self.minimum = x self.stack.append(x) def pop(self) -> None: if self.stack: if self.stack.pop() == self.minimum: # if the popped out element is the current minimum # pop the stack again to get new minimum of rest stack self.minimum = self.stack.pop() def top(self) -> int: if self.stack: return self.stack[-1] def getMin(self) -> int: return self.minimum # Your MinStack object will be instantiated and called as such: # obj = MinStack() # obj.push(x) # obj.pop() # param_3 = obj.top() # param_4 = obj.getMin() # Used for testing if __name__ == "__main__": test = Solution() # ------------------------------ # Summary: # The trick point is how to define push and pop operation, since they may affect the result # of minimum number in the stack.
class Minstack: def __init__(self): """ initialize your data structure here. """ self.stack = [] self.minimum = sys.maxsize def push(self, x: int) -> None: if x <= self.minimum: self.stack.append(self.minimum) self.minimum = x self.stack.append(x) def pop(self) -> None: if self.stack: if self.stack.pop() == self.minimum: self.minimum = self.stack.pop() def top(self) -> int: if self.stack: return self.stack[-1] def get_min(self) -> int: return self.minimum if __name__ == '__main__': test = solution()
""" Project Euler - Problem Solution 023 Copyright (c) Justin McGettigan. All rights reserved. https://github.com/jwmcgettigan/project-euler-solutions """ def sum_of_divisors(n): # reused from problem 021 if n == 0: return 0 total = 1 # start at one since 1 is also a divisor for i in range(2, int(n**0.5)+1): if(n % i == 0): if(n / i == i): # If divisors are equal, add only one total += i else: # Otherwise add both total += (i + n // i) return total def is_abundant(num): return sum_of_divisors(num) > num def non_abundant_sums(): total, limit = 0, 28123 abundant_nums = list() abundant_sums = set() for i in range(limit + 1): if is_abundant(i): abundant_nums.append(i) for i in abundant_nums: for j in abundant_nums: abundant_sum = i + j if abundant_sum > limit: break abundant_sums.add(i + j) for i in range(limit + 1): if i not in abundant_sums: total += i return total if __name__ == "__main__": print(non_abundant_sums())
""" Project Euler - Problem Solution 023 Copyright (c) Justin McGettigan. All rights reserved. https://github.com/jwmcgettigan/project-euler-solutions """ def sum_of_divisors(n): if n == 0: return 0 total = 1 for i in range(2, int(n ** 0.5) + 1): if n % i == 0: if n / i == i: total += i else: total += i + n // i return total def is_abundant(num): return sum_of_divisors(num) > num def non_abundant_sums(): (total, limit) = (0, 28123) abundant_nums = list() abundant_sums = set() for i in range(limit + 1): if is_abundant(i): abundant_nums.append(i) for i in abundant_nums: for j in abundant_nums: abundant_sum = i + j if abundant_sum > limit: break abundant_sums.add(i + j) for i in range(limit + 1): if i not in abundant_sums: total += i return total if __name__ == '__main__': print(non_abundant_sums())
# Insertion Sort # Time Complexity: O(n^2) # Space Complexity: O(1) # Assume first element is sorted at beginning # and then using it to compare with next element # if this element is less than next element # then swap them def insertion_Sort(lst): for i in range(1, len(lst)): # first read from 1 to n-1 print(lst) # print sorting processes cur = lst[i] # current element used to be inserted j = i - 1 # second read to find correct index j for current while j >= 0 and cur < lst[j]: # subsequence lst[j] lst[j + 1] = lst[j] # swap the element and its front j -= 1 # read from back to head lst[j + 1] = cur # current is in the right place return lst
def insertion__sort(lst): for i in range(1, len(lst)): print(lst) cur = lst[i] j = i - 1 while j >= 0 and cur < lst[j]: lst[j + 1] = lst[j] j -= 1 lst[j + 1] = cur return lst
#Assume s is a string of lower case characters. #Write a program that prints the longest substring of s #in which the letters occur in alphabetical order. #For example, if s = 'azcbobobegghakl', then your program should print #Longest substring in alphabetical order is: beggh #In the case of ties, print the first substring. For example, #if s = 'abcbcd', then your program should print #Longest substring in alphabetical order is: abc def F(x,y): if ord(x)<=ord(y): return (True) else: return(False) s="rmfsntggmsuqemcvy" a=0 s1=str() w=bool() while a<(len(s)-1): w=F((s[a]),(s[a+1])) if w==True: s1=s1+s[a] if a==len(s)-2: s1=s1+s[a+1] a+=1 elif w==False: s1=s1+s[a]+" " a+=1 print(s1) s2=str() s3=str() for x in s1: if x!=" ": s2=s2+x if x==" ": if len(s3) < len(s2): s3=s2 s2=str() if len(s3)>=len(s2): print (s3) if len(s2)>len(s3): print (s2)
def f(x, y): if ord(x) <= ord(y): return True else: return False s = 'rmfsntggmsuqemcvy' a = 0 s1 = str() w = bool() while a < len(s) - 1: w = f(s[a], s[a + 1]) if w == True: s1 = s1 + s[a] if a == len(s) - 2: s1 = s1 + s[a + 1] a += 1 elif w == False: s1 = s1 + s[a] + ' ' a += 1 print(s1) s2 = str() s3 = str() for x in s1: if x != ' ': s2 = s2 + x if x == ' ': if len(s3) < len(s2): s3 = s2 s2 = str() if len(s3) >= len(s2): print(s3) if len(s2) > len(s3): print(s2)
# 384. Shuffle an Array # https://leetcode.com/problems/shuffle-an-array/ class Solution: def __init__(self, nums: List[int]): self.orig = nums[:] self.reset() def reset(self) -> List[int]: """ Resets the array to its original configuration and return it. """ self.data = self.orig[:] return self.data def shuffle(self) -> List[int]: """ Returns a random shuffling of the array. """ n = len(self.data) for i in range(n): rdm_idx = random.randint(0, n-1) self.data[i], self.data[rdm_idx] = self.data[rdm_idx], self.data[i] return self.data # Your Solution object will be instantiated and called as such: # obj = Solution(nums) # param_1 = obj.reset() # param_2 = obj.shuffle()
class Solution: def __init__(self, nums: List[int]): self.orig = nums[:] self.reset() def reset(self) -> List[int]: """ Resets the array to its original configuration and return it. """ self.data = self.orig[:] return self.data def shuffle(self) -> List[int]: """ Returns a random shuffling of the array. """ n = len(self.data) for i in range(n): rdm_idx = random.randint(0, n - 1) (self.data[i], self.data[rdm_idx]) = (self.data[rdm_idx], self.data[i]) return self.data
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Yue-Wen FANG' __maintainer__ = "Yue-Wen FANG" __email__ = 'fyuewen@gmail.com' __license__ = 'Apache License 2.0' __creation_date__= 'Dec. 26, 2018' """ In a CLASS, we do not always need pass external arguments, we can also set the default in the class """ class Person: def __init__(self, name, height='175', weight='200', email='f@jp'): """this is an initial""" self.name = name self.height = height self.weight = weight self.email = email print(self) print(type(self)) fang_san = Person('Fang') # The first instance in this script yang_san = Person('Yang', height='150', weight='110', email='hello@jp') # The second instance here print('fang_san.email is %s and yang_san.email is %s' % (fang_san.email, yang_san.email)) print('fang_san.weight is %s' % (fang_san.weight))
__author__ = 'Yue-Wen FANG' __maintainer__ = 'Yue-Wen FANG' __email__ = 'fyuewen@gmail.com' __license__ = 'Apache License 2.0' __creation_date__ = 'Dec. 26, 2018' '\nIn a CLASS, we do not always need pass external arguments,\nwe can also set the default in the class\n' class Person: def __init__(self, name, height='175', weight='200', email='f@jp'): """this is an initial""" self.name = name self.height = height self.weight = weight self.email = email print(self) print(type(self)) fang_san = person('Fang') yang_san = person('Yang', height='150', weight='110', email='hello@jp') print('fang_san.email is %s and yang_san.email is %s' % (fang_san.email, yang_san.email)) print('fang_san.weight is %s' % fang_san.weight)
def calc_fitness_value(x,y,z): fitnessvalues = [] x = generation_fitness_func(x) y = generation_fitness_func(y) z = generation_fitness_func(z) for p in range(len(x)): fitnessvalues += [(x[p]*x[p])+(y[p]*y[p])+(z[p]*z[p])] return fitnessvalues #fitness_value = x*x + y*y + z*z def generation_fitness_func(generation): fitness_values = [] for gene in range(len(generation)): fitness_values += [countOnes(generation[gene])] return fitness_values def individual_fitness_func(individual): return [countOnes(individual)] def countOnes(gene): count = 0 for x in range(len(gene)): if(gene[x]) == 1: count += 1 return count
def calc_fitness_value(x, y, z): fitnessvalues = [] x = generation_fitness_func(x) y = generation_fitness_func(y) z = generation_fitness_func(z) for p in range(len(x)): fitnessvalues += [x[p] * x[p] + y[p] * y[p] + z[p] * z[p]] return fitnessvalues def generation_fitness_func(generation): fitness_values = [] for gene in range(len(generation)): fitness_values += [count_ones(generation[gene])] return fitness_values def individual_fitness_func(individual): return [count_ones(individual)] def count_ones(gene): count = 0 for x in range(len(gene)): if gene[x] == 1: count += 1 return count
content = b'BM\xbc\x03\x00\x00\x00\x00\x00\x006\x00\x00\x00(\x00\x00\x00\x1e\x00\x00\x00\x0f\x00\x00\x00\x01\x00\x10\x00\x00\x00\x00\x00\x86\x03\x00\x00\x12\x0b\x00\x00\x12\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x7f\xff\x7f\xff\x7f\xdf{\x7fo\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xbf \xbfZ\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f?k\x1f\x14\x1f\x14\xbf=\xff\x7f\xff\x7f\xbf \x1f\x14\xbf=\xff\x7f\xff\x7f\xffE\x1f\x14\x1f\x14\xbfZ\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f?k\x1f\x14\x1f\x14\xbf=\xff\x7f\x1fc\x1f\x14\x1f\x14\x1f\x14\x9fs\xff\x7f\xbf=\x1f\x14\x1f\x14\xbfZ\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x7fR\x1f\x14\x1f\x14\x1f\x14\x7fo\xff\x7f\xff\x7f\xff\x7f\xff\x7f?k\x1f\x14\x1f\x14\xbf=\xff\x7f\x7fR\x1f\x14\x1f\x14\x1f\x14\xbfZ\xff\x7f\xbf=\x1f\x14\x1f\x14\xbfZ\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\xbfZ\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xdf{\x1f\x14\x1f\x14\x1f-\xff\x7f\x1f-\x1f\x14\x1f\x14\x1f\x14\xffE\xff\x7f\xbf=\x1f\x14\x1f\x14\x1fc\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x7fo\x1f\x14\x1f\x14\x1f\x14\x1fc\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x9fs\x1f\x14\x1f\x14\xbf \x1f\x14\x1f\x14\xdf{\xbf=\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\xdf^\x1f\x14\x1f\x14?J\x1f\x14\x1f\x14\xdf^\xbf=\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14?J\x1f\x14\x1f\x14\x7fo\xbf \x1f\x14\xffE\x7f5\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14?J\xffE\xbf \x1f\x14\x1f\x14\xdf^\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x7f5\x1f\x14\x1f\x14\x1f-\x1f\x14\xbf \xff\x7f?J\x1f\x14\xbf \x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x1fc\x1f\x14\x1f\x14\xbf \xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbf=\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xdf^\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\xbfZ\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbf=\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xdf^\xff\x7f\xdf{\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbf=\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xdf{\xff\x7f\xff\x7f\xffE\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xffE\xdf{\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbfZ\x1f\x14\x1f\x14\x1f\x14\x7f5\xff\x7f\xff\x7f\xff\x7f\xdf^\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\xff\x7f\x1fc\xbfZ\xbfZ\xbfZ\x1fc\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x7fo\xbfZ\xbfZ\xbfZ\x7fo\xff\x7f\xff\x7f\xff\x7f\xdf{\xbfZ\xbfZ\xbfZ\xbfZ\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x00\x00' print(len(content)) with open('deneme.bmp', 'wb') as f: f.write(content) # 012345678911111111112222222222333 # 01234567890123456789012 # 0123456789ABCDEF11111111111111112 # 0123456789ABCDEF0
content = b'BM\xbc\x03\x00\x00\x00\x00\x00\x006\x00\x00\x00(\x00\x00\x00\x1e\x00\x00\x00\x0f\x00\x00\x00\x01\x00\x10\x00\x00\x00\x00\x00\x86\x03\x00\x00\x12\x0b\x00\x00\x12\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x7f\xff\x7f\xff\x7f\xdf{\x7fo\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xbf \xbfZ\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f?k\x1f\x14\x1f\x14\xbf=\xff\x7f\xff\x7f\xbf \x1f\x14\xbf=\xff\x7f\xff\x7f\xffE\x1f\x14\x1f\x14\xbfZ\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f?k\x1f\x14\x1f\x14\xbf=\xff\x7f\x1fc\x1f\x14\x1f\x14\x1f\x14\x9fs\xff\x7f\xbf=\x1f\x14\x1f\x14\xbfZ\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x7fR\x1f\x14\x1f\x14\x1f\x14\x7fo\xff\x7f\xff\x7f\xff\x7f\xff\x7f?k\x1f\x14\x1f\x14\xbf=\xff\x7f\x7fR\x1f\x14\x1f\x14\x1f\x14\xbfZ\xff\x7f\xbf=\x1f\x14\x1f\x14\xbfZ\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\xbfZ\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xdf{\x1f\x14\x1f\x14\x1f-\xff\x7f\x1f-\x1f\x14\x1f\x14\x1f\x14\xffE\xff\x7f\xbf=\x1f\x14\x1f\x14\x1fc\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x7fo\x1f\x14\x1f\x14\x1f\x14\x1fc\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x9fs\x1f\x14\x1f\x14\xbf \x1f\x14\x1f\x14\xdf{\xbf=\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\xdf^\x1f\x14\x1f\x14?J\x1f\x14\x1f\x14\xdf^\xbf=\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14?J\x1f\x14\x1f\x14\x7fo\xbf \x1f\x14\xffE\x7f5\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14?J\xffE\xbf \x1f\x14\x1f\x14\xdf^\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x7f5\x1f\x14\x1f\x14\x1f-\x1f\x14\xbf \xff\x7f?J\x1f\x14\xbf \x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\x1fc\x1f\x14\x1f\x14\xbf \xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbf=\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xdf^\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14?k\xff\x7f\xbfZ\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbf=\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xdf^\xff\x7f\xdf{\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14?J\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbf=\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xdf{\xff\x7f\xff\x7f\xffE\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xffE\xdf{\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xbfZ\x1f\x14\x1f\x14\x1f\x14\x7f5\xff\x7f\xff\x7f\xff\x7f\xdf^\x1f\x14\x1f\x14\x1f\x14\x1f\x14\xff\x7f\xff\x7f\xff\x7f\x1fc\xbfZ\xbfZ\xbfZ\x1fc\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x7fo\xbfZ\xbfZ\xbfZ\x7fo\xff\x7f\xff\x7f\xff\x7f\xdf{\xbfZ\xbfZ\xbfZ\xbfZ\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\xff\x7f\x00\x00' print(len(content)) with open('deneme.bmp', 'wb') as f: f.write(content)
class Baseagent(object): def __init__(self, args): self.args = args self.agent = list() # inference def choose_action_to_env(self, observation, train=True): observation_copy = observation.copy() obs = observation_copy["obs"] agent_id = observation_copy["controlled_player_index"] action_from_algo = self.agent[agent_id].choose_action(obs, train=True) action_to_env = self.action_from_algo_to_env(action_from_algo) return action_to_env # update algo def learn(self): for agent in self.agent: agent.learn() def save(self, save_path, episode): for agent in self.agent: agent.save(save_path, episode) def load(self, file): for agent in self.agent: agent.load(file)
class Baseagent(object): def __init__(self, args): self.args = args self.agent = list() def choose_action_to_env(self, observation, train=True): observation_copy = observation.copy() obs = observation_copy['obs'] agent_id = observation_copy['controlled_player_index'] action_from_algo = self.agent[agent_id].choose_action(obs, train=True) action_to_env = self.action_from_algo_to_env(action_from_algo) return action_to_env def learn(self): for agent in self.agent: agent.learn() def save(self, save_path, episode): for agent in self.agent: agent.save(save_path, episode) def load(self, file): for agent in self.agent: agent.load(file)
# Knutha Morrisa Pratt (KMP) for string matching # Complexity: O(n) # Reference used: http://code.activestate.com/recipes/117214/ def kmp(full_string, pattern): ''' It takes two arguments, the main string and the patterb which is to be searched and returns the position(s) or the starting indexes of the pattern in the main string (if exists) agrs 'full-string' is the text from where pappern has to be searched 'pattern' is the string has to be searched >>> from pydsa import kmp >>> kmp('ababbabbaab', 'abba') 2 5 ''' # allow indexing into pattern and protect against change during yield pattern = list(pattern) # build table of shift amounts no_of_shifts = [1] * (len(pattern) + 1) shift = 1 # initial shift for posi in range(len(pattern)): while (shift <= posi and pattern[posi] != pattern[posi-shift]): shift = shift + no_of_shifts[posi-shift] no_of_shifts[posi+1] = shift # do the actual search start_at = 0 pattern_match = 0 for p in full_string: while pattern_match == len(pattern) or pattern_match >= 0 and pattern[pattern_match] != p: start_at = start_at + no_of_shifts[pattern_match] pattern_match = pattern_match - no_of_shifts[pattern_match] pattern_match = pattern_match + 1 if pattern_match == len(pattern): print (start_at)
def kmp(full_string, pattern): """ It takes two arguments, the main string and the patterb which is to be searched and returns the position(s) or the starting indexes of the pattern in the main string (if exists) agrs 'full-string' is the text from where pappern has to be searched 'pattern' is the string has to be searched >>> from pydsa import kmp >>> kmp('ababbabbaab', 'abba') 2 5 """ pattern = list(pattern) no_of_shifts = [1] * (len(pattern) + 1) shift = 1 for posi in range(len(pattern)): while shift <= posi and pattern[posi] != pattern[posi - shift]: shift = shift + no_of_shifts[posi - shift] no_of_shifts[posi + 1] = shift start_at = 0 pattern_match = 0 for p in full_string: while pattern_match == len(pattern) or (pattern_match >= 0 and pattern[pattern_match] != p): start_at = start_at + no_of_shifts[pattern_match] pattern_match = pattern_match - no_of_shifts[pattern_match] pattern_match = pattern_match + 1 if pattern_match == len(pattern): print(start_at)
# Description # Keep improving your bot by developing new skills for it. # We suggest a simple guessing game that will predict the age of a user. # It's based on a simple math trick. First, take a look at this formula: # `age = (remainder3 * 70 + remainder5 * 21 + remainder7 * 15) % 105` # The `numbersremainder3`, `remainder5` and `remainder7` # are the remainders of division by 3, 5 and 7 respectively. # It turns out that for each number ranging from 0 to 104 # the calculation will result in the number itself. # This perfectly fits the ordinary age range, doesn't it? # Ask a user for the remainders and use them to guess the age! # Objective # At this stage, you will introduce yourself to the bot. # It will greet you by your name and then try to guess your age using arithmetic operations. # Your program should print the following lines: # `Hello! My name is Aid.` # `I was created in 2020.` # `Please, remind me your name.` # `What a great name you have, Max!` # `Let me guess your age.` # `Enter remainders of dividing your age by 3, 5 and 7.` # `Your age is {your_age}; that's a good time to start programming!` # Read three numbers from the standard input. # Assume that all the numbers will be given on separate lines. # Instead of {your_age}, the bot will print the age determined according to the special formula discussed above. # Example # The greater-than symbol followed by space (> ) represents the user input. # Notice that it's not the part of the input. # Example 1: a dialogue with the bot # `Hello! My name is Aid.` # `I was created in 2020.` # `Please, remind me your name.` # > Max # `What a great name you have, Max!` # `Let me guess your age.` # `Enter remainders of dividing your age by 3, 5 and 7.` # > 1 # > 2 # > 1 # `Your age is 22; that's a good time to start programming!` # Use the provided template to simplify your work. You can change the text, but not the number of printed lines. print('Hello! My name is Aid.') print('I was created in 2020.') print('Please, remind me your name.') name = input() print(f'What a great name you have, {name}!') print('Let me guess your age.') print('Enter remainders of dividing your age by 3, 5 and 7.') remainder3 = int(input()) remainder5 = int(input()) remainder7 = int(input()) age = (remainder3 * 70 + remainder5 * 21 + remainder7 * 15) % 105 print(f"Your age is {age}; that's a good time to start programming!")
print('Hello! My name is Aid.') print('I was created in 2020.') print('Please, remind me your name.') name = input() print(f'What a great name you have, {name}!') print('Let me guess your age.') print('Enter remainders of dividing your age by 3, 5 and 7.') remainder3 = int(input()) remainder5 = int(input()) remainder7 = int(input()) age = (remainder3 * 70 + remainder5 * 21 + remainder7 * 15) % 105 print(f"Your age is {age}; that's a good time to start programming!")
REQUEST_CACHE_LIMIT = 200*1024*1024 QUERY_CACHE_LIMIT = 200*1024*1024 class index: def __init__(self, name, request_cache, query_cache): self.name = name self.request_cache = request_cache self.query_cache = query_cache
request_cache_limit = 200 * 1024 * 1024 query_cache_limit = 200 * 1024 * 1024 class Index: def __init__(self, name, request_cache, query_cache): self.name = name self.request_cache = request_cache self.query_cache = query_cache
PCLASS = ''' class Parser(object): class ScanError(Exception): pass class ParseError(Exception): pass def parsefail(self, expected, found, val=None): raise Parser.ParseError("Parse Error, line {}: Expected token {}, but found token {}:{}".format(self.line, expected, found, val)) def scanfail(self): raise Parser.ScanError("Lexer Error, line {}: No matching token found. Remaining input: {} ....".format(self.line, self.remaining[:50])) def __init__(self): lex = [('whitespace', '\s+'),] + [ x for x in LEXMAP ] rules = [ (regex, self.makeHandler(tokenName)) for tokenName, regex in lex ] self.scanner = re.Scanner(rules) self.line = 1 self.log = False def parse(self, s): self.toks, self.remaining = self.scanner.scan(s) self.trim() return self._parseRoot() def makeHandler(self, token): return lambda scanner, string : (token, string) def trim(self): if self.toks: token, match = self.toks[0] if token == "whitespace": self.line += match.count('\\n') self.toks.pop(0) self.trim() def next(self): if self.toks: token,match = self.toks[0] return token elif self.remaining: self.scanfail() def consume(self, tok): if not self.toks and self.remaining: self.scanfail() token,match = self.toks.pop(0) if self.log: print("consuming {}:{}".format(tok, match)) if tok != token: self.parsefail(tok, token, match) self.trim() return match def pop(self): return self.consume(self.next()) ''' GOBJ=''' import re, sys class GrammarObj(object): def __str__(self): return self.name def __repr__(self): s = self.name + '[' for k,v in self.attrs: s += \"{}:{}, \".format(k,v) s += ']' return s def __init__(self, *args): i = 0 for k,v in args: if k == \"_\": setattr(self, \"_anon{{}}\".format(i), v) i += 1 else: setattr(self, k, v) self.attrs = args ''' MAIN=''' def main(): with open(sys.argv[1]) as f: s = f.read() p = Parser() ast = p.parse(s) print(repr(ast)) if __name__ == "__main__": main() '''
pclass = '\nclass Parser(object):\n\n class ScanError(Exception):\n pass\n class ParseError(Exception):\n pass\n def parsefail(self, expected, found, val=None):\n raise Parser.ParseError("Parse Error, line {}: Expected token {}, but found token {}:{}".format(self.line, expected, found, val))\n def scanfail(self):\n raise Parser.ScanError("Lexer Error, line {}: No matching token found. Remaining input: {} ....".format(self.line, self.remaining[:50]))\n\n\n def __init__(self):\n lex = [(\'whitespace\', \'\\s+\'),] + [ x for x in LEXMAP ]\n rules = [ (regex, self.makeHandler(tokenName)) for tokenName, regex in lex ]\n self.scanner = re.Scanner(rules)\n self.line = 1\n self.log = False\n\n def parse(self, s):\n self.toks, self.remaining = self.scanner.scan(s)\n self.trim()\n return self._parseRoot()\n\n def makeHandler(self, token):\n return lambda scanner, string : (token, string)\n\n def trim(self):\n if self.toks:\n token, match = self.toks[0]\n if token == "whitespace":\n self.line += match.count(\'\\n\')\n self.toks.pop(0)\n self.trim()\n\n def next(self):\n if self.toks:\n token,match = self.toks[0]\n return token\n elif self.remaining:\n self.scanfail()\n\n def consume(self, tok):\n if not self.toks and self.remaining:\n self.scanfail()\n token,match = self.toks.pop(0)\n if self.log:\n print("consuming {}:{}".format(tok, match))\n if tok != token:\n self.parsefail(tok, token, match)\n self.trim()\n return match\n\n def pop(self):\n return self.consume(self.next())\n\n' gobj = '\nimport re, sys\n\nclass GrammarObj(object):\n def __str__(self):\n return self.name\n def __repr__(self):\n s = self.name + \'[\'\n for k,v in self.attrs:\n s += "{}:{}, ".format(k,v)\n s += \']\'\n return s\n def __init__(self, *args):\n i = 0\n for k,v in args:\n if k == "_":\n setattr(self, "_anon{{}}".format(i), v)\n i += 1\n else:\n setattr(self, k, v)\n self.attrs = args\n\n' main = '\ndef main():\n with open(sys.argv[1]) as f:\n s = f.read()\n p = Parser()\n ast = p.parse(s)\n print(repr(ast))\n\nif __name__ == "__main__":\n main()\n'
x = int(input()) y = int(input()) numeros = [x,y] numeros_ = sorted(numeros) soma = 0 for a in range(numeros_[0]+1,numeros_[1]): if a %2 != 0: soma += a print(soma)
x = int(input()) y = int(input()) numeros = [x, y] numeros_ = sorted(numeros) soma = 0 for a in range(numeros_[0] + 1, numeros_[1]): if a % 2 != 0: soma += a print(soma)
class couponObject(object): def __init__( self, player_unique_id, code = None, start_at = None, ends_at = None, entitled_collection_ids = {}, entitled_product_ids = {}, once_per_customer = None, prerequisite_quantity_range = None, prerequisite_shipping_price_range = None, prerequisite_subtotal_range = None, prerequisite_collection_ids = {}, prerequisite_product_ids = {}, usage_limit = None, Value = None, value_type = None, cap = None ): self.player_unique_id = player_unique_id self.code = code self.start_at = start_at self.ends_at = ends_at self.entitled_collection_ids = entitled_collection_ids self.entitled_product_ids = entitled_product_ids self.once_per_customer = once_per_customer self.prerequisite_quantity_range = prerequisite_quantity_range self.prerequisite_shipping_price_range = prerequisite_shipping_price_range self.prerequisite_subtotal_range = prerequisite_subtotal_range self.prerequisite_collection_ids = prerequisite_collection_ids self.prerequisite_product_ids = prerequisite_product_ids self.usage_limit = usage_limit self.Value = Value self.value_type = value_type self.cap = cap def set_code(self, code): self.code = code def set_start_time(self, start_time): self.start_at = start_time def set_end_time(self, end_time): self.ends_at = end_time def set_usage_limit(self, usage_limit): self.usage_limit = usage_limit def set_value(self, value): self.value = value def set_value_type(self, value_type): self.value_type = value_type def set_cap(self, cap): self.cap = cap
class Couponobject(object): def __init__(self, player_unique_id, code=None, start_at=None, ends_at=None, entitled_collection_ids={}, entitled_product_ids={}, once_per_customer=None, prerequisite_quantity_range=None, prerequisite_shipping_price_range=None, prerequisite_subtotal_range=None, prerequisite_collection_ids={}, prerequisite_product_ids={}, usage_limit=None, Value=None, value_type=None, cap=None): self.player_unique_id = player_unique_id self.code = code self.start_at = start_at self.ends_at = ends_at self.entitled_collection_ids = entitled_collection_ids self.entitled_product_ids = entitled_product_ids self.once_per_customer = once_per_customer self.prerequisite_quantity_range = prerequisite_quantity_range self.prerequisite_shipping_price_range = prerequisite_shipping_price_range self.prerequisite_subtotal_range = prerequisite_subtotal_range self.prerequisite_collection_ids = prerequisite_collection_ids self.prerequisite_product_ids = prerequisite_product_ids self.usage_limit = usage_limit self.Value = Value self.value_type = value_type self.cap = cap def set_code(self, code): self.code = code def set_start_time(self, start_time): self.start_at = start_time def set_end_time(self, end_time): self.ends_at = end_time def set_usage_limit(self, usage_limit): self.usage_limit = usage_limit def set_value(self, value): self.value = value def set_value_type(self, value_type): self.value_type = value_type def set_cap(self, cap): self.cap = cap
def on_enter(event_data): """ """ pocs = event_data.model pocs.next_state = 'sleeping' pocs.say("Resetting the list of observations and doing some cleanup!") # Cleanup existing observations try: pocs.observatory.scheduler.reset_observed_list() except Exception as e: # pragma: no cover pocs.logger.warning(f'Problem with cleanup: {e!r}')
def on_enter(event_data): """ """ pocs = event_data.model pocs.next_state = 'sleeping' pocs.say('Resetting the list of observations and doing some cleanup!') try: pocs.observatory.scheduler.reset_observed_list() except Exception as e: pocs.logger.warning(f'Problem with cleanup: {e!r}')
{ 'targets': [ { 'target_name': 'vivaldi', 'type': 'none', 'dependencies': [ 'chromium/chrome/chrome.gyp:chrome', ], 'conditions': [ ['OS=="win"', { # Allow running and debugging vivaldi from the top directory of the MSVS solution view 'product_name':'vivaldi.exe', 'dependencies': [ 'chromium/third_party/crashpad/crashpad/handler/handler.gyp:crashpad_handler', ], }] ] }, ], }
{'targets': [{'target_name': 'vivaldi', 'type': 'none', 'dependencies': ['chromium/chrome/chrome.gyp:chrome'], 'conditions': [['OS=="win"', {'product_name': 'vivaldi.exe', 'dependencies': ['chromium/third_party/crashpad/crashpad/handler/handler.gyp:crashpad_handler']}]]}]}
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def pseudoPalindromicPaths (self, root: TreeNode) -> int: ''' T: O(n) and S: O(n) ''' def isPalindrome(path): d = {} for digit in path: d[digit] = d.get(digit, 0) + 1 evenCount = 0 for digit in d: evenCount += d[digit] % 2 if evenCount > 1: return False return True panlindromPathCount = 0 stack = [(root, [root.val])] while stack: node, path = stack.pop() if not node.left and not node.right: if isPalindrome(path): panlindromPathCount += 1 if node.left: stack.append((node.left, path + [node.left.val])) if node.right: stack.append((node.right, path + [node.right.val])) return panlindromPathCount
class Solution: def pseudo_palindromic_paths(self, root: TreeNode) -> int: """ T: O(n) and S: O(n) """ def is_palindrome(path): d = {} for digit in path: d[digit] = d.get(digit, 0) + 1 even_count = 0 for digit in d: even_count += d[digit] % 2 if evenCount > 1: return False return True panlindrom_path_count = 0 stack = [(root, [root.val])] while stack: (node, path) = stack.pop() if not node.left and (not node.right): if is_palindrome(path): panlindrom_path_count += 1 if node.left: stack.append((node.left, path + [node.left.val])) if node.right: stack.append((node.right, path + [node.right.val])) return panlindromPathCount
# # PySNMP MIB module RADLAN-RADIUSSRV (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADLAN-RADIUSSRV # Produced by pysmi-0.3.4 at Wed May 1 14:48:38 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint") InetAddressIPv6, InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressIPv6", "InetAddressType", "InetAddress") VlanId, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "VlanId") rnd, rlAAAEap, rlRadius = mibBuilder.importSymbols("RADLAN-MIB", "rnd", "rlAAAEap", "rlRadius") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Bits, ModuleIdentity, Integer32, TimeTicks, iso, NotificationType, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, ObjectIdentity, IpAddress, MibIdentifier, Counter64, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "ModuleIdentity", "Integer32", "TimeTicks", "iso", "NotificationType", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "ObjectIdentity", "IpAddress", "MibIdentifier", "Counter64", "Counter32") TimeStamp, RowStatus, DateAndTime, TruthValue, TextualConvention, DisplayString, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "RowStatus", "DateAndTime", "TruthValue", "TextualConvention", "DisplayString", "MacAddress") rlRadiusServ = ModuleIdentity((1, 3, 6, 1, 4, 1, 89, 226)) rlRadiusServ.setRevisions(('2015-06-21 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlRadiusServ.setRevisionsDescriptions(('Added this MODULE-IDENTITY clause.',)) if mibBuilder.loadTexts: rlRadiusServ.setLastUpdated('201506210000Z') if mibBuilder.loadTexts: rlRadiusServ.setOrganization('Radlan Computer Communications Ltd.') if mibBuilder.loadTexts: rlRadiusServ.setContactInfo('radlan.com') if mibBuilder.loadTexts: rlRadiusServ.setDescription('The private MIB module definition for Authentication, Authorization and Accounting in Radlan devices.') rlRadiusServEnable = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServEnable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServEnable.setDescription('Specifies whether Radius Server enabled on the switch. ') rlRadiusServAcctPort = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(1813)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServAcctPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctPort.setDescription('To define the accounting UDP port used for accounting requests.') rlRadiusServAuthPort = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)).clone(1812)).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServAuthPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAuthPort.setDescription('To define the authentication UDP port used for authentication requests.') rlRadiusServDefaultKey = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServDefaultKey.setStatus('current') if mibBuilder.loadTexts: rlRadiusServDefaultKey.setDescription('Default Secret key to be shared with this all Radius Clients server.') rlRadiusServDefaultKeyMD5 = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServDefaultKeyMD5.setStatus('current') if mibBuilder.loadTexts: rlRadiusServDefaultKeyMD5.setDescription('Default Secret key MD5.') rlRadiusServTrapAcct = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 6), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServTrapAcct.setStatus('current') if mibBuilder.loadTexts: rlRadiusServTrapAcct.setDescription('To enable sending accounting traps.') rlRadiusServTrapAuthFailure = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 7), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServTrapAuthFailure.setStatus('current') if mibBuilder.loadTexts: rlRadiusServTrapAuthFailure.setDescription('To enable sending traps when an authentication failed and Access-Reject is sent.') rlRadiusServTrapAuthSuccess = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 8), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServTrapAuthSuccess.setStatus('current') if mibBuilder.loadTexts: rlRadiusServTrapAuthSuccess.setDescription('To enable sending traps when a user is successfully authorized.') rlRadiusServGroupTable = MibTable((1, 3, 6, 1, 4, 1, 89, 226, 9), ) if mibBuilder.loadTexts: rlRadiusServGroupTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupTable.setDescription('The (conceptual) table listing the RADIUS server group entry.') rlRadiusServGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 226, 9, 1), ).setIndexNames((0, "RADLAN-RADIUSSRV", "rlRadiusServGroupName")) if mibBuilder.loadTexts: rlRadiusServGroupEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupEntry.setDescription('The (conceptual) table listing the RADIUS server group entry.') rlRadiusServGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupName.setDescription('To define Radius Server Group Name') rlRadiusServGroupVLAN = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 4094), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupVLAN.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupVLAN.setDescription('To define Radius Assigned VLAN') rlRadiusServGroupVLANName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupVLANName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupVLANName.setDescription('To define Radius Assigned VLAN name') rlRadiusServGroupACL1 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupACL1.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupACL1.setDescription('To define first Radius Assigned ACL') rlRadiusServGroupACL2 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupACL2.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupACL2.setDescription('To define second Radius Assigned ACL') rlRadiusServGroupPrvLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 15))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupPrvLevel.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupPrvLevel.setDescription('To define the user privilege level') rlRadiusServGroupTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupTimeRangeName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupTimeRangeName.setDescription('To define the time user can connect') rlRadiusServGroupStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 8), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServGroupStatus.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupStatus.setDescription('') rlRadiusServUserTable = MibTable((1, 3, 6, 1, 4, 1, 89, 226, 10), ) if mibBuilder.loadTexts: rlRadiusServUserTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserTable.setDescription('The (conceptual) table listing the RADIUS server user entry.') rlRadiusServUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 226, 10, 1), ).setIndexNames((0, "RADLAN-RADIUSSRV", "rlRadiusServUserName")) if mibBuilder.loadTexts: rlRadiusServUserEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserEntry.setDescription('The (conceptual) table listing the RADIUS server User entry.') rlRadiusServUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServUserName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserName.setDescription('To define Radius Server User Name') rlRadiusServUserPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServUserPassword.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserPassword.setDescription('Plain text Radius Server User Password') rlRadiusServUserPasswordMD5 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServUserPasswordMD5.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserPasswordMD5.setDescription('The MD5 of the rlRadiusServUserPassword') rlRadiusServUserGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServUserGroupName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserGroupName.setDescription('Assigned Radius Server Group Name to specific user') rlRadiusServUserStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 5), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServUserStatus.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserStatus.setDescription('') rlRadiusServClientInetTable = MibTable((1, 3, 6, 1, 4, 1, 89, 226, 11), ) if mibBuilder.loadTexts: rlRadiusServClientInetTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetTable.setDescription('The (conceptual) table listing the RADIUS server group entry.') rlRadiusServClientInetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 226, 11, 1), ).setIndexNames((0, "RADLAN-RADIUSSRV", "rlRadiusServClientInetAddressType"), (0, "RADLAN-RADIUSSRV", "rlRadiusServClientInetAddress")) if mibBuilder.loadTexts: rlRadiusServClientInetEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetEntry.setDescription('The (conceptual) table listing the RADIUS Client entry.') rlRadiusServClientInetAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 1), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClientInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetAddressType.setDescription('The Inet address type of RADIUS client reffered to in this table entry .IPv6Z type is not supported.') rlRadiusServClientInetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 2), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClientInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetAddress.setDescription('The Inet address of the RADIUS client referred to in this table entry.') rlRadiusServClientInetKey = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClientInetKey.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetKey.setDescription('Secret key to be shared with this RADIUS client.') rlRadiusServClientInetKeyMD5 = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServClientInetKeyMD5.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetKeyMD5.setDescription('The MD5 of the rlRadiusServClientInetKey') rlRadiusServClientInetStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 5), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClientInetStatus.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetStatus.setDescription('') rlRadiusServClearAccounting = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 12), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClearAccounting.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearAccounting.setDescription('etting this object to TRUE clears the Radius Accounting cache.') rlRadiusServClearRejectedUsers = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 13), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClearRejectedUsers.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearRejectedUsers.setDescription('etting this object to TRUE clears the Radius Rejected Users cache.') rlRadiusServClearStatistics = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 14), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClearStatistics.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearStatistics.setDescription('Setting this object to TRUE clears the Radius server counters.') rlRadiusServClearUsersOfGivenGroup = MibScalar((1, 3, 6, 1, 4, 1, 89, 226, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClearUsersOfGivenGroup.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearUsersOfGivenGroup.setDescription('Clears users of specified Group. 0 string signes to clear all users.') rlRadiusServClearClientStatisticsTable = MibTable((1, 3, 6, 1, 4, 1, 89, 226, 16), ) if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsTable.setDescription('Action MIB to clear radius server statistics per client.') rlRadiusServClearClientStatisticsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 226, 16, 1), ).setIndexNames((0, "RADLAN-RADIUSSRV", "rlRadiusServClearClientStatisticsIndex")) if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsEntry.setDescription('The row definition for this table.') rlRadiusServClearClientStatisticsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 16, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsIndex.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsIndex.setDescription('Index in the table. Already 1.') rlRadiusServClearClientStatisticsInetAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 16, 1, 2), InetAddressType()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddressType.setDescription('Clear statistics Inet address type parameter.') rlRadiusServClearClientStatisticsInetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 16, 1, 3), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddress.setDescription('Clear statistics Inet address parameter.') class RlRadiusServUserType(TextualConvention, Integer32): description = 'Radius Server user service type' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2)) namedValues = NamedValues(("none", 0), ("x", 1), ("login", 2)) class RlRadiusServRejectedEventType(TextualConvention, Integer32): description = 'Rejected Users Event Type' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 2, 3, 4)) namedValues = NamedValues(("invalid", 0), ("reboot", 2), ("dateTimeChanged", 3), ("rejected", 4)) class RlRadiusServRejectedReasonType(TextualConvention, Integer32): description = 'Authentication service rejects reason' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("noError", 0), ("unknownUser", 1), ("illegalPassword", 2), ("notAllowedTime", 3)) rlRadiusServRejectedTable = MibTable((1, 3, 6, 1, 4, 1, 89, 226, 17), ) if mibBuilder.loadTexts: rlRadiusServRejectedTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedTable.setDescription('The (conceptual) table listing the RADIUS server rejected user entry.') rlRadiusServRejectedEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 226, 17, 1), ).setIndexNames((0, "RADLAN-RADIUSSRV", "rlRadiusServRejectedIndex")) if mibBuilder.loadTexts: rlRadiusServRejectedEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedEntry.setDescription('The (conceptual) table listing the RADIUS Rejected user entry.') rlRadiusServRejectedIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: rlRadiusServRejectedIndex.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedIndex.setDescription('Rejected User Index') rlRadiusServRejectedUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedUserName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUserName.setDescription('Rejected User Name. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServRejectedUserType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 3), RlRadiusServUserType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedUserType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUserType.setDescription('Contains type of service.') rlRadiusServRejectedEvent = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 4), RlRadiusServRejectedEventType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedEvent.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedEvent.setDescription('Contains type of event.') rlRadiusServRejectedDateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedDateTime.setDescription('Date of rejected event.') rlRadiusServRejectedUpdatedDateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedUpdatedDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUpdatedDateTime.setDescription('In case of dateTimeChanged event contains New assigned Date and Time. Otherwise contains 0.') rlRadiusServRejectedNASInetAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 7), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddressType.setDescription('Rejected user NAS Inet address type. In case of dateTimeChange and reboot event contains 0.') rlRadiusServRejectedNASInetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 8), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddress.setDescription('Rejected user NAS Inet address. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServRejectedNASPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedNASPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedNASPort.setDescription('Rejected user NAS port. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServRejectedUserAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 10), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedUserAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUserAddress.setDescription('Rejected user Inet address type. In case of 1x user contains mac address string, in case of login contains inet address.') rlRadiusServRejectedReason = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 11), RlRadiusServRejectedReasonType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServRejectedReason.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedReason.setDescription('Rejected user reason.') class RlRadiusServAcctLogUserAuthType(TextualConvention, Integer32): description = 'User Authentication Type' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("none", 0), ("radius", 1), ("local", 2), ("remote", 3)) class RlRadiusServAcctLogEventType(TextualConvention, Integer32): description = 'Accounting Event Type' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 2, 3, 4, 5)) namedValues = NamedValues(("invalid", 0), ("reboot", 2), ("dateTimeChanged", 3), ("start", 4), ("stop", 5)) class RlRadiusServAcctLogTerminationReasonType(TextualConvention, Integer32): description = 'Accounting User Termination reason' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) namedValues = NamedValues(("noError", 0), ("userRequest", 1), ("lostCarrier", 2), ("lostService", 3), ("idleTimeout", 4), ("sessionTimeout", 5), ("adminReset", 6), ("adminReboot", 7), ("portError", 8), ("nasError", 9), ("nasRequest", 10), ("nasReboot", 11), ("portUnneeded", 12), ("portPreempted", 13), ("portSuspended", 14), ("serviceUnavailable", 15), ("callback", 16), ("userError", 17), ("hostRequest", 18)) rlRadiusServAcctLogTable = MibTable((1, 3, 6, 1, 4, 1, 89, 226, 18), ) if mibBuilder.loadTexts: rlRadiusServAcctLogTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogTable.setDescription('The (conceptual) table listing the RADIUS server accounting log entry.') rlRadiusServAcctLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 89, 226, 18, 1), ).setIndexNames((0, "RADLAN-RADIUSSRV", "rlRadiusServAcctLogIndex")) if mibBuilder.loadTexts: rlRadiusServAcctLogEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogEntry.setDescription('The (conceptual) table listing the RADIUS server accounting log entry.') rlRadiusServAcctLogIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))) if mibBuilder.loadTexts: rlRadiusServAcctLogIndex.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogIndex.setDescription('Accounting Log Index') rlRadiusServAcctLogUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogUserName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUserName.setDescription('Accounting Log User Name. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServAcctLogUserAuth = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 3), RlRadiusServAcctLogUserAuthType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogUserAuth.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUserAuth.setDescription('Contains type of authenticator.') rlRadiusServAcctLogEvent = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 4), RlRadiusServAcctLogEventType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogEvent.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogEvent.setDescription('Contains type of event.') rlRadiusServAcctLogDateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogDateTime.setDescription('Date of accounting event.') rlRadiusServAcctLogUpdatedDateTime = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogUpdatedDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUpdatedDateTime.setDescription('In case of dateTimeChanged event contains New assigned Date and Time. Otherwise contains 0.') rlRadiusServAcctLogSessionDuration = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogSessionDuration.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogSessionDuration.setDescription('Contains duration of user session in seconds. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServAcctLogNASInetAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 8), InetAddressType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddressType.setDescription('Accounting log user NAS Inet address type. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServAcctLogNASInetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 9), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddress.setDescription('Accounting log user NAS Inet address. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServAcctLogNASPort = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogNASPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogNASPort.setDescription('Accounting log user NAS port. In case of dateTimeChanged and reboot event contains 0.') rlRadiusServAcctLogUserAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 11), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogUserAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUserAddress.setDescription('Accounting log user address. In case of 1x user contains mac address string, in case of login contains inet address.') rlRadiusServAcctLogTerminationReason = MibTableColumn((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 12), RlRadiusServAcctLogTerminationReasonType()).setMaxAccess("readonly") if mibBuilder.loadTexts: rlRadiusServAcctLogTerminationReason.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogTerminationReason.setDescription('User Session termination reason.') mibBuilder.exportSymbols("RADLAN-RADIUSSRV", rlRadiusServAcctLogTable=rlRadiusServAcctLogTable, RlRadiusServUserType=RlRadiusServUserType, rlRadiusServGroupACL2=rlRadiusServGroupACL2, rlRadiusServDefaultKeyMD5=rlRadiusServDefaultKeyMD5, rlRadiusServGroupStatus=rlRadiusServGroupStatus, rlRadiusServRejectedNASInetAddressType=rlRadiusServRejectedNASInetAddressType, rlRadiusServAcctLogDateTime=rlRadiusServAcctLogDateTime, rlRadiusServGroupName=rlRadiusServGroupName, rlRadiusServClientInetTable=rlRadiusServClientInetTable, rlRadiusServGroupVLAN=rlRadiusServGroupVLAN, rlRadiusServRejectedUserAddress=rlRadiusServRejectedUserAddress, rlRadiusServAcctLogUserName=rlRadiusServAcctLogUserName, rlRadiusServAcctLogEntry=rlRadiusServAcctLogEntry, rlRadiusServTrapAuthSuccess=rlRadiusServTrapAuthSuccess, rlRadiusServClearClientStatisticsEntry=rlRadiusServClearClientStatisticsEntry, rlRadiusServClearClientStatisticsInetAddress=rlRadiusServClearClientStatisticsInetAddress, rlRadiusServAcctLogUserAddress=rlRadiusServAcctLogUserAddress, rlRadiusServAcctLogEvent=rlRadiusServAcctLogEvent, RlRadiusServRejectedEventType=RlRadiusServRejectedEventType, rlRadiusServUserPassword=rlRadiusServUserPassword, rlRadiusServGroupTimeRangeName=rlRadiusServGroupTimeRangeName, rlRadiusServGroupACL1=rlRadiusServGroupACL1, rlRadiusServUserEntry=rlRadiusServUserEntry, rlRadiusServDefaultKey=rlRadiusServDefaultKey, rlRadiusServClientInetKey=rlRadiusServClientInetKey, rlRadiusServRejectedUserName=rlRadiusServRejectedUserName, rlRadiusServUserName=rlRadiusServUserName, rlRadiusServUserStatus=rlRadiusServUserStatus, rlRadiusServGroupVLANName=rlRadiusServGroupVLANName, rlRadiusServEnable=rlRadiusServEnable, rlRadiusServAcctLogIndex=rlRadiusServAcctLogIndex, rlRadiusServGroupEntry=rlRadiusServGroupEntry, rlRadiusServRejectedDateTime=rlRadiusServRejectedDateTime, rlRadiusServAcctLogUserAuth=rlRadiusServAcctLogUserAuth, rlRadiusServClearUsersOfGivenGroup=rlRadiusServClearUsersOfGivenGroup, rlRadiusServ=rlRadiusServ, rlRadiusServRejectedReason=rlRadiusServRejectedReason, rlRadiusServUserPasswordMD5=rlRadiusServUserPasswordMD5, rlRadiusServClientInetEntry=rlRadiusServClientInetEntry, rlRadiusServRejectedNASInetAddress=rlRadiusServRejectedNASInetAddress, rlRadiusServAcctLogNASInetAddress=rlRadiusServAcctLogNASInetAddress, rlRadiusServAuthPort=rlRadiusServAuthPort, rlRadiusServAcctLogTerminationReason=rlRadiusServAcctLogTerminationReason, rlRadiusServAcctPort=rlRadiusServAcctPort, rlRadiusServClearClientStatisticsIndex=rlRadiusServClearClientStatisticsIndex, rlRadiusServGroupPrvLevel=rlRadiusServGroupPrvLevel, rlRadiusServRejectedEvent=rlRadiusServRejectedEvent, rlRadiusServTrapAuthFailure=rlRadiusServTrapAuthFailure, rlRadiusServClearRejectedUsers=rlRadiusServClearRejectedUsers, rlRadiusServClearStatistics=rlRadiusServClearStatistics, rlRadiusServRejectedUpdatedDateTime=rlRadiusServRejectedUpdatedDateTime, RlRadiusServAcctLogUserAuthType=RlRadiusServAcctLogUserAuthType, RlRadiusServRejectedReasonType=RlRadiusServRejectedReasonType, rlRadiusServAcctLogNASInetAddressType=rlRadiusServAcctLogNASInetAddressType, RlRadiusServAcctLogEventType=RlRadiusServAcctLogEventType, rlRadiusServAcctLogNASPort=rlRadiusServAcctLogNASPort, rlRadiusServClientInetAddressType=rlRadiusServClientInetAddressType, rlRadiusServClearClientStatisticsTable=rlRadiusServClearClientStatisticsTable, rlRadiusServRejectedTable=rlRadiusServRejectedTable, rlRadiusServAcctLogUpdatedDateTime=rlRadiusServAcctLogUpdatedDateTime, PYSNMP_MODULE_ID=rlRadiusServ, rlRadiusServClientInetAddress=rlRadiusServClientInetAddress, rlRadiusServTrapAcct=rlRadiusServTrapAcct, rlRadiusServAcctLogSessionDuration=rlRadiusServAcctLogSessionDuration, RlRadiusServAcctLogTerminationReasonType=RlRadiusServAcctLogTerminationReasonType, rlRadiusServRejectedIndex=rlRadiusServRejectedIndex, rlRadiusServGroupTable=rlRadiusServGroupTable, rlRadiusServUserTable=rlRadiusServUserTable, rlRadiusServUserGroupName=rlRadiusServUserGroupName, rlRadiusServRejectedNASPort=rlRadiusServRejectedNASPort, rlRadiusServClientInetStatus=rlRadiusServClientInetStatus, rlRadiusServClearAccounting=rlRadiusServClearAccounting, rlRadiusServRejectedUserType=rlRadiusServRejectedUserType, rlRadiusServRejectedEntry=rlRadiusServRejectedEntry, rlRadiusServClientInetKeyMD5=rlRadiusServClientInetKeyMD5, rlRadiusServClearClientStatisticsInetAddressType=rlRadiusServClearClientStatisticsInetAddressType)
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, value_size_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint') (inet_address_i_pv6, inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressIPv6', 'InetAddressType', 'InetAddress') (vlan_id,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'VlanId') (rnd, rl_aaa_eap, rl_radius) = mibBuilder.importSymbols('RADLAN-MIB', 'rnd', 'rlAAAEap', 'rlRadius') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (bits, module_identity, integer32, time_ticks, iso, notification_type, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, object_identity, ip_address, mib_identifier, counter64, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'ModuleIdentity', 'Integer32', 'TimeTicks', 'iso', 'NotificationType', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'ObjectIdentity', 'IpAddress', 'MibIdentifier', 'Counter64', 'Counter32') (time_stamp, row_status, date_and_time, truth_value, textual_convention, display_string, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'TimeStamp', 'RowStatus', 'DateAndTime', 'TruthValue', 'TextualConvention', 'DisplayString', 'MacAddress') rl_radius_serv = module_identity((1, 3, 6, 1, 4, 1, 89, 226)) rlRadiusServ.setRevisions(('2015-06-21 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: rlRadiusServ.setRevisionsDescriptions(('Added this MODULE-IDENTITY clause.',)) if mibBuilder.loadTexts: rlRadiusServ.setLastUpdated('201506210000Z') if mibBuilder.loadTexts: rlRadiusServ.setOrganization('Radlan Computer Communications Ltd.') if mibBuilder.loadTexts: rlRadiusServ.setContactInfo('radlan.com') if mibBuilder.loadTexts: rlRadiusServ.setDescription('The private MIB module definition for Authentication, Authorization and Accounting in Radlan devices.') rl_radius_serv_enable = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 1), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServEnable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServEnable.setDescription('Specifies whether Radius Server enabled on the switch. ') rl_radius_serv_acct_port = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(1813)).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServAcctPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctPort.setDescription('To define the accounting UDP port used for accounting requests.') rl_radius_serv_auth_port = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 65535)).clone(1812)).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServAuthPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAuthPort.setDescription('To define the authentication UDP port used for authentication requests.') rl_radius_serv_default_key = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServDefaultKey.setStatus('current') if mibBuilder.loadTexts: rlRadiusServDefaultKey.setDescription('Default Secret key to be shared with this all Radius Clients server.') rl_radius_serv_default_key_md5 = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServDefaultKeyMD5.setStatus('current') if mibBuilder.loadTexts: rlRadiusServDefaultKeyMD5.setDescription('Default Secret key MD5.') rl_radius_serv_trap_acct = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 6), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServTrapAcct.setStatus('current') if mibBuilder.loadTexts: rlRadiusServTrapAcct.setDescription('To enable sending accounting traps.') rl_radius_serv_trap_auth_failure = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 7), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServTrapAuthFailure.setStatus('current') if mibBuilder.loadTexts: rlRadiusServTrapAuthFailure.setDescription('To enable sending traps when an authentication failed and Access-Reject is sent.') rl_radius_serv_trap_auth_success = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 8), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServTrapAuthSuccess.setStatus('current') if mibBuilder.loadTexts: rlRadiusServTrapAuthSuccess.setDescription('To enable sending traps when a user is successfully authorized.') rl_radius_serv_group_table = mib_table((1, 3, 6, 1, 4, 1, 89, 226, 9)) if mibBuilder.loadTexts: rlRadiusServGroupTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupTable.setDescription('The (conceptual) table listing the RADIUS server group entry.') rl_radius_serv_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 226, 9, 1)).setIndexNames((0, 'RADLAN-RADIUSSRV', 'rlRadiusServGroupName')) if mibBuilder.loadTexts: rlRadiusServGroupEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupEntry.setDescription('The (conceptual) table listing the RADIUS server group entry.') rl_radius_serv_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupName.setDescription('To define Radius Server Group Name') rl_radius_serv_group_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 2), integer32().subtype(subtypeSpec=constraints_union(value_range_constraint(0, 0), value_range_constraint(1, 4094)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupVLAN.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupVLAN.setDescription('To define Radius Assigned VLAN') rl_radius_serv_group_vlan_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupVLANName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupVLANName.setDescription('To define Radius Assigned VLAN name') rl_radius_serv_group_acl1 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupACL1.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupACL1.setDescription('To define first Radius Assigned ACL') rl_radius_serv_group_acl2 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupACL2.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupACL2.setDescription('To define second Radius Assigned ACL') rl_radius_serv_group_prv_level = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(1, 15))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupPrvLevel.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupPrvLevel.setDescription('To define the user privilege level') rl_radius_serv_group_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupTimeRangeName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupTimeRangeName.setDescription('To define the time user can connect') rl_radius_serv_group_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 9, 1, 8), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServGroupStatus.setStatus('current') if mibBuilder.loadTexts: rlRadiusServGroupStatus.setDescription('') rl_radius_serv_user_table = mib_table((1, 3, 6, 1, 4, 1, 89, 226, 10)) if mibBuilder.loadTexts: rlRadiusServUserTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserTable.setDescription('The (conceptual) table listing the RADIUS server user entry.') rl_radius_serv_user_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 226, 10, 1)).setIndexNames((0, 'RADLAN-RADIUSSRV', 'rlRadiusServUserName')) if mibBuilder.loadTexts: rlRadiusServUserEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserEntry.setDescription('The (conceptual) table listing the RADIUS server User entry.') rl_radius_serv_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServUserName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserName.setDescription('To define Radius Server User Name') rl_radius_serv_user_password = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(1, 64))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServUserPassword.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserPassword.setDescription('Plain text Radius Server User Password') rl_radius_serv_user_password_md5 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServUserPasswordMD5.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserPasswordMD5.setDescription('The MD5 of the rlRadiusServUserPassword') rl_radius_serv_user_group_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(1, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServUserGroupName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserGroupName.setDescription('Assigned Radius Server Group Name to specific user') rl_radius_serv_user_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 10, 1, 5), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServUserStatus.setStatus('current') if mibBuilder.loadTexts: rlRadiusServUserStatus.setDescription('') rl_radius_serv_client_inet_table = mib_table((1, 3, 6, 1, 4, 1, 89, 226, 11)) if mibBuilder.loadTexts: rlRadiusServClientInetTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetTable.setDescription('The (conceptual) table listing the RADIUS server group entry.') rl_radius_serv_client_inet_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 226, 11, 1)).setIndexNames((0, 'RADLAN-RADIUSSRV', 'rlRadiusServClientInetAddressType'), (0, 'RADLAN-RADIUSSRV', 'rlRadiusServClientInetAddress')) if mibBuilder.loadTexts: rlRadiusServClientInetEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetEntry.setDescription('The (conceptual) table listing the RADIUS Client entry.') rl_radius_serv_client_inet_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 1), inet_address_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClientInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetAddressType.setDescription('The Inet address type of RADIUS client reffered to in this table entry .IPv6Z type is not supported.') rl_radius_serv_client_inet_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 2), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClientInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetAddress.setDescription('The Inet address of the RADIUS client referred to in this table entry.') rl_radius_serv_client_inet_key = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 128))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClientInetKey.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetKey.setDescription('Secret key to be shared with this RADIUS client.') rl_radius_serv_client_inet_key_md5 = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServClientInetKeyMD5.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetKeyMD5.setDescription('The MD5 of the rlRadiusServClientInetKey') rl_radius_serv_client_inet_status = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 11, 1, 5), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClientInetStatus.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClientInetStatus.setDescription('') rl_radius_serv_clear_accounting = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 12), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClearAccounting.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearAccounting.setDescription('etting this object to TRUE clears the Radius Accounting cache.') rl_radius_serv_clear_rejected_users = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 13), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClearRejectedUsers.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearRejectedUsers.setDescription('etting this object to TRUE clears the Radius Rejected Users cache.') rl_radius_serv_clear_statistics = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 14), truth_value()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClearStatistics.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearStatistics.setDescription('Setting this object to TRUE clears the Radius server counters.') rl_radius_serv_clear_users_of_given_group = mib_scalar((1, 3, 6, 1, 4, 1, 89, 226, 15), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClearUsersOfGivenGroup.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearUsersOfGivenGroup.setDescription('Clears users of specified Group. 0 string signes to clear all users.') rl_radius_serv_clear_client_statistics_table = mib_table((1, 3, 6, 1, 4, 1, 89, 226, 16)) if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsTable.setDescription('Action MIB to clear radius server statistics per client.') rl_radius_serv_clear_client_statistics_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 226, 16, 1)).setIndexNames((0, 'RADLAN-RADIUSSRV', 'rlRadiusServClearClientStatisticsIndex')) if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsEntry.setDescription('The row definition for this table.') rl_radius_serv_clear_client_statistics_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 16, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsIndex.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsIndex.setDescription('Index in the table. Already 1.') rl_radius_serv_clear_client_statistics_inet_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 16, 1, 2), inet_address_type()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddressType.setDescription('Clear statistics Inet address type parameter.') rl_radius_serv_clear_client_statistics_inet_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 16, 1, 3), inet_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServClearClientStatisticsInetAddress.setDescription('Clear statistics Inet address parameter.') class Rlradiusservusertype(TextualConvention, Integer32): description = 'Radius Server user service type' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2)) named_values = named_values(('none', 0), ('x', 1), ('login', 2)) class Rlradiusservrejectedeventtype(TextualConvention, Integer32): description = 'Rejected Users Event Type' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 2, 3, 4)) named_values = named_values(('invalid', 0), ('reboot', 2), ('dateTimeChanged', 3), ('rejected', 4)) class Rlradiusservrejectedreasontype(TextualConvention, Integer32): description = 'Authentication service rejects reason' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3)) named_values = named_values(('noError', 0), ('unknownUser', 1), ('illegalPassword', 2), ('notAllowedTime', 3)) rl_radius_serv_rejected_table = mib_table((1, 3, 6, 1, 4, 1, 89, 226, 17)) if mibBuilder.loadTexts: rlRadiusServRejectedTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedTable.setDescription('The (conceptual) table listing the RADIUS server rejected user entry.') rl_radius_serv_rejected_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 226, 17, 1)).setIndexNames((0, 'RADLAN-RADIUSSRV', 'rlRadiusServRejectedIndex')) if mibBuilder.loadTexts: rlRadiusServRejectedEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedEntry.setDescription('The (conceptual) table listing the RADIUS Rejected user entry.') rl_radius_serv_rejected_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: rlRadiusServRejectedIndex.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedIndex.setDescription('Rejected User Index') rl_radius_serv_rejected_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedUserName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUserName.setDescription('Rejected User Name. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_rejected_user_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 3), rl_radius_serv_user_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedUserType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUserType.setDescription('Contains type of service.') rl_radius_serv_rejected_event = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 4), rl_radius_serv_rejected_event_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedEvent.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedEvent.setDescription('Contains type of event.') rl_radius_serv_rejected_date_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedDateTime.setDescription('Date of rejected event.') rl_radius_serv_rejected_updated_date_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 6), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedUpdatedDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUpdatedDateTime.setDescription('In case of dateTimeChanged event contains New assigned Date and Time. Otherwise contains 0.') rl_radius_serv_rejected_nas_inet_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 7), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddressType.setDescription('Rejected user NAS Inet address type. In case of dateTimeChange and reboot event contains 0.') rl_radius_serv_rejected_nas_inet_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 8), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedNASInetAddress.setDescription('Rejected user NAS Inet address. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_rejected_nas_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedNASPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedNASPort.setDescription('Rejected user NAS port. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_rejected_user_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 10), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedUserAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedUserAddress.setDescription('Rejected user Inet address type. In case of 1x user contains mac address string, in case of login contains inet address.') rl_radius_serv_rejected_reason = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 17, 1, 11), rl_radius_serv_rejected_reason_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServRejectedReason.setStatus('current') if mibBuilder.loadTexts: rlRadiusServRejectedReason.setDescription('Rejected user reason.') class Rlradiusservacctloguserauthtype(TextualConvention, Integer32): description = 'User Authentication Type' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3)) named_values = named_values(('none', 0), ('radius', 1), ('local', 2), ('remote', 3)) class Rlradiusservacctlogeventtype(TextualConvention, Integer32): description = 'Accounting Event Type' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 2, 3, 4, 5)) named_values = named_values(('invalid', 0), ('reboot', 2), ('dateTimeChanged', 3), ('start', 4), ('stop', 5)) class Rlradiusservacctlogterminationreasontype(TextualConvention, Integer32): description = 'Accounting User Termination reason' status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)) named_values = named_values(('noError', 0), ('userRequest', 1), ('lostCarrier', 2), ('lostService', 3), ('idleTimeout', 4), ('sessionTimeout', 5), ('adminReset', 6), ('adminReboot', 7), ('portError', 8), ('nasError', 9), ('nasRequest', 10), ('nasReboot', 11), ('portUnneeded', 12), ('portPreempted', 13), ('portSuspended', 14), ('serviceUnavailable', 15), ('callback', 16), ('userError', 17), ('hostRequest', 18)) rl_radius_serv_acct_log_table = mib_table((1, 3, 6, 1, 4, 1, 89, 226, 18)) if mibBuilder.loadTexts: rlRadiusServAcctLogTable.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogTable.setDescription('The (conceptual) table listing the RADIUS server accounting log entry.') rl_radius_serv_acct_log_entry = mib_table_row((1, 3, 6, 1, 4, 1, 89, 226, 18, 1)).setIndexNames((0, 'RADLAN-RADIUSSRV', 'rlRadiusServAcctLogIndex')) if mibBuilder.loadTexts: rlRadiusServAcctLogEntry.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogEntry.setDescription('The (conceptual) table listing the RADIUS server accounting log entry.') rl_radius_serv_acct_log_index = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))) if mibBuilder.loadTexts: rlRadiusServAcctLogIndex.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogIndex.setDescription('Accounting Log Index') rl_radius_serv_acct_log_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogUserName.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUserName.setDescription('Accounting Log User Name. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_acct_log_user_auth = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 3), rl_radius_serv_acct_log_user_auth_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogUserAuth.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUserAuth.setDescription('Contains type of authenticator.') rl_radius_serv_acct_log_event = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 4), rl_radius_serv_acct_log_event_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogEvent.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogEvent.setDescription('Contains type of event.') rl_radius_serv_acct_log_date_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogDateTime.setDescription('Date of accounting event.') rl_radius_serv_acct_log_updated_date_time = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 6), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogUpdatedDateTime.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUpdatedDateTime.setDescription('In case of dateTimeChanged event contains New assigned Date and Time. Otherwise contains 0.') rl_radius_serv_acct_log_session_duration = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 7), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogSessionDuration.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogSessionDuration.setDescription('Contains duration of user session in seconds. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_acct_log_nas_inet_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 8), inet_address_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddressType.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddressType.setDescription('Accounting log user NAS Inet address type. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_acct_log_nas_inet_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 9), inet_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogNASInetAddress.setDescription('Accounting log user NAS Inet address. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_acct_log_nas_port = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogNASPort.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogNASPort.setDescription('Accounting log user NAS port. In case of dateTimeChanged and reboot event contains 0.') rl_radius_serv_acct_log_user_address = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 11), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogUserAddress.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogUserAddress.setDescription('Accounting log user address. In case of 1x user contains mac address string, in case of login contains inet address.') rl_radius_serv_acct_log_termination_reason = mib_table_column((1, 3, 6, 1, 4, 1, 89, 226, 18, 1, 12), rl_radius_serv_acct_log_termination_reason_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: rlRadiusServAcctLogTerminationReason.setStatus('current') if mibBuilder.loadTexts: rlRadiusServAcctLogTerminationReason.setDescription('User Session termination reason.') mibBuilder.exportSymbols('RADLAN-RADIUSSRV', rlRadiusServAcctLogTable=rlRadiusServAcctLogTable, RlRadiusServUserType=RlRadiusServUserType, rlRadiusServGroupACL2=rlRadiusServGroupACL2, rlRadiusServDefaultKeyMD5=rlRadiusServDefaultKeyMD5, rlRadiusServGroupStatus=rlRadiusServGroupStatus, rlRadiusServRejectedNASInetAddressType=rlRadiusServRejectedNASInetAddressType, rlRadiusServAcctLogDateTime=rlRadiusServAcctLogDateTime, rlRadiusServGroupName=rlRadiusServGroupName, rlRadiusServClientInetTable=rlRadiusServClientInetTable, rlRadiusServGroupVLAN=rlRadiusServGroupVLAN, rlRadiusServRejectedUserAddress=rlRadiusServRejectedUserAddress, rlRadiusServAcctLogUserName=rlRadiusServAcctLogUserName, rlRadiusServAcctLogEntry=rlRadiusServAcctLogEntry, rlRadiusServTrapAuthSuccess=rlRadiusServTrapAuthSuccess, rlRadiusServClearClientStatisticsEntry=rlRadiusServClearClientStatisticsEntry, rlRadiusServClearClientStatisticsInetAddress=rlRadiusServClearClientStatisticsInetAddress, rlRadiusServAcctLogUserAddress=rlRadiusServAcctLogUserAddress, rlRadiusServAcctLogEvent=rlRadiusServAcctLogEvent, RlRadiusServRejectedEventType=RlRadiusServRejectedEventType, rlRadiusServUserPassword=rlRadiusServUserPassword, rlRadiusServGroupTimeRangeName=rlRadiusServGroupTimeRangeName, rlRadiusServGroupACL1=rlRadiusServGroupACL1, rlRadiusServUserEntry=rlRadiusServUserEntry, rlRadiusServDefaultKey=rlRadiusServDefaultKey, rlRadiusServClientInetKey=rlRadiusServClientInetKey, rlRadiusServRejectedUserName=rlRadiusServRejectedUserName, rlRadiusServUserName=rlRadiusServUserName, rlRadiusServUserStatus=rlRadiusServUserStatus, rlRadiusServGroupVLANName=rlRadiusServGroupVLANName, rlRadiusServEnable=rlRadiusServEnable, rlRadiusServAcctLogIndex=rlRadiusServAcctLogIndex, rlRadiusServGroupEntry=rlRadiusServGroupEntry, rlRadiusServRejectedDateTime=rlRadiusServRejectedDateTime, rlRadiusServAcctLogUserAuth=rlRadiusServAcctLogUserAuth, rlRadiusServClearUsersOfGivenGroup=rlRadiusServClearUsersOfGivenGroup, rlRadiusServ=rlRadiusServ, rlRadiusServRejectedReason=rlRadiusServRejectedReason, rlRadiusServUserPasswordMD5=rlRadiusServUserPasswordMD5, rlRadiusServClientInetEntry=rlRadiusServClientInetEntry, rlRadiusServRejectedNASInetAddress=rlRadiusServRejectedNASInetAddress, rlRadiusServAcctLogNASInetAddress=rlRadiusServAcctLogNASInetAddress, rlRadiusServAuthPort=rlRadiusServAuthPort, rlRadiusServAcctLogTerminationReason=rlRadiusServAcctLogTerminationReason, rlRadiusServAcctPort=rlRadiusServAcctPort, rlRadiusServClearClientStatisticsIndex=rlRadiusServClearClientStatisticsIndex, rlRadiusServGroupPrvLevel=rlRadiusServGroupPrvLevel, rlRadiusServRejectedEvent=rlRadiusServRejectedEvent, rlRadiusServTrapAuthFailure=rlRadiusServTrapAuthFailure, rlRadiusServClearRejectedUsers=rlRadiusServClearRejectedUsers, rlRadiusServClearStatistics=rlRadiusServClearStatistics, rlRadiusServRejectedUpdatedDateTime=rlRadiusServRejectedUpdatedDateTime, RlRadiusServAcctLogUserAuthType=RlRadiusServAcctLogUserAuthType, RlRadiusServRejectedReasonType=RlRadiusServRejectedReasonType, rlRadiusServAcctLogNASInetAddressType=rlRadiusServAcctLogNASInetAddressType, RlRadiusServAcctLogEventType=RlRadiusServAcctLogEventType, rlRadiusServAcctLogNASPort=rlRadiusServAcctLogNASPort, rlRadiusServClientInetAddressType=rlRadiusServClientInetAddressType, rlRadiusServClearClientStatisticsTable=rlRadiusServClearClientStatisticsTable, rlRadiusServRejectedTable=rlRadiusServRejectedTable, rlRadiusServAcctLogUpdatedDateTime=rlRadiusServAcctLogUpdatedDateTime, PYSNMP_MODULE_ID=rlRadiusServ, rlRadiusServClientInetAddress=rlRadiusServClientInetAddress, rlRadiusServTrapAcct=rlRadiusServTrapAcct, rlRadiusServAcctLogSessionDuration=rlRadiusServAcctLogSessionDuration, RlRadiusServAcctLogTerminationReasonType=RlRadiusServAcctLogTerminationReasonType, rlRadiusServRejectedIndex=rlRadiusServRejectedIndex, rlRadiusServGroupTable=rlRadiusServGroupTable, rlRadiusServUserTable=rlRadiusServUserTable, rlRadiusServUserGroupName=rlRadiusServUserGroupName, rlRadiusServRejectedNASPort=rlRadiusServRejectedNASPort, rlRadiusServClientInetStatus=rlRadiusServClientInetStatus, rlRadiusServClearAccounting=rlRadiusServClearAccounting, rlRadiusServRejectedUserType=rlRadiusServRejectedUserType, rlRadiusServRejectedEntry=rlRadiusServRejectedEntry, rlRadiusServClientInetKeyMD5=rlRadiusServClientInetKeyMD5, rlRadiusServClearClientStatisticsInetAddressType=rlRadiusServClearClientStatisticsInetAddressType)
def rom(n): if n == 1000: return 'M' if n == 900: return 'CM' if n == 500: return 'D' if n == 400: return 'CD' if n == 100: return 'C' if n == 90: return 'XC' if n == 50: return 'L' if n == 40: return 'XL' if n == 10: return 'X' if n == 9: return 'IX' if n == 5: return 'V' if n == 4: return 'IV' if n == 1: return 'I' n = int(input()) for i in 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1: while n >= i: print(rom(i), end='') n -= i print()
def rom(n): if n == 1000: return 'M' if n == 900: return 'CM' if n == 500: return 'D' if n == 400: return 'CD' if n == 100: return 'C' if n == 90: return 'XC' if n == 50: return 'L' if n == 40: return 'XL' if n == 10: return 'X' if n == 9: return 'IX' if n == 5: return 'V' if n == 4: return 'IV' if n == 1: return 'I' n = int(input()) for i in (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1): while n >= i: print(rom(i), end='') n -= i print()
# Copyright 2013 10gen Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ This module defines constants that are intended to be imported into the Flask app configuration by default. """ # flask.config settings. DEBUG = False SECRET_KEY = 'A0gjhsd3678HK' #DB Settings DB_HOST = 'localhost' DB_PORT = 27017 DB_NAME = 'mongows' # Misc settings. HOST = '0.0.0.0' LOGGING_CONF = 'webapps/configs/logging.yaml' NO_FRONTEND = False NO_VALIDATION = False NO_INIT = False PORT = 5000 CORS_ORIGIN = '' RATELIMIT_COLLECTION = 'ratelimit' RATELIMIT_QUOTA = 500 # requests per expiry RATELIMIT_EXPIRY = 60 # expiry in seconds QUOTA_COLLECTION_SIZE = 5 * 1024 * 1024 # size quota in bytes # QUOTA_NUM_COLLECTIONS: number of collections per res_id # False: unlimited number of collections, no quota # 0: user is unable to create additional collections # 1+: user may have up to # collections per res_id QUOTA_NUM_COLLECTIONS = 8
""" This module defines constants that are intended to be imported into the Flask app configuration by default. """ debug = False secret_key = 'A0gjhsd3678HK' db_host = 'localhost' db_port = 27017 db_name = 'mongows' host = '0.0.0.0' logging_conf = 'webapps/configs/logging.yaml' no_frontend = False no_validation = False no_init = False port = 5000 cors_origin = '' ratelimit_collection = 'ratelimit' ratelimit_quota = 500 ratelimit_expiry = 60 quota_collection_size = 5 * 1024 * 1024 quota_num_collections = 8
def resolve(): ''' code here ''' N = int(input()) mat = [[int(item) for item in input().split()] for _ in range(N)] dp = [[0 for _ in range(N+1)] for _ in range(N+1)] for i in reversed(range(N-2)): for j in range(i+2, N): dp[i][j] = min(dp[i][j-1] * mat[i][0]*mat[j][0]*mat[j][1], dp[i][j]) print(dp) if __name__ == "__main__": resolve()
def resolve(): """ code here """ n = int(input()) mat = [[int(item) for item in input().split()] for _ in range(N)] dp = [[0 for _ in range(N + 1)] for _ in range(N + 1)] for i in reversed(range(N - 2)): for j in range(i + 2, N): dp[i][j] = min(dp[i][j - 1] * mat[i][0] * mat[j][0] * mat[j][1], dp[i][j]) print(dp) if __name__ == '__main__': resolve()
""" Provides the ApiContext class """ __copyright__ = "Copyright 2017, Datera, Inc." class ApiContext(object): """ This object is created by the top level API object, and is passed in to all endpoints and entities. """ def __init__(self): self.connection = None self.hostname = None self.username = None self.password = None self.tenant = None self.timeout = None self.secure = None self.version = None self.cert = None self.cert_key = None self._reader = None self.strict = True self.thread_local = None self.ldap_server = None self.retry_503_type = None self.retry_connection_type = None self.extra_headers = {} self.verify = None self.schema_loc = None self.on_entity_create_hooks = [] self.on_entity_delete_hooks = [] self.prepare_entity_hooks = [] self.prepare_endpoint_hooks = [] @property def reader(self): if not self._reader: self.connection.login( name=self.username, password=self.password, ldap_server=self.ldap_server) self._reader = self.connection.reader return self._reader @staticmethod def _call_hooks(obj, hooks): """ Calls a series of callbacks """ if not hooks: return obj for hook in hooks: ret = hook(obj) if ret is not None: obj = ret # hooks can modify returned object return obj def on_entity_create(self, entity): """ Called after an entity has been created on the system """ return self._call_hooks(entity, self.on_entity_create_hooks) def on_entity_delete(self, entity): """ Called after an entity has been deleted from the system """ return self._call_hooks(entity, self.on_entity_delete_hooks) def prepare_entity(self, entity): """ Called to setup an entity object returned from a REST query """ return self._call_hooks(entity, self.prepare_entity_hooks) def prepare_endpoint(self, endpoint): """ Called to setup an endpoint object """ return self._call_hooks(endpoint, self.prepare_endpoint_hooks)
""" Provides the ApiContext class """ __copyright__ = 'Copyright 2017, Datera, Inc.' class Apicontext(object): """ This object is created by the top level API object, and is passed in to all endpoints and entities. """ def __init__(self): self.connection = None self.hostname = None self.username = None self.password = None self.tenant = None self.timeout = None self.secure = None self.version = None self.cert = None self.cert_key = None self._reader = None self.strict = True self.thread_local = None self.ldap_server = None self.retry_503_type = None self.retry_connection_type = None self.extra_headers = {} self.verify = None self.schema_loc = None self.on_entity_create_hooks = [] self.on_entity_delete_hooks = [] self.prepare_entity_hooks = [] self.prepare_endpoint_hooks = [] @property def reader(self): if not self._reader: self.connection.login(name=self.username, password=self.password, ldap_server=self.ldap_server) self._reader = self.connection.reader return self._reader @staticmethod def _call_hooks(obj, hooks): """ Calls a series of callbacks """ if not hooks: return obj for hook in hooks: ret = hook(obj) if ret is not None: obj = ret return obj def on_entity_create(self, entity): """ Called after an entity has been created on the system """ return self._call_hooks(entity, self.on_entity_create_hooks) def on_entity_delete(self, entity): """ Called after an entity has been deleted from the system """ return self._call_hooks(entity, self.on_entity_delete_hooks) def prepare_entity(self, entity): """ Called to setup an entity object returned from a REST query """ return self._call_hooks(entity, self.prepare_entity_hooks) def prepare_endpoint(self, endpoint): """ Called to setup an endpoint object """ return self._call_hooks(endpoint, self.prepare_endpoint_hooks)
#public symbols __all__ = ["Factory"] class Factory(object): """Base class for objects that know how to create other objects based on a type argument and several optional arguments (version, server id, and resource description). """ def __init__(self): pass def create(self, typname, version=None, server=None, res_desc=None, **ctor_args): """Return an object of type *typename,* using the specified package version, server location, and resource description. """ raise NotImplementedError('create') def get_available_types(self, groups=None): """Return a set of tuples of the form (typename, dist_version), one for each available plugin type in the given entry point groups. If groups is *None,* return the set for all openmdao entry point groups. """ raise NotImplementedError('get_available_types')
__all__ = ['Factory'] class Factory(object): """Base class for objects that know how to create other objects based on a type argument and several optional arguments (version, server id, and resource description). """ def __init__(self): pass def create(self, typname, version=None, server=None, res_desc=None, **ctor_args): """Return an object of type *typename,* using the specified package version, server location, and resource description. """ raise not_implemented_error('create') def get_available_types(self, groups=None): """Return a set of tuples of the form (typename, dist_version), one for each available plugin type in the given entry point groups. If groups is *None,* return the set for all openmdao entry point groups. """ raise not_implemented_error('get_available_types')
class Classe_1: def funcao_da_classe_1(self, string): dicionario = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} valor = 0 for i in range(len(string)): if i > 0 and dicionario[string[i]] > dicionario[string[i -1]]: valor += dicionario[string[i]] -2 * dicionario[string[i -1]] else: valor += dicionario [string[i]] return valor
class Classe_1: def funcao_da_classe_1(self, string): dicionario = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} valor = 0 for i in range(len(string)): if i > 0 and dicionario[string[i]] > dicionario[string[i - 1]]: valor += dicionario[string[i]] - 2 * dicionario[string[i - 1]] else: valor += dicionario[string[i]] return valor
def partition(array, low, high): i = low - 1 pivot = array[high] for j in range(low, high): if array[j] < pivot: i += 1 array[i], array[j] = array[j], array[i] array[i + 1], array[high] = array[high], array[i + 1] return i + 1 def quick_sort(array, low, high): if low < high: temp = partition(array, low, high) quick_sort(array, low, temp - 1) quick_sort(array, temp + 1, high) array = [i for i in range(1, 20)] print(array) quick_sort(array, 0, len(array) - 1) print(array)
def partition(array, low, high): i = low - 1 pivot = array[high] for j in range(low, high): if array[j] < pivot: i += 1 (array[i], array[j]) = (array[j], array[i]) (array[i + 1], array[high]) = (array[high], array[i + 1]) return i + 1 def quick_sort(array, low, high): if low < high: temp = partition(array, low, high) quick_sort(array, low, temp - 1) quick_sort(array, temp + 1, high) array = [i for i in range(1, 20)] print(array) quick_sort(array, 0, len(array) - 1) print(array)
# -*- coding: utf-8 -*- """ Created on Wed Mar 24 19:41:31 2021 @author: Abeg """ #Linear Search def LinearSearch(arr,k): global value for i in range(len(arr)): if(arr[i]==k): value=i return value n,k=map(int,input().split()) arr=list(map(int,input().strip().split())) print(LinearSearch(arr,k))
""" Created on Wed Mar 24 19:41:31 2021 @author: Abeg """ def linear_search(arr, k): global value for i in range(len(arr)): if arr[i] == k: value = i return value (n, k) = map(int, input().split()) arr = list(map(int, input().strip().split())) print(linear_search(arr, k))
# -*- coding: utf-8 -*- # @Date : 2014-06-27 14:37:20 # @Author : xindervella@gamil.com SRTP_URL = 'http://10.1.30.98:8080/srtp2/USerPages/SRTP/Report3.aspx' TIME_OUT = 8
srtp_url = 'http://10.1.30.98:8080/srtp2/USerPages/SRTP/Report3.aspx' time_out = 8
i=1 for i in range(0,5): if i==2: print('bye') break print("sadique")
i = 1 for i in range(0, 5): if i == 2: print('bye') break print('sadique')
def _normalize_scratch_rotation(degree): while degree <= -180: degree += 360 while degree > 180: degree -= 360 return degree def _convert_scratch_to_pygame_rotation(degree): deg = _normalize_scratch_rotation(degree) if deg == 0: return 90 elif deg == 90: return 0 elif deg == -90: return 180 elif deg == 180: return 270 elif deg > 0 and deg < 90: return 90 - deg elif deg > 90 and deg < 180: return 360 - (deg - 90) elif deg < 0 and deg > -90: return 90 - deg elif deg < -90 and deg > -180: return 270 - (180 + deg) def _normalize_pygame_rotation(degree): while degree < 0: degree += 360 while degree >= 360: degree -= 360 return degree def _convert_pygame_to_scratch_rotation(degree): deg = _normalize_pygame_rotation(degree) if deg == 0: return 90 elif deg == 90: return 0 elif deg == 180: return -90 elif deg == 270: return 180 elif deg > 0 and deg < 90: return 90 - deg elif deg > 90 and deg < 180: return 90 - deg elif deg > 180 and deg < 270: return 90 - deg elif deg > 270 and deg < 360: return 90 + (360 - deg)
def _normalize_scratch_rotation(degree): while degree <= -180: degree += 360 while degree > 180: degree -= 360 return degree def _convert_scratch_to_pygame_rotation(degree): deg = _normalize_scratch_rotation(degree) if deg == 0: return 90 elif deg == 90: return 0 elif deg == -90: return 180 elif deg == 180: return 270 elif deg > 0 and deg < 90: return 90 - deg elif deg > 90 and deg < 180: return 360 - (deg - 90) elif deg < 0 and deg > -90: return 90 - deg elif deg < -90 and deg > -180: return 270 - (180 + deg) def _normalize_pygame_rotation(degree): while degree < 0: degree += 360 while degree >= 360: degree -= 360 return degree def _convert_pygame_to_scratch_rotation(degree): deg = _normalize_pygame_rotation(degree) if deg == 0: return 90 elif deg == 90: return 0 elif deg == 180: return -90 elif deg == 270: return 180 elif deg > 0 and deg < 90: return 90 - deg elif deg > 90 and deg < 180: return 90 - deg elif deg > 180 and deg < 270: return 90 - deg elif deg > 270 and deg < 360: return 90 + (360 - deg)
def frequencySort(self, s: str) -> str: m = {} for i in s: if i not in m: m[i] = 1 else: m[i] += 1 r = "" for i in sorted(m, key=m.get, reverse=True): r += i * m[i] return r
def frequency_sort(self, s: str) -> str: m = {} for i in s: if i not in m: m[i] = 1 else: m[i] += 1 r = '' for i in sorted(m, key=m.get, reverse=True): r += i * m[i] return r
# String Format # As we learned in the Python Variables chapter, we cannot combine strings and numbers like this: ''' age = 23 txt = "My name is Nayan, I am " + age + "Years old" print(txt) #Error ''' # But we can combine strings and numbers by using the format() method! # The format() method takes the passed arguments, formats them, and places them in the string where the placeholders {} are: age = 23 txt = "My name is Nayan, and I'm {} Years old" print(txt.format(age)) # The format() method takes unlimited number of arguments, and are placed into the respective placeholders: quantity = 5 itemno = 1001 price = 101.05 myorder = "I want {} pieces of item {} for {} Rupees" print(myorder.format(quantity, itemno, price)) # You can use index numbers {0} to be sure the arguments are placed in the correct placeholders: quantity = 5 itemno = 1001 price = 101.05 myorder = "I want to pay {2} Rupees for {0} pieces of item {1}. " print(myorder.format(quantity, itemno, price))
""" age = 23 txt = "My name is Nayan, I am " + age + "Years old" print(txt) #Error """ age = 23 txt = "My name is Nayan, and I'm {} Years old" print(txt.format(age)) quantity = 5 itemno = 1001 price = 101.05 myorder = 'I want {} pieces of item {} for {} Rupees' print(myorder.format(quantity, itemno, price)) quantity = 5 itemno = 1001 price = 101.05 myorder = 'I want to pay {2} Rupees for {0} pieces of item {1}. ' print(myorder.format(quantity, itemno, price))
#Write a Python class to reverse a string word by word. class py_solution: def reverse_words(self, s): return reversed(s) print(py_solution().reverse_words('rewangi'))
class Py_Solution: def reverse_words(self, s): return reversed(s) print(py_solution().reverse_words('rewangi'))
# Chapter 7 exercises from the book Python Crash Course: A Hands-On, Project-Based Introduction to Programming. # 7-1. Rental Car car = input('Which car do you want to rent?') print('Let me see if I can find you a '+ car + '.') # 7-2. Restaurant Seating number = input('How many people come to dinner?') number = int(number) if number > 8: print('Sorry, but there is none table available for your group right now, can you wait for a little?') else: print('Your table is ready.') # 7-3. Multiples of Ten number = input('Please type a number: ') number = int(number) if number % 10 == 0: print('Your number is a multiple of 10.') else: print('Your number is not a multiple of 10.') # 7-4. Pizza Toppings pizza_toppings = [] print('Hello! Which pizza toppings do you desire?') prompt = '\nPlease enter the topping you want:' prompt += "\n(Enter 'quit' when you have finished.)" while True: message = input(prompt) if message == 'quit': if pizza_toppings: print('Plain pizza it is then.') else: print('Your pizza toppings are:') print(pizza_toppings) break else: pizza_toppings.append(message) # 7-5. Movie Tickets prompt = '\nPlease enter your age: ' prompt += "\n(Enter 'quit' when you have finished.)" while True: age = input(prompt) if age == 'quit': break age = int(age) if age < 3: print('Your ticket is free.') elif age >=3 and age < 12: print('Your ticket is $10.') else: print('Your ticket is $15.') # 7-6. Three Exits # 7-7. Infinity #while True: # print('infinity') # 7-8. Deli sandwich_orders = ['bacon', 'pastrami', 'bagel toast', 'baloney', 'pastrami', 'barbecue', 'doner kebab', 'pastrami'] finished_sandwishes = [] while sandwich_orders: sandwich = sandwich_orders.pop() print('I made your ' + sandwich + 'sandwich.') print('I made these sandwiches:') print(set(finished_sandwishes)) # 7-9. No Pastrami sandwich_orders = ['bacon', 'pastrami', 'bagel toast', 'baloney', 'pastrami', 'barbecue', 'doner kebab', 'pastrami'] finished_sandwishes = [] print('Deli has run out of pastrami.') while 'pastrami' in sandwich_orders: sandwich_orders.remove('pastrami') while sandwich_orders: sandwich = sandwich_orders.pop() print('I made your ' + sandwich + 'sandwich.') print('I made these sandwiches:') print(set(finished_sandwishes)) # 7-10. Dream Vacation dream_vacation = {} polling_active = True while polling_active: name = input('\nWhat is your name?') response = input('If you could visit one place in the world, where would you go?') dream_vacation[name] = response repeat = input('Would you like to let another person respond? (yes/no)') if repeat == 'no': polling_active = False for name, response in dream_vacation.items(): print(name.title() + ' would you like to go to ' + response.title() + '.')
car = input('Which car do you want to rent?') print('Let me see if I can find you a ' + car + '.') number = input('How many people come to dinner?') number = int(number) if number > 8: print('Sorry, but there is none table available for your group right now, can you wait for a little?') else: print('Your table is ready.') number = input('Please type a number: ') number = int(number) if number % 10 == 0: print('Your number is a multiple of 10.') else: print('Your number is not a multiple of 10.') pizza_toppings = [] print('Hello! Which pizza toppings do you desire?') prompt = '\nPlease enter the topping you want:' prompt += "\n(Enter 'quit' when you have finished.)" while True: message = input(prompt) if message == 'quit': if pizza_toppings: print('Plain pizza it is then.') else: print('Your pizza toppings are:') print(pizza_toppings) break else: pizza_toppings.append(message) prompt = '\nPlease enter your age: ' prompt += "\n(Enter 'quit' when you have finished.)" while True: age = input(prompt) if age == 'quit': break age = int(age) if age < 3: print('Your ticket is free.') elif age >= 3 and age < 12: print('Your ticket is $10.') else: print('Your ticket is $15.') sandwich_orders = ['bacon', 'pastrami', 'bagel toast', 'baloney', 'pastrami', 'barbecue', 'doner kebab', 'pastrami'] finished_sandwishes = [] while sandwich_orders: sandwich = sandwich_orders.pop() print('I made your ' + sandwich + 'sandwich.') print('I made these sandwiches:') print(set(finished_sandwishes)) sandwich_orders = ['bacon', 'pastrami', 'bagel toast', 'baloney', 'pastrami', 'barbecue', 'doner kebab', 'pastrami'] finished_sandwishes = [] print('Deli has run out of pastrami.') while 'pastrami' in sandwich_orders: sandwich_orders.remove('pastrami') while sandwich_orders: sandwich = sandwich_orders.pop() print('I made your ' + sandwich + 'sandwich.') print('I made these sandwiches:') print(set(finished_sandwishes)) dream_vacation = {} polling_active = True while polling_active: name = input('\nWhat is your name?') response = input('If you could visit one place in the world, where would you go?') dream_vacation[name] = response repeat = input('Would you like to let another person respond? (yes/no)') if repeat == 'no': polling_active = False for (name, response) in dream_vacation.items(): print(name.title() + ' would you like to go to ' + response.title() + '.')
# follow pep-386 # Examples: # * 0.3 - released version # * 0.3a1 - alpha version # * 0.3.dev - version in developmentv __version__ = '0.7.dev' __releasedate__ = ''
__version__ = '0.7.dev' __releasedate__ = ''
class RegistrationInfo(object): def __init__(self, hook_name, expect_exists, register_kwargs=None): assert isinstance(expect_exists, bool) self.hook_name = hook_name self.expect_exists = expect_exists self.register_kwargs = register_kwargs or {}
class Registrationinfo(object): def __init__(self, hook_name, expect_exists, register_kwargs=None): assert isinstance(expect_exists, bool) self.hook_name = hook_name self.expect_exists = expect_exists self.register_kwargs = register_kwargs or {}
""" Write a Python function that takes a sequence of numbers and determine whether all numbers are different from each other """ def test_distinct(data): if len(data) == len(set(data)): return True else: return False print(test_distinct([1, 5, 7, 9])) print(test_distinct([2, 7, 5, 8, 8, 9, 0]))
""" Write a Python function that takes a sequence of numbers and determine whether all numbers are different from each other """ def test_distinct(data): if len(data) == len(set(data)): return True else: return False print(test_distinct([1, 5, 7, 9])) print(test_distinct([2, 7, 5, 8, 8, 9, 0]))
def includeme(config): config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('home', '/') config.add_route('api', '/api') config.add_route('download', '/download') config.add_route('docs', '/docs') config.add_route('create', '/create') config.add_route('demo', '/demo')
def includeme(config): config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('home', '/') config.add_route('api', '/api') config.add_route('download', '/download') config.add_route('docs', '/docs') config.add_route('create', '/create') config.add_route('demo', '/demo')
''' Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Note: Your returned answers (both index1 and index2) are not zero-based. You may assume that each input would have exactly one solution and you may not use the same element twice. Example: Input: numbers = [2,7,11,15], target = 9 Output: [1,2] Explanation: The sum of 2 and 7 is 9. Therefore index1 = 1, index2 = 2. ''' class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ for i in xrange(len(numbers)): if numbers[i] > target / 2: break idx = self.find(numbers, i+1, len(numbers) - 1, target - numbers[i]) if idx != -1: return [i+1, idx+1] return [-1, -1] def find(self, numbers, left, right, t): while left <= right: mid = (left + right) / 2 if numbers[mid] < t: left = mid + 1 elif numbers[mid] > t: right = mid - 1 else: return mid return -1
""" Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Note: Your returned answers (both index1 and index2) are not zero-based. You may assume that each input would have exactly one solution and you may not use the same element twice. Example: Input: numbers = [2,7,11,15], target = 9 Output: [1,2] Explanation: The sum of 2 and 7 is 9. Therefore index1 = 1, index2 = 2. """ class Solution(object): def two_sum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ for i in xrange(len(numbers)): if numbers[i] > target / 2: break idx = self.find(numbers, i + 1, len(numbers) - 1, target - numbers[i]) if idx != -1: return [i + 1, idx + 1] return [-1, -1] def find(self, numbers, left, right, t): while left <= right: mid = (left + right) / 2 if numbers[mid] < t: left = mid + 1 elif numbers[mid] > t: right = mid - 1 else: return mid return -1
metadata = Hash() data = Hash(default_value=0) sc_contract = Variable() unit_contract = Variable() terrain_contract = Variable() random.seed() @construct def seed(): metadata['operator'] = ctx.caller #prize calclulation Parameters metadata['winner_percent'] = decimal('0.09') metadata['house_percent'] = decimal('0.01') sc_contract.set('con_silver_credits') unit_contract.set('con_battlefield_units_001') terrain_contract.set('con_battlefield_terrains_001') #units per SC token metadata['UNITS_PER_SC']={ "IN": 200, "AR": 91, "HI": 67, "CA": 48, "CP": 24, "GO": 333, "OA": 71, "OR": 100, "WO": 59, "TR": 20 } data['L Wins'] = 0 data['D Wins'] = 0 @export def update_contract(update_var: str, new_contract: str): assert ctx.caller == metadata['operator'], "Only the operator update the contracts." update_var.set(new_contract) @export def change_metadata(key: str, new_value: str, convert_to_decimal: bool=False): assert ctx.caller == metadata['operator'], "Only the operator can set metadata." if convert_to_decimal: new_value = decimal(new_value) metadata[key] = new_value @export def battle(match_id: str): if data[match_id, 'private'] == 1: playerlist = data[match_id, 'players'] assert ctx.caller in playerlist, 'You are not on the list of players for this match and cannot start the battle. Contact the match creator if you wish to join.' total_L = data[match_id,'total_L'] total_D = data[match_id,'total_D'] assert total_L == total_D and total_L == data[match_id, 'battle_size'], f'There are {total_L} SC and {total_D} SC staked. These must be equal and filled to max capacity for a battle to be initiated.' operator = metadata['operator'] calc = ForeignHash(foreign_contract=unit_contract.get(), foreign_name='param_calc') terraindata = ForeignHash(foreign_contract=terrain_contract.get(), foreign_name='metadata') terrains = terraindata['terrains'] if data[match_id, 'terrain'] == 0 : terrain_type = terrains[random.randint(1, 5)] else: terrain_type = terrains[data[match_id, 'terrain']] factor_list = calc['factor_list'] factorC = factor_list[0] factorD = factor_list[1] factorE = factor_list[2] lower = factor_list[3] upper = factor_list[4] multiplier = factor_list[5] STR_bonus = factor_list[6] IN_PARAM = calc['IN','PARAM'] #IN_MS = IN_PARAM[0] :: #IN_MD = IN_PARAM[1] :: #IN_RS = IN_PARAM[2] :: #IN_RD = IN_PARAM[3] :: #IN_MDF = IN_PARAM[4] :: #IN_RDF = IN_PARAM[5] :: #IN_count = IN_PARAM[6] AR_PARAM = calc['AR','PARAM'] HI_PARAM = calc['HI','PARAM'] CA_PARAM = calc['CA','PARAM'] CP_PARAM = calc['CP','PARAM'] GO_PARAM = calc['GO','PARAM'] OA_PARAM = calc['OA','PARAM'] OR_PARAM = calc['OR','PARAM'] WO_PARAM = calc['WO','PARAM'] TR_PARAM = calc['TR','PARAM'] L_units = data[match_id, 'L_units'] IN_PARAM[6] = L_units['IN'] #transfers all unit counts from staking tokens into the parameter list for use in the functions AR_PARAM[6] = L_units['AR'] HI_PARAM[6] = L_units['HI'] CA_PARAM[6] = L_units['CA'] CP_PARAM[6] = L_units['CP'] D_units = data[match_id, 'D_units'] GO_PARAM[6] = D_units['GO'] OA_PARAM[6] = D_units['OA'] OR_PARAM[6] = D_units['OR'] WO_PARAM[6] = D_units['WO'] TR_PARAM[6] = D_units['TR'] battle_turn = 0 terrain_ = importlib.import_module(terrain_contract.get()) battle_mult = terrain_.battle_mult_update(terrain_type=terrain_type, battle_turn=battle_turn) UNITS_TOTAL = calc_army_update(factorC, factorD, battle_mult[0], battle_mult[1], IN_PARAM, AR_PARAM, HI_PARAM, CA_PARAM, CP_PARAM, GO_PARAM, OA_PARAM, OR_PARAM, WO_PARAM, TR_PARAM) #ADD ALL OTHER PARAM LISTS HERE AS UNITS ARE ADDED while UNITS_TOTAL[0] > 0 and UNITS_TOTAL[1] > 0: battle_mult = terrain_.battle_mult_update(terrain_type=terrain_type, battle_turn=battle_turn) L_ARMY_PROPERTIES = UNITS_TOTAL[2] D_ARMY_PROPERTIES = UNITS_TOTAL[3] IN_COUNT = IN_PARAM[6] #transfers all unit counts to a separate variable so loss calcs aren't dependant on who is first in the code. AR_COUNT = AR_PARAM[6] HI_COUNT = HI_PARAM[6] CA_COUNT = CA_PARAM[6] CP_COUNT = CP_PARAM[6] GO_COUNT = GO_PARAM[6] OA_COUNT = OA_PARAM[6] OR_COUNT = OR_PARAM[6] WO_COUNT = WO_PARAM[6] TR_COUNT = TR_PARAM[6] if IN_PARAM[6] > 0: IN_PARAM[6] = calc_losses(IN_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], GO_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if AR_PARAM[6] > 0: AR_PARAM[6] = calc_losses(AR_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], OR_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if HI_PARAM[6] > 0: HI_PARAM[6] = calc_losses(HI_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], WO_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if CA_PARAM[6] > 0: CA_PARAM[6] = calc_losses(CA_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], OA_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if CP_PARAM[6] > 0: CP_PARAM[6] = calc_losses(CP_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], TR_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if GO_PARAM[6] > 0: GO_PARAM[6] = calc_losses(GO_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], HI_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if OA_PARAM[6] > 0: OA_PARAM[6] = calc_losses(OA_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], IN_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if OR_PARAM[6] > 0: OR_PARAM[6] = calc_losses(OR_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], CP_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if WO_PARAM[6] > 0: WO_PARAM[6] = calc_losses(WO_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], AR_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if TR_PARAM[6] > 0: TR_PARAM[6] = calc_losses(TR_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], CA_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) UNITS_TOTAL = calc_army_update(factorC, factorD, battle_mult[0], battle_mult[1], IN_PARAM, AR_PARAM, HI_PARAM, CA_PARAM, CP_PARAM, GO_PARAM, OA_PARAM, OR_PARAM, WO_PARAM, TR_PARAM) #ADD ALL OTHER PARAM LISTS HERE AS UNITS ARE ADDED battle_turn += 1 if UNITS_TOTAL[0] > 0 and UNITS_TOTAL[1] <= 0: winner = 'L' data['L Wins'] += 1 elif UNITS_TOTAL[1] > 0 and UNITS_TOTAL[0] <= 0: winner = 'D' data['D Wins'] += 1 else: winner = 'error' data['Battle_Results'] = f'There are {int(IN_PARAM[6])} infantry, {int(AR_PARAM[6])} archers, {int(HI_PARAM[6])} heavy infantry, {int(CA_PARAM[6])} cavalry, {int(CP_PARAM[6])} catapults remaining in the LIGHT army, and there are {int(GO_PARAM[6])} goblins, {int(OA_PARAM[6])} orc archers, {int(OR_PARAM[6])} orcs, {int(WO_PARAM[6])} wolves, {int(TR_PARAM[6])} trolls remaining in the DARK army.' disperse(operator, winner, match_id) data['total_turns'] = battle_turn #may not need long term. This is just to track the total turns a battle took. def calc_losses(unit_param, factorE, multiplier, lower, upper, STR_bonus, BATTLE_M_MULT, BATTLE_R_MULT, weakness_count, faction_unit_list, faction_other_list): unit_update = (100 - (factorE ** ((((faction_other_list[0] - faction_unit_list[1] + (STR_bonus * BATTLE_M_MULT * (unit_param[7] * weakness_count)))/faction_unit_list[1]) * \ random.randint(lower, upper) * faction_other_list[4])-unit_param[4]) + factorE ** ((((faction_other_list[2] - faction_unit_list[3] + (STR_bonus * BATTLE_R_MULT * (unit_param[8] * weakness_count))) \ / faction_unit_list[3]) * random.randint(lower, upper) * faction_other_list[5])-unit_param[5])) * multiplier) / 100 * unit_param[6] if unit_update < 0: unit_update = 0 return unit_update def calc_army_update(factorC, factorD, BATTLE_M_MULT, BATTLE_R_MULT, IN_PARAM, AR_PARAM, HI_PARAM, CA_PARAM, CP_PARAM, GO_PARAM, OA_PARAM, OR_PARAM, WO_PARAM, TR_PARAM): #ADD ALL OTHER PARAM LISTS HERE AS UNITS ARE ADDED L_UNITS_IN = IN_PARAM[6] L_UNITS_AR = AR_PARAM[6] L_UNITS_HI = HI_PARAM[6] L_UNITS_CA = CA_PARAM[6] L_UNITS_CP = CP_PARAM[6] D_UNITS_GO = GO_PARAM[6] D_UNITS_OA = OA_PARAM[6] D_UNITS_OR = OR_PARAM[6] D_UNITS_WO = WO_PARAM[6] D_UNITS_TR = TR_PARAM[6] L_UNITS_TOTAL = L_UNITS_IN + L_UNITS_AR + L_UNITS_HI + L_UNITS_CA + L_UNITS_CP #add all other L units to this variable when other units are added D_UNITS_TOTAL = D_UNITS_GO + D_UNITS_OA + D_UNITS_OR + D_UNITS_WO + D_UNITS_TR #add all other D units to this variable when other units are added if L_UNITS_TOTAL > 0: #calculate updated L army totals L_ARMY_MS = (L_UNITS_IN * IN_PARAM[0] + L_UNITS_AR * AR_PARAM[0] + L_UNITS_HI * HI_PARAM[0] + L_UNITS_CA * CA_PARAM[0] + L_UNITS_CP * CP_PARAM[0]) * BATTLE_M_MULT #add all other L unit strengths here when other units are added L_ARMY_MD = (L_UNITS_IN * IN_PARAM[1] + L_UNITS_AR * AR_PARAM[1] + L_UNITS_HI * HI_PARAM[1] + L_UNITS_CA * CA_PARAM[1] + L_UNITS_CP * CP_PARAM[1]) #add all other L unit DEFENSE here when other units are added L_ARMY_RS = (L_UNITS_IN * IN_PARAM[2] + L_UNITS_AR * AR_PARAM[2] + L_UNITS_HI * HI_PARAM[2] + L_UNITS_CA * CA_PARAM[2] + L_UNITS_CP * CP_PARAM[2]) * BATTLE_R_MULT L_ARMY_RD = (L_UNITS_IN * IN_PARAM[3] + L_UNITS_AR * AR_PARAM[3] + L_UNITS_HI * HI_PARAM[3] + L_UNITS_CA * CA_PARAM[3] + L_UNITS_CP * CP_PARAM[3]) L_ARMY_MS_FACTOR = factorC * (L_ARMY_MS / L_UNITS_TOTAL) + factorD ** (L_ARMY_MS / L_UNITS_TOTAL) L_ARMY_RS_FACTOR = factorC * (L_ARMY_RS / L_UNITS_TOTAL) + factorD ** (L_ARMY_RS / L_UNITS_TOTAL) L_ARMY_PROPERTIES = [L_ARMY_MS, L_ARMY_MD, L_ARMY_RS, L_ARMY_RD, L_ARMY_MS_FACTOR, L_ARMY_RS_FACTOR] else: L_ARMY_PROPERTIES=[0,0,0,0,0,0] if D_UNITS_TOTAL > 0: #calculate updated D army totals D_ARMY_MS = (D_UNITS_GO * GO_PARAM[0] + D_UNITS_OA * OA_PARAM[0] + D_UNITS_OR * OR_PARAM[0] + D_UNITS_WO * WO_PARAM[0] + D_UNITS_TR * TR_PARAM[0]) * BATTLE_M_MULT D_ARMY_MD = (D_UNITS_GO * GO_PARAM[1] + D_UNITS_OA * OA_PARAM[1] + D_UNITS_OR * OR_PARAM[1] + D_UNITS_WO * WO_PARAM[1] + D_UNITS_TR * TR_PARAM[1]) D_ARMY_RS = (D_UNITS_GO * GO_PARAM[2] + D_UNITS_OA * OA_PARAM[2] + D_UNITS_OR * OR_PARAM[2] + D_UNITS_WO * WO_PARAM[2] + D_UNITS_TR * TR_PARAM[2]) * BATTLE_R_MULT D_ARMY_RD = (D_UNITS_GO * GO_PARAM[3] + D_UNITS_OA * OA_PARAM[3] + D_UNITS_OR * OR_PARAM[3] + D_UNITS_WO * WO_PARAM[3] + D_UNITS_TR * TR_PARAM[3]) D_ARMY_MS_FACTOR = factorC * (D_ARMY_MS / D_UNITS_TOTAL) + factorD ** (D_ARMY_MS / D_UNITS_TOTAL) D_ARMY_RS_FACTOR = factorC * (D_ARMY_RS / D_UNITS_TOTAL) + factorD ** (D_ARMY_RS / D_UNITS_TOTAL) D_ARMY_PROPERTIES = [D_ARMY_MS, D_ARMY_MD, D_ARMY_RS, D_ARMY_RD, D_ARMY_MS_FACTOR, D_ARMY_RS_FACTOR] else: D_ARMY_PROPERTIES=[0,0,0,0,0,0] UNITS_TOTAL = [L_UNITS_TOTAL, D_UNITS_TOTAL, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES] return UNITS_TOTAL def disperse(operator, winner, match_id): #calculate winnings where winners get 1.09, loser gets 0.90 and house gets 0.01 SC = importlib.import_module(sc_contract.get()) L_staked_wallets = data[match_id, 'L_staked_wallets'] D_staked_wallets = data[match_id, 'D_staked_wallets'] winner_percent = metadata['winner_percent'] house_percent = metadata['house_percent'] loser_percent = 1 - winner_percent - house_percent if winner == 'L': #send winnings to L army stakers for key, value in dict(L_staked_wallets).items(): SC.transfer(amount=value * (1 + winner_percent) , to=key) SC.transfer(amount= (value * house_percent), to=operator) #make variable for OWNER for key, value in dict(D_staked_wallets).items(): SC.transfer(amount= (value * loser_percent), to=key) if winner == 'D': #send winnings to D army stakers stakers for key, value in dict(D_staked_wallets).items(): SC.transfer(amount=value * (1 + winner_percent), to=key) SC.transfer(amount= (value * house_percent), to=operator) for key, value in dict(L_staked_wallets).items(): SC.transfer(amount= (value * loser_percent), to=key) data[match_id, 'L_staked_wallets'] = {} #clears all staked wallets from storage so a new battle can start data[match_id, 'D_staked_wallets'] = {} data[match_id, 'total_L'] = 0 data[match_id, 'total_D'] = 0 data[match_id, 'players'] = [] data[match_id, 'match_owner'] = None data[match_id, 'terrain'] = None data[match_id, 'L_units'] = {} data[match_id, 'D_units'] = {} @export def stake_L(match_id: str, IN_L: int=0, AR_L: int=0, HI_L: int=0, CA_L: int=0, CP_L: int=0): #check to see if match is private. If public, don't check the list. If private, check to see if the player is on player list. if data[match_id, 'private'] == 1: playerlist = data[match_id, 'players'] assert ctx.caller in playerlist, 'You are not on the list of players for this match. Contact the match creator if you wish to join.' sc_amount = IN_L + AR_L + HI_L + CA_L + CP_L assert sc_amount <= data[match_id, 'max_stake_per'], f"You can only stake up to {data[match_id, 'max_stake_per']} tokens per transaction. Stake less and try again." assert data[match_id, 'total_L'] + sc_amount <= data[match_id, 'battle_size'], f"You are attempting to stake {sc_amount} which is more than the {data[match_id, 'battle_size'] - data[match_id, 'total_L']} remaining to be staked for this battle. Please try again with a smaller number." staked_wallets = data[match_id, 'L_staked_wallets'] SC = importlib.import_module(sc_contract.get()) UNITS_PER_SC = metadata['UNITS_PER_SC'] L_units = data[match_id, 'L_units'] IN_amount = UNITS_PER_SC["IN"] * IN_L AR_amount = UNITS_PER_SC["AR"] * AR_L HI_amount = UNITS_PER_SC["HI"] * HI_L CA_amount = UNITS_PER_SC["CA"] * CA_L CP_amount = UNITS_PER_SC["CP"] * CP_L SC.transfer_from(amount=sc_amount, to=ctx.this, main_account=ctx.caller) if ctx.caller not in staked_wallets: staked_wallets.update({ctx.caller: sc_amount}) else: staked_wallets[ctx.caller] += sc_amount data[match_id, 'L_staked_wallets'] = staked_wallets #adds the staker to the dict for calculating rewards for winners and losers data[match_id, 'total_L'] += sc_amount #adds total SC to storage for calculating rewards L_units['IN'] += IN_amount L_units['AR'] += AR_amount L_units['HI'] += HI_amount L_units['CA'] += CA_amount L_units['CP'] += CP_amount data[match_id, 'L_units'] = L_units @export def stake_D(match_id: str, GO_D: int=0, OA_D: int=0, OR_D: int=0, WO_D: int=0, TR_D: int=0): #check to see if match is private. If public, don't check the list. If private, check to see if the player is on player list. if data[match_id, 'private'] == 1: playerlist = data[match_id, 'players'] assert ctx.caller in playerlist, 'You are not on the list of players for this match. Contact the match creator if you wish to join.' sc_amount = GO_D + OA_D + OR_D + WO_D + TR_D assert sc_amount <= data[match_id, 'max_stake_per'], f"You can only stake up to {data[match_id, 'max_stake_per']} tokens per transaction. Stake less and try again." assert data[match_id, 'total_D'] + sc_amount <= data[match_id, 'battle_size'], f"You are attempting to stake {sc_amount} which is more than the {data[match_id, 'battle_size'] - data[match_id, 'total_D']} remaining to be staked for this battle. Please try again with a smaller number." staked_wallets = data[match_id, 'D_staked_wallets'] SC = importlib.import_module(sc_contract.get()) UNITS_PER_SC = metadata['UNITS_PER_SC'] D_units = data[match_id, 'D_units'] GO_amount = UNITS_PER_SC["GO"] * GO_D OA_amount = UNITS_PER_SC["OA"] * OA_D OR_amount = UNITS_PER_SC["OR"] * OR_D WO_amount = UNITS_PER_SC["WO"] * WO_D TR_amount = UNITS_PER_SC["TR"] * TR_D SC.transfer_from(amount=sc_amount, to=ctx.this, main_account=ctx.caller) if ctx.caller not in staked_wallets: staked_wallets.update({ctx.caller: sc_amount}) else: staked_wallets[ctx.caller] += sc_amount data[match_id, 'D_staked_wallets'] = staked_wallets #adds the staker to the dict for calculating rewards for winners and losers data[match_id, 'total_D'] += sc_amount #adds total SC to storage for calculating rewards D_units['GO'] += GO_amount D_units['OA'] += OA_amount D_units['OR'] += OR_amount D_units['WO'] += WO_amount D_units['TR'] += TR_amount data[match_id, 'D_units'] = D_units @export def new_match(match_id : str, terrain: int, private : bool, battle_size : int = 500, max_stake_per_transaction : int = 500): assert bool(data[match_id, 'match_owner']) == False, "This match has already been created, please create one with a different name." data[match_id, 'match_owner'] = ctx.caller data[match_id, 'private'] = private data[match_id, 'players'] = [ctx.caller] data[match_id, 'terrain'] = terrain data[match_id, 'max_stake_per'] = max_stake_per_transaction data[match_id, 'battle_size'] = battle_size data[match_id, 'L_staked_wallets'] = {} data[match_id, 'D_staked_wallets'] = {} data[match_id, 'L_units'] = { "IN": 0, "AR": 0, "HI": 0, "CA": 0, "CP": 0 } data[match_id, 'D_units'] = { "GO": 0, "OA": 0, "OR": 0, "WO": 0, "TR": 0 } @export def add_players(match_id : str, add1: str='', add2: str='', add3: str='', add4: str=''): assert data[match_id, 'match_owner'] == ctx.caller, 'You are not the match creator and cannot add players to this match.' assert data[match_id, 'private'] == True, 'This is a public game and individual players cannot be added.' addlist = [add1, add2, add3, add4] playerlist = data[match_id, 'players'] for x in addlist: playerlist.append(x) data[match_id, 'players'] = playerlist @export def cancel_match(match_id : str): assert data[match_id, 'match_owner'] == ctx.caller, 'You are not the match creator and cannot cancel this match.' tokens = data[match_id, 'battle_size'] assert tokens > (data[match_id, 'total_L'] + data[match_id, 'total_D']), 'The match is over half full and can no longer be cancelled.' SC = importlib.import_module(sc_contract.get()) L_staked_wallets = data[match_id, 'L_staked_wallets'] D_staked_wallets = data[match_id, 'D_staked_wallets'] for key, value in dict(L_staked_wallets).items(): SC.transfer(amount=value, to=key) for key, value in dict(D_staked_wallets).items(): SC.transfer(amount=value, to=key) data[match_id, 'L_staked_wallets'] = {} #clears all staked wallets from storage so a new battle can start data[match_id, 'D_staked_wallets'] = {} data[match_id, 'total_L'] = 0 data[match_id, 'total_D'] = 0 data[match_id, 'players'] = [] data[match_id, 'match_owner'] = None data[match_id, 'terrain'] = None data[match_id, 'L_units'] = {} data[match_id, 'D_units'] = {} #Add data to store winner for each match, and then add a reset function for only me to run, so I can check balance of factions long term and reset after I update a parameter. @export def reset_stats(): assert ctx.caller == metadata['operator'], "Only the operator can reset statistics." data['L Wins'] = 0 data['D Wins'] = 0 @export def new_conquest(conquest_id : str, grid_size : int, battles_per_day: int, private : bool, battle_size : int = 500): caller = ctx.caller data[conquest_id, 'conquest_owner'] = caller data[conquest_id, 'private'] = private data[conquest_id, 'players'] = [caller] data[conquest_id, 'battle_size'] = battle_size terraindata = ForeignHash(foreign_contract=terrain_contract.get(), foreign_name='metadata') terrains = terraindata['terrains'] grid = [] g = 0 while g < grid_size: grid.append(g) g += 1 for x in grid: y = 0 while y < grid_size: grid[x].append( zone = { 'Owner' : caller, 'Faction' : random.randint(0, 1), # 0 is L and 1 is D 'Units' : { "IN": 0, "AR": 0, "HI": 0, "CA": 0, "CP": 0, "GO": 0, "OA": 0, "OR": 0, "WO": 0, "TR": 0 }, 'Terrain' : terrains[random.randint(1, 5)], }) data[conquest_id , 'map' , x , y ] = grid[x][y] y += 1 x += 1 @export def conquest_test(conquest_id: str, row : int, column : int): zone = data[conquest_id , 'map' , row , column ] data['array_test'] = zone['Faction'] data['array_test2'] = zone['Terrain'] @export def conquest_battle(conquest_id: str, row : int, column : int): #enter row and column of zone you want to attack zone = data[conquest_id , 'map' , row , column ] assert zone['Owner'] != ctx.caller, 'You own this territory and cannot attack it.' zoneup = data[conquest_id , 'map' , row , column - 1] zonedown = data[conquest_id , 'map' , row , column + 1] zoneleft = data[conquest_id , 'map' , row , column - 1] zoneright = data[conquest_id , 'map' , row , column + 1] assert zoneup['Owner'] or zonedown['Owner'] or zoneleft['Owner'] or zoneright['Owner'] == ctx.caller, 'You cannot attack this territory since you do not own an adjacent territory.' #add check to make sure the zone you're attacking is attackable @export def emergency_return(match_id : str): assert ctx.caller == metadata['operator'], "Only the operator can initiate an emergency return of tokens." SC = importlib.import_module(sc_contract.get()) L_staked_wallets = data[match_id, 'L_staked_wallets'] D_staked_wallets = data[match_id, 'D_staked_wallets'] for key, value in dict(L_staked_wallets).items(): SC.transfer(amount=value, to=key) for key, value in dict(D_staked_wallets).items(): SC.transfer(amount=value, to=key) data[match_id, 'L_staked_wallets'] = {} #clears all staked wallets from storage so a new battle can start data[match_id, 'D_staked_wallets'] = {} data[match_id, 'total_L'] = 0 data[match_id, 'total_D'] = 0 data[match_id, 'players'] = [] data[match_id, 'match_owner'] = None data[match_id, 'terrain'] = None data[match_id, 'L_units'] = {} data[match_id, 'D_units'] = {}
metadata = hash() data = hash(default_value=0) sc_contract = variable() unit_contract = variable() terrain_contract = variable() random.seed() @construct def seed(): metadata['operator'] = ctx.caller metadata['winner_percent'] = decimal('0.09') metadata['house_percent'] = decimal('0.01') sc_contract.set('con_silver_credits') unit_contract.set('con_battlefield_units_001') terrain_contract.set('con_battlefield_terrains_001') metadata['UNITS_PER_SC'] = {'IN': 200, 'AR': 91, 'HI': 67, 'CA': 48, 'CP': 24, 'GO': 333, 'OA': 71, 'OR': 100, 'WO': 59, 'TR': 20} data['L Wins'] = 0 data['D Wins'] = 0 @export def update_contract(update_var: str, new_contract: str): assert ctx.caller == metadata['operator'], 'Only the operator update the contracts.' update_var.set(new_contract) @export def change_metadata(key: str, new_value: str, convert_to_decimal: bool=False): assert ctx.caller == metadata['operator'], 'Only the operator can set metadata.' if convert_to_decimal: new_value = decimal(new_value) metadata[key] = new_value @export def battle(match_id: str): if data[match_id, 'private'] == 1: playerlist = data[match_id, 'players'] assert ctx.caller in playerlist, 'You are not on the list of players for this match and cannot start the battle. Contact the match creator if you wish to join.' total_l = data[match_id, 'total_L'] total_d = data[match_id, 'total_D'] assert total_L == total_D and total_L == data[match_id, 'battle_size'], f'There are {total_L} SC and {total_D} SC staked. These must be equal and filled to max capacity for a battle to be initiated.' operator = metadata['operator'] calc = foreign_hash(foreign_contract=unit_contract.get(), foreign_name='param_calc') terraindata = foreign_hash(foreign_contract=terrain_contract.get(), foreign_name='metadata') terrains = terraindata['terrains'] if data[match_id, 'terrain'] == 0: terrain_type = terrains[random.randint(1, 5)] else: terrain_type = terrains[data[match_id, 'terrain']] factor_list = calc['factor_list'] factor_c = factor_list[0] factor_d = factor_list[1] factor_e = factor_list[2] lower = factor_list[3] upper = factor_list[4] multiplier = factor_list[5] str_bonus = factor_list[6] in_param = calc['IN', 'PARAM'] ar_param = calc['AR', 'PARAM'] hi_param = calc['HI', 'PARAM'] ca_param = calc['CA', 'PARAM'] cp_param = calc['CP', 'PARAM'] go_param = calc['GO', 'PARAM'] oa_param = calc['OA', 'PARAM'] or_param = calc['OR', 'PARAM'] wo_param = calc['WO', 'PARAM'] tr_param = calc['TR', 'PARAM'] l_units = data[match_id, 'L_units'] IN_PARAM[6] = L_units['IN'] AR_PARAM[6] = L_units['AR'] HI_PARAM[6] = L_units['HI'] CA_PARAM[6] = L_units['CA'] CP_PARAM[6] = L_units['CP'] d_units = data[match_id, 'D_units'] GO_PARAM[6] = D_units['GO'] OA_PARAM[6] = D_units['OA'] OR_PARAM[6] = D_units['OR'] WO_PARAM[6] = D_units['WO'] TR_PARAM[6] = D_units['TR'] battle_turn = 0 terrain_ = importlib.import_module(terrain_contract.get()) battle_mult = terrain_.battle_mult_update(terrain_type=terrain_type, battle_turn=battle_turn) units_total = calc_army_update(factorC, factorD, battle_mult[0], battle_mult[1], IN_PARAM, AR_PARAM, HI_PARAM, CA_PARAM, CP_PARAM, GO_PARAM, OA_PARAM, OR_PARAM, WO_PARAM, TR_PARAM) while UNITS_TOTAL[0] > 0 and UNITS_TOTAL[1] > 0: battle_mult = terrain_.battle_mult_update(terrain_type=terrain_type, battle_turn=battle_turn) l_army_properties = UNITS_TOTAL[2] d_army_properties = UNITS_TOTAL[3] in_count = IN_PARAM[6] ar_count = AR_PARAM[6] hi_count = HI_PARAM[6] ca_count = CA_PARAM[6] cp_count = CP_PARAM[6] go_count = GO_PARAM[6] oa_count = OA_PARAM[6] or_count = OR_PARAM[6] wo_count = WO_PARAM[6] tr_count = TR_PARAM[6] if IN_PARAM[6] > 0: IN_PARAM[6] = calc_losses(IN_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], GO_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if AR_PARAM[6] > 0: AR_PARAM[6] = calc_losses(AR_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], OR_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if HI_PARAM[6] > 0: HI_PARAM[6] = calc_losses(HI_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], WO_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if CA_PARAM[6] > 0: CA_PARAM[6] = calc_losses(CA_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], OA_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if CP_PARAM[6] > 0: CP_PARAM[6] = calc_losses(CP_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], TR_COUNT, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES) if GO_PARAM[6] > 0: GO_PARAM[6] = calc_losses(GO_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], HI_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if OA_PARAM[6] > 0: OA_PARAM[6] = calc_losses(OA_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], IN_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if OR_PARAM[6] > 0: OR_PARAM[6] = calc_losses(OR_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], CP_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if WO_PARAM[6] > 0: WO_PARAM[6] = calc_losses(WO_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], AR_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) if TR_PARAM[6] > 0: TR_PARAM[6] = calc_losses(TR_PARAM, factorE, multiplier, lower, upper, STR_bonus, battle_mult[0], battle_mult[1], CA_COUNT, D_ARMY_PROPERTIES, L_ARMY_PROPERTIES) units_total = calc_army_update(factorC, factorD, battle_mult[0], battle_mult[1], IN_PARAM, AR_PARAM, HI_PARAM, CA_PARAM, CP_PARAM, GO_PARAM, OA_PARAM, OR_PARAM, WO_PARAM, TR_PARAM) battle_turn += 1 if UNITS_TOTAL[0] > 0 and UNITS_TOTAL[1] <= 0: winner = 'L' data['L Wins'] += 1 elif UNITS_TOTAL[1] > 0 and UNITS_TOTAL[0] <= 0: winner = 'D' data['D Wins'] += 1 else: winner = 'error' data['Battle_Results'] = f'There are {int(IN_PARAM[6])} infantry, {int(AR_PARAM[6])} archers, {int(HI_PARAM[6])} heavy infantry, {int(CA_PARAM[6])} cavalry, {int(CP_PARAM[6])} catapults remaining in the LIGHT army, and there are {int(GO_PARAM[6])} goblins, {int(OA_PARAM[6])} orc archers, {int(OR_PARAM[6])} orcs, {int(WO_PARAM[6])} wolves, {int(TR_PARAM[6])} trolls remaining in the DARK army.' disperse(operator, winner, match_id) data['total_turns'] = battle_turn def calc_losses(unit_param, factorE, multiplier, lower, upper, STR_bonus, BATTLE_M_MULT, BATTLE_R_MULT, weakness_count, faction_unit_list, faction_other_list): unit_update = (100 - (factorE ** ((faction_other_list[0] - faction_unit_list[1] + STR_bonus * BATTLE_M_MULT * (unit_param[7] * weakness_count)) / faction_unit_list[1] * random.randint(lower, upper) * faction_other_list[4] - unit_param[4]) + factorE ** ((faction_other_list[2] - faction_unit_list[3] + STR_bonus * BATTLE_R_MULT * (unit_param[8] * weakness_count)) / faction_unit_list[3] * random.randint(lower, upper) * faction_other_list[5] - unit_param[5])) * multiplier) / 100 * unit_param[6] if unit_update < 0: unit_update = 0 return unit_update def calc_army_update(factorC, factorD, BATTLE_M_MULT, BATTLE_R_MULT, IN_PARAM, AR_PARAM, HI_PARAM, CA_PARAM, CP_PARAM, GO_PARAM, OA_PARAM, OR_PARAM, WO_PARAM, TR_PARAM): l_units_in = IN_PARAM[6] l_units_ar = AR_PARAM[6] l_units_hi = HI_PARAM[6] l_units_ca = CA_PARAM[6] l_units_cp = CP_PARAM[6] d_units_go = GO_PARAM[6] d_units_oa = OA_PARAM[6] d_units_or = OR_PARAM[6] d_units_wo = WO_PARAM[6] d_units_tr = TR_PARAM[6] l_units_total = L_UNITS_IN + L_UNITS_AR + L_UNITS_HI + L_UNITS_CA + L_UNITS_CP d_units_total = D_UNITS_GO + D_UNITS_OA + D_UNITS_OR + D_UNITS_WO + D_UNITS_TR if L_UNITS_TOTAL > 0: l_army_ms = (L_UNITS_IN * IN_PARAM[0] + L_UNITS_AR * AR_PARAM[0] + L_UNITS_HI * HI_PARAM[0] + L_UNITS_CA * CA_PARAM[0] + L_UNITS_CP * CP_PARAM[0]) * BATTLE_M_MULT l_army_md = L_UNITS_IN * IN_PARAM[1] + L_UNITS_AR * AR_PARAM[1] + L_UNITS_HI * HI_PARAM[1] + L_UNITS_CA * CA_PARAM[1] + L_UNITS_CP * CP_PARAM[1] l_army_rs = (L_UNITS_IN * IN_PARAM[2] + L_UNITS_AR * AR_PARAM[2] + L_UNITS_HI * HI_PARAM[2] + L_UNITS_CA * CA_PARAM[2] + L_UNITS_CP * CP_PARAM[2]) * BATTLE_R_MULT l_army_rd = L_UNITS_IN * IN_PARAM[3] + L_UNITS_AR * AR_PARAM[3] + L_UNITS_HI * HI_PARAM[3] + L_UNITS_CA * CA_PARAM[3] + L_UNITS_CP * CP_PARAM[3] l_army_ms_factor = factorC * (L_ARMY_MS / L_UNITS_TOTAL) + factorD ** (L_ARMY_MS / L_UNITS_TOTAL) l_army_rs_factor = factorC * (L_ARMY_RS / L_UNITS_TOTAL) + factorD ** (L_ARMY_RS / L_UNITS_TOTAL) l_army_properties = [L_ARMY_MS, L_ARMY_MD, L_ARMY_RS, L_ARMY_RD, L_ARMY_MS_FACTOR, L_ARMY_RS_FACTOR] else: l_army_properties = [0, 0, 0, 0, 0, 0] if D_UNITS_TOTAL > 0: d_army_ms = (D_UNITS_GO * GO_PARAM[0] + D_UNITS_OA * OA_PARAM[0] + D_UNITS_OR * OR_PARAM[0] + D_UNITS_WO * WO_PARAM[0] + D_UNITS_TR * TR_PARAM[0]) * BATTLE_M_MULT d_army_md = D_UNITS_GO * GO_PARAM[1] + D_UNITS_OA * OA_PARAM[1] + D_UNITS_OR * OR_PARAM[1] + D_UNITS_WO * WO_PARAM[1] + D_UNITS_TR * TR_PARAM[1] d_army_rs = (D_UNITS_GO * GO_PARAM[2] + D_UNITS_OA * OA_PARAM[2] + D_UNITS_OR * OR_PARAM[2] + D_UNITS_WO * WO_PARAM[2] + D_UNITS_TR * TR_PARAM[2]) * BATTLE_R_MULT d_army_rd = D_UNITS_GO * GO_PARAM[3] + D_UNITS_OA * OA_PARAM[3] + D_UNITS_OR * OR_PARAM[3] + D_UNITS_WO * WO_PARAM[3] + D_UNITS_TR * TR_PARAM[3] d_army_ms_factor = factorC * (D_ARMY_MS / D_UNITS_TOTAL) + factorD ** (D_ARMY_MS / D_UNITS_TOTAL) d_army_rs_factor = factorC * (D_ARMY_RS / D_UNITS_TOTAL) + factorD ** (D_ARMY_RS / D_UNITS_TOTAL) d_army_properties = [D_ARMY_MS, D_ARMY_MD, D_ARMY_RS, D_ARMY_RD, D_ARMY_MS_FACTOR, D_ARMY_RS_FACTOR] else: d_army_properties = [0, 0, 0, 0, 0, 0] units_total = [L_UNITS_TOTAL, D_UNITS_TOTAL, L_ARMY_PROPERTIES, D_ARMY_PROPERTIES] return UNITS_TOTAL def disperse(operator, winner, match_id): sc = importlib.import_module(sc_contract.get()) l_staked_wallets = data[match_id, 'L_staked_wallets'] d_staked_wallets = data[match_id, 'D_staked_wallets'] winner_percent = metadata['winner_percent'] house_percent = metadata['house_percent'] loser_percent = 1 - winner_percent - house_percent if winner == 'L': for (key, value) in dict(L_staked_wallets).items(): SC.transfer(amount=value * (1 + winner_percent), to=key) SC.transfer(amount=value * house_percent, to=operator) for (key, value) in dict(D_staked_wallets).items(): SC.transfer(amount=value * loser_percent, to=key) if winner == 'D': for (key, value) in dict(D_staked_wallets).items(): SC.transfer(amount=value * (1 + winner_percent), to=key) SC.transfer(amount=value * house_percent, to=operator) for (key, value) in dict(L_staked_wallets).items(): SC.transfer(amount=value * loser_percent, to=key) data[match_id, 'L_staked_wallets'] = {} data[match_id, 'D_staked_wallets'] = {} data[match_id, 'total_L'] = 0 data[match_id, 'total_D'] = 0 data[match_id, 'players'] = [] data[match_id, 'match_owner'] = None data[match_id, 'terrain'] = None data[match_id, 'L_units'] = {} data[match_id, 'D_units'] = {} @export def stake_l(match_id: str, IN_L: int=0, AR_L: int=0, HI_L: int=0, CA_L: int=0, CP_L: int=0): if data[match_id, 'private'] == 1: playerlist = data[match_id, 'players'] assert ctx.caller in playerlist, 'You are not on the list of players for this match. Contact the match creator if you wish to join.' sc_amount = IN_L + AR_L + HI_L + CA_L + CP_L assert sc_amount <= data[match_id, 'max_stake_per'], f"You can only stake up to {data[match_id, 'max_stake_per']} tokens per transaction. Stake less and try again." assert data[match_id, 'total_L'] + sc_amount <= data[match_id, 'battle_size'], f"You are attempting to stake {sc_amount} which is more than the {data[match_id, 'battle_size'] - data[match_id, 'total_L']} remaining to be staked for this battle. Please try again with a smaller number." staked_wallets = data[match_id, 'L_staked_wallets'] sc = importlib.import_module(sc_contract.get()) units_per_sc = metadata['UNITS_PER_SC'] l_units = data[match_id, 'L_units'] in_amount = UNITS_PER_SC['IN'] * IN_L ar_amount = UNITS_PER_SC['AR'] * AR_L hi_amount = UNITS_PER_SC['HI'] * HI_L ca_amount = UNITS_PER_SC['CA'] * CA_L cp_amount = UNITS_PER_SC['CP'] * CP_L SC.transfer_from(amount=sc_amount, to=ctx.this, main_account=ctx.caller) if ctx.caller not in staked_wallets: staked_wallets.update({ctx.caller: sc_amount}) else: staked_wallets[ctx.caller] += sc_amount data[match_id, 'L_staked_wallets'] = staked_wallets data[match_id, 'total_L'] += sc_amount L_units['IN'] += IN_amount L_units['AR'] += AR_amount L_units['HI'] += HI_amount L_units['CA'] += CA_amount L_units['CP'] += CP_amount data[match_id, 'L_units'] = L_units @export def stake_d(match_id: str, GO_D: int=0, OA_D: int=0, OR_D: int=0, WO_D: int=0, TR_D: int=0): if data[match_id, 'private'] == 1: playerlist = data[match_id, 'players'] assert ctx.caller in playerlist, 'You are not on the list of players for this match. Contact the match creator if you wish to join.' sc_amount = GO_D + OA_D + OR_D + WO_D + TR_D assert sc_amount <= data[match_id, 'max_stake_per'], f"You can only stake up to {data[match_id, 'max_stake_per']} tokens per transaction. Stake less and try again." assert data[match_id, 'total_D'] + sc_amount <= data[match_id, 'battle_size'], f"You are attempting to stake {sc_amount} which is more than the {data[match_id, 'battle_size'] - data[match_id, 'total_D']} remaining to be staked for this battle. Please try again with a smaller number." staked_wallets = data[match_id, 'D_staked_wallets'] sc = importlib.import_module(sc_contract.get()) units_per_sc = metadata['UNITS_PER_SC'] d_units = data[match_id, 'D_units'] go_amount = UNITS_PER_SC['GO'] * GO_D oa_amount = UNITS_PER_SC['OA'] * OA_D or_amount = UNITS_PER_SC['OR'] * OR_D wo_amount = UNITS_PER_SC['WO'] * WO_D tr_amount = UNITS_PER_SC['TR'] * TR_D SC.transfer_from(amount=sc_amount, to=ctx.this, main_account=ctx.caller) if ctx.caller not in staked_wallets: staked_wallets.update({ctx.caller: sc_amount}) else: staked_wallets[ctx.caller] += sc_amount data[match_id, 'D_staked_wallets'] = staked_wallets data[match_id, 'total_D'] += sc_amount D_units['GO'] += GO_amount D_units['OA'] += OA_amount D_units['OR'] += OR_amount D_units['WO'] += WO_amount D_units['TR'] += TR_amount data[match_id, 'D_units'] = D_units @export def new_match(match_id: str, terrain: int, private: bool, battle_size: int=500, max_stake_per_transaction: int=500): assert bool(data[match_id, 'match_owner']) == False, 'This match has already been created, please create one with a different name.' data[match_id, 'match_owner'] = ctx.caller data[match_id, 'private'] = private data[match_id, 'players'] = [ctx.caller] data[match_id, 'terrain'] = terrain data[match_id, 'max_stake_per'] = max_stake_per_transaction data[match_id, 'battle_size'] = battle_size data[match_id, 'L_staked_wallets'] = {} data[match_id, 'D_staked_wallets'] = {} data[match_id, 'L_units'] = {'IN': 0, 'AR': 0, 'HI': 0, 'CA': 0, 'CP': 0} data[match_id, 'D_units'] = {'GO': 0, 'OA': 0, 'OR': 0, 'WO': 0, 'TR': 0} @export def add_players(match_id: str, add1: str='', add2: str='', add3: str='', add4: str=''): assert data[match_id, 'match_owner'] == ctx.caller, 'You are not the match creator and cannot add players to this match.' assert data[match_id, 'private'] == True, 'This is a public game and individual players cannot be added.' addlist = [add1, add2, add3, add4] playerlist = data[match_id, 'players'] for x in addlist: playerlist.append(x) data[match_id, 'players'] = playerlist @export def cancel_match(match_id: str): assert data[match_id, 'match_owner'] == ctx.caller, 'You are not the match creator and cannot cancel this match.' tokens = data[match_id, 'battle_size'] assert tokens > data[match_id, 'total_L'] + data[match_id, 'total_D'], 'The match is over half full and can no longer be cancelled.' sc = importlib.import_module(sc_contract.get()) l_staked_wallets = data[match_id, 'L_staked_wallets'] d_staked_wallets = data[match_id, 'D_staked_wallets'] for (key, value) in dict(L_staked_wallets).items(): SC.transfer(amount=value, to=key) for (key, value) in dict(D_staked_wallets).items(): SC.transfer(amount=value, to=key) data[match_id, 'L_staked_wallets'] = {} data[match_id, 'D_staked_wallets'] = {} data[match_id, 'total_L'] = 0 data[match_id, 'total_D'] = 0 data[match_id, 'players'] = [] data[match_id, 'match_owner'] = None data[match_id, 'terrain'] = None data[match_id, 'L_units'] = {} data[match_id, 'D_units'] = {} @export def reset_stats(): assert ctx.caller == metadata['operator'], 'Only the operator can reset statistics.' data['L Wins'] = 0 data['D Wins'] = 0 @export def new_conquest(conquest_id: str, grid_size: int, battles_per_day: int, private: bool, battle_size: int=500): caller = ctx.caller data[conquest_id, 'conquest_owner'] = caller data[conquest_id, 'private'] = private data[conquest_id, 'players'] = [caller] data[conquest_id, 'battle_size'] = battle_size terraindata = foreign_hash(foreign_contract=terrain_contract.get(), foreign_name='metadata') terrains = terraindata['terrains'] grid = [] g = 0 while g < grid_size: grid.append(g) g += 1 for x in grid: y = 0 while y < grid_size: grid[x].append(zone={'Owner': caller, 'Faction': random.randint(0, 1), 'Units': {'IN': 0, 'AR': 0, 'HI': 0, 'CA': 0, 'CP': 0, 'GO': 0, 'OA': 0, 'OR': 0, 'WO': 0, 'TR': 0}, 'Terrain': terrains[random.randint(1, 5)]}) data[conquest_id, 'map', x, y] = grid[x][y] y += 1 x += 1 @export def conquest_test(conquest_id: str, row: int, column: int): zone = data[conquest_id, 'map', row, column] data['array_test'] = zone['Faction'] data['array_test2'] = zone['Terrain'] @export def conquest_battle(conquest_id: str, row: int, column: int): zone = data[conquest_id, 'map', row, column] assert zone['Owner'] != ctx.caller, 'You own this territory and cannot attack it.' zoneup = data[conquest_id, 'map', row, column - 1] zonedown = data[conquest_id, 'map', row, column + 1] zoneleft = data[conquest_id, 'map', row, column - 1] zoneright = data[conquest_id, 'map', row, column + 1] assert zoneup['Owner'] or zonedown['Owner'] or zoneleft['Owner'] or (zoneright['Owner'] == ctx.caller), 'You cannot attack this territory since you do not own an adjacent territory.' @export def emergency_return(match_id: str): assert ctx.caller == metadata['operator'], 'Only the operator can initiate an emergency return of tokens.' sc = importlib.import_module(sc_contract.get()) l_staked_wallets = data[match_id, 'L_staked_wallets'] d_staked_wallets = data[match_id, 'D_staked_wallets'] for (key, value) in dict(L_staked_wallets).items(): SC.transfer(amount=value, to=key) for (key, value) in dict(D_staked_wallets).items(): SC.transfer(amount=value, to=key) data[match_id, 'L_staked_wallets'] = {} data[match_id, 'D_staked_wallets'] = {} data[match_id, 'total_L'] = 0 data[match_id, 'total_D'] = 0 data[match_id, 'players'] = [] data[match_id, 'match_owner'] = None data[match_id, 'terrain'] = None data[match_id, 'L_units'] = {} data[match_id, 'D_units'] = {}
# -*- coding: utf-8 -*- """Top-level package for poker_project.""" __author__ = """Zack Raffo""" __email__ = 'raffo.z@husky.neu.edu' __version__ = '0.1.0'
"""Top-level package for poker_project.""" __author__ = 'Zack Raffo' __email__ = 'raffo.z@husky.neu.edu' __version__ = '0.1.0'
def tic_tac_toe(): board = [1, 2, 3, 4, 5, 6, 7, 8, 9] end = False win_commbinations = ((0, 1, 2), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)) def draw(): print(board[0], board[1], board[2]) print(board[3], board[4], board[5]) print(board[6], board[7], board[8]) print() def p1(): n = choose_number() if board[n] == "X" or board[n] == "O": print("\nYou can't go there. Try again") p1() else: board[n] = "X" def p2(): n = choose_number() if board[n] == "X" or board[n] == "O": print("\nYou can't go there. Try again") p2() else: board[n] = "O" def choose_number(): while True: while True: a = input() try: a = int(a) a -= 1 if a in range(0, 9): return a else: print("\nThat's not on the board. Try again") continue except ValueError: print("\nThat's not a number. Try again") continue def check_board(): count = 0 for a in win_commbinations: if board[a[0]] == board[a[1]] == board[a[2]] == "X": print("Player 1 Wins!\n") print("Congratulations!\n") return True if board[a[0]] == board[a[1]] == board[a[2]] == "O": print("Player 2 Wins!\n") print("Congratulations!\n") return True for a in range(9): if board[a] == "X" or board[a] == "O": count += 1 if count == 9: print("The game ends in a Tie\n") return True while not end: draw() end = check_board() if end == True: break print("Player 1 choose where to place a cross") p1() print() draw() end = check_board() if end == True: break print("Player 2 choose where to place a nought") p2() print() if input("Play again (y/n)\n") == "y": print() tic_tac_toe() tic_tac_toe()
def tic_tac_toe(): board = [1, 2, 3, 4, 5, 6, 7, 8, 9] end = False win_commbinations = ((0, 1, 2), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)) def draw(): print(board[0], board[1], board[2]) print(board[3], board[4], board[5]) print(board[6], board[7], board[8]) print() def p1(): n = choose_number() if board[n] == 'X' or board[n] == 'O': print("\nYou can't go there. Try again") p1() else: board[n] = 'X' def p2(): n = choose_number() if board[n] == 'X' or board[n] == 'O': print("\nYou can't go there. Try again") p2() else: board[n] = 'O' def choose_number(): while True: while True: a = input() try: a = int(a) a -= 1 if a in range(0, 9): return a else: print("\nThat's not on the board. Try again") continue except ValueError: print("\nThat's not a number. Try again") continue def check_board(): count = 0 for a in win_commbinations: if board[a[0]] == board[a[1]] == board[a[2]] == 'X': print('Player 1 Wins!\n') print('Congratulations!\n') return True if board[a[0]] == board[a[1]] == board[a[2]] == 'O': print('Player 2 Wins!\n') print('Congratulations!\n') return True for a in range(9): if board[a] == 'X' or board[a] == 'O': count += 1 if count == 9: print('The game ends in a Tie\n') return True while not end: draw() end = check_board() if end == True: break print('Player 1 choose where to place a cross') p1() print() draw() end = check_board() if end == True: break print('Player 2 choose where to place a nought') p2() print() if input('Play again (y/n)\n') == 'y': print() tic_tac_toe() tic_tac_toe()
# This is the library where we store the value of the different constants # In order to use this library do: # import units_library as UL # U = UL.units() # kpc = U.kpc_cm class units: def __init__(self): self.rho_crit = 2.77536627e11 #h^2 Msun/Mpc^3 self.c_kms = 3e5 #km/s self.Mpc_cm = 3.0856e24 #cm self.kpc_cm = 3.0856e21 #cm self.Msun_g = 1.989e33 #g self.Ymass = 0.24 #helium mass fraction self.mH_g = 1.6726e-24 #proton mass in grams self.yr_s = 3.15576e7 #seconds self.km_cm = 1e5 #cm self.kB = 1.3806e-26 #gr (km/s)^2 K^{-1} self.nu0_MHz = 1420.0 #21-cm frequency in MHz
class Units: def __init__(self): self.rho_crit = 277536627000.0 self.c_kms = 300000.0 self.Mpc_cm = 3.0856e+24 self.kpc_cm = 3.0856e+21 self.Msun_g = 1.989e+33 self.Ymass = 0.24 self.mH_g = 1.6726e-24 self.yr_s = 31557600.0 self.km_cm = 100000.0 self.kB = 1.3806e-26 self.nu0_MHz = 1420.0
def get_transporter(configuration): transporter_module = configuration.get_module_transporter() transporter_configuration = configuration.get_configuration() return transporter_module.get_transporter(transporter_configuration)
def get_transporter(configuration): transporter_module = configuration.get_module_transporter() transporter_configuration = configuration.get_configuration() return transporter_module.get_transporter(transporter_configuration)
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class HadoopDistributionEnum(object): """Implementation of the 'HadoopDistributionEnum' enum. Specifies the Hadoop Distribution. Hadoop distribution. 'CDH' indicates Hadoop distribution type Cloudera. 'HDP' indicates Hadoop distribution type Hortonworks. """ CDH = 'CDH' HDP = 'HDP'
class Hadoopdistributionenum(object): """Implementation of the 'HadoopDistributionEnum' enum. Specifies the Hadoop Distribution. Hadoop distribution. 'CDH' indicates Hadoop distribution type Cloudera. 'HDP' indicates Hadoop distribution type Hortonworks. """ cdh = 'CDH' hdp = 'HDP'
def LCSlength(X, Y, lx, ly): # Parameters are the two strings and their lengths if lx == 0 or ly == 0: return 0 if X[lx - 1] == Y[ly - 1]: return LCSlength(X, Y, lx - 1, ly - 1) + 1 return max(LCSlength(X, Y, lx - 1, ly), LCSlength(X, Y, lx, ly - 1)) print("Enter the first string : \n") X = input() print("Enter the second string: \n") Y = input() print("The length of the LCS is : {}".format(LCSlength(X, Y, len(X), len(Y)))) # This solution has a time complexity of o(2^(lx+ly)) # Also, this LCS problem has overlapping subproblems
def lc_slength(X, Y, lx, ly): if lx == 0 or ly == 0: return 0 if X[lx - 1] == Y[ly - 1]: return lc_slength(X, Y, lx - 1, ly - 1) + 1 return max(lc_slength(X, Y, lx - 1, ly), lc_slength(X, Y, lx, ly - 1)) print('Enter the first string : \n') x = input() print('Enter the second string: \n') y = input() print('The length of the LCS is : {}'.format(lc_slength(X, Y, len(X), len(Y))))
def areRotations(someString, someSubstring): tempString = 2 * someString return tempString.find(someSubstring, 0, len(tempString)) print(areRotations("AACD", "ACDA")) print(areRotations("AACD", "AADC"))
def are_rotations(someString, someSubstring): temp_string = 2 * someString return tempString.find(someSubstring, 0, len(tempString)) print(are_rotations('AACD', 'ACDA')) print(are_rotations('AACD', 'AADC'))
m= ["qzbw", "qez", ],[ "xgedfibnyuhqsrazlwtpocj", "fxgpoqijdzybletckwaunsr", "pwnqsizrfcbyljexgouatd", "ljtperqsodghnufiycxwabz", ],[ "uk", "kupacjlriv", "dku", "qunk", ],[ "yjnprofmcuhdlawt", "frmhulyncvweatodzjp", "fhadtrcyjzwlnpumo", "hrcutablndyjpfmwo", ],[ "rdclv", "lrvdc", "crldv", "dvrcl", "vrlcd", ],[ "dqrwajpb", "asrfpdjwbq", "wjdtarq", ],[ "nalkhgoi", "bmiad", "sdvpiyerma", "ami", ],[ "smg", "wlmdftcr", "mk", "my", ],[ "ebaxsun", "uaxnebs", "suxnbea", "eanxusb", "aexusnb", ],[ "zoxegrfd", "qorjv", "oqr", "vor", "roq", ],[ "jpasdnrcvhglft", "dgkstavnhjrclfx", "crtndjglfvwahq", "hjclinvdtagrkf", "gjfcdtuhlanvr", ],[ "exiopqbgrj", "undhwyfkvltis", ],[ "npsxwlyog", "udylki", ],[ "bnuwck", "nuack", ],[ "cahpwtlozkm", "ghnpzfqmoxabi", ],[ "hvwgxesraocbpnf", "ewvranqcpbghoxf", "paxfnwoegrhcvub", "qbrawpfscexngvho", "ahpxognlrvebwfc", ],[ "agqmwpvlb", "waklrnbqyp", "blquawtp", "qltabwp", ],[ "rymhgolkustipjxbzqnafe", "frzqjiuktbsxmahdepylg", ],[ "zricqdofygvtbsjmeu", "vudjctzynegboiafqmrsx", "rsbefoytcqgiuvzdjm", "zucobitsgyjrfqemvd", ],[ "y", "yc", "tg", "lavoqef", "by", ],[ "fevykin", "wxytrhqk", ],[ "pxbclzknowyq", "lybwkpcoqxn", "oknlpbxcyqw", ],[ "l", "f", "gixvd", ],[ "unogwsfavzkhi", "siohufnkzgavw", "ahitunswfvkzog", "gvhknzuaisfow", "ukasozfihnwgv", ],[ "ulhgwo", "ghluo", "ogulh", "oughl", "lphuog", ],[ "nike", "bkn", ],[ "gefzwrdjsqx", "fegzsjwxrpqh", ],[ "lfknweboxyrpajmig", "gkpafnieojybrwl", "iafesdyulrkpgnwbjo", ],[ "zjoiqtgpwxdach", "iajdhqucpxtzgl", ],[ "yhav", "vnshac", "hcav", "hvw", "cyvh", ],[ "hwz", "whz", ],[ "dhunracmzksvxopjgtbqi", "vqhpowubyzirdksmgca", ],[ "ckrhefz", "rkvexdfzcbh", "heczkrf", ],[ "rbsldt", "qgr", ],[ "a", "ea", "a", ],[ "wnadxkgehtpsv", "gwnexkavshpd", "bfkdpansvhewxg", "kvtwdnsahpxge", "xnhdpvekwgsa", ],[ "ydajvctr", "drcejtgin", ],[ "kw", "cbmj", "l", "t", "n", ],[ "gyzlnp", "zahsyu", "rek", ],[ "vjdmhsorqw", "whdjoqvrms", "rhsjqdmov", "omdsqjrzhv", ],[ "rcxsgnluhtqey", "ldejuqpykrtc", ],[ "rylcqxt", "wlgtzyrcf", "yrltc", "rclpyt", ],[ "frke", "kfe", ],[ "nchvxtqarsejld", "rkhntaexcbqljod", "qhdepzrxljtifcan", ],[ "uyfshgxzbqvrdwintjlmec", "oyrvdwtgeczsfbmluqih", "kabdlqytwgfrhmuevczpsi", ],[ "guwmkrfyex", "fxekmrygwu", "wfgremukiyx", "aywegkrmxufl", "wukygimrxfe", ],[ "m", "m", "m", "m", "m", ],[ "hbgnkqe", "khgn", ],[ "hngypzmd", "oixyanpdg", ],[ "qbdklpvhjaeif", "kzaiglyjfpmeurn", ],[ "ynsm", "smjn", "nsyum", ],[ "mpcztqkydxifv", "zdqfvxtmpcyk", "zkcmxfpqvydt", "yopktfnqrmvxdczw", "mdckxypvztqf", ],[ "va", "bvhg", ],[ "fe", "ef", ],[ "n", "hpmqn", "n", "dn", ],[ "njxazhtevsmlir", "txmsijvaezwn", "tezacmwsvinxj", ],[ "gvzpbmeijyhaukflcrdqw", "sivlhgumyzkdrjfeoxqtc", ],[ "ouq", "h", ],[ "csxewy", "kxoscmw", "ucnvwsxg", "hfocysxmiwe", "wcsmx", ],[ "retcxugsdwjnykm", "sfhudnxoqwjktyzarc", "rklvinxudpsbywtjc", ],[ "cwfizpyguatbodsqemxrjknlv", "ujikxwsmntcloyqgaebrzfdvp", "jreyubofkpdnzsimxwvgaqtlc", "nuewfvmlidsatzqbkcjgorpyx", ],[ "ycqolubpktxwshegafvm", "djnlhafsreuzgxkb", ],[ "odasxjtqcepgrzl", "jsoelxpqgtczam", "qiajrhesdzoxfplcgt", ],[ "vnthkurzf", "bnfpqutvekra", ],[ "gujxqsnitohp", "tchxqjgoiu", ],[ "hgparlm", "mjxghlqzp", "fmlpahcg", ],[ "deptkcyasiwgfonv", "ptqufxjhcyglrzdov", ],[ "awnxeshvrbcjm", "xreswnhbcmvja", "axvwnsejrmbhc", "xajcmrnevhwbs", "sjxhcbearmwnv", ],[ "woystmzcbgrljqhxdiukn", "mzhlbgcwjusnortdqky", "tunrjlzmqosygbwhkcd", ],[ "agh", "ahg", "agh", "hga", "hag", ],[ "cmzkthbquilgwypreno", "tsmezpqlwkhrcginuo", "gmniotwlpzyqceukrh", "wztuikrglhqocnpme", "ekqchwogpliumrtzn", ],[ "jqadntioypevlwcksmb", "hymnfzcvtdaxsekrqijo", "dvqmgiacknyoesjt", ],[ "cdnbkfzev", "bfvdwcezk", "kzeblcdvf", "vfdkneczb", "fdeovjczystkib", ],[ "rzc", "pma", "zwvx", "zyrlt", ],[ "lmwvudafhnczxibsgpjkreoq", "durlgqhmvpxofsiejwcbkzan", "mieraklxftswzjbuocndvpqghy", ],[ "qlaxkbf", "rfhyxtbkseaq", "bxkqaf", "fkxbaqn", ],[ "lpntzrufvskoqciaxhedw", "arsztnpofkxcqudilhewv", "srvlzcujywkenimafhtoqxp", ],[ "snxwjqapfo", "nwsfqxpajo", "npfqjowaxs", "opjfxanwqs", "sjaonwxqpf", ],[ "cswjquxv", "uyecrkg", "ufjcl", ],[ "qjvzl", "jvqzl", "lzjqv", "qlvjz", ],[ "h", "h", ],[ "mprvotcsgadybjfkqehz", "bjsordtucqlgkhfzvepy", "fsoqijpvhgkczybrted", "yzsgkfhvcbjpeqtrdo", "cjzdvkprbheysmofgqt", ],[ "jzontimefb", "ldorvefxuatpj", ],[ "i", "xi", ],[ "zhtkdvl", "pchznv", "jmryxuwgazvfh", "lkdevczh", ],[ "subt", "utsb", "fsuobt", "jutsb", "utbjs", ],[ "n", "n", "n", "dnk", ],[ "qkrfv", "fqgvkseut", "qvrfk", ],[ "w", "x", "n", "n", ],[ "mkpoyfrngtwdcjlv", "yprcuimjsz", "rcyjzxphm", "pjecrmyx", "ipyramcqj", ],[ "puwnzsohkv", "nsohwkuzvp", "upnhokswvzx", ],[ "rmvjwzhx", "kpxhqevglom", "mzxfhbv", "mhwjitfrvnx", "mcusxhvwj", ],[ "vipkgth", "oskhetgp", "zlqhnbdjwgurxapc", ],[ "vn", "vna", "gwvdn", ],[ "rugcbipvzow", "uogrzcvpbwi", ],[ "jwxuc", "krngvmypl", "jwxzi", "qashtbedfco", ],[ "bzfyl", "yzflb", "fylbz", "lyfzb", "ylfbz", ],[ "uhkvb", "kjhulb", "vbkhu", ],[ "andlzobvguqsk", "nkgvqlzbu", "klbiezughvmxnrt", "bunkzgljvf", "yvkgjpwzubln", ],[ "t", "t", ],[ "bdrjpavtiqlhxuw", "pjmzbxidrtulcfw", ],[ "wqylp", "mrhgfxsjcaltonedv", "ywbkul", "ikl", ],[ "hxpivszmbaodecnlurq", "cedlpnibqmwxaghrszou", "hunbrdzpsxleaitmqyco", ],[ "pymewobv", "veazgoy", "yvoxle", "youfveix", "syegdvo", ],[ "ogceirlsaqjtmvzdx", "rtsaijxocelmzgdvq", "dvrqjxizmgscteoal", ],[ "jeupkmhcydwaz", "daykzechjpwmu", "umkaejhwydpzc", "aywkjphdzeucm", "ypdchmujekazw", ],[ "suzacvgjnoi", "evgsufjaitn", "rqeanjskxbvfgiwu", "dknubsaxgvji", ],[ "ojxfyetcpdbglmwqunrsi", "fjletcbrdsnviogpxwuq", "jcgprswxiaefdqnotlub", "zfgjewrpldsioxcqntub", "nxcgewpqolibrktujsfd", ],[ "vwh", "hjvw", "hvjw", "hvwr", "vhw", ],[ "md", "m", "m", "m", ],[ "xkpu", "izfmrosjbd", "eywqt", "xgak", "hgn", ],[ "layhskgxrpfnwqmdj", "mlsxywoakrectnzgqdjf", "fbsxnmuikqwrljgv", ],[ "rhcn", "lon", "dln", "pban", "nhd", ],[ "uxwhl", "hx", ],[ "aesduycrgfmhjblnkzt", "jktlhwqioepzgcbnmda", ],[ "tbhfongxiudcrv", "rqoyfnuxabjekl", ],[ "ajd", "wjdmak", "jda", "jad", ],[ "ghimtjly", "hjtgilm", "ghixmjtpal", "jtmhilg", "imhgtjluo", ],[ "ewpfam", "epmwa", "epwma", "ewamp", ],[ "cslywuzkdg", "jfluyxgbsma", "ugysbl", "ytlqgaus", "hsufgloxyr", ],[ "eigjpobrlxnasvhquwy", "nirbjslgwyxuoaqevhp", "fpnsuxbleoajwyhgirvq", "ayinxhubgvweprqljso", ],[ "andu", "sguand", ],[ "embqxktgpduyjia", "qtjagiydempukxb", "axswpjdgqbumyteik", "kgaexydbupqtjmi", "uqjbixkdptgmeya", ],[ "uxzwnlgyareost", "nesygtowzuralx", "lnguxsaoyzwtre", ],[ "thfobmluspeiwxygv", "ibtfgsyouvxdpelh", "txqerhuolbpsgfyvi", "oehxfsmbiuvpyltg", "pfoiuhlebvyxwdgst", ],[ "e", "ke", "e", "e", ],[ "zhxyc", "hczxy", "ohzycx", ],[ "sylzvbx", "sxzvlyb", "vltysxbz", "ylbxzsvf", ],[ "zxkt", "xztk", ],[ "mnctogxvwkseh", "owrsadeqmhtykcg", "matkscwo", "mcwpzbofs", ],[ "wvpybgulfrhnixjka", "rgawyujfcsveki", ],[ "hbmljqxrtza", "xmutqzahl", "zaqlmhxtu", "hziqlatxumc", ],[ "sjwq", "qjws", "wqjs", "jqsw", ],[ "ithgcoaed", "qtgsdohec", ],[ "puidogmhysnk", "pgszdunhyiomk", "gmyivhnksqodpt", ],[ "ionrt", "yhvsiud", ],[ "xtzrljypsknh", "jkhztpylxnrs", "yxlkrshtpnjz", ],[ "veyflgkws", "jwukvfeshmr", "evfwksdz", "fekvsw", "vkfsew", ],[ "qbercltdyiwzpfghujxa", "bvzlratfchxyijqewpdgu", "hfrtqbiayzdxpwujlcge", "ejhbpuwytgixrdzaflqc", "phrjagczeiyxwdufltbq", ],[ "chxzbkemyjgqvltsardoi", "osykewcidjtuvzpbqhg", "ibqozcsvygmkedfjhtn", ],[ "czgih", "zcg", ],[ "dpulzxtweoafsvnrykqg", "zoasklutxwnqevyfgrd", "vnrequfolxgtzsdawyk", "ynurtkjfogvdqzlewsax", "kuydfznpatgvrelxoqws", ],[ "fmpeunzs", "sumpfzn", "fzpmnus", ],[ "sadewmz", "sldnwe", "wjduetyxsh", ],[ "no", "ou", "oua", "ybwdoe", ],[ "etjdmfhkvupsgob", "zjvatuxrhomingds", ],[ "wcrpzale", "ctyzwdsulbvmexo", "ikecwnzlg", "ngjwczlae", "zlqhwgecj", ],[ "p", "p", "p", "v", ],[ "x", "i", "p", "x", "bgckq", ],[ "huty", "yatu", "cytrqju", "wtyu", ],[ "k", "k", "s", ],[ "ti", "ut", "ut", ],[ "ltyxj", "vaicrwnzb", "yegjqp", "mjogk", ],[ "ifyupadt", "idutaypf", ],[ "civyufabow", "oafw", "eawtof", ],[ "tdxrcuvqmaoblhsjfynpwigkze", "hqfymskzljrtexwugbnacpiov", "nymlpweztcgrhjqfuiasbkxvo", "qxcponmlbwtvazuykfsegjrih", "vuaoelhfcyztjpxingmbkqsrw", ],[ "zqtkcomfdyrs", "qokdtmzyawfrlc", "qdmzejfctykor", ],[ "qgkmhvx", "vnqmkxlh", "kqvhxmre", ],[ "aklnbydq", "dqynjokaebzlu", "kblqrdany", ],[ "znaepc", "uthvilcm", "cpbda", ],[ "cep", "wgecdbpz", "pce", "pce", ],[ "qgtaelxzvnfr", "vwlquxfbmhgdjzir", "fqvryplogztx", "krfvglqszx", ],[ "xebsp", "vohgfurnmsa", "dqws", "ysl", "eqyps", ],[ "fxnlgkjizbsupyt", "aixlkfuwezbgcpsnh", ],[ "fliogmexzuqc", "ygxqvoeklitmfu", "iofxzueqmgl", "qouifehxalmg", "oefiuqjgdmplx", ],[ "cjqnrvu", "cquvrn", "vqnur", "qvrnu", "qwsvruxnmf", ],[ "esxbjiwnya", "ibwnjsxyae", "abienjwys", "ijwaybnsep", "ybeiasjnw", ],[ "f", "f", "f", "f", "j", ],[ "dwfgkqohamebnzly", "vhyokaeqpufjdlb", "ayhlqfbnoedkg", ],[ "g", "ijur", "ad", ],[ "oxpwmzunkjved", "dgwxejtpzn", "exnrwizdpljhfy", "ekzxwdjnpt", ],[ "jghbztdkypsovc", "arefyzdnlhwpoivbsqj", ],[ "cwvpyqnhjmsblikorx", "ywjmvfxnbqoitdls", "gyuloqbznavmijsxw", ],[ "tv", "vt", "vt", ],[ "cxvwzdbpsqnhoa", "thoqpsvmaxcbkzlin", "anecpvqohsxzb", "xscpvobnaqhz", ],[ "axnrzgyvepoif", "zovgfipynhr", "grodvzhinfpy", "rnipgfojyhvz", ],[ "pbmhlxwqfezrscdtykn", "cfmbkwtnlryzqehxpsd", "qrbylwtdnsckzefxhmp", ],[ "zkqw", "wzkq", "jqwxzk", ],[ "vrdnmyfspbzlxw", "izepalkytdnfcxjwhg", "nxuwdfqzlyp", ],[ "bc", "cb", ],[ "bf", "fb", "bfh", "efbq", ],[ "amw", "mpa", "maw", ],[ "bqwtvl", "vlzwtq", "ytlqv", "zvlqtb", "tlqxvc", ],[ "lbhxpnkiurmwates", "fuwrqbeztjmlpsnxaik", ],[ "jpwm", "zwljp", "jwmp", ],[ "zep", "cep", "pe", ],[ "mzx", "zmx", "xzbck", ],[ "dlmvbnupathgjsf", "blknfsvtjpgmhdu", "pnufdgmhsqtbljv", "ijeoufmnchvysrlwzpgtdb", "xvpudhgsjmlnbtkf", ],[ "cnyuhkmbswzilxovjp", "ybjtdewvsrfcznalqhgiku", ],[ "bi", "rzla", "j", ],[ "graezckvnqx", "agwzkcqnxre", "grzxeckaqn", "ghercxazknq", "rzqakdgexcns", ],[ "sfe", "b", "f", "xpjtuand", "boies", ],[ "kgjfzqlwic", "rkcdstgp", ],[ "fgsndtox", "zodnyxlgts", "otxdsgn", "nxtfgodis", ],[ "zwrtohqdey", "teqwry", "pvytwegf", "ltioweyrc", "myeaxntuw", ],[ "bw", "bw", "bw", "bw", "fbw", ],[ "o", "gh", ],[ "owadmhy", "admhoyw", "wmohyda", ],[ "nywib", "ceulqpzh", ],[ "zs", "sz", "zs", "zsko", "szr", ],[ "izaqf", "uijrf", "infgq", ],[ "w", "qw", "m", "bzr", "o", ],[ "emavls", "hbxwektuqjo", ],[ "qrhspwbulzkaxdm", "auwbhyxlkdvq", ],[ "turdsw", "utxrwsd", "rtundsw", "usdtrjwo", "utdowrs", ],[ "gjro", "gojm", ],[ "xhnilqdp", "ienxaovqldkhg", ],[ "rgjonh", "nvokcjqrt", "argnjo", ],[ "jmgchqb", "jivdabluqf", ],[ "ylmicxtahwqfvukneopgzsbrdj", "hbzpeaqvlxgotsjkwmfndyiruc", ],[ "p", "rop", ],[ "delgcpurwxniqohkvyas", "gurxclnvdwbikoqezs", "rnxewiqvgktmosfjd", ],[ "tigwskmhvupobfnydxcre", "qwmdoycrhvsjptzxngbikue", "yvmetfcbahuklxpdgowrisn", ],[ "wsy", "wys", "syjw", "wys", "yws", ],[ "srwpt", "wtsrp", ],[ "lhafkqwscv", "aklhcvrsqfw", "vfsqckalwh", "hlnqskcfvwa", "klfwvzsdpacmhq", ],[ "ehbzglfvtdxpkicy", "dl", "jnmdl", "wdsl", ],[ "rew", "rek", "ehi", "ilehwkm", "axe", ],[ "bl", "hzlgey", ],[ "iboqgtdxprunz", "uonzipxrgqbtd", ],[ "o", "o", ],[ "bldk", "bkpl", "fklbc", ],[ "ynmuedqwhoktxprcavz", "fshlwuznoymekqtprdv", ],[ "hjtwrzo", "rowhztj", "wuxrojhzt", "ozjhrtw", "hotzwjr", ],[ "senxaq", "baen", "ajmne", "gaielnd", "htfnpkuvwoae", ],[ "joklzmcuyg", "uyzrifcmlkgsj", "kyoumjcagblz", "uytcgqklzjm", ],[ "ujvi", "ijuv", "epmijuv", "viju", ],[ "tahxdeq", "dazexot", "baelxdq", "pwexdgvyiukjcaf", "edrnamzx", ],[ "zxqslwyh", "shgyqlwxaz", ],[ "xbs", "xbs", "bsx", ],[ "kwlhvxy", "kqwvlyxh", "klvxwyqh", "hxlkwvyq", "kylwpvhxd", ],[ "koznivas", "basiozvkn", "ovzkluniash", "ksnxcavioz", ],[ "g", "g", "g", "g", "shin", ],[ "e", "qtvo", "ac", "ksw", "ae", ],[ "pay", "nau", "a", ],[ "czkmwrvefultigxjhdqaopsnby", "flqrbdxungowzkmjsyepvhitca", ],[ "ymw", "vurft", ],[ "wqpgys", "ywsq", "qswy", "qsyew", "ywsq", ],[ "ndmo", "fdoznkmw", "hmuzndo", "mtqdrnyo", "uwfomnd", ],[ "pktnzsqhyvmaejclwuor", "jwznystlkmqcraeovhup", "vuwmteknjqohylazsrcp", ],[ "k", "k", "k", "okxe", ],[ "fjilbxs", "ib", "bi", "iqb", "ibeq", ],[ "gjlyop", "opglehyztj", "jpclgymno", "dopglymwj", "gojplrbcy", ],[ "nuygowpxetsahrv", "jgtpyhruwonexq", "rlepnuikhgybxwot", "svnygeuroxhzptqw", ],[ "wkies", "eisqwk", "kisew", "eiwks", "gxbkwsiep", ],[ "oj", "joe", "oj", "jo", "oj", ],[ "gtzunomec", "cezutnko", "tunzeco", "cuoftneazk", ],[ "vpifjqnbcuaelxzgdwos", "gfsyuwzclexopjvimqabd", ],[ "npaxeizolfrygctvw", "rgtpxwicvafozenl", ],[ "e", "e", "p", "t", "e", ],[ "ohiaqmdktxnbpwlc", "iqcopmavhwxbgnl", "bhqaoiwxlpmcnzy", "oxhwifeapuncblrmq", ],[ "wghbsijofevcu", "qtlmkday", "xlrznmp", ],[ "zbrjh", "rzbjh", "vebhzr", "klrzhb", "rjbhznl", ],[ "kcgzmvfrxebiautyohdwq", "thdkgwzymrafbxecqiovus", "rgtwzvocydiafmkqubehx", ],[ "i", "ry", "n", "xgscp", ],[ "kzjngd", "rdmwgnujzok", ],[ "djpivm", "mdipjv", "mlvdjip", ],[ "ilbdjmvfhyzxcqwuspn", "lichmuxnzpqsyvwbfj", "umnvlbiwqsfchxpzyj", "uylzhpvfqbscijxmwn", "clwjnihuyzpmqbxsfv", ],[ "o", "o", "fo", "pon", ],[ "aowpk", "zg", "dt", "uc", "u", ],[ "ymhiouqp", "lkyoqi", "ywtsvqio", "lnmyoiq", ],[ "ydbhigntrexvkua", "urlaigkqnydwxhb", ],[ "nfro", "z", "jz", ],[ "ojsag", "gajso", "gjsao", "jhsog", ],[ "t", "t", "y", "h", ],[ "jieqmryxv", "xqvimey", "umyqveix", "vtedmnxliqyf", ],[ "tmd", "tdm", "dtm", "mkdt", "hmdt", ],[ "px", "gwruq", "pz", ],[ "tejofhqklimp", "thojpkfgelwmrq", ],[ "tseirdkyqvcghwju", "tjhycvgilezdws", ],[ "roqbndl", "rdql", "qlrd", "lqremd", ],[ "qvgunystzpckrwifmxdolajehb", "bgtixcwloydzqjskvnfmpeurah", ],[ "soviern", "rlakxngecptvsz", "nvdsre", ],[ "gzkoiysxl", "vjrlmtpbsceozhauwx", "kfnqdzolsx", ],[ "kwzaqnipgxfhoy", "hanwlofgqxpzk", "xqngazkwphof", "pqwkfghaoxzn", "qwnfgpakxhzo", ],[ "zhurktfoqmlbnx", "mhlxorzbntufqk", "qbzklhnurmotfx", ],[ "gezmci", "oecmg", ],[ "pcyteovnsz", "dptlfuzh", ],[ "roxjhkng", "xonksrad", "rxnikos", ],[ "vbgmsrecxpj", "srcjxmbgep", "rbgsxcepjkmq", "pjgcmzbsrxe", ],[ "gkvwndflryjshmbqxtpizuocea", "fwndvekqtzployghijsmruabx", ],[ "dcxtogbifek", "ifkdgoxbc", ],[ "srmqlnhbwv", "liwsqzvtn", "wgeoqvpfs", "wkyqvsacd", ],[ "yswarofhdmqclxkgut", "daxhzkgumjysrlwq", "qfamswzyiglxdruhk", "vsnwxadlhrbgqmuyk", ],[ "rxwzkmd", "kwzx", "qawokzlxe", "xmdnfkwz", ],[ "exo", "xvqod", "cv", "pnrkmywh", "uztea", ],[ "ma", "ma", "qamfr", "am", ],[ "nksp", "kvpn", "pkn", "nkvp", "nkp", ],[ "pwlvdsagy", "islyawu", ],[ "sgbnwulekhpmy", "mjgqeyshpbwuln", "yubghpanecmszwlv", "euwohbysqngptlmx", ],[ "gs", "e", "kas", "a", "md", ],[ "i", "x", "bl", ],[ "vishqyrzgmpbeuldj", "gwcpvnskbftudyorj", ],[ "ueswlatkopc", "wbeosclpktau", "lcpvaswokuet", "ltkupsmeawoc", ],[ "iwtvopbgyc", "widjykopv", "ivowyp", "iwyvhop", ],[ "bfnwdumyozhpxre", "zhweumdnpbofy", "dcsobyuhfntpmzwe", ],[ "zrlaspbhty", "oyhrftzbslap", "ysztbhlapr", "tszhpbayrl", ],[ "wbgxh", "gnhwxcb", "wxbhg", "gxhwb", "gxbwh", ],[ "ngribvdawujskcmfx", "rvskbgiwjxuca", "wiyvgcsbjxkrua", ],[ "ifstrq", "fk", ],[ "b", "b", "b", "u", ],[ "hpqy", "wjplyq", ],[ "zwkfgbsmedluyot", "fdtrhsgeumk", "vexgtudkshfim", "eutigskmdrf", ],[ "imljkdnzpx", "jqwknpxlhmzd", "pmdyxgnjklz", "rxbjmlnkzdpg", "ulxbmpdnzykj", ],[ "vetubnwdy", "bnwatdvyou", "zfwgvtdbnki", "dlvewatnb", ],[ "uj", "otuj", "uj", ],[ "ifstpgrbcnywaxmkdzoqvh", "qkbfhovrginxapzywdct", "vyofbwcdginrkqtazhxp", ],[ "mvnaokugdshybwtr", "ntvsywuadrkmohgb", ],[ "fauo", "pnofxadk", "sfoa", "sofa", ],[ "akecpnjdwrztvlfbuhsiq", "jehrndzisqcauwlftkbpv", "uawiskrjentfbcqlpdvhz", "crtpjbdalsviwfnhqezuk", "ncawkfdsqtrhpjzielvub", ],[ "otazsfhc", "ltkacysow", "pvtomna", "tacok", ],[ "mx", "x", "x", "x", "x", ],[ "hmoy", "zmyhjuo", "ypmxohn", "hoxym", ],[ "dm", "md", "dm", "md", ],[ "uqvbhfdomlwtkxez", "szaqwmlhytgvxkr", "wmpzhxqktlv", ],[ "btkpdjinsrmogfywzhlvecau", "idylbvnopjsgrkfheuczawtm", "tygvsizrwjneplkohcmafudb", "wtvprskenjchmiyfuzglodba", "jwdafzcemrbsunotyglpihkv", ],[ "e", "ouxg", "ei", "shp", ],[ "ul", "ul", "ulrspe", "louy", "uynlvo", ],[ "yibgqkf", "uvcwx", "mvxdohjlw", ],[ "q", "z", "z", ],[ "orxgfiqznujyplsbadv", "gtzieoxspqrvndjbylfu", ],[ "hmlqcujrysbgoentdp", "dyjmrbtpuhgslncw", "rmyfuhdgclnpsktjb", "ptucnyhsmlwrbgjd", "wrhnldscjeyupmtgb", ],[ "sowieczubgx", "firsgewzpbo", ],[ "txeo", "exot", "oext", "oxte", "otxe", ],[ "ontlbzyekruhpscwqvaxmdj", "ahrtijxdepnokymcsgwuf", ],[ "ftsraxmwogvnkdbzqiyhju", "ylsdhonjzrfwmqukc", ],[ "leiupzardbfsv", "dzuwlesifrbp", "ldiupzersfb", "fupwslrzbedi", ],[ "jtdp", "dajg", ],[ "jpglzoriafexks", "gpaozketlcixs", ],[ "butisvecnfplqmygworax", "jrhpbwztcveifamlyqxdung", ],[ "r", "r", "r", "zr", ],[ "eyniaztvgdrl", "dalgonxbiecywthzvr", "dtzrgenvliya", ],[ "akzferolcmstgby", "kmcagsbteyrlfzo", "aoktgslmcrzbfye", ],[ "jqigpeydwl", "mkeaxqcudzgvfhb", ],[ "ayhgbfzerjxd", "rnzfaxy", "wyzaxnrf", "ycazxfrw", "ayzxrf", ],[ "jgmkwtnizxrcbvfqhyeal", "mwatrngvlezckqfiybhjx", "vmrwyqnigzhtjfckxaeb", "wkehnqrtcjigzxavbfym", "vrczmohgtfbnaejxqiwyk", ],[ "c", "c", "c", "c", ],[ "idx", "id", "id", ],[ "zaipnjbsxkg", "xevnfipkjgb", "ujxldqcnbhi", ],[ "hco", "co", ],[ "ztlrica", "ktneixcrs", ],[ "hlutcdsgoj", "mwlypnzbqafvxkire", ],[ "lznhjwgsiv", "wricunaxj", ],[ "fdqgyzopwlen", "rkvt", ],[ "vy", "gy", ],[ "ihbpfsx", "pshixfb", "sifxhpb", ],[ "begmqirvflkxuyanp", "dmpvhfbnaxsuloqitjy", ],[ "uwamykhsnbfzxielpdo", "cxzswhvtabupmqjlekond", ],[ "gisqpjrubx", "rjbiuqxspg", "gqpirxbsju", ],[ "u", "u", "v", "u", ],[ "gnjqsoha", "qgandhlyrs", "snhqvlrabg", ],[ "vo", "vo", "ov", "vo", ],[ "iudvwxpmtac", "owlyxsangim", "hbdrxmwaei", "wjimax", ],[ "xmubte", "yuogxa", ],[ "nwkurtxjcpqozmhgsvbe", "chrmvakuyxtowqpgzbej", ],[ "manbesvzpyt", "dgtwazpqjmbnr", "itfkoupbhlcnax", ],[ "omhinsxf", "lnmdoix", "eimgrno", "hyomidn", "nmjodi", ],[ "qmpn", "ripmn", ],[ "wfm", "wmf", "mwf", "mfw", "fwm", ],[ "uaoxphg", "phoxb", ],[ "btfprm", "ztmrf", "mrft", "ramft", "tmrezfa", ],[ "uaznory", "zyaiourn", "nouryaz", "coszugmanyr", "lqazryonu", ],[ "vqlswifmcg", "wzuclnxsvt", ],[ "eh", "eh", "he", ],[ "siuhfpb", "iuhfs", ],[ "yfhciqlnwpgemoxktas", "ticjauwfsygepqnhx", ],[ "ndmhwtub", "zbagktxiulnwh", ],[ "txdikm", "boldxtiqmf", "dxtimj", ],[ "wvr", "vwrb", "wrv", ],[ "utyjachpfordvw", "benvkudcfta", "vduqiftcgsa", "fcuatdxv", ],[ "doivj", "jiv", "vjkpyi", "jvi", "dijv", ],[ "mhyn", "mxngywh", "yjhmn", "dmynhulkacb", ],[ "hpidlbezkwqtr", "dgtaflrnyscm", ],[ "osqeajcvduwhzrtkl", "zcaevujrqsdolgwkyt", "uokqnrdjaecvwtlzs", ],[ "ovsbxzgaju", "vliydjht", "dvjt", ],[ "stlxuabmcwqkodevrhf", "ajskvtpmlicqewbhuzfd", ],[ "g", "cg", "ezfo", ],[ "zqfmuxlnhkgdpvwrtjio", "rkjqvomtguhpiwfzxnld", "zfgxrclnimokhvpjdutwq", "tgkxfqrnhdzowpvijlmu", ],[ "ni", "qn", "nq", ],[ "sn", "qn", "fdn", "qn", "hson", ],[ "tplicyhxqfujbkzv", "qfbzvwkuycsa", "vzqnbfcokyuda", ],[ "apoy", "plfxotkv", "iphsqjorged", ],[ "ravyhbsfelgcmzponqwikj", "bitfjzwakhmvxngsoepcyrlq", "cevpwyrnlobjsfziagkhmq", "mswnezcpklfrjqgiyovabdh", "cijelkwpbnhrsmzofygavq", ],[ "sqvnuedcytaxohplzf", "cekhbgwadpmyofslxq", ],[ "gclfnxakjzsw", "wzjcnsgka", "ciwzsganjk", "aspicokjgnwz", ],[ "qrabg", "ajbgmw", "yabg", "vgsrba", "hcgtbya", ],[ "xarbuvi", "ivaku", "kiuav", "vzgxiah", "flsivaj", ],[ "ckodrthljgyfwm", "mgytohfxnrdkjbvlwc", "cfdwmjoltkshrgy", "yhwmrldfucogkjt", "fmctpgwydhkajlro", ],[ "qvibocelnsdyzfkjhpuxmtrg", "zgdksnoypqebifltcrjvuxmh", "giocmuefxsprhdjkzntvqlyb", ],[ "xkcrlwomygs", "grluckhsanomxwf", "sriokwlmcyxg", "kxgirswtcvlom", ],[ "budr", "brdu", "dibur", "urbd", ],[ "o", "o", ],[ "p", "p", "p", "p", ],[ "wnydf", "wrptghizjqk", ],[ "wnbdmltxcq", "dfcwl", ],[ "ksaveflzdxqocbgyjp", "bcxavldgysqozpkjfe", "ozpvselaqgbdycjxfk", "clpzdoebvqjgaskxfy", "qykodlgvzjaxspfceb", ],[ "nrmdjstqozklxvcyag", "ejzwbu", ],[ "kfgijmd", "zmgjdikf", "jgimfdk", "ijfgkmdz", "smbrfkxdwgeij", ],[ "yhtuxnfcq", "tcyufhnxq", "hfuxytcqn", "nqtufyxch", ],[ "rlhzknoiuycefpmvxqbg", "nbvgfexmqikpyhruo", "hqkgnvyieomubfxpr", ],[ "bjyadnftcsxqk", "lpfbvzcsumerho", "wctsbf", ],[ "iyamec", "myeibctka", "egyicam", ],[ "ac", "pvaqdb", "a", "au", ],[ "giltsum", "ixyhncbjqped", ],[ "cinzuvkystgfodr", "rksphwcfxdgey", "xrdjkygcsfq", "bfmdecpysrkg", "gcrdyslfk", ],[ "ayqpgucwedftoxjk", "eoagwdtkfqlypjuc", ],[ "ktysxp", "sptx", "qpxst", "ptsqx", ],[ "uvclismeajkpbzgqwn", "aicbqfzvlnuegpm", "glecvmpzrnioudaq", "kanmveflzpcgyuqi", ],[ "vklag", "glv", "lvg", "lgv", "vgl", ],[ "tyuh", "hut", "thu", "htu", "thu", ],[ "eyipwtfuhxzalmdgrs", "whfcvbquxgepn", ],[ "tg", "ge", "g", ],[ "vk", "uatvn", "mzv", ],[ "jhfmpux", "mhjquxkp", ],[ "gzyxjwfb", "grzfxmwybj", "cywfjpxztgb", ],[ "udrye", "eqdyr", "yerd", "eryd", ],[ "kwdoynribhpsqmlgvuje", "gunbjywvmheirdqpok", "dnqeivoptrkwuyjhmg", ],[ "czvmpr", "sxpum", ],[ "qlktsn", "tkclq", "sbqlkwt", "luetjiqpk", "lcvtqsk", ],[ "rotvsfwelbnj", "fwbqmaolesn", "qbfwegzislpnoc", "nzoelswfpab", ],[ "wsecbml", "sclabmwe", "ezpsidclwtmbgvr", "mcelawsb", ],[ "ngz", "zg", "gz", "zg", "gz", ],[ "xqjwnaiyb", "jayxibqngw", "qinjwxbay", "nbaiwyxqj", "jniaxqwyb", ],[ "hktywl", "htwlyk", "kytwlh", ],[ "ymbeahldgz", "pjaoszx", ],[ "b", "b", "bz", "kb", ],[ "gvdcqp", "qpvyrcdlk", ],[ "nij", "jfiub", "jtieyxl", "mnij", "imvju", ],[ "qh", "hq", "hq", "hq", ],[ "tez", "zet", "etz", "etz", ],[ "wz", "wz", ],[ "xc", "jvxc", "xpzc", "rgumxc", "xc", ],[ "nizsgkvylw", "ngylivwzks", "ylgsiznvkw", "ilgyvsankzw", "ilzywsnkgv", ],[ "emhpiwfyung", "qlzkob", "ldjx", "xvat", ],[ "luzfaswdyj", "jsdyuzlafw", "ljdsafzuwy", "yusdjwzfal", "dsyjwuzafl", ],[ "uioafnlegsvjdxphr", "lnfrjdpehvsxguoa", "najruefdlxogvhsp", ],[ "gumjphl", "mplchdjuw", "hmjrlup", "jmpgulh", ],[ "q", "q", "q", "q", "q", ],[ "feyimktsugrq", "qygsrtlpmfkeui", "sfkmrgqyitue", ],[ "xpklzsyodcnhrjq", "xcznojsdpqhrlky", ],[ "btmsc", "mtscbv", "csmtb", "tmbcsx", "mbxtsc", ],[ "dvrfumay", "ymafr", "mrifya", "ykrmaf", ],[ "do", "d", "andk", "dcp", "d", ],[ "glhmjykfaznvrd", "bvmijshzga", "vmjuqazhgpx", "voczhgamj", "wjhizgqavms", ],[ "voilgtup", ],[ "vrphtmc", "bgfkjvad", ],[ "bxkfi", "kixbf", "xfkbi", "xfikb", "xfkbi", ],[ "lfixvpozghcauk", "plgixmzukcovh", "hyruilocxgkztqv", "uglxkaihcozv", ],[ "avgptdmi", "gydpvt", "dptawvu", "rvtdopxlqs", ],[ "rsmglpt", "gpmnlthr", ],[ "tqmeukoia", "kamiout", "mqwauekov", "macoryuk", "nujbskgapmlo", ],[ "ndjrglykwoi", "jrwkdnolygi", "ownkidlryjg", ],[ "kwheact", "txukwjcgbhar", "whgotjk", "kzhtw", "lmvynhptdqkifw", ],[ "odkzwylprhvn", "pwozvnydrh", "zdhnpryowv", ],[ "crni", "qdnkiou", "gbwhyasjx", ],[ "bxitsamogcq", "erbxklyhvtczu", ],[ "swrfxdpjhly", "pwdjkvfyxrshl", "sxehqrtwpdamnyjzolbui", "gpdryslhwxcj", ],[ "fhldcksrpyi", "qfejshrcat", "wsmrvcnogxh", ],[ "vwacyofjtilrxngp", "otylvxpfwgcnjria", "xojfignyrtlpwvca", ],[ "qvz", "ozm", ],[ "msrdwqahutefvxy", "rjmyotiefuh", "ltyrmenbzjuhf", "felbyputmhr", ],[ "riyzo", "kzroyuwi", "yirozp", "yoirz", "roiyz", ],[ "rqjz", "vjrq", "qrj", "prqj", "zqjr", ],[ "vdx", "xvd", "xdvu", "vdx", ],[ "xeauhryviqg", "wpxkufzsjmctlnybd", ],[ "hbzwdlno", "tmrj", "np", "lqfx", "kuygescvia", ],[ "iqph", "ihpq", "pqhi", "ihqp", "qpih", ],[ "lsfwxmpkgqzvhecoay", "gqfszwakhvymptcexol", "cpaxwlzkfqvhsgemyo", "lghfwvcmzxpokeysaq", ],[ "tgmpafqbuds", "hspdfabuqgctm", "tpcubdaqsvgm", "mxqbktspoaujd", ],[ "xktgfvyprhndme", "vntmyskfegprid", "dsvpfmnkygtre", "ydmvpkfretng", ],[ "npvgjzuo", "mwlackhs", ],[ "gyj", "myk", ],[ "w", "w", "w", "k", "w", ],[ "sgrhv", "rixdgjluf", "rgs", "rsbg", ],[ "kmiqobutwplfryxgeajhnz", "ylrtmpauodjnfvwgeixqz", "extlfwjsirnmgyuqaopz", ],[ "vdngfjbwypio", "sukyvfzpeqwthdxg", "fyvrndgbwp", "ydwfvglp", ],[ "fhsi", "hsbif", ],[ "fihzecojaqm", "jzchuomvwsqfr", "jzchoqtfm", ],[ "kqafdzcgphvbos", "qbspzodfavhck", "adfozhquktlcibspv", "szhpfboagdcqkv", ],[ "tmeb", "takbe", ],[ "ymrhgdo", "ypgzhmltd", "fdbymgshcx", "nghyzldm", ],[ "bxgm", "gmxb", "mxgb", "gxbm", "xbmvg", ],[ "fep", "lnp", "trjim", "dauy", "fplk", ],[ "udhzexv", "dhmezvx", "qdxylbhvzw", "zveduxcht", ],[ "wgvhaokesjirly", "osrewigqfdyvzk", "kupsxrimowgbe", ],[ "skzvhanpljbogdyxtiquw", "xzgdwyjluhnbstopikaqv", "pasixghzovnjylbwudqkt", ],[ "wj", "wj", "wkj", "jw", "wj", ],[ "nsmyxfhc", "xcfymhsn", "hxscmnyf", "cfxsmnlyh", ],[ "jpblgmiyunazcfd", "tabnyfmupclzgd", "esyvuphfgwbknodzcxlqa", ],[ "xkyqozefvgutmrw", "rmhzwgeutoypx", ],[ "rzaxcemljnvo", "kdwyqvohesitfb", ],[ "kfqrcezwn", "qrnwkzcf", "frcnqwzk", "frnckvhzwq", "kqzrcnfw", ],[ "fqux", "qxuyfod", "ufxq", "qxfu", "qxuf", ],[ "ztopdir", "ritpozd", "otrpizd", "idpotzr", ],[ "jzhngmufw", "zguwhfj", ],[ "ndxhmysbgcriqkewoztujva", "cmtwbudvysekqaxizrojng", "itncgkdyoaxswrqvmejzpbu", "qyvcdusgwbomejtxznkira", ],[ "nik", "yfi", "i", "i", ],[ "hpsdjo", "hobps", "ohsp", "shpo", "kypshio", ],[ "jbiyatwz", "zbtagnrc", "ztnagb", "batz", ],[ "fvkurj", "kfgjvru", "jukfrv", "kvfujr"] #print(m) ret = 0 for g in m: st = set() for s in g: st.update(list(s)) ret += len(st) print(ret) ret = 0 for g in m: st = set().union(*g) ret += len(st) print(ret) print(sum(len(st) for st in (set().union(*g) for g in m))) print(sum(len(st) for st in (set(g[0]).intersection(*g) for g in m))) ret = 0 for g in m: st = set(list(g[0])) for s in g: st.intersection_update(list(s)) ret += len(st) print(ret) #print(sum(len(s) for s in [] ))
m = (['qzbw', 'qez'], ['xgedfibnyuhqsrazlwtpocj', 'fxgpoqijdzybletckwaunsr', 'pwnqsizrfcbyljexgouatd', 'ljtperqsodghnufiycxwabz'], ['uk', 'kupacjlriv', 'dku', 'qunk'], ['yjnprofmcuhdlawt', 'frmhulyncvweatodzjp', 'fhadtrcyjzwlnpumo', 'hrcutablndyjpfmwo'], ['rdclv', 'lrvdc', 'crldv', 'dvrcl', 'vrlcd'], ['dqrwajpb', 'asrfpdjwbq', 'wjdtarq'], ['nalkhgoi', 'bmiad', 'sdvpiyerma', 'ami'], ['smg', 'wlmdftcr', 'mk', 'my'], ['ebaxsun', 'uaxnebs', 'suxnbea', 'eanxusb', 'aexusnb'], ['zoxegrfd', 'qorjv', 'oqr', 'vor', 'roq'], ['jpasdnrcvhglft', 'dgkstavnhjrclfx', 'crtndjglfvwahq', 'hjclinvdtagrkf', 'gjfcdtuhlanvr'], ['exiopqbgrj', 'undhwyfkvltis'], ['npsxwlyog', 'udylki'], ['bnuwck', 'nuack'], ['cahpwtlozkm', 'ghnpzfqmoxabi'], ['hvwgxesraocbpnf', 'ewvranqcpbghoxf', 'paxfnwoegrhcvub', 'qbrawpfscexngvho', 'ahpxognlrvebwfc'], ['agqmwpvlb', 'waklrnbqyp', 'blquawtp', 'qltabwp'], ['rymhgolkustipjxbzqnafe', 'frzqjiuktbsxmahdepylg'], ['zricqdofygvtbsjmeu', 'vudjctzynegboiafqmrsx', 'rsbefoytcqgiuvzdjm', 'zucobitsgyjrfqemvd'], ['y', 'yc', 'tg', 'lavoqef', 'by'], ['fevykin', 'wxytrhqk'], ['pxbclzknowyq', 'lybwkpcoqxn', 'oknlpbxcyqw'], ['l', 'f', 'gixvd'], ['unogwsfavzkhi', 'siohufnkzgavw', 'ahitunswfvkzog', 'gvhknzuaisfow', 'ukasozfihnwgv'], ['ulhgwo', 'ghluo', 'ogulh', 'oughl', 'lphuog'], ['nike', 'bkn'], ['gefzwrdjsqx', 'fegzsjwxrpqh'], ['lfknweboxyrpajmig', 'gkpafnieojybrwl', 'iafesdyulrkpgnwbjo'], ['zjoiqtgpwxdach', 'iajdhqucpxtzgl'], ['yhav', 'vnshac', 'hcav', 'hvw', 'cyvh'], ['hwz', 'whz'], ['dhunracmzksvxopjgtbqi', 'vqhpowubyzirdksmgca'], ['ckrhefz', 'rkvexdfzcbh', 'heczkrf'], ['rbsldt', 'qgr'], ['a', 'ea', 'a'], ['wnadxkgehtpsv', 'gwnexkavshpd', 'bfkdpansvhewxg', 'kvtwdnsahpxge', 'xnhdpvekwgsa'], ['ydajvctr', 'drcejtgin'], ['kw', 'cbmj', 'l', 't', 'n'], ['gyzlnp', 'zahsyu', 'rek'], ['vjdmhsorqw', 'whdjoqvrms', 'rhsjqdmov', 'omdsqjrzhv'], ['rcxsgnluhtqey', 'ldejuqpykrtc'], ['rylcqxt', 'wlgtzyrcf', 'yrltc', 'rclpyt'], ['frke', 'kfe'], ['nchvxtqarsejld', 'rkhntaexcbqljod', 'qhdepzrxljtifcan'], ['uyfshgxzbqvrdwintjlmec', 'oyrvdwtgeczsfbmluqih', 'kabdlqytwgfrhmuevczpsi'], ['guwmkrfyex', 'fxekmrygwu', 'wfgremukiyx', 'aywegkrmxufl', 'wukygimrxfe'], ['m', 'm', 'm', 'm', 'm'], ['hbgnkqe', 'khgn'], ['hngypzmd', 'oixyanpdg'], ['qbdklpvhjaeif', 'kzaiglyjfpmeurn'], ['ynsm', 'smjn', 'nsyum'], ['mpcztqkydxifv', 'zdqfvxtmpcyk', 'zkcmxfpqvydt', 'yopktfnqrmvxdczw', 'mdckxypvztqf'], ['va', 'bvhg'], ['fe', 'ef'], ['n', 'hpmqn', 'n', 'dn'], ['njxazhtevsmlir', 'txmsijvaezwn', 'tezacmwsvinxj'], ['gvzpbmeijyhaukflcrdqw', 'sivlhgumyzkdrjfeoxqtc'], ['ouq', 'h'], ['csxewy', 'kxoscmw', 'ucnvwsxg', 'hfocysxmiwe', 'wcsmx'], ['retcxugsdwjnykm', 'sfhudnxoqwjktyzarc', 'rklvinxudpsbywtjc'], ['cwfizpyguatbodsqemxrjknlv', 'ujikxwsmntcloyqgaebrzfdvp', 'jreyubofkpdnzsimxwvgaqtlc', 'nuewfvmlidsatzqbkcjgorpyx'], ['ycqolubpktxwshegafvm', 'djnlhafsreuzgxkb'], ['odasxjtqcepgrzl', 'jsoelxpqgtczam', 'qiajrhesdzoxfplcgt'], ['vnthkurzf', 'bnfpqutvekra'], ['gujxqsnitohp', 'tchxqjgoiu'], ['hgparlm', 'mjxghlqzp', 'fmlpahcg'], ['deptkcyasiwgfonv', 'ptqufxjhcyglrzdov'], ['awnxeshvrbcjm', 'xreswnhbcmvja', 'axvwnsejrmbhc', 'xajcmrnevhwbs', 'sjxhcbearmwnv'], ['woystmzcbgrljqhxdiukn', 'mzhlbgcwjusnortdqky', 'tunrjlzmqosygbwhkcd'], ['agh', 'ahg', 'agh', 'hga', 'hag'], ['cmzkthbquilgwypreno', 'tsmezpqlwkhrcginuo', 'gmniotwlpzyqceukrh', 'wztuikrglhqocnpme', 'ekqchwogpliumrtzn'], ['jqadntioypevlwcksmb', 'hymnfzcvtdaxsekrqijo', 'dvqmgiacknyoesjt'], ['cdnbkfzev', 'bfvdwcezk', 'kzeblcdvf', 'vfdkneczb', 'fdeovjczystkib'], ['rzc', 'pma', 'zwvx', 'zyrlt'], ['lmwvudafhnczxibsgpjkreoq', 'durlgqhmvpxofsiejwcbkzan', 'mieraklxftswzjbuocndvpqghy'], ['qlaxkbf', 'rfhyxtbkseaq', 'bxkqaf', 'fkxbaqn'], ['lpntzrufvskoqciaxhedw', 'arsztnpofkxcqudilhewv', 'srvlzcujywkenimafhtoqxp'], ['snxwjqapfo', 'nwsfqxpajo', 'npfqjowaxs', 'opjfxanwqs', 'sjaonwxqpf'], ['cswjquxv', 'uyecrkg', 'ufjcl'], ['qjvzl', 'jvqzl', 'lzjqv', 'qlvjz'], ['h', 'h'], ['mprvotcsgadybjfkqehz', 'bjsordtucqlgkhfzvepy', 'fsoqijpvhgkczybrted', 'yzsgkfhvcbjpeqtrdo', 'cjzdvkprbheysmofgqt'], ['jzontimefb', 'ldorvefxuatpj'], ['i', 'xi'], ['zhtkdvl', 'pchznv', 'jmryxuwgazvfh', 'lkdevczh'], ['subt', 'utsb', 'fsuobt', 'jutsb', 'utbjs'], ['n', 'n', 'n', 'dnk'], ['qkrfv', 'fqgvkseut', 'qvrfk'], ['w', 'x', 'n', 'n'], ['mkpoyfrngtwdcjlv', 'yprcuimjsz', 'rcyjzxphm', 'pjecrmyx', 'ipyramcqj'], ['puwnzsohkv', 'nsohwkuzvp', 'upnhokswvzx'], ['rmvjwzhx', 'kpxhqevglom', 'mzxfhbv', 'mhwjitfrvnx', 'mcusxhvwj'], ['vipkgth', 'oskhetgp', 'zlqhnbdjwgurxapc'], ['vn', 'vna', 'gwvdn'], ['rugcbipvzow', 'uogrzcvpbwi'], ['jwxuc', 'krngvmypl', 'jwxzi', 'qashtbedfco'], ['bzfyl', 'yzflb', 'fylbz', 'lyfzb', 'ylfbz'], ['uhkvb', 'kjhulb', 'vbkhu'], ['andlzobvguqsk', 'nkgvqlzbu', 'klbiezughvmxnrt', 'bunkzgljvf', 'yvkgjpwzubln'], ['t', 't'], ['bdrjpavtiqlhxuw', 'pjmzbxidrtulcfw'], ['wqylp', 'mrhgfxsjcaltonedv', 'ywbkul', 'ikl'], ['hxpivszmbaodecnlurq', 'cedlpnibqmwxaghrszou', 'hunbrdzpsxleaitmqyco'], ['pymewobv', 'veazgoy', 'yvoxle', 'youfveix', 'syegdvo'], ['ogceirlsaqjtmvzdx', 'rtsaijxocelmzgdvq', 'dvrqjxizmgscteoal'], ['jeupkmhcydwaz', 'daykzechjpwmu', 'umkaejhwydpzc', 'aywkjphdzeucm', 'ypdchmujekazw'], ['suzacvgjnoi', 'evgsufjaitn', 'rqeanjskxbvfgiwu', 'dknubsaxgvji'], ['ojxfyetcpdbglmwqunrsi', 'fjletcbrdsnviogpxwuq', 'jcgprswxiaefdqnotlub', 'zfgjewrpldsioxcqntub', 'nxcgewpqolibrktujsfd'], ['vwh', 'hjvw', 'hvjw', 'hvwr', 'vhw'], ['md', 'm', 'm', 'm'], ['xkpu', 'izfmrosjbd', 'eywqt', 'xgak', 'hgn'], ['layhskgxrpfnwqmdj', 'mlsxywoakrectnzgqdjf', 'fbsxnmuikqwrljgv'], ['rhcn', 'lon', 'dln', 'pban', 'nhd'], ['uxwhl', 'hx'], ['aesduycrgfmhjblnkzt', 'jktlhwqioepzgcbnmda'], ['tbhfongxiudcrv', 'rqoyfnuxabjekl'], ['ajd', 'wjdmak', 'jda', 'jad'], ['ghimtjly', 'hjtgilm', 'ghixmjtpal', 'jtmhilg', 'imhgtjluo'], ['ewpfam', 'epmwa', 'epwma', 'ewamp'], ['cslywuzkdg', 'jfluyxgbsma', 'ugysbl', 'ytlqgaus', 'hsufgloxyr'], ['eigjpobrlxnasvhquwy', 'nirbjslgwyxuoaqevhp', 'fpnsuxbleoajwyhgirvq', 'ayinxhubgvweprqljso'], ['andu', 'sguand'], ['embqxktgpduyjia', 'qtjagiydempukxb', 'axswpjdgqbumyteik', 'kgaexydbupqtjmi', 'uqjbixkdptgmeya'], ['uxzwnlgyareost', 'nesygtowzuralx', 'lnguxsaoyzwtre'], ['thfobmluspeiwxygv', 'ibtfgsyouvxdpelh', 'txqerhuolbpsgfyvi', 'oehxfsmbiuvpyltg', 'pfoiuhlebvyxwdgst'], ['e', 'ke', 'e', 'e'], ['zhxyc', 'hczxy', 'ohzycx'], ['sylzvbx', 'sxzvlyb', 'vltysxbz', 'ylbxzsvf'], ['zxkt', 'xztk'], ['mnctogxvwkseh', 'owrsadeqmhtykcg', 'matkscwo', 'mcwpzbofs'], ['wvpybgulfrhnixjka', 'rgawyujfcsveki'], ['hbmljqxrtza', 'xmutqzahl', 'zaqlmhxtu', 'hziqlatxumc'], ['sjwq', 'qjws', 'wqjs', 'jqsw'], ['ithgcoaed', 'qtgsdohec'], ['puidogmhysnk', 'pgszdunhyiomk', 'gmyivhnksqodpt'], ['ionrt', 'yhvsiud'], ['xtzrljypsknh', 'jkhztpylxnrs', 'yxlkrshtpnjz'], ['veyflgkws', 'jwukvfeshmr', 'evfwksdz', 'fekvsw', 'vkfsew'], ['qbercltdyiwzpfghujxa', 'bvzlratfchxyijqewpdgu', 'hfrtqbiayzdxpwujlcge', 'ejhbpuwytgixrdzaflqc', 'phrjagczeiyxwdufltbq'], ['chxzbkemyjgqvltsardoi', 'osykewcidjtuvzpbqhg', 'ibqozcsvygmkedfjhtn'], ['czgih', 'zcg'], ['dpulzxtweoafsvnrykqg', 'zoasklutxwnqevyfgrd', 'vnrequfolxgtzsdawyk', 'ynurtkjfogvdqzlewsax', 'kuydfznpatgvrelxoqws'], ['fmpeunzs', 'sumpfzn', 'fzpmnus'], ['sadewmz', 'sldnwe', 'wjduetyxsh'], ['no', 'ou', 'oua', 'ybwdoe'], ['etjdmfhkvupsgob', 'zjvatuxrhomingds'], ['wcrpzale', 'ctyzwdsulbvmexo', 'ikecwnzlg', 'ngjwczlae', 'zlqhwgecj'], ['p', 'p', 'p', 'v'], ['x', 'i', 'p', 'x', 'bgckq'], ['huty', 'yatu', 'cytrqju', 'wtyu'], ['k', 'k', 's'], ['ti', 'ut', 'ut'], ['ltyxj', 'vaicrwnzb', 'yegjqp', 'mjogk'], ['ifyupadt', 'idutaypf'], ['civyufabow', 'oafw', 'eawtof'], ['tdxrcuvqmaoblhsjfynpwigkze', 'hqfymskzljrtexwugbnacpiov', 'nymlpweztcgrhjqfuiasbkxvo', 'qxcponmlbwtvazuykfsegjrih', 'vuaoelhfcyztjpxingmbkqsrw'], ['zqtkcomfdyrs', 'qokdtmzyawfrlc', 'qdmzejfctykor'], ['qgkmhvx', 'vnqmkxlh', 'kqvhxmre'], ['aklnbydq', 'dqynjokaebzlu', 'kblqrdany'], ['znaepc', 'uthvilcm', 'cpbda'], ['cep', 'wgecdbpz', 'pce', 'pce'], ['qgtaelxzvnfr', 'vwlquxfbmhgdjzir', 'fqvryplogztx', 'krfvglqszx'], ['xebsp', 'vohgfurnmsa', 'dqws', 'ysl', 'eqyps'], ['fxnlgkjizbsupyt', 'aixlkfuwezbgcpsnh'], ['fliogmexzuqc', 'ygxqvoeklitmfu', 'iofxzueqmgl', 'qouifehxalmg', 'oefiuqjgdmplx'], ['cjqnrvu', 'cquvrn', 'vqnur', 'qvrnu', 'qwsvruxnmf'], ['esxbjiwnya', 'ibwnjsxyae', 'abienjwys', 'ijwaybnsep', 'ybeiasjnw'], ['f', 'f', 'f', 'f', 'j'], ['dwfgkqohamebnzly', 'vhyokaeqpufjdlb', 'ayhlqfbnoedkg'], ['g', 'ijur', 'ad'], ['oxpwmzunkjved', 'dgwxejtpzn', 'exnrwizdpljhfy', 'ekzxwdjnpt'], ['jghbztdkypsovc', 'arefyzdnlhwpoivbsqj'], ['cwvpyqnhjmsblikorx', 'ywjmvfxnbqoitdls', 'gyuloqbznavmijsxw'], ['tv', 'vt', 'vt'], ['cxvwzdbpsqnhoa', 'thoqpsvmaxcbkzlin', 'anecpvqohsxzb', 'xscpvobnaqhz'], ['axnrzgyvepoif', 'zovgfipynhr', 'grodvzhinfpy', 'rnipgfojyhvz'], ['pbmhlxwqfezrscdtykn', 'cfmbkwtnlryzqehxpsd', 'qrbylwtdnsckzefxhmp'], ['zkqw', 'wzkq', 'jqwxzk'], ['vrdnmyfspbzlxw', 'izepalkytdnfcxjwhg', 'nxuwdfqzlyp'], ['bc', 'cb'], ['bf', 'fb', 'bfh', 'efbq'], ['amw', 'mpa', 'maw'], ['bqwtvl', 'vlzwtq', 'ytlqv', 'zvlqtb', 'tlqxvc'], ['lbhxpnkiurmwates', 'fuwrqbeztjmlpsnxaik'], ['jpwm', 'zwljp', 'jwmp'], ['zep', 'cep', 'pe'], ['mzx', 'zmx', 'xzbck'], ['dlmvbnupathgjsf', 'blknfsvtjpgmhdu', 'pnufdgmhsqtbljv', 'ijeoufmnchvysrlwzpgtdb', 'xvpudhgsjmlnbtkf'], ['cnyuhkmbswzilxovjp', 'ybjtdewvsrfcznalqhgiku'], ['bi', 'rzla', 'j'], ['graezckvnqx', 'agwzkcqnxre', 'grzxeckaqn', 'ghercxazknq', 'rzqakdgexcns'], ['sfe', 'b', 'f', 'xpjtuand', 'boies'], ['kgjfzqlwic', 'rkcdstgp'], ['fgsndtox', 'zodnyxlgts', 'otxdsgn', 'nxtfgodis'], ['zwrtohqdey', 'teqwry', 'pvytwegf', 'ltioweyrc', 'myeaxntuw'], ['bw', 'bw', 'bw', 'bw', 'fbw'], ['o', 'gh'], ['owadmhy', 'admhoyw', 'wmohyda'], ['nywib', 'ceulqpzh'], ['zs', 'sz', 'zs', 'zsko', 'szr'], ['izaqf', 'uijrf', 'infgq'], ['w', 'qw', 'm', 'bzr', 'o'], ['emavls', 'hbxwektuqjo'], ['qrhspwbulzkaxdm', 'auwbhyxlkdvq'], ['turdsw', 'utxrwsd', 'rtundsw', 'usdtrjwo', 'utdowrs'], ['gjro', 'gojm'], ['xhnilqdp', 'ienxaovqldkhg'], ['rgjonh', 'nvokcjqrt', 'argnjo'], ['jmgchqb', 'jivdabluqf'], ['ylmicxtahwqfvukneopgzsbrdj', 'hbzpeaqvlxgotsjkwmfndyiruc'], ['p', 'rop'], ['delgcpurwxniqohkvyas', 'gurxclnvdwbikoqezs', 'rnxewiqvgktmosfjd'], ['tigwskmhvupobfnydxcre', 'qwmdoycrhvsjptzxngbikue', 'yvmetfcbahuklxpdgowrisn'], ['wsy', 'wys', 'syjw', 'wys', 'yws'], ['srwpt', 'wtsrp'], ['lhafkqwscv', 'aklhcvrsqfw', 'vfsqckalwh', 'hlnqskcfvwa', 'klfwvzsdpacmhq'], ['ehbzglfvtdxpkicy', 'dl', 'jnmdl', 'wdsl'], ['rew', 'rek', 'ehi', 'ilehwkm', 'axe'], ['bl', 'hzlgey'], ['iboqgtdxprunz', 'uonzipxrgqbtd'], ['o', 'o'], ['bldk', 'bkpl', 'fklbc'], ['ynmuedqwhoktxprcavz', 'fshlwuznoymekqtprdv'], ['hjtwrzo', 'rowhztj', 'wuxrojhzt', 'ozjhrtw', 'hotzwjr'], ['senxaq', 'baen', 'ajmne', 'gaielnd', 'htfnpkuvwoae'], ['joklzmcuyg', 'uyzrifcmlkgsj', 'kyoumjcagblz', 'uytcgqklzjm'], ['ujvi', 'ijuv', 'epmijuv', 'viju'], ['tahxdeq', 'dazexot', 'baelxdq', 'pwexdgvyiukjcaf', 'edrnamzx'], ['zxqslwyh', 'shgyqlwxaz'], ['xbs', 'xbs', 'bsx'], ['kwlhvxy', 'kqwvlyxh', 'klvxwyqh', 'hxlkwvyq', 'kylwpvhxd'], ['koznivas', 'basiozvkn', 'ovzkluniash', 'ksnxcavioz'], ['g', 'g', 'g', 'g', 'shin'], ['e', 'qtvo', 'ac', 'ksw', 'ae'], ['pay', 'nau', 'a'], ['czkmwrvefultigxjhdqaopsnby', 'flqrbdxungowzkmjsyepvhitca'], ['ymw', 'vurft'], ['wqpgys', 'ywsq', 'qswy', 'qsyew', 'ywsq'], ['ndmo', 'fdoznkmw', 'hmuzndo', 'mtqdrnyo', 'uwfomnd'], ['pktnzsqhyvmaejclwuor', 'jwznystlkmqcraeovhup', 'vuwmteknjqohylazsrcp'], ['k', 'k', 'k', 'okxe'], ['fjilbxs', 'ib', 'bi', 'iqb', 'ibeq'], ['gjlyop', 'opglehyztj', 'jpclgymno', 'dopglymwj', 'gojplrbcy'], ['nuygowpxetsahrv', 'jgtpyhruwonexq', 'rlepnuikhgybxwot', 'svnygeuroxhzptqw'], ['wkies', 'eisqwk', 'kisew', 'eiwks', 'gxbkwsiep'], ['oj', 'joe', 'oj', 'jo', 'oj'], ['gtzunomec', 'cezutnko', 'tunzeco', 'cuoftneazk'], ['vpifjqnbcuaelxzgdwos', 'gfsyuwzclexopjvimqabd'], ['npaxeizolfrygctvw', 'rgtpxwicvafozenl'], ['e', 'e', 'p', 't', 'e'], ['ohiaqmdktxnbpwlc', 'iqcopmavhwxbgnl', 'bhqaoiwxlpmcnzy', 'oxhwifeapuncblrmq'], ['wghbsijofevcu', 'qtlmkday', 'xlrznmp'], ['zbrjh', 'rzbjh', 'vebhzr', 'klrzhb', 'rjbhznl'], ['kcgzmvfrxebiautyohdwq', 'thdkgwzymrafbxecqiovus', 'rgtwzvocydiafmkqubehx'], ['i', 'ry', 'n', 'xgscp'], ['kzjngd', 'rdmwgnujzok'], ['djpivm', 'mdipjv', 'mlvdjip'], ['ilbdjmvfhyzxcqwuspn', 'lichmuxnzpqsyvwbfj', 'umnvlbiwqsfchxpzyj', 'uylzhpvfqbscijxmwn', 'clwjnihuyzpmqbxsfv'], ['o', 'o', 'fo', 'pon'], ['aowpk', 'zg', 'dt', 'uc', 'u'], ['ymhiouqp', 'lkyoqi', 'ywtsvqio', 'lnmyoiq'], ['ydbhigntrexvkua', 'urlaigkqnydwxhb'], ['nfro', 'z', 'jz'], ['ojsag', 'gajso', 'gjsao', 'jhsog'], ['t', 't', 'y', 'h'], ['jieqmryxv', 'xqvimey', 'umyqveix', 'vtedmnxliqyf'], ['tmd', 'tdm', 'dtm', 'mkdt', 'hmdt'], ['px', 'gwruq', 'pz'], ['tejofhqklimp', 'thojpkfgelwmrq'], ['tseirdkyqvcghwju', 'tjhycvgilezdws'], ['roqbndl', 'rdql', 'qlrd', 'lqremd'], ['qvgunystzpckrwifmxdolajehb', 'bgtixcwloydzqjskvnfmpeurah'], ['soviern', 'rlakxngecptvsz', 'nvdsre'], ['gzkoiysxl', 'vjrlmtpbsceozhauwx', 'kfnqdzolsx'], ['kwzaqnipgxfhoy', 'hanwlofgqxpzk', 'xqngazkwphof', 'pqwkfghaoxzn', 'qwnfgpakxhzo'], ['zhurktfoqmlbnx', 'mhlxorzbntufqk', 'qbzklhnurmotfx'], ['gezmci', 'oecmg'], ['pcyteovnsz', 'dptlfuzh'], ['roxjhkng', 'xonksrad', 'rxnikos'], ['vbgmsrecxpj', 'srcjxmbgep', 'rbgsxcepjkmq', 'pjgcmzbsrxe'], ['gkvwndflryjshmbqxtpizuocea', 'fwndvekqtzployghijsmruabx'], ['dcxtogbifek', 'ifkdgoxbc'], ['srmqlnhbwv', 'liwsqzvtn', 'wgeoqvpfs', 'wkyqvsacd'], ['yswarofhdmqclxkgut', 'daxhzkgumjysrlwq', 'qfamswzyiglxdruhk', 'vsnwxadlhrbgqmuyk'], ['rxwzkmd', 'kwzx', 'qawokzlxe', 'xmdnfkwz'], ['exo', 'xvqod', 'cv', 'pnrkmywh', 'uztea'], ['ma', 'ma', 'qamfr', 'am'], ['nksp', 'kvpn', 'pkn', 'nkvp', 'nkp'], ['pwlvdsagy', 'islyawu'], ['sgbnwulekhpmy', 'mjgqeyshpbwuln', 'yubghpanecmszwlv', 'euwohbysqngptlmx'], ['gs', 'e', 'kas', 'a', 'md'], ['i', 'x', 'bl'], ['vishqyrzgmpbeuldj', 'gwcpvnskbftudyorj'], ['ueswlatkopc', 'wbeosclpktau', 'lcpvaswokuet', 'ltkupsmeawoc'], ['iwtvopbgyc', 'widjykopv', 'ivowyp', 'iwyvhop'], ['bfnwdumyozhpxre', 'zhweumdnpbofy', 'dcsobyuhfntpmzwe'], ['zrlaspbhty', 'oyhrftzbslap', 'ysztbhlapr', 'tszhpbayrl'], ['wbgxh', 'gnhwxcb', 'wxbhg', 'gxhwb', 'gxbwh'], ['ngribvdawujskcmfx', 'rvskbgiwjxuca', 'wiyvgcsbjxkrua'], ['ifstrq', 'fk'], ['b', 'b', 'b', 'u'], ['hpqy', 'wjplyq'], ['zwkfgbsmedluyot', 'fdtrhsgeumk', 'vexgtudkshfim', 'eutigskmdrf'], ['imljkdnzpx', 'jqwknpxlhmzd', 'pmdyxgnjklz', 'rxbjmlnkzdpg', 'ulxbmpdnzykj'], ['vetubnwdy', 'bnwatdvyou', 'zfwgvtdbnki', 'dlvewatnb'], ['uj', 'otuj', 'uj'], ['ifstpgrbcnywaxmkdzoqvh', 'qkbfhovrginxapzywdct', 'vyofbwcdginrkqtazhxp'], ['mvnaokugdshybwtr', 'ntvsywuadrkmohgb'], ['fauo', 'pnofxadk', 'sfoa', 'sofa'], ['akecpnjdwrztvlfbuhsiq', 'jehrndzisqcauwlftkbpv', 'uawiskrjentfbcqlpdvhz', 'crtpjbdalsviwfnhqezuk', 'ncawkfdsqtrhpjzielvub'], ['otazsfhc', 'ltkacysow', 'pvtomna', 'tacok'], ['mx', 'x', 'x', 'x', 'x'], ['hmoy', 'zmyhjuo', 'ypmxohn', 'hoxym'], ['dm', 'md', 'dm', 'md'], ['uqvbhfdomlwtkxez', 'szaqwmlhytgvxkr', 'wmpzhxqktlv'], ['btkpdjinsrmogfywzhlvecau', 'idylbvnopjsgrkfheuczawtm', 'tygvsizrwjneplkohcmafudb', 'wtvprskenjchmiyfuzglodba', 'jwdafzcemrbsunotyglpihkv'], ['e', 'ouxg', 'ei', 'shp'], ['ul', 'ul', 'ulrspe', 'louy', 'uynlvo'], ['yibgqkf', 'uvcwx', 'mvxdohjlw'], ['q', 'z', 'z'], ['orxgfiqznujyplsbadv', 'gtzieoxspqrvndjbylfu'], ['hmlqcujrysbgoentdp', 'dyjmrbtpuhgslncw', 'rmyfuhdgclnpsktjb', 'ptucnyhsmlwrbgjd', 'wrhnldscjeyupmtgb'], ['sowieczubgx', 'firsgewzpbo'], ['txeo', 'exot', 'oext', 'oxte', 'otxe'], ['ontlbzyekruhpscwqvaxmdj', 'ahrtijxdepnokymcsgwuf'], ['ftsraxmwogvnkdbzqiyhju', 'ylsdhonjzrfwmqukc'], ['leiupzardbfsv', 'dzuwlesifrbp', 'ldiupzersfb', 'fupwslrzbedi'], ['jtdp', 'dajg'], ['jpglzoriafexks', 'gpaozketlcixs'], ['butisvecnfplqmygworax', 'jrhpbwztcveifamlyqxdung'], ['r', 'r', 'r', 'zr'], ['eyniaztvgdrl', 'dalgonxbiecywthzvr', 'dtzrgenvliya'], ['akzferolcmstgby', 'kmcagsbteyrlfzo', 'aoktgslmcrzbfye'], ['jqigpeydwl', 'mkeaxqcudzgvfhb'], ['ayhgbfzerjxd', 'rnzfaxy', 'wyzaxnrf', 'ycazxfrw', 'ayzxrf'], ['jgmkwtnizxrcbvfqhyeal', 'mwatrngvlezckqfiybhjx', 'vmrwyqnigzhtjfckxaeb', 'wkehnqrtcjigzxavbfym', 'vrczmohgtfbnaejxqiwyk'], ['c', 'c', 'c', 'c'], ['idx', 'id', 'id'], ['zaipnjbsxkg', 'xevnfipkjgb', 'ujxldqcnbhi'], ['hco', 'co'], ['ztlrica', 'ktneixcrs'], ['hlutcdsgoj', 'mwlypnzbqafvxkire'], ['lznhjwgsiv', 'wricunaxj'], ['fdqgyzopwlen', 'rkvt'], ['vy', 'gy'], ['ihbpfsx', 'pshixfb', 'sifxhpb'], ['begmqirvflkxuyanp', 'dmpvhfbnaxsuloqitjy'], ['uwamykhsnbfzxielpdo', 'cxzswhvtabupmqjlekond'], ['gisqpjrubx', 'rjbiuqxspg', 'gqpirxbsju'], ['u', 'u', 'v', 'u'], ['gnjqsoha', 'qgandhlyrs', 'snhqvlrabg'], ['vo', 'vo', 'ov', 'vo'], ['iudvwxpmtac', 'owlyxsangim', 'hbdrxmwaei', 'wjimax'], ['xmubte', 'yuogxa'], ['nwkurtxjcpqozmhgsvbe', 'chrmvakuyxtowqpgzbej'], ['manbesvzpyt', 'dgtwazpqjmbnr', 'itfkoupbhlcnax'], ['omhinsxf', 'lnmdoix', 'eimgrno', 'hyomidn', 'nmjodi'], ['qmpn', 'ripmn'], ['wfm', 'wmf', 'mwf', 'mfw', 'fwm'], ['uaoxphg', 'phoxb'], ['btfprm', 'ztmrf', 'mrft', 'ramft', 'tmrezfa'], ['uaznory', 'zyaiourn', 'nouryaz', 'coszugmanyr', 'lqazryonu'], ['vqlswifmcg', 'wzuclnxsvt'], ['eh', 'eh', 'he'], ['siuhfpb', 'iuhfs'], ['yfhciqlnwpgemoxktas', 'ticjauwfsygepqnhx'], ['ndmhwtub', 'zbagktxiulnwh'], ['txdikm', 'boldxtiqmf', 'dxtimj'], ['wvr', 'vwrb', 'wrv'], ['utyjachpfordvw', 'benvkudcfta', 'vduqiftcgsa', 'fcuatdxv'], ['doivj', 'jiv', 'vjkpyi', 'jvi', 'dijv'], ['mhyn', 'mxngywh', 'yjhmn', 'dmynhulkacb'], ['hpidlbezkwqtr', 'dgtaflrnyscm'], ['osqeajcvduwhzrtkl', 'zcaevujrqsdolgwkyt', 'uokqnrdjaecvwtlzs'], ['ovsbxzgaju', 'vliydjht', 'dvjt'], ['stlxuabmcwqkodevrhf', 'ajskvtpmlicqewbhuzfd'], ['g', 'cg', 'ezfo'], ['zqfmuxlnhkgdpvwrtjio', 'rkjqvomtguhpiwfzxnld', 'zfgxrclnimokhvpjdutwq', 'tgkxfqrnhdzowpvijlmu'], ['ni', 'qn', 'nq'], ['sn', 'qn', 'fdn', 'qn', 'hson'], ['tplicyhxqfujbkzv', 'qfbzvwkuycsa', 'vzqnbfcokyuda'], ['apoy', 'plfxotkv', 'iphsqjorged'], ['ravyhbsfelgcmzponqwikj', 'bitfjzwakhmvxngsoepcyrlq', 'cevpwyrnlobjsfziagkhmq', 'mswnezcpklfrjqgiyovabdh', 'cijelkwpbnhrsmzofygavq'], ['sqvnuedcytaxohplzf', 'cekhbgwadpmyofslxq'], ['gclfnxakjzsw', 'wzjcnsgka', 'ciwzsganjk', 'aspicokjgnwz'], ['qrabg', 'ajbgmw', 'yabg', 'vgsrba', 'hcgtbya'], ['xarbuvi', 'ivaku', 'kiuav', 'vzgxiah', 'flsivaj'], ['ckodrthljgyfwm', 'mgytohfxnrdkjbvlwc', 'cfdwmjoltkshrgy', 'yhwmrldfucogkjt', 'fmctpgwydhkajlro'], ['qvibocelnsdyzfkjhpuxmtrg', 'zgdksnoypqebifltcrjvuxmh', 'giocmuefxsprhdjkzntvqlyb'], ['xkcrlwomygs', 'grluckhsanomxwf', 'sriokwlmcyxg', 'kxgirswtcvlom'], ['budr', 'brdu', 'dibur', 'urbd'], ['o', 'o'], ['p', 'p', 'p', 'p'], ['wnydf', 'wrptghizjqk'], ['wnbdmltxcq', 'dfcwl'], ['ksaveflzdxqocbgyjp', 'bcxavldgysqozpkjfe', 'ozpvselaqgbdycjxfk', 'clpzdoebvqjgaskxfy', 'qykodlgvzjaxspfceb'], ['nrmdjstqozklxvcyag', 'ejzwbu'], ['kfgijmd', 'zmgjdikf', 'jgimfdk', 'ijfgkmdz', 'smbrfkxdwgeij'], ['yhtuxnfcq', 'tcyufhnxq', 'hfuxytcqn', 'nqtufyxch'], ['rlhzknoiuycefpmvxqbg', 'nbvgfexmqikpyhruo', 'hqkgnvyieomubfxpr'], ['bjyadnftcsxqk', 'lpfbvzcsumerho', 'wctsbf'], ['iyamec', 'myeibctka', 'egyicam'], ['ac', 'pvaqdb', 'a', 'au'], ['giltsum', 'ixyhncbjqped'], ['cinzuvkystgfodr', 'rksphwcfxdgey', 'xrdjkygcsfq', 'bfmdecpysrkg', 'gcrdyslfk'], ['ayqpgucwedftoxjk', 'eoagwdtkfqlypjuc'], ['ktysxp', 'sptx', 'qpxst', 'ptsqx'], ['uvclismeajkpbzgqwn', 'aicbqfzvlnuegpm', 'glecvmpzrnioudaq', 'kanmveflzpcgyuqi'], ['vklag', 'glv', 'lvg', 'lgv', 'vgl'], ['tyuh', 'hut', 'thu', 'htu', 'thu'], ['eyipwtfuhxzalmdgrs', 'whfcvbquxgepn'], ['tg', 'ge', 'g'], ['vk', 'uatvn', 'mzv'], ['jhfmpux', 'mhjquxkp'], ['gzyxjwfb', 'grzfxmwybj', 'cywfjpxztgb'], ['udrye', 'eqdyr', 'yerd', 'eryd'], ['kwdoynribhpsqmlgvuje', 'gunbjywvmheirdqpok', 'dnqeivoptrkwuyjhmg'], ['czvmpr', 'sxpum'], ['qlktsn', 'tkclq', 'sbqlkwt', 'luetjiqpk', 'lcvtqsk'], ['rotvsfwelbnj', 'fwbqmaolesn', 'qbfwegzislpnoc', 'nzoelswfpab'], ['wsecbml', 'sclabmwe', 'ezpsidclwtmbgvr', 'mcelawsb'], ['ngz', 'zg', 'gz', 'zg', 'gz'], ['xqjwnaiyb', 'jayxibqngw', 'qinjwxbay', 'nbaiwyxqj', 'jniaxqwyb'], ['hktywl', 'htwlyk', 'kytwlh'], ['ymbeahldgz', 'pjaoszx'], ['b', 'b', 'bz', 'kb'], ['gvdcqp', 'qpvyrcdlk'], ['nij', 'jfiub', 'jtieyxl', 'mnij', 'imvju'], ['qh', 'hq', 'hq', 'hq'], ['tez', 'zet', 'etz', 'etz'], ['wz', 'wz'], ['xc', 'jvxc', 'xpzc', 'rgumxc', 'xc'], ['nizsgkvylw', 'ngylivwzks', 'ylgsiznvkw', 'ilgyvsankzw', 'ilzywsnkgv'], ['emhpiwfyung', 'qlzkob', 'ldjx', 'xvat'], ['luzfaswdyj', 'jsdyuzlafw', 'ljdsafzuwy', 'yusdjwzfal', 'dsyjwuzafl'], ['uioafnlegsvjdxphr', 'lnfrjdpehvsxguoa', 'najruefdlxogvhsp'], ['gumjphl', 'mplchdjuw', 'hmjrlup', 'jmpgulh'], ['q', 'q', 'q', 'q', 'q'], ['feyimktsugrq', 'qygsrtlpmfkeui', 'sfkmrgqyitue'], ['xpklzsyodcnhrjq', 'xcznojsdpqhrlky'], ['btmsc', 'mtscbv', 'csmtb', 'tmbcsx', 'mbxtsc'], ['dvrfumay', 'ymafr', 'mrifya', 'ykrmaf'], ['do', 'd', 'andk', 'dcp', 'd'], ['glhmjykfaznvrd', 'bvmijshzga', 'vmjuqazhgpx', 'voczhgamj', 'wjhizgqavms'], ['voilgtup'], ['vrphtmc', 'bgfkjvad'], ['bxkfi', 'kixbf', 'xfkbi', 'xfikb', 'xfkbi'], ['lfixvpozghcauk', 'plgixmzukcovh', 'hyruilocxgkztqv', 'uglxkaihcozv'], ['avgptdmi', 'gydpvt', 'dptawvu', 'rvtdopxlqs'], ['rsmglpt', 'gpmnlthr'], ['tqmeukoia', 'kamiout', 'mqwauekov', 'macoryuk', 'nujbskgapmlo'], ['ndjrglykwoi', 'jrwkdnolygi', 'ownkidlryjg'], ['kwheact', 'txukwjcgbhar', 'whgotjk', 'kzhtw', 'lmvynhptdqkifw'], ['odkzwylprhvn', 'pwozvnydrh', 'zdhnpryowv'], ['crni', 'qdnkiou', 'gbwhyasjx'], ['bxitsamogcq', 'erbxklyhvtczu'], ['swrfxdpjhly', 'pwdjkvfyxrshl', 'sxehqrtwpdamnyjzolbui', 'gpdryslhwxcj'], ['fhldcksrpyi', 'qfejshrcat', 'wsmrvcnogxh'], ['vwacyofjtilrxngp', 'otylvxpfwgcnjria', 'xojfignyrtlpwvca'], ['qvz', 'ozm'], ['msrdwqahutefvxy', 'rjmyotiefuh', 'ltyrmenbzjuhf', 'felbyputmhr'], ['riyzo', 'kzroyuwi', 'yirozp', 'yoirz', 'roiyz'], ['rqjz', 'vjrq', 'qrj', 'prqj', 'zqjr'], ['vdx', 'xvd', 'xdvu', 'vdx'], ['xeauhryviqg', 'wpxkufzsjmctlnybd'], ['hbzwdlno', 'tmrj', 'np', 'lqfx', 'kuygescvia'], ['iqph', 'ihpq', 'pqhi', 'ihqp', 'qpih'], ['lsfwxmpkgqzvhecoay', 'gqfszwakhvymptcexol', 'cpaxwlzkfqvhsgemyo', 'lghfwvcmzxpokeysaq'], ['tgmpafqbuds', 'hspdfabuqgctm', 'tpcubdaqsvgm', 'mxqbktspoaujd'], ['xktgfvyprhndme', 'vntmyskfegprid', 'dsvpfmnkygtre', 'ydmvpkfretng'], ['npvgjzuo', 'mwlackhs'], ['gyj', 'myk'], ['w', 'w', 'w', 'k', 'w'], ['sgrhv', 'rixdgjluf', 'rgs', 'rsbg'], ['kmiqobutwplfryxgeajhnz', 'ylrtmpauodjnfvwgeixqz', 'extlfwjsirnmgyuqaopz'], ['vdngfjbwypio', 'sukyvfzpeqwthdxg', 'fyvrndgbwp', 'ydwfvglp'], ['fhsi', 'hsbif'], ['fihzecojaqm', 'jzchuomvwsqfr', 'jzchoqtfm'], ['kqafdzcgphvbos', 'qbspzodfavhck', 'adfozhquktlcibspv', 'szhpfboagdcqkv'], ['tmeb', 'takbe'], ['ymrhgdo', 'ypgzhmltd', 'fdbymgshcx', 'nghyzldm'], ['bxgm', 'gmxb', 'mxgb', 'gxbm', 'xbmvg'], ['fep', 'lnp', 'trjim', 'dauy', 'fplk'], ['udhzexv', 'dhmezvx', 'qdxylbhvzw', 'zveduxcht'], ['wgvhaokesjirly', 'osrewigqfdyvzk', 'kupsxrimowgbe'], ['skzvhanpljbogdyxtiquw', 'xzgdwyjluhnbstopikaqv', 'pasixghzovnjylbwudqkt'], ['wj', 'wj', 'wkj', 'jw', 'wj'], ['nsmyxfhc', 'xcfymhsn', 'hxscmnyf', 'cfxsmnlyh'], ['jpblgmiyunazcfd', 'tabnyfmupclzgd', 'esyvuphfgwbknodzcxlqa'], ['xkyqozefvgutmrw', 'rmhzwgeutoypx'], ['rzaxcemljnvo', 'kdwyqvohesitfb'], ['kfqrcezwn', 'qrnwkzcf', 'frcnqwzk', 'frnckvhzwq', 'kqzrcnfw'], ['fqux', 'qxuyfod', 'ufxq', 'qxfu', 'qxuf'], ['ztopdir', 'ritpozd', 'otrpizd', 'idpotzr'], ['jzhngmufw', 'zguwhfj'], ['ndxhmysbgcriqkewoztujva', 'cmtwbudvysekqaxizrojng', 'itncgkdyoaxswrqvmejzpbu', 'qyvcdusgwbomejtxznkira'], ['nik', 'yfi', 'i', 'i'], ['hpsdjo', 'hobps', 'ohsp', 'shpo', 'kypshio'], ['jbiyatwz', 'zbtagnrc', 'ztnagb', 'batz'], ['fvkurj', 'kfgjvru', 'jukfrv', 'kvfujr']) ret = 0 for g in m: st = set() for s in g: st.update(list(s)) ret += len(st) print(ret) ret = 0 for g in m: st = set().union(*g) ret += len(st) print(ret) print(sum((len(st) for st in (set().union(*g) for g in m)))) print(sum((len(st) for st in (set(g[0]).intersection(*g) for g in m)))) ret = 0 for g in m: st = set(list(g[0])) for s in g: st.intersection_update(list(s)) ret += len(st) print(ret)
#!/usr/bin/env python2 ARTICLE_QUERY = """ SELECT articles.title, count(*) AS num FROM log, articles WHERE log.path = '/article/' || articles.slug GROUP BY articles.title ORDER BY count(*) DESC LIMIT 3 """ AUTHOR_QUERY = """ SELECT authors.name, count(*) AS num FROM log, articles, authors WHERE log.path = '/article/' || articles.slug AND articles.author = authors.id GROUP BY authors.name ORDER BY num DESC """ LOG_QUERY = """ SELECT errors.date, errors.num/total.num::float*100 AS error_rate FROM (SELECT time::timestamp::date AS date, count(status) AS num FROM log GROUP BY date, status HAVING status='404 NOT FOUND' ) AS errors, (SELECT time::timestamp::date AS date, count(*) AS num FROM log GROUP BY date ) AS total WHERE errors.date = total.date AND errors.num/total.num::float*100 > 1.0 """
article_query = "\n SELECT\n articles.title,\n count(*) AS num\n FROM\n log,\n articles\n WHERE\n log.path = '/article/' || articles.slug\n GROUP BY\n articles.title\n ORDER BY\n count(*) DESC\n LIMIT 3\n" author_query = "\n SELECT\n authors.name,\n count(*) AS num\n FROM\n log,\n articles,\n authors\n WHERE\n log.path = '/article/' || articles.slug AND\n articles.author = authors.id\n GROUP BY\n authors.name\n ORDER BY\n num DESC\n" log_query = "\n SELECT\n errors.date,\n errors.num/total.num::float*100 AS error_rate\n FROM\n (SELECT\n time::timestamp::date AS date,\n count(status) AS num\n FROM\n log\n GROUP BY\n date, status\n HAVING\n status='404 NOT FOUND'\n ) AS errors,\n\n (SELECT\n time::timestamp::date AS date,\n count(*) AS num\n FROM\n log\n GROUP BY\n date\n ) AS total\n WHERE\n errors.date = total.date AND\n errors.num/total.num::float*100 > 1.0\n"
a, b = 1, 2 result = 0 while True: a, b = b, a + b if a >= 4_000_000: break if a % 2 == 0: result += a print(result)
(a, b) = (1, 2) result = 0 while True: (a, b) = (b, a + b) if a >= 4000000: break if a % 2 == 0: result += a print(result)
def draw_1d(line, row): print(("*"*row + "\n")*line) def draw_2d(line, row, simbol): print((simbol*row + "\n")*line) def special_draw_2d(line, row, border, fill): print(border*row) row -= 2 line -= 2 i = line while i > 0: print(border + fill*row + border) i -= 1 print(border*(row+2)) special_draw_2d(7,24,"8",".")
def draw_1d(line, row): print(('*' * row + '\n') * line) def draw_2d(line, row, simbol): print((simbol * row + '\n') * line) def special_draw_2d(line, row, border, fill): print(border * row) row -= 2 line -= 2 i = line while i > 0: print(border + fill * row + border) i -= 1 print(border * (row + 2)) special_draw_2d(7, 24, '8', '.')
def registrar(registry, name="entry"): """ Creates and returns a register function that can be used as a decorator for registering functions into the given registry dictionary. :param registry: Dictionary to add entry registrations to. :param name: Name to give to each entry. "entry" is used by default. :returns: A register() decorator that can be used to fill in the given registry dictionary. """ def register_func(entry_name_or_func): """ Registers an entry for the CPU emulator. """ if callable(entry_name_or_func): # If function, that means no argument was passed in and we should register using the function name. func = entry_name_or_func entry_name = func.__name__.lower() registry[entry_name] = func return func # Otherwise, register with user provided name entry_name = entry_name_or_func if entry_name in registry: raise ValueError("Duplicate {} name: {}".format(name, entry_name)) def _wrapper(func): # Register function as entry. registry[entry_name.lower()] = func return func # Must return function afterwards. return _wrapper return register_func
def registrar(registry, name='entry'): """ Creates and returns a register function that can be used as a decorator for registering functions into the given registry dictionary. :param registry: Dictionary to add entry registrations to. :param name: Name to give to each entry. "entry" is used by default. :returns: A register() decorator that can be used to fill in the given registry dictionary. """ def register_func(entry_name_or_func): """ Registers an entry for the CPU emulator. """ if callable(entry_name_or_func): func = entry_name_or_func entry_name = func.__name__.lower() registry[entry_name] = func return func entry_name = entry_name_or_func if entry_name in registry: raise value_error('Duplicate {} name: {}'.format(name, entry_name)) def _wrapper(func): registry[entry_name.lower()] = func return func return _wrapper return register_func
#!/usr/bin/env python # encoding: utf-8 # @author: Zhipeng Ye # @contact: Zhipeng.ye19@xjtlu.edu.cn # @file: implementstrstr.py # @time: 2020-02-22 16:27 # @desc: class Solution: def strStr(self, haystack, needle): if len(needle) == 0: return 0 haystack_length = len(haystack) needle_length = len(needle) if needle_length > haystack_length: return -1 index= -1 for i in range(haystack_length): j=0 current_i = i while current_i < haystack_length and haystack[current_i] == needle[j]: current_i +=1 j +=1 if j>=needle_length: return current_i - needle_length+1 return index if __name__ == '__main__': solution = Solution() print(solution.strStr('mississippi','issipi'))
class Solution: def str_str(self, haystack, needle): if len(needle) == 0: return 0 haystack_length = len(haystack) needle_length = len(needle) if needle_length > haystack_length: return -1 index = -1 for i in range(haystack_length): j = 0 current_i = i while current_i < haystack_length and haystack[current_i] == needle[j]: current_i += 1 j += 1 if j >= needle_length: return current_i - needle_length + 1 return index if __name__ == '__main__': solution = solution() print(solution.strStr('mississippi', 'issipi'))
""" Helper script for writing a "input_collect_{run_name}.json" input file (see README.md). Below is an example of it for the 1D Heisenberg model ({run_name} = 1D_heisenberg1) which has a seed of 1 and 1600 samples. """ info = 'heisenberg1' run_name = 'run1D_{}_1_'.format(info) input_filename = 'input_collect_run1D_{}.json'.format(info) output_filename = '"output_run1D_{}"'.format(info) input_file = open(input_filename, 'w') folders_str = '' run0 = 0 run1 = 1600 num_runs = run1 - run0 for n in range(run0, run1): folders_str += '"{}{}"'.format(run_name, n) if n != run1 - 1: folders_str += ', ' folders_str = '['+folders_str+']' file_contents = """{ "folders" : """+folders_str file_contents += """, "output_filename" : """+output_filename+""", "record_only_converged" : true } """ input_file.write(file_contents) input_file.close()
""" Helper script for writing a "input_collect_{run_name}.json" input file (see README.md). Below is an example of it for the 1D Heisenberg model ({run_name} = 1D_heisenberg1) which has a seed of 1 and 1600 samples. """ info = 'heisenberg1' run_name = 'run1D_{}_1_'.format(info) input_filename = 'input_collect_run1D_{}.json'.format(info) output_filename = '"output_run1D_{}"'.format(info) input_file = open(input_filename, 'w') folders_str = '' run0 = 0 run1 = 1600 num_runs = run1 - run0 for n in range(run0, run1): folders_str += '"{}{}"'.format(run_name, n) if n != run1 - 1: folders_str += ', ' folders_str = '[' + folders_str + ']' file_contents = '{\n "folders" : ' + folders_str file_contents += ', \n "output_filename" : ' + output_filename + ',\n "record_only_converged" : true\n}\n' input_file.write(file_contents) input_file.close()
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'shard', 'type': 'static_library', 'msvs_shard': 4, 'sources': [ 'hello1.cc', 'hello2.cc', 'hello3.cc', 'hello4.cc', ], 'product_dir': '<(PRODUCT_DIR)', }, { 'target_name': 'refs_to_shard', 'type': 'executable', 'dependencies': [ # Make sure references are correctly updated. 'shard', ], 'sources': [ 'hello.cc', ], }, ] }
{'targets': [{'target_name': 'shard', 'type': 'static_library', 'msvs_shard': 4, 'sources': ['hello1.cc', 'hello2.cc', 'hello3.cc', 'hello4.cc'], 'product_dir': '<(PRODUCT_DIR)'}, {'target_name': 'refs_to_shard', 'type': 'executable', 'dependencies': ['shard'], 'sources': ['hello.cc']}]}
#-*- coding: utf-8 -*- BASE = { # can be overriden by a configuration file 'SOA_MNAME': 'polaris.example.com.', 'SOA_RNAME': 'hostmaster.polaris.example.com.', 'SOA_SERIAL': 1, 'SOA_REFRESH': 3600, 'SOA_RETRY': 600, 'SOA_EXPIRE': 86400, 'SOA_MINIMUM': 1, 'SOA_TTL': 86400, 'SHARED_MEM_HOSTNAME': '127.0.0.1', 'SHARED_MEM_STATE_TIMESTAMP_KEY': 'polaris_health:state_timestamp', 'SHARED_MEM_PPDNS_STATE_KEY': 'polaris_health:ppdns_state', 'SHARED_MEM_SOCKET_TIMEOUT': 1, 'LOG': False, # copied from POLARIS_INSTALL_PREFIX env when the configuration is loaded 'INSTALL_PREFIX': None, } TOPOLOGY_MAP = {}
base = {'SOA_MNAME': 'polaris.example.com.', 'SOA_RNAME': 'hostmaster.polaris.example.com.', 'SOA_SERIAL': 1, 'SOA_REFRESH': 3600, 'SOA_RETRY': 600, 'SOA_EXPIRE': 86400, 'SOA_MINIMUM': 1, 'SOA_TTL': 86400, 'SHARED_MEM_HOSTNAME': '127.0.0.1', 'SHARED_MEM_STATE_TIMESTAMP_KEY': 'polaris_health:state_timestamp', 'SHARED_MEM_PPDNS_STATE_KEY': 'polaris_health:ppdns_state', 'SHARED_MEM_SOCKET_TIMEOUT': 1, 'LOG': False, 'INSTALL_PREFIX': None} topology_map = {}
# test_with_pytest.py def test_always_passes(): assert True def test_always_fails(): assert False
def test_always_passes(): assert True def test_always_fails(): assert False
def main(): chars = input() stack = [] for char in chars: if char == '<': # pop from stack if len(stack) != 0: stack.pop() else: stack.append(char) print(''.join(stack)) if __name__ == "__main__": main()
def main(): chars = input() stack = [] for char in chars: if char == '<': if len(stack) != 0: stack.pop() else: stack.append(char) print(''.join(stack)) if __name__ == '__main__': main()
# -*- coding: utf-8 -*- model = { 'en ': 0, 'de ': 1, ' de': 2, 'et ': 3, 'an ': 4, ' he': 5, 'er ': 6, ' va': 7, 'n d': 8, 'van': 9, 'een': 10, 'het': 11, ' ge': 12, 'oor': 13, ' ee': 14, 'der': 15, ' en': 16, 'ij ': 17, 'aar': 18, 'gen': 19, 'te ': 20, 'ver': 21, ' in': 22, ' me': 23, 'aan': 24, 'den': 25, ' we': 26, 'at ': 27, 'in ': 28, ' da': 29, ' te': 30, 'eer': 31, 'nde': 32, 'ter': 33, 'ste': 34, 'n v': 35, ' vo': 36, ' zi': 37, 'ing': 38, 'n h': 39, 'voo': 40, 'is ': 41, ' op': 42, 'tie': 43, ' aa': 44, 'ede': 45, 'erd': 46, 'ers': 47, ' be': 48, 'eme': 49, 'ten': 50, 'ken': 51, 'n e': 52, ' ni': 53, ' ve': 54, 'ent': 55, 'ijn': 56, 'jn ': 57, 'mee': 58, 'iet': 59, 'n w': 60, 'ng ': 61, 'nie': 62, ' is': 63, 'cht': 64, 'dat': 65, 'ere': 66, 'ie ': 67, 'ijk': 68, 'n b': 69, 'rde': 70, 'ar ': 71, 'e b': 72, 'e a': 73, 'met': 74, 't d': 75, 'el ': 76, 'ond': 77, 't h': 78, ' al': 79, 'e w': 80, 'op ': 81, 'ren': 82, ' di': 83, ' on': 84, 'al ': 85, 'and': 86, 'bij': 87, 'zij': 88, ' bi': 89, ' hi': 90, ' wi': 91, 'or ': 92, 'r d': 93, 't v': 94, ' wa': 95, 'e h': 96, 'lle': 97, 'rt ': 98, 'ang': 99, 'hij': 100, 'men': 101, 'n a': 102, 'n z': 103, 'rs ': 104, ' om': 105, 'e o': 106, 'e v': 107, 'end': 108, 'est': 109, 'n t': 110, 'par': 111, ' pa': 112, ' pr': 113, ' ze': 114, 'e g': 115, 'e p': 116, 'n p': 117, 'ord': 118, 'oud': 119, 'raa': 120, 'sch': 121, 't e': 122, 'ege': 123, 'ich': 124, 'ien': 125, 'aat': 126, 'ek ': 127, 'len': 128, 'n m': 129, 'nge': 130, 'nt ': 131, 'ove': 132, 'rd ': 133, 'wer': 134, ' ma': 135, ' mi': 136, 'daa': 137, 'e k': 138, 'lij': 139, 'mer': 140, 'n g': 141, 'n o': 142, 'om ': 143, 'sen': 144, 't b': 145, 'wij': 146, ' ho': 147, 'e m': 148, 'ele': 149, 'gem': 150, 'heb': 151, 'pen': 152, 'ude': 153, ' bo': 154, ' ja': 155, 'die': 156, 'e e': 157, 'eli': 158, 'erk': 159, 'le ': 160, 'pro': 161, 'rij': 162, ' er': 163, ' za': 164, 'e d': 165, 'ens': 166, 'ind': 167, 'ke ': 168, 'n k': 169, 'nd ': 170, 'nen': 171, 'nte': 172, 'r h': 173, 's d': 174, 's e': 175, 't z': 176, ' b ': 177, ' co': 178, ' ik': 179, ' ko': 180, ' ov': 181, 'eke': 182, 'hou': 183, 'ik ': 184, 'iti': 185, 'lan': 186, 'ns ': 187, 't g': 188, 't m': 189, ' do': 190, ' le': 191, ' zo': 192, 'ams': 193, 'e z': 194, 'g v': 195, 'it ': 196, 'je ': 197, 'ls ': 198, 'maa': 199, 'n i': 200, 'nke': 201, 'rke': 202, 'uit': 203, ' ha': 204, ' ka': 205, ' mo': 206, ' re': 207, ' st': 208, ' to': 209, 'age': 210, 'als': 211, 'ark': 212, 'art': 213, 'ben': 214, 'e r': 215, 'e s': 216, 'ert': 217, 'eze': 218, 'ht ': 219, 'ijd': 220, 'lem': 221, 'r v': 222, 'rte': 223, 't p': 224, 'zeg': 225, 'zic': 226, 'aak': 227, 'aal': 228, 'ag ': 229, 'ale': 230, 'bbe': 231, 'ch ': 232, 'e t': 233, 'ebb': 234, 'erz': 235, 'ft ': 236, 'ge ': 237, 'led': 238, 'mst': 239, 'n n': 240, 'oek': 241, 'r i': 242, 't o': 243, 't w': 244, 'tel': 245, 'tte': 246, 'uur': 247, 'we ': 248, 'zit': 249, ' af': 250, ' li': 251, ' ui': 252, 'ak ': 253, 'all': 254, 'aut': 255, 'doo': 256, 'e i': 257, 'ene': 258, 'erg': 259, 'ete': 260, 'ges': 261, 'hee': 262, 'jaa': 263, 'jke': 264, 'kee': 265, 'kel': 266, 'kom': 267, 'lee': 268, 'moe': 269, 'n s': 270, 'ort': 271, 'rec': 272, 's o': 273, 's v': 274, 'teg': 275, 'tij': 276, 'ven': 277, 'waa': 278, 'wel': 279, ' an': 280, ' au': 281, ' bu': 282, ' gr': 283, ' pl': 284, ' ti': 285, "'' ": 286, 'ade': 287, 'dag': 288, 'e l': 289, 'ech': 290, 'eel': 291, 'eft': 292, 'ger': 293, 'gt ': 294, 'ig ': 295, 'itt': 296, 'j d': 297, 'ppe': 298, 'rda': 299, }
model = {'en ': 0, 'de ': 1, ' de': 2, 'et ': 3, 'an ': 4, ' he': 5, 'er ': 6, ' va': 7, 'n d': 8, 'van': 9, 'een': 10, 'het': 11, ' ge': 12, 'oor': 13, ' ee': 14, 'der': 15, ' en': 16, 'ij ': 17, 'aar': 18, 'gen': 19, 'te ': 20, 'ver': 21, ' in': 22, ' me': 23, 'aan': 24, 'den': 25, ' we': 26, 'at ': 27, 'in ': 28, ' da': 29, ' te': 30, 'eer': 31, 'nde': 32, 'ter': 33, 'ste': 34, 'n v': 35, ' vo': 36, ' zi': 37, 'ing': 38, 'n h': 39, 'voo': 40, 'is ': 41, ' op': 42, 'tie': 43, ' aa': 44, 'ede': 45, 'erd': 46, 'ers': 47, ' be': 48, 'eme': 49, 'ten': 50, 'ken': 51, 'n e': 52, ' ni': 53, ' ve': 54, 'ent': 55, 'ijn': 56, 'jn ': 57, 'mee': 58, 'iet': 59, 'n w': 60, 'ng ': 61, 'nie': 62, ' is': 63, 'cht': 64, 'dat': 65, 'ere': 66, 'ie ': 67, 'ijk': 68, 'n b': 69, 'rde': 70, 'ar ': 71, 'e b': 72, 'e a': 73, 'met': 74, 't d': 75, 'el ': 76, 'ond': 77, 't h': 78, ' al': 79, 'e w': 80, 'op ': 81, 'ren': 82, ' di': 83, ' on': 84, 'al ': 85, 'and': 86, 'bij': 87, 'zij': 88, ' bi': 89, ' hi': 90, ' wi': 91, 'or ': 92, 'r d': 93, 't v': 94, ' wa': 95, 'e h': 96, 'lle': 97, 'rt ': 98, 'ang': 99, 'hij': 100, 'men': 101, 'n a': 102, 'n z': 103, 'rs ': 104, ' om': 105, 'e o': 106, 'e v': 107, 'end': 108, 'est': 109, 'n t': 110, 'par': 111, ' pa': 112, ' pr': 113, ' ze': 114, 'e g': 115, 'e p': 116, 'n p': 117, 'ord': 118, 'oud': 119, 'raa': 120, 'sch': 121, 't e': 122, 'ege': 123, 'ich': 124, 'ien': 125, 'aat': 126, 'ek ': 127, 'len': 128, 'n m': 129, 'nge': 130, 'nt ': 131, 'ove': 132, 'rd ': 133, 'wer': 134, ' ma': 135, ' mi': 136, 'daa': 137, 'e k': 138, 'lij': 139, 'mer': 140, 'n g': 141, 'n o': 142, 'om ': 143, 'sen': 144, 't b': 145, 'wij': 146, ' ho': 147, 'e m': 148, 'ele': 149, 'gem': 150, 'heb': 151, 'pen': 152, 'ude': 153, ' bo': 154, ' ja': 155, 'die': 156, 'e e': 157, 'eli': 158, 'erk': 159, 'le ': 160, 'pro': 161, 'rij': 162, ' er': 163, ' za': 164, 'e d': 165, 'ens': 166, 'ind': 167, 'ke ': 168, 'n k': 169, 'nd ': 170, 'nen': 171, 'nte': 172, 'r h': 173, 's d': 174, 's e': 175, 't z': 176, ' b ': 177, ' co': 178, ' ik': 179, ' ko': 180, ' ov': 181, 'eke': 182, 'hou': 183, 'ik ': 184, 'iti': 185, 'lan': 186, 'ns ': 187, 't g': 188, 't m': 189, ' do': 190, ' le': 191, ' zo': 192, 'ams': 193, 'e z': 194, 'g v': 195, 'it ': 196, 'je ': 197, 'ls ': 198, 'maa': 199, 'n i': 200, 'nke': 201, 'rke': 202, 'uit': 203, ' ha': 204, ' ka': 205, ' mo': 206, ' re': 207, ' st': 208, ' to': 209, 'age': 210, 'als': 211, 'ark': 212, 'art': 213, 'ben': 214, 'e r': 215, 'e s': 216, 'ert': 217, 'eze': 218, 'ht ': 219, 'ijd': 220, 'lem': 221, 'r v': 222, 'rte': 223, 't p': 224, 'zeg': 225, 'zic': 226, 'aak': 227, 'aal': 228, 'ag ': 229, 'ale': 230, 'bbe': 231, 'ch ': 232, 'e t': 233, 'ebb': 234, 'erz': 235, 'ft ': 236, 'ge ': 237, 'led': 238, 'mst': 239, 'n n': 240, 'oek': 241, 'r i': 242, 't o': 243, 't w': 244, 'tel': 245, 'tte': 246, 'uur': 247, 'we ': 248, 'zit': 249, ' af': 250, ' li': 251, ' ui': 252, 'ak ': 253, 'all': 254, 'aut': 255, 'doo': 256, 'e i': 257, 'ene': 258, 'erg': 259, 'ete': 260, 'ges': 261, 'hee': 262, 'jaa': 263, 'jke': 264, 'kee': 265, 'kel': 266, 'kom': 267, 'lee': 268, 'moe': 269, 'n s': 270, 'ort': 271, 'rec': 272, 's o': 273, 's v': 274, 'teg': 275, 'tij': 276, 'ven': 277, 'waa': 278, 'wel': 279, ' an': 280, ' au': 281, ' bu': 282, ' gr': 283, ' pl': 284, ' ti': 285, "'' ": 286, 'ade': 287, 'dag': 288, 'e l': 289, 'ech': 290, 'eel': 291, 'eft': 292, 'ger': 293, 'gt ': 294, 'ig ': 295, 'itt': 296, 'j d': 297, 'ppe': 298, 'rda': 299}
# -*- coding: utf-8 -*- """Workspace/project-oriented tmux/git personal assistant. Working on multiple git repositories and juggling tmux sessions can be tedious. `mx` tries to help with that. """ __package__ = 'mx' __license__ = 'MIT' __version__ = '0.2.17' __author__ = __maintainer__ = 'Rafael Bodill' __email__ = 'justrafi@gmail'
"""Workspace/project-oriented tmux/git personal assistant. Working on multiple git repositories and juggling tmux sessions can be tedious. `mx` tries to help with that. """ __package__ = 'mx' __license__ = 'MIT' __version__ = '0.2.17' __author__ = __maintainer__ = 'Rafael Bodill' __email__ = 'justrafi@gmail'
"""syphon.tests.build_.__init__.py Copyright (c) 2017-2018 Keithley Instruments, LLC. Licensed under MIT (https://github.com/ehall/syphon/blob/master/LICENSE) """
"""syphon.tests.build_.__init__.py Copyright (c) 2017-2018 Keithley Instruments, LLC. Licensed under MIT (https://github.com/ehall/syphon/blob/master/LICENSE) """
class BaseError(Exception): pass class CredentialRequired(BaseError): pass class UnexpectedError(BaseError): pass class Forbidden (BaseError): pass class Not_Found (BaseError): pass class Payment_Required (BaseError): pass class Internal_Server_Error (BaseError): pass class Service_Unavailable (BaseError): pass class Bad_Request (BaseError): pass class Unauthorized (BaseError): pass class TokenRequired(BaseError): pass class DataRequired(BaseError): pass class InvalidParameters(BaseError): pass class QuotaExceeded(BaseError): pass
class Baseerror(Exception): pass class Credentialrequired(BaseError): pass class Unexpectederror(BaseError): pass class Forbidden(BaseError): pass class Not_Found(BaseError): pass class Payment_Required(BaseError): pass class Internal_Server_Error(BaseError): pass class Service_Unavailable(BaseError): pass class Bad_Request(BaseError): pass class Unauthorized(BaseError): pass class Tokenrequired(BaseError): pass class Datarequired(BaseError): pass class Invalidparameters(BaseError): pass class Quotaexceeded(BaseError): pass
def formula(): a=int(input("Enter a ")) b=int(input("Enter b ")) print((for1(a,b))*(for1(a,b))) print(for1(a,b)) def for1(a,b): return(a+b) formula()
def formula(): a = int(input('Enter a ')) b = int(input('Enter b ')) print(for1(a, b) * for1(a, b)) print(for1(a, b)) def for1(a, b): return a + b formula()
input = """turn off 660,55 through 986,197 turn off 341,304 through 638,850 turn off 199,133 through 461,193 toggle 322,558 through 977,958 toggle 537,781 through 687,941 turn on 226,196 through 599,390 turn on 240,129 through 703,297 turn on 317,329 through 451,798 turn on 957,736 through 977,890 turn on 263,530 through 559,664 turn on 158,270 through 243,802 toggle 223,39 through 454,511 toggle 544,218 through 979,872 turn on 313,306 through 363,621 toggle 173,401 through 496,407 toggle 333,60 through 748,159 turn off 87,577 through 484,608 turn on 809,648 through 826,999 toggle 352,432 through 628,550 turn off 197,408 through 579,569 turn off 1,629 through 802,633 turn off 61,44 through 567,111 toggle 880,25 through 903,973 turn on 347,123 through 864,746 toggle 728,877 through 996,975 turn on 121,895 through 349,906 turn on 888,547 through 931,628 toggle 398,782 through 834,882 turn on 966,850 through 989,953 turn off 891,543 through 914,991 toggle 908,77 through 916,117 turn on 576,900 through 943,934 turn off 580,170 through 963,206 turn on 184,638 through 192,944 toggle 940,147 through 978,730 turn off 854,56 through 965,591 toggle 717,172 through 947,995 toggle 426,987 through 705,998 turn on 987,157 through 992,278 toggle 995,774 through 997,784 turn off 796,96 through 845,182 turn off 451,87 through 711,655 turn off 380,93 through 968,676 turn on 263,468 through 343,534 turn on 917,936 through 928,959 toggle 478,7 through 573,148 turn off 428,339 through 603,624 turn off 400,880 through 914,953 toggle 679,428 through 752,779 turn off 697,981 through 709,986 toggle 482,566 through 505,725 turn off 956,368 through 993,516 toggle 735,823 through 783,883 turn off 48,487 through 892,496 turn off 116,680 through 564,819 turn on 633,865 through 729,930 turn off 314,618 through 571,922 toggle 138,166 through 936,266 turn on 444,732 through 664,960 turn off 109,337 through 972,497 turn off 51,432 through 77,996 turn off 259,297 through 366,744 toggle 801,130 through 917,544 toggle 767,982 through 847,996 turn on 216,507 through 863,885 turn off 61,441 through 465,731 turn on 849,970 through 944,987 toggle 845,76 through 852,951 toggle 732,615 through 851,936 toggle 251,128 through 454,778 turn on 324,429 through 352,539 toggle 52,450 through 932,863 turn off 449,379 through 789,490 turn on 317,319 through 936,449 toggle 887,670 through 957,838 toggle 671,613 through 856,664 turn off 186,648 through 985,991 turn off 471,689 through 731,717 toggle 91,331 through 750,758 toggle 201,73 through 956,524 toggle 82,614 through 520,686 toggle 84,287 through 467,734 turn off 132,367 through 208,838 toggle 558,684 through 663,920 turn on 237,952 through 265,997 turn on 694,713 through 714,754 turn on 632,523 through 862,827 turn on 918,780 through 948,916 turn on 349,586 through 663,976 toggle 231,29 through 257,589 toggle 886,428 through 902,993 turn on 106,353 through 236,374 turn on 734,577 through 759,684 turn off 347,843 through 696,912 turn on 286,699 through 964,883 turn on 605,875 through 960,987 turn off 328,286 through 869,461 turn off 472,569 through 980,848 toggle 673,573 through 702,884 turn off 398,284 through 738,332 turn on 158,50 through 284,411 turn off 390,284 through 585,663 turn on 156,579 through 646,581 turn on 875,493 through 989,980 toggle 486,391 through 924,539 turn on 236,722 through 272,964 toggle 228,282 through 470,581 toggle 584,389 through 750,761 turn off 899,516 through 900,925 turn on 105,229 through 822,846 turn off 253,77 through 371,877 turn on 826,987 through 906,992 turn off 13,152 through 615,931 turn on 835,320 through 942,399 turn on 463,504 through 536,720 toggle 746,942 through 786,998 turn off 867,333 through 965,403 turn on 591,477 through 743,692 turn off 403,437 through 508,908 turn on 26,723 through 368,814 turn on 409,485 through 799,809 turn on 115,630 through 704,705 turn off 228,183 through 317,220 toggle 300,649 through 382,842 turn off 495,365 through 745,562 turn on 698,346 through 744,873 turn on 822,932 through 951,934 toggle 805,30 through 925,421 toggle 441,152 through 653,274 toggle 160,81 through 257,587 turn off 350,781 through 532,917 toggle 40,583 through 348,636 turn on 280,306 through 483,395 toggle 392,936 through 880,955 toggle 496,591 through 851,934 turn off 780,887 through 946,994 turn off 205,735 through 281,863 toggle 100,876 through 937,915 turn on 392,393 through 702,878 turn on 956,374 through 976,636 toggle 478,262 through 894,775 turn off 279,65 through 451,677 turn on 397,541 through 809,847 turn on 444,291 through 451,586 toggle 721,408 through 861,598 turn on 275,365 through 609,382 turn on 736,24 through 839,72 turn off 86,492 through 582,712 turn on 676,676 through 709,703 turn off 105,710 through 374,817 toggle 328,748 through 845,757 toggle 335,79 through 394,326 toggle 193,157 through 633,885 turn on 227,48 through 769,743 toggle 148,333 through 614,568 toggle 22,30 through 436,263 toggle 547,447 through 688,969 toggle 576,621 through 987,740 turn on 711,334 through 799,515 turn on 541,448 through 654,951 toggle 792,199 through 798,990 turn on 89,956 through 609,960 toggle 724,433 through 929,630 toggle 144,895 through 201,916 toggle 226,730 through 632,871 turn off 760,819 through 828,974 toggle 887,180 through 940,310 toggle 222,327 through 805,590 turn off 630,824 through 885,963 turn on 940,740 through 954,946 turn on 193,373 through 779,515 toggle 304,955 through 469,975 turn off 405,480 through 546,960 turn on 662,123 through 690,669 turn off 615,238 through 750,714 turn on 423,220 through 930,353 turn on 329,769 through 358,970 toggle 590,151 through 704,722 turn off 884,539 through 894,671 toggle 449,241 through 984,549 toggle 449,260 through 496,464 turn off 306,448 through 602,924 turn on 286,805 through 555,901 toggle 722,177 through 922,298 toggle 491,554 through 723,753 turn on 80,849 through 174,996 turn off 296,561 through 530,856 toggle 653,10 through 972,284 toggle 529,236 through 672,614 toggle 791,598 through 989,695 turn on 19,45 through 575,757 toggle 111,55 through 880,871 turn off 197,897 through 943,982 turn on 912,336 through 977,605 toggle 101,221 through 537,450 turn on 101,104 through 969,447 toggle 71,527 through 587,717 toggle 336,445 through 593,889 toggle 214,179 through 575,699 turn on 86,313 through 96,674 toggle 566,427 through 906,888 turn off 641,597 through 850,845 turn on 606,524 through 883,704 turn on 835,775 through 867,887 toggle 547,301 through 897,515 toggle 289,930 through 413,979 turn on 361,122 through 457,226 turn on 162,187 through 374,746 turn on 348,461 through 454,675 turn off 966,532 through 985,537 turn on 172,354 through 630,606 turn off 501,880 through 680,993 turn off 8,70 through 566,592 toggle 433,73 through 690,651 toggle 840,798 through 902,971 toggle 822,204 through 893,760 turn off 453,496 through 649,795 turn off 969,549 through 990,942 turn off 789,28 through 930,267 toggle 880,98 through 932,434 toggle 568,674 through 669,753 turn on 686,228 through 903,271 turn on 263,995 through 478,999 toggle 534,675 through 687,955 turn off 342,434 through 592,986 toggle 404,768 through 677,867 toggle 126,723 through 978,987 toggle 749,675 through 978,959 turn off 445,330 through 446,885 turn off 463,205 through 924,815 turn off 417,430 through 915,472 turn on 544,990 through 912,999 turn off 201,255 through 834,789 turn off 261,142 through 537,862 turn off 562,934 through 832,984 turn off 459,978 through 691,980 turn off 73,911 through 971,972 turn on 560,448 through 723,810 turn on 204,630 through 217,854 turn off 91,259 through 611,607 turn on 877,32 through 978,815 turn off 950,438 through 974,746 toggle 426,30 through 609,917 toggle 696,37 through 859,201 toggle 242,417 through 682,572 turn off 388,401 through 979,528 turn off 79,345 through 848,685 turn off 98,91 through 800,434 toggle 650,700 through 972,843 turn off 530,450 through 538,926 turn on 428,559 through 962,909 turn on 78,138 through 92,940 toggle 194,117 through 867,157 toggle 785,355 through 860,617 turn off 379,441 through 935,708 turn off 605,133 through 644,911 toggle 10,963 through 484,975 turn off 359,988 through 525,991 turn off 509,138 through 787,411 toggle 556,467 through 562,773 turn on 119,486 through 246,900 turn on 445,561 through 794,673 turn off 598,681 through 978,921 turn off 974,230 through 995,641 turn off 760,75 through 800,275 toggle 441,215 through 528,680 turn off 701,636 through 928,877 turn on 165,753 through 202,780 toggle 501,412 through 998,516 toggle 161,105 through 657,395 turn on 113,340 through 472,972 toggle 384,994 through 663,999 turn on 969,994 through 983,997 turn on 519,600 through 750,615 turn off 363,899 through 948,935 turn on 271,845 through 454,882 turn off 376,528 through 779,640 toggle 767,98 through 854,853 toggle 107,322 through 378,688 turn off 235,899 through 818,932 turn on 445,611 through 532,705 toggle 629,387 through 814,577 toggle 112,414 through 387,421 toggle 319,184 through 382,203 turn on 627,796 through 973,940 toggle 602,45 through 763,151 turn off 441,375 through 974,545 toggle 871,952 through 989,998 turn on 717,272 through 850,817 toggle 475,711 through 921,882 toggle 66,191 through 757,481 turn off 50,197 through 733,656 toggle 83,575 through 915,728 turn on 777,812 through 837,912 turn on 20,984 through 571,994 turn off 446,432 through 458,648 turn on 715,871 through 722,890 toggle 424,675 through 740,862 toggle 580,592 through 671,900 toggle 296,687 through 906,775""" map = [] for i in range(1000): map.append([0] * 1000) def turn_off(x, y): map[y][x] -= 1 if map[y][x] < 0: map[y][x] = 0 def turn_on(x, y): map[y][x] += 1 def toggle(x, y): map[y][x] += 2 def act(func, x1, y1, x2, y2): for x in range(x1, x2+1): for y in range(y1, y2+1): func(x, y) for line in input.split("\n"): if line.startswith("turn off"): func = turn_off coord = line[len("turn off"):] elif line.startswith("turn on"): func = turn_on coord = line[len("turn on"):] elif line.startswith("toggle"): func = toggle coord = line[len("toggle"):] else: continue coord1, coord2 = coord.split("through") x1, y1 = [int(x.strip()) for x in coord1.strip().split(",")] x2, y2 = [int(x.strip()) for x in coord2.strip().split(",")] act(func, x1, y1, x2, y2) count = 0 for column in map: count += sum(column) print(count)
input = 'turn off 660,55 through 986,197\nturn off 341,304 through 638,850\nturn off 199,133 through 461,193\ntoggle 322,558 through 977,958\ntoggle 537,781 through 687,941\nturn on 226,196 through 599,390\nturn on 240,129 through 703,297\nturn on 317,329 through 451,798\nturn on 957,736 through 977,890\nturn on 263,530 through 559,664\nturn on 158,270 through 243,802\ntoggle 223,39 through 454,511\ntoggle 544,218 through 979,872\nturn on 313,306 through 363,621\ntoggle 173,401 through 496,407\ntoggle 333,60 through 748,159\nturn off 87,577 through 484,608\nturn on 809,648 through 826,999\ntoggle 352,432 through 628,550\nturn off 197,408 through 579,569\nturn off 1,629 through 802,633\nturn off 61,44 through 567,111\ntoggle 880,25 through 903,973\nturn on 347,123 through 864,746\ntoggle 728,877 through 996,975\nturn on 121,895 through 349,906\nturn on 888,547 through 931,628\ntoggle 398,782 through 834,882\nturn on 966,850 through 989,953\nturn off 891,543 through 914,991\ntoggle 908,77 through 916,117\nturn on 576,900 through 943,934\nturn off 580,170 through 963,206\nturn on 184,638 through 192,944\ntoggle 940,147 through 978,730\nturn off 854,56 through 965,591\ntoggle 717,172 through 947,995\ntoggle 426,987 through 705,998\nturn on 987,157 through 992,278\ntoggle 995,774 through 997,784\nturn off 796,96 through 845,182\nturn off 451,87 through 711,655\nturn off 380,93 through 968,676\nturn on 263,468 through 343,534\nturn on 917,936 through 928,959\ntoggle 478,7 through 573,148\nturn off 428,339 through 603,624\nturn off 400,880 through 914,953\ntoggle 679,428 through 752,779\nturn off 697,981 through 709,986\ntoggle 482,566 through 505,725\nturn off 956,368 through 993,516\ntoggle 735,823 through 783,883\nturn off 48,487 through 892,496\nturn off 116,680 through 564,819\nturn on 633,865 through 729,930\nturn off 314,618 through 571,922\ntoggle 138,166 through 936,266\nturn on 444,732 through 664,960\nturn off 109,337 through 972,497\nturn off 51,432 through 77,996\nturn off 259,297 through 366,744\ntoggle 801,130 through 917,544\ntoggle 767,982 through 847,996\nturn on 216,507 through 863,885\nturn off 61,441 through 465,731\nturn on 849,970 through 944,987\ntoggle 845,76 through 852,951\ntoggle 732,615 through 851,936\ntoggle 251,128 through 454,778\nturn on 324,429 through 352,539\ntoggle 52,450 through 932,863\nturn off 449,379 through 789,490\nturn on 317,319 through 936,449\ntoggle 887,670 through 957,838\ntoggle 671,613 through 856,664\nturn off 186,648 through 985,991\nturn off 471,689 through 731,717\ntoggle 91,331 through 750,758\ntoggle 201,73 through 956,524\ntoggle 82,614 through 520,686\ntoggle 84,287 through 467,734\nturn off 132,367 through 208,838\ntoggle 558,684 through 663,920\nturn on 237,952 through 265,997\nturn on 694,713 through 714,754\nturn on 632,523 through 862,827\nturn on 918,780 through 948,916\nturn on 349,586 through 663,976\ntoggle 231,29 through 257,589\ntoggle 886,428 through 902,993\nturn on 106,353 through 236,374\nturn on 734,577 through 759,684\nturn off 347,843 through 696,912\nturn on 286,699 through 964,883\nturn on 605,875 through 960,987\nturn off 328,286 through 869,461\nturn off 472,569 through 980,848\ntoggle 673,573 through 702,884\nturn off 398,284 through 738,332\nturn on 158,50 through 284,411\nturn off 390,284 through 585,663\nturn on 156,579 through 646,581\nturn on 875,493 through 989,980\ntoggle 486,391 through 924,539\nturn on 236,722 through 272,964\ntoggle 228,282 through 470,581\ntoggle 584,389 through 750,761\nturn off 899,516 through 900,925\nturn on 105,229 through 822,846\nturn off 253,77 through 371,877\nturn on 826,987 through 906,992\nturn off 13,152 through 615,931\nturn on 835,320 through 942,399\nturn on 463,504 through 536,720\ntoggle 746,942 through 786,998\nturn off 867,333 through 965,403\nturn on 591,477 through 743,692\nturn off 403,437 through 508,908\nturn on 26,723 through 368,814\nturn on 409,485 through 799,809\nturn on 115,630 through 704,705\nturn off 228,183 through 317,220\ntoggle 300,649 through 382,842\nturn off 495,365 through 745,562\nturn on 698,346 through 744,873\nturn on 822,932 through 951,934\ntoggle 805,30 through 925,421\ntoggle 441,152 through 653,274\ntoggle 160,81 through 257,587\nturn off 350,781 through 532,917\ntoggle 40,583 through 348,636\nturn on 280,306 through 483,395\ntoggle 392,936 through 880,955\ntoggle 496,591 through 851,934\nturn off 780,887 through 946,994\nturn off 205,735 through 281,863\ntoggle 100,876 through 937,915\nturn on 392,393 through 702,878\nturn on 956,374 through 976,636\ntoggle 478,262 through 894,775\nturn off 279,65 through 451,677\nturn on 397,541 through 809,847\nturn on 444,291 through 451,586\ntoggle 721,408 through 861,598\nturn on 275,365 through 609,382\nturn on 736,24 through 839,72\nturn off 86,492 through 582,712\nturn on 676,676 through 709,703\nturn off 105,710 through 374,817\ntoggle 328,748 through 845,757\ntoggle 335,79 through 394,326\ntoggle 193,157 through 633,885\nturn on 227,48 through 769,743\ntoggle 148,333 through 614,568\ntoggle 22,30 through 436,263\ntoggle 547,447 through 688,969\ntoggle 576,621 through 987,740\nturn on 711,334 through 799,515\nturn on 541,448 through 654,951\ntoggle 792,199 through 798,990\nturn on 89,956 through 609,960\ntoggle 724,433 through 929,630\ntoggle 144,895 through 201,916\ntoggle 226,730 through 632,871\nturn off 760,819 through 828,974\ntoggle 887,180 through 940,310\ntoggle 222,327 through 805,590\nturn off 630,824 through 885,963\nturn on 940,740 through 954,946\nturn on 193,373 through 779,515\ntoggle 304,955 through 469,975\nturn off 405,480 through 546,960\nturn on 662,123 through 690,669\nturn off 615,238 through 750,714\nturn on 423,220 through 930,353\nturn on 329,769 through 358,970\ntoggle 590,151 through 704,722\nturn off 884,539 through 894,671\ntoggle 449,241 through 984,549\ntoggle 449,260 through 496,464\nturn off 306,448 through 602,924\nturn on 286,805 through 555,901\ntoggle 722,177 through 922,298\ntoggle 491,554 through 723,753\nturn on 80,849 through 174,996\nturn off 296,561 through 530,856\ntoggle 653,10 through 972,284\ntoggle 529,236 through 672,614\ntoggle 791,598 through 989,695\nturn on 19,45 through 575,757\ntoggle 111,55 through 880,871\nturn off 197,897 through 943,982\nturn on 912,336 through 977,605\ntoggle 101,221 through 537,450\nturn on 101,104 through 969,447\ntoggle 71,527 through 587,717\ntoggle 336,445 through 593,889\ntoggle 214,179 through 575,699\nturn on 86,313 through 96,674\ntoggle 566,427 through 906,888\nturn off 641,597 through 850,845\nturn on 606,524 through 883,704\nturn on 835,775 through 867,887\ntoggle 547,301 through 897,515\ntoggle 289,930 through 413,979\nturn on 361,122 through 457,226\nturn on 162,187 through 374,746\nturn on 348,461 through 454,675\nturn off 966,532 through 985,537\nturn on 172,354 through 630,606\nturn off 501,880 through 680,993\nturn off 8,70 through 566,592\ntoggle 433,73 through 690,651\ntoggle 840,798 through 902,971\ntoggle 822,204 through 893,760\nturn off 453,496 through 649,795\nturn off 969,549 through 990,942\nturn off 789,28 through 930,267\ntoggle 880,98 through 932,434\ntoggle 568,674 through 669,753\nturn on 686,228 through 903,271\nturn on 263,995 through 478,999\ntoggle 534,675 through 687,955\nturn off 342,434 through 592,986\ntoggle 404,768 through 677,867\ntoggle 126,723 through 978,987\ntoggle 749,675 through 978,959\nturn off 445,330 through 446,885\nturn off 463,205 through 924,815\nturn off 417,430 through 915,472\nturn on 544,990 through 912,999\nturn off 201,255 through 834,789\nturn off 261,142 through 537,862\nturn off 562,934 through 832,984\nturn off 459,978 through 691,980\nturn off 73,911 through 971,972\nturn on 560,448 through 723,810\nturn on 204,630 through 217,854\nturn off 91,259 through 611,607\nturn on 877,32 through 978,815\nturn off 950,438 through 974,746\ntoggle 426,30 through 609,917\ntoggle 696,37 through 859,201\ntoggle 242,417 through 682,572\nturn off 388,401 through 979,528\nturn off 79,345 through 848,685\nturn off 98,91 through 800,434\ntoggle 650,700 through 972,843\nturn off 530,450 through 538,926\nturn on 428,559 through 962,909\nturn on 78,138 through 92,940\ntoggle 194,117 through 867,157\ntoggle 785,355 through 860,617\nturn off 379,441 through 935,708\nturn off 605,133 through 644,911\ntoggle 10,963 through 484,975\nturn off 359,988 through 525,991\nturn off 509,138 through 787,411\ntoggle 556,467 through 562,773\nturn on 119,486 through 246,900\nturn on 445,561 through 794,673\nturn off 598,681 through 978,921\nturn off 974,230 through 995,641\nturn off 760,75 through 800,275\ntoggle 441,215 through 528,680\nturn off 701,636 through 928,877\nturn on 165,753 through 202,780\ntoggle 501,412 through 998,516\ntoggle 161,105 through 657,395\nturn on 113,340 through 472,972\ntoggle 384,994 through 663,999\nturn on 969,994 through 983,997\nturn on 519,600 through 750,615\nturn off 363,899 through 948,935\nturn on 271,845 through 454,882\nturn off 376,528 through 779,640\ntoggle 767,98 through 854,853\ntoggle 107,322 through 378,688\nturn off 235,899 through 818,932\nturn on 445,611 through 532,705\ntoggle 629,387 through 814,577\ntoggle 112,414 through 387,421\ntoggle 319,184 through 382,203\nturn on 627,796 through 973,940\ntoggle 602,45 through 763,151\nturn off 441,375 through 974,545\ntoggle 871,952 through 989,998\nturn on 717,272 through 850,817\ntoggle 475,711 through 921,882\ntoggle 66,191 through 757,481\nturn off 50,197 through 733,656\ntoggle 83,575 through 915,728\nturn on 777,812 through 837,912\nturn on 20,984 through 571,994\nturn off 446,432 through 458,648\nturn on 715,871 through 722,890\ntoggle 424,675 through 740,862\ntoggle 580,592 through 671,900\ntoggle 296,687 through 906,775' map = [] for i in range(1000): map.append([0] * 1000) def turn_off(x, y): map[y][x] -= 1 if map[y][x] < 0: map[y][x] = 0 def turn_on(x, y): map[y][x] += 1 def toggle(x, y): map[y][x] += 2 def act(func, x1, y1, x2, y2): for x in range(x1, x2 + 1): for y in range(y1, y2 + 1): func(x, y) for line in input.split('\n'): if line.startswith('turn off'): func = turn_off coord = line[len('turn off'):] elif line.startswith('turn on'): func = turn_on coord = line[len('turn on'):] elif line.startswith('toggle'): func = toggle coord = line[len('toggle'):] else: continue (coord1, coord2) = coord.split('through') (x1, y1) = [int(x.strip()) for x in coord1.strip().split(',')] (x2, y2) = [int(x.strip()) for x in coord2.strip().split(',')] act(func, x1, y1, x2, y2) count = 0 for column in map: count += sum(column) print(count)
""" util.py Utility functions for testing SONiC CLI """ def parse_colon_speparated_lines(lines): """ @summary: Helper function for parsing lines which consist of key-value pairs formatted like "<key>: <value>", where the colon can be surrounded by 0 or more whitespace characters @return: A dictionary containing key-value pairs of the output """ res = {} for line in lines: fields = line.split(":") if len(fields) != 2: continue res[fields[0].strip()] = fields[1].strip() return res def get_field_range(second_line): """ @summary: Utility function to help get field range from a simple tabulate output line. Simple tabulate output looks like: Head1 Head2 H3 H4 ----- ------ ------- -- V1 V2 V3 V4 @return: Returned a list of field range. E.g. [(0,4), (6, 10)] means there are two fields for each line, the first field is between position 0 and position 4, the second field is between position 6 and position 10. """ field_ranges = [] begin = 0 while 1: end = second_line.find(' ', begin) if end == -1: field_ranges.append((begin, len(second_line))) break field_ranges.append((begin, end)) begin = second_line.find('-', end) if begin == -1: break return field_ranges def get_fields(line, field_ranges): """ @summary: Utility function to help extract all fields from a simple tabulate output line based on field ranges got from function get_field_range. @return: A list of fields. """ fields = [] for field_range in field_ranges: field = line[field_range[0]:field_range[1]].encode('utf-8') fields.append(field.strip()) return fields def get_skip_mod_list(duthost, mod_key=None): """ @summary: utility function returns list of modules / peripherals absent in chassis by default if no keyword passed it will return all from inventory file provides a list under skip_modules: in inventory file for each dut returns a empty list if skip_modules not defined under host in inventory inventory example: DUTHOST: skip_modules: 'line-cards': - LINE-CARD0 - LINE-CARD2 'fabric-cards': - FABRIC-CARD3 'psus': - PSU4 - PSU5 @return a list of modules/peripherals to be skipped in check for platform test """ skip_mod_list = [] dut_vars = duthost.host.options['inventory_manager'].get_host(duthost.hostname).vars if 'skip_modules' in dut_vars: if mod_key is None: for mod_type in dut_vars['skip_modules'].keys(): for mod_id in dut_vars['skip_modules'][mod_type]: skip_mod_list.append(mod_id) else: for mod_type in mod_key: if mod_type in dut_vars['skip_modules'].keys(): for mod_id in dut_vars['skip_modules'][mod_type]: skip_mod_list.append(mod_id) return skip_mod_list
""" util.py Utility functions for testing SONiC CLI """ def parse_colon_speparated_lines(lines): """ @summary: Helper function for parsing lines which consist of key-value pairs formatted like "<key>: <value>", where the colon can be surrounded by 0 or more whitespace characters @return: A dictionary containing key-value pairs of the output """ res = {} for line in lines: fields = line.split(':') if len(fields) != 2: continue res[fields[0].strip()] = fields[1].strip() return res def get_field_range(second_line): """ @summary: Utility function to help get field range from a simple tabulate output line. Simple tabulate output looks like: Head1 Head2 H3 H4 ----- ------ ------- -- V1 V2 V3 V4 @return: Returned a list of field range. E.g. [(0,4), (6, 10)] means there are two fields for each line, the first field is between position 0 and position 4, the second field is between position 6 and position 10. """ field_ranges = [] begin = 0 while 1: end = second_line.find(' ', begin) if end == -1: field_ranges.append((begin, len(second_line))) break field_ranges.append((begin, end)) begin = second_line.find('-', end) if begin == -1: break return field_ranges def get_fields(line, field_ranges): """ @summary: Utility function to help extract all fields from a simple tabulate output line based on field ranges got from function get_field_range. @return: A list of fields. """ fields = [] for field_range in field_ranges: field = line[field_range[0]:field_range[1]].encode('utf-8') fields.append(field.strip()) return fields def get_skip_mod_list(duthost, mod_key=None): """ @summary: utility function returns list of modules / peripherals absent in chassis by default if no keyword passed it will return all from inventory file provides a list under skip_modules: in inventory file for each dut returns a empty list if skip_modules not defined under host in inventory inventory example: DUTHOST: skip_modules: 'line-cards': - LINE-CARD0 - LINE-CARD2 'fabric-cards': - FABRIC-CARD3 'psus': - PSU4 - PSU5 @return a list of modules/peripherals to be skipped in check for platform test """ skip_mod_list = [] dut_vars = duthost.host.options['inventory_manager'].get_host(duthost.hostname).vars if 'skip_modules' in dut_vars: if mod_key is None: for mod_type in dut_vars['skip_modules'].keys(): for mod_id in dut_vars['skip_modules'][mod_type]: skip_mod_list.append(mod_id) else: for mod_type in mod_key: if mod_type in dut_vars['skip_modules'].keys(): for mod_id in dut_vars['skip_modules'][mod_type]: skip_mod_list.append(mod_id) return skip_mod_list
class Solution(object): def insert(self, intervals, working): r = [] s = working[0] e = working[1] for pair in intervals: print(r,s,e,pair) print() cs = pair[0] ce = pair[1] if ce < s: r.append(pair) elif cs <= s and ce >= s and ce <= e: s = cs e = e elif cs >= s and ce <= e: pass elif cs <=s and ce >= e: s = cs e = ce elif cs >= s and cs <= e and ce >= e: s = s e = ce elif cs > e: r.append([s,e]) s = cs e = ce else: print("should not happen") print(r,s,e,cs,ce) r.append([s,e]) return r def test(): s=Solution() cur = [[1,2],[3,5],[6,7],[8,10],[12,16]] new = [4,8] cur = [[1,3],[6,9]] new = [2,5] r=s.insert(cur, new) print(cur) print(new) print(r) test()
class Solution(object): def insert(self, intervals, working): r = [] s = working[0] e = working[1] for pair in intervals: print(r, s, e, pair) print() cs = pair[0] ce = pair[1] if ce < s: r.append(pair) elif cs <= s and ce >= s and (ce <= e): s = cs e = e elif cs >= s and ce <= e: pass elif cs <= s and ce >= e: s = cs e = ce elif cs >= s and cs <= e and (ce >= e): s = s e = ce elif cs > e: r.append([s, e]) s = cs e = ce else: print('should not happen') print(r, s, e, cs, ce) r.append([s, e]) return r def test(): s = solution() cur = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]] new = [4, 8] cur = [[1, 3], [6, 9]] new = [2, 5] r = s.insert(cur, new) print(cur) print(new) print(r) test()
#!/bin/zsh def isphonenumber(text): if len(text) != 12: return False for i in range(0, 3): if not text[i].isdecimal(): return False if text[3] != '-': return False for i in range(4, 7): if not text[i].isdecimal(): return False if text[7] != '-': return False for i in range(8, 12): if not text[i].isdecimal(): return False return True ''' print('415-555-4242 is a phone number: ') print(isphonenumber('415-555-4242')) print('moshi moshi is not a phone number: ') print(isphonenumber('moshi moshi')) ''' message = 'call me at 415-555-1011 tomorrow 415-555-9999 is my office.' for i in range(len(message)): chunk = message[i:i+12] if isphonenumber(chunk): print('Phone number found: ' + chunk) print('Done')
def isphonenumber(text): if len(text) != 12: return False for i in range(0, 3): if not text[i].isdecimal(): return False if text[3] != '-': return False for i in range(4, 7): if not text[i].isdecimal(): return False if text[7] != '-': return False for i in range(8, 12): if not text[i].isdecimal(): return False return True "\nprint('415-555-4242 is a phone number: ')\nprint(isphonenumber('415-555-4242'))\n\nprint('moshi moshi is not a phone number: ')\nprint(isphonenumber('moshi moshi'))\n" message = 'call me at 415-555-1011 tomorrow 415-555-9999 is my office.' for i in range(len(message)): chunk = message[i:i + 12] if isphonenumber(chunk): print('Phone number found: ' + chunk) print('Done')
class BiggestRectangleEasy: def findArea(self, N): m, n = 0, N/2 for i in xrange(n+1): m = max(m, i*(n-i)) return m
class Biggestrectangleeasy: def find_area(self, N): (m, n) = (0, N / 2) for i in xrange(n + 1): m = max(m, i * (n - i)) return m
class Solution: def subsets(self, nums: List[int]) -> List[List[int]]: l = [] for i in range(1<<len(nums)): subset = [] for j in range(len(nums)): if i & (1<<j): subset.append(nums[j]) l.append(subset) return l
class Solution: def subsets(self, nums: List[int]) -> List[List[int]]: l = [] for i in range(1 << len(nums)): subset = [] for j in range(len(nums)): if i & 1 << j: subset.append(nums[j]) l.append(subset) return l
# VEX Variables class VEXVariable: __slots__ = tuple() def __hash__(self): raise NotImplementedError() def __eq__(self, other): raise NotImplementedError() class VEXMemVar: __slots__ = ('addr', 'size', ) def __init__(self, addr, size): self.addr = addr self.size = size def __hash__(self): return hash((VEXMemVar, self.addr, self.size)) def __eq__(self, other): return type(other) is VEXMemVar and other.addr == self.addr and other.size == self.size def __repr__(self): return "<mem %#x[%d bytes]>" % (self.addr, self.size) class VEXReg(VEXVariable): __slots__ = ('offset', 'size', ) def __init__(self, offset, size): self.offset = offset self.size = size def __hash__(self): return hash((VEXReg, self.offset, self.size)) def __eq__(self, other): return type(other) is VEXReg and other.offset == self.offset and other.size == self.size def __repr__(self): return "<reg %d[%d]>" % (self.offset, self.size) class VEXTmp(VEXVariable): __slots__ = ('tmp', ) def __init__(self, tmp): self.tmp = tmp def __hash__(self): return hash((VEXTmp, self.tmp)) def __eq__(self, other): return type(other) is VEXTmp and other.tmp == self.tmp def __repr__(self): return "<tmp %d>" % self.tmp
class Vexvariable: __slots__ = tuple() def __hash__(self): raise not_implemented_error() def __eq__(self, other): raise not_implemented_error() class Vexmemvar: __slots__ = ('addr', 'size') def __init__(self, addr, size): self.addr = addr self.size = size def __hash__(self): return hash((VEXMemVar, self.addr, self.size)) def __eq__(self, other): return type(other) is VEXMemVar and other.addr == self.addr and (other.size == self.size) def __repr__(self): return '<mem %#x[%d bytes]>' % (self.addr, self.size) class Vexreg(VEXVariable): __slots__ = ('offset', 'size') def __init__(self, offset, size): self.offset = offset self.size = size def __hash__(self): return hash((VEXReg, self.offset, self.size)) def __eq__(self, other): return type(other) is VEXReg and other.offset == self.offset and (other.size == self.size) def __repr__(self): return '<reg %d[%d]>' % (self.offset, self.size) class Vextmp(VEXVariable): __slots__ = ('tmp',) def __init__(self, tmp): self.tmp = tmp def __hash__(self): return hash((VEXTmp, self.tmp)) def __eq__(self, other): return type(other) is VEXTmp and other.tmp == self.tmp def __repr__(self): return '<tmp %d>' % self.tmp
''' A script that replaces commas with tabs in a file ''' in_filename = input("Please input the file name:") out_filename = "out_"+in_filename with open(in_filename,"r") as fin: with open(out_filename,"w+") as fout: for line in fin: fout.write(line.replace(',','\t')) print("Output File:",out_filename)
""" A script that replaces commas with tabs in a file """ in_filename = input('Please input the file name:') out_filename = 'out_' + in_filename with open(in_filename, 'r') as fin: with open(out_filename, 'w+') as fout: for line in fin: fout.write(line.replace(',', '\t')) print('Output File:', out_filename)
def member_format(m): return """ <tr> <td width="15%%"> <img src="../assets/%s"> </td> <td> <span id="bioname"> <b> %s </b> </span> <br> %s <p> %s </p> </td> </tr>"""%(m['image'],m['name'],m['position'],m['description']) members=[ {"name":"Lucas Wagner","position":"Group Leader","image":"lucas.png", "description":"""Lucas has over a decade's experience in computing the properties of many-body quantum systems from first principles. He is the primary architect and developer of the open-source quantum Monte Carlo program QWalk, and has made advances in many-body quantum methods, as well as a number of applications to challenging electronic systems. While he has many interests, the overarching theme of his research is using computers to study systems of electrons that fall beyond the normal paradigms of metals and insulators."""}, {"name":"Jo&atilde;o Nunes Barbosa Rodrigues","position":"postdoc","image":"joao.png", "description":"""Joao joined in summer of 2017. He is working on effective models in graphene and descriptors for superconductivity"""}, {"name":"Kiel Williams","position":"Graduate Student","image":"kiel.png", "description":"""Kiel is an NSF Graduate Research Fellow who is learning how to improve many-body wave functions in realistic systems. He joined the group in summer of 2013. """}, {"name":"Brian Busemeyer","position":"Graduate Student","image":"brian.png", "description":"""Brian is an NSF Graduate Research Fellow who is using quantum Monte Carlo methods to study superconducting materials. He joined the group in August 2013. """}, {"name":"Jeremy Morales","position":"Associated Graduate Student","image":"profile-placeholder.gif", "description":"""Jeremy is a student of Peter Abbamonte who is studying magnetic models for unconventional superconductors. """}, {"name":"Li Chen","position":"Graduate Student","image":"li.png", "description":"""Li is studying correlated metal-insulator transitions in realistic systems. She joined the group in summer of 2014. """}, {"name":"Alexander Mu&ntilde;oz", "position":"Graduate Student", "image":"Munoz.jpg", "description":"""Alex is joined the group in Fall 2015. He is currently working on the origin of magnetism."""}, {"name":"William Wheeler", "position":"Graduate Student", "image":"will_wheeler.jpg", "description":"""William joined the group in January 2016. He is currently working on the information content of many-body wave functions, and data analysis."""}, {"name":"Shivesh Pathak","position":"Graduate Student","image":"profile-placeholder.gif", "description":"""Shivesh joined the group in 2016. He is currently working on enhancing QWalk's capabilities. """}, {"name":"Yueqing Chang","position":"Graduate Student","image":"yueqing.jpg", "description":"""Yueqing joined the group in fall 2016. She is working on spin-orbit coupling in correlated electron systems. """}, {"name":"Kittithat (Mick) Krongchon","position":"Graduate Student","image":"mick.jpg", "description":"""Kit is working on automating electronic structure calculations in such a way that quantum Monte Carlo calculations can be performed more easily. He is now also working on phonons in cuprate superconductors. """}, ] alumni=[ {"name":"Awadhesh Narayan","position":"Postdoc","image":"awadhesh-narayan_170.jpg" , "description":"""Awadhesh got his PhD from Trinity College Dublin, where he studied the transport of spins in materials. His interest in this group was the prediction of new strongly correlated materials that may have quite unusual properties. After a productive stint in the group, he has moved to ETH-Zurich to work with Nicola Spaldin. """}, {"name":"Hitesh Changlani","position":"Postdoc","image":"hitesh.png", "description":"""Hitesh hails from Cornell and specializes in many-body quantum methods, mostly as applied to model lattice systems. His work in this group has focused on formalizing the link between the high energy (for condensed matter) physics of electrons and the low-energy qualitative descriptions that we use to talk about materials. Hitesh is a prolific collaborator and also worked with Shinsei Ryu, Taylor Hughes, Bryan Clark, and David Ceperley in the physics department at UIUC. He is now a postdoc at Johns Hopkins. """}, {"name":"Huihuo Zheng","position":"Graduate Student","image":"huihuo.png", "description":"""Huihuo has many interests, including correlated metal-insulator transitions, new methods for quantum Monte Carlo, and effective Hamiltonians. He joined the group in spring of 2012 and graduated in 2016. He is now a postdoc at Argonne National Lab. """}, {"name":"Yanbin Wu","position":"Associated Graduate Student","image":"yanbin.png", "description":"""Yanbin is a student of Narayan Aluru who is working with the group on calculating the interaction of water with 2D materials. He graduated in 2016 and is currently living in Houston. """}, {"name":"Olabode Sule","position":"Associated Graduate Student","image":"profile-placeholder.gif", "description":"""Bode is a student of Shinsei Ryu who was implementing spin-orbit interactions in QWalk. """}, {"name":"Jack Meister","position":"Undergraduate student","image":"profile-placeholder.gif" , "description":"""Jack did his senior thesis on visualizing correlations in electronic systems. """}, {"name":"Daniel Jiang","position":"Undergraduate student","image":"profile-placeholder.gif" , "description":"""Daniel did some work on extending the averaging programs for QWalk. """}, {"name":"Martin Graham","position":"Undergraduate student","image":"profile-placeholder.gif" , "description":"""Martin did his senior thesis on improving the time step error in diffusion Monte Carlo. """}, {"name":"Matt Ho","position":"Undergraduate Student","image":"matt_ho.jpg", "description":"""Matt is working on data-mining approaches to understanding trends in correlated electron materials. """}, {"name":"Ping-Ko Cho", "position":"Undergraduate Student", "image":"profile-placeholder.gif", "description":"""Ping-Ko is working on faster implementations of QMC techniques""" }, ] print("""--- layout: page title: Group members permalink: /group/ --- ## Current <table cellpadding="5" border="0" style="width:100%"> <tbody> """) for m in members: print(member_format(m)) print(""" </tbody> </table> """) print("""## Alumni <table cellpadding="5" border="0" style="width:100%"> <tbody> """) for a in alumni: print(member_format(a)) print(""" </tbody> </table> """)
def member_format(m): return ' <tr> <td width="15%%"> <img src="../assets/%s"> </td>\n<td> <span id="bioname"> <b> %s </b> </span> <br>\n%s\n<p> %s </p>\n</td>\n</tr>' % (m['image'], m['name'], m['position'], m['description']) members = [{'name': 'Lucas Wagner', 'position': 'Group Leader', 'image': 'lucas.png', 'description': "Lucas has over a decade's experience in computing the properties of many-body quantum systems from first principles. He is the primary architect and developer of the open-source quantum Monte Carlo program QWalk, and has made advances in many-body quantum methods, as well as a number of applications to challenging electronic systems. While he has many interests, the overarching theme of his research is using computers to study systems of electrons that fall beyond the normal paradigms of metals and insulators."}, {'name': 'Jo&atilde;o Nunes Barbosa Rodrigues', 'position': 'postdoc', 'image': 'joao.png', 'description': 'Joao joined in summer of 2017. He is working on effective models in graphene and descriptors for superconductivity'}, {'name': 'Kiel Williams', 'position': 'Graduate Student', 'image': 'kiel.png', 'description': 'Kiel is an NSF Graduate Research Fellow who is learning how to improve many-body wave functions in realistic systems. He joined the group in summer of 2013.\n '}, {'name': 'Brian Busemeyer', 'position': 'Graduate Student', 'image': 'brian.png', 'description': 'Brian is an NSF Graduate Research Fellow who is using quantum Monte Carlo methods to study superconducting materials. He joined the group in August 2013.\n '}, {'name': 'Jeremy Morales', 'position': 'Associated Graduate Student', 'image': 'profile-placeholder.gif', 'description': 'Jeremy is a student of Peter Abbamonte who is studying magnetic models for unconventional superconductors.\n '}, {'name': 'Li Chen', 'position': 'Graduate Student', 'image': 'li.png', 'description': 'Li is studying correlated metal-insulator transitions in realistic systems. She joined the group in summer of 2014.\n '}, {'name': 'Alexander Mu&ntilde;oz', 'position': 'Graduate Student', 'image': 'Munoz.jpg', 'description': 'Alex is joined the group in Fall 2015. He is currently working on the origin of magnetism.'}, {'name': 'William Wheeler', 'position': 'Graduate Student', 'image': 'will_wheeler.jpg', 'description': 'William joined the group in January 2016. He is currently working on the information content of many-body wave functions, and data analysis.'}, {'name': 'Shivesh Pathak', 'position': 'Graduate Student', 'image': 'profile-placeholder.gif', 'description': "Shivesh joined the group in 2016. He is currently working on enhancing QWalk's capabilities.\n "}, {'name': 'Yueqing Chang', 'position': 'Graduate Student', 'image': 'yueqing.jpg', 'description': 'Yueqing joined the group in fall 2016. She is working on spin-orbit coupling in correlated electron systems.\n '}, {'name': 'Kittithat (Mick) Krongchon', 'position': 'Graduate Student', 'image': 'mick.jpg', 'description': 'Kit is working on automating electronic structure calculations in such a way that quantum Monte Carlo calculations can be performed more easily. He is now also working on phonons in cuprate superconductors.\n '}] alumni = [{'name': 'Awadhesh Narayan', 'position': 'Postdoc', 'image': 'awadhesh-narayan_170.jpg', 'description': 'Awadhesh got his PhD from Trinity College Dublin, where he studied the transport of spins in materials. His interest in this group was the prediction of new strongly correlated materials that may have quite unusual properties.\nAfter a productive stint in the group, he has moved to ETH-Zurich to work with Nicola Spaldin.\n '}, {'name': 'Hitesh Changlani', 'position': 'Postdoc', 'image': 'hitesh.png', 'description': 'Hitesh hails from Cornell and specializes in many-body quantum methods, mostly as applied to model lattice systems. His work in this group has focused on formalizing the link between the high energy (for condensed matter) physics of electrons and the low-energy qualitative descriptions that we use to talk about materials. Hitesh is a prolific collaborator and also worked with Shinsei Ryu, Taylor Hughes, Bryan Clark, and David Ceperley in the physics department at UIUC. He is now a postdoc at Johns Hopkins.\n '}, {'name': 'Huihuo Zheng', 'position': 'Graduate Student', 'image': 'huihuo.png', 'description': 'Huihuo has many interests, including correlated metal-insulator transitions, new methods for quantum Monte Carlo, and effective Hamiltonians. He joined the group in spring of 2012 and graduated in 2016. He is now a postdoc at Argonne National Lab.\n '}, {'name': 'Yanbin Wu', 'position': 'Associated Graduate Student', 'image': 'yanbin.png', 'description': 'Yanbin is a student of Narayan Aluru who is working with the group on calculating the interaction of water with 2D materials. He graduated in 2016 and is currently living in Houston.\n '}, {'name': 'Olabode Sule', 'position': 'Associated Graduate Student', 'image': 'profile-placeholder.gif', 'description': 'Bode is a student of Shinsei Ryu who was implementing spin-orbit interactions in QWalk.\n '}, {'name': 'Jack Meister', 'position': 'Undergraduate student', 'image': 'profile-placeholder.gif', 'description': 'Jack did his senior thesis on visualizing correlations in electronic systems.\n '}, {'name': 'Daniel Jiang', 'position': 'Undergraduate student', 'image': 'profile-placeholder.gif', 'description': 'Daniel did some work on extending the averaging programs for QWalk.\n '}, {'name': 'Martin Graham', 'position': 'Undergraduate student', 'image': 'profile-placeholder.gif', 'description': 'Martin did his senior thesis on improving the time step error in diffusion Monte Carlo.\n '}, {'name': 'Matt Ho', 'position': 'Undergraduate Student', 'image': 'matt_ho.jpg', 'description': 'Matt is working on data-mining approaches to understanding trends in correlated electron materials. '}, {'name': 'Ping-Ko Cho', 'position': 'Undergraduate Student', 'image': 'profile-placeholder.gif', 'description': 'Ping-Ko is working on faster implementations of QMC techniques'}] print('---\nlayout: page\ntitle: Group members\npermalink: /group/\n---\n\n## Current\n\n<table cellpadding="5" border="0" style="width:100%">\n<tbody>\n') for m in members: print(member_format(m)) print('\n</tbody>\n</table>\n') print('## Alumni\n\n<table cellpadding="5" border="0" style="width:100%">\n<tbody>\n') for a in alumni: print(member_format(a)) print('\n</tbody>\n</table>\n')
class Command: def __init__(self): self.id self.commandName self.commandEmbbeding self.event
class Command: def __init__(self): self.id self.commandName self.commandEmbbeding self.event
def get_input() -> list: with open(f"{__file__.rstrip('code.py')}input.txt") as f: return [l[:-1] for l in f.readlines()] def parse_input(lines: list) -> list: instructions = [] for line in lines: split = line.split(" ") instructions.append([split[0], int(split[1])]) return instructions def run(instructions: list) -> tuple: pointer, acc, size, history = 0, 0, len(instructions), [] while not pointer in history and pointer < size: history.append(pointer) if instructions[pointer][0] == "acc": acc += instructions[pointer][1] elif instructions[pointer][0] == "jmp": pointer += instructions[pointer][1] continue pointer += 1 return pointer, acc def part1(vals: list) -> int: return run(vals)[1] def part2(vals: list) -> int: pointer, acc = run(vals) i, size = 0, len(vals) while pointer < size: while vals[i][0] == "acc": i += 1 vals[i][0] = "jmp" if vals[i][0] == "nop" else "nop" pointer, acc = run(vals) vals[i][0] = "jmp" if vals[i][0] == "nop" else "nop" i += 1 return acc def main(): file_input = parse_input(get_input()) print(f"Part 1: {part1(file_input)}") print(f"Part 2: {part2(file_input)}") def test(): test_input = parse_input([ "nop +0", "acc +1", "jmp +4", "acc +3", "jmp -3", "acc -99", "acc +1", "jmp -4", "acc +6", ]) assert part1(test_input) == 5 assert part2(test_input) == 8 if __name__ == "__main__": test() main()
def get_input() -> list: with open(f"{__file__.rstrip('code.py')}input.txt") as f: return [l[:-1] for l in f.readlines()] def parse_input(lines: list) -> list: instructions = [] for line in lines: split = line.split(' ') instructions.append([split[0], int(split[1])]) return instructions def run(instructions: list) -> tuple: (pointer, acc, size, history) = (0, 0, len(instructions), []) while not pointer in history and pointer < size: history.append(pointer) if instructions[pointer][0] == 'acc': acc += instructions[pointer][1] elif instructions[pointer][0] == 'jmp': pointer += instructions[pointer][1] continue pointer += 1 return (pointer, acc) def part1(vals: list) -> int: return run(vals)[1] def part2(vals: list) -> int: (pointer, acc) = run(vals) (i, size) = (0, len(vals)) while pointer < size: while vals[i][0] == 'acc': i += 1 vals[i][0] = 'jmp' if vals[i][0] == 'nop' else 'nop' (pointer, acc) = run(vals) vals[i][0] = 'jmp' if vals[i][0] == 'nop' else 'nop' i += 1 return acc def main(): file_input = parse_input(get_input()) print(f'Part 1: {part1(file_input)}') print(f'Part 2: {part2(file_input)}') def test(): test_input = parse_input(['nop +0', 'acc +1', 'jmp +4', 'acc +3', 'jmp -3', 'acc -99', 'acc +1', 'jmp -4', 'acc +6']) assert part1(test_input) == 5 assert part2(test_input) == 8 if __name__ == '__main__': test() main()
"""Lib macros.""" # the cell format intentionally uses a deprecated cell format # @lint-ignore SKYLINT load( "cell//:lib2.bzl", _foo = "foo", ) foo = _foo
"""Lib macros.""" load('cell//:lib2.bzl', _foo='foo') foo = _foo
# -*- coding: utf-8 -*- """Domain Driven Design framework - Event.""" class Event: pass
"""Domain Driven Design framework - Event.""" class Event: pass
with open("files_question4.txt")as main_file: with open("Delhi.txt","w")as file1: with open("Shimla.txt","w") as file2: with open("other.txt","w") as file3: for i in main_file: if "delhi" in i: file1.write(i) elif "Shimla" in i: file2.write(i) else: file3.write(i) main_file.close() # main_file=open("files_question3.txt") # file1=open("Delhi.txt","w") # file2=open("Shimla.txt","w") # file3=open("other.txt","w") # for i in main_file: # if "delhi" in i: # file1.write(i) # elif "shimla" in i: # file2.write(i) # else: # file3.write(i) # main_file.close()
with open('files_question4.txt') as main_file: with open('Delhi.txt', 'w') as file1: with open('Shimla.txt', 'w') as file2: with open('other.txt', 'w') as file3: for i in main_file: if 'delhi' in i: file1.write(i) elif 'Shimla' in i: file2.write(i) else: file3.write(i) main_file.close()
def create_new_employee_department(): employee_department = [] emp = ' ' while emp != ' ': emp_department_input = input('Enter employee last name \n') employee_department.append(emp_department_input) return employee_department
def create_new_employee_department(): employee_department = [] emp = ' ' while emp != ' ': emp_department_input = input('Enter employee last name \n') employee_department.append(emp_department_input) return employee_department
# TRANSCRIBE TO MRNA EDABIT SOLUTION: # creating a function to solve the problem. def dna_to_rna(dna): # returning the DNA strand with modifications to make it an RNA strand. return(dna.replace("A", "U") .replace("T", "A") .replace("G", "C") .replace("C", "G"))
def dna_to_rna(dna): return dna.replace('A', 'U').replace('T', 'A').replace('G', 'C').replace('C', 'G')
class ConfigurationError(Exception): """ This exception should be thrown if configuration errors happen """ class SerializerError(Exception): """ This exception should be thrown if serializer errors happen """ class AuthenticationError(Exception): """ This exception should be thrown if authentication errors happen """
class Configurationerror(Exception): """ This exception should be thrown if configuration errors happen """ class Serializererror(Exception): """ This exception should be thrown if serializer errors happen """ class Authenticationerror(Exception): """ This exception should be thrown if authentication errors happen """
class Calculator: def add(self, x, y): return x + y def subtract(self, x, y): return x - y def multiply(self, x, y): return x * y def divide(self, x, y): try: return x / y except ZeroDivisionError: print('Invalid operation. Division by 0') calculator = Calculator() print(calculator.divide(5,1)) calculator.divide(5,0)
class Calculator: def add(self, x, y): return x + y def subtract(self, x, y): return x - y def multiply(self, x, y): return x * y def divide(self, x, y): try: return x / y except ZeroDivisionError: print('Invalid operation. Division by 0') calculator = calculator() print(calculator.divide(5, 1)) calculator.divide(5, 0)
# Merge Two Binary Trees class Solution(object): def mergeTrees(self, t1, t2): """ :type t1: TreeNode :type t2: TreeNode :rtype: TreeNode """ if not t1 and not t2: return None result = TreeNode((t1.val if t1 else 0) + (t2.val if t2 else 0)) result.left = self.mergeTrees(t1 and t1.left, t2 and t2.left) result.right = self.mergeTrees(t1 and t1.right, t2 and t2.right) return result
class Solution(object): def merge_trees(self, t1, t2): """ :type t1: TreeNode :type t2: TreeNode :rtype: TreeNode """ if not t1 and (not t2): return None result = tree_node((t1.val if t1 else 0) + (t2.val if t2 else 0)) result.left = self.mergeTrees(t1 and t1.left, t2 and t2.left) result.right = self.mergeTrees(t1 and t1.right, t2 and t2.right) return result
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"func": "MLE_01_serving.ipynb", "Class": "MLE_01_serving.ipynb"} modules = ["de__extract.py", "de__transform.py", "de__load.py", "ds__load.py", "ds__preprocess.py", "ds__build_features.py", "ds__modelling.py", "ds__validate.py", "ds__postprocess.py", "mle__pipeline_utils.py", "mle__serving.py"] doc_url = "https://{user}.github.io/{repo_name}/src/" git_url = "https://github.com/{user}/src/tree/{branch}/" def custom_doc_links(name): return None
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url'] index = {'func': 'MLE_01_serving.ipynb', 'Class': 'MLE_01_serving.ipynb'} modules = ['de__extract.py', 'de__transform.py', 'de__load.py', 'ds__load.py', 'ds__preprocess.py', 'ds__build_features.py', 'ds__modelling.py', 'ds__validate.py', 'ds__postprocess.py', 'mle__pipeline_utils.py', 'mle__serving.py'] doc_url = 'https://{user}.github.io/{repo_name}/src/' git_url = 'https://github.com/{user}/src/tree/{branch}/' def custom_doc_links(name): return None
def bisection(f, x0, x1, error=1e-15): if f(x0) * f(x1) > 0: print("No root found.") else: while True: mid = 0.5 * (x0 + x1) if abs(f(mid)) < error: return mid elif f(x0) * f(mid) > 0: x0 = mid else: x1 = mid def secant(f, x0, x1, error=1e-15): fx0 = f(x0) fx1 = f(x1) while abs(fx1) > error: x2 = (x0 * fx1 - x1 * fx0) / (fx1 - fx0) x0, x1 = x1, x2 fx0, fx1 = fx1, f(x2) return x1 def newton_raphson(f, df_dx, x0, error=1e-15): while abs(f(x0)) > error: x0 -= f(x0) / df_dx(x0) return x0 def newton_raphson_2x2(f, g, fx, fy, gx, gy, x0, y0, error=1e-15): while abs(f(x0, y0)) > error or abs(g(x0, y0)) > error: jacobian = fx(x0, y0) * gy(x0, y0) - gx(x0, y0) * fy(x0, y0) x0 = x0 + (g(x0, y0) * fy(x0, y0) - f(x0, y0) * gy(x0, y0)) / jacobian y0 = y0 + (f(x0, y0) * gx(x0, y0) - g(x0, y0) * fx(x0, y0)) / jacobian return x0, y0 def newton_raphson_multiple_roots(f, df_dx, n, x0=2., error=1e-15): roots = [] for i in range(n): xi = x0 while abs(f(xi)) > error: xi -= f(xi) / (df_dx(xi) - f(xi) * sum([1 / (xi - root) for root in roots])) roots.append(xi) return sorted(roots)
def bisection(f, x0, x1, error=1e-15): if f(x0) * f(x1) > 0: print('No root found.') else: while True: mid = 0.5 * (x0 + x1) if abs(f(mid)) < error: return mid elif f(x0) * f(mid) > 0: x0 = mid else: x1 = mid def secant(f, x0, x1, error=1e-15): fx0 = f(x0) fx1 = f(x1) while abs(fx1) > error: x2 = (x0 * fx1 - x1 * fx0) / (fx1 - fx0) (x0, x1) = (x1, x2) (fx0, fx1) = (fx1, f(x2)) return x1 def newton_raphson(f, df_dx, x0, error=1e-15): while abs(f(x0)) > error: x0 -= f(x0) / df_dx(x0) return x0 def newton_raphson_2x2(f, g, fx, fy, gx, gy, x0, y0, error=1e-15): while abs(f(x0, y0)) > error or abs(g(x0, y0)) > error: jacobian = fx(x0, y0) * gy(x0, y0) - gx(x0, y0) * fy(x0, y0) x0 = x0 + (g(x0, y0) * fy(x0, y0) - f(x0, y0) * gy(x0, y0)) / jacobian y0 = y0 + (f(x0, y0) * gx(x0, y0) - g(x0, y0) * fx(x0, y0)) / jacobian return (x0, y0) def newton_raphson_multiple_roots(f, df_dx, n, x0=2.0, error=1e-15): roots = [] for i in range(n): xi = x0 while abs(f(xi)) > error: xi -= f(xi) / (df_dx(xi) - f(xi) * sum([1 / (xi - root) for root in roots])) roots.append(xi) return sorted(roots)
# Longest Substring Without Repeating Characters class Solution: def lengthOfLongestSubstring(self, s: str) -> int: window = set() # pointer of sliding window, if find the char in window, then need to move pointer to right to remove all chars until remove this char left = 0 max_len = 0 cur_len = 0 for ch in s: while ch in window: window.remove(s[left]) left +=1 cur_len -=1 window.add(ch) cur_len +=1 max_len = max(max_len,cur_len) return max_len # time: O(n) # space: O(n)
class Solution: def length_of_longest_substring(self, s: str) -> int: window = set() left = 0 max_len = 0 cur_len = 0 for ch in s: while ch in window: window.remove(s[left]) left += 1 cur_len -= 1 window.add(ch) cur_len += 1 max_len = max(max_len, cur_len) return max_len
"""Constants.""" MAX_CONCURRENCY = 30 MAX_RETRY_ATTEMPTS = 5 DEFAULT_URL = "https://api.redbrickai.com" ORG_API_HAS_CHANGED = ( "this api has changed recently, try running help(redbrick.get_org)" + " or visiting https://redbrick-sdk.readthedocs.io/en/stable/#redbrick.get_org" ) PROJECT_API_HAS_CHANGED = ( "this api has changed recently, try running help(redbrick.get_project)" + " or visiting https://redbrick-sdk.readthedocs.io/en/stable/#redbrick.get_project" )
"""Constants.""" max_concurrency = 30 max_retry_attempts = 5 default_url = 'https://api.redbrickai.com' org_api_has_changed = 'this api has changed recently, try running help(redbrick.get_org)' + ' or visiting https://redbrick-sdk.readthedocs.io/en/stable/#redbrick.get_org' project_api_has_changed = 'this api has changed recently, try running help(redbrick.get_project)' + ' or visiting https://redbrick-sdk.readthedocs.io/en/stable/#redbrick.get_project'
{ "targets": [ { # OpenSSL has a lot of config options, with some default options # enabling known insecure algorithms. What's a good combinations # of openssl config options? # ./config no-asm no-shared no-ssl2 no-ssl3 no-hw no-zlib no-threads # ? # See also http://codefromthe70s.org/sslimprov.aspx "target_name": "openssl", "type": "static_library", # The list of sources I computed on Windows via: # >cd bru_modules\openssl\1.0.1m\openssl-1.0.1m # >perl Configure VC-WIN32 no-asm no-ssl2 no-ssl3 no-hw # >call ms\\do_ms.bat # >nmake /n /f ms\nt.mak > nmake.log # >cd bru_modules\openssl # where the *.gyp is located # >~\bru\makefile2gyp.py 1.0.1m\openssl-1.0.1m\nmake.log "sources": [ "1.0.1m/openssl-1.0.1m/crypto/aes/aes_cbc.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_cfb.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_core.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_ctr.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_ige.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_misc.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_ofb.c", "1.0.1m/openssl-1.0.1m/crypto/aes/aes_wrap.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_bitstr.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_bool.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_bytes.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_d2i_fp.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_digest.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_dup.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_enum.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_gentm.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_i2d_fp.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_int.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_mbstr.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_object.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_octet.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_print.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_set.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_sign.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_strex.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_strnid.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_time.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_type.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_utctm.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_utf8.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/a_verify.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/ameth_lib.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_err.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_gen.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_lib.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_par.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn_mime.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn_moid.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/asn_pack.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/bio_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/bio_ndef.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/d2i_pr.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/d2i_pu.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/evp_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/f_enum.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/f_int.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/f_string.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/i2d_pr.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/i2d_pu.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/n_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/nsseq.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/p5_pbe.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/p5_pbev2.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/p8_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_bitst.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_crl.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_req.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_spki.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_x509.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/t_x509a.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_dec.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_enc.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_fre.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_new.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_prn.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_typ.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_utl.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_algor.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_attrib.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_bignum.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_crl.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_exten.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_info.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_long.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_name.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_nx509.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_pubkey.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_req.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_sig.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_spki.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_val.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_x509.c", "1.0.1m/openssl-1.0.1m/crypto/asn1/x_x509a.c", "1.0.1m/openssl-1.0.1m/crypto/bf/bf_cfb64.c", "1.0.1m/openssl-1.0.1m/crypto/bf/bf_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/bf/bf_enc.c", "1.0.1m/openssl-1.0.1m/crypto/bf/bf_ofb64.c", "1.0.1m/openssl-1.0.1m/crypto/bf/bf_skey.c", "1.0.1m/openssl-1.0.1m/crypto/bf/bftest.c", "1.0.1m/openssl-1.0.1m/crypto/bio/b_dump.c", "1.0.1m/openssl-1.0.1m/crypto/bio/b_print.c", "1.0.1m/openssl-1.0.1m/crypto/bio/b_sock.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bf_buff.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bf_nbio.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bf_null.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bio_cb.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bio_err.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bio_lib.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_acpt.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_bio.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_conn.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_dgram.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_fd.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_file.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_log.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_mem.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_null.c", "1.0.1m/openssl-1.0.1m/crypto/bio/bss_sock.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_add.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_asm.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_blind.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_const.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_ctx.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_depr.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_div.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_err.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_exp.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_exp2.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_gcd.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_gf2m.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_kron.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_lib.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_mod.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_mont.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_mpi.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_mul.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_nist.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_prime.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_print.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_rand.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_recp.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_shift.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_sqr.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_sqrt.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_word.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bn_x931p.c", "1.0.1m/openssl-1.0.1m/crypto/bn/bntest.c", "1.0.1m/openssl-1.0.1m/crypto/bn/exptest.c", "1.0.1m/openssl-1.0.1m/crypto/buffer/buf_err.c", "1.0.1m/openssl-1.0.1m/crypto/buffer/buf_str.c", "1.0.1m/openssl-1.0.1m/crypto/buffer/buffer.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/camellia.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_cbc.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_cfb.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_ctr.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_misc.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_ofb.c", "1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_utl.c", "1.0.1m/openssl-1.0.1m/crypto/cast/c_cfb64.c", "1.0.1m/openssl-1.0.1m/crypto/cast/c_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/cast/c_enc.c", "1.0.1m/openssl-1.0.1m/crypto/cast/c_ofb64.c", "1.0.1m/openssl-1.0.1m/crypto/cast/c_skey.c", "1.0.1m/openssl-1.0.1m/crypto/cast/casttest.c", "1.0.1m/openssl-1.0.1m/crypto/cmac/cm_ameth.c", "1.0.1m/openssl-1.0.1m/crypto/cmac/cm_pmeth.c", "1.0.1m/openssl-1.0.1m/crypto/cmac/cmac.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_att.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_cd.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_dd.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_enc.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_env.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_err.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_ess.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_io.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_lib.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_pwri.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_sd.c", "1.0.1m/openssl-1.0.1m/crypto/cms/cms_smime.c", "1.0.1m/openssl-1.0.1m/crypto/comp/c_rle.c", "1.0.1m/openssl-1.0.1m/crypto/comp/c_zlib.c", "1.0.1m/openssl-1.0.1m/crypto/comp/comp_err.c", "1.0.1m/openssl-1.0.1m/crypto/comp/comp_lib.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_api.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_def.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_err.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_lib.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_mall.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_mod.c", "1.0.1m/openssl-1.0.1m/crypto/conf/conf_sap.c", "1.0.1m/openssl-1.0.1m/crypto/constant_time_test.c", "1.0.1m/openssl-1.0.1m/crypto/cpt_err.c", "1.0.1m/openssl-1.0.1m/crypto/cryptlib.c", "1.0.1m/openssl-1.0.1m/crypto/cversion.c", "1.0.1m/openssl-1.0.1m/crypto/des/cbc_cksm.c", "1.0.1m/openssl-1.0.1m/crypto/des/cbc_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/cfb64ede.c", "1.0.1m/openssl-1.0.1m/crypto/des/cfb64enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/cfb_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/des_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/des_old.c", "1.0.1m/openssl-1.0.1m/crypto/des/des_old2.c", "1.0.1m/openssl-1.0.1m/crypto/des/destest.c", "1.0.1m/openssl-1.0.1m/crypto/des/ecb3_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/ecb_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/ede_cbcm_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/enc_read.c", "1.0.1m/openssl-1.0.1m/crypto/des/enc_writ.c", "1.0.1m/openssl-1.0.1m/crypto/des/fcrypt.c", "1.0.1m/openssl-1.0.1m/crypto/des/fcrypt_b.c", "1.0.1m/openssl-1.0.1m/crypto/des/ofb64ede.c", "1.0.1m/openssl-1.0.1m/crypto/des/ofb64enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/ofb_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/pcbc_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/qud_cksm.c", "1.0.1m/openssl-1.0.1m/crypto/des/rand_key.c", "1.0.1m/openssl-1.0.1m/crypto/des/read2pwd.c", "1.0.1m/openssl-1.0.1m/crypto/des/rpc_enc.c", "1.0.1m/openssl-1.0.1m/crypto/des/set_key.c", "1.0.1m/openssl-1.0.1m/crypto/des/str2key.c", "1.0.1m/openssl-1.0.1m/crypto/des/xcbc_enc.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_ameth.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_check.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_depr.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_err.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_gen.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_key.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_lib.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_pmeth.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dh_prn.c", "1.0.1m/openssl-1.0.1m/crypto/dh/dhtest.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_ameth.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_depr.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_err.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_gen.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_key.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_lib.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_ossl.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_pmeth.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_prn.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_sign.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_vrf.c", "1.0.1m/openssl-1.0.1m/crypto/dsa/dsatest.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_beos.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_dl.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_dlfcn.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_err.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_lib.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_null.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_openssl.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_vms.c", "1.0.1m/openssl-1.0.1m/crypto/dso/dso_win32.c", "1.0.1m/openssl-1.0.1m/crypto/ebcdic.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec2_mult.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec2_oct.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec2_smpl.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_ameth.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_check.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_curve.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_cvt.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_err.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_key.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_mult.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_oct.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_pmeth.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ec_print.c", "1.0.1m/openssl-1.0.1m/crypto/ec/eck_prn.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_mont.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nist.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistp224.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistp256.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistp521.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistputil.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_oct.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ecp_smpl.c", "1.0.1m/openssl-1.0.1m/crypto/ec/ectest.c", "1.0.1m/openssl-1.0.1m/crypto/ecdh/ecdhtest.c", "1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_err.c", "1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_key.c", "1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_ossl.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecdsatest.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_err.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_ossl.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_sign.c", "1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_vrf.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_all.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_cnf.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_cryptodev.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_ctrl.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_dyn.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_err.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_fat.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_init.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_lib.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_list.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_openssl.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_rdrand.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_rsax.c", "1.0.1m/openssl-1.0.1m/crypto/engine/eng_table.c", "1.0.1m/openssl-1.0.1m/crypto/engine/enginetest.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_asnmth.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_cipher.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_dh.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_digest.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_dsa.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_ecdh.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_ecdsa.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_pkmeth.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_rand.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_rsa.c", "1.0.1m/openssl-1.0.1m/crypto/engine/tb_store.c", "1.0.1m/openssl-1.0.1m/crypto/err/err.c", "1.0.1m/openssl-1.0.1m/crypto/err/err_all.c", "1.0.1m/openssl-1.0.1m/crypto/err/err_prn.c", "1.0.1m/openssl-1.0.1m/crypto/evp/bio_b64.c", "1.0.1m/openssl-1.0.1m/crypto/evp/bio_enc.c", "1.0.1m/openssl-1.0.1m/crypto/evp/bio_md.c", "1.0.1m/openssl-1.0.1m/crypto/evp/bio_ok.c", "1.0.1m/openssl-1.0.1m/crypto/evp/c_all.c", "1.0.1m/openssl-1.0.1m/crypto/evp/c_allc.c", "1.0.1m/openssl-1.0.1m/crypto/evp/c_alld.c", "1.0.1m/openssl-1.0.1m/crypto/evp/digest.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_aes.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_aes_cbc_hmac_sha1.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_bf.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_camellia.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_cast.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_des.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_des3.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_idea.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_null.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_old.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_rc2.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_rc4.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_rc4_hmac_md5.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_rc5.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_seed.c", "1.0.1m/openssl-1.0.1m/crypto/evp/e_xcbc_d.c", "1.0.1m/openssl-1.0.1m/crypto/evp/encode.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_acnf.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_cnf.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_enc.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_err.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_fips.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_key.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_lib.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_pbe.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/evp/evp_test.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_dss.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_dss1.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_ecdsa.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_md4.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_md5.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_mdc2.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_null.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_ripemd.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_sha.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_sha1.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_sigver.c", "1.0.1m/openssl-1.0.1m/crypto/evp/m_wp.c", "1.0.1m/openssl-1.0.1m/crypto/evp/names.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p5_crpt.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p5_crpt2.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_dec.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_enc.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_lib.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_open.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_seal.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_sign.c", "1.0.1m/openssl-1.0.1m/crypto/evp/p_verify.c", "1.0.1m/openssl-1.0.1m/crypto/evp/pmeth_fn.c", "1.0.1m/openssl-1.0.1m/crypto/evp/pmeth_gn.c", "1.0.1m/openssl-1.0.1m/crypto/evp/pmeth_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ex_data.c", "1.0.1m/openssl-1.0.1m/crypto/fips_ers.c", "1.0.1m/openssl-1.0.1m/crypto/hmac/hm_ameth.c", "1.0.1m/openssl-1.0.1m/crypto/hmac/hm_pmeth.c", "1.0.1m/openssl-1.0.1m/crypto/hmac/hmac.c", "1.0.1m/openssl-1.0.1m/crypto/hmac/hmactest.c", "1.0.1m/openssl-1.0.1m/crypto/idea/i_cbc.c", "1.0.1m/openssl-1.0.1m/crypto/idea/i_cfb64.c", "1.0.1m/openssl-1.0.1m/crypto/idea/i_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/idea/i_ofb64.c", "1.0.1m/openssl-1.0.1m/crypto/idea/i_skey.c", "1.0.1m/openssl-1.0.1m/crypto/idea/ideatest.c", "1.0.1m/openssl-1.0.1m/crypto/krb5/krb5_asn.c", "1.0.1m/openssl-1.0.1m/crypto/lhash/lh_stats.c", "1.0.1m/openssl-1.0.1m/crypto/lhash/lhash.c", "1.0.1m/openssl-1.0.1m/crypto/md4/md4_dgst.c", "1.0.1m/openssl-1.0.1m/crypto/md4/md4_one.c", "1.0.1m/openssl-1.0.1m/crypto/md4/md4test.c", "1.0.1m/openssl-1.0.1m/crypto/md5/md5_dgst.c", "1.0.1m/openssl-1.0.1m/crypto/md5/md5_one.c", "1.0.1m/openssl-1.0.1m/crypto/md5/md5test.c", "1.0.1m/openssl-1.0.1m/crypto/mdc2/mdc2_one.c", "1.0.1m/openssl-1.0.1m/crypto/mdc2/mdc2dgst.c", "1.0.1m/openssl-1.0.1m/crypto/mdc2/mdc2test.c", "1.0.1m/openssl-1.0.1m/crypto/mem.c", "1.0.1m/openssl-1.0.1m/crypto/mem_clr.c", "1.0.1m/openssl-1.0.1m/crypto/mem_dbg.c", "1.0.1m/openssl-1.0.1m/crypto/modes/cbc128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/ccm128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/cfb128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/ctr128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/cts128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/gcm128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/ofb128.c", "1.0.1m/openssl-1.0.1m/crypto/modes/xts128.c", "1.0.1m/openssl-1.0.1m/crypto/o_dir.c", "1.0.1m/openssl-1.0.1m/crypto/o_fips.c", "1.0.1m/openssl-1.0.1m/crypto/o_init.c", "1.0.1m/openssl-1.0.1m/crypto/o_str.c", "1.0.1m/openssl-1.0.1m/crypto/o_time.c", "1.0.1m/openssl-1.0.1m/crypto/objects/o_names.c", "1.0.1m/openssl-1.0.1m/crypto/objects/obj_dat.c", "1.0.1m/openssl-1.0.1m/crypto/objects/obj_err.c", "1.0.1m/openssl-1.0.1m/crypto/objects/obj_lib.c", "1.0.1m/openssl-1.0.1m/crypto/objects/obj_xref.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_asn.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_cl.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_err.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_ext.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_ht.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_prn.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_srv.c", "1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_vfy.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_all.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_err.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_info.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_lib.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_oth.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_pk8.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_pkey.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_seal.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_sign.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_x509.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pem_xaux.c", "1.0.1m/openssl-1.0.1m/crypto/pem/pvkfmt.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_add.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_asn.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_attr.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_crpt.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_crt.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_decr.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_init.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_key.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_kiss.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_mutl.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_npas.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_p8d.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_p8e.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_utl.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs12/pk12err.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/bio_pk7.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_attr.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_doit.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_lib.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_mime.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_smime.c", "1.0.1m/openssl-1.0.1m/crypto/pkcs7/pkcs7err.c", "1.0.1m/openssl-1.0.1m/crypto/pqueue/pqueue.c", "1.0.1m/openssl-1.0.1m/crypto/rand/md_rand.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_egd.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_err.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_lib.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_nw.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_os2.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_unix.c", "1.0.1m/openssl-1.0.1m/crypto/rand/rand_win.c", "1.0.1m/openssl-1.0.1m/crypto/rand/randfile.c", "1.0.1m/openssl-1.0.1m/crypto/rand/randtest.c", "1.0.1m/openssl-1.0.1m/crypto/rc2/rc2_cbc.c", "1.0.1m/openssl-1.0.1m/crypto/rc2/rc2_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/rc2/rc2_skey.c", "1.0.1m/openssl-1.0.1m/crypto/rc2/rc2cfb64.c", "1.0.1m/openssl-1.0.1m/crypto/rc2/rc2ofb64.c", "1.0.1m/openssl-1.0.1m/crypto/rc2/rc2test.c", #"1.0.1m/openssl-1.0.1m/crypto/rc4/rc4_enc.c", #"1.0.1m/openssl-1.0.1m/crypto/rc4/rc4_skey.c", #"1.0.1m/openssl-1.0.1m/crypto/rc4/rc4_utl.c", "1.0.1m/openssl-1.0.1m/crypto/rc4/rc4test.c", "1.0.1m/openssl-1.0.1m/crypto/ripemd/rmd_dgst.c", "1.0.1m/openssl-1.0.1m/crypto/ripemd/rmd_one.c", "1.0.1m/openssl-1.0.1m/crypto/ripemd/rmdtest.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_ameth.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_chk.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_crpt.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_depr.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_eay.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_err.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_gen.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_lib.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_none.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_null.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_oaep.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_pk1.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_pmeth.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_prn.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_pss.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_saos.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_sign.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_ssl.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_test.c", "1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_x931.c", "1.0.1m/openssl-1.0.1m/crypto/seed/seed.c", "1.0.1m/openssl-1.0.1m/crypto/seed/seed_cbc.c", "1.0.1m/openssl-1.0.1m/crypto/seed/seed_cfb.c", "1.0.1m/openssl-1.0.1m/crypto/seed/seed_ecb.c", "1.0.1m/openssl-1.0.1m/crypto/seed/seed_ofb.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha1_one.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha1dgst.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha1test.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha256.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha256t.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha512.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha512t.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha_dgst.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha_one.c", "1.0.1m/openssl-1.0.1m/crypto/sha/shatest.c", "1.0.1m/openssl-1.0.1m/crypto/srp/srp_lib.c", "1.0.1m/openssl-1.0.1m/crypto/srp/srp_vfy.c", "1.0.1m/openssl-1.0.1m/crypto/srp/srptest.c", "1.0.1m/openssl-1.0.1m/crypto/stack/stack.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_asn1.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_conf.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_err.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_req_print.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_req_utils.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_print.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_sign.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_utils.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_verify.c", "1.0.1m/openssl-1.0.1m/crypto/ts/ts_verify_ctx.c", "1.0.1m/openssl-1.0.1m/crypto/txt_db/txt_db.c", "1.0.1m/openssl-1.0.1m/crypto/ui/ui_compat.c", "1.0.1m/openssl-1.0.1m/crypto/ui/ui_err.c", "1.0.1m/openssl-1.0.1m/crypto/ui/ui_lib.c", "1.0.1m/openssl-1.0.1m/crypto/ui/ui_openssl.c", "1.0.1m/openssl-1.0.1m/crypto/ui/ui_util.c", "1.0.1m/openssl-1.0.1m/crypto/uid.c", "1.0.1m/openssl-1.0.1m/crypto/whrlpool/wp_block.c", "1.0.1m/openssl-1.0.1m/crypto/whrlpool/wp_dgst.c", "1.0.1m/openssl-1.0.1m/crypto/whrlpool/wp_test.c", "1.0.1m/openssl-1.0.1m/crypto/x509/by_dir.c", "1.0.1m/openssl-1.0.1m/crypto/x509/by_file.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_att.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_cmp.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_d2.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_def.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_err.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_ext.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_lu.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_obj.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_r2x.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_req.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_set.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_trs.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_txt.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_v3.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_vfy.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509_vpm.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509cset.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509name.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509rset.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509spki.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x509type.c", "1.0.1m/openssl-1.0.1m/crypto/x509/x_all.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_cache.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_data.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_lib.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_map.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_node.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_tree.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_addr.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_akey.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_akeya.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_alt.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_asid.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_bcons.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_bitst.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_conf.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_cpols.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_crld.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_enum.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_extku.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_genn.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_ia5.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_info.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_int.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_lib.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_ncons.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_ocsp.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pci.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pcia.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pcons.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pku.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pmaps.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_prn.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_purp.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_skey.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_sxnet.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_utl.c", "1.0.1m/openssl-1.0.1m/crypto/x509v3/v3err.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/e_gost_err.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost2001.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost2001_keyx.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost89.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost94_keyx.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_ameth.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_asn1.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_crypt.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_ctl.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_eng.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_keywrap.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_md.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_params.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_pmeth.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gost_sign.c", "1.0.1m/openssl-1.0.1m/engines/ccgost/gosthash.c", "1.0.1m/openssl-1.0.1m/engines/e_4758cca.c", "1.0.1m/openssl-1.0.1m/engines/e_aep.c", "1.0.1m/openssl-1.0.1m/engines/e_atalla.c", "1.0.1m/openssl-1.0.1m/engines/e_capi.c", "1.0.1m/openssl-1.0.1m/engines/e_chil.c", "1.0.1m/openssl-1.0.1m/engines/e_cswift.c", "1.0.1m/openssl-1.0.1m/engines/e_gmp.c", "1.0.1m/openssl-1.0.1m/engines/e_nuron.c", "1.0.1m/openssl-1.0.1m/engines/e_padlock.c", "1.0.1m/openssl-1.0.1m/engines/e_sureware.c", "1.0.1m/openssl-1.0.1m/engines/e_ubsec.c", # these are from ssl/Makefile, not sure why these didn't # show up in the Windows nt.mak file. "1.0.1m/openssl-1.0.1m/ssl/*.c" ], "sources!": [ # exclude various tests that provide an impl of main(): "1.0.1m/openssl-1.0.1m/crypto/*/*test.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha256t.c", "1.0.1m/openssl-1.0.1m/crypto/sha/sha512t.c", "1.0.1m/openssl-1.0.1m/crypto/*test.c", "1.0.1m/openssl-1.0.1m/ssl/*test.c", "1.0.1m/openssl-1.0.1m/ssl/ssl_task*.c" ], "direct_dependent_settings": { "include_dirs": [ "1.0.1m/openssl-1.0.1m/include" ] }, "include_dirs": [ "1.0.1m/openssl-1.0.1m/include", "1.0.1m/openssl-1.0.1m/crypto", # e.g. cryptlib.h "1.0.1m/openssl-1.0.1m/crypto/asn1", # e.g. asn1_locl.h "1.0.1m/openssl-1.0.1m/crypto/evp", # e.g. evp_locl.h "1.0.1m/openssl-1.0.1m/crypto/modes", "1.0.1m/openssl-1.0.1m" # e.g. e_os.h ], "defines": [ # #defines shared across platforms copied from ms\nt.mak "OPENSSL_NO_RC4", "OPENSSL_NO_RC5", "OPENSSL_NO_MD2", "OPENSSL_NO_SSL2", "OPENSSL_NO_SSL3", "OPENSSL_NO_KRB5", "OPENSSL_NO_HW", "OPENSSL_NO_JPAKE", "OPENSSL_NO_DYNAMIC_ENGINE" ], "conditions": [ ["OS=='win'", { "defines": [ # from ms\nt.mak "OPENSSL_THREADS", "DSO_WIN32", "OPENSSL_SYSNAME_WIN32", "WIN32_LEAN_AND_MEAN", "L_ENDIAN", "_CRT_SECURE_NO_DEPRECATE", "NO_WINDOWS_BRAINDEATH" # for cversion.c ], "link_settings" : { "libraries" : [ # external libs (from nt.mak) "-lws2_32.lib", "-lgdi32.lib", "-ladvapi32.lib", "-lcrypt32.lib", "-luser32.lib" ] } }], ["OS=='mac'", { "defines": [ "OPENSSL_NO_EC_NISTP_64_GCC_128", "OPENSSL_NO_GMP", "OPENSSL_NO_JPAKE", "OPENSSL_NO_MD2", "OPENSSL_NO_RC5", "OPENSSL_NO_RFC3779", "OPENSSL_NO_SCTP", "OPENSSL_NO_SSL2", "OPENSSL_NO_SSL3", "OPENSSL_NO_STORE", "OPENSSL_NO_UNIT_TEST", "NO_WINDOWS_BRAINDEATH" ] }], ["OS=='iOS'", { "defines": [ "OPENSSL_NO_EC_NISTP_64_GCC_128", "OPENSSL_NO_GMP", "OPENSSL_NO_JPAKE", "OPENSSL_NO_MD2", "OPENSSL_NO_RC5", "OPENSSL_NO_RFC3779", "OPENSSL_NO_SCTP", "OPENSSL_NO_SSL2", "OPENSSL_NO_SSL3", "OPENSSL_NO_STORE", "OPENSSL_NO_UNIT_TEST", "NO_WINDOWS_BRAINDEATH" ] }], ["OS=='linux'", { "defines": [ # from Linux Makefile after ./configure "DSO_DLFCN", "HAVE_DLFCN_H", "L_ENDIAN", # TODO: revisit! "TERMIO", # otherwise with clang 3.5 on Ubuntu it get errors around # ROTATE() macro's inline asm. Error I had not got on # Centos with clang 3.4. # Note that this is only a problem with cflags -no-integrated-as # which was necessary for clang 3.4. Messy. TODO: revisit "OPENSSL_NO_INLINE_ASM", "NO_WINDOWS_BRAINDEATH" # for cversion.c, otherwise error (where is buildinf.h?) ], "link_settings" : { "libraries" : [ "-ldl" ] } }] ] }, { "target_name": "ssltest", "type": "executable", "test": { "cwd": "1.0.1m/openssl-1.0.1m/test" }, "defines": [ # without these we get linker errors since the test assumes # by default that SSL2 & 3 was built "OPENSSL_NO_RC4", "OPENSSL_NO_RC5", "OPENSSL_NO_MD2", "OPENSSL_NO_SSL2", "OPENSSL_NO_SSL3", "OPENSSL_NO_KRB5", "OPENSSL_NO_HW", "OPENSSL_NO_JPAKE", "OPENSSL_NO_DYNAMIC_ENGINE" ], "include_dirs": [ "1.0.1m/openssl-1.0.1m" # e.g. e_os.h ], "sources": [ # note how the ssl test depends on many #defines set via # ./configure. Do these need to be passed to the test build # explicitly? Apparently not. "1.0.1m/openssl-1.0.1m/ssl/ssltest.c" ], "dependencies": [ "openssl" ], # this disables building the example on iOS "conditions": [ ["OS=='iOS'", { "type": "none" } ] ] } # compile one of the (interactive) openssl demo apps to verify correct # compiler & linker settings in upstream gyp target: # P.S.: I dont think this test can compile on Windows, so this is not # suitable as a cross-platform test. #{ # "target_name": "demos-easy_tls", # "type": "executable", # not suitable as a test, just building this to see if it links #"test": { # "cwd": "1.0.1m/openssl-1.0.1m/demos/easy_tls" #}, # "include_dir": [ "1.0.1m/openssl-1.0.1m/demos/easy_tls" ], # "sources": [ # "1.0.1m/openssl-1.0.1m/demos/easy_tls/test.c", # "1.0.1m/openssl-1.0.1m/demos/easy_tls/easy-tls.c" # ], # "dependencies": [ "openssl" ] #} ] }
{'targets': [{'target_name': 'openssl', 'type': 'static_library', 'sources': ['1.0.1m/openssl-1.0.1m/crypto/aes/aes_cbc.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_cfb.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_core.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_ctr.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_ige.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_misc.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_ofb.c', '1.0.1m/openssl-1.0.1m/crypto/aes/aes_wrap.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_bitstr.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_bool.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_bytes.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_d2i_fp.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_digest.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_dup.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_enum.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_gentm.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_i2d_fp.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_int.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_mbstr.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_object.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_octet.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_print.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_set.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_sign.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_strex.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_strnid.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_time.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_type.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_utctm.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_utf8.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/a_verify.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/ameth_lib.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_err.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_gen.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_lib.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn1_par.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn_mime.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn_moid.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/asn_pack.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/bio_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/bio_ndef.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/d2i_pr.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/d2i_pu.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/evp_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/f_enum.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/f_int.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/f_string.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/i2d_pr.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/i2d_pu.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/n_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/nsseq.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/p5_pbe.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/p5_pbev2.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/p8_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_bitst.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_crl.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_req.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_spki.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_x509.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/t_x509a.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_dec.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_enc.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_fre.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_new.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_prn.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_typ.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/tasn_utl.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_algor.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_attrib.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_bignum.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_crl.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_exten.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_info.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_long.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_name.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_nx509.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_pubkey.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_req.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_sig.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_spki.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_val.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_x509.c', '1.0.1m/openssl-1.0.1m/crypto/asn1/x_x509a.c', '1.0.1m/openssl-1.0.1m/crypto/bf/bf_cfb64.c', '1.0.1m/openssl-1.0.1m/crypto/bf/bf_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/bf/bf_enc.c', '1.0.1m/openssl-1.0.1m/crypto/bf/bf_ofb64.c', '1.0.1m/openssl-1.0.1m/crypto/bf/bf_skey.c', '1.0.1m/openssl-1.0.1m/crypto/bf/bftest.c', '1.0.1m/openssl-1.0.1m/crypto/bio/b_dump.c', '1.0.1m/openssl-1.0.1m/crypto/bio/b_print.c', '1.0.1m/openssl-1.0.1m/crypto/bio/b_sock.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bf_buff.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bf_nbio.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bf_null.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bio_cb.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bio_err.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bio_lib.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_acpt.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_bio.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_conn.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_dgram.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_fd.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_file.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_log.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_mem.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_null.c', '1.0.1m/openssl-1.0.1m/crypto/bio/bss_sock.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_add.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_asm.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_blind.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_const.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_ctx.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_depr.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_div.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_err.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_exp.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_exp2.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_gcd.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_gf2m.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_kron.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_lib.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_mod.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_mont.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_mpi.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_mul.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_nist.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_prime.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_print.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_rand.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_recp.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_shift.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_sqr.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_sqrt.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_word.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bn_x931p.c', '1.0.1m/openssl-1.0.1m/crypto/bn/bntest.c', '1.0.1m/openssl-1.0.1m/crypto/bn/exptest.c', '1.0.1m/openssl-1.0.1m/crypto/buffer/buf_err.c', '1.0.1m/openssl-1.0.1m/crypto/buffer/buf_str.c', '1.0.1m/openssl-1.0.1m/crypto/buffer/buffer.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/camellia.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_cbc.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_cfb.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_ctr.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_misc.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_ofb.c', '1.0.1m/openssl-1.0.1m/crypto/camellia/cmll_utl.c', '1.0.1m/openssl-1.0.1m/crypto/cast/c_cfb64.c', '1.0.1m/openssl-1.0.1m/crypto/cast/c_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/cast/c_enc.c', '1.0.1m/openssl-1.0.1m/crypto/cast/c_ofb64.c', '1.0.1m/openssl-1.0.1m/crypto/cast/c_skey.c', '1.0.1m/openssl-1.0.1m/crypto/cast/casttest.c', '1.0.1m/openssl-1.0.1m/crypto/cmac/cm_ameth.c', '1.0.1m/openssl-1.0.1m/crypto/cmac/cm_pmeth.c', '1.0.1m/openssl-1.0.1m/crypto/cmac/cmac.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_att.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_cd.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_dd.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_enc.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_env.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_err.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_ess.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_io.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_lib.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_pwri.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_sd.c', '1.0.1m/openssl-1.0.1m/crypto/cms/cms_smime.c', '1.0.1m/openssl-1.0.1m/crypto/comp/c_rle.c', '1.0.1m/openssl-1.0.1m/crypto/comp/c_zlib.c', '1.0.1m/openssl-1.0.1m/crypto/comp/comp_err.c', '1.0.1m/openssl-1.0.1m/crypto/comp/comp_lib.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_api.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_def.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_err.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_lib.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_mall.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_mod.c', '1.0.1m/openssl-1.0.1m/crypto/conf/conf_sap.c', '1.0.1m/openssl-1.0.1m/crypto/constant_time_test.c', '1.0.1m/openssl-1.0.1m/crypto/cpt_err.c', '1.0.1m/openssl-1.0.1m/crypto/cryptlib.c', '1.0.1m/openssl-1.0.1m/crypto/cversion.c', '1.0.1m/openssl-1.0.1m/crypto/des/cbc_cksm.c', '1.0.1m/openssl-1.0.1m/crypto/des/cbc_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/cfb64ede.c', '1.0.1m/openssl-1.0.1m/crypto/des/cfb64enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/cfb_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/des_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/des_old.c', '1.0.1m/openssl-1.0.1m/crypto/des/des_old2.c', '1.0.1m/openssl-1.0.1m/crypto/des/destest.c', '1.0.1m/openssl-1.0.1m/crypto/des/ecb3_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/ecb_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/ede_cbcm_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/enc_read.c', '1.0.1m/openssl-1.0.1m/crypto/des/enc_writ.c', '1.0.1m/openssl-1.0.1m/crypto/des/fcrypt.c', '1.0.1m/openssl-1.0.1m/crypto/des/fcrypt_b.c', '1.0.1m/openssl-1.0.1m/crypto/des/ofb64ede.c', '1.0.1m/openssl-1.0.1m/crypto/des/ofb64enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/ofb_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/pcbc_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/qud_cksm.c', '1.0.1m/openssl-1.0.1m/crypto/des/rand_key.c', '1.0.1m/openssl-1.0.1m/crypto/des/read2pwd.c', '1.0.1m/openssl-1.0.1m/crypto/des/rpc_enc.c', '1.0.1m/openssl-1.0.1m/crypto/des/set_key.c', '1.0.1m/openssl-1.0.1m/crypto/des/str2key.c', '1.0.1m/openssl-1.0.1m/crypto/des/xcbc_enc.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_ameth.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_check.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_depr.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_err.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_gen.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_key.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_lib.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_pmeth.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dh_prn.c', '1.0.1m/openssl-1.0.1m/crypto/dh/dhtest.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_ameth.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_depr.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_err.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_gen.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_key.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_lib.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_ossl.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_pmeth.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_prn.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_sign.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsa_vrf.c', '1.0.1m/openssl-1.0.1m/crypto/dsa/dsatest.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_beos.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_dl.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_dlfcn.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_err.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_lib.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_null.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_openssl.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_vms.c', '1.0.1m/openssl-1.0.1m/crypto/dso/dso_win32.c', '1.0.1m/openssl-1.0.1m/crypto/ebcdic.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec2_mult.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec2_oct.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec2_smpl.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_ameth.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_check.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_curve.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_cvt.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_err.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_key.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_mult.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_oct.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_pmeth.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ec_print.c', '1.0.1m/openssl-1.0.1m/crypto/ec/eck_prn.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_mont.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nist.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistp224.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistp256.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistp521.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_nistputil.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_oct.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ecp_smpl.c', '1.0.1m/openssl-1.0.1m/crypto/ec/ectest.c', '1.0.1m/openssl-1.0.1m/crypto/ecdh/ecdhtest.c', '1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_err.c', '1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_key.c', '1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ecdh/ech_ossl.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecdsatest.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_err.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_ossl.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_sign.c', '1.0.1m/openssl-1.0.1m/crypto/ecdsa/ecs_vrf.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_all.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_cnf.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_cryptodev.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_ctrl.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_dyn.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_err.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_fat.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_init.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_lib.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_list.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_openssl.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_rdrand.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_rsax.c', '1.0.1m/openssl-1.0.1m/crypto/engine/eng_table.c', '1.0.1m/openssl-1.0.1m/crypto/engine/enginetest.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_asnmth.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_cipher.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_dh.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_digest.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_dsa.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_ecdh.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_ecdsa.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_pkmeth.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_rand.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_rsa.c', '1.0.1m/openssl-1.0.1m/crypto/engine/tb_store.c', '1.0.1m/openssl-1.0.1m/crypto/err/err.c', '1.0.1m/openssl-1.0.1m/crypto/err/err_all.c', '1.0.1m/openssl-1.0.1m/crypto/err/err_prn.c', '1.0.1m/openssl-1.0.1m/crypto/evp/bio_b64.c', '1.0.1m/openssl-1.0.1m/crypto/evp/bio_enc.c', '1.0.1m/openssl-1.0.1m/crypto/evp/bio_md.c', '1.0.1m/openssl-1.0.1m/crypto/evp/bio_ok.c', '1.0.1m/openssl-1.0.1m/crypto/evp/c_all.c', '1.0.1m/openssl-1.0.1m/crypto/evp/c_allc.c', '1.0.1m/openssl-1.0.1m/crypto/evp/c_alld.c', '1.0.1m/openssl-1.0.1m/crypto/evp/digest.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_aes.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_aes_cbc_hmac_sha1.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_bf.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_camellia.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_cast.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_des.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_des3.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_idea.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_null.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_old.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_rc2.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_rc4.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_rc4_hmac_md5.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_rc5.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_seed.c', '1.0.1m/openssl-1.0.1m/crypto/evp/e_xcbc_d.c', '1.0.1m/openssl-1.0.1m/crypto/evp/encode.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_acnf.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_cnf.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_enc.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_err.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_fips.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_key.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_lib.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_pbe.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/evp/evp_test.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_dss.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_dss1.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_ecdsa.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_md4.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_md5.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_mdc2.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_null.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_ripemd.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_sha.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_sha1.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_sigver.c', '1.0.1m/openssl-1.0.1m/crypto/evp/m_wp.c', '1.0.1m/openssl-1.0.1m/crypto/evp/names.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p5_crpt.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p5_crpt2.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_dec.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_enc.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_lib.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_open.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_seal.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_sign.c', '1.0.1m/openssl-1.0.1m/crypto/evp/p_verify.c', '1.0.1m/openssl-1.0.1m/crypto/evp/pmeth_fn.c', '1.0.1m/openssl-1.0.1m/crypto/evp/pmeth_gn.c', '1.0.1m/openssl-1.0.1m/crypto/evp/pmeth_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ex_data.c', '1.0.1m/openssl-1.0.1m/crypto/fips_ers.c', '1.0.1m/openssl-1.0.1m/crypto/hmac/hm_ameth.c', '1.0.1m/openssl-1.0.1m/crypto/hmac/hm_pmeth.c', '1.0.1m/openssl-1.0.1m/crypto/hmac/hmac.c', '1.0.1m/openssl-1.0.1m/crypto/hmac/hmactest.c', '1.0.1m/openssl-1.0.1m/crypto/idea/i_cbc.c', '1.0.1m/openssl-1.0.1m/crypto/idea/i_cfb64.c', '1.0.1m/openssl-1.0.1m/crypto/idea/i_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/idea/i_ofb64.c', '1.0.1m/openssl-1.0.1m/crypto/idea/i_skey.c', '1.0.1m/openssl-1.0.1m/crypto/idea/ideatest.c', '1.0.1m/openssl-1.0.1m/crypto/krb5/krb5_asn.c', '1.0.1m/openssl-1.0.1m/crypto/lhash/lh_stats.c', '1.0.1m/openssl-1.0.1m/crypto/lhash/lhash.c', '1.0.1m/openssl-1.0.1m/crypto/md4/md4_dgst.c', '1.0.1m/openssl-1.0.1m/crypto/md4/md4_one.c', '1.0.1m/openssl-1.0.1m/crypto/md4/md4test.c', '1.0.1m/openssl-1.0.1m/crypto/md5/md5_dgst.c', '1.0.1m/openssl-1.0.1m/crypto/md5/md5_one.c', '1.0.1m/openssl-1.0.1m/crypto/md5/md5test.c', '1.0.1m/openssl-1.0.1m/crypto/mdc2/mdc2_one.c', '1.0.1m/openssl-1.0.1m/crypto/mdc2/mdc2dgst.c', '1.0.1m/openssl-1.0.1m/crypto/mdc2/mdc2test.c', '1.0.1m/openssl-1.0.1m/crypto/mem.c', '1.0.1m/openssl-1.0.1m/crypto/mem_clr.c', '1.0.1m/openssl-1.0.1m/crypto/mem_dbg.c', '1.0.1m/openssl-1.0.1m/crypto/modes/cbc128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/ccm128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/cfb128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/ctr128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/cts128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/gcm128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/ofb128.c', '1.0.1m/openssl-1.0.1m/crypto/modes/xts128.c', '1.0.1m/openssl-1.0.1m/crypto/o_dir.c', '1.0.1m/openssl-1.0.1m/crypto/o_fips.c', '1.0.1m/openssl-1.0.1m/crypto/o_init.c', '1.0.1m/openssl-1.0.1m/crypto/o_str.c', '1.0.1m/openssl-1.0.1m/crypto/o_time.c', '1.0.1m/openssl-1.0.1m/crypto/objects/o_names.c', '1.0.1m/openssl-1.0.1m/crypto/objects/obj_dat.c', '1.0.1m/openssl-1.0.1m/crypto/objects/obj_err.c', '1.0.1m/openssl-1.0.1m/crypto/objects/obj_lib.c', '1.0.1m/openssl-1.0.1m/crypto/objects/obj_xref.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_asn.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_cl.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_err.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_ext.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_ht.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_prn.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_srv.c', '1.0.1m/openssl-1.0.1m/crypto/ocsp/ocsp_vfy.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_all.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_err.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_info.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_lib.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_oth.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_pk8.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_pkey.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_seal.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_sign.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_x509.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pem_xaux.c', '1.0.1m/openssl-1.0.1m/crypto/pem/pvkfmt.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_add.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_asn.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_attr.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_crpt.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_crt.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_decr.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_init.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_key.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_kiss.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_mutl.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_npas.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_p8d.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_p8e.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/p12_utl.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs12/pk12err.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/bio_pk7.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_attr.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_doit.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_lib.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_mime.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pk7_smime.c', '1.0.1m/openssl-1.0.1m/crypto/pkcs7/pkcs7err.c', '1.0.1m/openssl-1.0.1m/crypto/pqueue/pqueue.c', '1.0.1m/openssl-1.0.1m/crypto/rand/md_rand.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_egd.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_err.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_lib.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_nw.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_os2.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_unix.c', '1.0.1m/openssl-1.0.1m/crypto/rand/rand_win.c', '1.0.1m/openssl-1.0.1m/crypto/rand/randfile.c', '1.0.1m/openssl-1.0.1m/crypto/rand/randtest.c', '1.0.1m/openssl-1.0.1m/crypto/rc2/rc2_cbc.c', '1.0.1m/openssl-1.0.1m/crypto/rc2/rc2_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/rc2/rc2_skey.c', '1.0.1m/openssl-1.0.1m/crypto/rc2/rc2cfb64.c', '1.0.1m/openssl-1.0.1m/crypto/rc2/rc2ofb64.c', '1.0.1m/openssl-1.0.1m/crypto/rc2/rc2test.c', '1.0.1m/openssl-1.0.1m/crypto/rc4/rc4test.c', '1.0.1m/openssl-1.0.1m/crypto/ripemd/rmd_dgst.c', '1.0.1m/openssl-1.0.1m/crypto/ripemd/rmd_one.c', '1.0.1m/openssl-1.0.1m/crypto/ripemd/rmdtest.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_ameth.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_chk.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_crpt.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_depr.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_eay.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_err.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_gen.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_lib.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_none.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_null.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_oaep.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_pk1.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_pmeth.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_prn.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_pss.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_saos.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_sign.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_ssl.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_test.c', '1.0.1m/openssl-1.0.1m/crypto/rsa/rsa_x931.c', '1.0.1m/openssl-1.0.1m/crypto/seed/seed.c', '1.0.1m/openssl-1.0.1m/crypto/seed/seed_cbc.c', '1.0.1m/openssl-1.0.1m/crypto/seed/seed_cfb.c', '1.0.1m/openssl-1.0.1m/crypto/seed/seed_ecb.c', '1.0.1m/openssl-1.0.1m/crypto/seed/seed_ofb.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha1_one.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha1dgst.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha1test.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha256.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha256t.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha512.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha512t.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha_dgst.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha_one.c', '1.0.1m/openssl-1.0.1m/crypto/sha/shatest.c', '1.0.1m/openssl-1.0.1m/crypto/srp/srp_lib.c', '1.0.1m/openssl-1.0.1m/crypto/srp/srp_vfy.c', '1.0.1m/openssl-1.0.1m/crypto/srp/srptest.c', '1.0.1m/openssl-1.0.1m/crypto/stack/stack.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_asn1.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_conf.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_err.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_req_print.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_req_utils.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_print.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_sign.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_utils.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_rsp_verify.c', '1.0.1m/openssl-1.0.1m/crypto/ts/ts_verify_ctx.c', '1.0.1m/openssl-1.0.1m/crypto/txt_db/txt_db.c', '1.0.1m/openssl-1.0.1m/crypto/ui/ui_compat.c', '1.0.1m/openssl-1.0.1m/crypto/ui/ui_err.c', '1.0.1m/openssl-1.0.1m/crypto/ui/ui_lib.c', '1.0.1m/openssl-1.0.1m/crypto/ui/ui_openssl.c', '1.0.1m/openssl-1.0.1m/crypto/ui/ui_util.c', '1.0.1m/openssl-1.0.1m/crypto/uid.c', '1.0.1m/openssl-1.0.1m/crypto/whrlpool/wp_block.c', '1.0.1m/openssl-1.0.1m/crypto/whrlpool/wp_dgst.c', '1.0.1m/openssl-1.0.1m/crypto/whrlpool/wp_test.c', '1.0.1m/openssl-1.0.1m/crypto/x509/by_dir.c', '1.0.1m/openssl-1.0.1m/crypto/x509/by_file.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_att.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_cmp.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_d2.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_def.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_err.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_ext.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_lu.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_obj.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_r2x.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_req.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_set.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_trs.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_txt.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_v3.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_vfy.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509_vpm.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509cset.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509name.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509rset.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509spki.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x509type.c', '1.0.1m/openssl-1.0.1m/crypto/x509/x_all.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_cache.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_data.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_lib.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_map.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_node.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/pcy_tree.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_addr.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_akey.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_akeya.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_alt.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_asid.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_bcons.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_bitst.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_conf.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_cpols.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_crld.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_enum.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_extku.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_genn.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_ia5.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_info.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_int.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_lib.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_ncons.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_ocsp.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pci.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pcia.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pcons.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pku.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_pmaps.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_prn.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_purp.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_skey.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_sxnet.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3_utl.c', '1.0.1m/openssl-1.0.1m/crypto/x509v3/v3err.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/e_gost_err.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost2001.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost2001_keyx.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost89.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost94_keyx.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_ameth.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_asn1.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_crypt.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_ctl.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_eng.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_keywrap.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_md.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_params.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_pmeth.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gost_sign.c', '1.0.1m/openssl-1.0.1m/engines/ccgost/gosthash.c', '1.0.1m/openssl-1.0.1m/engines/e_4758cca.c', '1.0.1m/openssl-1.0.1m/engines/e_aep.c', '1.0.1m/openssl-1.0.1m/engines/e_atalla.c', '1.0.1m/openssl-1.0.1m/engines/e_capi.c', '1.0.1m/openssl-1.0.1m/engines/e_chil.c', '1.0.1m/openssl-1.0.1m/engines/e_cswift.c', '1.0.1m/openssl-1.0.1m/engines/e_gmp.c', '1.0.1m/openssl-1.0.1m/engines/e_nuron.c', '1.0.1m/openssl-1.0.1m/engines/e_padlock.c', '1.0.1m/openssl-1.0.1m/engines/e_sureware.c', '1.0.1m/openssl-1.0.1m/engines/e_ubsec.c', '1.0.1m/openssl-1.0.1m/ssl/*.c'], 'sources!': ['1.0.1m/openssl-1.0.1m/crypto/*/*test.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha256t.c', '1.0.1m/openssl-1.0.1m/crypto/sha/sha512t.c', '1.0.1m/openssl-1.0.1m/crypto/*test.c', '1.0.1m/openssl-1.0.1m/ssl/*test.c', '1.0.1m/openssl-1.0.1m/ssl/ssl_task*.c'], 'direct_dependent_settings': {'include_dirs': ['1.0.1m/openssl-1.0.1m/include']}, 'include_dirs': ['1.0.1m/openssl-1.0.1m/include', '1.0.1m/openssl-1.0.1m/crypto', '1.0.1m/openssl-1.0.1m/crypto/asn1', '1.0.1m/openssl-1.0.1m/crypto/evp', '1.0.1m/openssl-1.0.1m/crypto/modes', '1.0.1m/openssl-1.0.1m'], 'defines': ['OPENSSL_NO_RC4', 'OPENSSL_NO_RC5', 'OPENSSL_NO_MD2', 'OPENSSL_NO_SSL2', 'OPENSSL_NO_SSL3', 'OPENSSL_NO_KRB5', 'OPENSSL_NO_HW', 'OPENSSL_NO_JPAKE', 'OPENSSL_NO_DYNAMIC_ENGINE'], 'conditions': [["OS=='win'", {'defines': ['OPENSSL_THREADS', 'DSO_WIN32', 'OPENSSL_SYSNAME_WIN32', 'WIN32_LEAN_AND_MEAN', 'L_ENDIAN', '_CRT_SECURE_NO_DEPRECATE', 'NO_WINDOWS_BRAINDEATH'], 'link_settings': {'libraries': ['-lws2_32.lib', '-lgdi32.lib', '-ladvapi32.lib', '-lcrypt32.lib', '-luser32.lib']}}], ["OS=='mac'", {'defines': ['OPENSSL_NO_EC_NISTP_64_GCC_128', 'OPENSSL_NO_GMP', 'OPENSSL_NO_JPAKE', 'OPENSSL_NO_MD2', 'OPENSSL_NO_RC5', 'OPENSSL_NO_RFC3779', 'OPENSSL_NO_SCTP', 'OPENSSL_NO_SSL2', 'OPENSSL_NO_SSL3', 'OPENSSL_NO_STORE', 'OPENSSL_NO_UNIT_TEST', 'NO_WINDOWS_BRAINDEATH']}], ["OS=='iOS'", {'defines': ['OPENSSL_NO_EC_NISTP_64_GCC_128', 'OPENSSL_NO_GMP', 'OPENSSL_NO_JPAKE', 'OPENSSL_NO_MD2', 'OPENSSL_NO_RC5', 'OPENSSL_NO_RFC3779', 'OPENSSL_NO_SCTP', 'OPENSSL_NO_SSL2', 'OPENSSL_NO_SSL3', 'OPENSSL_NO_STORE', 'OPENSSL_NO_UNIT_TEST', 'NO_WINDOWS_BRAINDEATH']}], ["OS=='linux'", {'defines': ['DSO_DLFCN', 'HAVE_DLFCN_H', 'L_ENDIAN', 'TERMIO', 'OPENSSL_NO_INLINE_ASM', 'NO_WINDOWS_BRAINDEATH'], 'link_settings': {'libraries': ['-ldl']}}]]}, {'target_name': 'ssltest', 'type': 'executable', 'test': {'cwd': '1.0.1m/openssl-1.0.1m/test'}, 'defines': ['OPENSSL_NO_RC4', 'OPENSSL_NO_RC5', 'OPENSSL_NO_MD2', 'OPENSSL_NO_SSL2', 'OPENSSL_NO_SSL3', 'OPENSSL_NO_KRB5', 'OPENSSL_NO_HW', 'OPENSSL_NO_JPAKE', 'OPENSSL_NO_DYNAMIC_ENGINE'], 'include_dirs': ['1.0.1m/openssl-1.0.1m'], 'sources': ['1.0.1m/openssl-1.0.1m/ssl/ssltest.c'], 'dependencies': ['openssl'], 'conditions': [["OS=='iOS'", {'type': 'none'}]]}]}
class PGSSException(Exception): """Base exception class""" class PGSSInvalidOperation(PGSSException): """Invalid operation""" class PGSSLookupError(PGSSException): """Invalid GoGraph lookup (ex. missing node or edge)"""
class Pgssexception(Exception): """Base exception class""" class Pgssinvalidoperation(PGSSException): """Invalid operation""" class Pgsslookuperror(PGSSException): """Invalid GoGraph lookup (ex. missing node or edge)"""
# Copyright 2018 Inria Damien.Saucez@inria.fr # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. k = 4 login = "login" password = "password" subnet = "10.0.0.0/8" location = "nancy" walltime = "1:00" images = { "ovs":"file:///home/dsaucez/distem-fs-jessie-ovs.tar.gz", "hadoop-slave":"file:///home/dsaucez/slave.tgz", "hadoop-master":"file:///home/dsaucez/master.tgz", } # == store masters = list() slaves = list() # == Helper variables ======================================================== k2 = int( k/2 ) # == Helper functions ======================================================== def coreName(seq): return "Core-%d" % (seq) def aggrName(pod, seq): return "Aggr-%d-%d" % (pod, seq) def edgeName(pod, seq): return "Edge-%d-%d" % (pod, seq) def hostName(pod, edge, seq): return "Host-%d-%d-%d" % (pod, edge, seq) def addSwitch(name): image = images["ovs"] print('o.add_switch("%s", image="%s")' % (name, image)) def addNode(name, role): image = images[role] print ('o.add_node("%s", image="%s")' %(name, image)) def addLink(a, b): print('o.add_link("%s", "%s")' % (a, b)) def upload_array_as_file(host, name, lines, clean = False): # remove first the file if clean: cmd = "rm -f %s" %(name) print ('o.execute_command("%s", "%s")' % (host, cmd)) for line in lines: cmd = 'echo "%s" >> %s' % (line, name) print ('o.execute_command("%s", "%s")' % (host, cmd)) def getIp(name): return "1.2.3.4"#nodes[name]["ip"] # Define all slaves def make_slaves_file(slaves, masters): for host in slaves + masters: print ("\n#slaves on", host) upload_array_as_file(host, "/root/hadoop-2.7.6/etc/hadoop/slaves", slaves, True) # Define all masters def make_masters_file(masters): for host in masters: print ("\n#masters on", host) upload_array_as_file(host, "/root/hadoop-2.7.6/etc/hadoop/masters", masters, True) # Build /etc/hosts def makeHostsFile(nodes): hosts_file = ["127.0.0.1\tlocalhost localhost.locadomain"] for node in nodes: hosts_file.append("%s\t%s" % (getIp(node), node)) for node in nodes: upload_array_as_file(node, "/etc/hosts", hosts_file, False) print() # ============================================================================ print('o = distem("%s", "%s", "%s")' % (login, password, subnet)) # build cores for seq in range(1, int((k/2)**2)+1): corename = coreName(seq) addSwitch(corename) print ("") # Create Pods for pod in range(1, k+1): print ("\n#Pod %d" % (pod)) # Create aggregation switches for aggr in range (1, k2 + 1): aggrname = aggrName(pod, aggr) addSwitch(aggrname) # Connect it to the core switches for i in range(1, k2+1): coreid = (i-1) * k2 + aggr corename = coreName(coreid) addLink(aggrname, corename) print() print() # Create edge switches for edge in range(1, k2 + 1): edgename = edgeName(pod, edge) addSwitch(edgename) # Connect it to the aggregation switches for aggr in range(1, k2 + 1): addLink(edgename, aggrName(pod, aggr)) # Create hosts print ("") for host in range(1, k2 + 1): hostname = hostName(pod, edge, host) role = "hadoop-slave" if host == 1 and pod == 1 and edge == 1: role = "hadoop-master" masters.append(hostname) else: slaves.append(hostname) addNode(hostname, role=role) # Connect it to the edge switch addLink(hostname, edgename) print() # Let's deploy print ("\n# Deploy the experiment") print('o.reserve("%s", walltime="%s")' % (location, walltime )) print("o.deploy()") print () # Create and upload /etc/hosts print ("\n# Upload /etc/hosts") makeHostsFile(nodes=masters+slaves) # Setup the slaves file print ("\n# Upload etc/hadoop/slaves") make_slaves_file(slaves=slaves, masters=masters) # Setup the masters file print ("\n# Upload etc/hadoop/masters") make_masters_file(masters=masters)
k = 4 login = 'login' password = 'password' subnet = '10.0.0.0/8' location = 'nancy' walltime = '1:00' images = {'ovs': 'file:///home/dsaucez/distem-fs-jessie-ovs.tar.gz', 'hadoop-slave': 'file:///home/dsaucez/slave.tgz', 'hadoop-master': 'file:///home/dsaucez/master.tgz'} masters = list() slaves = list() k2 = int(k / 2) def core_name(seq): return 'Core-%d' % seq def aggr_name(pod, seq): return 'Aggr-%d-%d' % (pod, seq) def edge_name(pod, seq): return 'Edge-%d-%d' % (pod, seq) def host_name(pod, edge, seq): return 'Host-%d-%d-%d' % (pod, edge, seq) def add_switch(name): image = images['ovs'] print('o.add_switch("%s", image="%s")' % (name, image)) def add_node(name, role): image = images[role] print('o.add_node("%s", image="%s")' % (name, image)) def add_link(a, b): print('o.add_link("%s", "%s")' % (a, b)) def upload_array_as_file(host, name, lines, clean=False): if clean: cmd = 'rm -f %s' % name print('o.execute_command("%s", "%s")' % (host, cmd)) for line in lines: cmd = 'echo "%s" >> %s' % (line, name) print('o.execute_command("%s", "%s")' % (host, cmd)) def get_ip(name): return '1.2.3.4' def make_slaves_file(slaves, masters): for host in slaves + masters: print('\n#slaves on', host) upload_array_as_file(host, '/root/hadoop-2.7.6/etc/hadoop/slaves', slaves, True) def make_masters_file(masters): for host in masters: print('\n#masters on', host) upload_array_as_file(host, '/root/hadoop-2.7.6/etc/hadoop/masters', masters, True) def make_hosts_file(nodes): hosts_file = ['127.0.0.1\tlocalhost localhost.locadomain'] for node in nodes: hosts_file.append('%s\t%s' % (get_ip(node), node)) for node in nodes: upload_array_as_file(node, '/etc/hosts', hosts_file, False) print() print('o = distem("%s", "%s", "%s")' % (login, password, subnet)) for seq in range(1, int((k / 2) ** 2) + 1): corename = core_name(seq) add_switch(corename) print('') for pod in range(1, k + 1): print('\n#Pod %d' % pod) for aggr in range(1, k2 + 1): aggrname = aggr_name(pod, aggr) add_switch(aggrname) for i in range(1, k2 + 1): coreid = (i - 1) * k2 + aggr corename = core_name(coreid) add_link(aggrname, corename) print() print() for edge in range(1, k2 + 1): edgename = edge_name(pod, edge) add_switch(edgename) for aggr in range(1, k2 + 1): add_link(edgename, aggr_name(pod, aggr)) print('') for host in range(1, k2 + 1): hostname = host_name(pod, edge, host) role = 'hadoop-slave' if host == 1 and pod == 1 and (edge == 1): role = 'hadoop-master' masters.append(hostname) else: slaves.append(hostname) add_node(hostname, role=role) add_link(hostname, edgename) print() print('\n# Deploy the experiment') print('o.reserve("%s", walltime="%s")' % (location, walltime)) print('o.deploy()') print() print('\n# Upload /etc/hosts') make_hosts_file(nodes=masters + slaves) print('\n# Upload etc/hadoop/slaves') make_slaves_file(slaves=slaves, masters=masters) print('\n# Upload etc/hadoop/masters') make_masters_file(masters=masters)
class FixedWidthRecord(object): fields = () LEFT = 'ljust' RIGHT = 'rjust' encoding = 'utf-8' lineterminator = '\r\n' def __init__(self): self.data = {} def __setitem__(self, key, value): self.data[key] = value def __getitem__(self, key): return self.data[key] def __str__(self): result = '' for config in self.fields: name, length, fill, direction = self._expand_config(config) value = unicode(self.data.get(name, '')) value = value[:length] method = getattr(value, direction) result += method(length, fill) result += self.lineterminator return result.encode(self.encoding) @classmethod def _expand_config(cls, config): name = config[0] length = config[1] try: fill = config[2] except IndexError: fill = ' ' try: direction = config[3] except IndexError: direction = cls.RIGHT return name, length, fill, direction @classmethod def parse_file(cls, file): config = [cls._expand_config(x) for x in cls.fields] result = [] for line in file: result.append(cls.parse(line, config)) return result @classmethod def parse(cls, line, config=None): assert line.endswith(cls.lineterminator) line = line.decode(cls.encoding) line = line.replace(cls.lineterminator, '', 1) record = cls() if config is None: config = [cls._expand_config(x) for x in cls.fields] for name, length, fill, direction in config: direction = direction.replace('just', 'strip') value = line[:length] method = getattr(cls, direction) record.data[name] = method(value, fill) line = line[length:] return record @staticmethod def lstrip(value, fill): return value.rstrip(fill) @staticmethod def rstrip(value, fill): return value.lstrip(fill)
class Fixedwidthrecord(object): fields = () left = 'ljust' right = 'rjust' encoding = 'utf-8' lineterminator = '\r\n' def __init__(self): self.data = {} def __setitem__(self, key, value): self.data[key] = value def __getitem__(self, key): return self.data[key] def __str__(self): result = '' for config in self.fields: (name, length, fill, direction) = self._expand_config(config) value = unicode(self.data.get(name, '')) value = value[:length] method = getattr(value, direction) result += method(length, fill) result += self.lineterminator return result.encode(self.encoding) @classmethod def _expand_config(cls, config): name = config[0] length = config[1] try: fill = config[2] except IndexError: fill = ' ' try: direction = config[3] except IndexError: direction = cls.RIGHT return (name, length, fill, direction) @classmethod def parse_file(cls, file): config = [cls._expand_config(x) for x in cls.fields] result = [] for line in file: result.append(cls.parse(line, config)) return result @classmethod def parse(cls, line, config=None): assert line.endswith(cls.lineterminator) line = line.decode(cls.encoding) line = line.replace(cls.lineterminator, '', 1) record = cls() if config is None: config = [cls._expand_config(x) for x in cls.fields] for (name, length, fill, direction) in config: direction = direction.replace('just', 'strip') value = line[:length] method = getattr(cls, direction) record.data[name] = method(value, fill) line = line[length:] return record @staticmethod def lstrip(value, fill): return value.rstrip(fill) @staticmethod def rstrip(value, fill): return value.lstrip(fill)
month = input() nights = int(input()) total_price_apartment = 0 total_price_studio = 0 discount_studio = 0 discount_apartment = 0 if month == 'May' or month == 'October': total_price_studio = nights * 50 total_price_apartment = nights * 65 if nights > 14: discount_studio = 0.30 elif nights > 7: discount_studio = 0.05 elif month == 'June' or month == 'September': total_price_studio = nights * 75.2 total_price_apartment = nights * 68.7 if nights > 14: discount_studio = 0.2 elif month == 'July' or month == 'August': total_price_studio = nights * 76 total_price_apartment = nights * 77 if nights > 14: discount_apartment = 0.1 total_price_studio = total_price_studio - (total_price_studio * discount_studio) total_price_apartment = total_price_apartment - (total_price_apartment * discount_apartment) print(f"Apartment: {total_price_apartment:.2f} lv.") print(f"Studio: {total_price_studio:.2f} lv.")
month = input() nights = int(input()) total_price_apartment = 0 total_price_studio = 0 discount_studio = 0 discount_apartment = 0 if month == 'May' or month == 'October': total_price_studio = nights * 50 total_price_apartment = nights * 65 if nights > 14: discount_studio = 0.3 elif nights > 7: discount_studio = 0.05 elif month == 'June' or month == 'September': total_price_studio = nights * 75.2 total_price_apartment = nights * 68.7 if nights > 14: discount_studio = 0.2 elif month == 'July' or month == 'August': total_price_studio = nights * 76 total_price_apartment = nights * 77 if nights > 14: discount_apartment = 0.1 total_price_studio = total_price_studio - total_price_studio * discount_studio total_price_apartment = total_price_apartment - total_price_apartment * discount_apartment print(f'Apartment: {total_price_apartment:.2f} lv.') print(f'Studio: {total_price_studio:.2f} lv.')
price_history_2015="$413,268 $371,473 $336,311 $239,010 $227,809 $398,996 $403,729 $353,405 $220,980 $203,186 $459,297 $461,085 $1,078,036 $551,382 $503,344 $364,826 $399,342 $430,636 $644,972 $554,170 $275,601 $849,539 $396,181 $410,221 $381,013 $272,015 $457,796 $472,744 $229,586 $217,508 $287,573 $284,288 $266,932 $223,534 $273,988 $195,500 $211,738" price_history_2016="$439,648 $438,538 $391,078 $308,862 $261,944 $438,473 $456,983 $384,248 $303,172 $233,132 $487,963 $501,458 $955,023 $609,719 $533,115 $378,942 $439,497 $483,833 $667,246 $533,638 $314,875 $856,814 $372,426 $435,610 $393,582 $307,949 $536,336 $521,210 $266,057 $246,844 $341,592 $294,003 $302,657 $275,024 $302,408 $183,929 $231,798" price_history_2017="$523,992 $539,020 $466,527 $365,449 $282,638 $516,201 $535,188 $443,103 $326,041 $305,194 $603,524 $614,867 $1,004,927 $665,622 $709,867 $438,652 $568,002 $597,910 $977,375 $638,565 $403,536 $1,382,429 $429,959 $533,156 $475,790 $392,071 $628,122 $609,705 $326,371 $331,098 $416,961 $468,983 $381,355 $324,884 $387,423 $225,500 $317,545" price_history_2018="$583,007 $643,642 $486,300 $413,764 $342,793 $595,349 $519,710 $501,311 $392,586 $331,714 $667,328 $684,002 $1,146,225 $760,806 $762,995 $470,152 $558,430 $673,248 $1,265,141 $704,492 $442,576 $975,553 $522,466 $567,718 $528,943 $413,818 $688,117 $556,879 $374,662 $358,357 $434,249 $500,357 $400,839 $373,187 $411,051 $274,929 $351,553" price_history_2019="$693,186 $668,225 $522,132 $456,438 $407,395 $615,858 $782,350 $545,753 $429,451 $387,794 $699,362 $713,678 $1,193,506 $961,755 $749,073 $540,111 $617,363 $712,111 $1,107,117 $706,420 $456,621 $910,883 $576,679 $627,852 $548,236 $459,159 $780,758 $660,538 $450,524 $404,360 $460,422 $577,957 $429,925 $415,568 $448,522 $325,223 $372,163" print("2015") print(price_history_2015.replace(" ","\n")) print("2016") print(price_history_2016.replace(" ","\n")) print("2017") print(price_history_2017.replace(" ","\n")) print("2018") print(price_history_2018.replace(" ","\n")) print("2019") print(price_history_2019.replace(" ","\n"))
price_history_2015 = '$413,268 $371,473 $336,311 $239,010 $227,809 $398,996 $403,729 $353,405 $220,980 $203,186 $459,297 $461,085 $1,078,036 $551,382 $503,344 $364,826 $399,342 $430,636 $644,972 $554,170 $275,601 $849,539 $396,181 $410,221 $381,013 $272,015 $457,796 $472,744 $229,586 $217,508 $287,573 $284,288 $266,932 $223,534 $273,988 $195,500 $211,738' price_history_2016 = '$439,648 $438,538 $391,078 $308,862 $261,944 $438,473 $456,983 $384,248 $303,172 $233,132 $487,963 $501,458 $955,023 $609,719 $533,115 $378,942 $439,497 $483,833 $667,246 $533,638 $314,875 $856,814 $372,426 $435,610 $393,582 $307,949 $536,336 $521,210 $266,057 $246,844 $341,592 $294,003 $302,657 $275,024 $302,408 $183,929 $231,798' price_history_2017 = '$523,992 $539,020 $466,527 $365,449 $282,638 $516,201 $535,188 $443,103 $326,041 $305,194 $603,524 $614,867 $1,004,927 $665,622 $709,867 $438,652 $568,002 $597,910 $977,375 $638,565 $403,536 $1,382,429 $429,959 $533,156 $475,790 $392,071 $628,122 $609,705 $326,371 $331,098 $416,961 $468,983 $381,355 $324,884 $387,423 $225,500 $317,545' price_history_2018 = '$583,007 $643,642 $486,300 $413,764 $342,793 $595,349 $519,710 $501,311 $392,586 $331,714 $667,328 $684,002 $1,146,225 $760,806 $762,995 $470,152 $558,430 $673,248 $1,265,141 $704,492 $442,576 $975,553 $522,466 $567,718 $528,943 $413,818 $688,117 $556,879 $374,662 $358,357 $434,249 $500,357 $400,839 $373,187 $411,051 $274,929 $351,553' price_history_2019 = '$693,186 $668,225 $522,132 $456,438 $407,395 $615,858 $782,350 $545,753 $429,451 $387,794 $699,362 $713,678 $1,193,506 $961,755 $749,073 $540,111 $617,363 $712,111 $1,107,117 $706,420 $456,621 $910,883 $576,679 $627,852 $548,236 $459,159 $780,758 $660,538 $450,524 $404,360 $460,422 $577,957 $429,925 $415,568 $448,522 $325,223 $372,163' print('2015') print(price_history_2015.replace(' ', '\n')) print('2016') print(price_history_2016.replace(' ', '\n')) print('2017') print(price_history_2017.replace(' ', '\n')) print('2018') print(price_history_2018.replace(' ', '\n')) print('2019') print(price_history_2019.replace(' ', '\n'))
def main(): n = int(input()) a = list(map(int, input().split())) minValue = 10 ** 9 maxValue = - (10 ** 9) for i in range(n): if a[i] > maxValue: maxValue = a[i] if a[i] < minValue: minValue = a[i] print(maxValue - minValue) if __name__=="__main__": main()
def main(): n = int(input()) a = list(map(int, input().split())) min_value = 10 ** 9 max_value = -10 ** 9 for i in range(n): if a[i] > maxValue: max_value = a[i] if a[i] < minValue: min_value = a[i] print(maxValue - minValue) if __name__ == '__main__': main()
""" URL: https://codeforces.com/problemset/problem/136/A Author: Safiul Kabir [safiulanik at gmail.com] """ n = int(input()) inp = list(map(int, input().split())) outp = [0] * n for i in range(n): outp[inp[i] - 1] = i + 1 print(' '.join(map(str, outp)))
""" URL: https://codeforces.com/problemset/problem/136/A Author: Safiul Kabir [safiulanik at gmail.com] """ n = int(input()) inp = list(map(int, input().split())) outp = [0] * n for i in range(n): outp[inp[i] - 1] = i + 1 print(' '.join(map(str, outp)))
# WEIGHING THE STONES for _ in range(int(input())): N = int(input()) DictR = {} DictA = {} Rupam = [int(a) for a in input().split()] Ankit = [int(a) for a in input().split()] for i in range(N): DictR[Rupam[i]] = Rupam.count(Rupam[i]) DictA[Ankit[i]] = Ankit.count(Ankit[i]) #print(DictR) #print(DictA) maxr = r = 0 maxa = a = 0 for key,value in DictR.items(): if maxr==value: if key>r: r=key if maxr<value: maxr=value r=key #print(r,maxr) for key,value in DictA.items(): if maxa==value: if key>a: a=key if maxa<value: maxa=value a=key #print(a,maxa) if a>r: print("Ankit") elif r>a: print("Rupam") else: print("Tie")
for _ in range(int(input())): n = int(input()) dict_r = {} dict_a = {} rupam = [int(a) for a in input().split()] ankit = [int(a) for a in input().split()] for i in range(N): DictR[Rupam[i]] = Rupam.count(Rupam[i]) DictA[Ankit[i]] = Ankit.count(Ankit[i]) maxr = r = 0 maxa = a = 0 for (key, value) in DictR.items(): if maxr == value: if key > r: r = key if maxr < value: maxr = value r = key for (key, value) in DictA.items(): if maxa == value: if key > a: a = key if maxa < value: maxa = value a = key if a > r: print('Ankit') elif r > a: print('Rupam') else: print('Tie')
def formatacao_real(numero: float) -> str: return f"R${numero:,.2f}"
def formatacao_real(numero: float) -> str: return f'R${numero:,.2f}'
class NullMailerErrorPool(Exception): pass class NullMailerErrorPipe(Exception): pass class NullMailerErrorQueue(Exception): pass class RabbitMQError(Exception): pass
class Nullmailererrorpool(Exception): pass class Nullmailererrorpipe(Exception): pass class Nullmailererrorqueue(Exception): pass class Rabbitmqerror(Exception): pass
class State: def __init__(self, charge, time_of_day, day_of_year, rounds_remaining, cost): self.battery = Battery(charge) self.time_of_day = time_of_day self.day_of_year = day_of_year self.rounds_remaining = rounds_remaining self.cost = cost class Battery: def __init__(self, charge): self.capacity = 13500 self.charge = charge self.rate = 5000
class State: def __init__(self, charge, time_of_day, day_of_year, rounds_remaining, cost): self.battery = battery(charge) self.time_of_day = time_of_day self.day_of_year = day_of_year self.rounds_remaining = rounds_remaining self.cost = cost class Battery: def __init__(self, charge): self.capacity = 13500 self.charge = charge self.rate = 5000
def encontra_impares(lista): x = [] if len(lista) > 0: n = lista.pop(0) if n % 2 != 0: x.append(n) x = x + encontra_impares(lista) return x if __name__=='__main__': print (encontra_impares([1,2,3,4,5,5]))
def encontra_impares(lista): x = [] if len(lista) > 0: n = lista.pop(0) if n % 2 != 0: x.append(n) x = x + encontra_impares(lista) return x if __name__ == '__main__': print(encontra_impares([1, 2, 3, 4, 5, 5]))
"""1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. """ class Solution: def twoSum1(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ result = [] for i in range(len(nums)): sub = target - nums[i] part = nums[i + 1:] if sub in part: result = [i, part.index(sub) + len(nums[: i + 1])] break return result def twoSum2(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ result = [] d = {} for i in range(len(nums)): x = nums[i] sub = target - x if sub in d: result = [d[sub], i] break d[x] = i return result
"""1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. """ class Solution: def two_sum1(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ result = [] for i in range(len(nums)): sub = target - nums[i] part = nums[i + 1:] if sub in part: result = [i, part.index(sub) + len(nums[:i + 1])] break return result def two_sum2(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ result = [] d = {} for i in range(len(nums)): x = nums[i] sub = target - x if sub in d: result = [d[sub], i] break d[x] = i return result