Skip to content

Instantly share code, notes, and snippets.

View thiagodeschamps's full-sized avatar

Thiago thiagodeschamps

  • IFF
View GitHub Profile
@thiagodeschamps
thiagodeschamps / tweet_dumper.py
Last active December 20, 2018 01:03 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a text file
import tweepy
def get_all_tweets(screen_name):
auth = tweepy.OAuthHandler('---------------------', '-----------------------------------------------')
auth.set_access_token('------------------------------------','--------------------------=--')
api = tweepy.API(auth)
alltweets = []
#include <stdio.h>
int ehprimo(int);
int main(void){
FILE *fp;
fp = fopen("testefileC.txt", "w");
int i = 0;
def sovem():
print("\n", 55*"=", "\n")
def coleta():
sovem()
print(" Bem-vindo ao calculador de Incertezas Combinadas!")
sovem()
vet = []
@thiagodeschamps
thiagodeschamps / CeasarBruteforce.py
Last active August 24, 2018 17:31
Show all the possible combinations in a Ceasar encripture
def decypher(word):
des = ''
pos = 0
for c in range(0, 26):
for i in word:
if ord(i.upper()) + c > 90:
pos = 64
aux = ord(i.upper()) + c - 90
des += chr(pos + aux)
else:
import requests
from bs4 import BeautifulSoup
estado = str(input('Digite a sigla do seu estado(Ex: SP): ')).upper().strip()
cidade = str(input('Digite o nome de sua cidade(Ex: Jacarei): ')).lower().strip().replace(' ', '')
url = f'http://www.tempoagora.com.br/previsao-do-tempo/{estado}/{cidade}'
response = requests.get(url).text
cont = BeautifulSoup(response, 'lxml')
temp = cont.find('li', class_ = 'dsp-cell degree').text.strip()
print('\n')
print('-='*20)