View os_stats.R
# | |
# do some simple time series analysis on smartphone os data | |
# data: http://www.catb.org/esr/comscore/ | |
# commentary: http://esr.ibiblio.org/?p=4368 | |
# | |
# this file has the market share percentages table | |
osdata = t(read.csv("os_stats.csv",header=TRUE,row.names=1)) | |
# this file has the raw userbase in millions | |
osdata2 = t(read.csv("os_stats_2.csv",header=TRUE,row.names=1)) |
View sketch_mar17a.pde
/* | |
Sampling with the Arduino | |
based on examples from | |
http://sites.goggle.com/site/MeasuringStuff | |
*/ | |
#define FASTADC 1 | |
// defines for setting and clearing register bits | |
#ifndef cbi | |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | |
#endif |
View integrate_fs3.py
import scipy as sp | |
from scipy.integrate import ode | |
from scipy.optimize import fsolve | |
from matplotlib import rc | |
rc('text', usetex=True) | |
tick_size = 'large' | |
label_size = 'xx-large' | |
rc('xtick', labelsize=8) | |
rc('ytick', labelsize=8) | |
rc('legend', fontsize=12) |
View sears_haack.py
import scipy as sp | |
from scipy.integrate import ode | |
from scipy.optimize import fsolve | |
from scipy.optimize import fmin | |
from matplotlib import rc | |
rc('text', usetex=True) | |
tick_size = 'large' | |
label_size = 'xx-large' | |
rc('xtick', labelsize=8) | |
rc('ytick', labelsize=8) |
View integrate_fs2.py
import scipy as sp | |
from scipy.integrate import ode | |
from scipy.optimize import fsolve | |
from matplotlib import rc | |
rc('text', usetex=True) | |
tick_size = 'large' | |
label_size = 'xx-large' | |
rc('xtick', labelsize=8) | |
rc('ytick', labelsize=8) | |
rc('legend', fontsize=12) |
View arctanh_fs.py
import scipy as sp | |
from scipy.integrate import ode | |
from scipy.optimize import fsolve | |
from matplotlib import rc | |
rc('text', usetex=True) | |
tick_size = 'large' | |
label_size = 'xx-large' | |
rc('xtick', labelsize=8) | |
rc('ytick', labelsize=8) | |
rc('legend', fontsize=12) |
View falknerskan_beta_sweep.py
import scipy as sp | |
from scipy.integrate import ode | |
from scipy.optimize import fsolve | |
from matplotlib import rc | |
rc('text', usetex=True) | |
tick_size = 'large' | |
label_size = 'xx-large' | |
rc('xtick', labelsize=8) | |
rc('ytick', labelsize=8) | |
rc('legend', fontsize=12) |
View ice-code.R
ssq = function (x) {sum(x ^ 2)} | |
plotTrend = function (x, st = 1978, en = c(2012, 12), y.pos = NA, x.pos = NA, main.t = "Untitled") { | |
### Get trend | |
trend = lm(window(x, st, en) ~ I(time(window(x, st, en)))) | |
### Initialize variables | |
N = length(window(x, st, en)) | |
I = seq(1:N) / frequency(x) |
View falknerskan.mac
/* Falkner-Skan ODE | |
Zhang, J., Chen, B., 'An iterative method for solving the | |
Falkner-Skan equation' | |
Nachtsheim, P., Swigert, P., 'Satisfaction of Asymptotic Boundary | |
Conditions in Numerical Solution of Systems of Nonlinear Equations | |
of Boundary-Layer Type,' NASA TN D-3004, Lewis Research Center, | |
Cleveland, Oct, 1965. |
View integrate_fs.py
import scipy as sp | |
from scipy.integrate import ode | |
from scipy.optimize import fsolve | |
from matplotlib import rc | |
#rc('text', usetex=True) | |
tick_size = 'large' | |
label_size = 'xx-large' | |
rc('xtick', labelsize=8) | |
rc('ytick', labelsize=8) | |
rc('legend', fontsize=12) |