Skip to content

Instantly share code, notes, and snippets.

@kaz-yos
Created January 3, 2015 23:51
Show Gist options
  • Save kaz-yos/c133bb2370e0a3f5e388 to your computer and use it in GitHub Desktop.
Save kaz-yos/c133bb2370e0a3f5e388 to your computer and use it in GitHub Desktop.
#!/usr/bin/env lein-exec
;; Can run as a shell script if proper configurations have been done
;; https://github.com/kumarshantanu/lein-exec#executable-scripts
;;; Getting dependencies from within script
;; https://github.com/kumarshantanu/lein-exec#getting-dependencies-from-within-script
;; Usually run by lein exec script.clj
(use '[leiningen.exec :only (deps)])
(deps '[[org.clojure/clojure "1.6.0"]
[bigml/sampling "3.0"]])
;;; Namespace
(ns lein-exec
(:require [clojure.string :as cstr]
[clojure.set :as cset]
[clojure.java.io :as jio]
(bigml.sampling [simple :as simple]
[reservoir :as reservoir]
[stream :as stream])))
(println (simple/sample (range 5)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment