示例#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)
示例#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')
示例#3
0
def test1():
	mod.parse("hjhwr")
	assert_true(True)
示例#4
0
def test2():
	mod.parse("hjhwr")
示例#5
0
def test1():
    mod.parse("hjhwr")
    assert_true(True)
示例#6
0
def test2():
    mod.parse("hjhwr")