Look for a Tags object to output a Tags import
194134
def _output_tags(self):
        """"""
        for class_name, properties in sorted(self.resources.items()):
            for key, value in sorted(properties.items()):
                validator = self.override.get_validator(class_name, key)
                if key == 'Tags' and validator is None:
                    print("from troposphere import Tags")
                    return
        for class_name, properties in sorted(self.properties.items()):
            for key, value in sorted(properties.items()):
                validator = self.override.get_validator(class_name, key)
                if key == 'Tags' and validator is None:
                    print("from troposphere import Tags")
                    return
206268
function getImports(sourceFile) {
    var imports = [];
    handleNode(sourceFile);

    function handleNode(node) {
        switch (node.kind) {
            case ts.SyntaxKind.ImportDeclaration:
                imports.push(node.moduleSpecifier.text);
                break;
            case ts.SyntaxKind.ImportEqualsDeclaration:
                imports.push(node.moduleReference.expression.text);
                break;
        }
        ts.forEachChild(node, handleNode);
    }
    return imports;
}
843569
def tag_dict(obj, *args, **kwargs):
    """"""

    if isinstance(obj, OrderedDict):
        return _TaggedOrderedDict(obj, *args, **kwargs)
    else:
        return _TaggedPlainDict(obj, *args, **kwargs)
70259
def toTag(self, output):
        ''' 
        '''
        feed = output.createElement('feed')
        feed.setAttribute('name', self.name)
        feed.setAttribute('priority', str(self.priority))

        # schedule
        schedule = output.createElement('schedule')
        schedule.setAttribute('dayOfMonth', self.dayOfMonth)
        schedule.setAttribute('dayOfWeek', self.dayOfWeek)
        schedule.setAttribute('hour', self.hour)
        schedule.setAttribute('minute', self.minute)
        if self.retry:
            schedule.setAttribute('retry', self.retry)
        feed.appendChild(schedule)

        # url
        url = output.createElement('url')
        url.appendChild(output.createTextNode(self.url))
        feed.appendChild(url)

        # source
        if self.source:
            source = output.createElement('source')
            source.appendChild(output.createTextNode(self.source))
            feed.appendChild(source)
        return feed
18911
def list_tags(self):
        
        from highton.models.tag import Tag
        return fields.ListField(
            name=self.ENDPOINT,
            init_class=Tag
        ).decode(
            self.element_from_string(
                self._get_request(
                    endpoint=self.ENDPOINT + '/' + str(self.id) + '/' + Tag.ENDPOINT,
                ).text
            )
        )
974515
function findExports( ast ) {
    try {
        const
            publics = {},
            privates = {},
            body = ast.program.body[ 0 ].expression.arguments[ 1 ].body.body;

        body.forEach( function ( item ) {
            if ( parseExports( item, publics ) ) return;
            if ( parseModuleExports( item, publics ) ) return;
            parseFunctionDeclaration( item, privates );
        } );

        const output = [];
        Object.keys( publics ).forEach( function ( exportName ) {
            const
                exportValue = publics[ exportName ],
                target = privates[ exportValue.target ];
            if ( target ) {
                exportValue.comments = exportValue.comments || target.comments;
                exportValue.type = target.type;
                exportValue.params = target.params;
            }
            output.push( {
                id: exportName,
                type: exportValue.type,
                params: exportValue.params,
                comments: exportValue.comments
            } );
        } );

        return output;
    } catch ( ex ) {
        throw new Error( `${ex}\n...in module-analyser/findExports()` );
    }
}
315904
def __get_tag_ids(self, tags):
        """"""

        db_tags = self.fetchall("select * from tags where name in (%s)"
                                            % ",".join(["?"] * len(tags)), tags) # bit of magic here - using sqlites bind variables

        changes = False

        # check if any of tags needs resurrection
        set_complete = [str(tag["id"]) for tag in db_tags if tag["autocomplete"] == "false"]
        if set_complete:
            changes = True
            self.execute("update tags set autocomplete='true' where id in (%s)" % ", ".join(set_complete))


        found_tags = [tag["name"] for tag in db_tags]

        add = set(tags) - set(found_tags)
        if add:
            statement = "insert into tags(name) values(?)"

            self.execute([statement] * len(add), [(tag,) for tag in add])

            return self.__get_tag_ids(tags)[0], True # all done, recurse
        else:
            return db_tags, changes
747141
def analysis_add_tags(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addTags' % object_id, input_params, always_retry=always_retry, **kwargs)
755024
def process_tags(inst_tags):
    """"""
    tag_dict = {}
    for k in range(len(inst_tags)):
        tag_dict[inst_tags[k]['Key']] = inst_tags[k]['Value']
    return tag_dict
169491
def tags(self):
        ''''''
        return itertools.product(
            self.py_version.split('.'),
            self.abi.split('.'),
            self.platform.split('.'),
        )
1248331
def get_tags(self):
        
        j, _ = self.datacenter.request('GET', self.path + '/tags')
        return j
1049081
def tag(**tags):
    
    transaction = execution_context.get_transaction()
    if not transaction:
        error_logger.warning("Ignored tags %s. No transaction currently active.", ", ".join(tags.keys()))
    else:
        transaction.tag(**tags)
978350
def tagged(*tags: Tags) -> Callable:
    global GREENSIM_TAG_ATTRIBUTE
    
    def hook(event: Callable):
        def wrapper(*args, **kwargs):
            event(*args, **kwargs)
        setattr(wrapper, GREENSIM_TAG_ATTRIBUTE, tags)
        return wrapper
    return hook
415287
def find_by_tag(self, tag, params={}, **options): 
        
        path = "/tags/%s/tasks" % (tag)
        return self.client.get_collection(path, params, **options)
115322
def get_tags(doc):
    '''
    
    '''
    tags = list()

    for el in doc.getroot().iter():
        if isinstance(el, lxml.html.HtmlElement):
            tags.append(el.tag)
        elif isinstance(el, lxml.html.HtmlComment):
            tags.append('comment')
        else:
            raise ValueError('Don\'t know what to do with element: {}'.format(el))

    return tags
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
904578
def _get_tags(c):
    
    tags_ = []
    for tagstr in c.run("git tag", hide=True).stdout.strip().split("\n"):
        try:
            tags_.append(Version(tagstr))
        # Ignore anything non-semver; most of the time they'll be non-release
        # tags, and even if they are, we can't reason about anything
        # non-semver anyways.
        # TODO: perhaps log these to DEBUG
        except ValueError:
            pass
    # Version objects sort semantically
    return sorted(tags_)