View keybase.md

Keybase proof

I hereby claim:

  • I am blinsay on github.
  • I am blinsay (https://keybase.io/blinsay) on keybase.
  • I have a public key whose fingerprint is 6066 FDC0 57CC 4EE8 1E17 65B3 5996 68DD 8B3D 4830

To claim this, I am signing this object:

View README.md

Randomly placed actors explore a 2d function by walking along contour lines. Perlin noise courtesy of d2fn.

View README.md

Pixel-by-pixel contour lines over perlin noise.

View README.md

Gradient descent on 2d Perlin noise. Inspired by and forked from d2fn

View knuckles.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
knuckles = u"""
|⌒|⌒|⌒|⌒|╲ /|⌒|⌒|⌒|⌒|
|%s|%s|%s|%s|ノ \|%s|%s|%s|%s)
\⠀⠀⠀⠀⠀⠀⠀/⠀⠀ \⠀⠀⠀⠀⠀⠀⠀/
⠀\⠀⠀⠀⠀╱⠀⠀⠀⠀ ╲⠀⠀⠀⠀/
⠀ |⠀⠀⠀|⠀⠀⠀⠀⠀⠀⠀ |⠀⠀|
"""
View euler5.clj
(defmacro divides?
"Return true if y divides x. Expands to (= 0 (mod x y))"
[x y]
`(zero? (mod ~x ~y)))
(defn prime?
"Check to see if a number is prime. Naive"
[n]
(let [r (inc (Math/floor (Math/sqrt n)))]
(nil? (some #(divides? n %) (range 2 r)))))
View gist:5737355
/*
Soooo, I have a POJO with an Optional<T> field that *isn't set by default*. When the field isn't included in
a JSON document, I'd like that field to be deserialized as Optional.absent() rather than 'null'. Just doing
the default thing (below) I end up having the Optional<T> field being set to null after deserialization.
I suspect that Jackson is being smart and just not setting fields that aren't in the JSON. Is there something
I can do to make sure it initalizes all the fields, or is the Right Thing To Do just to give my Optional<T>
field a default value?
View gist:5379652
func Create(bot *core.Gobot) {
// matches is actually a map[string]string
matches, found := bot.Config.Plugins["matcher"]["matches"]
if !found {
log.Printf("Can't find matcher/matches plugin conf. Plugin will not run.")
return
}
switch matches := matches.(type) {
case map[string]interface{}:
View goenv.sh
#!/bin/bash
# Apparently this doesn't work. :((((((((((((
_path_remove () { export PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; }
goenv() {
new_env=${1:-`pwd`}
old_env=$GOPATH
if [[ -z $old_env ]]; then
View s3merge.py
#!/usr/bin/env python
# encoding: utf-8
from eventlet import patcher, GreenPool
patcher.monkey_patch(all = True)
import sys
from eventlet.queue import Queue, Empty
from boto import connect_s3