Skip to content

GitHub Copilot practice repo using several of your favorite programming languages.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE-CODE
Notifications You must be signed in to change notification settings

jharbieh-microsoft/copilot

README

This repo is put together to help me document, practice and show examples of how to use Copilot. Along the way, if I find authoritative content on the topic of Generative AI, I will list them here. All content is credited to its respective authors.

Now, remember folks! "Copilot still needs a Pilot" (C) 2023

A bit of History

AI > ML > DL > GI

  • 1956 Artificial Intelligence (AI) - field of computer science that seeks to create intelligent machines that can replicate or exceed human intelligence
  • 1997 Machine Learning (ML) - subset of AI that enables machines to learn from existing data and improve upon that data to make decisions or predictions
  • 2017 Deep Learning (DL) - machine learning technique in which layers of neural networks are used to process data and make decisions
  • 2021 Generative AI (GI) - a new class of AI that can generate new content, such as text, images, and code

Machine Learning

Predictive models based on data and statistics

  1. Anomaly Detection: Systems that detect unusual patterns or events, enabling pre-emptive action
  2. Computer Vision: Applications that interpret visual input from cameras, images or videos
  3. Matural Language Processing: Applications that can interpret and draw insights from written or spoken language
  4. Conversational AI: AI agents or bots that can engage in dialogs with human users

Origins of Machine Learning

  • 1950 - 1980's Symbolic AI
  • 1990's Machine Learning
  • 2010's Deep Learning

What types of problems does machine learning help us solve?

  • Spam and fraud detection
  • Decision engines: approval or disapproval
  • Recommendation engines: which one to choose
  • Predictive maintenance: when will it break
  • Image analysis: classification and object detection
  • Text analysis: term and document comprehension
  • Natural language processing and machine translation

Responsible AI Prinicples

  • Fairness
  • Reliable
  • Safe
  • Private
  • Secure
  • Inclusivness
  • Transparent
  • Accountable

OpenAI + Microsoft Offerings

  • Generative pre-trained transformer (GPT): GPT (generate and understand text)
  • Codex: (based off of GPT and are optimized to generate and understand code)
  • Dall-E: (generate images from text prompts)
  • Embeddings: (a special format of data representation that can be easily utilized by machine learning models and algorithms)

Introduction to Copilot by Copilot

Copilot is a new AI-powered coding assistant that helps you write code faster and with fewer bugs.

You can receive suggestions from GitHub Copilot either by starting to write the code you want to use, or by writing a natural language comment describing what you want the code to do.

Trained on billions of lines of public code, GitHub Copilot puts the knowledge customers need at their fingertips, saving time and maintaining focus.

Although it supports most programming languages, it currently works the best with

  • Python
  • JavaScript
  • TypeScript
  • Ruby
  • Go

Value Prop of Github Copilot

GitHub Copilot helps developers code faster, focus on solving bigger problems.

  • 96% faster with repetitive tasks
  • 88% feel more productive
  • 74% focus on more satisfying work

Copilot Use Cases

  • Find new solutions - Cycle through suggestions and discover a different path.
  • Solve big problems - Spend less time on boilerplate and repetitive code patterns and more time on building great software.
  • Explore new frameworks - Navigate unfamiliar languages, frameworks, and libraries with ease

User Stories: I as a Developer want to... so that...

  1. I want to write code faster so that I can focus on solving bigger problems
  2. I want to write code with fewer bugs so that I can focus on solving bigger problems
  3. I want to write code with fewer errors so that I can focus on solving bigger problems
  4. ... LOL. The above was written by my Copilot. I am not sure if I should be happy or sad.

As a Developer

  1. You are asked to create a new App
  2. You are asked to create a new API
  3. You are asked to modify an existing application
  4. You are asked to fix a bug

Your next steps might be to gather requriements, work on a high level design, produce a POC or MVP. And when you start to write code, you may copy/paste, you may search and query for best results and code samples, etc. Copilot can help you do it all in one place.

The Formula

Let's say the scenario is: "I want to build a web app that connects to a sql database and has an todo item api and then I want to deploy this app to Azure". Imagine now, with [Copilot, Copilot Labs, Copilot-X, Copilot CLI] or which ever combination or product term we may end up with I can do all of that from one IDE.

  1. Context. Context. Context.
  2. Well written natural language comments (in a code file) or prompts.
  3. Multiple tabs open in the IDE with code files related to the work you are doing.

Copilot Supported IDEs

Copilot supports the following IDEs:

  • Visual Studio
  • Visual Studio Code
  • JetBrains
  • NeoVim
  • GitHub Codespaces
  • GitHub Copilot Workspace

How does it work?

GitHub Copilot is powered by OpenAI Codex from https://openai.com/

Who can get GitHub Copilot

  1. GitHub Copilot can be managed through personal accounts with GitHub Copilot for Individuals
  2. Or through organization accounts with GitHub Copilot for Business
  3. You can get it for Free if you are a verified Student, Teacher, or Maintainer of a popular open source project

High level steps to get started

  1. Sign up with a GitHub account
  2. Purchase a Copilot license
  3. Active on a GitHub repo
  4. Install the extensions (Copilot and Copilot Labs)
  5. Sign up for Copilot-X
  6. Create your first code file and enter a comment. Use natural language

Behind the Scenes

  • Prompt Engine - The Prompt Engine is a library for building natural language prompts for code generation. It is used by Copilot to generate prompts for code completion.

  • Prompt Engineering - The Prompt Engineering website is a collection of resources for building natural language prompts for code generation. It is used by Copilot to generate prompts for code completion.

  • Semantic Kernel - Semantic Kernel is an open-source SDK that lets you easily combine AI services like OpenAI, Azure OpenAI, and Hugging Face with conventional programming languages like C# and Python. In other words, it is an AI orchestration layer that allows us to combine AI models and plugins together to create brand new experiences for users.

  • Language Model - A language model is a probabilistic model of a natural language.

Example Applications built ontop of the tech

Public Announcements

Links and Resources

Language Models

Tutorials, Quickstarts, and Accelerators

OpenAI Demos

Community Demos

Acedemic Lectures

GitHub Demos

Microsoft Mechanics

Bing DALL-E

Bing Chat

Designer with DALL-E

Privacy, Security, Governance, Policy and Legal

Articles

Articles on AI and Compute

What Research Firms are saying

What the C-Suite is saying

Certifications and Learning Paths

Introduction to large language models

Hello World Copilot Examples Usage

A few code files will include how to run comments inline.

Compiling a .cs file

."C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe" .\main.cs

Running an executable

.\main.exe  

Lessons Learned

  1. The Coldfusion language may not supported by Copilot. It did take me some time to get it to work with it. It did finally do write me some code.
  2. I'm having a bit of a challenge to write VB. VBScript was straight forward.
  3. Copilot not much of a help yet when it comes to .bicep files.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

About

GitHub Copilot practice repo using several of your favorite programming languages.

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE-CODE

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published