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!
\
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python3 | |
# coding: utf-8 | |
""" | |
Author : weaming | |
Created Time : 2018-05-26 21:32:59 | |
Prerequisite: | |
python3 -m pip install cson arrow | |
""" | |
import json | |
import os |
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
''' | |
Most heatmap tutorials I found online use pyplot.pcolormesh with random sets of | |
data from Numpy; I just needed to plot x, y, z values stored in lists--without | |
all the Numpy mumbo jumbo. Here I have code to plot intensity on a 2D array, and | |
I only use Numpy where I need to (pcolormesh expects Numpy arrays as inputs). | |
''' | |
import matplotlib.pyplot as plt | |
import numpy as np | |
#here's our data to plot, all normal Python lists |
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
# Dockerfile for prodigy, just place your linux-wheel (prodigy-0.1.0-cp36-cp36m-linux_x86_64.whl) in same directoty as | |
# this dockerfile and: | |
# > docker build . -t prodigy | |
# > docker run -it -p 8080:8080 -v ${PWD}:/work prodigy bash | |
FROM python:3.6 | |
RUN mkdir /prodigy | |
WORKDIR /prodigy | |
COPY ./prodigy-0.1.0-cp36-cp36m-linux_x86_64.whl /prodigy | |
RUN pip install prodigy-0.1.0-cp36-cp36m-linux_x86_64.whl |
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
def dfs_postorder_recursive(root): | |
if root is None: | |
return # base case | |
dfs_postorder_recursive(root.left) # LEFT | |
dfs_postorder_recursive(root.right) # RIGHT | |
visit(root) # VISIT | |
# T. Webster-like approach, |
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
<configuration> | |
<property> | |
<name>fs.s3a.access.key</name> | |
<value>S3_ACCESS_KEY</value> | |
</property> | |
<property> | |
<name>fs.s3a.secret.key</name> | |
<value>S3_SECRET_KEY</value> | |
</property> |