Skip to content

Instantly share code, notes, and snippets.

View makimoto's full-sized avatar
😪

Shimpei Makimoto makimoto

😪
View GitHub Profile
@makimoto
makimoto / log.txt
Created April 16, 2014 13:11
ruby/www.ruby-lang.org failure log
Using worker: worker-linux-5-1.bb.travis-ci.org:travis-linux-10
Applying updates
travis_fold:start:git.1
$ git clone --depth=50 --branch=master git://github.com/ruby/www.ruby-lang.org.git ruby/www.ruby-lang.org
Cloning into 'ruby/www.ruby-lang.org'...
remote: Counting objects: 3196, done.
remote: Compressing objects: 0% (1/2145) 
remote: Compressing objects: 1% (22/2145) 
remote: Compressing objects: 2% (43/2145) 
def rot13(str)
str.tr("a-zA-Z", "n-za-mN-ZA-M")
end
ARGF.each do |line|
puts rot13(line)
end
#!/usr/bin/env python
# vim:fileencoding=utf-8
# lv_presentation_gen.py - lv presentation generator
from optparse import OptionParser
op = OptionParser()
op.add_option('-s','--separator',dest='sep',help='set page separator',default='----')
op.add_option('-o','--output',dest='output',help='set output directory',default='.')
#!/usr/local/bin/python
# vim:fileencoding=utf8
from json import dumps
from mod_python import apache
import datetime
import qreki
def index(req,**args):
req.content_type = 'text/javascript'
#!/usr/bin/env python
# vim:fileencoding=utf-8
'''
a experiment for Kamogawa Equal-Distance Law
usage:
% kamogawa.py #pairs second_pair_distance
eg.
% kamogawa.py 10 100.0
'''
from sys import argv,stderr
#!/usr/bin/env python
'''
a solver for http://twitter.com/not522/status/16626276702
'''
from sys import argv
from itertools import permutations,product
ops = ['+','-','*','/']
parns = ['', '(', ')' ]
#!/usr/bin/env ruby
# PLSI implement in pure Ruby
# 'foolishly honest' translation from python impl. in http://satomacoto.blogspot.com/2009/10/pythonplsa.html
class PLSI
def initialize(n, nz=2)
# n: Document-Word matrix, nz: # latent variables
@n = n
@nz = nz
#!/usr/env ruby
# vim:fileencoding=utf-8
require "rubygems"
require "mechanize"
id = "example@example.com"
pwd = "password"
agent = Mechanize.new
diff -x .git -Naru rspec.orig/lib/spec/runner/formatter/progress_bar_formatter.rb rspec/lib/spec/runner/formatter/progress_bar_formatter.rb
--- rspec.orig/lib/spec/runner/formatter/progress_bar_formatter.rb 2010-10-15 11:55:45.000000000 +0900
+++ rspec/lib/spec/runner/formatter/progress_bar_formatter.rb 2010-10-15 11:52:21.000000000 +0900
@@ -8,18 +8,18 @@
include NOOPMethodMissing
def example_failed(example, counter, failure)
- @output.print colorize_failure('F', failure)
+ @output.print colorize_failure('\(^o^)/', failure)
@output.flush