¦ Atom ¦ RSS

Creating Games in Streamlit

A while back I had the idea that 9yo and I would program a bunch of simple games together and she'd get interested in coding. Well, we did program a bunch of simple games together:

  • Guessing Game - the computer picks a random number, you guess, it tells you "too high …
2020-10-02 12:00 PM

Ten Essays on Fizz Buzz

I've been quarantined for the last several months for reasons that are too boring to go into, which somehow gave me a lot more time to write. And so I am delighted to …

2020-06-06 12:00 PM

Data Science From Scratch: Second Edition

I am thrilled to announce that the second edition of Data Science from Scratch is now available! (buy from Amazon or your other favorite bookstore, or read on Safari, or get a PDF from ebooks.com it looks like.)

It's been almost exactly four years since the first edition came …

2019-05-13 12:00 PM

Livecoding Madness - Building a Deep Learning Library

I give talks, and this fall my talk has been to live code a deep learning library (and use the resulting library to solve Fizz Buzz).

You probably didn't get to see my talk, which is why I made a video of it:

Please enjoy!

2017-12-04 12:00 PM

Fizz Buzz in Tensorflow

interviewer: Welcome, can I get you coffee or anything? Do you need a break?

me: No, I've probably had too much coffee already!

interviewer: Great, great. And are you OK with writing code on the whiteboard?

me: It's the only way I code!

interviewer: ...

me: That was a joke.

interviewer …

2016-05-23 12:00 PM

A Simple Spot It Clone With PureScript and Pux

Long-time readers may recall that last year I wrote a blog post about the mathematics of Spot It. (For those who don't recall, Spot It is a game where you have a deck of cards, each of which has 8 pictures on it, where through the magical mathematics of finite …

2016-03-30 12:00 PM

Trump Tweets on a Globe (aka Fun with d3, socket.io, and the Twitter API)

When I worked at Farecast we had a giant TV in the lobby, and up on that TV was an image of a globe, and on that globe were animated paths that (as far as you know) corresponded to flight searches that people were doing on the site. It was …

2016-02-27 09:00 AM

Building a Stupid Data Product, Part 3: The Single-Page App (PureScript)

(part 1, part 2)

OK, so last time we built a web service that responds to GET requests with random (bogus) elementary school science questions. In this third (and last) installment, we'll create a single-page quiz app that consumes the service.

Here's a rough stab at a wireframe:

wireframe

On the …

2016-02-15 09:00 AM

Building a Stupid Data Product, Part 2: The Web Service (Haskell)

(part 1, part 3)

Last time we collected and processed the data for generating stupid fake elementary school science questions and answers. The important parts to remember are

  1. we generated two files questions.json and answers.json containing transition dictionaries mapping each word to an array / list of possible following …
2016-02-15 08:00 AM

Building a Stupid Data Product, Part 1: The Data (Python)

(part 2, part 3)

As I'm not working right now* , I have a surfeit of time to hack on stupid things. In particular, it seemed like a good idea to hack together a stupid data product.

Inspiration (if you can call it such) struck when the Allen Institute released a …

2016-02-15 07:00 AM

Creating a Function Index Using Cycle.js

The readers of my book have been clamoring for an index of functions, so that -- for example -- when someone sees me use vector_mean on page 200 they can easily figure out where to find its definition.

It was easy enough (if tedious) to go through the book and create a …

2016-01-21 09:00 AM

Polyglot Twitter Bot, Part 4: PureScript

[The fourth in an (at least) 6-part series, all code on GitHub as always.]

  1. Node.js
  2. Node.js + AWS Lambda
  3. Python 2.7 + AWS Lambda
  4. PureScript
  5. PureScript + AWS Lambda
  6. Bonus: PureScript + Twitter Streaming

I know, you're thinking, "I've already read three parts of this series, and I haven't heard one …

2015-12-31 09:00 AM

Polyglot Twitter Bot, Part 3: Python 2.7 + AWS Lambda

[The third in an (at least) 6-part series, all code on GitHub as always.]

  1. Node.js
  2. Node.js + AWS Lambda
  3. Python 2.7 + AWS Lambda
  4. Purescript
  5. Purescript + AWS Lambda
  6. Bonus: Purescript + Twitter Streaming

Lambda also allows Python functions, although only Python 2.7. In practice, this won't affect us much …

2015-12-30 12:00 PM

Polyglot Twitter Bot, Part 2: Node.js + AWS Lambda

[The second in an (at least) 6-part series, all code on GitHub as always.]

  1. Node.js
  2. Node.js + AWS Lambda
  3. Python 2.7 + AWS Lambda
  4. Purescript
  5. Purescript + AWS Lambda
  6. Bonus: Purescript + Twitter Streaming

AWS has a recent-ish Lambda product, which lets you upload functions and then have them run on …

2015-12-29 07:00 PM

Polyglot Twitter Bot, Part 1: Node.js

[The first in an (at least) 6-part series, all code on GitHub as always.]

  1. Node.js
  2. Node.js + AWS Lambda
  3. Python 2.7 + AWS Lambda
  4. Purescript
  5. Purescript + AWS Lambda
  6. Bonus: Purescript + Twitter Streaming

Like most of you, I've long dreamed of making a Twitter bot. And also like most of …

2015-12-29 12:00 PM

Stupid Itertools Tricks for Data Science

(This is a blog post version of my PyData Seattle talk, slides and code at the link.)

In my last post

2015-08-23 12:00 PM

Haskell-Style Fibonacci in Python

If you've ever done a tech interview, you're probably familiar with the Fibonacci sequence:

1, 1, 2, 3, 5, 8, 13, ....

where each number is the sum of the previous two. A relatively simple (and relatively overused) interview problem is to write a function that returns the n-th Fibonacci number …

2015-07-07 12:00 PM

On The Mathematics of Spot It!

Last weekend we went to a party where one of the other attendees brought Spot It! Frozen for her kids. It's a simple game with circular cards, each of which has 8 pictures in it, most of them Frozen-themed.

frozen

The setup is that any two cards in the deck …

2015-06-12 12:00 PM

Data Science From Scratch: First Principles with Python

I am super-excited to announce that the book I've been working on for more than the last year, Data Science from Scratch: First Principles with Python is finally available! (buy from O'Reilly, use discount code AUTHD to save some money) (buy from Amazon).

My experience learning and teaching data science …

2015-04-26 12:00 PM

2014 Year in Review

2014 was a crazy year, mostly because I took on two very large projects either of which would have made for a pretty crazy year.

1. The Book

I am writing a book. (Yes, another one.) Actually, the first draft is done, and I am right now revising it based …

2015-01-15 07:09 PM

T-Shirts, Feminism, Parenting, and Data Science, Part 2: Eigenshirts

(You might want to read Part 1 first.)

When last we left off, we'd built a model using shirt colors to predict boy-ness / girl-ness.

Our second attempt will involve the shirt images themselves (sort of). For our purposes, computer images are made up of pixels, each of whose color is …

2013-06-24 08:37 PM

T-Shirts, Feminism, Parenting, and Data Science, Part 1: Colors

Before I was a parent I never gave much thought to children's clothing, other than to covet a few of the baby shirts at T-Shirt Hell. Now that I have a two-year-old daughter, I have trouble thinking of anything but children's clothing. (Don't tell my boss!)

What I have discovered …

2013-06-19 06:20 AM

© Joel Grus. Built using Pelican. Theme based on pelican-svbhack. .