parameters: (from_idx, to_idx, _params)
return_statement: return (succ, fail)
docstring: download mp4s
docstring_summary: download mp4s
docstring_tokens: download mp4s
function: def download_mp4(from_idx, to_idx, _params):
      """
      download mp4s
      """
      succ = set()
      fail = set()
      for idx in range(from_idx, to_idx):
          name = 's' + str(idx)
          save_folder = '{src_path}/{nm}'.format(src_path=_params['src_path'], nm=name)
          if idx == 0 or os.path.isdir(save_folder):
              continue
          script = "http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/video/{nm}.mpg_vcd.zip".format( \
                      nm=name)
          down_sc = 'cd {src_path} && curl {script} --output {nm}.mpg_vcd.zip && \
                      unzip {nm}.mpg_vcd.zip'.format(script=script,
                                                     nm=name,
                                                     src_path=_params['src_path'])
          try:
              print(down_sc)
              os.system(down_sc)
              succ.add(idx)
          except OSError as error:
              print(error)
              fail.add(idx)
      return (succ, fail)
function_tokens: def download_mp4 ( from_idx , to_idx , _params ) : succ = set ( ) fail = set ( ) for idx in range ( from_idx , to_idx ) : name = 's' + str ( idx ) save_folder = '{src_path}/{nm}' . format ( src_path = _params [ 'src_path' ] , nm = name ) if idx == 0 or os . path . isdir ( save_folder ) : continue script = "http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/video/{nm}.mpg_vcd.zip" . format ( nm = name ) down_sc = 'cd {src_path} && curl {script} --output {nm}.mpg_vcd.zip && \
                      unzip {nm}.mpg_vcd.zip' . format ( script = script , nm = name , src_path = _params [ 'src_path' ] ) try : print ( down_sc ) os . system ( down_sc ) succ . add ( idx ) except OSError as error : print ( error ) fail . add ( idx ) return ( succ , fail )