Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def viewCatalog(source="http://prefix.cc/popular/all.file.vann", query=""):
"""
extracts a list of ontology URIs from http://prefix.cc/popular/all
"""
printDebug("----------\nReading source...")
g = ontospy.Graph(source)
out = []
for x in g.ontologies:
if query:
if query in unicode(x.prefix) or query in unicode(x.uri):
out += [(unicode(x.prefix), unicode(x.uri))]
else:
out += [(unicode(x.prefix), unicode(x.uri))]
printDebug("----------\n%d results found." % len(out))
return out