This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import sys | |
def get_weather(cityID: str, apiKey: str) -> dict: | |
# Build request url | |
url: str = f"http://api.openweathermap.org/data/2.5/weather?id={cityID}&units=metric&lang=%s&APPID={apiKey}" | |
# Get all weather data | |
data: dict = requests.get(url).json() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For the senior devs | |
def text_to_uwu(input_string: str) -> str: | |
words = input_string.split() | |
processed_words = [] | |
for word in words: | |
if word.endswith("u") and len(word) > 1: | |
word = word[:-1] + "uwu" | |
word = word.replace("r", "w")\ | |
.replace("l", "w")\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests import Response | |
from dotenv import load_dotenv | |
import os | |
from datetime import datetime | |
class GithubNotifier: | |
""" | |
A small project for myself to receive GitHub notifications on GrapheneOS |