# Path: bot/utils/common.py
# class DotDict(dict):
#     """dot.notation access to dictionary attributes"""
#     __getattr__ = dict.get
#     __setattr__ = dict.__setitem__
#     __delattr__ = dict.__delitem__


import datetime
import json
import h5py
import numpy as np
from bot.utils.common import DotDict

def set_data_file(file_path):
    global data_file
    data_file = file_path


def read_data_file(key=None):
    try:
        with open(data_file) as f:
            data = json.load(f, object_hook=date_hook)
            data = DotDict(data)
    except:
        data = DotDict(data_object)
    if key == None:
        return data
    if key != None and key in data:
        return data[key]
    return None


def read_json_file(file=data_file):
    try:
        with open(file) as f:
            data = json.load(f, object_hook=date_hook)
            return data
    except FileNotFoundError:
        return None


def datetime_handler(x):

# Path: bot/utils/common.py
# class DotDict(dict):
#     """dot.notation access to dictionary attributes"""
#     __getattr__ = dict.get
#     __setattr__ = dict.__setitem__
#     __delattr__ = dict.__delitem__


# Path: bot/utils/data.py
import datetime
import json
import h5py
import numpy as np
from bot.utils.common import DotDict


def set_data_file(file_path):
    global data_file
    data_file = file_path


def read_data_file(key=None):
    try:
        with open(data_file) as f:
            data = json.load(f, object_hook=date_hook)
            data = DotDict(data)
    except:
        data = DotDict(data_object)
    if key == None:
        return data
    if key != None and key in data:
        return data[key]
    return None


def read_json_file(file=data_file):
    try:
        with open(file) as f:
            data = json.load(f, object_hook=date_hook)
            return data
    except FileNotFoundError:
        return None


def datetime_handler(x):

    if isinstance(x, datetime.datetime):