Skip to content

Instantly share code, notes, and snippets.

View WxBDM's full-sized avatar

Brandon M WxBDM

View GitHub Profile
@WxBDM
WxBDM / CLA.md
Created October 1, 2019 18:02
CLA for PyNimbus

Thank you for your interest in contributing to PyNimbus ("We" or "Us"). This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission on https://cla-assistant.io. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

  1. Definitions

    "You" means the individual who Submits a Contribution to Us. "Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, please follow the instructions in the Contributing file. "Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any exte

@WxBDM
WxBDM / setup_logging.py
Last active September 26, 2022 17:28
Setting up logging levels using decorators
import logging
from logging.handlers import TimedRotatingFileHandler
import typing as t
LOG_FORMAT = '%(levelname)s %(asctime)s %(message)s'
LOG_FORMATTER = logging.Formatter(LOG_FORMAT)
LOG_LEVELS = {'not set' : logging.NOTSET,
'debug' : logging.DEBUG,
'info' : logging.INFO,
@WxBDM
WxBDM / index.html
Created March 18, 2023 01:50
Make a request from the National Weather Service API. This uses a flask server to make the request and returns a few weather parameters for a given station (currently KJFK). This also comes coupled together with a front-end.
<!DOCTYPE html>
<html>
<head>
<title>Weather Data</title>
<link rel="stylesheet" href="static/style.css">
<script src="static/weather.js"></script>
</head>
<body>
<h1>Current Weather for <span class="station"></span></h1>
<p>Temperature: <span class="temperature"></span></p>