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 | |
| # coding: utf-8 | |
| from __future__ import print_function | |
| import random | |
| import string | |
| import lxml.etree | |
| import requests |
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
| # coding: utf-8 | |
| # text written by Chris McDowall | |
| # from: http://sciblogs.co.nz/seeing-data/2010/10/12/the-zen-of-open-data/ | |
| # and: http://fogonwater.com/blog/2013/06/the-zen-of-open-data/ | |
| print('''The Zen of Open Data, by Chris McDowall | |
| Open is better than closed. | |
| Transparent is better than opaque. |
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
| # coding: utf-8 | |
| # Install `rows` executing: | |
| # pip install -U git+https://github.com/turicas/rows.git@develop | |
| import locale | |
| import requests | |
| import rows |
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 | |
| # coding: utf-8 | |
| import random | |
| import sys | |
| import time | |
| import uuid | |
| generate_uuid = lambda: uuid.uuid4().hex |
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
| # coding: utf-8 | |
| import struct | |
| import time | |
| from binascii import crc32 | |
| # data file | |
| TIMESTAMP_FIELD = 32 |
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 unicodedata import normalize | |
| SLUG_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_' | |
| def slug(text, encoding=None, separator='_', permitted_chars=SLUG_CHARS, | |
| replace_with_separator=' -_'): | |
| if isinstance(text, str): | |
| text = text.decode(encoding or 'ascii') | |
| clean_text = text.strip() |
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
| #!/bin/bash | |
| RAMDIR=/mnt/ramfs | |
| DATADIR=$RAMDIR/pgsql-data | |
| PGCONF=/etc/postgresql/9.3/main/postgresql.conf | |
| RAMDISKSIZE=128M | |
| if [ $(id -u) -ne 0 ]; then | |
| echo 'ERROR: must be run as root' | |
| exit 1 |
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
| #!/bin/bash | |
| # Download dex2jar: | |
| #URL=https://github.com/pxb1988/dex2jar/releases/download/2.0/dex-tools-2.0.zip | |
| #wget $URL -O /tmp/dex-tools.zip | |
| #cd /tmp | |
| #unzip dex-tools.zip | |
| #cd dex2jar-2.0 | |
| #chmod +x *.sh |
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
| #!/bin/bash | |
| # TODO: add services automatically | |
| # Configurations | |
| TSURU_HOST=tsuru.turicas.info | |
| ADMIN_EMAIL=admin@example.com | |
| ADMIN_PASSWORD=admin123 | |
| MY_EMAIL=my-user-email@example.com |
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
| # coding: utf-8 | |
| # pip install requests rows | |
| import datetime | |
| import re | |
| from collections import OrderedDict | |
| from io import BytesIO | |
| import requests |
OlderNewer