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
"""Startup files for my IPython Taskwarrior profile. | |
File is located in ~/.ipython/profile_task/startup | |
Script is run when running `ipython --profile task` | |
""" | |
import platform | |
from tasklib import TaskWarrior | |
from tasklib import Task |
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 pip-run | |
"""Takes a PNG file, adds a white background to it, and copies it to the | |
clipboard. | |
Uses `pip-run` to run the script with the required packages installed. | |
This script is licensed under the MIT License. | |
Copyright © 2024 Kyle L. Davis | |
""" | |
__requires__ = ["Pillow", "pywin32"] |
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
[package] | |
name = "set-web-clipboard" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
# JavaScript in Rust | |
wasm-bindgen = "0.2" # May not be needed | |
web-sys = { version = "0.3", features = ["Clipboard"] } |
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
""" Helpers for working with docx files. | |
Currently includes a couple functions for adding additional permissions to | |
protect contents of the document. | |
""" | |
import string | |
import random | |
import lxml.etree | |
from docx.oxml.settings import CT_Settings |
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
""" Pull Git repos and check the status of them using Python's async. | |
Simple test using async subprocess calls and async itself. | |
Some simple tests showed this took a 3rd the time of the synchronous | |
counterpart. | |
""" | |
import asyncio | |
import time | |
from pathlib import Path |
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
""" Opens URLs in the default browser. | |
I use this a lot when I need to open a whole lot of URLs at the same time. | |
1. Takes in a hard-coded set of `items`. | |
2. Generates a safe URL from `item`. | |
3. Passes each item to `get_url` to get the URL to open. | |
4. Opens each URL with built-in `webbrowser` package, delayed by `delay`. | |
Inputs |