Skip to content

Instantly share code, notes, and snippets.

View sdwfrost's full-sized avatar

Simon Frost sdwfrost

View GitHub Profile
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@sdwfrost
sdwfrost / color-turtles.js
Created April 24, 2017 07:54
Tweaking turtles.js example from asx
// Import the lib/ mmodules via relative paths
const Color = AS.Color
const ColorMap = AS.ColorMap
// import Color from '../../src/Color.js'
// import DataSet from '../../src/DataSet.js'
// import Mouse from '../../src/Mouse.js'
const Model = AS.Model
const util = AS.util
const modules = {Color, ColorMap, Model, util }
@sdwfrost
sdwfrost / ebov_tmrca.ipynb
Created February 17, 2017 10:51
TMRCA analysis of BEAST EBOV trees from Dudas et al.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sdwfrost
sdwfrost / neighbor-joining-experiments.ipynb
Created January 20, 2017 13:32 — forked from gregcaporaso/neighbor-joining-experiments.ipynb
initial experiments with implementing neighbor joining for scikit-bio
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sdwfrost
sdwfrost / git_create_orphan.sh
Created November 28, 2016 10:13 — forked from seanbuscay/git_create_orphan.sh
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name
@sdwfrost
sdwfrost / mingw-w64-3.10-osx10.9.sh
Created November 26, 2016 13:49 — forked from Drakulix/mingw-w64-3.10-osx10.9.sh
Script to install a Mingw-w64 Cross-Compiler Suite on Mac OS X 10.9
#!/bin/sh
# dependencies
echo "Installing dependencies via Homebrew (http://brew.sh)"
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update
brew install gcc48
@sdwfrost
sdwfrost / pi_qemu.sh
Created November 24, 2016 12:34 — forked from JasonGhent/pi_qemu.sh
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
@sdwfrost
sdwfrost / SRR765688.fasta
Last active October 23, 2016 06:33
Test files for vdjtools/ChangeO
>SRR765688.30659 HQP9GKT01B1E02 length=380|SEQORIENT=F,RC,F|MID=MID54|CPRIMER=IgG-PCR|VPRIMER=LR3|DUPCOUNT=3
NNNNNNNNNNNNNNNNNNNNACGAAGCCTGGGGCCTCAGTGAAGATTTCCTGCAAGGCTT
CTGGATACATTTTCACTAAATATTCAATGAGTTGGGTGCGACAGGCCCCTGGACAAGGGC
TTGAGTGGATGGGATACATCAACACCATCACTGGTAACCCAACTTACGCCCAGGCCTTCA
CAGGACGGTTTGTCTTTTCCTTGGACACCTCTATCAGCACGGCATATCTGCAGATCAGCA
GCCTAAAGACTGACGACACTGGCATGTATTATTGTTCGACCCTCCAACCGCGTATTGCAG
CACCTGAATTCTGGGGCCAGGGAGCCCTGGTCGCCGTCTCCTCGGCCTCCAC
>SRR765688.38189 HQP9GKT01B1F8D length=357|SEQORIENT=F,F,F|MID=MID53|CPRIMER=IgG-PCR|VPRIMER=LR1|DUPCOUNT=2
NNNNNNNNNNNNNNNNNNNCTGTGACATCTCCGGGGAGAGTATCTCTAACACCAATGTTG
GCTGGACCTGGATCAGGCAGTCCCCATCGAGAGGTCTTGAGTGGCTGGGAAGGACATTCT
@sdwfrost
sdwfrost / forms.html
Created September 20, 2016 05:18 — forked from gnunicorn/forms.html
Jinja2 WTForms macros for twitter bootstrap
{%- macro form_field_label(field) -%}
<label for="{{ field.id }}">{{ field.label.text }}
{%- if field.flags.required -%}
<abbr title="Diese Feld muss angegeben werden">*</abbr>
{%- endif %}</label>
{% endmacro %}
{%- macro form_field_description(field) -%}
{% if field.description %}
<span class="descr">{{ field.description }}</span>
@sdwfrost
sdwfrost / mktest.Rmd
Created August 18, 2016 15:16
MKn model in diversitree with deSolve and custom initial conditions
---
title: "mkn test"
author: "Simon D.W. Frost"
date: "18 August 2016"
output: html_document
---
```{r}
library(ape)
library(diversitree)