git init
or
| import asyncio | |
| from functools import wraps | |
| def serializable(f): | |
| @wraps(f) | |
| def wrapper(*args, asynchronous=False, **kwargs): | |
| if asynchronous: | |
| return f(*args, **kwargs) | |
| else: |
| ############################################################################### | |
| # | |
| # iomon.py - a simple server io monitor for Linux, in Python, by Paul Reiber | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, |
| """ | |
| The most simple DNS client written for Python with asyncio: | |
| * Only A record is support (no CNAME, no AAAA, no MX, etc.) | |
| * Almost no error handling | |
| * Doesn't support fragmented UDP packets (is it possible?) | |
| """ | |
| import asyncio | |
| import logging |
| ################################################################################ | |
| # | |
| # pyld - a python-based derivative of logdissector.awk | |
| # | |
| # Author: Paul Reiber paul@reiber.org | |
| # License: CC BY-SA 4.0 | |
| # | |
| # pyld generates derivative data about its input data | |
| # which is often quite useful and revealing. | |
| # |
| import sys | |
| import termios | |
| import time | |
| import tty | |
| def out(s): | |
| sys.stdout.write(s) | |
| sys.stdout.flush() | |
| def put(x, y, s): |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.