rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
remove(self.filename)
if os.path.isdir(self.filename): shutil.rmtree(self.filename) else: remove(self.filename)
def stop(self): self.state = "stopped" self.updateClient() self._shutdownTorrent() try: remove(self.filename) except: pass
d0fe3386e25e3fb284477d53f543161cdd4e8322 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/d0fe3386e25e3fb284477d53f543161cdd4e8322/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 365, 18, 2019, 273, 315, 24228, 6, 365, 18, 2725, 1227, 1435, 365, 6315, 15132, 27266, 547, 1435, 775, 30, 309, 1140, 18, 803, 18, 291, 1214, 12, 2890, 18, 3459, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 365, 18, 2019, 273, 315, 24228, 6, 365, 18, 2725, 1227, 1435, 365, 6315, 15132, 27266, 547, 1435, 775, 30, 309, 1140, 18, 803, 18, 291, 1214, 12, 2890, 18, 3459, ...
name = cmd.split(' ', 1)[0]
if '|' in cmd: name = cmd.split('|')[1].strip().split(' ', 1)[0] else: name = cmd.strip().split(' ', 1)[0]
def _run(cmd, options): from epydoc.epytext import wordwrap name = cmd.split(' ', 1)[0] if options['verbosity'] == 1: print >>sys.stderr, 'Running %s...' % name elif options['verbosity'] > 1: cmd_str = wordwrap(`cmd`, 10+len(name)).lstrip() print >>sys.stderr, 'Running %s' % cmd_str.rstrip() pipe = os.popen(cmd) output = pipe.read() exitcode = pipe.close() if exitcode is not None: print output raise OSError('%s failed: %s' % name, exitcode)
1a41b94e13defddaa2ccdd6c5f2ae3ce9d8e33a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/1a41b94e13defddaa2ccdd6c5f2ae3ce9d8e33a9/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 4172, 16, 702, 4672, 628, 425, 2074, 2434, 18, 881, 93, 955, 1930, 2076, 4113, 309, 8030, 316, 1797, 30, 508, 273, 1797, 18, 4939, 2668, 96, 6134, 63, 21, 8009, 6406, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 12, 4172, 16, 702, 4672, 628, 425, 2074, 2434, 18, 881, 93, 955, 1930, 2076, 4113, 309, 8030, 316, 1797, 30, 508, 273, 1797, 18, 4939, 2668, 96, 6134, 63, 21, 8009, 6406, ...
option_parser.add_option('-r', '--rebuild_archive', action='store_true', default=False, help='Rebuild Chrome.7z archive, even if it exists.')
option_parser.add_option('-s', '--skip_rebuild_archive', action='store_true', default=False, help='Skip re-building Chrome.7z archive if it exists.')
def main(options): """Main method that reads input file, creates archive file and write resource input file. """ current_version = BuildVersion(options.output_dir) config = Readconfig(options.output_dir, options.input_file, current_version) staging_dir = MakeStagingDirectory(options.output_dir) CopyAllFilesToStagingDir(config, options.distribution, staging_dir, options.output_dir) # Name of the archive file built (for example - chrome.7z or # patch-<old_version>-<new_version>.7z or patch-<new_version>.7z archive_file_name = CreateArchiveFile(options.output_dir, staging_dir, current_version, options.last_chrome_installer, options.last_chrome_version, options.rebuild_archive) CreateResourceInputFile(options.output_dir, options.last_chrome_installer, archive_file_name)
cd77acf650cb84d07676ad3c72c123f09a4e701d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/cd77acf650cb84d07676ad3c72c123f09a4e701d/create_installer_archive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 4672, 3536, 6376, 707, 716, 6838, 810, 585, 16, 3414, 5052, 585, 471, 1045, 1058, 810, 585, 18, 3536, 783, 67, 1589, 273, 3998, 1444, 12, 2116, 18, 2844, 67, 1214, 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, 2774, 12, 2116, 4672, 3536, 6376, 707, 716, 6838, 810, 585, 16, 3414, 5052, 585, 471, 1045, 1058, 810, 585, 18, 3536, 783, 67, 1589, 273, 3998, 1444, 12, 2116, 18, 2844, 67, 1214, 13, ...
contents += "<tr"+row_classes+">" for item in row: try: item_str = item.render() except AttributeError: if item == None: item_str = '' else: item_str = str(item) contents += "<td>"+item_str+"</td>" contents += "</tr>\n"
contents += self.__renderRow(row,'td',self.__row_classes[i])
def render(self): """Generate a HTML version of the table""" # Deal with CSS classes if len(self.__classes): class_attribute = " class='"+" ".join(self.__classes)+"' " else: class_attribute = '' # Deal with table title if self.__title: title_attribute = " title='"+str(self.__title)+"' " else: title_attribute = '' # Construct table tag contents = "<table"+class_attribute+title_attribute+">\n" # Build the table header if len(self.__header) and not self.hasEmptyHeader(): # Automatic cell merging - empty cells # will be merged into the first non-empty # cell to the left template = [] last_nonempty_cell = 0 for i in range(0,len(self.__header)): if not self.__header[i] is None: last_nonempty_cell = i template.append(last_nonempty_cell) #FIXME diagnostic code commented out below ##colspan = [] ##for i in range(0,len(template)): ## colspan.append(template.count(i)) ##print "Header = "+str(self.__header) ##print "Template = "+str(template) ##print "Colspan = "+str(colspan) contents += "<tr>" for i in range(0,len(self.__header)): colspan = template.count(i) if colspan > 0: item = self.__header[i] if colspan > 1: colspan_attr = " colspan='"+str(colspan)+"' " else: colspan_attr = '' try: item_str = item.render() except AttributeError: # Assume item has no render method if item == None: item_str = '' else: item_str = str(item) contents += "<th"+colspan_attr+">"+item_str+"</th>" contents += "</tr>\n" # Table contents i = 0 # Row counter for row in self.__rows: # Deal with CSS classes assigned to this row if self.__row_classes[i]: row_classes = " class='"+str(self.__row_classes[i])+"'" else: row_classes = '' contents += "<tr"+row_classes+">" for item in row: try: item_str = item.render() except AttributeError: # Assume item has no render method if item == None: item_str = '' else: item_str = str(item) contents += "<td>"+item_str+"</td>" contents += "</tr>\n" i += 1 contents += "</table>\n" return contents
388e0d15356f7530809f22cf403e5e5970d74f72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3290/388e0d15356f7530809f22cf403e5e5970d74f72/Canary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 4625, 279, 3982, 1177, 434, 326, 1014, 8395, 468, 28998, 598, 6765, 3318, 309, 562, 12, 2890, 16186, 4701, 4672, 667, 67, 4589, 273, 315, 667, 13396, 9078, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 4625, 279, 3982, 1177, 434, 326, 1014, 8395, 468, 28998, 598, 6765, 3318, 309, 562, 12, 2890, 16186, 4701, 4672, 667, 67, 4589, 273, 315, 667, 13396, 9078, 35...
path = self.protocol + '://' + (host or self.host) + path
path = self.protocol + '://' + (host or self.server_name()) + path
def prefix_proxy_to_path(self, path, host=None): path = self.protocol + '://' + (host or self.host) + path return path
9afec617c2a6594ead81a6492d6543ac6c59b6fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/9afec617c2a6594ead81a6492d6543ac6c59b6fc/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1633, 67, 5656, 67, 869, 67, 803, 12, 2890, 16, 589, 16, 1479, 33, 7036, 4672, 589, 273, 365, 18, 8373, 397, 18397, 397, 261, 2564, 578, 365, 18, 3567, 67, 529, 10756, 397, 589, 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, 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, 1633, 67, 5656, 67, 869, 67, 803, 12, 2890, 16, 589, 16, 1479, 33, 7036, 4672, 589, 273, 365, 18, 8373, 397, 18397, 397, 261, 2564, 578, 365, 18, 3567, 67, 529, 10756, 397, 589, 327,...
self.ui.preferred_release_country.addItem(N_("None"), QtCore.QVariant(""))
self.ui.preferred_release_country.addItem(_("None"), QtCore.QVariant(""))
def __init__(self, parent=None): super(MetadataOptionsPage, self).__init__(parent) self.ui = Ui_MetadataOptionsPage() self.ui.setupUi(self) self.connect(self.ui.va_name_default, QtCore.SIGNAL("clicked()"), self.set_va_name_default) self.connect(self.ui.nat_name_default, QtCore.SIGNAL("clicked()"), self.set_nat_name_default) self.ui.preferred_release_country.addItem(N_("None"), QtCore.QVariant("")) for country, name in sorted(RELEASE_COUNTRIES.items(), key=operator.itemgetter(1)): self.ui.preferred_release_country.addItem(name, QtCore.QVariant(country))
f70a50fd6a0ca2ad4dbccdae97c2139591cb7048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12415/f70a50fd6a0ca2ad4dbccdae97c2139591cb7048/metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 2240, 12, 2277, 1320, 1964, 16, 365, 2934, 972, 2738, 972, 12, 2938, 13, 365, 18, 4881, 273, 22597, 67, 2277, 1320, 1964, 1435, 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, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 2240, 12, 2277, 1320, 1964, 16, 365, 2934, 972, 2738, 972, 12, 2938, 13, 365, 18, 4881, 273, 22597, 67, 2277, 1320, 1964, 1435, 365,...
from zope.app.testing.placelesssetup import setUp setUp()
if run_setUp: placelesssetup.setUp()
def afterSetUp(self): from zope.app.testing.placelesssetup import setUp setUp() # Allow traversing import Products.Five from Products.Five.zcml import load_string, load_config load_config('meta.zcml', package=Products.Five) load_config('configure.zcml', package=Products.Five) # Change to the context of this package Products.Five.zcml._context.package = Products.ResourceRegistries.tests load_string(dedent('''\ <configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five"> <include package="zope.app.traversing" /> <adapter for="*" factory="Products.Five.traversable.FiveTraversable" provides="zope.app.traversing.interfaces.ITraversable" /> <adapter for="*" factory="zope.app.traversing.adapters.Traverser" provides="zope.app.traversing.interfaces.ITraverser" /> </configure>''')) # Enable Plone traversing # XXX this is needed in 2.1 but if defined it breaks 2.5. Why? load_string(dedent('''\ <configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five"> <!-- IPortal binds to the portal root -->
9378b3e8e45c5718f27050cb96d7ec7dbbd2890f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12274/9378b3e8e45c5718f27050cb96d7ec7dbbd2890f/five_tests_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 694, 1211, 12, 2890, 4672, 309, 1086, 67, 542, 1211, 30, 886, 1077, 12617, 8401, 18, 542, 1211, 1435, 282, 468, 7852, 10704, 310, 1930, 8094, 87, 18, 42, 688, 628, 8094, 87, 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, 1839, 694, 1211, 12, 2890, 4672, 309, 1086, 67, 542, 1211, 30, 886, 1077, 12617, 8401, 18, 542, 1211, 1435, 282, 468, 7852, 10704, 310, 1930, 8094, 87, 18, 42, 688, 628, 8094, 87, 18, ...
self._write(self._write_trees, directory, 'trees.html', progress_callback) self._write(self._write_indices, directory, 'indices.html', progress_callback) self._write(self._write_help, directory, 'help.html', progress_callback) self._write(self._write_frames, directory, 'frames.html', progress_callback) self._write(self._write_toc, directory, 'toc.html', progress_callback) self._write(self._write_project_toc, directory, 'toc-everything.html', progress_callback) for (uid, doc) in self._docmap.items(): if uid.is_module(): filename = 'toc-%s' % self._uid_to_filename(uid) self._write(self._write_module_toc, directory, filename, progress_callback, uid, doc)
if progress_callback: progress_callback('epydoc.css') if self._create_private_docs: self._write_css(public_directory, self._css) self._write_css(private_directory, self._private_css) self._write_css(directory, self._css) else: self._write_css(directory, self._css)
def write(self, directory=None, progress_callback=None): """ Write the documentation to the given directory.
21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 16, 4007, 67, 3394, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 16, 4007, 67, 3394, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
c=OWGraphTools.ColorPaletteHSV(len(strains))
c=OWColorPalette.ColorPaletteHSV(len(strains))
def setList(self, data): self.colorCombo.clear() self.sizeCombo.clear() self.shapeCombo.clear() self.nameCombo.clear() for name in ["One color", "strain"]: self.colorCombo.addItem(name) for name in ["No name", "name", "strain"]: self.nameCombo.addItem(name)
d0620d7d7f1aa3a4dea31e6766ed5d4287a2caa9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/d0620d7d7f1aa3a4dea31e6766ed5d4287a2caa9/OWMDS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 682, 12, 2890, 16, 501, 4672, 365, 18, 3266, 16156, 18, 8507, 1435, 365, 18, 1467, 16156, 18, 8507, 1435, 365, 18, 4867, 16156, 18, 8507, 1435, 365, 18, 529, 16156, 18, 8507, 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, 444, 682, 12, 2890, 16, 501, 4672, 365, 18, 3266, 16156, 18, 8507, 1435, 365, 18, 1467, 16156, 18, 8507, 1435, 365, 18, 4867, 16156, 18, 8507, 1435, 365, 18, 529, 16156, 18, 8507, 1435...
file = self.tmpdir+'XXX'
file = self.tmpdir + 'XXX'
def execute(self, iterations = 1, mem = '', fastmem = 'NO', slowfs = 'NO', disks = '', disks_desc = '', mhz = '', remote = '', enough = '5000', sync_max = '1', fsdir = None, file = None): if not fsdir: fsdir = self.tmpdir if not file: file = self.tmpdir+'XXX'
10c418b463096a9f5a9a2ba1f43ec579f2b02768 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/10c418b463096a9f5a9a2ba1f43ec579f2b02768/lmbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 1663, 273, 10226, 4797, 3917, 273, 296, 3417, 2187, 11816, 2556, 273, 296, 3417, 2187, 17164, 273, 10226, 17164, 67, 5569, 273, 10226, 17819, 94, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 1663, 273, 10226, 4797, 3917, 273, 296, 3417, 2187, 11816, 2556, 273, 296, 3417, 2187, 17164, 273, 10226, 17164, 67, 5569, 273, 10226, 17819, 94, ...
(\]_)
(?P<fnend>\]_)
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
039645ec5706bfe06b64e66663e62db9bc1abf30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/039645ec5706bfe06b64e66663e62db9bc1abf30/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
if type(key) not in (StringType, UnicodeType, IntType): raise TypeError('DisplayList keys must be strings or ints, got %s' %
if type(key) not in (StringType, UnicodeType): raise TypeError('DisplayList msgids must be strings, got %s' %
def getMsgId(self, key): "get i18n msgid" if type(key) not in (StringType, UnicodeType, IntType): raise TypeError('DisplayList keys must be strings or ints, got %s' % type(key)) if self._i18n_msgids.has_key(key): return self._i18n_msgids[key] else: return self._keys[key][1]
7077e13c13c5f26bef1e6c8303a9f78cb6b9f50b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/7077e13c13c5f26bef1e6c8303a9f78cb6b9f50b/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 1055, 548, 12, 2890, 16, 498, 4672, 315, 588, 277, 2643, 82, 24389, 6, 309, 618, 12, 856, 13, 486, 316, 261, 780, 559, 16, 9633, 559, 4672, 1002, 3580, 2668, 4236, 682, 1234, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 1055, 548, 12, 2890, 16, 498, 4672, 315, 588, 277, 2643, 82, 24389, 6, 309, 618, 12, 856, 13, 486, 316, 261, 780, 559, 16, 9633, 559, 4672, 1002, 3580, 2668, 4236, 682, 1234, 2...
@param align: element alignment: -1: do not align 0: automatic alignment other values: element width
@param align: element alignment - -1: do not align - 0: automatic alignment - other values: element width
def SetArrayFormat(ea, flags, litems, align): """ Set array representation format @param ea: linear address @param flags: combination of AP_... constants or 0 @param litems: number of items per line. 0 means auto @param align: element alignment: -1: do not align 0: automatic alignment other values: element width @return: 1-ok, 0-failure """ return Eval("SetArrayFormat(0x%X, 0x%X, %d, %d)"%(ea, flags, litems, align))
3c590053cdc96fefd4a942960351894bc50233a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6984/3c590053cdc96fefd4a942960351894bc50233a3/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1076, 1630, 12, 24852, 16, 2943, 16, 328, 3319, 16, 5689, 4672, 3536, 1000, 526, 4335, 740, 225, 632, 891, 24164, 30, 9103, 1758, 632, 891, 2943, 30, 10702, 434, 14410, 67, 2777, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1076, 1630, 12, 24852, 16, 2943, 16, 328, 3319, 16, 5689, 4672, 3536, 1000, 526, 4335, 740, 225, 632, 891, 24164, 30, 9103, 1758, 632, 891, 2943, 30, 10702, 434, 14410, 67, 2777, ...
Do a longer-running example:
This API returns information as a string, the first part of which is a `JSON-encoded <http://www.json.org/>`_ dictionary. The second part -- after the separator ``___S_A_G_E___`` -- is the text of the output. To parse output, you just need to split the string and parse the JSON data into your local format. Do a longer-running example::
sage: def get_url(url): h = urllib.urlopen(url); data = h.read(); h.close(); return data
cd28d54e6430def4fe705e11d0dba35298b2aa57 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/cd28d54e6430def4fe705e11d0dba35298b2aa57/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 336, 67, 718, 12, 718, 4672, 366, 273, 11527, 18, 295, 18589, 12, 718, 1769, 501, 273, 366, 18, 896, 5621, 366, 18, 4412, 5621, 327, 501, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 272, 410, 30, 1652, 336, 67, 718, 12, 718, 4672, 366, 273, 11527, 18, 295, 18589, 12, 718, 1769, 501, 273, 366, 18, 896, 5621, 366, 18, 4412, 5621, 327, 501, 2, -100, -100, -100, -100, -10...
self.map = map
self._map = map
def __init__(self, map, display, name = None): qt.QObject.__init__(self, display, name) self.map = map self.display = display self.connect(display.viewer, qt.PYSIGNAL("mousePressed"), self.search)
65254bc446b7c353066fe806e0424030a38d558d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/65254bc446b7c353066fe806e0424030a38d558d/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 16, 2562, 16, 508, 273, 599, 4672, 25672, 18, 53, 921, 16186, 2738, 972, 12, 2890, 16, 2562, 16, 508, 13, 365, 6315, 1458, 273, 852, 365, 18, 5417...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 852, 16, 2562, 16, 508, 273, 599, 4672, 25672, 18, 53, 921, 16186, 2738, 972, 12, 2890, 16, 2562, 16, 508, 13, 365, 6315, 1458, 273, 852, 365, 18, 5417...
D[i,i] = b**(2**i)
D[i, i] = b**(2**i)
def D(b): """ Return the e x e matrix $D$ with $b^i$ along the diagonal.
e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 12, 70, 4672, 3536, 2000, 326, 425, 619, 425, 3148, 271, 40, 8, 598, 271, 70, 66, 77, 8, 7563, 326, 15425, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 463, 12, 70, 4672, 3536, 2000, 326, 425, 619, 425, 3148, 271, 40, 8, 598, 271, 70, 66, 77, 8, 7563, 326, 15425, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self._shellCmd.execute('python "%s" %s "%s"' % (lintCommand, lint_opts, self._classesObj[classId].path))
self._shellCmd.execute('%s "%s" %s "%s"' % (sys.executable, lintCommand, lint_opts, self._classesObj[classId].path))
def getFilteredClassList(classes, includePatt_, excludePatt_): # Although lint-check doesn't work with dependencies, we allow # '=' in class pattern for convenience; stripp those now intelli, explicit = self._splitIncludeExcludeList(includePatt_) includePatt = intelli + explicit intelli, explicit = self._splitIncludeExcludeList(excludePatt_) excludePatt = intelli + explicit if len(includePatt): incRegex = map(textutil.toRegExpS, includePatt) incRegex = re.compile("|".join(incRegex)) else: incRegex = re.compile(".") # catch-all if len(excludePatt): excRegex = map(textutil.toRegExpS, excludePatt) excRegex = re.compile("|".join(excRegex)) else: excRegex = re.compile("^$") # catch-none
bb76640ab56ac42d313b164be48d6ac807ee2a97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/bb76640ab56ac42d313b164be48d6ac807ee2a97/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12267, 329, 30546, 12, 4701, 16, 2341, 52, 4558, 67, 16, 4433, 52, 4558, 67, 4672, 468, 2262, 18897, 19477, 17, 1893, 3302, 1404, 1440, 598, 5030, 16, 732, 1699, 468, 5214, 316, 667, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12267, 329, 30546, 12, 4701, 16, 2341, 52, 4558, 67, 16, 4433, 52, 4558, 67, 4672, 468, 2262, 18897, 19477, 17, 1893, 3302, 1404, 1440, 598, 5030, 16, 732, 1699, 468, 5214, 316, 667, 1...
" const char* name = GetImmediateDataAs<const char*>(c);\n") file.Write(" // TODO(gman): Make sure validate checks\n") file.Write(" // immediate_data_size covers data_size.\n")
" const char* name = GetImmediateDataAs<const char*>(\n") file.Write(" c, name_size, immediate_data_size);\n")
def WriteImmediateServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "parse_error::ParseError GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) last_arg = func.GetLastOriginalArg()
07f54fcc277a2d8fc3e6cecc5df5ea5c3d5ed080 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/07f54fcc277a2d8fc3e6cecc5df5ea5c3d5ed080/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 28...
self._rbuf = [ ] self._wbuf = [ ]
self._rbuf = [] self._wbuf = []
def __init__(self, sock, mode='rb', bufsize=-1): self._sock = sock self._mode = mode if bufsize <= 0: if bufsize == 0: bufsize = 1 # Unbuffered mode else: bufsize = 8192 self._rbufsize = bufsize self._wbufsize = bufsize self._rbuf = [ ] self._wbuf = [ ]
02cbbcbce4351e277d7a28cfb36c5c65342a1b7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/02cbbcbce4351e277d7a28cfb36c5c65342a1b7e/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1965, 2218, 6731, 2187, 1681, 1467, 29711, 21, 4672, 365, 6315, 15031, 273, 7313, 365, 6315, 3188, 273, 1965, 309, 1681, 1467, 1648, 374, 30, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1965, 2218, 6731, 2187, 1681, 1467, 29711, 21, 4672, 365, 6315, 15031, 273, 7313, 365, 6315, 3188, 273, 1965, 309, 1681, 1467, 1648, 374, 30, 309...
fn(val)
try: fn(val) except Exception, err: if errors.exceptionIsUncatchable(err): raise raise ParseError, "%s:%s: when processing %s: %s" \ % (fileName, lineno, key, err)
def configLine(self, line, fileName = "override", lineno = '<No line>'): origLine = line line = line.strip() line = line.replace('\\\\', '\0').replace('\\#', '\1') line = line.split('#', 1)[0] if not line: return line = line.replace('\0', '\\').replace('\1', '#')
c53a0bcd6b0155ddcf541fae0cf0e46d37e90e9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/c53a0bcd6b0155ddcf541fae0cf0e46d37e90e9f/cfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 1670, 12, 2890, 16, 980, 16, 3968, 273, 315, 10601, 3113, 7586, 273, 2368, 2279, 980, 1870, 4672, 1647, 1670, 273, 980, 980, 273, 980, 18, 6406, 1435, 980, 273, 980, 18, 2079, 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, 642, 1670, 12, 2890, 16, 980, 16, 3968, 273, 315, 10601, 3113, 7586, 273, 2368, 2279, 980, 1870, 4672, 1647, 1670, 273, 980, 980, 273, 980, 18, 6406, 1435, 980, 273, 980, 18, 2079, 266...
""" put the blog information on session """
def setBlogSession(self, title='', body='', author='', email=''): """ put the blog information on session """ self.__setSession('blog_title', title) self.__setSession('blog_body', body) self.__setSession('blog_author', author) self.__setSession('blog_email', email)
5e2c32dd33871476397a4f10e62760ac351975c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3287/5e2c32dd33871476397a4f10e62760ac351975c5/session_manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15268, 1330, 2157, 12, 2890, 16, 2077, 2218, 2187, 1417, 2218, 2187, 2869, 2218, 2187, 2699, 2218, 11, 4672, 365, 16186, 542, 2157, 2668, 11439, 67, 2649, 2187, 2077, 13, 365, 16186, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15268, 1330, 2157, 12, 2890, 16, 2077, 2218, 2187, 1417, 2218, 2187, 2869, 2218, 2187, 2699, 2218, 11, 4672, 365, 16186, 542, 2157, 2668, 11439, 67, 2649, 2187, 2077, 13, 365, 16186, 542, ...
self.setViewFromCsys( self.part.homeCsys) self.gl_update()
self.setViewFromCsys( self.part.homeCsys, animate=True)
def setViewHome(self): "Change current view to our model's home view (for glpane's current part), and gl_update." self.setViewFromCsys( self.part.homeCsys) self.gl_update()
dc06c760dbe5ded748eaa71389af2211878d2189 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/dc06c760dbe5ded748eaa71389af2211878d2189/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 8684, 12, 2890, 4672, 315, 3043, 783, 1476, 358, 3134, 938, 1807, 6382, 1476, 261, 1884, 5118, 29009, 1807, 783, 1087, 3631, 471, 5118, 67, 2725, 1199, 365, 18, 542, 1767, 1265, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 8684, 12, 2890, 4672, 315, 3043, 783, 1476, 358, 3134, 938, 1807, 6382, 1476, 261, 1884, 5118, 29009, 1807, 783, 1087, 3631, 471, 5118, 67, 2725, 1199, 365, 18, 542, 1767, 1265, 3...
updated is a tuple naming the attributes off the wrapper that
updated is a tuple naming the attributes of the wrapper that
def update_wrapper(wrapper, wrapped, assigned = WRAPPER_ASSIGNMENTS, updated = WRAPPER_UPDATES): """Update a wrapper function to look like the wrapped function wrapper is the function to be updated wrapped is the original function assigned is a tuple naming the attributes assigned directly from the wrapped function to the wrapper function (defaults to functools.WRAPPER_ASSIGNMENTS) updated is a tuple naming the attributes off the wrapper that are updated with the corresponding attribute from the wrapped function (defaults to functools.WRAPPER_UPDATES) """ for attr in assigned: setattr(wrapper, attr, getattr(wrapped, attr)) for attr in updated: getattr(wrapper, attr).update(getattr(wrapped, attr)) # Return the wrapper so this can be used as a decorator via partial() return wrapper
37ddd347b8d2c29f398c2fe386c0fabbb1a1674d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/37ddd347b8d2c29f398c2fe386c0fabbb1a1674d/functools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 8376, 12, 8376, 16, 5805, 16, 6958, 273, 12984, 2203, 3194, 67, 23289, 3212, 55, 16, 3526, 273, 12984, 2203, 3194, 67, 8217, 55, 4672, 3536, 1891, 279, 4053, 445, 358, 2324, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 8376, 12, 8376, 16, 5805, 16, 6958, 273, 12984, 2203, 3194, 67, 23289, 3212, 55, 16, 3526, 273, 12984, 2203, 3194, 67, 8217, 55, 4672, 3536, 1891, 279, 4053, 445, 358, 2324, ...
The name of a set-up function. This is called before running the
A set-up function. This is called before running the
def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options): """ Convert doctest tests for a module to a unittest test suite. This converts each documentation string in a module that contains doctest tests to a unittest test case. If any of the tests in a doc string fail, then the test case fails. An exception is raised showing the name of the file containing the test and a (sometimes approximate) line number. The `module` argument provides the module to be tested. The argument can be either a module or a module name. If no argument is given, the calling module is used. A number of options may be provided as keyword arguments: package The name of a Python package. Text-file paths will be interpreted relative to the directory containing this package. The package may be supplied as a package object or as a dotted package name. setUp The name of a set-up function. This is called before running the tests in each file. The setUp function will be passed a DocTest object. The setUp function can access the test globals as the globs attribute of the test passed. tearDown The name of a tear-down function. This is called after running the tests in each file. The tearDown function will be passed a DocTest object. The tearDown function can access the test globals as the globs attribute of the test passed. globs A dictionary containing initial global variables for the tests. optionflags A set of doctest option flags expressed as an integer. """ if test_finder is None: test_finder = DocTestFinder() module = _normalize_module(module) tests = test_finder.find(module, globs=globs, extraglobs=extraglobs) if globs is None: globs = module.__dict__ if not tests: # Why do we want to do this? Because it reveals a bug that might # otherwise be hidden. raise ValueError(module, "has no tests") tests.sort() suite = unittest.TestSuite() for test in tests: if len(test.examples) == 0: continue if not test.filename: filename = module.__file__ if filename[-4:] in (".pyc", ".pyo"): filename = filename[:-1] test.filename = filename suite.addTest(DocTestCase(test, **options)) return suite
edabf355f3608af9354ab9cea364a59185e2fcb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/edabf355f3608af9354ab9cea364a59185e2fcb3/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3521, 4709, 13587, 12, 2978, 33, 7036, 16, 4715, 87, 33, 7036, 16, 7582, 346, 1295, 87, 33, 7036, 16, 1842, 67, 15356, 33, 7036, 16, 2826, 2116, 4672, 3536, 4037, 31263, 395, 7434, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3521, 4709, 13587, 12, 2978, 33, 7036, 16, 4715, 87, 33, 7036, 16, 7582, 346, 1295, 87, 33, 7036, 16, 1842, 67, 15356, 33, 7036, 16, 2826, 2116, 4672, 3536, 4037, 31263, 395, 7434, 364...
chm = 'chm=' + '|'.join(slope_markers(slopes, coefficients, colours))
chm = 'chm=' + '|'.join(slope_markers(trends, colours))
def asgooglechartURL(seq, options={}): """*seq* is a sequence of iterables (each one assumed to be the output from :meth:`asann`); convert into a URL suitable for passing to the Google Chart API. Each element of the sequence corresponds to a different data series, all the series are plotted on the same chart. *options* is a dict mapping keywords to optional attributes: options.offset: specifies the inter-chart offset, as per the -o option (see module docstring). The default is zero. options.size: specifies the chart size as a tuple (width, height). The default is (600, 500). """ # default options default_options = dict(offset=0, size=(600,500), colour=['ff0000', '000000', '0000ff', 'ff00ff'], ) default_options.update(options) options = default_options prefix = 'http://chart.apis.google.com/chart' # Read all data because we need to compute min and max years, and # min and max data values. data = [list(s) for s in seq] ymin,ymax = reasonable_yscale(data) yearmin = min(map(lambda p:p[0], itertools.chain(*data))) yearmax = max(map(lambda p:p[0], itertools.chain(*data))) data = [pad(s, yearmin, yearmax) for s in data] # Let y be the list of years for the chart legend. We include # the first year of the series, the last year, and every decade # beginning. y = map(lambda x:x[0], data[0]) for i in range(1,len(y)-1): if y[i]%10: y[i]='' xaxis = '|' + '|'.join(map(str, y)) # Trendlines returns a trend object (describing the 2 trend lines # (short and long)); get one for each data series. trends = [trendlines(l) for l in data] trendfrags = [t.urlfrag for t in trends] slopes = [[t.b_full, t.b_short] for t in trends] coefficients = [[t.r2_full, t.r2_short] for t in trends] # Arrange the series for the "chd=" parameter of the URL. # In an X-Y chart (cht=lxy) each series as drawn consists of a # sequence of xs and a sequence of ys. In order we have... # data series 1 (xs then ys), # data series 2 (xs then ys), # ... # long trend 1 (xs then ys), # short trend 1 (xs then ys), # long trend 2 (xs then ys), # short trend 2 (xs then ys) # ... ds = ['-999|' + chartsingle(l) for l in data] + trendfrags vaxis = vaxis_labels(ymin,ymax) chxl = 'chxl=0:'+xaxis+'|1:'+vaxis+'|2:'+vaxis chxt = 'chxt=x,y,r' chd='chd=t:' + '|'.join(ds) chs='chs=' + 'x'.join(map(str, options['size'])) # Choose scale, and deal with offset if we have to. # The scales are in the same order as the series (see above). Each # series is associated with 4 scale values: xmin,xmax,ymin,ymax. offset = options['offset'] scale = [-100,100,ymin,ymax] * (3 * len(seq)) if offset and len(seq) > 1: for i in range(len(seq)): off = i*offset # Y range of actual data series scale[4*i+2] -= off scale[4*i+3] -= off # Y range of first trend scale[4*len(seq) + 8*i + 2] -= off scale[4*len(seq) + 8*i + 3] -= off # Y range of second trend scale[4*len(seq) + 8*i + 6] -= off scale[4*len(seq) + 8*i + 7] -= off chds = 'chds=' + ','.join(map(str, scale)) # red, black, blue, magenta for the underlying graphs colours = options['colour'] colours = colours[:len(data)] chm = 'chm=' + '|'.join(slope_markers(slopes, coefficients, colours)) # Replicate each colour by three (for the chart and its two trend # lines). series_colours = colours + list(itertools.chain(*([c,c] for c in colours))) chco = 'chco=' + ','.join(series_colours) # Line Style chls = 'chls=' + '|'.join(['1']*len(data) + ['1,8,2', '1']*len(data)) return prefix + '?' + '&'.join( ['cht=lxy',chds,chd,chxt,chxl,chco,chls,chm,chs])
f48f5e90a10c46dc1af612da90b8566080e2297e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/f48f5e90a10c46dc1af612da90b8566080e2297e/vischeck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 9536, 11563, 1785, 12, 5436, 16, 702, 12938, 4672, 3536, 14, 5436, 14, 353, 279, 3102, 434, 27447, 261, 13798, 1245, 12034, 358, 506, 326, 876, 628, 294, 27305, 28288, 345, 1072, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 9536, 11563, 1785, 12, 5436, 16, 702, 12938, 4672, 3536, 14, 5436, 14, 353, 279, 3102, 434, 27447, 261, 13798, 1245, 12034, 358, 506, 326, 876, 628, 294, 27305, 28288, 345, 1072, 68...
"target version can only be" + short_version
"target version can only be %s, or the '--skip_build'" \ " option must be specified" % (short_version,)
def finalize_options (self): if self.bdist_dir is None: bdist_base = self.get_finalized_command('bdist').bdist_base self.bdist_dir = os.path.join(bdist_base, 'wininst') if not self.target_version: self.target_version = "" if self.distribution.has_ext_modules(): short_version = get_python_version() if self.target_version and self.target_version != short_version: raise DistutilsOptionError, \ "target version can only be" + short_version self.target_version = short_version
10166709e0c29b8be573f078ba368f98e7c0998f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/10166709e0c29b8be573f078ba368f98e7c0998f/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 261, 2890, 4672, 309, 365, 18, 70, 4413, 67, 1214, 353, 599, 30, 324, 4413, 67, 1969, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 70, 4413, 16063, 70, 4413, 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, 12409, 67, 2116, 261, 2890, 4672, 309, 365, 18, 70, 4413, 67, 1214, 353, 599, 30, 324, 4413, 67, 1969, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 70, 4413, 16063, 70, 4413, 6...
self.tk.call(self._w, 'close', entrypath)
self.tk.call(self._w, 'close', entrypath)
def close(self, entrypath):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 1241, 803, 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...
[ 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, 1746, 12, 2890, 16, 1241, 803, 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...
print >> DEBUGSTREAM, 'we got some refusals'
print >> DEBUGSTREAM, 'we got some refusals:', refused
def process_message(self, peer, mailfrom, rcpttos, data): lines = data.split('\n') # Look for the last header i = 0 for line in lines: if not line: break i += 1 lines.insert(i, 'X-Peer: %s' % peer[0]) data = NEWLINE.join(lines) refused = self._deliver(mailfrom, rcpttos, data) # TBD: what to do with refused addresses? print >> DEBUGSTREAM, 'we got some refusals'
f846e9b6ba36f297855ee3178f547d78385a05dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f846e9b6ba36f297855ee3178f547d78385a05dc/smtpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2150, 12, 2890, 16, 4261, 16, 4791, 2080, 16, 4519, 337, 14627, 16, 501, 4672, 2362, 273, 501, 18, 4939, 2668, 64, 82, 6134, 468, 10176, 364, 326, 1142, 1446, 277, 273, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2150, 12, 2890, 16, 4261, 16, 4791, 2080, 16, 4519, 337, 14627, 16, 501, 4672, 2362, 273, 501, 18, 4939, 2668, 64, 82, 6134, 468, 10176, 364, 326, 1142, 1446, 277, 273, 374, ...
cr.execute('select distinct product_id from stock_move where (location_dest_id in ('+locs+')) or (location_id in ('+locs+'))') stock = cr.fetchall() for s in stock: for loc in loc_ids: if (loc,s[0]) not in inv: p = prod_obj.browse(cr, uid, s[0]) invent_line_obj.create(cr, uid, { 'inventory_id': data['ids'][0], 'location_id': loc, 'product_id': s[0], 'product_uom': p.uom_id.id, 'product_qty': 0.0, })
if not inv: raise wizard.except_wizard("Warning", "Please select at least one inventory location !") else: cr.execute('select distinct product_id from stock_move where (location_dest_id in ('+locs+')) or (location_id in ('+locs+'))') stock = cr.fetchall() for s in stock: for loc in loc_ids: if (loc,s[0]) not in inv: p = prod_obj.browse(cr, uid, s[0]) invent_line_obj.create(cr, uid, { 'inventory_id': data['ids'][0], 'location_id': loc, 'product_id': s[0], 'product_uom': p.uom_id.id, 'product_qty': 0.0, })
def do_merge(self, cr, uid, data, context): invent_obj = pooler.get_pool(cr.dbname).get('stock.inventory') invent_line_obj = pooler.get_pool(cr.dbname).get('stock.inventory.line') prod_obj = pooler.get_pool(cr.dbname).get('product.product') if len(data['ids']) <> 1: raise wizard.except_wizard("Warning", "Please select one and only one inventory!") cr.execute('select distinct location_id from stock_inventory_line where inventory_id=%s', (data['ids'][0],)) loc_ids = map(lambda x: x[0], cr.fetchall()) locs = ','.join(map(lambda x: str(x), loc_ids)) cr.execute('select distinct location_id,product_id from stock_inventory_line where inventory_id=%s', (data['ids'][0],)) inv = cr.fetchall() cr.execute('select distinct product_id from stock_move where (location_dest_id in ('+locs+')) or (location_id in ('+locs+'))') stock = cr.fetchall() for s in stock: for loc in loc_ids: if (loc,s[0]) not in inv: p = prod_obj.browse(cr, uid, s[0]) invent_line_obj.create(cr, uid, { 'inventory_id': data['ids'][0], 'location_id': loc, 'product_id': s[0], 'product_uom': p.uom_id.id, 'product_qty': 0.0, }) return {}
a9ddac89a6b4c71bd23c7a285e127de59272d27b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/a9ddac89a6b4c71bd23c7a285e127de59272d27b/inventory_merge_zero.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2702, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 316, 616, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 15381, 18, 26024, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2702, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 316, 616, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 15381, 18, 26024, 61...
run( "svn add '%s'" % nodefile )
run( "svn add --no-auto-props '%s'" % nodefile )
def svn_create_dump_file( filename, fileid, data, reposdir, wcdir ): """Creates a svn dump file using the svn commandline.""" print "" print "=" * 80 print "=== Initialize" print "" # cleanup first kill_dir( reposdir ) kill_dir( wcdir ) # create repos run( "svnadmin create '%s'" % reposdir ) # create wc run( "svn co 'file://%s' '%s'" % ( reposdir, wcdir ) ) # now do the work nrev = len(data) irev = 1 revnr = 0 while irev < nrev: rev = data[irev] irev = irev + 1 revnr = revnr + 1 print "" print "=" * 80 print "=== Revision %d" % revnr print "" if rev.has_key( "author" ): author = rev["author"] else: author = "t%d" % revnr if rev.has_key( "log" ): log = rev["log"] else: log = "log for file '%s' rev %d" % ( fileid, revnr ) nodes = rev["nodes"] nnode = len(nodes) inode = 0 while inode < nnode: nodedata = nodes[inode] inode = inode + 1 action = nodedata["action"] kind = nodedata["kind"] path = nodedata["path"] nodefile = "%s/%s" % ( wcdir, path ) if action == "delete": run( "svn rm '%s'" % nodefile ) elif kind == "dir" and action == "replace": # replace = rm and add run( "svn rm '%s'" % nodefile ) run( "svn add '%s'" % nodefile ) elif kind == "dir" and action == "add": if isdir( nodefile ): # allready there, probably copied with parent dir pass elif nodedata.has_key( "copyfrom" ): # copy from repos copyfrom = nodedata["copyfrom"] fromurl = "file://%s/%s" % ( reposdir, copyfrom[0] ) fromrev = copyfrom[1] run( "svn cp -r %d '%s' '%s'" % ( fromrev, fromurl, nodefile ) ) else: run( "svn mkdir '%s/%s'" % ( wcdir, path ) ) elif kind == "file": add = False if action == "replace": # replace = delete & add add = True run( "svn rm '%s'" % nodefile ) if action == "add" and not isfile( nodefile ): # action 'add' and file doesn't exist if nodedata.has_key( "copyfrom" ): # copy from repos copyfrom = nodedata["copyfrom"] fromurl = "file://%s/%s" % ( reposdir, copyfrom[0] ) fromrev = copyfrom[1] run( "svn cp -r %d '%s' '%s'" % ( fromrev, fromurl, nodefile ) ) # bug in my svn client ?!? #run( "svn up '%s'" % nodefile ) # Philip Martin suggested sleep(1), thanks :) time.sleep(1) else: # it's a normal add add = True if nodedata.has_key( "text" ): # set/modify text print "write text to '%s'" % path text = create_text( nodedata["text"], fileid, revnr ) fileobj = open( nodefile, "wb" ) fileobj.write( text ) fileobj.close() if add: run( "svn add '%s'" % nodefile ) if nodedata.has_key( "props" ): # for each property do a propset or propdel props = nodedata["props"] for name, value in props.items(): if value == None: run( "svn pd '%s' '%s'" % ( name, nodefile ) ) else: run( "svn ps '%s' '%s' '%s'" % \ ( name, value, nodefile ) ) # commit revision run( "svn ci --username '%s' -m '%s' '%s'" % ( author, log, wcdir ) ) # update wc run( "svn up '%s'" % wcdir ) print "" print "=" * 80 print "=== Dump" print "" # dump the repos run( "svnadmin dump '%s' > '%s'" % ( reposdir, filename ) ) print "" print "=== Done" print "=" * 80 print ""
ea426dfb93d645bcd795a74b9f5557fd11fb9429 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/ea426dfb93d645bcd795a74b9f5557fd11fb9429/svndumptest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5893, 82, 67, 2640, 67, 8481, 67, 768, 12, 1544, 16, 585, 350, 16, 501, 16, 13686, 1214, 16, 14310, 1214, 262, 30, 3536, 2729, 279, 5893, 82, 4657, 585, 1450, 326, 5893, 82, 28305, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5893, 82, 67, 2640, 67, 8481, 67, 768, 12, 1544, 16, 585, 350, 16, 501, 16, 13686, 1214, 16, 14310, 1214, 262, 30, 3536, 2729, 279, 5893, 82, 4657, 585, 1450, 326, 5893, 82, 28305, 1...
if is_friend:
if is_friend is not None:
def upload(self, filename=None, imageData=None, title=None, desc=None, tags=None, is_public=None, is_family=None, is_friend=None, safety=None, search_hidden=None): # Sanity check the arguments if filename is None and imageData is None: raise ValueError("Need to pass either filename or imageData") if filename and imageData: raise ValueError("Cannot pass both filename and imageData")
f1eb4fc29e06f5b6b54d4fc3fbd2f857a5d191dc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11023/f1eb4fc29e06f5b6b54d4fc3fbd2f857a5d191dc/flickrest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 1544, 33, 7036, 16, 26229, 33, 7036, 16, 2077, 33, 7036, 16, 3044, 33, 7036, 16, 2342, 33, 7036, 16, 353, 67, 482, 33, 7036, 16, 353, 67, 9309, 33, 7036, 16, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 1544, 33, 7036, 16, 26229, 33, 7036, 16, 2077, 33, 7036, 16, 3044, 33, 7036, 16, 2342, 33, 7036, 16, 353, 67, 482, 33, 7036, 16, 353, 67, 9309, 33, 7036, 16, 35...
print "timed_run.py: exception trying to kill process: %d (%s)" % (e.errno, e.strerror)
print "\ntimed_run.py: exception trying to kill process: %d (%s)\n" % (e.errno, e.strerror)
def alarm_handler(signum, frame): global pid global prefix try: print "%s EXIT STATUS: TIMED OUT (%s seconds)" % (prefix, sys.argv[1]) flushkill(pid, signal.SIGKILL) except OSError, e: print "timed_run.py: exception trying to kill process: %d (%s)" % (e.errno, e.strerror) pass flushexit(exitTimeout)
e66e48a291dc1a59e55600b2f95f4526a0e16fe2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/e66e48a291dc1a59e55600b2f95f4526a0e16fe2/timed_run.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13721, 67, 4176, 12, 2977, 379, 16, 2623, 4672, 2552, 4231, 2552, 1633, 775, 30, 1172, 2213, 87, 28407, 7136, 30, 8721, 40, 8210, 6142, 87, 3974, 2225, 738, 261, 3239, 16, 2589, 18, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13721, 67, 4176, 12, 2977, 379, 16, 2623, 4672, 2552, 4231, 2552, 1633, 775, 30, 1172, 2213, 87, 28407, 7136, 30, 8721, 40, 8210, 6142, 87, 3974, 2225, 738, 261, 3239, 16, 2589, 18, 19...
self.runCompiled(parts, packages, boot, variants)
self.runCompiled(partPackages, packageClasses, boot, variants)
def run(self): config = self._config
c6a47f977a65789e0d4a355fa118478b036a493c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/c6a47f977a65789e0d4a355fa118478b036a493c/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 642, 273, 365, 6315, 1425, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 642, 273, 365, 6315, 1425, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
class purchase_order(osv.osv): _name = 'purchase.order' _inherit = 'purchase.order' _columns = { 'dm_campaign_purchase_line_ids': fields.many2many('dm.campaign.purchase_line', 'dm_campaign_purchase_line_purchase_order_rel', 'purchase_order_id', 'dm_campaign_purchase_line_id', 'Purchase Line'), 'dm_campaign_group_purchase_line_ids': fields.many2many('dm.campaign.group.purchase_line', 'dm_campaign_group_purchase_line_purchase_order_rel', 'purchase_order_id', 'dm_campaign_group_purchase_line_id', 'Purchase Line (for Campaign Group)') } purchase_order()
def get_campaign_purchase_line_ids(self , cr, uid, ids, context): result = {}
430d2d7ed577487fe93bba331fec59a6504e9e0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/430d2d7ed577487fe93bba331fec59a6504e9e0e/dm_purchase_advanced.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14608, 67, 12688, 12104, 67, 1369, 67, 2232, 12, 2890, 269, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 563, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14608, 67, 12688, 12104, 67, 1369, 67, 2232, 12, 2890, 269, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 563, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if rawQueueStats.get('counters:inserts_unprocessed'): inserts_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed'])[0]) else:
def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_legacy'])[0]) else: inserts_unprocessed_legacy = 0 if rawQueueStats.get('counters:deletes_unprocessed_legacy'): deletes_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_legacy'])[0]) else: deletes_unprocessed_legacy = 0 if rawQueueStats.get('counters:inserts_unprocessed_priority'): inserts_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_priority'])[0]) else: inserts_unprocessed_priority = 0 if rawQueueStats.get('counters:deletes_unprocessed_priority'): deletes_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_priority'])[0]) else: deletes_unprocessed_priority = 0 if rawQueueStats.get('counters:inserts_unprocessed'): inserts_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed'])[0]) else: inserts_unprocessed = 0 if rawQueueStats.get('counters:deletes_unprocessed'): deletes_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed'])[0]) else: deletes_unprocessed = 0 if rawQueueStats.get('counters:inserts_processed_legacy'): inserts_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_legacy'])[0]) else: inserts_processed_legacy = 0 if rawQueueStats.get('counters:deletes_processed_legacy'): deletes_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_legacy'])[0]) else: deletes_processed_legacy = 0 if rawQueueStats.get('counters:inserts_processed_priority'): inserts_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_priority'])[0]) else: inserts_processed_priority = 0 if rawQueueStats.get('counters:deletes_processed_priority'): deletes_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_priority'])[0]) else: deletes_processed_priority = 0
cadce30658d3300f051172e443dbfa5ec78d5b7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12383/cadce30658d3300f051172e443dbfa5ec78d5b7e/hbaseClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4000, 67, 14438, 12, 2890, 4672, 3536, 968, 279, 444, 434, 7691, 628, 326, 30265, 4309, 1014, 29012, 4929, 11897, 3536, 10421, 4195, 273, 2618, 1831, 3183, 4195, 273, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4000, 67, 14438, 12, 2890, 4672, 3536, 968, 279, 444, 434, 7691, 628, 326, 30265, 4309, 1014, 29012, 4929, 11897, 3536, 10421, 4195, 273, 2618, 1831, 3183, 4195, 273, 365, 6315, ...
table.attach(image,0,1,1,2)
table.attach(image, 0, 1, 1, 2)
def validedChanges(*args): """Check for a least one selected kana portion (display of a message if not the case), catch parameters, then close the window.
64cfb9e0b60a3a976c72fa9d5d722987641133b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/64cfb9e0b60a3a976c72fa9d5d722987641133b9/gtk_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1244, 13898, 7173, 30857, 1968, 4672, 3536, 1564, 364, 279, 4520, 1245, 3170, 417, 13848, 14769, 261, 5417, 434, 279, 883, 309, 486, 326, 648, 3631, 1044, 1472, 16, 1508, 1746, 326, 2742, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1244, 13898, 7173, 30857, 1968, 4672, 3536, 1564, 364, 279, 4520, 1245, 3170, 417, 13848, 14769, 261, 5417, 434, 279, 883, 309, 486, 326, 648, 3631, 1044, 1472, 16, 1508, 1746, 326, 2742, ...
self.assertEqual(d.items(), [(1, 2)])
self.assertEqual(set(d.items()), {(1, 2)})
def test_items(self): d = {} self.assertEqual(d.items(), [])
8bf08b39d5891e323e83e126df578c383352fb98 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/8bf08b39d5891e323e83e126df578c383352fb98/test_dict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3319, 12, 2890, 4672, 302, 273, 2618, 365, 18, 11231, 5812, 12, 72, 18, 3319, 9334, 5378, 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, 1842, 67, 3319, 12, 2890, 4672, 302, 273, 2618, 365, 18, 11231, 5812, 12, 72, 18, 3319, 9334, 5378, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
items = [ self._sorted_list( self.arguments )
items = [ self.arguments
def _get__cmp__items( self ): """implementation details""" items = [ self._sorted_list( self.arguments ) , self.return_type , self.has_extern , self._sorted_list( self.exceptions ) ] items.extend( self._get__cmp__call_items() ) return items
ab471c4f1c60395d29074158127bba5b4baecacb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7398/ab471c4f1c60395d29074158127bba5b4baecacb/calldef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 972, 9625, 972, 3319, 12, 365, 262, 30, 3536, 30810, 3189, 8395, 1516, 273, 306, 365, 18, 7099, 269, 365, 18, 2463, 67, 723, 269, 365, 18, 5332, 67, 338, 798, 269, 365, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 972, 9625, 972, 3319, 12, 365, 262, 30, 3536, 30810, 3189, 8395, 1516, 273, 306, 365, 18, 7099, 269, 365, 18, 2463, 67, 723, 269, 365, 18, 5332, 67, 338, 798, 269, 365, 631...
print ' print '
print ' if self.sourceFilename: print " print '
def do_gen_file_header(self): la = self.typelib.GetLibAttr() moduleDoc = self.typelib.GetDocumentation(-1) docDesc = "" if moduleDoc[1]: docDesc = moduleDoc[1] print '# Created by makepy.py version %s from %s' % (makepy_version,os.path.split(self.sourceFilename)[1]) print '# On date: %s' % time.ctime(time.time())
7f6eba6b3b1a8b7fcf22b723dcb461477f722e08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/7f6eba6b3b1a8b7fcf22b723dcb461477f722e08/genpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4507, 67, 768, 67, 3374, 12, 2890, 4672, 7125, 273, 365, 18, 12846, 30575, 18, 967, 5664, 3843, 1435, 1605, 1759, 273, 365, 18, 12846, 30575, 18, 967, 18905, 19236, 21, 13, 99...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4507, 67, 768, 67, 3374, 12, 2890, 4672, 7125, 273, 365, 18, 12846, 30575, 18, 967, 5664, 3843, 1435, 1605, 1759, 273, 365, 18, 12846, 30575, 18, 967, 18905, 19236, 21, 13, 99...
self.assert_(True)
pass except RepositoryOpenDeniedError: pass
def _repositoryExists(self): try: self.rep.open() self.fail() except DBNoSuchFileError: self.assert_(True)
dd74d3561bba6368c98ba108ac40fc55ff54f488 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/dd74d3561bba6368c98ba108ac40fc55ff54f488/TestRepositoryBasic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9071, 4002, 12, 2890, 4672, 775, 30, 365, 18, 14462, 18, 3190, 1435, 365, 18, 6870, 1435, 1335, 2383, 28341, 812, 668, 30, 365, 18, 11231, 67, 12, 5510, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9071, 4002, 12, 2890, 4672, 775, 30, 365, 18, 14462, 18, 3190, 1435, 365, 18, 6870, 1435, 1335, 2383, 28341, 812, 668, 30, 365, 18, 11231, 67, 12, 5510, 13, 2, -100, -100, -100, ...
if verbose: print "done"
if verbose: print("done")
def run_servers(self, proto, servers, hdlrcls, testfunc): for svrcls in servers: addr = self.pickaddr(proto) if verbose: print "ADDR =", addr print "CLASS =", svrcls t = ServerThread(addr, svrcls, hdlrcls) if verbose: print "server created" t.start() if verbose: print "server running" for i in range(NREQ): t.ready.wait(10*DELAY) self.assert_(t.ready.isSet(), "Server not ready within a reasonable time") if verbose: print "test client", i testfunc(proto, addr) if verbose: print "waiting for server" t.join() if verbose: print "done"
c190864e386a020aa922a1f36acf2200f2b77d7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/c190864e386a020aa922a1f36acf2200f2b77d7b/test_socketserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 14247, 12, 2890, 16, 3760, 16, 7084, 16, 366, 5761, 86, 6429, 16, 1842, 644, 4672, 364, 5893, 86, 6429, 316, 7084, 30, 3091, 273, 365, 18, 11503, 4793, 12, 9393, 13, 309, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 14247, 12, 2890, 16, 3760, 16, 7084, 16, 366, 5761, 86, 6429, 16, 1842, 644, 4672, 364, 5893, 86, 6429, 316, 7084, 30, 3091, 273, 365, 18, 11503, 4793, 12, 9393, 13, 309, 3...
compileall.compile_dir(build_dir, 1, options.package_install_path)
compileall.compile_dir(build_dir, 1, options.module_install_path)
def setup_qwt5_build(configuration, options, package): """Setup the qwt package build """ if 'Qwt5' not in options.modules: return print 'Setup the qwt package build.' build_dir = options.qwt tmp_dir = 'tmp-%s' % options.qwt build_file = os.path.join(tmp_dir, '%s.sbf' % options.qwt) extra_sources = [] extra_headers = [] extra_moc_headers = [] if configuration.qt_version < 0x040000: extra_py_files = glob.glob( os.path.join(os.pardir, 'qt3lib', 'Qwt5', '*.py')) else: extra_py_files = glob.glob( os.path.join(os.pardir, 'qt4lib', 'PyQt4', 'Qwt5', '*.py')) # do we compile and link the sources of Qwt statically into PyQwt? if options.qwt_sources: extra_sources += glob.glob(os.path.join( options.qwt_sources, 'src', '*.cpp')) extra_headers += glob.glob(os.path.join( options.qwt_sources, 'include', '*.h')) extra_moc_headers = [] for header in extra_headers: text = open(header).read() if re.compile(r'^\s*Q_OBJECT', re.M).search(text): extra_moc_headers.append(header) # add the interface to the numerical Python extensions extra_sources += glob.glob(os.path.join(os.pardir, 'support', '*.cpp')) extra_headers += glob.glob(os.path.join(os.pardir, 'support', '*.h')) # do we compile and link the sources of Qwt into PyQwt? if options.qwt_sources: # yes, zap all 'qwt' while options.extra_libs.count('qwt'): options.extra_libs.remove('qwt') elif 'qwt' not in options.extra_libs: # no, add 'qwt' if needed options.extra_libs.append('qwt') # zap the temporary directory try: shutil.rmtree(tmp_dir) except: pass # make a clean temporary directory try: os.mkdir(tmp_dir) except: raise Die, 'Failed to create the temporary build directory.' # copy the extra files copy_files(extra_sources, tmp_dir) copy_files(extra_headers, tmp_dir) copy_files(extra_moc_headers, tmp_dir) copy_files(extra_py_files, tmp_dir) try: # Qt4 pyqt_sip_flags = configuration.pyqt_sip_flags except AttributeError: # Qt3 pyqt_sip_flags = configuration.pyqt_qt_sip_flags # invoke SIP cmd = ' '.join( [configuration.sip_bin, # SIP assumes POSIX style path separators '-I', configuration.pyqt_sip_dir.replace('\\', '/'), '-b', build_file, '-c', tmp_dir, options.jobs, options.trace, pyqt_sip_flags, ] + options.sip_include_dirs + options.excluded_features + options.timelines # SIP assumes POSIX style path separators + [options.qwt_sipfile.replace('\\', '/')] ) print 'sip invokation:' pprint.pprint(cmd) if os.path.exists(build_file): os.remove(build_file) os.system(cmd) if not os.path.exists(build_file): raise Die, 'SIP failed to generate the C++ code.' # fix the SIP build file fix_build_file(build_file, [os.path.basename(f) for f in extra_sources], [os.path.basename(f) for f in extra_headers], [os.path.basename(f) for f in extra_moc_headers]) # copy lazily to the build directory to speed up recompilation if not os.path.exists(build_dir): try: os.mkdir(build_dir) except: raise Die, 'Failed to create the build directory.' lazy_copies = 0 for pattern in ('*.c', '*.cpp', '*.h', '*.py', '*.sbf'): for source in glob.glob(os.path.join(tmp_dir, pattern)): target = os.path.join(build_dir, os.path.basename(source)) if lazy_copy_file(source, target): print 'Copy %s -> %s.' % (source, target) lazy_copies += 1 print '%s file(s) lazily copied.' % lazy_copies # byte-compile the Python files compileall.compile_dir(build_dir, 1, options.package_install_path) # files to be installed installs = [] installs.append([[os.path.basename(f) for f in glob.glob( os.path.join(build_dir, '*.py*'))], options.package_install_path]) pattern = os.path.join(os.pardir, 'sip', options.qwt, '*.sip') sip_files = [os.path.join(os.pardir, f) for f in glob.glob(pattern)] pattern = os.path.join(os.pardir, 'sip', options.qwt, 'common', '*.sip') sip_files += [os.path.join(os.pardir, f) for f in glob.glob(pattern)] installs.append( [sip_files, os.path.join(configuration.pyqt_sip_dir, 'Qwt5')]) # module makefile if options.qt == 3: makefile = sipconfig.SIPModuleMakefile( configuration = configuration, build_file = os.path.basename(build_file), dir = build_dir, install_dir = options.package_install_path, installs = installs, qt = 1, warnings = 1, debug = options.debug, ) elif options.qt == 4: makefile = sipconfig.SIPModuleMakefile( configuration = configuration, build_file = os.path.basename(build_file), dir = build_dir, install_dir = options.package_install_path, installs = installs, qt = ['QtCore', 'QtGui', 'QtSvg'], warnings = 1, debug = options.debug, ) makefile.extra_cflags.extend(options.extra_cflags) makefile.extra_cxxflags.extend(options.extra_cxxflags) makefile.extra_defines.extend(options.extra_defines) makefile.extra_include_dirs.extend(options.extra_include_dirs) makefile.extra_lflags.extend(options.extra_lflags) makefile.extra_libs.extend(options.extra_libs) makefile.extra_lib_dirs.extend(options.extra_lib_dirs) makefile.generate()
09bf48c73c72e129eff97709f2eed689d372830a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5650/09bf48c73c72e129eff97709f2eed689d372830a/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 85, 6046, 25, 67, 3510, 12, 7025, 16, 702, 16, 2181, 4672, 3536, 7365, 326, 1043, 6046, 2181, 1361, 3536, 309, 296, 53, 6046, 25, 11, 486, 316, 702, 18, 6400, 30, 327, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 85, 6046, 25, 67, 3510, 12, 7025, 16, 702, 16, 2181, 4672, 3536, 7365, 326, 1043, 6046, 2181, 1361, 3536, 309, 296, 53, 6046, 25, 11, 486, 316, 702, 18, 6400, 30, 327, 225,...
print "Using SSL protocol"
def __connect(): global __connection global __connected if __connected == 0: if Config.get_UseSSL() == 0 and Config.get_UseSoapProtocol() == 1: __connection = httplib.HTTP(Config.get_SOAPHost()) DebugPrint(1, 'Connected via HTTP to: ' + Config.get_SOAPHost()) print "Using SOAP protocol" elif Config.get_UseSSL() == 0 and Config.get_UseSoapProtocol() == 0: __connection = httplib.HTTPConnection(Config.get_SOAPHost()) __connection.connect() DebugPrint(1,"Connection via HTTP to: " + Config.get_SOAPHost()) print "Using POST protocol" elif Config.get_UseSSL() == 1 and Config.get_UseGratiaCertificates() == 0: __connection = httplib.HTTPSConnection(Config.get_SSLHost(), cert_file = Config.get_CertificateFile(), key_file = Config.get_KeyFile()) __connection.connect() DebugPrint(1, "Connected via HTTPS to: " + Config.get_SSLHost()) print "Using SSL protocol" else: __connection = httplib.HTTPSConnection(Config.get_SSLHost(), cert_file = Config.get_GratiaCertificateFile(), key_file = Config.get_GratiaKeyFile()) __connection.connect() DebugPrint(1, "Connected via HTTPS to: " + Config.get_SSLHost()) print "Using SSL protocol" __connected = 1
14d1ad97ca7689119bc791e9d6863d941f3b9271 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/637/14d1ad97ca7689119bc791e9d6863d941f3b9271/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3612, 13332, 2552, 1001, 4071, 2552, 1001, 8537, 225, 309, 1001, 8537, 422, 374, 30, 309, 1903, 18, 588, 67, 3727, 6745, 1435, 422, 374, 471, 1903, 18, 588, 67, 3727, 20601, 5752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3612, 13332, 2552, 1001, 4071, 2552, 1001, 8537, 225, 309, 1001, 8537, 422, 374, 30, 309, 1903, 18, 588, 67, 3727, 6745, 1435, 422, 374, 471, 1903, 18, 588, 67, 3727, 20601, 5752, ...
self._scm_wrapper = gclient_scm.CreateSCM gclient_scm.CreateSCM = self.mox.CreateMockAnything()
self._scm_wrapper = gclient.gclient_scm.CreateSCM gclient.gclient_scm.CreateSCM = self.mox.CreateMockAnything()
def setUp(self): BaseTestCase.setUp(self) self.mox.StubOutWithMock(gclient.os.path, 'exists') self.mox.StubOutWithMock(gclient.os.path, 'isfile') self.mox.StubOutWithMock(gclient.os.path, 'isdir') self.mox.StubOutWithMock(gclient.os, 'remove') self.mox.StubOutWithMock(gclient.sys, 'stdout') self.mox.StubOutWithMock(gclient_utils, 'subprocess') # These are not tested. self.mox.StubOutWithMock(gclient_utils, 'FileRead') self.mox.StubOutWithMock(gclient_utils, 'FileWrite') self.mox.StubOutWithMock(gclient_utils, 'SubprocessCall') self.mox.StubOutWithMock(gclient_utils, 'RemoveDirectory') # Mock them to be sure nothing bad happens. self.mox.StubOutWithMock(gclient_scm, 'CaptureSVN') self._CaptureSVNInfo = gclient_scm.CaptureSVNInfo self.mox.StubOutWithMock(gclient_scm, 'CaptureSVNInfo') self.mox.StubOutWithMock(gclient_scm, 'CaptureSVNStatus') self.mox.StubOutWithMock(gclient_scm, 'RunSVN') self.mox.StubOutWithMock(gclient_scm, 'RunSVNAndGetFileList') self._gclient_gclient = gclient.GClient gclient.GClient = self.mox.CreateMockAnything() self._scm_wrapper = gclient_scm.CreateSCM gclient_scm.CreateSCM = self.mox.CreateMockAnything()
90ba161b70b445eba62b2a376e4fa2f508854e13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/90ba161b70b445eba62b2a376e4fa2f508854e13/gclient_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3360, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 81, 2409, 18, 11974, 1182, 1190, 9865, 12, 75, 2625, 18, 538, 18, 803, 16, 296, 1808, 6134, 365, 18, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3360, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 81, 2409, 18, 11974, 1182, 1190, 9865, 12, 75, 2625, 18, 538, 18, 803, 16, 296, 1808, 6134, 365, 18, 81...
s = self.url_re.sub(self._url_repl, s) s = self.email_re.sub(self._email_repl, s) s = self.designator_re.sub(self._designator_repl, s)
s = self.hyper_re.sub(self._hyper_repl, s)
def plain(self, escape=0, hyperlink=0): ''' Render a "plain" representation of the property "escape" turns on/off HTML quoting "hyperlink" turns on/off in-text hyperlinking of URLs, email addresses and designators ''' if self._value is None: return '' if escape: s = cgi.escape(str(self._value)) else: s = str(self._value) if hyperlink: if not escape: s = cgi.escape(s) s = self.url_re.sub(self._url_repl, s) s = self.email_re.sub(self._email_repl, s) s = self.designator_re.sub(self._designator_repl, s) return s
24b8cf906e395bb31f22bdb647fe68df9add3817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/24b8cf906e395bb31f22bdb647fe68df9add3817/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7351, 12, 2890, 16, 4114, 33, 20, 16, 9512, 1232, 33, 20, 4672, 9163, 6987, 279, 315, 7446, 6, 4335, 434, 326, 1272, 225, 315, 6939, 6, 20748, 603, 19, 3674, 3982, 29911, 315, 17203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7351, 12, 2890, 16, 4114, 33, 20, 16, 9512, 1232, 33, 20, 4672, 9163, 6987, 279, 315, 7446, 6, 4335, 434, 326, 1272, 225, 315, 6939, 6, 20748, 603, 19, 3674, 3982, 29911, 315, 17203, ...
uniqueName('SubframeCall-%s' % self._name),
self._taskName,
def __init__(self, functor, taskPriority, name=None): self._functor = functor self._name = name taskMgr.add(self._doCallback, uniqueName('SubframeCall-%s' % self._name), priority=taskPriority)
96d5b27bb75d871eaa772f60a17f8891ef2f8bf7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/96d5b27bb75d871eaa772f60a17f8891ef2f8bf7/PythonUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12882, 280, 16, 1562, 8183, 16, 508, 33, 7036, 4672, 365, 6315, 74, 6931, 280, 273, 12882, 280, 365, 6315, 529, 273, 508, 1562, 9455, 18, 1289, 12, 2890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12882, 280, 16, 1562, 8183, 16, 508, 33, 7036, 4672, 365, 6315, 74, 6931, 280, 273, 12882, 280, 365, 6315, 529, 273, 508, 1562, 9455, 18, 1289, 12, 2890,...
IMPLEMENTATION: Calls the PARI isprime function. """ n = ZZ(n) return pari(n).isprime()
ALGORITHM:: Calculation is delegated to the ``n.is_prime()`` method, or in special cases (e.g., Python ``int``s) to ``Integer(n).is_prime()``. If an ``n.is_prime()`` method is not available, it otherwise raises a ``TypeError``. """ if type(n) == int or type(n)==long: from sage.rings.integer import Integer return Integer(n).is_prime() else: try: return n.is_prime() except AttributeError: raise TypeError, "is_prime() is not written for this type"
def is_prime(n, flag=0): r""" Returns True if `x` is prime, and False otherwise. The result is proven correct - *this is NOT a pseudo-primality test!*. INPUT: - ``flag`` - int - ``0`` (default) - use a combination of algorithms. - ``1`` - certify primality using the Pocklington-Lehmer Test. - ``2`` - certify primality using the APRCL test. OUTPUT: - ``bool`` - True or False .. note:: We do not consider negatives of prime numbers as prime. EXAMPLES:: sage: is_prime(389) True sage: is_prime(2000) False sage: is_prime(2) True sage: is_prime(-1) False sage: factor(-6) -1 * 2 * 3 sage: is_prime(1) False sage: is_prime(-2) False IMPLEMENTATION: Calls the PARI isprime function. """ n = ZZ(n) return pari(n).isprime()
edc845b4787f365a8d5dc972d98a576e86326aa5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/edc845b4787f365a8d5dc972d98a576e86326aa5/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 16382, 12, 82, 16, 2982, 33, 20, 4672, 436, 8395, 2860, 1053, 309, 1375, 92, 68, 353, 17014, 16, 471, 1083, 3541, 18, 1021, 563, 353, 450, 3995, 3434, 300, 380, 2211, 353, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 16382, 12, 82, 16, 2982, 33, 20, 4672, 436, 8395, 2860, 1053, 309, 1375, 92, 68, 353, 17014, 16, 471, 1083, 3541, 18, 1021, 563, 353, 450, 3995, 3434, 300, 380, 2211, 353, 4...
chart_month.download(os.path.join(destination, 'apps-activity-monthly.png'))
chart_month.download(os.path.join(destination, '%sactivity-monthly.png' % prefix))
def StoreChartsTo(self, destination): """Retrieves the two charts, and stores them to the destination directory"""
4ed97acb9b4c239d972adc4855fd814fa09d5e8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/854/4ed97acb9b4c239d972adc4855fd814fa09d5e8d/create-reporting-charts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4994, 7984, 11634, 12, 2890, 16, 2929, 4672, 3536, 6960, 326, 2795, 23194, 16, 471, 9064, 2182, 358, 326, 2929, 1867, 8395, 2, 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, 4994, 7984, 11634, 12, 2890, 16, 2929, 4672, 3536, 6960, 326, 2795, 23194, 16, 471, 9064, 2182, 358, 326, 2929, 1867, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.buffer.append(value.encode('utf-8'))
self.buffer.append(val)
def __setitem__(self, key, value): # {{{ real_line = self.get_real_idx(key)
ed48b96ed12f721ea1b0e9c052434fd4f71c04b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10698/ed48b96ed12f721ea1b0e9c052434fd4f71c04b0/conque_screen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 468, 10179, 95, 2863, 67, 1369, 273, 365, 18, 588, 67, 7688, 67, 3465, 12, 856, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 460, 4672, 468, 10179, 95, 2863, 67, 1369, 273, 365, 18, 588, 67, 7688, 67, 3465, 12, 856, 13, 2, -100, -100, -100, -100, -100, -100, -10...
self._enqueue_auto_cells()
def restart_sage(self): """ Restart SAGE kernel. """ self.quit()
3053ff6acc75d7045986ec594644e6cd5ccc49bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3053ff6acc75d7045986ec594644e6cd5ccc49bb/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 67, 87, 410, 12, 2890, 4672, 3536, 20709, 348, 2833, 5536, 18, 3536, 365, 18, 27176, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7870, 67, 87, 410, 12, 2890, 4672, 3536, 20709, 348, 2833, 5536, 18, 3536, 365, 18, 27176, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.make_custom_slide('math.log(x, 10)', 'x', 'math.exp(x)', 1, 10, 1)
self.make_custom_slide('log(x, 10)', 'x', 'exp(x)', 1, 10, 1)
def __init__(self, canvas, path, parent=None): """ Handle launch from both within and without of Sugar environment. """ SLIDES = {'C':[C_slide, self._calc_C], 'CI':[CI_slide, self._calc_CI], 'A':[A_slide, self._calc_A], 'K':[K_slide, self._calc_K], 'S':[S_slide, self._calc_S], 'T':[T_slide, self._calc_T], 'L':[L_slide, self._calc_L], 'LLn':[LLn_slide, self._calc_LLn], 'LL0':[LL0_slide, self._calc_LL0]}
5fa09bcbc8e023850510305ca87bc00a475677be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5595/5fa09bcbc8e023850510305ca87bc00a475677be/window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5953, 16, 589, 16, 982, 33, 7036, 4672, 3536, 5004, 8037, 628, 3937, 3470, 471, 2887, 434, 348, 18481, 3330, 18, 3536, 348, 28447, 3991, 273, 13666, 39, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5953, 16, 589, 16, 982, 33, 7036, 4672, 3536, 5004, 8037, 628, 3937, 3470, 471, 2887, 434, 348, 18481, 3330, 18, 3536, 348, 28447, 3991, 273, 13666, 39, ...
def _toPython(self, value, state=None): return self.attemptConvert(self, value, state, toPython) def _fromPython(self, value, state): return self.attemptConvert(self, value, state, fromPython)
def toPython(self, value, state=None): return self.attemptConvert(value, state, toPython) def fromPython(self, value, state): return self.attemptConvert(value, state, fromPython)
def _toPython(self, value, state=None): return self.attemptConvert(self, value, state, toPython)
a3020ecfe5675d53c0cae500c4bf7d3e2732797e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/a3020ecfe5675d53c0cae500c4bf7d3e2732797e/validators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 15774, 12, 2890, 16, 460, 16, 919, 33, 7036, 4672, 327, 365, 18, 11764, 2723, 12, 2890, 16, 460, 16, 919, 16, 358, 15774, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 15774, 12, 2890, 16, 460, 16, 919, 33, 7036, 4672, 327, 365, 18, 11764, 2723, 12, 2890, 16, 460, 16, 919, 16, 358, 15774, 13, 2, -100, -100, -100, -100, -100, -100, -100, -...
if __name__ == "__main__": import string
def main():
def _scalarfunc(*params): params = squeeze(asarray(params)) return func(params,*args)
926e615eebcd9f2ca3373b1887f74b532b10bda4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/926e615eebcd9f2ca3373b1887f74b532b10bda4/optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8748, 644, 30857, 2010, 4672, 859, 273, 17173, 12, 345, 1126, 12, 2010, 3719, 327, 1326, 12, 2010, 16, 14, 1968, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8748, 644, 30857, 2010, 4672, 859, 273, 17173, 12, 345, 1126, 12, 2010, 3719, 327, 1326, 12, 2010, 16, 14, 1968, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
z = RR.pi() - z
z = pi - z
def elliptic_logarithm(self, embedding=None, precision=100, algorithm='pari'): """ Returns the elliptic logarithm of this elliptic curve point.
a1ab9c3ea8558aa05be8905400603242aa82dd20 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a1ab9c3ea8558aa05be8905400603242aa82dd20/ell_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
import pylith.topology.topology as bindings
def _solveElastic(self, mesh, materials, t, dt): """ Solve for elastic solution. """ self._info.log("Computing elastic solution.")
7403e707a00825bd8227315f0c2a794a89239866 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/7403e707a00825bd8227315f0c2a794a89239866/Implicit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24626, 12462, 12, 2890, 16, 6986, 16, 31824, 16, 268, 16, 3681, 4672, 3536, 348, 5390, 364, 10465, 6959, 18, 3536, 365, 6315, 1376, 18, 1330, 2932, 7703, 310, 10465, 6959, 1199, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24626, 12462, 12, 2890, 16, 6986, 16, 31824, 16, 268, 16, 3681, 4672, 3536, 348, 5390, 364, 10465, 6959, 18, 3536, 365, 6315, 1376, 18, 1330, 2932, 7703, 310, 10465, 6959, 1199, 13,...
Subgroup of Mordell Weil group: [[-2:3:1], [2707496766203306:864581029138191:2969715140223272], [-13422227300:-49322830557:12167000000]]
Subgroup of Mordell-Weil group: [[-2:3:1], [2707496766203306:864581029138191:2969715140223272], [-13422227300:-49322830557:12167000000]]
def saturate(self, max_prime=-1, odd_primes_only=False): r""" Saturate this subgroup of the Mordell-Weil group.
9932a677a12413086a59217c4c0d425b0543b6eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/9932a677a12413086a59217c4c0d425b0543b6eb/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5942, 295, 340, 12, 2890, 16, 943, 67, 16382, 29711, 21, 16, 14800, 67, 683, 4485, 67, 3700, 33, 8381, 4672, 436, 8395, 25793, 295, 340, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5942, 295, 340, 12, 2890, 16, 943, 67, 16382, 29711, 21, 16, 14800, 67, 683, 4485, 67, 3700, 33, 8381, 4672, 436, 8395, 25793, 295, 340, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, ...
YE = dot(dot(T,B),C.T)*YStd + YMean Y = Y*numpy.std(Y, axis = 0)+ YMean BPls = dot(dot(numpy.linalg.pinv(P.T),B),C.T) return PLSRegression(domain=data.domain, BPls=BPls, YMean=YMean, YStd=YStd, XMean=XMean, XStd=XStd, name=self.name)
YE = dot(dot(T,B),C.T)* self.stdY + self.meanY YE = dot(standardize(X)[0], BPls)* self.stdY + self.meanY Y = Y * self.stdY + self.meanY self.W, self.T, self.P, self.U = W, T, P, U self.B, self.BPls, self.C = B, BPls, C self.x, self.y = x, y return PLSRegression(model = self)
def __call__(self, data, y, x=None, nc=None, weight=None): if x == None: x = [v for v in data.domain.variables if v not in y]
2f0d6c2e9c037aae88c832940eb40e18d9619a80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/2f0d6c2e9c037aae88c832940eb40e18d9619a80/orngRegression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 501, 16, 677, 16, 619, 33, 7036, 16, 8194, 33, 7036, 16, 3119, 33, 7036, 4672, 309, 619, 422, 599, 30, 619, 273, 306, 90, 364, 331, 316, 501, 18, 430...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 501, 16, 677, 16, 619, 33, 7036, 16, 8194, 33, 7036, 16, 3119, 33, 7036, 4672, 309, 619, 422, 599, 30, 619, 273, 306, 90, 364, 331, 316, 501, 18, 430...
if vals.get('parent.currency'): ctx2['currency'] = vals['parent.currency'] if vals.get('parent.party'): ctx2['customer'] = vals['parent.party']
if vals.get('_parent_sale.currency'): ctx2['currency'] = vals['_parent_sale.currency'] if vals.get('_parent_sale.party'): ctx2['customer'] = vals['_parent_sale.party']
def on_change_product(self, cursor, user, ids, vals, context=None): party_obj = self.pool.get('relationship.party') product_obj = self.pool.get('product.product') uom_obj = self.pool.get('product.uom')
63ab9b352113f550a19cea3cf8f4525ee1ffdbe6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9306/63ab9b352113f550a19cea3cf8f4525ee1ffdbe6/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 18285, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 12873, 18, 21214, 6134, 3017, 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, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 18285, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 12873, 18, 21214, 6134, 3017, 6...
def nooutput(*args): pass
def shortDescription(self): return "Doctest: " + self._dt_test.name
faa765cbc33156fb7f27ce9996741b296c21fc63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/faa765cbc33156fb7f27ce9996741b296c21fc63/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 3291, 12, 2890, 4672, 327, 315, 3244, 299, 395, 30, 315, 397, 365, 6315, 7510, 67, 3813, 18, 529, 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, 3025, 3291, 12, 2890, 4672, 327, 315, 3244, 299, 395, 30, 315, 397, 365, 6315, 7510, 67, 3813, 18, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
directory will also be symlinked in 'remoteBasePath'. Generally, this should be True for nightlies. Default: True
directory will also be symlinked in 'remoteBasePath'/nightly/. Generally, this should be True for nightlies. Default: True
def __init__(self, objdir, username, milestone, platform, remoteHost, remoteBasePath, group=None, chmodMode=755, sshKey=None, releaseToDated=True, releaseToLatest=True, releaseToTinderboxBuilds=True, tinderboxBuildsDir=None, dependToDated=True, **kwargs): """ @type objdir: string @param objdir: The obj directory used for the build. This is needed to find the packages in the source tree.
bdb7278eb47c3850873b071816c1e976bd78182b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/bdb7278eb47c3850873b071816c1e976bd78182b/transfer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 1214, 16, 2718, 16, 28664, 16, 4072, 16, 2632, 2594, 16, 2632, 15912, 16, 1041, 33, 7036, 16, 13413, 2309, 33, 21761, 16, 7056, 653, 33, 7036, 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, 1001, 2738, 972, 12, 2890, 16, 1081, 1214, 16, 2718, 16, 28664, 16, 4072, 16, 2632, 2594, 16, 2632, 15912, 16, 1041, 33, 7036, 16, 13413, 2309, 33, 21761, 16, 7056, 653, 33, 7036, 16, ...
raise ValueError, "Illegal asset declaration: %" % item
raise ValueError, "Illegal asset declaration: %s" % item
def _extractAssetDeps(data): deps = [] asset_reg = re.compile("^[\$\.\*a-zA-Z0-9/{}_-]+$") for item in self.HEAD["asset"].findall(data): if not asset_reg.match(item): raise ValueError, "Illegal asset declaration: %" % item if not item in deps: deps.append(item) return deps
d90e66c7094b8b9e30cdaabc0ff0c82a65fc1144 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/d90e66c7094b8b9e30cdaabc0ff0c82a65fc1144/DependencyLoader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 6672, 14430, 12, 892, 4672, 8740, 273, 5378, 3310, 67, 1574, 273, 283, 18, 11100, 2932, 66, 7438, 8, 19002, 14, 69, 17, 9600, 17, 62, 20, 17, 29, 16167, 67, 23238, 8, 7923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8004, 6672, 14430, 12, 892, 4672, 8740, 273, 5378, 3310, 67, 1574, 273, 283, 18, 11100, 2932, 66, 7438, 8, 19002, 14, 69, 17, 9600, 17, 62, 20, 17, 29, 16167, 67, 23238, 8, 7923...
size = size + long(df.size)
try: size = size + long(df.size) except: pass
def view_experiment(request, experiment_id): try: experiment = Experiment.objects.get(pk=experiment_id) author_experiments = Author_Experiment.objects.all() author_experiments = \ author_experiments.filter(experiment=experiment) author_experiments = author_experiments.order_by('order') datafiles = \ Dataset_File.objects.filter(dataset__experiment=experiment_id) size = 0 for dataset in experiment.dataset_set.all(): for df in dataset.dataset_file_set.all(): size = size + long(df.size) owners = None try: owners = \ Experiment_Owner.objects.filter(experiment=experiment) except Experiment_Owner.DoesNotExist, eo: pass c = Context({ # 'totalfilesize': datafiles.aggregate(Sum('size'))['size__sum'], 'experiment': experiment, 'authors': author_experiments, 'datafiles': datafiles, 'subtitle': experiment.title, 'owners': owners, 'size': size, 'nav': [{'name': 'Data', 'link': '/experiment/view/'}, {'name': experiment.title, 'link': '/experiment/view/' + str(experiment.id) + '/'}], 'searchDatafileSelectionForm': getNewSearchDatafileSelectionForm()}) except Experiment.DoesNotExist, de: return return_response_not_found(request) return HttpResponse(render_response_index(request, 'tardis_portal/view_experiment.html', c))
289de59e65ac1e596ed5805c6baa2df729291167 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11933/289de59e65ac1e596ed5805c6baa2df729291167/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 18142, 12, 2293, 16, 8724, 67, 350, 4672, 225, 775, 30, 8724, 273, 22844, 18, 6911, 18, 588, 12, 5465, 33, 18142, 67, 350, 13, 2869, 67, 338, 457, 19644, 273, 6712, 67, 223...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 18142, 12, 2293, 16, 8724, 67, 350, 4672, 225, 775, 30, 8724, 273, 22844, 18, 6911, 18, 588, 12, 5465, 33, 18142, 67, 350, 13, 2869, 67, 338, 457, 19644, 273, 6712, 67, 223...
"free_slots" : unclaimed, "job_slots" : total_nodes
"free_slots" : int(unclaimed), "job_slots" : int(total_nodes)
def print_VOViewLocal(cp): VOView_plugin = getTemplate("GlueCEPlugin", "GlueVOViewLocalID") ce_name = cp_get(cp, "ce", "name", "") status = cp_get(cp, "condor", "status", "Production") condorVersion = getLrmsInfo(cp) total_nodes, claimed, unclaimed = parseNodes(cp) vo_map = VoMapper(cp) jobs_info = getJobsInfo(vo_map, cp) groupInfo = getGroupInfo(vo_map, cp) for vo in voList(cp): info = jobs_info.get(vo, {"running": 0, "idle": 0, "held": 0}) info = {"vo" : vo, "ce_name" : ce_name, "job_manager" : 'condor', "queue" : vo, "running" : info["running"], # Held jobs are included as "waiting" since the definition is: # Number of jobs that are in a state different than running "wait" : info["idle"] + info["held"], "total" : info["running"] + info["idle"] + info["held"], "free_slots" : unclaimed, "job_slots" : total_nodes } printTemplate(VOView_plugin, info)
631bac65d319c7a40a5f0afe56e1a34a3d408b47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12088/631bac65d319c7a40a5f0afe56e1a34a3d408b47/osg-info-dynamic-condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 16169, 1767, 2042, 12, 4057, 4672, 776, 51, 1767, 67, 4094, 273, 10646, 2932, 21308, 344, 1441, 3773, 3113, 315, 21308, 344, 16169, 1767, 2042, 734, 7923, 5898, 67, 529, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 16169, 1767, 2042, 12, 4057, 4672, 776, 51, 1767, 67, 4094, 273, 10646, 2932, 21308, 344, 1441, 3773, 3113, 315, 21308, 344, 16169, 1767, 2042, 734, 7923, 5898, 67, 529, 273, 3...
self.assertEqual(result, 0.0, "expected underflow to 0 from %r" % underflow)
self.assertEqual(result, 0.0, 'expected underflow to 0 ' 'from {!r}'.format(underflow))
def test(self): huge = 1L << 40000 mhuge = -huge self.assertEqual(huge / huge, 1.0) self.assertEqual(mhuge / mhuge, 1.0) self.assertEqual(huge / mhuge, -1.0) self.assertEqual(mhuge / huge, -1.0) self.assertEqual(1 / huge, 0.0) self.assertEqual(1L / huge, 0.0) self.assertEqual(1 / mhuge, 0.0) self.assertEqual(1L / mhuge, 0.0) self.assertEqual((666 * huge + (huge >> 1)) / huge, 666.5) self.assertEqual((666 * mhuge + (mhuge >> 1)) / mhuge, 666.5) self.assertEqual((666 * huge + (huge >> 1)) / mhuge, -666.5) self.assertEqual((666 * mhuge + (mhuge >> 1)) / huge, -666.5) self.assertEqual(huge / (huge << 1), 0.5) self.assertEqual((1000000 * huge) / huge, 1000000)
66ce544ea65681afd2006f05dd25baa8ff57a454 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/66ce544ea65681afd2006f05dd25baa8ff57a454/test_long_future.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 366, 21627, 273, 404, 48, 2296, 1059, 2787, 17819, 21627, 273, 300, 76, 21627, 365, 18, 11231, 5812, 12, 76, 21627, 342, 366, 21627, 16, 404, 18, 20, 13, 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, 1842, 12, 2890, 4672, 366, 21627, 273, 404, 48, 2296, 1059, 2787, 17819, 21627, 273, 300, 76, 21627, 365, 18, 11231, 5812, 12, 76, 21627, 342, 366, 21627, 16, 404, 18, 20, 13, 365, 18,...
if self.executable is None: self.executable = sys.executable
def setup(self): if self.standalone and self.mainprogram is None: raise BundleBuilderError, ("must specify 'mainprogram' when " "building a standalone application.") if self.mainprogram is None and self.executable is None: raise BundleBuilderError, ("must specify either or both of " "'executable' and 'mainprogram'")
1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 4672, 309, 365, 18, 10145, 12451, 471, 365, 18, 5254, 12890, 353, 599, 30, 1002, 8539, 1263, 668, 16, 7566, 11926, 4800, 296, 5254, 12890, 11, 1347, 315, 315, 3510, 310, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 309, 365, 18, 10145, 12451, 471, 365, 18, 5254, 12890, 353, 599, 30, 1002, 8539, 1263, 668, 16, 7566, 11926, 4800, 296, 5254, 12890, 11, 1347, 315, 315, 3510, 310, ...
sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]])
sage: f = Piecewise([[(-pi,pi/2),f1],[(pi/2,pi),f2]])
def plot_fourier_series_partial_sum_hann(self,N,L,xmin,xmax, **kwds): r""" Plots the partial sum \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N H_N(n)*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] over xmin < x < xmin, where H_N(x) = (0.5)+(0.5)*cos(x*pi/N) is the N-th Hann filter.
0a3244f0e24f11675f8fd4274e0d00343dcc1b20 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0a3244f0e24f11675f8fd4274e0d00343dcc1b20/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 74, 24775, 67, 10222, 67, 11601, 67, 1364, 67, 76, 1072, 12, 2890, 16, 50, 16, 48, 16, 92, 1154, 16, 92, 1896, 16, 2826, 25577, 4672, 436, 8395, 3008, 6968, 326, 4702, 2142...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 74, 24775, 67, 10222, 67, 11601, 67, 1364, 67, 76, 1072, 12, 2890, 16, 50, 16, 48, 16, 92, 1154, 16, 92, 1896, 16, 2826, 25577, 4672, 436, 8395, 3008, 6968, 326, 4702, 2142...
tuple = self.frame.pluginhandler.OutgoingRoomSearchEvent(rooms, text)
tuple = self.frame.pluginhandler.OutgoingRoomSearchEvent(room, text)
def OnSearch(self): text = self.frame.SearchEntry.get_text().strip() if not text: return users = [] room = None if self.frame.SearchMethod.get_active_text() == _("Global"): mode = 0 elif self.frame.SearchMethod.get_active_text() == _("Rooms"): mode = 1 name = self.frame.RoomSearchCombo.child.get_text() # Space after Joined Rooms is important, so it doesn't conflict # with any possible real room if name != _("Joined Rooms ") and not name.isspace(): room = name elif self.frame.SearchMethod.get_active_text() == _("Buddies"): mode = 2 elif self.frame.SearchMethod.get_active_text() == _("User"): mode = 3 user = self.frame.UserSearchCombo.child.get_text().strip() if user != "" and not user.isspace(): users = [user] else: return else: mode = 0 tuple = None if mode == 0: tuple = self.frame.pluginhandler.OutgoingGlobalSearchEvent(text) if tuple != None: text = tuple[0] elif mode == 1: tuple = self.frame.pluginhandler.OutgoingRoomSearchEvent(rooms, text) if tuple != None: (rooms, text) = tuple elif mode == 2: tuple = self.frame.pluginhandler.OutgoingBuddySearchEvent(text) if tuple != None: text = tuple[0] elif mode == 3: tuple = self.frame.pluginhandler.OutgoingUserSearchEvent(users) if tuple != None: users = tuple else: print "Unknown search mode, not using plugin system. Fix me!" tuple = True if tuple != None: self.DoSearch(text, mode, users, room) self.frame.SearchEntry.set_text("") #else: # print "search got cancelled by plugin system"
c5ea383e0fa29647de727c6cd0150899610551b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8738/c5ea383e0fa29647de727c6cd0150899610551b2/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2979, 12, 2890, 4672, 977, 273, 365, 18, 3789, 18, 2979, 1622, 18, 588, 67, 955, 7675, 6406, 1435, 225, 309, 486, 977, 30, 327, 3677, 273, 5378, 7725, 273, 599, 309, 365, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2979, 12, 2890, 4672, 977, 273, 365, 18, 3789, 18, 2979, 1622, 18, 588, 67, 955, 7675, 6406, 1435, 225, 309, 486, 977, 30, 327, 3677, 273, 5378, 7725, 273, 599, 309, 365, 18, 3...
if check_only and str(e):
if check_only and not include_state and str(e):
def make_inventory(checkname, hostnamelist, check_only=False, include_state=False): try: inventory_function = check_info[checkname][3] except KeyError: sys.stderr.write("No such check type '%s'. Try check_mk -I list.\n" % checkname) sys.exit(1) is_snmp_check = check_uses_snmp(checkname) newchecks = [] newitems = [] # used by inventory check to display unchecked items count_new = 0 checked_hosts = [] # if no hostnamelist is specified, we use all hosts if not hostnamelist or len(hostnamelist) == 0: global opt_use_cachefile opt_use_cachefile = True hostnamelist = all_hosts_untagged try: for host in hostnamelist: # Skip SNMP checks on non-SNMP hosts if is_snmp_check and not is_snmp_host(host): continue # Skip TCP checks on non-TCP hosts if not is_snmp_check and not is_tcp_host(host): continue # Skip checktypes which are generally ignored for this host if checktype_ignored_for_host(host, checkname): continue if is_cluster(host): sys.stderr.write("%s is a cluster host and cannot be inventorized.\n" % host) continue # host is either hostname or "hostname/ipaddress" s = host.split("/") hostname = s[0] if len(s) == 2: ipaddress = s[1] else: # try to resolve name into ip address if not opt_no_tcp: try: ipaddress = lookup_ipaddress(hostname) except: sys.stderr.write("Cannot resolve %s into IP address.\n" % hostname) continue else: ipaddress = None # not needed, not TCP used # Make hostname available as global variable in inventory functions # (used e.g. by ps-inventory) global g_hostname g_hostname = hostname # On --no-tcp option skip hosts without cache file if opt_no_tcp: if opt_no_cache: sys.stderr.write("You allowed me neither TCP nor cache. Bailing out.\n") sys.exit(4) cachefile = tcp_cache_dir + "/" + hostname if not os.path.exists(cachefile): if opt_verbose: sys.stderr.write("No cachefile %s. Skipping this host.\n" % cachefile) continue checked_hosts.append(hostname) checkname_base = checkname.split('.')[0] # make e.g. 'lsi' from 'lsi.arrays' try: info = get_realhost_info(hostname, ipaddress, checkname_base, inventory_max_cachefile_age) except MKAgentError, e: if check_only and str(e): raise elif str(e): sys.stderr.write("Host '%s': %s\n" % (hostname, str(e))) continue except MKSNMPError, e: if check_only and str(e): raise elif str(e): sys.stderr.write("Host '%s': %s\n" % (hostname, str(e))) continue except Exception, e: if check_only or opt_debug: raise sys.stderr.write("Cannot get information from host '%s': %s\n" % (hostname, e)) continue if info == None: # No data for this check type continue try: inventory = inventory_function(checkname, info) # inventory is a list of pairs (item, current_value) if inventory == None: # tolerate if function does no explicit return inventory = [] except Exception, e: if opt_debug: raise sys.stderr.write("%s: Invalid output from agent or invalid configuration: %s\n" % (hostname, e)) continue if not isinstance(inventory, list): sys.stderr.write("%s: Check %s returned invalid inventory data: %s\n" % (hostname, checkname, repr(inventory))) continue for entry in inventory: state_type = "new" # assume new, change later if wrong if len(entry) == 2: # comment is now obsolete item, paramstring = entry else: item, comment, paramstring = entry description = service_description(checkname, item) # Find logical host this check belongs to. The service might belong to a cluster. hn = host_of_clustered_service(hostname, description) # Now compare with already known checks for this host (from # previous inventory or explicit checks). Also drop services # the user wants to ignore via 'ignored_services'. checktable = get_check_table(hn) checked_items = [ i for ( (cn, i), (par, descr, deps) ) \ in checktable.items() if cn == checkname ] if item in checked_items: if include_state: state_type = "old" else: continue # we have that already if service_ignored(hn, description): if include_state: if state_type == "old": state_type = "obsolete" else: state_type = "ignored" else: continue # user does not want this item to be checked newcheck = ' ("%s", "%s", %r, %s),' % (hn, checkname, item, paramstring) newcheck += "\n" if newcheck not in newchecks: # avoid duplicates if inventory outputs item twice newchecks.append(newcheck) if include_state: newitems.append( (hn, checkname, item, paramstring, state_type) ) else: newitems.append( (hn, checkname, item) ) count_new += 1 except KeyboardInterrupt: sys.stderr.write('<Interrupted>\n') if not check_only: if newchecks != []: filename = autochecksdir + "/" + checkname + "-" + time.strftime("%Y-%m-%d_%H.%M.%S") while os.path.exists(filename + ".mk"): # in case of more than one file per second and checktype... filename += ".x" filename += ".mk" if not os.path.exists(autochecksdir): os.makedirs(autochecksdir) file(filename, "w").write('# %s\n[\n%s]\n' % (filename, ''.join(newchecks))) sys.stdout.write('%-30s ' % (tty_blue + checkname + tty_normal)) sys.stdout.write('%s%d new checks%s\n' % (tty_bold + tty_green, count_new, tty_normal)) return newitems
0ffa60766d416c819afc9ab430637afb491fe98b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/0ffa60766d416c819afc9ab430637afb491fe98b/check_mk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 26024, 12, 1893, 529, 16, 1479, 17808, 5449, 16, 866, 67, 3700, 33, 8381, 16, 2341, 67, 2019, 33, 8381, 4672, 775, 30, 13086, 67, 915, 273, 866, 67, 1376, 63, 1893, 529, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 26024, 12, 1893, 529, 16, 1479, 17808, 5449, 16, 866, 67, 3700, 33, 8381, 16, 2341, 67, 2019, 33, 8381, 4672, 775, 30, 13086, 67, 915, 273, 866, 67, 1376, 63, 1893, 529, 63...
childmenuItem_.connect('activate', self.show_add_watch, child[2])
childmenuItem_.connect('button-press-event', self.show_add_watch, child[2])
def generate_add_menu(self): menu_dict = self.specto.watch_db.plugin_menu self.add_menu = gtk.Menu() self.add_menu_ = gtk.Menu()
9e50d8d367ff4b7096906d668b93033ec79851a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10818/9e50d8d367ff4b7096906d668b93033ec79851a0/notifier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 1289, 67, 5414, 12, 2890, 4672, 3824, 67, 1576, 273, 365, 18, 13234, 83, 18, 7585, 67, 1966, 18, 4094, 67, 5414, 365, 18, 1289, 67, 5414, 273, 22718, 18, 4599, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 1289, 67, 5414, 12, 2890, 4672, 3824, 67, 1576, 273, 365, 18, 13234, 83, 18, 7585, 67, 1966, 18, 4094, 67, 5414, 365, 18, 1289, 67, 5414, 273, 22718, 18, 4599, 1435, 365, 1...
ini.flush() ini.seek(0) self.config = Config(ini.name)
def setUp(self): ini = tempfile.NamedTemporaryFile() ini.write(TEST_INI) ini.flush() ini.seek(0) self.config = Config(ini.name) ini.close()
13525b22a54e441b5a3ddd732b11b2533a5474bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/13525b22a54e441b5a3ddd732b11b2533a5474bc/test_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 6896, 273, 13275, 18, 7604, 23808, 1435, 6896, 18, 2626, 12, 16961, 67, 12772, 13, 6896, 18, 4412, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 24292, 12, 2890, 4672, 6896, 273, 13275, 18, 7604, 23808, 1435, 6896, 18, 2626, 12, 16961, 67, 12772, 13, 6896, 18, 4412, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
deps[viewId] = resolveDependencies(views[viewId], [], loadDeps, runDeps)
exclude = [] for subViewId in views: if subViewId != viewId: exclude.extend(views[subViewId]) deps[viewId] = resolveDependencies(views[viewId], exclude, loadDeps, runDeps)
def processViews(views, loadDeps, runDeps): global classes print ">>> Analysing %s views..." % len(views) classCounts = {} # Generating data structures for possible modules classMods = {} # for id in views: # Hint: IDs # # apiviewer # feedreader # webmail # apiviewer-feedreader # apiviewer-webmail # feedreader-webmail # apiviewer-feedreader-webmail # # Find all classes allIncludes = [] for id in views: allIncludes.extend(views[id]) allClasses = resolveDependencies(allIncludes, [], loadDeps, runDeps) print " - Using %s classes" % len(allClasses) # Caching dependencies of each view deps = {} for viewId in views: deps[viewId] = resolveDependencies(views[viewId], [], loadDeps, runDeps) print " - %s use %s classes" % (viewId, len(deps[viewId])) # Build bitmask ids for views # 1,2,4,8,16,32,64,128 bits = {} pos = 1 for id in views: bits[id] = pos pos = pos * 2 print bits # Revert map # apiviever = [1,4,8] bitIds = {} # TODO # Find out usage of classes and assign them to a bitmask using map usage = {} for classId in allClasses: usageId = 0 for viewId in views: if classId in deps[viewId]: usageId += bits[viewId] if usageId == 0: continue if not usage.has_key(usageId): usage[usageId] = [] usage[usageId].append(classId) # Debug print ">>> Bit results" for bit in usage: print " - Bit %s has %s classes" % (bit, len(usage[bit])) #print " %s" % ", ".join(usage[bit]) viewFiles = {} for viewId in views: bitId = bits[viewId] content = [] for num in usage: if num&bitId: content.insert(0, num) viewFiles[viewId] = content print viewFiles exportUsageToPackagesJson(usage) exportUsageToClassJson(usage) result = [] # Return result list return result
0695d5fc7db251d077ab56c9991eee69ced5d073 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/0695d5fc7db251d077ab56c9991eee69ced5d073/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9959, 12, 7061, 16, 1262, 14430, 16, 1086, 14430, 4672, 2552, 3318, 225, 1172, 315, 23012, 1922, 3646, 310, 738, 87, 7361, 7070, 738, 562, 12, 7061, 13, 225, 667, 9211, 273, 2618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9959, 12, 7061, 16, 1262, 14430, 16, 1086, 14430, 4672, 2552, 3318, 225, 1172, 315, 23012, 1922, 3646, 310, 738, 87, 7361, 7070, 738, 562, 12, 7061, 13, 225, 667, 9211, 273, 2618, ...
raise WalkerEror
raise WalkerError
def fpdef(self, nodelist): raise WalkerEror
0059b73cde32fd3140b1abc1bf9faa7d33bba8d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0059b73cde32fd3140b1abc1bf9faa7d33bba8d7/transformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4253, 536, 12, 2890, 16, 30068, 4672, 1002, 7564, 264, 29228, 280, 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, 4253, 536, 12, 2890, 16, 30068, 4672, 1002, 7564, 264, 29228, 280, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if not props['status'] or props['status'] == unread_id:
if (not props.has_key('status') or props['status'] == unread_id):
def handle_message(self, message): ''' message - a Message instance
df338247c7b21ae64b8cc8570fe32214cb7fc5cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/df338247c7b21ae64b8cc8570fe32214cb7fc5cb/mailgw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2150, 12, 2890, 16, 883, 4672, 9163, 883, 300, 279, 2350, 791, 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, 1640, 67, 2150, 12, 2890, 16, 883, 4672, 9163, 883, 300, 279, 2350, 791, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.libdir = os.path.realpath(os.path.join(self.cwd, libdir)) else: self.libdir = os.path.realpath(os.path.join(self.cwd, self.libdir)) if self.libdir not in sys.path: sys.path.insert(0, self.libdir)
self.libdir = os.path.join(self.cwd, libdir) else: self.libdir = os.path.join(self.cwd, self.libdir) real_libdir = os.path.realpath(self.libdir) if real_libdir not in sys.path: sys.path.insert(0, real_libdir)
def __init__(self, build, libdir=None): # Calculate which directories we're going to add to sys.path. self.libdir = "lib/python" # Hack sys.path self.home = os.path.dirname(os.path.realpath(sys.argv[0])) # test.py lives in $ZOPE_HOME/bin when installed ... dir, file = os.path.split(self.home) if file == 'bin': self.home = dir sys.path.insert(0, os.path.join(self.home, self.libdir)) sys.path.insert(0, os.path.join(self.home, self.libdir, 'third_party', 'docutils')) self.cwd = os.path.realpath(os.getcwd()) # Hack again for external products. if libdir: self.libdir = os.path.realpath(os.path.join(self.cwd, libdir)) else: self.libdir = os.path.realpath(os.path.join(self.cwd, self.libdir)) if self.libdir not in sys.path: sys.path.insert(0, self.libdir) # Determine where to look for tests if test_dir: self.testdir = os.path.abspath(os.path.join(self.cwd, test_dir)) else: self.testdir = self.libdir kind = functional and "functional" or "unit" print "Running %s tests from %s" % (kind, self.testdir)
c5588353413ee0de38ed8b76201ff2d900c62b4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c5588353413ee0de38ed8b76201ff2d900c62b4a/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 16, 2561, 1214, 33, 7036, 4672, 468, 9029, 1492, 6402, 732, 4565, 8554, 358, 527, 358, 2589, 18, 803, 18, 365, 18, 2941, 1214, 273, 315, 2941, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 16, 2561, 1214, 33, 7036, 4672, 468, 9029, 1492, 6402, 732, 4565, 8554, 358, 527, 358, 2589, 18, 803, 18, 365, 18, 2941, 1214, 273, 315, 2941, 19, ...
for con in self.__cnxs:
for con in self._cnxs:
def shutdown(self): self.__lock.acquire() try: for con in self.__cnxs: con.cnx.close() finally: self.__lock.release()
4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 12, 2890, 4672, 365, 16186, 739, 18, 1077, 1039, 1435, 775, 30, 364, 356, 316, 365, 6315, 10305, 13713, 30, 356, 18, 10305, 92, 18, 4412, 1435, 3095, 30, 365, 16186, 739, 18, 934...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5731, 12, 2890, 4672, 365, 16186, 739, 18, 1077, 1039, 1435, 775, 30, 364, 356, 316, 365, 6315, 10305, 13713, 30, 356, 18, 10305, 92, 18, 4412, 1435, 3095, 30, 365, 16186, 739, 18, 934...
channel_re=re.compile(r"^[&
channel_re=re.compile(r"^[&
def strip_colors(s): return color_re.sub("",s)
b4388cb23f2301e661e6a730cbbbbde5aa950209 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12751/b4388cb23f2301e661e6a730cbbbbde5aa950209/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 9724, 12, 87, 4672, 327, 2036, 67, 266, 18, 1717, 2932, 3113, 87, 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, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 9724, 12, 87, 4672, 327, 2036, 67, 266, 18, 1717, 2932, 3113, 87, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for args in self.parent.addheaders: name, value = args
for name, value in self.parent.addheaders: name = name.capitalize()
def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given')
78369cba63bbebebc5a0d9d184eb858f3ea1268a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/78369cba63bbebebc5a0d9d184eb858f3ea1268a/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 668, 2668, 2135, 1479, 864, 6134, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 668, 2668, 2135, 1479, 864, 6134, 2, -100, -100, ...
self._set_metadata_element('dc:Type', category)
self._set_metadata_element('dc:type', category)
def set_category(self, category): if not category: category = '' self._set_metadata_element('dc:Type', category)
2c5802676d8f80b76da4279238a911c51e9c213f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/2c5802676d8f80b76da4279238a911c51e9c213f/opf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4743, 12, 2890, 16, 3150, 4672, 309, 486, 3150, 30, 3150, 273, 875, 365, 6315, 542, 67, 4165, 67, 2956, 2668, 7201, 30, 723, 2187, 3150, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4743, 12, 2890, 16, 3150, 4672, 309, 486, 3150, 30, 3150, 273, 875, 365, 6315, 542, 67, 4165, 67, 2956, 2668, 7201, 30, 723, 2187, 3150, 13, 225, 2, -100, -100, -100, -100, ...
logfile, 0, '')
logfile, 0, '')
def StartMPI(DEBUGON, nodes, logfile): 'Start LAM/MPI on all nodes, doing a sanity check before.' from os import access,F_OK if os.access(config.LAMBOOT, F_OK) == 0: printlog('o2tf.StartMPI: Lamboot not found', logfile, 0, '') sys.exit(1) if os.access(config.LAMHOSTS, F_OK) == 1: os.system('rm -f ' + config.LAMHOSTS) nodelist = string.split(nodes,',') nodelen = len(nodelist) fd = open(config.LAMHOSTS,'w',0) for i in range(nodelen): fd.write(nodelist[i] + '\n') fd.close()
657bfc37c22ea26052b0df161170cb3df469efec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1915/657bfc37c22ea26052b0df161170cb3df469efec/o2tf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 49, 1102, 12, 9394, 673, 16, 2199, 16, 15204, 4672, 296, 1685, 511, 2192, 19, 49, 1102, 603, 777, 2199, 16, 9957, 279, 16267, 866, 1865, 1093, 628, 1140, 1930, 2006, 16, 42, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 49, 1102, 12, 9394, 673, 16, 2199, 16, 15204, 4672, 296, 1685, 511, 2192, 19, 49, 1102, 603, 777, 2199, 16, 9957, 279, 16267, 866, 1865, 1093, 628, 1140, 1930, 2006, 16, 42, 67, ...
match = _jython_sys_version_parser.match(sys.version)
match = _jython_sys_version_parser.match(sys_version)
def _sys_version(): """ Returns a parsed version of Python's sys.version as tuple (name, version, branch, revision, buildno, builddate, compiler) referring to the Python implementation name, version, branch, revision, build number, build date/time as string and the compiler identification string. Note that unlike the Python sys.version, the returned value for the Python version will always include the patchlevel (it defaults to '.0'). The function returns empty strings for tuple entries that cannot be determined. """ global _sys_version_cache if _sys_version_cache is not None: return _sys_version_cache if sys.version[:10] == 'IronPython': # IronPython name = 'IronPython' match = _ironpython_sys_version_parser.match(sys.version) if match is None: raise ValueError( 'failed to parse IronPython sys.version: %s' % repr(sys.version)) version, compiler = match.groups() branch = '' revision = '' buildno = '' builddate = '' elif sys.platform[:4] == 'java': # Jython name = 'Jython' match = _jython_sys_version_parser.match(sys.version) if match is None: raise ValueError( 'failed to parse Jython sys.version: %s' % repr(sys.version)) version, = match.groups() branch = '' revision = '' compiler = sys.platform buildno = '' builddate = '' else: # CPython match = _sys_version_parser.match(sys.version) if match is None: raise ValueError( 'failed to parse CPython sys.version: %s' % repr(sys.version)) version, buildno, builddate, buildtime, compiler = \ match.groups() if hasattr(sys, 'subversion'): name, branch, revision = sys.subversion else: name = 'CPython' branch = '' revision = '' builddate = builddate + ' ' + buildtime l = string.split(version, '.') if len(l) == 2: l.append('0') version = string.join(l, '.') _sys_version_cache = (name, version, branch, revision, buildno, builddate, compiler) return _sys_version_cache
e8781bedd8dcf2fe44377fcaac601853dd6d0056 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/e8781bedd8dcf2fe44377fcaac601853dd6d0056/platform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 1589, 13332, 225, 3536, 2860, 279, 2707, 1177, 434, 6600, 1807, 2589, 18, 1589, 487, 3193, 261, 529, 16, 1177, 16, 3803, 16, 6350, 16, 1361, 2135, 16, 25666, 330, 449, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 1589, 13332, 225, 3536, 2860, 279, 2707, 1177, 434, 6600, 1807, 2589, 18, 1589, 487, 3193, 261, 529, 16, 1177, 16, 3803, 16, 6350, 16, 1361, 2135, 16, 25666, 330, 449, 3...
% (package_name,self._obj2str(new_object), self._obj2str(old_object)))
% (package_name,self._obj2repr(new_object), self._obj2repr(old_object)))
def __call__(self,*packages, **options): """Load one or more packages into numpy's top-level namespace.
158925966f1796d93ab804f3ebecec7b524e70f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/158925966f1796d93ab804f3ebecec7b524e70f4/_import_tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 14, 10308, 16, 2826, 2116, 4672, 3536, 2563, 1245, 578, 1898, 5907, 1368, 3972, 1807, 1760, 17, 2815, 1981, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 14, 10308, 16, 2826, 2116, 4672, 3536, 2563, 1245, 578, 1898, 5907, 1368, 3972, 1807, 1760, 17, 2815, 1981, 18, 2, -100, -100, -100, -100, -100, -100, -100...
globals()['funny$name'] = TestGlobalFunnyName
def __repr__(self): r""" Print a TestGlobalFunnyName.
3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 436, 8395, 3038, 279, 7766, 5160, 22783, 18538, 461, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 436, 8395, 3038, 279, 7766, 5160, 22783, 18538, 461, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif status.jobStatus == 'cancelled':
elif status.jobStatus == 'cancelled' and job.status not in ['completed','failed']:
def master_updateMonitoringInformation(jobs): '''Monitor jobs''' from pandatools import Client
02a8399ae58b24874e1e5e6bc4595cb83d328c1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/02a8399ae58b24874e1e5e6bc4595cb83d328c1f/Panda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 2725, 18410, 5369, 12, 10088, 4672, 9163, 7187, 6550, 26418, 628, 293, 464, 270, 8192, 1930, 2445, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4171, 67, 2725, 18410, 5369, 12, 10088, 4672, 9163, 7187, 6550, 26418, 628, 293, 464, 270, 8192, 1930, 2445, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if arg0.flags.c_contiguous==True or arg0.flags.f_contiguous==True: m=matrix(CDF,arg0.shape[0],arg0.shape[1],0) m._replace_self_with_numpy(arg0) if arg0.flags.c_contiguous: return m else: return m.transpose() else: raise TypeError('numpy matrix must be either c_contiguous or f_contiguous')
m=matrix(CDF,arg0.shape[0],arg0.shape[1],0) m._replace_self_with_numpy(arg0) elif str_dtype.count('int') == 1: m = matrix(ZZ, map(list, list(arg0)))
def matrix(arg0=None, arg1=None, arg2=None, arg3=None, sparse=None): """ Create a matrix. INPUT: Supported formats 1. matrix([sparse=True]): the 0x0 matrix over ZZ 2. matrix(list_of_rows, [sparse=True]): matrix with each row constructed from the list_of_rows 3. matrix(nrows, entries, [sparse=True]): matrix with given number of rows and flat list of entries 4. matrix(nrows, ncols, entries, [sparse=True]): matrix with given number of rows and columns with flat list of entries 5. matrix(ring, list_of_row, [sparse=True]): matrix over ring with rows the elements of the list_of_rows 6. matrix(ring, nrows, entries, [sparse=True]): matrix over ring with given number of rows and entries from the flat list 7. matrix(ring, nrows, ncols, entries, [sparse=True]): matrix over the given ring with given number of rows and columns and entries. 8. matrix(numpy_array) The sparse option is optional, must be explicitly named (i.e., sparse=True), and may be either True or False. The entries can instead be a dictionary of key:value pairs of the form (i,j):x, where i,j are integers instead of a list. If sparse is not specified and the entries are a dictionary, it default to True. OUTPUT: a matrix EXAMPLES: 1. The degenerate matrix input format: sage: m = matrix(); m [] sage: parent(m) Full MatrixSpace of 0 by 0 dense matrices over Integer Ring sage: m = matrix(sparse=True); m [] sage: parent(m) Full MatrixSpace of 0 by 0 sparse matrices over Integer Ring 2. The "matrix(list_of_rows, [sparse])" input format. Notice that SAGE is careful to find a sensible common ring for all the entries (using the Sequence object): sage: x = polygen(QQ) sage: m = matrix([[1/3,2+x],[3,4]]); m [ 1/3 x + 2] [ 3 4] sage: parent(m) Full MatrixSpace of 2 by 2 dense matrices over Univariate Polynomial Ring in x over Rational Field sage: m = matrix([[1,2],[3,4/7]]); m [ 1 2] [ 3 4/7] sage: parent(m) Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: m = matrix([[1,2,3], [RDF(2), CDF(1,2), 3]]); m [ 1.0 2.0 3.0] [ 2.0 1.0 + 2.0*I 3.0] sage: parent(m) Full MatrixSpace of 2 by 3 dense matrices over Complex Double Field sage: V = GF(7)^2 sage: m = matrix([V.0, V.0+2*V.1], sparse=True); m [1 0] [1 2] sage: parent(m) Full MatrixSpace of 2 by 2 sparse matrices over Finite Field of size 7 3. matrix(nrows, entries, [sparse]): sage: matrix(2,[1,2,3, 4,5,6]) [1 2 3] [4 5 6] sage: matrix(3, [1,2, 3/4, 5/6, 7*x, 8*x]) [ 1 2] [3/4 5/6] [7*x 8*x] The number of rows must divide the number of entries. sage: matrix(5,[1,2,3, 4,5,6]) Traceback (most recent call last): ... TypeError: entries has the wrong length 4. matrix(nrows, ncols, entries, [sparse]): sage: matrix(2,3, [1,2,3, 4,5,6]) [1 2 3] [4 5 6] sage: matrix(3,2, [1,2, 3/4, 5/6, 7*x, 8*x]) [ 1 2] [3/4 5/6] [7*x 8*x] The length of the entry list must be the same as the number of rows times columns. sage: matrix(3,3, [1,2, 3/4, 5/6, 7*x, 8*x]) Traceback (most recent call last): ... TypeError: entries has the wrong length 5. matrix(ring, list_of_row, [sparse]): sage: m = matrix(QQ, [[1,2], [3,4]]); m [1 2] [3 4] sage: parent(m) Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: m = matrix(GF(7), [[1/3,2/3,1/2], [3/4,4/5,7]]); m [5 3 4] [6 5 0] sage: parent(m) Full MatrixSpace of 2 by 3 dense matrices over Finite Field of size 7 6. matrix(ring, nrows, entries, [sparse]): sage: M = ZZ^4 sage: m = matrix(QQ, [M([1,2,3,4]), M([-1,0,3,4])]); m [ 1 2 3 4] [-1 0 3 4] sage: parent(m) Full MatrixSpace of 2 by 4 dense matrices over Rational Field 7. matrix(ring, nrows, ncols, entries, [sparse]) sage: matrix(QQ, 2, 2, [1,2,3,4]) [1 2] [3 4] sage: matrix(GF(5), 2, 3, range(6)) [0 1 2] [3 4 0] sage: matrix(ZZ, 10, 10, range(100)).parent() Full MatrixSpace of 10 by 10 dense matrices over Integer Ring sage: matrix(ZZ, 10, 10, range(100), sparse=True).parent() Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring sage: R = PolynomialRing(QQ, 9, 'x') sage: A = matrix(R, 3, 3, R.gens()); A [x0 x1 x2] [x3 x4 x5] [x6 x7 x8] sage: det(A) -x2*x4*x6 + x1*x5*x6 + x2*x3*x7 - x0*x5*x7 - x1*x3*x8 + x0*x4*x8 CREATING SPARSE MATRICES FROM DICTS: sage: a = matrix({(1,2):10, (2,3):5/1}) sage: print a, a.parent() [ 0 0 0 0] [ 0 0 10 0] [ 0 0 0 5] Full MatrixSpace of 3 by 4 sparse matrices over Rational Field sage: a = matrix({(1,2):10}) sage: print a, a.is_sparse() [ 0 0 0] [ 0 0 10] True sage: a = matrix(3,{(1,2):10}) sage: print a, a.is_sparse() [ 0 0 0] [ 0 0 10] [ 0 0 0] True sage: a = matrix(3,5,{(1,2):10}) sage: print a, a.is_sparse() [ 0 0 0 0 0] [ 0 0 10 0 0] [ 0 0 0 0 0] True sage: a = matrix(QQ, 3, {(1,2):10}) sage: print a, a.is_sparse() [ 0 0 0] [ 0 0 10] [ 0 0 0] True sage: a = matrix(QQ, 3, {(1,2):10}, sparse=True) sage: print a, a.is_sparse() [ 0 0 0] [ 0 0 10] [ 0 0 0] True sage: a = matrix(QQ, 3, 5, {(1,2):10}, sparse=True) sage: print a, a.is_sparse() [ 0 0 0 0 0] [ 0 0 10 0 0] [ 0 0 0 0 0] True 8. Creating a matrix from a numpy array Any numpy array with a datatype of float or complex may be passed to matrix If the data type is float the result will be a matrix over the real double field. complex numpy arrays will give matrices over the complex double field. The data of the numpy array must be contiguous, so slices of other matrices will raise an exception. sage: import numpy sage: n=numpy.array([[1,2],[3,4]],float) sage: m=matrix(n) sage: n=numpy.array([[numpy.complex(0,1),numpy.complex(0,2)],[3,4]],complex) sage: m=matrix(n) TESTS: sage: import numpy sage: a = numpy.array([[1,2,3],[4,5,6],[7,8,9]],'float32') sage: matrix(a) [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] sage: a = numpy.array([[1,2,3],[4,5,6],[7,8,9]],'float64') sage: matrix(a) [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] sage: a = numpy.array([[1,2,3],[4,5,6],[7,8,9]],'complex64') sage: matrix(a) [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] sage: a = numpy.array([[1,2,3],[4,5,6],[7,8,9]],'complex128') sage: matrix(a) [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] sage: a = matrix([[1,2],[3,4]]) sage: b = matrix(a.numpy()); b [1 2] [3 4] sage: a == b True sage: c = matrix(a.numpy('float32')); c [1.0 2.0] [3.0 4.0] """ if hasattr(arg0, '_matrix_'): if arg1 is None: arg1 = rings.ZZ return arg0._matrix_(arg1) if hasattr(arg1, '_matrix_'): return arg1._matrix_(arg0) if arg0 is None: # 1. matrix([sparse]): # the 0x0 matrix over ZZ # the degenerate matrix ring = rings.ZZ nrows = 0 ncols = 0 entries = [] elif isinstance(arg0, (list, tuple)): # 2. matrix(list_of_rows, [sparse]): # matrix with each row constructed from the list_of_rows # list of rows if not (arg1 is None and arg2 is None and arg3 is None): raise TypeError, "invalid input" nrows = len(arg0) if nrows == 0: ncols = 0 else: ncols = len(arg0[0]) w = sum([list(v) for v in arg0], []) entries, ring = prepare(w) elif isinstance(arg0, dict): # 2. matrix(dict_of_rows, sparse=True): if sparse is None: sparse = True entries, ring = prepare_dict(arg0) nrows = nrows_from_dict(entries) ncols = ncols_from_dict(entries) elif not rings.is_Ring(arg0) and isinstance(arg1, (list, tuple)) and arg2 is None and arg3 is None: # 3. matrix(nrows, entries, [sparse]): # matrix with given number of rows and flat list of entries nrows = int(arg0) entries, ring = prepare(arg1) ncols = len(entries) // nrows elif not rings.is_Ring(arg0) and isinstance(arg1, dict) and arg2 is None and arg3 is None: # 3. matrix(nrows, entries, sparse=True): # matrix with given number of rows and sparse dict of entries if sparse is None: sparse = True nrows = int(arg0) entries, ring = prepare_dict(arg1) ncols = ncols_from_dict(entries) elif not rings.is_Ring(arg0) and isinstance(arg2, (list, tuple)) and arg3 is None: # 4. matrix(nrows, ncols, entries, [sparse]): # matrix with given number of rows and columns with flat list of entries nrows = int(arg0) ncols = int(arg1) entries, ring = prepare(arg2) elif not rings.is_Ring(arg0) and isinstance(arg2, dict) and arg3 is None: # 4. matrix(nrows, ncols, entries, sparse=True): # matrix with given number of rows and columns with flat list of entries if sparse is None: sparse = True nrows = int(arg0) ncols = int(arg1) entries, ring = prepare_dict(arg2) elif rings.is_Ring(arg0) and isinstance(arg1, (list, tuple)) and arg2 is None and arg3 is None: # 5. matrix(ring, list_of_row, [sparse]): # matrix over ring with rows the elements of the list_of_rows ring = arg0 nrows = len(arg1) if nrows == 0: ncols = 0 else: try: ncols = len(arg1[0]) except TypeError: raise TypeError, "If making a matrix with the matrix(ring, list_of_row, [sparse]) constructor, the second input must be a list of rows." entries = sum([list(v) for v in arg1], []) elif rings.is_Ring(arg0) and isinstance(arg1, dict) and arg2 is None and arg3 is None: # 5. matrix(ring, dict, sparse=True): # matrix over ring with rows the elements the dict if sparse is None: sparse = True ring = arg0 entries = arg1 nrows = nrows_from_dict(entries) elif rings.is_Ring(arg0) and isinstance(arg2, (list, tuple)) and arg3 is None: # 6. matrix(ring, nrows, entries, [sparse]): # matrix over ring with given number of rows and entries from the flat list ring = arg0 nrows = int(arg1) entries = arg2 if nrows == 0: ncols = 0 else: ncols = len(entries) // nrows elif rings.is_Ring(arg0) and isinstance(arg2, dict) and arg3 is None: # 6. matrix(ring, nrows, entries, sparse=True) # matrix over ring with given number of rows and entries from the dict if sparse is None: sparse = True ring = arg0 nrows = int(arg1) entries = arg2 if nrows == 0: ncols = 0 else: ncols = ncols_from_dict(entries) elif rings.is_Ring(arg0): # 7. matrix(ring, nrows, ncols, entries, [sparse]): # matrix over the given ring with given number of rows and columns and entries. ring = arg0 nrows = int(arg1) if arg2 is None: ncols = nrows else: ncols = int(arg2) entries = arg3 if isinstance(entries, dict): if sparse is None: sparse = True else: import numpy if isinstance(arg0,numpy.ndarray): str_dtype = str(arg0.dtype) if str_dtype.count('float32')==1: if arg0.flags.c_contiguous==True or arg0.flags.f_contiguous==True: m=matrix(RDF,arg0.shape[0],arg0.shape[1],0) m._replace_self_with_numpy32(arg0) if arg0.flags.c_contiguous: return m else: return m.transpose() else: raise TypeError('numpy matrix must be either c_contiguous or f_contiguous') elif str_dtype.count('float64')==1: if arg0.flags.c_contiguous==True or arg0.flags.f_contiguous==True: m=matrix(RDF,arg0.shape[0],arg0.shape[1],0) m._replace_self_with_numpy(arg0) if arg0.flags.c_contiguous: return m else: return m.transpose() else: raise TypeError('numpy matrix must be either c_contiguous or f_contiguous') elif str_dtype.count('complex64')==1: if arg0.flags.c_contiguous==True or arg0.flags.f_contiguous==True: m=matrix(CDF,arg0.shape[0],arg0.shape[1],0) m._replace_self_with_numpy32(arg0) if arg0.flags.c_contiguous: return m else: return m.transpose() else: raise TypeError('numpy matrix must be either c_contiguous or f_contiguous') elif str_dtype.count('complex128')==1: if arg0.flags.c_contiguous==True or arg0.flags.f_contiguous==True: m=matrix(CDF,arg0.shape[0],arg0.shape[1],0) m._replace_self_with_numpy(arg0) if arg0.flags.c_contiguous: return m else: return m.transpose() else: raise TypeError('numpy matrix must be either c_contiguous or f_contiguous') elif str_dtype.count('object') == 1: #Get the raw nested list from the numpy array #and feed it back into matrix try: return matrix( map(list, list(arg0)) ) except TypeError: raise TypeError("cannot convert numpy matrix to SAGE matrix") else: raise TypeError("cannot convert numpy matrix to SAGE matrix") else: raise TypeError, "unknown matrix constructor format. Type matrix? for help" if sparse is None: sparse = False return matrix_space.MatrixSpace(ring, nrows, ncols, sparse=sparse)(entries)
aee2e5ab4b0be97a6e29e4a927f71363c9a070ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/aee2e5ab4b0be97a6e29e4a927f71363c9a070ed/constructor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 12, 3175, 20, 33, 7036, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 16, 1501, 23, 33, 7036, 16, 9387, 33, 7036, 4672, 3536, 1788, 279, 3148, 18, 225, 12943, 30, 19503, 6449...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 12, 3175, 20, 33, 7036, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 16, 1501, 23, 33, 7036, 16, 9387, 33, 7036, 4672, 3536, 1788, 279, 3148, 18, 225, 12943, 30, 19503, 6449...
andi t3, t3, 32 or reg, reg, t3
andi t4, t3, 32, flags=(EZF,) or reg, reg, t4 mov t1, t1, t3, flags=(nCEZF,)
def macroop BSF_R_R { # Determine if the input was zero, and also move it to a temp reg. mov t1, t1, t0, dataSize=8 and t1, regm, regm, flags=(ZF,) bri t0, label("end"), flags=(CZF,) # Zero out the result register movi reg, reg, 0 subi t2, t1, 1 xor t1, t2, t1 # Bit 6 srli t3, t1, 32, dataSize=8 andi t3, t3, 32 or reg, reg, t3 # Bit 5 srli t3, t1, 16, dataSize=8 andi t3, t3, 16 or reg, reg, t3 # Bit 4 srli t3, t1, 8, dataSize=8 andi t3, t3, 8 or reg, reg, t3 # Bit 3 srli t3, t1, 4, dataSize=8 andi t3, t3, 4 or reg, reg, t3 # Bit 2 srli t3, t1, 2, dataSize=8 andi t3, t3, 2 or reg, reg, t3 # Bit 1 srli t3, t1, 1, dataSize=8 andi t3, t3, 1 or reg, reg, t3
3e7c07fe3694f0322ad14a3f78d57cc10c7ca6f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7385/3e7c07fe3694f0322ad14a3f78d57cc10c7ca6f6/bit_scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 605, 22395, 67, 54, 67, 54, 288, 468, 10229, 309, 326, 810, 1703, 3634, 16, 471, 2546, 3635, 518, 358, 279, 1906, 960, 18, 5730, 268, 21, 16, 268, 21, 16, 268, 20, 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, 11522, 556, 605, 22395, 67, 54, 67, 54, 288, 468, 10229, 309, 326, 810, 1703, 3634, 16, 471, 2546, 3635, 518, 358, 279, 1906, 960, 18, 5730, 268, 21, 16, 268, 21, 16, 268, 20, 16, ...
if type(self.task.task) == type(list): return getattr(self.task.task[0], attr) else:
if hasattr(self.task.task, 'list'): self.__log("getting a rtm task attribute(1): " + \ str(self.task.task)) return getattr(self.task.task.list, attr) else: self.__log("getting a rtm task attribute(2): " + \ str(self.task.task))
def __get_rtm_task_attribute(self, attr): if hasattr(self.task, 'task'): if type(self.task.task) == type(list): return getattr(self.task.task[0], attr) else: return getattr(self.task.task, attr) else: return getattr(self.task, attr)
3f7d5ca13bf5e4ef637fa9b6e52f1305bd27ddaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/3f7d5ca13bf5e4ef637fa9b6e52f1305bd27ddaf/rtmTask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 3797, 81, 67, 4146, 67, 4589, 12, 2890, 16, 1604, 4672, 309, 3859, 12, 2890, 18, 4146, 16, 296, 4146, 11, 4672, 309, 3859, 12, 2890, 18, 4146, 18, 4146, 16, 296, 1098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 3797, 81, 67, 4146, 67, 4589, 12, 2890, 16, 1604, 4672, 309, 3859, 12, 2890, 18, 4146, 16, 296, 4146, 11, 4672, 309, 3859, 12, 2890, 18, 4146, 18, 4146, 16, 296, 1098,...
id = self.tablename[len("bibindex"):]
id = self.tablename[-3:-1]
def add_date(self, date): # If date is not set, then retrieve it from the database. # Reindex all formats newer than the modification date if not date: id = self.tablename[len("bibindex"):] query = """SELECT last_updated FROM idxINDEX WHERE id='%s' """ % id res = run_sql(query) if not res: return if not res[0][0]: date = "0000-00-00" else: date = res[0][0] query = """SELECT b.id FROM bibrec AS b WHERE b.modification_date >= '%s' ORDER BY b.id ASC""" % date res = run_sql(query) list = create_range_list(res) if not list: if options["verbose"]: write_message( "No new records added. %s is up to date" % self.tablename) else: self.add_recIDs(list)
b2dc486ac9ea55a8f76bbe6ef53b95ccaac98534 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/b2dc486ac9ea55a8f76bbe6ef53b95ccaac98534/bibindex_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 712, 12, 2890, 16, 1509, 4672, 468, 971, 1509, 353, 486, 444, 16, 1508, 4614, 518, 628, 326, 2063, 18, 468, 868, 1615, 777, 6449, 16069, 2353, 326, 11544, 1509, 309, 486, 1509...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 712, 12, 2890, 16, 1509, 4672, 468, 971, 1509, 353, 486, 444, 16, 1508, 4614, 518, 628, 326, 2063, 18, 468, 868, 1615, 777, 6449, 16069, 2353, 326, 11544, 1509, 309, 486, 1509...
>>> import geoip >>> a = geoip.chunzhen() >>> a.fixipv4('192.168') '192.168.0.1' >>> a.fixipv4('192.168.2') '192.168.2.1' >>> a.fixipv4('192.168.2.22') '192.168.2.22' >>> """
>>> import geoip >>> a = geoip.chunzhen() >>> a.fixipv4('192.168') '192.168.0.1' >>> a.fixipv4('192.168.2') '192.168.2.1' >>> a.fixipv4('192.168.2.22') '192.168.2.22' >>> """
def fixipv4(self, ipv4string): """fill the 3, 4 part of a particalarly typed ip address.
0caf5a57fb7d5c962d91b5d29cb400b2d3eae008 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10749/0caf5a57fb7d5c962d91b5d29cb400b2d3eae008/geoip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 10834, 24, 12, 2890, 16, 9205, 24, 1080, 4672, 3536, 5935, 326, 890, 16, 1059, 1087, 434, 279, 1087, 1706, 20279, 9092, 2359, 1758, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 10834, 24, 12, 2890, 16, 9205, 24, 1080, 4672, 3536, 5935, 326, 890, 16, 1059, 1087, 434, 279, 1087, 1706, 20279, 9092, 2359, 1758, 18, 2, -100, -100, -100, -100, -100, -100, -100,...
support.run_unittest(GeneralTests, ReadTests, OptionTests)
support.run_unittest(GeneralTests, ReadTests, WriteTests, OptionTests)
def test_main(verbose=None): support.run_unittest(GeneralTests, ReadTests, OptionTests)
f31f7bb1a7d217f5cb30643b34d09c6dd0719f32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/f31f7bb1a7d217f5cb30643b34d09c6dd0719f32/test_telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 2865, 18, 2681, 67, 4873, 3813, 12, 12580, 14650, 16, 2720, 14650, 16, 2598, 14650, 16, 2698, 14650, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 12, 11369, 33, 7036, 4672, 2865, 18, 2681, 67, 4873, 3813, 12, 12580, 14650, 16, 2720, 14650, 16, 2598, 14650, 16, 2698, 14650, 13, 225, 2, -100, -100, -100, -100, -100, ...
if (self.path.find("/nocachetime") != 0):
if not self._ShouldHandleRequest("/nocachetime"):
def NoCacheTimeHandler(self): """This request handler yields a page with the title set to the current system time, and no caching requested."""
fd57e3fda1b173b113442291fc77ddf1659615e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/fd57e3fda1b173b113442291fc77ddf1659615e2/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2631, 1649, 950, 1503, 12, 2890, 4672, 3536, 2503, 590, 1838, 16932, 279, 1363, 598, 326, 2077, 444, 358, 326, 783, 2619, 813, 16, 471, 1158, 11393, 3764, 12123, 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, 2631, 1649, 950, 1503, 12, 2890, 4672, 3536, 2503, 590, 1838, 16932, 279, 1363, 598, 326, 2077, 444, 358, 326, 783, 2619, 813, 16, 471, 1158, 11393, 3764, 12123, 2, -100, -100, -100, -10...
self.hs[1] = value
def SetHvalue(self,item,value): """Set a header value using the header arrays: SetHvalue("npts",2048) >>> t = ReadSac() >>> t.SetHvalue("kstnm","spiff") >>> t.GetHvalue('kstnm') 'spiff ' """ # # it's trivial to search each dictionary with the key and return # the value that matches the key # key = string.lower(item) # convert the item to lower case # if self.fdict.has_key(key): index = self.fdict[key] self.hf[index] = float(value) elif self.idict.has_key(key): index = self.idict[key] self.hi[index] = int(value) elif self.sdict.has_key(key): index = self.sdict[key] value = '%-8s' % value if index == 0: self.hs[0] = value #if vlen > 8: # vlen = 8 #for i in range(0,8): # self.hs[i] = ' ' #for i in range(0,vlen): # self.hs[i] = value[i] elif index == 1: #start = 8 #if vlen > 16: # vlen =16 #for i in range(0,16): # self.hs[i+start] = ' ' #for i in range(0,vlen): # self.hs[i+start] = value[i] self.hs[1] = value else: # # if you are here, then the index > 2 # #if vlen > 8: # vlen = 8 #start = 8 + index*8 #for i in range(0,8): # self.hs[i+start] = ' ' #for i in range(0,vlen): # self.hs[i+start] = value[i] self.hs[index+1] = value else: raise SacError("Cannot find header entry for: ",item)
c60b5985f00f6f6a2879988466a1f3125e536504 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/c60b5985f00f6f6a2879988466a1f3125e536504/sacio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 44, 1132, 12, 2890, 16, 1726, 16, 1132, 4672, 3536, 694, 279, 1446, 460, 1450, 326, 1446, 5352, 30, 1000, 44, 1132, 2932, 82, 1092, 3113, 21573, 28, 13, 4080, 268, 273, 2720, 55,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 44, 1132, 12, 2890, 16, 1726, 16, 1132, 4672, 3536, 694, 279, 1446, 460, 1450, 326, 1446, 5352, 30, 1000, 44, 1132, 2932, 82, 1092, 3113, 21573, 28, 13, 4080, 268, 273, 2720, 55,...
elif (line[i:i+2] == ".<") and not in_quote(): try: gen_end = line.index(">", i+2) except ValueError: i += 2 continue gen_begin = i while gen_begin > 0 and line[gen_begin-1] != ';': gen_begin -= 1 gen_obj = line[gen_begin:i].strip() gen_list = [s.strip() for s in line[i+2:gen_end].split(',')] for g in gen_list: if (not g.isalnum() and not g.replace("_","").isalnum()) or len(g) == 0 or not g[0].isalpha(): raise SyntaxError, "variable name (='%s') must be alpha-numeric and begin with a letter"%g gen_names = tuple(gen_list) gen_vars = ", ".join(gen_list) line_after = line[gen_end:] c = line_after.find(' if c==-1: c = len(line_after) s = line_after.find(';') if s==-1: s = len(line_after) c = min(c,s) + gen_end if line[:c].rstrip()[-1] == ']': c0 = line[:c].find(']') d0 = line[:c0].rfind('[') if c0 == -1: raise SyntaxError, 'constructor must end with ) or ]' in_square_brackets = line[d0+1:c0] if in_square_brackets.strip() == '': in_square_brackets = "'%s'" % gen_vars line_new = '%s%s%s; (%s,) = %s._first_ngens(%s)'%( line[:i] + line[gen_end+1:d0+1], in_square_brackets, line[c0:c], gen_vars, gen_obj, gen_vars.count(',')+1) else: c0 = line[:c].rfind(')') c1 = line[:c0].rfind('(') if len(line[c1+1:c0].strip()) > 0: sep = ',' else: sep = '' line_new = '%s%snames=%s); (%s,) = %s._first_ngens(%s)'%( line[:i] + line[gen_end+1:c0], sep, gen_names, gen_vars, gen_obj, gen_vars.count(',')+1) line = line_new + line[c:] i += 1 continue
elif not in_quote() and (line[i:i+2] == ".<"): line, i = parse_generators(line, i)
def wrap_num(i, line, is_real, num_start): zz = line[num_start:i] if is_real or '.' in zz: if zz[-1] == '.' and i < len(line) and line[i].isalpha(): # by popular demand -- this allows, e.g., 173.sqrt(). if '.' in zz[:-1]: O = "RealNumber('"; C="')." else: O = "Integer("; C = ")." zz = zz[:-1] else: O = "RealNumber('"; C="')" else: O = "Integer("; C = ")" line = line[:num_start] + O + zz + C + line[i:] return line, len(O+C)
4e766972e05435aba9fc627d0e54f0c8d574c5e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/4e766972e05435aba9fc627d0e54f0c8d574c5e5/preparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 2107, 12, 77, 16, 980, 16, 353, 67, 7688, 16, 818, 67, 1937, 4672, 11273, 273, 980, 63, 2107, 67, 1937, 30, 77, 65, 309, 353, 67, 7688, 578, 2611, 316, 11273, 30, 309, 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, 2193, 67, 2107, 12, 77, 16, 980, 16, 353, 67, 7688, 16, 818, 67, 1937, 4672, 11273, 273, 980, 63, 2107, 67, 1937, 30, 77, 65, 309, 353, 67, 7688, 578, 2611, 316, 11273, 30, 309, 11...
self.body.append(self.comment('depart_field_body'))
pass
def depart_field_body(self, node): self.body.append(self.comment('depart_field_body'))
33fb604531cb0884e8062b15ab6fc530c3335af8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5620/33fb604531cb0884e8062b15ab6fc530c3335af8/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1518, 67, 3432, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 12, 2890, 18, 3469, 2668, 323, 2680, 67, 1518, 67, 3432, 26112, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1518, 67, 3432, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 12, 2890, 18, 3469, 2668, 323, 2680, 67, 1518, 67, 3432, 26112, 2, -100, -100, -100, -100, -100, -100, -100...
sage: from sage.server.notebook.user import User sage: user = User('bob', 'Aisfa!!', 'bob@pizzaisyummy.net', 'admin') sage: user.password() 'aamxw5LCYcWY.'
EXAMPLES: sage: from sage.server.notebook.user import User sage: user = User('bob', 'Aisfa!!', 'bob@sagemath.net', 'admin') sage: user.password() 'aamxw5LCYcWY.'
def password(self): """ sage: from sage.server.notebook.user import User sage: user = User('bob', 'Aisfa!!', 'bob@pizzaisyummy.net', 'admin') sage: user.password() 'aamxw5LCYcWY.' """ return self.__password
b4fae7bbdbe844760b404d1afc5176789fd55346 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/b4fae7bbdbe844760b404d1afc5176789fd55346/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2201, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 410, 18, 3567, 18, 24422, 18, 1355, 1930, 2177, 272, 410, 30, 729, 273, 2177, 2668, 70, 947, 2187, 296, 37, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2201, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 410, 18, 3567, 18, 24422, 18, 1355, 1930, 2177, 272, 410, 30, 729, 273, 2177, 2668, 70, 947, 2187, 296, 37, ...
"""addChild(self, FSM) Add the given FSM to list of child FSMs"""
"""removeChild(self, FSM) Remove the given FSM from list of child FSMs"""
def removeChild(self, FSM): """addChild(self, FSM) Add the given FSM to list of child FSMs""" if FSM in self.__FSMList: self.__FSMList.remove(FSM)
ae1febeb5c821df1e582bd546df2303795b301cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/ae1febeb5c821df1e582bd546df2303795b301cf/State.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14213, 12, 2890, 16, 28908, 4672, 3536, 4479, 1763, 12, 2890, 16, 28908, 13, 3581, 326, 864, 28908, 628, 666, 434, 1151, 9247, 6947, 8395, 309, 28908, 316, 365, 16186, 4931, 49, 682, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14213, 12, 2890, 16, 28908, 4672, 3536, 4479, 1763, 12, 2890, 16, 28908, 13, 3581, 326, 864, 28908, 628, 666, 434, 1151, 9247, 6947, 8395, 309, 28908, 316, 365, 16186, 4931, 49, 682, 30,...
add(link(request, quotedname + '?action=diff', _('Show Changes', formatted=False)))
def editbar(self, d): """ Assemble the page edit bar.
a0585c91871df50359fe2e7f0176e911c0460579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/a0585c91871df50359fe2e7f0176e911c0460579/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 3215, 12, 2890, 16, 302, 4672, 3536, 2970, 10045, 326, 1363, 3874, 4653, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 3215, 12, 2890, 16, 302, 4672, 3536, 2970, 10045, 326, 1363, 3874, 4653, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.name, v)
(self.name, v))
def mergeNamespaces( self, namespace, argDict, auxVars ): sig = self.dt.meta().get(_SIG_META) if sig: #check the argument signature here if a <:compargs:> tag namespace.update(auxVars) for v in sig[_SIG_REQUIRED]: if not argDict.has_key(v) and not auxVars.has_key(v): raise SkunkStandardError, ( 'component %s: argument %s: expected but not passed' % self.name, v) elif argDict.has_key(v): namespace[v] = argDict[v] del argDict[v] #else: #in auxVars for arg in sig[_SIG_HAS_DEFAULT]: if argDict.has_key(arg): namespace[arg] = argDict[arg] del argDict[arg]
3b421c0096c0350913ba0f4c13805aa626af4330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/3b421c0096c0350913ba0f4c13805aa626af4330/Executables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 13180, 12, 365, 16, 1981, 16, 1501, 5014, 16, 9397, 5555, 262, 30, 3553, 273, 365, 18, 7510, 18, 3901, 7675, 588, 24899, 18513, 67, 19294, 13, 309, 3553, 30, 468, 1893, 326, 1237...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 13180, 12, 365, 16, 1981, 16, 1501, 5014, 16, 9397, 5555, 262, 30, 3553, 273, 365, 18, 7510, 18, 3901, 7675, 588, 24899, 18513, 67, 19294, 13, 309, 3553, 30, 468, 1893, 326, 1237...
return u'Extreme Management'
return self.site_title
def _get_project_title(self): project = self._get_project() if project is not None and project.title != '': return project.title else: return u'Extreme Management'
54c7cb16a992b83418805e184d9e167501a898c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10443/54c7cb16a992b83418805e184d9e167501a898c4/viewlets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4406, 67, 2649, 12, 2890, 4672, 1984, 273, 365, 6315, 588, 67, 4406, 1435, 309, 1984, 353, 486, 599, 471, 1984, 18, 2649, 480, 875, 30, 327, 1984, 18, 2649, 469, 30, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4406, 67, 2649, 12, 2890, 4672, 1984, 273, 365, 6315, 588, 67, 4406, 1435, 309, 1984, 353, 486, 599, 471, 1984, 18, 2649, 480, 875, 30, 327, 1984, 18, 2649, 469, 30, 32...
except ClushConfigError, e: print >>sys.stderr, "ERROR: %s" % e sys.exit(1)
def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % __version__) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="append", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="append", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="append", dest="group", help="run command on a group of nodes") optgrp.add_option("-X", action="append", dest="exgroup", help="exclude nodes from this group") parser.add_option_group(optgrp) # Output behaviour optgrp = optparse.OptionGroup(parser, "Output behaviour") optgrp.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") optgrp.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") optgrp.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") optgrp.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") optgrp.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") optgrp.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") parser.add_option_group(optgrp) # Copy optgrp = optparse.OptionGroup(parser, "File copying") optgrp.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") optgrp.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") optgrp.add_option("-p", action="store_true", dest="preserve_flag", help="preserve modification times and modes") parser.add_option_group(optgrp) # Ssh options optgrp = optparse.OptionGroup(parser, "Ssh options") optgrp.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") optgrp.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") optgrp.add_option("-o", "--options", action="store", dest="options", help="can be used to give ssh options") optgrp.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="float") optgrp.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="float") parser.add_option_group(optgrp) (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", options.fanout) if options.user: config.set_main("ssh_user", options.user) if options.options: config.set_main("ssh_options", options.options) if options.connect_timeout: config.set_main("connect_timeout", options.connect_timeout) if options.command_timeout: config.set_main("command_timeout", options.command_timeout) # # Compute the nodeset # if options.nodes: nodeset_base = NodeSet.fromlist(options.nodes) if options.exclude: nodeset_exclude = NodeSet.fromlist(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: for grp in options.group: command = config.get_nodes_group_command(grp) task.shell(command, key="group") if options.exgroup: for grp in options.exgroup: command = config.get_nodes_group_command(grp) task.shell(command, key="exgroup") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(['all', 'group']): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Adding nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) for buf, keys in task.iter_buffers(['exgroup']): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Excluding nodes from option %s: %s" % (','.join(keys), buf)) nodeset_exclude.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # stdin_isatty = sys.stdin.isatty() if stdin_isatty: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout()) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) # Set detailed timeout values connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) task.set_info("default_stderr", True) # Set timeout at worker level when command_timeout is defined. if command_timeout > 0: timeout = command_timeout else: timeout = -1 # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%.1f " \ "cmd=%.1f] %s" % (nodeset_base, task.info("fanout"), task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0, options.preserve_flag) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if stdin_isatty: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" clush_exit(1) rc = 0 if options.maxrc: # instead of clush return code, return commands retcode rc = task.max_retcode() if task.num_timeout() > 0: rc = 255 clush_exit(rc)
8d4826c99ac3e77899532cb1f0d53c5830ae09c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/8d4826c99ac3e77899532cb1f0d53c5830ae09c2/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 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, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
uri = split_property(property)[0]
uri = split_property(property, self.namespaces)[0]
def register_property(self, property): uri = split_property(property)[0] if not self.namespaces.has_key(uri): self.namespaceCount = self.namespaceCount + 1 prefix = "n%s" % self.namespaceCount self.namespaces[uri] = prefix
1313813332adaaa3197b56a7142c1558cf12f9f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7049/1313813332adaaa3197b56a7142c1558cf12f9f2/serializer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 4468, 12, 2890, 16, 1272, 4672, 2003, 273, 1416, 67, 4468, 12, 4468, 16, 365, 18, 16078, 25146, 20, 65, 309, 486, 365, 18, 16078, 18, 5332, 67, 856, 12, 1650, 4672, 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, 1744, 67, 4468, 12, 2890, 16, 1272, 4672, 2003, 273, 1416, 67, 4468, 12, 4468, 16, 365, 18, 16078, 25146, 20, 65, 309, 486, 365, 18, 16078, 18, 5332, 67, 856, 12, 1650, 4672, 365, 18...