I hereby claim:
- I am prodoxx on github.
- I am reggie_escobar (https://keybase.io/reggie_escobar) on keybase.
- I have a public key ASDnYEqUcFzczC-GVZ1kD8ntLLeQAX6Q0tVKDXqjWyzrhAo
To claim this, I am signing this object:
require 'yaml' | |
data_filename = ARGV[0] | |
output_filename = ARGV[1] | |
new_data = [] | |
header = '' | |
def create_record(headers, line) | |
values = line.split("\t").map!(&:chomp) | |
headers = headers.split("\t").map!(&:chomp) |
require 'yaml' | |
data_filename = ARGV[0] | |
output_filename = ARGV[1] | |
def yml_to_tsv(data) | |
headers = data[0].keys | |
header_line = '' | |
new_data = [] |
## write your fizzbuzz method in this file | |
# see http://en.wikipedia.org/wiki/Fizz_buzz for details on FizzBuzz game | |
def get_fb(number) | |
return 'FizzBuzz' if (number % 5).zero? && (number % 3).zero? | |
return 'Fizz' if (number % 3).zero? | |
return 'Buzz' if (number % 5).zero? | |
number | |
end |
class ShortStringPacker | |
## Packs a short string into a Fixnum | |
# Arguments: | |
# str - String object | |
# Returns: a Fixnum object | |
def self.pack(str) | |
abc = [*'a'..'z'] | |
arr = str.chars.map { |x| abc.find_index(x) + 1 } | |
arr.reduce { |item, key| (item << 5.0) | key } | |
end |
I hereby claim:
To claim this, I am signing this object: