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
brew 'ack' | |
brew 'ag' | |
brew 'coreutils' | |
brew 'bash-completion' | |
brew 'openssl' | |
brew 'readline' | |
brew 'ispell' | |
brew 'wget' | |
brew 'tree' | |
brew 'autoenv' |
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
""" | |
Functions that implement some of the same functionality found in Matlab's bwmorph. | |
`thin` - was taken and adapted from https://gist.github.com/joefutrelle/562f25bbcf20691217b8 | |
`spur` - Not perfect but pretty close to what matlab does via LUTs | |
`endpoints` - lines up perfectly with matlab's output (in my limited testing) | |
`branches` - this results in more clustered pixels than matlab's version but it pretty close | |
""" | |
import numpy as np | |
import scipy.ndimage as ndi |
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
(* see https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-format-details *) | |
statements = (type-def | help | metric)* | |
type-def = <"# TYPE "> metric-name <space> type <newline>? | |
type = #"counter|gauge|histogram|summary|untyped" | |
help = <"# HELP "> metric-name <space> docstring <newline>? | |
metric = metric-name labels? <space> value (<space> timestamp)? <newline>? | |
labels = <'{'> label-name label-value {<','> label-name label-value} <','>? <'}'> | |
(* the below doesn't take into account escaping but probably not an issue for our use case *) |
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 '[spec-tools.core :as st]) | |
(require '[spec-tools.spec :as st.s]) | |
(require '[clojure.spec.alpha :as s]) | |
(s/def ::cheese st.s/string?) | |
(s/def ::stuff st.s/int?) | |
(s/def ::bar (st/spec (s/keys :req-un [::cheese]))) | |
(s/def ::foo (st/spec (s/keys :req-un [::stuff]))) | |
(s/def ::response (s/or :b ::bar :f ::foo)) |
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
brew 'ack' | |
brew 'ag' | |
brew 'coreutils' | |
brew 'bash-completion' | |
brew 'openssl' | |
brew 'readline' | |
brew 'ispell' | |
brew 'wget' | |
brew 'tree' | |
brew 'autoenv' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
0 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
;; my first version taking advantage of the new shuffle generator introduced in 0.6... | |
(defn sublist1 | |
[coll] | |
(-> (gen/tuple (gen/shuffle coll) (gen/choose 0 (count coll))) | |
(gen/bind (fn [[coll* how-many]] | |
(gen/return (take how-many coll*)))))) | |
;; version inspired by http://roberto-aloi.com/erlang/notes-on-erlang-quickcheck/ | |
;; sublist(L0) -> | |
;; ?LET(L, [{E, eqc_gen:bool()} || E <- L0], [X || {X, true} <- L]). |
NewerOlder