Skip to content

Instantly share code, notes, and snippets.

@galvanic
galvanic / toc_ipython.py
Last active June 20, 2016 10:42
Builds a table of contents (TOC) for an IPython notebook.
#!/usr/local/bin/python
'''
Script that automatically builds a table of contents (TOC) for an IPython notebook.
Returns string to paste into notebook.
'''
import sys
import json
@galvanic
galvanic / keybase.md
Last active August 29, 2015 14:01
keybase proof

Keybase proof

I hereby claim:

  • I am galvanic on github.
  • I am justine (https://keybase.io/justine) on keybase.
  • I have a public key whose fingerprint is 48E3 70D1 829B 90E5 47F1 DF6D 52ED F485 44BD 65E3

To claim this, I am signing this object:

@galvanic
galvanic / translateNA.py
Created February 18, 2014 20:34
Translate a nucleic acid sequence into all 6 open reading frames
from itertools import chain, islice
"""
Improvements:
Measure how fast/good this script is. Is it space efficient ?
No point having fancy programming if it's not faster (fancy bit being the sliding window)
Maybe take into account the case of letters (if upper or lower case).
I feel like I could remove some of the repetition.
"""