Stream for all public statuses for the hashtag 'tag' seen by the connected
        instance.
192521
def stream_hashtag(self, tag, listener, run_async=False, timeout=__DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=__DEFAULT_STREAM_RECONNECT_WAIT_SEC):
        
        if tag.startswith("#"):
            raise MastodonIllegalArgumentError("Tag parameter should omit leading #")
        return self.__stream("/api/v1/streaming/hashtag?tag={}".format(tag), listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec)
1086481
def is_on_tag(self) -> bool:
        
        if self.get_current_tag():
            LOGGER.debug('latest commit is tagged')
            return True

        LOGGER.debug('latest commit is NOT tagged')
        return False
328698
def get_instances_by_tag(self, tags):
        

        try:
            c = ec2.connect_to_region(self._region,
                                      aws_access_key_id=self._aws_access_key_id,
                                      aws_secret_access_key=self._aws_secret_access_key)

            # select instance by list of tags (OR used)
            reservations = c.get_all_reservations(filters=SergentSsh.tags_to_dict(tags))
            instances = list()

            for r in reservations:
                # for each instance launched by this reservation
                for instance in r.instances:
                    # we need only running instances
                    if instance.state.lower() == 'running':
                        instances.append(instance)

            return instances
        except NoAuthHandlerFound:
            raise SergentSshException('Boto said that you should check your credentials')
125656
public List<Tag> getPrimeTags()
    {
        return this.definedTags.values().stream()
                    .filter(Tag::isPrime)
                    .collect(Collectors.toList());
    }
1040222
function getTags (poet) {
  return poet.cache.tags || (poet.cache.tags = utils.getTags(getPosts(poet)));
}
608762
public void status(int statusTag, Object[] o) {
        switch (statusTag) {
            case STATUS_INST_BPD_INIT:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_INST_DATA"));
                break;
            case STATUS_INST_BPD_INIT_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_INST_DATA_DONE"));
                break;
            case STATUS_INST_GET_KEYS:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_INST_KEYS"));
                break;
            case STATUS_INST_GET_KEYS_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_INST_KEYS_DONE"));
                break;
            case STATUS_SEND_KEYS:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_SEND_MY_KEYS"));
                break;
            case STATUS_SEND_KEYS_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_SEND_MY_KEYS_DONE"));
                getOutStream().println("status: " + ((HBCIMsgStatus) o[0]).toString());
                break;
            case STATUS_INIT_SYSID:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_SYSID"));
                break;
            case STATUS_INIT_SYSID_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_SYSID_DONE", o[1].toString()));
                getOutStream().println("status: " + ((HBCIMsgStatus) o[0]).toString());
                break;
            case STATUS_INIT_SIGID:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_SIGID"));
                break;
            case STATUS_INIT_SIGID_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_SIGID_DONE", o[1].toString()));
                getOutStream().println("status: " + ((HBCIMsgStatus) o[0]).toString());
                break;
            case STATUS_INIT_UPD:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_USER_DATA"));
                break;
            case STATUS_INIT_UPD_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_REC_USER_DATA_DONE"));
                break;
            case STATUS_LOCK_KEYS:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_USR_LOCK"));
                break;
            case STATUS_LOCK_KEYS_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_USR_LOCK_DONE"));
                getOutStream().println("status: " + ((HBCIMsgStatus) o[0]).toString());
                break;
            case STATUS_DIALOG_INIT:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_DIALOG_INIT"));
                break;
            case STATUS_DIALOG_INIT_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_DIALOG_INIT_DONE", o[1]));
                getOutStream().println("status: " + ((HBCIMsgStatus) o[0]).toString());
                break;
            case STATUS_SEND_TASK:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_DIALOG_NEW_JOB",
                    ((AbstractHBCIJob) o[0]).getName()));
                break;
            case STATUS_SEND_TASK_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_DIALOG_JOB_DONE",
                    ((AbstractHBCIJob) o[0]).getName()));
                break;
            case STATUS_DIALOG_END:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_DIALOG_END"));
                break;
            case STATUS_DIALOG_END_DONE:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_DIALOG_END_DONE"));
                getOutStream().println("status: " + ((HBCIMsgStatus) o[0]).toString());
                break;
            case STATUS_MSG_CREATE:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_CREATE", o[0].toString()));
                break;
            case STATUS_MSG_SIGN:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_SIGN"));
                break;
            case STATUS_MSG_CRYPT:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_CRYPT"));
                break;
            case STATUS_MSG_SEND:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_SEND"));
                break;
            case STATUS_MSG_RECV:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_RECV"));
                break;
            case STATUS_MSG_PARSE:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_PARSE", o[0].toString() + ")"));
                break;
            case STATUS_MSG_DECRYPT:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_DECRYPT"));
                break;
            case STATUS_MSG_VERIFY:
                getOutStream().println("  " + HBCIUtils.getLocMsg("STATUS_MSG_VERIFY"));
                break;
            case STATUS_SEND_INFOPOINT_DATA:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_SEND_INFOPOINT_DATA"));
                break;

            case STATUS_MSG_RAW_SEND:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_MSG_RAW_SEND", o[0].toString()));
                break;

            case STATUS_MSG_RAW_RECV:
                getOutStream().println(HBCIUtils.getLocMsg("STATUS_MSG_RAW_RECV", o[0].toString()));
                break;

            default:
                throw new HBCI_Exception(HBCIUtils.getLocMsg("STATUS_INVALID", Integer.toString(statusTag)));
        }
    }
1252927
def status_reblogged_by(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/statuses/{0}/reblogged_by'.format(str(id))
        return self.__api_request('GET', url)
1167017
def _report_pods_running(self, pods, instance_tags):
        
        pods_tag_counter = defaultdict(int)
        containers_tag_counter = defaultdict(int)
        for pod in pods['items']:
            # Containers reporting
            containers = pod.get('status', {}).get('containerStatuses', [])
            has_container_running = False
            for container in containers:
                container_id = container.get('containerID')
                if not container_id:
                    self.log.debug('skipping container with no id')
                    continue
                if "running" not in container.get('state', {}):
                    continue
                has_container_running = True
                tags = tagger.tag(container_id, tagger.LOW) or None
                if not tags:
                    continue
                tags += instance_tags
                hash_tags = tuple(sorted(tags))
                containers_tag_counter[hash_tags] += 1
            # Pod reporting
            if not has_container_running:
                continue
            pod_id = pod.get('metadata', {}).get('uid')
            if not pod_id:
                self.log.debug('skipping pod with no uid')
                continue
            tags = tagger.tag('kubernetes_pod://%s' % pod_id, tagger.LOW) or None
            if not tags:
                continue
            tags += instance_tags
            hash_tags = tuple(sorted(tags))
            pods_tag_counter[hash_tags] += 1
        for tags, count in iteritems(pods_tag_counter):
            self.gauge(self.NAMESPACE + '.pods.running', count, list(tags))
        for tags, count in iteritems(containers_tag_counter):
            self.gauge(self.NAMESPACE + '.containers.running', count, list(tags))
354753
def query_all():
        '''
        
        '''
        recs = TabPost2Tag.select(
            TabPost2Tag,
            TabTag.kind.alias('tag_kind'),
        ).join(
            TabTag,
            on=(TabPost2Tag.tag_id == TabTag.uid)
        )
        return recs
66955
def fetch_tag_shas_async(tags)
      i = 0
      threads = []
      print_in_same_line("Fetching SHAs for tags: #{i}/#{tags.count}\r") if @options[:verbose]

      tags.each_slice(MAX_THREAD_NUMBER) do |tags_slice|
        tags_slice.each do |tag|
          threads << Thread.new do
            # Use oldest commit because comparing two arbitrary tags may be diverged
            commits_in_tag = fetch_compare(oldest_commit["sha"], tag["name"])
            tag["shas_in_tag"] = commits_in_tag["commits"].collect { |commit| commit["sha"] }
            print_in_same_line("Fetching SHAs for tags: #{i + 1}/#{tags.count}") if @options[:verbose]
            i += 1
          end
        end
        threads.each(&:join)
        threads = []
      end

      # to clear line from prev print
      print_empty_line

      Helper.log.info "Fetching SHAs for tags: #{i}"
      nil
    end
326619
def synchronize(self, status):
        """"""
        self._version = status.get('server').get('version')
        self._groups = {}
        self._clients = {}
        self._streams = {}
        for stream in status.get('server').get('streams'):
            self._streams[stream.get('id')] = Snapstream(stream)
            _LOGGER.debug('stream found: %s', self._streams[stream.get('id')])
        for group in status.get('server').get('groups'):
            self._groups[group.get('id')] = Snapgroup(self, group)
            _LOGGER.debug('group found: %s', self._groups[group.get('id')])
            for client in group.get('clients'):
                self._clients[client.get('id')] = Snapclient(self, client)
                _LOGGER.debug('client found: %s', self._clients[client.get('id')])
202817
def get_top_by_tag(tags, options={})
      api_response = @api_client.make_api_request(:GET, "artist/byTag/top", {:tags => tags}, options)
      @api_client.artist_digestor.nested_list_from_xml_doc(api_response.item_xml("taggedResults"), :taggedItem, :artist)
    end
841231
def fetch_recent_images_by_tag(tag = nil)
      configure_connection
      tag ||= Lentil::Engine::APP_CONFIG["default_image_search_tag"]
      Instagram.tag_recent_media(tag, :count=>10)
    end
200017
def dynamic_filter(self):
        """"""

        url = 'https://stream.twitter.com/%s/statuses/filter.json' \
              % self.streamer.api_version
        self.streamer._request(url, 'POST', params=self.params)
113461
def tag_myself(project='cwc', **other_tags):
    """"""
    base_url = "http://169.254.169.254"
    try:
        resp = requests.get(base_url + "/latest/meta-data/instance-id")
    except requests.exceptions.ConnectionError:
        logger.warning("Could not connect to service. Note this should only "
                       "be run from within a batch job.")
        return
    instance_id = resp.text
    tag_instance(instance_id, project=project, **other_tags)
    return
113265
def view_all_tags(ctx, param, value):
    
    # To make sure this function executed only when the flag was called
    if not value or ctx.resilient_parsing:
        return
    avail_tags = dict()
    print("\nMultiQC Available module tag groups:\n")
    for mod_dict in filter(lambda mod:isinstance(mod, dict), config.module_order):
        mod_key, mod_val = list(mod_dict.items())[0]
        tags = list(mod_val.get('module_tag', []))
        for t in tags:
            if t not in avail_tags:
                avail_tags[t] = []
            avail_tags[t].append(mod_key)
    for t in sorted(avail_tags.keys(), key=lambda s: s.lower()):
        print (" - {}:".format(t))
        for ttgs in avail_tags[t]:
            print ("   - {}".format(ttgs))
    ctx.exit()
421321
def start
      keywords = self.params["keywords"]
      @thread = Thread.new do 
        @client.filter_by_keywords(keywords) do |status|
          if retweet?(status)
            before_retweet.trigger(status)
            @retweet.retweet(status["id"])
            after_retweet.trigger(status)
          end
        end
      end
      @thread.join
    end