Skip to content

Instantly share code, notes, and snippets.

@ShawnHymel
ShawnHymel / quantized-inference-example.py
Last active December 9, 2023 07:47
TensorFlow Lite (TFLite) Python Inference Example with Quantization
# TFLite quantized inference example
#
# Based on:
# https://www.tensorflow.org/lite/performance/post_training_integer_quant
# https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/Tensor.QuantizationParams
import numpy as np
import tensorflow as tf
# Location of tflite model file (float32 or int8 quantized)
@krcm0209
krcm0209 / README.md
Last active July 1, 2024 16:44
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC

Setup instructions

  1. Open PowerShell
@gangefors
gangefors / Install FreeNAS SCALE on a partition and create a mirror.md
Last active July 6, 2024 01:31
How to install TrueNAS SCALE on a partition instead of the full disk

Install TrueNAS SCALE on a partition instead of the full disk

The TrueNAS installer doesn't have a way to use anything less than the full device. This is usually a waste of resources when installing to a modern NVMe which is usually several hundred of GB. TrueNAS SCALE will use only a few GB for its system files so installing to a 16GB partition would be helpful.

The easiest way to solve this is to modify the installer script before starting the installation process.

version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- ./homeassistant_data:/config
environment:
@Zatte
Zatte / Host
Last active November 6, 2023 12:32 — forked from lucndm/Host
Proxmox GPU passthrough to LXC Container
Note : Proxmox 6.1
VI : /etc/apt/sources.list
# security updates
deb http://security.debian.org jessie/updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian jessie pve-no-subscription
@Ghostbird
Ghostbird / build-ffmpeg-nvenc.sh
Last active December 22, 2023 02:05
Automatically compile and install FFMPEG with NVIDIA hardware acceleration on Debian 10+
#!/bin/bash
# Automatically compile and install FFMPEG with NVIDIA hardware acceleration on Debian
# Based on https://www.tal.org/tutorials/ffmpeg_nvidia_encode
# Verified working on Debian 10 and 11
# Abort on error
set -e
suite=stable
@jdah
jdah / .vimrc
Created June 14, 2021 11:54
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@camspiers
camspiers / snap.lua
Last active June 9, 2021 14:31
Example configuration for snap
local snap = require'snap'
local fzy = snap.get'consumer.fzy'
local limit = snap.get'consumer.limit'
local producer_file = snap.get'producer.ripgrep.file'
local producer_vimgrep = snap.get'producer.ripgrep.vimgrep'
local producer_buffer = snap.get'producer.vim.buffer'
local producer_oldfile = snap.get'producer.vim.oldfile'
local select_file = snap.get'select.file'
local select_vimgrep = snap.get'select.vimgrep'
@trungvose
trungvose / nx-structure-angular-nestjs.md
Last active June 9, 2024 12:26
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles

@joseluisq
joseluisq / resize_disk_image.md
Last active July 1, 2024 23:19
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2