Skip to content

Instantly share code, notes, and snippets.

View djmhunt's full-sized avatar

Dominic Hunt djmhunt

View GitHub Profile
@djmhunt
djmhunt / sunrise_sunshine.py
Created May 23, 2024 13:32 — 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:
"""

Keybase proof

I hereby claim:

  • I am djmhunt on github.
  • I am djhunt (https://keybase.io/djhunt) on keybase.
  • I have a public key ASBRDw49idz39z3HJCROXCWnxIrFdtxJRizfLhWCpVb9uwo

To claim this, I am signing this object: