This gist uses the idf-release/v4.2 release of arduino-esp32, can be found here: https://github.com/espressif/arduino-esp32/tree/idf-release/v4.2
import qrcode | |
def createQr(vwz,iban,bic,recipient,amount,filename="epc_qr"): | |
# The docs can be found here: https://pypi.org/project/qrcode/ | |
qr = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_M) | |
qr.add_data("BCD\n") | |
qr.add_data("002\n") | |
qr.add_data("1\n") | |
qr.add_data("SCT\n") |
""" | |
Converts LabelMe annotations to annotations compatible with YOLO. | |
The script does the following: | |
- cleans (!) the output directory and prepare it for training, | |
- splits the dataset on validation and training, | |
- converts all LabelMe annoations (*.json) to YOLO annoations (*.txt) and | |
- creates YOLO metadata (`.data`, `.names`, `train.txt` and `valid.txt`) | |
""" | |
import os |
import tensorflow as tf | |
def get_frozen_graph(graph_file): | |
"""Read Frozen Graph file from disk.""" | |
with tf.gfile.FastGFile(graph_file, "rb") as f: | |
graph_def = tf.GraphDef() | |
graph_def.ParseFromString(f.read()) | |
return graph_def | |
# The TensorRT inference graph file downloaded from Colab or your local machine. |
When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.
Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.
Apparently this guide no longer works with recent unifi controller versions (starting nov/dec 2022). Since I no longer use unifi hardware in my home system, I can not update the guide myself. In case you've gotten here to recover your data, you're likely doomed. But giving it a try won't hurt anyway, therefore: good luck.
This is tested with Traefik 1.7
This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals
https://example.com
->https://example.com/abc/xyz/
https://example.com/
->https://example.com/abc/xyz/
https://example.com/something
-> no redirect
#include "esphome.h" | |
#include "math.h" | |
using namespace esphome; | |
#define I2C_ADDR_D6T 0x0a | |
#define CMD 0x4c | |
static const int SOBEL_X[3][3] = | |
{ { -1, 0, 1 }, |
""" | |
When run in cron, automatically adds compliant alias names to local DNS. | |
Use at your own risk. | |
Patrick Fuller, 25 June 17 | |
""" | |
import re | |
import paramiko | |
import pymongo |