Skip to content

Instantly share code, notes, and snippets.

View drio's full-sized avatar
🐢
I don't know

David Rio Deiros drio

🐢
I don't know
View GitHub Profile
lass Drio < Struct.new("Whatever", :fc_name)
def initialize
super @fc_name = Dir.pwd.split("/")[-1]
#@fc_name = Dir.pwd.split("/")[-1]
end
def show
@fc_name
lass Drio < Struct.new("Whatever", :fc_name)
def initialize
super @fc_name = Dir.pwd.split("/")[-1]
#@fc_name = Dir.pwd.split("/")[-1]
end
def show
@fc_name
def valid_run?(d)
%w{\. \.. qc test}.inject(true) { |prev, n| prev && (/#{n}/ =~ d) != 0 }
end
puts "drio VALID run?: " + valid_run?('drio').to_s
puts "test VALID run?: " + valid_run?('test_solid').to_s
module Foo
%w{ mount umount }.each do |m|
self.module_eval "def self.#{m}; puts '#{m}'; end"
end
end
Foo.mount
Foo.umount
Date: Tue, 30 Dec 2008 20:35:07 +0900
From: Robert Dober <robert.dober@gmail.com>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Reply-To: ruby-talk@ruby-lang.org
Subject: Re: Why Ruby?
It is however quite obvious (my favourite prove method ;),
that the pressure which exists in our professional lives discourages
reflexion, deep understanding of what we are doing and innovative
decisions. It is my believe that the winning business model will be
one_f, two_f = File.new("./one.txt", "r"), File.new("two.txt", "r")
while (l_one = one_f.gets)
while (l_two = two_f.gets)
puts "#{l_one} -- #{l_two}"
end
two_f.rewind # You were missing that!!!!!!
puts "----------------"
end
one_f, two_f = File.new("./one.txt", "r"), File.new("two.txt", "r")
one_f.each_line do |l_one|
two_f.each_line do |l_two|
puts "#{l_one} -- #{l_two}"
end
two_f.rewind
end
[ one_f, two_f ].each {|f| f.close}
$ git push origin drio
Counting objects: 23, done.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (18/18), 3.20 KiB, done.
Total 18 (delta 11), reused 0 (delta 0)
To 10.10.59.162:git_repo/egenotype.git
* [new branch] drio -> drio
$ git branch -a
include Math
def chr_to_phred(s)
s.each_byte {|c| printf "%d,", (c-33) }
end
def chr_to_phred_chr(c)
#s.each_byte {|c| printf "%d,", (c-33) }
q = (10 * (log(1 + 10 ** (c - 64) / 10.0)) / log(10)).to_i
(((q <= 93) ? q : 93) + 33).chr
def process_command
File.open(@o_file, 'w') do |of|
File.open(@i_file).each_line do |l|
of.puts affy_to_csv(l.split)
end
end
end
private