Skip to content

Instantly share code, notes, and snippets.

View thiagodeschamps's full-sized avatar

Thiago thiagodeschamps

  • IFF
View GitHub Profile
import pandas as pd
import sqlite3
import psycopg2
import pandas.io.sql as sqlio
import mysql.connector
import pymongo
def extract_from_excel(excel_file):
return pd.read_excel(excel_file)
from abc import ABC, abstractmethod
import pandas as pd
import sqlite3
import psycopg2
import pandas.io.sql as sqlio
import mysql.connector
import pymongo
import boto3
from botocore.exceptions import NoCredentialsError
// Informações do estudante
// Nome: Thiago
// Curso: Engenharia de Computacao
// RA: 758671
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include <math.h>
@thiagodeschamps
thiagodeschamps / .py
Last active December 1, 2019 19:12
Decomposicao de matriz em LU com pivoteamento
def matrixPrinter(A):
print('\n'.join([''.join(['{:4}'.format(item) for item in row])
for row in A]))
def LUPivo(matrix):
n = len(matrix)
M = [[0 for x in range(n)]
@thiagodeschamps
thiagodeschamps / multDinMatrix.c
Last active March 20, 2019 16:17
Matrix multiplication using dynamic allocation.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define D 100
#define MAX_VALUE 100
void randomize(int **matrix, int l){
int n;
@thiagodeschamps
thiagodeschamps / wordFinder.c
Last active February 4, 2019 15:28
find a specific sequence of letters in a string
#include <stdio.h>
int str_len(char s[]);
int compare(char s1[], char s2[]);
int main(void){
int n, i, j, k, l = 0;
scanf("%d",&n);
@thiagodeschamps
thiagodeschamps / polingraphics.cpp
Created December 22, 2018 13:46
Uso de polimorfismo e interface grafica, recebendo comandos do teclados para mover os objetos
/*
https://github.com/jakleg
INTRUCOES:
CONTROLES:
- CIRCULO: W, A, S, D;
- QUADRADO: F, T, G, H;
@thiagodeschamps
thiagodeschamps / ytdown.py
Last active December 22, 2018 04:33
Python script that search and download videos from youtube
from bs4 import BeautifulSoup
import requests
import pytube
import os
if not os.path.exists('videos'):
os.makedirs('videos')
os.chdir('videos')
@thiagodeschamps
thiagodeschamps / DownInsta.py
Last active December 21, 2018 13:45
Python script to download images from instagram
import requests
from bs4 import BeautifulSoup
import urllib.request
import json
# Variable used to order and naming the pictures downloaded
x = 1
def get_url(user_):
@thiagodeschamps
thiagodeschamps / exemplo_tweepy.py
Last active December 20, 2018 13:56 — forked from marcoscastro/exemplo_tweepy.py
Obtendo tweets de usuário com Python e tweepy
import tweepy
auth = tweepy.OAuthHandler('46pvnSwIVylfWepbPsP4433wL', 'xWDPHaUkk0ub93qj1DaYgJcO8QtkPUhNFIE7uBAvzbSVLLpLzR')
auth.set_access_token('1952916806-9WbU9ROPLd4aVPprQZqWJhaW4RSXrBw4oK8A4Ow','gW5iuYPtrTxVhPmQxBemsKz6jCAOqbYx1fT0ewKHFyAkG')
api = tweepy.API(auth)
def obter_tweets(usuario, limite):
resultados = api.user_timeline(screen_name=usuario, count=limite)
tweets = []
for r in resultados: