Skip to content

Instantly share code, notes, and snippets.

;; -*- mode: clojure; -*-
(set-env!
:src-paths #{"src/clj" "src/cljs"}
:rsc-paths #{"resources"}
:update :always
:dependencies '[[org.clojure/clojure "1.7.0-alpha4"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
[com.taoensso/timbre "3.3.1-1cd4b70"]
[http-kit "2.1.19"]
@AlexBaranosky
AlexBaranosky / threatgrid_jobs.md
Created October 22, 2015 17:04
Threatgrid Job Listings

Intro

The Advanced Threat Integration Team in Cisco's Security Business Group is building a global scale, multi-product security platform with an emphasis on Threat Intelligence and Incident Response support.

Our system runs as a distributed cluster in the cloud, and shrunk down to a single on-premises appliance. This keeps us focused on simple solutions, clear abstractions between services, composition of

@philandstuff
philandstuff / codemesh2015.org
Last active November 16, 2015 19:37
Code mesh 2015 notes

Kush, an introduction to schedulers

about me

  • I work for GDS
  • Cabinet Office
  • we started by building GOV.UK
    • replaced older sites like direct gov, business link
  • we’re not just fixing websites
    • we also build and run digital services
    • working with depts across the country
    • eg: register to vote
@ithayer
ithayer / tf-idf.clj
Created June 28, 2011 06:32
Simple tf-idf in 30 lines of clojure. Inspired by a nice simple scala implementation: https://github.com/felipehummel/TinySearchEngine/blob/master/scala/tinySearch.scala and matches as closely as possible the computation.
(ns ignacio.tfidf (:require [clojure.contrib.string :as string])) ;; Simple tfidf in clojure, for fun.
(def stopwords (set (string/split #"\n" (slurp "./stopwords.txt"))))
(defn tokenize [raw-text] ;; Lowercases and splits on non-letters, non-numbers.
(remove stopwords (string/split #"[^a-z0-9äöüáéíóúãâêîôûàèìòùçñ]+" (string/lower-case raw-text))))
(defn idf2 [n-docs match] (Math/pow (Math/log (/ n-docs (count (keys match)))) 2))
(defn index-one [fname] ;; Index for one file. Given an fname, returns a map of token -> map of (fname, count)
@guilespi
guilespi / parallel-words.clj
Created November 13, 2013 23:27
Split a string into words, parallel implementation using clojure fold
(defn maybe-word
[s]
(if (= "" s) [] [s]))
(defprotocol WordState
(append-chunk [this chunk] "Append a chunk to current word state")
(append-segment [this segment] "Append a segment to current word state")
(to-word-list [this] "Returns the state as a list of words"))
@bhauman
bhauman / An_Explanation.md
Last active April 27, 2016 18:03
common cljs build format ideas

A common build configuration format that all ClojureScript tools can consume

@david-christiansen
david-christiansen / monad-notation.rkt
Created March 23, 2016 22:58
Monad notation for Typed Racket
#lang typed/racket
(require (for-syntax racket syntax/parse) racket/stxparam)
(provide do-impl define-do pure)
(module+ test (require typed/rackunit))
(define-syntax (<- stx) (raise-syntax-error '<- "used outside of do"))
@jeroenvandijk
jeroenvandijk / aleph.sse.clj
Last active May 28, 2016 05:58
Server Side Events with Aleph
(comment
;; Deps
[cheshire "5.4.0"]
[manifold "0.1.1"]
[aleph "0.4.1-beta2"]
[org.clojure/clojure "1.7.0"]
[org.clojure/core.async "0.2.371"]
)
(require '[clojure.core.async :as a]
@jsmorph
jsmorph / logicrels-lucene.clj
Created July 6, 2012 14:01
Lucenalog: Datalog interface to Lucene in 10 lines
(ns lucenalog.core
"Lucenalog = Datalog interface to Lucene in 10 lines.
Simple but powerful.
Use
(db/add (index) {:a \"foo\" :b \"bar\"})
to index a map with Lucene. Then you can use the relation
@cddr
cddr / sqlite.clj
Created August 15, 2016 02:34
SQLite implementation of a hitchhicker-tree backend
(ns hitchhiker.sqlite
(:require [clojure.java.jdbc :as jdbc]
[clojure.edn :as edn]
[clojure.string :as str]
[hitchhiker.tree.core :as core]
[hitchhiker.tree.messaging :as msg]
[clojure.core.cache :as cache]
[taoensso.nippy :as nippy])
(:import [java.sql SQLException]))