Sample code created by GitHub Copilot
Unless noted otherwise, all Python programs in this repo were created using GitHub Copilot. Each source file contains Python comment statement followed by code generated by Copilot.
NOTE:
# Commentary:
identify Copilot generated code that required or requires modification to run.- Copilot embedded comments in the generated code.
File | Description |
---|---|
create_synthentic_training_data.py | Create synthetic training data for the model |
bootrap_analysis.py | Perform bootstrap analysis on a specified column in a pandas dataframe. Generate specified number of bootstrap samples and plot histogram of mean and standard devision. |
eda_example.py | Example of using Copilot to perform exploratory data analysis (EDA) on a dataset. |
financial_engineering_examples.py | Example of using Copilot to perform financial engineering calculations. |
flask_app.py | Flask app to peform simple computation on two numbers. |
flask_app2.py | Second implementation for flask app to perform simple computation of two numbers. |
flask_app3.py | Flask application to return the average of three numbers. Copilot generated the code from only one comment line. |
ludwig_training.py | Ludwig training for regression model. |
ludwig_training_with_image.py | Ludwig training for classification model with image. |
random_forest_training.py | Scikit-learning random forest training for regression model. |
ray_tune_example.py | Example of using Copilot to perform hyperparameter tuning using Ray Tune. |
regex_example.py | Example of using Copilot to generate regular expression. |
simple_examples.py | Simple examples of using Copilot for Python |
sklearn_custom_transformer.py | Example of using Copilot to create a template of custom transformer for Scikit-learn. |
spark_session_setp.py | Code fragment to initialize a Spark session. |
test_simple_example.py | Copilot generated pytest unit test for simple examples. |
torch_custom_classes.py | Example of using Copilot to create custom classes for PyTorch. |
torch_model_training.py | PyTorch training for regression model and save the trained model to file. |
File | Description |
---|---|
sample_go_code.go | Example of using Copilot to generate variety of Go code fragments. |
sample_java_code.java | Example of using Copilot to generate variety of Java code fragments. |
simple_examples.c | Simple examples using Copilot for C |
File | Description |
---|---|
Dockerfile_example | Example of using Copilot to generate Dockerfile |
k8s_service_definition.yaml | Copilot generating Kubernetes service definition with istio Virtual Service |
The codex
directory contain examples of using Copilot to generate code for a Python project. Codex API