Skip to content

Instantly share code, notes, and snippets.

Avatar

João Felipe Santos jfsantos

View GitHub Profile
@jfsantos
jfsantos / index.Rmd
Created Aug 5, 2012
My .Rmd test file
View index.Rmd
---
# My First Slidify Deck
by Joao Felipe Santos
---
### Slide 1
This is an unordered list
@jfsantos
jfsantos / index.html
Created Aug 5, 2012
Slidify compilation result
View index.html
<!DOCTYPE html>
<!--
Google HTML5 slide template
Authors: Luke Mah?? (code)
Marcin Wichary (code and design)
Dominic Mazzoni (browser compatibility)
Charles Chen (ChromeVox support)
@jfsantos
jfsantos / presentation.bib
Created Aug 5, 2012
Attachments for issue #11 @ cboettig/knitcitations
View presentation.bib
@article{Lord1994,
abstract = {Describes the Autism Diagnostic Interview-Revised (ADI-R), a revision of the Autism Diagnostic Interview, a semistructured, investigator-based interview for caregivers of children and adults for whom autism or pervasive developmental disorders is a possible diagnosis. The revised interview has been reorganized, shortened, modified to be appropriate for children with mental ages from about 18 months into adulthood and linked to ICD-10 and DSM-IV criteria. Psychometric data are presented for a sample of preschool children.},
author = {Lord, C and Rutter, M and {Le Couteur}, A},
issn = {0162-3257},
journal = {Journal of autism and developmental disorders},
keywords = {Algorithms,Autistic Disorder,Autistic Disorder: classification,Autistic Disorder: diagnosis,Autistic Disorder: psychology,Caregivers,Caregivers: psychology,Child,Female,Humans,Intellectual Disability,Intellectual Disability: classification,Intellectual Disability: diagnosis,Intellectual Disability: psychology,Intervie
View gist:5091135
% shepardtones.m - plays the shepard tones
% based on an example I found here: http://hebb.mit.edu/courses/9.29/2003/athena/auditory/matlab/shepardtones.m
% adjustable parameters
max_time = 2; % time for each tone
max_repeat = 3; % number of loops
A = 440; % "base frequency"
num_harm = 7; % number of harmonics used for each tone
sigmasq = 1; % variance of the amplitude for each partial
View juliabench.jl
function groupby{T}(fn::Function, seq::Array{T})
dict = Dict{Any, Array{T}}();
for item in seq
key = fn(item);
if !haskey(dict, key)
dict[key] = [];
end
push!(dict[key], item);
end
return dict;
@jfsantos
jfsantos / test_ccall.jl
Last active Oct 16, 2018
Passing structures and arrays back and forth in Julia with ccall
View test_ccall.jl
immutable Cdvec
val::Ptr{Cdouble}
len::Clong
end
a = [1.0, 2.0, 3.0]
b = [3.1, 4.2, 7.3]
Ca = Cdvec(pointer(a), length(a))
Cb = Cdvec(pointer(b), length(b))
@jfsantos
jfsantos / test_phone.yaml
Created Mar 7, 2014
pylearn2 model using MLPWithSource and CompositeLayerWithSource
View test_phone.yaml
!obj:pylearn2.train.Train {
dataset: &train !obj:research.code.pylearn2.datasets.timit.TIMIT {
which_set: 'train',
frame_length: &flen 160,
frames_per_example: &fpe 1,
samples_to_predict: &ylen 1,
n_next_phones: 1,
n_prev_phones: 1,
#start: 0,
#stop: 100,
@jfsantos
jfsantos / build.jl
Last active Aug 29, 2015
BinDeps OSX problem
View build.jl
using BinDeps
@BinDeps.setup
@unix_only begin
ecos = library_dependency("ecos",aliases=["libecos"])
end
provides(Sources, URI("https://github.com/ifa-ethz/ecos/archive/master.zip"),
[ecos], os = :Unix, unpacked_dir="ecos-master")
View ltsd_vad.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wave
import numpy as np
import scipy as sp
WINSIZE=8192
sound='sound.wav'
def read_signal(filename, winsize):