Skip to content

Instantly share code, notes, and snippets.

View ikwattro's full-sized avatar

Christophe Willemsen ikwattro

View GitHub Profile
CREATE (n:HumeAction)
SET n.id = 'hume_action_person_eco'
SET n.data = '{
  "label": "Show Ecosystem of Person",
  "returnType": "GRAPH",
  "scope": "GLOBAL",
  "id": "hume_action_find_person_eco",
  "inputParameters": [
 {
CREATE (n:HumeAction)
SET n.id = 'hume_action_ins'
SET n.data = '{
  "label": "Ship Product to",
  "returnType": "GRAPH",
  "scope": "LOCAL",
  "id": "hume_action_ins",
  "inputParameters": [
 {
@ikwattro
ikwattro / annotate.md
Last active June 25, 2019 07:55
API hackathon

## Hackathon API docs

In the same idea as dbpedia spotlight, the Hume API will provide an endpoint to let people run the entity linking process of a text and retrieve associated results.

### Annotate text

POST /entitylinking/annotate

Request body :

@ikwattro
ikwattro / result.json
Last active May 10, 2019 17:21
dbpedia result
{
"@text": "SPS-ALPHA incorporates a number of critical new technologies, including: (1) WPT using a retrodirective RF phased array with high-efficiency solid-state amplifiers; (2) high-efficiency multi-bandgap PV solar cells, employed in a concentrator PV (CPV) architecture with integrated thermal management; (3) lightweight structural components, applied in various systems \/ subsystems; (4) autonomous robotics in a highly structured environment; and, (5) a high-degree of autonomy among individual modules. However, no 'breakthroughs' are required, and the key innovation is at the architecture level.",
"@confidence": "0.35",
"@support": "0",
"@types": "",
"@sparql": "",
"@policy": "whitelist",
"Resources": [
{
"@URI": "http:\/\/dbpedia.org\/resource\/World_Poker_Tour",
name phone
john 12345
john 45678
laura 12345
laura 7890
Round Date Team 1 FT HT Team 2
1 (Fri) 11 Aug 2017 (32) Arsenal FC 4-3 2-2 Leicester City FC
1 (Sat) 12 Aug 2017 (32) Brighton & Hove Albion FC 0-2 0-0 Manchester City FC
1 (Sat) 12 Aug 2017 (32) Chelsea FC 2-3 0-3 Burnley FC
1 (Sat) 12 Aug 2017 (32) Crystal Palace FC 0-3 0-2 Huddersfield Town AFC
@ikwattro
ikwattro / cluster.sh
Last active December 27, 2018 06:52
Neo4j Causal Cluster on Docker
#!/bin/sh
# Usage: ./cluster.sh --cores={number|optional|default3} --replicas={number|optional|default0} --erase={boolean|optional|default false}
# Use at your own risk!
function erase() {
if $ERASE
then
for i in $(seq 1 $NUMBER_OF_CORES); do
docker rm -f core${i};
done
MATCH (n:VideoTranscript {path:"/Users/ikwattro/dev/_transcript/Intro to Graph Databases Episode #6 - Continuing with Cypher-Kv_HP6C2qes.en.vtt"})-[:HAS_ANNOTATED_TEXT]->(a)
match (a)-[:CONTAINS_SENTENCE]->(s:Sentence)
with a, count(*) as nSentences
match (a)-[:CONTAINS_SENTENCE]->(s:Sentence)-[:HAS_TAG]->(t:Tag)
with a, s, count(distinct t) as nTags, (CASE WHEN nSentences*0.1 > 10 THEN 10 ELSE toInteger(nSentences*0.1) END) as nLimit
where nTags > 4
with a, s, nLimit
order by s.summaryRank
with a, collect({text: s.text, pos: s.sentenceNumber})[..10] as summary
@ikwattro
ikwattro / content.json
Created July 30, 2018 13:53
GKP ES index
{"took":4,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":140,"max_score":1.0,"hits":[{"_index":"documents","_type":"documents","_id":"1583e58d-93fb-11e8-9133-b630aa296667","_score":1.0,"_source":{"keywords":[{"score":1.0,"value":"incredible datum source"},{"score":0.8740276985632897,"value":"heterogeneous biological datum"},{"score":0.8660201774065337,"value":"datum source"},{"score":0.5607271616408498,"value":"batch importer"},{"score":0.4324037082232962,"value":"research arm"},{"score":0.40140374839319426,"value":"gigantic graph"},{"score":0.3802973686515041,"value":"first time"},{"score":0.38014363343342666,"value":"csv file"},{"score":0.3616156120916232,"value":"cypher query"},{"score":0.3616156120916232,"value":"next generation"},{"score":0.3609459065770126,"value":"neo4j"},{"score":0.34879835843755574,"value":"large graph"},{"score":0.34049163631799256,"value":"text mining"},{"score":0.27726250538402347,"value":"happy"},{"score":0.25983900689817496,"value":