Skip to content

Instantly share code, notes, and snippets.

View whoahbot's full-sized avatar

Dan Herrera whoahbot

  • Portland, Oregon
View GitHub Profile
@whoahbot
whoahbot / clojure-west.org
Last active October 13, 2016 07:41
Clojure west notes

Clojure West

Domain driven design with Clojure

  • Organizing larger applications
  • Domain logic shouldn’t include handlers for bad/unclean data.
    • validateur, bouncer, clj-schema for checking data going into the pipeline.
    • domain-specific, semantic checks
    • TODO: Any better ways for doing this conditional validation.
    • Need to factor out common data cleaning utils into shared library.
@whoahbot
whoahbot / treewalk
Last active December 21, 2015 06:19 — forked from rasmusto/treewalk
(ns async-playground.core
(:require [clojure.core.async :as async
:refer [go chan >! <! >!! <!! timeout close!
thread alts! alts!! sliding-buffer]]))
(defn walk [t]
(cond (nil? t)
nil
:else
(let [[l v r] t]
@whoahbot
whoahbot / errors.sql
Created October 22, 2013 23:09
errors with wal-e restore'd skyliner.
skyliner=# select count(transaction_id) from transaction_kv where when_created > '2013-10-22T00:00:00.000-00:00';
ERROR: could not read block 373028 in file "base/67212/90213.2": read only 0 of 8192 bytes
@whoahbot
whoahbot / gist:7255993
Created October 31, 2013 19:54
toggle fullscreen in railwaycat emacs
(defun toggle-fullscreen ()
"Toggle full screen"
(interactive)
(set-frame-parameter
nil 'fullscreen
(when (not (frame-parameter nil 'fullscreen)) 'fullboth)))
@whoahbot
whoahbot / halp.md
Last active January 3, 2016 02:18 — forked from miah/halp.md

This is a sample from a tar file class I created for a chef cookbook. In this example I'm iterating over entries in the tar file. Because of the way tar handles filenames over 100 chars (././@LongLink) I have to do something to register that i'm dealing a longlink and treat the next entry differently.

I would love any advice on how to clean this up. Its a super long method, I especially don't like that I have to set full_name to nil and twice.

Code here

Tar Longlink

@whoahbot
whoahbot / clojure-west-2015.org
Last active August 29, 2015 14:19
Clojure West 2015 Notes

Clojure Parallelism, beyond futures

intro

  • Leon Barrett
    • Wrote claypoole

example

  • Continuous rank probability score
  • model output produces a distribution of samples
  • want to compare observed to our model
  • fn crps
    • We map this crps fn for each timestep