Skip to content

Instantly share code, notes, and snippets.

View marfi's full-sized avatar

Martin Linkov marfi

View GitHub Profile
@marfi
marfi / DBahn
Last active August 16, 2018 14:58
Company Queries
curl -X POST \
http://gcp.unigraph.rocks/api/query \
-H 'X-Unigraph-API-Key: DEMO' \
-d '{
subjects(property: "label", text: "Deutsche Bahn", lang: "en") {
wikidata_id
eu_transparency_register_id
#Gets the Eurepean Transperancy Registry id of DBahn
label.en
uid
@marfi
marfi / ec_pic_id.json
Last active March 23, 2018 07:27
Descriptions
["2001fb01199bf3","description",{"object":{"text":"international certification body and classification society with main expertise in technical assessment, advisory, and risk management","lang":"en"}},"ec_pic_id",{"object":"916816162"}]
["2001f9bdf0","description",{"object":{"text":"Dutch multinational, active in the fields of decorative paints, performance coatings and specialty chemicals","lang":"en"}},"ec_pic_id",{"object":"953284185"}]
["2001fa1cc7ae","description",{"object":{"text":"French multinational aircraft engine, rocket engine, aerospace-component, defense, and security company","lang":"en"}},"ec_pic_id",{"object":"999954668"}]
["2001fa04b75c","description",{"object":{"text":"French multinational conglomerate which holds interests in the power generation and transport markets","lang":"en"}},"ec_pic_id",{"object":"998805800"}]
["2001fa0a6b07","description",{"object":{"text":"multinational industrial gases and engineering company founded in Germany in 1879","lang":"en"}},"ec_pic_id",{"object":"99875
@marfi
marfi / Bluemix Augmentation
Last active March 13, 2018 14:33
Ingen.io
curl -X POST \
http://try.unigraph.rocks/api/context/bluemix_augment \
-H 'X-Unigraph-API-KEY: DEMO' \
-d '{ "text": "Slovakia is in Europe" }'
@marfi
marfi / Stream & Cont
Last active March 2, 2018 14:03
Streaming
curl -X POST \
http://try.unigraph.rocks/api/query \
-H 'X-Unigraph-API-Key: DEMO' \
-d 'query Tangibles @stream { subjects(property: "instance_of" uid: "12f98040") {label.en } }'
curl -X POST \
http://try.unigraph.rocks/api/query \
-H 'X-Unigraph-API-Key: DEMO' \
-d 'query Tangibles @stream (seek: "Kf+BAwEBBmN1cnNvcgH/ggABAgEDVFNQAf+EAAEGQnJhbmNoAf+EAAAAHv+DAgEBEFtdcXVhZHN0b3JlLlRlcm0B/4QAAQwAAEL/ggEBFBL5hBggBCcBAEmfQEvV8Ql+k6/hAQElM/85VV+6ls51wfTiuADw29o2ZW4AMwVOqn1V2FELwbAj+PlAzQA=") { subjects(property: "instance_of" uid: "12f98040") {label.en } }'
@marfi
marfi / Microsoft
Last active December 6, 2017 13:35
BvD
{ subjects(property: "us_sec_cik_id", identifier: "0000789019") {
label.en
industry {
us_sic_code_id
}
cash_and_equivalents_period_change {
.determination_method
.reference_url
.reported_quarters
.point_in_time}}}
@marfi
marfi / HP
Last active November 14, 2017 09:36
Datathon
query HP {
# start from id with from the EU TR
subjects(property: "eu_transparency_register_id", identifier: "99346002337-55") {
# get the Organization's name(s)
label.en
# lear more about the Organization: is it a non-profit, for profit, etc.
instance_of { label.en }
#See the key people
@marfi
marfi / Acetaminophen aka's
Last active November 13, 2017 09:59
Nova
{ subjects(property: "alberta_drugbank_id", identifier: "00316") {
label.en
alias.en } }
Run it:
http://try.unigraph.rocks/?q=%7B%0A++subjects(property%3A+%22alberta_drugbank_id%22%2C+identifier%3A+%2200316%22)+%7B%0A++++label.en%0A++++alias.en%0A++%7D%0A%7D%0A
@marfi
marfi / Alpachem
Last active October 30, 2017 12:57
Spaziodati
{
subjects(property: "spaziodati_id", identifier: "750a46318fc2") {
dissolved_or_abolished
official_website}}
@marfi
marfi / Elad
Last active August 10, 2017 04:38
Unigraph Queries
1) How many movies has Michael Bay directed?
query one {
subjects(property: "label", text: "Michael Bay", lang: "en") {
uid
instance_of(filter: "$0 == `12fa34bb3b`") @propagate}}
query two {
node(uid: "2001f9de8b") {
director @reverse {
@marfi
marfi / Inventurist
Created May 4, 2017 18:21
API Examples
# Identify and surface related entities given an external identifier
curl -X POST \
http://try.unigraph.rocks/api/context/entities \
-H 'max: 50' \
-H 'x-unigraph-api-full: true' \
-H 'x-unigraph-api-key: KEY' \
-d '{"entities":[{"identifier": {"property": "crunchbase_person_id", "value": "cirrus-shakeri"}, "tag": "Cirrus"},
{"identifier": {"property": "crunchbase_organization_id", "value": "aibrain"}, "tag": "Ai"}]}'