Skip to content

Instantly share code, notes, and snippets.

@tjdett
tjdett / notes.md
Last active August 29, 2015 14:02
Notes for Python SC lessons on DIT4C.

Notes for Python SC lessons on DIT4c

First challenge: How do I "download these four data files"?

mkdir sc
# Use shell expansion to get each of the four files
wget http://resbaz.github.io/2014-03-18-combine/novice/python/inflammation-0{1,2,3,4}.csv
@tjdett
tjdett / inkpen.md
Created June 23, 2014 04:03
Created using Inkpen - http://inkpen.in

DIT4C - demo → production

Current issues that need to be resolved before production use can be considered. Limited to absolutely necessary, and not a feature wishlist.

  1. Any user can currently cause a denial of service, through:
  • High CPU usage
  • High memory usage
  • High disk usage
  • A fork bomb - intentional or otherwise
  1. There are no limits on the number of active projects, potentially compromising the viability of the service.
@tjdett
tjdett / inkpen.md
Created June 25, 2014 01:57
DIT4C usability meeting

DIT4C usability meeting

Teaching - potentially very useful

Actual Research - not really powerful enough:

  • Data sets are big.
  • Already have access to 80 core machines.
  • No SSH in.
  • No Sublime Text editor.
  • Not sure cloud services are stable enough.
@tjdett
tjdett / install_nltk.sh
Last active August 29, 2015 14:07
NLTK DIT4C install script
#!/bin/bash
export HOME=/home/researcher
source /opt/python/bin/activate
pip install nltk pyyaml tkinter
@tjdett
tjdett / TOC example.ipynb
Created January 15, 2015 00:38
TOC example for IPython Notebooks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjdett
tjdett / writing-to-etcd.md
Created February 6, 2015 02:20
etcd out-by-one indexes

Set value:

core@pn-02 ~ $ ETCDCTL_PEERS=http://127.0.0.1:2379/ /opt/etcd/etcdctl set /test-`date +"%s"` "tjdett: but if that one machine isn\'t getting state replicated then it could be behind"

Get cluster-wide state:

$ ansible routing -i inventory.ini --sudo -a "curl -s http://localhost:2379/v2/keys/test-1423189078"
pn-04.resbaz.cloud.edu.au | success | rc=0 >>
{"action":"get","node":{"key":"/test-1423189078","value":"tjdett: but if that one machine isn't getting state replicated then it could be behind","modifiedIndex":456,"createdIndex":456}}
@tjdett
tjdett / list_designate_records.sh
Last active August 29, 2015 14:16
List records for a Designate domain on NeCTAR
#!/bin/bash
# In addition to `curl`, `jq` is needed for JSON querying
# Change these for your domain
OS_DESIGNATE_DOMAIN=cloud.edu.au.
OS_DESIGNATE_RECORD=resbaz.$OS_DESIGNATE_DOMAIN
OS_TOKEN=$(curl -s \
-H "Content-Type: application/json" \
@tjdett
tjdett / vieps_gdal_install.sh
Created May 27, 2015 00:48
VIEPS GDAL install
#!/bin/bash
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install gdal
@tjdett
tjdett / install_vmd.sh
Last active August 29, 2015 14:23
VMD install on dit4c/dit4c-container-x11:fakeroot
#!/bin/sh
cd ~
curl http://www.ks.uiuc.edu/Research/vmd/vmd-1.9.2/files/final/vmd-1.9.2.bin.LINUXAMD64.opengl.tar.gz | tar xzv
cd vmd-1.9.2
./configure
cd src
fsudo make install
cd ~
rm -rf vmd-1.9.2
@tjdett
tjdett / install_gdis.sh
Last active August 29, 2015 14:24
Install script for GDIS on DIT4C
#!/bin/sh
fsudo yum install -y gtk2-devel mesa-libGLU-devel expect
# Install gtkglext from unofficial RPMs
fsudo yum localinstall -y \
http://www.melvilletheatre.com/articles/el7/gtkglext-libs-1.2.0-21.el7.centos.x86_64.rpm \
http://www.melvilletheatre.com/articles/el7/gtkglext-devel-1.2.0-21.el7.centos.x86_64.rpm
curl -L https://github.com/arohl/gdis/archive/master.tar.gz | tar xzv -C /tmp