Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

aviatorBeijing

💭
I may be slow to respond.
  • ThomsonReuters
  • Beijing
View GitHub Profile
@aviatorBeijing
aviatorBeijing / Neo4j shortest path
Created Aug 19, 2016 — forked from mauget/Neo4j shortest path
Emits a Google KML stream of the shortest path between two points. A "point" is a Neo4j node having latitude and and longitude properties. The Neo4j A* algorithm does the work.
View Neo4j shortest path
public void findShortestPath(PrintStream ps, long startNode, long endNode) {
try {
RouterService router = Initializer.getApplicationContext().getBean(RouterService.class);
router.emitShortestPathKML(ps, startNode, endNode);
} catch (Exception e) {
e.printStackTrace();
}
}
public void emitShortestPathKML(PrintStream ps, long keyValueA, long keyValueB)
@aviatorBeijing
aviatorBeijing / logstash-bikehare-status.conf
Created Jul 1, 2016 — forked from derickson/logstash-bikehare-status.conf
Logstash config for http_poller pulling of DC Capital bikeshare data and doing an XML split of the contents.
View logstash-bikehare-status.conf
## Example of pulling data from DC Capital bikeshare to Elasticsearch in real time
## HTTP Poller -> XML Splitting -> Elasticsearch
input {
## pull data from Capital Bikeshare every 60 seconds
http_poller {
urls => {
bikeshare_dc => "https://www.capitalbikeshare.com/data/stations/bikeStations.xml"
}
request_timeout => 30
You can’t perform that action at this time.