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 foo.core | |
(:refer-clojure :exclude [slurp])) | |
(defmacro slurp [file] | |
(clojure.core/slurp file)) | |
;; In CLJS | |
(ns bar.core | |
(:require [foo.core :include-macros true :refer [slurp]])) |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" | |
) |
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
git_tracked_files = `git ls-files -z`.split("\x0") | |
gem_ignored_files = `git ls-files -i -X .gemignore -z`.split("\x0") | |
spec.files = git_tracked_files - gem_ignored_files |
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
(defstruct trie-node :word-fragment :type :children) | |
(defn type-switch [node type-val] | |
(assoc node :type type-val)) | |
(defn switch-to-word [node] | |
(type-switch node :word)) | |
(defn switch-to-nonword [node] | |
(type-switch node :nonword)) | |
; constructors |
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
private def getForecast:Try[JsValue] = { | |
val ts = date.getTime / 1000 | |
val u = { | |
if (date == new Date()) new URL(s"https://api.forecast.io/forecast/$apiKey/$lat,$lon?units=$units") | |
else new URL(s"https://api.forecast.io/forecast/$apiKey/$lat,$lon,$ts?units=$units") | |
} | |
val s = new Scanner(u.openStream(), "UTF-8") | |
Try{s.useDelimiter("\\A").next().asJson} | |
} |
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
# Grammar for Python | |
# Note: Changing the grammar specified in this file will most likely | |
# require corresponding changes in the parser module | |
# (../Modules/parsermodule.c). If you can't make the changes to | |
# that module yourself, please co-ordinate the required changes | |
# with someone who can; ask around on python-dev for help. Fred | |
# Drake <fdrake@acm.org> will probably be listening there. | |
# NOTE WELL: You should also follow all the steps listed in PEP 306, |
NewerOlder