Build output for displaying function parameters.
966376
function makeSignature(params) {
	if (!params) return "()";
	var signature = "("
	+
	params.filter(
		function($) {
			return $.name.indexOf(".") == -1; // don't show config params in signature
		}
	).map(
		function($) {
			return $.name;
		}
	).join(", ")
	+
	")";
	return signature;
}
499730
def print_parameters(self):
        
        print("Static: ", self.params_st)
        print("Thermal: ", self.params_th)
        print("Anharmonic: ", self.params_anh)
        print("Electronic: ", self.params_el)
1110294
def parameters(self):
        """"""
        lines = Lines()
        lines.add(0, '@cython.final')
        lines.add(0, 'cdef class Parameters(object):')
        for subpars in self.model.parameters:
            if subpars:
                lines.add(1, 'cdef public %s %s'
                             % (objecttools.classname(subpars), subpars.name))
        for subpars in self.model.parameters:
            if subpars:
                print('        - %s' % subpars.name)
                lines.add(0, '@cython.final')
                lines.add(0, 'cdef class %s(object):'
                             % objecttools.classname(subpars))
                for par in subpars:
                    try:
                        ctype = TYPE2STR[par.TYPE] + NDIM2STR[par.NDIM]
                    except KeyError:
                        ctype = par.TYPE + NDIM2STR[par.NDIM]
                    lines.add(1, 'cdef public %s %s' % (ctype, par.name))
        return lines
737244
def print_params(self, allpars=False, loglevel=logging.INFO):
        """"""

        pars = self.get_params()

        o = '\n'
        o += '%4s %-20s%10s%10s%10s%10s%10s%5s\n' % (
            'idx', 'parname', 'value', 'error',
            'min', 'max', 'scale', 'free')

        o += '-' * 80 + '\n'

        src_pars = collections.OrderedDict()
        for p in pars:

            src_pars.setdefault(p['src_name'], [])
            src_pars[p['src_name']] += [p]

        free_sources = []
        for k, v in src_pars.items():

            for p in v:
                if not p['free']:
                    continue

                free_sources += [k]

        for k, v in src_pars.items():

            if not allpars and k not in free_sources:
                continue

            o += '%s\n' % k
            for p in v:

                o += '%4i %-20.19s' % (p['idx'], p['par_name'])
                o += '%10.3g%10.3g' % (p['value'], p['error'])
                o += '%10.3g%10.3g%10.3g' % (p['min'], p['max'],
                                             p['scale'])

                if p['free']:
                    o += '    *'
                else:
                    o += '     '

                o += '\n'

        self.logger.log(loglevel, o)
587287
def _pack_output(self, init_parameter):
        
        output = {}
        for i, param in enumerate(init_parameter):
            output[self.key_order[i]] = param
        return output
372250
def output(self, _filename):
        

        for contract in self.slither.contracts_derived:
            txt = "\nContract %s"%contract.name
            table = PrettyTable(["Function",
                                 "Modifiers"])
            for function in contract.functions:
                modifiers = function.modifiers
                for call in function.all_internal_calls():
                    if isinstance(call, Function):
                        modifiers += call.modifiers
                for (_, call) in function.all_library_calls():
                    if isinstance(call, Function):
                        modifiers += call.modifiers
                table.add_row([function.name, [m.name for m in set(modifiers)]])
            txt += "\n"+str(table)
            self.info(txt)
1310077
def outputtemplates(self):
        """"""
        outputtemplates = []
        for o in self.output:
            if isinstance(o, ParameterCondition):
                outputtemplates += o.allpossibilities()
            else:
                assert isinstance(o, OutputTemplate)
                outputtemplates.append(o)
        return outputtemplates
875797
def with_output(verbosity=1):
    
    def make_wrapper(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            configure_output(verbosity=verbosity)
            return func(*args, **kwargs)
        return wrapper
    return make_wrapper
1155021
function console_output(jobName, buildNumber, customParams, callback) {
      var _doArgs9 = doArgs(arguments, ['string', 'string|number', ['object', {}], 'function']);

      var _doArgs10 = _slicedToArray(_doArgs9, 4);

      jobName = _doArgs10[0];
      buildNumber = _doArgs10[1];
      customParams = _doArgs10[2];
      callback = _doArgs10[3];


      doRequest({
        urlPattern: [JOB_OUTPUT, jobName, buildNumber],
        noparse: true
      }, customParams, callback);
    }
22490
def print_functions(self, d):
        
        for c in self.contracts:
            for f in c.functions:
                f.cfg_to_dot(os.path.join(d, '{}.{}.dot'.format(c.name, f.name)))
1013190
def output(data, **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''

    params = {}
    if 'output_indent' not in __opts__:
        # default indentation
        params.update(default_flow_style=False)
    elif __opts__['output_indent'] >= 0:
        # custom indent
        params.update(default_flow_style=False,
                      indent=__opts__['output_indent'])
    else:  # no indentation
        params.update(default_flow_style=True,
                      indent=0)
    try:
        return salt.utils.yaml.safe_dump(data, **params)
    except Exception as exc:
        import pprint
        log.exception(
            'Exception %s encountered when trying to serialize %s',
            exc, pprint.pformat(data)
        )
543393
def _compile(self, **kwargs):
        '''
        '''
        util.log('compiling evaluation function')
        self.f_eval = theano.function(self._inputs,
                                      self._monitor_exprs,
                                      updates=self._updates,
                                      name='evaluation')
        label = self.__class__.__name__
        util.log('compiling {} optimizer'.format(click.style(label, fg='red')))
        updates = list(self._updates) + list(self.get_updates(**kwargs))
        self.f_step = theano.function(self._inputs,
                                      self._monitor_exprs,
                                      updates=updates,
                                      name=label)
196027
def parameter_action(self, text, loc, par):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("PARAM:",par)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        index = self.symtab.insert_parameter(par.name, par.type)
        self.shared.function_params += 1
        return index
1225355
def _dump_impl():
    # type: () -> List[FunctionData]
    """"""
    filtered_signatures = _filter_types(collected_signatures)
    sorted_by_file = sorted(iteritems(filtered_signatures),
                            key=(lambda p: (p[0].path, p[0].line, p[0].func_name)))
    res = []  # type: List[FunctionData]
    for function_key, signatures in sorted_by_file:
        comments = [_make_type_comment(args, ret_type) for args, ret_type in signatures]
        res.append(
            {
                'path': function_key.path,
                'line': function_key.line,
                'func_name': function_key.func_name,
                'type_comments': comments,
                'samples': num_samples.get(function_key, 0),
            }
        )
    return res
1152465
def printParams(paramDictionary, all=False, log=None):
    

    if log is not None:
        def output(msg):
            log.info(msg)
    else:
        def output(msg):
            print(msg)

    if not paramDictionary:
        output('No parameters were supplied')
    else:
        for key in sorted(paramDictionary):
            if all or (not isinstance(paramDictionary[key], dict)) \
            and key[0] != '_':
                output('\t' + '\t'.join([str(key) + ' :',
                                         str(paramDictionary[key])]))
        if log is None:
            output('\n')
1335947
def debug(func):
    """"""
    @wraps(func)
    def wrapper(*args, **kwargs):
        print("{} args: {} kwargs: {}".format(func.__name__, args, kwargs))
        return func(*args, **kwargs)

    return wrapper
1134010
def get_output(self):
        
        # generate the JS function string
        template_function = TEMPLATE_WRAPPER.format(
            function_name=self.js_function_name,
            template_code=self.output.getvalue()
        ).strip()

        # get the correct module format template
        module_format = JS_MODULE_FORMATS[self.js_module_format]

        # generate the module code
        return module_format(self.dependencies, template_function)