The first equivalent in each section is what I use.
Measuring cup:
Mixing vessel:
The first equivalent in each section is what I use.
Measuring cup:
Mixing vessel:
# Original: https://gist.githubusercontent.com/pcorliss/5628491/raw/eccb38d840734854dd5a10b25e7d52b71612f0d7/sphinx.rb | |
require 'formula' | |
class Libstemmer < Formula | |
# upstream is constantly changing the tarball, | |
# so doing checksum verification here would require | |
# constant, rapid updates to this formula. | |
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz' | |
homepage 'http://snowball.tartarus.org/' |
#!/bin/sh | |
# is_steal_count.sh - return true for GrabScrab steal (via letter counting) | |
# Andrew Ho (andrew@zeuscat.com) | |
# | |
# Given two words, exits with zero return status if the second word is a | |
# GrabScrab steal for the first (see <http://grabscrab.com>). | |
# | |
# This solution counts letters and compares the letter counts, with best | |
# case linear performance, by total letter count. |
#!/bin/sh | |
# is_steal_sort.sh - return true for GrabScrab steal (via letter sorting) | |
# Andrew Ho (andrew@zeuscat.com) | |
# | |
# Given two words, exits with zero return status if the second word is a | |
# GrabScrab steal for the first (see <http://grabscrab.com>). | |
# | |
# This solution counts letters and compares the letter counts, with best | |
# case O(n*log(n)) performance, where n is total letter count. |
#!/usr/bin/env python | |
# show_poll.py - show that zombie processes get reaped by poll() | |
# Andrew Ho (andrew@zeuscat.com) | |
# | |
# To test: open two terminals. Run this program in one terminal, cut and | |
# paste the "ps" command that is printed in the other terminal, and keep | |
# re-running that ps command (Ctrl+P, Enter). After 5 seconds, the sleep | |
# subprocess exits and becomes a (sleep) zombie. After another 5 seconds, | |
# the parent process calls child.poll() and you should see it disappear. |
#!/usr/bin/env python | |
# demo_subprocess.py - demonstrate Python subprocess polling and termination | |
# Andrew Ho (andrew@zeuscat.com) | |
import os, time, subprocess | |
sleep_for = 5 # How long in seconds should our test subprocess sleeps | |
timeout_after = 3 # Send SIGTERM to the subprocess after this many seconds | |
poll_delay = 0.5 # Sleep this long between polling for subprocess status |
#!/bin/sh | |
# git-total-reset - wipe out any changes, make repo match origin/master | |
# Andrew Ho (andrew@zeuscat.com) | |
git checkout -f master | |
git stash clear | |
git fetch | |
git reset --hard origin/master | |
git clean -xfd |
#!/usr/bin/env ruby | |
# wordchomp - given set of letters, generate sets of words that use them all | |
# Andrew Ho (andrew@zeuscat.com) | |
require 'multimap' | |
ME = File.basename(__FILE__) | |
USAGE = "usage: #{ME} letters" | |
# Given set of letters, generate set partitions, look for matches in dictionary |
#!/usr/bin/env ruby | |
# wordchomp - given set of letters, generate sets of words that use them all | |
# Andrew Ho (andrew@zeuscat.com) | |
require 'multimap' | |
ME = File.basename(__FILE__) | |
USAGE = "usage: #{ME} letters" | |
# Given set of letters, generate set partitions, look for matches in dictionary |