Wow! May 2nd! Schools in the area are starting late or canceling. What a crazy spring.
By: Brad Miller
I’m finally there. After a long time of writing books using Python 3, and teaching in Python 3 on a daily basis, I’m finally at the point where I’m changing my work environment to use Python 3 by default.
Here are the signs that convinced me it was time:
There are a couple of projects that I use a lot that are not yet on Python3 (web2py) but I’m not going to let that stop me.
It turns out to be pretty easy to get yourself up and running on all of this stuff with Python 3. I’m on a Mac running 10.8.3. The first and most important step is to get a working version of pip for Python3. First you need to install distribute.
curl -O http://python-distribute.org/distribute_setup.py
sudo python3 distribute_setup.py
This will install easy_install in your Python home, but go one more step and install pip.
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python3 get-pip.py
This will create a pip in your /Library/Frameworks/Python.framework/Versions/3.3/bin directory.
From there you can begin pip installing pretty much everything you need!
From my history today as I was setting everything up:
10393* pip3 install ipython
10409* pip3 install numpy
10410* pip3 install matplotlib
10429* pip3 install tornado
10430* pip3 install pyzmq
10455 pip3 install Sphinx
If you are on a Mac you will need to use easy_install to install one thing, for IPython. For some reason pip installing the readline library puts it too late in the load path to work with IPython, so you need to use easy_install-3.3 readline to get the history in IPython working just right.
Finally, you will want to add the Python 3 bin directory to your PATH. Edit your .bashrc or .zshenv file. Note that the following puts the Python 3 bin directory at the front of your PATH, making it the default when you type pip, python, or ipython. If you need to revert back to python2.7 for some task you will need to be explicit about it.
export PATH=/Library/Frameworks/Python.framework/Versions/3.3/bin:$PATH
Easy! You were expecting this to be a long and arduous process fraught with hacks and silly edits to config files. Nope, just a few basic commands. I take this as the final sign that Python 3 is here and ready to be your day to day Python.
What most schools don’t teach (by CodeOrg) This is a really great video, that just might inspire you to become a computer science major.
We passed 3 million entries in our log data for InteractivePython.org which got me to wondering about how we are growing. The site has been live for 275 days. You can really see how the site took off after day 100, which makes sense because that was bout the time fall classes started around the country. The tiny plateau between day 225 and 250 corresponds to Christmas/winter break for most schools, and now that Spring semester is in full swing it looks like the slope has gotten steeper again.
The dotted line is the linear best fit line with a slope of 12,836.7. Even if our log database is not growing exponentially thats an impressively steep slope.
And just because this is all about Python and education, here’s the Python code that created the graph. I love matplotlib, it is such a powerful tool for quickly looking at your data.
import matplotlib.pyplot as plt
from numpy import polyfit, arange
f = open('bydate','r')
days = f.readlines()
totals = [0]
for d in days:
day,count = d.split('|')
count = int(count)
totals.append(totals[-1]+count)
x = arange(len(totals))
m,b = polyfit(x,totals,1)
print m
plt.plot(x,totals,x,m*x+b, '--k')
plt.ylim(ymin=0)
plt.show()
The data file is simple. One day per line with the date in one column and the number of actions in the other column. Here are the last few days:
2013-02-14 | 24349 2013-02-15 | 17396 2013-02-16 | 12645
Loyal readers will remember that last summer we cruised to Alaska, and some very secretive things were happening on that cruise that I could only refer to rather cryptically. Well, with the airing of last nights episode of Top Chef the story can now be told.
We were on the set for the filming of the Quickfire challenge onboard the ship! Although the filming took several hours, we got less than 1 second of screen time. But here we are! Brian and I happened to be in a pretty good spot as the camera flashes past us several times. The ladies we were talking to turned out to be from Wisconsin, in fact from right by our cabin! The two in the print shirts actually got an additional 2 seconds of screen time along with their comments on the food.
Jane, Brian, and I all made it on again towards the end of the challenge. Sadly there is no sign of Holly.
Of course since this was all way before the show started we had no idea who any of the chefs really were. I do remember really liking Sheldon’s lettuce cups as well as Stefan’s little potato soup cup. I could swear that I remember seeing Kristin on the ship, so maybe she got to come along since she would be competing in last chance kitchen in Juneau.
Right now I’m looking forward to the finale. I’m not sure who I want to win the most, with Stefan and Josie gone all the villains are off the show. I think it would be awesome if Kristin makes it through LCK and gets to compete against Sheldon or Josh in the Finale. Thats Josh, by the way, in the first photo.
Its been a great J-Term. A trip to Vail for some Skiing, and a trip to Florida to solve the worlds problems with great friends at the DeBary Institute. For those who do not know, the DeBary institute is a newly renowned think tank with roots in the Bone Lake Global Institute.
We arrived on Friday and spent a wonderful late afternoon enjoying the hospitality and home of our host, Tim Peter.
On Saturday we toured Stetson University in the morning.
Later we repaired to Smyrna Beach, it was a bit windy but we enjoyed it all the same.

The culinary highlight of our trip was dinner at the Swamp House Grill and Tiki Bar. We enjoyed some lovely alligator bites as appetizers:
(Yes, as the famous frog said, they do taste like chicken)
After dinner we sat around enjoying the music of Mark Moore.
Sunday was Football (European and American) and then Golf day.
Dinner was provided by Gregory and Brad who made a charming seafood alfredo.
Monday morning we left the house at 5:50AM. The temperature was 62 degrees. Five hours later we arrived in Cedar Rapids where the temperature was -2. Thats a big swing for a monday morning.
Already looking forward to next year!
I’ve decided that it will be best to keep my personal blog separate from the new Everyday Python blog project. All of the infrastructure to make the posts interactive just work so much better when I have control of the server and everything else. So You can head over to Everyday Python and click on the Everyday Python link there, or if you want to subscribe to the RSS feed for that project you can use this link.
I just got back from four awesome days of skiing in Vail and Beaver Creek.
The Colorado resorts have a really cool new way of handling the ski passes, instead of clipping a tag on your jacket you now get a credit card with an RFID chip in it. Talk about a ski pass that appeals to the Geek in me! But whats even better is that every time you go on a lift, there is an RFID reader that grabs your ID and logs that lift ride. So now at the end of the day you can go on to a website and see how many vertical feet you skiied that day. Very cool. Over our four days of skiing we did just over 95,000 vertical feet! If we’d only known how close to 100k we would get we surely would have had a shorter lunch break on day one!
Since snow started late and has been a bit sparse since Christmas there was a lot of snow making going on. The mounds of snow created by the snow machines remind you of a Dr. Seuss drawing:
I’m pleased to say that my skiing has really improved thanks to my Solomon BBR 8.9 skis. I’ve started to call them my magic skis because I can even do the moguls! Here’s a picture I took of craig at the top of one particularly narrow and moguly run. Note that I got down first with enough time to turn around and snap some pictures.

Here’s another shot of Craig just before he jumped off the cliff. Note once again who went first to take the picture: :-)
All in all it was a great four days of skiing with the guys. Can’t wait until next year.