How to run scripts in the background

Jessica YungProgrammingLeave a Comment

When running machine learning experiments, you might want to run multiple scripts simultaneously, hide printouts for a script or just do things in a terminal window while running a Jupyter Notebook in the background. In this post, we will go through how to run scripts in the background, bring them back to the foreground, and check if the scripts are … Read More

How Python implements dictionaries

Jessica YungProgrammingLeave a Comment

Python Dictionaries: Not even a space-time tradeoff If you could choose to store things that you’d want to look up later in a Python dictionary or in a Python list, which would you choose? It turns out that looking up items in a Python dictionary is much faster than looking up items in a Python list. If you search for … Read More

Numpy Views vs Copies: Avoiding Costly Mistakes

Jessica YungData Science, ProgrammingLeave a Comment

In this post we will talk about the differences between views and copies. It’s really important you’re aware of the difference between the two. Otherwise you might run into problems like accidentally modifying arrays. What are views and copies? With a view, it’s like you are viewing the original (base) array. The view is actually part of the original array even though … Read More

What makes Numpy Arrays Fast: Memory and Strides

Jessica YungMachine Learning, ProgrammingLeave a Comment

How is Numpy so fast? In this post we find out how Numpy’s ndarray is stored and how it is usually manipulated by Numpy functions using strides. Getting to know the ndarray A NumPy ndarray is a N-dimensional array. You can create one like this:

These arrays are homogenous arrays of fixed-sized items. That is, all the items in … Read More

How to Tackle Programming Problems (Google Code Jam 2017 Qualification Round, Problem A)

Jessica YungProgramming, UncategorizedLeave a Comment

This is a walkthrough of how one might start thinking about Problem A (small input) of Google Code Jam’s 2017 Qualification Round (April 8-9). Google posts excellent solutions to their problems, so the focus here will be that of the idea generation process or how one might begin to tackle such problems. Full problem statements can be found here. Problem A (Oversized … Read More

Bugger! 4.2: Semicircle lane lines

Jessica YungProgramming, Self-Driving Car NDLeave a Comment

Recap from the previous post: we’re trying to trace lane lines from a video. We just dealt with our pipeline spitting out zebra stripes, but now we’ve got a semicircle trace to deal with (see feature image above). What to do? Step 1: Plot intermediate steps to locate the bug Recall that our model is supposed to: Un-distort the test image … Read More