Skip to content

Instantly share code, notes, and snippets.

View leonsolon's full-sized avatar

Leon Silva leonsolon

View GitHub Profile
@leonsolon
leonsolon / diadospais.py
Created August 14, 2022 22:14
Dia dos PYS!
bytes.fromhex('46454c495a').decode('utf-8')
bytes.fromhex('444941').decode('utf-8')
bytes.fromhex('444f5320504149532121').decode('utf-8')
@leonsolon
leonsolon / quotes.ipynb
Created July 24, 2022 18:52
CSV with trailing quotes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leonsolon
leonsolon / jornada-formula-excel.ipynb
Last active April 27, 2022 17:59
Jornada - Dúvida Fórmula Excel
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leonsolon
leonsolon / Grupo Python DS - Duvida Erica.ipynb
Created April 6, 2022 13:46
Grupo Python DS - Duvida Erica
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leonsolon
leonsolon / marvel.py
Last active March 7, 2022 03:24
Marvel API Example
import datetime
import hashlib
from time import sleep
import requests
def hash_params(pub_key, priv_key, ts):
"""
Função para gerar o hash da requisição
@leonsolon
leonsolon / pandas_slice_and_date.ipynb
Created December 28, 2021 15:00
Pandas slice + date format
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leonsolon
leonsolon / pandas_agg_first_example.ipynb
Created November 30, 2021 03:24
Explain how first works in groupby + agg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leonsolon
leonsolon / xticks.py
Created November 29, 2021 04:59
Exemplo Matplotlib com ticks e labels customizados
import numpy as np
import matplotlib.pyplot as plt
x = [0,5,9,10,15]
y = [0,1,2,3,4]
plt.plot(x,y)
labels = ['l' + str(i) for i in range(16)]
plt.xticks(np.arange(min(x), max(x)+1, 1.0), labels=labels)
plt.show()
@leonsolon
leonsolon / colunas_tamanho_fixo.ipynb
Created November 19, 2021 02:03
Tratamento arquivo colunas tamanho fixo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.