Test data generation : simulating work day of an employee
<p>I am trying to generate some test data through python. (my app is not in python but python seems easy and succinct for data generation). I want to simulate a typical work day of an employee, by generating 'time slots' of activities. Below function needs to generate '<code>n</code>' number of time slot between <code>start</code> and <code>end</code>(with some random gap between to seem natural) with a <code>total</code>(total_hrs).</p>

<pre><code>slots = [] #list of slot == {start:&lt;&gt;, end:&lt;&gt;}
def time_slot(start, end, n, total_hrs):
  # generate n non-overlapping time slot between start and end (with some random gap between to seem natural)

print (slots)
</code></pre>

<p>Eg:</p>

<pre><code>time_slot( "1/1/2013 9:00", "1/1/2013 17:00", 3, 8)

[ {start: "1/1/2013 9:00", end: "1/1/2013 10:30"}, ...., {start: "1/1/2013 14:00", end: "1/1/2013 16:44"}]

#total time == 8
</code></pre>
