Skip to content

Instantly share code, notes, and snippets.

View NeuroException's full-sized avatar
:octocat:

Neuro. NeuroException

:octocat:
View GitHub Profile
@NeuroException
NeuroException / github-notify.py
Last active February 9, 2024 17:28
A small project of mine to recieve GitHub notifications on GrapheneOS through my ntfy instance
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
@NeuroException
NeuroException / text2uwu.py
Created July 18, 2023 18:46
python text to uwu function
# 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")\
@NeuroException
NeuroException / weather.py
Created July 18, 2023 12:41
Get weather from openweathermap
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()