human
What is a the Python program you requested given the following:
Complete the below
@app.route('/stream-bytes/<int:n>')
def stream_random_bytes(n):

    ''''Streams n random bytes generated with given seed, at given chunk size per packet.'
    '''
assistant
#Here is the Python program you requested.
    n = min(n, (100 * 1024))
    params = CaseInsensitiveDict(request.args.items())
    if ('seed' in params):
        random.seed(int(params['seed']))
    if ('chunk_size' in params):
        chunk_size = max(1, int(params['chunk_size']))
    else:
        chunk_size = (10 * 1024)
    def generate_bytes():
        chunks = bytearray()
        for i in xrange(n):
            chunks.append(random.randint(0, 255))
            if (len(chunks) == chunk_size):
                (yield bytes(chunks))
                chunks = bytearray()
        if chunks:
            (yield bytes(chunks))
    headers = {'Content-Type': 'application/octet-stream'}
    return Response(generate_bytes(), headers=headers)