git branch -D <branch>
git push origin --delete <branch>
git fetch -p
https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/
git branch -D <branch>
git push origin --delete <branch>
git fetch -p
https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/
| from datetime import timezone, timedelta | |
| tz = timezone(timedelta(hours=-3)) | |
| datetime.now(tz) | |
| datetime.now(tz).isoformat() |
| class ClienteCreateView(CreateView): | |
| model = Cliente | |
| template_name = 'clientes/cliente_form.html' | |
| form_class = ClienteForm | |
| success_url = reverse_lazy('listar_clientes') | |
| def form_valid(self, form): | |
| """ | |
| If the form is valid, save the associated model. | |
| https://ccbv.co.uk/projects/Django/5.0/django.views.generic.edit/CreateView/#form_valid |
| from ninja import Router, Schema | |
| router = Router() | |
| # models.py | |
| class EstadoChoices(models.TextChoices): | |
| AC = 'AC', 'Acre' | |
| AL = 'AL', 'Alagoas' | |
| AP = 'AP', 'Amapá' | |
| AM = 'AM', 'Amazonas' |
| #!/bin/bash | |
| : << 'COMMENT' | |
| Create one folder and files inner this folder. | |
| Example | |
| $ source teste.sh "folder1/{file1.txt,file2.txt}" "folder2/{file3.txt,file4.txt}" | |
| COMMENT | |
Escrever mensagens de commit claras e informativas é uma prática crucial para manter um histórico de código legível e compreensível. Aqui estão alguns exemplos de mensagens de commit para diferentes tipos de alterações em um projeto Python:
Feature: Adição de funcionalidade para calcular a média de uma lista:
Adiciona função calculate_media() para calcular a média de uma lista de números
Bugfix: Correção do erro ao tentar calcular média de lista vazia:
| def unpack_product_info(**kwargs): | |
| """ | |
| Desempacota um dicionário contendo informações sobre um produto em variáveis. | |
| Parâmetros: | |
| - kwargs (dict): Dicionário com chaves 'produto', 'título' e 'preço'. | |
| Retorna: | |
| - Tupla: Variáveis desempacotadas (produto, título, preço). | |
| """ |
How to create sh commands from txt file contains tree structure of directories and files?
This program convert tree structure of directories and files generate a sh with necessary commands to generate that file tree.
He read input.txt and convert to output.sh.
This is result:
pip install git+https://github.com/rg3915/django-seed.git@main