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 hidden or 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
| /** | |
| * Inspired by @MoOx original script: https://gist.github.com/MoOx/93c2853fee760f42d97f | |
| * Adds file download per @micalevisk https://gist.github.com/MoOx/93c2853fee760f42d97f#gistcomment-2660220 | |
| * | |
| * Changes include: | |
| * - Get the description from the `title` attribute instead of `aria-label` (doesn't exist anymore) | |
| * - Use style.backgroundColor and parse the rgb(...) to hex (rather than regex parsing of 'style' string) | |
| * - Downloads labels to a JSON file named after the webpage to know which GitHub repo they came from. | |
| * | |
| * Last tested 2019-July-27: |
This file contains hidden or 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
| """An example of how to use tf.Dataset in Keras Model""" | |
| import tensorflow as tf # only work from tensorflow==1.9.0-rc1 and after | |
| _EPOCHS = 5 | |
| _NUM_CLASSES = 10 | |
| _BATCH_SIZE = 128 | |
| def training_pipeline(): | |
| # ############# | |
| # Load Dataset |
This file contains hidden or 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
| # Option 1: Use apt-get | |
| # keys taken from https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo | |
| cd ~/GitHub/r-with-intel-mkl/ | |
| wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
| apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | |
| sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' | |
| sudo apt-get update && sudo apt-get install intel-mkl-64bit |
This file contains hidden or 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
| import torch | |
| import torch.nn as nn | |
| import numpy as np | |
| import torch.optim as optim | |
| from torch.autograd import Variable | |
| # (1, 0) => target labels 0+2 | |
| # (0, 1) => target labels 1 | |
| # (1, 1) => target labels 3 | |
| train = [] |
This file contains hidden or 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
| import numpy as np | |
| from tensorflow.python.summary.event_accumulator import EventAccumulator | |
| import matplotlib as mpl | |
| import matplotlib.pyplot as plt | |
| def plot_tensorflow_log(path): | |
| # Loading too much data is slow... | |
| tf_size_guidance = { |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)