(output_directory="generated_content")
write a CSV showing the number of techniques in a tactic that require a minimum permission.

    arguments:
        output_directory: string. The folder the output data will be written to. The folder will be created if it doesn't already exist.
write a CSV showing the number of techniques in a tactic that require a minimum permission.
write a CSV showing the number of techniques in a tactic that require a minimum permission .
def write_tacticPermissions(output_directory="generated_content"):
    """write a CSV showing the number of techniques in a tactic that require a minimum permission.

    arguments:
        output_directory: string. The folder the output data will be written to. The folder will be created if it doesn't already exist.
    """

    output_file = os.path.join(output_directory, "tacticPermissions.csv")
    # Make sure the directory exists
    if not os.path.exists(output_directory):
        os.makedirs(output_directory)
    with open (output_file, "w") as output_file:
        # Write the header of the CSV
        output_file.write("tactic,permission,technique count\n")
        for tac in tactics_to_permission:
            for perm in tactics_to_permission[tac]:
                output_file.write(tac.lower() + "," + perm.lower() + "," + str(tactics_to_permission[tac][perm]) + "\n")
def write_tacticPermissions ( output_directory = "generated_content" ) : output_file = os . path . join ( output_directory , "tacticPermissions.csv" ) # Make sure the directory exists if not os . path . exists ( output_directory ) : os . makedirs ( output_directory ) with open ( output_file , "w" ) as output_file : # Write the header of the CSV output_file . write ( "tactic,permission,technique count\n" ) for tac in tactics_to_permission : for perm in tactics_to_permission [ tac ] : output_file . write ( tac . lower ( ) + "," + perm . lower ( ) + "," + str ( tactics_to_permission [ tac ] [ perm ] ) + "\n" )