(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)
This file contains hidden or 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
#!/usr/bin/env python3 | |
import requests | |
import pprint | |
import itertools | |
from xml.etree import ElementTree | |
from flask import Flask, render_template, Markup, escape | |
from jinja2 import evalcontextfilter | |
import re | |
import time |
This file contains hidden or 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 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] |
This file contains hidden or 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
;; 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]) |
This file contains hidden or 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
;; 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) |
This file contains hidden or 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
/ 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" |
This file contains hidden or 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
; 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) |
This file contains hidden or 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 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 #{})) |
This file contains hidden or 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 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) |
This file contains hidden or 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
(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"))))) |