Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"rules": {
"python": {
"max_line_length": 88,
"docstring_style": "google",
"require_type_hints": true,
"require_docstrings": true,
"require_async_for_io": true,
"require_error_handling": true
},
"general": {
"require_tests": true,
"test_coverage_threshold": 80,
"require_readme": true,
"require_requirements": true,
"require_logging": true,
"require_error_messages": true
},
"security": {
"prevent_hardcoded_secrets": true,
"require_input_validation": true,
"require_dependency_pinning": true
},
"style": {
"require_consistent_naming": true,
"require_comments_complex_logic": true,
"max_function_length": 50,
"max_complexity": 10
},
"teaching": {
"require_example_comments": true,
"require_step_documentation": true,
"require_performance_comments": true
},
"git": {
"require_conventional_commits": true,
"max_commit_size": 300,
"require_branch_protection": true
},
"ci_cd": {
"require_github_actions": true,
"require_security_scanning": true,
"require_dependency_updates": true
},
"observability": {
"require_structured_logging": true,
"require_error_tracking": true,
"require_performance_metrics": true
}
},
"documentation": {
"required_sections": [
"Overview",
"Installation",
"Usage",
"Configuration",
"Testing",
"Security",
"Performance",
"Contributing"
]
},
"ignore_patterns": [
"**/__pycache__/**",
"**/.pytest_cache/**",
"**/venv/**",
"**/node_modules/**"
],
"custom_checks": {
"teaching_readiness": {
"require_step_by_step_comments": true,
"require_learning_objectives": true,
"require_example_outputs": true
}
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ log/
*.pfx
*.env
*.env.*
!*.env.example
!.env.example
.secrets/
secrets/
credentials/
Expand Down Expand Up @@ -507,3 +507,4 @@ temp/
.idea/
*.swp
*.swo
tims-notebook.md
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Timothy Warner
Copyright (c) 2023

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
170 changes: 98 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,110 @@
# GitHub Copilot for Developers
# GitHub Copilot Dev Repository

<img src="assets/images/tim-gh-copilot-cover-slide.png" alt="GitHub Copilot Course Cover" width="600" />
## Overview
This repository is a collection of resources, examples, and exercises for mastering GitHub Copilot and related technologies.

[![Course Demo Repository](https://img.shields.io/badge/Course%20Demo-NodeGoat-brightgreen?style=for-the-badge)](https://github.com/timothywarner/nodegoat)
[![Knowledge Base Demo](https://img.shields.io/badge/Knowledge%20Base-DemoKB-orange?style=for-the-badge)](https://github.com/timothywarner-org/demokb)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Ftechtrainertim.com)](https://techtrainertim.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## Repository Structure
- **assets/**: Images and other media assets.
- **blackbeard-extension-main/**: A sample extension project.
- **data/**: Example datasets for exercises.
- **docs/**: Documentation and guides.
- **examples/**: Code examples and templates.
- **exercises/**: Hands-on exercises for learning.
- **modules/**: Structured learning modules.
- **resources/**: Additional learning resources.
- **server-2025-learning-lab/**: A server-side learning lab project.

Gain experience with an AI-based pair programmer right now!
## Getting Started
1. Clone the repository: `git clone <repo-url>`
2. Navigate to the desired folder and follow the instructions in the README files.

## Course Information
## Contributing
See [CONTRIBUTING.md](server-2025-learning-lab/CONTRIBUTING.md) for guidelines.

**Instructor**: Tim Warner - Microsoft MVP, MCT
## License
This project is licensed under the terms of the MIT license. See [LICENSE](LICENSE) for details.

## Connect with Tim
- 📧 Email: [tim@techtrainertim.com](mailto:tim@techtrainertim.com)
- 🌐 Website: [TechTrainerTim.com](https://techtrainertim.com)
- 🐦 Bluesky: [@techtrainertim.bsky.social](https://bsky.app/profile/techtrainertim.bsky.social)
- 💼 LinkedIn: [Timothy Warner](https://www.linkedin.com/in/timothywarner)
- 🎥 YouTube: [@TechTrainerTim](https://youtube.com/@TechTrainerTim)
- 📚 O'Reilly: [Timothy Warner](https://learning.oreilly.com/search/?q=author%3A%22Timothy+Warner%22&type=*&rows=100)
# GitHub Copilot News Fetcher

## Repository Structure
A modern Python example demonstrating how to fetch and display GitHub Copilot news from official sources. This educational example showcases several Python best practices and modern development patterns.

### Course Content
- 📁 `/modules` - Core course materials organized by topic
- 📁 `/01-getting-started` - Getting started with GitHub Copilot
- 📁 `/02-everyday-development` - Using Copilot for everyday development
- 📁 `/03-advanced-features` - Advanced features and techniques
- 📁 `/04-ecosystem-future` - Ecosystem and future possibilities

### Resources
- 📁 `/exercises` - Hands-on exercises (all in one place)
- 📁 `/examples` - Code examples organized by language/technology
- 📁 `/docs` - Course documentation and reference materials
- 📁 `/workflows` - GitHub Actions and automation examples
- 📁 `/presentations` - Slides and presentation materials
- 📁 `/cheatsheets` - Quick reference guides
## Learning Objectives

## Getting Started
1. Review the [setup guide](docs/setup-guide.md)
2. Check the [course details](docs/course-details.md)
3. Start with the [basics](modules/01-getting-started/README.md)
4. Try the [exercises](exercises/README.md)

## Prerequisites
- GitHub account (free or paid)
- Visual Studio Code with GitHub Copilot extension
- Basic understanding of Git and GitHub
- Familiarity with at least one programming language

## Core Resources
### Official Documentation
- [GitHub Copilot Product Page](https://github.com/features/copilot)
- [Official Documentation](https://docs.github.com/en/copilot)
- [GitHub Copilot for Individuals](https://docs.github.com/en/copilot/quickstart)
- [GitHub Copilot for Business](https://docs.github.com/en/copilot/github-copilot-enterprise/overview)

### IDE Extensions
- [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)
- [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilotvs)
- [JetBrains Extension](https://plugins.jetbrains.com/plugin/17718-github-copilot)
- [Neovim Extension](https://github.com/github/copilot.vim)

### GitHub Copilot X Features
- [Copilot CLI](https://githubnext.com/projects/copilot-cli/)
- [Copilot for Pull Requests](https://github.blog/2023-11-08-github-copilot-in-the-cli-now-in-public-beta/)
- [Copilot Chat](https://docs.github.com/en/copilot/github-copilot-chat/using-github-copilot-chat)

### Learning Resources
- [GitHub Learning Lab](https://github.com/skills/copilot-codespaces-vs)
- [Best Practices for Prompting](https://github.blog/2023-06-20-how-to-write-better-prompts-for-github-copilot/)
- [GitHub Copilot Trust Center](https://github.com/features/copilot/trust)
- [Community Forum](https://github.community/c/code-to-cloud/github-copilot/41)

### Pricing & Billing
- [Pricing Information](https://docs.github.com/en/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)
- [Enterprise Features](https://docs.github.com/en/copilot/github-copilot-enterprise/overview)
1. **Modern Python Features**
- Type hints with `typing` module
- Dataclasses for clean data structures
- Async/await for concurrent operations
- Resource management with context managers

## License
MIT License - See [LICENSE](LICENSE) for details
2. **Best Practices**
- Clean code organization with classes
- Error handling with try/except
- Resource cleanup in finally blocks
- Strong typing for better maintainability
- Concurrent operations for better performance

3. **Real-world Integration**
- HTTP requests with modern `httpx` library
- RSS feed parsing
- GitHub API integration
- Beautiful console output with `rich`

## Installation

```bash
# Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
```

## Usage

Simply run the script:

```bash
python github-news-fetcher2.py
```

The script will:
1. Fetch the latest Copilot-related posts from the GitHub blog
2. Fetch the latest Copilot releases from GitHub
3. Display the combined results in a nicely formatted table

## Code Structure

- `CopilotNews`: Dataclass representing a single news item
- `GitHubNewsFetcher`: Main class handling news fetching and display
- `fetch_blog_posts()`: Fetches and filters GitHub blog posts
- `fetch_releases()`: Fetches latest GitHub Copilot releases
- `display_news()`: Formats and displays results

## Error Handling

The script includes robust error handling:
- Timeouts for HTTP requests
- Exception catching for API and parsing errors
- Graceful degradation (continues even if one source fails)
- Resource cleanup with async context management

## Dependencies

- `httpx`: Modern async HTTP client
- `feedparser`: RSS/Atom feed parser
- `rich`: Terminal formatting and tables

## Extension Ideas

1. Add more news sources (Twitter, YouTube, etc.)
2. Implement caching for API responses
3. Add filtering options for specific topics
4. Create a web interface using FastAPI
5. Add unit tests with pytest

## Contributing

Feel free to submit issues and enhancement requests!


11 changes: 2 additions & 9 deletions course-plan.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# GitHub Copilot for Developers - Teaching Punchlist

## Course Structure

- **Duration**: 4 hours total
- **Segments**: 4 x ~55 minute segments
- **Breaks**: ~9 minute breaks between segments
- **Platform**: ON24 live training **platform**

## SEGMENT 1: Getting Started with GitHub Copilot (55min)

### 1. Welcome & Introduction (10min)
Expand Down Expand Up @@ -126,7 +119,7 @@

### 1. AI Coding Assistant Landscape (10min)

- [ ] Compare: Copilot, Replit, Anysphere, Magic
- [ ] Compare: Copilot, Windsurf, v0, Replit, Anysphere, Magic
- [ ] Integration with GitHub ecosystem
- [ ] Cost/benefit analysis
- [ ] Microsoft/OpenAI/Anthropic relationships
Expand All @@ -141,7 +134,7 @@
### 3. Extensions and Integration (15min)

- [ ] GitHub marketplace extensions
- [ ] DEMO: Install and use an extension
- [ ] DEMO: Install and use an extensions
- [ ] API integration possibilities
- [ ] Creating custom plugins

Expand Down
45 changes: 45 additions & 0 deletions data/README_ContrastStudy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contrast Study: Good Data vs. Bad Data for AI-900

This repository contains **two CSV datasets** plus this **Markdown** guide. The purpose is to demonstrate:

1. A **good_data.csv** file that embodies **Microsoft’s Responsible AI Principles**:
- **Anonymized IDs** instead of personal names.
- **No direct PII** (no phone numbers, addresses, etc.).
- Balanced distribution of features (several regions, a range of ages, consistent labeling).
- Clearly defined **features** (all columns except the final) vs. **label** (the final column).

2. A **bad_data.csv** file that violates multiple best practices:
- **FullName**, **StreetAddress**, **PhoneNumber** columns reveal sensitive PII.
- Unnecessary or questionable columns like “Blacklisted.”
- Inconsistent label values (Yes, No, Maybe, or empty).
- Missing or out-of-range numeric values (e.g., PerformanceRating can be 0 or 6, or missing).
- Skewed/uniform region (everything is “North”), leading to potential bias.
- Disorganized, incomplete, or erroneous rows.

## Key Teaching Points

- **Responsible AI** demands that data be collected and labeled **fairly**, with **privacy** and **security** in mind, and with **transparent** usage of features vs. labels.
- The **good_data.csv** shows a standard tabular layout ready for typical **classification** tasks (predicting “PromotionEligible”), with data that can be **one-hot encoded** or used as-is in many ML pipelines.
- The **bad_data.csv** highlights the pitfalls: from personal information leaks to label ambiguity, missing values, and potential biases.

## How to Use

1. **Load** `good_data.csv` in tools such as:
- Azure Machine Learning Studio
- VS Code + Python (Pandas)
- Databricks or Spark (for bigger scale)
- GitHub Codespaces or local Jupyter Notebooks

2. **Inspect** how easy it is to parse and model the “good” dataset. Notice consistent numeric columns, no hidden PII, and a clear target label.

3. **Load** `bad_data.csv`:
- Observe the errors, missing data, out-of-bound values, etc.
- Discuss how to fix or remove these columns and how that might reduce bias or risk.

4. **Emphasize** Microsoft Responsible AI Principles—ask learners to spot each violation in `bad_data.csv` (privacy, fairness, reliability, etc.).

5. **Extend** the data or create new synthetic variants for advanced labs. Show how “cleaning” the bad data can be done, bridging best practices and real-world scenarios.

## Enjoy Teaching!

Use these files in your **AI-900** or general ML classes to illustrate the difference between “solid, responsibly sourced data” vs. “chaotic, risk-laden data” in a memorable, hands-on way.
Loading