- @fergbyrne
- HTM = Hierarchical Temporal Memory
- Slides
- big data is like teenage sex
- noone knows how to do it
- everyone thinks everyone else is doing it
| (ns async-test.throttle.core | |
| (:require [cljs.core.async :refer [chan close!o sliding-buffer]] | |
| [clojure.string :as string]) | |
| (:require-macros | |
| [cljs.core.async.macros :as m :refer [go alts!]])) | |
| (def c (chan (sliding-buffer 1))) | |
| (def loc-div (.getElementById js/document "location")) | |
| (.addEventListener js/window "mousemove" |
| $ jpm init | |
| JPM info Running init on undefined | |
| title: (My Jetpack Addon) | |
| name: (my-jetpack) | |
| version: (0.0.0) | |
| Enable node packages? (yes) | |
| description: | |
| entry point: (index.js) | |
| author: | |
| engines (comma separated): (firefox,fennec) |
| (ns om-tut.core | |
| (:require [om.core :as om :include-macros true] | |
| [om.dom :as dom :include-macros true])) | |
| (enable-console-print!) | |
| (def app-state (atom {:text "Works", :data [{:text "Doesn't"}]})) | |
| (defn handle-change | |
| [e data edit-key owner] |
| (ns example.main | |
| (:use [backtype.storm clojure config log])) | |
| (defbolt split-sentence ["word"] | |
| [tuple collector] | |
| (let [words (.split (.getString tuple 0) " ")] | |
| (doseq [w words] | |
| (emit-bolt! collector [w] :anchor tuple)) | |
| (ack! collector tuple))) |
| # Install | |
| # via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install google-chrome-stable | |
| # Update |
| ;; Remember to (:import goog.Uri) in your ns declaration | |
| ;; Example input/output: | |
| ;; http://localhost:10555/?model=duck&manual-tick=false&collapse-all=true&capture-first-frame=true&skybox-name=sky1.png&age=30&money=300.30 | |
| ;; => {:model "duck", | |
| ;; :tick-first-frame? false, | |
| ;; :manual-tick? false, | |
| ;; :collapse-all? true, | |
| ;; :capture-first-frame? true, | |
| ;; :skybox-name ["sky1" "png"], | |
| ;; :age 30, |
| (require '[clojure.core.async :as async] | |
| '[clj-http.client :as client] | |
| '[clojure.data.json :as json]) | |
| (def concurrency 5) | |
| (let [in (async/chan) | |
| out (async/chan) | |
| request-handler (fn [url out*] | |
| (async/go |
| REM | |
| REM Setup a MongoDB Sharded Cluster | |
| REM | |
| REM Reference: http://cookbook.mongodb.org/operations/convert-replica-set-to-replicated-shard-cluster/ | |
| REM More Info: http://www.kchodorow.com/blog/2010/08/09/sharding-and-replica-sets-illustrated/ | |
| REM | |
| REM Download and Unpack MongoDB Software | |
| REM | |
| SET URL="https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.11.zip" |
| // Based on Chris Webb's blog post - http://blog.crossjoin.co.uk/2014/05/21/expanding-all-columns-in-a-table-in-power-query/ | |
| let | |
| //Define function taking two parameters - a table and an optional column number | |
| Source = (TableToExpand as table, optional ColumnNumber as number) => | |
| let | |
| //If the column number is missing, make it 0 | |
| ActualColumnNumber = if (ColumnNumber=null) then 0 else ColumnNumber, | |
| //Find the column name relating to the column number | |
| ColumnName = Table.ColumnNames(TableToExpand){ActualColumnNumber}, |