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
version: '3' | |
networks: | |
lan: | |
services: | |
core1: | |
image: neo4j:4.0.0-alpha10-enterprise | |
networks: |
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
import java.net.URI; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
import java.util.logging.Level; | |
import static java.util.concurrent.TimeUnit.SECONDS; | |
import java.time.Duration; | |
import java.time.Instant; |
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
import java.net.URI; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
import java.util.logging.Level; | |
import static java.util.concurrent.TimeUnit.SECONDS; | |
import java.time.Duration; | |
import java.time.Instant; |
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
CREATE DATABASE library; | |
CREATE DATABASE c360; | |
CREATE DATABASE iam; | |
SHOW DATABASES; | |
:use system; | |
START DATABASE library; | |
START DATABASE c360; |
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
version: '3' | |
services: | |
accenture: | |
image: neo4j:3.5.8-enterprise | |
ports: | |
- 7474:7474 | |
- 7473:7473 |
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
### Neo4j.conf | |
kafka.zookeeper.connect=172.xx.xx.xx:2181 | |
kafka.bootstrap.servers=172.xx.xx.xx:9092 | |
streams.sink.enabled=true | |
streams.sink.polling.interval=1000 | |
streams.sink.topic.cypher.Neo4jPersonTest=MERGE (p:Person{name: event.name, surname: event.surname}) MERGE (f:Family{name: event.surname}) MERGE (p)-[:BELONGS_TO]->(f) | |
streams.sink.topic.cypher.blogpost_maxmind_albums=FOREACH(ignoreMe IN CASE WHEN event.type='insert' THEN [1] ELSE [] END | MERGE (c:Album{id:event.data.id}) on match set c.name = event.data.name on create set c.name = event.data.name) FOREACH(ignoreMe IN CASE WHEN event.type='delete' THEN [1] ELSE [] END | MERGE (c:Album{id:event.data.id}) detach delete c) FOREACH(ignoreMe IN CASE WHEN event.type='update' THEN [1] ELSE [] END | MERGE (c:Album{id:event.data.id}) set c.name=event.data.name, c.genre=event.data.genre) | |
streams.sink.topic.cypher.blogpost_maxmind_users=FOREACH(ignoreMe IN CASE WHEN event.type='insert' THEN [1] ELSE [] END | MERGE (u:User{id:event.data.id}) on match set u.nam |
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
import simplejson | |
from urllib.request import urlopen | |
import urllib.request | |
import urllib.parse | |
from neo4j.v1 import GraphDatabase | |
import time | |
uri = "bolt://localhost:7687" | |
driver = GraphDatabase.driver(uri, auth=("neo4j", "changeYourPassword")) |
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 com.neo4j.hadoop.example; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.neo4j.graphdb.*; | |
import org.neo4j.graphdb.schema.Schema; | |
import org.neo4j.helpers.collection.MapUtil; | |
import org.neo4j.tooling.GlobalGraphOperations; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.POST; |
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
{ | |
"hash160":"a54e0ee6071328dc58c8c37a4e974c4816364f24", | |
"address":"1G541ENwQBqG3WZgvYtVCojVgdHFpJ8RXs", | |
"n_tx":25, | |
"total_received":3393980000, | |
"total_sent":3393980000, | |
"final_balance":0, | |
"txs":[{ | |
"ver":1, | |
"inputs":[ |
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
{ | |
"hash160":"a54e0ee6071328dc58c8c37a4e974c4816364f24", | |
"address":"1G541ENwQBqG3WZgvYtVCojVgdHFpJ8RXs", | |
"n_tx":25, | |
"total_received":3393980000, | |
"total_sent":3393980000, | |
"final_balance":0, | |
"txs":[{ | |
"ver":1, | |
"inputs":[ |