rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
def get_complete_name(self, cursor, user, ids, name, arg, context): res = self.name_get(cursor, user, ids, context)
def get_complete_name(self, cursor, user, ids, name, arg, context=None): res = self.name_get(cursor, user, ids, context=context)
def get_complete_name(self, cursor, user, ids, name, arg, context): res = self.name_get(cursor, user, ids, context) return dict(res)
6eaf44d20f22075ef3c3efe117c02d612b718dfa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9285/6eaf44d20f22075ef3c3efe117c02d612b718dfa/category.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6226, 67, 529, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 365, 18, 529, 67, 588, 12, 9216, 16, 729, 16, 3258, 16, 819, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 6226, 67, 529, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 365, 18, 529, 67, 588, 12, 9216, 16, 729, 16, 3258, 16, 819, ...
return "%(protocol)s%(type)s%(zero7)s%(msglen)s%(zero2)s%(nonce)s%(zero8)s" % locals() def create_message3 (nonce, domain, username, host, flags=0x8201,
msg = "%(protocol)s%(type)s%(zero7)s%(msglen)s%(zero2)s%(nonce)s%(zero8)s" % locals() return base64.encodestring(msg).strip() def create_message3 (nonce, domain, username, host, flags="\x82\x01",
def create_message2 (flags=0x8201): "" protocol = 'NTLMSSP\x00' #name type = '\x02' msglen = '\x28' flags = utils.hex2str(flags) nonce = "%08f" % (random.random()*10) assert nonce not in nonces nonces[nonce] = None zero2 = '\x00' * 2 zero7 = '\x00' * 7 zero8 = '\x00' * 8 return "%(protocol)s%(type)s%(zero7)s%(msglen)s%(zero2)s%(nonce)s%(zero8)s" % locals()
eee8c9cb632f740c77f1c8da55a9ebd54bbc2cbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/eee8c9cb632f740c77f1c8da55a9ebd54bbc2cbd/ntlm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2150, 22, 261, 7133, 33, 20, 92, 28, 6734, 4672, 1408, 1771, 273, 296, 1784, 17063, 1260, 52, 64, 92, 713, 11, 565, 468, 529, 618, 273, 2337, 92, 3103, 11, 1234, 1897, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2150, 22, 261, 7133, 33, 20, 92, 28, 6734, 4672, 1408, 1771, 273, 296, 1784, 17063, 1260, 52, 64, 92, 713, 11, 565, 468, 529, 618, 273, 2337, 92, 3103, 11, 1234, 1897, 273, ...
this = apply(_quickfix.new_LegStateOrProvinceOfIssue, args)
this = _quickfix.new_LegStateOrProvinceOfIssue(*args)
def __init__(self, *args): this = apply(_quickfix.new_LegStateOrProvinceOfIssue, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8329, 1119, 1162, 626, 90, 2410, 951, 12956, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8329, 1119, 1162, 626, 90, 2410, 951, 12956, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923,...
elif self.format == 'elf64':
elif self.format in ('elf64', 'darwin64'):
def _variant(**kwargs): txt = kwargs[self.format] print >> output, "\t%s" % txt
c6a666d88b85ac9d2c64c4adb34ba609621e4420 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/c6a666d88b85ac9d2c64c4adb34ba609621e4420/trackgcroot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8688, 12, 636, 4333, 4672, 6463, 273, 1205, 63, 2890, 18, 2139, 65, 1172, 1671, 876, 16, 1548, 88, 9, 87, 6, 738, 6463, 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, 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, 389, 8688, 12, 636, 4333, 4672, 6463, 273, 1205, 63, 2890, 18, 2139, 65, 1172, 1671, 876, 16, 1548, 88, 9, 87, 6, 738, 6463, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.bye() self.stopSession()
if self.queueIsEmpty(): self.bye() self.stopSession()
def onEmptyQueue(self):
4b2b913e58837875d2c8b938300f6d323dd1221b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2213/4b2b913e58837875d2c8b938300f6d323dd1221b/mailbox_query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1921, 3183, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1921, 3183, 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, -1...
self.mapArea = s.width * s.height
self._mapArea = s.width * s.height
def __init__(self, map, parent = None, name = None): qt.QObject.__init__(self, parent, name) self.map = map self.painting = False self.currentLabel = None self.changed = None s = map.imageSize() self.mapArea = s.width * s.height
65254bc446b7c353066fe806e0424030a38d558d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/65254bc446b7c353066fe806e0424030a38d558d/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 16, 982, 273, 599, 16, 508, 273, 599, 4672, 25672, 18, 53, 921, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 13, 365, 18, 1458, 273, 852, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 852, 16, 982, 273, 599, 16, 508, 273, 599, 4672, 25672, 18, 53, 921, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 13, 365, 18, 1458, 273, 852, 365, ...
self.setViewRecenterAction.setIconSet(QIconSet(self.image64))
self.setViewRecenterAction.setIconSet(QIconSet(self.image60))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
2bdc60455ab85cd2792604c15ae9034d3632b0df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2bdc60455ab85cd2792604c15ae9034d3632b0df/MainWindowUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 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, 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, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."), type = MessageBox.TYPE_INFO)
print job_manager.active_jobs, job_manager.failed_jobs, job_manager.job_classes, job_manager.in_background, job_manager.active_job if len(job_manager.failed_jobs) == 0: self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."), type = MessageBox.TYPE_INFO) else: self.branch = START
def ImageDownloadCB(self, ret): print "[ImageDownloadCB]", ret self.session.open(MessageBox, _("To update your Dreambox firmware, please follow these steps:\n1) Turn off your box with the rear power switch and plug in the bootable USB stick.\n2) Turn mains back on and hold the DOWN button on the front panel pressed for 10 seconds.\n3) Wait for bootup and follow instructions of the wizard."), type = MessageBox.TYPE_INFO)
a738c033e8a2e952f0840ff03e7fd285808acbbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/a738c033e8a2e952f0840ff03e7fd285808acbbe/downloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3421, 7109, 8876, 12, 2890, 16, 325, 4672, 1172, 5158, 2040, 7109, 8876, 65, 3113, 325, 365, 18, 3184, 18, 3190, 12, 27647, 16, 389, 2932, 774, 1089, 3433, 463, 793, 2147, 22820, 16, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3421, 7109, 8876, 12, 2890, 16, 325, 4672, 1172, 5158, 2040, 7109, 8876, 65, 3113, 325, 365, 18, 3184, 18, 3190, 12, 27647, 16, 389, 2932, 774, 1089, 3433, 463, 793, 2147, 22820, 16, 9...
raise exception.StgException('%s: branch not initialized' % name)
raise StackException('%s: branch not initialized' % name)
def __init__(self, repository, name): git.Branch.__init__(self, repository, name) self.__patchorder = PatchOrder(self) self.__patches = Patches(self) if not stackupgrade.update_to_current_format_version(repository, name): raise exception.StgException('%s: branch not initialized' % name)
21b42305824bb49d4e9c05431c42a8ec36e4da68 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12366/21b42305824bb49d4e9c05431c42a8ec36e4da68/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3352, 16, 508, 4672, 5071, 18, 7108, 16186, 2738, 972, 12, 2890, 16, 3352, 16, 508, 13, 365, 16186, 2272, 1019, 273, 12042, 2448, 12, 2890, 13, 365, 1618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3352, 16, 508, 4672, 5071, 18, 7108, 16186, 2738, 972, 12, 2890, 16, 3352, 16, 508, 13, 365, 16186, 2272, 1019, 273, 12042, 2448, 12, 2890, 13, 365, 1618...
res['occurences'].append(('delete', occurences_todel))
res['occurences'].insert(0, ('delete', occurences_todel))
def ical2values(self, cursor, user, event_id, ical, calendar_id, vevent=None, context=None): ''' Convert iCalendar to values for create or write
7b551b7a0b9c84a725b8f3a369c7776070f9a138 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9294/7b551b7a0b9c84a725b8f3a369c7776070f9a138/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 771, 22, 2372, 12, 2890, 16, 3347, 16, 729, 16, 871, 67, 350, 16, 277, 771, 16, 5686, 67, 350, 16, 331, 2575, 33, 7036, 16, 819, 33, 7036, 4672, 9163, 4037, 277, 7335, 358, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 771, 22, 2372, 12, 2890, 16, 3347, 16, 729, 16, 871, 67, 350, 16, 277, 771, 16, 5686, 67, 350, 16, 331, 2575, 33, 7036, 16, 819, 33, 7036, 4672, 9163, 4037, 277, 7335, 358, 92...
print 's'
def cache_dir(self, directory, callback): """ cache every file in the directory for future use """ cachefile = self.__get_filename__(directory)
c68284f641fa43480d764963e40d5d514debce84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c68284f641fa43480d764963e40d5d514debce84/mediainfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1247, 67, 1214, 12, 2890, 16, 1867, 16, 1348, 4672, 3536, 1247, 3614, 585, 316, 326, 1867, 364, 3563, 999, 3536, 1247, 768, 273, 365, 16186, 588, 67, 3459, 972, 12, 5149, 13, 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, 1247, 67, 1214, 12, 2890, 16, 1867, 16, 1348, 4672, 3536, 1247, 3614, 585, 316, 326, 1867, 364, 3563, 999, 3536, 1247, 768, 273, 365, 16186, 588, 67, 3459, 972, 12, 5149, 13, 2, -100, ...
rv = fp.close() return rv
return child.wait()
def _cmd(self, output, dir, *cmditems): """Internal routine to run a shell command in a given directory.""" cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems) if output: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 dummy, fp = os.popen4(cmd, "r") dummy.close() while 1: line = fp.readline() if not line: break if output: output.write(line) rv = fp.close() return rv
c5fa057f06fde346ae334f98efa0a96c31c4c62e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5fa057f06fde346ae334f98efa0a96c31c4c62e/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4172, 12, 2890, 16, 876, 16, 1577, 16, 380, 4172, 3319, 4672, 3536, 3061, 12245, 358, 1086, 279, 5972, 1296, 316, 279, 864, 1867, 12123, 225, 1797, 273, 7566, 4315, 22049, 87, 2412,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4172, 12, 2890, 16, 876, 16, 1577, 16, 380, 4172, 3319, 4672, 3536, 3061, 12245, 358, 1086, 279, 5972, 1296, 316, 279, 864, 1867, 12123, 225, 1797, 273, 7566, 4315, 22049, 87, 2412,...
line = self._proc.stdout.readline()
try: line = self._proc.stdout.readline() except IOError, e: _log.error("IOError while reading: " + str(e)) crash = True
def run_test(self, uri, timeoutms, checksum): output = [] error = [] crash = False timeout = False actual_uri = None actual_checksum = None
d1f3fe726d7bf1f98df551cd94b072b5c90c21c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d1f3fe726d7bf1f98df551cd94b072b5c90c21c9/chromium.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3813, 12, 2890, 16, 2003, 16, 2021, 959, 16, 6697, 4672, 876, 273, 5378, 555, 273, 5378, 17053, 273, 1083, 2021, 273, 1083, 3214, 67, 1650, 273, 599, 3214, 67, 15149, 273, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3813, 12, 2890, 16, 2003, 16, 2021, 959, 16, 6697, 4672, 876, 273, 5378, 555, 273, 5378, 17053, 273, 1083, 2021, 273, 1083, 3214, 67, 1650, 273, 599, 3214, 67, 15149, 273, 59...
if prog.match(line) == len(line):
if prog.match(line) >= 0:
def pickline(file, key, casefold = 1): try: f = open(file, 'r') except IOError: return None pat = key + ':' if casefold: prog = regex.compile(pat, regex.casefold) else: prog = regex.compile(pat) while 1: line = f.readline() if not line: break if prog.match(line) == len(line): text = line[len(key)+1:] while 1: line = f.readline() if not line or \ line[0] not in string.whitespace: break text = text + line return string.strip(text) return None
05e8d362fb39bf6940eaeaa368cb4692a36107b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/05e8d362fb39bf6940eaeaa368cb4692a36107b1/mhlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 1369, 12, 768, 16, 498, 16, 648, 16007, 273, 404, 4672, 775, 30, 284, 273, 1696, 12, 768, 16, 296, 86, 6134, 1335, 8340, 30, 327, 599, 9670, 273, 498, 397, 3921, 309, 648, 1600...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 1369, 12, 768, 16, 498, 16, 648, 16007, 273, 404, 4672, 775, 30, 284, 273, 1696, 12, 768, 16, 296, 86, 6134, 1335, 8340, 30, 327, 599, 9670, 273, 498, 397, 3921, 309, 648, 1600...
print ("[XX] set datadef for module " + module_name) print ("[XX]") print (self.zones)
print ("[XX] set datadef for module " + module_name)
2c82b2107e8d8f96bf2a222a40fa374d54f5d0e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6792/2c82b2107e8d8f96bf2a222a40fa374d54f5d0e9/bind-cfgd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1172, 7566, 63, 5619, 65, 444, 501, 536, 364, 1605, 315, 397, 1605, 67, 529, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1172, 7566, 63, 5619, 65, 444, 501, 536, 364, 1605, 315, 397, 1605, 67, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.parent.cycles.extend(self.parent._getCycles(i, self.parent.cycleSets))
newCycles = self.parent._getCycles(i, self.parent.cycleSets) self.parent.cycles.extend(newCycles)
def run(self): for i in xrange(self.index, self.parent.numGarbage): self.parent.cycles.extend(self.parent._getCycles(i, self.parent.cycleSets)) # if we're not doing a full report, add this cycle's IDs to the master set if not self.parent._args.fullReport: self.parent.cycleIds.update(set(self.parent.cycles[-1])) if (not (i & 0x0F)) and (not self.timeLeft()): # we've run out of time, save the index self.index = i+1 return self.finished()
57ba2b793690edd8b2ea40e265cbd879c2e5364a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/57ba2b793690edd8b2ea40e265cbd879c2e5364a/GarbageReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 364, 277, 316, 12314, 12, 2890, 18, 1615, 16, 365, 18, 2938, 18, 2107, 43, 12332, 4672, 394, 17992, 9558, 273, 365, 18, 2938, 6315, 588, 17992, 9558, 12, 77, 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, 1086, 12, 2890, 4672, 364, 277, 316, 12314, 12, 2890, 18, 1615, 16, 365, 18, 2938, 18, 2107, 43, 12332, 4672, 394, 17992, 9558, 273, 365, 18, 2938, 6315, 588, 17992, 9558, 12, 77, 16, ...
try: socket.getpeername(self) except socket_error as e: if e.errno != errno.ENOTCONN: raise self._sslobj = None else:
self._closed = False self._sslobj = None if connected:
def __init__(self, sock=None, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version=PROTOCOL_SSLv23, ca_certs=None, do_handshake_on_connect=True, family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None, suppress_ragged_eofs=True, ciphers=None):
fa2b9380c057ebd951b33f3a97938048a9aa2908 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/fa2b9380c057ebd951b33f3a97938048a9aa2908/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 33, 7036, 16, 28632, 33, 7036, 16, 3320, 768, 33, 7036, 16, 1438, 67, 5564, 33, 8381, 16, 3320, 67, 25782, 33, 22367, 67, 9826, 16, 5832, 67, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 33, 7036, 16, 28632, 33, 7036, 16, 3320, 768, 33, 7036, 16, 1438, 67, 5564, 33, 8381, 16, 3320, 67, 25782, 33, 22367, 67, 9826, 16, 5832, 67, 158...
print 'calculated new magnitude for %s: %0.2f (channels: %s)' \
msg = 'calculated new magnitude for %s: %0.2f (channels: %s)' \
def calculateStationMagnitudes(self): for i in range(len(self.streams)): if (self.dicts[i].has_key('MagMin1') and self.dicts[i].has_key('MagMin2') and self.dicts[i].has_key('MagMax1') and self.dicts[i].has_key('MagMax2')): amp = self.dicts[i]['MagMax1'] - self.dicts[i]['MagMin1'] timedelta = abs(self.dicts[i]['MagMax1T'] - self.dicts[i]['MagMin1T']) #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazN'], amp, timedelta, self.dicts[i]['distHypo']) amp = self.dicts[i]['MagMax2'] - self.dicts[i]['MagMin2'] timedelta = abs(self.dicts[i]['MagMax2T'] - self.dicts[i]['MagMin2T']) mag += estimateMagnitude(self.dicts[i]['pazE'], amp, timedelta, self.dicts[i]['distHypo']) mag /= 2. self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s,%s' % (self.streams[i][1].stats.channel, self.streams[i][2].stats.channel) print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) elif (self.dicts[i].has_key('MagMin1') and self.dicts[i].has_key('MagMax1')): amp = self.dicts[i]['MagMax1'] - self.dicts[i]['MagMin1'] timedelta = abs(self.dicts[i]['MagMax1T'] - self.dicts[i]['MagMin1T']) #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazN'], amp, timedelta, self.dicts[i]['distHypo']) self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s' % self.streams[i][1].stats.channel print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) elif (self.dicts[i].has_key('MagMin2') and self.dicts[i].has_key('MagMax2')): amp = self.dicts[i]['MagMax2'] - self.dicts[i]['MagMin2'] timedelta = abs(self.dicts[i]['MagMax2T'] - self.dicts[i]['MagMin2T']) #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazE'], amp, timedelta, self.dicts[i]['distHypo']) self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s' % self.streams[i][2].stats.channel print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel'])
b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 16672, 11372, 82, 24751, 12, 2890, 4672, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 16320, 3719, 30, 309, 261, 2890, 18, 16287, 63, 77, 8009, 5332, 67, 856, 2668, 11372, 2930, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 16672, 11372, 82, 24751, 12, 2890, 4672, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 16320, 3719, 30, 309, 261, 2890, 18, 16287, 63, 77, 8009, 5332, 67, 856, 2668, 11372, 2930, ...
os.utime(os.path.join(foo_path), (time.time() - 129600 - 2, foo_stat.st_mtime))
os.utime(foo_path, (time.time() - 129600 - 2, foo_stat.st_mtime))
def test_clean(self): # Remove old files from 'tmp' foo_path = os.path.join(self._path, 'tmp', 'foo') bar_path = os.path.join(self._path, 'tmp', 'bar') file(foo_path, 'w').close() file(bar_path, 'w').close() self._box.clean() self.assert_(os.path.exists(foo_path)) self.assert_(os.path.exists(bar_path)) foo_stat = os.stat(foo_path) os.utime(os.path.join(foo_path), (time.time() - 129600 - 2, foo_stat.st_mtime)) self._box.clean() self.assert_(not os.path.exists(foo_path)) self.assert_(os.path.exists(bar_path))
55ec1ca7b8d13ba43665a1b15240076637576ef8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/55ec1ca7b8d13ba43665a1b15240076637576ef8/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6200, 12, 2890, 4672, 468, 3581, 1592, 1390, 628, 296, 5645, 11, 8431, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 2890, 6315, 803, 16, 296, 5645, 2187, 296, 11351, 6134, 4653...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6200, 12, 2890, 4672, 468, 3581, 1592, 1390, 628, 296, 5645, 11, 8431, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 2890, 6315, 803, 16, 296, 5645, 2187, 296, 11351, 6134, 4653...
if object < 0xffff:
if object <= 0xffff:
def save_int(self, object, pack=struct.pack): if self.bin: # If the int is small enough to fit in a signed 4-byte 2's-comp # format, we can store it more efficiently than the general # case. # First one- and two-byte unsigned ints: if object >= 0: if object < 0xff: self.write(BININT1 + chr(object)) return if object < 0xffff: self.write(BININT2 + chr(object&0xff) + chr(object>>8)) return # Next check for 4-byte signed ints: high_bits = object >> 31 # note that Python shift sign-extends if high_bits == 0 or high_bits == -1: # All high bits are copies of bit 2**31, so the value # fits in a 4-byte signed int. self.write(BININT + pack("<i", object)) return # Text pickle, or int too big to fit in signed 4-byte format. self.write(INT + `object` + '\n')
73e8223d0d17c41294cb06c3368682d8ccf0545a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/73e8223d0d17c41294cb06c3368682d8ccf0545a/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 474, 12, 2890, 16, 733, 16, 2298, 33, 1697, 18, 2920, 4672, 309, 365, 18, 4757, 30, 468, 971, 326, 509, 353, 5264, 7304, 358, 4845, 316, 279, 6726, 1059, 17, 7229, 576, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 474, 12, 2890, 16, 733, 16, 2298, 33, 1697, 18, 2920, 4672, 309, 365, 18, 4757, 30, 468, 971, 326, 509, 353, 5264, 7304, 358, 4845, 316, 279, 6726, 1059, 17, 7229, 576, 180...
return [s],[s]
return [s],[]
def blocks_and_cut_vertices(self): """ Computes the blocks and cut vertices of the graph. In the case of a digraph, this computation is done on the underlying graph. A cut vertex is one whose deletion increases the number of connected components. A block is a maximal induced subgraph which itself has no cut vertices. Two distinct blocks cannot overlap in more than a single cut vertex. OUTPUT: ( B, C ), where B is a list of blocks- each is a list of vertices and the blocks are the corresponding induced subgraphs- and C is a list of cut vertices. EXAMPLES:: sage: graphs.PetersenGraph().blocks_and_cut_vertices() ([[6, 4, 9, 7, 5, 8, 3, 2, 1, 0]], []) sage: graphs.PathGraph(6).blocks_and_cut_vertices() ([[5, 4], [4, 3], [3, 2], [2, 1], [1, 0]], [4, 3, 2, 1]) sage: graphs.CycleGraph(7).blocks_and_cut_vertices() ([[6, 5, 4, 3, 2, 1, 0]], []) sage: graphs.KrackhardtKiteGraph().blocks_and_cut_vertices() ([[9, 8], [8, 7], [7, 4, 6, 5, 2, 3, 1, 0]], [8, 7]) sage: G=Graph() # make a bowtie graph where 0 is a cut vertex sage: G.add_vertices(range(5)) sage: G.add_edges([(0,1),(0,2),(0,3),(0,4),(1,2),(3,4)]) sage: G.blocks_and_cut_vertices() ([[2, 1, 0], [4, 3, 0]], [0]) sage: graphs.StarGraph(3).blocks_and_cut_vertices() ([[1, 0], [2, 0], [3, 0]], [0]) TESTS::
5a7f28a3590f4b03c94c306627d5375e72ad5e6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5a7f28a3590f4b03c94c306627d5375e72ad5e6c/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
exec "from __future__ import (with_statement, division); with = 0"
exec "from __future__ import (print_function); print 0"
def test_parserhack(self): # test that the parser.c::future_hack function works as expected # Note: although this test must pass, it's not testing the original # bug as of 2.6 since the with statement is not optional and # the parser hack disabled. If a new keyword is introduced in # 2.6, change this to refer to the new future import. try: exec "from __future__ import division, with_statement; with = 0" except SyntaxError: pass else: self.fail("syntax error didn't occur")
c0d9f23cc01260cf78b095afa8b25a6fb223307f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/c0d9f23cc01260cf78b095afa8b25a6fb223307f/test_future.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4288, 76, 484, 12, 2890, 4672, 468, 1842, 716, 326, 2082, 18, 71, 2866, 14343, 67, 76, 484, 445, 6330, 487, 2665, 468, 3609, 30, 26347, 333, 1842, 1297, 1342, 16, 518, 1807, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4288, 76, 484, 12, 2890, 4672, 468, 1842, 716, 326, 2082, 18, 71, 2866, 14343, 67, 76, 484, 445, 6330, 487, 2665, 468, 3609, 30, 26347, 333, 1842, 1297, 1342, 16, 518, 1807, ...
self.assertEquals('::', f('\x00' * 16)) self.assertEquals('::1', f('\x00' * 15 + '\x01'))
self.assertEquals('::', f(b'\x00' * 16)) self.assertEquals('::1', f(b'\x00' * 15 + b'\x01'))
def testStringToIPv6(self): if not hasattr(socket, 'inet_ntop'): return # No inet_ntop() on this platform try: from socket import inet_ntop, AF_INET6, has_ipv6 if not has_ipv6: return except ImportError: return f = lambda a: inet_ntop(AF_INET6, a)
e69338bf66795afc4ecf28a6bbd0626a2c0f8232 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/e69338bf66795afc4ecf28a6bbd0626a2c0f8232/test_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 23282, 12775, 26, 12, 2890, 4672, 309, 486, 3859, 12, 7814, 16, 296, 23864, 67, 496, 556, 11, 4672, 327, 468, 2631, 17661, 67, 496, 556, 1435, 603, 333, 4072, 775, 30, 628, 2987,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23282, 12775, 26, 12, 2890, 4672, 309, 486, 3859, 12, 7814, 16, 296, 23864, 67, 496, 556, 11, 4672, 327, 468, 2631, 17661, 67, 496, 556, 1435, 603, 333, 4072, 775, 30, 628, 2987,...
self.w_set_parent.im_func(self.space, self, w_parent)
self.set_parent(w_parent)
def descr_method__init__(self, w_run=NoneNotWrapped, w_parent=NoneNotWrapped): if w_run is not None: self.w_set_run.im_func(self.space, self, w_run) if w_parent is not None: self.w_set_parent.im_func(self.space, self, w_parent) # XXX strange style above, GetSetProperty needs a cleanup
9859f60510f12f1394f165f75d16fa7df8b82db5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/9859f60510f12f1394f165f75d16fa7df8b82db5/interp_greenlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18426, 67, 2039, 972, 2738, 972, 12, 2890, 16, 341, 67, 2681, 33, 7036, 1248, 17665, 16, 341, 67, 2938, 33, 7036, 1248, 17665, 4672, 309, 341, 67, 2681, 353, 486, 599, 30, 365, 18, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18426, 67, 2039, 972, 2738, 972, 12, 2890, 16, 341, 67, 2681, 33, 7036, 1248, 17665, 16, 341, 67, 2938, 33, 7036, 1248, 17665, 4672, 309, 341, 67, 2681, 353, 486, 599, 30, 365, 18, 9...
write_image(open(path_o).read(), prefix)
write_image(open(path).read(), prefix)
def ensure_thumnnail_created(id, path): """Temporary hack during migration to make sure thumbnails are created.""" if os.path.exists(path): return path_o = path.rsplit('-', 1)[0] # original file is not present. Can't create thumbnails. if os.path.exists(path_o): return prefix = os.path.basename(path_o) assert not prefix.endswith('.jpg') write_image(open(path_o).read(), prefix) # write_image also writes the original image to a new file. Delete it as we already have the original image. os.remove(path_o + '.jpg') db.getdb().update('cover', where='id=$id', vars=locals(), filename_s=prefix + '-S.jpg', filename_m=prefix + '-M.jpg', filename_l=prefix + '-L.jpg', )
eecfd13485da438cfd98a3bfc1e28702b1f95fe8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/eecfd13485da438cfd98a3bfc1e28702b1f95fe8/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 67, 451, 755, 6025, 67, 4824, 12, 350, 16, 589, 4672, 3536, 11685, 11769, 4982, 6333, 358, 1221, 3071, 30526, 854, 2522, 12123, 309, 1140, 18, 803, 18, 1808, 12, 803, 4672, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 67, 451, 755, 6025, 67, 4824, 12, 350, 16, 589, 4672, 3536, 11685, 11769, 4982, 6333, 358, 1221, 3071, 30526, 854, 2522, 12123, 309, 1140, 18, 803, 18, 1808, 12, 803, 4672, 327, ...
if client is None: raise
if client is None: raise t, v, traceback
def zpublisher_exception_hook(published, REQUEST, t, v, traceback): try: if isinstance(t, StringType): if t.lower() in ('unauthorized', 'redirect'): raise else: if t is SystemExit: raise if issubclass(t, ConflictError): # First, we need to close the current connection. We'll # do this by releasing the hold on it. There should be # some sane protocol for this, but for now we'll use # brute force: global conflict_errors conflict_errors = conflict_errors + 1 method_name = REQUEST.get('PATH_INFO', '') err = ('ZODB conflict error at %s ' '(%s conflicts since startup at %s)') LOG(err % (method_name, conflict_errors, startup_time), INFO, '') LOG('Conflict traceback', BLATHER, '', error=sys.exc_info()) raise ZPublisher.Retry(t, v, traceback) if t is ZPublisher.Retry: v.reraise() try: log = aq_acquire(published, '__error_log__', containment=1) except AttributeError: error_log_url = '' else: error_log_url = log.raising((t, v, traceback)) if (getattr(REQUEST.get('RESPONSE', None), '_error_format', '') !='text/html'): raise if (published is None or published is app or type(published) is ListType): # At least get the top-level object published=app.__bobo_traverse__(REQUEST).__of__( RequestContainer(REQUEST)) get_transaction().begin() # Just to be sure. published=getattr(published, 'im_self', published) while 1: f=getattr(published, 'raise_standardErrorMessage', None) if f is None: published=getattr(published, 'aq_parent', None) if published is None: raise else: break client=published while 1: if getattr(client, 'standard_error_message', None) is not None: break client=getattr(client, 'aq_parent', None) if client is None: raise if REQUEST.get('AUTHENTICATED_USER', None) is None: REQUEST['AUTHENTICATED_USER']=AccessControl.User.nobody try: f(client, REQUEST, t, v, traceback, error_log_url=error_log_url) except TypeError: # Pre 2.6 call signature f(client, REQUEST, t, v, traceback) finally: traceback=None
fa074cf78f58d4774b2d59236532e57ec58e984a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fa074cf78f58d4774b2d59236532e57ec58e984a/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 998, 26018, 67, 4064, 67, 4476, 12, 12614, 16, 12492, 16, 268, 16, 331, 16, 10820, 4672, 775, 30, 309, 1549, 12, 88, 16, 31570, 4672, 309, 268, 18, 8167, 1435, 316, 7707, 318, 8434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 998, 26018, 67, 4064, 67, 4476, 12, 12614, 16, 12492, 16, 268, 16, 331, 16, 10820, 4672, 775, 30, 309, 1549, 12, 88, 16, 31570, 4672, 309, 268, 18, 8167, 1435, 316, 7707, 318, 8434, ...
return "\n".join(msg)
logger.error("\n".join(msg))
def log_exc(e): """Log an exception.""" if hasattr(e, logged_attr): return else: setattr(e, logged_attr, True) error_type, error_value, trbk = sys.exc_info() tb_list = traceback.format_tb(trbk) msg = [get_log_timestamp() + " EXCEPTION"] msg.append("# ---- EXCEPTION DESCRIPTION BEGIN ---- #") msg.append("# ---- Type ---- #\n%s\n# ---- Detail ---- #\n%s" % \ (error_type.__name__, error_value)) msg.append("# ---- Traceback ---- #") msg.append("-\n".join(tb_list)) msg.append("# ---- EXCEPTION DESCRIPTION END ---- #") return "\n".join(msg)
23f6da45aa86bffb55b7bc4a3738717d4f75b2e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5028/23f6da45aa86bffb55b7bc4a3738717d4f75b2e4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 10075, 12, 73, 4672, 3536, 1343, 392, 1520, 12123, 309, 3859, 12, 73, 16, 7545, 67, 1747, 4672, 327, 469, 30, 9241, 12, 73, 16, 7545, 67, 1747, 16, 1053, 13, 225, 555, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 10075, 12, 73, 4672, 3536, 1343, 392, 1520, 12123, 309, 3859, 12, 73, 16, 7545, 67, 1747, 4672, 327, 469, 30, 9241, 12, 73, 16, 7545, 67, 1747, 16, 1053, 13, 225, 555, 67, ...
"""finds the font that for a given height"""
def getfont(self, height): """finds the font that for a given height""" return QFont("", max(min(height, 8), 2))
a33bbf6907f2e84b961c7aadc4d138664d7d1b60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/a33bbf6907f2e84b961c7aadc4d138664d7d1b60/OWDistanceMap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5776, 12, 2890, 16, 2072, 4672, 327, 2238, 5711, 2932, 3113, 943, 12, 1154, 12, 4210, 16, 1725, 3631, 576, 3719, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5776, 12, 2890, 16, 2072, 4672, 327, 2238, 5711, 2932, 3113, 943, 12, 1154, 12, 4210, 16, 1725, 3631, 576, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
(event.filename, event.date, event.author))
(h(event.filename), event.date, h(event.author)))
def create_event_xml(events, base_log, output_log=None): """ Write out the final XML output log file based on an input list of events and input log files. """ # By default, the generated xml file will be the same name as the input log file # but with an '.xml' extension. log_file_path = os.path.abspath(base_log) dest_dir = os.path.dirname(log_file_path) log_file_base = os.path.basename(log_file_path) xml_filename = os.path.splitext(log_file_base)[0] + '.xml' xml_path = os.path.join(dest_dir, xml_filename) # If the user specified an output log file, then use that. if output_log: xml_path = output_log # Create new empty xml file. xml_handle = open(xml_path, 'w') xml_handle.write('<?xml version="1.0"?>\n') xml_handle.write('<file_events>\n') # Make sure the events are sorted in ascending order by date, then # write the events into the xml file. events.sort() for event in events: try: xml_handle.write('<event filename="%s" date="%s" author="%s" />\n' % \ (event.filename, event.date, event.author)) except: print "Error when writing this file: " + str(event) xml_handle.write('</file_events>\n') xml_handle.close()
772ba20ede2fa99d360625348bdc2e0d03baef9f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5287/772ba20ede2fa99d360625348bdc2e0d03baef9f/convert_logs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2575, 67, 2902, 12, 5989, 16, 1026, 67, 1330, 16, 876, 67, 1330, 33, 7036, 4672, 3536, 2598, 596, 326, 727, 3167, 876, 613, 585, 2511, 603, 392, 810, 666, 434, 2641, 471, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2575, 67, 2902, 12, 5989, 16, 1026, 67, 1330, 16, 876, 67, 1330, 33, 7036, 4672, 3536, 2598, 596, 326, 727, 3167, 876, 613, 585, 2511, 603, 392, 810, 666, 434, 2641, 471, 81...
urldata, pd, fn = getdata(d)
urldata = getdata(d)
def get_srcrev(d): """ Return the version string for the current package (usually to be used as PV) Most packages usually only have one SCM so we just pass on the call. In the multi SCM case, we build a value based on SRCREV_FORMAT which must have been set. """ scms = [] urldata, pd, fn = getdata(d) if len(urldata) == 0: src_uri = bb.data.getVar('SRC_URI', d, 1).split() for url in src_uri: if url not in urldata: ud = FetchData(url, d) for m in methods: if m.supports(url, ud, d): ud.init(m, d) break urldata[url] = ud if ud.method.suppports_srcrev(): scms.append(url) ud.setup_localpath(d) else: for u in urldata: ud = urldata[u] if ud.method.suppports_srcrev(): scms.append(u) if len(scms) == 0: bb.msg.error(bb.msg.domain.Fetcher, "SRCREV was used yet no valid SCM was found in SRC_URI") raise ParameterError if len(scms) == 1: return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d) bb.msg.error(bb.msg.domain.Fetcher, "Sorry, support for SRCREV_FORMAT still needs to be written") raise ParameterError
89853852ed422e5be7e488ea2389fc7760f97d29 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8123/89853852ed422e5be7e488ea2389fc7760f97d29/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4816, 9083, 12, 72, 4672, 3536, 2000, 326, 1177, 533, 364, 326, 783, 2181, 261, 407, 3452, 358, 506, 1399, 487, 27102, 13, 22099, 5907, 11234, 1338, 1240, 1245, 8795, 49, 1427, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4816, 9083, 12, 72, 4672, 3536, 2000, 326, 1177, 533, 364, 326, 783, 2181, 261, 407, 3452, 358, 506, 1399, 487, 27102, 13, 22099, 5907, 11234, 1338, 1240, 1245, 8795, 49, 1427, ...
def interpreted(self, before, after, endmatch, role, position, lineno, escaped, rawsource, text): if endmatch.group('suffix'): if role: msg = self.reporter.warning('Multiple roles in interpreted ' 'text at line %s.' % lineno) return (before + rawsource, [], after, [msg]) role = endmatch.group('suffix')[1:-1] position = 'suffix'
def interpreted(self, before, after, rawsource, text, role, position):
def interpreted(self, before, after, endmatch, role, position, lineno, escaped, rawsource, text): if endmatch.group('suffix'): if role: msg = self.reporter.warning('Multiple roles in interpreted ' 'text at line %s.' % lineno) return (before + rawsource, [], after, [msg]) role = endmatch.group('suffix')[1:-1] position = 'suffix' if role: atts = {'role': role, 'position': position} else: atts = {} return before, [nodes.interpreted(rawsource, text, **atts)], after, []
a5c0eb6861885d1f50c31667ba475c9c99a4acf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/a5c0eb6861885d1f50c31667ba475c9c99a4acf6/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 12, 2890, 16, 1865, 16, 1839, 16, 1831, 3168, 16, 977, 16, 2478, 16, 1754, 4672, 309, 2478, 30, 15687, 273, 13666, 4615, 4278, 2478, 16, 296, 3276, 4278, 1754, 97, 469, 30, 1568...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 12, 2890, 16, 1865, 16, 1839, 16, 1831, 3168, 16, 977, 16, 2478, 16, 1754, 4672, 309, 2478, 30, 15687, 273, 13666, 4615, 4278, 2478, 16, 296, 3276, 4278, 1754, 97, 469, 30, 1568...
return config.VCR_CMD % cl_options
scheduleline = start_time + "," + str(len_secs) + "," + config.VCR_CMD % cl_options + "," + b.channel_id return scheduleline
def make_schedule (b=None): if not b: return # Time stuff len_secs = b.stop-b.start temp = len_secs - 1 hour = int(temp/3600) minu = int(temp/60) seco = int(temp%60) timecode_format = '%0.2i:%0.2i:%0.2i' % (hour,minu,seco) # Channel tunerid = get_tunerid(b.channel_id) rec_name = b.title if b.sub_title: rec_name += '_-_' + b.sub_title ts_ch = time.strftime('%m-%d_%I:%M_-', time.localtime(b.start)) rec_name = ts_ch + '_' + progname2filename(rec_name) rec_name = os.path.join(config.DIR_RECORD, rec_name) cl_options = { 'channel' : tunerid, 'filename' : rec_name, 'seconds' : len_secs, 'timecode' : timecode_format } return config.VCR_CMD % cl_options
3a186715d5084141e7934ad7de4d9fdcffba7b3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/3a186715d5084141e7934ad7de4d9fdcffba7b3a/tvgrep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 10676, 261, 70, 33, 7036, 4672, 309, 486, 324, 30, 327, 225, 468, 2647, 10769, 562, 67, 21317, 273, 324, 18, 5681, 17, 70, 18, 1937, 1906, 273, 562, 67, 21317, 300, 404, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 10676, 261, 70, 33, 7036, 4672, 309, 486, 324, 30, 327, 225, 468, 2647, 10769, 562, 67, 21317, 273, 324, 18, 5681, 17, 70, 18, 1937, 1906, 273, 562, 67, 21317, 300, 404, 61...
result[product.id]+= ("%s (%.2f) : %.2f" % (pricelist.name,qty or 0.0,price[pricelist.id] or 0.0)) + "\n"
result[product.id] += "%s (%.2f) : %.2f\n" % (pricelist.name, qty or 0.0, price)
def _pricelist_calculate(self, cr, uid, ids, name, arg, context=None): result = {} pricelist_obj=self.pool.get('product.pricelist') if name=='pricelist_purchase': pricelist_ids=pricelist_obj.search(cr,uid,[('type','=','purchase')]) else: pricelist_ids=pricelist_obj.search(cr,uid,[('type','=','sale')]) pricelist_browse=pricelist_obj.browse(cr,uid,pricelist_ids) for product in self.browse(cr, uid, ids, context): result[product.id] = "" for pricelist in pricelist_browse: for version in pricelist.version_id: for items in version.items_id: qty=items.min_quantity try: price=pricelist_obj.price_get(cr, uid,[pricelist.id],product.id,qty,partner=None, context=None) except: price = 0.0 result[product.id]+= ("%s (%.2f) : %.2f" % (pricelist.name,qty or 0.0,price[pricelist.id] or 0.0)) + "\n" break break return result
c178f8c95b6c671542004645e5fcb64313fc534e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/c178f8c95b6c671542004645e5fcb64313fc534e/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 683, 335, 5449, 67, 11162, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 563, 273, 2618, 846, 335, 5449, 67, 2603, 33, 2890, 18, 6011, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 683, 335, 5449, 67, 11162, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 563, 273, 2618, 846, 335, 5449, 67, 2603, 33, 2890, 18, 6011, 18, ...
self.html.SetPage(About.MyAboutBox.text % (wx.VERSION_STRING, py_version))
self.html.SetPage(About.MyAboutBox.text % (wx.VERSION_STRING, ", ".join(wx.PlatformInfo[1:]), py_version))
def __init__(self, parent, id=-1, size=wx.DefaultSize):
89252543a53bd75f39d3708e4a1c5bde9264dbf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/89252543a53bd75f39d3708e4a1c5bde9264dbf3/widgetTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 29711, 21, 16, 963, 33, 27226, 18, 1868, 1225, 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, 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, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 29711, 21, 16, 963, 33, 27226, 18, 1868, 1225, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""
r"""
def b_statistic(self): """ Returns the b-statistic for the Dyck word.
6f95e66ccbbdc9352e36afd62484b2bbfdddcba0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6f95e66ccbbdc9352e36afd62484b2bbfdddcba0/dyck_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 67, 5642, 5846, 12, 2890, 4672, 436, 8395, 2860, 326, 324, 17, 5642, 5846, 364, 326, 463, 93, 363, 2076, 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, 324, 67, 5642, 5846, 12, 2890, 4672, 436, 8395, 2860, 326, 324, 17, 5642, 5846, 364, 326, 463, 93, 363, 2076, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoTabs( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasBugField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeHasTestField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeSvnEolStyle( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( input_api, output_api))
results.extend(_CommonChecks(input_api, output_api))
def CheckChangeOnCommit(input_api, output_api): results = [] black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoTabs( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasBugField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeHasTestField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeSvnEolStyle( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( input_api, output_api)) # TODO(thestig) temporarily disabled, doesn't work in third_party/ #results.extend(input_api.canned_checks.CheckSvnModifiedDirectories( # input_api, output_api, sources)) # Make sure the tree is 'open'. # TODO(maruel): Run it in a separate thread to parallelize checks? results.extend(CheckTreeIsOpen( input_api, output_api, 'http://chromium-status.appspot.com/status', '0', 'http://chromium-status.appspot.com/current?format=raw')) results.extend(CheckTryJobExecution(input_api, output_api)) # These builders are just too slow. IGNORED_BUILDERS = [ 'Chromium XP', 'Chromium Mac', 'Chromium Mac (valgrind)', 'Chromium Mac UI (valgrind)(1)', 'Chromium Mac UI (valgrind)(2)', 'Chromium Mac UI (valgrind)(3)', 'Chromium Mac (tsan)', 'Webkit Mac (valgrind)', 'Chromium Linux', 'Chromium Linux x64', 'Linux Tests (valgrind)(1)', 'Linux Tests (valgrind)(2)', 'Linux Tests (valgrind)(3)', 'Linux Tests (valgrind)(4)', 'Webkit Linux (valgrind layout)', ] results.extend(CheckPendingBuilds( input_api, output_api, 'http://build.chromium.org/buildbot/waterfall/json/builders', 6, IGNORED_BUILDERS)) return results
f92520aecd35259e11b9a675f1242d5ba575f834 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f92520aecd35259e11b9a675f1242d5ba575f834/PRESUBMIT.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 3043, 1398, 5580, 12, 2630, 67, 2425, 16, 876, 67, 2425, 4672, 1686, 273, 5378, 1686, 18, 14313, 24899, 6517, 4081, 12, 2630, 67, 2425, 16, 876, 67, 2425, 3719, 468, 2660, 12, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 3043, 1398, 5580, 12, 2630, 67, 2425, 16, 876, 67, 2425, 4672, 1686, 273, 5378, 1686, 18, 14313, 24899, 6517, 4081, 12, 2630, 67, 2425, 16, 876, 67, 2425, 3719, 468, 2660, 12, 45...
return rv
return rv
def check(self): """Check that the preferences make sense: directories exist and are writable, the install directory is on sys.path, etc.""" rv = "" RWX_OK = os.R_OK|os.W_OK|os.X_OK if not os.path.exists(self.downloadDir): rv += "Warning: Download directory \"%s\" does not exist\n" % self.downloadDir elif not os.access(self.downloadDir, RWX_OK): rv += "Warning: Download directory \"%s\" is not writable or not readable\n" % self.downloadDir if not os.path.exists(self.buildDir): rv += "Warning: Build directory \"%s\" does not exist\n" % self.buildDir elif not os.access(self.buildDir, RWX_OK): rv += "Warning: Build directory \"%s\" is not writable or not readable\n" % self.buildDir if not os.path.exists(self.installDir): rv += "Warning: Install directory \"%s\" does not exist\n" % self.installDir elif not os.access(self.installDir, RWX_OK): rv += "Warning: Install directory \"%s\" is not writable or not readable\n" % self.installDir else: installDir = os.path.realpath(self.installDir) for p in sys.path: try: realpath = os.path.realpath(p) except: pass if installDir == realpath: break else: rv += "Warning: Install directory \"%s\" is not on sys.path\n" % self.installDir return rv
6fde1cef4aa2498f965f95c2d467f4b57face862 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6fde1cef4aa2498f965f95c2d467f4b57face862/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 3536, 1564, 716, 326, 12750, 1221, 12764, 30, 6402, 1005, 471, 854, 9691, 16, 326, 3799, 1867, 353, 603, 2589, 18, 803, 16, 5527, 12123, 225, 5633, 273, 1408, 25920,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 3536, 1564, 716, 326, 12750, 1221, 12764, 30, 6402, 1005, 471, 854, 9691, 16, 326, 3799, 1867, 353, 603, 2589, 18, 803, 16, 5527, 12123, 225, 5633, 273, 1408, 25920,...
_debug(1, "PROXY: (NEW) IPCProxy object created from", type(obj), objid)
log.debug("PROXY: (NEW) IPCProxy object created from", type(obj), objid)
def _proxy_object(self, obj): objid = self._make_objid(obj) if objid in self._proxied_objects: # Increase refcount self._proxied_objects[objid][1] += 1 _debug(1, "PROXY: (EXISTING) IPCProxy object created from", type(obj), objid) else: self._proxied_objects[objid] = [obj, 1] _debug(1, "PROXY: (NEW) IPCProxy object created from", type(obj), objid)
a2ef02ba6b2343fafef3eba89f609780397810ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/a2ef02ba6b2343fafef3eba89f609780397810ea/ipc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5656, 67, 1612, 12, 2890, 16, 1081, 4672, 1081, 350, 273, 365, 6315, 6540, 67, 2603, 350, 12, 2603, 13, 309, 1081, 350, 316, 365, 6315, 20314, 2092, 67, 6911, 30, 468, 657, 11908,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5656, 67, 1612, 12, 2890, 16, 1081, 4672, 1081, 350, 273, 365, 6315, 6540, 67, 2603, 350, 12, 2603, 13, 309, 1081, 350, 316, 365, 6315, 20314, 2092, 67, 6911, 30, 468, 657, 11908,...
return
return
def handleLink(dir,name): nameDir = self.namePath(name)[0] if not os.path.isfile(os.path.join(nameDir,name+self.jsonSuffix)): return None if not os.path.isfile(os.path.join(nameDir,name+self.dumpSuffix)): return None if os.path.islink(os.path.join(nameDir,name)): os.unlink(os.path.join(nameDir,name)) os.unlink(os.path.join(dir,name)) return name
0695c87afc1a2306cbd22420aa43434ce0d27334 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12383/0695c87afc1a2306cbd22420aa43434ce0d27334/JsonDumpStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 2098, 12, 1214, 16, 529, 4672, 508, 1621, 273, 365, 18, 529, 743, 12, 529, 25146, 20, 65, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 538, 18, 803, 18, 5701, 12, 529, 1621, 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, 1640, 2098, 12, 1214, 16, 529, 4672, 508, 1621, 273, 365, 18, 529, 743, 12, 529, 25146, 20, 65, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 538, 18, 803, 18, 5701, 12, 529, 1621, 16...
self.check_sizeof([], h + l + p + l) self.check_sizeof([1, 2, 3], h + l + p + l + 3*l)
self.check_sizeof([], size(h + 'lPP')) self.check_sizeof([1, 2, 3], size(h + 'lPP') + 3*self.P)
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...
lpos=octf.tell()
def _next_attr(self, octf): """Returns the next atribute in the octave file
16f4423e41fa4297049e9f5d5df85c909182e47f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12567/16f4423e41fa4297049e9f5d5df85c909182e47f/h5_octave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4285, 67, 1747, 12, 2890, 16, 10844, 74, 4672, 3536, 1356, 326, 1024, 622, 1533, 624, 316, 326, 10844, 836, 585, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4285, 67, 1747, 12, 2890, 16, 10844, 74, 4672, 3536, 1356, 326, 1024, 622, 1533, 624, 316, 326, 10844, 836, 585, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
ibase = int(ibase)
ibase = long(ibase)
def __call__(self, k):
722a6c12ec66026fdd72e6d266171d2a5a8e27b7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7420/722a6c12ec66026fdd72e6d266171d2a5a8e27b7/spigot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 417, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 417, 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,...
dir = makepath(sitedir, dir) if dir not in sys.path and os.path.exists(dir):
dir, dircase = makepath(sitedir, dir) if not dirs_in_sys_path.has_key(dircase) and os.path.exists(dir):
def addpackage(sitedir, name): fullname = os.path.join(sitedir, name) try: f = open(fullname) except IOError: return while 1: dir = f.readline() if not dir: break if dir[0] == '#': continue if dir.startswith("import"): exec dir continue if dir[-1] == '\n': dir = dir[:-1] dir = makepath(sitedir, dir) if dir not in sys.path and os.path.exists(dir): sys.path.append(dir)
8611ea685d3b98759c521191bcdd35fa431bb9ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8611ea685d3b98759c521191bcdd35fa431bb9ca/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5610, 12, 87, 16261, 481, 16, 508, 4672, 13321, 273, 1140, 18, 803, 18, 5701, 12, 87, 16261, 481, 16, 508, 13, 775, 30, 284, 273, 1696, 12, 21885, 13, 1335, 8340, 30, 327, 1323,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5610, 12, 87, 16261, 481, 16, 508, 4672, 13321, 273, 1140, 18, 803, 18, 5701, 12, 87, 16261, 481, 16, 508, 13, 775, 30, 284, 273, 1696, 12, 21885, 13, 1335, 8340, 30, 327, 1323,...
raise ligolw.ElementError, "duplicate process parameter %s for process ID %s" % (row.param, id)
raise ligolw.ElementError, "duplicate parameter %s for process ID %s" % (row.param, row.process_id)
def get_params(self, id): """ Turn the rows matching the process ID id into a dictionary of parameter/value pairs. """ params = {} for row in self: if row.process_id != id: pass elif params.has_key(row.param): raise ligolw.ElementError, "duplicate process parameter %s for process ID %s" % (row.param, id) elif row.type in metaio.StringTypes: params[row.param] = str(row.value) elif row.type in metaio.IntTypes: params[row.param] = int(row.value) elif row.type in metaio.FloatTypes: params[row.param] = float(row.value) else: raise ligolw.ElementError, "unrecognized Type attribute %s" % row.type return params
68f3f91e703183aa282de0c00a66accba7437755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/68f3f91e703183aa282de0c00a66accba7437755/lsctables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2010, 12, 2890, 16, 612, 4672, 3536, 22425, 326, 2595, 3607, 326, 1207, 1599, 612, 1368, 279, 3880, 434, 1569, 19, 1132, 5574, 18, 3536, 859, 273, 2618, 364, 1027, 316, 365, 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, 2010, 12, 2890, 16, 612, 4672, 3536, 22425, 326, 2595, 3607, 326, 1207, 1599, 612, 1368, 279, 3880, 434, 1569, 19, 1132, 5574, 18, 3536, 859, 273, 2618, 364, 1027, 316, 365, 3...
cmdStr = "findstars " + self.getExpArgStr(inclRadMult=True) def guideScript(sr, cmdStr=cmdStr): while True: yield sr.waitCmd( actor = self.actor, cmdStr = cmdStr, ) self.manGuideScriptRunner = RO.ScriptRunner.ScriptRunner( master = self, name = "Manual guide script", dispatcher = self.tuiModel.dispatcher, runFunc = guideScript, statusBar = self.statusBar, startNow = True ) self.enableCmdButtons(cmdBtn=self.manGuideBtn)
self.doCmd( "guide on manual %s" % self.getExpArgStr(), cmdBtn = self.manGuideBtn, isGuideOn = True, )
def doManGuide(self, wdg=None): """Repeatedly expose. Let the user control-click to center up. """ cmdStr = "findstars " + self.getExpArgStr(inclRadMult=True) def guideScript(sr, cmdStr=cmdStr): # disable Expose, Guide, etc. # take exposures forever while True: yield sr.waitCmd( actor = self.actor, cmdStr = cmdStr, )
0a1ada4b1f708851eb5a7bb0cc86140829f349d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/0a1ada4b1f708851eb5a7bb0cc86140829f349d1/GuideWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 5669, 17424, 12, 2890, 16, 14452, 75, 33, 7036, 4672, 3536, 20730, 715, 15722, 18, 10559, 326, 729, 3325, 17, 7475, 358, 4617, 731, 18, 3536, 1797, 1585, 273, 315, 4720, 334, 5913, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5669, 17424, 12, 2890, 16, 14452, 75, 33, 7036, 4672, 3536, 20730, 715, 15722, 18, 10559, 326, 729, 3325, 17, 7475, 358, 4617, 731, 18, 3536, 1797, 1585, 273, 315, 4720, 334, 5913, ...
if firstTrackID == None: self._logger.debug("\'"+self.getPath(firstTrack)\ +"\' is not in the library.") return if secondTrackID == None: self._logger.debug("\'"+self.getPath(secondTrack)\ +"\' is not in the library.") return
firstTrackPath = self.getPathFromID(firstTrackID) secondTrackPath = self.getPathFromID(secondTrackID)
def getLinkID(self, firstTrack, secondTrack): c = self._conn.cursor() firstTrackID = firstTrack.getID() secondTrackID = secondTrack.getID() if firstTrackID == None: self._logger.debug("\'"+self.getPath(firstTrack)\ +"\' is not in the library.") return if secondTrackID == None: self._logger.debug("\'"+self.getPath(secondTrack)\ +"\' is not in the library.") return c.execute("""select linkid from links where firsttrackid = ? and secondtrackid = ?""", (firstTrackID, secondTrackID)) result = c.fetchone() c.close() if result == None: return None else: return result[0]
afb8ac357cf5a6a40289a31d13b33e838bf2bdb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/afb8ac357cf5a6a40289a31d13b33e838bf2bdb1/Database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15545, 734, 12, 2890, 16, 1122, 4402, 16, 2205, 4402, 4672, 276, 273, 365, 6315, 4646, 18, 9216, 1435, 1122, 4402, 734, 273, 1122, 4402, 18, 588, 734, 1435, 2205, 4402, 734, 273, 2205, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15545, 734, 12, 2890, 16, 1122, 4402, 16, 2205, 4402, 4672, 276, 273, 365, 6315, 4646, 18, 9216, 1435, 1122, 4402, 734, 273, 1122, 4402, 18, 588, 734, 1435, 2205, 4402, 734, 273, 2205, ...
if demoBrowser: if copyDemos: demoBrowserBase = os.path.split(demoBrowser)[0] for demoStatus in buildStatus: qxVersion = demoStatus["qxVersion"] if demoStatus["buildError"]: console.warn("%s %s demo %s %s generation against qooxdoo %s failed!" %(libraryName, versionName, variant.name, buildTarget, qxVersion)) console.warn(demoStatus["buildError"]) continue sourceDir = os.path.join(version.path, "demo", variant.name, qxVersion) targetDir = os.path.join(demoBrowser, "demo", libraryName, versionName, variant.name) console.debug("Copying from %s to %s" %(sourceDir, targetDir)) try: copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() except IOError, e: console.error("Couldn't copy demo: " + str(e)) demoManifest = version.getDemoManifest(variant.name) demoData = self.getDemoData(libraryName, versionName, variant.name, qxVersion) demoData["manifest"] = demoManifest versionData["tests"].append(demoData) else:
if demoBrowser:
def buildAllDemos(self, buildTarget="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": libraryName, "children" : [] } validDemo = False for versionName in library: version = library[versionName] versionData = { "classname" : versionName, #"tags" : [libraryName], "tests" : [], "manifest" : version.getManifest() } qxVersions = version.getManifest()["info"]["qooxdoo-versions"] #for ver in qxVersions: # versionData["tags"].append("qxVersion_" + ver) # getting the library's top-level readme here since we only have path # information for the library versions if not "readme" in libraryData: libDir = os.path.dirname(version.path) readme = self.getReadmeContent(libDir) if readme: libraryData["readme"] = readme else: libraryData["readme"] = "No readme file found." # get the version's readme if not "readme" in versionData: readme = self.getReadmeContent(version.path) if readme: versionData["readme"] = readme else: versionData["readme"] = "No readme file found." if not version.hasDemoDir: continue buildStatus = [] for variant in version.demos: if buildTarget == "build": #get the compatible qooxdoo versions of the library version for qxVersion in qxVersions: macro = { "BUILD_PATH" : "./" + qxVersion, "QOOXDOO_PATH" : "../../../../qooxdoo/" + qxVersion } status = variant.build("build", macro) #DEBUG #status = {"buildError" : None} status["qxVersion"] = qxVersion status["variant"] = variant.name buildStatus.append(status) else: status = variant.build(buildTarget) buildStatus.append(status) if demoBrowser: if copyDemos: demoBrowserBase = os.path.split(demoBrowser)[0] for demoStatus in buildStatus: qxVersion = demoStatus["qxVersion"] if demoStatus["buildError"]: console.warn("%s %s demo %s %s generation against qooxdoo %s failed!" %(libraryName, versionName, variant.name, buildTarget, qxVersion)) console.warn(demoStatus["buildError"]) continue sourceDir = os.path.join(version.path, "demo", variant.name, qxVersion) targetDir = os.path.join(demoBrowser, "demo", libraryName, versionName, variant.name) console.debug("Copying from %s to %s" %(sourceDir, targetDir)) try: copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() except IOError, e: console.error("Couldn't copy demo: " + str(e)) demoManifest = version.getDemoManifest(variant.name) demoData = self.getDemoData(libraryName, versionName, variant.name, qxVersion) demoData["manifest"] = demoManifest versionData["tests"].append(demoData) else: demoManifest = version.getDemoManifest(variant.name) demoBrowserBase = os.path.split(demoBrowser)[0] for qxVersion in qxVersions: self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowserBase, qxVersion) demoData = self.getDemoData(libraryName, versionName, variant.name, qxVersion) versionData["tests"].append(demoData) libraryData["children"].append(versionData) repositoryData.append(libraryData)
3902061437c031778044bcaa375e1d2f03ae6d4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/3902061437c031778044bcaa375e1d2f03ae6d4f/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 1361, 2326, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 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, 1361, 1595, 15058, 538, 12, 2890, 16, 1361, 2326, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 18...
iter = self.liststore.get_iter_from_string(path) checked = self.liststore.get_value(iter, 0) checked = not checked self.liststore.set_value(iter, 0, checked)
treemodelrow = self.liststore[path] for row in treemodelrow.iterchildren(): self.liststore[row.path][0] = not self.liststore[row.path][0] self.liststore[path][0] = not self.liststore[path][0]
def toggled(self, toggle_renderer, path): # get iter from model iter = self.liststore.get_iter_from_string(path) # get value checked = self.liststore.get_value(iter, 0) # toggle it checked = not checked # set value self.liststore.set_value(iter, 0, checked)
87b135eabd9c0a56a8cd543085faaf4bcb2c9b88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/87b135eabd9c0a56a8cd543085faaf4bcb2c9b88/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6316, 75, 1259, 12, 2890, 16, 10486, 67, 14374, 16, 589, 4672, 468, 336, 1400, 628, 938, 1400, 273, 365, 18, 1098, 2233, 18, 588, 67, 2165, 67, 2080, 67, 1080, 12, 803, 13, 468, 336,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6316, 75, 1259, 12, 2890, 16, 10486, 67, 14374, 16, 589, 4672, 468, 336, 1400, 628, 938, 1400, 273, 365, 18, 1098, 2233, 18, 588, 67, 2165, 67, 2080, 67, 1080, 12, 803, 13, 468, 336,...
return unicode(str)
return unicode(str, 'utf-8')
def _phrase_noop(str): return unicode(str)
22a7b48565f2ccc917277feb1f4a7c630ecd9eef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3136/22a7b48565f2ccc917277feb1f4a7c630ecd9eef/ES.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9429, 67, 2135, 556, 12, 701, 4672, 327, 5252, 12, 701, 16, 296, 3158, 17, 28, 6134, 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, ...
[ 1, 1, 1, 1, 1, 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, 9429, 67, 2135, 556, 12, 701, 4672, 327, 5252, 12, 701, 16, 296, 3158, 17, 28, 6134, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if atoms[index].name == tok.LPAR:
if token.name == tok.LPAR:
def build_import_from(builder, nb): """ import_from: 'from' dotted_name 'import' ('*' | '(' import_as_names ')' | import_as_names) import_as_names: import_as_name (',' import_as_name)* [','] import_as_name: NAME [NAME NAME] """ atoms = get_atoms(builder, nb) index = 1 incr, from_name = parse_dotted_names(atoms[index:]) index += (incr + 1) # skip 'import' assert isinstance(atoms[index], TokenObject) # XXX if atoms[index].name == tok.STAR: names = [('*', None)] else: if atoms[index].name == tok.LPAR: # mutli-line imports tokens = atoms[index+1:-1] else: tokens = atoms[index:] index = 0 l = len(tokens) names = [] while index < l: token = tokens[index] assert isinstance(token, TokenObject) name = token.get_value() as_name = None index += 1 if index < l: token = tokens[index] assert isinstance(token, TokenObject) if token.get_value() == 'as': token = tokens[index+1] assert isinstance(token, TokenObject) as_name = token.get_value() index += 2 names.append((name, as_name)) if index < l: # case ',' index += 1 builder.push(ast.From(from_name, names))
e9b09762c21706bd72240d2078b80f33f96fbc08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/e9b09762c21706bd72240d2078b80f33f96fbc08/astbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5666, 67, 2080, 12, 9574, 16, 4264, 4672, 3536, 1930, 67, 2080, 30, 296, 2080, 11, 20965, 67, 529, 296, 5666, 11, 7707, 4035, 571, 7321, 1930, 67, 345, 67, 1973, 5777, 571, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5666, 67, 2080, 12, 9574, 16, 4264, 4672, 3536, 1930, 67, 2080, 30, 296, 2080, 11, 20965, 67, 529, 296, 5666, 11, 7707, 4035, 571, 7321, 1930, 67, 345, 67, 1973, 5777, 571, ...
EnqueueCxx(ipath=IPATH, opts=OPTS, src='indent.cxx', obj='dtoolbase_indent.obj')
EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase_composite1.cxx', obj='dtoolbase_composite1.obj') EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase_composite2.cxx', obj='dtoolbase_composite2.obj') EnqueueCxx(ipath=IPATH, opts=OPTS, src='lookup3.c', obj='dtoolbase_lookup3.obj') EnqueueCxx(ipath=IPATH, opts=OPTS, src='indent.cxx', obj='dtoolbase_indent.obj')
def CreatePandaVersionFiles(): version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h) if (OMIT.count("PYTHON")==0): ConditionalWriteFile("built/tmp/pythonversion", os.path.basename(PYTHONSDK)) ConditionalWriteFile("built/tmp/null.cxx","")
a996ac16ff952120272d0fdfc857572952160b6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/a996ac16ff952120272d0fdfc857572952160b6f/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 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, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
print >>sys.stderr, "AG INTERNAL ERROR: strange response in Save,", response
def save(self, action): chooser = gtk.FileChooserDialog( _('Save ...'), None, gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK))
fe95ab0edaa1add1536468af105865ba40834d92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/fe95ab0edaa1add1536468af105865ba40834d92/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1301, 4672, 5011, 13164, 273, 22718, 18, 812, 17324, 6353, 12, 389, 2668, 4755, 1372, 19899, 599, 16, 22718, 18, 3776, 67, 22213, 51, 2123, 67, 12249, 67, 25242, 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, 1923, 12, 2890, 16, 1301, 4672, 5011, 13164, 273, 22718, 18, 812, 17324, 6353, 12, 389, 2668, 4755, 1372, 19899, 599, 16, 22718, 18, 3776, 67, 22213, 51, 2123, 67, 12249, 67, 25242, 16, ...
SyntaxError: 'return' with argument inside generator (<string>, line 8)
SyntaxError: 'return' with argument inside generator (..., line 8)
... def f(i):
ff60a559da3fcbad664672d8df57092e63bbc05c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ff60a559da3fcbad664672d8df57092e63bbc05c/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 540, 1652, 284, 12, 77, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 540, 1652, 284, 12, 77, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return 0, 0
return monitor.x, monitor.y
def _calculate_pos(self, widget): if HAVE_STATUS_ICON: icon_screen, icon_rect, icon_orient = widget.get_geometry() x = icon_rect[0] y = icon_rect[1] width = icon_rect[2] height = icon_rect[3] else: try: x, y = widget.window.get_origin() if widget.flags() & gtk.NO_WINDOW: x += widget.allocation.x y += widget.allocation.y width = widget.allocation.width height = widget.allocation.height except: pass w, h = self.size_request()
b4745eb258063864fc37c9c3fbc24511fb62b0f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/b4745eb258063864fc37c9c3fbc24511fb62b0f0/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11162, 67, 917, 12, 2890, 16, 3604, 4672, 309, 21926, 3412, 67, 8608, 67, 21745, 30, 4126, 67, 9252, 16, 4126, 67, 2607, 16, 4126, 67, 14766, 273, 3604, 18, 588, 67, 14330, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11162, 67, 917, 12, 2890, 16, 3604, 4672, 309, 21926, 3412, 67, 8608, 67, 21745, 30, 4126, 67, 9252, 16, 4126, 67, 2607, 16, 4126, 67, 14766, 273, 3604, 18, 588, 67, 14330, 1435, ...
:type user: integer (example 1)
:type user: integer
def name_get(self, cr, user, ids, context=None): """
f682ecd4f9242bef1a709bacbd1a362bc76e21ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f682ecd4f9242bef1a709bacbd1a362bc76e21ce/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 67, 588, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 508, 67, 588, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return self.family.redirect.get(self.lang, [u"REDIRECT"])[0]
if self.lang == 'ar': return self.family.redirect.get(self.lang, [u"تحويل"])[0] else: return self.family.redirect.get(self.lang, [u"REDIRECT"])[0]
def redirect(self, default = False): """Return the localized redirect tag for the site.
434e67c3ae06169bcd398c3c7d4f9708eb61546a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/434e67c3ae06169bcd398c3c7d4f9708eb61546a/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 12, 2890, 16, 805, 273, 1083, 4672, 3536, 990, 326, 13596, 3136, 1047, 364, 326, 2834, 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, 3136, 12, 2890, 16, 805, 273, 1083, 4672, 3536, 990, 326, 13596, 3136, 1047, 364, 326, 2834, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
`beginchar' is the start character for the fragment. If self is not looking at an instance of `beginchar' then getdelimited returns the empty string.
`beginchar' is the start character for the fragment. If self is not looking at an instance of `beginchar' then getdelimited returns the empty string.
def getdelimited(self, beginchar, endchars, allowcomments = 1): """Parse a header fragment delimited by special characters.
9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3771, 1038, 329, 12, 2890, 16, 2376, 3001, 16, 679, 7549, 16, 1699, 9231, 273, 404, 4672, 3536, 3201, 279, 1446, 5481, 18609, 635, 4582, 3949, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3771, 1038, 329, 12, 2890, 16, 2376, 3001, 16, 679, 7549, 16, 1699, 9231, 273, 404, 4672, 3536, 3201, 279, 1446, 5481, 18609, 635, 4582, 3949, 18, 2, -100, -100, -100, -100, -100, ...
def _errorReport(self,error,message=None):
def _errorReport( self, error, message = None ):
def _errorReport(self,error,message=None): """Internal function to return errors and exit with an S_ERROR() """ if not message: message = error self.log.warn(error) return S_ERROR(message)
c249e4a99cd4c3c7637f79674add9f0aa1a56bea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c249e4a99cd4c3c7637f79674add9f0aa1a56bea/API.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1636, 4820, 12, 365, 16, 555, 16, 883, 273, 599, 262, 30, 3536, 3061, 445, 358, 327, 1334, 471, 2427, 598, 392, 348, 67, 3589, 1435, 3536, 309, 486, 883, 30, 883, 273, 555, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1636, 4820, 12, 365, 16, 555, 16, 883, 273, 599, 262, 30, 3536, 3061, 445, 358, 327, 1334, 471, 2427, 598, 392, 348, 67, 3589, 1435, 3536, 309, 486, 883, 30, 883, 273, 555, 365,...
genre_list.append(tag_list)
genre_exists = False book_not_in_genre = True if not genre_list: genre_list.append(tag_list) else: for genre in genre_list: if genre['tag'] == tag_list['tag']: genre_exists = True for existing_book in genre['books']: if this_book['title'] == existing_book['title']: book_not_in_genre = False break break if genre_exists: if book_not_in_genre: genre['books'].append(this_book) else: genre_list.append(tag_list) if self.opts.verbose: self.opts.log.info(" Genre summary: %d active genres" % len(genre_list)) for genre in genre_list: self.opts.log.info(" %s: %d titles" % (genre['tag'], len(genre['books'])))
def generateHTMLByTags(self): # Generate individual HTML files for each tag, e.g. Fiction, Nonfiction ... # Note that special tags - ~+*[] - have already been filtered from books[]
e067ad567aaad3c1ee62338310fadaee7dd82612 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/e067ad567aaad3c1ee62338310fadaee7dd82612/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 4870, 858, 3453, 12, 2890, 4672, 468, 6654, 7327, 3982, 1390, 364, 1517, 1047, 16, 425, 18, 75, 18, 478, 2228, 16, 3858, 74, 2228, 1372, 468, 3609, 716, 4582, 2342, 300, 4871, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 4870, 858, 3453, 12, 2890, 4672, 468, 6654, 7327, 3982, 1390, 364, 1517, 1047, 16, 425, 18, 75, 18, 478, 2228, 16, 3858, 74, 2228, 1372, 468, 3609, 716, 4582, 2342, 300, 4871, 15...
self.options.append(tcp_opt(tcp_opt.WSOPT, arr[i+1]))
self.options.append(tcp_opt(tcp_opt.WSOPT, arr[i+2]))
def parse_options(self): self.options = [] dlen = len(self.arr)
77aba4776794a48f82b582b1cf30793175d5f1b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11602/77aba4776794a48f82b582b1cf30793175d5f1b5/tcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2116, 12, 2890, 4672, 225, 365, 18, 2116, 273, 5378, 302, 1897, 273, 562, 12, 2890, 18, 5399, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2116, 12, 2890, 4672, 225, 365, 18, 2116, 273, 5378, 302, 1897, 273, 562, 12, 2890, 18, 5399, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
setExecutableTemplate = """executable = os.path.join(resources, "%s")""" pythonhomeSnippet = """os.environ["home"] = resources"""
def report(self): # XXX something decent import pprint pprint.pprint(self.__dict__)
1d9481c0312908f2dc99ed25ccd52498b1818355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1d9481c0312908f2dc99ed25ccd52498b1818355/bundlebuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 4672, 468, 11329, 5943, 2109, 319, 1930, 18771, 18771, 18, 84, 1188, 12, 2890, 16186, 1576, 972, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 4672, 468, 11329, 5943, 2109, 319, 1930, 18771, 18771, 18, 84, 1188, 12, 2890, 16186, 1576, 972, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
f = open(out_file + ".error") try: error_message = "".join(f.readlines()) finally: f.close()
f_obj = open(out_file + ".error") try: error_message = "".join(f_obj.readlines()) finally: f_obj.close()
def _get_finished_tasks(self): """Task reclamation thread. When tasks are completed by BOINC, the assimilator will drop files back into the output directory for PyMW to reclaim, This thread finds those files and marks the respective task as completed. """ while True: self._task_list_lock.acquire() try: try: for entry in self._task_list: task,out_file = entry # Check for the output files if os.path.isfile(out_file): task.task_finished() self._task_list.remove(entry) elif os.path.isfile(out_file + ".error"): # error results come back with a ".error" extension f = open(out_file + ".error") try: error_message = "".join(f.readlines()) finally: f.close() os.remove(out_file + ".error") task.task_finished(task_err=\ Exception("BOINC computation"\ + " failed:\n " + \ error_message)) self._task_list.remove(entry) if len(self._task_list) == 0: self._result_checker_running = False return except Exception,data: # just in case a higher-level process is hiding exceptions # log any exception that occures and then re-raise it logging.critical("BOINCInterface._get_finished_tasks" + \ " failed: %s" % data) self._result_checker_running = False raise finally: self._task_list_lock.release() time.sleep(0.2)
b494c06a043c26463f265d25157e745913f898d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8868/b494c06a043c26463f265d25157e745913f898d9/boinc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 13527, 67, 9416, 12, 2890, 4672, 3536, 2174, 283, 830, 301, 367, 2650, 18, 225, 5203, 4592, 854, 5951, 635, 605, 6266, 39, 16, 326, 1551, 381, 330, 639, 903, 3640, 1390, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 13527, 67, 9416, 12, 2890, 4672, 3536, 2174, 283, 830, 301, 367, 2650, 18, 225, 5203, 4592, 854, 5951, 635, 605, 6266, 39, 16, 326, 1551, 381, 330, 639, 903, 3640, 1390, ...
newline = newline + line[:res.start(0)] + mime_decode(match) line = line[res.end(0):] return newline + line
newline = newline + line[pos:res.start(0)] + mime_decode(match) pos = res.end(0) return newline + line[pos:]
def mime_decode_header(line): '''Decode a header line to 8bit.''' newline = '' while 1: res = mime_head.search(line) if res is None: break match = res.group(1) # convert underscores to spaces (before =XX conversion!) match = string.join(string.split(match, '_'), ' ') newline = newline + line[:res.start(0)] + mime_decode(match) line = line[res.end(0):] return newline + line
2da64378fc8910a8cade10d25f8774ca051556f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2da64378fc8910a8cade10d25f8774ca051556f9/mimify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4892, 67, 3922, 67, 3374, 12, 1369, 4672, 9163, 6615, 279, 1446, 980, 358, 1725, 3682, 1093, 6309, 9472, 273, 875, 1323, 404, 30, 400, 273, 4892, 67, 1978, 18, 3072, 12, 1369, 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, 4892, 67, 3922, 67, 3374, 12, 1369, 4672, 9163, 6615, 279, 1446, 980, 358, 1725, 3682, 1093, 6309, 9472, 273, 875, 1323, 404, 30, 400, 273, 4892, 67, 1978, 18, 3072, 12, 1369, 13, 309,...
f.write("
f.write("
def parsePkgConfig(command, components, options_dict = None): """Helper function to parse compiler/linker arguments from pkg-config/mozilla-config and update include_dirs, library_dirs, etc. We return a dict with the following keys, which match up with keyword arguments to the setup function: include_dirs, library_dirs, libraries, extra_compile_args. Command is the command to run (pkg-config, mozilla-config, etc). Components is a string that lists the components to get options for. If options_dict is passed in, we add options to it, instead of starting from scratch. """ if options_dict is None: options_dict = { 'include_dirs' : [], 'library_dirs' : [], 'libraries' : [], 'extra_compile_args' : [] } commandLine = "%s --cflags --libs %s" % (command, components) output = getCommandOutput(commandLine).strip() for comp in output.split(): prefix, rest = comp[:2], comp[2:] if prefix == '-I': options_dict['include_dirs'].append(rest) elif prefix == '-L': options_dict['library_dirs'].append(rest) elif prefix == '-l': options_dict['libraries'].append(rest) else: options_dict['extra_compile_args'].append(comp) return options_dict
f6e246039f9c2edac54346a8db71298a555e15f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/f6e246039f9c2edac54346a8db71298a555e15f8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 11264, 809, 12, 3076, 16, 4085, 16, 702, 67, 1576, 273, 599, 4672, 3536, 2276, 445, 358, 1109, 5274, 19, 1232, 264, 1775, 628, 3475, 17, 1425, 19, 8683, 15990, 17, 1425, 471, 108...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 11264, 809, 12, 3076, 16, 4085, 16, 702, 67, 1576, 273, 599, 4672, 3536, 2276, 445, 358, 1109, 5274, 19, 1232, 264, 1775, 628, 3475, 17, 1425, 19, 8683, 15990, 17, 1425, 471, 108...
try: ignore = posix.fdopen except: raise AttributeError, 'dup() method unavailable'
if not hasattr(posix, 'fdopen'): raise AttributeError, 'dup() method unavailable'
def dup(self): import posix
e9901f325e4bfb123479c706288d5c6a09bad406 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e9901f325e4bfb123479c706288d5c6a09bad406/posixfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9417, 12, 2890, 4672, 1930, 16366, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9417, 12, 2890, 4672, 1930, 16366, 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, ...
ui_num = locale.format("%d", num, True)
ui_num = to_unicode(locale.format("%d", num, True))
def _repo_match(repo, patterns): rid = repo.id.lower() rnm = repo.name.lower() for pat in patterns: if fnmatch.fnmatch(rid, pat): return True if fnmatch.fnmatch(rnm, pat): return True return False
41e82de38ac39291193abc15725212145b898aa6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/41e82de38ac39291193abc15725212145b898aa6/yumcommands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7422, 67, 1916, 12, 7422, 16, 6884, 4672, 10911, 273, 3538, 18, 350, 18, 8167, 1435, 436, 15094, 273, 3538, 18, 529, 18, 8167, 1435, 364, 9670, 316, 6884, 30, 309, 18764, 18, 4293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7422, 67, 1916, 12, 7422, 16, 6884, 4672, 10911, 273, 3538, 18, 350, 18, 8167, 1435, 436, 15094, 273, 3538, 18, 529, 18, 8167, 1435, 364, 9670, 316, 6884, 30, 309, 18764, 18, 4293...
dataset = ReadWritableDataset(datasetname) children = dataset.list_children()
idx = bisect_right(everything, datasetname) children = [name for name in everything[idx:] if \ name.find(datasetname) == 0]
def create_auto_snapshot_set(self, label, tag = None): """ Create a complete set of snapshots as if this were for a standard zfs-auto-snapshot operation. Keyword arguments: label: A label to apply to the snapshot name. Cannot be None. tag: A string indicating one of the standard auto-snapshot schedules tags to check (eg. "frequent" for will map to the tag: com.sun:auto-snapshot:frequent). If specified as a zfs property on a zfs dataset, the property corresponding to the tag will override the wildcard property: "com.sun:auto-snapshot" Default value = None """ excluded = [] included = [] single = [] recursive = [] #Get auto-snap property in two passes. First with the global #value, then overriding with the label/schedule specific value
e02168eb590ec64e00e80a33e8d83bfc8e635014 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11404/e02168eb590ec64e00e80a33e8d83bfc8e635014/zfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6079, 67, 11171, 67, 542, 12, 2890, 16, 1433, 16, 1047, 273, 599, 4672, 3536, 1788, 279, 3912, 444, 434, 12808, 487, 309, 333, 4591, 364, 279, 4529, 998, 2556, 17, 6079, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6079, 67, 11171, 67, 542, 12, 2890, 16, 1433, 16, 1047, 273, 599, 4672, 3536, 1788, 279, 3912, 444, 434, 12808, 487, 309, 333, 4591, 364, 279, 4529, 998, 2556, 17, 6079, 17, ...
'numNodesPerElem': numNodesPerElem, 'elemType': elemType, 'ptrConns': ptrConns, 'ptrInitOrder': ptrInitOrder} ptrElemFamilySizes = lithomop3d.allocateInt(numElemFamilies) elemFamily = {'numElemFamilies': numElemFamilies, 'ptrElemFamilySizes': ptrElemFamilySizes}
'ptrElemNodeArray': ptrElemNodeArray, 'ptrElemInitOrder': ptrElemInitOrder} elemFamilies = {'numElemFamilies': numElemFamilies, 'elemFamilySizes': elemFamilySizes, 'elemFamilyTypes': elemFamilyTypes, 'elemFamilyIds': elemFamilyIds}
def _getElems(self, fileRoot): """Gets dimensions and element nodes from Tecton-style input file, and defines element families based on element group number."""
6b41ba3ce12f694fa0d2b888493f6336611ca2f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8645/6b41ba3ce12f694fa0d2b888493f6336611ca2f3/MeshImporterTecton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 23207, 12, 2890, 16, 585, 2375, 4672, 3536, 3002, 5769, 471, 930, 2199, 628, 399, 386, 265, 17, 4060, 810, 585, 16, 471, 11164, 930, 25914, 2511, 603, 930, 1041, 1300, 12123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 23207, 12, 2890, 16, 585, 2375, 4672, 3536, 3002, 5769, 471, 930, 2199, 628, 399, 386, 265, 17, 4060, 810, 585, 16, 471, 11164, 930, 25914, 2511, 603, 930, 1041, 1300, 12123, ...
print >>outfile, self.dispatchXMIInterface(element)
def generatePackage(self, package, recursive=1):
aaa8dd12feab69fa4c32c6edec55ff12239613d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11941/aaa8dd12feab69fa4c32c6edec55ff12239613d8/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2261, 12, 2890, 16, 2181, 16, 5904, 33, 21, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2261, 12, 2890, 16, 2181, 16, 5904, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return md5.new(hash_text).hexdigest()
return md5(hash_text).hexdigest()
def calc_hash(**parameters): hash_text = "%(ha1)s:%(nonce)s:%(nc)s:%(cnonce)s:auth:%(ha2)s" % parameters return md5.new(hash_text).hexdigest()
e3818c4ac11c2dc7e7ae6c3f398587b524d5ffd3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3444/e3818c4ac11c2dc7e7ae6c3f398587b524d5ffd3/digest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 2816, 12, 636, 3977, 4672, 1651, 67, 955, 273, 22061, 3395, 21, 13, 87, 5319, 12, 12824, 13, 87, 5319, 12, 14202, 13, 87, 5319, 12, 71, 12824, 13, 87, 30, 1944, 5319, 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, 7029, 67, 2816, 12, 636, 3977, 4672, 1651, 67, 955, 273, 22061, 3395, 21, 13, 87, 5319, 12, 12824, 13, 87, 5319, 12, 14202, 13, 87, 5319, 12, 71, 12824, 13, 87, 30, 1944, 5319, 12, ...
myAngle=arcsin(dY/dX)
myAngle=arctan(dY/dX)
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->(1,0) is angle 0 radians, then we rotate counter clockwise from there... What is returned in a three element tuple (numsides,style,angle) which can be put into a plot call via marker=X as a **kwarg """ if A == None or B == None: return (3,0,0) if( A != type(tuple()) and len(A) != 2) \ or \ ( B != type(tuple()) and len(B) != 2): return (3,0,0) # # Calculate orientation of triangle # Ang = arcsin(dY/dX) dY=float(B[-1]-A[-1]) dX=float(B[0]-A[0]) if dY>=0 and dX>=0: myAngle=arcsin(dY/dX) elif dY>=0 and dX<0: myAngle=pi-arcsin(dY/dX) elif dY<0 and dX<0: myAngle=arcsin(dY/dX)+pi elif dY<0 and dX>0: myAngle=(2.0*pi)-arcsin(dY/dX) else: myAngle=0 return (3,0,myAngle)
b9aca6a019f1e02fdda02f66dcfacc9eb65f7287 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/b9aca6a019f1e02fdda02f66dcfacc9eb65f7287/followupPDSurface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 4926, 12, 37, 33, 7036, 16, 38, 33, 7036, 4672, 3536, 15510, 87, 2795, 5901, 5574, 487, 10384, 261, 92, 21, 16, 93, 21, 13, 471, 261, 92, 22, 16, 93, 22, 13, 2777, 9697, 333...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 4926, 12, 37, 33, 7036, 16, 38, 33, 7036, 4672, 3536, 15510, 87, 2795, 5901, 5574, 487, 10384, 261, 92, 21, 16, 93, 21, 13, 471, 261, 92, 22, 16, 93, 22, 13, 2777, 9697, 333...
manifest = open (self.manifest, "w") for fn in self.files: manifest.write (fn + '\n') manifest.close ()
self.execute(write_file, (self.manifest, self.files), "writing manifest file")
def write_manifest (self): """Write the file list in 'self.files' (presumably as filled in by 'find_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'."""
1b8e1d4c0dd1a1d738ffdac053446117f6d70656 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b8e1d4c0dd1a1d738ffdac053446117f6d70656/sdist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 14357, 261, 2890, 4672, 3536, 3067, 326, 585, 666, 316, 296, 2890, 18, 2354, 11, 261, 12202, 379, 6906, 487, 6300, 316, 635, 296, 4720, 67, 7606, 11866, 471, 296, 896, 67, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 14357, 261, 2890, 4672, 3536, 3067, 326, 585, 666, 316, 296, 2890, 18, 2354, 11, 261, 12202, 379, 6906, 487, 6300, 316, 635, 296, 4720, 67, 7606, 11866, 471, 296, 896, 67, 32...
self.assertEqual(m.__dict__, None)
self.assertFalse(m.__dict__)
def test_unintialized_modules(self): # Testing uninitialized module objects... from types import ModuleType as M m = M.__new__(M) str(m) self.assertEqual(hasattr(m, "__name__"), 0) self.assertEqual(hasattr(m, "__file__"), 0) self.assertEqual(hasattr(m, "foo"), 0) self.assertEqual(m.__dict__, None) m.foo = 1 self.assertEqual(m.__dict__, {"foo": 1})
36f4733acef5aa12ca3417779ae3f11e59199f70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/36f4733acef5aa12ca3417779ae3f11e59199f70/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 474, 649, 1235, 67, 6400, 12, 2890, 4672, 468, 7766, 310, 640, 13227, 1605, 2184, 2777, 628, 1953, 1930, 5924, 559, 487, 490, 312, 273, 490, 16186, 2704, 972, 12, 49, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 474, 649, 1235, 67, 6400, 12, 2890, 4672, 468, 7766, 310, 640, 13227, 1605, 2184, 2777, 628, 1953, 1930, 5924, 559, 487, 490, 312, 273, 490, 16186, 2704, 972, 12, 49, 13...
if item[0] == "startTag":
if opcode == "startTag":
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.append("</%s>" % item[1]) continue if item[0] == "startTag": if self.optimizeStartTag(collect, item[1], item[2], ">"): continue if item[0] == "startEndTag": if self.optimizeStartTag(collect, item[1], item[2], endsep): continue text = string.join(collect, "") if text: output.append(("rawtext", text)) if item[0] != None: output.append(item) rawseen = cursor+1 collect = [] return output
45a7376583da35fdbc58ca1ef690df2197afce08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/45a7376583da35fdbc58ca1ef690df2197afce08/TALGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 12, 2890, 16, 5402, 4672, 876, 273, 5378, 3274, 273, 5378, 1831, 15156, 273, 3347, 273, 374, 309, 365, 18, 2902, 30, 679, 10814, 273, 2206, 2984, 469, 30, 679, 10814, 273, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 12, 2890, 16, 5402, 4672, 876, 273, 5378, 3274, 273, 5378, 1831, 15156, 273, 3347, 273, 374, 309, 365, 18, 2902, 30, 679, 10814, 273, 2206, 2984, 469, 30, 679, 10814, 273, 315, ...
print "IGNORING table"
pass
def render_table(self, table): tabletext = [] prev = table.previous if getattr(prev, 'name', None) == 'a' and prev.get('name', None) == 'end': print "IGNORING table" elif getattr(table.next, 'name', None) != 'tr': print "IGNORING table" elif re.search('attended the Committee', (table.findPrevious(text=re.compile('[a-z]')) or '').strip()): print "IGNORING table" elif len(table.findAllPrevious(text=re.compile('[a-z]'))) < 6: print "IGNORING table" else: print "PRINTING table" tabletext.append('<data>') tabletext.append(str(table)) tabletext.append('</data>') table.contents = [] print str(table)[0:200] return ''.join(tabletext)
6f5d3aa05f0dcde05fa26d65e6d987be8dbcf0d2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8428/6f5d3aa05f0dcde05fa26d65e6d987be8dbcf0d2/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 2121, 12, 2890, 16, 1014, 4672, 11968, 408, 273, 5378, 2807, 273, 1014, 18, 11515, 309, 3869, 12, 10001, 16, 296, 529, 2187, 599, 13, 422, 296, 69, 11, 471, 2807, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 2121, 12, 2890, 16, 1014, 4672, 11968, 408, 273, 5378, 2807, 273, 1014, 18, 11515, 309, 3869, 12, 10001, 16, 296, 529, 2187, 599, 13, 422, 296, 69, 11, 471, 2807, 18, 588, ...
Return arithmatic sequence determined by the numeric arguments and ellipsis. Best illistrated by examples.
Return arithmetic sequence determined by the numeric arguments and ellipsis. Best illustrated by examples.
def ellipsis_range(*args, **kwds): """ Return arithmatic sequence determined by the numeric arguments and ellipsis. Best illistrated by examples. Use [1,2,..,n] notation. EXAMPLES: sage: ellipsis_range(1,Ellipsis,11,100) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 100] sage: ellipsis_range(0,2,Ellipsis,10,Ellipsis,20) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] sage: ellipsis_range(0,2,Ellipsis,11,Ellipsis,20) [0, 2, 4, 6, 8, 10, 11, 13, 15, 17, 19] sage: ellipsis_range(0,2,Ellipsis,11,Ellipsis,20, step=3) [0, 2, 5, 8, 11, 14, 17, 20] sage: ellipsis_range(10,Ellipsis,0) [] TESTS: These were carefully chosen tests, only to be changed if the semantics of ellipsis ranges change. In otherwords, if they don't pass it's probably a bug in the implementation, not in the doctest. Note 10 only appears once (though it is in both ranges). sage: ellipsis_range(0,Ellipsis,10,Ellipsis,20,step=2) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] Sometimes one or more ranges is emtpy. sage: ellipsis_range(100,Ellipsis,10,Ellipsis,20,step=2) [10, 12, 14, 16, 18, 20] sage: ellipsis_range(0,Ellipsis,10,Ellipsis,-20,step=2) [0, 2, 4, 6, 8, 10] sage: ellipsis_range(100,Ellipsis,10,Ellipsis,-20,step=2) [] We always start on the leftmost point of the range. sage: ellipsis_range(0,Ellipsis,10,Ellipsis,20,step=3) [0, 3, 6, 9, 10, 13, 16, 19] sage: ellipsis_range(100,Ellipsis,10,Ellipsis,20,step=3) [10, 13, 16, 19] sage: ellipsis_range(0,Ellipsis,10,Ellipsis,-20,step=3) [0, 3, 6, 9] sage: ellipsis_range(100,Ellipsis,10,Ellipsis,-20,step=3) [] sage: ellipsis_range(0,1,Ellipsis,-10) [] sage: ellipsis_range(0,1,Ellipsis,-10,step=1) [0] sage: ellipsis_range(100,0,1,Ellipsis,-10) [100] Note the duplicate 5 in the output. sage: ellipsis_range(0,Ellipsis,5,5,Ellipsis,10) [0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10] Examples in which the step determines the parent of the elements: sage: [1..3, step=0.5] [1.00000000000000, 1.50000000000000, 2.00000000000000, 2.50000000000000, 3.00000000000000] sage: v = [1..5, step=1/1]; v [1, 2, 3, 4, 5] sage: parent(v[2]) Rational Field """ # Use kwds so step not absorbed into *args step_magic = 0 if len(kwds) == 0: step = 1 if Ellipsis in args: i = list(args).index(Ellipsis) if i > 1: step = args[i-1]-args[i-2] step_magic = i else: step = kwds.pop('step') if len(kwds) != 0: TypeError, "Unexpected keywords", kwds from sage.structure.sequence import Sequence S = Sequence([a for a in args if a is not Ellipsis] + [step]) universe = S.universe() args = [Ellipsis if a is Ellipsis else universe(a) for a in args] step = universe(step) skip = False last_end = None L = [] for i in range(len(args)): if skip: skip = False elif args[i] is Ellipsis: start, end = args[i-1], args[i+1] if i < 2 or args[i-2] is not Ellipsis: L.pop() if i == step_magic: L.pop() start = args[i-2] more = srange(start, end, step, universe=universe, check=False, include_endpoint=True) if len(more) > 0: if last_end == more[0]: L.pop() last_end = more[-1] L += more else: last_end = None skip = True else: L.append(args[i]) last_end = None return L
b4befa59fff5e65fb7b64309c272adeb2015daa9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/b4befa59fff5e65fb7b64309c272adeb2015daa9/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28992, 67, 3676, 30857, 1968, 16, 2826, 25577, 4672, 3536, 2000, 30828, 3102, 11383, 635, 326, 6389, 1775, 471, 28992, 18, 25717, 277, 2906, 27008, 690, 635, 10991, 18, 225, 2672, 306, 21,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28992, 67, 3676, 30857, 1968, 16, 2826, 25577, 4672, 3536, 2000, 30828, 3102, 11383, 635, 326, 6389, 1775, 471, 28992, 18, 25717, 277, 2906, 27008, 690, 635, 10991, 18, 225, 2672, 306, 21,...
result_slots = ['door'],
def detect_door_result_cb(ud, status, result): if status == GoalStatus.SUCCEEDED: if result.door.latch_state == Door.UNLATCHED: return 'unlatched' else: return 'closed' return 'aborted'
22bf1c631140e70f42912797a2f1dfea01fa1768 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9841/22bf1c631140e70f42912797a2f1dfea01fa1768/executive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 2896, 280, 67, 2088, 67, 7358, 12, 1100, 16, 1267, 16, 563, 4672, 309, 1267, 422, 4220, 287, 1482, 18, 6639, 39, 26031, 30, 309, 563, 18, 2896, 280, 18, 80, 505, 67, 2019, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 2896, 280, 67, 2088, 67, 7358, 12, 1100, 16, 1267, 16, 563, 4672, 309, 1267, 422, 4220, 287, 1482, 18, 6639, 39, 26031, 30, 309, 563, 18, 2896, 280, 18, 80, 505, 67, 2019, ...
if name not in Utils.list_names(): raise Errors.MMUnknownListError, 'list not found: %s' % name
def __init__(self, name=None, lock=1):
ba80b4a28bf9f883cd114c7f68e80c21c904abb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/ba80b4a28bf9f883cd114c7f68e80c21c904abb8/MailList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 7036, 16, 2176, 33, 21, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 7036, 16, 2176, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if not self.stack and not space.match(data):
if not self.stack and space.match(data) is None:
def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if i > 0: self.__at_start = 0 if self.nomoretags: data = rawdata[i:n] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = n break res = interesting.search(rawdata, i) if res: j = res.start(0) else: j = n if i < j: if self.__at_start: self.syntax_error('illegal data at start of file') self.__at_start = 0 data = rawdata[i:j] if not self.stack and not space.match(data): self.syntax_error('data not in content') if illegal.search(data): self.syntax_error('illegal character in content') self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = j if i == n: break if rawdata[i] == '<': if starttagopen.match(rawdata, i): if self.literal: data = rawdata[i] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = i+1 continue k = self.parse_starttag(i) if k < 0: break self.__seen_starttag = 1 self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue if endtagopen.match(rawdata, i): k = self.parse_endtag(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k self.literal = 0 continue if commentopen.match(rawdata, i): if self.literal: data = rawdata[i] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = i+1 continue k = self.parse_comment(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue if cdataopen.match(rawdata, i): k = self.parse_cdata(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:i], '\n') i = k continue res = xmldecl.match(rawdata, i) if res: if not self.__at_start: self.syntax_error("<?xml?> declaration not at start of document") version, encoding, standalone = res.group('version', 'encoding', 'standalone') if version[1:-1] != '1.0': raise RuntimeError, 'only XML version 1.0 supported' if encoding: encoding = encoding[1:-1] if standalone: standalone = standalone[1:-1] self.handle_xml(encoding, standalone) i = res.end(0) continue res = procopen.match(rawdata, i) if res: k = self.parse_proc(i) if k < 0: break self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue res = doctype.match(rawdata, i) if res: if self.literal: data = rawdata[i] self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') i = i+1 continue if self.__seen_doctype: self.syntax_error('multiple DOCTYPE elements') if self.__seen_starttag: self.syntax_error('DOCTYPE not at beginning of document') k = self.parse_doctype(res) if k < 0: break self.__seen_doctype = res.group('name') self.lineno = self.lineno + string.count(rawdata[i:k], '\n') i = k continue elif rawdata[i] == '&': res = charref.match(rawdata, i) if res is not None: i = res.end(0) if rawdata[i-1] != ';': self.syntax_error("`;' missing in charref") i = i-1 if not self.stack: self.syntax_error('data not in content') self.handle_charref(res.group('char')[:-1]) self.lineno = self.lineno + string.count(res.group(0), '\n') continue res = entityref.match(rawdata, i) if res is not None: i = res.end(0) if rawdata[i-1] != ';': self.syntax_error("`;' missing in entityref") i = i-1 name = res.group('name') if self.entitydefs.has_key(name): self.rawdata = rawdata = rawdata[:res.start(0)] + self.entitydefs[name] + rawdata[i:] n = len(rawdata) i = res.start(0) else: self.syntax_error('reference to unknown entity') self.unknown_entityref(name) self.lineno = self.lineno + string.count(res.group(0), '\n') continue elif rawdata[i] == ']': if n-i < 3: break if cdataclose.match(rawdata, i): self.syntax_error("bogus `]]>'") self.handle_data(rawdata[i]) i = i+1 continue else: raise RuntimeError, 'neither < nor & ??' # We get here only if incomplete matches but # nothing else break # end while if i > 0: self.__at_start = 0 if end and i < n: data = rawdata[i] self.syntax_error("bogus `%s'" % data) if illegal.search(data): self.syntax_error('illegal character in content') self.handle_data(data) self.lineno = self.lineno + string.count(data, '\n') self.rawdata = rawdata[i+1:] return self.goahead(end) self.rawdata = rawdata[i:] if end: if not self.__seen_starttag: self.syntax_error('no elements in file') if self.stack: self.syntax_error('missing end tags') while self.stack: self.finish_endtag(self.stack[-1])
a410d6a227cd319b6aaccb60dced4660f1be0df3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a410d6a227cd319b6aaccb60dced4660f1be0df3/xmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 11617, 12, 2890, 16, 679, 4672, 1831, 892, 273, 365, 18, 1899, 892, 277, 273, 374, 290, 273, 562, 12, 1899, 892, 13, 1323, 277, 411, 290, 30, 309, 277, 405, 374, 30, 365, 16186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 11617, 12, 2890, 16, 679, 4672, 1831, 892, 273, 365, 18, 1899, 892, 277, 273, 374, 290, 273, 562, 12, 1899, 892, 13, 1323, 277, 411, 290, 30, 309, 277, 405, 374, 30, 365, 16186...
self.assertEqual(self.al.select_language(['en-us', 'es']), None)
self.assertEqual(self.al.select_language(['en-us', 'fr']), None) self.assertEqual(self.al.select_language(['en-us', 'en']), None)
def testNone(self): """When none of the languages is acceptable.""" self.assertEqual(self.al.select_language(['en-us', 'es']), None)
aaaaaa8e5437bf30ca25c8dc79b11640ed33dd21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/aaaaaa8e5437bf30ca25c8dc79b11640ed33dd21/test_i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 7036, 12, 2890, 4672, 3536, 9434, 6555, 434, 326, 8191, 353, 14206, 12123, 365, 18, 11231, 5812, 12, 2890, 18, 287, 18, 4025, 67, 4923, 12, 3292, 275, 17, 407, 2187, 296, 281, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 7036, 12, 2890, 4672, 3536, 9434, 6555, 434, 326, 8191, 353, 14206, 12123, 365, 18, 11231, 5812, 12, 2890, 18, 287, 18, 4025, 67, 4923, 12, 3292, 275, 17, 407, 2187, 296, 281, 35...
def __sendAddInterest(self, contextId, parentId, zoneId):
def _sendAddInterest(self, contextId, parentId, zoneId):
def __sendAddInterest(self, contextId, parentId, zoneId): """ Part of the new otp-server code.
6fa2adfa8af8fae19707bd7f23de8726e4edc65d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/6fa2adfa8af8fae19707bd7f23de8726e4edc65d/ClientRepository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 986, 29281, 12, 2890, 16, 819, 548, 16, 11582, 16, 29939, 4672, 3536, 6393, 434, 326, 394, 28625, 17, 3567, 981, 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, 389, 4661, 986, 29281, 12, 2890, 16, 819, 548, 16, 11582, 16, 29939, 4672, 3536, 6393, 434, 326, 394, 28625, 17, 3567, 981, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def onTZPrefChange(self, op, item, names):
def onTZPrefChange(self, op, uuid, names):
def onTZPrefChange(self, op, item, names): if 'showUI' in names: self.widget.tzChoice.Show(item.showUI) self.widget.Layout()
f622407ff738f1900b6f8cb9be5496492b0dfb96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f622407ff738f1900b6f8cb9be5496492b0dfb96/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 21647, 23218, 3043, 12, 2890, 16, 1061, 16, 3822, 16, 1257, 4672, 309, 296, 4500, 5370, 11, 316, 1257, 30, 365, 18, 6587, 18, 12994, 10538, 18, 5706, 12, 1726, 18, 4500, 5370, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 21647, 23218, 3043, 12, 2890, 16, 1061, 16, 3822, 16, 1257, 4672, 309, 296, 4500, 5370, 11, 316, 1257, 30, 365, 18, 6587, 18, 12994, 10538, 18, 5706, 12, 1726, 18, 4500, 5370, 13,...
(identity.current.user_name, self.groupnames, acl))
(identity.current.user_name, self.owner_membershipss, acl))
def _acl_can_be_held_by_user(self, acl, user=None): '''Return true if the user is allowed to hold the specified acl.
b28495bbefcf7e8025cf3331820ea585282a7ec1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/b28495bbefcf7e8025cf3331820ea585282a7ec1/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10150, 67, 4169, 67, 2196, 67, 76, 488, 67, 1637, 67, 1355, 12, 2890, 16, 7895, 16, 729, 33, 7036, 4672, 9163, 990, 638, 309, 326, 729, 353, 2935, 358, 6887, 326, 1269, 7895, 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, 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, 10150, 67, 4169, 67, 2196, 67, 76, 488, 67, 1637, 67, 1355, 12, 2890, 16, 7895, 16, 729, 33, 7036, 4672, 9163, 990, 638, 309, 326, 729, 353, 2935, 358, 6887, 326, 1269, 7895, 18...
self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], uid) self.editor.objectMgr.updateObjectProperties(uid, objProp)
self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], objNP) self.editor.objectMgr.updateObjectProperties(objNP, objProp)
def restoreObject(uid, parentNP): obj = self.objInfos[uid] objDef = obj[OG.OBJ_DEF] objModel = obj[OG.OBJ_MODEL] objProp = obj[OG.OBJ_PROP] objRGBA = obj[OG.OBJ_RGBA] objNP = self.editor.objectMgr.addNewObject(objDef.name, uid, obj[OG.OBJ_MODEL], parentNP) self.editor.objectMgr.updateObjectColor(objRGBA[0], objRGBA[1], objRGBA[2], objRGBA[3], uid) self.editor.objectMgr.updateObjectProperties(uid, objProp) objNP.setMat(self.objTransforms[uid])
1708bea71b6113725de1ca483849143955e2fde9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/1708bea71b6113725de1ca483849143955e2fde9/ActionMgr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 921, 12, 1911, 16, 982, 23430, 4672, 1081, 273, 365, 18, 2603, 7655, 63, 1911, 65, 1081, 3262, 273, 1081, 63, 13369, 18, 24547, 67, 12904, 65, 1081, 1488, 273, 1081, 63, 13369, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 921, 12, 1911, 16, 982, 23430, 4672, 1081, 273, 365, 18, 2603, 7655, 63, 1911, 65, 1081, 3262, 273, 1081, 63, 13369, 18, 24547, 67, 12904, 65, 1081, 1488, 273, 1081, 63, 13369, 1...
patchify = []
patchify = [] maybe_patchify = []
def nothing_to_do(): out.info('Nothing to repair')
490add07e9490b2654d22ca2cd3b8dcc0cc0cc9b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/490add07e9490b2654d22ca2cd3b8dcc0cc0cc9b/repair.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5083, 67, 869, 67, 2896, 13332, 596, 18, 1376, 2668, 23814, 358, 20994, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5083, 67, 869, 67, 2896, 13332, 596, 18, 1376, 2668, 23814, 358, 20994, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
while line != '.': if line[:2] == '..':
while line != b'.': if line[:2] == b'..':
def _getlongresp(self): resp = self._getresp() list = []; octets = 0 line, o = self._getline() while line != '.': if line[:2] == '..': o = o-1 line = line[1:] octets = octets + o list.append(line) line, o = self._getline() return resp, list, octets
8088fff492b7c51f02df07516381c86414a3ead9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/8088fff492b7c51f02df07516381c86414a3ead9/poplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 5748, 12243, 12, 2890, 4672, 1718, 273, 365, 6315, 588, 12243, 1435, 666, 273, 5378, 31, 25497, 273, 374, 980, 16, 320, 273, 365, 6315, 588, 1369, 1435, 1323, 980, 480, 324, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 5748, 12243, 12, 2890, 4672, 1718, 273, 365, 6315, 588, 12243, 1435, 666, 273, 5378, 31, 25497, 273, 374, 980, 16, 320, 273, 365, 6315, 588, 1369, 1435, 1323, 980, 480, 324, ...
print "%s" % table.__name__.replace('import_', '')
print "%s" % table.__name__.replace('Importer_', '')
def list_tables(option, opt, value, parser): """ Prints a list of tables that are available for import. """ print "CCP Data Dump Table List" print "------------------------" for table in util.IMPORT_LIST: print "%s" % table.__name__.replace('import_', '') print "-- %d tables --" % len(util.IMPORT_LIST) # The -l argument is just used for listing, proceed no further. exit_with_succ()
5afb4e8e9e3d58d7e89128c9e270125c0dbc5dca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13782/5afb4e8e9e3d58d7e89128c9e270125c0dbc5dca/eve_import_ccp_dump.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 9373, 12, 3482, 16, 2153, 16, 460, 16, 2082, 4672, 3536, 3038, 87, 279, 666, 434, 4606, 716, 854, 2319, 364, 1930, 18, 3536, 1172, 315, 39, 4258, 1910, 18242, 3555, 987, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 9373, 12, 3482, 16, 2153, 16, 460, 16, 2082, 4672, 3536, 3038, 87, 279, 666, 434, 4606, 716, 854, 2319, 364, 1930, 18, 3536, 1172, 315, 39, 4258, 1910, 18242, 3555, 987, 6, ...
if not isuuid(value): if isinstance(value, RefList): value = value.uuid else:
if isuuid(value): if kind.getAttribute(name).c.cardinality != 'list':
def dirtyNames(): if kind is None: names = () else: names = kind._nameTuple(dirties) if status & CItem.KDIRTY: names += ('itsKind',) return names
e618908e4233928c704a0cbacd650ee22bd17d89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e618908e4233928c704a0cbacd650ee22bd17d89/DBRepositoryView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9603, 1557, 13332, 309, 3846, 353, 599, 30, 1257, 273, 1832, 469, 30, 1257, 273, 3846, 6315, 529, 9038, 12, 1214, 88, 606, 13, 309, 1267, 473, 385, 1180, 18, 47, 4537, 5538, 30, 1257, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9603, 1557, 13332, 309, 3846, 353, 599, 30, 1257, 273, 1832, 469, 30, 1257, 273, 3846, 6315, 529, 9038, 12, 1214, 88, 606, 13, 309, 1267, 473, 385, 1180, 18, 47, 4537, 5538, 30, 1257, ...
log = 'OK STOU "%s". Upload starting.' %resp
log = 'OK STOU "%s". Upload starting.' %filename
def ftp_STOU(self, line): """Store a file on the server with a unique name."""
6acd774ca12e273be29b34a624d9a639fbccd65d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/6acd774ca12e273be29b34a624d9a639fbccd65d/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 26556, 12, 2890, 16, 980, 4672, 3536, 2257, 279, 585, 603, 326, 1438, 598, 279, 3089, 508, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 26556, 12, 2890, 16, 980, 4672, 3536, 2257, 279, 585, 603, 326, 1438, 598, 279, 3089, 508, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
jmp = self.read("jmp", "B", "Jump instruction").value assert jmp in (0xEB, 0xFA)
self.read("jmp", "Jump instruction", (FormatChunk, "uint8")) assert self["jmp"] in (0xEB, 0xFA)
def __init__(self, stream, parent): Filter.__init__(self, "default", "Default filter", stream, parent) # TODO: Get right block size! self.block_size = 512 assert 512<=stream.getSize() jmp = self.read("jmp", "B", "Jump instruction").value assert jmp in (0xEB, 0xFA) size = 446 - stream.tell() self.read("data", "%us" % size, "Raw data") self.readChild("partition[]", PartitionEntry) self.readChild("partition[]", PartitionEntry) self.readChild("partition[]", PartitionEntry) self.readChild("partition[]", PartitionEntry) id = self.read("id", "<H", "Identifier (0xAA55)").value assert id == 0xAA55
bdbddab9fc65d2313034d2fb3c1fddc0fb28a932 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/bdbddab9fc65d2313034d2fb3c1fddc0fb28a932/mbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1407, 16, 982, 4672, 4008, 16186, 2738, 972, 12, 2890, 16, 315, 1886, 3113, 315, 1868, 1034, 3113, 1407, 16, 982, 13, 468, 2660, 30, 968, 2145, 1203, 963...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1407, 16, 982, 4672, 4008, 16186, 2738, 972, 12, 2890, 16, 315, 1886, 3113, 315, 1868, 1034, 3113, 1407, 16, 982, 13, 468, 2660, 30, 968, 2145, 1203, 963...
"""
"""
def getParameters(self): """ Created: 15.04.2006, KP Description: Return the list of parameters needed for configuring this GUI """ return [["Seed", (("Seed", ), )], ["Segmentation", ("Neighborhood", "Multiplier", "Iterations")]]
6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10028, 12, 2890, 4672, 3536, 12953, 30, 4711, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 2000, 326, 666, 434, 1472, 3577, 364, 642, 4017, 333, 10978, 3536, 327, 306, 9614, 12702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10028, 12, 2890, 4672, 3536, 12953, 30, 4711, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 2000, 326, 666, 434, 1472, 3577, 364, 642, 4017, 333, 10978, 3536, 327, 306, 9614, 12702, ...
for elt in self: if elt not in otherdata: data[elt] = value
for elt in ifilter(other._data.has_key, self, True): data[elt] = value
def __sub__(self, other): """Return the difference of two sets as a new Set.
bb04f603aeaa1c68e92eeaad9a385781f20ea68b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bb04f603aeaa1c68e92eeaad9a385781f20ea68b/sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 225, 1001, 1717, 972, 12, 2890, 16, 1308, 4672, 3536, 990, 326, 7114, 434, 2795, 1678, 487, 279, 394, 1000, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 225, 1001, 1717, 972, 12, 2890, 16, 1308, 4672, 3536, 990, 326, 7114, 434, 2795, 1678, 487, 279, 394, 1000, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
pool_lock.acquire()
if not pool_lock.acquire(0): result = DB.open(self, version, transaction, temporary, force, waitflag) self._a() return result
def open(self, version='', transaction=None, temporary=0, force=None, waitflag=1, mvcc=True, txn_mgr=None, synch=True): """Return a database Connection for use by application code.
516183b5448db1aa401616599c1141cbda0d1be5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/516183b5448db1aa401616599c1141cbda0d1be5/DB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1177, 2218, 2187, 2492, 33, 7036, 16, 6269, 33, 20, 16, 2944, 33, 7036, 16, 2529, 6420, 33, 21, 16, 7701, 952, 33, 5510, 16, 7827, 67, 13552, 33, 7036, 16, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1177, 2218, 2187, 2492, 33, 7036, 16, 6269, 33, 20, 16, 2944, 33, 7036, 16, 2529, 6420, 33, 21, 16, 7701, 952, 33, 5510, 16, 7827, 67, 13552, 33, 7036, 16, 272, ...
return cmp(statX.__dict__[val], statY.__dict__[val]) def name(tuple): if columnName: return columnName.format(*tuple) else: return str(tuple)
return cmp(statY.__dict__[val], statX.__dict__[val])
def myCmp(x, y): if len(x[1]) == 0 or len(y[1]) == 0: return cmp(x[1], y[1]) statX = StatisticProperties(x[1], self._configurator.statistics['confidence_level']) statY = StatisticProperties(y[1], self._configurator.statistics['confidence_level']) return cmp(statX.__dict__[val], statY.__dict__[val])
d399bd208a58ceb8cc6c884fdbe8c0ef7a76d1ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13198/d399bd208a58ceb8cc6c884fdbe8c0ef7a76d1ef/Reporter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 31832, 12, 92, 16, 677, 4672, 309, 562, 12, 92, 63, 21, 5717, 422, 374, 578, 562, 12, 93, 63, 21, 5717, 422, 374, 30, 327, 9411, 12, 92, 63, 21, 6487, 677, 63, 21, 5717, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 31832, 12, 92, 16, 677, 4672, 309, 562, 12, 92, 63, 21, 5717, 422, 374, 578, 562, 12, 93, 63, 21, 5717, 422, 374, 30, 327, 9411, 12, 92, 63, 21, 6487, 677, 63, 21, 5717, 22...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.BoolField.__init__(self, 893) else quickfix.BoolField.__init__(self, 893, 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, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 7464, 974, 16186, 2738, 972, 12, 2890, 16, 1725, 11180, 13, 469, 9549, 904, 18, 7464, 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, 0, 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, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 7464, 974, 16186, 2738, 972, 12, 2890, 16, 1725, 11180, 13, 469, 9549, 904, 18, 7464, 974, 16186, 2738,...
self.hboxlayout57.addWidget(self.megapov_lbl) self.gridlayout36.addLayout(self.hboxlayout57,3,0,1,1) self.hboxlayout58 = QtGui.QHBoxLayout() self.hboxlayout58.setMargin(0) self.hboxlayout58.setSpacing(6) self.hboxlayout58.setObjectName("hboxlayout58")
self.hboxlayout55.addWidget(self.megapov_lbl) self.gridlayout32.addLayout(self.hboxlayout55,3,0,1,1) self.hboxlayout56 = QtGui.QHBoxLayout() self.hboxlayout56.setMargin(0) self.hboxlayout56.setSpacing(6) self.hboxlayout56.setObjectName("hboxlayout56")
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,...
sage: J = range(5)
sage: J = range(6)
def dft(self, chi = lambda x: x): """ Implements a discrete Fourier transform "over QQ" using exact N-th roots of unity.
31abf87c4df4119c8dc23bc27b1c5160b1dbbd00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/31abf87c4df4119c8dc23bc27b1c5160b1dbbd00/dft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 1222, 12, 2890, 16, 17198, 273, 3195, 619, 30, 619, 4672, 3536, 29704, 279, 20035, 478, 24775, 2510, 315, 1643, 2238, 53, 6, 1450, 5565, 423, 17, 451, 12876, 434, 640, 560, 18, 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, 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, 302, 1222, 12, 2890, 16, 17198, 273, 3195, 619, 30, 619, 4672, 3536, 29704, 279, 20035, 478, 24775, 2510, 315, 1643, 2238, 53, 6, 1450, 5565, 423, 17, 451, 12876, 434, 640, 560, 18, 2,...
def copy(self,keep_going=True): """ Copy all jobs.
def copy(self,**kwds): """ Copy all jobs. Keyword arguments: keep_going=True
def copy(self,keep_going=True): """ Copy all jobs. """ return JobRegistryInterface(self._impl.copy(keep_going))
6fd2e283aec406d2298131a0717d806535041c46 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/6fd2e283aec406d2298131a0717d806535041c46/JobRegistry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 636, 25577, 4672, 3536, 5631, 777, 6550, 18, 18317, 1775, 30, 3455, 67, 8162, 33, 5510, 3536, 327, 3956, 4243, 1358, 12, 2890, 6315, 11299, 18, 3530, 12, 10102, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1610, 12, 2890, 16, 636, 25577, 4672, 3536, 5631, 777, 6550, 18, 18317, 1775, 30, 3455, 67, 8162, 33, 5510, 3536, 327, 3956, 4243, 1358, 12, 2890, 6315, 11299, 18, 3530, 12, 10102, 67, ...
sage: B3(1/2,1/2,1/2).mlist() [[(1/2, -1/2, -1/2), 1], [(-1/2, 1/2, -1/2), 1], [(1/2, 1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1]] """
sage: sorted(B3(1/2,1/2,1/2).mlist()) [[(-1/2, -1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(-1/2, 1/2, -1/2), 1], [(-1/2, 1/2, 1/2), 1], [(1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1], [(1/2, 1/2, 1/2), 1]] """
def mlist(self): """ Returns a list of weights in self with their multiplicities. EXAMPLES:: sage: B3 = WeylCharacterRing(['B',3]) sage: B3(1/2,1/2,1/2).mlist() [[(1/2, -1/2, -1/2), 1], [(-1/2, 1/2, -1/2), 1], [(1/2, 1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1]] """
3932bcc818a9edc98d35936fd8aeaf699b4b5958 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3932bcc818a9edc98d35936fd8aeaf699b4b5958/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 1098, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 5376, 316, 365, 598, 3675, 3309, 1780, 1961, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 1098, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 5376, 316, 365, 598, 3675, 3309, 1780, 1961, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069...
WARNING -- this isn't ready for general use yet.
def extension(self, modulus, prec = None, names = None, print_mode = None, halt = None): """ Create an extension of this p-adic ring.
29edb75bfc73ae3aa08741a408eef6c66ae356d4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/29edb75bfc73ae3aa08741a408eef6c66ae356d4/padic_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2710, 12, 2890, 16, 24770, 16, 13382, 273, 599, 16, 1257, 273, 599, 16, 1172, 67, 3188, 273, 599, 16, 18389, 273, 599, 4672, 3536, 1788, 392, 2710, 434, 333, 293, 17, 20333, 9221, 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, 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, 2710, 12, 2890, 16, 24770, 16, 13382, 273, 599, 16, 1257, 273, 599, 16, 1172, 67, 3188, 273, 599, 16, 18389, 273, 599, 4672, 3536, 1788, 392, 2710, 434, 333, 293, 17, 20333, 9221, 18, ...