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 time | |
import logging | |
from datetime import datetime, UTC | |
from pathlib import Path | |
import requests | |
from sqlalchemy import select | |
from sqlalchemy.orm import sessionmaker, Session | |
from my_models import Download, Status |
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
"""Combine multiple PDFs into one, optionally rotating them | |
Requires "pypdf" library, tested with v5.2.0 at time of writing | |
MIT No Attribution | |
Copyright (c) 2025 Joe Kerhin | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. |
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
"""Walk through the filesystem, store in sqlite db | |
Utility script for walking a filesystem, and storing file information in a sqlite | |
database. | |
Goals/Design Notes: | |
- [x] Pure standard library | |
- [x] Name, Path as seprate columns | |
- [x] Store the datetime that a file pth was inserted | |
- [x] Implement fulltext search of both filenames and paths |
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 | |
"""Copy Windows 10 lockscreens to a local directory | |
Uses heuristics to avoid copying other assets stored in the same directory. May be | |
imperfect, this has only been tested on two systems. | |
Big thanks to "CharlieRB" on SuperUser; without their answer I never would have figured | |
this out: https://superuser.com/a/1126475 | |
""" |
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
"""Quick wrapper around whisper.cpp to allow transcription of arbitrary media | |
Automatically create .wav file using FFMPEG, then transcribe it using the | |
(built seprately) whisper.cpp binary with most output formats. | |
""" | |
import sys | |
import subprocess | |
from pathlib import Path | |
WHISPER_DIR = Path("/home/joe/whisper.cpp") |
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
"""Simple script to silence Tyler's Chromecast | |
Documenting this for future me. This is the script I use to shut off Tyler's music | |
each weekday morning when it's time to get up and get ready. Rock simple script, single | |
line crontab. | |
Crontab: | |
45 6 * * 1-5 /home/joe/.local/share/virtualenvs/chromecast-uUcxDOyh/bin/python /home/joe/projects/chromecast/silence_tyler_speaker.py | |
Depends on the `pychromecast` library, see: |
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
"""Simple script to grab all the RocketLab mission info | |
There is plenty of room for improvement, but this works. | |
Requirements defined below using inline script metadata (formerly PEP-723), and the file | |
can be run standalone with `pipx`, `uv run`, etc. | |
""" | |
# /// script | |
# requires-python = ">=3.9" | |
# dependencies = [ |