Skip to content

Instantly share code, notes, and snippets.

@colwilson
colwilson / repo.sh
Created January 17, 2012 22:18
Create Git origin on Ubuntu One
#!/usr/bin/env bash
#set -x # debugging
if [ -z "$1" ]
then
echo "please supply a repo name!"
exit
fi
# set the new repository name
#!/usr/bin/env bash
#set -x # debugging
if [ -z "$1" ]
then
echo "please supply a repo name!"
exit
fi
# set the new repository name
#!/usr/bin/env python
import sys
def main ():
print 'Hello world!'
if __name__ == '__main__':
try:
from SPARQLWrapper import SPARQLWrapper, JSON
class SparqlEndpoint(object):
def __init__(self, endpoint, prefixes={}):
self.sparql = SPARQLWrapper(endpoint)
self.prefixes = {
"dbpedia-owl": "http://dbpedia.org/ontology/",
"owl": "http://www.w3.org/2002/07/owl#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
#!/usr/bin/env python
import sys
from sparql import DBpediaEndpoint
def main ():
s = DBpediaEndpoint()
resource_uri = "http://dbpedia.org/resource/Foobar"
results = s.query("""
#!/usr/bin/env python
import sys
from sparql import DBpediaEndpoint
def main ():
s = DBpediaEndpoint( {
"resource": "http://dbpedia.org/resource/",
"yago": "http://dbpedia.org/class/yago/"
} )
#!/usr/bin/env python
import sys
from sparql import DBpediaEndpoint
def main ():
s = DBpediaEndpoint( {
"resource": "http://dbpedia.org/resource/",
"yago": "http://dbpedia.org/class/yago/"
} )
#!/usr/bin/env python
import sys
from sparql import DBpediaEndpoint
def main ():
s = DBpediaEndpoint( {
"resource": "http://dbpedia.org/resource/",
"yago": "http://dbpedia.org/class/yago/"
} )
#!/usr/bin/env python
import string
import re
from collections import defaultdict, Counter
from random import choice, randrange, randint
import textwrap
class Gibberish(object):
def __init__(self, text, n=4):