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 CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
#!/bin/bash | |
# | |
# Created by Felipe Machado - 2016/02/14 | |
# | |
# A retry command for bash | |
# Retries the given command up to MAX_RETRIES, with an interval of SLEEP_TIME | |
# between each retry. Just put it on your bash_profile and be happy :) | |
# Usage: | |
# retry [-s SLEEP_TIME] [-m MAX_RETRIES] COMMAND_WITH_ARGUMENTS | |
# |
This is a handy bit of code I've written more than once. I thought I'd throw it in here so I can refer back to it later. Basically, it lets you read a config file to produce a Clojure map. The config files themselves can contain one or more forms, each of which can be either a map or a list. Maps are simply merged. Lists correspond to invocations of extension points, which in turn produces a map, which is merged along with everything else.
Consider the following files:
names.edn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.
- Power to the People: The Role of Humans in Interactive Machine Learning by Knox, Cakmak, Kulesza, Amershi, and Lau
- A Few Useful Things to Know about Machine Learning by Domingos
- Machine Learning that Matters by Wagstaff
- Beyond Concise and Colorful: Learning Intelligible Rules by Pazzani et al.
- [Designing Games with a Purpose] (https://www.cs.cmu.edu/~biglou/GWAP_CACM.pdf) by von Ahn and Dabbish
- [Human Model Evaluation in Interactive Supervised
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
def multi(dispatch_fn): | |
def _inner(*args, **kwargs): | |
return _inner.__multi__.get( | |
dispatch_fn(*args, **kwargs), | |
_inner.__multi_default__ | |
)(*args, **kwargs) | |
_inner.__multi__ = {} | |
_inner.__multi_default__ = lambda *args, **kwargs: None # Default default | |
return _inner |
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 lazy-sort) | |
(defn qsort [[head & tail]] | |
(when head | |
(lazy-cat (qsort (filter #(< % head) tail)) | |
[head] | |
(qsort (remove #(< % head) tail))))) | |
(defn merge* | |
[[f1 & r1 :as l1] [f2 & r2 :as l2]] |
NewerOlder