<commit_before>"""
Unzip data downloaded from challenge website:
https://promise12.grand-challenge.org/

The outcome should be three folders named:
TrainingData_Part1, TrainingData_Part2, TrainingData_Part3
each folder contains mulitple '.mhd' and '.raw' files
"""
import os
import zipfile

zip_dir = '.'
target_dir = '.'
for zip_filename in {'TrainingData_Part1.zip', 'TrainingData_Part1.zip',
                     'TrainingData_Part1.zip'}:
    zip_ref = zipfile.ZipFile(os.path.join(zip_dir, zip_filename), 'r')
    zip_ref.extractall(target_dir)
    zip_ref.close()<commit_msg>Repaired setup.py for PROMISE12 unzip<commit_after>"""
Unzip data downloaded from challenge website:
https://promise12.grand-challenge.org/

The outcome should be three folders named:
TrainingData_Part1, TrainingData_Part2, TrainingData_Part3
each folder contains mulitple '.mhd' and '.raw' files
"""
import os
import zipfile

zip_dir = '.'
target_dir = '.'
for zip_filename in {'TrainingData_Part1.zip', 'TrainingData_Part2.zip',
                     'TrainingData_Part3.zip'}:
    print('Extracting', zip_filename , '...')
    zip_ref = zipfile.ZipFile(os.path.join(zip_dir, zip_filename), 'r')
    zip_ref.extractall(os.path.basename(zip_filename.replace('.zip', '')))
    zip_ref.close()
{'fraction_non_alphanumeric': 0.12342767295597484, 'fraction_numerical': 0.014150943396226415, 'mean_word_length': 4.632743362831858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7355401', 'n_tokens_mistral': 432, 'n_tokens_neox': 408, 'n_words': 93}