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 machine-learning.ann | |
(:use clojure.core.matrix) | |
(:require [clojure.core.matrix.impl.mathsops :as m] | |
[clojure.core.matrix.operators :as o])) | |
(defn make-layers [coll] | |
"Takes a coll like [3 4 2] and uses it to make an architecture of 3 layers with an input layer of 3 nodes, hidden layer of 4, etc. " | |
(let [make-layer (fn [number-of-nodes] (vec (take number-of-nodes (repeat 0)))) | |
input-layer (make-layer (first coll)) |
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
;;==== Object Oriented Clojure ====;; | |
;;;;-------------------------;;;; | |
;;;; functions & macros ;;;; | |
;;;;-----------------------------;;;; | |
;;;;---------| private |--------;;;; | |
;; general abstraction over override functions |
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 logic.core | |
(:require [clojure.core.logic.pldb :as pldb] ;; facts are now stored in a logic database which requires the pldb ns | |
[clojure.core.logic.fd :as fd] ;; for constraint programming, no need to include include in project.clj | |
[clojure.core.logic :refer :all :exclude [record?]])) ;; I left out ":as :logic" for aesthetics | |
(run* [answer] | |
(== answer 5)) | |
(run* [val1 val2] | |
(== {:a val1, :b 2} |
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 samsara.core | |
(:import java.util.Date)) | |
(def sensual-objects (atom #{{:G__8279 [:neutral :thought]}})) | |
(def mindfulness (atom 44444)) | |
(def karmic-history (atom [])) | |
(def faculties (atom {:faith 0 :energy 0 :concentration 0 :wisdom 0})) | |
(def ignorance (atom 88888)) | |
(defn map-span |
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 jsync.elevator | |
(:refer-clojure :exclude [map reduce into partition partition-by take merge]) | |
(:require [clojure.core.async :refer :all :as async])) | |
;; This is necessary to check and see what is on the persistent queue | |
(defmethod print-method clojure.lang.PersistentQueue | |
[q, w] | |
(print-method '<- w) | |
(print-method (seq q) w) | |
(print-method '-< w)) |