Skip to content

Instantly share code, notes, and snippets.

View ihodes's full-sized avatar

Isaac Hodes ihodes

View GitHub Profile
Last login: Sun Oct 27 01:26:04 on ttys000
You have new mail.
~ > curl -I http://pinboard.in/
HTTP/1.1 200 OK
Set-Cookie: groznax=pinvisit526ca4dc77f1c; expires=Mon, 28-Oct-2013 05:30:04 GMT
Strict-Transport-Security: max-age=1607000; includeSubDomains
Vary: Accept-Encoding
Content-Type: text/html; charset=utf8
Accept-Ranges: bytes
Date: Sun, 27 Oct 2013 05:30:04 GMT
(defn def-json-response
[code type]
(letfn [(resp
([] (-> {:error type} response (status code)))
([addl] (-> {:error type}
(merge addl)
response
(status code))))]
(intern 'skrio.core (symbol (str "respond-" code)) resp)))
(ns skrio.responses
(:use [ring.util.response :only (status response)]))
(defn def-json-response
[code type]
(letfn [(resp
([] (-> {:error type} response (status code)))
([addl] (-> {:error type}
(merge addl)
(ns brains.core
"Provides a functional backpropagation implementation for deep-learning neural
networks.")
;; POSSIBLE TODOS
;; 1. momentum (requires storing previous weight change deltas)
(def ^:dynamic *learning-rate* 0.2)
(def ^:dynamic *momentum* 0.9)
(ns fun.matching
(:require [clojure.core.match :refer [match emit-pattern to-source groupable?]]))
;; adding set literals to match
(defrecord SetPattern [set])
(defmethod emit-pattern clojure.lang.PersistentHashSet
[pat]
(SetPattern. pat))
(defmethod groupable? [SetPattern SetPattern]
# because... emacs
unbind C-b
set -g prefix C-z
# intuitive window splitting
unbind %
bind | split-window -h
bind _ split-window -v
(ns cljson-shootout.core
(:require cheshire.core clj-json.core clojure.data.json
[criterium.core :refer :all]))
(def +json+ "{\"apple\":\"pie\", \"banana\":{\"qwertyuiopasdfghjklzxcvbnm,\":100, \"askdfj adlskfj\":[1,2,3,4,5,1,2,3,4,1,2,3,4,3,3,2,2,2,2,2,2,2,\"Whoa there!\"]}, \"anarray\":[893172,19203809,12093810928309123,1237732,123,0.111]}")
(defn cheshire-test
(ns cljson-shootout.core
(:require cheshire.core clj-json.core clojure.data.json
[criterium.core :refer :all]))
(def +json+ "{\"apple\":\"pie\", \"banana\":{\"qwertyuiopasdfghjklzxcvbnm,\":100, \"askdfj adlskfj\":[1,2,3,4,5,1,2,3,4,1,2,3,4,3,3,2,2,2,2,2,2,2,\"Whoa there!\"]}, \"anarray\":[893172,19203809,12093810928309123,1237732,123,0.111]}")
(defn cheshire-test
import subprocess
def maven_dependencies():
output = subprocess.check_output(["mvn", "dependency:build-classpath"])
output = output.split('\n')
deps = set()
# coding: utf-8
import json
import os
import sys
import vcf
from collections import defaultdict