Skip to content

Instantly share code, notes, and snippets.

View Gustavoo151's full-sized avatar
🎯
Focusing

Gustavo de oliveira Gustavoo151

🎯
Focusing
View GitHub Profile
@Gustavoo151
Gustavoo151 / Criar Qr code.py
Created February 18, 2021 06:03
Criar um Qr code a partir de qualquer link
import pyqrcode
import png
from pyqrcode import QRCode
qrstring = "https://www.youtube.com/" # Lugar do link desejado
url = pyqrcode.create(qrstring)
url.png('C:\local\qr.png', scale=8) # escolher o local do arquivo png com o Qr code
@Gustavoo151
Gustavoo151 / Validador de CPF.py
Created February 23, 2021 09:14
Validador de CPF
CPF = [5, 2, 9, 9, 8, 2, 2, 4, 7, 2, 5]
#Número 1 CPF
cont = cont2 = soma = soma2 = 0
*ult, n1, n2 = CPF
ulti_num2 = ([n1, n2])
mult = 10
for n1 in range(9):
soma += CPF[cont] * mult
cont += 1
mult -= 1
@Gustavoo151
Gustavoo151 / Tradutor.py
Created February 23, 2021 23:06
Tradutor
# Tradutor
frase = input('Digite em inglês: ')
from translate import Translator
traduzir = Translator(from_lang="English", to_lang="Portuguese")
traducao = traduzir.translate(frase)
print(traducao)