Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
import sublime_plugin | |
import uuid | |
import random | |
import datetime | |
class gen_uuid(sublime_plugin.TextCommand): | |
def run(self, edit): | |
for region in self.view.sel(): | |
self.view.replace(edit, region, str(uuid.uuid4())) |
[ | |
{ country: 'Australia', code: 'AU' }, | |
{ country: 'Austria', code: 'AT' }, | |
{ country: 'Belgium', code: 'BE' }, | |
{ country: 'Brazil', code: 'BR' }, | |
{ country: 'Bulgaria', code: 'BG' }, | |
{ country: 'Canada', code: 'CA' }, | |
{ country: 'Croatia', code: 'HR' }, | |
{ country: 'Cyprus', code: 'CY' }, | |
{ country: 'Czech Republic', code: 'CZ' }, |
""" 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 |
var EventEmitter = require('events').EventEmitter, | |
_ = require('lodash'); | |
/** | |
* Creates an action functor object | |
*/ | |
exports.createAction = function() { | |
var action = new EventEmitter(), | |
eventLabel = "action", |
(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.