<s> import os <EOL> import sys <EOL> from pysilhouette . command import Command <EOL> from pysilhouette . db . model import JobGroup , Job <EOL> class DummyCommand ( Command ) : <EOL> def insert_data ( self ) : <EOL> self . db . get_metadata ( ) . drop_all ( ) <EOL> self . db . get_metadata ( ) . create_all ( ) <EOL> jg_name = u'<STR_LIT>' <EOL> jg_ukey = unicode ( self . cf [ '<STR_LIT>' ] , "<STR_LIT:utf-8>" ) <EOL> j_name = u'<STR_LIT>' <EOL> j_order = <NUM_LIT:0> <EOL> j_cmd = unicode ( os . path . dirname ( __file__ ) + "<STR_LIT>" , "<STR_LIT:utf-8>" ) <EOL> jg = JobGroup ( jg_name , jg_ukey ) <EOL> jg . jobs . append ( Job ( j_name , j_order , j_cmd ) ) <EOL> self . session . save ( jg ) <EOL> self . session . commit ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> dc = DummyCommand ( ) <EOL> sys . exit ( dc . insert_data ( ) ) </s>
