Skip to content

Instantly share code, notes, and snippets.

View helderc's full-sized avatar

Helder Oliveira helderc

View GitHub Profile
@helderc
helderc / pi_mount_usb.md
Created August 10, 2018 11:50 — forked from etes/pi_mount_usb.md
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

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

@helderc
helderc / augumented_hdf5_matrix.py
Created August 10, 2018 11:51 — forked from wassname/augumented_hdf5_matrix.py
How to do data augmentation on a keras HDF5Matrix
"""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 / keyboard
Created September 11, 2018 12:17
Setup of pt_BR keyboard layout in Kubuntu 18.04
# /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="abnt2"
XKBLAYOUT="br"
#XKBVARIANT="nodeadkeys"
#XKBOPTIONS=""
@helderc
helderc / mnist_kernel_approx.py
Created September 24, 2018 13:06 — forked from amueller/mnist_kernel_approx.py
Comparing Nystroem and Fourier feature based kernel approximation on MNIST
# 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 / kmeans_features.py
Created September 24, 2018 13:07 — forked from anonymous/kmeans_features.py
Experiment with soft-threshold cosine to k-means centers feature expansion on MNIST data.
"""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 / bibtex.png
Created January 5, 2020 21:07 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@helderc
helderc / GraphicalInterface.R
Created August 31, 2021 20:20 — forked from thirdwing/GraphicalInterface.R
The demo for RGtk2 in R
# required: RGtk2
calculateGUI <- function() {
## Run on "OK"
performStatistics <- function(button, user.data) {
res <- NULL
d <- NULL
error <- NULL
warning <- NULL
# Get the information about data and the file
the.file <- filename$getText()