Wednesday, June 13, 2012

Compiling GNU/screen with vertical split support

Yum (on RHEL5) GNU/screen doesn't come with the vertical split patch. We just need a newer version.
git clone git://git.savannah.gnu.org/screen.git
$ cd screen/src
$ ./autogen.sh
$ ./configure
$ make
# make install

Monday, May 21, 2012

Workaround for ssh session git pushes failing

$ git push origin master

(gnome-ssh-askpass:22648): Gtk-WARNING **: cannot open display:

This occurs because the SSH_ASKPASS environment variable is set to "/usr/libexec/openssh/gnome-ssh-askpass", which is the nice gtk window that pops up when you're running gnome. I don't want this, because I do most of my work over SSH, so simply change SSH_ASKPASS to something else. In my ~/.bashrc
alias git="SSH_ASKPASS='' git"

Then: $ source ~/.bashrc

Fixes it up.

Sunday, April 15, 2012

Running PyBrain in a virtual environment

I recently worked on a class project using Neural Networks and PyBrain. Because my university gives High Performance Computing cluster accounts to students that request them, I decided it would be a good idea to put them to use.

To install PyBrain on a machine with no python installation or administrator access:

  1. Download and compile python 2.6.x
  2. Download virtualenv
  3. Create a virtualenv using the aforementioned python binary.
    python virtualenv -p /path/to/python2.6 ENV
  4. Source the virtual environment's environment
    source ENV/bin/activate
  5. Download and compile BLAS. Ensure to use -fPIC if your system requires it. Make sure NOOPTS and OPTS are correct.
  6. Download and compile LAPAC.
  7. Use pip to install numpy
    LAPACK=~/lapack-3.4.0/liblapack.a BLAS=~/BLAS/libfblas.a ~/scratch/work/ENV/bin/pip install numpy
  8. Download and compile scipy. set the --fcompiler option to gnu95, to ensure numpy and scipy use the same compiler.
    LAPACK=~/lapack-3.4.0/liblapack.a BLAS=~/BLAS/libfblas.a ~/scratch/work/ENV/bin/python setup.py build --fcompiler=gnu95
  9. Use pip to install pybrain.
    ~/scratch/work/ENV/bin/pip install pybrain
  10. Test pybrain.
    python
    >>import pybrain