def _generateCategory(filename="<STR_LIT>", numSequences=<NUM_LIT:2>, elementsPerSeq=<NUM_LIT:1>, <EOL>numRepeats=<NUM_LIT:10>, resets=False):
<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:int>', '<STR_LIT:R>'), ('<STR_LIT>', '<STR_LIT:int>', '<STR_LIT:C>'),<EOL>('<STR_LIT>', '<STR_LIT:string>', '<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>for seqIdx in seqIdxs:<EOL><INDENT>reset = int(resets)<EOL>seq = sequences[seqIdx]<EOL>for x in seq:<EOL><INDENT>outFile.appendRecord([reset, str(seqIdx), str(x)])<EOL>reset = <NUM_LIT:0><EOL><DEDENT><DEDENT>outFile.close()<EOL>
Generate a simple dataset. This contains a bunch of non-overlapping
    sequences. 

    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 
    resets:         if True, turn on reset at start of each sequence