Skip to content

Instantly share code, notes, and snippets.

Greg Caporaso gregcaporaso

Block or report user

Report or block gregcaporaso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wasade
wasade / sub
Last active Sep 7, 2017
Light weight mechanism to submit a job to torque based cluster. Logging is implicit, and all logs and standard out/err automatically placed in the current working directory.
View sub
#!/usr/bin/env python
r"""Cluster submission
Light helper script for submitting jobs to a cluster. For instance, to submit
a job that calls the command hostname, just use:
$ sub hostname
Additionally, you can specify the name of the job:
@ElDeveloper
ElDeveloper / gist:4206016
Last active Oct 13, 2015
Current git branch in your bash prompt
View gist:4206016

Show the time, the current folder where you are working and the current branch if working on a git repository. Output looks like 19:41:40 Documents@master$ . If using an xterm-256 terminal emulator, hour should be green, cwd white and the branch red.

function egit (){                                                               
    function get_git_branch () {                                                
        command git rev-parse --abbrev-ref HEAD 2> /dev/null                    
    }                                                                           
    # git specific usage for branching                                          
    function branch_separator () {                                              
        if [[ -n $(get_git_branch) ]]                                           
@deekayen
deekayen / 1-1000.txt
Last active Dec 7, 2019
1,000 most common US English words
View 1-1000.txt
the
of
to
and
a
in
is
it
you
that
@gregcaporaso
gregcaporaso / Lecture20.ipynb
Last active Oct 12, 2015
IPython Notebook files used in Greg Caporaso's Fall 2012 BIO599 Computational Biology course. See the included README.md file for more details and licensing information.
View Lecture20.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtriley
jtriley / config
Created Aug 9, 2012
Example StarCluster plugin that tags all instances based on tags specified in the config
View config
# This is an example config that assumes tagger.py is either in
# $HOME/.starcluster/plugins or lives somewhere in your $PYTHONPATH
[plugin tagger]
setup_class = tagger.TaggerPlugin
# add as many key=value pairs as you like separated by ','
tags = 'mykey=myvalue, mykey2=myvalue2'
[cluster default]
...
@wasade
wasade / version_update.sh
Created May 1, 2012
version updater for biom-format
View version_update.sh
#!/bin/bash
OLD_VERSION=$1
NEW_VERSION=$2
cd trunk/examples
sed -ie "s/Biological Observation Matrix $OLD_VERSION/Biological Observation Matrix $NEW_VERSION/" *.biom
cd ../scripts
sed -ie "s/^__version__ = \"$OLD_VERSION\"/__version__ = \"$NEW_VERSION\"/" *.py
You can’t perform that action at this time.