Example #1
0
from random import randint
from gs_netstream.sender import NetStreamProxyGraph, NetStreamSender

serverIP = "localhost"

id = "python"
label = "Mr or Ms Python"
image_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/1024px-Python-logo-notext.svg.png"

sender = NetStreamSender(2001, serverIP)
proxy = NetStreamProxyGraph(sender)

proxy.add_node(id)
proxy.add_node_attribute(id, "ui.label", label)
proxy.add_node_attribute(id, "ui.style",
                         "fill-image: url('" + image_url + "');")
import logging
from gs_netstream.sender import  NetStreamProxyGraph, NetStreamSender

logging.basicConfig(level=logging.DEBUG)

sender = NetStreamSender(2012)
proxy = NetStreamProxyGraph(sender)

style = "node{fill-mode:plain;fill-color:gray;size:1px;}"
proxy.add_attribute("stylesheet", style)

proxy.add_attribute("ui.antialias", True)
proxy.add_attribute("layout.stabilization-limit", 0)

for i in range(0,500):
    proxy.add_node(str(i))
    if i > 0:
        proxy.add_edge(str(i) + "_" + str(i-1), str(i), str(i-1), False)
        proxy.add_edge(str(i) + "__" + str(i/2), str(i), str(i/2), False)
import logging
from gs_netstream.sender import NetStreamProxyGraph, NetStreamSender

logging.basicConfig(level=logging.DEBUG)

sender = NetStreamSender(2012)
proxy = NetStreamProxyGraph(sender)

style = "node{fill-mode:plain;fill-color:gray;size:1px;}"
proxy.add_attribute("stylesheet", style)

proxy.add_attribute("ui.antialias", True)
proxy.add_attribute("layout.stabilization-limit", 0)

for i in range(0, 500):
    proxy.add_node(str(i))
    if i > 0:
        proxy.add_edge(str(i) + "_" + str(i - 1), str(i), str(i - 1), False)
        proxy.add_edge(str(i) + "__" + str(i / 2), str(i), str(i / 2), False)
Example #4
0
from random import randint
from gs_netstream.sender import  NetStreamProxyGraph, NetStreamSender

serverIP = "localhost"

id = "python"
label = "Mr or Ms Python"
image_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Python-logo-notext.svg/1024px-Python-logo-notext.svg.png"

sender = NetStreamSender(2001, serverIP)
proxy = NetStreamProxyGraph(sender)

proxy.add_node(id)
proxy.add_node_attribute( id, "ui.label", label)
proxy.add_node_attribute( id, "ui.style", "fill-image: url('"+image_url+"');")