Programming projects

Scikit-Monaco

Monte Carlo integration library for Python.

A code snippet is worth a thousand words. Let's integrate sqrt(x**2 + y**2 + z**2) in the unit cube:

>>> from skmonaco import mcquad
>>> from math import sqrt
>>> result, error = mcquad(
...     lambda xs: sqrt(xs[0]**2+xs[1]**2+xs[2]**2),
...     npoints=1e6, xl=[0.,0.,0.], xu=[1.,1.,1.])
>>> print "{} +/- {}".format(result,error)
0.960695982212 +/- 0.000277843266684

Monte Carlo integration is particularly suited to the calculation of high dimensional integrals. Scikit-Monaco is written in Cython, aiming to offer quasi C-like speeds with the flexibility of Python. The integration is automatically distributed over several processes to take advantage of multi-core processors.

The easiest way to download and install Scikit-Monaco is with easy-install,

 $ easy_install scikit-monaco 
If you do not have root access, use the --prefix=/path/to/directory option to install scikit-monaco in a directory that you have access to, and add the line
export PYTHONPATH=$PYTHONPATH:path/to/directory
to your .bashrc file.

Code homepage Documentation Download

Bibscrape

Lightweight command line web scraper for fetching bibtex citations from journal websites.

$ bibscrape prl 111 12345
@article{Bugnion2013,
  title = {Inhomogeneous State of Few-Fermion Superfluids},
  author = {Bugnion, P. O. and Lofthouse, J. A. 
            and Conduit, G. J.},
  journal = {Phys. Rev. Lett.},
  volume = {111},
  issue = {4},
  pages = {045301},
  ...
} 

It can currently fetch citations from the APS journals and the Journal of Chemical Physics. There are usage and installation instructions in the documentation.

Code homepage Documentation Download