rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
cflags += " -arch ppc -arch i386"
cflags += " -arch i386 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
def configure_pjsip(self): log.info("Configuring PJSIP") cflags = "-O3 -fPIC" if sys.platform == "darwin": if platform.mac_ver()[0].startswith('10.6'): cflags += " -arch i386 -arch x86_64" else: cflags += " -arch ppc -arch i386" if self.pjsip_disable_assertions: cflags += " -DNDEBUG" env = os.environ.copy() env['CFLAGS'] = ' '.join(x for x in (cflags, env.get('CFLAGS', None)) if x) distutils_exec_process(["./configure"], True, cwd=self.svn_dir, env=env) if "#define PJSIP_HAS_TLS_TRANSPORT 1\n" not in open(os.path.join(self.svn_dir, "pjsip", "include", "pjsip", "sip_autoconf.h")).readlines(): os.remove(os.path.join(self.svn_dir, "build.mak")) raise DistutilsError("PJSIP TLS support was disabled, OpenSSL development files probably not present on this system")
e4d6f355629e67d1b94073d8fd588335a300fb3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/e4d6f355629e67d1b94073d8fd588335a300fb3d/setup_pjsip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 84, 2924, 625, 12, 2890, 4672, 613, 18, 1376, 2932, 809, 4017, 453, 46, 17739, 7923, 276, 7133, 273, 3701, 51, 23, 300, 74, 20385, 6, 309, 2589, 18, 9898, 422, 315, 28076, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 84, 2924, 625, 12, 2890, 4672, 613, 18, 1376, 2932, 809, 4017, 453, 46, 17739, 7923, 276, 7133, 273, 3701, 51, 23, 300, 74, 20385, 6, 309, 2589, 18, 9898, 422, 315, 28076, ...
[0,x,2*x^2,3*x^3,4*x^4,5*x^5] sage: v[3] 3*x^3 sage: v[0]
2 3 4 5 [0,x,2x ,3x ,4x ,5x ] sage: v[4] 3 3x sage: v[1]
def __getitem__(self, n): r""" Return the n-th element of this list.
0024e3d6e2e182d4eb67b1e9bb08b4eb9dbe85bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0024e3d6e2e182d4eb67b1e9bb08b4eb9dbe85bb/axiom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 290, 4672, 436, 8395, 2000, 326, 290, 17, 451, 930, 434, 333, 666, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 290, 4672, 436, 8395, 2000, 326, 290, 17, 451, 930, 434, 333, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print repos
def main(self, module_args=None):
3aa651e9e648ec8378f3356fba80ed6724451176 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8331/3aa651e9e648ec8378f3356fba80ed6724451176/bin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 16, 1605, 67, 1968, 33, 7036, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 16, 1605, 67, 1968, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sage: f = attrcall('core', 3) sage: loads(dumps(f))
sage: f = attrcall('core', 3); f
def __init__(self, name, args, kwds): """ TESTS::
121ccd216bc42a7590bf74ca68be4cffd080bd7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/121ccd216bc42a7590bf74ca68be4cffd080bd7c/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 833, 16, 17149, 4672, 3536, 22130, 55, 2866, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 16, 833, 16, 17149, 4672, 3536, 22130, 55, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Return '' if no cooked data available otherwise. Don't block.
Return b'' if no cooked data available otherwise. Don't block.
def read_very_lazy(self): """Return any data available in the cooked queue (very lazy).
3de7fb86fc9e053955dae144b4fe6e080f5a4d81 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/3de7fb86fc9e053955dae144b4fe6e080f5a4d81/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3242, 67, 15998, 12, 2890, 4672, 3536, 990, 1281, 501, 2319, 316, 326, 15860, 329, 2389, 261, 3242, 7962, 2934, 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, 855, 67, 3242, 67, 15998, 12, 2890, 4672, 3536, 990, 1281, 501, 2319, 316, 326, 15860, 329, 2389, 261, 3242, 7962, 2934, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
name = string.lower(name)
def handle_entityref(self, name): table = self.entitydefs name = string.lower(name) if table.has_key(name): self.handle_data(table[name]) else: self.unknown_entityref(name) return
7558e8c5f02de39769a30a66c4e60e11204da924 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7558e8c5f02de39769a30a66c4e60e11204da924/sgmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1096, 1734, 12, 2890, 16, 508, 4672, 1014, 273, 365, 18, 1096, 12537, 309, 1014, 18, 5332, 67, 856, 12, 529, 4672, 365, 18, 4110, 67, 892, 12, 2121, 63, 529, 5717, 469, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1096, 1734, 12, 2890, 16, 508, 4672, 1014, 273, 365, 18, 1096, 12537, 309, 1014, 18, 5332, 67, 856, 12, 529, 4672, 365, 18, 4110, 67, 892, 12, 2121, 63, 529, 5717, 469, 30,...
s = subprocess.Popen('./window-title', stdout=subprocess.PIPE).communicate()[0]
s = subprocess.Popen(['sh', './window-title'], stdout=subprocess.PIPE).communicate()[0]
def getForegroundWindowTitleLinux(self): s = subprocess.Popen('./window-title', stdout=subprocess.PIPE).communicate()[0] title = s.replace('\n',' ') return unicode(title, sys.stdin.encoding) def collect(self): day = time.localtime().tm_mday if not self.startday == day: self.openDataFile() title = self.getForegroundWindowTitle() if not title == self.lasttitle: data = hhmmss()+'\t'+title+'\n' self.file.write(data) self.flushData() self.lasttitle = title return data return ''
e30eb498ad748f2a562e2d86407b88f392fa7529 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8373/e30eb498ad748f2a562e2d86407b88f392fa7529/timecollector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2812, 479, 2915, 3829, 4247, 19475, 12, 2890, 4672, 272, 273, 6652, 18, 52, 3190, 12, 3292, 674, 2187, 12871, 5668, 17, 2649, 17337, 3909, 33, 1717, 2567, 18, 27602, 2934, 5702, 318, 265...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2812, 479, 2915, 3829, 4247, 19475, 12, 2890, 4672, 272, 273, 6652, 18, 52, 3190, 12, 3292, 674, 2187, 12871, 5668, 17, 2649, 17337, 3909, 33, 1717, 2567, 18, 27602, 2934, 5702, 318, 265...
def query_tile(self, coord, layer, callback, online=True, force_update=False,
def query_tile(self, coord, layer, callback, online=True, force_update=False,
def query_tile(self, coord, layer, callback, online=True, force_update=False, mapServ=MAP_SERVERS[GOOGLE], styleID=1): #print "query_tile(",coord,layer,callback,online,force_update,")" world_tiles = mapUtils.tiles_on_level(coord[2]) coord = (mapUtils.mod(coord[0], world_tiles), mapUtils.mod(coord[1], world_tiles), coord[2]) # try to get a tile offline fn = self.ctx_map.get_file(coord, layer, False, False) if fn!=None or (not online): deleted = False if (force_update and online): deleted = fileUtils.delete_old(fn) if not deleted: callback(True, coord, layer) return
9cc29431fda977e7764ef46dbab84e7b96d79111 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5373/9cc29431fda977e7764ef46dbab84e7b96d79111/mapDownloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 15368, 12, 2890, 16, 2745, 16, 3018, 16, 1348, 16, 12365, 33, 5510, 16, 2944, 67, 2725, 33, 8381, 16, 852, 827, 90, 33, 8352, 67, 4370, 55, 63, 16387, 13369, 900, 6487, 2154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 15368, 12, 2890, 16, 2745, 16, 3018, 16, 1348, 16, 12365, 33, 5510, 16, 2944, 67, 2725, 33, 8381, 16, 852, 827, 90, 33, 8352, 67, 4370, 55, 63, 16387, 13369, 900, 6487, 2154...
d2 = DNS.DnsRequest(server=gp.server_ip,port=gp.server_port,timeout=0.2)
def doit(gp,args): connected = False fout = gp.fout
f968e01cd2841c5c0a4ae447e969cb127bcbf4ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6933/f968e01cd2841c5c0a4ae447e969cb127bcbf4ad/dnsproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 12, 6403, 16, 1968, 4672, 5840, 273, 1083, 17382, 273, 4178, 18, 617, 322, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 12, 6403, 16, 1968, 4672, 5840, 273, 1083, 17382, 273, 4178, 18, 617, 322, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
bug reported in trac
Bug reported in trac
sage: def my_carmichael(n):
e2afc15236de548daed970d2a6027441122878c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e2afc15236de548daed970d2a6027441122878c5/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 3399, 67, 71, 4610, 1354, 69, 292, 12, 82, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 3399, 67, 71, 4610, 1354, 69, 292, 12, 82, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def writestr(self, zinfo, bytes):
def writestr(self, zinfo_or_arcname, bytes):
def writestr(self, zinfo, bytes): """Write a file into the archive. The contents is the string 'bytes'.""" self._writecheck(zinfo) zinfo.file_size = len(bytes) # Uncompressed size zinfo.CRC = binascii.crc32(bytes) # CRC-32 checksum if zinfo.compress_type == ZIP_DEFLATED: co = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION, zlib.DEFLATED, -15) bytes = co.compress(bytes) + co.flush() zinfo.compress_size = len(bytes) # Compressed size else: zinfo.compress_size = zinfo.file_size zinfo.header_offset = self.fp.tell() # Start of header bytes self.fp.write(zinfo.FileHeader()) zinfo.file_offset = self.fp.tell() # Start of file bytes self.fp.write(bytes) if zinfo.flag_bits & 0x08: # Write CRC and file sizes after the file data self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size, zinfo.file_size)) self.filelist.append(zinfo) self.NameToInfo[zinfo.filename] = zinfo
33331e271a17ff37ca21224255394ebde60c9b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/33331e271a17ff37ca21224255394ebde60c9b05/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7262, 313, 12, 2890, 16, 998, 1376, 67, 280, 67, 11828, 529, 16, 1731, 4672, 3536, 3067, 279, 585, 1368, 326, 5052, 18, 225, 1021, 2939, 353, 326, 533, 296, 3890, 11, 12123, 365, 6315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7262, 313, 12, 2890, 16, 998, 1376, 67, 280, 67, 11828, 529, 16, 1731, 4672, 3536, 3067, 279, 585, 1368, 326, 5052, 18, 225, 1021, 2939, 353, 326, 533, 296, 3890, 11, 12123, 365, 6315,...
group_names = [] try: for rec in self.pool.get('res.users').read(cr, uid, group_users, ['name'], context=context): group_names.append(rec['name']) if len(group_names) >=5: group_names = group_names[:5] group_names += '...' except Exception: raise osv.except_osv(_('Warning !'), _('Make sure you have no users linked with the group(s)!'))
user_names = [user.name for user in self.pool.get('res.users').browse(cr, uid, group_users, context=context)] if len(user_names) >= 5: user_names = user_names[:5] user_names += '...'
def unlink(self, cr, uid, ids, context=None): group_users = [] for record in self.read(cr, uid, ids, ['users'], context=context): if record['users']: group_users.extend(record['users']) if group_users: group_names = [] try: for rec in self.pool.get('res.users').read(cr, uid, group_users, ['name'], context=context): group_names.append(rec['name']) if len(group_names) >=5: group_names = group_names[:5] group_names += '...' except Exception: raise osv.except_osv(_('Warning !'), _('Make sure you have no users linked with the group(s)!')) raise osv.except_osv(_('Warning !'), _('Group(s) cannot be deleted, because user(s) %s participate in them!') % \ ', '.join(group_names)) return super(groups2, self).unlink(cr, uid, ids, context=context)
db5ab22e44d02d078779cf6a31c6724ba7cfdc61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/db5ab22e44d02d078779cf6a31c6724ba7cfdc61/res_user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1041, 67, 5577, 273, 5378, 364, 1409, 316, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 5577, 17337, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1041, 67, 5577, 273, 5378, 364, 1409, 316, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 5577, 17337, ...
print "Loading %s" % m
def reportnewbugs(self,irc): # Compile list of bugs print "Reporting new bugs" tracker = self.db['malone'] bugs = {} sc = imaplib.IMAP4_SSL(imap_server) sc.login(imap_user, imap_password) sc.select('INBOX') new_mail = sc.search(None, '(UNSEEN)')[1][0].split()[:20] for m in new_mail: print "Loading %s" % m msg = sc.fetch(m, 'RFC822')[1][0][1] #print msg fp = email.FeedParser.FeedParser() fp.feed(msg) bug = fp.close() #print "Mail parsed" # Determine bug number, component and tag try: id = int(bug['Reply-To'].split()[1]) except: continue tag = bug['Delivered-To'] tag = tag[tag.find('+')+1:tag.find('@')] component = bug['X-Launchpad-Bug'] if 'component' in component: component = component[component.find('component=')+10:] component = component[:component.find(';')].replace('None','') else: component = '' if tag not in bugs: bugs[tag] = {} #print "Data extracted" if id not in bugs[tag]: try: os.makedirs(os.path.join(bugreporter_base,tag,str(int(id/1000)))) except: pass print os.path.join(bugreporter_base,tag,str(int(id/1000)),str(id)) if id > 58184 and not os.path.exists(os.path.join(bugreporter_base,tag,str(int(id/1000)),str(id))): print "New bug: %d" % id fd2 = open(os.path.join(bugreporter_base,tag,str(int(id/1000)),str(id)),'w') fd2.close() try: if component: bugs[tag][id] = self.get_bug(tracker, id, False)[0].replace('"','(%s) "' % component, 1) else: bugs[tag][id] = self.get_bug(tracker, id, False)[0] except: print "Cannot get bug %d" % id for c in irc.state.channels: tag = self.registryValue('bugReporter', channel=c) if not tag: continue if tag not in bugs.keys(): print "No new bugs in %s" % tag continue print "New bugs in %s (%s): %s" % (c, tag, str(bugs[tag].keys())) for b in sorted(bugs[tag].keys()): irc.queueMsg(ircmsgs.privmsg(c,'New bug: #%s' % bugs[tag][b][bugs[tag][b].find('bug ')+4:]))
a1873865d09620ddbd225087a2af830e9d31df4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3104/a1873865d09620ddbd225087a2af830e9d31df4a/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 2704, 19381, 12, 2890, 16, 481, 71, 4672, 468, 16143, 666, 434, 22398, 1172, 315, 29285, 394, 22398, 6, 9745, 273, 365, 18, 1966, 3292, 81, 12451, 3546, 22398, 273, 2618, 888, 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, 2605, 2704, 19381, 12, 2890, 16, 481, 71, 4672, 468, 16143, 666, 434, 22398, 1172, 315, 29285, 394, 22398, 6, 9745, 273, 365, 18, 1966, 3292, 81, 12451, 3546, 22398, 273, 2618, 888, 273,...
event=buttonPressed)
event=buttonPressed, stretchFactor=0.0, minimumSize=SizeType(30, 17))
def makeMarkupBar(parcel, oldVersion): """ Build the markup bar. """ # Each button just sends this event to itself. buttonPressed = BlockEvent.template('ButtonPressed', 'SendToSender').install(parcel) # The buttons. mailMessageButton = \ MailMessageButtonBlock.template('MailMessageButton', title=messages.STAMP_MAIL, buttonKind="Stamp", icon="MarkupMail", helpString=messages.STAMP_MAIL_HELP, event=buttonPressed) taskStamp = \ TaskStampBlock.template('TaskStamp', title=messages.STAMP_TASK, buttonKind="Stamp", icon="MarkupTask", helpString=messages.STAMP_TASK_HELP, event=buttonPressed) calendarStamp = \ CalendarStampBlock.template('CalendarStamp', title=messages.STAMP_CALENDAR, buttonKind="Stamp", icon="MarkupEvent", helpString=messages.STAMP_CALENDAR_HELP, event=buttonPressed) privateSwitchButton = \ PrivateSwitchButtonBlock.template('PrivateSwitchButton', title=messages.PRIVATE, buttonKind="Stamp", icon="MarkupPrivate", helpString=messages.PRIVATE, event=buttonPressed) readOnlyIcon = \ ReadOnlyIconBlock.template('ReadOnlyIcon', title=messages.READONLY, buttonKind="Stamp", icon="MarkupReadOnly", helpString=messages.READONLY, event=buttonPressed) markupBar = ControlBlocks.ContentItemDetail.template('MarkupBar', childrenBlocks=[mailMessageButton, taskStamp, calendarStamp, privateSwitchButton, readOnlyIcon], position=0.0, toolSize=SizeType(30, 17), separatorWidth=16, stretchFactor=0.0).install(parcel)
99083d473c3626e88e77945ee9f465a9ba596960 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/99083d473c3626e88e77945ee9f465a9ba596960/detailblocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 13111, 5190, 12, 1065, 2183, 16, 1592, 1444, 4672, 3536, 3998, 326, 9813, 4653, 18, 3536, 225, 468, 8315, 3568, 2537, 9573, 333, 871, 358, 6174, 18, 3568, 24624, 273, 3914, 1133, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13111, 5190, 12, 1065, 2183, 16, 1592, 1444, 4672, 3536, 3998, 326, 9813, 4653, 18, 3536, 225, 468, 8315, 3568, 2537, 9573, 333, 871, 358, 6174, 18, 3568, 24624, 273, 3914, 1133, 1...
if not os.path.isdir(prefix):
if not os.path.isdir(client_root + prefix):
def _RealPrefix(path): """Determine longest directory prefix and whether path contains a symlink. Given an absolute path PATH, figure out the longest prefix of PATH where every component of the prefix is a directory -- not a file or symlink. Args: path: a string starting with '/' Returns: a pair consisting of - the prefix - a bool, which is True iff PATH contained a symlink. """ prefix = "/" parts = path.split('/') while prefix != path: part = parts.pop(0) last_prefix = prefix prefix = os.path.join(prefix, part) if os.path.islink(prefix): return last_prefix, True if not os.path.isdir(prefix): return last_prefix, False return path, False
a92f6458ee0d0ec18eb75f96ad74a1bfd349438f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/a92f6458ee0d0ec18eb75f96ad74a1bfd349438f/compiler_defaults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6955, 2244, 12, 803, 4672, 3536, 8519, 12163, 1867, 1633, 471, 2856, 589, 1914, 279, 10563, 18, 225, 16803, 392, 4967, 589, 7767, 16, 7837, 596, 326, 12163, 1633, 434, 7767, 1625, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6955, 2244, 12, 803, 4672, 3536, 8519, 12163, 1867, 1633, 471, 2856, 589, 1914, 279, 10563, 18, 225, 16803, 392, 4967, 589, 7767, 16, 7837, 596, 326, 12163, 1633, 434, 7767, 1625, 3...
self._addParameter(self.workflow,'Platform','JDLReqt',backend,description)
if not backend.lower()=='any': self._addParameter(self.workflow,'Platform','JDLReqt',backend,description)
def setPlatform(self, backend): """Developer function.
6e7df0791f00a80eb84ee0dba134b92baf9508d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6e7df0791f00a80eb84ee0dba134b92baf9508d0/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8201, 12, 2890, 16, 4221, 4672, 3536, 28145, 445, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8201, 12, 2890, 16, 4221, 4672, 3536, 28145, 445, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if ctrl.GetParent().this != self.multiSelection[0].selection.GetParent().this:
if selCtrl.GetParent().this != self.multiSelection[0].selection.GetParent().this:
def OnControlSelect(self, event): """ Control is clicked. Either select it or add control from palette """ ctrl = self.senderMapper.getObject(event)
2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3367, 3391, 12, 2890, 16, 871, 4672, 3536, 8888, 353, 17688, 18, 14635, 2027, 518, 578, 527, 3325, 628, 12127, 3536, 225, 6414, 273, 365, 18, 15330, 4597, 18, 588, 921, 12, 2575, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2755, 3367, 3391, 12, 2890, 16, 871, 4672, 3536, 8888, 353, 17688, 18, 14635, 2027, 518, 578, 527, 3325, 628, 12127, 3536, 225, 6414, 273, 365, 18, 15330, 4597, 18, 588, 921, 12, 2575, ...
from assembly import assembly
from assembly import assembly
def __init__(self, assy, topnode): self.init_InvalMixin() self.assy = assy self.topnode = topnode self.nodecount = 0 # doesn't yet include topnode self.add(topnode) # for now: from assembly import assembly # the class assert isinstance(assy, assembly) assert isinstance(topnode, Node) # _modified?? not yet needed for individual parts, but will be later. # coord sys stuff? data? lastCsys homeCsys xy yz zx ###@@@ review which ivars needed; do we want unique names?? no. # the coordinate system (Actually default view) ####@@@@ does this belong to each Part?? guess: yes self.homeCsys = Csys(self.assy, "HomeView", 10.0, V(0,0,0), 1.0, 0.0, 1.0, 0.0, 0.0) self.lastCsys = Csys(self.assy, "LastView", 10.0, V(0,0,0), 1.0, 0.0, 1.0, 0.0, 0.0) self.xy = Datum(self.assy, "XY", "plane", V(0,0,0), V(0,0,1)) self.yz = Datum(self.assy, "YZ", "plane", V(0,0,0), V(1,0,0)) self.zx = Datum(self.assy, "ZX", "plane", V(0,0,0), V(0,1,0)) grpl1=[self.homeCsys, self.lastCsys, self.xy, self.yz, self.zx] self.data=Group("Data", self.assy, None, grpl1) self.data.open=False
0abde4f5ce347d2e9de87cb0501caffd0127e8c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/0abde4f5ce347d2e9de87cb0501caffd0127e8c2/part.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 1760, 2159, 4672, 365, 18, 2738, 67, 382, 1125, 14439, 1435, 365, 18, 428, 93, 273, 1551, 93, 365, 18, 3669, 2159, 273, 1760, 2159, 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, 1551, 93, 16, 1760, 2159, 4672, 365, 18, 2738, 67, 382, 1125, 14439, 1435, 365, 18, 428, 93, 273, 1551, 93, 365, 18, 3669, 2159, 273, 1760, 2159, 365, ...
config = ConfigReader().read_config(open(config_file)) config.config_file = config_file
config_reader = ConfigReader() config_reader.config_file = config_file config = config_reader.read_config(open(config_file))
def _read_var(self, section, name): if not self.parser.has_section(section) : raise ConfigFileReadErrorException("File '%s' is missing or does not" " contain a '%s' section" % (self.config_file,section))
bb08eac28c7d0ad70b0a2b2068b26769c5aac765 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/bb08eac28c7d0ad70b0a2b2068b26769c5aac765/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 1401, 12, 2890, 16, 2442, 16, 508, 4672, 309, 486, 365, 18, 4288, 18, 5332, 67, 3464, 12, 3464, 13, 294, 1002, 31988, 1994, 10009, 2932, 812, 1995, 87, 11, 353, 3315, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 1401, 12, 2890, 16, 2442, 16, 508, 4672, 309, 486, 365, 18, 4288, 18, 5332, 67, 3464, 12, 3464, 13, 294, 1002, 31988, 1994, 10009, 2932, 812, 1995, 87, 11, 353, 3315, 5...
if isinstance(b_score, Exception):
if b_score is Exception:
def handle_final_score_b(args): if isinstance(b_score, Exception): raise b_score return b_score
7f9b3af7e98ec5643048abc40a0d2ab302c82aa9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6121/7f9b3af7e98ec5643048abc40a0d2ab302c82aa9/gtp_game_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 6385, 67, 6355, 67, 70, 12, 1968, 4672, 309, 324, 67, 6355, 353, 1185, 30, 1002, 324, 67, 6355, 327, 324, 67, 6355, 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, 1640, 67, 6385, 67, 6355, 67, 70, 12, 1968, 4672, 309, 324, 67, 6355, 353, 1185, 30, 1002, 324, 67, 6355, 327, 324, 67, 6355, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def CheckChange(input_api, output_api):
def CheckChange(input_api, output_api):
def CheckChange(input_api, output_api): for f in input_api.AffectedFiles(): dir = os.path.dirname(f.LocalPath()) if (dir in _dependent_dirs): return [output_api.PresubmitPromptWarning(_rebuild_warning)] return []
510ef838a843145b55f078f0101b17811ccbdb91 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/510ef838a843145b55f078f0101b17811ccbdb91/PRESUBMIT.PY
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 3043, 12, 2630, 67, 2425, 16, 876, 67, 2425, 4672, 364, 284, 316, 810, 67, 2425, 18, 23775, 2697, 13332, 1577, 273, 1140, 18, 803, 18, 12287, 12, 74, 18, 2042, 743, 10756, 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, 2073, 3043, 12, 2630, 67, 2425, 16, 876, 67, 2425, 4672, 364, 284, 316, 810, 67, 2425, 18, 23775, 2697, 13332, 1577, 273, 1140, 18, 803, 18, 12287, 12, 74, 18, 2042, 743, 10756, 309, ...
_to_svn(self.scope, old_path), '',
_to_svn(self.scope + old_path), '',
def authz_cb(root, path, pool): return 1
61313a8bb87255d752c335d75837dd0cee235252 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/61313a8bb87255d752c335d75837dd0cee235252/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18686, 67, 7358, 12, 3085, 16, 589, 16, 2845, 4672, 327, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18686, 67, 7358, 12, 3085, 16, 589, 16, 2845, 4672, 327, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
r = self.get_item_rectangle(rectangle, width, height)[2]
r = self.get_item_rectangle(rectangle, width, font_h)[2]
def fit_item_in_rectangle(self, rectangle, width, height): """ calculates the rectangle geometry and fits it into the area """ x = 0 y = 0 r = self.get_item_rectangle(rectangle, width, height)[2] if r.width > width: r.width, width = width, width - (r.width - width) if r.height > height: r.height, height = height, height - (r.height - height) if r.x < 0: r.x, x = 0, -r.x width -= x if r.y < 0: r.y, y = 0, -r.y height -= y
ec09a89abffc006a16c2262aef73f463346519b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/ec09a89abffc006a16c2262aef73f463346519b4/tvlisting_area.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 67, 1726, 67, 267, 67, 2607, 4341, 12, 2890, 16, 11845, 16, 1835, 16, 2072, 4672, 3536, 17264, 326, 11845, 5316, 471, 13351, 518, 1368, 326, 5091, 3536, 619, 273, 374, 677, 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, 4845, 67, 1726, 67, 267, 67, 2607, 4341, 12, 2890, 16, 11845, 16, 1835, 16, 2072, 4672, 3536, 17264, 326, 11845, 5316, 471, 13351, 518, 1368, 326, 5091, 3536, 619, 273, 374, 677, 273, ...
filelist.sort(locale.strcoll)
filelist.sort(locale.strcoll)
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled): if self.stop_now == False and self.closing_app == False: folderlist = []
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 5149, 12, 2890, 16, 761, 16, 2132, 67, 13723, 67, 2730, 67, 7015, 16, 1960, 67, 16016, 67, 5745, 4672, 309, 365, 18, 5681, 67, 3338, 422, 1083, 471, 365, 18, 19506, 67, 291...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4542, 67, 5149, 12, 2890, 16, 761, 16, 2132, 67, 13723, 67, 2730, 67, 7015, 16, 1960, 67, 16016, 67, 5745, 4672, 309, 365, 18, 5681, 67, 3338, 422, 1083, 471, 365, 18, 19506, 67, 291...
open(new_makefile, 'w').write(makefile)
open(makefile_name, 'w').write(makefile)
def patch_makefile(old_makefile, new_makefile): makefile = open(old_makefile, 'r').readlines() cfg = distutils.sysconfig.get_config_var cflags = '-I%s %s' % (cfg('INCLUDEPY'), cfg('CFLAGSFORSHARED')) lib = os.path.join(cfg('LIBPL'), cfg('LIBRARY')) extralibs = ' '.join([cfg('LIBM'), cfg('LIBS'), cfg('LDFLAGS'), lib, cfg('LINKFORSHARED')]) source = 'Local/expy_local_scan.c' # # Look for existing CFLAGS and EXTRALIBS lines, and append info. # Note if this has been done by setting cflags and extralibs to None # for i in range(len(makefile)): if makefile[i].startswith('CFLAGS=') and cflags: makefile[i] = makefile[i].rstrip() + ' ' + cflags + '\n' cflags = None if makefile[i].startswith('EXTRALIBS=') and extralibs: makefile[i] = makefile[i].rstrip() + ' ' + extralibs + '\n' extralibs = None if makefile[i].startswith('LOCAL_SCAN_SOURCE='): makefile[i] = 'LOCAL_SCAN_SOURCE=' + source + '\n' source = None # # Didn't update existing lines? append new ones # if cflags: makefile.append('CFLAGS=%s\n' % cflags) if extralibs: makefile.append('EXTRALIBS=%s\n' % extralibs) if source: makefile.append('LOCAL_SCAN_SOURCE=%s\n' % source) # # Write out updated makefile # makefile = ''.join(makefile) open(new_makefile, 'w').write(makefile)
4ebd15a03a42fecec51883dabd5e8969b612d530 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5780/4ebd15a03a42fecec51883dabd5e8969b612d530/patch_exim_makefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 67, 6540, 768, 12, 1673, 67, 6540, 768, 16, 394, 67, 6540, 768, 4672, 1221, 768, 273, 1696, 12, 1673, 67, 6540, 768, 16, 296, 86, 16063, 896, 3548, 1435, 225, 2776, 273, 2411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 67, 6540, 768, 12, 1673, 67, 6540, 768, 16, 394, 67, 6540, 768, 4672, 1221, 768, 273, 1696, 12, 1673, 67, 6540, 768, 16, 296, 86, 16063, 896, 3548, 1435, 225, 2776, 273, 2411, ...
exec """regimes.append(regimes.%s())""" % (regime) in globals(), locals()
exec """rules.append(regimes.%s())""" % (regime) in globals(), locals()
def main(): group_action = None guess_action = None regime = "perfect" which = None opts, args = getopt.getopt(sys.argv[1:], 's:r:', ['help', 'examples']) for opt, arg in opts: if opt == '-s': which = int(arg) - 1 if opt == '-r': regime = arg nsets = len(glob.glob("Data/Ham/Set*")) files = glob.glob("Data/*/Set*/*") files.sort(lambda a,b: cmp(os.path.basename(a), os.path.basename(b))) tests = [] regimes = [] nham_tested = [] nham_trained = [] nham_right = [] nham_wrong = [] nham_unsure = [] nspam_tested = [] nspam_trained = [] nspam_right = [] nspam_wrong = [] nspam_unsure = [] for j in range(0, nsets): # if which is not None and j != which: # continue tests.append(Test(classifier.Bayes())) exec """regimes.append(regimes.%s())""" % (regime) in globals(), locals() nham_tested.append([]) nham_trained.append([]) nham_right.append([]) nham_wrong.append([]) nham_unsure.append([]) nspam_tested.append([]) nspam_trained.append([]) nspam_right.append([]) nspam_wrong.append([]) nspam_unsure.append([]) oldgroup = 0 for f in files: base = os.path.basename(f) group = int(base.split('-')[0]); dir = os.path.dirname(f) set = os.path.basename(dir) set = int(set[3:]) - 1 isspam = (dir.find('Spam') >= 0) sys.stderr.write("%-78s\r" % ("%s : %d" % (base, set))) sys.stderr.flush() msg = msgs.Msg(dir, base) for j in range(0, nsets): if which is not None and j != which: continue if group != oldgroup: nham_tested[j].append(tests[j].nham_tested) nham_trained[j].append(tests[j].nham_trained) nham_right[j].append(tests[j].nham_right) nham_wrong[j].append(tests[j].nham_wrong) nham_unsure[j].append(tests[j].nham_unsure) nspam_tested[j].append(tests[j].nspam_tested) nspam_trained[j].append(tests[j].nspam_trained) nspam_right[j].append(tests[j].nspam_right) nspam_wrong[j].append(tests[j].nspam_wrong) nspam_unsure[j].append(tests[j].nspam_unsure) # tests[j].reset_test_results() regimes[j].group_action(j, tests[j]) if j != set: guess = tests[j].predict([msg], isspam) if isspam: actual = -1 else: actual = 1 todo = regimes[j].guess_action(j, tests[j], guess, actual, msg) if todo == -1: tests[j].train(None, [msg]) elif todo == 1: tests[j].train([msg], None) oldgroup = group sys.stderr.write("\n") sys.stderr.flush() for j in range(0, nsets): if which is not None and j != which: continue nham_tested[j].append(tests[j].nham_tested) nham_trained[j].append(tests[j].nham_trained) nham_right[j].append(tests[j].nham_right) nham_wrong[j].append(tests[j].nham_wrong) nham_unsure[j].append(tests[j].nham_unsure) nspam_tested[j].append(tests[j].nspam_tested) nspam_trained[j].append(tests[j].nspam_trained) nspam_right[j].append(tests[j].nspam_right) nspam_wrong[j].append(tests[j].nspam_wrong) nspam_unsure[j].append(tests[j].nspam_unsure) for j in range(0, nsets): if which is not None and j != which: continue print 'Set %d' % (j + 1) for k in range(0, len(nham_tested[j])): print '%d %d %d %d %d %d %d %d %d %d' % ( nham_tested[j][k], nham_trained[j][k], nham_right[j][k], nham_wrong[j][k], nham_unsure[j][k], nspam_tested[j][k], nspam_trained[j][k], nspam_right[j][k], nspam_wrong[j][k], nspam_unsure[j][k] ) print print '$ end'
9b7f784a2fe438ddf414b9dc240e72742ebf4e9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/9b7f784a2fe438ddf414b9dc240e72742ebf4e9d/incremental.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1041, 67, 1128, 273, 599, 7274, 67, 1128, 273, 599, 225, 960, 494, 273, 315, 19825, 386, 6, 1492, 273, 599, 225, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1041, 67, 1128, 273, 599, 7274, 67, 1128, 273, 599, 225, 960, 494, 273, 315, 19825, 386, 6, 1492, 273, 599, 225, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, ...
with self.consensus_cache_lock: records = [router.dump(fd) for router in self.router_cache.values()] json.dump(records, fd) fd.close()
with self.consensus_cache_lock: records = [router.dump(fd) for router in self.router_cache.values()] json.dump(records, fd) fd.close() except IOError, e: (errno, strerror) = e log.error("I/O error writing to file %s: %s", fn, strerror)
def export_json(self, fn): if config.export_gzip: fd = gzip.open(config.export_file_prefix + ".json.gz", "w") else: fd = open(config.export_file_prefix + ".json", "w") with self.consensus_cache_lock: records = [router.dump(fd) for router in self.router_cache.values()]
c608f50e5b380c33c22e562337c8f2b8f23b399a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/c608f50e5b380c33c22e562337c8f2b8f23b399a/controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 1977, 12, 2890, 16, 2295, 4672, 309, 642, 18, 6530, 67, 17380, 30, 5194, 273, 10331, 18, 3190, 12, 1425, 18, 6530, 67, 768, 67, 3239, 397, 3552, 1977, 18, 9764, 3113, 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, 3359, 67, 1977, 12, 2890, 16, 2295, 4672, 309, 642, 18, 6530, 67, 17380, 30, 5194, 273, 10331, 18, 3190, 12, 1425, 18, 6530, 67, 768, 67, 3239, 397, 3552, 1977, 18, 9764, 3113, 315, ...
elif mode == 2:
elif whence == 2:
def seek(self, pos, mode = 0): """Seek to specified position into the chunk. Default position is 0 (start of chunk). If the file is not seekable, this will result in an error.
624a1915121f60350984049a9f942d941ee14fbe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/624a1915121f60350984049a9f942d941ee14fbe/chunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 16, 1965, 273, 374, 4672, 3536, 16134, 358, 1269, 1754, 1368, 326, 2441, 18, 2989, 1754, 353, 374, 261, 1937, 434, 2441, 2934, 971, 326, 585, 353, 486, 6520, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 16, 1965, 273, 374, 4672, 3536, 16134, 358, 1269, 1754, 1368, 326, 2441, 18, 2989, 1754, 353, 374, 261, 1937, 434, 2441, 2934, 971, 326, 585, 353, 486, 6520, 4...
self.setViewRightAction.setIconSet(QIconSet(self.image61))
self.setViewRightAction.setIconSet(QIconSet(self.image57))
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...
sys.exit(False)
sys.exit(1)
def getMythtvDirectories(): """Get all video and graphics directories found in the MythTV DB and add them to the dictionary. Ignore any MythTV Frontend setting when there is already a storage group configured. """ # Stop processing if this local host has any storage groups global localhostname, vid_graphics_dirs, dir_dict, storagegroups, local_only # When there is NO SG for Videos then ALL graphics paths MUST be local paths set in the FE and accessable # from the backend if storagegroups.has_key(u'mythvideo'): local_only = False # Pick up storage groups first for key in storagegroups.keys(): vid_graphics_dirs[key] = storagegroups[key] for key in dir_dict.keys(): if key == u'default' or key == u'mythvideo': continue if not storagegroups.has_key(key): vid_graphics_dirs[key] = storagegroups[u'mythvideo'] # Set fall back graphics directory to Videos storagegroups[key] = storagegroups[u'mythvideo'] # Set fall back SG graphics directory to Videos else: local_only = True if storagegroups.has_key(u'default'): vid_graphics_dirs[u'default'] = storagegroups[u'default'] if local_only: logger.warning(u'There is no "Videos" Storage Group set so ONLY MythTV Frontend local paths for videos and graphics that are accessable from this MythTV Backend can be used.') for key in dir_dict.keys(): if vid_graphics_dirs[key]: continue graphics_dir = mythdb.getSetting(dir_dict[key], hostname = localhostname) # Only use path from MythTV if one was found if key == u'mythvideo': if graphics_dir: tmp_directories = graphics_dir.split(u':') if len(tmp_directories): for i in range(len(tmp_directories)): tmp_directories[i] = tmp_directories[i].strip() if tmp_directories[i] != u'': if os.path.exists(tmp_directories[i]): if tmp_directories[i][-1] != u'/': tmp_directories[i]+=u'/' vid_graphics_dirs[key] = tmp_directories[i] break else: logger.error(u"MythVideo video directory (%s) does not exist(%s)" % (key, tmp_directories[i])) else: logger.error(u"MythVideo video directory (%s) is not set" % (key, )) if key != u'mythvideo': if graphics_dir and os.path.exists(graphics_dir): if graphics_dir[-1] != u'/': graphics_dir+=u'/' vid_graphics_dirs[key] = graphics_dir else: # There is the chance that MythTv DB does not have a dir logger.error(u"(%s) directory is not set or does not exist(%s)" % (key, dir_dict[key])) # Make sure there is a directory set for Videos and other graphics directories on this host for key in vid_graphics_dirs.keys(): if not vid_graphics_dirs[key]: logger.critical(u"There must be a directory for Videos and each graphics type. At least the (%s) directory is missing." % (key)) sys.exit(False) # Make sure that there is read/write access to all the directories Miro Bridge uses access_issue = False for key in vid_graphics_dirs.keys(): if not os.access(vid_graphics_dirs[key], os.F_OK | os.R_OK | os.W_OK): logger.critical(u"\nEvery Video and graphics directory must be read/writable for Miro Bridge to function. There is a permissions issue with (%s)." % (vid_graphics_dirs[key], )) access_issue = True if access_issue: sys.exit(False) # end getMythtvDirectories()
0f178cb606ce1cfb96840e30bd489d420b041e6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/0f178cb606ce1cfb96840e30bd489d420b041e6d/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 451, 24161, 13071, 13332, 3536, 967, 777, 6191, 471, 17313, 6402, 1392, 316, 326, 8005, 451, 15579, 2383, 471, 527, 2182, 358, 326, 3880, 18, 8049, 1281, 8005, 451, 15579, 27162,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 451, 24161, 13071, 13332, 3536, 967, 777, 6191, 471, 17313, 6402, 1392, 316, 326, 8005, 451, 15579, 2383, 471, 527, 2182, 358, 326, 3880, 18, 8049, 1281, 8005, 451, 15579, 27162,...
_ip.magic('run -i "%s"'%F)
_ip.runlines('%%run -i "%s"'%F)
def do_prefilter_paste(line, continuation): """ Alternate prefilter for input. INPUT: line -- a single line; must *not* have any newlines in it continuation -- whether the input line is really part of the previous line, because of open parens or backslash. """ if '\n' in line: raise RuntimeError, "bug in function that calls do_prefilter_paste -- there can be no newlines in the input" global attached # This is so it's OK to have lots of blank space at the # beginning of any non-continuation line. if continuation: # strip ...'s that appear in examples L = line.lstrip() if L[:3] == '...': line = L[3:] else: line = line.lstrip() line = line.rstrip() if not line.startswith('attach ') and not line.startswith('load '): for F in attached.keys(): tm = attached[F] if os.path.exists(F) and os.path.getmtime(F) > tm: # Reload F. try: if F.endswith('.py'): _ip.magic('run -i "%s"'%F) elif F.endswith('.sage'): _ip.magic('run -i "%s"'%preparse_file_named(F)) elif F.endswith('.spyx') or F.endswith('.pyx'): X = load_cython(F) __IPYTHON__.push(X) else: line = 'load("%s")'%F t = os.path.getmtime(F) attached[F] = t except IOError: del attached[F] # Get rid of leading sage: so that pasting of examples from the documentation # works. This is like MAGMA's SetLinePrompt(false). for prompt in ['sage:', '>>>']: if not continuation: while True: strip = False if line[:3] == prompt: line = line[3:].lstrip() strip = True elif line[:5] == prompt: line = line[5:].lstrip() strip = True if not strip: break else: line = line.lstrip() # 'quit' alone on a line to quit. if line.lower() in ['quit', 'exit', 'quit;', 'exit;']: line = '%quit' ################################################################# # An interactive load command, like iload in MAGMA. ################################################################# if line[:6] == 'iload ': try: name = str(eval(line[6:])) except: name = str(line[6:].strip()) try: F = open(name) except IOError: raise ImportError, 'Could not open file "%s"'%name print 'Interactively loading "%s"'%name n = len(__IPYTHON__.input_hist) for L in F.readlines(): L = L.rstrip() Llstrip = L.lstrip() raw_input('sage: %s'%L.rstrip()) __IPYTHON__.input_hist_raw.append(L) if Llstrip[:5] == 'load ' or Llstrip[:7] == 'attach ' \ or Llstrip[:6] == 'iload ': log.offset -= 1 L = do_prefilter_paste(L, False) if len(L.strip()) > 0: _ip.magic(L) L = '' else: L = preparser_ipython.preparse_ipython(L, not continuation) __IPYTHON__.input_hist.append(L) __IPYTHON__.push(L) log.offset += 1 return '' ################################################################# # A "load" command, like \r file in PARI or load "file" in MAGMA ################################################################# if line[:5] == 'load ': # The -i so the file is run with the same environment, # e.g., including the "from sage import *" try: name = str(eval(line[5:])).strip() except: name = str(line[5:].strip()) if name.lower().startswith('http://'): name = remote_file.get_remote_file(name) if isinstance(name, str): if not os.path.exists(name): raise ImportError, "File '%s' not found (be sure to give .sage, .py, or .pyx extension)"%name elif name.endswith('.py'): try: line = '%run -i "' + name + '"' except IOError, s: print s raise ImportError, "Error loading '%s'"%name elif name.endswith('.sage'): try: line = '%run -i "' + preparse_file_named(name) + '"' except IOError, s: print s raise ImportError, "Error loading '%s'"%name line = "" elif name.endswith('.spyx') or name.endswith('.pyx'): line = load_cython(name) else: line = 'load("%s")'%name #raise ImportError, "Loading of '%s' not implemented (load .py, .pyx, and .sage files)"%name #line = '' elif line[:13] == 'save_session(': line = 'save_session(locals(), %s'%line[13:] elif line[:14] == 'save_session (': line = 'save_session (locals(), %s'%line[14:] elif line[:13] == 'load_session(': line = 'load_session(locals(), %s'%line[13:] elif line[:14] == 'load_session (': line = 'load_session (locals(), %s'%line[14:] elif ''.join(line.split()) == 'show_identifiers()': line = 'show_identifiers(locals())' # This is an attach command like in MAGMA. The file to attach is # any file that could be loaded. At attach time it is loaded as # above. It is put in a list that is a variable with scope this # interpreter.py file. Each time prefilter_paste is called and # continuation is False, check all attached file names and if any # have changed, compile the file, then use %run to load them again # as above. This is like the MAGMA attach, but in some ways # better. It is very nice for interactive code development. if line.startswith('attach '): # The -i so the file is run with the same environment, # e.g., including the "from sage import *" try: name = str(eval(line[7:])) except: name = str(line[7:].strip()) name = os.path.abspath(name) if not os.path.exists(name): raise ImportError, "File '%s' not found (be sure to give .sage, .py, or .pyx extension)."%name elif name.endswith('.py'): try: line = '%run -i "' + name + '"' attached[name] = os.path.getmtime(name) except IOError, OSError: raise ImportError, "File '%s' not found."%name elif name.endswith('.sage'): try: line = '%run -i "' + preparse_file_named(name) + '"' attached[name] = os.path.getmtime(name) except IOError, OSError: raise ImportError, "File '%s' not found."%name elif name.endswith('.pyx') or name.endswith('.spyx'): try: line = load_cython(name) attached[name] = os.path.getmtime(name) except IOError, OSError: raise ImportError, "File '%s' not found."%name line = '' else: #line = 'load("%s")'%name raise ImportError, "Attaching of '%s' not implemented (load .py, .pyx, and .sage files)"%name if len(line) > 0: line = preparser_ipython.preparse_ipython(line, not continuation) return line
99f1da1fd55b783a5e3c315a8be1e30a4bbcf883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/99f1da1fd55b783a5e3c315a8be1e30a4bbcf883/interpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1484, 2188, 67, 29795, 12, 1369, 16, 17378, 4672, 3536, 21498, 340, 675, 2188, 364, 810, 18, 225, 12943, 30, 980, 1493, 279, 2202, 980, 31, 1297, 380, 902, 14, 1240, 1281, 191...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1484, 2188, 67, 29795, 12, 1369, 16, 17378, 4672, 3536, 21498, 340, 675, 2188, 364, 810, 18, 225, 12943, 30, 980, 1493, 279, 2202, 980, 31, 1297, 380, 902, 14, 1240, 1281, 191...
if stat_dict["statistic"] == "bittenl":
if stat_dict["statistic"] == "bitten_l":
def symlinksafe( target, linkname ): """ Creates a link, does not nag about when it already exists """ try: os.symlink( target, linkname ) except OSError, (errno, strerror): if errno==17: print "WARNING: link %s already exist" % (linkname) else: raise
d25024fc88cb7ec4d9fbc85ccb464a0a915c926a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/d25024fc88cb7ec4d9fbc85ccb464a0a915c926a/upperlimit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10563, 4626, 12, 1018, 16, 1692, 529, 262, 30, 3536, 10210, 279, 1692, 16, 1552, 486, 290, 346, 2973, 1347, 518, 1818, 1704, 3536, 775, 30, 1140, 18, 21278, 12, 1018, 16, 1692, 529, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10563, 4626, 12, 1018, 16, 1692, 529, 262, 30, 3536, 10210, 279, 1692, 16, 1552, 486, 290, 346, 2973, 1347, 518, 1818, 1704, 3536, 775, 30, 1140, 18, 21278, 12, 1018, 16, 1692, 529, 26...
print tag, self.nsdict
def finish_starttag(self, tag, attrs): self.scan_xmlns(attrs) print tag, self.nsdict if tag not in EMPTY_HTML_TAGS: self.tagstack.append(tag) else: self.pop_xmlns() print "<", tag, self.nsdict self.gen.emitStartTag(tag, attrs)
df4d0c74a69327d848b994100662ee069776ae40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/df4d0c74a69327d848b994100662ee069776ae40/HTMLTALParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 365, 18, 9871, 67, 16741, 12, 7039, 13, 309, 1047, 486, 316, 8984, 67, 4870, 67, 29915, 30, 365, 18, 2692, 3772, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 365, 18, 9871, 67, 16741, 12, 7039, 13, 309, 1047, 486, 316, 8984, 67, 4870, 67, 29915, 30, 365, 18, 2692, 3772, 18, 6923, 1...
_window().window.set_cursor(None)
logging.info("show_controls") self.show_mouse()
def show_controls(self): _window().window.set_cursor(None) self.overlay.show()
08c556075000a687fd6cae298184d47dd6b5ff97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/08c556075000a687fd6cae298184d47dd6b5ff97/video.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 24350, 12, 2890, 4672, 2907, 18, 1376, 2932, 4500, 67, 24350, 7923, 365, 18, 4500, 67, 11697, 1435, 365, 18, 17312, 18, 4500, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 2405, 67, 24350, 12, 2890, 4672, 2907, 18, 1376, 2932, 4500, 67, 24350, 7923, 365, 18, 4500, 67, 11697, 1435, 365, 18, 17312, 18, 4500, 1435, 2, -100, -100, -100, -100, -100, -100, -100,...
wxFrame.__init__(self, parent, id, title, size=wxSize(600, 400))
wxDialog.__init__(self, parent, id, title, size=wxSize(600, 400), style=wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER|wxTHICK_FRAME)
def __init__(self, client, path, title, parent=None, id=-1, detailed=True, persons=True, absence_data=None): """Create an absence list window.
8bfcb893526ff90ecb1436418450327bd4196777 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/8bfcb893526ff90ecb1436418450327bd4196777/wxclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1004, 16, 589, 16, 2077, 16, 982, 33, 7036, 16, 612, 29711, 21, 16, 6864, 33, 5510, 16, 6175, 87, 33, 5510, 16, 2417, 802, 67, 892, 33, 7036, 4672, 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, 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, 1004, 16, 589, 16, 2077, 16, 982, 33, 7036, 16, 612, 29711, 21, 16, 6864, 33, 5510, 16, 6175, 87, 33, 5510, 16, 2417, 802, 67, 892, 33, 7036, 4672, 3...
self._parent._pagenumber += 1
self._parent._pagenumber = self._parent._pagenumber + 1
def _postcomment(self) : """Outputs comments after the method call.""" if self._action == "showPage" : self._parent._pagenumber += 1 self._parent._PyWrite("\n # Begins page %i" % self._parent._pagenumber) elif self._action == "endForm" : self._parent._PyWrite("")
bcfae691c5cbf62be20964eeadceaeb637e4c354 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/bcfae691c5cbf62be20964eeadceaeb637e4c354/pycanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2767, 3469, 12, 2890, 13, 294, 3536, 13856, 5678, 1839, 326, 707, 745, 12123, 309, 365, 6315, 1128, 422, 315, 4500, 1964, 6, 294, 365, 6315, 2938, 6315, 9095, 21998, 273, 365, 6315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2767, 3469, 12, 2890, 13, 294, 3536, 13856, 5678, 1839, 326, 707, 745, 12123, 309, 365, 6315, 1128, 422, 315, 4500, 1964, 6, 294, 365, 6315, 2938, 6315, 9095, 21998, 273, 365, 6315,...
for a_host in partition_hosts: if first_host == None: first_host = a_host first_host_xml = self.store_remote_cib(a_host) else: a_host_xml = self.store_remote_cib(a_host) (rc, result) = self.CM.rsh(first_host, "crm_diff -c -VV -f -N \'%s\' -O '%s'" % (a_host_xml, first_host_xml), None) if rc != 0: self.CM.log("Diff command failed: %d" % rc) passed = 0 for line in result: if not re.search("<diff/>", line): passed = 0 self.CM.debug("CibDiff[%s-%s]: %s" % (first_host, a_host, line)) else: self.CM.debug("CibDiff[%s-%s] Ignoring: %s" % (first_host, a_host, line))
for node in partition_hosts: node_xml = self.store_remote_cib(node, node0) if node_xml == None: self.CM.log("Could not perform audit: No configuration from %s" % node) passed = 0 elif node0 == None: node0 = node node0_xml = node_xml elif node0_xml == None: self.CM.log("Could not perform audit: No configuration from %s" % node0) passed = 0 else: (rc, result) = self.CM.rsh( node0, "crm_diff -VV -cf --new %s --original %s" % (node_xml, node0_xml), None) if rc != 0: self.CM.log("Diff between %s and %s failed: %d" % (node0_xml, node_xml, rc)) passed = 0 for line in result: if not re.search("<diff/>", line): passed = 0 self.CM.debug("CibDiff[%s-%s]: %s" % (node0, node, line)) else: self.CM.debug("CibDiff[%s-%s] Ignoring: %s" % (node0, node, line))
def audit_cib_contents(self, hostlist): passed = 1 return 1 first_host = None first_host_xml = "" partition_hosts = hostlist.split() for a_host in partition_hosts: if first_host == None: first_host = a_host first_host_xml = self.store_remote_cib(a_host) #self.CM.debug("Retrieved CIB: %s" % first_host_xml) else: a_host_xml = self.store_remote_cib(a_host) (rc, result) = self.CM.rsh(first_host, "crm_diff -c -VV -f -N \'%s\' -O '%s'" % (a_host_xml, first_host_xml), None) if rc != 0: self.CM.log("Diff command failed: %d" % rc) passed = 0
83266b9903a44b19df33db8ad1f5db2880315af1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11962/83266b9903a44b19df33db8ad1f5db2880315af1/CTSaudits.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8215, 67, 71, 495, 67, 3980, 12, 2890, 16, 1479, 1098, 4672, 2275, 273, 404, 327, 404, 1122, 67, 2564, 273, 599, 1122, 67, 2564, 67, 2902, 273, 1408, 3590, 67, 11588, 273, 1479, 1098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8215, 67, 71, 495, 67, 3980, 12, 2890, 16, 1479, 1098, 4672, 2275, 273, 404, 327, 404, 1122, 67, 2564, 273, 599, 1122, 67, 2564, 67, 2902, 273, 1408, 3590, 67, 11588, 273, 1479, 1098, ...
subPop=[1, 2]), pyOperator(func=testFitness, param=([0],)),
subPop=1), maSelector(locus=0, wildtype=[0], fitness = [0.6, 0.4, 0.6], subPop=2), pyOperator(func=testFitness, param=([0],), stage=PreMating),
def testFitness(pop, params): for sp in params[0]: for ind in pop.individuals(sp): self.assertEqual(ind.info('fitness'), 0.)
f71d1f8d69af42fbb0ebe3b021e806b0dd8cea6a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/401/f71d1f8d69af42fbb0ebe3b021e806b0dd8cea6a/test_15_selection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 42, 9746, 12, 5120, 16, 859, 4672, 364, 1694, 316, 859, 63, 20, 14542, 364, 1547, 316, 1843, 18, 22032, 30910, 12, 1752, 4672, 365, 18, 11231, 5812, 12, 728, 18, 1376, 2668, 7216...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 42, 9746, 12, 5120, 16, 859, 4672, 364, 1694, 316, 859, 63, 20, 14542, 364, 1547, 316, 1843, 18, 22032, 30910, 12, 1752, 4672, 365, 18, 11231, 5812, 12, 728, 18, 1376, 2668, 7216...
internal.trace.enabled = True
internal.trace.cvar.enabled = True
def enable_trace(): internal.trace.cvar.enabled = True
2a67f2b08cb2d478c3b425d778a75bb2ce46a813 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/2a67f2b08cb2d478c3b425d778a75bb2ce46a813/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 5129, 13332, 2713, 18, 5129, 18, 71, 1401, 18, 5745, 273, 1053, 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, 4237, 67, 5129, 13332, 2713, 18, 5129, 18, 71, 1401, 18, 5745, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return """<input type='text' value='%r' size=%s onchange='%s'></input>"""%( self.default_value(), self.__width, self.interact())
return """<input type='text' value="%s" size=%s onchange='%s'></input>"""%( self.html_escaped_default_value(), self.__width, self.interact())
def render(self): """ Render this control as a string.
af50352317ec067da16ec1efe7feeb03b969ea28 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/af50352317ec067da16ec1efe7feeb03b969ea28/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 6987, 333, 3325, 487, 279, 533, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 6987, 333, 3325, 487, 279, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
("unable to create zip file '%s': " + "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % zip_filename
("unable to create zip file '%s': " "could neither import the 'zipfile' module nor " "find a standalone zip utility") % zip_filename
def make_zipfile (base_name, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the InfoZIP "zip" utility (if installed and found on the default search path) or the "zipfile" Python module (if available). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. """ # This initially assumed the Unix 'zip' utility -- but # apparently InfoZIP's zip.exe works the same under Windows, so # no changes needed! zip_filename = base_name + ".zip" mkpath(os.path.dirname(zip_filename), dry_run=dry_run) try: spawn(["zip", "-rq", zip_filename, base_dir], dry_run=dry_run) except DistutilsExecError: # XXX really should distinguish between "couldn't find # external 'zip' command" and "zip failed" -- shouldn't try # again in the latter case. (I think fixing this will # require some cooperation from the spawn module -- perhaps # a utility function to search the path, so we can fallback # on zipfile.py without the failed spawn.) try: import zipfile except ImportError: raise DistutilsExecError, \ ("unable to create zip file '%s': " + "could neither find a standalone zip utility nor " + "import the 'zipfile' module") % zip_filename log.info("creating '%s' and adding '%s' to it", zip_filename, base_dir) def visit (z, dirname, names): for name in names: path = os.path.normpath(os.path.join(dirname, name)) if os.path.isfile(path): z.write(path, path) if not dry_run: z = zipfile.ZipFile(zip_filename, "w", compression=zipfile.ZIP_DEFLATED) os.path.walk(base_dir, visit, z) z.close() return zip_filename
79143f726d00f332dcf828c4e1d6bd2349e7bc00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/79143f726d00f332dcf828c4e1d6bd2349e7bc00/archive_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4450, 768, 261, 1969, 67, 529, 16, 1026, 67, 1214, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 4672, 3536, 1684, 279, 3144, 585, 628, 777, 326, 1390, 3613, 296, 1969, 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, 1221, 67, 4450, 768, 261, 1969, 67, 529, 16, 1026, 67, 1214, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 4672, 3536, 1684, 279, 3144, 585, 628, 777, 326, 1390, 3613, 296, 1969, 67...
execfile(os.path.join(datadir, 'tests', '_default.py'), params)
execfile(join_path(datadir, 'tests', '_default.py'), params)
def test(self): """Process self.configfile.""" os.chdir(testroot) # Keyword parameters for publish_file: params = {} # Initialize 'settings_overrides' for test settings scripts, # and disable configuration files: params['settings_overrides'] = {'_disable_config': 1} # Read the variables set in the default config file and in # the current config file into params: execfile(os.path.join(datadir, 'tests', '_default.py'), params) execfile(self.configfile, params) # Check for required settings: assert params.has_key('test_source'),\ "No 'test_source' supplied in " + self.configfile assert params.has_key('test_destination'),\ "No 'test_destination' supplied in " + self.configfile # Set source_path and destination_path if not given: params.setdefault('source_path', os.path.join(datadir, 'input', params['test_source'])) # Path for actual output: params.setdefault('destination_path', os.path.join(datadir, 'output', params['test_destination'])) # Path for expected output: expected_path = os.path.join(datadir, 'expected', params['test_destination']) # test_source and test_destination aren't needed any more: del params['test_source'] del params['test_destination'] # Delete private stuff like params['__builtins__']: for key in params.keys(): if key.startswith('_'): del params[key] # Get output (automatically written to the output/ directory # by publish_file): output = docutils.core.publish_file(**params) # Get the expected output *after* writing the actual output. self.assert_(os.access(expected_path, os.R_OK),\ 'Cannot find expected output at\n' + expected_path) expected = open(expected_path).read() diff = ('Please compare the expected and actual output files:\n' 'diff %s %s\n' % (expected_path, params['destination_path'])) try: self.assertEquals(output, expected, diff) except AssertionError: if hasattr(difflib, 'unified_diff'): # Generate diff if unified_diff available: diff = ''.join( difflib.unified_diff(expected.splitlines(1), output.splitlines(1), expected_path, params['destination_path'])) print >>sys.stderr, '\n%s:' % (self,) print >>sys.stderr, diff raise
897dca2b1aba044313037b1f074a1f74fcf0903d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/897dca2b1aba044313037b1f074a1f74fcf0903d/test_functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 3536, 2227, 365, 18, 1425, 768, 12123, 1140, 18, 343, 1214, 12, 3813, 3085, 13, 468, 18317, 1472, 364, 3808, 67, 768, 30, 859, 273, 2618, 468, 9190, 296, 4272, 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, 1842, 12, 2890, 4672, 3536, 2227, 365, 18, 1425, 768, 12123, 1140, 18, 343, 1214, 12, 3813, 3085, 13, 468, 18317, 1472, 364, 3808, 67, 768, 30, 859, 273, 2618, 468, 9190, 296, 4272, 67...
if frame.filename != self.editor.get_current().buffer:
if frame.filename != self.editor.get_current().filename:
def evt_debuggerframe(self, frame): if not frame.filename.startswith('<'): if frame.filename != self.editor.get_current().buffer: self.do_edit('openfile', frame.filename) self.do_edit('gotoline', frame.lineno - 1)
433e33b4036784657d10ac4ef569df1b471598cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/433e33b4036784657d10ac4ef569df1b471598cf/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6324, 67, 4148, 693, 3789, 12, 2890, 16, 2623, 4672, 309, 486, 2623, 18, 3459, 18, 17514, 1918, 2668, 32, 11, 4672, 309, 2623, 18, 3459, 480, 365, 18, 9177, 18, 588, 67, 2972, 7675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6324, 67, 4148, 693, 3789, 12, 2890, 16, 2623, 4672, 309, 486, 2623, 18, 3459, 18, 17514, 1918, 2668, 32, 11, 4672, 309, 2623, 18, 3459, 480, 365, 18, 9177, 18, 588, 67, 2972, 7675, ...
for child in self.getChildren(): child.signal_change(needsSave=False)
if self.isContainerItem: self.children_signal_change()
def pauseUpload(self): if self.downloader: self.downloader.pauseUpload() for child in self.getChildren(): child.signal_change(needsSave=False)
f2643ee755fe70dc4186aa98966454608a7ac1cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/f2643ee755fe70dc4186aa98966454608a7ac1cc/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11722, 4777, 12, 2890, 4672, 309, 365, 18, 2378, 6714, 30, 365, 18, 2378, 6714, 18, 19476, 4777, 1435, 364, 1151, 316, 365, 18, 588, 4212, 13332, 1151, 18, 10420, 67, 3427, 12, 20600, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11722, 4777, 12, 2890, 4672, 309, 365, 18, 2378, 6714, 30, 365, 18, 2378, 6714, 18, 19476, 4777, 1435, 364, 1151, 316, 365, 18, 588, 4212, 13332, 1151, 18, 10420, 67, 3427, 12, 20600, ...
self.assertEqual(mf.read(2**16), 2**16 * "m")
self.assertEqual(mf.read(2**16), 2**16 * b"m")
def test_entire_file(self): # test mapping of entire file by passing 0 for map length if hasattr(os, "stat"): f = open(TESTFN, "w+")
3c5b3f3090b6007274572d236a3d5ae5856203ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3c5b3f3090b6007274572d236a3d5ae5856203ec/test_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 319, 577, 67, 768, 12, 2890, 4672, 468, 1842, 2874, 434, 7278, 585, 635, 9588, 374, 364, 852, 769, 309, 3859, 12, 538, 16, 315, 5642, 6, 4672, 284, 273, 1696, 12, 16961, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 319, 577, 67, 768, 12, 2890, 4672, 468, 1842, 2874, 434, 7278, 585, 635, 9588, 374, 364, 852, 769, 309, 3859, 12, 538, 16, 315, 5642, 6, 4672, 284, 273, 1696, 12, 16961, 19...
out.append([ext,match.group()])
out.append([ext,match.group(1)])
def get_fulltext_urls_from_html_page(htmlpagebody): """Parses htmlpagebody data looking for url_directs referring to probable fulltexts. Returns an array of (ext,url_direct) to fulltexts. Note: it looks for file format extensions as defined by global 'conv_programs'structure. """ out = [] for ext in conv_programs.keys(): expr = sre.compile( r"\"(http://[\w]+\.+[\w]+[^\"'><]*\.)(" + \ ext + r")\"") match = expr.search(htmlpagebody) if match: out.append([ext,match.group()]) else: # FIXME: workaround for getfile, should use bibdoc tables expr_getfile = sre.compile(r"\"(http://.*getfile\.py\?.*format=" + ext + r"&version=.*)\"") match = expr_getfile.search(htmlpagebody) if match: out.append([ext,match.group()]) return out
561825a6b79fb9a0227b867de758f582751b04a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/561825a6b79fb9a0227b867de758f582751b04a3/bibindex_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2854, 955, 67, 10518, 67, 2080, 67, 2620, 67, 2433, 12, 2620, 2433, 3432, 4672, 3536, 6656, 1729, 2433, 3432, 501, 7849, 364, 880, 67, 7205, 87, 1278, 20245, 358, 3137, 429, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2854, 955, 67, 10518, 67, 2080, 67, 2620, 67, 2433, 12, 2620, 2433, 3432, 4672, 3536, 6656, 1729, 2433, 3432, 501, 7849, 364, 880, 67, 7205, 87, 1278, 20245, 358, 3137, 429, 1...
o += 10+size if name in frames: asbpi += 1 bpioff = o - len(data)
o += 10 + size if name in frames: asbpi += 1 else: bpioff = o - len(data)
def __determine_bpi(self, data, frames): if self.version < (2,4,0): return int # have to special case whether to use bitpaddedints here # spec says to use them, but iTunes has it wrong
26991618fd7a29f803f9850c6bbbafd6fe6cb6f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1845/26991618fd7a29f803f9850c6bbbafd6fe6cb6f2/id3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 24661, 67, 70, 7259, 12, 2890, 16, 501, 16, 7793, 4672, 309, 365, 18, 1589, 411, 261, 22, 16, 24, 16, 20, 4672, 327, 509, 468, 1240, 358, 4582, 648, 2856, 358, 999, 2831, 6982,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 24661, 67, 70, 7259, 12, 2890, 16, 501, 16, 7793, 4672, 309, 365, 18, 1589, 411, 261, 22, 16, 24, 16, 20, 4672, 327, 509, 468, 1240, 358, 4582, 648, 2856, 358, 999, 2831, 6982,...
if self.HP == 0: self.myImage.hide() self.explode() base.disableParticles() self.engineSound.stop() self.MusicSound.setVolume(0.5) else: self.myImage.hide() self.explode() base.disableParticles() self.engineSound.stop() self.MusicSound.setVolume(0.5)
else: self.myImage.hide() self.explode() base.disableParticles() self.engineSound.stop() self.MusicSound.setVolume(0.5)
def evtHit(self, entry): #Function that controls the event when the airplane hit something
582ad02b5f51a576d9969a615e9d4f9ba467cba2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4878/582ad02b5f51a576d9969a615e9d4f9ba467cba2/Gaivota.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6324, 13616, 12, 2890, 16, 1241, 4672, 468, 2083, 716, 11022, 326, 871, 1347, 326, 23350, 21314, 6800, 5943, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6324, 13616, 12, 2890, 16, 1241, 4672, 468, 2083, 716, 11022, 326, 871, 1347, 326, 23350, 21314, 6800, 5943, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
test_exc('%d', '1', TypeError, "int argument required") test_exc('%g', '1', TypeError, "float argument required")
test_exc('%d', '1', TypeError, None) test_exc('%g', '1', TypeError, None)
def test_exc(formatstr, args, exception, excmsg): try: testformat(formatstr, args) except exception, exc: if str(exc) == excmsg: if verbose: print "yes" else: if verbose: print 'no' print 'Unexpected ', exception, ':', repr(str(exc)) except: if verbose: print 'no' print 'Unexpected exception' raise else: raise TestFailed, 'did not get expected exception: %s' % excmsg
4684b7b6c428b33d944f407a4ec4281276288721 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/4684b7b6c428b33d944f407a4ec4281276288721/test_format.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10075, 12, 2139, 701, 16, 833, 16, 1520, 16, 3533, 3576, 4672, 775, 30, 1842, 2139, 12, 2139, 701, 16, 833, 13, 1335, 1520, 16, 3533, 30, 309, 609, 12, 10075, 13, 422, 3533...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10075, 12, 2139, 701, 16, 833, 16, 1520, 16, 3533, 3576, 4672, 775, 30, 1842, 2139, 12, 2139, 701, 16, 833, 13, 1335, 1520, 16, 3533, 30, 309, 609, 12, 10075, 13, 422, 3533...
es.delayed(0, 'kickid %i' % userid)
es.delayed(0, 'kickid %s' % userid)
def setupSpawnMaker(self): for tSpawn in es.createentitylist('info_player_terrorist').keys(): es.server.cmd('es_xremove %i' % tSpawn) for ctSpawn in es.createentitylist('info_player_counterterrorist').keys(): es.server.cmd('es_xremove %i' % ctSpawn) userid = es.getuserid() fakeBot = 0 if not userid: userid = es.createbot('spawnmaker') fakeBot = 1 # es.server.cmd('es_xfire %i info_player_terrorist Kill; es_xfire %i info_player_counterterrorist Kill' % (userid, userid)) randomPoints = self.spawnPoints[:] random.shuffle(randomPoints) teamSpawn = 'info_player_terrorist' while randomPoints: sp = randomPoints.pop(0) currentPoint = vecmath.vector(sp[0], sp[1], sp[2]) for cp in randomPoints: comparePoint = vecmath.vector(cp[0], cp[1], cp[2]) distance = vecmath.distance(currentPoint, comparePoint) if distance < 100: continue textFormat = 'es_xsetpos %i %s %s %s;' % (userid, sp[0], sp[1], sp[2]) textFormat += 'es_xsetang %d 0 %s;' % (userid, sp[4]) textFormat += 'es_xgive %i %s' % (userid, teamSpawn) es.server.cmd(textFormat) teamSpawn = 'info_player_terrorist' if teamSpawn != 'info_player_terrorist' else 'info_player_counterterrorist' if fakeBot: es.delayed(0, 'kickid %i' % userid)
da67f8f3bb609f62dedc87fdb55879e38abbfe2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/da67f8f3bb609f62dedc87fdb55879e38abbfe2b/spawnpointlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 3389, 9533, 12373, 12, 2890, 4672, 364, 268, 3389, 9533, 316, 5001, 18, 2640, 1096, 1098, 2668, 1376, 67, 14872, 67, 88, 1636, 376, 16063, 2452, 13332, 5001, 18, 3567, 18, 4172, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 3389, 9533, 12373, 12, 2890, 4672, 364, 268, 3389, 9533, 316, 5001, 18, 2640, 1096, 1098, 2668, 1376, 67, 14872, 67, 88, 1636, 376, 16063, 2452, 13332, 5001, 18, 3567, 18, 4172, 26...
elif np.issubdtype(image.dtype, bool):
elif image.dtype.kind == 'b':
def index_lookup(index_i, index_j, image, table, iterations=None): '''Perform a table lookup for only the indexed pixels For morphological operations that only convert 1 to 0, the set of resulting pixels is always a subset of the input set. Therefore, when repeating, it will be faster to operate only on the subsets especially when the results are 1-d or 0-d objects. This function returns a new index_i and index_j array of the pixels that survive the operation. The image is modified in-place to remove the pixels that did not survive. index_i - an array of row indexes into the image. index_j - a similarly-shaped array of column indexes. image - the binary image: *NOTE* add a row and column of border values to the original image to account for pixels on the edge of the image. iterations - # of iterations to do, default is "forever" The idea of index_lookup was taken from http://blogs.mathworks.com/steve/2008/06/13/performance-optimization-for-applylut/ which, apparently, is how Matlab achieved its bwmorph speedup. ''' if iterations == None: # Worst case - remove one per iteration iterations = len(index_i) for i in range(iterations): hit_count = len(index_i) indexer = np.ones(index_i.shape, int) * 2**4 # get the middle for free if np.issubdtype(image.dtype, int): # # For integers, an adjacent point is "background" if it # doesn't match the integer value. This lets adjacent labeled # objects shrink independently of each other. # indexer[image[index_i-1, index_j-1]==image[index_i,index_j]]+=2**0 indexer[image[index_i-1, index_j]==image[index_i,index_j]] +=2**1 indexer[image[index_i-1, index_j+1]==image[index_i,index_j]]+=2**2 indexer[image[index_i, index_j-1]==image[index_i,index_j]] +=2**3 # we did 2**4 already indexer[image[index_i, index_j+1]==image[index_i,index_j]] +=2**5 indexer[image[index_i+1, index_j-1]==image[index_i,index_j]]+=2**6 indexer[image[index_i+1, index_j]==image[index_i,index_j]] +=2**7 indexer[image[index_i+1, index_j+1]==image[index_i,index_j]]+=2**8 elif np.issubdtype(image.dtype, bool): indexer[image[index_i-1, index_j-1]] += 2**0 indexer[image[index_i-1, index_j]] += 2**1 indexer[image[index_i-1, index_j+1]] += 2**2 indexer[image[index_i, index_j-1]] += 2**3 # we did 2**4 already indexer[image[index_i, index_j+1]] += 2**5 indexer[image[index_i+1, index_j-1]] += 2**6 indexer[image[index_i+1, index_j]] += 2**7 indexer[image[index_i+1, index_j+1]] += 2**8 else: raise ValueError("Unsupported dtype: %s"%image.dtype) hits = table[indexer] not_hits = ~hits image[index_i[not_hits], index_j[not_hits]] = False index_i = index_i[hits] index_j = index_j[hits] if len(index_i) == hit_count: break return (index_i, index_j)
1357a6b0b1aab5dd86f856f2276af34dcd24b084 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2870/1357a6b0b1aab5dd86f856f2276af34dcd24b084/cpmorphology.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 67, 8664, 12, 1615, 67, 77, 16, 770, 67, 78, 16, 1316, 16, 1014, 16, 11316, 33, 7036, 4672, 9163, 4990, 279, 1014, 3689, 364, 1338, 326, 8808, 8948, 225, 2457, 14354, 18224, 5295,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 67, 8664, 12, 1615, 67, 77, 16, 770, 67, 78, 16, 1316, 16, 1014, 16, 11316, 33, 7036, 4672, 9163, 4990, 279, 1014, 3689, 364, 1338, 326, 8808, 8948, 225, 2457, 14354, 18224, 5295,...
iq.swapAttribs("to", "from")
iq.swapAttributeValues("to", "from")
def onActivateStream(self, iq): sid = hashSID(iq.query["sid"], iq["from"], str(iq.query.activate))
6f1bbcc313689a1392d118e8a025dcdd576189e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3999/6f1bbcc313689a1392d118e8a025dcdd576189e6/proxy65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 21370, 1228, 12, 2890, 16, 24288, 4672, 7348, 273, 1651, 30287, 12, 18638, 18, 2271, 9614, 7453, 6, 6487, 24288, 9614, 2080, 6, 6487, 609, 12, 18638, 18, 2271, 18, 10014, 3719, 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, 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, 21370, 1228, 12, 2890, 16, 24288, 4672, 7348, 273, 1651, 30287, 12, 18638, 18, 2271, 9614, 7453, 6, 6487, 24288, 9614, 2080, 6, 6487, 609, 12, 18638, 18, 2271, 18, 10014, 3719, 2, ...
def nooutput(*args): pass
def shortDescription(self): return "Doctest: " + self._dt_test.name
3a3817f506801e4a1e62d8cd52e1c8aa0feb2993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a3817f506801e4a1e62d8cd52e1c8aa0feb2993/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 3291, 12, 2890, 4672, 327, 315, 3244, 299, 395, 30, 315, 397, 365, 6315, 7510, 67, 3813, 18, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 3291, 12, 2890, 4672, 327, 315, 3244, 299, 395, 30, 315, 397, 365, 6315, 7510, 67, 3813, 18, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if e.errno == 111:
if e.args[0] == 111:
def execute(connector, method, *args): res = False try: res = getattr(connector,method)(*args) except socket.error,e: if e.errno == 111: print 'Please wait %d sec to start server....'%(waittime) time.sleep(waittime) res = execute(connector, method, *args) else: raise e return res
f404cafca82a06730f3e21335005639e18f5722e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/f404cafca82a06730f3e21335005639e18f5722e/base_quality_interrogation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 23159, 16, 707, 16, 380, 1968, 4672, 400, 273, 1083, 775, 30, 400, 273, 3869, 12, 23159, 16, 2039, 21433, 14, 1968, 13, 1335, 2987, 18, 1636, 16, 73, 30, 309, 425, 18, 1968...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 23159, 16, 707, 16, 380, 1968, 4672, 400, 273, 1083, 775, 30, 400, 273, 3869, 12, 23159, 16, 2039, 21433, 14, 1968, 13, 1335, 2987, 18, 1636, 16, 73, 30, 309, 425, 18, 1968...
justify=CENTER, font=(font1,16))
justify=CENTER, font=(font1,14))
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,idsec,loopall,ntr0 tsec=time.time() + 0.1*idsec utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 120 try: ftx.set(float(sftx.get())) except: pass isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) ldate.configure(text=t) root_geom=root.geometry() utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 try: if options.dBm.get()!=ndbm0: ndbm0=options.dBm.get() options.dbm_balloon() except: pass put_params()
efc0c19597937c0feb243184c7e8c94b1d7250db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2394/efc0c19597937c0feb243184c7e8c94b1d7250db/wspr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 381, 16, 84, 381, 16, 82, 1966, 81, 20, 16, 82, 3321, 20, 16, 69, 16, 521, 15847, 16, 2338, 1938, 1787, 16, 2704, 3404, 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, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 381, 16, 84, 381, 16, 82, 1966, 81, 20, 16, 82, 3321, 20, 16, 69, 16, 521, 15847, 16, 2338, 1938, 1787, 16, 2704, 3404, 16...
return bdb.Bdb.canonic(fname)
return bdb.Bdb.canonic(self, fname)
def canonic(self, fname): if fname[0]=='<': return fname return bdb.Bdb.canonic(fname)
709b38a12ae8fc3ef6589488e6792d88d2195cf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/709b38a12ae8fc3ef6589488e6792d88d2195cf7/adb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 15506, 12, 2890, 16, 5299, 4672, 309, 5299, 63, 20, 65, 18920, 32, 4278, 327, 5299, 327, 324, 1966, 18, 38, 1966, 18, 4169, 15506, 12, 12749, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 15506, 12, 2890, 16, 5299, 4672, 309, 5299, 63, 20, 65, 18920, 32, 4278, 327, 5299, 327, 324, 1966, 18, 38, 1966, 18, 4169, 15506, 12, 12749, 13, 2, -100, -100, -100, -100, -100, ...
defer = opensips.update(call_id = self.call_id, from_tag = from_tag, from_uri = from_uri, to_uri = to_uri, cseq = cseq, user_agent = party.user_agent, media = party.get_media(use_old_hold), type = type, dialog_id = "12345:67890")
defer = opensips.update(call_id = self.call_id, from_tag = from_tag, to_tag = to_tag, from_uri = from_uri, to_uri = to_uri, cseq = cseq, user_agent = party.user_agent, media = party.get_media(use_old_hold), type = type, dialog_id = "12345:67890")
def do_update(self, opensips, party, type, is_final, use_old_hold=False): party, other = self._get_parties(party) if type == "request": from_tag = party.tag to_tag = other.tag from_uri = party.sip_uri to_uri = other.sip_uri cseq = party.cseq else: from_tag = other.tag to_tag = party.tag from_uri = other.sip_uri to_uri = party.sip_uri cseq = other.cseq if is_final: defer = opensips.update(call_id = self.call_id, from_tag = from_tag, to_tag = to_tag, from_uri = from_uri, to_uri = to_uri, cseq = cseq, user_agent = party.user_agent, media = party.get_media(use_old_hold), type = type, dialog_id = "12345:67890") else: defer = opensips.update(call_id = self.call_id, from_tag = from_tag, from_uri = from_uri, to_uri = to_uri, cseq = cseq, user_agent = party.user_agent, media = party.get_media(use_old_hold), type = type, dialog_id = "12345:67890") if is_final: if type == "request": party.cseq += 1 else: other.cseq += 1 return defer
3ea0b2b8cb771a26ed356707bfad7bcdff39742b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3445/3ea0b2b8cb771a26ed356707bfad7bcdff39742b/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2725, 12, 2890, 16, 10400, 7146, 16, 18285, 16, 618, 16, 353, 67, 6385, 16, 999, 67, 1673, 67, 21056, 33, 8381, 4672, 18285, 16, 1308, 273, 365, 6315, 588, 67, 2680, 606, 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, 741, 67, 2725, 12, 2890, 16, 10400, 7146, 16, 18285, 16, 618, 16, 353, 67, 6385, 16, 999, 67, 1673, 67, 21056, 33, 8381, 4672, 18285, 16, 1308, 273, 365, 6315, 588, 67, 2680, 606, 12...
failures.add(test)
text_failures.add(test)
def _CalculateRegressions(self): """Calculate regressions from this run through the layout tests.""" worklist = self._test_files.copy()
eb87b772677cbd4d72d1f53820249c6194c8d75b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/eb87b772677cbd4d72d1f53820249c6194c8d75b/compare_failures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8695, 1617, 663, 1115, 12, 2890, 4672, 3536, 8695, 960, 663, 1115, 628, 333, 1086, 3059, 326, 3511, 7434, 12123, 1440, 1098, 273, 365, 6315, 3813, 67, 2354, 18, 3530, 1435, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8695, 1617, 663, 1115, 12, 2890, 4672, 3536, 8695, 960, 663, 1115, 628, 333, 1086, 3059, 326, 3511, 7434, 12123, 1440, 1098, 273, 365, 6315, 3813, 67, 2354, 18, 3530, 1435, 2, -100,...
else:
else:
def __init__(self, host, port=None, strict=None, timeout=90, key=None, cert=None, ca=None):
d277598beb3f55fdfe5a905a653a830845eff768 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/d277598beb3f55fdfe5a905a653a830845eff768/Proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 1756, 33, 7036, 16, 5490, 33, 7036, 16, 2021, 33, 9349, 16, 498, 33, 7036, 16, 3320, 33, 7036, 16, 3474, 33, 7036, 4672, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 1756, 33, 7036, 16, 5490, 33, 7036, 16, 2021, 33, 9349, 16, 498, 33, 7036, 16, 3320, 33, 7036, 16, 3474, 33, 7036, 4672, 2, -100, -100, -100,...
self.ignore_local_hold = True
def _NH_SIPApplicationGotInput(self, notification): engine = Engine() notification_center = NotificationCenter() settings = SIPSimpleSettings() if notification.data.input == '\x04': if self.active_session is not None: self.output.put('Ending audio session...\n') self.active_session.end() elif self.outgoing_session is not None: self.output.put('Cancelling audio session...\n') self.outgoing_session.end() else: self.stop() elif notification.data.input == '?': self.print_help() elif notification.data.input in ('y', 'n') and self.incoming_sessions: session = self.incoming_sessions.pop(0) if notification.data.input == 'y': session.accept([stream for stream in session.proposed_streams if isinstance(stream, AudioStream)]) else: session.reject() elif notification.data.input == 'm': self.voice_conference_bridge.muted = not self.voice_conference_bridge.muted self.output.put('The microphone is now %s\n' % ('muted' if self.voice_conference_bridge.muted else 'unmuted')) elif notification.data.input == 'h': if self.active_session is not None: self.output.put('Ending audio session...\n') self.active_session.end() elif self.outgoing_session is not None: self.output.put('Cancelling audio session...\n') self.outgoing_session.end() elif notification.data.input == ' ': if self.active_session is not None: if self.active_session.on_hold: self.active_session.unhold() else: self.active_session.hold() elif notification.data.input in ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '#', 'A', 'B', 'C', 'D'): if self.active_session is not None: try: audio_stream = self.active_session.streams[0] except IndexError: pass else: audio_stream.send_dtmf(notification.data.input) if self.voice_tone_generator is None: self.voice_tone_generator = ToneGenerator(self.voice_conference_bridge) self.voice_tone_generator.start() self.voice_conference_bridge.connect_slots(self.voice_tone_generator.slot, 0) notification_center.add_observer(self, sender=self.voice_tone_generator) self.voice_tone_generator.play_dtmf(notification.data.input) elif notification.data.input in ('\x1b[A', '\x1b[D') and len(self.started_sessions) > 0: # UP and LEFT if self.active_session is None: self.active_session = self.started_sessions[0] self.active_session.unhold() self.ignore_local_unhold = True elif len(self.started_sessions) > 1: self.active_session.hold() self.active_session = self.started_sessions[self.started_sessions.index(self.active_session)-1] self.active_session.unhold() self.ignore_local_hold = True self.ignore_local_unhold = True else: return identity = str(self.active_session.remote_identity.uri) if self.active_session.remote_identity.display_name: identity = '"%s" <%s>' % (self.active_session.remote_identity.display_name, identity) self.output.put('Active audio session: "%s" (%d/%d)\n' % (identity, self.started_sessions.index(self.active_session)+1, len(self.started_sessions))) elif notification.data.input in ('\x1b[B', '\x1b[C') and len(self.started_sessions) > 0: # DOWN and RIGHT if self.active_session is None: self.active_session = self.started_sessions[0] self.active_session.unhold() self.ignore_local_unhold = True elif len(self.started_sessions) > 1: self.active_session.hold() self.active_session = self.started_sessions[(self.started_sessions.index(self.active_session)+1) % len(self.started_sessions)] self.active_session.unhold() self.ignore_local_hold = True self.ignore_local_unhold = True else: return identity = str(self.active_session.remote_identity.uri) if self.active_session.remote_identity.display_name: identity = '"%s" <%s>' % (self.active_session.remote_identity.display_name, identity) self.output.put('Active audio session: "%s" (%d/%d)\n' % (identity, self.started_sessions.index(self.active_session)+1, len(self.started_sessions))) elif notification.data.input in ('<', ','): new_tail_length = self.voice_conference_bridge.ec_tail_length - 10 if new_tail_length < 0: new_tail_length = 0 if new_tail_length != self.voice_conference_bridge.ec_tail_length: self.voice_conference_bridge.set_sound_devices(self.voice_conference_bridge.input_device, self.voice_conference_bridge.output_device, new_tail_length) self.output.put('Set echo cancellation tail length to %d ms\n' % self.voice_conference_bridge.ec_tail_length) elif notification.data.input in ('>', '.'): new_tail_length = self.voice_conference_bridge.ec_tail_length + 10 if new_tail_length > 500: new_tail_length = 500 if new_tail_length != self.voice_conference_bridge.ec_tail_length: self.voice_conference_bridge.set_sound_devices(self.voice_conference_bridge.input_device, self.voice_conference_bridge.output_device, new_tail_length) self.output.put('Set echo cancellation tail length to %d ms\n' % self.voice_conference_bridge.ec_tail_length) elif notification.data.input == 'r': if self.active_session is None or not self.active_session.streams: return session = self.active_session audio_stream = self.active_session.streams[0] if audio_stream.recording_active: audio_stream.stop_recording() else: audio_stream.start_recording() elif notification.data.input == 'p': if self.rtp_statistics is None: self.rtp_statistics = RTPStatisticsThread(self) self.rtp_statistics.start() self.output.put('Output of RTP statistics on console is now activated\n') else: self.rtp_statistics.stop() self.rtp_statistics = None self.output.put('Output of RTP statistics on console is now dectivated\n') elif notification.data.input == 'j': self.logger.pjsip_to_stdout = not self.logger.pjsip_to_stdout engine.log_level = settings.logs.pjsip_level if (self.logger.pjsip_to_stdout or settings.logs.trace_pjsip) else 0 self.output.put('PJSIP tracing to console is now %s\n' % ('activated' if self.logger.pjsip_to_stdout else 'deactivated')) elif notification.data.input == 'n': self.logger.notifications_to_stdout = not self.logger.notifications_to_stdout self.output.put('Notification tracing to console is now %s.\n' % ('activated' if self.logger.notifications_to_stdout else 'deactivated')) elif notification.data.input == 's': self.logger.sip_to_stdout = not self.logger.sip_to_stdout engine.trace_sip = self.logger.sip_to_stdout or settings.logs.trace_sip self.output.put('SIP tracing to console is now %s\n' % ('activated' if self.logger.sip_to_stdout else 'deactivated'))
4de651b3cfcbef33d807eb78f194261b199e86a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/4de651b3cfcbef33d807eb78f194261b199e86a3/sip_audio_session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 17739, 3208, 15617, 1210, 12, 2890, 16, 3851, 4672, 4073, 273, 10507, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, 5784, 2628, 1435, 309, 3851, 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, 50, 44, 67, 17739, 3208, 15617, 1210, 12, 2890, 16, 3851, 4672, 4073, 273, 10507, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, 5784, 2628, 1435, 309, 3851, 18,...
GtkWindow.__init__ (self)
gtk.Window.__init__ (self)
def __init__ (self, configList): GtkWindow.__init__ (self) self.set_title ("DRI Configuration") self.connect ("destroy", mainquit) self.connect ("delete_event", self.exitHandler) self.vbox = GtkVBox() self.paned = GtkHPaned() self.configTree = ConfigTree (configList) self.configTree.show() scrolledWindow = GtkScrolledWindow () scrolledWindow.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) scrolledWindow.add (self.configTree) scrolledWindow.show() self.paned.add1(scrolledWindow) self.paned.show() DataPixmap.window = self self.toolbar = GtkToolbar (ORIENTATION_HORIZONTAL, TOOLBAR_BOTH) self.toolbar.set_button_relief (RELIEF_NONE) self.toolbar.set_space_style (TOOLBAR_SPACE_LINE) self.saveButton = self.toolbar.append_item ( "Save", "Save selected configuration file", "priv", DataPixmap (tb_save_xpm), self.configTree.saveConfig) self.reloadButton = self.toolbar.append_item ( "Reload", "Reload selected configuration file", "priv", DataPixmap (tb_revert_xpm), self.configTree.reloadConfig) self.toolbar.append_space() self.newButton = self.toolbar.append_item ( "New", "Create a new device or application", "priv", DataPixmap (tb_new_xpm), self.configTree.newItem) self.removeButton = self.toolbar.append_item ( "Remove", "Remove selected device or application", "priv", DataPixmap (tb_trash_xpm), self.configTree.removeItem) self.upButton = self.toolbar.append_item ( "Up", "Move selected item up", "priv", DataPixmap (tb_up_arrow_xpm), self.configTree.moveUp) self.downButton = self.toolbar.append_item ( "Down", "Move selected item down", "priv", DataPixmap (tb_down_arrow_xpm), self.configTree.moveDown) self.renameButton = self.toolbar.append_item ( "Rename", "Rename selected application", "priv", DataPixmap (tb_edit_xpm), self.configTree.renameApp) self.toolbar.append_space() self.exitButton = self.toolbar.append_item ( "Exit", "Exit DRI configuration", "priv", DataPixmap (tb_exit_xpm), self.exitHandler) if len(configList) != 0: self.activateConfigButtons (configList[0]) self.toolbar.show() self.vbox.pack_start (self.toolbar, FALSE, TRUE, 0) self.vbox.pack_start (self.paned, TRUE, TRUE, 0) self.vbox.show() self.add (self.vbox) self.curDriverPanel = None self.logo = DataPixmap (drilogo_xpm) self.logo.show() self.paned.add2 (self.logo)
ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 642, 682, 4672, 22718, 18, 3829, 16186, 2738, 972, 261, 2890, 13, 365, 18, 542, 67, 2649, 7566, 40, 2259, 4659, 7923, 365, 18, 3612, 7566, 11662, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 642, 682, 4672, 22718, 18, 3829, 16186, 2738, 972, 261, 2890, 13, 365, 18, 542, 67, 2649, 7566, 40, 2259, 4659, 7923, 365, 18, 3612, 7566, 11662, 3113, ...
assert None == wc.log.debug(wc.LOG_FILTER, "..not applying")
assert None == wc.log.debug(wc.LOG_FILTER, "..not applying (mime %s)" % attrs['mime'])
def applyfilter (filterstage, data, fun, attrs): """ Apply all filters which are registered in the given filter stage. For different filter stages we have different data objects. Look at the filter examples. One can prevent all filtering with the 'nofilter' attribute, or deactivate single filter modules with 'nofilter-<name>', for example 'nofilter-blocker'. """ attrs['filterstage'] = filterstage assert None == wc.log.debug(wc.LOG_FILTER, "Filter (%s) %d bytes in %s..", fun, len(data), filterstage) if attrs.get('nofilter') or (fun != 'finish' and not data): assert None == wc.log.debug(wc.LOG_FILTER, "..don't filter") return data for f in wc.configuration.config['filterlist'][filterstage]: assert None == wc.log.debug(wc.LOG_FILTER, "..filter with %s" % f) if f.applies_to_mime(attrs['mime']) and \ not "nofilter-%s" % str(f).lower() in attrs: assert None == wc.log.debug(wc.LOG_FILTER, "..applying") data = getattr(f, fun)(data, attrs) else: assert None == wc.log.debug(wc.LOG_FILTER, "..not applying") assert None == wc.log.debug(wc.LOG_FILTER, "..result %d bytes", len(data)) return data
6bee2368af6017d77daf44ccfa808d5dc64a6af6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/6bee2368af6017d77daf44ccfa808d5dc64a6af6/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 2188, 261, 2188, 12869, 16, 501, 16, 9831, 16, 3422, 4672, 3536, 5534, 777, 3415, 1492, 854, 4104, 316, 326, 864, 1034, 6009, 18, 2457, 3775, 1034, 20298, 732, 1240, 3775, 501, 218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 2188, 261, 2188, 12869, 16, 501, 16, 9831, 16, 3422, 4672, 3536, 5534, 777, 3415, 1492, 854, 4104, 316, 326, 864, 1034, 6009, 18, 2457, 3775, 1034, 20298, 732, 1240, 3775, 501, 218...
class NewSimpleInverseFull(AnalyticSolution):
class SimpleInverseFull(AnalyticSolution):
def J_G2(self, k, Cterms, **kwargs): """Solution for J_D which is the integral for D in terms of constants C6 and C7.""" C16 = Cterms[15] J_G2 = self.J_general_Ftype(k, C16, 2) return J_G2
ee15cc519616fa2a6464536423e1f8a92f76218e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/ee15cc519616fa2a6464536423e1f8a92f76218e/analyticsolution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 804, 67, 43, 22, 12, 2890, 16, 417, 16, 385, 10112, 16, 2826, 4333, 4672, 3536, 16135, 364, 804, 67, 40, 1492, 353, 326, 21423, 364, 463, 316, 6548, 434, 6810, 385, 26, 471, 385, 27,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 804, 67, 43, 22, 12, 2890, 16, 417, 16, 385, 10112, 16, 2826, 4333, 4672, 3536, 16135, 364, 804, 67, 40, 1492, 353, 326, 21423, 364, 463, 316, 6548, 434, 6810, 385, 26, 471, 385, 27,...
receiver()
receiver(group)
def main(): flags = sys.argv[1:] # if flags: sender(flags[0]) else: receiver()
17d14f52a11edd5b384c807fd75ddfe4b91bf0f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/17d14f52a11edd5b384c807fd75ddfe4b91bf0f3/mcast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2943, 273, 2589, 18, 19485, 63, 21, 26894, 468, 309, 2943, 30, 5793, 12, 7133, 63, 20, 5717, 469, 30, 5971, 12, 1655, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2943, 273, 2589, 18, 19485, 63, 21, 26894, 468, 309, 2943, 30, 5793, 12, 7133, 63, 20, 5717, 469, 30, 5971, 12, 1655, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100,...
del self.results.classifierNames[indx] self.results.numberOfLearners -= 1 for (i, stat) in enumerate(self.stat): del self.scores[i][indx]
for (i, stat) in enumerate(self.stat): del self.scores[i][indx]
def learner(self, learner, id=None): if learner: # a new or updated learner # print 'Add/Upd', learner.name, ", id:", id learner.id = id # remember id's of learners self.test(learner) if self.learners: if id not in [l.id for l in self.learners]: self.learners.append(learner) else: self.learners = [learner] self.applyBtn.setDisabled(FALSE) else: # remove a learner and corresponding results print 'REMOVE', id, 'FROM', self.learners ids = [l.id for l in self.learners] if id not in ids: return # happens if a widget with learner empties the signal first indx = ids.index(id)
18b05cb58f19623683758b8e08c5dad03992b6a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/18b05cb58f19623683758b8e08c5dad03992b6a6/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 884, 24834, 12, 2890, 16, 884, 24834, 16, 612, 33, 7036, 4672, 309, 884, 24834, 30, 468, 279, 394, 578, 3526, 884, 24834, 468, 1172, 296, 986, 19, 3524, 2187, 884, 24834, 18, 529, 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, 884, 24834, 12, 2890, 16, 884, 24834, 16, 612, 33, 7036, 4672, 309, 884, 24834, 30, 468, 279, 394, 578, 3526, 884, 24834, 468, 1172, 296, 986, 19, 3524, 2187, 884, 24834, 18, 529, 16, ...
module_path_prefix=[],
module_prefix_elts=[],
def GenerateAllPython (schema_location=None, namespace=None, module_path_prefix=[], _process_builtins=False): modules = set() if module_path_prefix: binding_module_prefix = module_path_prefix.split('.') else: binding_module_prefix = [] pyxb.namespace.XMLSchema.setModulePath('pyxb.binding.datatypes') if namespace is None: if schema_location is None: raise Exception('No input provided') schema = xs.schema.CreateFromLocation(schema_location) namespace = schema.targetNamespace() nsdep = pyxb.namespace.NamespaceDependencies(namespace) for ns_set in nsdep.namespaceOrder(): pyxb.namespace.ResolveSiblingNamespaces(ns_set) siblings = nsdep.siblingNamespaces() print 'Sibling namesspaces: %s' % (siblings,) used_modules = {} component_namespace_map = {} namespace_component_map = {} for sns in siblings: if (pyxb.namespace.XMLSchema == sns) and (not _process_builtins): continue for c in sns.components(): if (isinstance(c, xs.structures.ElementDeclaration) and c._scopeIsGlobal()) or c.isTypeDefinition(): assert c._schema() is not None, '%s has no schema' % (c._schema(),) assert c._schema().targetNamespace() == sns component_namespace_map[c] = sns namespace_component_map.setdefault(sns, set()).add(c) all_components = component_namespace_map.keys() namespace_module_map = {} unique_in_bindings = set([NamespaceGroupModule._GroupPrefix]) for ns_scc in nsdep.namespaceOrder(): namespace_modules = [] nsg_head = None for ns in ns_scc: if not (ns in namespace_component_map): continue nsm = NamespaceModule(ns, binding_module_prefix, ns_scc, namespace_component_map.get(ns, ns.components())) modules.add(nsm) namespace_module_map[ns] = nsm assert ns == nsm.namespace() if nsg_head is None: nsg_head = nsm.namespaceGroupHead() if nsm.namespace().prefix() is not None: assert nsm.namespace().prefix() is not None, 'No prefix for %s' % (ns,) print 'Prefix store namespace %s' % (nsm.namespace().prefix(),) nsm.setBaseModule(utility.MakeUnique(nsm.namespace().prefix(), unique_in_bindings)) else: print 'None store no prefix' nsm.setBaseModule(None) print '%s stores in %s' % (ns, nsm.modulePath()) namespace_modules.append(nsm) if (nsg_head is not None) and nsg_head.namespaceGroupMulti(): ngm = NamespaceGroupModule(namespace_modules, binding_module_prefix) modules.add(ngm) [ _nsm.setNamespaceGroupModule(ngm) for _nsm in namespace_modules ] assert namespace_module_map[nsg_head.namespace()].namespaceGroupModule() == ngm print 'Group headed by %s stores in %s' % (nsg_head, ngm.modulePath()) schema_module_map = {} for sc_scc in nsdep.schemaOrder(): scg_head = sc_scc[0] nsm = NamespaceModule.ForNamespace(scg_head.targetNamespace()) sgm = None if (nsm is not None) and (nsm.namespaceGroupModule() is not None): sgm = SchemaGroupModule(nsm, sc_scc) modules.add(sgm) print 'Schema group stores in %s: %s' % (sgm.modulePath(), ' '.join([ _s.schemaLocationTag() for _s in sc_scc])) for sc in sc_scc: schema_module_map[sc] = sgm component_graph = utility.Graph() for c in all_components: component_graph.addNode(c) deps = c.dependentComponents() for target in deps: if target in all_components: component_graph.addEdge(c, target) if len(component_graph.sccOrder()) != len(component_graph.nodes()): raise pyxb.SchemaValidationError('Dependency loop in component graph.') component_order = [ _scc[0] for _scc in component_graph.sccOrder() ] element_declarations = [] type_definitions = [] for c in component_order: if isinstance(c, xs.structures.ElementDeclaration) and c._scopeIsGlobal(): nsm = namespace_module_map[component_namespace_map.get(c)] print 'binding %s' % (c.expandedName(),) nsm.bindComponent(c, SchemaGroupModule.ForSchema(c._schema())) element_declarations.append(c) else: type_definitions.append(c) simple_type_definitions = [] complex_type_definitions = [] for td in type_definitions: nsm = namespace_module_map.get(component_namespace_map[td]) assert nsm is not None, 'No namespace module for %s type %s scope %s namespace %s' % (td.expandedName(), type(td), td._scope(), component_namespace_map[td]) module_context = nsm.bindComponent(td, schema_module_map.get(td._schema(), None)) if isinstance(td, xs.structures.SimpleTypeDefinition): _PrepareSimpleTypeDefinition(td, nsm, module_context) simple_type_definitions.append(td) elif isinstance(td, xs.structures.ComplexTypeDefinition): _PrepareComplexTypeDefinition(td, nsm, module_context) complex_type_definitions.append(td) else: assert False, 'Unexpected component type %s' % (type(td),) for std in simple_type_definitions: GenerateSTD(std) for ctd in complex_type_definitions: GenerateCTD(ctd) for ed in element_declarations: GenerateED(ed) return modules
5eacb77c8998fd31b68477e0ec37388e9983b97b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/5eacb77c8998fd31b68477e0ec37388e9983b97b/generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 1595, 15774, 261, 4821, 67, 3562, 33, 7036, 16, 1981, 33, 7036, 16, 1605, 67, 3239, 67, 292, 3428, 22850, 6487, 389, 2567, 67, 12406, 2679, 33, 8381, 4672, 4381, 273, 444, 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, 6654, 1595, 15774, 261, 4821, 67, 3562, 33, 7036, 16, 1981, 33, 7036, 16, 1605, 67, 3239, 67, 292, 3428, 22850, 6487, 389, 2567, 67, 12406, 2679, 33, 8381, 4672, 4381, 273, 444, 1435, ...
if user.contact_set.count() > 0:
if user and user.is_authenticated() and user.contact_set.count() > 0:
def __init__(self, request, paymentmodule, *args, **kwargs): super(ProtxPayShipForm, self).__init__(request, paymentmodule, *args, **kwargs) cf = self.fields['card_holder'] if (not cf.initial) or cf.initial == "": user = request.user if user.contact_set.count() > 0: cf.initial = self.tempContact.full_name self.requires_issue_number = REQUIRES_ISSUE_NUMBER self.fields['year_start'].choices = self.fields['year_expires'].choices
3cef2e3ee0ff8d07029141ac3cdf3e636914d5ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/3cef2e3ee0ff8d07029141ac3cdf3e636914d5ae/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 16, 5184, 2978, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 626, 978, 9148, 26358, 1204, 16, 365, 2934, 972, 2738, 972, 12, 2293, 16, 5184, 2978,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 590, 16, 5184, 2978, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 626, 978, 9148, 26358, 1204, 16, 365, 2934, 972, 2738, 972, 12, 2293, 16, 5184, 2978,...
self.busy_status_label.set_markup('<i>Downloading \'%s\'...</i>' % (self.shell.retrieving))
string = ('<i>Downloading \'%s\'...</i>' % self.shell.retrieving) self.busy_status_label.set_markup(string) self.busy_progress_bar3.set_text('%.1f %% - %.1f kb/s' % (division * 100, kbps))
def alpm_urllib_report_hook(self, blocks_so_far, block_size_bytes, total_size): # magical sleep, without this, guzuta crashes cairo time.sleep(0.02)
0e2af9ea0c3ad00f5a8c4bcd11a7554a8c61e8c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/0e2af9ea0c3ad00f5a8c4bcd11a7554a8c61e8c5/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 718, 2941, 67, 6006, 67, 4476, 12, 2890, 16, 4398, 67, 2048, 67, 31246, 16, 1203, 67, 1467, 67, 3890, 16, 2078, 67, 1467, 4672, 468, 4447, 1706, 5329, 16, 2887, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 718, 2941, 67, 6006, 67, 4476, 12, 2890, 16, 4398, 67, 2048, 67, 31246, 16, 1203, 67, 1467, 67, 3890, 16, 2078, 67, 1467, 4672, 468, 4447, 1706, 5329, 16, 2887, 333, 1...
offset += fn1-last offsetts += fn1ts-lastts if offset else 0
offset += fn1-(last+1) offsetts += fn1ts-lastts if fn1-(last+1) != 0 else 0
def main(): p = optparse.OptionParser(description='Grabs avisynth trims and outputs chapter file, qpfile and/or cuts audio (works with cfr and vfr input)', version='VFR Chapter Creator 0.7.1', usage='%prog [options] infile.avs{}'.format(" [outfile.avs]" if chapparseExists else "")) p.add_option('--label', '-l', action="store", help="Look for a trim() statement only on lines matching LABEL, interpreted as a regular expression. Default: case insensitive trim", dest="label") p.add_option('--input', '-i', action="store", help='Audio file to be cut', dest="input") p.add_option('--output', '-o', action="store", help='Cut audio from MKVMerge', dest="output") p.add_option('--fps', '-f', action="store", help='Frames per second (for cfr input)', dest="fps") p.add_option('--ofps', action="store", help='Output frames per second', dest="ofps") p.add_option('--timecodes', '-t', action="store", help='Timecodes file from the vfr video (v1 needs tcConv)', dest="timecodes") p.add_option('--chapters', '-c', action="store", help='Chapters file [.%s/.txt]' % "/.".join(exts.keys()), dest="chapters") p.add_option('--qpfile', '-q', action="store", help='QPFile for x264 (frame-accurate only if used with final framecount)', dest="qpfile") p.add_option('--verbose', '-v', action="store_true", help='Verbose', dest="verbose") p.add_option('--merge', '-m', action="store_true", help='Merge cut files', dest="merge") p.add_option('--remove', '-r', action="store_true", help='Remove cut files', dest="remove") p.add_option('--frames', action="store", help='Number of frames for v1 conversion', dest="frames") p.add_option('--test', action="store_true", help="Test mode (do not create new files)", dest="test") (o, a) = p.parse_args() if len(a) < 1: p.error("No avisynth script specified.") elif not o.timecodes and os.path.isfile(a[0] + ".tc.txt"): o.timecodes = a[0] + ".tc.txt" elif o.timecodes and o.fps: p.error("Can't use vfr input AND cfr input") elif o.timecodes and o.ofps: p.error("Can't use ofps with vfr input") elif o.timecodes and os.path.isfile(o.timecodes): o.timecodes = o.timecodes else: o.timecodes = o.fps #Determine chapter type if o.chapters: cExt = re.search("\.(%s)" % "|".join(exts.keys()),o.chapters,re.I) chapType = exts[cExt.group(1).lower()] if cExt else "OGM" else: chapType = '' if not o.output and o.input: o.output = '%s.cut.mka' % re.search("(.*)\.\w*$",o.input).group(1) quiet = '' if o.verbose else '-q' audio = [] Trims = [] with open(a[0], "r") as avsfile: # use only the first non-commented line with trims avs = avsfile.readlines() findTrims = re.compile("(?<!#)[^#]*\s*\.?\s*%s\((\d+)\s*,\s*(\d+)\)%s" % (o.label if o.label else "trim","" if o.label else "(?i)")) trimre = re.compile("(?<!#)trim\((\d+)\s*,\s*(\d+)\)(?i)") for line in avs: if findTrims.match(line): Trims = trimre.findall(line) break if len(Trims) < 1: sys.exit("Error: Avisynth script has no uncommented trims") # Look for AssumeFPS if not o.timecodes: for line in avs: if fpsre.search(line): o.timecodes = '/'.join([i for i in fpsre.search(line).groups()]) if o.verbose: print("\nFound AssumeFPS, setting CFR (%s)" % o.timecodes) break if not o.timecodes: o.timecodes = defaultFps if o.verbose: status = "Avisynth file: %s\n" % a[0] status += "Label: %s\n" % o.label if o.label else "" status += "Audio file: %s\n" % o.input if o.input else "" status += "Cut Audio file: %s\n" % o.output if o.output else "" status += "Timecodes/FPS: %s%s\n" % (o.timecodes," to "+o.ofps if o.ofps else "") if o.ofps != o.timecodes else "" status += "Chapters file: %s%s\n" % (o.chapters," (%s)" % chapType if chapType else "") if o.chapters else "" status += "QP file: %s\n" % o.qpfile if o.qpfile else "" status += "\n" status += "Merge/Rem files: %s/%s\n" % (o.merge,o.remove) if o.merge or o.remove else "" status += "Verbose: %s\n" % o.verbose if o.verbose else "" status += "Test Mode: %s\n" % o.test if o.test else "" print(status) print('In trims: %s' % ', '.join(['(%s,%s)' % (i[0],i[1]) for i in Trims])) # trims' offset calculation Trims2 = [] Trims2ts = [] tcType = determineFormat(o.timecodes) tc = o.timecodes if tcType == 2: nTrims = int(o.frames) if o.frames else int(Trims[-1][1])+2 if os.path.isfile(tc+"v2.txt") == False: tcConv = call('"%s" "%s" "%s" %d' % (tcConv, tc, tc+"v2.txt", nTrims)) if tcConv > 0: sys.exit("Failed to execute tcConv: %d; Please put it in your path" % tcConv) o.timecodes = tc+"v2.txt" for i in range(len(Trims)): fn1 = int(Trims[i][0]) # first frame fn1ts = Ts(fn1,tc,tcType)[0] # first frame timestamp fn2 = int(Trims[i][1]) # last frame fn2ts = Ts(fn2,tc,tcType)[0] # last frame timestamp if o.input: fn2tsaud = Ts(fn2+1,tc,tcType) # last frame timestamp for audio if i != 0: # if it's not the first trim last = Trims2[i-1][1]+1 lastts = Trims2ts[i-1][1] offset += fn1-last offsetts += fn1ts-lastts if offset else 0 elif fn1 > 0: # if the first trim doesn't start at 0 offset = fn1 offsetts = fn1ts else: offset = 0 offsetts = 0 # apply the offset to the trims fn1 -= offset fn2 -= offset fn1ts -= offsetts fn2ts -= offsetts # convert fps if --ofps if o.ofps and o.timecodes != o.ofps: fn1 = unTs(fn1ts,o.ofps) fn2 = unTs(fn2ts,o.ofps) # add trims and their timestamps to list Trims2.append([fn1,fn2]) Trims2ts.append([fn1ts,fn2ts]) if o.input: # make list with timecodes to cut audio audio.append(formatTime(fn1ts)) if len(fn2tsaud) == 1: audio.append(formatTime(fn2tsaud[0])) if o.verbose: print('Out trims: %s\n' % ', '.join(['(%s,%s)' % (i[0],i[1]) for i in Trims2])) if o.verbose: print('Out timecodes: %s\n' % ', '.join(['(%s,%s)' % (formatTime(Trims2ts[i][0]), formatTime(Trims2ts[i][1])) for i in range(len(Trims2ts))])) # make qpfile if o.qpfile: if not o.test: with open(o.qpfile, "w") as qpf: for trim in Trims2[1:]: qpf.write('%s K\n' % trim[0]) if o.verbose: print('Writing keyframes to %s\n' % o.qpfile) # make audio cuts if o.input: delayRe = re.search('DELAY ([-]?\d+)',o.input) delay = delayRe.group(1) if delayRe else '0' if Trims2ts[0][0] == 0: includefirst = True audio = audio[1:] else: includefirst = False cuttimes = ','.join(audio) cutCmd = '"%s" -o "%s" --sync 0:%s "%s" --split timecodes:%s %s' % (mkvmerge, o.output + '.split.mka', delay, o.input, cuttimes, quiet) if o.verbose: print('Cutting: %s\n' % cutCmd) if not o.test: cutExec = call(cutCmd) if cutExec == 1: print("Mkvmerge exited with warnings: %d" % cutExec) elif cutExec == 2: sys.exit("Failed to execute mkvmerge: %d" % cutExec) if o.merge: merge = [] for i in range(1,len(audio)+2): if (includefirst == True and i % 2 != 0) or (includefirst == False and i % 2 == 0): merge.append('"%s.split-%03d.mka"' % (o.output, i)) mergeCmd = '"%s" -o "%s" %s %s' % (mkvmerge,o.output, ' +'.join(merge), quiet) if o.verbose: print('\nMerging: %s\n' % mergeCmd) if not o.test: mergeExec = call(mergeCmd) if mergeExec == 1: print("Mkvmerge exited with warnings: %d" % mergeExec) elif mergeExec == 2: sys.exit("Failed to execute mkvmerge: %d" % mergeExec) if o.remove: remove = ['%s.split-%03d.mka' % (o.output, i) for i in range(1,len(audio)+2)] if o.verbose: print('\nDeleting: %s\n' % ', '.join(remove)) if not o.test: [os.unlink(i) if os.path.exists(i) else True for i in remove] # make offseted avs if chapparseExists and len(a) > 1: fNum = [i[0] for i in Trims2] set = {'avs':'"'+a[1]+'"','input':'','resize':''} writeAvisynth(set,fNum) # write chapters if chapType: if chapType == 'MKV': EditionUID = random.randint(10**5,10**6) matroskaXmlHeader = '<?xml version="1.0" encoding="UTF-8"?>\n<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->\n<Chapters>' matroskaXmlEditionHeader = """ <EditionEntry> <EditionFlagHidden>{}</EditionFlagHidden> <EditionFlagDefault>{}</EditionFlagDefault> <EditionFlagOrdered>{}</EditionFlagOrdered> <EditionUID>{}</EditionUID>
7f22bb43d29a43d42eaf4ed1e0e058a00668391e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14863/7f22bb43d29a43d42eaf4ed1e0e058a00668391e/vfr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 293, 273, 2153, 2670, 18, 1895, 2678, 12, 3384, 2218, 14571, 2038, 1712, 291, 878, 451, 2209, 87, 471, 6729, 23580, 585, 16, 22859, 768, 471, 19, 280, 6391, 87, 7447, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 293, 273, 2153, 2670, 18, 1895, 2678, 12, 3384, 2218, 14571, 2038, 1712, 291, 878, 451, 2209, 87, 471, 6729, 23580, 585, 16, 22859, 768, 471, 19, 280, 6391, 87, 7447, ...
while self.stopat is None or self.received < self.stopat: self.lock.acquire() try: m = int(self.receiver.stdout.readline()) assert(m <= self.received) if (m == self.received): self.received += 1 if self.sender: self.sender.notify_received(self.received) finally: self.lock.release()
while self.continue_test(): m = int(self.receiver.stdout.readline()) assert(m <= self.received) if (m == self.received): self.received += 1 if self.sender: self.sender.notify_received(self.received)
def run(self): try: self.received = 0 while self.stopat is None or self.received < self.stopat: self.lock.acquire() try: m = int(self.receiver.stdout.readline()) assert(m <= self.received) # Allow for duplicates if (m == self.received): self.received += 1 if self.sender: self.sender.notify_received(self.received) finally: self.lock.release() except Exception, e: self.error = RethrownException(e, self.receiver.pname)
85861886793b0d4a2bb1abc1f93188667d3a2974 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/197/85861886793b0d4a2bb1abc1f93188667d3a2974/brokertest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 365, 18, 15213, 273, 374, 1323, 365, 18, 5681, 270, 353, 599, 578, 365, 18, 15213, 411, 365, 18, 5681, 270, 30, 365, 18, 739, 18, 1077, 1039, 1435, 775...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 365, 18, 15213, 273, 374, 1323, 365, 18, 5681, 270, 353, 599, 578, 365, 18, 15213, 411, 365, 18, 5681, 270, 30, 365, 18, 739, 18, 1077, 1039, 1435, 775...
(lambda e, argv: (not e.target().startswith("
(lambda e, argv: (not e.target().startswith(" (lambda e, argv: re.match("^
def fortune(c, e, source, file, prefix): sock = open(file) lines = "".join(sock.readlines()).split("\000\n") sock.close() c.privmsg(e.target(), "%s %s" % (prefix, random.choice(lines).replace("\n", ' ').strip()))
a0e1124b720580a35c76d60c09357e6f22d4725c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10627/a0e1124b720580a35c76d60c09357e6f22d4725c/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 364, 88, 7556, 12, 71, 16, 425, 16, 1084, 16, 585, 16, 1633, 4672, 7313, 273, 1696, 12, 768, 13, 2362, 273, 1408, 18, 5701, 12, 15031, 18, 896, 3548, 1435, 2934, 4939, 31458, 3784, 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, 364, 88, 7556, 12, 71, 16, 425, 16, 1084, 16, 585, 16, 1633, 4672, 7313, 273, 1696, 12, 768, 13, 2362, 273, 1408, 18, 5701, 12, 15031, 18, 896, 3548, 1435, 2934, 4939, 31458, 3784, 6...
if not isinstance(other, module.HeckeModule_free_module) or self.ambient() != other.ambient(): return -1 return cmp(self.free_module(), other.free_module())
if not isinstance(other, module.HeckeModule_free_module): return cmp(type(self), type(other)) c = cmp(self.ambient(), other.ambient()) if c: return c else: return cmp(self.free_module(), other.free_module())
def __cmp__(self, other): """ Compare self to other. Returns 0 if self is the same as other, and -1 otherwise.
e7cebce8a77670a519e0d760496430fd83570bcb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/e7cebce8a77670a519e0d760496430fd83570bcb/submodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 3536, 11051, 365, 358, 1308, 18, 2860, 374, 309, 365, 353, 326, 1967, 487, 1308, 16, 471, 300, 21, 3541, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 3536, 11051, 365, 358, 1308, 18, 2860, 374, 309, 365, 353, 326, 1967, 487, 1308, 16, 471, 300, 21, 3541, 18, 2, -100, -100, -100, -100, -100,...
file.Write(" EXPECT_EQ(%s::kCmdId, cmd.header.command);\n" % func.name)
file.Write(" EXPECT_EQ(static_cast<uint32>(%s::kCmdId),\n" % func.name) file.Write(" cmd.header.command);\n")
def WriteFormatTest(self, func, file): """Writes a format test for a command.""" file.Write("TEST(GLES2FormatTest, %s) {\n" % func.name) file.Write(" %s cmd = { 0, };\n" % func.name) file.Write(" void* next_cmd = cmd.Set(\n") file.Write(" &cmd") args = func.GetCmdArgs() value = 11 for arg in args: file.Write(",\n static_cast<%s>(%d)" % (arg.type, value)) value += 1 file.Write(");\n") value = 11 file.Write(" EXPECT_EQ(%s::kCmdId, cmd.header.command);\n" % func.name) func.type_handler.WriteCmdSizeTest(func, file) for arg in args: file.Write(" EXPECT_EQ(static_cast<%s>(%d), cmd.%s);\n" % (arg.type, value, arg.name)) value += 1 file.Write("}\n") file.Write("\n")
022e207e0d45ad5354bd7230d48c4691f72f7e10 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/022e207e0d45ad5354bd7230d48c4691f72f7e10/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1630, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 279, 740, 1842, 364, 279, 1296, 12123, 585, 18, 3067, 2932, 16961, 12, 43, 11386, 22, 1630, 4709, 16, 738, 87, 13, 1889...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1630, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 279, 740, 1842, 364, 279, 1296, 12123, 585, 18, 3067, 2932, 16961, 12, 43, 11386, 22, 1630, 4709, 16, 738, 87, 13, 1889...
self.assertEqual(zlib.crc32(foo), 2486878355)
self.assertEqual(zlib.crc32(foo), -1808088941)
def test_crc32_adler32_unsigned(self): foo = 'abcdefghijklmnop' # explicitly test signed behavior self.assertEqual(zlib.crc32(foo), 2486878355) self.assertEqual(zlib.crc32('spam'), 1138425661) self.assertEqual(zlib.adler32(foo+foo), 3573550353) self.assertEqual(zlib.adler32('spam'), 72286642)
71d22f5f0d1c8954ddff826bf1134f177f8ba140 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/71d22f5f0d1c8954ddff826bf1134f177f8ba140/test_zlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 22988, 1578, 67, 361, 749, 1578, 67, 22297, 12, 2890, 4672, 8431, 273, 296, 28953, 17680, 8302, 16391, 13607, 556, 11, 468, 8122, 1842, 6726, 6885, 365, 18, 11231, 5812, 12, 94...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 22988, 1578, 67, 361, 749, 1578, 67, 22297, 12, 2890, 4672, 8431, 273, 296, 28953, 17680, 8302, 16391, 13607, 556, 11, 468, 8122, 1842, 6726, 6885, 365, 18, 11231, 5812, 12, 94...
res = qname.match(tagname)
if self.__use_namespaces: res = qname.match(tagname) else: res = None
def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracketfind.match(rawdata, i+1) if end is None: return -1 tag = starttagmatch.match(rawdata, i) if tag is None or tag.end(0) != end.end(0): self.syntax_error('garbage in starttag') return end.end(0) nstag = tagname = tag.group('tagname') if not self.__seen_starttag and self.__seen_doctype and \ tagname != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') if self.__seen_starttag and not self.stack: self.syntax_error('multiple elements on top level') k, j = tag.span('attrs') attrdict, nsdict, k = self.parse_attributes(tagname, k, j) self.stack.append((tagname, nsdict, nstag)) res = qname.match(tagname) if res is not None: prefix, nstag = res.group('prefix', 'local') if prefix is None: prefix = '' ns = None for t, d, nst in self.stack: if d.has_key(prefix): ns = d[prefix] if ns is None and prefix != '': ns = self.__namespaces.get(prefix) if ns is not None: nstag = ns + ' ' + nstag elif prefix != '': nstag = prefix + ':' + nstag # undo split self.stack[-1] = tagname, nsdict, nstag # translate namespace of attributes nattrdict = {} for key, val in attrdict.items(): res = qname.match(key) if res is not None: aprefix, key = res.group('prefix', 'local') if aprefix is None: aprefix = '' ans = None for t, d, nst in self.stack: if d.has_key(aprefix): ans = d[aprefix] if ans is None and aprefix != '': ans = self.__namespaces.get(aprefix) if ans is not None: key = ans + ' ' + key elif aprefix != '': key = aprefix + ':' + key elif ns is not None: key = ns + ' ' + key nattrdict[key] = val attrdict = nattrdict attributes = self.attributes.get(nstag) if attributes is not None: for key in attrdict.keys(): if not attributes.has_key(key): self.syntax_error("unknown attribute `%s' in tag `%s'" % (key, tagname)) for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val method = self.elements.get(nstag, (None, None))[0] self.finish_starttag(nstag, attrdict, method) if tag.group('slash') == '/': self.finish_endtag(tagname) return tag.end(0)
66bfd384c219fadeb2a2b6454e314d4e43300b6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/66bfd384c219fadeb2a2b6454e314d4e43300b6a/xmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1937, 2692, 12, 2890, 16, 277, 4672, 1831, 892, 273, 365, 18, 1899, 892, 468, 277, 3143, 358, 787, 434, 1047, 679, 273, 679, 21025, 4720, 18, 1916, 12, 1899, 892, 16, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1937, 2692, 12, 2890, 16, 277, 4672, 1831, 892, 273, 365, 18, 1899, 892, 468, 277, 3143, 358, 787, 434, 1047, 679, 273, 679, 21025, 4720, 18, 1916, 12, 1899, 892, 16, 277, ...
startY -= 1 deltaHeight = 0 height = int(self.hourHeight * (endTime.hour + endTime.minute/60.0) - startY)
deltaY = -1 days = (endTime.date() - startTime.date()).days height = int(self.hourHeight * (24 * days + endTime.hour + endTime.minute/60.0) - startY)
def MakeRectForRange(self, startTime, endTime): """ Turn a datetime range into a single rectangle that can be drawn on the screen """ startX, startY, width = self.getPositionFromDateTime(startTime) deltaHeight = 1 if IS_MAC: startY -= 1 deltaHeight = 0 height = int(self.hourHeight * (endTime.hour + endTime.minute/60.0) - startY) height = max(height, self.hourHeight / 2 + self.hourHeight % 2) return wx.Rect(startX, startY, width+1, height+deltaHeight)
ccac59343e820e8a9133ac1ae6188c94196b0a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ccac59343e820e8a9133ac1ae6188c94196b0a6e/TimedCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 6120, 1290, 2655, 12, 2890, 16, 8657, 16, 13859, 4672, 3536, 22425, 279, 3314, 1048, 1368, 279, 2202, 11845, 716, 848, 506, 19377, 603, 326, 5518, 3536, 787, 60, 16, 787, 61, 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, 4344, 6120, 1290, 2655, 12, 2890, 16, 8657, 16, 13859, 4672, 3536, 22425, 279, 3314, 1048, 1368, 279, 2202, 11845, 716, 848, 506, 19377, 603, 326, 5518, 3536, 787, 60, 16, 787, 61, 16, ...
if downloader is self._downloader:
if downloader is self.downloader:
def set_downloader(self, downloader): if self.downloader_id is not None: if downloader is self._downloader: return self.downloader.removeItem(self) self._downloader = downloader if downloader is not None: self.downloader_id = downloader.id downloader.addItem(self) else: self.downloader_id = None self.signal_change()
6f433ce28ea21e1156c6b234c6c496c7fe570da8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/6f433ce28ea21e1156c6b234c6c496c7fe570da8/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2378, 6714, 12, 2890, 16, 28122, 4672, 309, 365, 18, 2378, 6714, 67, 350, 353, 486, 599, 30, 309, 28122, 353, 365, 18, 2378, 6714, 30, 327, 365, 18, 2378, 6714, 18, 4479, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2378, 6714, 12, 2890, 16, 28122, 4672, 309, 365, 18, 2378, 6714, 67, 350, 353, 486, 599, 30, 309, 28122, 353, 365, 18, 2378, 6714, 30, 327, 365, 18, 2378, 6714, 18, 4479, 11...
"""Context manager support. >>> 'tested in __enter__' 'tested in __enter__'
""" Context manager support.
def __exit__(self, *_exc): """Context manager support.
4d7069c0b1e38967a5ca43aa3218600793f56c5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11515/4d7069c0b1e38967a5ca43aa3218600793f56c5b/lockfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8593, 972, 12, 2890, 16, 380, 67, 10075, 4672, 3536, 1042, 3301, 2865, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8593, 972, 12, 2890, 16, 380, 67, 10075, 4672, 3536, 1042, 3301, 2865, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
res[product.id] = (res[product.id] * product.price_margin) + \
res[product.id] = (res[product.id] * (product.price_margin or 1.0) ) + \
def price_get(self, cr, uid, ids, ptype='list_price',context={}):
9dcc124af5d82dd4299f5517b7352b702c6977da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/9dcc124af5d82dd4299f5517b7352b702c6977da/cci_mission.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6205, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 24203, 2218, 1098, 67, 8694, 2187, 2472, 12938, 4672, 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, 6205, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 24203, 2218, 1098, 67, 8694, 2187, 2472, 12938, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif "." not in Coordinates: OkDialog(_("There are no Decimal GPS Coordinates available. It must be in " "Degrees, Minutes, Seconds format already."))
def convert_latitude(self, Coordinates, CoordinateType): if Coordinates and "." in Coordinates: degrees, minutes, seconds, latref = self.Convert_Decimal_DDMMSS(Coordinates, CoordinateType) latitude = "%(deg)s %(mins)s %(sec)s" % { 'deg' : degrees, 'mins' : minutes, 'sec' : seconds } self.exif_widgets["Latitude"].set_text( latitude ) def convert_longitude(self, Coordinates, CoordinateType): if Coordinates and "." in Coordinates: degrees, minutes, seconds, longref = self.Convert_Decimal_DDMMSS(Coordinates, CoordinateType) longitude = "%(deg)s %(mins)s %(sec)s" % { 'deg' : degrees, 'mins' : minutes, 'sec' : seconds } self.exif_widgets["Longitude"].set_text( longitude )
def Convert_Decimal_DDMMSS(self, Coordinates, CoordinateType): """ Converts Decimal GPS Coordinates to Degrees, Minutes, Seconds GPS Coordinates
85120981c36cb94696cf716feba20c7de0ae85c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1491/85120981c36cb94696cf716feba20c7de0ae85c7/ImageMetadataGramplet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4037, 67, 5749, 67, 5698, 8206, 1260, 12, 2890, 16, 10320, 4174, 16, 12733, 559, 4672, 3536, 20377, 11322, 29783, 10320, 4174, 358, 463, 1332, 5312, 16, 5444, 993, 16, 18301, 29783, 10320,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4037, 67, 5749, 67, 5698, 8206, 1260, 12, 2890, 16, 10320, 4174, 16, 12733, 559, 4672, 3536, 20377, 11322, 29783, 10320, 4174, 358, 463, 1332, 5312, 16, 5444, 993, 16, 18301, 29783, 10320,...
if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'per':
if line.category_id.contribute and line.category_id.amount_type == 'per':
def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids for slip in self.browse(cr, uid, ids): allow = 0.0 #for emp in emp_pool.browse(cr, uid, [vals['employee_id'][0]]): emp = slip.employee_id sql_req= ''' SELECT c.id as id, c.wage as wage, function as function FROM hr_contract c LEFT JOIN hr_employee emp on (c.employee_id=emp.id) LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id) LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id) WHERE (emp.id=%s) AND (date_start <= %s) AND (date_end IS NULL OR date_end >= %s) LIMIT 1 ''' cr.execute(sql_req, (emp.id, vals['date'], vals['date'])) contract_id = cr.dictfetchone() if not contract_id: continue contract = self.pool.get('hr.contract').browse(cr, uid, contract_id['id']) sal_type = contract.wage_type_id.type function = contract.function.id lines = [] if function: func = func_pool.read(cr, uid, function, ['line_ids']) lines = slip_line_pool.browse(cr, uid, func['line_ids'])
9cefb7520803ded7f648633ccca30e623a0dd192 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/9cefb7520803ded7f648633ccca30e623a0dd192/hr_payroll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 8118, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 801, 84, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 272, 3169, 67, 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, 3671, 67, 8118, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 801, 84, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 272, 3169, 67, 60...
var control_key_pressed = 0;
def notebook_lib(): s= r"""
100ee4ff1c473d11764712fffd76877d6555fd9b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/100ee4ff1c473d11764712fffd76877d6555fd9b/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
att_uri = self._url.replace('xmlrpc.cgi','attachment.cgi') att_uri = att_uri + '?%i' % attachid
att_uri = self.url.replace('xmlrpc.cgi','attachment.cgi') att_uri = att_uri + '?id=%i' % attachid
def _attachment_uri(self,attachid): '''Returns the URI for the given attachment ID.''' att_uri = self._url.replace('xmlrpc.cgi','attachment.cgi') att_uri = att_uri + '?%i' % attachid return att_uri
8b37db4a1357f9ce5d4dcaade18f5c6c12051039 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5050/8b37db4a1357f9ce5d4dcaade18f5c6c12051039/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11461, 67, 1650, 12, 2890, 16, 7331, 350, 4672, 9163, 1356, 326, 3699, 364, 326, 864, 6042, 1599, 1093, 6309, 2403, 67, 1650, 273, 365, 18, 718, 18, 2079, 2668, 2902, 7452, 18, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11461, 67, 1650, 12, 2890, 16, 7331, 350, 4672, 9163, 1356, 326, 3699, 364, 326, 864, 6042, 1599, 1093, 6309, 2403, 67, 1650, 273, 365, 18, 718, 18, 2079, 2668, 2902, 7452, 18, 19...
return []
return
def read_subject(subjects): if not subjects: return [] f = StringIO(subjects.encode('utf-8')) # no unicode in csv module return [s.decode('utf-8') for s in csv.reader(f, dialect='excel', skipinitialspace=True).next()]
cadc7e6e94b4e798e21e2505f1000d44f01e287c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/cadc7e6e94b4e798e21e2505f1000d44f01e287c/addbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 7857, 12, 7857, 87, 4672, 309, 486, 16782, 30, 327, 225, 284, 273, 15777, 12, 7857, 87, 18, 3015, 2668, 3158, 17, 28, 26112, 468, 1158, 5252, 316, 6101, 1605, 327, 306, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 7857, 12, 7857, 87, 4672, 309, 486, 16782, 30, 327, 225, 284, 273, 15777, 12, 7857, 87, 18, 3015, 2668, 3158, 17, 28, 26112, 468, 1158, 5252, 316, 6101, 1605, 327, 306, 87, ...
u"%s.ics" % (collection.displayName)),
u"%s.ics" % (name)),
def onExportIcalendarEvent(self, event): # triggered from "File | Import/Export" Menu collection = self.getSidebarSelectedCollection() if collection is None: return
e9c3864fba92933e6bce828a8416ca9631b89d6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e9c3864fba92933e6bce828a8416ca9631b89d6f/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6144, 45, 11650, 1133, 12, 2890, 16, 871, 4672, 468, 10861, 628, 315, 812, 571, 6164, 19, 6144, 6, 9809, 1849, 273, 365, 18, 588, 8895, 3215, 7416, 2532, 1435, 309, 1849, 353, 599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6144, 45, 11650, 1133, 12, 2890, 16, 871, 4672, 468, 10861, 628, 315, 812, 571, 6164, 19, 6144, 6, 9809, 1849, 273, 365, 18, 588, 8895, 3215, 7416, 2532, 1435, 309, 1849, 353, 599...
tindex = int(math.ceil(random.random()*float(len(giantmembers)-1)))
tindex = int(math.ceil(random.random()* float(len(giantmembers)-1)))
def augmentNet(self, net, useMST=False, coords=None, wmin=None): """Make a network singly connected.
7e1a9ccb3fe5f2f6ab3821cdb0498ac430401ba5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/7e1a9ccb3fe5f2f6ab3821cdb0498ac430401ba5/visuals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18260, 7308, 12, 2890, 16, 2901, 16, 999, 49, 882, 33, 8381, 16, 6074, 33, 7036, 16, 341, 1154, 33, 7036, 4672, 3536, 6464, 279, 2483, 4864, 715, 5840, 18, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18260, 7308, 12, 2890, 16, 2901, 16, 999, 49, 882, 33, 8381, 16, 6074, 33, 7036, 16, 341, 1154, 33, 7036, 4672, 3536, 6464, 279, 2483, 4864, 715, 5840, 18, 2, -100, -100, -100, -100, ...
self.gas.setMaximumImageScale(0.9*self.pixscale)
self.gas.setMinimumImageScale(0.9*self.pixscale)
def setWcs(self, fluxLim=None): import lsst.meas.astrom.net as astromNet
4166029fdf95949111b92d7625b6bd320254e6d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6523/4166029fdf95949111b92d7625b6bd320254e6d6/MeasureSources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 59, 2143, 12, 2890, 16, 11772, 48, 381, 33, 7036, 4672, 1930, 7180, 334, 18, 21992, 18, 689, 520, 18, 2758, 487, 3364, 520, 7308, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 59, 2143, 12, 2890, 16, 11772, 48, 381, 33, 7036, 4672, 1930, 7180, 334, 18, 21992, 18, 689, 520, 18, 2758, 487, 3364, 520, 7308, 2, -100, -100, -100, -100, -100, -100, -100, -100...
r = runhook(hname, cmd) and r
if cmd.startswith('python:'): r = callhook(hname, cmd[7:].strip()) and r else: r = runhook(hname, cmd) and r
def runhook(name, cmd): self.ui.note(_("running hook %s: %s\n") % (name, cmd)) env = dict([('HG_' + k.upper(), v) for k, v in args.iteritems()] + [(k.upper(), v) for k, v in args.iteritems()]) r = util.system(cmd, environ=env, cwd=self.root) if r: desc, r = util.explain_exit(r) if throw: raise util.Abort(_('%s hook %s') % (name, desc)) self.ui.warn(_('error: %s hook %s\n') % (name, desc)) return False return True
eb217d556a9777e3a3e6e6645030c7a8383954fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/eb217d556a9777e3a3e6e6645030c7a8383954fb/localrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4476, 12, 529, 16, 1797, 4672, 365, 18, 4881, 18, 7652, 24899, 2932, 8704, 3953, 738, 87, 30, 738, 87, 64, 82, 7923, 738, 261, 529, 16, 1797, 3719, 1550, 273, 2065, 3816, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4476, 12, 529, 16, 1797, 4672, 365, 18, 4881, 18, 7652, 24899, 2932, 8704, 3953, 738, 87, 30, 738, 87, 64, 82, 7923, 738, 261, 529, 16, 1797, 3719, 1550, 273, 2065, 3816, 2668, ...
global exitcondition, exitthreads, profiledir
global exitthreads, profiledir
def run(self): global exitcondition, exitthreads, profiledir self.threadid = thread.get_ident() try: if not profiledir: # normal case Thread.run(self) else: import profile prof = profile.Profile() try: prof = prof.runctx("Thread.run(self)", globals(), locals()) except SystemExit: pass prof.dump_stats( \ profiledir + "/" + str(self.threadid) + "_" + \ self.getName() + ".prof") except: self.setExitCause('EXCEPTION') self.setExitException(sys.exc_info()[1]) sbuf = StringIO() traceback.print_exc(file = sbuf) self.setExitStackTrace(sbuf.getvalue()) else: self.setExitCause('NORMAL') if not hasattr(self, 'exitmessage'): self.setExitMessage(None) exitcondition.acquire() exitthreads.append(self) exitcondition.notify() exitcondition.release()
8114877fae2003a2d305a7a264c43b8553675a05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5335/8114877fae2003a2d305a7a264c43b8553675a05/threadutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2552, 2427, 12495, 16, 3042, 1214, 365, 18, 5930, 350, 273, 2650, 18, 588, 67, 6392, 1435, 775, 30, 309, 486, 3042, 1214, 30, 1850, 468, 2212, 648, 4884, 18, 2681...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2552, 2427, 12495, 16, 3042, 1214, 365, 18, 5930, 350, 273, 2650, 18, 588, 67, 6392, 1435, 775, 30, 309, 486, 3042, 1214, 30, 1850, 468, 2212, 648, 4884, 18, 2681...
def edge_boundary(self, vertices1, vertices2=None, labels=True):
def edge_boundary(self, vertices1, vertices2=None, labels=True, sort=True):
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an arc `(v, u)`. INPUT: - ``labels`` - if ``False``, each edge is a tuple `(u,v)` of vertices. EXAMPLES:: sage: K = graphs.CompleteBipartiteGraph(9,3) sage: len(K.edge_boundary( [0,1,2,3,4,5,6,7,8], [9,10,11] )) 27 sage: K.size() 27 Note that the edge boundary preserves direction:: sage: K = graphs.CompleteBipartiteGraph(9,3).to_directed() sage: len(K.edge_boundary( [0,1,2,3,4,5,6,7,8], [9,10,11] )) 27 sage: K.size() 54 :: sage: D = DiGraph({0:[1,2], 3:[0]}) sage: D.edge_boundary([0]) [(0, 1, None), (0, 2, None)] sage: D.edge_boundary([0], labels=False) [(0, 1), (0, 2)]
3875207c794f1335c1064e92087e3fc388d1f10b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3875207c794f1335c1064e92087e3fc388d1f10b/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 16604, 12, 2890, 16, 6928, 21, 16, 6928, 22, 33, 7036, 16, 3249, 33, 5510, 16, 1524, 33, 5510, 4672, 3536, 2860, 279, 666, 434, 5231, 1375, 12, 89, 16, 90, 16, 80, 22025, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 16604, 12, 2890, 16, 6928, 21, 16, 6928, 22, 33, 7036, 16, 3249, 33, 5510, 16, 1524, 33, 5510, 4672, 3536, 2860, 279, 666, 434, 5231, 1375, 12, 89, 16, 90, 16, 80, 22025, ...
'port %s.' % port)
'port %s.' % inputPort)
def typeChecking(self, module, inputPorts, inputList): """ Function used to check if the types of the input list element and of the inputPort of 'module' match. """ for elementList in inputList: if len(elementList) != len(inputPorts): raise ModuleError(self, 'The number of input values and input ports ' 'are not the same.') for element, inputPort in izip(elementList, inputPorts): p_modules = module.moduleInfo['pipeline'].modules p_module = p_modules[module.moduleInfo['moduleId']] port_spec = p_module.get_port_spec(inputPort, 'input') v_module = create_module(element, port_spec.signature) if v_module is not None: if not self.compare(port_spec, v_module, inputPort): raise ModuleError(self, 'The type of a list element does ' 'not match with the type of the ' 'port %s.' % port)
920bb53de805f49264a87adf286cc2aed1d0c176 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6341/920bb53de805f49264a87adf286cc2aed1d0c176/fold.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 14294, 12, 2890, 16, 1605, 16, 810, 11107, 16, 810, 682, 4672, 3536, 4284, 1399, 358, 866, 309, 326, 1953, 434, 326, 810, 666, 930, 471, 434, 326, 810, 2617, 434, 296, 2978, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 14294, 12, 2890, 16, 1605, 16, 810, 11107, 16, 810, 682, 4672, 3536, 4284, 1399, 358, 866, 309, 326, 1953, 434, 326, 810, 666, 930, 471, 434, 326, 810, 2617, 434, 296, 2978, 11, ...
return http.Response(stream=t)
return HTMLResponse(stream=t)
def render(self, ctx): t = template('history.html', username=self.username, text = notebook.user_history_text(self.username), actions=False) return http.Response(stream=t)
86a4ed9cb0aba48a11523b820246bf1c9d9e7be2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86a4ed9cb0aba48a11523b820246bf1c9d9e7be2/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 268, 273, 1542, 2668, 8189, 18, 2620, 2187, 2718, 33, 2890, 18, 5053, 16, 977, 273, 14718, 18, 1355, 67, 8189, 67, 955, 12, 2890, 18, 5053, 3631, 4209, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 1103, 4672, 268, 273, 1542, 2668, 8189, 18, 2620, 2187, 2718, 33, 2890, 18, 5053, 16, 977, 273, 14718, 18, 1355, 67, 8189, 67, 955, 12, 2890, 18, 5053, 3631, 4209, ...
d=j(j(CUSTOMER_HOME,'var'),'gadfly')
d=j(j(INSTANCE_HOME,'var'),'gadfly')
def manage_addZGadflyConnection( self, id, title, connection, check=None, REQUEST=None): " " return getDA().manage_addZGadflyConnection( self, id, title, connection, check, REQUEST)
4332e29bcd3f09c6d81fd5aaf961aa874f1548c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4332e29bcd3f09c6d81fd5aaf961aa874f1548c4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 1289, 62, 43, 361, 29670, 1952, 12, 365, 16, 612, 16, 2077, 16, 1459, 16, 866, 33, 7036, 16, 12492, 33, 7036, 4672, 315, 315, 327, 2343, 37, 7675, 12633, 67, 1289, 62, 43,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 1289, 62, 43, 361, 29670, 1952, 12, 365, 16, 612, 16, 2077, 16, 1459, 16, 866, 33, 7036, 16, 12492, 33, 7036, 4672, 315, 315, 327, 2343, 37, 7675, 12633, 67, 1289, 62, 43,...
rat = float(n) / size
if size == 0: rat = 1 else: rat = float(n) / size
def extract(self): cur = n = 0 size = sum(self.z.getinfo(name).file_size for name in self.arcnames) self.installed_size = size if size == 0: return
07f16429642541c0a3edbb2bb841823adc5c7a25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/07f16429642541c0a3edbb2bb841823adc5c7a25/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 2890, 4672, 662, 273, 290, 273, 374, 963, 273, 2142, 12, 2890, 18, 94, 18, 22281, 12, 529, 2934, 768, 67, 1467, 364, 508, 316, 365, 18, 11828, 1973, 13, 365, 18, 13435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 2890, 4672, 662, 273, 290, 273, 374, 963, 273, 2142, 12, 2890, 18, 94, 18, 22281, 12, 529, 2934, 768, 67, 1467, 364, 508, 316, 365, 18, 11828, 1973, 13, 365, 18, 13435, 67,...
else
else:
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 951) else quickfix.IntField.__init__(self, 951, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 10593, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 10593, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 2...
if 'port' in keys:
if 'port' in keys and not port:
def make_connect_string(self, keys): if 'max_identifier_length' in keys: self.max_identifier_length = int(keys.pop('max_identifier_length')) if 'dsn' in keys: connectors = ['dsn=%s' % keys.pop('dsn')] else: connectors = ["DRIVER={%s}" % keys.pop('driver', 'SQL Server'), 'Server=%s' % keys.pop('host', ''), 'Database=%s' % keys.pop('database', '') ] if 'port' in keys: connectors.append('Port=%d' % int(keys.pop('port'))) user = keys.pop("user", None) if user: connectors.append("UID=%s" % user) connectors.append("PWD=%s" % keys.pop('password', '')) else: connectors.append("TrustedConnection=Yes")
306bee4ecd1ddcab860f9b39866b2f57b6ec509a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/306bee4ecd1ddcab860f9b39866b2f57b6ec509a/mssql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 3612, 67, 1080, 12, 2890, 16, 1311, 4672, 309, 296, 1896, 67, 5644, 67, 2469, 11, 316, 1311, 30, 365, 18, 1896, 67, 5644, 67, 2469, 273, 509, 12, 2452, 18, 5120, 2668, 1896...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 3612, 67, 1080, 12, 2890, 16, 1311, 4672, 309, 296, 1896, 67, 5644, 67, 2469, 11, 316, 1311, 30, 365, 18, 1896, 67, 5644, 67, 2469, 273, 509, 12, 2452, 18, 5120, 2668, 1896...
while True: try: v = self.read(nbytes, buffer) return v except SSLError as x: if x.args[0] == SSL_ERROR_WANT_READ: continue else: raise x
def recv_into(self, buffer, nbytes=None, flags=0): self._checkClosed() if buffer and (nbytes is None): nbytes = len(buffer) elif nbytes is None: nbytes = 1024 if self._sslobj: if flags != 0: raise ValueError( "non-zero flags not allowed in calls to recv_into() on %s" % self.__class__) while True: try: v = self.read(nbytes, buffer) return v except SSLError as x: if x.args[0] == SSL_ERROR_WANT_READ: continue else: raise x return self.read(nbytes, buffer) else: return socket.recv_into(self, buffer, nbytes, flags)
ee4bf0fdd92c53aa1c248d914edda885eeb92c55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/ee4bf0fdd92c53aa1c248d914edda885eeb92c55/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 67, 18591, 12, 2890, 16, 1613, 16, 26689, 33, 7036, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 1613, 471, 261, 82, 3890, 353, 599, 4672, 26689, 273, 562, 12, 4106...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 67, 18591, 12, 2890, 16, 1613, 16, 26689, 33, 7036, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 1613, 471, 261, 82, 3890, 353, 599, 4672, 26689, 273, 562, 12, 4106...
self.data = '' line = nmlfile.readline() iline = 1 while line!='': ipos = 0 match = self.commentchar_re.search(line,pos=ipos) while match!=None: ch = match.group(0) if ch=='\'' or ch=='"': ipos = match.end(0) inextquote = self.data.find(ch,ipos) if inextquote==-1: raise NamelistParser.NamelistParseException('Line %i: opening quote %s was not matched by end quote.' % (iline,ch),path) ipos = inextquote+1 else: line = line[0:match.start(0)] break
try: self.data = '' line = nmlfile.readline() iline = 1 while line!='': ipos = 0
def __init__(self,path,requireordered,subs=[]): # Attempt to open namelist file and read all data try: nmlfile = open(path,'rU') except Exception,e: raise NamelistParser.NamelistParseException('Cannot open namelist file. Error: %s' % (str(e),),path) self.data = '' line = nmlfile.readline() iline = 1 while line!='':
402bc8158dd9f1f7a1fa7ee4048cc635886b3815 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/381/402bc8158dd9f1f7a1fa7ee4048cc635886b3815/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 803, 16, 6528, 9885, 16, 22284, 33, 8526, 4672, 468, 12864, 358, 1696, 15135, 5449, 585, 471, 855, 777, 501, 775, 30, 290, 781, 768, 273, 1696, 12, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 803, 16, 6528, 9885, 16, 22284, 33, 8526, 4672, 468, 12864, 358, 1696, 15135, 5449, 585, 471, 855, 777, 501, 775, 30, 290, 781, 768, 273, 1696, 12, 803, ...
if not self.declarations: self.declarations = parser.parse( [self.header], self.config )
if not tester_t.global_ns: decls = parser.parse( [self.header], self.config ) tester_t.global_ns = declarations.get_global_namespace( decls ) tester_t.global_ns.init_optimizer() self.global_ns = tester_t.global_ns
def setUp(self): if not self.declarations: self.declarations = parser.parse( [self.header], self.config )
6158084cc393df0065b620918b14781beb11cb8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7398/6158084cc393df0065b620918b14781beb11cb8b/filters_tester.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 309, 486, 268, 7654, 67, 88, 18, 6347, 67, 2387, 30, 3496, 87, 273, 2082, 18, 2670, 12, 306, 2890, 18, 3374, 6487, 365, 18, 1425, 262, 268, 7654, 67, 88, 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, 24292, 12, 2890, 4672, 309, 486, 268, 7654, 67, 88, 18, 6347, 67, 2387, 30, 3496, 87, 273, 2082, 18, 2670, 12, 306, 2890, 18, 3374, 6487, 365, 18, 1425, 262, 268, 7654, 67, 88, 18, ...
set_compilers = []
opt_output = None opt_compilers = []
def main(): """Run the benchmark per arguments""" sum = Summary() options, args = getopt(sys.argv[1:], 'a:c:n:', ['list-projects', 'actions=', 'help', 'compiler=', 'cc=', 'cxx=']) opt_actions = actions.default_actions opt_cc = 'cc' opt_cxx = 'cxx' set_compilers = [] opt_repeats = 1 for opt, optarg in options: if opt == '--help': show_help() return elif opt == '--list-projects': list_projects() return elif opt == '--actions' or opt == '-a': opt_actions = actions.parse_opt_actions(optarg) elif opt == '--cc': opt_cc = optarg elif opt == '--cxx': opt_cxx = optarg elif opt == '--compiler' or opt == '-c': set_compilers.append(compiler.parse_compiler_opt(optarg, cc=opt_cc, cxx=opt_cxx)) elif opt == '-n': opt_repeats = int(optarg) if not set_compilers: set_compilers = compiler.default_compilers(cc=opt_cc, cxx=opt_cxx) # Find named projects, or run all by default if args: chosen_projects = [find_project(name) for name in args] else: chosen_projects = trees.values() for proj in chosen_projects: proj.pre_actions(opt_actions) for comp in set_compilers: build = Build(proj, comp, opt_repeats) build.build_actions(opt_actions, sum) sum.print_table()
c3b1836ef0182f28706671e776a50bdd03b5c845 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/c3b1836ef0182f28706671e776a50bdd03b5c845/benchmark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 1997, 326, 14128, 1534, 1775, 8395, 2142, 273, 17967, 1435, 702, 16, 833, 273, 336, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 69, 30, 71, 30, 82, 30, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 1997, 326, 14128, 1534, 1775, 8395, 2142, 273, 17967, 1435, 702, 16, 833, 273, 336, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 69, 30, 71, 30, 82, 30, 2187, ...