<commit_before># This script is intended to be idempotent - you should be able to run it multiple times and it will
# still work. However it's not necessarily optimized for that, it might duplicate work each time.

set -e

# Useful linux things
sudo apt-get update
sudo apt-get install -y emacs23-nox git build-essential cmake subversion \
python2.6 python-setuptools python-dev \
gfortran libatlas-base-dev \
libxft2-dev libgtk2.0-dev python-gtk2-dev python-wxgtk2.8 \
libusb-1.0 libglut3-dev libxmu-dev xvfb libgl1-mesa-dev libglu1-mesa-dev \
libx11-dev lighttpd

# Numpy
set +e; git clone git://github.com/numpy/numpy.git numpy; set -e
sudo ln -fs /usr/local/lib/python2.6/dist-packages/numpy/core/include/numpy /usr/local/include/
pushd numpy; 
  python setup.py build && sudo python setup.py install
popd

# Scipy
svn co http://svn.scipy.org/svn/scipy/trunk scipy
pushd scipy
  python setup.py build && sudo python setup.py install
popd

# Matplotlib
svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib
pushd matplotlib
  python setup.py build && sudo python setup.py install
popd
set +e; mkdir ~/.matplotlib; set -e
echo "backend: WX" >> ~/.matplotlib/matplotlibrc


# OpenCL
# Pointers here: http://www.luxrender.net/wiki/Building_on_Ubuntu_10.10
wget -N http://orwell.fiit.stuba.sk/~nou/ati-opencl-runtime_2.3_i386.deb
wget -N http://orwell.fiit.stuba.sk/~nou/ati-opencl-dev_2.3.deb
sudo dpkg -i ati-opencl-runtime_2.3_i386.deb
sudo dpkg -i ati-opencl-dev_2.3.deb


# Other python libraries
sudo easy_install ipython nose PyOpenGL cython django pyopencl

# Libfreenect
set +e; git clone https://github.com/OpenKinect/libfreenect.git; set -e
set +e; sudo bash -c 'echo "/usr/local/lib/" > /etc/ld.so.conf.d/local.conf'; set -e
sudo ldconfig
pushd libfreenect
cmake . -DBUILD_PYTHON=On
make
sudo make install
popd


# Opencv
svn co https://code.ros.org/svn/opencv/trunk/opencv
sudo mv /usr/local/lib/python2.6/site-packages /usr/local/lib/python2.6/backup.site-packages
sudo ln -fsT /usr/local/lib/python2.6/dist-packages /usr/local/lib/python2.6/site-packages
pushd opencv
  cmake . -DBUILD_REFMAN=Off
  make
  sudo make install
popd


# BlockPlayer
set +e; git clone git@github.com:amiller/blockplayer.git; set -e
pushd blockplayer
./download.sh
python setup.py build
python setup.py build_ext --inplace
sudo python setup.py install
xvfb-run python makewww/make_normals.py
xvfb-run python makewww/make_calib.py
echo "Running lighttpd -Df lighttpd.conf"
echo "View the results at localhost:8090"
echo "(this won't return, ctrl+c if you like)"
sudo lighttpd -Df lighttpd.conf<commit_msg>Fixed the placement of ldconfig in the script<commit_after># This script is intended to be idempotent - you should be able to run it multiple times and it will
# still work. However it's not necessarily optimized for that, it might duplicate work each time.

set -e

# Useful linux things
sudo apt-get update
sudo apt-get install -y emacs23-nox git build-essential cmake subversion \
python2.6 python-setuptools python-dev \
gfortran libatlas-base-dev \
libxft2-dev libgtk2.0-dev python-gtk2-dev python-wxgtk2.8 \
libusb-1.0 libglut3-dev libxmu-dev xvfb libgl1-mesa-dev libglu1-mesa-dev \
libx11-dev lighttpd

# Numpy
set +e; git clone git://github.com/numpy/numpy.git numpy; set -e
sudo ln -fs /usr/local/lib/python2.6/dist-packages/numpy/core/include/numpy /usr/local/include/
pushd numpy; 
  python setup.py build && sudo python setup.py install
popd

# Scipy
svn co http://svn.scipy.org/svn/scipy/trunk scipy
pushd scipy
  python setup.py build && sudo python setup.py install
popd

# Matplotlib
svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib
pushd matplotlib
  python setup.py build && sudo python setup.py install
popd
set +e; mkdir ~/.matplotlib; set -e
echo "backend: WX" >> ~/.matplotlib/matplotlibrc


# OpenCL
# Pointers here: http://www.luxrender.net/wiki/Building_on_Ubuntu_10.10
wget -N http://orwell.fiit.stuba.sk/~nou/ati-opencl-runtime_2.3_i386.deb
wget -N http://orwell.fiit.stuba.sk/~nou/ati-opencl-dev_2.3.deb
sudo dpkg -i ati-opencl-runtime_2.3_i386.deb
sudo dpkg -i ati-opencl-dev_2.3.deb


# Other python libraries
sudo easy_install ipython nose PyOpenGL cython django pyopencl

# Libfreenect
set +e; git clone https://github.com/OpenKinect/libfreenect.git; set -e
set +e; sudo bash -c 'echo "/usr/local/lib/" > /etc/ld.so.conf.d/local.conf'; set -e
pushd libfreenect
cmake . -DBUILD_PYTHON=On
make
sudo make install
popd
sudo ldconfig


# Opencv
svn co https://code.ros.org/svn/opencv/trunk/opencv
sudo mv /usr/local/lib/python2.6/site-packages /usr/local/lib/python2.6/backup.site-packages
sudo ln -fsT /usr/local/lib/python2.6/dist-packages /usr/local/lib/python2.6/site-packages
pushd opencv
  cmake . -DBUILD_REFMAN=Off
  make
  sudo make install
popd


# BlockPlayer
set +e; git clone <EMAIL>:amiller/blockplayer.git; set -e
pushd blockplayer
./download.sh
python setup.py build
python setup.py build_ext --inplace
sudo python setup.py install
xvfb-run python makewww/make_normals.py
xvfb-run python makewww/make_calib.py
echo "Running lighttpd -Df lighttpd.conf"
echo "View the results at localhost:8090"
echo "(this won't return, ctrl+c if you like)"
sudo lighttpd -Df lighttpd.conf
{'fraction_non_alphanumeric': 0.10920083128660495, 'fraction_numerical': 0.018515019837521254, 'mean_word_length': 4.008514664143803, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '472053', 'n_tokens_mistral': 2112, 'n_tokens_neox': 1988, 'n_words': 534}