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())) |
| [ | |
| { code: 'AU', name: 'Australia' }, | |
| { code: 'AT', name: 'Austria' }, | |
| { code: 'BE', name: 'Belgium' }, | |
| { code: 'BR', name: 'Brazil' }, | |
| { code: 'BG', name: 'Bulgaria' }, | |
| { code: 'CA', name: 'Canada' }, | |
| { code: 'HR', name: 'Croatia' }, | |
| { code: 'CY', name: 'Cyprus' }, | |
| { code: 'CZ', name: 'Czech Republic' }, |
| """ 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.