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
batch_size = 10_000 | |
previous_nodes_per_second = nil | |
while true | |
total_found = 0 | |
puts "Testing batch size of #{batch_size}..." | |
time_taken = Benchmark.realtime do | |
i = 0 | |
House.as(:h).find_in_batches(batch_size: batch_size) do |batch| |
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
MATCH (n) | |
OPTIONAL MATCH (n)-[r]-() | |
DELETE n,r; | |
CREATE (:Product {id: 1, name: 'Apple iPhone 6 128GB iOS 8 4.7" Touchscreen Factory Unlocked', price: 839.99}); | |
CREATE (:Product {id: 2, name: 'HTC One M8 32GB Factory Unlocked Windows 8.1 Smartphone', price: 349.99}); | |
CREATE (:Product {id: 3, name: 'DELL 15.6" Intel Core i7 1TB HDD Notebook', price: 649.99}); | |
CREATE (:Product {id: 4, name: 'Canon EOS Rebel T5 EF-S 18-55mm IS II Digital SLR Kit US Warranty', price: 399.99}); | |
CREATE (:Product {id: 5, name: 'Terralux TLF-TT-5 Tactical 5 Light 650 Lumens', price: 77.88}); | |
CREATE (:Product {id: 6, name: 'Emergency One Person 3-month Food Storage Kit', price: 479.99}); |
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 'json' | |
queries = [] | |
queries << <<QUERY | |
{ | |
"statements" : [ | |
{ | |
"statement" : "CREATE (n:TransactionTestFoo) RETURN id(n)" | |
}, | |
{ |
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
# Show user friend relationships | |
MATCH (user:User) RETURN user | |
# Show products in category hierarchy | |
MATCH (product:Product)-[:has_category]->(category:Category)<-[:has_subcategory*]-(super_category:Category) | |
RETURN * | |
# All users 25 and under | |
MATCH (user:User) WHERE user.age <= 25 RETURN user.name, user.age; |
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
= Competitive Intelligence in Cancer Drug Discovery = | |
:neo4j-version: 2.0.0-RC1 | |
:author: Wolfgang Hoeck | |
:twitter: @LiveDataConcept | |
:tags: life science domain:competitive intelligence in cancer drug discovery | |
Using the _Design for Queryability_ modeling approach by http://twitter.com/ianrobinson[Ian Robinson] | |
=== 1. Application/End-User Goals === |
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 GithubClientCache | |
CACHE = ActiveSupport::Cache::FileStore.new('cache') | |
CACHE_EXPIRY_PERIOD = (60 * 60 * 24 * 365) # 1 year | |
def initialize(current_object, arg_stack = []) | |
@current_object = current_object | |
@arg_stack = arg_stack | |
end | |
def method_missing(method, *args, &block) |
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 'net/http' | |
require 'json' | |
server_url = 'http://localhost:7504' | |
queries = [ | |
"MATCH (u:User) RETURN *", | |
"MATCH (u:User:GitHub) RETURN *", | |
"MATCH (u:User:StackOverflow) RETURN *", | |
"MATCH (u:User) WHERE u:GitHub RETURN *", |
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
### Keybase proof | |
I hereby claim: | |
* I am cheerfulstoic on github. | |
* I am cheerfulstoic (https://keybase.io/cheerfulstoic) on keybase. | |
* I have a public key whose fingerprint is DB07 298B 96EC 8866 97A1 E1C7 78F5 02CB B09E F117 | |
To claim this, I am signing this object: |
-
What is the most that any country has played in a given stadium?
-
For each country, what is the stadium which is has played in the most?
-
For all of the World Cup years, which continents were represented in the "Semi-finals" phase? What about the "Final" phase?
-
What players has "Philipp Lahm" played against the most? Note that a Squad is tied to a match both through it's Country and the WorldCup is was named for
OlderNewer