<commit_before>#!/usr/bin/env python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#


"""Renders policy source files into actual Access Control Lists."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

__author__ = '<EMAIL>'

import copy
import dircache
import multiprocessing
import os
import sys
import types

from lib import aclgenerator
from lib import arista
from lib import aruba
from lib import brocade
from lib import cisco
from lib import ciscoasa
from lib import ciscoxr
from lib import gce
from lib import ipset
from lib import iptables
from lib import juniper
from lib import junipersrx
from lib import naming
from lib import nftables
from lib import nsxv
from lib import packetfilter
from lib import paloaltofw
from lib import pcap
from lib import policy
from lib import speedway
from lib import srxlo
from lib import windows_advfirewall

import gflags as flags
import logging



FLAGS = flags.FLAGS
flags.DEFINE_string(
    'base_directory',
    # MOE;insert './policies',
    'The base directory to look for acls; '
    'typically where you\'d find ./corp and ./prod')
flags.DEFINE_string(
    'definitions_directory',
    './def',
    'Directory where the definitions can be found.')
flags.DEFINE_string(
    'policy_file',
    None,
    'Individual policy file to generate.')
flags.DEFINE_string(
    'output_directory',
    './',
    'Directory to output the rendered acls.')
flags.DEFINE_boolean(
    'optimize',
    False,
    'Turn on optimization.',
    short_name='o')
flags.DEFINE_boolean(
    'recursive',
    True,
    'Descend recursively from the base directory rendering acls')
flags.DEFINE_boolean(
    'debug',
    False,
    'Debug messages')
flags.DEFINE_boolean(
    'verbose',
    False,
    'Verbose messages')<commit_msg>Fixing MOE typo discovered during export.<commit_after>#!/usr/bin/env python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#


"""Renders policy source files into actual Access Control Lists."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

__author__ = '<EMAIL>'

import copy
import dircache
import multiprocessing
import os
import sys
import types

from lib import aclgenerator
from lib import arista
from lib import aruba
from lib import brocade
from lib import cisco
from lib import ciscoasa
from lib import ciscoxr
from lib import gce
from lib import ipset
from lib import iptables
from lib import juniper
from lib import junipersrx
from lib import naming
from lib import nftables
from lib import nsxv
from lib import packetfilter
from lib import paloaltofw
from lib import pcap
from lib import policy
from lib import speedway
from lib import srxlo
from lib import windows_advfirewall

import gflags as flags
import logging



FLAGS = flags.FLAGS
flags.DEFINE_string(
    'base_directory',
    './policies',
    'The base directory to look for acls; '
    'typically where you\'d find ./corp and ./prod')
flags.DEFINE_string(
    'definitions_directory',
    './def',
    'Directory where the definitions can be found.')
flags.DEFINE_string(
    'policy_file',
    None,
    'Individual policy file to generate.')
flags.DEFINE_string(
    'output_directory',
    './',
    'Directory to output the rendered acls.')
flags.DEFINE_boolean(
    'optimize',
    False,
    'Turn on optimization.',
    short_name='o')
flags.DEFINE_boolean(
    'recursive',
    True,
    'Descend recursively from the base directory rendering acls')
flags.DEFINE_boolean(
    'debug',
    False,
    'Debug messages')
flags.DEFINE_boolean(
    'verbose',
    False,
    'Verbose messages')
{'fraction_non_alphanumeric': 0.06834606648771423, 'fraction_numerical': 0.003303737352880446, 'mean_word_length': 4.093585699263933, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3035268', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1344, 'n_words': 591}