# Path: pyrl/utils.py
# def println(line):
# def mkdir_p(path):
# def savelist(filename, list_):
# def loadlist(filename):
# def print_dict(settings_, indent=2, title=None):
# def copy_to_clipboard(s):
# def div(x, y):
# def divide(x, y):
# def get_here(file):
# def get_parent(dir):
# def save(filename, obj):
# def load(filename):
# def mm_to_inch(mm):
# def elapsed_time(tstart):


import argparse
import datetime
import os
import subprocess
import sys
import numpy as np
from   os.path import join
from pyrl import utils
# Command line
#=========================================================================================

p = argparse.ArgumentParser()
p.add_argument('--simulate', action='store_true', default=False)
p.add_argument('--gpu', dest='gpu', action='store_true', default=False)
p.add_argument('args', nargs='*')
a = p.parse_args()

simulate = a.simulate
args     = a.args
gpu      = a.gpu

#=========================================================================================
# Shared steps
#=========================================================================================

here   = utils.get_here(__file__)
parent = utils.get_parent(here)

dopath        = join(parent, 'examples')
modelspath    = join(parent, 'examples', 'models')
analysispath  = join(parent, 'examples', 'analysis')
paperpath     = join(parent, 'paper')
timespath     = join(paperpath, 'times')
paperdatapath = join(paperpath, 'work', 'data')
paperfigspath = join(paperpath, 'work', 'figs')

# Make paths
for path in [timespath, paperdatapath, paperfigspath]:

# Path: pyrl/utils.py
# def println(line):
# def mkdir_p(path):
# def savelist(filename, list_):
# def loadlist(filename):
# def print_dict(settings_, indent=2, title=None):
# def copy_to_clipboard(s):
# def div(x, y):
# def divide(x, y):
# def get_here(file):
# def get_parent(dir):
# def save(filename, obj):
# def load(filename):
# def mm_to_inch(mm):
# def elapsed_time(tstart):


# Path: paper/all.py
import argparse
import datetime
import os
import subprocess
import sys
import numpy as np
from   os.path import join
from pyrl import utils

# Command line
#=========================================================================================

p = argparse.ArgumentParser()
p.add_argument('--simulate', action='store_true', default=False)
p.add_argument('--gpu', dest='gpu', action='store_true', default=False)
p.add_argument('args', nargs='*')
a = p.parse_args()

simulate = a.simulate
args     = a.args
gpu      = a.gpu

#=========================================================================================
# Shared steps
#=========================================================================================

here   = utils.get_here(__file__)
parent = utils.get_parent(here)

dopath        = join(parent, 'examples')
modelspath    = join(parent, 'examples', 'models')
analysispath  = join(parent, 'examples', 'analysis')
paperpath     = join(parent, 'paper')
timespath     = join(paperpath, 'times')
paperdatapath = join(paperpath, 'work', 'data')
paperfigspath = join(paperpath, 'work', 'figs')

# Make paths
for path in [timespath, paperdatapath, paperfigspath]:

    utils.mkdir_p(path)