<jupyter_start><jupyter_text><jupyter_code>#@title # Clone the repository

!git clone https://github.com/iamsoroush/DeepEEGAbstractor.git
!pip install mne
#@title # Imports

import os
import sys
sys.path.append('DeepEEGAbstractor')

from src.make_data import download_data, generate_data

from google.colab import drive
drive.mount('/content/gdrive')
#@title # Set data path {display-mode: "form"}

#@markdown ---

download_dir = 'soroush' #@param {type:"string"}
gdrive_path =  os.path.abspath(os.path.join('gdrive/My Drive', download_dir))

if not os.path.exists(gdrive_path):
    os.mkdir(gdrive_path)

edf_data_dir = os.path.join(gdrive_path, 'eeg_data')
data_dir = os.path.join(gdrive_path, 'data')

print('edf data directory: ', edf_data_dir)
print('Numpy data directory: ', data_dir)

#@title # Download data and generate numpy data

download_data(gdrive_path)
generate_data(src_dir=edf_data_dir, dst_dir=data_dir, n_channels=20)

print('Data is ready on ', data_dir)<jupyter_output>Zip file exists.
Zip file extracted to  /content/gdrive/My Drive/soroush/eeg_data
{'fraction_non_alphanumeric': 0.12605042016806722, 'fraction_numerical': 0.0018674136321195146, 'mean_word_length': 6.194630872483222, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '426673', 'license': 'MIT', 'n_tokens_mistral': 404, 'n_tokens_neox': 394, 'n_words': 84, 'path': 'prepare_data.ipynb', 'repo_name': 'iamsoroush/DeepEEGAbstractor', 'size': '1071'}