My efforts to port http://www.youtube.com/watch?v=f6kdp27TYZs to Clojure.
func boring(msg string) {
for i := 0; ; i++ {
fmt.Println(msg, i)
time.Sleep(time.Second)
}
-module(date_util). | |
-compile(export_all). | |
epoch() -> | |
now_to_seconds(now()) | |
. | |
epoch_hires() -> | |
now_to_seconds_hires(now()) | |
. |
#!/usr/bin/env python | |
import pyexiv2 | |
import fractions | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
import sys | |
def to_deg(value, loc): | |
if value < 0: |
This playbook has been removed as it is now very outdated. |
(ns scottdw.image | |
(:import | |
[java.awt Color Image Dimension] | |
[java.awt.image BufferedImage] | |
[java.io File] | |
[javax.imageio ImageIO] | |
[javax.swing JFrame JPanel]) | |
(require [scottdw.stats :as stats])) | |
(defn read-image [^String filename] |
;; from leiningen, use [dorothy/dorothy "0.0.3"] | |
(require '[dorothy.core :as dot]) | |
;; dataflow copied from chat | |
;; https://github.com/pedestal/samples/blob/master/chat/chat-client/app/src/chat_client/behavior.clj | |
(def dataflow '{:transform | |
{:outbound {:init {} :fn outbound-transform} | |
:inbound {:init {} :fn inbound-transform} | |
:nickname {:init nil :fn nickname-transform}} | |
:effect {:outbound send-message-to-server} |
(ns n01se.externs-for-cljs | |
(:require [clojure.java.io :as io] | |
[cljs.compiler :as comp] | |
[cljs.analyzer :as ana])) | |
(defn read-file [file] | |
(let [eof (Object.)] | |
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))] | |
(vec (take-while #(not= % eof) | |
(repeatedly #(read stream false eof))))))) |
My efforts to port http://www.youtube.com/watch?v=f6kdp27TYZs to Clojure.
func boring(msg string) {
for i := 0; ; i++ {
fmt.Println(msg, i)
time.Sleep(time.Second)
}
(set-env! :dependencies '[[leiningen-core "2.5.0"]]) | |
(use 'leiningen.core.project) | |
(eval (read-string (slurp "project.clj"))) | |
(set-env! | |
:source-paths (:source-paths project) | |
:resource-paths (:resource-paths project) | |
:dependencies (:dependencies project)) | |