Skip to content

Instantly share code, notes, and snippets.

export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc
export CXX="g++ -arch i386 -arch x86_64"
# These seem to work better w/scipy
export CFLAGS="-arch x86_64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch x86_64"
export CXX="g++ -arch x86_64"
@sooshie
sooshie / Setup for scipy, etc.. on osx
Last active August 29, 2015 13:57
Install of various Python modules
export CFLAGS="-arch x86_64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch x86_64"
export CXX="g++ -arch x86_64"
export CC=gcc
export FFLAGS="-ff2c -m64"
brew install gfortran
pip install numpy
pip install scipy
pip install --allow-external PIL --allow-unverified PIL PIL
# This is a 3 system setup where the controller also runs 4 engines and the other 2 systems run 6 engines each
# This requires that you have your ssh keys setup on each of the hosts (HOSTNAME1, HOSTNAME2, HOSTNAME3)
c = get_config()
# delay 10 seconds between starting the controller, and starting the engines
c.IPClusterStart.delay = 10
# start engines with SSH
c.IPClusterEngines.engine_launcher_class = 'SSH'
c.IPClusterStart.controller_launcher_class = 'SSH'
# Configuration file for ipcontroller.
# Same 3 system setup as the ipcluster-config.py this file only resides on HOSTNAME1 as referenced
# in the other file.
c = get_config()
c.HubFactory.location = 'xxx.xxx.xxx.xxx'
c.HubFactory.ip = 'xxx.xxx.xxx.xxx'
# Install for python for the IPython servers mentioned in the other Gists
# Ubuntu 12.04
apt-get install libatlas-base-dev libatlas-dev libatlas-doc libatlas-test libatlas3gf-base fftw3 fftw3-dev gfortran freetype* libpng*
pip install pandas
pip install numpy
pip install scipy
pip install PIL
pip install cython
pip install pyleargist
c = get_config()
c.IPKernelApp.pylab = 'inline' # if you want plotting support always
# Notebook config
c.NotebookApp.certfile = u'/path-to-certs/certs/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u''
# Fill password with:
#from IPython.lib import passwd
@sooshie
sooshie / crits s3 bucket creation
Created June 17, 2015 16:28
Protip: when using CRITS with S3 make sure to create the buckets
# Run this to create the buckets before using CRITS to store files.
# Also don't forget to make sure the relevant info is in database.py
python manage.py create_buckets
scp -o ProxyCommand="ssh -A $user1@$host1 nc $host2 22" -r localdir/ $user2@$host2:/remote/directory
ssh -A $user1@$host1 -t ssh $user2@$host2
Data for the Data Visualization and Infographics with D3! Class
@sooshie
sooshie / deploy.sh
Last active July 21, 2016 08:15
modified registration.sh and deploy.sh for installing glastopf on a CentOS 7 system so it registers (works) with an MHN server
#!/bin/bash
set -e
set -x
if [ $# -ne 2 ]
then
echo "Wrong number of arguments supplied."
echo "Usage: $0 <server_url> <deploy_key>."
exit 1