Skip to content

Instantly share code, notes, and snippets.

View extrasleepy's full-sized avatar

Andrew Kleindolph extrasleepy

View GitHub Profile
import pygame
import sys
# Initialize Pygame
pygame.init()
# Set display resolution
screen_width = 1024 # Change this to your screen's width
screen_height = 600 # Change this to your screen's height
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
elif event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:
running = False
@extrasleepy
extrasleepy / hint.py
Last active September 7, 2023 22:42
hint.py
import datetime
import pytz
def currentTime(timezone):
try:
#what goes here?
return #what goes here?
except:
return #what goes here?
import json
import requests
from requests import get
app_id = 'your id'
app_key = 'your app key'
url = 'https://api.edamam.com/api/recipes/v2?type=public&q=chicken&app_id='+app_id+'&app_key='+app_key+'&cuisineType=American'
one_food = get(url).json()
print (one_food['hits'][0]['recipe']['label'])
import time
import board
import ssl
import socketpool
import wifi
import microcontroller
import adafruit_minimqtt.adafruit_minimqtt as MQTT
import adafruit_ahtx0
from adafruit_seesaw.seesaw import Seesaw
#hold the escape key to quit
import time
import pygame
from sys import exit
# activate the pygame library
# initiate pygame and give permission
# to use pygame's functionality.
pygame.init()
# define the RGB value for white,
#!/usr/bin/env python3
import requests
import RPi.GPIO as GPIO
import time
import colorsys
import sys
import ST7735
try:
# Transitional fix for breaking change in LTR559
from ltr559 import LTR559
import sys
from PIL import Image, ImageFont, ImageDraw
from inky.auto import auto
import time
import glob
from font_source_serif_pro import SourceSerifProSemibold
from font_source_sans_pro import SourceSansProSemibold
font_size = 100
import time
from requests import get
import json
import requests
import textwrap
from inky import InkyWHAT
from PIL import Image, ImageFont, ImageDraw
inky_display = InkyWHAT("black")
inky_display.set_border(inky_display.BLACK)
import time
from requests import get
import json
import requests
import textwrap
from inky import InkyWHAT
from PIL import Image, ImageFont, ImageDraw
inky_display = InkyWHAT("black")
inky_display.set_border(inky_display.BLACK)