def build_dataset(filename, sequence_length, alphabet_size, max_lines=-1):
    with open(filename) as f:
        content = f.readlines()
    content = content[:max_lines]
    content = [line for line in content if len(line) > 2]   # Remove blank lines
    seqs = np.zeros((sequence_length, len(content), alphabet_size))
    for ix, line in enumerate(content):
        padded_line = (line + " " * sequence_length)[:sequence_length]
        seqs[:, ix, :] = string_to_one_hot(padded_line, alphabet_size)
    return seqs
Renders a template from a field. If the field is a string, it will
dataset/ETHPy150Open HIPS/autograd/examples/rnn.py/build_dataset--crossover with--dataset/ETHPy150Open airbnb/airflow/airflow/models.py/BaseOperator.render_template_from_field