I hereby claim:
- I am apollotiger on github.
- I am joshu (https://keybase.io/joshu) on keybase.
- I have a public key whose fingerprint is EBC6 6EBE 457B 129A 7851 4173 7A83 B9FF 4A83 2170
To claim this, I am signing this object:
(state='CA';curl -s 'http://clerk.house.gov/evs/2012/roll192.xml' | sed -rn '/'$state'"/{/Aye/{s/^.+r">([^<]+).*$/\1/p;};}') |
import random | |
from nltk.corpus import cmudict | |
d = cmudict.dict() | |
benedicts = [k for (k,v) in d.iteritems() if len([s for s in v[0] if s[-1].isdigit()]) == 3 and v[0][0] == u'B' and '1' in v[0][1]] | |
cumberbatches = [k for (k,v) in d.iteritems() if len([s for s in v[0] if s[-1].isdigit()]) == 3 and k[0] == 'c' and v[0][0] == u'K' and '1' in v[0][1]] | |
for i in xrange(200): |
I hereby claim:
To claim this, I am signing this object:
data Status = Alive | Dead | |
type Board = [[Status]] | |
type Coordinate = { row:Int, column:Int } | |
getNodeAt : Board -> Coordinate -> Status | |
getNodeAt graph coordinate = | |
let maxRow = length graph | |
maxColumn = maximum <| map length graph | |
row = coordinate.row | |
column = coordinate.column |
import Control.Applicative | |
-- delimTake takes until it either: | |
-- 1) reaches the nth item (as "take N") | |
-- 2) reaches an item containing a delimiter | |
delimTake :: (Eq a) => [a] -> Int -> [[a]] -> [[a]] | |
delimTake delimList n seq | |
| snd brokenTake == [] = naiveTake | |
| otherwise = (fst brokenTake) ++ [fst breakDelimItem] | |
where |
-- just for fun | |
-- compiled and uploaded to http://rhwlo.com/dancingPixels | |
import Bitwise as B | |
type ColorGrid = [[Color]] | |
actualWidth = 300 | |
drawGrid : ColorGrid -> Element | |
drawGrid grid = let gridWidth = (length grid) |
{-# LANGUAGE OverloadedStrings #-} | |
import Data.Aeson | |
import Data.List (nub) | |
import qualified Data.HashMap.Strict as HM | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
import qualified Data.Vector as V | |
packShow :: Show a => a -> T.Text |
I hereby claim:
To claim this, I am signing this object:
def deriveKey(masterKey: String, allowedOperations: String) = { | |
def bytesToString(bytes: Array[Byte]) = { | |
bytes.map({byte => Integer.toString(byte.toInt, 16)}).mkString | |
} | |
val masterKeyBytes: Array[Byte] = { | |
masterKey.map({ char => | |
Integer.parseInt(char.toString, 16).toByte | |
}).toArray | |
} |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import curses | |
import time | |
SKULLS = (""" | |
▒▒▒▒▒▒▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▒▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ |