Reference:
sudo fdisk -l
# -*- encoding: utf-8 -*- | |
# pip install emoji | |
import emoji | |
def char_is_emoji(character): | |
return character in emoji.UNICODE_EMOJI | |
""" 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 |
# -*- coding: utf-8 -*- | |
import math | |
import time | |
def timenow(): | |
return int(time.time() * 1000) | |
def sqr(x): |
Reference:
sudo fdisk -l
Run the following in the terminal:
Install the gcc-7 packages:
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y
Set it up so the symbolic links gcc
, g++
point to the newer version: