rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) acc_set = ",".join(map(str, ids2)) cr.execute("""select account_analytic_line.account_id,sum(amount) from account_analytic_line join account_analytic_journal on account_analytic_line.journal_id = account_analytic_journal.id where account_analytic_line.account_id IN (%s) and account_analytic_journal.type = 'purchase' GROUP BY account_analytic_line.account_id"""%acc_set) res = {} for account_id, sum in cr.fetchall(): res[account_id] = round(sum,2) acc_set = ",".join(map(str, ids2)) cr.execute(""" select account_analytic_line.account_id as account_id,sum((account_analytic_line.unit_amount * pt.list_price)-(account_analytic_line.unit_amount * pt.list_price*hr.factor)) as somme from account_analytic_line join account_analytic_journal on account_analytic_line.journal_id = account_analytic_journal.id join product_product pp on (account_analytic_line.product_id = pp.id) join product_template pt on (pp.product_tmpl_id = pt.id) join account_analytic_account a on (a.id=account_analytic_line.account_id) join hr_timesheet_invoice_factor hr on (hr.id=a.to_invoice) where account_analytic_line.account_id IN (%s) and account_analytic_journal.type='general' and a.to_invoice IS NOT NULL GROUP BY account_analytic_line.account_id"""%acc_set)
res = {}
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context={}): ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) acc_set = ",".join(map(str, ids2)) # First part with expense and purchase cr.execute("""select account_analytic_line.account_id,sum(amount) from account_analytic_line join account_analytic_journal on account_analytic_line.journal_id = account_analytic_journal.id where account_analytic_line.account_id IN (%s) and account_analytic_journal.type = 'purchase' GROUP BY account_analytic_line.account_id"""%acc_set) res = {} for account_id, sum in cr.fetchall(): res[account_id] = round(sum,2) # Second part with timesheet (with invoice factor) acc_set = ",".join(map(str, ids2)) cr.execute(""" select account_analytic_line.account_id as account_id,sum((account_analytic_line.unit_amount * pt.list_price)-(account_analytic_line.unit_amount * pt.list_price*hr.factor)) as somme from account_analytic_line join account_analytic_journal on account_analytic_line.journal_id = account_analytic_journal.id join product_product pp on (account_analytic_line.product_id = pp.id) join product_template pt on (pp.product_tmpl_id = pt.id) join account_analytic_account a on (a.id=account_analytic_line.account_id) join hr_timesheet_invoice_factor hr on (hr.id=a.to_invoice) where account_analytic_line.account_id IN (%s) and account_analytic_journal.type='general' and a.to_invoice IS NOT NULL GROUP BY account_analytic_line.account_id"""%acc_set) res2 = {} for account_id, sum in cr.fetchall(): res2[account_id] = round(sum,2) # sum both result on account_id for id in ids: res[id] = round(res.get(id, 0.0),2) + round(res2.get(id, 0.0),2) return res
a2fff80cd3c45dd2b2d56090c72d5883b2287d1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8241/a2fff80cd3c45dd2b2d56090c72d5883b2287d1d/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5353, 67, 5787, 10129, 67, 12448, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 3258, 22, 273, 365, 18, 3072, 12, 3353, 16, 4555, 16, 306, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5353, 67, 5787, 10129, 67, 12448, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 3258, 22, 273, 365, 18, 3072, 12, 3353, 16, 4555, 16, 306, 266...
def parseHeader(self): yield UInt16(self, "crc16", "Block CRC16", text_handler=hexadecimal) yield UInt8(self, "type", "Block type", DefaultBlock.block_name) def getBaseSize(self): if self["has_extended_size"].value==0: return self["head_size"].value else: return self["head_size"].value + self["added_size"].value def parseCommonFlags(self): yield Bit(self, "has_extended_size", "Additional field indicating additional size") yield Bit(self, "is_ignorable", "Old versions of RAR should ignore this block when copying data") def parseBaseFlags(self): yield Bits(self, "flags_bits1", 8, "Unused flag bits", text_handler=hexadecimal) self.parseCommonFlags() yield Bits(self, "flags_bits2", 6, "Unused flag bits", text_handler=hexadecimal) def parseBaseSize(self): yield UInt16(self, "head_size", "Block size", text_handler=humanFilesize) if self["has_extended_size"].value==1: yield UInt32(self, "added_size", "Supplementary block size", text_handler=humanFilesize) def parseBaseBody(self, name, size=None, comment="Unknow data"): if size == None: size = self.getBaseSize()-7 if size>0: yield RawBytes(self, name, size, comment) class DefaultBlock(BaseBlock): def createFields(self): yield Bits(self, "flags_bits1", 8, "Unused flag bits", text_handler=hexadecimal) yield Bit(self, "has_extended_size", "Additional field indicating additional size") yield Bit(self, "is_ignorable", "Old versions of RAR should ignore this block when copying data") yield Bits(self, "flags_bits2", 6, "Unused flag bits", text_handler=hexadecimal) size = UInt16(self, "head_size", "Block size", text_handler=humanFilesize) yield size size = size.value if self["has_extended_size"].value: yield UInt32(self, "added_size", "Supplementary block size", text_handler=humanFilesize) size += self["added_size"].value if size>0: yield RawBytes(self, "unknown", size, "Unknow data") class MarkerBlock(BaseBlock): """ The marker block is actually considered as a fixed byte sequence: 0x52 0x61 0x72 0x21 0x1a 0x07 0x00 """ def createFields(self): yield Bits(self, "flags_bits1", 8, "Unused flag bits", text_handler=hexadecimal) yield Bit(self, "has_extended_size", "Additional field indicating additional size") yield Bit(self, "is_ignorable", "Old versions of RAR should ignore this block when copying data") yield Bits(self, "flags_bits2", 6, "Unused flag bits", text_handler=hexadecimal) yield UInt16(self, "head_size", "Block size", text_handler=humanFilesize) class EndBlock(BaseBlock): def createFields(self): yield Bits(self, "flags_bits1", 8, "Unused flag bits", text_handler=hexadecimal) yield Bit(self, "has_extended_size", "Additional field indicating additional size") yield Bit(self, "is_ignorable", "Old versions of RAR should ignore this block when copying data") yield Bits(self, "flags_bits2", 6, "Unused flag bits", text_handler=hexadecimal) yield UInt16(self, "head_size", "Block size", text_handler=humanFilesize) class CommentBlock(BaseBlock): def createFields(self): yield Bits(self, "flags_bits1", 8, "Unused flag bits", text_handler=hexadecimal) yield Bit(self, "has_extended_size", "Additional field indicating additional size") yield Bit(self, "is_ignorable", "Old versions of RAR should ignore this block when copying data") yield Bits(self, "flags_bits2", 6, "Unused flag bits", text_handler=hexadecimal) size = UInt16(self, "total_size", "Comment header size + comment size", text_handler=humanFilesize) yield size size = size.value yield UInt16(self, "uncompressed_size", "Uncompressed comment size", text_handler=humanFilesize) yield Byte(self, "required_version", "RAR version needed to extract comment") yield Byte(self, "packing_method", "Comment packing method") yield UInt16(self, "comment_crc16", "Comment CRC") if size-13>0: yield RawBytes(self, "comment_data", size-13, "Compressed comment data") class ExtraInfoBlock(BaseBlock): def createFields(self): yield Bits(self, "flags_bits1", 8, "Unused flag bits", text_handler=hexadecimal) yield Bit(self, "has_extended_size", "Additional field indicating body size") yield Bit(self, "is_ignorable", "Old versions of RAR should ignore this block when copying data") yield Bits(self, "flags_bits2", 6, "Unused flag bits", text_handler=hexadecimal) size = UInt16(self, "total_size", "Total block size", text_handler=humanFilesize) yield size if size-7>0: yield RawBytes(self, "info_data", size-7, "Other info") class ArchiveBlock(BaseBlock): def createFields(self): yield Bit(self, "vol", "Archive volume") yield Bit(self, "has_comment", "Whether there is a comment") yield Bit(self, "is_locked", "Archive volume") yield Bit(self, "is_solid", "Whether files can be extracted separately") yield Bit(self, "unused", "Unused bit") yield Bit(self, "has_authenticity_information", "The integrity/authenticity of the archive can be checked") yield NullBits(self, "internal", 10, "Reserved for 'internal use'") yield UInt16(self, "head_size", "Block size", text_handler=humanFilesize) yield NullBytes(self, "reserved[]", 2, "Reserved word") yield NullBytes(self, "reserved[]", 4, "Reserved dword") if self["has_comment"].value==1: yield CommentBlock(self, "comment", "Archive compressed comment") class FileBlock(BaseBlock): DICTIONARY_SIZE = { 0: "Dictionary size 64 Kb", 1: "Dictionary size 128 Kb", 2: "Dictionary size 256 Kb", 3: "Dictionary size 512 Kb", 4: "Dictionary size 1024 Kb", 7: "File is a directory", }
def createFields(self): yield Bit(self, "read_only") yield Bit(self, "hidden") yield Bit(self, "system") yield NullBits(self, "reserved[]", 1) yield Bit(self, "directory") yield Bit(self, "archive") yield Bit(self, "device") yield Bit(self, "normal") yield Bit(self, "temporary") yield Bit(self, "sparse_file") yield Bit(self, "reparse_file") yield Bit(self, "compressed") yield Bit(self, "offline") yield Bit(self, "dont_index_content") yield Bit(self, "encrypted") yield NullBits(self, "reserved[]", 1+16)
6da681c1b474ff22c8952112b258de52a14c9b3c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/6da681c1b474ff22c8952112b258de52a14c9b3c/rar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 6539, 12, 2890, 16, 315, 896, 67, 3700, 7923, 2824, 6539, 12, 2890, 16, 315, 6345, 7923, 2824, 6539, 12, 2890, 16, 315, 4299, 7923, 2824, 4112, 6495, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 6539, 12, 2890, 16, 315, 896, 67, 3700, 7923, 2824, 6539, 12, 2890, 16, 315, 6345, 7923, 2824, 6539, 12, 2890, 16, 315, 4299, 7923, 2824, 4112, 6495, 1...
field['optional'] = '' in field['options']
if '' in field['options']: field['optional'] = True field['options'].remove('')
def get_custom_fields(self): fields = [] config = self.config['ticket-custom'] for name in [option for option, value in config.options() if '.' not in option]: field = { 'name': name, 'type': config.get(name), 'order': config.getint(name + '.order', 0), 'label': config.get(name + '.label') or name.capitalize(), 'value': config.get(name + '.value', '') } if field['type'] == 'select' or field['type'] == 'radio': field['options'] = config.getlist(name + '.options', sep='|') field['optional'] = '' in field['options'] elif field['type'] == 'textarea': field['width'] = config.getint(name + '.cols') field['height'] = config.getint(name + '.rows') fields.append(field)
c24b175863d14a154305882378751cd05a0b0c61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/c24b175863d14a154305882378751cd05a0b0c61/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3662, 67, 2821, 12, 2890, 4672, 1466, 273, 5378, 642, 273, 365, 18, 1425, 3292, 16282, 17, 3662, 3546, 364, 508, 316, 306, 3482, 364, 1456, 16, 460, 316, 642, 18, 2116, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3662, 67, 2821, 12, 2890, 4672, 1466, 273, 5378, 642, 273, 365, 18, 1425, 3292, 16282, 17, 3662, 3546, 364, 508, 316, 306, 3482, 364, 1456, 16, 460, 316, 642, 18, 2116, 1435, ...
err = win32.ReadFile(self.hComPort, buf, size, ctypes.byref(rc), ctypes.byref(self._overlappedRead))
err = win32.ReadFile(self.hComPort, buf, n, ctypes.byref(rc), ctypes.byref(self._overlappedRead))
def read(self, size=1): """Read size bytes from the serial port. If a timeout is set it may return less characters as requested. With no timeout it will block until the requested number of bytes is read.""" if not self.hComPort: raise portNotOpenError if size > 0: win32.ResetEvent(self._overlappedRead.hEvent) flags = win32.DWORD() comstat = win32.COMSTAT() if not win32.ClearCommError(self.hComPort, ctypes.byref(flags), ctypes.byref(comstat)): raise SerialException('call to ClearCommError failed') if self.timeout == 0: n = min(comstat.cbInQue, size) if n > 0: buf = ctypes.create_string_buffer(n) rc = win32.DWORD() err = win32.ReadFile(self.hComPort, buf, size, ctypes.byref(rc), ctypes.byref(self._overlappedRead)) if not err and win32.GetLastError() != win32.ERROR_IO_PENDING: raise SerialException("ReadFile failed (%s)" % ctypes.WinError()) err = win32.WaitForSingleObject(self._overlappedRead.hEvent, win32.INFINITE) read = buf.raw[:rc.value] else: read = bytes() else: buf = ctypes.create_string_buffer(size) rc = win32.DWORD() err = win32.ReadFile(self.hComPort, buf, size, ctypes.byref(rc), ctypes.byref(self._overlappedRead)) if not err and win32.GetLastError() != win32.ERROR_IO_PENDING: raise SerialException("ReadFile failed (%s)" % ctypes.WinError()) err = win32.GetOverlappedResult(self.hComPort, ctypes.byref(self._overlappedRead), ctypes.byref(rc), True) read = buf.raw[:rc.value] else: read = bytes() return bytes(read)
140c8a02cf9c93fcdbf62dfda541094920c806e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10955/140c8a02cf9c93fcdbf62dfda541094920c806e2/serialwin32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 21, 4672, 3536, 1994, 963, 1731, 628, 326, 2734, 1756, 18, 971, 279, 2021, 353, 444, 518, 2026, 327, 5242, 3949, 487, 3764, 18, 3423, 1158, 2021, 518, 903, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 21, 4672, 3536, 1994, 963, 1731, 628, 326, 2734, 1756, 18, 971, 279, 2021, 353, 444, 518, 2026, 327, 5242, 3949, 487, 3764, 18, 3423, 1158, 2021, 518, 903, ...
if self.last_image_action_was_fit == True: if self.zoomratio != 1: self.zoom_to_fit_window(None)
if self.last_image_action_was_fit == True and self.zoomratio != 1: self.zoom_to_fit_window(None)
def window_resized(self, widget, allocation): # Update the image size on window resize if the current image was last fit: if self.image_loaded == True: if allocation.width != self.prevwinwidth or allocation.height != self.prevwinheight: if self.last_image_action_was_fit == True: if self.zoomratio != 1: self.zoom_to_fit_window(None) else: self.center_image() self.prevwinwidth = allocation.width self.prevwinheight = allocation.height return
3122c97c913bf9d9b59d5cf2f2942d8fd0c13731 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/3122c97c913bf9d9b59d5cf2f2942d8fd0c13731/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2742, 67, 455, 1235, 12, 2890, 16, 3604, 16, 13481, 4672, 468, 2315, 326, 1316, 963, 603, 2742, 7041, 309, 326, 783, 1316, 1703, 1142, 4845, 30, 309, 365, 18, 2730, 67, 4230, 422, 1053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2742, 67, 455, 1235, 12, 2890, 16, 3604, 16, 13481, 4672, 468, 2315, 326, 1316, 963, 603, 2742, 7041, 309, 326, 783, 1316, 1703, 1142, 4845, 30, 309, 365, 18, 2730, 67, 4230, 422, 1053...
except db.Error, e: dberror(e) finally: dbcon.close() if parms.has_key('preview'): if xhtml_output is None:
if parms.has_key('preview'): if xhtml_output is None: return my_utils.merge_dicts( d, dict( article_source = sig_source, article_title = get_title_for_user(), old_article_title = old_title, threads_id = threads_id, comment = comment, error = "preview_redirect", line = None, column = None, edit_time = int_time, ) )
def edit_conflict(old_source, new_source): """old_source is the source before either user edited it. new_source is the source of the edit made by the user who created the edit conflict.""" return dict( article_source = source, article_title = title_for_user, old_article_title = old_title, threads_id = threads_id, # If there's an edit conflict, the article must exist, so there will be a threads_id. comment = comment, error = "edit_conflict", line = None, column = None, diff_xhtml = diffengine.pretty_diff(new_source, old_source or '', config.DIFF_LINE_LENGTH), edit_time = int_time )
c5a5f6a12b7943464d8280981a43e1328b105fd3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/c5a5f6a12b7943464d8280981a43e1328b105fd3/gliki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 20340, 12, 1673, 67, 3168, 16, 394, 67, 3168, 4672, 3536, 1673, 67, 3168, 353, 326, 1084, 1865, 3344, 729, 18532, 518, 18, 394, 67, 3168, 353, 326, 1084, 434, 326, 3874, 7165...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 20340, 12, 1673, 67, 3168, 16, 394, 67, 3168, 4672, 3536, 1673, 67, 3168, 353, 326, 1084, 1865, 3344, 729, 18532, 518, 18, 394, 67, 3168, 353, 326, 1084, 434, 326, 3874, 7165...
>>> d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(d.results),
>>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ... ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(results),
def _fancy_replace(self, a, alo, ahi, b, blo, bhi): r""" When replacing one block of lines with another, search the blocks for *similar* lines; the best-matching pair (if any) is used as a synch point, and intraline difference marking is done on the similar pair. Lots of work, but often worth it.
049440c173a4ed86ddbf6771fca9f8201b47b940 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/049440c173a4ed86ddbf6771fca9f8201b47b940/difflib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 74, 12514, 67, 2079, 12, 2890, 16, 279, 16, 279, 383, 16, 279, 12266, 16, 324, 16, 324, 383, 16, 324, 12266, 4672, 436, 8395, 5203, 13993, 1245, 1203, 434, 2362, 598, 4042, 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, 389, 74, 12514, 67, 2079, 12, 2890, 16, 279, 16, 279, 383, 16, 279, 12266, 16, 324, 16, 324, 383, 16, 324, 12266, 4672, 436, 8395, 5203, 13993, 1245, 1203, 434, 2362, 598, 4042, 16, ...
tag[taglink(o, n)]
r.append(taglink(o, n))
def heading(self): tag = super(ClassPage, self).heading() zipped = zip(self.ob.rawbases, self.ob.bases, self.ob.baseobjects) if zipped: tag['('] for i, (n, m, o) in enumerate(zipped): if o is None: tag[tags.span(title=m)[n]] else: tag[taglink(o, n)] if i != len(zipped)-1: tag[', '] tag[')'] tag[':'] return tag
eeed35f1b5ddf81f00d03bf40d3e0ee3c85661f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5471/eeed35f1b5ddf81f00d03bf40d3e0ee3c85661f3/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11053, 12, 2890, 4672, 1047, 273, 2240, 12, 797, 1964, 16, 365, 2934, 19948, 1435, 3144, 1845, 273, 3144, 12, 2890, 18, 947, 18, 1899, 18602, 16, 365, 18, 947, 18, 18602, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11053, 12, 2890, 4672, 1047, 273, 2240, 12, 797, 1964, 16, 365, 2934, 19948, 1435, 3144, 1845, 273, 3144, 12, 2890, 18, 947, 18, 1899, 18602, 16, 365, 18, 947, 18, 18602, 16, 365, 18, ...
for seID in sortList(dirDict.keys()):
for seID in sortList( dirDict.keys() ):
def _updateDirectoryUsage(self,directorySEDict,change,connection=False): connection = self._getConnection(connection) for dirID in sortList(directorySEDict.keys()): dirDict = directorySEDict[dirID] for seID in sortList(dirDict.keys()): seDict = dirDict[seID] files = seDict['Files'] size = seDict['Size'] req = "UPDATE FC_DirectoryUsage SET SESize=SESize%s%d,SEFiles=SEFiles%s%d,LastUpdate=UTC_TIMESTAMP() WHERE DirID=%d AND SEID=%d;" % (change,size,change,files,dirID,seID) res = self.db._update(req) if not res['OK']: gLogger.warn("Failed to update FC_DirectoryUsage",res['Message']) if res['Value']: continue if change != '+': gLogger.warn("Decrement of usage for DirID,SEID that didnt exist","%d %d" % (dirID,seID)) continue req = "INSERT INTO FC_DirectoryUsage (DirID,SEID,SESize,SEFiles,LastUpdate) VALUES (%d,%d,%d,%d,UTC_TIMESTAMP());" % (dirID,seID,size,files) res = self.db._update(req) if not res['OK']: gLogger.warn("Failed to insert FC_DirectoryUsage",res['Message']) return S_OK()
26c5008a7adbc1c761e2409bed59b7710e5f2c74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/26c5008a7adbc1c761e2409bed59b7710e5f2c74/FileManagerBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 2853, 5357, 12, 2890, 16, 5149, 1090, 5014, 16, 3427, 16, 4071, 33, 8381, 4672, 1459, 273, 365, 6315, 588, 1952, 12, 4071, 13, 364, 1577, 734, 316, 1524, 682, 12, 5149, 1090...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2725, 2853, 5357, 12, 2890, 16, 5149, 1090, 5014, 16, 3427, 16, 4071, 33, 8381, 4672, 1459, 273, 365, 6315, 588, 1952, 12, 4071, 13, 364, 1577, 734, 316, 1524, 682, 12, 5149, 1090...
('date', 'TextIndex', 'd', None),
('date', 'FieldIndex', 'd', None),
def __init__(self,id,title=None): self.id=id self.title=title self._ztable=ZTablesCore.ZTable(id)
33e73b8ee6db0f638aa566e190953b6127c22bc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/33e73b8ee6db0f638aa566e190953b6127c22bc8/Catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 350, 16, 2649, 33, 7036, 4672, 365, 18, 350, 33, 350, 365, 18, 2649, 33, 2649, 365, 6315, 94, 2121, 33, 62, 6905, 4670, 18, 62, 1388, 12, 350, 13, 2,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 350, 16, 2649, 33, 7036, 4672, 365, 18, 350, 33, 350, 365, 18, 2649, 33, 2649, 365, 6315, 94, 2121, 33, 62, 6905, 4670, 18, 62, 1388, 12, 350, 13, 2,...
noheaders(), 'file:'+file)
headers, 'file:'+file)
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfourl( open(url2pathname(file), 'rb'), noheaders(), 'file:'+file) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfourl( open(url2pathname(file), 'rb'), noheaders(), 'file:'+file) raise IOError, ('local file error', 'not on local host')
b5916ab065408111cec262e12dbecbce58daf6ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b5916ab065408111cec262e12dbecbce58daf6ec/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 1696, 12, 718, 22, 28336, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 1696, 12, 718, 22, 28336, 12, 7...
`GF(2)`. See help for SR.
`\mathbb{F}_2`. See help for SR.
def __init__(self, n=1, r=1, c=1, e=4, star=False, **kwargs): r""" Small Scale Variants of the AES polynomial system constructor over `GF(2)`. See help for SR. EXAMPLE:: sage: sr = mq.SR(gf2=True) sage: sr SR(1,1,1,4) """ SR_generic.__init__(self, n, r, c, e, star, **kwargs) self._correct_only = kwargs.get("correct_only", False) self._biaffine_only = kwargs.get("biaffine_only", True)
64b5e0e9186de5235119791631990329cc9aecfa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/64b5e0e9186de5235119791631990329cc9aecfa/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 33, 21, 16, 436, 33, 21, 16, 276, 33, 21, 16, 425, 33, 24, 16, 10443, 33, 8381, 16, 2826, 4333, 4672, 436, 8395, 9425, 454, 12591, 11487, 4388, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 33, 21, 16, 436, 33, 21, 16, 276, 33, 21, 16, 425, 33, 24, 16, 10443, 33, 8381, 16, 2826, 4333, 4672, 436, 8395, 9425, 454, 12591, 11487, 4388, ...
line = "%s: %s\n" % (etype, _some_str(value))
line = "%s: %s\n" % (etype, valuestr)
def _format_final_exc_line(etype, value): """Return a list of a single line -- normal case for format_exception_only""" try: printable = value is None or not str(value) except: printable = False if printable: line = "%s\n" % etype else: line = "%s: %s\n" % (etype, _some_str(value)) return line
06ee307698afb5cb1fc71b2f677260855990d162 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/06ee307698afb5cb1fc71b2f677260855990d162/traceback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2139, 67, 6385, 67, 10075, 67, 1369, 12, 5872, 16, 460, 4672, 3536, 990, 279, 666, 434, 279, 2202, 980, 1493, 2212, 648, 364, 740, 67, 4064, 67, 3700, 8395, 775, 30, 23474, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2139, 67, 6385, 67, 10075, 67, 1369, 12, 5872, 16, 460, 4672, 3536, 990, 279, 666, 434, 279, 2202, 980, 1493, 2212, 648, 364, 740, 67, 4064, 67, 3700, 8395, 775, 30, 23474, 273, ...
sage: f = Piecewise([[interval(0,1),f1],[interval(1,2),f2]])
sage: f = Piecewise([[(0,1),f1],[(1,2),f2]]) sage: f.latex() '\\begin{array}{ll} \\left\\{ 1,& 0 < x < 1 ,\\right. \\end{array}' """ x = PolynomialRing(RationalField()).gen() intvls = self.intervals() fcn_list = [p[1] for p in self.list()] tex = ["\\begin{array}{ll} \left\\{"] for i in range(len(fcn_list)): f = fcn_list[i] a = intvls[i][0] b = intvls[i][1] tex.append(str(f(x))) tex.append(",& %s < x < %s ,\\"%(a,b)) tex = tex[:-2] tex.append("\right\. \end{array}") ltex = "" for i in range(len(tex)-1): ltex = ltex + tex[i] ltex = ltex + str(tex[len(tex)-1]).replace("%","") ltex = ltex.replace("\\\right\\.","\\right.") ltex = ltex.replace("\\left\\{","\\left\{ ") return ltex def intervals(self): """ A piecewise non-polynomial example. EXAMPLES: sage: f1 = lambda x:1 sage: f2 = lambda x:1-x sage: f3 = lambda x:exp(x) sage: f4 = lambda x:sin(2*x) sage: f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]]) sage: f.intervals() [(0, 1), (1, 2), (2, 3), (3, 10)] """ return self._intervals def domain(self): return (min(self.intervals()),max(self.intervals())) def functions(self): """ Returns the list of functions (the "pieces"). """ return self._functions def critical_points(self): """ Function to return the critical points. Uses maxima, which prints the warning to use results with caution. Only works for piecewise functions whose parts are polynomials with real critical not occurring on the interval endpoints. EXAMPLES: sage: x = PolynomialRing(RationalField()).gen() sage: f1 = x^0 sage: f2 = 1-x sage: f3 = 2*x sage: f4 = 10*x-x^2 sage: f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]]) sage: f.critical_points() [5.0] """ maxima = sage.interfaces.all.maxima x = PolynomialRing(RationalField()).gen() fcns = self.functions() N = len(fcns) crit_pts = [] for i in range(N): maxima.eval("eqn:diff(%s,x)=0"%fcns[i]) ans = maxima.eval("allroots(eqn)") if "[x =" in ans: i1 = ans.index("[x =") i2 = ans.index("]") r = eval(ans[i1+4:i2]) if self.intervals()[i][0] < r < self.intervals()[i][1]: crit_pts.append(r) return crit_pts def base_ring(self): """ Returns the base-ring (ie, QQ[x]) - useful when this class is extended. """ return (self.functions()[0]).base_ring() def end_points(self): n = self.length() endpts = [self.intervals()[0][0]] for i in range(n): endpts.append(self.intervals()[i][1]) return endpts def __call__(self,x0): """ Evaluates self at x0. Returns the average value of the jump if x0 is an interior endpoint of one of the intervals of self and the usual value otherwise. EXAMPLES: sage: f1 = lambda x:1 sage: f2 = lambda x:1-x sage: f3 = lambda x:exp(x) sage: f4 = lambda x:sin(2*x) sage: f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]]) sage: f(0.5) 1 sage: f(2.5) 12.182493960703473 sage: f(1) 1/2 """ n = self.length() endpts = self.end_points() for i in range(1,n): if x0 == endpts[i]: return (self.functions()[i-1](x0)+self.functions()[i](x0))/2 if x0 == endpts[0]: return self.functions()[0](x0) if x0 == endpts[n]: return self.functions()[n-1](x0) for i in range(n): if endpts[i] < x0 < endpts[i+1]: return self.functions()[i](x0) raise ValueError,"Value not defined outside of domain." def which_function(self,x0): """ Returns the function piece used to evealuate self at x0. EXAMPLES: sage: x = PolynomialRing(RationalField()).gen() sage: f1 = lambda z:1 sage: f2 = 1-x sage: f3 = lambda y:exp(y) sage: f4 = lambda t:sin(2*t) sage: f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]]) sage: f.which_function(3/2) -x + 1 """ n = self.length() endpts = self.end_points() for i in range(1,n): if x0 == endpts[i]: return self.functions()[i-1] if x0 == endpts[0]: return self.functions()[0] if x0 == endpts[n]: return self.functions()[n-1] for i in range(n): if endpts[i] < x0 < endpts[i+1]: return self.functions()[i] raise ValueError,"Function not defined outside of domain." def integral(self): """ Returns the definite integral (as computed by maxima) $\sum_I \int_I self|_I$, as I runs over the intervals belonging to self. EXAMPLES: sage: f1 = lambda x:1 sage: f2 = lambda x:1-x sage: f = Piecewise([[(0,1),f1],[(1,2),f2]]) sage: f.integral() 1/2 sage: f1 = lambda x:-1 sage: f2 = lambda x:2 sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]]) sage: f.integral() (pi/2) """ maxima = sage.interfaces.all.maxima x = PolynomialRing(RationalField()).gen() ints = [maxima('%s'%p[1](x)).integral('x', p[0][0], p[0][1]) \ for p in self.list()] return sage_eval(str(sum(ints)).replace("%","")) def plot(self): """ Returns the plot of self. EXAMPLES: sage: f1 = lambda x:1 sage: f2 = lambda x:1-x sage: f3 = lambda x:exp(x) sage: f4 = lambda x:sin(2*x) sage: f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]])
def plot(self): """ Returns the plot of self.
9393f4e33305539083f72dc3d970829054ff2843 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/9393f4e33305539083f72dc3d970829054ff2843/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 4672, 3536, 2860, 326, 3207, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3207, 12, 2890, 4672, 3536, 2860, 326, 3207, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if milestone.exists: req.redirect(self.env.href.milestone(milestone.name)) else: req.redirect(self.env.href.roadmap())
req.redirect(self.env.href.milestone(milestone.name))
def _do_save(self, req, db, milestone): if req.args.has_key('save'): if not 'name' in req.args.keys(): raise TracError('You must provide a name for the milestone.', 'Required Field Missing') milestone.name = req.args.get('name')
5c5265298af3d56aa07193c3cf67d980008b54bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5c5265298af3d56aa07193c3cf67d980008b54bf/Milestone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 5688, 12, 2890, 16, 1111, 16, 1319, 16, 28664, 4672, 309, 1111, 18, 1968, 18, 5332, 67, 856, 2668, 5688, 11, 4672, 309, 486, 296, 529, 11, 316, 1111, 18, 1968, 18, 245...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 5688, 12, 2890, 16, 1111, 16, 1319, 16, 28664, 4672, 309, 1111, 18, 1968, 18, 5332, 67, 856, 2668, 5688, 11, 4672, 309, 486, 296, 529, 11, 316, 1111, 18, 1968, 18, 245...
for attr in ('center','quat'):
for attr in self.officially_delegated:
def __init__(self, mols): self._saw = {} # for initial debug only; see __getattr__ (dict of attrs we've delegated) for attr in ('center','quat'): self._saw[attr] = 1 # since default delegation for those is correct self._mols = [] try: mols = list(mols) except: mols = [mols] # kluge(?) -- let mols be a single mol or a list of them for mol in mols: self.merge(mol)
a24c75f133a0a472f476651e3c4466c886f36b10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/a24c75f133a0a472f476651e3c4466c886f36b10/extrudeMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 312, 3528, 4672, 365, 6315, 87, 2219, 273, 2618, 468, 364, 2172, 1198, 1338, 31, 2621, 1001, 588, 1747, 972, 261, 1576, 434, 3422, 732, 8081, 30055, 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, 1001, 2738, 972, 12, 2890, 16, 312, 3528, 4672, 365, 6315, 87, 2219, 273, 2618, 468, 364, 2172, 1198, 1338, 31, 2621, 1001, 588, 1747, 972, 261, 1576, 434, 3422, 732, 8081, 30055, 13, ...
Create task's timer.
Create a timer bound to this task that fires at a preset time in the future by invoking the ev_timer() method of `handler' (provided EventHandler object). Timers can fire either only once or repeatedly at fixed time intervals. Repeating timers can also have their next firing time manually adjusted. The mandatory parameter `fire' sets the firing delay in seconds. The optional parameter `interval' sets the firing interval of the timer. If not specified, the timer fires once and then is automatically invalidated. Time values are expressed in second using floating point values. Precision is implementation (and system) dependent. The optional parameter `autoclose', if set to True, creates an "autoclosing" timer: it will be automatically invalidated as soon as all other non-autoclosing task's objects (workers, ports, timers) have finished. Default value is False, which means the timer will retain task's runloop until it is invalidated. Return a new EngineTimer instance. See ClusterShell.Engine.Engine.EngineTimer for more details.
def timer(self, fire, handler, interval=-1.0, autoclose=False): """ Create task's timer. """ assert fire >= 0.0, \ "timer's relative fire time must be a positive floating number" timer = EngineTimer(fire, interval, autoclose, handler) self._engine.add_timer(timer) return timer
e1a7469b232f4ba8855f6a4fe79b7f83f0118ac2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/e1a7469b232f4ba8855f6a4fe79b7f83f0118ac2/Task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5441, 12, 2890, 16, 4452, 16, 1838, 16, 3673, 29711, 21, 18, 20, 16, 23173, 2061, 33, 8381, 4672, 3536, 1788, 279, 5441, 2489, 358, 333, 1562, 716, 29564, 622, 279, 12313, 813, 316, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5441, 12, 2890, 16, 4452, 16, 1838, 16, 3673, 29711, 21, 18, 20, 16, 23173, 2061, 33, 8381, 4672, 3536, 1788, 279, 5441, 2489, 358, 333, 1562, 716, 29564, 622, 279, 12313, 813, 316, 32...
self.assertRaises(TypeError, eaw, 'a')
self.assertRaises(TypeError, eaw, str8('a'))
def test_east_asian_width(self): eaw = self.db.east_asian_width self.assertRaises(TypeError, eaw, 'a') self.assertRaises(TypeError, eaw, '') self.assertRaises(TypeError, eaw, 'ra') self.assertEqual(eaw('\x1e'), 'N') self.assertEqual(eaw('\x20'), 'Na') self.assertEqual(eaw('\uC894'), 'W') self.assertEqual(eaw('\uFF66'), 'H') self.assertEqual(eaw('\uFF1F'), 'F') self.assertEqual(eaw('\u2010'), 'A')
f88fd8b12c5390be9b9f9b3a0e97a4e793a0093d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/f88fd8b12c5390be9b9f9b3a0e97a4e793a0093d/test_unicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30318, 67, 345, 2779, 67, 2819, 12, 2890, 4672, 425, 2219, 273, 365, 18, 1966, 18, 30318, 67, 345, 2779, 67, 2819, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 425, 2219, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30318, 67, 345, 2779, 67, 2819, 12, 2890, 4672, 425, 2219, 273, 365, 18, 1966, 18, 30318, 67, 345, 2779, 67, 2819, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 425, 2219, 16, ...
return Widgets(widgets, len(form_prefix)+1)
return Widgets(widgets, prefix=form_prefix)
def setUpWidgets(form_fields, form_prefix=None, context=None, request=None, form=None, data=(), adapters=None, ignore_request=False): if request is None: request = form.request if context is None and form is not None: context = form.context if form_prefix is None: form_prefix = form.prefix widgets = [] adapter = None for form_field in form_fields: field = form_field.field if form_field.render_context: if adapters is None: adapters = {} # Adapt context, if necessary interface = form_field.interface adapter = adapters.get(interface) if adapter is None: if interface is None: adapter = context else: adapter = interface(context) adapters[interface] = adapter if interface is not None: adapters[interface.__name__] = adapter field = field.bind(adapter) else: field = field.bind(context) readonly = form_field.for_display readonly = readonly or (field.readonly and not form_field.for_input) readonly = readonly or ( (form_field.render_context & interfaces.DISPLAY_UNWRITEABLE) and not canWrite(context, field) ) if form_field.custom_widget is not None: widget = form_field.custom_widget(field, request) else: if readonly: widget = component.getMultiAdapter((field, request), IDisplayWidget) else: widget = component.getMultiAdapter((field, request), IInputWidget) prefix = form_prefix if form_field.prefix: prefix += '.' + form_field.prefix widget.setPrefix(prefix) if ignore_request or readonly or not widget.hasInput(): # Get the value to render if form_field.__name__ in data: widget.setRenderedValue(data[form_field.__name__]) elif form_field.get_rendered is not None: widget.setRenderedValue(form_field.get_rendered(form)) elif form_field.render_context: widget.setRenderedValue(field.get(adapter)) else: widget.setRenderedValue(field.default) widgets.append((not readonly, widget)) return Widgets(widgets, len(form_prefix)+1)
b454136ef456c884ae4bf11b3f8d29e8bd8fd1f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9642/b454136ef456c884ae4bf11b3f8d29e8bd8fd1f1/form.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 16166, 12, 687, 67, 2821, 16, 646, 67, 3239, 33, 7036, 16, 819, 33, 7036, 16, 590, 33, 7036, 16, 646, 33, 7036, 16, 501, 33, 9334, 17272, 33, 7036, 16, 2305, 67, 2293, 33, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 16166, 12, 687, 67, 2821, 16, 646, 67, 3239, 33, 7036, 16, 819, 33, 7036, 16, 590, 33, 7036, 16, 646, 33, 7036, 16, 501, 33, 9334, 17272, 33, 7036, 16, 2305, 67, 2293, 33, 8...
exprArgCache = {}
def nullDebugAction(*args): """'Do-nothing' debug action, to suppress debugging output during parsing.""" pass
0d5c070900efe583f55b5d4d6525eb2686936701 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/0d5c070900efe583f55b5d4d6525eb2686936701/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 446, 2829, 1803, 30857, 1968, 4672, 3536, 11, 3244, 17, 30874, 11, 1198, 1301, 16, 358, 12257, 10450, 876, 4982, 5811, 12123, 1342, 225, 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, 446, 2829, 1803, 30857, 1968, 4672, 3536, 11, 3244, 17, 30874, 11, 1198, 1301, 16, 358, 12257, 10450, 876, 4982, 5811, 12123, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
c.bookmarkPage("P2_FITR",fitType="FitR",left=1*inch,bottom=2*inch,right=5*inch,top=6*inch)
c.bookmarkPage("P2_FITR",fit="FitR",left=1*inch,bottom=2*inch,right=5*inch,top=6*inch)
def test1(self):
f811a1779ad79be84f8ef41d8fa39ca75e2645cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/f811a1779ad79be84f8ef41d8fa39ca75e2645cc/test_pdfgen_links.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
slice_x = 5 slice_y = 3
slice_x = 5 + self.gcomprisBoard.level slice_y = 3 + self.gcomprisBoard.level
def display_weather(self): # Some constant to define the sea area # The sea area is defined in the global self.sea_area slice_x = 5 slice_y = 3 step_x = (self.sea_area[2]-self.sea_area[0])/slice_x step_y = (self.sea_area[3]-self.sea_area[1])/slice_y
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, 2562, 67, 1814, 4806, 12, 2890, 4672, 468, 10548, 5381, 358, 4426, 326, 695, 69, 5091, 468, 1021, 695, 69, 5091, 353, 2553, 316, 326, 2552, 365, 18, 307, 69, 67, 5036, 2788, 67, 92, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 1814, 4806, 12, 2890, 4672, 468, 10548, 5381, 358, 4426, 326, 695, 69, 5091, 468, 1021, 695, 69, 5091, 353, 2553, 316, 326, 2552, 365, 18, 307, 69, 67, 5036, 2788, 67, 92, ...
elif severity <= NotifySeverity.NSDebug:
elif severity <= NSDebug:
def setSeverity(self, severity): from pandac.PandaModules import NotifySeverity if severity >= NotifySeverity.NSError: self.setWarning(0) self.setInfo(0) self.setDebug(0) elif severity == NotifySeverity.NSWarning: self.setWarning(1) self.setInfo(0) self.setDebug(0) elif severity == NotifySeverity.NSInfo: self.setWarning(1) self.setInfo(1) self.setDebug(0) elif severity <= NotifySeverity.NSDebug: self.setWarning(1) self.setInfo(1) self.setDebug(1)
439beadb7b0354026959fb92d947dce0178d4bfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/439beadb7b0354026959fb92d947dce0178d4bfc/Notifier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 21630, 12, 2890, 16, 11426, 4672, 628, 293, 464, 1077, 18, 52, 464, 69, 7782, 1930, 10918, 21630, 309, 11426, 1545, 10918, 21630, 18, 3156, 668, 30, 365, 18, 542, 6210, 12, 20, 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, 444, 21630, 12, 2890, 16, 11426, 4672, 628, 293, 464, 1077, 18, 52, 464, 69, 7782, 1930, 10918, 21630, 309, 11426, 1545, 10918, 21630, 18, 3156, 668, 30, 365, 18, 542, 6210, 12, 20, 13...
"""Your shared library package contains non-versioned directories."""
"""Your shared library package contains non-versioned directories. Those will not allow to install multiple versions of the package in parallel."""
def check(self, pkg):
751ad2065972e4fb64b6d623b68426f04b14bc0a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10341/751ad2065972e4fb64b6d623b68426f04b14bc0a/LibraryPolicyCheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3475, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3475, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
parser.add_option("-c", "--cleanup", dest="cleanup", action="store_true", default=False, help="Print user friendly messages")
parser.add_option("--cleanup", dest="cleanup", action="store_true", default=False, help="Print user friendly messages")
def parse_options(): parser = OptionParser() parser.add_option("-u", "--user", dest="user", default="", help="MySQL user") parser.add_option("-H", "--host", dest="host", default="localhost", help="MySQL host (default: localhost)") parser.add_option("-p", "--password", dest="password", default="", help="MySQL password") parser.add_option("--ask-pass", action="store_true", dest="prompt_password", help="Prompt for password") parser.add_option("-P", "--port", dest="port", type="int", default="3306", help="TCP/IP port (default: 3306)") parser.add_option("-S", "--socket", dest="socket", default="/var/run/mysqld/mysql.sock", help="MySQL socket file. Only applies when host is localhost") parser.add_option("", "--defaults-file", dest="defaults_file", default="", help="Read from MySQL configuration file. Overrides all other options") parser.add_option("-d", "--database", dest="database", help="Database name (required unless table is fully qualified)") parser.add_option("-t", "--table", dest="table", help="Table with AUTO_INCREMENT column to alter (optionally fully qualified)") parser.add_option("-g", "--ghost", dest="ghost", help="Table name to serve as ghost. This table will be created and synchronized with the original table") parser.add_option("-a", "--alter", dest="alter_statement", help="Comma delimited ALTER statement details, excluding the 'ALTER TABLE t' itself") parser.add_option("-c", "--chunk-size", dest="chunk_size", type="int", default=1000, help="Number of rows to act on in chunks. Default: 1000") parser.add_option("-l", "--lock-chunks", action="store_true", dest="lock_chunks", default=False, help="User LOCK TABLES for each chunk") parser.add_option("--sleep", dest="sleep_millis", type="int", default=0, help="Number of milliseconds to sleep between chunks. Default: 0") parser.add_option("-c", "--cleanup", dest="cleanup", action="store_true", default=False, help="Print user friendly messages") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", help="Print user friendly messages") parser.add_option("--print-only", dest="print_only", action="store_true", help="Do not execute. Only print statement") return parser.parse_args()
8f00392367bb253def74558b23d6847a4670b267 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10338/8f00392367bb253def74558b23d6847a4670b267/oak-online-alter-table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2116, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 89, 3113, 5238, 1355, 3113, 1570, 1546, 1355, 3113, 805, 1546, 3113, 2809, 1546, 28723, 729, 7923, 2082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2116, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 89, 3113, 5238, 1355, 3113, 1570, 1546, 1355, 3113, 805, 1546, 3113, 2809, 1546, 28723, 729, 7923, 2082, ...
- newIdentifier .setResultsName('classname') + Optional('(' - argument_list + ')' ) + ':' + suite .setResultsName('class_body_stmts') ) .setParseAction(self._action_class_def)
- newIdentifier .setResultsName('classname') + Optional('(' - argument_list + ')' ) .setFailAction(ChMsg(prepend='constructor arguments: ')) + ':' + suite .setResultsName('class_body_stmts') ) .setParseAction(self._action_class_def)\ .setFailAction(ChMsg(prepend='class definition: '))
classdef = Group(kw('class') - newIdentifier .setResultsName('classname') + Optional('(' - argument_list + ')' ) #error msg: 'Arguments for compile time constructor :' + ':' + suite .setResultsName('class_body_stmts') ) .setParseAction(self._action_class_def) #.setErrMsgStart('class definition: ')
8d423a3a49fcffb9fd2045c1638eeede3472d2e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2720/8d423a3a49fcffb9fd2045c1638eeede3472d2e1/simlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 667, 536, 273, 3756, 12, 9987, 2668, 1106, 6134, 300, 394, 3004, 21821, 263, 542, 3447, 461, 2668, 18340, 6134, 397, 4055, 2668, 2668, 300, 1237, 67, 1098, 397, 5777, 262, 468, 1636, 1234, 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, 667, 536, 273, 3756, 12, 9987, 2668, 1106, 6134, 300, 394, 3004, 21821, 263, 542, 3447, 461, 2668, 18340, 6134, 397, 4055, 2668, 2668, 300, 1237, 67, 1098, 397, 5777, 262, 468, 1636, 1234, 30,...
n.statements = new Node(t, BLOCK)
n.statements = Node(t, BLOCK)
def DEFAULT__initializeStatements(n, t): n.statements = new Node(t, BLOCK)
c7acf93c85d2480e1e64e292c2f42ae1721eefbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/c7acf93c85d2480e1e64e292c2f42ae1721eefbe/Builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3331, 972, 11160, 14663, 12, 82, 16, 268, 4672, 290, 18, 18393, 273, 394, 2029, 12, 88, 16, 14073, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3331, 972, 11160, 14663, 12, 82, 16, 268, 4672, 290, 18, 18393, 273, 394, 2029, 12, 88, 16, 14073, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'ext_modules': ('build_ext', 'modules'),
'ext_modules': ('build_ext', 'extensions'),
def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; parse the command-line, creating and customizing instances of the command class for each command found on the command-line; run each of those commands. The Distribution instance might be an instance of a class supplied via the 'distclass' keyword argument to 'setup'; if no such class is supplied, then the 'Distribution' class (also in this module) is instantiated. All other arguments to 'setup' (except for 'cmdclass') are used to set attributes of the Distribution instance. The 'cmdclass' argument, if supplied, is a dictionary mapping command names to command classes. Each command encountered on the command line will be turned into a command class, which is in turn instantiated; any class found in 'cmdclass' is used in place of the default, which is (for command 'foo_bar') class 'FooBar' in module 'distutils.command.foo_bar'. The command object must provide an 'options' attribute which is a list of option specifiers for 'distutils.fancy_getopt'. Any command-line options between the current and the next command are used to set attributes in the current command object. When the entire command-line has been successfully parsed, calls the 'run' method on each command object in turn. This method will be driven entirely by the Distribution object (which each command object has a reference to, thanks to its constructor), and the command-specific options that became attributes of each command object.""" # Determine the distribution class -- either caller-supplied or # our Distribution (see below). klass = attrs.get ('distclass') if klass: del attrs['distclass'] else: klass = Distribution # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it dist = klass (attrs) # If we had a config file, this is where we would parse it: override # the client-supplied command options, but be overridden by the # command line. # Parse the command line; any command-line errors are the end-users # fault, so turn them into SystemExit to suppress tracebacks. try: dist.parse_command_line (sys.argv[1:]) except DistutilsArgError, msg: raise SystemExit, msg # And finally, run all the commands found on the command line. dist.run_commands ()
1ae32466792dde8eab7cafc933f1dbb5984847f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1ae32466792dde8eab7cafc933f1dbb5984847f6/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 261, 636, 7039, 4672, 3536, 1986, 6878, 358, 326, 19893, 5471, 30, 741, 7756, 3433, 3875, 2728, 4260, 358, 741, 16, 316, 279, 3551, 715, 16600, 1523, 471, 729, 17, 3069, 837, 4031,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 261, 636, 7039, 4672, 3536, 1986, 6878, 358, 326, 19893, 5471, 30, 741, 7756, 3433, 3875, 2728, 4260, 358, 741, 16, 316, 279, 3551, 715, 16600, 1523, 471, 729, 17, 3069, 837, 4031,...
env['CONTENT_TYPE'] = self.headers.typeheader length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length accept = [] for line in self.headers.getallmatchingheaders('accept'): if line[:1] in string.whitespace: accept.append(string.strip(line)) else: accept = accept + string.split(line[7:], ',') env['HTTP_ACCEPT'] = string.joinfields(accept, ',') ua = self.headers.getheader('user-agent') if ua: env['HTTP_USER_AGENT'] = ua co = filter(None, self.headers.getheaders('cookie')) if co: env['HTTP_COOKIE'] = string.join(co, ', ') decoded_query = string.replace(query, '+', ' ')
self.log_error("CGI script exited OK") else: os.environ.update(env) save_argv = sys.argv save_stdin = sys.stdin save_stdout = sys.stdout save_stderr = sys.stderr
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%s)" % `scriptname`) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%s)" % `scriptname`) return if not executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return nobody = nobody_uid() self.send_response(200, "Script output follows") self.wfile.flush() # Always flush before forking pid = os.fork() if pid != 0: # Parent pid, sts = os.waitpid(pid, 0) if sts: self.log_error("CGI script exit status x%x" % sts) return # Child try: # Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html # XXX Much of the following could be prepared ahead of time! env = {} env['SERVER_SOFTWARE'] = self.version_string() env['SERVER_NAME'] = self.server.server_name env['GATEWAY_INTERFACE'] = 'CGI/1.1' env['SERVER_PROTOCOL'] = self.protocol_version env['SERVER_PORT'] = str(self.server.server_port) env['REQUEST_METHOD'] = self.command uqrest = urllib.unquote(rest) env['PATH_INFO'] = uqrest env['PATH_TRANSLATED'] = self.translate_path(uqrest) env['SCRIPT_NAME'] = scriptname if query: env['QUERY_STRING'] = query host = self.address_string() if host != self.client_address[0]: env['REMOTE_HOST'] = host env['REMOTE_ADDR'] = self.client_address[0] # AUTH_TYPE # REMOTE_USER # REMOTE_IDENT if self.headers.typeheader is None: env['CONTENT_TYPE'] = self.headers.type else: env['CONTENT_TYPE'] = self.headers.typeheader length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length accept = [] for line in self.headers.getallmatchingheaders('accept'): if line[:1] in string.whitespace: accept.append(string.strip(line)) else: accept = accept + string.split(line[7:], ',') env['HTTP_ACCEPT'] = string.joinfields(accept, ',') ua = self.headers.getheader('user-agent') if ua: env['HTTP_USER_AGENT'] = ua co = filter(None, self.headers.getheaders('cookie')) if co: env['HTTP_COOKIE'] = string.join(co, ', ') # XXX Other HTTP_* headers decoded_query = string.replace(query, '+', ' ') try: os.setuid(nobody) except os.error: pass os.dup2(self.rfile.fileno(), 0) os.dup2(self.wfile.fileno(), 1) print scriptfile, script, decoded_query os.execve(scriptfile, [script, decoded_query], env) except: self.server.handle_error(self.request, self.client_address) os._exit(127)
508dabac60ddd25bfe9e80d24ce242484152da99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/508dabac60ddd25bfe9e80d24ce242484152da99/CGIHTTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 277, 273, 533, 18, 86, 4720, 12, 8792, 16, 6787, 13, 309, 277,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 277, 273, 533, 18, 86, 4720, 12, 8792, 16, 6787, 13, 309, 277,...
return json.load(file(file_name))
try: return json.load(file(file_name, 'rb')) except ValueError: logging.exception('error loading JSON db on %s' % mount) return {}
def load_database(mount): """ Returns a dictionary of the JSON database that lives on the given device. The database lives at [MOUNT]/.miro/json """ file_name = os.path.join(mount, '.miro', 'json') if not os.path.exists(file_name): return {} return json.load(file(file_name))
8904d06487651344e5b94b80eee720d87deafe5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/8904d06487651344e5b94b80eee720d87deafe5e/devices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 6231, 12, 4778, 4672, 3536, 2860, 279, 3880, 434, 326, 1796, 2063, 716, 328, 3606, 603, 326, 864, 2346, 18, 225, 1021, 2063, 328, 3606, 622, 306, 5980, 5321, 65, 15865, 9197, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 6231, 12, 4778, 4672, 3536, 2860, 279, 3880, 434, 326, 1796, 2063, 716, 328, 3606, 603, 326, 864, 2346, 18, 225, 1021, 2063, 328, 3606, 622, 306, 5980, 5321, 65, 15865, 9197, ...
log( "ol.read", 1 )
def run( self ): global terminate
7c7a679102e6ac5ef4702ffb14ac6f40280d6ba5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10890/7c7a679102e6ac5ef4702ffb14ac6f40280d6ba5/slimv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 262, 30, 2552, 10850, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 1086, 12, 365, 262, 30, 2552, 10850, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
""" if (gridWindow.HasCapture()): gridWindow.ReleaseMouse()
gridWindow.ReleaseMouse()
def stopHovering(): del self.hoverImageRow """ @@@ this comment is applicable for all 3 ReleaseMouse calls in this routine A possible bug (either here in SideBar or perhaps within wxWidgets) causes this window to not have the mouse capture event though it never explicit released it. You can verify this by enabling (i.e., commenting in) this assert: assert gridWindow.HasCapture() """ if (gridWindow.HasCapture()): gridWindow.ReleaseMouse() for button in blockItem.buttons: method = getattr (type (button), "onOverButton", False) if method: if button.buttonState['overButton']: button.buttonState['overButton'] = False method (button, item)
b035b07881ab7179b37a4c041157846a955a3979 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b035b07881ab7179b37a4c041157846a955a3979/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 21184, 310, 13332, 1464, 365, 18, 24969, 2040, 1999, 3536, 22175, 36, 333, 2879, 353, 12008, 364, 777, 890, 10819, 9186, 4097, 316, 333, 12245, 432, 3323, 7934, 261, 73, 2927, 2674, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 21184, 310, 13332, 1464, 365, 18, 24969, 2040, 1999, 3536, 22175, 36, 333, 2879, 353, 12008, 364, 777, 890, 10819, 9186, 4097, 316, 333, 12245, 432, 3323, 7934, 261, 73, 2927, 2674, ...
pytime = self.__last_3dupdate_time - now self.__last_pytime = pytime if debug_pyrex_prints: print "python stuff took", pytime if debug_timing_loop_on_sbar: msg = "sim took %0.3f, hit frame %03d, py took %0.3f" % \ (simtime, self.__frame_number, pytime) env.history.statusbar_msg(msg)
def sim_frame_callback(self, last_frame): #bruce 060102 "Per-frame callback function for simulator object." # Note: this was called 3550 times for minimizing a small C3 sp3 hydrocarbon... better check the elapsed time quickly. #e Maybe we should make this into a lambda, or even code it in C, to optimize it. if self.PREPARE_TO_CLOSE: # wware 060406 bug 1263 - if exiting the program, interrupt the simulator from sim import SimulatorInterrupted raise SimulatorInterrupted self.__frame_number += 1 if debug_all_frames: from sim import getFrame if debug_sim_exceptions: # intentionally buggy code print "frame %d" % self.__frame_number, self._simobj.getFrame() # this is a bug, that attr should not exist else: # correct code print "frame %d" % self.__frame_number, getFrame()[debug_all_frames_atom_index] pass try: # Decide whether to update the 3D view and/or the progress indicators. # Original code: let sim use up most of the real time used, measuring redraw timing in order to let that happen. # see below for more info. #bruce 060530 generalizing this to ask self.update_cond how to decide. now = time.time() # real time simtime = now - self.__last_3dupdate_time # time the sim has been churning away since the last update was completed pytime = self.__last_pytime nframes = self.__frame_number - self.__last_3dupdate_frame update_3dview = self.sim_frame_callback_update_check( simtime, pytime, nframes ) # call this even if later code overrides it # always show the last frame - wware 060314 if last_frame or debug_all_frames: update_3dview = True # now we know whether we want to update the 3d view (and save new values for the __last variables). if update_3dview: if debug_pyrex_prints: print "sim hit frame %d in" % self.__frame_number, simtime #e maybe let frame number be an arg from C to the callback in the future? self.__last_3dupdate_time = now self.__last_3dupdate_frame = self.__frame_number # Note that we also (redundantly) store over this the time *after* we do our other work here, in case redraw takes long. # i.e.(??) (when using original code) we always let sim run for 0.05 sec even if our python loop body took longer. # maybe best to let sim run even longer, i.e. max(0.05, python loop body time), but no more than say 1 or 2 sec. try: self.sim_frame_callback_worker( self.__frame_number) # might call self.abort_sim_run() or set self.need_process_events except: print_compact_traceback("exception in sim_frame_callback_worker, aborting run: ") self.abort_sim_run("exception in sim_frame_callback_worker(%d)" % self.__frame_number ) # sets flag inside sim object self.__last_3dupdate_time = time.time() # in case later than 'now' set earlier # use this difference to adjust 0.05 above, for the upcoming period of sim work; # note, in current code this also affects abortability pytime = self.__last_3dupdate_time - now self.__last_pytime = pytime if debug_pyrex_prints: print "python stuff took", pytime # python stuff took 0.00386619567871 -- for when no real work done, just overhead; small real egs more like 0.03
4f665c341ee43af657e8d8743dfac7c27da0bb39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/4f665c341ee43af657e8d8743dfac7c27da0bb39/runSim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 67, 3789, 67, 3394, 12, 2890, 16, 1142, 67, 3789, 4672, 468, 2848, 3965, 13026, 1611, 3103, 315, 2173, 17, 3789, 1348, 445, 364, 3142, 11775, 733, 1199, 468, 3609, 30, 333, 1703, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 67, 3789, 67, 3394, 12, 2890, 16, 1142, 67, 3789, 4672, 468, 2848, 3965, 13026, 1611, 3103, 315, 2173, 17, 3789, 1348, 445, 364, 3142, 11775, 733, 1199, 468, 3609, 30, 333, 1703, ...
commands.tag(self._getUI(), repo, tag, **opts)
commands.tag(repo.ui, repo, tag, **opts)
def _tag(self, tag): """ Tag the tip with a given identifier """ # TODO: keep a handle on the changeset holding this tag? Then # we can extract author, log, date from it. opts = self._defaultOpts('tag')
053b618c6f653782e2a3803fccf211137bc07868 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/053b618c6f653782e2a3803fccf211137bc07868/hglib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2692, 12, 2890, 16, 1047, 4672, 3536, 4034, 326, 9529, 598, 279, 864, 2756, 3536, 468, 2660, 30, 3455, 279, 1640, 603, 326, 22463, 19918, 333, 1047, 35, 9697, 468, 732, 848, 2608, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2692, 12, 2890, 16, 1047, 4672, 3536, 4034, 326, 9529, 598, 279, 864, 2756, 3536, 468, 2660, 30, 3455, 279, 1640, 603, 326, 22463, 19918, 333, 1047, 35, 9697, 468, 732, 848, 2608, ...
return fields.append({'value' : value, 'text' : value + _("MARC tag") }) else: return fields
out.append({'value' : value, 'text' : str(value) + " " + _("MARC tag") }) return out
def _add_mark_to_field(self, value, fields, ln, chars = 1): """Adds the current value as a MARC tag in the fields array Useful for advanced search"""
bea1d2ac0c1cb2283225f3b5d8251ad74b5cc033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/bea1d2ac0c1cb2283225f3b5d8251ad74b5cc033/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 3355, 67, 869, 67, 1518, 12, 2890, 16, 460, 16, 1466, 16, 7211, 16, 5230, 273, 404, 4672, 3536, 3655, 326, 783, 460, 487, 279, 490, 27206, 1047, 316, 326, 1466, 526, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 3355, 67, 869, 67, 1518, 12, 2890, 16, 460, 16, 1466, 16, 7211, 16, 5230, 273, 404, 4672, 3536, 3655, 326, 783, 460, 487, 279, 490, 27206, 1047, 316, 326, 1466, 526, 1...
(filelist, masked) = self.collect_bbfiles()
def matchFiles(self, buildfile): """ Find the .bb files which match the expression in 'buildfile'. """
16d299c6ce7df1e96a17488a386f286bea487500 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/16d299c6ce7df1e96a17488a386f286bea487500/cooker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 2697, 12, 2890, 16, 1361, 768, 4672, 3536, 4163, 326, 263, 9897, 1390, 1492, 845, 326, 2652, 316, 296, 3510, 768, 10332, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 2697, 12, 2890, 16, 1361, 768, 4672, 3536, 4163, 326, 263, 9897, 1390, 1492, 845, 326, 2652, 316, 296, 3510, 768, 10332, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
name = 'visit_' + self.__class__.__name__ method = getattr(visitor, name, visitor.unknown_visit) visitor.document.reporter.debug(name, category='nodes.Node.walkabout')
visitor.document.reporter.debug(self.__class__.__name__, category='nodes.Node.walkabout')
def walkabout(self, visitor): """ Perform a tree traversal similarly to `Node.walk()` (which see), except also call ``depart_...`` methods before exiting each node. If there is no ``depart_particular_node`` method for a node of type ``particular_node``, the ``unknown_departure`` method is called.
5f61b1a9b47ca28d544232f9f82b373f45fe9d32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/5f61b1a9b47ca28d544232f9f82b373f45fe9d32/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 21071, 12, 2890, 16, 8000, 4672, 3536, 11217, 279, 2151, 15940, 7281, 715, 358, 1375, 907, 18, 11348, 20338, 261, 12784, 2621, 3631, 1335, 2546, 745, 12176, 323, 2680, 67, 2777, 1033...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 21071, 12, 2890, 16, 8000, 4672, 3536, 11217, 279, 2151, 15940, 7281, 715, 358, 1375, 907, 18, 11348, 20338, 261, 12784, 2621, 3631, 1335, 2546, 745, 12176, 323, 2680, 67, 2777, 1033...
Stats.get_stats().inc("_get_simple_bins_idxs")
def _get_simple_bins_idxs(self, obj): Stats.get_stats().inc("_get_simple_bins_idxs") pos = ( float(obj.pos[0]) / self.size[0] * self.cols, float(obj.pos[1]) / self.size[1] * self.rows ) bin_i = int(pos[0]) bin_j = int(pos[1]) i_pos = pos[0] - bin_i j_pos = pos[1] - bin_j
9b09cf6ef07d2ee54bff2ed908465c95a67128b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4253/9b09cf6ef07d2ee54bff2ed908465c95a67128b1/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 9647, 67, 11862, 67, 24156, 12, 2890, 16, 1081, 4672, 949, 273, 261, 1431, 12, 2603, 18, 917, 63, 20, 5717, 342, 365, 18, 1467, 63, 20, 65, 380, 365, 18, 6842, 16, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 9647, 67, 11862, 67, 24156, 12, 2890, 16, 1081, 4672, 949, 273, 261, 1431, 12, 2603, 18, 917, 63, 20, 5717, 342, 365, 18, 1467, 63, 20, 65, 380, 365, 18, 6842, 16, 14...
assert len(filenames) == 1, "Unexpected files/directories in %s: %s" % (base, ' '.join(filenames))
if len(filenames) > 1: filenames.sort(key=lambda x: x.count(os.path.sep) + (os.path.altsep and x.count(os.path.altsep) or 0))
def egg_info_path(self, filename): if self._egg_info_path is None: if self.editable: base = self.source_dir else: base = os.path.join(self.source_dir, 'pip-egg-info') filenames = os.listdir(base) if self.editable: filenames = [] for root, dirs, files in os.walk(base): for dir in vcs.dirnames: if dir in dirs: dirs.remove(dir) for dir in dirs: # Don't search in anything that looks like a virtualenv environment if (os.path.exists(os.path.join(root, dir, 'bin', 'python')) or os.path.exists(os.path.join(root, dir, 'Scripts', 'Python.exe'))): dirs.remove(dir) # Also don't search through tests if dir == 'test' or dir == 'tests': dirs.remove(dir) filenames.extend([os.path.join(root, dir) for dir in dirs]) filenames = [f for f in filenames if f.endswith('.egg-info')] assert filenames, "No files/directories in %s (from %s)" % (base, filename) assert len(filenames) == 1, "Unexpected files/directories in %s: %s" % (base, ' '.join(filenames)) self._egg_info_path = os.path.join(base, filenames[0]) return os.path.join(self._egg_info_path, filename)
792a2775de17e268d8c1c32328d5d88e492a0bc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12982/792a2775de17e268d8c1c32328d5d88e492a0bc8/req.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25144, 67, 1376, 67, 803, 12, 2890, 16, 1544, 4672, 309, 365, 6315, 23171, 67, 1376, 67, 803, 353, 599, 30, 309, 365, 18, 19653, 30, 1026, 273, 365, 18, 3168, 67, 1214, 469, 30, 1026...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25144, 67, 1376, 67, 803, 12, 2890, 16, 1544, 4672, 309, 365, 6315, 23171, 67, 1376, 67, 803, 353, 599, 30, 309, 365, 18, 19653, 30, 1026, 273, 365, 18, 3168, 67, 1214, 469, 30, 1026...
print latest_snapshot
def handle_jsonmsg_event(self, e): msg = json.loads(e.jsonstring) if msg["type"] != "monitoring" : return CONTINUE if not "command" in msg: lg.debug( "Received message with no command field" ) return CONTINUE if msg["command"] == "subscribe": # Add stream to interested entities for this msg_type if not msg["msg_type"] in self.subscribers: self.subscribers[msg["msg_type"]] = [] self.subscribers[msg["msg_type"]].append(e) return CONTINUE # Store self.pending_gui_queries[msg["xid"]] = e lg.debug( "got JSON switch query request") dpid = int(str(msg["dpid"]), 16) if msg["command"] == "portstats" : self.pending_switch_queries.add( msg["xid"] ) self.send_port_stats_request( dpid, msg["xid"] ) elif msg["command"] == "tablestats": self.pending_switch_queries.add( msg["xid"] ) self.send_table_stats_request( dpid, msg["xid"] ) elif msg["command"] == "aggstats": self.pending_switch_queries.add( msg["xid"] ) flow = of.ofp_match() flow.wildcards = 0xffffffff self.send_aggregate_stats_request( dpid, flow, 0xff, msg["xid"] ) elif msg["command"] == "latestsnapshot": # Look at the latest snapshot we have (if any) for this switch # and post a custom event if dpid in self.switches: self.pending_switch_queries.add( msg["xid"] ) latest_snapshot = self.get_latest_switch_stats(dpid) print latest_snapshot if latest_snapshot != None: reply = SwitchQueryReplyEvent( msg["xid"], dpid, \ SwitchQueryReplyEvent.QUERY_LATEST_SNAPSHOT,\ latest_snapshot ) self.post( pyevent( SwitchQueryReplyEvent.NAME, reply ) ) elif msg["command"] == "flowstats": self.pending_switch_queries.add( msg["xid"] ) flow = of.ofp_match() flow.wildcards = 0xffffffff self.send_flow_stats_request(dpid, flow, 0xff, msg["xid"]) elif msg["command"] == "queuestats": self.pending_switch_queries.add( msg["xid"] ) self.send_queue_stats_request(dpid, msg["xid"]) return CONTINUE
7ac8a1fbddf31c441a2860afea03f1182e25f717 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11602/7ac8a1fbddf31c441a2860afea03f1182e25f717/monitoring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1977, 3576, 67, 2575, 12, 2890, 16, 425, 4672, 225, 1234, 273, 1163, 18, 17135, 12, 73, 18, 1977, 1080, 13, 225, 309, 1234, 9614, 723, 11929, 480, 315, 27665, 6, 294, 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, 1640, 67, 1977, 3576, 67, 2575, 12, 2890, 16, 425, 4672, 225, 1234, 273, 1163, 18, 17135, 12, 73, 18, 1977, 1080, 13, 225, 309, 1234, 9614, 723, 11929, 480, 315, 27665, 6, 294, 327, ...
schema = ZConfig.loadSchema(os.path.join(os.path.dirname(ZEO.__file__), "schema.xml"))
def options(args): """Password-specific options loaded from regular ZEO config file.""" schema = ZConfig.loadSchema(os.path.join(os.path.dirname(ZEO.__file__), "schema.xml")) try: options, args = getopt.getopt(args, "C:", ["configure="]) except getopt.error, msg: usage(msg) config = None delete = False for k, v in options: if k == '-C' or k == '--configure': config, nil = ZConfig.loadConfig(schema, v) if k == '-d' or k == '--delete': delete = True if config is None: usage("Must specifiy configuration file") password = None if delete: if not args: usage("Must specify username to delete") elif len(args) > 1: usage("Too many arguments") username = args[0] else: if not args: usage("Must specify username") elif len(args) > 2: usage("Too many arguments") elif len(args) == 1: username = args[0] else: username, password = args return config.zeo, delete, username, password
f7ed0f34b0e09ed8547d402667d042eb4903a0ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/f7ed0f34b0e09ed8547d402667d042eb4903a0ef/zeopasswd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 702, 12, 1968, 4672, 3536, 3913, 17, 12524, 702, 4203, 628, 6736, 2285, 41, 51, 642, 585, 12123, 225, 775, 30, 702, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 1968, 16, 315, 39, 277...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 702, 12, 1968, 4672, 3536, 3913, 17, 12524, 702, 4203, 628, 6736, 2285, 41, 51, 642, 585, 12123, 225, 775, 30, 702, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 1968, 16, 315, 39, 277...
DataPixmap.window.realize() style = DataPixmap.window.get_style() pixmap, mask = create_pixmap_from_xpm_d(DataPixmap.window.get_window(), style.bg[STATE_NORMAL], data) GtkPixmap.__init__ (self, pixmap, mask) class MessageDialog (GtkDialog):
gtk.Image.__init__ (self) pixmap, mask = gtk.gdk.pixmap_colormap_create_from_xpm_d(None, self.window.get_colormap(), None, data) self.set_from_pixmap (pixmap, mask) class MessageDialog (gtk.Dialog):
def __init__ (self, data): """ Constructor. """ DataPixmap.window.realize() style = DataPixmap.window.get_style() pixmap, mask = create_pixmap_from_xpm_d(DataPixmap.window.get_window(), style.bg[STATE_NORMAL], data) GtkPixmap.__init__ (self, pixmap, mask)
ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 501, 4672, 3536, 11417, 18, 3536, 1910, 21816, 1458, 18, 5668, 18, 7688, 554, 1435, 2154, 273, 1910, 21816, 1458, 18, 5668, 18, 588, 67, 4060, 1435, 11871...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 501, 4672, 3536, 11417, 18, 3536, 1910, 21816, 1458, 18, 5668, 18, 7688, 554, 1435, 2154, 273, 1910, 21816, 1458, 18, 5668, 18, 588, 67, 4060, 1435, 11871...
if not xml_avalable: return param_dict
def get_as_dict(self, app_name): param_dict = {} if not xml_avalable: return param_dict if app_name in self.app: for child in self.app[app_name].childNodes: if child.nodeType == child.ELEMENT_NODE: attrib_dict = {} text = '' for grandchild_node in child.childNodes: if grandchild_node.nodeType == child.TEXT_NODE: text = grandchild_node.data for i in range(child.attributes.length): attrib_dict[child.attributes.item(i).name] = child.attributes.item(i).nodeValue param_dict[child.tagName] = text, attrib_dict return param_dict else: new_app = self.doc.createElement(app_name) self.doc.documentElement.appendChild(new_app) self.app[app_name] = new_app return param_dict
29957c6750bd7b2fd36cfd6f271ea524610e19be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11701/29957c6750bd7b2fd36cfd6f271ea524610e19be/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 345, 67, 1576, 12, 2890, 16, 595, 67, 529, 4672, 579, 67, 1576, 273, 2618, 309, 595, 67, 529, 316, 365, 18, 2910, 30, 364, 1151, 316, 365, 18, 2910, 63, 2910, 67, 529, 800...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 345, 67, 1576, 12, 2890, 16, 595, 67, 529, 4672, 579, 67, 1576, 273, 2618, 309, 595, 67, 529, 316, 365, 18, 2910, 30, 364, 1151, 316, 365, 18, 2910, 63, 2910, 67, 529, 800...
logging.exception("Failed to start instance") return (False, "Block device error: %s" % str(err))
_Fail("Block device error: %s", err, exc=True)
def StartInstance(instance): """Start an instance. @type instance: L{objects.Instance} @param instance: the instance object @rtype: boolean @return: whether the startup was successful or not """ running_instances = GetInstanceList([instance.hypervisor]) if instance.name in running_instances: return (True, "Already running") try: block_devices = _GatherAndLinkBlockDevs(instance) hyper = hypervisor.GetHypervisor(instance.hypervisor) hyper.StartInstance(instance, block_devices) except errors.BlockDeviceError, err: logging.exception("Failed to start instance") return (False, "Block device error: %s" % str(err)) except errors.HypervisorError, err: logging.exception("Failed to start instance") _RemoveBlockDevLinks(instance.name, instance.disks) return (False, "Hypervisor error: %s" % str(err)) return (True, "Instance started successfully")
2cc6781aac8b53426d83d4cb8a42dc7c58efb8d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/2cc6781aac8b53426d83d4cb8a42dc7c58efb8d6/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 1442, 12, 1336, 4672, 3536, 1685, 392, 791, 18, 225, 632, 723, 791, 30, 511, 95, 6911, 18, 1442, 97, 632, 891, 791, 30, 326, 791, 733, 632, 86, 723, 30, 1250, 632, 2463, 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, 3603, 1442, 12, 1336, 4672, 3536, 1685, 392, 791, 18, 225, 632, 723, 791, 30, 511, 95, 6911, 18, 1442, 97, 632, 891, 791, 30, 326, 791, 733, 632, 86, 723, 30, 1250, 632, 2463, 30, ...
raise AttributeError, "Unknown node attribute: %s.%s" % (self.id, attr.name)
msg = "Unknown node attribute: %s.%s" % (self.id, attr.name) raise AttributeError, msg
def setAttributes(self, attrs): for attr in attrs: value = re.sub('^"?(.*?)"?$', '\\1', attr.value) if attr.name == 'label': self.label = value elif attr.name == 'color': self.color = value else: raise AttributeError, "Unknown node attribute: %s.%s" % (self.id, attr.name)
947379682b6179198f948bdc7afc408fa13f624e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/81/947379682b6179198f948bdc7afc408fa13f624e/blockdiag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21175, 12, 2890, 16, 3422, 4672, 364, 1604, 316, 3422, 30, 460, 273, 283, 18, 1717, 2668, 66, 6, 35, 7444, 35, 2225, 35, 8, 2187, 3718, 21, 2187, 1604, 18, 1132, 13, 309, 1604, 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, 21175, 12, 2890, 16, 3422, 4672, 364, 1604, 316, 3422, 30, 460, 273, 283, 18, 1717, 2668, 66, 6, 35, 7444, 35, 2225, 35, 8, 2187, 3718, 21, 2187, 1604, 18, 1132, 13, 309, 1604, 18, ...
path = os.path.join(self.abspath(id, index_is_id=True), 'cover.jpg')
path = os.path.join(self.abspath(id, index_is_id=True, create_dirs=False), 'cover.jpg')
def has_cover(self, index, index_is_id=False): id = index if index_is_id else self.id(index) try: path = os.path.join(self.abspath(id, index_is_id=True), 'cover.jpg') except: # Can happen if path has not yet been set return False return os.access(path, os.R_OK)
7a20e117ce42ec4325ab4d08239c850bc973c055 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/7a20e117ce42ec4325ab4d08239c850bc973c055/database2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 3165, 12, 2890, 16, 770, 16, 770, 67, 291, 67, 350, 33, 8381, 4672, 612, 273, 770, 309, 770, 67, 291, 67, 350, 469, 365, 18, 350, 12, 1615, 13, 775, 30, 589, 273, 1140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 3165, 12, 2890, 16, 770, 16, 770, 67, 291, 67, 350, 33, 8381, 4672, 612, 273, 770, 309, 770, 67, 291, 67, 350, 469, 365, 18, 350, 12, 1615, 13, 775, 30, 589, 273, 1140, ...
fragment = t[-1]
fragment = t[-1]
def getlinkinfos(self):
5445e352b244db461527b895255328eaa1a7dc6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5445e352b244db461527b895255328eaa1a7dc6f/wcnew.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1232, 18227, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1232, 18227, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesGroupDict'):
if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesDict'):
def enable(self): """enable()""" # band-aid added for client crash - grw if hasattr(self, 'forceGroupDict') and hasattr(self, 'particlesGroupDict'): if (self.renderParent != None): for p in self.particlesDict.values(): p.setRenderParent(self.renderParent.node()) for f in self.forceGroupDict.values(): f.enable() for p in self.particlesDict.values(): p.enable() self.fEnabled = 1
70d1b34d9d860a3939832837e16c89cc4f86a9ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/70d1b34d9d860a3939832837e16c89cc4f86a9ff/ParticleEffect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 12, 2890, 4672, 3536, 7589, 1435, 8395, 468, 8937, 17, 20736, 3096, 364, 1004, 17053, 300, 3821, 91, 309, 3859, 12, 2890, 16, 296, 5734, 1114, 5014, 6134, 471, 3859, 12, 2890, 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, 4237, 12, 2890, 4672, 3536, 7589, 1435, 8395, 468, 8937, 17, 20736, 3096, 364, 1004, 17053, 300, 3821, 91, 309, 3859, 12, 2890, 16, 296, 5734, 1114, 5014, 6134, 471, 3859, 12, 2890, 16, ...
if cmpRpms(v[i], v[i + 1]) == 0:
if pkgCompare(v[i], v[i + 1]) == 0:
def sort_unify(self): self.sortVersions() # Remove identical rpms and print a warning about further rpms # who might add new patches without changing version/release. for v in self.h.values(): i = 0 while i < len(v) - 1: if cmpRpms(v[i], v[i + 1]) == 0: if not sameSrcRpm(v[i], v[i + 1]): print "duplicate rpms:", v[i].filename, v[i + 1].filename v.remove(v[i]) i = i + 1
13be26721e21a4e961a8227db7d74cd35a0477dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/13be26721e21a4e961a8227db7d74cd35a0477dd/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 318, 1164, 12, 2890, 4672, 365, 18, 3804, 5940, 1435, 468, 3581, 12529, 8715, 959, 471, 1172, 279, 3436, 2973, 9271, 8715, 959, 468, 10354, 4825, 527, 394, 16482, 2887, 12770, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 318, 1164, 12, 2890, 4672, 365, 18, 3804, 5940, 1435, 468, 3581, 12529, 8715, 959, 471, 1172, 279, 3436, 2973, 9271, 8715, 959, 468, 10354, 4825, 527, 394, 16482, 2887, 12770, ...
self._element.parseXML(self._c)
self._element.parseXML(self._c.encode('ascii'))
def end(self): self._element = self._object self.checkAssigned() self._element.parseXML(self._c) self._element.convertXML()
6e5a4f2b64c4209f9416439d852eeefd954c7125 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/6e5a4f2b64c4209f9416439d852eeefd954c7125/Parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 12, 2890, 4672, 365, 6315, 2956, 273, 365, 6315, 1612, 365, 18, 1893, 20363, 1435, 365, 6315, 2956, 18, 2670, 4201, 12, 2890, 6315, 71, 18, 3015, 2668, 9184, 26112, 365, 6315, 2956,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 679, 12, 2890, 4672, 365, 6315, 2956, 273, 365, 6315, 1612, 365, 18, 1893, 20363, 1435, 365, 6315, 2956, 18, 2670, 4201, 12, 2890, 6315, 71, 18, 3015, 2668, 9184, 26112, 365, 6315, 2956,...
("SysLink",oleacc.ROLE_SYSTEM_CLIENT):"SysLink",
("SysLink",oleacc.ROLE_SYSTEM_CLIENT):"SysLinkClient", ("SysLink",oleacc.ROLE_SYSTEM_LINK):"SysLink",
def event_gainFocus(self): if eventHandler.isPendingEvents("gainFocus"): return super(MenuItem, self).event_gainFocus()
9c725e74c635640ab66ddcd2b73bea32b0b29634 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/9c725e74c635640ab66ddcd2b73bea32b0b29634/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 309, 30441, 18, 291, 8579, 3783, 2932, 25540, 9233, 6, 4672, 327, 2240, 12, 12958, 16, 365, 2934, 2575, 67, 25540, 9233, 1435, 2, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 309, 30441, 18, 291, 8579, 3783, 2932, 25540, 9233, 6, 4672, 327, 2240, 12, 12958, 16, 365, 2934, 2575, 67, 25540, 9233, 1435, 2, -100, -100, -100, ...
**NOTE: precision loss if P,Q in the infinite disc INPUT: - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points) OUTPUT: the Coleman integrals \int_P^Q w_i for w_i basis elements EXAMPLES: sage: K = pAdicField(11, 5) sage: x = polygen(K) sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16) sage: P = C.lift_x(2) sage: Q = C.lift_x(3) sage: C.coleman_integrals_on_basis(P, Q) (9*11 + 11^2 + 11^3 + 5*11^4 + O(11^5), 2*11 + 7*11^2 + 4*11^3 + 8*11^4 + O(11^5), 6 + 9*11 + 8*11^3 + 9*11^4 + O(11^5), 6 + 2*11 + 10*11^2 + 8*11^4 + O(11^5)) sage: C.coleman_integrals_on_basis(P, Q, algorithm='teichmuller') (9*11 + 11^2 + 11^3 + 5*11^4 + O(11^5), 2*11 + 7*11^2 + 4*11^3 + 8*11^4 + O(11^5), 6 + 9*11 + 8*11^3 + 9*11^4 + O(11^5), 6 + 2*11 + 10*11^2 + 8*11^4 + O(11^5))
Computes the Coleman integrals on basis differentials INPUT: - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points) OUTPUT: the Coleman integrals \int_P^Q w_i for w_i basis elements EXAMPLES: sage: K = pAdicField(11, 5) sage: x = polygen(K) sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16) sage: P = C.lift_x(2) sage: Q = C.lift_x(3) sage: C.coleman_integrals_on_basis(P, Q) (9*11 + 11^2 + 11^3 + 5*11^4 + O(11^5), 2*11 + 7*11^2 + 4*11^3 + 8*11^4 + O(11^5), 6 + 9*11 + 8*11^3 + 9*11^4 + O(11^5), 6 + 2*11 + 10*11^2 + 8*11^4 + O(11^5)) sage: C.coleman_integrals_on_basis(P, Q, algorithm='teichmuller') (9*11 + 11^2 + 11^3 + 5*11^4 + O(11^5), 2*11 + 7*11^2 + 4*11^3 + 8*11^4 + O(11^5), 6 + 9*11 + 8*11^3 + 9*11^4 + O(11^5), 6 + 2*11 + 10*11^2 + 8*11^4 + O(11^5))
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
aeeebfda8d78e5e3ab59577b4a6c5022a19143dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/aeeebfda8d78e5e3ab59577b4a6c5022a19143dd/hyperelliptic_padic_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 790, 4728, 67, 27423, 1031, 67, 265, 67, 23774, 12, 2890, 16, 453, 16, 2238, 16, 4886, 33, 7036, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 790, 4728, 67, 27423, 1031, 67, 265, 67, 23774, 12, 2890, 16, 453, 16, 2238, 16, 4886, 33, 7036, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
struct.pack(mask2, self.config)
struct.pack(self.mask2, self.config)
def encode(self): return MDLResponse.encode(self) + \ struct.pack(mask2, self.config)
5ab73709fd24f71f38fc2ed06c5d1fbb3996f217 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/5ab73709fd24f71f38fc2ed06c5d1fbb3996f217/mcap_defs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 4672, 327, 490, 8914, 1064, 18, 3015, 12, 2890, 13, 397, 521, 1958, 18, 2920, 12, 4455, 22, 16, 365, 18, 1425, 13, 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, 2017, 12, 2890, 4672, 327, 490, 8914, 1064, 18, 3015, 12, 2890, 13, 397, 521, 1958, 18, 2920, 12, 4455, 22, 16, 365, 18, 1425, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
children.append(self.source.get(old_end, new_end))
if self.children: children.append(self.source.get(old_end, new_end))
def _handle_parens(self, children, start, formats): """Changes `children` and returns new start""" opens, closes = self._count_needed_parens(formats) old_end = self.source.offset new_end = None for i in range(closes): new_end = self.source.consume(')')[1] if new_end is not None: children.append(self.source.get(old_end, new_end)) new_start = start for i in range(opens): new_start = self.source.rfind_token('(', 0, new_start) if new_start != start: children.appendleft(self.source.get(new_start, start)) start = new_start return start
71999508e8d0016077293b23caae941293cb6074 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8286/71999508e8d0016077293b23caae941293cb6074/patchedast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 1848, 2387, 12, 2890, 16, 2325, 16, 787, 16, 6449, 4672, 3536, 7173, 1375, 5906, 68, 471, 1135, 394, 787, 8395, 10400, 16, 13445, 273, 365, 6315, 1883, 67, 17471, 67, 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, 389, 4110, 67, 1848, 2387, 12, 2890, 16, 2325, 16, 787, 16, 6449, 4672, 3536, 7173, 1375, 5906, 68, 471, 1135, 394, 787, 8395, 10400, 16, 13445, 273, 365, 6315, 1883, 67, 17471, 67, 18...
dbpercent = 100.0
dbpercent = 0.0
def db_update(archname, reponame, pkgs, options): """ Parses a list and updates the Arch dev database accordingly. Arguments: pkgs -- A list of Pkg objects. """ logger.info('Updating Arch: %s' % archname) force = options.get('force', False) filesonly = options.get('filesonly', False) repository = Repo.objects.get(name__iexact=reponame) architecture = Arch.objects.get(name__iexact=archname) dbpkgs = Package.objects.filter(arch=architecture, repo=repository) # It makes sense to fully evaluate our DB query now because we will # be using 99% of the objects in our "in both sets" loop. Force eval # by calling list() on the QuerySet. list(dbpkgs) # This makes our inner loop where we find packages by name *way* more # efficient by not having to go to the database for each package to # SELECT them by name. dbdict = dict([(pkg.pkgname, pkg) for pkg in dbpkgs]) # go go set theory! # thank you python for having a set class <3 logger.debug("Creating sets") dbset = set([pkg.pkgname for pkg in dbpkgs]) syncset = set([pkg.name for pkg in pkgs]) logger.info("%d packages in current web DB" % len(dbset)) logger.info("%d packages in new updating db" % len(syncset)) # packages in syncdb and not in database (add to database) logger.debug("Set theory: Packages in syncdb not in database") in_sync_not_db = syncset - dbset logger.info("%d packages in sync not db" % len(in_sync_not_db)) # Try to catch those random orphaning issues that make Eric so unhappy. if len(dbset) > 20: dbpercent = 100.0 * len(syncset) / len(dbset) else: # we don't have 20 packages in this repo/arch, so this check could # produce a lot of false positives (or a div by zero). fake it dbpercent = 100.0 logger.info("DB package ratio: %.1f%%" % dbpercent) if dbpercent < 50.0 and not repository.testing: logger.error(".db.tar.gz has %.1f%% the number of packages in the web database" % dbpercent) raise Exception( 'It looks like the syncdb is less than half the size of the web db. WTF?') if dbpercent < 75.0: logger.warning(".db.tar.gz has %.1f%% the number of packages in the web database." % dbpercent) if not filesonly: # packages in syncdb and not in database (add to database) logger.debug("Set theory: Packages in syncdb not in database") for p in [x for x in pkgs if x.name in in_sync_not_db]: logger.info("Adding package %s", p.name) pkg = Package(pkgname = p.name, arch = architecture, repo = repository) populate_pkg(pkg, p, timestamp=datetime.now()) # packages in database and not in syncdb (remove from database) logger.debug("Set theory: Packages in database not in syncdb") in_db_not_sync = dbset - syncset for p in in_db_not_sync: logger.info("Removing package %s from database", p) Package.objects.get( pkgname=p, arch=architecture, repo=repository).delete() # packages in both database and in syncdb (update in database) logger.debug("Set theory: Packages in database and syncdb") pkg_in_both = syncset & dbset for p in [x for x in pkgs if x.name in pkg_in_both]: logger.debug("Looking for package updates") dbp = dbdict[p.name] timestamp = None # for a force, we don't want to update the timestamp. # for a non-force, we don't want to do anything at all. if filesonly: pass elif '-'.join((p.ver, p.rel)) == '-'.join((dbp.pkgver, dbp.pkgrel)): if not force: continue else: timestamp = datetime.now() if filesonly: logger.debug("Checking files for package %s in database", p.name) populate_files(dbp, p) else: logger.info("Updating package %s in database", p.name) populate_pkg(dbp, p, force=force, timestamp=timestamp) logger.info('Finished updating Arch: %s' % archname)
863d7628175fdb30d29437e81fb3332354621a43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11256/863d7628175fdb30d29437e81fb3332354621a43/reporead.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 67, 2725, 12, 991, 529, 16, 283, 500, 339, 16, 16922, 16, 702, 4672, 3536, 2280, 2420, 279, 666, 471, 4533, 326, 16959, 4461, 2063, 15905, 18, 225, 13599, 30, 16922, 1493, 432, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 67, 2725, 12, 991, 529, 16, 283, 500, 339, 16, 16922, 16, 702, 4672, 3536, 2280, 2420, 279, 666, 471, 4533, 326, 16959, 4461, 2063, 15905, 18, 225, 13599, 30, 16922, 1493, 432, 6...
(numx,) = xvals.shape
assert xvals.shape == (numx,) if yvals is None: yvals = Numeric.arange(numy) else:
def __init__(self, toplot, xvals=None, yvals=None, binary=1, inline=_unset, **keyw): """GridData constructor.
a28e91f7dbfb7e62d59f6ace13b33f3dd9d798d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9569/a28e91f7dbfb7e62d59f6ace13b33f3dd9d798d4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 358, 4032, 16, 619, 4524, 33, 7036, 16, 677, 4524, 33, 7036, 16, 3112, 33, 21, 16, 6370, 33, 67, 18579, 16, 2826, 856, 91, 4672, 3536, 6313, 751, 3885,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 358, 4032, 16, 619, 4524, 33, 7036, 16, 677, 4524, 33, 7036, 16, 3112, 33, 21, 16, 6370, 33, 67, 18579, 16, 2826, 856, 91, 4672, 3536, 6313, 751, 3885,...
return self.getAccessor(instance)(**kwargs)
accessor = self.getAccessor(instance) if accessor is None: return self.get(instance, **kwargs) return accessor(**kwargs)
def getRaw(self, instance, **kwargs): return self.getAccessor(instance)(**kwargs)
99db97fb1d9fd2d5418895b82da7d366c1d4def0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/99db97fb1d9fd2d5418895b82da7d366c1d4def0/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10547, 12, 2890, 16, 791, 16, 2826, 4333, 4672, 327, 365, 18, 588, 8235, 12, 1336, 21433, 636, 4333, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10547, 12, 2890, 16, 791, 16, 2826, 4333, 4672, 327, 365, 18, 588, 8235, 12, 1336, 21433, 636, 4333, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
bravais_basis = [[0,0,0], [1.0/3.0, 2.0/3.0, 0]]
bravais_basis = [[0,0,0], [1.0/3.0, 2.0/3.0, 0], [1.0/3.0,2.0/3.0,0.5], [2.0/3.0,1.0/3.0,0.5]]
def print_four_vector(self, bracket, numbers): bra, ket = bracket (x,y,z) = numbers a = 2*x - y b = -x + 2*y c = -x -y d = 2*z print " %s%d, %d, %d%s ~ %s%d, %d, %d, %d%s" % \ (bra,x,y,z,ket, bra,a,b,c,d,ket)
70f5df2067ebc0ea59952363096e6cb68b2e89d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/70f5df2067ebc0ea59952363096e6cb68b2e89d1/hexagonal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 74, 477, 67, 7737, 12, 2890, 16, 9843, 16, 5600, 4672, 16430, 16, 417, 278, 273, 9843, 261, 92, 16, 93, 16, 94, 13, 273, 5600, 279, 273, 576, 14, 92, 300, 677, 324, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 74, 477, 67, 7737, 12, 2890, 16, 9843, 16, 5600, 4672, 16430, 16, 417, 278, 273, 9843, 261, 92, 16, 93, 16, 94, 13, 273, 5600, 279, 273, 576, 14, 92, 300, 677, 324, 273, ...
'coef (base unit) = 1 (this unit)'),
'coef (base unit) = 1 (this unit). Factor = 1 / Rate.'),
def _factor_inv(self, cursor, user, id, name, value, arg, context): ctx = context.copy() if 'read_delta' in ctx: del ctx['read_delta'] if value: data = 0.0 if round(1 / round(1/value, 6), 6) != value: data = value self.write(cursor, user, id, { 'factor': round(1/value, 6), 'factor_inv_data': data, }, context=ctx) else: self.write(cursor, user, id, { 'factor': 0.0, 'factor_inv_data': 0.0, }, context=ctx)
49e21926e75553658cbeaf8d12e4679a84f1dfa4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/49e21926e75553658cbeaf8d12e4679a84f1dfa4/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6812, 67, 5768, 12, 2890, 16, 3347, 16, 729, 16, 612, 16, 508, 16, 460, 16, 1501, 16, 819, 4672, 1103, 273, 819, 18, 3530, 1435, 309, 296, 896, 67, 9878, 11, 316, 1103, 30, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6812, 67, 5768, 12, 2890, 16, 3347, 16, 729, 16, 612, 16, 508, 16, 460, 16, 1501, 16, 819, 4672, 1103, 273, 819, 18, 3530, 1435, 309, 296, 896, 67, 9878, 11, 316, 1103, 30, 14...
return props.getProperty('need_authentication', False)
val = props.getProperty('need_authentication', False) logger.debug("Need authentication? %s", val) return val
def no_url(request, props): """This is for skin switching based on authentication only.""" return props.getProperty('need_authentication', False)
d08332efca449cf018089ca8289d806027ad3804 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10439/d08332efca449cf018089ca8289d806027ad3804/traversal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 718, 12, 2293, 16, 3458, 4672, 3536, 2503, 353, 364, 18705, 30882, 2511, 603, 5107, 1338, 12123, 1244, 273, 3458, 18, 588, 1396, 2668, 14891, 67, 12293, 2187, 1083, 13, 1194, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1158, 67, 718, 12, 2293, 16, 3458, 4672, 3536, 2503, 353, 364, 18705, 30882, 2511, 603, 5107, 1338, 12123, 1244, 273, 3458, 18, 588, 1396, 2668, 14891, 67, 12293, 2187, 1083, 13, 1194, 1...
'size_package' : 'archivesize' 'size_installed' : 'size'
'size_package' : 'archivesize', 'size_installed' : 'size',
def clearFilelist(self): self.filesloaded = False for tag in ('basenames', 'dirnames', 'dirindexes', 'oldfilenames'): if dict.has_key(self, tag): del self[tag]
66111123c0e44a5015070da8c2218ab4389d12e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/66111123c0e44a5015070da8c2218ab4389d12e1/sqliterepodb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 25579, 5449, 12, 2890, 4672, 365, 18, 2354, 4230, 273, 1083, 364, 1047, 316, 7707, 9157, 6809, 2187, 296, 1214, 1973, 2187, 296, 1214, 11265, 2187, 296, 1673, 19875, 11, 4672, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 25579, 5449, 12, 2890, 4672, 365, 18, 2354, 4230, 273, 1083, 364, 1047, 316, 7707, 9157, 6809, 2187, 296, 1214, 1973, 2187, 296, 1214, 11265, 2187, 296, 1673, 19875, 11, 4672, 309, ...
def init(self, filename, mode, perm):
def __init__(self, filename, mode, perm):
def init(self, filename, mode, perm): import dbm self.db = dbm.open(filename, mode, perm) return self
640abc9ff7b608265f11e96796e6275b0456a426 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/640abc9ff7b608265f11e96796e6275b0456a426/Dbm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1965, 16, 4641, 4672, 1930, 1319, 81, 365, 18, 1966, 273, 1319, 81, 18, 3190, 12, 3459, 16, 1965, 16, 4641, 13, 327, 365, 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, 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, 1544, 16, 1965, 16, 4641, 4672, 1930, 1319, 81, 365, 18, 1966, 273, 1319, 81, 18, 3190, 12, 3459, 16, 1965, 16, 4641, 13, 327, 365, 2, -100, -100, -100...
if not klass._p_changed:
if not getattr(klass,'_p_changed',None):
def __delattr__(self, name): klass=self._k delattr(klass, name) if not klass._p_changed: get_transaction().register(klass) klass._p_changed=1
80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1747, 972, 12, 2890, 16, 508, 4672, 7352, 33, 2890, 6315, 79, 1464, 1747, 12, 22626, 16, 508, 13, 309, 486, 3869, 12, 22626, 11189, 67, 84, 67, 6703, 2187, 7036, 4672, 336,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1747, 972, 12, 2890, 16, 508, 4672, 7352, 33, 2890, 6315, 79, 1464, 1747, 12, 22626, 16, 508, 13, 309, 486, 3869, 12, 22626, 11189, 67, 84, 67, 6703, 2187, 7036, 4672, 336,...
streamId = _STREAM_SIZESHA1
def setSha1(self, value): return self.items[1].set(value)
a67de324b6550ed8a3b892f25e8458e04b9f4282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a67de324b6550ed8a3b892f25e8458e04b9f4282/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 20375, 21, 12, 2890, 16, 460, 4672, 327, 365, 18, 3319, 63, 21, 8009, 542, 12, 1132, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 20375, 21, 12, 2890, 16, 460, 4672, 327, 365, 18, 3319, 63, 21, 8009, 542, 12, 1132, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
httpconn = MockHTTPClass()
def __init__(self): urllib2.AbstractHTTPHandler.__init__(self) self.httpconn = MockHTTPClass()
def http_open(self, req): import mimetools, httplib, copy from StringIO import StringIO self.requests.append(copy.deepcopy(req)) if self._count == 0: self._count = self._count + 1 name = httplib.responses[self.code] msg = mimetools.Message(StringIO(self.headers)) return self.parent.error( "http", req, MockFile(), self.code, name, msg) else: self.req = req msg = mimetools.Message(StringIO("\r\n\r\n")) return MockResponse(200, "OK", msg, "", req.get_full_url())
1f1ac86994f34468624c549631d5d4eb3524d9d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/1f1ac86994f34468624c549631d5d4eb3524d9d0/test_urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 3190, 12, 2890, 16, 1111, 4672, 1930, 20369, 278, 8192, 16, 15851, 6673, 16, 1610, 628, 15777, 1930, 15777, 365, 18, 11420, 18, 6923, 12, 3530, 18, 16589, 3530, 12, 3658, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 3190, 12, 2890, 16, 1111, 4672, 1930, 20369, 278, 8192, 16, 15851, 6673, 16, 1610, 628, 15777, 1930, 15777, 365, 18, 11420, 18, 6923, 12, 3530, 18, 16589, 3530, 12, 3658, 3719,...
self.show_message(message, _('gPodder downloads finished'), True, widget=self.labelDownloads)
self.show_message(message, _('Downloads finished'), True, widget=self.labelDownloads)
def downloads_finished(self, download_tasks_seen): # FIXME: Filter all tasks that have already been reported finished_downloads = [str(task) for task in download_tasks_seen if task.status == task.DONE] failed_downloads = [str(task)+' ('+task.error_message+')' for task in download_tasks_seen if task.status == task.FAILED]
ba5d0f76ea65dcd60a6d23343ebcc0aaa8a4bb22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/ba5d0f76ea65dcd60a6d23343ebcc0aaa8a4bb22/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23011, 67, 13527, 12, 2890, 16, 4224, 67, 9416, 67, 15156, 4672, 468, 9852, 30, 4008, 777, 4592, 716, 1240, 1818, 2118, 14010, 6708, 67, 7813, 87, 273, 306, 701, 12, 4146, 13, 364, 156...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23011, 67, 13527, 12, 2890, 16, 4224, 67, 9416, 67, 15156, 4672, 468, 9852, 30, 4008, 777, 4592, 716, 1240, 1818, 2118, 14010, 6708, 67, 7813, 87, 273, 306, 701, 12, 4146, 13, 364, 156...
if info['status'] == 'Done (Success)' and ( job.status not in ['completed', 'failed'] ):
if info['status'] == 'Done (Success)': create_download_task = True else: LCG.updateGangaJobStatus(job, info['status']) elif info['status'] == 'Done (Success)' and ( job.status not in ['completed', 'failed'] ): create_download_task = True if create_download_task:
def updateMonitoringInformation(jobs): '''Monitoring loop for normal jobs''' jobdict = dict([ [job.backend.id,job] for job in jobs if job.backend.id ])
2db7950d0721f8cb421a6b0b0e535e3cc89d1c80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/2db7950d0721f8cb421a6b0b0e535e3cc89d1c80/LCG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 18410, 5369, 12, 10088, 4672, 9163, 18410, 2798, 364, 2212, 6550, 26418, 225, 1719, 1576, 282, 273, 2065, 3816, 306, 4688, 18, 9993, 18, 350, 16, 4688, 65, 364, 1719, 316, 6550, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 18410, 5369, 12, 10088, 4672, 9163, 18410, 2798, 364, 2212, 6550, 26418, 225, 1719, 1576, 282, 273, 2065, 3816, 306, 4688, 18, 9993, 18, 350, 16, 4688, 65, 364, 1719, 316, 6550, 30...
self.canvasitems[1].connect("event", self.sun_item_event)
self.sunitem.connect("event", self.sun_item_event) self.sunitem.connect("event", gcompris.utils.item_event_focus)
def start(self): self.gcomprisBoard.level=1 self.gcomprisBoard.maxlevel=1 self.gcomprisBoard.sublevel=1 self.gcomprisBoard.number_of_sublevel=1
690f8ac7446757307ab013b8fb8fe772b4ea0d9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/690f8ac7446757307ab013b8fb8fe772b4ea0d9d/watercycle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 75, 832, 683, 291, 22233, 18, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 1896, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 87, 1255...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 365, 18, 75, 832, 683, 291, 22233, 18, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 1896, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 87, 1255...
self.seedStatus = "0"
seeds = None seeds = statistics.get('numSeeds') if seeds is None: seeds = 0 numCopies = statistics.get('numCopies') if numCopies is not None: seeds += numCopies self.seedStatus = _("%d") % seeds peers = None peers = statistics.get('numPeers') if peers is not None: self.peerStatus = _("%d") % peers else:
def display(self, statistics): fractionDone = statistics.get('fractionDone') activity = statistics.get('activity') timeEst = statistics.get('timeEst') downRate = statistics.get('downRate') upRate = statistics.get('upRate') spew = statistics.get('spew')
f61984e994b779f023d0b71bbeccf485c95c9a29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2550/f61984e994b779f023d0b71bbeccf485c95c9a29/tfmainline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 16, 7691, 4672, 8330, 7387, 273, 7691, 18, 588, 2668, 16744, 7387, 6134, 5728, 273, 7691, 18, 588, 2668, 9653, 6134, 813, 9122, 273, 7691, 18, 588, 2668, 957, 9122, 6134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 16, 7691, 4672, 8330, 7387, 273, 7691, 18, 588, 2668, 16744, 7387, 6134, 5728, 273, 7691, 18, 588, 2668, 9653, 6134, 813, 9122, 273, 7691, 18, 588, 2668, 957, 9122, 6134,...
opts,args = getopt.getopt(argv[1:],"d:f:e:r:vt:p:s:o:n:a:b:Fmc",
opts,args = getopt.getopt(argv[1:],"d:f:e:x:r:vt:p:s:o:n:a:b:Fmc",
def getargs(argv): try: opts,args = getopt.getopt(argv[1:],"d:f:e:r:vt:p:s:o:n:a:b:Fmc", ["dir=", "file=", "exit=", "reason=", "resultfilter=", "proto=", "verbose", "statuscode=", "sortby=", "noreason=", "after=", "before=", "falsepositives", "email", "confirmed"]) except getopt.GetoptError,err: print str(err) usage(argv) # FIXME: make all these repeatable use_dir="./data/" use_file=None node=None reasons=[] noreasons=[] result=2 verbose=1 proto=None resultfilter=None before = 0xffffffff after = 0 sortby="proto" falsepositives=False send_email = False confirmed = False for o,a in opts: if o == '-d' or o == '--dir': use_dir = a elif o == '-e' or o == '--email': send_email = True elif o == '-f' or o == '--file': use_file = a elif o == '-b' or o == '--before': before = time.mktime(time.strptime(a)) elif o == '-a' or o == '--after': after = time.mktime(time.strptime(a)) elif o == '-r' or o == '--reason': reasons.append(a) elif o == '-r' or o == '--noreason': noreasons.append(a) elif o == '-v' or o == '--verbose': verbose += 1 elif o == '-t' or o == '--resultfilter': resultfilter = a elif o == '-p' or o == '--proto': proto = a elif o == '-F' or o == '--falsepositives': falsepositives = True elif o == '-c' or o == '--confirmed': confirmed = True elif o == '-s' or o == '--sortby': if a not in ["proto", "site", "exit", "reason"]: usage(argv) else: sortby = a elif o == '-s' or o == '--statuscode': try: result = int(a) except ValueError: result = RESULT_CODES[a] return use_dir,use_file,node,reasons,noreasons,result,verbose,resultfilter,proto,sortby,before,after,falsepositives,send_email,confirmed
7d40d38be81c95a6b9e11033cd34cfb2e8e6d942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3762/7d40d38be81c95a6b9e11033cd34cfb2e8e6d942/snakeinspector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 19485, 4672, 775, 30, 1500, 16, 1968, 273, 336, 3838, 18, 588, 3838, 12, 19485, 63, 21, 30, 6487, 6, 72, 30, 74, 30, 73, 30, 92, 30, 86, 30, 11734, 30, 84, 30, 87,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 19485, 4672, 775, 30, 1500, 16, 1968, 273, 336, 3838, 18, 588, 3838, 12, 19485, 63, 21, 30, 6487, 6, 72, 30, 74, 30, 73, 30, 92, 30, 86, 30, 11734, 30, 84, 30, 87,...
wh = (nonzero((qllim!=0.) & (wa2 <= llim1)))[0]
wh = (numpy.nonzero((qllim!=0.) & (wa2 <= llim1)))[0]
def iterfunct(myfunct, p, iter, fnorm, functkw=None, parinfo=None, quiet=0, dof=None, [iterkw keywords here])
14558c711c4693ee25ced2a48d6eaf300224bc75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/682/14558c711c4693ee25ced2a48d6eaf300224bc75/mpfit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 74, 6931, 12, 4811, 74, 6931, 16, 293, 16, 1400, 16, 2295, 535, 16, 12882, 9987, 33, 7036, 16, 779, 1376, 33, 7036, 16, 10902, 33, 20, 16, 741, 74, 33, 7036, 16, 306, 2165, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 74, 6931, 12, 4811, 74, 6931, 16, 293, 16, 1400, 16, 2295, 535, 16, 12882, 9987, 33, 7036, 16, 779, 1376, 33, 7036, 16, 10902, 33, 20, 16, 741, 74, 33, 7036, 16, 306, 2165, 9...
def fixBreakingReturns(node):
def removeBreakingReturns(node): """ remove breakingReturns if we are next to a blockNode """
def fixBreakingReturns(node): for c in node.children[:]: if c.__class__ == BreakingReturn: prev = c.previous or c.parent # previous sibling node or parentnode next = c.next or c.parent.next if next.isblocknode or prev.isblocknode: node.removeChild(c) fixBreakingReturns(c)
dea329b35814c06d5a0af0f4f77860b077b90060 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/dea329b35814c06d5a0af0f4f77860b077b90060/advtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 7634, 310, 1356, 12, 2159, 4672, 3536, 1206, 24412, 1356, 225, 309, 732, 854, 1024, 358, 279, 1203, 907, 3536, 364, 276, 316, 756, 18, 5906, 10531, 14542, 309, 276, 16186, 1106, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 7634, 310, 1356, 12, 2159, 4672, 3536, 1206, 24412, 1356, 225, 309, 732, 854, 1024, 358, 279, 1203, 907, 3536, 364, 276, 316, 756, 18, 5906, 10531, 14542, 309, 276, 16186, 1106, 97...
if sys.platform != 'win32': locale.setlocale(locale.LC_ALL, 'de_DE.ISO8859-1') else: locale.setlocale(locale.LC_ALL, 'German_Germany.1252') words = ['mlltonne waschbr behrde berflieger']
try: if sys.platform != 'win32': locale.setlocale(locale.LC_ALL, 'de_DE.ISO8859-1') else: locale.setlocale(locale.LC_ALL, 'German_Germany.1252') except locale.Error: return expected = ['m\xfclltonne', 'waschb\xe4r', 'beh\xf6rde', '\xfcberflieger'] words = [" ".join(expected)]
def testSplitterLocaleAwareness(self): from Products.ZCTextIndex.HTMLSplitter import HTMLWordSplitter import locale loc = locale.setlocale(locale.LC_ALL) # get current locale # set German locale if sys.platform != 'win32': locale.setlocale(locale.LC_ALL, 'de_DE.ISO8859-1') else: locale.setlocale(locale.LC_ALL, 'German_Germany.1252') words = ['mlltonne waschbr behrde berflieger'] words = Splitter().process(words) self.assertEqual( words, ['mlltonne', 'waschbr', 'behrde', 'berflieger']) words = HTMLWordSplitter().process(words) self.assertEqual( words, ['mlltonne', 'waschbr', 'behrde', 'berflieger']) locale.setlocale(locale.LC_ALL, loc) # restore saved locale
d2e5544e12029c5a6374c1075a96832a38c8d0fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d2e5544e12029c5a6374c1075a96832a38c8d0fe/testLexicon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 26738, 3916, 10155, 4496, 12, 2890, 4672, 628, 8094, 87, 18, 62, 1268, 408, 1016, 18, 4870, 26738, 1930, 3982, 3944, 26738, 1930, 2573, 1515, 273, 2573, 18, 542, 6339, 12, 6339, 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, 26738, 3916, 10155, 4496, 12, 2890, 4672, 628, 8094, 87, 18, 62, 1268, 408, 1016, 18, 4870, 26738, 1930, 3982, 3944, 26738, 1930, 2573, 1515, 273, 2573, 18, 542, 6339, 12, 6339, 18...
def _CheckInstanceBridgesExist(instance):
def _CheckInstanceBridgesExist(lu, instance):
def _CheckInstanceBridgesExist(instance): """Check that the brigdes needed by an instance exist. """ # check bridges existance brlist = [nic.bridge for nic in instance.nics] if not rpc.call_bridges_exist(instance.primary_node, brlist): raise errors.OpPrereqError("one or more target bridges %s does not" " exist on destination node '%s'" % (brlist, instance.primary_node))
b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1564, 1442, 38, 1691, 2852, 4786, 12, 28832, 16, 791, 4672, 3536, 1564, 716, 326, 5186, 360, 5489, 3577, 635, 392, 791, 1005, 18, 225, 3536, 468, 866, 324, 1691, 2852, 1005, 1359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1442, 38, 1691, 2852, 4786, 12, 28832, 16, 791, 4672, 3536, 1564, 716, 326, 5186, 360, 5489, 3577, 635, 392, 791, 1005, 18, 225, 3536, 468, 866, 324, 1691, 2852, 1005, 1359, ...
mkey = '/results/remote_addr/' + self.request.remote_addr
mkey = '/results/remote_addr/' + reqh.request.remote_addr
def ClearUserCache(): user = users.get_current_user() if user: mkey = '/results/user/' + user.email() else: mkey = '/results/remote_addr/' + self.request.remote_addr memcache.delete(mkey)
4c6dc966f10e65d385dfb0078f897a93616d197f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3507/4c6dc966f10e65d385dfb0078f897a93616d197f/iconforth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10121, 1299, 1649, 13332, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 309, 729, 30, 312, 856, 273, 1173, 4717, 19, 1355, 2473, 397, 729, 18, 3652, 1435, 469, 30, 312, 856, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10121, 1299, 1649, 13332, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 309, 729, 30, 312, 856, 273, 1173, 4717, 19, 1355, 2473, 397, 729, 18, 3652, 1435, 469, 30, 312, 856, 273, ...
for x in myspec:
for x in myspec.keys():
def parse_spec(mylines): myspec = {} cur_array = [] trailing_comment=re.compile("#.*$") white_space=re.compile("\s+") while len(mylines): myline = mylines.pop(0).strip() # Force the line to be clean # Remove Comments ( anything following # ) myline = trailing_comment.sub("", myline) # Skip any blank lines if not myline: continue # Look for colon msearch = myline.find(':') # If semicolon found assume its a new key # This may cause problems if : are used for key values but works for now if msearch != -1: # Split on the first semicolon creating two strings in the array mobjs mobjs = myline.split(':', 1) mobjs[1] = mobjs[1].strip() # Start a new array using the first element of mobjs cur_array = [mobjs[0]] if mobjs[1]: # split on white space creating additional array elements subarray = white_space.split(mobjs[1]) if subarray: if len(subarray)==1: # Store as a string if only one element is found. # this is to keep with original catalyst behavior # eventually this may go away if catalyst just works # with arrays. cur_array.append(subarray[0]) else: cur_array += subarray # Else add on to the last key we were working on else: mobjs = white_space.split(myline) cur_array += mobjs if len(cur_array) == 2: myspec[cur_array[0]] = cur_array[1] else: myspec[cur_array[0]] = cur_array[1:] for x in myspec: # Delete empty key pairs if not myspec[x]: print "\n\tWARNING: No value set for key: "+x print "\tdeleting key: "+x+"\n" del myspec[x] #print myspec return myspec
0e5ffcb9700270bd52f69b72cf4672a6d0085999 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/0e5ffcb9700270bd52f69b72cf4672a6d0085999/catalyst_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2793, 12, 4811, 3548, 4672, 312, 1900, 705, 273, 2618, 662, 67, 1126, 273, 5378, 7341, 67, 3469, 33, 266, 18, 11100, 2932, 7, 4509, 8, 7923, 9578, 67, 2981, 33, 266, 18, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2793, 12, 4811, 3548, 4672, 312, 1900, 705, 273, 2618, 662, 67, 1126, 273, 5378, 7341, 67, 3469, 33, 266, 18, 11100, 2932, 7, 4509, 8, 7923, 9578, 67, 2981, 33, 266, 18, 11...
return execute('jsr308_www_online=%s make -f %s checklinks' % (site_url, os.path.join(JSR308_LANGTOOLS, 'doc', 'Makefile')),
os.putenv('jsr308_www_online', site_url) return execute('make -f %s checklinks' % os.path.join(JSR308_LANGTOOLS, 'doc', 'Makefile'),
def checklinks(site_url=None): return execute('jsr308_www_online=%s make -f %s checklinks' % (site_url, os.path.join(JSR308_LANGTOOLS, 'doc', 'Makefile')), halt_if_fail=False)
ffda3669e42bce8d45b3d0612d17ac53ca7296d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/308/ffda3669e42bce8d45b3d0612d17ac53ca7296d4/release.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 7135, 12, 4256, 67, 718, 33, 7036, 4672, 1140, 18, 458, 3074, 2668, 2924, 86, 5082, 28, 67, 5591, 67, 21026, 2187, 2834, 67, 718, 13, 327, 1836, 2668, 6540, 300, 74, 738, 87, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 7135, 12, 4256, 67, 718, 33, 7036, 4672, 1140, 18, 458, 3074, 2668, 2924, 86, 5082, 28, 67, 5591, 67, 21026, 2187, 2834, 67, 718, 13, 327, 1836, 2668, 6540, 300, 74, 738, 87, 86...
valid_game.dump(header)
valid_game.dump(" ")
def dump(self, header): game_count = float(self.count)
b273879436babd89339936737b81197891be1946 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/600/b273879436babd89339936737b81197891be1946/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 1446, 4672, 7920, 67, 1883, 273, 1431, 12, 2890, 18, 1883, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 4657, 12, 2890, 16, 1446, 4672, 7920, 67, 1883, 273, 1431, 12, 2890, 18, 1883, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif type == ExpressionType.SYMBOLIC:
elif exprtype == ExpressionType.SYMBOLIC:
def toString(cls, type): if type == ExpressionType.CONSTANT: text = "CON" elif type == ExpressionType.SYMBOLIC: text = "SYM" else: text = " " return text
5dcb1cfb8b12dfc913ee0c8e3a3257a15e782d7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/5dcb1cfb8b12dfc913ee0c8e3a3257a15e782d7e/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1762, 12, 6429, 16, 618, 4672, 309, 618, 422, 5371, 559, 18, 25878, 30, 977, 273, 315, 2248, 6, 1327, 3065, 723, 422, 5371, 559, 18, 22093, 2871, 30, 977, 273, 315, 7474, 49, 6, 469,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1762, 12, 6429, 16, 618, 4672, 309, 618, 422, 5371, 559, 18, 25878, 30, 977, 273, 315, 2248, 6, 1327, 3065, 723, 422, 5371, 559, 18, 22093, 2871, 30, 977, 273, 315, 7474, 49, 6, 469,...
return lines return list() def generateFunction(self):
docline.append("") docline.append("=== Example: %s ===" % value) docline.append("[source,cmake,numbered]") docline.append("----") docline.extend(lines) docline.append("----") docline.append("") else: print "sample not found:", p return docline def generate(self): """ generate the asciidoc output for this block """ self.result = list() while self.content.has_next(): line = self.content.preview_line() if line.startswith("\\"): self.extract_command() continue self.result.append(self.content.get_line()) def __str__(self): if not self.result: self.generate() return "\n".join(self.result) class FunctionBlock(DocBlock): """ handle a function doc block """ def __init__(self, function_name, content): DocBlock.__init__(self, content) self.commands = dict() self.valid_commands = ('arg', 'argn', 'flag', 'param', 'group', 'example') for k in self.valid_commands: self.commands[k] = dict() self.name = self.extract_function_name(function_name) self.extract_commands() def extract_commands(self): """ extract command and store them to self.commands the remanaining self.content.lines is "command free" """ doclines = list() prev = "" while self.content.has_next(): line = self.content.preview_line() if line.startswith("\\"): self.extract_command() else: self.content.get_line() doclines.append(line) self.content = LineHolder(doclines) def extract_function_name(self, function_name): """ extract a function name """ funcregex = re.compile('\s*function\s*\((\S*?)[\s\)]+.*') name = funcregex.match(function_name) if name: name = name.groups(1)[0] return name return None def extract_command(self): """ extract a command """ (command, value, desc) = self.extract_command_name() if not self.commands.get(command): self.commands[command] = dict() self.commands[command][value] = desc if command not in self.valid_commands: print "WARNING: unknown command:", command, value, desc def generate(self): """ generate the asciidoc for this block """ self.result = list() self.result.extend(self.generate_function()) for k,v in self.commands['example'].iteritems(): print "example:", k self.result.extend(self.generate_example(k, v)) return self.result def generate_function(self):
def getDoc(self, sample): """ get an example """ p = os.path.join(self.exampledir, sample) if not os.path.exists(p): p += ".cmake" if not os.path.isfile(p): p = os.path.join(self.exampledir, sample, "CMakeLists.txt") if os.path.exists(p): lines = list() try: with open(p, "r") as f: lines = f.readlines() except IOError: print "Error: example not found: ", p pass lines = [ x.rstrip() for x in lines ] return lines return list()
58e5719f8c1d5d076eb3b9af15ecc71594baba83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13121/58e5719f8c1d5d076eb3b9af15ecc71594baba83/generate_doc_from_cmake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17999, 12, 2890, 16, 3296, 4672, 3536, 336, 392, 3454, 3536, 293, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 8236, 1214, 16, 3296, 13, 309, 486, 1140, 18, 803, 18, 1808, 12, 84, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17999, 12, 2890, 16, 3296, 4672, 3536, 336, 392, 3454, 3536, 293, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 8236, 1214, 16, 3296, 13, 309, 486, 1140, 18, 803, 18, 1808, 12, 84, 467...
def SemistandardTableaux(p=None, mu=None):
def SemistandardTableaux(p=None, mu=None, max_entry=None):
def SemistandardTableaux(p=None, mu=None): """ Returns the combinatorial class of semistandard tableaux. If p is specified and is a partition, then it returns the class of semistandard tableaux of shape p (and max entry sum(p)) If p is specified and is an integer, it returns the class of semistandard tableaux of size p. If mu is also specified, then it returns the class of semistandard tableaux with evaluation/content mu. EXAMPLES:: sage: SST = SemistandardTableaux([2,1]); SST Semistandard tableaux of shape [2, 1] sage: SST.list() [[[1, 1], [2]], [[1, 1], [3]], [[1, 2], [2]], [[1, 2], [3]], [[1, 3], [2]], [[1, 3], [3]], [[2, 2], [3]], [[2, 3], [3]]] :: sage: SST = SemistandardTableaux(3); SST Semistandard tableaux of size 3 sage: SST.list() [[[1, 1, 1]], [[1, 1, 2]], [[1, 1, 3]], [[1, 2, 2]], [[1, 2, 3]], [[1, 3, 3]], [[2, 2, 2]], [[2, 2, 3]], [[2, 3, 3]], [[3, 3, 3]], [[1, 1], [2]], [[1, 1], [3]], [[1, 2], [2]], [[1, 2], [3]], [[1, 3], [2]], [[1, 3], [3]], [[2, 2], [3]], [[2, 3], [3]], [[1], [2], [3]]] """ if p == None: return SemistandardTableaux_all() elif p in partition.Partitions(): if mu == None: return SemistandardTableaux_p(p) else: if sum(p) != sum(mu): #Error size mismatch raise TypeError, "p and mu must be of the same size" else: return SemistandardTableaux_pmu(p, mu) elif isinstance(p, (int, Integer)): if mu == None: return SemistandardTableaux_n(p) else: if p != sum(mu): #Error size mismatch raise TypeError, "mu must be of size p (= %s)"%p else: return SemistandardTableaux_nmu(p, mu) else: raise ValueError
dc756d26ea922387ee74781c3b99359e739e8c01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/dc756d26ea922387ee74781c3b99359e739e8c01/tableau.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15661, 376, 2958, 1388, 18196, 12, 84, 33, 7036, 16, 4129, 33, 7036, 16, 943, 67, 4099, 33, 7036, 4672, 3536, 2860, 326, 3894, 4240, 649, 667, 434, 6111, 376, 2958, 1014, 18196, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15661, 376, 2958, 1388, 18196, 12, 84, 33, 7036, 16, 4129, 33, 7036, 16, 943, 67, 4099, 33, 7036, 4672, 3536, 2860, 326, 3894, 4240, 649, 667, 434, 6111, 376, 2958, 1014, 18196, 18, 22...
x = stats.keys() x.sort() y = copy.deepcopy(x)[0:3] self.assertEquals(y, ['network', 'station'])
stats2 = copy.deepcopy(stats) stats.network = 'CZ' stats.station = 'RJOB' self.assertEquals(stats2.network, 'BW') self.assertEquals(stats2.station, 'ROTZ') self.assertEquals(stats.network, 'CZ') self.assertEquals(stats.station, 'RJOB')
def test_deepcopy(self): """ Tests initialization from a given time string. """ stats = Stats() stats.network = 'BW' stats['station'] = 'ROTZ' x = stats.keys() x.sort() y = copy.deepcopy(x)[0:3] self.assertEquals(y, ['network', 'station'])
89215193cb9af764d171e96a6c57c8b3a7fdc103 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/89215193cb9af764d171e96a6c57c8b3a7fdc103/test_stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16589, 3530, 12, 2890, 4672, 3536, 7766, 87, 10313, 628, 279, 864, 813, 533, 18, 3536, 3177, 273, 11486, 1435, 3177, 18, 5185, 273, 296, 38, 59, 11, 3177, 3292, 17894, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16589, 3530, 12, 2890, 4672, 3536, 7766, 87, 10313, 628, 279, 864, 813, 533, 18, 3536, 3177, 273, 11486, 1435, 3177, 18, 5185, 273, 296, 38, 59, 11, 3177, 3292, 17894, 3546, ...
filename = unquote(url[8:]).decode("UTF-8")
filename = urllib.url2pathname(url).decode("UTF-8") if filename.startswith("file://"): filename = filename[7:]
def dropUrls(self, urls, target): # URL -> Unmatched Files # TODO: use the drop target to move files to specific albums/tracks/clusters from urllib import unquote
eddf8dffd2c9bd2ca0fe5772a795abd26c991c30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12415/eddf8dffd2c9bd2ca0fe5772a795abd26c991c30/itemviews.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 10509, 12, 2890, 16, 6903, 16, 1018, 4672, 468, 1976, 317, 1351, 11073, 6471, 468, 2660, 30, 999, 326, 3640, 1018, 358, 3635, 1390, 358, 2923, 14844, 87, 19, 21499, 19, 16806, 628,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3640, 10509, 12, 2890, 16, 6903, 16, 1018, 4672, 468, 1976, 317, 1351, 11073, 6471, 468, 2660, 30, 999, 326, 3640, 1018, 358, 3635, 1390, 358, 2923, 14844, 87, 19, 21499, 19, 16806, 628,...
Result: A list of TestPlan dictionaries or a dictionary containing values for the keys, "faultcode" and "faultstring".
Result: A list of TestPlan dictionaries
def testcase_link_plan(self, case_id, plan_id): """Link A TestPlan To An Existing TestCase.
83012e559756373ef19add9ed3d26f1bf779a22c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/231/83012e559756373ef19add9ed3d26f1bf779a22c/testopia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3593, 67, 1232, 67, 7088, 12, 2890, 16, 648, 67, 350, 16, 4995, 67, 350, 4672, 3536, 2098, 432, 7766, 5365, 2974, 1922, 28257, 7766, 2449, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3593, 67, 1232, 67, 7088, 12, 2890, 16, 648, 67, 350, 16, 4995, 67, 350, 4672, 3536, 2098, 432, 7766, 5365, 2974, 1922, 28257, 7766, 2449, 18, 2, -100, -100, -100, -100, -100, -1...
""" called after loggin in when the server sends status of online contacts. @param statusCode: 3-letter status code @param userHandle: the contact's user handle (passport) @param screenName: the contact's screen name """ pass
""" Called after loggin in when the server sends status of online contacts. By default we will update the status attribute of the contact stored on the factory. @param statusCode: 3-letter status code @param userHandle: the contact's user handle (passport) @param screenName: the contact's screen name """ self.factory.contacts.getContact(userHandle).status = statusCode
def gotContactStatus(self, statusCode, userHandle, screenName): """ called after loggin in when the server sends status of online contacts.
9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 6567, 1482, 12, 2890, 16, 6593, 16, 729, 3259, 16, 5518, 461, 4672, 3536, 2566, 1839, 613, 1912, 316, 1347, 326, 1438, 9573, 1267, 434, 12365, 14841, 18, 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, 0, 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, 2363, 6567, 1482, 12, 2890, 16, 6593, 16, 729, 3259, 16, 5518, 461, 4672, 3536, 2566, 1839, 613, 1912, 316, 1347, 326, 1438, 9573, 1267, 434, 12365, 14841, 18, 2, -100, -100, -100, -100,...
canvas.drawString(inch, 0.75 * inch, "Page %d" % doc.page)
canvas.drawString(inch, 0.75 * inch, doc.collector.translate('page_number', "Page $num", num=doc.page))
def myLaterPages(canvas, doc): #canvas.drawImage("snkanim.gif", 36, 36) canvas.saveState() canvas.setStrokeColorRGB(1,0,0) canvas.setLineWidth(5) canvas.line(50,45,50,PAGE_HEIGHT-45) canvas.line(50,PAGE_HEIGHT-70, 555, PAGE_HEIGHT-70) canvas.setFont(NORMAL_FONT,15) canvas.drawString(inch, PAGE_HEIGHT-62, utf8(doc.collector_title)) canvas.setFont(NORMAL_FONT,11) canvas.drawString(inch, 0.75 * inch, "Page %d" % doc.page) canvas.drawString(450, 0.75 * inch, doc.collector.toLocalizedTime(DateTime(), long_format=1)) canvas.restoreState()
77b2874fab2e7fa46c6be5e272f09817409bbbe4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/77b2874fab2e7fa46c6be5e272f09817409bbbe4/pdfwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 20607, 5716, 12, 15424, 16, 997, 4672, 468, 15424, 18, 9446, 2040, 2932, 8134, 79, 304, 381, 18, 13905, 3113, 6580, 16, 6580, 13, 5953, 18, 5688, 1119, 1435, 5953, 18, 542, 14602, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20607, 5716, 12, 15424, 16, 997, 4672, 468, 15424, 18, 9446, 2040, 2932, 8134, 79, 304, 381, 18, 13905, 3113, 6580, 16, 6580, 13, 5953, 18, 5688, 1119, 1435, 5953, 18, 542, 14602, ...
final_blocks = [] for b in blocks: block = b[0] from_num = b[1] to_num = b[2] try: fraction = (float(number) - from_num) / (to_num - from_num) except ZeroDivisionError: fraction = 0.5 cursor.execute('SELECT ST_AsEWKT(line_interpolate_point(%s, %s))', [block[8], fraction]) wkt_str = cursor.fetchone()[0] matcher = self.patt.search(wkt_str) x = float(matcher.group(1)) y = float(matcher.group(2)) final_blocks.append((block, x, y))
final_blocks = [] for b in blocks: block = b[0] from_num = b[1] to_num = b[2] try: fraction = (float(number) - from_num) / (to_num - from_num) except ZeroDivisionError: fraction = 0.5 cursor.execute('SELECT ST_AsEWKT(line_interpolate_point(%s, %s))', [block[8], fraction]) wkt_str = cursor.fetchone()[0] matcher = self.patt.search(wkt_str) x = float(matcher.group(1)) y = float(matcher.group(2)) final_blocks.append((block, x, y))
def search(self,street,number=None,predir=None,suffix=None,postdir=None,city=None,state=None,zipcode=None): query = 'select id, pretty_name, from_num, to_num, left_from_num, left_to_num, right_from_num, right_to_num, ST_AsEWKT(geom) from blocks where street=%s' params = [street.upper()] if predir: query += ' and predir=%s' params.apepnd(predir.upper()) if suffix: query += ' and suffix=%s' params.append(suffix.upper()) if postdir: query += ' and postdir=%s' params.append(postdir.upper()) if city: cu = city.upper() query += ' and (left_city=%s or right_city=%s)' params.extend([cu, cu]) if state: su = state.upper() query += ' and (left_state=%s or right_state=%s)' params.extend([su, su]) if zipcode: query += ' and (left_zip=%s or right_zip=%s)' params.extend([zipcode, zipcode]) if number: query += ' and from_num <= %s and to_num >= %s' params.extend([number, number])
d2f41ed71ab95ba4461929832b988975a394d203 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14234/d2f41ed71ab95ba4461929832b988975a394d203/postgis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 22424, 16, 2696, 33, 7036, 16, 6510, 481, 33, 7036, 16, 8477, 33, 7036, 16, 2767, 1214, 33, 7036, 16, 14240, 33, 7036, 16, 2019, 33, 7036, 16, 4450, 710, 33, 7036...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 22424, 16, 2696, 33, 7036, 16, 6510, 481, 33, 7036, 16, 8477, 33, 7036, 16, 2767, 1214, 33, 7036, 16, 14240, 33, 7036, 16, 2019, 33, 7036, 16, 4450, 710, 33, 7036...
amount = order.total - (order.charges + order.charges_pending) order.charges_pending += amount self.charge_order(order_id, amount) order.save()
if self.automatically_charge: amount = order.total - (order.charges + order.charges_pending) order.charges_pending += amount self.charge_order(order_id, amount) order.save()
def handle_order_state_change(self, message, order_id, order, context): """ React to the order state change. """ assert order is not None order.state = message.new_fulfillment_order_state order.payment = message.new_financial_order_state order.save()
ec3da862e4a678b71b132591354314c93edc0835 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/ec3da862e4a678b71b132591354314c93edc0835/controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1019, 67, 2019, 67, 3427, 12, 2890, 16, 883, 16, 1353, 67, 350, 16, 1353, 16, 819, 4672, 3536, 13732, 358, 326, 1353, 919, 2549, 18, 3536, 1815, 1353, 353, 486, 599, 1353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1019, 67, 2019, 67, 3427, 12, 2890, 16, 883, 16, 1353, 67, 350, 16, 1353, 16, 819, 4672, 3536, 13732, 358, 326, 1353, 919, 2549, 18, 3536, 1815, 1353, 353, 486, 599, 1353, ...
for url, rawlink, msg in triples:
for url, rawlink, msg in triples:
def report_errors(self): if not self.bad: self.message("\nNo errors") return self.message("\nError Report:") sources = self.errors.keys() sources.sort() for source in sources: triples = self.errors[source] self.message("") if len(triples) > 1: self.message("%d Errors in %s", len(triples), source) else: self.message("Error in %s", source) # Begin SLB 2/24/99: Modified this loop to # call self.format_url() instead of referring # to the URL directly, since the URLs in these # triples is now a (URL, fragment) pair. The value # of the "source" variable comes from the list of # origins, and is a URL, not a pair. for url, rawlink, msg in triples: if rawlink != self.format_url(url): s = " (%s)" % rawlink else: s = "" self.message(" HREF %s%s\n msg %s", self.format_url(url), s, msg) # End SLB 2/24/99.
89c9ad8fa8b4bb95895e6c06ddfc6793a05b0c37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/89c9ad8fa8b4bb95895e6c06ddfc6793a05b0c37/wcnew.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4324, 12, 2890, 4672, 309, 486, 365, 18, 8759, 30, 365, 18, 2150, 31458, 82, 2279, 1334, 7923, 327, 365, 18, 2150, 31458, 82, 668, 8706, 2773, 13, 5550, 273, 365, 18, 4324, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4324, 12, 2890, 4672, 309, 486, 365, 18, 8759, 30, 365, 18, 2150, 31458, 82, 2279, 1334, 7923, 327, 365, 18, 2150, 31458, 82, 668, 8706, 2773, 13, 5550, 273, 365, 18, 4324, ...
path = path + '/' + b
path += '/' + b
def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path
77cdeaff556447a980fe8632e8cd010499ade2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/77cdeaff556447a980fe8632e8cd010499ade2d0/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 69, 16, 380, 84, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 2023, 487, 3577, 8395, 589, 273, 279, 364, 324, 316, 293, 30, 309, 324, 10531, 21, 65, 422, 2023, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 69, 16, 380, 84, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 2023, 487, 3577, 8395, 589, 273, 279, 364, 324, 316, 293, 30, 309, 324, 10531, 21, 65, 422, 2023, ...
self._rbuf = data[left:] buffers[-1] = data[:left] break
buf.write(buffer(data, 0, left)) self._rbuf.write(buffer(data, left)) break buf.write(data)
def readline(self, size=-1): data = self._rbuf if size < 0: # Read until \n or EOF, whichever comes first if self._rbufsize <= 1: # Speed up unbuffered case assert data == "" buffers = [] recv = self._sock.recv while data != "\n": data = recv(1) if not data: break buffers.append(data) return "".join(buffers) nl = data.find('\n') if nl >= 0: nl += 1 self._rbuf = data[nl:] return data[:nl] buffers = [] if data: buffers.append(data) self._rbuf = "" while True: data = self._sock.recv(self._rbufsize) if not data: break buffers.append(data) nl = data.find('\n') if nl >= 0: nl += 1 self._rbuf = data[nl:] buffers[-1] = data[:nl] break return "".join(buffers) else: # Read until size bytes or \n or EOF seen, whichever comes first nl = data.find('\n', 0, size) if nl >= 0: nl += 1 self._rbuf = data[nl:] return data[:nl] buf_len = len(data) if buf_len >= size: self._rbuf = data[size:] return data[:size] buffers = [] if data: buffers.append(data) self._rbuf = "" while True: data = self._sock.recv(self._rbufsize) if not data: break buffers.append(data) left = size - buf_len nl = data.find('\n', 0, left) if nl >= 0: nl += 1 self._rbuf = data[nl:] buffers[-1] = data[:nl] break n = len(data) if n >= left: self._rbuf = data[left:] buffers[-1] = data[:left] break buf_len += n return "".join(buffers)
5203dbadc432c6f2260803a4064375469d5ec7b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/5203dbadc432c6f2260803a4064375469d5ec7b6/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 501, 273, 365, 6315, 86, 4385, 309, 963, 411, 374, 30, 468, 2720, 3180, 521, 82, 578, 6431, 16, 600, 335, 580, 502, 14535, 1122, 309, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 501, 273, 365, 6315, 86, 4385, 309, 963, 411, 374, 30, 468, 2720, 3180, 521, 82, 578, 6431, 16, 600, 335, 580, 502, 14535, 1122, 309, 365, ...
self.language = languages.getlanguage(document.language_code)
self.language = languages.get_language(document.language_code)
def run(self, input_lines, document, input_offset=0, match_titles=1, inliner=None): """ Parse `input_lines` and return a `docutils.nodes.document` instance.
e7314f4e06daea4bd26717024fa0140b33b8c164 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/e7314f4e06daea4bd26717024fa0140b33b8c164/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 810, 67, 3548, 16, 1668, 16, 810, 67, 3348, 33, 20, 16, 845, 67, 17643, 33, 21, 16, 316, 7511, 264, 33, 7036, 4672, 3536, 2884, 1375, 2630, 67, 3548, 68, 471, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 810, 67, 3548, 16, 1668, 16, 810, 67, 3348, 33, 20, 16, 845, 67, 17643, 33, 21, 16, 316, 7511, 264, 33, 7036, 4672, 3536, 2884, 1375, 2630, 67, 3548, 68, 471, 3...
RegisterFiles = (('gp', SPURegister, range(0,128)),)
RegisterFiles = (('gp', SPURegister, range(1,128)),)
def align_addr(addr, align = 16, dir = ALIGN_DOWN): """ Round an address to the nearest aligned address based on align. Round up or down based on dir. """ if dir == ALIGN_DOWN: return addr - (addr % align) else: return addr + (align - addr % align)
9fefb5e1dd107bbbaa28a4d0eaaf83894633549f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9699/9fefb5e1dd107bbbaa28a4d0eaaf83894633549f/spre_linux_spu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5689, 67, 4793, 12, 4793, 16, 5689, 273, 2872, 16, 1577, 273, 21892, 67, 12711, 4672, 3536, 11370, 392, 1758, 358, 326, 11431, 13939, 1758, 2511, 603, 5689, 18, 11370, 731, 578, 2588, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5689, 67, 4793, 12, 4793, 16, 5689, 273, 2872, 16, 1577, 273, 21892, 67, 12711, 4672, 3536, 11370, 392, 1758, 358, 326, 11431, 13939, 1758, 2511, 603, 5689, 18, 11370, 731, 578, 2588, 25...
if self.failure is not None: if self.deferred is not None: self.deferred.errback(self.failure) elif self.success is not None: if self.deferred is not None: self.deferred.callback(self.success)
def _viewCommitSuccess(self): """ Overides C{RepositoryView.AbstractRepositoryViewManager}. It posts a commit event to the GUI thread, unpins the C{SMTPAccountKind} and C{MailMessageKind} from memory, and writes commit info to the logger @return: C{None} """
d960d706646e78788bec920db499ea2c3260e262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d960d706646e78788bec920db499ea2c3260e262/smtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1945, 5580, 4510, 12, 2890, 4672, 3536, 10752, 4369, 385, 95, 3305, 1767, 18, 7469, 3305, 1767, 1318, 5496, 2597, 10775, 279, 3294, 871, 358, 326, 10978, 2650, 16, 640, 84, 2679, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1945, 5580, 4510, 12, 2890, 4672, 3536, 10752, 4369, 385, 95, 3305, 1767, 18, 7469, 3305, 1767, 1318, 5496, 2597, 10775, 279, 3294, 871, 358, 326, 10978, 2650, 16, 640, 84, 2679, 32...
return S_OK(False) def getProtocolPfn(self,pfnDict,withPort):
return S_OK( False ) def getProtocolPfn( self, pfnDict, withPort ):
def isPfnForProtocol(self,pfn): res = pfnparse(pfn) if not res['OK']: return res pfnDict = res['Value'] if pfnDict['Protocol'] == self.protocol: return S_OK(True) else: return S_OK(False)
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29962, 4293, 1290, 5752, 12, 2890, 16, 84, 4293, 4672, 400, 273, 293, 4293, 2670, 12, 84, 4293, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 293, 4293, 5014, 273, 400, 3292, 620,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29962, 4293, 1290, 5752, 12, 2890, 16, 84, 4293, 4672, 400, 273, 293, 4293, 2670, 12, 84, 4293, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 293, 4293, 5014, 273, 400, 3292, 620,...
if file.hasAttribute("localfilename"): mediafile = file.attributes["localfilename"].value
def preProcessFile(file, folder): """Pre-process a single video/recording file.""" write( "Pre-processing file '" + file.attributes["filename"].value + \ "' of type '"+ file.attributes["type"].value+"'") #As part of this routine we need to pre-process the video: #1. check the file actually exists #2. extract information from mythtv for this file in xml file #3. Extract a single frame from the video to use as a thumbnail and resolution check mediafile="" if file.attributes["type"].value == "recording": mediafile = os.path.join(recordingpath, file.attributes["filename"].value) elif file.attributes["type"].value == "video": mediafile = os.path.join(videopath, file.attributes["filename"].value) elif file.attributes["type"].value == "file": mediafile = file.attributes["filename"].value else: fatalError("Unknown type of video file it must be 'recording', 'video' or 'file'.") if doesFileExist(mediafile) == False: fatalError("Source file does not exist: " + mediafile) #write( "Original file is",os.path.getsize(mediafile),"bytes in size") getFileInformation(file, os.path.join(folder, "info.xml")) if file.hasAttribute("localfilename"): mediafile = file.attributes["localfilename"].value getStreamInformation(mediafile, os.path.join(folder, "streaminfo.xml"), 0) videosize = getVideoSize(os.path.join(folder, "streaminfo.xml")) write( "Video resolution is %s by %s" % (videosize[0], videosize[1]))
845a729f0a10a92e2f8790d710523f042070f811 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/845a729f0a10a92e2f8790d710523f042070f811/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2227, 812, 12, 768, 16, 3009, 4672, 3536, 1386, 17, 2567, 279, 2202, 6191, 19, 3366, 310, 585, 12123, 225, 1045, 12, 315, 1386, 17, 10632, 585, 2119, 397, 585, 18, 4350, 9614, 345...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 2227, 812, 12, 768, 16, 3009, 4672, 3536, 1386, 17, 2567, 279, 2202, 6191, 19, 3366, 310, 585, 12123, 225, 1045, 12, 315, 1386, 17, 10632, 585, 2119, 397, 585, 18, 4350, 9614, 345...
def SetRed( self, value ) :
def SetRed(self, value):
def SetRed( self, value ) : self.Red = value return self
13865299ef9bc077be9a5eaa4326b7a30307d828 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3330/13865299ef9bc077be9a5eaa4326b7a30307d828/PropertySets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 3715, 12, 2890, 16, 460, 4672, 365, 18, 3715, 273, 460, 327, 365, 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, 1000, 3715, 12, 2890, 16, 460, 4672, 365, 18, 3715, 273, 460, 327, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
header.append(SNP_id)
SNP_id_ls = SNP_id.split('_') header.append('%s_%s'%(SNP_id_ls[0], SNP_id_ls[1]))
def read_call_matrix(cls, call_info_id2fname, min_probability=-1, snps_name_set=None): """ 2008-05-18 rename strain_acc_list, category_list to call_info_id_ls and ecotype_id_ls add array_id_ls return array_id_ls 2008-05-06 add snps_name_set 2008-05-03 add min_probability 2008-04-20 fake header, strain_acc_list, category_list, data_matrix """ sys.stderr.write("Creating call matrix ... \n") header = ['', ''] #1st and 2nd is header for 1st two columns. call_matrix = [] call_info_id_ls = [] ecotype_id_ls = [] array_id_ls = [] counter = 0 call_info_id_ls = call_info_id2fname.keys() no_of_entries = len(call_info_id_ls) for i in range(no_of_entries): call_info_id = call_info_id_ls[i] ecotype_id, fname, array_id = call_info_id2fname[call_info_id] sys.stderr.write("%s%d/%d:\t\t%s"%('\x08'*100, i+1, no_of_entries, fname)) call_info_id_ls.append(call_info_id) ecotype_id_ls.append(ecotype_id) array_id_ls.append(array_id) reader = csv.reader(open(fname), delimiter='\t') reader.next() #throw away the first line data_row = [] for row in reader: SNP_id, call = row[:2] if snps_name_set and SNP_id not in snps_name_set: continue if counter==0: #first file header.append(SNP_id) if len(row)==3: probability = float(row[2]) if probability < min_probability: call = 'NA' data_row.append(nt2number[call]) del reader call_matrix.append(data_row) counter += 1 sys.stderr.write("Done.\n") return header, array_id_ls, ecotype_id_ls, call_matrix
c4e9b8926628d2b435f50364e10cb8870b473c8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/c4e9b8926628d2b435f50364e10cb8870b473c8c/QC_250k.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1991, 67, 5667, 12, 6429, 16, 745, 67, 1376, 67, 350, 22, 12749, 16, 1131, 67, 22390, 29711, 21, 16, 4556, 1121, 67, 529, 67, 542, 33, 7036, 4672, 3536, 4044, 28, 17, 6260, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1991, 67, 5667, 12, 6429, 16, 745, 67, 1376, 67, 350, 22, 12749, 16, 1131, 67, 22390, 29711, 21, 16, 4556, 1121, 67, 529, 67, 542, 33, 7036, 4672, 3536, 4044, 28, 17, 6260, ...
def GetInterwikies( lang, titles, extraParams = None ):
def GetInterwikies(site, titles, extraParams = None ):
def GetInterwikies( lang, titles, extraParams = None ): """ Usage example: data = GetInterwikies('ru','user:yurik') titles may be either ane title (as a string), or a list of strings extraParams if given must be a dict() as taken by GetData() """ params = {'titles':ListToParam(titles), 'what' : 'redirects|langlinks'} params = CombineParams( params, extraParams ) return GetData( lang, params )
3524e338086618d1dabcda0ee7578a46a28e59e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/3524e338086618d1dabcda0ee7578a46a28e59e3/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2465, 11999, 606, 12, 4256, 16, 14693, 16, 2870, 1370, 273, 599, 262, 30, 3536, 10858, 3454, 30, 501, 273, 968, 2465, 11999, 606, 2668, 8653, 17023, 1355, 30, 93, 1650, 79, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2465, 11999, 606, 12, 4256, 16, 14693, 16, 2870, 1370, 273, 599, 262, 30, 3536, 10858, 3454, 30, 501, 273, 968, 2465, 11999, 606, 2668, 8653, 17023, 1355, 30, 93, 1650, 79, 6134, ...
class ILookupTable:
class ILookupTable(Interface):
def nameprep(self, label): return label.lower()
9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 19109, 12, 2890, 16, 1433, 4672, 327, 1433, 18, 8167, 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, 508, 19109, 12, 2890, 16, 1433, 4672, 327, 1433, 18, 8167, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...