rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
self.set_output("%s-POWER_%s-%d-%d.xml" % (self.get_ifo(), self.__usertag, int(self.get_start()), int(self.get_end()) - int(self.get_start())))
self.set_output("%s-POWER_%s-%d-%d.xml.gz" % (self.get_ifo(), self.__usertag, int(self.get_start()), int(self.get_end()) - int(self.get_start())))
def get_output(self): if self._AnalysisNode__output is None: if None in (self.get_start(), self.get_end(), self.get_ifo(), self.__usertag): raise ValueError, "start time, end time, ifo, or user tag has not been set" seg = segments.segment(LIGOTimeGPS(self.get_start()), LIGOTimeGPS(self.get_end())) self.set_output("%s-POWER_%s-%d-%d.xml" % (self.get_ifo(), self.__usertag, int(self.get_start()), int(self.get_end()) - int(self.get_start()))) return self._AnalysisNode__output
da9c4d6c67b8192c521aead20e64705a45cf592b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/da9c4d6c67b8192c521aead20e64705a45cf592b/power.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2844, 12, 2890, 4672, 309, 365, 6315, 9418, 907, 972, 2844, 353, 599, 30, 309, 599, 316, 261, 2890, 18, 588, 67, 1937, 9334, 365, 18, 588, 67, 409, 9334, 365, 18, 588, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2844, 12, 2890, 4672, 309, 365, 6315, 9418, 907, 972, 2844, 353, 599, 30, 309, 599, 316, 261, 2890, 18, 588, 67, 1937, 9334, 365, 18, 588, 67, 409, 9334, 365, 18, 588, 67, ...
button.widget.selectTool()
buttonToSelect = button
def setPreferredKind (self, filterKind): if self.filterKind != filterKind: newFilterKind = None # We need to update the click state of the toolbar as well toolbar = Block.Block.findBlockByName("ApplicationBar") for button in toolbar.childrenBlocks: buttonEvent = getattr (button, 'event', None) if isinstance (buttonEvent, KindParameterizedEvent): if ( (filterKind is None and buttonEvent.kindParameter is None) or (filterKind is not None and filterKind.isKindOf (buttonEvent.kindParameter)) ): newFilterKind = buttonEvent.kindParameter button.widget.selectTool() break
2dcb0b97aa787442e50db0979a6bf6ef8357b5dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2dcb0b97aa787442e50db0979a6bf6ef8357b5dd/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31099, 5677, 261, 2890, 16, 1034, 5677, 4672, 309, 365, 18, 2188, 5677, 480, 1034, 5677, 30, 394, 1586, 5677, 273, 599, 468, 1660, 1608, 358, 1089, 326, 4682, 919, 434, 326, 12748, 487, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31099, 5677, 261, 2890, 16, 1034, 5677, 4672, 309, 365, 18, 2188, 5677, 480, 1034, 5677, 30, 394, 1586, 5677, 273, 599, 468, 1660, 1608, 358, 1089, 326, 4682, 919, 434, 326, 12748, 487, ...
if (self.days_old_max >= 10000):
if self.days_old_max >= 10000:
def sanity_check(self): """Complain bitterly about our options now rather than later""" if self.output_dir: if not os.path.isdir(self.output_dir): user_error("output directory does not exist: '%s'" % \ self.output_dir) if not os.access(self.output_dir, os.W_OK): user_error("no write permission on output directory: '%s'" % \ self.output_dir) if is_world_writable(self.output_dir): unexpected_error(("output directory is world-writable: " + \ "%s -- I feel nervous!") % self.output_dir) if (self.days_old_max < 1): user_error("argument to -d must be greater than zero") if (self.days_old_max >= 10000): user_error("argument to -d must be less than 10000")
15be93bd0dd4865a88bc099c88157d9a70a7b099 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1746/15be93bd0dd4865a88bc099c88157d9a70a7b099/archivemail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16267, 67, 1893, 12, 2890, 4672, 3536, 799, 7446, 2831, 387, 715, 2973, 3134, 702, 2037, 9178, 2353, 5137, 8395, 309, 365, 18, 2844, 67, 1214, 30, 309, 486, 1140, 18, 803, 18, 291, 121...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16267, 67, 1893, 12, 2890, 4672, 3536, 799, 7446, 2831, 387, 715, 2973, 3134, 702, 2037, 9178, 2353, 5137, 8395, 309, 365, 18, 2844, 67, 1214, 30, 309, 486, 1140, 18, 803, 18, 291, 121...
if modelpreviewMode:
if model.previewMode:
def _setext(self, val): if modelpreviewMode: if val: val = to_string(val) self.filepath = u'%s%s%s' % (path.splitext( self.filepath)[0], path.extsep, val) else: self.filepath = path.splitext(self.filepath)[0] else: Kind[1].ext.fset(self, val)
8a437768126954f988450c0ddc743cd4b653626e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3907/8a437768126954f988450c0ddc743cd4b653626e/tagmodel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 408, 12, 2890, 16, 225, 1244, 4672, 309, 938, 18, 12102, 2309, 30, 309, 1244, 30, 1244, 273, 358, 67, 1080, 12, 1125, 13, 365, 18, 10561, 273, 582, 11, 9, 87, 9, 87, 9, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 408, 12, 2890, 16, 225, 1244, 4672, 309, 938, 18, 12102, 2309, 30, 309, 1244, 30, 1244, 273, 358, 67, 1080, 12, 1125, 13, 365, 18, 10561, 273, 582, 11, 9, 87, 9, 87, 9, ...
self.params['map_path'] = '/usr/local/share/pyx12/map' self.params['pickle_path'] = '/usr/local/share/pyx12/map'
def __init__(self): ParamsBase.__init__(self) self.params['map_path'] = '/usr/local/share/pyx12/map' self.params['pickle_path'] = '/usr/local/share/pyx12/map' # Read from Registry import _winreg #option = Key(key=HKEY.CURRENT_USER, sub_key='Software\\pyx12').values
6a42b4e6040291085c65f8bf1e9c02996cfce05c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11528/6a42b4e6040291085c65f8bf1e9c02996cfce05c/params.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 8861, 2171, 16186, 2738, 972, 12, 2890, 13, 282, 468, 2720, 628, 5438, 1930, 389, 8082, 1574, 468, 3482, 273, 1929, 12, 856, 33, 44, 3297, 18, 15487, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 8861, 2171, 16186, 2738, 972, 12, 2890, 13, 282, 468, 2720, 628, 5438, 1930, 389, 8082, 1574, 468, 3482, 273, 1929, 12, 856, 33, 44, 3297, 18, 15487, 6...
self.cp.set("fu-condor","qscan",home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
self.cp.set("fu-condor","qscan",stfu_pipe.home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
def set_qscan_executable(self): host = stfu_pipe.get_hostname() if 'phy.syr.edu' in host: self.cp.set("fu-condor","qscan",home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline") else: self.cp.set("fu-condor","qscan",home_dirs()+"/romain/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
73e6f0c892381f08ec6f8865c22409d910afc731 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/73e6f0c892381f08ec6f8865c22409d910afc731/WOD_Bologna.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 85, 9871, 67, 17751, 12, 2890, 4672, 1479, 273, 384, 27074, 67, 14772, 18, 588, 67, 10358, 1435, 309, 296, 844, 93, 18, 9009, 86, 18, 28049, 11, 316, 1479, 30, 365, 18, 4057...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 85, 9871, 67, 17751, 12, 2890, 4672, 1479, 273, 384, 27074, 67, 14772, 18, 588, 67, 10358, 1435, 309, 296, 844, 93, 18, 9009, 86, 18, 28049, 11, 316, 1479, 30, 365, 18, 4057...
"color1": 'Popup background',
"color1": 'Window list background',
def __init__ (self):
25580906cd313a0ce8d618137f7433f0450896b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/25580906cd313a0ce8d618137f7433f0450896b2/dbx_preference.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
result = ids
result = []
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if isinstance(select, (str, int, long)): ids = [select] else: ids = select result = ids if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x: str(x), ids))+")")
b663b4518fa927de4d2a8e1481a1ea66979f86ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b663b4518fa927de4d2a8e1481a1ea66979f86ef/crm_meeting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 266, 2972, 67, 2232, 12, 2890, 16, 4422, 16, 4555, 16, 2027, 16, 1026, 67, 1937, 67, 712, 16, 1026, 67, 12198, 67, 712, 16, 1800, 33, 6625, 4672, 309, 486, 1800, 30, 1800, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 266, 2972, 67, 2232, 12, 2890, 16, 4422, 16, 4555, 16, 2027, 16, 1026, 67, 1937, 67, 712, 16, 1026, 67, 12198, 67, 712, 16, 1800, 33, 6625, 4672, 309, 486, 1800, 30, 1800, ...
title = 'Changeset <em>[%s]</em> by %s' % ( util.escape(chgset.rev), util.escape(chgset.author))
excerpt = util.shorten_line(chgset.message or '--')
def get_timeline_events(self, req, start, stop, filters): if 'changeset' in filters: format = req.args.get('format') show_files = int(self.config.get('timeline', 'changeset_show_files')) db = self.env.get_db_cnx() repos = self.env.get_repository() rev = repos.youngest_rev while rev: chgset = repos.get_changeset(rev) if chgset.date < start: return if chgset.date < stop: title = 'Changeset <em>[%s]</em> by %s' % ( util.escape(chgset.rev), util.escape(chgset.author)) if format == 'rss': href = self.env.abs_href.changeset(chgset.rev) message = wiki_to_html(chgset.message or '--', self.env, db, absurls=True) else: href = self.env.href.changeset(chgset.rev) excerpt = util.shorten_line(chgset.message or '--') message = wiki_to_oneliner(excerpt, self.env, db) if show_files: files = [] for chg in chgset.get_changes(): if show_files > 0 and len(files) >= show_files: files.append('...') break files.append('<span class="%s">%s</span>' % (chg[2], util.escape(chg[0]))) message = '<span class="changes">' + ', '.join(files) +\ '</span>: ' + message yield 'changeset', href, title, chgset.date, chgset.author,\ message rev = repos.previous_rev(rev)
f4d15b01d33a8b1ce9fabdb9f356b3aa6ba10f7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f4d15b01d33a8b1ce9fabdb9f356b3aa6ba10f7c/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 6329, 278, 11, 316, 3415, 30, 740, 273, 1111, 18, 1968, 18, 588, 2668, 2139, 6134, 2405, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 6329, 278, 11, 316, 3415, 30, 740, 273, 1111, 18, 1968, 18, 588, 2668, 2139, 6134, 2405, 67...
logger.error('The merge of Job %d failed and so the merge can not continue. '\ 'This can be overridden with the ignorefailed flag.', j.id)
logger.error('The merge of Job %s failed and so the merge can not continue. '\ 'This can be overridden with the ignorefailed flag.', j.fqid)
def merge(self, jobs, outputdir = None, ignorefailed = None, overwrite = None): """ Method to merge the output of jobs. jobs may be a single job instance or a sequence of Jobs outputdir is the name of the directry to put the merge results in. It will be created if needed. ignorefailed and overwrite have the same meaning as in the schema, but override the schema values.
e22fb79dc6db84ce7b972b3d6370e43de872b397 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/e22fb79dc6db84ce7b972b3d6370e43de872b397/Merger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 273, 599, 16, 2305, 7307, 273, 599, 16, 6156, 273, 599, 4672, 3536, 2985, 358, 2691, 326, 876, 434, 6550, 18, 225, 6550, 2026, 506, 279, 2202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 273, 599, 16, 2305, 7307, 273, 599, 16, 6156, 273, 599, 4672, 3536, 2985, 358, 2691, 326, 876, 434, 6550, 18, 225, 6550, 2026, 506, 279, 2202, ...
if self.saw_video_tag == False and self.saw_audio_tag == False:
if not self.saw_video_tag and not self.saw_audio_tag:
def paused_reached(self): self.saw_video_tag = False self.saw_audio_tag = False
d93c7f89036dcd5d1d5d01ae053e1c6ae6d67942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/d93c7f89036dcd5d1d5d01ae053e1c6ae6d67942/gst_extractor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17781, 67, 266, 2004, 12, 2890, 4672, 365, 18, 87, 2219, 67, 9115, 67, 2692, 273, 1083, 365, 18, 87, 2219, 67, 11509, 67, 2692, 273, 1083, 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, 0, 0, 0, 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, 17781, 67, 266, 2004, 12, 2890, 4672, 365, 18, 87, 2219, 67, 9115, 67, 2692, 273, 1083, 365, 18, 87, 2219, 67, 11509, 67, 2692, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, ...
if DEBUG: print 'IFA visit var:', cl.ident, var.name, dcpa
if DEBUG: print 'IFA visit var %s.%s, %d' % (cl.ident, var.name, dcpa)
def ifa_split_vars(cl, dcpa, vars, nr_classes, classes_nr, split, redundant, removals): for (varnum, var) in enumerate(vars): if not (var, dcpa, 0) in getgx().cnode: continue node = getgx().cnode[var, dcpa, 0] creation_points, paths, assignsets, allnodes, csites = ifa_flow_graph(cl, dcpa, node) if len(csites) == 1: #print 'just one creation site!' continue if DEBUG: print 'IFA visit var:', cl.ident, var.name, dcpa ifa_split_empties(cl, dcpa, allnodes, assignsets, split) if len(merge_simple_types(getgx().types[node])) < 2 or len(assignsets) == 1: #print 'singleton set' continue ifa_split_no_confusion(cl, dcpa, varnum, classes_nr, nr_classes, csites, allnodes, split, removals) if split: if DEBUG: print 'IFA found simple splits, aborting' break for node in allnodes: if not ifa_confluence_point(node, creation_points): continue if not node.thing.formal_arg and not isinstance(node.thing.parent, class_): #print 'bad split', node continue #print 'confluence point', node, node.paths #, node.in_ remaining = ifa_determine_split(node, allnodes) if len(remaining) < 2: continue # --- if it exists, perform actual splitting if DEBUG: print 'IFA normal split, remaining:', len(remaining) for splitsites in remaining[1:]: ifa_split_class(cl, dcpa, splitsites, split) return split, redundant, removals # --- if all else fails, perform wholesale splitting # XXX assign sets should be different; len(paths) > 1? if len(paths) > 1 and len(csites) > 1: if DEBUG: print 'IFA wholesale splitting, csites:', len(csites) for csite in csites[1:]: ifa_split_class(cl, dcpa, [csite], split) return split, redundant, removals
d96b6db39907d8736c7d10561c72b0f4f1b5eeec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6661/d96b6db39907d8736c7d10561c72b0f4f1b5eeec/infer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 309, 69, 67, 4939, 67, 4699, 12, 830, 16, 302, 4057, 69, 16, 4153, 16, 9884, 67, 4701, 16, 3318, 67, 11611, 16, 1416, 16, 19530, 16, 2797, 1031, 4672, 364, 261, 90, 1303, 379, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 309, 69, 67, 4939, 67, 4699, 12, 830, 16, 302, 4057, 69, 16, 4153, 16, 9884, 67, 4701, 16, 3318, 67, 11611, 16, 1416, 16, 19530, 16, 2797, 1031, 4672, 364, 261, 90, 1303, 379, 16, ...
def refund(self, cr, uid, ids, date=None, period_id=None, description=None):
def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
def refund(self, cr, uid, ids, date=None, period_id=None, description=None): map_old_new = {} refund_ids = [] for old_inv_id in ids: new_id = super(account_invoice,self).refund(cr, uid, ids, date=date, period_id=period_id, description=description) refund_ids += new_id map_old_new[old_inv_id] = new_id[0]
cbea6a2d9a37b768b84716ca85849f17c7ebc827 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cbea6a2d9a37b768b84716ca85849f17c7ebc827/account_tax_include.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1509, 33, 7036, 16, 3879, 67, 350, 33, 7036, 16, 2477, 33, 7036, 16, 13001, 67, 350, 33, 7036, 4672, 852, 67, 1673, 67, 2704, 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, 16255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1509, 33, 7036, 16, 3879, 67, 350, 33, 7036, 16, 2477, 33, 7036, 16, 13001, 67, 350, 33, 7036, 4672, 852, 67, 1673, 67, 2704, 273, ...
except OSError, e: raise Exception, e
except OSError, e: raise Exception, e
def daemonize( aHttpDir, aLogFile, aUser, aGroup, aFork = 'true' ): # Do some pre-daemon activities os.umask( 027 ) if os.getuid( ) == 0: # If we are running as root, we will change that uid = pwd.getpwnam( aUser )[2] gid = grp.getgrnam( aGroup )[2] if aFork == 'true': # Change the owner of the log file to the user/group # under which the daemon is to run flog = open( aLogFile, 'a' ) flog.close( ) os.chown( aLogFile, uid, gid ) # Change the uid/gid of the process os.setgid( gid ) os.setuid( uid ) # Change to the HTTP directory os.chdir( aHttpDir ) if aFork == 'true': # Do first fork try: pid = os.fork( ) if pid: # Parent process return pid except OSError, e: raise Exception, e # First child process, create a new session os.setsid( ) # Do second fork try: pid = os.fork( ) if pid: # Parent process os._exit( 0 ) except OSError, e: raise Exception, e # Reset stdin/stdout/stderr fin = open( '/dev/null', 'r' ) flog = open( aLogFile, 'a' ) os.dup2( fin.fileno( ), sys.stdin.fileno( ) ) os.dup2( flog.fileno( ), sys.stdout.fileno( ) ) os.dup2( flog.fileno( ), sys.stderr.fileno( ) )
d4cc2d1599d12bc73db5aa9e3c513fd4c1e1f939 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/d4cc2d1599d12bc73db5aa9e3c513fd4c1e1f939/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8131, 554, 12, 279, 2940, 1621, 16, 279, 19103, 16, 279, 1299, 16, 279, 1114, 16, 279, 22662, 273, 296, 3767, 11, 262, 30, 468, 2256, 2690, 675, 17, 21511, 17259, 1140, 18, 379, 835, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8131, 554, 12, 279, 2940, 1621, 16, 279, 19103, 16, 279, 1299, 16, 279, 1114, 16, 279, 22662, 273, 296, 3767, 11, 262, 30, 468, 2256, 2690, 675, 17, 21511, 17259, 1140, 18, 379, 835, ...
d[field] = val
d[key] = val
def _get_instance_metadata(url): d = {} data = retry_url(url) if data: fields = data.split('\n') for field in fields: if field.endswith('/'): d[field[0:-1]] = _get_instance_metadata(url + field) else: p = field.find('=') if p > 0: field = field[0:p] val = retry_url(url + field) p = val.find('\n') if p > 0: val = val.split('\n') d[field] = val return d
251b9133b8569cfe991b5f6613d21b2c56f3cd70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/251b9133b8569cfe991b5f6613d21b2c56f3cd70/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1336, 67, 4165, 12, 718, 4672, 302, 273, 2618, 501, 273, 3300, 67, 718, 12, 718, 13, 309, 501, 30, 1466, 273, 501, 18, 4939, 2668, 64, 82, 6134, 364, 652, 316, 1466, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1336, 67, 4165, 12, 718, 4672, 302, 273, 2618, 501, 273, 3300, 67, 718, 12, 718, 13, 309, 501, 30, 1466, 273, 501, 18, 4939, 2668, 64, 82, 6134, 364, 652, 316, 1466, ...
if __debug__:
global _debug if _debug:
def __del__(self): if __debug__: print "Destroying RDF.storage" if self.storage: Redland.librdf_free_storage(self.storage)
9d200f22543978d0df7fbde12b64052f94f16755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14754/9d200f22543978d0df7fbde12b64052f94f16755/RDF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 2552, 389, 4148, 309, 389, 4148, 30, 1172, 315, 10740, 310, 13539, 18, 5697, 6, 309, 365, 18, 5697, 30, 4621, 15733, 18, 2941, 19299, 67, 9156, 67, 569...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 2552, 389, 4148, 309, 389, 4148, 30, 1172, 315, 10740, 310, 13539, 18, 5697, 6, 309, 365, 18, 5697, 30, 4621, 15733, 18, 2941, 19299, 67, 9156, 67, 569...
if c == "<": data.previous()
if c in (">", None):
def getAttribute(self): """Return a name,value pair for the next attribute in the stream, if one is found, or None""" data = self.data c = data.skip(spaceCharactersBytes | frozenset("/")) if c == "<": data.previous() return None elif c == ">" or c is None: return None attrName = [] attrValue = [] spaceFound = False #Step 5 attribute name while True: if c == "=" and attrName: break elif c in spaceCharactersBytes: spaceFound=True break elif c in ("/", "<", ">"): return "".join(attrName), "" elif c in asciiUppercaseBytes: attrName.append(c.lower()) else: attrName.append(c) #Step 6 c = data.next() #Step 7 if spaceFound: c = data.skip() #Step 8 if c != "=": data.previous() return "".join(attrName), "" #XXX need to advance position in both spaces and value case #Step 9 data.next() #Step 10 c = data.skip() #Step 11 if c in ("'", '"'): #11.1 quoteChar = c while True: #11.3 c = data.next() if c == quoteChar: data.next() return "".join(attrName), "".join(attrValue) #11.4 elif c in asciiUppercaseBytes: attrValue.append(c.lower()) #11.5 else: attrValue.append(c) elif c in (">", "<"): return "".join(attrName), "" elif c in asciiUppercaseBytes: attrValue.append(c.lower()) elif c is None: return None else: attrValue.append(c) while True: c = data.next() if c in spacesAngleBrackets: return "".join(attrName), "".join(attrValue) elif c in asciiUppercaseBytes: attrValue.append(c.lower()) else: attrValue.append(c)
c299416976f1100d51c47e56261a9f2149f9f6a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4487/c299416976f1100d51c47e56261a9f2149f9f6a0/inputstream.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4061, 12, 2890, 4672, 3536, 990, 279, 508, 16, 1132, 3082, 364, 326, 1024, 1566, 316, 326, 1407, 16, 309, 1245, 353, 1392, 16, 578, 599, 8395, 501, 273, 365, 18, 892, 276, 273, 501, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4061, 12, 2890, 4672, 3536, 990, 279, 508, 16, 1132, 3082, 364, 326, 1024, 1566, 316, 326, 1407, 16, 309, 1245, 353, 1392, 16, 578, 599, 8395, 501, 273, 365, 18, 892, 276, 273, 501, ...
chararray(['dbe', 'de'])
chararray(['dbe', 'de'], dtype='|S3')
def fromrecords(recList, dtype=None, shape=None, formats=None, names=None, titles=None, aligned=False, byteorder=None): """ create a recarray from a list of records in text form The data in the same field can be heterogeneous, they will be promoted to the highest data type. This method is intended for creating smaller record arrays. If used to create large array without formats defined r=fromrecords([(2,3.,'abc')]*100000) it can be slow. If formats is None, then this will auto-detect formats. Use list of tuples rather than list of lists for faster processing. >>> r=fromrecords([(456,'dbe',1.2),(2,'de',1.3)],names='col1,col2,col3') >>> print r[0] (456, 'dbe', 1.2) >>> r.col1 array([456, 2]) >>> r.col2 chararray(['dbe', 'de']) >>> import cPickle >>> print cPickle.loads(cPickle.dumps(r)) recarray[ (456, 'dbe', 1.2), (2, 'de', 1.3) ] """ nfields = len(recList[0]) if formats is None and dtype is None: # slower obj = sb.array(recList,dtype=object) arrlist = [sb.array(obj[...,i].tolist()) for i in xrange(nfields)] return fromarrays(arrlist, formats=formats, shape=shape, names=names, titles=titles, aligned=aligned, byteorder=byteorder) if dtype is not None: descr = sb.dtype(dtype) else: descr = format_parser(formats, names, titles, aligned, byteorder)._descr try: retval = sb.array(recList, dtype = descr) except TypeError: # list of lists instead of list of tuples if (shape is None or shape == 0): shape = len(recList) if isinstance(shape, (int, long)): shape = (shape,) if len(shape) > 1: raise ValueError, "Can only deal with 1-d array." _array = recarray(shape, descr) for k in xrange(_array.size): _array[k] = tuple(recList[k]) return _array else: if shape is not None and retval.shape != shape: retval.shape = shape res = retval.view(recarray) res.dtype = sb.dtype((record, res.dtype)) return res
ff2ceaa981dd5ef632ae965fcbaf81577dc625d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/ff2ceaa981dd5ef632ae965fcbaf81577dc625d1/records.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 7094, 12, 3927, 682, 16, 3182, 33, 7036, 16, 2179, 33, 7036, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 13939, 33, 8381, 16, 1160, 1019, 33, 7036, 4672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 7094, 12, 3927, 682, 16, 3182, 33, 7036, 16, 2179, 33, 7036, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 13939, 33, 8381, 16, 1160, 1019, 33, 7036, 4672, 35...
t = _regex11.sub(_sub1, node.text)
t = _regex11.sub(_sub1, node.text or node.tail)
def _sub1(txt): if len(txt.group(4)) > 1: return " " match = rml_parents if type == 'odt': match = odt_parents if type == 'sxw': match = sxw_parents if type =='html2html': match = html_parents if txt.group(3): match = [txt.group(3)] n = node while n.tag not in match: n = n.getparent() n.set('rml_loop', txt.group(2)) return '[['+txt.group(1)+"''"+txt.group(4)+']]'
94b0ad26df4e0c4a067b89cdc4a481be12a22bf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/94b0ad26df4e0c4a067b89cdc4a481be12a22bf0/preprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 21, 12, 5830, 4672, 309, 562, 12, 5830, 18, 1655, 12, 24, 3719, 405, 404, 30, 327, 315, 315, 845, 273, 436, 781, 67, 12606, 309, 618, 422, 296, 369, 88, 4278, 845, 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, 389, 1717, 21, 12, 5830, 4672, 309, 562, 12, 5830, 18, 1655, 12, 24, 3719, 405, 404, 30, 327, 315, 315, 845, 273, 436, 781, 67, 12606, 309, 618, 422, 296, 369, 88, 4278, 845, 273, ...
start=True):
onStart=None, start=True):
def __init__(self, node, attrName, startValue, speed, useInt=False, start=True): """ @param node: The libavg node object to animate. @param attrName: The name of the attribute to change. Must be a numeric attribute. @param startValue: Initial value of the attribute. @param speed: Animation speed, value to be added per second. @param useInt: If True, the attribute is always set to an integer value. """ self.__startValue = startValue self.__speed = speed SimpleAnim.__init__(self, node, attrName, None, useInt, None, start)
9c2422e1d9ba82fc9726fd07ba1362f21d982cca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/9c2422e1d9ba82fc9726fd07ba1362f21d982cca/anim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 756, 16, 11583, 16, 27900, 16, 8632, 16, 999, 1702, 33, 8381, 16, 603, 1685, 33, 7036, 16, 787, 33, 5510, 4672, 3536, 632, 891, 756, 30, 1021, 2561, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 756, 16, 11583, 16, 27900, 16, 8632, 16, 999, 1702, 33, 8381, 16, 603, 1685, 33, 7036, 16, 787, 33, 5510, 4672, 3536, 632, 891, 756, 30, 1021, 2561, 14...
logger.info('Transaction level %d -> %d', self.level,
logger.debug('Transaction level %d -> %d', self.level,
def popLevel(self): if self.level>0: logger.info('Transaction level %d -> %d', self.level, self.level-1) self.level -= 1 if not (self.level or self.is_aborted): self.dbConn.commit()
272758b885fb85573bc5678d4671457334ef903d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/272758b885fb85573bc5678d4671457334ef903d/qSQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 2355, 12, 2890, 4672, 309, 365, 18, 2815, 34, 20, 30, 1194, 18, 4148, 2668, 3342, 1801, 738, 72, 317, 738, 72, 2187, 365, 18, 2815, 16, 365, 18, 2815, 17, 21, 13, 365, 18, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1843, 2355, 12, 2890, 4672, 309, 365, 18, 2815, 34, 20, 30, 1194, 18, 4148, 2668, 3342, 1801, 738, 72, 317, 738, 72, 2187, 365, 18, 2815, 16, 365, 18, 2815, 17, 21, 13, 365, 18, 28...
build_info = "Build %s with distutils-%s" % \
build_info = "Built %s with distutils-%s" % \
def get_inidata (self): # Return data describing the installation.
a19cdad6dc2815f6044c56601e8dd81d9c219631 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a19cdad6dc2815f6044c56601e8dd81d9c219631/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 267, 350, 396, 261, 2890, 4672, 468, 2000, 501, 16868, 326, 13193, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 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, 336, 67, 267, 350, 396, 261, 2890, 4672, 468, 2000, 501, 16868, 326, 13193, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
item = Globals.mainViewRoot.postEventByName('NewCalendar',{})[0]
item = App_ns.root.NewCalendar()[0]
def __init__(self, type, logger): if not type in ["Event", "Note", "Task", "MailMessage", "Collection"]: # "Copy constructor" if isinstance(type,pim.calendar.CalendarEvent): self.isNote = self.isTask = self.isMessage = self.isCollection = self.allDay = self.recurring = False self.isEvent = True self.view = App_ns.itsView self.logger = logger self.item = type else: return else: self.isNote = self.isEvent = self.isTask = self.isMessage = self.isCollection = self.allDay = self.recurring = False self.logger = logger self.logger.Start("%s creation" %type) if type == "Event": # New Calendar Event # post the corresponding CPIA-event item = Globals.mainViewRoot.postEventByName('NewCalendar',{})[0] self.isEvent = True elif type == "Note": # New Note # post the corresponding CPIA-event item = Globals.mainViewRoot.postEventByName('NewNote',{})[0] self.isNote = True elif type == "Task": # New Task # post the corresponding CPIA-event item = Globals.mainViewRoot.postEventByName('NewTask',{})[0] self.isTask = True elif type == "MailMessage": # New Mail Message # post the corresponding CPIA-event item = Globals.mainViewRoot.postEventByName('NewMailMessage',{})[0] self.isMessage = True elif type == "Collection": # New Collection # post the corresponding CPIA-event item = Globals.mainViewRoot.postEventByName('NewItemCollection',{})[0] self.isCollection = True self.item = item # Give the Yield wx.GetApp().Yield() self.logger.Stop()
4d24bd6a34af83772bf639bb3b33c4290696873d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/4d24bd6a34af83772bf639bb3b33c4290696873d/QAUITestAppLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 16, 1194, 4672, 309, 486, 618, 316, 8247, 1133, 3113, 315, 8067, 3113, 315, 2174, 3113, 315, 6759, 1079, 3113, 315, 2532, 11929, 30, 468, 315, 2951, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 618, 16, 1194, 4672, 309, 486, 618, 316, 8247, 1133, 3113, 315, 8067, 3113, 315, 2174, 3113, 315, 6759, 1079, 3113, 315, 2532, 11929, 30, 468, 315, 2951, ...
feat.my_varchararray != '(2:cc,dd)':
feat.my_varchararray != '(2:cc,dd)' or \ feat.my_int4array != '(2:100,200)' :
def test_val_test_23(feat): if feat.my_numeric5 != 12345 or \ feat.my_numeric5_3 != 0.123 or \ feat.my_bool != 1 or \ feat.my_int2 != 12345 or \ feat.my_int4 != 12345678 or \ abs(feat.my_float4 - 0.123) > 1e-8 or \ feat.my_float8 != 0.12345678 or \ feat.my_char != 'a' or \ feat.my_varchar != 'ab' or \ feat.my_text != 'abc' or \ feat.my_bytea != '78797A' or \ feat.my_time != '12:34:56' or \ feat.my_date != '2000/01/01' or \ feat.my_timestamp != '2000/01/01 0:00:00' or \ feat.my_timestamptz != '2000/01/01 0:00:00+00' or \ feat.my_chararray != '(2:a,b)' or \ feat.my_textarray != '(2:aa,bb)' or \ feat.my_varchararray != '(2:cc,dd)':
417c3277efb839594007cde45047a584f494fcfb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10290/417c3277efb839594007cde45047a584f494fcfb/ogr_pg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1125, 67, 3813, 67, 4366, 12, 29735, 4672, 309, 11002, 18, 4811, 67, 5246, 25, 480, 2593, 25574, 578, 521, 11002, 18, 4811, 67, 5246, 25, 67, 23, 480, 374, 18, 12936, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1125, 67, 3813, 67, 4366, 12, 29735, 4672, 309, 11002, 18, 4811, 67, 5246, 25, 480, 2593, 25574, 578, 521, 11002, 18, 4811, 67, 5246, 25, 67, 23, 480, 374, 18, 12936, 578, ...
z = z % 60.0
z = math.fmod(z, 60.0)
def func(x=float, y=float): z = x + y / 2.1 * x z = z % 60.0 z = pow(z, 2) z = -z return int(z)
89d352b4a12b4f7ea6fbaa930b9e845067e9068c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/89d352b4a12b4f7ea6fbaa930b9e845067e9068c/test_typed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 12, 92, 33, 5659, 16, 677, 33, 5659, 4672, 998, 273, 619, 397, 677, 342, 576, 18, 21, 380, 619, 998, 273, 4233, 18, 74, 1711, 12, 94, 16, 4752, 18, 20, 13, 998, 273, 7602, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1326, 12, 92, 33, 5659, 16, 677, 33, 5659, 4672, 998, 273, 619, 397, 677, 342, 576, 18, 21, 380, 619, 998, 273, 4233, 18, 74, 1711, 12, 94, 16, 4752, 18, 20, 13, 998, 273, 7602, ...
self.addnstr(nick, len(nick), curses.color_pair(13))
self.addstr(nick, curses.color_pair(13))
def write_room_name(self, room): (room_name, nick) = room.name.split('/', 1) self.addnstr(nick, len(nick), curses.color_pair(13)) txt = ' from room %s' % room_name 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, 13924, 67, 529, 12, 2890, 16, 7725, 4672, 261, 13924, 67, 529, 16, 10909, 13, 273, 7725, 18, 529, 18, 4939, 2668, 19, 2187, 404, 13, 365, 18, 1289, 701, 12, 17091, 16, 3043...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13924, 67, 529, 12, 2890, 16, 7725, 4672, 261, 13924, 67, 529, 16, 10909, 13, 273, 7725, 18, 529, 18, 4939, 2668, 19, 2187, 404, 13, 365, 18, 1289, 701, 12, 17091, 16, 3043...
(r'`.+?`(:[a-zA-Z0-9-]+?:)?',
(r'(`.+?`)(:[a-zA-Z0-9-]+?:)?',
def analyse_text(text): if text[0] != '.': return False if text[:3] == '.\\"': return True if text[:4] == '.TH ': return True if text[1:3].isalnum() and text[3].isspace(): return 0.9
38544d7ebcd16274941b6defd769d7e4c17b1da9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2885/38544d7ebcd16274941b6defd769d7e4c17b1da9/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31087, 67, 955, 12, 955, 4672, 309, 977, 63, 20, 65, 480, 2611, 30, 327, 1083, 309, 977, 10531, 23, 65, 422, 2418, 27576, 4278, 327, 1053, 309, 977, 10531, 24, 65, 422, 2418, 2455, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31087, 67, 955, 12, 955, 4672, 309, 977, 63, 20, 65, 480, 2611, 30, 327, 1083, 309, 977, 10531, 23, 65, 422, 2418, 27576, 4278, 327, 1053, 309, 977, 10531, 24, 65, 422, 2418, 2455, 4...
if not "pocompile" in project.getrights(session): return None
if not "pocompile" in project.getrights(request): request.session['message'] = 'You do not have the right to create MO files.' return HttpResponseRedirect('/%s/%s' % (language_code, project_code))
def handle_alternative_format(request, language_code, project_code, file_path): basename, extension = os.path.splitext(file_path) pofilename = basename + os.extsep + project.fileext extension = extension[1:] if extension == "mo": if not "pocompile" in project.getrights(session): return None etag, filepath_or_contents = project.convert(pofilename, extension) if etag: contents = open(filepath_or_contents).read() else: contents = filepath_or_contents content_type = "" if extension == "po": content_type = "text/x-gettext-translation; charset=UTF-8" elif extension == "csv": content_type = "text/csv; charset=UTF-8" elif extension == "xlf": content_type = "application/x-xliff; charset=UTF-8" elif extension == "ts": content_type = "application/x-linguist; charset=UTF-8" elif extension == "mo": content_type = "application/x-gettext-translation" return HttpResponse(contents, content_type=content_type)
877e794167e3c6d6a5244efa11cbf86a0e5d6ca3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/877e794167e3c6d6a5244efa11cbf86a0e5d6ca3/view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 27071, 67, 2139, 12, 2293, 16, 2653, 67, 710, 16, 1984, 67, 710, 16, 585, 67, 803, 4672, 4882, 16, 2710, 273, 1140, 18, 803, 18, 4939, 408, 12, 768, 67, 803, 13, 293, 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, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 27071, 67, 2139, 12, 2293, 16, 2653, 67, 710, 16, 1984, 67, 710, 16, 585, 67, 803, 4672, 4882, 16, 2710, 273, 1140, 18, 803, 18, 4939, 408, 12, 768, 67, 803, 13, 293, 792...
self.cv.acquire() if len(self.packetQueue) > 0: packet = self.packetQueue.pop() json_str = json.dumps(packet.packet) packet_string = "Content-Length:" + str(len(json_str)) + "\r\n" + json_str self.conn.send(packet_string) self.cv.notifyAll() self.cv.wait()
try: self.cv.acquire() if len(self.packetQueue) > 0: packet = self.packetQueue.pop() json_str = json.dumps(packet.packet) packet_string = "Content-Length:" + str(len(json_str)) + "\r\n" + json_str self.conn.send(packet_string) self.cv.notifyAll() self.cv.wait() except Error as err: print err break
def run(self): while True: self.cv.acquire() if len(self.packetQueue) > 0: packet = self.packetQueue.pop() json_str = json.dumps(packet.packet) packet_string = "Content-Length:" + str(len(json_str)) + "\r\n" + json_str self.conn.send(packet_string)
5ff7b3b6722adf0535960e4a3538deb96c66b426 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11436/5ff7b3b6722adf0535960e4a3538deb96c66b426/crossfire_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 1053, 30, 365, 18, 19774, 18, 1077, 1039, 1435, 309, 562, 12, 2890, 18, 11482, 3183, 13, 405, 374, 30, 4414, 273, 365, 18, 11482, 3183, 18, 5120, 1435, 1163...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 1323, 1053, 30, 365, 18, 19774, 18, 1077, 1039, 1435, 309, 562, 12, 2890, 18, 11482, 3183, 13, 405, 374, 30, 4414, 273, 365, 18, 11482, 3183, 18, 5120, 1435, 1163...
saveFile = 2
createBackup = 1
def updatefile(self, fname, location, version, md, type = "downloading"): self.addText(type + " <b>%s</b>" % fname) try: newscript = self.download("/orange/download/lastStable/"+location) except: return 0
a02e8d7153f2c4738602d3234a7588184bd80c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/a02e8d7153f2c4738602d3234a7588184bd80c5f/updateOrange.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 768, 12, 2890, 16, 5299, 16, 2117, 16, 1177, 16, 3481, 16, 618, 273, 315, 7813, 310, 6, 4672, 365, 18, 1289, 1528, 12, 723, 397, 315, 411, 70, 9822, 87, 1757, 70, 2984, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 768, 12, 2890, 16, 5299, 16, 2117, 16, 1177, 16, 3481, 16, 618, 273, 315, 7813, 310, 6, 4672, 365, 18, 1289, 1528, 12, 723, 397, 315, 411, 70, 9822, 87, 1757, 70, 2984, 738, ...
this = apply(_quickfix.new_RepeatingGroupCountMismatch, args)
this = _quickfix.new_RepeatingGroupCountMismatch(*args)
def __init__(self, *args): this = apply(_quickfix.new_RepeatingGroupCountMismatch, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 426, 347, 1776, 1114, 1380, 16901, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 426, 347, 1776, 1114, 1380, 16901, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211,...
Failed to evolve database to gneration 4 for app1
Failed to evolve database to generation 4 for app1
... def evolve(self, context, generation):
b0b5b628b7bd860c358f02db2f07c29373368bb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9529/b0b5b628b7bd860c358f02db2f07c29373368bb7/generations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 2113, 5390, 12, 2890, 16, 819, 16, 9377, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 2113, 5390, 12, 2890, 16, 819, 16, 9377, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
result=result or {}
if result is None: result={}
def parse_cookie(text, result=None, parmre=regex.compile( '\([\0- ]*' '\([^\0- ;,=\"]+\)=\([^\0- =\"]+\)' '\([\0- ]*[;,]\)?[\0- ]*\)' ), qparmre=regex.compile( '\([\0- ]*' '\([^\0- ;,=\"]+\)="\([^"]*\)\"' '\([\0- ]*[;,]\)?[\0- ]*\)' ), ): result=result or {} if parmre.match(text) >= 0: name=lower(parmre.group(2)) value=parmre.group(3) l=len(parmre.group(1)) elif qparmre.match(text) >= 0: name=lower(qparmre.group(2)) value=qparmre.group(3) l=len(qparmre.group(1)) else: if not text or not strip(text): return result raise "InvalidParameter", text result[name]=value return apply(parse_cookie,(text[l:],result))
5e9ddc03906a7421924119e790e97b7b6e4e2f15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/5e9ddc03906a7421924119e790e97b7b6e4e2f15/Publish.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 8417, 12, 955, 16, 563, 33, 7036, 16, 19924, 266, 33, 7584, 18, 11100, 12, 2337, 14026, 20, 17, 308, 4035, 2337, 19042, 20, 17, 274, 16, 5189, 26446, 13, 18206, 19042, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 8417, 12, 955, 16, 563, 33, 7036, 16, 19924, 266, 33, 7584, 18, 11100, 12, 2337, 14026, 20, 17, 308, 4035, 2337, 19042, 20, 17, 274, 16, 5189, 26446, 13, 18206, 19042, 20, ...
s = coord()
s = Coord()
def scatter(self): s = coord() s.i = self.i + randrange(-1, 2) s.j = self.j + randrange(-1, 2) return s
e571d502c19abfb5a3320300c347793da7b43d05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/e571d502c19abfb5a3320300c347793da7b43d05/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 12, 2890, 4672, 272, 273, 10320, 1435, 272, 18, 77, 273, 365, 18, 77, 397, 5605, 3676, 19236, 21, 16, 576, 13, 272, 18, 78, 273, 365, 18, 78, 397, 5605, 3676, 19236, 21, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 12, 2890, 4672, 272, 273, 10320, 1435, 272, 18, 77, 273, 365, 18, 77, 397, 5605, 3676, 19236, 21, 16, 576, 13, 272, 18, 78, 273, 365, 18, 78, 397, 5605, 3676, 19236, 21, 16, ...
return "<data><response>This is not your HOPE-NY Community Map.</response></data>"
return "<data><response>This is not your map.</response></data>"
def flashConduit(self,HTMLid="",HTMLticket=""): #First, check to make sure there's a session established if not get_uni() and get_auth(): return "<response>Session error</response>"
89695e2663021b8894b2f00223dee5447867e4b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5854/89695e2663021b8894b2f00223dee5447867e4b1/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9563, 442, 2544, 305, 12, 2890, 16, 4870, 350, 1546, 3113, 4870, 16282, 1546, 6, 4672, 468, 3759, 16, 866, 358, 1221, 3071, 1915, 1807, 279, 1339, 19703, 309, 486, 336, 67, 318, 77, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9563, 442, 2544, 305, 12, 2890, 16, 4870, 350, 1546, 3113, 4870, 16282, 1546, 6, 4672, 468, 3759, 16, 866, 358, 1221, 3071, 1915, 1807, 279, 1339, 19703, 309, 486, 336, 67, 318, 77, 14...
def makeLabel(parcel, label=u'', borderTop=5, border=None):
def makeLabel(parcel, label=u'', borderTop=5, border=None, width=60):
def makeLabel(parcel, label=u'', borderTop=5, border=None): """ Make a StaticText label template for use in the detail view. Call .install(parcel) on the resulting template, either directly or after building up a list of templates, to actually instantiate the item in the parcel. @param parcel: The parcel that the label block will go into @type parcel: Parcel @param label: The label to be displayed (usually specified as "_(u'something')" to allow internationalization) @type label: Unicode @param borderTop: Optionally, specify a top border of 5, with 0 border on the other sides @type borderTop: Integer @param border: Optionally, specify all four sides of the border on the new label block. @type border: Rect @returns: The new label block template. """ blocks = schema.ns("osaf.framework.blocks", parcel.itsView) border = border or RectType(borderTop, 0, 0, 0) return StaticText.template(uniqueName(parcel, 'Label'), title=label, characterStyle=blocks.LabelStyle, textAlignmentEnum='Right', stretchFactor=0.0, minimumSize=SizeType(60, -1), border=border)
a1f52d3b17e7997f9dc914308cc1293463f59621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a1f52d3b17e7997f9dc914308cc1293463f59621/detailblocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 2224, 12, 1065, 2183, 16, 1433, 33, 89, 11, 2187, 5795, 3401, 33, 25, 16, 5795, 33, 7036, 16, 1835, 33, 4848, 4672, 3536, 4344, 279, 10901, 1528, 1433, 1542, 364, 999, 316, 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, 1221, 2224, 12, 1065, 2183, 16, 1433, 33, 89, 11, 2187, 5795, 3401, 33, 25, 16, 5795, 33, 7036, 16, 1835, 33, 4848, 4672, 3536, 4344, 279, 10901, 1528, 1433, 1542, 364, 999, 316, 326, ...
if not card.face_shown: return 0
def acceptable(self, cards):
1b2b53a25d27d96f60926802226dd375767cb3b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b2b53a25d27d96f60926802226dd375767cb3b2/solitaire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14206, 12, 2890, 16, 18122, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14206, 12, 2890, 16, 18122, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
"buildProcess" :
"buildProcess" :
def process(options): global verbose global quiet verbose = options.verbose quiet = options.quiet if verbose: quiet = False print ">>> Processing..." if not quiet: print " - Configuration: %s" % options.config print " - Jobs: %s" % ", ".join(options.jobs) # TODO: File parser # - Translate dashed to camelcase # - Translate "true" to Python "True" # Include/Exclude hints # # class/module => # include items with their dependencies # exclude items, also remove items not needed by other modules than the removed ones # # =class/module => # explicit include/exclude of given module or class # config = { "common" : { "classPath" : [ "framework/source/class", "application/apiviewer/source/class", "application/feedreader/source/class", "application/webmail/source/class", "application/showcase/source/class" ], "require" : { "qx.log.Logger" : ["qx.log.appender.Native"] } }, "source" : { "extend" : ["common"], "sourceScript" : "source.js" }, "api-feedreader" : { "extend" : ["common"], "apiScript" : "api-feedreader", "include" : ["feedreader.Application"] }, "build-common" : { "extend" : ["common"] }, "build-all" : { "extend" : ["build-common"], "buildScript" : "build-all" }, "build-core" : { "extend" : ["build-common"], "buildScript" : "build-core", "include" : ["apiviewer.Application"], "exclude" : ["ui_tree","=qx.ui.core.Widget"] }, "build-apiviewer" : { "extend" : ["build-common"], "buildScript" : "build-apiviewer", "include" : ["apiviewer.*","qx.theme.ClassicRoyale"], "buildProcess" : [ "optimize-variables", "optimize-basecalls", "optimize-strings", "optimize-privates" ] }, "build-apiviewer-variants" : { "extend" : ["build-common"], "buildScript" : "build-apiviewer-variants", "include" : ["apiviewer.*","qx.theme.ClassicRoyale"], "variants" : { #"qx.debug" : ["on","off"], "qx.debug" : ["off"], "qx.aspects" : ["off"], #"qx.client" : ["gecko","mshtml","webkit","opera"], "qx.client" : ["gecko","mshtml"] }, "buildProcess" : [ "optimize-variables", "optimize-basecalls", "optimize-strings" ] }, "build-feedreader" : { "extend" : ["build-common"], "buildScript" : "build-feedreader", "include" : ["feedreader.Application"] }, "build-parts-common" : { "extend" : ["build-common"], "optimizeLatency" : 5000 }, "build-app-views" : { "extend" : ["build-parts-common"], "buildScript" : "build-app-views", #"collapseParts" : ["webmail","feedreader","showcase"], "views" : { "apiviewer" : ["apiviewer.Application"], "feedreader" : ["feedreader.Application"], "webmail" : ["webmail.Application"], "showcase" : ["showcase.Application"] } }, "build-comp-views" : { "extend" : ["build-parts-common"], "buildScript" : "build-comp-parts", "parts" : { "tree" : ["ui_tree"], "colorselector" : ["qx.ui.component.ColorSelector"], "window" : ["ui_window"], "toolbar" : ["ui_toolbar", "ui_menu"], "table" : ["ui_table"], "form" : ["ui_form"] } }, "build-feedreader-parts" : { "extend" : ["build-parts-common"], "buildScript" : "build-feedreader-parts", "collapseParts" : ["core"], "parts" : { "core" : ["feedreader.Application","qx.theme.ClassicRoyale"], "table" : ["qx.ui.table.Table", "qx.ui.table.model.Simple", "qx.ui.table.columnmodel.Resize"], "article" : ["feedreader.ArticleView"], "preferences" : ["ui_window"] } }, "build-apiviewer-parts" : { "extend" : ["build-parts-common"], "buildScript" : "build-apiviewer-parts", "variants" : { "qx.debug" : ["off"], "qx.client" : ["gecko","mshtml"] }, "collapseParts" : ["core"], "parts" : { "core" : ["apiviewer.Application","qx.theme.ClassicRoyale"], "viewer" : ["apiviewer.Viewer"], "content" : ["apiviewer.ui.ClassViewer","apiviewer.ui.PackageViewer"] } }, "build-apiviewer-parts-noqx" : { "extend" : ["build-parts-common"], "buildScript" : "build-apiviewer-parts-noqx", "variants" : { "qx.debug" : ["off"], "qx.client" : ["gecko","mshtml"] }, "collapseParts" : ["core"], "include" : ["apiviewer.Application"], "exclude" : ["=qx.*"], "parts" : { "core" : ["apiviewer.Application","qx.theme.ClassicRoyale"], "viewer" : ["apiviewer.Viewer"], "content" : ["apiviewer.ui.ClassViewer","apiviewer.ui.PackageViewer"] } } } resolve(config, options.jobs) for job in options.jobs: execute(job, config[job])
e3364bd2416dfe75fd85aeea0ded427372ef3d08 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e3364bd2416dfe75fd85aeea0ded427372ef3d08/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2116, 4672, 2552, 3988, 2552, 10902, 225, 3988, 273, 702, 18, 11369, 10902, 273, 702, 18, 20380, 225, 309, 3988, 30, 10902, 273, 1083, 225, 1172, 315, 23012, 19652, 7070, 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, 1207, 12, 2116, 4672, 2552, 3988, 2552, 10902, 225, 3988, 273, 702, 18, 11369, 10902, 273, 702, 18, 20380, 225, 309, 3988, 30, 10902, 273, 1083, 225, 1172, 315, 23012, 19652, 7070, 309, ...
obstacle, obstacle_is_light = self._next_obstacle(rank)
self._act_smartly(rank)
def update(self, rank): """ Updates the car speed and position, manages blocked pathways and queues. rank (int) : position on the road (0 : last in) """ # TODO : # · (C.U1) resort to more "realistic" physics (e.g. acceleration, braking...) if not isinstance(self.location, Road): return None obstacle, obstacle_is_light = self._next_obstacle(rank) next_position = self.position + self.speed * delta_t
2868875de75ba3626bca979e4a65cc74c2a144ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4798/2868875de75ba3626bca979e4a65cc74c2a144ad/car.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 6171, 4672, 3536, 15419, 326, 5926, 8632, 471, 1754, 16, 20754, 281, 14547, 589, 3052, 471, 11897, 18, 6171, 565, 261, 474, 13, 282, 294, 282, 1754, 603, 326, 721, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 6171, 4672, 3536, 15419, 326, 5926, 8632, 471, 1754, 16, 20754, 281, 14547, 589, 3052, 471, 11897, 18, 6171, 565, 261, 474, 13, 282, 294, 282, 1754, 603, 326, 721, ...
info =self._storage.undoInfo()
info = self._storage.undoInfo()
def checkNotUndoable(self): # Set things up so we've got a transaction that can't be undone oid = self._storage.new_oid() revid_a = self._dostore(oid, data=51) revid_b = self._dostore(oid, revid=revid_a, data=52) revid_c = self._dostore(oid, revid=revid_b, data=53) # Start the undo info =self._storage.undoInfo() tid = info[1]['id'] self._storage.tpc_begin(self._transaction) self.assertRaises(POSException.UndoError, self._storage.transactionalUndo, tid, self._transaction) self._storage.tpc_abort(self._transaction) # Now have more fun: object1 and object2 are in the same transaction, # which we'll try to undo to, but one of them has since modified in # different transaction, so the undo should fail. oid1 = oid revid1 = revid_c oid2 = self._storage.new_oid() revid2 = ZERO p81, p82, p91, p92 = map(pickle.dumps, (81, 82, 91, 92))
f8d1d748f6f1881c067d94a9a0868707bc5ec509 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/f8d1d748f6f1881c067d94a9a0868707bc5ec509/TransactionalUndoStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1248, 31224, 429, 12, 2890, 4672, 468, 1000, 9198, 731, 1427, 732, 8081, 2363, 279, 2492, 716, 848, 1404, 506, 640, 8734, 7764, 273, 365, 6315, 5697, 18, 2704, 67, 839, 1435, 283, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1248, 31224, 429, 12, 2890, 4672, 468, 1000, 9198, 731, 1427, 732, 8081, 2363, 279, 2492, 716, 848, 1404, 506, 640, 8734, 7764, 273, 365, 6315, 5697, 18, 2704, 67, 839, 1435, 283, ...
tk=[] tk_sort=[] tk_pr=[] tk_po=[] split_str=str(split_str) tk_split=re.findall("(^|,)(\d+:\d+)|(\d+)",split_str)
tk=[] tk_sort=[] tk_pr=[] tk_po=[] split_str=str(split_str) tk_split=re.findall("(^|,)(\d+:\d+)|(\d+)",split_str)
def check_split_str(split_str): if re.match("((^|,)(\d+:\d+|\d+))+$",split_str)==None: return False tk=[] tk_sort=[] tk_pr=[] tk_po=[] split_str=str(split_str) tk_split=re.findall("(^|,)(\d+:\d+)|(\d+)",split_str) for i in range(len(tk_split)): if tk_split[i][2]!='': tk.append(tk_split[i][2]) tk_pr.append(int(tk[-1])) tk_po.append(int(tk[-1])+1) if tk_split[i][1]!='': tk.append(tk_split[i][1]) tk_pr.append(int(tk[-1].split(":")[0])) tk_po.append(int(tk[-1].split(":")[1])) tk=numpy.array(tk) tk_pr=numpy.array(tk_pr) tk_po=numpy.array(tk_po) sindex=tk_pr.argsort() tk=tk[sindex] tk_pr=tk_pr[sindex] tk_po=tk_po[sindex] for i in range(len(tk)): if tk_pr[i]>=tk_po[i]: return False return True
76bd12c9f0f970ec39e56fe35c8c6964ae612c86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12567/76bd12c9f0f970ec39e56fe35c8c6964ae612c86/indexsplit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4939, 67, 701, 12, 4939, 67, 701, 4672, 309, 283, 18, 1916, 2932, 12443, 66, 96, 16, 13, 4713, 72, 15, 5581, 72, 15, 8960, 72, 15, 3719, 26020, 3113, 4939, 67, 701, 13, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4939, 67, 701, 12, 4939, 67, 701, 4672, 309, 283, 18, 1916, 2932, 12443, 66, 96, 16, 13, 4713, 72, 15, 5581, 72, 15, 8960, 72, 15, 3719, 26020, 3113, 4939, 67, 701, 13, 63...
msg['Message-Id'] = '<'+str(time.time())+'-tinycrm-'+str(tinycrm)+'@'+socket.gethostname()+'>'
msg['Message-Id'] = "<%s-tinycrm-%s@%s>" % (time.time(), tinycrm, socket.gethostname()) if attach: msg.attach( MIMEText(body or '', _charset='utf-8', _subtype=subtype) ) for (fname,fcontent) in attach: part = MIMEBase('application', "octet-stream") part.set_payload( fcontent ) Encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % (fname,)) msg.attach(part)
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, on_error=False, reply_to=False, tinycrm=False, ssl=False, debug=False,subtype='plain'): """Send an email.""" if not email_cc: email_cc=[] if not email_bcc: email_bcc=[] import smtplib from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.Header import Header from email.Utils import formatdate, COMMASPACE msg = MIMEText(body or '',_subtype=subtype,_charset='utf-8') msg['Subject'] = Header(subject.decode('utf8'), 'utf-8') msg['From'] = email_from del msg['Reply-To'] if reply_to: msg['Reply-To'] = msg['From']+', '+reply_to msg['To'] = COMMASPACE.join(email_to) if email_cc: msg['Cc'] = COMMASPACE.join(email_cc) if email_bcc: msg['Bcc'] = COMMASPACE.join(email_bcc) msg['Date'] = formatdate(localtime=True) if tinycrm: msg['Message-Id'] = '<'+str(time.time())+'-tinycrm-'+str(tinycrm)+'@'+socket.gethostname()+'>' try: s = smtplib.SMTP() if debug: s.debuglevel = 5 s.connect(config['smtp_server'], config['smtp_port']) if ssl: s.ehlo() s.starttls() s.ehlo() if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), msg.as_string()) s.quit() except Exception, e: import logging logging.getLogger().error(str(e)) return True
e4849c04508109facfabebd9d9191405d820081d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/e4849c04508109facfabebd9d9191405d820081d/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2699, 67, 4661, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 603, 67, 1636, 33, 8381, 16, 4332, 67, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2699, 67, 4661, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 603, 67, 1636, 33, 8381, 16, 4332, 67, 86...
pass
gLogger.exception( "SUPROCESS: readFromFile exception" )
def __readFromFile( self, file, baseLength, doAll ): try: if doAll: dataString = "".join( file.readlines() ) else: dataString = file.readline() except Exception, v: pass if len( dataString ) + baseLength > self.bufferLimit: gLogger.error( 'Maximum output buffer length reached' ) retDict = S_ERROR( 'Reached maximum allowed length (%d bytes) for called ' 'function return value' % self.bufferLimit ) retDict[ 'Value' ] = dataString return retDict
98eab470e9d30064f613518b8b9dbf42597e9009 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/98eab470e9d30064f613518b8b9dbf42597e9009/Subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 13087, 12, 365, 16, 585, 16, 1026, 1782, 16, 741, 1595, 262, 30, 775, 30, 309, 741, 1595, 30, 501, 780, 273, 1408, 18, 5701, 12, 585, 18, 896, 3548, 1435, 262, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 13087, 12, 365, 16, 585, 16, 1026, 1782, 16, 741, 1595, 262, 30, 775, 30, 309, 741, 1595, 30, 501, 780, 273, 1408, 18, 5701, 12, 585, 18, 896, 3548, 1435, 262, 469, 30, ...
if random is not None: W = recipr(recipr(W) + random)
W.shape = Y.shape
def estimate_mean(Y, sd): """ Estimate the mean of a sample given information about the standard deviations of each entry. The data may have some random effects variance Parameters ---------- Y : np.ndarray Data for which mean is to be estimated. Should have shape (nsubj, nvox). sd : np.ndarray Standard deviation (subject specific) of the data for which the mean is to be estimated. Should have shape (nsubj, nvox). Returns ------- value : dict This dictionary has keys ['mu', 'scale', 't', 'resid', 'sd'] """ nsubject = Y.shape[0] _stretch = lambda x: np.multiply.outer(nsubject, x) if Y.ndim == 1: Y.shape = (Y.shape[0], 1) W = recipr(sd**2) if W.shape in [(), (1,)]: W = np.ones(Y.shape) * W if random is not None: W = recipr(recipr(W) + random) # Compute the mean using the optimal weights mu = (Y * W).sum(0) / W.sum(0) resid = (Y - _stretch(mu)) * np.sqrt(W) scale = np.add.reduce(np.power(resid, 2), 0) / (nsubject - 1) var_total = scale * recipr(W.sum(0)) value = {} value['resid'] = resid value['mu'] = mu value['sd'] = np.squeeze(np.sqrt(var_total)) value['t'] = np.squeeze(value['mu'] * recipr(value['sd'])) value['scale'] = np.sqrt(scale) return value
626f19cf5cfeb4411250f638801e952cb8b4c352 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12658/626f19cf5cfeb4411250f638801e952cb8b4c352/onesample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11108, 67, 7079, 12, 61, 16, 8349, 4672, 3536, 225, 17787, 4988, 326, 3722, 434, 279, 3296, 864, 1779, 2973, 326, 4529, 27492, 1012, 434, 1517, 1241, 18, 1021, 501, 2026, 1240, 2690, 274...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11108, 67, 7079, 12, 61, 16, 8349, 4672, 3536, 225, 17787, 4988, 326, 3722, 434, 279, 3296, 864, 1779, 2973, 326, 4529, 27492, 1012, 434, 1517, 1241, 18, 1021, 501, 2026, 1240, 2690, 274...
return os.path.normpath(absolute)
normalized = os.path.normpath(absolute) if os.path.sep != '/': normalized = normalized.replace(os.path.sep, '/') return normalized
def to_absolute(path, prefix): """Make a url/path into an absolute URL by applying the given prefix """ # Absolute path or full url if path.startswith('/') or '://' in path: return path absolute = "%s/%s" % (prefix, path) if '://' in absolute: return absolute return os.path.normpath(absolute)
4010278dd2ccaaf88790dd3e98b7eda3122d8e9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12188/4010278dd2ccaaf88790dd3e98b7eda3122d8e9e/compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 12547, 12, 803, 16, 1633, 4672, 3536, 6464, 279, 880, 19, 803, 1368, 392, 4967, 1976, 635, 13650, 326, 864, 1633, 3536, 468, 25014, 589, 578, 1983, 880, 309, 589, 18, 17514, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 358, 67, 12547, 12, 803, 16, 1633, 4672, 3536, 6464, 279, 880, 19, 803, 1368, 392, 4967, 1976, 635, 13650, 326, 864, 1633, 3536, 468, 25014, 589, 578, 1983, 880, 309, 589, 18, 17514, 1...
self.parser.phase.insertionModes["inHead"](self.parser).processStartTag(name, attributes)
self.parser.phase.insertionModes["inHead"](self.parser).\ processStartTag(name, attributes)
def startTagFromHead(self, name, attributes): self.parser.parseError() self.parser.phase.insertionModes["inHead"](self.parser).processStartTag(name, attributes)
84c2e7cefca2f7e014a14488bf1d91ae8d12be25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/84c2e7cefca2f7e014a14488bf1d91ae8d12be25/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 1265, 1414, 12, 2890, 16, 508, 16, 1677, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 365, 18, 4288, 18, 13961, 18, 6387, 285, 18868, 9614, 267, 1414, 11929, 12, 2890, 18, 4288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 1265, 1414, 12, 2890, 16, 508, 16, 1677, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 365, 18, 4288, 18, 13961, 18, 6387, 285, 18868, 9614, 267, 1414, 11929, 12, 2890, 18, 4288...
user_id = request.session[SESSION_KEY] CACHE_KEY = "CACHED_USER_OBJ__%s" % user_id
user = None if request.session.has_key(SESSION_KEY): user_id = request.session[SESSION_KEY] CACHE_KEY = "CACHED_USER_OBJ__%s" % user_id
def __get__(self, request, obj_type=None): global get_user, ESPUser if not hasattr(request, '_cached_user'): SESSION_KEY = '_auth_user_id' user_id = request.session[SESSION_KEY] CACHE_KEY = "CACHED_USER_OBJ__%s" % user_id user = cache.get(CACHE_KEY) if not user: if get_user is None or ESPUser is None: from django.contrib.auth import get_user from esp.users.models import ESPUser request._cached_user = ESPUser(get_user(request)) cache.add(CACHE_KEY, request._cached_user) else: request._cached_user = user
7b68327be5649b9113945bd8589c5a1522718d7e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/7b68327be5649b9113945bd8589c5a1522718d7e/espauthmiddleware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 590, 16, 1081, 67, 723, 33, 7036, 4672, 2552, 336, 67, 1355, 16, 512, 3118, 1299, 309, 486, 3859, 12, 2293, 16, 2070, 7097, 67, 1355, 11, 4672, 10307, 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, 1001, 588, 972, 12, 2890, 16, 590, 16, 1081, 67, 723, 33, 7036, 4672, 2552, 336, 67, 1355, 16, 512, 3118, 1299, 309, 486, 3859, 12, 2293, 16, 2070, 7097, 67, 1355, 11, 4672, 10307, 6...
if c in self.theme_alphas \ and "no" in self.theme_alphas[c]: self.color_buttons[c].set_use_alpha(False) elif c in self.theme_alphas \ or a in DEFAULT_COLORS:
if a in colors \ and not (c in self.theme_alphas \ and "no" in self.theme_alphas[c]):
def update(self): """Set widgets according to settings."""
f87596a97ede202ed957bc3e42ed137a21ce196b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/f87596a97ede202ed957bc3e42ed137a21ce196b/dbx_preference.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 694, 10965, 4888, 358, 1947, 12123, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 694, 10965, 4888, 358, 1947, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if ch == u'\\' or ch == str(quote) : result[i] = '\\' result[i + 1] = str(ch) i += 2 continue
def repr__Unicode(space, w_unicode): hexdigits = "0123456789abcdef" chars = w_unicode._value size = len(chars) singlequote = doublequote = False for c in chars: if c == u'\'': singlequote = True elif c == u'"': doublequote = True if singlequote and not doublequote: quote = '"' else: quote = '\'' result = ['\0'] * (2 + size*6 + 1) result[0] = 'u' result[1] = quote i = 2 for ch in chars: if ch == u'\\' or ch == str(quote) : result[i] = '\\' result[i + 1] = str(ch) i += 2 continue
0700e11977c8905de851580cfc37069f4e20a9c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0700e11977c8905de851580cfc37069f4e20a9c8/unicodeobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8480, 972, 16532, 12, 2981, 16, 341, 67, 9124, 4672, 3827, 16649, 273, 315, 26684, 28953, 6, 5230, 273, 341, 67, 9124, 6315, 1132, 963, 273, 562, 12, 7549, 13, 225, 2202, 6889, 273, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8480, 972, 16532, 12, 2981, 16, 341, 67, 9124, 4672, 3827, 16649, 273, 315, 26684, 28953, 6, 5230, 273, 341, 67, 9124, 6315, 1132, 963, 273, 562, 12, 7549, 13, 225, 2202, 6889, 273, 16...
self.__output = self.__job.get_cache_dir() + '/' + self.__observatory + '-' self.__output += self.__type + '-' self.__output += str(self.__start) + '-' + str(self.__end) + '.cache'
self.__output = os.path.join(self.__job.get_cache_dir(), self.__observatory + '-' + self.__type + '-' + str(self.__start) + '-' + str(self.__end) + '.cache')
def __set_output(self): """ Private method to set the file to write the cache to. Automaticaly set once the ifo, start and end times have been set. """ if self.__start and self.__end and self.__observatory and self.__type: self.__output = self.__job.get_cache_dir() + '/' + self.__observatory + '-' self.__output += self.__type + '-' self.__output += str(self.__start) + '-' + str(self.__end) + '.cache' self.add_output_file(self.__output)
b10e672bf102411f367708ea141a9c5599e8418f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/b10e672bf102411f367708ea141a9c5599e8418f/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 67, 2844, 12, 2890, 4672, 3536, 8726, 707, 358, 444, 326, 585, 358, 1045, 326, 1247, 358, 18, 11809, 362, 270, 1706, 93, 444, 3647, 326, 21479, 16, 787, 471, 679, 4124, 1240...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2844, 12, 2890, 4672, 3536, 8726, 707, 358, 444, 326, 585, 358, 1045, 326, 1247, 358, 18, 11809, 362, 270, 1706, 93, 444, 3647, 326, 21479, 16, 787, 471, 679, 4124, 1240...
unitary matrix of shape `(n, n)` or `(n, k)`, depending
unitary matrix of shape `(n, n)` or `(k, n)`, depending
def svd_device(a, a_dtype, a_shape, full_matrices=1, compute_uv=1): """ Singular Value Decomposition. Factors the matrix `a` into two unitary matrices, `u` and `vh`, and a 1-dimensional array of real, non-negative singular values, `s`, such that `a == dot(u.T, dot(diag(s), vh.T))`. Parameters ---------- a : c_void_p Pointer to device memory containing matrix of shape `(m, n)` to decompose. a_dtype : {float32, complex64} Type of matrix data. a_shape : tuple Shape of matrix data `(m, n)`. full_matrices : bool, optional If True (default), `u` and `vh` have the shapes `(m, m)` and `(n, n)`, respectively. Otherwise, the shapes are `(k, m)` and `(n, k)`, resp., where `k = min(m, n)`. compute_uv : bool, optional If True (default), compute `u` and `vh` in addition to `s`. Returns ------- u : c_void_p Pointer to device memory containing unitary matrix of shape `(m, m)` or `(k, m)` depending on value of `full_matrices`. s : c_void_p Pointer to device memory containing the singular values, sorted such that `s[i] >= s[i+1]`. `s` is a 1-D array of length `min(m, n)`. vh : c_void_p Pointer to device memory containing unitary matrix of shape `(n, n)` or `(n, k)`, depending on `full_matrices`. Raises ------ LinAlgError If SVD computation does not converge. Notes ----- Because of the limitations of the free version of CULA, the argument is cast to single precision. If `a` is a matrix object (as opposed to an `ndarray`), then so are all the return values. Example ------- >>> import numpy as np >>> import cula >>> cula.culaInitialize() 0 >>> a = np.random.randn(9, 6) + 1j*np.random.randn(9, 6) >>> a = np.asarray(a, np.complex64) >>> m, n = a.shape >>> at = a.T.copy() >>> a_ptr = cula.cudaMalloc(a.nbytes) >>> cula.cuda_memcpy_htod(a_ptr, at.ctypes.data, at.nbytes) >>> u_ptr, s_ptr, vh_ptr = cula.svd_device(a_ptr, a.dtype, a.shape, full_matrices=False) >>> u = np.empty((min(m, n), m), a.dtype) >>> s = np.empty(min(m, n), np.float32) >>> vh = np.empty((n, min(m, n)), a.dtype) >>> cula.cuda_memcpy_dtoh(u.ctypes.data, u_ptr, u.nbytes) >>> cula.cuda_memcpy_dtoh(s.ctypes.data, s_ptr, s.nbytes) >>> cula.cuda_memcpy_dtoh(vh.ctypes.data, vh_ptr, vh.nbytes) >>> np.allclose(a, np.dot(u.T, np.dot(np.diag(s), vh.T))) True """ # The free version of CULA only supports single precision floating # point numbers: real_dtype = np.float32 real_dtype_nbytes = np.nbytes[real_dtype] if a_dtype == np.complex64: cula_func = _culaDeviceCgesvd a_dtype_nbytes = np.nbytes[a_dtype] elif a_dtype == np.float32: cula_func = _culaDeviceSgesvd a_dtype_nbytes = np.nbytes[a_dtype] else: raise ValueError('unsupported type') (m, n) = a_shape # Set LDA: lda = max(1, m) # Set S: s = cudaMalloc(min(m, n)*real_dtype_nbytes) # Set JOBU and JOBVT: if compute_uv: if full_matrices: jobu = 'A' jobvt = 'A' else: jobu = 'S' jobvt = 'S' else: jobu = 'N' jobvt = 'N' # Set LDU and transpose of U: ldu = m if jobu == 'A': u = cudaMalloc(ldu*m*a_dtype_nbytes) elif jobu == 'S': u = cudaMalloc(min(m, n)*ldu*a_dtype_nbytes) else: ldu = 1 u = cudaMalloc(a_dtype_nbytes) # Set LDVT and transpose of VT: if jobvt == 'A': ldvt = n vt = cudaMalloc(n*n*a_dtype_nbytes) elif jobvt == 'S': ldvt = min(m, n) vt = cudaMalloc(n*ldvt*a_dtype_nbytes) else: ldvt = 1 vt = cudaMalloc(a_dtype_nbytes) status = cula_func(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt) if status != 0: status = culaInitialize() culaCheckStatus(status) status = cula_func(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt) if status > 0: raise LinAlgError, 'SVD did not converge' if compute_uv: return u, s, vt else: cudaFree(u) cudaFree(vt) return s
ff79a5fd6add2888f896e16898c78c1b880d231a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14753/ff79a5fd6add2888f896e16898c78c1b880d231a/cula.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25656, 67, 5964, 12, 69, 16, 279, 67, 8972, 16, 279, 67, 4867, 16, 1983, 67, 7373, 12660, 33, 21, 16, 3671, 67, 16303, 33, 21, 4672, 3536, 348, 17830, 1445, 26824, 3276, 18, 225, 290...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25656, 67, 5964, 12, 69, 16, 279, 67, 8972, 16, 279, 67, 4867, 16, 1983, 67, 7373, 12660, 33, 21, 16, 3671, 67, 16303, 33, 21, 4672, 3536, 348, 17830, 1445, 26824, 3276, 18, 225, 290...
if time_length < 1: return '%0.2fsec' % time_length elif time_length < 60: return '<span style="color:
if time_length >= 60*1: time_string = '%i:%i:%i' % (int(time_length/60/60), int(time_length/60) % 60, time_length % (60*60)) elif time_length >= 120: time_string = '%i:%i' % (int(time_length/60), time_length % 60) elif time_length > 60: time_string = '%i sec' % time_length elif time_length > 1: time_string = '%0.1f sec' % time_length
def format_time(time_length): if time_length < 1: return '%0.2fsec' % time_length elif time_length < 60: return '<span style="color: #900">%.1fsec</span>' % time_length else: return '<span style="background-color: #600; color: #fff">%isec</span>' % time_length
4b50a108f2ece47945dc7358f24e2c43e8e26c00 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11400/4b50a108f2ece47945dc7358f24e2c43e8e26c00/watchthreads.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 957, 12, 957, 67, 2469, 4672, 309, 813, 67, 2469, 1545, 4752, 14, 21, 30, 225, 813, 67, 1080, 273, 1995, 77, 5319, 77, 5319, 77, 11, 738, 261, 474, 12, 957, 67, 2469, 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, 740, 67, 957, 12, 957, 67, 2469, 4672, 309, 813, 67, 2469, 1545, 4752, 14, 21, 30, 225, 813, 67, 1080, 273, 1995, 77, 5319, 77, 5319, 77, 11, 738, 261, 474, 12, 957, 67, 2469, 19, ...
return "Not all files were unpacked: %s" % " ".join(names)
return "Not all files were unpacked: %s" % " ".join(names)
def unpack(self, archive, output=None): tf = tarfile.open(archive, "r") members = tf.getmembers() skip = [] if self._renames: for member in members: for oldprefix, newprefix in self._renames: if oldprefix[:len(self._dir)] == self._dir: oldprefix2 = oldprefix[len(self._dir):] else: oldprefix2 = None if member.name[:len(oldprefix)] == oldprefix: if newprefix is None: skip.append(member) #print 'SKIP', member.name else: member.name = newprefix + member.name[len(oldprefix):] print ' ', member.name break elif oldprefix2 and member.name[:len(oldprefix2)] == oldprefix2: if newprefix is None: skip.append(member) #print 'SKIP', member.name else: member.name = newprefix + member.name[len(oldprefix2):] #print ' ', member.name break else: skip.append(member) #print '????', member.name for member in members: if member in skip: continue tf.extract(member, self._dir) if skip: names = [member.name for member in skip if member.name[-1] != '/'] if names: return "Not all files were unpacked: %s" % " ".join(names)
a37effdbaa9e688e7941df3a5c96f2b231d17274 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a37effdbaa9e688e7941df3a5c96f2b231d17274/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 12, 2890, 16, 5052, 16, 876, 33, 7036, 4672, 3253, 273, 25857, 18, 3190, 12, 10686, 16, 315, 86, 7923, 4833, 273, 3253, 18, 588, 7640, 1435, 2488, 273, 5378, 309, 365, 6315, 1187...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6167, 12, 2890, 16, 5052, 16, 876, 33, 7036, 4672, 3253, 273, 25857, 18, 3190, 12, 10686, 16, 315, 86, 7923, 4833, 273, 3253, 18, 588, 7640, 1435, 2488, 273, 5378, 309, 365, 6315, 1187...
name = xc+symbol + '_' + p['setups'][symbol]
name = 'potpaw'+xc.upper()+symbol + p['setups'][symbol]
def initialize(self, atoms): """Initialize a VASP calculation
b1f574e347c35c0890dd8424fa18be704371ba8f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/b1f574e347c35c0890dd8424fa18be704371ba8f/vasp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 9006, 4672, 3536, 7520, 279, 776, 3033, 52, 11096, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4046, 12, 2890, 16, 9006, 4672, 3536, 7520, 279, 776, 3033, 52, 11096, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def update_changes(verbose, timeout, once, transaction, flush):
def update_changes(verbose, timeout, once, use_transaction, flush):
def update_changes(verbose, timeout, once, transaction, flush): def after_index(obj): if verbose: sys.stdout.write('.') sys.stdout.flush() while True: changes = Change.objects.all().order_by("-date")# The objects must be sorted by date objs_count = changes.count() if objs_count > 0 and verbose: print 'There are %d objects to update' % objs_count for change in changes: indexers = reduce( operator.add, [space.get_indexers_for_model(change.content_type.model_class()) for space in IndexSpace.instances] ) for indexer in indexers: if change.action == "delete": indexer.delete(change.object_id) else: indexer.update([change.object], after_index, transaction, flush) change.delete() # Need to commit if using transactions (e.g. MySQL+InnoDB) since autocommit is # turned off by default according to PEP 249. See also: # http://dev.mysql.com/doc/refman/5.0/en/innodb-consistent-read-example.html # # PEP 249 states "Database modules that do not support transactions should # implement this method with void functionality". transaction.commit() if once: break time.sleep(timeout)
8cabc0f58df244c2ca465778c8dcf121434fc38d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4645/8cabc0f58df244c2ca465778c8dcf121434fc38d/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6329, 12, 11369, 16, 2021, 16, 3647, 16, 999, 67, 7958, 16, 3663, 4672, 1652, 1839, 67, 1615, 12, 2603, 4672, 309, 3988, 30, 2589, 18, 10283, 18, 2626, 2668, 1093, 13, 2589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 6329, 12, 11369, 16, 2021, 16, 3647, 16, 999, 67, 7958, 16, 3663, 4672, 1652, 1839, 67, 1615, 12, 2603, 4672, 309, 3988, 30, 2589, 18, 10283, 18, 2626, 2668, 1093, 13, 2589, ...
4*5 + 3*5^2 + 3*5^3 + 4*5^4 + 4*5^5 + 5^6 + 4*5^8 + O(5^9)
4*5 + 3*5^2 + 3*5^3 + 4*5^4 + 4*5^5 + 5^6 + 4*5^8 + 3*5^9 + O(5^10)
def padic_height(self, p, prec=20, sigma=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic height. The equation of the curve must be minimal at $p$.
b4c17f72cfffe6d3d64fa3f70fa8d12616c7a62d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b4c17f72cfffe6d3d64fa3f70fa8d12616c7a62d/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 7299, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, 352, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 7299, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, 352, 24...
if not self.playbin:
if not self.playbin or not self.supports_subtitles:
def get_subtitles(self): """Returns a dict of index -> (language, filename) for available tracks. """ if not self.playbin: return {}
a8188bb411554a33eb063e56222503ee504dfdf5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/a8188bb411554a33eb063e56222503ee504dfdf5/gstreamerrenderer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1717, 17643, 12, 2890, 4672, 3536, 1356, 279, 2065, 434, 770, 317, 261, 4923, 16, 1544, 13, 364, 2319, 13933, 18, 3536, 309, 486, 365, 18, 1601, 4757, 578, 486, 365, 18, 28064...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 1717, 17643, 12, 2890, 4672, 3536, 1356, 279, 2065, 434, 770, 317, 261, 4923, 16, 1544, 13, 364, 2319, 13933, 18, 3536, 309, 486, 365, 18, 1601, 4757, 578, 486, 365, 18, 28064...
id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id,"name": "%s %s %s" % (method , model_object.id, time.strftime("%Y-%m-%d %H:%M:%S"))})
resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id]) resource_name = resource_name and resource_name[0][1] or '' id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
def log_fct(self, db, uid, passwd, object, method, fct_src, *args): logged_uids = [] pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() obj=pool.get(object) object_name=obj._name obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)]) model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0] if method in ('create'): res_id = fct_src( db, uid, passwd, object, method, *args) cr.commit() new_value=pool.get(model_object.model).read(cr,uid,[res_id],args[0].keys())[0] if 'id' in new_value: del new_value['id'] if not len(logged_uids) or uid in logged_uids: id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id,"name": "%s %s %s" % (method , model_object.id, time.strftime("%Y-%m-%d %H:%M:%S"))}) lines=[] for field in new_value: if new_value[field]: line={ 'name':field, 'new_value':new_value[field], 'new_value_text': self.get_value_text(cr,uid,field,new_value[field],model_object) } lines.append(line) self.create_log_line(cr,uid,id,model_object,lines) cr.commit() cr.close() return res_id
0e39d9140eb8444826ab44e3d10a80b63fe37dbd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/0e39d9140eb8444826ab44e3d10a80b63fe37dbd/audittrail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 74, 299, 12, 2890, 16, 1319, 16, 4555, 16, 19093, 16, 733, 16, 707, 16, 28478, 67, 4816, 16, 380, 1968, 4672, 7545, 67, 21428, 273, 5378, 2845, 273, 2845, 264, 18, 588, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 74, 299, 12, 2890, 16, 1319, 16, 4555, 16, 19093, 16, 733, 16, 707, 16, 28478, 67, 4816, 16, 380, 1968, 4672, 7545, 67, 21428, 273, 5378, 2845, 273, 2845, 264, 18, 588, 67, ...
Returns a string describing self. EXAMPLES: We explicitly construct the alternating group on four
Returns a string describing ``self``. EXAMPLES: We explicitly construct the alternating group on four
def _repr_(self): r""" Returns a string describing self. EXAMPLES: We explicitly construct the alternating group on four elements. Note that the ``AlternatingGroup`` class has its own representation string. :: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: A4._repr_() 'Permutation Group with generators [(2,3,4), (1,2,3)]' sage: AlternatingGroup(4)._repr_() 'Alternating group of order 4!/2 as a permutation group' """ return "Permutation Group with generators %s"%self.gens()
f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 436, 8395, 2860, 279, 533, 16868, 12176, 2890, 68, 8338, 225, 5675, 8900, 11386, 30, 225, 1660, 8122, 4872, 326, 6416, 1776, 1041, 603, 12792, 2186, 18, 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, 389, 12715, 67, 12, 2890, 4672, 436, 8395, 2860, 279, 533, 16868, 12176, 2890, 68, 8338, 225, 5675, 8900, 11386, 30, 225, 1660, 8122, 4872, 326, 6416, 1776, 1041, 603, 12792, 2186, 18, 3...
this = apply(_quickfix.new_RndPx, args)
this = _quickfix.new_RndPx(*args)
def __init__(self, *args): this = apply(_quickfix.new_RndPx, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 54, 4880, 21776, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 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, 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, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 54, 4880, 21776, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 3...
if e.message != 'unichr() arg not in range(0x10000) (narrow Python build)':
if e.args != ('unichr() arg not in range(0x10000) (narrow Python build)',):
def test_unicode(self): 'Verify the pretty-printing of unicode values' # Test the empty unicode string: self.assertGdbRepr(u'')
7f7765ce39a07e3f71b98c9d34af262105ca9c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/7f7765ce39a07e3f71b98c9d34af262105ca9c94/test_gdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9124, 12, 2890, 4672, 296, 8097, 326, 7517, 17, 1188, 310, 434, 5252, 924, 11, 468, 7766, 326, 1008, 5252, 533, 30, 365, 18, 11231, 43, 1966, 426, 683, 12, 89, 11, 6134, 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, 1842, 67, 9124, 12, 2890, 4672, 296, 8097, 326, 7517, 17, 1188, 310, 434, 5252, 924, 11, 468, 7766, 326, 1008, 5252, 533, 30, 365, 18, 11231, 43, 1966, 426, 683, 12, 89, 11, 6134, 2,...
bmark.CreateTestsFromFile('%s/data/alexa-top-10000-global.txt' % NB_SOURCE,
bmark.CreateTestsFromFile('%s/data/alexa-top-10000-global.txt' % RSRC_DIR,
def benchmarkThread(self): """Run the benchmarks, designed to be run in a thread.""" pool = NSAutoreleasePool.alloc().init() self.spinner.startAnimation_(self) self.updateStatus('Preparing benchmark') self.nameservers.FindAndRemoveUndesirables() bmark = benchmark.Benchmark(self.nameservers, test_count=self.options.test_count, run_count=self.options.run_count, status_callback=self.updateStatus) bmark.updateStatus = self.updateStatus self.updateStatus('Creating test records using %s' % self.select_mode) if self.imported_records: bmark.CreateTests(self.imported_records, select_mode=self.select_mode) else: bmark.CreateTestsFromFile('%s/data/alexa-top-10000-global.txt' % NB_SOURCE, select_mode=self.select_mode)
c392f554826f3026ac4f0492fc310c2a34749826 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4170/c392f554826f3026ac4f0492fc310c2a34749826/controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14128, 3830, 12, 2890, 4672, 3536, 1997, 326, 14128, 87, 16, 26584, 358, 506, 1086, 316, 279, 2650, 12123, 2845, 273, 423, 5233, 322, 479, 2508, 2864, 18, 9853, 7675, 2738, 1435, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14128, 3830, 12, 2890, 4672, 3536, 1997, 326, 14128, 87, 16, 26584, 358, 506, 1086, 316, 279, 2650, 12123, 2845, 273, 423, 5233, 322, 479, 2508, 2864, 18, 9853, 7675, 2738, 1435, 365, 18...
if cmd.wait() != 0:
if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
def clpatch(ui, repo, clname, **opts): """import a patch from the code review server Imports a patch from the code review server into the local client. If the local client has already modified any of the files that the patch modifies, this command will refuse to apply the patch. Submitting an imported patch will keep the original author's name as the Author: line but add your own name to a Committer: line. """ cl, patch, err = DownloadCL(ui, repo, clname) argv = ["hgpatch"] if opts["no_incoming"]: argv += ["--checksync=false"] if err != "": return err try: cmd = subprocess.Popen(argv, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None, close_fds=True) except: return "hgpatch: " + ExceptionDetail() if os.fork() == 0: cmd.stdin.write(patch) os._exit(0) cmd.stdin.close() out = cmd.stdout.read() if cmd.wait() != 0: return "hgpatch failed" cl.local = True cl.files = out.strip().split() files = ChangedFiles(ui, repo, [], opts) extra = Sub(cl.files, files) if extra: ui.warn("warning: these files were listed in the patch but not changed:\n\t" + "\n\t".join(extra) + "\n") cl.Flush(ui, repo) ui.write(cl.PendingText() + "\n")
1a2418f575a3347540069b5deb856bac367e1a49 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6483/1a2418f575a3347540069b5deb856bac367e1a49/codereview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 2272, 12, 4881, 16, 3538, 16, 927, 529, 16, 2826, 4952, 4672, 3536, 5666, 279, 4729, 628, 326, 981, 10725, 1438, 225, 2221, 4363, 279, 4729, 628, 326, 981, 10725, 1438, 1368, 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, 927, 2272, 12, 4881, 16, 3538, 16, 927, 529, 16, 2826, 4952, 4672, 3536, 5666, 279, 4729, 628, 326, 981, 10725, 1438, 225, 2221, 4363, 279, 4729, 628, 326, 981, 10725, 1438, 1368, 326, ...
f = urllib.urlopen(url+"?"+params)
urllib.urlopen(url+"?"+params)
def sms_send(user, password, api_id, text, to): import urllib url = "http://api.urlsms.com/SendSMS.aspx" #url = "http://196.7.150.220/http/sendmsg" params = urllib.urlencode({'UserID': user, 'Password': password, 'SenderID': api_id, 'MsgText': text, 'RecipientMobileNo':to}) f = urllib.urlopen(url+"?"+params) # FIXME: Use the logger if there is an error return True
148c45f1102b8b176894f0806bd9cdd0905ae419 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/148c45f1102b8b176894f0806bd9cdd0905ae419/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16188, 67, 4661, 12, 1355, 16, 2201, 16, 1536, 67, 350, 16, 977, 16, 358, 4672, 1930, 11527, 880, 273, 315, 2505, 2207, 2425, 18, 10518, 959, 18, 832, 19, 3826, 29533, 18, 345, 4430, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16188, 67, 4661, 12, 1355, 16, 2201, 16, 1536, 67, 350, 16, 977, 16, 358, 4672, 1930, 11527, 880, 273, 315, 2505, 2207, 2425, 18, 10518, 959, 18, 832, 19, 3826, 29533, 18, 345, 4430, ...
random.randint(0, 2147483647), random.randint(0, 2147483647))
random.randint(0, 2147483647) | 0x01010101, random.randint(0, 2147483647) | 0x01010101)
def __new_rowid(self, table, txn) : """Create a new unique row identifier""" unique = 0 while not unique: # Generate a random 64-bit row ID string # (note: this code has <64 bits of randomness # but it's plenty for our database id needs!) newid = struct.pack('ll', random.randint(0, 2147483647), random.randint(0, 2147483647))
ea30a5aa2d20c8e0fe28c1cf655730c63e45b8ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/ea30a5aa2d20c8e0fe28c1cf655730c63e45b8ef/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 67, 492, 350, 12, 2890, 16, 1014, 16, 7827, 13, 294, 3536, 1684, 279, 394, 3089, 1027, 2756, 8395, 3089, 273, 374, 1323, 486, 3089, 30, 468, 6654, 279, 2744, 5178, 17, 3682...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2704, 67, 492, 350, 12, 2890, 16, 1014, 16, 7827, 13, 294, 3536, 1684, 279, 394, 3089, 1027, 2756, 8395, 3089, 273, 374, 1323, 486, 3089, 30, 468, 6654, 279, 2744, 5178, 17, 3682...
print "IP Address is: " + wiface.GetIP(fast=True)
print "IP Address is: " + str(wiface.GetIP(fast=True))
def run(self): """ The main function of the connection thread.
e2069a353a320cc778dfcd6dc5a382cfad0eed64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/353/e2069a353a320cc778dfcd6dc5a382cfad0eed64/networking.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1021, 2774, 445, 434, 326, 1459, 2650, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1021, 2774, 445, 434, 326, 1459, 2650, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.addr == types.TupleType:
if type(self.addr) == types.TupleType:
def __repr__ (self): try: status = [] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: if self.addr == types.TupleType: status.append ('%s:%d' % self.addr) else: status.append (self.addr) return '<%s %s at %x>' % (self.__class__.__name__, ' '.join (status), id (self)) except: pass
25d5ac90ce917044900c0b3bb4256aacbe1201ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/25d5ac90ce917044900c0b3bb4256aacbe1201ab/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 775, 30, 1267, 273, 5378, 309, 365, 18, 9436, 310, 471, 365, 18, 4793, 30, 1267, 18, 6923, 7707, 18085, 310, 6134, 1327, 365, 18, 8537, 30, 1267, 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, 12715, 972, 261, 2890, 4672, 775, 30, 1267, 273, 5378, 309, 365, 18, 9436, 310, 471, 365, 18, 4793, 30, 1267, 18, 6923, 7707, 18085, 310, 6134, 1327, 365, 18, 8537, 30, 1267, 18,...
'fixInfoBoxes',
def _any(list): for x in list: if x: return True return False
dd8f3364b8e149a7bd18266a7ac4931f83be99cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/dd8f3364b8e149a7bd18266a7ac4931f83be99cc/treecleaner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2273, 12, 1098, 4672, 364, 619, 316, 666, 30, 309, 619, 30, 327, 1053, 327, 1083, 282, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2273, 12, 1098, 4672, 364, 619, 316, 666, 30, 309, 619, 30, 327, 1053, 327, 1083, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
pkt = self.ins.next()[1]
pkt = self.ins.next() pkt = pkt[1]
def recv(self,x): ll = self.ins.datalink() if LLTypes.has_key(ll): cls = LLTypes[ll] else: warning("Unable to guess datalink type (interface=%s linktype=%i). Using Ethernet" % (self.iface, ll)) cls = Ether
e860b50ce055a1e86c618507ebf912384e2de838 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/e860b50ce055a1e86c618507ebf912384e2de838/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 12, 2890, 16, 92, 4672, 6579, 273, 365, 18, 2679, 18, 72, 3145, 754, 1435, 309, 29863, 2016, 18, 5332, 67, 856, 12, 2906, 4672, 2028, 273, 29863, 2016, 63, 2906, 65, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 12, 2890, 16, 92, 4672, 6579, 273, 365, 18, 2679, 18, 72, 3145, 754, 1435, 309, 29863, 2016, 18, 5332, 67, 856, 12, 2906, 4672, 2028, 273, 29863, 2016, 63, 2906, 65, 469, 30, ...
self.CheckEditableBlock("EditMailBcc", "bcc address", dict[field])
self.CheckEditableBlock("EditMailBcc", "bcc address", value)
def Check_DetailView(self, dict): """ Check expected values by comparation to the data diplayed in the detail view @type dict : dictionary @param dict : dictionary with expected item attributes values for checking {"attributeName":"expected value",...} """ if self.logger: self.logger.SetChecked(True) self.SelectItem() # call the check methods for field in dict.keys(): if field == "displayName": # display name checking self.CheckEditableBlock("HeadlineBlock", "display name", dict[field]) elif field == "startDate": # start date checking self.CheckEditableBlock("EditCalendarStartDate", "start date", self.formatDate(dict[field])) elif field == "startTime": # start time checking self.CheckEditableBlock("EditCalendarStartTime", "start time", dict[field]) elif field == "endDate": # end date checking self.CheckEditableBlock("EditCalendarEndDate", "end date", self.formatDate(dict[field])) elif field == "endTime": # end time checking self.CheckEditableBlock("EditCalendarEndTime", "end time", dict[field]) elif field == "location": # location checking self.CheckEditableBlock("CalendarLocation", "location", dict[field]) elif field == "body": # body checking self.CheckEditableBlock("NotesBlock", "body", dict[field]) elif field == "fromAddress": # from address checking self.CheckEditableBlock("EditMailFrom", "from address", dict[field]) elif field == "toAddress": # to address checking self.CheckEditableBlock("EditMailTo", "to address", dict[field]) elif field == "ccAddress": # cc address checking self.CheckEditableBlock("EditMailCc", "cc address", dict[field]) elif field == "bccAddress": # bcc address checking self.CheckEditableBlock("EditMailBcc", "bcc address", dict[field]) elif field == "status": # status checking self.CheckMenuBlock("EditTransparency", "status", dict[field]) elif field == "timeZone": # time zone checking self.CheckMenuBlock("EditTimeZone", "time-zone", dict[field]) elif field == "recurrence": # recurrence checking self.CheckMenuBlock("EditRecurrence", "recurrence", dict[field]) elif field == "recurrenceEnd": # recurrence end date checking self.CheckEditableBlock("EditRecurrenceEnd", "recurrence end", self.formatDate(dict[field])) elif field == "alarm": # status checking self.CheckMenuBlock("EditReminder", "alarm", dict[field]) elif field == "allDay": # status checking self.CheckEditableBlock("EditAllDay", "all-day", dict[field]) elif field == "stampMail": # Mail stamp checking self.CheckButton("MailMessageButton", "mail stamp", dict[field]) elif field == "stampTask": # Task stamp checking self.CheckButton("TaskStamp", "task stamp", dict[field]) elif field == "stampEvent": # Event stamp checking self.CheckButton("CalendarStamp", "calendar stamp", dict[field]) else: # Wrong check => set the report state to unchecked if self.logger: self.logger.SetChecked(False) #report the checkings if self.logger: self.logger.Report("Detail View")
5c6ba404b99947f3210082287c79a9b81a402c26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5c6ba404b99947f3210082287c79a9b81a402c26/QAUITestAppLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 67, 6109, 1767, 12, 2890, 16, 2065, 4672, 3536, 2073, 2665, 924, 635, 532, 20961, 358, 326, 501, 4314, 1601, 329, 316, 326, 7664, 1476, 632, 723, 2065, 294, 3880, 632, 891, 2065, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2073, 67, 6109, 1767, 12, 2890, 16, 2065, 4672, 3536, 2073, 2665, 924, 635, 532, 20961, 358, 326, 501, 4314, 1601, 329, 316, 326, 7664, 1476, 632, 723, 2065, 294, 3880, 632, 891, 2065, ...
self.assertRaises(TypeError, list, chain(N(s)))
self.assertRaises(TypeError, chain, N(s))
def test_chain(self): for s in ("123", "", range(1000), ('do', 1.2), xrange(2000,2200,5)): for g in (G, I, Ig, S, L, R): self.assertEqual(list(chain(g(s))), list(g(s))) self.assertEqual(list(chain(g(s), g(s))), list(g(s))+list(g(s))) self.assertRaises(TypeError, chain, X(s)) self.assertRaises(TypeError, list, chain(N(s))) self.assertRaises(ZeroDivisionError, list, chain(E(s)))
5cb6bfcb86589e7d483f1ae2db98f69a231d8a0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5cb6bfcb86589e7d483f1ae2db98f69a231d8a0b/test_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5639, 12, 2890, 4672, 364, 272, 316, 7566, 12936, 3113, 23453, 1048, 12, 18088, 3631, 7707, 2896, 2187, 404, 18, 22, 3631, 12314, 12, 17172, 16, 3787, 713, 16, 25, 3719, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5639, 12, 2890, 4672, 364, 272, 316, 7566, 12936, 3113, 23453, 1048, 12, 18088, 3631, 7707, 2896, 2187, 404, 18, 22, 3631, 12314, 12, 17172, 16, 3787, 713, 16, 25, 3719, 30, ...
v.visit(ast.parse(f))
parsetree = ast.parse(f)
def generic_visit(self, node): self.nodecnt += 1 #self.childNodeMap[self.nodecnt] = node self.childNodeMap[node] = self.nodecnt node_xmlrepr = etree.Element(node.__class__.__name__ + "Ast") node_xmlrepr.set('nodecnt', str(self.nodecnt)) self.currentnode.append(node_xmlrepr) save_currentnode = self.currentnode self.currentnode = node_xmlrepr fields = list(node._attributes) fields.extend(list(node._fields)) searching_locally = [] for field in fields: value = getattr(node, field) if type(value) not in [types.IntType, types.StringType, types.FloatType, types.BooleanType]: continue node_xmlrepr.set(field.lower(), str(value))
5e7877b19d28ec922e09bdead5d2bf29eff31e30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6362/5e7877b19d28ec922e09bdead5d2bf29eff31e30/pythonpythonparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5210, 67, 11658, 12, 2890, 16, 756, 4672, 365, 18, 2159, 13085, 1011, 404, 225, 468, 2890, 18, 3624, 907, 863, 63, 2890, 18, 2159, 13085, 65, 273, 756, 365, 18, 3624, 907, 863, 63, 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, 5210, 67, 11658, 12, 2890, 16, 756, 4672, 365, 18, 2159, 13085, 1011, 404, 225, 468, 2890, 18, 3624, 907, 863, 63, 2890, 18, 2159, 13085, 65, 273, 756, 365, 18, 3624, 907, 863, 63, 2...
if self._wantHash and not self._repoFile: gotHash = thandy.formats.getFileDigest(self._tmpPath) if gotHash != self._wantHash: raise thandy.DownloadError("File hash was not as expected.") elif self._repoFile: self._repoFile.checkFile(self._tmpPath, self._wantHash)
self._checkTmpFile()
def _download(self): # Implementation function. Unlike download(), can throw exceptions. f_in = f_out = None
32c62957f600c4dcba8fb24b6d00217876d84edd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9410/32c62957f600c4dcba8fb24b6d00217876d84edd/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7813, 12, 2890, 4672, 468, 25379, 445, 18, 225, 25448, 4224, 9334, 848, 604, 4798, 18, 284, 67, 267, 273, 284, 67, 659, 273, 599, 2, 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, 389, 7813, 12, 2890, 4672, 468, 25379, 445, 18, 225, 25448, 4224, 9334, 848, 604, 4798, 18, 284, 67, 267, 273, 284, 67, 659, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100...
p = Integer(p)
if not isinstance(p, Integer): p = Integer(p) if not isinstance(prec, Integer): prec = Integer(prec) if not isinstance(halt, Integer): halt = Integer(halt)
def Zp(p, prec = 20, type = 'capped-rel', print_mode = None, halt = 40, names = None, check=True): """ Return a model of the $p$-adic integer $\Z_p$. INPUT: p -- integer the p in Z_p prec -- integer (default: 20) the precision cap of the ring. Except for the fixed modulus case, individual elements keep track of their own precision. type -- string (default: 'capped-rel') see notes section below for options. print_mode -- string (default: series) the print mode; see notes section below for options. halt -- integer (default: 40): only applicable for type='lazy' check -- bool (default: True): wether to verify that the input is valid. OUTPUT: the corresponding p-adic ring EXAMPLES: We create rings with various parameters sage: Zp(7) 7-adic Ring with capped relative precision 20 sage: Zp(9) Traceback (most recent call last): ... ValueError: p must be prime sage: Zp(17, 5) 17-adic Ring with capped relative precision 5 sage: Zp(17, 5)(-1) 16 + 16*17 + 16*17^2 + 16*17^3 + 16*17^4 + O(17^5) It works even with a fairly huge cap: sage: Zp(next_prime(10^50), 100000) 100000000000000000000000000000000000000000000000151-adic Ring with capped relative precision 100000 We create each type of ring: sage: Zp(7, 20, 'capped-rel') 7-adic Ring with capped relative precision 20 sage: Zp(7, 20, 'fixed-mod') 7-adic Ring of fixed modulus 7^20 sage: Zp(7, 20, 'capped-abs') 7-adic Ring with capped absolute precision 20 #sage: Zp(7, 20, 'lazy') #Lazy 7-adic Ring We create a capped relative ring with each print mode: sage: k = Zp(7, 8, print_mode='series'); k 7-adic Ring with capped relative precision 8 sage: k(7*(19)) 5*7 + 2*7^2 + O(7^9) sage: k(7*(-19)) 2*7 + 4*7^2 + 6*7^3 + 6*7^4 + 6*7^5 + 6*7^6 + 6*7^7 + 6*7^8 + O(7^9) sage: k = Zp(7, print_mode='val-unit'); k 7-adic Ring with capped relative precision 20 sage: k(7*(19)) 7 * 19 + O(7^21) sage: k(7*(-19)) 7 * 79792266297611982 + O(7^21) sage: k = Zp(7, print_mode='terse'); k 7-adic Ring with capped relative precision 20 sage: k(7*(19)) 133 + O(7^21) sage: k(7*(-19)) 558545864083283874 + O(7^21) Note that $p$-adic rings are cached (via weak references): sage: a = Zp(7); b = Zp(7) sage: a is b True We create some elements in various rings: sage: R = Zp(5); a = R(4); a 4 + O(5^20) sage: S = Zp(5, 10, type = 'capped-abs'); b = S(2); b 2 + O(5^10) sage: a + b 1 + 5 + O(5^10) NOTES: type -- string (default: 'capped-rel'), the type of p-adic ring. 'capped-rel' -- pAdicRingCappedRelative. This is the default, considers precision as the precision of the unit part. Tracks precision of individual elements, but bounds the precision of any element with a precision cap. 'fixed-mod' -- pAdicRingFixedMod. This is basically a wrapper around $\Z / p^n \Z$, adding functions appropriate to p-adics. This is the fastest option. 'capped-abs' -- pAdicRingCappedAbsolute. The same as pAdicRingFixedMod, but keeps track of precision. 'lazy' -- pAdicRingLazy. Uses lazy elements so that additional precision can be requested during a computation. There is some amount of performance penalty because of this ability. print_mode -- string (default: None) Leaving print_mode as None uses the global default print mode. Other allowable values are: 'val-unit' -- elements are displayed as p^k*u 'terse' -- elements are displayed as an integer in base 10 'series' -- elements are displayed as series in p 'digits' -- elements are displayed as a string of base p digits 'bars' -- elements are displayed as a string of base p digits with separators For more details and more control, see sage.rings.padics.padic_printing or look at padic_printing.<tab> from the command line. """ if check: p = Integer(p) if not p.is_prime(): raise ValueError, "p must be prime" if not isinstance(prec, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(prec, (int, long)): prec = Integer(prec) if not isinstance(halt, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(halt, (int, long)): halt = Integer(halt) if names is None: name = str(p) elif isinstance(names, tuple): name = names[0] else: name = str(names) if type != 'lazy': key = (p, prec, type, name, print_mode) else: key = (p, prec, halt, name, print_mode) if padic_ring_cache.has_key(key): K = padic_ring_cache[key]() if not (K is None): return K if (type == 'capped-rel'): K = pAdicRingCappedRelative(p, prec, print_mode, name) elif (type == 'fixed-mod'): K = pAdicRingFixedMod(p, prec, print_mode, name) elif (type == 'capped-abs'): K = pAdicRingCappedAbsolute(p, prec, print_mode, name) elif (type == 'lazy'): raise NotImplementedError, "lazy p-adics need more work. Sorry." K = pAdicRingLazy(p, prec, print_mode, halt, name) else: raise ValueError, "type must be one of 'capped-rel', 'fixed-mod', 'capped-abs' or 'lazy'" padic_ring_cache[key] = weakref.ref(K) return K
6eb314752fa13bea5bd88c6e7a82a4748c3353b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/6eb314752fa13bea5bd88c6e7a82a4748c3353b1/factory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2285, 84, 12, 84, 16, 13382, 273, 4200, 16, 618, 273, 296, 5909, 1845, 17, 2878, 2187, 1172, 67, 3188, 273, 599, 16, 18389, 273, 8063, 16, 1257, 273, 599, 16, 866, 33, 5510, 4672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2285, 84, 12, 84, 16, 13382, 273, 4200, 16, 618, 273, 296, 5909, 1845, 17, 2878, 2187, 1172, 67, 3188, 273, 599, 16, 18389, 273, 8063, 16, 1257, 273, 599, 16, 866, 33, 5510, 4672, 35...
pass
def __init__(self, node, idx, old_val, new_val): super(BadDestroyMap, self).__init__() self.node = node self.idx = idx self.old_val = old_val self.new_val = new_val def __str__(self): sio = StringIO() print >> sio, " node:", self.node print >> sio, " node.inputs:", [(str(i), id(i)) for i in self.node.inputs] print >> sio, " destroy_map:", getattr(self.node.op, 'destroy_map', {}) print >> sio, " changed input idx:", self.idx print >> sio, " changed input type:", self.node.inputs[self.idx].type print >> sio, " old val:", self.old_val print >> sio, " new val:", self.new_val print >> sio, "" print >> sio, " Hint: this can be caused by a deficient values_eq_enough() or __eq__() implementation that compares node input values" return sio.getvalue()
def str_diagnostic(self): """Return a pretty multiline string representating the cause of the exception""" sio = StringIO() print >> sio, " Result: id", id(self.new_r), self.new_r print >> sio, " Op", self.new_r.owner print >> sio, " Value Type:", type(self.new_r_val) print >> sio, " Old Value: ", self.old_r_val print >> sio, " New Value: ", self.new_r_val print >> sio, " Reason: ", str(self.reason) print >> sio, " Old Graph:" print >> sio, self.old_graph print >> sio, " New Graph:" print >> sio, self.new_graph return sio.getvalue()
3395e0331592e8ed8b4e336582a0e9e32e3a0cc7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/3395e0331592e8ed8b4e336582a0e9e32e3a0cc7/debugmode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 12264, 11388, 12, 2890, 4672, 3536, 990, 279, 7517, 19431, 533, 2406, 1776, 326, 4620, 434, 326, 1520, 8395, 272, 1594, 273, 15777, 1435, 1172, 1671, 272, 1594, 16, 315, 225, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 609, 67, 12264, 11388, 12, 2890, 4672, 3536, 990, 279, 7517, 19431, 533, 2406, 1776, 326, 4620, 434, 326, 1520, 8395, 272, 1594, 273, 15777, 1435, 1172, 1671, 272, 1594, 16, 315, 225, 34...
self.assertEqual (db.full_tag_path ('foo/rating'),
self.assertEqual(db.full_tag_path('foo/rating'),
def testFullTagPath (self): db = self.db user = db.credentials.username self.assertEqual (db.full_tag_path ('rating'), '/tags/%s/rating' % user) self.assertEqual (db.full_tag_path ('/%s/rating' % user), '/tags/%s/rating' % user) self.assertEqual (db.full_tag_path ('/tags/%s/rating' % user), '/tags/%s/rating' % user) self.assertEqual (db.full_tag_path ('foo/rating'), '/tags/%s/foo/rating' % user) self.assertEqual (db.full_tag_path ('/%s/foo/rating' % user), '/tags/%s/foo/rating' % user) self.assertEqual (db.full_tag_path ('/tags/%s/foo/rating' % user), '/tags/%s/foo/rating' % user)
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5080, 1805, 743, 261, 2890, 4672, 1319, 273, 365, 18, 1966, 729, 273, 1319, 18, 11687, 18, 5053, 365, 18, 11231, 5812, 261, 1966, 18, 2854, 67, 2692, 67, 803, 7707, 17326, 19899, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5080, 1805, 743, 261, 2890, 4672, 1319, 273, 365, 18, 1966, 729, 273, 1319, 18, 11687, 18, 5053, 365, 18, 11231, 5812, 261, 1966, 18, 2854, 67, 2692, 67, 803, 7707, 17326, 19899, ...
size = stats[stat.ST_SIZE] modified = rfc822.formatdate(stats[stat.ST_MTIME])
size = stats.st_size modified = rfc822.formatdate(stats.st_mtime)
def open_local_file(self, req): host = req.get_host() file = req.get_selector() localfile = url2pathname(file) stats = os.stat(localfile) size = stats[stat.ST_SIZE] modified = rfc822.formatdate(stats[stat.ST_MTIME]) mtype = mimetypes.guess_type(file)[0] stats = os.stat(localfile) headers = mimetools.Message(StringIO( 'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' % (mtype or 'text/plain', size, modified))) if host: host, port = splitport(host) if not host or \ (not port and socket.gethostbyname(host) in self.get_names()): return addinfourl(open(localfile, 'rb'), headers, 'file:'+file) raise URLError('file not on local host')
9d3eba87d697231dde1672bdd30d5f59890700b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d3eba87d697231dde1672bdd30d5f59890700b4/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 585, 273, 1111, 18, 588, 67, 9663, 1435, 1191, 768, 273, 880, 22, 28336, 12, 768, 13, 317...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 585, 273, 1111, 18, 588, 67, 9663, 1435, 1191, 768, 273, 880, 22, 28336, 12, 768, 13, 317...
entries = [(relpath(pathjoin(path, k.name)),k) for k in keys]
return ((relpath(pathjoin(path, nm)),k) for (nm,k) in keys)
def _filter_keys(self,path,keys,wildcard,full,absolute,dirs_only,files_only): """Filter out keys not matching the given criteria.
8ef6d26a6a9b6416ad98420a072855a138f4fecc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/8ef6d26a6a9b6416ad98420a072855a138f4fecc/s3fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2188, 67, 2452, 12, 2890, 16, 803, 16, 2452, 16, 22887, 16, 2854, 16, 12547, 16, 8291, 67, 3700, 16, 2354, 67, 3700, 4672, 3536, 1586, 596, 1311, 486, 3607, 326, 864, 3582, 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, 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, 2188, 67, 2452, 12, 2890, 16, 803, 16, 2452, 16, 22887, 16, 2854, 16, 12547, 16, 8291, 67, 3700, 16, 2354, 67, 3700, 4672, 3536, 1586, 596, 1311, 486, 3607, 326, 864, 3582, 18, ...
c.execute("""select word, details from word_groups order by word""")
c.execute("""select word, wordnet from word_groups order by word""")
def get_details_for_flashcard(self): conn = sqlite3.connect(db_file_path) c = conn.cursor() c.execute("""select word, details from word_groups order by word""") data = c.fetchall() c.close() conn.close() return data
9410949ed9d00e31fdd2b6a833bdb0065f074acc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10994/9410949ed9d00e31fdd2b6a833bdb0065f074acc/wordgroupz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6395, 67, 1884, 67, 13440, 3327, 12, 2890, 4672, 1487, 273, 16184, 23, 18, 3612, 12, 1966, 67, 768, 67, 803, 13, 276, 273, 1487, 18, 9216, 1435, 276, 18, 8837, 2932, 3660, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6395, 67, 1884, 67, 13440, 3327, 12, 2890, 4672, 1487, 273, 16184, 23, 18, 3612, 12, 1966, 67, 768, 67, 803, 13, 276, 273, 1487, 18, 9216, 1435, 276, 18, 8837, 2932, 3660, 4...
"If he wanted to know, tell dady that we are served."
"If he wanted to know, tell daddy that we are served."
def finish(self): "If he wanted to know, tell dady that we are served." if self.finish_cb: self.finish_cb() self.transport = None pass
d1edb4f2d936c29931d17ce8be7dd263a355beea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7531/d1edb4f2d936c29931d17ce8be7dd263a355beea/apt_proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 315, 2047, 3904, 15504, 358, 5055, 16, 9276, 302, 31934, 716, 732, 854, 30722, 1199, 309, 365, 18, 13749, 67, 7358, 30, 365, 18, 13749, 67, 7358, 1435, 365, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4076, 12, 2890, 4672, 315, 2047, 3904, 15504, 358, 5055, 16, 9276, 302, 31934, 716, 732, 854, 30722, 1199, 309, 365, 18, 13749, 67, 7358, 30, 365, 18, 13749, 67, 7358, 1435, 365, 18, 1...
pp, context = get_first(node, r'*=PP < { *=P < { /WH[NP]P/=T $ *=S } }', with_context=True) p, t, s = context['P'], context['T'], context['S']
pp, ctx = get_first(node, r'*=PP < { *=P < { /WH[NP]P/=T $ *=S } }', with_context=True) p, t, s = ctx.p, ctx.t, ctx.s
def remove_null_element(self, node): # Remove the null element WHNP and its trace -NONE- '*OP*' and shrink tree pp, context = get_first(node, r'*=PP < { *=P < { /WH[NP]P/=T $ *=S } }', with_context=True) p, t, s = context['P'], context['T'], context['S']
6550bb6489583e5c02c61dbb907bc6e2b4b74174 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8383/6550bb6489583e5c02c61dbb907bc6e2b4b74174/fix_rc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2011, 67, 2956, 12, 2890, 16, 756, 4672, 468, 3581, 326, 446, 930, 14735, 23430, 471, 2097, 2606, 300, 9826, 17, 14609, 3665, 4035, 471, 17697, 2151, 8228, 16, 819, 273, 336, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2011, 67, 2956, 12, 2890, 16, 756, 4672, 468, 3581, 326, 446, 930, 14735, 23430, 471, 2097, 2606, 300, 9826, 17, 14609, 3665, 4035, 471, 17697, 2151, 8228, 16, 819, 273, 336, ...
error_dialog(None, _('Bad database location'),
error_dialog(self.splash_screen, _('Bad database location'),
def initialize_db_stage2(self, db, tb): repair_pd = getattr(self, 'repair_pd', None) if repair_pd is not None: repair_pd.cancel()
4a046a41d0f8e754ec087c0932c50224ce97e115 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/4a046a41d0f8e754ec087c0932c50224ce97e115/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 1966, 67, 12869, 22, 12, 2890, 16, 1319, 16, 8739, 4672, 20994, 67, 22353, 273, 3869, 12, 2890, 16, 296, 266, 6017, 67, 22353, 2187, 599, 13, 309, 20994, 67, 22353, 353, 486,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 1966, 67, 12869, 22, 12, 2890, 16, 1319, 16, 8739, 4672, 20994, 67, 22353, 273, 3869, 12, 2890, 16, 296, 266, 6017, 67, 22353, 2187, 599, 13, 309, 20994, 67, 22353, 353, 486,...
if column in ['id', 'ticket', '
if column in ('ticket', 'id', '_id', '
def _render_view(self, req, db, id): """ uses a user specified sql query to extract some information from the database and presents it as a html table. """ actions = {'create': 'REPORT_CREATE', 'delete': 'REPORT_DELETE', 'modify': 'REPORT_MODIFY'} for action in [k for k,v in actions.items() if req.perm.has_permission(v)]: req.hdf['report.can_' + action] = True req.hdf['report.href'] = self.env.href.report(id)
0c39a4d2547d749e7d20f74f0dd86dacb49e4481 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/0c39a4d2547d749e7d20f74f0dd86dacb49e4481/report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 1945, 12, 2890, 16, 1111, 16, 1319, 16, 612, 4672, 3536, 4692, 279, 729, 1269, 1847, 843, 358, 2608, 2690, 1779, 628, 326, 2063, 471, 3430, 87, 518, 487, 279, 1729, 1014...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5902, 67, 1945, 12, 2890, 16, 1111, 16, 1319, 16, 612, 4672, 3536, 4692, 279, 729, 1269, 1847, 843, 358, 2608, 2690, 1779, 628, 326, 2063, 471, 3430, 87, 518, 487, 279, 1729, 1014...
'*/CV', '*/CVS/', '*/.cvsignor',
'*/CVS', '*/CVS/*', '*/.cvsignore',
def notsymlink(pkg, f): files = pkg.files() enreg = files[f] mode = enreg[0] type = (mode>>12)&017 return type != 012
941b427d893985d9017f3e8d9e23d3c2d07a36df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10341/941b427d893985d9017f3e8d9e23d3c2d07a36df/CheckFilelist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 486, 21278, 12, 10657, 16, 284, 4672, 1390, 273, 3475, 18, 2354, 1435, 570, 1574, 273, 1390, 63, 74, 65, 1965, 273, 570, 1574, 63, 20, 65, 618, 273, 261, 3188, 9778, 2138, 13, 10, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 486, 21278, 12, 10657, 16, 284, 4672, 1390, 273, 3475, 18, 2354, 1435, 570, 1574, 273, 1390, 63, 74, 65, 1965, 273, 570, 1574, 63, 20, 65, 618, 273, 261, 3188, 9778, 2138, 13, 10, 16...
issues = self.get_open_issues_in_project(**query) issues = [b.getObject() for b in issues] if skip_existing_issues: iteration = self.context.aq_inner.aq_parent iteration_path = '/'.join(iteration.getPhysicalPath()) def is_linked_into_iteration(issue): tasks = issue.getBRefs('task_issues') for task in tasks: path = '/'.join(task.getPhysicalPath()) if path.startswith(iteration_path): return True else: return False else: is_linked_into_iteration = lambda issue: False
issues_brains = self.get_open_issues_in_project(**query) issues = [b.getObject() for b in issues_brains] iteration = self.context.aq_inner.aq_parent iteration_path = '/'.join(iteration.getPhysicalPath()) def is_linked_into_iteration(issue): tasks = issue.getBRefs('task_issues') for task in tasks: path = '/'.join(task.getPhysicalPath()) if path.startswith(iteration_path): return True else: return False
def get_open_issues(self, tags=[], skip_existing_issues=True): query = {} if tags: query = dict(Subject=dict(query=tags, operator='and')) issues = self.get_open_issues_in_project(**query) # Hopefully, there aren't too many open issues :) issues = [b.getObject() for b in issues]
337d2711caa86e4bdc6833aa559fb657b947991f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10431/337d2711caa86e4bdc6833aa559fb657b947991f/poi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3190, 67, 9618, 12, 2890, 16, 2342, 22850, 6487, 2488, 67, 11711, 67, 9618, 33, 5510, 4672, 843, 273, 2618, 309, 2342, 30, 843, 273, 2065, 12, 6638, 33, 1576, 12, 2271, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3190, 67, 9618, 12, 2890, 16, 2342, 22850, 6487, 2488, 67, 11711, 67, 9618, 33, 5510, 4672, 843, 273, 2618, 309, 2342, 30, 843, 273, 2065, 12, 6638, 33, 1576, 12, 2271, 33, ...
print 'could not find or import %s' % repr(thing)
print 'No Python documentation found for %s.' % repr(thing)
def doc(thing): """Display documentation on an object (for interactive use).""" if type(thing) is type(""): try: path, x = locate(thing) except DocImportError, value: print 'problem in %s - %s' % (value.filename, value.args) return if x: thing = x else: print 'could not find or import %s' % repr(thing) return desc = describe(thing) module = inspect.getmodule(thing) if module and module is not thing: desc = desc + ' in module ' + module.__name__ pager('Help on %s:\n\n' % desc + text.document(thing))
c59006cf0425a2636c8284ef2601f7f489fad815 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c59006cf0425a2636c8284ef2601f7f489fad815/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 12, 4274, 4672, 3536, 4236, 7323, 603, 392, 733, 261, 1884, 12625, 999, 13, 12123, 309, 618, 12, 4274, 13, 353, 618, 2932, 6, 4672, 775, 30, 589, 16, 619, 273, 10627, 12, 4274, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 4274, 4672, 3536, 4236, 7323, 603, 392, 733, 261, 1884, 12625, 999, 13, 12123, 309, 618, 12, 4274, 13, 353, 618, 2932, 6, 4672, 775, 30, 589, 16, 619, 273, 10627, 12, 4274, ...
self.height = y+1
self.height = y
def __init__(self, text, aspect_ratio=1, textual=False): """Take a ASCII art figure and store it, prepare for ``recognize``""" self.aspect_ratio = float(aspect_ratio) self.textual = textual # XXX TODO tab expansion # detect size of input image, store as list of lines self.image = [] max_x = 0 for y, line in enumerate(text.splitlines()): max_x = max(max_x, len(line)) self.image.append(line) self.width = max_x self.height = y+1 # make sure it's rectangular (extend short lines to max width) for y, line in enumerate(self.image): if len(line) < max_x: self.image[y] = line + ' '*(max_x-len(line)) # initialize other data structures self.classification = [[None]*self.width for y in range(self.height)] self.shapes = [] self.nominal_size = NOMINAL_SIZE
2de39e9a1d73e7fbfbac4ae75be60a0e389e34dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1203/2de39e9a1d73e7fbfbac4ae75be60a0e389e34dc/aafigure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 977, 16, 9648, 67, 9847, 33, 21, 16, 25774, 33, 8381, 4672, 3536, 13391, 279, 11768, 3688, 7837, 471, 1707, 518, 16, 2911, 364, 12176, 3927, 4198, 554, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 977, 16, 9648, 67, 9847, 33, 21, 16, 25774, 33, 8381, 4672, 3536, 13391, 279, 11768, 3688, 7837, 471, 1707, 518, 16, 2911, 364, 12176, 3927, 4198, 554, 1...
"""Log a the current exception briefly to 'dst'.
"""Log the current exception briefly to 'dst'.
def log_error_and_line(dst=sys.stderr): """Log a the current exception briefly to 'dst'. dst -- writeable file-like object """ exception_type, value, tb = sys.exc_info() log_error_and_line_from_info(exception_type, value, tb, dst)
3674c164290d24b2c5e12226953fbf5166e103f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6121/3674c164290d24b2c5e12226953fbf5166e103f8/compact_tracebacks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 1636, 67, 464, 67, 1369, 12, 11057, 33, 9499, 18, 11241, 4672, 3536, 1343, 326, 783, 1520, 324, 17802, 715, 358, 296, 11057, 10332, 225, 3046, 225, 1493, 30223, 585, 17, 5625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1636, 67, 464, 67, 1369, 12, 11057, 33, 9499, 18, 11241, 4672, 3536, 1343, 326, 783, 1520, 324, 17802, 715, 358, 296, 11057, 10332, 225, 3046, 225, 1493, 30223, 585, 17, 5625, ...
def HandleObjectResponse(self, fromAddress, url, body, lastFlag):
def HandleObjectResponse(self, fromAddress, url, body, lastFlag):
def HandleObjectResponse(self, fromAddress, url, body, lastFlag): # decode the string from the body of the received message to an objectlist objectList = self.DecodeObjectList(body) # send the objects back to the relevant view if len(objectList) > 0: self.application.AddObjectsToView(url, objectList) if lastFlag: self.application.ObjectResponseCompleted(url)
08b70fc117ae2f482853203b7461f4251ac55bb2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/08b70fc117ae2f482853203b7461f4251ac55bb2/ChandlerJabber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 921, 1064, 12, 2890, 16, 628, 1887, 16, 880, 16, 1417, 16, 1142, 4678, 4672, 468, 2495, 326, 533, 628, 326, 1417, 434, 326, 5079, 883, 358, 392, 733, 1098, 733, 682, 273, 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, 5004, 921, 1064, 12, 2890, 16, 628, 1887, 16, 880, 16, 1417, 16, 1142, 4678, 4672, 468, 2495, 326, 533, 628, 326, 1417, 434, 326, 5079, 883, 358, 392, 733, 1098, 733, 682, 273, 365, ...
nonrandom = dice_count + dice_optionals
nonrandom = (dice_count + dice_optionals)
def combineBonus(sign, num): values = {'-':-1, '+':1} return num * values[sign]
64baac3c13d723d4cca03c0e3976ada112e0ce94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/64baac3c13d723d4cca03c0e3976ada112e0ce94/linesyntax.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8661, 38, 22889, 12, 2977, 16, 818, 4672, 924, 273, 13666, 17, 4278, 17, 21, 16, 15126, 4278, 21, 97, 327, 818, 380, 924, 63, 2977, 65, 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, 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, 8661, 38, 22889, 12, 2977, 16, 818, 4672, 924, 273, 13666, 17, 4278, 17, 21, 16, 15126, 4278, 21, 97, 327, 818, 380, 924, 63, 2977, 65, 225, 2, -100, -100, -100, -100, -100, -100, -1...
while True: time.sleep(0.1) self.update() self.resume.extend_blocks(self.chunk_list()) if self.byte_total() >= self.size and self.active_count() == 0: self.resume.complete() self.close_handler() return True if len(self.urls) == 0: self.close_handler() return False return False except BaseException, e: logging.warning(unicode(e)) return False
return False
def run(self): ''' ? ''' try: if self.size == "" or self.size == 0: self.size = self.get_size() if self.size == None: #crap out and do it the old way self.close_handler() return False while True: #print "\ntc:", self.active_count(), len(self.sockets), len(self.urls) #if self.active_count() == 0: #print self.byte_total(), self.size time.sleep(0.1) self.update() self.resume.extend_blocks(self.chunk_list()) if self.byte_total() >= self.size and self.active_count() == 0: self.resume.complete() self.close_handler() return True #crap out and do it the old way if len(self.urls) == 0: self.close_handler() return False return False except BaseException, e: logging.warning(unicode(e)) return False
b9c2e40a1f526708d17e084ed5919f34dc50d278 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6425/b9c2e40a1f526708d17e084ed5919f34dc50d278/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 9163, 692, 9163, 775, 30, 309, 365, 18, 1467, 422, 1408, 578, 365, 18, 1467, 422, 374, 30, 365, 18, 1467, 273, 365, 18, 588, 67, 1467, 1435, 309, 365, 18, 1467,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 9163, 692, 9163, 775, 30, 309, 365, 18, 1467, 422, 1408, 578, 365, 18, 1467, 422, 374, 30, 365, 18, 1467, 273, 365, 18, 588, 67, 1467, 1435, 309, 365, 18, 1467,...
pass
self.removeOldestBlock()
def read(self, position, length): block_position = position % self.block_size block_index = position / self.block_size length_copy = length assert position+length <= self.file_size # TODO: Be able to read two or more blocks data = "" while 0 < length: if block_index not in self.blocks: if self.max_block <= len(self.blocks): # TODO: Remove oldest block pass self.file.seek(block_index * self.block_size) block_data = self.file.read(self.block_size) assert (len(block_data) == self.block_size) or self.file.tell() == self.file_size self.blocks[block_index] = block_data else: block_data = self.blocks[block_index] if block_position != 0 or length != self.block_size: end = block_position+length if self.block_size < end: end = self.block_size block_data = block_data[block_position:end] data = data + block_data block_position = 0 block_index = block_index + 1 length = length - len(block_data) assert len(data) == length_copy return data
fd111dc80b6122bcd7074fc0a60484ba18098368 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/fd111dc80b6122bcd7074fc0a60484ba18098368/file.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 1754, 16, 769, 4672, 1203, 67, 3276, 273, 1754, 738, 365, 18, 2629, 67, 1467, 1203, 67, 1615, 273, 1754, 342, 365, 18, 2629, 67, 1467, 769, 67, 3530, 273, 769, 181...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 12, 2890, 16, 1754, 16, 769, 4672, 1203, 67, 3276, 273, 1754, 738, 365, 18, 2629, 67, 1467, 1203, 67, 1615, 273, 1754, 342, 365, 18, 2629, 67, 1467, 769, 67, 3530, 273, 769, 181...
return _gen_link_list(request, path_obj, [review_link, zip_link])
return _gen_link_list(request, path_obj, [review_link, upload_link, zip_link, update_all_link])
def directory_review_links(request, path_obj): """returns a list of links for directory items in review tab""" return _gen_link_list(request, path_obj, [review_link, zip_link])
8cff349a932e10b72bf2dc7288b1a562d9e4ffc6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/8cff349a932e10b72bf2dc7288b1a562d9e4ffc6/item_dict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1867, 67, 16041, 67, 7135, 12, 2293, 16, 589, 67, 2603, 4672, 3536, 6154, 279, 666, 434, 4716, 364, 1867, 1516, 316, 10725, 3246, 8395, 327, 389, 4507, 67, 1232, 67, 1098, 12, 2293, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1867, 67, 16041, 67, 7135, 12, 2293, 16, 589, 67, 2603, 4672, 3536, 6154, 279, 666, 434, 4716, 364, 1867, 1516, 316, 10725, 3246, 8395, 327, 389, 4507, 67, 1232, 67, 1098, 12, 2293, 16...
return True, "redo"
may = True reason = "redo"
def can_do(self, instance): if isinstance(instance, Task): #True, None #True, "redo" #True, "pending" #True, "picked" #False, None #False, "done" #False, "deadline" #False, "prerequisites"
60105fe267daa4dd9051e0c151b3c8c6959be17b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/60105fe267daa4dd9051e0c151b3c8c6959be17b/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 2896, 12, 2890, 16, 791, 4672, 309, 1549, 12, 1336, 16, 3837, 4672, 468, 5510, 16, 599, 468, 5510, 16, 315, 1118, 83, 6, 468, 5510, 16, 315, 9561, 6, 468, 5510, 16, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 2896, 12, 2890, 16, 791, 4672, 309, 1549, 12, 1336, 16, 3837, 4672, 468, 5510, 16, 599, 468, 5510, 16, 315, 1118, 83, 6, 468, 5510, 16, 315, 9561, 6, 468, 5510, 16, 315, 1...
self._callback = {}
def __init__(self): lazy_load = True self._states = {} self._state_names = {} self._callback = {} self._window_uptime = {} self._callback_event = [] self._get_all_state_names() self._handle_table_cell = False self._desktop = pyatspi.Registry.getDesktop(0) if Utils.cached_apps is None: pyatspi.Registry.registerEventListener( self._on_window_event, 'window') Utils.cached_apps = list() if lazy_load: for app in self._desktop: if app is None: continue self.cached_apps.append(app)
43924f2ba30b8adb9b55c5c34c99a33f800d4022 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11266/43924f2ba30b8adb9b55c5c34c99a33f800d4022/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7962, 67, 945, 273, 1053, 365, 6315, 7992, 273, 2618, 365, 6315, 2019, 67, 1973, 273, 2618, 365, 6315, 5668, 67, 3648, 494, 273, 2618, 365, 6315, 3394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7962, 67, 945, 273, 1053, 365, 6315, 7992, 273, 2618, 365, 6315, 2019, 67, 1973, 273, 2618, 365, 6315, 5668, 67, 3648, 494, 273, 2618, 365, 6315, 3394, ...
filename = "0-REGTYPE"
filename = "/0-REGTYPE"
def test_seek(self): """Test seek() method of _FileObject, incl. random reading. """ if self.sep != "|": filename = "0-REGTYPE" self.tar.extract(filename, dirname()) data = file(os.path.join(dirname(), filename), "rb").read()
c7fcc2d772c6ccaa71002aaa2aace16ed8adf471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fcc2d772c6ccaa71002aaa2aace16ed8adf471/test_tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16508, 12, 2890, 4672, 3536, 4709, 6520, 1435, 707, 434, 389, 21471, 16, 2823, 18, 2744, 6453, 18, 3536, 309, 365, 18, 10814, 480, 11747, 6877, 1544, 273, 2206, 20, 17, 5937, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16508, 12, 2890, 4672, 3536, 4709, 6520, 1435, 707, 434, 389, 21471, 16, 2823, 18, 2744, 6453, 18, 3536, 309, 365, 18, 10814, 480, 11747, 6877, 1544, 273, 2206, 20, 17, 5937, ...
using_cloud = common_cbl[0][0] using_backend = common_cbl[0][1]
cb = common_cbl[0] using_cloud = cb[0] using_backend = cb[1]
def check(self): super(AnaTransform,self).check() if not self.inputdata.dataset: return if not self.backend: logger.warning("Determining backend and cloud...")
5585a6013a643ae847ce53f5070c01658403a3f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/5585a6013a643ae847ce53f5070c01658403a3f0/AnaTransform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 2240, 12, 979, 69, 4059, 16, 2890, 2934, 1893, 1435, 309, 486, 365, 18, 2630, 892, 18, 8682, 30, 327, 309, 486, 365, 18, 9993, 30, 1194, 18, 8551, 2932, 9139, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 2240, 12, 979, 69, 4059, 16, 2890, 2934, 1893, 1435, 309, 486, 365, 18, 2630, 892, 18, 8682, 30, 327, 309, 486, 365, 18, 9993, 30, 1194, 18, 8551, 2932, 9139, 31...
self.tempcache[url] = result = tfn, headers
self.tempcache[url] = result
def retrieve(self, url): if self.tempcache and self.tempcache.has_key(url): return self.tempcache[url] url1 = unwrap(url) if self.tempcache and self.tempcache.has_key(url1): self.tempcache[url] = self.tempcache[url1] return self.tempcache[url1] type, url1 = splittype(url1) if not type or type == 'file': try: fp = self.open_local_file(url1) del fp return splithost(url1)[1], None except IOError, msg: pass fp = self.open(url) headers = fp.info() import tempfile tfn = tempfile.mktemp() if self.tempcache is not None: self.tempcache[url] = result = tfn, headers tfp = open(tfn, 'w') bs = 1024*8 block = fp.read(bs) while block: tfp.write(block) block = fp.read(bs) del fp del tfp return result
757c6c4879c713dbc63a0f8f7dd9dee6f672429a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/757c6c4879c713dbc63a0f8f7dd9dee6f672429a/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 12, 2890, 16, 880, 4672, 309, 365, 18, 874, 2436, 807, 471, 365, 18, 874, 2436, 807, 18, 5332, 67, 856, 12, 718, 4672, 327, 365, 18, 874, 2436, 807, 63, 718, 65, 880, 21, 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, 4614, 12, 2890, 16, 880, 4672, 309, 365, 18, 874, 2436, 807, 471, 365, 18, 874, 2436, 807, 18, 5332, 67, 856, 12, 718, 4672, 327, 365, 18, 874, 2436, 807, 63, 718, 65, 880, 21, 273...
if (PkgSelected(opts,"MAYA5")): cmd = cmd + ' ' + Maya5SDK + 'lib/Foundation.lib' cmd = cmd + ' ' + Maya5SDK + 'lib/OpenMaya.lib' cmd = cmd + ' ' + Maya5SDK + 'lib/OpenMayaAnim.lib' if (PkgSelected(opts,"MAYA6")): cmd = cmd + ' ' + Maya6SDK + 'lib/Foundation.lib' cmd = cmd + ' ' + Maya6SDK + 'lib/OpenMaya.lib' cmd = cmd + ' ' + Maya6SDK + 'lib/OpenMayaAnim.lib'
for maya in ["MAYA5","MAYA6"]: if (PkgSelected(opts,maya)): cmd = cmd + ' "' + MAYASDK[maya] + '/lib/Foundation.lib"' cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMaya.lib"' cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMayaAnim.lib"'
def CompileLink(dll=0, obj=[], opts=[], xdep=[]): if (dll==0): sys.exit("Syntax error in CompileLink directive") if (COMPILER=="MSVC7"): ALLTARGETS.append(PREFIX+"/bin/"+dll) lib = PREFIX+"/lib/"+dll[:-4]+".lib" dll = PREFIX+"/bin/"+dll wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x) elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x) elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".lib") elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x) else: sys.exit("unknown suffix in object list.") if (older(dll, wobj+xdep)): cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB' if (dll[-4:]!=".exe"): cmd = cmd + " /DLL" if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG " cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 " if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB " if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def' cmd = cmd + ' /OUT:' + dll + ' /IMPLIB:' + lib + ' /MAP:NUL' cmd = cmd + ' /LIBPATH:' + PREFIX + '/python/libs ' for x in wobj: cmd = cmd + ' ' + x if (dll[-4:]==".exe"): cmd = cmd + ' ' + PREFIX + '/tmp/pandaIcon.res' if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")): cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib/x86"' cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib"' if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib' if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib' if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib' if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib' if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib' if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib" if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib" if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib' if (opts.count("WINUSER")): cmd = cmd + " user32.lib" if (opts.count("WINMM")): cmd = cmd + " winmm.lib" if (opts.count("WINIMM")): cmd = cmd + " imm32.lib" if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib" if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib" if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib" if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib" if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib" if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/zlib/lib/libz.lib' if (PkgSelected(opts,"PNG")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/png/lib/libpng.lib' if (PkgSelected(opts,"JPEG")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/jpeg/lib/libjpeg.lib' if (PkgSelected(opts,"TIFF")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/tiff/lib/libtiff.lib' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/vrpn/lib/vrpn.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/vrpn/lib/quat.lib' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fmod/lib/fmod.lib' if (PkgSelected(opts,"MILES")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/miles/lib/mss32.lib' if (PkgSelected(opts,"NVIDIACG")): if (opts.count("CGGL")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nvidiacg/lib/cgGL.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nvidiacg/lib/cg.lib' if (PkgSelected(opts,"HELIX")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/runtlib.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/syslib.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/contlib.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/debuglib.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/utillib.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/helix/lib/stlport_vc7.lib' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/nspr/lib/libnspr4.lib' if (PkgSelected(opts,"SSL")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/ssl/lib/ssleay32.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/ssl/lib/libeay32.lib' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/freetype/lib/libfreetype.lib' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fftw/lib/rfftw.lib' cmd = cmd + ' ' + THIRDPARTY + '/win-libs-vc7/fftw/lib/fftw.lib' if (PkgSelected(opts,"MAYA5")): cmd = cmd + ' ' + Maya5SDK + 'lib/Foundation.lib' cmd = cmd + ' ' + Maya5SDK + 'lib/OpenMaya.lib' cmd = cmd + ' ' + Maya5SDK + 'lib/OpenMayaAnim.lib' if (PkgSelected(opts,"MAYA6")): cmd = cmd + ' ' + Maya6SDK + 'lib/Foundation.lib' cmd = cmd + ' ' + Maya6SDK + 'lib/OpenMaya.lib' cmd = cmd + ' ' + Maya6SDK + 'lib/OpenMayaAnim.lib' for max in ["MAX5","MAX6","MAX7"]: if PkgSelected(opts,max): cmd = cmd + ' ' + MAXSDK[max] + 'lib/core.lib' cmd = cmd + ' ' + MAXSDK[max] + 'lib/mesh.lib' cmd = cmd + ' ' + MAXSDK[max] + 'lib/maxutil.lib' cmd = cmd + ' ' + MAXSDK[max] + 'lib/paramblk2.lib' oscmd(cmd) updatefiledate(dll) if ((OPTIMIZE == 1) and (dll[-4:]==".dll")): CopyFile(dll[:-4]+"_d.dll", dll) if (COMPILER=="LINUXA"): ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so") if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4] else: wdll = PREFIX+"/lib/"+dll[:-4]+".so" wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o") elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a") elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".a") else: sys.exit("unknown suffix in object list.") if (older(wdll, wobj+xdep)): if (dll[-4:]==".exe"): cmd = 'g++ -o ' + wdll + ' -L' + PREFIX + '/lib' else: cmd = 'g++ -shared -o ' + wdll + ' -L' + PREFIX + '/lib' for x in obj: suffix = x[-4:] if (suffix==".obj"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.o' elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4] elif (suffix==".lib"): cmd = cmd + ' ' + PREFIX + '/lib/' + x[:-4] + '.a' elif (suffix==".ilb"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.a' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fmod/lib -lfmod-3.74' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -L' + THIRDPARTY + 'nvidiacg/lib ' if (opts.count("CGGL")): cmd = cmd + " -lCgGL" cmd = cmd + " -lCg" if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/nspr/lib -lpandanspr4' if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz" if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng" if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg" if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff" if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl" if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype" if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/vrpn/lib -lvrpn -lquat' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fftw/lib -lrfftw -lfftw' if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU" oscmd(cmd) updatefiledate(wdll)
49e4024ed3d68e09fca79a863ccb48b661f7050e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/49e4024ed3d68e09fca79a863ccb48b661f7050e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8...
def test_local_violation_not_exposed(self): self._set_expose(False) rr, target = self.setupTarget(Target(), True) d = self.shouldFail(Violation, "one", None, rr.callRemote, "bogus") d.addCallback(self._examine_local_violation) return d def test_local_violation_yes_exposed(self): self._set_expose(True) rr, target = self.setupTarget(Target(), True) d = self.shouldFail(Violation, "one", None, rr.callRemote, "bogus") d.addCallback(self._examine_local_violation) return d def test_local_violation_default(self): rr, target = self.setupTarget(Target(), True) d = self.shouldFail(Violation, "one", None, rr.callRemote, "bogus") d.addCallback(self._examine_local_violation) return d
def _examine_local_violation(self, r): f = r[0] self.failUnless(f.check(Violation)) self.failUnless(re.search(r'RIMyTarget\(.*\) does not offer bogus', str(f))) self.failIf(f.check(RemoteException))
5ebf7776b3da378747b0706368a030e68866a6d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13646/5ebf7776b3da378747b0706368a030e68866a6d7/test_call.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 338, 301, 558, 67, 3729, 67, 522, 12255, 12, 2890, 16, 436, 4672, 284, 273, 436, 63, 20, 65, 365, 18, 6870, 984, 2656, 12, 74, 18, 1893, 12, 11683, 3719, 365, 18, 6870, 984, 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, 389, 338, 301, 558, 67, 3729, 67, 522, 12255, 12, 2890, 16, 436, 4672, 284, 273, 436, 63, 20, 65, 365, 18, 6870, 984, 2656, 12, 74, 18, 1893, 12, 11683, 3719, 365, 18, 6870, 984, 2...