Skip to content

Instantly share code, notes, and snippets.

@sowawa
sowawa / README
Created February 7, 2012 01:32
Erlang prcatice with rackhub.
This is erlang practice.
@sowawa
sowawa / .gitignore
Created February 7, 2012 00:26
mongodb for rackhub.
mongodb.log
db/*
@sowawa
sowawa / cmd_utils.rb
Created February 2, 2012 20:46
get cmd output by ruby.
module CMDUtils
def get_cmd_output cmd
output = ''
IO.popen(
cmd
) do |io|
output = io.read()
end
output
end
@sowawa
sowawa / crs_test.rb
Created January 17, 2012 13:23
Compressed Row Storage, CRS for sparse matrix
require 'pp'
class CRS
attr_reader :col_indexes, :row_pointers
def initialize data
# @vals = [] not used
@col_indexes = []
@row_pointers = []
@n = nil
counter = 0