Skip to content

Instantly share code, notes, and snippets.

Dionnys Santos Marinho dionnys5

View GitHub Profile
ListaOriginal = [1,2,3,4,5]
print("Original:", ListaOriginal)
ListaPalavras = ["Uva","Pera","Banana","Morango"]
print("Original:", ListaPalavras,'\n')
SomaCinco = list(map(lambda x: x + 5, ListaOriginal))
print("Soma +5 a todos os valores:",SomaCinco)
MultiplicaDois = list(map(lambda x: x * 2, ListaOriginal))
print("Multiplica todos os valores por 2:",MultiplicaDois)
dionnys5 /
Created Sep 27, 2016
Salva em txt os ultimos tweets do UOL
import urllib
import urllib.request
from bs4 import BeautifulSoup
url = ""
WebPage = urllib.request.urlopen(url)
soup = BeautifulSoup(WebPage,"html.parser")
print("Tweet Scraping...")
with open("UolTweets.txt","w") as f:
for tweets in soup.findAll('div',{"class":"content"}):
dionnys5 /
Last active Sep 20, 2016
Python Random
import string
phrase = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr "\
"gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq()"\
"gq pcamkkclbcb. lmu ynnjw ml rfc spj!"
norm= "abcdefghijklmnopqrstuvwxyz"
decrip= "cdefghijklmnopqrstuvwxyzab"
trantab = phrase.maketrans(norm, decrip)
You can’t perform that action at this time.