fix
- Indica que o código commitado está solucionando um problema.hotfix
- Indica que teve uma modificação rápida e o código commitado está solucionando um problema (Ex. Mudança de usuário para login, proxy...).feat
- Indica que o código está incluindo um novo recurso.refactor
- Indica que teve mudanças devido a refatoração, mas que não alterou a sua funcionalidade.build
- Indica que teve modificações em arquivos de build e dependências.test
- Indica quando são realizadas alterações em testes, seja criando, alterando ou excluindo testes unitários. (Não inclui alterações em código)chore
- Indica atualizações de tarefas de build, configurações de administrador, pacotes... como por exemplo adicionar um pacote no gitignore. (Não inclui alterações em código)docs
- Indica que houveram mudanças/adição na documentação, como por exemplo no Readme do seu repositório. (Não inclui alterações em código).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import pika | |
import pika.exchange_type | |
from learning_rabbitmq.samples.dead_letter_exchange.settings import ( | |
DEAD_LETTER_EXCHANGE, | |
DEAD_LETTER_QUEUE, | |
DEAD_LETTER_ROUTING_KEY, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Encryption with AES-CBC | |
# | |
# Python 3.11.3 | |
# pkcs7==0.1.0 | |
# pycryptodome==3.20.0 | |
# Adapted from https://gist.github.com/adrianlzt/d5c9657e205b57f687f528a5ac59fe0e | |
import binascii | |
import struct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Update the apt package index and install packages to allow apt to use a repository over HTTPS: | |
sudo apt-get update | |
sudo apt-get install \ | |
ca-certificates \ | |
curl \ | |
gnupg | |
# 2. Add Docker’s official GPG key: | |
sudo install -m 0755 -d /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium.webdriver import Remote, ChromeOptions | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
import zipfile | |
PROXY_HOST = '192.168.3.2' # rotating proxy or host | |
PROXY_PORT = 8080 # port | |
PROXY_USER = 'proxy-user' # username | |
PROXY_PASS = 'proxy-password' # password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_admin(func): | |
def wrapper(*args, **kwargs): | |
for item in args: | |
if item['is_admin']: | |
yield item | |
return wrapper | |
@is_admin | |
def foo(user): |
Can works fine in others clouds, but I've test only in AWS.
Tested in EC2, Ubuntu 18.04
scp -i "{your_key.pem}" -r {project_folder} {your_user}@{your_public_server_ip}:~/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import re | |
from bs4 import BeautifulSoup | |
import requests | |
def get_pinned_items(url): | |
response = requests.get(url) | |
soup = BeautifulSoup(response.text, "html.parser") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorTheme": "Monokai", | |
"window.zoomLevel": 0, | |
"editor.insertSpaces": true, | |
"editor.tabSize": 4, | |
"explorer.confirmDelete": false, | |
"workbench.startupEditor": "newUntitledFile", | |
"latex-workshop.view.pdf.viewer": "external", | |
"python.linting.pylintEnabled": false, | |
"python.linting.flake8Enabled": true, |