Skip to content

Instantly share code, notes, and snippets.

@mcobzarenco
mcobzarenco / entity.capnp
Created July 14, 2015 12:51
Capnp for a knowledge base
struct Entity {
type @0 :EntityType;
union {
id @0 :Text;
blob @1 :Text;
text @1 :List(Text);
}
}
@mcobzarenco
mcobzarenco / join_triples.erl
Created August 3, 2015 10:57
MapReduce Riak job for doing a join
emit_left_id(Obj, _, TargetBucket) ->
try
Key = riak_object:key(Obj),
Triple = mochijson2:decode(riak_object:get_value(Obj)),
case proplists:get_all_values(<<"left_id_s">>, element(2, Triple)) of
[Id] -> [{{{<<"maps">>, TargetBucket}, Id},
{{<<"maps">>, TargetBucket}, Id, Key, Triple}}];
_ -> []
end
catch
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtitJ/uiynqT9VxZZfos7c0INrzJEWq306QRenZ3Za5zZfZs50b1P1qgcvQKrrX/3EP1KZ5b1QXOjoPovaIIYoiNuNaBJYYHRK+EcjxDlFt/EsBgEQHxZyEp8J7ss3pfDuwS0QxUOFA7ABDJieS7O5GXfNfEqwZ6w4Ttpjwpg2fMihN9MZ0/3Rk2PSKNxfH5kYrwKY/rauZIjDmC/vDf0qwjDZy6W6M2HnOy5NlcGduQJv+ixdY4yMlY5XTZg6ymoBCOu4daKxmQb+YRl+wy/0/o/kjhyElF+nJXnwgyUniQUFMpPJeNyI9Xq3w7XDpaiJVL3GwXyP36PTCX3t2TXf marius@reinfer.io
swagger: '2.0'
info:
title: Re:infer API
description: Re:infer v1 API
contact:
name: Reinfer Ltd.
email: eng@reinfer.io
url: https://reinfer.io
version: 1.0.0
externalDocs:
@mcobzarenco
mcobzarenco / reinfer.openapi-v3.yaml
Last active July 20, 2021 17:15
Re:infer OpenAPI v3.0
openapi: 3.0.0
info:
title: Reinfer
description: "\nWelcome to the Re:infer API. We strive to make the API predictable, easy to use\nand painless to integrate. If there is anything you feel we can do to improve\nit or if you encounter any bugs or unexpected behaviour, please email\n[support@reinfer.io](mailto:support@reinfer.io) and we will get back to you as\nsoon as possible.\n\nYou can see all available endpoints in the [API Reference](/api/summary). There\nis also an [API Tutorial](/api/tutorials/basic-tutorial).\n\n## API Endpoint\n\nAll API requests are sent to Re:infer as JSON objects to an endpoint over\nHTTPS.\n\n```txt\nhttps://reinfer.io/api/...\n```\n\n### Development and production environments\n\nIn Re:infer, development and production data and workflows are separated by\nplacing them in separate organisations, each of which is permissioned\nseparately (so that developers can have admin access in the development\norganisations while having stricter access controls in production). Both\ndevel
console.log(window.localStorage);