By Austin G. Davis-Richardson
(Use their installation instructions)
""" | |
usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ] | |
""" | |
import sys | |
import io | |
from IPython.nbformat import current | |
By Austin G. Davis-Richardson
(Use their installation instructions)
if you are using linux, unix, os x:
pip install -U setuptools
pip install -U pip
pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide
##mailinglists
##list of speakers
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
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!
\
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
# By Jake VanderPlas | |
# License: BSD-style | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def discrete_cmap(N, base_cmap=None): | |
"""Create an N-bin discrete colormap from the specified input map""" |
--[[ json.lua | |
A compact pure-Lua JSON library. | |
The main functions are: json.stringify, json.parse. | |
## json.stringify: | |
This expects the following to be true of any tables being encoded: | |
* They only have string or number keys. Number keys must be represented as | |
strings in json; this is part of the json spec. |
class SummedAreaTable(object): | |
def __init__(self, size, data): | |
""" | |
Just because I dislike a 2d array / list. | |
data should be a List of Integer. | |
""" | |
width, height = size | |
assert width * height == len(data), "invalid data length and or data size" | |
self.size = size | |
self.data = data |