Skip to content

Instantly share code, notes, and snippets.

@cfperez
cfperez / jupyter_gym_render.md
Created August 30, 2018 17:45 — forked from andrewschreiber/jupyter_gym_render.md
How to stream OpenAI Gym environment rendering within a Jupyter Notebook

Open jupyter with

$ xvfb-run -s "-screen 0 1400x900x24" jupyter notebook

In Jupyter

import matplotlib.pyplot as plt
%matplotlib inline

After each step

def show_state(env, step=0):
@cfperez
cfperez / waya-dl-setup.sh
Last active September 11, 2017 23:33 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
%load_ext autoreload
%autoreload 1
%matplotlib inline
%config InlineBackend.figure_format='retina'
from __future__ import division, print_function
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns