Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| # assume the following directory structure where contents of doc/ | |
| # and source/ are already checked into repo., with the exception | |
| # of the _build directory (i,e. you can check in _themes or _sources | |
| # or whatever else). | |
| # | |
| # proj/ | |
| # source/ | |
| # doc/ | |
| # remove doc/_build/html if present |
| # To source this file into an environment to avoid cluttering the global workspace, put this in Rprofile: | |
| # my.env <- new.env(); sys.source("C:/PathTo/THIS_FILE.r", my.env); attach(my.env) | |
| #----------------------------------------------------------------------- | |
| # Load packages, set options and cwd, set up database connection | |
| #----------------------------------------------------------------------- | |
| ## Load packages | |
| # require(ggplot2) #plotting | |
| # require(plyr) #data manipulation |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| <?php | |
| $countries = | |
| array( | |
| "AF" => "Afghanistan", | |
| "AL" => "Albania", | |
| "DZ" => "Algeria", | |
| "AS" => "American Samoa", | |
| "AD" => "Andorra", | |
| "AO" => "Angola", |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("ggplot2", "reshape2", "RColorBrewer") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # Generate a random matrix | |
| # This can be any type of numeric matrix, | |
| # though we often see heatmaps of square correlation matrices. | |
| nRow <- 9 | |
| nCol <- 16 |
| import re | |
| infile = 'dsim-all-chromosome-r1.3.reassembly1.updated_wsu1.fasta' | |
| ref_count = 0 | |
| for line in open(infile,'r'): | |
| if line.startswith('>'): | |
| ref_count += 1 | |
| print '>' + re.sub(r'[^0-9a-zA-Z_]', '', line)[:50] | |
| else: | |
| print line, |
| HISTCONTROL="erasedups" | |
| export HISTCONTROL |
| #!/usr/bin/env python | |
| import sys | |
| from gemini import GeminiQuery | |
| db = sys.argv[1] | |
| # create a GeminiQery instance for the requested database | |
| gq = GeminiQuery(db) | |