This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# this is a simple script that allows you to use yt-dlp to get an audio file | |
# and recode it (if necessary) to fit within target size limitations. | |
import sys | |
import os | |
import subprocess | |
# ---------------------- | |
# CONFIG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# ffmpeg_encodetotarget_mp3_strict: Encode input to MP3, never exceed the specified target MB. | |
# Uses a binary search on bitrate to get as close as possible to the limit without going over. | |
# | |
# Usage: ffmpeg_encodetotarget_mp3_strict <inputfile> <target_MB> [<max_iterations>] | |
# | |
# Example: | |
# ffmpeg_encodetotarget_mp3_strict myaudio.wav 5 | |
# => tries to produce an MP3 no bigger than 5 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# finnish_word_letter_counter.py | |
""" | |
A training set generator to assist a Finnish GPT-2 model in counting letters in a given word, | |
including reasoning steps. The script generates data in a specific format suitable for training | |
the model to perform letter counting tasks with explanations. | |
(c) FlyingFathead 2024 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#> Created by FlyingFathead, Oct. 14th, 2024 | |
#> https://github.com/FlyingFathead/ | |
# | |
# Here's an extremely simple example of a reverse tunnel proxy for serving | |
# i.e. a local Flask over a remote VPS running nginx with htpasswd auth. | |
# | |
# .htpasswd with nginx requires 'apache2-utils'. | |
# Install it with: `sudo apt-get install apache2-utils` | |
# (on Debian/Ubuntu tree Linux systems) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script Name: manage_docker_services.sh | |
# Description: Enables or disables Docker-related services on Ubuntu 24.04 LTS. | |
# Usage: | |
# - To disable Docker services: | |
# sudo ./manage_docker_services.sh --disable | |
# - To enable Docker services: | |
# sudo ./manage_docker_services.sh --enable | |
# - To be prompted for action: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Disable and Mask CUPS & Avahi Services | |
# | |
# ~~~ Overview ~~~ | |
# | |
# This script is designed to disable and mask specific CUPS (Common Unix Printing System) | |
# and Avahi services and sockets on your Debian/Ubuntu tree Linux systems. | |
# | |
# It reduces possible attack vectors and mitigates several security vulnerabilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ffmpeg_dump-a-video-dvd.sh | |
# === INFO === | |
# This is just a simple processing script that does the following: | |
# | |
# 1) Takes in all the ISO files in the directory; intended for video-DVD's. | |
# 2) Extracts the contents (according to the minimum duration; change the variable below). | |
# 3) Re-encodes the contents with HEVC/H.265, deinterlaces the video, and creates an output directory for each disc. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to print usage | |
usage() { | |
echo "Usage: $0 [-c <checksum file>] <tarball>" | |
echo " -c <checksum file> : Optional, specify the checksum file to verify the tarball against" | |
exit 1 | |
} | |
# Check if no arguments were provided |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# word_letter_counter_for_llm_datasets.py | |
""" | |
A training set generator to assist an LLM in actually being able to count | |
the letters in a given word. A model that can't count letters in a word isn't | |
usable for critical tasks; incorrect letter counts lead to compounding mistakes. | |
Outputs in JSON, can also use the NLTK corpus for a word dictionary, offering | |
a quick way to create a massive letter counting dataset for different words. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is designed to identify and list all USB cameras and audio devices connected to a system. | |
# It provides detailed information about each device, including vendor ID, product ID, serial number, | |
# device description, and supported video modes for cameras. It also identifies audio devices and | |
# lists their card and device numbers, names, and descriptions. | |
# Required Packages: | |
# - udevadm: Provides information about device attributes. | |
# - v4l2-ctl: A utility to control video4linux devices and list video formats. |
NewerOlder