Returns the params of a function literal.
766639
public static String getFunctionParams( String function ) {
      return RegexpUtils.getMatcher( FUNCTION_PARAMS_PATTERN, true ).getGroupIfMatches( function, 1 );
   }
570517
def get_func_posargs_name(f):
    """"""
    sigparams = inspect.signature(f).parameters
    for p in sigparams:
        if sigparams[p].kind == inspect.Parameter.VAR_POSITIONAL:
            return sigparams[p].name
    return None
1020928
def function_parameters(function):
    
    if not callable(function):
        raise TypeError(
            'function_parameters(function=%s) you must pass a function' % (
                function
            )
        )
    def wrapper(*args, **kwargs):
        if function.__doc__ is not None:
            if len(function.__doc__) > 3 and len(
                    args) + len(kwargs) + len(
                        function.__defaults__ if function.__defaults__ else ''
                        ) >= len(getParaList(function)):
                paras_index = [p for p in getParaList(
                    function) if p not in kwargs.keys()]
                for content in [i.split('))')[0
                ] for i in function.__doc__.replace(
                    ' ', '').split('((') if ':' in i and i.split(
                        ':')[0] in paras_index or i.split(':'
                        )[0] in kwargs.keys()]:
                    con = content.split(':')
                    if con[0] in kwargs.keys() or len(args) > paras_index.index(con[0]):
                        # To avoid default parameters
                        try:
                            if not isinstance(eval(con[1]), type):
                                raise TypeError()
                        except Exception:
                            raise TypeError(
                                "function_parameters(%s(%s=%s)) " % (
                                    getsourcefile(function) + 
                                    ' ' + function.__name__,
                                    con[0], con[1]
                                ) + "wrong type given in __doc__" 
                            )
                        received_arg = kwargs.get(con[0])
                        if not received_arg and con[0] in paras_index:
                            # to avoid kwarg when it's arg
                            received_arg = args[paras_index.index(con[0])]
                        if type(received_arg) != eval(con[1]):
                            raise TypeError(
                                "%s(%s=%s) requires type %s" % (
                                    getsourcefile(function) + 
                                    ' ' + function.__name__,
                                    con[0], type(received_arg),
                                    eval(con[1])
                                )
                            )
        return function(*args, **kwargs)
    return wrapper
1313559
function (f) {
            var args = f.args;
            return string.format("%s%s", f.f, args.length === 0 ? '()' : this.literal(args));
        }
201922
def _get_params(self):
        """"""
        return np.hstack((self.varianceU,self.varianceY, self.lengthscaleU,self.lengthscaleY))
926297
def params(self):
    """"""
    if hasattr(self, '_params_decoded'):
      return self._params_decoded

    if self.params_blob is not None:
      value_encoded = self.params_blob.open().read()
    else:
      value_encoded = self.params_text

    value = json.loads(value_encoded, cls=util.JsonDecoder)
    if isinstance(value, dict):
      kwargs = value.get('kwargs')
      if kwargs:
        adjusted_kwargs = {}
        for arg_key, arg_value in kwargs.iteritems():
          # Python only allows non-unicode strings as keyword arguments.
          adjusted_kwargs[str(arg_key)] = arg_value
        value['kwargs'] = adjusted_kwargs

    self._params_decoded = value
    return self._params_decoded
617056
def parse_all_arguments(func):
    
    args = dict()
    if sys.version_info < (3, 0):
        func_args = inspect.getargspec(func)
        if func_args.defaults is not None:
            val = len(func_args.defaults)
            for i, itm in enumerate(func_args.args[-val:]):
                args[itm] = func_args.defaults[i]
    else:
        func_args = inspect.signature(func)
        for itm in list(func_args.parameters)[1:]:
            param = func_args.parameters[itm]
            if param.default is not param.empty:
                args[param.name] = param.default
    return args
1357422
def parameters(self):
        
        parameters = []
        for k, v in self.__dict__.items():
            if k.startswith("_"):
                continue

            is_function = False
            is_set = False

            if callable(v):
                value = pickle.dumps(func_dump(v))
                is_function = True
            elif isinstance(v, set):
                value = list(v)
                is_set = True
            else:
                value = v

            parameters.append(dict(
                key=k,
                value=value,
                is_function=is_function,
                is_set=is_set
            ))

        return parameters
81649
def _getFuncArgs(func):
  
  """
  code = func.func_code
  Defaults = func.func_defaults

  nargs = code.co_argcount
  ArgNames = code.co_varnames[:nargs]

  Args = OrderedDict()
  argCount = len(ArgNames)
  defCount = len(Defaults) if Defaults else 0
  diff = argCount - defCount

  for i in range(0, diff):
    Args[ArgNames[i]] = {}

  for i in range(diff, argCount):
    Args[ArgNames[i]] = {'default': Defaults[i - diff]}

  return Args
153929
def get_params(self):
        ""
        import inspect
        a = inspect.getargspec(self.__init__)[0]
        out = dict()
        for key in a[1:]:
            value = getattr(self, "_%s" % key, None)
            out[key] = value
        return out
1330472
def default_values_of(func):
    """"""

    signature = inspect.signature(func)
    return [k
            for k, v in signature.parameters.items()
            if v.default is not inspect.Parameter.empty or
            v.kind != inspect.Parameter.POSITIONAL_OR_KEYWORD]
1054492
def getParams(options=None):
    
    result = []
    if options:
        members = options.__dict__
        for k, v in sorted(members.items()):
            result.append("# %-40s: %s" % (k, str(v)))
    else:
        vars = inspect.currentframe().f_back.f_locals
        for var in filter(lambda x: re.match("param_", x), vars.keys()):
            result.append("# %-40s: %s" %
                          (var, str(vars[var])))

    if result:
        return "\n".join(result)
    else:
        return "# no parameters."
1264480
function getJavaScriptCallbackParameterListSimple(parameters) {
    var result = []

    parameters.forEach(function(parameter){
        if (!parameter.out) return
        result.push("/*" + getIdlType(parameter.type) + "*/ "+ parameter.name)
    })

    return result.join(", ")
}
906133
def get_current_args(caller_level = 0, func = None, argNames = None):
    
    if argNames is None:
        argNames = getargnames(getargspecs(func))
    if func is None:
        func = get_current_function(caller_level+1)
    if isinstance(func, property):
        func = func.fget if func.fset is None else func.fset
    stck = inspect.stack()
    lcs = stck[1+caller_level][0].f_locals
    return tuple([lcs[t] for t in argNames])
602721
function getParams()
    {
        $params = array();
        foreach (get_object_vars($this) as $k => $v) {
            if ($k[0] == '_') {
                $params[substr($k, 1)] = $v;
            }
        }

        return $params;
    }
817616
def get_params(self):
    

    if hasattr(self, 'params'):
      return list(self.params)

    # Catch eager execution and assert function overload.
    try:
      if tf.executing_eagerly():
        raise NotImplementedError("For Eager execution - get_params "
                                  "must be overridden.")
    except AttributeError:
      pass

    # For graph-based execution
    scope_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES,
                                   self.scope + "/")

    if len(scope_vars) == 0:
      self.make_params()
      scope_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES,
                                     self.scope + "/")
      assert len(scope_vars) > 0

    # Make sure no parameters have been added or removed
    if hasattr(self, "num_params"):
      if self.num_params != len(scope_vars):
        print("Scope: ", self.scope)
        print("Expected " + str(self.num_params) + " variables")
        print("Got " + str(len(scope_vars)))
        for var in scope_vars:
          print("\t" + str(var))
        assert False
    else:
      self.num_params = len(scope_vars)

    return scope_vars
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