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
""" | |
Qt >= 5.8 stops parsing stylesheet when it sees ~=, | |
button text is underlined but not italic, and doesn't change when clicked | |
PyQt < 5.8 works as expected, button text is underlined and italic, | |
and becomes large and red when clicked | |
""" | |
import sys | |
from PyQt5 import QtWidgets |
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
""" | |
launcher.py - scan running tasks and launch as needed. Useful on Windows where | |
cygwin's ps isn't informative and procps may be unavailable. | |
Terry N. Brown, [email protected], Mon Jan 30 09:20:30 2017 | |
""" | |
import sys | |
from subprocess import Popen, PIPE |
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
""" | |
makecsvt.py - make GDAL .csvt file | |
Terry Brown, [email protected], Thu Aug 04 10:04:14 2016 | |
""" | |
import csv | |
import sys | |
def get_type_text(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
# insert / update headlines as comments in @nosent R code | |
headlines = [] | |
for nd in p.self_and_subtree_iter(): | |
if nd.h and nd.h[0] == '@' or nd.b and nd.b[0] == '@': | |
continue | |
headlines.append(nd.h) | |
lines = nd.b.split('\n') |
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
""" | |
A PyQt piece of black tape to cover annoying screen features. | |
[email protected], 2019-10-03 | |
""" | |
import sys | |
try: | |
from PyQt5 import QtWidgets, QtCore, Qt | |
from PyQt5.QtCore import Qt as QtConst |
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
""" | |
pywait.py - execute arguments whenever a file changes | |
Terry N. Brown, [email protected], Mon Dec 12 10:47:49 2016 | |
""" | |
import os | |
import sys | |
import time |
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
""" | |
Using mouse events rather than just moving the cursor is important | |
""" | |
import sys | |
import time | |
import win32api | |
import win32con | |
last = -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
""" | |
Wait 2 seconds then move the active window to the top/bottom | |
of the left monitor | |
[email protected], 2016-09-21 | |
""" | |
import sys | |
import win32gui | |
import win32con |
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
""" | |
Open a big red window when a window called r".*Reminder.*" exists. | |
Because Outlook reminder windows get buried and fail to remind. | |
Thanks to http://stackoverflow.com/q/18146596/1072212 | |
[email protected], 2016-09-19 | |
""" |
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
GITUSER="$1" | |
NAME="$2" | |
if [ -e "$NAME" ]; then | |
echo "$NAME exists, quitting" | |
return 10 2> /dev/null || exit 10 | |
fi | |
git clone --depth 1 https://github.com/hakimel/reveal.js "$NAME" | |
if ! cd "$NAME"; then |