Skip to content

Instantly share code, notes, and snippets.

View helderc's full-sized avatar

Helder Oliveira helderc

View GitHub Profile
@wassname
wassname / augumented_hdf5_matrix.py
Last active October 11, 2020 23:32
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.,
@amueller
amueller / mnist_kernel_approx.py
Last active December 11, 2020 14:31
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
@jonlabelle
jonlabelle / vim_cheatsheet.md
Last active December 17, 2020 07:54
Vim Cheatsheet

Vim Cheatsheet

To open a file in Vim:

vim <filename>
Navigation
h move one character left
j move one row down
@ellisgeek
ellisgeek / gist:1006469
Created June 3, 2011 14:55
eggdrop config
#!/usr/bin/eggdrop
# ^- This should contain a fully qualified path to your Eggdrop executable.
#
# $Id: eggdrop.conf,v 1.51 2008-02-16 20:15:30 guppy Exp $
#
# This is a sample Eggdrop configuration file which includes all possible
# settings that can be used to configure your bot.
#
# The pound signs (#) that you see at the beginning of some lines mean that
# the remainder of that line is a comment, or just for your information. By
@thirdwing
thirdwing / GraphicalInterface.R
Created October 5, 2013 03:07
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()
@rtbs-dev
rtbs-dev / pmml_bayesnet.ipynb
Last active March 24, 2023 16:43
Bayesian Network Models in PyMC3 and NetworkX
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@webinista
webinista / pelicanconf.py
Last active April 10, 2023 23:07
A Pelican configuration for having a home page and blog index or landing page.
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# --------------------------------------
# Now compatible with Pelican 4.0.x!
# --------------------------------------
# Added by me
import time
@mkarpp
mkarpp / hyperopt.ipynb
Created November 22, 2019 09:22
hyperopt.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@pratos
pratos / condaenv.txt
Created November 30, 2016 07:01
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder