This paper:
Finding the number of clusters in a data set: An information theoretic approach
CATHERINE A. SUGAR AND GARETH M. JAMES
>Marshall School of Business, University of Southern California
(ns clipboard.core | |
(:import (java.awt.datatransfer DataFlavor Transferable StringSelection) | |
(java.awt Toolkit))) | |
(defn get-clipboard | |
[] | |
(-> (Toolkit/getDefaultToolkit) | |
(.getSystemClipboard))) | |
(defn slurp-clipboard |
Benchmark code at: https://github.com/nathanmarz/specter/blob/master/scripts/benchmarks.clj | |
Run against Clojure 1.7.0 and Java 1.7.0 on Mac OSX 10.11.6 | |
Benchmark: get value in nested map (2500000 iterations) | |
Avg(ms) vs best Code | |
53.528 1.00 (-> data (get :a) (get :b) (get :c)) | |
54.708 1.02 (-> data :a :b :c) |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current window# paste this into your console and hit enter | |
for voice in Agnes Kathy Princess Vicki Victoria Alex Bruce Fred Junior Ralph Albert Bad News Bahh Bells Boing Bubbles Cellos Deranged Good News Hysterical Pipe Organ Trinoids Whisper Zarvox; do say "Hi `whoami` my name is ${voice}" -v ${voice}; done |
Code: | |
(ns vararg-bench.core | |
(:require [criterium.core :refer [quick-bench]]) | |
(:gen-class)) | |
(defn varargs [arg1 & [arg2 arg3]] | |
42) |
;; Make sure to require this file before you run your tests, and after any other | |
;; library that uses the same clojure.test hooks. | |
;; | |
;; NOTE: This doesn't work if you run your tests with `lein difftest`. | |
(ns example.test | |
(:require [clojure.pprint :refer [print-table]] | |
[clojure.test :refer [report with-test-out]])) | |
(def ^:private ^:const slow "in seconds" | |
0.1) |
(ns piskvorky.core | |
(:require [clojure.string :as s]) | |
(:gen-class)) | |
(defn usage [] | |
(println "Ahoj v piskvorkach naslepo.\nPovolene prikazy jsou:\nnew - nova hra\nquit - konec\n[a-i][0-9] - tah na pole, kde rada je pozice a, b, c, d, e, f, g, h, i. Sloupec je 1 ... az 9.\nformat zapisu je napr. e5\nZacina x")) | |
(defn make-board [] | |
(vec (repeat 9 (vec (repeat 9 :nothing))))) | |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."