<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals

import os, sys
from datetime import datetime

import boto3

from . import register_parser
from .util.printing import format_table, page_output

def top(args):
    table = []
    columns = ["Region", "Instances", "AMIs"]
    for region in boto3.Session().get_available_regions("ec2"):
        session = boto3.Session(region_name=region["RegionName"])
        num_instances = len(list(session.resource("ec2").instances.all()))
        num_amis = len(list(session.resource("ec2").images.filter(Owners=["self"])))
        table.append([region["RegionName"], num_instances, num_amis])
    page_output(format_table(table, column_names=columns, max_col_width=args.max_col_width))

parser = register_parser(top, help='Show an overview of AWS resources per region')<commit_msg>fix test<commit_after>from __future__ import absolute_import, division, print_function, unicode_literals

import os, sys
from datetime import datetime

import boto3

from . import register_parser
from .util.printing import format_table, page_output

def top(args):
    table = []
    columns = ["Region", "Instances", "AMIs"]
    for region in boto3.Session().get_available_regions("ec2"):
        session = boto3.Session(region_name=region)
        num_instances = len(list(session.resource("ec2").instances.all()))
        num_amis = len(list(session.resource("ec2").images.filter(Owners=["self"])))
        table.append([region, num_instances, num_amis])
    page_output(format_table(table, column_names=columns, max_col_width=args.max_col_width))

parser = register_parser(top, help='Show an overview of AWS resources per region')
{'fraction_non_alphanumeric': 0.11992945326278659, 'fraction_numerical': 0.007054673721340388, 'mean_word_length': 5.446969696969697, 'pattern_counts': {'":': 0, '<': 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': '1114022', 'n_tokens_mistral': 518, 'n_tokens_neox': 511, 'n_words': 114}