This file contains hidden or 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
""" | |
Name Matching Algorithm with Nickname and Typo Tolerance | |
# Basic usage with default thresholds: | |
python3 nametest.py sample_names.txt | |
# With custom thresholds: | |
python3 nametest.py sample_names.txt --first-threshold 80 --last-threshold 90 --last-distance 2 --first-distance 1 | |
# With custom output file: | |
python3 nametest.py sample_names.txt --output-file my_matches.csv |
This file contains hidden or 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
""" | |
# Panorama Strip Combiner | |
A Python utility that combines vertical image strips into a seamless panorama with smooth blending between overlapping regions. | |
## What It Does | |
This script takes a directory of vertical image strips and combines them into a single panoramic image. It features: | |
- Automatic ordering of strips based on filename |
This file contains hidden or 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 processes a sequence of TIF images by cropping each image to a vertical strip from the center. Here's a breakdown: | |
# 1. It takes images from an input directory ("frames-try1") and saves the cropped versions to an output directory ("frames-03-trial"). | |
# 2. The script extracts a vertical strip with a width of 105 pixels, centered in each image. | |
# 3. It uses ffprobe to determine the dimensions of the first image, calculates the center, and then uses ffmpeg to crop all images in the sequence. | |
# If you want to use this script, you might need to edit: | |
# - `INPUT_DIR` and `OUTPUT_DIR` paths to match your folder names |
This file contains hidden or 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
/** | |
* Determines if a DOM element is visible to the user | |
* | |
* Checks multiple CSS properties that can hide elements: | |
* - display: none | |
* - visibility: hidden | |
* - opacity: 0 | |
* - zero dimensions (width and height) | |
* - parent visibility (propagated via data attribute) | |
* |
This file contains hidden or 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
""" | |
This tool normalizes the loudness of MP3 audio files to a consistent level. Here's how to use it: | |
Run the script with a directory path: python script.py /path/to/mp3s | |
By default, it sets audio to -14 LUFS (loudness units) and prevents clipping at -0.1dB | |
It creates new files prefixed with "processed_" unless you use --overwrite | |
You can customize the target loudness with --target-lufs and peak limit with --threshold-db | |
The tool analyzes each MP3 file, adjusts its volume to the target loudness, applies a limiter to prevent distortion, and saves the processed version. | |
""" |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TTS Voice Comparison</title> | |
<style> | |
body { | |
margin: 0; | |
padding: 20px; | |
padding-bottom: 120px; | |
} |
This file contains hidden or 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
<?php | |
/* | |
Note that the cleaner sends the html to DirtyMarkup for formatting. | |
Example input: | |
<div class=WordSection1> | |
<p class=MsoNormal align=center style='text-align:center'><span | |
style='font-size:16.0pt;line-height:107%;font-family:"Abadi Extra Light",sans-serif'>Test | |
Clean<o:p></o:p></span></p> |
This file contains hidden or 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
import json | |
import mimetypes | |
import subprocess | |
import sys | |
# Codec Reader for HTML Video Tags by Steve-Tech | |
# Usage: python3 codec-reader.py [-d] file_name | |
# Requires ffmpeg and ffprobe to be installed. | |
# | |
# Supported Codecs: |
This file contains hidden or 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
import xml.etree.ElementTree as ET | |
# Parse the XML file and get the root | |
tree = ET.parse('wordpress_export.xml') | |
root = tree.getroot() | |
# Find the <channel> element | |
channel = root.find('channel') | |
total = 0 |
This file contains hidden or 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
from datetime import datetime | |
from skyfield.api import load | |
from skyfield.framelib import ecliptic_frame | |
from tzfpy import get_tz | |
import pytz | |
def human_moon(lat, lon): | |
ts = load.timescale() | |
# Get the current time in the specified timezone |
NewerOlder