Skip to content

Instantly share code, notes, and snippets.

View rebordao's full-sized avatar

Antonio Rebordao rebordao

View GitHub Profile
@rebordao
rebordao / autoStarter.sh
Last active August 29, 2015 14:02
An utility to start up automatically a set of Virtual Machines if they are not running.
#!/usr/bin/env bash
:'
# VM AutoStarter
An utility to start up automatically a set of Virtual Machines
if they are not running.
This utility was tested on a Debian 7.5 with VirtualBox 4.3.
## Usage
@rebordao
rebordao / quicksort.R
Last active August 29, 2015 14:11
A quicksort implementation to sort an array without using conventional functions.
"
A quicksort implementation to sort an array without using conventional functions.
It has two phases and it's a divide and conquer approach:
- partition phase
- sort phase
There is a nice video that demonstrates this concept using
Hungarian dance at https://www.youtube.com/watch?v=ywWBy6J5gz8
"
@rebordao
rebordao / mergesort.R
Last active August 29, 2015 14:13
A mergesort implementation to sort an array without using conventional functions.
"
A mergesort implementation to sort an array without using conventional functions.
This algorithm has 2 stages:
- divides the array into a list of sublists where each sublist has just 1 number.
- then merge bottom-up until it outputs the sorted array.
These videos explain everything you need to know about mergesort:
- https://class.coursera.org/algo-003/lecture/1
- https://class.coursera.org/algo-003/lecture/2
@rebordao
rebordao / Output of docker inspect <name of container>
Last active October 12, 2016 16:30
Output of docker inspect <name of container>
[
{
"Id": "28f08de53fba9115283cfcd759866c30c9ee37912a5ab968182123e4aafa3023",
"Created": "2016-10-12T15:43:40.86284117Z",
"Path": "/init",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
@rebordao
rebordao / trains_nn.m
Created October 23, 2020 10:06
Trains a network by backpropagation through time or by CTC
function [net hid_without_bias output] = trains_nn(net, data, targets, phonemes_id);
% This function trains a network by backpropagation, by backpropagation
% through time or by connectionist temporal classification.
%
% INPUTS:
% net contains the topology and the user-defined training parameters;
% data is the train data
% targets are the real targets
% phonemes_id is the indices of the phonemes in the dictionary file
%
@rebordao
rebordao / batch_nn.m
Created October 23, 2020 10:09
Speech recognizer for TIMIT samples
function batch_nn(architecture, nr_hidden_units, learning_rate, mom, regularization_term, verbose)
% This function implements a speech recognizer for TIMIT samples.
% Architecture: a FFNN trained by Back Propagation; a RNN trained by BPTT or CTC; or a Reservoir trained via ctc.
%
% INPUTS:
% architecture can be ffnn, rnn or reservoir
% nr_hidden_units is the nr of hidden units
% learning_rate is the learning rate for the weights' update
% mom is the momemtum rate
% regularization_term defines the regularization