(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'> | |
<h2>Gist-Powered</h2> | |
<h1>Reveal.js</h1> | |
<h2>Slideshow Presentations</h2> | |
<br/> | |
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1> | |
</section> | |
<section data-background-transition='zoom' data-transition='linear' id='try-it'> | |
<h2>Try it out!</h2> | |
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Oh yes, this is nice:
git revert --strategy resolve <sha-ish>
Given a git log of A--B--C--D--E
you can remove commit C
using:
git revert --strategy resolve <sha-of-C>
Which will produce:
/*! = $rembase: 14px | |
-------------------------------------------------------------- | |
* hmtl { font-size: 87.5%; } | |
* body { font-size: 14px; font-size: 1rem; line-height: 1; } | |
* 4px 0.28571429rem | |
* 8px 0.571428571rem | |
* 12px 0.857142857rem | |
* 13px 0.928571429rem | |
* 14px 1rem | |
* 16px 1.142857143rem |
import numpy as np | |
import pandas as pd | |
def compute_market_prices(prices): | |
"""Compute market prices according to the trading competition recipe. | |
Parameters | |
---------- | |
prices : DataFrame |
wordlist created from original 41G stash via: | |
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt | |
Then, compressed with: | |
7z a breachcompilation.txt.7z breachcompilation.txt | |
Size: |
#!/usr/bin/env python | |
from glob import glob | |
import cv2 | |
pngs = glob('./*.png') | |
for j in pngs: | |
img = cv2.imread(j) | |
cv2.imwrite(j[:-3] + 'jpg', img) |
##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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |