Skip to content

Instantly share code, notes, and snippets.

View Idadelveloper's full-sized avatar
🎯
Eat | Sleep | Code | Repeat

Ida Delphine Idadelveloper

🎯
Eat | Sleep | Code | Repeat
View GitHub Profile
@Idadelveloper
Idadelveloper / createLaundryItem.py
Created August 20, 2025 10:12
Write a generator function createLaundryItem() that returns an object representing a laundry item. This object should have a method nextCycle() which, when called, advances the item through a series of laundry cycles in order: "soak", "wash", "rinse", "spin", and "dry". After the final cycle, subsequent calls to nextCycle() should return "done".
class createLaundryItem(object):
def __init__(self):
self.items = ["soak", "wash", "rinse", "spin", "dry", "done"]
def nextCycle(self):
if self.items[0] == "done":
return self.items[0]
else:
item = self.items.pop(0)
return item
@Idadelveloper
Idadelveloper / .env
Created June 7, 2025 11:06
Build with AI Buea
GOOGLE_API_KEY="PASTE YOUR GEMINI API KEY HERE"
@Idadelveloper
Idadelveloper / get_acronym_explanation.py
Created May 10, 2025 06:18
Dev Acronym Buster Cloud Function (BwAI Bamenda 2025)
# main.py
import functions_framework
from flask import jsonify # Standard way to create JSON responses in Flask
import os
import traceback # For formatting tracebacks
# SDK for Google AI Gemini API (e.g., from AI Studio)
from google import generativeai as genai
# from google.generativeai import types # Not strictly needed for simple text prompts