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
from parsimonious import Grammar # Get Parsimonious from https://pypi.python.org/pypi/parsimonious/. | |
# This recognizes a subset of Python's regex language, minus lookaround | |
# assertions, non-greedy quantifiers, and named and other special sorts of | |
# groups. Lucene doesn't support those, though we might be able to fake it | |
# later via some transformation. | |
regex_grammar = Grammar(r""" | |
regexp = branch another_branch* | |
branch = piece* |
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
[DXR] | |
a = 1 | |
b = 2 | |
[some_tree] | |
source_folder = PWD/code | |
object_folder = PWD/code | |
build_command = make clean; make -j $jobs | |
[another_tree] |
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
def full_traceback(callable, *args, **kwargs): | |
"""Work around the wretched exception reporting of concurrent.futures. | |
Futures generally gives no access to the traceback of the task; you get | |
only a traceback into the guts of futures, plus the description line of | |
the task's traceback. We jam the full traceback of any exception that | |
occurs into the message of the exception: disgusting but informative. | |
""" | |
try: |
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 think the reason open-source projects aren't great at churning out products | |
(or "finishing" them, as you so astutely word it—in the sense of "polishing") | |
is that the things that are interesting to work on are orthogonal to the | |
things that make a good product. | |
The advantage a hierarchal organization brings to product creation is focus. | |
It's what I enjoy about Apple: sometimes their products aren't for me, but | |
they're always *coherent*. I can see what they were going for. The Apple suite | |
of apps are clearly the best browser, calendar, and mailer for Steve Jobs. |
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
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=376668">No password autofill in evidence</a> when >1 account (hung up in cosmetics bikeshedding since 2007) <b>UI</b></p> | |
<p>Text-editing keystrokes: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=420669">command-delete</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=426246">and that again</a> since 2008, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=571913">option-arrowkey</a> since 2010 (3.6), <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=27771">Page Down</a> (since 2000) <b>UI</b></p> | |
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=306730">"Software security device" dialog</a> (hung up on corner case objections since 2005) <b>UI</b></p> | |
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=78414">Plugins eat application keyboard shortcuts</a> (173 dupes! since 2001) Can't close windows when Flash focused. (This one is just complicated.) <b>Tech</b></p> | |
<p>Flash (general UE: keyboard capturing (can't clo |
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
Of rooms in which there were ever 2 people simultaneously, here are the | |
furthest states reached by the link-clicker. | |
We'll have state info for the built-in client starting in v40. "Further" | |
states are toward the bottom of the histograms. Histograms are out of scale | |
with each other. | |
2015-05-01: |
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
if is_yak then | |
shave yak | |
bathe yak | |
else | |
do productive_work | |
--> (if is_yak then | |
((shave yak) | |
(bathe yak)) | |
else |
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
"""BBEdit UNIX filter that wraps one or more optionally-indented, commented | |
lines to 79 chars, preserving indentation. | |
Just select all the lines (in their entirety) the comment spans, and invoke. | |
Works with #, --, and //-style comments. | |
For example, this... :: | |
# Upping this to 10000 makes it 3x faster. 10000 takes 15.936s. 5000 takes 16.303s. |
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 is how I include a dumbed-down copy of the ordinarily Sphinxified version history in my PyPI README.rst in django-tidings.""" | |
re.sub(r':[a-zA-Z]+:`[0-9a-zA-Z~_\.]+\.([^`]+)`', | |
r'``\1``', | |
open('docs/changes.rst').read()) |
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
- [ ] Rising standards of repeatability: | |
- [ ] pip freeze | |
- [ ] This gives you the basics, defending you against buggy or | |
incompatible upstream updates. | |
- [ ] Be sure to include dependencies! Install with --no-deps | |
and run your test suite to make sure it works. | |
- [ ] hashes | |
- [ ] This defends you against package replacement (which PyPI | |
doesn't allow anymore but other indexes might), indexes | |
getting hacked, and MITM attacks. (HTTPS also contributes |
OlderNewer