rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
def process_modelformset(request, model_class, queryset=None, **kwargs): | def process_modelformset(request, model_class, **kwargs): | def process_modelformset(request, model_class, queryset=None, **kwargs): """With the Django model class 'model_class' and the Django form class 'form_class', construct a Django formset which can manipulate """ # Create a formset class for the model 'model_class' (i.e. it will contain forms whose # contents are based on the fields of 'model_class'); parameters for the construction # of the forms used in the formset should be in kwargs. In Django 1.0, the interface # to modelformset_factory is # def modelformset_factory(model, form=ModelForm, formfield_callback=lambda f: f.formfield(), # formset=BaseModelFormSet, # extra=1, can_delete=False, can_order=False, # max_num=0, fields=None, exclude=None) formset_class = modelformset_factory(model_class, **kwargs) if queryset is None: queryset = model_class.objects.all() # If the request is a POST, we want to possibly update our data if request.method == 'POST': # Create a formset from all the 'model_class' instances whose values will # be updated using the contents of request.POST formset = formset_class(request.POST, queryset=queryset) # Validate all the forms in the formset if formset.is_valid(): # If all is well, Django can save all our data for us formset.save() else: # Otherwise, complain to the user that something went wrong return formset, _("There are errors in the form. Please review the problems below.") return formset_class(queryset=queryset), None | 7c8a9132a77e3174ebe8ac559e04a87c18f09792 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/7c8a9132a77e3174ebe8ac559e04a87c18f09792/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2284,
687,
542,
12,
2293,
16,
938,
67,
1106,
16,
2826,
4333,
4672,
3536,
1190,
326,
18480,
938,
667,
296,
2284,
67,
1106,
11,
471,
326,
18480,
646,
667,
296,
687,
67,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2284,
687,
542,
12,
2293,
16,
938,
67,
1106,
16,
2826,
4333,
4672,
3536,
1190,
326,
18480,
938,
667,
296,
2284,
67,
1106,
11,
471,
326,
18480,
646,
667,
296,
687,
67,
1106,
... |
revs.extend(osAvgs['win'].keys()) | revs.extend(osMedians['win'].keys()) | def average(values): """ Return the average of the values, but ignore 0s as they signify a non-value. Also, None is returned if the average would be 0, because None is a special value that is ignored by PyChart. """ if len(values) == 0: avg = None else: values = [x for x in values if x != 0] # Skip 0s s = sum(values) if s == 0: avg = None else: avg = s/(len(values)*1.0) return avg | 8f8ba5e85d8671111b2fabc32d3e1b81cceec335 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8f8ba5e85d8671111b2fabc32d3e1b81cceec335/perf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8164,
12,
2372,
4672,
3536,
2000,
326,
8164,
434,
326,
924,
16,
1496,
2305,
374,
87,
487,
2898,
1573,
1164,
279,
1661,
17,
1132,
18,
8080,
16,
599,
353,
2106,
309,
326,
8164,
4102,
506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8164,
12,
2372,
4672,
3536,
2000,
326,
8164,
434,
326,
924,
16,
1496,
2305,
374,
87,
487,
2898,
1573,
1164,
279,
1661,
17,
1132,
18,
8080,
16,
599,
353,
2106,
309,
326,
8164,
4102,
506... |
print dist_dir | def prepare_files(trunk_location, output_dir): """ <Purpose> Given the location of the repository's trunk, it will prepare the files for the base installers (or for a software update) in a specified location. <Arguments> trunk_location: The path to the trunk directory of the repository, used to find all the requisite files that make up the installer. output_dir: The directory where the installer files will be placed. <Exceptions> IOError on bad filepaths. <Side Effects> None. <Returns> None. """ # Remember the original working directory orig_dir = os.getcwd() os.chdir(trunk_location) # Remember all important locations relative to the trunk dist_dir = os.getcwd() + "/dist" keys_dir = dist_dir + "/updater_keys" # Run preparetest, adding the files to the temp directory os.popen("python preparetest.py " + output_dir) # Make sure that the folder is initially clean and correct print dist_dir clean_folder.clean_folder(dist_dir + "/initial_files.fi", output_dir) # Generate the metainfo file os.chdir(output_dir) writemetainfo = imp.load_source("writemetainfo", "writemetainfo.py") writemetainfo.create_metainfo_file(keys_dir + "/updater.privatekey", keys_dir + "/updater.publickey") # Copy the static files to the program directory shutil.copy2(dist_dir + "/nodeman.cfg", ".") shutil.copy2(dist_dir + "/resources.offcut", ".") # Run clean_folder a second time to make sure the final # directory is in good shape. clean_folder.clean_folder(dist_dir + "/final_files.fi", ".") os.chdir(orig_dir) | 25563cca7f4d6894985158ce1245da09f7694607 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7263/25563cca7f4d6894985158ce1245da09f7694607/make_base_installers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
2354,
12,
26133,
67,
3562,
16,
876,
67,
1214,
4672,
3536,
411,
10262,
4150,
34,
16803,
326,
2117,
434,
326,
3352,
1807,
25917,
16,
518,
903,
2911,
326,
1390,
364,
326,
1026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
2354,
12,
26133,
67,
3562,
16,
876,
67,
1214,
4672,
3536,
411,
10262,
4150,
34,
16803,
326,
2117,
434,
326,
3352,
1807,
25917,
16,
518,
903,
2911,
326,
1390,
364,
326,
1026,
... | |
"Please save first!") | "The buffer for %s is not saved.\n" % name + "Please save it first!") | def getfilename(self): # Logic to make sure we have a saved filename # XXX Better logic would offer to save! if not self.editwin.get_saved(): self.errorbox("Not saved", "Please save first!") self.editwin.text.focus_set() return filename = self.editwin.io.filename if not filename: self.errorbox("No file name", "This window has no file name") return return filename | d95cc35059608ccfb8afe130c5870b7a437ca828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d95cc35059608ccfb8afe130c5870b7a437ca828/ScriptBinding.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3459,
12,
2890,
4672,
468,
10287,
358,
1221,
3071,
732,
1240,
279,
5198,
1544,
468,
11329,
605,
11214,
4058,
4102,
10067,
358,
1923,
5,
309,
486,
365,
18,
4619,
8082,
18,
588,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3459,
12,
2890,
4672,
468,
10287,
358,
1221,
3071,
732,
1240,
279,
5198,
1544,
468,
11329,
605,
11214,
4058,
4102,
10067,
358,
1923,
5,
309,
486,
365,
18,
4619,
8082,
18,
588,
67,
... |
pruneweight, self._yieldweight, | pruneweight, yieldweight, | def __init__(self): Task.__init__(self, parent, self.evacuate(), cs, lk, pruneweight, self._yieldweight, csweight, 0.0001, order, "evacuate requiring") | 05bea7f156f387245ba2c001f1a34c918508b5ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/05bea7f156f387245ba2c001f1a34c918508b5ee/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3837,
16186,
2738,
972,
12,
2890,
16,
982,
16,
365,
18,
14965,
1077,
89,
340,
9334,
2873,
16,
25421,
16,
846,
318,
359,
1274,
16,
2824,
4865,
16,
2873,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3837,
16186,
2738,
972,
12,
2890,
16,
982,
16,
365,
18,
14965,
1077,
89,
340,
9334,
2873,
16,
25421,
16,
846,
318,
359,
1274,
16,
2824,
4865,
16,
2873,... |
raise MailUsageError, ''' | mailadmin = config['ADMIN_EMAIL'] raise MailUsageError, _(""" | def handle_message(self, message): ''' message - a Message instance | f9457e5e409c6363bf37d5634a3c77d621f1a603 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f9457e5e409c6363bf37d5634a3c77d621f1a603/mailgw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
p = pexpect.spawn('/bin/ls -l') | p = spawn('/bin/ls -l') | def test_2 (self): #the_old_way = commands.getoutput('/bin/ls -l') the_old_way = getstatusoutput('/bin/ls -l', 1)[1] | 4d560d5c243ab16b138e72073de4258709a62bde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/4d560d5c243ab16b138e72073de4258709a62bde/qa.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22,
261,
2890,
4672,
468,
5787,
67,
1673,
67,
1888,
273,
4364,
18,
588,
2844,
2668,
19,
4757,
19,
3251,
300,
80,
6134,
326,
67,
1673,
67,
1888,
273,
336,
2327,
2844,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22,
261,
2890,
4672,
468,
5787,
67,
1673,
67,
1888,
273,
4364,
18,
588,
2844,
2668,
19,
4757,
19,
3251,
300,
80,
6134,
326,
67,
1673,
67,
1888,
273,
336,
2327,
2844,
2668,
... |
IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase'] OPTS=['SSL', 'NSPR'] CompileC(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj') CompileC(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj') CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='httpbackup.exe', obj=[ 'httpbackup_backupCatalog.obj', 'httpbackup_httpBackup.obj', 'libpandaappbase.lib', 'libpandaexpress.dll', 'libpanda.dll', 'libdtool.dll', 'libdtoolconfig.dll', 'libprogbase.lib', 'libpandatoolbase.lib', 'libpystub.dll', ]) | if OMIT.count("SSL")==0: IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase'] OPTS=['SSL', 'NSPR'] CompileC(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj') CompileC(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj') CompileLink(opts=['ADVAPI', 'NSPR', 'SSL'], dll='httpbackup.exe', obj=[ 'httpbackup_backupCatalog.obj', 'httpbackup_httpBackup.obj', 'libpandaappbase.lib', 'libpandaexpress.dll', 'libpanda.dll', 'libdtool.dll', 'libdtoolconfig.dll', 'libprogbase.lib', 'libpandatoolbase.lib', 'libpystub.dll', ]) | if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n" | e594b1b5a2c778da65602d37638829ada0570895 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/e594b1b5a2c778da65602d37638829ada0570895/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
1125,
422,
296,
2124,
12904,
11,
4672,
2195,
273,
2195,
397,
6619,
318,
536,
315,
397,
498,
397,
1548,
82,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
1125,
422,
296,
2124,
12904,
11,
4672,
2195,
273,
2195,
397,
6619,
318,
536,
315,
397,
498,
397,
1548,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
tasklist = TASK_LIST_FMT % "\n".join(" . %s" % (task) for task in sorted(tasks.keys())) | tasklist = tasks.keys() if not loglevel <= logging.DEBUG: tasklist = filter(lambda s: not s.startswith("celery."), tasklist) tasklist = TASK_LIST_FMT % "\n".join(" . %s" % task for task in sorted(tasklist)) | def run_worker(concurrency=conf.CELERYD_CONCURRENCY, detach=False, loglevel=conf.CELERYD_LOG_LEVEL, logfile=conf.CELERYD_LOG_FILE, discard=False, pidfile=conf.CELERYD_PID_FILE, umask=0, uid=None, gid=None, working_directory=None, chroot=None, run_clockservice=False, events=False, **kwargs): """Starts the celery worker server.""" print("Celery %s is starting." % __version__) if not concurrency: concurrency = multiprocessing.cpu_count() if conf.CELERY_BACKEND == "database" \ and settings.DATABASE_ENGINE == "sqlite3" and \ concurrency > 1: import warnings warnings.warn("The sqlite3 database engine doesn't support " "concurrency. We'll be using a single process only.", UserWarning) concurrency = 1 # Setup logging if not isinstance(loglevel, int): loglevel = conf.LOG_LEVELS[loglevel.upper()] if not detach: logfile = None # log to stderr when not running in the background. if discard: discarded_count = discard_all() what = discarded_count > 1 and "messages" or "message" print("discard: Erased %d %s from the queue.\n" % ( discarded_count, what)) # Dump configuration to screen so we have some basic information # when users sends e-mails. tasklist = "" if loglevel >= logging.INFO: from celery.registry import tasks tasklist = TASK_LIST_FMT % "\n".join(" . %s" % (task) for task in sorted(tasks.keys())) print(STARTUP_INFO_FMT % { "conninfo": get_connection_info(), "queues": format_routing_table(indent=8), "concurrency": concurrency, "loglevel": conf.LOG_LEVELS[loglevel], "logfile": logfile or "@stderr", "pidfile": detach and pidfile or "", "celerybeat": run_clockservice and "ON" or "OFF", "events": events and "ON" or "OFF", "tasks": tasklist, }) print("Celery has started.") set_process_status("Running...") on_stop = noop if detach: from celery.log import setup_logger, redirect_stdouts_to_logger context, on_stop = platform.create_daemon_context(logfile, pidfile, chroot_directory=chroot, working_directory=working_directory, umask=umask) context.open() logger = setup_logger(loglevel, logfile) redirect_stdouts_to_logger(logger, loglevel) platform.set_effective_user(uid, gid) def run_worker(): worker = WorkController(concurrency=concurrency, loglevel=loglevel, logfile=logfile, embed_clockservice=run_clockservice, send_events=events, is_detached=detach) # Run the worker init handler. # (Usually imports task modules and such.) from celery import signals current_loader.on_worker_init() signals.worker_init.send(sender=worker) # Install signal handler that restarts celeryd on SIGHUP, # (only on POSIX systems) install_worker_restart_handler(worker) try: worker.start() except Exception, e: emergency_error(logfile, "celeryd raised exception %s: %s\n%s" % ( e.__class__, e, traceback.format_exc())) try: run_worker() except: set_process_status("Exiting...") on_stop() raise | 26158790bcfeadbced9408bed360d9c0059034ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2024/26158790bcfeadbced9408bed360d9c0059034ec/celeryd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
10124,
12,
591,
7095,
33,
3923,
18,
28746,
8404,
40,
67,
2248,
7509,
25231,
16,
10199,
33,
8381,
16,
21252,
33,
3923,
18,
28746,
8404,
40,
67,
4842,
67,
10398,
16,
15204,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
10124,
12,
591,
7095,
33,
3923,
18,
28746,
8404,
40,
67,
2248,
7509,
25231,
16,
10199,
33,
8381,
16,
21252,
33,
3923,
18,
28746,
8404,
40,
67,
4842,
67,
10398,
16,
15204,
33,... |
if len(args) not in (1, 2): print "Usage: python couchdbfuse.py [http://hostname:port/] mount-point" | if len(args) not in (2,): print "CouchDB FUSE Connector: Allows you to browse the _attachments of" print " any CouchDB document on your own filesystem!" print print "Remember to URL-encode your <doc_id> appropriately." print print "Usage: python couchdbfuse.py <http://hostname:port/db/doc_id> <mount-point>" | def mkdir(self, path, mode): server = self.getcouchattrs(path)[0] if isinstance(server, Server): server.create(path.split('/')[-1]) | bbc4e8f5d23192d7709c05790d54a64ef0da1ac5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1925/bbc4e8f5d23192d7709c05790d54a64ef0da1ac5/couchdbfuse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6535,
12,
2890,
16,
589,
16,
1965,
4672,
1438,
273,
365,
18,
588,
71,
7309,
7039,
12,
803,
25146,
20,
65,
309,
1549,
12,
3567,
16,
3224,
4672,
1438,
18,
2640,
12,
803,
18,
4939,
2668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6535,
12,
2890,
16,
589,
16,
1965,
4672,
1438,
273,
365,
18,
588,
71,
7309,
7039,
12,
803,
25146,
20,
65,
309,
1549,
12,
3567,
16,
3224,
4672,
1438,
18,
2640,
12,
803,
18,
4939,
2668... |
return (os.path.isfile(path) and os.path.splitext(path)[1] or "") | ext = os.path.splitext(path)[1] return (ext != "" and ext or "") | def get_file_extension(path): """ Wrapper that retrieves a file path's extension. If the given path is not a file, don't try to find an extension, because it would be invalid. @type path: string @param path: A filename or path. @rtype: string @return: A file extension. """ return (os.path.isfile(path) and os.path.splitext(path)[1] or "") | 407471a8164031de4d805ce0faea16d091a5438f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/407471a8164031de4d805ce0faea16d091a5438f/helper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
768,
67,
6447,
12,
803,
4672,
3536,
18735,
716,
9023,
279,
585,
589,
1807,
2710,
18,
225,
971,
326,
864,
589,
353,
486,
279,
585,
16,
2727,
1404,
775,
358,
1104,
392,
2710,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
768,
67,
6447,
12,
803,
4672,
3536,
18735,
716,
9023,
279,
585,
589,
1807,
2710,
18,
225,
971,
326,
864,
589,
353,
486,
279,
585,
16,
2727,
1404,
775,
358,
1104,
392,
2710,
... |
def __init__(self,data,ax,prefs,*args,**kw): PlotBase.__init__(self,data,ax,prefs,*args,**kw) | def __init__( self, data, ax, prefs, *args, **kw ): PlotBase.__init__( self, data, ax, prefs, *args, **kw ) | def __init__(self,data,ax,prefs,*args,**kw): PlotBase.__init__(self,data,ax,prefs,*args,**kw) self.pdata = data | 423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf/PieGraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
501,
16,
1740,
16,
15503,
16,
380,
1968,
16,
2826,
9987,
262,
30,
225,
15211,
2171,
16186,
2738,
972,
12,
365,
16,
501,
16,
1740,
16,
15503,
16,
380,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
501,
16,
1740,
16,
15503,
16,
380,
1968,
16,
2826,
9987,
262,
30,
225,
15211,
2171,
16186,
2738,
972,
12,
365,
16,
501,
16,
1740,
16,
15503,
16,
380,
19... |
version = "$Id: xml2rdf.py,v 1.15 2001-05-09 15:06:35 connolly Exp $" | version = "$Id: xml2rdf.py,v 1.16 2001-05-11 21:41:07 timbl Exp $" | def __init__(self, sink, thisURI, **kw): self.testdata = "" apply(xmllib.XMLParser.__init__, (self,), kw) self._stack =[] # Stack of states | c5f8bf47ec7a623dac6087850b3e0f6436beb627 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/c5f8bf47ec7a623dac6087850b3e0f6436beb627/xml2rdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9049,
16,
333,
3098,
16,
2826,
9987,
4672,
365,
18,
3813,
892,
273,
1408,
2230,
12,
2902,
2941,
18,
4201,
2678,
16186,
2738,
972,
16,
261,
2890,
16,
3631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9049,
16,
333,
3098,
16,
2826,
9987,
4672,
365,
18,
3813,
892,
273,
1408,
2230,
12,
2902,
2941,
18,
4201,
2678,
16186,
2738,
972,
16,
261,
2890,
16,
3631... |
def getSubProgress(self): | def getSubProgress(self, obj): | def getSubProgress(self): if not hasattr(self, "_progress"): self._progress = Progress() return self._progress | 3eb572b1f855daa06ca6cc4361393c6f98b529c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/3eb572b1f855daa06ca6cc4361393c6f98b529c5/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7040,
5491,
12,
2890,
16,
1081,
4672,
309,
486,
3859,
12,
2890,
16,
4192,
8298,
6,
4672,
365,
6315,
8298,
273,
10980,
1435,
327,
365,
6315,
8298,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7040,
5491,
12,
2890,
16,
1081,
4672,
309,
486,
3859,
12,
2890,
16,
4192,
8298,
6,
4672,
365,
6315,
8298,
273,
10980,
1435,
327,
365,
6315,
8298,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sys.stdout.write("-----get_plaintext_document_body gave: %s lines," \ " overall error: %s\n" % (str(len(docbody)), str(extract_error))) | sys.stdout.write("-----get_plaintext_document_body gave: " \ "%s lines, overall error: %s\n" \ % (str(len(docbody)), str(extract_error))) | def main(): """Main function. """ global cli_opts (cli_opts, cli_args) = get_cli_options() extract_jobs = get_recids_and_filepaths(cli_args) if len(extract_jobs) == 0: ## no files provided for reference extraction - error message usage() ## Read the journal titles knowledge base, creating the search patterns and replace terms: (title_search_kb, title_search_standardised_titles, title_search_keys) = \ build_titles_knowledge_base(CFG_REFEXTRACT_KB_JOURNAL_TITLES) (preprint_reportnum_sre, standardised_preprint_reportnum_categs) = \ build_institutes_preprints_numeration_knowledge_base(CFG_REFEXTRACT_KB_REPORT_NUMBERS) done_coltags = 0 ## flag to signal that the XML collection tags have been output for curitem in extract_jobs: extract_error = 0 ## extraction was OK unless determined otherwise ## reset the stats counters: count_misc = count_title = count_reportnum = count_url = 0 recid = curitem[0] if cli_opts['verbosity'] >= 1: sys.stdout.write("--- processing RecID: %s pdffile: %s\n" \ % (str(curitem[0]), curitem[1])) if not done_coltags: ## Output opening XML collection tags: if cli_opts['xmlfile']: try: ofilehdl = open(cli_opts['xmlfile'], 'w') ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_VERSION.encode("utf-8")) ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8")) ofilehdl.flush() except: sys.stdout.write("***%s\n\n" % cli_opts['xmlfile']) raise IOError("Cannot open %s to write!" % cli_opts['xmlfile']) else: sys.stdout.write("%s\n" % (CFG_REFEXTRACT_XML_VERSION.encode("utf-8"),)) sys.stdout.write("%s\n" % (CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8"),)) done_coltags = 1 ## 1. Get this document body as plaintext: (docbody, extract_error) = get_plaintext_document_body(curitem[1]) if extract_error == 0 and len(docbody) == 0: extract_error = 3 if cli_opts['verbosity'] >= 1: sys.stdout.write("-----get_plaintext_document_body gave: %s lines," \ " overall error: %s\n" % (str(len(docbody)), str(extract_error))) if len(docbody) > 0: ## the document body is not empty: ## 2. If necessary, locate the reference section: if cli_opts['treat_as_reference_section']: ## don't search for citations in the document body: treat it as a reference section: reflines = docbody else: ## launch search for the reference section in the document body: (reflines, extract_error) = extract_references_from_fulltext(docbody) if len(reflines) == 0 and extract_error == 0: extract_error = 6 if cli_opts['verbosity'] >= 1: sys.stdout.write("-----extract_references_from_fulltext gave " \ "len(reflines): %s overall error: %s\n" \ % (str(len(reflines)), str(extract_error))) ## 3. Standardise the reference lines: | afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
445,
18,
3536,
2552,
4942,
67,
4952,
261,
4857,
67,
4952,
16,
4942,
67,
1968,
13,
273,
225,
336,
67,
4857,
67,
2116,
1435,
225,
2608,
67,
10088,
273,
336,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
445,
18,
3536,
2552,
4942,
67,
4952,
261,
4857,
67,
4952,
16,
4942,
67,
1968,
13,
273,
225,
336,
67,
4857,
67,
2116,
1435,
225,
2608,
67,
10088,
273,
336,
67,
... |
def render_user(self, context, data): | def user(self, data): | def render_user(self, context, data): return data.user | eeb67df63d05845b53ad47cd1ff7658325b074cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5471/eeb67df63d05845b53ad47cd1ff7658325b074cc/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
729,
12,
2890,
16,
501,
4672,
327,
501,
18,
1355,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
729,
12,
2890,
16,
501,
4672,
327,
501,
18,
1355,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
fileListing.append(entry) | finalList.append(entry) | def __readCache__(self,cacheListing=list()): """ Simple mehtod to read in a cache or list of cache files and return a list of files or an empty list if nothing found. It uses the pathing information from the files passed via cacheListing to aid in our filesystem search. """ #Open the cache entry and search for those entrys finalList=list() for entry in cacheListing: fileListing=list() #Cache files listed themselves comment out following line fileListing.append(entry) fileListing.extend([x.rstrip("\n") for x in file(entry)]) #PATCH START to add in the z distribution files for fname in fileListing: if ".html" in fname: zFile=fname.replace(".html",".txt") fileListing.append(zFile) #PATCH END #Pathing info pathingInfo=os.path.dirname(entry) for thisFile in fileListing: #Search filesystem for file full path finalList.extend(fnmatch.filter(self.fsys,"*%s*%s"%(pathingInfo,thisFile))) #Look for potential matching thumbnails if thisFile.endswith(".png"): finalList.extend(fnmatch.filter(self.fsys,"*%s"%thisFile.replace(".png","?thumb?png"))) return finalList | d3f37f3c912ccbf137aa3634e2e95a271c2cfd9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/d3f37f3c912ccbf137aa3634e2e95a271c2cfd9f/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
1649,
972,
12,
2890,
16,
2493,
19081,
33,
1098,
1435,
4672,
3536,
4477,
1791,
647,
369,
358,
855,
316,
279,
1247,
578,
666,
434,
1247,
1390,
471,
327,
279,
666,
434,
1390,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
1649,
972,
12,
2890,
16,
2493,
19081,
33,
1098,
1435,
4672,
3536,
4477,
1791,
647,
369,
358,
855,
316,
279,
1247,
578,
666,
434,
1247,
1390,
471,
327,
279,
666,
434,
1390,
5... |
if siteCfg.localStageOut.get('se-name', None) != None: report.siteDetails['se-name'] = siteCfg.localStageOut['se-name'] | report.siteDetails['se-name'] = seName | def processFrameworkJobReport(): """ _processFrameworkJobReport_ Read the job report and insert external information such as datasets for each file entry. """ state = TaskState(os.getcwd()) state.loadRunResDB() state.dumpJobReport() # //TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP # // Temp. Hack: remove Corrupted Skipped Events nodes from the #// JobReport since they are corrupted. # // # // Remove after CMSSW_0_7_0_pre6 #// try: state.loadJobReport() except Exception, ex: reportFileName = state.jobReport if os.path.exists(reportFileName): print ">>>>Removing Corrupt SkippedEvents nodes" import re searcher = re.compile("<SkippedEvent.+</SkippedEvent>") report = file(reportFileName).read() report = searcher.sub("", report) handle = open(reportFileName, 'w') handle.write(report) handle.close() print ">>>>Removed Corrupt SkippedEvents nodes" #TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP:TEMP try: state.loadJobReport() except Exception, ex: # // # // Error reading report ==> it is corrupt. #// Setting it to None means that it will be converted into # //a diagnostic report in the following code # // #// print "Error Reading JobReport:" print str(ex) state._JobReport = None # // # // If no report file is found, we create an empty one to #// make sure we report the failure implied by the missing report if state.getJobReport() == None: print "Generating Job Report by hand..." state._JobReport = FwkJobReport() # // # // match files to datasets. #// state.assignFilesToDatasets() state.generateFileStats() # // # // Check Exit Status file, set exit code in job report #// and set the status of the report accordingly exitCode = state.getExitStatus() reportStatus = "Success" if exitCode == None: print "WARNING: CANNOT FIND EXIT STATUS..." reportStatus = "Unknown" else: if exitCode != 0: reportStatus = "Failed" # // # // Include site details in job report #// report = state.getJobReport() siteName = "Unknown" hostName = socket.gethostname() state.loadSiteConfig() siteCfg = state.getSiteConfig() if siteCfg != None: siteName = siteCfg.siteName report.siteDetails['SiteName'] = siteName report.siteDetails['HostName'] = hostName if siteCfg.localStageOut.get('se-name', None) != None: report.siteDetails['se-name'] = siteCfg.localStageOut['se-name'] # // # // write out updated report #// report.status = reportStatus report.workflowSpecId = state.taskAttrs['WorkflowSpecID'] report.jobSpecId = state.taskAttrs['JobSpecID'] if exitCode != None: report.exitCode = exitCode if report.name == None: taskName = state.taskAttrs['Name'] report.name = taskName report.write("./FrameworkJobReport.xml") # // # // Add this report to the job toplevel report #// This will create the toplevel job report if it doesnt # //exist, otherwise it will merge this report with whatever # // is in there already. #// toplevelReport = os.path.join(os.environ['PRODAGENT_JOB_DIR'], "FrameworkJobReport.xml") newReport = os.path.join(os.getcwd(), "FrameworkJobReport.xml") mergeReports(toplevelReport, newReport) return | 07aa68082bb20a9064dfac6bb4fa9688827cd709 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/07aa68082bb20a9064dfac6bb4fa9688827cd709/RuntimeFwkJobRep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
13701,
2278,
4820,
13332,
3536,
389,
2567,
13701,
2278,
4820,
67,
225,
2720,
326,
1719,
2605,
471,
2243,
3903,
1779,
4123,
487,
11109,
364,
1517,
585,
1241,
18,
225,
3536,
919,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
13701,
2278,
4820,
13332,
3536,
389,
2567,
13701,
2278,
4820,
67,
225,
2720,
326,
1719,
2605,
471,
2243,
3903,
1779,
4123,
487,
11109,
364,
1517,
585,
1241,
18,
225,
3536,
919,
273,
... |
'scilab-5.0...' | 'scilab-...' | def version(self): """ Returns the version of the Scilab software used. | 7374d001a14b432c2f09e8a327b1d3fb23518126 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7374d001a14b432c2f09e8a327b1d3fb23518126/scilab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1177,
12,
2890,
4672,
3536,
2860,
326,
1177,
434,
326,
2850,
330,
378,
17888,
1399,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1177,
12,
2890,
4672,
3536,
2860,
326,
1177,
434,
326,
2850,
330,
378,
17888,
1399,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print fails self.assert_(fails == 0) | self.assertEqual(fails, 0) | def test_hsva__sanity_testing_converted_should_not_raise(self): fails = 0 for i, (r,g,b,a) in enumerate(rgba_combinations): c = pygame.Color (r,g,b,a) other = pygame.Color(0) try: other.hsva = c.hsva except Exception: fails += 1 | f76649e461d61e65baa48a581977b82c0c5a4a8f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/f76649e461d61e65baa48a581977b82c0c5a4a8f/color_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4487,
15304,
972,
87,
10417,
67,
3813,
310,
67,
6283,
329,
67,
13139,
67,
902,
67,
11628,
12,
2890,
4672,
6684,
273,
374,
225,
364,
277,
16,
261,
86,
16,
75,
16,
70,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4487,
15304,
972,
87,
10417,
67,
3813,
310,
67,
6283,
329,
67,
13139,
67,
902,
67,
11628,
12,
2890,
4672,
6684,
273,
374,
225,
364,
277,
16,
261,
86,
16,
75,
16,
70,
16,
... |
self._CollectFvMapBuffer(MapBuffer, Wa) | self._CollectFvMapBuffer(MapBuffer, Wa, ModuleList) | def _MultiThreadBuildPlatform(self): for BuildTarget in self.BuildTargetList: for ToolChain in self.ToolChainList: Wa = WorkspaceAutoGen( self.WorkspaceDir, self.Platform, BuildTarget, ToolChain, self.ArchList, self.BuildDatabase, self.TargetTxt, self.ToolDef, self.Fdf, self.FdList, self.FvList, self.SkuId ) self.BuildReport.AddPlatformReport(Wa) Wa.CreateMakeFile(False) | 9ff69f35c75043c955fc92ca465db39f6bf1ead5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/9ff69f35c75043c955fc92ca465db39f6bf1ead5/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5002,
3830,
3116,
8201,
12,
2890,
4672,
364,
3998,
2326,
316,
365,
18,
3116,
2326,
682,
30,
364,
13288,
3893,
316,
365,
18,
6364,
3893,
682,
30,
678,
69,
273,
14396,
4965,
7642,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5002,
3830,
3116,
8201,
12,
2890,
4672,
364,
3998,
2326,
316,
365,
18,
3116,
2326,
682,
30,
364,
13288,
3893,
316,
365,
18,
6364,
3893,
682,
30,
678,
69,
273,
14396,
4965,
7642,
1... |
_ShutdownInstanceDisks(instance, self.cfg) _StartInstanceDisks(self.cfg, instance, ignore_secondaries) | _ShutdownInstanceDisks(self, instance) _StartInstanceDisks(self, instance, ignore_secondaries) | def Exec(self, feedback_fn): """Reboot the instance. | b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
31569,
326,
791,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3889,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
31569,
326,
791,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
e2 = grp.getgrnam(e.gr_name) | name = e.gr_name if name.startswith('+') or name.startswith('-'): continue e2 = grp.getgrnam(name) | def test_values(self): entries = grp.getgrall() | ec07331eea496469165dc3be45fadbeab641e083 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ec07331eea496469165dc3be45fadbeab641e083/test_grp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2372,
12,
2890,
4672,
3222,
273,
14295,
18,
588,
3197,
454,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2372,
12,
2890,
4672,
3222,
273,
14295,
18,
588,
3197,
454,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
optimizer.setFailedJob( jobId, result[ 'Message' ] ) | optimizer.setFailedJob( jobId, result[ 'Message' ], '' ) | #If there's no job def then get it | d4b6bc1e5d59a3d1ec261ba6e94c1026210b73e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d4b6bc1e5d59a3d1ec261ba6e94c1026210b73e5/MightyOptimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
2047,
1915,
1807,
1158,
1719,
1652,
1508,
336,
518,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
2047,
1915,
1807,
1158,
1719,
1652,
1508,
336,
518,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def TestAll(self, root_key): self.WriteTestData(root_key) self.ReadTestData(root_key) self.DeleteTestData(root_key) def testLocalMachineRegistryWorks(self): self.TestAll(HKEY_CURRENT_USER) def testConnectRegistryToLocalMachineWorks(self): | def _test_all(self, root_key): self._write_test_data(root_key) self._read_test_data(root_key) self._delete_test_data(root_key) class LocalWinregTests(BaseWinregTests): def test_registry_works(self): self._test_all(HKEY_CURRENT_USER) def test_registry_works_extended_functions(self): cke = lambda key, sub_key: CreateKeyEx(key, sub_key, 0, KEY_ALL_ACCESS) self._write_test_data(HKEY_CURRENT_USER, cke) oke = lambda key, sub_key: OpenKeyEx(key, sub_key, 0, KEY_READ) self._read_test_data(HKEY_CURRENT_USER, oke) self._delete_test_data(HKEY_CURRENT_USER) def test_connect_registry_to_local_machine_works(self): | def TestAll(self, root_key): self.WriteTestData(root_key) self.ReadTestData(root_key) self.DeleteTestData(root_key) | e33fa887d39f026dadd8bcb182725c90f7d51ece /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/e33fa887d39f026dadd8bcb182725c90f7d51ece/test_winreg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
1595,
12,
2890,
16,
1365,
67,
856,
4672,
365,
18,
3067,
4709,
751,
12,
3085,
67,
856,
13,
365,
18,
1994,
4709,
751,
12,
3085,
67,
856,
13,
365,
18,
2613,
4709,
751,
12,
3085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
1595,
12,
2890,
16,
1365,
67,
856,
4672,
365,
18,
3067,
4709,
751,
12,
3085,
67,
856,
13,
365,
18,
1994,
4709,
751,
12,
3085,
67,
856,
13,
365,
18,
2613,
4709,
751,
12,
3085,
... |
(p,v,t) = _RegEnumValue(k,i) | (p,v,t) = RegEnumValue(k,i) | def get_msvc_paths (path, version='6.0', platform='x86'): """Get a list of devstudio directories (include, lib or path). Return a list of strings; will be empty list if unable to access the registry or appropriate registry keys not found.""" if not _can_read_reg: return [] L = [] if path=='lib': path= 'Library' path = string.upper(path + ' Dirs') K = ('Software\\Microsoft\\Devstudio\\%s\\' + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ (version,platform) for base in (_HKEY_CLASSES_ROOT, _HKEY_LOCAL_MACHINE, _HKEY_CURRENT_USER, _HKEY_USERS): try: k = _RegOpenKeyEx(base,K) i = 0 while 1: try: (p,v,t) = _RegEnumValue(k,i) if string.upper(p) == path: V = string.split(v,';') for v in V: if v == '' or v in L: continue L.append(v) break i = i + 1 except _RegError: break except _RegError: pass return L | 2f60430e0909b2e5da8b0cca0f12721fa270d324 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f60430e0909b2e5da8b0cca0f12721fa270d324/msvccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
4481,
261,
803,
16,
1177,
2218,
26,
18,
20,
2187,
4072,
2218,
92,
5292,
11,
4672,
3536,
967,
279,
666,
434,
4461,
334,
4484,
6402,
261,
6702,
16,
2561,
578,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
4481,
261,
803,
16,
1177,
2218,
26,
18,
20,
2187,
4072,
2218,
92,
5292,
11,
4672,
3536,
967,
279,
666,
434,
4461,
334,
4484,
6402,
261,
6702,
16,
2561,
578,
5... |
label = form.getfirst('label','') view = form.getfirst('view', '') query = form.getfirst('query','') return method, action, rid, label, view, query, form | label = form.getfirst('label','').decode('utf-8') querytxt = form.getfirst('query','').decode('utf-8') return method, action, rid, go_part, label, querytxt, form def doGoResource(wfile, rid, go_part): wlib = weblib.getMainBm() item = wlib.webpages.getById(rid) if not item: wfile.write('404 not found\r\n\r\n%s not found' % rid) return wlib.visit(item) redirect(wfile, '', url=item.url) | def parseURL(rfile, env): """ @return method, rid, label, view, query, form method - 'GET', 'PUT', 'DELETE' action - the value from the submit button rid - None: n/a; '_': new item; int: resource id label - string of comma seperated tags view - view parameter ('XML', '', etc. ???) query - query parameter (2005-07-25 unused?) form - cgi.FieldStorage """ form = cgi.FieldStorage(fp=rfile, environ=env) # parse resource id (None, -1, int) resource = env.get('PATH_INFO', '').strip('/') rid = None if resource == '_': rid = -1 else: try: rid = int(resource) except ValueError: pass # the edit form can only do GET, use 'action' as an alternative method = env.get('REQUEST_METHOD','GET') action = form.getfirst('action', '').lower() if action == 'ok': method = 'PUT' elif action == 'delete': method = 'DELETE' elif form.getfirst('create_tags',''): # note: in this case the javascript:form.submit() has trouble setting # a value for the action <input>. We assume create_tags implies PUT. method = 'PUT' method = method.upper() # other parameters label = form.getfirst('label','') view = form.getfirst('view', '') query = form.getfirst('query','') return method, action, rid, label, view, query, form | e49b534e611c5a0c38bfe6d7f08d0ecc27a3cf96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/e49b534e611c5a0c38bfe6d7f08d0ecc27a3cf96/weblib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1785,
12,
86,
768,
16,
1550,
4672,
3536,
632,
2463,
707,
16,
10911,
16,
1433,
16,
1476,
16,
843,
16,
646,
707,
300,
296,
3264,
2187,
296,
4762,
2187,
296,
6460,
11,
1301,
300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1785,
12,
86,
768,
16,
1550,
4672,
3536,
632,
2463,
707,
16,
10911,
16,
1433,
16,
1476,
16,
843,
16,
646,
707,
300,
296,
3264,
2187,
296,
4762,
2187,
296,
6460,
11,
1301,
300,
... |
print "NOT IMPLEMENTED" | eventloop.addIdle(lambda:app.controller.playbackController.skip(1), "Skip Video") | def nextVideo_(self, sender): print "NOT IMPLEMENTED" # $$$$$$$$$$$$$$ | b42dcc7789594ac3caa0f995ae62c0fa965fb8f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/b42dcc7789594ac3caa0f995ae62c0fa965fb8f4/MainFrame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
10083,
67,
12,
2890,
16,
5793,
4672,
871,
6498,
18,
1289,
13834,
12,
14661,
30,
2910,
18,
5723,
18,
1601,
823,
2933,
18,
7457,
12,
21,
3631,
315,
6368,
14030,
7923,
468,
5366,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
10083,
67,
12,
2890,
16,
5793,
4672,
871,
6498,
18,
1289,
13834,
12,
14661,
30,
2910,
18,
5723,
18,
1601,
823,
2933,
18,
7457,
12,
21,
3631,
315,
6368,
14030,
7923,
468,
5366,
16... |
taskMgr.remove(self.uniqueName("readerPollTask")) | if self.readerPollTaskObj: taskMgr.remove(self.readerPollTaskObj) self.readerPollTaskObj = None | def stopReaderPollTask(self): taskMgr.remove(self.uniqueName("readerPollTask")) self.ignore(CConnectionRepository.getOverflowEventName()) | eaa2163cb0dc425fd86de0987e7e6f3bb69e0604 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/eaa2163cb0dc425fd86de0987e7e6f3bb69e0604/ConnectionRepository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
2514,
19085,
2174,
12,
2890,
4672,
309,
365,
18,
10530,
19085,
2174,
2675,
30,
1562,
9455,
18,
4479,
12,
2890,
18,
10530,
19085,
2174,
2675,
13,
365,
18,
10530,
19085,
2174,
2675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
2514,
19085,
2174,
12,
2890,
4672,
309,
365,
18,
10530,
19085,
2174,
2675,
30,
1562,
9455,
18,
4479,
12,
2890,
18,
10530,
19085,
2174,
2675,
13,
365,
18,
10530,
19085,
2174,
2675,
... |
build_util.rmdirs(item) | build_lib.rmdirs(item) | def runPerfSuite(options): """ Run the Performance Test Suite """ failed = False savePWD = os.getcwd() try: if 'release' in options.modes: testlist = [] testlistLarge = [] if not options.dryrun: os.chdir(options.chandlerHome) for item in glob.glob(os.path.join(options.profileDir, '__repository__.0*')): if os.path.isdir(item): build_util.rmdirs(item) else: os.remove(item) for item in glob.glob(os.path.join(options.chandlerHome, 'tools', 'QATestScripts', 'Performance', 'Perf*.py')): if 'PerfLargeData' in item: testlistLarge.append(item) else: testlist.append(item) failed = runScriptPerfTests(options, testlist) if not failed or options.noStop: if runScriptPerfTests(options, testlistLarge): failed = True if not failed or options.noStop: # XXX Startup time tests pass else: log('Skipping Performance Tests - release mode not specified') finally: os.chdir(savePWD) return failed | a06d255e291a874891b083b375d6d462449c293d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/a06d255e291a874891b083b375d6d462449c293d/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22016,
13587,
12,
2116,
4672,
3536,
1939,
326,
11217,
1359,
7766,
348,
9519,
3536,
2535,
273,
1083,
225,
1923,
31243,
273,
1140,
18,
588,
11089,
1435,
225,
775,
30,
309,
296,
9340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22016,
13587,
12,
2116,
4672,
3536,
1939,
326,
11217,
1359,
7766,
348,
9519,
3536,
2535,
273,
1083,
225,
1923,
31243,
273,
1140,
18,
588,
11089,
1435,
225,
775,
30,
309,
296,
9340,
... |
install = env.InstallFiltered(installdir, Dir(dirs)) | install = env.InstallFiltered(installdir, map(Dir, dirs)) | def InstallData(env, datadir, component, source, subdir = ""): installdir = Dir(env.subst(os.path.join(env["destdir"], env[datadir].lstrip("/"), subdir))) sources = map(str, Flatten([env.subst(source)])) dirs = [] for source in sources: if os.path.exists(source): if os.path.isfile(source): env.Alias("install-" + component, env.Install(installdir, source)) else: dirs.append(Dir(source)) if dirs: install = env.InstallFiltered(installdir, Dir(dirs)) AlwaysBuild(install) env.Alias("install-" + component, install) | 74413860e0ec994865b7d0fb3c1746d20c087192 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/74413860e0ec994865b7d0fb3c1746d20c087192/install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
751,
12,
3074,
16,
22034,
481,
16,
1794,
16,
1084,
16,
16921,
273,
1408,
4672,
3799,
1214,
273,
8446,
12,
3074,
18,
1717,
334,
12,
538,
18,
803,
18,
5701,
12,
3074,
9614,
10488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
751,
12,
3074,
16,
22034,
481,
16,
1794,
16,
1084,
16,
16921,
273,
1408,
4672,
3799,
1214,
273,
8446,
12,
3074,
18,
1717,
334,
12,
538,
18,
803,
18,
5701,
12,
3074,
9614,
10488,... |
"ignore", | "always", message=".*integer argument expected, got float", | def check_float_coerce(self, format, number): # SF bug 1530559. struct.pack raises TypeError where it used to convert. with warnings.catch_warnings(): warnings.filterwarnings( "ignore", category=DeprecationWarning, message=".*integer argument expected, got float", module=__name__) self.assertEqual(struct.pack(format, number), struct.pack(format, int(number))) | 9127efc8b225fb337187c81c5508db93350dc32e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/9127efc8b225fb337187c81c5508db93350dc32e/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
5659,
67,
2894,
2765,
12,
2890,
16,
740,
16,
1300,
4672,
468,
21318,
7934,
4711,
5082,
2539,
29,
18,
1958,
18,
2920,
14183,
3580,
1625,
518,
1399,
358,
1765,
18,
598,
5599,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
5659,
67,
2894,
2765,
12,
2890,
16,
740,
16,
1300,
4672,
468,
21318,
7934,
4711,
5082,
2539,
29,
18,
1958,
18,
2920,
14183,
3580,
1625,
518,
1399,
358,
1765,
18,
598,
5599,
18... |
elif self.open_mode == self.open_mode_1to1: | elif self.open_mode == self.open_mode_1to1 or (self.open_mode == self.open_mode_last and self.last_mode == self.open_mode_1to1): | def preload_prev_image(self, use_existing_image): try: if self.preloading_images == True and len(self.image_list) > 1: if use_existing_image == False: if self.curr_img_in_list - 1 >= 0: temp_name = str(self.image_list[self.curr_img_in_list-1]) elif self.listwrap_mode > 0: temp_name = str(self.image_list[len(self.image_list)-1]) else: # No need to preload.. return if temp_name == self.preloadimg_prev_name and self.preloadimg_prev_pixbuf_original != None: # No need to preload the same prev image twice.. return else: self.preloadimg_prev_name = temp_name pre_animtest = gtk.gdk.PixbufAnimation(self.preloadimg_prev_name) if pre_animtest.is_static_image() == True: self.preloadimg_prev_is_animation = False self.preloadimg_prev_pixbuf_original = pre_animtest.get_static_image() else: self.preloadimg_prev_is_animation = True self.preloadimg_prev_pixbuf_original = pre_animtest if self.preloadimg_prev_pixbuf_original == None: return # Determine self.preloadimg_prev_zoomratio if self.open_mode == self.open_mode_smart: self.zoom_to_fit_or_1_to_1(None, False, True) elif self.open_mode == self.open_mode_fit: self.zoom_to_fit_window(None, False, True) elif self.open_mode == self.open_mode_1to1: self.zoom_1_to_1(None, False, True) elif self.open_mode == self.open_mode_last: if self.last_mode == self.open_mode_smart: self.zoom_to_fit_or_1_to_1(None, False, True) elif self.last_mode == self.open_mode_fit: self.zoom_to_fit_window(None, False, True) elif self.last_mode == self.open_mode_1to1: self.zoom_1_to_1(None, False, True) # Always start with the original image to preserve quality! # Calculate image size: self.preloadimg_prev_width = int(self.preloadimg_prev_pixbuf_original.get_width() * self.preloadimg_prev_zoomratio) self.preloadimg_prev_height = int(self.preloadimg_prev_pixbuf_original.get_height() * self.preloadimg_prev_zoomratio) if self.preloadimg_prev_is_animation == False: # Scale image: if self.preloadimg_prev_pixbuf_original.get_has_alpha() == False: self.preloadimg_prev_pixbuf = self.preloadimg_prev_pixbuf_original.scale_simple(self.preloadimg_prev_width, self.preloadimg_prev_height, self.zoom_quality) else: colormap = self.imageview.get_colormap() light_grey = colormap.alloc_color('#666666', True, True) dark_grey = colormap.alloc_color('#999999', True, True) self.preloadimg_prev_pixbuf = self.preloadimg_prev_pixbuf_original.composite_color_simple(self.preloadimg_prev_width, self.preloadimg_prev_height, self.zoom_quality, 255, 8, light_grey.pixel, dark_grey.pixel) else: self.preloadimg_prev_pixbuf = self.preloadimg_prev_pixbuf_original gc.collect() if self.verbose == True: print _("Preloading") + ":", self.preloadimg_prev_name except: self.preloadimg_prev_pixbuf_original = None | 3bcec7670c38de7fcc5b8af88a46ae8c713768c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/3bcec7670c38de7fcc5b8af88a46ae8c713768c6/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20941,
67,
10001,
67,
2730,
12,
2890,
16,
999,
67,
11711,
67,
2730,
4672,
775,
30,
309,
365,
18,
1484,
15174,
67,
7369,
422,
1053,
471,
562,
12,
2890,
18,
2730,
67,
1098,
13,
405,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20941,
67,
10001,
67,
2730,
12,
2890,
16,
999,
67,
11711,
67,
2730,
4672,
775,
30,
309,
365,
18,
1484,
15174,
67,
7369,
422,
1053,
471,
562,
12,
2890,
18,
2730,
67,
1098,
13,
405,
40... |
sourceName = self.getFilename() | sourceName = 'lookaside:/' + self.getFilename() | def __init__(self, recipe, url, tag = None, **kwargs): self.url = url % recipe.macros if tag: self.tag = tag % recipe.macros self.tagArg = '-r tag:%s' % self.tag else: self.tag = tag self.tagArg = '' sourceName = self.getFilename() | c2c0e7cf1fdf9b5e3072cc6c6f68e44c7f36d050 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/c2c0e7cf1fdf9b5e3072cc6c6f68e44c7f36d050/source.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
16100,
16,
880,
16,
1047,
273,
599,
16,
2826,
4333,
4672,
365,
18,
718,
273,
880,
738,
16100,
18,
5821,
6973,
309,
1047,
30,
365,
18,
2692,
273,
1047,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
16100,
16,
880,
16,
1047,
273,
599,
16,
2826,
4333,
4672,
365,
18,
718,
273,
880,
738,
16100,
18,
5821,
6973,
309,
1047,
30,
365,
18,
2692,
273,
1047,
... |
defdis = self.site().family.disambig( "_default" ) | def isDisambig(self): if not hasattr(self, '_isDisambig'): defdis = self.site().family.disambig( "_default" ) locdis = self.site().family.disambig( self._site.lang ) | 769cab4d0697135c75febc0fd870ce1ef6e6fed3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/769cab4d0697135c75febc0fd870ce1ef6e6fed3/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
1669,
2536,
360,
12,
2890,
4672,
309,
486,
3859,
12,
2890,
16,
2070,
291,
1669,
2536,
360,
11,
4672,
1515,
2251,
273,
365,
18,
4256,
7675,
9309,
18,
2251,
2536,
360,
12,
365,
6315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
1669,
2536,
360,
12,
2890,
4672,
309,
486,
3859,
12,
2890,
16,
2070,
291,
1669,
2536,
360,
11,
4672,
1515,
2251,
273,
365,
18,
4256,
7675,
9309,
18,
2251,
2536,
360,
12,
365,
6315... | |
def alertError(hWnd, exc): | def alertError(hwnd, exc): | def alertError(hWnd, exc): win32gui.MessageBox(hwnd, str(exc), str(exc.__class__), win32con.MB_OK) | d69ed72a6418808f240d65821af1f93e37e499b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/d69ed72a6418808f240d65821af1f93e37e499b5/context_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6881,
668,
12,
20701,
4880,
16,
3533,
4672,
5657,
1578,
20292,
18,
27647,
12,
20701,
4880,
16,
609,
12,
10075,
3631,
609,
12,
10075,
16186,
1106,
972,
3631,
5657,
1578,
591,
18,
7969,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6881,
668,
12,
20701,
4880,
16,
3533,
4672,
5657,
1578,
20292,
18,
27647,
12,
20701,
4880,
16,
609,
12,
10075,
3631,
609,
12,
10075,
16186,
1106,
972,
3631,
5657,
1578,
591,
18,
7969,
67... |
order = self.args.get('order', 'priority') | order = self.args.get('order') | def render(self): self.perm.assert_permission(perm.TICKET_VIEW) | 175d3bc03d44e0b79f3848f80ba09f7105b69754 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/175d3bc03d44e0b79f3848f80ba09f7105b69754/Query.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
56,
16656,
1584,
67,
12145,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
56,
16656,
1584,
67,
12145,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._debug(NIGHTMARE, "startElement", `tag`) | def startElement (self, tag, attrs): """We get a new start tag. New rules could be appended to the pending rules. No rules can be removed from the list.""" # default data self._debug(NIGHTMARE, "startElement", `tag`) tag = check_spelling(tag, self.url) item = [STARTTAG, tag, attrs] if self.state=='wait': return self.waitbuf.append(item) rulelist = [] filtered = 0 if tag=="meta" and \ attrs.get('http-equiv', '').lower() =='pics-label': labels = resolve_html_entities(attrs.get('content', '')) # note: if there are no pics rules, this loop is empty for rule in self.pics: msg = check_pics(rule, labels) if msg: raise FilterPics(msg) # first labels match counts self.pics = [] elif tag=="body": # headers finished if self.pics: # no pics data found self.pics = [] # look for filter rules which apply for rule in self.rules: if rule.match_tag(tag) and rule.match_attrs(attrs): self._debug(NIGHTMARE, "matched rule %s on tag %s" % (`rule.title`, `tag`)) if rule.start_sufficient: item = rule.filter_tag(tag, attrs) filtered = "True" if item[0]==STARTTAG and item[1]==tag: foo,tag,attrs = item # give'em a chance to replace more than one attribute continue else: break else: self._debug(NIGHTMARE, "put on buffer") rulelist.append(rule) if rulelist: # remember buffer position for end tag matching pos = len(self.buf) self.rulestack.append((pos, rulelist)) if filtered: self.buf_append_data(item) elif self.js_filter: # if its not yet filtered, try filter javascript self.jsStartElement(tag, attrs) else: self.buf.append(item) # if rule stack is empty, write out the buffered data if not self.rulestack and not self.js_filter: self.buf2data() | 2235a065dd104f9a4252037ab7cb36681acd5b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2235a065dd104f9a4252037ab7cb36681acd5b89/HtmlParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13591,
261,
2890,
16,
1047,
16,
3422,
4672,
3536,
3218,
336,
279,
394,
787,
1047,
18,
1166,
2931,
3377,
506,
12317,
358,
326,
4634,
2931,
18,
2631,
2931,
848,
506,
3723,
628,
326,
666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13591,
261,
2890,
16,
1047,
16,
3422,
4672,
3536,
3218,
336,
279,
394,
787,
1047,
18,
1166,
2931,
3377,
506,
12317,
358,
326,
4634,
2931,
18,
2631,
2931,
848,
506,
3723,
628,
326,
666,
... | |
diskList = Ovf.getDict(diskSection, None)['children'] | diskList = Ovf.getDict(diskSection)['children'] | def getOvfDisks(virtualHardware, dir, references, diskSection=None, configId=None, envFile=None): """ Retrieves disk device information for the virtual machine from the Ovf file. @param ovf: Ovf file @type ovf: DOM Document @param virtualHardware: Ovf VirtualSystem Node @type virtualHardware: DOM Element @param configId: configuration name @type configId: String @return: list of dictionaries, see L{Disk Element<diskElement>} @rtype: list """ disks = () logicalNames = ['hda', 'hdb', 'hdd'] rasd = Ovf.getDict(virtualHardware, configId)['children'] ovfDiskList = [] for resource in rasd: if resource['name'] == 'Item': if resource['rasd:ResourceType'] == '14': ovfDiskList.append(('fd', resource)) elif resource['rasd:ResourceType'] == '15': ovfDiskList.append(('cdrom', resource)) elif resource['rasd:ResourceType'] == '17': ovfDiskList.append(('disk', resource)) for each in ovfDiskList: #resource dictionary ovfDisk = each[1] #disk device: hd, fd, or cdrom device = each[0] #source file source = None hostResource = ovfDisk['rasd:HostResource'] resourceId = hostResource.rsplit('/', 1).pop() if hostResource.startswith('ovf://disk/'): diskList = Ovf.getDict(diskSection, None)['children'] hostResources = [] for child in diskList: #Create a tuple (file hostResource, diskId, referred?) #flag to check if the disk is referred referedDisk = 0 if child['ovf:diskId'] == resourceId: #Check for disks referred as parentRef. #Add parentRef disk first, as it could be the # operating system disk image if child.has_key('ovf:parentRef'): parentref = child['ovf:parentRef'] for pref in diskList: if pref['ovf:diskId'] == parentref: referedDisk = 1 hostResource = 'ovf://file/' + pref['ovf:fileRef'] diskResource = (hostResource, resourceId, referedDisk) hostResources.append(diskResource) break # and the disk referred by the VMs HostResource #Check to see if the fileRef is referred by more than one disk referedDisk = 0 hostResource = 'ovf://file/' + child['ovf:fileRef'] refcnt = 0 myFileRef = child['ovf:fileRef'] for disk in diskList: if disk['ovf:fileRef'] == myFileRef: refcnt = refcnt + 1 if refcnt > 1: referedDisk = 1 diskResource = (hostResource, resourceId, referedDisk) hostResources.append(diskResource) for resource in hostResources: (hostResource, diskId, referedDisk) = resource resourceId = hostResource.rsplit('/', 1).pop() refList = Ovf.getDict(references, None)['children'] for child in refList: if child['ovf:id'] == resourceId: source = os.path.join(dir, child['ovf:href']) if referedDisk == 1: simage = source diskpath = source.rsplit('/', 1)[0] diskimage = source.rsplit('/', 1)[1] diskname = diskimage.split('.')[0] disknameext = diskimage.split('.')[1] newdiskname = diskname + '-' + diskId if disknameext != None: source = os.path.join(diskpath, newdiskname + '.' + disknameext) else: source = os.path.join(diskpath, newdiskname) dimage = source shutil.copy(simage, dimage) if source == None: raise ValueError(hostResource) #target bus parentId = int(ovfDisk['rasd:Parent']) for presource in rasd: if presource['name'] == 'Item': instId = int(presource['rasd:InstanceID']) if instId == parentId: parentType = presource['rasd:ResourceType'] break if(parentType == '5'): bus = 'ide' elif(parentType == '6'): bus = 'scsi' else: raise ValueError #default not read-only ro = False #target device if(device == 'cdrom'): ro = True dev = 'hdc' else: dev = logicalNames.pop(0) libvirtDisk = dict(diskType='file', diskDevice=device, sourceFile=source, targetBus=bus, targetDev=dev, readonly=ro) disks += (libvirtDisk,) # add the environment iso if envFile: disks += (dict(diskType = 'file', targetDev = 'hdc:cdrom', sourceFile = os.path.abspath(envFile), targetBus = 'ide', diskDevice = 'cdrom', readonly = True),) return disks | b11918c759c74ee67c3db3b2d51ef80c2e83e7eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9789/b11918c759c74ee67c3db3b2d51ef80c2e83e7eb/OvfLibvirt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
22021,
12,
12384,
44,
14519,
16,
1577,
16,
5351,
16,
4234,
5285,
33,
7036,
16,
642,
548,
33,
7036,
16,
1550,
812,
33,
7036,
4672,
3536,
20507,
4234,
2346,
1779,
364,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
22021,
12,
12384,
44,
14519,
16,
1577,
16,
5351,
16,
4234,
5285,
33,
7036,
16,
642,
548,
33,
7036,
16,
1550,
812,
33,
7036,
4672,
3536,
20507,
4234,
2346,
1779,
364,
326... |
logfile, 0, '') | logfile, 0, '') | def mpi_run(DEBUGON, nproc, cmd, nodes, logfile): 'Execute commands in parallel using LAM/MPI.' from os import access,F_OK found = 0 uname = os.uname() nodelen = len(string.split(nodes,',')) try: if DEBUGON: printlog('o2tf.mpi_run: MPIRUN = %s' % config.MPIRUN, logfile, 0, '') printlog('o2tf.mpi_run: nproc = %s' % nproc, logfile, 0, '') printlog('o2tf.mpi_run: nodelen = %d' % nodelen, logfile, 0, '') printlog('o2tf.mpi_run: cmd = %s' % cmd, logfile, 0, '') pid = os.spawnv(os.P_NOWAIT, '/bin/bash', ['bash', '-xc', config.MPIRUN + ' -sigs -ger -w n0-%d %s' % \ ( nodelen - 1, cmd)]) os.waitpid(pid,0) except os.error: pass | 657bfc37c22ea26052b0df161170cb3df469efec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1915/657bfc37c22ea26052b0df161170cb3df469efec/o2tf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6749,
77,
67,
2681,
12,
9394,
673,
16,
290,
9381,
16,
1797,
16,
2199,
16,
15204,
4672,
296,
5289,
4364,
316,
7230,
1450,
511,
2192,
19,
49,
1102,
1093,
628,
1140,
1930,
2006,
16,
42,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6749,
77,
67,
2681,
12,
9394,
673,
16,
290,
9381,
16,
1797,
16,
2199,
16,
15204,
4672,
296,
5289,
4364,
316,
7230,
1450,
511,
2192,
19,
49,
1102,
1093,
628,
1140,
1930,
2006,
16,
42,
... |
_rx_quotes = re.compile('"(.*)"') | def params(self): """ Like ``.str_params``, but may decode values and keys """ params = self.str_params if self.charset: params = UnicodeMultiDict(params, encoding=self.charset, errors=self.unicode_errors, decode_keys=self.decode_param_names) return params | 27721d37a62c616781b9e6b6a139d69611eb9449 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12287/27721d37a62c616781b9e6b6a139d69611eb9449/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
859,
12,
2890,
4672,
3536,
23078,
1375,
8338,
701,
67,
2010,
68,
9191,
1496,
2026,
2495,
924,
471,
1311,
3536,
859,
273,
365,
18,
701,
67,
2010,
309,
365,
18,
9999,
30,
859,
273,
9633,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
859,
12,
2890,
4672,
3536,
23078,
1375,
8338,
701,
67,
2010,
68,
9191,
1496,
2026,
2495,
924,
471,
1311,
3536,
859,
273,
365,
18,
701,
67,
2010,
309,
365,
18,
9999,
30,
859,
273,
9633,... | |
session = None count = 0 | session = None localRun = True count = 0 | def clientThread(self, id, sock, addr): session = None count = 0 log.info('Iniciando %s' % id) try: while self.run: msg = sock.recv(1024) if msg.strip(): msg = msg.strip() log.log('Client %s: %s' % (str(addr), msg)) self.clientQueuelock.acquire() if msg.upper().startswith('SESSION: '): session = msg[9:] if not self.clientQueues.has_key(session): self.clientQueues[session] = {'q': Queue.Queue(), 't': time.time()} sock.send('NEW SESSION\r\n') else: self.clientQueues[session]['t'] = time.time() sock.send('OK\r\n') elif session and msg.upper() == 'GET STATUS': self.clientQueues[session]['t'] = time.time() sock.send('BEGIN STATUS\r\n') self.monitoredUsersLock.acquire() users = self.monitoredUsers.keys() users.sort() for user in users: mu = self.monitoredUsers[user] sock.send('PeerStatus: %s:::%s:::%s:::%s\r\n' % (user, mu['Status'], mu['Calls'], mu['CallerID'] if mu['CallerID'] != '--' else user)) self.monitoredUsersLock.release() self.channelsLock.acquire() for Uniqueid in self.channels: ch = self.channels[Uniqueid] sock.send('NewChannel: %s:::%s:::%s:::%s:::%s\r\n' % (ch['Channel'], ch['State'], ch['CallerIDNum'], ch['CallerIDName'], Uniqueid)) self.channelsLock.release() self.callsLock.acquire() for call in self.calls: c = self.calls[call] sock.send('Call: %s:::%s:::%s:::%s:::%s:::%s:::%s\r\n' % (c['Source'], c['Destination'], c['CallerID'], c['CallerIDName'], \ c['SrcUniqueID'], c['DestUniqueID'], c['Status'])) self.callsLock.release() sock.send('END STATUS\r\n') elif session and msg.upper() == 'GET CHANGES': self.clientQueues[session]['t'] = time.time() sock.send('BEGIN CHANGES\r\n') while True: try: msg = self.clientQueues[session]['q'].get(False) sock.send(msg + '\r\n') except Queue.Empty: break sock.send('END CHANGES\r\n') elif msg.startswith('OriginateCall'): self.monitoredUsersLock.acquire() action, src, dst = msg.split(':::') command = [] command.append('Action: Originate') command.append('Channel: %s' % src) command.append('Exten: %s' % dst) command.append('Context: %s' % self.monitoredUsers[src]['Context']) command.append('Priority: 1') command.append('CallerID: %s' % MONAST_CALLERID) for var in self.monitoredUsers[src]['Variables']: command.append('Variable: %s' % var) self.send(command) self.monitoredUsersLock.release() elif msg.startswith('OriginateDial'): action, src, dst = msg.split(':::') command = [] command.append('Action: Originate') command.append('Channel: %s' % src) command.append('Application: Dial') command.append('Data: %s|30|rTt' % dst) command.append('CallerID: %s' % MONAST_CALLERID) self.send(command) elif msg.startswith('HangupChannel'): self.channelsLock.acquire() action, Uniqueid = msg.split(':::') command = [] command.append('Action: Hangup') command.append('Channel: %s' % self.channels[Uniqueid]['Channel']) self.send(command) self.channelsLock.release() elif msg.startswith('TransferCall'): action, SrcUniqueID, dst, isPeer = msg.split(':::') if isPeer == 'true': tech, exten = dst.split('/') try: exten = int(exten) except: self.monitoredUsersLock.acquire() exten = self.monitoredUsers[dst]['CallerID'] exten = exten[exten.find('<')+1:exten.find('>')] self.monitoredUsersLock.release() self.channelsLock.acquire() srcChannel = self.channels[SrcUniqueID]['Channel'] command = [] command.append('Action: Redirect') command.append('Channel: %s' % srcChannel) command.append('Exten: %s' % exten) command.append('Context: %s' % self.tranferContext) command.append('Priority: 1') self.send(command) self.channelsLock.release() else: sock.send('NO SESSION\r\n') self.clientQueuelock.release() if msg.upper() == 'BYE': break else: # POG para encerrar a tread caso o socket do cliente fique louco (acontece) count += 1 if count == 5: log.error('clientThread() 5 pools without messages, dropping client...') break except socket.error, e: log.error('Socket ERROR %s: %s' % (id, e)) for lock in (self.clientQueuelock, self.monitoredUsersLock, self.channelsLock, self.callsLock): try: lock.release() except: pass try: sock.close() except: pass log.info('Encerrando %s' % id) self.clientSockLock.acquire() del self.clientSocks[id] self.clientSockLock.release() | 099bea17f5ce125fbe0f8391e392e4cf4e259207 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12004/099bea17f5ce125fbe0f8391e392e4cf4e259207/monast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
3830,
12,
2890,
16,
612,
16,
7313,
16,
3091,
4672,
1339,
225,
273,
599,
1191,
1997,
273,
1053,
1056,
565,
273,
374,
613,
18,
1376,
2668,
382,
14463,
28630,
738,
87,
11,
738,
612,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
3830,
12,
2890,
16,
612,
16,
7313,
16,
3091,
4672,
1339,
225,
273,
599,
1191,
1997,
273,
1053,
1056,
565,
273,
374,
613,
18,
1376,
2668,
382,
14463,
28630,
738,
87,
11,
738,
612,... |
cmd = '%s '*6 % (executable, logfile, | cmd = '%s '*8 % (executable, logfile, | def set_source(self, verbose=True): """Create eruptive source file Requires - input file - grain file - database file """ executable = os.path.join(self.utilities_dir, 'SetSrc', 'SetSrc.PUB.exe') logfile = self.basepath + '.SetSrc.log' | c7ec9d7a361fc0608004df7bff21437c322293dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5868/c7ec9d7a361fc0608004df7bff21437c322293dd/wrapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3168,
12,
2890,
16,
3988,
33,
5510,
4672,
3536,
1684,
6445,
3648,
688,
1084,
585,
225,
16412,
300,
810,
585,
300,
3087,
267,
585,
300,
2063,
585,
3536,
225,
9070,
273,
1140,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3168,
12,
2890,
16,
3988,
33,
5510,
4672,
3536,
1684,
6445,
3648,
688,
1084,
585,
225,
16412,
300,
810,
585,
300,
3087,
267,
585,
300,
2063,
585,
3536,
225,
9070,
273,
1140,
1... |
def db_open(self): | def env_open(self): | def db_open(self): try: if not self.__env: self.__env = Environment(self.envname) return self.__env.get_db_cnx() except Exception, e: print 'Failed to open environment.', e sys.exit(1) | 8bfd000da40b8168bc7c6543227d6aa794adcb52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/8bfd000da40b8168bc7c6543227d6aa794adcb52/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1550,
67,
3190,
12,
2890,
4672,
775,
30,
309,
486,
365,
16186,
3074,
30,
365,
16186,
3074,
273,
7518,
12,
2890,
18,
3074,
529,
13,
327,
365,
16186,
3074,
18,
588,
67,
1966,
67,
10305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1550,
67,
3190,
12,
2890,
4672,
775,
30,
309,
486,
365,
16186,
3074,
30,
365,
16186,
3074,
273,
7518,
12,
2890,
18,
3074,
529,
13,
327,
365,
16186,
3074,
18,
588,
67,
1966,
67,
10305,
... |
if row[i] is not None and row[i] <= row[i-1]: | if row[i-1] is not None and row[i] <= row[i-1]: | def is_standard(self): """ Returns True if t is a standard skew tableau and False otherwise. | 314d2079b43d041315d4410c7e0dc311f98fa2d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/314d2079b43d041315d4410c7e0dc311f98fa2d4/skew_tableau.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
10005,
12,
2890,
4672,
3536,
2860,
1053,
309,
268,
353,
279,
4529,
20001,
1014,
8377,
471,
1083,
3541,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
10005,
12,
2890,
4672,
3536,
2860,
1053,
309,
268,
353,
279,
4529,
20001,
1014,
8377,
471,
1083,
3541,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self._strings.insert(self._cursor[0], self._candidates[0][ self.get_cursor_pos() ][_p_index]) self._cursor [0] += 1 if self._py_mode: self._zi = self._candidates[0][ self.get_cursor_pos() ][_p_index] | if self._candidates[0]: self._strings.insert(self._cursor[0], self._candidates[0][ self.get_cursor_pos() ][_p_index]) self._cursor [0] += 1 if self._py_mode: self._zi = self._candidates[0][ self.get_cursor_pos() ][_p_index] | def commit_to_preedit (self): '''Add select phrase in lookup table to preedit string''' if not self._py_mode: _p_index = self.get_index('phrase') else: _p_index = 8 try: self._strings.insert(self._cursor[0], self._candidates[0][ self.get_cursor_pos() ][_p_index]) self._cursor [0] += 1 if self._py_mode: self._zi = self._candidates[0][ self.get_cursor_pos() ][_p_index] self.over_input () self.update_candidates () except: pass | d64df85de06b3b2074b5f4926b93c076ba5a08c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/544/d64df85de06b3b2074b5f4926b93c076ba5a08c1/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
67,
869,
67,
1484,
4619,
261,
2890,
4672,
9163,
986,
2027,
13045,
316,
3689,
1014,
358,
675,
4619,
533,
26418,
309,
486,
365,
6315,
2074,
67,
3188,
30,
389,
84,
67,
1615,
273,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
67,
869,
67,
1484,
4619,
261,
2890,
4672,
9163,
986,
2027,
13045,
316,
3689,
1014,
358,
675,
4619,
533,
26418,
309,
486,
365,
6315,
2074,
67,
3188,
30,
389,
84,
67,
1615,
273,
36... |
delete = True if config is None: usage("Must specifiy configuration file") | delete = 1 if k == '-p' or k == '--protocol': auth_protocol = v if k == '-f' or k == '--filename': auth_db = v if k == '-r' or k == '--realm': auth_realm = v if config is not None: if auth_protocol or auth_db: usage("Conflicting options; use either -C *or* -p and -f") auth_protocol = config.zeo.authentication_protocol auth_db = config.zeo.authentication_database auth_realm = config.zeo.authentication_realm elif not (auth_protocol and auth_db): usage("Must specifiy configuration file or protocol and database") | def options(args): """Password-specific options loaded from regular ZEO config file.""" schema = ZConfig.loadSchema(os.path.join(os.path.dirname(ZEO.__file__), "schema.xml")) try: options, args = getopt.getopt(args, "C:", ["configure="]) except getopt.error, msg: usage(msg) config = None delete = False for k, v in options: if k == '-C' or k == '--configure': config, nil = ZConfig.loadConfig(schema, v) if k == '-d' or k == '--delete': delete = True if config is None: usage("Must specifiy configuration file") password = None if delete: if not args: usage("Must specify username to delete") elif len(args) > 1: usage("Too many arguments") username = args[0] else: if not args: usage("Must specify username") elif len(args) > 2: usage("Too many arguments") elif len(args) == 1: username = args[0] else: username, password = args return config.zeo, delete, username, password | f7ed0f34b0e09ed8547d402667d042eb4903a0ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/f7ed0f34b0e09ed8547d402667d042eb4903a0ef/zeopasswd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
702,
12,
1968,
4672,
3536,
3913,
17,
12524,
702,
4203,
628,
6736,
2285,
41,
51,
642,
585,
12123,
225,
1963,
273,
2285,
809,
18,
945,
3078,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
702,
12,
1968,
4672,
3536,
3913,
17,
12524,
702,
4203,
628,
6736,
2285,
41,
51,
642,
585,
12123,
225,
1963,
273,
2285,
809,
18,
945,
3078,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
80... |
and element[1] in ('=', '!=', '<>', '<=', '<', '>', '>=', '=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of') | and element[1] in ('=', '!=', '<>', '<=', '<', '>', '>=', '=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of') \ | def _is_leaf(self, element, internal=False): return (isinstance(element, tuple) or isinstance(element, list)) \ and len(element) == 3 \ and element[1] in ('=', '!=', '<>', '<=', '<', '>', '>=', '=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of') and ((not internal) or element[1] in ('inselect',)) | 77bf737ff6562568119a837f99d9ec13093c60ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/77bf737ff6562568119a837f99d9ec13093c60ab/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
12070,
12,
2890,
16,
930,
16,
2713,
33,
8381,
4672,
327,
261,
291,
1336,
12,
2956,
16,
3193,
13,
578,
1549,
12,
2956,
16,
666,
3719,
521,
471,
562,
12,
2956,
13,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
12070,
12,
2890,
16,
930,
16,
2713,
33,
8381,
4672,
327,
261,
291,
1336,
12,
2956,
16,
3193,
13,
578,
1549,
12,
2956,
16,
666,
3719,
521,
471,
562,
12,
2956,
13,
422,
... |
WHERE a.id in (' + ','.join([str(x) for x in ids]) + ') \ GROUP BY a.id') | WHERE a.id in (" + ",".join([str(x) for x in ids]) + ") \ GROUP BY a.id") | def _sheet(self, cursor, user, ids, name, args, context): sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | aaf478c22075e872786f6696ff3b9b7ecaf0bdde /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/aaf478c22075e872786f6696ff3b9b7ecaf0bdde/hr_timesheet_sheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8118,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
833,
16,
819,
4672,
6202,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
7256,
67,
8293,
2963,
67,
8118,
18,
8118,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8118,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
833,
16,
819,
4672,
6202,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
7256,
67,
8293,
2963,
67,
8118,
18,
8118,
6134,
... |
items = os.listdir(dir) for item in items: | for item in os.listdir(dir): | def process_directory_macros(dir): """Processes a directory looking for macros. | a6feb1e5c52929a2b7bcc20a424e929b737f2517 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9355/a6feb1e5c52929a2b7bcc20a424e929b737f2517/wiki_grabber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5149,
67,
5821,
6973,
12,
1214,
4672,
3536,
10599,
279,
1867,
7849,
364,
24302,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5149,
67,
5821,
6973,
12,
1214,
4672,
3536,
10599,
279,
1867,
7849,
364,
24302,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
(lambda x: dh_dec( x, u'%d-ві до Р.Х.' ), lambda x: x == 0 or (x % 100 == 40)), | (lambda x: dh_dec( x, u'%d-ві до Р.Х.' ), lambda p: p == 0 or (p % 100 == 40)), | def dh_knYearConverter( value ): if type(value) is int: # Encode an integer value into a textual form. return unicode(value).translate(_knDigitsToLocal) else: # First make sure there are no real digits in the string tmp = value.translate(_knDigitsToLocal) # Test if tmp == value: tmp = value.translate(_knLocalToDigits) # Convert return dh_noConv( tmp, u'%d' ) else: raise ValueError("string contains regular digits") | 32e5f5c1a30bc02fc3075b9c456f10fafab05a66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/32e5f5c1a30bc02fc3075b9c456f10fafab05a66/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11007,
67,
21112,
5593,
5072,
12,
460,
262,
30,
309,
618,
12,
1132,
13,
353,
509,
30,
468,
6240,
392,
3571,
460,
1368,
279,
25774,
646,
18,
327,
5252,
12,
1132,
2934,
13929,
24899,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11007,
67,
21112,
5593,
5072,
12,
460,
262,
30,
309,
618,
12,
1132,
13,
353,
509,
30,
468,
6240,
392,
3571,
460,
1368,
279,
25774,
646,
18,
327,
5252,
12,
1132,
2934,
13929,
24899,
211... |
system("cat /proc/net/dev") | def getInterfaces(self, callback = None): devicesPattern = re_compile('[a-z]+[0-9]+') self.configuredInterfaces = [] fp = file('/proc/net/dev', 'r') system("cat /proc/net/dev") result = fp.readlines() fp.close() for line in result: try: device = devicesPattern.search(line).group() if device == 'wifi0': continue self.getDataForInterface(device, callback) except AttributeError: pass | 340ec4b3727cb61e1038ca97b006471b5568e8a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/340ec4b3727cb61e1038ca97b006471b5568e8a3/Network.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29833,
12,
2890,
16,
1348,
273,
599,
4672,
7166,
3234,
273,
283,
67,
11100,
2668,
63,
69,
17,
94,
3737,
63,
20,
17,
29,
3737,
6134,
365,
18,
16449,
10273,
273,
5378,
4253,
273,
585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29833,
12,
2890,
16,
1348,
273,
599,
4672,
7166,
3234,
273,
283,
67,
11100,
2668,
63,
69,
17,
94,
3737,
63,
20,
17,
29,
3737,
6134,
365,
18,
16449,
10273,
273,
5378,
4253,
273,
585,
... | |
""" | r""" | def tau1(T1, T2, cells_map): """ The definition of tau1 is: tau1 : T1 -> T1 tau1 = beta^(-1)_2 beta_3 (composing left to right) where beta_i : T2 -> T1 changes just the i-th coordinate of a triple. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) # identity sage: z = isotopism(5) # identity sage: T2 = T1.apply_isotopism(x, y, z) sage: print is_bitrade(T1, T2) True sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: t1 = tau1(T1, T2, cells_map) sage: print t1 [2, 3, 4, 5, 1, 7, 8, 9, 10, 6, 12, 13, 14, 15, 11, 17, 18, 19, 20, 16, 22, 23, 24, 25, 21] sage: print t1.to_cycles() [(1, 2, 3, 4, 5), (6, 7, 8, 9, 10), (11, 12, 13, 14, 15), (16, 17, 18, 19, 20), (21, 22, 23, 24, 25)] """ # The cells_map has both directions, i.e. integer to # cell and cell to integer, so the size of T1 is # just half of len(cells_map). x = (int(len(cells_map)/2) + 1) * [-1] for r in range(T1.nrows()): for c in range(T1.ncols()): e = T1[r, c] if e < 0: continue (r2, c2, e2) = beta2( (r,c,e), T1, T2) (r3, c3, e3) = beta3( (r2,c2,e2), T2, T1) x[ cells_map[(r,c)] ] = cells_map[ (r3,c3) ] x.pop(0) # remove the head of the list since we # have permutations on 1..(something). return Permutation(x) | 940ac7fc9c99ff948cd46103f8ba7e338a7354d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/940ac7fc9c99ff948cd46103f8ba7e338a7354d6/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12284,
21,
12,
56,
21,
16,
399,
22,
16,
5983,
67,
1458,
4672,
436,
8395,
1021,
2379,
434,
12284,
21,
353,
30,
225,
12284,
21,
294,
399,
21,
317,
399,
21,
12284,
21,
273,
6796,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12284,
21,
12,
56,
21,
16,
399,
22,
16,
5983,
67,
1458,
4672,
436,
8395,
1021,
2379,
434,
12284,
21,
353,
30,
225,
12284,
21,
294,
399,
21,
317,
399,
21,
12284,
21,
273,
6796,
66,
... |
'text': _("Pootle configured to use memcached as caching backend but connection to memcached server is failing. caching is currently disabled")}) | 'text': _("Pootle is configured to use memcached as a caching backend but connection to the memcached server is failing. Caching is currently disabled.")}) | def optimal_depcheck(): optimal = [] if not depcheck.test_db(): if depcheck.test_mysqldb(): text = _("Using the default sqlite3 database engine. sqlite is only suitable for small installs with a small number of users. Pootle will perform better with the mysql database enginge") else: text = _("Using the default sqlite3 database engine. sqlite is only suitable for small installs with a small number of users. Pootle will perform better with the mysql database enginge but you need to install python-MySQLdb first.") optimal.append({'dependency': 'db', 'text': text}) if depcheck.test_cache(): if depcheck.test_memcache(): if not depcheck.test_memcached(): # memcached configured but connection failing optimal.append({'dependency': 'cache', 'text': _("Pootle configured to use memcached as caching backend but connection to memcached server is failing. caching is currently disabled")}) else: if not depcheck.test_session(): from django import VERSION if VERSION[1] == 0: text = _('For optimal performance use django.contrib.sessions.backends.cache as the session engine') else: text = _('For optimal performance use django.contrib.sessions.backends.cached_db as the session engine') optimal.append({'dependency': 'session', 'text': text}) else: optimal.append({'dependency': 'cache', 'text': _('Pootle configured to use memcached as caching backend but python support for memcache is not installed. caching is currently disabled')}) else: optimal.append({'dependency': 'cache', 'text': _('For optimal performance use memcached as the caching backend')}) if not depcheck.test_webserver(): optimal.append({'dependency': 'webserver', 'text': _("For optimal performance use Apache as your webserver")}) if not depcheck.test_debug(): optimal.append({'dependency': 'debug', 'text': _('Running in debug mode, debug mode is only needed when developing Pootle. For optimal performance disable debugging mode')}) if not depcheck.test_livetranslation(): optimal.append({'dependency': 'livetranslation', 'text': _("Running in Live Translation mode, live translation is useful as a tool to learn about Pootle and localiztion but has high impact on performance")}) return optimal | 14ed1d919997b49ada78a823d1a49847386f5bcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/14ed1d919997b49ada78a823d1a49847386f5bcd/adminpages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16413,
67,
15037,
1893,
13332,
16413,
273,
5378,
225,
309,
486,
5993,
1893,
18,
3813,
67,
1966,
13332,
309,
5993,
1893,
18,
3813,
67,
12527,
1966,
13332,
977,
273,
389,
2932,
7736,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16413,
67,
15037,
1893,
13332,
16413,
273,
5378,
225,
309,
486,
5993,
1893,
18,
3813,
67,
1966,
13332,
309,
5993,
1893,
18,
3813,
67,
12527,
1966,
13332,
977,
273,
389,
2932,
7736,
326,
... |
'<a href=" | '''<a href=" style="position: absolute; top: 3px; right: 44px; line-height: 13px;" >${_("Pad")}</a>\n''' + \ | def insert_pad_link(self, output): # Insert the link on the line right after the link to open the # attachment form form_opener_insertion = output.index( '\n', output.index(self.ADD_ATTACHMENT_BUTTON)) + 1 output = output[:form_opener_insertion] + \ '<a href="#" id="add-pad" class="button-a">${_("Pad")}</a>\n' + \ output[form_opener_insertion:] return output | fae0a9ccd4c10d38489403911598fe875b1e8b77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fae0a9ccd4c10d38489403911598fe875b1e8b77/editors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
6982,
67,
1232,
12,
2890,
16,
876,
4672,
468,
8040,
326,
1692,
603,
326,
980,
2145,
1839,
326,
1692,
358,
1696,
326,
468,
6042,
646,
646,
67,
25098,
67,
6387,
285,
273,
876,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
6982,
67,
1232,
12,
2890,
16,
876,
4672,
468,
8040,
326,
1692,
603,
326,
980,
2145,
1839,
326,
1692,
358,
1696,
326,
468,
6042,
646,
646,
67,
25098,
67,
6387,
285,
273,
876,
... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 476) else quickfix.StringField.__init__(self, 476, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1059,
6669,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1059,
6669,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... |
except pybufr.RecordPackError, e: | except bufr.RecordPackError, e: | def netcdf_datatype(type_name): """ converts numpy datatype to NetCDF datatype all floats are converted to doubles all integers are converted to 4 byte int all chars are converted to NetCDF byte-type """ if 'float' in type_name: return 'd' if 'int' in type_name: return 'i' if 'long' in type_name: return 'i' if 'string' in type_name: return 'b' raise BUFR2NetCDFError("Cannot convert %s to NetCDF compatible type" % type_name) | 21fcc10f97a0964bc23934db1eadb04361c1db2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5638/21fcc10f97a0964bc23934db1eadb04361c1db2e/bufr2netcdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2901,
24799,
67,
21540,
12,
723,
67,
529,
4672,
3536,
7759,
3972,
11172,
358,
8503,
39,
4577,
11172,
225,
777,
19172,
854,
5970,
358,
31446,
777,
12321,
854,
5970,
358,
1059,
1160,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2901,
24799,
67,
21540,
12,
723,
67,
529,
4672,
3536,
7759,
3972,
11172,
358,
8503,
39,
4577,
11172,
225,
777,
19172,
854,
5970,
358,
31446,
777,
12321,
854,
5970,
358,
1059,
1160,
509,
... |
if domain is not None: | if vids: | def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None): prop = obj.pool.get('ir.property') vids = [obj._name + ',' + str(oid) for oid in ids] | 50985408b62a1505e09e698c72937e1f5431aad9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/50985408b62a1505e09e698c72937e1f5431aad9/fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1637,
67,
350,
12,
2890,
16,
1081,
16,
4422,
16,
4555,
16,
2270,
67,
529,
16,
3258,
16,
819,
33,
7036,
4672,
2270,
273,
1081,
18,
6011,
18,
588,
2668,
481,
18,
4468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1637,
67,
350,
12,
2890,
16,
1081,
16,
4422,
16,
4555,
16,
2270,
67,
529,
16,
3258,
16,
819,
33,
7036,
4672,
2270,
273,
1081,
18,
6011,
18,
588,
2668,
481,
18,
4468,
... |
return ("<i>The %s is only available to the list" " administrator.</i>" % which) def FormatRosterOptionForUser(self): return self.RosterOption().Format() def RosterOption(self): | return (_("<i>The %s is only available to the list" " administrator.</i>") % which) def FormatRosterOptionForUser(self, lang): return self.RosterOption(lang).Format() def RosterOption(self, lang): | def RestrictedListMessage(self, which, restriction): if not restriction: return "" elif restriction == 1: return ("<i>The %s is only available to the list members.</i>" % which) else: return ("<i>The %s is only available to the list" " administrator.</i>" % which) | aa0161ff926b932bbc81a4bfaf1b8256bb8966a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/aa0161ff926b932bbc81a4bfaf1b8256bb8966a8/HTMLFormatter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29814,
682,
1079,
12,
2890,
16,
1492,
16,
9318,
4672,
309,
486,
9318,
30,
327,
1408,
1327,
9318,
422,
404,
30,
327,
7566,
32,
77,
34,
1986,
738,
87,
353,
1338,
2319,
358,
326,
666,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29814,
682,
1079,
12,
2890,
16,
1492,
16,
9318,
4672,
309,
486,
9318,
30,
327,
1408,
1327,
9318,
422,
404,
30,
327,
7566,
32,
77,
34,
1986,
738,
87,
353,
1338,
2319,
358,
326,
666,
4... |
"""parse generated html for scripts""" if not self.buffer: print >>sys.stderr, "empty buffer on </script>" | """parse generated html for scripts return True if the script generates any output, else False""" if len(self.buffer)<2: | def jsEndElement (self, tag): """parse generated html for scripts""" if not self.buffer: print >>sys.stderr, "empty buffer on </script>" return if self.buffer[-1][0]!=DATA: print >>sys.stderr, "missing data for </script>", self.buffer[-1:] return script = self.buffer[-1][1].strip() del self.buffer[-1] if not (self.buffer and self.buffer[-1][0]==STARTTAG and \ self.buffer[-1][1]=='script'): # there was a <script src="..."> already return del self.buffer[-1] if script.startswith("<!--"): script = script[4:].strip() if not script: return self.jsScript(script, 0.0) | 3065d1c6c10f0c7943a3e34722dcd91e9c5a16f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/3065d1c6c10f0c7943a3e34722dcd91e9c5a16f5/Rewriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3828,
1638,
1046,
261,
2890,
16,
1047,
4672,
3536,
2670,
4374,
1729,
364,
8873,
327,
1053,
309,
326,
2728,
6026,
1281,
876,
16,
469,
1083,
8395,
309,
562,
12,
2890,
18,
4106,
13,
32,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3828,
1638,
1046,
261,
2890,
16,
1047,
4672,
3536,
2670,
4374,
1729,
364,
8873,
327,
1053,
309,
326,
2728,
6026,
1281,
876,
16,
469,
1083,
8395,
309,
562,
12,
2890,
18,
4106,
13,
32,
2... |
def min(x, *args): for y in args: if x > y: x = y return x def max(x, *args): for y in args: if x < y: x = y return x | def min(x, *args): for y in args: if x > y: x = y return x def max(x, *args): for y in args: if x < y: x = y return x | def min(x, *args): for y in args: if x > y: x = y return x | 044eadff86535409ebfdabe57cd05e96b28e588c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/044eadff86535409ebfdabe57cd05e96b28e588c/depsolve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
12,
92,
16,
380,
1968,
4672,
364,
677,
316,
833,
30,
309,
619,
405,
677,
30,
619,
273,
677,
327,
619,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
12,
92,
16,
380,
1968,
4672,
364,
677,
316,
833,
30,
309,
619,
405,
677,
30,
619,
273,
677,
327,
619,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ORDER BY blocks_sum DESC""" % ((self.__vendor_name,) * 3) curs = conn.cursor() curs.execute(query, (one_day, ed)) | ORDER BY blocks_sum DESC""" % self.__vendor_name curs = conn.cursor() if host: curs.execute(query, (one_day, ed, host)) elif user: curs.execute(query, (one_day, ed, user)) else: curs.execute(query, (one_day, ed)) | def get_plot(self, end_date, report_days, host=None, user=None, email=None): if email: return None | 23256af1e8e77c746a31d94ef7f2cab0675707b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/87/23256af1e8e77c746a31d94ef7f2cab0675707b6/untangle_base_webfilter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4032,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
2699,
30,
327,
599,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4032,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
2699,
30,
327,
599,
2,
-100,
-100,
-100,
-100,
... |
output_group.add_option("--url", | output_group.add_option("--url", "-u", | def parse_arguments(): # Construct the option parser. usage = '%prog [ACTION] [options] NAMES...' version = "Epydoc, version %s" % epydoc.__version__ optparser = OptionParser(usage=usage, add_help_option=False) optparser.add_option('--config', action='append', dest="configfiles", metavar='FILE', help=("A configuration file, specifying additional OPTIONS " "and/or NAMES. This option may be repeated.")) optparser.add_option("--output", "-o", dest="target", metavar="PATH", help="The output directory. If PATH does not exist, then " "it will be created.") optparser.add_option("--quiet", "-q", action="count", dest="quiet", help="Decrease the verbosity.") optparser.add_option("--verbose", "-v", action="count", dest="verbose", help="Increase the verbosity.") optparser.add_option("--debug", action="store_true", dest="debug", help="Show full tracebacks for internal errors.") optparser.add_option("--simple-term", action="store_true", dest="simple_term", help="Do not try to use color or cursor control when displaying " "the progress bar, warnings, or errors.") action_group = OptionGroup(optparser, 'Actions') optparser.add_option_group(action_group) action_group.add_option("--html", action="store_const", dest="action", const="html", help="Write HTML output.") action_group.add_option("--text", action="store_const", dest="action", const="text", help="Write plaintext output. (not implemented yet)") action_group.add_option("--latex", action="store_const", dest="action", const="latex", help="Write LaTeX output.") action_group.add_option("--dvi", action="store_const", dest="action", const="dvi", help="Write DVI output.") action_group.add_option("--ps", action="store_const", dest="action", const="ps", help="Write Postscript output.") action_group.add_option("--pdf", action="store_const", dest="action", const="pdf", help="Write PDF output.") action_group.add_option("--check", action="store_const", dest="action", const="check", help="Check completeness of docs.") action_group.add_option("--pickle", action="store_const", dest="action", const="pickle", help="Write the documentation to a pickle file.") # Provide our own --help and --version options. action_group.add_option("--version", action="store_const", dest="action", const="version", help="Show epydoc's version number and exit.") action_group.add_option("-h", "--help", action="store_const", dest="action", const="help", help="Show this message and exit. For help on specific " "topics, use \"--help TOPIC\". Use \"--help topics\" for a " "list of available help topics") generation_group = OptionGroup(optparser, 'Generation Options') optparser.add_option_group(generation_group) generation_group.add_option("--docformat", dest="docformat", metavar="NAME", help="The default markup language for docstrings. Defaults " "to \"%s\"." % DEFAULT_DOCFORMAT) generation_group.add_option("--parse-only", action="store_false", dest="introspect", help="Get all information from parsing (don't introspect)") generation_group.add_option("--introspect-only", action="store_false", dest="parse", help="Get all information from introspecting (don't parse)") generation_group.add_option("--exclude", dest="exclude", metavar="PATTERN", action="append", help="Exclude modules whose dotted name matches " "the regular expression PATTERN") generation_group.add_option("--exclude-introspect", dest="exclude_introspect", metavar="PATTERN", action="append", help="Exclude introspection of modules whose dotted name matches " "the regular expression PATTERN") generation_group.add_option("--exclude-parse", dest="exclude_parse", metavar="PATTERN", action="append", help="Exclude parsing of modules whose dotted name matches " "the regular expression PATTERN") generation_group.add_option("--inheritance", dest="inheritance", metavar="STYLE", help="The format for showing inheritance objects. STYLE " "should be one of: %s." % ', '.join(INHERITANCE_STYLES)) generation_group.add_option("--show-private", action="store_true", dest="show_private", help="Include private variables in the output. (default)") generation_group.add_option("--no-private", action="store_false", dest="show_private", help="Do not include private variables in the output.") generation_group.add_option("--show-imports", action="store_true", dest="show_imports", help="List each module's imports.") generation_group.add_option("--no-imports", action="store_false", dest="show_imports", help="Do not list each module's imports. (default)") generation_group.add_option('--show-sourcecode', action='store_true', dest='include_source_code', help=("Include source code with syntax highlighting in the " "HTML output. (default)")) generation_group.add_option('--no-sourcecode', action='store_false', dest='include_source_code', help=("Do not include source code with syntax highlighting in the " "HTML output.")) generation_group.add_option('--include-log', action='store_true', dest='include_log', help=("Include a page with the process log (epydoc-log.html)")) output_group = OptionGroup(optparser, 'Output Options') optparser.add_option_group(output_group) output_group.add_option("--name", dest="prj_name", metavar="NAME", help="The documented project's name (for the navigation bar).") output_group.add_option("--css", dest="css", metavar="STYLESHEET", help="The CSS stylesheet. STYLESHEET can be either a " "builtin stylesheet or the name of a CSS file.") output_group.add_option("--url", dest="prj_url", metavar="URL", help="The documented project's URL (for the navigation bar).") output_group.add_option("--navlink", dest="prj_link", metavar="HTML", help="HTML code for a navigation link to place in the " "navigation bar.") output_group.add_option("--top", dest="top_page", metavar="PAGE", help="The \"top\" page for the HTML documentation. PAGE can " "be a URL, the name of a module or class, or one of the " "special names \"trees.html\", \"indices.html\", or \"help.html\"") output_group.add_option("--help-file", dest="help_file", metavar="FILE", help="An alternate help file. FILE should contain the body " "of an HTML file -- navigation bars will be added to it.") output_group.add_option("--show-frames", action="store_true", dest="show_frames", help="Include frames in the HTML output. (default)") output_group.add_option("--no-frames", action="store_false", dest="show_frames", help="Do not include frames in the HTML output.") output_group.add_option('--separate-classes', action='store_true', dest='list_classes_separately', help=("When generating LaTeX or PDF output, list each class in " "its own section, instead of listing them under their " "containing module.")) # The group of external API options. # Skip if the module couldn't be imported (usually missing docutils) if xlink is not None: link_group = OptionGroup(optparser, xlink.ApiLinkReader.settings_spec[0]) optparser.add_option_group(link_group) for help, names, opts in xlink.ApiLinkReader.settings_spec[2]: opts = opts.copy() opts['help'] = help link_group.add_option(*names, **opts) graph_group = OptionGroup(optparser, 'Graph Options') optparser.add_option_group(graph_group) graph_group.add_option('--graph', action='append', dest='graphs', metavar='GRAPHTYPE', help=("Include graphs of type GRAPHTYPE in the generated output. " "Graphs are generated using the Graphviz dot executable. " "If this executable is not on the path, then use --dotpath " "to specify its location. This option may be repeated to " "include multiple graph types in the output. GRAPHTYPE " "should be one of: all, %s." % ', '.join(GRAPH_TYPES))) graph_group.add_option("--dotpath", dest="dotpath", metavar='PATH', help="The path to the Graphviz 'dot' executable.") graph_group.add_option('--graph-font', dest='graph_font', metavar='FONT', help=("Specify the font used to generate Graphviz graphs. (e.g., " "helvetica or times).")) graph_group.add_option('--graph-font-size', dest='graph_font_size', metavar='SIZE', help=("Specify the font size used to generate Graphviz graphs, " "in points.")) graph_group.add_option('--pstat', action='append', dest='pstat_files', metavar='FILE', help="A pstat output file, to be used in generating call graphs.") # this option is for developers, not users. graph_group.add_option("--profile-epydoc", action="store_true", dest="profile", help=SUPPRESS_HELP or ("Run the hotshot profiler on epydoc itself. Output " "will be written to profile.out.")) return_group = OptionGroup(optparser, 'Return Value Options') optparser.add_option_group(return_group) return_group.add_option("--fail-on-error", action="store_const", dest="fail_on", const=log.ERROR, help="Return a non-zero exit status, indicating failure, if any " "errors are encountered.") return_group.add_option("--fail-on-warning", action="store_const", dest="fail_on", const=log.WARNING, help="Return a non-zero exit status, indicating failure, if any " "errors or warnings are encountered (not including docstring " "warnings).") return_group.add_option("--fail-on-docstring-warning", action="store_const", dest="fail_on", const=log.DOCSTRING_WARNING, help="Return a non-zero exit status, indicating failure, if any " "errors or warnings are encountered (including docstring " "warnings).") # Set the option parser's defaults. optparser.set_defaults(**OPTION_DEFAULTS) # Parse the arguments. options, names = optparser.parse_args() # Print help message, if requested. We also provide support for # --help [topic] if options.action == 'help': names = set([n.lower() for n in names]) for (topic, msg) in HELP_TOPICS.items(): if topic.lower() in names: print '\n' + msg.rstrip() + '\n' sys.exit(0) optparser.print_help() sys.exit(0) # Print version message, if requested. if options.action == 'version': print version sys.exit(0) # Process any config files. if options.configfiles: try: parse_configfiles(options.configfiles, options, names) except (KeyboardInterrupt,SystemExit): raise except Exception, e: if len(options.configfiles) == 1: cf_name = 'config file %s' % options.configfiles[0] else: cf_name = 'config files %s' % ', '.join(options.configfiles) optparser.error('Error reading %s:\n %s' % (cf_name, e)) # Check if the input file is a pickle file. for name in names: if name.endswith('.pickle'): if len(names) != 1: optparse.error("When a pickle file is specified, no other " "input files may be specified.") options.load_pickle = True # Check to make sure all options are valid. if len(names) == 0: optparser.error("No names specified.") # perform shell expansion. for i, name in reversed(list(enumerate(names[:]))): if '?' in name or '*' in name: names[i:i+1] = glob(name) if options.inheritance not in INHERITANCE_STYLES: optparser.error("Bad inheritance style. Valid options are " + ",".join(INHERITANCE_STYLES)) if not options.parse and not options.introspect: optparser.error("Invalid option combination: --parse-only " "and --introspect-only.") if options.action == 'text' and len(names) > 1: optparser.error("--text option takes only one name.") # Check the list of requested graph types to make sure they're # acceptable. options.graphs = [graph_type.lower() for graph_type in options.graphs] for graph_type in options.graphs: if graph_type == 'callgraph' and not options.pstat_files: optparser.error('"callgraph" graph type may only be used if ' 'one or more pstat files are specified.') # If it's 'all', then add everything (but don't add callgraph if # we don't have any profiling info to base them on). if graph_type == 'all': if options.pstat_files: options.graphs = GRAPH_TYPES else: options.graphs = [g for g in GRAPH_TYPES if g != 'callgraph'] break elif graph_type not in GRAPH_TYPES: optparser.error("Invalid graph type %s." % graph_type) # Calculate verbosity. verbosity = getattr(options, 'verbosity', 0) options.verbosity = verbosity + options.verbose - options.quiet # The target default depends on the action. if options.target is None: options.target = options.action # Return parsed args. options.names = names return options, names | dd4d6b1af2af04f8c42a7583ee66028e893898d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/dd4d6b1af2af04f8c42a7583ee66028e893898d6/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
7099,
13332,
468,
14291,
326,
1456,
2082,
18,
4084,
273,
1995,
14654,
306,
12249,
65,
306,
2116,
65,
6048,
55,
7821,
1177,
273,
315,
41,
2074,
2434,
16,
1177,
738,
87,
6,
738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
7099,
13332,
468,
14291,
326,
1456,
2082,
18,
4084,
273,
1995,
14654,
306,
12249,
65,
306,
2116,
65,
6048,
55,
7821,
1177,
273,
315,
41,
2074,
2434,
16,
1177,
738,
87,
6,
738... |
"""Remove all unused oid/tid combinations.""" unproxied = getProxiedObject(self) result = unproxied.pack(packtime, referencesf) | """Remove all unused OID/TID combinations.""" | def pack(self, packtime, referencesf): """Remove all unused oid/tid combinations.""" unproxied = getProxiedObject(self) | ce8372cf2e9c0c63165f84dd280bbffa6455a724 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10048/ce8372cf2e9c0c63165f84dd280bbffa6455a724/blob.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
2890,
16,
2298,
957,
16,
5351,
74,
4672,
3536,
3288,
777,
10197,
7764,
19,
18081,
17265,
12123,
640,
20314,
2092,
273,
3570,
92,
2092,
921,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
2890,
16,
2298,
957,
16,
5351,
74,
4672,
3536,
3288,
777,
10197,
7764,
19,
18081,
17265,
12123,
640,
20314,
2092,
273,
3570,
92,
2092,
921,
12,
2890,
13,
2,
-100,
-100,
-100,
... |
def fwmkeys(self, prefix, as_raw=True): | def fwmkeys(self, prefix, max_=-1, as_raw=True): | def fwmkeys(self, prefix, as_raw=True): """Get forward matching string keys in a hash database object.""" (c_prefix, c_prefix_len) = util.serialize(prefix, as_raw) tclist_objs = tc.hdb_fwmkeys(self.db, c_prefix, c_prefix_len) if not tclist_objs: raise tc.TCException(tc.hdb_errmsg(tc.hdb_ecode(self.db))) as_type = util.get_type(prefix, as_raw) return util.deserialize_tclist(tclist_objs, as_type) | 8caf80c207850108b5e3ad8ea7260c60ed986be5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4926/8caf80c207850108b5e3ad8ea7260c60ed986be5/hdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7600,
81,
2452,
12,
2890,
16,
1633,
16,
943,
67,
29711,
21,
16,
487,
67,
1899,
33,
5510,
4672,
3536,
967,
5104,
3607,
533,
1311,
316,
279,
1651,
2063,
733,
12123,
261,
71,
67,
3239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7600,
81,
2452,
12,
2890,
16,
1633,
16,
943,
67,
29711,
21,
16,
487,
67,
1899,
33,
5510,
4672,
3536,
967,
5104,
3607,
533,
1311,
316,
279,
1651,
2063,
733,
12123,
261,
71,
67,
3239,
... |
def prepare(self, *args): return _tinyWRAP.ProxyVideoProducer_prepare(self, *args) def start(self): return _tinyWRAP.ProxyVideoProducer_start(self) def pause(self): return _tinyWRAP.ProxyVideoProducer_pause(self) def stop(self): return _tinyWRAP.ProxyVideoProducer_stop(self) | def prepare(self, *args): return _tinyWRAP.ProxyVideoProducer_prepare(self, *args) | 2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5606/2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a/tinyWRAP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
380,
1968,
4672,
327,
389,
88,
11652,
27664,
18,
3886,
10083,
12140,
67,
9366,
12,
2890,
16,
380,
1968,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
380,
1968,
4672,
327,
389,
88,
11652,
27664,
18,
3886,
10083,
12140,
67,
9366,
12,
2890,
16,
380,
1968,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
object_to_etree(prop_remove, remove_props, namespace=namespace) | for p in remove_props: prop_prop = ElementTree.SubElement(prop_remove, '{DAV:}prop') object_to_etree(prop_prop, p, namespace=namespace) | def proppatch(self, path, set_props=None, remove_props=None, namespace='DAV:', headers=None): """Patch properties on a DAV resource. If namespace is not specified the DAV namespace is used for all properties""" root = ElementTree.Element('{DAV:}propertyupdate') if set_props is not None: prop_set = ElementTree.SubElement(root, '{DAV:}set') | c8071b86fa2a432a1d3d7102d4786c71bc122b75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8193/c8071b86fa2a432a1d3d7102d4786c71bc122b75/davclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2270,
2272,
12,
2890,
16,
589,
16,
444,
67,
9693,
33,
7036,
16,
1206,
67,
9693,
33,
7036,
16,
1981,
2218,
17735,
30,
2187,
1607,
33,
7036,
4672,
3536,
7332,
1790,
603,
279,
463,
5856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2270,
2272,
12,
2890,
16,
589,
16,
444,
67,
9693,
33,
7036,
16,
1206,
67,
9693,
33,
7036,
16,
1981,
2218,
17735,
30,
2187,
1607,
33,
7036,
4672,
3536,
7332,
1790,
603,
279,
463,
5856,
... |
fullname = '' | fullname = name | def handle_signature(self, sig, signode): sig = sig.strip() if '(' in sig and sig[-1:] == ')': prefix, arglist = sig.split('(', 1) arglist = arglist[:-1].strip() else: prefix = sig arglist = None if '.' in prefix: nameprefix, name = prefix.rsplit('.', 1) else: nameprefix = None name = prefix | 954e8d0220866151ca2e57cf90885c008fc4ae35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/954e8d0220866151ca2e57cf90885c008fc4ae35/javascript.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
8195,
12,
2890,
16,
3553,
16,
1573,
390,
4672,
3553,
273,
3553,
18,
6406,
1435,
309,
7321,
316,
3553,
471,
3553,
18919,
21,
26894,
422,
5777,
30,
1633,
16,
31805,
273,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
8195,
12,
2890,
16,
3553,
16,
1573,
390,
4672,
3553,
273,
3553,
18,
6406,
1435,
309,
7321,
316,
3553,
471,
3553,
18919,
21,
26894,
422,
5777,
30,
1633,
16,
31805,
273,
3553,
... |
new_con = self._db.databases[database_name].open() | new_con = self._db.databases[database_name].open( transaction_manager=self.transaction_manager, mvcc=self._mvcc, version=self._version, synch=self._synch, ) | def get_connection(self, database_name): """Return a Connection for the named database.""" connection = self.connections.get(database_name) if connection is None: new_con = self._db.databases[database_name].open() self.connections.update(new_con.connections) new_con.connections = self.connections connection = new_con return connection | 68ef2b040b5891e15b9463954a8574b69550af80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/68ef2b040b5891e15b9463954a8574b69550af80/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4071,
12,
2890,
16,
2063,
67,
529,
4672,
3536,
990,
279,
4050,
364,
326,
4141,
2063,
12123,
1459,
273,
365,
18,
13313,
18,
588,
12,
6231,
67,
529,
13,
309,
1459,
353,
599,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4071,
12,
2890,
16,
2063,
67,
529,
4672,
3536,
990,
279,
4050,
364,
326,
4141,
2063,
12123,
1459,
273,
365,
18,
13313,
18,
588,
12,
6231,
67,
529,
13,
309,
1459,
353,
599,
3... |
self.w.splitView = SplitView((0, 0, -0, -0), paneDescriptions) | self.w.splitView = SplitView((0, 0, -0, -0), paneDescriptions, isVertical=False) | def __init__(self, drawGrid=False): self.w = Window((440, 500), "List Test", minSize=(400, 400)) | 721e089b5df326b6b910464d5a58bf0f88569fd2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8843/721e089b5df326b6b910464d5a58bf0f88569fd2/testAll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3724,
6313,
33,
8381,
4672,
365,
18,
91,
273,
6076,
12443,
6334,
20,
16,
6604,
3631,
315,
682,
7766,
3113,
29343,
28657,
16010,
16,
7409,
3719,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3724,
6313,
33,
8381,
4672,
365,
18,
91,
273,
6076,
12443,
6334,
20,
16,
6604,
3631,
315,
682,
7766,
3113,
29343,
28657,
16010,
16,
7409,
3719,
2,
-100,
... |
['sage/rings/complex_number.pyx'], libraries = ['mpfr', 'gmp']) | ['sage/rings/complex_number.pyx'], libraries = ['mpfr', 'gmp']) | def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False | 12aff705aa1e2b2dc6e401b763fe2e9e51bdf02d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/12aff705aa1e2b2dc6e401b763fe2e9e51bdf02d/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2704,
264,
12,
768,
21,
16,
585,
22,
4672,
3536,
2000,
1053,
309,
3344,
585,
22,
1552,
486,
1005,
578,
353,
12156,
2353,
585,
21,
18,
225,
971,
585,
21,
1552,
486,
1005,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2704,
264,
12,
768,
21,
16,
585,
22,
4672,
3536,
2000,
1053,
309,
3344,
585,
22,
1552,
486,
1005,
578,
353,
12156,
2353,
585,
21,
18,
225,
971,
585,
21,
1552,
486,
1005,
16,... |
j = match.start() self.handle_comment(rawdata[i+4: j]) | if report: j = match.start() self.handle_comment(rawdata[i+4: j]) | def parse_comment(self, i): rawdata = self.rawdata assert rawdata[i:i+4] == '<!--', 'unexpected call to parse_comment()' match = commentclose.search(rawdata, i+4) if not match: return -1 j = match.start() self.handle_comment(rawdata[i+4: j]) j = match.end() return j | e1f1b158a9a19e3889890db85d5e537716820815 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e1f1b158a9a19e3889890db85d5e537716820815/HTMLParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3469,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
1815,
1831,
892,
63,
77,
30,
77,
15,
24,
65,
422,
2368,
22772,
2187,
296,
21248,
745,
358,
1109,
67,
3469... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3469,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
1815,
1831,
892,
63,
77,
30,
77,
15,
24,
65,
422,
2368,
22772,
2187,
296,
21248,
745,
358,
1109,
67,
3469... |
raise TypeError('Can not make a copy of object '+ str(type(self)) + ' from the '+ str(type(parameter))) def createParameterCode(self, ind=0, instance_name=None): if (instance_name == None) or (instance_name == ''): ret = indent(ind) + self.getName()+' = '+self.getValueTypeCorrected() | par.link(objname, prefix+p.getName()+postfix) elif isinstance(opt, Parameter): self.setLink(opt.getName(), objname, prefix+opt.getName()+postfix) elif isinstance(opt, list) and isinstance(opt[0], str): for s in opt: par = self.find(s) if par == None: print "ERROR ParameterCollection.linkUp() can not find parameter with the name=%s"% (s) | def copy(self, parameter): if isinstance(parameter, Parameter): self.name = parameter.name self.value = parameter.value self.type = parameter.type self.description = parameter.description self.linked_module = parameter.linked_module self.linked_parameter = parameter.linked_parameter self.typein = parameter.typein self.typeout = parameter.typeout else: raise TypeError('Can not make a copy of object '+ str(type(self)) + ' from the '+ str(type(parameter))) | 8613d68ff165b59e509d5eb04a831ffaf7fd692b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8613d68ff165b59e509d5eb04a831ffaf7fd692b/Parameter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
1569,
4672,
309,
1549,
12,
6775,
16,
5498,
4672,
365,
18,
529,
273,
1569,
18,
529,
365,
18,
1132,
273,
1569,
18,
1132,
365,
18,
723,
273,
1569,
18,
723,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
1569,
4672,
309,
1549,
12,
6775,
16,
5498,
4672,
365,
18,
529,
273,
1569,
18,
529,
365,
18,
1132,
273,
1569,
18,
1132,
365,
18,
723,
273,
1569,
18,
723,
365,
18,
... |
return QuotientRingElement(self.parent(), -self.__rep) | return self.parent()(-self.__rep) | def __neg__(self): """ EXAMPLES:: sage: R.<x,y> = QQ[]; S.<a,b> = R.quo(x^2 + y^2); type(a) <class 'sage.rings.quotient_ring_element.QuotientRingElement'> sage: -a # indirect doctest -a sage: -(a+b) -a - b """ return QuotientRingElement(self.parent(), -self.__rep) | 5150cfd7bff51425dd7dea453e4b7c0b0f851e0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5150cfd7bff51425dd7dea453e4b7c0b0f851e0a/quotient_ring_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
972,
12,
2890,
4672,
3536,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
534,
22782,
92,
16,
93,
34,
273,
2238,
53,
8526,
31,
348,
22782,
69,
16,
70,
34,
273,
534,
18,
372... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
972,
12,
2890,
4672,
3536,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
534,
22782,
92,
16,
93,
34,
273,
2238,
53,
8526,
31,
348,
22782,
69,
16,
70,
34,
273,
534,
18,
372... |
client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Depth': '1' }) | client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Content-Type':'text/xml', 'Depth': '1' }) | def test_timerangequery_invalid_not_utc_2(): body = open(FILES_DIR+'reports/timerangequery/invalid_nonUTC2.xml').read() client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Depth': '1' }) assert client.response.status == 400 | 0eb233b34e19f3cc4572957bdd4dfc9d1e2048e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9939/0eb233b34e19f3cc4572957bdd4dfc9d1e2048e1/test_reports_with_float.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12542,
726,
2271,
67,
5387,
67,
902,
67,
17892,
67,
22,
13332,
1417,
273,
1696,
12,
12669,
67,
4537,
6797,
20195,
19,
12542,
726,
2271,
19,
5387,
67,
5836,
11471,
22,
18,
290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12542,
726,
2271,
67,
5387,
67,
902,
67,
17892,
67,
22,
13332,
1417,
273,
1696,
12,
12669,
67,
4537,
6797,
20195,
19,
12542,
726,
2271,
19,
5387,
67,
5836,
11471,
22,
18,
290... |
l = 0 | i = 0 | def revert_align_decimal(document): l = 0 while True: l = document.body[l].find('alignment=decimal') if l == -1: break remove_option(document, l, 'decimal_point') document.body[l].replace('decimal', 'center') | 2d7bbab89f976fbaa4f3e7109a92ddbf721dc4c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/2d7bbab89f976fbaa4f3e7109a92ddbf721dc4c9/lyx_2_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15226,
67,
7989,
67,
12586,
12,
5457,
4672,
277,
273,
374,
1323,
1053,
30,
328,
273,
1668,
18,
3432,
63,
80,
8009,
4720,
2668,
14409,
33,
12586,
6134,
309,
328,
422,
300,
21,
30,
898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15226,
67,
7989,
67,
12586,
12,
5457,
4672,
277,
273,
374,
1323,
1053,
30,
328,
273,
1668,
18,
3432,
63,
80,
8009,
4720,
2668,
14409,
33,
12586,
6134,
309,
328,
422,
300,
21,
30,
898,
... |
return self.__args.get(name,ASArg("")) | return self.__args.get(name,None) | def getArgument(self,name): return self.__args.get(name,ASArg("")) | d31e82e38407b7b43548fdceefacc47036a3d86f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/886/d31e82e38407b7b43548fdceefacc47036a3d86f/asModel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11950,
12,
2890,
16,
529,
4672,
327,
365,
16186,
1968,
18,
588,
12,
529,
16,
3033,
4117,
2932,
6,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11950,
12,
2890,
16,
529,
4672,
327,
365,
16186,
1968,
18,
588,
12,
529,
16,
3033,
4117,
2932,
6,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def try_premirror(u, ud, d): """ Should we try premirrors for this url, u? We should if forcefetch is set or the localfile and md5 don't exist """ if ud.method.forcefetch(u, ud, d): return True elif os.path.exists(ud.md5) and os.path.exists(ud.localfile): return False else: return True | def init(urls, d, setup = True): urldata = {} fn = bb.data.getVar('FILE', d, 1) if fn in urldata_cache: urldata = urldata_cache[fn] for url in urls: if url not in urldata: urldata[url] = FetchData(url, d) if setup: for url in urldata: if not urldata[url].setup: urldata[url].setup_localpath(d) urldata_cache[fn] = urldata return urldata | 3341e47b52f9038894d6600b8702a331c3806af5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/3341e47b52f9038894d6600b8702a331c3806af5/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
10518,
16,
302,
16,
3875,
273,
1053,
4672,
880,
892,
273,
2618,
225,
2295,
273,
7129,
18,
892,
18,
588,
1537,
2668,
3776,
2187,
302,
16,
404,
13,
309,
2295,
316,
880,
892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
10518,
16,
302,
16,
3875,
273,
1053,
4672,
880,
892,
273,
2618,
225,
2295,
273,
7129,
18,
892,
18,
588,
1537,
2668,
3776,
2187,
302,
16,
404,
13,
309,
2295,
316,
880,
892,
... | |
log.debug('checkToRecord: progloop = %s' % prog) | if DEBUG: log.debug('checkToRecord: progloop = %s' % prog) | def checkToRecord(self): log.debug('in checkToRecord') rec_cmd = None rec_prog = None cleaned = None scheduledRecordings = self.getScheduledRecordings() | f5737db8bd118592997fea5a5e16fdbead535f3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f5737db8bd118592997fea5a5e16fdbead535f3a/recordserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
774,
2115,
12,
2890,
4672,
613,
18,
4148,
2668,
267,
866,
774,
2115,
6134,
1950,
67,
4172,
273,
599,
1950,
67,
14654,
273,
599,
9426,
273,
599,
9755,
2115,
899,
273,
365,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
774,
2115,
12,
2890,
4672,
613,
18,
4148,
2668,
267,
866,
774,
2115,
6134,
1950,
67,
4172,
273,
599,
1950,
67,
14654,
273,
599,
9426,
273,
599,
9755,
2115,
899,
273,
365,
18,
588,... |
return | def on_expander_activate(self, _expander): currheight = self.window.get_size()[1] self.expanded = False # Note that get_expanded() will return the state of the expander # before this current click window_about_to_be_expanded = not self.expander.get_expanded() if window_about_to_be_expanded: if self.window.get_size()[1] == self.h: # For WMs like ion3, the app will not actually resize # when in collapsed mode, so prevent the waiting # of the player to expand from happening: skip_size_check = True else: skip_size_check = False if self.show_statusbar: self.statusbar.show() self.notebook.show_all() else: self.statusbar.hide() self.notebook.hide() if not (self.conn and self.status and self.status['state'] in ['play', 'pause']): if window_about_to_be_expanded: self.cursonglabel2.set_markup('<small>' + _('Click to collapse') + '</small>') else: self.cursonglabel2.set_markup('<small>' + _('Click to expand') + '</small>') # Now we wait for the height of the player to increase, so that # we know the list is visible. This is pretty hacky, but works. if self.window_owner: if window_about_to_be_expanded: if not skip_size_check: while self.window.get_size()[1] == currheight: gtk.main_iteration() # Notebook is visible, now resize: self.window.resize(self.w, self.h) else: self.window.resize(self.w, 1) if window_about_to_be_expanded: self.expanded = True if self.status and self.status['state'] in ['play','pause']: gobject.idle_add(self.current.center_song_in_list) self.window.set_geometry_hints(self.window) # Put focus to the notebook: self.on_notebook_page_change(self.notebook, 0, self.notebook.get_current_page()) return | ad04d897e11f8bcb58bfe956cb0cedf748de7d52 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/ad04d897e11f8bcb58bfe956cb0cedf748de7d52/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
12320,
264,
67,
10014,
12,
2890,
16,
389,
12320,
264,
4672,
4306,
4210,
273,
365,
18,
5668,
18,
588,
67,
1467,
1435,
63,
21,
65,
365,
18,
17336,
273,
1083,
468,
3609,
716,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
12320,
264,
67,
10014,
12,
2890,
16,
389,
12320,
264,
4672,
4306,
4210,
273,
365,
18,
5668,
18,
588,
67,
1467,
1435,
63,
21,
65,
365,
18,
17336,
273,
1083,
468,
3609,
716,
3... | |
if i*self.mfrow[1]+2+j <= self.nplot + 1: | if i*self.mfrow[1]+2+j <= self.nplot + 1: | def layout(self): # calculate layout if self.mfrow != [1,1] and self.mfrow[0]*self.mfrow[1] < self.nplot: raise ValueError("mfrow is not enough to hold " + str(self.nplot) + " figures") | 0731ae08adccf41d053f6aa3359994cd77496a34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/0731ae08adccf41d053f6aa3359994cd77496a34/simuRPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3511,
12,
2890,
4672,
468,
4604,
3511,
309,
365,
18,
16126,
492,
480,
306,
21,
16,
21,
65,
471,
365,
18,
16126,
492,
63,
20,
5772,
2890,
18,
16126,
492,
63,
21,
65,
411,
365,
18,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3511,
12,
2890,
4672,
468,
4604,
3511,
309,
365,
18,
16126,
492,
480,
306,
21,
16,
21,
65,
471,
365,
18,
16126,
492,
63,
20,
5772,
2890,
18,
16126,
492,
63,
21,
65,
411,
365,
18,
8... |
r""" The zero sequence. INPUT: n -- non negative integer OUTPUT: EXAMPLES: sage: a = sloane.A000004; a | def __init__(self): r""" | def _eval(self, n): return n | 7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
290,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
290,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
logger.Error("Can't find parent in remove children: %s" % parent_cdev) | logging.error("Can't find parent in remove children: %s", parent_cdev) | def MirrorRemoveChildren(parent_cdev, new_cdevs): """Shrink a mirrored block device. """ parent_bdev = _RecursiveFindBD(parent_cdev) if parent_bdev is None: logger.Error("Can't find parent in remove children: %s" % parent_cdev) return False devs = [] for disk in new_cdevs: rpath = disk.StaticDevPath() if rpath is None: bd = _RecursiveFindBD(disk) if bd is None: logger.Error("Can't find dynamic device %s while removing children" % disk) return False else: devs.append(bd.dev_path) else: devs.append(rpath) parent_bdev.RemoveChildren(devs) return True | 18682bca5711b7b492aeb3cd3a550087f1413e0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/18682bca5711b7b492aeb3cd3a550087f1413e0b/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
490,
8299,
3288,
4212,
12,
2938,
67,
71,
5206,
16,
394,
67,
71,
5206,
87,
4672,
3536,
28747,
279,
312,
481,
23226,
1203,
2346,
18,
225,
3536,
982,
67,
70,
5206,
273,
389,
10483,
3125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
490,
8299,
3288,
4212,
12,
2938,
67,
71,
5206,
16,
394,
67,
71,
5206,
87,
4672,
3536,
28747,
279,
312,
481,
23226,
1203,
2346,
18,
225,
3536,
982,
67,
70,
5206,
273,
389,
10483,
3125,
... |
for i in range(len(res)): | for i in res: | def process_file(name): """Processes all wiki blocks (if any) of a file.""" | 03dd1fa87e7ed6a1aae10ff4e922ba7db9cd3ff8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9355/03dd1fa87e7ed6a1aae10ff4e922ba7db9cd3ff8/wiki_grabber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
768,
12,
529,
4672,
3536,
10599,
777,
9050,
4398,
261,
430,
1281,
13,
434,
279,
585,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
768,
12,
529,
4672,
3536,
10599,
777,
9050,
4398,
261,
430,
1281,
13,
434,
279,
585,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def _precompute(self, how_many=150): try: self._b n = self._n except AttributeError: self._b = [] n = 1 self._n = n self._b += [i for i in range(self._n, self._n+how_many) if self.is_powerful(i)] self._n += how_many def _eval(self, n): try: return self._b[n-1] except (AttributeError, IndexError): self._precompute() return self._eval(n) | def _compute_at_least(self, k): r"""Ensure that len(self._b) >= k""" while len(self._b) <= k: if self.is_powerful(self._n): self._b.append(self._n) self._n += 1 def _eval(self, n): self._compute_at_least(n) return self._b[n-1] | def _precompute(self, how_many=150): try: self._b n = self._n except AttributeError: self._b = [] n = 1 self._n = n self._b += [i for i in range(self._n, self._n+how_many) if self.is_powerful(i)] self._n += how_many | 932f2e1f44b3cb8584ee72313cbbe4c2ae0c172c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/932f2e1f44b3cb8584ee72313cbbe4c2ae0c172c/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1484,
9200,
12,
2890,
16,
3661,
67,
9353,
33,
23014,
4672,
775,
30,
365,
6315,
70,
290,
273,
365,
6315,
82,
1335,
6394,
30,
365,
6315,
70,
273,
5378,
290,
273,
404,
365,
6315,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1484,
9200,
12,
2890,
16,
3661,
67,
9353,
33,
23014,
4672,
775,
30,
365,
6315,
70,
290,
273,
365,
6315,
82,
1335,
6394,
30,
365,
6315,
70,
273,
5378,
290,
273,
404,
365,
6315,
8... |
maxtick = -1 | from m5 import MaxTick maxtick = MaxTick | def binpath(app, file=None): # executable has same name as app unless specified otherwise if not file: file = app return os.path.join(test_progs, app, 'bin', isa, opsys, file) | 32f676fed2fd8855f7c485e9ac4fc9db43e65dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6787/32f676fed2fd8855f7c485e9ac4fc9db43e65dd3/run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4158,
803,
12,
2910,
16,
585,
33,
7036,
4672,
468,
9070,
711,
1967,
508,
487,
595,
3308,
1269,
3541,
309,
486,
585,
30,
585,
273,
595,
327,
1140,
18,
803,
18,
5701,
12,
3813,
67,
685... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4158,
803,
12,
2910,
16,
585,
33,
7036,
4672,
468,
9070,
711,
1967,
508,
487,
595,
3308,
1269,
3541,
309,
486,
585,
30,
585,
273,
595,
327,
1140,
18,
803,
18,
5701,
12,
3813,
67,
685... |
bugs=bzServer.query(query)) | bugs=bugs) | def bugs(self, packageName): bzServer = bugzilla.Bugzilla(url=BZURL) query = {'product': 'Fedora', 'component': packageName, 'bug_status': ['ASSIGNED', 'NEW', 'NEEDINFO', 'MODIFIED'] } return dict(title='%s -- Open Bugs for %s' % (self.appTitle, packageName), package=packageName, bugs=bzServer.query(query)) | 6026fd5c8a8f3c0d4475767f7e2f8fc5c4df00cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/6026fd5c8a8f3c0d4475767f7e2f8fc5c4df00cf/packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22398,
12,
2890,
16,
9929,
4672,
24788,
2081,
273,
7934,
15990,
18,
19865,
15990,
12,
718,
33,
38,
62,
1785,
13,
843,
273,
13666,
5896,
4278,
296,
42,
15534,
2187,
296,
4652,
4278,
9929,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22398,
12,
2890,
16,
9929,
4672,
24788,
2081,
273,
7934,
15990,
18,
19865,
15990,
12,
718,
33,
38,
62,
1785,
13,
843,
273,
13666,
5896,
4278,
296,
42,
15534,
2187,
296,
4652,
4278,
9929,... |
self._logger.debug("\'"+directory\ | self._logger.info("\'"+directory\ | def addDirectory(self, directory): c = self._conn.cursor() directoryID = self.getDirectoryID(directory) if directoryID == None: c.execute("insert into directories (path) values (?)", (directory, )) self._logger.debug("\'"+directory\ +"\' has been added to the watch list.") else: self._logger.debug("\'"+directory\ +"\' is already in the watch list.") c.close() self._conn.commit() self.addDirectoryNoWatch(directory) | afb8ac357cf5a6a40289a31d13b33e838bf2bdb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/afb8ac357cf5a6a40289a31d13b33e838bf2bdb1/Database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2853,
12,
2890,
16,
1867,
4672,
276,
273,
365,
6315,
4646,
18,
9216,
1435,
1867,
734,
273,
365,
18,
588,
2853,
734,
12,
5149,
13,
309,
1867,
734,
422,
599,
30,
276,
18,
8837,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2853,
12,
2890,
16,
1867,
4672,
276,
273,
365,
6315,
4646,
18,
9216,
1435,
1867,
734,
273,
365,
18,
588,
2853,
734,
12,
5149,
13,
309,
1867,
734,
422,
599,
30,
276,
18,
8837,
29... |
else: log.write("No changes, install skipped\n") | if not makeInstall and not makeDistribution: log.write("No changes\n") | def Start(hardhatScript, workingDir, cvsVintage, buildVersion, clobber, log): global buildenv, changes try: buildenv = hardhatlib.defaults buildenv['root'] = workingDir buildenv['hardhatroot'] = whereAmI hardhatlib.init(buildenv) except hardhatlib.HardHatMissingCompilerError: print "Could not locate compiler. Exiting." sys.exit(1) except hardhatlib.HardHatUnknownPlatformError: print "Unsupported platform, '" + os.name + "'. Exiting." sys.exit(1) except hardhatlib.HardHatRegistryError: print print "Sorry, I am not able to read the windows registry to find" print "the necessary VisualStudio complier settings. Most likely you" print "are running the Cygwin python, which will hopefully be supported" print "soon. Please download a windows version of python from:\n" print "http://www.python.org/download/" print sys.exit(1) except Exception, e: print "Could not initialize hardhat environment. Exiting." print "Exception:", e traceback.print_exc() raise e sys.exit(1) # make sure workingDir is absolute workingDir = os.path.abspath(workingDir) chanDir = os.path.join(workingDir, mainModule) # test if we've been thruough the loop at least once if clobber == 1: if os.path.exists(chanDir): hardhatutil.rmdirRecursive(chanDir) os.chdir(workingDir) # remove outputDir and create it outputDir = os.path.join(workingDir, "output") if os.path.exists(outputDir): hardhatutil.rmdirRecursive(outputDir) os.mkdir(outputDir) buildVersionEscaped = "\'" + buildVersion + "\'" buildVersionEscaped = buildVersionEscaped.replace(" ", "|") if not os.path.exists(chanDir): # Initialize sources print "Setup source tree..." log.write("- - - - tree setup - - - - - - -\n") outputList = hardhatutil.executeCommandReturnOutputRetry( [cvsProgram, "-q", "checkout", cvsVintage, "chandler"]) hardhatutil.dumpOutputList(outputList, log) os.chdir(chanDir) | a87aad854ed1bcb20719ac9f8a0be747a3c3f652 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a87aad854ed1bcb20719ac9f8a0be747a3c3f652/newchandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
12,
20379,
11304,
3651,
16,
5960,
1621,
16,
276,
6904,
58,
474,
410,
16,
1361,
1444,
16,
30152,
16,
613,
4672,
225,
2552,
1361,
3074,
16,
3478,
225,
775,
30,
1361,
3074,
273,
787... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
12,
20379,
11304,
3651,
16,
5960,
1621,
16,
276,
6904,
58,
474,
410,
16,
1361,
1444,
16,
30152,
16,
613,
4672,
225,
2552,
1361,
3074,
16,
3478,
225,
775,
30,
1361,
3074,
273,
787... |
self.assertEquals(output, b'a\xffb\n') | self.assertEquals(output.rstrip(), b'a\xffb') | def test_decode(self): with open(support.TESTFN, 'wb') as fp: fp.write(b'Yf9iCg==') output = self.get_output('-d', support.TESTFN) self.assertEquals(output, b'a\xffb\n') | 575e4d36a0d3274cc6d908b6bb1003acf7753d22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/575e4d36a0d3274cc6d908b6bb1003acf7753d22/test_base64.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3922,
12,
2890,
4672,
598,
1696,
12,
13261,
18,
16961,
19793,
16,
296,
9464,
6134,
487,
4253,
30,
4253,
18,
2626,
12,
70,
11,
61,
74,
29,
77,
39,
75,
631,
6134,
876,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3922,
12,
2890,
4672,
598,
1696,
12,
13261,
18,
16961,
19793,
16,
296,
9464,
6134,
487,
4253,
30,
4253,
18,
2626,
12,
70,
11,
61,
74,
29,
77,
39,
75,
631,
6134,
876,
273,
... |
r'\s+(?:(?P<called>\d+)(?:\+(?P<called_recursive>\d+))?)?' + r'\s+(?:' + r'<cycle\s(?P<cycle_whole>\d+)\sas\sa\swhole>' + r'|' + r'(?P<name>\S.*?)' + r'(?:\s+<cycle\s(?P<cycle>\d+)>)?' + r')' + | r'\s+(?:(?P<called>\d+)(?:\+(?P<called_self>\d+))?)?' + r'\s+(?P<name>\S.*?)' + r'(?:\s+<cycle\s(?P<cycle>\d+)>)?' + | def translate(self, mo): """Extract a structure from a match object, while translating the types in the process.""" attrs = {} groupdict = mo.groupdict() for name, value in groupdict.iteritems(): if value is None: value = None elif self._int_re.match(value): value = int(value) elif self._float_re.match(value): value = float(value) attrs[name] = (value) return Struct(attrs) | 2a04f0c50d4043e66b516427012f282244b6da77 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8271/2a04f0c50d4043e66b516427012f282244b6da77/gprof2dot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
12,
2890,
16,
7344,
4672,
3536,
4976,
279,
3695,
628,
279,
845,
733,
16,
1323,
2162,
1776,
326,
1953,
316,
326,
1207,
12123,
3422,
273,
2618,
29547,
273,
7344,
18,
1655,
1576,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
12,
2890,
16,
7344,
4672,
3536,
4976,
279,
3695,
628,
279,
845,
733,
16,
1323,
2162,
1776,
326,
1953,
316,
326,
1207,
12123,
3422,
273,
2618,
29547,
273,
7344,
18,
1655,
1576,
1435... |
f = open(self.tmpin, 'rb') | f = open(self.tmpin, 'r') | def test_decodetwice(self): # Verify that decode() will refuse to overwrite an existing file try: f = cStringIO.StringIO(encodedtextwrapped % (0644, self.tmpout)) | 052cba55a8cabb57613072a38d75177aa271a4d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/052cba55a8cabb57613072a38d75177aa271a4d9/test_uu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
323,
1559,
278,
91,
1812,
12,
2890,
4672,
468,
8553,
716,
2495,
1435,
903,
1278,
1202,
358,
6156,
392,
2062,
585,
775,
30,
284,
273,
276,
780,
4294,
18,
780,
4294,
12,
10787,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
323,
1559,
278,
91,
1812,
12,
2890,
4672,
468,
8553,
716,
2495,
1435,
903,
1278,
1202,
358,
6156,
392,
2062,
585,
775,
30,
284,
273,
276,
780,
4294,
18,
780,
4294,
12,
10787,... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 154) else quickfix.DoubleField.__init__(self, 154, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
4711,
24,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
4711,
24,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... |
verbose_write(str(self) + " close") | def tearDown(self): verbose_write(str(self) + " close") self.serv.close() self.serv = None verbose_write(str(self) + " done") | 94c52b456919e43021e0d219db4595f8bac9df47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/94c52b456919e43021e0d219db4595f8bac9df47/test_socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
365,
18,
23039,
18,
4412,
1435,
365,
18,
23039,
273,
599,
3988,
67,
2626,
12,
701,
12,
2890,
13,
397,
315,
2731,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
365,
18,
23039,
18,
4412,
1435,
365,
18,
23039,
273,
599,
3988,
67,
2626,
12,
701,
12,
2890,
13,
397,
315,
2731,
7923,
2,
-100,
-100,
-100,
-100,
-100,... | |
self.debug.show("Error occurred while decoding %s (movie number %s)" % (self.names[j], row["number"])) | self.debug.show("Error occurred while decoding %s (movie number: %s)" % (self.names[j], row["number"])) | def export_data(self, widget): '''Main exporting function''' | cf35c6aa5491c31d0bc76ebf9303fc857a4e0849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2687/cf35c6aa5491c31d0bc76ebf9303fc857a4e0849/PluginExportHTML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
892,
12,
2890,
16,
3604,
4672,
9163,
6376,
3359,
310,
445,
26418,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
892,
12,
2890,
16,
3604,
4672,
9163,
6376,
3359,
310,
445,
26418,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gather_info) | (gather_print, regroup, namespace)) | def ttyloop(task, nodeset, gather, timeout, label, verbosity, (gather_print, regroup, namespace)): """Manage the interactive prompt to run command""" readline_avail = False if task.default("USER_interactive"): assert sys.stdin.isatty() try: import readline readline_setup() readline_avail = True except ImportError: pass if verbosity >= VERB_STD: print "Enter 'quit' to leave this interactive mode" rc = 0 ns = NodeSet(nodeset) ns_info = True cmd = "" while task.default("USER_running") or cmd.lower() != 'quit': try: if task.default("USER_interactive") and not task.default("USER_running"): if ns_info: print "Working with nodes: %s" % ns ns_info = False prompt = "clush> " else: prompt = "" cmd = raw_input(prompt) except EOFError: print return except UpdatePromptException: if task.default("USER_interactive"): continue return except KeyboardInterrupt, e: signal.signal(signal.SIGUSR1, signal.SIG_IGN) if gather: # Suspend task, so we can safely access its data from # the main thread task.suspend() print_warn = False # Display command output, but cannot order buffers by rc nodesetify = lambda v: (v[0], NodeSet.fromlist(v[1])) for buf, nodeset in sorted(map(nodesetify, task.iter_buffers()), cmp=bufnodeset_cmp): if not print_warn: print_warn = True print >> sys.stderr, "Warning: Caught keyboard interrupt!" gather_print(nodeset, buf, regroup, namespace) # Return code handling ns_ok = NodeSet() for rc, nodelist in task.iter_retcodes(): ns_ok.add(NodeSet.fromlist(nodelist)) if rc != 0: # Display return code if not ok ( != 0) ns = NodeSet.fromlist(nodelist) print >> sys.stderr, \ "clush: %s: exited with exit code %s" % (ns, rc) # Add uncompleted nodeset to exception object e.uncompleted_nodes = ns - ns_ok # Display nodes that didn't answer within command timeout delay if task.num_timeout() > 0: print >> sys.stderr, "clush: %s: command timeout" % \ NodeSet.fromlist(task.iter_keys_timeout()) raise e if task.default("USER_running"): ns_reg, ns_unreg = NodeSet(), NodeSet() for c in task._engine.clients(): if c.registered: ns_reg.add(c.key) else: ns_unreg.add(c.key) if ns_unreg: pending = "\nclush: pending(%d): %s" % (len(ns_unreg), ns_unreg) else: pending = "" print >> sys.stderr, "clush: interrupt (^C to abort task)\n" \ "clush: in progress(%d): %s%s" % (len(ns_reg), ns_reg, pending) else: cmdl = cmd.lower() try: ns_info = True if cmdl.startswith('+'): ns.update(cmdl[1:]) elif cmdl.startswith('-'): ns.difference_update(cmdl[1:]) elif cmdl.startswith('@'): ns = NodeSet(cmdl[1:]) elif cmdl == '=': gather = not gather if verbosity >= VERB_STD: if gather: print "Switching to gathered output format" else: print "Switching to standard output format" ns_info = False continue elif not cmdl.startswith('?'): # if ?, just print ns_info ns_info = False except NodeSetParseError: print >> sys.stderr, "clush: nodeset parse error (ignoring)" if ns_info: continue if cmdl.startswith('!') and len(cmd.strip()) > 0: run_command(task, cmd[1:], None, gather, timeout, None, verbosity, gather_info) elif cmdl != "quit": if not cmd: continue if readline_avail: readline.write_history_file(get_history_file()) run_command(task, cmd, ns, gather, timeout, label, verbosity, gather_info) return rc | fa12d716e7b14fc16a9a3fa9f83fcdeb49d96806 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/fa12d716e7b14fc16a9a3fa9f83fcdeb49d96806/clush.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21520,
6498,
12,
4146,
16,
2199,
278,
16,
11090,
16,
2021,
16,
1433,
16,
11561,
16,
261,
75,
4806,
67,
1188,
16,
960,
656,
16,
1981,
3719,
30,
3536,
21258,
326,
12625,
6866,
358,
1086,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21520,
6498,
12,
4146,
16,
2199,
278,
16,
11090,
16,
2021,
16,
1433,
16,
11561,
16,
261,
75,
4806,
67,
1188,
16,
960,
656,
16,
1981,
3719,
30,
3536,
21258,
326,
12625,
6866,
358,
1086,... |
def SetMemberComment(id, member_offset, comment, repeatable): | def SetMemberComment(sid, member_offset, comment, repeatable): | def SetMemberComment(id, member_offset, comment, repeatable): """ Change structure member comment @param id: structure type ID @param member_offset: offset of the member @param comment: new comment of the structure member @param repeatable: 1: change repeatable comment 0: change regular comment @return: != 0 - ok """ s = idaapi.get_struc(id) if not s: return 0 m = idaapi.get_member(s, member_offset) if not m: return 0 return idaapi.set_member_cmt(m, comment, repeatable) | 76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4419,
4469,
12,
7453,
16,
3140,
67,
3348,
16,
2879,
16,
7666,
429,
4672,
3536,
7576,
3695,
3140,
2879,
225,
632,
891,
612,
30,
3695,
618,
1599,
632,
891,
3140,
67,
3348,
30,
1384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4419,
4469,
12,
7453,
16,
3140,
67,
3348,
16,
2879,
16,
7666,
429,
4672,
3536,
7576,
3695,
3140,
2879,
225,
632,
891,
612,
30,
3695,
618,
1599,
632,
891,
3140,
67,
3348,
30,
1384... |
sender = self.GetRequestEmail(), text = self._response_buffer) self._response_buffer = '' | sender = self.GetRequestEmail(), text = self.__respbuf) self.__respbuf = '' self.__errors = 0 self.__NoMailCmdResponse = 0 | def SendMailCmdResponse(self, mail): | 4b2df7e3d338f55697b3a243715d01d52d223317 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4b2df7e3d338f55697b3a243715d01d52d223317/MailCommandHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2479,
6759,
5931,
1064,
12,
2890,
16,
4791,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2479,
6759,
5931,
1064,
12,
2890,
16,
4791,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
z[0] = N.zeros((self.bsize,)+(self.nkern,)+tuple(self.outshp)) | z[0] = N.zeros((self.bsize,)+(self.nkern,)+tuple(self.fulloutshp), dtype=img2d.dtype) | def perform(self,node, (img2d, filtersflipped), (z,)): """ By default if len(img2d.shape)==3, we """ # TODO: move these back out to global scope when they no longer cause an atexit error from scipy.signal.signaltools import _valfrommode, _bvalfromboundary from scipy.signal.sigtools import _convolve2d if z[0] is None: z[0] = N.zeros((self.bsize,)+(self.nkern,)+tuple(self.outshp)) zz=z[0] val = _valfrommode(self.out_mode) bval = _bvalfromboundary('fill') | 1273eda55133d17c338a485c02801ed7be7d4e2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/1273eda55133d17c338a485c02801ed7be7d4e2b/conv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
12,
2890,
16,
2159,
16,
261,
6081,
22,
72,
16,
3415,
12357,
1845,
3631,
261,
94,
16,
3719,
30,
3536,
2525,
805,
309,
562,
12,
6081,
22,
72,
18,
4867,
13,
631,
23,
16,
732,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
12,
2890,
16,
2159,
16,
261,
6081,
22,
72,
16,
3415,
12357,
1845,
3631,
261,
94,
16,
3719,
30,
3536,
2525,
805,
309,
562,
12,
6081,
22,
72,
18,
4867,
13,
631,
23,
16,
732,
35... |
s.appendExten("5","Goto(%s,s,1)" % self.ivr_5, self.pbx) | s.appendExten("5","Goto(%s,s,1)" % self.ivr_5, context) | def createAsteriskConfig(self): s = AstConf("extensions.conf") s.setSection(self.name) if self.pbx: pbx = self.pbx else: pbx = "phones" s.append("include=%s" % pbx) s.appendExten("s","Set(TIMEOUT(digit)=%d)" % self.digittimeout, self.pbx) if self.moh: s.appendExten("s","Setmusiconhold(%s)" % self.moh, self.pbx) s.appendExten("s","Set(DIAL_OPTIONS=m)", self.pbx) else: s.appendExten("s","Set(DIAL_OPTIONS=r)", self.pbx) if self.ivrtime: if self.times: times=self.times.split(',') for t in times: s.appendExten("s","GotoIfTime(%s?%s,s,1)" % (t,self.ivrtime), self.pbx) if self.timeout: s.appendExten("s","Set(TIMEOUT(absolute)=%s)" % self.timeout, self.pbx) for i in range(self.repeat): s.appendExten("s","Background(%s)" % self.backgroundfile, self.pbx) if self.pause: s.appendExten("s","WaitExten(%s)" % self.pause, self.pbx) s.appendExten("s","WaitExten(%d)" % self.waittime, self.pbx) s.appendExten("s","Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) if self.ivr_1: s.appendExten("1","Goto(%s,s,1)" % self.ivr_1, self.pbx) if self.ivr_2: s.appendExten("2","Goto(%s,s,1)" % self.ivr_2, self.pbx) if self.ivr_3: s.appendExten("3","Goto(%s,s,1)" % self.ivr_3, self.pbx) if self.ivr_4: s.appendExten("4","Goto(%s,s,1)" % self.ivr_4, self.pbx) if self.ivr_5: s.appendExten("5","Goto(%s,s,1)" % self.ivr_5, self.pbx) if self.ivr_6: s.appendExten("6","Goto(%s,s,1)" % self.ivr_6, self.pbx) if self.ivr_7: s.appendExten("7","Goto(%s,s,1)" % self.ivr_7, self.pbx) if self.ivr_8: s.appendExten("8","Goto(%s,s,1)" % self.ivr_8, self.pbx) if self.ivr_9: s.appendExten("9","Goto(%s,s,1)" % self.ivr_9, self.pbx) if self.ivr_ast: s.appendExten("*","Goto(%s,s,1)" % self.ivr_ast, self.pbx) if self.phone_1: s.appendExten("1","Goto(%s,%s,1)" % (pbx,self.phone_1), self.pbx) if self.phone_2: s.appendExten("2","Goto(%s,%s,1)" % (pbx,self.phone_2), self.pbx) if self.phone_3: s.appendExten("3","Goto(%s,%s,1)" % (pbx,self.phone_3), self.pbx) if self.phone_4: s.appendExten("4","Goto(%s,%s,1)" % (pbx,self.phone_4), self.pbx) if self.phone_5: s.appendExten("5","Goto(%s,%s,1)" % (pbx,self.phone_5), self.pbx) if self.phone_6: s.appendExten("6","Goto(%s,%s,1)" % (pbx,self.phone_6), self.pbx) if self.phone_7: s.appendExten("7","Goto(%s,%s,1)" % (pbx,self.phone_7), self.pbx) if self.phone_8: s.appendExten("8","Goto(%s,%s,1)" % (pbx,self.phone_8), self.pbx) if self.phone_9: s.appendExten("9","Goto(%s,%s,1)" % (pbx,self.phone_9), self.pbx) if self.phone_ast: s.appendExten("*","Goto(%s,%s,1)" % (pbx,self.phone_ast), self.pbx) s.appendExten("0", "Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) s.appendExten("i","Playback(invalid)", self.pbx) s.appendExten("i","Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) s.appendExten("t","ResetCDR(w)", self.pbx) s.appendExten("t","NoCDR", self.pbx) s.appendExten("t","Hangup", self.pbx) s.appendExten("T","ResetCDR(w)", self.pbx) s.appendExten("T","NoCDR", self.pbx) s.appendExten("T","Hangup", self.pbx) s.appendExten("#","ResetCDR(w)", self.pbx) s.appendExten("#","NoCDR", self.pbx) s.appendExten("#","Hangup", self.pbx) | e581660927aebaacc03692e1a06a4d11542ff6a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2627/e581660927aebaacc03692e1a06a4d11542ff6a3/cfg_ivr_treenode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
272,
273,
16614,
3976,
2932,
9489,
18,
3923,
7923,
272,
18,
542,
5285,
12,
2890,
18,
529,
13,
309,
365,
18,
5733,
92,
30,
6386,
92,
273,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
272,
273,
16614,
3976,
2932,
9489,
18,
3923,
7923,
272,
18,
542,
5285,
12,
2890,
18,
529,
13,
309,
365,
18,
5733,
92,
30,
6386,
92,
273,
36... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.