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
| #!/usr/bin/env python3 | |
| """Run all four face detectors and produce a single overlay image per input. | |
| Each model's bounding box is drawn in a distinct colour at 50% transparency, | |
| and a legend is rendered at the bottom of the image. | |
| Output: ``{stem}_overlay{ext}`` | |
| """ | |
| import sys |
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
| #!/usr/bin/env python3 | |
| """Run four face detectors (MediaPipe, RetinaFace, SCRFD/InsightFace, YOLOv11-face) | |
| on all images in the current folder and save comparison outputs. | |
| Output naming: ``{stem}_{modelname}{ext}`` — one file per model per input. | |
| """ | |
| import sys | |
| import urllib.request | |
| from pathlib import Path |
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 os | |
| from pydub import AudioSegment | |
| from pathlib import Path | |
| import pyloudnorm as pyln | |
| import soundfile as sf | |
| import numpy as np | |
| def process_audio(input_path, target_lufs=-14, threshold_db=-0.1, overwrite=False): | |
| """ | |
| Process audio file by: |
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 requests | |
| import base64 | |
| import wave | |
| import io | |
| url = 'https://inworld.ai/api/create-speech' | |
| headers = { | |
| 'accept': '*/*', |
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
| """ | |
| A script to convert a large text file into multiple speech audio files | |
| by splitting the text into chunks and processing them sequentially. | |
| """ | |
| import argparse | |
| import datetime | |
| import re | |
| import warnings | |
| from pathlib import Path |
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 asyncio | |
| import argparse | |
| import json | |
| import sys | |
| from pathlib import Path | |
| from typing import List, Tuple, Set | |
| from bs4 import BeautifulSoup | |
| from curl_cffi.requests import AsyncSession | |
| from pathvalidate import sanitize_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
| """ | |
| # 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. | |
| """ |
NewerOlder