Like :func:`getref` but print results to screen instead of returning
    a dictionary.
966227
def showref():
    
    refdata = getref()
    for k, v in refdata.items():
        print("%10s: %s" % (k,v))
852854
def get_reference_results(self):
        
        referenceresults = self.context.getReferenceResults()
        return dict(map(lambda rr: (rr.get("uid"), rr), referenceresults))
740755
def _get_ref(data, position, obj_end, opts, element_name):
    """"""
    collection, position = _get_string(
        data, position, obj_end, opts, element_name)
    oid, position = _get_oid(data, position, obj_end, opts, element_name)
    return DBRef(collection, oid), position
1103306
def _get_full_output(node, for_output=False):
    '''
    
    '''
    ret = {}
    for item in six.iterkeys(node):
        value = node[item]
        if value is not None and for_output:
            value = six.text_type(value)
        ret[item] = value
    return ret
1364584
def reprsig(fun, name=None, method=False):
    """"""
    args, varargs, keywords, defs, kwargs = [], [], None, [], {}
    argspec = fun
    if callable(fun):
        name = fun.__name__ if name is None else name
        argspec = getargspec(fun)
    try:
        args = argspec[0]
        varargs = argspec[1]
        keywords = argspec[2]
        defs = argspec[3]
    except IndexError:
        pass
    if defs:
        args, kwkeys = args[:-len(defs)], args[-len(defs):]
        kwargs = dict(zip(kwkeys, defs))
    if varargs:
        args.append('*' + varargs)
    if method:
        args.insert(0, 'self')
    return reprcall(name, map(str, args), kwargs, keywords,
                    argfilter=str)
714794
def get_xrefs_list(cls, class_item, method=None):
        
        log.debug("Getting XREF for %s" % class_item)

        item = class_item
        if method:
            item = method

        return XrefDialog.get_xrefs_list_from_element(item)
740162
def _print_dict(elem_dict):
    
    for key, value in sorted(elem_dict.iteritems()):
        if isinstance(value, collections.Iterable):
            print(key, len(value))
        else:
            print(key, value)
475077
def _getattr(self, attri, fname=None, numtype='cycNum'):
        ''' '''
        if str(fname.__class__)=="<type 'list'>":
            isList=True
        else:
            isList=False

        data=[]
        if fname==None:
            fname=self.files
            numtype='file'
            isList=True
        if isList:
            for i in range(len(fname)):
                if attri in self.cattrs:
                    data.append(self.getCycleData(attri,fname[i],numtype))
                elif attri in self.dcols:
                    data.append(self.getColData(attri,fname[i],numtype))
                elif attri in self.get('ISOTP',fname,numtype):
                    data.append(self.getElement(attri,fname[i],numtype))
                else:
                    print('Attribute '+attri+ ' does not exist')
                    print('Returning none')
                    return None

        else:
            if attri in self.cattrs:
                return self.getCycleData(attri,fname,numtype)
            elif attri in self.dcols:
                return self.getColData(attri,fname,numtype)
            elif attri in self.get('ISOTP',fname,numtype):
                return self.getElement(attri,fname,numtype)
            else:
                print('Attribute '+attri+ ' does not exist')
                print('Returning none')
                return None

        return data
905652
def get_function_call_repr(fn, args, kwargs):
    """"""

    result = get_full_name(fn) + "("
    first = True
    for v in args:
        if first:
            first = False
        else:
            result += ","
        result += repr(v)
    for k, v in kwargs.items():
        if first:
            first = False
        else:
            result += ","
        result += str(k) + "=" + repr(v)
    result += ")"
    return result
733336
def print_docs(self):
        '''
        
        '''
        docs = {}
        for name, func in six.iteritems(self.minion.functions):
            if name not in docs:
                if func.__doc__:
                    docs[name] = func.__doc__
        for name in sorted(docs):
            if name.startswith(self.opts.get('fun', '')):
                salt.utils.stringutils.print_cli('{0}:\n{1}\n'.format(name, docs[name]))
1208392
def collect(cls, result_key, func):
        
        def scanner(self, obj):
            if not getattr(self, result_key, None):
                setattr(self, result_key, [])
            rv = func(obj)
            if rv:
                getattr(self, result_key).append(rv)

        cls._scan(result_key, scanner)
282146
def _get_keys_defdict(self):
        '''
        '''
        # inspect argspecs
        argspec = inspect.getargspec(self.func)
        keys, defvals = argspec.args, argspec.defaults

        # convert to (list_of_argkeys, dict_of_default_keys)
        if defvals is None:
            return keys, None
        else:
            defvals = list(defvals)
            keys.reverse()
            defvals.reverse()
            defdict = dict(zip(keys, defvals))
            keys.reverse()
            return keys, defdict
718703
def print_results(args):
    """"""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, shortname in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                print("Excluded " + name)
                continue
            fp.write(u"add(%r, %r)\n" % (
              str(truncate_name(name)), str(shortname))
            )
307834
def mk_dict(results,description):
    """"""
    
    rows=[]
    for row in results:
        row_dict={}
        for idx in range(len(row)):
            col=description[idx][0]
            row_dict[col]=row[idx]
        rows.append(row_dict)
    return rows
21425
function getRef(target, opts) {
  let { renderedDimensions } = opts;

  //Define popper reference object and cy reference  object
  let refObject = {
    getBoundingClientRect: function() {
      return getBoundingBox(target, opts);
    },

    get clientWidth() {
      return renderedDimensions(target).w;
    },

    get clientHeight() {
      return renderedDimensions(target).h;
    },
  };

  return refObject;
}
1294438
def to_dict(self, get_value=None):
        """"""
        self.trim()
        result = {}
        for key, value in iteritems(self.counters):
            if get_value is not None:
                value = getattr(value, get_value)
            r = result
            for _key in key[:-1]:
                r = r.setdefault(_key, {})
            r[key[-1]] = value
        return result
772907
def print_fieldrefs(doc, loader, stream):
    # type: (List[Dict[Text, Any]], Loader, IO) -> None
    """"""
    obj = extend_and_specialize(doc, loader)

    primitives = set(("http://www.w3.org/2001/XMLSchema#string",
                      "http://www.w3.org/2001/XMLSchema#boolean",
                      "http://www.w3.org/2001/XMLSchema#int",
                      "http://www.w3.org/2001/XMLSchema#long",
                      "https://w3id.org/cwl/salad#null",
                      "https://w3id.org/cwl/salad#enum",
                      "https://w3id.org/cwl/salad#array",
                      "https://w3id.org/cwl/salad#record",
                      "https://w3id.org/cwl/salad#Any"))

    stream.write("digraph {\n")
    for entry in obj:
        if entry.get("abstract"):
            continue
        if entry["type"] == "record":
            label = shortname(entry["name"])
            for field in entry.get("fields", []):
                found = set()  # type: Set[Text]
                field_name = shortname(field["name"])
                replace_type(field["type"], {}, loader, found, find_embeds=False)
                for each_type in found:
                    if each_type not in primitives:
                        stream.write(
                            "\"%s\" -> \"%s\" [label=\"%s\"];\n"
                            % (label, shortname(each_type), field_name))
    stream.write("}\n")