Skip to content

Instantly share code, notes, and snippets.

@ikwattro
ikwattro / schema-generator.py
Created Feb 24, 2021 — forked from FxIII/schema-generator.py
Hume Schema Generator
View schema-generator.py
import os
from neo4j import GraphDatabase
import json
import random
import logging
import uuid
# default parameters
URI = "bolt://localhost:7687"
@ikwattro
ikwattro / App.java
Created Apr 13, 2020 — forked from thomasdarimont/App.java
Simple example for configuring Spring Security's RoleHierarchy via YAML in Spring Boot, compatible with Java 7
View App.java
package demo;
import static java.util.Arrays.asList;
import static org.springframework.security.core.authority.AuthorityUtils.createAuthorityList;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
View insight3.md
CREATE (n:HumeAction)
SET n.id = 'hume_action_chart'
SET n.data = '{
  "label": "Show Demand",
  "returnType": "CHART",
  "scope": "LOCAL",
  "id": "hume_action_chart",
  "action": {
    "statement": "MATCH (n:Product) WHERE id(n) = $id 
View insight2.md
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": [
    {
View insight 1.md
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 Jun 25, 2019
API hackathon
View annotate.md

## 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
dbpedia result
View result.json
{
"@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",
View phones.csv
name phone
john 12345
john 45678
laura 12345
laura 7890
View ft.csv
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
View citation.md

(E & Huang 2001)[^Huang2001]

[^Huang2001]: E, W. & Huang, Z., 2001. Matching Conditions in Atomistic-Continuum Modeling of Materials. arXiv.org, (13), p.135501. Available at: http://arxiv.org/abs/cond-mat/0106615v1.