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
(defmacro recurse [v] | |
(if (= v :left) | |
`(recur ~'l (rest ~'r) (conj ~'res (first ~'r))) | |
`(recur (rest ~'l) ~'r (conj ~'res (first ~'l))))) | |
(defn %merge [l r] | |
(loop [l l | |
r r | |
res []] | |
(if (every? empty? [l r]) |
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 python3 | |
# Authored by Reid "arrdem" McKenzie, 10/22/2013 | |
# Licenced under the terms of the EPL 1.0 | |
import cortex.stats as stats | |
def attack_perm_generator(weapons, src_model, tgt_model, | |
focus=0, can_boost_hit=True): | |
"""Recursively compute attack options over two models, focus and weapons! |
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 name.arrdem.bored.typed-graph | |
(:require [clojure.core.typed :as type]) | |
(:refer-clojure :exclude [hash])) | |
;;------------------------------------------------------------------------------ | |
;; Simple graph API | |
(def Node clojure.lang.Keyword) | |
(def Graph (type/Map Node (type/Seq Node))) |
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 | |
if [ ! -f `which lein` ]; | |
then | |
echo "Install leiningen from https://github.com/technomancy/leiningen" | |
exit | |
else | |
ROOT=`mktemp -d` | |
cd $ROOT | |
cat <<EOF > $ROOT/project.clj |
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
(definterface IModifier | |
(op []) | |
(value [])) | |
(deftype ABuff [^long n] | |
IModifier | |
(op [_] (fn [m] (long (+ n m)))) | |
(value [_] n) | |
Object |
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
[1] Handed out (0, 0, 0) * STEP | |
[2] Handed out (0, 0, 1) * STEP | |
[3] Handed out (0, 1, 0) * STEP | |
[4] Handed out (0, 1, 1) * STEP | |
[5] Handed out (0, 1, 2) * STEP | |
[6] Handed out (1, 0, 0) * STEP | |
[7] Handed out (1, 0, 1) * STEP | |
[8] Handed out (1, 1, 0) * STEP | |
[7] [ANSWER] Got one! (1008, 960, 1100) | |
[8] [ANSWER] Got one! (1008, 1100, 960) |
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
War Room Army | |
Cygnar - Sloan and six hunters | |
Theme: No Theme Selected | |
73 / 75 Army | |
Captain Kara Sloan - WJ: +28 | |
- Reinholdt, Gobber Speculator - PC: 4 |
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 | |
function install_package() { | |
if [ -e "$1/build.sh" ]; then | |
( cd "$1"; | |
bash "build.sh") | |
fi | |
stow --ignore="build.sh" --ignore="README.md" -t ~ "$f" | |
} |
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
;; I write | |
(ns foo) | |
(defn adds-one [x] | |
(+ x 1)) | |
(def another-adds-one | |
(partial + 1)) | |
;; SYMBOL TABLE (name -> UUID) |
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
;; 20-markdown.el | |
(require 'markdown-mode) | |
;; One space per line implementation | |
(defun arrdem:markdown-nobreak-p () | |
"Return nil if it is acceptable to break the current line at the point. | |
Supports Markdown links, liquid tags." | |
;; inside in square brackets (e.g., link anchor text) |