Completes filter output.
547771
private void complete() throws IOException
    {
    if( source_ != null)
      {
      try
        {
        thread_.join();
        }
      catch( Exception e)
        {
        logger_.error( "Thread=" + thread_ + " not completed", e);
        }

      IOException failure =
        failure_ == null
        ? null
        : new IOException( "Can't write filter output", failure_);
      
      failure_      = null;
      filterInput_  = null;
      source_       = null;
      target_       = null;
      thread_       = null;

      if( failure != null)
        {
        throw failure;
        }
      }
    }
570594
def _filter_result(result, filter_functions=None):
        
        if filter_functions is not None:
            for filter_func in filter_functions:
                result = filter(filter_func, result)
        return result
941383
def finalize(self):
        """"""
        for name, count in sorted(self.blocks.items(), key=lambda x: x[1]):
            print('{:3} {}'.format(count, name))
        print('{:3} total'.format(sum(self.blocks.values())))
137438
def _complete_options(self):
        """"""
        text = to_text_string(self.currentText())
        opts = glob.glob(text + "*")
        opts = sorted([opt for opt in opts if osp.isdir(opt)])
        self.setCompleter(QCompleter(opts, self))
        return opts
527963
def complete_shells(line, text, predicate=lambda i: True):
    """"""
    res = [i.display_name + ' ' for i in dispatchers.all_instances() if
           i.display_name.startswith(text) and
           predicate(i) and
           ' ' + i.display_name + ' ' not in line]
    return res
1125523
private function clean()
    {
        $this->mode       = null;
        $this->source     = null;
        $this->filters    = [];
        $this->targetSize = [];
    }
1246378
public void finish() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.entering(CLASS_NAME,"finish","["+this+"]");

        if (!isCommitted()) {
            commit();
        }

        // flush the OutputStream and Writer
        try {
            flushBuffer(false);
            _rawOut.close();
        }
        catch (IOException e) {
            // Don't want to report errors on early browser closes
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"finish", "Servlet.Exception:.Error.while.finishing.response", e);
            }
        }
        finally {
            _rawOut.reset();
            // PK29451 - remove call to clearHeaders(). Implementation of clearHeaders() was empty,
            // which this method relies on, but has been implemented in PK29451 to make reset() work.
            // _response.clearHeaders();
            
            cleanupFromFinish();
            // LIBERTY _bufferedOut.reset();
            _bufferedWriter.reset();
            // LIBERTY this._responseBuffer = null;
        }

        resetState();

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.exiting(CLASS_NAME,"finish");
    }
1366390
def _method_complete(self, result):
    """"""
    if isinstance(result, (PrettyTensor, Loss, PrettyTensorTupleMixin)):
      return result
    elif (isinstance(result, collections.Sequence) and
          not isinstance(result, six.string_types)):
      return self.with_sequence(result)
    else:
      return self.with_tensor(result)
586829
protected function postProcessData()
    {
        $comment = "\n/* " . (!empty($this->filters) ? implode('|', $this->filters) . '::' : '') . $this->value . " */\n";

        $this->output = $comment . $this->output;
    }
1284927
def is_complete(self):
        """"""

        return all(p.name in self.values for p in self.parameters if p.required)
1030593
def finalize(self, result):
        """"""
        sys.stderr = self._stderr.pop()
        sys.stdout = self._stdout.pop()
        pdb.set_trace = self._set_trace.pop()
        pdb.Pdb.cmdloop = self._cmdloop.pop()
379076
public synchronized void finish() {
        if (!isFinished) {
            isFinished = true;
            try {
                matrixDos.close();
                // Re-open as a random access file so we can overwrite the 3 int
                // header that specifies the number of dimensions and values.
                // Note that the location of the matrix data is dependent on
                // whether the matrix is to be transposed.
                File dataFile = (transposeData)
                    ? transposedMatrixFile
                    : matrixFile;
                RandomAccessFile matrixRaf =
                    new RandomAccessFile(dataFile, "rw");

                // Back fill the dimensions of the matrix and the number of
                // non-zero values as the 3 int header in the file
                matrixRaf.writeInt(numRows);
                matrixRaf.writeInt(curCol);
                matrixRaf.writeInt(nonZeroValues);
                matrixRaf.close();

            } catch (IOException ioe) {
                throw new IOError(ioe);
            }

            // If the user specified that the matrix should be tranposed, then
            // transposedMatrixFile will contain the matrix in its un-transposed
            // form.  Issue a call to SVDLIBC to transposed the file contents
            // for us.
            if (transposeData) {
                boolean svdlibcFailed = false;
                try {                    
                    String commandLine = "svd  -r sb " + " -w sb -t -c " 
                        + transposedMatrixFile + " " + matrixFile;
                    Process svdlibc = Runtime.getRuntime().exec(commandLine);
                    LOGGER.fine("transposing svdlibc sparse matrix: " + commandLine);
                    BufferedReader stdout = new BufferedReader(
                        new InputStreamReader(svdlibc.getInputStream()));
                    BufferedReader stderr = new BufferedReader(
                        new InputStreamReader(svdlibc.getErrorStream()));
                    
                    StringBuilder output = new StringBuilder("SVDLIBC output:\n");
                    for (String line = null; (line = stderr.readLine()) != null; ) {
                        output.append(line).append("\n");
                    }
                    LOGGER.fine(output.toString());
                    
                    int exitStatus = svdlibc.waitFor();
                    LOGGER.fine("svdlibc exit status: " + exitStatus);
                    if (exitStatus != 0) {
                        StringBuilder sb = new StringBuilder();
                        for (String line = null; (line = stderr.readLine()) != null; ) {
                            sb.append(line).append("\n");
                        }
                        // warning or error?
                        LOGGER.warning("svdlibc exited with error status.  " + 
                                       "stderr:\n" + sb.toString());
                        svdlibcFailed = true;
                    } 
                }
                catch (Exception e) {
                    svdlibcFailed = true;
                    LOGGER.log(Level.WARNING,
                               "an exception occurred when trying to transpose " + 
                               "with svdlibc; retrying with Java code", e);
                }
                // If SVDLIBC failed in any way, use MatrixIO to transpose the
                // data for us.
                if (svdlibcFailed) {
                    LOGGER.fine("retrying failed svdlibc transpose " + 
                                "with MatrixIO transpose");
                    try {
                        matrixFile = MatrixIO.convertFormat(
                            transposedMatrixFile, Format.SVDLIBC_SPARSE_BINARY,
                            Format.SVDLIBC_SPARSE_BINARY, true);
                    } catch (IOException ioe) {
                        throw new IOError(ioe);
                    }
                }
            }
        }
    }
1034359
def cleanup():
    """"""
    if _output_dir and os.path.exists(_output_dir):
        log.msg_warn("Cleaning up output directory at '{output_dir}' ..."
                     .format(output_dir=_output_dir))
        if not _dry_run:
            shutil.rmtree(_output_dir)
1065772
protected void finish() {
        Reporter reporter = this.reporterThreadLocal.get();
        assertEquals("Detailed results found at: " + reporter.getFileName(), "0 errors",
                Integer.toString(reporter.getFails()) + ERRORS_CHECK);
    }
925563
public void progressFinished() {
        if (!batchMode && log.isInfoEnabled()) {
            imageLines.remove();
            print(ansi().reset().toString());
            if (!useAnsi) {
                println("");
            }
        }
    }
1331452
def data_complete(self):
        
        return task.data_complete(self.datadir, self.sitedir,
            self._get_container_name)
546295
function completeSpecFiles(argv, _filters) {
        // if user manually defined an empty specFiles array, do not add specFiles from folder
        if (Object.keys(_filters.specFiles).length === 0 && !argv.specFiles) {
            io_1.getAllFiles(specsDir, '.spec.ts').forEach(specFile => _filters.specFiles[specFile] = true);
            return true;
        }
        else {
            let removeOnly = true;
            const removeSpecFiles = {};
            for (const specFile in _filters.specFiles) {
                let remove = false;
                let matchStr = specFile;
                if (specFile.substr(0, 1) === '-') {
                    remove = true;
                    matchStr = specFile.substr(1, specFile.length - 1);
                }
                else {
                    removeOnly = false;
                }
                if (remove) {
                    delete _filters.specFiles[specFile];
                    removeSpecFiles[matchStr] = true;
                }
            }
            if (removeOnly) {
                io_1.getAllFiles(specsDir, '.spec.ts')
                    .filter(specFile => !(specFile in removeSpecFiles))
                    .forEach(specFile => _filters.specFiles[specFile] = true);
            }
        }
        return false;
    }