Skip to content

Instantly share code, notes, and snippets.

View yrevar's full-sized avatar

yrevar

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yrevar
yrevar / matplotlib_cheat_sheet.ipynb
Last active April 11, 2019 21:35
Matplotlib Cheat Sheet. Adapted from: Hilpisch, Y. (2012).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yrevar
yrevar / Huber Loss.ipynb
Created July 1, 2017 05:19
Huber Loss: less sensitivity to outliers (https://en.wikipedia.org/wiki/Huber_loss)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yrevar
yrevar / Exploration Functions.ipynb
Created June 25, 2017 20:55
Exploration Functions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
from search import *
## Flip-flop
class MaximizeAlternations(Problem):
def __init__(self, initial):
"""initial state is a numpy array with each element representing a bit 0 or 1,
goal state is same size as initial state with all bits turned 1"""
assert sum([n != 0 and n != 1 for n in initial]) == 0, "initial state must contain binary values."
self.initial = initial
@yrevar
yrevar / ocv_video_helper.py
Created April 23, 2017 17:46
OpenCV VideoCapture Helper
class VideoHelper(object):
def __init__(self, video_file, frame_start=0, frame_end=np.float('inf'), do_loop=True, preload_frames=1000):
self.preloaded = False
self.preload_frames = preload_frames
self._init_capture(video_file, frame_start, frame_end)
self.do_loop = do_loop
self.paused = False
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yrevar
yrevar / readme.md
Created January 4, 2017 00:07 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman