A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python (Updated for Python 3.7) | |
Usage: | |
./dummy-web-server.py -h | |
./dummy-web-server.py -l localhost -p 8000 | |
Send a GET request: |
Data Size: | |
Input: 2074 | |
LZ4: 758 (0.37) | |
Snappy: 676 (0.33) | |
LZF: 697 (0.34) | |
ZLIB: 510 (0.25) | |
LZ4 / Snappy: 1.121302 | |
LZ4 / LZF: 1.087518 | |
LZ4 / ZLIB: 1.486275 | |
Benchmark: 50000 calls |
Byobu Commands | |
============== | |
byobu Screen manager | |
Level 0 Commands (Quick Start) | |
------------------------------ | |
<F2> Create a new window |
(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.
The pricing should be ~3$ for the first year (assuming 30GB upload per month). See here for more details.
#!/bin/bash | |
#Modify this with your IP range | |
MY_IP_RANGE="192\.168\.1" | |
#You usually wouldn't have to modify this | |
PORT_BASE=5555 | |
#List the devices on the screen for your viewing pleasure | |
adb devices |
import pandas as pd | |
import pymysql | |
from sqlalchemy import create_engine | |
engine = create_engine("mysql+pymysql://USER:PASSWORD@HOST:PORT/DBNAME") | |
df = pd.read_sql_query("SELECT * FROM table", engine) | |
df.head() |
/* | |
* parallel_for_() example. | |
* Paints 8 stripes to different colors in a 80x80 image in parallel. | |
* @OpenCVTip on Twitter | |
**/ | |
#include <opencv2/opencv.hpp> | |
using namespace cv; |