- Leon Barrett
- Wrote claypoole
- 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
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.
| (defun toggle-fullscreen () | |
| "Toggle full screen" | |
| (interactive) | |
| (set-frame-parameter | |
| nil 'fullscreen | |
| (when (not (frame-parameter nil 'fullscreen)) 'fullboth))) |
| 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 |
| (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] |
| Object.toQueryString({'buh':[1,2]}); | |
| "buh[0]=1&buh[1]=2" | |
| On the server side, it looks like: | |
| buh = {0 => 1, 1 => 2} | |
| And we have to do buh.values in order to get it to return an array. |
| test → pwd | |
| /Users/whoahbot/code/test | |
| test → ls | |
| Gemfile Gemfile.lock | |
| test → cat Gemfile | |
| gem 'typhoeus', '0.4.0' | |
| test → bundle show | |
| Gems included by the bundle: | |
| * activesupport (3.2.3) | |
| * bundler (1.1.1) |
| { | |
| "account_number":0123456789, | |
| "period_start":YYMMDD, | |
| "period_end":YYMMDD, | |
| "starting_balance":9999.99, | |
| "account_balance":9999.99, | |
| "interest_rate":99.99, | |
| "apy":99.99, | |
| "interest_paid":99.99 | |
| } |
| select | |
| s.relname, | |
| s.seq_tup_read + s.idx_tup_fetch usage, | |
| (s.idx_tup_fetch/s.seq_tup_read::float)::decimal(18,4) index_ratio, | |
| s.seq_tup_read, s.idx_tup_fetch, | |
| s.seq_scan, s.n_live_tup, | |
| ((io.heap_blks_hit + io.idx_blks_hit)/((io.heap_blks_read + io.idx_blks_read)::float))::decimal(18,4) cache_hit_ratio | |
| FROM pg_stat_user_tables s | |
| INNER JOIN pg_statio_user_tables io | |
| ON s.relid = io.relid |