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
""" | |
Kivy asyncio example app. | |
Kivy needs to run on the main thread and its graphical instructions have to be | |
called from there. But it's still possible to run an asyncio EventLoop, it | |
just has to happen on its own, separate thread. | |
Requires Python 3.5+. | |
""" |
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
# I was looking for a rate limiting library to call rate limited apis as closely | |
# as possible to their enforced limits. I looked at the first few python libraries | |
# that I found, and when I glanced at the source, they were all clearly broken. | |
# Curious how this could be, I took all the top google and pip search results for: python rate limiting | |
# and tried to get them to do the wrong thing and fail to rate limit in situations that could come up | |
# in normal use (though in some cases very specific use) | |
# https://github.com/tomasbasham/ratelimit | |
# Where broken: |
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
# | |
# This fish config sets up a working `gnome-keyring` on WSL2. | |
# I imagine it will work with WSL1 as well, perhaps after adjusting the `DISPLAY` value. | |
# | |
# Based off this bash script: https://askubuntu.com/questions/815327/running-gnome-keyring-on-wsl-windows-subsystem-for-linux | |
# Tested and working with `aws-vault` and `jetbrains-toolbox`. | |
# | |
# Be sure your x server is running!!! | |
set -x DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 |
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
# Klein Tools TI250 image tool by Scott Smitelli. Public domain. | |
# Requires at least Python 3.6 (developed and tested on 3.9) | |
# See https://www.scottsmitelli.com/articles/klein-tools-ti250-hidden-worlds | |
import argparse | |
import numpy as np | |
import re | |
import struct | |
from PIL import Image, ImageDraw |