Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
I may be slow to respond.

Helder Oliveira helderc

👻
I may be slow to respond.
View GitHub Profile
@helderc
helderc / bibtex.png
Created Jan 5, 2020 — forked from maxogden/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
@helderc
helderc / kmeans_features.py
Created Sep 24, 2018 — forked from anonymous/kmeans_features.py
Experiment with soft-threshold cosine to k-means centers feature expansion on MNIST data.
View kmeans_features.py
"""Experiment with soft-thresholded k-means feature for MNIST classification
This is experiment is a tentative alternative to approximate kernel expansions
explored on the same dataset by @amueller on this blog post:
http://peekaboo-vision.blogspot.fr/2012/12/kernel-approximations-for-efficient.html
Meant to be run with ``%run script.py`` in IPython.
The 1000-dim k-means based feature expansion should yield ~96% test accuracy
@helderc
helderc / mnist_kernel_approx.py
Created Sep 24, 2018 — forked from amueller/mnist_kernel_approx.py
Comparing Nystroem and Fourier feature based kernel approximation on MNIST
View mnist_kernel_approx.py
# Standard scientific Python imports
import pylab as pl
import numpy as np
from time import time
# Import datasets, classifiers and performance metrics
from sklearn import datasets, svm, pipeline
from sklearn.kernel_approximation import (RBFSampler,
Nystroem)
from sklearn.utils import shuffle
@helderc
helderc / keyboard
Created Sep 11, 2018
Setup of pt_BR keyboard layout in Kubuntu 18.04
View keyboard
# /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="abnt2"
XKBLAYOUT="br"
#XKBVARIANT="nodeadkeys"
#XKBOPTIONS=""
@helderc
helderc / augumented_hdf5_matrix.py
Created Aug 10, 2018 — forked from wassname/augumented_hdf5_matrix.py
How to do data augmentation on a keras HDF5Matrix
View augumented_hdf5_matrix.py
"""Another way, note this one will load the whole array into memory ."""
from keras.preprocessing.image import ImageDataGenerator
import h5py
from keras.utils.io_utils import HDF5Matrix
seed=0
batch_size=32
# we create two instances with the same arguments
data_gen_args = dict(
rotation_range=90.,
@helderc
helderc / pi_mount_usb.md
Created Aug 10, 2018 — forked from etes/pi_mount_usb.md
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi
View pi_mount_usb.md

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following