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 bash | |
#set -x # debugging | |
if [ -z "$1" ] | |
then | |
echo "please supply a repo name!" | |
exit | |
fi | |
# set the new repository name |
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 the Projects directory and the link only the first time you use the script! | |
cd ~ | |
mkdir Projects | |
ln -s Ubuntu\ One/git/ git_on_ubuntu_one | |
# create a new repo | |
repo.sh my_new_project |
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 bash | |
#set -x # debugging | |
if [ -z "$1" ] | |
then | |
echo "please supply a repo name!" | |
exit | |
fi | |
# set the new repository name |
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 | |
import sys | |
def main (): | |
print 'Hello world!' | |
if __name__ == '__main__': | |
try: |
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
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#", |
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 | |
import sys | |
from sparql import DBpediaEndpoint | |
def main (): | |
s = DBpediaEndpoint() | |
resource_uri = "http://dbpedia.org/resource/Foobar" | |
results = s.query(""" |
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 | |
import sys | |
from sparql import DBpediaEndpoint | |
def main (): | |
s = DBpediaEndpoint( { | |
"resource": "http://dbpedia.org/resource/", | |
"yago": "http://dbpedia.org/class/yago/" | |
} ) |
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 | |
import sys | |
from sparql import DBpediaEndpoint | |
def main (): | |
s = DBpediaEndpoint( { | |
"resource": "http://dbpedia.org/resource/", | |
"yago": "http://dbpedia.org/class/yago/" | |
} ) |
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 | |
import sys | |
from sparql import DBpediaEndpoint | |
def main (): | |
s = DBpediaEndpoint( { | |
"resource": "http://dbpedia.org/resource/", | |
"yago": "http://dbpedia.org/class/yago/" | |
} ) |
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 | |
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): |