def buildGraphAPA(): G = Graph() cnx = connection.MySQLConnection(user='******', password='******',host='qcis4',database='dblp') cursor = cnx.cursor() query = ("SELECT name_hash, paper_hash FROM dblp.pap") cursor.execute(query) for (name_hash, paper_hash) in cursor: G[name_hash].append(paper_hash) G[paper_hash].append(name_hash) cursor.close() cnx.close() G.make_consistent() return G
def buildGraphPCP(): G = Graph() cnx = connection.MySQLConnection(user='******', password='******',host='qcis4',database='dblp') cursor = cnx.cursor() query = ("SELECT paper_hash, conference FROM dblp.pcp") cursor.execute(query) for (paper_hash, conference) in cursor: G[conference].append(paper_hash) G[paper_hash].append(conference) cursor.close() cnx.close() G.make_consistent() return G
def buildGraphAPA(): G = Graph() cnx = connection.MySQLConnection(user="******", password="******", host="qcis4", database="dblp") cursor = cnx.cursor() query = "SELECT name_hash, paper_hash FROM dblp.pap" cursor.execute(query) for (name_hash, paper_hash) in cursor: G[name_hash].append(paper_hash) G[paper_hash].append(name_hash) cursor.close() cnx.close() G.make_consistent() return G