This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Created on Mon Sep 09 23:06:21 2013 | |
# @author: Danilo J. S. Bellini | |
""" | |
AudioLazy time-variant resonator helping instantaneous frequency measurements. | |
""" | |
from __future__ import print_function | |
from audiolazy import (sHz, sinusoid, gauss_noise, line, z, inf, resonator, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [maxtab, mintab]=peakdet(v, delta, x) | |
%PEAKDET Detect peaks in a vector | |
% [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local | |
% maxima and minima ("peaks") in the vector V. | |
% MAXTAB and MINTAB consists of two columns. Column 1 | |
% contains indices in V, and column 2 the found values. | |
% | |
% With [MAXTAB, MINTAB] = PEAKDET(V, DELTA, X) the indices | |
% in MAXTAB and MINTAB are replaced with the corresponding | |
% X-values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from math import pi, log | |
import pylab | |
from scipy import fft, ifft | |
from scipy.optimize import curve_fit | |
i = 10000 | |
x = np.linspace(0, 3.5 * pi, i) | |
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 * | |
np.random.randn(i)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib2 | |
r = urllib2.urlopen("http://blockchain.info/charts/trade-volume?timespan=all&format=json") | |
tradevol_string = r.read() | |
r.close() | |
r = urllib2.urlopen("http://blockchain.info/charts/estimated-transaction-volume-usd?timespan=all&format=json") | |
txvol_string = r.read() | |
r.close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'time' | |
require 'erb' | |
require 'cgi' | |
filename = "~/.gitlogger" | |
## File format, One per line | |
# Repo Name:/path/to/base | |
dayone = false # log to day one? (true or false) | |
textlog = false # "~/Dropbox/nvALT2.2/GitLogger.md" # set to false to disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/matplotlib/matplotlib/issues/881 | |
# Several of the ColorBrewer maps are "qualitative", meaning | |
# they are just a group of colors that can be used together | |
# for categories of data. So I remapped Accent to segments | |
# instead of continuous: | |
# Actually, these should be used with ListedColormap, and | |
# the number of colors should depend on the number of | |
# categories in the data, with colors removed from the | |
# list in a certain order? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calculation starts by establishing distinctions between things or states of the world, and by imagining and estimating courses of action associated with things or with those states as well as their consequences. | |
In his analysis of the vocabulary of accounting and estimation in Latin sources Emile Benveniste (1993) notes that there is a close link between computing and assessing or estimating. He also points out a remarkable characteristic of this vocabulary: the explicit reference to a material movement of detachment (cutting) and re-attachment (moving towards a result). | |
The emphasis on the movement of material – also found in the ‘centre of calculation’ concept developed by Bruno Latour (1987) – helps us to formulate a very general definition of calculation as a three-step process: | |
- First, in order to be calculated, the entities taken into account have to be detached. A finite number of entities are moved, arranged and ordered in a single space. This single space has to be conceived of in a very broad sen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Copyright (C) 2011 by Ben Noordhuis <info@bnoordhuis.nl> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |