Returns the most used tags as a sequence of TopItem objects.
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
763341
function getIntersectionTemplateTags(start, end) {
            return microTemplateService
                .getMicroTemplateTokens()
                .filter(
                    token =>
                        Math.max(start, token.range[0]) <=
                        Math.min(end, token.range[1])
                )
                .sort((a, b) => a.range[0] - b.range[0])
        }
916544
def tags(self):
        
        tags = self.attrs.get('RepoTags')
        if tags is None:
            tags = []
        return [tag for tag in tags if tag != '<none>:<none>']
741268
public List<Tag> getRootTags()
    {
        return this.definedTags.values().stream()
                    .filter(Tag::isRoot)
                    .collect(Collectors.toList());
    }
71987
public Set<String> getTags() {
    Set<String> tags = new HashSet<String>(classIndex.objectsList());
    tags.remove(flags.backgroundSymbol);
    return tags;
  }
579985
def tag_list(self):
        """"""
        tags = [tag.strip() for tag in self.tag_string.split(",")]
        return sorted(filter(None, tags))
1158156
protected function get_tag_collection() {
        if (empty($this->tagsoptions['tagcollid']) && (empty($this->tagsoptions['itemtype']) ||
                empty($this->tagsoptions['component']))) {
            debugging('You need to specify \'itemtype\' and \'component\' of the tagged '
                    . 'area in the tags form element options',
                    DEBUG_DEVELOPER);
        }
        if (!empty($this->tagsoptions['tagcollid'])) {
            return $this->tagsoptions['tagcollid'];
        }
        if ($this->tagsoptions['itemtype']) {
            $this->tagsoptions['tagcollid'] = core_tag_area::get_collection($this->tagsoptions['component'],
                    $this->tagsoptions['itemtype']);
        } else {
            $this->tagsoptions['tagcollid'] = core_tag_collection::get_default();
        }
        return $this->tagsoptions['tagcollid'];
    }
867600
def _rank_tags(tagged_paired_aligns):
    ''''''
    tag_count_dict = defaultdict(int)
    for paired_align in tagged_paired_aligns:
        tag_count_dict[paired_align.umt] += 1
    tags_by_count = utils.sort_dict(tag_count_dict)
    ranked_tags = [tag_count[0] for tag_count in tags_by_count]
    return ranked_tags
1153333
def get_items(self):
        """"""
        itemlist = []
        def add_to_itemlist(item):
            for index in range(item.childCount()):
                citem = item.child(index)
                itemlist.append(citem)
                add_to_itemlist(citem)
        for tlitem in self.get_top_level_items():
            add_to_itemlist(tlitem)
        return itemlist
1312021
def tag(self, tokens):
        """"""
        # Lazy load model first time we tag
        if not self.classes:
            self.load(self.model)
        prev, prev2 = self.START
        tags = []
        for i, token in enumerate(tokens):
            tag = self.tagdict.get(token)
            if not tag:
                features = self._get_features(i, tokens, prev, prev2)
                tag = self.perceptron.predict(features)
            tags.append((token, tag))
            prev2 = prev
            prev = tag
        return tags
972805
private List<Tag> getInvoicesTags(final InternalTenantContext context) {
        return tagInternalApi.getTagsForAccountType(ObjectType.INVOICE, false, context);
    }
922179
def _gettags(self, codes=None, lock=None):
        """"""
        tags = []
        for tag in self.tags.values():
            code = tag.code
            if not codes or code in codes:
                tags.append((code, tag))
        return tags
1346035
public Set<Tag> getDescendantTags(Tag tag)
    {
        Set<Tag> ancestors = new HashSet<>();
        getDescendantTags(tag, ancestors);
        return ancestors;
    }
1180175
def tags(instance)
      return [] if instance.groupSet.nil? || instance.groupSet.item.empty?
      instance.groupSet.item.collect{|g| g.groupId }.select {|s| s.start_with? "#poolparty"}
    end
1214862
public static BasicTagList of(String... tags) {
    Preconditions.checkArgument(tags.length % 2 == 0,
        "tags must be a sequence of key,value pairs");

    final SmallTagMap.Builder builder = SmallTagMap.builder();
    for (int i = 0; i < tags.length; i += 2) {
      Tag t = Tags.newTag(tags[i], tags[i + 1]);
      builder.add(t);
    }
    return new BasicTagList(builder.result());
  }
169491
def tags(self):
        ''''''
        return itertools.product(
            self.py_version.split('.'),
            self.abi.split('.'),
            self.platform.split('.'),
        )
998475
def tagsOf(self, obj):
        
        return self.store.query(
            Tag,
            AND(Tag.catalog == self,
                Tag.object == obj)).getColumn("name")