Skip to content

Instantly share code, notes, and snippets.

View danieljfarrell's full-sized avatar

Daniel danieljfarrell

View GitHub Profile
@danieljfarrell
danieljfarrell / simple_semiconductor_rates.py
Created April 2, 2012 04:46
Very simple semiconductor optical generation and recombination processes using FiPy
from fipy import *
#
# Solution mesh
#
nx = 200
dx = 0.01
L = nx * dx
mesh = Grid1D(nx = nx, dx = dx)
@danieljfarrell
danieljfarrell / DBR2.py
Created February 6, 2012 08:39
Extended version of CAMFR Planar 1D example to include absolute electric field and Poynting vector profiles
#!/usr/bin/env python
#########################################################################################
#
# planar 1D DBR modified to export absolute electric field and Poynting vector profiles
#
########################################################################################
from camfr import *
@danieljfarrell
danieljfarrell / happytime.py
Created January 11, 2012 05:33
Intercontinental StarCraft 2 Happy Time Finder
from datetime import *
from clint.textui import colored, columns
#
# Using a module called Clint to take care of printing columns and text colour
#
# Examples: http://www.nicosphere.net/clint-command-line-library-for-python/
# Github: https://github.com/kennethreitz/clint
# Install: pip install clint
@danieljfarrell
danieljfarrell / gist:1569734
Created January 6, 2012 08:37
autogen failure on MacOS Lion
brew install autogen --use-clang
==> Downloading http://ftpmirror.gnu.org/autogen/rel5.14/autogen-5.14.tar.gz
File already downloaded in /Users/daniel/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/autogen/5.14
==> make
make all-recursive
Making all in compat
:
Making all in snprintfv
for f in filament.c format.c printf.c mem.c stream.c custom.c ; do echo "#include \"$f\"" ; done > snv.c
import DAQ
daq = DAQ("Dev1/ai0:2")
volts = daq.voltage()
amps = daq.current()