Skip to content

Instantly share code, notes, and snippets.

View TaylorBurnham's full-sized avatar

Taylor Burnham TaylorBurnham

View GitHub Profile
@TaylorBurnham
TaylorBurnham / .env-example
Created September 6, 2023 18:54
DIY Dynamic DNS via Python + Boto + AWS Route53
AWS_ACCESS_KEY_ID=<kinda secret>
AWS_SECRET_ACCESS_KEY=<hella secret>
AWS_HOSTED_ZONE_ID=<zone id>
AWS_HOSTED_ZONE_DOMAIN_NAME=server.domain.com
AWS_HOSTED_ZONE_DOMAIN_TYPE=A
AWS_HOSTED_ZONE_DOMAIN_TTL=300
@TaylorBurnham
TaylorBurnham / convert_ogg_to_wav.sh
Created August 30, 2023 20:36
Recursively convert OGG to WAV
# Recursively converts OGG files to single channel 16kHz WAV
find . -type f -iname '*.ogg' | \
parallel -j8 --bar --eta --progress \
ffmpeg -i "{}" -ar 16000 -ac 1 -c:a pcm_s16le {.}.wav
@TaylorBurnham
TaylorBurnham / README.md
Created August 26, 2023 14:53
CodeLlama Download

This is a quick and dirty script to pull specific files from HuggingFace using Git LFS, but only pulling the file based off the quant method.

./download_hf_model.sh "TheBloke" "CodeLlama-34B-Python-GGUF" "Q5_K_M.gguf"

This will download only the file with the quant method Q5_K_M, which keeps you from downloading 150GB+ of data. If you want all of the CodeLlama GGUF models you can use this for loop.

OWNER="TheBloke"

StarNet2 + PixInsight + GPU (CUDA) Accelleration on Ubuntu 22.04

These are the steps I took to enable GPU/CUDA accelleration for StarNet on my PixInsight installation. This will include steps to install a parallel version of CUDA v11.x to support Tensorflow 2.11 and PixInsight dependencies, but I did not install a second version of libcudnn8 since the version I have was fine.

Prerequisites

  • Ubuntu 22.04.2 / 5.19.0-46-generic
  • NVIDIA GeForce RTX 2070
    • nvidia-driver-535 - 535.54.03-0ubuntu1
    • cuda-drivers - 530.30.02-1
@TaylorBurnham
TaylorBurnham / NINA_Tokens.md
Last active May 22, 2024 08:20
N.I.N.A Tokens for Astrophotography

N.I.N.A Astrophotography Tokens

I wanted a place other than the UI to reference tokens for configuring complex sequences. Please comment with any discrepancies or updates.

N.I.N.A Image Naming Tokens

Pulled from the source at nina on branch release/2.0 and commit f19a006.

Token Description
@TaylorBurnham
TaylorBurnham / Log4j Remediation.md
Created February 1, 2022 15:08
Demonstration of patching a specific file in a container, then mapping it with a hard link. This should only be done when upgrading isn't possible.
  1. Copy the file from the container.
    docker cp logstash:/usr/share/logstash/logstash-core/lib/jars/log4j-core-2.13.3.jar patched/.
    
  2. Delete the JndiLookup.class from the JAR.
    zip -d patched/log4j-core-2.13.3.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
    
  3. Update docker-compose.yml to hard link the patched file.
@TaylorBurnham
TaylorBurnham / Heart Rate to Parquet.ipynb
Created November 29, 2021 11:55
Fitbit Heart Rate data to Parquet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TaylorBurnham
TaylorBurnham / _About.md
Created August 7, 2021 01:03
Standalone Frigate configuration with Mosquitto for an Intel NUC

This was set up on an Intel NUC8i5 with a Coral TPU M2 key. If you don't have one you should get it otherwise real time object detection will be a lesson in futility.

@TaylorBurnham
TaylorBurnham / tarjoin.sh
Created May 10, 2021 12:25
Tar a directory with progress using pv and split it.
#!/bin/bash
INPUT=$1
cat "${INPUT}*.gz_*" | gzip - -d | tar xfv -