This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from types import ModuleType | |
from importlib import reload, import_module | |
from IPython.core.magic import register_line_magic, register_cell_magic | |
logger = logging.getLogger(__name__) | |
def _reload(module, reload_all, reloaded): | |
if isinstance(module, ModuleType): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
from timeit import timeit | |
import pandas as pd | |
import numpy as onp | |
import matplotlib.pyplot as plt | |
def unzip(tuples): | |
return tuple(zip(*tuples)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python2.7 | |
import numpy as np | |
import gym | |
def value(observation): | |
""" | |
This value function is just the (negative) Lagrangian: |