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
// more code above & below | |
/* the following gives me this run-time error: | |
### | |
panic: runtime error: index out of range | |
runtime.panic+0xa4 /home/serialhex/src/go/src/pkg/runtime/proc.c:1060 | |
runtime.panic(0x80992f0, 0x977473f8) | |
runtime.panicstring+0x95 /home/serialhex/src/go/src/pkg/runtime/runtime.c:116 |
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
package main | |
import ( | |
//"./file" | |
"fmt" | |
"bufio" | |
"os" | |
) | |
// will initialize dict here... |
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
/* ok, heres what i'm trying to do... | |
* i'm trying to group all the words of equal length together, | |
* and then group them all by the first letter they start with | |
* so i can do something like: | |
* - for all five-letter d-words | |
* foo := words[5]["d"] | |
* i know my nested structures are kind of wonky, but i'm not sure how else to represent it... | |
* any help is welcome! | |
*/ |
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
[ 84%] Built target IoSHA1 | |
Linking C shared library _build/dll/libIoSQLite3.so | |
[ 85%] Built target IoSQLite3 | |
[ 86%] Building C object addons/Socket/CMakeFiles/IoSocket.dir/source/IoEvOutRequest.c.o | |
/home/serialhex/src/io/addons/Socket/source/IoEvOutRequest.c: In function ‘IoEvOutRequest_RequestDoneCallback’: | |
/home/serialhex/src/io/addons/Socket/source/IoEvOutRequest.c:110:48: error: dereferencing pointer to incomplete type | |
/home/serialhex/src/io/addons/Socket/source/IoEvOutRequest.c:110:48: error: dereferencing pointer to incomplete type | |
make[2]: *** [addons/Socket/CMakeFiles/IoSocket.dir/source/IoEvOutRequest.c.o] Error 1 | |
make[1]: *** [addons/Socket/CMakeFiles/IoSocket.dir/all] Error 2 | |
make: *** [all] Error 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
// definitions of werdz | |
#include johnsmellz.h | |
const wererer = "much worse than bad... horrible... contagiously so!" |
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
pry(main)> require './modshogun' | |
LoadError: /home/serialhex/src/shogun/shogun/src/interfaces/ruby_modular/modshogun.so: undefined symbol: _ZN6shogun27CContingencyTableEvaluation24get_evaluation_directionEv - /home/serialhex/src/shogun/shogun/src/interfaces/ruby_modular/modshogun.so | |
from /home/serialhex/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' |
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 'narray' | |
# cheap & easy way to do this... | |
matrix = [] | |
File.open("numbers.file") do |file| | |
file.each_line do |line| | |
ary = [] | |
line.split(" ").each{ |n| ary << n.to_f } | |
matrix << ary | |
end |
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
# ... snip | |
NArray.class_eval do | |
def sign | |
a = [] | |
self.each do |x| | |
a << x.sign | |
end | |
a | |
end |
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 'narray' | |
def LoadMatrix(filename, type = :numbers) | |
case type | |
when :numbers | |
LoadMatrix.load_numbers(filename) | |
when :dna | |
LoadMatrix.load_dna(filename) | |
when :cubes | |
LoadMatrix.load_cubes(filename) |
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 'narray' | |
require 'modshogun' | |
# changed these | |
traindat = LoadMatrix('../data/fm_train_real.dat') | |
testdat = LoadMatrix('../data/fm_test_real.dat') | |
parameter_list=[[traindat,testdat, 1.3],[traindat,testdat, 1.4]] | |
def kernel_gaussian_modular(fm_train_real=traindat,fm_test_real=testdat, width=1.3) |