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
| import argparse | |
| import gzip | |
| import json | |
| import lzma | |
| import sys | |
| import timeit | |
| import brotli | |
| import cbor2 | |
| import lz4.block |
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
| import uuid | |
| def gen_uuid(length=32): | |
| u = uuid.uuid4() | |
| return u.hex[:length] | |
| # >>> gen_uuid() | |
| # '582d1f35d75c4536a26235231fa8ec90' |
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
| {% macro render_alert(category=None, dismissable=False, error=False, | |
| message=None, link=None) -%} | |
| {% if not category and not error %} | |
| {% set category = 'success' %} | |
| {% elif error %} | |
| {% set category = 'danger' %} | |
| {% endif %} | |
| <div class="alert alert-{{ category }} | |
| {% if dismissable %} alert-dismissable{% endif %}"> | |
| {% if dismissable %} |