A set is basically an array of unique items.
Ordered set.
[1, 2] != [2, 1]| #Bring in the boto library | |
| import boto | |
| #Load the configuration variables from your .boto file | |
| config = boto.config | |
| """ | |
| FAIL. | |
| """" |
| """HTML5 microdata parser for python 2.x/3.x | |
| - it requires lxml | |
| - microdata specification: http://dev.w3.org/html5/md/ | |
| """ | |
| try: from urllib.parse import urljoin | |
| except: from urlparse import urljoin | |
| import lxml.html as lhtml | |
| def items(html, types=None, uri=""): |
| # Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences. | |
| # Instructions: | |
| # Go to TextMate > Preferences... | |
| # Click Advanced | |
| # Select Folder References | |
| # Replace the following: | |
| # File Pattern |
| import org.scardf._ | |
| object Treeify { | |
| def localName(res:UriRef) = ".*[#/]".r.split(res.uri)(1) | |
| def apply(start:GraphNode) = { | |
| val graph = start.graph | |
| def treeify(subject:SubjectNode, visited:Set[SubjectNode]):Map[String,Any] = Map( |
| jQuery(document).ready(function(){ | |
| rdfstore.create(function(store) { | |
| var myLocLat = 0; | |
| var myLocLng = 0; | |
| var nearbyRadius = 0.5; // in km | |
| // extracts data from remote SPARQL endpoint | |
| var queryStr2 = 'PREFIX lgdo:<http://linkedgeodata.org/ontology/>\ | |
| CONSTRUCT {\ |
| #!/bin/bash | |
| # | |
| # This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
| # | |
| # Must be run with root privileges | |
| # Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
| # | |
| export BUILD_DIR="$PWD" |
| import zookeeper, threading, sys | |
| ZOO_OPEN_ACL_UNSAFE = {"perms":0x1f, "scheme":"world", "id" :"anyone"}; | |
| class ZKSimpleRDFStore(object): | |
| SERVER_PORT = 2181 | |
| def __init__(self): | |
| self.host = "localhost:%d" % self.SERVER_PORT | |
| self.connected = False |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |