| layout | title | date | comments | categories |
|---|---|---|---|---|
post |
Clojure Lesson Learned |
2013-07-04 18:45 |
true |
| HOMEBREW_VERSION: 0.9.4 | |
| ORIGIN: https://github.com/mxcl/homebrew | |
| HEAD: 6c86594755fc811faa06d7ac1827d7246c365f12 | |
| HOMEBREW_PREFIX: /usr/local | |
| HOMEBREW_CELLAR: /usr/local/Cellar | |
| CPU: quad-core 64-bit ivybridge | |
| OS X: 10.8.4-x86_64 | |
| Xcode: 4.6.3 | |
| Error: uninitialized constant MacOS::CLT::STANDALONE_PKG_PATH | |
| Please report this bug: |
| git branch --merged master | grep -v 'master$' | xargs git branch -d |
| tell application "Finder" | |
| sleep | |
| end tell |
| (ns reducers.core | |
| ;(:require [clojure.core.reducers :as r]) | |
| ) | |
| (def N (iterate inc 0)) | |
| (def finish 6e6) | |
| ; this is just for testing if a random map function will stop the parelleltiy | |
| (defn only-even [x] |
Hi.
Though this isn't an Adcloud Event, we're mailing you because it's the same workshop we held last month at Adcloud. (Previously, we didn't have space for all the interested people.)
So if you are still interested, we will repeat an (improved) workshop this Thursday at the Cologne Clojure User Group.
Feel free to join us:
On Google Plus: https://plus.google.com/events/c1volcdbebka7e9t27phh8mdjdk
Hi.
Also this is not an Adcloud Event, we are mailing you, because it's the same workshop we held last month at Adcloud. Due to limited space capacities we could not fitt in all the people that where interessted.
So if you are still interessted, we will repeat a improved version of the workshop this thursday at the Cologne Clojure User Group.
Feel free to join us:
| (ns athena.incanter-extensions | |
| (:use [incanter.core :only [head $ $where nrow dataset? to-dataset]]) | |
| (:import [java.lang Math])) | |
| (defn tail | |
| "Like incanter.core/head but returning the tail." | |
| ([mat] (tail 10 mat)) | |
| ([len mat] | |
| (let [upper-bound (nrow mat) |
| ;; using a let to store intermediat results | |
| (defn recommendations [scores user] | |
| (let [user-row (.viewRow (:matrix scores) | |
| (get (:row-mapping scores) | |
| user)) | |
| sorted-by-score (sort-by #(get % 1) | |
| (non-zero user-row))] | |
| (map (fn [[item, score]] | |
| {:item item, :score score}) | |
| sorted-by-score))) |
| /* Send this to http://<IP>:<PORT>/jsonrpc | |
| Also set header: | |
| Content-Type: application/json | |
| */ | |
| {"jsonrpc":"2.0", | |
| "method": "GUI.ShowNotification", | |
| "params": {"title": "Twitter Username", | |
| "message": "Example Message.", | |
| "image": "preview_image_url", | |
| "displaytime": 25000}, |