Skip to content

Instantly share code, notes, and snippets.

View hypirion's full-sized avatar
👋

Jean Niklas L'orange hypirion

👋
View GitHub Profile
{:deps {c/c {:git/url "https://gist.github.com/875d52f3b6871c8c08416aeea63d52f9.git"
:sha "1a0a886fc5441f9740601592db3ad3579681e3c5"}
a/a {:git/url "https://gist.github.com/a5562f1f3b81c7d3ee8d15367ed37885.git"
:sha "aa10a622aa0007724fc2b41f52d5c67ba281fc97"}}}
{:deps {b/b {:git/url "https://gist.github.com/08d7b3d403db2eec848ac93c2a673a90.git"
:sha "422570ec40a0d13dead95f8d187aa895c550ea47"}}}
{:deps {x/x {:git/url "https://gist.github.com/6aa4e5468b68e9be2d7d49e8ae80bd5e.git"
:sha "7988b23d6c97482f47e3c9e58ca55692c8a4884c"}}}
{:deps {x/x {:git/url "https://gist.github.com/6aa4e5468b68e9be2d7d49e8ae80bd5e.git"
:sha "6406bcf1c54d77b8ed1ff668337aa0d848fafb35"}}}
@hypirion
hypirion / deps.edn
Last active March 18, 2018 15:40
x
{:deps {y/y {:git/url "https://gist.github.com/2ef7e7bf8fc23fbed285041f7e7301cb.git"
:sha "f2672884f50c32fde1a0c191ff68c5cec4497624"}}}
{:deps {}}
{:deps {}}
@hypirion
hypirion / RandomColl.java
Created April 11, 2017 23:03
Collection with constant time insertion (amortised) and constant time uniform random removal
import java.util.*;
public class RandomColl<T> {
ArrayList<T> lst;
Random rng;
public RandomColl() {
lst = new ArrayList<>();
rng = new Random();
}
@hypirion
hypirion / core.clj
Created June 16, 2013 23:08
(Naive) logic program which finds a meeting schedule where every attendee can attend every meeting without conflicts.
(ns meeting-times.core
(:refer-clojure :exclude [==])
(:use clojure.core.logic
clojure.core.logic.protocols)
(:require [clojure.set :as set])
(:gen-class))
(defn sublists [list]
(take-while (comp pos? dec count)
(iterate rest list)))
@hypirion
hypirion / merge_example.clj
Created December 29, 2012 04:33
meta-merge in fairbrook.
(ns merge-example
(:require [clojure.set :as set]
[fairbrook.path :as path]
[fairbrook.rule :as rule]
[fairbrook.meta :as meta]
[fairbrook.util :as u :refer [<<-]]))
(defn- displace? [obj]
(-> obj meta :displace))