Skip to content

Instantly share code, notes, and snippets.

View wrobstory's full-sized avatar

Rob Story wrobstory

View GitHub Profile
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@jneen
jneen / variant-multimethods.clj
Created November 22, 2014 20:55
Multimethods with variants
; it's a bit cumbersome to set up and there's the unfortunate need to ignore the tag
; in the individual methods, but this allows you to leave the interpretation of open
; variants, well, *open* for extension by multimethod.
; dispatch off the first argument, which will be the tag
(defmethod command-multi (fn [tag & data] tag))
; the first argument to the *method* is still the tag
(defmulti command-multi :print [_ val] (println val))
(defmulti command-multi :read [_ fname] (slurp fname))
Q: what book should i use to learn ML?
A: use several, and find the one that speaks to you.
the list below assumes you know a bit of math but
are not very mathematical, and are interested in learning
enough to be practical. that is, it is not at the
mathematical level of MIJ's alleged list
(cf. https://news.ycombinator.com/item?id=1055389 )
@johnmyleswhite
johnmyleswhite / gist:14dbd928019669faef82
Last active August 29, 2015 14:06
Benchmarking Resources
@ptaoussanis
ptaoussanis / transducers.clj
Last active December 17, 2021 13:54
Quick recap/commentary: Clojure transducers
(comment ; Fun with transducers, v2
;; Still haven't found a brief + approachable overview of Clojure 1.7's new
;; transducers in the particular way I would have preferred myself - so here goes:
;;;; Definitions
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as:
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation
;; (The `[]` arity is actually optional; it's only used when calling
;; `reduce` w/o an init-accumulator).
@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@fonnesbeck
fonnesbeck / install_superpack.sh
Created May 16, 2014 04:10
Script to install Python scientific stack ("Scipy Superpack") using Homebrew and pip. Uses Homebrew's Python 2.7.6. Please report any issues in the comments.
#!/bin/sh
hash brew &> /dev/null
if [ $? -eq 1 ]; then
echo 'Installing Homebrew ...'
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
fi
# Ensure Homebrew formulae are updated
brew update
@jrmontag
jrmontag / git-branch-prompt
Last active August 29, 2015 13:56
git branch in prompt (minimal working example)
# (ubuntu)
# add to end of .bashrc :
export PS1="\$(__git_ps1) "$PS1
# gives e.g. (when in a repo):
(master) user@host:~$
# more info: http://stackoverflow.com/questions/15883416/adding-git-branch-on-the-bash-command-prompt
@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
[{"0500000US33009": 4.5, "0500000US38041": 3.5, "0500000US38043": 6.4, "0500000US39069": 9.7, "0500000US38045": 3.0, "0500000US38047": 3.0, "0500000US33001": 5.6, "0500000US33000": 5.4, "0500000US33003": 5.4, "0500000US33005": 5.3, "0500000US47159": 9.4, "0500000US33007": 7.6, "0500000US19175": 5.5, "0500000US19177": 7.1, "0500000US46095": 5.8, "0500000US19171": 6.9, "0500000US19173": 4.6, "0500000US24045": 9.0, "0500000US24047": 12.2, "0500000US24510": 10.5, "0500000US19179": 7.6, "0500000US48373": 9.7, "0500000US24043": 9.8, "0500000US46093": 5.0, "0500000US55103": 7.0, "0500000US46091": 6.6, "0500000US26009": 12.3, "0500000US31183": 3.6, "0500000US31181": 4.4, "0500000US31185": 4.5, "0500000US49041": 7.4, "0500000US49043": 6.1, "0500000US39067": 10.3, "0500000US49047": 5.1, "0500000US56000": 6.0, "0500000US18155": 7.0, "0500000US18157": 7.7, "0500000US18151": 10.2, "0500000US18153": 10.1, "0500000US29021": 7.4, "0500000US55029": 10.6, "0500000US29023": 8.2, "0500000US18159": 10.3, "0500000US29027": 7.5, "0