Skip to content

Instantly share code, notes, and snippets.

View zakandrewking's full-sized avatar

Zak King zakandrewking

View GitHub Profile
@zakandrewking
zakandrewking / README.md
Last active December 16, 2015 20:29 — forked from mbostock/.block

For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.

#!/usr/bin/env python
"""In order to use the script you need to copy your SSH key to the target server
and also copy the server SSH public key (usually .ssh/id_rsa.pub) to .ssh/authorized_keys,
so that the computing node can ssh passwordless to the login node"""
from subprocess import Popen, PIPE, call
import sys
import webbrowser
from getopt import getopt
import time
@zakandrewking
zakandrewking / calculate_queue.py
Last active December 17, 2015 03:29
calculate runtime for carver
# Never waste brainpower on selecting your queue again.
# Future unnecessary feature: weigh queue options based on current wait times.
import math, time
t = float( raw_input('Time per solution (hr) : '))
c = int( raw_input('Number of problems : '))
m = int( raw_input('Memory per core (GB) : '))
max_mem = 20
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from __future__ import division
import numpy
from uuid import uuid1
class d3object:
def __init__(self,
height=100,
width=100,
topHtml='',
bottomHtml='',
style=None,
import webbrowser
class NeverGonnaGiveYouUp(Exception):
pass
try:
webbrowser.open("http://www.youtube.com/watch?v=dQw4w9WgXcQ")
except:
raise(NeverGonnaGiveYouUp)

Install the scipopt suite:

sudo mv scipoptsuite-3.1.0 /Library
cd /Library/scipoptsuite-3.1.0
make
make scipoptlib SHARED=true
ln -s /Library/scipoptsuite-3.1.0/soplex-2.0.0/bin/soplex /usr/local/bin/soplex2
@zakandrewking
zakandrewking / Cobra installation on carver.md
Last active August 29, 2015 13:58
Cobra installation on carver

Add the following to ~/.bashrc.ext (or ~/.zshrc.ext if you use zsh):

if [[ $NERSC_HOST == "carver" ]]
then
    module unload python
    module load python/2.7.3
    module load numpy
    module load scipy
    module unload pgi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.