def _generateSimple(filename="<STR_LIT>", numSequences=<NUM_LIT:1>, elementsPerSeq=<NUM_LIT:3>, <EOL>numRepeats=<NUM_LIT:10>):
<EOL>scriptDir = os.path.dirname(__file__)<EOL>pathname = os.path.join(scriptDir, '<STR_LIT>', filename)<EOL>print("<STR_LIT>" % (pathname))<EOL>fields = [('<STR_LIT>', '<STR_LIT>', '<STR_LIT:T>'), <EOL>('<STR_LIT>', '<STR_LIT:string>', '<STR_LIT>'),  <EOL>('<STR_LIT>', '<STR_LIT:float>', '<STR_LIT>')]  <EOL>outFile = FileRecordStream(pathname, write=True, fields=fields)<EOL>sequences = []<EOL>for i in range(numSequences):<EOL><INDENT>seq = [x for x in range(i*elementsPerSeq, (i+<NUM_LIT:1>)*elementsPerSeq)]<EOL>sequences.append(seq)<EOL><DEDENT>seqIdxs = []<EOL>for i in range(numRepeats):<EOL><INDENT>seqIdxs += list(range(numSequences))<EOL><DEDENT>random.shuffle(seqIdxs)<EOL>timestamp = datetime.datetime(year=<NUM_LIT>, month=<NUM_LIT:1>, day=<NUM_LIT:1>, hour=<NUM_LIT:0>, minute=<NUM_LIT:0>,<EOL>second=<NUM_LIT:0>)<EOL>timeDelta = datetime.timedelta(hours=<NUM_LIT:1>)<EOL>for seqIdx in seqIdxs:<EOL><INDENT>seq = sequences[seqIdx]<EOL>for x in seq:<EOL><INDENT>outFile.appendRecord([timestamp, str(x), x])<EOL>timestamp += timeDelta<EOL><DEDENT><DEDENT>for seqIdx in seqIdxs:<EOL><INDENT>seq = sequences[seqIdx]<EOL>for i,x in enumerate(seq):<EOL><INDENT>if i != <NUM_LIT:1>:<EOL><INDENT>outFile.appendRecord([timestamp, str(x), x])<EOL><DEDENT>timestamp += timeDelta<EOL><DEDENT><DEDENT>for seqIdx in seqIdxs:<EOL><INDENT>seq = sequences[seqIdx]<EOL>for i,x in enumerate(seq):<EOL><INDENT>if i != <NUM_LIT:1>:<EOL><INDENT>outFile.appendRecord([timestamp, str(x), x])<EOL><DEDENT>timestamp += timeDelta<EOL><DEDENT><DEDENT>for seqIdx in seqIdxs:<EOL><INDENT>seq = sequences[seqIdx]<EOL>for x in seq:<EOL><INDENT>outFile.appendRecord([timestamp, str(x), x])<EOL>timestamp += timeDelta<EOL><DEDENT><DEDENT>outFile.close()<EOL>
Generate a simple dataset. This contains a bunch of non-overlapping
    sequences. 

    At the end of the dataset, we introduce missing records so that test
    code can insure that the model didn't get confused by them. 

    Parameters:
    ----------------------------------------------------
    filename:       name of the file to produce, including extension. It will
                    be created in a 'datasets' sub-directory within the 
                    directory containing this script. 
    numSequences:   how many sequences to generate
    elementsPerSeq: length of each sequence
    numRepeats:     how many times to repeat each sequence in the output