rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
user2 = User(id=3, username='tester1', is_superuser=True)
user2 = User(id=4, username='tester2', is_superuser=True)
def test_view_list(self): """ Test listing all virtual machines """ url = '/vms/' user2 = User(id=3, username='tester1', is_superuser=True) user2.set_password('secret') user2.save() # setup vms and perms vm1, cluster1 = self.create_virtual_machine(cluster, 'test1') vm2, cluster1 = self.create_virtual_machine(cluster, 'test2') vm3, cluster1 = self.create_virtual_machine(cluster, 'test3') user1.grant('admin', vm) user1.grant('admin', vm1) # anonymous user response = c.get(url, follow=True) self.assertEqual(200, response.status_code) self.assertTemplateUsed(response, 'login.html') # user with perms on no virtual machines self.assert_(c.login(username=user.username, password='secret')) response = c.get(url) self.assertEqual(200, response.status_code) self.assertEquals('text/html; charset=utf-8', response['content-type']) self.assertTemplateUsed(response, 'virtual_machine/list.html') vms = response.context['vmlist'] self.assertFalse(vms) # user with some perms user1.is_superuser = False user1.save() self.assert_(c.login(username=user1.username, password='secret')) response = c.get(url) self.assertEqual(200, response.status_code) self.assertEquals('text/html; charset=utf-8', response['content-type']) self.assertTemplateUsed(response, 'virtual_machine/list.html') vms = response.context['vmlist'] self.assert_(vm in vms) self.assert_(vm1 in vms) self.assertEqual(2, len(vms)) # authorized (superuser) user2.is_superuser=True user2.save() self.assert_(c.login(username=user2.username, password='secret')) response = c.get(url) self.assertEqual(200, response.status_code) self.assertEquals('text/html; charset=utf-8', response['content-type']) self.assertTemplateUsed(response, 'virtual_machine/list.html') vms = response.context['vmlist'] self.assert_(vm in vms) self.assert_(vm1 in vms) self.assert_(vm2 in vms) self.assert_(vm3 in vms) self.assertEqual(len(vms), 4)
904957b34a6efd9c650d23700156c3a0bf1af7ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/904957b34a6efd9c650d23700156c3a0bf1af7ee/virtual_machine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1945, 67, 1098, 12, 2890, 4672, 3536, 7766, 11591, 777, 5024, 15942, 3536, 880, 273, 1173, 31032, 2473, 225, 729, 22, 273, 2177, 12, 350, 33, 24, 16, 2718, 2218, 1078, 387, 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, 67, 1945, 67, 1098, 12, 2890, 4672, 3536, 7766, 11591, 777, 5024, 15942, 3536, 880, 273, 1173, 31032, 2473, 225, 729, 22, 273, 2177, 12, 350, 33, 24, 16, 2718, 2218, 1078, 387, 2...
fp.write(' (gtype-id "' + typecode(klass) + '")\n')
fp.write(' (gtype-id "' + typecode(klass, self.namespace) + '")\n')
def write_obj_defs(self, objdefs, fp=None): if not fp: fp = self.fp
2311187824d1b48a996ee2620fd3c9a63e3edd66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8659/2311187824d1b48a996ee2620fd3c9a63e3edd66/h2def.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2603, 67, 12537, 12, 2890, 16, 1081, 12537, 16, 4253, 33, 7036, 4672, 309, 486, 4253, 30, 4253, 273, 365, 18, 7944, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2603, 67, 12537, 12, 2890, 16, 1081, 12537, 16, 4253, 33, 7036, 4672, 309, 486, 4253, 30, 4253, 273, 365, 18, 7944, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if prop_p == 'NULL':
if prop_p == WrapperNULL:
def add_property(self, prop): "Adds the property object to the component." if not isinstance(prop,Property): raise TypeError
78ee4da258147698b68c05e0bedda6c760b85965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7212/78ee4da258147698b68c05e0bedda6c760b85965/Component.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4468, 12, 2890, 16, 2270, 4672, 315, 3655, 326, 1272, 733, 358, 326, 1794, 1199, 225, 309, 486, 1549, 12, 5986, 16, 1396, 4672, 1002, 3580, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4468, 12, 2890, 16, 2270, 4672, 315, 3655, 326, 1272, 733, 358, 326, 1794, 1199, 225, 309, 486, 1549, 12, 5986, 16, 1396, 4672, 1002, 3580, 2, -100, -100, -100, -100, -100, -1...
'trytond.modules.' + info['name'].lower(): info.get('xml', []), 'trytond.modules.' + info['name'].lower(): ['packing_out.odt'],
'trytond.modules.' + info['name'].lower(): info.get('xml', []) \ + info.get('translation', []) \ + ['packing_out.odt'],
def add_defaults(self): sdist.sdist.add_defaults(self) if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') data = [] for package in build_py.packages: src_dir = build_py.get_package_dir(package) data.extend(build_py.find_data_files(package, src_dir)) self.filelist.extend(data)
e962815a2df60274884794d421cc70d89b36519a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9299/e962815a2df60274884794d421cc70d89b36519a/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7606, 12, 2890, 4672, 272, 4413, 18, 87, 4413, 18, 1289, 67, 7606, 12, 2890, 13, 309, 365, 18, 16279, 18, 5332, 67, 84, 594, 67, 6400, 13332, 1361, 67, 2074, 273, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7606, 12, 2890, 4672, 272, 4413, 18, 87, 4413, 18, 1289, 67, 7606, 12, 2890, 13, 309, 365, 18, 16279, 18, 5332, 67, 84, 594, 67, 6400, 13332, 1361, 67, 2074, 273, 365, 18, ...
isofstype = self.__isofstype,
isofstype = self._isofstype,
def __get_efi_image_stanzas(self, isodir, name): # FIXME: this only supports one kernel right now...
4a670c764a1a949c866539b8a6a60e2729747acb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9342/4a670c764a1a949c866539b8a6a60e2729747acb/live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 10241, 77, 67, 2730, 67, 541, 94, 345, 12, 2890, 16, 353, 369, 481, 16, 508, 4672, 468, 9852, 30, 333, 1338, 6146, 1245, 5536, 2145, 2037, 2777, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 10241, 77, 67, 2730, 67, 541, 94, 345, 12, 2890, 16, 353, 369, 481, 16, 508, 4672, 468, 9852, 30, 333, 1338, 6146, 1245, 5536, 2145, 2037, 2777, 2, -100, -100, -100, -...
['Extra element watchdog in interleave',
['Extra element autopick in interleave',
def test_duplicate_elements(self): self.assert_not_valid(''' <job> <recipeSet retention_tag="scratch"> <recipe kernel_options="" kernel_options_post="" ks_meta="" role="None" whiteboard=""> <autopick random="True"/> <autopick random="False"/> <watchdog panic="None"/> <watchdog panic="always"/> <packages/> <packages/> <ks_appends/> <ks_appends/> <repos/> <repos/> <distroRequires/> <hostRequires/> <task name="/distribution/install" role="STANDALONE"/> </recipe> </recipeSet> </job> ''', ['Extra element watchdog in interleave', 'Invalid sequence in interleave', 'Element recipe failed to validate content', 'Element recipeSet failed to validate content'])
af976d46f134718500a2b6b68242da62d4f183ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/af976d46f134718500a2b6b68242da62d4f183ce/test_schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17342, 67, 6274, 12, 2890, 4672, 365, 18, 11231, 67, 902, 67, 877, 2668, 6309, 411, 4688, 34, 411, 3927, 3151, 694, 19362, 67, 2692, 1546, 24638, 505, 6441, 411, 3927, 3151, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17342, 67, 6274, 12, 2890, 4672, 365, 18, 11231, 67, 902, 67, 877, 2668, 6309, 411, 4688, 34, 411, 3927, 3151, 694, 19362, 67, 2692, 1546, 24638, 505, 6441, 411, 3927, 3151, ...
feature = 'factoids'
feature = 'factoid'
def alias(self, event, target, source):
7ab81eb3d9c79c8a987fb362717f596cd8b4fce6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12048/7ab81eb3d9c79c8a987fb362717f596cd8b4fce6/factoid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2308, 12, 2890, 16, 871, 16, 1018, 16, 1084, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2308, 12, 2890, 16, 871, 16, 1018, 16, 1084, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fd = os.open(filename, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0700)
fd = os.open(filename, os.O_RDWR | os.O_CREAT | os.O_EXCL, 0700)
def gettempdir(): """Function to calculate the directory to use.""" global tempdir if tempdir is not None: return tempdir try: pwd = os.getcwd() except (AttributeError, os.error): pwd = os.curdir attempdirs = ['/var/tmp', '/usr/tmp', '/tmp', pwd] if os.name == 'nt': attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, '\\TEMP') elif os.name == 'mac': import macfs, MACFS try: refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACFS.kTemporaryFolderType, 1) dirname = macfs.FSSpec((refnum, dirid, '')).as_pathname() attempdirs.insert(0, dirname) except macfs.error: pass for envname in 'TMPDIR', 'TEMP', 'TMP': if os.environ.has_key(envname): attempdirs.insert(0, os.environ[envname]) testfile = gettempprefix() + 'test' for dir in attempdirs: try: filename = os.path.join(dir, testfile) if os.name == 'posix': try: fd = os.open(filename, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0700) except OSError: pass else: fp = os.fdopen(fd, 'w') fp.write('blat') fp.close() os.unlink(filename) del fp, fd tempdir = dir break else: fp = open(filename, 'w') fp.write('blat') fp.close() os.unlink(filename) tempdir = dir break except IOError: pass if tempdir is None: msg = "Can't find a usable temporary directory amongst " + `attempdirs` raise IOError, msg return tempdir
94ba4b5f584de4876d3f909a2be83ef8bb198bc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/94ba4b5f584de4876d3f909a2be83ef8bb198bc2/tempfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5814, 1214, 13332, 3536, 2083, 358, 4604, 326, 1867, 358, 999, 12123, 2552, 23101, 309, 23101, 353, 486, 599, 30, 327, 23101, 775, 30, 14720, 273, 1140, 18, 588, 11089, 1435, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5814, 1214, 13332, 3536, 2083, 358, 4604, 326, 1867, 358, 999, 12123, 2552, 23101, 309, 23101, 353, 486, 599, 30, 327, 23101, 775, 30, 14720, 273, 1140, 18, 588, 11089, 1435, 1335, ...
import pprint pprint.pprint(jsonstr) sys.exit(0)
def __init_fname(self, fname): obj = open(fname) jsonstr = obj.read() jsonstr = self._stripComments(jsonstr) import pprint pprint.pprint(jsonstr) sys.exit(0) data = simplejson.loads(jsonstr) obj.close()
735d39b6b019b28f6dfa036374b7f78c90fd9ed7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/735d39b6b019b28f6dfa036374b7f78c90fd9ed7/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 67, 12749, 12, 2890, 16, 5299, 4672, 1081, 273, 1696, 12, 12749, 13, 1163, 701, 273, 1081, 18, 896, 1435, 1163, 701, 273, 365, 6315, 6406, 9051, 12, 1977, 701, 13, 501, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 67, 12749, 12, 2890, 16, 5299, 4672, 1081, 273, 1696, 12, 12749, 13, 1163, 701, 273, 1081, 18, 896, 1435, 1163, 701, 273, 365, 6315, 6406, 9051, 12, 1977, 701, 13, 501, 273...
if priv: out(' <ul class="private">\n') else: out(' <ul>\n')
if priv: out('\n <ul class="private">\n') else: out('\n <ul>\n')
def write_module_tree_item(self, out, doc, package=None): # If it's a private variable, then mark its <li>. var = package and package.variables.get(doc.canonical_name[-1]) priv = ((var is not None and var.is_public is False) or (var is None and doc.canonical_name[-1].startswith('_'))) out(' <li%s> <strong class="uidlink">%s</strong>' % (priv and ' class="private"' or '', self.href(doc))) if doc.summary not in (None, UNKNOWN): out(': <em class="summary">'+ self.description(doc.summary, doc, 8)+'</em>') out('</li>\n') if doc.submodules != UNKNOWN and doc.submodules: if priv: out(' <ul class="private">\n') else: out(' <ul>\n') for submodule in doc.submodules: self.write_module_tree_item(out, submodule, package=doc) out(' </ul>\n </li>\n')
b7791ab97b3e3b441e4a483f4d624510438e3ef4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11420/b7791ab97b3e3b441e4a483f4d624510438e3ef4/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2978, 67, 3413, 67, 1726, 12, 2890, 16, 596, 16, 997, 16, 2181, 33, 7036, 4672, 468, 971, 518, 1807, 279, 3238, 2190, 16, 1508, 2267, 2097, 411, 549, 18652, 569, 273, 2181, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2978, 67, 3413, 67, 1726, 12, 2890, 16, 596, 16, 997, 16, 2181, 33, 7036, 4672, 468, 971, 518, 1807, 279, 3238, 2190, 16, 1508, 2267, 2097, 411, 549, 18652, 569, 273, 2181, ...
with open(support.TESTFN, mode) as fp:
with self.open(support.TESTFN, mode) as fp:
def test_invalid_operations(self): # Try writing on a file opened in read mode and vice-versa. for mode in ("w", "wb"): with open(support.TESTFN, mode) as fp: self.assertRaises(IOError, fp.read) self.assertRaises(IOError, fp.readline) with open(support.TESTFN, "rb") as fp: self.assertRaises(IOError, fp.write, b"blah") self.assertRaises(IOError, fp.writelines, [b"blah\n"]) with open(support.TESTFN, "r") as fp: self.assertRaises(IOError, fp.write, "blah") self.assertRaises(IOError, fp.writelines, ["blah\n"])
1eb8e6fd9a20dd970536c19c924ca697ad648652 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/1eb8e6fd9a20dd970536c19c924ca697ad648652/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5387, 67, 17542, 12, 2890, 4672, 468, 6161, 7410, 603, 279, 585, 10191, 316, 855, 1965, 471, 31842, 17, 2496, 69, 18, 364, 1965, 316, 7566, 91, 3113, 315, 9464, 6, 4672, 598,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5387, 67, 17542, 12, 2890, 4672, 468, 6161, 7410, 603, 279, 585, 10191, 316, 855, 1965, 471, 31842, 17, 2496, 69, 18, 364, 1965, 316, 7566, 91, 3113, 315, 9464, 6, 4672, 598,...
def CopyAllHeaders(dir):
def CopyAllHeaders(dir, skip=[]):
def CopyAllHeaders(dir): # get a list of headers dirlist = os.listdir(dir) dirlist.sort() files = fnmatch.filter(dirlist,"*.h")+fnmatch.filter(dirlist,"*.I")+fnmatch.filter(dirlist,"*.T") # sanity check - do headers in directory match headers in CVS? cvsentries = ReadCvsEntries(dir) if (cvsentries != 0): cvsheaders = fnmatch.filter(cvsentries,"*.h")+fnmatch.filter(cvsentries,"*.I")+fnmatch.filter(cvsentries,"*.T") for x in SetDifference(files, cvsheaders): msg = "WARNING: header file %s is in your directory, but not in CVS"%(dir+"/"+x) print msg WARNINGS.append(msg) for x in SetDifference(cvsheaders, files): msg = "WARNING: header file %s is CVS, but not in your directory"%(dir+"/"+x) print msg WARNINGS.append(msg) # actually copy the headers. copied = [] for filename in files: srcfile = dir + "/" + filename dstfile = PREFIX + "/include/" + filename if (older(dstfile,srcfile)): copied.append(filename) WriteFile(dstfile,ReadFile(srcfile)) if (len(copied)>0): print "\nCompiling in directory: %s\n\nCopied headers: %s"%(dir,copied)
f69bc407e33e89c140c06a05174d14d733231b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/f69bc407e33e89c140c06a05174d14d733231b05/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5631, 1595, 3121, 12, 1214, 16, 2488, 33, 8526, 4672, 468, 336, 279, 666, 434, 1607, 1577, 1098, 273, 1140, 18, 1098, 1214, 12, 1214, 13, 1577, 1098, 18, 3804, 1435, 1390, 273, 18764, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5631, 1595, 3121, 12, 1214, 16, 2488, 33, 8526, 4672, 468, 336, 279, 666, 434, 1607, 1577, 1098, 273, 1140, 18, 1098, 1214, 12, 1214, 13, 1577, 1098, 18, 3804, 1435, 1390, 273, 18764, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 716) else quickfix.StringField.__init__(self, 716, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 2313, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 2313, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
parts.append(",".join(names))
parts.append(",".join(sorted(names)))
def _ReportLocks(self, level, names, shared, timeout, acquired, result): """Reports lock operations.
4776e022c51780a6c7e26b7506b4e7c2da293d9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/4776e022c51780a6c7e26b7506b4e7c2da293d9f/mcpu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4820, 19159, 12, 2890, 16, 1801, 16, 1257, 16, 5116, 16, 2021, 16, 20598, 16, 563, 4672, 3536, 18631, 2176, 5295, 18, 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, 389, 4820, 19159, 12, 2890, 16, 1801, 16, 1257, 16, 5116, 16, 2021, 16, 20598, 16, 563, 4672, 3536, 18631, 2176, 5295, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
subs['pepnum'] = pepnum
subs['pepnum'] = self.pepnum
def interpolation_dict(self): subs = html4css1.Writer.interpolation_dict(self) settings = self.document.settings pyhome = settings.python_home subs['pyhome'] = pyhome subs['pephome'] = settings.pep_home if pyhome == '..': subs['pepindex'] = '.' else: subs['pepindex'] = pyhome + '/dev/peps' index = self.document.first_child_matching_class(nodes.field_list) header = self.document[index] self.pepnum = header[0][1].astext() subs['pep'] = self.pepnum if settings.no_random: subs['banner'] = 0 else: import random subs['banner'] = random.randrange(64) try: subs['pepnum'] = '%04i' % int(self.pepnum) except ValueError: subs['pepnum'] = pepnum self.title = header[1][1].astext() subs['title'] = self.title subs['body'] = ''.join( self.body_pre_docinfo + self.docinfo + self.body) return subs
327f8a44d41b991486bb432cbd50286279f2b9c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5620/327f8a44d41b991486bb432cbd50286279f2b9c6/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12851, 67, 1576, 12, 2890, 4672, 11630, 273, 1729, 24, 5212, 21, 18, 2289, 18, 18676, 367, 67, 1576, 12, 2890, 13, 1947, 273, 365, 18, 5457, 18, 4272, 2395, 8712, 273, 1947, 18, 8103, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12851, 67, 1576, 12, 2890, 4672, 11630, 273, 1729, 24, 5212, 21, 18, 2289, 18, 18676, 367, 67, 1576, 12, 2890, 13, 1947, 273, 365, 18, 5457, 18, 4272, 2395, 8712, 273, 1947, 18, 8103, ...
_('No employee defined for this user. You must create one.'))
_('No employee defined for user "%s". You must create one.')% (user_name,))
def create(self, cr, uid, vals, *args, **kwargs):
8fd383c54afd7f653a6b7073c946ccc6563c6050 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/8fd383c54afd7f653a6b7073c946ccc6563c6050/project_timesheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 380, 1968, 16, 2826, 4333, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 380, 1968, 16, 2826, 4333, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
expected = """
preamble = """
def test_merge_guard_class_guard_value(self): ops = """ [p1, i0, i1, i2, p2] guard_class(p1, ConstClass(node_vtable)) [i0] i3 = int_add(i1, i2) guard_value(p1, ConstPtr(myptr)) [i1] jump(p2, i0, i1, i3, p2) """ expected = """ [p1, i0, i1, i2, p2] guard_value(p1, ConstPtr(myptr)) [i0] i3 = int_add(i1, i2) jump(p2, i0, i1, i3, p2) """ self.optimize_loop(ops, expected)
bcb1b89523b45a7a06eb2b193768e205ba5b618f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/bcb1b89523b45a7a06eb2b193768e205ba5b618f/test_optimizeopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2702, 67, 24594, 67, 1106, 67, 24594, 67, 1132, 12, 2890, 4672, 6727, 273, 3536, 306, 84, 21, 16, 277, 20, 16, 277, 21, 16, 277, 22, 16, 293, 22, 65, 11026, 67, 1106, 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, 1842, 67, 2702, 67, 24594, 67, 1106, 67, 24594, 67, 1132, 12, 2890, 4672, 6727, 273, 3536, 306, 84, 21, 16, 277, 20, 16, 277, 21, 16, 277, 22, 16, 293, 22, 65, 11026, 67, 1106, 12,...
self.mainApp.videoDisplay.currentFrame is None):
(self.mainApp.videoDisplay.currentFrame is None or searchBox.is_focus())):
def on_main_window_key_press_event(self, widget, event): portable_keys_mapping = { gtk.keysyms.Down: keyboard.DOWN, gtk.keysyms.Up: keyboard.UP, gtk.keysyms.Right: keyboard.RIGHT, gtk.keysyms.Left: keyboard.LEFT, } if event.keyval in portable_keys_mapping: control = shift = False if event.state & gtk.gdk.SHIFT_MASK: shift = True if event.state & gtk.gdk.CONTROL_MASK: control = True key = portable_keys_mapping[event.keyval] if (key in (keyboard.RIGHT, keyboard.LEFT) and self.mainApp.videoDisplay.currentFrame is None): # don't handle RIGHT/LEFT if the video dispaly isn't shown return False keyboard.handleKey(key, shift, control) return True else: return False
508cafdfa043699b3ad8784cd10d0c9a5de4175a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/508cafdfa043699b3ad8784cd10d0c9a5de4175a/callbackhandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5254, 67, 5668, 67, 856, 67, 1028, 67, 2575, 12, 2890, 16, 3604, 16, 871, 4672, 1756, 429, 67, 2452, 67, 6770, 273, 288, 22718, 18, 2452, 93, 959, 18, 4164, 30, 16263, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5254, 67, 5668, 67, 856, 67, 1028, 67, 2575, 12, 2890, 16, 3604, 16, 871, 4672, 1756, 429, 67, 2452, 67, 6770, 273, 288, 22718, 18, 2452, 93, 959, 18, 4164, 30, 16263, 18, ...
self.Opt = opt
self.Opt = opt
def __init__(self, opt, args): self.SysPlatform = sys.platform self.EdkToolsPath = os.getenv("EDK_TOOLS_PATH") self.WorkSpace = os.getenv("WORKSPACE") self.Path = os.getenv("PATH") self.Opt = opt self.Args = args self.ArgList = ['all', 'genc', 'genmake', 'modules', 'libraries', 'clean', 'cleanall', 'cleanlib', 'run'] self.TargetTxt = TargetTxtClassObject() self.ToolDef = ToolDefClassObject() self.Sem = None self.StartTime = time.time() self.GenC = None self.GenMake = None self.All = None self.ReturnCode = [0,1] if len(self.Args) == 0: self.All = 1 elif len(self.Args) >= 2: EdkLogger.quiet("There are too many targets in command line input, please select one from: %s" %(''.join(elem + ' ' for elem in self.ArgList))) else: t = self.Args[0].lower() if t not in self.ArgList: EdkLogger.quiet("'%s' is an invalid targets, please select one from: %s" %(self.Args[0], ''.join(elem + ' ' for elem in self.ArgList))) self.isexit(1) if t == 'genc': self.GenC = 1 elif t == 'genmake': self.GenMake = 1 elif t == 'all' or t == '': self.All = 1 else: self.Args = t EdkLogger.quiet(time.strftime("%a, %d %b %Y %H:%M:%S +0000\n", time.localtime()))
f168a282e53224f1e8c2d7db976b913a3f294ebe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/f168a282e53224f1e8c2d7db976b913a3f294ebe/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2153, 16, 833, 4672, 365, 18, 12712, 8201, 225, 273, 2589, 18, 9898, 365, 18, 2671, 79, 10348, 743, 273, 1140, 18, 588, 3074, 2932, 2056, 47, 67, 26263, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2153, 16, 833, 4672, 365, 18, 12712, 8201, 225, 273, 2589, 18, 9898, 365, 18, 2671, 79, 10348, 743, 273, 1140, 18, 588, 3074, 2932, 2056, 47, 67, 26263, ...
if __debug__ and self.debug >= 4: _mesg('< %s' % line)
if __debug__: if self.debug >= 4: _mesg('< %s' % line) else: _log('< %s' % line)
def _get_line(self):
4c8f1ad041044141b195bdb266c824261b5d4482 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4c8f1ad041044141b195bdb266c824261b5d4482/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1369, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1369, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def _packMSTToFile(self, mst, outfile, reclen, encoding, byteorder, flush, verbose): """ Takes MS Trace object and writes it to a file """ if type(outfile) == file: mseedfile = outfile else: mseedfile = open(outfile, 'wb') self.packedsamples = C.pointer(C.c_int(0)) def record_handler(record, reclen, _stream): mseedfile.write(record[0:reclen]) RECHANDLER = C.CFUNCTYPE(None, C.POINTER(C.c_char), C.c_int, C.c_void_p) rec_handler = RECHANDLER(record_handler) clibmseed.mst_pack(mst, rec_handler, None, reclen, encoding, byteorder, self.packedsamples, flush, verbose, None) if not type(outfile) == file: mseedfile.close()
def _packMSTToFile(self, mst, outfile, reclen, encoding, byteorder, flush, verbose): """ Takes MS Trace object and writes it to a file """ #Allow direclty passing of file pointers, usefull for appending #mseed records on existing mseed files if type(outfile) == file: mseedfile = outfile else: mseedfile = open(outfile, 'wb') #Initialize packedsamples pointer for the mst_pack function self.packedsamples = C.pointer(C.c_int(0)) #Callback function for mst_pack to actually write the file def record_handler(record, reclen, _stream): mseedfile.write(record[0:reclen]) #Define Python callback function for use in C function RECHANDLER = C.CFUNCTYPE(None, C.POINTER(C.c_char), C.c_int, C.c_void_p) rec_handler = RECHANDLER(record_handler) #Pack the file into a MiniSEED file clibmseed.mst_pack(mst, rec_handler, None, reclen, encoding, byteorder, self.packedsamples, flush, verbose, None) if not type(outfile) == file: mseedfile.close()
c1b95eeab8bfaddc7df98c11e8ffec22458d032b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/c1b95eeab8bfaddc7df98c11e8ffec22458d032b/libmseed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2920, 49, 882, 15450, 12, 2890, 16, 312, 334, 16, 8756, 16, 283, 830, 275, 16, 2688, 16, 1160, 1019, 16, 3663, 16, 3988, 4672, 3536, 23004, 9238, 2677, 733, 471, 7262, 518, 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, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2920, 49, 882, 15450, 12, 2890, 16, 312, 334, 16, 8756, 16, 283, 830, 275, 16, 2688, 16, 1160, 1019, 16, 3663, 16, 3988, 4672, 3536, 23004, 9238, 2677, 733, 471, 7262, 518, 358, ...
log.error("%s has changed but has been removed on head" % path)
self.errors.append("%s has changed but has been removed " + "on head" % path)
def _singlePackage(self, repos, pkgCs, changeSet, basePkg, fsPkg, root):
9e9969f45daafddcbb99e4e9dc5b3d6042825259 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/9e9969f45daafddcbb99e4e9dc5b3d6042825259/update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7526, 2261, 12, 2890, 16, 13686, 16, 3475, 14272, 16, 26104, 16, 1026, 11264, 16, 2662, 11264, 16, 1365, 4672, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7526, 2261, 12, 2890, 16, 13686, 16, 3475, 14272, 16, 26104, 16, 1026, 11264, 16, 2662, 11264, 16, 1365, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
wordsep_re = re.compile(r'(\s+|' r'-*\w{2,}-(?=\w{2,})|' r'(?<=\S)-{2,}(?=\w))') if len(text) <= width: return [text] chunks = wordsep_re.split(text) chunks = filter(None, chunks) return '\n'.join(self._wrap_chunks(chunks, width))
def fill(text, width): if len(text) <= width: return text wordsep_re = re.compile(r'(-*\w{2,}-(?=\w{2,})|' r'(?<=\S)-{2,}(?=\w))') chunks = wordsep_re.split(text) chunks = filter(None, chunks) return '\n'.join(self._wrap_chunks(chunks, width)) return "\n".join([fill(paragraph, width) \ for paragraph in text.split('\n')])
def _wrap(self, text, width=70): """Wrap the text into lines no bigger than the specified width.""" try: from textwrap import wrap except ImportError: pass else: return '\n'.join(wrap(text, width)) # No textwrap module, so do the same stuff (more-or-less) ourselves. wordsep_re = re.compile(r'(\s+|' # any whitespace r'-*\w{2,}-(?=\w{2,})|' # hyphenated words r'(?<=\S)-{2,}(?=\w))') # em-dash if len(text) <= width: return [text] chunks = wordsep_re.split(text) chunks = filter(None, chunks) return '\n'.join(self._wrap_chunks(chunks, width))
88b71f9dad81e0c364a0ee4249ff1df38b28724d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/88b71f9dad81e0c364a0ee4249ff1df38b28724d/UserInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 12, 2890, 16, 977, 16, 1835, 33, 7301, 4672, 3536, 2964, 326, 977, 1368, 2362, 1158, 18983, 2353, 326, 1269, 1835, 12123, 775, 30, 628, 30271, 1930, 2193, 1335, 11308, 30, 134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4113, 12, 2890, 16, 977, 16, 1835, 33, 7301, 4672, 3536, 2964, 326, 977, 1368, 2362, 1158, 18983, 2353, 326, 1269, 1835, 12123, 775, 30, 628, 30271, 1930, 2193, 1335, 11308, 30, 134...
return _pruneBarbsInternal(skel)
result = _pruneBarbsInternal(skel) shortenLength = maxCutLength * 2 / 3 for edge in skel.edgeIter(): edge.isBarb = False if hasattr(edge, "barbNodeLabel"): print "shortening", edge barbNodeLabel, endPos = edge.barbNodeLabel if barbNodeLabel == edge.startNodeLabel(): i = leaveCircle(edge, 1, endPos, shortenLength) if i < len(edge)-1: splitEdge(edge, i).isBarb = False edge.isBarb = True else: i = leaveCircle(edge, -1, endPos, shortenLength) if i < len(edge)-1: newEdge = splitEdge(edge, i).isBarb = True result += _pruneBarbsInternal(skel)
def pruneBarbsByDist(skel, maxDist): for edge in skel.edgeIter(): edge.isBarb = False for node in skel.nodeIter(): if node.degree() != 1: continue p = node.position() dart = node.anchor() while True: if (dart[0] - p).magnitude() < maxDist or \ (dart[-1] - p).magnitude() < maxDist: dart.edge().isBarb = True if dart.nextPhi() == node.anchor(): break return _pruneBarbsInternal(skel)
680c2d2cdcf34c92ea049552efec9d1db2cb6e80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/680c2d2cdcf34c92ea049552efec9d1db2cb6e80/delaunay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13293, 5190, 2038, 858, 5133, 12, 7771, 292, 16, 943, 5133, 4672, 364, 3591, 316, 4343, 292, 18, 7126, 2360, 13332, 3591, 18, 291, 5190, 70, 273, 1083, 225, 364, 756, 316, 4343, 292, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13293, 5190, 2038, 858, 5133, 12, 7771, 292, 16, 943, 5133, 4672, 364, 3591, 316, 4343, 292, 18, 7126, 2360, 13332, 3591, 18, 291, 5190, 70, 273, 1083, 225, 364, 756, 316, 4343, 292, 1...
mspace = h5s.create_simple(mshape, (h5s.UNLIMITED,)*len(mshape))
if(len(mshape) < len(self.shape)): mshape_pad = (1,)*(len(self.shape)-len(mshape)) + mshape else: mshape_pad = mshape mspace = h5s.create_simple(mshape_pad, (h5s.UNLIMITED,)*len(mshape_pad))
def __setitem__(self, args, val): """ Write to the HDF5 dataset from a Numpy array.
ca153dd249e243eb364a366df1054c965cc0624a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10380/ca153dd249e243eb364a366df1054c965cc0624a/highlevel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 833, 16, 1244, 4672, 3536, 2598, 358, 326, 21673, 25, 3709, 628, 279, 6805, 2074, 526, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 833, 16, 1244, 4672, 3536, 2598, 358, 326, 21673, 25, 3709, 628, 279, 6805, 2074, 526, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
buf = struct.pack("%ds" % BLOCKSIZE, "".join(parts))
buf += struct.pack("%ds" % BLOCKSIZE, "".join(parts))
def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), stn(MAGIC, 6), stn(VERSION, 2), stn(self.uname, 32), stn(self.gname, 32), itn(self.devmajor, 8, posix), itn(self.devminor, 8, posix), stn(self.prefix, 155) ]
81f02e34efadb27c8e3954e259e5638999815387 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/81f02e34efadb27c8e3954e259e5638999815387/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 1203, 487, 279, 13908, 1160, 533, 18, 3536, 2140, 273, 306, 384, 82, 12, 2890, 18, 529, 16, 2130, 3631, 518,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 1203, 487, 279, 13908, 1160, 533, 18, 3536, 2140, 273, 306, 384, 82, 12, 2890, 18, 529, 16, 2130, 3631, 518,...
csweight = getweight(cs) self.trace(2, "feasible PENDING_INSTALL alternative: %s (csw=%f)", (prvpkg, csweight), cs) _pruneweight = min(_pruneweight, csweight) alternatives.append((csweight+pw[prvpkg]+ keeporder, cs, lk)) keeporder += 0.000001 if earlyAbort: _maxpw = pw[prvpkg] if not alternatives:
yield res _pruneweight = min(_pruneweight, self._pruneweight) heappush(taskheap, task) if len(doneheap)==0:
def _pending(self, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth if traceVerbosity<4: self.trace(1, "_pending(pw=%f, yw=%f)", (self._pruneweight, self._yieldweight)) else: self.trace(4, "_pending(%s, pw=%f, yw=%f)", (pending, self._pruneweight, self._yieldweight))
c1c8c97608cc7dc211d0b953aa22e130e6544b4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/c1c8c97608cc7dc211d0b953aa22e130e6544b4b/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9561, 12, 2890, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 309, 2606, 30594, 32, 24, 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, 389, 9561, 12, 2890, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 309, 2606, 30594, 32, 24, 30, ...
plugincol0.set_title(_("Loaded"))
plugincol0.set_attributes(plugincheckcell, active=0) plugincol0.set_title(" " + _("Loaded") + " ")
def on_prefs_real(self, parent_window, popuptimes, as_imported, as_import, as_init, as_reauth, trayicon_available, trayicon_in_use, reconnect, renotify, reinfofile, prefs_notif_toggled, prefs_stylized_toggled, prefs_art_toggled, prefs_playback_toggled, prefs_progress_toggled, prefs_statusbar_toggled, prefs_lyrics_toggled, prefs_trayicon_toggled, prefs_window_response): """Display the preferences dialog""" self.window = parent_window self.as_imported = as_imported self.as_import = as_import self.as_init = as_init self.as_reauth = as_reauth self.reconnect = reconnect self.renotify = renotify self.reinfofile = reinfofile
5c439d0e2f2a15cd484c856e850d4ef1ac7dd331 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/5c439d0e2f2a15cd484c856e850d4ef1ac7dd331/preferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1484, 2556, 67, 7688, 12, 2890, 16, 982, 67, 5668, 16, 1843, 3648, 4485, 16, 487, 67, 29266, 16, 487, 67, 5666, 16, 487, 67, 2738, 16, 487, 67, 266, 1944, 16, 268, 435, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1484, 2556, 67, 7688, 12, 2890, 16, 982, 67, 5668, 16, 1843, 3648, 4485, 16, 487, 67, 29266, 16, 487, 67, 5666, 16, 487, 67, 2738, 16, 487, 67, 266, 1944, 16, 268, 435, 39...
sqlValues.append( "`%s%s`.`%s`" % ( tableType, typeName, vTu[0] ) )
sqlValues.append( "`%s`.`%s`" % ( tableName, vTu[0] ) )
def __queryType( self, typeName, startTime, endTime, condDict, valueFields, groupFields, tableType ): cmd = "SELECT" sqlValues = [] sqlLinkList = [] #Calculate fields to retrieve for vTu in valueFields: if vTu[0] in self.dbCatalog[ typeName ][ 'keys' ]: sqlValues.append( "`key%s`.`value`" % ( vTu[0] ) ) List.appendUnique( sqlLinkList, "`%s%s`.`%s` = `key%s`.`id`" % ( tableType, typeName, vTu[0], vTu[0] ) ) else: sqlValues.append( "`%s%s`.`%s`" % ( tableType, typeName, vTu[0] ) ) if vTu[1]: if not groupFields: return S_OK( "Can't do a %s function without specifying grouping fields" ) sqlValues[-1] = "%s(%s)" % ( vTu[1], sqlValues[-1] ) cmd += " %s" % ", ".join( sqlValues ) #Calculate tables needed keysInRequestedFields = [ value[0] for value in valueFields ] sqlFromList = [ "`%s%s`" % ( tableType, typeName ) ] for key in self.dbCatalog[ typeName ][ 'keys' ]: if key in condDict or key in groupFields or key in keysInRequestedFields: sqlFromList.append( "`key%s`" % key ) cmd += " FROM %s" % ", ".join( sqlFromList ) #Calculate time conditions sqlTimeCond = [] if startTime: sqlTimeCond.append( "`%s%s`.`startTime` >= '%s'" % ( tableType, typeName, startTime.strftime( "%Y-%m-%d %H:%M:%S" ) ) ) if endTime: if tableType == "bucket": endTimeSQLVar = "startTime" else: endTimeSQLVar = "endTime" sqlTimeCond.append( "`%s%s`.`%s` <= '%s'" % ( tableType, typeName, endTimeSQLVar, endTime.strftime( "%Y-%m-%d %H:%M:%S" ) ) ) cmd += " WHERE %s" % " AND ".join( sqlTimeCond ) #Calculate conditions sqlCondList = [] for keyName in condDict: sqlORList = [] if keyName in self.dbCatalog[ typeName ][ 'keys' ]: List.appendUnique( sqlLinkList, "`%s%s`.`%s` = `key%s`.`id`" % ( tableType, typeName, keyName, keyName ) ) if type( condDict[ keyName ] ) not in ( types.ListType, types.TupleType ): condDict[ keyName ] = [ condDict[ keyName ] ] for keyValue in condDict[ keyName ]: retVal = self._escapeString( keyValue ) if not retVal[ 'OK' ]: return retVal keyValue = retVal[ 'Value' ] if keyName in self.dbCatalog[ typeName ][ 'keys' ]: sqlORList.append( "`key%s`.`value` = %s" % ( keyName, keyValue ) ) else: sqlORList.append( "`%s%s`.`%s` = %s" % ( tableType, typeName, keyName, keyValue ) ) sqlCondList.append( "( %s )" % " OR ".join( sqlORList ) ) if sqlCondList: cmd += " AND %s" % " AND ".join( sqlCondList ) #Calculate grouping sqlGroupList = [] if groupFields: for field in groupFields: if field in self.dbCatalog[ typeName ][ 'keys' ]: List.appendUnique( sqlLinkList, "`%s%s`.`%s` = `key%s`.`id`" % ( tableType, typeName, field, field ) ) sqlGroupList.append( "`key%s`.`value`" % field ) else: sqlGroupList.append( "`%s%s`.`%s`" % ( tableType, typeName, field ) ) if sqlLinkList: cmd += " AND %s" % " AND ".join( sqlLinkList ) if sqlGroupList: cmd += " GROUP BY %s" % ", ".join( sqlGroupList ) return self._query( cmd )
7663d95782c4987a99eb5394bb9f465c2ab982d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/7663d95782c4987a99eb5394bb9f465c2ab982d5/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2271, 559, 12, 365, 16, 8173, 16, 8657, 16, 13859, 16, 6941, 5014, 16, 460, 2314, 16, 1041, 2314, 16, 1014, 559, 262, 30, 1797, 273, 315, 4803, 6, 1847, 1972, 273, 5378, 1847, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2271, 559, 12, 365, 16, 8173, 16, 8657, 16, 13859, 16, 6941, 5014, 16, 460, 2314, 16, 1041, 2314, 16, 1014, 559, 262, 30, 1797, 273, 315, 4803, 6, 1847, 1972, 273, 5378, 1847, ...
"Public License v3. Part of the 'HTSeq' framework." )
"Public License v3. Part of the 'HTSeq' framework, version %s." % HTSeq.__version__ )
def main(): optParser = optparse.OptionParser( usage = "%prog [options] sam_file gff_file", description= "This script takes an alignment file in SAM format and a " + "feature file in GFF format and calculates for each feature " + "the number of reads mapping to it. See " + "http://www-huber.embl.de/users/anders/HTSeq/doc/count.html for details.", epilog = "Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology " + "Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General " + "Public License v3. Part of the 'HTSeq' framework." ) optParser.add_option( "-m", "--mode", type="choice", dest="mode", choices = ( "union", "intersection-strict", "intersection-nonempty" ), default = "union", help = "mode to handle reads overlapping more than one feature" + "(choices: union, intersection-strict, intersection-nonempty; default: union)" ) optParser.add_option( "-t", "--type", type="string", dest="featuretype", default = "exon", help = "feature type (3rd column in GFF file) to be used, " + "all features of other type are ignored (default, suitable for Ensembl " + "GTF files: exon)" ) optParser.add_option( "-i", "--idattr", type="string", dest="idattr", default = "gene_id", help = "GFF attribute to be used as feature ID (default, " + "suitable for Ensembl GTF files: gene_id)" ) optParser.add_option( "-s", "--stranded", type="choice", dest="stranded", choices = ( "yes", "no" ), default = "yes", help = "whether the data is from a strand-specific assay (default: yes)" ) optParser.add_option( "-q", "--quiet", action="store_true", dest="quiet", help = "suppress progress report" ) if len( sys.argv ) == 1: optParser.print_help() sys.exit(1) (opts, args) = optParser.parse_args() if len( args ) != 2: sys.stderr.write( sys.argv[0] + ": Error: Please provide two arguments.\n" ) sys.stderr.write( " Call with '-h' to get usage information.\n" ) sys.exit( 1 ) warnings.showwarning = my_showwarning try: count_reads_in_features( args[0], args[1], opts.stranded == "yes", opts.mode, opts.featuretype, opts.idattr, opts.quiet ) except Exception: sys.stderr.write( "Error: %s\n" % str( sys.exc_info()[1] ) ) sys.stderr.write( "[Exception type: %s, raised in %s:%d]\n" % ( sys.exc_info()[1].__class__.__name__, os.path.basename(traceback.extract_tb( sys.exc_info()[2] )[-1][0]), traceback.extract_tb( sys.exc_info()[2] )[-1][1] ) ) sys.exit( 1 )
5505926669941075931bceba40854824edbf5660 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/596/5505926669941075931bceba40854824edbf5660/count.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2153, 2678, 273, 2153, 2670, 18, 1895, 2678, 12, 225, 4084, 273, 2213, 14654, 306, 2116, 65, 16260, 67, 768, 26534, 67, 768, 3113, 225, 2477, 33, 315, 2503, 2728, 5530,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2153, 2678, 273, 2153, 2670, 18, 1895, 2678, 12, 225, 4084, 273, 2213, 14654, 306, 2116, 65, 16260, 67, 768, 26534, 67, 768, 3113, 225, 2477, 33, 315, 2503, 2728, 5530,...
except IOError, last_exc:
except IOError as err: last_exc = err
def _open_with_retry(func, host, *args, **kwargs): # Connecting to remote hosts is flaky. Make it more robust # by retrying the connection several times. for i in range(3): try: return func(host, *args, **kwargs) except IOError, last_exc: continue except: raise raise last_exc
b212e18a54cda48e6c7375e54d29790d4b582b5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/b212e18a54cda48e6c7375e54d29790d4b582b5b/test_urllibnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3190, 67, 1918, 67, 9620, 12, 644, 16, 1479, 16, 380, 1968, 16, 2826, 4333, 4672, 468, 8289, 310, 358, 2632, 7206, 353, 1183, 29643, 18, 225, 4344, 518, 1898, 27920, 468, 635, 210...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3190, 67, 1918, 67, 9620, 12, 644, 16, 1479, 16, 380, 1968, 16, 2826, 4333, 4672, 468, 8289, 310, 358, 2632, 7206, 353, 1183, 29643, 18, 225, 4344, 518, 1898, 27920, 468, 635, 210...
sys.syderr.write(' '.join(message) +'\n')
sys.stderr.write(' '.join(message) +'\n')
def _error(*message): sys.syderr.write(' '.join(message) +'\n') sys.exit(1)
11b95fbe85f4d5b11ea94d8450d603529b4982fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11359/11b95fbe85f4d5b11ea94d8450d603529b4982fc/buildout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1636, 30857, 2150, 4672, 2589, 18, 11241, 18, 2626, 2668, 2418, 5701, 12, 2150, 13, 397, 8314, 82, 6134, 2589, 18, 8593, 12, 21, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1636, 30857, 2150, 4672, 2589, 18, 11241, 18, 2626, 2668, 2418, 5701, 12, 2150, 13, 397, 8314, 82, 6134, 2589, 18, 8593, 12, 21, 13, 225, 2, -100, -100, -100, -100, -100, -100, -1...
mimetype = kwargs.get('mimetype', 'image/png') filename = kwargs.get('filename', '') image = self.content_class(self.getName(), self.getName(), str(value), mimetype) image.filename = filename image.content_type = mimetype delattr(image, 'title')
image = self._wrapValue(instance, value, **kwargs)
def createOriginal(self, instance, value, **kwargs): """create the original image (save it) """ mimetype = kwargs.get('mimetype', 'image/png') filename = kwargs.get('filename', '')
5303face7d22c14e7725ee2ef989c387ed269d88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/5303face7d22c14e7725ee2ef989c387ed269d88/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 8176, 12, 2890, 16, 791, 16, 460, 16, 2826, 4333, 4672, 3536, 2640, 326, 2282, 1316, 261, 5688, 518, 13, 3536, 12595, 273, 1205, 18, 588, 2668, 22571, 2187, 296, 2730, 19, 6446, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 8176, 12, 2890, 16, 791, 16, 460, 16, 2826, 4333, 4672, 3536, 2640, 326, 2282, 1316, 261, 5688, 518, 13, 3536, 12595, 273, 1205, 18, 588, 2668, 22571, 2187, 296, 2730, 19, 6446, 6...
if self._frozen or not autoreload: if cache.mtime == 0: return (cache, True) return (cache, False)
if not cache.reload: if self._frozen or not autoreload: return (cache, False)
def _reload_required(self, modules, label, file, autoreload):
d5285c96a5e14839ecb31a6e88de360b09199056 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/d5285c96a5e14839ecb31a6e88de360b09199056/importer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17517, 67, 4718, 12, 2890, 16, 4381, 16, 1433, 16, 585, 16, 2059, 479, 945, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17517, 67, 4718, 12, 2890, 16, 4381, 16, 1433, 16, 585, 16, 2059, 479, 945, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def extend(self, records) :
def extend(self, records):
def extend(self, records) : """Add more SeqRecord objects to the alignment as rows.
5a7b614be9278c97d782e92e0b1a4c475e3fc82e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/5a7b614be9278c97d782e92e0b1a4c475e3fc82e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2133, 12, 2890, 16, 3853, 4672, 3536, 986, 1898, 14367, 2115, 2184, 358, 326, 8710, 487, 2595, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2133, 12, 2890, 16, 3853, 4672, 3536, 986, 1898, 14367, 2115, 2184, 358, 326, 8710, 487, 2595, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def setDebugNamespace(self, ns): pass
def setDebugNamespace(self, ns): pass
5ad21a150f4933abf1d43fc72ecf4bb2d6645cee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5ad21a150f4933abf1d43fc72ecf4bb2d6645cee/ShellEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2829, 3402, 12, 2890, 16, 3153, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 444, 2829, 3402, 12, 2890, 16, 3153, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def zlabel(self,t):
def ztitle(self,t):
def zlabel(self,t): cmd = 'set zlabel "' + t + '"' self._replot(cmd)
6a704f0bcf83e352f39dea8e27e6094efb896ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/6a704f0bcf83e352f39dea8e27e6094efb896ef0/pyPlot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 998, 2649, 12, 2890, 16, 88, 4672, 1797, 273, 296, 542, 998, 1925, 2491, 397, 268, 397, 4754, 365, 6315, 266, 4032, 12, 4172, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 998, 2649, 12, 2890, 16, 88, 4672, 1797, 273, 296, 542, 998, 1925, 2491, 397, 268, 397, 4754, 365, 6315, 266, 4032, 12, 4172, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100...
print cmdline
def upstream_extract(self): self.log("Extracting tarball %s\n" % self.input_tar) match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', self.input_tar) if not match: raise RuntimeError("Can't identify name of tarball")
0024393f319cc9e1236af366d4e981c86b21ac7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5794/0024393f319cc9e1236af366d4e981c86b21ac7e/genorig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13505, 67, 8004, 12, 2890, 4672, 365, 18, 1330, 2932, 4976, 310, 29441, 738, 87, 64, 82, 6, 738, 365, 18, 2630, 67, 11718, 13, 845, 273, 283, 18, 1916, 12, 86, 11, 12, 66, 96, 4509...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13505, 67, 8004, 12, 2890, 4672, 365, 18, 1330, 2932, 4976, 310, 29441, 738, 87, 64, 82, 6, 738, 365, 18, 2630, 67, 11718, 13, 845, 273, 283, 18, 1916, 12, 86, 11, 12, 66, 96, 4509...
nodes.append(n)
nodes[g.vertex_index[v]] = n
def graph_draw(g, pos=None, size=(15, 15), pin=False, layout= "neato", maxiter=None, ratio= "fill", overlap="prism", sep=None, splines=False, vsize=0.1, penwidth=1.0, elen=None, gprops={}, vprops={}, eprops={}, vcolor=None, ecolor=None, vcmap=matplotlib.cm.jet, vnorm=True, ecmap=matplotlib.cm.jet, enorm=True, output= "", output_format= "auto", returngv=False, fork=False, seed=0): r"""Draw a graph using graphviz. Parameters ---------- g : Graph Graph to be used. pos : PropertyMap or tuple of PropertyMaps (optional, default: None) Vertex property maps containing the x and y coordinates of the vertices. size : tuple of scalars (optional, default: (15,15)) Size (in centimeters) of the canvas. pin : bool (default: False) If True, the vertices are not moved from their initial position. layout : string (default: "neato") Layout engine to be used. Possible values are "neato", "fdp", "dot", "circo", "twopi" and "arf". maxiter : int (default: None) If specified, limits the maximum number of iterations. ratio : string or float (default: "fill") Sets the aspect ratio (drawing height/drawing width) for the drawing. Note that this is adjusted before the 'size' attribute constraints are enforced. If ratio is numeric, it is taken as the desired aspect ratio. Then, if the actual aspect ratio is less than the desired ratio, the drawing height is scaled up to achieve the desired ratio; if the actual ratio is greater than that desired ratio, the drawing width is scaled up. If ratio = "fill" and the size attribute is set, node positions are scaled, separately in both x and y, so that the final drawing exactly fills the specified size. If ratio = "compress" and the size attribute is set, dot attempts to compress the initial layout to fit in the given size. This achieves a tighter packing of nodes but reduces the balance and symmetry. This feature only works in dot. If ratio = "expand", the size attribute is set, and both the width and the height of the graph are less than the value in size, node positions are scaled uniformly until at least one dimension fits size exactly. Note that this is distinct from using size as the desired size, as here the drawing is expanded before edges are generated and all node and text sizes remain unchanged. If ratio = "auto", the page attribute is set and the graph cannot be drawn on a single page, then size is set to an "ideal" value. In particular, the size in a given dimension will be the smallest integral multiple of the page size in that dimension which is at least half the current size. The two dimensions are then scaled independently to the new size. This feature only works in dot. overlap : bool or string (default: "prism") Determines if and how node overlaps should be removed. Nodes are first enlarged using the sep attribute. If True, overlaps are retained. If the value is "scale", overlaps are removed by uniformly scaling in x and y. If the value is False, node overlaps are removed by a Voronoi-based technique. If the value is "scalexy", x and y are separately scaled to remove overlaps. If sfdp is available, one can set overlap to "prism" to use a proximity graph-based algorithm for overlap removal. This is the preferred technique, though "scale" and False can work well with small graphs. This technique starts with a small scaling up, controlled by the overlap_scaling attribute, which can remove a significant portion of the overlap. The prism option also accepts an optional non-negative integer suffix. This can be used to control the number of attempts made at overlap removal. By default, overlap="prism" is equivalent to overlap="prism1000". Setting overlap="prism0" causes only the scaling phase to be run. If the value is "compress", the layout will be scaled down as much as possible without introducing any overlaps, obviously assuming there are none to begin with. sep : float (default: None) Specifies margin to leave around nodes when removing node overlap. This guarantees a minimal non-zero distance between nodes. splines : bool (default: False) If True, the edges are drawn as splines and routed around the vertices. vsize : float, PropertyMap, or tuple (default: 0.1) Default vertex size (width and height). If a tuple is specified, the first value should be a property map, and the second is a scale factor. penwidth : float, PropertyMap or tuple (default: 1.0) Specifies the width of the pen, in points, used to draw lines and curves, including the boundaries of edges and clusters. It has no effect on text. Default vertex size (width and height). If a tuple is specified, the first value should be a property map, and the second is a scale factor. elen : float or PropertyMap (default: None) Preferred edge length, in inches. gprops : dict (default: {}) Additional graph properties, as a dictionary. The keys are the property names, and the values must be convertible to string. vprops : dict (default: {}) Additional vertex properties, as a dictionary. The keys are the property names, and the values must be convertible to string, or vertex property maps, with values convertible to strings. eprops : dict (default: {}) Additional edge properties, as a dictionary. The keys are the property names, and the values must be convertible to string, or edge property maps, with values convertible to strings. vcolor : string or PropertyMap (default: None) Drawing color for vertices. If the valued supplied is a property map, the values must be scalar types, whose color values are obtained from the 'vcmap' argument. ecolor : string or PropertyMap (default: None) Drawing color for edges. If the valued supplied is a property map, the values must be scalar types, whose color values are obtained from the 'ecmap' argument. vcmap : matplotlib.colors.Colormap (default: matplotlib.cm.jet) Vertex color map. vnorm : bool (default: True) Normalize vertex color values to the [0,1] range. ecmap : matplotlib.colors.Colormap (default: matplotlib.cm.jet) Edge color map. enorm : bool (default: True) Normalize edge color values to the [0,1] range. output : string (default: "") Output file name. output_format : string (default: "auto") Output file format. Possible values are "auto", "xlib", "ps", "svg", "svgz", "fig", "mif", "hpgl", "pcl", "png", "gif", "dia", "imap", "cmapx". If the value is "auto", the format is guessed from the 'output' parameter, or 'xlib' if it is empty. If the value is None, no output is produced. returngv : bool (default: False) Return the graph object used internally with the gv module. fork : bool (default: False) If true, the program is forked before drawing. This is used as a work-around for a bug in graphviz, where the exit() function is called, which would cause the calling program to end. This is always assumed 'True', if output_format = 'xlib'. seed : int (default: 0) Seed for the random number generator. If the value 0, a different random value is used each time. Returns ------- pos : PropertyMap Vector vertex property map with the x and y coordinates of the vertices. gv : gv.digraph or gv.graph (optional, only if returngv == True) Internally used graphviz graph. Notes ----- This function is a wrapper for the [graphviz] python routines. Extensive additional documentation for the graph, vertex and edge properties is available at: http://www.graphviz.org/doc/info/attrs.html. Examples -------- >>> from numpy import * >>> from numpy.random import seed, zipf >>> seed(42) >>> g = gt.random_graph(1000, lambda: min(zipf(2.4), 40), ... lambda i,j: exp(abs(i-j)), directed=False) >>> # extract largest component >>> comp = gt.label_components(g) >>> h = gt.vertex_hist(g, comp) >>> max_comp = h[1][list(h[0]).index(max(h[0]))] >>> g.remove_vertex_if(lambda v: comp[v] != max_comp) >>> >>> deg = g.degree_property_map("out") >>> deg.get_array()[:] = 2*(sqrt(deg.get_array()[:])*0.5 + 0.4) >>> ebet = gt.betweenness(g)[1] >>> ebet.get_array()[:] *= 4000 >>> ebet.get_array()[:] += 10 >>> gt.graph_draw(g, vsize=deg, vcolor=deg, elen=10, ecolor=ebet, ... penwidth=ebet, overlap="prism", output="graph-draw.png") <...> .. figure:: graph-draw.png :align: center Kamada-Kawai force-directed layout of a graph with a power-law degree distribution, and dissortative degree correlation. The vertex size and color indicate the degree, and the edge color and width the edge betweeness centrality. References ---------- .. [graphviz] http://www.graphviz.org """ if output != "" and output != None: output = os.path.expanduser(output) # check opening file for writing, since graphviz will bork if it is not # possible to open file if os.path.dirname(output) != "" and \ not os.access(os.path.dirname(output), os.W_OK): raise IOError("cannot write to " + os.path.dirname(output)) if g.is_directed(): gvg = gv.digraph("G") else: gvg = gv.graph("G") if layout == "arf": layout = "neato" pos = arf_layout(g, pos=pos) pin = True if pos != None: # copy user-supplied property if isinstance(pos, PropertyMap): pos = ungroup_vector_property(g, pos, [0,1]) else: pos = (g.copy_property(pos[0]), g.copy_property(pos[1])) if type(vsize) == tuple: s = g.new_vertex_property("double") g.copy_property(vsize[0], s) s.a *= vsize[1] vsize = s if type(penwidth) == tuple: s = g.new_edge_property("double") g.copy_property(penwidth[0], s) s.a *= penwidth[1] penwidth = s # main graph properties gv.setv(gvg,"outputorder", "edgesfirst") gv.setv(gvg,"mode", "major") if overlap == False: overlap = "false" else: overlap = "true" if isinstance(overlap,str): gv.setv(gvg,"overlap", overlap) if sep != None: gv.setv(gvg,"sep", str(sep)) if splines: gv.setv(gvg,"splines", "true") gv.setv(gvg,"ratio", str(ratio)) gv.setv(gvg,"size", "%f,%f" % (size[0]/2.54,size[1]/2.54)) # centimeters if maxiter != None: gv.setv(gvg,"maxiter", str(maxiter)) if seed == 0: seed = numpy.random.randint(sys.maxint) if type(seed) == int: gv.setv(gvg, "start", "%d" % seed) else: gv.setv(gvg, "start", seed) # apply all user supplied properties for k,val in gprops.iteritems(): if isinstance(val, PropertyMap): gv.setv(gvg, k, str(val[g])) else: gv.setv(gvg, k, str(val)) # normalize color properties if vcolor != None and not isinstance(vcolor, str): minmax = [float("inf"), -float("inf")] for v in g.vertices(): c = vcolor[v] minmax[0] = min(c,minmax[0]) minmax[1] = max(c,minmax[1]) if minmax[0] == minmax[1]: minmax[1] += 1 if vnorm: vnorm = matplotlib.colors.normalize(vmin=minmax[0], vmax=minmax[1]) else: vnorm = lambda x: x if ecolor != None and not isinstance(ecolor, str): minmax = [float("inf"), -float("inf")] for e in g.edges(): c = ecolor[e] minmax[0] = min(c,minmax[0]) minmax[1] = max(c,minmax[1]) if minmax[0] == minmax[1]: minmax[1] += 1 if enorm: enorm = matplotlib.colors.normalize(vmin=minmax[0], vmax=minmax[1]) else: enorm = lambda x: x nodes = [] edges = [] # add nodes for v in g.vertices(): n = gv.node(gvg,str(g.vertex_index[v])) if type(vsize) == PropertyMap: vw = vh = vsize[v] else: vw = vh = vsize gv.setv(n, "width", "%g" % vw) gv.setv(n, "height", "%g" % vh) gv.setv(n, "style", "filled") gv.setv(n, "color", "black") # apply color if vcolor != None: if isinstance(vcolor,str): gv.setv(n, "fillcolor", vcolor) else: color = tuple([int(c*255.0) for c in vcmap(vnorm(vcolor[v]))]) gv.setv(n, "fillcolor", "#%.2x%.2x%.2x%.2x" % color) else: gv.setv(n, "fillcolor", "red") gv.setv(n, "label", "") # user supplied position if pos != None: gv.setv(n, "pos", "%f,%f" % (pos[0][v],pos[1][v])) gv.setv(n, "pin", str(pin)) # apply all user supplied properties for k,val in vprops.iteritems(): if isinstance(val, PropertyMap): gv.setv(n, k, str(val[v])) else: gv.setv(n, k, str(val)) nodes.append(n) for e in g.edges(): ge = gv.edge(nodes[g.vertex_index[e.source()]], nodes[g.vertex_index[e.target()]]) gv.setv(ge, "arrowsize", "0.3") if g.is_directed(): gv.setv(ge, "arrowhead", "vee") # apply color if ecolor != None: if isinstance(ecolor,str): gv.setv(ge, "color", ecolor) else: color = tuple([int(c*255.0) for c in ecmap(enorm(ecolor[e]))]) gv.setv(ge, "color", "#%.2x%.2x%.2x%.2x" % color) # apply edge length if elen != None: if isinstance(elen, PropertyMap): gv.setv(ge, "len", str(elen[e])) else: gv.setv(ge, "len", str(elen)) # apply width if penwidth != None: if isinstance(penwidth, PropertyMap): gv.setv(ge, "penwidth", str(penwidth[e])) else: gv.setv(ge, "penwidth", str(penwidth)) # apply all user supplied properties for k,v in eprops.iteritems(): if isinstance(v, PropertyMap): gv.setv(ge, k, str(v[e])) else: gv.setv(ge, k, str(v)) edges.append(ge) gv.layout(gvg, layout) gv.render(gvg, "dot", "/dev/null") # retrieve positions if pos == None: pos = (g.new_vertex_property("double"), g.new_vertex_property("double")) for n in xrange(0, len(nodes)): p = gv.getv(nodes[n], "pos") p = p.split(",") pos[0][g.vertex(n)] = float(p[0]) pos[1][g.vertex(n)] = float(p[1]) if output_format == "auto": if output == "": output_format = "xlib" elif output != None: output_format = output.split(".")[-1] # if using xlib we need to fork the process, otherwise good ol' graphviz # will call exit() when the window is closed if output_format == "xlib" or fork: pid = os.fork() if pid == 0: gv.render(gvg, output_format, output) os._exit(0) # since we forked, it's good to be sure if output_format != "xlib": os.wait() elif output != None: gv.render(gvg, output_format, output) # I don't get this, but it seems necessary pos[0].get_array()[:] /= 100 pos[1].get_array()[:] /= 100 pos = group_vector_property(g, pos) if returngv: return pos, gv else: gv.rm(gvg) del gvg return pos
19b68a13db29808d40d53cad6e35f01a3e20fe34 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3516/19b68a13db29808d40d53cad6e35f01a3e20fe34/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2667, 67, 9446, 12, 75, 16, 949, 33, 7036, 16, 963, 28657, 3600, 16, 4711, 3631, 7092, 33, 8381, 16, 3511, 33, 315, 4644, 31093, 3113, 25743, 33, 7036, 16, 7169, 33, 315, 5935, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2667, 67, 9446, 12, 75, 16, 949, 33, 7036, 16, 963, 28657, 3600, 16, 4711, 3631, 7092, 33, 8381, 16, 3511, 33, 315, 4644, 31093, 3113, 25743, 33, 7036, 16, 7169, 33, 315, 5935, 3113, ...
if stat_dict["statistic"] == "bittenl":
if stat_dict["statistic"] == "bitten_l":
def symlinksafe( target, linkname ): """ Creates a link, does not nag about when it already exists """ try: os.symlink( target, linkname ) except OSError, (errno, strerror): if errno==17: print "WARNING: link %s already exist" % (linkname) else: raise
3cf4465a16c4950ff03c03cb1c173c5f384df3da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/3cf4465a16c4950ff03c03cb1c173c5f384df3da/upperlimit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10563, 4626, 12, 1018, 16, 1692, 529, 262, 30, 3536, 10210, 279, 1692, 16, 1552, 486, 290, 346, 2973, 1347, 518, 1818, 1704, 3536, 775, 30, 1140, 18, 21278, 12, 1018, 16, 1692, 529, 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, 10563, 4626, 12, 1018, 16, 1692, 529, 262, 30, 3536, 10210, 279, 1692, 16, 1552, 486, 290, 346, 2973, 1347, 518, 1818, 1704, 3536, 775, 30, 1140, 18, 21278, 12, 1018, 16, 1692, 529, 26...
self.groupBox_2 = QtGui.QGroupBox(self.TabPage6) self.groupBox_2.setObjectName("groupBox_2") self.vboxlayout37 = QtGui.QVBoxLayout(self.groupBox_2) self.vboxlayout37.setMargin(9) self.vboxlayout37.setSpacing(6) self.vboxlayout37.setObjectName("vboxlayout37")
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
buttonSizer.AddWindow(wx.Button(self, id=wx.ID_OK, label=messages.OK), 0, border=5, flag=wx.ALL) buttonSizer.AddSpacer(wx.Size(10, 10), border=0, flag=0)
okButton = wx.Button(self, id=wx.ID_OK, label=messages.OK) buttonSizer.AddWindow(okButton, 0, border=5, flag=wx.ALL)
def __init__(self, parent, dialogTitle, defaultFile, fileMask, fileMode, optionsList):
cbfeaa4cb867fa9b2f5d9ff01458c1c5acfd8548 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cbfeaa4cb867fa9b2f5d9ff01458c1c5acfd8548/ImportExport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 6176, 4247, 16, 805, 812, 16, 585, 5796, 16, 585, 2309, 16, 702, 682, 4672, 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, 16, 6176, 4247, 16, 805, 812, 16, 585, 5796, 16, 585, 2309, 16, 702, 682, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
valid = TRUE
valid = True
def doValidate (self, init=FALSE): """ Validate the widget settings.
ab8126074d7036807d1d842171687cc01617a181 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ab8126074d7036807d1d842171687cc01617a181/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 4270, 261, 2890, 16, 1208, 33, 21053, 4672, 3536, 3554, 326, 3604, 1947, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 4270, 261, 2890, 16, 1208, 33, 21053, 4672, 3536, 3554, 326, 3604, 1947, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
prevexact = context.flags[Inexact]
def _rescale(self, exp, rounding=None, context=None, watchexp=1): """Rescales so that the exponent is exp.
8ba896ad541ea1d2fc9fe67ed0a591eccacd10c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8ba896ad541ea1d2fc9fe67ed0a591eccacd10c5/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 455, 1869, 12, 2890, 16, 1329, 16, 13885, 33, 7036, 16, 819, 33, 7036, 16, 4267, 2749, 33, 21, 4672, 3536, 607, 21177, 1427, 716, 326, 9100, 353, 1329, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 455, 1869, 12, 2890, 16, 1329, 16, 13885, 33, 7036, 16, 819, 33, 7036, 16, 4267, 2749, 33, 21, 4672, 3536, 607, 21177, 1427, 716, 326, 9100, 353, 1329, 18, 2, -100, -100, -100, ...
while not self.vobuReadReturn: if self.pendingCmds == []: cmds = self.collectCmds() else: cmds = self.pendingCmds self.pendingCmds = [] if cmds == []:
for cmd in self.mainItr: gst.log("Running command %s" % str(cmd)) cmd(self) if self.vobuReadReturn:
def vobuRead(self, src): """Invoked by the source element after reading a complete VOBU.""" gst.log("Vobu read")
1ccd869773e1734c1574926c68fdfed456aeae0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/1ccd869773e1734c1574926c68fdfed456aeae0d/manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 947, 89, 1994, 12, 2890, 16, 1705, 4672, 3536, 26215, 635, 326, 1084, 930, 1839, 6453, 279, 3912, 776, 51, 3000, 12123, 314, 334, 18, 1330, 2932, 58, 947, 89, 855, 7923, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 947, 89, 1994, 12, 2890, 16, 1705, 4672, 3536, 26215, 635, 326, 1084, 930, 1839, 6453, 279, 3912, 776, 51, 3000, 12123, 314, 334, 18, 1330, 2932, 58, 947, 89, 855, 7923, 2, -100, ...
return if windowClass == "CiceroUIWndFrame" and role == controlTypes.ROLE_PANE and isinstance(obj, IAccessible): clsList.insert(0, LanguageBar)
def chooseNVDAObjectOverlayClasses(self, obj, clsList): windowClass = obj.windowClassName role = obj.role
2278d7f8fc4889cc6e2449f824eeeeeb02ba3e4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/2278d7f8fc4889cc6e2449f824eeeeeb02ba3e4b/explorer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9876, 11679, 9793, 921, 11627, 4818, 12, 2890, 16, 1081, 16, 2028, 682, 4672, 2742, 797, 273, 1081, 18, 5668, 3834, 2478, 273, 1081, 18, 4615, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9876, 11679, 9793, 921, 11627, 4818, 12, 2890, 16, 1081, 16, 2028, 682, 4672, 2742, 797, 273, 1081, 18, 5668, 3834, 2478, 273, 1081, 18, 4615, 2, -100, -100, -100, -100, -100, -100, -100...
if self._py.has_key('refer_blacklist'): bad_list = string.split(self._py['refer_blacklist'],',')
bad_list = string.split(self._py.get('refer_blacklist',''),',')
def genReferrers(self): """ Generate the list of referring files """ # initialize blacklist if self._py.has_key('refer_blacklist'): bad_list = string.split(self._py['refer_blacklist'],',')
5c8c41711f85137116532716cbdf0c5143b2ae89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/5c8c41711f85137116532716cbdf0c5143b2ae89/logstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 1957, 370, 414, 12, 2890, 4672, 3536, 6654, 326, 666, 434, 1278, 20245, 1390, 3536, 468, 4046, 11709, 309, 365, 6315, 2074, 18, 5332, 67, 856, 2668, 266, 586, 67, 22491, 11, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 1957, 370, 414, 12, 2890, 4672, 3536, 6654, 326, 666, 434, 1278, 20245, 1390, 3536, 468, 4046, 11709, 309, 365, 6315, 2074, 18, 5332, 67, 856, 2668, 266, 586, 67, 22491, 11, 4672, ...
self.addLNBSimple(slotid = x, diseqcmode = 3, longitude = float(str(nim.longitude.value[0]) + "." + str(nim.longitude.value[1])), loDirection = nim.longitudeOrientation.value - 2, latitude = float(str(nim.latitude.value[0]) + "." + str(nim.latitude.value[1])), laDirection = nim.latitudeOrientation.value) pass
if currentConfigSelectionElement(nim.latitudeOrientation) == "north": laValue = rotorParam.NORTH else: laValue = rotorParam.SOUTH if currentConfigSelectionElement(nim.longitudeOrientation) == "east": loValue = rotorParam.EAST else: loValue = rotorParam.WEST self.addLNBSimple(sec, slotid = x, diseqcmode = 3, longitude = float(str(nim.longitude.value[0]) + "." + str(nim.longitude.value[1])), loDirection = loValue, latitude = float(str(nim.latitude.value[0]) + "." + str(nim.latitude.value[1])), laDirection = laValue)
def update(self): eDVBSatelliteEquipmentControl.getInstance().clear() self.satList = []
45b15800295dbe7e8aa64c7c97e62ed7a9f0a137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/45b15800295dbe7e8aa64c7c97e62ed7a9f0a137/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 425, 30199, 12692, 270, 19345, 13142, 11568, 3367, 18, 588, 1442, 7675, 8507, 1435, 225, 365, 18, 12973, 682, 273, 5378, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 425, 30199, 12692, 270, 19345, 13142, 11568, 3367, 18, 588, 1442, 7675, 8507, 1435, 225, 365, 18, 12973, 682, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, ...
return self.importer.import_module(mname, globals, locals, fromlist)
return self.importer.import_module(mname, globals, locals, fromlist)
def r_import(self, mname, globals={}, locals={}, fromlist=[]):
ca6ae39a786f3d7535cba0f2aef10692eb750051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ca6ae39a786f3d7535cba0f2aef10692eb750051/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 67, 5666, 12, 2890, 16, 312, 529, 16, 10941, 28793, 8985, 28793, 628, 1098, 33, 8526, 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, ...
[ 1, 1, 1, 1, 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, 436, 67, 5666, 12, 2890, 16, 312, 529, 16, 10941, 28793, 8985, 28793, 628, 1098, 33, 8526, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
class LongOverridesTrunc(base): def __long__(self):
class IntOverridesTrunc(base): def __int__(self):
def __int__(self): return 42.
f1538102e2870e915059041b1c006666c987fe7f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/f1538102e2870e915059041b1c006666c987fe7f/test_long.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 474, 972, 12, 2890, 4672, 327, 14856, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 474, 972, 12, 2890, 4672, 327, 14856, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if not self.validator.isValid(libraryType, libraryName, libraryVersion, libraryQxVersions):
if not self.validator.isValid(libraryName, libraryType, libraryVersion, libraryQxVersions):
def getLibraries(self, manifests): libraries = {} for manifestPath in manifests: try: manifest = getDataFromJsonFile(manifestPath) except RuntimeError, e: console.error(repr(e)) if not "info" in manifest: console.warn("Manifest file %s has no 'info' section, skipping the library." %manifestPath) continue libraryName = manifest["info"]["name"] libraryVersion = manifest["info"]["version"] libraryQxVersions = manifest["info"]["qooxdoo-versions"] try: libraryType = manifest["provides"]["type"] except KeyError: libraryType = None if not self.validator.isValid(libraryType, libraryName, libraryVersion, libraryQxVersions): continue if libraryName not in libraries: libraries[libraryName] = {} if libraryVersion not in libraries[libraryName]: console.info("Adding library %s version %s" %(libraryName,libraryVersion)) # create LibraryVersion instance versionPath = os.path.dirname(manifestPath) libVer = LibraryVersion(libraryVersion, libraryName, versionPath) libVer.manifest = manifest libraries[libraryName][libraryVersion] = libVer else: console.warn("Found additional manifest for version %s of library %s!" %(libraryVersion,libraryName)) return libraries
7955c436f4b75c153e4cc97ef9824e3fb4b3b16e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/7955c436f4b75c153e4cc97ef9824e3fb4b3b16e/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 31909, 12, 2890, 16, 29700, 4672, 14732, 273, 2618, 364, 5643, 743, 316, 29700, 30, 775, 30, 5643, 273, 4303, 1265, 3185, 812, 12, 14357, 743, 13, 1335, 7265, 16, 425, 30, 2983, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31909, 12, 2890, 16, 29700, 4672, 14732, 273, 2618, 364, 5643, 743, 316, 29700, 30, 775, 30, 5643, 273, 4303, 1265, 3185, 812, 12, 14357, 743, 13, 1335, 7265, 16, 425, 30, 2983, 1...
return hd
if var: return hd return hd[0]
def _hd_1D(data,prob,var): "Computes the HD quantiles for a 1D array." xsorted = numpy.sort(data.compressed().view(ndarray)) n = len(xsorted) #......... hd = empty((2,len(prob)), float_) if n < 2: hd.flat = numpy.nan return hd #......... v = arange(n+1) / float(n) betacdf = beta.cdf for (i,p) in enumerate(prob): _w = betacdf(v, (n+1)*p, (n+1)*(1-p)) w = _w[1:] - _w[:-1] hd_mean = dot(w, xsorted) hd[0,i] = hd_mean # hd[1,i] = dot(w, (xsorted-hd_mean)**2) # hd[0, prob == 0] = xsorted[0] hd[0, prob == 1] = xsorted[-1] if var: hd[1, prob == 0] = hd[1, prob == 1] = numpy.nan return hd return hd[0]
98f1ac0fb0c066c16e677eaf94180201c79d6b1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/98f1ac0fb0c066c16e677eaf94180201c79d6b1d/morestats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22057, 67, 21, 40, 12, 892, 16, 7748, 16, 1401, 4672, 315, 10743, 326, 670, 40, 10251, 1449, 364, 279, 404, 40, 526, 1199, 619, 10350, 273, 3972, 18, 3804, 12, 892, 18, 15385, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22057, 67, 21, 40, 12, 892, 16, 7748, 16, 1401, 4672, 315, 10743, 326, 670, 40, 10251, 1449, 364, 279, 404, 40, 526, 1199, 619, 10350, 273, 3972, 18, 3804, 12, 892, 18, 15385, 7...
(qu1,qu2,tables) = self._where_calc(cr, user, args, context)
(qu1,qu2,tables) = self._where_calc(cr, user, args, context=context)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None): if not context: context={} # compute the where, order by, limit and offset clauses (qu1,qu2,tables) = self._where_calc(cr, user, args, context)
6d7de9198ab8756d4e27b1b5a35d6a7f5d1833c8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/6d7de9198ab8756d4e27b1b5a35d6a7f5d1833c8/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 468, 3671, 326, 1625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 468, 3671, 326, 1625, ...
ext = (item[u'screenshot']) filename = setSymbolic(item[u'screenshot'], u'episodeimagedir', u"%s - %s" % (item[u'channelTitle'], item[u'title']))
filename = setSymbolic(item[u'screenshot'], u'episodeimagedir', u"%s - %s" % (sanitiseFileName(item[u'channelTitle']), sanitiseFileName(item[u'title'])))
def createVideometadataRecord(item): '''Using the details from a Miro item create a MythTV videometadata record return an dictionary of MythTV an initialised videometadata record ''' global localhostname, simulation, verbose, storagegroups, ffmpeg, channel_id, flat, image_extensions global videometadata_initialize_record, vid_graphics_dirs, channel_icon_override global local_only ffmpeg_details = getVideoDetails(item[u'videoFilename']) start_end = getStartEndTimes(ffmpeg_details[u'duration'], item[u'downloadedTime']) fieldnames = mythvideo.getTableFieldNames(u'videometadata') sympath = u'Miro' if not flat: sympath+=u"/%s" % item[u'channelTitle'] banners = u'mirobridge_banner.jpg' for ext in image_extensions: filename = u"%s_banner.%s" % (item[u'channelTitle'], ext) if os.path.isfile(vid_graphics_dirs[u'bannerdir']+filename): banners = setSymbolic(vid_graphics_dirs[u'bannerdir']+filename, u'bannerdir', item[u'channelTitle']) break else: if not os.path.isfile(vid_graphics_dirs[u'bannerdir']+banners): banners = '' fanart = u'mirobridge_fanart.jpg' for ext in image_extensions: filename = u"%s_fanart.%s" % (item[u'channelTitle'], ext) if os.path.isfile(vid_graphics_dirs[u'fanartdir']+filename): fanart = setSymbolic(vid_graphics_dirs[u'fanartdir']+filename, u'fanartdir', item[u'channelTitle']) break else: if not os.path.isfile(vid_graphics_dirs[u'fanartdir']+fanart): fanart = '' ffmpeg_details = getVideoDetails(item[u'videoFilename']) start_end = getStartEndTimes(ffmpeg_details[u'duration'], item[u'downloadedTime']) videometadata = {} for key in videometadata_initialize_record: # Initialize the videometadata record videometadata[key] = videometadata_initialize_record[key] videometadata[u'title'] = item[u'channelTitle'] videometadata[u'subtitle'] = item[u'title'] try: details = massageDescription(item[u'description'], extras=True) except TypeError: print print u"MythVideo-Channel title(%s) subtitle(%s)" % (item[u'channelTitle'], item[u'title']) print u"The 'massageDescription()' function could not remove HTML and XML tags from:" print u"Description (%s)\n\n" % item[u'description'] details = {u'plot': item[u'description']} for key in details.keys(): videometadata[key] = details[key] if item[u'releasedate'] == None: item[u'releasedate'] = item[u'downloadedTime'] try: dummy = item[u'releasedate'].strftime('%Y-%m-%d') except ValueError: item[u'releasedate'] = item[u'downloadedTime'] if item[u'releasedate'] != None: videometadata[u'year'] = item[u'releasedate'].strftime('%Y') if u'episode' in fieldnames: videometadata[u'season'] = 0 videometadata[u'episode'] = 0 videometadata[u'length'] = ffmpeg_details[u'duration']/60 videometadata[u'category'] = mythvideo.getGenreId(u'Miro') if not u'copied' in item.keys(): ext = (item[u'videoFilename']) videofile = setSymbolic(item[u'videoFilename'], u'mythvideo', "%s/%s - %s" % (sympath, item[u'channelTitle'], item[u'title']), allow_symlink=True) if videofile != None: videometadata[u'filename'] = videofile if not local_only and videometadata[u'filename'][0] != u'/': videometadata[u'host'] = localhostname.lower() else: logger.critical(u"The file (%s) must exist to create a videometadata record" % item[u'videoFilename']) sys.exit(False) else: videometadata[u'filename'] = item[u'videoFilename'] if not local_only and videometadata[u'filename'][0] != u'/': videometadata[u'host'] = localhostname.lower() if not u'copied' in item.keys(): if item[u'channel_icon'] and not item[u'channelTitle'].lower() in channel_icon_override: ext = (item[u'channel_icon']) filename = setSymbolic(item[u'channel_icon'], u'posterdir', u"%s" % (item[u'channelTitle'])) if filename != None: videometadata[u'coverfile'] = filename else: if item[u'item_icon']: ext = (item[u'item_icon']) filename = setSymbolic(item[u'item_icon'], u'posterdir', u"%s - %s" % (item[u'channelTitle'], item[u'title'])) if filename != None: videometadata[u'coverfile'] = filename else: videometadata[u'coverfile'] = item[u'channel_icon'] if not item.has_key(u'copied'): if item[u'screenshot']: ext = (item[u'screenshot']) filename = setSymbolic(item[u'screenshot'], u'episodeimagedir', u"%s - %s" % (item[u'channelTitle'], item[u'title'])) if filename != None: videometadata[u'screenshot'] = filename else: if item[u'screenshot']: videometadata[u'screenshot'] = item[u'screenshot'] if banners != u'' and videometadata[u'subtitle'] != u'': if storagegroups.has_key(u'bannerdir'): videometadata[u'banner'] = banners else: videometadata[u'banner'] = vid_graphics_dirs[u'bannerdir']+banners if fanart != u'': if storagegroups.has_key(u'fanartdir'): videometadata[u'fanart'] = fanart else: videometadata[u'fanart'] = vid_graphics_dirs[u'fanartdir']+fanart return [videometadata, createOldRecordedRecord(item, start_end[0], start_end[1])] # end createVideometadataRecord()
0f178cb606ce1cfb96840e30bd489d420b041e6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/0f178cb606ce1cfb96840e30bd489d420b041e6d/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 58, 831, 362, 1175, 2115, 12, 1726, 4672, 9163, 7736, 326, 3189, 628, 279, 490, 11373, 761, 752, 279, 8005, 451, 15579, 331, 831, 362, 1175, 1409, 327, 392, 3880, 434, 8005, 451, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 58, 831, 362, 1175, 2115, 12, 1726, 4672, 9163, 7736, 326, 3189, 628, 279, 490, 11373, 761, 752, 279, 8005, 451, 15579, 331, 831, 362, 1175, 1409, 327, 392, 3880, 434, 8005, 451, ...
num_invalid_values = arg.GetNumInvalidValues(func)
num_invalid_values = arg.GetNumInvalidValues()
def WriteInvalidUnitTest(self, func, file, test, extra = {}): """Writes a invalid unit test.""" arg_index = 0 for arg in func.GetOriginalArgs(): num_invalid_values = arg.GetNumInvalidValues(func) for value_index in range(0, num_invalid_values): arg_strings = [] parse_result = "kNoError" gl_error = None count = 0 for arg in func.GetOriginalArgs(): if count == arg_index: (arg_string, parse_result, gl_error) = arg.GetInvalidArg( count, value_index) else: arg_string = arg.GetValidArg(count, 0) arg_strings.append(arg_string) count += 1 gl_arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): gl_arg_strings.append("_") count += 1 gl_func_name = func.GetGLTestFunctionName() gl_error_test = '' if not gl_error == None: gl_error_test = '\n EXPECT_EQ(%s, GetGLError());' % gl_error
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1941, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 16, 1842, 16, 2870, 273, 2618, 4672, 3536, 8368, 279, 2057, 2836, 1842, 12123, 1501, 67, 1615, 273, 374, 364, 1501, 316, 1326, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1941, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 16, 1842, 16, 2870, 273, 2618, 4672, 3536, 8368, 279, 2057, 2836, 1842, 12123, 1501, 67, 1615, 273, 374, 364, 1501, 316, 1326, 18, ...
sage: J = 1/I; J
sage: J = 1/I sage: J
def basis(self): """ Return an immutable sequence of elements of this ideal (note: their parent is the number field) that form a basis for this ideal viewed as a ZZ-module.
1500189e7c96fb63b9ce3a0b2e9857b8fcf2164f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/1500189e7c96fb63b9ce3a0b2e9857b8fcf2164f/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10853, 12, 2890, 4672, 3536, 2000, 392, 11732, 3102, 434, 2186, 434, 333, 23349, 261, 7652, 30, 3675, 982, 353, 326, 1300, 652, 13, 716, 646, 279, 10853, 364, 333, 23349, 1476, 329, 487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10853, 12, 2890, 4672, 3536, 2000, 392, 11732, 3102, 434, 2186, 434, 333, 23349, 261, 7652, 30, 3675, 982, 353, 326, 1300, 652, 13, 716, 646, 279, 10853, 364, 333, 23349, 1476, 329, 487,...
if p is not None: return p
if p: return p
def load(self, oid, version, _stuff=None): self._lock_acquire() try: p = self._cache.load(oid, version) if p is not None: return p p, s, v, pv, sv = self._call('zeoLoad', oid) self._cache.store(oid, p, s, v, pv, sv) if not v or not version or version != v: return p, s return pv, sv finally: self._lock_release()
c89a419ee8f07b8a33e4840923d2c422b67576aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/c89a419ee8f07b8a33e4840923d2c422b67576aa/ClientStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 7764, 16, 1177, 16, 389, 334, 3809, 33, 7036, 4672, 365, 6315, 739, 67, 1077, 1039, 1435, 775, 30, 293, 273, 365, 6315, 2493, 18, 945, 12, 839, 16, 1177, 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, 1262, 12, 2890, 16, 7764, 16, 1177, 16, 389, 334, 3809, 33, 7036, 4672, 365, 6315, 739, 67, 1077, 1039, 1435, 775, 30, 293, 273, 365, 6315, 2493, 18, 945, 12, 839, 16, 1177, 13, 309,...
print _center(month_name[month] + ' ' + `year`, 7*(w+1) - 1), print '\n'*l, print weekheader(w), print '\n'*l, for week in monthcalendar(year, month): prweek(week, w) print '\n'*l,
s = (_center(month_name[themonth] + ' ' + `theyear`, 7 * (w + 1) - 1).rstrip() + '\n' * l + weekheader(w).rstrip() + '\n' * l) for aweek in monthcalendar(theyear, themonth): s = s + week(aweek, w).rstrip() + '\n' * l return s[:-l] + '\n'
def prmonth(year, month, w = 0, l = 0): """Print a month's calendar.""" w = max(2, w) l = max(1, l) print _center(month_name[month] + ' ' + `year`, 7*(w+1) - 1), print '\n'*l, print weekheader(w), print '\n'*l, for week in monthcalendar(year, month): prweek(week, w) print '\n'*l,
f6f5b5ac6e37709969deec8a4d2ff70f75d105dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f6f5b5ac6e37709969deec8a4d2ff70f75d105dd/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 7496, 12, 6874, 16, 3138, 16, 341, 273, 374, 16, 328, 273, 374, 4672, 3536, 5108, 279, 3138, 1807, 5686, 12123, 341, 273, 943, 12, 22, 16, 341, 13, 328, 273, 943, 12, 21, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 7496, 12, 6874, 16, 3138, 16, 341, 273, 374, 16, 328, 273, 374, 4672, 3536, 5108, 279, 3138, 1807, 5686, 12123, 341, 273, 943, 12, 22, 16, 341, 13, 328, 273, 943, 12, 21, 16, ...
'(%s). Exiting.' % source_path)
'(%r). Exiting.' % self.destination_path)
def open(self): try: self.destination = open(self.destination_path, 'w') except IOError, error: if not self.handle_io_errors: raise print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error) print >>sys.stderr, ('Unable to open destination file for writing ' '(%s). Exiting.' % source_path) sys.exit(1) self.opened = 1
308fa73c0e30dc0c552339c6fe145fa0e633429b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/308fa73c0e30dc0c552339c6fe145fa0e633429b/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 4672, 775, 30, 365, 18, 10590, 273, 1696, 12, 2890, 18, 10590, 67, 803, 16, 296, 91, 6134, 1335, 8340, 16, 555, 30, 309, 486, 365, 18, 4110, 67, 1594, 67, 4324, 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, 1696, 12, 2890, 4672, 775, 30, 365, 18, 10590, 273, 1696, 12, 2890, 18, 10590, 67, 803, 16, 296, 91, 6134, 1335, 8340, 16, 555, 30, 309, 486, 365, 18, 4110, 67, 1594, 67, 4324, 30, ...
update = Update.Update()
import bleachbit.Update update = bleachbit.Update.Update()
def check_online_updates(self): """Check for software updates in background""" update = Update.Update() if update.is_update_available(): gobject.idle_add(self.enable_online_update, update.get_update_info_url())
172134923f18cf7e444d183a0a73ebddceee0fa3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/172134923f18cf7e444d183a0a73ebddceee0fa3/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 21026, 67, 14703, 12, 2890, 4672, 3536, 1564, 364, 17888, 4533, 316, 5412, 8395, 1930, 24706, 497, 3682, 18, 1891, 1089, 273, 24706, 497, 3682, 18, 1891, 18, 1891, 1435, 309, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 21026, 67, 14703, 12, 2890, 4672, 3536, 1564, 364, 17888, 4533, 316, 5412, 8395, 1930, 24706, 497, 3682, 18, 1891, 1089, 273, 24706, 497, 3682, 18, 1891, 18, 1891, 1435, 309, 10...
def get_time(self): t = time() + self.offset if t < self.time or t > self.time + _MAXFORWARD: self.time += _FUDGE self.offset += self.time - t return self.time self.time = t
def get_time(self): self.lock.acquire() try: t = time() + self.offset if t < self.time or t > self.time + _MAXFORWARD: self.time += _FUDGE self.offset += self.time - t return self.time self.time = t finally: self.lock.release()
def get_time(self): t = time() + self.offset if t < self.time or t > self.time + _MAXFORWARD: self.time += _FUDGE self.offset += self.time - t return self.time self.time = t return t
66ad9ede3285baa7082278ac5548d1567703b9ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/66ad9ede3285baa7082278ac5548d1567703b9ee/clock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 957, 12, 2890, 4672, 365, 18, 739, 18, 1077, 1039, 1435, 775, 30, 268, 273, 813, 1435, 397, 365, 18, 3348, 309, 268, 411, 365, 18, 957, 578, 268, 405, 365, 18, 957, 397, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 957, 12, 2890, 4672, 365, 18, 739, 18, 1077, 1039, 1435, 775, 30, 268, 273, 813, 1435, 397, 365, 18, 3348, 309, 268, 411, 365, 18, 957, 578, 268, 405, 365, 18, 957, 397, 3...
user, company_ids, context=context)]
user_id, company_ids, context=context)]
def get_preferences_fields_view(self, cursor, user_id, context=None): company_obj = self.pool.get('company.company')
2edd015b82dbfc1067b1e5fa9892bd4193d824a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9291/2edd015b82dbfc1067b1e5fa9892bd4193d824a3/company.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 23219, 67, 2821, 67, 1945, 12, 2890, 16, 3347, 16, 729, 67, 350, 16, 819, 33, 7036, 4672, 9395, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 16840, 18, 16840, 6134, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 23219, 67, 2821, 67, 1945, 12, 2890, 16, 3347, 16, 729, 67, 350, 16, 819, 33, 7036, 4672, 9395, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 16840, 18, 16840, 6134, 2, -100,...
for ref in guide.findAll('reference', href=True): ref['href'] = os.path.basename(htmlfile)+ref['href']
try: for ref in guide.findAll('reference', href=True): ref['href'] = os.path.basename(htmlfile)+ref['href'] except AttributeError: pass
def extract_content(self, output_dir=os.getcwdu()): output_dir = os.path.abspath(output_dir) if self.book_header.encryption_type != 0: raise MobiError('Cannot extract content from a DRM protected ebook') processed_records = self.extract_text() self.add_anchors() self.processed_html = self.processed_html.decode(self.book_header.codec, 'ignore') self.extract_images(processed_records, output_dir) self.replace_page_breaks() self.cleanup() self.processed_html = re.compile('<head>', re.IGNORECASE).sub( '<head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n', self.processed_html) soup = BeautifulSoup(self.processed_html.replace('> <', '>\n<')) guide = soup.find('guide') for elem in soup.findAll(['metadata', 'guide']): elem.extract() htmlfile = os.path.join(output_dir, self.name+'.html') for ref in guide.findAll('reference', href=True): ref['href'] = os.path.basename(htmlfile)+ref['href'] open(htmlfile, 'wb').write(unicode(soup).encode('utf8')) self.htmlfile = htmlfile if self.book_header.exth is not None: ncx = cStringIO.StringIO() opf = self.create_opf(htmlfile, guide) opf.render(open(os.path.splitext(htmlfile)[0]+'.opf', 'wb'), ncx) ncx = ncx.getvalue() if ncx: open(os.path.splitext(htmlfile)[0]+'.ncx', 'wb').write(ncx)
61c29df9d7cc14ed9496bf0e79bebd3ae4d607a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/61c29df9d7cc14ed9496bf0e79bebd3ae4d607a3/reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 1745, 12, 2890, 16, 876, 67, 1214, 33, 538, 18, 588, 71, 91, 2544, 1435, 4672, 876, 67, 1214, 273, 1140, 18, 803, 18, 5113, 803, 12, 2844, 67, 1214, 13, 309, 365, 18, 361...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 1745, 12, 2890, 16, 876, 67, 1214, 33, 538, 18, 588, 71, 91, 2544, 1435, 4672, 876, 67, 1214, 273, 1140, 18, 803, 18, 5113, 803, 12, 2844, 67, 1214, 13, 309, 365, 18, 361...
entry.connect("toggled", lambda widget: setFunction(entry.get_active()))
entry.connect("toggled", lambda widget: setFunction(bool(entry.get_active())))
def addWidget(self, initialValue, setFunction): entry = gtk.CheckButton() self.setWidget(entry, initialValue) entry.connect("toggled", lambda widget: setFunction(entry.get_active())) return entry
5121ef3938dda22667ee4cb0c6aeb3a927b7c9f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/5121ef3938dda22667ee4cb0c6aeb3a927b7c9f5/Tweak.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22149, 12, 2890, 16, 11837, 16, 444, 2083, 4672, 1241, 273, 22718, 18, 1564, 3616, 1435, 365, 18, 542, 4609, 12, 4099, 16, 11837, 13, 1241, 18, 3612, 2932, 88, 23972, 1259, 3113, 3195, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22149, 12, 2890, 16, 11837, 16, 444, 2083, 4672, 1241, 273, 22718, 18, 1564, 3616, 1435, 365, 18, 542, 4609, 12, 4099, 16, 11837, 13, 1241, 18, 3612, 2932, 88, 23972, 1259, 3113, 3195, ...
if not bool( os.environ.get('GRIDLOG_ON', False) ):
if not bool( int(os.environ.get('GRIDLOG_ON', 0)) ):
def gridLog(**kw): """Send GLRecord, Distributed Logging Utilities If the scheme is passed as a keyword parameter the value is expected to be a callable function that takes 2 parameters: url, outputStr GRIDLOG_ON -- turn grid logging on GRIDLOG_DEST -- provide URL destination """ import os if not bool( os.environ.get('GRIDLOG_ON', False) ): return url = os.environ.get('GRIDLOG_DEST') if url is None: return ## NOTE: urlparse problem w/customized schemes try: scheme = url[:url.find('://')] send = GLRegistry[scheme] send( url, str(GLRecord(**kw)), ) except Exception, ex: print >>sys.stderr, "*** gridLog failed -- %s" %(str(kw))
c5cbf7200b8ccae9ac52a3028dae77f3aed41186 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14538/c5cbf7200b8ccae9ac52a3028dae77f3aed41186/logging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3068, 1343, 12, 636, 9987, 4672, 3536, 3826, 10252, 2115, 16, 27877, 10253, 26703, 971, 326, 4355, 353, 2275, 487, 279, 4932, 1569, 326, 460, 353, 2665, 358, 506, 279, 4140, 445, 716, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3068, 1343, 12, 636, 9987, 4672, 3536, 3826, 10252, 2115, 16, 27877, 10253, 26703, 971, 326, 4355, 353, 2275, 487, 279, 4932, 1569, 326, 460, 353, 2665, 358, 506, 279, 4140, 445, 716, 55...
includes = [
includes = [
def addDataFiles(dataFiles, fromDir, toSubDir=None, inclHiddenDirs=False): """Find data files and format data for the data_files argument of setup. In/Out: - dataFiles: a list to which is appended zero or more of these elements: [subDir, list of paths to resource files] Inputs: - fromDir: path to root directory of existing resource files - toSubDir: relative path to resources in package; if omitted then the final dir of fromDir is used - inclHiddenDirs: if True, the contents of directories whose names start with "." are included Returns a list of the following elements: """ lenFromDir = len(fromDir) if toSubDir == None: toSubDir = os.path.split(fromDir)[1] for (dirPath, dirNames, fileNames) in os.walk(fromDir): if not inclHiddenDirs: numNames = len(dirNames) for ii in range(numNames-1, -1, -1): if dirNames[ii].startswith("."): del(dirNames[ii]) if not dirPath.startswith(fromDir): raise RuntimeError("Cannot deal with %r files; %s does not start with %r" %\ (resBase, dirPath, fromDir)) toPath = os.path.join(toSubDir, dirPath[lenFromDir+1:]) filePaths = [os.path.join(dirPath, fileName) for fileName in fileNames] dataFiles.append((toPath, filePaths))
3d881ef58d016651b4b1da8fc341844591cbd82a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6236/3d881ef58d016651b4b1da8fc341844591cbd82a/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21958, 2697, 12, 892, 2697, 16, 628, 1621, 16, 358, 1676, 1621, 33, 7036, 16, 2823, 9345, 9872, 33, 8381, 4672, 3536, 3125, 501, 1390, 471, 740, 501, 364, 326, 501, 67, 2354, 1237, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21958, 2697, 12, 892, 2697, 16, 628, 1621, 16, 358, 1676, 1621, 33, 7036, 16, 2823, 9345, 9872, 33, 8381, 4672, 3536, 3125, 501, 1390, 471, 740, 501, 364, 326, 501, 67, 2354, 1237, 434...
def getBestArch(): arch = canonArch
def getBestArch(myarch=None): if myarch: arch = myarch else: arch = canonArch
def getBestArch(): arch = canonArch if arch.startswith("sparc64"): arch = "sparc" if arch.startswith("ppc64"): arch = "ppc" return arch
c294eb51b948cc8f5e0ad830f55a7c483e4e31e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/c294eb51b948cc8f5e0ad830f55a7c483e4e31e5/arch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28782, 12269, 12, 4811, 991, 33, 7036, 4672, 309, 3399, 991, 30, 6637, 273, 3399, 991, 469, 30, 6637, 273, 29147, 12269, 225, 309, 6637, 18, 17514, 1918, 2932, 87, 1065, 71, 1105, 6, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28782, 12269, 12, 4811, 991, 33, 7036, 4672, 309, 3399, 991, 30, 6637, 273, 3399, 991, 469, 30, 6637, 273, 29147, 12269, 225, 309, 6637, 18, 17514, 1918, 2932, 87, 1065, 71, 1105, 6, 4...
gLogger.error(errStr,channelName)
gLogger.error( errStr, channelName )
def __minimiseTotalWait(self,sourceSEs,destSEs): """ This creates a replication tree based on observed throughput on the channels """ res = self.__getTimeToStart() if not res['OK']: gLogger.error(res['Message']) return {} channelInfo = res['Value']
9005c0a96ba1bc0698c543bcb4c1886f4eeee344 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9005c0a96ba1bc0698c543bcb4c1886f4eeee344/ReplicationScheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1154, 381, 784, 5269, 5480, 12, 2890, 16, 3168, 1090, 87, 16, 10488, 1090, 87, 4672, 3536, 1220, 3414, 279, 11335, 2151, 2511, 603, 12117, 24677, 603, 326, 5750, 3536, 400, 273, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1154, 381, 784, 5269, 5480, 12, 2890, 16, 3168, 1090, 87, 16, 10488, 1090, 87, 4672, 3536, 1220, 3414, 279, 11335, 2151, 2511, 603, 12117, 24677, 603, 326, 5750, 3536, 400, 273, 36...
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
return open('/'.join(rnames)).read()
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
60645362636ace6b92ed93751ee8e997405749bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11005/60645362636ace6b92ed93751ee8e997405749bb/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 2668, 2473, 18, 5701, 12, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 855, 30857, 86, 1973, 4672, 327, 1696, 2668, 2473, 18, 5701, 12, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
f1.a.myclass is not F.a.myclass:
f1.a.myclass is not F.a.myclass:
def b(): 'my docstring' pass
033daa49eafae52f0b88085117e1bdf1cff2fe16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/033daa49eafae52f0b88085117e1bdf1cff2fe16/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 13332, 296, 4811, 14525, 11, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 324, 13332, 296, 4811, 14525, 11, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
table_elem = cls(AttributesImpl({u"Name": u"%s:table" % table_name}))
table_elem = cls(AttributesImpl({u"Name": u"%s:table" % table_name}), connection = connection)
def get_xml(connection, table_names = None): """ Construct an XML document tree wrapping around the contents of the database. On success the return value is a ligolw.LIGO_LW element containing the tables as children. Arguments are a connection to to a database, and an optional list of table names to dump. If table_names is not provided the set is obtained from get_table_names() """ ligo_lw = ligolw.LIGO_LW() if table_names is None: table_names = get_table_names(connection) for table_name in table_names: # build the table document tree. copied from # lsctables.New() try: cls = TableByName[table_name] except KeyError: cls = DBTable table_elem = cls(AttributesImpl({u"Name": u"%s:table" % table_name})) for column_name, column_type in get_column_info(connection, table_elem.dbtablename): if table_elem.validcolumns is not None: # use the pre-defined column type column_type = table_elem.validcolumns[column_name] else: # guess the column type column_type = ligolwtypes.FromSQLiteType[column_type] table_elem.appendChild(table.Column(AttributesImpl({u"Name": u"%s:%s" % (table_name, column_name), u"Type": column_type}))) table_elem._end_of_columns() table_elem.appendChild(table.TableStream(AttributesImpl({u"Name": u"%s:table" % table_name}))) ligo_lw.appendChild(table_elem) return ligo_lw
80c0fd5f076a53868111522fa2c3536759b81a1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/80c0fd5f076a53868111522fa2c3536759b81a1f/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2902, 12, 4071, 16, 1014, 67, 1973, 273, 599, 4672, 3536, 14291, 392, 3167, 1668, 2151, 14702, 6740, 326, 2939, 434, 326, 2063, 18, 225, 2755, 2216, 326, 327, 460, 353, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2902, 12, 4071, 16, 1014, 67, 1973, 273, 599, 4672, 3536, 14291, 392, 3167, 1668, 2151, 14702, 6740, 326, 2939, 434, 326, 2063, 18, 225, 2755, 2216, 326, 327, 460, 353, 279, 1...
qualityresult = {}
def check_quality(uri, user, pwd, dbname, modules): uid = login(uri, dbname, user, pwd) if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') qualityresult = {} final = {} test_detail = {} for module in modules: quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' html = '''<html><html><html><html><body><a name="TOP"></a>''' html +="<h1> Module : %s </h1>"%(quality_result['name']) html += "<h2> Final score : %s</h2>"%(quality_result['final_score']) html += "<div id='tabs'>" html += "<ul>" for x,y,detail in quality_result['check_detail_ids']: test = detail.get('name') msg = detail.get('message','') score = round(float(detail.get('score',0)),2) html += "<li><a href=\"#%s\">%s</a></li>"%(test.replace(' ','-'),test) detail_html +="<div id=\"%s\"><h3>%s (Score : %s)</h3>%s</div>"%(test.replace(' ','-'),test,score,detail.get('detail')) test_detail[test] = (score,msg,detail.get('detail','')) html += "</ul>%s</body></html></html></html></html></html>"%(detail_html) html += "</div>" final[quality_result['name']] = (quality_result['final_score'],html,test_detail) fp = open('quality_log.pck','wb') pck_obj = pickle.dump(final,fp) fp.close() print "LOG PATH%s"%(os.path.realpath('quality_log.pck')) return final else: print 'Login Failed...' clean() sys.exit(1)
acfd835091f38c29a91dec8de08265c8a9800759 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/acfd835091f38c29a91dec8de08265c8a9800759/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 16495, 12, 1650, 16, 729, 16, 14720, 16, 18448, 16, 4381, 4672, 4555, 273, 3925, 12, 1650, 16, 18448, 16, 729, 16, 14720, 13, 309, 4555, 30, 1487, 273, 2025, 13832, 830, 495, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 16495, 12, 1650, 16, 729, 16, 14720, 16, 18448, 16, 4381, 4672, 4555, 273, 3925, 12, 1650, 16, 18448, 16, 729, 16, 14720, 13, 309, 4555, 30, 1487, 273, 2025, 13832, 830, 495, ...
n = 500 while PORT is None and n > 0: time.sleep(0.01) n -= 1 time.sleep(0.5)
self.evt.wait() self.evt.clear()
def setUp(self): self.evt = threading.Event() servargs = (self.evt, "220 Hola mundo\n") threading.Thread(target=server, args=servargs).start()
722bd0439a8b328434c4d722d07e5b73ba495a45 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/722bd0439a8b328434c4d722d07e5b73ba495a45/test_smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 73, 11734, 273, 17254, 18, 1133, 1435, 703, 1401, 564, 273, 261, 2890, 18, 73, 11734, 16, 315, 27246, 670, 355, 69, 312, 31226, 64, 82, 7923, 17254, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 73, 11734, 273, 17254, 18, 1133, 1435, 703, 1401, 564, 273, 261, 2890, 18, 73, 11734, 16, 315, 27246, 670, 355, 69, 312, 31226, 64, 82, 7923, 17254, 18,...
group = req.args.get('group')
group = req.args.get('group', '') if subject and subject == subject.upper() or \ group and group == group.upper(): raise TracError("All upper-cased tokens are reserved for " "permission names")
def render_admin_panel(self, req, cat, page, path_info): perm = PermissionSystem(self.env)
99138e5bbdedc1e6dc9c67552c3898d863871afb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/99138e5bbdedc1e6dc9c67552c3898d863871afb/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 4641, 273, 8509, 3163, 12, 2890, 18, 3074, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1743, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 4641, 273, 8509, 3163, 12, 2890, 18, 3074, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
os.path.join("bin", "search_volume_by_s1_s2"),
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass
a019c4b0522ce86d589cf0f39840014d0379a330 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/a019c4b0522ce86d589cf0f39840014d0379a330/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 1206, 326, 6635, 4374, 729, 1550, 8873, 364, 2728, 316, 8247, 2074, 80, 287, 17, 1355, 17, 3074, 18, 674, 3113, 315, 2074, 80, 287, 17, 1355, 17, 3074, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 1206, 326, 6635, 4374, 729, 1550, 8873, 364, 2728, 316, 8247, 2074, 80, 287, 17, 1355, 17, 3074, 18, 674, 3113, 315, 2074, 80, 287, 17, 1355, 17, 3074, 18, ...
platformElement=self.cimRecord(root,ref.platform)
platformElement=self.cimRecord(root)
def q2cim(self,ref,docType):
2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f/Translator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 22, 71, 381, 12, 2890, 16, 1734, 16, 2434, 559, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 22, 71, 381, 12, 2890, 16, 1734, 16, 2434, 559, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.text_getText(curPos)=='\n':
if self.text_getText(curPos,curPos+1)=='\n':
def script_pageDown(self,keyPress): pageLength=config.conf["virtualBuffers"]["linesPerPage"] curPos=self.text_reviewOffset lineCount=0 while (curPos<self.text_characterCount-1) and (lineCount<=pageLength): curPos=curPos+1 if self.text_getText(curPos)=='\n': lineCount+=1 self.text_reviewOffset=curPos if self.text_reviewOffset>=self.text_characterCount-1: audio.speakMessage(_("bottom")) self.text_speakLine(self.text_reviewOffset)
60e94d85be23819c7c86c58da61f31e569068e40 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/60e94d85be23819c7c86c58da61f31e569068e40/baseType.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 2433, 4164, 12, 2890, 16, 856, 11840, 4672, 1363, 1782, 33, 1425, 18, 3923, 9614, 12384, 13699, 6, 6362, 6, 3548, 13005, 11929, 662, 1616, 33, 2890, 18, 955, 67, 16041, 2335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 2433, 4164, 12, 2890, 16, 856, 11840, 4672, 1363, 1782, 33, 1425, 18, 3923, 9614, 12384, 13699, 6, 6362, 6, 3548, 13005, 11929, 662, 1616, 33, 2890, 18, 955, 67, 16041, 2335, ...
client = SystemAdministratorClient( self.host )
client = SystemAdministratorClient( self.host, self.port )
def do_start( self, args ): """ Start services or agents or database server usage: start <system|*> <service|agent|*> start mysql """ argss = args.split() if len( argss ) < 2: print self.do_start.__doc__ return option = argss[0] del argss[0]
cdbcf33eaa5a010e422d7ded5d4dd06765fc84c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/cdbcf33eaa5a010e422d7ded5d4dd06765fc84c6/SystemAdministratorClientCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1937, 12, 365, 16, 833, 262, 30, 3536, 3603, 4028, 578, 16423, 578, 2063, 1438, 225, 4084, 30, 225, 787, 411, 4299, 96, 14, 34, 411, 3278, 96, 5629, 96, 14, 34, 787, 7219, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1937, 12, 365, 16, 833, 262, 30, 3536, 3603, 4028, 578, 16423, 578, 2063, 1438, 225, 4084, 30, 225, 787, 411, 4299, 96, 14, 34, 411, 3278, 96, 5629, 96, 14, 34, 787, 7219, ...
'fill':'Fill contours or not', 'contours':"""Either an integer specifying the number of contour levels, or a sequence of numbers giving the actual contours to use.""",
'fill':'Fill contours or not', 'contours':"""Either an integer specifying the number of contour levels, or a sequence of numbers giving the actual contours to use.""", 'linewidths':'the width of the lines to be plotted (ignored if fill=True)', 'linestyles':'the style of the lines to be plotted (ignored if fill=True)', 'labels':'show line labels or not (ignored if fill=True)', 'label_options':'a dictionary of options for the labels',
def _allowed_options(self): """ Return the allowed options for the ContourPlot class.
193e4ecc8643b94b550be6610365db125959929a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/193e4ecc8643b94b550be6610365db125959929a/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8151, 67, 2116, 12, 2890, 4672, 3536, 2000, 326, 2935, 702, 364, 326, 1816, 477, 11532, 667, 18, 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, 389, 8151, 67, 2116, 12, 2890, 4672, 3536, 2000, 326, 2935, 702, 364, 326, 1816, 477, 11532, 667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
elif isinstance(node.parent, nodes.admonition):
elif isinstance(node.parent, nodes.Admonition):
def visit_title(self, node): """Only 6 section levels are supported by HTML.""" check_id = 0 close_tag = '</p>\n' if isinstance(node.parent, nodes.topic): self.body.append( self.starttag(node, 'p', '', CLASS='topic-title first')) check_id = 1 elif isinstance(node.parent, nodes.sidebar): self.body.append( self.starttag(node, 'p', '', CLASS='sidebar-title first')) check_id = 1 elif isinstance(node.parent, nodes.admonition): self.body.append( self.starttag(node, 'p', '', CLASS='admonition-title first')) check_id = 1 elif isinstance(node.parent, nodes.table): self.body.append( self.starttag(node, 'caption', '')) check_id = 1 close_tag = '</caption>\n' elif self.section_level == 0: # document title self.head.append('<title>%s</title>\n' % self.encode(node.astext())) self.body.append(self.starttag(node, 'h1', '', CLASS='title')) self.context.append('</h1>\n') self.in_document_title = len(self.body) else: h_level = self.section_level + self.initial_header_level - 1 self.body.append( self.starttag(node, 'h%s' % h_level, '')) atts = {} if node.parent.hasattr('id'): atts['name'] = node.parent['id'] if node.hasattr('refid'): atts['class'] = 'toc-backref' atts['href'] = '#' + node['refid'] self.body.append(self.starttag({}, 'a', '', **atts)) self.context.append('</a></h%s>\n' % (h_level)) if check_id: if node.parent.hasattr('id'): self.body.append( self.starttag({}, 'a', '', name=node.parent['id'])) self.context.append('</a>' + close_tag) else: self.context.append(close_tag)
bb4fca680f4533a05c8fa095d8ad3e014c9d10cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/bb4fca680f4533a05c8fa095d8ad3e014c9d10cf/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2649, 12, 2890, 16, 756, 4672, 3536, 3386, 1666, 2442, 7575, 854, 3260, 635, 3982, 12123, 866, 67, 350, 273, 374, 1746, 67, 2692, 273, 4357, 84, 5333, 82, 11, 309, 1549, 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, 3757, 67, 2649, 12, 2890, 16, 756, 4672, 3536, 3386, 1666, 2442, 7575, 854, 3260, 635, 3982, 12123, 866, 67, 350, 273, 374, 1746, 67, 2692, 273, 4357, 84, 5333, 82, 11, 309, 1549, 12, ...
overwrite=False):
overwrite=False, ignore_groups=False):
def write(self, filename, compression=False, group="", append=False, overwrite=False): ''' Write the table to an HDF5 file Required Arguments: *filename*: [ string ] The HDF5 file to write the table to OR *file or group handle*: [ h5py.highlevel.File | h5py.highlevel.Group ] The HDF5 file handle or group handle to write the table to Optional Keyword Arguments: *compression*: [ True | False ] Whether to compress the table inside the HDF5 file *group*: [ string ] The group to write the table to inside the HDF5 file *append*: [ True | False ] Whether to append the table to an existing HDF5 file *overwrite*: [ True | False ] Whether to overwrite any existing file without warning ''' _check_h5py_installed() if isinstance(filename, h5py.highlevel.File) or isinstance(filename, h5py.highlevel.Group): f, g = None, filename if group: if group in g: g = g[group] else: g = g.create_group(group) else: if os.path.exists(filename) and not append: if overwrite: os.remove(filename) else: raise Exception("File exists: %s" % filename) f, g = _get_group(filename, group=group, append=append) if self.table_name: name = self.table_name if '/' in name: warnings.warn("'/' character removed from table name") name = name.replace('/', '-') else: name = "Table" if name in g.keys(): raise Exception("Table %s/%s already exists" % (group, name)) dset = g.create_dataset(name, data=self.data, compression=compression) for keyword in self.keywords: dset.attrs[keyword] = self.keywords[keyword] if f: f.close()
6274f5c14ab3f819bb42db8896d79e3d9e50028e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13233/6274f5c14ab3f819bb42db8896d79e3d9e50028e/hdf5table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 16, 9154, 33, 8381, 16, 1041, 1546, 3113, 714, 33, 8381, 16, 6156, 33, 8381, 16, 2305, 67, 4650, 33, 8381, 4672, 9163, 2598, 326, 1014, 358, 392, 21673, 25, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 16, 9154, 33, 8381, 16, 1041, 1546, 3113, 714, 33, 8381, 16, 6156, 33, 8381, 16, 2305, 67, 4650, 33, 8381, 4672, 9163, 2598, 326, 1014, 358, 392, 21673, 25, ...
self.check_sizeof(0L, h + self.align(2)) self.check_sizeof(1L, h + self.align(2)) self.check_sizeof(-1L, h + self.align(2)) self.check_sizeof(32768L, h + self.align(2) + 2) self.check_sizeof(32768L*32768L-1, h + self.align(2) + 2) self.check_sizeof(32768L*32768L, h + self.align(2) + 4)
self.check_sizeof(0L, size(h + 'H')) self.check_sizeof(1L, size(h + 'H')) self.check_sizeof(-1L, size(h + 'H')) self.check_sizeof(32768L, size(h + 'H') + self.H) self.check_sizeof(32768L*32768L-1, size(h + 'H') + self.H) self.check_sizeof(32768L*32768L, size(h + 'H') + 2*self.H)
def test_specialtypes(self): i = self.i l = self.l p = self.p h = self.headersize # dict self.check_sizeof({}, h + 3*l + 3*p + 8*(l + 2*p)) longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8} self.check_sizeof(longdict, h + 3*l + 3*p + 8*(l + 2*p) + 16*(l + 2*p)) # list self.check_sizeof([], h + l + p + l) self.check_sizeof([1, 2, 3], h + l + p + l + 3*l) # unicode usize = len(u'\0'.encode('unicode-internal')) samples = [u'', u'1'*100] # we need to test for both sizes, because we don't know if the string # has been cached for s in samples: basicsize = h + l + p + l + p + usize * (len(s) + 1) self.check_sizeof(s, basicsize,\ size2=basicsize + sys.getsizeof(str(s))) # XXX trigger caching encoded version as Python string s = samples[1] try: getattr(sys, s) except AttributeError: pass finally: self.check_sizeof(s, basicsize + sys.getsizeof(str(s)))
300a10ceb1febf233333c4843a55c526b4019feb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/300a10ceb1febf233333c4843a55c526b4019feb/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9371, 2352, 12, 2890, 4672, 277, 273, 365, 18, 77, 328, 273, 365, 18, 80, 293, 273, 365, 18, 84, 366, 273, 365, 18, 2485, 554, 468, 2065, 365, 18, 1893, 67, 1467, 792, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9371, 2352, 12, 2890, 4672, 277, 273, 365, 18, 77, 328, 273, 365, 18, 80, 293, 273, 365, 18, 84, 366, 273, 365, 18, 2485, 554, 468, 2065, 365, 18, 1893, 67, 1467, 792, 23...
print
def __init__(self, name, fp, callback, logger=None, doeslogging=0): threading.Thread.__init__(self) self.name = name self.fp = fp self.callback = callback self.logger = None if logger and doeslogging: logger = os.path.join(config.LOGDIR, '%s-%s.log' % (logger, name)) try: try: os.unlink(logger) except: pass self.logger = open(logger, 'w') print _( 'logging child to "%s"' ) % logger except IOError: print print _('ERROR') + ': ' + _( 'Cannot open "%s" for logging!') % logger print _('Set CHILDAPP_DEBUG=0 in local_conf.py, or make %s writable!' ) % \ config.LOGDIR print
b6b952322dac8bcc0b9d3233ff64e1d4ccdd46f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/b6b952322dac8bcc0b9d3233ff64e1d4ccdd46f0/childapp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 4253, 16, 1348, 16, 1194, 33, 7036, 16, 1552, 11167, 33, 20, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 508, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 508, 16, 4253, 16, 1348, 16, 1194, 33, 7036, 16, 1552, 11167, 33, 20, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 508, 36...
Qd.PaintRect(rect)
Qd.PaintRect(_intRect(rect))
def click(self, point, modifiers): # what a mess... orgmouse = point[self._direction] halfgutter = self._gutter / 2 l, t, r, b = self._bounds if self._direction: begin, end = t, b else: begin, end = l, r i = self.findgutter(orgmouse, begin, end) if i is None: return pos = orgpos = begin + (end - begin) * self._gutters[i] # init pos too, for fast click on border, bug done by Petr minpos = self._panesizes[i][0] maxpos = self._panesizes[i+1][1] minpos = begin + (end - begin) * minpos + 64 maxpos = begin + (end - begin) * maxpos - 64 if minpos > orgpos and maxpos < orgpos: return #SetCursor("fist") self.SetPort() if self._direction: rect = l, orgpos - 1, r, orgpos else: rect = orgpos - 1, t, orgpos, b # track mouse --- XXX move to separate method? Qd.PenMode(QuickDraw.srcXor) Qd.PenPat(Qd.GetQDGlobalsGray()) Qd.PaintRect(rect) lastpos = None while Evt.Button(): pos = orgpos - orgmouse + Evt.GetMouse()[self._direction] pos = max(pos, minpos) pos = min(pos, maxpos) if pos == lastpos: continue Qd.PenPat(Qd.GetQDGlobalsGray()) Qd.PaintRect(rect) if self._direction: rect = l, pos - 1, r, pos else: rect = pos - 1, t, pos, b Qd.PenPat(Qd.GetQDGlobalsGray()) Qd.PaintRect(rect) lastpos = pos self._parentwindow.wid.GetWindowPort().QDFlushPortBuffer(None) Evt.WaitNextEvent(0, 3) Qd.PaintRect(rect) Qd.PenNormal() SetCursor("watch") newpos = (pos - begin) / float(end - begin) self._gutters[i] = newpos self._panesizes[i] = self._panesizes[i][0], newpos self._panesizes[i+1] = newpos, self._panesizes[i+1][1] self.makepanebounds() self.installbounds() self._calcbounds()
8d97b9bd36ad3437c2594deecf8b778e5508b8c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8d97b9bd36ad3437c2594deecf8b778e5508b8c1/Wbase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4682, 12, 2890, 16, 1634, 16, 10429, 4672, 468, 4121, 279, 12755, 2777, 2358, 11697, 273, 1634, 63, 2890, 6315, 9855, 65, 19514, 2137, 18220, 273, 365, 6315, 75, 18220, 342, 576, 328, 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, 4682, 12, 2890, 16, 1634, 16, 10429, 4672, 468, 4121, 279, 12755, 2777, 2358, 11697, 273, 1634, 63, 2890, 6315, 9855, 65, 19514, 2137, 18220, 273, 365, 6315, 75, 18220, 342, 576, 328, 16...
subplot.contourf(self.xy_data_array, cmap=eval(cmap), extent=(x0,x1,y0,y1))
subplot.contourf(self.xy_data_array, cmap=cmap, extent=(x0,x1,y0,y1))
def _render_on_subplot(self, subplot): #color map for contour plots: # where/should these be imported??? from matplotlib.cm import (autumn, bone, cool, copper, gray, hot, hsv, jet, pink, prism, spring, summer, winter) options = self.options() fill = options['fill'] cmap = options['cmap'] x0,x1 = float(self.xrange[0]), float(self.xrange[1]) y0,y1 = float(self.yrange[0]), float(self.yrange[1]) if fill: subplot.contourf(self.xy_data_array, cmap=eval(cmap), extent=(x0,x1,y0,y1)) else: subplot.contour(self.xy_data_array, cmap=eval(cmap), extent=(x0,x1,y0,y1))
b639984eb22bccde6ff4b8a4aac44fddc4dfadc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/b639984eb22bccde6ff4b8a4aac44fddc4dfadc9/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 468, 3266, 852, 364, 15332, 17931, 30, 468, 1625, 19, 13139, 4259, 506, 9101, 14646, 35, 628, 13892, 18, 7670, 1930, 261, 5854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 468, 3266, 852, 364, 15332, 17931, 30, 468, 1625, 19, 13139, 4259, 506, 9101, 14646, 35, 628, 13892, 18, 7670, 1930, 261, 5854, ...
response, result = query.GetData(predata, self,site back_response = True)
response, result = query.GetData(predata, self.site, back_response = True)
def query_results(self, **data): """Iterate results from API action=query, using data as parameters.""" querydata = {'action': 'query', 'maxlag': str(wikipedia.config.maxlag)} querydata = query.CombineParams(querydata, data) if not querydata.has_key("action")\ or not querydata['action'] == 'query': raise ValueError( "query_results: 'action' set to value other than 'query'" ) waited = 0 while True: try: response, result = query.GetData(predata, self,site back_response = True) if response.status != 200: # WARNING: if the server is down, this could # cause an infinite loop wikipedia.output(u"HTTP error %i received; retrying..." % response.status) time.sleep(5) continue if data.startswith(u"unknown_action"): e = {'code': data[:14], 'info': data[16:]} raise APIError(e) except ValueError: # if the result isn't valid JSON, there must be a server # problem. Wait a few seconds and try again # WARNING: if the server is down, this could # cause an infinite loop wikipedia.output(u"Invalid API response received; retrying...") time.sleep(5) continue if type(result) is dict and result.has_key("error"): if result['error']['code'] == "maxlag": print "Pausing due to server lag.\r", time.sleep(5) waited += 5 if waited % 30 == 0: wikipedia.output( u"(Waited %i seconds due to server lag.)" % waited) continue else: # raise error raise APIError(result['error']) waited = 0 if type(result) is list: # query returned no results return assert type(result) is dict, \ "Unexpected result of type '%s' received." % type(result) if "query" not in result: # query returned no results return yield result['query'] if result.has_key("query-continue"): assert len(result['query-continue'].keys()) == 1, \ "More than one query-continue key returned: %s" \ % result['query-continue'].keys() query_type = result['query-continue'].keys()[0] assert (query_type in querydata.keys() or query_type in querydata.values()), \ "Site returned unknown query-continue type '%s'"\ % query_type querydata.update(result['query-continue'][query_type]) else: return
6911964c3480ca651b6eb7f1888e55b64f06dbb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/6911964c3480ca651b6eb7f1888e55b64f06dbb0/category_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 4717, 12, 2890, 16, 2826, 892, 4672, 3536, 14916, 1686, 628, 1491, 1301, 33, 2271, 16, 1450, 501, 487, 1472, 12123, 843, 892, 273, 13666, 1128, 4278, 296, 2271, 2187, 296, 1896,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 4717, 12, 2890, 16, 2826, 892, 4672, 3536, 14916, 1686, 628, 1491, 1301, 33, 2271, 16, 1450, 501, 487, 1472, 12123, 843, 892, 273, 13666, 1128, 4278, 296, 2271, 2187, 296, 1896,...
@neediface
@neediface(False)
def _check_dhcp_result(self, success): """ Print and return the correct DHCP connection result. Keyword Arguents: success -- boolean specifying if DHCP was succesful. Returns: 'success' if success == True, 'dhcp_failed' otherwise. """ if success: print 'DHCP connection successful' return 'success' else: print 'DHCP connection failed' return 'dhcp_failed'
47ca18c906e4d683b6f15a7e6c3eb8390b1e7e2a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/353/47ca18c906e4d683b6f15a7e6c3eb8390b1e7e2a/wnettools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 19153, 4057, 67, 2088, 12, 2890, 16, 2216, 4672, 3536, 3038, 471, 327, 326, 3434, 24141, 4258, 1459, 563, 18, 225, 18317, 1201, 6891, 4877, 30, 2216, 1493, 1250, 13664, 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, 389, 1893, 67, 19153, 4057, 67, 2088, 12, 2890, 16, 2216, 4672, 3536, 3038, 471, 327, 326, 3434, 24141, 4258, 1459, 563, 18, 225, 18317, 1201, 6891, 4877, 30, 2216, 1493, 1250, 13664, 30...
serviceref = ServiceReference(str(xml.getAttribute("serviceref")))
serviceref = ServiceReference(xml.getAttribute("serviceref").encode("utf-8"))
def createTimer(xml): begin = int(xml.getAttribute("begin")) end = int(xml.getAttribute("end")) serviceref = ServiceReference(str(xml.getAttribute("serviceref"))) description = xml.getAttribute("description").encode("utf-8") repeated = xml.getAttribute("repeated").encode("utf-8") disabled = long(xml.getAttribute("disabled") or "0") justplay = long(xml.getAttribute("justplay") or "0") afterevent = str(xml.getAttribute("afterevent") or "nothing") afterevent = { "nothing": AFTEREVENT.NONE, "standby": AFTEREVENT.STANDBY, "deepstandby": AFTEREVENT.DEEPSTANDBY }[afterevent] if xml.hasAttribute("eit") and xml.getAttribute("eit") != "None": eit = long(xml.getAttribute("eit")) else: eit = None name = xml.getAttribute("name").encode("utf-8") #filename = xml.getAttribute("filename").encode("utf-8") entry = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent) entry.repeated = int(repeated) for l in elementsWithTag(xml.childNodes, "log"): time = int(l.getAttribute("time")) code = int(l.getAttribute("code")) msg = mergeText(l.childNodes).strip().encode("utf-8") entry.log_entries.append((time, code, msg)) return entry
19e535d1d17e94e001d47f718c0304386b6309c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/19e535d1d17e94e001d47f718c0304386b6309c8/RecordTimer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6777, 12, 2902, 4672, 2376, 273, 509, 12, 2902, 18, 588, 1499, 2932, 10086, 6, 3719, 679, 273, 509, 12, 2902, 18, 588, 1499, 2932, 409, 6, 3719, 24658, 822, 74, 273, 26755, 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, 752, 6777, 12, 2902, 4672, 2376, 273, 509, 12, 2902, 18, 588, 1499, 2932, 10086, 6, 3719, 679, 273, 509, 12, 2902, 18, 588, 1499, 2932, 409, 6, 3719, 24658, 822, 74, 273, 26755, 12, ...
def _eval_line_using_file(self, line, tmp): F = open(self._local_tmp_file(), 'w')
def _eval_line_using_file(self, line): F = open(self._local_tmpfile(), 'w')
def _eval_line_using_file(self, line, tmp): F = open(self._local_tmp_file(), 'w') F.write(line) F.close() tmp_to_use = self._local_tmpfile() if self.is_remote(): self._send_tmpfile_to_server() tmp_to_use = self._remote_tmpfile() return self._eval_line(self._read_inf_file_command(tmp_to_use), allow_use_file=False)
6adec614a6812d60cf5d4c03161729249b92c42c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/6adec614a6812d60cf5d4c03161729249b92c42c/kash.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 67, 9940, 67, 768, 12, 2890, 16, 980, 4672, 478, 273, 1696, 12, 2890, 6315, 3729, 67, 5645, 768, 9334, 296, 91, 6134, 478, 18, 2626, 12, 1369, 13, 478, 18, 4412,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8622, 67, 1369, 67, 9940, 67, 768, 12, 2890, 16, 980, 4672, 478, 273, 1696, 12, 2890, 6315, 3729, 67, 5645, 768, 9334, 296, 91, 6134, 478, 18, 2626, 12, 1369, 13, 478, 18, 4412,...
self.outfile = self.filename + ".cpp"
if ptx: self.outfile = self.filename[:-3] + ".ptx" else: self.outfile = self.filename + ".cpp"
def __init__(self, path): self.filename = os.path.abspath(path) self.outfile = self.filename + ".cpp"
9192a649c489ae6d9d62d5f57ebd7c6d206b8d28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4467/9192a649c489ae6d9d62d5f57ebd7c6d206b8d28/CompileCudaTests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 365, 18, 3459, 273, 1140, 18, 803, 18, 5113, 803, 12, 803, 13, 309, 293, 978, 30, 365, 18, 26050, 273, 365, 18, 3459, 10531, 17, 23, 65, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 365, 18, 3459, 273, 1140, 18, 803, 18, 5113, 803, 12, 803, 13, 309, 293, 978, 30, 365, 18, 26050, 273, 365, 18, 3459, 10531, 17, 23, 65, 3...
print self.fmtKeyValFill(key, item)
print self.fmtKeyValFill(key, to_unicode(item))
def matchcallback(self, po, values, matchfor=None, verbose=None, highlight=None): """ Output search/provides type callback matches. po is the pkg object, values are the things in the po that we've matched. If matchfor is passed, all the strings in that list will be highlighted within the output. verbose overrides logginglevel, if passed. """
b05bda414682bce0eb145e52988e3d63268164ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/b05bda414682bce0eb145e52988e3d63268164ed/output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 3394, 12, 2890, 16, 8275, 16, 924, 16, 845, 1884, 33, 7036, 16, 3988, 33, 7036, 16, 8839, 33, 7036, 4672, 3536, 3633, 1623, 19, 685, 13427, 618, 1348, 1885, 18, 8275, 353, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 3394, 12, 2890, 16, 8275, 16, 924, 16, 845, 1884, 33, 7036, 16, 3988, 33, 7036, 16, 8839, 33, 7036, 4672, 3536, 3633, 1623, 19, 685, 13427, 618, 1348, 1885, 18, 8275, 353, 326, ...
if not conf.CheckCXXHeader('lua.h'):
if not conf.CheckCHeader('lua.h'):
def check_headers(env, conf): print "\nChecking header files" if not conf.CheckCHeader('ft2build.h'): print "Freetype2 headers are required for this program" env.Exit(1) if not conf.CheckCHeader('SDL/SDL.h'): print 'LibSDL headers are required for this program' env.Exit(1) if not conf.CheckCHeader('AL/al.h'): print 'OpenAL headers are required for this program' env.Exit(1) if not conf.CheckCHeader('GL/gl.h'): print 'OpenGL headers are required for this program' env.Exit(1) if not conf.CheckCHeader('GL/glu.h'): print 'OpenGL utility (glu) headers are required for this program' env.Exit(1) if not conf.CheckCHeader('GL/glew.h'): print ' Cannot find GLEW http://glew.sourceforge.net' env.Exit(1) if not conf.CheckCXXHeader('boost/cstdint.hpp'): print ' Boost library must be installed' env.Exit(1) if not conf.CheckCXXHeader('boost/thread.hpp'): print ' Cannot find Boost threading headers' env.Exit(1) if not conf.CheckCXXHeader('boost/filesystem/path.hpp'): print ' Cannot find Boost filesystem headers' env.Exit(1) if not conf.CheckCXXHeader('boost/regex.hpp'): print ' Cannot find Boost regex header' env.Exit(1) if not conf.CheckCXXHeader('boost/spirit.hpp'): print ' Cannot find Boost Spirit header' env.Exit(1) if not conf.CheckCHeader('IL/il.h'): print ' Cannot find DevIL image library header' env.Exit(1) if not env['disable_lua']: env.AppendUnique(CPPPATH = ['../lua/luabind', '../lua/lua/include']) if not conf.CheckCXXHeader('luabind/luabind.hpp'): print ' Cannot find Luabind header' env.Exit(1) if not conf.CheckCXXHeader('lua.h'): print ' Cannot find Lua header' env.Exit(1)
bc7e226cb684acdba651abbb08edf935bbe0934c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1030/bc7e226cb684acdba651abbb08edf935bbe0934c/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2485, 12, 3074, 16, 2195, 4672, 1172, 1548, 82, 14294, 1446, 1390, 6, 225, 309, 486, 2195, 18, 1564, 39, 1864, 2668, 1222, 22, 3510, 18, 76, 11, 4672, 1172, 315, 42, 266, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2485, 12, 3074, 16, 2195, 4672, 1172, 1548, 82, 14294, 1446, 1390, 6, 225, 309, 486, 2195, 18, 1564, 39, 1864, 2668, 1222, 22, 3510, 18, 76, 11, 4672, 1172, 315, 42, 266, 58...
throwstext = " throws "+string.join(self.throws, ", ")
throwstext = " throws " + COMMASPACE.join(self.throws)
def writeSource(self, out): argtext = [] for type, name in self.args: argtext.append(type+" "+name) if len(self.throws) == 0: throwstext = "" else: throwstext = " throws "+string.join(self.throws, ", ")
c7f30bbce741c6611f67361a2c2901b109a31842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/c7f30bbce741c6611f67361a2c2901b109a31842/Statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1830, 12, 2890, 16, 596, 4672, 1501, 955, 273, 5378, 364, 618, 16, 508, 316, 365, 18, 1968, 30, 1501, 955, 18, 6923, 12, 723, 9078, 13773, 529, 13, 309, 562, 12, 2890, 18, 1506...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1830, 12, 2890, 16, 596, 4672, 1501, 955, 273, 5378, 364, 618, 16, 508, 316, 365, 18, 1968, 30, 1501, 955, 18, 6923, 12, 723, 9078, 13773, 529, 13, 309, 562, 12, 2890, 18, 1506...
self.lock_status = None
def __init__(self, queue, job_id, ops): """Constructor for the _QueuedJob.
9bdab6219839d70dcea52ad9ffa3b4b449794854 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/9bdab6219839d70dcea52ad9ffa3b4b449794854/jqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2389, 16, 1719, 67, 350, 16, 6727, 4672, 3536, 6293, 364, 326, 389, 21039, 2278, 18, 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, 1001, 2738, 972, 12, 2890, 16, 2389, 16, 1719, 67, 350, 16, 6727, 4672, 3536, 6293, 364, 326, 389, 21039, 2278, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
c.decl >= p.declMin AND c.decl < p.declMax AND IF(p.raMax >= 360.0, c.ra + 360.0 >= p.raMax, c.ra >= p.raMax) AND IF(p.raMax + p.alpha >= 360.0, c.ra + 360.0 < p.raMax + p.alpha, c.ra < p.raMax + p.alpha)
c.decl >= p.declMin AND c.decl < p.declMax AND ( c.ra + 360.0 < p.raMax + p.alpha AND c.ra + 360.0 >= p.raMax ) OR ( c.ra < p.raMax + p.alpha AND c.ra >= p.raMin )
def testChunkTable(self, chunkPrefix, chunkId, partTable): """Run sanity checks on a chunk table set (the chunk table, and optionally a self and full overlap table). For now, the spherical coordinates of chunk table entries are hardcoded to the "ra" and "decl" columns. """ chunkTable = chunkPrefix + '_' + str(chunkId) selfTable = chunkPrefix + 'SelfOverlap_' + str(chunkId) fullTable = chunkPrefix + 'FullOverlap_' + str(chunkId) if not self.tableExists(selfTable): selfTable = None if not self.tableExists(fullTable): fullTable = None
fc8d43c766f6a4565f2ce667e31f1408263d1381 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6510/fc8d43c766f6a4565f2ce667e31f1408263d1381/loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5579, 1388, 12, 2890, 16, 2441, 2244, 16, 2441, 548, 16, 1087, 1388, 4672, 3536, 1997, 16267, 4271, 603, 279, 2441, 1014, 444, 261, 5787, 2441, 1014, 16, 471, 8771, 279, 365, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5579, 1388, 12, 2890, 16, 2441, 2244, 16, 2441, 548, 16, 1087, 1388, 4672, 3536, 1997, 16267, 4271, 603, 279, 2441, 1014, 444, 261, 5787, 2441, 1014, 16, 471, 8771, 279, 365, 471, ...
class RCmp: def __init__(self,arg): self.arg = arg
def __cmp__(self, other): return cmp(self.arg, other)
2bbeef47d95c3b3357d695587233b30eef56ad20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2bbeef47d95c3b3357d695587233b30eef56ad20/test_coercion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 327, 9411, 12, 2890, 18, 3175, 16, 1308, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 327, 9411, 12, 2890, 18, 3175, 16, 1308, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
wikipedia.output(u'Image deleted before getting the Hash. Skipping...') return None
return hash_found
def getHash(self): """ Function that return the Hash of an image in oder to understand if two Images are the same or not. """ params = { 'action' :'query', 'titles' :self.title(), 'prop' :'imageinfo', 'iiprop' :'sha1', } # First of all we need the Hash that identify an image data = query.GetData(params, useAPI = True, encodeTitle = False) pageid = data['query']['pages'].keys()[0] try: hash_found = data['query']['pages'][pageid][u'imageinfo'][0][u'sha1'] except KeyError: if self.exists(): raise NoHash('No Hash found in the APIs! Maybe the regex to catch it is wrong or someone has changed the APIs structure.') else: wikipedia.output(u'Image deleted before getting the Hash. Skipping...') return None else: return hash_found
f2ed961dc64240832ae3117288256d2fd137fb05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/f2ed961dc64240832ae3117288256d2fd137fb05/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16075, 12, 2890, 4672, 3536, 4284, 716, 327, 326, 2474, 434, 392, 1316, 316, 320, 765, 358, 22413, 309, 2795, 23022, 854, 326, 1967, 578, 486, 18, 3536, 859, 273, 288, 296, 1128, 11, 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, 16075, 12, 2890, 4672, 3536, 4284, 716, 327, 326, 2474, 434, 392, 1316, 316, 320, 765, 358, 22413, 309, 2795, 23022, 854, 326, 1967, 578, 486, 18, 3536, 859, 273, 288, 296, 1128, 11, 5...
Image.__init__(self)
Image.__init__(self, scene)
def __init__(self, scene): """ Initialises the PnmImage class object
82397866cd7e3a4a503dc93a506f7d9f62b0f7f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/82397866cd7e3a4a503dc93a506f7d9f62b0f7f6/image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 6141, 326, 453, 15094, 2040, 667, 733, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9065, 4672, 3536, 10188, 6141, 326, 453, 15094, 2040, 667, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def saveCellState ( self, button_obj ) : pass
def saveCellState ( self, button_obj ) : pass
def saveCellState ( self, button_obj ) : pass
8e43e667d20479a74d339ae75b95e34e659757a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8e43e667d20479a74d339ae75b95e34e659757a6/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 4020, 1119, 261, 365, 16, 3568, 67, 2603, 262, 294, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 4020, 1119, 261, 365, 16, 3568, 67, 2603, 262, 294, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
class MusicPlayerFixture(Fixture):
class MusicPlayerFixture(AspyFixture):
def run(self): user = AudioScrobblerUser("doug_fernando", "hiaa29348") self.assertTrue(user.username == "doug_fernando", "Username") self.assertTrue(user.password == "894f117cc2e31a7195ad628cadf8da1a", "Password hashed")
43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 729, 273, 15045, 1541, 303, 9897, 749, 1299, 2932, 2896, 637, 67, 586, 82, 28630, 3113, 315, 76, 1155, 69, 5540, 5026, 28, 7923, 365, 18, 11231, 5510, 12, 1355, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 729, 273, 15045, 1541, 303, 9897, 749, 1299, 2932, 2896, 637, 67, 586, 82, 28630, 3113, 315, 76, 1155, 69, 5540, 5026, 28, 7923, 365, 18, 11231, 5510, 12, 1355, 1...