This file contains hidden or 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
diff --git a/spec/lib/object_serializer_performance_spec.rb b/spec/lib/object_serializer_performance_spec.rb | |
index e718953..c589ea8 100644 | |
--- a/spec/lib/object_serializer_performance_spec.rb | |
+++ b/spec/lib/object_serializer_performance_spec.rb | |
@@ -107,13 +107,13 @@ describe FastJsonapi::ObjectSerializer, performance: true do | |
data[k][:time] = Benchmark.measure { data[k][:json] = v.send(json_method) }.real * 1000 | |
end | |
- print_stats(message, movie_count, data) | |
+ # print_stats(message, movie_count, data) |
This file contains hidden or 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 'benchmark/ips' | |
# require 'awesome_print' | |
# require 'pry-byebug' | |
# require 'kalibera' | |
# require 'benchmark-memory' | |
require 'bundler' | |
require 'bundler/setup' | |
Bundler.require(:default) |
This file contains hidden or 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
Afghanistan | |
Australia | |
Albania | |
Algeria | |
Aruba | |
Antigua and Barbuda | |
Austria | |
Azerbaijan | |
Argentina | |
Armenia |
This file contains hidden or 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
# Just simulating and checking probabilities | |
# Hence proved i was wrong | |
def dice_throw | |
random_gen = Random.new | |
return random_gen.rand(6) + 1 | |
end | |
def random_predict | |
random_gen = Random.new |
This file contains hidden or 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 add_headers_and_higher_is_better | |
test_ids = @table.keys - self.metadata_names | |
tests = Testname.where(:id => test_ids) | |
testnames_hash = Hash.new | |
testdetails = Testdescription.where(:dashboard_id => @dashboard_id, :testname_id => test_ids) | |
testdetails_hash = Hash[testdetails.collect{ |testdetail| [testdetail.testname_id, testdetail] }] | |
tests.each do |test| | |
if testdetails_hash[test.id] | |
self.insert_higher_is_better(testdetails_hash[test.id]) | |
end |
This file contains hidden or 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:0x00000005bc6538> can't be coerced into BigDecimal |
This file contains hidden or 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
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1: DELETE FROM `milestones` WHERE `milestones`.`id` = ? | |
These were the params according to the error message | |
{"_method"=>"delete", | |
"authenticity_token"=>"something something", | |
"id"=>"12"} |
This file contains hidden or 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 RedisWrapper | |
attr_accessor :client | |
def initialize | |
begin | |
@c = Redis.new(:host => "localhost") | |
rescue | |
return false | |
end |
This file contains hidden or 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
resque-web | |
[2012-08-28 12:02:11 -0700] Starting 'resque-web'... | |
[2012-08-28 12:02:11 -0700] trying port 5678... | |
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:346:in `open_http': 403 Forbidden (OpenURI::HTTPError) | |
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:775:in `buffer_open' |