rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if feat.GetStyleString() != 'LABEL(f:"Arial",t:"Test",a:30,s:5g,p:7,c:
if feat.GetStyleString() != 'LABEL(f:"Arial",t:"Test",a:30,s:5g,p:7,c:
def ogr_dxf_6(): feat = gdaltest.dxf_layer.GetNextFeature() if ogrtest.check_feature_geometry( feat, 'POINT (84 126 0)' ): return 'fail' if feat.GetStyleString() != 'LABEL(f:"Arial",t:"Test",a:30,s:5g,p:7,c:#ffffff)': print(feat.GetStyleString()) gdaltest.post_reason( 'got wrong style string' ) return 'fail' feat.Destroy() return 'success'
1946400d008d9fc47da2f312a081d8c4bbd496e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/1946400d008d9fc47da2f312a081d8c4bbd496e4/ogr_dxf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 72, 5841, 67, 26, 13332, 225, 11002, 273, 15551, 2390, 395, 18, 72, 5841, 67, 6363, 18, 967, 2134, 4595, 1435, 225, 309, 320, 3197, 3813, 18, 1893, 67, 7238, 67, 14330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 320, 3197, 67, 72, 5841, 67, 26, 13332, 225, 11002, 273, 15551, 2390, 395, 18, 72, 5841, 67, 6363, 18, 967, 2134, 4595, 1435, 225, 309, 320, 3197, 3813, 18, 1893, 67, 7238, 67, 14330, ...
partyName = u"Assembly summer 2009"
partyName = config.partyName
def __call__(self, filename, _prefix=None): return grokcore.view.components.PageTemplate( filename=filename, _prefix=_prefix )
83cde407d7d48e759eec11ec4adf76344bff6e4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/111/83cde407d7d48e759eec11ec4adf76344bff6e4b/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1544, 16, 389, 3239, 33, 7036, 4672, 327, 314, 3250, 3644, 18, 1945, 18, 8119, 18, 1964, 2283, 12, 1544, 33, 3459, 16, 389, 3239, 33, 67, 3239, 262, 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, 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, 1991, 972, 12, 2890, 16, 1544, 16, 389, 3239, 33, 7036, 4672, 327, 314, 3250, 3644, 18, 1945, 18, 8119, 18, 1964, 2283, 12, 1544, 33, 3459, 16, 389, 3239, 33, 67, 3239, 262, 2,...
self.parser.phase.processStartTag(name, attributes)
self.parser.phase.processEndTag(name)
def endTagTable(self, name): self.parser.parseError() ignoreEndTag = self.ignoreEndTagCaption() self.parser.phase.processEndTag("caption") if not ignoreEndTag: self.parser.phase.processStartTag(name, attributes)
046a1fd80b554501d89802bc9123c41b1e1558a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/046a1fd80b554501d89802bc9123c41b1e1558a3/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 1388, 12, 2890, 16, 508, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 2305, 25633, 273, 365, 18, 6185, 25633, 21158, 1435, 365, 18, 4288, 18, 13961, 18, 2567, 25633, 2932, 15386, 792...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 1388, 12, 2890, 16, 508, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 2305, 25633, 273, 365, 18, 6185, 25633, 21158, 1435, 365, 18, 4288, 18, 13961, 18, 2567, 25633, 2932, 15386, 792...
default=None, help="target build arch")
default=None, help="target build arch")
def command_parse(): """return options and args from parsing the command line""" usage = """ usage: mock [options] /path/to/srpm optional commands: chroot - run the specified command within the chroot clean - clean out the specified chroot init - initialize the chroot, do not build anything""" parser = OptionParser(usage=usage, version=__VERSION__) parser.add_option("-r", action="store", type="string", dest="chroot", help="chroot name/config file name default: %default", default='default') parser.add_option("--no-clean", action ="store_false", dest="clean", help="do not clean chroot before building", default=True) parser.add_option("--arch", action ="store", dest="arch", default=None, help="target build arch") parser.add_option("--debug", action ="store_true", dest="debug", default=False, help="Output copious debugging information") parser.add_option("--resultdir", action="store", type="string", default=None, help="path for resulting files to be put") parser.add_option("--statedir", action="store", type="string", default=None, help="path for state file is written") parser.add_option("--uniqueext", action="store", type="string", default=None, help="Arbitrary, unique extension to append to buildroot directory name") parser.add_option("--configdir", action="store", dest="configdir", default=None, help="Change where config files are found") parser.add_option("--quiet", action ="store_true", dest="quiet", default=False, help="quiet down output") parser.add_option("--autocache", action ="store_true", dest="use_cache", default=False, help="Turn on build-root caching") parser.add_option("--rebuildcache", action ="store_true", dest="rebuild_cache", default=False, help="Force rebuild of build-root cache") return parser.parse_args()
0da82906230f2f357462d9d3c9cd62ce6a934eec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7328/0da82906230f2f357462d9d3c9cd62ce6a934eec/mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 2670, 13332, 3536, 2463, 702, 471, 833, 628, 5811, 326, 1296, 980, 8395, 225, 4084, 273, 3536, 4084, 30, 5416, 306, 2116, 65, 342, 803, 19, 869, 19, 11254, 7755, 3129, 4364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1296, 67, 2670, 13332, 3536, 2463, 702, 471, 833, 628, 5811, 326, 1296, 980, 8395, 225, 4084, 273, 3536, 4084, 30, 5416, 306, 2116, 65, 342, 803, 19, 869, 19, 11254, 7755, 3129, 4364, ...
selected = self.__get_selected_row_metadata(treeview)
selected = self.get_selected_row_metadata()
def on_drag_data_get(self, treeview, drag_context, data, info, time): selected = self.__get_selected_row_metadata(treeview) d = [] for metadata in selected: d.append(metadata.encode_as_string()) data_string = "&&".join(d) if DEBUG: debug_trace("on_drag_data_get: send data %s" % data_string, sender=self) data.set(data.target, 8, data_string) # 8 = type string
c53ab5980eab6bc66121ddbad3807ad1581e7164 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2271/c53ab5980eab6bc66121ddbad3807ad1581e7164/MTPnavigatorGui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 892, 67, 588, 12, 2890, 16, 2151, 1945, 16, 8823, 67, 2472, 16, 501, 16, 1123, 16, 813, 4672, 3170, 273, 365, 18, 588, 67, 8109, 67, 492, 67, 4165, 1435, 302, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 892, 67, 588, 12, 2890, 16, 2151, 1945, 16, 8823, 67, 2472, 16, 501, 16, 1123, 16, 813, 4672, 3170, 273, 365, 18, 588, 67, 8109, 67, 492, 67, 4165, 1435, 302, 2...
mapping=dict(numberadded=str(added),))
mapping=dict(numberadded=str(added),))
def _addItem(self, data): """imports csv and returns message
6a225131d5814f4fcaf8f720f43c7e7816ee8a6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9843/6a225131d5814f4fcaf8f720f43c7e7816ee8a6b/channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 1180, 12, 2890, 16, 501, 4672, 3536, 21350, 6101, 471, 1135, 883, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 1180, 12, 2890, 16, 501, 4672, 3536, 21350, 6101, 471, 1135, 883, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for format in ('%Y-%m-%d',
for format in ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d',
def _dateConvertFromDB(d): if d==None: return None for format in ('%Y-%m-%d', # Y/M/D '%H:%M:%S', # hh:mm:ss '%H:%M', # hh:mm '%Y-%m'): # Y-M try: return DateTime.strptime(d, format) except: pass dashind = max(d.rfind('-'), d.rfind('+')) tz = d[dashind:] d = d[:dashind] #maybe it has a miliseconds ? dotind = string.rfind(d, '.') if dotind > 0: d = d[:dotind] try: return DateTime.strptime(d, '%H:%M:%S'), tz # timetz except: pass if 1:#try: # why is tz returned above and not here? return DateTime.strptime(d, '%Y-%m-%d %H:%M:%S') # full date #except: # pass
49e9959848d7e2577a2030348a986cd20779dbf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/49e9959848d7e2577a2030348a986cd20779dbf7/postconn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 225, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 738, 44, 5319, 49, 5319, 55, 2187, 1995, 61, 6456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 225, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 738, 44, 5319, 49, 5319, 55, 2187, 1995, 61, 6456, ...
c.query = self.form_result.get("serp_q")
c.query = self.form_result.get("serp_q", u"*")
def query(self): require.proposal.index() c.query = self.form_result.get("serp_q") self._query_pager() return formencode.htmlfill.render(render("search/results.html"), {'q': c.query, 'serp_q': c.query})
56f5e57ba62d4b4764e451041152bb3e3b1734ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/56f5e57ba62d4b4764e451041152bb3e3b1734ac/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 12, 2890, 4672, 2583, 18, 685, 8016, 18, 1615, 1435, 276, 18, 2271, 273, 365, 18, 687, 67, 2088, 18, 588, 2932, 550, 84, 67, 85, 3113, 582, 6, 7388, 13, 365, 6315, 2271, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 12, 2890, 4672, 2583, 18, 685, 8016, 18, 1615, 1435, 276, 18, 2271, 273, 365, 18, 687, 67, 2088, 18, 588, 2932, 550, 84, 67, 85, 3113, 582, 6, 7388, 13, 365, 6315, 2271, 67, 2...
command = config["transfers"]["afterfolder"].replace("$", utils.escapeCommand(folder)) os.system("%s &" % command)
command = [x.replace("$", folder) for x in config["transfers"]["afterfolder"].split(' ')] proc = Popen(command)
def FileDownload(self, msg): """ A file download is in progress""" needupdate = 1 config = self.eventprocessor.config.sections for i in self.downloads: if i.conn != msg.conn: continue try: if i.transfertimer is not None: i.transfertimer.cancel() curtime = time.time() i.currentbytes = msg.file.tell() if i.lastbytes is None: i.lastbytes = i.currentbytes if i.starttime is None: i.starttime = curtime if i.lasttime is None: i.lasttime = curtime - 1 #i.status = "%s" %(str(i.currentbytes)) i.status = "Transferring" oldelapsed = i.timeelapsed i.timeelapsed = curtime - i.starttime if curtime > i.starttime and i.currentbytes > i.offset: i.speed = (i.currentbytes - i.lastbytes)/(curtime - i.lasttime)/1024 if i.speed <= 0.0: i.timeleft = "∞" else: i.timeleft = self.getTime((i.size - i.currentbytes)/i.speed/1024) i.lastbytes = i.currentbytes i.lasttime = curtime if i.size > i.currentbytes: if oldelapsed == i.timeelapsed: needupdate = 0 #i.status = str(i.currentbytes) i.status = "Transferring" else: msg.file.close() basename = self.CleanPath(self.encode(string.split(i.filename,'\\')[-1], i.user)) downloaddir = config["transfers"]["downloaddir"] if i.path and i.path[0] == '/': folder = self.CleanPath(i.path) else: folder = os.path.join(downloaddir, self.encode(i.path)) if not os.access(folder, os.F_OK): os.makedirs(folder) (newname, identicalfile) = self.getRenamedEnhanced(os.path.join(folder, basename), msg.file.name) if newname: try: if win32: os.rename(msg.file.name, u"%s" % newname) else: os.rename(msg.file.name, newname) except OSError: try: f1 = open(msg.file.name, "rb") d = f1.read() if win32: f1 = open(u"%s" % newname, "wb") else: f1 = open(newname, "wb") f1.write(d) f1.close() os.remove(msg.file.name) except OSError: self.eventprocessor.logMessage(_("Couldn't move '%(tempfile)s' to '%(file)s'") % {'tempfile':self.decode(msg.file.name), 'file':self.decode(newname)}) i.status = "Finished" if newname: self.eventprocessor.logMessage(_("Download finished: %(file)s") % {'file':self.decode(newname)}) self.eventprocessor.logTransfer(_("Download finished: user %(user)s, file %(file)s") % {'user':i.user, 'file':self.decode(i.filename)}) else: self.eventprocessor.logMessage(_("File %(file)s is identical to %(identical)s, not saving.") % {'file':self.decode(msg.file.name), 'identical':identicalfile}) self.eventprocessor.logTransfer(_("Download finished but not saved since it's a duplicate: user %(user)s, file %(file)s") % {'user':i.user, 'file':self.decode(i.filename)}) self.queue.put(slskmessages.ConnClose(msg.conn)) #if i.speed is not None: #self.queue.put(slskmessages.SendSpeed(i.user, int(i.speed*1024))) #Removed due to misuse. Replaced by SendUploadSpeed i.conn = None if newname: if win32: self.addToShared(u"%s" % newname) else: self.addToShared(newname) self.eventprocessor.sendNumSharedFoldersFiles() self.SaveDownloads() self.downloadspanel.update(i) if config["transfers"]["shownotification"]: self.eventprocessor.frame.NewNotification(_("%(file)s downloaded from %(user)s") % {'user':i.user, "file":newname.rsplit(os.sep, 1)[1]}, title=_("Nicotine+ :: file downloaded"))
0d0924480854d90f7d8e3057496ba8dab38cb4a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/0d0924480854d90f7d8e3057496ba8dab38cb4a7/transfers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 7109, 12, 2890, 16, 1234, 4672, 3536, 432, 585, 4224, 353, 316, 4007, 8395, 1608, 2725, 273, 404, 642, 273, 365, 18, 2575, 8700, 18, 1425, 18, 11657, 364, 277, 316, 365, 18, 7813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1387, 7109, 12, 2890, 16, 1234, 4672, 3536, 432, 585, 4224, 353, 316, 4007, 8395, 1608, 2725, 273, 404, 642, 273, 365, 18, 2575, 8700, 18, 1425, 18, 11657, 364, 277, 316, 365, 18, 7813...
scope["dependents"],
expected_dependents,
def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose): """Compare the actual dependents to the expected ones.""" scope = {} try: execfile(list_file, scope) except: raise Error("Failed to load " + list_file) if verbose: print "Expected dependents:" print "\n".join(scope["dependents"]) print "Expected delayloaded:" print "\n".join(scope["delay_loaded"]) deps_result = Diff(pe_name, "dll", dependents, scope["dependents"], list_file) delayed_result = Diff(pe_name, "delay loaded dll", delay_loaded, scope["delay_loaded"], list_file) return max(deps_result, delayed_result)
3b89a9d679792f6875be3f1a7051ff0275d88306 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/3b89a9d679792f6875be3f1a7051ff0275d88306/dependencies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 4584, 4877, 12, 347, 67, 529, 16, 2447, 4877, 16, 4624, 67, 4230, 16, 666, 67, 768, 16, 3988, 4672, 3536, 8583, 326, 3214, 2447, 4877, 358, 326, 2665, 5945, 12123, 2146, 273, 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, 8553, 4584, 4877, 12, 347, 67, 529, 16, 2447, 4877, 16, 4624, 67, 4230, 16, 666, 67, 768, 16, 3988, 4672, 3536, 8583, 326, 3214, 2447, 4877, 358, 326, 2665, 5945, 12123, 2146, 273, 261...
outfile.write(outstr)
outfile.write(outstr.encode('utf-8'))
def run(self, path_to_output, opts, db): from calibre.utils.logging import Log
03c5a395f3f74199dbaa7968f18150e9d9aaf50b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/03c5a395f3f74199dbaa7968f18150e9d9aaf50b/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 589, 67, 869, 67, 2844, 16, 1500, 16, 1319, 4672, 628, 26139, 266, 18, 5471, 18, 11167, 1930, 1827, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 589, 67, 869, 67, 2844, 16, 1500, 16, 1319, 4672, 628, 26139, 266, 18, 5471, 18, 11167, 1930, 1827, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
tags[self.tagnum]['artist'] = fileref.tag().artist
tags[self.tagnum]['artist'] = tag.artist
def tags_win_update(self, window, tags, entries, entries_names): self.updating_edit_entries = True # Populate tags(). Note that we only retrieve info from the # file if the info hasn't already been changed: fileref = tagpy.FileRef(tags[self.tagnum]['fullpath']) if not tags[self.tagnum]['title-changed']: tags[self.tagnum]['title'] = fileref.tag().title if not tags[self.tagnum]['artist-changed']: tags[self.tagnum]['artist'] = fileref.tag().artist if not tags[self.tagnum]['album-changed']: tags[self.tagnum]['album'] = fileref.tag().album if not tags[self.tagnum]['year-changed']: tags[self.tagnum]['year'] = fileref.tag().year if not tags[self.tagnum]['track-changed']: tags[self.tagnum]['track'] = fileref.tag().track if not tags[self.tagnum]['genre-changed']: tags[self.tagnum]['genre'] = fileref.tag().genre if not tags[self.tagnum]['comment-changed']: tags[self.tagnum]['comment'] = fileref.tag().comment # Update interface: entries[0].set_text(self.tags_get_tag(tags[self.tagnum], 'title')) entries[1].set_text(self.tags_get_tag(tags[self.tagnum], 'artist')) entries[2].set_text(self.tags_get_tag(tags[self.tagnum], 'album')) if self.tags_get_tag(tags[self.tagnum], 'year') != 0: entries[3].set_text(str(self.tags_get_tag(tags[self.tagnum], 'year'))) else: entries[3].set_text('') if self.tags_get_tag(tags[self.tagnum], 'track') != 0: entries[4].set_text(str(self.tags_get_tag(tags[self.tagnum], 'track'))) else: entries[4].set_text('') entries[5].set_text(self.tags_get_tag(tags[self.tagnum], 'genre')) entries[6].set_text(self.tags_get_tag(tags[self.tagnum], 'comment')) self.curr_mpdpath = gobject.filename_display_name(tags[self.tagnum]['mpdpath']) filename = self.curr_mpdpath if not self.use_mpdpaths: filename = os.path.basename(filename) entries[7].set_text(filename) entries[0].select_region(0, len(entries[0].get_text())) entries[0].grab_focus() window.set_title(_("Edit Tags") + " - " + str(self.tagnum+1) + " " + _("of") + " " + str(len(tags))) self.updating_edit_entries = False # Update text colors as appropriate: for i in range(len(entries)-1): if tags[self.tagnum][entries_names[i] + '-changed']: self.tags_win_entry_changed(entries[i]) else: self.tags_win_entry_revert_color(entries[i]) self.tags_win_set_sensitive(window.action_area)
f46c857512301d1836864c51b4a0d938e9c1cf02 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/f46c857512301d1836864c51b4a0d938e9c1cf02/tagedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2342, 67, 8082, 67, 2725, 12, 2890, 16, 2742, 16, 2342, 16, 3222, 16, 3222, 67, 1973, 4672, 365, 18, 5533, 1776, 67, 4619, 67, 8219, 273, 1053, 468, 22254, 2342, 7675, 3609, 716, 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, 2342, 67, 8082, 67, 2725, 12, 2890, 16, 2742, 16, 2342, 16, 3222, 16, 3222, 67, 1973, 4672, 365, 18, 5533, 1776, 67, 4619, 67, 8219, 273, 1053, 468, 22254, 2342, 7675, 3609, 716, 732, ...
"--report_dir=%s" % (self._report_dir),
def __init__(self, options, args, test): # the known list of tests self._test_list = {"test_shell": self.TestTestShell, "unit": self.TestUnit, "net": self.TestNet, "ipc": self.TestIpc, "base": self.TestBase, "layout": self.TestLayout, "dll": self.TestDll, "layout_all": self.TestLayoutAll, "ui": self.TestUI}
80ed27631dfc12248faa97fe3e11cdf477a2ea19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/80ed27631dfc12248faa97fe3e11cdf477a2ea19/chrome_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 833, 16, 1842, 4672, 468, 326, 4846, 666, 434, 7434, 365, 6315, 3813, 67, 1098, 273, 12528, 3813, 67, 10304, 6877, 365, 18, 4709, 4709, 13220, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 702, 16, 833, 16, 1842, 4672, 468, 326, 4846, 666, 434, 7434, 365, 6315, 3813, 67, 1098, 273, 12528, 3813, 67, 10304, 6877, 365, 18, 4709, 4709, 13220, 1...
def check_format(ui, repo, hooktype, node, parent1, parent2):
def check_format(ui, repo, hooktype, node, parent1, parent2, **kwargs):
def check_format(ui, repo, hooktype, node, parent1, parent2): if hooktype != 'pretxncommit': raise AttributeError, \ "This hook is only meant for pretxncommit, not %s" % hooktype modified, added, removed, deleted, unknown, ignore, clean = repo.status() verbose = 0 stats = ValidationStats() for f in modified + added: validate(f, stats, verbose, None) if stats: stats.dump() result = ui.prompt("invalid formatting\n(i)gnore or (a)bort?", "^[ia]$", "a") if result.startswith('i'): pass elif result.startswith('a'): return True else: raise util.Abort(_("Invalid response: '%s'") % result) return False
08043c777f1f05f5e14581950013461f328965be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/08043c777f1f05f5e14581950013461f328965be/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2139, 12, 4881, 16, 3538, 16, 3953, 723, 16, 756, 16, 982, 21, 16, 982, 22, 16, 2826, 4333, 4672, 309, 3953, 723, 480, 296, 1484, 24790, 7371, 4278, 1002, 6394, 16, 521, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2139, 12, 4881, 16, 3538, 16, 3953, 723, 16, 756, 16, 982, 21, 16, 982, 22, 16, 2826, 4333, 4672, 309, 3953, 723, 480, 296, 1484, 24790, 7371, 4278, 1002, 6394, 16, 521, 315...
self.attr_content.append(AttributeGroupDefinition(self))
self.attr_content.append(AttributeGroupReference(self))
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) indx = 0 num = len(contents) #XXX ugly if not num: return component = SplitQName(contents[indx].getTagName())[1] if component == 'annotation': self.annotation = Annotation(self) self.annotation.fromDom(contents[indx]) indx += 1 component = SplitQName(contents[indx].getTagName())[1]
5b20f2b0904cc43a45210136aca4b3c019980b52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5b20f2b0904cc43a45210136aca4b3c019980b52/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 225, 24732, 273, 374, 818, 273, 562, 12, 3980, 13, 468, 15639, 2692...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 225, 24732, 273, 374, 818, 273, 562, 12, 3980, 13, 468, 15639, 2692...
self.processEndTag(impliedTagToken("p")) self.tree.insertElement(token) self.parser.framesetOK = False self.parser.phase = self.parser.phases["inTable"] def startTagVoidFormatting(self, token): self.tree.reconstructActiveFormattingElements() self.tree.insertElement(token) self.tree.openElements.pop() token["selfClosingAcknowledged"] = True self.parser.framesetOK = False def startTagParamSource(self, token): self.tree.insertElement(token) self.tree.openElements.pop() token["selfClosingAcknowledged"] = True def startTagHr(self, token): if self.tree.elementInScope("p"): self.endTagP(impliedTagToken("p")) self.tree.insertElement(token) self.tree.openElements.pop() token["selfClosingAcknowledged"] = True self.parser.framesetOK = False def startTagImage(self, token): self.parser.parseError("unexpected-start-tag-treated-as", {"originalName": "image", "newName": "img"}) self.processStartTag(impliedTagToken("img", "StartTag", attributes=token["data"], selfClosing=token["selfClosing"])) def startTagIsIndex(self, token): self.parser.parseError("deprecated-tag", {"name": "isindex"}) if self.tree.formPointer: return form_attrs = {} if "action" in token["data"]: form_attrs["action"] = token["data"]["action"] self.processStartTag(impliedTagToken("form", "StartTag", attributes=form_attrs)) self.processStartTag(impliedTagToken("hr", "StartTag")) self.processStartTag(impliedTagToken("label", "StartTag")) if "prompt" in token["data"]: prompt = token["data"]["prompt"] else: prompt = "This is a searchable index. Enter search keywords: " self.processCharacters( {"type":tokenTypes["Characters"], "data":prompt}) attributes = token["data"].copy() if "action" in attributes: del attributes["action"] if "prompt" in attributes: del attributes["prompt"] attributes["name"] = "isindex" self.processStartTag(impliedTagToken("input", "StartTag", attributes = attributes, selfClosing = token["selfClosing"])) self.processEndTag(impliedTagToken("label")) self.processStartTag(impliedTagToken("hr", "StartTag")) self.processEndTag(impliedTagToken("form")) def startTagTextarea(self, token): self.tree.insertElement(token) self.parser.tokenizer.state = self.parser.tokenizer.rcdataState self.processSpaceCharacters = self.processSpaceCharactersDropNewline self.parser.framesetOK = False def startTagIFrame(self, token): self.parser.framesetOK = False self.startTagRawtext(token) def startTagRawtext(self, token): """iframe, noembed noframes, noscript(if scripting enabled)""" self.parser.parseRCDataRawtext(token, "RAWTEXT") def startTagOpt(self, token): if self.tree.elementInScope("option"): self.parser.phase.processEndTag(impliedTagToken("option")) self.tree.reconstructActiveFormattingElements() self.parser.tree.insertElement(token) def startTagSelect(self, token): self.tree.reconstructActiveFormattingElements() self.tree.insertElement(token) self.parser.framesetOK = False if self.parser.phase in (self.parser.phases["inTable"], self.parser.phases["inCaption"], self.parser.phases["inColumnGroup"], self.parser.phases["inTableBody"], self.parser.phases["inRow"], self.parser.phases["inCell"]): self.parser.phase = self.parser.phases["inSelectInTable"] else: self.parser.phase = self.parser.phases["inSelect"] def startTagRpRt(self, token): if self.tree.elementInScope("ruby"): self.tree.generateImpliedEndTags() if self.tree.openElements[-1].name != "ruby": self.parser.parseError() while self.tree.openElements[-1].name != "ruby": self.tree.openElements.pop() self.tree.insertElement(token) def startTagMath(self, token): self.tree.reconstructActiveFormattingElements() self.parser.adjustMathMLAttributes(token) self.parser.adjustForeignAttributes(token) token["namespace"] = namespaces["mathml"] self.tree.insertElement(token) if self.parser.phase != self.parser.phases["inForeignContent"]: self.parser.secondaryPhase = self.parser.phase self.parser.phase = self.parser.phases["inForeignContent"] if token["selfClosing"]:
self.endTagP(impliedTagToken("p")) self.tree.reconstructActiveFormattingElements() self.parser.framesetOK = False self.parser.parseRCDataRawtext(token, "RAWTEXT") def startTagTable(self, token): if self.parser.compatMode != "quirks": if self.tree.elementInScope("p"): self.processEndTag(impliedTagToken("p")) self.tree.insertElement(token) self.parser.framesetOK = False self.parser.phase = self.parser.phases["inTable"] def startTagVoidFormatting(self, token): self.tree.reconstructActiveFormattingElements() self.tree.insertElement(token)
def startTagTable(self, token): if self.parser.compatMode != "quirks": if self.tree.elementInScope("p"): self.processEndTag(impliedTagToken("p")) self.tree.insertElement(token) self.parser.framesetOK = False self.parser.phase = self.parser.phases["inTable"]
5cc56a5db432ce478d90ee0dd744811935854947 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10463/5cc56a5db432ce478d90ee0dd744811935854947/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 1388, 12, 2890, 16, 1147, 4672, 309, 365, 18, 4288, 18, 16239, 2309, 480, 315, 372, 31926, 6877, 309, 365, 18, 3413, 18, 2956, 382, 3876, 2932, 84, 6, 4672, 365, 18, 2567, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1805, 1388, 12, 2890, 16, 1147, 4672, 309, 365, 18, 4288, 18, 16239, 2309, 480, 315, 372, 31926, 6877, 309, 365, 18, 3413, 18, 2956, 382, 3876, 2932, 84, 6, 4672, 365, 18, 2567, ...
path = [module.__filename__]
head, tail = os.path.split(module.__filename__) path = [head]
def reload(self, module, path=None): if path is None and hasattr(module, '__filename__'): path = [module.__filename__] return ihooks.ModuleImporter.reload(self, module, path)
18596003572b715d57ecb6d357cebc4257c0bb31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/18596003572b715d57ecb6d357cebc4257c0bb31/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 12, 2890, 16, 1605, 16, 589, 33, 7036, 4672, 309, 589, 353, 599, 471, 3859, 12, 2978, 16, 4940, 3459, 7250, 4672, 910, 16, 5798, 273, 1140, 18, 803, 18, 4939, 12, 2978, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7749, 12, 2890, 16, 1605, 16, 589, 33, 7036, 4672, 309, 589, 353, 599, 471, 3859, 12, 2978, 16, 4940, 3459, 7250, 4672, 910, 16, 5798, 273, 1140, 18, 803, 18, 4939, 12, 2978, 16186, ...
schedule.removeEvent(self.name)
schedule.removeEvent(self.name())
def die(self): global queue if self.db: try: self.db.close() except: pass try: self.thread_timer.cancel() except: pass queue.clear() try: schedule.removeEvent(self.name) except: pass
e60e72a6204dc1ea7e88a82fb46f79c4b759e244 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3124/e60e72a6204dc1ea7e88a82fb46f79c4b759e244/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10387, 12, 2890, 4672, 2552, 2389, 309, 365, 18, 1966, 30, 775, 30, 365, 18, 1966, 18, 4412, 1435, 1335, 30, 1342, 775, 30, 365, 18, 5930, 67, 12542, 18, 10996, 1435, 1335, 30, 1342, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10387, 12, 2890, 4672, 2552, 2389, 309, 365, 18, 1966, 30, 775, 30, 365, 18, 1966, 18, 4412, 1435, 1335, 30, 1342, 775, 30, 365, 18, 5930, 67, 12542, 18, 10996, 1435, 1335, 30, 1342, ...
long_description = 'M2Crypto is a wrapper for OpenSSL using SWIG.',
long_description = '''\ M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and servers; HTTPS extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCookies for web session management; FTP/TLS client and server; S/MIME; ZServerSSL: A HTTPS server for Zope and ZSmime: An S/MIME messenger for Zope. M2Crypto can also be used to provide SSL for Twisted.''',
def swig_sources (self, sources):
f688b68aa174b1af3f9b9b6172785dbc4cdf41d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10522/f688b68aa174b1af3f9b9b6172785dbc4cdf41d5/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 261, 2890, 16, 5550, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 261, 2890, 16, 5550, 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...
managerKind = self.rep['manager'] assistantManager = managerKind.newItem('assistant', self.rep)
def testDictReferenceAttributes(self): """Test dictionary valued bidirectional references""" (managerKind, employeeKind) = self._createManagerAndEmployeeKinds('dict')
8c432c03e73d471728ad37bb90bd05aa0215764e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8c432c03e73d471728ad37bb90bd05aa0215764e/TestReferenceAttributes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5014, 2404, 2498, 12, 2890, 4672, 3536, 4709, 3880, 31037, 9949, 24699, 5351, 8395, 261, 4181, 5677, 16, 24539, 1340, 5677, 13, 273, 365, 6315, 2640, 1318, 1876, 41, 27520, 5677, 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, 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, 5014, 2404, 2498, 12, 2890, 4672, 3536, 4709, 3880, 31037, 9949, 24699, 5351, 8395, 261, 4181, 5677, 16, 24539, 1340, 5677, 13, 273, 365, 6315, 2640, 1318, 1876, 41, 27520, 5677, 87,...
import spambayes.message
def reversed(seq): seq = list(seq[:]) seq.reverse() return iter(seq)
92e4effa0b9de0f61a09c5361c64d1f3784b872f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/92e4effa0b9de0f61a09c5361c64d1f3784b872f/sb_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9553, 12, 5436, 4672, 3833, 273, 666, 12, 5436, 10531, 5717, 3833, 18, 9845, 1435, 327, 1400, 12, 5436, 13, 2, 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, 9553, 12, 5436, 4672, 3833, 273, 666, 12, 5436, 10531, 5717, 3833, 18, 9845, 1435, 327, 1400, 12, 5436, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
A :py:class:`ElfFileHeader` represeing the byte order and word size dependent portion of the ELF format file header.
A :py:class:`ElfFileHeader` representing the byte order and word size dependent portion of the ELF format file header.
def __ne__(self, other): return not self.__eq__(other)
5c9e4f8403ad11464cdd6769d261ac9ea6b7b84a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5904/5c9e4f8403ad11464cdd6769d261ac9ea6b7b84a/elffile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 486, 365, 16186, 11253, 972, 12, 3011, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 486, 365, 16186, 11253, 972, 12, 3011, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
sale_order_line()
sale_order_line()
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = self.pool.get('account.analytic.default').account_get(cr, uid, line.product_id.id, sale_line_obj.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context) if rec: pool_inv_line.write(cr, uid, [line.id], {'account_analytic_id':rec.analytic_id.id}, context=context) return create_ids
c4a5925fb0ea6191531b93530d7f14b03542b013 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c4a5925fb0ea6191531b93530d7f14b03542b013/account_analytic_default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9179, 67, 1369, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 752, 67, 2232, 273, 2240, 12, 87, 5349, 67, 1019, 67, 1369, 16, 2890, 2934, 16119, 67, 1369, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9179, 67, 1369, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 752, 67, 2232, 273, 2240, 12, 87, 5349, 67, 1019, 67, 1369, 16, 2890, 2934, 16119, 67, 1369, 6...
search = self.get_handler(search_name)
search = self.get_object(search_name)
def view(self, context): # Set Style css = Path(self.abspath).get_pathto('/ui/tracker/tracker.css') context.styles.append(str(css))
1fa77be5b783398ca5fc70ac4c6bcf0d082732e2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/1fa77be5b783398ca5fc70ac4c6bcf0d082732e2/tracker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 2890, 16, 819, 4672, 468, 1000, 9767, 3747, 273, 2666, 12, 2890, 18, 5113, 803, 2934, 588, 67, 803, 869, 2668, 19, 4881, 19, 16543, 19, 16543, 18, 5212, 6134, 819, 18, 10218,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 2890, 16, 819, 4672, 468, 1000, 9767, 3747, 273, 2666, 12, 2890, 18, 5113, 803, 2934, 588, 67, 803, 869, 2668, 19, 4881, 19, 16543, 19, 16543, 18, 5212, 6134, 819, 18, 10218,...
(a.bbababbaaba.bba)
(a, bbababbaaba, bba) sage: Word([1,2,1,3,1,2,1]).lyndon_factorization() (1213, 12, 1)
def lyndon_factorization(self): r""" Returns the Lyndon factorization of self. The *Lyndon factorization* of a finite word `w` is the unique factorization of `w` as a non-increasing product of Lyndon words, i.e., `w = l_1\cdots l_n` where each `l_i` is a Lyndon word and `l_1\geq \cdots \geq l_n`. See for instance [1]. OUTPUT:
b0ba0fe22bb130cc7503f5abe181d318f232b48e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b0ba0fe22bb130cc7503f5abe181d318f232b48e/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 878, 19752, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 511, 878, 19752, 5578, 1588, 434, 365, 18, 225, 1021, 380, 48, 878, 19752, 5578, 1588, 14, 434, 279, 25922, 2076, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 328, 878, 19752, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 511, 878, 19752, 5578, 1588, 434, 365, 18, 225, 1021, 380, 48, 878, 19752, 5578, 1588, 14, 434, 279, 25922, 2076, ...
node_list = self.acquired_locks[locking.LEVEL_NODE] valid_nodes = [node for node in self.cfg.GetOnlineNodeList() if node in node_list]
valid_nodes = [node for node in self.cfg.GetOnlineNodeList()]
def Exec(self, feedback_fn): """Compute the list of OSes.
a6ab004bb9e1789599bf904390e5a3f2bad00beb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/a6ab004bb9e1789599bf904390e5a3f2bad00beb/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 7018, 326, 666, 434, 5932, 281, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 7018, 326, 666, 434, 5932, 281, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return
return 'break'
def check_module_event(self, event): filename = self.getfilename() if not filename: return if not self.checksyntax(filename): return if not self.tabnanny(filename): return
1adb239ef3ebf62b7cd46fc2588e4c8920d11370 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/1adb239ef3ebf62b7cd46fc2588e4c8920d11370/ScriptBinding.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2978, 67, 2575, 12, 2890, 16, 871, 4672, 1544, 273, 365, 18, 588, 3459, 1435, 309, 486, 1544, 30, 327, 296, 8820, 11, 309, 486, 365, 18, 12366, 5392, 12, 3459, 4672, 327, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2978, 67, 2575, 12, 2890, 16, 871, 4672, 1544, 273, 365, 18, 588, 3459, 1435, 309, 486, 1544, 30, 327, 296, 8820, 11, 309, 486, 365, 18, 12366, 5392, 12, 3459, 4672, 327, 29...
log_view.connect ("notify::model", self.handle_log_view_notify_model)
def attach (self, window): self.line_view = window.widgets.line_view self.line_view.connect ("row-activated", self.handle_line_view_row_activated)
10e3fc489ba276a6d19ca633159bb353ce440945 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12310/10e3fc489ba276a6d19ca633159bb353ce440945/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3306, 261, 2890, 16, 2742, 4672, 225, 365, 18, 1369, 67, 1945, 273, 2742, 18, 18148, 18, 1369, 67, 1945, 365, 18, 1369, 67, 1945, 18, 3612, 7566, 492, 17, 18836, 3113, 365, 18, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3306, 261, 2890, 16, 2742, 4672, 225, 365, 18, 1369, 67, 1945, 273, 2742, 18, 18148, 18, 1369, 67, 1945, 365, 18, 1369, 67, 1945, 18, 3612, 7566, 492, 17, 18836, 3113, 365, 18, 4110, ...
stats['years'][year] = 0 stats['years'][year] += (trip['finishdate']-year_start).days
stats['years'][year] = { 'duration': 0, 'trips': 0 } stats['years'][year]['duration'] += (trip['finishdate']-year_start).days
def build_stats(trip_list, traveller_info): # TODO break this apart and/or do similar things in subroutines # TODO build more year metadata stats = {'countries': {}, 'cities': {}, 'years': {}, 'home': { 'trips': 0, 'duration':0, }, 'away': { 'trips': 0, 'duration':0, }, 'future': 0, 'types': {}, 'ordered': {}, } home_country = traveller_info['home_city']['country'] for trip in trip_list: # skip if not a past trip if trip['status'] != "Past": if trip['status'] == "Ongoing": stats['current'] = trip['city']['name'] else: stats['future'] += 1 continue # how long (simple version...) # TODO never double count date duration = trip['finishdate'] - trip['startdate'] # build country data country = trip['city']['country'] display = country inline = country # special casing! if not country.find("United"): # TODO there's something wrong here... inline = "the "+country # TODO and this should be a hash anyway if not country.find("Hong Kong"): display = "Hong Kong" inline = "Hong Kong" # stuff info into the data structure if not country in stats['countries']: stats['countries'][country] = { 'duration': 0, 'trips': 0, 'display':display, 'inline':inline, 'code':trip['city']['country_code'], 'rgb':md5.new(country).hexdigest()[0:6]} stats['countries'][country]['duration'] += duration.days stats['countries'][country]['trips'] += 1 if not trip['return_transport_type'] in stats['types']: stats['types'][trip['return_transport_type']] = {'trips':0} stats['types'][trip['return_transport_type']]['trips'] += 0.5 if not trip['outgoing_transport_type'] in stats['types']: stats['types'][trip['outgoing_transport_type']] = {'trips':0} stats['types'][trip['outgoing_transport_type']]['trips'] += 0.5 if (country == home_country): stats['home']['trips'] += 1; stats['home']['duration'] += duration.days else: stats['away']['trips'] += 1; stats['away']['duration'] += duration.days # build city data city = trip['city']['name'] rgb = trip['city']['rgb'] if not city in stats['cities']: stats['cities'][city] = { 'duration': 0, 'trips': 0, 'rgb':rgb, 'country':country} stats['cities'][city]['duration'] += duration.days stats['cities'][city]['trips'] += 1 # build year data year = trip['startdate'].year if not year in stats['years']: stats['years'][year] = 0 if year == trip['finishdate'].year: stats['years'][year] += duration.days else: if trip['finishdate'].year - year == 1: # spans a single year boundary, and is therefore Sane # if there's *anyone* who has a trip spanning two, they can bloody # well write this themselves. Otherwise, assume they mean they're # living there now. Onwards... year_end = datetime(year, 12, 31) stats['years'][year] += (year_end-trip['startdate']).days year = trip['finishdate'].year year_start = datetime(year, 1, 1) if not year in stats['years']: stats['years'][year] = 0 stats['years'][year] += (trip['finishdate']-year_start).days # do we want to supply full-blown cross-cut stats? maybe later... # reorder final stats stats['ordered']['years'] = sorted(stats['years']) stats['ordered']['years'].reverse() stats['ordered']['types'] = sorted(stats['types'], lambda x, y: (int(stats['types'][y]['trips']))-(int(stats['types'][x]['trips']))) stats['ordered']['years_by_trip'] = sorted(stats['years'], lambda x, y: (stats['years'][y])-(stats['years'][x])) stats['ordered']['countries'] = sorted(stats['countries'], lambda x, y: (stats['countries'][y]['duration'])-(stats['countries'][x]['duration'])) stats['ordered']['cities'] = sorted(stats['cities'], lambda x, y: (stats['cities'][y]['duration'])-(stats['cities'][x]['duration'])) start = 160 stats['rgb'] = stats['countries'][stats['ordered']['countries'][0]]['rgb'] stats['rgb_start'] = "%x%x%x" % (start, start, start) # scale country stats for map (including colours) topcountry = stats['ordered']['countries'][0] topduration = stats['countries'][topcountry]['duration'] r = stats['rgb'][0:2]; g = stats['rgb'][2:4]; b = stats['rgb'][4:6] for country in stats['countries'].keys(): scaled = 100*stats['countries'][country]['duration']/topduration sr = (scaled*(int(r, 16)-start)/100)+start sg = (scaled*(int(g, 16)-start)/100)+start sb = (scaled*(int(b, 16)-start)/100)+start stats['countries'][country]['scaled'] = scaled stats['countries'][country]['rgb_scaled'] = "%x%x%x" % (sr, sg, sb) # scale transport types toptype = stats['ordered']['types'][0] toptrip = int(stats['types'][toptype]['trips']) for type in stats['types'].keys(): stats['types'][type]['scaled'] = 100*int(stats['types'][type]['trips'])/toptrip # scale days on trips stats['topyear'] = stats['ordered']['years_by_trip'][0] stats['away']['days'] = (stats['years'][stats['topyear']])/3.66 stats['home']['days'] = (366-stats['years'][stats['topyear']])/3.66 return stats
1c67bb5808334c681c6ba34ea3f5485a4f220770 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/1c67bb5808334c681c6ba34ea3f5485a4f220770/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5296, 12, 25125, 67, 1098, 16, 29090, 749, 67, 1376, 4672, 468, 2660, 898, 333, 513, 485, 471, 19, 280, 741, 7281, 9198, 316, 720, 7028, 1465, 468, 2660, 1361, 1898, 3286, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5296, 12, 25125, 67, 1098, 16, 29090, 749, 67, 1376, 4672, 468, 2660, 898, 333, 513, 485, 471, 19, 280, 741, 7281, 9198, 316, 720, 7028, 1465, 468, 2660, 1361, 1898, 3286, 19...
self.resource_index[prefix] = 1 return self.resource_index[prefix]
self.key_cache['idx_' + prefix] = '1'; return self.key_cache['idx_' + prefix]
def get_next_resource_index(self, prefix): if self.resource_index.has_key(prefix): self.resource_index[prefix] += 1 else: self.resource_index[prefix] = 1 return self.resource_index[prefix]
02cf5291fc029decc1161f03e51e28c2900474a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4788/02cf5291fc029decc1161f03e51e28c2900474a0/json2rdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 3146, 67, 1615, 12, 2890, 16, 1633, 4672, 309, 365, 18, 3146, 67, 1615, 18, 5332, 67, 856, 12, 3239, 4672, 365, 18, 3146, 67, 1615, 63, 3239, 65, 1011, 404, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4285, 67, 3146, 67, 1615, 12, 2890, 16, 1633, 4672, 309, 365, 18, 3146, 67, 1615, 18, 5332, 67, 856, 12, 3239, 4672, 365, 18, 3146, 67, 1615, 63, 3239, 65, 1011, 404, 469, ...
if ch not in '0123456789.':
if ch not in '0123456789.-':
def ParseFromCodeElements(self, CodeElements, ProcName, Procedures): ErrProcName = ProcName or 'global' elemtype = CodeElements[0][0] # check for the easy ones first if elemtype == ElemType.QUOTED_WORD: elem = CodeElements.pop(0) self.ArgType = ParamType.QUOTEDWORD self.Elements.append(Element(ElemType.QUOTED_WORD, elem[1])) return True elif elemtype == ElemType.OPEN_BRACKET: CodeElements.pop(0) bracketDepth = 1 # assume that it's a numeric list at the start, and if any non-numbers are found then we'll call it a code list instead self.ArgType = ParamType.LISTNUM while len(CodeElements) > 0: elem = CodeElements.pop(0) if elem[0] == ElemType.OPEN_BRACKET: bracketDepth += 1 if elem[0] == ElemType.CLOSE_BRACKET: bracketDepth -= 1 if bracketDepth == 0: break self.Elements.append(Element(elem[0], elem[1])) for ch in elem[1]: if ch not in '0123456789.': self.ArgType = ParamType.LISTCODE # check bracket pairing if bracketDepth != 0: print "Syntax error: List ended with unclosed bracket in procedure '%s'" % ErrProcName return False # set elements to NUMBER type if this is a LISTNUM if self.ArgType == ParamType.LISTNUM: for elem in self.Elements: elem.Type = ElemType.NUMBER return True # otherwise, assume that we are parsing either a boolean or numeric expression parenDepth = 0 while len(CodeElements) > 0: elem = CodeElements.pop(0) if elem[0] == ElemType.OPEN_BRACKET or elem[0] == ElemType.CLOSE_BRACKET: print "Syntax error: invalid bracket '%s' found in expression in procedure '%s'" % (elem[1], ErrProcName) return False elif elem[0] == ElemType.OPEN_PAREN: # check for parenthesized built-in procedure calls bSpecialProc = False if CodeElements[0][0] == ElemType.UNQUOT_WORD: name = CodeElements[0][1] procs = [ proc for proc in Builtin._procs if proc.bParenthesized and (proc.FullName == name.lower() or proc.AbbrevName == name.lower()) ] if len(procs) > 0: # okay, we're looking at a special instruction form CodeElements.pop(0) # pop the instruction name itself # first, extract a code element stream for only this instruction InstrElements = [] InstrParen = 1 while len(CodeElements) > 0: elem = CodeElements.pop(0) if elem[0] == ElemType.OPEN_PAREN: InstrParen += 1 elif elem[0] == ElemType.CLOSE_PAREN: InstrParen -= 1 if InstrParen == 0: break InstrElements.append(elem) # now, create the special instruction and check that all elements were used Instruct = Instruction(name, True, procs[0].nParams, True, procs[0].bExtraArgs) if not Instruct.GetArguments(InstrElements, ProcName, Procedures): return False if len(InstrElements) > 0: print "Syntax error: extraneous code in parenthesized instruction '%s' in procedure '%s'" % (name, ErrProcName) return False self.Elements.append(Element(ElemType.FUNC_CALL, name, Instruct)) bSpecialProc = True if not bSpecialProc: # nope, just a regular old parenthesis parenDepth += 1 self.Elements.append(Element(ElemType.OPEN_PAREN, elem[1])) if len(CodeElements) == 0: print "Syntax error: hanging open-parenthesis in procedure '%s'" % ErrProcName return False if CodeElements[0][0] == ElemType.CLOSE_PAREN: print "Syntax error: empty parenthesis pair in procedure '%s'" % ErrProcName return False if CodeElements[0][0] == ElemType.QUOTED_WORD or CodeElements[0][0] == ElemType.INFIX_BOOL or (CodeElements[0][0] == ElemType.INFIX_NUM and CodeElements[0][1] != '-'): print "Syntax error: invalid symbol '%s' after open-parenthesis in procedure '%s'" % (CodeElements[0][1], ErrProcName) return False continue elif elem[0] == ElemType.CLOSE_PAREN: if parenDepth == 0: print "Syntax error: unmatched close-parenthesis in procedure '%s'" % ErrProcName return False parenDepth -= 1 self.Elements.append(Element(ElemType.CLOSE_PAREN, elem[1])) # handle a sub-procedure call elif elem[0] == ElemType.UNQUOT_WORD: # push the procedure name back on the element list and call the parser function CodeElements.insert(0, elem) Instruct = Parser.GetSingleInstruction(CodeElements, ProcName, Procedures) if Instruct is None: return False self.Elements.append(Element(ElemType.FUNC_CALL, elem[1], Instruct)) # handle values elif elem[0] == ElemType.NUMBER or elem[0] == ElemType.BOOLEAN or elem[0] == ElemType.VAR_VALUE: self.Elements.append(Element(elem[0], elem[1])) # handle infix operators elif elem[0] == ElemType.INFIX_NUM or elem[0] == ElemType.INFIX_BOOL: self.Elements.append(Element(elem[0], elem[1])) if len(CodeElements) == 0: print "Syntax error: hanging infix '%s' in expression in procedure '%s'" % (elem[1], ErrProcName) return False if CodeElements[0][0] == ElemType.CLOSE_PAREN: print "Syntax error: missing value between '%s' and '%s' in procedure '%s'" % (elem[1], CodeElements[0][1], ErrProcName) return False if CodeElements[0][0] == ElemType.QUOTED_WORD or CodeElements[0][0] == ElemType.INFIX_BOOL or (CodeElements[0][0] == ElemType.INFIX_NUM and CodeElements[0][1] != '-'): print "Syntax error: invalid symbol '%s' after operator '%s' in procedure '%s'" % (CodeElements[0][1], elem[1], ErrProcName) return False continue # unknown element type or bug else: print "Syntax error: unknown element code %i in text '%s' from procedure '%s'" % (int(elem[0]), elem[1], ErrProcName) return False if len(CodeElements) == 0: break if CodeElements[0][0] == ElemType.CLOSE_PAREN and parenDepth > 0: continue if CodeElements[0][0] != ElemType.INFIX_BOOL and CodeElements[0][0] != ElemType.INFIX_NUM: break # check parenthesis depth if parenDepth != 0: print "Syntax error: Expression ended with unclosed parenthesis in procedure '%s'. Missing operator or closing parenthesis?" % ErrProcName return False return True
49a0e390992c4152d88037a0e815bd6293fcec1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2419/49a0e390992c4152d88037a0e815bd6293fcec1f/tt_instruction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1265, 1085, 3471, 12, 2890, 16, 3356, 3471, 16, 18470, 461, 16, 1186, 23382, 4672, 1926, 15417, 461, 273, 18470, 461, 578, 296, 6347, 11, 3659, 723, 273, 3356, 3471, 63, 20, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2884, 1265, 1085, 3471, 12, 2890, 16, 3356, 3471, 16, 18470, 461, 16, 1186, 23382, 4672, 1926, 15417, 461, 273, 18470, 461, 578, 296, 6347, 11, 3659, 723, 273, 3356, 3471, 63, 20, 6362, ...
return round(math.exp(dx / SCALE) * rescale)
return round(exp(dx / SCALE) * rescale)
def _calc_log(dx): """ C and D scales """ rescale = 1 if dx < 0: rescale = 0.1 dx += SWIDTH - (2.0 * OFFSET) return round(math.exp(dx / SCALE) * rescale)
5fa09bcbc8e023850510305ca87bc00a475677be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5595/5fa09bcbc8e023850510305ca87bc00a475677be/window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12448, 67, 1330, 12, 13437, 4672, 3536, 385, 471, 463, 18211, 3536, 30323, 273, 404, 309, 6633, 411, 374, 30, 30323, 273, 374, 18, 21, 6633, 1011, 348, 10023, 300, 261, 22, 18, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12448, 67, 1330, 12, 13437, 4672, 3536, 385, 471, 463, 18211, 3536, 30323, 273, 404, 309, 6633, 411, 374, 30, 30323, 273, 374, 18, 21, 6633, 1011, 348, 10023, 300, 261, 22, 18, 20...
'date': fields.datetime('Date Planned', required=True, help="Scheduled date for the movement of the products or real date if the move is done."),
'date': fields.datetime('Date ', required=True, help="Scheduled date for the movement of the products or real date if the move is done."),
def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return True
cec285803f60dbc6936e9033a2466184277695a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cec285803f60dbc6936e9033a2466184277695a0/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 5896, 67, 23372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 3536, 13074, 2856, 3635, 353, 2731, 578, 486, 471, 12449, 17417, 353, 6958, 358, 716, 3635, 18, 632, 2463, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 5896, 67, 23372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 3536, 13074, 2856, 3635, 353, 2731, 578, 486, 471, 12449, 17417, 353, 6958, 358, 716, 3635, 18, 632, 2463, ...
raise AutotestError("No cpuset support; please reboot")
raise AutotestError('No cpuset support; please reboot')
def __init__(self, name, job_size, job_pid, cpus = None, root = "", cleanup = 1): # Create a cpuset container and move job_pid into it # Allocate the list "cpus" of cpus to that container
2ac58557e6c7f67ec6179d552758aacdd5e082af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/2ac58557e6c7f67ec6179d552758aacdd5e082af/cpuset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1719, 67, 1467, 16, 1719, 67, 6610, 16, 20620, 273, 599, 16, 1365, 273, 23453, 6686, 273, 404, 4672, 468, 1788, 279, 20620, 278, 1478, 471, 3635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1719, 67, 1467, 16, 1719, 67, 6610, 16, 20620, 273, 599, 16, 1365, 273, 23453, 6686, 273, 404, 4672, 468, 1788, 279, 20620, 278, 1478, 471, 3635...
def getchild(self, child_name='', role=''): matches = self._remote_getchild(child_name, role, True) if matches: if role: return [Component(self._window_name, matches[0])] else: return Component(self._window_name, matches[0]) else: return None
def getchild(self, child_name='', role=''): # TODO: Bad API choice. Inconsistent, should return object or list, # not both. UPDATE: Only returns first match. matches = self._remote_getchild(child_name, role, True) if matches: if role: return [Component(self._window_name, matches[0])] else: return Component(self._window_name, matches[0]) else: return None
013692654065af9a83de517d76b3e3ef6da24f65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11266/013692654065af9a83de517d76b3e3ef6da24f65/_context.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3624, 12, 2890, 16, 1151, 67, 529, 2218, 2187, 2478, 2218, 11, 4672, 468, 2660, 30, 6107, 1491, 6023, 18, 657, 16952, 16, 1410, 327, 733, 578, 666, 16, 468, 486, 3937, 18, 11028, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3624, 12, 2890, 16, 1151, 67, 529, 2218, 2187, 2478, 2218, 11, 4672, 468, 2660, 30, 6107, 1491, 6023, 18, 657, 16952, 16, 1410, 327, 733, 578, 666, 16, 468, 486, 3937, 18, 11028, ...
log.error("cannot open file")
if must_exist: log.error("cannot open file")
def updateFromFile( self, filename ): filename = os.path.expanduser(filename) log.debug("DeviceList::updateFromFile(%s)" % filename) if not os.path.exists( filename ): log.error("cannot open file") return f = open( filename, "r" )
48c2633ecc007e78f6acbf2057c447f0b85090e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11526/48c2633ecc007e78f6acbf2057c447f0b85090e5/ffado_configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13087, 12, 365, 16, 1544, 262, 30, 1544, 273, 1140, 18, 803, 18, 12320, 1355, 12, 3459, 13, 613, 18, 4148, 2932, 3654, 682, 2866, 2725, 13087, 9275, 87, 2225, 738, 1544, 13, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13087, 12, 365, 16, 1544, 262, 30, 1544, 273, 1140, 18, 803, 18, 12320, 1355, 12, 3459, 13, 613, 18, 4148, 2932, 3654, 682, 2866, 2725, 13087, 9275, 87, 2225, 738, 1544, 13, 309,...
branch})
'branch': branch})
def mass_branch(self, branch): '''Mass branch all packages listed as non-blocked in koji to the pkgdb.
440c5a282ae0f064b7d2e079e8595945d028218d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/440c5a282ae0f064b7d2e079e8595945d028218d/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8039, 67, 7500, 12, 2890, 16, 3803, 4672, 9163, 18060, 3803, 777, 5907, 12889, 487, 1661, 17, 23156, 316, 417, 10089, 358, 326, 3475, 1966, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8039, 67, 7500, 12, 2890, 16, 3803, 4672, 9163, 18060, 3803, 777, 5907, 12889, 487, 1661, 17, 23156, 316, 417, 10089, 358, 326, 3475, 1966, 18, 2, -100, -100, -100, -100, -100, -100, -10...
template = MarkupTemplate(open(self.templateFilename).read())
template = MarkupTemplate(open("output.xml").read())
def generateResponseStream(self, source, tree): template = MarkupTemplate(open(self.templateFilename).read()) treeHighlighter = ParseTreeHighlighter() htmlHighlighter = InnerHTMLHighlighter()
3b14c655b07ad4ef53f5808b444994bf55d99683 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5033/3b14c655b07ad4ef53f5808b444994bf55d99683/parsetree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 1064, 1228, 12, 2890, 16, 1084, 16, 2151, 4672, 1542, 273, 26420, 2283, 12, 3190, 2932, 2844, 18, 2902, 20387, 896, 10756, 2151, 8573, 23624, 273, 2884, 2471, 8573, 23624, 1435, 1729...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 1064, 1228, 12, 2890, 16, 1084, 16, 2151, 4672, 1542, 273, 26420, 2283, 12, 3190, 2932, 2844, 18, 2902, 20387, 896, 10756, 2151, 8573, 23624, 273, 2884, 2471, 8573, 23624, 1435, 1729...
if m.t == 0:
if m.t == False:
def CalculateStats(self): self.Reset() for msg in msginfoDB.db.keys(): self.total += 1 m = self.__empty_msg() m.id = msg msginfoDB._getState(m) if m.c == 's': self.cls_spam += 1 if m.t == 0: self.fp += 1 elif m.c == 'h': self.cls_ham += 1 if m.t == 1: self.fn += 1 elif m.c == 'u': self.cls_unsure += 1 if m.t == 0: self.trn_unsure_ham += 1 elif m.t == 1: self.trn_unsure_spam += 1 if m.t == 1: self.trn_spam += 1 elif m.t == 0: self.trn_ham += 1
51a6f5ed8ec5cb7e073dfc40ca20067578f180de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/51a6f5ed8ec5cb7e073dfc40ca20067578f180de/Stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9029, 4195, 12, 2890, 4672, 365, 18, 7013, 1435, 364, 1234, 316, 1234, 1376, 2290, 18, 1966, 18, 2452, 13332, 365, 18, 4963, 1011, 404, 312, 273, 365, 16186, 5531, 67, 3576, 1435, 312, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4195, 12, 2890, 4672, 365, 18, 7013, 1435, 364, 1234, 316, 1234, 1376, 2290, 18, 1966, 18, 2452, 13332, 365, 18, 4963, 1011, 404, 312, 273, 365, 16186, 5531, 67, 3576, 1435, 312, ...
if var == fld or (var == True and fld) or (fld == True and var):
if var == fld:
def tmpl_is_selected(self, var, fld): """ Checks if *var* and *fld* are equal, and if yes, returns ' selected'. Useful for select boxes.
2a6e158305f7ee6a2932326b0e81fcbe279f205f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/2a6e158305f7ee6a2932326b0e81fcbe279f205f/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 291, 67, 8109, 12, 2890, 16, 569, 16, 9880, 4672, 3536, 13074, 309, 380, 1401, 14, 471, 380, 19794, 14, 854, 3959, 16, 471, 309, 12465, 16, 1135, 296, 3170, 10332, 225, 1925...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 291, 67, 8109, 12, 2890, 16, 569, 16, 9880, 4672, 3536, 13074, 309, 380, 1401, 14, 471, 380, 19794, 14, 854, 3959, 16, 471, 309, 12465, 16, 1135, 296, 3170, 10332, 225, 1925...
print 'Patch directory %s is not empty.' % self.__name
print 'Patch directory %s is not empty.' % self.__patch_dir
def convert(self): """Either convert to use a separate patch directory, or unconvert to place the patches in the same directory with series control files """ if self.__patch_dir == self._dir(): print 'Converting old-style to new-style...', sys.stdout.flush()
737f3549994c21182fe9339910ccdbdb9fcde3c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/737f3549994c21182fe9339910ccdbdb9fcde3c7/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 12, 2890, 4672, 3536, 26091, 1765, 358, 999, 279, 9004, 4729, 1867, 16, 578, 23980, 1097, 358, 3166, 326, 16482, 316, 326, 1967, 1867, 598, 4166, 3325, 1390, 3536, 309, 365, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1765, 12, 2890, 4672, 3536, 26091, 1765, 358, 999, 279, 9004, 4729, 1867, 16, 578, 23980, 1097, 358, 3166, 326, 16482, 316, 326, 1967, 1867, 598, 4166, 3325, 1390, 3536, 309, 365, 16186, ...
MAXSDK[version] = top + "maxsdk\\"
MAXSDK[version] = top + "maxsdk"
def parseopts(args): global PREFIX,COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,PPGAME global COPYEXTRAS,VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE longopts = [ "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=", "optimize=","everything","nothing","installer","ppgame=","quiet","verbose", "complete","version=","lzma"] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--package-info"): raise "package-info" elif (option=="--prefix"): PREFIX=value elif (option=="--compiler"): COMPILER=value elif (option=="--directx-sdk"): DIRECTXSDK=value elif (option=="--thirdparty"): THIRDPARTY=value elif (option=="--optimize"): OPTIMIZE=value elif (option=="--quiet"): VERBOSE-=1 elif (option=="--verbose"): VERBOSE+=1 elif (option=="--installer"): INSTALLER=1 elif (option=="--ppgame"): PPGAME=value elif (option=="--complete"): COMPLETE=1 elif (option=="--everything"): OMIT=[] elif (option=="--nothing"): OMIT=PACKAGES[:] elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.remove(pkg) break for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) break anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
e67374215c757b3208e2aa687cbf52979d46b26f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/e67374215c757b3208e2aa687cbf52979d46b26f/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 17154, 16, 31075, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 6584, 43, 1642, 2552, 27776, 22639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4952, 12, 1968, 4672, 2552, 17154, 16, 31075, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 6584, 43, 1642, 2552, 27776, 22639, ...
error_handler=log.err)
error_handler=d.errback)
def get_format_cb(fmt): self.failUnlessIn(fmt, [0, 1]) d.callback(True)
45c00959c14e666ef31b3f93137f14e6d66959e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/45c00959c14e666ef31b3f93137f14e6d66959e4/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2139, 67, 7358, 12, 8666, 4672, 365, 18, 6870, 984, 2656, 382, 12, 8666, 16, 306, 20, 16, 404, 5717, 302, 18, 3394, 12, 5510, 13, 2, 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, 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, 2139, 67, 7358, 12, 8666, 4672, 365, 18, 6870, 984, 2656, 382, 12, 8666, 16, 306, 20, 16, 404, 5717, 302, 18, 3394, 12, 5510, 13, 2, -100, -100, -100, -100, -100, -100, -100...
lines[:] = str(doc).split("\n")
lines[:] = unicode(doc).split(u"\n")
def mangle_docstrings(app, what, name, obj, options, lines, reference_offset=[0]): if what == 'module': # Strip top title title_re = re.compile(r'^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*', re.I|re.S) lines[:] = title_re.sub('', "\n".join(lines)).split("\n") else: doc = get_doc_object(obj, what, "\n".join(lines)) doc.use_plots = app.config.numpydoc_use_plots lines[:] = str(doc).split("\n") if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \ obj.__name__: if hasattr(obj, '__module__'): v = dict(full_name="%s.%s" % (obj.__module__, obj.__name__)) else: v = dict(full_name=obj.__name__) lines += ['', '.. htmlonly::', ''] lines += [' %s' % x for x in (app.config.numpydoc_edit_link % v).split("\n")] # replace reference numbers so that there are no duplicates references = [] for line in lines: line = line.strip() m = re.match(r'^.. \[([a-z0-9_.-])\]', line, re.I) if m: references.append(m.group(1)) # start renaming from the longest string, to avoid overwriting parts references.sort(key=lambda x: -len(x)) if references: for i, line in enumerate(lines): for r in references: if re.match(r'^\d+$', r): new_r = "R%d" % (reference_offset[0] + int(r)) else: new_r = "%s%d" % (r, reference_offset[0]) lines[i] = lines[i].replace('[%s]_' % r, '[%s]_' % new_r) lines[i] = lines[i].replace('.. [%s]' % r, '.. [%s]' % new_r) reference_offset[0] += len(references)
c3a0fb9711a119ac303d18719cea702efeff408f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/c3a0fb9711a119ac303d18719cea702efeff408f/numpydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 4341, 67, 2434, 10219, 12, 2910, 16, 4121, 16, 508, 16, 1081, 16, 702, 16, 2362, 16, 2114, 67, 3348, 22850, 20, 65, 4672, 225, 309, 4121, 422, 296, 2978, 4278, 468, 15589, 1760, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 312, 4341, 67, 2434, 10219, 12, 2910, 16, 4121, 16, 508, 16, 1081, 16, 702, 16, 2362, 16, 2114, 67, 3348, 22850, 20, 65, 4672, 225, 309, 4121, 422, 296, 2978, 4278, 468, 15589, 1760, ...
def __init__(self, n):
def __init__(self, n, max_entry=None):
def __init__(self, n): """ TESTS:: sage: SST = SemistandardTableaux(3) sage: SST == loads(dumps(SST)) True """ self.n = n
6ec7d5a4cd0b83ae5413f0375d51a0339f12b4b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6ec7d5a4cd0b83ae5413f0375d51a0339f12b4b7/tableau.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 16, 943, 67, 4099, 33, 7036, 4672, 3536, 22130, 55, 2866, 225, 272, 410, 30, 348, 882, 273, 15661, 376, 2958, 1388, 18196, 12, 23, 13, 272, 410, 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, 1001, 2738, 972, 12, 2890, 16, 290, 16, 943, 67, 4099, 33, 7036, 4672, 3536, 22130, 55, 2866, 225, 272, 410, 30, 348, 882, 273, 15661, 376, 2958, 1388, 18196, 12, 23, 13, 272, 410, 3...
if l[0] == 0:
if not l or l[0] == 0:
def isValid(self): l = self.l.getCurrentSelection() if l[0] == 0: return False else: return True
8d7ab3b08ec975b1acf8e65478ed38613d0b24cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/8d7ab3b08ec975b1acf8e65478ed38613d0b24cc/downloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4908, 12, 2890, 4672, 328, 273, 365, 18, 80, 18, 588, 3935, 6233, 1435, 309, 486, 328, 578, 328, 63, 20, 65, 422, 374, 30, 327, 1083, 469, 30, 327, 1053, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4908, 12, 2890, 4672, 328, 273, 365, 18, 80, 18, 588, 3935, 6233, 1435, 309, 486, 328, 578, 328, 63, 20, 65, 422, 374, 30, 327, 1083, 469, 30, 327, 1053, 2, -100, -100, -100, -100, ...
from networkx_graph import networkx_plot, NetworkXGraph as GraphicPrimitive_NetworkXGraph
def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: f -- a function of one variable p1, p2 -- two points to refine between plot_points -- (default: 5) the minimal number of plot points. adaptive_recursion -- (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. adaptive_tolerance -- (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: list -- a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.3826834323650898...), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.831469612302545...), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.3826834323650898...), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points: sage: x = var('x') sage: f = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data
f41497be7f4fc09cd21a821e798c82253016dac0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f41497be7f4fc09cd21a821e798c82253016dac0/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
return p.flush(finish=True)
p.flush() p.tagbuf2data() return p.getoutput()
def finish (self, data, **attrs): if not attrs.has_key('rewriter_filter'): return data p = attrs['rewriter_filter'] # note: feed even if data is empty p.feed(data) return p.flush(finish=True)
cdd629b0e83c1aa1f79e7ba238d04956ce9feecc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/cdd629b0e83c1aa1f79e7ba238d04956ce9feecc/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 261, 2890, 16, 501, 16, 2826, 7039, 4672, 309, 486, 3422, 18, 5332, 67, 856, 2668, 266, 6299, 67, 2188, 11, 4672, 327, 501, 293, 273, 3422, 3292, 266, 6299, 67, 2188, 3546, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4076, 261, 2890, 16, 501, 16, 2826, 7039, 4672, 309, 486, 3422, 18, 5332, 67, 856, 2668, 266, 6299, 67, 2188, 11, 4672, 327, 501, 293, 273, 3422, 3292, 266, 6299, 67, 2188, 3546, 468, ...
if self._filter and self._filter(args) and self._counter > 0:
if self._filter and self._filter(result) and self._counter > 0:
def finish(self, result, args): """ Invoked when any one of the InProgress objects passed to the constructor have finished. """ self._counter -= 1 if self._filter and self._filter(args) and self._counter > 0: # Result is filtered and there are other InProgress candidates, # so we'll wait for them. return
f2645e8bfd4a8d52fb3445cbf8581763cbe80794 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/f2645e8bfd4a8d52fb3445cbf8581763cbe80794/async.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 16, 563, 16, 833, 4672, 3536, 5454, 14276, 1347, 1281, 1245, 434, 326, 657, 5491, 2184, 2275, 358, 326, 3885, 1240, 6708, 18, 3536, 365, 6315, 7476, 3947, 404, 309, 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, 4076, 12, 2890, 16, 563, 16, 833, 4672, 3536, 5454, 14276, 1347, 1281, 1245, 434, 326, 657, 5491, 2184, 2275, 358, 326, 3885, 1240, 6708, 18, 3536, 365, 6315, 7476, 3947, 404, 309, 365, ...
ph = q.readheaders(parent)
ph = patchheader(q.join(parent))
def fold(ui, repo, *files, **opts): """fold the named patches into the current patch Patches must not yet be applied. Each patch will be successively applied to the current patch in the order given. If all the patches apply successfully, the current patch will be refreshed with the new cumulative patch, and the folded patches will be deleted. With -k/--keep, the folded patch files will not be removed afterwards. The header for each folded patch will be concatenated with the current patch header, separated by a line of '* * *'.""" q = repo.mq if not files: raise util.Abort(_('qfold requires at least one patch name')) if not q.check_toppatch(repo): raise util.Abort(_('No patches applied')) q.check_localchanges(repo) message = cmdutil.logmessage(opts) if opts['edit']: if message: raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) parent = q.lookup('qtip') patches = [] messages = [] for f in files: p = q.lookup(f) if p in patches or p == parent: ui.warn(_('Skipping already folded patch %s') % p) if q.isapplied(p): raise util.Abort(_('qfold cannot fold already applied patch %s') % p) patches.append(p) for p in patches: if not message: ph = q.readheaders(p) if ph.message: messages.append(ph.message) pf = q.join(p) (patchsuccess, files, fuzz) = q.patch(repo, pf) if not patchsuccess: raise util.Abort(_('Error folding patch %s') % p) patch.updatedir(ui, repo, files) if not message: ph = q.readheaders(parent) message, user = ph.message, ph.user for msg in messages: message.append('* * *') message.extend(msg) message = '\n'.join(message) if opts['edit']: message = ui.edit(message, user or ui.username()) q.refresh(repo, msg=message) q.delete(repo, patches, opts) q.save_dirty()
f0a2f47b4524f2b75cdde495bdc655cc18dab94f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/f0a2f47b4524f2b75cdde495bdc655cc18dab94f/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11590, 12, 4881, 16, 3538, 16, 380, 2354, 16, 2826, 4952, 4672, 3536, 16007, 326, 4141, 16482, 1368, 326, 783, 4729, 225, 12042, 281, 1297, 486, 4671, 506, 6754, 18, 8315, 4729, 903, 506...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11590, 12, 4881, 16, 3538, 16, 380, 2354, 16, 2826, 4952, 4672, 3536, 16007, 326, 4141, 16482, 1368, 326, 783, 4729, 225, 12042, 281, 1297, 486, 4671, 506, 6754, 18, 8315, 4729, 903, 506...
arc = CaselessLiteral('arc') + OneOrMore(arcProperty) + end
arc = Group(CaselessLiteral('arc') + OneOrMore(arcProperty) + end)
def getGrammar (self): if self.grammar is None: comment = Literal('#') + Optional (restOfLine) float = Combine(Word('+-'+nums, nums) + Optional(Literal('.') + Optional(Word(nums))) + Optional(CaselessLiteral('E') + Word('+-'+nums, nums))) TwoDPoint = float + float ThreeDPoint = float + float + float globalReference = Word(alphanums + '/:*_?')
2eaae342cdc2eaef1c83d142450f4aa028025c7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/2eaae342cdc2eaef1c83d142450f4aa028025c7c/Reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 5627, 261, 2890, 4672, 309, 365, 18, 31628, 353, 599, 30, 2879, 273, 14392, 2668, 7, 6134, 397, 4055, 261, 8792, 951, 1670, 13, 1431, 273, 23949, 12, 3944, 2668, 15, 6627, 15, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7162, 5627, 261, 2890, 4672, 309, 365, 18, 31628, 353, 599, 30, 2879, 273, 14392, 2668, 7, 6134, 397, 4055, 261, 8792, 951, 1670, 13, 1431, 273, 23949, 12, 3944, 2668, 15, 6627, 15, 21...
if data: data = iter(data) self.stack.append((state, None, None,data, stop)) else: if data is stop: continue if not state: (state, data) = data if data is stop: continue stack.append((state, data, None, None, stop)) trace("end flow") def __str__(self,indlvl=0): indent = "\n" + " " * indlvl indent2 = indent + " " return "%sFlow: %s%s%s%s%s" % ( indent,repr(self),indent2, indent2.join(self.states.keys()),indent, "".join(map(lambda a: a.__str__(indlvl+1), self.bases)))
iterator = iter(data) param = (iterator, stop, link.next) stack.append((_STACK_ITERATOR,param)) continue stack.append((_STACK_STAGE,(link.next,data))) def __call__(self, data): self.run(data) def testFlow(): ''' Test basic Flow operation ''' def dataSource(data): return [1, 1+data, 1+data*2] def addOne(data): return data+1 def printResult(data): print data def finished(): print "done" sf = Flow() sf.addStage(dataSource, isIterable = 1, onFinish=finished) sf.addStage(addOne) sf.addStage(printResult) sf.run(3) def dynfnc(data): if data < 3: return (data, sf) cf = Flow() cf.addStage(dynfnc, isDynamic = 1) cf.run(2) cf.run(4)
def run(self, data = None, state=initialState): ''' This executes the current flow, given empty starting data and the default initial state. ''' trace("running flow") stack = self.stack if not(stack): stack.append((state, data, None, None, None)) while stack: (state, data, finish, itr, stop) = stack[-1] if finish: finish() stack.pop() continue elif itr: trace("-> iterator") try: data = itr.next() if data is stop: continue if not state: (state, data) = data if data is stop: continue except StopIteration: trace("-> stop") stack.pop() continue except YieldIteration: trace("-> yield") from twisted.internet import reactor reactor.callLater(self.waitInterval, self.run) return else: stack.pop() tpl = self._lookup(state) (func, state, isIterable, finish, failure, stop) = tpl if finish: stack.append((state, None, finish, None, stop)) data = func(data) trace("-> item") if isIterable: if data: data = iter(data) self.stack.append((state, None, None,data, stop)) else: if data is stop: continue if not state: (state, data) = data if data is stop: continue stack.append((state, data, None, None, stop)) trace("end flow")
4cf3103eb894bde67fe5e1250725e8ef11de7f5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4cf3103eb894bde67fe5e1250725e8ef11de7f5a/flow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 501, 273, 599, 16, 919, 33, 6769, 1119, 4672, 9163, 1220, 11997, 326, 783, 4693, 16, 864, 1008, 5023, 501, 471, 326, 805, 2172, 919, 18, 9163, 2606, 2932, 8704, 469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 501, 273, 599, 16, 919, 33, 6769, 1119, 4672, 9163, 1220, 11997, 326, 783, 4693, 16, 864, 1008, 5023, 501, 471, 326, 805, 2172, 919, 18, 9163, 2606, 2932, 8704, 469...
django.dispatch.dispatcher.disconnect( django.db._rollback_on_exception, django.core.signals.got_request_exception)
django.core.signals.got_request_exception.disconnect( django.db._rollback_on_exception)
def log_exception(*args, **kwds): """Django signal handler to log an exception.""" cls, err = sys.exc_info()[:2] logging.exception('Exception in request: %s: %s', cls.__name__, err)
2d25ef5fdec0813412b8b4d452f1979f0eaca1d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/2d25ef5fdec0813412b8b4d452f1979f0eaca1d5/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 4064, 30857, 1968, 16, 2826, 25577, 4672, 3536, 40, 9142, 4277, 1838, 358, 613, 392, 1520, 12123, 2028, 16, 393, 273, 2589, 18, 10075, 67, 1376, 1435, 10531, 22, 65, 2907, 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, 613, 67, 4064, 30857, 1968, 16, 2826, 25577, 4672, 3536, 40, 9142, 4277, 1838, 358, 613, 392, 1520, 12123, 2028, 16, 393, 273, 2589, 18, 10075, 67, 1376, 1435, 10531, 22, 65, 2907, 18, ...
options.platformID = 'osx'
options.platformID = 'ppc-osx'
def buildPlatform(options): options.platformName = 'Unknown' options.platformID = '' options.platformSubID = '' rv = True if os.name == 'nt': options.platformName = 'Windows' options.platformID = 'win' elif os.name == 'posix': if sys.platform == 'darwin': if platform.machine() == 'i386': options.platformName = 'Mac OS X (intel)' options.platformID = 'iosx' else: options.platformName = 'Mac OS X (ppc)' options.platformID = 'osx' release = platform.release() version = release.split('.') platforms = {'7': 'panther', '8': 'tiger', '9': 'leopard'} if len(version) == 3: options.platformSubID = platforms.get(version[0], version[0]) elif sys.platform == 'cygwin': options.platformName = 'Windows' options.platformID = 'win' else: options.platformName = 'Linux' options.platformID = 'linux' if os.path.exists('/etc/lsb-release'): try: for line in open('/etc/lsb-release', 'r').readlines(): name, value = line.split('=') if name.startswith('DISTRIB_CODENAME'): options.platformSubID = value.strip() break except IOError: pass else: log('Unknown platform: ' + os.name, error=True) rv = False return rv
4669154547fc68081ed24e017e30fdcc5a628a80 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/4669154547fc68081ed24e017e30fdcc5a628a80/distribute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 8201, 12, 2116, 4672, 702, 18, 9898, 461, 225, 273, 296, 4874, 11, 702, 18, 9898, 734, 565, 273, 875, 702, 18, 9898, 1676, 734, 273, 875, 225, 5633, 273, 1053, 225, 309, 1140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 8201, 12, 2116, 4672, 702, 18, 9898, 461, 225, 273, 296, 4874, 11, 702, 18, 9898, 734, 565, 273, 875, 702, 18, 9898, 1676, 734, 273, 875, 225, 5633, 273, 1053, 225, 309, 1140, ...
opts, args = getopt.getopt(sys.argv[1:], None, ["bind_host=", "bind_port=", "remote_host=", "remote_port=", "max_conns=", "log_level="])
opts, unused_arg = getopt.getopt( sys.argv[1:], None, ["bind_host=", "bind_port=", "remote_host=", "remote_port=", "max_conns=", "log_level="])
def main(): try: opts, args = getopt.getopt(sys.argv[1:], None, ["bind_host=", "bind_port=", "remote_host=", "remote_port=", "max_conns=", "log_level="]) except getopt.GetoptError: print Usage() sys.exit(1) bind_port = 8080 remote_port = 80 max_conns = 5 bind_host = None remote_host = None level = logging.INFO for opt, arg in opts: if opt == "--bind_host": bind_host = arg if opt == "--bind_port": bind_port = int(arg) if opt == "--remote_host": remote_host = arg if opt == "--remote_port": remote_port = int(arg) if opt == "--max_conns": max_conns = int(arg) if opt == "--log_level": if arg.lower() == "debug": level = logging.DEBUG if not bind_host or not remote_host: print Usage() sys.exit(1) logging.basicConfig(level=level, format="%(asctime)-15s %(message)s") resource.setrlimit(resource.RLIMIT_NOFILE, (1024, 1024)) global QUEUE QUEUE = Queue(remote_host, remote_port, max_conns) ReverseProxy(bind_host, bind_port) asyncore.loop(timeout=4)
faeca0c600847fd7ee1236faac6883a0573dd5d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6393/faeca0c600847fd7ee1236faac6883a0573dd5d9/reverse_proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 10197, 67, 3175, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 599, 16, 8247, 4376, 67, 2564, 1546, 16, 315, 4376, 67, 655, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 775, 30, 1500, 16, 10197, 67, 3175, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 599, 16, 8247, 4376, 67, 2564, 1546, 16, 315, 4376, 67, 655, 15...
test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 196434, 55944)
test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 203994, 55944)
def test_uvrange(self): '''Flagdata2: uvrange=200~400m manualflag=true''' flagdata2(vis=self.vis, selectdata=True, uvrange='200~400m', manualflag=True) test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 196434, 55944)
05385c9baca107ae37130d13ada12822cc89d8d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/05385c9baca107ae37130d13ada12822cc89d8d5/test_flagdata2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16303, 3676, 12, 2890, 4672, 9163, 4678, 892, 22, 30, 14303, 3676, 33, 6976, 98, 16010, 81, 11297, 6420, 33, 3767, 26418, 2982, 892, 22, 12, 3516, 33, 2890, 18, 3516, 16, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16303, 3676, 12, 2890, 4672, 9163, 4678, 892, 22, 30, 14303, 3676, 33, 6976, 98, 16010, 81, 11297, 6420, 33, 3767, 26418, 2982, 892, 22, 12, 3516, 33, 2890, 18, 3516, 16, 202...
if not self.call.can_update(person):
if not self.caller.can_update(person):
def call(self, auth, person_tag_id, value): person_tags = PersonTags(self.api, [person_tag_id]) if not person_tags: raise PLCInvalidArgument, "No such person setting %r"%person_tag_id person_tag = person_tags[0]
dc7f532351ff9a9fa145e9a2483be89086e0ae04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7598/dc7f532351ff9a9fa145e9a2483be89086e0ae04/UpdatePersonTag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 6175, 67, 2692, 67, 350, 16, 460, 4672, 6175, 67, 4156, 273, 11573, 3453, 12, 2890, 18, 2425, 16, 306, 12479, 67, 2692, 67, 350, 5717, 309, 486, 6175, 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, 745, 12, 2890, 16, 1357, 16, 6175, 67, 2692, 67, 350, 16, 460, 4672, 6175, 67, 4156, 273, 11573, 3453, 12, 2890, 18, 2425, 16, 306, 12479, 67, 2692, 67, 350, 5717, 309, 486, 6175, 67...
pagetitle = self.localize("User Page for: %s", request.username)
pagetitle = self.localize("User Page for: %s", request.user.username)
def __init__(self, request): self.potree = pan_app.get_po_tree() self.request = request self.tr_lang = request.tr_lang self.localize = request.localize self.nlocalize = request.nlocalize pagetitle = self.localize("User Page for: %s", request.username) templatename = "home" optionslink = self.localize("Change options") adminlink = self.localize("Admin page") admintext = self.localize("Administrate") quicklinkstitle = self.localize("Quick Links") instancetitle = getattr(pan_app.prefs, "title", request.localize("Pootle Demo")) sessionvars = {"status": get_profile(request.user).status, "isopen": not request.user.is_anonymous, "issiteadmin": request.user.is_superuser} quicklinks = self.getquicklinks() setoptionstext = self.localize("You need to <a href='options.html'>choose your languages and projects</a>.") # l10n: %s is the full name of the currently logged in user statstitle = self.localize("%s's Statistics", request.user.first_name) statstext = { 'suggmade': self.localize("Suggestions Made"), 'suggaccepted': self.localize("Suggestions Accepted"), 'suggpending': self.localize("Suggestions Pending"), 'suggrejected': self.localize("Suggestions Rejected"), 'suggreviewed': self.localize("Suggestions Reviewed"), 'suggper': self.localize("Suggestion Use Percentage"), 'submade': self.localize("Submissions Made"), } templatevars = {"pagetitle": pagetitle, "optionslink": optionslink, "adminlink": adminlink, "admintext": admintext, "quicklinkstitle": quicklinkstitle, "quicklinks": quicklinks, "setoptionstext": setoptionstext, "session": sessionvars, "instancetitle": instancetitle, "statstitle": statstitle, "statstext": statstext} pagelayout.PootlePage.__init__(self, templatename, templatevars, request)
e4c5fea5290038471c06f9a418afc0d0f083fd92 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11388/e4c5fea5290038471c06f9a418afc0d0f083fd92/indexpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 4672, 365, 18, 13130, 992, 273, 2800, 67, 2910, 18, 588, 67, 1631, 67, 3413, 1435, 365, 18, 2293, 273, 590, 365, 18, 313, 67, 4936, 273, 590, 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, 1001, 2738, 972, 12, 2890, 16, 590, 4672, 365, 18, 13130, 992, 273, 2800, 67, 2910, 18, 588, 67, 1631, 67, 3413, 1435, 365, 18, 2293, 273, 590, 365, 18, 313, 67, 4936, 273, 590, 18, ...
okButton.Enable(False) applyButton.Enable(False)
panel.EnableButtons(False)
def Configure(self, link=None): panel = eg.ConfigPanel(resizable=True) okButton = panel.dialog.buttonRow.okButton applyButton = panel.dialog.buttonRow.applyButton if link is not None: searchItem = link.target else: searchItem = None link = eg.TreeLink(eg.currentConfigureItem) tree = eg.TreeItemBrowseCtrl( panel, self.FilterFunc, #searchFunc, selectItem=searchItem ) if not searchItem: okButton.Enable(False) applyButton.Enable(False) def OnSelectionChanged(event): treeItem = event.GetItem() if treeItem.IsOk(): item = tree.GetPyData(treeItem) if self.IsSelectableItem(item): okButton.Enable(True) applyButton.Enable(True) else: okButton.Enable(False) applyButton.Enable(False) event.Skip() tree.Bind(wx.EVT_TREE_SEL_CHANGED, OnSelectionChanged) #tree.SetMinSize((-1,300)) tree.SetFocus() panel.sizer.Add(panel.StaticText(self.text.text1), 0, wx.BOTTOM, 5) panel.sizer.Add(tree, 1, wx.EXPAND) while panel.Affirmed(): treeItem = tree.GetSelection() if treeItem.IsOk(): obj = tree.GetPyData(treeItem) link.SetTarget(obj) panel.SetResult(link)
0267a740c8f7191a04922b0afb4347b57f936787 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/0267a740c8f7191a04922b0afb4347b57f936787/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11758, 12, 2890, 16, 1692, 33, 7036, 4672, 6594, 273, 9130, 18, 809, 5537, 12, 455, 6934, 33, 5510, 13, 1529, 3616, 273, 6594, 18, 12730, 18, 5391, 1999, 18, 601, 3616, 2230, 3616, 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, 11758, 12, 2890, 16, 1692, 33, 7036, 4672, 6594, 273, 9130, 18, 809, 5537, 12, 455, 6934, 33, 5510, 13, 1529, 3616, 273, 6594, 18, 12730, 18, 5391, 1999, 18, 601, 3616, 2230, 3616, 273...
if 'form.button.addcriteria' or 'removecriteria' in form:
if 'form.button.addcriteria' in form or 'removecriteria' in form:
def process_form(self, instance, field, form, empty_marker=None, emptyReturnsMarker=False, validating=True): """A custom implementation for the widget form processing.""" value = form.get(field.getName()) # check if form.button.addcriteria is in request, # this only happends when javascript is disabled if 'form.button.addcriteria' or 'removecriteria' in form: return {}, {} if value: return value, {}
8d0aaa1dd7f52b047372937811a779a3b05dcd21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12192/8d0aaa1dd7f52b047372937811a779a3b05dcd21/querywidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 687, 12, 2890, 16, 791, 16, 652, 16, 646, 16, 1008, 67, 11145, 33, 7036, 16, 1008, 1356, 7078, 33, 8381, 16, 18075, 33, 5510, 4672, 3536, 37, 1679, 4471, 364, 326, 3604, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 687, 12, 2890, 16, 791, 16, 652, 16, 646, 16, 1008, 67, 11145, 33, 7036, 16, 1008, 1356, 7078, 33, 8381, 16, 18075, 33, 5510, 4672, 3536, 37, 1679, 4471, 364, 326, 3604, 64...
try:
for thisType in [int, long, float, complex]:
def seval(item): """ Strips parens from item prior to calling eval in an attempt to make it safer """ return eval(item.replace('(', '').replace(')', ''))
6ea653a6b2a8bbfc133116d87ed74132f74ed63f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6ea653a6b2a8bbfc133116d87ed74132f74ed63f/csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 695, 1125, 12, 1726, 4672, 3536, 3978, 7146, 30821, 628, 761, 6432, 358, 4440, 5302, 316, 392, 4395, 358, 1221, 518, 7864, 586, 3536, 327, 5302, 12, 1726, 18, 2079, 2668, 12, 2187, 875, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 695, 1125, 12, 1726, 4672, 3536, 3978, 7146, 30821, 628, 761, 6432, 358, 4440, 5302, 316, 392, 4395, 358, 1221, 518, 7864, 586, 3536, 327, 5302, 12, 1726, 18, 2079, 2668, 12, 2187, 875, ...
cursor_mate.setPosition( cursor.position(),
cursor_mate.setPosition( curPos,
def cursorPosChanged( self ): """ Slot called when the cursor position of the strand textEdit changes. When this happens, this method also changes the cursor position of the 'Mate' text edit. Because of this, both the text edit widgets in the Sequence Editor scroll 'in sync'. """ strandSequence = self.sequenceTextEdit.toPlainText() cursor = self.sequenceTextEdit.textCursor() cursor_mate = self.secStrucTextEdit.textCursor() cursor_mate2 = self.aaRulerTextEdit.textCursor() if cursor_mate.position() != cursor.position(): cursor_mate.setPosition( cursor.position(), QTextCursor.MoveAnchor ) cursor_mate2.setPosition( cursor.position(), QTextCursor.MoveAnchor ) #After setting position, it is important to do setTextCursor #otherwise no effect will be observed. self.secStrucTextEdit.setTextCursor(cursor_mate) self.aaRulerTextEdit.setTextCursor(cursor_mate2) #provide amino acid info as cursor position changes part = self.win.assy.part from simulation.ROSETTA.rosetta_commandruns import checkIfProteinChunkInPart proteinExists, proteinChunk = checkIfProteinChunkInPart(part) position = cursor.position() toolTipText = proteinChunk.protein.get_amino_acid_id(position - 1) self.sequenceTextEdit.setToolTip(str(toolTipText)) env.history.statusbar_msg(toolTipText)
23d006ab9680cc4562266b6c6d274182f0b75c7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/23d006ab9680cc4562266b6c6d274182f0b75c7b/ProteinSequenceEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3347, 1616, 5033, 12, 365, 262, 30, 3536, 23195, 2566, 1347, 326, 3347, 1754, 434, 326, 16706, 977, 4666, 3478, 18, 5203, 333, 10555, 16, 333, 707, 2546, 3478, 326, 3347, 1754, 434, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3347, 1616, 5033, 12, 365, 262, 30, 3536, 23195, 2566, 1347, 326, 3347, 1754, 434, 326, 16706, 977, 4666, 3478, 18, 5203, 333, 10555, 16, 333, 707, 2546, 3478, 326, 3347, 1754, 434, 326,...
contents = [self.formattree( inspect.getclasstree(classlist, 1), name, cdict)]
contents = [ self.formattree(inspect.getclasstree(classlist, 1), name)]
def docmodule(self, object, name=None, mod=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink)
b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17,...
s = 'MatrixAlgebra(%s,%s)'%(K, self.__nrows)
s = 'MatrixAlgebra(%s,%s)'%(K.name(), self.__nrows)
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix. :: sage: magma(MatrixSpace(QQ,3)) # optional - magma Full Matrix Algebra of degree 3 over Rational Field :: sage: magma(MatrixSpace(Integers(8),2,3)) # optional - magma Full RMatrixSpace of 2 by 3 matrices over IntegerRing(8) """ K = self.base_ring()._magma_init_(magma) if self.__nrows == self.__ncols: s = 'MatrixAlgebra(%s,%s)'%(K, self.__nrows) else: s = 'RMatrixSpace(%s,%s,%s)'%(K, self.__nrows, self.__ncols) return s
2ef75a10f526d80ade3547c83356ba80aad8ccba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2ef75a10f526d80ade3547c83356ba80aad8ccba/matrix_space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4527, 2540, 67, 2738, 67, 12, 2890, 16, 4447, 2540, 4672, 436, 8395, 5675, 8900, 11386, 30, 1660, 1122, 12270, 279, 8576, 3148, 18, 225, 493, 225, 272, 410, 30, 4447, 2540, 12, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4527, 2540, 67, 2738, 67, 12, 2890, 16, 4447, 2540, 4672, 436, 8395, 5675, 8900, 11386, 30, 1660, 1122, 12270, 279, 8576, 3148, 18, 225, 493, 225, 272, 410, 30, 4447, 2540, 12, 46...
for bit in user.userbit_all().filter(Q(startdate__isnull=True) | Q(startdate__gt=now), Q(enddate__isnull=True) | Q(enddate__lt=now)):
for bit in user.userbit_set.all().filter(Q(startdate__isnull=True) | Q(startdate__gt=now), Q(enddate__isnull=True) | Q(enddate__lt=now)):
def UserHasPerms(user, qsc, verb, now = datetime.now()): """ Given a user, a permission, and a subject, return True if the user, or all users, has been Granted [subject] on [permission]; False otherwise """ if user != None: for bit in user.userbit_all().filter(Q(startdate__isnull=True) | Q(startdate__gt=now), Q(enddate__isnull=True) | Q(enddate__lt=now)): if bit.qsc.is_descendant(qsc) & bit.verb.is_antecedent(verb): return True
d1233fb938c052c083f6672fa965a0f3260e246c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12041/d1233fb938c052c083f6672fa965a0f3260e246c/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2177, 5582, 27256, 12, 1355, 16, 1043, 1017, 16, 6405, 16, 2037, 273, 3314, 18, 3338, 1435, 4672, 3536, 16803, 279, 729, 16, 279, 4132, 16, 471, 279, 3221, 16, 327, 1053, 309, 326, 729...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2177, 5582, 27256, 12, 1355, 16, 1043, 1017, 16, 6405, 16, 2037, 273, 3314, 18, 3338, 1435, 4672, 3536, 16803, 279, 729, 16, 279, 4132, 16, 471, 279, 3221, 16, 327, 1053, 309, 326, 729...
hop2.args_v[0] = hop2.llops.genop('same_as', [hop2.args_v[0]], resulttype=hop.args_r[0])
hop2.args_v[0] = hop.inputarg(self, 0)
def rtype_simple_call(self, hop): s_function = annmodel.SomePBC({self.function: True}) hop2 = hop.copy() hop2.args_s[0] = self.s_im_self # make the 1st arg stand for 'im_self' hop2.args_r[0] = self.r_im_self # (same lowleveltype as 'self') if isinstance(hop2.args_v[0], Constant): hop2.args_v[0] = hop2.llops.genop('same_as', [hop2.args_v[0]], resulttype=hop.args_r[0]) c = Constant(self.function) hop2.v_s_insertfirstarg(c, s_function) # insert 'function' # now hop2 looks like simple_call(function, self, args...) return hop2.dispatch()
b90a36a5b0f9675e48eab4b8de74efe90d55021a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/b90a36a5b0f9675e48eab4b8de74efe90d55021a/rpbc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9328, 67, 9647, 67, 1991, 12, 2890, 16, 19055, 4672, 272, 67, 915, 273, 8226, 2284, 18, 17358, 52, 16283, 12590, 2890, 18, 915, 30, 1053, 6792, 19055, 22, 273, 19055, 18, 3530, 1435, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9328, 67, 9647, 67, 1991, 12, 2890, 16, 19055, 4672, 272, 67, 915, 273, 8226, 2284, 18, 17358, 52, 16283, 12590, 2890, 18, 915, 30, 1053, 6792, 19055, 22, 273, 19055, 18, 3530, 1435, 1...
return isinstance(f, os_mock.FakeSymlink)
return type(f) == os_mock.FakeSymlink
def islink(path): f = os_mock._findFileFromPath(path) return isinstance(f, os_mock.FakeSymlink)
6d1553d710a84aa33b2dd4302a9d09ec74019279 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/6d1553d710a84aa33b2dd4302a9d09ec74019279/os_path_mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 1232, 12, 803, 4672, 284, 273, 1140, 67, 22851, 6315, 4720, 812, 23064, 12, 803, 13, 327, 618, 12, 74, 13, 422, 1140, 67, 22851, 18, 25462, 18475, 282, 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, 353, 1232, 12, 803, 4672, 284, 273, 1140, 67, 22851, 6315, 4720, 812, 23064, 12, 803, 13, 327, 618, 12, 74, 13, 422, 1140, 67, 22851, 18, 25462, 18475, 282, 2, -100, -100, -100, -100, ...
lines[i:i+1] = ["\\begin_inset Note", "collapsed true", "", "\layout Standard", ""]
txt = string.lstrip(lines[i][18:]) new = ["\\begin_inset Note", "collapsed true", ""] if len(txt) > 0: new = new + ["\layout Standard", "", txt] j = find_token(lines, "\\end_inset", i) if j == -1: break for k in range(i+1, j): new = new + ["\layout Standard", ""] tmp = string.split(lines[k], '\\') new = new + [tmp[0]] for x in tmp[1:]: new = new + ["\\backslash ", x] lines[i:j] = new
def change_infoinset(lines): i = 0 while 1: i = find_token(lines, "\\begin_inset Info", i) if i == -1: break lines[i:i+1] = ["\\begin_inset Note", "collapsed true", "", "\layout Standard", ""] i = i+5
a8063760341954928dcdf85c177d1f68720b54f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/a8063760341954928dcdf85c177d1f68720b54f7/lyxconvert_218.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 1376, 267, 542, 12, 3548, 4672, 277, 273, 374, 1323, 404, 30, 277, 273, 1104, 67, 2316, 12, 3548, 16, 8422, 10086, 67, 267, 542, 3807, 3113, 277, 13, 309, 277, 422, 300, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2549, 67, 1376, 267, 542, 12, 3548, 4672, 277, 273, 374, 1323, 404, 30, 277, 273, 1104, 67, 2316, 12, 3548, 16, 8422, 10086, 67, 267, 542, 3807, 3113, 277, 13, 309, 277, 422, 300, 21...
for key,val in fields_def[field[len(prefix)]]['selection']: if key==line[i]:
if isinstance(fields_def[field[len(prefix)]]['selection'], (tuple, list)): sel = fields_def[field[len(prefix)]]['selection'] else: sel = fields_def[field[len(prefix)]]['selection'](self, cr, uid, context) for key, val in sel: if key == line[i]:
def process_liness(self, datas, prefix, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id= False # # Import normal fields # for i in range(len(fields)): if i>=len(line): raise Exception, 'Please check that all your lines have %d cols.' % (len(fields),) field = fields[i] if field == ["id"]: data_id= line[i] continue if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(','): if '.' in word: module, xml_id = word.rsplit('.', 1) else: module, xml_id = current_module, word ir_model_data_obj = self.pool.get('ir.model.data') id=ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2=ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id=[(6,0,res_id)] else: if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] ir_model_data_obj = self.pool.get('ir.model.data') id=ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id=ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field)==len(prefix)+1) and len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field)==len(prefix)+1) and (prefix==field[0:len(prefix)]): if fields_def[field[len(prefix)]]['type']=='integer': res =line[i] and int(line[i]) elif fields_def[field[len(prefix)]]['type']=='float': res =line[i] and float(line[i]) elif fields_def[field[len(prefix)]]['type']=='selection': res = False for key,val in fields_def[field[len(prefix)]]['selection']: if key==line[i]: #val==line[i] if from the client ! res = key if line[i] and not res: logger.notifyChannel("import", netsvc.LOG_WARNING, "key '%s' not found in selection field '%s'" %(line[i], field[len(prefix)])) elif fields_def[field[len(prefix)]]['type']=='many2one': res = False if line[i]: relation = fields_def[field[len(prefix)]]['relation'] res2 = self.pool.get(relation).name_search(cr, uid, line[i], [],operator='=') res = (res2 and res2[0][0]) or False if not res and line[i]: warning += ('Relation not found: '+line[i]+' on '+relation + ' !\n') if not res: logger.notifyChannel("import",netsvc.LOG_WARNING,'Relation not found: '+line[i]+' on '+relation + ' !\n') elif fields_def[field[len(prefix)]]['type']=='many2many': res = [] if line[i]: relation = fields_def[field[len(prefix)]]['relation'] for word in line[i].split(','): res2 = self.pool.get(relation).name_search(cr, uid, word, [],operator='=') res3 = (res2 and res2[0][0]) or False if res3: res.append(res3) if len(res): res= [(6,0,res)] else: res = line[i] or False row[field[len(prefix)]] = res elif (prefix==field[0:len(prefix)]): if field[0] not in todo: todo.append(field[len(prefix)]) # # Import one2many fields # nbrmax = 1 for field in todo: newfd = self.pool.get(fields_def[field]['relation']).fields_get(cr, uid, context=context) res = process_liness(self, datas, prefix+[field], newfd, position) (newrow, max2, w2, translate2, data_id2) = res nbrmax = max(nbrmax, max2) warning = warning+w2 reduce(lambda x,y: x and y, newrow) row[field] = (reduce(lambda x,y: x or y, newrow.values()) and [(0,0,newrow)]) or [] i = max2 while (position+i)<len(datas): ok = True for j in range(len(fields)): field2 = fields[j] if (len(field2)<=(len(prefix)+1)) and datas[position+i][j]: ok = False if not ok: break
750be3f162aa171b717f40bceb2c8a8f7cbc3814 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/750be3f162aa171b717f40bceb2c8a8f7cbc3814/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 4204, 273, 2618, 10621, 273, 5378, 3436, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 4204, 273, 2618, 10621, 273, 5378, 3436, 2...
zipopen1 = zipfp.open(TESTFN) while True: read_data = zipopen1.read(randint(1, 1024)) if not read_data: break zipdata1.append(read_data)
with zipfp.open(TESTFN) as zipopen1: while True: read_data = zipopen1.read(randint(1, 1024)) if not read_data: break zipdata1.append(read_data)
def zip_random_open_test(self, f, compression): self.make_test_archive(f, compression)
df64e4ebf884a9041c9514c1c88905dd4793c799 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/df64e4ebf884a9041c9514c1c88905dd4793c799/test_zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3144, 67, 9188, 67, 3190, 67, 3813, 12, 2890, 16, 284, 16, 9154, 4672, 365, 18, 6540, 67, 3813, 67, 10686, 12, 74, 16, 9154, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3144, 67, 9188, 67, 3190, 67, 3813, 12, 2890, 16, 284, 16, 9154, 4672, 365, 18, 6540, 67, 3813, 67, 10686, 12, 74, 16, 9154, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def _send_raw_message(self, message, content_typa, failure_report=None, success_report=None):
def _send_raw_message(self, message, content_type, failure_report=None, success_report=None):
def _send_raw_message(self, message, content_typa, failure_report=None, success_report=None): """Send raw MSRP message. For IM prefer send_message.
0da24be390d17a75c608d005baa7cffdaabc7e76 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/0da24be390d17a75c608d005baa7cffdaabc7e76/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 67, 1899, 67, 2150, 12, 2890, 16, 883, 16, 913, 67, 723, 16, 5166, 67, 6006, 33, 7036, 16, 2216, 67, 6006, 33, 7036, 4672, 3536, 3826, 1831, 9238, 54, 52, 883, 18, 2457, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 67, 1899, 67, 2150, 12, 2890, 16, 883, 16, 913, 67, 723, 16, 5166, 67, 6006, 33, 7036, 16, 2216, 67, 6006, 33, 7036, 4672, 3536, 3826, 1831, 9238, 54, 52, 883, 18, 2457, ...
if not Particle.IsParticleNode(first_elt, 'attributeGroup', 'attribute'):
if not Particle.IsParticleNode(first_elt, 'attributeGroup', 'attribute', 'anyAttribute'):
def __setContentFromDOM (self, node, **kw): schema = kw.get('schema') assert schema is not None self.__prohibitedSubstitutions = schema.blockForNode(node, self._DM_Map) self.__final = schema.finalForNode(node, self._DM_Map)
de09598389957b51dc0330473d4740f70e2e2177 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/de09598389957b51dc0330473d4740f70e2e2177/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1350, 1265, 8168, 261, 2890, 16, 756, 16, 2826, 9987, 4672, 1963, 273, 5323, 18, 588, 2668, 4821, 6134, 1815, 1963, 353, 486, 599, 365, 16186, 685, 29993, 1676, 30892, 273, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1350, 1265, 8168, 261, 2890, 16, 756, 16, 2826, 9987, 4672, 1963, 273, 5323, 18, 588, 2668, 4821, 6134, 1815, 1963, 353, 486, 599, 365, 16186, 685, 29993, 1676, 30892, 273, 19...
title = "debug: run py code" label = "one line of python to exec in GLPane.py's globals()\n(or use @@@ to fake \\n for more lines)\n(or use execfile)" text, ok = QInputDialog.getText(title, label) if ok: command = str(text) command = command.replace("@@@",'\n') debug_run_command(command, source = "debug menu") else: print "run py code: cancelled"
from debug import debug_runpycode_from_a_dialog debug_runpycode_from_a_dialog( source = "GLPane debug menu")
def _debug_runpycode(self): title = "debug: run py code" label = "one line of python to exec in GLPane.py's globals()\n(or use @@@ to fake \\n for more lines)\n(or use execfile)" text, ok = QInputDialog.getText(title, label) if ok: # fyi: type(text) == <class '__main__.qt.QString'> command = str(text) #k not yet well tested command = command.replace("@@@",'\n') debug_run_command(command, source = "debug menu") else: print "run py code: cancelled" return
58014ed45f5e3515fdd119ffc5f12b1270e5cb07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/58014ed45f5e3515fdd119ffc5f12b1270e5cb07/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4148, 67, 2681, 2074, 710, 12, 2890, 4672, 2077, 273, 315, 4148, 30, 1086, 2395, 981, 6, 1433, 273, 315, 476, 980, 434, 5790, 358, 1196, 316, 10252, 8485, 18, 2074, 1807, 10941, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4148, 67, 2681, 2074, 710, 12, 2890, 4672, 2077, 273, 315, 4148, 30, 1086, 2395, 981, 6, 1433, 273, 315, 476, 980, 434, 5790, 358, 1196, 316, 10252, 8485, 18, 2074, 1807, 10941, 1...
request.theme.add_msg(_("[Template %s not found]") % (template_page, ), 'warning')
request.theme.add_msg(_("[Template %s not found]") % (template_page_escaped, ), 'warning')
def sendEditor(self, **kw): """ Send the editor form page.
33473aac36554b90e9102b9fa170fd420e493eb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/33473aac36554b90e9102b9fa170fd420e493eb7/PageEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 6946, 12, 2890, 16, 2826, 9987, 4672, 3536, 2479, 326, 4858, 646, 1363, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 6946, 12, 2890, 16, 2826, 9987, 4672, 3536, 2479, 326, 4858, 646, 1363, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if 0 != os.system(cmd)
if os.system(cmd) != 0:
def getInputSandbox(src_dir,dest_dir='.'): """Get all input sandbox_files from tarball and write them to the workdir. This function is called by wrapper script at the run time. Arguments: 'src_dir': a source directory with InputSandbox files. 'dest_dir': a destination directory """ cmd = "tar chf - -C %s . | tar xf - -C %s" %(src_dir,dest_dir) if 0 != os.system(cmd) raise Exception("getInputSandbox() failed to execute command: %s"%cmd)
d57be370df3e48a6ed2a98ad732f9066ea0e968f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/d57be370df3e48a6ed2a98ad732f9066ea0e968f/WNSandbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12353, 17881, 12, 4816, 67, 1214, 16, 10488, 67, 1214, 2218, 1093, 4672, 3536, 967, 777, 810, 15202, 67, 2354, 628, 29441, 471, 1045, 2182, 358, 326, 22231, 18, 1220, 445, 353, 2566, 635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12353, 17881, 12, 4816, 67, 1214, 16, 10488, 67, 1214, 2218, 1093, 4672, 3536, 967, 777, 810, 15202, 67, 2354, 628, 29441, 471, 1045, 2182, 358, 326, 22231, 18, 1220, 445, 353, 2566, 635...
if isinstance(var_doc.value, RoutineDoc): if summary: summary = '<br />'+summary self.write_function_summary_line(out, var_doc, tr_class, summary) else: self.write_variable_summary_line(out, var_doc, tr_class, summary) write_function_summary_line = compile_template( """ write_function_summary_line(self, out, var_doc, tr_class, summary) Generate HTML code for a single line of a summary table, describing a variable whose value is a function, and write it to C{out}. @param var_doc: The API documentation for the variable that should be described by this line of the summary table. @param container: The API documentation for the class or module whose summary table we're writing.
self._write_summary_line(out, typ, description, tr_class) _write_summary_line = compile_template( """ _write_summary_line(self, out, typ, description, tr_class)
def write_summary_line(self, out, var_doc, container): """ Generate HTML code for a single line of a summary table, and write it to C{out}. See L{write_summary_table} for more information. @param var_doc: The API documentation for the variable that should be described by this line of the summary table. @param container: The API documentation for the class or module whose summary table we're writing. """ # If it's a private variable, then mark its <tr>. if var_doc.is_public: tr_class = '' else: tr_class = ' class="private"'
5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 7687, 67, 1369, 12, 2890, 16, 596, 16, 569, 67, 2434, 16, 1478, 4672, 3536, 6654, 3982, 981, 364, 279, 2202, 980, 434, 279, 4916, 1014, 16, 471, 1045, 518, 358, 385, 95, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 7687, 67, 1369, 12, 2890, 16, 596, 16, 569, 67, 2434, 16, 1478, 4672, 3536, 6654, 3982, 981, 364, 279, 2202, 980, 434, 279, 4916, 1014, 16, 471, 1045, 518, 358, 385, 95, 65...
if isinstance(right, basestring):
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {}
def _rec_convert(ids): if field_obj == table: return ids return self.__execute_recursive_in(cr, field._id1, field._rel, field._id2, ids, operator, field._type)
4ab96967d08049b60156a136841f49426255bb5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4ab96967d08049b60156a136841f49426255bb5b/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 6283, 12, 2232, 4672, 309, 652, 67, 2603, 422, 1014, 30, 327, 3258, 327, 365, 16186, 8837, 67, 10543, 67, 267, 12, 3353, 16, 652, 6315, 350, 21, 16, 652, 6315, 2878, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 6283, 12, 2232, 4672, 309, 652, 67, 2603, 422, 1014, 30, 327, 3258, 327, 365, 16186, 8837, 67, 10543, 67, 267, 12, 3353, 16, 652, 6315, 350, 21, 16, 652, 6315, 2878, 1...
ts.get_available_actions(self.req,
self._ts_get_available_actions(ts,
def test_available_actions_chgprop_only(self): # CHGPROP is not enough for changing a ticket's state (#3289) ts = TicketSystem(self.env) self.perm.grant_permission('anonymous', 'TICKET_CHGPROP') self.req.perm = perm.PermissionCache(self.env) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'new'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'assigned'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'accepted'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'reopened'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'closed'}))
4b1c974fc51a3689f934bd513f21feadc4fe0a2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9317/4b1c974fc51a3689f934bd513f21feadc4fe0a2a/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5699, 67, 4905, 67, 343, 75, 5986, 67, 3700, 12, 2890, 4672, 468, 6469, 43, 15811, 353, 486, 7304, 364, 12770, 279, 9322, 1807, 919, 23885, 1578, 6675, 13, 3742, 273, 22023, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5699, 67, 4905, 67, 343, 75, 5986, 67, 3700, 12, 2890, 4672, 468, 6469, 43, 15811, 353, 486, 7304, 364, 12770, 279, 9322, 1807, 919, 23885, 1578, 6675, 13, 3742, 273, 22023, ...
self.literal_block = 0
def depart_literal_block(self, node): if self.verbatim: self.body.append('\n\\end{verbatim}\n') self.verbatim = 0 elif self.active_table.is_open(): self.body.append('\n}\n') else: self.body.append('\n') self.body.append('\\end{flushleft}') self.body.append('\\end{ttfamily}\n') self.insert_none_breaking_blanks = 0 # obey end: self.body.append('}\n') self.literal_block = 0
2794cbe7ffe26caeae085e89ccda3dd6f08a3d28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/2794cbe7ffe26caeae085e89ccda3dd6f08a3d28/latex2e.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 309, 365, 18, 16629, 22204, 30, 365, 18, 3432, 18, 6923, 2668, 64, 82, 1695, 409, 95, 16629, 22204, 6280, 82, 6134, 365, 18, 16629,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26000, 67, 13107, 67, 2629, 12, 2890, 16, 756, 4672, 309, 365, 18, 16629, 22204, 30, 365, 18, 3432, 18, 6923, 2668, 64, 82, 1695, 409, 95, 16629, 22204, 6280, 82, 6134, 365, 18, 16629,...
__version__='$Revision: 1.53 $'[11:-2]
__version__='$Revision: 1.54 $'[11:-2]
def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam
e30df7f7307b319c1beffb3e9dd071fe09e39f2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e30df7f7307b319c1beffb3e9dd071fe09e39f2f/Publish.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 14725, 12, 1752, 301, 4672, 315, 69, 18552, 429, 10725, 264, 6, 327, 24824, 11189, 93, 379, 677, 379, 16, 467, 3007, 296, 397, 24824, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 14725, 12, 1752, 301, 4672, 315, 69, 18552, 429, 10725, 264, 6, 327, 24824, 11189, 93, 379, 677, 379, 16, 467, 3007, 296, 397, 24824, 225, 2, -100, -100, -100, -100, -100, -100, -...
def __str__(self): return "%x%x%x%x%x" % struct.unpack("!5I", self.s)
def freeze(self): return struct.pack("!5I", int(self.s[ 0: 8], 16), int(self.s[ 8:16], 16), int(self.s[16:24], 16), int(self.s[24:32], 16), int(self.s[32:40], 16)) def thaw(self, data): if data: self.s = "%08x%08x%08x%08x%08x" % struct.unpack("!5I", data)
def __init__(self, s = ''):
e2373a608287a3a2b9eb07f5d0982ec0a5eea3ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/e2373a608287a3a2b9eb07f5d0982ec0a5eea3ee/streams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 272, 273, 875, 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, ...
[ 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, 1001, 2738, 972, 12, 2890, 16, 272, 273, 875, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
| GT
| GT
def p_overloadable(t): '''overloadable : EQUALS | PLUS | MINUS | TIMES | DIVIDE | MOD | INCREMENT | DECREMENT | EQ | NE | GT | LT | GTE | LTE | LOGNOT | LOGAND | LOGOR | BITNOT | BITAND | BITOR | BITXOR | BITLEFT | BITRIGHT | ASSIGNOPER | SUBSCRIPT | OPFUNCALL | MEMBERPTR''' t[0] = t[1]
b18bfa4c727ef99b17e34b711a2fa7debc2d1459 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13661/b18bfa4c727ef99b17e34b711a2fa7debc2d1459/blt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1643, 945, 429, 12, 88, 4672, 9163, 1643, 945, 429, 294, 27557, 571, 22443, 3378, 571, 6989, 3378, 571, 8721, 55, 571, 27355, 10385, 571, 8663, 571, 2120, 23923, 571, 2030, 2392...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 67, 1643, 945, 429, 12, 88, 4672, 9163, 1643, 945, 429, 294, 27557, 571, 22443, 3378, 571, 6989, 3378, 571, 8721, 55, 571, 27355, 10385, 571, 8663, 571, 2120, 23923, 571, 2030, 2392...
if self.songindex >= 0: item = self.GetItem(self.songindex) item.SetFont(self.font) self.SetItem(item) self.songindex = newindex if newindex >= 0: item = self.GetItem(self.songindex) item.SetFont(self.bold_font) self.SetItem(item) self.EnsureVisible(newindex) self.resizeColumns()
try: if self.songindex >= 0: item = self.GetItem(self.songindex) item.SetFont(self.font) self.SetItem(item) self.songindex = newindex if newindex >= 0: item = self.GetItem(self.songindex) item.SetFont(self.bold_font) self.SetItem(item) self.EnsureVisible(newindex) self.resizeColumns() except: pass
def highlightSong(self, newindex): if newindex == self.songindex: return if self.songindex >= 0: item = self.GetItem(self.songindex) item.SetFont(self.font) self.SetItem(item) self.songindex = newindex if newindex >= 0: item = self.GetItem(self.songindex) item.SetFont(self.bold_font) self.SetItem(item) self.EnsureVisible(newindex) self.resizeColumns()
5d0654c6ed59c9ed6c325bb83e8a022b3bc88ff9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/5d0654c6ed59c9ed6c325bb83e8a022b3bc88ff9/mpd_major_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8839, 55, 932, 12, 2890, 16, 394, 1615, 4672, 309, 394, 1615, 422, 365, 18, 816, 75, 1615, 30, 327, 225, 775, 30, 309, 365, 18, 816, 75, 1615, 1545, 374, 30, 761, 273, 365, 18, 967...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8839, 55, 932, 12, 2890, 16, 394, 1615, 4672, 309, 394, 1615, 422, 365, 18, 816, 75, 1615, 30, 327, 225, 775, 30, 309, 365, 18, 816, 75, 1615, 1545, 374, 30, 761, 273, 365, 18, 967...
fmt = '<hhqq'
fmt = '<HHQQ'
def FileHeader(self): """Return the per-file header as a string.""" dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) if self.flag_bits & 0x08: # Set these to zero because we write them after the file data CRC = compress_size = file_size = 0 else: CRC = self.CRC compress_size = self.compress_size file_size = self.file_size
1606943723c6c2fa513288a138401c1a8d31c650 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/1606943723c6c2fa513288a138401c1a8d31c650/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 1864, 12, 2890, 4672, 3536, 990, 326, 1534, 17, 768, 1446, 487, 279, 533, 12123, 3681, 273, 365, 18, 712, 67, 957, 16153, 712, 273, 261, 7510, 63, 20, 65, 300, 5342, 3672, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1387, 1864, 12, 2890, 4672, 3536, 990, 326, 1534, 17, 768, 1446, 487, 279, 533, 12123, 3681, 273, 365, 18, 712, 67, 957, 16153, 712, 273, 261, 7510, 63, 20, 65, 300, 5342, 3672, 13, ...
if result.has_key('Value'):
if result.has_key('Failed'):
def getInputDataCatalog(self,lfns,siteName='',fileName='pool_xml_catalog.xml',ignoreMissing=False): """This utility will create a pool xml catalogue slice for the specified LFNs using the full input data resolution policy plugins for the VO.
c0569361fb5467b91d09306ec758a42f00a5f4e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/c0569361fb5467b91d09306ec758a42f00a5f4e1/Dirac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12353, 751, 9769, 12, 2890, 16, 20850, 2387, 16, 4256, 461, 2218, 2187, 17812, 2218, 6011, 67, 2902, 67, 7199, 18, 2902, 2187, 6185, 4841, 33, 8381, 4672, 3536, 2503, 12788, 903, 752, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12353, 751, 9769, 12, 2890, 16, 20850, 2387, 16, 4256, 461, 2218, 2187, 17812, 2218, 6011, 67, 2902, 67, 7199, 18, 2902, 2187, 6185, 4841, 33, 8381, 4672, 3536, 2503, 12788, 903, 752, 27...
self.showTask(tid)
self.showTaskCommandsByRow(entry[0])
def showState(self): cur = self.cursor() # look for tasks cur.execute("select * from tasks;") ttable = cur.fetchall() taskdict = {} if ttable == []: print "No Tasks in DB" else: for row in ttable: taskid = row[0] if taskid not in taskdict: taskdict[taskid] = (1, row[3]) else: entry = taskdict[taskid] taskdict[taskid] = (entry[0] + 1, entry[1]) for tid in taskdict: entry = taskdict[tid] print "TaskId:", tid, "has", entry[0], "lines, dated", print entry[1] self.showTask(tid) # look for filestates self.showFileTable() #print >>sys.stderr, ttable
3cd301b01a645d1a52aac27ed91a3a3acfbc9bc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5203/3cd301b01a645d1a52aac27ed91a3a3acfbc9bc7/ssdap_dbutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1119, 12, 2890, 4672, 662, 273, 365, 18, 9216, 1435, 468, 2324, 364, 4592, 662, 18, 8837, 2932, 4025, 380, 628, 4592, 4868, 13, 268, 2121, 273, 662, 18, 5754, 454, 1435, 1562, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 1119, 12, 2890, 4672, 662, 273, 365, 18, 9216, 1435, 468, 2324, 364, 4592, 662, 18, 8837, 2932, 4025, 380, 628, 4592, 4868, 13, 268, 2121, 273, 662, 18, 5754, 454, 1435, 1562, 15...
kpt = self.get_bz_k_points()[k]
kpt_c = self.get_bz_k_points()[kpt]
def get_pseudo_wave_function(self, band=0, kpt=0, spin=0, pad=True): kpt = self.get_bz_k_points()[k] state = self.calc.GetElectronicStates().GetState(band=n, spin=s, kptindex=k)
aa4d5cc37cc3ac184ba76ba4c4396932f889d1b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/aa4d5cc37cc3ac184ba76ba4c4396932f889d1b4/dacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26023, 67, 17838, 67, 915, 12, 2890, 16, 8937, 33, 20, 16, 417, 337, 33, 20, 16, 12490, 33, 20, 16, 4627, 33, 5510, 4672, 417, 337, 67, 71, 273, 365, 18, 588, 67, 25292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26023, 67, 17838, 67, 915, 12, 2890, 16, 8937, 33, 20, 16, 417, 337, 33, 20, 16, 12490, 33, 20, 16, 4627, 33, 5510, 4672, 417, 337, 67, 71, 273, 365, 18, 588, 67, 25292, ...
finally: try: self.cache_mgr._delete_path(path) except KeyError: pass
try: self.cache_mgr._delete_path(path) except KeyError: pass
def delete_handler(self, filecmd): path = filecmd.path try: del self.inventory[self.bzr_file_id(path)] except errors.NoSuchId: self.warning("ignoring delete of %s as not in inventory", path) finally: try: self.cache_mgr._delete_path(path) except KeyError: pass
e0886d39716999f977a46782a2f9c2065e41c9d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8703/e0886d39716999f977a46782a2f9c2065e41c9d8/generic_processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 4176, 12, 2890, 16, 585, 4172, 4672, 589, 273, 585, 4172, 18, 803, 775, 30, 1464, 365, 18, 26024, 63, 2890, 18, 25292, 86, 67, 768, 67, 350, 12, 803, 25887, 1335, 1334, 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, 1430, 67, 4176, 12, 2890, 16, 585, 4172, 4672, 589, 273, 585, 4172, 18, 803, 775, 30, 1464, 365, 18, 26024, 63, 2890, 18, 25292, 86, 67, 768, 67, 350, 12, 803, 25887, 1335, 1334, 18,...
print "start step", start, step, self.editCtrl.exec_mark print "start line", self.editCtrl.GetLine(start) code = self.GenerateStream(step) code.print_code() stop = self.app.ExecuteStream(code, start)
if self.editCtrl.IsBreakSet(start): self.editCtrl.MarkerDelete(start, 0) code = self.GenerateStream(start) self.editCtrl.MarkerAdd(start, 0) stop = self.app.ExecuteStream(code, start) codelen = len(code) - 1 while stop < codelen and isinstance(code[stop + 1], spe.Label): stop += 1 if step == None: start = stop code = self.GenerateStream() stop = self.app.ExecuteStream(code, start) else: code = self.GenerateStream(step) stop = self.app.ExecuteStream(code, start)
def OnToolClick(self, event): id = event.GetId()
4f7cf094f743cc1258da61338293d78c609f2898 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9699/4f7cf094f743cc1258da61338293d78c609f2898/ispugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 6364, 6563, 12, 2890, 16, 871, 4672, 612, 273, 871, 18, 967, 548, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 6364, 6563, 12, 2890, 16, 871, 4672, 612, 273, 871, 18, 967, 548, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.addnstr(txt, len(txt), curses.color_pair(theme.COLOR_INFORMATION_BAR))
self.addstr(txt, curses.color_pair(theme.COLOR_INFORMATION_BAR))
def write_role(self, room): """ Write our own role and affiliation """ own_user = None for user in room.users: if user.nick == room.own_nick: own_user = user break if not own_user: return txt = ' (' if own_user.affiliation != 'none': txt += own_user.affiliation+', ' txt += own_user.role+')' self.addnstr(txt, len(txt), curses.color_pair(theme.COLOR_INFORMATION_BAR))
53a5536cf12cbe8474f37b1c8e31b60489b2b62f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/53a5536cf12cbe8474f37b1c8e31b60489b2b62f/window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4615, 12, 2890, 16, 7725, 4672, 3536, 2598, 3134, 4953, 2478, 471, 7103, 16278, 3536, 4953, 67, 1355, 273, 599, 364, 729, 316, 7725, 18, 5577, 30, 309, 729, 18, 17091, 422, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4615, 12, 2890, 16, 7725, 4672, 3536, 2598, 3134, 4953, 2478, 471, 7103, 16278, 3536, 4953, 67, 1355, 273, 599, 364, 729, 316, 7725, 18, 5577, 30, 309, 729, 18, 17091, 422, 7...
self.__singular = singular.ring("(complex,I)", _vars, order=order)
precision = self.base_ring().precision() digits = sage.misc.functional.ceil((2*precision - 2)/7.0) self.__singular = singular.ring("(complex,%d,0,I)"%digits, _vars, order=order)
def _singular_init_(self, singular=singular_default): """ Return a newly created Singular ring matching this ring. """ if not self._can_convert_to_singular(): raise TypeError, "no conversion of %s to a Singular ring defined"%self if self.ngens()==1: _vars = str(self.gen()) order = 'lp' else: _vars = str(self.gens()) order = self.term_order().singular_str() if is_RealField(self.base_ring()): # TODO: here we would convert the SAGE bit precision to a format # Singular understands, and would call # self.__singular = singular.ring("(real,<PREC>", _vars ) self.__singular = singular.ring("real", _vars, order=order)
73d04e6a6a3a189b4546507ef107a2660edf9f9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/73d04e6a6a3a189b4546507ef107a2660edf9f9d/polynomial_singular_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17835, 67, 2738, 67, 12, 2890, 16, 10048, 33, 17835, 67, 1886, 4672, 3536, 2000, 279, 10894, 2522, 348, 17830, 9221, 3607, 333, 9221, 18, 3536, 309, 486, 365, 6315, 4169, 67, 6283, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17835, 67, 2738, 67, 12, 2890, 16, 10048, 33, 17835, 67, 1886, 4672, 3536, 2000, 279, 10894, 2522, 348, 17830, 9221, 3607, 333, 9221, 18, 3536, 309, 486, 365, 6315, 4169, 67, 6283, ...
cal_file = string.strip(self.__cp.get('calibration','H2-1'))
cal_file = self.job().get_config('calibration','H2-1')
def calibration(self): """ Set the path to the calibration cache file for the given IFO. During S2 the Hanford 2km IFO had two calibration epochs, so if the start time is during S2, we use the correct cache file. """ cal_path = string.strip(self.__cp.get('calibration','path'))
243cce9ec378a43e681624907856e03a7b823a1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/243cce9ec378a43e681624907856e03a7b823a1a/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15344, 12, 2890, 4672, 3536, 1000, 326, 589, 358, 326, 15344, 1247, 585, 364, 326, 864, 467, 3313, 18, 463, 4017, 348, 22, 326, 670, 304, 31836, 576, 18353, 467, 3313, 9323, 2795, 15344,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15344, 12, 2890, 4672, 3536, 1000, 326, 589, 358, 326, 15344, 1247, 585, 364, 326, 864, 467, 3313, 18, 463, 4017, 348, 22, 326, 670, 304, 31836, 576, 18353, 467, 3313, 9323, 2795, 15344,...
_new_entry_boilerplate = '''2009-08-19 Eric Seidel <eric@webkit.org>
def latest_entry(self): changelog_file = open(self.path) try: return self._parse_latest_entry_from_file(changelog_file) finally: changelog_file.close()
def _read_file_contents(file_path): file = open(file_path) contents = file.read() file.close() return contents
ca4cad9f45fb5f85c7c9551aaec86d179a83bef8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/ca4cad9f45fb5f85c7c9551aaec86d179a83bef8/changelogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 768, 67, 3980, 12, 768, 67, 803, 4672, 585, 273, 1696, 12, 768, 67, 803, 13, 2939, 273, 585, 18, 896, 1435, 585, 18, 4412, 1435, 327, 2939, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 768, 67, 3980, 12, 768, 67, 803, 4672, 585, 273, 1696, 12, 768, 67, 803, 13, 2939, 273, 585, 18, 896, 1435, 585, 18, 4412, 1435, 327, 2939, 2, -100, -100, -100, -100, ...
""" % {'diracPilotFileName':self.diracPilotFileName,'options':pilotOptionString} fopen = open(pilotFileName,'w') fopen.write(fileContent)
""" % {'diracPilotFileName':self.diracPilotFileName, 'options':pilotOptionString} fopen = open( pilotFileName, 'w' ) fopen.write( fileContent )
def __createPilotFile(self):
364464017f61dc703439c7a2235a47d4ba35aafe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/364464017f61dc703439c7a2235a47d4ba35aafe/DiracSiteAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 52, 22797, 812, 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, 1001, 2640, 52, 22797, 812, 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, -10...
assert(len(wl)==15) aac = wl[14]
assert(len(wl)==12) aac = wl[11]
def isLastArgMax(l): argmax = 0 maxval = 0.0 argn = 0 for p in l: if maxval<p[1]: maxval = p[1] argmax = argn argn += 1 return argmax==(argn-1)
525610922bf97a49dc921ee3d6f19cb70ac9706b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10249/525610922bf97a49dc921ee3d6f19cb70ac9706b/SPCTools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23075, 4117, 2747, 12, 80, 4672, 20828, 273, 374, 30443, 273, 374, 18, 20, 1501, 82, 273, 374, 364, 293, 316, 328, 30, 309, 30443, 32, 84, 63, 21, 14542, 30443, 273, 293, 63, 21, 65,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23075, 4117, 2747, 12, 80, 4672, 20828, 273, 374, 30443, 273, 374, 18, 20, 1501, 82, 273, 374, 364, 293, 316, 328, 30, 309, 30443, 32, 84, 63, 21, 14542, 30443, 273, 293, 63, 21, 65,...
t, p, remainder = self.step(segment, t, remainder)
if segment < n-1: t, p, remainder = self.step(segment, t, remainder)
def calculatePath(self): """ generate a flight path for of steps of length dl """
267e750861571459622004dc4ba011a2cd076daa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12580/267e750861571459622004dc4ba011a2cd076daa/EndoscopyGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 743, 12, 2890, 4672, 3536, 2103, 279, 25187, 589, 364, 434, 6075, 434, 769, 8910, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 743, 12, 2890, 4672, 3536, 2103, 279, 25187, 589, 364, 434, 6075, 434, 769, 8910, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
try: _ins = None code.compile_command(importstr) exec importstr if _ins is None: logging.error('Unable to create instrument') return None self.add(_ins, create_args=kwargs) except Exception, e: logging.error('Error: %s', str(e)) return None
_ins = None code.compile_command(importstr) exec importstr if _ins is None: logging.error('Unable to create instrument') return None self.add(_ins, create_args=kwargs)
def create(self, name, instype, **kwargs): ''' Create an instrument called 'name' of type 'type'.
144e4622ffb232ffd4636c7b86894903acad098f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6471/144e4622ffb232ffd4636c7b86894903acad098f/instruments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 508, 16, 1804, 388, 16, 2826, 4333, 4672, 9163, 1788, 392, 10353, 2566, 296, 529, 11, 434, 618, 296, 723, 10332, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 508, 16, 1804, 388, 16, 2826, 4333, 4672, 9163, 1788, 392, 10353, 2566, 296, 529, 11, 434, 618, 296, 723, 10332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
fh = repo.opener('.queues.new', 'w')
fh = repo.opener('patches.queues.new', 'w')
def _addqueue(name): fh = repo.opener(_allqueues, 'a') fh.write('%s\n' % (name,)) fh.close()
be5b25050e2f30b6cbab9a45c4d52a40d92ab18e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/be5b25050e2f30b6cbab9a45c4d52a40d92ab18e/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 4000, 12, 529, 4672, 7625, 273, 3538, 18, 25098, 24899, 454, 18924, 16, 296, 69, 6134, 7625, 18, 2626, 29909, 87, 64, 82, 11, 738, 261, 529, 16, 3719, 7625, 18, 4412, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 4000, 12, 529, 4672, 7625, 273, 3538, 18, 25098, 24899, 454, 18924, 16, 296, 69, 6134, 7625, 18, 2626, 29909, 87, 64, 82, 11, 738, 261, 529, 16, 3719, 7625, 18, 4412, 1435, ...
fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj) writer.writerow([1,2,3]) fileobj.seek(0) self.assertEqual(fileobj.read(), "1,2,3\r\n") finally: fileobj.close() os.unlink(name) fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj, testA) writer.writerow([1,2,3]) fileobj.seek(0) self.assertEqual(fileobj.read(), "1\t2\t3\r\n") finally: fileobj.close() os.unlink(name) fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj, dialect=testB()) writer.writerow([1,2,3]) fileobj.seek(0) self.assertEqual(fileobj.read(), "1:2:3\r\n") finally: fileobj.close() os.unlink(name) fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj, dialect='testC') writer.writerow([1,2,3]) fileobj.seek(0) self.assertEqual(fileobj.read(), "1|2|3\r\n") finally: fileobj.close() os.unlink(name) fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj, dialect=testA, delimiter=';') writer.writerow([1,2,3]) fileobj.seek(0) self.assertEqual(fileobj.read(), "1;2;3\r\n") finally: fileobj.close() os.unlink(name)
self.compare_dialect_123("1,2,3\r\n") self.compare_dialect_123("1\t2\t3\r\n", testA) self.compare_dialect_123("1:2:3\r\n", dialect=testB()) self.compare_dialect_123("1|2|3\r\n", dialect='testC') self.compare_dialect_123("1;2;3\r\n", dialect=testA, delimiter=';') self.compare_dialect_123("1\u039B2\u039B3\r\n", dialect=testUni)
def test_dialect_apply(self): class testA(csv.excel): delimiter = "\t" class testB(csv.excel): delimiter = ":" class testC(csv.excel): delimiter = "|"
2837440cd7e82f53ee7e194e97a8b6ffcc4e97cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/2837440cd7e82f53ee7e194e97a8b6ffcc4e97cf/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25909, 386, 67, 9010, 12, 2890, 4672, 667, 1842, 37, 12, 6715, 18, 24121, 4672, 5654, 273, 1548, 88, 6, 667, 1842, 38, 12, 6715, 18, 24121, 4672, 5654, 273, 6153, 667, 1842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25909, 386, 67, 9010, 12, 2890, 4672, 667, 1842, 37, 12, 6715, 18, 24121, 4672, 5654, 273, 1548, 88, 6, 667, 1842, 38, 12, 6715, 18, 24121, 4672, 5654, 273, 6153, 667, 1842, ...
self.save_journal(cn, cols, nodeid, journaldate,
self.save_journal(cn, cols, nodeid, dc(journaldate),
def add_new_columns_v2(self): '''While we're adding the actor column, we need to update the tables to have the correct datatypes.''' for klass in self.classes.values(): cn = klass.classname properties = klass.getprops() old_spec = self.database_schema['tables'][cn]
5f95dd34105d9fa54d471617dd14823905eabd07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5f95dd34105d9fa54d471617dd14823905eabd07/back_mysql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2704, 67, 5112, 67, 90, 22, 12, 2890, 4672, 9163, 15151, 732, 4565, 6534, 326, 8327, 1057, 16, 732, 1608, 358, 1089, 326, 4606, 358, 1240, 326, 3434, 14760, 1093, 6309, 364, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2704, 67, 5112, 67, 90, 22, 12, 2890, 4672, 9163, 15151, 732, 4565, 6534, 326, 8327, 1057, 16, 732, 1608, 358, 1089, 326, 4606, 358, 1240, 326, 3434, 14760, 1093, 6309, 364, 7...