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
replace_predicate(license, URIRef(license_uri), NS_DC.source, URIRef(based_on_uri))
def add_license(license_uri, based_on_uri, version, jurisdiction, legalcode_uri, rdf_dir): """Create a new license based on an existing one. Write the resulting graph to the rdf_dir.""" # make sure the license_uri ends with a slash if license_uri[-1] != '/': license_uri += '/' # load the based on graph based_on = load_graph(_license_rdf_filename(rdf_dir, based_on_uri)) # create the graph for the new license license = graph() # copy base assertions for (p, o) in based_on.predicate_objects(URIRef(based_on_uri)): license.add((URIRef(license_uri), p, o)) # add the jurisdiction, version, source if jurisdiction is not None: replace_predicate(license, URIRef(license_uri), NS_CC.jurisdiction, URIRef(jurisdiction)) else: # unported; remove any jurisdiction assertion license.remove((URIRef(license_uri), NS_CC.jurisdiction, None)) replace_predicate(license, URIRef(license_uri), NS_DCQ.hasVersion, Literal(version)) replace_predicate(license, URIRef(license_uri), NS_DC.source, URIRef(based_on_uri)) # determine the legalcode URI if legalcode_uri is None: legalcode_uri = license_uri + "legalcode" # add the legalcode predicate replace_predicate(license, URIRef(license_uri), NS_CC.legalcode, URIRef(legalcode_uri)) # write the graph out save_graph(license, _license_rdf_filename(rdf_dir, license_uri))
6534ed55f7fc8a3145bfa4f6d0d77b7c2a1f43ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4330/6534ed55f7fc8a3145bfa4f6d0d77b7c2a1f43ff/license.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12687, 12, 12687, 67, 1650, 16, 2511, 67, 265, 67, 1650, 16, 1177, 16, 525, 23510, 72, 2228, 16, 19286, 710, 67, 1650, 16, 9160, 67, 1214, 4672, 3536, 1684, 279, 394, 8630, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12687, 12, 12687, 67, 1650, 16, 2511, 67, 265, 67, 1650, 16, 1177, 16, 525, 23510, 72, 2228, 16, 19286, 710, 67, 1650, 16, 9160, 67, 1214, 4672, 3536, 1684, 279, 394, 8630, ...
apply(self.tk.call, (self._w, 'yview') + args)
apply(self.tk.call, (self._w, 'yview') + args)
def yview(self, *args):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 1945, 12, 2890, 16, 380, 1968, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 1945, 12, 2890, 16, 380, 1968, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionError(*exc.args) sock.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) sock.settimeout(self.socket_timeout) self._sock = sock self._connected.set()
with self._connect_lock: if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionError(*exc.args) sock.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) sock.settimeout(self.socket_timeout) self._sock = sock self._connected.set()
def connect(self): """ Connects to the STOMP server if not already connected. """ if self._sock: return try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) except socket.timeout as exc: raise ConnectionTimeoutError(*exc.args) except socket.error as exc: raise ConnectionError(*exc.args) sock.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) sock.settimeout(self.socket_timeout) self._sock = sock self._connected.set()
e36e66270bed68066718c499ea66f20218cdd3d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/e36e66270bed68066718c499ea66f20218cdd3d9/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 3536, 8289, 87, 358, 326, 2347, 1872, 52, 1438, 309, 486, 1818, 5840, 18, 3536, 598, 365, 6315, 3612, 67, 739, 30, 309, 365, 6315, 15031, 30, 327, 775, 30, 7313, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 3536, 8289, 87, 358, 326, 2347, 1872, 52, 1438, 309, 486, 1818, 5840, 18, 3536, 598, 365, 6315, 3612, 67, 739, 30, 309, 365, 6315, 15031, 30, 327, 775, 30, 7313, ...
elif l[1] == a[1]:
elif ld[1] == a[1]:
def debug(s, msg, r=""): if r: r = "%s:%s:%s" % r repo.ui.debug(" subrepo %s: %s %s\n" % (s, msg, r))
ffbe013a272ae3f12702d0aa7b96e2716197852a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/ffbe013a272ae3f12702d0aa7b96e2716197852a/subrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 87, 16, 1234, 16, 436, 1546, 6, 4672, 309, 436, 30, 436, 273, 2213, 87, 5319, 87, 5319, 87, 6, 738, 436, 3538, 18, 4881, 18, 4148, 2932, 225, 720, 7422, 738, 87, 30, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1198, 12, 87, 16, 1234, 16, 436, 1546, 6, 4672, 309, 436, 30, 436, 273, 2213, 87, 5319, 87, 5319, 87, 6, 738, 436, 3538, 18, 4881, 18, 4148, 2932, 225, 720, 7422, 738, 87, 30, 738,...
start_response(*start_response_args[0])
start_response(*start_response_args[-1])
def dummy_start_response(status, headers, exc_info=None): start_response_args.append((status, headers, exc_info)) return output.write
01fc2b7e5d8d1a50e097b2b652b5e8a6dc6f8306 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10679/01fc2b7e5d8d1a50e097b2b652b5e8a6dc6f8306/middleware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9609, 67, 1937, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 787, 67, 2740, 67, 1968, 18, 6923, 12443, 2327, 16, 1607, 16, 3533, 67, 1376, 3719, 327, 876, 18, 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, 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, 9609, 67, 1937, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 787, 67, 2740, 67, 1968, 18, 6923, 12443, 2327, 16, 1607, 16, 3533, 67, 1376, 3719, 327, 876, 18, 26...
primaryTableList = []
primaryTableList = []
def _createTables( self, tableDict, force=False ): """ tableDict: tableName: { 'Fields' : { 'Field': 'Description' }, 'ForeignKeys': {'Field': 'Table' }, 'PrimaryKey': 'Id', 'Indexes': { 'Index': [] }, 'UniqueIndexes': { 'Index': [] }, 'Engine': 'InnoDB' } only 'Fields' is a mandatory key.
0e53f5944800e7e4e2a93a0c3f1aefa6be7f7b08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/0e53f5944800e7e4e2a93a0c3f1aefa6be7f7b08/MySQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 6905, 12, 365, 16, 1014, 5014, 16, 2944, 33, 8381, 262, 30, 3536, 1014, 5014, 30, 4775, 30, 288, 296, 2314, 11, 294, 288, 296, 974, 4278, 296, 3291, 11, 19879, 296, 28285, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 6905, 12, 365, 16, 1014, 5014, 16, 2944, 33, 8381, 262, 30, 3536, 1014, 5014, 30, 4775, 30, 288, 296, 2314, 11, 294, 288, 296, 974, 4278, 296, 3291, 11, 19879, 296, 28285, ...
self.profile.FileLinesList = [list(s) for s in self.profile.FileLinesList] Rewind()
self.Rewind()
def PreprocessFile(self): # change string to list of chars, as string can NOT be modified self.profile.FileLinesList = [list(s) for s in self.profile.FileLinesList]
2f743f829e2c9e634d3e62f83c6af106a22f6583 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/2f743f829e2c9e634d3e62f83c6af106a22f6583/FdfParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2962, 2567, 812, 12, 2890, 4672, 468, 2549, 533, 358, 666, 434, 5230, 16, 487, 533, 848, 4269, 506, 4358, 365, 18, 5040, 18, 812, 5763, 682, 273, 306, 1098, 12, 87, 13, 364, 272, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2962, 2567, 812, 12, 2890, 4672, 468, 2549, 533, 358, 666, 434, 5230, 16, 487, 533, 848, 4269, 506, 4358, 365, 18, 5040, 18, 812, 5763, 682, 273, 306, 1098, 12, 87, 13, 364, 272, 316...
song.DisplayFilename = "Unknown Singer"
return
def _insert(self, x, y, songs, drag_result): """ Insert songs from drag_index in search results, at given x,y coordinates, used with drag-and-drop. Code from WxPython Wiki """
7d6c2cead80b3d812ebc0d6027018fbc93b8714c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12653/7d6c2cead80b3d812ebc0d6027018fbc93b8714c/pykaraoke.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 12, 2890, 16, 619, 16, 677, 16, 272, 7260, 16, 8823, 67, 2088, 4672, 3536, 8040, 272, 7260, 628, 8823, 67, 1615, 316, 1623, 1686, 16, 622, 864, 619, 16, 93, 5513, 16, 1399...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 12, 2890, 16, 619, 16, 677, 16, 272, 7260, 16, 8823, 67, 2088, 4672, 3536, 8040, 272, 7260, 628, 8823, 67, 1615, 316, 1623, 1686, 16, 622, 864, 619, 16, 93, 5513, 16, 1399...
msg = 'Pidfile %s contains non numeric value' sys.exit(msg % config['pidfile']) try: os.kill(pid, signal)
sys.exit('Pidfile %s contains non numeric value' % config['pidfile']) try: os.kill(pid, 0)
def signalApp(config, signal = 0): if os.path.exists(config['pidfile']): try: pid = int(open(config['pidfile']).read()) except ValueError: msg = 'Pidfile %s contains non numeric value' sys.exit(msg % config['pidfile']) try: os.kill(pid, signal) except OSError, why: if why[0] == errno.ESRCH: # The pid doesnt exists. if not config['quiet']: print 'Removing stale pidfile %s' % config['pidfile'] os.remove(config['pidfile']) else: msg = 'Can\'t check status of PID %s from pidfile %s: %s' sys.exit(msg % (pid, config['pidfile'], why[1])) else: if not(signal): sys.exit("""\
d5f1c437a076f0fe17db40d9ab92751c20198dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d5f1c437a076f0fe17db40d9ab92751c20198dd3/twistd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4277, 3371, 12, 1425, 16, 4277, 273, 374, 4672, 309, 1140, 18, 803, 18, 1808, 12, 1425, 3292, 6610, 768, 3546, 4672, 775, 30, 4231, 273, 509, 12, 3190, 12, 1425, 3292, 6610, 768, 3546,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4277, 3371, 12, 1425, 16, 4277, 273, 374, 4672, 309, 1140, 18, 803, 18, 1808, 12, 1425, 3292, 6610, 768, 3546, 4672, 775, 30, 4231, 273, 509, 12, 3190, 12, 1425, 3292, 6610, 768, 3546,...
self.assertEqual(10, len(l))
self.assertEqual(10, len(l))
def testArray(self): with JSContext() as ctxt: array = ctxt.eval(""" var array = new Array(); for (i=0; i<10; i++) { array[i] = 10-i; } array; """) self.assert_(isinstance(array, _PyV8.JSArray)) self.assertEqual(10, len(array)) self.assert_(5 in array) self.assertFalse(15 in array) l = list(array) self.assertEqual(10, len(l)) for i in xrange(10): self.assertEqual(10-i, array[i]) self.assertEqual(10-i, l[i]) array[5] = 0 self.assertEqual(0, array[5]) del array[5] self.assertRaises(IndexError, lambda: array[5]) ctxt.locals.array1 = JSArray(5) ctxt.locals.array2 = JSArray([1, 2, 3, 4, 5]) for i in xrange(len(ctxt.locals.array2)): ctxt.locals.array1[i] = ctxt.locals.array2[i] * 10 ctxt.eval(""" var sum = 0; for (i=0; i<array1.length; i++) sum += array1[i] for (i=0; i<array2.length; i++) sum += array2[i] """) self.assertEqual(165, ctxt.locals.sum) ctxt.locals.array3 = [1, 2, 3, 4, 5] self.assert_(ctxt.eval('array3[1] === 2')) self.assert_(ctxt.eval('array3[9] === undefined'))
d76ea3f452d147f051e65b20fdab9b87a8b84413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2065/d76ea3f452d147f051e65b20fdab9b87a8b84413/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1076, 12, 2890, 4672, 598, 6756, 1042, 1435, 487, 14286, 30, 526, 273, 14286, 18, 8622, 2932, 3660, 569, 526, 273, 394, 1510, 5621, 225, 364, 261, 77, 33, 20, 31, 277, 32, 2163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1076, 12, 2890, 4672, 598, 6756, 1042, 1435, 487, 14286, 30, 526, 273, 14286, 18, 8622, 2932, 3660, 569, 526, 273, 394, 1510, 5621, 225, 364, 261, 77, 33, 20, 31, 277, 32, 2163, ...
conditions = self.get(key)
try: conditions = self[key] except KeyError: return False
def is_active(self, key, *instances): """ ``gargoyle.is_active('my_feature', request)`` """ conditions = self.get(key) if not conditions: # XXX: option to have default return value? return True
4c82f0306e870f63a9f3c29b07334f92e52f24dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13486/4c82f0306e870f63a9f3c29b07334f92e52f24dd/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 3535, 12, 2890, 16, 498, 16, 380, 10162, 4672, 3536, 12176, 75, 26999, 1362, 18, 291, 67, 3535, 2668, 4811, 67, 7238, 2187, 590, 13, 10335, 3536, 225, 775, 30, 4636, 273, 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, 353, 67, 3535, 12, 2890, 16, 498, 16, 380, 10162, 4672, 3536, 12176, 75, 26999, 1362, 18, 291, 67, 3535, 2668, 4811, 67, 7238, 2187, 590, 13, 10335, 3536, 225, 775, 30, 4636, 273, 365,...
'date_start':_get_new_period_start,
'date_start': _get_new_period_start,
def _get_new_period_start(self,cr,uid,context={}): cr.execute("select max(date_stop) from stock_period") result=cr.fetchone() last_date = result and result[0] or False if last_date: period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1) period_start = period_start - RelativeDateTime(hours=period_start.hour, minutes=period_start.minute, seconds=period_start.second) else: period_start = mx.DateTime.today() return period_start.strftime('%Y-%m-%d')
6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2704, 67, 6908, 67, 1937, 12, 2890, 16, 3353, 16, 1911, 16, 2472, 12938, 4672, 4422, 18, 8837, 2932, 4025, 943, 12, 712, 67, 5681, 13, 628, 12480, 67, 6908, 7923, 563, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2704, 67, 6908, 67, 1937, 12, 2890, 16, 3353, 16, 1911, 16, 2472, 12938, 4672, 4422, 18, 8837, 2932, 4025, 943, 12, 712, 67, 5681, 13, 628, 12480, 67, 6908, 7923, 563, ...
child = self.endArray()
self.endArray()
def endElement(self, name): if name == AdcData.tagName: child = self.endAdcData() elif name == AdcInterval.tagName: child = self.endAdcInterval() elif name == Array.tagName: child = self.endArray() elif name == Column.tagName: child = self.endColumn() elif name == Comment.tagName: child = self.endComment() elif name == Detector.tagName: child = self.endDetector() elif name == Dim.tagName: child = self.endDim() elif name == IGWDFrame.tagName: child = self.endIGWDFrame() elif name == LIGO_LW.tagName: child = self.endLIGO_LW() elif name == Param.tagName: child = self.endParam() elif name == Stream.tagName: child = self.endStream() elif name == Table.tagName: child = self.endTable() elif name == Time.tagName: child = self.endTime() else: raise ElementError, "unknown element tag %s" % name self.current = self.current.parentNode
19c70d9d2433f3385423e26af544f557b0c477a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/19c70d9d2433f3385423e26af544f557b0c477a4/ligolw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14840, 12, 2890, 16, 508, 4672, 309, 508, 422, 4052, 71, 751, 18, 2692, 461, 30, 1151, 273, 365, 18, 409, 1871, 71, 751, 1435, 1327, 508, 422, 4052, 71, 4006, 18, 2692, 461, 30, 1151...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14840, 12, 2890, 16, 508, 4672, 309, 508, 422, 4052, 71, 751, 18, 2692, 461, 30, 1151, 273, 365, 18, 409, 1871, 71, 751, 1435, 1327, 508, 422, 4052, 71, 4006, 18, 2692, 461, 30, 1151...
print "len:", cantdata
def server(evt): serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serv.settimeout(3) serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) serv.bind(("", 9093)) serv.listen(5) try: conn, addr = serv.accept() conn.send("1 Hola mundo\n") cantdata = 0 while cantdata < 13: print "len:", cantdata data = conn.recv(13-cantdata) cantdata += len(data) conn.send("2 No more lines\n") conn.close() except socket.timeout: pass finally: serv.close() evt.set()
e312416809b4d0bafacc610760cf5474f0a478f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/e312416809b4d0bafacc610760cf5474f0a478f8/test_urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 12, 73, 11734, 4672, 13515, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 13515, 18, 542, 4538, 12, 23, 13, 13515, 18, 4424, 27844,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 12, 73, 11734, 4672, 13515, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 13515, 18, 542, 4538, 12, 23, 13, 13515, 18, 4424, 27844,...
stage.install(name + "-lib-shared-cygwin", binaries, libraries,
stage.install(name + "-lib-shared-cygwin", binaries + libraries,
def install(name, package_name=None, requirements=[], binaries=[], libraries=[], headers=[]): requirements = requirements[:] binaries = binaries[:] libraries if not package_name: package_name = name if option.get("prefix"): # If --prefix is explicitly specified on the command line, # then we need wipe away any settings of libdir/includir that # is specified via options in config files. option.set("bindir", None) option.set("libdir", None) option.set("includedir", None) # If <install-source-root> is not specified, all headers are installed to # prefix/include, no matter what their relative path is. Sometimes that is # what is needed. install_source_root = property.select('install-source-root', requirements) if install_source_root: requirements = property.change(requirements, 'install-source-root', None) install_header_subdir = property.select('install-header-subdir', requirements) if install_header_subdir: install_header_subdir = ungrist(install_header_subdir[0]) requirements = property.change(requirements, 'install-header-subdir', None) # First, figure out all locations. Use the default if no prefix option # given. prefix = get_prefix(name, requirements) # Architecture dependent files. exec_locate = option.get("exec-prefix", prefix) # Binaries. bin_locate = option.get("bindir", os.path.join(prefix, "bin")) # Object code libraries. lib_locate = option.get("libdir", os.path.join(prefix, "lib")) # Source header files. include_locate = option.get("includedir", os.path.join(prefix, "include")) stage.install(name + "-bin", binaries, requirements + ["<location>" + bin_locate]) alias(name + "-lib", [name + "-lib-shared", name + "-lib-static"]) # Since the install location of shared libraries differs on universe # and cygwin, use target alternatives to make different targets. # We should have used indirection conditioanl requirements, but it's # awkward to pass bin-locate and lib-locate from there to another rule. alias(name + "-lib-shared", [name + "-lib-shared-universe"]) alias(name + "-lib-shared", [name + "-lib-shared-cygwin"], ["<target-os>cygwin"]) # For shared libraries, we install both explicitly specified one and the # shared libraries that the installed executables depend on. stage.install(name + "-lib-shared-universe", binaries, libraries, requirements + ["<location>" + lib_locate, "<install-dependencies>on", "<install-type>SHARED_LIB"]) stage.install(name + "-lib-shared-cygwin", binaries, libraries, requirements + ["<location>" + bin_locate, "<install-dependencies>on", "<install-type>SHARED_LIB"]) # For static libraries, we do not care about executable dependencies, since # static libraries are already incorporated into them. stage.install(name + "-lib-static", libraries, requirements + ["<location>" + lib_locate, "<install-dependencies>on", "<install-type>STATIC_LIB"]) stage.install(name + "-headers", headers, requirements \ + ["<location>" + os.path.join(include_locate, s) for s in install_header_subdir] + install_source_root) alias(name, [name + "-bin", name + "-lib", name + "-headers"]) pt = get_manager().projects().current() for subname in ["bin", "lib", "headers", "lib-shared", "lib-static", "lib-shared-universe", "lib-shared-cygwin"]: pt.mark_targets_as_explicit([name + "-" + subname])
4a99d65979c713183832728cdd9235fd9515518a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9981/4a99d65979c713183832728cdd9235fd9515518a/package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 529, 16, 2181, 67, 529, 33, 7036, 16, 8433, 22850, 6487, 4158, 5646, 22850, 6487, 14732, 22850, 6487, 1607, 33, 8526, 4672, 225, 8433, 273, 8433, 10531, 65, 4158, 5646, 273, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 529, 16, 2181, 67, 529, 33, 7036, 16, 8433, 22850, 6487, 4158, 5646, 22850, 6487, 14732, 22850, 6487, 1607, 33, 8526, 4672, 225, 8433, 273, 8433, 10531, 65, 4158, 5646, 273, 41...
end_ifclear = end_ifset
def end_ifclear(self): try: if self.stackinfo[len(self.stack) + 1]: self.skip = self.skip - 1 del self.stackinfo[len(self.stack) + 1] except KeyError: print '*** end_ifclear: KeyError :', len(self.stack) + 1
def bgn_ifclear(self, args): if args in self.values.keys() \ and self.values[args] is not None: self.skip = self.skip + 1 self.stackinfo[len(self.stack)] = 1 else: self.stackinfo[len(self.stack)] = 0
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 1600, 67, 430, 8507, 12, 2890, 16, 833, 4672, 309, 833, 316, 365, 18, 2372, 18, 2452, 1435, 521, 471, 365, 18, 2372, 63, 1968, 65, 353, 486, 599, 30, 365, 18, 7457, 273, 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, 324, 1600, 67, 430, 8507, 12, 2890, 16, 833, 4672, 309, 833, 316, 365, 18, 2372, 18, 2452, 1435, 521, 471, 365, 18, 2372, 63, 1968, 65, 353, 486, 599, 30, 365, 18, 7457, 273, 365, ...
col.set_attributes(cell, text=c[2])
col.set_attributes(cell, text=c[2])
def __init__(self): self.__treeview_track = None self.__treeview_file = None self.__device_engine = None self.__transferManager = None
d382ec2a930240988ff9b57599420845a0b6f246 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2271/d382ec2a930240988ff9b57599420845a0b6f246/MTPnavigator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 16186, 3413, 1945, 67, 4101, 273, 599, 365, 16186, 3413, 1945, 67, 768, 273, 599, 365, 16186, 5964, 67, 8944, 273, 599, 365, 16186, 13866, 1318, 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, 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, 4672, 365, 16186, 3413, 1945, 67, 4101, 273, 599, 365, 16186, 3413, 1945, 67, 768, 273, 599, 365, 16186, 5964, 67, 8944, 273, 599, 365, 16186, 13866, 1318, 273...
cls.add_constructor([param('ns3::JakesPropagationLossModel const &', 'arg0')])
def register_Ns3JakesPropagationLossModel_methods(root_module, cls): ## jakes-propagation-loss-model.h: ns3::JakesPropagationLossModel::JakesPropagationLossModel(ns3::JakesPropagationLossModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::JakesPropagationLossModel const &', 'arg0')]) ## jakes-propagation-loss-model.h: static ns3::TypeId ns3::JakesPropagationLossModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## jakes-propagation-loss-model.h: ns3::JakesPropagationLossModel::JakesPropagationLossModel() [constructor] cls.add_constructor([]) ## jakes-propagation-loss-model.h: void ns3::JakesPropagationLossModel::SetNRays(uint8_t nRays) [member function] cls.add_method('SetNRays', 'void', [param('uint8_t', 'nRays')]) ## jakes-propagation-loss-model.h: void ns3::JakesPropagationLossModel::SetNOscillators(uint8_t nOscillators) [member function] cls.add_method('SetNOscillators', 'void', [param('uint8_t', 'nOscillators')]) ## jakes-propagation-loss-model.h: double ns3::JakesPropagationLossModel::DoGetLoss(ns3::Ptr<ns3::MobilityModel> a, ns3::Ptr<ns3::MobilityModel> b) const [member function] cls.add_method('DoGetLoss', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='private', is_virtual=True) return
513ffb018449433d80ca5969d6d0afd9b0ff2347 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11087/513ffb018449433d80ca5969d6d0afd9b0ff2347/ns3_module_wifi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 10386, 23, 46, 3223, 14225, 20527, 1488, 67, 5163, 12, 3085, 67, 2978, 16, 2028, 4672, 7541, 525, 3223, 17, 5986, 346, 367, 17, 7873, 17, 2284, 18, 76, 30, 3153, 23, 2866, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 10386, 23, 46, 3223, 14225, 20527, 1488, 67, 5163, 12, 3085, 67, 2978, 16, 2028, 4672, 7541, 525, 3223, 17, 5986, 346, 367, 17, 7873, 17, 2284, 18, 76, 30, 3153, 23, 2866, ...
globals = f.f_globals
if not hasattr(locals, 'has_key'): warnings.warn( "Frame %s has an invalid locals(): %r" % ( globals.get('__name__', 'unknown'), locals)) locals = {}
def collectLine(self, tb, extra_data): f = tb.tb_frame lineno = tb.tb_lineno co = f.f_code filename = co.co_filename name = co.co_name locals = f.f_locals globals = f.f_globals
30d01e5ca79b1778d16557cdc50f340cbb4c34af /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11400/30d01e5ca79b1778d16557cdc50f340cbb4c34af/collector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 1670, 12, 2890, 16, 8739, 16, 2870, 67, 892, 4672, 284, 273, 8739, 18, 18587, 67, 3789, 7586, 273, 8739, 18, 18587, 67, 17782, 1825, 273, 284, 18, 74, 67, 710, 1544, 273, 1825, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 1670, 12, 2890, 16, 8739, 16, 2870, 67, 892, 4672, 284, 273, 8739, 18, 18587, 67, 3789, 7586, 273, 8739, 18, 18587, 67, 17782, 1825, 273, 284, 18, 74, 67, 710, 1544, 273, 1825, ...
return '%b' % size
return '%db' % size
def size_display(self): size = self.size if size < 1024: return '%b' % size elif size < 1024 * 1024: return '%dKb' % int(size / 1024) else: return '%.2fMb' % (size / float(1024 * 1024))
c114aab6e3ffead3d3b362276b8bf3ebb9e69661 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12938/c114aab6e3ffead3d3b362276b8bf3ebb9e69661/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 963, 67, 5417, 12, 2890, 4672, 963, 273, 365, 18, 1467, 309, 963, 411, 6250, 30, 327, 1995, 1966, 11, 738, 963, 1327, 963, 411, 6250, 380, 6250, 30, 327, 1995, 72, 47, 70, 11, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 963, 67, 5417, 12, 2890, 4672, 963, 273, 365, 18, 1467, 309, 963, 411, 6250, 30, 327, 1995, 1966, 11, 738, 963, 1327, 963, 411, 6250, 380, 6250, 30, 327, 1995, 72, 47, 70, 11, 738, ...
res = sqrt(self.stats(*args, **kwds))
res = math.sqrt(self.stats(*args, **kwds))
def std(self, *args, **kwds): kwds['moments'] = 'v' res = sqrt(self.stats(*args, **kwds)) return res
8b3a4224a0eebc7cef8c46d42fde0301ea131ef1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/8b3a4224a0eebc7cef8c46d42fde0301ea131ef1/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2044, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 17149, 3292, 81, 22172, 3546, 273, 296, 90, 11, 400, 273, 4233, 18, 24492, 12, 2890, 18, 5296, 30857, 1968, 16, 2826, 25577, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2044, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 17149, 3292, 81, 22172, 3546, 273, 296, 90, 11, 400, 273, 4233, 18, 24492, 12, 2890, 18, 5296, 30857, 1968, 16, 2826, 25577, 3719, ...
log.msg('[Worker: %s] Got job (%s, %s)' % (self.id, self.job.name, self.job.job_id))
log.msg(LOG_PREFIX % self.id + 'Processing job %s' % self.job.job_id)
def gotJob(self, jdict): """ gotJob is a callback for the remoteobj's get_job method. Parameters: job -- Job object returned by remote's 'get_job' method """ if self.log_level > 3: log.msg('[Worker %s, gotJob] %s' % (self.id, jdict)) self.job = expand_job(jdict) if not isinstance(self.job, Job): raise NoJobException log.msg('[Worker: %s] Got job (%s, %s)' % (self.id, self.job.name, self.job.job_id)) try: self.doJob(self.job) except Exception, msg: log.msg(msg) d = self.remoteobj.callRemote('job_failed', self.job.job_id, msg) d.addErrback(self._catch_failure) self.restart()
a1e6bea8e524119732e09e5f8726851f8dcc7ab9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a1e6bea8e524119732e09e5f8726851f8dcc7ab9/dsage_worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 2278, 12, 2890, 16, 525, 1576, 4672, 3536, 2363, 2278, 353, 279, 1348, 364, 326, 2632, 2603, 1807, 336, 67, 4688, 707, 18, 225, 7012, 30, 1719, 1493, 3956, 733, 2106, 635, 2632, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 2278, 12, 2890, 16, 525, 1576, 4672, 3536, 2363, 2278, 353, 279, 1348, 364, 326, 2632, 2603, 1807, 336, 67, 4688, 707, 18, 225, 7012, 30, 1719, 1493, 3956, 733, 2106, 635, 2632, ...
result[id] = price
result[id] = price
def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('product.product') supplierinfo_obj = self.pool.get('product.supplierinfo') price_type_obj = self.pool.get('product.price.type')
4596ba93539994cff7b26b0e45fa4a78664d17f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/4596ba93539994cff7b26b0e45fa4a78664d17f0/pricelist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6205, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10791, 67, 350, 16, 26667, 16, 19170, 33, 7036, 16, 819, 33, 7036, 4672, 9163, 819, 273, 288, 296, 89, 362, 4278, 8380, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6205, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10791, 67, 350, 16, 26667, 16, 19170, 33, 7036, 16, 819, 33, 7036, 4672, 9163, 819, 273, 288, 296, 89, 362, 4278, 8380, 434...
content = wikipedia.translate(targetPage.site().lang, sd_template)+"\n"+content summ = wikipedia.translate(targetPage.site().lang, sd_tagging_sum)
content = wikipedia.translate( targetPage.site().lang, sd_template)+"\n"+content summ = wikipedia.translate(targetPage.site().lang, sd_tagging_sum)
def fix_1_double_redirect(self, redir_name): redir = wikipedia.Page(self.site, redir_name) # Show the title of the page we're working on. # Highlight the title in purple. wikipedia.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % redir.title()) newRedir = redir redirList = [] # bookkeeping to detect loops while True: redirList.append(u'%s:%s' % (newRedir.site().lang, newRedir.sectionFreeTitle())) try: targetPage = newRedir.getRedirectTarget() except wikipedia.IsNotRedirectPage: if len(redirList) == 1: wikipedia.output(u'Skipping: Page %s is not a redirect.' % redir.aslink()) break #do nothing elif len(redirList) == 2: wikipedia.output( u'Skipping: Redirect target %s is not a redirect.' % newRedir.aslink()) break # do nothing except wikipedia.SectionError: wikipedia.output( u'Warning: Redirect target section %s doesn\'t exist.' % newRedir.aslink()) except wikipedia.BadTitle, e: # str(e) is in the format 'BadTitle: [[Foo]]' wikipedia.output( u'Warning: Redirect target %s is not a valid page title.' % str(e)[10:]) #sometimes this error occures. Invalid Title starting with a '#' except wikipedia.InvalidTitle, err: wikipedia.output(u'Warning: %s' % err) break except wikipedia.NoPage: if len(redirList) == 1: wikipedia.output(u'Skipping: Page %s does not exist.' % redir.aslink()) break else: if self.always: wikipedia.output( u"Skipping: Redirect target %s doesn't exist." % newRedir.aslink()) break # skip if automatic else: wikipedia.output( u"Warning: Redirect target %s doesn't exist." % newRedir.aslink()) except wikipedia.ServerError: wikipedia.output(u'Skipping: Server Error') break else: wikipedia.output( u' Links to: %s.' % targetPage.aslink()) if targetPage.site() != self.site: wikipedia.output(u'Warning: redirect target (%s) is on a different site.' % (targetPage.aslink())) if self.always: break # skip if automatic # watch out for redirect loops if redirList.count(u'%s:%s' % (targetPage.site().lang, targetPage.sectionFreeTitle()) ) > 0: wikipedia.output( u'Warning: Redirect target %s forms a redirect loop.' % targetPage.aslink()) break ###xqt doesn't work. edits twice! try: content = targetPage.get(get_redirect=True) except wikipedia.SectionError: content = wikipedia.Page( targetPage.site(), targetPage.sectionFreeTitle() ).get(get_redirect=True) if targetPage.site().lang in sd_template \ and targetPage.site().lang in sd_tagging_sum: wikipedia.output(u"Tagging redirect for deletion") # Delete the two redirects content = wikipedia.translate(targetPage.site().lang, sd_template)+"\n"+content summ = wikipedia.translate(targetPage.site().lang, sd_tagging_sum) targetPage.put(content, summ) redir.put(content, summ) else: break # TODO Better implement loop redirect else: newRedir = targetPage continue # try: oldText = redir.get(get_redirect=True) except wikipedia.BadTitle: wikipedia.output(u"Bad Title Error") break text = self.site.redirectRegex().sub( '#%s %s' % (self.site.redirect( True ), targetPage.aslink()), oldText) if text == oldText: break summary = wikipedia.translate(self.site, msg_double) % targetPage.aslink() wikipedia.showDiff(oldText, text) if self.prompt(u'Do you want to accept the changes?'): try: redir.put(text, summary) except wikipedia.LockedPage: wikipedia.output(u'%s is locked.' % redir.title()) except wikipedia.SpamfilterError, error: wikipedia.output(u"Saving page [[%s]] prevented by spam filter: %s" % (redir.title(), error.url)) except wikipedia.PageNotSaved, error: wikipedia.output(u"Saving page [[%s]] failed: %s" % (redir.title(), error)) except wikipedia.NoUsername: wikipedia.output(u"Page [[%s]] not saved; sysop privileges required." % redir.title()) except wikipedia.Error, error: wikipedia.output(u"Unexpected error occurred trying to save [[%s]]: %s" % (redir.title(), error)) break
c499f5c4d7eb66e6b361af0a88786c3f2ea91f11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/c499f5c4d7eb66e6b361af0a88786c3f2ea91f11/redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 21, 67, 9056, 67, 7590, 12, 2890, 16, 225, 283, 1214, 67, 529, 4672, 283, 1214, 273, 21137, 18, 1964, 12, 2890, 18, 4256, 16, 283, 1214, 67, 529, 13, 468, 9674, 326, 2077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 21, 67, 9056, 67, 7590, 12, 2890, 16, 225, 283, 1214, 67, 529, 4672, 283, 1214, 273, 21137, 18, 1964, 12, 2890, 18, 4256, 16, 283, 1214, 67, 529, 13, 468, 9674, 326, 2077, ...
else: try: idents = _descr_to_identifiers(descr) except ValueError, e: warnings.append('Bad group identifier list: %s' % e) return self._tmp_groups[arg] = idents self._tmp_group_order.append(arg)
return try: idents = _descr_to_identifiers(descr) except ValueError, e: warnings.append('Bad group identifier list: %s' % e) return if not self._groupmembers.has_key(arg): self._groupnames.append(arg) self._groupmembers[arg] = {} group = self._groupmembers[arg] anygroup = self._anygroup for ident in idents: group[ident] = 1 anygroup[ident] = 1
def _process_field(self, tag, arg, descr, warnings): if tag == 'group': if arg is None: warnings.append(tag+' expected an argument (group name)') else: try: idents = _descr_to_identifiers(descr) except ValueError, e: warnings.append('Bad group identifier list: %s' % e) return self._tmp_groups[arg] = idents self._tmp_group_order.append(arg) elif tag in ('cvariable', 'cvar'): if arg is None: warnings.append(tag+' expected a single argument') return if self._tmp_cvar.has_key(arg): warnings.append('Redefinition of @%s %s' % (tag, arg)) self._tmp_cvar[arg] = descr elif tag in ('ivariable', 'ivar'): if arg is None: warnings.append(tag+' expected a single argument') return if self._tmp_ivar.has_key(arg): warnings.append('Redefinition of @%s %s' % (tag, arg)) self._tmp_ivar[arg] = descr elif tag == 'type': if arg is None: warnings.append(tag+' expected a single argument') return if self._tmp_type.has_key(arg): warnings.append('Redefinition of @%s %s' % (tag, arg)) self._tmp_type[arg] = descr else: ObjDoc._process_field(self, tag, arg, descr, warnings)
3483c073f313594e2126bb590c1618ff249ff09b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/3483c073f313594e2126bb590c1618ff249ff09b/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 1518, 12, 2890, 16, 1047, 16, 1501, 16, 18426, 16, 5599, 4672, 309, 1047, 422, 296, 1655, 4278, 309, 1501, 353, 599, 30, 5599, 18, 6923, 12, 2692, 6797, 2665, 392, 1237,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 1518, 12, 2890, 16, 1047, 16, 1501, 16, 18426, 16, 5599, 4672, 309, 1047, 422, 296, 1655, 4278, 309, 1501, 353, 599, 30, 5599, 18, 6923, 12, 2692, 6797, 2665, 392, 1237,...
self._color = color
self._set_color(color)
def color(self, *args): if not args: raise Error, "no color arguments" if len(args) == 1: color = args[0] if type(color) == type(""): # Test the color first try: id = self._canvas.create_line(0, 0, 0, 0, fill=color) except Tkinter.TclError: raise Error, "bad color string: %s" % `color` self._color = color return try: r, g, b = color except: raise Error, "bad color sequence: %s" % `color` else: try: r, g, b = args except: raise Error, "bad color arguments: %s" % `args` assert 0 <= r <= 1 assert 0 <= g <= 1 assert 0 <= b <= 1 x = 255.0 y = 0.5 self._color = "#%02x%02x%02x" % (int(r*x+y), int(g*x+y), int(b*x+y))
0af30ecb6eefe9189b9f08fc6c1d5a42a0f23363 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0af30ecb6eefe9189b9f08fc6c1d5a42a0f23363/turtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2036, 12, 2890, 16, 380, 1968, 4672, 309, 486, 833, 30, 1002, 1068, 16, 315, 2135, 2036, 1775, 6, 309, 562, 12, 1968, 13, 422, 404, 30, 2036, 273, 833, 63, 20, 65, 309, 618, 12, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2036, 12, 2890, 16, 380, 1968, 4672, 309, 486, 833, 30, 1002, 1068, 16, 315, 2135, 2036, 1775, 6, 309, 562, 12, 1968, 13, 422, 404, 30, 2036, 273, 833, 63, 20, 65, 309, 618, 12, 32...
log.warn("Ignoring tell %s: %s" % (parts[0][4:], " ".join(parts[1:])))
log.log("Ignoring tell %s: %s\n" % (parts[0][4:], " ".join(parts[1:])))
def parseLine (self, engine, line): parts = whitespaces.split(line.strip()) if parts[0] == "pong": self.lastpong = int(parts[1]) return # Illegal Move if parts[0].lower().find("illegal") >= 0: if parts[-2] == "sd" and parts[-1].isdigit(): print >> self.engine, "depth", parts[-1] return # A Move (Perhaps) if self.board: if parts[0] == "move": movestr = parts[1] # Old Variation elif d_plus_dot_expr.match(parts[0]) and parts[1] == "...": movestr = parts[2] else: movestr = False if movestr: self.changeLock.acquire() try: if self.forced: # If engine was set in pause just before the engine sent its # move, we ignore it. However the engine has to know that we # ignored it, and thus we step it one back print >> self.engine, "undo" else: try: move = parseAny(self.board, movestr) except ParsingError, e: raise PlayerIsDead, e if validate(self.board, move): self.board = None self.returnQueue.put(move) return raise PlayerIsDead, "Board didn't validate after move" finally: self.changeLock.release() self.movecon.acquire() self.movecon.notifyAll() self.movecon.release() # Analyzing if self.forced: if parts[:4] == ["0","0","0","0"]: # Crafty doesn't analyze until it is out of book print >> self.engine, "book off" return match = anare.match(line.strip()) if match: score, moves = match.groups() mvstrs = moves.split() moves = listToMoves (self.board, mvstrs, type=None, validate=True) # Don't emit if we weren't able to parse moves, or if we have a move # to kill the opponent king - as it confuses many engines if moves and not self.board.board.opIsChecked(): self.analyzeMoves = moves self.emit("analyze", moves) return # Offers draw if parts[0:2] == ["offer", "draw"]: self.emit("accept", Offer(DRAW_OFFER)) return # Resigns if "resign" in parts: self.emit("offer", Offer(RESIGNATION)) return #if parts[0].lower() == "error": # return #Tell User Error if parts[0] == "tellusererror": log.warn("Ignoring tellusererror: %s" % " ".join(parts[1:])) return # Tell Somebody if parts[0][:4] == "tell" and \ parts[0][4:] in ("others", "all", "ics", "icsnoalias"): log.warn("Ignoring tell %s: %s" % (parts[0][4:], " ".join(parts[1:]))) return if "feature" in parts: # We skip parts before 'feature', as some engines give us lines like # White (1) : feature setboard=1 analyze...e="GNU Chess 5.07" done=1 parts = parts[parts.index("feature"):] for i, pair in enumerate(parts[1:]): # As "parts" is split with no thoughs on quotes or double quotes # we need to do some extra handling. if pair.find("=") < 0: continue key, value = pair.split("=",1) if value[0] in ('"',"'") and value[-1] in ('"',"'"): value = value[1:-1] # If our pair was unfinished, like myname="GNU, we search the # rest of the pairs for a quotating mark. elif value[0] in ('"',"'"): rest = value[1:] + " " + " ".join(parts[2+i:]) i = rest.find('"') j = rest.find("'") if i + j == -2: log.warn("Missing endquotation in %s feature", repr(self)) value = rest elif min(i, j) != -1: value = rest[:min(i, j)] else: l = max(i, j) value = rest[:l] else: # All nonquoted values are ints value = int(value) if key == "done": if value == 1: self.returnQueue.put("ready") elif value == 0: log.warn("Adds 10 minutes timeout", repr(self)) # This'll buy you 10 more minutes self.timeout = time.time()+10*60 self.returnQueue.put("not ready") return self.features[key] = value
a0af5dadbdd69812a6c3a084a3b1ec62b013f594 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/a0af5dadbdd69812a6c3a084a3b1ec62b013f594/CECPEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1670, 261, 2890, 16, 4073, 16, 980, 4672, 2140, 273, 28186, 18, 4939, 12, 1369, 18, 6406, 10756, 225, 309, 2140, 63, 20, 65, 422, 315, 500, 75, 6877, 365, 18, 2722, 500, 75, 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, 1109, 1670, 261, 2890, 16, 4073, 16, 980, 4672, 2140, 273, 28186, 18, 4939, 12, 1369, 18, 6406, 10756, 225, 309, 2140, 63, 20, 65, 422, 315, 500, 75, 6877, 365, 18, 2722, 500, 75, 27...
Ooa = IT_DD(Oa, Ob)
Ooa = IT_DD(Oa, Ob)
def IT (Oa, Ob): """ Inclusion Transform. Return a transformed Oa, named Ooa, such that the impact of the independent operation Ob (against Oa) is efectively included into Oa. Also define the timestamp of the virtual operation. """ if Check_RA(Oa): #print "Check_BO(\n\t%s, \n\t%s \n)\t\t=> %s"%(Oa, Ob, Check_BO(Oa, Ob)) # just for debugging if Check_BO(Oa, Ob): Ooa = Convert_AA(Oa, Ob) else: Ooa = Oa elif T(Oa) == "Insert" and T(Ob) == "Insert": Ooa = IT_II(Oa, Ob) elif T(Oa) == "Insert" and T(Ob) == "Delete": Ooa = IT_ID(Oa, Ob) elif T(Oa) == "Delete" and T(Ob) == "Insert": Ooa = IT_DI(Oa, Ob) else: # if T(Oa) == "Delete" and T(Ob) == "Delete" Ooa = IT_DD(Oa, Ob) Ooa["source_site"] = Oa["source_site"] Ooa["timestamp"] = list(Oa["timestamp"]) # copy if dbg>=2: print "IT(\n\t%s, \n\t%s\n)\t\t=> %s;"%(Oa, Ob,Ooa) # just for debugging return Ooa
86f71e8cf633c9ded1b256af34857982171ed0b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2639/86f71e8cf633c9ded1b256af34857982171ed0b7/ConcurrentEditable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24142, 261, 51, 69, 16, 19659, 4672, 3536, 657, 15335, 11514, 18, 2000, 279, 10220, 531, 69, 16, 4141, 531, 11867, 16, 4123, 716, 326, 15800, 434, 326, 14807, 1674, 19659, 261, 23095, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24142, 261, 51, 69, 16, 19659, 4672, 3536, 657, 15335, 11514, 18, 2000, 279, 10220, 531, 69, 16, 4141, 531, 11867, 16, 4123, 716, 326, 15800, 434, 326, 14807, 1674, 19659, 261, 23095, 33...
raise Exception('Unable to use the cursor after having closing it')
raise psycopg2.ProgrammingError('Unable to use the cursor after having closing it')
def wrapper(self, *args, **kwargs): if not hasattr(self, '_obj'): raise Exception('Unable to use the cursor after having closing it') return f(self, *args, **kwargs)
6ed12388cd8764499432715facd71c45c9cd2df7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/6ed12388cd8764499432715facd71c45c9cd2df7/sql_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 2603, 11, 4672, 1002, 4250, 93, 22295, 75, 22, 18, 9459, 11987, 668, 2668, 3370, 358, 999, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 2603, 11, 4672, 1002, 4250, 93, 22295, 75, 22, 18, 9459, 11987, 668, 2668, 3370, 358, 999, 326,...
self.setRebootIgnored('IGNORED')
self.setRebootStatut('IGNORED')
def setRebootIgnored(self): self.setRebootIgnored('IGNORED')
cc0d89318fdc7616db760b027eaa4dea3da9ba56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/cc0d89318fdc7616db760b027eaa4dea3da9ba56/commands_on_host.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 31569, 15596, 12, 2890, 4672, 365, 18, 542, 31569, 15596, 2668, 3047, 3417, 5879, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 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, 444, 31569, 15596, 12, 2890, 4672, 365, 18, 542, 31569, 15596, 2668, 3047, 3417, 5879, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.cutedges[diredge] = 1
self.cutedges[diredge] = 1
def traverse(self, diredge, i): # to optimize(??), pass the instvars rather than self (like for i), and split diredge in two """As this call starts, we're crossing diredge for the first time in either direction, but we don't yet know whether we've previously visited the node N at other side or not. (When this call ends, we'll be coming back across diredge in the other direction, bringing a "lowest number seen during this call" and a new "next number to assign" i.) If we have seen that node N we're heading toward, make note of its number and bounce back right away (returning that number, and unchanged i). If we have never seen it, assign it the number i (which marks it as visited/seen now; do i+=1 for later), and for each of its other edges (none of which have been traversed either way, to start with), processed sequentially in some order, if by the time we get to that edge we *still* haven't traversed it (by coming across it into N from elsewhere, seeing N marked, and bouncing back out across it), then traverse it using this method recursively; when that loop is done we can finally return, traversing back out of N for the last time, backwards on diredge, and carrying the minimum number of all node-numbers seen. But one more thing: from all info we have as we return, figure out whether we've just noticed a proof that diredge is a cutedge, and record that fact if so. As explained elsewhere, all actual cutedges will get noticed this way ###k. """ priornode, N = diredge # why not let diredge be no more than this pair? num = self.nodenums.setdefault(N, i) # if visited, num says the number; if not, num is i and N is marked if num < i: # been there before ###k will we notice whether THIS diredge is a cutedge?? Maybe only when we cross it the other way?? (no...) return num, i # never been there before, so we're here (at N) now, and i is now assigned to it by setdefault assert num == i == self.nodenums[N] Ni = i # cache the value of self.nodenums[N] (just an optim to avoid looking it up later) i += 1 itinerary = self.neighbors_except(N, priornode) # the neighbors to visit (along the diredges (N, neighbor)) # As we begin the loop, no edge from N to a neighbor has been traversed either way, # but this doesn't mean those neighbors haven't been visited before (using some other edges into and out of them)! # And once inside the loop, we can't even say the edges haven't been traversed. # Suppose some edge has been traversed (into us and out again) -- will it cause any harm to traverse it again? # We'll definitely bounce right back (seeing the node visited), so the Q is, is it correct to record that number then. # Not sure yet, but for now assume it is ok! (Since it'll simplify the alg a lot to not record traversed edges.) ###k for neighbor in itinerary: subnum, i = self.traverse( (N, neighbor), i ) #e optim: faster to pass the pieces of diredge separately num = min(num, subnum) # should be ok to start with old value of i in num, returning min node we saw including N ###k # == Here is where we record some magic info related to cut edges.... # Consider: what if some edge is a cut edge? Then our alg starts on some node on one or the other side of it, # and at some point crosses it for the first time, entering this method with that edge (in that crossing direction) as diredge. # Since we haven't yet seen any nodes on the other side, we haven't yet seen N, so we do the recursive loop # and eventually get to this statement, by which time we've seen the entire other side. (Proof: if there's some # path from here (not crossing diredge again [exercise for reader: figure out how this condition gets used in this proof!]) # to some node Q we never visit, why didn't we? When we visited the last node before Q on that path, # for the first time, we started that loop above and promised to visit Q sometime during the loop # (unless we saw that it got visited from a different direction in a prior iteration of the same loop). QED.) # During the time we saw every node in the other side, we never hit any node on the first side # (since by our assumption of diredge being a cutedge, there is no way to contact one), # so the min nodenum we saw is exactly the i we were entered with and assigned to N (namely, Ni). # This proves that all cutedges, as diredge, reach this statement with num == Ni. # It remains to check whether any non-cutedges meet that condition. So consider a non-cutedge, being diredge # as we enter, and happening to be visiting N for the first time (otherwise the danger of false positive doesn't arise -- # i.e. it doesn't matter whether all non-cutedges actually *do* get into this method in that circumstance). # By hypothesis, there is some path thru diredge, hitting N, and going back around to priornode (forming a ring, # traversing no edge twice (not even in opp direction), though perhaps hitting some node twice (maybe even priornode or N). # At the moment of entry (when priornode has been visited but N has not), imagine this path, and ask what previously # visited node it hits first? (It hits priornode so there is some such node.) This node was visited before N since N has # not yet been visited! The remaining Q is: as we explore, will we for sure see this node (so that num is now <= its number)? # Suppose we won't. It means we failed to visit the just-prior (not yet visited as we enter) node on the path. # But as we proved above, we'll visit all nodes on any path from N which doesn't cross diredge. ### # But this alg can be easily proved to visit all nodes reachable from N without going backwards along diredge. # (Details of that proof left as exercise. Not completely trivial, but not hard.) So it does visit the node in question # (and all similar nodes) and does end up at this statement with num < Ni. # The above line of reasoning, finally, justifies the following statement's correctness and "completeness": if num == Ni: self.cutedges[diredge] = 1 #k could an edge get entered into this twice (once in each direction)?? ###k return num, i
6dbf011241eafd78647bcafe9c1bb5ceba38a6e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/6dbf011241eafd78647bcafe9c1bb5ceba38a6e7/op_select_doubly.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10080, 12, 2890, 16, 302, 2921, 908, 16, 277, 4672, 468, 358, 10979, 3680, 35, 3631, 1342, 326, 1804, 4699, 9178, 2353, 365, 261, 5625, 364, 277, 3631, 471, 1416, 302, 2921, 908, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10080, 12, 2890, 16, 302, 2921, 908, 16, 277, 4672, 468, 358, 10979, 3680, 35, 3631, 1342, 326, 1804, 4699, 9178, 2353, 365, 261, 5625, 364, 277, 3631, 471, 1416, 302, 2921, 908, 316, ...
self.assertEquals(util.wait(d), self.RESULT)
return d.addCallback(lambda result: self.assertEquals(result, self.RESULT)) return testwith(None).addCallback(lambda ign: testwith(defer.Deferred()))
def testStoppedRejectsNewTasks(self): """Test that Cooperators refuse new tasks when they have been stopped. """ for stuff in (None, defer.Deferred()): c = cooperator.Cooperator() c.stop() d = c.coiterate(iter(()), stuff) d.addCallback(self.cbIter) d.addErrback(self.ebIter) self.assertEquals(util.wait(d), self.RESULT)
f3a56bc136e5b5fa4542bd86397d2b4297734a70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7078/f3a56bc136e5b5fa4542bd86397d2b4297734a70/test_cooperator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 15294, 21705, 87, 1908, 6685, 12, 2890, 4672, 3536, 4709, 716, 7695, 30659, 1278, 1202, 394, 4592, 1347, 2898, 1240, 2118, 9627, 18, 3536, 364, 10769, 316, 261, 7036, 16, 2220, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 15294, 21705, 87, 1908, 6685, 12, 2890, 4672, 3536, 4709, 716, 7695, 30659, 1278, 1202, 394, 4592, 1347, 2898, 1240, 2118, 9627, 18, 3536, 364, 10769, 316, 261, 7036, 16, 2220, 18, ...
values = reduce(lambda x,y: x+', '+y, self.catData.domain['D_'+att].values)
values = reduce(lambda x,y: x+', '+y, self.discData.domain['D_'+att.name].values)
def setTable(self): self.res.setNumCols(2) self.res.setNumRows(len(self.discretizedAtts) - len(self.removedAtt))
dd1d765dc3e19161f4c3e8769c6d619e4b07ec77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/dd1d765dc3e19161f4c3e8769c6d619e4b07ec77/OWCategorize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30146, 12, 2890, 4672, 365, 18, 455, 18, 542, 2578, 8011, 12, 22, 13, 365, 18, 455, 18, 542, 2578, 4300, 12, 1897, 12, 2890, 18, 2251, 71, 1349, 1235, 3075, 87, 13, 300, 562, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30146, 12, 2890, 4672, 365, 18, 455, 18, 542, 2578, 8011, 12, 22, 13, 365, 18, 455, 18, 542, 2578, 4300, 12, 1897, 12, 2890, 18, 2251, 71, 1349, 1235, 3075, 87, 13, 300, 562, 12, 2...
start = line.find(fields[1])
start = len(fields[0]) + line[len(fields[0]):].find(fields[1])
def next(self) :
aa3323c8cd671f106afd606118197928832f631e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/aa3323c8cd671f106afd606118197928832f631e/ClustalIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 13, 294, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 13, 294, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for i in xrange(10):
t = time.time() for i in xrange(3):
def test_naacl_model(iters_per_unsup=10, iters_per_sup=10, optimizer=None, realistic=False): print "BUILDING MODEL" import time t = time.time() mode = theano.Mode(linker='c|py', optimizer=optimizer) if optimizer else default_mode if realistic: m = create_realistic(compile_mode=mode) else: m = create(compile_mode=mode) print 'BUILD took', time.time() - t prog_str = [] idx_of_node = {} for i, node in enumerate(m.pretraining_update.maker.env.toposort()): idx_of_node[node] = i if False and i > -1: print ' ', i, node, [(ii, idx_of_node.get(ii.owner, 'IN')) for ii in node.inputs] prog_str.append(str(node)) #print input_pretraining_gradients[4].owner.inputs #print input_pretraining_gradients[4].owner.inputs[1].owner.inputs #sys.exit() print "PROGRAM LEN %i HASH %i"% (len(m.pretraining_update.maker.env.nodes), reduce(lambda a, b: hash(a) ^ hash(b),prog_str)) rng = N.random.RandomState(unittest_tools.fetch_seed(23904)) inputs = [rng.rand(10,9) for i in 1,2,3] targets = N.asarray([0,3,4,2,3,4,4,2,1,0]) #print inputs print 'UNSUPERVISED PHASE' for i in xrange(10): for j in xrange(iters_per_unsup): m.pretraining_update(*inputs) s0, s1 = [str(j) for j in m.pretraining_update(*inputs)] print 'huh?', i, iters_per_unsup, iters_per_unsup * (i+1), s0, s1 if iters_per_unsup == 10: assert s0.startswith('0.403044') assert s1.startswith('0.074898') print 'FINETUNING GRAPH' print 'SUPERVISED PHASE COSTS (%s)'%optimizer for i in xrange(10): for j in xrange(iters_per_unsup): m.finetuning_update(*(inputs + [targets])) s0 = str(m.finetuning_update(*(inputs + [targets]))) print iters_per_sup * (i+1), s0 if iters_per_sup == 10: s0f = float(s0) assert 15.6510 < s0f and s0f < 15.6512
0d0012e573158777b1935497ae8b0b8343846e3e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/0d0012e573158777b1935497ae8b0b8343846e3e/test_naacl09.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6582, 10150, 67, 2284, 12, 27270, 67, 457, 67, 318, 2859, 33, 2163, 16, 1400, 87, 67, 457, 67, 2859, 33, 2163, 16, 13066, 33, 7036, 16, 2863, 5846, 33, 8381, 4672, 1172, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6582, 10150, 67, 2284, 12, 27270, 67, 457, 67, 318, 2859, 33, 2163, 16, 1400, 87, 67, 457, 67, 2859, 33, 2163, 16, 13066, 33, 7036, 16, 2863, 5846, 33, 8381, 4672, 1172, 31...
self._start = other._end
self._start = other._end.copy()
def setEndPoint(self, other, which): if which == "startToStart": self._start = other._start self._startObj = other._startObj elif which == "startToEnd": self._start = other._end self._startObj = other._endObj elif which == "endToStart": self._end = other._start self._endObj = other._starttObj elif which == "endToEnd": self._end = other._end self._endObj = other._endObj else: raise ValueError("which=%s" % which)
a215f89a67fd5d4904cd6880388790436e209bca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/a215f89a67fd5d4904cd6880388790436e209bca/compoundDocuments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19743, 2148, 12, 2890, 16, 1308, 16, 1492, 4672, 309, 1492, 422, 315, 1937, 28939, 6877, 365, 6315, 1937, 273, 1308, 6315, 1937, 365, 6315, 1937, 2675, 273, 1308, 6315, 1937, 2675, 1327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19743, 2148, 12, 2890, 16, 1308, 16, 1492, 4672, 309, 1492, 422, 315, 1937, 28939, 6877, 365, 6315, 1937, 273, 1308, 6315, 1937, 365, 6315, 1937, 2675, 273, 1308, 6315, 1937, 2675, 1327, ...
self.api.db.do("INSERT INTO person_site (person_id, site_id)" \ " VALUES(%(person_id)d, %(site_id)d)", locals()) if commit: self.api.db.commit() if 'person_ids' in self and person_id not in self['person_ids']:
if person_id not in self['person_ids']: assert site_id not in person['site_ids'] self.api.db.do("INSERT INTO person_site (person_id, site_id)" \ " VALUES(%(person_id)d, %(site_id)d)", locals()) if commit: self.api.db.commit()
def add_person(self, person, commit = True): """ Add person to existing site. """
84507e9f37868966f34f1184f902986b6004a812 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/84507e9f37868966f34f1184f902986b6004a812/Sites.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12479, 12, 2890, 16, 6175, 16, 3294, 273, 1053, 4672, 3536, 1436, 6175, 358, 2062, 2834, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12479, 12, 2890, 16, 6175, 16, 3294, 273, 1053, 4672, 3536, 1436, 6175, 358, 2062, 2834, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
or _measures.doframe(self, v):
or _measures.do_frame(self, v):
def doframe(self, v): """This method will set the measure specified as part of a frame.
187b2d51045f54fa34a7e021c22160e45c9dbd75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7472/187b2d51045f54fa34a7e021c22160e45c9dbd75/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3789, 12, 2890, 16, 331, 4672, 3536, 2503, 707, 903, 444, 326, 6649, 1269, 487, 1087, 434, 279, 2623, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3789, 12, 2890, 16, 331, 4672, 3536, 2503, 707, 903, 444, 326, 6649, 1269, 487, 1087, 434, 279, 2623, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sim.getRNG().setSeed(12345)
sim.getRNG().set(seed=12345)
def checkSexMode(ms): '''Check the assignment of sex to offspring''' pop = sim.Population(size=[40]) pop.evolve(initOps=sim.InitSex(), matingScheme=ms, gen=1) # return individual sex as a string return ''.join(['M' if ind.sex() == sim.MALE else 'F' for ind in pop.individuals()])
205f55f8c6cd28aed704d70838912648f07ac340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/205f55f8c6cd28aed704d70838912648f07ac340/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 55, 338, 2309, 12, 959, 4672, 9163, 1564, 326, 6661, 434, 19631, 358, 21174, 11638, 26418, 1843, 273, 3142, 18, 31821, 12, 1467, 22850, 7132, 5717, 1843, 18, 14965, 5390, 12, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 55, 338, 2309, 12, 959, 4672, 9163, 1564, 326, 6661, 434, 19631, 358, 21174, 11638, 26418, 1843, 273, 3142, 18, 31821, 12, 1467, 22850, 7132, 5717, 1843, 18, 14965, 5390, 12, 2738, ...
outputs.extend (self.run_peer (cmd))
cmd = self.find_peer (cmd_name) outputs.extend (cmd.get_outputs())
def get_outputs (self): # This command doesn't have any outputs of its own, so just # get the outputs of all its sub-commands. outputs = [] for (func, cmd) in self.sub_commands: if func is None or func(): outputs.extend (self.run_peer (cmd))
c92e3b3b6b4e86b00e5476831c1d34d048a5ac9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c92e3b3b6b4e86b00e5476831c1d34d048a5ac9e/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12295, 261, 2890, 4672, 468, 1220, 1296, 3302, 1404, 1240, 1281, 6729, 434, 2097, 4953, 16, 1427, 2537, 468, 336, 326, 6729, 434, 777, 2097, 720, 17, 7847, 18, 6729, 273, 5378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12295, 261, 2890, 4672, 468, 1220, 1296, 3302, 1404, 1240, 1281, 6729, 434, 2097, 4953, 16, 1427, 2537, 468, 336, 326, 6729, 434, 777, 2097, 720, 17, 7847, 18, 6729, 273, 5378, ...
try: prettfyInplace(fileName,bkDir, normalize_use=defaultsDict['normalize-use'], upcase_keywords=defaultsDict['upcase'], interfaces_dir=defaultsDict['interface-dir'], replace=defaultsDict['replace']) except: import traceback sys.stdout.write('-'*60+"\n") traceback.print_exc(file=sys.stdout) sys.stdout.write('-'*60+"\n") sys.stdout.write("Processing file '"+fileName+"'\n")
prettfyInplace(fileName,bkDir, normalize_use=defaultsDict['normalize-use'], upcase_keywords=defaultsDict['upcase'], interfaces_dir=defaultsDict['interface-dir'], replace=defaultsDict['replace'])
def prettfyInplace(fileName,bkDir="preprettify",normalize_use=1, upcase_keywords=1, interfaces_dir=None, replace=None,logFile=sys.stdout): """Same as prettify, but inplace, replaces only if needed""" if not os.path.exists(bkDir): os.mkdir(bkDir) if not os.path.isdir(bkDir): raise Error("bk-dir must be a directory, was "+bkDir) infile=open(fileName,'r') outfile=prettifyFile(infile, normalize_use, upcase_keywords, interfaces_dir, replace) if (infile==outfile): return infile.seek(0) outfile.seek(0) same=1 while 1: l1=outfile.readline() l2=infile.readline() if (l1!=l2): same=0 break if not l1: break if (not same): bkName=os.path.join(bkDir,os.path.basename(fileName)) bName=bkName i=0 while os.path.exists(bkName): i+=1 bkName=bName+"."+str(i) infile.seek(0) bkFile=file(bkName,"w") while 1: l1=infile.readline() if not l1: break bkFile.write(l1) bkFile.close() outfile.seek(0) newFile=file(fileName,'w') while 1: l1=outfile.readline() if not l1: break newFile.write(l1) newFile.close() infile.close() outfile.close()
d1fef2183aced069fa880442943e9128e08634fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2834/d1fef2183aced069fa880442943e9128e08634fd/prettify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 748, 74, 93, 382, 964, 12, 17812, 16, 24600, 1621, 1546, 1484, 1484, 748, 1164, 3113, 12237, 67, 1202, 33, 21, 16, 731, 3593, 67, 11771, 33, 21, 16, 7349, 67, 1214, 33, 7036, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 748, 74, 93, 382, 964, 12, 17812, 16, 24600, 1621, 1546, 1484, 1484, 748, 1164, 3113, 12237, 67, 1202, 33, 21, 16, 731, 3593, 67, 11771, 33, 21, 16, 7349, 67, 1214, 33, 7036, 16...
zinfo = zipfile.ZipInfo('meta.xml') zfile.writestr(zinfo, s1)
zfile.writestr('meta.xml', s1)
def assemble_my_parts(self): """Assemble the `self.parts` dictionary. Extend in subclasses. """ #ipshell('At assemble_parts') writers.Writer.assemble_parts(self) f = tempfile.NamedTemporaryFile() zfile = zipfile.ZipFile(f, 'w', zipfile.ZIP_DEFLATED) zinfo = zipfile.ZipInfo('content.xml') zfile.writestr(zinfo, self.visitor.content_astext()) zfile.writestr('mimetype', MIME_TYPE) s1 = self.create_manifest() zinfo = zipfile.ZipInfo('META-INF/manifest.xml') zfile.writestr(zinfo, s1) s1 = self.create_meta() zinfo = zipfile.ZipInfo('meta.xml') zfile.writestr(zinfo, s1) s1 = self.get_stylesheet() zinfo = zipfile.ZipInfo('styles.xml') zfile.writestr(zinfo, s1) self.store_embedded_files(zfile) zfile.close() f.seek(0) whole = f.read() f.close() self.parts['whole'] = whole self.parts['encoding'] = self.document.settings.output_encoding self.parts['version'] = docutils.__version__
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19540, 67, 4811, 67, 6019, 12, 2890, 4672, 3536, 1463, 10045, 326, 1375, 2890, 18, 6019, 68, 3880, 18, 225, 27686, 316, 15320, 18, 3536, 468, 625, 10304, 2668, 861, 19540, 67, 6019, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19540, 67, 4811, 67, 6019, 12, 2890, 4672, 3536, 1463, 10045, 326, 1375, 2890, 18, 6019, 68, 3880, 18, 225, 27686, 316, 15320, 18, 3536, 468, 625, 10304, 2668, 861, 19540, 67, 6019, 6134...
def _getContentsAndSupercats(self, recurse = False, purge = False, startFrom = None):
def _getContentsAndSupercats(self, recurse=0, purge=False, startFrom=None):
def _getContentsAndSupercats(self, recurse = False, purge = False, startFrom = None): """ Cache results of _parseCategory for a second call.
815d9901434f2ff6d622d0ccf808499026b5da0e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/815d9901434f2ff6d622d0ccf808499026b5da0e/catlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 6323, 1876, 8051, 24750, 12, 2890, 16, 11502, 33, 20, 16, 11668, 33, 8381, 16, 787, 1265, 33, 7036, 4672, 3536, 4379, 1686, 434, 389, 2670, 4457, 364, 279, 2205, 745, 18, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 6323, 1876, 8051, 24750, 12, 2890, 16, 11502, 33, 20, 16, 11668, 33, 8381, 16, 787, 1265, 33, 7036, 4672, 3536, 4379, 1686, 434, 389, 2670, 4457, 364, 279, 2205, 745, 18, 2, ...
taskObject(InstallScriptControls())
def actOnWorkflowSpec(self, workflowSpec, workflowCache): """ Create the workflow wide job template for jobs """ logging.info( "BulkGenerator.actOnWorkflowSpec(%s, %s)" % ( workflowSpec, workflowCache) ) wftype = workflowSpec.parameters['WorkflowType'] logging.info("Generating template for %s type jobs" % wftype) workflowSpec.payload.operate(TaskObjectMaker(wftype)) jobTemplate = os.path.join(workflowCache, wftype) self.workflowSpec = workflowSpec directory = self.newJobArea(workflowSpec.workflowName(), jobTemplate) taskObject = workflowSpec.payload.taskObject taskObject['Activity'] = workflowSpec.parameters.get("Activity", None) generateShREEKConfig(taskObject) installBulkDashboardInfo(taskObject) taskObject(GenerateMainScript()) taskObject(InsertBulkAppDetails("PayloadNode")) taskObject(InsertCmsGenStructure("PayloadNode")) taskObject(InstallRunResComponent()) taskObject(InsertFrontierTools(self.componentConfig.get("FrontierDiagnostic", False))) taskObject(InsertJobReportTools()) taskObject(InsertCleanUp()) taskObject(InstallLogArch()) taskObject(InstallBulkFastMerge()) taskObject(NewInsertStageOut()) taskObject(InstallScriptControls()) taskObject(InstallUserSandbox()) taskObject(InsertLogCollect()) logging.debug( "JobGenerator: Calling Creator:") self.creator(taskObject) logging.debug("JobGenerator: Creator finished")
a6ace665dbdba8d171ba66c98dc2fd18e775be74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/a6ace665dbdba8d171ba66c98dc2fd18e775be74/BulkGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1328, 1398, 8484, 1990, 12, 2890, 16, 6095, 1990, 16, 6095, 1649, 4672, 3536, 1788, 326, 6095, 14812, 1719, 1542, 364, 6550, 3536, 2907, 18, 1376, 12, 315, 13112, 3908, 18, 621, 1398, 84...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1328, 1398, 8484, 1990, 12, 2890, 16, 6095, 1990, 16, 6095, 1649, 4672, 3536, 1788, 326, 6095, 14812, 1719, 1542, 364, 6550, 3536, 2907, 18, 1376, 12, 315, 13112, 3908, 18, 621, 1398, 84...
"a&apos;b"
"a&
def escape_text(s): """Takes in a string and converts ``'`` to ``&apos;`` and ``"`` to ``&quot;``. Note: if ``s`` is ``None``, then we return ``None``. >>> escape_text(None) None >>> escape_text("") "" >>> escape_text("a'b") "a&apos;b" >>> escape_text('a"b') "a&quot;b" """ if not s: return s for mem in (("&", "&amp;"), (">", "&gt;"), ("<", "&lt;"), ("\"", "&quot;"), ("'", "&#x27;"), ("/", "&#x2F;")): s = s.replace(mem[0], mem[1]) return s
0a6e05f7d56eda3aa55ec98939b2dc9164bbb1e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11836/0a6e05f7d56eda3aa55ec98939b2dc9164bbb1e6/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 67, 955, 12, 87, 4672, 3536, 11524, 316, 279, 533, 471, 7759, 1375, 11294, 10335, 358, 12176, 10, 438, 538, 31, 10335, 471, 12176, 8366, 68, 358, 12176, 10, 9270, 31, 68, 8338, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 67, 955, 12, 87, 4672, 3536, 11524, 316, 279, 533, 471, 7759, 1375, 11294, 10335, 358, 12176, 10, 438, 538, 31, 10335, 471, 12176, 8366, 68, 358, 12176, 10, 9270, 31, 68, 8338, 2...
mod_data_seconds = zip(mod_data_dict[mod_time_col_name][mod_comp_ranges[0]:mod_comp_ranges[1]], mod_data_dict[mod_label_temp[3]][mod_comp_ranges[0]:mod_comp_ranges[1]])
mod_data_seconds = zip(mod_data_dict[mod_Xaxis_column_name][mod_comp_ranges[0]:mod_comp_ranges[1]], mod_data_dict[mod_label_temp[3]][mod_comp_ranges[0]:mod_comp_ranges[1]])
def extract_comp_data(comp_file_info): ## Read in d line dict from config file and Process data from source .csv files. exp_data = [] mod_data = [] exp_data_dict = {} mod_data_dict = {} exp_scatter_data_labels = [] mod_scatter_data_labels = [] #List of variables from configuration file column names. exp_data_filename = comp_file_info['Exp_Filename'] #String of filename exp_column_name_row_index = int(comp_file_info['Exp_Col_Name_Row'])-1 #Experimental Data Column Name Row Number exp_data_row_index = int(comp_file_info['Exp_Data_Row'])-1 #Experimental Data Starting Row Number exp_start_time_data_val = comp_file_info['Exp_Start_(min.)'] #String in minutes to start exp plot data exp_stop_time_data_val = comp_file_info['Exp_End_(min.)'] #String in minutes to stop exp plot data exp_start_time_comp_val = comp_file_info['Exp_Comp_Start_(min.)'] #String in minutes to start exp compare data exp_stop_time_comp_val = comp_file_info['Exp_Comp_End_(min.)'] #String in minutes to start exp compare data exp_initial_value = comp_file_info['Exp_Intitial_Value'] #Initial Value for Quantity exp_column_name_value = comp_file_info['Exp_Col_Name'].strip() #Experimental Data Column Name mod_data_filename = comp_file_info['Mod_Filename'] #String of filename mod_column_name_row_index = int(comp_file_info['Mod_Col_Name_Row'])-1 #Modeling Data Column Name Row Number mod_data_row_index = int(comp_file_info['Mod_Data_Row'])-1 #Modeling Data Starting Row Number mod_start_time_data_val = comp_file_info['Mod_Start_(min.)'] #String in minutes to start mod plot data mod_stop_time_data_val = comp_file_info['Mod_End_(min.)'] #String in minutes to stop mod plot data mod_start_time_comp_val = comp_file_info['Mod_Comp_Start_(min.)'] #String in minutes to start mod compare data mod_stop_time_comp_val = comp_file_info['Mod_Comp_End_(min.)'] #String in minutes to start mod compare data mod_initial_value = comp_file_info['Mod_Intitial_Value'] #Initial Value for Quantity mod_column_name_value = comp_file_info['Mod_Col_Name'].strip() #Modeling Data Column Name # Create Scatter Data Labels for the comparison results. if exp_column_name_value[0] == '[': print "Exp Column Name List Detected" exp_compound_col_names = eval(exp_column_name_value) #print "Exp Compound Column Names:", exp_compound_col_names for name in exp_compound_col_names: print "Exp Sub-Column Name:", name exp_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: print "Single Exp. Column Name:", exp_column_name_value exp_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+exp_column_name_value) if mod_column_name_value[0] == '[': print "Mod Column Name List Detected" mod_compound_col_names = eval(mod_column_name_value) #print "Mod Compound Column Names:", mod_column_name_value for name in mod_compound_col_names: print "Mod Sub-Column Name:", name mod_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: print "Single Mod. Column Name:", mod_column_name_value mod_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+mod_column_name_value) #print "Exp Data Labels:\n", exp_scatter_data_labels #print "Mod Data Labels:\n", mod_scatter_data_labels combined_scatter_data_labels = [exp_scatter_data_labels,mod_scatter_data_labels] #print "Combined Scatter Data:",combined_scatter_data_labels min_max = comp_file_info['max/min'] #String indicating if min or max value is required. group_value = int(comp_file_info['Group']) try: exp_file_object = open(data_directory+exp_data_filename, "U") except: print "!!! Experimental "+exp_data_filename+" Data File will not open. !!!" exit() try: mod_file_object = open(data_directory+mod_data_filename, "U") except: print "!!! Modeling "+mod_data_filename+" Data File will not open. !!!" exit() ## Start File Processing #Read in experimental data and flip lists from rows to columns. print "Reading in:", exp_data_filename exp_data_cols = zip(*csv.reader(exp_file_object)) #Convert tuples to lists. exp_data_list = [list(sublist) for sublist in exp_data_cols] #Pull the Time column name out and strip whitespace. Assumes that Time is in first column. exp_time_col_name = exp_data_list[0][exp_column_name_row_index].strip() #Build Experimental Data Dictionary. #Catch errors if conversion of data from string to float fails. for exp_list in exp_data_list: try: temp_list = [] for x in exp_list[exp_data_row_index:]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) exp_data_dict[exp_list[exp_column_name_row_index].strip()] = temp_list except: print "!!! Exp Data Conversion in Column Name "+exp_list[exp_column_name_row_index].strip()+". !!!" exit() #Read in model data and flip lists from rows to columns. print "Reading in:", mod_data_filename mod_data_cols = zip(*csv.reader(mod_file_object)) #Convert tuples to lists. mod_data_list = [list(sublist) for sublist in mod_data_cols] #Pull the Time column name out and strip whitespace from ends of string. mod_time_col_name = mod_data_list[0][mod_column_name_row_index].strip() #Build Prediction/Model Data Dictionary #Catch errors if conversion of data from string to float fails. for mod_list in mod_data_list: try: temp_list = [] for x in mod_list[mod_data_row_index:]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) mod_data_dict[mod_list[mod_column_name_row_index].strip()] = temp_list except: print "!!! Mod Data Conversion in Column Name "+mod_list[mod_column_name_row_index].strip()+". !!!" exit() # Assuming that all column time ranges are the same. Passing in the first Column Name. exp_comp_ranges = find_start_stop_index(exp_data_dict,exp_time_col_name,exp_start_time_data_val,exp_stop_time_data_val,exp_start_time_comp_val,exp_stop_time_comp_val) mod_comp_ranges = find_start_stop_index(mod_data_dict,mod_time_col_name,mod_start_time_data_val,mod_stop_time_data_val,mod_start_time_comp_val,mod_stop_time_comp_val) #print exp_comp_ranges #print mod_comp_ranges #### Begin Column specific operations. scatter_counter = 0 for scatter_label in combined_scatter_data_labels[0]: #print scatter_counter exp_label_temp = [] mod_label_temp = [] exp_label_temp = split("~",combined_scatter_data_labels[0][scatter_counter]) mod_label_temp = split("~",combined_scatter_data_labels[1][scatter_counter]) #print "Exp. Label Split:", exp_label_temp #print "Mod. Label Split:", mod_label_temp ##Find max or min values. exp_data_values_comp = exp_data_dict[exp_label_temp[3]][exp_comp_ranges[2]:exp_comp_ranges[3]] mod_data_values_comp = mod_data_dict[mod_label_temp[3]][mod_comp_ranges[2]:mod_comp_ranges[3]] #print "Exp data values:", exp_data_values_comp #print "Mod data values:", mod_data_values_comp # This allows the d line Quantity value to be set to 0 when either model or experimental data is missing. if comp_file_info['Quantity'] == str(0): print "Quantity set to 0, no comparison made." else: if min_max == 'max': print "*** Rise Computed ***" temp_exp_data_values = [x for x in exp_data_values_comp if x != 'Null'] exp_rise_value = max(temp_exp_data_values) - float(exp_initial_value) temp_mod_data_values = [x for x in mod_data_values_comp if x != 'Null'] mod_rise_value = max(temp_mod_data_values) - float(mod_initial_value) print "Experimental Initial Value is:", exp_initial_value print "Experimental Rise Value is:", exp_rise_value print "Model Initial Value is:", mod_initial_value print "Model Rise Value is:", mod_rise_value print "\n*** Computing Relative Difference ***" try: relative_difference = ((mod_rise_value-exp_rise_value)/exp_rise_value) print "Relative Difference is:", relative_difference #Append Rise Values to Global Scatter Data Dictionary. scatter_data_dict[combined_scatter_data[0][scatter_counter]] = [exp_rise_value,mod_rise_value,relative_difference] except: print "!!! Computation of relative_difference failed. !!!\nCheck source data for columns listed above." exit() elif min_max == 'min': print "*** Drop Computed ***" temp_exp_data_values = [x for x in exp_data_values_comp if x != 'Null'] exp_drop_value = float(exp_initial_value) - min(temp_exp_data_values) temp_mod_data_values = [x for x in mod_data_values_comp if x != 'Null'] mod_drop_value = float(mod_initial_value) - min(temp_mod_data_values) print "Experimental Initial Value is:", exp_initial_value print "Experimental Drop Value is:", exp_drop_value print "Model Initial Value is:", mod_initial_value print "Model Drop Value is:", mod_drop_value print "\n*** Computing Relative Difference ***" try: relative_difference = ((mod_drop_value-exp_drop_value)/exp_drop_value) print "Relative Difference is:", relative_difference #Append Drop Values to Global Scatter Data Dictionary. scatter_data_dict[combined_scatter_data[0][scatter_counter]] = [exp_drop_value,mod_drop_value,relative_difference] except: print "!!! Computation of relative_difference failed. !!!\nCheck source data for columns listed above." exit() else: print "!!! Min or Max is undefined in the input file. !!!" exit() #Create data lists based on specified ranges exp_data_seconds = zip(exp_data_dict[exp_time_col_name][exp_comp_ranges[0]:exp_comp_ranges[1]], exp_data_dict[exp_label_temp[3]][exp_comp_ranges[0]:exp_comp_ranges[1]]) #print exp_data_seconds mod_data_seconds = zip(mod_data_dict[mod_time_col_name][mod_comp_ranges[0]:mod_comp_ranges[1]], mod_data_dict[mod_label_temp[3]][mod_comp_ranges[0]:mod_comp_ranges[1]]) #print mod_data_seconds #Convert time to minutes from seconds. exp_data.append([[x[0] / 60, x[1]] for x in exp_data_seconds]) #print exp_data mod_data.append([[x[0] / 60, x[1]] for x in mod_data_seconds]) #print mod_data #print "\nUpdating the Scatter Counter.\n" scatter_counter = scatter_counter + 1 # Close files exp_file_object.close() mod_file_object.close() return [exp_data,mod_data]
c2bd4f556a2ce61eab4e48660ca05fb2aaf49751 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/c2bd4f556a2ce61eab4e48660ca05fb2aaf49751/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 1329, 67, 892, 273, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 1329, 67, 892, 273, 5...
if not self.comps.has_group(group)
if not self.compsobj.has_group(group):
def getPackagesFromGroup(self, group) """Get a list of package names from a comps object
be44e2527d8134ec855e844728a1201a6db6ce2b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/be44e2527d8134ec855e844728a1201a6db6ce2b/gather.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30401, 1023, 1265, 1114, 12, 2890, 16, 1041, 13, 3536, 967, 279, 666, 434, 2181, 1257, 628, 279, 13979, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30401, 1023, 1265, 1114, 12, 2890, 16, 1041, 13, 3536, 967, 279, 666, 434, 2181, 1257, 628, 279, 13979, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
lineR = re.compile(r'<tr>(?:<td>.*?</td>){1,2}<td><a href=".+?">(?P<datetime>.+?)</a></td><td><a href=".+?"(?: class="new"|) title=".+?">(?P<username>.+?)</a>.*?</td><td>(?P<resolution>.*?)</td><td class=".+?">(?P<filesize>.+?)</td><td>(?P<comment>.*?)</td></tr>')
lineR = re.compile(r'<tr>(?:<td>.*?</td>){1,2}<td.*?><a href=".+?">(?P<datetime>.+?)</a></td><td>(?P<resolution>.*?)<span.*?>\((?P<filesize>.+?)\)</span></td><td><a href=".+?"(?: class="new"|) title=".+?">(?P<username>.+?)</a>.*?</td><td>.*?<span class="comment">(?P<comment>.*?)</span></td></tr>') if not lineR.search(history.group()): lineR = re.compile(r'<tr>(?:<td>.*?</td>){1,2}<td><a href=".+?">(?P<datetime>.+?)</a></td><td><a href=".+?"(?: class="new"|) title=".+?">(?P<username>.+?)</a>.*?</td><td>(?P<resolution>.*?)</td><td class=".+?">(?P<filesize>.+?)</td><td>(?P<comment>.*?)</td></tr>')
def getFileVersionHistory(self): """Return the image file's version history.
1461bb4b1b75a188d161d512b7708c76e9cb090e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/1461bb4b1b75a188d161d512b7708c76e9cb090e/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 1444, 5623, 12, 2890, 4672, 3536, 990, 326, 1316, 585, 1807, 1177, 4927, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 1444, 5623, 12, 2890, 4672, 3536, 990, 326, 1316, 585, 1807, 1177, 4927, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
with open(support.TESTFN, "rb") as f:
with self.open(support.TESTFN, "rb") as f:
def test_garbage_collection(self): # C BufferedWriter objects are collected, and collecting them flushes # all data to disk. # The Python version has __del__, so it ends into gc.garbage instead rawio = self.FileIO(support.TESTFN, "w+b") f = self.tp(rawio) f.write(b"123xxx") f.x = f wr = weakref.ref(f) del f support.gc_collect() self.assert_(wr() is None, wr) with open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"123xxx")
c5e8d6ee2b17a975fd7ca8e44a05ff0d8cd106c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/c5e8d6ee2b17a975fd7ca8e44a05ff0d8cd106c9/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 75, 12332, 67, 5548, 12, 2890, 4672, 468, 385, 22490, 2184, 854, 12230, 16, 471, 30160, 2182, 3663, 281, 468, 777, 501, 358, 4234, 18, 468, 1021, 6600, 1177, 711, 1001, 3771, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 75, 12332, 67, 5548, 12, 2890, 4672, 468, 385, 22490, 2184, 854, 12230, 16, 471, 30160, 2182, 3663, 281, 468, 777, 501, 358, 4234, 18, 468, 1021, 6600, 1177, 711, 1001, 3771, ...
ret = ["--ignore=%s" % \ os.path.join(self._source_dir, "tools", "valgrind", "tsan", "ignores.txt")]
ret = [] ignore_files = ["ignores.txt"] platform_suffix = { 'darwin': 'mac', 'linux2': 'linux' }[sys.platform] ignore_files.append("ignores_%s.txt" % platform_suffix) for ignore_file in ignore_files: fullname = os.path.join(self._source_dir, "tools", "valgrind", "tsan", ignore_file) if os.path.exists(fullname): ret += ["--ignore=%s" % fullname]
def ToolSpecificFlags(self): ret = ["--ignore=%s" % \ os.path.join(self._source_dir, "tools", "valgrind", "tsan", "ignores.txt")] ret += ["--file-prefix-to-cut=%s/" % self._source_dir]
c3e86a745c23deccefd4503075fd890d5737b57f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/c3e86a745c23deccefd4503075fd890d5737b57f/valgrind_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13288, 9969, 5094, 12, 2890, 4672, 325, 273, 5378, 225, 2305, 67, 2354, 273, 8247, 724, 3485, 18, 5830, 11929, 4072, 67, 8477, 273, 288, 296, 28076, 4278, 296, 5821, 2187, 296, 20132, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13288, 9969, 5094, 12, 2890, 4672, 325, 273, 5378, 225, 2305, 67, 2354, 273, 8247, 724, 3485, 18, 5830, 11929, 4072, 67, 8477, 273, 288, 296, 28076, 4278, 296, 5821, 2187, 296, 20132, 22...
P ( contents = [
P ( contents = [
def makePage( _T, _N, _M, MIRRORS_DATA, lang, charset ): navigation = Tree \ ( [ P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['home'], href=makeURL( '', lang ))] ), Tree \ ( [ P ( contents = [ Img( src = '/images/englishlogo.png' ), A( 'English', href='%(BASE)s' )]), P ( contents = [ Img( src = '/images/germanylogo.png' ), A( 'Deutsch', href='%(BASE)sde/' )]), P ( contents = [ Img( src = '/images/francelogo.png' ), A( 'Fran&#231;ais', href='%(BASE)sfr/' )]), P ( contents = [ Img( src = '/images/italylogo.png' ), A( 'Italiano', href='%(BASE)sit/' )]), P ( contents = [ Img( src = '/images/netherlandslogo.png' ), A( 'Nederlands', href='%(BASE)snl/' )]), P ( contents = [ Img( src = '/images/polandlogo.png' ), A( 'Polski', href='%(BASE)spl/' )]), P ( contents = [ Img( src = '/images/portugallogo.png' ), A( 'Portugu&#234;s', href='%(BASE)spt/' )]), P ( contents = [ Img( src = '/images/russialogo.png' ), A( '&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;', href='%(BASE)sru/' )]), P ( contents = [ Img( src = '/images/finlandlogo.png' ), A( 'Suomi', href='%(BASE)sfi/' )]), P ( contents = [ Img( src = '/images/swedenlogo.png' ), A( 'Svenska', href='%(BASE)ssv/' )]) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['news'], href=makeURL( 'news/', lang ) )]), Tree ( A( _N['archive'], href=makeURL( 'news/archive/', lang ) ) ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['introduction'], href=makeURL( 'introduction/', lang ) ) ]), Tree \ ( [ #A( _N['status'], href=makeURL('introduction/status/everything.html' ), A( _N['screenshots'], href=makeURL( 'pictures/screenshots/', lang) ), A( _N['ports'], href=makeURL( 'introduction/ports', lang ) ), A( _N['license'], href='%(BASE)slicense.html' ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['download'], href=makeURL( 'download', lang ) )]), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), _N['documentation'] ]), Tree \ ( [ A( _N['users'], href=makeURL( 'documentation/users/', lang ) ), Tree \ ( [ A( _N['installation'], href=makeURL( 'documentation/users/installation', lang ) ), A( _N['using'], href=makeURL( 'documentation/users/using', lang ) ), A( _N['shell'], href=makeURL( 'documentation/users/shell/index', lang ) ), A( _N['faq'], href=makeURL( 'documentation/users/faq', lang ) ), #_N['ports'], #A( _N['links'], href=makeURL( 'documentation/users/links', lang ) ) ] ), A( _N['developers'], href=makeURL( 'documentation/developers/index', lang ) ), Tree \ ( [ A( _N['contribute'], href=makeURL( 'documentation/developers/contribute', lang ) ), A( 'Roadmap', href=makeURL( 'documentation/developers/roadmap', lang ) ), A( _N['bug-tracker'], href='http://sourceforge.net/tracker/?atid=439463&group_id=43586&func=browse' ), A( _N['working-with-subversion'], href=makeURL( 'documentation/developers/svn', lang ) ), A( _N['compiling'], href=makeURL( 'documentation/developers/compiling', lang ) ), A( _N['application-development-manual'], href=makeURL( 'documentation/developers/app-dev/index', lang ) ), A( _N['zune-application-development-manual'], href=makeURL( 'documentation/developers/zune-application-development', lang ) ), A( _N['system-development-manual'], href=makeURL( 'documentation/developers/system-development', lang ) ), A( _N['debugging-manual'], href=makeURL( 'documentation/developers/debugging', lang ) ), A( _N['reference'], href=makeURL( 'documentation/developers/autodocs/index', lang ) ), A( _N['specifications'], href=makeURL( 'documentation/developers/specifications/', lang ) ), A( _N['ui-style-guide'], href=makeURL( 'documentation/developers/ui', lang ) ), A( _N['documenting'], href=makeURL( 'documentation/developers/documenting', lang ) ), A( _N['porting'], href=makeURL( 'documentation/developers/porting', lang ) ), #A( _N['translating'], href=makeURL( 'documentation/developers/translating', lang ) ), A( _N['summaries'], href=makeURL( 'documentation/developers/summaries/', lang ) ), A( _N['links'], href=makeURL( 'documentation/developers/links', lang ) ) ] ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['contact'], href=makeURL( 'contact', lang ) )]), Tree \ ( [ A( _N['mailing-lists'], href=makeURL( 'contact', lang, 'mailing-lists' ) ), #A( _N['forums'], href=makeURL( 'contact', lang, 'forums' ) ), A( _N['irc-channels'], href=makeURL( 'contact', lang, 'irc-channels' ) ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['credits'], href=makeURL( 'credits', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( 'Acknowledgements', href=makeURL( 'acknowledgements', lang ) )]), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), _N['pictures']]), Tree \ ( [ A( _N['developers'], href=makeURL( 'pictures/developers/', lang ) ), A( _N['developers-together'], href=makeURL( 'pictures/developers-together/', lang ) ) ] ), BR(), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['sponsors'], href=makeURL( 'sponsors', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['linking'], href=makeURL( 'linking', lang ) )]), P ( contents = [ Img( src = '/images/pointer.png' ), A( _N['links'], href=makeURL( 'links', lang ) )]) ] ) counter = Img( src = 'http://www.hepe.com/cgi-bin/wwwcount.cgi?df=aros.dat&dd=E&ft=0' ) sponsors = Table\ ( cellspacing = 5, cellpadding = 0, contents = [ TR ( TD ( A ( Img( src = '%(ROOT)simages/trustec-small.png', border = 0 ), href = 'http://www.trustsec.de/' ) ) ), TR ( TD ( A ( Img( src = '%(ROOT)simages/genesi-small.gif', border = 0 ), href = 'http://www.pegasosppc.com/' ) ) ), TR ( TD ( A \ ( Img \ ( src = 'http://sflogo.sourceforge.net/sflogo.php?group_id=43586&type=1', width = 88, height = 31, border = 0, alt = 'SourceForge Logo' ), href = 'http://sourceforge.net/' ) ) ) ] ) bar = Table( border = 0, cellpadding = 2, cellspacing = 2, width = 171, valign = 'top', contents = [ TR( valign = 'top', contents = [ TD( rowspan = 8, width=15 ), TD() ] ), TR( valign = 'top', contents = TD( navigation ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = counter ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = sponsors ) ), TR( TD(), height=30 ), TR \ ( valign = 'top', contents = TD \ ( align = 'center', contents = A \ ( Img \ ( src = '%(ROOT)simages/noeupatents-small.png', border = 0 ), href = 'http://petition.eurolinux.org/' ) ) ) ] ) statsPHP = ''' <?php //define("_BBC_PAGE_NAME", "my page title"); define("_BBCLONE_DIR", "%(ROOT)smybbclone/"); define("COUNTER", _BBCLONE_DIR."index.php"); if (file_exists(COUNTER)) include_once(COUNTER); ?> ''' statsPHP2 = ''' <?php echo date("m.d.y"); ?> ''' statsPHP3 = ''' <?php echo "<map name=\\"map\\">"; echo "<area shape=\\"rect\\" coords=\\"11,80,82,95\\" alt=\\"http://www.aros.org\\" href=\\"http://www.aros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"87,78,165,95\\" alt=\\"AROS-Exec\\" href=\\"http://www.aros-exec.org\\">"; echo "<area shape=\\"rect\\" coords=\\"244,77,323,95166,77,240,95\\" alt=\\"Team AROS\\" href=\\"http://www.teamaros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"166,77,240,95\\" alt=\\"AROS-Exec Archives\\" href=\\"http://archives.aros-exec.org\\">"; echo "</map>"; ?> ''' statsPHP4 = ''' <?php echo "<table width=\\"100%%\\"><tr><td>"; echo "<div style=\\"text-align: right;\\">"; echo "<font color=\\"#aaaaaa\\">"; ?> ''' statsPHP6 = ''' <?php echo "</font></div>"; echo "</p></tr></td></table>"; ?> ''' statsPHP5= ''' <?php include( '/home/groups/a/ar/aros/htdocs/rsfeed/browserdetect.php'); $win_ie56 = (browser_detection('browser') == 'ie' ) && (browser_detection('number') >= 5 ) && (browser_detection('number') < 7 ); if ($win_ie56) { echo \"<img src=\\"/images/kittymascot.gif\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.gif\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } else { echo \"<img src=\\"/images/kittymascot.png\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.png\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } ?> ''' page = HTML( [ Head( [ Charset( charset ), Title( 'AROS Research Operating System' ), Link( href = '%(ROOT)saros.css', type = 'text/css', rel = 'stylesheet' ), Meta( name = 'keywords', content = 'AROS, OS, operating system, research, open source, portage' ) ] ), Body( style = 'margin: 0px;', bgcolor = '#ffffff', contents = [ statsPHP3, Table( border = 0, cellspacing = 0, cellpadding = 0, width = '100%%', contents = [ TR( [ TD( halign = 'top', width = '100%%', height = 109, background='/images/backgroundtop.png' ,rowspan = 4, contents = statsPHP5)
846194f3836b7e3473a516c54c1f17757297aebf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4747/846194f3836b7e3473a516c54c1f17757297aebf/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 453, 261, 2939, 273, 306, 2221, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1964, 12, 389, 56, 16, 389, 50, 16, 389, 49, 16, 490, 7937, 2784, 55, 67, 4883, 16, 3303, 16, 4856, 262, 30, 10394, 273, 4902, 521, 261, 306, 453, 261, 2939, 273, 306, 2221, ...
database_name) + tb_s)
database_name) + tb_s.decode('utf-8'))
def dispatch(host, port, protocol, database_name, user, session, object_type, object_name, method, *args, **kargs): if object_type == 'common': if method == 'login': res = security.login(database_name, user, session) Cache.clean(database_name) logger = logging.getLogger('dispatcher') msg = res and 'successful login' or 'bad login or password' logger.info('%s \'%s\' from %s:%d using %s on database \'%s\'' % \ (msg, user, host, port, protocol, database_name)) Cache.resets(database_name) return res or False elif method == 'version': return VERSION elif method == 'timezone_get': return time.tzname[0] elif method == 'list_lang': return [ ('cs_CZ', 'Čeština'), ('de_DE', 'Deutsch'), ('en_US', 'English'), ('es_ES', 'Español'), ('fr_FR', 'Français'), ] elif method == 'db_exist': try: database = Database(*args, **kargs).connect() cursor = database.cursor() cursor.close() return True except: return False elif method == 'list': database = Database().connect() try: cursor = database.cursor() res = database.list(cursor) cursor.close() except: res = [] return res elif method == 'create': return create(*args, **kargs) elif method == 'restore': return restore(*args, **kargs) elif method == 'drop': return drop(*args, **kargs) elif method == 'dump': return dump(*args, **kargs) return elif object_type == 'system': database = Database(database_name).connect() database_list = Pool.database_list() pool = Pool(database_name) if not database_name in database_list: pool.init() if method == 'listMethods': res = [] for type in ('model', 'wizard', 'report'): for object_name in pool.object_name_list(type=type): obj = pool.get(object_name, type=type) for method in obj._rpc: res.append(type + '.' + object_name + '.' + method) return res elif method == 'methodSignature': return 'signatures not supported' elif method == 'methodHelp': res = [] args_list = args[0].split('.') object_type = args_list[0] object_name = '.'.join(args_list[1:-1]) method = args_list[-1] obj = pool.get(object_name, type=object_type) return pydoc.getdoc(getattr(obj, method)) database = Database(database_name).connect() cursor = database.cursor() try: try: outdate_timeout = True if object_name == 'res.request' and method == 'request_get': outdate_timeout = False user = security.check(database_name, user, session, outdate_timeout=outdate_timeout) Cache.clean(database_name) database_list = Pool.database_list() pool = Pool(database_name) if not database_name in database_list: pool.init() obj = pool.get(object_name, type=object_type) if method not in obj._rpc: raise Exception('Calling method %s on ' \ '%s %s is not allowed!' % \ (method, object_type, object_name)) res = getattr(obj, method)(cursor, user, *args, **kargs) if obj._rpc[method]: cursor.commit() except Exception, exception: if CONFIG['verbose'] or (exception.args \ and str(exception.args[0]) not in \ ('NotLogged', 'ConcurrencyException', 'UserError', 'UserWarning')): tb_s = reduce(lambda x, y: x + y, traceback.format_exception(*sys.exc_info())) logger = logging.getLogger('dispatcher') logger.error('Exception calling method %s on ' \ '%s %s from %s@%s:%d/%s:\n' % \ (method, object_type, object_name, user, host, port, database_name) + tb_s) if isinstance(exception, DatabaseIntegrityError): for key in pool._sql_errors.keys(): if key in exception[0]: msg = pool._sql_errors[key] cursor2 = database.cursor() try: cursor2.execute('SELECT value ' \ 'FROM ir_translation ' \ 'WHERE lang=%s ' \ 'AND type=%s ' \ 'AND src=%s', (find_language_context(args, kargs), 'error', msg)) if cursor2.rowcount: res = cursor2.fetchone()[0] if res: msg = res finally: cursor2.close() raise Exception('UserError', 'Constraint Error', msg) cursor.rollback() raise finally: cursor.close() Cache.resets(database_name) return res
afa025fe7a2fb0f470e42221b27176c3c564b2ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/afa025fe7a2fb0f470e42221b27176c3c564b2ea/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 12, 2564, 16, 1756, 16, 1771, 16, 2063, 67, 529, 16, 729, 16, 1339, 16, 733, 67, 723, 16, 733, 67, 529, 16, 707, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 225, 309, 733, 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, 3435, 12, 2564, 16, 1756, 16, 1771, 16, 2063, 67, 529, 16, 729, 16, 1339, 16, 733, 67, 723, 16, 733, 67, 529, 16, 707, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 225, 309, 733, 67, ...
graph = DotGraph('UML class diagram for %s' % class_doc,
graph = DotGraph('UML class diagram for %s' % class_doc.canonical_name,
def uml_class_tree_graph(class_doc, linker, context=None, **options): """ Return a `DotGraph` that graphically displays the class hierarchy for the given class, using UML notation. Options: - max_attributes - max_operations - show_private_vars - show_magic_vars - link_attributes """ nodes = {} # ClassDoc -> DotGraphUmlClassNode # Create nodes for class_doc and all its bases. for cls in class_doc.mro(): if cls.pyval is object: continue # don't include `object`. if cls == class_doc: color = SELECTED_BG else: color = BASECLASS_BG nodes[cls] = DotGraphUmlClassNode(cls, linker, context, show_inherited_vars=False, collapsed=False, bgcolor=color) # Create nodes for all class_doc's subclasses. queue = [class_doc] for cls in queue: if (isinstance(cls, ClassDoc) and cls.subclasses not in (None, UNKNOWN)): queue.extend(cls.subclasses) for cls in cls.subclasses: if cls not in nodes: nodes[cls] = DotGraphUmlClassNode(cls, linker, context, collapsed=True, bgcolor=SUBCLASS_BG) # Only show variables in the class where they're defined for # *class_doc*. mro = class_doc.mro() for name, var in class_doc.variables.items(): i = mro.index(var.container) for base in mro[i+1:]: if base.pyval is object: continue # don't include `object`. overridden_var = base.variables.get(name) if overridden_var and overridden_var.container == base: try: if isinstance(overridden_var.value, RoutineDoc): nodes[base].operations.remove(overridden_var) else: nodes[base].attributes.remove(overridden_var) except ValueError: pass # var is filtered (eg private or magic) # Keep track of which nodes are part of the inheritance graph # (since link_attributes might add new nodes) inheritance_nodes = set(nodes.values()) # Turn attributes into links. if options.get('link_attributes', True): for node in nodes.values(): node.link_attributes(nodes) # Make sure that none of the new attribute edges break the # rank ordering assigned by inheritance. for edge in node.edges: if edge.end in inheritance_nodes: edge['constraint'] = 'False' # Construct the graph. graph = DotGraph('UML class diagram for %s' % class_doc, body='ranksep=.2\n;nodesep=.3\n') graph.nodes = nodes.values() # Add inheritance edges. for node in inheritance_nodes: for base in node.class_doc.bases: if base in nodes: graph.edges.append(DotGraphEdge(nodes[base], node, dir='back', arrowtail='empty', headport='body', tailport='body', color=INH_LINK_COLOR, weight=100, style='bold')) # And we're done! return graph
87c91ac73c8c2c010f262c553ee24d45b2a8776e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/87c91ac73c8c2c010f262c553ee24d45b2a8776e/dotgraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9570, 80, 67, 1106, 67, 3413, 67, 4660, 12, 1106, 67, 2434, 16, 28058, 16, 819, 33, 7036, 16, 2826, 2116, 4672, 3536, 2000, 279, 1375, 10412, 4137, 68, 716, 2667, 6478, 22461, 326, 667...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9570, 80, 67, 1106, 67, 3413, 67, 4660, 12, 1106, 67, 2434, 16, 28058, 16, 819, 33, 7036, 16, 2826, 2116, 4672, 3536, 2000, 279, 1375, 10412, 4137, 68, 716, 2667, 6478, 22461, 326, 667...
dayling savings and -08:00 otherwise. Zone is coincides with what
dayling savings and -08:00 otherwise. Zone coincides with what
def gettzd(timeinseconds = None): """Return w3's timezone identification string. Expresed as [+/-]hh:mm. For instance, PDT is -07:00 during dayling savings and -08:00 otherwise. Zone is coincides with what localtime(), etc., use. If no argument given, use the current time. """ if timeinseconds is None: timeinseconds = time.time() dst_in_effect = time.daylight and time.localtime(timeinseconds)[8] if dst_in_effect: offset = -time.altzone/60 else: offset = -time.timezone/60 if offset > 0: prefix = "+" elif offset < 0: prefix = "-" else: return "Z" # time is already in UTC hours, minutes = map(abs, divmod(offset, 60)) assert 0 <= hours <= 23 assert 0 <= minutes <= 59 return "%s%02d:%02d" % (prefix, hours, minutes)
8ae91104c0c9a6f997cb28fc96054c0991646d2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8033/8ae91104c0c9a6f997cb28fc96054c0991646d2a/Time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12994, 72, 12, 957, 267, 7572, 273, 599, 4672, 3536, 990, 341, 23, 1807, 6371, 24739, 533, 18, 225, 1312, 1484, 730, 487, 306, 31298, 17, 65, 21622, 30, 7020, 18, 225, 2457, 791, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12994, 72, 12, 957, 267, 7572, 273, 599, 4672, 3536, 990, 341, 23, 1807, 6371, 24739, 533, 18, 225, 1312, 1484, 730, 487, 306, 31298, 17, 65, 21622, 30, 7020, 18, 225, 2457, 791, ...
return None
return -1
def FlushAttributes(self): sock = self._Connect() if not sock: return None
9d2992edf2659b743cc1201f67642788bc4de00b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5754/9d2992edf2659b743cc1201f67642788bc4de00b/sphinxapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11624, 2498, 12, 2890, 4672, 7313, 273, 365, 6315, 5215, 1435, 309, 486, 7313, 30, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11624, 2498, 12, 2890, 4672, 7313, 273, 365, 6315, 5215, 1435, 309, 486, 7313, 30, 327, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
pass
def add_grades_stats(self): #self.all_categories = GradesGraph(self.grades_stack, color=graph_bg_color) #self.grades_stack_layout = QVBoxLayout(self.all_categories) #self.grades_stack_layout.addWidget(self.all_categories) pass
f574d16ceb0e53adfb9c04062d5759811b379132 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1240/f574d16ceb0e53adfb9c04062d5759811b379132/statistics_dlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 13088, 67, 5296, 12, 2890, 4672, 468, 2890, 18, 454, 67, 8995, 273, 10812, 5489, 4137, 12, 2890, 18, 13088, 67, 3772, 16, 2036, 33, 4660, 67, 12370, 67, 3266, 13, 468, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 13088, 67, 5296, 12, 2890, 4672, 468, 2890, 18, 454, 67, 8995, 273, 10812, 5489, 4137, 12, 2890, 18, 13088, 67, 3772, 16, 2036, 33, 4660, 67, 12370, 67, 3266, 13, 468, 2890, ...
nodeurl = newdata[to].get('meta', {}).get('gwikiURL', set([''])) nodeurl = list(nodeurl)[0]
nodeurl = newdata.get(to, '') if nodeurl: nodeurl = nodeurl.get('meta', {}).get('gwikiURL', set([''])) nodeurl = list(nodeurl)[0]
def execute(pagename, request, text, pagedir, page): # Skip MoinEditorBackups if pagename.endswith('/MoinEditorBackup'): return shelve_present = False if hasattr(request, 'graphdata'): shelve_present = True globaldata = request.graphdata.db else: graphshelve = os.path.join(request.cfg.data_dir, 'graphdata.shelve') # Open file db for global graph data, creating it if needed globaldata = shelve.open(graphshelve, flag='c') # Expires old locks left by crashes etc. # Page locking mechanisms should prevent this code being # executed prematurely - thus expiring both read and # write locks request.lock = WriteLock(request.cfg.data_dir, timeout=10.0) request.lock.acquire() # The global graph data contains all the links, even those that # are not immediately available in the page's graphdata pickle quotedname = url_quote(encode(pagename)) # Page graph file to save detailed data in gfn = os.path.join(pagedir,'graphdata.pickle') old_data = graph.Graph() # load graphdata if present and not trashed if os.path.isfile(gfn) and os.path.getsize(gfn): pagegraphfile = file(gfn) old_data = cPickle.load(pagegraphfile) pagegraphfile.close() # Get new data from parsing the page newdata, pagegraph = parse_text(request, dict(), page, text) # Find out which links need to be saved again oldedges = set() for edge in old_data.edges.getall(): e = old_data.edges.get(*edge) linktypes = getattr(e, 'linktype', ['_notype']) for linktype in linktypes: ed = tuple(((edge), (linktype))) oldedges.add(ed) newedges = set() for edge in pagegraph.edges.getall(): e = pagegraph.edges.get(*edge) linktypes = getattr(e, 'linktype', ['_notype']) for linktype in linktypes: ed = tuple(((edge), linktype)) newedges.add(ed) remove_edges = oldedges.difference(newedges) add_edges = newedges.difference(oldedges) # Save the edges for edge, linktype in remove_edges:
1290cec08b5cbf0ca44da9281cf8d2d82d4a55e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/1290cec08b5cbf0ca44da9281cf8d2d82d4a55e0/savegraphdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 9095, 1069, 16, 590, 16, 977, 16, 4262, 23210, 16, 1363, 4672, 468, 6611, 490, 885, 6946, 27238, 309, 4262, 1069, 18, 5839, 1918, 2668, 19, 49, 885, 6946, 6248, 11, 4672, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 9095, 1069, 16, 590, 16, 977, 16, 4262, 23210, 16, 1363, 4672, 468, 6611, 490, 885, 6946, 27238, 309, 4262, 1069, 18, 5839, 1918, 2668, 19, 49, 885, 6946, 6248, 11, 4672, 327...
val = hlr_utils.get_value(obj,i,o_descr,"x",axis) err2 = hlr_utils.get_err2(obj,i,o_descr,"x",axis)
val = hlr_utils.get_value(obj, i, o_descr, "x", axis) err2 = hlr_utils.get_err2(obj, i, o_descr, "x", axis)
def wavelength_to_scalar_k(obj,**kwargs): """ This function converts a primary axis of a SOM or SO from wavelength to scalar_k. The wavelength axis for a SOM must be in units of Angstroms. The primary axis of a SO is assumed to be in units of Angstroms. A tuple of [wavelength, wavelength_err2] (assumed to be in units of Angstroms) can be converted to [scalar_k, scalar_k_err2]. Parameters: ---------- -> obj is the SOM, SO or tuple to be converted -> kwargs is a list of key word arguments that the function accepts: units= a string containing the expected units for this function. The default for this function is Angstroms Return: ------ <- A SOM or SO with a primary axis in scalar_k or a tuple converted to scalar_k Exceptions: ---------- <- TypeError is raised if the incoming object is not a type the function recognizes <- RuntimeError is raised if the SOM x-axis units are not Angstroms """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(obj) (o_descr,d_descr)=hlr_utils.get_descr(obj) if o_descr == "list": raise TypeError, "Do not know how to handle given type: %s" %\ o_descr else: pass # Setup keyword arguments try: units = kwargs["units"] except KeyError: units = "Angstroms" # Primary axis for transformation. If a SO is passed, the function, will # assume the axis for transformation is at the 0 position if o_descr == "SOM": axis = hlr_utils.hlr_1D_units(obj, units) else: axis = 0 result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) if res_descr == "SOM": result = hlr_utils.hlr_force_units(result, "1/Angstroms", axis) result.setAxisLabel(axis, "scalar wavevector") result.setYUnits("Counts/A-1") result.setYLabel("Intensity") else: pass # iterate through the values import axis_manip for i in range(hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"x",axis) err2 = hlr_utils.get_err2(obj,i,o_descr,"x",axis) value=axis_manip.wavelength_to_scalar_k(val, err2) if o_descr != "number": value1 = axis_manip.reverse_array_cp(value[0]) value2 = axis_manip.reverse_array_cp(value[1]) rev_value = (value1,value2) else: rev_value = value map_so = hlr_utils.get_map_so(obj,None,i) if map_so != None: map_so.y=axis_manip.reverse_array_cp(map_so.y) map_so.var_y=axis_manip.reverse_array_cp(map_so.var_y) else: pass hlr_utils.result_insert(result,res_descr,rev_value,map_so,"x",axis) return result
4af11b571f056b419760434ea5be641c11847a97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/4af11b571f056b419760434ea5be641c11847a97/hlr_wavelength_to_scalar_k.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21410, 67, 869, 67, 8748, 67, 79, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 21410, 358, 4981, 67, 79, 18, 1021, 21410,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21410, 67, 869, 67, 8748, 67, 79, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 21410, 358, 4981, 67, 79, 18, 1021, 21410,...
if self.opts.fmt == 'mobi' and \ self.opts.output_profile and \ self.opts.output_profile.startswith("kindle"):
if self.generateForKindle:
def generateNCXDescriptions(self, tocTitle):
073710f405f291eedc7992694a78db2be7983d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/073710f405f291eedc7992694a78db2be7983d10/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 10346, 60, 16844, 12, 2890, 16, 17919, 4247, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 10346, 60, 16844, 12, 2890, 16, 17919, 4247, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
elif mode == "WAV_DE":
if mode == "WAV_DE":
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech with the English Festival voice CEPS_EN - use Text-to-speech with the English Cepstral voice David CEPS_DE - use Text-to-speech with the German Cepstral voice Matthias MUTE - play no sound at all """ rospy.loginfo("Speak <<%s>> in mode <<%s>>",parameter_name,mode) # get mode from global parameter if necessary if mode == "DEFAULT": if not rospy.has_param(self.ns_global_prefix + "/sound/speech_mode"): rospy.logerr("parameter %s does not exist on ROS Parameter Server, aborting...",self.ns_global_prefix + "/sound/speech_mode") ah.error_code = 2 return ah mode = rospy.get_param(self.ns_global_prefix + "/sound/speech_mode") # play sound depending on the mode that was chosen elif mode == "WAV_DE": rospy.loginfo("Playing German WAV file %s",param_name) # get path for German WAV files if not rospy.has_param(self.ns_global_prefex + "/sound/wav_de_path"): rospy.logerr("parameter %s does not exist on ROS Parameter Server, aborting...",self.ns_global_prefix + "/sound/wav_de_path") ah.error_code = 2 return ah wav_path = rospy.get_param(self.ns_global_prefix + "/sound/wav_de_path") # play sound soundhandle.playWave(wav_path + parameter_name + ".wav") return 0 elif mode == "WAV_EN": rospy.loginfo("Playing English WAV file %s",param_name) # get path for English WAV files if not rospy.has_param(self.ns_global_prefex + "/sound/wav_en_path"): rospy.logerr("parameter %s does not exist on ROS Parameter Server, aborting...",self.ns_global_prefix + "/sound/wav_en_path") ah.error_code = 2 return ah wav_path = rospy.get_param(self.ns_global_prefix + "/sound/wav_en_path") # play sound soundhandle.playWave(wav_path + parameter_name + ".wav") return 0 elif mode == "FEST_EN": # get the text string to speak if not rospy.has_param(self.ns_global_prefex + "/sound/speech_en/"+parameter_name) rospy.logerr("parameter %s does not exist on ROS Parameter Server, aborting...",self.ns_global_prefix + "/sound/speech_en/"+parameter_name) ah.error_code = 2 return ah text_string = rospy.get_param(self.ns_global_prefix + "/sound/speech_en/"+parameter_name) if not type(text_string) == str: rospy.logerr("no valid parameter for text-to-speech system: Not a string, aborting...") ah.error_code = 3 return ah rospy.loginfo("Using English Festival Voice for speaking '%s'",text_string) # send text string to TTS system soundhandle.say(text_string) return 0 elif mode == "CEPS_EN"): # get the text string to speak if not rospy.has_param(self.ns_global_prefex + "/sound/speech_en/"+parameter_name) rospy.logerr("parameter %s does not exist on ROS Parameter Server, aborting...",self.ns_global_prefix + "/sound/speech_en/"+parameter_name) ah.error_code = 2 return ah text_string = rospy.get_param(self.ns_global_prefix + "/sound/speech_en/"+parameter_name) if not type(text_string) == str: rospy.logerr("no valid parameter for text-to-speech system: Not a string, aborting...") ah.error_code = 3 return ah rospy.loginfo("Using English Cepstral Voice David for speaking '%s'",text_string) # send text string to TTS system returnVal = os.system("swift -n \"Matthias\" -e \"utf-8\" \"" + str + "\"") return 0
e8e936f0a8ee4de6e198abc5a7fd0e0bc97e2294 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12032/e8e936f0a8ee4de6e198abc5a7fd0e0bc97e2294/simple_script_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 10244, 12, 2890, 16, 6775, 67, 529, 16, 3188, 1546, 5280, 7923, 3536, 348, 10244, 14190, 1269, 635, 296, 6775, 67, 529, 11, 3344, 3970, 399, 8047, 578, 635, 23982, 279, 678, 5856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 10244, 12, 2890, 16, 6775, 67, 529, 16, 3188, 1546, 5280, 7923, 3536, 348, 10244, 14190, 1269, 635, 296, 6775, 67, 529, 11, 3344, 3970, 399, 8047, 578, 635, 23982, 279, 678, 5856, ...
"User-Agent": __name__ + "/" + __version__,
"User-Agent": "pylast" + "/" + __version__,
def execute(self): """Returns a string response of this request.""" connection = httplib.HTTPConnection(self.hostname)
c2f8333c7c459d93d5b6b1373fe80a1aa0624651 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/c2f8333c7c459d93d5b6b1373fe80a1aa0624651/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 1356, 279, 533, 766, 434, 333, 590, 12123, 225, 1459, 273, 15851, 6673, 18, 3693, 1952, 12, 2890, 18, 10358, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 1836, 12, 2890, 4672, 3536, 1356, 279, 533, 766, 434, 333, 590, 12123, 225, 1459, 273, 15851, 6673, 18, 3693, 1952, 12, 2890, 18, 10358, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
print thisnodeIP
print >> outfo, thisnodeIP if len(userinputlist) == 4: outfo.close()
def command_loop(): # we will set this if they call set timeout global globalseashtimeout # things that may be set herein and used in later commands host = None port = None expnum = None filename = None cmdargs = None defaulttarget = None defaultkeyname = None # exit via a return while True: try: prompt = '' if defaultkeyname: prompt = fit_string(defaultkeyname,20)+"@" # display the thing they are acting on in their prompt (if applicable) if defaulttarget: prompt = prompt + fit_string(defaulttarget,20) prompt = prompt + " !> " # the prompt should look like: justin@good !> # get the user input userinput = raw_input(prompt) userinput = userinput.strip() userinputlist = userinput.split() if len(userinputlist)==0: continue # by default, use the target specified in the prompt currenttarget = defaulttarget # set the target, then handle other operations if len(userinputlist) >= 2: if userinputlist[0] == 'on': if userinputlist[1] not in targets: raise UserError("Error: Unknown target '"+userinputlist[1]+"'") # set the target and strip the rest... currenttarget = userinputlist[1] userinputlist = userinputlist[2:] # they are setting the default if len(userinputlist) == 0: defaulttarget = currenttarget continue # by default, use the identity specified in the prompt currentkeyname = defaultkeyname # set the keys, then handle other operations if len(userinputlist) >= 2: if userinputlist[0] == 'as': if userinputlist[1] not in keys: raise UserError("Error: Unknown identity '"+userinputlist[1]+"'") # set the target and strip the rest... currentkeyname = userinputlist[1] userinputlist = userinputlist[2:] # they are setting the default if len(userinputlist) == 0: defaultkeyname = currentkeyname continue
448c4325d7e4a3188225bc2613435876407aecd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/448c4325d7e4a3188225bc2613435876407aecd0/seash.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 6498, 13332, 468, 732, 903, 444, 333, 309, 2898, 745, 444, 2021, 2552, 4715, 544, 345, 647, 494, 659, 282, 468, 9198, 716, 2026, 506, 444, 2674, 267, 471, 1399, 316, 5137, 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, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 6498, 13332, 468, 732, 903, 444, 333, 309, 2898, 745, 444, 2021, 2552, 4715, 544, 345, 647, 494, 659, 282, 468, 9198, 716, 2026, 506, 444, 2674, 267, 471, 1399, 316, 5137, 43...
binXYXY = [int(binFac[ii]) for ii in (0, 1, 0, 1)]
binWin = self._getWin(binWin, "binWin") binXYXY = self._getBinXYXY(binFac)
def unbinWindow(self, binWin, binFac): """Converts binned window to unbinned. The output is constrained to be in range for the given bin factor.
bc449c514ddbedcc3dbea6e9f61a46eec42f89fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6353/bc449c514ddbedcc3dbea6e9f61a46eec42f89fb/ImageWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 4757, 3829, 12, 2890, 16, 4158, 18049, 16, 4158, 6645, 4672, 3536, 5692, 4158, 11748, 2742, 358, 640, 4757, 11748, 18, 225, 1021, 876, 353, 27666, 358, 506, 316, 1048, 364, 326, 864...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 640, 4757, 3829, 12, 2890, 16, 4158, 18049, 16, 4158, 6645, 4672, 3536, 5692, 4158, 11748, 2742, 358, 640, 4757, 11748, 18, 225, 1021, 876, 353, 27666, 358, 506, 316, 1048, 364, 326, 864...
sage: EllipticCurve([1,2,3,4,5]) Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
sage: E=EllipticCurve([1,2,3,4,5]); E._repr_() 'Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field'
def _repr_(self): """ String representation of elliptic curve.
4f0514b45a47cdf92a6d781876aa0dd2f3653f54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4f0514b45a47cdf92a6d781876aa0dd2f3653f54/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 514, 4335, 434, 415, 549, 21507, 8882, 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, 389, 12715, 67, 12, 2890, 4672, 3536, 514, 4335, 434, 415, 549, 21507, 8882, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def _changed_prefs(val):
def _changed_dna_updater_behavior_pref(val):
def _changed_prefs(val): if val: msg = "Note: to use new DNA prefs value on existing atoms, " \ "run \"DNA: rescan all atoms\" in debug->other menu." env.history.message(orangemsg(msg)) return
74d84827e214c941e90c6b017446eebeed2ecac1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/74d84827e214c941e90c6b017446eebeed2ecac1/dna_updater_prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6703, 67, 5176, 69, 67, 25575, 67, 31936, 67, 25724, 12, 1125, 4672, 309, 1244, 30, 1234, 273, 315, 8067, 30, 358, 999, 394, 463, 11277, 15503, 460, 603, 2062, 9006, 16, 315, 521,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6703, 67, 5176, 69, 67, 25575, 67, 31936, 67, 25724, 12, 1125, 4672, 309, 1244, 30, 1234, 273, 315, 8067, 30, 358, 999, 394, 463, 11277, 15503, 460, 603, 2062, 9006, 16, 315, 521,...
raise ValueError("Sequence gap characters != alignment gap char")
raise ValueError("Sequence gap char != alignment gap char")
def to_alignment(sequences, alphabet=None, strict=True): """Returns a multiple sequence alignment (OBSOLETE). - sequences -An iterator that returns SeqRecord objects, or simply a list of SeqRecord objects. All the record sequences must be the same length. - alphabet - Optional alphabet. Stongly recommended. - strict - Optional, defaults to True. Should error checking be done? Using this function is now discouraged. Rather doing this: >>> from Bio import SeqIO >>> handle = open("Clustalw/protein.aln") >>> alignment = SeqIO.to_alignment(SeqIO.parse(handle, "clustal")) >>> handle.close() You are now encouraged to use Bio.AlignIO instead, e.g. >>> from Bio import AlignIO >>> handle = open("Clustalw/protein.aln") >>> alignment = AlignIO.read(handle, "clustal") >>> handle.close() """ #TODO - Move this functionality into the Alignment class instead? from Bio.Alphabet import generic_alphabet from Bio.Alphabet import _consensus_alphabet if alphabet is None: sequences = list(sequences) alphabet = _consensus_alphabet([rec.seq.alphabet for rec in sequences \ if rec.seq is not None]) if not (isinstance(alphabet, Alphabet) or isinstance(alphabet, AlphabetEncoder)): raise ValueError("Invalid alphabet") alignment_length = None alignment = Alignment(alphabet) for record in sequences: if strict: if alignment_length is None: alignment_length = len(record.seq) elif alignment_length != len(record.seq): raise ValueError("Sequences must all be the same length") assert isinstance(record.seq.alphabet, Alphabet) \ or isinstance(record.seq.alphabet, AlphabetEncoder), \ "Sequence does not have a valid alphabet" #TODO - Move this alphabet comparison code into the Alphabet module/class? #TODO - Is a normal alphabet "ungapped" by default, or does it just mean #undecided? if isinstance(record.seq.alphabet, Alphabet) \ and isinstance(alphabet, Alphabet): #Comparing two non-gapped alphabets if not isinstance(record.seq.alphabet, alphabet.__class__): raise ValueError("Incompatible sequence alphabet " \ + "%s for %s alignment" \ % (record.seq.alphabet, alphabet)) elif isinstance(record.seq.alphabet, AlphabetEncoder) \ and isinstance(alphabet, Alphabet): raise ValueError("Sequence has a gapped alphabet, alignment does not") elif isinstance(record.seq.alphabet, Alphabet) \ and isinstance(alphabet, Gapped): #Sequence isn't gapped, alignment is. if not isinstance(record.seq.alphabet, alphabet.alphabet.__class__): raise ValueError("Incompatible sequence alphabet " \ + "%s for %s alignment" \ % (record.seq.alphabet, alphabet)) else: #Comparing two gapped alphabets if not isinstance(record.seq.alphabet, alphabet.__class__): raise ValueError("Incompatible sequence alphabet " \ + "%s for %s alignment" \ % (record.seq.alphabet, alphabet)) if record.seq.alphabet.gap_char != alphabet.gap_char: raise ValueError("Sequence gap characters != alignment gap char") #ToDo, additional checks on the specified alignment... #Should we look at the alphabet.contains() method? if record.seq is None: raise TypeError("SeqRecord (id=%s) has None for its sequence." % record.id) #This is abusing the "private" records list, #we should really have a method like add_sequence #but which takes SeqRecord objects. See also Bug 1944 alignment._records.append(record) return alignment
a2855b4f95e94e4ef816422674d48a89ec6bbe18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/a2855b4f95e94e4ef816422674d48a89ec6bbe18/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 14409, 12, 17190, 16, 10877, 33, 7036, 16, 5490, 33, 5510, 4672, 3536, 1356, 279, 3229, 3102, 8710, 261, 5704, 3584, 4311, 2934, 225, 300, 8463, 300, 979, 2775, 716, 1135, 14367...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 14409, 12, 17190, 16, 10877, 33, 7036, 16, 5490, 33, 5510, 4672, 3536, 1356, 279, 3229, 3102, 8710, 261, 5704, 3584, 4311, 2934, 225, 300, 8463, 300, 979, 2775, 716, 1135, 14367...
if key == Qt.Key_R:
self.movingPoint = None elif key == Qt.Key_R:
def keyRelease(self,key): basicMode.keyRelease(self, key)
a49fe898f1dc6faf9bfce734ed1cce864d3c97da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a49fe898f1dc6faf9bfce734ed1cce864d3c97da/modifyMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 7391, 12, 2890, 16, 856, 4672, 5337, 2309, 18, 856, 7391, 12, 2890, 16, 498, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 7391, 12, 2890, 16, 856, 4672, 5337, 2309, 18, 856, 7391, 12, 2890, 16, 498, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
out.append('\n')
def dump(self,indent='',depth=0): """Diagnostic method for listing out the contents of a ParseResults. Accepts an optional indent argument so that this string can be embedded in a nested display of other data.""" out = [] keys = self.items() keys.sort() for k,v in keys: if out: out.append('\n') out.append( "%s%s- %s: " % (indent,(' '*depth), k) ) if isinstance(v,ParseResults): if v.keys(): out.append('\n') out.append( v.dump(indent,depth+1) ) out.append('\n') else: out.append(str(v)) else: out.append(str(v)) out.append('\n') out.append( indent+str(self.asList()) ) return "".join(out)
03cf0b8cfde8b4f6b7358862701b0b73b409310d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/03cf0b8cfde8b4f6b7358862701b0b73b409310d/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 9355, 2218, 2187, 5979, 33, 20, 4672, 3536, 26836, 707, 364, 11591, 596, 326, 2939, 434, 279, 2884, 3447, 18, 27158, 392, 3129, 3504, 1237, 1427, 716, 333, 533, 848, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 9355, 2218, 2187, 5979, 33, 20, 4672, 3536, 26836, 707, 364, 11591, 596, 326, 2939, 434, 279, 2884, 3447, 18, 27158, 392, 3129, 3504, 1237, 1427, 716, 333, 533, 848, ...
AAAAAAAAAAAAAAAAAAABAAkEAACoAAAAOKsAAH4BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAJ BAAA0AAAALisAABuAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEACQQAAPgAAAAorgAAWgIAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAABAAkEAAAgAQAAiLAAAFwBAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAABAAkEAACoAAAAOKsAAKABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAJ BAAA0AAAANisAABiAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEACQQAAPgAAABArgAAWgIAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAABAAkEAAAgAQAAoLAAAFwBAAAAAAAAAAAAAAAAAAAAAAAAAAAA
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
84fe15d65f13d137f4b178e4bc01bed61a1ef00c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/84fe15d65f13d137f4b178e4bc01bed61a1ef00c/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 3890, 261, 2890, 4672, 1930, 1026, 1105, 327, 1026, 1105, 18, 4924, 1145, 371, 261, 2294, 2056, 3706, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 3890, 261, 2890, 4672, 1930, 1026, 1105, 327, 1026, 1105, 18, 4924, 1145, 371, 261, 2294, 2056, 3706, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
OWGUI.button(self.buttonBox7, self, "Attribute Ranking", self.attributeAnalysis) OWGUI.button(self.buttonBox7, self, "Attribute Interactions", self.interactionAnalysis)
OWGUI.button(self.buttonBox7, self, "Attribute Ranking", self.attributeAnalysis, debuggingEnabled = 0) OWGUI.button(self.buttonBox7, self, "Attribute Interactions", self.interactionAnalysis, debuggingEnabled = 0)
def __init__(self, parentWidget = None, signalManager = None, graph = None, visualizationMethod = SCATTERPLOT, parentName = "Visualization widget"): VizRank.__init__(self, visualizationMethod, graph) OWBaseWidget.__init__(self, None, signalManager, "Optimization Dialog")
0e455036d7905fe252ea1c33a7b2b3eb0f3b722a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/0e455036d7905fe252ea1c33a7b2b3eb0f3b722a/OWkNNOptimization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4609, 273, 599, 16, 4277, 1318, 273, 599, 16, 2667, 273, 599, 16, 30056, 1305, 273, 8795, 789, 2560, 20485, 56, 16, 26119, 273, 315, 25780, 1588, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4609, 273, 599, 16, 4277, 1318, 273, 599, 16, 2667, 273, 599, 16, 30056, 1305, 273, 8795, 789, 2560, 20485, 56, 16, 26119, 273, 315, 25780, 1588, 36...
lifetime = expires - time.time()
lifetime = int(expires - time.time())
def _set_cookie(self, request, cookie_string, expires): """ Set cookie, raw helper. """ lifetime = expires - time.time() cookie = self._make_cookie(request, self.cookie_name, cookie_string, lifetime, expires) # Set cookie request.setHttpHeader(cookie) # IMPORTANT: Prevent caching of current page and cookie request.disableHttpCaching()
e1e6512168d4452fed473b63bcf8f846f325106a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/e1e6512168d4452fed473b63bcf8f846f325106a/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 8417, 12, 2890, 16, 590, 16, 3878, 67, 1080, 16, 7368, 4672, 3536, 1000, 3878, 16, 1831, 4222, 18, 3536, 12486, 273, 509, 12, 12431, 300, 813, 18, 957, 10756, 3878, 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, 389, 542, 67, 8417, 12, 2890, 16, 590, 16, 3878, 67, 1080, 16, 7368, 4672, 3536, 1000, 3878, 16, 1831, 4222, 18, 3536, 12486, 273, 509, 12, 12431, 300, 813, 18, 957, 10756, 3878, 273, ...
def __init__(self, label):
def __init__(self, label=None):
def __init__(self, label): self._label = label
cd26456921c509c06afe7d3f2114cf42bbc24856 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/cd26456921c509c06afe7d3f2114cf42bbc24856/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1433, 33, 7036, 4672, 365, 6315, 1925, 273, 1433, 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, 2738, 972, 12, 2890, 16, 1433, 33, 7036, 4672, 365, 6315, 1925, 273, 1433, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict()
imageDict,indexDict,thumbDict,zValueDict = dict(),dict(),dict(),dict() imageDictAQ,indexDictAQ,thumbDictAQ,zValueDictAQ = dict(),dict(),dict(),dict()
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.exists(wikiFilename) and maxCount < 15: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,9) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)", "Chirp Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass), "%s"%(wikiCoinc.mchirp) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,7) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2", "Chirp Mass" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2), "%s"%(cSngl.mchirp) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time <= endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=thumb fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() # for sngl in wikiCoinc.sngls_in_coinc(): indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if (len(zValueFiles) > 0): for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Search for analyzeQscan files #/L1-analyseQscan_L1_932797512_687_seis_rds_L1_SEI-ETMX_X_z_scat-unspecified-gpstime.png timeString=str(float(sngl.time)).replace(".","_") zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.txt"%(sngl.ifo,timeString)) indexDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.html"%(sngl.ifo,timeString)) thumbDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime_thumb.png"\ %(sngl.ifo,timeString)) imageDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime.png"\ %(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse keeping SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only PEM channels for sngl in wikiCoinc.sngls_in_coinc(): imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping PEM and not SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) for chan in zValueDictAQ[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(imageDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") #H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.html for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Other scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(wikiPage.linkedRemoteImage(thumbList[k],thumbList[k])) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) >= 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #
481b556f895e5b0b4caf0acaf35400d2993db8e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/481b556f895e5b0b4caf0acaf35400d2993db8e5/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 1564, 1098, 12, 13044, 5359, 33, 7036, 16, 13044, 27055, 71, 33, 7036, 16, 13044, 2471, 33, 7036, 16, 768, 22, 1785, 33, 7036, 4672, 3536, 2985, 358, 2911, 279, 866, 1098, 1625, ...
return "Mapper|" + self.class_.__name__ + "|" + (self.entity_name is not None and "/%s" % self.entity_name or "") + self.mapped_table.name
return "Mapper|" + self.class_.__name__ + "|" + (self.entity_name is not None and "/%s" % self.entity_name or "") + str(self.local_table)
def __str__(self): return "Mapper|" + self.class_.__name__ + "|" + (self.entity_name is not None and "/%s" % self.entity_name or "") + self.mapped_table.name
6ca6b3552257e40252b619123973e0f40d6fa0f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/6ca6b3552257e40252b619123973e0f40d6fa0f5/mapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 315, 4597, 22317, 397, 365, 18, 1106, 67, 16186, 529, 972, 397, 15710, 397, 261, 2890, 18, 1096, 67, 529, 353, 486, 599, 471, 2206, 9, 87, 6, 738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 972, 12, 2890, 4672, 327, 315, 4597, 22317, 397, 365, 18, 1106, 67, 16186, 529, 972, 397, 15710, 397, 261, 2890, 18, 1096, 67, 529, 353, 486, 599, 471, 2206, 9, 87, 6, 738...
title = row[0] try:
title = row[0]
def get_info(self, id, args): cursor = self.db.cursor()
492b2ab83de258eaaa4c56c6a8ccb4a69e2ae57e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/492b2ab83de258eaaa4c56c6a8ccb4a69e2ae57e/Report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 2890, 16, 612, 16, 833, 4672, 3347, 273, 365, 18, 1966, 18, 9216, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 2890, 16, 612, 16, 833, 4672, 3347, 273, 365, 18, 1966, 18, 9216, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
locked = windowsAPI.acquireMutex(mutexhandle[lockname], WAIT_TIME)
locked = windowsAPI.acquire_mutex(mutexhandle[lockname], WAIT_TIME)
def getprocesslockmutex(lockname): import _winreg regkeyname = r"runonce."+lockname # traverse registry path registrypath = ["SOFTWARE","UW","Seattle","1.0"] # locked, do we own the mutex? locked = False # Does a handle already exist? if lockname in mutexhandle: # Lets try to get ownership of it locked = windowsAPI.acquireMutex(mutexhandle[lockname], WAIT_TIME) else: # Lets create the mutex, then get ownership try: mutexhandle[lockname] = windowsAPI.createMutex('Global\\runonce.'+lockname) locked = windowsAPI.acquireMutex(mutexhandle[lockname], WAIT_TIME) except windowsAPI.FailedMutex: # By default, we don't have the lock, so its okay pass # We own it! if locked: # get the place to write thekey = openkey(_winreg.HKEY_CURRENT_USER, registrypath, write=True) try: _winreg.SetValueEx(thekey,regkeyname,0, _winreg.REG_SZ, str(os.getpid())) except EnvironmentError,e: print thekey, regkeyname, 0, _winreg.REG_SZ, os.getpid() print "Encountered problems writing into the Registry..."+str(e) raise _winreg.CloseKey(thekey) return True try: thekey = openkey(_winreg.HKEY_CURRENT_USER, registrypath, write=False) except WindowsError: # the key didn't exist. Must be stored under another user... return False # I'll return once there are no more values or I've found the key... try: val, datatype = _winreg.QueryValueEx(thekey, regkeyname) return int(val) except EnvironmentError, e: # not found... This is odd. The registry path is there, but no key... return False finally: _winreg.CloseKey(thekey)
2133f84aae36a402e4c9ad67a8cc0ddc61446669 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/2133f84aae36a402e4c9ad67a8cc0ddc61446669/runonce.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2567, 739, 29946, 12, 739, 529, 4672, 1930, 389, 8082, 1574, 960, 856, 529, 273, 436, 6, 2681, 8243, 1199, 15, 739, 529, 225, 468, 10080, 4023, 589, 4023, 803, 273, 8247, 3584, 44...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 739, 29946, 12, 739, 529, 4672, 1930, 389, 8082, 1574, 960, 856, 529, 273, 436, 6, 2681, 8243, 1199, 15, 739, 529, 225, 468, 10080, 4023, 589, 4023, 803, 273, 8247, 3584, 44...
try: signal.getsignal(4242) raise TestFailed('expected ValueError for invalid signal 'getsignal()') except ValueError: pass
if test_support.verbose: verboseflag = '-x' else: verboseflag = '+x'
def force_test_exit(): # Sigh, both imports seem necessary to avoid errors. import os fork_pid = os.fork() if fork_pid: # In parent. return fork_pid # In child. import os, time try: # Wait 5 seconds longer than the expected alarm to give enough # time for the normal sequence of events to occur. This is # just a stop-gap to try to prevent the test from hanging. time.sleep(MAX_DURATION + 5) print >> sys.__stdout__, ' child should not have to kill parent' for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM": os.kill(pid, getattr(signal, signame)) print >> sys.__stdout__, " child sent", signame, "to", pid time.sleep(1) finally: os._exit(0)
73dd02de154505c1bd9be384ef7bcb0fe31b6db5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/73dd02de154505c1bd9be384ef7bcb0fe31b6db5/test_signal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 3813, 67, 8593, 13332, 468, 348, 2031, 16, 3937, 10095, 19264, 4573, 358, 4543, 1334, 18, 1930, 1140, 12515, 67, 6610, 273, 1140, 18, 23335, 1435, 309, 12515, 67, 6610, 30, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 3813, 67, 8593, 13332, 468, 348, 2031, 16, 3937, 10095, 19264, 4573, 358, 4543, 1334, 18, 1930, 1140, 12515, 67, 6610, 273, 1140, 18, 23335, 1435, 309, 12515, 67, 6610, 30, 468...
'price_change': customfield.price_change }
'price_change': price_change }
def add(request, id=0): """Add an item to the cart.""" #TODO: Error checking for invalid combos log.debug('FORM: %s', request.POST) formdata = request.POST.copy() productslug = None if formdata.has_key('productname'): productslug = formdata['productname'] try: product = Product.objects.get(slug=productslug) log.debug('found product: %s', product) p_types = product.get_subtypes() details = [] if 'ConfigurableProduct' in p_types: # This happens when productname cannot be updated by javascript. cp = product.configurableproduct chosenOptions = optionset_from_post(cp, formdata) product = cp.get_product_from_options(chosenOptions) if 'CustomProduct' in p_types: cp = product.customproduct for customfield in cp.custom_text_fields.all(): data = { 'name' : customfield.translated_name(), 'value' : formdata["custom_%s" % customfield.slug], 'sort_order': customfield.sort_order, 'price_change': customfield.price_change } details.append(data) data = {} chosenOptions = optionset_from_post(cp, formdata) manager = OptionManager() for choice in chosenOptions: result = manager.from_unique_id(choice) data = { 'name': result.optionGroup, 'value': result.translated_name(), 'sort_order': result.displayOrder, 'price_change': result.price_change } details.append(data) data = {} if 'GiftCertificateProduct' in p_types: ix = 0 zero = Decimal("0.00") for field in ('email', 'message'): data = { 'name' : field, 'value' : formdata.get("custom_%s" % field, ""), 'sort_order' : ix, 'price_change' : zero, } ix += 1 details.append(data) log.debug("Gift Certificate details: %s", details) data = {} template = find_product_template(product) except (Product.DoesNotExist, MultiValueDictKeyError): log.debug("Could not find product: %s", productslug) return bad_or_missing(request, _('The product you have requested does not exist.')) try: quantity = int(formdata['quantity']) except ValueError: context = RequestContext(request, { 'product': product, 'error_message': _("Please enter a whole number.")}) return HttpResponse(template.render(context)) if quantity < 1: context = RequestContext(request, { 'product': product, 'error_message': _("Please enter a positive number.")}) return HttpResponse(template.render(context)) cart = Cart.objects.from_request(request, create=True) if cart.add_item(product, number_added=quantity, details=details) == False: context = RequestContext(request, { 'product': product, 'error_message': _("Not enough items of '%s' in stock.") % product.translated_name()}) return HttpResponse(template.render(context)) url = urlresolvers.reverse('satchmo_cart') dispatcher.send(signal=satchmo_cart_changed, cart=cart, request=request) return HttpResponseRedirect(url)
895421440bc75774efbfed5962e97c839091a476 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/895421440bc75774efbfed5962e97c839091a476/cart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2293, 16, 612, 33, 20, 4672, 3536, 986, 392, 761, 358, 326, 7035, 12123, 468, 6241, 30, 1068, 6728, 364, 2057, 3894, 538, 613, 18, 4148, 2668, 4983, 30, 738, 87, 2187, 590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2293, 16, 612, 33, 20, 4672, 3536, 986, 392, 761, 358, 326, 7035, 12123, 468, 6241, 30, 1068, 6728, 364, 2057, 3894, 538, 613, 18, 4148, 2668, 4983, 30, 738, 87, 2187, 590, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 235) else quickfix.StringField.__init__(self, 235, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 576, 4763, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 576, 4763, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738,...
""""Erase the final rubber band window and do zoom if user indeed draws a rubber band window"""
"""Erase the final rubber band window and do zoom if user indeed draws a rubber band window"""
def leftUp(self, event): """"Erase the final rubber band window and do zoom if user indeed draws a rubber band window""" cWxy = (event.pos().x(), self.o.height - event.pos().y()) zoomX = (abs(cWxy[0] - self.pWxy[0]) + 0.0) / (self.o.width + 0.0) zoomY = (abs(cWxy[1] - self.pWxy[1]) + 0.0) / (self.o.height + 0.0)
22361c9172ed9bd5265127a6d19306786a0928a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/22361c9172ed9bd5265127a6d19306786a0928a7/zoomMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2002, 1211, 12, 2890, 16, 871, 4672, 3536, 41, 5648, 326, 727, 24997, 744, 8937, 2742, 471, 741, 7182, 309, 729, 316, 323, 329, 377, 30013, 279, 24997, 744, 8937, 2742, 8395, 276, 59, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2002, 1211, 12, 2890, 16, 871, 4672, 3536, 41, 5648, 326, 727, 24997, 744, 8937, 2742, 471, 741, 7182, 309, 729, 316, 323, 329, 377, 30013, 279, 24997, 744, 8937, 2742, 8395, 276, 59, ...
body = json.dumps ({'name' : subNS, 'description' : description}) status, result = self.call ('POST', containingNS, body)
body = json.dumps({'name' : subNS, 'description' : description}) status, result = self.call('POST', containingNS, body)
def create_namespace (self, path, description='', createParentIfNeeded=True, verbose=False): """Creates the namespace specified by path using the description given.
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4937, 261, 2890, 16, 589, 16, 2477, 2218, 2187, 752, 3054, 18299, 33, 5510, 16, 3988, 33, 8381, 4672, 3536, 2729, 326, 1981, 1269, 635, 589, 1450, 326, 2477, 864, 18, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4937, 261, 2890, 16, 589, 16, 2477, 2218, 2187, 752, 3054, 18299, 33, 5510, 16, 3988, 33, 8381, 4672, 3536, 2729, 326, 1981, 1269, 635, 589, 1450, 326, 2477, 864, 18, 2, -100,...
if not request.user.may.read(unicode(url_unquote(name), config.charset)):
quoted = unicode(url_unquote(name), config.charset) if not request.user.may.read(quoted):
def getvalues(request, globaldata, name, key, display=True, abs_attach=True): if not request.user.may.read(unicode(url_unquote(name), config.charset)): return set([]) page = globaldata.getpage(name) vals = set() # Add values and their sources if key in page.get('meta', {}): for val in page['meta'][key]: val = unicode(url_unquote(val), config.charset).strip('"') val = val.replace('\\"', '"') vals.add((val, 'meta')) # Link values are in a list as there can be more than one # edge between two pages if display: # Making things nice to look at if key in page.get('out', {}): # Add values and their sources for target in page['out'][key]: if abs_attach: target = link_to_attachment(globaldata, target) vals.add((target, 'link')) else: # Showing things as they are if key in page.get('lit', {}): # Add values and their sources for target in page['lit'][key]: if abs_attach: target = absolute_attach_name(quoted, target) vals.add((target, 'link')) return vals
156ef632eb8dbe1968bd819da8a5ef91fc3a54b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/156ef632eb8dbe1968bd819da8a5ef91fc3a54b6/editing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2372, 12, 2293, 16, 2552, 892, 16, 508, 16, 498, 16, 2562, 33, 5510, 16, 2417, 67, 7331, 33, 5510, 4672, 225, 9298, 273, 5252, 12, 718, 67, 318, 6889, 12, 529, 3631, 642, 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, 336, 2372, 12, 2293, 16, 2552, 892, 16, 508, 16, 498, 16, 2562, 33, 5510, 16, 2417, 67, 7331, 33, 5510, 4672, 225, 9298, 273, 5252, 12, 718, 67, 318, 6889, 12, 529, 3631, 642, 18, ...
c.addColumn(columnDef, childUpdate=True)
c.addColumn(columnDef, connection=connection, childUpdate=True)
def addColumn(cls, columnDef, changeSchema=False, connection=None, childUpdate=False): #DSM: Try to add parent properties to the current class #DSM: Only do this once if possible at object creation and once for #DSM: each new dynamic column to refresh the current class if childUpdate or cls._parentClass: for col in cls._parentClass._columns: cname = col.name if cname == 'childName': continue setattr(cls, getterName(cname), eval( 'lambda self: self._parent.%s' % cname)) if not col.kw.has_key('immutable') or not col.kw['immutable']: setattr(cls, setterName(cname), eval( 'lambda self, val: setattr(self._parent, %s, val)' % repr(cname))) if childUpdate: makeProperties(cls) return
5609a2d60177b4dae762a3b3731ed0974519cc21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/5609a2d60177b4dae762a3b3731ed0974519cc21/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10871, 12, 6429, 16, 1057, 3262, 16, 2549, 3078, 33, 8381, 16, 1459, 33, 7036, 16, 1151, 1891, 33, 8381, 4672, 468, 3948, 49, 30, 6161, 358, 527, 982, 1790, 358, 326, 783, 667, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10871, 12, 6429, 16, 1057, 3262, 16, 2549, 3078, 33, 8381, 16, 1459, 33, 7036, 16, 1151, 1891, 33, 8381, 4672, 468, 3948, 49, 30, 6161, 358, 527, 982, 1790, 358, 326, 783, 667, 468, ...
sys.stdout.write(''.join(traceback.format_exception(*sys.exc_info())));
sys.stdout.write(''.join(traceback.format_exception(*sys.exc_info()))) break
def serve_forever(self): # We want this to run in a thread, so we use a slightly # modified version of "forever". self.active = True while self.active: try: self.handle_request() except socket.timeout: pass except KeyboardInterrupt: self.server_close() return except: sys.stdout.write(''.join(traceback.format_exception(*sys.exc_info())));
efbd431ebdb379d5d5aeb5f6f9f5dd47cdac236b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/efbd431ebdb379d5d5aeb5f6f9f5dd47cdac236b/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 67, 1405, 502, 12, 2890, 4672, 468, 1660, 2545, 333, 358, 1086, 316, 279, 2650, 16, 1427, 732, 999, 279, 21980, 468, 4358, 1177, 434, 315, 1405, 502, 9654, 365, 18, 3535, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 67, 1405, 502, 12, 2890, 4672, 468, 1660, 2545, 333, 358, 1086, 316, 279, 2650, 16, 1427, 732, 999, 279, 21980, 468, 4358, 1177, 434, 315, 1405, 502, 9654, 365, 18, 3535, 273, 1...
raise TroveSpecError(specStr, "bad flavor spec")
raise TroveSpecError(origSpecStr, "bad flavor spec")
def parseTroveSpec(specStr, allowEmptyName = True): if specStr.find('[') > 0 and specStr[-1] == ']': specStr = specStr[:-1] l = specStr.split('[') if len(l) != 2: raise TroveSpecError(specStr, "bad flavor spec") specStr, flavorSpec = l flavor = deps.parseFlavor(flavorSpec) if flavor is None: raise TroveSpecError(specStr, "bad flavor spec") else: flavor = None if specStr.find("=") >= 0: l = specStr.split("=") if len(l) != 2: raise TroveSpecError(specStr, "Too many ='s") name, versionSpec = l else: name = specStr versionSpec = None if not name and not allowEmptyName: raise TroveSpecError(specStr, 'Trove name is required') return (name, versionSpec, flavor)
6b6d592e76cbc93994018a704080d06ea374cb14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/6b6d592e76cbc93994018a704080d06ea374cb14/cmdline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 56, 303, 537, 1990, 12, 2793, 1585, 16, 1699, 1921, 461, 273, 1053, 4672, 309, 857, 1585, 18, 4720, 2668, 3292, 13, 405, 374, 471, 857, 1585, 18919, 21, 65, 422, 8641, 30, 857, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 56, 303, 537, 1990, 12, 2793, 1585, 16, 1699, 1921, 461, 273, 1053, 4672, 309, 857, 1585, 18, 4720, 2668, 3292, 13, 405, 374, 471, 857, 1585, 18919, 21, 65, 422, 8641, 30, 857, ...
0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL |wx.LEFT, 10)
0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL |wx.LEFT|wx.RIGHT, 10)
def __init__(self): wx.Frame.__init__(self, None, -1, "Widget Layout Tester")
0bdcd2f50750d235bff2766f3d03d7228aa88dff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/0bdcd2f50750d235bff2766f3d03d7228aa88dff/widgetLayoutTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 599, 16, 300, 21, 16, 315, 4609, 9995, 399, 7654, 7923, 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, 1001, 2738, 972, 12, 2890, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 599, 16, 300, 21, 16, 315, 4609, 9995, 399, 7654, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -1...
text="%s %s %s" % (text, api.SearchableText())
text="%s %s" % (text, api.SearchableText())
def SearchableText(self): "The full text of the Help Topic, for indexing purposes" text="%s %s" % (self.title, self.doc) for api in self.apis: text="%s %s %s" % (text, api.SearchableText()) return text
832f5c636d86bdcb8bef63a1bcffaaeb284b9867 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/832f5c636d86bdcb8bef63a1bcffaaeb284b9867/APIHelpTopic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5167, 429, 1528, 12, 2890, 4672, 315, 1986, 1983, 977, 434, 326, 11288, 11789, 16, 364, 14403, 13694, 6, 977, 11613, 87, 738, 87, 6, 738, 261, 2890, 18, 2649, 16, 365, 18, 2434, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5167, 429, 1528, 12, 2890, 4672, 315, 1986, 1983, 977, 434, 326, 11288, 11789, 16, 364, 14403, 13694, 6, 977, 11613, 87, 738, 87, 6, 738, 261, 2890, 18, 2649, 16, 365, 18, 2434, 13, ...
evalString = "_pngReader.SetFileName(\"%s\")" % file
evalString = "_pngReader.SetFileName(\"%s\")" % fname
def load(self, file): """ Loads png image data from file.
c44140bd3d918f82e3b4fb0f16f6949f4d7b003e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/c44140bd3d918f82e3b4fb0f16f6949f4d7b003e/image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 585, 4672, 3536, 4444, 87, 14476, 1316, 501, 628, 585, 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, 1262, 12, 2890, 16, 585, 4672, 3536, 4444, 87, 14476, 1316, 501, 628, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
for col in xrange(self.cols, -1, -1): for row in xrange(self.rows, -1, -1):
for row in xrange(0, self.cols): for col in xrange(0, self.rows):
def do_auto_move(self, state): # if auto-moving is turned off, just return if state == []: return
be47457f91d298127231ad75e72f684aa0d1e499 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/be47457f91d298127231ad75e72f684aa0d1e499/classifier_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6079, 67, 8501, 12, 2890, 16, 919, 4672, 468, 309, 3656, 17, 81, 13767, 353, 21826, 3397, 16, 2537, 327, 309, 919, 422, 5378, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6079, 67, 8501, 12, 2890, 16, 919, 4672, 468, 309, 3656, 17, 81, 13767, 353, 21826, 3397, 16, 2537, 327, 309, 919, 422, 5378, 30, 327, 2, -100, -100, -100, -100, -100, -100, ...
{'datasets': datasets, },
{'datasets': datasets, 'projects': projects,},
def browse(request): datasets = DataSet.objects.all().order_by('-created_at') return render_to_response('core/browse.html', {'datasets': datasets, }, context_instance=RequestContext(request))
d394a10d84ab228936fb404b284fc82dd86df2b9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2706/d394a10d84ab228936fb404b284fc82dd86df2b9/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 12, 2293, 4672, 11109, 273, 14065, 18, 6911, 18, 454, 7675, 1019, 67, 1637, 2668, 17, 4824, 67, 270, 6134, 327, 1743, 67, 869, 67, 2740, 2668, 3644, 19, 25731, 18, 2620, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 12, 2293, 4672, 11109, 273, 14065, 18, 6911, 18, 454, 7675, 1019, 67, 1637, 2668, 17, 4824, 67, 270, 6134, 327, 1743, 67, 869, 67, 2740, 2668, 3644, 19, 25731, 18, 2620, 2187, 1...
req.hdf['config.charts'] = [ {'href': req.href.build(config.name, 'chart/test')}, {'href': req.href.build(config.name, 'chart/coverage')} ]
chart_generators = [] for generator in self.chart_generators: for category in generator.get_supported_categories(): chart_generators.append({ 'href': req.href.build(config.name, 'chart/' + category) }) req.hdf['config.charts'] = chart_generators
def _render_config(self, req, config_name): db = self.env.get_db_cnx()
0d438a95abb40ac01630bc8579c20ba416acad75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4547/0d438a95abb40ac01630bc8579c20ba416acad75/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 1425, 12, 2890, 16, 1111, 16, 642, 67, 529, 4672, 1319, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 1425, 12, 2890, 16, 1111, 16, 642, 67, 529, 4672, 1319, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
sel = self.selection if sel and sel.selection != self: sel.position.x = sel.position.x + 1 sel.startPos.x = sel.startPos.x + 1 sel.resizeCtrl() sel.setSelection()
for sel in self.getSelAsList(): if sel.selection != self: sel.position.x = sel.position.x + 1 sel.startPos.x = sel.startPos.x + 1 self.moveUpdate(sel)
def OnMoveRight(self, event): sel = self.selection if sel and sel.selection != self: sel.position.x = sel.position.x + 1 sel.startPos.x = sel.startPos.x + 1 sel.resizeCtrl() sel.setSelection()
102ae9e4df0cfddbfdb2acfb7df920a5d291af8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/102ae9e4df0cfddbfdb2acfb7df920a5d291af8c/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 7607, 4726, 12, 2890, 16, 871, 4672, 357, 273, 365, 18, 10705, 309, 357, 471, 357, 18, 10705, 480, 365, 30, 357, 18, 3276, 18, 92, 273, 357, 18, 3276, 18, 92, 397, 404, 357, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 7607, 4726, 12, 2890, 16, 871, 4672, 357, 273, 365, 18, 10705, 309, 357, 471, 357, 18, 10705, 480, 365, 30, 357, 18, 3276, 18, 92, 273, 357, 18, 3276, 18, 92, 397, 404, 357, ...
r = gl.getgdesc(GL.GD_BITS_NORM_SNG_RED) g = gl.getgdesc(GL.GD_BITS_NORM_SNG_GREEN) b = gl.getgdesc(GL.GD_BITS_NORM_SNG_BLUE) if (r, g, b) <> (3, 3, 2): raise Error, 'Sorry, can only grab rgb8 on 8-bit Indigo'
if not is_entry_indigo(): raise Error, 'Sorry, can only grab rgb8 on entry level Indigo'
def grab_rgb8(w, h, pf): if gl.getdisplaymode() <> DMRGB: raise Error, 'Sorry, can only grab rgb8 in single-buf rgbmode' if pf <> 1 and pf <> 0: raise Error, 'Sorry, can only grab rgb8 with packfactor 1' r = gl.getgdesc(GL.GD_BITS_NORM_SNG_RED) g = gl.getgdesc(GL.GD_BITS_NORM_SNG_GREEN) b = gl.getgdesc(GL.GD_BITS_NORM_SNG_BLUE) if (r, g, b) <> (3, 3, 2): raise Error, 'Sorry, can only grab rgb8 on 8-bit Indigo' # XXX Dirty Dirty here. # XXX Set buffer to cmap mode, grab image and set it back. # XXX (Shouldn't be necessary???) gl.cmode() gl.gconfig() gl.pixmode(GL.PM_SIZE, 8) data = gl.lrectread(0, 0, w-1, h-1) data = data[:w*h] # BUG FIX for python lrectread gl.RGBmode() gl.gconfig() gl.pixmode(GL.PM_SIZE, 32) return data, None
bc8db65fb865f65620ed14ed45643363560060e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bc8db65fb865f65620ed14ed45643363560060e3/VFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11086, 67, 10948, 28, 12, 91, 16, 366, 16, 10811, 4672, 309, 5118, 18, 588, 5417, 3188, 1435, 2813, 30072, 11343, 30, 1002, 1068, 16, 296, 28898, 16, 848, 1338, 11086, 6917, 28, 316, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11086, 67, 10948, 28, 12, 91, 16, 366, 16, 10811, 4672, 309, 5118, 18, 588, 5417, 3188, 1435, 2813, 30072, 11343, 30, 1002, 1068, 16, 296, 28898, 16, 848, 1338, 11086, 6917, 28, 316, 2...
args = line.split(' ') command = args[0].lower() args = args[1:]
command = line.strip()
def process(self, line, request): """Process a command""" args = line.split(' ') command = args[0].lower() args = args[1:]
5f4c26c54d0cf19eb2e3177b83871b7276ab9d4d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/5f4c26c54d0cf19eb2e3177b83871b7276ab9d4d/loadfileserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 980, 16, 590, 4672, 3536, 2227, 279, 1296, 8395, 833, 273, 980, 18, 4939, 2668, 8624, 1296, 273, 833, 63, 20, 8009, 8167, 1435, 833, 273, 833, 63, 21, 26894, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 980, 16, 590, 4672, 3536, 2227, 279, 1296, 8395, 833, 273, 980, 18, 4939, 2668, 8624, 1296, 273, 833, 63, 20, 8009, 8167, 1435, 833, 273, 833, 63, 21, 26894, 2, -...
tests.append("railsys")
if not os.uname()[0].startswith('CYGWIN'): tests.append("railsys")
def reorder_tests(tests, first_test): try: n = tests.index(first_test) return [first_test] + tests[:n] + tests[n+1:] except ValueError: return tests
5f99b86bd1ed20ee53d00558683324665281fc7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/5f99b86bd1ed20ee53d00558683324665281fc7c/test_all.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19427, 67, 16341, 12, 16341, 16, 1122, 67, 3813, 4672, 775, 30, 290, 273, 7434, 18, 1615, 12, 3645, 67, 3813, 13, 327, 306, 3645, 67, 3813, 65, 397, 7434, 10531, 82, 65, 397, 7434, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19427, 67, 16341, 12, 16341, 16, 1122, 67, 3813, 4672, 775, 30, 290, 273, 7434, 18, 1615, 12, 3645, 67, 3813, 13, 327, 306, 3645, 67, 3813, 65, 397, 7434, 10531, 82, 65, 397, 7434, 6...
html_header=None, html_footer=None, ln=CFG_SITE_LANG, charset='utf-8'):
html_header=None, html_footer=None, ln=CFG_SITE_LANG):
def forge_email(fromaddr, toaddr, subject, content, html_content='', html_images={}, usebcc=False, header=None, footer=None, html_header=None, html_footer=None, ln=CFG_SITE_LANG, charset='utf-8'): """Prepare email. Add header and footer if needed. @param fromaddr: [string] sender @param toaddr: [string] receivers separated by , @param usebcc: [bool] True for using Bcc in place of To @param subject: [string] subject of the email @param content: [string] content of the email @param html_content: [string] html version of the email @param html_images: [dict] dictionary of image id, image path @param header: [string] None for the default header @param footer: [string] None for the default footer @param ln: language @param charset: which charset to use in message ('utf-8' by default) @return forged email as a string""" if header is None: content = email_header(ln) + content else: content = header + content if footer is None: content += email_footer(ln) else: content += footer if html_content: if html_header is None: html_content = email_html_header(ln) + html_content else: html_content = html_header + content if html_footer is None: html_content += email_html_footer(ln) else: html_content += html_footer msg_root = MIMEMultipart('related') msg_root['Subject'] = Header(subject, charset) msg_root['From'] = fromaddr if usebcc: msg_root['Bcc'] = toaddr else: msg_root['To'] = toaddr msg_root.preamble = 'This is a multi-part message in MIME format.' msg_alternative = MIMEMultipart('alternative') msg_root.attach(msg_alternative) msg_text = MIMEText(content, _charset=charset) msg_alternative.attach(msg_text) msg_text = MIMEText(html_content, 'html', _charset=charset) msg_alternative.attach(msg_text) for image_id, image_path in html_images.iteritems(): msg_image = MIMEImage(open(image_path, 'rb').read()) msg_image.add_header('Content-ID', '<%s>' % image_id) msg_image.add_header('Content-Disposition', 'attachment', filename=os.path.split(image_path)[1]) msg_root.attach(msg_image) else: msg_root = MIMEText(content, _charset=charset) msg_root['From'] = fromaddr if usebcc: msg_root['Bcc'] = toaddr else: msg_root['To'] = toaddr msg_root['Subject'] = Header(subject, charset) msg_root.add_header('User-Agent', 'CDS Invenio %s' % CFG_VERSION) return msg_root.as_string()
30f72015abc96d96018e6b5f1cc7b3f5b0edaa57 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1780/30f72015abc96d96018e6b5f1cc7b3f5b0edaa57/mailutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21388, 67, 3652, 12, 2080, 4793, 16, 358, 4793, 16, 3221, 16, 913, 16, 1729, 67, 1745, 2218, 2187, 1729, 67, 7369, 28793, 999, 31345, 33, 8381, 16, 1446, 33, 7036, 16, 9860, 33, 7036, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21388, 67, 3652, 12, 2080, 4793, 16, 358, 4793, 16, 3221, 16, 913, 16, 1729, 67, 1745, 2218, 2187, 1729, 67, 7369, 28793, 999, 31345, 33, 8381, 16, 1446, 33, 7036, 16, 9860, 33, 7036, ...
basic_doc_literal() basic_rpc_literal()
def content_source(): global subject, errors try: url = 'http://localhost:7080/rhq-rhq-enterprise-server-ejb3/ContentSourceManagerBean?wsdl' start(url) client = Client(url) print client # # create a configuration # configuration = client.factory.create('configuration') entry = client.factory.create('configuration.tns:properties.tns:entry') simple = client.factory.create('propertySimple') entry.key = 'location' simple.name = 'location' simple.stringValue = 'http://download.skype.com/linux/repos/fedora/updates/i586' entry.value = simple configuration.properties.entry.append(entry) configuration.notes = 'SkipeAdapter' configuration.version = 1234 print configuration # # create: name, description and type. # name = 'SkipeAdapter' description = 'The skipe adapter' type = 'YumSource' # # create a content source. # print 'createContentSource()' result = client.service.createContentSource( subject, name, description, type, configuration, False) print 'createContentSource: ', str(result) except Exception, e: errors += 1 print e
bbf47852d5340bc61a13df1c466ebb90a12bec52 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1242/bbf47852d5340bc61a13df1c466ebb90a12bec52/rhq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 3168, 13332, 225, 2552, 3221, 16, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10649,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 67, 3168, 13332, 225, 2552, 3221, 16, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10649,...
if __name__ == '__main__':
def _use( o ): print """
0c5e356e35c534017efaeab5a909abcae2b4e101 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/0c5e356e35c534017efaeab5a909abcae2b4e101/align_parallel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1202, 12, 320, 262, 30, 225, 1172, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 389, 1202, 12, 320, 262, 30, 225, 1172, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if model[word_iter][0] == word:
if word_iter and model[word_iter][0] == word:
def select_word(self, word, lang): model = self.word_completion.get_model() if len (model) == 0: return lang_iter = None current_lang_iter = model.get_iter_first() while current_lang_iter and model[current_lang_iter][0] != lang: current_lang_iter = model.iter_next(current_lang_iter) if current_lang_iter and model[current_lang_iter][0] == lang: lang_iter = current_lang_iter if lang_iter: word_iter = model.iter_children(lang_iter) while word_iter and model[word_iter][0] != word: word_iter = model.iter_next(word_iter) if model[word_iter][0] == word: self.word_completion.get_selection().select_iter(word_iter)
959531726c990fd64610de9a89159e12eb94a90b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14305/959531726c990fd64610de9a89159e12eb94a90b/pysdic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 1095, 12, 2890, 16, 2076, 16, 3303, 4672, 938, 273, 365, 18, 1095, 67, 11469, 18, 588, 67, 2284, 1435, 309, 562, 261, 2284, 13, 422, 374, 30, 327, 3303, 67, 2165, 273, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 1095, 12, 2890, 16, 2076, 16, 3303, 4672, 938, 273, 365, 18, 1095, 67, 11469, 18, 588, 67, 2284, 1435, 309, 562, 261, 2284, 13, 422, 374, 30, 327, 3303, 67, 2165, 273, 599,...
cmd = compile_cmd(f, m) queue_compile_med.append(cmd)
queue_compile_med.append([compile_command, f])
def compile_command_list(ext_modules, deps): """ Computes a list of commands needed to compile and link the extension modules given in 'ext_modules' """ queue_compile_high = [] queue_compile_med = [] queue_compile_low = [] for m in ext_modules: new_sources = [] for f in m.sources: if f.endswith('.pyx'): dep_file, dep_time = deps.newest_dep(f) dest_file = "%s/%s"%(SITE_PACKAGES, f) dest_time = deps.timestamp(dest_file) if dest_time < dep_time: if dep_file == f: print "Building modified file %s."%f cmd = compile_cmd(f, m) queue_compile_high.append(cmd) elif dep_file == (f[:-4] + '.pxd'): print "Building %s because it depends on %s."%(f, dep_file) cmd = compile_cmd(f, m) queue_compile_med.append(cmd) else: print "Building %s because it depends on %s."%(f, dep_file) cmd = compile_cmd(f, m) queue_compile_low.append(cmd) new_sources.append(process_filename(f, m)) m.sources = new_sources # print "# compile high = ", len(queue_compile_high) # print queue_compile_high # print "# compile med = ", len(queue_compile_med) # print queue_compile_med # print "# compile low = ", len(queue_compile_low) # print queue_compile_low return queue_compile_high + queue_compile_med + queue_compile_low
5379ece7a55e3f8468a19f6780c11e73a5a333a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5379ece7a55e3f8468a19f6780c11e73a5a333a8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...