Exemple #1
0
def func():
    print(request.method)
    if request.method == 'GET':
        return render_template('indexD3.html')
    else:
        query = json.loads(request.data)
        G = mod.parse(query)

        # newG = nx.convert_node_labels_to_integers(G,label_attribute='label')
        temp = nx.node_link_data(G)

        print("hiy")
        pprint(json.dumps(temp))
        return json.dumps(temp)
Exemple #2
0
import json
import networkx as nx
import matplotlib.pyplot as plt

import mod

with open("query1.json") as f:
    query = json.load(f)
    G = mod.parse(query)
    nx.draw(G, with_labels=True)
    plt.show()
    x = nx.node_link_data(G)
    print(x)
    print('done')
Exemple #3
0
def test1():
	mod.parse("hjhwr")
	assert_true(True)
Exemple #4
0
def test2():
	mod.parse("hjhwr")
def test1():
    mod.parse("hjhwr")
    assert_true(True)
def test2():
    mod.parse("hjhwr")