List videos given a certain set of tags.
184372
def find_by_tags(and_tags=None, or_tags=None, _connection=None,
        page_size=100, page_number=0, sort_by=enums.DEFAULT_SORT_BY,
        sort_order=enums.DEFAULT_SORT_ORDER):
        
        err = None
        if not and_tags and not or_tags:
            err = "You must supply at least one of either and_tags or or_tags."
        if and_tags and not isinstance(and_tags, (tuple, list)):
            err = "The and_tags argument for Video.find_by_tags must an "
            err += "iterable"
        if or_tags and not isinstance(or_tags, (tuple, list)):
            err = "The or_tags argument for Video.find_by_tags must an "
            err += "iterable"
        if err:
            raise exceptions.PyBrightcoveError(err)
        atags = None
        otags = None
        if and_tags:
            atags = ','.join([str(t) for t in and_tags])
        if or_tags:
            otags = ','.join([str(t) for t in or_tags])
        return connection.ItemResultSet('find_videos_by_tags',
            Video, _connection, page_size, page_number, sort_by, sort_order,
            and_tags=atags, or_tags=otags)
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)]
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
150607
def tags(self):
		'''

		'''
		q = meta.Session.query(_tag.Tag)
		q = q.join(TagSemanticTag)
		q = q.filter_by(tag_id=self.id)
#		q = q.filter_by(state='active')
		q = q.order_by(_tag.Tag.name)
		tags = q.all()
		return tags
287132
def tag(self, tokens):
        """"""
        tags = []
        for token in tokens:
            normalized = self.lexicon[token].normalized
            for regex, tag in self.regexes:
                if regex.match(normalized):
                    tags.append((token, tag))
                    break
            else:
                tags.append((token, None))
        return tags
413047
def get(video_id)
      params = {:id => video_id, :part => 'snippet,statistics'}
      request = Yourub::REST::Videos.list(self,params)
      Yourub::Result.format(request).first
    end
730590
def tag_stuff(self):
        """"""

        # For each packet in the pcap process the contents
        for item in self.input_stream:

            # Make sure it has a tags field (which is a set)
            if 'tags' not in item:
                item['tags'] = set()

            # For each tag_methods run it on the item
            for tag_method in self.tag_methods:
                item['tags'].add(tag_method(item))

            # Not interested in None tags
            if None in item['tags']:
                item['tags'].remove(None)
            # All done
            yield item
689362
def filter(subtags):
        
        if not isinstance(subtags, list):
            subtags = [subtags]
        return [subtag for subtag in subtags if len(tags.types(subtag)) == 0]
370819
def search_tags(self, tags):
        
        qs = self.filter(tags__name__in=tags).order_by('file').distinct()
        return qs
343508
def list_nodes_with_tag(tag):
    """"""
    lib.print_nodes(lib.get_nodes_with_tag(tag, env.chef_environment,
                                           littlechef.include_guests))
720214
def tags(tag_references):
    """"""
    if not tag_references:
        return blank()

    tag_row = []
    for tag_detail in tag_references:
        tag = utils.lookup(tag_detail, 'tag', 'name')
        if tag is not None:
            tag_row.append(tag)

    return listing(tag_row, separator=', ')
11812
function createAdPodRequest(tags, adPodBid) {
  const { durationRangeSec, requireExactDuration } = adPodBid.mediaTypes.video;

  const numberOfPlacements = getAdPodPlacementNumber(adPodBid.mediaTypes.video);
  const maxDuration = utils.getMaxValueFromArray(durationRangeSec);

  const tagToDuplicate = tags.filter(tag => tag.uuid === adPodBid.bidId);
  let request = utils.fill(...tagToDuplicate, numberOfPlacements);

  if (requireExactDuration) {
    const divider = Math.ceil(numberOfPlacements / durationRangeSec.length);
    const chunked = utils.chunk(request, divider);

    // each configured duration is set as min/maxduration for a subset of requests
    durationRangeSec.forEach((duration, index) => {
      chunked[index].map(tag => {
        setVideoProperty(tag, 'minduration', duration);
        setVideoProperty(tag, 'maxduration', duration);
      });
    });
  } else {
    // all maxdurations should be the same
    request.map(tag => setVideoProperty(tag, 'maxduration', maxDuration));
  }

  return request;
}
456210
def episode_list(a):
    """"""
    html = get_html(ROOT + a.get('href'))
    div = html.find('div', {'class': "list detail eplist"})
    links = []
    for tag in div.find_all('a', {'itemprop': "name"}):
        links.append(tag)
    return links
868776
def list_tags(context, id):
    

    result = job.list_tags(context, id)
    utils.format_output(result, context.format)
472190
def _build_tags(self, tag_names: List[str]) -> dict:
        """"""
        tags = {}
        for tag_name in tag_names:
            tag_obj = self.tag(tag_name)
            if tag_obj is None:
                LOG.debug(f"create new tag: {tag_name}")
                tag_obj = self.new_tag(tag_name)
            tags[tag_name] = tag_obj
        return tags
21192
def by_youtube_id(cls, youtube_id):
        
        qset = cls.objects.filter(
            encoded_videos__profile__profile_name='youtube',
            encoded_videos__url=youtube_id
        ).prefetch_related('encoded_videos', 'courses')
        return qset
1327488
def tags(self):
        """"""
        tags = self.pos_tags
        for i, tag in enumerate(self.ner_tags):
            if tag is not None:
                tags[i] = tag
        return tags