Exemplo n.º 1
0
def eyeball_histogram():
    event_stream = sc.random_set(0.250, 600)
    print("Event stream = ", event_stream)
    fail_streaks = sc.failure_streak_lengths(event_stream)
    print("Streaks = ", fail_streaks)
    fail_histo = sc.histogram_streak_lengths(fail_streaks)
    print("Histogram = ", fail_histo)
Exemplo n.º 2
0
def test_event_string_avg():
    event_stream = sc.random_set(0.333, 10000)
    count = len(event_stream)
    total = 0
    for i in range(0, count):
        total = total + event_stream[i]

    avg = total / count
    print("test_event_string: avg = ", avg, " element count = ", count)
Exemplo n.º 3
0
def eyeball_streak_length():
    event_stream = sc.random_set(0.333, 20)
    print("Event stream = ", event_stream)
    fail_streaks = sc.failure_streak_lengths(event_stream)
    print("Hist = ", fail_streaks)
Exemplo n.º 4
0
def eyeball_event_str():
    event_stream = sc.random_set(0.333,10)
    print("Event stream = ", event_stream)
Exemplo n.º 5
0
def simulate_season(avg, games):
    event_stream = sc.random_set(avg, games)
    return event_stream