This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(':') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -e "s/[^a-zA-Z0-9 \n\t\r\f\v]/1/g;" -pi.save $(find word_10MB.txt -type f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#code | |
require "fileutils" | |
module PDFToHTMLR | |
class PDFToHTMLRError < RuntimeError; end | |
VERSION = '0.1.0' | |
class PdfFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pdftohtmlr' | |
require 'nokogiri' | |
include PDFToHTMLR | |
file = PdfFilePath.new("test.pdf", # source pdf file path | |
nil, # target html file path - not implemented | |
nil, # user password | |
nil # owner password | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'pachuber' | |
require 'eeml' | |
f = File.new("/dev/ldusb0") | |
packet = f.read(8) | |
parsed_packet = packet.unpack('ccsss') | |
temp = parsed_packet[2]/128 | |
pachube_api_key = '' |