Write the results.
779530
def writer(datasets, dataset_names, output_dir):
    """"""
    for dataset, dataset_name in zip(datasets, dataset_names):
        if dataset:
            filepath = output_dir + '/' + dataset_name + '.txt'
            with open(filepath, 'w+') as out_file:
                joined = '\n'.join(dataset)
                out_file.write(str(joined.encode('utf-8').decode('utf-8')))
                out_file.write('\n')
965006
function write(data, result, matches) {
    if (data.match(matches.regex)) {
        return data.replace(matches.regex, function () {
            return matches.start + "\n\n```\n" + result + "```\n\n" + matches.end;
        });
    }
    return false;
}
1328832
def write_results(filename,config,srcfile,samples):
     
    results = createResults(config,srcfile,samples=samples)
    results.write(filename)
409067
def print_results(results, outfile):
    
    for stanza_words, scheme in results:
        outfile.write(str(' ').join(stanza_words) + str('\n'))
        outfile.write(str(' ').join(map(str, scheme)) + str('\n\n'))
    outfile.close()
    logging.info("Wrote result")
93835
def save_results(self, path='.'):
        """"""
        with open(path, 'wb') as f:
            pickle.dump(self.results, f)
167089
def results( self ):
        """"""
        return self.report(self.parameters(),
                           self.metadata(),
                           self.experimentalResults())
1320494
def write(self, handle):
        """"""
        handle.write(u"\t".join(self.columns))
        handle.write(u"\n")
        for row in self.rows:
            row.write(handle)
1108628
private void writeResult(Object result) throws IOException {
		File outputFile = new File(outputFileLocation);
		File tempfile = FileSupport.createFile(tempOutputFileLocation);
		FileOutputStream fos = null;
		try {
			fos = new FileOutputStream(tempfile);
			PrintStream ps = new PrintStream(new FileOutputStream(tempfile));
			if (result != null) {
				if (result instanceof Throwable) {
					((Throwable) result).printStackTrace(ps);
				}
				ps.println(result.toString());
			}
			ps.close();
		} finally {
			fos.close();
		}

		if (outputFile.exists()) {
			boolean success = outputFile.delete();
		}

		boolean success = tempfile.renameTo(new File(outputFileLocation));
	}
547624
def write(self, result, cr=True):
		
		self.window().write_feedback(result, cr=cr)
1241112
private void submitResults(Object task, Object results) throws JobExecutionException {
    synchronized (monitor) {
      this.job.submitTaskResults(task, results, monitor);
    }
  }
477284
private void writeFinalResults() {
		// Print a final report:
		printStatus();

		// Store property counts in files:
		writePropertyStatisticsToFile(this.itemStatistics,
				"item-property-counts.csv");
		writePropertyStatisticsToFile(this.propertyStatistics,
				"property-property-counts.csv");

		// Store site link statistics in file:
		try (PrintStream out = new PrintStream(
				ExampleHelpers
						.openExampleFileOuputStream("site-link-counts.csv"))) {

			out.println("Site key,Site links");
			for (Entry<String, Integer> entry : this.siteLinkStatistics
					.entrySet()) {
				out.println(entry.getKey() + "," + entry.getValue());
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

		// Store term statistics in file:
		writeTermStatisticsToFile(this.itemStatistics, "item-term-counts.csv");
		writeTermStatisticsToFile(this.propertyStatistics,
				"property-term-counts.csv");
	}
915654
def write(self, data):
        """"""
        cnpj, data = data

        path = os.path.join(self.output, '%s.json' % cnpj)
        with open(path, 'w') as f:
            json.dump(data, f, encoding='utf-8')
1294761
def _print_results(results, stat=False, verbose=False):
    
    results.generate_pretty_output(stat=stat,
                                   verbose=verbose,
                                   output_function=click.secho)
66549
def _Write(self, data, length, progress_callback=None):
        """"""
        if progress_callback:
            progress = self._HandleProgress(length, progress_callback)
            next(progress)
        while length:
            tmp = data.read(self.chunk_kb * 1024)
            length -= len(tmp)
            self.usb.BulkWrite(tmp)

            if progress_callback and progress:
                progress.send(len(tmp))
785090
def display(self):
        
        total = 0
        count = 0
        for i, result in enumerate(self._results):
            if total == 0:
                self.pre_write()
            self.write(result)
            count += 1
            total += 1
            if (
                count >= self.pagesize
                and self.pagesize > 0
                and i < len(self._results) - 1
            ):
                self.wait()
                count = 0
        if total == 0:
            self._ostream.write("No results\n")
        else:
            self.post_write()
906196
def write(self, *messages):
        """"""

        for i in self.graph.outputs_of(BEGIN):
            for message in messages:
                self[i].write(message)
1159962
@Override
    public void write(Iterable<QueryResult> results) {
        for (QueryResult result : results) {
            try {
                out.write(result.toString());
            } catch (IOException e) {
                // never occurs
            }
        }
    }