@@ -0,0 +1,773 @@
+#!/usr/bin/python%0A%0Aimport numpy as np%0Aimport math%0A%0Adef daterange(start_date, end_date):%0A    for n in range(int ((end_date - start_date).days)):%0A        yield start_date + timedelta(n)%0A%0Adef contingency_func(obs, model, threshold):%0A    %22%22%22%0A    Calculates contingency table elements and Equitable Threat Score (ETS)%0A    %22%22%22%0A    # boolean arrays based on threshold%0A    obs%5Bobs %3C threshold%5D=0%0A    obs%5Bobs %3E= threshold%5D=1%0A    model%5Bmodel %3C threshold%5D=0%0A    model%5Bmodel %3E= threshold%5D=1%0A%0A    model_analyze = model + obs%0A%0A    forecast_points = float((model==1).sum())%0A    obs_points = float((obs==1).sum())%0A    num_points = float((obs%3E=(-float(%22inf%22))).sum())%0A    correct_forecast = float((model_analyze==2).sum())%0A%0A    return (forecast_points, obs_points, num_points, CFA)%0A    %0A  %0A

Create functions.py