I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""PLOT A HEXBIN MAP OF LOCATION | |
""" | |
figwidth = 14 | |
fig = plt.figure(figsize=(figwidth, figwidth*h/w)) | |
ax = fig.add_subplot(111, axisbg='w', frame_on=False) | |
# draw neighborhood patches from polygons | |
df_map['patches'] = df_map['poly'].map(lambda x: PolygonPatch( | |
x, fc='#555555', ec='#555555', lw=1, alpha=1, zorder=0)) | |
# plot neighborhoods by adding the PatchCollection to the axes instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
Mocking Httpclient and AsyncHttpclient in Tornado Server | |
''' | |
import unittest | |
import urllib | |
import tornado.gen | |
import tornado.ioloop | |
import tornado.web |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script> | |
<style type="text/css"> | |
rect { | |
fill: none; | |
stroke: #fff; |