"Believe" is a bit of a strong word here. Beliefs are deep things that are resistant to change. These are more like assumptions or wishes …
Does this return all the data?
The answer appears to be "not always".
I can't seem to get a definitive answer here, nor a reproducible demonstration of it failing.
Does anybody know for …
Some notes on my emacs setup. Maybe this should go in README for my dotemacs.
There is python-mode.el, and python.el. I have settled on python-mode from the elpa repositories.
I tried ropemacs, and really like it when it works. For simple refactorings it can …
So it turns out there are some painful edges if you start trying to do SQLAlchemy declarative ORM classes in an existing Django app. (For example, if you're gradually replacing the Django ORM in your code with Sqlalchemy ORM). It boils down to:
The django testrunner (or django-nose) changes the …
TL;DR graphite graphs look wrong when viewing a time period larger than a few hours.
hitcountis the cure.
It turns out counters are bucketed as hits per time slice, not as permanently incrementing numbers.
http://code.hootsuite.com/accurate-counting-with-graphite-and-statsd/ helps a lot to explain how this works. For …Tagged as : programming
Here's a typical loop that checks for some condition and breaks the first time it passes:
def list_contains_urls(maybe_urls): for url in maybe_urls: if url.startswith('http'): return True return False
Can we do that more concisely? Sure.
def list_contains_urls(maybe_urls): return any(u for u in maybe_urls if u …