Helps create and structure Jupyter notebooks for teaching labs...
This skill helps create well-structured Jupyter notebooks for teaching Northwestern MS AI students about Azure services and agentic AI.
1. Title & Overview (Markdown)
- Lab title
- Learning objectives
- Prerequisites
- Architecture diagram
2. Setup & Prerequisites (Code + Markdown)
- Import checks
- Tool verification
- Environment setup
3. Core Concepts (Markdown)
- Explain the theory
- Architecture diagrams
- Key terminology tables
4. Step-by-Step Implementation (Code + Markdown)
- One concept per section
- Code cells with comments
- Explanatory markdown between code
5. Testing & Verification (Code)
- Test the implementation
- Show expected outputs
6. Summary (Markdown)
- Key takeaways table
- Next steps
- Additional resources
## Step X: Clear Action Title
**Why this matters:** Brief explanation of the concept's importance.
### Key Concepts
| Concept | Description |
|---------|-------------|
| Term 1 | Clear definition |
| Term 2 | Clear definition |
### Architecture
\`\`\`
βββββββββββββββ βββββββββββββββ
β Component ββββββΆβ Component β
βββββββββββββββ βββββββββββββββ
\`\`\`
Now let's implement this:
# Clear section comment explaining what this code does
# Include inline comments for non-obvious logic
def example_function(data: list[float]) -> dict:
"""
Brief description of what the function does.
Args:
data: List of numbers to process
Returns:
Dictionary with computed statistics
"""
# Validate input
if not data:
raise ValueError("Data cannot be empty")
# Compute statistics
result = {
"count": len(data),
"mean": sum(data) / len(data),
}
return result
# Test the function
sample_data = [10, 20, 30, 40, 50]
result = example_function(sample_data)
print(f"β
Analysis complete: {result}")
Use consistent styles for architecture diagrams:
Input ββββΆ Process ββββΆ Output
βββββββββββββββββββ βββββββββββββββββββ
β Component A ββββββΆβ Component B β
β (description) βββββββ (description) β
βββββββββββββββββββ βββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β
βββββββββββββββββββββββββββββββββββββββββββ€
β Business Logic β
βββββββββββββββββββββββββββββββββββββββββββ€
β Data Layer β
βββββββββββββββββββββββββββββββββββββββββββ
Use emojis consistently:
| Emoji | Meaning |
|---|---|
| β | Success/Complete |
| β | Error/Failure |
| β οΈ | Warning/Caution |
| π | Note/Documentation |
| π§ | Configuration/Setup |
| π | Celebration/Milestone |
| π‘ | Network/API |
| π | Security |
| π‘ | Tip/Insight |
| Feature | Description | Example |
|---------|-------------|---------|
| Feature 1 | Clear description | `code example` |
| Feature 2 | Clear description | `code example` |
# Print structured output
print("=" * 50)
print("π Results Summary")
print("=" * 50)
print(f" β’ Count: {result['count']}")
print(f" β’ Mean: {result['mean']:.2f}")
print("=" * 50)
import subprocess
import shutil
def check_tool(name: str, command: list) -> bool:
"""Check if a tool is installed."""
try:
result = subprocess.run(command, capture_output=True, text=True, timeout=10)
version = result.stdout.strip().split('\n')[0]
print(f"β
{name}: {version}")
return True
except (subprocess.SubprocessError, FileNotFoundError):
print(f"β {name}: Not installed")
return False
print("Checking required tools...\n")
tools = [
("Python", ["python", "--version"]),
("Azure CLI", ["az", "--version"]),
]
all_ok = all(check_tool(name, cmd) for name, cmd in tools)
if all_ok:
print("\nπ All tools installed!")
else:
print("\nβ οΈ Some tools missing. See installation instructions above.")
## π― Summary
### What You Built
Brief description of the complete implementation.
### Key Takeaways
| Concept | Implementation |
|---------|----------------|
| Concept 1 | How it was implemented |
| Concept 2 | How it was implemented |
### Next Steps
- Link to next lab
- Advanced topics to explore
- Additional resources
## π Resources
- [Official Documentation](url)
- [Tutorial](url)