Anil kohli finvasia py file
from NorenRestApiPy.NorenApi import NorenApi import pandas as pd import logging import pyotp from datetime import datetime, timedelta import pandas_ta as ta # Get the current date and time current_date_time = datetime.today() current_date_time = current_date_time - timedelta(days=2) current_date_time = current_date_time .replace(hour=0,minute=0,second=0,microsecond=0) # Convert both dates to Unix timestamp format current_date_time = current_date_time.timestamp() api=None def delete_file_contents(file_name): try: # Open the file in write mode, which truncates it (deletes contents) with open(file_name, 'w') as file: file.truncate(0) print(f"Contents of {file_name} have been deleted.") except FileNotFoundError: print(f"File {file_name} not found.") except Exception as e: ...