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
GET .monitoring-es*/cluster_state/_search | |
{ | |
"size": 0, | |
"query": { | |
"bool": { | |
"filter": [ | |
{ | |
"term": { | |
"cluster_state.status": "red" | |
} |
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
create procedure | |
cbw.DBA.csvExport( IN in_query VARCHAR, IN filename VARCHAR ) | |
{ | |
declare query varchar; | |
query := split_and_decode(in_query,0,'%'); | |
file_delete(filename,1); | |
declare meta, _dt any; |
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
; virtuoso.ini | |
; | |
; Configuration file for the OpenLink Virtuoso VDBMS Server | |
; | |
; | |
; Database setup | |
; | |
[Database] | |
DatabaseFile = virtuoso.db | |
TransactionFile = virtuoso.trx |
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 api: <http://purl.org/linked-data/api/vocab#> . | |
@prefix dc: <http://purl.org/dc/elements/1.1/> . | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . | |
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | |
@prefix dbo: <http://dbpedia.org/ontology/> . | |
@prefix dbpedia: <http://dbpedia.org/resource/> . |
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
import nltk | |
cond = lambda s: any((pos == 'JJ' and len(word) > 4 and word[-3:] == 'ate' for word, pos in s)) | |
sents = (s for s in nltk.corpus.brown.tagged_sents() if len(s) > 4 and len(s) < 16 and cond(s)) | |
for sent in sents: | |
print(" ".join(zip(*sent)[0])) |
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
''' | |
Created on 13 Nov 2014 | |
@author: <https://github.com/cmarat> | |
Convert Geonames RDF dump [1] to n-triples. | |
Uncompress the dump and pass the file name as a command | |
line parameter, or pipe it into stdin. |
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
# Get alternative names of all countries from geonames. The query should have been | |
# much simpler, but | |
# | |
# 1) It's hard (or impossible) to tell cities from countries in the geonames data | |
# 2) In dbpedia too many things are dbo:Country whereas they are not. | |
# | |
# This was minimally tested using <http://lod.openlinksw.com/sparql> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
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
curl http://commondatastorage.googleapis.com/freebase-public/rdf/freebase-rdf-2014-06-23-18-07.gz | zgrep "<http://www.w3.org/2000/01/rdf-schema#label>" |
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
bzcat downloads.dbpedia.org/3.9/links/*nt.bz2 | grep '<http://www.w3.org/2002/07/owl#sameAs>' | awk '{if ( match($1, "<http://dbpedia.org/")==1) {print $1 " " $2 " " $3 " ."} else {print $3 " " $2 " " $1 " ."} }' | sort | bzip2 > sorted_outbound_sameas.nt.bz2 & |
NewerOlder