bin/datomic backup-db "datomic:ddb://us-east-1/rest/of/url?aws_access_key_id=<ACCESS_KEY_ID>&aws_secret_key=<SECRET_KEY>" file:/home/ian/datomic-backup-`date +"%Y%d%m"`
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
static { | |
final List<String> stopWords = Arrays.asList( | |
"a", "an", "and", "are", "as", "at", "be", "but", "by", | |
"for", "if", "in", "into", "is", "it", | |
"no", "not", "of", "on", "or", "such", | |
"that", "the", "their", "then", "there", "these", | |
"they", "this", "to", "was", "will", "with" | |
); | |
final CharArraySet stopSet = new CharArraySet(stopWords, false); | |
ENGLISH_STOP_WORDS_SET = CharArraySet.unmodifiableSet(stopSet); |
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
(defun gorilla-empty-all-results* () | |
(while (re-search-forward | |
";; @@\n\\(;; ->\n\\)?\\(;;;.*\n\\)*\\(;; <-\n\\)?;; =>\n\\(;;;.*\n\\)+;; <=" | |
nil t) | |
(replace-match ";; @@"))) | |
(defun gorilla-empty-all-results () | |
"Empty all Gorilla REPL result blocks" | |
(interactive) | |
(save-excursion |
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 introspect.core | |
(:require [clojure.core.match :as match] | |
[clojure.java.io :as io] | |
[clojure-mail.core :as mail] | |
[clojure-mail.message :as message] | |
[opennlp.nlp :as onlp] | |
[opennlp.treebank :as treebank] | |
[opennlp.tools.filters :as filters] | |
[corenlp :as nlp]) | |
(:import (org.apache.tika Tika) |
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 node-cljs-pos.core | |
(:require [cljs.nodejs :as node])) | |
(node/enable-util-print!) | |
(def pos (node/require "pos")) | |
(defn pos-lexer [s] | |
(let [Lexer (.-Lexer pos) | |
lexer (Lexer.)] |
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
(defn wrap-generic-middleware-example [handler & [other-args]] | |
(fn [request] | |
;; Early side-effects: | |
(log/info "Wrapping incoming request...") | |
(let [;; Modify request here: | |
req (assoc request :new-req-key "some value for handlers") | |
;; Run the handlers: | |
resp (handler req)] | |
;; Late side-effects: | |
(log/info "My middleware is almost done.") |
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
{:uri "/foo" | |
:http-method :post | |
:headers {"content-type": "application/json" | |
"accept": "*/*"} | |
:body <InputStream ...>} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.