View PacketExtensionTest.groovy
import groovy.xml.MarkupBuilder | |
import org.jivesoftware.smack.packet.PacketExtension | |
import org.jivesoftware.smack.Chat | |
import org.jivesoftware.smack.ConnectionConfiguration | |
import org.jivesoftware.smack.PacketListener | |
import org.jivesoftware.smack.XMPPConnection | |
import org.jivesoftware.smack.XMPPException | |
import org.jivesoftware.smack.filter.PacketFilter | |
import org.jivesoftware.smack.filter.PacketTypeFilter |
View gist:224239
<plugin> | |
<groupId>org.grails</groupId> | |
<artifactId>grails-maven-plugin</artifactId> | |
<version>1.1</version> | |
<extensions>true</extensions> | |
<dependencies> | |
<dependency> | |
<groupId>org.grails</groupId> | |
<artifactId>grails-bootstrap</artifactId> | |
<version>1.1.1</version> |
View gist:224461
# http://www.jamesbritt.com/2007/12/18/sending-mail-through-gmail-with-ruby-s-net-smtp | |
# http://d.hatena.ne.jp/zorio/20060416 | |
require "openssl" | |
require "net/smtp" | |
Net::SMTP.class_eval do | |
private | |
def do_start(helodomain, user, secret, authtype) | |
raise IOError, 'SMTP session already started' if @started |
View resque.py
from redis import Redis | |
from StringIO import StringIO | |
import simplejson | |
class Resque(object): | |
"""Dirt simple Resque client in Python. Can be used to create jobs.""" | |
redis_server = 'localhost:6379' | |
def __init__(self): | |
host, port = self.redis_server.split(':') |
View Remove non-alphanumeric (+ whitespace) chars from a file
perl -e "s/[^a-zA-Z0-9 \n\t\r\f\v]/1/g;" -pi.save $(find word_10MB.txt -type f) |
View gist:232970
2009-11-12 08:02:17,490 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Waiting for queue workers DbManager to finish.... | |
2009-11-12 08:02:17,491 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Work queue DbManager: 0 added, 0 executed. | |
2009-11-12 08:02:19,863 [main] INFO com.acnlabs.CloudMapReduce.MapReduceApp - Total input file size: 10539778. Each split size: 10539779 | |
2009-11-12 08:02:19,864 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Waiting for queue workers general to finish.... | |
2009-11-12 08:02:22,866 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - general: 100% complete | |
2009-11-12 08:02:22,866 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Work queue general: 1 added, 1 executed. | |
2009-11-12 08:02:24,015 [main] INFO com.acnlabs.CloudMapReduce.MapReduce - start setup phase | |
2009-11-12 08:02:24,464 [main] INFO com.acnlabs.CloudMapReduce.MapReduce - Creating reduce queues: | |
2009-11-12 08:02:24,465 [main] DEBUG com.acnlabs.CloudMapReduce.Wo |
View gist:233016
2009-11-12 08:37:46,802 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Waiting for queue workers DbManager to finish.... | |
2009-11-12 08:37:46,803 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Work queue DbManager: 0 added, 0 executed. | |
2009-11-12 08:37:48,282 [main] INFO com.acnlabs.CloudMapReduce.MapReduceApp - Total input file size: 10539778. Each split size: 10539779 | |
2009-11-12 08:37:48,284 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Waiting for queue workers general to finish.... | |
2009-11-12 08:37:51,284 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - general: 100% complete | |
2009-11-12 08:37:51,284 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Work queue general: 1 added, 1 executed. | |
2009-11-12 08:37:51,439 [main] INFO com.acnlabs.CloudMapReduce.MapReduce - start setup phase | |
2009-11-12 08:37:51,878 [main] INFO com.acnlabs.CloudMapReduce.MapReduce - Creating reduce queues: | |
2009-11-12 08:37:51,879 [main] DEBUG com.acnlabs.CloudMapReduce.Wo |
View gist:233172
2009-11-12 11:39:52,667 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Waiting for queue workers DbManager to finish.... | |
2009-11-12 11:39:52,667 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Work queue DbManager: 0 added, 0 executed. | |
2009-11-12 11:39:55,227 [main] INFO com.acnlabs.CloudMapReduce.MapReduceApp - Total input file size: 10539778. Each split size: 10539779 | |
2009-11-12 11:39:55,228 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Waiting for queue workers general to finish.... | |
2009-11-12 11:39:58,228 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - general: 100% complete | |
2009-11-12 11:39:58,228 [main] DEBUG com.acnlabs.CloudMapReduce.WorkerThreadQueue - Work queue general: 1 added, 1 executed. | |
2009-11-12 11:39:58,903 [main] INFO com.acnlabs.CloudMapReduce.MapReduce - start setup phase | |
2009-11-12 11:39:59,320 [main] INFO com.acnlabs.CloudMapReduce.MapReduce - Creating reduce queues: | |
2009-11-12 11:39:59,321 [main] DEBUG com.acnlabs.CloudMapReduce.Wo |
View calais_to_rdf_query_to_mediawiki.rb
require 'rubygems' | |
require 'calais' | |
require 'rdf/redland' | |
require 'restclient' | |
require 'rexml/document' | |
require 'cgi' | |
include REXML | |
# Simple module to manage the MediaWiki interface | |
module Wiki |
View assert_equal prob
#code | |
require "fileutils" | |
module PDFToHTMLR | |
class PDFToHTMLRError < RuntimeError; end | |
VERSION = '0.1.0' | |
class PdfFile |