As I keep forgetting, this post is to remind me that Java Java doesn’t have a pretty toString() for arrays objects, and it does for…
[bash] #!/bin/sh file="/tmp/myfile" while read line; do echo $line done < "$file" [/bash]
Problem: Given a sequence of numbers, show all possible letter combinations in a telephone keypad. Recursive solution in Python: [python] keyboard = { ‘1’: [],…
In case you can’t use Python’s itertools or in case you want a simple, recursive python implementation for a permutation of a list: [python] def…
[bash]$ echo {0..9} 0 1 2 3 4 5 6 7 8 9[/bash] [bash]$ echo b{a,e,i,o,u} ba be bi bo bu [/bash] [bash]$ echo x{0..9}y…
Merging n lists of size k, using two different approaches. Original file on Github.
DNA inspired sculpture by Charles Jencks. Creative Commons photo by Maria Keays. What is GenBank? The GenBank sequence database is a widely used collection of…
/** * Openpixels example in Processing. * This simple example of how to get a sprite * from a sprite sheet. */ PImage bg; PImage…