Skip to content

Instantly share code, notes, and snippets.

View jceaser's full-sized avatar

Thomas Cherry jceaser

View GitHub Profile
@jceaser
jceaser / sunrise_sunshine.py
Created February 18, 2022 22:36 — forked from jacopofar/sunrise_sunshine.py
Sunrise and sunshine calculation in pure Python 3.7
"""Calculate the sunrise, sunset and noon time for a given coordinate.
Based on the code at: https://michelanders.blogspot.com/2010/12/calulating-sunrise-and-sunset-in-python.html
"""
from math import cos, sin, acos, asin, tan
from math import degrees as deg, radians as rad
from datetime import datetime, time, timezone, timedelta
class Sun:
"""