content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
S = str(input()) if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]: print("Bad") else: print("Good")
s = str(input()) if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]: print('Bad') else: print('Good')
def main(): squareSum = 0 #(1 + 2)^2 square of the sums sumSquare = 0 #1^2 + 2^2 sum of the squares for i in range(1, 101): sumSquare += i ** 2 squareSum += i squareSum = squareSum ** 2 print(str(squareSum - sumSquare)) if __name__ == '__main__': main()
def main(): square_sum = 0 sum_square = 0 for i in range(1, 101): sum_square += i ** 2 square_sum += i square_sum = squareSum ** 2 print(str(squareSum - sumSquare)) if __name__ == '__main__': main()
def find_space(board): for i in range(0,9): for j in range(0,9): if board[i][j]==0: return (i,j) return None def check(board,num,r,c): for i in range(0,9): if board[r][i]==num and c!=i: return False for i in range(0,9): if board[...
def find_space(board): for i in range(0, 9): for j in range(0, 9): if board[i][j] == 0: return (i, j) return None def check(board, num, r, c): for i in range(0, 9): if board[r][i] == num and c != i: return False for i in range(0, 9): if bo...
# A simple list myList = [10,20,4,5,6,2,9,10,2,3,34,14] #print the whole list print("The List is {}".format(myList)) # printing elemts of the list one by one print("printing elemts of the list one by one") for elements in myList: print(elements) print("") #printing elements that are greater than 10 only prin...
my_list = [10, 20, 4, 5, 6, 2, 9, 10, 2, 3, 34, 14] print('The List is {}'.format(myList)) print('printing elemts of the list one by one') for elements in myList: print(elements) print('') print('printing elements that are greater than 10 only') for elements in myList: if elements > 10: print(elements) ...
#!/usr/bin/env python # encoding: utf-8 ''' @author: yuxiqian @license: MIT @contact: akaza_akari@sjtu.edu.cn @software: electsys-api @file: electsysApi/shared/exception.py @time: 2019/1/9 ''' class RequestError(BaseException): pass class ParseError(BaseException): pass class ParseWarning(Warning): pa...
""" @author: yuxiqian @license: MIT @contact: akaza_akari@sjtu.edu.cn @software: electsys-api @file: electsysApi/shared/exception.py @time: 2019/1/9 """ class Requesterror(BaseException): pass class Parseerror(BaseException): pass class Parsewarning(Warning): pass
def extractKaedesan721TumblrCom(item): ''' Parser for 'kaedesan721.tumblr.com' ''' bad_tags = [ 'FanArt', "htr asks", 'Spanish translations', 'htr anime','my thoughts', 'Cats', 'answered', 'ask meme', 'relay convos', 'translation related post', 'nightmare fuel', '...
def extract_kaedesan721_tumblr_com(item): """ Parser for 'kaedesan721.tumblr.com' """ bad_tags = ['FanArt', 'htr asks', 'Spanish translations', 'htr anime', 'my thoughts', 'Cats', 'answered', 'ask meme', 'relay convos', 'translation related post', 'nightmare fuel', 'htr manga', 'memes', 'htrweek', 'Video Game...
#!/usr/bin/python3 # --- 001 > U5W2P1_Task3_w1 def solution(i): return float(i) if __name__ == "__main__": print('----------start------------') i = 12 print(solution( i )) print('------------end------------')
def solution(i): return float(i) if __name__ == '__main__': print('----------start------------') i = 12 print(solution(i)) print('------------end------------')
n = int(input()) intz = [int(x) for x in input().split()] alice = 0 bob = 0 for i, num in zip(range(n), sorted(intz)[::-1]): if i%2 == 0: alice += num else: bob += num print(alice, bob)
n = int(input()) intz = [int(x) for x in input().split()] alice = 0 bob = 0 for (i, num) in zip(range(n), sorted(intz)[::-1]): if i % 2 == 0: alice += num else: bob += num print(alice, bob)
class Test: def __init__(self): pass def hi(self): print("hello world")
class Test: def __init__(self): pass def hi(self): print('hello world')
def rec_sum(n): if(n<=1): return n else: return(n+rec_sum(n-1))
def rec_sum(n): if n <= 1: return n else: return n + rec_sum(n - 1)
# # PySNMP MIB module HPN-ICF-VOICE-IF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-VOICE-IF-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:41:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, constraints_union, constraints_intersection, value_range_constraint) ...
gScore = 0 #use this to index g(n) fScore = 1 #use this to index f(n) previous = 2 #use this to index previous node inf = 10000 #use this for value of infinity #we represent the graph usind adjacent list #as dictionary of dictionaries G = { 'biratnagar' : {'itahari' : 22, 'biratchowk' : 30, 'rangeli': 2...
g_score = 0 f_score = 1 previous = 2 inf = 10000 g = {'biratnagar': {'itahari': 22, 'biratchowk': 30, 'rangeli': 25}, 'itahari': {'biratnagar': 22, 'dharan': 20, 'biratchowk': 11}, 'dharan': {'itahari': 20}, 'biratchowk': {'biratnagar': 30, 'itahari': 11, 'kanepokhari': 10}, 'rangeli': {'biratnagar': 25, 'kanepokhari':...
t=int(input("")) while (t>0): n=int(input("")) f=1 for i in range(1,n+1): f=f*i print(f) t=t-1
t = int(input('')) while t > 0: n = int(input('')) f = 1 for i in range(1, n + 1): f = f * i print(f) t = t - 1
#Area of a rectangle = width x length #Perimeter of a rectangle = 2 x [length + width# width_input = float (input("\nPlease enter width: ")) length_input = float (input("Please enter length: ")) areaofRectangle = width_input * length_input perimeterofRectangle = 2 * (width_input * length_input) print ("\n...
width_input = float(input('\nPlease enter width: ')) length_input = float(input('Please enter length: ')) areaof_rectangle = width_input * length_input perimeterof_rectangle = 2 * (width_input * length_input) print('\nArea of Rectangle is: ', areaofRectangle, 'CM') print('\nPerimeter of Rectangle is: ', perimeterofRect...
class DNASuitEdge: COMPONENT_CODE = 22 def __init__(self, startPoint, endPoint, zoneId): self.startPoint = startPoint self.endPoint = endPoint self.zoneId = zoneId def setStartPoint(self, startPoint): self.startPoint = startPoint def setEndPoint(self, endPoint): ...
class Dnasuitedge: component_code = 22 def __init__(self, startPoint, endPoint, zoneId): self.startPoint = startPoint self.endPoint = endPoint self.zoneId = zoneId def set_start_point(self, startPoint): self.startPoint = startPoint def set_end_point(self, endPoint): ...
# This just shifts 1 to i th BIT def BIT(i: int) -> int: return int(1 << i) # This class is equvalent to a C++ enum class EventType: Null, \ WindowClose, WindowResize, WindowFocus, WindowMoved, \ AppTick, AppUpdate, Ap...
def bit(i: int) -> int: return int(1 << i) class Eventtype: (null, window_close, window_resize, window_focus, window_moved, app_tick, app_update, app_render, key_pressed, key_released, char_input, mouse_button_pressed, mouse_button_released, mouse_moved, mouse_scrolled) = range(0, 15) class Eventcategory: ...
class Users: usernamep = 'your_user_email' passwordp = 'your_password' linkp = 'https://www.instagram.com/stories/cznburak/'
class Users: usernamep = 'your_user_email' passwordp = 'your_password' linkp = 'https://www.instagram.com/stories/cznburak/'
INSTANCES = 405 ITERS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 50, 100] N_ITERS = len(ITERS) # === RESULTS GATHERING ====================================================== # # results_m is a [INSTANCES][N_ITERS] matrix to store every test result results_m = [[0 for x in range(...
instances = 405 iters = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 50, 100] n_iters = len(ITERS) results_m = [[0 for x in range(N_ITERS)] for y in range(INSTANCES)] for i in range(N_ITERS): fin = open('tests/' + str(ITERS[I])) out = fin.read() fin.close() counter = 0 ...
# # PySNMP MIB module SW-VLAN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SW-VLAN-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:12:44 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, 0...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_union, constraints_intersection, single_value_constraint) ...
class DFA: current_state = None current_letter = None valid = True def __init__( self, name, alphabet, states, delta_function, start_state, final_states ): self.name = name self.alphabet = alphabet self.states = states self.delta_function = delta_function ...
class Dfa: current_state = None current_letter = None valid = True def __init__(self, name, alphabet, states, delta_function, start_state, final_states): self.name = name self.alphabet = alphabet self.states = states self.delta_function = delta_function self.star...
class LambdaError(Exception): def __init__(self, description): self.description = description class BadRequestError(LambdaError): pass class ForbiddenError(LambdaError): pass class InternalServerError(LambdaError): pass class NotFoundError(LambdaError): pass class ValidationError(L...
class Lambdaerror(Exception): def __init__(self, description): self.description = description class Badrequesterror(LambdaError): pass class Forbiddenerror(LambdaError): pass class Internalservererror(LambdaError): pass class Notfounderror(LambdaError): pass class Validationerror(Lambd...
pkgname = "xrandr" pkgver = "1.5.1" pkgrel = 0 build_style = "gnu_configure" hostmakedepends = ["pkgconf"] makedepends = ["libxrandr-devel"] pkgdesc = "Command line interface to X RandR extension" maintainer = "q66 <q66@chimera-linux.org>" license = "MIT" url = "https://xorg.freedesktop.org" source = f"$(XORG_SITE)/app...
pkgname = 'xrandr' pkgver = '1.5.1' pkgrel = 0 build_style = 'gnu_configure' hostmakedepends = ['pkgconf'] makedepends = ['libxrandr-devel'] pkgdesc = 'Command line interface to X RandR extension' maintainer = 'q66 <q66@chimera-linux.org>' license = 'MIT' url = 'https://xorg.freedesktop.org' source = f'$(XORG_SITE)/app...
# Validate input while True: print('Enter your age:') age = input() if age.isdecimal(): break print('Pleas enter a number for your age.')
while True: print('Enter your age:') age = input() if age.isdecimal(): break print('Pleas enter a number for your age.')
# # PySNMP MIB module Fore-Common-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Fore-Common-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:14:34 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27...
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, single_value_constraint, constraints_intersection, value_size_constraint) ...
class Page(object): def __init__(self, params): self.size = 2 ** 10 self.Time = False self.R = False self.M = False
class Page(object): def __init__(self, params): self.size = 2 ** 10 self.Time = False self.R = False self.M = False
ftxus = { 'api_key':'YOUR_API_KEY', 'api_secret':'YOUR_API_SECRET' }
ftxus = {'api_key': 'YOUR_API_KEY', 'api_secret': 'YOUR_API_SECRET'}
a = [1, 2, 3, 4] def subset(a, n): if n == 1: return n else: return (subset(a[n - 1]), subset(a[n - 2])) print(subset(a, n=4))
a = [1, 2, 3, 4] def subset(a, n): if n == 1: return n else: return (subset(a[n - 1]), subset(a[n - 2])) print(subset(a, n=4))
def print_formatted(number): # your code goes here for i in range(1, number +1): width = len(f"{number:b}") print(f"{i:{width}} {i:{width}o} {i:{width}X} {i:{width}b}")
def print_formatted(number): for i in range(1, number + 1): width = len(f'{number:b}') print(f'{i:{width}} {i:{width}o} {i:{width}X} {i:{width}b}')
class Solution: def coinChange(self, coins: List[int], amount: int) -> int: dp = [inf] * (amount + 1) dp[0] = 0 for coin in coins: for x in range(coin, amount + 1): dp[x] = min(dp[x], dp[x - coin] + 1) return dp[amount] if dp[amount] != inf else -1
class Solution: def coin_change(self, coins: List[int], amount: int) -> int: dp = [inf] * (amount + 1) dp[0] = 0 for coin in coins: for x in range(coin, amount + 1): dp[x] = min(dp[x], dp[x - coin] + 1) return dp[amount] if dp[amount] != inf else -1
# # PySNMP MIB module Intel-Common-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Intel-Common-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:54:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, constraints_intersection, value_range_constraint, value_size_constraint, single_value_constraint) ...
name = input() class_school = 1 sum_of_grades = 0 ejected = False failed = 0 while True: grade = float(input()) if grade >= 4.00: sum_of_grades += grade if class_school == 12: break class_school += 1 else: failed += 1 if failed == 2: ejected ...
name = input() class_school = 1 sum_of_grades = 0 ejected = False failed = 0 while True: grade = float(input()) if grade >= 4.0: sum_of_grades += grade if class_school == 12: break class_school += 1 else: failed += 1 if failed == 2: ejected = T...
class Solution: def minSwapsCouples(self, row: List[int]) -> int: parent=[i for i in range(len(row))] for i in range(1,len(row),2): parent[i]-=1 def findpath(u,parent): if parent[u]!=u: parent[u]=findpath(parent[u],parent) ...
class Solution: def min_swaps_couples(self, row: List[int]) -> int: parent = [i for i in range(len(row))] for i in range(1, len(row), 2): parent[i] -= 1 def findpath(u, parent): if parent[u] != u: parent[u] = findpath(parent[u], parent) r...
class Token: def __init__(self, type=None, value=None): self.type = type self.value = value def __str__(self): return "Token({0}, {1})".format(self.type, self.value)
class Token: def __init__(self, type=None, value=None): self.type = type self.value = value def __str__(self): return 'Token({0}, {1})'.format(self.type, self.value)
def not_found_handler(): return '404. Path not found' def internal_error_handler(): return '500. Internal error'
def not_found_handler(): return '404. Path not found' def internal_error_handler(): return '500. Internal error'
def transform_file(infile,outfile,templates): with open(infile,'r') as fh: indata = fh.read() lines = indata.split('\n') outlines = [] for line in lines: if '//ATL_BEGIN' in line: start = line.find('//ATL_BEGIN') spacing = line[:start] s...
def transform_file(infile, outfile, templates): with open(infile, 'r') as fh: indata = fh.read() lines = indata.split('\n') outlines = [] for line in lines: if '//ATL_BEGIN' in line: start = line.find('//ATL_BEGIN') spacing = line[:start] start = line....
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # 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 require...
task_type = '' header = [] header_defaults = [] input_numeric_feature_names = [] constructed_numeric_feature_names = [] input_categorical_feature_names_with_identity = {} constructed_categorical_feature_names_with_identity = {} input_categorical_feature_names_with_vocabulary = {} input_categorical_feature_names_with_ha...
# # # This is Support for Drawing Bullet Charts # # # # # # # ''' This is the return json value to the javascript front end { "canvasName":"canvas1","featuredColor":"Green", "featuredMeasure":14.5, "qualScale1":14.5, "qualScale1Color":"Black","titleText":"Step 1" }, ...
""" This is the return json value to the javascript front end { "canvasName":"canvas1","featuredColor":"Green", "featuredMeasure":14.5, "qualScale1":14.5, "qualScale1Color":"Black","titleText":"Step 1" }, { "canvasName":"can...
declerations_test_text_001 = ''' list1 = [ 1, ] ''' declerations_test_text_002 = ''' list1 = [ 1, 2, ] ''' declerations_test_text_003 = ''' tuple1 = ( 1, ) ''' declerations_test_text_004 = ''' tuple1 = ( 1, 2, ) ''' declerations_test_text_005 = ''' set1 = { 1, } ''' declerations_test_text_00...
declerations_test_text_001 = '\nlist1 = [\n 1,\n]\n' declerations_test_text_002 = '\nlist1 = [\n 1,\n 2,\n]\n' declerations_test_text_003 = '\ntuple1 = (\n 1,\n)\n' declerations_test_text_004 = '\ntuple1 = (\n 1,\n 2,\n)\n' declerations_test_text_005 = '\nset1 = {\n 1,\n}\n' declerations_test_text_...
file_berita = open("berita.txt", "r") berita = file_berita.read() berita = berita.split() berita = [x.lower() for x in berita] berita = list(set(berita)) berita = sorted(berita) print (berita)
file_berita = open('berita.txt', 'r') berita = file_berita.read() berita = berita.split() berita = [x.lower() for x in berita] berita = list(set(berita)) berita = sorted(berita) print(berita)
rzymskie={'I':1,'II':2,'III':3,'IV':4,'V':5,'VI':6,'VII':7,'VIII':8} print(rzymskie) print('Jeden element slownika: \n') print(rzymskie['I'])
rzymskie = {'I': 1, 'II': 2, 'III': 3, 'IV': 4, 'V': 5, 'VI': 6, 'VII': 7, 'VIII': 8} print(rzymskie) print('Jeden element slownika: \n') print(rzymskie['I'])
H, W = map(int, input().split()) A = [input() for _ in range(H)] if H + W - 1 == sum(a.count('#') for a in A): print('Possible') else: print('Impossible')
(h, w) = map(int, input().split()) a = [input() for _ in range(H)] if H + W - 1 == sum((a.count('#') for a in A)): print('Possible') else: print('Impossible')
# File: etl.py # Purpose: To do the `Transform` step of an Extract-Transform-Load. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 22 September 2016, 03:40 PM def transform(words): new_words = dict() for point, letters in words.items(): for letter in letters: ...
def transform(words): new_words = dict() for (point, letters) in words.items(): for letter in letters: new_words[letter.lower()] = point return new_words
def have(subj, obj): subj.add(obj) def change(subj, obj, state): pass if __name__ == '__main__': main()
def have(subj, obj): subj.add(obj) def change(subj, obj, state): pass if __name__ == '__main__': main()
# A bot that picks the first action from the list for the first two rounds, # and then exists with an exception. # Used only for tests. game_name = input() play_as = int(input()) print("ready") while True: print("start") num_actions = 0 while True: message = input() if message == "tourname...
game_name = input() play_as = int(input()) print('ready') while True: print('start') num_actions = 0 while True: message = input() if message == 'tournament over': print('tournament over') sys.exit(0) if message.startswith('match over'): print('mat...
''' f we want to add a single element to an existing set, we can use the .add() operation. It adds the element to the set and returns 'None'. Example >>> s = set('HackerRank') >>> s.add('H') >>> print s set(['a', 'c', 'e', 'H', 'k', 'n', 'r', 'R']) >>> print s.add('HackerRank') None >>> print s set(['a', 'c', 'e', '...
""" f we want to add a single element to an existing set, we can use the .add() operation. It adds the element to the set and returns 'None'. Example >>> s = set('HackerRank') >>> s.add('H') >>> print s set(['a', 'c', 'e', 'H', 'k', 'n', 'r', 'R']) >>> print s.add('HackerRank') None >>> print s set(['a', 'c', 'e', '...
class LeagueGame: def __init__(self, data): self.patch = data['patch'] self.win = data['win'] self.side = data['side'] self.opp = data['opp'] self.bans = data['bans'] self.vs_bans = data['vs_bans'] self.picks = data['picks'] self.vs_picks = data['vs_picks'] self.players = data['players'] class Lea...
class Leaguegame: def __init__(self, data): self.patch = data['patch'] self.win = data['win'] self.side = data['side'] self.opp = data['opp'] self.bans = data['bans'] self.vs_bans = data['vs_bans'] self.picks = data['picks'] self.vs_picks = data['vs_p...
text1 = '''ABCDEF GHIJKL MNOPQRS TUVWXYZ ''' text2 = 'ABCDEF\ GHIJKL\ MNOPQRS\ TUVWXYZ' text3 = 'ABCD\'EF\'GHIJKL' text4 = 'ABCDEF\nGHIJKL\nMNOPQRS\nTUVWXYZ' text5 = 'ABCDEF\fGHIJKL\fMNOPQRS\fTUVWXYZ' print(text1) print('-' * 25) print(text2) print('-' * 25) print(text3) print('-' * 25) print(text4) print('-' * 2...
text1 = 'ABCDEF\nGHIJKL\nMNOPQRS\nTUVWXYZ\n' text2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' text3 = "ABCD'EF'GHIJKL" text4 = 'ABCDEF\nGHIJKL\nMNOPQRS\nTUVWXYZ' text5 = 'ABCDEF\x0cGHIJKL\x0cMNOPQRS\x0cTUVWXYZ' print(text1) print('-' * 25) print(text2) print('-' * 25) print(text3) print('-' * 25) print(text4) print('-' * 25) print...
# unihernandez22 # https://atcoder.jp/contests/abc166/tasks/abc166_d # math, brute force n = int(input()) for a in range(n): breaked = True for b in range(-1000, 1000): if a**5 - b**5 == n: print(a, b) break; else: breaked = False if breaked: break
n = int(input()) for a in range(n): breaked = True for b in range(-1000, 1000): if a ** 5 - b ** 5 == n: print(a, b) break else: breaked = False if breaked: break
T = int(input()) P = int(input()) controle = 0 #Uso para guardar o valor maior que o limite while P != 0: P = int(input()) if P >= T: controle = 1 #coloquei 1 so pra ser diferente de 0 if controle == 1: print("ALARME") else: print("O Havai pode dormir tranquilo")
t = int(input()) p = int(input()) controle = 0 while P != 0: p = int(input()) if P >= T: controle = 1 if controle == 1: print('ALARME') else: print('O Havai pode dormir tranquilo')
__all__ = [ "aggregation", "association", "composition", "connection", "containment", "dependency", "includes", "membership", "ownership", "responsibility", "usage" ]
__all__ = ['aggregation', 'association', 'composition', 'connection', 'containment', 'dependency', 'includes', 'membership', 'ownership', 'responsibility', 'usage']
class AxisIndex(): #TODO: read this value from config file LEFT_RIGHT=0 FORWARD_BACKWARDS=1 ROTATE=2 UP_DOWN=3 class ButtonIndex(): TRIGGER = 0 SIDE_BUTTON = 1 HOVERING = 2 EXIT = 10 class ThresHold(): SENDING_TIME = 0.5
class Axisindex: left_right = 0 forward_backwards = 1 rotate = 2 up_down = 3 class Buttonindex: trigger = 0 side_button = 1 hovering = 2 exit = 10 class Threshold: sending_time = 0.5
#!/Users/francischen/opt/anaconda3/bin/python #pythons sorts are STABLE: order is the same as original in tie. # sort: key, reverse q = ['two','twelve','One','3'] #sort q, result being a modified list. nothing is returned q.sort() print(q) q = ['two','twelve','One','3',"this has lots of t's"] q.sort(reverse=True) pr...
q = ['two', 'twelve', 'One', '3'] q.sort() print(q) q = ['two', 'twelve', 'One', '3', "this has lots of t's"] q.sort(reverse=True) print(q) def f(x): return x.count('t') q.sort(key=f) print(q) q = ['twelve', 'two', 'One', '3', "this has lots of t's"] q.sort(key=f) print(q) q = ['twelve', 'two', 'One', '3', "this h...
# buildifier: disable=module-docstring load(":native_tools_toolchain.bzl", "access_tool") def get_cmake_data(ctx): return _access_and_expect_label_copied("@rules_foreign_cc//tools/build_defs:cmake_toolchain", ctx, "cmake") def get_ninja_data(ctx): return _access_and_expect_label_copied("@rules_foreign_cc//too...
load(':native_tools_toolchain.bzl', 'access_tool') def get_cmake_data(ctx): return _access_and_expect_label_copied('@rules_foreign_cc//tools/build_defs:cmake_toolchain', ctx, 'cmake') def get_ninja_data(ctx): return _access_and_expect_label_copied('@rules_foreign_cc//tools/build_defs:ninja_toolchain', ctx, 'n...
fname = input("Enter file name: ") if len(fname) < 1 : fname = "mbox-short.txt" list = list() f = open(fname) count = 0 for line in f: line = line.rstrip() list = line.split() if list == []: continue elif list[0].lower() == 'from': count += 1 print(list[1]) print("There w...
fname = input('Enter file name: ') if len(fname) < 1: fname = 'mbox-short.txt' list = list() f = open(fname) count = 0 for line in f: line = line.rstrip() list = line.split() if list == []: continue elif list[0].lower() == 'from': count += 1 print(list[1]) print('There were',...
class FollowupEvent: def __init__(self, name, data=None): self.name = name self.data = data class Response: def __init__(self, text=None, followup_event=None): self.speech = text self.display_text = text self.followup_event = followup_event class UserInput: def _...
class Followupevent: def __init__(self, name, data=None): self.name = name self.data = data class Response: def __init__(self, text=None, followup_event=None): self.speech = text self.display_text = text self.followup_event = followup_event class Userinput: def _...
def test_list_devices(client): devices = client.devices() assert len(devices) > 0 assert any(map(lambda device: device.serial == "emulator-5554", devices)) def test_list_devices_by_state(client): devices = client.devices(client.BOOTLOADER) assert len(devices) == 0 devices = client.devices(clie...
def test_list_devices(client): devices = client.devices() assert len(devices) > 0 assert any(map(lambda device: device.serial == 'emulator-5554', devices)) def test_list_devices_by_state(client): devices = client.devices(client.BOOTLOADER) assert len(devices) == 0 devices = client.devices(clien...
def si(p,r,t): n= (p+r+t)//3 return n
def si(p, r, t): n = (p + r + t) // 3 return n
#!/usr/bin/env python3 # This is gonna be up to you. But basically I envisioned a system where you have a students in a classroom. Where the # classroom only has information, like who is the teacher, how many students are there. And it's like an online class, # so students don't know who their peers are, or who their ...
class Student: def __init__(self, name, laziness=5): self.name = name self.preparedness = 0 self._laziness = laziness def take_test(self, hardness): return 0 def do_homework(self): return 0 def study(self): pass class Teacher: def __init__(self, ...
# https://github.com/ArtemNikolaev/gb-hw/issues/24 def multiple_of_20_21(): return (i for i in range(20, 241) if i % 20 == 0 or i % 21 == 0) print(list(multiple_of_20_21()))
def multiple_of_20_21(): return (i for i in range(20, 241) if i % 20 == 0 or i % 21 == 0) print(list(multiple_of_20_21()))
def cc_resources(name, data): out_inc = name + ".inc" cmd = ('echo "static const struct FileToc kPackedFiles[] = {" > $(@); \n' + "for j in $(SRCS); do\n" + ' echo "{\\"$$(basename "$${j}")\\"," >> $(@);\n' + ' echo "R\\"filecontent($$(< $${j}))filecontent\\"" >> $(@);\n' + ...
def cc_resources(name, data): out_inc = name + '.inc' cmd = 'echo "static const struct FileToc kPackedFiles[] = {" > $(@); \n' + 'for j in $(SRCS); do\n' + ' echo "{\\"$$(basename "$${j}")\\"," >> $(@);\n' + ' echo "R\\"filecontent($$(< $${j}))filecontent\\"" >> $(@);\n' + ' echo "}," >> $(@);\n' + 'done &&\...
class Person: def __init__(self, name, age): self.name = name self.age = age def say_hello(self): print('Hello, my name is {} and I am {} years old'.format(self.name, self.age)) if __name__ == '__main__': person = Person('David', 34) print('Age: {}'.format(person.age)) ...
class Person: def __init__(self, name, age): self.name = name self.age = age def say_hello(self): print('Hello, my name is {} and I am {} years old'.format(self.name, self.age)) if __name__ == '__main__': person = person('David', 34) print('Age: {}'.format(person.age)) pers...
num= int (input("enter number of rows=")) for i in range (1,num+1): for j in range(1,num-i+1): print (" ",end="") for j in range(2 and 9): print("2","9") for i in range(1, 6): for j in range(1, 10): if i==5 or i+j==5 or j-i==4: print("*", end...
num = int(input('enter number of rows=')) for i in range(1, num + 1): for j in range(1, num - i + 1): print(' ', end='') for j in range(2 and 9): print('2', '9') for i in range(1, 6): for j in range(1, 10): if i == 5 or i + j == 5 or j - i == 4: print('*', end='') ...
''' Problem:- Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. ''' class Solution: def longestPalindrome(self, s: str) -> str: res = "" resL...
""" Problem:- Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. """ class Solution: def longest_palindrome(self, s: str) -> str: res = '' re...
# 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 minDiffInBST(self, root: Optional[TreeNode]) -> int: output=[] stack=[root] whil...
class Solution: def min_diff_in_bst(self, root: Optional[TreeNode]) -> int: output = [] stack = [root] while stack: cur = stack.pop(0) output.append(cur.val) if cur.left: stack.append(cur.left) if cur.right: sta...
PREFIX = "/video/tvkultura" NAME = "TVKultura.Ru" ICON = "tvkultura.png" ART = "tvkultura.jpg" BASE_URL = "https://tvkultura.ru/" BRAND_URL = BASE_URL+"brand/" # Channel initialization def Start(): ObjectContainer.title1 = NAME HTTP.Headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko...
prefix = '/video/tvkultura' name = 'TVKultura.Ru' icon = 'tvkultura.png' art = 'tvkultura.jpg' base_url = 'https://tvkultura.ru/' brand_url = BASE_URL + 'brand/' def start(): ObjectContainer.title1 = NAME HTTP.Headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0' ...
# Tuples coordinates = (4, 5) # Cant be changed or modified print(coordinates[1]) # coordinates[1] = 10 # print(coordinates[1])
coordinates = (4, 5) print(coordinates[1])
# ########################################################### # ## generate menu # ########################################################### _a = request.application _c = request.controller _f = request.function response.title = '%s %s' % (_f, '/'.join(request.args)) response.subtitle = 'admin' response.menu = [(T('...
_a = request.application _c = request.controller _f = request.function response.title = '%s %s' % (_f, '/'.join(request.args)) response.subtitle = 'admin' response.menu = [(t('site'), _f == 'site', url(_a, 'default', 'site'))] if request.args: _t = request.args[0] response.menu.append((t('edit'), _c == 'default...
tempratures = [10,-20, -289, 100] def c_to_f(c): if c<-273.15: return "" return c* 9/5 +32 def writeToFile(input): with open("output.txt","a") as file: file.write(input) for temp in tempratures: writeToFile(str(c_to_f(temp)))
tempratures = [10, -20, -289, 100] def c_to_f(c): if c < -273.15: return '' return c * 9 / 5 + 32 def write_to_file(input): with open('output.txt', 'a') as file: file.write(input) for temp in tempratures: write_to_file(str(c_to_f(temp)))
class VoiceClient(object): def __init__(self, base_obj): self.base_obj = base_obj self.api_resource = "/voice/v1/{}" def create(self, direction, to, caller_id, execution_logic, reference_logic='', count...
class Voiceclient(object): def __init__(self, base_obj): self.base_obj = base_obj self.api_resource = '/voice/v1/{}' def create(self, direction, to, caller_id, execution_logic, reference_logic='', country_iso2='us', technology='pstn', status_callback_uri=''): api_resource = self.api_re...
expected_output = { "ospf-statistics-information": { "ospf-statistics": { "dbds-retransmit": "203656", "dbds-retransmit-5seconds": "0", "flood-queue-depth": "0", "lsas-acknowledged": "225554974", "lsas-acknowledged-5seconds"...
expected_output = {'ospf-statistics-information': {'ospf-statistics': {'dbds-retransmit': '203656', 'dbds-retransmit-5seconds': '0', 'flood-queue-depth': '0', 'lsas-acknowledged': '225554974', 'lsas-acknowledged-5seconds': '0', 'lsas-flooded': '66582263', 'lsas-flooded-5seconds': '0', 'lsas-high-prio-flooded': '3755689...
N = int(input()) S = input() if N % 2 == 1: print('No') exit() if S[:N // 2] == S[N // 2:]: print('Yes') else: print('No')
n = int(input()) s = input() if N % 2 == 1: print('No') exit() if S[:N // 2] == S[N // 2:]: print('Yes') else: print('No')
#!/usr/bin/env python # # Cloudlet Infrastructure for Mobile Computing # - Task Assistance # # Author: Zhuo Chen <zhuoc@cs.cmu.edu> # # Copyright (C) 2011-2013 Carnegie Mellon University # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the...
is_streaming = True recognize_only = False task_server_port = 6090 best_engine = 'LEGO_FAST' check_algorithm = 'table' check_last_th = 1 master_server_port = 6091 save_image = False image_height = 360 image_width = 640 blur_kernel_size = int(IMAGE_WIDTH // 16 + 1) display_max_pixel = 640 display_scale = 5 display_list_...
class Node(): def __init__(self, value=None): self.children = [] self.parent = None self.value = value def add_child(self, node): if type(node).__name__ == 'Node': node.parent = self self.children.append(node) else: raise ValueErro...
class Node: def __init__(self, value=None): self.children = [] self.parent = None self.value = value def add_child(self, node): if type(node).__name__ == 'Node': node.parent = self self.children.append(node) else: raise ValueError ...
# https://leetcode.com/problems/minimum-moves-to-equal-array-elements/ # Explanation: https://leetcode.com/problems/minimum-moves-to-equal-array-elements/discuss/93817/It-is-a-math-question # Source: https://leetcode.com/problems/minimum-moves-to-equal-array-elements/discuss/272994/Python-Greedy-Sum-Min*Len class Solu...
class Solution: def min_moves(self, nums: List[int]) -> int: return sum(nums) - min(nums) * len(nums)
# Event: LCCS Python Fundamental Skills Workshop # Date: Dec 2018 # Author: Joe English, PDST # eMail: computerscience@pdst.ie # Purpose: To find (and fix) two syntax errors # A program to display Green Eggs and Ham (v4) def showChorus(): print() print("I do not like green eggs and ham.") print...
def show_chorus(): print() print('I do not like green eggs and ham.') print('I do not like them Sam-I-am.') print() def show_verse1(): print('I do not like them here or there.') print('I do not like them anywhere.') print('I do not like them in a house') print('I do not like them with ...
_base_ = [ '../_base_/models/repdet_repvgg_pafpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_poly.py', '../_base_/default_runtime.py' ] # model settings model = dict( type='RepDet', pretrained='/data/kartikes/repvgg_models/repvgg_b1g2.pth', backbone=dict( ...
_base_ = ['../_base_/models/repdet_repvgg_pafpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_poly.py', '../_base_/default_runtime.py'] model = dict(type='RepDet', pretrained='/data/kartikes/repvgg_models/repvgg_b1g2.pth', backbone=dict(type='RepVGG', arch='B1g2', out_stages=[1, 2, 3, 4], a...
# Holy Stone - Holy Ground at the Snowfield (3rd job) questIDs = [1431, 1432, 1433, 1435, 1436, 1437, 1439, 1440, 1442, 1443, 1445, 1446, 1447, 1448] hasQuest = False for qid in questIDs: if sm.hasQuest(qid): hasQuest = True break if hasQuest: if sm.sendAskYesNo("#b(A mysterious energy surroun...
quest_i_ds = [1431, 1432, 1433, 1435, 1436, 1437, 1439, 1440, 1442, 1443, 1445, 1446, 1447, 1448] has_quest = False for qid in questIDs: if sm.hasQuest(qid): has_quest = True break if hasQuest: if sm.sendAskYesNo('#b(A mysterious energy surrounds this stone. Do you want to investigate?)'): ...
class CustomException(Exception): def __init__(self, *args, **kwargs): return super().__init__(self, *args, **kwargs) def __str__(self): return str(self.args [1]) class DeprecatedException(CustomException): def __init__(self, *args, **kwargs): return super().__init__(*args, **kwargs)...
class Customexception(Exception): def __init__(self, *args, **kwargs): return super().__init__(self, *args, **kwargs) def __str__(self): return str(self.args[1]) class Deprecatedexception(CustomException): def __init__(self, *args, **kwargs): return super().__init__(*args, **kwar...
def f(x): if x <= -2: f = 1 - (x + 2)**2 return f if -2 < x <= 2: f = -(x/2) return f if 2 < x: f = (x - 2)**2 + 1 return f x = int(input()) print(f(x))
def f(x): if x <= -2: f = 1 - (x + 2) ** 2 return f if -2 < x <= 2: f = -(x / 2) return f if 2 < x: f = (x - 2) ** 2 + 1 return f x = int(input()) print(f(x))
dnas = [ ['jVXfX<', 37, 64, 24.67, 14, 7, -4.53, {'ott_len': 42, 'ott_percent': 508, 'stop_loss': 263, 'risk_reward': 65, 'chop_rsi_len': 31, 'chop_bandwidth': 83}], ['o:JK9p', 50, 62, 32.74, 37, 8, -0.2, {'ott_len': 45, 'ott_percent': 259, 'stop_loss': 201, 'risk_reward': 41, 'chop_rsi_len': 12, 'chop_bandwidth': 274}...
dnas = [['jVXfX<', 37, 64, 24.67, 14, 7, -4.53, {'ott_len': 42, 'ott_percent': 508, 'stop_loss': 263, 'risk_reward': 65, 'chop_rsi_len': 31, 'chop_bandwidth': 83}], ['o:JK9p', 50, 62, 32.74, 37, 8, -0.2, {'ott_len': 45, 'ott_percent': 259, 'stop_loss': 201, 'risk_reward': 41, 'chop_rsi_len': 12, 'chop_bandwidth': 274}]...
lista = list(range(0,10001)) for cont in range(0,10001): print(lista[cont]) for valor in lista: print(valor)
lista = list(range(0, 10001)) for cont in range(0, 10001): print(lista[cont]) for valor in lista: print(valor)
cont = 1 while True: t = int(input('Quer saber a tabuada de que numero ? ')) if t < 0: break for c in range (1, 11): print(f'{t} X {c} = {t * c}') print('Obrigado!')
cont = 1 while True: t = int(input('Quer saber a tabuada de que numero ? ')) if t < 0: break for c in range(1, 11): print(f'{t} X {c} = {t * c}') print('Obrigado!')
#!/usr/bin/env python3 seq = 'ACGACGCAGGAGGAGAGTTTCAGAGATCACGAATACATCCATATTACCCAGAGAGAG' w = 11 for i in range(len(seq) - w + 1): count = 0 for j in range(i, i + w): if seq[j] == 'G' or seq[j] == 'C': count += 1 print(f'{i} {seq[i:i+w]} {(count / w) : .4f}')
seq = 'ACGACGCAGGAGGAGAGTTTCAGAGATCACGAATACATCCATATTACCCAGAGAGAG' w = 11 for i in range(len(seq) - w + 1): count = 0 for j in range(i, i + w): if seq[j] == 'G' or seq[j] == 'C': count += 1 print(f'{i} {seq[i:i + w]} {count / w: .4f}')
# Princess No Damage Skin (30-Days) success = sm.addDamageSkin(2432803) if success: sm.chat("The Princess No Damage Skin (30-Days) has been added to your account's damage skin collection.")
success = sm.addDamageSkin(2432803) if success: sm.chat("The Princess No Damage Skin (30-Days) has been added to your account's damage skin collection.")
# 1) count = To count how many time a particular word & char. is appearing x = "Keep grinding keep hustling" print(x.count("t")) # 2) index = To get index of letter(gives the lowest index) x="Keep grinding keep hustling" print(x.index("t")) # will give the lowest index value of (t) # 3) find = To get index of lett...
x = 'Keep grinding keep hustling' print(x.count('t')) x = 'Keep grinding keep hustling' print(x.index('t')) x = 'Keep grinding keep hustling' print(x.find('t')) '\nNOTE : print(x.index("t",34)) : Search starts from index value 34 including 34\n'
# example of redefinition __repr__ and __str__ of exception class MyBad(Exception): def __str__(self): return 'My mistake!' class MyBad2(Exception): def __repr__(self): return 'Not calable' # because buid-in method has __str__ try: raise MyBad('spam') except MyBad as X: print(X) #...
class Mybad(Exception): def __str__(self): return 'My mistake!' class Mybad2(Exception): def __repr__(self): return 'Not calable' try: raise my_bad('spam') except MyBad as X: print(X) print(X.args) try: raise my_bad2('spam') except MyBad2 as X: print(X) print(X.args) r...
class Solution: def findUnsortedSubarray(self, nums: List[int]) -> int: ''' T: O(n log n) and S: O(1) ''' n = len(nums) sorted_nums = sorted(nums) start, end = n + 1, -1 for i in range(n): if nums[i] != sorted_nums[i]: ...
class Solution: def find_unsorted_subarray(self, nums: List[int]) -> int: """ T: O(n log n) and S: O(1) """ n = len(nums) sorted_nums = sorted(nums) (start, end) = (n + 1, -1) for i in range(n): if nums[i] != sorted_nums[i]: start ...
# "javascript" section for javascript. see @app.route('/config.js') in app/views.py # oauth constants HOSTNAME = "http://hackathon.chinacloudapp.cn" # host name of the UI site QQ_OAUTH_STATE = "openhackathon" # todo state should be constant. Actually it should be unguessable to prevent CSFA HACkATHON_API_ENDPOINT = ...
hostname = 'http://hackathon.chinacloudapp.cn' qq_oauth_state = 'openhackathon' ha_ck_athon_api_endpoint = 'http://hackathon.chinacloudapp.cn:15000' config = {'environment': 'local', 'login': {'github': {'access_token_url': 'https://github.com/login/oauth/access_token?client_id=a10e2290ed907918d5ab&client_secret=5b240a...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def getTargetCopy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode: if not target or not original or not...
class Solution: def get_target_copy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode: if not target or not original or (not cloned): return None if target.val == original.val == cloned.val: return cloned node = self.getTargetCopy(original.lef...
class City: name = "city" size = "default" draw = -1 danger = -1 population = []
class City: name = 'city' size = 'default' draw = -1 danger = -1 population = []
# >>> s = set("Hacker") # >>> print s.difference("Rank") # set(['c', 'r', 'e', 'H']) # >>> print s.difference(set(['R', 'a', 'n', 'k'])) # set(['c', 'r', 'e', 'H']) # >>> print s.difference(['R', 'a', 'n', 'k']) # set(['c', 'r', 'e', 'H']) # >>> print s.difference(enumerate(['R', 'a', 'n', 'k'])) # set(['a', 'c', 'r...
if __name__ == '__main__': eng = input() eng_stu = set(map(int, input().split())) fre = input() fre_stu = set(map(int, input().split())) eng_only = eng_stu - fre_stu print(len(eng_only))
SECRET_KEY = None DB_HOST = "localhost" DB_NAME = "kido" DB_USERNAME = "kido" DB_PASSWORD = "kido" COMPRESSOR_DEBUG = False COMPRESSOR_OFFLINE_COMPRESS = True
secret_key = None db_host = 'localhost' db_name = 'kido' db_username = 'kido' db_password = 'kido' compressor_debug = False compressor_offline_compress = True
def consolidate(sets): setlist = [s for s in sets if s] for i, s1 in enumerate(setlist): if s1: for s2 in setlist[i+1:]: intersection = s1.intersection(s2) if intersection: s2.update(s1) s1.clear() s1...
def consolidate(sets): setlist = [s for s in sets if s] for (i, s1) in enumerate(setlist): if s1: for s2 in setlist[i + 1:]: intersection = s1.intersection(s2) if intersection: s2.update(s1) s1.clear() ...
class InterpreterException(Exception): def __init__(self, message): self.message = message def __str__(self): return self.message class SymbolNotFound(InterpreterException): pass class UnexpectedCharacter(InterpreterException): pass class ParserSyntaxError(InterpreterException): ...
class Interpreterexception(Exception): def __init__(self, message): self.message = message def __str__(self): return self.message class Symbolnotfound(InterpreterException): pass class Unexpectedcharacter(InterpreterException): pass class Parsersyntaxerror(InterpreterException): ...
#Copyright (c) 2009-11, Walter Bender, Tony Forster # This procedure is invoked when the user-definable block on the # "extras" palette is selected. # Usage: Import this code into a Python (user-definable) block; when # this code is run, the current mouse status will be pushed to the # FILO heap. If a mouse button ev...
def myblock(tw, x): """ Push mouse event to stack """ if tw.mouse_flag == 1: tw.lc.heap.append(tw.canvas.height / 2 - tw.mouse_y) tw.lc.heap.append(tw.mouse_x - tw.canvas.width / 2) tw.lc.heap.append(1) tw.mouse_flag = 0 else: tw.lc.heap.append(0)
can_juggle = True # The code below has problems. See if # you can fix them! #if can_juggle print("I can juggle!") #else print("I can't juggle.")
can_juggle = True print("I can't juggle.")
# decompiled-by-hand & optimized # definitely not gonna refactor this one # 0.18s on pypy3 ip_reg = 4 reg = [0, 0, 0, 0, 0, 0] i = 0 seen = set() lst = [] while True: i += 1 break_true = False while True: if break_true: if i == 1: print("1)", reg[1]) if reg[1...
ip_reg = 4 reg = [0, 0, 0, 0, 0, 0] i = 0 seen = set() lst = [] while True: i += 1 break_true = False while True: if break_true: if i == 1: print('1)', reg[1]) if reg[1] in seen: if len(lst) == 25000: p2 = max(seen, key=lamb...
# See # The configuration file should be a valid Python source file with a python extension (e.g. gunicorn.conf.py). # https://docs.gunicorn.org/en/stable/configure.html bind='127.0.0.1:8962' timeout=75 daemon=True user='user' accesslog='/var/local/log/user/blockchain_backup.gunicorn.access.log' errorlog='/var/l...
bind = '127.0.0.1:8962' timeout = 75 daemon = True user = 'user' accesslog = '/var/local/log/user/blockchain_backup.gunicorn.access.log' errorlog = '/var/local/log/user/blockchain_backup.gunicorn.error.log' log_level = 'debug' capture_output = True max_requests = 3 workers = 1
size = 5 m = (2 * size)-2 for i in range(0, size): for j in range(0, m): print(end=" ") m = m - 1 for j in range(0, i + 1): if(m%2!=0): print("*", end=" ") print("")
size = 5 m = 2 * size - 2 for i in range(0, size): for j in range(0, m): print(end=' ') m = m - 1 for j in range(0, i + 1): if m % 2 != 0: print('*', end=' ') print('')
__version__ = '2.0.0' __description__ = 'Sample for calculations with data from the ctrlX Data Layer' __author__ = 'Fantastic Python Developers' __licence__ = 'MIT License' __copyright__ = 'Copyright (c) 2021 Bosch Rexroth AG'
__version__ = '2.0.0' __description__ = 'Sample for calculations with data from the ctrlX Data Layer' __author__ = 'Fantastic Python Developers' __licence__ = 'MIT License' __copyright__ = 'Copyright (c) 2021 Bosch Rexroth AG'