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
public class Issue1351 | |
{ | |
private readonly ITestOutputHelper output; | |
public Issue1351(ITestOutputHelper output) | |
{ | |
this.output = output; | |
} | |
[Fact] |
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
[{:kana [{:expr "サイズ", :romaji "saizu", :kana {:kata 3}, :pri {:common true}}], | |
:trans {:en {:PoS ["common noun"], :exprs [["size"]]}, | |
:fr {:PoS ["common noun"], :exprs [["taille"]]}, | |
:de {:PoS ["common noun"], :exprs [["Größe" "Nummer" "Format" "Kleidergröße"]]}, | |
:hu {:PoS ["common noun"], :exprs [["enyv" "ragasztóanyag" "terjedelem"]]}, | |
:ru {:PoS ["common noun"], :exprs [["((англ.) size) размер, величина; формат"]]}, | |
:sl {:PoS ["common noun"], :exprs [["mera" "velikost" "konfekcijska številka"]]}, | |
:es {:PoS ["common noun"], :exprs [["tamaño " "magnitud"]]}, | |
:sv {:PoS ["common noun"], :exprs [["format"]]}}, | |
:other []} |
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 spy.core) | |
(defn- get-hostname [] | |
(.. java.net.InetAddress getLocalHost getHostName)) | |
(def debug? | |
"ADAPT ME!!" | |
(delay (or (= "dev" (System/getProperty "nomad.env")) | |
(= (get-hostname) "sky")))) |
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
;; Utility functions: | |
;; Space separted number values: | |
(defn ssn [s] (mapv #(Long/parseLong %) (str/split s #"\s+"))) |
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 simple-md-parser | |
"Simple markdown parser." | |
[s special] | |
(let [it (iter s) | |
out-state (fn [out text state] | |
(conj out {:text text | |
:state (into [] (keep (fn [[k v]] | |
(when v k))) state)}))] | |
(loop [out [] | |
state {} |
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: https://github.com/gfredericks/misquote | |
(defn- listish? | |
"Gets both lists and lazy seqs." | |
[ob] | |
(and (sequential? ob) (not (vector? ob)))) | |
(defn- unquote-form? | |
[form] | |
(and (listish? form) |
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 kw-cache #js{}) | |
(defn cached-kw [fqn] | |
(if-some [kw (unchecked-get kw-cache fqn)] | |
kw | |
(let [kw (keyword fqn)] | |
(unchecked-set kw-cache fqn kw) | |
kw))) | |
(defn js->clj-fast |
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 ansible.core | |
(:require [clojure.java.shell :as sh] | |
[clojure.string :as str] | |
[cheshire.core :as cheshire] | |
[clojure.java.io :as io]) | |
(:import (java.io File) | |
(com.fasterxml.jackson.core JsonGenerator) | |
(java.util Base64) | |
(java.security MessageDigest MessageDigest$Delegate))) |
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
(defmacro with-temp-files | |
"Create a block where `varname` is a temporary `File` containing `content`." | |
[bindings & body] | |
(let [bindings (partition 2 bindings)] | |
`(let ~(into [] | |
(mapcat | |
(fn [[bind-name content]] | |
`[~bind-name (File/createTempFile ~(str bind-name) ".json")])) | |
bindings) | |
~@(mapv |
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 v8.core | |
" | |
Start Chrome with: | |
google-chrome-beta --js-flags=\"--allow-natives-syntax\" | |
") | |
(defn v8 | |
"Runs a v8 natives syntax command with eval." | |
([c] |
NewerOlder