sidechainnet/utils/load.py
def _copyfileobj(fsrc, fdst, length=0, chunks=0.):
    """Copy data from file-like object fsrc to file-like object fdst.

    Modified from shutil.copyfileobj to include a progress bar with tqdm.
    """
    # Localize variable access to minimize overhead.
    if not length:
        length = 64 * 1024
    fsrc_read = fsrc.read
    fdst_write = fdst.write
    if chunks:
        pbar = tqdm.tqdm(total=int(chunks),
                         desc='Downloading file chunks (estimated)',
                         unit='chunk',
                         dynamic_ncols=True)
    while True:
        buf = fsrc_read(length)
        if not buf:
            break
        fdst_write(buf)
        if chunks:
            pbar.update()
Copy data from file-like object fsrc to file-like object fdst.

    Modified from shutil.copyfileobj to include a progress bar with tqdm.
    
Copy data from file-like object fsrc to file-like object fdst.
Modified from shutil.copyfileobj to include a progress bar with tqdm.
Copy data from file - like object fsrc to file - like object fdst . Modified from shutil . copyfileobj to include a progress bar with tqdm .
def _copyfileobj(fsrc, fdst, length=0, chunks=0.):
    if not length:
        length = 64 * 1024
    fsrc_read = fsrc.read
    fdst_write = fdst.write
    if chunks:
        pbar = tqdm.tqdm(total=int(chunks),
                         desc='Downloading file chunks (estimated)',
                         unit='chunk',
                         dynamic_ncols=True)
    while True:
        buf = fsrc_read(length)
        if not buf:
            break
        fdst_write(buf)
        if chunks:
            pbar.update()
def _copyfileobj ( fsrc , fdst , length = 0 , chunks = 0. ) : if not length : length = 64 * 1024 fsrc_read = fsrc . read fdst_write = fdst . write if chunks : pbar = tqdm . tqdm ( total = int ( chunks ) , desc = 'Downloading file chunks (estimated)' , unit = 'chunk' , dynamic_ncols = True ) while True : buf = fsrc_read ( length ) if not buf : break fdst_write ( buf ) if chunks : pbar . update ( )
Copy data from file-like object fsrc to file-like object fdst.
Copy data from file - like object fsrc to file - like object fdst .
"""Copy data from file-like object fsrc to file-like object fdst.

    Modified from shutil.copyfileobj to include a progress bar with tqdm.
    """ # Localize variable access to minimize overhead.
fsrc
fdst
length
chunks