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
{:product/type :product.type/ebp | |
:product/name "Teen Intervene" | |
:product/surveys | |
[{:survey/type :survey.type/pre | |
:survey/title "Pre-Test" | |
:survey/version 3 | |
:survey/questions | |
[{:question/id 2030 | |
:question/text "Do you smoke?" | |
:question/type :question.type/single-option |
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
// implementing map in terms of reduce | |
function count(coll) { | |
return (typeof coll === "undefined") ? 0 : coll.length; | |
} | |
function isEmpty(coll) { | |
return (0 === count(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
(def github-repositories-url "https://api.github.com/search/repositories") | |
(defn repositories-req [language] | |
(go (let [response (<! (http/get github-repositories-url | |
{:with-credentials? false | |
:query-params {"q" (str "language:" language) | |
"sort" "stars" | |
"order" "desc"}}))] | |
;; just *use* the value inside this block... | |
(println (get-in response [:body :items])))) |
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
# (c) 2016 Mario Cruz | |
# please credit me if you modify and/or use this code | |
# not for commercial use | |
# lots of help from Giles Booth @blogmywiki | |
# and Christian Romney Twitter: @christianromney | |
import os | |
import glob | |
import json | |
import random |
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
# (c) 2016 Mario Cruz | |
# please credit me if you modify and/or use this code | |
# not for commercial use | |
# lots of help from Giles Booth @blogmywiki | |
# and Christian Romney Twitter: @christianromney | |
import os | |
import glob | |
import json | |
import random |
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
{"title": "Fire and Ice", | |
"author": "Robert Frost", | |
"text": ["Some say the world will end in fire,", | |
"Some say in ice.", | |
"From what I've tasted of desire,", | |
"I hold with those who favor fire.", | |
"But if I had to perish twice,", | |
"I think I know enough of hate", | |
"To say that for destruction ice", | |
"Is also great", |
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
# (c) 2016 Mario Cruz | |
# please credit me if you modify and/or use this code | |
# not for commercial use | |
# lots of help from Giles Booth @blogmywiki | |
import os | |
import glob | |
import json | |
import random | |
import printer |
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
{"title": "Fire and Ice" | |
"author": "Robert Frost" | |
"text": ["Some say the world will end in fire,", | |
"Some say in ice.", | |
"From what I've tasted of desire,", | |
"I hold with those who favor fire.", | |
"But if I had to perish twice,", | |
"I think I know enough of hate", | |
"To say that for destruction ice", | |
"Is also great", |
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
# (c) 2016 Mario Cruz | |
# please credit me if you modify and/or use this code | |
# not for commercial use | |
# lots of help from Giles Booth @blogmywiki | |
from random import * | |
from printer import * | |
from PIL import Image | |
import os | |
import glob | |
import 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
(ns brave.core | |
(:require [clojure.core.async :as a | |
:refer [thread go <! >! <!! >!! put! take! chan go-loop alts! timeout close!]])) | |
;; -== From brave clojure ==- | |
(defn hotdog-machine | |
"A hotdog vending machine returns a vector | |
with two channels: input and output. Money | |
should be deposited into the input channel |