def get_closeness_at_time(cur, userID, time): graph = graph2.build_graph_before_undirected(cur, time) return graph2.closeness(graph, userID)
def get_betweenness_at_time(cur, userID, time): graph = graph2.build_graph_before_undirected(cur, time) betweenness = graph2.betweenness(graph) return betweenness[userID]