ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python -O | |
import numpy as np | |
from numpy import array | |
A, C, G, T = 0, 1, 2, 3 | |
int_to_char = {0:'A', 1:'C', 2:'G', 3:'T'} | |
#indel = -1 | |
#scoring = array([[1,-1,-1,-1], | |
#[-1,1,-1,-1], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Test of Equivalence and Non-Inferiority | |
currently only TOST for paired sample | |
Application for example bioequivalence | |
Author: Josef Perktold | |
License: BSD-3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Convert all arguments (assumed SVG) to a TIFF acceptable to PLOS | |
# Requires Inkscape and ImageMagick 6.8 (doesn't work with 6.6.9) | |
for i in $@; do | |
BN=$(basename $i .svg) | |
inkscape --without-gui --export-png="$BN.png" --export-dpi 300 $i | |
convert -compress LZW -alpha remove $BN.png $BN.tiff | |
mogrify -alpha off $BN.tiff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""making a dataframe""" | |
df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB')) | |
"""quick way to create an interesting data frame to try things out""" | |
df = pd.DataFrame(np.random.randn(5, 4), columns=['a', 'b', 'c', 'd']) | |
"""convert a dictionary into a DataFrame""" | |
"""make the keys into columns""" | |
df = pd.DataFrame(dic, index=[0]) |
How to use Pelican on GitHub Pages ![Gittip](https://camo.githubusercontent.com/41a54e41e95fa22290d0d187814d701f6a938105a3578f940d3d4d047145fe6a/68747470733a2f2f7261772e6769746875622e636f6d2f6769747469702f7777772e6769747469702e636f6d2f6d61737465722f696d672d7372632f6769747469702d6c6f676f2d33322e706e67)
Author: Josef Jezek
sudo apt-get install python-setuptools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# first check to see if mongo service is running. you can't delete any files until the service stops so perform a quick check. | |
launchctl list | grep mongo | |
# NOTE: the pipe | symbol means the commands on the right performs on the output from the left | |
# grep is a string search utility. `grep mongo` means search for the substring mongo | |
# use the unload command to end the mongo service. this is required to 'unlock' before removing the service. | |
# first look for the file to delete | |
MONGO_SERVICE_FILE=$(ls ~/Library/LaunchAgents/*mongodb*) |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy import stats | |
from itertools import combinations | |
from statsmodels.stats.multitest import multipletests | |
from statsmodels.stats.libqsturng import psturng | |
import warnings | |
def kw_dunn(groups, to_compare=None, alpha=0.05, method='bonf'): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The [Cufflinks](http://cole-trapnell-lab.github.io/cufflinks/) Unix package is extremely well regarded for RNA-seq analysis. Yet it is widely acknowledged that installation is difficult, not least by the [Cufflinks authors themselves](http://cole-trapnell-lab.github.io/cufflinks/getting_started/#installing-a-pre-compiled-binary-release)! Whilst the authors provide precompiled binaries to make the installation process easier [the instructions aren't very explicit](http://cole-trapnell-lab.github.io/cufflinks/getting_started/). Having spent a good hour on Google and StackOverflow I've put together an instruction list for the less experienced Unix user like myself. | |
Note this guide is for Unix distributions. | |
1. Download the Cufflinks tar from http://cole-trapnell-lab.github.io/cufflinks/install/ | |
'''shell | |
wget http://cole-trapnell-lab.github.io/cufflinks/install/ | |
''' | |
2. Untar the downloaded file | |
'''shell |
OlderNewer