Annotated History of My Most Used Shell Commands
Wednesday, April 10, 2013 (permalink)
An oldie, but a goodie. This time I annotate it with reasons as to why things are used so much. If you blog, post your own!
For reference, anything after a "#" is an annotation.
$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn |head ...
Read more ...
Fixing Python's String class
Monday, April 01, 2013 (permalink)
Ever wonder why Python's str or unicode types lack obvious length methods? Yes, we can get the length via the special __len__() method, but instead as Python developers we get the so-called 'luxury' of discovering length via the Python's built-in len() function. So instead of calling the length ...
Read more ...Beginner's Guide to PyCon 2013 Part III
Sunday, March 10, 2013 (permalink)
This is Part III in a series of blog posts about PyCon US 2013. The goal is to provide a handy reference guide for first time attendees of the world's largest Python conference. Part I was mostly about tutorials, Part II was mostly about the first day of talks ...
Read more ...PyCon Tutorial: Wiring Up Django Packages
Friday, March 08, 2013 (permalink)
You just finished the Django tutorial. What now?
You learn how to Wire Up Django Packages!
This is a 3+ hour PyCon tutorial on March 14th at 1:20pm, in Santa Clara California at PyCon US.
In alphabetical order, the instructors:
- Audrey Roy
- Daniel Greenfeld (myself)
- Kenneth Love
Tutorial Description ...
Beginner's Guide to PyCon 2013 Part II
Wednesday, January 23, 2013 (permalink)
This is Part II in a series of blog posts about PyCon US 2013. The goal is to provide a handy reference guide for first time attendees of the world's largest Python conference. Part I was mostly about tutorials, this post will be about registration and the first day ...
Read more ...Beginner's Guide to PyCon 2013 Part I
Tuesday, January 22, 2013 (permalink)
New to Python and thinking about going to the upcoming PyCon US for the first time? You know, that big Python conference taking place near San Francisco in March?
Or perhaps you signed up already and are getting worried about being overwhelmed by hundreds of tutorials, talks, and activities?
No ...
Read more ...New Year's Python Meme 2012
Friday, December 28, 2012 (permalink)
Tarek Ziade has a habit of ending the year with a Python-themed meme. I've matched his meme the times he previousstarted it, and as you can tell from the title of this blog post I'm matching him yet again.
1. What’s the coolest Python application, framework or ...
Los Angeles Open Source Sprint on Nov 4th!
Sunday, October 14, 2012 (permalink)
Yet again, myself, Audrey Roy, and a small but elite cadre of volunteers are feverishly at work putting together another Los Angeles open source event. Our last effort went smashingly well, and like any good engineer, we're ready to scale up - this time to 150 attendees!
LA Open Source ...
Read more ...We need more PyCon US 2013 submissions!
Thursday, September 27, 2012 (permalink)
The PyCon US 2013 call for papers (CFP) ends tomorrow, September 28th, 2012. We need more talk and tutorial submissions. Talks are 30 or 45 minute efforts in front of the PyCon audience and are recorded for posterity. Tutorials are three hours long and are given to attendees who have ...
Read more ...Installing Pycairo on Mountain Lion
Tuesday, September 04, 2012 (permalink)
Pycairo is the binding for the cairo graphics library. It's also not something you can get running with a simple pip install py2cairo. After many hours of working the search engines and dancing to the configure/make/make install melody, I figured out an answer that worked for me ...
Read more ...Thoughts on my stack
Tuesday, September 04, 2012 (permalink)
I'm an open source developer. I use Python, Django, PostgreSQL, JQuery, MongoDB, Memcached, and Redis. I push production code to Linux servers.
And yet:
- My laptop runs Apple's Mac OS X.
- My primary editor is Sublime Text.
- My production servers are provided mostly by Heroku.
- All my sites ...
Python dictionary as a class
Saturday, September 01, 2012 (permalink)
A long time ago, circa 1999, when I was working in a certain procedural language I found a library that added objects to the language. It did so by playing interesting tricks with key/value structures, which in Python are called dictionaries. In 2005, as a new Python user, I ...
Read more ...A Public Service Message to the Python Community
Monday, August 20, 2012 (permalink)
Hi, I'm Daniel Greenfeld. You might know me from my blog. I'm here to talk to you about a very import subject: Submitting your talk early to PyCon US.
Last year there were hundreds of talks were submitted for just a very few speaking slots. Unpaid volunteers labored ...
Read more ...PyCon 2013 Talks/Tutorials I want to see
Monday, August 20, 2012 (permalink)
This morning, Jesse Noller, the chair of PyCon US, suggested a meme, "PyCon 2013 talks/tutorials I'd like to see". Here is my meme submission:
1. Python Obfuscation Contest
This certain-to-be-controversial talk idea would be where the speaker would solicit Pythonistas to submit a single arcane Python code module ...
Python dictionary vs JavaScript object: Dynamic Keys
Sunday, August 19, 2012 (permalink)
One of the things I noticed a long time ago with JavaScript is that when you create objects you can define keys outside of strings:
> var o = {city: "San Francisco"}
Object
In JavaScript, this is valid. In Python, you'll get a NameError:
>>> o = {city: "San Francisco"}
Traceback (most recent ...Attaching custom exceptions to functions and classes
Thursday, August 02, 2012 (permalink)
Having too many custom exceptions on a project can be a pain, but a few choices ones are really nice. The problem is that in complex libraries having to import both functions and exceptions becomes a drag. To mitigate having to remember to import custom exceptions, this is a handy ...
Read more ...July 15th, 2012 LA Open Source Recap
Monday, July 16, 2012 (permalink)
On July 15th, 2012, at the July LA Hackathons Open Source event, over 60 Python, Django, Ruby, Ruby on Rails, PHP, JavaScript, Node.js, Perl, and Clojure developers arrived to work on a variety of projects. We went from 10 AM to 10 PM, and there was much coding and ...
Read more ...Simple HTTP Basic Auth Wall
Monday, July 09, 2012 (permalink)
I have a client who wanted their entire unlaunched public content site quickly but temporarily blocked for a short period of time. He wanted a universal password so he could send the site to reviewers, done quickly, and nothing else. In a few days the site will launch, and even ...
Read more ...PyCon Philippines 2012 Day 2
Thursday, July 05, 2012 (permalink)
The second day of PyCon Philippines 2012 had a really good turnout. My unofficial estimate is that we had about 90% of the attendees from the first day attend (with the unfortunate exception of most of the faculty and students of Agoo Computer College).
The day started with...
Lightning Talks ...
PyCon Philippines 2012 Day 1
Tuesday, July 03, 2012 (permalink)
PyCon Philippines 2012 (PyCon PH) happened just this past weekend at the University of the Philippines Diliman (UP Diliman) campus in Quezon City, which is part of Metro Manila.
I can assure you that PyCon PH was an wonderful, amazing, humbling experience. I'm hoping that this post and others ...
Read more ...Announcing PyCon Philippines!
Saturday, June 09, 2012 (permalink)
PyCon Philippines 2012, set to occur on June 30 and July 1, is the first Python programming conference held in the Philippines. PyCon is a volunteer run effort that brings together Python developers from a variety of backgrounds and skill levels into a friendly, cooperative environment in order to educate ...
Read more ...May 12th, 2012 LA Open Source Recap
Monday, May 21, 2012 (permalink)
On May 12th, 2012, over 50 Python, C++, Ruby, PHP, JavaScript, and Node.js developers arrived to code on a variety of projects. It was awesome! Tons of open source projects saw contributions, and people across languages and frameworks worked together.
Event Background
Less then two weeks before May 12 ...
CSS Hacking to make my code samples legible
Friday, May 11, 2012 (permalink)
I've been very happy with Pelican as a blog engine so far, and haven't even moved off the sample theme. There's just been one problem: Myself and others have had a lot of trouble reading the code snippets.
I didn't have time to cook up a ...
Read more ...Los Angeles Open Source Sprint on May 12th!
Tuesday, May 01, 2012 (permalink)
This is a day long coding event in Los Angeles for Open Source developers of all languages and skill levels to come and code like fiends. They'll be joined by dozens of either really smart coders or nice people like me. Sponsors are providing food, drinks, venue, and more ...
Read more ...Calendar About Nothing
Wednesday, March 28, 2012 (permalink)
On October 16th, 2011, which was one hundred and sixty-four days before I published this post, I resolved to get myself onto the Longest Streak list of Calendar About Nothing. Today, with this blog post, I've managed to do just that - get on the Longest Streaks.
Calendar About Nothing ...
Read more ...Launching our API at PyCon 2012
Friday, March 09, 2012 (permalink)
A few months ago me and my fiancee, Audrey Roy, launched our start up, Consumer Notebook. It's a Python powered product comparison site that combines the best features of Open Comparison, Yelp, Consumer Reports, and Pinterest. We've worked day and night to make it better, with countless members ...
Read more ...The sorry state of Python OAuth providers
Monday, March 05, 2012 (permalink)
This is one of those challenging posts to write. The people whose projects I'm going to describe have put in a lot of dedicated, hard work to overcome a challenging subject. Writing an OAuth consumer is a hard problem and writing an OAuth provider is an even harder problem ...
Read more ...You should Heroku
Tuesday, February 28, 2012 (permalink)
In mid-November me and my fiancee, Audrey Roy began our startup. We had been frustrated with trying to do on-line product research and came up with an idea to take the lessons learned from Django Packages / Open Comparison and apply them to a commercial effort. The result has been Consumer ...
Read more ...I use this
Saturday, February 25, 2012 (permalink)
I had been meaning to do this for some time, and even had a nascent page for it on this site already. I just noticed my old friend Jessica Hammer was featured on usesthis.com. Then I remembered Kenneth Reitz blogged about his tools not that long ago. Looks like ...
Read more ...PyCon Australia 2011 Review
Friday, February 24, 2012 (permalink)
In June of 2011 I had the good fortune of having my then girlfriend, Audrey Roy, now fiancee, invited to present a keynote speech at PyCon Australia 2011.
I was terribly excited for her to get that invitation, and that excitement was compounded when they allowed me to present on ...
Read more ...My PyCon 2012 Schedule
Wednesday, February 22, 2012 (permalink)
Here I was thinking that this year's PyCon wasn't going to be so busy because I didn't submit a talk or tutorial. Ha! What the heck was I thinking?
Here's what I've already got in the works.
Wednesday, March 7th
Me and Audrey are driving ...
Selected for PyCon StartUp Row
Tuesday, February 21, 2012 (permalink)
Me and Audrey have been working hard on Consumer Notebook, a Python/Django based project. We submitted it to PyCon StartUp row and found out this morning we've been accepted. Hooray!
From the PyCon StartUp Row winner's post, here is a little bit of what we're about ...
Read more ...Parsing MongoDB URI
Monday, February 20, 2012 (permalink)
Rather than hard-code the configuration into a Python based settings file, when using a PaaS such as Heroku you want to pick up the MongoDB URI from the system settings. Here's what I do:
# get the dynamic elements from the MongoURI
import os
import re
r = r'^mongodb\:\/\/(?P ...
