- Download cheat
curl -sL https://github.com/cheat/cheat/releases/download/4.2.2/cheat-linux-amd64.gz -o ~/cheat-linux-amd64.gz
- Extract
gzip -d ~/cheat-linux-amd64.gz
- Copy
cheat
binary to/usr/local/bin
curl -sL https://github.com/cheat/cheat/releases/download/4.2.2/cheat-linux-amd64.gz -o ~/cheat-linux-amd64.gz
gzip -d ~/cheat-linux-amd64.gz
cheat
binary to /usr/local/bin
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50 | |
sudo update-alternatives --config x-terminal-emulator |
#!/bin/bash | |
# This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty) | |
# You have to have rust/cargo installed for this to work | |
# Install required tools | |
sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip | |
# Download, compile and install Alacritty | |
git clone https://github.com/jwilm/alacritty |
""" 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 |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import bs4 | |
def xpath_soup(element): | |
# type: (typing.Union[bs4.element.Tag, bs4.element.NavigableString]) -> str | |
""" | |
Generate xpath from BeautifulSoup4 element. |