I hereby claim:
- I am jcsims on github.
- I am jcsims (https://keybase.io/jcsims) on keybase.
- I have a public key whose fingerprint is DE17 4D49 435C C9CD 5A2A BD84 32D2 0D5D 6DB0 1A6B
To claim this, I am signing this object:
(defn select-folds | |
"Returns a vector of maps specifying training and holdout | |
observations to form k folds in a dataset" | |
[dataset k] | |
(let [rows (vec (range (m/row-count dataset))) | |
holdouts (vec (partition k (shuffle rows)))] | |
(map (fn [rows holdouts] | |
{:train (vec (remove (set rows) holdouts)) | |
:holdout holdouts}) | |
(repeat k rows) holdouts))) |
;; This is designed for EDN printing, not actually visualizing the RBM | |
;; at the REPL | |
(defmethod clojure.core/print-method RBM [rbm ^Writer w] | |
(.write w (str "#deebn.rbm/RBM {" | |
" :w " (:w rbm) | |
" :vbias " (:vbias rbm) | |
" :hbias " (:hbias rbm) | |
" :w-vel " (:w-vel rbm) | |
" :vbias-vel " (:vbias-vel rbm) | |
" :hbias-vel " (:hbias-vel rbm) |
I hereby claim:
To claim this, I am signing this object:
(ns om-tut.core | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true] | |
[cljs.core.async :refer [put! chan <!]])) | |
(enable-console-print!) | |
(def app-state | |
(atom | |
{:contacts |
http://www.clojureatlas.com/ | |
http://cemerick.com/ | |
http://clj-me.cgrand.net/ | |
https://github.com/ptaoussanis/timbre | |
https://vimeo.com/channels/wr2013 | |
http://thinkrelevance.com/how-we-work/dev_team | |
http://thinkrelevance.com/blog/2009/10/07/brians-functional-brain-take-1-5 | |
http://thinkrelevance.com/blog/2009/08/12/rifle-oriented-programming-with-clojure-2 | |
http://incanter.org/ | |
http://clojure.org/cheatsheet |
(define (not x) (if x #f #t)) | |
(define (null? obj) (if (eqv? obj '()) #t #f)) | |
(define (list . objs) objs) | |
(define (id obj) obj) | |
(define (flip func) (lambda (arg1 arg2) (func arg2 arg1))) | |
(define (curry func arg1) (lambda (arg) (apply func (cons arg1 (list arg))))) | |
(define (compose f g) (lambda (arg) (f (apply g arg)))) |
(ns jcsi.ms.wrapper | |
(:refer-clojure) | |
(:require [incanter.core :as incanter])) | |
(defn foo | |
[x] | |
(str "Hello, " x)) | |
(defn -factorial | |
[this x] |
(defn gen-primes "Generates an infinite, lazy sequence of prime numbers" | |
[] | |
(let [reinsert (fn [table x prime] | |
(update-in table [(+ prime x)] conj prime))] | |
(defn primes-step [table d] | |
(if-let [factors (get table d)] | |
(recur (reduce #(reinsert %1 d %2) (dissoc table d) factors) | |
(inc d)) | |
(lazy-seq (cons d (primes-step (assoc table (* d d) (list d)) | |
(inc d)))))) |
(defun start-irc () | |
"Connect to IRC." | |
(interactive) | |
(erc-ssl :server "<server>" | |
:port <port> | |
:nick "<nick>" | |
:password (concat "<nick>/<server>:" (read-passwd "Password:")) | |
:full-name "<full-name>" | |
)) |
Our root, | |
who art in Unix, | |
hallowed be thy shell. | |
Thy kernel come. | |
Thy commands be run | |
@localhost as they are in iNet. | |
Give us this day our daily updates, | |
And forgive us for our four-oh-threes, | |
as we forgive those who 403 against us. | |
And lead us not into segfaults, |