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 'evaluation' | |
class EvaluationsResource < Webmachine::Resource | |
class << self | |
alias_method :let, :define_method | |
end | |
let(:allowed_methods) { ["GET", "POST"] } | |
let(:content_types_provided) { [["application/json", :to_json]] } | |
let(:content_types_accepted) { [["application/json", :from_json]] } |
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
[root@master Theano]# python2.6 setup.py develop | |
running develop | |
install_dir /usr/lib/python2.6/site-packages/ | |
running egg_info | |
creating Theano.egg-info | |
writing requirements to Theano.egg-info/requires.txt | |
writing Theano.egg-info/PKG-INFO | |
writing top-level names to Theano.egg-info/top_level.txt | |
writing dependency_links to Theano.egg-info/dependency_links.txt | |
writing requirements to Theano.egg-info/requires.txt |
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
root@master:~/Theano# nosetests | |
.E.................................E.......E...E..EEE...........................E....E................................................E..E.....EEEE..........................................E...........................................................SS..E..F........................................................................E...........E.......................................E...../usr/lib/python2.7/dist-packages/scipy/signal/signaltools.py:408: ComplexWarning: Casting complex values to real discards the imaginary part | |
return sigtools._convolve2d(in1,in2,1,val,bval,fillvalue) | |
.......................................EEEEEEEEEEE...........................EE...........................E.EE.........E..........................WARNING (theano.gof.cmodule): Cache leak due to unpickle-able key data set([(((3, (3,), (3,), (3,), (3,), (3,)), (10, '1.5.1'), (10, '1.5.1'), (10, '1.5.1'), (10, '1.5.1'), (10, '1.5.1'), (10, '1.5.1')), ('CLinker.cmodule_key', ('-O3', '-Wno-write-strings', |
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
root@master:~/Theano# git rev-list HEAD | head -1 | |
c6fc9734f1602bbbb9335bd61e49872b1635b3de | |
root@master:~/Theano# THEANO_FLAGS='device=gpu,floatX=float32,force_device=True' nosetests | |
Using gpu device 0: Tesla M2050 | |
...................................E...........E..EEE...........................E....E..................................FF...................................................................E...........................................................SS..E..F................................................................................................................................../usr/lib/python2.7/dist-packages/scipy/signal/signaltools.py:408: ComplexWarning: Casting complex values to real discards the imaginary part | |
return sigtools._convolve2d(in1,in2,1,val,bval,fillvalue) | |
.......................................EEEEEEEEEEE...........................EE.F...........................E..................................WARNING: unused streams above 512 (Tune GPU_mrg get_n_streams) | |
...WARNING (thea |
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
def html_table(tableish) | |
unless tableish.map(&:size).uniq.count == 1 | |
raise 'Must be array of arrays of equal length' | |
end | |
table = Nokogiri::HTML::DocumentFragment.parse '' | |
Nokogiri::HTML::Builder.with(table) { |html| | |
html.table { | |
if tableish.first.size > 1 |
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
# Only works with column oriented tables | |
# Doesn't support colspan | |
def tabular_field(locator) | |
preceding_cells = 'count(ancestor::td[1]/preceding-sibling::td)' | |
preceding_headers = "count(ancestor::table[1]/thead/th[normalize-space(.) = '#{locator}']/preceding-sibling::th)" | |
".//input[#{preceding_cells} = #{preceding_headers}]" | |
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
class Hash | |
def each_recursive(&block) | |
self.each do |k, v| | |
yield k, v | |
v.each_recursive(&block) if v.is_a?(Hash) | |
end | |
end | |
def each_key_recursive(&block) | |
self.each_recursive { |k, _| yield k } |
NewerOlder