<jupyter_start><jupyter_text>Criando sessão para acesso ao s3<jupyter_code>s3_session = boto3.Session(
    aws_access_key_id='<KEY>',
    aws_secret_access_key='+<KEY>
    region_name='us-east-1'
)<jupyter_output><empty_output><jupyter_text>Acessando o Bucket com os dados do Gamma Challenge<jupyter_code>s3_resource = s3_session.resource('s3')
bucket = s3_resource.Bucket('amra-s3-0096-01-external')<jupyter_output><empty_output><jupyter_text>Listando todos os arquivos no bucket<jupyter_code>for my_bucket_object in bucket.objects.all():
    print(my_bucket_object)<jupyter_output><empty_output><jupyter_text>baixar um unico arquivo<jupyter_code>s3_file_name = 'Banco Datathon.zip'
local_file_name = 'Banco Datathon.zip'

bucket.download_file(s3_file_name, local_file_name)<jupyter_output><empty_output><jupyter_text>Baixar todos os arquivos<jupyter_code>for my_bucket_object in bucket.objects.all():
    print(my_bucket_object.key)
    bucket.download_file(my_bucket_object.key, my_bucket_object.key)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1074540174249758, 'fraction_numerical': 0.016456921587608905, 'mean_word_length': 9.34, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '217627', 'license': 'MIT', 'n_tokens_mistral': 411, 'n_tokens_neox': 404, 'n_words': 50, 'path': 'Gamma Challenge - Download Data.ipynb', 'repo_name': 'bgmello/bcg-gamma-challenge', 'size': '1084'}