Skip to content

Instantly share code, notes, and snippets.

@vvvvalvalval
vvvvalvalval / datomic-erasing-data-migration.clj
Created April 25, 2018 09:59
Erasing data from Datomic via a manual data migration
;; # EMULATING DATOMIC EXCISION VIA MANUAL DATA MIGRATION
;; *************************************
;; ## Introduction
;; *************************************
;; This Gist demonstrates a generic way to migrate an entire Datomic database
;; from an existing 'Origin Connection' to a clean 'Destination Connection',
;; while getting rid of some undesirable data and otherwise preserving history.
@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@gtebbutt
gtebbutt / gist:5e21f2e49592559f5043
Created December 19, 2014 14:17
Linear animation generator for Om & React
(defn animate-value
[start-val end-val duration]
(let [decrement? (< end-val start-val)
transmit-chan (chan)
cancel-chan (chan)
animation-interval 40 ;40 ms interval - 25fps
steps (/ duration animation-interval)
full-range (- start-val end-val)
per-step (util/abs (/ full-range steps))
state (atom start-val)
@pelle
pelle / accounts.clj
Created May 8, 2012 14:37
Using database functions in Datomic transactions and annotating transaction history
(use '[datomic.api :only [q db] :as d])
(def uri "datomic:mem://accounts")
;; create database
(d/create-database uri)
;; connect to database
(def conn (d/connect uri))
@alexalemi
alexalemi / twittercompress.py
Created August 31, 2011 03:24
Twitter Compression
""" A script to attempt the compression of written english
to the chinese character set """
import os
from collections import OrderedDict
from math import log
import itertools
from collections import Counter