Skip to content

Instantly share code, notes, and snippets.

jstults

Block or report user

Report or block jstults

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jstults
jstults / os_stats.R
Created Jun 2, 2012
simple time-series analysis of android market share data
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))
@jstults
jstults / sketch_mar17a.pde
Created Mar 18, 2012
Sampling Arduino Pins Quickly
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
@jstults
jstults / integrate_fs3.py
Created Feb 26, 2012
Square Root Map for Falkner-Skan
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)
@jstults
jstults / sears_haack.py
Created Feb 13, 2012
Script to generate a Sears-Haack body for a mini-Estes motor
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)
@jstults
jstults / integrate_fs2.py
Created Feb 5, 2012
Non-uniqueness of Falkner-Skan solutions with adverse pressure gradient
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)
@jstults
jstults / arctanh_fs.py
Created Feb 5, 2012
Hyperbolic tangent point distribution for Falkner-Skan
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)
@jstults
jstults / falknerskan_beta_sweep.py
Created Feb 5, 2012
Parameter sweep for Falkner-Skan flat plate flow
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)
@jstults
jstults / ice-code.R
Created Feb 4, 2012
Comparison of Northern Hemisphere Perennial and Seasonal Sea Ice
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)
@jstults
jstults / falknerskan.mac
Created Jan 29, 2012
Maxima definition of Falkner-Skan governing equations
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.
@jstults
jstults / integrate_fs.py
Created Jan 29, 2012
Falkner-Skan IVP flat plate
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)
You can’t perform that action at this time.