Skip to content

Instantly share code, notes, and snippets.

@wholmgren
wholmgren / nep29.py
Last active February 9, 2022 17:32
Updated version of https://numpy.org/neps/nep-0029-deprecation_policy.html#references-and-footnotes - would be nice to use a tool to automatically fetch python/numpy/scipy/pandas release dates! Does it already exist?
from datetime import datetime, timedelta
# python dates from
# https://www.python.org/doc/versions/
# numpy dates from
# https://pypi.org/project/numpy/#history
data = """Jan 15, 2017: NumPy 1.12
Sep 13, 2015: Python 3.5
Dec 23, 2016: Python 3.6
"""
An example script to generate random or observation-informed forecasts
for participants of trials using the Solar Forecast Arbiter.
This script is meant to be explored and modified.
A generation script should be run periodically as a cronjob or via
another scheduling mechanism at an appropriate interval that will be
determined by the trial/forecast parameters.
"""
@wholmgren
wholmgren / test_trial_1_random_forecast_upload.py
Created August 6, 2021 15:51 — forked from alorenzo175/test_trial_1_random_forecast_upload.py
Solar Forecast Arbiter Test Trial 1 Script
"""
An example script to generate random forecasts for participants
in the first test trial of the Solar Forecast Arbiter.
This script should be run as cronjob or via another scheduling
mechanism at an appropriate interval that will be determined by
the trial/forecast parameters.
"""
import logging
import sys
@wholmgren
wholmgren / cocoa_beach_insert.py
Created March 31, 2021 03:36
Insert RTC Cocoa Beach weather data provided by Manajit Sengupta (NREL) into Solar Forecast Arbiter reference database
"""Insert RTC Cocoa Beach weather data provided by Manajit Sengupta (NREL)."""
import sys
from pathlib import Path
import os
import numpy as np
import pandas as pd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wholmgren
wholmgren / reference_forecasts_labeling.ipynb
Last active June 28, 2023 12:48
notebook useful for debugging interval label issues with Solar Forecast Arbiter's NWP reference forecasts: https://github.com/SolarArbiter/solarforecastarbiter-core/pull/186
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wholmgren
wholmgren / reference_forecast_nwp.py
Created June 4, 2019 15:27
proof of concept for combining solar forecast arbiter NWP processing with api requirements. don't use this code.
import datetime
from functools import partial
from pathlib import Path
import pandas as pd
from solarforecastarbiter import datamodel
from solarforecastarbiter.reference_forecasts import main, models
from solarforecastarbiter.io.fetch import nwp as fetch_nwp
@wholmgren
wholmgren / bokeh_report.html
Last active May 24, 2019 19:10
rendered solarforecastarbiter report
This file has been truncated, but you can view the full file.
<!doctype html>
<html lang="en" class="h-100">
<head>
<link
href="https://cdn.pydata.org/bokeh/release/bokeh-1.1.0.min.css"
rel="stylesheet" type="text/css">
<link
href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.1.0.min.css"
@wholmgren
wholmgren / persistence.ipynb
Last active April 30, 2019 21:40
notebook to test solarforecastarbiter-core persistence forecast implementions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.