rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if self.talkNamespacePattern.has_key(code): talk = self.talkNamespacePattern[code]
if self.talkNamespacePatterns.has_key(code): talk = self.talkNamespacePatterns[code]
def _talkNamespace(self, code, associatedNamespaceIndex): associatedNamespace = self.namespace(code, associatedNamespaceIndex) if self.talkNamespacePattern.has_key(code): talk = self.talkNamespacePattern[code] else: talk = self.talkNamespacePattern['_default'] return talk(associatedNamespace)
7f20001aefa656500ab3d04645613adc8cbb0d16 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/7f20001aefa656500ab3d04645613adc8cbb0d16/family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 88, 2960, 3402, 12, 2890, 16, 981, 16, 3627, 3402, 1016, 4672, 3627, 3402, 273, 365, 18, 4937, 12, 710, 16, 3627, 3402, 1016, 13, 309, 365, 18, 88, 2960, 3402, 11268, 18, 5332, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 88, 2960, 3402, 12, 2890, 16, 981, 16, 3627, 3402, 1016, 4672, 3627, 3402, 273, 365, 18, 4937, 12, 710, 16, 3627, 3402, 1016, 13, 309, 365, 18, 88, 2960, 3402, 11268, 18, 5332, ...
file.write("<?xml version='1.0' encoding='%s'?>\n" % encoding)
file.write(_encode("<?xml version='1.0' encoding='%s'?>\n" % encoding, encoding))
def write(self, file, encoding="us-ascii"): assert self._root is not None if not hasattr(file, "write"): file = open(file, "wb") if not encoding: encoding = "us-ascii" elif encoding != "utf-8" and encoding != "us-ascii": file.write("<?xml version='1.0' encoding='%s'?>\n" % encoding) self._write(file, self._root, encoding, {})
e4cfaf8f7bb5d21848fb232e3757979401720c1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/e4cfaf8f7bb5d21848fb232e3757979401720c1d/ElementTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 585, 16, 2688, 1546, 407, 17, 9184, 6, 4672, 1815, 365, 6315, 3085, 353, 486, 599, 309, 486, 3859, 12, 768, 16, 315, 2626, 6, 4672, 585, 273, 1696, 12, 768, 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, 1045, 12, 2890, 16, 585, 16, 2688, 1546, 407, 17, 9184, 6, 4672, 1815, 365, 6315, 3085, 353, 486, 599, 309, 486, 3859, 12, 768, 16, 315, 2626, 6, 4672, 585, 273, 1696, 12, 768, 16, ...
def create(self, cr, uid, vals, context=None): if (not vals.get('company_ids',[])): company_ids = self._get_companies(cr, uid, context=context) if company_ids and len(company_ids): vals['company_ids'] = [(6, 0, company_ids)] return super(users, self).create(cr, uid, vals, context=context)
def create(self, cr, uid, vals, context=None): if (not vals.get('company_ids',[])): company_ids = self._get_companies(cr, uid, context=context) if company_ids and len(company_ids): vals['company_ids'] = [(6, 0, company_ids)] return super(users, self).create(cr, uid, vals, context=context)
236e74c3964942f354ae00f5bea0883b4842693e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/236e74c3964942f354ae00f5bea0883b4842693e/res_user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 819, 33, 7036, 4672, 309, 261, 902, 5773, 18, 588, 2668, 16840, 67, 2232, 2187, 8526, 3719, 30, 9395, 67, 2232, 273, 365, 6315, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 819, 33, 7036, 4672, 309, 261, 902, 5773, 18, 588, 2668, 16840, 67, 2232, 2187, 8526, 3719, 30, 9395, 67, 2232, 273, 365, 6315, 588, ...
output = run_pip('search', 'pip', expect_error=True)
output = run_pip('search', 'pip')
def test_search(): """ End to end test of search command. """ reset_env() output = run_pip('search', 'pip', expect_error=True) assert 'pip installs packages' in output.stdout
b4b5a25752431f591201dd737ab67e8b1ea2a6d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12982/b4b5a25752431f591201dd737ab67e8b1ea2a6d6/test_search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3072, 13332, 3536, 4403, 358, 679, 1842, 434, 1623, 1296, 18, 225, 3536, 2715, 67, 3074, 1435, 876, 273, 1086, 67, 16104, 2668, 3072, 2187, 296, 16104, 6134, 1815, 296, 16104, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3072, 13332, 3536, 4403, 358, 679, 1842, 434, 1623, 1296, 18, 225, 3536, 2715, 67, 3074, 1435, 876, 273, 1086, 67, 16104, 2668, 3072, 2187, 296, 16104, 6134, 1815, 296, 16104, ...
load_kvm_modules(self.userspace_srcdir)
load_kvm_modules(module_dir=self.userspace_srcdir, extra_modules=self.extra_modules)
def __load_modules(self): if self.kmod_srcdir: load_kvm_modules(self.kmod_srcdir) else: load_kvm_modules(self.userspace_srcdir)
ded2f2870602ded49e8aa3d2370d632cd56ed3ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/ded2f2870602ded49e8aa3d2370d632cd56ed3ad/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 945, 67, 6400, 12, 2890, 4672, 309, 365, 18, 79, 1711, 67, 4816, 1214, 30, 1262, 67, 79, 3489, 67, 6400, 12, 2890, 18, 79, 1711, 67, 4816, 1214, 13, 469, 30, 1262, 67, 79, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 945, 67, 6400, 12, 2890, 4672, 309, 365, 18, 79, 1711, 67, 4816, 1214, 30, 1262, 67, 79, 3489, 67, 6400, 12, 2890, 18, 79, 1711, 67, 4816, 1214, 13, 469, 30, 1262, 67, 79, 34...
self.lbOperatorsS = QListBox(None, 'SelAttr') self.operatorStack.addWidget(self.lbOperatorsS, orange.VarTypes.String)
self.lbOperatorsS = QListBox(boxOper, 'SelAttr') self.lbOperatorsS.hide()
def __init__(self, parent = None, signalManager = None, name = "Select data"): OWWidget.__init__(self, parent, signalManager, name) #initialize base class
6fb737c53ad3d8d35c510b65dfcd422e0ebe49cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/6fb737c53ad3d8d35c510b65dfcd422e0ebe49cc/OWSelectData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 273, 599, 16, 4277, 1318, 273, 599, 16, 508, 273, 315, 3391, 501, 6, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 273, 599, 16, 4277, 1318, 273, 599, 16, 508, 273, 315, 3391, 501, 6, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 5...
cvs_command = 'cvs history -x AMR -a -D "' + cvs_date + '"' self.run_and_log(cvs_command, 'cvshistory', 'Getting CVS history') hf = open(self.working_dir + '/' + cvshistory, 'r')
hf = open(self.working_dir + '/cvshistory', 'r')
def report(self): header = """StreamIt Regression Test Summary
6f7d3c3ee19514d16a2229dd7d3ce4aa65d57f56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12935/6f7d3c3ee19514d16a2229dd7d3ce4aa65d57f56/run-reg-tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 4672, 1446, 273, 3536, 1228, 7193, 868, 2329, 285, 7766, 17967, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2605, 12, 2890, 4672, 1446, 273, 3536, 1228, 7193, 868, 2329, 285, 7766, 17967, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
keys = self.d.keys() keys.sort()
keys = sorted(self.d.keys())
def test_keyordering(self): if self.openmethod[0] is not bsddb.btopen: return keys = self.d.keys() keys.sort() self.assertEqual(self.f.first()[0], keys[0]) self.assertEqual(self.f.next()[0], keys[1]) self.assertEqual(self.f.last()[0], keys[-1]) self.assertEqual(self.f.previous()[0], keys[-2]) self.assertEqual(list(self.f), keys)
74f5f86ea8badd04c2128f950cf7eaa8ac99ad73 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/74f5f86ea8badd04c2128f950cf7eaa8ac99ad73/test_bsddb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 856, 22598, 12, 2890, 4672, 309, 365, 18, 3190, 2039, 63, 20, 65, 353, 486, 7081, 449, 70, 18, 23602, 3190, 30, 327, 1311, 273, 3115, 12, 2890, 18, 72, 18, 2452, 10756, 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, 1842, 67, 856, 22598, 12, 2890, 4672, 309, 365, 18, 3190, 2039, 63, 20, 65, 353, 486, 7081, 449, 70, 18, 23602, 3190, 30, 327, 1311, 273, 3115, 12, 2890, 18, 72, 18, 2452, 10756, 365...
packageIds = self._sortPackages1(packages.keys(), packages)
packageIds = self._sortPackages(packages.keys(), packages)
def _optimizePackages(self, packages, parts, variants, minPackageSize, minPackageSizeForUnshared): # Support for merging small packages # The first common package before the selected package between two # or more parts is allowed to merge with. As the package which should be merged # may have requirements, these must be solved. The easiest way to be sure regarding # this issue, is to look out for another common package.
b1dd5c93f0d75604db233288a90b120bcf0450ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/b1dd5c93f0d75604db233288a90b120bcf0450ed/PartBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 11425, 12, 2890, 16, 5907, 16, 2140, 16, 12935, 16, 1131, 2261, 1225, 16, 1131, 2261, 1225, 1290, 984, 11574, 4672, 468, 13619, 364, 17256, 5264, 5907, 468, 1021, 1122, 2975, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29155, 11425, 12, 2890, 16, 5907, 16, 2140, 16, 12935, 16, 1131, 2261, 1225, 16, 1131, 2261, 1225, 1290, 984, 11574, 4672, 468, 13619, 364, 17256, 5264, 5907, 468, 1021, 1122, 2975, ...
print "WARNING: SQLite does not support adding unique constraints. Ignored."
print " ! WARNING: SQLite does not support adding unique constraints. Ignored."
def create_unique(self, table_name, columns): """ Not supported under SQLite. """ print "WARNING: SQLite does not support adding unique constraints. Ignored."
9ac2fbab57c1645782a26d67b4a29cf5e9a9f5b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/9ac2fbab57c1645782a26d67b4a29cf5e9a9f5b7/sqlite3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6270, 12, 2890, 16, 1014, 67, 529, 16, 2168, 4672, 3536, 2288, 3260, 3613, 16192, 18, 3536, 1172, 315, 282, 401, 9744, 30, 16192, 1552, 486, 2865, 6534, 3089, 6237, 18, 8049, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 67, 6270, 12, 2890, 16, 1014, 67, 529, 16, 2168, 4672, 3536, 2288, 3260, 3613, 16192, 18, 3536, 1172, 315, 282, 401, 9744, 30, 16192, 1552, 486, 2865, 6534, 3089, 6237, 18, 8049, ...
objRef = ContainerRef(Indirection(evalStr=key))
objRef = ContainerRef(Indirection(evalStr='%s' % key))
def run(self): try: while True: # yield up here instead of at the end, since we skip back to the # top of the while loop from various points yield None #import pdb;pdb.set_trace() curObj = None if self._curObjRef is None: self._curObjRef = self._baseObjRef try: for result in self._curObjRef.getContainer(): yield None curObj = result except: self.notify.debug('lost current container: %s' % self._curObjRef) # that container is gone, try again self._curObjRef = None continue self.notify.debug('--> %s' % self._curObjRef)
2144050758ff193ad2f7bd973df523fae0d7fd5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/2144050758ff193ad2f7bd973df523fae0d7fd5c/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 468, 2824, 731, 2674, 3560, 434, 622, 326, 679, 16, 3241, 732, 2488, 1473, 358, 326, 468, 1760, 434, 326, 1323, 2798, 628, 11191, 3143, 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, 1086, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 468, 2824, 731, 2674, 3560, 434, 622, 326, 679, 16, 3241, 732, 2488, 1473, 358, 326, 468, 1760, 434, 326, 1323, 2798, 628, 11191, 3143, 2...
"""Return an MSYS translation of an absolute Windows path"""
"""Return an MSYS translation of an absolute Windows path Spaces in the path are escaped. """
def windows_to_msys(self, path): """Return an MSYS translation of an absolute Windows path""" msys_root = self.msys_root mingw_root = self.mingw_root path_lower = path.lower() if path_lower.startswith(msys_root.lower()): return '/usr' + path[len(msys_root):].replace(os.sep, '/') if mingw_root is not None and path_lower.startswith(mingw_root.lower()): return '/mingw' + path[len(mingw_root):].replace(os.sep, '/') drive, tail = os.path.splitdrive(path) return '/%s%s' % (drive[0], tail.replace(os.sep, '/'))
8e0ba62ed71dd2154caecbb41bbc43592279bf8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/8e0ba62ed71dd2154caecbb41bbc43592279bf8d/msys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9965, 67, 869, 67, 959, 1900, 12, 2890, 16, 589, 4672, 3536, 990, 392, 490, 30664, 4794, 434, 392, 4967, 8202, 589, 225, 348, 4996, 316, 326, 589, 854, 8345, 18, 3536, 225, 4086, 1900,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9965, 67, 869, 67, 959, 1900, 12, 2890, 16, 589, 4672, 3536, 990, 392, 490, 30664, 4794, 434, 392, 4967, 8202, 589, 225, 348, 4996, 316, 326, 589, 854, 8345, 18, 3536, 225, 4086, 1900,...
def testUndecodable(self):
def testUnencodable(self):
def testUndecodable(self): filename = support.TESTFN_UNENCODABLE + ".zip" z = ZipFile(filename, "w") zinfo = ZipInfo(TESTMOD + ".py", time.localtime(NOW)) zinfo.compress_type = self.compression z.writestr(zinfo, test_src) z.close() try: zipimport.zipimporter(filename) finally: os.remove(filename)
6e0f3691a550b8a017826fa82f0f376b23db551c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/6e0f3691a550b8a017826fa82f0f376b23db551c/test_zipimport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 984, 1331, 369, 429, 12, 2890, 4672, 1544, 273, 2865, 18, 16961, 19793, 67, 2124, 1157, 9086, 2782, 397, 3552, 4450, 6, 998, 273, 18364, 12, 3459, 16, 315, 91, 7923, 998, 1376, 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, 1842, 984, 1331, 369, 429, 12, 2890, 4672, 1544, 273, 2865, 18, 16961, 19793, 67, 2124, 1157, 9086, 2782, 397, 3552, 4450, 6, 998, 273, 18364, 12, 3459, 16, 315, 91, 7923, 998, 1376, 2...
self.add_links(link)
self.add_links(list)
def start(self): """ starts the machine """ if len(argv) > 1: shortOptions = 'pu:l:' longOptions = ['print', 'url=', 'list=']
2ec98183a8fc44e2f2da62a5e820d61250b66489 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/2ec98183a8fc44e2f2da62a5e820d61250b66489/pyLoadCore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3536, 2542, 326, 5228, 3536, 309, 562, 12, 19485, 13, 405, 404, 30, 3025, 1320, 273, 296, 11938, 30, 80, 2497, 1525, 1320, 273, 10228, 1188, 2187, 296, 718, 33, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3536, 2542, 326, 5228, 3536, 309, 562, 12, 19485, 13, 405, 404, 30, 3025, 1320, 273, 296, 11938, 30, 80, 2497, 1525, 1320, 273, 10228, 1188, 2187, 296, 718, 33, 21...
if not self.controlFrame.Show(True): self.controlFrame.Raise() if not self.threedFrame.Show(True): self.threedFrame.Raise()
self.controlFrame.Show(True) self.controlFrame.Raise() self.threedFrame.Show(True) self.threedFrame.Raise()
def view(self): if not self.controlFrame.Show(True): self.controlFrame.Raise()
b8328cfabac64b753f68b5285e65c5f7390b10e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/b8328cfabac64b753f68b5285e65c5f7390b10e3/slice3dVWR.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 2890, 4672, 309, 486, 365, 18, 7098, 3219, 18, 5706, 12, 5510, 4672, 365, 18, 7098, 3219, 18, 30570, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 2890, 4672, 309, 486, 365, 18, 7098, 3219, 18, 5706, 12, 5510, 4672, 365, 18, 7098, 3219, 18, 30570, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.msgText("Grow Display!\n")
if (self.debugLevel >= HighDebug) : self.msgText("Grow Display!\n")
def whenShrinkButtonClicked(self, event): if (self.shrinkGrow == True) : self.msgText("Shrink Display!\n") # add text self.speedPane.setVisible(False) self.shrinkGrow = False self.fullScrollRows = self.scrollArea.getRows() self.scrollArea.setRows(self.fullScrollRows / 2) self.scriptFrame.pack() else : self.msgText("Grow Display!\n") self.speedPane.setVisible(True) self.shrinkGrow = True self.scrollArea.setRows(self.fullScrollRows) self.scriptFrame.pack() return
637586c522dc4614e3aa55f7046de00d6eaa8ae0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1660/637586c522dc4614e3aa55f7046de00d6eaa8ae0/RobotThrottle2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1347, 28747, 3616, 27633, 12, 2890, 16, 871, 4672, 309, 261, 2890, 18, 674, 12334, 30948, 422, 1053, 13, 294, 365, 18, 3576, 1528, 2932, 28747, 9311, 24440, 82, 7923, 377, 468, 527, 977,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1347, 28747, 3616, 27633, 12, 2890, 16, 871, 4672, 309, 261, 2890, 18, 674, 12334, 30948, 422, 1053, 13, 294, 365, 18, 3576, 1528, 2932, 28747, 9311, 24440, 82, 7923, 377, 468, 527, 977,...
spec['packages'].append(m.group())
pkgs.add(m.group()) spec['packages'] = list(pkgs)
def write_spec_depend(egg_info): """ egg_info is the path to the EGG-INFO directory """ from enstaller.indexed_repo.metadata import data_from_spec pkg_info = open(os.path.join(egg_info, 'PKG-INFO')).read() spec = {'build': 1, 'arch':None, 'platform':None, 'osdist':None, 'python': '%i.%i' % sys.version_info[:2], 'packages': [] } for var in ['name', 'version']: pat = re.compile(r'^%s:\s*(\S+)' % var, re.M | re.I) spec[var] = pat.search(pkg_info).group(1) requires_txt = os.path.join(egg_info, 'requires.txt') pat = re.compile(r'[\w\-.]+') if os.path.isfile(requires_txt): for line in open(requires_txt): m = pat.match(line.strip()) if m: spec['packages'].append(m.group()) spec_dir = os.path.join(egg_info, 'spec') if not os.path.isdir(spec_dir): log.info("creating dir %r" % spec_dir) os.mkdir(spec_dir) path = os.path.join(spec_dir, 'depend') log.info("writing %r" % path) fo = open(path, 'w') fo.write(data_from_spec(spec)) fo.close()
d226366c693e47079be71071affa734171f2588a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7707/d226366c693e47079be71071affa734171f2588a/bdist_egg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2793, 67, 5817, 12, 23171, 67, 1376, 4672, 3536, 25144, 67, 1376, 353, 326, 589, 358, 326, 512, 19491, 17, 5923, 1867, 3536, 628, 570, 3429, 264, 18, 19626, 67, 7422, 18, 416...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2793, 67, 5817, 12, 23171, 67, 1376, 4672, 3536, 25144, 67, 1376, 353, 326, 589, 358, 326, 512, 19491, 17, 5923, 1867, 3536, 628, 570, 3429, 264, 18, 19626, 67, 7422, 18, 416...
self.layer.texture_mode_set(1, color)
self.layer.texture_mode_set(1, color)
def color_cb(self, color, type): #if color[0] == 1.0 and color[1] == 1.0 \ # and color[2] == 1.0 and color[3] == 1.0: # pass #else: if self.updating: return if color[3] != 1.0: self.layer.blend_mode_set(RL_BLEND_FILTER) self.layer.texture_mode_set(1, color)
0a9f3291528240d019f1755ce071bd15e36e112d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11090/0a9f3291528240d019f1755ce071bd15e36e112d/gvrasterpropdlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2036, 67, 7358, 12, 2890, 16, 2036, 16, 618, 4672, 468, 430, 2036, 63, 20, 65, 422, 404, 18, 20, 471, 2036, 63, 21, 65, 422, 404, 18, 20, 521, 468, 282, 471, 2036, 63, 22, 65, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2036, 67, 7358, 12, 2890, 16, 2036, 16, 618, 4672, 468, 430, 2036, 63, 20, 65, 422, 404, 18, 20, 471, 2036, 63, 21, 65, 422, 404, 18, 20, 521, 468, 282, 471, 2036, 63, 22, 65, 42...
localpart = None domain = '' try: at = string.rindex(addr, '@') localpart = addr[:at] domain = addr[at:] except ValueError: localpart = addr pat = re.compile(r'([<>()\[\]\\,;:@\"\001-\037\177])') return '<%s%s>' % (pat.sub(r'\\\1', localpart), domain)
else: return "<%s>" % m
def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Technically, only a <mailbox> is allowed. In addition, email addresses without a domain are permitted. Addresses will not be modified if they are already quoted (actually if they begin with '<' and end with '>'.""" if re.match('(?s)\A<.*>\Z', addr): return addr localpart = None domain = '' try: at = string.rindex(addr, '@') localpart = addr[:at] domain = addr[at:] except ValueError: localpart = addr pat = re.compile(r'([<>()\[\]\\,;:@\"\001-\037\177])') return '<%s%s>' % (pat.sub(r'\\\1', localpart), domain)
2fa5f60664065d7f143e96d9f7ecc34ac6c401ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2fa5f60664065d7f143e96d9f7ecc34ac6c401ed/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4914, 684, 3069, 12, 4793, 4672, 3536, 10257, 279, 7931, 434, 326, 2699, 6138, 2553, 635, 8372, 1725, 5340, 18, 225, 30960, 6478, 16, 1338, 279, 411, 4408, 2147, 34, 353, 2935, 18, 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, 4914, 684, 3069, 12, 4793, 4672, 3536, 10257, 279, 7931, 434, 326, 2699, 6138, 2553, 635, 8372, 1725, 5340, 18, 225, 30960, 6478, 16, 1338, 279, 411, 4408, 2147, 34, 353, 2935, 18, 225, ...
if not tag in self.acceptable_elements:
acceptable_attributes = self.acceptable_attributes keymap = {} if not tag in self.acceptable_elements or self.svgOK:
def unknown_starttag(self, tag, attrs): if not tag in self.acceptable_elements: if tag in self.unacceptable_elements_with_end_tag: self.unacceptablestack += 1 return attrs = self.normalize_attrs(attrs) attrs = [(key, value) for key, value in attrs if key in self.acceptable_attributes] _BaseHTMLProcessor.unknown_starttag(self, tag, attrs)
44482af2baebba8741223b8967e4efeaf8365c45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/44482af2baebba8741223b8967e4efeaf8365c45/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5917, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 14206, 67, 4350, 273, 365, 18, 9436, 429, 67, 4350, 498, 1458, 273, 2618, 309, 486, 1047, 316, 365, 18, 9436, 429, 67, 6274, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5917, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 14206, 67, 4350, 273, 365, 18, 9436, 429, 67, 4350, 498, 1458, 273, 2618, 309, 486, 1047, 316, 365, 18, 9436, 429, 67, 6274, ...
'dists': self.distribution.dists,
'dist': self.distribution.dist,
def init(self): # Create directory structure paths = [self.path] paths += [os.path.join(self.path) for path in ['aptcache', 'result', 'build', 'hook']]
1f2a975124bada70b6ddc6afbb8c8151550d9f90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13693/1f2a975124bada70b6ddc6afbb8c8151550d9f90/pbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 468, 1788, 1867, 3695, 2953, 273, 306, 2890, 18, 803, 65, 2953, 1011, 306, 538, 18, 803, 18, 5701, 12, 2890, 18, 803, 13, 364, 589, 316, 10228, 1657, 2493, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1208, 12, 2890, 4672, 468, 1788, 1867, 3695, 2953, 273, 306, 2890, 18, 803, 65, 2953, 1011, 306, 538, 18, 803, 18, 5701, 12, 2890, 18, 803, 13, 364, 589, 316, 10228, 1657, 2493, 2187, ...
parts = node['parts']
def latex_visit_inheritance_diagram(self, node): """ Output the graph for LaTeX. This will insert a PDF. """ graph = node['graph'] parts = node['parts'] graph_hash = get_graph_hash(node) name = 'inheritance%s' % graph_hash dotcode = graph.generate_dot(name, parts, env=self.builder.env, graph_attrs={'size': '"6.0,6.0"'}) render_dot_latex(self, node, dotcode, [], 'inheritance') raise nodes.SkipNode
c27cf37aa3413c1706ea1f344972d60ea1f8fe98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/c27cf37aa3413c1706ea1f344972d60ea1f8fe98/inheritance_diagram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25079, 67, 11658, 67, 6018, 1359, 67, 12264, 1940, 12, 2890, 16, 756, 4672, 3536, 3633, 326, 2667, 364, 21072, 21575, 60, 18, 225, 1220, 903, 2243, 279, 12667, 18, 3536, 2667, 273, 756, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25079, 67, 11658, 67, 6018, 1359, 67, 12264, 1940, 12, 2890, 16, 756, 4672, 3536, 3633, 326, 2667, 364, 21072, 21575, 60, 18, 225, 1220, 903, 2243, 279, 12667, 18, 3536, 2667, 273, 756, ...
if local_patch: patch_checker = PatchChecker(patch=local_patch) elif id: patch_checker = PatchChecker(patchwork_id=id)
ignore_file_list = ['common.py'] if full_check: for root, dirs, files in os.walk('.'): if not '.svn' in root: for file in files: if file not in ignore_file_list: path = os.path.join(root, file) file_checker = FileChecker(path, confirm=confirm) file_checker.report()
def check(self): self.vcs.apply_patch(self.patch) self._check_files_modified_patch()
1e6d79b59c5d2f2d575968a6350c0b4097c6d380 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/1e6d79b59c5d2f2d575968a6350c0b4097c6d380/check_patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 365, 18, 18982, 18, 9010, 67, 2272, 12, 2890, 18, 2272, 13, 365, 6315, 1893, 67, 2354, 67, 7342, 67, 2272, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 365, 18, 18982, 18, 9010, 67, 2272, 12, 2890, 18, 2272, 13, 365, 6315, 1893, 67, 2354, 67, 7342, 67, 2272, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
os.path.join(execdir, 'doc'), '/usr/doc/python-docs-' + split(sys.version)[0], '/usr/doc/python-' + split(sys.version)[0], '/usr/doc/python-docs-' + sys.version[:3], '/usr/doc/python-' + sys.version[:3], os.path.join(sys.prefix, 'Resources/English.lproj/Documentation')]: if dir and os.path.isdir(os.path.join(dir, 'lib')):
join(execdir, 'doc'), join(sys.prefix, 'doc/python-docs-' + split(sys.version)[0]), join(sys.prefix, 'doc/python-' + split(sys.version)[0]), join(sys.prefix, 'doc/python-docs-' + sys.version[:3]), join(sys.prefix, 'doc/python-' + sys.version[:3]), join(sys.prefix, 'Resources/English.lproj/Documentation')]: if dir and os.path.isdir(join(dir, 'lib')):
def __init__(self, input, output): self.input = input self.output = output self.docdir = None execdir = os.path.dirname(sys.executable) homedir = os.environ.get('PYTHONHOME') for dir in [os.environ.get('PYTHONDOCS'), homedir and os.path.join(homedir, 'doc'), os.path.join(execdir, 'doc'), '/usr/doc/python-docs-' + split(sys.version)[0], '/usr/doc/python-' + split(sys.version)[0], '/usr/doc/python-docs-' + sys.version[:3], '/usr/doc/python-' + sys.version[:3], os.path.join(sys.prefix, 'Resources/English.lproj/Documentation')]: if dir and os.path.isdir(os.path.join(dir, 'lib')): self.docdir = dir
117a05ed502dc292a2e8ee5ff8c4cded55af1c61 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/117a05ed502dc292a2e8ee5ff8c4cded55af1c61/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 810, 16, 876, 4672, 365, 18, 2630, 273, 810, 365, 18, 2844, 273, 876, 365, 18, 2434, 1214, 273, 599, 1196, 1214, 273, 1140, 18, 803, 18, 12287, 12, 949...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 810, 16, 876, 4672, 365, 18, 2630, 273, 810, 365, 18, 2844, 273, 876, 365, 18, 2434, 1214, 273, 599, 1196, 1214, 273, 1140, 18, 803, 18, 12287, 12, 949...
except IOError, exn: self.SetReadOnly(False) print exn else:
def LoadFile(self, path): self.SetReadOnly(True) try: with (yield async_call(open, path)) as f: text = (yield async_call(f.read)) except IOError, exn: self.SetReadOnly(False) print exn else: try: text = text.decode("utf-8") except UnicodeDecodeError: text = text.decode("iso-8859-1") self.SetReadOnly(False) self.SetSyntaxFromFilename(path) self.SetText(text) self.EmptyUndoBuffer() self.SetSavePoint() self.path = path
f1375edc4117a439b8705c4696ed690045001d09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11441/f1375edc4117a439b8705c4696ed690045001d09/editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 812, 12, 2890, 16, 589, 4672, 365, 18, 694, 12066, 12, 5510, 13, 775, 30, 598, 261, 23604, 4326, 67, 1991, 12, 3190, 16, 589, 3719, 487, 284, 30, 977, 273, 261, 23604, 4326, 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, 4444, 812, 12, 2890, 16, 589, 4672, 365, 18, 694, 12066, 12, 5510, 13, 775, 30, 598, 261, 23604, 4326, 67, 1991, 12, 3190, 16, 589, 3719, 487, 284, 30, 977, 273, 261, 23604, 4326, 67...
if self.variants:
if self.variants and len(self.variants) > 1:
def actions(self): """ return a list of possible actions on this item. """ items = [ (self.play, 'Play'), ] if not self.filename or self.filename == '0': if self.mode == 'dvd': if plugin.getbyname(plugin.DVD_PLAYER): items = [ (self.play, 'Play DVD'), ( self.dvd_vcd_title_menu, 'DVD title list' ) ] else: items = [ ( self.dvd_vcd_title_menu, 'DVD title list' ), (self.play, 'Play default track') ] elif self.mode == 'vcd': if plugin.getbyname(plugin.VCD_PLAYER): items = [ (self.play, 'Play VCD'), ( self.dvd_vcd_title_menu, 'VCD title list' ) ] else: items = [ ( self.dvd_vcd_title_menu, 'VCD title list' ), (self.play, 'Play default track') ]
f2ca7d732da8095c881be791e7fb3d4ffab6392f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f2ca7d732da8095c881be791e7fb3d4ffab6392f/videoitem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4209, 12, 2890, 4672, 3536, 327, 279, 666, 434, 3323, 4209, 603, 333, 761, 18, 3536, 1516, 273, 306, 261, 2890, 18, 1601, 16, 296, 11765, 19899, 308, 309, 486, 365, 18, 3459, 578, 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, 4209, 12, 2890, 4672, 3536, 327, 279, 666, 434, 3323, 4209, 603, 333, 761, 18, 3536, 1516, 273, 306, 261, 2890, 18, 1601, 16, 296, 11765, 19899, 308, 309, 486, 365, 18, 3459, 578, 365,...
logging.exception("child process failed") ename = tmp + "/debug/error-%d" % (os.getpid()) pickle.dump(detail, open(ename, "w")) sys.stdout.flush() sys.stderr.flush()
try: logging.exception("child process failed") finally: ename = tmp + "/debug/error-%d" % (os.getpid()) pickle.dump(detail, open(ename, "w")) sys.stdout.flush() sys.stderr.flush()
def fork_start(tmp, l): sys.stdout.flush() sys.stderr.flush() pid = os.fork() if pid: # Parent return pid try: try: l() except error.AutotestError: raise except Exception, e: raise error.UnhandledTestError(e) except Exception, detail: try: logging.exception("child process failed") ename = tmp + "/debug/error-%d" % (os.getpid()) pickle.dump(detail, open(ename, "w")) sys.stdout.flush() sys.stderr.flush() finally: os._exit(1) else: try: sys.stdout.flush() sys.stderr.flush() finally: os._exit(0)
951d6f8b38b8c12e4fe622b2e4997365874d6035 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/951d6f8b38b8c12e4fe622b2e4997365874d6035/parallel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12515, 67, 1937, 12, 5645, 16, 328, 4672, 2589, 18, 10283, 18, 11330, 1435, 2589, 18, 11241, 18, 11330, 1435, 4231, 273, 1140, 18, 23335, 1435, 309, 4231, 30, 468, 9520, 327, 4231, 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, 12515, 67, 1937, 12, 5645, 16, 328, 4672, 2589, 18, 10283, 18, 11330, 1435, 2589, 18, 11241, 18, 11330, 1435, 4231, 273, 1140, 18, 23335, 1435, 309, 4231, 30, 468, 9520, 327, 4231, 225, ...
def open(self, url, new=0):
def open(self, url, new=0, autoraise=1):
def open(self, url, new=0): ic.launchurl(url)
b7ffb9a70f49248e84f8788911fa8bb94f4777f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b7ffb9a70f49248e84f8788911fa8bb94f4777f8/webbrowser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 880, 16, 394, 33, 20, 16, 2059, 10610, 784, 33, 21, 4672, 13579, 18, 20738, 718, 12, 718, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1696, 12, 2890, 16, 880, 16, 394, 33, 20, 16, 2059, 10610, 784, 33, 21, 4672, 13579, 18, 20738, 718, 12, 718, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if pkt.payload.flags & 0x13 != 0x02: raise TypeError("Not a syn packet")
db = p0f_selectdb(pkt.payload.flags)
def packet2p0f(pkt): while pkt.haslayer(IP) and pkt.haslayer(TCP): pkt = pkt.getlayer(IP) if isinstance(pkt.payload, TCP): break pkt = pkt.payload if not isinstance(pkt, IP) or not isinstance(pkt.payload, TCP): raise TypeError("Not a TCP/IP packet") if pkt.payload.flags & 0x13 != 0x02: #S,!A,!F raise TypeError("Not a syn packet") #t = p0f_kdb.ttl_range[:] #t += [pkt.ttl] #t.sort() #ttl=t[t.index(pkt.ttl)+1] ttl = pkt.ttl df = (pkt.flags & 2) / 2 ss = len(pkt) # from p0f/config.h : PACKET_BIG = 100 if ss > 100: ss = 0 ooo = "" mss = -1 qqT = False qqP = False #qqBroken = False ilen = (pkt[TCP].dataofs << 2) - 20 # from p0f.c for option in pkt.payload.options: ilen -= 1 if option[0] == "MSS": ooo += "M" + str(option[1]) + "," mss = option[1] # FIXME: qqBroken ilen -= 3 elif option[0] == "WScale": ooo += "W" + str(option[1]) + "," # FIXME: qqBroken ilen -= 2 elif option[0] == "Timestamp": if option[1][0] == 0: ooo += "T0," else: ooo += "T," if option[1][1] != 0: qqT = True ilen -= 9 elif option[0] == "SAckOK": ooo += "S," ilen -= 1 elif option[0] == "NOP": ooo += "N," elif option[0] == "EOL": ooo += "E," if ilen > 0: qqP = True else: ooo += "?," # FIXME: ilen ooo = ooo[:-1] if ooo == "": ooo = "." win = pkt.payload.window if mss != -1: if win % mss == 0: win = "S" + str(win/mss) elif win % (mss + 40) == 0: win = "T" + str(win/(mss+40)) win = str(win) qq = "" if qqP: qq += "P" if pkt[IP].id == 0: qq += "Z" if pkt[IP].options != '': qq += "I" if pkt[TCP].urgptr != 0: qq += "U" if pkt[TCP].reserved != 0: qq += "X" if pkt[TCP].ack != 0: qq += "A" if qqT: qq += "T" if pkt[TCP].flags & 40 != 0: # U or P qq += "F" if not isinstance(pkt[TCP].payload, NoPayload): qq += "D" # FIXME : "!" - broken options segment if qq == "": qq = "." return (win, ttl, df, ss, ooo, qq)
bebe0596dd5f92720a86c6f3fa23aaf4b1bbc984 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7311/bebe0596dd5f92720a86c6f3fa23aaf4b1bbc984/p0f.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4414, 22, 84, 20, 74, 12, 5465, 88, 4672, 1323, 11536, 18, 5332, 6363, 12, 2579, 13, 471, 11536, 18, 5332, 6363, 12, 13891, 4672, 11536, 273, 11536, 18, 588, 6363, 12, 2579, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4414, 22, 84, 20, 74, 12, 5465, 88, 4672, 1323, 11536, 18, 5332, 6363, 12, 2579, 13, 471, 11536, 18, 5332, 6363, 12, 13891, 4672, 11536, 273, 11536, 18, 588, 6363, 12, 2579, 13, 309, ...
datetime_value = datetime.datetime.fromordinal(integerPart + _ordinal_1899_12_31)
datetime_value = datetime.datetime.fromordinal(day_count + _ordinal_1899_12_31)
def datetimeFromCOMDate(comDate): fComDate = float(comDate) integerPart = int(fComDate) fraction_of_day = abs(fComDate-integerPart) datetime_value = datetime.datetime.fromordinal(integerPart + _ordinal_1899_12_31) # 86400000 = 24*60*60*1000 = milliseconds per day datetime_value = datetime_value + datetime.timedelta(milliseconds=fraction_of_day*86400000) return datetime_value
59f15f5710dd451b33216701b567320d565acaf4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/59f15f5710dd451b33216701b567320d565acaf4/adodb_django.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3314, 1265, 4208, 1626, 12, 832, 1626, 4672, 284, 799, 1626, 273, 1431, 12, 832, 1626, 13, 3571, 1988, 273, 509, 12, 74, 799, 1626, 13, 8330, 67, 792, 67, 2881, 273, 2417, 12, 74, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3314, 1265, 4208, 1626, 12, 832, 1626, 4672, 284, 799, 1626, 273, 1431, 12, 832, 1626, 13, 3571, 1988, 273, 509, 12, 74, 799, 1626, 13, 8330, 67, 792, 67, 2881, 273, 2417, 12, 74, 79...
g1['answers'].append([qname, qtype, 1, lr[1], lr[0]])
g1['answers'].append([g1['questions'][0][0], qtype, 1, lr[1], lr[0]])
def hip_cache_lookup(gp, g1): lr = None qname = g1['questions'][0][0] qtype = g1['questions'][0][1]
b110f03bfd90a3506ff3e2ed821f1c19b9aabf16 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6933/b110f03bfd90a3506ff3e2ed821f1c19b9aabf16/dnsproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 625, 67, 2493, 67, 8664, 12, 6403, 16, 314, 21, 4672, 12226, 273, 599, 12621, 273, 314, 21, 3292, 9758, 3546, 63, 20, 6362, 20, 65, 28056, 273, 314, 21, 3292, 9758, 3546, 63, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 625, 67, 2493, 67, 8664, 12, 6403, 16, 314, 21, 4672, 12226, 273, 599, 12621, 273, 314, 21, 3292, 9758, 3546, 63, 20, 6362, 20, 65, 28056, 273, 314, 21, 3292, 9758, 3546, 63, 20...
self.style = style
def __init__(self, master=None, label="Number", default=None, help='', min=1, max=10, style='spin'): """Create a number-setting widget. master: Tkinter widget that will contain this Number label: Text label describing the meaning of the number default: Default value, or None to use minimum help: Help text to show in a tooltip min, max: Range of allowable numbers (inclusive) style: 'spin' for a spinbox, or 'scale' for a slider """ # TODO: Multiple styles (entry, spinbox, scale) Control.__init__(self, master, int, help) self.style = style # Use min if default wasn't provided if default is None: default = min self.variable.set(default) # Create and pack widgets self.label = tk.Label(self, name='label', text=label) self.label.pack(side='left') if self.style == 'spin': self.number = tk.Spinbox(self, from_=min, to=max, width=4, textvariable=self.variable) self.number.pack(side='left') else: # 'scale' self.number = tk.Scale(self, from_=min, to=max, tickinterval=max-min, variable=self.variable, orient='horizontal') self.number.pack(side='left', fill='x', expand=True)
ac756e9bfa740df0ff497bc9bb0b414d357eefc4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/ac756e9bfa740df0ff497bc9bb0b414d357eefc4/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 1546, 1854, 3113, 805, 33, 7036, 16, 2809, 2218, 2187, 1131, 33, 21, 16, 943, 33, 2163, 16, 2154, 2218, 22876, 11, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4171, 33, 7036, 16, 1433, 1546, 1854, 3113, 805, 33, 7036, 16, 2809, 2218, 2187, 1131, 33, 21, 16, 943, 33, 2163, 16, 2154, 2218, 22876, 11, 4672, 3536, ...
display_box.pack_start(hbox, False, False, 5)
display_box.pack_start(hbox, False, False, 3)
def show_settings(self, widget, data=None): """The settings pane""" ################################# # Settings Window ################################# if hasattr(self, 'preferences_window'): if self.preferences_window != None: self.preferences_window.present() return True self.preferences_window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.preferences_window.set_transient_for(self.window) self.preferences_window.set_title("Viridian Settings") self.preferences_window.set_position(gtk.WIN_POS_CENTER_ON_PARENT) self.preferences_window.resize(450, 300) self.preferences_window.set_resizable(False) self.preferences_window.connect("delete_event", self.destroy_settings) self.preferences_window.connect("destroy", self.destroy_settings) main_vbox = gtk.VBox(False, 8) main_vbox.set_border_width(10) """Start Notebook""" notebook = gtk.Notebook() notebook.set_tab_pos(gtk.POS_TOP) #self.show_tabs = True #self.show_border = True ################################# # Account Settings ################################# account_box = gtk.VBox() account_box.set_border_width(10) hbox = gtk.HBox() label = gtk.Label() label.set_markup('<b>Account Settings</b>') hbox.pack_start(label, False, False) account_box.pack_start(hbox, False, False, 5)
18602e51d3201499cffa21c300d01a274a761a27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11350/18602e51d3201499cffa21c300d01a274a761a27/AmpacheGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4272, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 3536, 1986, 1947, 13618, 8395, 19709, 468, 8709, 6076, 19709, 309, 3859, 12, 2890, 16, 296, 23219, 67, 5668, 11, 4672, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4272, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 3536, 1986, 1947, 13618, 8395, 19709, 468, 8709, 6076, 19709, 309, 3859, 12, 2890, 16, 296, 23219, 67, 5668, 11, 4672, 309, ...
NotImplementedError: The argument cf (=5/4) must be in ]0,1[.
ValueError: The argument slope (=5/4) must be in ]0,1[.
sage: def cf():
84c9b810c2ff0413ad303dbed17d39757703c31f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/84c9b810c2ff0413ad303dbed17d39757703c31f/word_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 6080, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 6080, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
root_dir=output_dir)
root_dir=self.bdist_dir)
def run (self):
a85bd0200f41c93d321dce9f55db130c26a20f8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a85bd0200f41c93d321dce9f55db130c26a20f8a/bdist_dumb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertEqual(mod.st[2][1:],
self.assertEqual(revise(*mod.st[2][1:]),
def test_stack(self): self.assert_(len(mod.st) >= 5) self.assertEqual(mod.st[0][1:], (modfile, 16, 'eggs', [' st = inspect.stack()\n'], 0)) self.assertEqual(mod.st[1][1:], (modfile, 9, 'spam', [' eggs(b + d, c + f)\n'], 0)) self.assertEqual(mod.st[2][1:], (modfile, 43, 'argue', [' spam(a, b, c)\n'], 0)) self.assertEqual(mod.st[3][1:], (modfile, 39, 'abuse', [' self.argue(a, b, c)\n'], 0))
97630d023d5e1d96f1e49d392a1c837bb4d9b0f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/97630d023d5e1d96f1e49d392a1c837bb4d9b0f4/test_inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3772, 12, 2890, 4672, 365, 18, 11231, 67, 12, 1897, 12, 1711, 18, 334, 13, 1545, 1381, 13, 365, 18, 11231, 5812, 12, 1711, 18, 334, 63, 20, 6362, 21, 30, 6487, 261, 1711, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3772, 12, 2890, 4672, 365, 18, 11231, 67, 12, 1897, 12, 1711, 18, 334, 13, 1545, 1381, 13, 365, 18, 11231, 5812, 12, 1711, 18, 334, 63, 20, 6362, 21, 30, 6487, 261, 1711, ...
cat > _ftime.c << 'THE_END' /* Stub function for _ftime. * This is an inline function in Visual C 2008 so is missing from msvcr90.dll */ void _ftime32(struct _timeb *timeptr); void _ftime(struct _timeb *timeptr) { _ftime32(timeptr); } THE_END cat > time.c << 'THE_END' /* Stub function for time. * This is an inline function in Visual C 2008 so is missing from msvcr90.dll */ time_t _time32(time_t *timer); time_t time(time_t *timer) { return _time32(timer); } THE_END
cat > msvcr90.def << 'THE_END'
5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 6573, 405, 4086, 90, 3353, 9349, 18, 536, 2296, 296, 24644, 67, 4415, 11, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 6573, 405, 4086, 90, 3353, 9349, 18, 536, 2296, 296, 24644, 67, 4415, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if len(self.criteria) < 2: self.criteria.append(criteria) else: self.criteria[1] = criteria return self
new_item = WindowSpecification(self.criteria[0]) new_item.criteria.append(criteria) return new_item
def window_(self, **criteria): "Add the criteria that will be matched when we resolve the control"
f47d5f85b78e1b3db8176162dcda52fe95bef759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/f47d5f85b78e1b3db8176162dcda52fe95bef759/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2742, 67, 12, 2890, 16, 2826, 9714, 4672, 315, 986, 326, 3582, 716, 903, 506, 4847, 1347, 732, 2245, 326, 3325, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2742, 67, 12, 2890, 16, 2826, 9714, 4672, 315, 986, 326, 3582, 716, 903, 506, 4847, 1347, 732, 2245, 326, 3325, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if numpy.any((i.owner and i.owner.op == host_from_gpu) for i in node.inputs):
if numpy.any([(i.owner and i.owner.op == host_from_gpu) for i in node.inputs]):
def local_gpu_dot(node): """ gpu_from_host(dot) -> gpudot(gpu_from_host) dot(host_from_gpu) -> host_from_gpu(gpudot) """ if node.op == gpu_from_host: host_input = node.inputs[0] if host_input.owner and host_input.owner.op == tensor.blas._dot22: x, y = host_input.owner.inputs return [gpu_dot22(gpu_from_host(x), gpu_from_host(y))] if node.op == tensor.blas._dot22: if numpy.any((i.owner and i.owner.op == host_from_gpu) for i in node.inputs): x, y = node.inputs return [host_from_gpu(gpu_dot22(gpu_from_host(x), gpu_from_host(y)))] return False
17d5c707c9b05b8c838991c35987313b13293ab0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/17d5c707c9b05b8c838991c35987313b13293ab0/opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 23162, 67, 9811, 12, 2159, 4672, 3536, 21810, 67, 2080, 67, 2564, 12, 9811, 13, 317, 4178, 1100, 352, 12, 23162, 67, 2080, 67, 2564, 13, 225, 3928, 12, 2564, 67, 2080, 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, 1191, 67, 23162, 67, 9811, 12, 2159, 4672, 3536, 21810, 67, 2080, 67, 2564, 12, 9811, 13, 317, 4178, 1100, 352, 12, 23162, 67, 2080, 67, 2564, 13, 225, 3928, 12, 2564, 67, 2080, 67, ...
self.theSession.stop() self.theSession.printMessage( "Stop\n" )
def stepSimulation( self, obj ) : try: self.theSession.theSimulator.initialize() self.theSession.printMessage( "Step\n" ) self['step_combo_entry'].set_text( str( self.theStepSize ) ) self.theTimer = gtk.timeout_add( self.theUpdateInterval, self.updateByTimeOut, 0 ) if self.theStepType == 0: self.theSession.run( self.theStepSize ) else: self.theSession.step( self.theStepSize )
def stopSimulation( self, a ) : if self.theRunningFlag: self.theRunningFlag = 0 self.theSession.stop() self.theSession.printMessage( "Stop\n" ) self.removeTimeOut() self.update() self.theLoggerWindow.update()
e573789f2b94316412ecd7aa8c3fcc447f03df55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/e573789f2b94316412ecd7aa8c3fcc447f03df55/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 18419, 12, 365, 16, 279, 262, 294, 309, 365, 18, 5787, 7051, 4678, 30, 365, 18, 5787, 7051, 4678, 273, 374, 5411, 1652, 2235, 18419, 12, 365, 16, 1081, 262, 294, 225, 775, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 18419, 12, 365, 16, 279, 262, 294, 309, 365, 18, 5787, 7051, 4678, 30, 365, 18, 5787, 7051, 4678, 273, 374, 5411, 1652, 2235, 18419, 12, 365, 16, 1081, 262, 294, 225, 775, 30, ...
row = [v and v.encode(charset) or '' for v in subscription.composer_data.values()]
row = [] for item in field.Fields(self.context.composers[format].schema).keys(): v = subscription.composer_data.get(item) or '' row.append(v.encode(charset))
def __call__(self): properties = component.getUtility(IPropertiesTool) charset = properties.site_properties.getProperty('default_charset', 'utf-8').upper() self.request.response.setHeader('Content-Type', 'text/csv; charset=%s' % charset) self.request.response.setHeader('Content-disposition', 'attachment; filename=subscribers_%s_%s.csv' % (self.context.id, datetime.date.today().strftime("%Y%m%d"))) res = cStringIO.StringIO() writer = csv.writer(res, dialect=csv.excel) for format in self.context.composers.keys(): for subscription in tuple(self.context.subscriptions.query(format=format)): row = [v and v.encode(charset) or '' for v in subscription.composer_data.values()] writer.writerow(row) return res.getvalue()
79f159dab58bb680361cb1e54dbd130beaecf9db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9843/79f159dab58bb680361cb1e54dbd130beaecf9db/channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1790, 273, 1794, 18, 588, 6497, 12, 45, 2297, 6364, 13, 4856, 273, 1790, 18, 4256, 67, 4738, 18, 588, 1396, 2668, 1886, 67, 9999, 2187, 296, 3158, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1790, 273, 1794, 18, 588, 6497, 12, 45, 2297, 6364, 13, 4856, 273, 1790, 18, 4256, 67, 4738, 18, 588, 1396, 2668, 1886, 67, 9999, 2187, 296, 3158, 17, ...
day = str(t[2]) + '_'
day = '_' + str(t[2])
def get_wiki_save_page(stat_page = False): site = wikipedia.getSite() wiki_save_path = { '_default': u'User:%s/Report' % config.usernames[site.family.name][site.lang], 'it': u'Utente:RevertBot/Report' } save_path = wikipedia.translate(site, wiki_save_path) if stat_page: return wikipedia.Page(site, '%s/%s' % (save_path, wikipedia.translate(site, stat_msg)[0])) if append_date_to_wiki_save_path: t = time.localtime() day = '' if append_day_to_wiki_save_path: day = str(t[2]) + '_' save_path += day + '_' + date.monthName(site.language(), t[1]) + '_' + str(t[0]) return wikipedia.Page(site, save_path)
dd5b0d86aab5b06c0dc603541cfa5c2be3962b9b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/dd5b0d86aab5b06c0dc603541cfa5c2be3962b9b/copyright_put.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 13044, 67, 5688, 67, 2433, 12, 5642, 67, 2433, 273, 1083, 4672, 225, 2834, 273, 21137, 18, 588, 4956, 1435, 225, 9050, 67, 5688, 67, 803, 273, 288, 2070, 1886, 4278, 582, 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, 336, 67, 13044, 67, 5688, 67, 2433, 12, 5642, 67, 2433, 273, 1083, 4672, 225, 2834, 273, 21137, 18, 588, 4956, 1435, 225, 9050, 67, 5688, 67, 803, 273, 288, 2070, 1886, 4278, 582, 11, ...
def addRandomGroup(self,nlen = 8): """ add a randomly generated, unique group name
def addRandomGroup(self,prefix='',nlen= 8): """ add a quasi-randomly generated group name that is 'guaranteed' to be unique. If prefix is provided, the group name begins with that string
def addRandomGroup(self,nlen = 8): """ add a randomly generated, unique group name returns the group name or None. """ rand = random.randrange def randomName(n=8): chars = 'abcdefghijklmnopqrstuvwxyz0123456789' return "_%s" % ''.join([chars[rand(0,len(chars))] for i in range(n)]) group = randomName(n = nlen) if self.hasGroup(group): ntry = 0 while ntry<100: group = randomName(n=nlen) if not self.hasGroup(group):break ntry = ntry + 1 if (ntry % 20 == 0): nlen = nlen+1 if self.hasGroup(group): return None self.sym[group] = {} return group
7ce30dac7ae647b16c2f51350812b92c2a4f962b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11796/7ce30dac7ae647b16c2f51350812b92c2a4f962b/Symbol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 8529, 1114, 12, 2890, 16, 3239, 2218, 2187, 82, 1897, 33, 1725, 4672, 3536, 527, 279, 719, 31653, 17, 9188, 715, 4374, 1041, 508, 716, 353, 296, 6891, 30164, 11, 358, 506, 3089, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8529, 1114, 12, 2890, 16, 3239, 2218, 2187, 82, 1897, 33, 1725, 4672, 3536, 527, 279, 719, 31653, 17, 9188, 715, 4374, 1041, 508, 716, 353, 296, 6891, 30164, 11, 358, 506, 3089, 1...
test()
test()
def test(): from pprint import pprint #print test_program; return from reportlab.pdfgen import canvas from reportlab.lib.units import inch fn = "paratest0.pdf" c = canvas.Canvas(fn) test2(c) c.showPage() if 1: remainder = test_program + test_program + test_program laststate = {} while remainder: print "NEW PAGE" c.translate(inch, 8*inch) t = c.beginText() t.setTextOrigin(0,0) p = paragraphEngine() p.resetState(laststate) p.x = 0 p.y = 0 maxwidth = 7*inch maxheight = 500 (formattedprogram, remainder, laststate, height) = p.format(maxwidth, maxheight, remainder) if debug: pprint( formattedprogram )#; return laststate = p.runOpCodes(formattedprogram, c, t) c.drawText(t) c.showPage() print "="*30, "x=", laststate["x"], "y=", laststate["y"] c.save() print fn
d3569d526e746a6f3fb0ee8d65e99b1190c72297 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/d3569d526e746a6f3fb0ee8d65e99b1190c72297/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 628, 18771, 1930, 18771, 468, 1188, 1842, 67, 12890, 31, 327, 628, 2605, 7411, 18, 22353, 2137, 275, 1930, 5953, 628, 2605, 7411, 18, 2941, 18, 7705, 1930, 316, 343, 2295, 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, 1842, 13332, 628, 18771, 1930, 18771, 468, 1188, 1842, 67, 12890, 31, 327, 628, 2605, 7411, 18, 22353, 2137, 275, 1930, 5953, 628, 2605, 7411, 18, 2941, 18, 7705, 1930, 316, 343, 2295, 2...
stat_list = list(self.stats.keys())
stat_list = self.stats.keys()
def get_print_list(self, sel_list): width = self.max_name_len if self.fcn_list: stat_list = self.fcn_list[:] msg = " Ordered by: " + self.sort_type + '\n' else: stat_list = list(self.stats.keys()) msg = " Random listing order was used\n"
ebeac1afae7d9a78072793b592a2dcb8bb233c1d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/ebeac1afae7d9a78072793b592a2dcb8bb233c1d/pstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1188, 67, 1098, 12, 2890, 16, 357, 67, 1098, 4672, 1835, 273, 365, 18, 1896, 67, 529, 67, 1897, 309, 365, 18, 7142, 82, 67, 1098, 30, 610, 67, 1098, 273, 365, 18, 7142, 82...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1188, 67, 1098, 12, 2890, 16, 357, 67, 1098, 4672, 1835, 273, 365, 18, 1896, 67, 529, 67, 1897, 309, 365, 18, 7142, 82, 67, 1098, 30, 610, 67, 1098, 273, 365, 18, 7142, 82...
p = subprocess.Popen(cmdline, close_fds=True)
if sys.platform[:3] == 'win': p = subprocess.Popen(cmdline) else: p = subprocess.Popen(cmdline, close_fds=True)
def open(self, url, new=0, autoraise=1): cmdline = [self.name] + [arg.replace("%s", url) for arg in self.args] try: p = subprocess.Popen(cmdline, close_fds=True) return not p.wait() except OSError: return False
2c94bf7d410b151d6e7e38275c9dda871a5e8882 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2c94bf7d410b151d6e7e38275c9dda871a5e8882/webbrowser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 880, 16, 394, 33, 20, 16, 2059, 10610, 784, 33, 21, 4672, 22877, 273, 306, 2890, 18, 529, 65, 397, 306, 3175, 18, 2079, 27188, 87, 3113, 880, 13, 364, 1501, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 880, 16, 394, 33, 20, 16, 2059, 10610, 784, 33, 21, 4672, 22877, 273, 306, 2890, 18, 529, 65, 397, 306, 3175, 18, 2079, 27188, 87, 3113, 880, 13, 364, 1501, 316, ...
module_name = get_containing_module(value)
if module_name is None: module_name = get_containing_module(value)
def get_docstring(value): """ Return the docstring for the given value; or C{None} if it does not have a docstring. @rtype: C{unicode} """ docstring = getattr(value, '__doc__', None) if docstring is None: return None elif isinstance(docstring, unicode): return docstring elif isinstance(docstring, str): try: return unicode(docstring, 'ascii') except UnicodeDecodeError: module_name = get_containing_module(value) if module_name is not None: try: module = get_value_from_name(module_name) filename = py_src_filename(module.__file__) encoding = epydoc.docparser.get_module_encoding(filename) return unicode(docstring, encoding) except KeyboardInterrupt: raise except Exception: pass if hasattr(value, '__name__'): name = value.__name__ else: name = repr(value) log.warning("%s's docstring is not a unicode string, but it " "contains non-ascii data -- treating it as " "latin-1." % name) return unicode(docstring, 'latin-1') return None elif value is BuiltinMethodType: # Don't issue a warning for this special case. return None else: if hasattr(value, '__name__'): name = value.__name__ else: name = repr(value) log.warning("%s's docstring is not a string -- ignoring it." % name) return None
7cb507d14dc9e14ba47d4245d271ccc6c158752a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/7cb507d14dc9e14ba47d4245d271ccc6c158752a/docintrospecter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 24675, 12, 1132, 4672, 3536, 2000, 326, 14525, 364, 326, 864, 460, 31, 578, 385, 95, 7036, 97, 309, 518, 1552, 486, 1240, 279, 14525, 18, 632, 86, 723, 30, 385, 95, 9124, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 24675, 12, 1132, 4672, 3536, 2000, 326, 14525, 364, 326, 864, 460, 31, 578, 385, 95, 7036, 97, 309, 518, 1552, 486, 1240, 279, 14525, 18, 632, 86, 723, 30, 385, 95, 9124, 97...
print """\ Usage: bugzilla2trac.py --db <MySQL dbname> - Bugzilla's database [-h | --host <MySQL hostname>] - Bugzilla's DNS host name [-u | --user <MySQL username>] - effective Bugzilla's database user [-p | --passwd <MySQL password>] - Bugzilla's user password --tracenv /path/to/trac/env - full path to Trac db environment [-f | --force] - force to clean up Trac db [--help | help] - this help info""" sys.exit(0) if __name__ == "__main__": db = '' host = 'localhost' user = '' password = '' env = '' force = 0 if len (sys.argv) > 1: if sys.argv[1] in ['--help','help'] or len(sys.argv) < 4: usage() iter = 1 while iter < len(sys.argv): if sys.argv[iter] in ['--db'] and iter+1 < len(sys.argv): db = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-h', '--host'] and iter+1 < len(sys.argv): host = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-u', '--user'] and iter+1 < len(sys.argv): user = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-p', '--passwd'] and iter+1 < len(sys.argv): passwd = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['--tracenv'] and iter+1 < len(sys.argv): env = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-f', '--force']: force = 1 else: print "Error: unknown parameter: " + sys.argv[iter] sys.exit(0) iter = iter + 1 else: usage() TheBugzillaConverter(db, host, user, password, env, force)
print "bugzilla2trac - Imports a bug database from Bugzilla into Trac." print print "Usage: bugzilla2trac.py [options]" print print "Available Options:" print " --db <MySQL dbname> - Bugzilla's database" print " --tracenv /path/to/trac/env - full path to Trac db environment" print " -h | --host <MySQL hostname> - Bugzilla's DNS host name" print " -u | --user <MySQL username> - effective Bugzilla's database user" print " -p | --passwd <MySQL password> - Bugzilla's user password" print " -c | --clean - remove current Trac tickets before importing" print " --help | help - this help info" print print "Additional configuration options can be defined directly in the script." print sys.exit(0) def main(): global BZ_DB, BZ_HOST, BZ_USER, BZ_PASSWORD, TRAC_ENV, TRAC_CLEAN if len (sys.argv) > 1: if sys.argv[1] in ['--help','help'] or len(sys.argv) < 4: usage() iter = 1 while iter < len(sys.argv): if sys.argv[iter] in ['--db'] and iter+1 < len(sys.argv): BZ_DB = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-h', '--host'] and iter+1 < len(sys.argv): BZ_HOST = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-u', '--user'] and iter+1 < len(sys.argv): BZ_USER = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-p', '--passwd'] and iter+1 < len(sys.argv): BZ_PASSWORD = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['--tracenv'] and iter+1 < len(sys.argv): TRAC_ENV = sys.argv[iter+1] iter = iter + 1 elif sys.argv[iter] in ['-c', '--clean']: TRAC_CLEAN = 1 else: print "Error: unknown parameter: " + sys.argv[iter] sys.exit(0) iter = iter + 1 else: usage() convert(BZ_DB, BZ_HOST, BZ_USER, BZ_PASSWORD, TRAC_ENV, TRAC_CLEAN) if __name__ == '__main__': main()
def usage(): print """\
5cddf387e67e89477fb9b954001b3573f8af2454 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/5cddf387e67e89477fb9b954001b3573f8af2454/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 64, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sql += '\n' + cls.createIndexesSQL(connection=conn)
index_sql = cls.createIndexesSQL(connection=conn) if index_sql: sql += ';\n' + index_sql
def createTableSQL(cls, createJoinTables=True, createIndexes=True, connection=None): conn = connection or cls._connection sql, constraints = conn.createTableSQL(cls) if createJoinTables: sql += '\n' + cls.createJoinTablesSQL(connection=conn) if createIndexes: sql += '\n' + cls.createIndexesSQL(connection=conn) return sql, constraints
cb2ea02123add24ef0f6f0953e796866fa9c3401 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/cb2ea02123add24ef0f6f0953e796866fa9c3401/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19565, 3997, 12, 6429, 16, 752, 4572, 6905, 33, 5510, 16, 752, 8639, 33, 5510, 16, 1459, 33, 7036, 4672, 1487, 273, 1459, 578, 2028, 6315, 4071, 1847, 16, 6237, 273, 1487, 18, 2640, 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, 19565, 3997, 12, 6429, 16, 752, 4572, 6905, 33, 5510, 16, 752, 8639, 33, 5510, 16, 1459, 33, 7036, 4672, 1487, 273, 1459, 578, 2028, 6315, 4071, 1847, 16, 6237, 273, 1487, 18, 2640, 13...
}, -1)
}, -5)
def __init__(self, list, session = None): self["config_actions"] = NumberActionMap(["SetupActions", "TextInputActions"], { "ok": self.keyOK, "left": self.keyLeft, "right": self.keyRight, "delete": self.keyDelete, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, "4": self.keyNumberGlobal, "5": self.keyNumberGlobal, "6": self.keyNumberGlobal, "7": self.keyNumberGlobal, "8": self.keyNumberGlobal, "9": self.keyNumberGlobal, "0": self.keyNumberGlobal }, -1)
2669cc5e44c030dc749e1999c3f96d5296362a54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/2669cc5e44c030dc749e1999c3f96d5296362a54/ConfigList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 666, 16, 1339, 273, 599, 4672, 365, 9614, 1425, 67, 4905, 11929, 273, 3588, 1803, 863, 3816, 6, 7365, 6100, 3113, 315, 1528, 1210, 6100, 6, 6487, 288, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 666, 16, 1339, 273, 599, 4672, 365, 9614, 1425, 67, 4905, 11929, 273, 3588, 1803, 863, 3816, 6, 7365, 6100, 3113, 315, 1528, 1210, 6100, 6, 6487, 288, 31...
if context.mtime: context.set_header('Last-Modified', context.mtime)
if mtime: context.set_header('Last-Modified', mtime)
def set_body(cls, context): super(GET, cls).set_body(context) if context.status != 200: return
258cd6f3e5ef46c9d39ebb5c2741101c459ada34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/258cd6f3e5ef46c9d39ebb5c2741101c459ada34/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3432, 12, 6429, 16, 819, 4672, 2240, 12, 3264, 16, 2028, 2934, 542, 67, 3432, 12, 2472, 13, 309, 819, 18, 2327, 480, 4044, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3432, 12, 6429, 16, 819, 4672, 2240, 12, 3264, 16, 2028, 2934, 542, 67, 3432, 12, 2472, 13, 309, 819, 18, 2327, 480, 4044, 30, 327, 2, -100, -100, -100, -100, -100, -100, -1...
spine.append(E.itemref(idref=ref.id))
if ref.id is not None: spine.append(E.itemref(idref=ref.id))
def CAL_ELEM(name, content): return M.meta(name=name, content=content)
74a63ac46fd78882c955027a415e9c993da34189 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/74a63ac46fd78882c955027a415e9c993da34189/opf2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 385, 1013, 67, 41, 26817, 12, 529, 16, 913, 4672, 327, 490, 18, 3901, 12, 529, 33, 529, 16, 913, 33, 1745, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 385, 1013, 67, 41, 26817, 12, 529, 16, 913, 4672, 327, 490, 18, 3901, 12, 529, 33, 529, 16, 913, 33, 1745, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self["api"]["name"].value = None self["api"]["description"].value = None
if self["api"].has_key("name"): self["api"]["name"].value = None self["api"]["description"].value = None
def _removed(self, emissor, data): self._header_table["name"].value = "Unselected" self._header_table["name"].value_obj._values_dict["n"].disabled_set( True)
ed8527c50c4765e15c9acae5b1a080f1d51c035d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/ed8527c50c4765e15c9acae5b1a080f1d51c035d/signals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14923, 12, 2890, 16, 801, 1054, 280, 16, 501, 4672, 365, 6315, 3374, 67, 2121, 9614, 529, 6, 8009, 1132, 273, 315, 984, 8109, 6, 365, 6315, 3374, 67, 2121, 9614, 529, 6, 8009, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14923, 12, 2890, 16, 801, 1054, 280, 16, 501, 4672, 365, 6315, 3374, 67, 2121, 9614, 529, 6, 8009, 1132, 273, 315, 984, 8109, 6, 365, 6315, 3374, 67, 2121, 9614, 529, 6, 8009, 1...
text.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD))
text.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD))
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
2620b36e036a1d93bf57c97ee2f7cb9a339fd457 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/2620b36e036a1d93bf57c97ee2f7cb9a339fd457/embedded_sample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 5537, 16186, 2738, 972, 12, 2890, 16, 982, 16, 300, 21, 13, 1172, 982, 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, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 5537, 16186, 2738, 972, 12, 2890, 16, 982, 16, 300, 21, 13, 1172, 982, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
artype = Float
artype = Num.Float
def bilinear(b,a,fs=1.0): a,b = map(r1array,(a,b)) D = len(a) - 1 N = len(b) - 1 artype = Float M = max([N,D]) Np = M Dp = M bprime = zeros(Np+1,artype) aprime = zeros(Dp+1,artype) for j in range(Np+1): val = 0.0 for i in range(N+1): for k in range(i+1): for l in range(M-i+1): if k+l == j: val += comb(i,k)*comb(M-i,l)*b[N-i]*pow(2*fs,i)*(-1)**k bprime[j] = val for j in range(Dp+1): val = 0.0 for i in range(D+1): for k in range(i+1): for l in range(M-i+1): if k+l == j: val += comb(i,k)*comb(M-i,l)*a[D-i]*pow(2*fs,i)*(-1)**k aprime[j] = val return normalize(bprime, aprime)
78dbcc11384c4361dd850305b138d97d4c6ff715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/78dbcc11384c4361dd850305b138d97d4c6ff715/filter_design.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 12554, 297, 12, 70, 16, 69, 16, 2556, 33, 21, 18, 20, 4672, 279, 16, 70, 273, 852, 12, 86, 21, 1126, 16, 12, 69, 16, 70, 3719, 463, 273, 562, 12, 69, 13, 300, 404, 423, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 12554, 297, 12, 70, 16, 69, 16, 2556, 33, 21, 18, 20, 4672, 279, 16, 70, 273, 852, 12, 86, 21, 1126, 16, 12, 69, 16, 70, 3719, 463, 273, 562, 12, 69, 13, 300, 404, 423, 27...
msg="cmath.pi is %s; should be %s" % (cmath.pi, pi_expected))
msg="cmath.pi is {}; should be {}".format(cmath.pi, pi_expected))
def test_constants(self): e_expected = 2.71828182845904523536 pi_expected = 3.14159265358979323846 self.assertAlmostEqual(cmath.pi, pi_expected, places=9, msg="cmath.pi is %s; should be %s" % (cmath.pi, pi_expected)) self.assertAlmostEqual(cmath.e, e_expected, places=9, msg="cmath.e is %s; should be %s" % (cmath.e, e_expected))
5d73bca992924072e01ed3bdb94348008b77bb32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/5d73bca992924072e01ed3bdb94348008b77bb32/test_cmath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13358, 12, 2890, 4672, 425, 67, 3825, 273, 576, 18, 27, 2643, 6030, 28246, 5193, 6162, 3028, 25, 30803, 5718, 4790, 67, 3825, 273, 890, 18, 3461, 24872, 30281, 4763, 6675, 7235...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13358, 12, 2890, 4672, 425, 67, 3825, 273, 576, 18, 27, 2643, 6030, 28246, 5193, 6162, 3028, 25, 30803, 5718, 4790, 67, 3825, 273, 890, 18, 3461, 24872, 30281, 4763, 6675, 7235...
def close_request(self, request): """Called to clean up an individual request."""
def shutdown_request(self, request): """Called to shutdown and close an individual request."""
def close_request(self, request): """Called to clean up an individual request.""" try: #explicitly shutdown. socket.close() merely releases #the socket and waits for GC to perform the actual close. request.shutdown(socket.SHUT_WR) except socket.error: pass #some platforms may raise ENOTCONN here request.close()
00a65e2539686fb0199fcc5b1f05718c0b374502 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/00a65e2539686fb0199fcc5b1f05718c0b374502/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 67, 2293, 12, 2890, 16, 590, 4672, 3536, 8185, 358, 5731, 471, 1746, 392, 7327, 590, 12123, 775, 30, 468, 16511, 715, 5731, 18, 225, 2987, 18, 4412, 1435, 4045, 2357, 14824, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 67, 2293, 12, 2890, 16, 590, 4672, 3536, 8185, 358, 5731, 471, 1746, 392, 7327, 590, 12123, 775, 30, 468, 16511, 715, 5731, 18, 225, 2987, 18, 4412, 1435, 4045, 2357, 14824, 468, ...
raise OSError(status)
raise RuntimeError('OpenSSL connect failed with status %s and ' 'output: %r' % (status, output))
def strip_to_x509_cert(certfile_contents, outfile=None): m = re.search(br"^([-]+BEGIN CERTIFICATE[-]+[\r]*\n" br".*[\r]*^[-]+END CERTIFICATE[-]+)$", certfile_contents, re.MULTILINE | re.DOTALL) if not m: return None else: tn = tempfile.mktemp() fp = open(tn, "wb") fp.write(m.group(1) + b"\n") fp.close() try: tn2 = (outfile or tempfile.mktemp()) status, output = subproc(r'openssl x509 -in "%s" -out "%s"' % (tn, tn2)) if status != 0: raise OperationError(status, tsig, output) fp = open(tn2, 'rb') data = fp.read() fp.close() os.unlink(tn2) return data finally: os.unlink(tn)
a84ca87c7169b9b186a25cfbf890aea260aef30a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/a84ca87c7169b9b186a25cfbf890aea260aef30a/get-remote-certificate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 869, 67, 92, 5995, 67, 7593, 12, 7593, 768, 67, 3980, 16, 8756, 33, 7036, 4672, 312, 273, 283, 18, 3072, 12, 2848, 6, 66, 3816, 23238, 16061, 25423, 26649, 18919, 3737, 7438,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 869, 67, 92, 5995, 67, 7593, 12, 7593, 768, 67, 3980, 16, 8756, 33, 7036, 4672, 312, 273, 283, 18, 3072, 12, 2848, 6, 66, 3816, 23238, 16061, 25423, 26649, 18919, 3737, 7438,...
raise "\nERROR: In Order To Append/Insert A MultiLine Text You Have To Use The Style TR_HAS_VARIABLE_ROW_HEIGHT"
raise Exception("\nERROR: In Order To Append/Insert A MultiLine Text You Have To Use The Style TR_HAS_VARIABLE_ROW_HEIGHT")
def AddRoot(self, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None): """Adds a root to the CustomTreeCtrl. Only one root must exist."""
e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 2375, 12, 2890, 16, 977, 16, 5691, 67, 723, 33, 20, 16, 341, 4880, 33, 7036, 16, 1316, 29711, 21, 16, 357, 2040, 29711, 21, 16, 501, 33, 7036, 4672, 3536, 3655, 279, 1365, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 2375, 12, 2890, 16, 977, 16, 5691, 67, 723, 33, 20, 16, 341, 4880, 33, 7036, 16, 1316, 29711, 21, 16, 357, 2040, 29711, 21, 16, 501, 33, 7036, 4672, 3536, 3655, 279, 1365, 358,...
def __tree_status(files = [], tree_id = 'HEAD', unknown = False,
def __tree_status(files = None, tree_id = 'HEAD', unknown = False,
def __tree_status(files = [], tree_id = 'HEAD', unknown = False, noexclude = True): """Returns a list of pairs - [status, filename] """ refresh_index() cache_files = [] # unknown files if unknown: exclude_file = os.path.join(base_dir, 'info', 'exclude') base_exclude = ['--exclude=%s' % s for s in ['*.[ao]', '*.pyc', '.*', '*~', '#*', 'TAGS', 'tags']] base_exclude.append('--exclude-per-directory=.gitignore') if os.path.exists(exclude_file): extra_exclude = ['--exclude-from=%s' % exclude_file] else: extra_exclude = [] if noexclude: extra_exclude = base_exclude = [] lines = _output_lines(['git-ls-files', '--others'] + base_exclude + extra_exclude) cache_files += [('?', line.strip()) for line in lines] # conflicted files conflicts = get_conflicts() if not conflicts: conflicts = [] cache_files += [('C', filename) for filename in conflicts] # the rest for line in _output_lines(['git-diff-index', '-r', tree_id] + files): fs = tuple(line.rstrip().split(' ',4)[-1].split('\t',1)) if fs[1] not in conflicts: cache_files.append(fs) return cache_files
9216b6023d6840c457172b375e14443189f7ef89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/9216b6023d6840c457172b375e14443189f7ef89/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3413, 67, 2327, 12, 2354, 273, 599, 16, 2151, 67, 350, 273, 296, 12458, 2187, 5917, 273, 1083, 16, 1158, 10157, 273, 1053, 4672, 3536, 1356, 279, 666, 434, 5574, 300, 306, 2327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3413, 67, 2327, 12, 2354, 273, 599, 16, 2151, 67, 350, 273, 296, 12458, 2187, 5917, 273, 1083, 16, 1158, 10157, 273, 1053, 4672, 3536, 1356, 279, 666, 434, 5574, 300, 306, 2327, ...
tokens = queueToAllowedSites(s)
tokens = convertQueueNameToDQ2Names(s)
def list_ddm_sites(self,allowTape=False): from pandatools import Client refreshPandaSpecs()
0f7dd4dd84d0c66c035d8408d494339ece96a78e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/0f7dd4dd84d0c66c035d8408d494339ece96a78e/Panda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 449, 81, 67, 12180, 12, 2890, 16, 5965, 30421, 33, 8381, 4672, 628, 293, 464, 270, 8192, 1930, 2445, 4460, 52, 464, 69, 15999, 1435, 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, 666, 67, 449, 81, 67, 12180, 12, 2890, 16, 5965, 30421, 33, 8381, 4672, 628, 293, 464, 270, 8192, 1930, 2445, 4460, 52, 464, 69, 15999, 1435, 2, -100, -100, -100, -100, -100, -100, -10...
return urlunparse((scheme, netloc, path, params, query, fragment))
return url
def urljoin(base, url, allow_fragments = 1): """Join a base URL and a possibly relative URL to form an absolute interpretation of the latter.""" if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_fragments) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_fragments) if scheme != bscheme or scheme not in uses_relative: return urlunparse((scheme, netloc, path, params, query, fragment)) if scheme in uses_netloc: if netloc: return urlunparse((scheme, netloc, path, params, query, fragment)) netloc = bnetloc if path[:1] == '/': return urlunparse((scheme, netloc, path, params, query, fragment)) if not path: return urlunparse((scheme, netloc, bpath, params, query or bquery, fragment)) segments = bpath.split('/')[:-1] + path.split('/') # XXX The stuff below is bogus in various ways... if segments[-1] == '.': segments[-1] = '' while '.' in segments: segments.remove('.') while 1: i = 1 n = len(segments) - 1 while i < n: if segments[i] == '..' and segments[i-1]: del segments[i-1:i+1] break i = i+1 else: break if len(segments) == 2 and segments[1] == '..' and segments[0] == '': segments[-1] = '' elif len(segments) >= 2 and segments[-1] == '..': segments[-2:] = [''] return urlunparse((scheme, netloc, '/'.join(segments), params, query, fragment))
867952f6e437270cc906af34dba28a9b580ec265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/867952f6e437270cc906af34dba28a9b580ec265/urlparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 3536, 4572, 279, 1026, 1976, 471, 279, 10016, 3632, 1976, 358, 646, 392, 4967, 10634, 367, 434, 326, 23740, 12123, 309, 486...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 3536, 4572, 279, 1026, 1976, 471, 279, 10016, 3632, 1976, 358, 646, 392, 4967, 10634, 367, 434, 326, 23740, 12123, 309, 486...
str_w_head, str_h_head = osd.stringsize('Ajg', val.head.font, val.head.size)
str_w_label, str_h_label = osd.stringsize('Ajg', val.label.font, val.label.size)
def DrawTVGuide_Listing(self, to_listing, settings): val = settings.listing
d31c11c3f9777168daab09b7a7cda5ce84134383 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d31c11c3f9777168daab09b7a7cda5ce84134383/main1_tv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 15579, 17424, 67, 19081, 12, 2890, 16, 358, 67, 21228, 16, 1947, 4672, 1244, 273, 1947, 18, 21228, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 10184, 15579, 17424, 67, 19081, 12, 2890, 16, 358, 67, 21228, 16, 1947, 4672, 1244, 273, 1947, 18, 21228, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Let us compute longest paths on random graphs with random weights. Each time, we ensure the resulting graph is indeed a path::
Let us compute longest paths on random graphs with random weights. Each time, we ensure the resulting graph is indeed a path::
def longest_path(self, s=None, t=None, weighted=False, algorithm="MILP", solver=None, verbose=0): r""" Returns a longest path of ``self``.
34c1e50f6f1e024964d30bd503da4e0a040658da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/34c1e50f6f1e024964d30bd503da4e0a040658da/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 33, 7036, 16, 268, 33, 7036, 16, 13747, 33, 8381, 16, 4886, 1546, 49, 2627, 52, 3113, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12163, 67, 803, 12, 2890, 16, 272, 33, 7036, 16, 268, 33, 7036, 16, 13747, 33, 8381, 16, 4886, 1546, 49, 2627, 52, 3113, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279...
global before_insert_called before_insert_called += 1
record_event('before_insert_called')
def pre_insert(self): global before_insert_called before_insert_called += 1
a86386040cf0d103d8140304c5281f7ee220a218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11921/a86386040cf0d103d8140304c5281f7ee220a218/test_events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 67, 6387, 12, 2890, 4672, 2552, 1865, 67, 6387, 67, 11777, 1865, 67, 6387, 67, 11777, 1011, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 675, 67, 6387, 12, 2890, 4672, 2552, 1865, 67, 6387, 67, 11777, 1865, 67, 6387, 67, 11777, 1011, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
branches = svn.client.ls(rpath + '/branches', optrev, False, self.ctx) for branch in branches.keys(): module = '/branches/' + branch
branchnames = svn.client.ls(rpath + '/' + branches, optrev, False, self.ctx) for branch in branchnames.keys(): if oldmodule: module = '/' + oldmodule + '/' + branches + '/' + branch else: module = '/' + branches + '/' + branch
def getheads(self): # detect standard /branches, /tags, /trunk layout optrev = svn.core.svn_opt_revision_t() optrev.kind = svn.core.svn_opt_revision_number optrev.value.number = self.last_changed rpath = self.url.strip('/') paths = svn.client.ls(rpath, optrev, False, self.ctx) if 'branches' in paths and 'trunk' in paths: self.module += '/trunk' lt = self.latest(self.module, self.last_changed) self.head = self.revid(lt) self.heads = [self.head] branches = svn.client.ls(rpath + '/branches', optrev, False, self.ctx) for branch in branches.keys(): module = '/branches/' + branch brevnum = self.latest(module, self.last_changed) brev = self.revid(brevnum, module) self.ui.note('found branch %s at %d\n' % (branch, brevnum)) self.heads.append(brev) else: self.heads = [self.head] return self.heads
d35ee3e4ef3d04a9ca600c893ba61f12cb8d894f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/d35ee3e4ef3d04a9ca600c893ba61f12cb8d894f/subversion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 20263, 12, 2890, 4672, 468, 5966, 4529, 342, 18078, 16, 342, 4156, 16, 342, 26133, 3511, 2153, 9083, 273, 5893, 82, 18, 3644, 18, 31505, 67, 3838, 67, 13057, 67, 88, 1435, 2153, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 20263, 12, 2890, 4672, 468, 5966, 4529, 342, 18078, 16, 342, 4156, 16, 342, 26133, 3511, 2153, 9083, 273, 5893, 82, 18, 3644, 18, 31505, 67, 3838, 67, 13057, 67, 88, 1435, 2153, 9...
rot = (90+180+angle-ysize/2) % 360
if j == 0: rot = (90+180+angle+corr-((ysize+corr-corr_prev)/2)) % 360 else: rot = (90+180+angle+corr-ysize/2) % 360
def plagram_year_lines(self,cr,radius,chartob): chart = chartob.chart yfrac = chart.birthday_frac() year = int(chart.date.split('-')[0]) - 1 cycles = chart.get_cycles(boss.state.date.dt) year += 72*cycles sizes = chartob.get_sizes() font_size = 11.0 * radius * MAGICK_FONTSCALE inset = radius * PE_OUTER * 0.972 radius = radius * PE_OUTER * 0.997 offsets = chartob.get_cusps_offsets() cr.save() cr.set_line_width(0.5*cr.get_line_width()) self.set_font(cr,font_size) for off,size in izip(offsets,sizes): ysize = size / 6 corr = yfrac * ysize cr.set_source_rgb(0.5,0.8,0.4) for j in range(0,6): angle = (off - ysize * j + corr) self.d_radial_line(cr,radius,inset,angle*RAD) year += 1 if j in [0,3]: cr.save() rot = (90+180+angle-ysize/2) % 360 cr.rotate(rot*RAD) cr.translate(0,radius) yr = str(year)[2:] _, _, width, height, _, _ = cr.text_extents(yr) if 90 < rot < 270: cr.rotate(180*RAD) cr.move_to(-width/2,height) else: cr.move_to(-width/2,0) cr.set_source_rgb(0.0,0.7,0.0) cr.show_text(yr) cr.restore() cr.restore()
a87c3367a8a0551fd5598abeb7a9bb1a74478f7c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2637/a87c3367a8a0551fd5598abeb7a9bb1a74478f7c/planetogram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 17049, 67, 6874, 67, 3548, 12, 2890, 16, 3353, 16, 11282, 16, 11563, 947, 4672, 4980, 273, 4980, 947, 18, 11563, 677, 22187, 273, 4980, 18, 22531, 2881, 67, 22187, 1435, 3286, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 886, 17049, 67, 6874, 67, 3548, 12, 2890, 16, 3353, 16, 11282, 16, 11563, 947, 4672, 4980, 273, 4980, 947, 18, 11563, 677, 22187, 273, 4980, 18, 22531, 2881, 67, 22187, 1435, 3286, 273, ...
storage.changeDirectory(alternativePath)
storage.changeDirectory(directoryPath)
def putFile(self,file,alternativePath=None): """ This method will upload a local file to the SE
462dde553bb0e1ee27593b99359b316b766f389d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/462dde553bb0e1ee27593b99359b316b766f389d/StorageElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 768, 16, 27071, 743, 33, 7036, 4672, 3536, 1220, 707, 903, 3617, 279, 1191, 585, 358, 326, 3174, 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, 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, 1378, 812, 12, 2890, 16, 768, 16, 27071, 743, 33, 7036, 4672, 3536, 1220, 707, 903, 3617, 279, 1191, 585, 358, 326, 3174, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
dct['interval'] = " " + str(rule.interval) dct['freq'] = pluralFrequencyMap[freq]
dct['interval'] = str(rule.interval) index += 'p'
def getCustomDescription(self): """Return a string describing custom rules.
f54c3f01d59ec14330045b415eecb81a8a76f63c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/f54c3f01d59ec14330045b415eecb81a8a76f63c/Recurrence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12736, 3291, 12, 2890, 4672, 3536, 990, 279, 533, 16868, 1679, 2931, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12736, 3291, 12, 2890, 4672, 3536, 990, 279, 533, 16868, 1679, 2931, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sage: B = A.change_ring(PowerSeriesRing( ... Integers(p**prec), 't', default_prec=4))
sage: B = A.change_ring(PowerSeriesRing(Integers(p**prec), 't', default_prec=4))
def matrix_of_frobenius(Q, p, M, trace=None, compute_exact_forms=False): """ Computes the matrix of Frobenius on Monsky-Washnitzer cohomology, with respect to the basis $(dx/y, x dx/y)$. INPUT: Q -- cubic polynomial $Q(x) = x^3 + ax + b$ defining an elliptic curve E by $y^2 = Q(x)$. The coefficient ring of Q should be a $\Z/(p^M)\Z$-algebra in which the matrix of frobenius will be constructed. p -- prime >= 5 for which E has good reduction M -- integer >= 2; $p$-adic precision of the coefficient ring trace -- (optional) the trace of the matrix, if known in advance. This is easy to compute because it's just the $a_p$ of the curve. If the trace is supplied, matrix_of_frobenius will use it to speed the computation (i.e. we know the determinant is $p$, so we have two conditions, so really only column of the matrix needs to be computed. It's actually a little more complicated than that, but that's the basic idea.) If trace=None, then both columns will be computed independently, and you can get a strong indication of correctness by verifying the trace afterwards. WARNING: -- THE RESULT WILL NOT NECESSARILY BE CORRECT TO M p-ADIC DIGITS. If you want prec digits of precision, you need to use the function adjusted_prec(), and then you need to reduce the answer mod p^prec at the end. OUTPUT: 2x2 matrix of frobenius on Monsky-Washnitzer cohomology, with entries in the coefficient ring of Q. EXAMPLES: A simple example: sage: p = 5 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: M 5 sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) sage: A [3090 187] [2945 408] But the result is only accurate to prec digits: sage: B = A.change_ring(Integers(p**prec)) sage: B [90 62] [70 33] Check trace (123 = -2 mod 125) and determinant: sage: B.det() 5 sage: B.trace() 123 sage: EllipticCurve([-1, 1/4]).ap(5) -2 Try using the trace to speed up the calculation: sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), ... p, M, -2) sage: A [2715 187] [1445 408] Hmmm... it looks different, but that's because the trace of our first answer was only -2 modulo $5^3$, not -2 modulo $5^5$. So the right answer is: sage: A.change_ring(Integers(p**prec)) [90 62] [70 33] Check it works with only one digit of precision: sage: p = 5 sage: prec = 1 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 - x + R(1/4), p, M) sage: A.change_ring(Integers(p)) [0 2] [0 3] Here's an example that's particularly badly conditioned for using the trace trick: sage: p = 11 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 + 7*x + 8, p, M) sage: A.change_ring(Integers(p**prec)) [1144 176] [ 847 185] The problem here is that the top-right entry is divisible by 11, and the bottom-left entry is divisible by $11^2$. So when you apply the trace trick, neither $F(dx/y)$ nor $F(x dx/y)$ is enough to compute the whole matrix to the desired precision, even if you try increasing the target precision by one. Nevertheless, \code{matrix_of_frobenius} knows how to get the right answer by evaluating $F((x+1) dx/y)$ instead: sage: A = monsky_washnitzer.matrix_of_frobenius(x^3 + 7*x + 8, p, M, -2) sage: A.change_ring(Integers(p**prec)) [1144 176] [ 847 185] The running time is about \code{O(p * prec**2)} (times some logarithmic factors), so it's feasible to run on fairly large primes, or precision (or both?!?!): sage: p = 10007 sage: prec = 2 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: B = A.change_ring(Integers(p**prec)); B # long time [74311982 57996908] [95877067 25828133] sage: B.det() # long time 10007 sage: B.trace() # long time 66 sage: EllipticCurve([-1, 1/4]).ap(10007) # long time 66 sage: p = 5 sage: prec = 300 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: B = A.change_ring(Integers(p**prec)) # long time sage: B.det() # long time 5 sage: -B.trace() # long time 2 sage: EllipticCurve([-1, 1/4]).ap(5) # long time -2 Let's check consistency of the results for a range of precisions: sage: p = 5 sage: max_prec = 60 sage: M = monsky_washnitzer.adjusted_prec(p, max_prec) sage: R.<x> = PolynomialRing(Integers(p**M)) sage: A = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time sage: A = A.change_ring(Integers(p**max_prec)) # long time sage: result = [] # long time sage: for prec in range(1, max_prec): # long time ... M = monsky_washnitzer.adjusted_prec(p, prec) # long time ... R.<x> = PolynomialRing(Integers(p^M),'x') # long time ... B = monsky_washnitzer.matrix_of_frobenius( # long time ... x^3 - x + R(1/4), p, M) # long time ... B = B.change_ring(Integers(p**prec)) # long time ... result.append(B == A.change_ring( # long time ... Integers(p**prec))) # long time sage: result == [True] * (max_prec - 1) # long time True The remaining examples discuss what happens when you take the coefficient ring to be a power series ring; i.e. in effect you're looking at a family of curves. The code does in fact work... sage: p = 11 sage: prec = 3 sage: M = monsky_washnitzer.adjusted_prec(p, prec) sage: S.<t> = PowerSeriesRing(Integers(p**M), default_prec=4) sage: a = 7 + t + 3*t^2 sage: b = 8 - 6*t + 17*t^2 sage: R.<x> = PolynomialRing(S) sage: Q = x**3 + a*x + b sage: A = monsky_washnitzer.matrix_of_frobenius(Q, p, M) # long time sage: B = A.change_ring(PowerSeriesRing( # long time ... Integers(p**prec), 't', default_prec=4)) # long time sage: B # long time [1144 + 264*t + 841*t^2 + 1025*t^3 + O(t^4) 176 + 1052*t + 216*t^2 + 523*t^3 + O(t^4)] [ 847 + 668*t + 81*t^2 + 424*t^3 + O(t^4) 185 + 341*t + 171*t^2 + 642*t^3 + O(t^4)] The trace trick should work for power series rings too, even in the badly- conditioned case. Unfortunately I don't know how to compute the trace in advance, so I'm not sure exactly how this would help. Also, I suspect the running time will be dominated by the expansion, so the trace trick won't really speed things up anyway. Another problem is that the determinant is not always p: sage: B.det() # long time 11 + 484*t^2 + 451*t^3 + O(t^4) However, it appears that the determinant always has the property that if you substitute t -> 11t, you do get the constant series p (mod p**prec). Similarly for the trace. And since the parameter only really makes sense when it's divisible by p anyway, perhaps this isn't a problem after all. """ M = int(M) if M < 2: raise ValueError, "M (=%s) must be at least 2" % M base_ring = Q.base_ring() # Expand out frobenius of dx/y and x dx/y. # (You can substitute frobenius_expansion_by_series here, that will work # as well. See its docstring for some performance notes.) F0, F1, offset = frobenius_expansion_by_newton(Q, p, M) #F0, F1, offset = frobenius_expansion_by_series(Q, p, M) if compute_exact_forms: # we need to do all the work to get the exact expressions f such that F(x^i dx/y) = df + \sum a_i x^i dx/y F0_coeffs = transpose_list(F0.coeffs()) F0_reduced, f_0 = reduce_all(Q, p, F0_coeffs, offset, True) F1_coeffs = transpose_list(F1.coeffs()) F1_reduced, f_1 = reduce_all(Q, p, F1_coeffs, offset, True) elif M == 2: # This implies that only one digit of precision is valid, so we only need # to reduce the second column. Also, the trace doesn't help at all. F0_reduced = [ base_ring(0), base_ring(0) ] F1_coeffs = transpose_list(F1.coeffs()) F1_reduced = reduce_all(Q, p, F1_coeffs, offset) elif trace is None: # No trace provided, just reduce F(dx/y) and F(x dx/y) separately. F0_coeffs = transpose_list(F0.coeffs()) F0_reduced = reduce_all(Q, p, F0_coeffs, offset) F1_coeffs = transpose_list(F1.coeffs()) F1_reduced = reduce_all(Q, p, F1_coeffs, offset) else: # Trace has been provided. # In most cases this can be used to quickly compute F(dx/y) from # F(x dx/y). However, if we're unlucky, the (dx/y)-component of # F(x dx/y) (i.e. the top-right corner of the matrix) may be divisible # by p, in which case there isn't enough information to get the # (x dx/y)-component of F(dx/y) to the desired precision. When this # happens, it turns out that F((x+1) dx/y) always *does* give enough # information (together with the trace) to get both columns to the # desired precision. # First however we need a quick way of telling whether the top-right # corner is divisible by p, i.e. we want to compute the second column # of the matrix mod p. We could do this by just running the entire # algorithm with M = 2 (which assures precision 1). Luckily, we've # already done most of the work by computing F1 to high precision; so # all we need to do is extract the coefficients that would correspond # to the first term of the series, and run the reduction on them. # todo: actually we only need to do this reduction step mod p^2, not # mod p^M, which is what the code currently does. If the base ring # is Integers(p^M), then it's easy. Otherwise it's tricky to construct # the right ring, I don't know how to do it. F1_coeffs = transpose_list(F1.coeffs()) F1_modp_coeffs = F1_coeffs[int((M-2)*p):] # make a copy, because reduce_all will destroy the coefficients: F1_modp_coeffs = [[cell for cell in row] for row in F1_modp_coeffs] F1_modp_offset = offset - (M-2)*p F1_modp_reduced = reduce_all(Q, p, F1_modp_coeffs, F1_modp_offset) if F1_modp_reduced[0].is_unit(): # If the first entry is invertible mod p, then F(x dx/y) is sufficient # to get the whole matrix. F1_reduced = reduce_all(Q, p, F1_coeffs, offset) F0_reduced = [ base_ring(trace) - F1_reduced[1], None ] # using that the determinant is p: F0_reduced[1] = (F0_reduced[0] * F1_reduced[1] - base_ring(p)) \ / F1_reduced[0] else: # If the first entry is zero mod p, then F((x+1) dx/y) will be sufficient # to get the whole matrix. (Here we are using the fact that the second # entry *cannot* be zero mod p. This is guaranteed by some results in # section 3.2 of ``Computation of p-adic Heights and Log Convergence'' # by Mazur, Stein, Tate. But let's quickly check it anyway :-)) assert F1_modp_reduced[1].is_unit(), \ "Hey that's impossible! The second entry in the second column " \ "should be invertible mod p!" G0_coeffs = transpose_list( (F0 + F1).coeffs()) G0_reduced = reduce_all(Q, p, G0_coeffs, offset) # Now G0_reduced expresses F((x+1) dx/y) in terms of dx/y and x dx/y. # Re-express this in terms of (x+1) dx/y and x dx/y. H0_reduced = [ G0_reduced[0], G0_reduced[1] - G0_reduced[0] ] # The thing we're about to divide by better be a unit. assert H0_reduced[1].is_unit(), \ "Hey that's impossible! The second entry in this column " \ "should be invertible mod p!" # Figure out the second column using the trace... H1_reduced = [ None, base_ring(trace) - H0_reduced[0] ] # ... and using that the determinant is p: H1_reduced[0] = (H0_reduced[0] * H1_reduced[1] - base_ring(p)) \ / H0_reduced[1] # Finally, change back to the usual basis (dx/y, x dx/y) F1_reduced = [ H1_reduced[0], \ H1_reduced[0] + H1_reduced[1] ] F0_reduced = [ H0_reduced[0] - F1_reduced[0], H0_reduced[0] + H0_reduced[1] - F1_reduced[1] ] # One more sanity check: our final result should be congruent mod p # to the approximation we used earlier. assert not ( (F1_reduced[0] - F1_modp_reduced[0]).is_unit() or \ (F1_reduced[1] - F1_modp_reduced[1]).is_unit() or \ F0_reduced[0].is_unit() or F0_reduced[1].is_unit()), \ "Hey that's impossible! The output matrix is not congruent mod p " \ "to the approximation found earlier!" if compute_exact_forms: return matrix(base_ring, 2, 2, [F0_reduced[0], F1_reduced[0], F0_reduced[1], F1_reduced[1]]), f_0, f_1 else: return matrix(base_ring, 2, 2, [F0_reduced[0], F1_reduced[0], F0_reduced[1], F1_reduced[1]])
0fd52443e0b365bd518484fa3a3d7778b9ea59ac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0fd52443e0b365bd518484fa3a3d7778b9ea59ac/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 67, 792, 67, 74, 303, 19425, 8384, 12, 53, 16, 293, 16, 490, 16, 2606, 33, 7036, 16, 3671, 67, 17165, 67, 9741, 33, 8381, 4672, 3536, 14169, 281, 326, 3148, 434, 478, 303, 1942...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 792, 67, 74, 303, 19425, 8384, 12, 53, 16, 293, 16, 490, 16, 2606, 33, 7036, 16, 3671, 67, 17165, 67, 9741, 33, 8381, 4672, 3536, 14169, 281, 326, 3148, 434, 478, 303, 1942...
self._list_counter = 0
self.list_counter.append(0)
def visit_enumerated_list(self, node): self._list_counter = 0
e20b3a3adf8de70986f2805e2d77e2bc11ff74aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/e20b3a3adf8de70986f2805e2d77e2bc11ff74aa/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 7924, 19007, 67, 1098, 12, 2890, 16, 756, 4672, 365, 6315, 1098, 67, 7476, 273, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 7924, 19007, 67, 1098, 12, 2890, 16, 756, 4672, 365, 6315, 1098, 67, 7476, 273, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
E.g., search for gtk, it says C, 541."""
E.g., search for gtk, it says C (541)."""
def test_facets_filter_results(self): facets = {u'language': u'Python'}
1432f68d22f42bdd915a14610d3e5545ab581f4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/1432f68d22f42bdd915a14610d3e5545ab581f4e/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11639, 2413, 67, 2188, 67, 4717, 12, 2890, 4672, 21681, 273, 288, 89, 11, 4923, 4278, 582, 11, 15774, 11, 97, 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, 1842, 67, 11639, 2413, 67, 2188, 67, 4717, 12, 2890, 4672, 21681, 273, 288, 89, 11, 4923, 4278, 582, 11, 15774, 11, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if output and result != output:
if overflowrequired:
def testformat(formatstr, args, output=None): if verbose: if output: print "%s %% %s =? %s ..." %\ (repr(formatstr), repr(args), repr(output)), else: print "%s %% %s works? ..." % (repr(formatstr), repr(args)), try: result = formatstr % args except OverflowError: if not overflowok: raise if verbose: print 'overflow (this is fine)' else: if output and result != output: if verbose: print 'no' print "%s %% %s == %s != %s" %\ (repr(formatstr), repr(args), repr(result), repr(output)) else: if verbose: print 'yes'
7c3b50db6614c677588096191d432e734257a244 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/7c3b50db6614c677588096191d432e734257a244/test_format.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2139, 12, 2139, 701, 16, 833, 16, 876, 33, 7036, 4672, 309, 3988, 30, 309, 876, 30, 1172, 2213, 87, 26510, 738, 87, 273, 35, 738, 87, 18483, 738, 64, 261, 12715, 12, 2139, 701,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2139, 12, 2139, 701, 16, 833, 16, 876, 33, 7036, 4672, 309, 3988, 30, 309, 876, 30, 1172, 2213, 87, 26510, 738, 87, 273, 35, 738, 87, 18483, 738, 64, 261, 12715, 12, 2139, 701,...
lambda: self.assert_(self.__state2CallbackCalled),
lambda: self.assert_(self.__state1StopCallbackCalled), lambda: self.assert_(self.__state2StartCallbackCalled), lambda: self.assert_(self.__stop1Start2CallbackOrder),
def makeAnim(): self.anim = avg.StateAnim( [avg.AnimState("STATE1", avg.LinearAnim(self.__node, "x", 200, 0, 100, False, None, state2Callback), "STATE2"), avg.AnimState("STATE2", avg.LinearAnim(self.__node, "x", 200, 100, 50), "STATE3"), avg.AnimState("STATE3", avg.WaitAnim()) ])
fd1410873dfe202309a7dead459b7635945cef62 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/fd1410873dfe202309a7dead459b7635945cef62/AnimTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 20892, 13332, 365, 18, 304, 381, 273, 11152, 18, 1119, 20892, 12, 306, 14141, 18, 20892, 1119, 2932, 7998, 21, 3113, 11152, 18, 15982, 20892, 12, 2890, 16186, 2159, 16, 315, 92, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 20892, 13332, 365, 18, 304, 381, 273, 11152, 18, 1119, 20892, 12, 306, 14141, 18, 20892, 1119, 2932, 7998, 21, 3113, 11152, 18, 15982, 20892, 12, 2890, 16186, 2159, 16, 315, 92, 31...
(e[0], e[2], str(error))
(e[0], e[2], str(result))
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = int(now) gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='AM' else: ampm='PM' jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%B', calendar.month_name[now[1]], 'full month name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%p', ampm, 'AM or PM as appropriate'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%U', '%02d' % ((now[7] + jan1[6])/7), 'week number of the year (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), 'week number of the year (Mon 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('%Y', '%d' % now[0], 'year with century'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Z', tz, 'time zone name'), ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( ('%C', '%02d' % (now[0]/100), 'century'), # This is for IRIX; on Solaris, %C yields date(1) format. # Tough. ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%s', '%d' % nowsecs, 'seconds since the Epoch in UCT'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ('%n', '\n', 'newline character'), ('%t', '\t', 'tab character'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, string.split(sys.version)[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if result == e[1]: continue if result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(error)) continue if result == e[1]: if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
4dfd458611b706055deccb024f8bf9f27a9e97d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4dfd458611b706055deccb024f8bf9f27a9e97d6/test_strftime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 1222, 395, 12, 3338, 4672, 309, 3988, 30, 1172, 315, 701, 9982, 1842, 364, 3113, 813, 18, 21261, 12, 3338, 13, 2037, 21317, 273, 509, 12, 3338, 13, 314, 1010, 273, 813, 18, 75, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 1222, 395, 12, 3338, 4672, 309, 3988, 30, 1172, 315, 701, 9982, 1842, 364, 3113, 813, 18, 21261, 12, 3338, 13, 2037, 21317, 273, 509, 12, 3338, 13, 314, 1010, 273, 813, 18, 75, ...
if not line.startswith('+++ '): return None words = line.split(None, 2) if len(words[1]) < len(filename): filename = words[1] groups = [] output.append({'filename' : filename, 'oldrev' : fromrev, 'newrev' : 'new', 'diff' : groups}) for line in lines: r = re.match(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@', line) if not r: break blocks = [] groups.append(blocks) fromline,fromend,toline,toend = map(int, r.groups()) last_type = None fromend += fromline toend += toline while fromline < fromend or toline < toend:
while True: if not line.startswith('--- '):
def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * '&nbsp; ' + mod * '&nbsp;'
c3f3250176a1bf58fcba199c885986b4ab85819c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/c3f3250176a1bf58fcba199c885986b4ab85819c/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
(-0.440242867236, -0.567868371314, -0.695493875393)
(...0.440242867..., ...0.567868371..., ...0.695493875...)
def __call__(self, x, coerce=True, copy=True, check=True): r""" Create an element of this free module from x.
bbbbc10a89ee8b11acc8a239dfce4771061bb6f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/bbbbc10a89ee8b11acc8a239dfce4771061bb6f6/free_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 12270, 33, 5510, 16, 1610, 33, 5510, 16, 866, 33, 5510, 4672, 436, 8395, 1788, 392, 930, 434, 333, 4843, 1605, 628, 619, 18, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 12270, 33, 5510, 16, 1610, 33, 5510, 16, 866, 33, 5510, 4672, 436, 8395, 1788, 392, 930, 434, 333, 4843, 1605, 628, 619, 18, 2, -100, -100, -1...
print >>log, "%s[%d:%d] - %s, %s" % (path, line, column, public, system) print_exception(type, value, traceback, file=open("error.log", "wt"))
if column is None: print >>log, "%s[%d] - %s, %s" % (path, line, public, system) else: print >>log, "%s[%d:%d] - %s, %s" % (path, line, column, public, system) print_exception(type_, value, traceback, file=open("error.log", "wt"))
def loadPath(self, path, id): if not os.path.exists(path): path = path + '.xml' if not os.path.exists(path): path = path + '.gz' if not os.path.exists(path): raise IOError, "Unable to find data for %s" % id if self._cache and not self._cache.isNewer(path): obj = self._cache.getObject(id) if obj is not None: return obj if path.endswith('.gz'): if GzipFile is None: raise IOError, "Unable to open '%s', since zlib appears to be missing or improperly installed (%s)." % (path, GzipError) f = GzipFile(path, "rb") else: f = open(path, "rt") data = f.read() fh = FileHandler(id=id) ceh = CompilerErrorHandler(path, id) try: xml.sax.parseString(data, fh, ceh) except RuntimeError: raise except StandardError, e: locator = fh._locator column = locator.getColumnNumber() line = locator.getLineNumber() public = locator.getPublicId() system = locator.getSystemId() print "In source file \"%s\" [line %d, col %d]" % (path, line, column), if public is not None or system is not None: print " - %s, %s" % (public, system) print print "Exception:", e type, value, traceback = sys.exc_info() log = open("error.log", "wt") if log is not None: print >>log, "%s[%d:%d] - %s, %s" % (path, line, column, public, system) print_exception(type, value, traceback, file=open("error.log", "wt")) print "Exception traceback saved to error.log" else: raise sys.exit(1) self.addReferences(id, self._paths, fh._paths) self.addReferences(id, self._externals, fh._externals) return fh.getElement()
6e5a4f2b64c4209f9416439d852eeefd954c7125 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/6e5a4f2b64c4209f9416439d852eeefd954c7125/Parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 743, 12, 2890, 16, 589, 16, 612, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 589, 273, 589, 397, 2418, 2902, 11, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 743, 12, 2890, 16, 589, 16, 612, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 589, 273, 589, 397, 2418, 2902, 11, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, ...
subDir = os.sep+os.path.relpath(self.directory, orngEnviron.widgetDir) if "relpath" in os.path.__dict__ else self.directory.replace(orngEnviron.widgetDir, "") return os.path.join(orngEnviron.orangeDocDir, "catalog%s" % subDir)
dir, widgetDir = os.path.realpath(self.directory), os.path.realpath(orngEnviron.widgetDir) subDir = os.path.relpath(dir, widgetDir) if "relpath" in os.path.__dict__ else dir.replace(widgetDir, "") return os.path.join(orngEnviron.orangeDocDir, "catalog", subDir)
def docDir(self): if not self.addOn: # A built-in widget subDir = os.sep+os.path.relpath(self.directory, orngEnviron.widgetDir) if "relpath" in os.path.__dict__ else self.directory.replace(orngEnviron.widgetDir, "") return os.path.join(orngEnviron.orangeDocDir, "catalog%s" % subDir) else: # An add-on widget addOnDocDir = self.addOn.directoryDocumentation() return os.path.join(addOnDocDir, "widgets")
c941b286e0e8cc220023cee6643c6edd31247126 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/c941b286e0e8cc220023cee6643c6edd31247126/orngRegistry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 1621, 12, 2890, 4672, 309, 486, 365, 18, 1289, 1398, 30, 225, 468, 432, 6650, 17, 267, 3604, 1577, 16, 3604, 1621, 273, 1140, 18, 803, 18, 7688, 803, 12, 2890, 18, 5149, 3631, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 1621, 12, 2890, 4672, 309, 486, 365, 18, 1289, 1398, 30, 225, 468, 432, 6650, 17, 267, 3604, 1577, 16, 3604, 1621, 273, 1140, 18, 803, 18, 7688, 803, 12, 2890, 18, 5149, 3631, 1...
sd = rp.conn.win32security.GetFileSecurity(rp.path, ACL.flags)
sd = rp.conn.win32security.GetNamedSecurityInfo(rp.path, SE_FILE_OBJECT, ACL.flags)
def clear_rp(self, rp): # not sure how to interpret this # I'll jus clear all acl-s from rp.path sd = rp.conn.win32security.GetFileSecurity(rp.path, ACL.flags)
586efa17c5816bc6e90ce3256339d13939c14c95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6202/586efa17c5816bc6e90ce3256339d13939c14c95/win_acls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 67, 13832, 12, 2890, 16, 8715, 4672, 468, 486, 3071, 3661, 358, 10634, 333, 468, 467, 5614, 525, 407, 2424, 777, 7895, 17, 87, 628, 8715, 18, 803, 8349, 273, 8715, 18, 4646, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 67, 13832, 12, 2890, 16, 8715, 4672, 468, 486, 3071, 3661, 358, 10634, 333, 468, 467, 5614, 525, 407, 2424, 777, 7895, 17, 87, 628, 8715, 18, 803, 8349, 273, 8715, 18, 4646, 18, ...
result = self.__class__([])
result = self.__class__()
def __deepcopy__(self, memo): """Return a deep copy of a set; used by copy module.""" # This pre-creates the result and inserts it in the memo # early, in case the deep copy recurses into another reference # to this same set. A set can't be an element of itself, but # it can certainly contain an object that has a reference to # itself. from copy import deepcopy result = self.__class__([]) memo[id(self)] = result data = result._data value = True for elt in self: data[deepcopy(elt, memo)] = value return result
18952fe218a31e2eef50fe38038baad8fa07c355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/18952fe218a31e2eef50fe38038baad8fa07c355/sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16589, 3530, 972, 12, 2890, 16, 11063, 4672, 3536, 990, 279, 4608, 1610, 434, 279, 444, 31, 1399, 635, 1610, 1605, 12123, 468, 1220, 675, 17, 19787, 326, 563, 471, 15607, 518, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16589, 3530, 972, 12, 2890, 16, 11063, 4672, 3536, 990, 279, 4608, 1610, 434, 279, 444, 31, 1399, 635, 1610, 1605, 12123, 468, 1220, 675, 17, 19787, 326, 563, 471, 15607, 518, 316,...
while (i<len(messages)): oldmessages.append(messages[i]) if (messages[i]<=lastinquiry): del messages[i] else:
while (i<len(curr_msgs)): filename=userdir+"received/voice-"+str(curr_msgs[i])+".la" descr=cs_helpers.readConfig(filename[:-2]+"txt") capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"nachricht.la"),1) cs_helpers.sayNumber(call,str(i+1),curr_user,config) if (descr.get('GLOBAL','call_from')!="??"): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"von.la"),1) cs_helpers.sayNumber(call,descr.get('GLOBAL','call_from'),curr_user,config) if (descr.get('GLOBAL','call_to')!="??"): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"fuer.la"),1) cs_helpers.sayNumber(call,descr.get('GLOBAL','call_to'),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"am.la"),1) calltime=time.strptime(descr.get('GLOBAL','time')) cs_helpers.sayNumber(call,str(calltime[2]),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"..la"),1) cs_helpers.sayNumber(call,str(calltime[1]),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"..la"),1) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"um.la"),1) cs_helpers.sayNumber(call,str(calltime[3]),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"uhr.la"),1) cs_helpers.sayNumber(call,str(calltime[4]),curr_user,config) capisuite.audio_send(call,filename,1) cmd="" while (cmd not in ("1","4","5","6")): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"erklaerung.la"),1) cmd=capisuite.read_DTMF(call,0,1) if (cmd=="1"): os.remove(filename) os.remove(filename[:-2]+"txt") del curr_msgs[i] capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"nachricht-gelscht.la")) elif (cmd=="4"): if (curr_msgs[i]>lastinquiry): lastinquiry=curr_msgs[i] lastfile=open(userdir+"received/last_inquiry","w") lastfile.write(str(curr_msgs[i])+"\n") lastfile.close()
def remoteInquiry(call,userdir,curr_user,config): import time,fcntl,errno,os # acquire lock lockfile=open(userdir+"received/inquiry_lock","w") try: try: # read directory contents fcntl.lockf(lockfile,fcntl.LOCK_EX | fcntl.LOCK_NB) # only one inquiry at a time! messages=os.listdir(userdir+"received/") messages=filter (lambda s: re.match("voice-.*\.la",s),messages) # only use voice-* files messages=map(lambda s: int(re.match("voice-([0-9]+)\.la",s).group(1)),messages) # filter out numbers messages.sort() # read the number of the message heard last at the last inquiry lastinquiry=-1 if (os.access(userdir+"received/last_inquiry",os.W_OK)): lastfile=open(userdir+"received/last_inquiry","r") lastinquiry=int(lastfile.readline()) lastfile.close() # sort out old messages oldmessages=[] i=0 while (i<len(messages)): oldmessages.append(messages[i]) if (messages[i]<=lastinquiry): del messages[i] else: i+=1 cs_helpers.sayNumber(call,str(len(messages)),curr_user,config) if (len(messages)==1): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"neue-nachricht.la"),1) else: capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"neue-nachrichten.la"),1) # menu for record new announcement cmd="" while (cmd not in ("1","9")): if (len(oldmessages)): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"zum-abhoeren-1.la"),1) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"fuer-neue-ansage-9.la"),1) cmd=capisuite.read_DTMF(call,0,1) if (cmd=="9"): newAnnouncement(call,userdir,curr_user,config) return # start inquiry for curr_msgs in (messages,oldmessages): cs_helpers.sayNumber(call,str(len(curr_msgs)),curr_user,config) if (curr_msgs==messages): if (len(curr_msgs)==1): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"neue-nachricht.la"),1) else: capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"neue-nachrichten.la"),1) else: if (len(curr_msgs)==1): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"nachricht.la"),1) else: capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"nachrichten.la"),1) i=0 while (i<len(curr_msgs)): filename=userdir+"received/voice-"+str(curr_msgs[i])+".la" descr=cs_helpers.readConfig(filename[:-2]+"txt") capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"nachricht.la"),1) cs_helpers.sayNumber(call,str(i+1),curr_user,config) if (descr.get('GLOBAL','call_from')!="??"): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"von.la"),1) cs_helpers.sayNumber(call,descr.get('GLOBAL','call_from'),curr_user,config) if (descr.get('GLOBAL','call_to')!="??"): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"fuer.la"),1) cs_helpers.sayNumber(call,descr.get('GLOBAL','call_to'),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"am.la"),1) calltime=time.strptime(descr.get('GLOBAL','time')) cs_helpers.sayNumber(call,str(calltime[2]),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"..la"),1) cs_helpers.sayNumber(call,str(calltime[1]),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"..la"),1) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"um.la"),1) cs_helpers.sayNumber(call,str(calltime[3]),curr_user,config) capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"uhr.la"),1) cs_helpers.sayNumber(call,str(calltime[4]),curr_user,config) capisuite.audio_send(call,filename,1) cmd="" while (cmd not in ("1","4","5","6")): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"erklaerung.la"),1) cmd=capisuite.read_DTMF(call,0,1) if (cmd=="1"): os.remove(filename) os.remove(filename[:-2]+"txt") if (curr_msgs==messages): # if we are in new message mode... oldmessages.remove(curr_msgs[i]) # ... don't forget to delete it in both lists del curr_msgs[i] capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"nachricht-gelscht.la")) elif (cmd=="4"): if (curr_msgs[i]>lastinquiry): lastinquiry=curr_msgs[i] lastfile=open(userdir+"received/last_inquiry","w") lastfile.write(str(curr_msgs[i])+"\n") lastfile.close() i+=1 elif (cmd=="5"): i-=1 capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"keine-weiteren-nachrichten.la")) except IOError,err: if (err.errno in (errno.EACCES,errno.EAGAIN)): capisuite.audio_send(call,cs_helpers.getAudio(config,curr_user,"fernabfrage-aktiv.la")) finally: # unlock fcntl.lockf(lockfile,fcntl.LOCK_UN) lockfile.close() os.unlink(userdir+"received/inquiry_lock")
5c0e4bae34d0d813ee56a5af75e1c7037796ab19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3251/5c0e4bae34d0d813ee56a5af75e1c7037796ab19/incoming.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 382, 372, 6913, 12, 1991, 16, 1355, 1214, 16, 17016, 67, 1355, 16, 1425, 4672, 1930, 813, 16, 7142, 16681, 16, 19088, 16, 538, 468, 10533, 2176, 2176, 768, 33, 3190, 12, 1355, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 382, 372, 6913, 12, 1991, 16, 1355, 1214, 16, 17016, 67, 1355, 16, 1425, 4672, 1930, 813, 16, 7142, 16681, 16, 19088, 16, 538, 468, 10533, 2176, 2176, 768, 33, 3190, 12, 1355, 12...
def shuffle (self, ics):
def shuffle (self, ics, time=None):
def shuffle (self, ics): """ Takes a set of initial conditions (ics) and returns a new dance sequence. """ shuffled = [] traj = self.ode (ics) step = len (traj) / len (self.mapping.keys ()) length = len (traj) * step
72dee765deb3d02b4936c70ec8fa6a3755e6533b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/72dee765deb3d02b4936c70ec8fa6a3755e6533b/Sequence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12552, 261, 2890, 16, 277, 2143, 16, 813, 33, 7036, 4672, 3536, 23004, 279, 444, 434, 2172, 4636, 261, 2102, 13, 471, 1135, 279, 394, 302, 1359, 3102, 18, 3536, 699, 3809, 1259, 273, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12552, 261, 2890, 16, 277, 2143, 16, 813, 33, 7036, 4672, 3536, 23004, 279, 444, 434, 2172, 4636, 261, 2102, 13, 471, 1135, 279, 394, 302, 1359, 3102, 18, 3536, 699, 3809, 1259, 273, 5...
may also be a string, which will be converted to a Literal
may also be a string, which will be converted to a Literal; if numTerms is 3, opExpr is a tuple of two expressions, for the two operators separating the 3 terms
def operatorPrecedence( baseExpr, opList ): """Helper method for constructing grammars of expressions made up of operators working in a precedence hierarchy. Operators may be unary or binary, left- or right-associative. Parse actions can also be attached to operator expressions. Parameters: - baseExpr - expression representing the most basic element for the nested - opList - list of tuples, one for each operator precedence level in the expression grammar; each tuple is of the form (opExpr, numTerms, rightLeftAssoc, parseAction), where: - opExpr is the pyparsing expression for the operator; may also be a string, which will be converted to a Literal - numTerms is the number of terms for this operator (must be 1 or 2) - rightLeftAssoc is the indicator whether the operator is right or left associative, using the pyparsing-defined constants opAssoc.RIGHT and opAssoc.LEFT. - parseAction is the parse action to be associated with expressions matching this operator expression (the parse action tuple member may be omitted) """ ret = Forward() lastExpr = baseExpr | ( Suppress('(') + ret + Suppress(')') ) for i,operDef in enumerate(opList): opExpr,arity,rightLeftAssoc,pa = (operDef + (None,))[:4] thisExpr = Forward()#.setName("expr%d" % i) if rightLeftAssoc == opAssoc.LEFT: if arity == 1: matchExpr = Group( FollowedBy(lastExpr + opExpr) + lastExpr + OneOrMore( opExpr ) ) elif arity == 2: matchExpr = Group( FollowedBy(lastExpr + opExpr + lastExpr) + lastExpr + OneOrMore( opExpr + lastExpr ) ) else: raise ValueError, "operator must be unary (1) or binary (2)" elif rightLeftAssoc == opAssoc.RIGHT: if arity == 1: # try to avoid LR with this extra test if not isinstance(opExpr, Optional): opExpr = Optional(opExpr) matchExpr = FollowedBy(opExpr.expr + thisExpr) + Group( opExpr + thisExpr ) elif arity == 2: matchExpr = Group( FollowedBy(lastExpr + opExpr + thisExpr) + lastExpr + OneOrMore( opExpr + thisExpr ) ) else: raise ValueError, "operator must be unary (1) or binary (2)" else: raise ValueError, "operator must indicate right or left associativity" if pa: matchExpr.setParseAction( pa ) thisExpr << ( matchExpr | lastExpr ) lastExpr = thisExpr ret << lastExpr return ret
e11e354180d47d9e1233615eda3a3bb17da06d82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3693/e11e354180d47d9e1233615eda3a3bb17da06d82/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3726, 1386, 24092, 12, 1026, 4742, 16, 27571, 262, 30, 3536, 2276, 707, 364, 27389, 6473, 87, 434, 8041, 7165, 731, 434, 12213, 5960, 316, 279, 14172, 9360, 18, 225, 7692, 3062, 2026, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3726, 1386, 24092, 12, 1026, 4742, 16, 27571, 262, 30, 3536, 2276, 707, 364, 27389, 6473, 87, 434, 8041, 7165, 731, 434, 12213, 5960, 316, 279, 14172, 9360, 18, 225, 7692, 3062, 2026, 50...
"""Iterates over all Fragment objects. The iteration is performed in order according to the Fragment's position within the Segment object.
"""Iterates over all Fragment objects. The iteration is performed in order according to the Fragment's position within the Segment object.
def iter_fragments(self, frag_id_begin = None, frag_id_end = None): """Iterates over all Fragment objects. The iteration is performed in order according to the Fragment's position within the Segment object. """ return iter_fragments(iter(self.fragment_list), frag_id_begin, frag_id_end)
a181eacbeb3c68b8f7caba918a821d3f3e6c50f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/a181eacbeb3c68b8f7caba918a821d3f3e6c50f6/Structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 29528, 12, 2890, 16, 10111, 67, 350, 67, 10086, 273, 599, 16, 10111, 67, 350, 67, 409, 273, 599, 4672, 3536, 22051, 1879, 777, 18009, 2184, 18, 1021, 6532, 353, 9591, 316, 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, 1400, 67, 29528, 12, 2890, 16, 10111, 67, 350, 67, 10086, 273, 599, 16, 10111, 67, 350, 67, 409, 273, 599, 4672, 3536, 22051, 1879, 777, 18009, 2184, 18, 1021, 6532, 353, 9591, 316, 13...
... print("caught ValueError (%s)" % (v), end=' ')
... print("caught ValueError (%s)" % (v))
>>> def f():
944a38a57407e7641b7c63f5341e83cbe0da7480 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/944a38a57407e7641b7c63f5341e83cbe0da7480/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
keyval = 'goal' sysID = self.xmlU.generateSysID(keyval) recID = self.xmlU.generateRecID(keyval) goal = ET.SubElement(goals, "goal") goal.attrib["record_id"] = recID goal.attrib["system_id"] = sysID goal.attrib["date_added"] = datetime.now().isoformat() goal.attrib["date_updated"] = datetime.now().isoformat() return goal
keyval = 'goal' sysID = self.xmlU.generateSysID(keyval) recID = self.xmlU.generateRecID(keyval) goal = ET.SubElement(goals, "goal") goal.attrib["record_id"] = recID goal.attrib["system_id"] = sysID goal.attrib["date_added"] = datetime.now().isoformat() goal.attrib["date_updated"] = datetime.now().isoformat() return goal
def createGoal(self, goals):
47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 27716, 12, 2890, 16, 1960, 1031, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 27716, 12, 2890, 16, 1960, 1031, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.need_unicode: myquery = unicode(query, self.encoding) return cursor.execute(myquery) else: return cursor.execute(query)
if self.need_unicode and not isinstance(query, unicode): query = unicode(query, self.encoding) return cursor.execute(query)
def _executeRetry(self, conn, cursor, query): # When a server connection is lost and a query is attempted, most of # the time the query will raise a SERVER_LOST exception, then at the # second attempt to execute it, the mysql lib will reconnect and # succeed. However is a few cases, the first attempt raises the # SERVER_GONE exception, the second attempt the SERVER_LOST exception # and only the third succeeds. Thus the 3 in the loop count. # If it doesn't reconnect even after 3 attempts, while the database is # up and running, it is because a 5.0.3 (or newer) server is used # which no longer permits autoreconnects by default. In that case a # reconnect flag must be set when making the connection to indicate # that autoreconnecting is desired. In MySQLdb 1.2.2 or newer this is # done by calling ping(True) on the connection. for count in range(3): try: if self.need_unicode: # For MysqlDB 1.2.1 and later, we go # encoding->unicode->charset (in the mysql db) myquery = unicode(query, self.encoding) return cursor.execute(myquery) else: return cursor.execute(query) except MySQLdb.OperationalError, e: if e.args[0] in (MySQLdb.constants.CR.SERVER_GONE_ERROR, MySQLdb.constants.CR.SERVER_LOST): if count == 2: raise OperationalError(ErrorMessage(e)) if self.debug: self.printDebug(conn, str(e), 'ERROR') else: raise OperationalError(ErrorMessage(e)) except MySQLdb.IntegrityError, e: msg = ErrorMessage(e) if e.args[0] == MySQLdb.constants.ER.DUP_ENTRY: raise DuplicateEntryError(msg) else: raise IntegrityError(msg) except MySQLdb.InternalError, e: raise InternalError(ErrorMessage(e)) except MySQLdb.ProgrammingError, e: raise ProgrammingError(ErrorMessage(e)) except MySQLdb.DataError, e: raise DataError(ErrorMessage(e)) except MySQLdb.NotSupportedError, e: raise NotSupportedError(ErrorMessage(e)) except MySQLdb.DatabaseError, e: raise DatabaseError(ErrorMessage(e)) except MySQLdb.InterfaceError, e: raise InterfaceError(ErrorMessage(e)) except MySQLdb.Warning, e: raise Warning(ErrorMessage(e)) except MySQLdb.Error, e: raise Error(ErrorMessage(e))
bc0b9c1b826e33157dff7807d23de088065c6333 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8798/bc0b9c1b826e33157dff7807d23de088065c6333/mysqlconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 7539, 12, 2890, 16, 1487, 16, 3347, 16, 843, 4672, 468, 5203, 279, 1438, 1459, 353, 13557, 471, 279, 843, 353, 18121, 16, 4486, 434, 468, 326, 813, 326, 843, 903, 1002, 279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8837, 7539, 12, 2890, 16, 1487, 16, 3347, 16, 843, 4672, 468, 5203, 279, 1438, 1459, 353, 13557, 471, 279, 843, 353, 18121, 16, 4486, 434, 468, 326, 813, 326, 843, 903, 1002, 279,...
elif '-'.join((p.ver, p.rel)) == '-'.join((dbp.pkgver, dbp.pkgrel)):
elif p.ver == dbp.pkgver and p.rel == dbp.pkgrel:
def db_update(archname, reponame, pkgs, options): """ Parses a list and updates the Arch dev database accordingly. Arguments: pkgs -- A list of Pkg objects. """ logger.info('Updating Arch: %s' % archname) force = options.get('force', False) filesonly = options.get('filesonly', False) repository = Repo.objects.get(name__iexact=reponame) architecture = Arch.objects.get(name__iexact=archname) dbpkgs = Package.objects.filter(arch=architecture, repo=repository) # It makes sense to fully evaluate our DB query now because we will # be using 99% of the objects in our "in both sets" loop. Force eval # by calling list() on the QuerySet. list(dbpkgs) # This makes our inner loop where we find packages by name *way* more # efficient by not having to go to the database for each package to # SELECT them by name. dbdict = dict([(pkg.pkgname, pkg) for pkg in dbpkgs]) logger.debug("Creating sets") dbset = set([pkg.pkgname for pkg in dbpkgs]) syncset = set([pkg.name for pkg in pkgs]) logger.info("%d packages in current web DB" % len(dbset)) logger.info("%d packages in new updating db" % len(syncset)) in_sync_not_db = syncset - dbset logger.info("%d packages in sync not db" % len(in_sync_not_db)) # Try to catch those random orphaning issues that make Eric so unhappy. if len(dbset): dbpercent = 100.0 * len(syncset) / len(dbset) else: dbpercent = 0.0 logger.info("DB package ratio: %.1f%%" % dbpercent) # Fewer than 20 packages makes the percentage check unreliable, but it also # means we expect the repo to fluctuate a lot. msg = "Package database has %.1f%% the number of packages in the " \ "web database" % dbpercent if len(dbset) > 20 and dbpercent < 50.0 and not repository.testing: logger.error(msg) raise Exception(msg) if dbpercent < 75.0: logger.warning(msg) if not filesonly: # packages in syncdb and not in database (add to database) for p in [x for x in pkgs if x.name in in_sync_not_db]: logger.info("Adding package %s", p.name) pkg = Package(pkgname = p.name, arch = architecture, repo = repository) populate_pkg(pkg, p, timestamp=datetime.now()) # packages in database and not in syncdb (remove from database) in_db_not_sync = dbset - syncset for p in in_db_not_sync: logger.info("Removing package %s from database", p) Package.objects.get( pkgname=p, arch=architecture, repo=repository).delete() # packages in both database and in syncdb (update in database) pkg_in_both = syncset & dbset for p in [x for x in pkgs if x.name in pkg_in_both]: logger.debug("Looking for package updates") dbp = dbdict[p.name] timestamp = None # for a force, we don't want to update the timestamp. # for a non-force, we don't want to do anything at all. if filesonly: pass elif '-'.join((p.ver, p.rel)) == '-'.join((dbp.pkgver, dbp.pkgrel)): if not force: continue else: timestamp = datetime.now() if filesonly: logger.debug("Checking files for package %s in database", p.name) populate_files(dbp, p) else: logger.info("Updating package %s in database", p.name) populate_pkg(dbp, p, force=force, timestamp=timestamp) logger.info('Finished updating Arch: %s' % archname)
fcc6d98bc438ea917c757ee1a565a5dba625f333 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11256/fcc6d98bc438ea917c757ee1a565a5dba625f333/reporead.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 67, 2725, 12, 991, 529, 16, 283, 500, 339, 16, 16922, 16, 702, 4672, 3536, 2280, 2420, 279, 666, 471, 4533, 326, 16959, 4461, 2063, 15905, 18, 225, 13599, 30, 16922, 1493, 432, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 67, 2725, 12, 991, 529, 16, 283, 500, 339, 16, 16922, 16, 702, 4672, 3536, 2280, 2420, 279, 666, 471, 4533, 326, 16959, 4461, 2063, 15905, 18, 225, 13599, 30, 16922, 1493, 432, 6...
self.theAutoChangeFlag = 0
def updateBySubtractbutton( self,obj ):
d6afe4061131c3989292a58918940112ac0c8b2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/d6afe4061131c3989292a58918940112ac0c8b2d/BargraphWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 858, 27904, 5391, 12, 365, 16, 2603, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 858, 27904, 5391, 12, 365, 16, 2603, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
M_NS = {
M_NS = {
def rmcol(self, cr): return False
fe0ee384c7b5a64c12f8725027352df173701456 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fe0ee384c7b5a64c12f8725027352df173701456/caldav_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6692, 1293, 12, 2890, 16, 4422, 4672, 327, 1083, 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, 6692, 1293, 12, 2890, 16, 4422, 4672, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return self._executeSingleFileCatalogFunction( lfn, 'isDirectory', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'isDirectory', catalogs=catalogs ) def getCatalogDirectoryMetadata( self, lfn, singleFile=False, catalogs=[] ):
return self._executeSingleFileCatalogFunction( lfn, 'isDirectory', catalogs = catalogs ) else: return self._executeFileCatalogFunction( lfn, 'isDirectory', catalogs = catalogs ) def getCatalogDirectoryMetadata( self, lfn, singleFile = False, catalogs = [] ):
def getCatalogIsDirectory( self, lfn, singleFile=False, catalogs=[] ): """ Determine whether the path is registered as a directory in the FileCatalog 'lfn' is the files to check (can be a single file or list of lfns) """ if singleFile: return self._executeSingleFileCatalogFunction( lfn, 'isDirectory', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'isDirectory', catalogs=catalogs )
8cfc8d124489ba672254aee3d1fff4f748757c6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8cfc8d124489ba672254aee3d1fff4f748757c6c/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1927, 4392, 2520, 2853, 12, 365, 16, 328, 4293, 16, 2202, 812, 33, 8381, 16, 26455, 33, 8526, 262, 30, 3536, 10229, 2856, 326, 589, 353, 4104, 487, 279, 1867, 316, 326, 1387, 9769, 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, 1927, 4392, 2520, 2853, 12, 365, 16, 328, 4293, 16, 2202, 812, 33, 8381, 16, 26455, 33, 8526, 262, 30, 3536, 10229, 2856, 326, 589, 353, 4104, 487, 279, 1867, 316, 326, 1387, 9769, 225...
if 'site_ids' in person and site_id not in person['site_ids']:
def add_person(self, person, commit = True): """ Add person to existing site. """
84507e9f37868966f34f1184f902986b6004a812 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/84507e9f37868966f34f1184f902986b6004a812/Sites.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12479, 12, 2890, 16, 6175, 16, 3294, 273, 1053, 4672, 3536, 1436, 6175, 358, 2062, 2834, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12479, 12, 2890, 16, 6175, 16, 3294, 273, 1053, 4672, 3536, 1436, 6175, 358, 2062, 2834, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.skip = skip
self.skip = map(lambda f,r=self.root: r+f, skip)
def __init__(self, root, skip = []): self.root = root self.skip = skip GSTestCase.__init__(self)
63d472f3b86b7cb80ea20176b5c5463f0db41975 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1296/63d472f3b86b7cb80ea20176b5c5463f0db41975/check_source.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1365, 16, 2488, 273, 5378, 4672, 365, 18, 3085, 273, 1365, 365, 18, 7457, 273, 852, 12, 14661, 284, 16, 86, 33, 2890, 18, 3085, 30, 436, 15, 74, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1365, 16, 2488, 273, 5378, 4672, 365, 18, 3085, 273, 1365, 365, 18, 7457, 273, 852, 12, 14661, 284, 16, 86, 33, 2890, 18, 3085, 30, 436, 15, 74, 16, ...
if ((COMPILER=="MSVC7") and opts.count("MAYA5")): cmd = cmd + ' -I"' + Maya5SDK + 'include"' if ((COMPILER=="MSVC7") and opts.count("MAYA6")): cmd = cmd + ' -I"' + Maya6SDK + 'include"'
if ((COMPILER=="MSVC7") and opts.count("MAYA5")): cmd = cmd + ' -I"' + MAYASDK["MAYA5"] + '/include"' if ((COMPILER=="MSVC7") and opts.count("MAYA6")): cmd = cmd + ' -I"' + MAYASDK["MAYA6"] + '/include"'
def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0): if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)): sys.exit("syntax error in Interrogate directive") ALLIN.append(outd) ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] outd = PREFIX+"/pandac/input/"+outd outc = PREFIX+"/tmp/"+outc paths = xpaths(src+"/",files,"") dep = CxxCalcDependenciesAll(paths, ipath) dotdots = "" for i in range(0,src.count("/")+1): dotdots = dotdots + "../" building = 0 for x in opts: if (x[:9]=="BUILDING_"): building = x[9:] if (older(outc, dep) or older(outd, dep)): if (COMPILER=="MSVC7"): cmd = dotdots + PREFIX + "/bin/interrogate.exe" cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING' if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING' cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc' cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/win-libs-vc7/" + pkg.lower() + "/include" if (COMPILER=="LINUXA"): cmd = dotdots + PREFIX + '/bin/interrogate' cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' ' if (OPTIMIZE==4): cmd = cmd + ' ' cmd = cmd + ' -S' + dotdots + PREFIX + '/include/parser-inc -S/usr/include' cmd = cmd + ' -I' + dotdots + PREFIX + '/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I' + dotdots + THIRDPARTY + "/linux-libs-a/" + pkg.lower() + "/include" cmd = cmd + ' -oc ' + dotdots + outc + ' -od ' + dotdots + outd cmd = cmd + ' -fnames -string -refcount -assert -python' for x in ipath: cmd = cmd + ' -I' + dotdots + x if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" cmd = cmd + ' -module ' + module + ' -library ' + library if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"' if ((COMPILER=="MSVC7") and opts.count("MAYA5")): cmd = cmd + ' -I"' + Maya5SDK + 'include"' if ((COMPILER=="MSVC7") and opts.count("MAYA6")): cmd = cmd + ' -I"' + Maya6SDK + 'include"' for x in files: cmd = cmd + ' ' + x oslocalcmd(src, cmd) updatefiledate(outd) updatefiledate(outc)
3c98662297c774af33b1cab289c99746e2a28ca5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/3c98662297c774af33b1cab289c99746e2a28ca5/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 15283, 12, 625, 421, 33, 20, 16, 1500, 33, 20, 16, 596, 72, 33, 20, 16, 596, 71, 33, 20, 16, 1705, 33, 20, 16, 1605, 33, 20, 16, 5313, 33, 20, 16, 1390, 33, 20, 4672, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5294, 15283, 12, 625, 421, 33, 20, 16, 1500, 33, 20, 16, 596, 72, 33, 20, 16, 596, 71, 33, 20, 16, 1705, 33, 20, 16, 1605, 33, 20, 16, 5313, 33, 20, 16, 1390, 33, 20, 4672, 309...
if self.ruleModel and self.ruleModel.rulesets != rulesets:
if not self.ruleModel or self.ruleModel.rulesets != rulesets:
def fset(self, rulesets): if self.ruleModel and self.ruleModel.rulesets != rulesets: if self.btnRemove and self.btnCopy: self.ruleModel = EditableRuleModel(rulesets, self.name) else: self.ruleModel = RuleModel(rulesets, self.name) self.setModel(self.ruleModel)
88aa0417cb84fc506f895b7630d50e7863efd6a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/88aa0417cb84fc506f895b7630d50e7863efd6a3/rulesetselector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30141, 12, 2890, 16, 2931, 2413, 4672, 309, 486, 365, 18, 5345, 1488, 578, 365, 18, 5345, 1488, 18, 7482, 2413, 480, 2931, 2413, 30, 309, 365, 18, 11898, 3288, 471, 365, 18, 11898, 295...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30141, 12, 2890, 16, 2931, 2413, 4672, 309, 486, 365, 18, 5345, 1488, 578, 365, 18, 5345, 1488, 18, 7482, 2413, 480, 2931, 2413, 30, 309, 365, 18, 11898, 3288, 471, 365, 18, 11898, 295...
MessageDialog ("Question", "There are unsaved modifications. Exit anyway?", ["Yes", "No"], self.doExit)
dialog = gtk.MessageDialog ( mainWindow, gtk.DIALOG_DESTROY_WITH_PARENT|gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, "There are unsaved modifications. Exit anyway?") dialog.connect ("response", self.doExit) dialog.show()
def exitHandler (self, widget, event=None): modified = FALSE for config in self.configTree.getConfigList(): if config.modified: modified = TRUE break if modified: MessageDialog ("Question", "There are unsaved modifications. Exit anyway?", ["Yes", "No"], self.doExit) return TRUE elif event == None: gtk.mainquit() else: return FALSE
44ba4a387d4167dedba8d083a763a0b3d1a1236b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/44ba4a387d4167dedba8d083a763a0b3d1a1236b/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 1503, 261, 2890, 16, 3604, 16, 871, 33, 7036, 4672, 4358, 273, 4934, 364, 642, 316, 365, 18, 1425, 2471, 18, 588, 809, 682, 13332, 309, 642, 18, 7342, 30, 4358, 273, 5383, 898, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 1503, 261, 2890, 16, 3604, 16, 871, 33, 7036, 4672, 4358, 273, 4934, 364, 642, 316, 365, 18, 1425, 2471, 18, 588, 809, 682, 13332, 309, 642, 18, 7342, 30, 4358, 273, 5383, 898, ...
got = clist['component0']['shape']['minoraxis']['value']
got = shape['minoraxis']['value']
def run_imfit(): default('imfit') return imfit(imagename=convolved_model, estimates=estimates_convolved)
ece97c593723d5c5f97e7f8feeed072b3192a61d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/ece97c593723d5c5f97e7f8feeed072b3192a61d/test_imfit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 381, 7216, 13332, 805, 2668, 381, 7216, 6134, 327, 709, 7216, 12, 15374, 1069, 33, 4896, 12894, 67, 2284, 16, 27585, 33, 395, 29678, 67, 4896, 12894, 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, 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, 67, 381, 7216, 13332, 805, 2668, 381, 7216, 6134, 327, 709, 7216, 12, 15374, 1069, 33, 4896, 12894, 67, 2284, 16, 27585, 33, 395, 29678, 67, 4896, 12894, 13, 2, -100, -100, -100, ...
"""Call by the implementation of load_metadata to load bond information on the structure. The keys of the bond map are a 2-tuple
"""Call by the implementation of load_metadata to load bond information on the structure. The keys of the bond map are a 2-tuple
def load_bonds(self, bond_map): """Call by the implementation of load_metadata to load bond information on the structure. The keys of the bond map are a 2-tuple of the bonded Atom instances, and the value is a dictionary containing information on the type of bond, which may also be a symmetry operator.
3ff47374bf92f0dd3017796f45976b7077a20e27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/3ff47374bf92f0dd3017796f45976b7077a20e27/StructureBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 70, 4096, 12, 2890, 16, 8427, 67, 1458, 4672, 3536, 1477, 635, 326, 4471, 434, 1262, 67, 4165, 358, 1262, 8427, 1779, 603, 326, 3695, 18, 1021, 1311, 434, 326, 8427, 852, 854...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 70, 4096, 12, 2890, 16, 8427, 67, 1458, 4672, 3536, 1477, 635, 326, 4471, 434, 1262, 67, 4165, 358, 1262, 8427, 1779, 603, 326, 3695, 18, 1021, 1311, 434, 326, 8427, 852, 854...
curun=VS.getUnit(curiter) if (enemy):
curun=VS.getUnit(self.curiter) if (not enemy.isNull()):
def loop (self): isSig=0 enemy=VS.Unit() if (self.you.isNull()): self.Lose (1) return if (self.arrived==3): enemy=self.enemy if (not self.istarget): curun=VS.getUnit(curiter) if (enemy): if (curun==enemy): enemy.setTarget(you) curiter+=1 if (you.isNull()): Lose(1) return if (enemy.isNull()): Win(you,1) return elif (self.arrived==2): if (VS.getSystemFile()==destination): self.arrived=3 else: VS.ResetTimeCompression() enemy=self.enemy if (you.isNull()): Lose(1) return if (enemy.isNull()): Win(you,1) return elif (self.arrived==1): significant=self.significant if (significant.isNull ()): print "sig null" VS.terminateMission(0) else: if (you.getSignificantDistance(significant)<10000.0): if (self.newship==""): self.newship=faction_ships.getRandomFighter(faction) self.enemy=launch.launch_wave_around_unit("Base",self.faction,self.newship,"default",1+self.difficulty,3000.0,4000.0,self.significant) if (enemy): if (runaway): self.enemy.setTarget(significant) self.enemy.Jump() self.arrived=2 else: self.arrived=3 else: if (self.adjsys.Execute()): self.arrived=1 self.newship=faction_ships.getRandomFighter(faction) localdestination=self.significant.getName() self.adjsys=go_somewhere_significant(self.you,0,500) VS.IOmessage (0,"bounty mission",self.mplay,"You must destroy the %s unit in this system." % (self.newship)) self.obj=VS.addObjective("Destroy the %s unit" % (self.newship)) if (runaway): #ADD OTHER JUMPING IF STATEMENT CODE HERE VS.IOmessage (3,"bounty mission",self.mplay,"He is running towards the jump point. Catch him!") VS.IOmessage (4,"bounty mission",self.mplay,"he is going to %s" % (localdestination)) else: VS.IOmessage (3,"bounty mission",self.mplay,"Scanners are picking up a metallic object!") VS.IOmessage (4,"bounty mission",self.mplay,"Coordinates appear near %s" % (localdestination))
afda00481ea93a9bb68ab6dd0605e7e59bf5d039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/afda00481ea93a9bb68ab6dd0605e7e59bf5d039/bounty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 2890, 4672, 353, 8267, 33, 20, 570, 351, 93, 33, 14640, 18, 2802, 1435, 309, 261, 2890, 18, 19940, 18, 291, 2041, 1435, 4672, 365, 18, 1504, 307, 261, 21, 13, 327, 309, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 2890, 4672, 353, 8267, 33, 20, 570, 351, 93, 33, 14640, 18, 2802, 1435, 309, 261, 2890, 18, 19940, 18, 291, 2041, 1435, 4672, 365, 18, 1504, 307, 261, 21, 13, 327, 309, 26...