- https://jamesthornton.com#EXIWlRrkjKE
- https://twitter.com/Rangers/status/1641554510605611011
- https://twitter.com/astros/status/1641996751618940936
- https://www.youtube.com/watch?v=S7c3lzpDkvQ#7SlILk2WMTI
- https://gist.github.com/espeed/dd3026536ec3d38afea1072941670f52#3ch6eXkQWU8-C5TDc46E1G4-trIjpVH8h88-UcW056B9jeQ-LvG_M_fAkXU
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 pickle | |
from redis import Redis | |
from bulbs.graph import Graph | |
# https://github.com/espeed/bulbs | |
# https://github.com/andymccurdy/redis-py | |
g = Graph() | |
redis = Redis() |
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
@prefix lib: <http://www.swi-prolog.org/rdf/library/> . | |
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
@prefix dcterms: <http://purl.org/dc/terms/> . | |
@prefix wn30: <http://purl.org/vocabularies/princeton/wn30/> . | |
@prefix wnschema: <http://purl.org/vocabularies/princeton/wordnet/schema#> . | |
@prefix basic: <basic/> . | |
@prefix full: <full/> . | |
@prefix standoff: <standoff/> . | |
@prefix wn20map: <wn20mappings/> . |
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
# Wordnet 3.0 Jython Loader Example | |
from org.openrdf.rio import RDFHandler | |
from org.openrdf.rio import RDFHandlerException | |
from org.openrdf.rio import RDFParseException | |
from org.openrdf.rio import ParseErrorListener | |
from org.openrdf.rio.turtle import TurtleParser | |
from org.openrdf.sail import Sail | |
from org.openrdf.sail import SailConnection | |
from org.openrdf.sail import SailException |
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
# Jython Wordnet 3.0 Loader Example 2 | |
# by James Thornton, http://jamesthornton.com | |
from org.openrdf.rio import RDFHandler | |
from org.openrdf.rio import RDFHandlerException | |
from org.openrdf.rio import RDFParseException | |
from org.openrdf.rio import ParseErrorListener | |
from org.openrdf.rio.turtle import TurtleParser | |
from org.openrdf.sail import Sail | |
from org.openrdf.sail import SailConnection |
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
$ jython load2.py | |
. | |
. | |
. | |
. | |
. | |
Current number of operations counted 53 | |
Number of commits that have occured 5 | |
Closing commit manager... |
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
# Jython FluentPipeline Example | |
# by James Thornton, http://jamesthornton.com | |
from com.tinkerpop.pipes.util import FluentPipeline | |
from com.tinkerpop.blueprints.pgm.impls.tg import TinkerGraphFactory | |
g = TinkerGraphFactory.createTinkerGraph() | |
pipe = FluentPipeline() | |
results = pipe.start(g.getVertex(1)).out("knows").property("name") |
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
# Jython AbstractPipeClosure Example | |
# by James Thornton, http://jamesthornton.com | |
from com.tinkerpop.pipes.util import FluentPipeline | |
from com.tinkerpop.pipes import AbstractPipeClosure | |
from com.tinkerpop.blueprints.pgm.impls.tg import TinkerGraphFactory | |
class StartsWithJ(AbstractPipeClosure): | |
def compute(self,objects): |
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
$ mvn compile | |
/usr/lib/jvm/java-openjdk | |
[INFO] Scanning for projects... | |
Downloading: http://repo1.maven.org/maven2/org/neo4j/parent-pom/6/parent-pom-6.pom | |
[INFO] Unable to find resource 'org.neo4j:parent-pom:pom:6' in repository central (http://repo1.maven.org/maven2) | |
[WARNING] Skipping jpp repository file:///usr/share/maven2/repository in vanilla mode | |
[INFO] ------------------------------------------------------------------------ | |
[ERROR] FATAL ERROR | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Error building POM (may not be this project's POM). |
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
<graph> | |
<graph-enabled>true</graph-enabled> | |
<graph-name>wordgraph</graph-name> | |
<graph-type>neo4jgraph</graph-type> | |
<graph-file>/tmp/wordgraph</graph-file> | |
<properties> | |
<!-- Memory mapped I/O settings --> | |
<!-- For high traversal speed it is important to have the nodestore.db and relationshipstore.db files. --> | |
<neostore.nodestore.db.mapped_memory>285M</neostore.nodestore.db.mapped_memory> | |
<neostore.relationshipstore.db.mapped_memory>285M</neostore.relationshipstore.db.mapped_memory> |
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
POSTs... | |
$ httperf --server localhost --port 8182 --uri "/graphs/wordgraph/vertices?element_type=word&name=testing" --method POST --num-conns=1000 --num-calls=1 | |
httperf --client=0/1 --server=localhost --port=8182 --uri=/graphs/wordgraph/vertices?element_type=word&name=testing --send-buffer=4096 --recv-buffer=16384 --method=POST --num-conns=1000 --num-calls=1 | |
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE | |
Maximum connect burst length: 1 | |
Total: connections 1000 requests 1000 replies 1000 test-duration 7.910 s | |
Connection rate: 126.4 conn/s (7.9 ms/conn, <=1 concurrent connections) |