- 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
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.765 sec | |
Running org.neo4j.kernel.impl.index.TestIndexCommand | |
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.208 sec | |
Running org.neo4j.kernel.impl.transaction.TestJtaCompliance | |
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.79 sec | |
Running org.neo4j.kernel.impl.traversal.TreeGraphTest | |
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.7 sec | |
Running org.neo4j.kernel.impl.core.TestJumpingIdGenerator | |
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec | |
Running org.neo4j.kernel.impl.core.TestShortStringProperties |
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
>>> from com.tinkerpop.blueprints.pgm.impls.neo4j import Neo4jGraph | |
>>> from com.tinkerpop.rexster import AbstractSubResource | |
>>> from com.tinkerpop.rexster import RexsterApplicationProvider | |
>>> class BatchResource(AbstractSubResource): | |
... pass | |
... | |
>>> class BatchRap(RexsterApplicationProvider): | |
... pass | |
... | |
>>> batch_resource = BatchResource(BatchRap()) |
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
# SOLVED, thanks to Chuck Remes -- I was using zmq.QUEUE instead of zmq.STREAMER | |
pd = ProcessDevice(zmq.STREAMER, zmq.PUSH, zmq.PULL) | |
pd.bind_in("tcp://127.0.0.1:6000") | |
pd.bind_out("tcp://127.0.0.1:6001") | |
pd.start() | |
def client(): | |
context = zmq.Context() | |
socket = context.socket(zmq.PUSH) |
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 os | |
import time | |
import zmq | |
from zmq.devices.basedevice import ProcessDevice | |
from multiprocessing import Process | |
from device import Streamer, create_socket | |
in_port = 6000 | |
out_port = 6001 | |
number_of_workers = 1 |
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
# Note, added LINGER -1 to all sockets. | |
# See UPDATE comment below... | |
import zmq | |
from zmq.devices.basedevice import ProcessDevice | |
from multiprocessing import Process | |
import time | |
in_port = 6000 | |
out_port = 6001 |
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
#!/usr/bin/env groovy | |
import groovy.json.JsonSlurper | |
def slurper = new JsonSlurper() | |
def payload = '{"age": 34, "name": "james"}' | |
def data = slurper.parseText(payload) | |
println data |
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
python try.py | |
CONTENT TYPE application/json | |
HEADERS {'Content-Type': 'application/json', 'Accept': 'application/json'} | |
POST url: http://localhost:8182/graphs/tinkergraph/tp/gremlin | |
POST body: {"script": "g.setMaxBufferSize(0);g.startTransaction();g.V;tx.stopTransaction(TransactionalGraph.Conclusion.SUCCESS)"} | |
SystemError: ({'status': '500', 'transfer-encoding': 'chunked', 'server': 'grizzly/2.1.1', 'connection': 'close', 'date': 'Sat, 12 Nov 2011 19:06:33 GMT', 'access-control-allow-origin': '*', 'content-type': 'application/json'}, '{"message":"","error":"javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.setMaxBufferSize() is applicable for argument types: () values: []","api":{"description":"evaluate an ad-hoc Gremlin script for a graph.","parameters":{"rexster.returnKeys":"an array of element property keys to return (default is to return all element properties)","rexster.showTypes":"displays the properties of the elements with |
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
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2011 James Thornton (http://jamesthornton.com) | |
# BSD License (see LICENSE for details) | |
# | |
class Config(object): | |
def __init__(self,root_uri,username=None,password=None): | |
self.root_uri = root_uri |
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
from bulbs.graph import Graph | |
from bulbs.config import Config | |
from bulbs.element import Vertex, Edge | |
from bulbs.proxy import VertexProxy, EdgeProxy, IndexProxy | |
from bulbs.model import Node, NodeProxy | |
from bulbs.gremlin import Gremlin | |
# Bulbs 0.3 has pluggable resources -- there is a Neo4j Server Resource as well | |
from bulbs.resources import RexsterResource, RexsterIndex |
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
save_graphml: | | |
g.saveGraphML('data/graphml') | |
new File('data/graphml').getText() | |
load_graphml: | | |
g.loadGraphML($uri) | |
get_all_vertices: | | |
g.V |