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 psutil | |
import GPUtil | |
import csv | |
import time | |
import sys | |
def monitor_process_usage(pid, interval=1): | |
# csv file creation with write mode | |
with open('process_monitoring.csv', 'w', newline='') as csvfile: |
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 pandas as pd | |
import sys | |
def append_columns(original_file, secondary_file, mode, new_file): | |
# Get file paths from the user | |
original_file_path = original_file | |
secondary_file_path = secondary_file | |
try: |
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 pandas as pd | |
import sys | |
def add_column_to_csv(input_csv, column_name, column_value): | |
# Read the CSV file into a DataFrame | |
df = pd.read_csv(input_csv) | |
# Add a new column with the specified name and value | |
df[column_name] = column_value |
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 | |
import sys | |
import yaml | |
def analizar_rosbag_yaml(ruta_yaml, ruta_base): | |
""" | |
Analiza un archivo YAML de rosbag2 y devuelve estadísticas clave. | |
""" | |
try: |