Skip to content

Instantly share code, notes, and snippets.

View deontologician's full-sized avatar
🦀
🌎

Josh Kuhn deontologician

🦀
🌎
View GitHub Profile
import random
from collections import Counter
from pprint import pprint
import string
DAMAGE_TYPES = [
'fire',
'water',
'earth',

Keybase proof

I hereby claim:

  • I am deontologician on github.
  • I am deontologician (https://keybase.io/deontologician) on keybase.
  • I have a public key ASD9efqidLbPdEEY0igj6zqTkKkobQRz90EpS0UgKBZiiwo

To claim this, I am signing this object:

@deontologician
deontologician / dl_notes.md
Last active July 29, 2017 07:07
DL/RL notes

Notes on Deep Reinforcement Learning

Meta

Deep learning is a lot of old techniques that work suddenly because GPUs are super powerful.

Supervised learning

  • Function approximation
@deontologician
deontologician / rxjs5.js
Created June 22, 2016 00:12
Some rxjs 5 lift magic
// Before you'd do something like:
var obs = Observable.create((subscriber) => {
some.other().observable().chain().subscribe({
next(x){ subscriber.next(x) },
error(e){ subscriber.error(e) },
complete(){ subscriber.complete() },
})
})
var r = require('rethinkdb');
var domain = require('domain');
var d = domain.create();
r.connect({host: "127.0.0.1", port: "28015"}, function(err, connection){
d.run(function(){
// Demonstrate domain is preserved over setTimeout
setTimeout(function(){
console.log("setTimeout has right domain:", process.domain === d);
}, 1);
@deontologician
deontologician / example.txt
Last active August 29, 2015 14:23
Fallout New Vegas Hacking: Optimal guessing strategy
monitoring
contending
strategies
lieutenant
scavenging
descendent
delivering
concerning
resounding
casualties
@deontologician
deontologician / index.js
Created June 12, 2015 20:58
requirebin sketch
"use strict";
var // https://github.com/Raynos/geval
Event = require("geval"),
// https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript
h = require('virtual-dom/h'),
// https://github.com/Matt-Esch/virtual-dom
diff = require('virtual-dom/diff'),
patch = require('virtual-dom/patch'),
createElement = require('virtual-dom/create-element'),
@deontologician
deontologician / index.js
Last active August 29, 2015 14:22
requirebin sketch
var h = require("virtual-dom/h"),
diff = require("virtual-dom/diff"),
patch = require("virtual-dom/patch"),
createElement = require("virtual-dom/create-element"),
Backbone = require('backbone-node'),
$ = require('jquery'),
Handlebars = require('handlebars')
var old_tree, element;
@deontologician
deontologician / hextime.py
Last active August 29, 2015 14:22
hextime
#!/usr/bin/env python
# Josh's homespun hexidecimal time
# | power | Name | equivalent | SI seconds | std equiv | kind |
# |-------+---------+--------------+-------------+-------------+------|
# | 0 | second | - | 1 second | 1 second | time |
# | 1 | whisp | 16 seconds | 16 seconds | ~1/4 minute | time |
# | 2 | yobun | 16 whisps | 256 seconds | ~4 minutes | time |
# | 3 | clock | 16 yobuns | 4Kis | ~1 hour | time |
@deontologician
deontologician / virtual hyperscript.coffee
Created June 3, 2015 20:35
coffeescript virtual-hyperscript
# Example of virtual hyperscript in coffeescript
# See: https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/README.md
render_shard = (shard, index) =>
h "li.shard", [
h "div.shard-heading", [
h "span.shard-title", ["Shard #{index + 1}"]
h "span.numkeys", ["~#{approximate(shard.num_keys)} documents"]
]
h "ul.replicas", shard.replicas.map(render_replica)