Find an entry by exact title.

        :raise: EntryNotFoundError
16579
def find_by_title(self, title):
        
        for entry in self.entries:
            if entry.title == title:
                return entry
        raise EntryNotFoundError("Entry not found for title: %s" % title)
445694
def find_in_list_by_name(haystack, target_name, target_package, nodetype):
    """"""
    for model in haystack:
        name = model.get('unique_id')
        if id_matches(name, target_name, target_package, nodetype, model):
            return model

    return None
130028
def get_title(desc, default=None):
    """"""
    if not desc:
        return default
    lines = desc.strip('\n').split('\n')
    if not lines:
        return default
    return lines[0].lstrip('# ').rstrip(' ')
910474
def get_by_details(self, name, type, clazz):
        """"""
        entry = DNSEntry(name, type, clazz)
        return self.get(entry)
1242512
def get_titles():
    ''''''
    if os.name == 'posix':
        for proc in get_processes():
            cmd = ['xdotool','search','--name', proc]
            proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            window_ids = proc.communicate()[0].decode('utf-8')
            if window_ids:
                for window_id in window_ids.split('\n'):
                    cmd = ['xdotool','getwindowname',window_id]
                    proc = subprocess.Popen(cmd,
                                        stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE)
                    title = proc.communicate()[0].decode('utf-8')
                    try:
                        if title[-1] == '\n':
                            title = title[:-1]
                        yield title
                    except IndexError:
                        pass
    else:
        raise NotImplementedError
68818
def get_entity_by_identifier(self, url: str, identifier: str) -> Optional[NamespaceEntry]:
        """"""
        entry_filter = and_(Namespace.url == url, NamespaceEntry.identifier == identifier)
        return self.session.query(NamespaceEntry).join(Namespace).filter(entry_filter).one_or_none()
545106
def _EntriesGenerator(self):
    
    location = getattr(self.path_spec, 'location', None)
    if location is not None:
      paths = self._file_system.GetPaths()

      for path in iter(paths.keys()):
        # Determine if the start of the path is similar to the location string.
        # If not the file the path refers to is not in the same directory.
        if not path or not path.startswith(location):
          continue

        _, suffix = self._file_system.GetPathSegmentAndSuffix(location, path)

        # Ignore anything that is part of a sub directory or the directory
        # itself.
        if suffix or path == location:
          continue

        path_spec_location = self._file_system.JoinPath([path])
        yield fake_path_spec.FakePathSpec(location=path_spec_location)
1316933
def get_object(self, queryset=None):
        
        obj = super(EntryPreviewMixin, self).get_object(queryset)
        if obj.is_visible:
            return obj
        if (self.request.user.has_perm('zinnia.can_view_all') or
                self.request.user.pk in [
                author.pk for author in obj.authors.all()]):
            return obj
        raise Http404(_('No entry found matching the query'))
1307641
def map_title(self):
        
        # noinspection PyBroadException
        try:
            title = self._keyword_io.read_keywords(
                self.impact, 'map_title')
            return title
        except KeywordNotFoundError:
            return None
        except Exception:  # pylint: disable=broad-except
            return None
1312044
def get_programme_title(pid):
    """"""
    print("Extracting title and station...")
    main_page_etree = open_listing_page(pid)
    try:
        title, = main_page_etree.xpath('//title/text()')
    except ValueError:
        title = ''
    return title.strip()
499558
def findByBiSearch(self, strSeq) :
		""""""
		arr = self.encode(strSeq)
		return self._dichFind(arr[0], self, 0, lst = None)
856154
def get_value(self, key):
        """"""
        for title in _TITLES.get(key, ()) + (key,):
            try:
                value = [entry['lastMeasurement']['value'] for entry in
                         self.data['sensors'] if entry['title'] == title][0]
                return value
            except IndexError:
                pass
        return None
960521
def check(self):
        """"""
        # Make sure there is a schema key in dict
        if self._KEYS.SCHEMA not in self:
            self[self._KEYS.SCHEMA] = self.catalog.SCHEMA.URL
        # Make sure there is a name key in dict
        if (self._KEYS.NAME not in self or len(self[self._KEYS.NAME]) == 0):
            raise ValueError("Entry name is empty:\n\t{}".format(
                json.dumps(
                    self, indent=2)))
        return
160267
def find_by_index(self, cls, index_name, value):
        """"""
        return self.backend.find_by_index(cls, index_name, value)
987722
def _search_url_titles(self, title):
        
        # make the search
        logger.info('Searching title name for %r', title)
        r = self.session.get(self.server_url + 'subtitle/search/', params={'q': title}, timeout=10)
        r.raise_for_status()

        # check for redirections
        if r.history and all([h.status_code == 302 for h in r.history]):
            logger.debug('Redirected to the subtitles page')
            links = [r.url]
        else:
            # get the suggestions (if needed)
            soup = ParserBeautifulSoup(r.content, ['lxml', 'html.parser'])
            links = [link.attrs['href'] for link in soup.select('#processes div.generalWindowTop a')]
            logger.debug('Found %d suggestions', len(links))

        url_titles = defaultdict(list)
        for link in links:
            parts = link.split('/')
            url_titles[parts[-3]].append(parts[-2])

        return url_titles
540285
def find(self, *args, **kwargs):
        
        result = self.search(*args, **kwargs)

        if len(result) == 0:
            raise SearchNoneFoundError("nothing found")
        elif len(result) > 1:
            raise SearchMultipleFoundError("more than one result found")

        return result[0]
457372
def find_this(search, filename=MODULE_PATH):
    """"""
    if not search:
        return
    for line in open(str(filename)).readlines():
        if search.lower() in line.lower():
            line = line.split("=")[1].strip()
            if "'" in line or '"' in line or '"""' in line:
                line = line.replace("'", "").replace('"', '').replace('"""', '')
            return line