Ejemplo n.º 1
0
 def __init__(self, time_gap):
     self._graph = Graph(
         f"http://{ApplicationConfig.get_neo4j_ip()}:{ApplicationConfig.get_neo4j_port()}/browser",
         user=ApplicationConfig.get_neo4j_user(),
         password=ApplicationConfig.get_neo4j_password())
     self._node_matcher = NodeMatcher(self._graph)
     self._rel_matcher = RelationshipMatcher(self._graph)
     query = 'MATCH (n) WHERE EXISTS(n.date) RETURN DISTINCT n.date AS date'
     date = self._graph.run(query).to_data_frame()
     date = date.sort_values(by='date')
     date['date'] = date.apply(
         lambda x: datetime.strptime(x['date'], '%Y-%m-%d').date(), axis=1)
     self._date_integrate(date, time_gap)
Ejemplo n.º 2
0
 def __init__(self):
     self._graph = Graph(
         f"http://{ApplicationConfig.get_neo4j_ip()}:{ApplicationConfig.get_neo4j_port()}/browser",
         user=ApplicationConfig.get_neo4j_user(),
         password=ApplicationConfig.get_neo4j_password())