https://github.com/anushapb/github-copilot

D-Lab GitHub-Copilot Workshop

https://github.com/anushapb/github-copilot

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

D-Lab GitHub-Copilot Workshop

Basic Info
  • Host: GitHub
  • Owner: AnushaPB
  • Language: R
  • Default Branch: main
  • Size: 96.7 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme

README.md

D-Lab Copilot Assisted Coding Workshop

Binder License: CC BY 4.0

This repository contains the materials for D-Lab Copilot Assisted Coding Workshop.

Prerequisites

Though GitHub Copilot is language agnostic, our examples will be in R. Therefore, we recommend attending D-Lab's R Fundamentals series prior to this workshop. If you use a language that is not R, you are still welcome to attend. Many of the examples will have analogs in other languages, such as Python.

Check D-Lab's Learning Pathways to figure out which of our workshops to take!

Workshop Goals

This workshop provides an introduction to coding with GitHub Copilot. First, we’ll cover how to install and set-up Visual Studio Code, a free code editor through which we will use GitHub Copilot. Then, we will go through the different features of GitHub Copilot and how to use them in R.

Learning Objectives

After this workshop, you will be able to:

  1. Set-up and navigate Visual Studio Code

  2. Take advantage of the main functionalities of GitHub Copilot for coding

  3. Understand some of the strengths and weaknesses of AI coding assistants

⚠️ You must have an active subscription to GitHub Copilot to follow the material in this workshop — though you may attend even if you do not. If you are a student or teacher, you can apply for free Github Copilot (see information here); the application is easy, however it can take a few days to process (GitHub warns it can even take up to two weeks). Otherwise, you will have to pay for a subscription which starts at $10/month (plans available here). If this is your first time using Copilot, you can also start a 30 day free trial.

Installation Instructions

We will use Visual Studio Code, GitHub Copilot, and R to go through the workshop materials, which requires installation of Visual Studio Code and R. We will walk through setting up GitHub Copilot and R in Visual Studio Code during the workshop, but you must have an existing subscription ot GitHub Co-pilot. Before the workshop, complete the following steps:

  1. Follow the instructions here to subscribe to GitHub Copilot and install R and Visual Studio Code. These instructions also describe setting up R and GitHub Copilot in Visual Studio Code, but you do not need to complete these steps before the workshop.

  2. Download these workshop materials:

    • Click the green "Code" button in the top right of the repository information.
    • Click "Download Zip".
    • Extract this file to a folder on your computer where you can easily access it (we recommend Desktop).
  3. Optional: if you’re familiar with git, you can instead clone this repository by opening a terminal and entering [GitCloneCommand].

Is Visual Studio Code not Working on Your Computer?

If you do not have Visual Studio Code installed and the materials loaded on your workshop by the time it starts, we strongly recommend using our GitHub codespace to run the materials for these lessons.

You can create a codespace for this repository by: 1. Clicking the green "Code" button in the top right of the repository information.

  1. Clicking "Open with Codespaces".

  2. Wait for the codespace to load. This may take a few minutes.

The codespace uploads this repository, along with any necessary packages, and allows you to run the materials in the cloud in a virtual Visual Studio Code that will look basically like what is on your computer. No installation is necessary from your end - you only need an internet browser. To save your work, the easiest way is to copy and paste the markdown files into a local file on your computer. If you are comfortable with Git, you can also fork this repository and commit your changes to your fork (instructions here).

Run the Code

Now that you have all the required software and materials, you need to open the code.

  1. Launch the Visual Studio Code software.

  2. Click "Open Folder" in the Visual Studio Code welcome window

  3. Use the file navigator to find the GitHub-Copilot folder you downloaded from Github and click "Open".

  4. Open up the workshop.Rmd file via the Files panel in Visual Studio Code (lefthand side).

  5. The solutions folder contains the solutions to the challenge problems.

  6. You will need to install the R extension in Visual Studio Code to run any R code and the Copilot extension to use Copilot, which we will walk through in the workshop. If you would like to install them before hand check out the instructions here.

Additional Resources

Check out the following resources to learn more about Visual Studio Code and GitHub Copilot:

About the UC Berkeley D-Lab

D-Lab works with Berkeley faculty, research staff, and students to advance data-intensive social science and humanities research. Our goal at D-Lab is to provide practical training, staff support, resources, and space to enable you to use R for your own research applications. Our services cater to all skill levels and no programming, statistical, or computer science backgrounds are necessary. We offer these services in the form of workshops, one-to-one consulting, and working groups that cover a variety of research topics, digital tools, and programming languages.

Visit the D-Lab homepage to learn more about us. You can view our calendar for upcoming events, learn about how to utilize our consulting and data services, and check out upcoming workshops.

Contributors

Anusha Bishop

This repository was created with material from the codespacer GitHub template created by Anusha Bishop

Owner

  • Name: Anusha Bishop
  • Login: AnushaPB
  • Kind: user
  • Company: UC Berkeley

GitHub Events

Total
Last Year