This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# because... emacs | |
unbind C-b | |
set -g prefix C-z | |
# intuitive window splitting | |
unbind % | |
bind | split-window -h | |
bind _ split-window -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
def maven_dependencies(): | |
output = subprocess.check_output(["mvn", "dependency:build-classpath"]) | |
output = output.split('\n') | |
deps = set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import json | |
import os | |
import sys | |
import vcf | |
from collections import defaultdict | |