Loads TLDs from cached file to set.

        :return: Set of current TLDs
        :rtype: set
498393
def _load_cached_tlds(self):
        

        # check if cached file is readable
        if not os.access(self._tld_list_path, os.R_OK):
            self._logger.error("Cached file is not readable for current "
                               "user. ({})".format(self._tld_list_path))
            raise CacheFileError(
                "Cached file is not readable for current user."
            )

        set_of_tlds = set()
        with open(self._tld_list_path, 'r') as f_cache_tld:
            for line in f_cache_tld:
                tld = line.strip().lower()
                # skip empty lines
                if not tld:
                    continue
                # skip comments
                if tld[0] == '#':
                    continue

                set_of_tlds.add("." + tld)
                set_of_tlds.add("." + idna.decode(tld))

        return set_of_tlds
191639
def read_cache_fixtures!
      files = cache_files
      files.each do |file|
        cache_key = get_cache_key_from_filename(file)
        responses[cache_key] = Marshal.load(File.read(file))
      end
    end
53616
def list_templates(self) -> List[str]:
        
        result = set()
        for loader in self._loaders():
            for template in loader.list_templates():
                result.add(str(template))
        return list(result)
1337195
def load(self, spec):
        
        if spec.template is not None:
            return self.loader.unicode(spec.template, spec.template_encoding)

        path = self._find(spec)

        return self.loader.read(path, spec.template_encoding)
783646
def load_file_to_list(self):
        
        lst = []
        try:
            with open(self.fullname, 'r') as f:
                for line in f:
                    lst.append(line) 
            return lst  
        except IOError:
            return lst
593566
def _load(self):
        
        try:
            get = requests.get(self._ref,
                               verify=self.http_verify,
                               auth=self.auth,
                               timeout=self.timeout)
        except requests.exceptions.RequestException as err:
            raise NotFoundError(err)
        return get.content
30771
def load_cache(self):
        """"""
        self.cache_loaded = self.cache_loader_cls(
            self.file_name,
            self.wavefront,
            strict=self.strict,
            create_materials=self.create_materials,
            encoding=self.encoding,
            parse=self.parse,
        ).parse()
540069
def load_cache():
    
    if not os.path.exists(settings.DUP_FILTER_FILE):
        return set()

    with open(settings.DUP_FILTER_FILE) as f:
        return set(
            json.loads(f.read())
        )
475075
def set_to_cache(self):
        
        queryset = self.get_queryset()
        cache.set(self._get_cache_key(), {
            'queryset':
                [
                    queryset.none(),
                    queryset.query,
                ],
            'cls': self.__class__,
            'search_fields': tuple(self.search_fields),
            'max_results': int(self.max_results),
            'url': str(self.get_url()),
            'dependent_fields': dict(self.dependent_fields),
        })
331067
def ls(self):
        
        tree = self.ls_tree()
        return [t.get('file') for t in tree if t.get('file')]
326286
def fromfilenames(cls, filenames, coltype=LIGOTimeGPS):
		
		cache = cls()
		for filename in filenames:
			cache.extend(cls.fromfile(open(filename), coltype=coltype))
		return cache
791957
def internal_link_sets(self):
        
        if not self.__internal_link_sets:
            self.__internal_link_sets = InternalLinkSets(self.__connection)
        return self.__internal_link_sets
875787
def load_template(name, directory, extension, encoding, encoding_errors):
    
    abs_path = get_abs_template_path(name, directory, extension)
    return load_file(abs_path, encoding, encoding_errors)
64351
def links(self):
        
        if not self._responses:
            return None
        if 'Link' in self._responses[-1].headers:
            links = []
            for l in headers.parse_link(self._responses[-1].headers['Link']):
                link = {'target': l.target}
                link.update({k: v for (k, v) in l.parameters})
                links.append(link)
            return links
1191155
def loadedFilenames( self ):
        
        output = []
        for i in range(self.uiContentsTREE.topLevelItemCount()):
            item = self.uiContentsTREE.topLevelItem(i)
            output.append(nativestring(item.filepath()))
        return output
704273
def _read_cache(self):
        """"""
        if os.path.exists(self.filepath):
            with open(self.filepath, 'rt', encoding='utf8') as fh:
                lines = [x.strip() for x in fh]
        else:
            logger.debug("Index not found, starting empty")
            lines = []
        return lines
615527
def read_set_from_file(filename: str) -> Set[str]:
    
    collection = set()
    with open(filename, 'r') as file_:
        for line in file_:
            collection.add(line.rstrip())
    return collection