content stringlengths 7 1.05M |
|---|
small_2018_dataset = r"data/original/raster/small_datasets/2018.tif"
small_2010_dataset = r"data/original/raster/small_datasets/2010.tif"
envelope_2018 = r"data/original/raster/real_datasets/2018/envelope_2018.img"
coberture_2018_binary = r"data/original/vectorial/reals/2018_cobertures/binary/2018_binary_cobertures.shp... |
num = int(input('Diga um número inteiro: '))
if (num % 2) == 0:
print('Esse número é par!')
else:
print('Esse número é ímpar!')
print('--- FIM ---')
|
# Copyright 2002 by Andrew Dalke. All rights reserved.
# Revisions 2007-2008 by Peter Cock.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Note that BioSQL (including the database schema and scr... |
# https://www.hackerrank.com/challenges/grading/problem
def gradingStudents(grades):
# Write your code here
return [(g+2)//5*5 if (g >= 38) and (g%5>2) else g for g in grades]
|
class Solution:
def findAnagrams(self, s: str, p: str) -> List[int]:
inputHash, strStart, firstPsum, currHash, res = 0, 0, 0, 0, []
if len(s) < len(p):
return []
for subStr in p:
inputHash += hash(subStr)
for i in range(len(p)):
firstPsum += hash(... |
# EG11-02 Stock Item class failed
class StockItem(object):
'''
Stock item for the fashion shop
'''
def __init__(self, stock_ref, price, color):
self.stock_ref = stock_ref
self.__price = price
self.__stock_level = 0
self.color = color
@property
def price(self)... |
def int_hex(v):
v = hex(v)
v = v[2:]
return v
def main(v):
v = v.upper()
print(v)
main(int_hex(int(input()))) |
"""Determines if a triangle is equilater based on three input side lengths."""
def main() -> None:
"""Takes user input of three side lengths and displays if triangle is equilateral or not."""
length_one: int = int(input('Enter the first side: '))
length_two: int = int(input('Enter the second side: '))... |
"""
Version and related info.
Created by: Martin Sicho
On: 5/7/20, 2:25 PM
"""
__all__ = [
"__version__",
"__devstatus__",
"__devversion__",
"get_release_info"
]
# https://setuptools.readthedocs.io/en/latest/setuptools.html#specifying-your-project-s-version
__version__ = "0.0.0"
__devstatus__ = "alph... |
"""
* High switching cost means that you should be more certain that the other side
is better before committing to change sides. This means that beliefs must fall
below a threshold before acting. Conversely, a lower switching cost allows you
more flexibility to switch at less stringent thresholds. In the limit of _ze... |
def union(p,q):
for e in q:
if e not in p:
p.append(e)
def crawl_web(seed):
tocrawl = [seed]
crawled = []
index = {}
graph = {}
while tocrawl:
page = tocrawl.pop()
if page not in crawled:
content = get_page(page)
add_page_to_index(index,page,content)
outlinks = get_all_links... |
class ServiceTypes(object):
LOAD_BALANCER = 'LoadBalancer'
NODE_PORT = 'NodePort'
CLUSTER_IP = 'ClusterIP'
VALUES = [LOAD_BALANCER, NODE_PORT, CLUSTER_IP]
|
# JadenCase 문자열 만들기
def solution(s):
s = s.lower()
changed_words = []
print(s.split(" "))
for word in s.split(" "):
if len(word) == 0:
changed_words.append(word)
continue
elif len(word) == 1:
word = word[0].upper()
else:
word = wor... |
#! /usr/bin/env python
# -*- coding: utf-8 -*
"""
Decorators to help manage our custom classes.
"""
TABLE_LIST = []
def register(cls):
"""
A decorator to register new table configuration classes.
"""
TABLE_LIST.append(cls)
return cls
def downloader(func):
"""
A decorator to download data... |
'''
file.readline() 사용해서 csv 파일 열기
'''
#
# def my_csv_reader(fn:str, header=True) -> list:
# '''
# csv 파일의 데이터 2차원 행렬 형태로 리턴
#
#
# :param fn: 읽을 파일 이름(예: data\\exam.csv)
# :param header: csv파일의 헤더 존재 여부
# :return: csv 파일에서 헤더는 제외한 데이터로 이루어진 2차원 리스트
# '''
#
#
# if __name__ == '__main__':
#
# ... |
def event_handler(source,evt):
if evt == lv.EVENT.CLICKED:
if source == btn1:
# treat "clicked" events only for btn1
print("Clicked")
elif evt == lv.EVENT.VALUE_CHANGED:
print("Toggled")
# create a simple button
btn1 = lv.btn(lv.scr_act(),None)
# attach the call... |
"""
Assume that the error function is x^5 - 2x^3 - 2
To know the slope of any given x value, we take its derivative: 5x^4 - 6x^2
"""
current_x = 0.5 # Algorithm starts at x = 0.5
learning_rate = 0.01 # Step size multiplier
epoch = 50 # Number of times to train the function
# Compute the derivative of the error functi... |
# Listas - Funciones Sobre Listas [Diapo 34 - Diapo 35]
print('\n\n---[Diapo 34]--------------')
print('Funciones Sobre listas - Incorporar sublista\n')
lista = [5, 10, 20, 30]
print('La lista inicial es: ', lista)
lista = lista + [35, 40]
print('Y luego del cambio es: ', lista)
print('\n\n---[Diapo 34]----------... |
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... |
#!/usr/bin/env python3
UNKNOWN = -1
def read_val():
return int(input())
def read_row():
return list(map(int, input().split()))
def read_grid():
return [read_row() for _ in range(read_val())]
def make_blank_row(i):
return [UNKNOWN] * i
def make_blank_grid(n):
return [make_blank_row(i) for i in ... |
# Copyright 2019 The Bazel Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
"""
swagger module -
A package defining the swagger features. This module creates the swagger
structure and defines the data to show when the swagger is activated.
It does not contain the html and css files used to create the page,
only the underlying structure. The html and css can be found at the sta... |
#
# DVR-Scan: Find & Export Motion Events in Video Footage
# --------------------------------------------------------------
# [ Site: https://github.com/Breakthrough/DVR-Scan/ ]
# [ Documentation: http://dvr-scan.readthedocs.org/ ]
#
# This file contains all code related to timecode formats, inter... |
def get_alert_rules(session: object, logger):
'''
Accepts a tenant session object.
Gets all alert rules from a tenant
'''
logger.debug('API - Getting Alert Rules')
res = session.request("GET", "/v2/alert/rule")
data = res.json()
return data |
'''
Base test
'''
def test_index(client):
assert client.get('/').status_code == 302
def test_registration(client):
assert client.post('/registration',
json={"email": "test4@gmail.com", "password": "12345", "name": "PyTest"}).status_code == 200
assert client.post('/registratio... |
sum = 0
for num in range (10):
add = int(input(""))
sum = sum + add
avg = sum / 10
print(avg)
|
class Employees(object):
_employees = {}
_headcount = 0
def add_employee(self, employee):
self._headcount += 1
self._employees[self._headcount] = employee
def get_employee(self, i):
return self._employees[i]
@property
def headcount(self):
return self._headcount... |
par_impar = [[],[]] # Cria duas listas dentro de uma (matriz)
cont_P_I = [0,0] # Variaveis q contam quantos elementos tem em cada vetor
def veri (valor_, ind_, txt_): # Função: adiciona no vetor certo e verifica se está cheio
par_impar[ind_].append(valor_) #... |
sm.showFieldEffect("demonSlayer/whiteOut", 0)
sm.sendDelay(1950)
sm.completeQuestNoRewards(23203)
sm.deleteQuest(23203)
sm.curNodeEventEnd(True)
sm.warpInstanceIn(931050300, 0) |
class Solution:
def leastInterval(self, tasks: List[str], n: int) -> int:
cnt = [0]*26
for i in tasks:
cnt[ord(i)-65] += 1
maxCnt = 0
for i in range(26):
maxCnt = max(maxCnt, cnt[i])
e = 0
for i in range(26):
... |
# flopy version file automatically created using...pre-commit.py
# created on...October 19, 2018 18:28:49
major = 3
minor = 2
micro = 10
build = 0
commit = 2892
__version__ = '{:d}.{:d}.{:d}'.format(major, minor, micro)
__build__ = '{:d}.{:d}.{:d}.{:d}'.format(major, minor, micro, build)
__git_commit__ = '{:d}'.forma... |
def is_open():
try:
myfile = open("test.JPG", "r+") # or "a+", whatever you need
print("File is not open")
except IOError:
print("Could not open file!")
|
def aumentar(n=0):
return n * 1.5
def diminuir(n=0):
return n * 0.5
def dobro(n=0):
return n * 2
def metade(n=0):
return n / 2
def moeda(n=0):
return f'R${n:.2f}'.replace('.', ',')
|
print('-'*20)
print('LOJA SUPER BARATONA')
print('-'*20)
compra = 0
maiormil = 0
conta = 0
while True:
conta += 1
opc = ' '
produto = input('nome do produto :')
preco = float(input('preço do produto R$'))
while opc not in 'SNsn':
opc = str(input('quer continuar [ S / N ] :'))
compra += p... |
class Solution:
def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]:
rows = len(image)
cols = len(image[0])
flag = False
if cols%2 != 0:
flag = True
for row in range(rows):
if flag:
image[row][cols//2] = 1 ^ image[ro... |
apic_ip_address = '192.168.1.100'
apic_admin_user = 'admin'
apic_admin_password = 'password'
template_file = 'template.xml'
template_params = '{"tnPrefix": "iPost-light","tnQuant": 10}'
|
load("//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external")
def dependencies():
import_external(
name = "aopalliance_aopalliance",
artifact = "aopalliance:aopalliance:1.0",
jar_sha256 = "0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08",
srcjar_sh... |
N,A,B,C,D=list(map(int,input().split()))
if N%A == 0:
M = B*(N//A)
else:
M = B*(N//A+1)
if N%C == 0:
M2 = D*(N//C)
else:
M2= D*(N//C+1)
print(min(M,M2)) |
def millionaire():
answer_list = ['shekspir','pushkik','bunin','bulgakov']
true_answer = 'bulgakov'
print('Otvette na vopros: Kto napisal Master i Margarita?')
print('Varianty otvetov:',answer_list)
help = input('Nujny varianty podskazki?')
if help == 'da':
poll = input('U vas 3 podskazk... |
#
# PySNMP MIB module VIDEOFRAME-SIGMON-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/VIDEOFRAME-SIGMON-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:27:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... |
# Created by MechAviv
# Kinesis Introduction
# Map ID :: 331001120
# Hideout :: Training Room 2
JAY = 1531001
sm.spawnMob(2700302, 705, 63, False)
sm.lockForIntro()
sm.forcedFlip(True)
sm.removeAdditionalEffect()
sm.setIntroBoxChat(JAY)
sm.sendNext("#face9#Okay, before we get to the real combat, let me capture a ba... |
class Solution:
def maxProfit(self, prices: List[int]) -> int:
buy, max_profit = float('inf'), 0
for price in prices:
buy = min(buy, price)
max_profit = max(max_profit, price - buy)
return max_profit
|
def fib(n):
if n <= 1:
return n
else:
return(fib(n-1) + fib(n-2))
item = 3
if item <= 0:
print("Plese enter a +ve integer")
else:
for i in range(item+1):
print(fib(i))
|
#
# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
# Copyright (C) 2018 The Android Open Source Project
#
# 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://w... |
##
##
# File auto-generated by PythonFileGenerator
__all__ = [
'lock',
'message',
'notify',
'request'
]
|
class Poll():
def __init__(self, id, title, options):
self.id = id
self.title = title
self.options = {op: [] for op in options}
print(self.options)
def vote(self, person, vote):
if vote in self.options:
if not(person in self.options[vote]):
s... |
print('Digite três números para verificar ordenar os mesmos')
n1 = int(input('Digite o primeiro número: '))
n2 = int(input('Digite o segundo número: '))
n3 = int(input('Digite o terceiro número: '))
if n1 < n2:
menor = n1
else:
menor = n2
if n3 < menor:
menor = n3
if n1 > n2:
maior = n1
else:
maio... |
# Hook for http://pypi.python.org/pypi/h5py/
# Author: dhyams
# Date: 2011-10-14
# Ticket: #437
hiddenimports = ['_proxy','utils','defs']
|
def const(a, b):
def result():
return a
def zilch(b):
return b
return result()
|
#for Job class
#one week
NOTIFICATION_TIMEOUT = 604800
#two weeks
KILL_JOB_DEFAULT_TIMEOUT = 1209600
#Packet`s names policy
IGNORE_DUPLICATE_NAMES_POLICY = 0b001
WARN_DUPLICATE_NAMES_POLICY = 0b010
DENY_DUPLICATE_NAMES_POLICY = 0b100
DEFAULT_DUPLICATE_NAMES_POLICY = DENY_DUPLICATE_NAMES_POLICY
JOB_WATCHER_MAX_DELAY ... |
""" Functions which preprocess an audio chunk to improve the accuracy of speech
recognition. """
def __maximize_volume(chunk):
return chunk - chunk.max_dBFS
def improve_accuracy(chunk):
""" Filter chunk through various functions to improve speech recognition """
return __maximize_volume(chunk)
|
file1 = open("paint.in", "r")
line1 = file1.readline()
line2 = file1.readline()
a, b = int(line1.split()[0]), int(line1.split()[1])
c, d = int(line2.split()[0]), int(line2.split()[1])
file1.close()
lst = [*range(1, max(a, b, c, d))]
lenlst = len(lst)
for thing in range(a, b):
if thing in lst:
lst.remov... |
'''
Created on Mar 30, 2018
@author: Burkhard A. Meier
'''
def generator_function():
print('before yield')
yield 10 # yield makes it a generator
print('before second yield')
yield 20 # second yield
gen = generator_function() # s... |
# -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class FileOrDirectoryPathFilter(object):
"""Implementation of the 'File or Directory Path Filter.' model.
Specifies filters to match files and directories on a Server.
Two kinds of filters are supported. a) prefix which always starts
with '/'. b... |
"Exceptions raised by the coercion model"
###############################################################################
# Sage: Open Source Mathematical Software
# Copyright (C) 2009 Robert Bradshaw <robertwb@math.washington.edu>
# Distributed under the terms of the GNU General Public License (GPL)
# The f... |
# https://leetcode.com/problems/combination-sum
class Solution:
def combinationSum(self, candidates, target):
output = set()
N = len(candidates)
def backtrack(cur_sum=0, cur_list=[]):
if cur_sum == target:
output.add(tuple(sorted(cur_list[:])))
if c... |
# -*- coding: utf-8 -*-
"""
SQL Constants
"""
INSERT_GPKG_CONTENTS_SHORT = """
INSERT INTO gpkg_contents (
table_name, data_type, identifier, description, last_change, srs_id)
VALUES (?, ?, ?, ?, ?, ?)
"""
INSERT_GPKG_OGR_CONTENTS = """
INSERT INTO gpkg_ogr_contents (table_name, feature_count) ... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
def getxin(x_num:int, x_lists:list, q_num:int, x_site:list):
result = []
for i in x_site:
num = 0
r_min = i[0]
r_max = i[2]
c_min = i[1]
c_max = i[3]
print(r_min,r_max,c_min,c_max)
for j in x_lists:
... |
class ScheduleMixin(object):
"""Add behavior of a document with a "Schedule" section.
This is use to filter document classes in signal handling.
"""
pass
|
print('===== DESAFIO 15 =====')
d = int(input('Quantos dias alugados? '))
km = float(input('Quantos Km rodados? '))
print(f'O total a pagar é R${(d*60)+(km*0.15):.2f}')
|
# -*- coding: utf-8 -*-
""" 03-2022
This sub package holds the screens in ANSI Art used by the game (AU), it
also holds the script to convert the ansi color code in evennia color tags,
and the original ANSI screen.
see README.md for more info.
""" |
# -*- coding: utf-8 -*-
"""Top-level package for dwglasso."""
__author__ = """Ryan J. Kinnear"""
__email__ = 'Ryan@Kinnear.ca'
__version__ = '0.1.0'
|
HISTORY_JSON_PATH = "history.json"
TOKENS_JSON_PATH = "tokens.json"
MESSAGE_TEMPLATE = '''ウェブサイト:{site_name} が更新されました。
{title}
{content}
記事のURLはこちらです。
{content_url}'''
MAX_WORKERS = 4
|
#057 - Validação de Dados
sexo = str(input('informe seu sexo: [M/F] ')).strip().upper()[0]
while sexo not in 'MmFf':
sexo = str(input('dados invalidos. por favor, informe seu sexo: ')).strip().upper()[0]
print(f'sexo {sexo} registrado com secesso ')
|
DEFAULT_SIZE = 128
identity = lambda x: x
regularProbe = lambda hashed, current, n: 7 * current + 1 if n > 0 else hashed
linearProbe = lambda hashed, current, n: hashed + n
quadraticProbe = lambda hashed, current, n: hashed + n * n
pythonProbe = lambda hashed, current, n: 5 * current + 1 + ((hashed >> n) & 0xF)
def re... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 20 16:39:21 2021
@author: bartelsaa
"""
# def save_wav_file(raw_audio, folder="data/spec_samples/", normalize=False, plot=False):
# for idx, flac in enumerate(raw_audio): #164157
# flac = matching[0]
# # print(flac)
# fi... |
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2019 all rights reserved
#
class Explorer:
"""
Base class for visitors of the filesystem object model
"""
# interface
def explore(self, node, **kwds):
"""
Traverse the tree rooted at {node}
"""
... |
def main():
t = raw_input()
[r, s, m, d, n] = [int(z) for z in t.split(' ')]
brands = [int(z) for z in raw_input().split(' ')]
S = []
for _ in range(s):
S.append([int(z) for z in raw_input().split(' ')][1:])
M = []
for _ in range(m):
M.append([int(z) for z in raw_input().split(' ')][1:])
D = []
for _ in ... |
# DP 2D
class Solution:
def minPathSum(self, grid: List[List[int]]) -> int:
m = len(grid)
n = len(grid[0])
for i in range(1, n):
grid[0][i] += grid[0][i-1]
for i in range(1, m):
grid[i][0] += grid[i-1][0]
for i in range(1, m... |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def mergeKLists(self, lists):
k = len(lists)
vir_node = ListNode(0)
cur_node = vir_node
index = [i for i in range(k)]
while len(ind... |
class FromClass(object):
CLASS_FIELD = 42
def __init__(self):
self.instance_field = 100500
|
#!/usr/local/bin/python3
def read_input():
with open("input/2018/day8-input.txt", "r") as file:
data = file.read()
return [int(x) for x in data.split(' ')]
def part1(data):
"""
>>> part1(read_input())
37439
"""
data = data.copy()
queue = [True]
metadata = 0
whi... |
def save_logs_train(path_to_history, details):
path_to_history = path_to_history + '/__hystoryTrain__.txt'
history = open(path_to_history, "a")
history.write(details + '\n')
history.close()
def save_logs_eval(path_to_history, details):
path_to_history = path_to_history + '/__hystoryEval__.txt'
... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
# noinspection PyPep8Naming
class dotdict(dict):
"""
A convenient dot dict class::
a = dotdict({"argument": "value"})
print (a.argument)
Nested dot documentation is not supported.
"""
def __getattr__(self, attr):
return self.get(attr)
__setattr__ = dict.__setitem__
_... |
# coding:utf-8
class Car:
def __init__(self, make, model, year):
self.make = make
self.model = model
self.year = year
self.odometer_reading = 0
self.gas_tank = 42
def get_descriptive_name(self) -> str:
long_name = str(self.year) + ' ' + self.make + ' ' + self.mo... |
class Solution:
def bitwiseComplement(self, n: int) -> int:
if n == 0:
return 1
# XOR n (n1) with a n2 which is all 1
n1 = n
num_bits = 0
while n > 0:
num_bits += 1
n = n >> 1
n2 = pow(2, num_bits) - 1
retu... |
a, b, c, d = input().split()
a = float(a)
b = float(b)
c = float(c)
d = float(d)
media = round((a * 2 + b * 3 + c * 4 + d * 1) / 10, 1)
print(f'Media = {media:.1f}')
if media >= 7:
print('Aluno aprovado.')
elif media >= 5 and media <= 6.9:
print('Aluno em exame.')
e = float(input())
print(f'Nota do exam... |
# Nombre de objetos y sus probabilidades
def name_to_file_path(list_of_names):
dictionary_to_return = {}
for name in list_of_names:
dictionary_to_return[name] = name
return dictionary_to_return
background_color = ["normal_1", "normal_2", "normal_3", "normal_4", "normal_5", "normal_6",
... |
try:
UNICODE_EXISTS = bool(type(unicode))
except NameError:
unicode = str
|
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
inas = [('ina219', 0x40, 'ap_arm', 1, 0.01, 'loc0', True),
('ina219', 0x41, 'ap_g3d', 1, 0.01, 'loc0', True),
('ina219', 0x42, 'ap_int... |
# Copyright (c) 2012 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': 'empty_bundle',
'type': 'loadable_module',
'mac_bundle': 1,
},
{
'target_name': 'resource_bund... |
def min_abs_diff(arr):
arr = sorted(arr)
min_diff = abs(arr[0] - arr[1])
for i in range(1, len(arr) - 1):
diff = abs(arr[i] - arr[i + 1])
if diff < min_diff:
min_diff = diff
return min_diff
|
opção = produtobarato = ''
barato = total = maisde1000 = 0
print('---'*15)
print(f'{"LOJA SUPERLAR BARATÃO":^40}')
print('---'*15)
while True:
produto = str(input('Nome do Produto: ')).strip()
preço = float(input('Preço: R$'))
if barato == 0 and produtobarato == '':
barato = preço
produtoba... |
class BaconCipher:
def __init__(self):
'''This is python implementation of Bacon Cipher'''
self.bacon_dict = {
'A': 'aaaaa', 'B': 'aaaab', 'C': 'aaaba',
'D': 'aaabb', 'E': 'aabaa', 'F': 'aabab',
'G': 'aabba', 'H': 'aabbb', 'I': 'abaaa',
'J': 'abaab', ... |
class Solution:
def isValid(self, s: str) -> bool:
stack = []
parentheses_dict = {
'(': ')',
'[': ']',
'{': '}'
}
for char in s:
if parentheses_dict.get(char) is not None:
stack.append(char)
else:
... |
class NicerPyMailException(Exception):
pass
class ClientException(NicerPyMailException):
pass
class EmailException(NicerPyMailException):
pass
class AuthenticationException(ClientException):
def __str__(self):
return "Authentication failed, check that your username and password are correct... |
unicode_data_to_mirrored_start = {
0: 0,
1: 0,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
7: 0,
8: 0,
9: 0,
10: 0,
11: 0,
12: 0,
13: 0,
14: 0,
15: 0,
16: 0,
17: 0,
18: 0,
19: 0,
20: 0,
21: 0,
22: 0,
23: 0,
24: 0,
25: 0,
26: 0... |
"""
Error handling.
"""
class ProgramError(Exception):
"""Base exception class for errors within the run package.
"""
pass
|
def get_product_list_headers():
return [
{
"key": "number",
"label": "Number",
"link": "",
},
{
"key" : "photo",
"label" : "Photo",
"link" : "",
},
{
"key": "name",
"label": "Produ... |
class Config:
# ==================================================================
# SERVER configuration
# ==================================================================
SERVER = ""
PORT = 4000, 10
ENCODING = "utf-8"
MSG_LENGTH = 1024
|
dia=input('Dia:')
mes=input('Mes:')
ano=input('Ano:')
print('vc nasceu em',dia,'de',mes,'de',ano)
|
num_square = []
for value in range(1,11):
square = value ** 2
num_square.append(square)
print(num_square)
print(min(num_square))
print(max(num_square))
print(sum(num_square)) |
data_points = []
with mp_hands.Hands(static_image_mode=True, max_num_hands=2, min_detection_confidence=0.5) as hands:
for fld_name in sub_folders:
input_dir = Path.cwd()/f"dataset/{fld_name}"
IMAGE_FILES = list(input_dir.rglob("*.jpg"))
for idx, file in enumerate(IMAGE_FILES):
file ... |
# test seqs
SEQ_NAMES = ['MOT17-01', 'MOT17-03', 'MOT17-06', 'MOT17-07',
'MOT17-08', 'MOT17-12', 'MOT17-14']
# Please set your own path here
DATASET_DIR = 'YOUR_PATH/MOT17/test'
# # train seqs
# SEQ_NAMES = ['MOT17-02', 'MOT17-04', 'MOT17-05', 'MOT17-09',
# 'MOT17-10', 'MOT17-11', 'MOT17-13... |
# 🚨 Don't change the code below 👇
height = float(input("enter your height in m: "))
weight = float(input("enter your weight in kg: "))
# 🚨 Don't change the code above 👆
#Write your code below this line 👇
BMI = round(weight / height ** 2)
if BMI < 18.5:
print(f"Your BMI is {BMI}, you are underweigth")
elif BMI ... |
"""Used to determine which optional packages belong to which 'pack' per release."""
# pylint: disable=too-many-locals
class OptionPack(object):
"""Attributes for the 'collection packs' of packages in an Application."""
def __init__(self, source, release):
self._source = source
self._release = ... |
"""
@generated
cargo-raze generated Bazel file.
DO NOT EDIT! Replaced on runs of cargo-raze
"""
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load
load("@bazel_tools//too... |
"""Infrastructure module
=============================
Infrastructure details for the implementation of tables.
"""
|
"""
Leia uma matriz 4x4, conte e escreva quantos valores maiores que 10 ela possui
print(len(matriz[0]))
print(len(matriz[1]))
print(len(matriz[2]))
print(len(matriz[2]))
"""
matriz = [[1, 2, 3, 4], [5, 6, 7, 9], [10, 11, 12, 13], [14, 15, 16, 17]]
#print(matriz)
maiores = [[x for x in lista if x > 10] for lista in ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.