I’ve had an idea kicking around in my head for a couple of days. It’s one of those things I just can’t seem to let go of, but I don’t really have time to build it right now. I’m hoping someone out there had the same idea already and written something that works sort of like what I want. Failing that, maybe someone looking for a project to start will like this idea.
Everyone else is showing theirs, so here’s mine:
$ history|awk '{a[$2]++} END{for(i in a){printf 5dt%sna[i],i}}'|sort -rn|head 162 svn 99 ls 80 rtop 69 sudo 63 cd 55 dotest 51 workon 23 make 21 close_branch 21 cl2svn Software Jigs: Does it say anything in particular about me that half of those commands are aliases or scripts I or my co-workers have created to wrap up other tools?
rtop – is a bash alias to change directory to the top of sandbox.
Last week I finally cleaned up the wrapper code I’ve been using with Ian Bicking’s virtualenv. The results are a set of bash functions imaginatively dubbed “virtualenvwrapper”.
The basic idea is that you source the script in your ~/.bashrc, and then you can use the functions it defines to manage your virtual environments, either from other scripts or from the command line.
mkvirtualenv is a thin wrapper around virtualenv itself, and creates environments in a special directory, which you can control through the WORKON_HOME variable.
It’s a bit passé to recognize blogging anniversaries, but as it’s my first I’m going to do a little retrospecting anyway. :-)
I just realized this afternoon that I had missed celebrating the first anniversary of PyMOTW by a few weeks. I started the series as an excuse to force myself to write something once a week. At the time, it seemed like a somewhat lame idea and I wasn’t sure I would keep it up.
Functional programming using iterators occasionally requires you to create small functions for simple expressions. Sometimes these can be expressed as lambda functions. But for some operations, you don’t need to define your own function at all. The operator module defines functions that correspond to built-in operations for arithmetic, and comparison as well as sequence and dictionary operations.
Read more at pymotw.com: operator
I spent a good portion of yesterday swapping the main drive out of my home server because it was giving me signs that it was starting to fail (random system halts, CRC errors, and undecipherable messages about DMA support). After much wailing and gnashing of teeth, it seems to be back online.
The serendipity of finding this Coding Horror post in my news reader this morning was surprising. I’d long ago given up on upgrades for similar reasons.
Originally published in Python Magazine Volume 2 Issue 4 , April, 2008
PyCon 2008 was held March 12-20 in Chicago. The explosive growth in attendance of the conference translated to an increase in energy and enthusiasm, from both attendees and organizers.
I haven’t made it to a Python convention for several years, not since before they changed from being called International Python Conference to the community organized PyCon, so I was excited to have a chance to go to PyCon 2008 in Chicago last month.