All the heavy lifting done here
517222
def collect(config, pconn):
    
    # initialize collection target
    # tar files
    if config.analyze_file:
        logger.debug("Client analyzing a compress filesystem.")
        target = {'type': 'compressed_file',
                  'name': os.path.splitext(
                        os.path.basename(config.analyze_file))[0],
                  'location': config.analyze_file}

    # mountpoints
    elif config.analyze_mountpoint:
        logger.debug("Client analyzing a filesystem already mounted.")
        target = {'type': 'mountpoint',
                  'name': os.path.splitext(
                        os.path.basename(config.analyze_mountpoint))[0],
                  'location': config.analyze_mountpoint}

    # image
    elif config.analyze_image_id:
        logger.debug("Client running in image mode.")
        logger.debug("Scanning for matching image.")

        from .containers import get_targets
        targets = get_targets(config)
        if len(targets) == 0:
            sys.exit(constants.sig_kill_bad)
        target = targets[0]

    # host, or inside container
    else:
        if config.analyze_container:
            logger.debug('Client running in container mode.')
        else:
            logger.debug("Host selected as scanning target.")
        target = constants.default_target

    branch_info = get_branch_info(config, pconn)
    pc = InsightsUploadConf(config)
    tar_file = None

    collection_rules = pc.get_conf_file()
    rm_conf = pc.get_rm_conf()
    if rm_conf:
        logger.warn("WARNING: Excluding data from files")

    # defaults
    archive = None
    container_connection = None
    mp = None
    compressed_filesystem = None

    try:
        # analyze docker images
        if target['type'] == 'docker_image':
            from .containers import open_image
            container_connection = open_image(target['name'])
            logging_name = 'Docker image ' + target['name']

            if container_connection:
                mp = container_connection.get_fs()
            else:
                logger.error('Could not open %s for analysis', logging_name)
                return False

        # analyze compressed files
        elif target['type'] == 'compressed_file':
            logging_name = 'Compressed file ' + target['name'] + ' at location ' + target['location']

            from .compressed_file import InsightsCompressedFile
            compressed_filesystem = InsightsCompressedFile(target['location'])

            if compressed_filesystem.is_tarfile is False:
                logger.debug("Could not access compressed tar filesystem.")
                return False

            mp = compressed_filesystem.get_filesystem_path()

        # analyze mountpoints
        elif target['type'] == 'mountpoint':

            logging_name = 'Filesystem ' + target['name'] + ' at location ' + target['location']
            mp = config.analyze_mountpoint

        # analyze the host
        elif target['type'] == 'host':
            logging_name = determine_hostname()

        # nothing found to analyze
        else:
            logger.error('Unexpected analysis target: %s', target['type'])
            return False

        archive = InsightsArchive(compressor=config.compressor,
                                  target_name=target['name'])
        atexit.register(_delete_archive_internal, config, archive)

        # determine the target type and begin collection
        # we infer "docker_image" SPEC analysis for certain types
        if target['type'] in ["mountpoint", "compressed_file"]:
            target_type = "docker_image"
        else:
            target_type = target['type']
        logger.debug("Inferring target_type '%s' for SPEC collection", target_type)
        logger.debug("Inferred from '%s'", target['type'])
        dc = DataCollector(config, archive, mountpoint=mp)

        logger.info('Starting to collect Insights data for %s', logging_name)
        dc.run_collection(collection_rules, rm_conf, branch_info)

        tar_file = dc.done(collection_rules, rm_conf)

    finally:
        # called on loop iter end or unexpected exit
        if container_connection:
            container_connection.close()

    # cleanup the temporary stuff for analyzing tar files
    if config.analyze_file is not None and compressed_filesystem is not None:
        compressed_filesystem.cleanup_temp_filesystem()

    return tar_file
1230904
def walk(self):
        
        yield (
            self,
            self.parent,
            list(self.sub_packages.values()),
            list(self.sub_modules.values()),
        )

        for pkg in self.sub_packages.values():
            for things in pkg.walk():
                yield things
1360511
def load(self):
        

        self._setup_directories()
        self._load_plugins()
        self._setup_task(load=True)
        self._loaded = True
355950
public function all()
    {
        $this->out('<info>Compiling all templates</info>');

        foreach (Scanner::all() as $section => $templates) {
            $this->out('<info>Compiling ' . $section . '\'s templates</info>');
            $this->walkIterator($templates);
        }
    }
1357275
protected function performEnrichment()
    {
        if ( ! count($this->info->form->fields)) {
            return;
        }

        $this->layoutFields = $this->info->form->getLayoutFormFieldKeys();

        $this
            ->enrichCreateRules()
            ->enrichUpdateRules();
    }
632974
def awesome(object)
      if Thread.current[AP].include?(object.object_id)
        nested(object)
      else
        begin
          Thread.current[AP] << object.object_id
          unnested(object)
        ensure
          Thread.current[AP].pop
        end
      end
    end
813006
def _load_all(self):
        '''
        
        '''
        with self._lock:
            for name in self.file_mapping:
                if name in self.loaded_files or name in self.missing_modules:
                    continue
                self._load_module(name)

            self.loaded = True
1361069
function() {
          return through.obj(function(file, encode, done){
            addBefore(file.path);
            this.push(file);
            done();
          });
        }
765737
def dissection_done(self, pkt):
        """"""
        self.post_dissection(pkt)
        self.payload.dissection_done(pkt)
165264
protected function performEnrichment()
    {
        if ( ! count($this->info->export->columns)) {
            $this->fillDataForEmpty();
        } else {
            $this->enrichCustomData();
        }

        // Separate strategies may have their own column setups.
        // If not, the defaults should be copied for them.
        foreach ($this->info->export->strategies as $key => $strategyData) {

            if ( ! count($strategyData->columns)) {
                $this->info->export->strategies[ $key ]->columns = $this->info->export->columns;
            } else {
                $this->enrichCustomData($key);
            }
        }
    }
452014
public function perform()
    {
        $fields = $this->requireOption('fields');

        foreach ($fields as $field => $options) {
            $this->handleFile($field, $options);
        }
    }
1363746
function alldone() {
		// combine and compress modules
		var module = {
				code: results.join(''),
				modified: modified
			};

		// no compressing? done.
		if (!compress) { return next(null, module); }

		compress(module, function(err, js) {
			module.code = js.code || js;
			next(err, err ? null : module);
		});
	}
549076
def finished(self):
        
        self.progress_bar.set_state(ProgressBar.STATE_DONE)
        self.progress_bar.show()
896044
public function all()
    {
        $this->hr();
        $this->out('Ensure Vault is running');
        $this->hr();
        $this->start();
        $this->out('');

        $this->hr();
        $this->out('Ensure Vault is initialized');
        $this->hr();
        $this->create();
        $this->out('');

        $this->Vault->waitFor(['initialized' => true]);

        $this->hr();
        $this->out('Ensure Vault is unsealed');
        $this->hr();
        $this->unseal();
        $this->out('');

        $this->Vault->waitFor(['sealed' => false, 'standby' => false]);
        $this->Vault->clear();

        $this->hr();
        $this->out('Writing mount-points');
        $this->hr();
        $this->mounts();

        $this->hr();
        $this->syncVaultKey(true);
    }
730773
def loaded(self, request, *args, **kwargs):
        
        serializer = self.get_serializer(list(Pack.objects.all()),
                                         many=True)
        return Response(serializer.data)
1043308
function() {
        if (this.loaded >= this.items.length) {
            this.shutdown();
            return;
        }

        this.fireEvent('loading');

        this.items.each(function(index, item) {
            if (item && this.inViewport(item)) {
                this.show(item, index);
            }
        }.bind(this));

        this.fireEvent('loaded');
    }
467440
@Override
	public void showLoading() {
		executeOnUIThread(new Runnable() {

			@Override
			public void run() {
				if (loading == null) {
					loading = getActivityIf().getDefaultLoading();
				}
				loading.show(getActivityIf());
			}
		});
	}