How to Prepare for a Python Coding Interview
A “minimalist guide” on how to prepare for your upcoming Python interview in three steps.
Participating in a “Silicon Valley style” coding interview can feel scary as heck.
Unlike other professionals, it seems to be okay for software developers to expect to get humiliated at a job interview:
“What, you can’t code up a recursive descent parser on a whiteboard in 7.5 minutes? How DARE YOU
even apply for this job!”
Yeah, … Read the rest
Here I use Python and agent-based modelling with Mesa to solve a game theory problem in FiveThirtyEight’s Riddler. … Read the rest
Recently, when I was having fun with algorithms exercises, I though, do I solve them correctly?
So I thought that it would be neat to somehow find the complexity of an algorithm.
Gathering the data
The first idea was to use timeit and
calculate complexity based on consumed time:
from numpy.random import randint def _get_data_set(size): return list(randint(1000, size=size)) def main(alist): for passnum in range
… Read the rest
Regular expressions are text matching patterns described with a formal syntax. The patterns are interpreted as a set of instructions, which are then executed with a string as input to produce a matching subset or modified version of the original. The term “regular expressions” is frequently shortened to as “regex” or “regexp” in conversation. Expressions … Continue reading re — Regular Expressions — PyMOTW 3
… Read the rest
Book ref: Project 4 (pg 95ff)
Python 2.7: Same
In this post you’re going to learn how to write code that Python ignores. Does that seem odd?
What would be the point of writing code and then deliberately not using it? It turns out that
there are two important times when you would prefer that Python did not execute your code:
- comments, which you’ll be learning about in this post; and
- debugging, which you’ll learn about later.
There are two … Read the rest
Hi Pythonistas, a new week, a new ‘bite’ of Python coding! This week we will get you to create a simple app to calculate the monetary cost of using an electrical device. Enjoy!… Read the rest
It’s review time again. Wow: challenge #20 already! We can’t believe we have worked through so many already. We also keep receiving amazing PRs, awesome!… Read the rest
Recently I described a solution to the problem of dividing a list into evenly sized chunks. It’s a simple enough problem with just two inputs: the list (or other sliceable container)
xs and the number of chunks
n. Nonetheless, there are traps to avoid and special cases to consider — … Read the rest