<commit_before>#!/usr/bin/env python

import boto3
import os


def assume_role():
    invoker_role_arn = os.environ["INVOKER_ROLE_ARN"]
    sts_client = boto3.client('sts')
    return sts_client.assume_role(
        RoleArn=invoker_role_arn,
        RoleSessionName='integration_test')['Credentials']


def format_(credentials):
    key_map = {"SecretAccessKey": "AWS_SECRET_ACCESS_KEY",
               "SessionToken": "AWS_SECURITY_TOKEN",
               "AccessKeyId": "AWS_ACCESS_KEY_ID"}

    for key, value in key_map.items():
        print "export {0}={1}".format(value, credentials[key])


if __name__ == "__main__":
    format_(assume_role())<commit_msg>boto3 needs AWS_SESSION_TOKEN<commit_after>#!/usr/bin/env python

import boto3
import os


def assume_role():
    invoker_role_arn = os.environ["INVOKER_ROLE_ARN"]
    sts_client = boto3.client('sts')
    return sts_client.assume_role(
        RoleArn=invoker_role_arn,
        RoleSessionName='integration_test')['Credentials']


def format_(credentials):
    key_map = {"SecretAccessKey": "AWS_SECRET_ACCESS_KEY",
               "SessionToken": "AWS_SESSION_TOKEN",
               "AccessKeyId": "AWS_ACCESS_KEY_ID"}

    for key, value in key_map.items():
        print "export {0}={1}".format(value, credentials[key])


if __name__ == "__main__":
    format_(assume_role())
{'fraction_non_alphanumeric': 0.12696041822255413, 'fraction_numerical': 0.006721433905899925, 'mean_word_length': 3.9084249084249083, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3618756', 'n_tokens_mistral': 473, 'n_tokens_neox': 463, 'n_words': 77}