Demonstrated in Python.
>>> import xmlrpclib
>>> from pprint import pprint
Connect to Sklik API:
| #!/usr/bin/env python | |
| from StringIO import StringIO | |
| import unittest | |
| import sys | |
| sys.setrecursionlimit(4000) | |
| def resolve(ciphertext, allWords): |
| #!/usr/bin/env python | |
| import optparse | |
| from PIL import Image | |
| def main(): | |
| op = optparse.OptionParser() | |
| options, args = op.parse_args() |
| def connect(*args): | |
| maps = list() | |
| for collection, keyGetter in args: | |
| m = dict() | |
| for item in collection: | |
| key = keyGetter(item) | |
| m[key] = item | |
| maps.append(m) |
| #!/usr/bin/env python | |
| """ | |
| Command-line tool for creating Statistical report from Report template | |
| using Sklik.cz API. | |
| Sklik.cz API documentation: http://api.sklik.cz/ | |
| Contact: http://bit.ly/sklik-contact-form | |
| """ |
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| import json | |
| import oauth2 # https://raw.github.com/brosner/python-oauth2/master/oauth2/__init__.py | |
| from pprint import pprint | |
| import urllib2 | |
| stream_url = "https://stream.twitter.com/1/statuses/filter.json" |
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| from contextlib import contextmanager | |
| import ssl | |
| @contextmanager | |
| def inject_ssl_version(version=ssl.PROTOCOL_TLSv1): | |
| """ |
| $ cat Demo.java | |
| class Demo { | |
| public static void main(String args[]) { | |
| System.out.println("Aa".hashCode()); | |
| System.out.println("BB".hashCode()); | |
| } | |
| } | |
| $ javac Demo.java | |
| $ java Demo |
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| tabulka = """ | |
| 000002 | |
| 011011 | |
| 101100 | |
| 110111 | |
| 011120 | |
| 100022 |
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| fin = ("2",) | |
| dvojice = """ | |
| 0 1 | |
| 1 2 | |
| 1 3 | |
| 3 4 |