rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
Args: static: Static fields dynamic: Dynamic fields """ static_fields = frozenset(static) dynamic_fields = frozenset(dynamic) all_fields = static_fields | dynamic_fields if not all_fields.issuperset(selected):
@type static: L{_FieldSet} @param static: static fields set @type dynamic: L{_FieldSet} @param dynamic: dynamic fields set """ f = _FieldSet() f.Extend(static) f.Extend(dynamic) delta = f.NonMatching(selected) if delta:
def _CheckOutputFields(static, dynamic, selected): """Checks whether all selected fields are valid. Args: static: Static fields dynamic: Dynamic fields """ static_fields = frozenset(static) dynamic_fields = frozenset(dynamic) all_fields = static_fields | dynamic_fields if not all_fields.issuperset(selected): raise errors.OpPrereqError("Unknown output fields selected: %s" % ",".join(frozenset(selected). difference(all_fields)))
31bf511f14e07b7abfcd8b432d0e0fcd65221f2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/31bf511f14e07b7abfcd8b432d0e0fcd65221f2f/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1564, 1447, 2314, 12, 3845, 16, 5976, 16, 3170, 4672, 3536, 4081, 2856, 777, 3170, 1466, 854, 923, 18, 225, 632, 723, 760, 30, 511, 95, 67, 974, 694, 97, 632, 891, 760, 30, 760,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1564, 1447, 2314, 12, 3845, 16, 5976, 16, 3170, 4672, 3536, 4081, 2856, 777, 3170, 1466, 854, 923, 18, 225, 632, 723, 760, 30, 511, 95, 67, 974, 694, 97, 632, 891, 760, 30, 760,...
self.re_header_name_comment = re.compile( r'^\s*//\s+\$[S]ource: /cvsroot/boost/boost/(.*),v\s*\$$' )
self.re_header_name_comment = re.compile( r'^\s*//\s+\$[S]ource: /cvsroot/boost/boost/(.*?%s\.hpp),v\s*\$$' % os.path.splitext( name )[0] )
def __init__(self, name): self.output = open(name, "w") self.prev_line = ''
f9be91fc35860c368c1bbbe59a58defe1946f5f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9982/f9be91fc35860c368c1bbbe59a58defe1946f5f0/pp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 2844, 273, 1696, 12, 529, 16, 315, 91, 7923, 365, 18, 10001, 67, 1369, 273, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 2844, 273, 1696, 12, 529, 16, 315, 91, 7923, 365, 18, 10001, 67, 1369, 273, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
return result
return result
def getLfns(self): result = [] for l in self.lfns: result.append(l) return result
15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4/PoolXMLCatalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9014, 74, 2387, 12, 2890, 4672, 563, 273, 5378, 364, 328, 316, 365, 18, 20850, 2387, 30, 563, 18, 6923, 12, 80, 13, 225, 327, 563, 225, 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, 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, 9014, 74, 2387, 12, 2890, 4672, 563, 273, 5378, 364, 328, 316, 365, 18, 20850, 2387, 30, 563, 18, 6923, 12, 80, 13, 225, 327, 563, 225, 2, -100, -100, -100, -100, -100, -100, -100, -...
n = self.__get_dummy_programs(last.stop, p.start) dummy_progs += n
dummy_progs.append(self.__get_dummy_program(last.stop, p.start))
def __import_programs(self, start, stop=-1, progs=[]): """ Get programs from the database to create Program from then add them to our local list. If there are gaps between the programs we will add dummy programs to fill it (TODO). """ # FIXME: adding dummy programs will add them from start to stop and # not in 30 minutes chunks. That's bad! new_progs = [] dummy_progs = [] # keep the notifier alive notifier_counter = 0 if not progs: progs = self.__epg.sql_get_programs(self.id, start, stop) for p in progs: i = Program(p.id, p.title, p.start, p.stop, p.episode, p.subtitle, p['description'], channel=self) new_progs.append(i) notifier_counter = (notifier_counter + 1) % 500 if not notifier_counter and notifier and notifier.step: notifier.step(False, False) # TODO: add information about program being recorded which # comes from another DB table - same with categories, # ratings and advisories.
038d7fde04bf5e3a11cc7e78cf8debbe87c37df3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/038d7fde04bf5e3a11cc7e78cf8debbe87c37df3/channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5666, 67, 12890, 87, 12, 2890, 16, 787, 16, 2132, 29711, 21, 16, 450, 564, 33, 8526, 4672, 3536, 968, 25038, 628, 326, 2063, 358, 752, 13586, 628, 1508, 527, 2182, 358, 3134, 119...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5666, 67, 12890, 87, 12, 2890, 16, 787, 16, 2132, 29711, 21, 16, 450, 564, 33, 8526, 4672, 3536, 968, 25038, 628, 326, 2063, 358, 752, 13586, 628, 1508, 527, 2182, 358, 3134, 119...
samcmd = '%(samtools)s sort %(infile)s %(outprefix)s' % cmd_dict call(samcmd)
picard_cmd = '%(sort_sam)s INPUT=%(infile)s OUTPUT=%(outfile)s SORT_ORDER=coordinate ' + \ 'MAX_RECORDS_IN_RAM=5000000' call(picard_cmd % cmd_dict)
def sort_bam(input_file, output_file): '''Sort BAM files by coordinate.''' cmd_dict = cdict.copy() cmd_dict['infile'] = input_file cmd_dict['outfile'] = os.path.splitext(output_file)[0] cmd_dict['outprefix'] = cmd_dict['outfile'] pmsg('BAM Coord Sort', cmd_dict['infile'], cmd_dict['outfile']) samcmd = '%(samtools)s sort %(infile)s %(outprefix)s' % cmd_dict call(samcmd)
1dcbe90106e59b7068eea2a6827390a1e2282350 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14572/1dcbe90106e59b7068eea2a6827390a1e2282350/prep_sequence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 11477, 12, 2630, 67, 768, 16, 876, 67, 768, 4672, 9163, 4416, 605, 2192, 1390, 635, 7799, 1093, 6309, 1797, 67, 1576, 273, 276, 1576, 18, 3530, 1435, 1797, 67, 1576, 3292, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 11477, 12, 2630, 67, 768, 16, 876, 67, 768, 4672, 9163, 4416, 605, 2192, 1390, 635, 7799, 1093, 6309, 1797, 67, 1576, 273, 276, 1576, 18, 3530, 1435, 1797, 67, 1576, 3292, 26...
music.length_formatted()), (u"normal", 13, graphics.FONT_BOLD))
music.length_formatted()), (u"normal", 13, graphics.FONT_ANTIALIAS))
def show_music_information(self, music): if not self.is_visible: return
43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 81, 14894, 67, 13117, 12, 2890, 16, 26225, 4672, 309, 486, 365, 18, 291, 67, 8613, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 81, 14894, 67, 13117, 12, 2890, 16, 26225, 4672, 309, 486, 365, 18, 291, 67, 8613, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
value = keys.pop()
def add_keys(self, *keys, **kwargs): keys = list(keys) while len(keys) > 0: key = keys.pop() if isinstance(key, basestring): value = keys.pop() self.keys.append(key) self.columns[key] = value elif isinstance(key, (list, tuple)): self.keys.extend(key) #elif isinstance(key, dict): # self.columns.update(key) else: raise TypeError("String, tuple or dict required.")
a4f69106dfee83df4b0b8dbd1ba2cae4e0d66a1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/a4f69106dfee83df4b0b8dbd1ba2cae4e0d66a1a/checkwidgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2452, 12, 2890, 16, 380, 2452, 16, 2826, 4333, 4672, 1311, 273, 666, 12, 2452, 13, 1323, 562, 12, 2452, 13, 405, 374, 30, 498, 273, 1311, 18, 5120, 1435, 309, 1549, 12, 856,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2452, 12, 2890, 16, 380, 2452, 16, 2826, 4333, 4672, 1311, 273, 666, 12, 2452, 13, 1323, 562, 12, 2452, 13, 405, 374, 30, 498, 273, 1311, 18, 5120, 1435, 309, 1549, 12, 856,...
line = re.sub(r'[bB]ug '<a href="' + bugzilla_url + '\\1">\\g<0></a>', line)
def format_date(d): # Don't depend on locale months = (None, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') d = time.strptime(d, '%Y-%m-%d') return '%s %d, %d' % (months[d.tm_mon], d.tm_mday, d.tm_year)
d298711b9a325b8a808cc15c7dbfada5395f6b17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/d298711b9a325b8a808cc15c7dbfada5395f6b17/gen-news.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 712, 12, 72, 4672, 468, 7615, 1404, 2447, 603, 2573, 8846, 273, 261, 7036, 16, 296, 46, 304, 24335, 2187, 296, 2954, 2848, 24335, 2187, 296, 49, 991, 2187, 296, 37, 683, 330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 712, 12, 72, 4672, 468, 7615, 1404, 2447, 603, 2573, 8846, 273, 261, 7036, 16, 296, 46, 304, 24335, 2187, 296, 2954, 2848, 24335, 2187, 296, 49, 991, 2187, 296, 37, 683, 330, ...
"Unexpected keyword: %s=%r" % name, value)
"Unexpected keyword: %s=%r" % (name, value))
def __init__(self, environ=None, environ_getter=None, charset=NoDefault, unicode_errors=NoDefault, decode_param_names=NoDefault, **kw): if environ is None and environ_getter is None: raise TypeError( "You must provide one of environ or environ_getter") if environ is not None and environ_getter is not None: raise TypeError( "You can only provide one of the environ and environ_getter arguments") if environ is None: self._environ_getter = environ_getter else: if not isinstance(environ, dict): raise TypeError( "Bad type for environ: %s" % type(environ)) self._environ = environ if charset is not NoDefault: self.__dict__['charset'] = charset if unicode_errors is not NoDefault: self.__dict__['unicode_errors'] = unicode_errors if decode_param_names is not NoDefault: self.__dict__['decode_param_names'] = decode_param_names for name, value in kw.items(): if not hasattr(self.__class__, name): raise TypeError( "Unexpected keyword: %s=%r" % name, value) setattr(self, name, value)
ac9e22662a2d9c3ee6b554c171593049fd08ff8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12287/ac9e22662a2d9c3ee6b554c171593049fd08ff8c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5473, 33, 7036, 16, 5473, 67, 11990, 33, 7036, 16, 4856, 33, 2279, 1868, 16, 5252, 67, 4324, 33, 2279, 1868, 16, 2495, 67, 891, 67, 1973, 33, 2279, 186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5473, 33, 7036, 16, 5473, 67, 11990, 33, 7036, 16, 4856, 33, 2279, 1868, 16, 5252, 67, 4324, 33, 2279, 1868, 16, 2495, 67, 891, 67, 1973, 33, 2279, 186...
sys.exit(0)
attemptShutdown(False) os.kill(os.getpid(),9)
def fatalError(message): """ Raise a fatal, internal error. Kill everything, log sufficiently, and inform the main class to restart. """ log(Log.Error, "api-main", "FATAL ERROR: %s -- Shutting down and restarting!" % message) sys.exit(0) # TODO: Shutdown, restart
aeb59e37c0d20aad8ce5af20553762604b875919 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12317/aeb59e37c0d20aad8ce5af20553762604b875919/Vending.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10081, 668, 12, 2150, 4672, 3536, 20539, 279, 10081, 16, 2713, 555, 18, 20520, 7756, 16, 613, 18662, 715, 16, 471, 13235, 326, 2774, 667, 358, 7870, 18, 3536, 613, 12, 1343, 18, 668, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10081, 668, 12, 2150, 4672, 3536, 20539, 279, 10081, 16, 2713, 555, 18, 20520, 7756, 16, 613, 18662, 715, 16, 471, 13235, 326, 2774, 667, 358, 7870, 18, 3536, 613, 12, 1343, 18, 668, 1...
return http.Response(stream=str(self.worksheet.is_auto_publish()))
return HTMLResponse(stream=str(self.worksheet.is_auto_publish()))
def render(self, ctx): # Publishes worksheet and also sets worksheet to be published automatically when saved if 'yes' in ctx.args and 'auto' in ctx.args: notebook.publish_worksheet(self.worksheet, self.username) self.worksheet.set_auto_publish() return http.RedirectResponse("/home/%s/publish" % (self.worksheet.filename())) # Just publishes worksheet elif 'yes' in ctx.args: notebook.publish_worksheet(self.worksheet, self.username) return http.RedirectResponse("/home/%s/publish" % (self.worksheet.filename())) # Stops publication of worksheet elif 'stop' in ctx.args: notebook.delete_worksheet(self.worksheet.published_version().filename()) return http.RedirectResponse("/home/%s/publish" % (self.worksheet.filename())) # Re-publishes worksheet elif 're' in ctx.args: W = notebook.publish_worksheet(self.worksheet, self.username) return http.RedirectResponse("/home/%s/publish" % (self.worksheet.filename())) # Sets worksheet to be published automatically when saved elif 'auto' in ctx.args: self.worksheet.set_auto_publish() return http.RedirectResponse("/home/%s/publish" % (self.worksheet.filename())) # Returns boolean of "Is this worksheet set to be published automatically when saved?" elif 'is_auto' in ctx.args: return http.Response(stream=str(self.worksheet.is_auto_publish())) # Returns the publication page else: # Page for when worksheet already published if self.worksheet.has_published_version(): addr = 'http%s://' % ('' if not notebook.secure else 's') addr += notebook.address addr += ':%s' % notebook.port addr += '/home/' + self.worksheet.published_version().filename() dtime = self.worksheet.published_version().date_edited() return http.Response(stream=notebook.html_afterpublish_window(self.worksheet, self.username, addr, dtime)) # Page for when worksheet is not already published else: return http.Response(stream=notebook.html_beforepublish_window(self.worksheet, self.username))
2c1a5997a8830efcfb475993e5f1efb45ed121ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2c1a5997a8830efcfb475993e5f1efb45ed121ea/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 468, 9761, 281, 13622, 471, 2546, 1678, 13622, 358, 506, 9487, 6635, 1347, 5198, 309, 296, 9707, 11, 316, 1103, 18, 1968, 471, 296, 6079, 11, 316, 1103, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 468, 9761, 281, 13622, 471, 2546, 1678, 13622, 358, 506, 9487, 6635, 1347, 5198, 309, 296, 9707, 11, 316, 1103, 18, 1968, 471, 296, 6079, 11, 316, 1103, ...
report_send_fields = { 'mail_service_id': {'string': 'Select Mail Service', 'type': 'many2one', 'relation': 'dm.mail_service',}, }
domain = [] if address: pool = pooler.get_pool(cr.dbname) wi_obj = pool.get('dm.workitem') workitem_ids = wi_obj.search(cr, uid, [('address_id', '=', address)]) segment_ids = list(set([wi.segment_id.id for wi in wi_obj.browse(cr, uid, workitem_ids) if wi.segment_id.id])) domain = [('id', 'in', tuple(segment_ids))]
def get_campaings(self,cr,uid,context): document_id = self.dm_wiz_data['id'] pool = pooler.get_pool(cr.dbname) seg_obj = pool.get('dm.campaign.proposition.segment') document = pool.get('dm.offer.document').browse(cr,uid,document_id) if document.step_id: offer=document.step_id.offer_id.id if offer: camp_ids=pool.get('dm.campaign').search(cr,uid,[('offer_id','=',offer)]) if camp_ids: segment_ids=seg_obj.search(cr,uid,[('campaign_id','in',camp_ids)]) res = [(seg.id, seg.name) for seg in seg_obj.browse(cr, uid, segment_ids)] res.sort(lambda x, y: cmp(x[1], y[1])) return res
c4b3f8fbfd260b59e6476663f0fbd313179a12b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/c4b3f8fbfd260b59e6476663f0fbd313179a12b3/dm_document_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 71, 5406, 899, 12, 2890, 16, 3353, 16, 1911, 16, 2472, 4672, 1668, 67, 350, 273, 365, 18, 10956, 67, 91, 452, 67, 892, 3292, 350, 3546, 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, 336, 67, 71, 5406, 899, 12, 2890, 16, 3353, 16, 1911, 16, 2472, 4672, 1668, 67, 350, 273, 365, 18, 10956, 67, 91, 452, 67, 892, 3292, 350, 3546, 2845, 273, 2845, 264, 18, 588, 67, ...
parts = [tagname.lower()]
parts = [tagname]
def starttag(self, node, tagname, suffix='\n', infix='', **attributes): """ Construct and return a start tag given a node (id & class attributes are extracted), tag name, and optional attributes. """ atts = {} for (name, value) in attributes.items(): atts[name.lower()] = value for att in ('class',): # append to node attribute if node.has_key(att) or atts.has_key(att): atts[att] = \ (node.get(att, '') + ' ' + atts.get(att, '')).strip() for att in ('id',): # node attribute overrides if node.has_key(att): atts[att] = node[att] if atts.has_key('id'): atts['name'] = atts['id'] # for compatibility with old browsers attlist = atts.items() attlist.sort() parts = [tagname.lower()] for name, value in attlist: if value is None: # boolean attribute # According to the HTML spec, ``<element boolean>`` is good, # ``<element boolean="boolean">`` is bad. # (But the XHTML (XML) spec says the opposite. <sigh>) parts.append(name.lower()) elif isinstance(value, ListType): values = [str(v) for v in value] parts.append('%s="%s"' % (name.lower(), self.attval(' '.join(values)))) else: parts.append('%s="%s"' % (name.lower(), self.attval(str(value)))) return '<%s%s>%s' % (' '.join(parts), infix, suffix)
bef2b9f2a4b776f4f84bbd8c993d083045875c02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/bef2b9f2a4b776f4f84bbd8c993d083045875c02/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 2692, 12, 2890, 16, 756, 16, 25586, 16, 3758, 2218, 64, 82, 2187, 316, 904, 2218, 2187, 2826, 4350, 4672, 3536, 14291, 471, 327, 279, 787, 1047, 864, 279, 756, 261, 350, 473, 667,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 2692, 12, 2890, 16, 756, 16, 25586, 16, 3758, 2218, 64, 82, 2187, 316, 904, 2218, 2187, 2826, 4350, 4672, 3536, 14291, 471, 327, 279, 787, 1047, 864, 279, 756, 261, 350, 473, 667,...
self.conn = self.connect(invalidate = True)
self.conn = self.connect()
def startTransaction(self): """ __startTransaciton__ Start a transaction, performing an implicit commit if necessary.
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 3342, 12, 2890, 4672, 3536, 1001, 1937, 1429, 1077, 26949, 972, 225, 3603, 279, 2492, 16, 14928, 392, 10592, 3294, 309, 4573, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 787, 3342, 12, 2890, 4672, 3536, 1001, 1937, 1429, 1077, 26949, 972, 225, 3603, 279, 2492, 16, 14928, 392, 10592, 3294, 309, 4573, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
def block(self, expiry=None, reason=None, anonOnly=True, noSignup=False, enableAutoblock=False, emailBan=False):
def block(self, expiry=None, reason=None, anonOnly=True, noSignup=False, enableAutoblock=False, emailBan=False, watchUser=False, allowUsertalk=True):
def block(self, expiry=None, reason=None, anonOnly=True, noSignup=False, enableAutoblock=False, emailBan=False): """ Block the user.
fd68e75c37f6f7471c58cf76d697bb8675ed0763 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/fd68e75c37f6f7471c58cf76d697bb8675ed0763/userlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1203, 12, 2890, 16, 10839, 33, 7036, 16, 3971, 33, 7036, 16, 30637, 3386, 33, 5510, 16, 1158, 2766, 416, 33, 8381, 16, 4237, 7150, 947, 739, 33, 8381, 16, 2699, 38, 304, 33, 8381, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1203, 12, 2890, 16, 10839, 33, 7036, 16, 3971, 33, 7036, 16, 30637, 3386, 33, 5510, 16, 1158, 2766, 416, 33, 8381, 16, 4237, 7150, 947, 739, 33, 8381, 16, 2699, 38, 304, 33, 8381, 16...
self.info = mediadb.ItemInfo('', '', {})
self.info = mediadb.item()
def __init__(self, parent=None, info=True): """ Init the item. Sets all needed variables, if parent is given also inherit some settings from there. """ if not hasattr(self, 'type'): self.type = None # e.g. video, audio, dir, playlist
8914e83d86f520c47817ebd3ec42959fc0feefbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/8914e83d86f520c47817ebd3ec42959fc0feefbf/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 16, 1123, 33, 5510, 4672, 3536, 4378, 326, 761, 18, 11511, 777, 3577, 3152, 16, 309, 982, 353, 864, 2546, 6811, 2690, 1947, 628, 1915, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 16, 1123, 33, 5510, 4672, 3536, 4378, 326, 761, 18, 11511, 777, 3577, 3152, 16, 309, 982, 353, 864, 2546, 6811, 2690, 1947, 628, 1915, 18,...
main()
main()
def main(): # parse command line options try: opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "verbose"]) except getopt.error, msg: print msg print "for help use --help" sys.exit(2) for i in opts: print "opts:"+i[0] for i in args: print "args:"+i files = args for f in files: print "file:"+f try: allContacts=parse_vcf(f) except IOError: print "errore: file not found" sys.exit(2) myContacts=dedupe(allContacts) outfile = open("rubrica_parsata.vcf","w+") print "stampalo" for i in myContacts: #print i.serialize() outfile.write(i.serialize()) outfile.write(i.serialize())
765a62b2090184a64aaf4de1b40a55f13c8693d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1102/765a62b2090184a64aaf4de1b40a55f13c8693d8/nodupe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1109, 1296, 980, 702, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 90, 3113, 8247, 5201, 3113, 315, 11369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1109, 1296, 980, 702, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 90, 3113, 8247, 5201, 3113, 315, 11369, ...
value = workspace.measurements.get_image_measurement(column[1]) statistics += (column[0].split('_')[1], str(value))
value = workspace.measurements.get_current_image_measurement(column[1])[0] statistics += [(column[1].split('_')[1], str(value))]
def run(self,workspace): """Run the module workspace - the workspace contains: pipeline - instance of CellProfiler.Pipeline for this run image_set - the images in the image set being processed object_set - the objects (labeled masks) in this image set measurements - the measurements for this run frame - display within this frame (or None to not display) """ input = workspace.image_set.get_image(self.image_name, must_be_grayscale=True) pixels = input.pixel_data.copy() if self.threshold_modifier == TM_PER_OBJECT: objects = workspace.object_set.get_objects(self.enclosing_objects_name.value) labels = objects.segmented else: labels = None local_thresh,global_thresh = self.get_threshold(pixels,input.mask,labels) if self.binary != 'Grayscale': pixels = (pixels > local_thresh) & input.mask else: if self.low_or_high == TH_BELOW_THRESHOLD: thresholded_pixels = pixels < local_thresh pixels[input.mask & thresholded_pixels] = 0 if self.shift.value: pixels[input.mask & ~ thresholded_pixels] -= local_thresh elif self.low_or_high == TH_ABOVE_THRESHOLD: undilated = input.mask & (pixels >= local_thresh) dilated = binary_dilation(undilated, strel_disk(self.dilation.value), mask=input.mask) pixels[dilated] = 0 else: raise NotImplementedError( """Threshold setting, "%s" is not "%s" or "%s".""" % (self.low_or_high.value, TH_BELOW_THRESHOLD, TH_ABOVE_THRESHOLD)) output = cpimage.Image(pixels, parent_image=input) workspace.image_set.add(self.thresholded_image_name.value, output) self.add_threshold_measurements(workspace.measurements, input.pixel_data, input.mask, local_thresh, global_thresh, self.thresholded_image_name.value) if workspace.frame is not None: workspace.display_data.input_pixel_data = input.pixel_data workspace.display_data.output_pixel_data = output.pixel_data statistics = workspace.display_data.statistics = [ ("Feature","Value")] for column in self.get_measurement_columns(workspace.pipeline): value = workspace.measurements.get_image_measurement(column[1]) statistics += (column[0].split('_')[1], str(value))
0a88a8cb83308fe183bf437b67c06148c87c9082 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2870/0a88a8cb83308fe183bf437b67c06148c87c9082/applythreshold.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 14915, 4672, 3536, 1997, 326, 1605, 225, 6003, 565, 300, 326, 6003, 1914, 30, 5873, 377, 300, 791, 434, 8614, 22060, 18, 8798, 364, 333, 1086, 1316, 67, 542, 565, 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, 1086, 12, 2890, 16, 14915, 4672, 3536, 1997, 326, 1605, 225, 6003, 565, 300, 326, 6003, 1914, 30, 5873, 377, 300, 791, 434, 8614, 22060, 18, 8798, 364, 333, 1086, 1316, 67, 542, 565, 3...
db_dir = self.cache_dir+'/'+status_dir+'/db' if not os.path.exists(db_dir): os.makedirs(db_dir)
def open_shelve(filename): from bsddb3 import db,dbshelve
5c9bae059cd7d11136ad9fba35419cb5fb58a393 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7531/5c9bae059cd7d11136ad9fba35419cb5fb58a393/apt_proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 674, 292, 537, 12, 3459, 4672, 628, 7081, 449, 70, 23, 1930, 1319, 16, 1966, 674, 292, 537, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 674, 292, 537, 12, 3459, 4672, 628, 7081, 449, 70, 23, 1930, 1319, 16, 1966, 674, 292, 537, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
[w1,w1], [w2,w1], [w1,w1], [w1,w2], [w2,w2], [w1,w2], [w1,w1], [w2,w1], [w1,w1]
[ w1, w1], [ w2, w1], [ w1, w1], [ w1, w2], [ w2, w2], [ w1, w2], [ w1, w1], [ w2, w1], [ w1, w1]
def flw2i4e(ex,ey,ep,D,eq=None): """ Compute element stiffness (conductivity) matrix for 4 node isoparametric field element Parameters: ex = [x1 x2 x3 x4] element coordinates ey = [y1 y2 y3 y4] ep = [t ir] thickness and integration rule D = [[kxx kxy], [kyx kyy]] constitutive matrix eq heat supply per unit volume Returns: Ke element 'stiffness' matrix (4 x 4) fe element load vector (4 x 1) """ t = ep[0] ir = ep[1] ngp = ir*ir if eq == None: q = 0 else: q = eq if ir == 1: g1 = 0.0 w1 = 2.0 gp = mat([g1,g1]) w = mat([w1,w1]) elif ir == 2: g1 = 0.577350269189626 w1 = 1 gp = mat([ [-g1,-g1], [ g1,-g1], [-g1, g1], [ g1, g1] ]) w = mat([ [w1,w1], [w1,w1], [w1,w1], [w1,w1] ]) elif ir == 3: g1 = 0.774596669241483 g2 = 0. w1 = 0.555555555555555 w2 = 0.888888888888888 gp = mat([ [-g1,-g1], [-g2,-g1], [ g1,-g1], [-g1, g2], [ g2, g2], [ g1, g2], [-g1, g1], [ g2, g1], [ g1, g1] ]) w = mat([ [w1,w1], [w2,w1], [w1,w1], [w1,w2], [w2,w2], [w1,w2], [w1,w1], [w2,w1], [w1,w1] ]) else: print "Used number of integration points not implemented" wp = multiply(w[:,0],w[:,1]) xsi = gp[:,0] eta = gp[:,1] r2 = ngp*2 N = multiply((1-xsi),(1-eta))/4. N = append(N,multiply((1+xsi),(1-eta))/4.,axis=1) N = append(N,multiply((1+xsi),(1+eta))/4.,axis=1) N = append(N,multiply((1-xsi),(1+eta))/4.,axis=1) dNr = mat(zeros((r2,4))) dNr[0:r2:2,0] =-(1-eta)/4. dNr[0:r2:2,1] = (1-eta)/4. dNr[0:r2:2,2] = (1+eta)/4. dNr[0:r2:2,3] =-(1+eta)/4. dNr[1:r2+1:2,0] =-(1-xsi)/4. dNr[1:r2+1:2,1] =-(1+xsi)/4. dNr[1:r2+1:2,2] = (1+xsi)/4. dNr[1:r2+1:2,3] = (1-xsi)/4. Ke1 = mat(zeros((4,4))) fe1 = mat(zeros((4,1))) JT = dNr*mat([ex,ey]).T for i in range(ngp): indx = array([2*(i+1)-1,2*(i+1)]) detJ = linalg.det(JT[indx-1,:]) if detJ < 10*finfo(float).eps: print "Jacobideterminanten lika med noll!" JTinv = linalg.inv(JT[indx-1,:]) B = JTinv*dNr[indx-1,:] Ke1 = Ke1+B.T*D*B*detJ*asscalar(wp[i]) fe1 = fe1+N[i,:].T*detJ*wp[i] if eq == None: return Ke1*t else: return Ke1*t,fe1*t*eq
802fb797c1c505715968b6bf327cad5ed7e0e712 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1235/802fb797c1c505715968b6bf327cad5ed7e0e712/pycalfem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 91, 22, 77, 24, 73, 12, 338, 16, 402, 16, 881, 16, 40, 16, 11253, 33, 7036, 4672, 3536, 8155, 930, 384, 3048, 4496, 261, 591, 1828, 2818, 13, 3148, 364, 1059, 756, 353, 556, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 91, 22, 77, 24, 73, 12, 338, 16, 402, 16, 881, 16, 40, 16, 11253, 33, 7036, 4672, 3536, 8155, 930, 384, 3048, 4496, 261, 591, 1828, 2818, 13, 3148, 364, 1059, 756, 353, 556, ...
delattr(c, meth)
c.sqlmeta.delJoin(joinDef, childUpdate=True)
def delJoin(sqlmeta, joinDef): soClass = sqlmeta.soClass super(InheritableSQLMeta, sqlmeta).delJoin(joinDef)
3846d0f4848345d398e1bda02a7e3b35067a6291 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8798/3846d0f4848345d398e1bda02a7e3b35067a6291/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 4572, 12, 4669, 3901, 16, 1233, 3262, 4672, 1427, 797, 273, 1847, 3901, 18, 2048, 797, 2240, 12, 14216, 429, 3997, 2781, 16, 1847, 3901, 2934, 3771, 4572, 12, 5701, 3262, 13, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1464, 4572, 12, 4669, 3901, 16, 1233, 3262, 4672, 1427, 797, 273, 1847, 3901, 18, 2048, 797, 2240, 12, 14216, 429, 3997, 2781, 16, 1847, 3901, 2934, 3771, 4572, 12, 5701, 3262, 13, 2, ...
setUpEditWidgets(self, IPersonEditForm, self.context)
setUpWidgets(self, IPersonEditForm, IInputWidget, initial={'title': self.context.title, 'photo': self.context.photo})
def __init__(self, context, request): BrowserView.__init__(self, context, request) setUpEditWidgets(self, IPersonEditForm, self.context)
da91264001a001b238b7d686e5bc52d65686b154 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/da91264001a001b238b7d686e5bc52d65686b154/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 819, 16, 590, 4672, 15408, 1767, 16186, 2738, 972, 12, 2890, 16, 819, 16, 590, 13, 24292, 4666, 16166, 12, 2890, 16, 2971, 3565, 4666, 1204, 16, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 819, 16, 590, 4672, 15408, 1767, 16186, 2738, 972, 12, 2890, 16, 819, 16, 590, 13, 24292, 4666, 16166, 12, 2890, 16, 2971, 3565, 4666, 1204, 16, 365, 18,...
lshift=Label(f5b, bg='white', fg='black', text='Shift 0.0', width=8, relief=RIDGE) lshift.grid(column=1,row=4,ipadx=3,padx=2,pady=5,sticky='EW')
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync_save,idsec,first,itol,txsnrdb,tx6alt,\ bm_geom utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) Audio.gcom2.utcdate=t[:12] ldate.configure(text=t) root_geom=root.geometry() try: bm_geom=bm.geometry() except: pass utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \ options.MyGrid.get().upper(),HisGrid.get().upper(),utchours) azdist() g.nfreq=nfreq.get() if Audio.gcom2.ndecoding==0: g.AzSun,g.ElSun,g.AzMoon,g.ElMoon,g.AzMoonB,g.ElMoonB,g.ntsky, \ g.ndop,g.ndop00,g.dbMoon,g.RAMoon,g.DecMoon,g.HA8,g.Dgrd, \ g.sd,g.poloffset,g.MaxNR,g.dfdt,g.dfdt0,g.RaAux,g.DecAux, \ g.AzAux,g.ElAux = Audio.astro0(utc[0],utc[1],utc[2], \ utchours,nfreq.get(),options.MyGrid.get().upper(), \ options.auxra.get()+' '[:9], \ options.auxdec.get()+' '[:9]) if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 graph2.delete(ALL) graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font) graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font) if g.freeze_decode: itol=2 ltol.configure(text='Tol '+str(50)) Audio.gcom2.dftolerance=50 nfreeze.set(1) Audio.gcom2.nfreeze=1 if Audio.gcom2.monitoring: Audio.gcom2.ndecoding=1 Audio.gcom2.nagain=0 else: Audio.gcom2.ndecoding=4 Audio.gcom2.nagain=1 g.freeze_decode=0 n=int(20.0*log10(g.rms/770.0+0.01)) t="Rx noise:%3d dB" % (n,) if n>=-10 and n<=10: msg4.configure(text=t,bg='gray85') else: msg4.configure(text=t,bg='red') t=g.ftnstr(Audio.gcom2.decodedfile)
f15c753982ab17e3b44954cd158dec3caeb6c649 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/f15c753982ab17e3b44954cd158dec3caeb6c649/map65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 15224, 1561, 16, 82, 15224, 378, 11214, 16, 82, 3190, 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, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 15224, 1561, 16, 82, 15224, 378, 11214, 16, 82, 3190, 16, ...
print '<input type="text" name="q" value="%s" />' % cgi.escape(query)
print '<input type="text" name="q" value="%s" />' % cgi.escape(query, True)
def print_search_results(query): print "Content-Type: text/html; charset=UTF-8" print print HEADER print "<h1>IRC log search results for %s</h1>" % cgi.escape(query) print '<form action="" method="get">' print '<input type="text" name="q" value="%s" />' % cgi.escape(query) print '<input type="submit" />' print '</form>' started = time.time() date = None prev_result = None formatter = SearchResultFormatter() stats = SearchStats() for result in search_irc_logs(query, stats): if date != result.date: if prev_result: formatter.print_suffix() prev_result = None if date: print " </li>" else: print '<ul class="searchresults">' print ' <li><a href="%s">%s</a>:' % (urlescape(result.link), result.date.strftime('%Y-%m-%d (%A)')) date = result.date if not prev_result: formatter.print_prefix() formatter.print_html(result) prev_result = result if prev_result: formatter.print_suffix() if date: print " </li>" print "</ul>" total_time = time.time() - started print "<p>%d matches in %d log files with %d lines (%.1f seconds).</p>" % ( stats.matches, stats.files, stats.lines, total_time) print FOOTER
8eee9dd68cdcc1ff59c50b5acb93ff4343d34830 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9464/8eee9dd68cdcc1ff59c50b5acb93ff4343d34830/irclogsearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3072, 67, 4717, 12, 2271, 4672, 1172, 315, 1350, 17, 559, 30, 977, 19, 2620, 31, 4856, 33, 5159, 17, 28, 6, 1172, 1172, 11659, 1172, 3532, 76, 21, 34, 30240, 613, 1623, 168...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3072, 67, 4717, 12, 2271, 4672, 1172, 315, 1350, 17, 559, 30, 977, 19, 2620, 31, 4856, 33, 5159, 17, 28, 6, 1172, 1172, 11659, 1172, 3532, 76, 21, 34, 30240, 613, 1623, 168...
s1 = os.stat(path) s2 = os.stat(join(path, '..'))
s1 = os.lstat(path) s2 = os.lstat(join(path, '..'))
def ismount(path): """Test whether a path is a mount point""" try: s1 = os.stat(path) s2 = os.stat(join(path, '..')) except os.error: return False # It doesn't exist -- so not a mount point :-) dev1 = s1.st_dev dev2 = s2.st_dev if dev1 != dev2: return True # path/.. on a different device as path ino1 = s1.st_ino ino2 = s2.st_ino if ino1 == ino2: return True # path/.. is the same i-node as path return False
4bdc03affec8289656b9b6e917518fdb24904f28 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/4bdc03affec8289656b9b6e917518fdb24904f28/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 4778, 12, 803, 4672, 3536, 4709, 2856, 279, 589, 353, 279, 5344, 1634, 8395, 775, 30, 272, 21, 273, 1140, 18, 80, 5642, 12, 803, 13, 272, 22, 273, 1140, 18, 80, 5642, 12, 5701, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 4778, 12, 803, 4672, 3536, 4709, 2856, 279, 589, 353, 279, 5344, 1634, 8395, 775, 30, 272, 21, 273, 1140, 18, 80, 5642, 12, 803, 13, 272, 22, 273, 1140, 18, 80, 5642, 12, 5701, ...
body = 'Error: %s (%s)' % (e.status, e.message)
message, explain = self.responses[e.status] body = self.error_message_format % {'code': e.status, 'message': message, 'explain': explain}
def process_http_error(self, e): """ create the response body and headers for errors """ headers = {'Content-Type': 'text/plain'} # XXX need more headers here? if e.status in [301, 302]: headers['Location'] = e.data body = 'Redirecting to %s' % (e.data,) else: body = 'Error: %s (%s)' % (e.status, e.message) return headers, body
301885034139549c7a082896c774021611ea2008 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/301885034139549c7a082896c774021611ea2008/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2505, 67, 1636, 12, 2890, 16, 425, 4672, 3536, 752, 326, 766, 1417, 471, 1607, 364, 1334, 3536, 1607, 273, 13666, 1350, 17, 559, 4278, 296, 955, 19, 7446, 11, 97, 468, 11329,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2505, 67, 1636, 12, 2890, 16, 425, 4672, 3536, 752, 326, 766, 1417, 471, 1607, 364, 1334, 3536, 1607, 273, 13666, 1350, 17, 559, 4278, 296, 955, 19, 7446, 11, 97, 468, 11329,...
print repr(str(err))
# def __getstate__(self):
98b922c0eca3f56f5fe1f1ed2c8337fbdb63618d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/98b922c0eca3f56f5fe1f1ed2c8337fbdb63618d/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 4202, 1652, 1001, 588, 2019, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 4202, 1652, 1001, 588, 2019, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.__devtype = t
def connect_debug(self, inp, outp): self.__devtype = t self.__shakedev = pyshake.init_device_debug(inp, outp, self.__devtype) if self.__shakedev == -1: self.__lasterror = "Failed to connect" return False
e15579dc1c7b77bb234f07a30e67f77d41f4f3d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4761/e15579dc1c7b77bb234f07a30e67f77d41f4f3d6/shake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 4148, 12, 2890, 16, 12789, 16, 596, 84, 4672, 365, 16186, 7478, 5206, 273, 2395, 7478, 18, 2738, 67, 5964, 67, 4148, 12, 31647, 16, 596, 84, 16, 365, 16186, 5206, 723, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 4148, 12, 2890, 16, 12789, 16, 596, 84, 4672, 365, 16186, 7478, 5206, 273, 2395, 7478, 18, 2738, 67, 5964, 67, 4148, 12, 31647, 16, 596, 84, 16, 365, 16186, 5206, 723, 13, ...
self.points=[]
self.points=points
def __init__(self,points): self.points=[]
51a976074427823908816e97be8bc6413eea731a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9336/51a976074427823908816e97be8bc6413eea731a/nef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4139, 4672, 365, 18, 4139, 33, 4139, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4139, 4672, 365, 18, 4139, 33, 4139, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if error not in errors: error = None error = error and errors[error]
if error is not None: if error in errors: error = errors[error]
def __tuneFailed(self): service = self.session.nav.getCurrentService() info = service and service.info() error = info and info.getInfo(iServiceInformation.sDVBState) if error == self.last_error: error = None else: self.last_error = error
3f35474ab204e99bf710724d949ac29b7d2029d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/3f35474ab204e99bf710724d949ac29b7d2029d7/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 88, 7556, 2925, 12, 2890, 4672, 1156, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 1123, 273, 1156, 471, 1156, 18, 1376, 1435, 555, 273, 1123, 471, 1123, 18, 588, 96...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 88, 7556, 2925, 12, 2890, 4672, 1156, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 1123, 273, 1156, 471, 1156, 18, 1376, 1435, 555, 273, 1123, 471, 1123, 18, 588, 96...
host, port, url = _parse(l[0]) self.factory.host = host
host, port, url = _parse(l[0], defaultPort=self.transport.addr[1]) if host: self.factory.host = host self.factory.port = port
def handleStatus_301(self): l = self.headers.get('location') if not l: self.handleStatusDefault() host, port, url = _parse(l[0]) self.factory.host = host self.factory.url = url
035a42131cb602f6c1f9b215473faaa892bf3919 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/035a42131cb602f6c1f9b215473faaa892bf3919/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1482, 67, 31831, 12, 2890, 4672, 328, 273, 365, 18, 2485, 18, 588, 2668, 3562, 6134, 309, 486, 328, 30, 365, 18, 4110, 1482, 1868, 1435, 1479, 16, 1756, 16, 880, 273, 389, 2670, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1482, 67, 31831, 12, 2890, 4672, 328, 273, 365, 18, 2485, 18, 588, 2668, 3562, 6134, 309, 486, 328, 30, 365, 18, 4110, 1482, 1868, 1435, 1479, 16, 1756, 16, 880, 273, 389, 2670, ...
OBJFILES.append("pnmtext_config_pnmtext.obj") OBJFILES.append("pnmtext_freetypeFont.obj") OBJFILES.append("pnmtext_pnmTextGlyph.obj") OBJFILES.append("pnmtext_pnmTextMaker.obj")
OBJFILES.append("pnmtext_composite.obj")
if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
bc5fc1af0298e68a51a18dc8bc8da9f86c4f411e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/bc5fc1af0298e68a51a18dc8bc8da9f86c4f411e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
rsp = self.apiGet("reviewrequests/%s/delete" % review_request_id)
rsp = self.apiGet("reviewrequests/%s/delete" % review_request_id, expected_status=403)
def testReviewRequestDeletePermissionDenied(self): """Testing the reviewrequests/delete API with Permission Denied error""" review_request_id = \ ReviewRequest.objects.exclude(submitter=self.user)[0].id rsp = self.apiGet("reviewrequests/%s/delete" % review_request_id) self.assertEqual(rsp['stat'], 'fail') self.assertEqual(rsp['err']['code'], webapi.PERMISSION_DENIED.code)
21b56ac1dbc418157976dcd64bb81c1d6995a975 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/21b56ac1dbc418157976dcd64bb81c1d6995a975/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9159, 691, 2613, 5041, 10410, 12, 2890, 4672, 3536, 22218, 326, 10725, 11420, 19, 3733, 1491, 598, 8509, 22453, 2092, 555, 8395, 10725, 67, 2293, 67, 350, 273, 521, 21354, 691, 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, 1842, 9159, 691, 2613, 5041, 10410, 12, 2890, 4672, 3536, 22218, 326, 10725, 11420, 19, 3733, 1491, 598, 8509, 22453, 2092, 555, 8395, 10725, 67, 2293, 67, 350, 273, 521, 21354, 691, 18, ...
highlight_task_added[0] = False
def highlight_matching_brackets(buf): """:type buf: gtk.TextBuffer()""" highlight_task_added[0] = False iter = buf.get_iter_at_mark(buf.get_insert()) char = iter.get_char() piter = iter.copy() if piter.backward_cursor_position(): pchar = piter.get_char() else: pchar = '' lbr = rbr = None if char in brackets: rbr, rd = brackets[char] if pchar in brackets: lbr, ld = brackets[pchar] reset_tags(buf) if not lbr and not rbr: return if lbr == char: return if lbr: mark_brackets(buf, piter, find_bracket(piter, lbr, pchar, ld)) if rbr: mark_brackets(buf, iter, find_bracket(iter, rbr, char, rd))
35e448db7703eee0de8e05b40f59e7c792954021 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/35e448db7703eee0de8e05b40f59e7c792954021/bracket_matcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8839, 67, 16271, 67, 21025, 87, 12, 4385, 4672, 3536, 30, 723, 1681, 30, 22718, 18, 1528, 1892, 1435, 8395, 1400, 273, 1681, 18, 588, 67, 2165, 67, 270, 67, 3355, 12, 4385, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8839, 67, 16271, 67, 21025, 87, 12, 4385, 4672, 3536, 30, 723, 1681, 30, 22718, 18, 1528, 1892, 1435, 8395, 1400, 273, 1681, 18, 588, 67, 2165, 67, 270, 67, 3355, 12, 4385, 18, 588, ...
source_logger.debug("Potentials obtained. Setting a and making results array...")
def calculatesource(m, nix, integrand_elements, srcfunc=slowrollsrcterm): """Return the integrated source term at this timestep. Given the first order model and the timestep calculate the integrated source term at this time step. Parameters ---------- m: Cosmomodels.TwoStageModel First order model to be used. nix: int Index of current timestep in m.tresult integrand_elements: tuple Contains integrand arrays in order integrand_elements = (k, q, theta, klessq) srcfunc: function, optional Funtion which contains expression for source integrand Default is slowrollsrcterm in this module. Returns ------- s: array_like Integrated source term calculated using srcfunc. """ #Unpack important arrays k, q, theta, klessq = integrand_elements #Copy of yresult myr = m.yresult[nix].copy() #Fill nans with initial conditions if N.any(m.tresult[nix] < m.fotstart): #Get first order ICs: nanfiller = m.getfoystart(m.tresult[nix].copy(), N.array([nix])) source_logger.debug("Left getfoystart. Filling nans...") #switch nans for ICs in m.yresult are_nan = N.isnan(myr) myr[are_nan] = nanfiller[are_nan] source_logger.debug("NaNs filled. Setting dynamical variables...") #Get first order results bgvars = myr[0:3,:] dphi1 = myr[3,:] + myr[4,:]*1j dphi1dot = myr[5,:] + myr[6,:]*1j #Setup interpolation dp1func = interpolate.interp1d(m.k, dphi1) dp1dotfunc = interpolate.interp1d(m.k, dphi1dot) source_logger.debug("Variables set. Getting potentials for this timestep...") potentials = list(m.potentials(myr)) #Get potentials in right shape for pix, p in enumerate(potentials): if N.shape(p) != N.shape(potentials[0]): potentials[pix] = p*N.ones_like(potentials[0]) source_logger.debug("Potentials obtained. Setting a and making results array...") #Value of a for this time step a = m.ainit*N.exp(m.tresult[nix]) source_logger.debug("Calculating source term integrand for this tstep...") #Get unintegrated source term src_integrand = srcfunc(bgvars, a, potentials, integrand_elements, dp1func, dp1dotfunc) #Get integration function source_logger.debug("Integrating source term...") theta_intfn, theta_intfnargs = helpers.getintfunc(theta[0,0,:]) q_intfn, q_intfnargs = helpers.getintfunc(q[0,:,0]) #Do integrations s2=theta_intfn(src_integrand, **theta_intfnargs, axis=-1) #Do theta integration s3=q_intfn(s2, **q_intfnargs, axis=-1) #Do q integration source_logger.debug("Integration successful!") return s3
00e7f5b227f584d49b159a99fc18e3ff37916fe3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/00e7f5b227f584d49b159a99fc18e3ff37916fe3/sosource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17264, 552, 12, 81, 16, 290, 697, 16, 5780, 7884, 67, 6274, 16, 1705, 644, 33, 87, 821, 2693, 11254, 299, 1035, 4672, 3536, 990, 326, 31121, 1084, 2481, 622, 333, 27072, 18, 225, 16803...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17264, 552, 12, 81, 16, 290, 697, 16, 5780, 7884, 67, 6274, 16, 1705, 644, 33, 87, 821, 2693, 11254, 299, 1035, 4672, 3536, 990, 326, 31121, 1084, 2481, 622, 333, 27072, 18, 225, 16803...
self.testdata = orange.Filter_hasClassValue(data) self.testDataBtn.setEnabled(self.testdata <> None) if self.testdata:
if data is None: self.testdata = None else: self.testdata = orange.Filter_hasClassValue(data) self.testDataBtn.setEnabled(self.testdata is not None) if self.testdata is not None:
def setTestData(self, data): """handle test data set""" self.testdata = orange.Filter_hasClassValue(data) self.testDataBtn.setEnabled(self.testdata <> None) if self.testdata: if self.resampling == 4: if self.data: self.score([l.id for l in self.learners.values()]) else: for l in self.learners.values(): l.scores = [] self.paintscores() elif self.resampling == 4 and self.data: # test data removed, switch to testing on train data self.resampling = 3 self.recompute()
636bdb2b8502f34d9e2645a133fcf8685bf39218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/636bdb2b8502f34d9e2645a133fcf8685bf39218/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4709, 751, 12, 2890, 16, 501, 4672, 3536, 4110, 1842, 501, 444, 8395, 309, 501, 353, 599, 30, 365, 18, 3813, 892, 273, 599, 469, 30, 365, 18, 3813, 892, 273, 578, 726, 18, 1586,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4709, 751, 12, 2890, 16, 501, 4672, 3536, 4110, 1842, 501, 444, 8395, 309, 501, 353, 599, 30, 365, 18, 3813, 892, 273, 599, 469, 30, 365, 18, 3813, 892, 273, 578, 726, 18, 1586,...
def OnGoToURI(self, notification): wxTreeWindow = Globals.association[self.getUUID()] wxTreeWindow.GoToURI(notification.data['URI'])
def NeedsUpdate(self, notification): return True
def OnGoToURI(self, notification): wxTreeWindow = Globals.association[self.getUUID()] wxTreeWindow.GoToURI(notification.data['URI'])
9287e63e372ccc5efb65d33b97dc49a8f000ba71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/9287e63e372ccc5efb65d33b97dc49a8f000ba71/blocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 5741, 774, 3098, 12, 2890, 16, 3851, 4672, 7075, 2471, 3829, 273, 18901, 1031, 18, 19358, 63, 2890, 18, 588, 5562, 1435, 65, 7075, 2471, 3829, 18, 5741, 774, 3098, 12, 9927, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 5741, 774, 3098, 12, 2890, 16, 3851, 4672, 7075, 2471, 3829, 273, 18901, 1031, 18, 19358, 63, 2890, 18, 588, 5562, 1435, 65, 7075, 2471, 3829, 18, 5741, 774, 3098, 12, 9927, 18, ...
regVOs = GetListOfAllRegisteredVO(range_begin,range_end)
regVOs = GetListOfRegisteredVO('Active',range_begin,range_end)
def RangeSummup(range_end = datetime.date.today(), range_begin = None, output = "text", header = True): if not range_end: if not range_begin: range_end = datetime.date.today() else: range_end = range_begin + datetime.timedelta(days=+1) if not range_begin: range_begin = range_end + datetime.timedelta(days=-1)
33a4ca44cb79fb58546a509056a7bff882a73c25 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/33a4ca44cb79fb58546a509056a7bff882a73c25/AccountingReports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8086, 3495, 81, 416, 12, 3676, 67, 409, 273, 3314, 18, 712, 18, 30064, 9334, 1048, 67, 10086, 273, 599, 16, 876, 273, 315, 955, 3113, 1446, 273, 1053, 4672, 225, 309, 486, 1048, 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, 8086, 3495, 81, 416, 12, 3676, 67, 409, 273, 3314, 18, 712, 18, 30064, 9334, 1048, 67, 10086, 273, 599, 16, 876, 273, 315, 955, 3113, 1446, 273, 1053, 4672, 225, 309, 486, 1048, 67, ...
player.move(event.key) elif (((event.key == K_SPACE) or (event.key == K_f)) and (not player.special)):
player.move(event.key) elif (((event.key == K_f)) and (not player.special)):
def main(): pygame.init() size = width, height = 640, 480 screen = pygame.display.set_mode(size) attack = (pygame.image.load('images/player2_attack0.gif').convert() , pygame.image.load('images/player2_attack1.gif').convert() , pygame.image.load('images/player2_attack2.gif').convert() , pygame.image.load('images/player2_attack3.gif').convert() , pygame.image.load('images/player2_attack4.gif').convert() , pygame.image.load('images/player2_attack5.gif').convert() , pygame.image.load('images/player2_attack6.gif').convert()) defend = (pygame.image.load('images/player2_defend0.gif').convert() , pygame.image.load('images/player2_defend1.gif').convert() , pygame.image.load('images/player2_defend2.gif').convert() , pygame.image.load('images/player2_defend3.gif').convert() , pygame.image.load('images/player2_defend4.gif').convert() , pygame.image.load('images/player2_defend5.gif').convert()) fire = (pygame.image.load('images/player2_fire0.gif').convert() , pygame.image.load('images/player2_fire1.gif').convert() , pygame.image.load('images/player2_fire1.gif').convert()) ms = (pygame.image.load('images/player2_ms0.gif').convert() , pygame.image.load('images/player2_ms1.gif').convert() , pygame.image.load('images/player2_ms2.gif').convert() , pygame.image.load('images/player2_ms3.gif').convert() , pygame.image.load('images/player2_ms4.gif').convert() , pygame.image.load('images/player2_ms5.gif').convert() , pygame.image.load('images/player2_ms6.gif').convert() , pygame.image.load('images/player2_ms7.gif').convert() , pygame.image.load('images/player2_ms8.gif').convert()) background = pygame.image.load('images/background.bmp').convert() fireball = pygame.image.load('images/fireball.gif').convert() player = Player(pygame.image.load('images/player2.gif').convert(), defend , attack , fire, fireball, ms, size) del attack del defend del fire del ms offset = 0 current_lr = current_ud = "fubar" fireballs = [] while 1: for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() elif event.type == pygame.KEYDOWN: if (event.key == K_LEFT) or (event.key == K_RIGHT): current_lr = event.key player.move(event.key) elif (event.key == K_UP) or (event.key == K_DOWN): current_ud = event.key player.move(event.key) elif (((event.key == K_SPACE) or (event.key == K_f)) and (not player.special)): if player.mana > 19: player.fire(True) else: pass elif ((event.key == K_d) and (not player.special)): player.defend(True) elif ((event.key == K_a) and (not player.special)): player.attack(True) elif ((event.key == K_s) and (not player.special)): player.magic_shield(True) elif event.type == pygame.KEYUP: if(((event.key == K_LEFT) or (event.key == K_RIGHT)) and (current_lr == event.key)): player.stop_lr() elif(((event.key == K_UP) or (event.key == K_DOWN)) and (current_ud == event.key)): player.stop_ud() elif event.type == pygame.USEREVENT + 1: if not player.unattacking: player.attack(True) else: player.attack(False) elif event.type == pygame.USEREVENT + 2: if not player.undefending: player.defend(True) else: player.defend(False) elif event.type == pygame.USEREVENT + 3: if not player.firing: player.fire(False) elif player.firetime == 2: fireballs.append(player.fire(True)) else: player.fire(True) elif event.type == pygame.USEREVENT + 4: if not player.unmsing: player.magic_shield(True) else: player.magic_shield(False) player.refresh() if (player.pos.right >= (width * 5) / 8): offset -= 2 player.pos.right = (width * 5) / 8 - 1 for fireball in fireballs: fireball.speed = [3, 0] else: for fireball in fireballs: fireball.speed = [5, 0] if -offset > width: offset = 0 screen.blit(background, (offset, 0)) screen.blit(background, (offset + width, 0)) if pygame.font: font = pygame.font.Font(None, 36) texthp = font.render("Health: %s" % player.health , 1, (255, 255, 255)) textmp = font.render("Mana: %s" % player.mana, 1, (255, 255, 255)) textposhp = [0, 0] textposmp = [0, 20] screen.blit(texthp, textposhp) screen.blit(textmp, textposmp) for fireball in fireballs: fireball.refresh() screen.blit(fireball.image, fireball.pos) screen.blit(player.image, player.pos) pygame.display.flip() pygame.time.delay(5)
7ca9ba2251c8c3cc85e0c128dad0524226902875 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4608/7ca9ba2251c8c3cc85e0c128dad0524226902875/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2395, 13957, 18, 2738, 1435, 225, 963, 273, 1835, 16, 2072, 273, 5178, 20, 16, 1059, 3672, 5518, 273, 2395, 13957, 18, 5417, 18, 542, 67, 3188, 12, 1467, 13, 13843, 273, 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, 2774, 13332, 2395, 13957, 18, 2738, 1435, 225, 963, 273, 1835, 16, 2072, 273, 5178, 20, 16, 1059, 3672, 5518, 273, 2395, 13957, 18, 5417, 18, 542, 67, 3188, 12, 1467, 13, 13843, 273, 2...
from model.Line import Line
def _orient_for_modify(self, end1, end2): from model.Line import Line
c4a8d077f70d55111f7a19ce7efa485e92728f66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/c4a8d077f70d55111f7a19ce7efa485e92728f66/DnaDuplex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14766, 67, 1884, 67, 17042, 12, 2890, 16, 679, 21, 16, 679, 22, 4672, 628, 938, 18, 1670, 1930, 5377, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14766, 67, 1884, 67, 17042, 12, 2890, 16, 679, 21, 16, 679, 22, 4672, 628, 938, 18, 1670, 1930, 5377, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def openPreferences( self ) : pass def openAbout( self ) : pass
def openPreferences( self ) : pass
8f2a6d91b6a947b937eb5fc3b937af3797e21ac3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8f2a6d91b6a947b937eb5fc3b937af3797e21ac3/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12377, 12, 365, 262, 294, 1342, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12377, 12, 365, 262, 294, 1342, 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, -10...
for node in boundary: graph.add_edge(node,extra)
for vertex in boundary: graph.add_edge(vertex,extra)
def is_circular_planar(self, ordered=True): """ Returns True if a graph with boundary is circular planar, and False otherwise. A graph (with nonempty boundary) is circular planar if it has a planar embedding in which all boundary nodes can be drawn in order on a disc boundary, with all the interior nodes drawn inside the disc. Note -- This function assumes that the graph has nonempty boundary. (Circular Planarity has no definition for graphs without boundary). -- The current version relies on computing the genus of a slightly modified graph so it is time-expensive and not reasonable to use for graphs with > 12 vertices. -- Also since the current version relies on computing the genus, it is necessary that the graph be connected in order to use Euler's formula. INPUT: ordered -- whether or not to consider the order of the boundary (set ordered=False to see if there is any possible boundary order that will satisfy circular planarity) EXAMPLES: sage: g439 = Graph({1:[5,7], 2:[5,6], 3:[6,7], 4:[5,6,7]}) sage: g439.set_boundary([1,2,3,4]) sage.: g439.show(figsize=[2,2], vertex_labels=True, vertex_size=175) sage: g439.is_circular_planar() False sage: g439.set_boundary([1,2,3]) sage: g439.is_circular_planar() True Order matters: sage: K23 = graphs.CompleteBipartiteGraph(2,3) sage: K23.set_boundary([0,1,2,3]) sage: K23.is_circular_planar() False sage: K23.set_boundary([0,2,1,3]) # Diff Order! sage: K23.is_circular_planar() True sage: K23.is_circular_planar(ordered=False) True """ if not self.is_connected(): raise TypeError("Graph must be connected to use Euler's Formula to compute minimal genus.") from sage.rings.infinity import Infinity from sage.combinat.all import CyclicPermutationsOfPartition from sage.graphs.graph_genus1 import trace_faces, nice_copy
e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 4672, 3536, 2860, 1053, 309, 279, 2667, 598, 7679, 353, 15302, 4995, 297, 16, 471, 1083, 3541, 18, 225, 432, 2667, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 4672, 3536, 2860, 1053, 309, 279, 2667, 598, 7679, 353, 15302, 4995, 297, 16, 471, 1083, 3541, 18, 225, 432, 2667, 26...
return long(time.strftime("%Y%m%d%H%M%S"))
return long(time.strftime("%Y%m%d%H%M%S", time.gmtime(time.time())))
def _timestamp(): return long(time.strftime("%Y%m%d%H%M%S"))
df083dc7acac8eb240526ef048542cb656bc4ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/df083dc7acac8eb240526ef048542cb656bc4ae8/sqlite_drv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5508, 13332, 327, 1525, 12, 957, 18, 701, 9982, 27188, 61, 9, 81, 9, 72, 9, 44, 9, 49, 9, 55, 3113, 813, 18, 75, 10838, 12, 957, 18, 957, 1435, 20349, 225, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5508, 13332, 327, 1525, 12, 957, 18, 701, 9982, 27188, 61, 9, 81, 9, 72, 9, 44, 9, 49, 9, 55, 3113, 813, 18, 75, 10838, 12, 957, 18, 957, 1435, 20349, 225, 2, -100, -100, -1...
txt = new_doc.createTextNode(str(line[f] or ''))
col.text = line[f] or ''
def _append_node(name, text): n = new_doc.createElement(name) t = new_doc.createTextNode(text) n.appendChild(t) config.appendChild(n)
ce28b92c9e314579334271a58fcf4c5c65873e36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ce28b92c9e314579334271a58fcf4c5c65873e36/custom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 394, 67, 2434, 18, 2640, 1046, 12, 529, 13, 268, 273, 394, 67, 2434, 18, 2640, 17299, 12, 955, 13, 290, 18, 6923, 1763, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 394, 67, 2434, 18, 2640, 1046, 12, 529, 13, 268, 273, 394, 67, 2434, 18, 2640, 17299, 12, 955, 13, 290, 18, 6923, 1763, 12, 8...
sources = getAllCudaSources(options.directory) if options.clean: clean(sources) elif options.sanitize: sanitizeSources(sources)
sources = getAllCudaSources(options.directory, options.ptx) if options.ptx: compileSources(command, sources, True)
def main(): parser = OptionParser() parser.add_option("-d", "--directory", action="store", default=".", dest="directory", help="The directory to run on.") parser.add_option("-a", "--arguments", action="store", default="-I ~/checkout/thrust -I ./sdk", dest="arguments", help="NVCC options.") parser.add_option("-c", "--clean", action="store_true", dest="clean", default=False, help="Delete all .cu.cpp files.") parser.add_option("-s", "--sanitize", action="store_true", dest="sanitize", default=False, help="Only sanitize .cu.cpp files.") (options, args) = parser.parse_args() command = "nvcc --cuda " + options.arguments path = os.getcwd() sources = getAllCudaSources(options.directory) if options.clean: clean(sources) elif options.sanitize: sanitizeSources(sources) else: compileSources(command, sources) sanitizeSources(sources)
8579344898484acffcdc4147691215daf73a81b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5603/8579344898484acffcdc4147691215daf73a81b6/CompileCudaTests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 1435, 225, 2082, 18, 1289, 67, 3482, 2932, 17, 72, 3113, 5238, 5149, 3113, 1301, 1546, 2233, 3113, 805, 1546, 1199, 16, 1570, 1546, 5149, 3113, 2809, 1546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 1435, 225, 2082, 18, 1289, 67, 3482, 2932, 17, 72, 3113, 5238, 5149, 3113, 1301, 1546, 2233, 3113, 805, 1546, 1199, 16, 1570, 1546, 5149, 3113, 2809, 1546, ...
if 'END CRYSTAL' in record:
if 'END CRYSTAL ' in record:
def _parse_project(self, xinfo_file): '''Parse & validate the contents of the .xinfo file. This parses the project element (i.e. the whole thing..)'''
6ffb5b650d7622d6e049131a8377d82fc2539589 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/6ffb5b650d7622d6e049131a8377d82fc2539589/XInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 4406, 12, 2890, 16, 619, 1376, 67, 768, 4672, 9163, 3201, 473, 1954, 326, 2939, 434, 326, 263, 92, 1376, 585, 18, 1220, 8940, 326, 1984, 930, 261, 77, 18, 73, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 4406, 12, 2890, 16, 619, 1376, 67, 768, 4672, 9163, 3201, 473, 1954, 326, 2939, 434, 326, 263, 92, 1376, 585, 18, 1220, 8940, 326, 1984, 930, 261, 77, 18, 73, 18, 326,...
request.write(form_end % (_('Overview'), _('Create'),
request.write(form_end % (_('Create'), _('Overview'),
def sortShuffle(types): types = sorted(types) if 'gwikiinlinks' in types: types.remove('gwikiinlinks') types.insert(0, 'gwikiinlinks') if 'gwikicategory' in types: types.remove('gwikicategory') types.insert(0, 'gwikicategory') return types
ef6bf994c6bdd03397ee86adcd873ba3f9f69b50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/ef6bf994c6bdd03397ee86adcd873ba3f9f69b50/ShowGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 1555, 10148, 12, 2352, 4672, 1953, 273, 3115, 12, 2352, 13, 309, 296, 75, 13044, 267, 7135, 11, 316, 1953, 30, 1953, 18, 4479, 2668, 75, 13044, 267, 7135, 6134, 1953, 18, 6387, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 1555, 10148, 12, 2352, 4672, 1953, 273, 3115, 12, 2352, 13, 309, 296, 75, 13044, 267, 7135, 11, 316, 1953, 30, 1953, 18, 4479, 2668, 75, 13044, 267, 7135, 6134, 1953, 18, 6387, 1...
raise TypeError, "Not a valid Rubik's move: %s" % mv
return G(mv)
def parse(self, mv): """ This function allows one to create the permutation group element from a variety of formats. INPUT: one of the following list -- list of facets (as returned by self.facets()) dict -- list of faces (as returned by self.faces()) str -- either cycle notation (passed to GAP) or a product of generators or Singmaster notation perm_group element -- returned as an element of self.group() EXAMPLES: sage: C = CubeGroup() sage: C.parse(range(1,49)) () sage: g = C.parse("L"); g (1,17,41,40)(4,20,44,37)(6,22,46,35)(9,11,16,14)(10,13,15,12) sage: C.parse(str(g)) == g True sage: facets = C.facets(g); facets [17, 2, 3, 20, 5, 22, 7, 8, 11, 13, 16, 10, 15, 9, 12, 14, 41, 18, 19, 44, 21, 46, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 6, 36, 4, 38, 39, 1, 40, 42, 43, 37, 45, 35, 47, 48] sage: C.parse(facets) (1,17,41,40)(4,20,44,37)(6,22,46,35)(9,11,16,14)(10,13,15,12) sage: C.parse(facets) == g True sage: faces = C.faces("L"); faces {'right': [[25, 26, 27], [28, 0, 29], [30, 31, 32]], 'up': [[17, 2, 3], [20, 0, 5], [22, 7, 8]], 'back': [[33, 34, 6], [36, 0, 4], [38, 39, 1]], 'down': [[40, 42, 43], [37, 0, 45], [35, 47, 48]], 'front': [[41, 18, 19], [44, 0, 21], [46, 23, 24]], 'left': [[11, 13, 16], [10, 0, 15], [9, 12, 14]]} sage: C.parse(faces) == C.parse("L") True sage: C.parse("L' R2") == C.parse("L^(-1)*R^2") True sage: C.parse("L' R2") (1,40,41,17)(3,43)(4,37,44,20)(5,45)(6,35,46,22)(8,48)(9,14,16,11)(10,12,15,13)(19,38)(21,36)(24,33)(25,32)(26,31)(27,30)(28,29) sage: C.parse("L^4") () sage: C.parse("L^(-1)*R") (1,40,41,17)(3,38,43,19)(4,37,44,20)(5,36,45,21)(6,35,46,22)(8,33,48,24)(9,14,16,11)(10,12,15,13)(25,27,32,30)(26,29,31,28) """ G = self.group() if isinstance(mv, PermutationGroupElement): # mv is a perm_group element, return mv return mv if mv.parent() is G else G(mv) elif isinstance(mv, str): # It is a string: may be in cycle notation or rubik's notation if '(' in mv and not '^' in mv: return G(mv) else: gens = G.gens() names = self.gen_names() map = {} for i in range(6): map[names[i]] = gens[i] g = G(1) mv = mv.strip().replace(" ","*").replace("**", "*").replace("'", "-1").replace('^','').replace('(','').replace(')','') M = mv.split("*") for m in M: if len(m) == 1: g *= map[m[0]] else: g *= map[m[0]]**int(m[1:]) return g elif isinstance(mv, dict): state = mv state_facets = [] keyss = state.keys() keyss.sort() for k in keyss: r = state[k][0]+state[k][1]+state[k][2] r.remove(0) state_facets = state_facets + r state0 = self.faces("") state0_facets = [] keyss = state0.keys() keyss.sort() for k in keyss: r = state0[k][0]+state0[k][1]+state0[k][2] r.remove(0) state0_facets = state0_facets + r p1 = [state0_facets.index(x) for x in range(1,49)] p2 = [state_facets[j] for j in p1] return G(p2) elif isinstance(mv, list): return G(mv) else: raise TypeError, "Not a valid Rubik's move: %s" % mv
ec7f2353d5f3404d448b1713a40a91d345a6d70b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ec7f2353d5f3404d448b1713a40a91d345a6d70b/cubegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 7701, 4672, 3536, 1220, 445, 5360, 1245, 358, 752, 326, 17440, 1041, 930, 628, 279, 1394, 14369, 434, 6449, 18, 225, 12943, 30, 1245, 434, 326, 3751, 666, 1493, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 7701, 4672, 3536, 1220, 445, 5360, 1245, 358, 752, 326, 17440, 1041, 930, 628, 279, 1394, 14369, 434, 6449, 18, 225, 12943, 30, 1245, 434, 326, 3751, 666, 1493, 666, ...
print "length:", print length
def process_EmbeddedInfo(self, name): if ( name == 'embedded_data' ): # can't index into the data with a long - have to make it # an int. length = int(self.unpack('L', self.data[self.index:self.index+4])[0]) self.index = self.index + 4 print "length:", print length if ( name == 'embedded_data_byte' ): length = int(self.unpack('B', self.data[self.index:self.index+1])[0]) self.index = self.index + 1
fd458bd1345d2ff27e2bd3d95eeee43a8c7e1529 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/fd458bd1345d2ff27e2bd3d95eeee43a8c7e1529/pxldis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 14980, 966, 12, 2890, 16, 508, 4672, 309, 261, 508, 422, 296, 20722, 67, 892, 11, 262, 30, 468, 848, 1404, 770, 1368, 326, 501, 598, 279, 1525, 300, 1240, 358, 1221, 518, 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, 1207, 67, 14980, 966, 12, 2890, 16, 508, 4672, 309, 261, 508, 422, 296, 20722, 67, 892, 11, 262, 30, 468, 848, 1404, 770, 1368, 326, 501, 598, 279, 1525, 300, 1240, 358, 1221, 518, 4...
None, [cty.c_int, cty.c_int],
None, [cty.c_int, cty.c_int],
def fl_set_oneliner_color(p1, p2): """ fl_set_oneliner_color(p1, p2) """ _fl_set_oneliner_color(p1, p2)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 265, 292, 14522, 67, 3266, 12, 84, 21, 16, 293, 22, 4672, 3536, 1183, 67, 542, 67, 265, 292, 14522, 67, 3266, 12, 84, 21, 16, 293, 22, 13, 3536, 225, 389, 2242, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 265, 292, 14522, 67, 3266, 12, 84, 21, 16, 293, 22, 4672, 3536, 1183, 67, 542, 67, 265, 292, 14522, 67, 3266, 12, 84, 21, 16, 293, 22, 13, 3536, 225, 389, 2242, ...
if (mode == FULL) { dim_zz[0] = (int)ceil((dim_im[0]+dim_ker[0]-1)/float(%(self_dx)s)); dim_zz[1] = (int)ceil((dim_im[1]+dim_ker[1]-1)/float(%(self_dy)s)); } else { dim_zz[0] = (int)ceil((dim_im[0]-dim_ker[0]+1)/float(%(self_dx)s)); dim_zz[1] = (int)ceil((dim_im[1]-dim_ker[1]+1)/float(%(self_dy)s)); }
%(dim_zz_affect)s
def my_dup2(st): s="" iter=0 for i in range(unroll_bsize): d["unroll_biter"]=i for j in range(unroll_ksize): d["unroll_kiter"]=j d["unroll_iter"]=iter iter+=1 s+=st%d return s+"\n"
2d6a463457b2da206ccf4d481e2dc6c17a36f79a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/2d6a463457b2da206ccf4d481e2dc6c17a36f79a/conv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 26427, 22, 12, 334, 4672, 272, 1546, 6, 1400, 33, 20, 364, 277, 316, 1048, 12, 318, 2693, 67, 70, 1467, 4672, 302, 9614, 318, 2693, 67, 70, 2165, 11929, 33, 77, 364, 525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 26427, 22, 12, 334, 4672, 272, 1546, 6, 1400, 33, 20, 364, 277, 316, 1048, 12, 318, 2693, 67, 70, 1467, 4672, 302, 9614, 318, 2693, 67, 70, 2165, 11929, 33, 77, 364, 525, ...
border_x = 30 self.sea_area = (border_x , 30, gcompris.BOARD_WIDTH-border_x , 350)
self.border_x = 30 self.sea_area = (self.border_x , 30, gcompris.BOARD_WIDTH-self.border_x , 350)
def __init__(self, gcomprisBoard): self.gcomprisBoard = gcomprisBoard
4207120a2f0aef7ad38ebe5159360a72adcf3364 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/4207120a2f0aef7ad38ebe5159360a72adcf3364/searace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 832, 683, 291, 22233, 4672, 365, 18, 75, 832, 683, 291, 22233, 273, 314, 832, 683, 291, 22233, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 832, 683, 291, 22233, 4672, 365, 18, 75, 832, 683, 291, 22233, 273, 314, 832, 683, 291, 22233, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print "<H3>Shell environment:</H3>"
print "<H3>Shell Environment:</H3>"
def print_environ(): """Dump the shell environment as HTML.""" keys = environ.keys() keys.sort() print print "<H3>Shell environment:</H3>" print "<DL>" for key in keys: print "<DT>", escape(key), "<DD>", escape(environ[key]) print "</DL>" print
0d26876f7028b8e7829e651e18a2f2aa5b85c478 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d26876f7028b8e7829e651e18a2f2aa5b85c478/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 28684, 13332, 3536, 10628, 326, 5972, 3330, 487, 3982, 12123, 1311, 273, 5473, 18, 2452, 1435, 1311, 18, 3804, 1435, 1172, 1172, 3532, 44, 23, 34, 13220, 7518, 19814, 44, 23, 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, 1172, 67, 28684, 13332, 3536, 10628, 326, 5972, 3330, 487, 3982, 12123, 1311, 273, 5473, 18, 2452, 1435, 1311, 18, 3804, 1435, 1172, 1172, 3532, 44, 23, 34, 13220, 7518, 19814, 44, 23, 2...
self.linesearch_stop_code = None
def reset(self): self.linesearch_stop_code = None self.cur_num_steps = -1 super(gd_linesearch_update, self).reset()
0ba80740ba1ae1f95289a79fc05208c58ebe6f01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9024/0ba80740ba1ae1f95289a79fc05208c58ebe6f01/parameter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 365, 18, 1397, 67, 2107, 67, 8986, 3639, 273, 300, 21, 2240, 12, 19016, 67, 3548, 73, 991, 67, 2725, 16, 365, 2934, 6208, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 365, 18, 1397, 67, 2107, 67, 8986, 3639, 273, 300, 21, 2240, 12, 19016, 67, 3548, 73, 991, 67, 2725, 16, 365, 2934, 6208, 1435, 2, -100, -100, -100, -100, -100, ...
return self._image.save(filename)
if not format: format = os.path.splitext(filename)[1][1:] return self._image.save(filename, format)
def save(self, filename, format = None): """ Saves the image to a file.
5206afce53e165cc9905e65922832c8a70452531 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5206afce53e165cc9905e65922832c8a70452531/Imlib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 16, 740, 273, 599, 4672, 3536, 348, 6606, 326, 1316, 358, 279, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 16, 740, 273, 599, 4672, 3536, 348, 6606, 326, 1316, 358, 279, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print '(%d)' % rotation
def look_down(buffer, parent_bbox): for child in node.iterchildren(): _scan(child, buffer, parent_bbox, page_size, rotation) if node.tail and node.tail.strip(): buffer.append(node.tail) if node.text and node.text.strip(): buffer.append(node.text)
30f6d08a28953c9e0326904c0aa6b020ee0dd266 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3685/30f6d08a28953c9e0326904c0aa6b020ee0dd266/hocr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2324, 67, 2378, 12, 4106, 16, 982, 67, 20737, 4672, 364, 1151, 316, 756, 18, 2165, 5906, 13332, 389, 9871, 12, 3624, 16, 1613, 16, 982, 67, 20737, 16, 1363, 67, 1467, 16, 6752, 13, 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, 2324, 67, 2378, 12, 4106, 16, 982, 67, 20737, 4672, 364, 1151, 316, 756, 18, 2165, 5906, 13332, 389, 9871, 12, 3624, 16, 1613, 16, 982, 67, 20737, 16, 1363, 67, 1467, 16, 6752, 13, 3...
self.tk.call((self._w, 'yview') + what)
self.tk.call((self._w, 'yview') + args) def yview_moveto(self, fraction): """Adjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.""" self.tk.call(self._w, 'yview', 'moveto', fraction) def yview_scroll(self, number, what): """Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).""" self.tk.call(self._w, 'yview', 'scroll', number, what)
def yview(self, *what): """Query and change vertical position of the view.""" if not what: return self._getdoubles(self.tk.call(self._w, 'yview')) self.tk.call((self._w, 'yview') + what)
f22ed0a21188a02a1ed8f474529824e96ad0bdde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f22ed0a21188a02a1ed8f474529824e96ad0bdde/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 1945, 12, 2890, 16, 380, 23770, 4672, 3536, 1138, 471, 2549, 9768, 1754, 434, 326, 1476, 12123, 309, 486, 4121, 30, 327, 365, 6315, 588, 2896, 19314, 12, 2890, 18, 16099, 18, 1991, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 1945, 12, 2890, 16, 380, 23770, 4672, 3536, 1138, 471, 2549, 9768, 1754, 434, 326, 1476, 12123, 309, 486, 4121, 30, 327, 365, 6315, 588, 2896, 19314, 12, 2890, 18, 16099, 18, 1991, ...
self.task_tview.set_rules_hint(True)
self.task_tview.set_rules_hint(False)
def __create_task_tview(self):
def1aab0d3dcdc8aaf97759fa7d56e680d522bce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/def1aab0d3dcdc8aaf97759fa7d56e680d522bce/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 4146, 67, 88, 1945, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 4146, 67, 88, 1945, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
x = x.split(".")
x = [k[:63] for k in x.split(".")]
def i2m(self, pkt, x): x = x.split(".") x = map(lambda y: chr(len(y))+y, x) x = "".join(x) if x[-1] != "\x00": x += "\x00" return x
ef91f7ad0d26f2dfc259168d4afd9a0b519f6ebc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7311/ef91f7ad0d26f2dfc259168d4afd9a0b519f6ebc/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 22, 81, 12, 2890, 16, 11536, 16, 619, 4672, 619, 273, 306, 79, 10531, 4449, 65, 364, 417, 316, 619, 18, 4939, 2932, 1199, 25887, 619, 273, 852, 12, 14661, 677, 30, 4513, 12, 189...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 22, 81, 12, 2890, 16, 11536, 16, 619, 4672, 619, 273, 306, 79, 10531, 4449, 65, 364, 417, 316, 619, 18, 4939, 2932, 1199, 25887, 619, 273, 852, 12, 14661, 677, 30, 4513, 12, 189...
self.featureManager = QTabWidget()
self.featureManager = _FeatureManager()
def __init__(self, assy, parent): QWidget.__init__(self, parent) self.parent = parent self.setWindowTitle("My Part Window")
9c7bd041713d5ae509816d28fbae8d2558a67900 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9c7bd041713d5ae509816d28fbae8d2558a67900/Ui_PartWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 982, 4672, 2238, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 13, 365, 18, 2938, 273, 982, 365, 18, 542, 3829, 4247, 2932, 12062, 6393, 6076,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 982, 4672, 2238, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 13, 365, 18, 2938, 273, 982, 365, 18, 542, 3829, 4247, 2932, 12062, 6393, 6076,...
positions = [ ]
def buildChunk(self): length = self.length maxLen = 1.2 * Chirality.BONDLENGTH maxLenSq = maxLen ** 2 positions = [ ] # populate the tube with some extra carbons on the ends # so that we can trim them later self.chirality.populate(self.mol, length + 3 * maxLen, positions)
a014b782c4206ea85dd6e9654a3e0dbd08350574 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a014b782c4206ea85dd6e9654a3e0dbd08350574/NanotubeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 5579, 12, 2890, 4672, 769, 273, 365, 18, 2469, 29618, 273, 404, 18, 22, 380, 1680, 481, 7919, 18, 38, 673, 40, 7096, 29618, 19643, 273, 29618, 2826, 576, 468, 6490, 326, 25943, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 5579, 12, 2890, 4672, 769, 273, 365, 18, 2469, 29618, 273, 404, 18, 22, 380, 1680, 481, 7919, 18, 38, 673, 40, 7096, 29618, 19643, 273, 29618, 2826, 576, 468, 6490, 326, 25943, 5...
res2 = self.get_credit_debit(cursor, user, ids, names, arg,
res2 = self.get_credit_debit(cursor, user, ids, names,
def get_credit_debit(self, cursor, user, ids, names, context=None): ''' Function to compute debit, credit for account ids.
753e883a133b79d507b1e81030424c9bf4cf5462 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9290/753e883a133b79d507b1e81030424c9bf4cf5462/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 20688, 67, 323, 3682, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 1257, 16, 819, 33, 7036, 4672, 9163, 4284, 358, 3671, 443, 3682, 16, 12896, 364, 2236, 3258, 18, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 20688, 67, 323, 3682, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 1257, 16, 819, 33, 7036, 4672, 9163, 4284, 358, 3671, 443, 3682, 16, 12896, 364, 2236, 3258, 18, 2, -100, -1...
'Description':"An arbitrary comment describing this file. e.g. \"generated Big Bang Search v0.1a. with fftw v12.2.4\". (quotes on command line are necessary)", 'Requirements':None
'Description':"An arbitrary comment describing this file. e.g. \"generated Big Bang Search v0.1a. with fftw v16.2.4 alpha\". (quotes on command line are necessary)", 'Test_method':None
def __init__(self): self.attr = {
2aeab4d32c1031c6a6ce70b32191fd63e5b6158c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/2aeab4d32c1031c6a6ce70b32191fd63e5b6158c/LSCfileAdd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1747, 273, 288, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1747, 273, 288, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'linestatement_begin': [ (c(r'\s*(\n|$)'), 'linestatement_end', '
TOKEN_LINESTATEMENT_BEGIN: [ (c(r'\s*(\n|$)'), TOKEN_LINESTATEMENT_END, '
def __init__(self, environment): # shortcuts c = lambda x: re.compile(x, re.M | re.S) e = re.escape
b3b5802349723ab864cc3531ac9b72a230cb841e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14446/b3b5802349723ab864cc3531ac9b72a230cb841e/lexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3330, 4672, 468, 25641, 276, 273, 3195, 619, 30, 283, 18, 11100, 12, 92, 16, 283, 18, 49, 571, 283, 18, 55, 13, 425, 273, 283, 18, 6939, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3330, 4672, 468, 25641, 276, 273, 3195, 619, 30, 283, 18, 11100, 12, 92, 16, 283, 18, 49, 571, 283, 18, 55, 13, 425, 273, 283, 18, 6939, 2, -100, -10...
newheads.append(r) if len(newheads) > len(remote_heads): warn = 1 if warn: self.ui.warn(_("abort: push creates new remote heads!\n")) self.ui.status(_("(did you forget to merge?" " use push -f to force)\n")) return None, 0 elif inc:
for n in heads: branch = self[n].branch() if branch in localhds: localhds[branch].append(n) else: localhds[branch] = [n] remotehds = remote.branchmap() for lh in localhds: if lh in remotehds: rheads = remotehds[lh] else: rheads = [] lheads = localhds[lh] updatelh = [upd for upd in update if self[upd].branch() == lh] if not updatelh: continue if not checkbranch(lheads, rheads, updatelh): return None, 0 else: if not checkbranch(heads, remote_heads, update): return None, 0 if inc:
def prepush(self, remote, force, revs): common = {} remote_heads = remote.heads() inc = self.findincoming(remote, common, remote_heads, force=force)
8c34dedeca1404255523ea8d8dcf63bc83266e8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/8c34dedeca1404255523ea8d8dcf63bc83266e8b/localrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 6206, 12, 2890, 16, 2632, 16, 2944, 16, 5588, 87, 4672, 2975, 273, 2618, 2632, 67, 20263, 273, 2632, 18, 20263, 1435, 7290, 273, 365, 18, 4720, 31033, 12, 7222, 16, 2975, 16, 2632...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 6206, 12, 2890, 16, 2632, 16, 2944, 16, 5588, 87, 4672, 2975, 273, 2618, 2632, 67, 20263, 273, 2632, 18, 20263, 1435, 7290, 273, 365, 18, 4720, 31033, 12, 7222, 16, 2975, 16, 2632...
self._nframes == self._nframeswritten:
self._nframes == self._nframeswritten and \ self._marklength == 0:
def _patchheader(self): curpos = self._file.tell() if self._datawritten & 1: datalength = self._datawritten + 1 self._file.write(chr(0)) else: datalength = self._datawritten if datalength == self._datalength and \ self._nframes == self._nframeswritten: self._file.seek(curpos, 0) return self._file.seek(self._form_length_pos, 0) dummy = self._write_form_length(datalength) self._file.seek(self._nframes_pos, 0) _write_long(self._file, self._nframeswritten) self._file.seek(self._ssnd_length_pos, 0) _write_long(self._file, datalength + 8) self._file.seek(curpos, 0) self._nframes = self._nframeswritten self._datalength = datalength
0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0485f1945fdf9b50deeb5fdd34ce2554f8c00a6a/aifc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2272, 3374, 12, 2890, 4672, 662, 917, 273, 365, 6315, 768, 18, 88, 1165, 1435, 309, 365, 6315, 892, 9748, 473, 404, 30, 18462, 1288, 273, 365, 6315, 892, 9748, 397, 404, 365, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2272, 3374, 12, 2890, 4672, 662, 917, 273, 365, 6315, 768, 18, 88, 1165, 1435, 309, 365, 6315, 892, 9748, 473, 404, 30, 18462, 1288, 273, 365, 6315, 892, 9748, 397, 404, 365, 6315...
if field[len(prefix)] == "id": db_id = False is_xml_id = data_id = line[i]
if field[len(prefix)] == "id": db_id = False is_xml_id = data_id = line[i]
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if prefix and not prefix[0] in field: continue if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':db_id'): # Database ID res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) if len(res_id): res = [(6, 0, res_id)] else: try: _check_db_id(self, model_rel, line[i]) res = line[i] except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) row[field_name] = res or False continue
19c6bf3cbf9c418ef8f4c3664582e8a20fbf6749 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/19c6bf3cbf9c418ef8f4c3664582e8a20fbf6749/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
Checks for possibly invalid markup that may leak into the output
Checks for possibly invalid markup that may leak into the output.
def __init__(self, docname, lineno, issue, line): "A rule for ignoring issues" self.docname = docname # document to which this rule applies self.lineno = lineno # line number in the original source; # this rule matches only near that. # None -> don't care self.issue = issue # the markup fragment that triggered this rule self.line = line # text of the container element (single line only)
26db6f52a4d611d456e2e3c7c8b3f04177438954 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/26db6f52a4d611d456e2e3c7c8b3f04177438954/suspicious.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 997, 529, 16, 7586, 16, 5672, 16, 980, 4672, 315, 37, 1720, 364, 14398, 8296, 6, 365, 18, 2434, 529, 273, 997, 529, 468, 1668, 358, 1492, 333, 1720, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 997, 529, 16, 7586, 16, 5672, 16, 980, 4672, 315, 37, 1720, 364, 14398, 8296, 6, 365, 18, 2434, 529, 273, 997, 529, 468, 1668, 358, 1492, 333, 1720, 10...
"""Export people to text archive.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Export...')) menu.AppendItem(menuItem) self.title = _("Export People") def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) path = balt.askSave(self.gTank,_('Export people to text file:'),textDir, 'People.txt', '*.txt') if not path: return settings['bash.workDir'] = path.head self.data.dumpText(path,self.selected) balt.showInfo(self.gTank,_('Records exported: %d.') % (len(self.selected),),self.title)
"""Export people to text archive.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Export...')) menu.AppendItem(menuItem) self.title = _("Export People") def Execute(self,event): textDir = settings.get('bash.workDir',bosh.dirs['app']) path = balt.askSave(self.gTank,_('Export people to text file:'),textDir, 'People.txt', '*.txt') if not path: return settings['bash.workDir'] = path.head self.data.dumpText(path,self.selected) balt.showInfo(self.gTank,_('Records exported: %d.') % (len(self.selected),),self.title)
def Execute(self,event): name = balt.askText(self.gTank,_("Add new person:"),self.title) if not name: return if name in self.data: return balt.showInfo(self.gTank,name+_(" already exists."),self.title) self.data[name] = (time.time(),0,'') self.gTank.RefreshUI(details=name) self.gTank.gList.EnsureVisible(self.gTank.GetIndex(name)) self.data.setChanged()
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 508, 273, 324, 2390, 18, 835, 1528, 12, 2890, 18, 75, 56, 2304, 16, 67, 2932, 986, 394, 6175, 2773, 3631, 2890, 18, 2649, 13, 309, 486, 508, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 508, 273, 324, 2390, 18, 835, 1528, 12, 2890, 18, 75, 56, 2304, 16, 67, 2932, 986, 394, 6175, 2773, 3631, 2890, 18, 2649, 13, 309, 486, 508, 30, 327, ...
sage: SR(i + 1).numerical_approximation(32)
sage: (i + 1).numerical_approx(32)
def numerical_approximation(self, prec=53): """ Get a numerical approximation of self as either a real or complex number.
c5dbe9df4676ad73f68dc7246893634da17edb83 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c5dbe9df4676ad73f68dc7246893634da17edb83/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -10...
self.dom = xml.dom.minidom.parse(xmlf)
self.dom = xml.dom.minidom.parse(xmlf)
def __init__(self,xmlfile=''): """ PoolXMLCatalog constructor. Constructor takes one of the following argument types: xml string; list of xml strings; file name; list of file names """ self.files = {} self.backend_file = None # Get the dom representation of the catalog if xmlfile: if type(xmlfile) == list: for xmlf in xmlfile: try: sfile = file(xmlf,'r') self.dom = xml.dom.minidom.parse(xmlf) except: self.dom = xml.dom.minidom.parseString(xmlf)
15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/15bf7dd6204f2cdb3b3b2146d62e93fe210c8af4/PoolXMLCatalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2902, 768, 2218, 11, 4672, 3536, 8828, 4201, 9769, 3885, 18, 225, 11417, 5530, 1245, 434, 326, 3751, 1237, 1953, 30, 2025, 533, 31, 666, 434, 2025, 2064, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2902, 768, 2218, 11, 4672, 3536, 8828, 4201, 9769, 3885, 18, 225, 11417, 5530, 1245, 434, 326, 3751, 1237, 1953, 30, 2025, 533, 31, 666, 434, 2025, 2064, ...
return select.select( readSeq , [], [] )[0]
return select.select( validList , [], [] )[0]
def __selectFD( self, readSeq, timeout = False ): if self.timeout and not timeout: timeout = self.timeout if not timeout: return select.select( readSeq , [], [] )[0] else: return select.select( readSeq , [], [], timeout )[0]
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, 4025, 16894, 12, 365, 16, 855, 6926, 16, 2021, 273, 1083, 262, 30, 309, 365, 18, 4538, 471, 486, 2021, 30, 2021, 273, 365, 18, 4538, 309, 486, 2021, 30, 327, 2027, 18, 4025, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4025, 16894, 12, 365, 16, 855, 6926, 16, 2021, 273, 1083, 262, 30, 309, 365, 18, 4538, 471, 486, 2021, 30, 2021, 273, 365, 18, 4538, 309, 486, 2021, 30, 327, 2027, 18, 4025, 12...
if os.access("%s/%s" % (curdir, os.path.basename(varvalue)), \ os.R_OK|os.F_OK): try: repl_file_val = \ open("%s/%s" \ % (curdir, os.path.basename(varvalue)), \ "r").readlines() except IOError: register_exception(req=user_info['req'])
if varvalue.upper().find("FILE:") == 0: seekvalue_fname = varvalue[5:].strip() seekvalue_fname = os.path.basename(seekvalue_fname).strip() if seekvalue_fname != "": if os.access("%s/%s" % (curdir, seekvalue_fname), \ os.R_OK|os.F_OK): try: repl_file_val = \ open("%s/%s" \ % (curdir, seekvalue_fname), "r").readlines() except IOError: err_msg = "Error in Stamp_Uploaded_Files: The " \ "function attempted to read a LaTex " \ "template variable value from the " \ "following file in the current " \ "submission's working directory: " \ "[%s]. However, an unexpected error " \ "was encountered when doing so. " \ "Please inform the administrator." \ % seekvalue_fname register_exception(req=user_info['req']) raise InvenioWebSubmitFunctionError(err_msg) else: final_varval = "" for line in repl_file_val: final_varval += line final_varval = final_varval.rstrip() latex_template_vars[varname] = final_varval else: latex_template_vars[varname] = ""
def Stamp_Uploaded_Files(parameters, curdir, form, user_info=None): """Stamp certain files that have been uploaded during a submission. @param parameters: (dictionary) - must contain: + latex_template: (string) - the name of the LaTeX template that should be used for the creation of the stamp. + latex_template_vars: (string) - a string-ified dictionary of variables to be replaced in the LaTeX template and the values (or names of files in curdir containing the values) with which to replace them. E.G.: { 'TITLE' : 'DEMOTHESIS_TITLE', 'DATE' : 'DEMOTHESIS_DATE' } + files_to_be_stamped: (string) - The directories in which files should be stamped: This is a comma-separated list of directory names. E.g.: DEMOTHESIS_MAIN,DEMOTHESIS_ADDITIONAL + stamp: (string) - the type of stamp to be applied to the files. should be one of: + first (only the first page is stamped); + all (all pages are stamped); + coverpage (a separate cover-page is added to the file as a first page); If all goes according to plan, for each directory in which files are to be stamped, the original, unstamped files should be found in a directory 'files_before_stamping/DIRNAME', and the stamped versions should be found under 'files/DIRNAME'. E.g., for DEMOTHESIS_Main: - Unstamped: files_before_stamping/DEMOTHESIS_Main - Stamped: files/DEMOTHESIS_Main """ ## The file stamper needs to be called with a dictionary of options of ## the following format: ## { 'latex-template' : "", ## TEMPLATE_NAME ## 'latex-template-var' : {}, ## TEMPLATE VARIABLES ## 'input-file' : "", ## INPUT FILE ## 'output-file' : "", ## OUTPUT FILE ## 'stamp' : "", ## STAMP TYPE ## 'verbosity' : 0, ## VERBOSITY (we don't care about it) ## } file_stamper_options = { 'latex-template' : "", 'latex-template-var' : { }, 'input-file' : "", 'output-file' : "", 'stamp' : "", 'verbosity' : 0, } ## A dictionary of arguments to be passed to visit_for_stamping: visit_for_stamping_arguments = { 'curdir' : curdir, 'file_stamper_options' : \ file_stamper_options, 'user_info' : user_info } ## Start by getting the parameter-values from WebSubmit: ## The name of the LaTeX template to be used for stamp creation: latex_template = "%s" % ((type(parameters['latex_template']) is str \ and parameters['latex_template']) or "") ## A string containing the variables/values that should be substituted ## in the final (working) LaTeX template: latex_template_vars_string = "%s" % \ ((type(parameters['latex_template_vars']) is str \ and parameters['latex_template_vars']) or "") ## The type of stamp to be applied to the file(s): stamp = "%s" % ((type(parameters['stamp']) is str and \ parameters['stamp'].lower()) or "") ## The directories in which files should be stamped: ## This is a comma-separated list of directory names. E.g.: ## DEMOTHESIS_MAIN,DEMOTHESIS_ADDITIONAL stamp_content_of = "%s" % ((type(parameters['files_to_be_stamped']) \ is str and parameters['files_to_be_stamped']) \ or "") ## Now split the list (of directories in which to stamp files) on commas: if stamp_content_of.strip() != "": stamping_locations = stamp_content_of.split(",") else: stamping_locations = [] if len(stamping_locations) == 0: ## If there are no items to be stamped, don't continue: return "" ## Strip the LaTeX filename into the basename (All templates should be ## in the template repository): latex_template = os.path.basename(latex_template) ## Convert the string of latex template variables into a dictionary ## of search-term/replacement-term pairs: latex_template_vars = get_dictionary_from_string(latex_template_vars_string) ## For each of the latex variables, check in `CURDIR' for a file with that ## name. If found, use it's contents as the template-variable's value. ## If not, just use the raw value string already held by the template ## variable: latex_template_varnames = latex_template_vars.keys() for varname in latex_template_varnames: ## Get this variable's value: varvalue = latex_template_vars[varname].strip() if not ((varvalue.find("date(") == 0 and varvalue[-1] == ")") or \ (varvalue.find("include(") == 0 and varvalue[-1] == ")")) \ and varvalue != "": ## We don't want to interfere with date() or include() directives, ## so we only do this if the variable value didn't contain them: if os.access("%s/%s" % (curdir, os.path.basename(varvalue)), \ os.R_OK|os.F_OK): ## The template variable's value is a file in `CURDIR'. ## Attempt to use the information contained within it: try: repl_file_val = \ open("%s/%s" \ % (curdir, os.path.basename(varvalue)), \ "r").readlines() except IOError: ## If we can't read the file, don't do anything about it; ## Keep the original value for the variable. register_exception(req=user_info['req']) else: final_varval = "" for line in repl_file_val: final_varval += line final_varval = final_varval.rstrip() ## Replace the variable value with that which has been ## read from the file: latex_template_vars[varname] = final_varval ## Put the 'fixed' values into the file_stamper_options dictionary: file_stamper_options['latex-template'] = latex_template file_stamper_options['latex-template-var'] = latex_template_vars file_stamper_options['stamp'] = stamp for stampdir in stamping_locations: ## Create the full path to the stamp directory - it is considered ## to be under 'curdir' - the working directory for the current ## submission: path_to_stampdir = "%s/files/%s" % (curdir, stampdir.strip()) ## Call os.path.walk, passing it the path to the directory to be ## walked, the visit_for_stamping function (which will call the ## file-stamper for each file within that directory), and the ## dictionary of options to be passed to the file-stamper: try: os.path.walk(path_to_stampdir, \ visit_for_stamping, \ visit_for_stamping_arguments) except InvenioWebSubmitFunctionWarning: ## Unable to stamp the files in stampdir. Register the exception ## and continue to try to stamp the files in the other stampdirs: ## FIXME - The original exception was registered in 'visit'. ## Perhaps we should just send the message contained in this ## warning to the admin? register_exception(req=user_info['req']) continue except InvenioWebSubmitFunctionError, err: ## Unexpected error in stamping. The admin should be contacted ## because it has resulted in an unstable situation with the ## files. They are no longer in a well-defined state - some may ## have been lost and manual intervention by the admin is needed. ## FIXME - should this be reported here, or since we propagate it ## up to websubmit_engine anyway, should we let it register it? register_exception(req=user_info['req']) raise err return ""
cbf09564d0d9c9de75f7186de907eac980c3b7a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/cbf09564d0d9c9de75f7186de907eac980c3b7a7/Stamp_Uploaded_Files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 934, 931, 67, 24585, 67, 2697, 12, 3977, 16, 662, 1214, 16, 646, 16, 729, 67, 1376, 33, 7036, 4672, 3536, 8860, 8626, 1390, 716, 1240, 2118, 9140, 4982, 279, 8515, 18, 632, 891, 1472, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 934, 931, 67, 24585, 67, 2697, 12, 3977, 16, 662, 1214, 16, 646, 16, 729, 67, 1376, 33, 7036, 4672, 3536, 8860, 8626, 1390, 716, 1240, 2118, 9140, 4982, 279, 8515, 18, 632, 891, 1472, ...
Thread(target=self._doLockSet, args=(['one', 'two'], 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doLockSet, args=(['one', 'two', 'three'], 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doLockSet, args=('three', 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doLockSet, args=(['one', 'two'], 0)).start() Thread(target=self._doLockSet, args=(['two', 'three'], 0)).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.release() self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE')
self._addThread(target=self._doLockSet, args=(['one', 'two'], 1)) self._waitThreads() self.assertEqual(self.done.get_nowait(), 'DONE') self._addThread(target=self._doLockSet, args=(['one', 'two', 'three'], 1)) self._waitThreads() self.assertEqual(self.done.get_nowait(), 'DONE') self._addThread(target=self._doLockSet, args=('three', 1)) self._waitThreads() self.assertEqual(self.done.get_nowait(), 'DONE') self._addThread(target=self._doLockSet, args=(['one', 'two'], 0)) self._addThread(target=self._doLockSet, args=(['two', 'three'], 0)) self.assertRaises(Queue.Empty, self.done.get_nowait) self.ls.release() self._waitThreads() self.assertEqual(self.done.get_nowait(), 'DONE') self.assertEqual(self.done.get_nowait(), 'DONE') @_Repeat
def testConcurrentSharedAcquire(self): self.ls.acquire(['one', 'two'], shared=1) Thread(target=self._doLockSet, args=(['one', 'two'], 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doLockSet, args=(['one', 'two', 'three'], 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doLockSet, args=('three', 1)).start() self.assertEqual(self.done.get(True, 1), 'DONE') Thread(target=self._doLockSet, args=(['one', 'two'], 0)).start() Thread(target=self._doLockSet, args=(['two', 'three'], 0)).start() self.assertRaises(Queue.Empty, self.done.get, True, 0.2) self.ls.release() self.assertEqual(self.done.get(True, 1), 'DONE') self.assertEqual(self.done.get(True, 1), 'DONE')
4607c978b8f973b63c49547f1b8d6061fdbd78d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/4607c978b8f973b63c49547f1b8d6061fdbd78d3/ganeti.locking_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 18521, 7887, 27761, 12, 2890, 4672, 365, 18, 3251, 18, 1077, 1039, 12, 3292, 476, 2187, 296, 15415, 17337, 5116, 33, 21, 13, 4884, 12, 3299, 33, 2890, 6315, 2896, 2531, 694, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 18521, 7887, 27761, 12, 2890, 4672, 365, 18, 3251, 18, 1077, 1039, 12, 3292, 476, 2187, 296, 15415, 17337, 5116, 33, 21, 13, 4884, 12, 3299, 33, 2890, 6315, 2896, 2531, 694, 16, ...
Compress___new__.unwrap_spec = [ObjSpace, W_Root, int]
Compress___new__.unwrap_spec = [ObjSpace, W_Root, int, int, int, int, int]
def Compress___new__(space, w_subtype, level=rzlib.Z_DEFAULT_COMPRESSION): """ Create a new z_stream and call its initializer. """ stream = space.allocate_instance(Compress, w_subtype) stream = space.interp_w(Compress, stream) Compress.__init__(stream, space, level) return space.wrap(stream)
73c850b3db71ca9a722bd8033e4650ce655940ae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/73c850b3db71ca9a722bd8033e4650ce655940ae/interp_zlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25698, 31268, 2704, 972, 12, 2981, 16, 341, 67, 21974, 16, 1801, 33, 86, 94, 2941, 18, 62, 67, 5280, 67, 4208, 14227, 4672, 3536, 1788, 279, 394, 998, 67, 3256, 471, 745, 2097, 12562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25698, 31268, 2704, 972, 12, 2981, 16, 341, 67, 21974, 16, 1801, 33, 86, 94, 2941, 18, 62, 67, 5280, 67, 4208, 14227, 4672, 3536, 1788, 279, 394, 998, 67, 3256, 471, 745, 2097, 12562, ...
map=socket_map
map = socket_map
def poll2 (timeout=0.0, map=None): import poll if map is None: map=socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) if map: l = [] for fd, obj in map.iteritems(): flags = 0 if obj.readable(): flags = poll.POLLIN if obj.writable(): flags = flags | poll.POLLOUT if flags: l.append ((fd, flags)) r = poll.poll (l, timeout) for fd, flags in r: obj = map.get(fd) if obj is None: continue readwrite(obj, flags)
79991224d1b5f3a4ab074ddac83ef59addf853be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/79991224d1b5f3a4ab074ddac83ef59addf853be/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 22, 261, 4538, 33, 20, 18, 20, 16, 852, 33, 7036, 4672, 1930, 7672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 309, 2021, 353, 486, 599, 30, 468, 2021, 353, 316, 10993, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 22, 261, 4538, 33, 20, 18, 20, 16, 852, 33, 7036, 4672, 1930, 7672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 309, 2021, 353, 486, 599, 30, 468, 2021, 353, 316, 10993, ...
trace(2,depth,"_upgrade undid %s %s (csw=%f < w=%f)", (op, pkg, csweight, weight), cs)
self.trace(2, "_upgrade undid %s %s (csw=%f < w=%f)", (op, pkg, csweight, weight), cs)
def _upgrade(self, pkgs, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth pruneweight = self._pruneweight trace(2, depth, "_upgrade(%s)", (pkgs))
b26ec53d5174d18eebf24ded272ad218fb19d0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/b26ec53d5174d18eebf24ded272ad218fb19d0b4/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15097, 12, 2890, 16, 16922, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 846, 318, 359, 1274...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15097, 12, 2890, 16, 16922, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 846, 318, 359, 1274...
cmd = os.path.join (self.terminator.origcwd, sys.argv[0])
cmd = os.path.join (self.cwd, sys.argv[0])
def key_new_window(self): cmd = sys.argv[0] if not os.path.isabs(cmd): # Command is not an absolute path. Figure out where we are cmd = os.path.join (self.terminator.origcwd, sys.argv[0]) if not os.path.isfile(cmd): # we weren't started as ./terminator in a path. Give up err('Unable to locate Terminator') return False dbg("Spawning: %s" % cmd) subprocess.Popen([cmd,])
f56ea646bb76352d69be8182ece9b2d9bba6b668 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1032/f56ea646bb76352d69be8182ece9b2d9bba6b668/terminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 2704, 67, 5668, 12, 2890, 4672, 1797, 273, 2589, 18, 19485, 63, 20, 65, 225, 309, 486, 1140, 18, 803, 18, 291, 5113, 12, 4172, 4672, 468, 3498, 353, 486, 392, 4967, 589, 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, 498, 67, 2704, 67, 5668, 12, 2890, 4672, 1797, 273, 2589, 18, 19485, 63, 20, 65, 225, 309, 486, 1140, 18, 803, 18, 291, 5113, 12, 4172, 4672, 468, 3498, 353, 486, 392, 4967, 589, 18,...
return '%6d %6d %6d %.2f %.2f %.2f' % (self.nTP, self.nFP, self.nFN, self.FNRate(), self.sensitivity(), self.PPV())
return '%6d %6d %6d %.3f %.3f %.3f' % (self.nTP, self.nFP, self.nFN, self.FNRate(), self.sensitivity(), self.PPV())
def __str__(self): return '%6d %6d %6d %.2f %.2f %.2f' % (self.nTP, self.nFP, self.nFN, self.FNRate(), self.sensitivity(), self.PPV())
2c7cb912f003d9ad5ac76536b1e08799d8b5029e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2773/2c7cb912f003d9ad5ac76536b1e08799d8b5029e/snpSelector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 1995, 26, 72, 738, 26, 72, 738, 26, 72, 12639, 22, 74, 12639, 22, 74, 12639, 22, 74, 11, 738, 261, 2890, 18, 82, 11130, 16, 365, 18, 82, 30246,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 972, 12, 2890, 4672, 327, 1995, 26, 72, 738, 26, 72, 738, 26, 72, 12639, 22, 74, 12639, 22, 74, 12639, 22, 74, 11, 738, 261, 2890, 18, 82, 11130, 16, 365, 18, 82, 30246,...
v2 = ((5*x + 4*np.sqrt(2*np.pi)) * np.exp(-x**2/2.) / np.power(2*np.pi, 1.5) + 3 * scipy.stats.norm.sf(x))
v2 = 0 for j in range(search.mu.shape[0]): v2 += ostat.density(x, j) * search.mu[j]
def test_search(self): """ Test that the search region works. """
ba76b4fab0747d1377df6816793c47ebf52b7b6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12658/ba76b4fab0747d1377df6816793c47ebf52b7b6a/test_rft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3072, 12, 2890, 4672, 3536, 7766, 716, 326, 1623, 3020, 6330, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1842, 67, 3072, 12, 2890, 4672, 3536, 7766, 716, 326, 1623, 3020, 6330, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
regex = r'^\s(?P<key>.+?)::\s(?P<val>.*?)\s*$'
regex = r'^ (?P<key>.+?):: (?P<val>.*?) *$'
def __getitem__(self, key): return self._dict[key]
02ba16876da84ed0f768d64828803f9d920e87a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/02ba16876da84ed0f768d64828803f9d920e87a5/wikidicts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 327, 365, 6315, 1576, 63, 856, 65, 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, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 327, 365, 6315, 1576, 63, 856, 65, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.v += self.dt * f dr = self.dt * self.v normdr = np.sqrt(np.vdot(dr, dr)) if normdr > self.maxmove: dr = self.maxmove * dr / normdr r = atoms.get_positions() atoms.set_positions(r + dr) self.dump((self.v, self.dt))
self.v += self.dt * f dr = self.dt * self.v normdr = np.sqrt(np.vdot(dr, dr)) if normdr > self.maxmove: dr = self.maxmove * dr / normdr r = atoms.get_positions() atoms.set_positions(r + dr) self.dump((self.v, self.dt))
def step(self,f): atoms = self.atoms if self.v is None: self.v = np.zeros((len(atoms), 3)) else: vf = np.vdot(f, self.v) if vf > 0.0: self.v = (1.0 - self.a) * self.v + self.a * f / np.sqrt( np.vdot(f, f)) * np.sqrt(np.vdot(self.v, self.v)) if self.Nsteps > self.Nmin: self.dt = min(self.dt * self.finc, self.dtmax) self.a *= self.fa self.Nsteps += 1 else: self.v[:] *= 0.0 self.a = self.astart self.dt *= self.fdec self.Nsteps = 0
4110c4c326894725f5eb0a5bb0ba9224f9acf61e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/4110c4c326894725f5eb0a5bb0ba9224f9acf61e/fire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 74, 4672, 9006, 273, 365, 18, 14937, 309, 365, 18, 90, 353, 599, 30, 365, 18, 90, 273, 1130, 18, 22008, 12443, 1897, 12, 14937, 3631, 890, 3719, 469, 30, 28902, 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, 2235, 12, 2890, 16, 74, 4672, 9006, 273, 365, 18, 14937, 309, 365, 18, 90, 353, 599, 30, 365, 18, 90, 273, 1130, 18, 22008, 12443, 1897, 12, 14937, 3631, 890, 3719, 469, 30, 28902, 2...
template = "genshi:tw2.forms.templates.textarea"
template = "tw2.forms.templates.textarea"
def prepare(self): super(FormField, self).prepare()
92253a716ba72263a78c1fe4a79a64b2d2d8568e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11476/92253a716ba72263a78c1fe4a79a64b2d2d8568e/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 4672, 2240, 12, 27317, 16, 365, 2934, 9366, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 4672, 2240, 12, 27317, 16, 365, 2934, 9366, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
proj.window = const.WINDOW_LEVEL['Bone'][0] proj.level = const.WINDOW_LEVEL['Bone'][1]
proj.window = window = const.WINDOW_LEVEL['Bone'][0] proj.level = level = const.WINDOW_LEVEL['Bone'][1]
def ImportDirectory(self, pubsub_evt=None, dir_=None): """ Import medical images (if any) and generate vtkImageData, saving data inside Project instance. """
e64f9318dd87d5cb57b3180a563b2be82061d9b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/e64f9318dd87d5cb57b3180a563b2be82061d9b2/control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 2853, 12, 2890, 16, 23288, 67, 73, 11734, 33, 7036, 16, 1577, 67, 33, 7036, 4672, 3536, 6164, 6735, 1706, 4602, 261, 430, 1281, 13, 471, 2103, 13659, 2040, 751, 16, 12392, 501, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 2853, 12, 2890, 16, 23288, 67, 73, 11734, 33, 7036, 16, 1577, 67, 33, 7036, 4672, 3536, 6164, 6735, 1706, 4602, 261, 430, 1281, 13, 471, 2103, 13659, 2040, 751, 16, 12392, 501, 4...
'''
"""
def field(self, size=30, default=None, format=_marker, popcal=True): '''Render a form edit field for the property
16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 12, 2890, 16, 963, 33, 5082, 16, 805, 33, 7036, 16, 740, 33, 67, 11145, 16, 1843, 771, 33, 5510, 4672, 9163, 3420, 279, 646, 3874, 652, 364, 326, 1272, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 12, 2890, 16, 963, 33, 5082, 16, 805, 33, 7036, 16, 740, 33, 67, 11145, 16, 1843, 771, 33, 5510, 4672, 9163, 3420, 279, 646, 3874, 652, 364, 326, 1272, 2, -100, -100, -100, -100...
ListType=type([])
def field2boolean(v): return v
2fc8078229a0faeb3cd82abd2de8c6038f7c2090 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2fc8078229a0faeb3cd82abd2de8c6038f7c2090/Converters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 22, 6494, 12, 90, 4672, 327, 331, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 22, 6494, 12, 90, 4672, 327, 331, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print "======== find_vcs in cci"
def find_vcs(self,invoice_id): print "======== find_vcs in cci" item = pooler.get_pool(self.cr.dbname).get('account.invoice').browse(self.cr,self.uid,invoice_id) vcs ='' if item.number: vcs3=str(item.number).split('/')[1] vcs1='0'+ str(item.date_invoice[2:4]) if len(str(vcs3))>=5: vcs2=str(item.number[3]) + str(vcs3[0:5]) elif len(str(vcs3))==4: vcs2=str(item.number[3]) + '0' +str(vcs3) else: vcs2=str(item.number[3]) + '00' +str(vcs3)
92773bb67077cb554cf306893a5219adb89cdd1b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/92773bb67077cb554cf306893a5219adb89cdd1b/special_message_invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 18982, 12, 2890, 16, 16119, 67, 350, 4672, 761, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 2934, 588, 2668, 4631, 18, 16119, 16063, 25731, 12, 2890, 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, 1104, 67, 18982, 12, 2890, 16, 16119, 67, 350, 4672, 761, 273, 2845, 264, 18, 588, 67, 6011, 12, 2890, 18, 3353, 18, 20979, 2934, 588, 2668, 4631, 18, 16119, 16063, 25731, 12, 2890, 18...
if filename.endswith('.html') or filename.endswith('.htm'):
basefn, ext = os.path.splitext(filename) if ext in ('.html', '.htm'):
def _load_stream(self, filename, f): if filename.endswith('.html') or filename.endswith('.htm'): self._load_html(f) else: self._load_plain_text(f)
b14075b008cbe5a0fb096ca57a2440f9540a006b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14744/b14075b008cbe5a0fb096ca57a2440f9540a006b/model_text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 3256, 12, 2890, 16, 1544, 16, 284, 4672, 1026, 4293, 16, 1110, 273, 1140, 18, 803, 18, 4939, 408, 12, 3459, 13, 309, 1110, 316, 7707, 18, 2620, 2187, 2418, 31180, 11, 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, 389, 945, 67, 3256, 12, 2890, 16, 1544, 16, 284, 4672, 1026, 4293, 16, 1110, 273, 1140, 18, 803, 18, 4939, 408, 12, 3459, 13, 309, 1110, 316, 7707, 18, 2620, 2187, 2418, 31180, 11, 4...
c = IECoreMaya.FromMayaDagNodeConverter.create( str( locatorTransform ) )
c = IECoreMaya.FromMayaDagNodeConverter.create( str( locatorTransform ), IECore.TypeId.TransformationMatrixdData )
def test( self ) : locatorTransform = maya.cmds.spaceLocator()[0] c = IECoreMaya.FromMayaDagNodeConverter.create( str( locatorTransform ) ) self.assertEqual( c.typeId(), IECoreMaya.FromMayaTransformConverter.staticTypeId() ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d() ) maya.cmds.xform( locatorTransform, translation=( 1, 2, 3 ) ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d.createTranslated( IECore.V3d( 1, 2, 3 ) ) ) group = maya.cmds.group( locatorTransform ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d.createTranslated( IECore.V3d( 1, 2, 3 ) ) ) maya.cmds.xform( group, translation=( 1, 0, 10 ) ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d.createTranslated( IECore.V3d( 2, 2, 13 ) ) ) c["space"].setValue( "Local" ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d.createTranslated( IECore.V3d( 1, 2, 3 ) ) ) locatorShape = maya.cmds.listRelatives( locatorTransform, children=True )[0] c = IECoreMaya.FromMayaTransformConverter( str( locatorShape ) ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d.createTranslated( IECore.V3d( 2, 2, 13 ) ) ) c["space"].setValue( "Local" ) t = c.convert() self.assert_( t.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) ) self.assertEqual( t.value.transform, IECore.M44d() )
0a076f4b6938e7d84aed079a7e9812cabf82581d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/0a076f4b6938e7d84aed079a7e9812cabf82581d/FromMayaTransformConverterTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 365, 262, 294, 225, 8871, 4059, 273, 2026, 69, 18, 24680, 18, 2981, 5786, 1435, 63, 20, 65, 225, 276, 273, 10897, 4670, 49, 528, 69, 18, 1265, 49, 528, 69, 40, 346, 907, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 365, 262, 294, 225, 8871, 4059, 273, 2026, 69, 18, 24680, 18, 2981, 5786, 1435, 63, 20, 65, 225, 276, 273, 10897, 4670, 49, 528, 69, 18, 1265, 49, 528, 69, 40, 346, 907, ...
e = re.compile(parts[1], re.I)
e = re.compile(parts[1])
def handle_pubmsg(connection, event): global message_buffer, MAX_MESSAGES, last_message nick = event.source().partition("!")[0] msg = event.arguments()[0] if msg.startswith('s/'): # handle regex parts = msg.split('/') # now flood protect! now = datetime.now() delta = now - last_message last_message = now if delta < timedelta(seconds=5): # 5 seconds between requests # any more are ignored print "Flood protection hit, %s of %s seconds were waited" % (delta.seconds, timedelta(seconds=5).seconds) connection.kick(event.target(), nick, 'Flood protection activated') return if len(message_buffer) == 0: connection.privmsg(event.target(), '%s: message buffer is empty' % nick) return if len(parts) == 3: connection.privmsg(event.target(), '%s: invalid regular expression, you forgot the trailing slash, dummy' % nick) return if len(parts) != 4: # not a valid regex connection.privmsg(event.target(), '%s: invalid regular expression, not the right amount of slashes' % nick) return # find messages matching the string if len(parts[1]) == 0: connection.privmsg(event.target(), '%s: original string is empty' % nick) return ignore_case = 'i' in parts[3] e = None try: if ignore_case: e = re.compile(parts[1], re.I) else: e = re.compile(parts[1], re.I) except Exception, ex: connection.privmsg(event.target(), '%s: failure compiling regular expression: %s' % (nick, ex)) return # now we have a valid regular expression matcher! for x in range(len(message_buffer)-1, -1, -1): if e.search(message_buffer[x][1]) != None: # match found! new_message = [] # replace the message in the buffer try: new_message = [message_buffer[x][0], e.sub(parts[2], message_buffer[x][1]).replace('\n','').replace('\r','')[:200]] del message_buffer[x] message_buffer.append(new_message) except Exception, ex: connection.privmsg(event.target(), '%s: failure replacing: %s' % (nick, ex)) return # now print the new text print new_message connection.privmsg(event.target(), ('<%s> %s' % (new_message[0], new_message[1]))[:200]) return # no match found connection.privmsg(event.target(), '%s: no match found' % nick) else: # add to buffer message_buffer.append([nick, msg[:200]]) # trim the buffer message_buffer = message_buffer[-MAX_MESSAGES:]
a51c581d30c1bd3b7ad4b1ec6125aa250377c9d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12995/a51c581d30c1bd3b7ad4b1ec6125aa250377c9d0/regexbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 10174, 3576, 12, 4071, 16, 871, 4672, 2552, 883, 67, 4106, 16, 4552, 67, 26195, 16, 1142, 67, 2150, 10909, 273, 871, 18, 3168, 7675, 10534, 2932, 4442, 25146, 20, 65, 1234, 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, 1640, 67, 10174, 3576, 12, 4071, 16, 871, 4672, 2552, 883, 67, 4106, 16, 4552, 67, 26195, 16, 1142, 67, 2150, 10909, 273, 871, 18, 3168, 7675, 10534, 2932, 4442, 25146, 20, 65, 1234, 2...
format the mo file, default to 78 (optional).
format the mo file, default to 78 (optional), - *encoding*: string, the encoding to use, defaults to "default_encoding" global variable (optional), - *check_for_duplicates*: whether to check for duplicate entries when adding entries to the file, default: False (optional).
def __init__(self, fpath=None, wrapwidth=78, encoding=default_encoding): """ Constructor.
9d732105697624731ed08ef764908b70660f97db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9d732105697624731ed08ef764908b70660f97db/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13543, 33, 7036, 16, 2193, 2819, 33, 8285, 16, 2688, 33, 1886, 67, 5999, 4672, 3536, 11417, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13543, 33, 7036, 16, 2193, 2819, 33, 8285, 16, 2688, 33, 1886, 67, 5999, 4672, 3536, 11417, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
output(u'Deleted page %s' % self.aslink())
output(u'Deleted page %s' % self.aslink(forceInterwiki = True))
def delete(self, reason=None, prompt=True, throttle=True): """Deletes the page from the wiki.
0f12fda07ed68344bb75cde28e607e646bc2461b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/0f12fda07ed68344bb75cde28e607e646bc2461b/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 3971, 33, 7036, 16, 6866, 33, 5510, 16, 18304, 33, 5510, 4672, 3536, 7551, 326, 1363, 628, 326, 9050, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 3971, 33, 7036, 16, 6866, 33, 5510, 16, 18304, 33, 5510, 4672, 3536, 7551, 326, 1363, 628, 326, 9050, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if flag == "stdout":
if self.flag == "stdout":
def write (self, data): try: self.to.write(data) except IOError: if flag == "stdout": # Certainly hope we never end up here pass else: log.error("Could not write data '%s' to pipe '%s'" % (data, repr(self.to))) if log: log.debug (data, self.flag) #self.flush()
037f061f27a33fff0e50cb1f06a9afa2a840494a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/037f061f27a33fff0e50cb1f06a9afa2a840494a/Log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 261, 2890, 16, 501, 4672, 775, 30, 365, 18, 869, 18, 2626, 12, 892, 13, 1335, 8340, 30, 309, 365, 18, 6420, 422, 315, 10283, 6877, 468, 11921, 530, 715, 27370, 732, 5903, 679, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 501, 4672, 775, 30, 365, 18, 869, 18, 2626, 12, 892, 13, 1335, 8340, 30, 309, 365, 18, 6420, 422, 315, 10283, 6877, 468, 11921, 530, 715, 27370, 732, 5903, 679, ...
r""" Permanent of (0,1)-matrix of size $n \times (n+d)$ with $d=4$ and $n-1$ zeros not on a line. $a(n) = (n+1)*a(n-1) + (n-2)*a(n-2) [a(1)=5, a(2)=25]$ This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. REFERENCES: Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), p. 197-210. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A090014;a Permanent of (0,1)-matrix of size n X (n+d) with d=4 and n-1 zeros not on a line. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 5 sage: a(2) 25 sage: a.offset 1 sage: a(8) 11016595 sage: a(22) 7469733600354446865509725 sage: a.list(9) [5, 25, 155, 1135, 9545, 90445, 952175, 11016595, 138864365] AUTHOR: -- Jaap Spies (2007-01-23) """ def __init__(self):
def __init__(self): r""" Permanent of (0,1)-matrix of size $n \times (n+d)$ with $d=4$ and $n-1$ zeros not on a line. $a(n) = (n+1)*a(n-1) + (n-2)*a(n-2) [a(1)=5, a(2)=25]$ This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. REFERENCES: Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), p. 197-210. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A090014;a Permanent of (0,1)-matrix of size n X (n+d) with d=4 and n-1 zeros not on a line. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 5 sage: a(2) 25 sage: a.offset 1 sage: a(8) 11016595 sage: a(22) 7469733600354446865509725 sage: a.list(9) [5, 25, 155, 1135, 9545, 90445, 952175, 11016595, 138864365] AUTHOR: -- Jaap Spies (2007-01-23) """
def _eval(self, n): if n == 1: return ZZ(4) else: return sloane.A000261(n+2) + sloane.A000261(n+1)
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 309, 290, 422, 404, 30, 327, 2285, 62, 12, 24, 13, 469, 30, 327, 225, 272, 383, 8806, 18, 37, 17954, 9498, 12, 82, 15, 22, 13, 397, 272, 383, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 309, 290, 422, 404, 30, 327, 2285, 62, 12, 24, 13, 469, 30, 327, 225, 272, 383, 8806, 18, 37, 17954, 9498, 12, 82, 15, 22, 13, 397, 272, 383, ...
return [(R!a)/(R!T2) : a in avec];
return [(R!a)/(R!T3) : a in avec];
def theta3_qexp(prec=10, var='q'):
cd2162e80ddbc1026a68115673c375004c025afc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/cd2162e80ddbc1026a68115673c375004c025afc/half_integral.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7338, 23, 67, 85, 2749, 12, 4036, 33, 2163, 16, 569, 2218, 85, 11, 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, ...
[ 1, 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, 7338, 23, 67, 85, 2749, 12, 4036, 33, 2163, 16, 569, 2218, 85, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if abstarget != origsrc and not opts['dry_run']:
if abstarget != origsrc and not opts.get('dry_run'):
def copy(origsrc, abssrc, relsrc, target, exact): abstarget = util.canonpath(repo.root, cwd, target) reltarget = util.pathto(cwd, abstarget) prevsrc = targets.get(abstarget) if prevsrc is not None: ui.warn(_('%s: not overwriting - %s collides with %s\n') % (reltarget, abssrc, prevsrc)) return if (not opts['after'] and os.path.exists(reltarget) or opts['after'] and repo.dirstate.state(abstarget) not in '?r'): if not opts['force']: ui.warn(_('%s: not overwriting - file exists\n') % reltarget) return if not opts['after'] and not opts['dry_run']: os.unlink(reltarget) if opts['after']: if not os.path.exists(reltarget): return else: targetdir = os.path.dirname(reltarget) or '.' if not os.path.isdir(targetdir) and not opts['dry_run']: os.makedirs(targetdir) try: restore = repo.dirstate.state(abstarget) == 'r' if restore and not opts['dry_run']: repo.undelete([abstarget], wlock) try: if not opts['dry_run']: shutil.copyfile(relsrc, reltarget) shutil.copymode(relsrc, reltarget) restore = False finally: if restore: repo.remove([abstarget], wlock) except shutil.Error, inst: raise util.Abort(str(inst)) except IOError, inst: if inst.errno == errno.ENOENT: ui.warn(_('%s: deleted in working copy\n') % relsrc) else: ui.warn(_('%s: cannot copy - %s\n') % (relsrc, inst.strerror)) errors += 1 return if ui.verbose or not exact: ui.status(_('copying %s to %s\n') % (relsrc, reltarget)) targets[abstarget] = abssrc if abstarget != origsrc and not opts['dry_run']: repo.copy(origsrc, abstarget, wlock) copied.append((abssrc, relsrc, exact))
eac1cc2728cff97d7c5979a44f6db1f0de57bcda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/eac1cc2728cff97d7c5979a44f6db1f0de57bcda/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 4949, 4816, 16, 1223, 1049, 1310, 16, 1279, 4816, 16, 1018, 16, 5565, 4672, 1223, 334, 826, 273, 1709, 18, 4169, 265, 803, 12, 7422, 18, 3085, 16, 7239, 16, 1018, 13, 1279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 4949, 4816, 16, 1223, 1049, 1310, 16, 1279, 4816, 16, 1018, 16, 5565, 4672, 1223, 334, 826, 273, 1709, 18, 4169, 265, 803, 12, 7422, 18, 3085, 16, 7239, 16, 1018, 13, 1279, ...
return "No prior dumps of this database stored."; date = prettyDate(raw)
return "No prior dumps of this database stored." date = WikiDump.prettyDate(raw)
def reportPreviousDump(self, done): """Produce a link to the previous dump, if any""" try: raw = self.wiki.latestDump(self.dbName, -2) except: return "No prior dumps of this database stored."; date = prettyDate(raw) if done: prefix = "" message = "Last dumped on" else: prefix = "This dump is in progress; see also the " message = "previous dump from" return "%s<a href=\"../%s/\">%s %s</a>" % (prefix, raw, message, date)
ace9f02ecf09a1cdcca9c238e4f7bea4fcc101f1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9870/ace9f02ecf09a1cdcca9c238e4f7bea4fcc101f1/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 8351, 10628, 12, 2890, 16, 2731, 4672, 3536, 25884, 279, 1692, 358, 326, 2416, 4657, 16, 309, 1281, 8395, 775, 30, 1831, 273, 365, 18, 13044, 18, 13550, 10628, 12, 2890, 18, 1966, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 8351, 10628, 12, 2890, 16, 2731, 4672, 3536, 25884, 279, 1692, 358, 326, 2416, 4657, 16, 309, 1281, 8395, 775, 30, 1831, 273, 365, 18, 13044, 18, 13550, 10628, 12, 2890, 18, 1966, ...
nour=Entity(to_.id,mass=self.mass,alcahol=self.alcahol)
nour=Entity(to_.id,mass=self.mass,alcohol=self.alcohol)
def eat_operation(self, op): ent=Entity(self.id,status=-1) res = Operation("set",ent,to=self) to_ = op.from_ nour=Entity(to_.id,mass=self.mass,alcahol=self.alcahol) res = res + Operation("nourish",nour,to=to_) return res
660cf65d5dddd6873466f7f31dac2b53a0c2a7b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/660cf65d5dddd6873466f7f31dac2b53a0c2a7b5/Apple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20729, 67, 7624, 12, 2890, 16, 1061, 4672, 3281, 33, 1943, 12, 2890, 18, 350, 16, 2327, 29711, 21, 13, 400, 273, 4189, 2932, 542, 3113, 319, 16, 869, 33, 2890, 13, 358, 67, 273, 1061...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20729, 67, 7624, 12, 2890, 16, 1061, 4672, 3281, 33, 1943, 12, 2890, 18, 350, 16, 2327, 29711, 21, 13, 400, 273, 4189, 2932, 542, 3113, 319, 16, 869, 33, 2890, 13, 358, 67, 273, 1061...
len, reverse, delimiters = RE_ARGS.split(str)[1:4]
ln, reverse, delimiters = RE_ARGS.split(str)[1:4]
def expand_one(expansion, str, joiner): if not str: return expansion len, reverse, delimiters = RE_ARGS.split(str)[1:4] if not delimiters: delimiters = '.' expansion = split(expansion, delimiters, joiner) if reverse: expansion.reverse() if len: expansion = expansion[-int(len)*2+1:] return ''.join(expansion)
09582a2e868e1f131726d6a15f64d5501912f6f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/139/09582a2e868e1f131726d6a15f64d5501912f6f9/spf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 476, 12, 2749, 12162, 16, 609, 16, 29620, 4672, 309, 486, 609, 30, 327, 17965, 7211, 16, 4219, 16, 18374, 273, 2438, 67, 22439, 18, 4939, 12, 701, 25146, 21, 30, 24, 65, 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, 4542, 67, 476, 12, 2749, 12162, 16, 609, 16, 29620, 4672, 309, 486, 609, 30, 327, 17965, 7211, 16, 4219, 16, 18374, 273, 2438, 67, 22439, 18, 4939, 12, 701, 25146, 21, 30, 24, 65, 30...
lines.append(line.replace('\n', ''))
if line.startswith(' <'): line = line[1:] lines.append(line)
def _diff_line_based(left_lines, right_lines, include_deletions=True, include_insertions=True, replace_as_insert=False, replace_as_delete=False, ratio_skip=0.7): from difflib import SequenceMatcher left = _decompose(left_lines) right = _decompose(right_lines) s = SequenceMatcher(None, left, right) if ratio_skip is not None and s.ratio() <= 1-ratio_skip: lines = [] if include_deletions: for l in left_lines: lines.append('<del>%s</del>' % l) if include_insertions: for r in right_lines: lines.append('<ins>%s</ins>' % r) return lines html_match = '' for op, i1, i2, j1, j2 in s.get_opcodes(): if op == 'equal': html_match += _compose(left[i1:i2]) elif op == 'delete' and include_deletions: html_match += ' <del>' + _compose(left[i1:i2]) + '</del> ' elif op == 'insert' and include_insertions: html_match += ' <ins>' + _compose(right[j1:j2]) + '</ins> ' elif op == 'replace': if include_insertions and replace_as_insert: html_match += ' <ins>' + _compose(right[j1:j2]) + '</ins> ' if include_deletions and replace_as_delete: html_match += ' <del>' + _compose(left[i1:i2]) + '</del> ' carry = [] lines = [] for line in html_match.split('\n'): for val in carry: line = val + line carry = [] for tag_begin, tag_end in ((' <ins>', '</ins> '), (' <del>', '</del> ')): begin_count = count(line, tag_begin) end_count = count(line, tag_end) if begin_count > end_count: line = line + tag_end carry.append(tag_begin) elif begin_count < end_count: line = tag_begin + line lines.append(line.replace('\n', '')) return lines
bfe07f9cf2dea988d7c2aa76aded6c5d6fb8ea64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/bfe07f9cf2dea988d7c2aa76aded6c5d6fb8ea64/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5413, 67, 1369, 67, 12261, 12, 4482, 67, 3548, 16, 2145, 67, 3548, 16, 2341, 67, 19003, 1115, 33, 5510, 16, 2341, 67, 6387, 1115, 33, 5510, 16, 1453, 67, 345, 67, 6387, 33, 8381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5413, 67, 1369, 67, 12261, 12, 4482, 67, 3548, 16, 2145, 67, 3548, 16, 2341, 67, 19003, 1115, 33, 5510, 16, 2341, 67, 6387, 1115, 33, 5510, 16, 1453, 67, 345, 67, 6387, 33, 8381...