def create_directory()

in neural/utils.py [0:0]


def create_directory(path, overwrite=False):

    # if it is not there, create it
    if not os.path.exists(path):
        os.makedirs(path)

    # if it is there and overwrite, remove then recreate
    if os.path.exists(path) and overwrite:
        shutil.rmtree(path)
        os.makedirs(path)

    return 0