<s> from __future__ import absolute_import , print_function <EOL> import subprocess <EOL> import hashlib <EOL> import pprint <EOL> import optparse <EOL> from salt . utils import get_colors <EOL> import yaml <EOL> import salt . ext . six as six <EOL> colors = get_colors ( ) <EOL> def parse ( ) : <EOL> '''<STR_LIT>''' <EOL> parser = optparse . OptionParser ( ) <EOL> parser . add_option ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> default = <NUM_LIT:10> , <EOL> type = int , <EOL> help = '<STR_LIT>' ) <EOL> parser . add_option ( '<STR_LIT:-c>' , <EOL> '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> default = '<STR_LIT>' , <EOL> help = '<STR_LIT>' ) <EOL> options , args = parser . parse_args ( ) <EOL> return options . __dict__ <EOL> def run ( command ) : <EOL> '''<STR_LIT>''' <EOL> cmd = r'<STR_LIT>' . format ( command ) <EOL> subprocess . call ( cmd , shell = True ) <EOL> data = yaml . load ( open ( '<STR_LIT>' ) ) <EOL> hashes = set ( ) <EOL> for key , val in six . iteritems ( data ) : <EOL> has = hashlib . md5 ( str ( val ) ) . hexdigest ( ) <EOL> if has not in hashes : <EOL> print ( '<STR_LIT>' . format ( has ) ) <EOL> pprint . pprint ( val ) <EOL> hashes . add ( has ) <EOL> if len ( hashes ) > <NUM_LIT:1> : <EOL> print ( '<STR_LIT>' . format ( <EOL> colors [ '<STR_LIT>' ] , <EOL> command , <EOL> colors [ '<STR_LIT>' ] <EOL> ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> opts = parse ( ) <EOL> for _ in opts [ '<STR_LIT>' ] : <EOL> for command in opts [ '<STR_LIT>' ] . split ( '<STR_LIT:U+002C>' ) : <EOL> print ( '<STR_LIT:->' * <NUM_LIT:30> ) <EOL> print ( '<STR_LIT>' . format ( command ) ) <EOL> run ( command ) </s>
