Giter Club home page Giter Club logo

idm-symposium-2023's Introduction

AI Assisted Coding - IDM Spring 2023 Symposium

Setup

  1. Make sure you have an account with ChatGPT
  2. Login to or sign up for a GitHub account
  3. Create a fork of this breakout session materials repository (ETA < 60 seconds)
    fork
  4. Start up a codespace for editing and running the code (opening the link in a new window is recommended)
    codespace
    Select your fork of the session repository (try entering "symposium" to find your forked repository)
    repository
    Bump system specs to 4-core 8GB RAM
    machine
    ETA 10-15 seconds
  5. Navigate (on the left) to the python directory and double-click 5fixed.py. This will bring up a dialog in the lower right corner of the window. Select install - note that this is installing into the remote codespace, not onto your local computer.
    python extension

Activities

Explain, Refactor, Optimize, and Test MATLAB Code (matlab folder)

  1. original
  2. refactored into function
  3. optimized with vector operations
  4. tested
  5. fixed

Translate MATLAB Code to Python (python folder)

  1. translated
  2. load from .mat files
  3. create reference data
  4. test translation
  5. fix translation

Live Coding with Copilot/ChatGPT (copilot folder)

  1. load .csv file
  2. aggregate case counts for type A and type B
  3. calculate mean and variance
  4. implement test
  5. run test on reference data
  6. calculate mean by week
  7. plot with matplotlib
  8. save to .png file

SEIR Model with Copilot (model folder)

*Note: prompts in prompts.txt

  1. import numpy and matplotlib.pyplot
  2. prompt for function to run model
  3. prompt for function invoke model and plot results

Resources

Example Code Repository

This repository clorton/idm-symposium-2023

Octave in GitHub Codespace

Takes about 5 minutes to install. Note: about ½ way through the installation there is a prompt to which you must respond in order to continue the installation.

(hover over the commands below to reveal the "copy" button in the upper right corner)

sudo apt update
sudo apt install -y octave

Install R in GitHub Codespace

Takes about 5 minutes to install.

instructions

(hover over the commands below to reveal the "copy" button in the upper right corner)

# update indices
sudo apt update -qq
# install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
# add the signing key (by Michael Rutter) for these repos
# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc 
# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt install --no-install-recommends r-base

Additional steps for integration with GitHub Codespace:

(hover over the commands below to reveal the "copy" button in the upper right corner)

sudo /usr/bin/R --silent --slave --no-save --no-restore -e "install.packages('languageserver', repos='https://cloud.r-project.org/')"
sudo /usr/bin/R --silent --slave --no-save --no-restore -e "install.packages('jsonlite')"

GitHub Codespaces

overview

idm-symposium-2023's People

Contributors

clorton avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.