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
""" | |
This example demonstrates how to use Pulsar actors to create | |
nodes with Goblin. This is the basic concept on which other Pulsar/Goblin | |
apps would be based, but it may be better to use Pulsar's higher | |
level Application class interface... | |
Based on: | |
https://github.com/quantmind/pulsar/blob/master/examples/snippets/greeter.py | |
""" | |
import asyncio | |
import pulsar |
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
""" | |
Simple client for the JSONRPC Server | |
""" | |
import asyncio | |
from pulsar.apps import rpc | |
proxy = rpc.JsonProxy("http://localhost:8060") | |
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
import asyncio | |
import datetime | |
from pytz import utc | |
from tornado.platform.asyncio import AsyncIOMainLoop | |
from mogwai import properties | |
from mogwai.connection import setup, close_global_pool | |
from mogwai.models import Vertex, Edge, V |
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
import asyncio | |
import collections | |
import json | |
import uuid | |
import aiohttp | |
Message = collections.namedtuple( | |
"Message", |
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
match path=(t:tweet {tid: '665496205854687232'})-[:REPLIES_TO|RETWEETS|TWEETS*1..4]-(:tweet) return filter(x in nodes(path) where exists(x.tid)) |
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 df_edge_traversal(g): | |
""" | |
Based on networkx dfs_edges | |
""" | |
visited = set() | |
start = g.nodes()[0] | |
stack = [(start, iter(g[start]))] | |
while stack: | |
parent, children = stack[-1] | |
try: |
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
import uuid | |
from tornado.concurrent import Future | |
from tornado.websocket import websocket_connect | |
class GremlinResponseStream: | |
def __init__(self, conn): | |
self._conn = conn | |
@asyncio.coroutine |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import json | |
with open("output3.txt", "r") as f: | |
for line in f: | |
print(json.loads(line)) |
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
Django==1.6.7 | |
GraphLab-Create==0.3.0 - 1.4.1 (2.7) | |
Parsley==1.1 - 1.2 (3.3) | |
Pillow==2.4.0 - 2.9.0 (3.4) | |
South==0.8.4 | |
amqp==1.4.5 - 1.4.6 (3.3) | |
anyjson==0.3.3 - (3.1) (REMOVE???) | |
argparse==1.2.1 | |
billiard==3.3.0.17 - 3.3.0.20 (3.3) | |
boto==2.29.1 - 2.3.8 (3.4) |