This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def get_csv_file_paths(directory_path) -> list: | |
""" | |
Retrieves the relative paths of all CSV files in the specified directory. | |
Args: | |
directory_path (str): Path to the directory containing CSV files. | |
Returns: | |
list: List of relative file paths for CSV files. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import yfinance as yf | |
import json | |
import csv | |
import os | |
import pandas as pd | |
# Setup logging configuration | |
logging.basicConfig(filename='security_data_collector.log', level=logging.ERROR, | |
format='%(asctime)s - %(levelname)s - %(message)s') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import os | |
# Ensure the logs directory exists | |
log_dir = './logs' | |
os.makedirs(log_dir, exist_ok=True) | |
# Configure logging | |
logging.basicConfig( | |
level=logging.INFO, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def get_csv_file_paths(directory_path) -> list: | |
""" | |
Retrieves the relative paths of all CSV files in the specified directory. | |
Args: | |
directory_path (str): Path to the directory containing CSV files. | |
Returns: |