import glob
import random


def get_images_paths(pattern='../data/*.jpg', size='full', test_percentage=0.2,
                     fast_set_size=300, verbose=False):
    """Return path of images that matches glob pattern.

    Args:
        pattern (str): glob pattern.
        size (str): 'fast' for reduced dataset size, 'full' for entire data.
        test_percentage (float): test set size percentage.
        fast_set_size (int): size of the reduced set.
    Returns:
        training_paths (list): contains all training set image paths.
        test_paths (list): contains all test set image paths.

    """
    paths = glob.glob(pattern)
    random.shuffle(paths)

    if size == 'fast':
        paths = paths[:fast_set_size]

    test_set_size = int(len(paths)*test_percentage)
    test_paths = paths[:test_set_size]
    training_paths = paths[test_set_size:]

    return training_paths, test_paths