Did I find the right examples for you? yes no

All Samples(29)  |  Call(27)  |  Derive(0)  |  Import(2)

        def write_file(file_path, data):
    out_file = open(file_path, 'w')
    out_file.write(data)
    out_file.close()
        


src/e/y/eyegrade-HEAD/eyegrade/exammaker.py   eyegrade(Download)
            utils.write_to_stdout(exam_text)
        else:
            utils.write_file(self.output_file%model, exam_text)
 
    def save_exam_config(self):

src/f/l/flickr_fetcher-HEAD/n_fold_sampling.py   flickr_fetcher(Download)
 
            filename = "fold_" + str(fold_test_index + 1) + "_test_"
            utils.write_file(pos_folds[fold_test_index], args.o + "/" + filename + "postive.txt") 
            utils.write_file(neg_folds[fold_test_index], args.o + "/" + filename + "negative.txt") 
 
 
            filename = "fold_" + str(fold_test_index + 1) + "_train_"
            utils.write_file(pos_train_folds, args.o + "/" + filename + "postive.txt") 
            utils.write_file(neg_train_folds, args.o + "/" + filename + "negative.txt") 
 

src/a/s/asterisk_rest_libraries-HEAD/generate_library.py   asterisk_rest_libraries(Download)
import requests
from api import APIClass
from utils import parse_args, write_file, get_file_content
 
 
            file_contents = '\n\n'.join([template_copyright, class_def])
            file_contents = self.lang_tools.wrap(file_contents)
            write_file('%s/lib/%s.%s' % (args['lang'], class_.file_name,
                       self.lang_tools.FILE_EXTENSION), file_contents)
 
        license_content = get_file_content('LICENSE')
        write_file('%s/lib/LICENSE' % args['lang'], license_content)

src/f/l/flickr_fetcher-HEAD/append_hsv_model.py   flickr_fetcher(Download)
 
    if (args.o != None):
        utils.write_file(output, args.o)
 
 

src/f/l/flickr_fetcher-HEAD/append_face_model.py   flickr_fetcher(Download)
 
    if (args.o != None):
        utils.write_file(output, args.o)
 
 

src/f/l/flickr_fetcher-HEAD/export_datamatrix_from_summary.py   flickr_fetcher(Download)
 
    if (args.o != None):
        utils.write_file(output, args.o)
 
def read_file(afile, fields, filters, data_sources, data_labels, padding = None):

src/f/l/flickr_fetcher-HEAD/aggregate_csv.py   flickr_fetcher(Download)
 
    if (args.o != None):
        utils.write_file(output, args.o)
 
 

src/f/l/flickr_fetcher-HEAD/aggregate_csv_comparator.py   flickr_fetcher(Download)
        output.append(map_key + ', ' + ', '.join(content))
 
    utils.write_file(output, filename)
 
 

src/r/c/rcs-latexdiff-HEAD/rcs_latexdiff/rcs_latexdiff.py   rcs-latexdiff(Download)
 
from rcs import get_rcs_class
from utils import run_command, write_file
 
 
    new_filename = os.path.join(dst_path, os.path.basename(dst_filename) + ".new")
 
    write_file(old_content, old_filename)
    write_file(new_content, new_filename)
 

src/f/l/flickr_fetcher-HEAD/analyze_hitresult.py   flickr_fetcher(Download)
        output = [item for sublist in output for item in sublist]
        if (args.s != None):
            utils.write_file(output, args.s)
 
 
 
    if (filename != None):
        utils.write_file(output, filename)
 
    return output
 
    if (filename != None):
        utils.write_file(output, filename)
 
 

  1 | 2  Next