Returns a list of tuples for names that are tz data files.
558738
def filter_tzfiles(name_list):
    """"""
    for src_name in name_list:
        # pytz-2012j/pytz/zoneinfo/Indian/Christmas
        parts = src_name.split('/')
        if len(parts) > 3 and parts[2] == 'zoneinfo':
            dst_name = '/'.join(parts[2:])
            yield src_name, dst_name
580704
def names(cls):
        """"""
        if not cls._files:
            for f in os.listdir(cls._image_path):
                if(not f.startswith('.') and
                   os.path.isfile(os.path.join(cls._image_path, f))):
                    cls._files.append(os.path.splitext(f)[0])

        return cls._files
860600
def _get_file_name(tlobject):
    """"""
    name = tlobject.name if isinstance(tlobject, TLObject) else tlobject
    # Courtesy of http://stackoverflow.com/a/1176023/4759433
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
    result = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
    return '{}.html'.format(result)
73658
def file_list(self, tgt_env):
        '''
        
        '''
        files = set()
        symlinks = {}
        tree = self.get_tree(tgt_env)
        if not tree:
            # Not found, return empty objects
            return files, symlinks
        if self.root(tgt_env):
            try:
                tree = tree / self.root(tgt_env)
            except KeyError:
                return files, symlinks
            relpath = lambda path: os.path.relpath(path, self.root(tgt_env))
        else:
            relpath = lambda path: path
        add_mountpoint = lambda path: salt.utils.path.join(
            self.mountpoint(tgt_env), path, use_posixpath=True)
        for file_blob in tree.traverse():
            if not isinstance(file_blob, git.Blob):
                continue
            file_path = add_mountpoint(relpath(file_blob.path))
            files.add(file_path)
            if stat.S_ISLNK(file_blob.mode):
                stream = six.StringIO()
                file_blob.stream_data(stream)
                stream.seek(0)
                link_tgt = stream.read()
                stream.close()
                symlinks[file_path] = link_tgt
        return files, symlinks
408150
def glob(self, filename):
        """"""
        if isinstance(filename, six.string_types):
            return [
                # Convert the filenames to string from bytes.
                compat.as_str_any(matching_filename)
                for matching_filename in py_glob.glob(
                    compat.as_bytes(filename))
            ]
        else:
            return [
                # Convert the filenames to string from bytes.
                compat.as_str_any(matching_filename)
                for single_filename in filename
                for matching_filename in py_glob.glob(
                    compat.as_bytes(single_filename))
            ]
322013
public static List<String> tarGzListFiles(File tarGzFile) throws IOException {
        try(TarArchiveInputStream tin = new TarArchiveInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(tarGzFile))))) {
            ArchiveEntry entry;
            List<String> out = new ArrayList<>();
            while((entry = tin.getNextTarEntry()) != null){
                String name = entry.getName();
                out.add(name);
            }
            return out;
        }
    }
754398
def get_python_files(files):
        """"""
        python_files = []
        for file_name in files:
            if file_name.endswith(".py"):
                python_files.append(file_name)

        return python_files
395283
def list_names(cls):
        """"""
        response = subwrap.run(['lxc-ls'])
        output = response.std_out
        return map(str.strip, output.splitlines())
421675
def get_all_names() -> Tuple[str]:
    
    names = list(basic_names)
    names.extend(name_data)
    return tuple(sorted(set(names)))
1198437
def ensure_a_list(data):
    """"""
    if not data:
        return []
    if isinstance(data, (list, tuple, set)):
        return list(data)
    if isinstance(data, str):
        data = trimmed_split(data)  # settings.toml,other.yaml
        return data
    return [data]
1001812
def xrify_tuples(self, tup):
        """"""
        return xr.DataArray(tup,
                            dims=['bands'],
                            coords={'bands': self.data['bands']})
867646
def rlzs(self):
        
        tups = [(r.ordinal, r.uid, r.weight['weight'])
                for r in self.get_rlzs_assoc().realizations]
        return numpy.array(tups, rlz_dt)
1110858
def names():
    '''
    
    '''
    global blacklist
    if blacklist is None:
        # not yet loaded
        path = os.path.join(os.path.dirname(__file__), 'names.yaml')
        f = open(path, 'r')
        blacklist = yaml.safe_load(f)
        f.close()
    return blacklist
509149
def tbfuncs(frames):
  ''
  return ['%s:%s:%s'%(os.path.split(f.f_code.co_filename)[-1],f.f_code.co_name,f.f_lineno) for f in frames]
1374102
def zip_namedtuple(nt_list):
    
    if not nt_list:
        return dict()
    if not isinstance(nt_list, list):
        nt_list = [nt_list]
    for nt in nt_list:
        assert type(nt) == type(nt_list[0])
    ret = {k : [v] for k, v in nt_list[0]._asdict().items()}
    for nt in nt_list[1:]:
        for k, v in nt._asdict().items():
            ret[k].append(v)
    return ret
991032
def extract_zip(fileobj):
    """"""
    archive = zipfile.ZipFile(fileobj, mode='r')
    filenames = archive.namelist()

    for src_name, dst_name in filter_tzfiles(filenames):
        modified = archive.getinfo(src_name).date_time
        bytes = archive.read(src_name)

        yield dst_name, modified, bytes
720215
def list_xz (archive, compression, cmd, verbosity, interactive):
    """"""
    cmdlist = [cmd]
    cmdlist.append('-l')
    if verbosity > 1:
        cmdlist.append('-v')
    cmdlist.append(archive)
    return cmdlist