Skip to content

Instantly share code, notes, and snippets.

View kavinderd's full-sized avatar

Kavinder Dhaliwal kavinderd

View GitHub Profile
/*
* format_c is a data structure that holds column vectors
*/
typedef struct {
format_c *values;
int row_count;
} format_c;
/*
* format_batch is a data structure that holds an array of column vectors (aka, row batch)
*/
@kavinderd
kavinderd / gist:d7d6e6694897200735b0
Created October 23, 2014 03:50
Refinement Gotchas From Metaprogramming Ruby Book
#
class MyClass
def my_method
"original my_method"
end
def another_method
my_method
end
end
#!/usr/bin/env ruby -n
require 'highline/import'
loop do
cmd = ask("Enter command: ", %w{save sample load reset quit}) do |q|
q.readline = true
end
say("Executing \"#{cmd}\"...")
break if cmd == "quit"
end