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
// I peeked at http://rosettacode.org/wiki/Conway's_Game_of_Life#Go | |
package main | |
import ( | |
"fmt" | |
"github.com/nsf/termbox-go" | |
// "math/rand" | |
"strings" | |
"time" | |
) |
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
import sys | |
from functools import partial | |
import psycopg2 | |
from psycopg2 import OperationalError | |
from psycopg2.extensions import (POLL_OK, POLL_READ, POLL_WRITE, POLL_ERROR, | |
connection as base_connection, cursor as base_cursor) | |
from tornado.ioloop import IOLoop |
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 | |
# Add to ~/.bashrc | |
# source /path/to/virtualenv-funcs.sh | |
# Usage: command virtualenv-name python-version | |
# Examples: | |
# mkenv momoko 2 | |
# workon momoko 2 | |
# delenv momoko 2 |
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 | |
filename=$(basename $1) | |
# Uncomment for fancy notifications | |
# notify-send "$filename" "Created thumbnail overview..." --icon=emblem-videos-symbolic | |
Streams=$(ffmpeg -i $1 2>&1 | grep '^[[:blank:]]*Stream' | sed 's/^[^:]*.[^:]*..//;s/([^)]*.//g;s/ ,/,/g') | |
Text=$(echo "File: $filename\nSize: $(ls -lah $1 | awk '{ print $5}')\n$Streams") |
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 https://github.com/FSX/misaka/blob/master/tests/misaka_test.py | |
import re | |
import codecs | |
from os import path | |
from glob import glob | |
from subprocess import Popen, PIPE, STDOUT | |
from minitest import TestCase, ok, runner |
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
import socket | |
from itertools import imap | |
from functools import partial | |
from collections import deque | |
from tornado import ioloop | |
from tornado import iostream | |
import hiredis |
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
import re | |
import socket | |
from tornado import ioloop | |
from tornado import iostream | |
RE_ORIGIN = re.compile(r'([^!]*)!?([^@]*)@?(.*)') | |
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
#!/usr/bin/env python2 | |
""" | |
Reads a Genbank file line by line. | |
""" | |
import re | |
from pprint import pprint |
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
<?php | |
class ExampleTest extends TestLibTestCase | |
{ | |
protected $name = 'utf8\len()'; | |
public function test_equal() | |
{ | |
$this->is_equal('test', 'test'); | |
} |
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
import time | |
import os.path as path | |
import misaka | |
import misaka_ctypes | |
class Benchmark(object): | |
def __init__(self, name): | |
self._name = name |