check if function without parameters from stdlib can be called
    There should be better way to check, if C compiler is installed
492301
def _checkBuildDependencies():
    compiler = distutils.ccompiler.new_compiler()
    
    if not compiler.has_function('rand', includes=['stdlib.h']):
        print("It seems like C compiler is not installed or not operable.")
        return False

    if not compiler.has_function('rand',
                                 includes=['stdlib.h', 'Python.h'],
                                 include_dirs=[distutils.sysconfig.get_python_inc()],
                                 library_dirs=[os.path.join(os.path.dirname(sys.executable), 'libs')]):
        print("Failed to find Python headers.")
        print("Try to install python-dev package")
        print("If not standard directories are used, pass parameters")
        print("\tpython setup.py install --lib-dir=c://github/pcre-8.37/build/Release --include-dir=c://github/pcre-8.37/build")
        print("\tpython setup.py install --lib-dir=/my/local/lib --include-dir=/my/local/include")
        print("--lib-dir= and --include-dir= may be used multiple times")
        return False

    if not compiler.has_function('pcre_version',
                                 includes=['pcre.h'],
                                 libraries=['pcre'],
                                 include_dirs=include_dirs,
                                 library_dirs=library_dirs):
        print("Failed to find pcre library.")
        print("Try to install libpcre{version}-dev package, or go to http://pcre.org")
        print("If not standard directories are used, pass parameters:")
        print("\tpython setup.py install --lib-dir=c://github/pcre-8.37/build/Release --include-dir=c://github/pcre-8.37/build")
        print("\tpython setup.py install --lib-dir=/my/local/lib --include-dir=/my/local/include")
        print("--lib-dir= and --include-dir= may be used multiple times")
        return False

    return True
1268465
def inspect_func(self, namesrc):
        """"""
        (name, src) = namesrc
        glbls = {}
        lcls = {}
        exec(src, glbls, lcls)
        assert name in lcls
        func = lcls[name]
        return name, src, signature(func)
1293016
def check_program(name):
    
    with open(os.devnull, "w") as null:
        try:
            subprocess.check_call(("which", name), stdout=null, stderr=null)
        except subprocess.CalledProcessError as e:
            return False
    return True
248244
def stdlib(self):
        
        if self.module == 'pkg_resources' or self.module.startswith('pkg_resources.'):
            return False
        elif self.filename.startswith(SITE_PACKAGES_PATHS):
            # if it's in site-packages then its definitely not stdlib
            return False
        elif self.filename.startswith(SYS_PREFIX_PATHS):
            return True
        else:
            return False
1334033
def _verify(function):
    """"""
    # @functools.wraps
    def wrapped(pin, *args, **kwargs):
        pin = int(pin)
        if pin not in _open:
            ppath = gpiopath(pin)
            if not os.path.exists(ppath):
                log.debug("Creating Pin {0}".format(pin))
                with _export_lock:
                    with open(pjoin(gpio_root, 'export'), 'w') as f:
                        _write(f, pin)
            value = open(pjoin(ppath, 'value'), FMODE)
            direction = open(pjoin(ppath, 'direction'), FMODE)
            _open[pin] = PinState(value=value, direction=direction)
        return function(pin, *args, **kwargs)
    return wrapped
672310
def visit_FunctionDeclaration(self, node):
        """"""
        scope = self.memory.stack.current.current.copy()
        args = [parameter.variable.identifier.name for parameter in node.parameters]

        for i in islice(scope, len(args)):
            self.memory.stack.current.current.pop(i)
            self.memory[args[i]] = scope[i]

        return self.visit(node.body)
1267565
def _ctypes_regular(parameter):
    
    if ("pointer" in parameter.modifiers or "allocatable" in parameter.modifiers
        or "target" in parameter.modifiers or parameter.dtype == "logical"):
        return (parameter.definition(local=True), False)
771790
function isNativeFunction(f) {
  if ((typeof f) !== 'function') {
    return false;
  }
  var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;
  return exp.exec(Function.prototype.toString.call(f)) != null;
}
1164161
def not_implemented(self, func_name):
        '''
        
        '''
        msg = '%s is not overridden by %s' % (func_name, type(self).__name__)
        self.logger.error(msg)
        raise NotImplementedError(msg)
260656
def on_functiondef(self, node):
        """"""
        # ('name', 'args', 'body', 'decorator_list')
        if node.decorator_list:
            raise Warning("decorated procedures not supported!")
        kwargs = []

        if not valid_symbol_name(node.name) or node.name in self.readonly_symbols:
            errmsg = "invalid function name (reserved word?) %s" % node.name
            self.raise_exception(node, exc=NameError, msg=errmsg)

        offset = len(node.args.args) - len(node.args.defaults)
        for idef, defnode in enumerate(node.args.defaults):
            defval = self.run(defnode)
            keyval = self.run(node.args.args[idef+offset])
            kwargs.append((keyval, defval))

        if version_info[0] == 3:
            args = [tnode.arg for tnode in node.args.args[:offset]]
        else:
            args = [tnode.id for tnode in node.args.args[:offset]]

        doc = None
        nb0 = node.body[0]
        if isinstance(nb0, ast.Expr) and isinstance(nb0.value, ast.Str):
            doc = nb0.value.s

        varkws = node.args.kwarg
        vararg = node.args.vararg
        if version_info[0] == 3:
            if isinstance(vararg, ast.arg):
                vararg = vararg.arg
            if isinstance(varkws, ast.arg):
                varkws = varkws.arg

        self.symtable[node.name] = Procedure(node.name, self, doc=doc,
                                             lineno=self.lineno,
                                             body=node.body,
                                             args=args, kwargs=kwargs,
                                             vararg=vararg, varkws=varkws)
        if node.name in self.no_deepcopy:
            self.no_deepcopy.remove(node.name)
953333
function isBuiltinFunctionCall (node) {
  return (isLocalCall(node) && builtinFunctions[getLocalCallName(node) + '(' + getFunctionCallTypeParameterType(node) + ')'] === true) || isAbiNamespaceCall(node)
}
725024
def function_call(self, function, arguments):
        
        #push each argument to stack
        for arg in arguments:
            self.push(self.symbol(arg))
            self.free_if_register(arg)
        self.newline_text("CALL\t"+self.symtab.get_name(function), True)
        args = self.symtab.get_attribute(function)
        #generates stack cleanup if function has arguments
        if args > 0:
            args_space = self.symtab.insert_constant("{0}".format(args * 4), SharedData.TYPES.UNSIGNED)
            self.arithmetic("+", "%15", args_space, "%15")
349532
function checkFunction(node) {
            const functionConfig = getConfigForFunction(node);

            if (functionConfig === "ignore") {
                return;
            }

            const rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
            const leftToken = sourceCode.getTokenBefore(rightToken);
            const hasSpacing = sourceCode.isSpaceBetweenTokens(leftToken, rightToken);

            if (hasSpacing && functionConfig === "never") {
                context.report({
                    node,
                    loc: leftToken.loc.end,
                    message: "Unexpected space before function parentheses.",
                    fix: fixer => fixer.removeRange([leftToken.range[1], rightToken.range[0]])
                });
            } else if (!hasSpacing && functionConfig === "always") {
                context.report({
                    node,
                    loc: leftToken.loc.end,
                    message: "Missing space before function parentheses.",
                    fix: fixer => fixer.insertTextAfter(leftToken, " ")
                });
            }
        }
1019248
def is_parameter(self):
        """"""
        return (isinstance(self.scope, CodeFunction)
                and self in self.scope.parameters)
766075
function checkArguments(node) {
            const args = node.arguments;

            switch (args.length) {
                case 0:
                    context.report({
                        node,
                        message: "Missing parameters."
                    });
                    break;

                case 1:
                    if (mode === MODE_ALWAYS) {
                        context.report({
                            node,
                            message: "Missing radix parameter."
                        });
                    }
                    break;

                default:
                    if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) {
                        context.report({
                            node,
                            message: "Redundant radix parameter."
                        });
                    } else if (!isValidRadix(args[1])) {
                        context.report({
                            node,
                            message: "Invalid radix parameter."
                        });
                    }
                    break;
            }
        }
1045009
def is_invalid_params_py3(func, *args, **kwargs):
    
    signature = inspect.signature(func)
    parameters = signature.parameters

    unexpected = set(kwargs.keys()) - set(parameters.keys())
    if len(unexpected) > 0:
        return True

    params = [
        parameter for name, parameter in parameters.items()
        if name not in kwargs
    ]
    params_required = [
        param for param in params
        if param.default is param.empty
    ]

    return not (len(params_required) <= len(args) <= len(params))
1171015
def CheckLib(context, library = None, symbol = "main",
             header = None, language = None, autoadd = 1):
    

    if library == []:
        library = [None]

    if not SCons.Util.is_List(library):
        library = [library]

    # ToDo: accept path for the library
    res = SCons.Conftest.CheckLib(context, library, symbol, header = header,
                                        language = language, autoadd = autoadd)
    context.did_show_result = 1
    return not res