View getlife.clj
(ns getlife.core
(:gen-class)
(:require [crouton.html :as html]
[com.rpl.specter :as s]
[clojure.string :as str]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
))
(defn parse-page [n]
View processing.clj
;; This buffer is for Clojure experiments and evaluation.
;; Press C-j to evaluate the last expression.
(set-env! :dependencies #(into % '[[prismatic/plumbing "0.5.5"]]))
(require '[clojure.core.async :as async :refer [>!! alts! chan close! go-loop timeout]])
(require '[plumbing.core :as p])
(require '[plumbing.graph :as g])
(require '[plumbing.fnk.pfnk :as pfnk])
View smooth_scroll.cljs
;; smooth scroll
(def SCROLL_DURATION 550)
(def HEADER_HEIGHT 85)
(defn quad-out [p] (- (* p (- p 2))))
(defonce SMOOTH_SCROLL_ACTIVE (atom false))
(defn cancel-scroll-animation []
(reset! SMOOTH_SCROLL_ACTIVE false)
(goog.events/unlisten js/window event-type/WHEEL cancel-scroll-animation)
View 353.k
/ Daily Programmer #353
/ inputs
i1:("ATCAATATCAA";"ATTAAATAACT";"AATCCTTAAAC";"CTACTTTCTTT";"TCCCATCCTTT";"ACTTCAATATA")
i2:";"\"AACACCCTATA;CTTCATCCACA;TTTCAATTTTC;ACAATCAAACC;ATTCTACAACT;ATTCCTTATTC;ACTTCTCTATT;TAAAACTCACC;CTTTTCCCACC;ACCTTTTCTCA;TACCACTACTT"
i3:";"\"ACAAAATCCTATCAAAAACTACCATACCAAT;ACTATACTTCTAATATCATTCATTACACTTT;TTAACTCCCATTATATATTATTAATTTACCC;CCAACATACTAAACTTATTTTTTAACTACCA;TTCTAAACATTACTCCTACACCTACATACCT;ATCATCAATTACCTAATAATTCCCAATTTAT;TCCCTAATCATACCATTTTACACTCAAAAAC;AATTCAAACTTTACACACCCCTCTCATCATC;CTCCATCTTATCATATAATAAACCAAATTTA;AAAAATCCATCATTTTTTAATTCCATTCCTT;CCACTCCAAACACAAAATTATTACAATAACA;ATATTTACTCACACAAACAATTACCATCACA;TTCAAATACAAATCTCAAAATCACCTTATTT;TCCTTTAACAACTTCCCTTATCTATCTATTC;CATCCATCCCAAAACTCTCACACATAACAAC;ATTACTTATACAAAATAACTACTCCCCAATA;TATATTTTAACCACTTACCAAAATCTCTACT;TCTTTTATATCCATAAATCCAACAACTCCTA;CTCTCAAACATATATTTCTATAACTCTTATC;ACAAATAATAAAACATCCATTTCATTCATAA;CACCACCAAACCTTATAATCCCCAACCACAC"
View emacs.el
; macros
(defmacro eval-after-load-all (features form)
"Arrange that if, and only if, all `FEATURES' are loaded, `FORM' is evaluated."
(declare (indent defun))
(if (null (cdr features))
`(eval-after-load ,(car features) ,form)
`(eval-after-load ,(car features) (eval-after-load-all ,(cdr features) ,form))))
(defmacro after (features &rest body)
View lazy.cljs
(ns frontend.lazy
(:require [reagent.core :as r]
[goog.dom :as gdom]
[goog.events.EventType :as event-type]
[goog.events :as events])
(:import goog.async.Throttle))
(defonce initialized-lazy-load (atom false))
(defonce lazy-els (atom {}))
(defonce lazy-loaded (r/atom #{}))
View spacemacs.org

Version pinning

(push '("melpa-stable" . "stable.melpa.org/packages/") configuration-layer--elpa-archives)
(push '(clj-refactor . "melpa-stable") package-pinned-packages)
(push '(ac-cider . "melpa-stable") package-pinned-packages)
(push '(cljr-helm . "melpa-stable") package-pinned-packages)
(push '(cider . "melpa-stable") package-pinned-packages)
View write-image.clj
(defn write-image!
([ext buffered-image output-file]
(write-image! ext buffered-image output-file {:quality 1.0}))
([ext buffered-image output-file options]
(let [writer (.next (ImageIO/getImageWritersByFormatName ext))
write-param (.getDefaultWriteParam writer)
iioimage (IIOImage. buffered-image nil nil)
ios (ImageIO/createImageOutputStream output-file)]
(doto write-param
(.setCompressionMode ImageWriteParam/MODE_EXPLICIT)
View cool-stream.el
(progn (deftheme cool-stream "Refreshing summer theme")
(put
(quote cool-stream)
(quote theme-immediate) t)
(custom-theme-set-faces
(quote cool-stream)
(quote (font-lock-string-face ((t (:foreground "#2880c5" :background "#f2f2f2")))))
(quote (font-lock-variable-name-face ((t (:foreground "#8a8a8a")))))
(quote (font-lock-type-face ((t (:foreground "#2880c5")))))
(quote (font-lock-function-name-face ((t (:foreground "#a40000")))))
View pprinter.clj
(defn strongwrap [s] (str "<strong>" s "</strong>"))
(defn strongify-keywords [s]
(s/replace s #":[a-z0-9-]+" strongwrap))
(defn pprinter [v]
[:pre
[:code {:dangerouslySetInnerHTML
{:__html (->> (with-out-str (pp/pprint v))