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 path-element (s/or :key keyword? :index integer?)) | |
(s/def :column/title string?) | |
(s/def :column/spec (s/or :path (s/+ path-element) | |
:path+keys (s/cat :path (s/* path-element) | |
:keys (s/coll-of keyword? [])) | |
:path+fn (s/cat :path (s/* path-element) | |
:fn fn?) | |
:fn fn?)) | |
(s/def ::column (s/keys :req [:column/title :column/spec])) | |
(s/def :grid/title string?) |
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
{: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 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
// 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 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 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 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
# (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 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
# (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 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
{"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 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
# (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 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
{"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 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
# (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 |