From fb69ea238b84f8baa18fbfa2b4364ac7c8fce452 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 04:39:53 +0000 Subject: [PATCH] style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf This commit fixes the style issues introduced in 6cfc2cb according to the output from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf. Details: None --- ...Brain-Computer_Interface_Rehabilitation.py | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/func/Brain-Computer_Interface_Rehabilitation.py b/func/Brain-Computer_Interface_Rehabilitation.py index d422ef2..a6f69bb 100644 --- a/func/Brain-Computer_Interface_Rehabilitation.py +++ b/func/Brain-Computer_Interface_Rehabilitation.py @@ -1,10 +1,12 @@ import time + +import mne import numpy as np import pyautogui import pywinauto -import win32com.client import qnx -import mne +import win32com.client + def setup_brain_computer_interface(patient_data): """ @@ -20,11 +22,12 @@ def setup_brain_computer_interface(patient_data): bci = qnx.BrainComputerInterface() # Load the patient's brain data - brain_data = load_brain_data(patient_data['patient_id']) + brain_data = load_brain_data(patient_data["patient_id"]) # Calibrate the brain-computer interface for the patient bci.calibrate(brain_data) + def start_rehabilitation_program(patient_data): """ Start a new rehabilitation program for a patient using the brain-computer interface. @@ -39,7 +42,7 @@ def start_rehabilitation_program(patient_data): bci = qnx.BrainComputerInterface() # Load the patient's brain data - brain_data = load_brain_data(patient_data['patient_id']) + brain_data = load_brain_data(patient_data["patient_id"]) # Start the rehabilitation program ... @@ -47,6 +50,7 @@ def start_rehabilitation_program(patient_data): # Clean up the brain-computer interface bci.disconnect() + def load_brain_data(patient_id): """ Load the brain data for a patient. @@ -58,13 +62,14 @@ def load_brain_data(patient_id): numpy.ndarray: The patient's brain data. """ # Load the patient's brain data from a file or database - brain_data = np.load('brain_data/{}.npy'.format(patient_id)) + brain_data = np.load("brain_data/{}.npy".format(patient_id)) return brain_data + def main(): # Load patient data - patient_data = load_patient_data('patient.csv') + patient_data = load_patient_data("patient.csv") # Set up the brain-computer interface setup_brain_computer_interface(patient_data) @@ -72,5 +77,6 @@ def main(): # Start the rehabilitation program start_rehabilitation_program(patient_data) -if __name__ == '__main__': + +if __name__ == "__main__": main()