From 3c88debab9e4506362f7d0d9eb194f3376ff372c Mon Sep 17 00:00:00 2001 From: Kirandkv <117249197+Kirandkv@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:11:42 -0700 Subject: [PATCH] Update step2_dlq.py --- code/step2_dlq.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/code/step2_dlq.py b/code/step2_dlq.py index 4652acc..9c8f32c 100644 --- a/code/step2_dlq.py +++ b/code/step2_dlq.py @@ -398,24 +398,23 @@ def safe_float(series): plt.close() def main(): - # Unzip input data files -input_zip_path = "./code/Input_data_step2.zip" # Adjust this path to your zip file -extract_path = "./code/input_data_step2" + input_zip_path = "./code/Input_data_step2.zip" # Adjust this path to your zip file + extract_path = "./code/input_data_step2" -# Create extraction directory if it doesn't exist -os.makedirs(extract_path, exist_ok=True) + # Create extraction directory if it doesn't exist + os.makedirs(extract_path, exist_ok=True) -# Unzip the input files -with zipfile.ZipFile(input_zip_path, 'r') as zip_ref: - zip_ref.extractall(extract_path) -print(f"Input files extracted to: {extract_path}") + # Unzip the input files + with zipfile.ZipFile(input_zip_path, 'r') as zip_ref: + zip_ref.extractall(extract_path) + print(f"Input files extracted to: {extract_path}") # Configuration config = { 'gap_time': 5, 'length_threshold': 2, - 'simulation_data_path': "./input_data_step2/simulation_output_new.pkl", - 'output_file_path': "path to save output", + 'simulation_data_path': "./code/input_data_step2/simulation_output_new.pkl", + 'output_file_path': 'path to output_data folder/', } # Create output directory