This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker rm -v $(docker ps -a -q -f status=exited) | |
docker rmi $(docker images -f "dangling=true" -q) | |
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes | |
docker start `docker ps -q -l` | |
docker attach `docker ps -q -l` | |
docker run -ti -v //c/Users/Evgeny/office:/data kaixhin/theano | |
docker run -ti -v //c/Users/Evgeny/office:/data b.gcr.io/tensorflow/tensorflow bash | |
docker run -ti -v //c/Users/Evgeny/office:/data ubuntu:12.04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONSISTENCY ONE; | |
CREATE KEYSPACE james WITH replication = {'class':'SimpleStrategy', 'replication_factor': 1}; | |
describe keyspaces; | |
describe tables; | |
use james; | |
CREATE TABLE james (column1 int PRIMARY KEY, column2 text); | |
INSERT INTO james (column1, column2) VALUES(42, 'just a test'); | |
SELECT * FROM system_schema.keyspaces; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM sys_rdf_schema; | |
ld_dir('/data', '*.ttl', 'http://www.example.com/genealogy.owl#'); | |
delete from DB.DBA.load_list where ll_file='/data//einstein.ttl'; | |
SPARQL SELECT (COUNT(DISTINCT ?x) AS ?count) WHERE { ?x ?y ?z }; | |
sparql clear graph <http://www.example.com/genealogy.owl#>; | |
sparql load <https://github.com/blokhin/genealogical-trees/raw/master/data/header.ttl> into <http://www.example.com/genealogy.owl#>; | |
rdfs_rule_set('fhkb', 'http://www.example.com/genealogy.owl#'); | |
SPARQL SELECT ?g count(*) as ?count WHERE { GRAPH ?g {?s ?p ?o } } GROUP BY ?g ORDER BY DESC 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Amazon: | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080 | |
iptables -t nat -A DOCKER -p tcp --dport 8001 -j DNAT --to-destination 172.17.0.19:8000 | |
# Drop existing: | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node --optimize_for_size --max_old_space_size=920 --gc_interval=100 server.js // 1500 Mb RAM | |
node --optimize_for_size --max_old_space_size=460 --gc_interval=100 server.js // 512 Mb RAM | |
// downgrade npm | |
npm install -g npm@VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
SELECT ?label | |
WHERE { <http://dbpedia.org/resource/Asturias> rdfs:label ?label } | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
PREFIX dbres: <http://dbpedia.org/resource/> | |
DESCRIBE dbres:Curie-Weiss_law | |
SELECT ?dbr WHERE { ?dbr foaf:isPrimaryTopicOf <http://en.wikipedia.org/wiki/Curie–Weiss_law> } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var https = require('https'); | |
var qs = require('querystring'); | |
var api_key = ""; // your key | |
var host = "api.mpds.io", port = 443, path = "/v0/download/facet"; | |
var search = { | |
"elements": "Mn", | |
"classes": "binary, oxide", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from urllib import urlencode | |
import httplib2 | |
import json | |
api_key = "" # your key | |
endpoint = "https://api.mpds.io/v0/download/facet" | |
search = { |