Skip to content

Instantly share code, notes, and snippets.

View ttm's full-sized avatar

rfabbri ttm

  • IFSC-USP, Juntadados, Nós Digitais, CDTL, ICMC/USP
View GitHub Profile
<script src="d3/d3.js"></script>
<script src="jsnetworkx.js"></script>
pimpao
<script>
var G = new jsnx.Graph(); // or just jsnx.Graph();
G.add_node(1);
G.add_nodes_from([2,3]);
G.add_edge(1,3);
In [9]: aa=n.random.random((10,15))
In [10]: aa.sum(0)
Out[10]:
array([ 3.64094547, 5.48642567, 3.86113699, 3.83109877, 4.1542245 ,
4.43346198, 4.98849284, 4.44047022, 7.10656863, 4.83044752,
5.07810898, 6.59370274, 7.51975778, 3.9132313 , 5.2115709 ])
In [11]: aa.sum(1)
Out[11]:
#-*- coding: utf8 -*-
# implementation of recipe on: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
import numpy as n, pylab as p
# variaveis de parametrizacao
fa=44100.
f=2.
# tipos: LPF, HPF, BPF, BPF2, notch
# APF, peakingEQ, lowShelf, highShelf
@ttm
ttm / vibrato.py
Created October 2, 2012 02:02
Vibrato in PCM audio (fixed!)
#-*- coding: utf8 -*-
#FIXED!!!
import numpy as n, pylab as p, scikits.audiolab as a
fa=44100 # sample rate
Dv=2048 # length of the table
fv=6. # vibrato frequency
nu=.2 # depth in semitones
f=440. # freq of the sound itself
<?php
/**
* Reports view js file.
*
* Handles javascript stuff related to reports view function.
*
* PHP version 5
* LICENSE: This source file is subject to LGPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/copyleft/lesser.html