Create _ext/ and _templates/ subdirectories.
Move edit_on_github.py into the _ext/ subdirectory.
Move sourcelink.html into the _templates/ subdirectory.
Add the following after the import sys, os line
| """ Snippet that demonstrates how to use Gunicorn with Uvicorn workers in code. | |
| Feel free to run: | |
| - `python main.py` - to use uvicorn. | |
| - `ENV=prod python main.py` - to use gunicorn with uvicorn workers. | |
| Reference: https://docs.gunicorn.org/en/stable/custom.html | |
| """ |
| #!/usr/bin/env python3 | |
| ''' | |
| always getting the most recent frame of a camera | |
| ================================================ | |
| Usage: | |
| ------ | |
| freshest_camera_frame.py |
| """JSONB data utilities.""" | |
| import datetime | |
| from decimal import Decimal | |
| import copy | |
| import json | |
| import iso8601 | |
| from sqlalchemy import inspect | |
| from sqlalchemy.orm.attributes import flag_modified |
| #include "fileio.h" | |
| #include <QFile> | |
| #include <QTextStream> | |
| FileIO::FileIO() | |
| { | |
| } | |
| void FileIO::save(QString text){ |
| python -m unittest test_events | |
| .F...F | |
| ====================================================================== | |
| FAIL: testDoubleRemove (sqlalchemy_mptt.tests.test_flush.FlushingTest) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "sqlalchemy_mptt/tests/test_flush.py", line 60, in testDoubleRemove | |
| self.assertEqual(self.calls, 2) | |
| AssertionError: 1 != 2 |
| # encoding:utf-8 | |
| u""" | |
| 用比较恶心的办法解决模板渲染时出现 UnicodeDecodeError 的问题 | |
| This subscriber try to convert all <str> to <unicode> | |
| functional available for Chameleon, Jinja2, and Mako | |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!