See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
def update_or_create_user_info(parameters): | |
user_info = UserInfo( | |
type=parameters.get('type'), | |
company_number=parameters.get('company_number'), | |
phone=parameters.get('phone'), | |
name=parameters.get('name') | |
) | |
user_info_from_get = user_info_repository.get( | |
type=user_info.type, | |
company_number=user_info.company_number |
from dataclasses import dataclass | |
@dataclass | |
class UserInfo(): | |
"""Entity to establish User info.""" | |
id: int = None | |
type: str = None | |
company_number: int = None |
So I have a template picture (1080 by 1080 pixels) and I have a spreadsheet on excel filled with different sayings/quotes. | |
I need a python program that I can use to extract each line on the excel document and paste it on the template picture | |
and then generate a png or jpeg picture for each line in the excel file (so multiple pictures created instantly). | |
It needs to be able to | |
1. Change the color of the text | |
2. Change the font of the text | |
3. Change position of the text | |
4. Be able to create multiple images from the excel file in one go (I want it to be able to read the excel | |
file and then read the specifications listed above #1, 2 and 3 and then apply them to all the different lines of the excel |
◀◀ buffers | |
import sys, io | |
try: | |
from pip import main as pipmain | |
except: | |
from pip._internal import main as pipmain | |
stdout = sys.stdout | |
sys.stdout = io.StringIO() | |
bb = pipmain(['show', "create-aio-app"]) |
## chamar ela colocando em uma lista pra ser usada na lista de pesos | |
def normalizar(lista_elementos): | |
lista_final_normalizada = [] | |
lista_dos_somados = [] | |
lista_normalizada = [] | |
lista_sem_zero = [] | |
for elemento in lista_elementos: | |
soma = sum(elemento) | |
lista_dos_somados.append(soma) |
import unittest | |
import platform | |
from normalizador import normalizar, normalizar_alternativas, peso_criterios, soma_alternativa_por_criterio, multiplica_final | |
class EnvTest(unittest.TestCase): | |
def test_python_version(self): | |
self.assertEqual(platform.python_version(), '3.6.5') |
compras = [] | |
total = 0 | |
resposta = 's' | |
valid_preco = False | |
while resposta == 's' or valid_preco == False: | |
produto = input('o que deseja comprar? ') | |
preco = input('qual o valor do produto? ') | |
resposta = input( | |
'deseja comprar mais alguma coisa? S ou N: ').lower() |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |