I was recently asked to give a lecture explaining p-values and confidence intervals to budding Python programmers. Given that I don’t have a stats background at all, I was pretty intimidated, but I learned a lot from Jake Vanderplas’ “Statistics for Hackers” (slides, video) and Statistics is Easy! by Shasha and Wilson. I highly recommend Jake’s talk if you’re interested in this stuff.
I wanted to show how to apply shuffling and bootstrapping methods to solve a real-world problem and wrote the notebook below.
Read more...
I love using Ansible for deploying projects these days, but I don’t like typing the same long command over and over. It’s usually something like this:
ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml It’s simple to create a Makefile to automate this, but I wanted to go one further. For speed purposes, I like to run particular roles separately sometimes.
My new Makefile:
tags = $(subst roles/,,$(wildcard roles/*)) .PHONY: all $(tags) all: ansible-playbook -i hosts --vault-password-file=.
Read more...
Every year seems bigger than the one before, but 2015 felt stuffed – in a good way.
Family My two sons turned 4 and 1 this November. I’d already forgotten what it was like to have an infant and then a baby. It is amazing and tiring and weird. Two kids seems like exponentially more kids than one.
My wife and I had our tenth anniversary! It really doesn’t seem that long ago that we got married.
Read more...
scikit-learn is a great library for doing machine learning in Python, and one of my favorite things about it is its interface. All objects in scikit-learn, whether data transformers or predictors, have a similar interface, making it easy to use your own transformers or models, but I haven’t seen this documented much.
For transformers, you have to define the methods .fit(self, X, y=None) and .transform(self, X). There is a class, TransformerMixin, that doesn’t do much besides add a .
Read more...
PyCon 2015 was an incredible experience. This was my first PyCon, and I was amazed at the welcoming community and the level of quality. At most conferences, the talks are hit-and-miss: for every great talk you see, there’s one you don’t get a lot out of. At PyCon, I enjoyed every talk I went to, including – especially – the keynotes.
I’d heard that PyCon did a good job of supporting and welcoming a diverse audience, and it’s true.
Read more...
This last few days online have been awful for anyone with a heart in the tech world, from Linus Torvalds continuing to be a bully and pshaw the need for diversity to outpourings of rage over this to the backlash against that rage, including doxxing people, to finally, the revelation that Shanley Kane, the CEO of Model View Culture and a vocal feminist in technology used to date the most vile troll on the Internet, weev, and quite possibly shared his racist views at one point.
Read more...
At the end of each semester at The Iron Yard, our students present their final projects to the local development community and potential employers at our Demo Day. We had our most recent one this Friday, and it was fantastic. It was particularly special to me, as I’ve been out with the King Under the Mountain and so haven’t been as involved in my students’ final projects as last time. My colleagues Jessica, Mason, and Chris stepped up to help them across the finish line.
Read more...