process a module
324539
def process_module(self, node):
        '''
        
        '''

        # Patch lib2to3.fixer_util.touch_import!
        fixer_util.touch_import = salt_lib2to3_touch_import

        flags = {}

        if self.config.modernize_print_function:
            flags['print_function'] = True

        salt_avail_fixes = set(
            refactor.get_fixers_from_package(
                'saltpylint.py3modernize.fixes'
            )
        )
        avail_fixes = set(refactor.get_fixers_from_package('libmodernize.fixes'))
        avail_fixes.update(lib2to3_fix_names)
        avail_fixes.update(salt_avail_fixes)

        default_fixes = avail_fixes.difference(opt_in_fix_names)
        unwanted_fixes = set(self.config.modernize_nofix)

        # Explicitly disable libmodernize.fixes.fix_dict_six since we have our own implementation
        # which only fixes `dict.iter<items|keys|values>()` calls
        unwanted_fixes.add('libmodernize.fixes.fix_dict_six')

        if self.config.modernize_six_unicode:
            unwanted_fixes.add('libmodernize.fixes.fix_unicode_future')
        elif self.config.modernize_future_unicode:
            unwanted_fixes.add('libmodernize.fixes.fix_unicode')
        else:
            unwanted_fixes.add('libmodernize.fixes.fix_unicode_future')
            unwanted_fixes.add('libmodernize.fixes.fix_unicode')

        if self.config.modernize_no_six:
            unwanted_fixes.update(six_fix_names)
            unwanted_fixes.update(salt_avail_fixes)
        else:
            # We explicitly will remove fix_imports_six from libmodernize and will add
            # our own fix_imports_six
            unwanted_fixes.add('libmodernize.fixes.fix_imports_six')
            # Remove a bunch of libmodernize.fixes since we need to properly skip them
            # and we provide the proper skip rule
            unwanted_fixes.add('libmodernize.fixes.fix_input_six')
            unwanted_fixes.add('libmodernize.fixes.fix_filter')
            unwanted_fixes.add('libmodernize.fixes.fix_map')
            unwanted_fixes.add('libmodernize.fixes.fix_xrange_six')
            unwanted_fixes.add('libmodernize.fixes.fix_zip')

        explicit = set()

        if self.config.modernize_fix:
            default_present = False
            for fix in self.config.modernize_fix:
                if fix == 'default':
                    default_present = True
                else:
                    explicit.add(fix)

            requested = default_fixes.union(explicit) if default_present else explicit
        else:
            requested = default_fixes

        requested = default_fixes
        fixer_names = requested.difference(unwanted_fixes)

        rft = PyLintRefactoringTool(sorted(fixer_names), flags, sorted(explicit))
        try:
            rft.refactor_file(node.file,
                              write=False,
                              doctests_only=self.config.modernize_doctests_only)
        except ParseError as exc:
            # Unable to refactor, let's not make PyLint crash
            try:
                lineno = exc.context[1][0]
                line_contents = node.file_stream.readlines()[lineno-1].rstrip()
                self.add_message('W1698', line=lineno, args=line_contents)
            except Exception:  # pylint: disable=broad-except
                self.add_message('W1698', line=1, args=exc)
            return
        except AssertionError as exc:
            self.add_message('W1698', line=1, args=exc)
            return
        except (IOError, OSError) as exc:
            logging.getLogger(__name__).warn('Error while processing {0}: {1}'.format(node.file, exc))
            return

        for lineno, diff in rft.diff:
            # Since PyLint's python3 checker uses <Type>16<int><int>, we'll also use that range
            self.add_message('W1699', line=lineno, args=diff)

        # Restore lib2to3.fixer_util.touch_import!
        fixer_util.touch_import = FIXER_UTIL_TOUCH_IMPORT
200854
function(callback) {
            async.map(modules, function(module, callback) {
                callback && callback(
                    null,
                    {
                        name: module,
                        path: process.cwd() + '/modules/' +
                              module + '/controllers/'
                    }
                );
            }, callback);
        }
1344940
def process_module(self, node):
        '''
        
        '''
        if not HAS_PYQVER:
            return

        minimum_version = tuple([int(x) for x in self.config.minimum_python_version.split('.')])
        with open(node.path, 'r') as rfh:
            for version, reasons in pyqver2.get_versions(rfh.read()).iteritems():
                if version > minimum_version:
                    for lineno, msg in reasons:
                        self.add_message(
                            'E0598', line=lineno,
                            args=(self.config.minimum_python_version, msg)
                        )
329632
def _post_build(self, module, encoding):
        """"""
        module.file_encoding = encoding
        self._manager.cache_module(module)
        # post tree building steps after we stored the module in the cache:
        for from_node in module._import_from_nodes:
            if from_node.modname == "__future__":
                for symbol, _ in from_node.names:
                    module.future_imports.add(symbol)
            self.add_from_names_to_locals(from_node)
        # handle delayed assattr nodes
        for delayed in module._delayed_assattr:
            self.delayed_assattr(delayed)

        # Visit the transforms
        if self._apply_transforms:
            module = self._manager.visit_transforms(module)
        return module
158673
def _prepare_uimodules(self):
        """"""
        for key, value in self._config.get(config.UI_MODULES, {}).iteritems():
            self._config[config.UI_MODULES][key] = self._import_class(value)
        self._config[config.UI_MODULES] = dict(self._config[config.UI_MODULES] or {})
661122
public function processModule($module)
    {
        if (!isset($this->registeredModules[$module]) || is_object($module)) {
            $this->registerModule($module);
        }
        $this->modules[$module] = $this->registeredModules[$module];
    }
1126340
function processFile(argv, inputPath, opt_outputPath) {
  // Setup output path.
  var outputPath = opt_outputPath;
  if (!opt_outputPath) {
    var ext = path.extname(inputPath);
    if (ext.length) {
      outputPath = inputPath.substr(0, inputPath.length - ext.length) +
          '.instrumented' + ext;
    } else {
      outputPath = inputPath + '.instrumented.js';
    }
  }

  var sourceCode = fs.readFileSync(inputPath).toString();

  // TODO(benvanik): support setting the module ID?
  var targetCode = transformCode(0, inputPath, sourceCode, argv);

  console.log('Writing ' + outputPath + '...');
  fs.writeFileSync(outputPath, targetCode);
  fs.chmodSync(outputPath, fs.statSync(inputPath).mode);
}
783982
def run_module(self, resource, args=None, stdin=None, stdout=None):
        
        perform_doa = self.project.prefs.get('perform_doi', True)
        perform_doa = self.project.prefs.get('perform_doa', perform_doa)
        receiver = self.object_info.doa_data_received
        if not perform_doa:
            receiver = None
        runner = rope.base.oi.doa.PythonFileRunner(
            self, resource, args, stdin, stdout, receiver)
        runner.add_finishing_observer(self.module_cache.forget_all_data)
        runner.run()
        return runner
521174
function loadAndDescribeModuleInCwd() {
// Hack: Trick node into changing process.mainScript to moduleToDebug
  moduleToDebug = Module._load(location, module, true);

  var sample = getSampleCommand();
  sampleLine = util.format('You can access your module as `m`%s.', sample);

  prompt = getModuleName() + '> ';
}
60868
def process(self, obj, pk_set=None, action=None, update_fields=None, **kwargs):
        """"""
        build_kwargs = self._get_build_kwargs(obj, pk_set, action, update_fields, **kwargs)

        if build_kwargs:
            self.index.build(**build_kwargs)
411549
def prepare_module(self):
        
        # Modules can define a post_config_hook() method which will be run
        # after the module has had it config settings applied and before it has
        # its main method(s) called for the first time.  This allows modules to
        # perform any necessary setup.
        if self.has_post_config_hook:
            try:
                self.module_class.post_config_hook()
            except Exception as e:
                # An exception has been thrown in post_config_hook() disable
                # the module and show error in module output
                self.terminated = True
                self.error_index = 0

                self.error_messages = [
                    self.module_nice_name,
                    u"{}: {}".format(
                        self.module_nice_name, str(e) or e.__class__.__name__
                    ),
                ]
                self.error_output(self.error_messages[0])
                msg = "Exception in `%s` post_config_hook()" % self.module_full_name
                self._py3_wrapper.report_exception(msg, notify_user=False)
                self._py3_wrapper.log("terminating module %s" % self.module_full_name)
        self.enabled = True
167565
async function loadModulesConfig()
{
    if(!modulesLoaded)
    {
		for (let i = 0; i < modules.length; i++) {
			await applyBotDataSource(modules[i]);
        }
        
        modulesLoaded = true;
    }
}
51325
def modprobe(module, persist=True):
    """"""
    cmd = ['modprobe', module]

    log('Loading kernel module %s' % module, level=INFO)

    subprocess.check_call(cmd)
    if persist:
        persistent_modprobe(module)
1332452
def process_compile_entries(
        processor, spec, entries, modpath_logger=None, targetpath_logger=None):
    

    # Contains a mapping of the module name to the compiled file's
    # relative path starting from the base build_dir.
    all_modpaths = {}
    all_targets = {}
    # List of exported module names, should be equal to all keys of
    # the compiled and bundled sources.
    all_export_module_names = []

    def update(base, fresh, logger):
        if callable(logger):
            for dupes in dict_update_overwrite_check(base, fresh):
                logger(*dupes)
        else:
            base.update(fresh)

    for entry in entries:
        modpaths, targetpaths, export_module_names = processor(spec, entry)
        update(all_modpaths, modpaths, modpath_logger)
        update(all_targets, targetpaths, targetpath_logger)
        all_export_module_names.extend(export_module_names)

    return all_modpaths, all_targets, all_export_module_names
928097
function processJs(jsFiles) {
      var mergedJs = mergeFiles(jsFiles).join(' ');
      var script = replaceDemoModuleWithCodepenModule(mergedJs);
      return script;
    }
1255050
function (module) {
        "use strict";
    
        // find a css value
        var retrieve = function (value) {
    
            var process = value.split('-');
            value = beyond.css.values;
            for (var i in process) {
    
                value = value[process[i]];
                if (typeof value === 'undefined') return;
    
            }
    
            return value;
    
        };
    
        this.process = function (styles) {
    
            var regexp = /value\((.*?)\)/g, styles;
            var value = regexp.exec(styles);
    
            var replace = {};
    
            while (value) {
    
                var retrieved = retrieve(value[1]);
    
                if (typeof retrieved !== 'string') {
    
                    console.warn(
                        'invalid css value "' + value[1] +
                        '" value, it must be an string and it is ' + typeof retrieved)
    
                }
                else replace[value[0]] = retrieved;
    
                value = regexp.exec(styles);
    
            }
    
            // replace all values with their values
            for (var name in replace) {
    
                var value = replace[name];
                while (styles.indexOf(name) !== -1) {
                    styles = styles.replace(name, value);
                }
    
            }
    
            return styles;
    
        };
    
    }
802495
def parse(self, module):
        """"""
        matches = self.RE_TYPE.finditer(module.contents)
        result = {}

        for match in matches:
            name = match.group("name")
            modifiers = match.group("modifiers")
            if modifiers is not None:
                cleanmods = re.split("[\s,]+", modifiers.strip())
            else:
                cleanmods = []

            contents = match.group("contents")
            result[name.lower()] = self._process_type(name, cleanmods, contents, module, match)
            if "public" in result[name.lower()].modifiers:
                module.publics[name.lower()] = 1

        #Set the types we found in the module and then move the embedded
        #ones into their correct parent executables.
        module.types = result
        module.update_embedded("types")