Skip to content

Instantly share code, notes, and snippets.

(ns org.kirelabs.classifijure.elastic
(:use
[clojure.test]
[incanter.core])
)
(defn match-elastic
[sequence other measure]
(let [measure (memoize measure)]
(letfn [(match
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’
/usr/local/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here
openssl_missing.c:27: error: conflicting types for ‘HMAC_CTX_copy’
/usr/local/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here
make[1]: *** [openssl_missing.o] Error 1
make: *** [mkmain.sh] Error 1
class Hash
# combines like merge-with from Clojure
# Returns a map that consists of the rest of the maps conj-ed onto
# the first. If a key occurs in more than one map, the mapping(s)
# from the latter (left-to-right) will be combined with the mapping in
# the result by calling (f val-in-result val-in-latter).
def update_with(*hashes, &block)
hashes.each do |h|
h.each do |k,v|
module Rack
class CORS
def initialize(app, patterns = { /.*/ => {} })
@app = app
@patterns = patterns
end
def call(env)
module Rack
class Arduino
def initialize
@stats = {
'r' => '255',
'g' => '0',
'b' => '0',
'on' => ''
}
end
class Record < ActiveRecord::Base
has_one :association
# module DefaultAssociation
# def association(force_reload = false)
# super || build_association
# end
# end
# include DefaultAssociation

dtw.rb

Infinity = 1.0/0
DTW = lambda do |first, second, measure|
  n, m = first.size, second.size
  dtw = Array.new(n+1){Array.new(m+1){Infinity}}
  dtw[0][0] = 0.0
  1.upto(n) do |i|

1.upto(m) do |j|

We couldn’t find that file to show.
(ns your.programs.namespace
;; ...
(:use [swank/swank :as swank])
(defn main [& args]
;; ...
(swank/start-repl))
We couldn’t find that file to show.