def _generateSampleData(mean=0.2, variance=0.2, metricMean=0.2, metricVariance=0.2):
 data = []
 p = {'mean': mean, 'name': 'normal', 'stdev': math.sqrt(variance), 'variance': variance}
 samples = _sampleDistribution(p, 1440)
 p = {'mean': metricMean, 'name': 'normal', 'stdev': math.sqrt(metricVariance), 'variance': metricVariance}
 metricValues = _sampleDistribution(p, 1440)
 for hour in range(0, 24):
  for minute in range(0, 60):
   data.append([datetime.datetime(2013, 2, 2, hour, minute, 0), metricValues[((hour * 60) + minute)], samples[((hour * 60) + minute)]])
 return data

def _generateSampleData ( mean = 0.2 , variance = 0.2 , metricMean = 0.2 , metricVariance = 0.2 ) : data = [ ] p = { 'mean' : mean , 'name' : 'normal' , 'stdev' : math . sqrt ( variance ) , 'variance' : variance } samples = _sampleDistribution ( p , 1440 ) p = { 'mean' : metricMean , 'name' : 'normal' , 'stdev' : math . sqrt ( metricVariance ) , 'variance' : metricVariance } metricValues = _sampleDistribution ( p , 1440 ) for hour in range ( 0 , 24 ) : for minute in range ( 0 , 60 ) : data . append ( [ datetime . datetime ( 2013 , 2 , 2 , hour , minute , 0 ) , metricValues [ ( ( hour * 60 ) + minute ) ] , samples [ ( ( hour * 60 ) + minute ) ] ] ) return data
generate 1440 samples of fake metrics data with a particular distribution of anomaly scores and metric values .