<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-


from argparse import ArgumentParser
from sg_open import sg_open
from sg_close import sg_close

def create_parser():
      parser = ArgumentParser()
      subparsers = parser.add_subparsers(dest='command')
      p_open = subparsers.add_parser('open', help='Add rules to open SSH to the local IP')
      open_group = p_open.add_mutually_exclusive_group(required=True)
      open_group.add_argument('--name', dest='name', help='Name of a Securiy Group to which to add the SSH rule')
      open_group.add_argument('-a', '--all', action='store_true', help='If set, will add the SSH rule to all existing Security Groups')

      p_close = subparsers.add_parser('close', help='Removs rules allowing SSH access to the local IP')
      p_close.add_argument('--name', dest='name', help='Name of a Securiy Group from which to remove the SSH rules')
      p_close.add_argument('-a', '--all', action='store_true', help='If set, will try to remove all SSH rules from a given SG, or all SSH rules specific to the local IP, otherwise')

      subparsers.add_parser('list-open', help='Lists Security Groups that have SSH rules allowing access from this IP')<commit_msg>Correct close parameters<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-


from argparse import ArgumentParser
from sg_open import sg_open
from sg_close import sg_close

def create_parser():
      parser = ArgumentParser()
      subparsers = parser.add_subparsers(dest='command')
      p_open = subparsers.add_parser('open', help='Add rules to open SSH to the local IP')
      open_group = p_open.add_mutually_exclusive_group(required=True)
      open_group.add_argument('--name', dest='name', help='Name of a Securiy Group to which to add the SSH rule')
      open_group.add_argument('-a', '--all', action='store_true', help='If set, will add the SSH rule to all existing Security Groups')

      p_close = subparsers.add_parser('close', help='Removs rules allowing SSH access to the local IP')
      close_group = p_close.add_mutually_exclusive_group(required=True)
      close_group.add_argument('--name', dest='name', help='Name of a Securiy Group from which to remove the SSH rules')
      close_group.add_argument('-a', '--all', action='store_true', help='If set, will try to remove all SSH rules from a given SG, or all SSH rules specific to the local IP, otherwise')

      subparsers.add_parser('list-open', help='Lists Security Groups that have SSH rules allowing access from this IP')
{'fraction_non_alphanumeric': 0.11067036890122967, 'fraction_numerical': 0.0007933359777865926, 'mean_word_length': 4.377398720682303, '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': '2074207', 'n_tokens_mistral': 774, 'n_tokens_neox': 732, 'n_words': 259}