This has moved to https://github.com/tbnorth/defaultdotdict
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
| ls *.png | cat -n | sed 's/\(.*[0-9]\)\t\(.*\)/echo mv \2 $(printf %010d \1).png/' | bash |
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
| #!/bin/sh | |
| # capture stdin and show in separate window (virtual temporary paper) | |
| # "git bash" version | |
| cat >/tmp/$$.v.tmp | |
| mintty --exec less /tmp/$$.v.tmp & |
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
| """ | |
| cross_factor.py - describe | |
| Terry N. Brown, [email protected], Mon Apr 03 13:28:41 2017 | |
| """ | |
| from collections import namedtuple | |
| def cross_factor(lists): | |
| """Return (as namedtuples) all combinations of elements from dict of lists""" |
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
| """ | |
| signal_manager.py - SignalManager - light weight signal management | |
| Extremely light weight. No enforcement of signal arguments, or | |
| even explicit listing of which signals exist. | |
| Terry Brown, [email protected], Thu Mar 23 21:13:38 2017 | |
| """ | |
| from collections import defaultdict |
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
| """ | |
| 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 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
| """ | |
| 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 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
| """ | |
| 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 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
| # 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 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
| """ | |
| 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 |