Skip to content

Instantly share code, notes, and snippets.

View paulaksm's full-sized avatar

Paula Moraes paulaksm

View GitHub Profile
@paulaksm
paulaksm / config.sh
Created March 12, 2022 01:15
Installing HP LaserJet P1005 on Debian 10 (Buster)
sudo apt install hplip
sudo hp-setup -i # select option 'd' to download and update drivers
# Open CUPS and manually install the printer with the new drivers
http://localhost:631/
We can't make this file beautiful and searchable because it's too large.
node_from,node_to,ALOC
0,0,0.097273
14,0,0.214358
23,0,0.006121
54,0,0.011771
67,0,0.119228
126,0,0.99434
128,0,0.578946
28,0,0.156617
192,0,0.008417
ID TP_ATIVO CD_ISIN CD_ATIVO NM_FUNDO_COTA CD_PAIS TP_APLIC
0 Título público federal BRSTNCLTN7T9 Operações Compromissadas
1 Letra Financeira Depósitos a prazo e outros títulos de IF
3 Debênture simples Debêntures
4 Ação ordinária USA Investimento no Exterior
6 Título público federal BRSTNCLF1R82 Títulos Públicos
8 Outros LUX Investimento no Exterior
9 Título público federal BRSTNCLF1R74 Títulos Públicos
11 Título público federal BRSTNCLF1R58 Operações Compromissadas
11 Título público federal BRSTNCLF1R58 Títulos Públicos
We can't make this file beautiful and searchable because it's too large.
ID,TP_FUNDO,CNPJ_FUNDO,DENOM_SOCIAL
0,FI,00.017.024/0001-53,FUNDO DE INVESTIMENTO RENDA FIXA EXPONENCIAL
1,FI,00.322.699/0001-06,BRADESCO H FUNDO DE INVESTIMENTO RENDA FIXA REFERENCIADO DI CRÉDITO PRIVADO LONGO PRAZO EXECUTIVO
2,FI,00.539.553/0001-17,GUIDE CASH FUNDO DE INVESTIMENTO EM COTAS DE FUNDOS DE INVESTIMENTO MULTIMERCADO CRÉDITO PRIVADO
3,FI,00.840.011/0001-80,BTG PACTUAL YIELD DI FUNDO DE INVESTIMENTO RENDA FIXA REFERENCIADO CRÉDITO PRIVADO
4,FI,01.656.101/0001-88,MCR-PRINCIPAL FUNDO DE INVESTIMENTO EM AÇÕES - BDR NÍVEL I
5,FI,09.522.470/0001-90,BRADESCO H FUNDO DE INVESTIMENTO RENDA FIXA LONGO PRAZO PREÇOS
6,FI,02.097.253/0001-50,SAFRA PRIVATE FUNDO DE INVESTIMENTO EM AÇÕES
7,FI,09.523.207/0001-15,BRADESCO FUNDO DE INVESTIMENTO MULTIMERCADO TEJO
8,FI,00.073.041/0001-08,BB BESC RENDA FIXA PRÁTICO CRÉDITO PRIVADO FUNDO DE INVESTIMENTO
@paulaksm
paulaksm / run.json
Created September 11, 2020 05:24
Prevent Colab from disconnecting
function ClickConnect(){
console.log("Clicked on connect button");
document.querySelector("#ok").click()
}
setInterval(ClickConnect,60000)
@paulaksm
paulaksm / plotly.json
Last active May 31, 2020 21:53
Teste
"{\"data\":[{\"line\":{\"width\":4},\"name\":\"Rural\",\"type\":\"scatter\",\"x\":[2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000],\"y\":[null,93.0,93.0,93.0,93.0,93.0,92.0,90.0,89.0,87.0,86.0,85.0,83.0,82.0,81.0,79.0,78.0,76.0]},{\"line\":{\"width\":4},\"name\":\"Urban\",\"type\":\"scatter\",\"x\":[2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000],\"y\":[100.0,100.0,100.0,100.0,100.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0,99.0]},{\"line\":{\"width\":4},\"name\":\"Total\",\"type\":\"scatter\",\"x\":[2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000],\"y\":[null,99.0,99.0,99.0,99.0,99.0,99.0,98.0,98.0,98.0,98.0,98.0,97.0,97.0,97.0,97.0,96.0,96.0]}],\"layout\":{\"template\":{\"data\":{\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5}},\"type\":\"bar\"}],\"barpolar\":[{\"marker\":
@paulaksm
paulaksm / conjugate_gradient_method.py
Last active May 12, 2019 03:49
AlgeLin - Métodos Iterativos Modernos: Gradiente e Gradiente Conjugado
import numpy as np
A = np.array([[5,1,1], [1,4,1], [1,1,3]])
b = np.array([10, 12,12])
x = np.array([0,0,0])
def conjugate_gradient_method(A, b, x=np.array([0,0,0]), n_iter=5):
d = b - np.dot(A,x)
r = d
for i in range(n_iter):
@paulaksm
paulaksm / code.txt
Created February 1, 2019 16:46
GPU memory available on Google Colab
!ln -sf /opt/bin/nvidia-smi /usr/bin/nvidia-smi
!pip install gputil
import psutil
import humanize
import os
import GPUtil as GPU
GPUs = GPU.getGPUs()
# XXX: only one GPU on Colab and isn’t guaranteed
gpu = GPUs[0]
@paulaksm
paulaksm / hdf5_example.py
Created November 26, 2018 14:51
Generate HDF5 files for array images with their labels
''' Generate HDF5 files for array images and their labels... unfortunately this function won't work inside the Kaggle kernel
because of its limited resources
'''
def create_data_labels(height=256, width=455, channels=3, filename='driving'):
data_filename = filename + '_data'
label_filename = filename + '_labels'
txt_labels = pd.read_csv('../input/driving_dataset/driving_dataset/data.txt', sep=" ", header=None)
path = '../input/driving_dataset/driving_dataset/'
hdf5_file = h5py.File('self_driving_dataset.hdf5', mode='w')
hdf5_file.create_dataset(data_filename, (txt_labels.shape[0], height, width, channels), np.uint8)
@paulaksm
paulaksm / get-ieee.txt
Created August 26, 2018 04:15
Download IEEE papers from command line
# If under a valid institutional IP address, the followng command will download an IEEE hosted paper of a specific <ID-NUMBER>
and saved it as paper.pdf
wget "http://ieeexplore.ieee.org/stampPDF/getPDF.jsp?tp=&isnumber=&arnumber=<ID-NUMBER>" -O paper.pdf