Run with
find . -type f -name '*.json' | xargs -n 1 python convert_json_to_msgpack.py
| import hashlib | |
| class FeistelSHA1: | |
| rounds = 4 # 4 rounds is sufficient as long as the round function is cryptographically secure | |
| split = 1 / 2 | |
| def __init__(self, key, rounds=rounds): | |
| self.subkeys = [hashlib.sha1(bytes((i,)) + key).digest() for i in range(rounds)] |
| <link rel="import" href="../cool-clock/cool-clock.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
| <link rel="import" href="../topeka-elements/category-images.html"> | |
| <link rel="import" href="../core-icon/core-icon.html"> | |
| <link rel="import" href="../core-icons/core-icons.html"> | |
| <link rel="import" href="../core-icons/av-icons.html"> | |
| <link rel="import" href="../paper-fab/paper-fab.html"> | |
| <link rel="import" href="../topeka-elements/category-icons.html"> | |
| <polymer-element name="my-element"> | |
| <template> |
Run with
find . -type f -name '*.json' | xargs -n 1 python convert_json_to_msgpack.py
| from random import choice, shuffle | |
| import string | |
| outwardcode_area_choices = ['LS', 'EN', 'BD'] | |
| outwardcode_district_choices = xrange(1,20) | |
| inwardcode_sector_choices = string.digits | |
| inwardcode_alphabet = list('ABDEFGHJLNPQRSTUWXYZ') | |
| def gen_postcode(): | |
| shuffle(inwardcode_alphabet) |
| echo '{"foo": "lorem", "bar": "ipsum"}' | python -m json.tool | |
| # or if pjson installed | |
| echo '{"json":"obj"}' | pjson |
| import unittest, sqlite3 | |
| from contextlib import closing | |
| class TestDataStrategies(unittest.TestCase): | |
| SQLCMD = """SELECT lid | |
| from person_table | |
| GROUP BY lid | |
| ORDER BY lid""" |
| from riak import RiakClient, RiakNode | |
| host, port = 'localhost', '10091' | |
| timeout = 6000000 | |
| client = RiakClient(protocol='http', hosts=host, http_port=port) | |
| if not client.ping(): | |
| print "Cannot connect to riak on {}:{}".format(host, port) | |
| exit() |
I hereby claim:
To claim this, I am signing this object: