Skip to content

Instantly share code, notes, and snippets.

@eyliu
eyliu / meep.rb
Created July 27, 2011 15:49
Homebrew formula for MEEP
require 'formula'
class Meep < Formula
url 'http://ab-initio.mit.edu/meep/meep-1.1.1.tar.gz'
homepage 'http://ab-initio.mit.edu/wiki/index.php/Meep'
md5 '415e0cd312b6caa22b5dd612490e1ccf'
depends_on 'harminv'
depends_on 'libctl'
depends_on 'hdf5'
@eyliu
eyliu / machine_cfg.py
Created August 15, 2011 18:43
Configuration for CAMFR on Mac OS X Lion (dependencies from Homebrew and SciPy Superpack)
# This Python script contains all the machine dependent settings
# needed during the build process.
# Compilers to be used.
cc = "/usr/bin/gcc-4.2"
cxx = "/usr/bin/g++-4.2"
f77 = "/usr/local/bin/gfortran"
link = cxx
@eyliu
eyliu / machine_cfg.py
Created August 29, 2011 16:18
Configuration for RODIS for Mac OS X with dependencies provided by Homebrew
# Configuration file for RODIS:
# http://photonics.intec.ugent.be/research/facilities/design/rodis/default.htm
#
# Based on the configuration file for Ubuntu Linux:
# http://photonics.intec.ugent.be/research/facilities/design/rodis/setup-ubuntu-hardy-
# howto.txt
#
# Boost.Python provided by Homebrew: http://mxcl.github.com/homebrew/
cc = "gcc"
cxx = "g++"
#!/usr/bin/env python
# coding: utf-8
# Reproduces Fig. 2 in Moharam, Grann, Pommet, and Gaylord, "Formulation for stable and
# efficient implementation of the rigorous coupled-wave analysis of binary gratings",
# J. Opt. Soc. Am. A 12(5), pp. 1068–1076, 1995 (doi:10.1364/JOSAA.12.001068)
import rodis
from math import pi
import numpy
import pylab
@eyliu
eyliu / grace.rb
Created August 31, 2011 12:04
Homebrew formula for grace
require 'formula'
class Grace < Formula
url 'ftp://plasma-gate.weizmann.ac.il/pub/grace/src/stable/grace-5.1.22.tar.gz'
homepage 'http://plasma-gate.weizmann.ac.il/Grace/'
md5 '672356466f18fe59ed21a8fb44f9851d'
depends_on 'lesstif'
def patches
# Source: http://code.google.com/apis/gdata/articles/python_client_lib.html
import gdata.docs.service
import getpass
# Create a client class which will make HTTP requests with Google Docs server.
client = gdata.docs.service.DocsService()
# Authenticate using your Google Docs email address and password.
username = raw_input('Google Account (e.g. [email protected]): ')
password = getpass.getpass("%s's password: " % username)