- Fork this gist.
- Please complete the quick challenge below using Ruby, uploading additional files if necessary.
- Reply back to the email you were sent with the link to your completed gist.
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
{ | |
"data" : { | |
"bark_date" : { | |
"park" : { | |
"address" : { | |
"city" : "Los Angeles", | |
"postal_code" : null, | |
"longitude" : -118.2670922, | |
"street_2" : null, | |
"street_1" : "1850 W. Silver Lake Drive 90026", |
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
Completed 200 OK in 3ms (ActiveRecord: 1.5ms) | |
DEBUG [7726bec1] I, [2015-09-22T15:57:13.661867 #17769] INFO -- : Started POST "/api/v1/user/checkin" for 172.56.31.221 at 2015-09-22 15:57:13 +0000 | |
DEBUG [7726bec1] I, [2015-09-22T15:57:13.663523 #17769] INFO -- : Processing by API::V1::UsersController#checkin as JSON | |
DEBUG [7726bec1] I, [2015-09-22T15:57:13.663591 #17769] INFO -- : Parameters: {"lat"=>"34.0490527265091", "lon"=>"-118.2498243917881", "subdomain"=>"api"} | |
DEBUG [7726bec1] D, [2015-09-22T15:57:13.664649 #17769] DEBUG -- : User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."uid" = $1 LIMIT 1 [["uid", "[email protected]"]] | |
DEBUG [7726bec1] D, [2015-09-22T15:57:13.738442 #17769] DEBUG -- : Location Load (0.6ms) SELECT "locations".* FROM "locations" WHERE "locations"."user_id" = $1 LIMIT 1 [["user_id", 126]] | |
DEBUG [7726bec1] D, [2015-09-22T15:57:13.739216 #17769] DEBUG -- : (0.4ms) BEGIN | |
DEBUG [7726bec1] D, [2015-09-22T15:57:13.740959 #177 |
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
x = { | |
blog_post: { | |
name: "You will nevtrhtytrer guess", | |
slug: "pudgfdfdfddfgfdgfdzzle", | |
status: "published", | |
content_before_flip: "<p>You will never guess what is after the flip</p>", | |
content_after_flip: "<p>The answer is words. Words were after the flip.</p>", | |
tags: ["funny", "true"], | |
published_at: "2013-04-25T10:47:06-07:00" | |
} |
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 objective_function(vector) | |
return vector.inject(0) {|sum, x| sum + (x ** 2.0)} | |
end | |
def rand_in_bounds(min, max) | |
return min + ((max-min) * rand()) | |
end | |
def random_vector(minmax) | |
return Array.new(minmax.size) do |i| |
Yesterday:
- Holiday
- Presidents Day
Today:
OlderNewer