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
#!/usr/bin/env ruby | |
"AAAAAAA AAAAAA | |
AggIA/B+ICAA AAIIFAIIQR | |
BAAAACCCICCEEIgAAAA/hBA/B+B | |
wAAAAII/4IAQAIAAAACCQBCAEACAA | |
AAAgkAQgBAAgAAAAAAAAAAAAAAAAAAA | |
AAAAAAAAAAAD/Bwfx/yBPwIQQgIIECB | |
AgSCFEEIECBAgQIEgSIiD+AgfwECB | |
IFBIggQIEIBA/yBfxwICCBBAQIE |
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
# encoding: utf-8 | |
# | |
require "narray" | |
require "png" | |
def read_pgm(filepath) | |
open(filepath) do |io| | |
raise "#{filepath}: only P5(Graymap rawbits) is supported" unless io.gets == "P5\n" | |
width, height = io.gets.split(/\s+/).map{|i| i.to_i } |
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
# -*- encoding: utf-8 -*- | |
# AO render benchmark (GCD version for MacRuby 0.6) | |
# Original program (C) Syoyo Fujita in Javascript (and other languages) | |
# http://lucille.atso-net.jp/blog/?p=642 | |
# http://lucille.atso-net.jp/blog/?p=711 | |
# Ruby(yarv2llvm) version by Hideki Miura | |
# http://github.com/miura1729/yarv2llvm/blob/a888d8ce6855e70b630a8673d4cfe075a8e44f0e/sample/ao-render.rb | |
# Modified by Tomoyuki Chikanaga | |
# |
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
# -*- coding: utf-8 -*- | |
config.filters.ignore_extend.set_default(:conditions, []) | |
module Termtter::Client | |
register_hook( | |
:name => :ignore, | |
:point => :filter_for_output, | |
:exec => lambda { |statuses, event| | |
ignore_conditions = config.filters.ignore_extend.conditions |
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
#!/usr/bin/env ruby | |
module Svn | |
class Revision | |
def initialize(str) | |
unless /r(\d+) \| (\S+) \| (\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \S+)/ =~ str | |
raise "unrecognized svn log message #{str}" | |
end | |
@revision = Regexp.last_match(1) | |
@developer = Regexp.last_match(2) |
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
Index: ChangeLog | |
=================================================================== | |
--- ChangeLog (revision 30330) | |
+++ ChangeLog (working copy) | |
@@ -169,10 +169,6 @@ | |
* lib/csv.rb: Upgrading output encoding as needed. [ruby-core:33135] | |
-Tue Nov 17 08:54:04 2010 James Edward Gray II <[email protected]> | |
- |
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
diff --git a/test/csv/test_data_converters.rb b/test/csv/test_data_converters.rb | |
index 06653f5..5a4f28e 100755 | |
--- a/test/csv/test_data_converters.rb | |
+++ b/test/csv/test_data_converters.rb | |
@@ -71,7 +71,9 @@ class TestCSV::DataConverters < TestCSV | |
# and use | |
assert_equal(["Numbers", ":integer", 1, ":float", "3.015"], @parser.shift) | |
- setup # reset | |
+ # reset |
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
:begin | |
if %1 == "" goto end | |
cd %~p1 | |
convert -monochrome %~n1%~x1 output\%~n1%~x1 | |
shift | |
goto begin | |
:end | |
pause |
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
test_4558.rb:11:in `join': stream closed (IOError) | |
from test_4558.rb:11:in `<main>' |
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 "benchmark" | |
def without_return | |
0 | |
end | |
def with_return | |
return 0 | |
end |