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 |
|---|---|---|---|---|---|---|
for s in singlet_list[:]: if s is not self.obj_doubleclicked: | for s in singlet_list[:]: if not s.killed(): | def transdeposit_from_MMKit(self, singlet_list): '''Trans-deposit the current object in the MMKit on all singlets in <singlet_list>. ''' if not singlet_list: return modkey = self.modkey # save the modkey state if self.modkey is None: self.modkey = 'Shift' # needed for trans-deposit selection consistency when no modifier key is pressed. self.suppress_updates = True nobjs=0 for s in singlet_list[:]: # singlet_list built in if s is not self.obj_doubleclicked: #& when trans-depositing atoms from the MMKit, singlets from deposited atoms will #& autobond with singlets in singlet_list[]. #& this is a known bug; to be fixed after talking with Bruce. mark 060212. self.deposit_from_MMKit(s) nobjs += 1 self.suppress_updates = False self.modkey = modkey # restore the modkey state to real state. if self.w.depositState == 'Atoms': object_type = "atom(s)" elif self.w.depositState == 'Clipboard': object_type = "clipboard node(s)" else: object_type = "library part(s)" info = fix_plurals( "%d %s deposited." % (nobjs+1, object_type) ) # +1 to resolve bug 1502. mark 060213. env.history.message(info) self.w.win_update() | 35ba5f913e5ad8656e46682dc44de9bd63925b9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/35ba5f913e5ad8656e46682dc44de9bd63925b9c/depositMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
906,
323,
1724,
67,
2080,
67,
8206,
14102,
12,
2890,
16,
4864,
1810,
67,
1098,
4672,
9163,
1429,
17,
323,
1724,
326,
783,
733,
316,
326,
18295,
14102,
603,
777,
4864,
17307,
316,
411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
906,
323,
1724,
67,
2080,
67,
8206,
14102,
12,
2890,
16,
4864,
1810,
67,
1098,
4672,
9163,
1429,
17,
323,
1724,
326,
783,
733,
316,
326,
18295,
14102,
603,
777,
4864,
17307,
316,
411,
... |
if options.verbose: print "Scheduling package install '%s' (%i) on %s" % ('smbios-utils', smbios_package, system['name']) | if options.verbose: print timestamp(), "+ Scheduling package install '%s' (%i) on %s" % ('smbios-utils', smbios_package, system['name']) | def schedule_actions(key, systems): '''Schedules GPG key install, package install, and "smbios-sys-info" action on clients''' gpg_script = ''' | 07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4788,
67,
4905,
12,
856,
16,
14908,
4672,
9163,
27073,
28378,
498,
3799,
16,
2181,
3799,
16,
471,
315,
87,
1627,
7441,
17,
9499,
17,
1376,
6,
1301,
603,
7712,
26418,
22544,
67,
4263,
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,
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,
4788,
67,
4905,
12,
856,
16,
14908,
4672,
9163,
27073,
28378,
498,
3799,
16,
2181,
3799,
16,
471,
315,
87,
1627,
7441,
17,
9499,
17,
1376,
6,
1301,
603,
7712,
26418,
22544,
67,
4263,
2... |
message = _("Can't remove %s" % self.filename + ".old") print message if self.frame: self.frame.logMessage(message) | log.addwarning(_("Can't remove %s" % self.filename + ".old")) | def writeConfig(self): self.config_lock.acquire() for i in self.sections.keys(): if not self.parser.has_section(i): self.parser.add_section(i) for j in self.sections[i].keys(): if j not in ["sharedfiles", "sharedfilesstreams", "wordindex", "fileindex", "sharedmtimes", "bsharedfiles", "bsharedfilesstreams", "bwordindex", "bfileindex", "bsharedmtimes"]: self.parser.set(i, j, self.sections[i][j]) else: self.parser.remove_option(i, j) path, fn = os.path.split(self.filename) try: if not os.path.isdir(path): os.makedirs(path) except OSError, msg: message = _("Can't create directory '%(path)s', reported error: %(error)s") % {'path':path, 'error':msg} print message if self.frame: self.frame.logMessage(message) oldumask = os.umask(0077) try: f = open(self.filename + ".new", "w") except IOError, e: message = _("Can't save config file, I/O error: %s") % e print message if self.frame: self.frame.logMessage(message) self.config_lock.release() return else: try: self.parser.write(f) except IOError, e: message = _("Can't save config file, I/O error: %s") % e print message if self.frame: self.frame.logMessage(message) self.config_lock.release() return else: f.close() os.umask(oldumask) # A paranoid precaution since config contains the password try: os.chmod(self.filename, 0600) except: pass try: s = os.stat(self.filename) if s.st_size > 0: try: if os.path.exists(self.filename + ".old"): os.remove(self.filename + ".old") except OSError, error: message = _("Can't remove %s" % self.filename + ".old") print message if self.frame: self.frame.logMessage(message) try: os.rename(self.filename, self.filename + ".old") except OSError, error: message = _("Can't back config file up, error: %s") % error print message if self.frame: self.frame.logMessage(message) except OSError: pass try: os.rename(self.filename + ".new", self.filename) except OSError, error: message = _("Can't rename config file, error: %s") % error print message if self.frame: self.frame.logMessage(message) self.config_lock.release() | d03b1060449a904912df2e17c0cce7abc6348d8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/d03b1060449a904912df2e17c0cce7abc6348d8f/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
809,
12,
2890,
4672,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
364,
277,
316,
365,
18,
11657,
18,
2452,
13332,
309,
486,
365,
18,
4288,
18,
5332,
67,
3464,
12,
77,
4672,
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,
1045,
809,
12,
2890,
4672,
365,
18,
1425,
67,
739,
18,
1077,
1039,
1435,
364,
277,
316,
365,
18,
11657,
18,
2452,
13332,
309,
486,
365,
18,
4288,
18,
5332,
67,
3464,
12,
77,
4672,
36... |
protect('registerObject', CMFCorePermissions.ModifyPortalContent) | protect(CMFCorePermissions.ModifyPortalContent, 'registerObject') | def lookupObject(self, uuid): """Lookup an object by its uuid""" return self._objectByUUID(uuid) | f1e62f171a253c1d9e5f2d9dfac3150555d453e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/f1e62f171a253c1d9e5f2d9dfac3150555d453e2/ReferenceEngine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
921,
12,
2890,
16,
3822,
4672,
3536,
6609,
392,
733,
635,
2097,
3822,
8395,
327,
365,
6315,
1612,
858,
5562,
12,
7080,
13,
2,
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,
3689,
921,
12,
2890,
16,
3822,
4672,
3536,
6609,
392,
733,
635,
2097,
3822,
8395,
327,
365,
6315,
1612,
858,
5562,
12,
7080,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
result = presubmit_support.DoPresubmitChecks(change_info=change_info, | change = presubmit_support.SvnChange(change_info.name, change_info.description, change_info.GetLocalRoot(), change_info.GetFiles(), change_info.issue, change_info.patchset) result = presubmit_support.DoPresubmitChecks(change=change, | def DoPresubmitChecks(change_info, committing, may_prompt): """Imports presubmit, then calls presubmit.DoPresubmitChecks.""" # Need to import here to avoid circular dependency. import presubmit_support root_presubmit = GetCachedFile('PRESUBMIT.py', use_root=True) result = presubmit_support.DoPresubmitChecks(change_info=change_info, committing=committing, verbose=False, output_stream=sys.stdout, input_stream=sys.stdin, default_presubmit=root_presubmit, may_prompt=may_prompt) if not result and may_prompt: print "\nPresubmit errors, can't continue (use --no_presubmit to bypass)" return result | 2788167b9ba673efc2ff7d2a0b4dee394f87572d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/2788167b9ba673efc2ff7d2a0b4dee394f87572d/gcl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
12236,
373,
1938,
4081,
12,
3427,
67,
1376,
16,
3294,
1787,
16,
2026,
67,
13325,
4672,
3536,
13347,
4075,
373,
1938,
16,
1508,
4097,
4075,
373,
1938,
18,
3244,
12236,
373,
1938,
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,
2256,
12236,
373,
1938,
4081,
12,
3427,
67,
1376,
16,
3294,
1787,
16,
2026,
67,
13325,
4672,
3536,
13347,
4075,
373,
1938,
16,
1508,
4097,
4075,
373,
1938,
18,
3244,
12236,
373,
1938,
40... |
elif E2.big_oh() < N-2: | elif E2.precision_absolute() < N-2: | def padic_sigma(self, p, N=20, E2=None, check=False, check_hypotheses=True): r""" Computes the p-adic sigma function with respect to the standard invariant differential $dx/(2y + a_1 x + a_3)$, as defined by Mazur and Tate, as a power series in the usual uniformiser $t$ at the origin. | 5691eef173e9befc9071b2585eecfd7f432856e4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5691eef173e9befc9071b2585eecfd7f432856e4/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
13201,
12,
2890,
16,
293,
16,
423,
33,
3462,
16,
512,
22,
33,
7036,
16,
866,
33,
8381,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4627,
335,
67,
13201,
12,
2890,
16,
293,
16,
423,
33,
3462,
16,
512,
22,
33,
7036,
16,
866,
33,
8381,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
... |
pc.set_clim(axis2data.get('colorbar',{}).get('forcedrange',(None,None))) | forced = list(axis2data.get('colorbar',{}).get('forcedrange',(None,None))) if forced[0]!=None and logscale and forced[0]<=0.: forced[0] = None if forced[1]!=None and logscale and forced[1]<=0.: forced[1] = None pc.set_clim(forced) | def update(self): """Update the figure. Everything happens here. The current set of customized properties is interpreted, data slices are obtained from the data sources, default figure properties are set based on properties of the obtained data, and the figure is built and shown. """ # We are called whenever figure properties change. If we do not want to update now, # just register that an update is needed and exit. if not self.updating: self.dirty = True return | 1dbe3aaad7efa7e1f3239d9707a94722da20ea59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/381/1dbe3aaad7efa7e1f3239d9707a94722da20ea59/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
3536,
1891,
326,
7837,
18,
225,
26553,
10555,
2674,
18,
1021,
783,
444,
434,
29063,
1790,
353,
19898,
16,
501,
12390,
854,
12700,
628,
326,
501,
5550,
16,
805,
7837... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
12,
2890,
4672,
3536,
1891,
326,
7837,
18,
225,
26553,
10555,
2674,
18,
1021,
783,
444,
434,
29063,
1790,
353,
19898,
16,
501,
12390,
854,
12700,
628,
326,
501,
5550,
16,
805,
7837... |
gm=linearRangeMapping(gm,oldRange=(0,mm.max()),newRange=(0,1.0)) | gm = linearRangeMapping(gm,oldRange=(0,mm.max()),newRange=(0,1.0)) | def calcGradScaleSum(image, steps): gss = GrayImage(image.size()) scale = 0.7 for i in range(steps*2+1): ti = vectorToTensor(gaussianGradientAsVector(image.subImage(0),scale)) if (image.bands()>1): for j in range(1,image.bands()): ti += vectorToTensor(gaussianGradientAsVector(image.subImage(j),scale)) gm = transformImage(tensorTrace(ti),'\l x:sqrt(x)') mm = MinMax() inspectImage(gm,mm) gm=linearRangeMapping(gm,oldRange=(0,mm.max()),newRange=(0,1.0)) gss += gm scale *= 1.41421 return gss | 8925518c2ae9f74de3b734317beccbc4670dbd43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/8925518c2ae9f74de3b734317beccbc4670dbd43/statistics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
30420,
5587,
3495,
12,
2730,
16,
6075,
4672,
314,
1049,
273,
12435,
2040,
12,
2730,
18,
1467,
10756,
3159,
273,
374,
18,
27,
364,
277,
316,
1048,
12,
8986,
14,
22,
15,
21,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7029,
30420,
5587,
3495,
12,
2730,
16,
6075,
4672,
314,
1049,
273,
12435,
2040,
12,
2730,
18,
1467,
10756,
3159,
273,
374,
18,
27,
364,
277,
316,
1048,
12,
8986,
14,
22,
15,
21,
4672,
... |
download_installeritem(item) | download_installeritem(item, uninstalling=True) | def processRemoval(manifestitem, cataloglist, installinfo): """Processes a manifest item; attempts to determine if it needs to be removed, and if it can be removed. Unlike installs, removals aren't really version-specific - If we can figure out how to remove the currently installed version, we do, unless the admin specifies a specific version number in the manifest. In that case, we only attempt a removal if the version installed matches the specific version in the manifest. Any items dependent on the given item need to be removed first. Items to be removed are added to installinfo['removals']. Calls itself recursively as it processes dependencies. Returns a boolean; when processing dependencies, a false return will stop the removal of a dependent item. """ manifestitemname_withversion = os.path.split(manifestitem)[1] munkicommon.display_debug1( '* Processing manifest item %s for removal' % manifestitemname_withversion) (manifestitemname, includedversion) = nameAndVersion( manifestitemname_withversion) infoitems = [] if includedversion: # a specific version was specified item_pl = getItemDetail(manifestitemname, cataloglist, includedversion) if item_pl: infoitems.append(item_pl) else: # get all items matching the name provided infoitems = getAllItemsWithName(manifestitemname, cataloglist) if not infoitems: munkicommon.display_warning('Could not get information for %s' % manifestitemname_withversion) return False for item in infoitems: # check to see if item is already in the installlist, # if so, that's bad - it means it's scheduled to be installed # _and_ removed. We'll warn, and do nothing with this item. if isItemInInstallInfo(item, installinfo['managed_installs']): munkicommon.display_warning('Will not attempt to remove %s ' 'because some version of it is in ' 'the list of managed installs, or ' 'it is required by another managed ' 'install.' % manifestitemname_withversion) return False for item in infoitems: # check to see if item is already in the removallist: if isItemInInstallInfo(item, installinfo['removals']): munkicommon.display_debug1( '%s has already been processed for removal.' % manifestitemname_withversion) return True installEvidence = False for item in infoitems: if evidenceThisIsInstalled(item): installEvidence = True break if not installEvidence: munkicommon.display_detail('%s doesn\'t appear to be installed.' % manifestitemname_withversion) iteminfo = {} iteminfo['manifestitem'] = manifestitemname_withversion iteminfo['installed'] = False installinfo['removals'].append(iteminfo) return True # if we get here, installEvidence is true, and item # holds the item we found install evidence for, so we # should use that item to do the removal uninstall_item = None packagesToRemove = [] # check for uninstall info # and grab the first uninstall method we find. if item.get('uninstallable') and 'uninstall_method' in item: uninstallmethod = item['uninstall_method'] if uninstallmethod == 'removepackages': packagesToRemove = getReceiptsToRemove(item) if packagesToRemove: uninstall_item = item elif uninstallmethod.startswith('Adobe'): # Adobe CS3/CS4/CS5 product uninstall_item = item elif uninstallmethod == 'remove_copied_items': uninstall_item = item elif uninstallmethod == 'remove_app': uninstall_item = item else: # uninstall_method is a local script. # Check to see if it exists and is executable if os.path.exists(uninstallmethod) and \ os.access(uninstallmethod, os.X_OK): uninstall_item = item if not uninstall_item: # the uninstall info for the item couldn't be matched # to what's on disk munkicommon.display_warning('Could not find uninstall info for %s.' % manifestitemname_withversion) return False # if we got this far, we have enough info to attempt an uninstall. # the pkginfo is in uninstall_item # Now check for dependent items # # First, look through catalogs for items that are required by this item; # if any are installed, we need to remove them as well # # still not sure how to handle references to specific versions -- # if another package says it requires SomePackage--1.0.0.0.0 # and we're supposed to remove SomePackage--1.0.1.0.0... what do we do? # dependentitemsremoved = True ManagedInstallDir = munkicommon.pref('ManagedInstallDir') catalogsdir = os.path.join(ManagedInstallDir, 'catalogs') uninstall_item_name = uninstall_item.get('name') processednames = [] for catalogname in cataloglist: localcatalog = os.path.join(catalogsdir, catalogname) catalog_pl = FoundationPlist.readPlist(localcatalog) for item_pl in catalog_pl: name = item_pl.get('name') if name not in processednames: if 'requires' in item_pl: if uninstall_item_name in item_pl['requires']: munkicommon.display_debug1('%s requires %s, checking ' 'to see if it\'s ' 'installed...' % (item_pl.get('name'), manifestitemname)) if evidenceThisIsInstalled(item_pl): munkicommon.display_detail('%s requires %s. ' '%s must be removed ' 'as well.' % (item_pl.get('name'), manifestitemname, item_pl.get('name'))) success = processRemoval(item_pl.get('name'), cataloglist, installinfo) if not success: dependentitemsremoved = False break # record this name so we don't process it again processednames.append(name) if not dependentitemsremoved: munkicommon.display_warning('Will not attempt to remove %s because ' 'could not remove all items dependent ' 'on it.' % manifestitemname_withversion) return False # Finally! We can record the removal information! iteminfo = {} iteminfo['name'] = uninstall_item.get('name', '') iteminfo['display_name'] = uninstall_item.get('display_name', '') iteminfo['manifestitem'] = manifestitemname_withversion iteminfo['description'] = 'Will be removed.' if packagesToRemove: # remove references for each package packagesToReallyRemove = [] for pkg in packagesToRemove: munkicommon.display_debug1('Considering %s for removal...' % pkg) # find pkg in PKGDATA['pkg_references'] and remove the reference # so we only remove packages if we're the last reference to it if pkg in PKGDATA['pkg_references']: munkicommon.display_debug1('%s references are: %s' % (pkg, PKGDATA['pkg_references'][pkg])) PKGDATA['pkg_references'][pkg].remove(iteminfo['name']) if len(PKGDATA['pkg_references'][pkg]) == 0: munkicommon.display_debug1('Adding %s to removal list.' % pkg) packagesToReallyRemove.append(pkg) else: # This shouldn't happen munkicommon.display_warning('pkg id %s missing from pkgdata' % pkg) if packagesToReallyRemove: iteminfo['packages'] = packagesToReallyRemove else: # no packages that belong to this item only. munkicommon.display_warning('could not find unique packages to ' 'remove for %s' % iteminfo['name']) return False iteminfo['uninstall_method'] = uninstallmethod if uninstallmethod.startswith('Adobe'): if 'adobe_install_info' in item: iteminfo['adobe_install_info'] = item['adobe_install_info'] else: if 'uninstaller_item_location' in item: location = uninstall_item['uninstaller_item_location'] else: location = uninstall_item['installer_item_location'] if not enoughDiskSpace(uninstall_item, uninstalling=True): return False try: download_installeritem(item) filename = os.path.split(location)[1] iteminfo['uninstaller_item'] = filename iteminfo['adobe_package_name'] = \ uninstall_item.get('adobe_package_name','') except PackageVerificationError: munkicommon.display_warning( 'Can\'t uninstall %s because the integrity check ' 'failed.' % iteminfo['name']) return False except MunkiDownloadError: munkicommon.display_warning('Failed to download the ' 'uninstaller for %s' % iteminfo['name']) return False elif uninstallmethod == 'remove_copied_items': iteminfo['items_to_remove'] = item.get('items_to_copy', []) elif uninstallmethod == 'remove_app': if uninstall_item.get('installs', None): iteminfo['remove_app_info'] = uninstall_item['installs'][0] # before we add this removal to the list, # check for installed updates and add them to the # removal list as well: update_list = lookForUpdates(iteminfo['name'], cataloglist) for update_item in update_list: # call us recursively... unused_result = processRemoval(update_item, cataloglist, installinfo) # finish recording info for this removal iteminfo['installed'] = True iteminfo['installed_version'] = uninstall_item.get('version') if 'RestartAction' in uninstall_item: iteminfo['RestartAction'] = uninstall_item['RestartAction'] installinfo['removals'].append(iteminfo) munkicommon.display_detail( 'Removal of %s added to ManagedInstaller tasks.' % manifestitemname_withversion) return True | 7233ea384c0d8f73c40e1623556e9fc24f98637e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/7233ea384c0d8f73c40e1623556e9fc24f98637e/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
24543,
12,
14357,
1726,
16,
6222,
1098,
16,
3799,
1376,
4672,
3536,
10599,
279,
5643,
761,
31,
7531,
358,
4199,
309,
518,
4260,
358,
506,
3723,
16,
471,
309,
518,
848,
506,
3723,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24543,
12,
14357,
1726,
16,
6222,
1098,
16,
3799,
1376,
4672,
3536,
10599,
279,
5643,
761,
31,
7531,
358,
4199,
309,
518,
4260,
358,
506,
3723,
16,
471,
309,
518,
848,
506,
3723,
... |
t = TempRegister(a.width) return t.scope("t = %s - %s; %s" % ( a.codegen(), b.codegen(), self._subFlags(a, b, t))) | return "reg.sresult = %s - %s; reg.uresult = %s - %s; %s" % ( signed(a), signed(b), u32(a), u32(b), self._resultShift(a)) | def codegen_cmp(self, a, b): t = TempRegister(a.width) return t.scope("t = %s - %s; %s" % ( a.codegen(), b.codegen(), self._subFlags(a, b, t))) | 8cf0c3c7a8428c608bbe912500420c8a19bc9730 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/8cf0c3c7a8428c608bbe912500420c8a19bc9730/sbt86.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23198,
67,
9625,
12,
2890,
16,
279,
16,
324,
4672,
268,
273,
16380,
3996,
12,
69,
18,
2819,
13,
327,
268,
18,
4887,
2932,
88,
273,
738,
87,
300,
738,
87,
31,
738,
87,
6,
738,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23198,
67,
9625,
12,
2890,
16,
279,
16,
324,
4672,
268,
273,
16380,
3996,
12,
69,
18,
2819,
13,
327,
268,
18,
4887,
2932,
88,
273,
738,
87,
300,
738,
87,
31,
738,
87,
6,
738,
261,
... |
time.sleep(1*pilotsToSubmit) | return S_OK( submittedPilots ) | def submitPilots(self, taskQueueDict, pilotsToSubmit, director): """ Submit pilot for the given TaskQueue, this is done from the Thread Pool job """ try: | 4fc45f848c73ccd70e55d2692551954ac266f79d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4fc45f848c73ccd70e55d2692551954ac266f79d/TaskQueueDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
52,
330,
6968,
12,
2890,
16,
1562,
3183,
5014,
16,
24970,
6968,
774,
11620,
16,
2657,
280,
4672,
3536,
17320,
293,
22797,
364,
326,
864,
3837,
3183,
16,
333,
353,
2731,
628,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
52,
330,
6968,
12,
2890,
16,
1562,
3183,
5014,
16,
24970,
6968,
774,
11620,
16,
2657,
280,
4672,
3536,
17320,
293,
22797,
364,
326,
864,
3837,
3183,
16,
333,
353,
2731,
628,
326,
... |
help='Maximise the window') | help=_('Maximise the window')) | def parse_options(): """Parse the command line options""" usage = "usage: %prog [options]" configobj = config.Config() parser = OptionParser(usage) parser.add_option('-v', '--version', action='store_true', dest='version', help='Display program version') parser.add_option('-m', '--maximise', action='store_true', dest='maximise', help='Maximise the window') parser.add_option('-f', '--fullscreen', action='store_true', dest='fullscreen', help='Make the window fill the screen') parser.add_option('-b', '--borderless', action='store_true', dest='borderless', help='Disable window borders') parser.add_option('-H', '--hidden', action='store_true', dest='hidden', help='Hide the window at startup') parser.add_option('-T', '--title', dest='forcedtitle', help='Specify a \ | c8a33cd91acb118383b79fea2168ab03f7c8703c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1032/c8a33cd91acb118383b79fea2168ab03f7c8703c/optionparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2116,
13332,
3536,
3201,
326,
1296,
980,
702,
8395,
4084,
273,
315,
9167,
30,
738,
14654,
306,
2116,
4279,
225,
642,
2603,
273,
642,
18,
809,
1435,
2082,
273,
18862,
12,
9167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2116,
13332,
3536,
3201,
326,
1296,
980,
702,
8395,
4084,
273,
315,
9167,
30,
738,
14654,
306,
2116,
4279,
225,
642,
2603,
273,
642,
18,
809,
1435,
2082,
273,
18862,
12,
9167,
... |
log.info('... fixing ticket threads in %s', p.shortname) | log.info('... fixing ticket threads in %s', project.shortname) | def main(): test = sys.argv[-1] == 'test' all_projects = M.Project.query.find().all() log.info('Fixing tracker thread subjects') for project in all_projects: if project.parent_id: continue c.project = project all_tickets = TM.Ticket.query.find() # will find all tickets for all trackers in this project if not all_tickets.count(): continue for ticket in all_tickets: thread = ticket.get_discussion_thread() thread.subject = '' if test: log.info('... would fix ticket threads in %s', p.shortname) else: log.info('... fixing ticket threads in %s', p.shortname) session(project).flush() session(project).clear() | ab682d23a11520c4908fcf7fbcc2d663641c2819 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/ab682d23a11520c4908fcf7fbcc2d663641c2819/fix-tracker-thread-subjects.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1842,
273,
2589,
18,
19485,
18919,
21,
65,
422,
296,
3813,
11,
777,
67,
13582,
273,
490,
18,
4109,
18,
2271,
18,
4720,
7675,
454,
1435,
613,
18,
1376,
2668,
8585,
310,
974... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
273,
2589,
18,
19485,
18919,
21,
65,
422,
296,
3813,
11,
777,
67,
13582,
273,
490,
18,
4109,
18,
2271,
18,
4720,
7675,
454,
1435,
613,
18,
1376,
2668,
8585,
310,
974... |
if inst.haskey('arch'): | if 'arch' in inst.attrib: | def RemovePackages(self, packages): ''' Remove specified entries. | 82d8aeb37212e1202f3dfe41b50592a026822318 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/82d8aeb37212e1202f3dfe41b50592a026822318/YUMng.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3581,
11425,
12,
2890,
16,
5907,
4672,
9163,
3581,
1269,
3222,
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,
0... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3581,
11425,
12,
2890,
16,
5907,
4672,
9163,
3581,
1269,
3222,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.read_bookmarks() | self.read_bookmarks() | def __enter__(self): self._tdir = TemporaryDirectory('_ebook_iter') self.base = self._tdir.__enter__() opts = config('').parse() self.pathtoopf = self.to_opf(self.pathtoebook, self.base, opts) self.opf = OPF(self.pathtoopf, os.path.dirname(self.pathtoopf)) self.spine = [SpineItem(i.path) for i in self.opf.spine] cover = self.opf.cover if os.path.splitext(self.pathtoebook)[1].lower() in \ ('.lit', '.mobi', '.prc') and cover: cfile = os.path.join(os.path.dirname(self.spine[0]), 'calibre_ei_cover.html') open(cfile, 'wb').write(TITLEPAGE%cover) self.spine[0:0] = [SpineItem(cfile)] if self.opf.path_to_html_toc is not None and \ self.opf.path_to_html_toc not in self.spine: self.spine.append(SpineItem(self.opf.path_to_html_toc)) sizes = [i.character_count for i in self.spine] self.pages = [math.ceil(i/float(self.CHARACTERS_PER_PAGE)) for i in sizes] for p, s in zip(self.pages, self.spine): s.pages = p start = 1 for s in self.spine: s.start_page = start start += s.pages s.max_page = s.start_page + s.pages - 1 self.toc = self.opf.toc self.find_embedded_fonts() self.read_bookmarks() return self | 802385787a39bc63f1c47adb230fb3c4dcd2f9ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/802385787a39bc63f1c47adb230fb3c4dcd2f9ff/iterator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2328,
972,
12,
2890,
4672,
365,
6315,
88,
1214,
273,
22791,
2853,
2668,
67,
73,
3618,
67,
2165,
6134,
365,
18,
1969,
225,
273,
365,
6315,
88,
1214,
16186,
2328,
972,
1435,
1500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2328,
972,
12,
2890,
4672,
365,
6315,
88,
1214,
273,
22791,
2853,
2668,
67,
73,
3618,
67,
2165,
6134,
365,
18,
1969,
225,
273,
365,
6315,
88,
1214,
16186,
2328,
972,
1435,
1500,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.UtcTimeStampField.__init__(self, 168) else quickfix.UtcTimeStampField.__init__(self, 168, 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,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
2872,
28,
13,
469,
9549,
904,
18,
57,
5111,
215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
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,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
2872,
28,
13,
469,
9549,
904,
18,
57,
5111,
215... |
if engine == 'sqlite3': try: | if engine == 'sqlite3': try: | def delete_db(settings): """Delete the old database.""" engine = settings.DATABASE_ENGINE if engine == 'sqlite3': try: os.unlink(settings.DATABASE_NAME) except OSError: pass elif engine == 'mysql': import _mysql s = _mysql.connect(host=settings.DATABASE_HOST, user=settings.DATABASE_USER, passwd=settings.DATABASE_PASSWORD) for cmd in ['drop database if exists %s', 'create database %s CHARACTER SET utf8 COLLATE utf8_general_ci']: s.query(cmd % settings.DATABASE_NAME) elif engine in ('postgresql', 'postgresql_psycopg2'): if settings.DATABASE_NAME == '': raise AssertionError, "You must specified a value for DATABASE_NAME in local_settings.py." if settings.DATABASE_USER == '': raise AssertionError, "You must specified a value for DATABASE_USER in local_settings.py." params=" --username=%s --password" % settings.DATABASE_USER if settings.DATABASE_HOST: params += " --host=%s" % settings.DATABASE_HOST if settings.DATABASE_PORT: params += " --port=%s" % settings.DATABASE_PORT params += " %s" % settings.DATABASE_NAME print """You will be prompted for the password for the user '%s' twice. Once to drop an existing database and then a second time for create the database """ % settings.DATABASE_USER for cmd in ['dropdb %s', 'createdb %s']: os.system(cmd % params) else: raise AssertionError, "Unknown database engine %s" % engine | 0b5b5bdddb5618fc3777a5e213b03abd527f7ab5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13656/0b5b5bdddb5618fc3777a5e213b03abd527f7ab5/load_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
1966,
12,
4272,
4672,
3536,
2613,
326,
1592,
2063,
12123,
4073,
273,
1947,
18,
22366,
67,
28980,
309,
4073,
422,
296,
19460,
23,
4278,
775,
30,
1140,
18,
318,
1232,
12,
4272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
67,
1966,
12,
4272,
4672,
3536,
2613,
326,
1592,
2063,
12123,
4073,
273,
1947,
18,
22366,
67,
28980,
309,
4073,
422,
296,
19460,
23,
4278,
775,
30,
1140,
18,
318,
1232,
12,
4272,
... |
If `allowcomments' is non-zero, embedded RFC-822 comments are allowed within the parsed fragment. | If `allowcomments' is non-zero, embedded RFC 2822 comments are allowed within the parsed fragment. | def getdelimited(self, beginchar, endchars, allowcomments = 1): """Parse a header fragment delimited by special characters. | b6f6fad5b96d38181611f28a27ba278b112ea9c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b6f6fad5b96d38181611f28a27ba278b112ea9c9/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3771,
1038,
329,
12,
2890,
16,
2376,
3001,
16,
679,
7549,
16,
1699,
9231,
273,
404,
4672,
3536,
3201,
279,
1446,
5481,
18609,
635,
4582,
3949,
18,
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,
0,
0,
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,
336,
3771,
1038,
329,
12,
2890,
16,
2376,
3001,
16,
679,
7549,
16,
1699,
9231,
273,
404,
4672,
3536,
3201,
279,
1446,
5481,
18609,
635,
4582,
3949,
18,
2,
-100,
-100,
-100,
-100,
-100,
... |
imageF_anat = load_volume(anat_desc, imagename=anatfile) | imageF_anat, anat_mat = load_volume(anat_desc, imagename=anatfile) imageF = imageF_anat.copy() | def demo_MRI_coregistration(anatfile, funclist, optimizer_method='powell', histo_method=1, smooth_histo=0, smooth_image=0, ftype=1): """ demo with (must have file ANAT1_V0001.img and fMRI directory fMRIData) measures, imageF_anat, fmri_series = reg.demo_MRI_coregistration() show results with In [59]: measures[25]['cost'] Out[59]: -0.48607185 In [60]: measures[25]['align_cost'] Out[60]: -0.99514639 In [61]: measures[25]['align_rotate'] Out[61]: array([ 1.94480181, 5.64703989, 5.35002136, -5.00544405, -2.2712214, -1.42249691], dtype=float32) In [62]: measures[25]['rotate'] Out[62]: array([ 1.36566341, 4.70644331, 4.68198586, -4.32256889, -2.47607017, -2.39173937], dtype=float32) """ # demo of alignment of fMRI series with anatomical MRI # in this demo, each fMRI volume is first perturbed (rotated, translated) # by a random value. The initial registration is measured, then the optimal # alignment is computed and the registration measure made following the volume remap. # The fMRI registration is done with the first fMRI volume using normalized cross-correlation. # Each fMRI volume is rotated to the fMRI-0 volume and the series is ensemble averaged. # The ensemble averaged is then registered with the anatomical MRI volume using normalized mutual information. # The fMRI series is then rotated with this parameter. The alignments are done with 3D cubic splines. # read the anatomical MRI volume anat_desc = load_anatMRI_desc() imageF_anat = load_volume(anat_desc, imagename=anatfile) # the sampling structure imdata = build_structs() # the volume filter imageF_anat['fwhm'] = build_fwhm(imageF_anat['mat'], imdata['step']) # read in the file list of the fMRI data metric_test = np.dtype([('cost', 'f'), ('align_cost', 'f'), ('rotate', 'f', 6), ('align_rotate', 'f', 6)]) #fMRIdata = read_fMRI_directory('fMRIData\*.img') #fMRIdata = read_fMRI_directory(funcdir + '/*.img') fMRIdata = funclist fmri_desc = load_fMRI_desc() fmri_series = {} ave_fMRI_volume = np.zeros(fmri_desc['layers']*fmri_desc['rows']*fmri_desc['cols'], dtype=np.float64).reshape(fmri_desc['layers'], fmri_desc['rows'], fmri_desc['cols']) count = 0 number_volumes = len(fMRIdata) measures = np.zeros(number_volumes, dtype=metric_test) # load and perturb (rotation, translation) the fMRI volumes for i in fMRIdata: image = load_volume(fmri_desc, i) # random perturbation of angle, translation for each volume beyond the first if count == 0: image['fwhm'] = build_fwhm(image['mat'], imdata['step']) fmri_series[count] = image count = count + 1 else: x = np.random.random(6) - 0.5 x = 10.0 * x fmri_series[count] = demo_rotate_fMRI_volume(image, x) measures[count]['rotate'][0:6] = x[0:6] count = count + 1 # load and register the fMRI volumes with volume_0 using normalized cross correlation metric imageF = fmri_series[0] if smooth_image: image_F_xyz = filter_image_3D(imageF['data'], imageF['fwhm'], ftype) imageF['data'] = image_F_xyz for i in range(1, number_volumes): imageG = fmri_series[i] # the measure prior to alignment measures[i]['cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo) x = python_coreg(imageF, imageG, imdata, lite=histo_method, method='ncc', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) measures[i]['align_rotate'][0:6] = x[0:6] measures[i]['align_cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo, alpha=x[0], beta=x[1], gamma=x[2], Tx=x[3], Ty=x[4], Tz=x[5]) # align the volumes and average them for co-registration with the anatomical MRI ave_fMRI_volume = fmri_series[0]['data'].astype(np.float64) for i in range(1, number_volumes): image = fmri_series[i] x[0:6] = measures[i]['align_rotate'][0:6] # overwrite the fMRI volume with the aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') ave_fMRI_volume = ave_fMRI_volume + fmri_series[i]['data'].astype(np.float64) ave_fMRI_volume = (ave_fMRI_volume / float(number_volumes)).astype(np.uint8) ave_fMRI_volume = {'data' : ave_fMRI_volume, 'mat' : imageF['mat'], 'dim' : imageF['dim'], 'fwhm' : imageF['fwhm']} # register (using normalized mutual information) with the anatomical MRI if smooth_image: image_F_anat_xyz = filter_image_3D(imageF_anat['data'], imageF_anat['fwhm'], ftype) imageF_anat['data'] = image_F_anat_xyz x = python_coreg(imageF_anat, ave_fMRI_volume, imdata, lite=histo_method, method='nmi', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) print 'functional-anatomical align parameters ' print x for i in range(number_volumes): image = fmri_series[i] # overwrite the fMRI volume with the anatomical-aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') return measures, imageF_anat, fmri_series | a0a06507bdbd3322039b726463a7cc1c63e59774 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/a0a06507bdbd3322039b726463a7cc1c63e59774/_registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21477,
67,
49,
2259,
67,
3644,
75,
4218,
12,
304,
270,
768,
16,
1326,
1098,
16,
13066,
67,
2039,
2218,
23509,
1165,
2187,
5356,
83,
67,
2039,
33,
21,
16,
11957,
67,
11488,
83,
33,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21477,
67,
49,
2259,
67,
3644,
75,
4218,
12,
304,
270,
768,
16,
1326,
1098,
16,
13066,
67,
2039,
2218,
23509,
1165,
2187,
5356,
83,
67,
2039,
33,
21,
16,
11957,
67,
11488,
83,
33,
20... |
print "...end of signal.pause()" | def main(): # Catch most important signals signal.signal( signal.SIGALRM, SigHandler ) signal.signal( signal.SIGHUP, SigHandler ) signal.signal( signal.SIGINT, SigHandler ) signal.signal( signal.SIGTERM, SigHandler ) argflags = {} # dict of argument flags # Parse command-line arguments doArgs(sys.argv[1:], argflags) # parse arg-list (not program name) # TODO: Is there a simpler Python-way of getting hostname ?? tmp = os.popen('uname -n', 'r') hostname = tmp.readline() log.hostname = hostname[:-1] # strip \n off end tmp.close() #print "[DEBUG] hostname:",log.hostname # instantiate global Config object global Config Config = config.Config( '__main__' ) # New history object history.eddieHistory = history.history() # read in config and rules parseConfig.readConf(config_file, Config) if 'showconfig' in argflags.keys() and argflags['showconfig'] == 1: # Just display the configuration and exit print "---Displaying Eddie Configuration---" print Config eddieexit() # Main Loop while 1: try: # check if any config/rules files have been modified # if so, re-read config if Config.checkfiles(): log.log( '<eddie>eddieguts(), config files modified - reloading config', 7 ) # # reset config and read in config and rules global Config Config = config.Config( '__main__' ) # read in config and rules parseConfig.readConf(config_file, Config) # perform guts of Eddie eddieguts(Config, history.eddieHistory) # email admin the adminlog if required log.sendadminlog() # sleep for set period - only quits with CTRL-c log.log( '<eddie>main(), sleeping for %d secs' % (config.scanperiod), 6 ) #print '<eddie>main(), sleeping for %d secs' % (config.scanperiod) # Sleep by setting SIGALRM to go off in scanperiod seconds #time.sleep( config.scanperiod ) print "Setting signal.alarm( %d )" % (config.scanperiod) signal.alarm( config.scanperiod ) print "signal.pause() ..." signal.pause() print "...end of signal.pause()" except KeyboardInterrupt: # CTRL-c hit - quit now log.log( '<eddie>main(), KeyboardInterrupt encountered - quitting', 1 ) print "\nEddie quitting ... bye bye" break | 3f3c453a48ff4dfbc4fe9c29551712c8d11aa72a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/3f3c453a48ff4dfbc4fe9c29551712c8d11aa72a/eddie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
21984,
4486,
10802,
11505,
4277,
18,
10420,
12,
4277,
18,
18513,
1013,
8717,
16,
21911,
1503,
262,
4277,
18,
10420,
12,
4277,
18,
2320,
16715,
3079,
16,
21911,
1503,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
468,
21984,
4486,
10802,
11505,
4277,
18,
10420,
12,
4277,
18,
18513,
1013,
8717,
16,
21911,
1503,
262,
4277,
18,
10420,
12,
4277,
18,
2320,
16715,
3079,
16,
21911,
1503,
262,... | |
sage: E.Lseries_values_along_line(1, 0.5+20*I, 5) [(0.500000000, 0), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)] | sage: E.Lseries_values_along_line(1, 0.5+20*I, 5) [(0.500000000, -5.45450037e-18), (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I), (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I), (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I), (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)] | def Lseries_values_along_line(self, s0, s1, number_samples): """ Return values of $L(E, s)$ at \code{number_samples} equally-spaced sample points along the line from $s_0$ to $s_1$ in the complex plane. | f06b34a4df7347d15a5cc8350a6afab53e4b6cae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f06b34a4df7347d15a5cc8350a6afab53e4b6cae/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
10222,
67,
2372,
67,
287,
932,
67,
1369,
12,
2890,
16,
272,
20,
16,
272,
21,
16,
1300,
67,
7319,
4672,
3536,
2000,
924,
434,
271,
48,
12,
41,
16,
272,
21877,
622,
521,
710,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
511,
10222,
67,
2372,
67,
287,
932,
67,
1369,
12,
2890,
16,
272,
20,
16,
272,
21,
16,
1300,
67,
7319,
4672,
3536,
2000,
924,
434,
271,
48,
12,
41,
16,
272,
21877,
622,
521,
710,
95... |
if _debug: print "\t%s: Called TiffImage.render()" % rendererName | debugMsg("Called TiffImage.render()") | def render(self): """ Does TiffImage object specific (pre)rendering stuff """ if _debug: print "\t%s: Called TiffImage.render()" % rendererName | c44140bd3d918f82e3b4fb0f16f6949f4d7b003e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/c44140bd3d918f82e3b4fb0f16f6949f4d7b003e/image.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
3536,
9637,
399,
3048,
2040,
733,
2923,
261,
1484,
13,
5902,
310,
10769,
3536,
309,
389,
4148,
30,
1172,
1548,
88,
9,
87,
30,
11782,
399,
3048,
2040,
18,
5902,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
3536,
9637,
399,
3048,
2040,
733,
2923,
261,
1484,
13,
5902,
310,
10769,
3536,
309,
389,
4148,
30,
1172,
1548,
88,
9,
87,
30,
11782,
399,
3048,
2040,
18,
5902,
10... |
if opts.get('pkg_name'): self._name_entry.insert(0, opts['pkg_name']) | if opts.get('prj_name'): self._name_entry.insert(0, opts['prj_name']) | def open(self, prjfile): self._filename = prjfile if 1:#try: opts = load(open(prjfile, 'r')) self._name_entry.delete(0, 'end') if opts.get('pkg_name'): self._name_entry.insert(0, opts['pkg_name']) self._url_entry.delete(0, 'end') if opts.get('pkg_url'): self._url_entry.insert(0, opts['pkg_url']) self._out_entry.delete(0, 'end') self._out_entry.insert(0, opts.get('outdir', 'html')) self._css_entry.delete(0, 'end') if opts.get('css', 'default') in STYLESHEETS.keys(): self._css_var.set(opts.get('css', 'default')) else: self._css_var.set('-other-') self._css_entry.insert(0, opts.get('css', 'default')) for (file, name) in opts.get('modules', []): if not self.add_module(file, 0): self.add_module(name, 0) #except: # self._top.bell() | cd9a037e35aa3ac02f05d4d7bc85c2a899e3132b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/cd9a037e35aa3ac02f05d4d7bc85c2a899e3132b/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
27378,
768,
4672,
365,
6315,
3459,
273,
27378,
768,
309,
404,
27363,
698,
30,
1500,
273,
1262,
12,
3190,
12,
683,
78,
768,
16,
296,
86,
26112,
365,
6315,
529,
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,
1696,
12,
2890,
16,
27378,
768,
4672,
365,
6315,
3459,
273,
27378,
768,
309,
404,
27363,
698,
30,
1500,
273,
1262,
12,
3190,
12,
683,
78,
768,
16,
296,
86,
26112,
365,
6315,
529,
67,
... |
if self.abbrevOK: self.strMatchMethhod = str.startswith else: self.strMatchMethhod = str.__eq__ | def __init__(self, valueList = (), abbrevOK = True, ignoreCase = True, | 6e8ea343a1cae61f8badeaa66e1da18a9de46447 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6353/6e8ea343a1cae61f8badeaa66e1da18a9de46447/MatchList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
460,
682,
273,
1832,
16,
1223,
27216,
3141,
273,
1053,
16,
27681,
273,
1053,
16,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1001,
2738,
972,
12,
2890,
16,
460,
682,
273,
1832,
16,
1223,
27216,
3141,
273,
1053,
16,
27681,
273,
1053,
16,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
hasTroves = self.repos.hasTroves([x[0] for x in cloneMap.iterSourceTargetBranches()]) troveCache.getTroves([x[0] for x in hasTroves.items() if x[1]) | hasTroves = self.repos.hasTroves( [x[0] for x in cloneMap.iterSourceTargetBranches()]) troveCache.getTroves([x[0] for x in hasTroves.items() if x[1]]) | def _targetSources(self, cloneMap, cloneJob, leafMap, troveCache): hasTroves = self.repos.hasTroves([x[0] for x in cloneMap.iterSourceTargetBranches()]) troveCache.getTroves([x[0] for x in hasTroves.items() if x[1]) for sourceTup, targetBranch in cloneMap.iterSourceTargetBranches(): if hasTroves[sourceTup]: sourceTrove = troveCache.getTrove(sourceTup, withFiles=False) newVersion = leafMap.isAlreadyCloned([sourceTrove], targetBranch) if newVersion: cloneMap.target(sourceTup, newVersion) cloneJob.alreadyCloned(sourceTup) elif cloneMap.shouldClone(sourceTup): newVersion = leafMap.createSourceVersion(sourceTup, targetBranch) cloneMap.target(sourceTup, newVersion) cloneJob.target(sourceTup, newVersion) else: newVersion = leafMap.hasAncestor(sourceTup, targetBranch, self.repos) if newVersion: cloneMap.target(sourceTup, newVersion) cloneJob.alreadyCloned(sourceTup) else: # should clone was false but the source trove exists - # we could have done this clone. raise CloneError("Cannot find cloned source for %s=%s" \ % (sourceTup[0], sourceTup[1])) else: newVersion = leafMap.hasAncestor(sourceTup, targetBranch, self.repos) if newVersion: cloneMap.target(sourceTup, newVersion) cloneJob.alreadyCloned(sourceTup) else: # The source trove is not available to clone and either this is not # an uphill trove or the source is not available on the uphill label. raise CloneError("Cannot find required source %s on branch %s." \ % (sourceTup[0], targetBranch)) | 48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e/clone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3299,
8628,
12,
2890,
16,
3236,
863,
16,
3236,
2278,
16,
7839,
863,
16,
23432,
537,
1649,
4672,
711,
56,
303,
3324,
273,
365,
18,
15564,
18,
5332,
56,
303,
3324,
12,
306,
92,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3299,
8628,
12,
2890,
16,
3236,
863,
16,
3236,
2278,
16,
7839,
863,
16,
23432,
537,
1649,
4672,
711,
56,
303,
3324,
273,
365,
18,
15564,
18,
5332,
56,
303,
3324,
12,
306,
92,
63... |
if issubclass(err[0], GSTestFailure): | if isinstance(err[0], GSTestFailure): | def printErrorList(self, flavor, errors): handoff = [] for test, err in errors: if issubclass(err[0], GSTestFailure): self.stream.writeln(self.separator1) self.stream.writeln("%s: %s" % (flavor, self.getDescription(test))) self.stream.writeln(self.separator2) lines = err[1].args[0] if type(lines) == types.StringType: lines = string.split(lines, '\n') if lines[-1] == '': del lines[-1] for line in lines: self.stream.writeln(line) else: handoff.append((test, err)) if len(handoff) > 0: unittest._TextTestResult.printErrorList(self, flavor, handoff) | 6a44a7fceee244b443d004bbbc1cbe8489d0171f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/6a44a7fceee244b443d004bbbc1cbe8489d0171f/gstestutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
668,
682,
12,
2890,
16,
19496,
16,
1334,
4672,
948,
3674,
273,
5378,
364,
1842,
16,
393,
316,
1334,
30,
309,
1549,
12,
370,
63,
20,
6487,
611,
882,
395,
5247,
4672,
365,
18,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
668,
682,
12,
2890,
16,
19496,
16,
1334,
4672,
948,
3674,
273,
5378,
364,
1842,
16,
393,
316,
1334,
30,
309,
1549,
12,
370,
63,
20,
6487,
611,
882,
395,
5247,
4672,
365,
18,
32... |
p = interp.decode_bool(val) | p = interp.decode_bool(val) | def info_gamess_setitem(self, name, val, interp, error_if_name_not_known = False): #bruce 050701; extended by Mark 050704 to read and set the actual params; bruce 050704 added error_if_name_not_known """This must set the parameter in self with the given name to the value encoded by the string val (read from an mmp file from which this parameter set and its gamess jig is being read). If it doesn't recognize name or can't parse val, it should do nothing (except possibly print a message if atom_debug is set), unless error_if_name_not_known is true, in which case it should print an error message reporting a bug. (If it's too tedious to avoid exceptions in parsing val, change the caller (which already ignores those exceptions, but always prints a message calling them bugs) to classify those exceptions as not being bugs (and to only print a message when atom_debug is set). [See also the docstring of Gamess.readmmp_info_gamess_setitem, which calls this.] """ if name == 'comment': # Description/Comment self.ui.comment = val elif name == 'conv': # Density and Energy Convergence (1-4) p = interp.decode_int(val) if p is not None: self.ui.conv = p elif name == 'damp': # DAMP p = interp.decode_bool(val) if p is not None: self.ui.damp = p elif name == 'dfttyp': # DFT Functional Type p = interp.decode_int(val) if p is not None: self.ui.dfttyp = p elif name == 'diis': # DIIS p = interp.decode_bool(val) if p is not None: self.ui.diis = p elif name == 'dirscf': # DIRSCF p = interp.decode_bool(val) if p is not None: self.ui.dirscf = p elif name == 'ecm': # emc = None (0), DFT (1) or MP2 (2) p = interp.decode_int(val) if p is not None: self.ui.ecm = p elif name == 'extrap': # EXTRAP p = interp.decode_bool(val) if p is not None: self.ui.extrap = p elif name == 'gbasis': # Basis Set Id p = interp.decode_int(val) if p is not None: self.ui.gbasis = p elif name == 'gbasisname': # Basis Set Name self.ui.gbasisname = val elif name == 'gridsize': # Grid Size p = interp.decode_int(val) if p is not None: self.ui.gridsize = p elif name == 'icharg': # Charge p = interp.decode_int(val) if p is not None: self.ui.icharg = p elif name == 'iterations': # Iterations p = interp.decode_int(val) if p is not None: self.ui.iterations = p elif name == 'memory': # System Memory p = interp.decode_int(val) if p is not None: self.ui.memory = p elif name == 'mult': # Multiplicity p = interp.decode_int(val) if p is not None: self.ui.mult = p elif name == 'ncore': # Include core electrons p = interp.decode_bool(val) if p is not None: self.ui.ncore = p elif name == 'rmsdconv': # RMSD convergence (1-4) p = interp.decode_int(val) if p is not None: self.ui.rmsdconv = p elif name == 'rstrct': # RSTRCT p = interp.decode_bool(val) if p is not None: self.ui.rstrct = p elif name == 'runtyp': # RUNTYP = Energy (0), or Optimize (1) p = interp.decode_int(val) if p is not None: self.ui.runtyp = p elif name == 'scftyp': # SCFTYP = RHF (0), UHF (1), or ROHF (2) p = interp.decode_int(val) if p is not None: self.ui.scftyp = p elif name == 'shift': # SHIFT p = interp.decode_bool(val) if p is not None: self.ui.shift = p elif name == 'soscf': # SOSCF p = interp.decode_bool(val) if p is not None: self.ui.soscf = p # Unused - keeping them for examples. # Mark 050603 elif name == 'param2': self.param2 = val.split() # always legal for strings elif name == 'param3': p3 = interp.decode_int(val) # use this method for int-valued params if p3 is not None: self.param3 = p3 # otherwise it was a val we don't recognize as an int; not an error # (since the mmp file format might be extended to permit it), # but a debug message was printed if atom_debug is set. elif name == 'param4': p4 = interp.decode_bool(val) # use this method for boolean-valued params # (they can be written as 0, 1, False, True, or in a few other forms) if p4 is not None: self.param4 = p4 else: if error_if_name_not_known: #bruce 050704, only correct when this method is used internally to copy an object of this class print "error: unrecognized parameter name %r in info_gamess_setitem" % (name,) elif platform.atom_debug: print "atom_debug: fyi: info gamess with unrecognized parameter name %r (not an error)" % (name,) # this is not an error, since old code might read newer mmp files which know about more gamess params; # it's better (in general) to ignore those than for this to make it impossible to read the mmp file. # If non-debug warnings were added, that might be ok in this case since not many lines per file will trigger them. return # from info_gamess_setitem | cb18fd8e13b495ff2f5fc622ff2570903aeaa260 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/cb18fd8e13b495ff2f5fc622ff2570903aeaa260/jig_Gamess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
75,
301,
403,
67,
542,
1726,
12,
2890,
16,
508,
16,
1244,
16,
8174,
16,
555,
67,
430,
67,
529,
67,
902,
67,
2994,
273,
1083,
4672,
468,
2848,
3965,
374,
3361,
27,
1611,
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,
1123,
67,
75,
301,
403,
67,
542,
1726,
12,
2890,
16,
508,
16,
1244,
16,
8174,
16,
555,
67,
430,
67,
529,
67,
902,
67,
2994,
273,
1083,
4672,
468,
2848,
3965,
374,
3361,
27,
1611,
3... |
self.fits = [] | self.fits = fits | def __init__(self, vertices): #{{{2 """ Create a lineament from a given list of (lon,lat) points. | 5fbbfb8841a8a08c3a5afb94b372c8920b111266 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3464/5fbbfb8841a8a08c3a5afb94b372c8920b111266/lineament.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6928,
4672,
3735,
12187,
22,
3536,
1788,
279,
980,
14773,
628,
279,
864,
666,
434,
261,
9379,
16,
4801,
13,
3143,
18,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6928,
4672,
3735,
12187,
22,
3536,
1788,
279,
980,
14773,
628,
279,
864,
666,
434,
261,
9379,
16,
4801,
13,
3143,
18,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
runs = [] for x in range(repeat): start_time = timeit.default_timer() for y in range(number): import_(name) end_time = timeit.default_timer() runs.append(end_time - start_time) return min(runs) | for result in bench(name, repeat=repeat): yield result | def bench_cache(import_, repeat, number): """Measure the time it takes to pull from sys.modules.""" name = '<benchmark import>' with util.uncache(name): module = imp.new_module(name) sys.modules[name] = module runs = [] for x in range(repeat): start_time = timeit.default_timer() for y in range(number): import_(name) end_time = timeit.default_timer() runs.append(end_time - start_time) return min(runs) | 23cf5743aef2b8c2baa023ec3f7493c7e139027a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/23cf5743aef2b8c2baa023ec3f7493c7e139027a/benchmark.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22499,
67,
2493,
12,
5666,
67,
16,
7666,
16,
1300,
4672,
3536,
7197,
326,
813,
518,
5530,
358,
6892,
628,
2589,
18,
6400,
12123,
508,
273,
2368,
70,
9737,
1930,
1870,
598,
1709,
18,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22499,
67,
2493,
12,
5666,
67,
16,
7666,
16,
1300,
4672,
3536,
7197,
326,
813,
518,
5530,
358,
6892,
628,
2589,
18,
6400,
12123,
508,
273,
2368,
70,
9737,
1930,
1870,
598,
1709,
18,
55... |
open = True | use_standard_command = True | def add_clicked(self, widget): """ Add the watch to the watches repository. """ values = {} #get the standard options from a watch values['name'] = self.name.get_text() | ea1f6cd9f304528deb07e12ac26c60120a0d1a2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10818/ea1f6cd9f304528deb07e12ac26c60120a0d1a2e/add_watch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
3536,
1436,
326,
4267,
358,
326,
25081,
3352,
18,
3536,
924,
273,
2618,
468,
588,
326,
4529,
702,
628,
279,
4267,
924,
3292,
529,
3546,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7475,
329,
12,
2890,
16,
3604,
4672,
3536,
1436,
326,
4267,
358,
326,
25081,
3352,
18,
3536,
924,
273,
2618,
468,
588,
326,
4529,
702,
628,
279,
4267,
924,
3292,
529,
3546,
27... |
self.manageDefinitionTranslations(l_context_name, target_language, translation['context']) | self.manageDefinitionTranslations(l_context_name, target_language, translation['context']) | def xliff_import(self, file, add_themes_from_folders='', REQUEST=None): """ XLIFF is the XML Localization Interchange File Format designed by a group of software providers. It is specified by www.oasis-open.org """ | 6e8e8a0c91b5cfef5e5c1a63639dab81456f3a16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/6e8e8a0c91b5cfef5e5c1a63639dab81456f3a16/NyGlossary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15643,
3048,
67,
5666,
12,
2890,
16,
585,
16,
527,
67,
17328,
67,
2080,
67,
16064,
2218,
2187,
12492,
33,
7036,
4672,
3536,
1139,
2053,
2246,
353,
326,
3167,
3566,
1588,
5294,
3427,
1387... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15643,
3048,
67,
5666,
12,
2890,
16,
585,
16,
527,
67,
17328,
67,
2080,
67,
16064,
2218,
2187,
12492,
33,
7036,
4672,
3536,
1139,
2053,
2246,
353,
326,
3167,
3566,
1588,
5294,
3427,
1387... |
return 0 | return None | def get_list_info(userdesc, perms, mlist, front_page=0): members = mlist.getRegularMemberKeys() is_member = userdesc.address in members is_owner = userdesc.address in mlist.owner if (mlist.advertised and perms in ('lists', 'admin')) or is_member or is_owner or (not front_page and perms == 'admin'): is_pending = False if not is_member and (mlist.subscribe_policy > 1): is_pending = list_call_locked(is_subscription_pending, userdesc, perms, mlist, False) if is_pending is 0: return 0 host = mlist.internal_name().split(VHOST_SEP)[0].lower() details = { 'list' : mlist.real_name, 'addr' : mlist.real_name.lower() + '@' + host, 'host' : host, 'desc' : quote(mlist.description), 'info' : quote(mlist.info), 'diff' : (mlist.default_member_moderation>0) + (mlist.generic_nonmember_action>0), 'ins' : mlist.subscribe_policy > 1, 'priv' : 1-mlist.advertised, 'sub' : 2*is_member + is_pending, 'own' : is_owner, 'nbsub': len(members) } return (details, members) return None | 5f0ac25ee1e92a8344859d08bb6d706dc4d5d49d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5724/5f0ac25ee1e92a8344859d08bb6d706dc4d5d49d/lists.rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1098,
67,
1376,
12,
1355,
5569,
16,
13793,
16,
312,
1098,
16,
6641,
67,
2433,
33,
20,
4672,
4833,
565,
273,
312,
1098,
18,
588,
17974,
4419,
2396,
1435,
353,
67,
5990,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1098,
67,
1376,
12,
1355,
5569,
16,
13793,
16,
312,
1098,
16,
6641,
67,
2433,
33,
20,
4672,
4833,
565,
273,
312,
1098,
18,
588,
17974,
4419,
2396,
1435,
353,
67,
5990,
225,
... |
handler.schema = {'name': Unicode, 'url': URI, 'number': Integer, 'date': Date} handler.load_state(resource) self.assertEqual(handler.to_str(), u'"python","http://python.org","52343","2003-10-23"\n' + | handler.schema = {'name': Unicode, 'url': URI, 'number': Integer, 'date': Date} handler.load_state(resource) self.assertEqual( handler.to_str(), u'"python","http://python.org","52343","2003-10-23"\n' | def test_to_str_with_schema(self): resource = memory.File(TEST_DATA_1) handler = itools_csv.CSV() handler.columns = ['name', 'url', 'number', 'date'] handler.schema = {'name': Unicode, 'url': URI, 'number': Integer, 'date': Date} handler.load_state(resource) self.assertEqual(handler.to_str(), u'"python","http://python.org","52343","2003-10-23"\n' + u'"ruby","http://ruby-lang.org","42352","2001-03-28"') | d1c92817f2412181e68be715a2a81901cf1a83ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/d1c92817f2412181e68be715a2a81901cf1a83ed/test_itools_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
869,
67,
701,
67,
1918,
67,
4821,
12,
2890,
4672,
1058,
273,
3778,
18,
812,
12,
16961,
67,
4883,
67,
21,
13,
1838,
273,
518,
8192,
67,
6715,
18,
16570,
1435,
1838,
18,
5112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
869,
67,
701,
67,
1918,
67,
4821,
12,
2890,
4672,
1058,
273,
3778,
18,
812,
12,
16961,
67,
4883,
67,
21,
13,
1838,
273,
518,
8192,
67,
6715,
18,
16570,
1435,
1838,
18,
5112... |
logfile, 0, '') | logfile, 0, '') | def extract_tar(DEBUGON, logfile, dirl, tarfile): 'Extract the kernel source tarfile into each one of the node directories, \ if they do not exist' nodename = str(socket.gethostname()) dirlist=dirl.split(',') dirlen=len(dirlist) if DEBUGON: printlog('o2tf.extract_tar: logfile = (%s)' % \ logfile, logfile, 0, '') printlog('o2tf.extract_tar: dirlist = (%s)' % \ dirlist, logfile, 0, '') printlog('o2tf.extract_tar: tarfile = (%s)' % \ tarfile, logfile, 0, '') | 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,
2608,
67,
11718,
12,
9394,
673,
16,
15204,
16,
1577,
80,
16,
25857,
4672,
296,
4976,
326,
5536,
1084,
25857,
1368,
1517,
1245,
434,
326,
756,
6402,
16,
521,
309,
2898,
741,
486,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2608,
67,
11718,
12,
9394,
673,
16,
15204,
16,
1577,
80,
16,
25857,
4672,
296,
4976,
326,
5536,
1084,
25857,
1368,
1517,
1245,
434,
326,
756,
6402,
16,
521,
309,
2898,
741,
486,
1005,
... |
element = getattr(self, key, None) if element and shasattr(element, 'isBinary'): return element.isBinary() | field = self.getField(key) if IFileField.isImplementedBy(field): value = field.getBaseUnit(self) return value.isBinary() | def isBinary(self, key): """Return wether a field contains binary data. """ element = getattr(self, key, None) if element and shasattr(element, 'isBinary'): return element.isBinary() mimetype = self.getContentType(key) if mimetype and shasattr(mimetype, 'binary'): return mimetype.binary elif mimetype and mimetype.find('text') >= 0: return 0 return 1 | ff3424f1d0da6ffd99d4550e7691240539ec4326 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/ff3424f1d0da6ffd99d4550e7691240539ec4326/BaseObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
5905,
12,
2890,
16,
498,
4672,
3536,
990,
341,
2437,
279,
652,
1914,
3112,
501,
18,
3536,
652,
273,
365,
18,
588,
974,
12,
856,
13,
309,
467,
812,
974,
18,
291,
8644,
858,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5905,
12,
2890,
16,
498,
4672,
3536,
990,
341,
2437,
279,
652,
1914,
3112,
501,
18,
3536,
652,
273,
365,
18,
588,
974,
12,
856,
13,
309,
467,
812,
974,
18,
291,
8644,
858,
12,
... |
thumb.thumbnail((self.size, self.size), Image.ANTIALIAS) | thumb.thumbnail((size, size), Image.ANTIALIAS) | def render(self, context): # If size is not an int, then it's a Variable, so try to resolve it. if not isinstance(self.size, int): self.size = int(self.size.resolve(context)) | c9891b3d9a515f08d9352471601f75fe866cb805 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12976/c9891b3d9a515f08d9352471601f75fe866cb805/avatars.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
4672,
468,
971,
963,
353,
486,
392,
509,
16,
1508,
518,
1807,
279,
7110,
16,
1427,
775,
358,
2245,
518,
18,
309,
486,
1549,
12,
2890,
18,
1467,
16,
509,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
12,
2890,
16,
819,
4672,
468,
971,
963,
353,
486,
392,
509,
16,
1508,
518,
1807,
279,
7110,
16,
1427,
775,
358,
2245,
518,
18,
309,
486,
1549,
12,
2890,
18,
1467,
16,
509,
4672... |
class SETROP2(SETMAPMODE): | class _SETROP2(_SETMAPMODE): | def __init__(self,mode=ALTERNATE): EMR.SETMAPMODE.__init__(self,mode,last=POLYFILL_LAST) | 688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3188,
33,
1013,
6519,
1777,
4672,
7141,
54,
18,
4043,
8352,
7038,
16186,
2738,
972,
12,
2890,
16,
3188,
16,
2722,
33,
14232,
61,
29818,
67,
14378,
13,
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,
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,
3188,
33,
1013,
6519,
1777,
4672,
7141,
54,
18,
4043,
8352,
7038,
16186,
2738,
972,
12,
2890,
16,
3188,
16,
2722,
33,
14232,
61,
29818,
67,
14378,
13,
2,... |
Index '0' means the first position, '1' the second and so on. Similarly, '-1' is the last position, '-2' the second last, and so on. Using an index that does not exist on the list causes an error. The index can be either an integer or a string that can be converted to an integer. | Index '0' means the first position, '1' the second and so on. Similarly, '-1' is the last position, '-2' the second last, and so on. Using an index that does not exist on the list causes an error. The index can be either an integer or a string that can be converted to an integer. | def remove_from_list(self, L, index): """Removes and returns the value specified with an index from L. Index '0' means the first position, '1' the second and so on. Similarly, '-1' is the last position, '-2' the second last, and so on. Using an index that does not exist on the list causes an error. The index can be either an integer or a string that can be converted to an integer. Example: | ${x} = | Remove From List | ${L2} | 0 | => ${x} == 'a' ${L2} == ['b'] """ try: return L.pop(self._index_to_int(index)) except IndexError: self._index_error(L, index) | 9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db/Collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
2080,
67,
1098,
12,
2890,
16,
511,
16,
770,
4672,
3536,
6220,
471,
1135,
326,
460,
1269,
598,
392,
770,
628,
511,
18,
225,
3340,
296,
20,
11,
4696,
326,
1122,
1754,
16,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
67,
2080,
67,
1098,
12,
2890,
16,
511,
16,
770,
4672,
3536,
6220,
471,
1135,
326,
460,
1269,
598,
392,
770,
628,
511,
18,
225,
3340,
296,
20,
11,
4696,
326,
1122,
1754,
16,
296... |
url="http://home.gna.org/gaupol", | url="http://home.gna.org/gaupol/", | def run(self): | 2cd9f9009ff99196d18347546aa8f0b027a639cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12852/2cd9f9009ff99196d18347546aa8f0b027a639cb/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
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,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
captcha = self.ocr.get_captcha(captcha_image.name) os.remove(captcha_image.name) | try: captcha = self.ocr.get_captcha(captcha_image.name) os.remove(captcha_image.name) except AttributeError: captcha = self.ocr.get_captcha(captcha_image_name) os.remove(captcha_image_name) | def download_html(self): if self.config['premium']: post_vars = {"act": "login", "location": "service.php", "dieseid": "", "user": self.config['username'], "pass": self.config['password'], "login":"Log+me+in", "folder_autologin":"1"} self.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) url = self.parent.url self.html[0] = self.load(url, cookies=True) if not self.config['premium']: #captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name | fa0ff9999de13fe05b0ba671c9ee87b3cded7cda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/fa0ff9999de13fe05b0ba671c9ee87b3cded7cda/ShareonlineBiz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
2620,
12,
2890,
4672,
309,
365,
18,
1425,
3292,
1484,
81,
5077,
3546,
30,
1603,
67,
4699,
273,
12528,
621,
6877,
315,
5819,
3113,
315,
3562,
6877,
315,
3278,
18,
2684,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4224,
67,
2620,
12,
2890,
4672,
309,
365,
18,
1425,
3292,
1484,
81,
5077,
3546,
30,
1603,
67,
4699,
273,
12528,
621,
6877,
315,
5819,
3113,
315,
3562,
6877,
315,
3278,
18,
2684,
3113,
... |
raise NotImplementedError | raise NotImplementedError | def config_to_view(self): """Make the view reflect the internal configuration information. | 9c8307aa7ce1ae4cab8f3771902bbbb04d7b172b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/9c8307aa7ce1ae4cab8f3771902bbbb04d7b172b/moduleBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
67,
869,
67,
1945,
12,
2890,
4672,
3536,
6464,
326,
1476,
3037,
326,
2713,
1664,
1779,
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,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
67,
869,
67,
1945,
12,
2890,
4672,
3536,
6464,
326,
1476,
3037,
326,
2713,
1664,
1779,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
'outgoing', 'push', 'remove', 'rename', 'rollback', | 'log', 'outgoing', 'push', 'remove', 'rename', 'rollback', 'tip', | def kwbailout(): '''Obtains command via simplified cmdline parsing, returns True if keyword expansion not needed.''' nokwcommands = ('add', 'addremove', 'bundle', 'clone', 'copy', 'export', 'grep', 'identify', 'incoming', 'init', 'outgoing', 'push', 'remove', 'rename', 'rollback', 'convert') args = fancyopts.fancyopts(sys.argv[1:], commands.globalopts, {}) if args: aliases, i = cmdutil.findcmd(ui, args[0], commands.table) return aliases[0] in nokwcommands | 9d94df5e03c2d9c63312e5a2a43a668bc5a2b3e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/9d94df5e03c2d9c63312e5a2a43a668bc5a2b3e8/keyword.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5323,
70,
671,
659,
13332,
9163,
19351,
1296,
3970,
20482,
22877,
5811,
16,
1135,
1053,
309,
4932,
17965,
486,
3577,
1093,
6309,
290,
601,
91,
7847,
273,
7707,
1289,
2187,
296,
1289,
4479,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5323,
70,
671,
659,
13332,
9163,
19351,
1296,
3970,
20482,
22877,
5811,
16,
1135,
1053,
309,
4932,
17965,
486,
3577,
1093,
6309,
290,
601,
91,
7847,
273,
7707,
1289,
2187,
296,
1289,
4479,... |
try: smtp = smtplib.SMTP(self.db.config.MAILHOST) smtp.sendmail(self.db.config.ADMIN_EMAIL, [to], message.getvalue()) except socket.error, value: self.error_message.append("Error: couldn't send email: " "mailhost %s"%value) return 0 except smtplib.SMTPException, value: self.error_message.append("Error: couldn't send email: %s"%value) | if SENDMAILDEBUG: open(SENDMAILDEBUG, 'a').write('FROM: %s\nTO: %s\n%s\n'%( self.db.config.ADMIN_EMAIL, ', '.join(to),message.getvalue())) else: try: smtp = smtplib.SMTP(self.db.config.MAILHOST) smtp.sendmail(self.db.config.ADMIN_EMAIL, [to], message.getvalue()) except socket.error, value: self.error_message.append("Error: couldn't send email: " "mailhost %s"%value) return 0 except smtplib.SMTPException, msg: self.error_message.append("Error: couldn't send email: %s"%msg) | def sendEmail(self, to, subject, content): # send email to the user's email address message = StringIO.StringIO() writer = MimeWriter.MimeWriter(message) tracker_name = self.db.config.TRACKER_NAME writer.addheader('Subject', encode_header(subject)) writer.addheader('To', to) writer.addheader('From', roundupdb.straddr((tracker_name, self.db.config.ADMIN_EMAIL))) writer.addheader('Date', time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())) # add a uniquely Roundup header to help filtering writer.addheader('X-Roundup-Name', tracker_name) # avoid email loops writer.addheader('X-Roundup-Loop', 'hello') writer.addheader('Content-Transfer-Encoding', 'quoted-printable') body = writer.startbody('text/plain; charset=utf-8') | 329d912a16b2a6279a615d80e1d1bd3811cb049a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/329d912a16b2a6279a615d80e1d1bd3811cb049a/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4134,
12,
2890,
16,
358,
16,
3221,
16,
913,
4672,
468,
1366,
2699,
358,
326,
729,
1807,
2699,
1758,
883,
273,
15777,
18,
780,
4294,
1435,
2633,
273,
22059,
2289,
18,
13320,
2289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
4134,
12,
2890,
16,
358,
16,
3221,
16,
913,
4672,
468,
1366,
2699,
358,
326,
729,
1807,
2699,
1758,
883,
273,
15777,
18,
780,
4294,
1435,
2633,
273,
22059,
2289,
18,
13320,
2289,
... |
('', ''))[data_type is 'thousands_sep'] | ('', ''))[data_type == 'thousands_sep'] | def numeric_tester(self, calc_type, calc_value, data_type, used_locale): """Compare calculation against known value, if available""" try: set_locale = setlocale(LC_NUMERIC) except Error: set_locale = "<not able to determine>" known_value = known_numerics.get(used_locale, ('', ''))[data_type is 'thousands_sep'] if known_value and calc_value: self.assertEquals(calc_value, known_value, self.lc_numeric_err_msg % ( calc_value, known_value, calc_type, data_type, set_locale, used_locale)) | db1fbc8209014aec7aa7aa7bc9802c12925872f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/db1fbc8209014aec7aa7aa7bc9802c12925872f4/test__locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6389,
67,
1078,
387,
12,
2890,
16,
7029,
67,
723,
16,
7029,
67,
1132,
16,
501,
67,
723,
16,
1399,
67,
6339,
4672,
3536,
8583,
11096,
5314,
4846,
460,
16,
309,
2319,
8395,
775,
30,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6389,
67,
1078,
387,
12,
2890,
16,
7029,
67,
723,
16,
7029,
67,
1132,
16,
501,
67,
723,
16,
1399,
67,
6339,
4672,
3536,
8583,
11096,
5314,
4846,
460,
16,
309,
2319,
8395,
775,
30,
44... |
self.legendText1.setText(str(lo)) self.legendText2.setText(str(hi)) self.legendText1.show() self.legendText2.show() else: self.legendText1.hide() self.legendText2.hide() | else: | def drawDistanceMap(self): if not self.matrix: return | 9dec2648a439fbcedb4a6e19f89488c157b33964 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9dec2648a439fbcedb4a6e19f89488c157b33964/OWDistanceMap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
7200,
863,
12,
2890,
4672,
309,
486,
365,
18,
5667,
30,
327,
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,
3724,
7200,
863,
12,
2890,
4672,
309,
486,
365,
18,
5667,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
except AttrinuteError: | except AttributeError: | def do_mouseDown(self, event): (what, message, when, where, modifiers) = event partcode, window = FindWindow(where) if partname.has_key(partcode): name = "do_" + partname[partcode] else: name = "do_%d" % partcode try: handler = getattr(self, name) except AttrinuteError: handler = self.do_unknownpartcode handler(partcode, window, event) | 62092368395e2928a1a1027a33b6cb9078768e6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/62092368395e2928a1a1027a33b6cb9078768e6f/FrameWork.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
11697,
4164,
12,
2890,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
1087,
710,
16,
2742,
273,
4163,
3829,
12,
6051,
13,
309,
1087,
529,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
11697,
4164,
12,
2890,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
1087,
710,
16,
2742,
273,
4163,
3829,
12,
6051,
13,
309,
1087,
529,
1... |
self.index += 1 | self.index += 1 | def nextBean(self): if self.index <= 0: self.index = 0 if not self.current_list_model: return None if FConfiguration().play_looping == const.LOPPING_SINGLE: return self.current_list_model.getBeenByPosition(self.index) if FConfiguration().play_ordering == const.ORDER_RANDOM: return self.current_list_model.get_random_bean() self.index += 1 if self.index >= self.current_list_model.get_size(): self.index = 0 if FConfiguration().play_looping == const.LOPPING_DONT_LOOP: self.index = self.current_list_model.get_size() return None return self.current_list_model.getBeenByPosition(self.index) | 3783d4b4b6f306c2d34886327fe7137d2b1de60e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/3783d4b4b6f306c2d34886327fe7137d2b1de60e/online_controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
3381,
12,
2890,
4672,
309,
365,
18,
1615,
1648,
374,
30,
365,
18,
1615,
273,
374,
225,
309,
486,
365,
18,
2972,
67,
1098,
67,
2284,
30,
327,
599,
225,
309,
478,
1750,
7675,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1024,
3381,
12,
2890,
4672,
309,
365,
18,
1615,
1648,
374,
30,
365,
18,
1615,
273,
374,
225,
309,
486,
365,
18,
2972,
67,
1098,
67,
2284,
30,
327,
599,
225,
309,
478,
1750,
7675,
160... |
'relation_field': f._type=='one2many' and f._fields_id or '', | 'relation_field': (f._type=='one2many' and isinstance(f,fields.one2many)) and f._fields_id or '', | def _field_create(self, cr, context={}): cr.execute("SELECT id FROM ir_model WHERE model=%s", (self._name,)) if not cr.rowcount: cr.execute('SELECT nextval(%s)', ('ir_model_id_seq',)) model_id = cr.fetchone()[0] cr.execute("INSERT INTO ir_model (id,model, name, info,state) VALUES (%s, %s, %s, %s, %s)", (model_id, self._name, self._description, self.__doc__, 'base')) else: model_id = cr.fetchone()[0] if 'module' in context: name_id = 'model_'+self._name.replace('.','_') cr.execute('select * from ir_model_data where name=%s and res_id=%s', (name_id,model_id)) if not cr.rowcount: cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module,model,res_id) VALUES (%s, now(), now(), %s, %s, %s)", \ (name_id, context['module'], 'ir.model', model_id) ) | 372673aeba35ba4df17501f69b8b8522f083a4cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/372673aeba35ba4df17501f69b8b8522f083a4cf/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1518,
67,
2640,
12,
2890,
16,
4422,
16,
819,
12938,
4672,
4422,
18,
8837,
2932,
4803,
612,
4571,
9482,
67,
2284,
4852,
938,
5095,
87,
3113,
261,
2890,
6315,
529,
16,
3719,
309,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1518,
67,
2640,
12,
2890,
16,
4422,
16,
819,
12938,
4672,
4422,
18,
8837,
2932,
4803,
612,
4571,
9482,
67,
2284,
4852,
938,
5095,
87,
3113,
261,
2890,
6315,
529,
16,
3719,
309,
48... |
raise sr.ScriptError("Focus std. dev. too large: %.0f > %.0f" % (focSigma, maxFocSigma)) | raise sr.ScriptError("Focus std. dev. too large: %0.0f > %0.0f" % (focSigma, maxFocSigma)) | def waitFocusSweep(self): """Conduct a focus sweep. Sets sr.value to True if successful. """ sr = self.sr | 5ce90ef6a58e18ae844d9c09d0aab251fd7a91ab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6354/5ce90ef6a58e18ae844d9c09d0aab251fd7a91ab/BaseFocusScript.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
9233,
55,
25236,
12,
2890,
4672,
3536,
442,
1828,
279,
7155,
17462,
18,
225,
11511,
9133,
18,
1132,
358,
1053,
309,
6873,
18,
3536,
9133,
273,
365,
18,
11254,
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,
2529,
9233,
55,
25236,
12,
2890,
4672,
3536,
442,
1828,
279,
7155,
17462,
18,
225,
11511,
9133,
18,
1132,
358,
1053,
309,
6873,
18,
3536,
9133,
273,
365,
18,
11254,
2,
-100,
-100,
-100,
... |
def run(self, setting, parent, model, list_label, layout, group="group",save_button=False, *args, **kargs): | def run(self, setting, parent, model, list_label, layout, group="item", save_button=False, *args, **kargs): | def run(self, setting, parent, model, list_label, layout, group="group",save_button=False, *args, **kargs): layout.elm_obj.hide() self.parent = parent self.setting = setting self.edje_file = os.path.join(os.path.dirname(__file__), 'settings.edj') self.window = gui.elm_list_subwindow(parent, self.edje_file, "main", "list") self.edje_obj = self.window.main_layout self.edje_obj.Edje.signal_emit("sublist_mode","*") if save_button: self.edje_obj.Edje.signal_emit("save_button","*") self.ItemList = model self.cb_list = tichy.List() #for i in tichy.Setting.groups[group]: #o = tichy.Setting.groups[group][i] #self.settings.append(o) def comp(m1, m2): if m1.name == None or m1.name == "": return cmp(m2, m1) else: return cmp(m2.name, m1.name) item_group = group or "group" self.list_label = list_label self.item_list = gui.elm_list(self.ItemList, self.window, self.edje_file, item_group, list_label, comp) for i in self.ItemList: if hasattr(i, 'connect'): oid = i.connect('updated', self.item_list._redraw_view) self.cb_list.append([i,oid]) self.item_list.add_callback("*", "sublist", self.action) self.item_list.add_callback("pressed", "decrease", self.decrease) self.item_list.add_callback("pressed", "increase", self.increase) self.edje_obj.Edje.signal_callback_add("pressed", "save", self.save) yield tichy.WaitFirst(tichy.Wait(self.window, 'delete_request'),tichy.Wait(self.edje_obj, 'back'),tichy.Wait(self.ItemList, 'save')) for i in self.cb_list: i[0].disconnect(i[1]) | eea5a14c6eab944cd70ea0a93376a1fdd816d5d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/eea5a14c6eab944cd70ea0a93376a1fdd816d5d0/settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
3637,
16,
982,
16,
938,
16,
666,
67,
1925,
16,
3511,
16,
1041,
1546,
1726,
3113,
1923,
67,
5391,
33,
8381,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
225,
3511,
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,
1086,
12,
2890,
16,
3637,
16,
982,
16,
938,
16,
666,
67,
1925,
16,
3511,
16,
1041,
1546,
1726,
3113,
1923,
67,
5391,
33,
8381,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
225,
3511,
18,... |
gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) | gateGump.addBackground( 9200, 380, 280 ) gateGump.addText( 5, 10, "Pick your destination:" ) gateGump.addButton( 10, 210, 0xFA5, 0xFA7, 1 ) gateGump.addText( 45, 210, "OKAY", 0 ) gateGump.addButton( 10, 235, 0xFA5, 0xFA7, 0 ) gateGump.addText( 45, 235, "CANCEL" ) | def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel", 12 ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # gates gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 5 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 6 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 7 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.addButton( 150, 135, 0x837, 0x838, 8 ) gateGump.addText( 170, 150, "Trinsic" ) gateGump.addButton( 150, 155, 0x837, 0x838, 9 ) gateGump.addText( 170, 170, "Vesper" ) gateGump.addButton( 150, 175, 0x837, 0x838, 10 ) gateGump.addText( 170, 190, "Yew" ) gateGump.addButton( 150, 195, 0x837, 0x838, 11 ) gateGump.addText( 170, 210, "Jhelom" ) gateGump.addButton( 150, 215, 0x837, 0x838, 12 ) # felucca gateGump.startPage( 2 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel" ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca", 12 ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # gates gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 13 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 14 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 15 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.addButton( 150, 135, 0x837, 0x838, 16 ) gateGump.addText( 170, 150, "Trinsic" ) gateGump.addButton( 150, 155, 0x837, 0x838, 17 ) gateGump.addText( 170, 170, "Vesper" ) gateGump.addButton( 150, 175, 0x837, 0x838, 18 ) gateGump.addText( 170, 190, "Yew" ) gateGump.addButton( 150, 195, 0x837, 0x838, 19 ) gateGump.addText( 170, 210, "Jhelom" ) gateGump.addButton( 150, 215, 0x837, 0x838, 20 ) # ilshenar gateGump.startPage( 3 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel" ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar", 12 ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # #gates gateGump.addText( 170, 70, "Compassion" ) gateGump.addButton( 150, 75, 0x837, 0x838, 21 ) gateGump.addText( 170, 90, "Honesty" ) gateGump.addButton( 150, 95, 0x837, 0x838, 22 ) gateGump.addText( 170, 110, "Honor" ) gateGump.addButton( 150, 115, 0x837, 0x838, 23 ) gateGump.addText( 170, 130, "Humility" ) gateGump.addButton( 150, 135, 0x837, 0x838, 24 ) gateGump.addText( 170, 150, "Justice" ) gateGump.addButton( 150, 155, 0x837, 0x838, 25 ) gateGump.addText( 170, 170, "Sacrifice" ) gateGump.addButton( 150, 175, 0x837, 0x838, 26 ) gateGump.addText( 170, 190, "Spirituality" ) gateGump.addButton( 150, 195, 0x837, 0x838, 27 ) gateGump.addText( 170, 210, "Valor" ) gateGump.addButton( 150, 215, 0x837, 0x838, 28 ) gateGump.addText( 170, 230, "Chaos" ) gateGump.addButton( 150, 235, 0x837, 0x838, 29 ) # set callback function and its arguments gateGump.setCallback( "moongate.gateCallback" ) # send it gateGump.setArgs( [ item ] ) gateGump.setType( 0x87654321 ) gateGump.send( char ) | 078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
43,
2801,
12,
1149,
16,
761,
262,
30,
1149,
18,
87,
465,
536,
74,
386,
12,
374,
92,
8204,
262,
468,
30601,
2061,
16,
12457,
841,
314,
2801,
12611,
43,
2801,
273,
276,
43,
2801,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
43,
2801,
12,
1149,
16,
761,
262,
30,
1149,
18,
87,
465,
536,
74,
386,
12,
374,
92,
8204,
262,
468,
30601,
2061,
16,
12457,
841,
314,
2801,
12611,
43,
2801,
273,
276,
43,
2801,... |
self.pymw_master = pymw.PyMW_Master(interface=self.pymw_interface) | self.pymw_master = pymw.PyMW_Master(interface=self.pymw_interface()) | def setUp(self): if hasattr(self, "pymw_interface"): self.pymw_master = pymw.PyMW_Master(interface=self.pymw_interface) else: self.pymw_master = pymw.PyMW_Master() self._kill_timer = threading.Timer(10, killAll) self._kill_timer.start() | c642f9dafd96659e8df31f4905d45bd50903cd2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8868/c642f9dafd96659e8df31f4905d45bd50903cd2d/test_cases.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
309,
3859,
12,
2890,
16,
315,
2074,
81,
91,
67,
5831,
6,
4672,
365,
18,
2074,
81,
91,
67,
7525,
273,
2395,
81,
91,
18,
9413,
49,
59,
67,
7786,
12,
5831,
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,
24292,
12,
2890,
4672,
309,
3859,
12,
2890,
16,
315,
2074,
81,
91,
67,
5831,
6,
4672,
365,
18,
2074,
81,
91,
67,
7525,
273,
2395,
81,
91,
18,
9413,
49,
59,
67,
7786,
12,
5831,
33,
... |
print dir(tas) | print fixdir(dir(tas)) | def runtest(hier, code): root = tempfile.mktemp() mkhier(root, hier) savepath = sys.path[:] codefile = tempfile.mktemp() f = open(codefile, "w") f.write(code) f.close() try: sys.path.insert(0, root) if verbose: print "sys.path =", sys.path try: execfile(codefile, globals(), {}) except: traceback.print_exc(file=sys.stdout) finally: sys.path[:] = savepath try: cleanout(root) except (os.error, IOError): pass os.remove(codefile) | 7216ad24203ca15a6568ea671fc761cae6c56709 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7216ad24203ca15a6568ea671fc761cae6c56709/test_pkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
76,
2453,
16,
981,
4672,
1365,
273,
13275,
18,
24816,
5814,
1435,
5028,
76,
2453,
12,
3085,
16,
366,
2453,
13,
1923,
803,
273,
2589,
18,
803,
10531,
65,
981,
768,
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,
1086,
3813,
12,
76,
2453,
16,
981,
4672,
1365,
273,
13275,
18,
24816,
5814,
1435,
5028,
76,
2453,
12,
3085,
16,
366,
2453,
13,
1923,
803,
273,
2589,
18,
803,
10531,
65,
981,
768,
273,
... |
self.vboxlayout_grpbox2.setMargin(0) self.vboxlayout_grpbox2.setSpacing(6) self.vboxlayout_grpbox2.setObjectName("vboxlayout_grpbox2") | self.vboxlayout_grpbox2.setMargin(pmGrpBoxVboxLayoutMargin) self.vboxlayout_grpbox2.setSpacing(pmGrpBoxVboxLayoutSpacing) | def ui_extrudeDirections_GroupBox(self, ExtrudePropertyManager): #Start extrudeDirection groupbox self.extrudeDirection_groupBox = QtGui.QGroupBox(ExtrudePropertyManager) self.extrudeDirection_groupBox.setObjectName("extrudeDirection_groupBox") self.extrudeDirection_groupBox.setAutoFillBackground(True) palette = ExtrudePropertyManager.getGroupBoxPalette() self.extrudeDirection_groupBox.setPalette(palette) styleSheet = ExtrudePropertyManager.getGroupBoxStyleSheet() self.extrudeDirection_groupBox.setStyleSheet(styleSheet) self.vboxlayout_grpbox2 = QtGui.QVBoxLayout(self.extrudeDirection_groupBox) self.vboxlayout_grpbox2.setMargin(0) self.vboxlayout_grpbox2.setSpacing(6) self.vboxlayout_grpbox2.setObjectName("vboxlayout_grpbox2") self.extrudeDirection_groupBoxButton = ExtrudePropertyManager.getGroupBoxTitleButton( "Extrude Direction", self.extrudeDirection_groupBox) self.vboxlayout_grpbox2.addWidget(self.extrudeDirection_groupBoxButton) # End extrudeDirection Groupbox self.vboxlayout.addWidget(self.extrudeDirection_groupBox) spacer_extrudedirection_grpbx = QtGui.QSpacerItem(10,10,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.vboxlayout.addItem(spacer_extrudedirection_grpbx) #Hide extrude direction group box until it is implemented - ninad070411 self.extrudeDirection_groupBox.hide() | 4d6688fab9207bfdb4475086a94fc8e9cfef58f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/4d6688fab9207bfdb4475086a94fc8e9cfef58f0/Ui_ExtrudePropertyManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5915,
67,
14523,
1317,
8212,
87,
67,
1114,
3514,
12,
2890,
16,
1312,
313,
1317,
1396,
1318,
4672,
468,
1685,
7582,
1317,
8212,
1041,
2147,
365,
18,
14523,
1317,
8212,
67,
1655,
3514,
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,
5915,
67,
14523,
1317,
8212,
87,
67,
1114,
3514,
12,
2890,
16,
1312,
313,
1317,
1396,
1318,
4672,
468,
1685,
7582,
1317,
8212,
1041,
2147,
365,
18,
14523,
1317,
8212,
67,
1655,
3514,
273... |
return ([0.8,0.1,0.0]) | return ([1.0,0.9,0.0]) | def getBaseColor(self, base): """ Returns a color according to DNA base type. """ if base=="G": return ([0.8,0.5,0.0]) elif base=="C": return ([0.8,0.1,0.0]) if base=="A": return ([0.2,0.8,0.4]) elif base=="T": return ([0.0,0.6,0.8]) else: return ([0.5,0.5,0.5]) | cbc143d808cf827d03bc69ee526e2fca8459d46d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/cbc143d808cf827d03bc69ee526e2fca8459d46d/DnaCylinderChunks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8297,
2957,
12,
2890,
16,
1026,
4672,
3536,
2860,
279,
2036,
4888,
358,
463,
11277,
1026,
618,
18,
3536,
309,
1026,
31713,
43,
6877,
327,
23265,
20,
18,
28,
16,
20,
18,
25,
16,
20,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8297,
2957,
12,
2890,
16,
1026,
4672,
3536,
2860,
279,
2036,
4888,
358,
463,
11277,
1026,
618,
18,
3536,
309,
1026,
31713,
43,
6877,
327,
23265,
20,
18,
28,
16,
20,
18,
25,
16,
20,
1... |
while True: recvd = sender.wait() sender.reset() (evt, func, args, kw) = recvd self._safe_apply(evt, func, args, kw) api.get_hub().runloop.cancel_timers(api.getcurrent()) self.put(sender) | try: while True: recvd = sender.wait() sender = event() (evt, func, args, kw) = recvd self._safe_apply(evt, func, args, kw) api.get_hub().runloop.cancel_timers(api.getcurrent()) self.put(sender) finally: self.put(self.create()) | def _main_loop(self, sender): """ Private, infinite loop run by a pooled coroutine. """ while True: recvd = sender.wait() sender.reset() (evt, func, args, kw) = recvd self._safe_apply(evt, func, args, kw) api.get_hub().runloop.cancel_timers(api.getcurrent()) self.put(sender) | c76c82afe3e89e6b2e5ff427939de7f069f61f10 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/c76c82afe3e89e6b2e5ff427939de7f069f61f10/coros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
67,
6498,
12,
2890,
16,
5793,
4672,
3536,
8726,
16,
14853,
2798,
1086,
635,
279,
25007,
21857,
18,
3536,
775,
30,
1323,
1053,
30,
10665,
72,
273,
5793,
18,
7048,
1435,
5793,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5254,
67,
6498,
12,
2890,
16,
5793,
4672,
3536,
8726,
16,
14853,
2798,
1086,
635,
279,
25007,
21857,
18,
3536,
775,
30,
1323,
1053,
30,
10665,
72,
273,
5793,
18,
7048,
1435,
5793,
... |
def exportAttributes(self, outfile, level, namespace_='', name_='ContinuousChar'): | def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ContinuousChar'): super(ContinuousChar, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ContinuousChar') | def exportAttributes(self, outfile, level, namespace_='', name_='ContinuousChar'): outfile.write(' states=%s' % (self.gds_format_string(quote_attrib(self.states).encode(ExternalEncoding), input_name='states'), )) outfile.write(' tokens=%s' % (quote_attrib(self.tokens), )) outfile.write(' codon=%s' % (quote_attrib(self.codon), )) | 10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/10f2a4b3101435822c472af9b202a5a0bb496366/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
2498,
12,
2890,
16,
8756,
16,
1801,
16,
1818,
67,
11005,
16,
1981,
67,
2218,
2187,
508,
67,
2218,
26509,
2156,
11,
4672,
2240,
12,
26509,
2156,
16,
365,
2934,
6530,
2498,
12,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3359,
2498,
12,
2890,
16,
8756,
16,
1801,
16,
1818,
67,
11005,
16,
1981,
67,
2218,
2187,
508,
67,
2218,
26509,
2156,
11,
4672,
2240,
12,
26509,
2156,
16,
365,
2934,
6530,
2498,
12,
260... |
def recv (self, buffer_size): try: data = self.socket.recv (buffer_size) | def recv(self, buffer_size): try: data = self.socket.recv(buffer_size) | def recv (self, buffer_size): try: data = self.socket.recv (buffer_size) if not data: # a closed connection is indicated by signaling # a read condition, and having recv() return 0. self.handle_close() return '' else: return data except socket.error, why: # winsock sometimes throws ENOTCONN if why[0] in [ECONNRESET, ENOTCONN, ESHUTDOWN]: self.handle_close() return '' else: raise socket.error, why | d560ace3a76d1fa162fa40ec90a158d4d3540036 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d560ace3a76d1fa162fa40ec90a158d4d3540036/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
1613,
67,
1467,
4672,
775,
30,
501,
273,
365,
18,
7814,
18,
18334,
12,
4106,
67,
1467,
13,
309,
486,
501,
30,
468,
279,
4375,
1459,
353,
17710,
635,
4277,
310,
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,
10665,
12,
2890,
16,
1613,
67,
1467,
4672,
775,
30,
501,
273,
365,
18,
7814,
18,
18334,
12,
4106,
67,
1467,
13,
309,
486,
501,
30,
468,
279,
4375,
1459,
353,
17710,
635,
4277,
310,
4... |
rect = GUI.GUIRect(227, 165, 35, 14) | rect = GUI.GUIRect(227, 165, 35, 14, "pixel", (320,200)) | def __init__(self, room_start, room_exit_to, enable_missions, enable_finances, enable_manifest, enable_load, enable_save): # Quine computer is made up of several "rooms" aka screens # the room_start show the user's location # this is made a lot more complex because of the need to update the cargo manifest guiroom = GUI.GUIRoom(room_start) self.guiroom = guiroom | 4edbbe64222e335e1967196d8f2b25e4c65003b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2883/4edbbe64222e335e1967196d8f2b25e4c65003b5/computer_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7725,
67,
1937,
16,
7725,
67,
8593,
67,
869,
16,
4237,
67,
7300,
16,
4237,
67,
926,
6872,
16,
4237,
67,
14357,
16,
4237,
67,
945,
16,
4237,
67,
5688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7725,
67,
1937,
16,
7725,
67,
8593,
67,
869,
16,
4237,
67,
7300,
16,
4237,
67,
926,
6872,
16,
4237,
67,
14357,
16,
4237,
67,
945,
16,
4237,
67,
5688,
... |
utils.enforce_schema(user, self.profileSchema) | enforce_schema(userInfo.user, self.profileSchema) | def create_user(self, fields): assert type(fields) == dict assert 'toAddr' in fields assert fields['toAddr'] email = fields['toAddr'].strip() user = utils.create_user_from_email(self.context, email) userInfo = IGSUserInfo(user) # Add profile attributes utils.enforce_schema(user, self.profileSchema) changed = form.applyChanges(user, self.profileFields, fields) # TODO: fix #utils.send_add_user_notification(user, self.get_admin(), # self.groupInfo, u'') return userInfo | 0e43aed24390bde68ec7f192c8dd09716848e90f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6252/0e43aed24390bde68ec7f192c8dd09716848e90f/create_users_from_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1355,
12,
2890,
16,
1466,
4672,
1815,
618,
12,
2821,
13,
422,
2065,
1815,
296,
869,
3178,
11,
316,
1466,
1815,
1466,
3292,
869,
3178,
3546,
225,
2699,
273,
1466,
3292,
869,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
1355,
12,
2890,
16,
1466,
4672,
1815,
618,
12,
2821,
13,
422,
2065,
1815,
296,
869,
3178,
11,
316,
1466,
1815,
1466,
3292,
869,
3178,
3546,
225,
2699,
273,
1466,
3292,
869,
31... |
ckey.setRenderHints(QwtPlotItem.RenderAntialiased, self.useAntialiasing) | ckey.setRenderHint(QwtPlotItem.RenderAntialiased, self.useAntialiasing) | def refreshPureVisibleOutcomes(self): if self.dataHasDiscreteClass: return keys=self.hdata.keys() if self.variableContinuous: keys.sort() self.clear() self.tips.removeAll() cn=0 for key in keys: ckey = PolygonCurve(pen=QPen(Qt.black), brush=QBrush(Qt.gray)) ckey.attach(self) ckey.setRenderHints(QwtPlotItem.RenderAntialiased, self.useAntialiasing) if self.variableContinuous: ckey.setData([key, key + self.subIntervalStep, key + self.subIntervalStep, key],[0, 0, self.hdata[key], self.hdata[key]]) ff="%."+str(self.data.domain[self.attributeName].numberOfDecimals+1)+"f" text = "N(%s in ("+ff+","+ff+"])=<b>%i</b>" text = text%(str(self.attributeName), key, key+self.subIntervalStep, self.hdata[key]) self.tips.addToolTip(key+self.subIntervalStep/2.0, self.hdata[key]/2.0, text, self.subIntervalStep/2.0, self.hdata[key]/2.0) else: tmpx = cn - (self.barSize/2.0)/100.0 tmpx2 = cn + (self.barSize/2.0)/100.0 ckey.setData([tmpx, tmpx2, tmpx2, tmpx], [0, 0, self.hdata[key], self.hdata[key]]) text = "N(%s=%s)=<b>%i</b>"%(str(self.attributeName), str(key), self.hdata[key]) self.tips.addToolTip(cn, self.hdata[key]/2.0, text, (self.barSize/2.0)/100.0, self.hdata[key]/2.0) cn+=1 | c7b4900ef3c3e65d64804290ac4fa2729bf93793 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/c7b4900ef3c3e65d64804290ac4fa2729bf93793/OWDistributions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
13645,
6207,
1182,
10127,
12,
2890,
4672,
309,
365,
18,
892,
5582,
1669,
6883,
797,
30,
327,
1311,
33,
2890,
18,
76,
892,
18,
2452,
1435,
309,
365,
18,
6105,
26509,
30,
1311,
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,
4460,
13645,
6207,
1182,
10127,
12,
2890,
4672,
309,
365,
18,
892,
5582,
1669,
6883,
797,
30,
327,
1311,
33,
2890,
18,
76,
892,
18,
2452,
1435,
309,
365,
18,
6105,
26509,
30,
1311,
18,... |
start = True | def analyse(listing): """Analyse the supplied yaYUL listing file, and return an address map, ordered by core address. """ page = 0 linenum = 0 start = True pagenum = 0 blocks = [] for line in open(listing): linenum += 1 elems = line.split() if len(elems) > 0: if not line.startswith(' '): if elems[0][0].isdigit(): if len(elems) > 1: if elems[1].startswith('$'): module = elems[1][1:].split('.')[0] if "## Page" in line and "scans" not in line: pagenum = line.split()[3] if pagenum.isdigit(): pagenum = int(pagenum) else: print >>sys.stderr,"%s: line %d, invalid page number \"%s\"" % (sfile, linenum, pagenum) if len(elems) > 2: if elems[2] == "COUNT*": address = elems[1] if ',' in address: bank = int(address.split(',')[0], 8) offset = int(address.split(',')[1], 8) else: bank = int(address, 8) / 02000 offset = int(address, 8) - 02000 if offset >= 04000: offset -= 02000 newbank = bank if bank < 4: newbank = bank ^2 coreaddr = (newbank * 02000) + (offset - 02000) blocks.append(CoreBlock(coreaddr, address, bank, offset, pagenum, module)) blocks.sort() return(blocks) | f9c99c7d946641be80a91e2e9c1cc614f6c3493a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/f9c99c7d946641be80a91e2e9c1cc614f6c3493a/listing_analyser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31087,
12,
21228,
4672,
3536,
979,
3450,
307,
326,
4580,
27137,
61,
1506,
11591,
585,
16,
471,
327,
392,
1758,
852,
16,
5901,
635,
2922,
1758,
18,
3536,
225,
1363,
273,
374,
4739,
7924,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31087,
12,
21228,
4672,
3536,
979,
3450,
307,
326,
4580,
27137,
61,
1506,
11591,
585,
16,
471,
327,
392,
1758,
852,
16,
5901,
635,
2922,
1758,
18,
3536,
225,
1363,
273,
374,
4739,
7924,
... | |
res.append([name, comm]) return res | author = patch_node.getAttribute("author") date = patch_node.getAttribute("date") yield author, date, name, comm | def darcs_changes(darcsRepo): """Gets the changes list from the given darcs repository. This returns the chronological list of changes as (change name, change summary).""" changes = cmd("darcs changes --reverse --xml-output", darcsRepo) doc = xml_dom.parseString(changes) res = [] for patch_node in doc.childNodes[0].childNodes: name = filter(lambda n:n.nodeName == "name", patch_node.childNodes) comm = filter(lambda n:n.nodeName == "comment", patch_node.childNodes) if not name:continue else: name = name[0].childNodes[0].data if not comm: comm = "" else: comm = comm[0].childNodes[0].data res.append([name, comm]) return res | 211f8a494da8eb2978c6cc13013a74ffa33f33d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/211f8a494da8eb2978c6cc13013a74ffa33f33d3/darcs2hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
297,
2143,
67,
6329,
12,
72,
297,
2143,
8791,
4672,
3536,
3002,
326,
3478,
666,
628,
326,
864,
302,
297,
2143,
3352,
18,
1220,
1135,
326,
12227,
18224,
666,
434,
3478,
487,
261,
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,
302,
297,
2143,
67,
6329,
12,
72,
297,
2143,
8791,
4672,
3536,
3002,
326,
3478,
666,
628,
326,
864,
302,
297,
2143,
3352,
18,
1220,
1135,
326,
12227,
18224,
666,
434,
3478,
487,
261,
3... |
offset=self.__azimuthal_selctor__.getIndex(id) | offset=self.__azimuthal_selector__.getIndex(id) | def get_azimuthal(self,id=None,**kwargs): """The azimuthal angle (angle between plane and detector) in degrees | b4c0a71ecefdce2293221595c5562a4d6e5d1fe6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/762/b4c0a71ecefdce2293221595c5562a4d6e5d1fe6/instrument.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
28306,
287,
12,
2890,
16,
350,
33,
7036,
16,
636,
4333,
4672,
3536,
1986,
23090,
287,
5291,
261,
4341,
3086,
11017,
471,
13826,
13,
316,
10904,
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,
0,
0,
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,
336,
67,
28306,
287,
12,
2890,
16,
350,
33,
7036,
16,
636,
4333,
4672,
3536,
1986,
23090,
287,
5291,
261,
4341,
3086,
11017,
471,
13826,
13,
316,
10904,
2,
-100,
-100,
-100,
-100,
-100,
... |
def isDir(self) : | def isDir(self) : | def isDirInfo(self) : return False | 7d24eb563acbdf95537060f92a52d5efea584294 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2277/7d24eb563acbdf95537060f92a52d5efea584294/FileInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17850,
966,
12,
2890,
13,
5397,
294,
327,
1083,
225,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17850,
966,
12,
2890,
13,
5397,
294,
327,
1083,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.name = "fraction" | self.name = "caacupe" | def set_parameters(self): """ Create an abacus with fractions: 15 by 10 (with 1/2, 1/3. 1/4, 1/5, 1/6, 1/8, 1/9, 1/10, 1/12). """ self.bead_count = (10, 10, 10, 10, 10, 10, 2, 3, 4, 5, 6, 8, 9, 10, 12) self.bead_offset = (2, 2, 2, 2, 2, 2, 6, 5.5, 5, 4.5, 4, 3, 2.5, 2, 1) self.name = "fraction" # "caacupe" self.num_rods = 15 self.top_beads = 0 self.bot_beads = 12 self.base = 10 self.top_factor = 5 return | 006f398bab4c9f6302a81f8e2528c22dd2b0b824 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7608/006f398bab4c9f6302a81f8e2528c22dd2b0b824/abacus_window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3977,
12,
2890,
4672,
3536,
1788,
392,
1223,
1077,
407,
598,
8330,
87,
30,
4711,
635,
1728,
261,
1918,
404,
19,
22,
16,
404,
19,
23,
18,
404,
19,
24,
16,
404,
19,
25,
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,
444,
67,
3977,
12,
2890,
4672,
3536,
1788,
392,
1223,
1077,
407,
598,
8330,
87,
30,
4711,
635,
1728,
261,
1918,
404,
19,
22,
16,
404,
19,
23,
18,
404,
19,
24,
16,
404,
19,
25,
16,
... |
self.add(widgetutil.align_middle(hbox, 0, 0, 30, 30)) | self.add(widgetutil.align_middle(hbox, 0, 0, 25, 25)) | def __init__(self): style.LowerBox.__init__(self) self.controls = PlaybackControls() self.timeline = ProgressTimeline() self.volume_muter = imagebutton.ImageButton('volume') self.volume_slider = VolumeSlider() self.time_slider = self.timeline.slider | 94235d0d4373a64e6ebb4ff18f8f80cd042e6cb2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/94235d0d4373a64e6ebb4ff18f8f80cd042e6cb2/videobox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2154,
18,
4070,
3514,
16186,
2738,
972,
12,
2890,
13,
365,
18,
24350,
273,
19592,
823,
16795,
1435,
365,
18,
26237,
273,
10980,
31914,
1435,
365,
18,
949... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
2154,
18,
4070,
3514,
16186,
2738,
972,
12,
2890,
13,
365,
18,
24350,
273,
19592,
823,
16795,
1435,
365,
18,
26237,
273,
10980,
31914,
1435,
365,
18,
949... |
self.output_cache = lal.CacheEntry(ifo, job.name.replace("remoteScan_"+job.tag_base+".sh","wpipeline").upper(), segments.segment(float(time), float(time)), "file://localhost/"+self.output_path+"/"+str(time)) | self.output_cache = lal.CacheEntry(ifo, job.name.replace("remoteScan_"+job.dir+"_"+job.tag_base+".sh","wpipeline").upper(), segments.segment(float(time), float(time)), "file://localhost/"+self.output_path+"/"+str(time)) | def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"): | 6884188606907c9024f1a09cc6edf00edd0e1b24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/6884188606907c9024f1a09cc6edf00edd0e1b24/stfu_pipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
22940,
16,
1719,
16,
3283,
16,
1500,
16,
813,
16,
21479,
16,
293,
67,
4690,
22850,
6487,
618,
1546,
647,
3113,
1394,
14369,
1546,
2137,
6,
4672,
2,
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,
1,
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,
22940,
16,
1719,
16,
3283,
16,
1500,
16,
813,
16,
21479,
16,
293,
67,
4690,
22850,
6487,
618,
1546,
647,
3113,
1394,
14369,
1546,
2137,
6,
4672,
2,
-100,... |
for str in list_copy: | for str in str_list[:]: | def get_buff_size(str_list): list_copy = [x for x in str_list] total_length=0 for str in list_copy: total_length= total_length + len(str) return total_length | af7b0bcb583945cc32ce1e6ac1cd2acbd599a1e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/af7b0bcb583945cc32ce1e6ac1cd2acbd599a1e9/forwarder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
20664,
67,
1467,
12,
701,
67,
1098,
4672,
666,
67,
3530,
273,
306,
92,
364,
619,
316,
609,
67,
1098,
65,
2078,
67,
2469,
33,
20,
364,
609,
316,
609,
67,
1098,
10531,
14542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
20664,
67,
1467,
12,
701,
67,
1098,
4672,
666,
67,
3530,
273,
306,
92,
364,
619,
316,
609,
67,
1098,
65,
2078,
67,
2469,
33,
20,
364,
609,
316,
609,
67,
1098,
10531,
14542,
... |
return "allow %s %s : %s %s;" % (self.src_type, self.tgt_type, | return "allow %s %s:%s %s;" % (self.src_type, self.tgt_type, | def to_string(self): return "allow %s %s : %s %s;" % (self.src_type, self.tgt_type, self.obj_class, self.perms.to_space_str()) | 6688e9676776addd3e8e13045eafd03b1e6767e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7147/6688e9676776addd3e8e13045eafd03b1e6767e3/access.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
1080,
12,
2890,
4672,
327,
315,
5965,
738,
87,
738,
87,
5319,
87,
738,
87,
4868,
738,
261,
2890,
18,
4816,
67,
723,
16,
365,
18,
29672,
67,
723,
16,
365,
18,
2603,
67,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
1080,
12,
2890,
4672,
327,
315,
5965,
738,
87,
738,
87,
5319,
87,
738,
87,
4868,
738,
261,
2890,
18,
4816,
67,
723,
16,
365,
18,
29672,
67,
723,
16,
365,
18,
2603,
67,
110... |
[{'width': 280.0-260.0, 'line_width': 1.0, 'height': 320.0-120.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 120.0, 'tool': 'FILL_RECT', 'x': 260.0}, {'width': 300.0-260.0, 'line_width': 1.0, 'height': 120.0-80.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 80.0, 'tool': 'FILL_RECT', 'x': 260.0}, {'width': 320.0-300.0, 'line_width': 1.0, 'height': 120.0-100.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 100.0, 'tool': 'FILL_RECT', 'x': 300.0}, {'width': 280.0-200.0, 'line_width': 1.0, 'height': 380.0-320.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 320.0, 'tool': 'FILL_RECT', 'x': 200.0}, {'width': 220.0-200.0, 'line_width': 1.0, 'height': 320.0-300.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 300.0, 'tool': 'FILL_RECT', 'x': 200.0}, {'width': 260.0-240.0, 'line_width': 1.0, 'height': 460.0-380.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 380.0, 'tool': 'FILL_RECT', 'x': 240.0}, {'width': 280.0-260.0, 'line_width': 1.0, 'height': 460.0-440.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 440.0, 'tool': 'FILL_RECT', 'x': 260.0}] | [{'width': 280.0-260.0, 'line_width': 1.0, 'height': 320.0-120.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 120.0, 'tool': 'FILL_RECT', 'x': 260.0}, {'width': 300.0-260.0, 'line_width': 1.0, 'height': 120.0-80.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 80.0, 'tool': 'FILL_RECT', 'x': 260.0}, {'width': 320.0-300.0, 'line_width': 1.0, 'height': 120.0-100.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 100.0, 'tool': 'FILL_RECT', 'x': 300.0}, {'width': 280.0-200.0, 'line_width': 1.0, 'height': 380.0-320.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 320.0, 'tool': 'FILL_RECT', 'x': 200.0}, {'width': 220.0-200.0, 'line_width': 1.0, 'height': 320.0-300.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 300.0, 'tool': 'FILL_RECT', 'x': 200.0}, {'width': 260.0-240.0, 'line_width': 1.0, 'height': 460.0-380.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 380.0, 'tool': 'FILL_RECT', 'x': 240.0}, {'width': 280.0-260.0, 'line_width': 1.0, 'height': 460.0-440.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 440.0, 'tool': 'FILL_RECT', 'x': 260.0}] | def init_item_list(self): | afe6d4cfa4a483507d506d63168d467aba7acf11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11306/afe6d4cfa4a483507d506d63168d467aba7acf11/redraw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
1726,
67,
1098,
12,
2890,
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,
0,
0,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
1726,
67,
1098,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
theano.printing.debugprint(shape_constant_fct) | def test_specify_shape_partial(self): dtype = self.dtype if dtype is None: dtype = theano.config.floatX | 83ff805b736235aac2783776a0adb719ba65fa69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/83ff805b736235aac2783776a0adb719ba65fa69/test_sharedvar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2793,
1164,
67,
4867,
67,
11601,
12,
2890,
4672,
3182,
273,
365,
18,
8972,
309,
3182,
353,
599,
30,
3182,
273,
326,
31922,
18,
1425,
18,
5659,
60,
2,
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,
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,
2793,
1164,
67,
4867,
67,
11601,
12,
2890,
4672,
3182,
273,
365,
18,
8972,
309,
3182,
353,
599,
30,
3182,
273,
326,
31922,
18,
1425,
18,
5659,
60,
2,
-100,
-100,
-100,
-100,
... | |
runleaks=False, huntrleaks=False, verbose2=False): | runleaks=False, huntrleaks=False, verbose2=False, debug=False): | def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. The other default arguments (verbose, quiet, generate, exclude, single, randomize, findleaks, use_resources, trace and coverdir) allow programmers calling main() directly to set the values that would normally be set by flags on the command line. """ test_support.record_original_stdout(sys.stdout) try: opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsrf:lu:t:TD:NLR:wM:', ['help', 'verbose', 'quiet', 'generate', 'exclude', 'single', 'random', 'fromfile', 'findleaks', 'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir', 'runleaks', 'huntrleaks=', 'verbose2', 'memlimit=', ]) except getopt.error as msg: usage(2, msg) # Defaults if use_resources is None: use_resources = [] for o, a in opts: if o in ('-h', '--help'): usage(0) elif o in ('-v', '--verbose'): verbose += 1 elif o in ('-w', '--verbose2'): verbose2 = True elif o in ('-q', '--quiet'): quiet = True; verbose = 0 elif o in ('-g', '--generate'): generate = True elif o in ('-x', '--exclude'): exclude = True elif o in ('-s', '--single'): single = True elif o in ('-r', '--randomize'): randomize = True elif o in ('-f', '--fromfile'): fromfile = a elif o in ('-l', '--findleaks'): findleaks = True elif o in ('-L', '--runleaks'): runleaks = True elif o in ('-t', '--threshold'): import gc gc.set_threshold(int(a)) elif o in ('-T', '--coverage'): trace = True elif o in ('-D', '--coverdir'): coverdir = os.path.join(os.getcwd(), a) elif o in ('-N', '--nocoverdir'): coverdir = None elif o in ('-R', '--huntrleaks'): huntrleaks = a.split(':') if len(huntrleaks) != 3: print(a, huntrleaks) usage(2, '-R takes three colon-separated arguments') if len(huntrleaks[0]) == 0: huntrleaks[0] = 5 else: huntrleaks[0] = int(huntrleaks[0]) if len(huntrleaks[1]) == 0: huntrleaks[1] = 4 else: huntrleaks[1] = int(huntrleaks[1]) if len(huntrleaks[2]) == 0: huntrleaks[2] = "reflog.txt" elif o in ('-M', '--memlimit'): test_support.set_memlimit(a) elif o in ('-u', '--use'): u = [x.lower() for x in a.split(',')] for r in u: if r == 'all': use_resources[:] = RESOURCE_NAMES continue remove = False if r[0] == '-': remove = True r = r[1:] if r not in RESOURCE_NAMES: usage(1, 'Invalid -u/--use option: ' + a) if remove: if r in use_resources: use_resources.remove(r) elif r not in use_resources: use_resources.append(r) if generate and verbose: usage(2, "-g and -v don't go together!") if single and fromfile: usage(2, "-s and -f don't go together!") good = [] bad = [] skipped = [] resource_denieds = [] if findleaks: try: import gc except ImportError: print('No GC available, disabling findleaks.') findleaks = False else: # Uncomment the line below to report garbage that is not # freeable by reference counting alone. By default only # garbage that is not collectable by the GC is reported. #gc.set_debug(gc.DEBUG_SAVEALL) found_garbage = [] if single: from tempfile import gettempdir filename = os.path.join(gettempdir(), 'pynexttest') try: fp = open(filename, 'r') next = fp.read().strip() tests = [next] fp.close() except IOError: pass if fromfile: tests = [] fp = open(fromfile) for line in fp: guts = line.split() # assuming no test has whitespace in its name if guts and not guts[0].startswith('#'): tests.extend(guts) fp.close() # Strip .py extensions. if args: args = map(removepy, args) if tests: tests = map(removepy, tests) stdtests = STDTESTS[:] nottests = NOTTESTS[:] if exclude: for arg in args: if arg in stdtests: stdtests.remove(arg) nottests[:0] = args args = [] tests = tests or args or findtests(testdir, stdtests, nottests) if single: tests = tests[:1] if randomize: random.shuffle(tests) if trace: import trace tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix], trace=False, count=True) test_support.verbose = verbose # Tell tests to be moderately quiet test_support.use_resources = use_resources save_modules = sys.modules.keys() for test in tests: if not quiet: print(test) sys.stdout.flush() if trace: # If we're tracing code coverage, then we don't exit with status # if on a false return value from main. tracer.runctx('runtest(test, generate, verbose, quiet, testdir)', globals=globals(), locals=vars()) else: try: ok = runtest(test, generate, verbose, quiet, testdir, huntrleaks) except KeyboardInterrupt: # print a newline separate from the ^C print() break except: raise if ok > 0: good.append(test) elif ok == 0: bad.append(test) else: skipped.append(test) if ok == -2: resource_denieds.append(test) if findleaks: gc.collect() if gc.garbage: print("Warning: test created", len(gc.garbage), end=' ') print("uncollectable object(s).") # move the uncollectable objects somewhere so we don't see # them again found_garbage.extend(gc.garbage) del gc.garbage[:] # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): if module not in save_modules and module.startswith("test."): test_support.unload(module) # The lists won't be sorted if running with -r good.sort() bad.sort() skipped.sort() if good and not quiet: if not bad and not skipped and len(good) > 1: print("All", end=' ') print(count(len(good), "test"), "OK.") if verbose: print("CAUTION: stdout isn't compared in verbose mode:") print("a test that passes in verbose mode may fail without it.") if bad: print(count(len(bad), "test"), "failed:") printlist(bad) if skipped and not quiet: print(count(len(skipped), "test"), "skipped:") printlist(skipped) e = _ExpectedSkips() plat = sys.platform if e.isvalid(): surprise = set(skipped) - e.getexpected() - set(resource_denieds) if surprise: print(count(len(surprise), "skip"), \ "unexpected on", plat + ":") printlist(surprise) else: print("Those skips are all expected on", plat + ".") else: print("Ask someone to teach regrtest.py about which tests are") print("expected to get skipped on", plat + ".") if verbose2 and bad: print("Re-running failed tests in verbose mode") for test in bad: print("Re-running test %r in verbose mode" % test) sys.stdout.flush() try: test_support.verbose = 1 ok = runtest(test, generate, 1, quiet, testdir, huntrleaks) except KeyboardInterrupt: # print a newline separate from the ^C print() break except: raise if single: alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break else: os.unlink(filename) if trace: r = tracer.results() r.write_results(show_missing=True, summary=True, coverdir=coverdir) if runleaks: os.system("leaks %d" % os.getpid()) sys.exit(len(bad) > 0) | 1faed11e7c8a032086c03a6248a1cab9f2725938 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/1faed11e7c8a032086c03a6248a1cab9f2725938/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
16341,
33,
7036,
16,
1842,
1214,
33,
7036,
16,
3988,
33,
20,
16,
10902,
33,
8381,
16,
2103,
33,
8381,
16,
4433,
33,
8381,
16,
2202,
33,
8381,
16,
2744,
554,
33,
8381,
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,
2774,
12,
16341,
33,
7036,
16,
1842,
1214,
33,
7036,
16,
3988,
33,
20,
16,
10902,
33,
8381,
16,
2103,
33,
8381,
16,
4433,
33,
8381,
16,
2202,
33,
8381,
16,
2744,
554,
33,
8381,
16,
... |
def length(self): self.sequence_length = l = len(self._sequence) return l | def length(self): self.sequence_length = l = len(self._sequence) return l | 115eccc515e13ea8a1ed186a0ae73aa56b951a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/115eccc515e13ea8a1ed186a0ae73aa56b951a99/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
769,
12,
2890,
4672,
365,
18,
6178,
67,
2469,
273,
328,
273,
562,
12,
2890,
6315,
6178,
13,
327,
328,
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,
769,
12,
2890,
4672,
365,
18,
6178,
67,
2469,
273,
328,
273,
562,
12,
2890,
6315,
6178,
13,
327,
328,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
input_api, output_api, sources)) | input_api, output_api, source_file_filter=sources)) | def _CommonChecks(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.FilterSourceFile for the (simple) usage. black_list = input_api.DEFAULT_BLACK_LIST + _EXCLUDED_PATHS white_list = input_api.DEFAULT_WHITE_LIST + _TEXT_FILES sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list) text_files = lambda x: input_api.FilterSourceFile(x, black_list=black_list, white_list=white_list) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoTabs( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasBugField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeHasTestField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeSvnEolStyle( input_api, output_api, text_files)) results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( input_api, output_api)) results.extend(input_api.canned_checks.CheckLicense( input_api, output_api, _LICENSE_HEADER, sources)) return results | ea14138640443f60808ebb388d7dbdba630252d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/ea14138640443f60808ebb388d7dbdba630252d6/PRESUBMIT.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6517,
4081,
12,
2630,
67,
2425,
16,
876,
67,
2425,
4672,
1686,
273,
5378,
468,
18734,
1552,
333,
981,
741,
35,
468,
2597,
6277,
326,
805,
7721,
666,
261,
73,
18,
75,
18,
12126,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6517,
4081,
12,
2630,
67,
2425,
16,
876,
67,
2425,
4672,
1686,
273,
5378,
468,
18734,
1552,
333,
981,
741,
35,
468,
2597,
6277,
326,
805,
7721,
666,
261,
73,
18,
75,
18,
12126,
... |
for s in ["Publishers:", "Subscribers", "Type: roslib/Log", " * /rosout"]: | for s in ["Publishers:", "Subscribers", "Type: rosgraph_msgs/Log", " * /rosout"]: | def test_cmd_info(self): from ros import rostopic cmd = 'rostopic' | 1d10a71234b1d1d17b6ec6187e32433197b32987 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10596/1d10a71234b1d1d17b6ec6187e32433197b32987/test_rostopic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4172,
67,
1376,
12,
2890,
4672,
628,
721,
87,
1930,
721,
5681,
335,
1797,
273,
296,
303,
5681,
335,
11,
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,
1652,
1842,
67,
4172,
67,
1376,
12,
2890,
4672,
628,
721,
87,
1930,
721,
5681,
335,
1797,
273,
296,
303,
5681,
335,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
properties['chatMonitorLevel'] = 'HEADERS_ONLY' | properties['chatMonitorLevel'] = 'HEADER_ONLY' | def createEmailMonitor(self, source_user, destination_user, end_date, begin_date=None, incoming_headers_only=False, outgoing_headers_only=False, drafts=False, drafts_headers_only=False, chats=False, chats_headers_only=False): """Creates a email monitor, forwarding the source_users emails/chats | 562df59fada74b8cb8025319e87fa9d2764d0e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/562df59fada74b8cb8025319e87fa9d2764d0e32/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4134,
7187,
12,
2890,
16,
1084,
67,
1355,
16,
2929,
67,
1355,
16,
679,
67,
712,
16,
2376,
67,
712,
33,
7036,
16,
6935,
67,
2485,
67,
3700,
33,
8381,
16,
12902,
67,
2485,
67,
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,
752,
4134,
7187,
12,
2890,
16,
1084,
67,
1355,
16,
2929,
67,
1355,
16,
679,
67,
712,
16,
2376,
67,
712,
33,
7036,
16,
6935,
67,
2485,
67,
3700,
33,
8381,
16,
12902,
67,
2485,
67,
3... |
self.vars[name] = val | self.vars[name] = val[0] | def do_set (self, name, *val): if name in self.vars: self.vars[name] = val elif len(val) != 1: raise TypeError() else: self.vars[name] = val[0] | b899bad667322a417180edde1effa83053920280 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10102/b899bad667322a417180edde1effa83053920280/latex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
542,
261,
2890,
16,
508,
16,
380,
1125,
4672,
309,
508,
316,
365,
18,
4699,
30,
365,
18,
4699,
63,
529,
65,
273,
1244,
63,
20,
65,
1327,
562,
12,
1125,
13,
480,
404,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
542,
261,
2890,
16,
508,
16,
380,
1125,
4672,
309,
508,
316,
365,
18,
4699,
30,
365,
18,
4699,
63,
529,
65,
273,
1244,
63,
20,
65,
1327,
562,
12,
1125,
13,
480,
404,
30,
... |
if foo==bar: raise TestFailed | if foo==bar: raise TestFailed | def temp(): print 1 | 5fc07e929655dddee60731048496f3eef3148415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5fc07e929655dddee60731048496f3eef3148415/test_funcattrs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1906,
13332,
1172,
404,
225,
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,
0,
0,
0,
0,
0,
... | [
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1906,
13332,
1172,
404,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.cur.detection_distance=det_distance | self.cur.detection_distance=self.det_distance | def CalculateSignificantDistance(self): minsig = self.minimumSigDistApart() if (sig_distance>minsig*0.15): self.cur.significant_distance=minsig*0.15 else: self.cur.significant_distance=sig_distance if (det_distance>minsig*0.2): self.cur.detection_distance=minsig*0.2 else: self.cur.detection_distance=det_distance print "resetting sigdist=%f detdist=%f" % (self.cur.significant_distance,self.cur.detection_distance) | a07081d268eed455048b0b00b7ed6f849e08602b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/a07081d268eed455048b0b00b7ed6f849e08602b/random_encounters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9029,
29822,
7200,
12,
2890,
4672,
1131,
7340,
273,
225,
365,
18,
15903,
8267,
5133,
1294,
485,
1435,
309,
261,
7340,
67,
8969,
34,
1154,
7340,
14,
20,
18,
3600,
4672,
365,
18,
1397,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9029,
29822,
7200,
12,
2890,
4672,
1131,
7340,
273,
225,
365,
18,
15903,
8267,
5133,
1294,
485,
1435,
309,
261,
7340,
67,
8969,
34,
1154,
7340,
14,
20,
18,
3600,
4672,
365,
18,
1397,
1... |
filename = os.path.abspath(os.path.join(nsis_install_location, '..', '..', 'share', 'nsis', 'Include', p)) | filename = os.path.abspath(os.path.join(nsis_install_location, '..', 'share', 'nsis', 'Include', p)) | def nsis_scanner( node, env, path, source_dir = None, includes_seen = None): """ The scanner that looks through the source .nsi files and finds all lines that are the 'File' command, fixes the directories etc, and returns them. """ nodes = node.rfile() if not node.exists(): return [] nodes = [] if source_dir is None: try: source_dir = env['NSISSRCDIR'] except: source_dir = node.get_dir() if includes_seen is None: includes_seen = [] for include in nsis_parse([node],'file',1, env['NSISDEFINES']): exp = nsis_path(include,env['NSISDEFINES'],source_dir) if type(exp) != list: exp = [exp] for p in exp: for filename in env.Glob( os.path.abspath( os.path.join(str(source_dir),p))): # Why absolute path? Cause it breaks mysteriously without it :( if filename not in includes_seen: nodes.append(filename) includes_seen.append(filename) for include in nsis_parse([node],'!include',1, env['NSISDEFINES']): exp = nsis_path(include,env['NSISDEFINES'],source_dir) if type(exp) != list: exp = [exp] for p in exp: if p not in [ 'LogicLib.nsh', 'MUI2.nsh' ]: nsis_install_location = os.path.dirname(env.WhereIs(env['NSIS'])) if is_windows: filename = os.path.abspath(os.path.join(nsis_install_location, 'Include', p)) else: # get ../bin/makensis and go up two directories filename = os.path.abspath(os.path.join(nsis_install_location, '..', '..', 'share', 'nsis', 'Include', p)) if not os.path.isfile(filename): filename = os.path.abspath(os.path.join(str(source_dir),p)) # Why absolute path? Cause it breaks mysteriously without it :( if filename not in includes_seen: nodes.append(filename) includes_seen.append(filename) nodes += nsis_scanner(env.File(filename), env, path, source_dir = source_dir, includes_seen = includes_seen) return nodes | ca9b3becc1920c43b028538f1272151d4637a201 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/ca9b3becc1920c43b028538f1272151d4637a201/nsis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3153,
291,
67,
26842,
12,
756,
16,
1550,
16,
589,
16,
1084,
67,
1214,
273,
599,
16,
6104,
67,
15156,
273,
599,
4672,
3536,
1021,
7683,
716,
10192,
3059,
326,
1084,
263,
2387,
77,
1390,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3153,
291,
67,
26842,
12,
756,
16,
1550,
16,
589,
16,
1084,
67,
1214,
273,
599,
16,
6104,
67,
15156,
273,
599,
4672,
3536,
1021,
7683,
716,
10192,
3059,
326,
1084,
263,
2387,
77,
1390,... |
resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) def removeDataset(self,dataset): res = self.__checkArgumentFormat(dataset) | resDict = {'Failed':failed, 'Successful':successful} return S_OK( resDict ) def removeDataset( self, dataset ): res = self.__checkArgumentFormat( dataset ) | def createDataset(self,dataset): res = self.__checkArgumentFormat(dataset) if not res['OK']: return res datasets = res['Value'] created = self.__openSession() successful = {} failed = {} for datasetName,lfns in datasets.items(): res = self.__executeOperation(datasetName,'exists') if not res['OK']: return res elif res['Value']: return S_ERROR("LcgFileCatalogClient.createDataset: This dataset already exists.") res = self.__createDataset(datasetName,lfns) if res['OK']: successful[datasetName] = True else: self.__executeOperation(datasetName,'removeDataset') failed[datasetName] = res['Message'] if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
10656,
12,
2890,
16,
8682,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
8682,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
11109,
273,
400,
3292,
620,
3546,
2522,
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,
752,
10656,
12,
2890,
16,
8682,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
8682,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
11109,
273,
400,
3292,
620,
3546,
2522,
273,
... |
os.system("gnome-terminal -x sudo ./serpint serialtosock ttyS44 1235") | os.system("gnome-terminal -x sudo ./serpint serialtosock ttyS44 1235 &") | def throw_error(errorno, debug, die=1): #report errors, errorno is the error of the list of errors to display in the report errors=["ERROR0_MODULE_NOT_GPIOFORMAT", "ERROR1_MODULE_NOT_FOUND", "ERROR2_NETWORK_RELAY_THREAD_B"\ , "ERROR3_NETWORK_RELAY_THREAD_A", "ERROR4_GPIO_ERROR", "ERROR5_CREATE_VSI", "ERROR6_CREATE_VSI_SYSTEM"\ , "ERROR7_NETWORK_RELAY_INIT", "ERROR8_VSI_SHUTDOWN", "ERROR9_SOCKET_TX", "ERROR10_SOCKET_RX"\ , "ERROR11_CLA_INTERP", "ERROR12_EXIT_ERROR"] if str(debug) in ["", "1", "\nUse 'serpint.py help' for information", "1\nUse 'serpint.py help' for information"]: return print "-"*60 print "An error occoured, Error No. "+str(errorno) print "Error detail text: "+errors[errorno] print "Debug information: "+str(debug) print "-"*60 os.system("date >>err") os.system("echo "+("-"*60)+" >>err") os.system("echo "+"An error occoured, Error No. "+str(errorno)+" >>err") os.system("echo "+"Error detail text: "+errors[errorno]+" >>err") os.system("echo "+"Debug information: "+str(debug)+" >>err") os.system("echo "+("-"*60)+" >>err") os.system("echo >>err") if die: sys.exit(1) | d8892e0e976d0e60310ad84971c5aa093f3c0dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10779/d8892e0e976d0e60310ad84971c5aa093f3c0dd3/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
604,
67,
1636,
12,
1636,
2135,
16,
1198,
16,
10387,
33,
21,
4672,
468,
6006,
1334,
16,
555,
2135,
353,
326,
555,
434,
326,
666,
434,
1334,
358,
2562,
316,
326,
2605,
1334,
33,
9614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
604,
67,
1636,
12,
1636,
2135,
16,
1198,
16,
10387,
33,
21,
4672,
468,
6006,
1334,
16,
555,
2135,
353,
326,
555,
434,
326,
666,
434,
1334,
358,
2562,
316,
326,
2605,
1334,
33,
9614,
... |
elif anyTime in (True, False) and anyTime != master.anyTime: event.anyTime = anyTime elif anyTime == eim.Inherit: delattr(event, 'anyTime') if event.occurrenceFor is not None: | else: fakeMaster = getattr(master, '_fake', False) if allDay in (True, False) and (fakeMaster or allDay != master.allDay): event.allDay = allDay elif allDay == eim.Inherit: delattr(event, 'allDay') if anyTime in (True, False) and (fakeMaster or anyTime != master.anyTime): event.anyTime = anyTime elif anyTime == eim.Inherit: delattr(event, 'anyTime') if not fakeMaster: fixTimezoneOnModification(event) | def do(item): event = EventStamp(item) | c2699999b9559fa835d031c1eb0135a04026978c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/c2699999b9559fa835d031c1eb0135a04026978c/translator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
12,
1726,
4672,
871,
273,
2587,
8860,
12,
1726,
13,
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,
1652,
741,
12,
1726,
4672,
871,
273,
2587,
8860,
12,
1726,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.ChangeHeightAndAdjustContainers(drawnHeight + (2 * self.vMargin)) | print "Setting new height to %s (%s)" % (drawnHeight + (2*self.vMargin), drawnHeight) if drawnHeight == 0: newHeight = 0 else: newHeight = drawnHeight + 2*self.vMargin self.ChangeHeightAndAdjustContainers(newHeight) | def wxSynchronizeWidget(self, useHints=False): # We now want the preview area to always appear. If the # calendar is visible, however, we always want the preview # area to describe today, rather than the currently selected # day. minical = Block.Block.findBlockByName("MiniCalendar") if isMainCalendarVisible() or not minical: today = datetime.today() startDay = datetime.combine(today, time(0)) else: startDay = minical.widget.getSelectedDate() startDay = startDay.replace(tzinfo=ICUtzinfo.default) endDay = startDay + timedelta(days=1) | 096cc84753a486ba69d0f003eddfa0f76a57e8e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/096cc84753a486ba69d0f003eddfa0f76a57e8e8/CalendarBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7075,
19298,
554,
4609,
12,
2890,
16,
999,
13368,
33,
8381,
4672,
468,
1660,
2037,
2545,
326,
10143,
5091,
358,
3712,
9788,
18,
225,
971,
326,
468,
5686,
353,
6021,
16,
14025,
16,
732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7075,
19298,
554,
4609,
12,
2890,
16,
999,
13368,
33,
8381,
4672,
468,
1660,
2037,
2545,
326,
10143,
5091,
358,
3712,
9788,
18,
225,
971,
326,
468,
5686,
353,
6021,
16,
14025,
16,
732,
... |
cpq.kill() cpp.kill() cmdp.kill() | cpq.killprocs() for thread in (split_thread, cpq, cpp): thread.kill() | def main(): # init defaults options = Options() max_procs = MAX_PROCS max_transfers_per_host = MAX_TRANSFERS_PER_HOST rm_cmd_template = RM_CMD_TEMPLATE cat_cmd_template = CAT_CMD_TEMPLATE logfile = LOG_FILE cleanonly = False # just remove chunks and exit chunkdir = CHUNK_DIR # get the command line options try: optlist, args = getopt.gnu_getopt( \ sys.argv[1:], 't:u:f:r:l:b:svhp', ['help', 'rsync', 'scp', 'rcp',\ 'chunkdir=','logfile=']) for opt, arg in optlist: if opt in ('-h', '--help'): _usage() _help() sys.exit(1) except Exception: print 'ERROR: options', sys.exc_info()[1] sys.exit(2) if len(args) < 2: print 'ERROR: 2 args required' _usage() sys.exit(2) # get name of file to transfer try: if args[0] == 'clean': cleanonly = True options.filename = args[1] else: options.filename = args[0] filepath = os.path.abspath(options.filename) if not os.path.isfile(filepath): print 'ERROR: %s not found' % filepath sys.exit(2) options.filedest = args[1] except Exception: print 'ERROR: %s' % sys.exc_info()[1] _usage() sys.exit(2) # parse the command line targetlist = [] # takes host names for opt, arg in optlist: if opt == '-f': # file # read '\n' separated hosts from file try: hostfile = open(arg, 'r') except Exception: print 'ERROR: Failed to open hosts file:', arg sys.exit(2) for host in hostfile: targetlist.append(host.strip()) hostfile.close() elif opt == '-r': try: # format: -r <basehost[0-1,3-3,5-11...]> # eg. -r host[1-2,4-5] generates host1, host2, host4, host5 arg = arg.replace(' ','') # remove white space host_regex = '[a-zA-Z]{1}[a-zA-Z0-9\-]' range_regex = '[0-9]+\-[0-9]+(,[0-9]+\-[0-9]+)+' regex = host_regex + '\[' + range_regex + '\]' basehost = arg.split('[')[0] # get 3 part ranges eg: ['1-3','5-5'] ranges = arg.split('[')[1].strip('[]').split(',') for rng in ranges: first = rng.split('-')[0] last = rng.split('-')[1] for num in range(int(first), int(last)+1): leadingZeros = len(first) - len(str(num)) host = basehost + '0'*leadingZeros + str(num) targetlist.append(host) except Exception: print 'ERROR: Invalid argument for -r:', arg print sys.exc_info()[1] _usage() sys.exit(2) elif opt == '-l': # read quoted list of comma separated hosts from command line hostlist = arg.split() for host in hostlist: targetlist.append(host.strip()) elif opt == '-b': # chunk size options.chunksize = arg elif opt == '-u': # username options.username = arg + '@' elif opt == '-s': # log transfer statistics options.logger = Logger() elif opt == '-v': # verbose output options.verbose = True elif opt == '-t': # transfers per host max_transfers_per_host = int(arg) elif opt == '-p': # chunk persistence options.cleanup = False elif opt == '--rsync': # use rsync options.cp_cmd_template = RSYNC_CMD_TEMPLATE elif opt == '--scp': # use scp options.cp_cmd_template = SCP_CMD_TEMPLATE elif opt == '--rcp': # use rcp options.cp_cmd_template = RCP_CMD_TEMPLATE elif opt == '--chunkdir': chunkdir = arg elif opt == '--logfile': logfile = arg else: print 'invalid option: %s' % opt # set up a list database of all hosts DB = Database() DB.hostlist.append(Host(gethostname(), DB, [], options.username, \ max_transfers_per_host)) DB.roothost = DB.hostlist[0] targetlist = set(targetlist) # remove duplicates for target in targetlist: DB.hostlist.append(Host(target, DB, [], options.username, \ max_transfers_per_host)) DB.hostcount = len(DB.hostlist) # build prefix for file chunk names options.chunk_base_name = \ os.path.join(chunkdir, os.path.split(options.filename)[-1])+ '.chunk_' # create semaphore to limit processc creation procsema = threading.Semaphore(max_procs) ###### create queue and poll threads ###################################### # The queue threads (commandq and cpq) share a process list with a poll # thread (cmd_poll and cp_poll). The queue threads are fed commands # to run and then the Popen objects are added to the process list along # with process data. The poll threads will then poll the processes until # they finish, at which point the output can be handled. threads = [] # # create a thread for dealing with process output cmd_procs = [] cmdp = CmdPoll(procsema, cmd_procs) cmdp.daemon = True threads.append(cmdp) # # initialize the background command queue thread commandq = CommandQueue(procsema, cmd_procs) commandq.daemon = True threads.append(commandq) # # create thread for dealing with transfer process output scp_procs = [] cpp = CpPoll(procsema, scp_procs, DB, options, commandq) cpp.daemon = True threads.append(cpp) # # init thread for queueing scp transfers cpq = CpCommandQueue(procsema, scp_procs) cpq.daemon = True threads.append(cpq) ########################################################################### for thread in threads: thread.start() # If clean was passed as first argument, remove chunks from all hosts # and exit. if cleanonly is True: print 'removing chunks ...' for host in DB.hostlist: rmCmd = rm_cmd_template % \ (options.username+host.hostname, options.chunk_base_name) commandq.put(rmCmd) commandq.finish() while commandq.isAlive() or cmdp.isAlive(): time.sleep(0.5) print 'done' sys.exit(0) # split the file to transfer in a separate thread split_thread = Splitter(DB, options) threads.append(split_thread) split_thread.daemon = True split_thread.start() ##### Initiate the transfers ##### if options.logger: options.logger.filename = logfile options.logger.start() print 'transferring %s to %d hosts ...' %(options.filename, len(targetlist)) try: # returns once transfers are complete initiateTransfers(DB, options, commandq, cpq) print '%d transfers complete' % (DB.hosts_with_file - 1) cpq.finish() # exit gracefully cpp.finish() except KeyboardInterrupt: # kill split, cpq, and poll threads split_thread.kill() commandq.killprocs() # stop current processes (calls to cat) cpq.kill() # kill cpq thread and scp processes cpp.kill() cmdp.kill() print '[!] aborted transfers' except Exception: split_thread.kill() commandq.killprocs() cpq.kill() cpp.kill() cmdp.kill() print 'ERROR: initiateTransfers() ', sys.exc_info()[1] # in case transfers were interrupted, let threads finish execution. ## may need to modify this try: while split_thread.isAlive() or cpq.isAlive() or cpp.isAlive(): time.sleep(0.5) except KeyboardInterrupt: pass # must wait for cat processes to finish before removing chunks if options.cleanup is True: print 'removing chunks ...' commandq.wait_for_procs() # wait for calls to cat to finish for host in DB.hostlist: rmCmd = rm_cmd_template % \ (options.username+host.hostname, options.chunk_base_name) commandq.put(rmCmd) # wait for procs to finish commandq.finish() # finish work on current queue, then exit while commandq.isAlive(): time.sleep(0.5) # terminate the log file if options.logger: options.logger.done() | 06772f294757c1ad6f6efefb804370839037d93c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1260/06772f294757c1ad6f6efefb804370839037d93c/scpTsunamiE.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
1208,
3467,
702,
273,
5087,
1435,
943,
67,
27537,
273,
4552,
67,
3373,
4596,
943,
67,
2338,
18881,
67,
457,
67,
2564,
273,
4552,
67,
16596,
6553,
55,
67,
3194,
67,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
468,
1208,
3467,
702,
273,
5087,
1435,
943,
67,
27537,
273,
4552,
67,
3373,
4596,
943,
67,
2338,
18881,
67,
457,
67,
2564,
273,
4552,
67,
16596,
6553,
55,
67,
3194,
67,
89... |
_apply = apply | def join(words, sep = ' '): """join(list [,sep]) -> string Return a string composed of the words in list, with intervening occurences of sep. The default separator is a single space. (joinfields and join are synonymous) """ return sep.join(words) | 4e577568f34ac8283d2070929bf3c3090b3e722f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4e577568f34ac8283d2070929bf3c3090b3e722f/string.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
3753,
16,
5478,
273,
296,
296,
4672,
3536,
5701,
12,
1098,
306,
16,
10814,
5717,
317,
533,
225,
2000,
279,
533,
18673,
434,
326,
4511,
316,
666,
16,
598,
1554,
3995,
310,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1233,
12,
3753,
16,
5478,
273,
296,
296,
4672,
3536,
5701,
12,
1098,
306,
16,
10814,
5717,
317,
533,
225,
2000,
279,
533,
18673,
434,
326,
4511,
316,
666,
16,
598,
1554,
3995,
310,
914... | |
a = arena_malloc(50, False) | a = arena_malloc(72, False) | def test_partial_arena_reset(): a = arena_malloc(50, False) def reserve(i): b = a + i * llmemory.raw_malloc_usage(precomputed_size) arena_reserve(b, precomputed_size) return b blist = [] plist = [] for i in range(4): b = reserve(i) (b + llmemory.offsetof(SX, 'x')).signed[0] = 100 + i blist.append(b) plist.append(llmemory.cast_adr_to_ptr(b, SPTR)) # clear blist[1] and blist[2] but not blist[0] nor blist[3] arena_reset(blist[1], llmemory.raw_malloc_usage(precomputed_size)*2, False) py.test.raises(RuntimeError, "plist[1].x") # marked as freed py.test.raises(RuntimeError, "plist[2].x") # marked as freed # re-reserve object at index 1 and 2 blist[1] = reserve(1) blist[2] = reserve(2) # check via object pointers assert plist[0].x == 100 assert plist[3].x == 103 py.test.raises(RuntimeError, "plist[1].x") # marked as freed py.test.raises(RuntimeError, "plist[2].x") # marked as freed # but we can still cast the old ptrs to addresses, which compare equal # to the new ones we gotq assert llmemory.cast_ptr_to_adr(plist[1]) == blist[1] assert llmemory.cast_ptr_to_adr(plist[2]) == blist[2] # check via addresses assert (blist[0] + llmemory.offsetof(SX, 'x')).signed[0] == 100 assert (blist[3] + llmemory.offsetof(SX, 'x')).signed[0] == 103 py.test.raises(lltype.UninitializedMemoryAccess, "(blist[1] + llmemory.offsetof(SX, 'x')).signed[0]") py.test.raises(lltype.UninitializedMemoryAccess, "(blist[2] + llmemory.offsetof(SX, 'x')).signed[0]") # clear and zero-fill the area over blist[0] and blist[1] arena_reset(blist[0], llmemory.raw_malloc_usage(precomputed_size)*2, True) # re-reserve and check it's zero blist[0] = reserve(0) blist[1] = reserve(1) assert (blist[0] + llmemory.offsetof(SX, 'x')).signed[0] == 0 assert (blist[1] + llmemory.offsetof(SX, 'x')).signed[0] == 0 assert (blist[3] + llmemory.offsetof(SX, 'x')).signed[0] == 103 py.test.raises(lltype.UninitializedMemoryAccess, "(blist[2] + llmemory.offsetof(SX, 'x')).signed[0]") | bdf6f50033b3db23987e9f2e6fd3234554c30c5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/bdf6f50033b3db23987e9f2e6fd3234554c30c5f/test_llarena.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11601,
67,
834,
6582,
67,
6208,
13332,
279,
273,
854,
6582,
67,
81,
9853,
12,
9060,
16,
1083,
13,
1652,
20501,
12,
77,
4672,
324,
273,
279,
397,
277,
380,
6579,
7858,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11601,
67,
834,
6582,
67,
6208,
13332,
279,
273,
854,
6582,
67,
81,
9853,
12,
9060,
16,
1083,
13,
1652,
20501,
12,
77,
4672,
324,
273,
279,
397,
277,
380,
6579,
7858,
18,
1... |
return | return | def ftp_STOU(self, line): "store a file with a unique name" # note: RFC 959 prohibited STOU parameters, but this prohibition is obsolete. # note2: RFC 959 wants ftpd to respond with code 250 but I've seen a # lot of FTP servers responding with 125 or 150, and this is a better choice, imho, # because STOU works just like STOR. | 95e7957fd9509ce008091ab59ee8efe4bedf1f36 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/95e7957fd9509ce008091ab59ee8efe4bedf1f36/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
882,
26556,
12,
2890,
16,
980,
4672,
315,
2233,
279,
585,
598,
279,
3089,
508,
6,
468,
4721,
30,
8372,
2468,
6162,
450,
29993,
2347,
26556,
1472,
16,
1496,
333,
450,
15769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13487,
67,
882,
26556,
12,
2890,
16,
980,
4672,
315,
2233,
279,
585,
598,
279,
3089,
508,
6,
468,
4721,
30,
8372,
2468,
6162,
450,
29993,
2347,
26556,
1472,
16,
1496,
333,
450,
15769,
... |
if (hasattr(obj, "__class__") or | if type(obj) in (types.ListType, types.TupleType): lst = [ ] if len(pathname) > 0: lastitem = pathname[-1] pathname = pathname[:-1] else: lastitem = "" for i in range(len(obj)): x = obj[i] if not self.exclude(i, x): y = pathname + [ lastitem + ("[%d]" % i) ] lst.append((i, x, y)) for i, v, pn in lst: if self.showThis(i, v): self.handleLeaf(v, depth+1, pn) for i, v, pn in lst: self.descend(v, depth+1, pn) elif type(obj) in (types.DictType,): keys = obj.keys() lst = [ ] if len(pathname) > 0: lastitem = pathname[-1] pathname = pathname[:-1] else: lastitem = "" for k in keys: x = obj[k] if not self.exclude(k, x): y = pathname + [ lastitem + ("[%s]" % repr(k)) ] lst.append((k, x, y)) for k, v, pn in lst: if self.showThis(k, v): self.handleLeaf(v, depth+1, pn) for k, v, pn in lst: self.descend(v, depth+1, pn) elif (hasattr(obj, "__class__") or | def descend(self, obj, depth=0, pathname=[ ]): if obj in self.already: return self.already.append(obj) if depth == 0: self.handleLeaf(obj, depth, pathname) if depth >= self.maxdepth: return if (hasattr(obj, "__class__") or type(obj) in (types.InstanceType, types.ClassType, types.ModuleType, types.FunctionType)): ckeys = [ ] if True: # Look at instance variables, ignore class variables and methods if hasattr(obj, "__class__"): ckeys = self.getAttributes(obj.__class__) else: # Look at all variables and methods ckeys = ( ) keys = filter(lambda x: x not in ckeys, self.getAttributes(obj)) lst = [ ] for k in keys: x = getattr(obj, k) if not self.exclude(k, x): lst.append((k, x, pathname + [ k ])) for k, v, pn in lst: if self.showThis(k, v): self.handleLeaf(v, depth+1, pn) for k, v, pn in lst: self.descend(v, depth+1, pn) elif type(obj) in (types.ListType, types.TupleType): lst = [ ] if len(pathname) > 0: lastitem = pathname[-1] pathname = pathname[:-1] else: lastitem = "" for i in range(len(obj)): x = obj[i] if not self.exclude(i, x): y = pathname + [ lastitem + ("[%d]" % i) ] lst.append((i, x, y)) for i, v, pn in lst: if self.showThis(i, v): self.handleLeaf(v, depth+1, pn) for i, v, pn in lst: self.descend(v, depth+1, pn) | 60810ced4e7a52414958e94dc708323feb00a556 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/60810ced4e7a52414958e94dc708323feb00a556/debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10653,
12,
2890,
16,
1081,
16,
3598,
33,
20,
16,
9806,
22850,
308,
4672,
309,
1081,
316,
365,
18,
17583,
30,
327,
365,
18,
17583,
18,
6923,
12,
2603,
13,
309,
3598,
422,
374,
30,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10653,
12,
2890,
16,
1081,
16,
3598,
33,
20,
16,
9806,
22850,
308,
4672,
309,
1081,
316,
365,
18,
17583,
30,
327,
365,
18,
17583,
18,
6923,
12,
2603,
13,
309,
3598,
422,
374,
30,
365... |
newline = ' firefox: ' + self.exePath + 'firefox\\firefox.exe' | newline = ' firefox: ' + self.exePath | def writeConfigFile(self): configFile = open(self.configPath + "sample.config") self.currentDate = self._getCurrentDateString() if not self.buildid: self.buildid = self._getCurrentBuildId() if not self.outputName: self.outputName = self.currentDate + "_config.yml" destination = open(self.outputName, "w") config = configFile.readlines() configFile.close() buildidString = "'" + str(self.buildid) + "'" for line in config: newline = line if 'firefox:' in line: newline = ' firefox: ' + self.exePath + 'firefox\\firefox.exe' if 'testtitle' in line: newline = line.replace('testtitle', self.title) if self.testDateFromBuildId: newline += '\n' newline += 'testdate: "%s"\n' % self._getTimeFromBuildId() if 'testfilename' in line: newline = line.replace('testfilename', self.outputName) if 'testbranchid' in line: newline = line.replace('testbranchid', buildidString) else: if 'testbranch' in line: newline = line.replace('testbranch', self.branch) destination.write(newline) destination.close() if self.verbose: self._dumpConfiguration() | f1875f48c06e081d8c22898dc96f6edf6c6adf75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11102/f1875f48c06e081d8c22898dc96f6edf6c6adf75/PerfConfigurator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
13705,
12,
2890,
4672,
12247,
273,
1696,
12,
2890,
18,
1425,
743,
397,
315,
6358,
18,
1425,
7923,
365,
18,
2972,
1626,
273,
365,
6315,
588,
3935,
1626,
780,
1435,
309,
486,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1045,
13705,
12,
2890,
4672,
12247,
273,
1696,
12,
2890,
18,
1425,
743,
397,
315,
6358,
18,
1425,
7923,
365,
18,
2972,
1626,
273,
365,
6315,
588,
3935,
1626,
780,
1435,
309,
486,
365,
... |
filename_array = { 'progname': prog.title, 'title' : prog.sub_title } | filename_array = { 'progname': String(prog.title), 'title' : String(prog.sub_title) } | def getProgFilename(prog=None): if not prog: return 'ERROR: no prog' mask = config.TV_RECORDFILE_MASK # '%%m-%%d %%H:%%M %(progname)s - %(title)s' filename_array = { 'progname': prog.title, 'title' : prog.sub_title } filemask = mask % filename_array filemask = time.strftime(filemask, time.localtime(prog.start)) filename = progname2filename(filemask) return filename | c10df0c987c541fecbffe4372ca58ac2ccb29e9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c10df0c987c541fecbffe4372ca58ac2ccb29e9d/tv_util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3570,
75,
5359,
12,
14654,
33,
7036,
4672,
309,
486,
11243,
30,
327,
296,
3589,
30,
1158,
11243,
11,
225,
3066,
273,
642,
18,
15579,
67,
22261,
3776,
67,
11704,
282,
468,
1995,
9,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3570,
75,
5359,
12,
14654,
33,
7036,
4672,
309,
486,
11243,
30,
327,
296,
3589,
30,
1158,
11243,
11,
225,
3066,
273,
642,
18,
15579,
67,
22261,
3776,
67,
11704,
282,
468,
1995,
9,
81,
... |
spec = self._morphSpec( spec ) ids = self.objectIds( spec ) | if spec is None: ids = self.objectIds() else: spec = self._morphSpec(spec) ids = self.objectIds(spec) | def contentValues( self, spec=None, filter=None ): """ Provide a filtered view onto 'objectValues', allowing only PortalFolders and PortalContent-derivatives to show through. """ spec = self._morphSpec( spec ) ids = self.objectIds( spec ) return map( lambda item: item[1], self._filteredItems( ids, filter ) ) | 05ff84da32b8165cb38e1397d41cbcb57bc4b606 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/05ff84da32b8165cb38e1397d41cbcb57bc4b606/PortalFolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
913,
1972,
12,
365,
16,
857,
33,
7036,
16,
1034,
33,
7036,
262,
30,
3536,
26569,
279,
5105,
1476,
10170,
296,
1612,
1972,
2187,
15632,
1338,
25478,
14885,
471,
25478,
1350,
17,
20615,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
913,
1972,
12,
365,
16,
857,
33,
7036,
16,
1034,
33,
7036,
262,
30,
3536,
26569,
279,
5105,
1476,
10170,
296,
1612,
1972,
2187,
15632,
1338,
25478,
14885,
471,
25478,
1350,
17,
20615,
87... |
sim.getRNG().setSeed(12345) | sim.getRNG().set(seed=12345) | def idString(IDs): uniqueIDs = list(set(IDs)) uniqueIDs.sort() return ', '.join(['%d' % x for x in uniqueIDs if x >= 1]) | 205f55f8c6cd28aed704d70838912648f07ac340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/205f55f8c6cd28aed704d70838912648f07ac340/userGuide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
612,
780,
12,
5103,
4672,
3089,
5103,
273,
666,
12,
542,
12,
5103,
3719,
3089,
5103,
18,
3804,
1435,
327,
2265,
2418,
5701,
12,
3292,
9,
72,
11,
738,
619,
364,
619,
316,
3089,
5103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
612,
780,
12,
5103,
4672,
3089,
5103,
273,
666,
12,
542,
12,
5103,
3719,
3089,
5103,
18,
3804,
1435,
327,
2265,
2418,
5701,
12,
3292,
9,
72,
11,
738,
619,
364,
619,
316,
3089,
5103,
... |
m = re.search(r'<div\s+id="demoDescription">(.*?)</div>', file, | m = re.search(r'<div\s+id="description">(.*?)</div>', file, | def getDesc(filepath): desc = "" # open file file = open(filepath,'rU').read() if file: # scan for div id="demoDescription m = re.search(r'<div\s+id="demoDescription">(.*?)</div>', file, re.IGNORECASE|re.DOTALL) if m: desc = m.group(1) desc = re.sub("\n"," ",desc) desc = desc.strip() else: print "Failed to open filepath: ", filepath # return text return desc | d134ecedb5584c9d069730bf8d381eee59fa5e71 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/d134ecedb5584c9d069730bf8d381eee59fa5e71/gendata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29124,
12,
10561,
4672,
3044,
273,
1408,
468,
1696,
585,
585,
273,
1696,
12,
10561,
11189,
86,
57,
16063,
896,
1435,
309,
585,
30,
468,
4135,
364,
3739,
612,
1546,
27928,
3291,
312,
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,
29124,
12,
10561,
4672,
3044,
273,
1408,
468,
1696,
585,
585,
273,
1696,
12,
10561,
11189,
86,
57,
16063,
896,
1435,
309,
585,
30,
468,
4135,
364,
3739,
612,
1546,
27928,
3291,
312,
273,... |
buffer = inf.read(self._bufsize) | buffer = source.read(self._bufsize) | def parse(self, source): self.prepareParser(source) #FIXME: do some type checking: could be already stream, URL or # filename inf=open( source ) buffer = inf.read(self._bufsize) while buffer != "": self.feed(buffer) buffer = inf.read(self._bufsize) self.close() self.reset() | 2d5c793d9ed451a19712d06fbd40696db101927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c793d9ed451a19712d06fbd40696db101927d/xmlreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
1084,
4672,
365,
18,
9366,
2678,
12,
3168,
13,
468,
25810,
30,
741,
2690,
618,
6728,
30,
3377,
506,
1818,
1407,
16,
1976,
578,
468,
4202,
1544,
8286,
33,
3190,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
1084,
4672,
365,
18,
9366,
2678,
12,
3168,
13,
468,
25810,
30,
741,
2690,
618,
6728,
30,
3377,
506,
1818,
1407,
16,
1976,
578,
468,
4202,
1544,
8286,
33,
3190,
12,
... |
self.assertEquals(where.as_sql(), "(|(cn=foo)(cn=bar))") | self.assertEquals(where.as_sql(), ("(|(cn=foo)(cn=bar))", [])) | def test_char_field_in(self): where = WhereNode() where.add((Constraint("cn", "cn", CharField()), 'in', ["foo", "bar"]), AND) self.assertEquals(where.as_sql(), "(|(cn=foo)(cn=bar))") | d16779d7edb93416524eae1081f4238208ccdc6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12933/d16779d7edb93416524eae1081f4238208ccdc6b/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3001,
67,
1518,
67,
267,
12,
2890,
4672,
1625,
273,
12177,
907,
1435,
1625,
18,
1289,
12443,
5806,
2932,
10305,
3113,
315,
10305,
3113,
3703,
974,
1435,
3631,
296,
267,
2187,
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,
1842,
67,
3001,
67,
1518,
67,
267,
12,
2890,
4672,
1625,
273,
12177,
907,
1435,
1625,
18,
1289,
12443,
5806,
2932,
10305,
3113,
315,
10305,
3113,
3703,
974,
1435,
3631,
296,
267,
2187,
8... |
""" | """ | def fl_setpup_entercb(nm, py_cb, data): """ fl_setpup_entercb(nm, py_cb, data) -> pup_entercb """ c_cb = FL_PUP_ENTERCB(py_cb) _cfunc_refs[get_rand_dictkey()] = c_cb retval = _fl_setpup_entercb(nm, c_cb, data) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
84,
416,
67,
2328,
7358,
12,
15094,
16,
2395,
67,
7358,
16,
501,
4672,
3536,
1183,
67,
542,
84,
416,
67,
2328,
7358,
12,
15094,
16,
2395,
67,
7358,
16,
501,
13,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
67,
542,
84,
416,
67,
2328,
7358,
12,
15094,
16,
2395,
67,
7358,
16,
501,
4672,
3536,
1183,
67,
542,
84,
416,
67,
2328,
7358,
12,
15094,
16,
2395,
67,
7358,
16,
501,
13,
317,
... |
p = subprocess.Popen(starter_file_path) | if SILENT_MODE: p = subprocess.Popen(starter_file_path,stdout=subprocess.PIPE, stderr=subprocess.PIPE) else: p = subprocess.Popen(starter_file_path) | def start_seattle(): """ <Purpose> Starts seattle by running the starter file on any system. <Arguments> None. <Exceptions> IOError if the starter file can not be found under SEATTLE_FILES_DIR. <Side Effects> None. <Returns> None. """ starter_file_path = [SEATTLE_FILES_DIR + os.sep + get_starter_file_name()] if OS == "WindowsCE": windows_api.launch_python_script(starter_file_path) else: p = subprocess.Popen(starter_file_path) p.wait() | 057041480d849e787340b643e1fb6b8638c8eabf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/057041480d849e787340b643e1fb6b8638c8eabf/seattleinstaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
307,
4558,
298,
13332,
3536,
411,
10262,
4150,
34,
30620,
695,
4558,
298,
635,
3549,
326,
10443,
387,
585,
603,
1281,
2619,
18,
225,
411,
4628,
34,
599,
18,
225,
411,
11416,
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,
787,
67,
307,
4558,
298,
13332,
3536,
411,
10262,
4150,
34,
30620,
695,
4558,
298,
635,
3549,
326,
10443,
387,
585,
603,
1281,
2619,
18,
225,
411,
4628,
34,
599,
18,
225,
411,
11416,
3... |
def _wrapped_run(self, result): | def _wrapped_run(self, *args, **kwargs): | def _wrapped_run(self, result): "Python 2.7 / unittest2 compatibility - there must be a better way..." self.setUp() if hasattr(self, 'fixture'): for test in self._tests: if hasattr(test, 'setFixture'): test.setFixture(self.fixture) unittest.TestSuite._wrapped_run(self, result) self.tearDown() return result | 88ad58867f3a8849c808c5bcb55d4f13fc9e87c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/88ad58867f3a8849c808c5bcb55d4f13fc9e87c9/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
18704,
67,
2681,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
315,
15774,
576,
18,
27,
342,
2836,
3813,
22,
8926,
300,
1915,
1297,
506,
279,
7844,
4031,
7070,
365,
18,
542,
1211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18704,
67,
2681,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
315,
15774,
576,
18,
27,
342,
2836,
3813,
22,
8926,
300,
1915,
1297,
506,
279,
7844,
4031,
7070,
365,
18,
542,
1211... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.