original_docstring: 
    Download and extract the tarball from Alex's website.
    From https://github.com/tensorflow/tensorflow/blob/r0.9/tensorflow/models/image/cifar10/cifar10.py
    
docstring: Download and extract the tarball from Alex's website.
docstring_tokens: Download and extract the tarball from Alex ' s website .
code: def maybe_download_and_extract(dest_directory):
    """
    Download and extract the tarball from Alex's website.
    From https://github.com/tensorflow/tensorflow/blob/r0.9/tensorflow/models/image/cifar10/cifar10.py
    """
    DATA_URL = 'http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz'
  
    if not os.path.exists(dest_directory):
      os.makedirs(dest_directory)
  
    filename = DATA_URL.split('/')[-1]
    filepath = os.path.join(dest_directory, filename)
  
    if not os.path.exists(filepath):
      def _progress(count, block_size, total_size):
        sys.stdout.write('\r>> Downloading %s %.1f%%' % (filename,
            float(count * block_size) / float(total_size) * 100.0))
        sys.stdout.flush()
      filepath, _ = urllib.urlretrieve(DATA_URL, filepath, _progress)
      print()
      statinfo = os.stat(filepath)
      print('Successfully downloaded', filename, statinfo.st_size, 'bytes.')
      tarfile.open(filepath, 'r:gz').extractall(dest_directory)
code_tokens: def maybe_download_and_extract ( dest_directory ) : DATA_URL = 'http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz' if not os . path . exists ( dest_directory ) : os . makedirs ( dest_directory ) filename = DATA_URL . split ( '/' ) [ - 1 ] filepath = os . path . join ( dest_directory , filename ) if not os . path . exists ( filepath ) : def _progress ( count , block_size , total_size ) : sys . stdout . write ( '\r>> Downloading %s %.1f%%' % ( filename , float ( count * block_size ) / float ( total_size ) * 100.0 ) ) sys . stdout . flush ( ) filepath , _ = urllib . urlretrieve ( DATA_URL , filepath , _progress ) print ( ) statinfo = os . stat ( filepath ) print ( 'Successfully downloaded' , filename , statinfo . st_size , 'bytes.' ) tarfile . open ( filepath , 'r:gz' ) . extractall ( dest_directory )
short_docstring: Download and extract the tarball from Alex's website.
short_docstring_tokens: Download and extract the tarball from Alex ' s website .
comment: """
    Download and extract the tarball from Alex's website.
    From https://github.com/tensorflow/tensorflow/blob/r0.9/tensorflow/models/image/cifar10/cifar10.py
    """