GitHub Copilot & AI Tools

AI-powered coding assistants can significantly accelerate your data science learning journey. Let’s explore how to use them effectively!

GitHub Copilot

GitHub Copilot is an AI pair programmer that helps you write code faster and with fewer errors.

What is GitHub Copilot?

  • AI-powered code completion tool
  • Suggests whole lines or blocks of code as you type
  • Understands context from your code and comments
  • Trained on billions of lines of public code

For Students

Good news! Students get free access to GitHub Copilot:

  1. Visit GitHub Education
  2. Apply for the Student Developer Pack
  3. Verify your student status
  4. Access Copilot for free while you’re a student

Installing GitHub Copilot

For RStudio:

  • You can activate code completion via Tools -> Global Options -> Copilot.

For VS Code:

  1. Install Visual Studio Code
  2. Install the GitHub Copilot extension from the marketplace
  3. Sign in with your GitHub account

Google Gemini

Google Gemini is a powerful multimodal AI model that can assist with coding, data analysis, and more.

Free Access for Students

Eligible students can get free access to Gemini Advanced for 12 months:

  1. Visit gemini.google/students
  2. Click on “Get the offer”
  3. Sign in with your personal Google account (not your university email)
  4. Verify your student status via SheerID
  5. Enjoy 1 year of free access to Gemini Advanced

Note: Requires being 18+ and enrolled at an eligible institution.

Best Practices

TipWriting Good Prompts
  • Write clear comments describing what you want to do
  • Use descriptive variable names
  • Break complex tasks into smaller steps

DOs

  • Use AI to understand error messages
  • Ask AI to explain unfamiliar code
  • Use suggestions to learn new approaches
  • Verify AI-generated code before using it

DON’Ts

  • Don’t blindly copy-paste without understanding
  • Don’t use AI to do all your work (you won’t learn!)
  • Don’t share sensitive data with AI tools
  • Don’t assume AI code is always correct
WarningCritical Thinking Required

AI tools are powerful assistants, but they can make mistakes. Always review and test the code they generate!

Resources

Reuse