This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
import re | |
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone | |
from metaphone import dm as double_metaphone | |
# get the Redis connection | |
from jellybean.core import redis | |
import models | |
# Words which should not be indexed |
(ns ^{:doc | |
"Bejewelled Blitz (Facebook) player | |
Clojure program to play Bejewelled Blitz on Facebook | |
Work in progress | |
Only works with game on primary monitor | |
First you need to determine where the game board is on the screen | |
then set the :x and :y values in the game-loc def appropriately | |
#!/usr/bin/env ruby | |
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern: | |
# keys: number of keys matching the given pattern | |
# size: approximation of the associated memory occupied (based on size/length of value) | |
# percent: the proportion of this 'size' relative to the sample's total | |
# | |
# Copyright Weplay, Inc. 2010. Available for use under the MIT license. | |
var Db = require('mongodb').Db, | |
Connection = require('mongodb').Connection, | |
Server = require('mongodb').Server, | |
GridStore = require('mongodb').GridStore, | |
Step = require('step'), | |
Sys = require('sys'), | |
Fs = require('fs'); | |
var database; |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
# http://notmysock.org/blog/hacks/a-twisted-dns-story.html | |
# http://blog.inneoin.org/2009/11/i-used-twisted-to-create-dns-server.html | |
# twistd -y dns.py | |
import socket | |
from twisted.internet.protocol import Factory, Protocol | |
from twisted.internet import reactor | |
from twisted.names import dns | |
from twisted.names import client, server |
< | |
%3C | |
< | |
< | |
< | |
< | |
< | |
< | |
< | |
< |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
This playbook has been removed as it is now very outdated. |