Public Gists by bmaland

Gravatar
Thu Sep 03 03:37:51 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
patterns = []
Gravatar
Tue Sep 01 09:30:28 -0700 2009
1
2
3
## Usage:
## db <- Database("http://208.78.99.54:5984/", "packages")
##
Gravatar
Tue Aug 25 03:49:06 -0700 2009
1
2
3
#!/usr/bin/env python
 
import nltk
Gravatar
Sun Jul 12 13:12:18 -0700 2009
1
2
3
# lib/github_gem.rb
module Rails
  class Configuration
Gravatar
Fri Jun 05 05:55:40 -0700 2009
1
2
3
# Copy `n Paste from IRB, based on http://judofyr.net/posts/copy-paste-irb.html
# Requires xclip for clipboard interaction. Stick in .irbrc:
def copy(str)
Gravatar
Sun May 24 16:06:13 -0700 2009
1
2
3
require "yaml"
 
# Parser for Debian Control Files (http://www.debian.org/doc/debian-policy/ch-controlfields.html)
Gravatar
Fri May 15 00:15:34 -0700 2009
1
2
3
#!/usr/bin/env python
 
# Simple algorithm for clustering WordNet synsets. Requires Python 2.5 or 2.6,
gist: 111804 Backup script for Heroku db...
Gravatar
Thu May 14 11:23:31 -0700 2009
1
2
3
#!/usr/bin/zsh
 
# -*- Abstract -*-
gist: 109726 Rake task for building .gems
Gravatar
Sun May 10 13:36:30 -0700 2009
1
2
3
namespace :heroku do
  desc "Populates the .gems manifest file, to be used with Heroku"
  task :gems => :environment do
Gravatar
Sat May 09 01:50:48 -0700 2009
1
2
3
# In Ruby 1.8
irb(main):008:0> "" + Errno::ENOENT.new
=> "No such file or directory"
gist: 108208 Small desktop app for viewi...
Gravatar
Thu May 07 10:16:36 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
# Small desktop app for viewing the webcam at http://tjeld.uib.no/
Gravatar
Mon Apr 13 06:23:15 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
require "rton"
Gravatar
Wed Mar 11 01:45:29 -0700 2009
1
2
3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
Gravatar
Sat Feb 14 11:41:35 -0800 2009
1
2
3
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
Gravatar
Sun Dec 07 05:29:12 -0800 2008
1
2
3
#!/usr/bin/env python
r"""
=================
Gravatar
Thu Oct 23 08:08:06 -0700 2008
1
2
3
Opg 1.
 
Action(move(X, Y),
Gravatar
Mon Sep 22 12:54:34 -0700 2008
1
2
3
def hashing_necessary? numwords, hashkeys
  numkeys = hashkeys.flatten.uniq.size
  (numkeys < numwords) ? "rehash necessary" : "successful hashing"
Gravatar
Mon Sep 22 12:27:05 -0700 2008
1
2
3
def max_discount(prices)
  prices = prices.sort.reverse
  discount = 0
Gravatar
Mon Sep 22 10:55:57 -0700 2008
1
2
3
def consistent?(phone_numbers)
  phone_numbers.each do |num|
    phone_numbers - [ num ].each { |o| return "NO" if %r{^#{num}}.match(o) }
Gravatar
Sun Sep 21 15:36:32 -0700 2008
1
2
3
# -*- coding: utf-8 -*-
#This code gets all the comic strips from the webcomic
#Saturday Morning Breakfast Cereal (SMBC) and downloads them to a local folder