From 115c2ca99aa0cd4ef0769043b5dfff3a711b5482 Mon Sep 17 00:00:00 2001 From: Carlos Paredes Date: Wed, 17 Apr 2024 23:47:13 -0400 Subject: [PATCH 1/2] chore --- run_copy.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 run_copy.py diff --git a/run_copy.py b/run_copy.py new file mode 100644 index 0000000..9fa540a --- /dev/null +++ b/run_copy.py @@ -0,0 +1,44 @@ +import pandas as pd +import matplotlib.pyplot as plt +import seaborn as sns + +def read_and_clean_data(file_path): + try: + # Read the CSV file + df = pd.read_csv(file_path) + + # Clean the data + df = df.dropna() # remove rows with missing values + df.columns = df.columns.str.strip() # remove leading/trailing spaces from column names + + return df + except FileNotFoundError: + print(f"File not found: {file_path}") + return None + except pd.errors.EmptyDataError: + print(f"No data in file: {file_path}") + return None + except Exception as e: + print(f"Error occurred: {e}") + return None + +def create_bar_plot(df, x_col, y_col): + # Set the style + sns.set(style="whitegrid") + + # Create the bar plot + fig, ax = plt.subplots(figsize=(10, 6)) + sns.barplot(x=x_col, y=y_col, data=df, ax=ax, palette="Blues_d") + + # Customize the plot + ax.set_title('Bar Plot', fontsize=15) + ax.set_xlabel(x_col, fontsize=12) + ax.set_ylabel(y_col, fontsize=12) + + # Show the plot + plt.show() + +# Use the functions +data = read_and_clean_data('your_file.csv') +if data is not None: + create_bar_plot(data, 'column1', 'column2') From 2ca2dd4e9794e8145ef03fc3a15c15ded20a0ec1 Mon Sep 17 00:00:00 2001 From: Carlos Paredes Date: Wed, 17 Apr 2024 23:48:01 -0400 Subject: [PATCH 2/2] chore --- .github/workflows/condor_review.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/condor_review.yml diff --git a/.github/workflows/condor_review.yml b/.github/workflows/condor_review.yml new file mode 100644 index 0000000..f624a41 --- /dev/null +++ b/.github/workflows/condor_review.yml @@ -0,0 +1,24 @@ +name: Condor Code Review + +on: [pull_request] + +jobs: + review: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install condor_code_reviewer + + - name: Run Condor + run: condor --openai-key ${{ secrets.OPENAI_KEY }} --gh-api-key ${{ secrets.GH_API_KEY }} --assistant-id ${{ secrets.ASSISTANT_ID }} --pull-request-url ${{ github.event.pull_request.html_url }}