Skip to content

Instantly share code, notes, and snippets.

@jasonsnell
jasonsnell / weatherkit-sampleproject.py
Last active August 10, 2023 21:35
WeatherKit API sample
#! /usr/bin/env python3
import time
import jwt
import json
import requests
from datetime import datetime
from collections import defaultdict
import matplotlib.pyplot as plt
#! /usr/local/bin/python3
# Recent daily rain script
# For WeatherCat - https://trixology.com
# By Jason Snell <jsnell@sixcolors.com>
import re
import matplotlib.pyplot as plt
from collections import defaultdict
from datetime import date
@jasonsnell
jasonsnell / echo.1m.py
Last active February 4, 2023 08:02
Echo Shortcut Notifier
#! /usr/bin/env python3
# <xbar.title>Echo Shortcut Notifier</xbar.title>
# <xbar.version>v1.01</xbar.version>
# <xbar.author>Jason Snell</xbar.author>
# <xbar.author.github>jasonsnell</xbar.author.github>
# <xbar.desc>Display status from Shortcuts.</xbar.desc>
import os
import datetime
@jasonsnell
jasonsnell / networkquality.30m.py
Created February 10, 2023 21:37
NetworkQuality for SwiftBar
#! /usr/bin/python3
# <xbar.title>Network Quality</xbar.title>
# <xbar.version>v1.1</xbar.version>
# <xbar.author>Jason Snell</xbar.author>
# <xbar.author.github>jasonsnell</xbar.author.github>
# <xbar.desc>Display current network quality from networkQuality binary.</xbar.desc>
# <swiftbar.hideRunInTerminal>true</swiftbar.hideRunInTerminal>
import json
@jasonsnell
jasonsnell / sportinggreen.py
Last active May 20, 2023 02:08
Yet Another Web to RSS Scraper
#! /usr/bin/env python3
import os
import requests
from bs4 import BeautifulSoup
import hashlib
import PyRSS2Gen
import datetime
import html.entities
from urllib.parse import urljoin