This file contains 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 various-distributions.uniform | |
(:require [incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d])) | |
(defn show-uniform-distribution [] | |
(let [dist (d/uniform-distribution 0.0 1.0) | |
n 10000 | |
x (repeatedly n #(d/draw dist)) | |
pdf-fn #(d/pdf dist %)] |
This file contains 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 various-distributions.exponential | |
(:require [incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d] | |
[incanter.stats :as s])) | |
(defn show-exponential-distribution [] | |
(let [dist (d/exponential-distribution 1.0) | |
n 100000 | |
x (repeatedly n #(d/draw dist)) |
This file contains 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
(defproject various-distributions "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.6.0"] | |
[incanter/incanter-core "1.5.5"] | |
[incanter/incanter-charts "1.5.5"]] | |
;; :jvm-opts ^:replace [] | |
:main ^:skip-aot various-distributions.core |
This file contains 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 various-distributions.beta | |
(:require [incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d] | |
[incanter.stats :as s])) | |
(defn show-beta-distribution [] | |
(let [dist (d/beta-distribution 2 5) | |
n 100000 | |
x (repeatedly n #(d/draw dist)) |
This file contains 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 more-distributions.triangular | |
(:require [incanter-contrib.distributions :as icd] | |
[incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d] | |
[incanter.stats :as s])) | |
(defn show-triangular-distribution [] | |
(let [dist (icd/triangular-distribution 0.0 0.3 1.0) | |
n 100000 |
This file contains 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 more-distributions.triangular | |
(:require [incanter-contrib.distributions :as icd] | |
[incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d] | |
[incanter.stats :as s])) | |
(defn show-gamma-distribution [] | |
(let [dist (icd/gamma-distribution 2 2) | |
n 100000 |
This file contains 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 various-distributions.gamma | |
(:require [incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d] | |
[incanter.stats :as s])) | |
;; https://github.com/incanter/incanter/issues/245 | |
(defn show-gamma-distribution [] | |
(let [dist (d/gamma-distribution 2 2) | |
n 100000 |
This file contains 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 more-distributions.cauchy | |
(:require [incanter-contrib.distributions :as icd] | |
[incanter.charts :as c] | |
[incanter.core :as i] | |
[incanter.distributions :as d] | |
[incanter.stats :as s])) | |
(defn show-cauchy-distribution [] | |
(let [dist (icd/cauchy-distribution 0 1) | |
n 100000 |
This file contains 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
;;; lazy-seq based flow | |
(defn proc-a [id] | |
;; 処理A | |
url) | |
(defn proc-b [url] | |
;; 処理B | |
json | |
) | |
(defn proc-c [json] |
This file contains 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
<html> | |
<head> | |
</head> | |
<body> | |
<script type="text/javascript" src="/js/repl-test.js"></script> | |
</body> | |
</html> |
OlderNewer