Skip to content

Instantly share code, notes, and snippets.

View zonca's full-sized avatar

Andrea Zonca zonca

View GitHub Profile
@zonca
zonca / ipcluster_run_commands.py
Created February 14, 2014 02:01
Submit non-python commands to a running IPython cluster
import sys
from IPython.parallel import Client
def run_command(command):
import subprocess
subprocess.Popen(command, shell = True)
try:
filename = sys.argv[1]
except:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zonca
zonca / fortranmain.f90
Created March 10, 2014 19:46
Test calling Python script from FORTRAN
program SystemTest
print *, "FORTRAN: BLOCKING"
call system("python pythonsleep.py")
print *, "FORTRAN: NONBLOCKING"
call system("python pythonsleep.py &")
print *, "FORTRAN: EXIT"
end program SystemTest
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2014-03-14 17:47:34,746 PID: 7142 awsutils.py:289 - INFO - Creating security group @sc-smallcluster...
2014-03-14 17:47:35,263 PID: 7142 cli.py:277 - ERROR - AuthorizeSecurityGroupIngressType: Group ID or User ID/Group Name required.
Traceback (most recent call last):
File "/home/zonca/p/dev/StarCluster/starcluster/cli.py", line 274, in main
sc.execute(args)
File "/home/zonca/p/dev/StarCluster/starcluster/commands/start.py", line 228, in execute
validate_running=validate_running)
File "/home/zonca/p/dev/StarCluster/starcluster/cluster.py", line 1632, in start
return self._start(create=create, create_only=create_only)
File "<string>", line 2, in _start
@zonca
zonca / .travis.yml
Created April 3, 2014 16:53
Miniconda .travis.yml
language: python
python:
- 2.7
# Setup anaconda
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes conda
# Author: Naupaka Zimmerman June 16, 2014
# Script to make figure with ggplot from
# command line argument for SWC bootcamp
# UC Davis - Davis, CA
.libPaths("C:/Users/SDSC/Documents/R/win-library/3.1")
# Load libraries
require(ggplot2)
require(reshape2)
# bash script to process inflammation data
# call with "http://npk.io/RBzU+"
echo Clean previous runs
rm -r data*
echo Download data
curl -L $1 -o data.zip
sleep 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.