def generate_bubblesort(prefix, num_examples, debug=False, maximum=10000000000, debug_every=1000):
    "\n    Generates addition data with the given string prefix (i.e. 'train', 'test') and the specified\n    number of examples.\n\n    :param prefix: String prefix for saving the file ('train', 'test')\n    :param num_examples: Number of examples to generate.\n    "
    data = []
    for i in range(num_examples):
        array = np.random.randint(10, size=5)
        if (debug and ((i % debug_every) == 0)):
            traces = Trace(array, True).traces
        else:
            traces = Trace(array).traces
        data.append((array, traces))
    with open('tasks/bubblesort/data/{}.pik'.format(prefix), 'wb') as f:
        pickle.dump(data, f)
Generates addition data with the given string prefix (i.e. 'train', 'test') and the specified
number of examples.

:param prefix: String prefix for saving the file ('train', 'test')
:param num_examples: Number of examples to generate.
def generate_bubblesort(prefix, num_examples, debug=False, maximum=10000000000, debug_every=1000):
    "\n    Generates addition data with the given string prefix (i.e. 'train', 'test') and the specified\n    number of examples.\n\n    :param prefix: String prefix for saving the file ('train', 'test')\n    :param num_examples: Number of examples to generate.\n    "
    data = []
    for i in range(num_examples):
        array = np.random.randint(10, size=5)
        if (debug and ((i % debug_every) == 0)):
            traces = Trace(array, True).traces
        else:
            traces = Trace(array).traces
        data.append((array, traces))
    with open('tasks/bubblesort/data/{}.pik'.format(prefix), 'wb') as f:
        pickle.dump(data, f)