Retrieve all posts where a profile is tagged.

        .. versionadded:: 4.0.7
497867
def get_tagged_posts(self) -> Iterator[Post]:
        """"""
        self._obtain_metadata()
        yield from (Post(self._context, node, self if int(node['owner']['id']) == self.userid else None) for node in
                    self._context.graphql_node_list("e31a871f7301132ceaab56507a66bbb7",
                                                    {'id': self.userid},
                                                    'https://www.instagram.com/{0}/'.format(self.username),
                                                    lambda d: d['data']['user']['edge_user_to_photos_of_you'],
                                                    self._rhx_gis))
242957
function findAll(tags, key) {
  return tags
    .filter(function(tag) {
      return tag && tag.type === key
    })
    .map(function(tag) {
      return tag.string
    })
}
44752
def get_users_by_tag(self, tag_id, next_open_id=""):
        
        return self.post(
            url="https://api.weixin.qq.com/cgi-bin/user/tag/get",
            data={
                "tagid": tag_id,
                "next_openid": next_open_id
            }
        )
40234
def fetch_post_data(self):
        '''
        
        '''
        post_data = {}
        ext_dic = {}
        for key in self.request.arguments:
            if key.startswith('ext_') or key.startswith('tag_'):
                ext_dic[key] = self.get_argument(key)
            else:
                post_data[key] = self.get_arguments(key)[0]

        post_data['user_name'] = self.userinfo.user_name
        post_data['kind'] = self.kind

        # append external infor.

        if 'tags' in post_data:
            ext_dic['def_tag_arr'] = [x.strip() for x
                                      in post_data['tags'].strip().strip(',').split(',')]
        ext_dic = dict(ext_dic, **self.ext_post_data(postdata=post_data))

        return (post_data, ext_dic)
507942
def looking_for(self):
        
        looking_for = self.source_profile.looking_for
        return self.dest_user.profile.looking_for.update(
            gentation=looking_for.gentation,
            single=looking_for.single,
            near_me=looking_for.near_me,
            kinds=looking_for.kinds,
            ages=looking_for.ages
        )
885348
def all(self):
        
        attribute = self._attr[0]
        return self.profile.data.get(attribute, [])
49415
def get_queryset(self):
        
        self.tag = get_tag(self.kwargs['tag'])
        if self.tag is None:
            raise Http404(_('No Tag found matching "%s".') %
                          self.kwargs['tag'])
        return TaggedItem.objects.get_by_model(
            Entry.published.all(), self.tag)
743131
function postGetTags(id, cb) {
  var q  =
    'SELECT * FROM tags t ' +
      'JOIN posts_tags pt ON t.id = pt.tag_id AND pt.post_id = $1';

  db.getClient(function(err, client, done) {
    client.query(q, [id], function(err, r) {
      if(err) {
        cb(err);
        done(err);
      } else {
        cb(null, r.rows);
        done();
      }
    });
  });
}
248956
def get_tags(instance_id=None, keyid=None, key=None, profile=None,
             region=None):
    '''
    
    '''
    tags = []
    client = _get_conn(key=key, keyid=keyid, profile=profile, region=region)
    result = client.get_all_tags(filters={"resource-id": instance_id})
    if result:
        for tag in result:
            tags.append({tag.name: tag.value})
    else:
        log.info("No tags found for instance_id %s", instance_id)
    return tags
681602
def get_post_by_id(self, post_id):
        
        r = None
        post_id = _as_int(post_id)
        with self._engine.begin() as conn:
            try:
                post_statement = sqla.select([self._post_table]) \
                    .where(self._post_table.c.id == post_id) \
                    .alias('post')

                joined_statement = post_statement.join(self._tag_posts_table) \
                    .join(self._tag_table) \
                    .join(self._user_posts_table) \
                    .alias('join')

                # Note this will retrieve one row per tag
                all_rows = conn.execute(
                    sqla.select([joined_statement])
                ).fetchall()
                r = self._serialise_posts_and_tags_from_joined_rows(
                    all_rows
                )[0]

            except Exception as e:
                self._logger.exception(str(e))
                r = None
        return r
798138
def by_tag_id(self,tag_id):
		'''

		'''
		query = meta.Session.query(TagSemanticTag).filter(TagSemanticTag.tag_id==tag_id)
		return query.first()
1083143
def list_tags(userdata):
        
        macros = re.findall('@(.*?)@', userdata)
        logging.info('List of available macros:')
        for macro in macros:
            logging.info('\t%r', macro)
386051
function getPosts(req, res, next) {
  db.tags.find(req.params.tag, function(err, tag) {
    if(err) { return next(err); }

    db.posts_tags.tagGetPosts(tag.id, function(err, posts) {
      if(err) { return next(err); }
      res.format({
        'text/html': function() {
          res.render('tags/show', {posts: posts, tag: tag});
        },
        'application/json': function() {
          res.json(posts);
        }
      });
    });
  });
}
667765
def tagged(self, other_model=None, queryset=None):
        
        tags = self._taglist(other_model, queryset)
        return self.get_queryset().filter(tags__in=tags).distinct()
1296458
def get_hashtag_posts(self, hashtag: str) -> Iterator[Post]:
        """"""
        has_next_page = True
        end_cursor = None
        while has_next_page:
            if end_cursor:
                params = {'__a': 1, 'max_id': end_cursor}
            else:
                params = {'__a': 1}
            hashtag_data = self.context.get_json('explore/tags/{0}/'.format(hashtag),
                                                 params)['graphql']['hashtag']['edge_hashtag_to_media']
            yield from (Post(self.context, edge['node']) for edge in hashtag_data['edges'])
            has_next_page = hashtag_data['page_info']['has_next_page']
            end_cursor = hashtag_data['page_info']['end_cursor']
1289438
def find_tags(self, tag_name, **attribute_filter):
        
        all_tags = [
            self.find_tags_from_xml(
                i, tag_name, **attribute_filter
            )
            for i in self.xml
        ]
        return [tag for tag_list in all_tags for tag in tag_list]
744303
def get_tagged_sections(book_dir=BOOK_PATH, include_tags=None):
    
    return [(filepath, tag_lines(lines, include_tags=include_tags)) for filepath, lines in get_lines(book_dir)]