A shared tag with AI prompts and code snippets
From workspace: The Wharton School of the University of Pennsylvan
Team: Creative Coding Lab
Total snippets: 2
2 snippets
Reads a log file, extracts relevant errors, and asks the agent to generate analysis + fixes.
# deps: pip install openai import re from openai import OpenAI client = OpenAI(api_key="YOUR_API_KEY") SYSTEM = """You are an IT operations assistant. Analyze logs, detect issues, explain them simply, and suggest fixes.""" def...
Turns critical log events into GitHub issues automatically.
# deps: pip install openai requests import re, requests from openai import OpenAI client = OpenAI(api_key="YOUR_API_KEY") GITHUB_REPO = "username/repo" GITHUB_TOKEN = "YOUR_GITHUB_TOKEN" SYSTEM = """You are an incident reporter agent. Detect...