Archive for the ‘python’ Category

My latest contribution to the world is Git Lint, a plug-in for git that allows you to pre-configure your linters and syntax checkers, and then run them all at once on only the things you’ve changed. About half of us still live in the command line, and I like being able to set-and-forget tools that […]

The Semantics of Python Import series has been important because the work I’m doing there supports work I’m doing elsewhere, namely modernizing the Hy import system to work with importlib, and then further shimming the import system to provide for heterogeneous source loaders. My showcase for all this has been Catalogia, a music collection management […]

28May

Making any language loadable in Python

Posted by Elf Sternberg as Lisp, python

I may have inadvertently contributed to the Coffeescriptification of Python. And in doing so, I have learned way too much about Python internals. Coffeescript probably wasn’t the first programming language that transpiled to Javascript, but it was the first that caught on. Coffeescript and all its successors, like Clojurescript, Gorilla, and Earl Grey, exist because […]

This weekend I had a project to write.  I have a huge archive of MP3s left over from the mid-90s through mid-00’s, and they’re a bit of a mess and moving them onto my iPod is always a pain in the neck because they might be inconsistently labeled or have proto-Unicode issues or whatever.  So […]

Frequently, when dealing with remote APIs, there’s a progression of states with a definitive order and an endpoint.  Often, when comparing the existing state to the proposed state, I want to make sure state is progressing in the correct direction.  The stupid simple version of this is something like: ORDER_STATES = ( (‘PROCESSING’, _(“Processing”)), (‘APPROVED’, […]

I wish I’d known this a long time ago.  Django’s request object includes a dictionary of key/value pairs passed into the request via POST or GET methods.  That dictionary, however, works in a counter-intuitive fashion.  If a URL reads http://foo.com?a=boo, then the expected content of request.GET[‘a’] would be ‘boo’, right?  And most of us who’ve […]

It drives me nuts that we in the Django community rely on Solr or Haystack to provide us with full-text search when MySQL provides a perfectly functional full-text search feature, at least at the table level and for modest projects. I understand that not every app runs on MySQL, but mine do, and I’m sure […]

13Oct

Django-Zipdistance

Posted by Elf Sternberg as Design, programming, python

Recently, I had the pleasure of attending another of those Seattle Django meet-ups.  This one was a potpourri event, just people talking about what they knew and how they knew it.   I revealed that I’d written my first aggregator, and that seemed to be an impressive statement.  Apparently Django Aggregators (database conditionals that perform sub-selected summarizing or […]

Hot on the heels of my last entry, the next utility is needed to extend the event object to automatically produce a URL compatible with Google Calendar’s “create an event” handler. Now, I could extend the Event application myself and add a get_google_url() method to the model, but let’s try to do this The Django […]

The Django Event Calendar is a fairly old and well-respected piece of code, useful for a variety of social networking and announcement-oriented applications.  It’s not the be-all of events calendars, but it does what it has to well enough.  I’ve used it on several projects. The ${BOSS} asked me to use it for announcing upcoming […]


Subscribe to Feed

Categories

Calendar

April 2017
M T W T F S S
« Jan    
 12
3456789
10111213141516
17181920212223
24252627282930