(Have a complaint about this email? Want to make it better, fix a typo, or add more info? Fork the gist on GitHub! Or, click through to read a rendered version.)
Hello Hackers-
| ### Keybase proof | |
| I hereby claim: | |
| * I am jimn on github. | |
| * I am jimn (https://keybase.io/jimn) on keybase. | |
| * I have a public key whose fingerprint is ADDE A431 4676 5C13 C06B C6F8 F859 E8B0 EE55 721A | |
| To claim this, I am signing this object: |
| import requests, json | |
| from datetime import datetime, timedelta | |
| API_KEY = "<< weatherapi.com API key goes here >>" | |
| LAT = << latitude >> # Approximately where home is | |
| LON = << longitude >> | |
| LOCATION = f"{LAT},{LON}" | |
| now = datetime.now() # do this once |
| import sys | |
| symbols = { | |
| 0: '__', | |
| 1: '❌', | |
| 2: '⭕' | |
| } | |
| grid = [[0,0,0], [0,0,0], [0,0,0]] |
| def generate_sequence(start: int, end: int, steps: int): | |
| if steps < 2: | |
| return [start] if steps == 1 else [] | |
| # Compute approximate ratio for geometric progression by doing end/start to the power of steps as a fraction | |
| ratio = (end / start) ** (1 / (steps - 1)) | |
| seq = [start] | |
| for i in range(1, steps - 1): |