Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
from django.db.models import SubfieldBase | |
from django.core.exceptions import ImproperlyConfigured | |
from django_extensions.db.fields import ShortUUIDField | |
class XidField(ShortUUIDField): | |
""" | |
XID stands for external ID. | |
Randomly generated IDs (base62 encoded UUID) used for public display purposes. | |
The random ID gets a short textual prefix for improved legibility, like Stripe's IDs. |
# -fobjc-arc: enables ARC | |
# -fmodules: enables modules so you can import with `@import AppKit;` | |
# -mmacosx-version-min=10.6: support older OS X versions, this might increase the binary size | |
clang main.m -fobjc-arc -fmodules -mmacosx-version-min=10.6 -o main |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
pip install networkx distance pattern | |
In Flipboard's article[1], they kindly divulge their interpretation | |
of the summarization technique called LexRank[2]. |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
# Description: | |
# Keep a variaty of logs | |
# | |
# Dependencies: | |
# | |
# Configuration: | |
# | |
# Commands: | |
# hubot logs - shows all logs stored | |
# hubot <name>log last <number> - show last number of logs |
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
@font-face { | |
font-family: 'EntypoRegular'; | |
src: url('font/entypo.eot'); | |
src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
url('font/entypo.woff') format('woff'), | |
url('font/entypo.ttf') format('truetype'), | |
url('font/entypo.svg#EntypoRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
function go() { | |
var userId = prompt('Username?', 'Guest'); | |
// Consider adding '/<unique id>' if you have multiple games. | |
var gameRef = new Firebase(GAME_LOCATION); | |
assignPlayerNumberAndPlayGame(userId, gameRef); | |
}; | |
// The maximum number of players. If there are already | |
// NUM_PLAYERS assigned, users won't be able to join the game. | |
var NUM_PLAYERS = 4; |
#lang racket | |
;; OO-machine | |
;; A heady mixture of TNG-R4, | |
;; Jay&Kesner's Pure Pattern Calculus, and | |
;; Cardelli&Abadi's ς calculus. | |
(require redex) | |
(require rackunit) | |
(define-language oc |
Memoization is fundamentally a top-down computation and dynamic | |
programming is fundamentally bottom-up. In memoization, we observe | |
that a computational *tree* can actually be represented as a | |
computational *DAG* (the single most underrated data structure in | |
computer science); we then use a black-box to turn the tree into a | |
DAG. But it allows the top-down description of the problem to remain | |
unchanged. | |
In dynamic programming, we make the same observation, but construct | |
the DAG from the bottom-up. That means we have to rewrite the |