Skip to content

Instantly share code, notes, and snippets.

@ozett
ozett / qr.py
Created April 9, 2022 11:05 — forked from jamct/qr.py
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")
@brgaulin
brgaulin / Readme.md
Last active April 19, 2024 10:03
ESP32-S2 Keyboard on Arduino
@kerikun11
kerikun11 / k210_mnist.ipynb
Created September 27, 2020 06:38
k210_mnist.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukicdarkoo
lukicdarkoo / labelme2yolo.py
Created August 15, 2020 20:18
LabelMe to YOLO
"""
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
@ozett
ozett / get_frozen_graph.py
Created June 26, 2020 06:32 — forked from Tony607/get_frozen_graph.py
How to run TensorFlow Object Detection model on Jetson Nano | DLology
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.
@AmazingTurtle
AmazingTurtle / how-to-restore.md
Last active November 17, 2024 13:47
restore access to unifi controller

Restore access to a unifi controller

When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.

Warning

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.

@raulqf
raulqf / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Last active November 17, 2024 07:41
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@kekru
kekru / traefik-redirect-path.md
Last active October 16, 2024 09:52
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

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
@mKeRix
mKeRix / d6t_44l_06.h
Last active March 12, 2023 09:34
ESPHome D6T Custom Component
#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 },
@patrickfuller
patrickfuller / alias_dns.py
Last active August 4, 2024 05:00
Enables local DNS resolution of Unifi aliases
"""
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