This file contains hidden or 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 transform | |
| (:require [clojure.xml :refer [parse]] | |
| [clojure.zip :refer [xml-zip node up]] | |
| [clojure.data.zip.xml :refer [xml-> xml1-> text attr attr=]] | |
| [clojure.data.json :refer [write-str]])) | |
| (defn- team-name [event alignment] | |
| (xml1-> event :team :team-metadata (attr= :alignment alignment) :name (attr :first))) | |
| (defn- sports-event [event] |
This file contains hidden or 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 batchreq.core | |
| (:refer-clojure :exclude [map reduce into partition partition-by take merge]) | |
| (:require [clojure.core.async :refer :all :as async] | |
| [clj-http.client :as client]) | |
| (:use taoensso.timbre | |
| taoensso.timbre.profiling)) | |
| (defnp http-get [id] | |
| (client/get (format "http://fssnip.net/%d" id)) | |
| id) |
This file contains hidden or 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
| docker exec -it cwservice /bin/sh |
This file contains hidden or 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
| (require '[clojure.test :refer [is]]) | |
| (defn pure-adder [x y] | |
| (+ x y)) | |
| (is (= 3 (pure-adder 1 2))) |
This file contains hidden or 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
| (require '[clojure.test :refer [is]]) | |
| (defn random-beatle [] | |
| (case (rand-int 4) | |
| 0 "John" | |
| 1 "Paul" | |
| 2 "George" | |
| 3 "Ringo")) | |
| (defn hello-beatle [] |
This file contains hidden or 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
| (require '[clojure.test :refer [is]]) | |
| (defn random-beatle [] | |
| (case (rand-int 4) | |
| 0 "John" | |
| 1 "Paul" | |
| 2 "George" | |
| 3 "Ringo")) | |
| (defn hello-beatle [get-beatle] |
This file contains hidden or 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
| (def beatle->email | |
| {:john "john.lennon@beatles.com" | |
| :paul "paul.mccartney@beatles.com" | |
| :george "george.harrison@beatles.com" | |
| :ringo "ringo.starr@beatles.com"}) | |
| (defn lookup-email [beatle-id] | |
| (get beatle->email beatle-id)) | |
| (defn send-message [email message] |
This file contains hidden or 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 spy-example.core-test | |
| (:require [clojure.test :refer [deftest testing is]] | |
| [spy.core :as spy])) | |
| (def beatle->email | |
| {:john "john.lennon@beatles.com" | |
| :paul "paul.mccartney@beatles.com" | |
| :george "george.harrison@beatles.com" | |
| :ringo "ringo.starr@beatles.com"}) |
This file contains hidden or 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
| ### Keybase proof | |
| I hereby claim: | |
| * I am alexanderjamesking on github. | |
| * I am ajking (https://keybase.io/ajking) on keybase. | |
| * I have a public key ASD5bNI-pQZ6-aYSsCLkh8HAxsGsr2YevK3WVSSl-3HBmAo | |
| To claim this, I am signing this object: |
This file contains hidden or 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
| rapper -i turtle -o dot model.ttl | dot -Tpdf -omodel.pdf |