<s> import sys <EOL> import os <EOL> import random <EOL> import shutil <EOL> import time <EOL> from datetime import datetime <EOL> from db import init_db <EOL> if len ( sys . argv ) < <NUM_LIT:5> : <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> db = init_db ( '<STR_LIT>' + sys . argv [ <NUM_LIT:1> ] + '<STR_LIT::>' + sys . argv [ <NUM_LIT:2> ] + '<STR_LIT>' ) <EOL> start_time = datetime . fromtimestamp ( <EOL> time . mktime ( time . strptime ( sys . argv [ <NUM_LIT:3> ] , '<STR_LIT>' ) ) ) <EOL> finish_time = datetime . fromtimestamp ( <EOL> time . mktime ( time . strptime ( sys . argv [ <NUM_LIT:4> ] , '<STR_LIT>' ) ) ) <EOL> print "<STR_LIT>" + str ( len ( db . select_vm_migrations ( start_time , finish_time ) ) ) </s>
