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 inferno.storage | |
(:import | |
[com.google.cloud.storage BlobId] | |
[com.google.cloud.storage BlobInfo] | |
[com.google.cloud.storage StorageOptions])) | |
(set! *warn-on-reflection* true) | |
(defn storage [] (.getService (StorageOptions/getDefaultInstance))) |
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
from fixture import TestCase | |
from google.appengine.ext import ndb | |
from hypothesis import given | |
from hypothesis.strategies import (floats, integers, text, booleans, | |
datetimes, none, fixed_dictionaries, | |
lists, sampled_from, composite) | |
from user import User | |
PROPERTIES = { |
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
from google.appengine.ext import ndb | |
class User(ndb.Model): | |
identity = ndb.ComputedProperty(lambda self: self.key.id()) | |
name = ndb.ComputedProperty(compute_name) | |
first_name = ndb.StringProperty() | |
last_name = ndb.StringProperty() | |
email = ndb.StringProperty() | |
organization = ndb.ComputedProperty(lambda self: self.key.parent()) |
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 csv-example | |
(:require | |
[clojure.string :as string])) | |
(def csv | |
[["name" "age" "occupation" "gender"] | |
["Peter Pan" 312 "Lost Boy" "male"] | |
["Wendy Darling" 14 "Older Sister" "female"] | |
["Captain Hook" 330 "Pirate" "male"] | |
["Tinker Bell" nil "Fairy" "female"]]) |
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
from app import app | |
from flask import jsonify, Flask | |
from google.appengine.ext import ndb | |
from google.appengine.ext.ndb import metadata | |
from google.appengine.datastore.datastore_query import Cursor | |
app = Flask(__name__) | |
def paginate(kind, urlsafe_cursor=None): |
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
import json | |
import requests | |
import subprocess | |
import sys | |
BEARER_CMD = 'vault read -field=bearer_token secret/oauth' | |
BEARER_TOKEN = subprocess.check_output(BEARER_CMD.split(' ')) | |
URL = 'https://oauth-dot-talkiq-integration.appspot.com/stream' |
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
(deftask build | |
"Builds cljs and code for production" | |
[] | |
(comp | |
(cljs :optimizations :advanced) | |
(target))) | |
(deftask testing [] | |
(merge-env! :source-paths #{"test"}) | |
identity) |
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 vidiot.listener.paths | |
(:require | |
[cljs.spec :as s] | |
[cljs.spec.impl.gen :as gen] | |
[cljs.spec.test :as stest])) | |
(def path (s/coll-of (s/with-gen string? #(s/gen #{"a" "b" "c" "d"})) | |
:min-count 1 | |
:kind vector? |
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
(require 'boot.repl) | |
(swap! boot.repl/*default-dependencies* | |
concat '[[cider/cider-nrepl "0.10.0-SNAPSHOT"] | |
[refactor-nrepl "1.1.0"]]) | |
(swap! boot.repl/*default-middleware* | |
conj 'cider.nrepl/cider-middleware) |
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
(set-env! | |
:source-paths #{"src/clj" "src/cljs" "test/clj"} | |
:resource-paths #{"html"} | |
:dependencies '[[adzerk/boot-cljs "0.0-3308-0"] | |
[adzerk/boot-cljs-repl "0.1.10-SNAPSHOT"] | |
[adzerk/boot-reload "0.3.1"] | |
[adzerk/boot-test "1.0.4"] | |
[cljsjs/hammer "2.0.4-4"] | |
[cljsjs/media-stream-recorder "1.2.6-0"] | |
[compojure "1.1.6"] |