Gets all victims from a tag.
340278
def victims(self, filters=None, params=None):
        
        victim = self._tcex.ti.victim(None)
        for v in self.tc_requests.victims_from_tag(
            victim, self.name, filters=filters, params=params
        ):
            yield v
194568
def filter(self):  # noqa A001
        """"""

        return [tag for tag in self.get_contents(self.tag) if not self.is_navigable_string(tag) and self.match(tag)]
220368
def strip_tags(cls, html):
        
        s = cls()
        s.feed(html)

        return s.get_data()
508914
def get_top_tags(self, limit=None, cacheable=True):
        """"""

        # Last.fm has no "limit" parameter for tag.getTopTags
        # so we need to get all (250) and then limit locally
        doc = _Request(self, "tag.getTopTags").execute(cacheable)

        seq = []
        for node in doc.getElementsByTagName("tag"):
            if limit and len(seq) >= limit:
                break
            tag = Tag(_extract(node, "name"), self)
            weight = _number(_extract(node, "count"))
            seq.append(TopItem(tag, weight))

        return seq
1040657
def _gettags(self, codes=None, lock=None):
        """"""
        fh = self.parent.filehandle
        tiff = self.parent.tiff
        unpack = struct.unpack
        lock = NullContext() if lock is None else lock
        tags = []

        with lock:
            fh.seek(self.offset)
            try:
                tagno = unpack(tiff.tagnoformat, fh.read(tiff.tagnosize))[0]
                if tagno > 4096:
                    raise TiffFileError('suspicious number of tags')
            except Exception:
                raise TiffFileError(
                    'corrupted page list at offset %i' % self.offset)

            tagoffset = self.offset + tiff.tagnosize  # fh.tell()
            tagsize = tiff.tagsize
            tagindex = -tagsize
            codeformat = tiff.tagformat1[:2]
            tagbytes = fh.read(tagsize * tagno)

            for _ in range(tagno):
                tagindex += tagsize
                code = unpack(codeformat, tagbytes[tagindex:tagindex+2])[0]
                if codes and code not in codes:
                    continue
                try:
                    tag = TiffTag(self.parent,
                                  tagbytes[tagindex:tagindex+tagsize],
                                  tagoffset+tagindex)
                except TiffFileError as exc:
                    log.warning('%s: %s', exc.__class__.__name__, exc)
                    continue
                tags.append((code, tag))

        return tags
1341484
def findB(self, tag_name, params=None, fn=None, case_sensitive=False):
        
        return [
            x for x in self.findAllB(tag_name, params, fn, case_sensitive)
            if not x.isEndTag()
        ]
354753
def query_all():
        '''
        
        '''
        recs = TabPost2Tag.select(
            TabPost2Tag,
            TabTag.kind.alias('tag_kind'),
        ).join(
            TabTag,
            on=(TabPost2Tag.tag_id == TabTag.uid)
        )
        return recs
954461
function processTag(tag, targets) {
  if (tag.description) {
    tag.description = replaceLink(tag.description, targets);
  }
  if (tag.params) {
    tag.params.forEach(function (param) {
      if (param.description) {
        param.description = replaceLink(param.description, targets);
      }
    });
  }
  if (tag.members) {
    tag.members.forEach(function (member) {
      processTag(member, targets);
    });
  }
  if (tag.methods) {
    tag.methods.forEach(function (method) {
      processTag(method, targets);
    });
  }
}
89574
def remove_all(self, *tagnames):
        
        for tagname in tagnames:
            matching = self.findall(qn(tagname))
            for child in matching:
                self.remove(child)
99691
def load_tags(self, max_pages=30):
        
        logger.info("loading tags")

        # clear them all out so we don't get dupes if requested
        if self.purge_first:
            Tag.objects.filter(site_id=self.site_id).delete()

        path = "sites/{}/tags".format(self.site_id)
        params = {"number": 1000}
        page = 1

        response = self.get(path, params)

        if not response.ok:
            logger.warning("Response NOT OK! status_code=%s\n%s", response.status_code, response.text)

        while response.ok and response.text and page < max_pages:
            logger.info(" - page: %d", page)

            api_tags = response.json().get("tags")
            if not api_tags:
                # we're done here
                break

            tags = []
            for api_tag in api_tags:

                # if it exists locally, update local version if anything has changed
                existing_tag = Tag.objects.filter(site_id=self.site_id, wp_id=api_tag["ID"]).first()
                if existing_tag:
                    self.update_existing_tag(existing_tag, api_tag)
                else:
                    tags.append(self.get_new_tag(api_tag))

            if tags:
                Tag.objects.bulk_create(tags)
            elif not self.full:
                # we're done here
                break

            # get next page
            page += 1
            params["page"] = page
            response = self.get(path, params)

            if not response.ok:
                logger.warning("Response NOT OK! status_code=%s\n%s", response.status_code, response.text)
                return
383596
def get_tags(self, only_autocomplete = False):
        """"""
        return self._to_dict(('id', 'name', 'autocomplete'), self.conn.GetTags(only_autocomplete))
520740
public function all($tag) {
  $i = $this->image = new Image;
  $images = $this->get($tag, 'basename');
  $results = array();
  foreach($images as $image) {
   try {
    $results[] = $i->get($image['uid']);
   }
   catch(\Exception $e) {
    if ($e->getCode() != 403) {
     throw new \Exception($e);
    }
   }
  }
  return $results;
 }
849888
def _all_tag(self):
        
        all_tag = self.get_conf_value('all')
        if len(all_tag) == 0:
            return False
        else:
            return all_tag[0].lower() == 'true'
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
1266994
def getAllNodes(self):
        '''
            
        '''
        ret = TagCollection()

        for tag in self:
            ret.append(tag)
            ret += tag.getAllChildNodes()

        return ret
635922
def tagged(self, tag, offset=0, count=25):
        ''''''
        return json.loads(self.client('tag', 'get', tag, offset, count))
1080146
def find_all(self, tagtype):
        '''  '''
        return [t for t in self.__tags if t.tagtype == tagtype]