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
#!/bin/sh | |
# | |
# sort a "du" listing by directory size | |
# usage: du | dusort | |
FILES= | |
TFORM=0 | |
while test $# -ge 1; do | |
case $1 in | |
-t) TFORM=1; ;; |
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 python3 | |
"Testing the idea of providing an off-the-shelf Tk event loop for asyncio" | |
import asyncio | |
import random | |
from tkinter import Tk, Button | |
class AsyncTk(Tk): | |
"Basic Tk with an asyncio-compatible event loop" |
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
#!/bin/sh | |
# | |
# sort a "du" listing by directory size | |
# usage: du | dusort | |
# I found this on the net decades ago. It still works. I suppose it's "thank goodness" du(1) | |
# hasn't been "modernized". | |
FILES= | |
TFORM=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
#!/usr/bin/env python3 | |
"""multi-threaded matrix multiply, demonstrating no-GIL benefits. | |
No help, crappy CLI. Run something like this: | |
python3 matmul.py NTHREADS SIZE | |
NTHREADS is (wait for it) the number of threads to spin up. |
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/python | |
"""\ | |
A command-line utility that can (re)send all messages in an mbox file | |
to a specific email address, with options for controlling the rate at | |
which they are sent, etc. | |
""" | |
# I got this script from Robin Dunn a few years ago, see | |
# https://github.com/wojdyr/fityk/wiki/MigrationToGoogleGroups |