content
stringlengths
7
1.05M
# We could use f'' string but it is lunched after version 3.5 # So before f'' string developers are used format specifier. name = 'Amresh' channel = 'TechieDuo' # a = f'Good morning, {name}' # a = 'Good morning, {}\nWelcome to {}, Chief'.format(name, channel) # customize the position a = 'Good morning, {1}\nWelc...
class Solution: def romanToInt(self, s: str) -> int: roman_dict = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} temp = roman_dict[s[-1]] summation = temp for i in s[:-1][::-1]: value = roman_dict[i] if value >= temp: summati...
np.random.seed(2020) # set random seed # sweep through values for lambda lambdas = np.arange(0.05, 0.95, 0.01) empirical_variances = np.zeros_like(lambdas) analytical_variances = np.zeros_like(lambdas) sig = 0.87 # compute empirical equilibrium variance for i, lam in enumerate(lambdas): empirical_variances[i] = ...
#Crie um programa que leia um número inteiro e mostre na tela se ele é par ou ímpar. n1 = int(input('Digite um número inteiro: ')) resultado = n1 % 2 if resultado == 0: print('O número é par') else: print('o número é impar')
class SubscriptionSubstitutionTag(object): """The subscription substitution tag of an SubscriptionTracking.""" def __init__(self, subscription_substitution_tag=None): """Create a SubscriptionSubstitutionTag object :param subscription_substitution_tag: A tag that will be replaced with ...
# No Copyright @u@ TaskType={ "classification":0, "SANclassification":1 } TaskID = { "csqa":0, "mcscript2":1, "cosmosqa":2 } TaskName = ["csqa","mcscript2","cosmosqa"]
def open_file(): while True: file_name = input("Enter input file name>>> ") try: fhand = open(file_name, "r") break except FileNotFoundError: print("Couldn't open file, Invalid name or file doesn't exist!") continue return fhand def proce...
data = [[0,1.5],[2,1.7],[3,2.1],[5,2.2],[6,2.8],[7,2.9],[9,3.2],[11,3.7]] def dEa(a, b): sum = 0 for i in data: sum += i[0] * (i[0]*a + b - i[1]) return sum def dEb(a, b): sum = 0 for i in data: sum += i[0]*a + b - i[1] return sum eta = 0.006 # study rate a, b = 2,1 # start for i in range(0,200)...
print('hi all') print ('hello world') print('hi') print('hii') print('hello2')
grocery = ["rice", "water", "tomato", "onion", "ginger"] for i in range(2, len(grocery), 2): print(grocery[i])
# coding: utf-8 # author: Fei Gao <leetcode.com@feigao.xyz> # Problem: verify preorder serialization of a binary tree # # One way to serialize a binary tree is to use pre-order traversal. When we # encounter a non-null node, we record the node's value. If it is a null node, # we record using a sentinel value such as ...
#!/usr/bin/env python3.4 class Board: """Represents one board to a Tic-Tac-Toe game.""" def __init__(self): """Initializes a new board. A board is a dictionary which the key is the position in the board and the value can be 'X', 'O' or ' ' (representing an empty position in the ...
class FMSAPIEventRankingsParser(object): def parse(self, response): """ This currently only works for the 2015 game. """ rankings = [['Rank', 'Team', 'Qual Avg', 'Auto', 'Container', 'Coopertition', 'Litter', 'Tote', 'Played']] for team in response['Rankings']: r...
class Database(): def __init__(self, connector, id): self.connector = connector self.id = id self.base_url = 'https://api.devicemagic.com/api/forms' \ '/{0}/device_magic_database.json'.format(self.id) def json(self, *args): return self._filtered_query(ar...
description = """ Adds Oracle database settings to your project. For more information, visit: http://cx-oracle.sourceforge.net/ """
expected_output = { "program": { "rcp_fs": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "central-services", "jid": "1168", "standby": "N...
number = 5 def summation(first, second): total = first + second + number return total outer_total = summation(10, 20) print("The first number we initialised was " + str(number)) print("The total after summation s " + str(outer_total))
"""Tests for CharLSTM class.""" def test_forward(char_cnn, vocab_dataset): """Test `CharLSTM.forward()` method.""" _, dataset = vocab_dataset for src, tgt in dataset: res = char_cnn(*src[:-2]) n_words, dim = res.size() assert n_words == tgt.size()[0] assert dim == char_cnn....
# -*- coding: UTF-8 -*- # author by : (学员ID) # 目的: # 掌握函数的用法 def double_list(input_list): 'Double all elements of a list' for idx in range(len(input_list)): input_list[idx]*= 2 return # call function mylist = [1,3,5,7,9] double_list(mylist) print(mylist)
def checkio(number): result = [] if number % 3 == 0: result.append('Fizz') if number % 5 == 0: result.append('Buzz') if result: return ' '.join(result) return str(number) # These "asserts" using only for self-checking and not necessary for # auto-testing if __name__ == '__m...
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, # we can see that the 6th prime is 13. # What is the 10 001st prime number? def is_prime(n: int) -> bool: if n <= 3: return n > 1 elif not(n%2 and n%3): return False i = 5 while i**2 <= n: if not(n%i and n%(i+2)): return False ...
"""dloud_ads - Abstract Data Structures commonly used in CS scenarios. Implemented by Data Loud Labs!""" __version__ = '0.0.2' __author__ = 'Pedro Sousa <pjgs.sousa@gmail.com>' __all__ = []
class Regularizer(object): """Regularizer base class.""" def __call__(self, x): return self.call(x) def call(self, x): """Invokes the `Regularizer` instance.""" return 0.0 def gradient(self, x): """Compute gradient for the `Regularizer` instance.""" return 0.0
data1 = "10" # String data2 = 5 # Int data3 = 5.23 # Float data4 = False # Bool print(data1) print(data2) print(data3) print(data4)
def setup_module(module): pass def teardown_module(module): print("TD MO") def test_passing(): assert True def test_failing(): assert False class TestClassPassing(object): def setup_method(self, method): pass def teardown_method(self, method): pass def test_passing(...
#!/usr/bin/python35 s1 = '12345' s2 = 'abcde' print('s1 = %s, id(s1) = %d' %(s1, id(s1))) print('s2 = %s, id(s2) = %d' %(s2, id(s2))) s2 = '12345' print('') print('s1 = %s, id(s1) = %d' %(s1, id(s1))) print('s2 = %s, id(s2) = %d' %(s2, id(s2)))
# MIT License # (C) Copyright 2021 Hewlett Packard Enterprise Development LP. # # pauseOrchestration : Set or get appliances nePks which are paused from # orchestration def get_pause_orchestration(self) -> dict: """Get appliances currently paused for orchestration .. list-table:: :header-rows: 1 ...
"""Generated definition of rust_grpc_library.""" load("//rust:rust_grpc_compile.bzl", "rust_grpc_compile") load("//internal:compile.bzl", "proto_compile_attrs") load("//rust:rust_proto_lib.bzl", "rust_proto_lib") load("@rules_rust//rust:defs.bzl", "rust_library") def rust_grpc_library(name, **kwargs): # buildifier: ...
if __name__ == "__main__": with open('input.txt') as data: numbers = [int(number) for number in data.readlines()] current_freq = 0 idx = 0 past_frequencies = set() while True: if idx == len(numbers): idx = 0 if current_freq in past_freq...
test = { 'name': 'q42', 'points': 3, 'suites': [ { 'cases': [ { 'code': '>>> ' 'print(np.round(model.coef_, ' '3))\n' '[ 0.024 0.023 -0.073 0.001 ' ...
print('-=' * 5, 'Gerador de PA Advance', '-=' * 5) t1 = int(input('Primeiro termo:')) razao = int(input('Razão:')) termo = t1 c = 1 total = 0 mais = 10 while mais != 0: total += mais while c <= total: print(f'{termo} - ', end='') termo += razao c += 1 print('PAUSA') mais = int(in...
def main(j, args, params, tags, tasklet): doc = params.doc e = params.requestContext.env addr = j.core.portal.runningPortal.ipaddr querystr = e["QUERY_STRING"] querystr = querystr.replace("&format=text", "") querystr = querystr.replace("&key=,", "") querystr = querystr.replace("&key=", ...
# Title : Number of tuple equal to a user specified value # Author : Kiran raj R. # Date : 31:10:2020 def find_tuple(list_in, sum_in): length = len(list_in) count_tup = 0 list_tuples = [] if(sum(list_in) < sum_in) | length < 1: print(f"Cannot find any combination of sum {sum_in}") for ...
''' Продажи ''' def bill(x): temp = {} for i in x: prod, count = i if prod in temp: temp[prod] += int(count) else: temp[prod] = int(count) return temp base = {} with open('input.txt', 'r', encoding='utf8') as in_file: for line in in_file: man, p...
""" Implement an algorithm to find the kth to last element of a singly linked list. 1->3->5->7->9->0 """ class Node: def __init__(self, data, next_elem=None): self.data = data self.next_elem = next_elem data = Node(1, Node(3, Node(5, Node(7, Node(9, Node(0)))))) curr = data while curr is not N...
def tram(m, n): alfabet = "ABCDEFGHIJKLMNOPQRSTUVW"[:m] przystanki = (alfabet + alfabet[1:-1][::-1]) * 2 * n rozklad = "" while przystanki: curr = przystanki[n - 1] #print(przystanki[:m * 2], " -- >", curr) rozklad += curr przystanki = popall(przystanki[n:], curr) ...
# Path for log. Make sure the files (if present, otherwise the containing directory) are writable by the user that will be running the daemon. logPath = '/var/log/carillon/carillon.log' logDebug = False # Note, you can monitor the log in real time with tail -f [logPath] # MIDI info midiPort = 20 #Find with aplaymidi -...
DATA = '' MODEL_INIT = '$(pwd)/model_init' MODEL_TRUE = '$(pwd)/model_true' PRECOND = '' SPECFEM_DATA = '$(pwd)/specfem2d/DATA' SPECFEM_BIN = '$(pwd)/../../../specfem2d/bin'
def example(): return [1721, 979, 366, 299, 675, 1456] def input_data(): with open( "input.txt" ) as fl: nums = [ int(i) for i in fl.readlines() ] return nums def find_it(nums): for idx in range(len(nums)): for idy in range(len(nums))[idx+1:]: if (nums[idx] + nums[idy] == ...
# This is for the perso that i yearn # i shall do a petty iterator # it shall has a for cicle # Dictionary name = { "Mayra":"love", "Alejandra":"faith and hope", "Arauz":" all my life", "Mejia":"the best in civil engeenering" } # for Cicle for maam in name: print(f"She is {maam} and for me is {na...
#!/usr/bin/env python '''The Goal of this script is to place the data in a python dictionary of unique results.''' # To accomplish this parsing we need a XML file that can be # parsed so do scan your localhost using this command # nmap -oX test 127.0.0.1
def info_carro(fabricante: str, modelo: str, **info_extra) -> dict: """ -> Guarda as informações de um imagem em um dicionário. :param fabricante: Nome do fabricante do imagem. :param modelo: Nome do modelo do imagem. :param info_extra: Dicionário contendo informações extras do imagem. :return: ...
""" Write a function that takes in a string of lowercase English-alphabet letters and returns the index of the string's first non-repeating character. The first non-repeating character is the first character in a string that occurs only once. If the input string doesn't have any non-repeating charact...
""" HPC Base image Contents: FFTW version 3.3.8 HDF5 version 1.10.6 Mellanox OFED version 5.0-2.1.8.0 NVIDIA HPC SDK version 20.7 OpenMPI version 4.0.4 Python 2 and 3 (upstream) """ # pylint: disable=invalid-name, undefined-variable, used-before-assignment # The NVIDIA HPC SDK End-User License Agreement m...
""" Copyright 2020, University Corporation for Atmospheric Research See LICENSE.txt for details """ nlat = 19 nlon = 36 ntime = 10 nchar = 7 slices = ['input{0}.nc'.format(i) for i in range(5)] scalars = ['scalar{0}'.format(i) for i in range(2)] chvars = ['char{0}'.format(i) for i in range(1)] timvars = ['tim{0}'.for...
def main(): sequence = input().split(',') programs = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'] program_string = ''.join(programs) seen = [program_string] for index in range(1000000000): for command in sequence: programs = run_comman...
def rec_bin_search(arr, element): if len(arr) == 0: return False else: mid = len(arr) // 2 if arr[mid] == element: return True else: if element < arr[mid]: return rec_bin_search(arr[:mid], element) else: return...
class Dog: def bark(self): print("Bark") d = Dog() d.bark()
""" Submodules for AST manipulation. """ def remove_implications(ast): """ @brief Removes implications in an AST. @param ast The ast @return another AST """ if len(ast) == 3: op, oper1, oper2 = ast oper1 = remove_implications(oper1) oper2 = rem...
class ModelDot: """The ModelDot object can be used to access an actual MeshNode, ReferencePoint, or ConstrainedSketchVertex object. Notes ----- This object can be accessed by: """ pass
LONG_BLOG_POST = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam eget nibh ac purus euismod pharetra nec ac justo. Suspendisse fringilla tellus ipsum, quis vulputate leo eleifend pellentesque. Vivamus rhoncus augue justo, elementum commodo urna egestas in. Maecenas fermentum et orci sit amet egesta...
"""Example of Counting Permutations with Recursive Factorial Functions""" # Data n = 5 # The One-Liner factorial = lambda n: n * factorial(n-1) if n > 1 else 1 # The Result print(factorial(n))
[ alg.createtemp ( "revenue", alg.aggregation ( "l_suppkey", [ ( Reduction.SUM, "revenue", "sum_revenue" ) ], alg.map ( "revenue", scal.MulExpr ( scal.AttrExpr ( "l_extendedprice" ), scal.SubExpr ( scal.Const...
#!/usr/bin/env python __all__ = [ "osutils", ]
def searchInsert(self, nums, target): start = 0 end = len(nums) - 1 while start <= end: middle = (start + end) // 2 if nums[middle] == target: return middle elif target > nums[middle]: start = ...
#!/usr/bin/python3 RYD_TO_EV = 13.6056980659 class EnergyVals(): def __init__(self, **kwargs): kwargs = {k.lower():v for k,v in kwargs.items()} self._eqTol = 1e-5 self._e0Tot = kwargs.get("e0tot", None) self._e0Coh = kwargs.get("e0coh", None) self.e1 = kwargs.get("e1", None) self.e2 = kwargs.get("e2", N...
f = open("input1.txt").readlines() count = 0 for i in range(1,len(f)): if int(f[i-1])<int(f[i]): count+=1 print(count) count = 0 for i in range(3,len(f)): if int(f[i-3])<int(f[i]): count+=1 print(count)
_base_ = "soft_teacher_faster_rcnn_r50_caffe_fpn_coco_full_720k.py" lr_config = dict(step=[120000 * 8, 160000 * 8]) runner = dict(_delete_=True, type="IterBasedRunner", max_iters=180000 * 8)
# melhora a performace do codigo l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] ex1 = [variavel for variavel in l1] ex2 = [v * 2 for v in l1] # multiplica cado elemento da lista 1 por 2 ex3 = [(v, v2) for v in l1 for v2 in range(3)] print(ex3) l2 = ['pedro', 'mauro', 'maria'] ex4 = [v.replace('a', '@').upper() for v in l2] # m...
#!/usr/bin/env python3 # coding=utf-8 """ 类型系统 """ s = 'Hello World!' # 返回变量s的类型 # type函数:返回指定引用的类型,type(x)即返回x的类型 t = type(s) # 打印 t print(t) print(type) print(type(type), type(str)) print(type(type(type(type(type))))) print('1' + '2') print(1 == '1', 1 == 1) # int 把任何对象转换为整数 print(int('1'), int('1') == '1', int('...
""" This module contains the functions to compare MISRA rules """ def misra_c2004_compare(rule): """ compare misra C2004 rules """ return int(rule.split('.')[0])*100 + int(rule.split('.')[1]) def misra_c2012_compare(rule): """ compare misra C2012 rules """ return int(rule.split('.')[0])*100 + int(r...
# defines a function that takes two arguments def cheese_and_crackers(cheese_count, boxes_of_crackers): # prints a string with the first argument passed into the function inserted into the output print(f"You have {cheese_count} cheeses!") # prints a string with the second argument passed into the function i...
def selection_sort(arr): for i in range(len(arr)): min = i # index of min elem for j in range(i+1,len(arr)): # arr[j] is smaller than the min elem if arr[j] < arr[min]: min = j arr[i],arr[min] = arr[min],arr[i] # swap # print...
SWITCH_ON = 1 SWITCH_OFF = 0 SWITCH_UNDEF = -1 class Sequence(object): def __init__(self, start_time, start_range, end_time, end_range, pin=None, sequence_id=-1): self.pin = pin self.id = sequence_id if (type(start_range) is int): start_range = str(start_range)...
class System_Status(): def __init__(self, plant_state=None): if plant_state is None: plant_state = [1, 1, 1] self.plant_state = plant_state def __str__(self): return f"El estado de la planta es {self.plant_state}"
class IPVerify: def __init__(self): super(IPVerify, self).__init__() # self.octetLst = [] # self.subnetMaskLst = [] # def __initializeIP(self, ip: str): # self.octetLst.clear() # [self.octetLst.append(i) for i in ip.split(".")] # return self.octetLst ...
NODE_LIST = [ { 'name': 'syslog_source', 'type': 'syslog_file_monitor', 'outputs': [ 'filter', ], 'params': { 'filename': 'testlog1.log', } }, { 'name': 'filter', 'type': 'rx_grouper', 'params': { 'gr...
def Convert(number,mode): if mode.startswith("mili") and mode.endswith("meter") == True: Milimeter = number Centimeter = number / 10 Meter = Centimeter / 100 Kilometer = Meter / 1000 Result1 = f"Milimeters : {Milimeter}" Result2 =f"Centimeters : {Centimeter}"...
class Solution: def simplifyPath(self, path: str) -> str: paths = path.split('/') stack = [] for p in paths: if p not in ['', '.', '..']: # 表示目录字符串 stack.append(p) if stack and '..' == p: stack.pop() if not stack...
pt = int(input('digite o primeiro termo da PA ')) r = int(input('digite a razao ')) termos = 1 total=0 total2=0 contador = 10 print('{} -> '.format(pt),end='') while contador > 1 : if contador == 10: total=pt+r print('{} -> '.format(total),end='') contador=contador-1 else: total= total+r pr...
def analysis(sliceno, job): job.save('this_is_the_data_analysis ' + str(sliceno), 'myfile1', sliceno=sliceno) def synthesis(job): job.save('this_is_the_data_2', 'myfile2')
"""Common configuration constants """ PROJECTNAME = 'rendereasy.cnawhatsapp' ADD_PERMISSIONS = { # -*- extra stuff goes here -*- 'Envio': 'rendereasy.cnawhatsapp: Add Envio', 'Grupo': 'rendereasy.cnawhatsapp: Add Grupo', }
class IIIF_Photo(object): def __init__(self, iiif, country): self.iiif = iiif self.country = country def get_photo_link(self): return self.iiif["images"][0]["resource"]["@id"]
birth_year = input('Birth year: ') print(type(birth_year)) age = 2019 - int(birth_year) print(type(age)) print(age) #exercise weight_in_lbs = input('What is your weight (in pounds)? ') weight_in_kg = float(weight_in_lbs) * 0.454 print('Your weight is (in kg): ' + str(weight_in_kg))
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Michael Eaton <meaton@iforium.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata...
{ 'targets': [ { 'target_name': 'pointer', 'sources': ['pointer.cc'], 'include_dirs': ['<!(node -e \'require("nan")\')'], 'link_settings': { 'libraries': [ '-lX11', ] }, 'cflags': [ ...
# # PySNMP MIB module CLEARTRAC7-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CLEARTRAC7-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:09:07 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
# Author: Stephen Mugisha # FSM exceptions class InitializationError(Exception): """ State Machine InitializationError exception raised. """ def __init__(self, message, payload=None): self.message = message self.payload = payload #more exception args ...
def generate_associated_dt_annotation( associations, orig_col, primary_time=False, description="", qualifies=None ): """if associated with another col through dt also annotate that col""" cols = [associations[x] for x in associations.keys() if x.find("_format") == -1] entry = {} for col in cols: ...
# -*- coding: utf-8 -*- print ("Hello World!") print ("Hello Again") print ("I like Typing this.") print ("This is fun.") print ('Yay! Printing.') print ("I'd much rather you 'not'.") print ('I "said" do not touch this.')
#!/usr/bin/env python polyCorners = 4 poly_1_x = [22.017965, 22.017852, 22.016992, 22.017187] poly_1_y = [85.432761, 85.433074, 85.432577, 85.432243] poly_2_x = [22.017187, 22.016992, 22.015849, 22.015982] poly_2_y = [85.432243, 85.432577, 85.431865, 85.431574] poly_3_x = [22.015850, 22.015636, 22.015874, 22.016053]...
print (True and True) print (True and False) print (False and True) print (False and False) print (True or True) print (True or False) print (False or True) print (False or False)
#!/usr/bin/env python3 print("hello") f = open('python file.txt', 'a+') f.write("Hello") f.close()
class Person(dict): def __init__(self, person_id, sex, phenotype, studies): self.person_id = str(person_id) self.sex = sex self.phenotype = phenotype self.studies = studies def __repr__(self): return f'Person("{self.person_id}", "{self.sex}", {self.phenotype}, ...
""" A file designed to have lines of similarity when compared to similar_lines_b We use lorm-ipsum to generate 'random' code. """ # Copyright (c) 2020 Frank Harrison <frank@doublethefish.com> def adipiscing(elit): etiam = "id" dictum = "purus," vitae = "pretium" neque = "Vivamus" nec = "ornare" ...
class FieldXO: def __init__(self): self.__field__ = [ ['-', '-', '-'], ['-', '-', '-'], ['-', '-', '-'] ] self.count = 9 self.size = 3 def get_field(self): return self.__field__ def fill_cell(self, x: int, y: int, cell_type: str)...
# TODO: class for these : unicode.subscript('i=1') # 'ᵢ₌₀' # SUB_SYMBOLS = '₊ # ₋ # ₌ # ₍ # ₎ # ⁻' SUP_NRS = dict(zip(map(str, range(10)), '⁰¹²³⁴⁵⁶⁷⁸⁹')) SUB_NRS = dict(zip(map(str, range(10)), '₀₁₂₃₄₅₆₇₈₉')) SUB_LATIN = dict(a='ₐ', e='ₑ', h='ₕ', j='ⱼ', ...
def giris_ekrani(): print("Hangi işlem?") i = 1 for fonksiyon in fonksiyonlar: print(i, "-->", fonksiyon) i += 1 print("Seçiminizi yapınız.") def veri_girisi(): sayilar = [] while True: sayi = input("Sayıyı girin (Çıkmak için Ç'ye basın):") ...
def problem454(): """ In the following equation x, y, and n are positive integers. 1 1 1 ─ + ─ = ─ x y n For a limit L we define F(L) as the number of solutions which satisfy x...
######################### # 演示Python的数据类型 ######################### # 定义变量 age = 20 # 整型 name = 'Ztiany' # 字符串 score = 32.44 # 浮点类型 isStudent = False # 布尔类型 friends = ["张三", "李四", "王五", "赵六"] # 列表 worker1, worker2 = "Wa", "Wb" # 定义多个值,也可以使用["Wa", "Wb"]解包赋值 # 进制 binaryN = 0b10 # 二进制 octN = 0o77 # 八进制 hexN = 0x...
"""Exercício Python 095: Aprimore o desafio 93 para que ele funcione com vários jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador.""" histórico = dict() temp = dict() gols = list() time = list() while True: histórico['jogador'] = str(input('Nome do jogador: ' )) qde_p...
""" Configuration variables """ start_test_items_map = { 'first': 0, 'second': 1, 'third': 2, 'fourth': 3, 'fifth': 4, 'sixth': 5, 'seventh': 6, 'eighth': 7, 'ninth': 8, 'tenth': 9, } end_test_items_map = { 'tenth_to_last': 0, 'ninth_to_last': 1, 'eighth_to_last': 2...
A,B = map(int,input().split()) if A >= 13: print(B) elif A >= 6: print(B//2) else: print(0)
#SQL Server details SQL_HOST = 'localhost' SQL_USERNAME = 'root' SQL_PASSWORD = '' #Cache details - whether to call a URL once an ingestion script is finished RESET_CACHE = False RESET_CACHE_URL = 'http://example.com/visualization_reload/' #Fab - configuration for deploying to a remote server FAB_HOSTS = [] FAB_GITHUB_...
__description__ = 'Wordpress Two-Factor Authentication Brute-forcer' __title__ = 'WPBiff' __version_info__ = ('0', '1', '1') __version__ = '.'.join(__version_info__) __author__ = 'Gabor Szathmari' __credits__ = ['Gabor Szathmari'] __maintainer__ = 'Gabor Szathmari' __email__ = 'gszathmari@gmail.com' __status__ = 'beta'...
""" Link: Language: Python Written by: Mostofa Adib Shakib Time complexity: O(n) Space Complexity: O(1) """ T = int(input()) for x in range(1, T + 1): N, M, Q = map(int, input().split()) min1 = (M-Q) + (N-Q+1) + (M-1) min2 = (M-1) + 1 + N y = min(min1, min2) print("Case #{}: {}".f...
N = int(input()) NG = set([int(input()) for _ in range(3)]) if N in NG: print("NO") exit(0) for _ in range(100): if 0 <= N <= 3: print("YES") break if N - 3 not in NG: N -= 3 elif N - 2 not in NG: N -= 2 elif N - 1 not in NG: N -= 1 else: print("NO")
lister = ["Зима", "Зима", "Весна", "Весна", "Весна", "Лето", "Лето", "Лето", "Осень", "Осень", "Осень", "Зима"] dict_month = {"1": "Зима", "2": "Зима", "3": "Весна", "4": "Весна", "5": "Весна", "6": "Лето", "7": "Лето", "8": "Лето", "9": "Осень", "10": "Осень", "11": "Осень", "12": "Зима"} number_month = ...
def master_plan(): yield from bps.mvr(giantxy.x,x_range/2) yield from bps.mvr(giantxy.y,y_range/2) for _ in range(6): yield from bps.mvr(giantxy.x,-x_range) yield from bps.mvr(giantxy.y,-1) yield from bps.mvr(giantxy.x,+x_range) yield from bps.mvr(giantxy.y,-1) yield from...
def extractAquaScans(item): """ """ if 'Manga' in item['tags']: return None vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None bad_tags = [ 'Majo no Shinzou', 'Kanata no Togabito ga Tatakau Riyuu', ...