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
FROM continuumio/miniconda | |
RUN apt update | |
RUN apt install -y git build-essential | |
RUN conda config --add channels defaults --add channels bioconda --add channels conda-forge | |
RUN conda create -n raseenv prophyle ete3 pysam snakemake-minimal samtools parallel r-optparse pandas seqtk | |
RUN echo "source activate raseenv" > ~/.bashrc | |
RUN [ "/bin/bash", "-c", "source activate raseenv && pip install --upgrade git+git://github.com/prophyle/prophyle.git@b55e026" ] |
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/bash | |
while read -sp Password: password; do | |
echo | |
sha1=$(printf "$password" | sha1sum -) | |
range=$(echo $sha1 | cut -b1-5) | |
rest=$(echo $sha1 | cut -b6-40 | tr 'a-f' 'A-F') | |
part2=$(echo $rest | cut -b1-8) |
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
-- borrowed from FSharp | |
(|>) :: t -> (t -> t1) -> t1 | |
a |> b = b a | |
-- The game rules: | |
fizzbuzz :: Integer -> String | |
fizzbuzz n = let | |
-- We can create rules that process numbers. | |
-- The incoming numbers are paired with an accumulated String | |
rule :: Integer -> String -> (Integer, Maybe String) -> (Integer, Maybe String) |
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
require 'rugged' | |
class TreeProxy < BasicObject | |
def initialize(repo, tree) | |
@repo = repo | |
@tree = tree | |
end | |
def _wrap_yield_(*args) | |
if args.length >= 1 and args[0].class == ::Hash and args[0].has_key? :oid |
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
def format(line, binding) | |
pattern = /[[:alpha:]\$_][[:alnum:]_]*/ | |
line.gsub(pattern) {|match| replace(match,binding) } | |
end | |
def replace(match, binding) | |
reserved_words = "alias,and,BEGIN,begin,break,case,class,def,defined?,do,else,elsif,END,end,ensure,false,for,if,in,module,next,nil,not,or,redo,rescue,retry,return,self,super,then,true,undef,unless,until,when,while,yield".split(",") | |
if reserved_words.rindex match | |
return match | |
end |
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
#pragma once | |
class Display { | |
}; | |
class ncursesDisplay: public Display { | |
/* | |
* Print blits images to the output buffer, with an emphasis on font | |
* rendering. The class passed is the means of selecting the font, | |
* the particulars of this mechanism are not yet defined. |
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
#pragma once | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
class Draw { | |
public: | |
Draw(ostream &out):out(out){} |
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
<html> | |
<head> | |
<title>Ember Test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://github.com/downloads/emberjs/ember.js/ember-0.9.4.min.js"></script> | |
<script type="text/javascript" src="http://coffeescript.org/extras/coffee-script.js"></script> | |
</head> | |
<body> | |
<h1>Todos</h1> | |
<script type="text/x-handlebars"> |