Output results to the file named +name+.
498521
def output_filename(name)
      path = File.expand_path(name, output_dir)
      output File.new(path, 'a+')
    end
1328832
def write_results(filename,config,srcfile,samples):
     
    results = createResults(config,srcfile,samples=samples)
    results.write(filename)
462121
def get_result_files(self, result):
        
        if isinstance(result, dict):
            result_id = result['meta']['id']
        else:  # Should already be a string containing the id
            result_id = result

        result_data_dir = os.path.join(self.get_data_dir(), result_id)

        filenames = next(os.walk(result_data_dir))[2]

        filename_path_pairs = [
            (f, os.path.join(self.get_data_dir(), result_id, f))
            for f in filenames]

        return {k: v for k, v in filename_path_pairs}
397966
def show_rendered_files(results_dict):
    
    for k, v in results_dict.items():
        if isinstance(v, string_types):
            print("rendered file: %s (created by: %s)" % (v, k))
        else:
            show_rendered_files(v)
    return
23591
def print_results_adj(results, indent=False, prt=sys.stdout):
        """"""
        # Print column headers if there are results to be printed
        if results:
            prt.write("{R}\n".format(R="\t".join(GOEnrichmentStudy.get_prtflds_default(results))))
        # Print the GOEA results
        for rec in results:
            prt.write("{R}\n".format(R=rec.__str__(indent=indent)))
755594
def output(self, filename):
        

        if not filename.endswith('.dot'):
            filename += '.dot'
        if filename == ".dot":
            filename = "all_contracts.dot"

        with open(filename, 'w', encoding='utf8') as f:
            self.info(f'Call Graph: {filename}')
            f.write('\n'.join(['strict digraph {'] + [self._process_functions(self.slither.functions)] +  ['}']))


        for derived_contract in self.slither.contracts_derived:
            with open(f'{derived_contract.name}.dot', 'w', encoding='utf8') as f:
                self.info(f'Call Graph: {derived_contract.name}.dot')
                f.write('\n'.join(['strict digraph {'] + [self._process_functions(derived_contract.functions)] +  ['}']))
786293
def _output_work(self, work, root):
        """"""
        output_filename = os.path.join(self._output_dir, work)
        tree = etree.ElementTree(root)
        tree.write(output_filename, encoding='utf-8', pretty_print=True)
827764
def output_names(self):
        """"""
        if self.binded:
            return self._curr_module.output_names
        else:
            symbol, _, _ = self._call_sym_gen(self._default_bucket_key)
            return symbol.list_outputs()
812951
def output(filename,**opts)
    term = opts.delete(:term) || opts.delete(:terminal)
    if term.nil? && /\.(\w+)$/ =~ filename
      term = $1
    end
    term = KNOWN_EXT[term] || term
    if term.nil?
      kernel_raise GnuplotError,"file extension is not given"
    end
    set :terminal, term, *opts
    set output:filename
    refresh
    unset :terminal
    unset :output
  end
345101
def _output(self, file_like_object, path=None):
        """"""
        if not path:
            self._output_to_display(file_like_object)
        else:
            self._output_to_file(file_like_object, path)
499207
def output_connections(self, name):
        
        for output_name in self._compound_children[name].outputs:
            src = name, output_name
            if src in self._compound_linkages:
                dests = self._compound_linkages[src]
                if isinstance(dests[0], six.string_types):
                    dests = zip(dests[0::2], dests[1::2])
                for dest in dests:
                    yield src, dest
690547
def output(self, _filename):
        

        for contract in self.contracts:
            txt = "\nContract %s\n"%contract.name
            table = PrettyTable(["Function", "State variables written", "Conditions on msg.sender"])
            for function in contract.functions:

                state_variables_written = [v.name for v in function.all_state_variables_written()]
                msg_sender_condition = self.get_msg_sender_checks(function)
                table.add_row([function.name, str(state_variables_written), str(msg_sender_condition)])
            self.info(txt + str(table))
800413
def print_result(self, directory_result):
        
        for file_name, line_results_dict in directory_result.iter_line_results_items():
            full_path = path.join(directory_result.directory_path, file_name)
            self.write(full_path, 'green')
            self.write('\n')
            for line_number, line_results in sorted(line_results_dict.items()):
                self.write('%s: ' % (line_results[0].line_number))
                out = list(line_results[0].left_of_group + line_results[0].group + line_results[0].right_of_group)
                offset = 0
                for line_result in line_results:
                    group_length = len(line_result.group)
                    out.insert(offset+line_result.left_offset-1, self.colors['blue'])
                    out.insert(offset+line_result.left_offset+group_length, self.colors['end'])
                    offset += group_length + 1
                self.write(''.join(out)+'\n')
            self.write('\n')
219661
def _file_name(self, dtype_out_time, extension='nc'):
        """"""
        if dtype_out_time is None:
            dtype_out_time = ''
        out_lbl = utils.io.data_out_label(self.intvl_out, dtype_out_time,
                                          dtype_vert=self.dtype_out_vert)
        in_lbl = utils.io.data_in_label(self.intvl_in, self.dtype_in_time,
                                        self.dtype_in_vert)
        start_year = utils.times.infer_year(self.start_date)
        end_year = utils.times.infer_year(self.end_date)
        yr_lbl = utils.io.yr_label((start_year, end_year))
        return '.'.join(
            [self.name, out_lbl, in_lbl, self.model.name,
             self.run.name, yr_lbl, extension]
        ).replace('..', '.')
1214460
def getSimpleFileData(self, fileInfo, data):
		""""""
		result = fileInfo[fileInfo.find(data + "</td>"):]
		result = result[:result.find("</A></td>")]
		result = result[result.rfind(">") + 1:]
		return result
1352279
def out_filename(template, n_val, mode):
    """"""
    return '{0}_{1}_{2}.cpp'.format(template.name, n_val, mode.identifier)
43648
def dump(self):
        """"""
        text = ''

        for result in self.objects:
            if result.is_failure or result.is_error:
                text += '\n#{red}#{bright}'
                text += '{}\n'.format(''.ljust(79, '='))

                status = 'FAILED' if result.is_failure else 'ERROR'
                text += '{}: {}\n'.format(status, result.process)
                text += '{}\n#{{reset_all}}'.format(''.ljust(79, '='))

                if result.output:
                    text += result.output

                if result.error:
                    if result.output:
                        text += '\n{}\n'.format(''.ljust(79, '-'))
                        text += 'Additional error output:\n'
                        text += '{}\n'.format(''.ljust(79, '-'))
                    text += result.error

                if not text.endswith('\n'):
                    text += '\n'

        if self.has_modified_files:
            text += '\n#{{yellow}}#{{bright}}{}\n'.format(''.ljust(79, '-'))
            text += 'Modified files:\n'
            text += '{}\n'.format(''.ljust(79, '-'))
            for path, modified_by in self.modified_files:
                text += '#{{reset_all}}{} #{{cyan}}<- {}\n'.format(path, ', '.join(modified_by))

        return text