rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
classadJob = Classad.Classad(jdl)
classadJob = ClassAd('['+jdl+']')
def checkJDL(self,job): """Checks JDL is OK for Job. """ jobID = str(job) self.log.debug("Checking JDL for job: "+jobID) retVal = self.jobDB.getJobParameters(jobID,['JDL']) if not retVal: result = S_ERROR() result['Value'] = "Job not found in JobDB" return result
a6debbed9900a8e23c472e793e54d6837cc52921 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/a6debbed9900a8e23c472e793e54d6837cc52921/JobSanityAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 46, 8914, 12, 2890, 16, 4688, 4672, 3536, 4081, 804, 8914, 353, 7791, 364, 3956, 18, 3536, 28913, 273, 609, 12, 4688, 13, 365, 18, 1330, 18, 4148, 2932, 14294, 804, 8914, 364, 171...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 46, 8914, 12, 2890, 16, 4688, 4672, 3536, 4081, 804, 8914, 353, 7791, 364, 3956, 18, 3536, 28913, 273, 609, 12, 4688, 13, 365, 18, 1330, 18, 4148, 2932, 14294, 804, 8914, 364, 171...
print args
def execute(args): print args subprocess.call(args)
8342cfc633b624b4ff8e51cae027e486c615be05 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/8342cfc633b624b4ff8e51cae027e486c615be05/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 1968, 4672, 6652, 18, 1991, 12, 1968, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 1968, 4672, 6652, 18, 1991, 12, 1968, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
ci.id = self.name
ci.codec_id = self.name
def _cvt_to_pjsua(self): ci = _pjsua.Codec_Info() ci.id = self.name ci.priority = self.priority return ci
11903e0fff398b4202a356ea16874a469d0cec21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8531/11903e0fff398b4202a356ea16874a469d0cec21/pjsua.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 71, 11734, 67, 869, 67, 84, 2924, 11886, 12, 2890, 4672, 9039, 273, 389, 84, 2924, 11886, 18, 11008, 67, 966, 1435, 9039, 18, 21059, 67, 350, 273, 365, 18, 529, 9039, 18, 8457, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 71, 11734, 67, 869, 67, 84, 2924, 11886, 12, 2890, 4672, 9039, 273, 389, 84, 2924, 11886, 18, 11008, 67, 966, 1435, 9039, 18, 21059, 67, 350, 273, 365, 18, 529, 9039, 18, 8457, ...
f = self.FileIO(support.TESTFN, "wb") f.write(b"abcxxx") f.f = f wr = weakref.ref(f) del f support.gc_collect()
with support.check_warnings(('', ResourceWarning)): f = self.FileIO(support.TESTFN, "wb") f.write(b"abcxxx") f.f = f wr = weakref.ref(f) del f support.gc_collect()
def test_garbage_collection(self): # FileIO objects are collected, and collecting them flushes # all data to disk. f = self.FileIO(support.TESTFN, "wb") f.write(b"abcxxx") f.f = f wr = weakref.ref(f) del f support.gc_collect() self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"abcxxx")
5cf3075f04c461b12e8d3ff706cdb9bdf734717a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/5cf3075f04c461b12e8d3ff706cdb9bdf734717a/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 75, 12332, 67, 5548, 12, 2890, 4672, 468, 1387, 4294, 2184, 854, 12230, 16, 471, 30160, 2182, 3663, 281, 468, 777, 501, 358, 4234, 18, 598, 2865, 18, 1893, 67, 12103, 12, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1387, 4294, 2184, 854, 12230, 16, 471, 30160, 2182, 3663, 281, 468, 777, 501, 358, 4234, 18, 598, 2865, 18, 1893, 67, 12103, 12, 266...
def _var_summary(self, variables, sort_order, heading='Variable Summary'):
def _var_summary(self, variables, sort_order, container, heading='Variable Summary'):
def _var_summary(self, variables, sort_order, heading='Variable Summary'): 'Return a summary of the variables in a class or module' variables = self._sort(variables, sort_order) if len(variables) == 0: return '' str = self._table_header(heading, 'summary')
ad5bc28e61fc8837c138ad9d0c6ffb1dd1b518ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ad5bc28e61fc8837c138ad9d0c6ffb1dd1b518ec/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1401, 67, 7687, 12, 2890, 16, 3152, 16, 1524, 67, 1019, 16, 1478, 16, 11053, 2218, 3092, 17967, 11, 4672, 296, 990, 279, 4916, 434, 326, 3152, 316, 279, 667, 578, 1605, 11, 3152, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1401, 67, 7687, 12, 2890, 16, 3152, 16, 1524, 67, 1019, 16, 1478, 16, 11053, 2218, 3092, 17967, 11, 4672, 296, 990, 279, 4916, 434, 326, 3152, 316, 279, 667, 578, 1605, 11, 3152, ...
myArray = N.ones(5,self.typeCode) zeros(myArray) N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0]))
vector = N.ones(5,self.typeCode) zeros(vector) N.testing.assert_array_equal(vector, N.array([0,0,0,0,0])) def testZerosWrongDim(self): "Test zeros function with wrong dimensions" print >>sys.stderr, self.typeStr, "... ", zeros = Vector.__dict__[self.typeStr + "Zeros"] vector = N.ones((5,5),self.typeCode) self.assertRaises(TypeError, zeros, vector) def testZerosWrongType(self): "Test zeros function with wrong type" print >>sys.stderr, self.typeStr, "... ", zeros = Vector.__dict__[self.typeStr + "Zeros"] vector = N.ones(6,'c') self.assertRaises(TypeError, zeros, vector) def testZerosNonArray(self): "Test zeros function with non-array" print >>sys.stderr, self.typeStr, "... ", zeros = Vector.__dict__[self.typeStr + "Zeros"] self.assertRaises(TypeError, zeros, [1,3,5,7,9])
def testZeros(self): "Test zeros function" print >>sys.stderr, self.typeStr, "... ", zeros = Vector.__dict__[self.typeStr + "Zeros"] myArray = N.ones(5,self.typeCode) zeros(myArray) N.testing.assert_array_equal(myArray, N.array([0,0,0,0,0]))
836762a5d9836a2aff328966ae2e015872f36d32 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/836762a5d9836a2aff328966ae2e015872f36d32/testVector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 20801, 12, 2890, 4672, 315, 4709, 4922, 445, 6, 1172, 1671, 9499, 18, 11241, 16, 365, 18, 723, 1585, 16, 31305, 3104, 4922, 273, 5589, 16186, 1576, 972, 63, 2890, 18, 723, 1585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20801, 12, 2890, 4672, 315, 4709, 4922, 445, 6, 1172, 1671, 9499, 18, 11241, 16, 365, 18, 723, 1585, 16, 31305, 3104, 4922, 273, 5589, 16186, 1576, 972, 63, 2890, 18, 723, 1585, ...
> pySerial - miniterm - help > > %(exit)-16s Exit program > %(menu)-16s Menu escape key > > %(itself)-16s Send the menu character itself to remote > %(exchar)-16s Send the exit character to remote > %(rts)-16s Toggle RTS > %(dtr)-16s Toggle DTR > %(break)-16s Toggle BREAK condition > %(echo)-16s Toggle local echo > %(info)-16s Show info > %(upload)-16s Upload file (prompt will be shown) > > Port settings (%(menu)s followed by the follwoing): > 7 8 set data bits > n e o s m change parity (None, Even, Odd, Space, Mark) > 1 2 3 set stop bits (1, 2, 1.5) > b change baudrate > x X disable/enable software flow control > r R disable/enable hardware flow control
--- pySerial - miniterm - help --- --- %(exit)-8s Exit program --- %(menu)-8s Menu escape key, followed by: --- Menu keys: --- %(itself)-8s Send the menu character itself to remote --- %(exchar)-8s Send the exit character to remote --- %(info)-8s Show info --- %(upload)-8s Upload file (prompt will be shown) --- Toggles: --- %(rts)s RTS %(echo)s local echo --- %(dtr)s DTR %(break)s BREAK --- %(lfm)s line feed %(repr)s Cycle repr mode --- --- Port settings (%(menu)s followed by the following): --- 7 8 set data bits --- n e o s m change parity (None, Even, Odd, Space, Mark) --- 1 2 3 set stop bits (1, 2, 1.5) --- b change baud rate --- x X disable/enable software flow control --- r R disable/enable hardware flow control
def get_help_text(): return """
c61cb24df3b85c0b769f2fa31ac2433f3c0e4b39 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/c61cb24df3b85c0b769f2fa31ac2433f3c0e4b39/miniterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5201, 67, 955, 13332, 327, 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, 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, 336, 67, 5201, 67, 955, 13332, 327, 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, -100,...
PeerDataManager.getInstance().setOnline(permid, bOnline)
if not self.text_mode: from Tribler.vwxGUI.peermanager import PeerDataManager PeerDataManager.getInstance().setOnline(permid, bOnline)
def handleConnection(self,exc,permid,selversion,locally_initiated): """ An overlay-connection was established. Notify interested parties. """
41d3ddb023a7435af4ce0dda7b3ecc24bcb42036 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9686/41d3ddb023a7435af4ce0dda7b3ecc24bcb42036/OverlayApps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1952, 12, 2890, 16, 10075, 16, 12160, 350, 16, 1786, 1589, 16, 1829, 1230, 67, 2738, 10206, 4672, 3536, 1922, 9218, 17, 4071, 1703, 19703, 18, 10918, 20506, 1087, 606, 18, 3536, 2,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1952, 12, 2890, 16, 10075, 16, 12160, 350, 16, 1786, 1589, 16, 1829, 1230, 67, 2738, 10206, 4672, 3536, 1922, 9218, 17, 4071, 1703, 19703, 18, 10918, 20506, 1087, 606, 18, 3536, 2,...
if value is not None and value != 'C':
if value not in (None, '', 'C'):
def setlocale(category, value=None): """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ if value is not None and value != 'C': raise Error, '_locale emulation only supports "C" locale' return 'C'
103d6e7a3c9feed2ef54d51c77f0daa614dc936a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/103d6e7a3c9feed2ef54d51c77f0daa614dc936a/locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 6339, 12, 4743, 16, 460, 33, 7036, 4672, 3536, 444, 6339, 12, 7745, 16, 1080, 33, 7036, 13, 317, 533, 18, 26939, 815, 19, 13748, 2573, 4929, 18, 3536, 309, 460, 486, 316, 261, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 6339, 12, 4743, 16, 460, 33, 7036, 4672, 3536, 444, 6339, 12, 7745, 16, 1080, 33, 7036, 13, 317, 533, 18, 26939, 815, 19, 13748, 2573, 4929, 18, 3536, 309, 460, 486, 316, 261, 7...
__AllowedKeysVals = { 'grtyp':'X', 'ig14':(0,0,0,0), 'shape':(0,0), 'xyaxis':(None,None) }
def allowedKeysVals(self): return { 'grtyp':'X', 'ig14':(0,0,0,0), 'shape':(0,0), 'xyaxis':(None,None) }
def __init__(self,**args): FstCriterias.__init__(self,X__Criteres,1,args)
91fb3457fceaf01ce582b2fa492bc1d9a92f7ca3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1808/91fb3457fceaf01ce582b2fa492bc1d9a92f7ca3/rpnstd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 636, 1968, 4672, 478, 334, 39, 1091, 1795, 16186, 2738, 972, 12, 2890, 16, 60, 972, 39, 1091, 281, 16, 21, 16, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 636, 1968, 4672, 478, 334, 39, 1091, 1795, 16186, 2738, 972, 12, 2890, 16, 60, 972, 39, 1091, 281, 16, 21, 16, 1968, 13, 2, -100, -100, -100, -100, -10...
if data.endswith('\r\n'): return data.replace('\r\n', '\n')
if data.endswith(b'\r\n'): return data.replace(b'\r\n', b'\n')
def normalize_output(data): # Some operating systems do conversions on newline. We could possibly # fix that by doing the appropriate termios.tcsetattr()s. I couldn't # figure out the right combo on Tru64 and I don't have an IRIX box. # So just normalize the output and doc the problem O/Ses by allowing # certain combinations for some platforms, but avoid allowing other # differences (like extra whitespace, trailing garbage, etc.) # This is about the best we can do without getting some feedback # from someone more knowledgable. # OSF/1 (Tru64) apparently turns \n into \r\r\n. if data.endswith('\r\r\n'): return data.replace('\r\r\n', '\n') # IRIX apparently turns \n into \r\n. if data.endswith('\r\n'): return data.replace('\r\n', '\n') return data
4fad0e27288669c5710fb0a498a9d42677577b6a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/4fad0e27288669c5710fb0a498a9d42677577b6a/test_pty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 2844, 12, 892, 4672, 468, 10548, 16929, 14908, 741, 22586, 603, 9472, 18, 225, 1660, 3377, 10016, 468, 2917, 716, 635, 9957, 326, 5505, 2481, 7441, 18, 5111, 542, 1747, 1435, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 2844, 12, 892, 4672, 468, 10548, 16929, 14908, 741, 22586, 603, 9472, 18, 225, 1660, 3377, 10016, 468, 2917, 716, 635, 9957, 326, 5505, 2481, 7441, 18, 5111, 542, 1747, 1435, 8...
self.partitionDialog.connect ("destroy", self.destroy)
def __init__(self, xml, partClist): self.xml = xml self.partClist = partClist self.partitionDialog = self.xml.get_widget("partition_dialog") self.partitionDialog.connect ("destroy", self.destroy) self.mountPointCombo = self.xml.get_widget("mountPointCombo") self.fsTypeCombo = self.xml.get_widget("fsTypeCombo") self.sizeCombo = self.xml.get_widget("sizeCombo") self.asPrimaryCheck = self.xml.get_widget("asPrimaryCheck") self.asPrimaryNumCheck = self.xml.get_widget("asPrimaryNumCheck") self.asPrimaryNumCombo = self.xml.get_widget("asPrimaryNumCombo") self.asPrimaryNumBox = self.xml.get_widget("asPrimaryNumBox") self.onDiskCheck = self.xml.get_widget("onDiskCheck") self.onDiskEntry = self.xml.get_widget("onDiskEntry") self.onDiskBox = self.xml.get_widget("onDiskBox") self.onPartCheck = self.xml.get_widget("onPartCheck") self.onPartEntry = self.xml.get_widget("onPartEntry") self.onPartBox = self.xml.get_widget("onPartBox") self.sizeFixedRadio = self.xml.get_widget("sizeFixedRadio") self.sizeSetRadio = self.xml.get_widget("sizeSetRadio") self.sizeMaxRadio = self.xml.get_widget("sizeMaxRadio") self.maxSizeCombo = self.xml.get_widget("maxSizeCombo") self.formatRadio = self.xml.get_widget("formatRadio")
929ed22dc2ac34d175a48b1a35936e1cabfd84f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/929ed22dc2ac34d175a48b1a35936e1cabfd84f4/partWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2025, 16, 1087, 39, 1098, 4672, 365, 18, 2902, 273, 2025, 365, 18, 2680, 39, 1098, 273, 1087, 39, 1098, 365, 18, 10534, 6353, 273, 365, 18, 2902, 18, 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, 1001, 2738, 972, 12, 2890, 16, 2025, 16, 1087, 39, 1098, 4672, 365, 18, 2902, 273, 2025, 365, 18, 2680, 39, 1098, 273, 1087, 39, 1098, 365, 18, 10534, 6353, 273, 365, 18, 2902, 18, 5...
packageFileName = buildScript + "_$variants_$process.js" packageSize = storeCompiledPackage(includeDict, packageFileName, dynLoadDeps, dynRunDeps, variants, buildProcess)
packageFileName = buildScript + "_$variants_$process.js" packageSize = storeCompiledPackage(includeDict, packageFileName, dynLoadDeps, dynRunDeps, variants, buildProcess)
def generateScript(): global classes global modules global verbose global quiet # # INITIALIZATION PHASE # # Class paths classPaths = getJobConfig("classPath") # Script names buildScript = getJobConfig("buildScript") sourceScript = getJobConfig("sourceScript") apiScript = getJobConfig("apiScript") # Dynamic dependencies dynLoadDeps = getJobConfig("require", {}) dynRunDeps = getJobConfig("use", {}) # Variants data # TODO: Variants for source -> Not possible userVariants = getJobConfig("variants", {}) # Part support (has priority) userParts = getJobConfig("parts", {}) # Build relevant post processing buildProcess = getJobConfig("buildProcess", []) userInclude = getJobConfig("include", []) userExclude = getJobConfig("exclude", []) collapseParts = getJobConfig("collapseParts", []) optimizeLatency = getJobConfig("optimizeLatency") if len(userParts) > 0: execMode = "parts" else: execMode = "normal" # # SCAN PHASE # # Scan for classes and modules scanClassPaths(classPaths) scanModules() # # PREPROCESS PHASE: INCLUDE/EXCLUDE # # Auto include all when nothing defined if execMode == "normal" and len(userInclude) == 0: print " - Automatically including all available classes" userInclude.append("*") print ">>> Preparing include/exclude configuration..." smartInclude, explicitInclude = _splitIncludeExcludeList(userInclude) smartExclude, explicitExclude = _splitIncludeExcludeList(userExclude) # Configuration feedback if not quiet: print " - Including %s items smart, %s items explicit" % (len(smartInclude), len(explicitInclude)) print " - Excluding %s items smart, %s items explicit" % (len(smartExclude), len(explicitExclude)) if len(userExclude) > 0: print " - Warning: Excludes may break code!" if len(explicitInclude) > 0: print " - Warning: Explicit included classes may not work" # Resolve modules/regexps print " - Resolving modules/regexps..." smartInclude = resolveComplexDefs(smartInclude) explicitInclude = resolveComplexDefs(explicitInclude) smartExclude = resolveComplexDefs(smartExclude) explicitExclude = resolveComplexDefs(explicitExclude) # # PREPROCESS PHASE: VIEWS # if execMode == "parts": print print ">>> Preparing part configuration..." # Build bitmask ids for parts if verbose: print print " - Assigning bits to parts..." # References partId -> bitId of that part partBits = {} partPos = 0 for partId in userParts: partBit = 1<<partPos if verbose: print " - Part #%s => %s" % (partId, partBit) partBits[partId] = partBit partPos += 1 # Resolving modules/regexps print " - Resolving part modules/regexps..." partClasses = {} for partId in userParts: partClasses[partId] = resolveComplexDefs(userParts[partId]) # # EXECUTION PHASE # sets = _computeVariantCombinations(userVariants) for pos, variants in enumerate(sets): print print "----------------------------------------------------------------------------" print " PROCESSING VARIANT SET %s/%s" % (pos+1, len(sets)) print "----------------------------------------------------------------------------" if not quiet and len(variants) > 0: for entry in variants: print " - %s = %s" % (entry["id"], entry["value"]) print "----------------------------------------------------------------------------" # Detect dependencies print ">>> Resolving application dependencies..." includeDict = resolveDependencies(smartInclude, smartExclude, dynLoadDeps, dynRunDeps, variants) # Explicit include/exclude if len(explicitInclude) > 0 or len(explicitExclude) > 0: print ">>> Processing explicitely configured includes/excludes..." for entry in explicitInclude: includeDict[entry] = True for entry in explicitExclude: if includeDict.has_key(entry): del includeDict[entry] # Detect optionals if verbose: optionals = getOptionals(includeDict) if len(optionals) > 0: print ">>> These optional classes may be useful:" for entry in optionals: print " - %s" % entry if apiScript != None: storeApiScript(includeDict, apiScript, dynLoadDeps, dynRunDeps) if buildScript != None: if execMode == "parts": processParts(partClasses, partBits, includeDict, dynLoadDeps, dynRunDeps, variants, collapseParts, optimizeLatency, buildScript, buildProcess) else: sys.stdout.write(">>> Compiling classes:") sys.stdout.flush() packageFileName = buildScript + "_$variants_$process.js" packageSize = storeCompiledPackage(includeDict, packageFileName, dynLoadDeps, dynRunDeps, variants, buildProcess) print " - Done: %s" % packageSize
e3364bd2416dfe75fd85aeea0ded427372ef3d08 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e3364bd2416dfe75fd85aeea0ded427372ef3d08/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 3651, 13332, 2552, 3318, 2552, 4381, 2552, 3988, 2552, 10902, 282, 468, 468, 12584, 15154, 2689, 15490, 4429, 468, 225, 468, 1659, 2953, 667, 4466, 273, 13024, 809, 2932, 1106, 743, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 3651, 13332, 2552, 3318, 2552, 4381, 2552, 3988, 2552, 10902, 282, 468, 468, 12584, 15154, 2689, 15490, 4429, 468, 225, 468, 1659, 2953, 667, 4466, 273, 13024, 809, 2932, 1106, 743, ...
INSTALLMACHINE = re.compile(r'InstallMachine\s+([^\s]+)')
def commandBoot(self, machine_account, commands): """ NetBoot Compat layer for old RHTS Scheduler """ repos = [] bootargs = None kickstart = [] packages = [] testrepo = None hostname = None distro_name = None SETENV = re.compile(r'SetEnvironmentVar\s+([^\s]+)\s+"*([^"]+)') INSTALLMACHINE = re.compile(r'InstallMachine\s+([^\s]+)') BOOTARGS = re.compile(r'BootArgs\s+(.*)') KICKSTART = re.compile(r'Kickstart\s+(.*)') ADDREPO = re.compile(r'AddRepo\s+([^\s]+)') TESTREPO = re.compile(r'TestRepo\s+([^\s]+)') INSTALLPACKAGE = re.compile(r'InstallPackage\s+([^\s]+)')
4d63fd4292c4390a74d93b1b865af705c4c5bc3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/4d63fd4292c4390a74d93b1b865af705c4c5bc3f/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 15817, 12, 2890, 16, 5228, 67, 4631, 16, 4364, 4672, 3536, 8503, 15817, 5427, 270, 3018, 364, 1592, 534, 5062, 55, 12620, 3536, 13686, 273, 5378, 4835, 1968, 273, 599, 23228, 1937, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15817, 12, 2890, 16, 5228, 67, 4631, 16, 4364, 4672, 3536, 8503, 15817, 5427, 270, 3018, 364, 1592, 534, 5062, 55, 12620, 3536, 13686, 273, 5378, 4835, 1968, 273, 599, 23228, 1937, ...
ipad = "\x36" * blocksize opad = "\x5C" * blocksize
def __init__(self, key, msg = None, digestmod = None): """Create a new HMAC object.
8fe2d2015dc57e4e048f733c7fbb5c0712b05d15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8fe2d2015dc57e4e048f733c7fbb5c0712b05d15/hmac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 498, 16, 1234, 273, 599, 16, 5403, 1711, 273, 599, 4672, 3536, 1684, 279, 394, 20792, 733, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 498, 16, 1234, 273, 599, 16, 5403, 1711, 273, 599, 4672, 3536, 1684, 279, 394, 20792, 733, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Subwidget Class --------- ----- incr Button decr Button entry Entry label Label"""
Subwidget Class --------- ----- incr Button decr Button entry Entry label Label"""
def pick(self, index):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 12, 2890, 16, 770, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 12, 2890, 16, 770, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pass
pass
def check_term(term, col_size, term_rec, max_occ, min_occ, termlength): """Check if the term is valid for use term - the term to check col_size - the number of records in database term_rec - the number of records which contains this term max_occ - max frequency of the term allowed min_occ - min frequence of the term allowed termlength - the minimum length of the terms allowed""" try: if is_stopword(term, 1) or (len(term) <= termlength) or ((float(term_rec) / float(col_size)) >= max_occ) or ((float(term_rec) / float(col_size)) <= min_occ): return "" if int(term): return "" except StandardError, e: pass return "true"
65057a59d7844e5dc821df793923e70a6a071b3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/65057a59d7844e5dc821df793923e70a6a071b3b/bibrank_record_sorter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 6408, 12, 6408, 16, 645, 67, 1467, 16, 2481, 67, 3927, 16, 943, 67, 25049, 16, 1131, 67, 25049, 16, 19272, 781, 1288, 4672, 3536, 1564, 309, 326, 2481, 353, 923, 364, 999, 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, 866, 67, 6408, 12, 6408, 16, 645, 67, 1467, 16, 2481, 67, 3927, 16, 943, 67, 25049, 16, 1131, 67, 25049, 16, 19272, 781, 1288, 4672, 3536, 1564, 309, 326, 2481, 353, 923, 364, 999, 2...
self.failIf( skins_tool._setup_called )
self.failIf( site._skin_setup_called )
def test_empty_skip_purge( self ):
602f054babd4fcf667987bd5ada457ed274c4361 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/602f054babd4fcf667987bd5ada457ed274c4361/test_skins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5531, 67, 7457, 67, 26422, 12, 365, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5531, 67, 7457, 67, 26422, 12, 365, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
res, output = call_capture(regrtest.run_file, space)
res, output = self.call_capture(space, regrtest.run_file, space)
def run(self): # XXX integrate this into InterceptedRunModule # but we want a py.test refactoring towards # more autonomy of colitems regarding # their representations regrtest = self.parent.regrtest space = gettestobjspace() res, output = call_capture(regrtest.run_file, space)
9336e2932a10b2852959a68607c2013df57bdf5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/9336e2932a10b2852959a68607c2013df57bdf5b/conftest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 11329, 23367, 333, 1368, 5294, 956, 329, 1997, 3120, 468, 377, 1496, 732, 2545, 279, 2395, 18, 3813, 283, 3493, 6053, 23248, 468, 377, 1898, 2059, 6037, 434, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 11329, 23367, 333, 1368, 5294, 956, 329, 1997, 3120, 468, 377, 1496, 732, 2545, 279, 2395, 18, 3813, 283, 3493, 6053, 23248, 468, 377, 1898, 2059, 6037, 434, 6...
tempInput=raw_input('Press enter to continue')
def completelyRemoveDirectory(top): # Delete everything reachable from the directory named in 'top', # assuming there are no symbolic links. # CAUTION: This is dangerous! For example, if top == '/', it # could delete all your disk files. for root, dirs, files in os.walk(top, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name))
0d19f8522a266876fc844f526c22e90b41133aab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1952/0d19f8522a266876fc844f526c22e90b41133aab/buildAndReleaseM2DC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14416, 3288, 2853, 12, 3669, 4672, 468, 2504, 7756, 19234, 628, 326, 1867, 4141, 316, 296, 3669, 2187, 468, 15144, 1915, 854, 1158, 16754, 4716, 18, 468, 6425, 13269, 30, 225, 1220, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14416, 3288, 2853, 12, 3669, 4672, 468, 2504, 7756, 19234, 628, 326, 1867, 4141, 316, 296, 3669, 2187, 468, 15144, 1915, 854, 1158, 16754, 4716, 18, 468, 6425, 13269, 30, 225, 1220, 353, ...
body.text = "%s\n" % event_time
body.text = "%s %s\n" % (etime, eroom)
def command_parser(inner, self, room): while True: elements = yield inner
038e1b0b2392f4dabf5872a68236405188062906 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14361/038e1b0b2392f4dabf5872a68236405188062906/historian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 4288, 12, 7872, 16, 365, 16, 7725, 4672, 1323, 1053, 30, 2186, 273, 2824, 3443, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 4288, 12, 7872, 16, 365, 16, 7725, 4672, 1323, 1053, 30, 2186, 273, 2824, 3443, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
v=EMR_UNKNOWN.__getattribute__(self,'values')
v=_EMR_UNKNOWN.__getattribute__(self,'values')
"""Return EMR attribute if the name exists in the typedef list
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3536, 990, 7141, 54, 1566, 309, 326, 508, 1704, 316, 326, 618, 536, 666, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3536, 990, 7141, 54, 1566, 309, 326, 508, 1704, 316, 326, 618, 536, 666, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return str(unicode(b.getvalue(), 'utf-8', 'ignore'))
return unicode(b.getvalue(), 'utf-8', 'ignore')
def eclass_login(username, password): from BeautifulSoup import BeautifulSoup import pycurl import StringIO import urllib import os import urlparse b = StringIO.StringIO() conn = pycurl.Curl() login_form_seq = [ ('uname', username), ('pass', password), ('submit', 'E%95%CE%AF%CF%83%CE%BF%CE%B4%CE%BF%CF%82') ] login_form_data = urllib.urlencode(login_form_seq) conn.setopt(pycurl.FOLLOWLOCATION, 1) conn.setopt(pycurl.POSTFIELDS, login_form_data) conn.setopt(pycurl.URL, 'http://e-class.teilar.gr/index.php') conn.setopt(pycurl.WRITEFUNCTION, b.write) conn.perform() soup = BeautifulSoup(str(unicode(b.getvalue(), 'utf-8', 'ignore'))) try: if soup.find('div', 'user').contents[0] == '&nbsp;': return 1 else: raise except: return str(unicode(b.getvalue(), 'utf-8', 'ignore'))
f9f5f5fc0f1381e679d4a1b2b0afb8df3738c1bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11011/f9f5f5fc0f1381e679d4a1b2b0afb8df3738c1bd/teilar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 1106, 67, 5819, 12, 5053, 16, 2201, 4672, 628, 28132, 1930, 28132, 1930, 2395, 13504, 1930, 15777, 1930, 11527, 1930, 1140, 1930, 15185, 225, 324, 273, 15777, 18, 780, 4294, 1435, 148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 1106, 67, 5819, 12, 5053, 16, 2201, 4672, 628, 28132, 1930, 28132, 1930, 2395, 13504, 1930, 15777, 1930, 11527, 1930, 1140, 1930, 15185, 225, 324, 273, 15777, 18, 780, 4294, 1435, 148...
Returns the inertia degree over the ground ring, i.e. 1. INPUT: self -- a local ring OUTPUT: integer -- the inertia degree of this ring, i.e., 1
Returns the inertia degree over the ground ring: 1 unless overridden. INPUT: self -- a local ring OUTPUT: integer -- the inertia degree of this ring: 1 unless overridden.
def inertia_degree(self): r""" Returns the inertia degree over the ground ring, i.e. 1.
ea4a24bb1a1964f11de3bcb39383296e0a810a47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/ea4a24bb1a1964f11de3bcb39383296e0a810a47/local_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 31449, 67, 21361, 12, 2890, 4672, 436, 8395, 2860, 326, 316, 31449, 10782, 1879, 326, 19209, 9221, 16, 277, 18, 73, 18, 404, 18, 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, 0, 0, 0, 0, 0, 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, 316, 31449, 67, 21361, 12, 2890, 4672, 436, 8395, 2860, 326, 316, 31449, 10782, 1879, 326, 19209, 9221, 16, 277, 18, 73, 18, 404, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
print column
def _getattrFromForeignKey(self, column, attr): ret = getattr(self, column.name)==getattr(self.soClass, '_SO_class_'+column.foreignKey).q.id print column return ret
6c03a51120e5d66597fac2ea7e4ba12fb50ecbc0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6718/6c03a51120e5d66597fac2ea7e4ba12fb50ecbc0/sqlbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1747, 1265, 15420, 12, 2890, 16, 1057, 16, 1604, 4672, 325, 273, 225, 3869, 12, 2890, 16, 1057, 18, 529, 13, 631, 588, 1747, 12, 2890, 18, 2048, 797, 16, 2070, 3584, 67, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1747, 1265, 15420, 12, 2890, 16, 1057, 16, 1604, 4672, 325, 273, 225, 3869, 12, 2890, 16, 1057, 18, 529, 13, 631, 588, 1747, 12, 2890, 18, 2048, 797, 16, 2070, 3584, 67, 11...
dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors"
dispElementColorSettingsText = \ "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors"
def createWhatsThisTextForMainWindowWidgets(win): """ Adds the "What's This" help text to items found in the NE1 mainwindow toolbars and menus . @param win: NE1's mainwindow object. @type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>} @note: Property Managers specify "What's This" text for their own widgets, usually in a method called add_whats_this_text(), not in this file. """ # # File Toolbar # # Open File fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)<br> "\ "<p><img source=\"ui/actions/File/Open.png\"><br> "\ "Opens a new file."\ "</p>" win.fileOpenAction.setWhatsThis( fileOpenText ) # Import File fileImportText = "<u><b>Import File</b></u><br>"\ "Inserts a file of any chemical file format supported by "\ "<b>Openbabel</b> into the current Part" win.fileImportAction.setWhatsThis(fileImportText) #Export File fileExportText = "<u><b>Export File</b></u><br>"\ "Save the current Part in any chemical file format supported by "\ "<b>Openbabel</b>. Note that exclusive features of NanoEngineer-1 "\ "are not saved to the exported file" win.fileExportAction.setWhatsThis(fileExportText) # Save File fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)<br> "\ "<p><img source=\"ui/actions//Save.png\"><br> "\ "Saves the current file."\ "</p>" win.fileSaveAction.setWhatsThis( fileSaveText ) # # Edit Toolbar # # Make Checkpoint ### editMakeCheckpointText = \ "<u><b>Make Checkpoint</b></u>"\ "<p>"\ "<img source=\"ui/actions/Edit/Make_CheckPoint.png\"><br> "\ "Make Undo checkpoint."\ "</p>" win.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) # Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = \ "<u><b>Automatic Checkpointing</b></u>"\ "<p>"\ "Enables/Disables <b>Automatic Checkpointing</b>. When enabled, "\ "the program maintains the Undo stack automatically. When disabled, "\ "the user is required to manually create Undo checkpoints using the "\ "<b>Make Checkpoint</b> button: "\ "</p>"\ "<p><img source=\"ui/actions/Edit/Make_CheckPoint.png\">"\ "</p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. "\ "By disabling Automatic Checkpointing, the program will run faster. "\ "</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints "\ "manually when Automatic Checkpointing is disabled.</i></b>"\ "</p>" win.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) # Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" win.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) # Undo editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)<br> "\ "<p><img source=\"ui/actions/Undo.png\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning win.editUndoAction.setWhatsThis( editUndoText ) win.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link # Redo from PlatformDependent import is_macintosh if is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s<br> "\ "<p><img source=\"ui/actions/Edit/Redo.png\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning win.editRedoAction.setWhatsThis( editRedoText ) win.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link # Cut editCutText = "<u><b>Cut</b></u> (Ctrl + X)<br> "\ "<p><img source=\"ui/actions/Edit/Cut.png\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" win.editCutAction.setWhatsThis( editCutText ) # Copy editCopyText = "<u><b>Copy</b></u> (Ctrl + C)<br> "\ "<p><img source=\"ui/actions/Edit/Copy.png\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" win.editCopyAction.setWhatsThis( editCopyText ) # Paste editPasteText = "<u><b>Paste</b></u> (Ctrl + V)<br> "\ "<p><img source=\"ui/actions/Edit/Paste_On.png\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" win.editPasteAction.setWhatsThis( editPasteText ) # Delete editDeleteText = "<u><b>Delete</b></u> (DEL)<br> "\ "<p><img source=\"ui/actions/Delete.png\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release win.editDeleteAction.setWhatsThis( editDeleteText ) #Preferences Dialog editPrefsText = "<u><b>Preferences Dialog</b></u>"\ "<p>Allows you to edit various user preferences "\ "such as changing atom, bond display properties,"\ "lighting, background color, window position and"\ "size, plugins etc. </p>" win.editPrefsAction.setWhatsThis( editPrefsText ) # # View Toolbar # # Home View setViewHomeActionText = \ "<u><b>Home</b></u> (Home)<br>"\ "<p>"\ "<img source=\"ui/actions/View/Modify/Home.png\"><br>"\ "When you create a new model, it appears in a "\ "default view orientation (FRONT view). When you "\ "open an existing model, it appears in the "\ "orientation it was last saved. You can change the "\ "default orientation by selecting <b>Set Home View "\ "to Current View</b> from the <b>View</b> menu."\ "</p>" win.setViewHomeAction.setWhatsThis( setViewHomeActionText ) # Fit to Window setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom_To_Fit.png\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" win.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) # Recenter setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Recenter.png\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" win.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) # Zoom Tool setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom.png\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" win.zoomToolAction.setWhatsThis( setzoomToolActionText ) # Pan Tool setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Pan.png\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" win.panToolAction.setWhatsThis( setpanToolActionText ) # Rotate Tool setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Rotate.png\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" win.rotateToolAction.setWhatsThis( setrotateToolActionText ) # Orthographic Projection setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" win.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) # Perspective Projection setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" win.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) # Normal To viewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Normal_To.png/\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" win.viewNormalToAction.setWhatsThis( viewNormalToActionText ) # Parallel To viewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Parallel_To.png\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" win.viewParallelToAction.setWhatsThis( viewParallelToActionText ) # Save Named View saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Save_Named_View.png\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" win.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) # Front View viewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"ui/actions/View/Front.png\"><br> "\ "Orients the view to the Front View."\ "</p>" win.viewFrontAction.setWhatsThis( viewFrontActionText ) # Back View viewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"ui/actions/View/Back.png\"><br> "\ "Orients the view to the Back View."\ "</p>" win.viewBackAction.setWhatsThis( viewBackActionText ) # Top View viewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"ui/actions/View/Top.png\"><br> "\ "Orients the view to the Top View."\ "</p>" win.viewTopAction.setWhatsThis( viewTopActionText ) # Bottom View viewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"ui/actions/View/Bottom.png\"><br> "\ "Orients the view to the Bottom View."\ "</p>" win.viewBottomAction.setWhatsThis( viewBottomActionText ) # Left View viewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"ui/actions/View/Left.png\"><br> "\ "Orients the view to the Left View."\ "</p>" win.viewLeftAction.setWhatsThis( viewLeftActionText ) # Right View viewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"ui/actions/View/Right.png\"><br> "\ "Orients the view to the Right View."\ "</p>" win.viewRightAction.setWhatsThis( viewRightActionText ) #Isometric View viewIsometricActionText = "<u><b>IsometricView</b></u><br>"\ "<p><img source=\"ui/actions/View/Isometric.png\"><br> "\ "Orients the view to the Isometric View."\ "</p>" win.viewIsometricAction.setWhatsThis( viewIsometricActionText ) # Rotate View 180 viewRotate180ActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_180.png.png\"><br> "\ "Rotates the view 180 degrees."\ "</p>" win.viewRotate180Action.setWhatsThis( viewRotate180ActionText ) # Rotate View +90 viewRotatePlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_+90.png\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotatePlus90Action.setWhatsThis( viewRotatePlus90ActionText ) # Rotate View -90 viewRotateMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_-90.png\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotateMinus90Action.setWhatsThis( viewRotateMinus90ActionText ) # QuteMol viewQuteMolActionText = \ "<u><b>QuteMol</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/QuteMol.png\"><br> "\ "Starts QuteMol and loads a PDB file of the current model."\ "</p>" \ "QuteMol must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewQuteMolAction.setWhatsThis( viewQuteMolActionText ) # POV-Ray (was Raytrace Scene) viewRaytraceSceneActionText = "<u><b>POV-Ray</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Raytrace_Scene.png\"><br> "\ "Raytrace the current scene using POV-Ray. "\ "</p>" \ "POV-Ray must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewRaytraceSceneAction.setWhatsThis( viewRaytraceSceneActionText ) # # Grids Toolbar # # Surface 100 orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface100.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" win.orient100Action.setWhatsThis(orient100ActionText ) # Surface 110 orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface110.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" win.orient110Action.setWhatsThis(orient110ActionText ) # Surface 111 orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface111.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" win.orient111Action.setWhatsThis(orient111ActionText ) # # Insert toolbar # # Graphene insertGrapheneActionText = \ "<u><b>Build Graphene</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Graphene.png\"><br> "\ "Inserts a 2D sheet of graphene in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertGrapheneAction.setWhatsThis(insertGrapheneActionText ) # Build Nanotube insertNanotubeActionText = \ "<u><b>Build Nanotube</b></u>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Nanotube.png\"> <br>"\ "Inserts a carbon or boron nitride nanotube in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertNanotubeAction.setWhatsThis(insertNanotubeActionText ) # Build DNA buildDnaActionText = \ "<u><b>Build DNA</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/DNA.png\"><br> "\ "Inserts DNA in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.buildDnaAction.setWhatsThis(buildDnaActionText ) # POV-Ray Scene insertPovraySceneActionText = "<u><b>Insert POV-Ray Scene</b></u><br>"\ "<p><img source=\"ui/actions/POV-Ray_Scene.png\"><br> "\ "Inserts a POV-Ray Scene file based on the current model and viewpoint. "\ "</p>" win.insertPovraySceneAction.setWhatsThis(insertPovraySceneActionText ) # Comment insertCommentActionText = "<u><b>Insert Comment</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Comment.png\"><br> "\ "Inserts a comment in the current part. "\ "</p>" win.insertCommentAction.setWhatsThis(insertCommentActionText ) # # Display toolbar # # Display Default dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Default.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>Modes</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" win.dispDefaultAction.setWhatsThis(dispDefaultActionText ) # Display Invisible dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Invisible.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispInvisAction.setWhatsThis(dispInvisActionText ) # Display Lines dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Lines.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispLinesAction.setWhatsThis(dispLinesActionText ) # Display Tubes dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Tubes.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispTubesAction.setWhatsThis(dispTubesActionText ) # Display Ball and Stick dispBallActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Ball_and_Stick.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispBallAction.setWhatsThis(dispBallActionText ) # Display CPK # [bruce extended and slightly corrected text, 060307] dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/CPK.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispCPKAction.setWhatsThis(dispCPKActionText ) # Display Cylinder dispCylinderActionText = "<u><b>Display Cylinder</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Cylinder.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Cylinder</b> mode. Chunks are rendered as cylinders."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Cylinder</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispCylinderAction.setWhatsThis(dispCylinderActionText ) # Display Surface dispSurfaceActionText = "<u><b>Display Surface</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Surface.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Surface</b> mode. Chunks are rendered as a smooth surface."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Surface</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispSurfaceAction.setWhatsThis(dispSurfaceActionText ) #Reset Chunk Color dispResetChunkColorText = "<u><b>Reset Chunk Color</b></u><br>"\ "Resets the user defined chunk color and renders the atoms " \ "(in the chunk) with their own element colors" win.dispResetChunkColorAction.setWhatsThis(dispResetChunkColorText ) #Reset Atoms Display dispResetAtomsDisplayText = "<u><b>Reset Atoms Display</b></u><br>"\ "Renders the selected atoms (or the atoms in the"\ "selected chunks) with the same display style as "\ "that of their parent chunk" win.dispResetAtomsDisplayAction.setWhatsThis(dispResetAtomsDisplayText) #Show Invisible Atoms dispShowInvisAtomsText = "<u><b>Show Invisible Atoms</b></u><br>"\ "Renders the selected atoms (or the atoms in the selected "\ "chunks) with the same display style as their parent chunk. "\ "However, if the parent chunk is set as invisible, this feature " \ "will not work. " win.dispShowInvisAtomsAction.setWhatsThis(dispShowInvisAtomsText) #Element Color Settings Dialog dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors" win.dispElementColorSettingsAction.setWhatsThis(dispElementColorSettingsText) # # Select toolbar # # Select All selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_All.png\"><br> "\ "When in <b>Build</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" win.selectAllAction.setWhatsThis(selectAllActionText ) # Select None selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_None.png\"><br> "\ "Unselects everything currently selected.</p>" win.selectNoneAction.setWhatsThis(selectNoneActionText ) # InvertSelection selectInvertActionText = "<u><b>Invert Selection</b></u> (Ctrl + Shift + I)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Invert.png\"><br> "\ "Inverts the current selection.</p>" win.selectInvertAction.setWhatsThis(selectInvertActionText ) # Select Connected selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Connected.png\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>You can also select all connected atoms by double clicking on an atom or bond "\ "while in <b>Build</b> mode.</p>" win.selectConnectedAction.setWhatsThis(selectConnectedActionText ) # Select Doubly selectDoublyActionText = "<u><b>Select Doubly</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Doubly.png\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection."\ "</p>" win.selectDoublyAction.setWhatsThis(selectDoublyActionText ) # Expand Selection selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Expand.png\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" win.selectExpandAction.setWhatsThis(selectExpandActionText ) # Contract Selection selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Contract.png\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" win.selectContractAction.setWhatsThis(selectContractActionText ) # # Modify Toolbar # # Adjust Selection modifyAdjustSelActionText = "<u><b>Adjust Selection</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_Selection.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the selection</i>) to make the geometry more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustSelAction.setWhatsThis(modifyAdjustSelActionText ) # Adjust All modifyAdjustAllActionText = "<u><b>Adjust All</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_All.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the entire part</i>) to make the geometry of the part more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustAllAction.setWhatsThis(modifyAdjustAllActionText ) # Hydrogenate modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> <br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Hydrogenate.png\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" win.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) # Dehydrogenate modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Dehydrogenate.png\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" win.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) # Passivate modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)<br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Passivate.png\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" win.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) # Stretch modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Stretch.png\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" win.modifyStretchAction.setWhatsThis(modifyStretchActionText ) # Delete Bonds modifyDeleteBondsActionText = "<u><b>Cut Bonds</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Delete_Bonds.png\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" win.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) # Separate/New Chunk modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Separate.png\"><br> "\ "Creates a new chunk(s) from the currently selected atoms. "\ "If the selected atoms belong to different chunks, multiple new "\ "chunks are created.</p>" win.modifySeparateAction.setWhatsThis(modifySeparateActionText ) # New Chunk makeChunkFromSelectedAtomsActionText = "<u><b>New Chunk</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/New_Chunk.png\"><br> "\ "Creates a new chunk from the currently selected atoms. "\ "All atoms end up in a single chunk.</p>" win.makeChunkFromSelectedAtomsAction.setWhatsThis(makeChunkFromSelectedAtomsActionText ) # Merge Chunks modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Merge.png\"><br> "\ "Merges two or more chunks into a single chunk.</p>" win.modifyMergeAction.setWhatsThis(modifyMergeActionText ) # Invert Chunks modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Invert.png\"><br> "\ "Inverts the atoms of the selected chunks.</p>" win.modifyInvertAction.setWhatsThis(modifyInvertActionText ) # Mirror Selected Chunks #Note that the the feature name is intentionally kept "Mirror" instead of "Mirror Chunks" because # in future we will support mirrroing atoms as well. -- ninad060814 modifyMirrorActionText = "<u><b>Mirror</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Mirror.png\"><br> "\ "Mirrors the selected <b> chunks </b> about a reference Grid Plane.<br>"\ "<font color=\"#808080\">Note: In this version, it doesn't mirror jigs or individual atoms.</font> </p>" win.modifyMirrorAction.setWhatsThis(modifyMirrorActionText ) # Align to Common Axis modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/AlignToCommonAxis.png\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" win. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) #Center on Common Axis modifyCenterCommonAxisActionText= "<u><b>Center On Common Axis</b></u><br>"\ "<p><b> Moves</b> all selected chunks to the center of the <b> first </b> selected chunk "\ "and also <b>aligns</b> them to the axis of the first one ."\ "You must select two or more chunks before using this feature. </p>" win.modifyCenterCommonAxisAction.setWhatsThis(modifyCenterCommonAxisActionText) # # Tools Toolbar # # Select Chunks toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/63.png\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" win. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) # Move Chunks toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" win. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) # Build Atoms toolsDepositAtomActionText = \ "<u><b>Build Atoms</b></u><!-- [[Feature:Build Atoms]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Atoms.png\"><br> "\ "<b>Build Atoms</b> allows you to build structures one atom at a time or by depositing objects "\ "that are on the paste clipboard. You can also insert structures from the "\ "NanoEngineer-1 Parts Library.</p>"\ "<p>It is also possible to change bond types between atoms using the <b>Bond Tool</b> or by "\ "simply dragging and dropping one bondpoint onto another."\ "</p>" win. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) # Build Crystal (was Cookie Cutter Mode) toolsCookieCutActionText = "<u><b>Build Crystal</b></u><!-- [[Feature:Build Crystal]] --><br>"\ "<p><><img source=\"ui/actions/Tools/Build Structures/Cookie_Cutter.png\"><br> "\ "<b>Build Crystal</b> provides tools for cutting out multi-layered shapes from "\ "slabs of diamond or lonsdaleite lattice.</p>" win. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) # Tools > Extrude toolsExtrudeActionText = "<u><b>Extrude</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\"ui/actions/Insert/Features/Extrude.png\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" win. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) # Fuse Chunks Mode toolsFuseChunksActionText = "<u><b>Fuse Chunks Mode</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Fuse.png\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two fusing options are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints "\ "of two or more chunks. Bondpoints are highlighted and lines are drawn (and undrawn) as chunks "\ "are dragged to indicate bonding relationships between bondpoints. Bondpoints with "\ "multiple bonding relationships are highlighted in magenta to indicate that they cannot "\ "make bonds.<br><br>"\ "<b>Fuse Atoms</b> fuses pairs of overlapping atoms between chunks. The set of overlapping "\ "atoms in the selected chunk(s) are highlighted in green while the set of atoms that will be deleted "\ "in non-selected chunks are highlighted in dark red. It is possible that deleted atoms will not fuse "\ "properly, leaving bondpoints on the selected chunk(s) atoms. This is a bug. To help "\ "minimize this problem, try to get the bonds of overlapping atoms oriented similarly.<br>"\ "</p>" win.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) # # Simulator Toolbar # # Minimize Energy simMinimizeEnergyActionText = "<u><b>Minimize Energy</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Minimize_Energy.png\"><br> "\ "The potential energy of a chemical structure is a function of the relative positions of its atoms. " \ "To obtain this energy with complete accuracy involves a lot of computer time spent on quantum " \ "mechanical calculations, which cannot be practically done on a desktop computer. "\ "To get an approximate potential energy without all that, we represent the energy as a series of " \ "terms involving geometric properties of the structure: lengths of chemical bonds, angles between " \ "pairs and triples of chemical bonds, etc. </p>" \ "<p>" \ "As is generally the case with physical systems, the gradient of the potential energy represents " \ "the forces acting on various particles. The atoms want to move in the direction that most reduces " \ "the potential energy. Energy minimization is a process of adjusting the atom positions to try to find " \ "a global minimum of the potential energy. Each atom contributes three variables (its x, y, and z " \ "coordinates) so the search space is multi-dimensional. The global minimum is the configuration " \ "that the atoms will settle into if lowered to zero Kelvin. </p>" win. simMinimizeEnergyAction.setWhatsThis( simMinimizeEnergyActionText ) # Run Dynamics (was NanoDynamics-1). Mark 060807. simSetupActionText = "<u><b>Run Dynamics</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Run_Dynamics.png\"><br> "\ "This is the interface to the NanoEngineer-1 molecular dynamics simulator. "\ "Enter the parameters of the simulation and click <b>Run Simulation</b>."\ "The simulator creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model.</p>" win. simSetupAction.setWhatsThis( simSetupActionText ) # Play Movie (was Movie Player) Mark 060807. simMoviePlayerActionText = "<u><b>Play Movie</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Play_Movie.png\"><br> "\ "Plays the most recent trajectory (movie) file created by the NanoEngineer-1 molecular dynamics simulator."\ "To create a movie file, select <b>Run Dynamics</b>.</p>" win. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) # Make Graphs (was Plot Tool) Mark 060807. simPlotToolActionText = "<u><b>Make Graphs</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Make_Graphs.png\"><br> "\ "Make a graph of a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "<b>Measure Distance:</b> distance(angstroms)<br>"\ "<b>Measure Angle:</b> angle (degrees)<br>"\ "<b>Measure Dihedral:</b> dihedral(degrees)<br>"\ "</p>" win. simPlotToolAction.setWhatsThis( simPlotToolActionText ) # # Dashboard Buttons # # Done toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Done.png\"><br> "\ "Completes the current operation and enters the default mode."\ "</p>" win. toolsDoneAction.setWhatsThis( toolsDoneActionText ) # Cancel toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Cancel.png\"><br> "\ "Cancels the current operation and enters the default mode."\ "</p>" win. toolsCancelAction.setWhatsThis( toolsCancelActionText ) # Back up toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "Undoes the previous operation."\ "</p>" win. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) # Start Over toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" win.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) # Add Layers ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/addlayer.png\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" win.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) # # Jigs # # Anchor jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Anchor.png\"><br> "\ "Attaches an <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Build</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" win.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) # Rotary Motor jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsMotorAction.setWhatsThis(jigsMotorActionText ) # Linear Motor jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Linear_Motor.png\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) # Thermostat jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Thermostat.png\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" win.jigsStatAction.setWhatsThis(jigsStatActionText ) # Thermometer jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Thermometer.png\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" win.jigsThermoAction.setWhatsThis(jigsThermoActionText ) # ESP Image jigsESPImageActionText = "<u><b>ESP Image</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/ESP_Image.png\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" win.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) # Atom Set jigsAtomSetActionText = "<u><b>Atom Set</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Atom_Set.png\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Build</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" win.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) # Measure Distance jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Distance.png\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Build</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) # Measure Angle jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Angle.png\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Build</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsAngleAction.setWhatsThis(jigsAngleActionText ) # Measure Dihedral jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Dihedral.png\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Build</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) # GAMESS Jig jigsGamessActionText = "<u><b>GAMESS Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Gamess.png\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Build</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" win.jigsGamessAction.setWhatsThis(jigsGamessActionText ) # Grid Plane Jig jigsGridPlaneActionText = "<u><b>Grid Plane</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Reference Geometry/Grid_Plane.png\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" win.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) # # Help Toolbar # # What's This helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"ui/actions/Help/WhatsThis.png\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" win.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) win.helpMouseControlsAction.setWhatsThis('Displays help for mouse controls') win.helpKeyboardShortcutsAction.setWhatsThis('Displays help for keyboard shortcuts')
596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
details = {} model = self.report.queryset.model if model.detail_reports: for name in model.detail_reports.split(): def render(instance): meth = getattr(instance,name) dtlrep = meth() if self.detail_renderer: r = self.detail_renderer(dtlrep,request,name) return r.render_to_string() else: return mark_safe(unicode(dtlrep)) details[name] = render self.details = details
def __init__(self,report,request,prefix=None): ReportRenderer.__init__(self,report) self.request = request self.prefix = prefix flt = report.default_filter if prefix is None: self.params = report.param_form(request.GET) if self.params.is_valid(): flt = self.params.cleaned_data.get('flt', report.default_filter) self.queryset = self._build_queryset(flt) #self.main_menu = settings.MAIN_MENU
be56412f40bfbda942ecb2aabb38742ad0694096 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2247/be56412f40bfbda942ecb2aabb38742ad0694096/render.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6006, 16, 2293, 16, 3239, 33, 7036, 4672, 8706, 6747, 16186, 2738, 972, 12, 2890, 16, 6006, 13, 365, 18, 2293, 273, 590, 365, 18, 3239, 273, 1633, 26901,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6006, 16, 2293, 16, 3239, 33, 7036, 4672, 8706, 6747, 16186, 2738, 972, 12, 2890, 16, 6006, 13, 365, 18, 2293, 273, 590, 365, 18, 3239, 273, 1633, 26901,...
def statusCheck(dryrun): global sysvals, data res = dict() if(data.notestrun): print("SUCCESS: The command should run!") return
def statusCheck(): global sysvals status = True if(sysvals.android): print('Checking the android system ...') else: print('Checking this system (%s)...' % platform.node()) if(sysvals.android): res = 'NO' out = os.popen(sysvals.adb+' get-state').read().strip() if(out == 'device'): res = 'YES' print(' is android device connected: %s' % res) if(res != 'YES'): print(' Please connect the device before using this tool') return False
def getModes(): global sysvals modes = "" if(os.path.exists(sysvals.powerfile)): fp = open(sysvals.powerfile, 'r') modes = string.split(fp.read()) fp.close() return modes
0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 1145, 13332, 2552, 2589, 4524, 12382, 273, 1408, 309, 12, 538, 18, 803, 18, 1808, 12, 9499, 4524, 18, 12238, 768, 3719, 30, 4253, 273, 1696, 12, 9499, 4524, 18, 12238, 768, 16, 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, 2108, 1145, 13332, 2552, 2589, 4524, 12382, 273, 1408, 309, 12, 538, 18, 803, 18, 1808, 12, 9499, 4524, 18, 12238, 768, 3719, 30, 4253, 273, 1696, 12, 9499, 4524, 18, 12238, 768, 16, 2...
pointset.apply(printer)
def test_pointset(): pointset = PointSet(Point3Array([(0,0,0),(1,1,1)])) pointset.colorList = [(1,1,1,1),(2,2,2,2)] pointset.apply(printer) eval_code(pointset)
5af742fb7bba9aa7cc5692e378c2cd775320b880 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/799/5af742fb7bba9aa7cc5692e378c2cd775320b880/test_pyprinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1153, 542, 13332, 1634, 542, 273, 4686, 694, 12, 2148, 23, 1076, 3816, 12, 20, 16, 20, 16, 20, 3631, 12, 21, 16, 21, 16, 21, 13, 22643, 1634, 542, 18, 3266, 682, 273, 306...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1153, 542, 13332, 1634, 542, 273, 4686, 694, 12, 2148, 23, 1076, 3816, 12, 20, 16, 20, 16, 20, 3631, 12, 21, 16, 21, 16, 21, 13, 22643, 1634, 542, 18, 3266, 682, 273, 306...
return cls(path, slow, allow_oom, tmflags)
return cls(path, slow, allow_oom, tmflags, valgrind)
def from_file(cls, path): slow = allow_oom = False tmflags = ''
ea23dc85970663d5f24e981c348fb0d236c55290 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/ea23dc85970663d5f24e981c348fb0d236c55290/trace-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 768, 12, 6429, 16, 589, 4672, 11816, 273, 1699, 67, 4252, 273, 1083, 6118, 7133, 273, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 768, 12, 6429, 16, 589, 4672, 11816, 273, 1699, 67, 4252, 273, 1083, 6118, 7133, 273, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
n = ZZ(n)
def qn(self, n): """ Return the denominator of the n-th partial convergent, computed using the recurrence. EXAMPLES: sage: c = continued_fraction(pi); c [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 3] sage: c.pn(0), c.qn(0) (3, 1) sage: len(c) 14 sage: c.pn(13), c.qn(13) (245850922, 78256779) """ n = ZZ(n) if n < -2: raise ValueError, "n must be >= -2" if len(self.__qn) < n+3: self.pn(n) return self.__qn[n+2]
5102b272204aa591fb33be5c324340ff545b0b46 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5102b272204aa591fb33be5c324340ff545b0b46/contfrac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31054, 12, 2890, 16, 290, 4672, 3536, 2000, 326, 15030, 434, 326, 290, 17, 451, 4702, 14581, 75, 319, 16, 8470, 1450, 326, 25939, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 276, 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, 31054, 12, 2890, 16, 290, 4672, 3536, 2000, 326, 15030, 434, 326, 290, 17, 451, 4702, 14581, 75, 319, 16, 8470, 1450, 326, 25939, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 276, 273...
recurrenceItem, reminderItem)
recurrenceItem)
def _verifyCalendarItems(calendar, location, recurrence, reminder): self.assertEqual(calendar.displayName, "simple calendar") self.assertEqual(calendar.getAttributeValue('displayName'), "simple calendar")
7a83dd01bb2bc873e9aca6329c74df4d7b7223e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7a83dd01bb2bc873e9aca6329c74df4d7b7223e5/TestCalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8705, 7335, 3126, 12, 11650, 16, 2117, 16, 25939, 16, 849, 14055, 4672, 365, 18, 11231, 5812, 12, 11650, 18, 5417, 461, 16, 315, 9647, 5686, 7923, 365, 18, 11231, 5812, 12, 11650, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 8705, 7335, 3126, 12, 11650, 16, 2117, 16, 25939, 16, 849, 14055, 4672, 365, 18, 11231, 5812, 12, 11650, 18, 5417, 461, 16, 315, 9647, 5686, 7923, 365, 18, 11231, 5812, 12, 11650, ...
with closing(_fileio_FileIO(source_path, 'r')) as file:
with closing(_fileio._FileIO(source_path, 'r')) as file:
def get_source(self, fullname): """Return the source for the module as a string.
970b84ff42f71ded626dc875dfe0987545e42fe1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/970b84ff42f71ded626dc875dfe0987545e42fe1/_bootstrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3168, 12, 2890, 16, 13321, 4672, 3536, 990, 326, 1084, 364, 326, 1605, 487, 279, 533, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3168, 12, 2890, 16, 13321, 4672, 3536, 990, 326, 1084, 364, 326, 1605, 487, 279, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def updateClockSelection(self,a0): self.comboClockSelect.setEnabled(False) self.clockselect.select(a0) self.initClockSelector() self.comboClockSelect.setEnabled(True) def initClockSelector(self): self.comboClockSelect.clear() nbsources = self.clockselect.count() for idx in range(nbsources): desc = self.clockselect.getEnumLabel(idx) self.comboClockSelect.insertItem(desc) active_idx = self.clockselect.selected(); if active_idx >= 0: self.comboClockSelect.setCurrentItem(active_idx)
def updateClockSelection(self,a0): #disable the combobox self.comboClockSelect.setEnabled(False) #change the clock source self.clockselect.select(a0) #refresh the clock source selection box self.initClockSelector() #make the box available again self.comboClockSelect.setEnabled(True)
af376d4d0e18676b66b0d444bda0d051d1147d1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11526/af376d4d0e18676b66b0d444bda0d051d1147d1c/mixer_saffirele.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 14027, 6233, 12, 2890, 16, 69, 20, 4672, 468, 8394, 326, 3894, 27570, 365, 18, 25053, 14027, 3391, 18, 542, 1526, 12, 8381, 13, 468, 3427, 326, 7268, 1084, 365, 18, 18517, 4025, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 14027, 6233, 12, 2890, 16, 69, 20, 4672, 468, 8394, 326, 3894, 27570, 365, 18, 25053, 14027, 3391, 18, 542, 1526, 12, 8381, 13, 468, 3427, 326, 7268, 1084, 365, 18, 18517, 4025, ...
libraries = ['panel'] + curses_libs) )
libraries = [panel_library] + curses_libs) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
86070428898b811339b0e4454e10ebf6f6ad4641 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/86070428898b811339b0e4454e10ebf6f6ad4641/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
plen=u64(splen) prev=u64(sprev)
plen=U64(splen) prev=U64(sprev)
def undo(self, transaction_id): self._lock_acquire() try: self._clear_index() transaction_id=base64.decodestring(transaction_id+'==\n') tid, tpos = transaction_id[:8], u64(transaction_id[8:]) packt=self._packt if packt is None or packt > tid: raise POSException.UndoError, ( 'Undo is currently disabled for database maintenance.<p>')
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 12, 2890, 16, 2492, 67, 350, 4672, 365, 6315, 739, 67, 1077, 1039, 1435, 775, 30, 365, 6315, 8507, 67, 1615, 1435, 2492, 67, 350, 33, 1969, 1105, 18, 4924, 1145, 371, 12, 7958, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 12, 2890, 16, 2492, 67, 350, 4672, 365, 6315, 739, 67, 1077, 1039, 1435, 775, 30, 365, 6315, 8507, 67, 1615, 1435, 2492, 67, 350, 33, 1969, 1105, 18, 4924, 1145, 371, 12, 7958, ...
"""ButtonBox - A container for pushbuttons"""
"""ButtonBox - A container for pushbuttons. Subwidgets are the buttons added with the add method. """
def unbind_widget(self, widget): self.tk.call(self._w, 'unbind', widget._w)
f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17449, 67, 6587, 12, 2890, 16, 3604, 4672, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 318, 4376, 2187, 3604, 6315, 91, 13, 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, 17449, 67, 6587, 12, 2890, 16, 3604, 4672, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 318, 4376, 2187, 3604, 6315, 91, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100...
ret = self.__addFilesToThreadPool( filesToTransfer, outputDict )
ret = self.__addFilesToThreadPool( filesToTransfer, transferPath )
def checkForTransfers( self ): """ Check for transfers to do and start them """ result = self.getDefinedTransferPaths() if not result[ 'OK' ]: return result tPaths = result[ 'Value' ] for name in tPaths: transferPath = tPaths[ name ] filesToTransfer = self.getOutgoingFiles( tPaths[ name ] ) ret = self.__addFilesToThreadPool( filesToTransfer, outputDict ) if not ret['OK']: # The thread pool got full break
bc883a3e4b925e2fcc225e91b7b7e96318dfdcf1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12038/bc883a3e4b925e2fcc225e91b7b7e96318dfdcf1/OutputDataExecutor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13855, 1429, 18881, 12, 365, 262, 30, 3536, 2073, 364, 29375, 358, 741, 471, 787, 2182, 3536, 563, 273, 365, 18, 588, 8116, 5912, 4466, 1435, 309, 486, 563, 63, 296, 3141, 11, 308, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13855, 1429, 18881, 12, 365, 262, 30, 3536, 2073, 364, 29375, 358, 741, 471, 787, 2182, 3536, 563, 273, 365, 18, 588, 8116, 5912, 4466, 1435, 309, 486, 563, 63, 296, 3141, 11, 308, 30,...
queuedEventHub.subscribeToType(TIMEOUT, stop)
conn.disconnect() conn = queuedEventHub.subscribeToType(TIMEOUT, stop)
def stop(event): print '"finish record"' removeRecorder(name + extension)
80146b041f63191c595977f7a2e883cc6241596f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10608/80146b041f63191c595977f7a2e883cc6241596f/shellinit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2575, 4672, 1172, 2119, 13749, 1409, 5187, 1206, 10777, 12, 529, 397, 2710, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2132, 12, 2575, 4672, 1172, 2119, 13749, 1409, 5187, 1206, 10777, 12, 529, 397, 2710, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
_print( chart,'\t',get_chart(chart))
_print( chart,'\t',get_chart(chart))
lines[0] = lines[0].replace('(self)','()').replace('def test_','def ')
54b0d91949e81431823145f7da3ca55fa7d90690 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3687/54b0d91949e81431823145f7da3ca55fa7d90690/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2362, 63, 20, 65, 273, 2362, 63, 20, 8009, 2079, 2668, 12, 2890, 13, 17023, 11866, 2934, 2079, 2668, 536, 1842, 67, 17023, 536, 8624, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2362, 63, 20, 65, 273, 2362, 63, 20, 8009, 2079, 2668, 12, 2890, 13, 17023, 11866, 2934, 2079, 2668, 536, 1842, 67, 17023, 536, 8624, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return m
def _centerDrawParaLineX( tx, offset, line, last=0): m = offset+0.5*line.extraSpace setXPos(tx,m) _putFragLine(tx, line) setXPos(tx,-m) return m
ae97b90f6a178f0d7566cbd8acc91dc0dd0700c1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7053/ae97b90f6a178f0d7566cbd8acc91dc0dd0700c1/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5693, 6493, 23529, 1670, 60, 12, 2229, 16, 1384, 16, 980, 16, 1142, 33, 20, 4672, 312, 273, 1384, 15, 20, 18, 25, 14, 1369, 18, 7763, 3819, 23733, 1616, 12, 978, 16, 81, 13, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5693, 6493, 23529, 1670, 60, 12, 2229, 16, 1384, 16, 980, 16, 1142, 33, 20, 4672, 312, 273, 1384, 15, 20, 18, 25, 14, 1369, 18, 7763, 3819, 23733, 1616, 12, 978, 16, 81, 13, 3...
response = fileHelper.networkToFD( fd )
retVal = fileHelper.networkToFD( fd ) if not retVal[ 'OK' ]: return retVal retVal = self.transport.receiveData()
def receiveFile( self, filename, fileId, token = ""): fileHelper = FileHelper() retVal = fileHelper.getFileDescriptor( filename, "w" ) if not retVal[ 'OK' ]: return retVal fd = retVal[ 'Value' ] retVal = self.__sendTransferHeader( "ToClient", ( fileId, token ) ) if not retVal[ 'OK' ]: return retVal fileHelper.setTransport( self.transport ) response = fileHelper.networkToFD( fd ) self.transport.close() return response
da555be2acd9e45231b46c8a03debff6b461bab9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/da555be2acd9e45231b46c8a03debff6b461bab9/TransferClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6798, 812, 12, 365, 16, 1544, 16, 21223, 16, 1147, 273, 1408, 4672, 585, 2276, 273, 1387, 2276, 1435, 12197, 273, 585, 2276, 18, 29925, 3187, 12, 1544, 16, 315, 91, 6, 262, 309, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6798, 812, 12, 365, 16, 1544, 16, 21223, 16, 1147, 273, 1408, 4672, 585, 2276, 273, 1387, 2276, 1435, 12197, 273, 585, 2276, 18, 29925, 3187, 12, 1544, 16, 315, 91, 6, 262, 309, 486, ...
continue
def run(self): try: while True:
aabccdffdf67c5427d3e8dbd19fa887dd7eca1e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/aabccdffdf67c5427d3e8dbd19fa887dd7eca1e0/nmstatusmonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1086, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
and element[1] in ('=', '!=', '<>', '<=', '<', '>', '>=', '=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of') \ and ((not internal) or element[1] in ('inselect',))
and (((not internal) and element[1] in OPS) \ or (internal and element[1] in INTERNAL_OPS))
def _is_leaf(self, element, internal=False): return (isinstance(element, tuple) or isinstance(element, list)) \ and len(element) == 3 \ and element[1] in ('=', '!=', '<>', '<=', '<', '>', '>=', '=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of') \ and ((not internal) or element[1] in ('inselect',))
3242b0cfee21e9a9a59ba8d8e3fc6e0598543995 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/3242b0cfee21e9a9a59ba8d8e3fc6e0598543995/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 12070, 12, 2890, 16, 930, 16, 2713, 33, 8381, 4672, 327, 261, 291, 1336, 12, 2956, 16, 3193, 13, 578, 1549, 12, 2956, 16, 666, 3719, 521, 471, 562, 12, 2956, 13, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 291, 67, 12070, 12, 2890, 16, 930, 16, 2713, 33, 8381, 4672, 327, 261, 291, 1336, 12, 2956, 16, 3193, 13, 578, 1549, 12, 2956, 16, 666, 3719, 521, 471, 562, 12, 2956, 13, 422, ...
if line[:1] == "-":
if line[:2] == "- ":
def addLine(self, line): line = line.strip()
e9d8b436ef9cf17db11a91e538b4d12918cd97c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10965/e9d8b436ef9cf17db11a91e538b4d12918cd97c8/changes2xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26772, 12, 2890, 16, 980, 4672, 980, 273, 980, 18, 6406, 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, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26772, 12, 2890, 16, 980, 4672, 980, 273, 980, 18, 6406, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._map = {self._fileno: self}
self._singleton = {self._fileno: self}
def __init__(self, sock, addr, obj=None): self.obj = None self.marshal = Marshaller() self.closed = 0 self.msgid = 0 self.peer_protocol_version = None # Set in recv_handshake() if isinstance(addr, types.TupleType): self.log_label = "zrpc-conn:%s:%d" % addr else: self.log_label = "zrpc-conn:%s" % addr self.__super_init(sock, addr) # A Connection either uses asyncore directly or relies on an # asyncore mainloop running in a separate thread. If # thr_async is true, then the mainloop is running in a # separate thread. If thr_async is true, then the asyncore # trigger (self.trigger) is used to notify that thread of # activity on the current thread. self.thr_async = 0 self.trigger = None self._prepare_async() self._map = {self._fileno: self} # msgid_lock guards access to msgid self.msgid_lock = threading.Lock() # replies_cond is used to block when a synchronous call is # waiting for a response self.replies_cond = threading.Condition() self.replies = {} # waiting_for_reply is used internally to indicate whether # a call is in progress. setting a session key is deferred # until after the call returns. self.waiting_for_reply = 0 self.delay_sesskey = None self.register_object(obj) self.handshake()
c8dc49bdef9be96c2639ee661f583dd6f7ce2243 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/c8dc49bdef9be96c2639ee661f583dd6f7ce2243/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 3091, 16, 1081, 33, 7036, 4672, 365, 18, 2603, 273, 599, 365, 18, 3108, 273, 26026, 264, 1435, 365, 18, 12204, 273, 374, 365, 18, 3576, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 3091, 16, 1081, 33, 7036, 4672, 365, 18, 2603, 273, 599, 365, 18, 3108, 273, 26026, 264, 1435, 365, 18, 12204, 273, 374, 365, 18, 3576, 350, ...
if Profile.FileName == FileLineTuple[0] and Profile.MacroName == Name and Profile.DefinedAtLine <= FileLineTuple[1]:
if Profile.MacroName == Name and Profile.DefinedAtLine <= FileLineTuple[1]:
def __EvaluateConditional(self, Name, Line, Op = None, Value = None):
a7cf4bab35e83dfadd60ff1c1dc88c66926859b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/a7cf4bab35e83dfadd60ff1c1dc88c66926859b2/FdfParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 15369, 14132, 12, 2890, 16, 1770, 16, 5377, 16, 6066, 273, 599, 16, 1445, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 15369, 14132, 12, 2890, 16, 1770, 16, 5377, 16, 6066, 273, 599, 16, 1445, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
L = [
test_conv_no_sign = [
def write(self, line): pass
2336bddd5dba559db950e8b5fa73257fc62d1fc3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/2336bddd5dba559db950e8b5fa73257fc62d1fc3/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 980, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 980, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
"""Makes a variable available everywhere within the scope of the current suite.
"""Makes a variable available everywhere within the scope of the current suite.
def set_suite_variable(self, name, *values): """Makes a variable available everywhere within the scope of the current suite. Variables set with this keyword are available everywhere within the scope of the currently executed test suite. Setting variables with this keyword thus has the same effect as creating them using the Variable table in the test data file or importing them from variable files. Other test suites will not see variables set with this keyword. The variable name must be given either in the escaped format (e.g. \\${scalar} or \\@{list}) or without curly braces (e.g. $scalar or @list) to prevent it from being resolved. If a variable already exists within the new scope, its value will be overwritten. Otherwise a new variable is created. If a variable already exists within the current scope, the value can be left empty and the variable within the new scope gets the value within the current scope.
dfa75ac2320d3c97bf00a5f0b376db63803b6c8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/dfa75ac2320d3c97bf00a5f0b376db63803b6c8e/BuiltIn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 30676, 67, 6105, 12, 2890, 16, 508, 16, 380, 2372, 4672, 3536, 14534, 279, 2190, 2319, 3614, 6051, 3470, 326, 2146, 434, 326, 783, 11371, 18, 225, 23536, 444, 598, 333, 4932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 30676, 67, 6105, 12, 2890, 16, 508, 16, 380, 2372, 4672, 3536, 14534, 279, 2190, 2319, 3614, 6051, 3470, 326, 2146, 434, 326, 783, 11371, 18, 225, 23536, 444, 598, 333, 4932, ...
if not ((dtd in emit_order) or (dtd in ready_components)):
if not (dtd in emit_order):
def sortByDependency (self, components, dependent_class_filter): """Return the components that belong to this namespace, in order of dependency.
c3ef34397142b62a1228552159d7b192d442865f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/c3ef34397142b62a1228552159d7b192d442865f/Namespace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14021, 7787, 261, 2890, 16, 4085, 16, 10460, 67, 1106, 67, 2188, 4672, 3536, 990, 326, 4085, 716, 10957, 358, 333, 1981, 16, 316, 1353, 434, 4904, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14021, 7787, 261, 2890, 16, 4085, 16, 10460, 67, 1106, 67, 2188, 4672, 3536, 990, 326, 4085, 716, 10957, 358, 333, 1981, 16, 316, 1353, 434, 4904, 18, 2, -100, -100, -100, -100, -100, ...
class ConvertBrokenBrowserTestCase(BaseTestCase):
class ConvertBrokenBrowserTests(BaseTests):
def test4(self): test = ur"""<p>test </p>""" output = ur"""<p>test</p>""" self.do(test, output)
db56d346a1f4ab8f2393c50243742ce44e69951c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/db56d346a1f4ab8f2393c50243742ce44e69951c/test_converter_text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 24, 12, 2890, 4672, 1842, 273, 8896, 8395, 32, 84, 34, 3813, 7765, 84, 2984, 3660, 876, 273, 8896, 8395, 32, 84, 34, 3813, 1757, 84, 2984, 3660, 365, 18, 2896, 12, 3813, 16, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 24, 12, 2890, 4672, 1842, 273, 8896, 8395, 32, 84, 34, 3813, 7765, 84, 2984, 3660, 876, 273, 8896, 8395, 32, 84, 34, 3813, 1757, 84, 2984, 3660, 365, 18, 2896, 12, 3813, 16, 87...
print "clip 4 offset : %s" %end_line.get_offset()
def copy(self,start,stop,bullet=None): #Now, we take care of the normal, cross application clipboard text = start.get_text(stop) if text and bullet: #we replace the arrow by the original "-" newtext = text.replace(bullet, "-") self.description = newtext elif text: self.description = text end_line = start.copy() #we take line after line in the selection while end_line.get_line() <= stop.get_line() and end_line.forward_line(): print "clip 1 offset : %s" %end_line.get_offset() end_line.backward_char() #we want to detect subtasks in the selection tags = end_line.get_tags()+end_line.get_toggled_tags(False) is_subtask = False print "clip 2 offset : %s" %end_line.get_offset() for ta in tags : if (ta.get_data('is_subtask')): is_subtask = True self.content.append(['subtask', ta.get_data('child')]) if not is_subtask: if end_line.get_line() < stop.get_line(): self.content.append(['text', "%s\n" %start.get_text(end_line)]) else: self.content.append(['text', start.get_text(stop)]) print "clip 3 offset : %s" %end_line.get_offset() end_line.forward_char() start.forward_line() print "clip 4 offset : %s" %end_line.get_offset()
bdb65abaceeddd03fef8784e076d4afa2ce4b72d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/bdb65abaceeddd03fef8784e076d4afa2ce4b72d/clipboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 1937, 16, 5681, 16, 70, 19994, 33, 7036, 4672, 468, 8674, 16, 732, 4862, 7671, 434, 326, 2212, 16, 6828, 2521, 20304, 977, 273, 787, 18, 588, 67, 955, 12, 5681, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 1937, 16, 5681, 16, 70, 19994, 33, 7036, 4672, 468, 8674, 16, 732, 4862, 7671, 434, 326, 2212, 16, 6828, 2521, 20304, 977, 273, 787, 18, 588, 67, 955, 12, 5681, 1...
username=r_and_d[0][3], comment=r_and_d[0][4],
username=get_username(r_and_d[0][3], r_and_d[0][4]), comment=r_and_d[0][5],
def GET(self, parms, extras): try: dbcon = get_dbcon() cur = dbcon.cursor()
ae430d435e68643193c5a5eea5e48d44f9cbdcbd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/ae430d435e68643193c5a5eea5e48d44f9cbdcbd/gliki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 16, 17902, 16, 11875, 4672, 775, 30, 1319, 591, 273, 336, 67, 1966, 591, 1435, 662, 273, 1319, 591, 18, 9216, 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, 0, 0, 0, 0, 0, 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, 4978, 12, 2890, 16, 17902, 16, 11875, 4672, 775, 30, 1319, 591, 273, 336, 67, 1966, 591, 1435, 662, 273, 1319, 591, 18, 9216, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
if(browser_op or browser_saf)
if(browser_op || browser_saf)
def javascript(): s = r"""
23ae0da43bbc3221e7b82d5573b31a042501954b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/23ae0da43bbc3221e7b82d5573b31a042501954b/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 436, 8395, 282, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 436, 8395, 282, 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._draw_atom_style() in ('arrowhead-away1', 'arrowhead-to-bp'):
if self._draw_atom_style().startswith('arrowhead-'):
def draw_wirespheres(self, glpane, disp, pos, pickedrad): #bruce 060315 split this out of self.draw so I can add it to draw_in_abs_coords if self._draw_atom_style() in ('arrowhead-away1', 'arrowhead-to-bp'): # compensate for the cone (drawn by draw_atom_sphere in this case) being bigger than the sphere [bruce 070409] pickedrad *= debug_pref("Pe pickedrad ratio", Choice([1.8, 1.9, 1.7, 1.0])) #### if self.picked: # (do this even if disp == diINVISIBLE or diLINES [bruce comment 050825]) #bruce 041217 experiment: show valence errors for picked atoms by # using a different color for the wireframe. # (Since Transmute operates on picked atoms, and leaves them picked, # this will serve to show whatever valence errors it causes. And # showing it only for picked atoms makes it not mess up any images, # even though there's not yet any way to turn this feature off.) if self.bad(): color = ErrorPickedColor else: color = PickedColor drawwiresphere(color, pos, pickedrad) ##e worry about glname hit test if atom is invisible? [bruce 050825 comment] #bruce 050806: check valence more generally, and not only for picked atoms. if disp != diINVISIBLE: #bruce 050825 added this condition to fix bug 870 # The above only checks for number of bonds. # Now that we have higher-order bonds, we also need to check valence more generally. # The check for glpane class is a kluge to prevent this from showing in thumbviews: should remove ASAP. #####@@@@@ need to do this in atom.getinfo(). #e We might need to be able to turn this off by a preference setting; or, only do it in Build mode. from GLPane import GLPane if isinstance(glpane, GLPane) and self.bad_valence() and env.prefs[ showValenceErrors_prefs_key ]: # Note: the env.prefs check should come last, or changing the pref would gl_update when it didn't need to. # [bruce 060315 comment] drawwiresphere(pink, pos, pickedrad * 1.08) # experimental, but works well enough for A6. #e we might want to not draw this when self.bad() but draw that differently, # and optim this when atomtype is initial one (or its numbonds == valence). return
f173d4f674c49f0d7aca31b944ec94c5b3d48291 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/f173d4f674c49f0d7aca31b944ec94c5b3d48291/chem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 91, 2814, 844, 11737, 12, 2890, 16, 5118, 29009, 16, 16232, 16, 949, 16, 25534, 6012, 4672, 468, 2848, 3965, 13026, 4630, 3600, 1416, 333, 596, 434, 365, 18, 9446, 1427, 467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 91, 2814, 844, 11737, 12, 2890, 16, 5118, 29009, 16, 16232, 16, 949, 16, 25534, 6012, 4672, 468, 2848, 3965, 13026, 4630, 3600, 1416, 333, 596, 434, 365, 18, 9446, 1427, 467, ...
try: return conf.LANGUAGE.split('_')[1].lower() except IndexError: return "en_US" else: return lang
lang = conf.LANGUAGE try: return lang.split('_')[1].lower() except IndexError: return "us"
def get_keyboard_layout(self): lang = str(gui.app.keyboardInputLocale().name()) if lang == 'C': try: return conf.LANGUAGE.split('_')[1].lower() except IndexError: return "en_US" else: return lang
35cb6e690677b7b34719d64c659d426f169c92f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/35cb6e690677b7b34719d64c659d426f169c92f7/osbackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 31486, 67, 6741, 12, 2890, 4672, 3303, 273, 609, 12, 20292, 18, 2910, 18, 31486, 1210, 3916, 7675, 529, 10756, 309, 3303, 422, 296, 39, 4278, 775, 30, 327, 2195, 18, 15547, 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, 67, 31486, 67, 6741, 12, 2890, 4672, 3303, 273, 609, 12, 20292, 18, 2910, 18, 31486, 1210, 3916, 7675, 529, 10756, 309, 3303, 422, 296, 39, 4278, 775, 30, 327, 2195, 18, 15547, 18...
ProcessVariablesAndConditionsInDict(build_file_data, False, variables.copy(),
ProcessVariablesAndConditionsInDict(build_file_data, False, variables,
def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes, depth, check): global absolute_build_file_paths # If depth is set, predefine the DEPTH variable to be a relative path from # this build file's directory to the directory identified by depth. if depth: d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path)) if d == '': variables['DEPTH'] = '.' else: variables['DEPTH'] = d # If the generator needs absolue paths, then do so. if absolute_build_file_paths: build_file_path = os.path.abspath(build_file_path) if build_file_path in data['target_build_files']: # Already loaded. return data['target_build_files'].add(build_file_path) gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Target Build File '%s'" % build_file_path) build_file_data = LoadOneBuildFile(build_file_path, data, aux_data, variables, includes, True, check) # Store DEPTH for later use in generators. build_file_data['_DEPTH'] = depth # Set up the included_files key indicating which .gyp files contributed to # this target dict. if 'included_files' in build_file_data: raise KeyError, build_file_path + ' must not contain included_files key' included = GetIncludedBuildFiles(build_file_path, aux_data) build_file_data['included_files'] = [] for included_file in included: # included_file is relative to the current directory, but it needs to # be made relative to build_file_path's directory. included_relative = \ gyp.common.RelativePath(included_file, os.path.dirname(build_file_path)) build_file_data['included_files'].append(included_relative) ProcessToolsetsInDict(build_file_data) # Apply "pre"/"early" variable expansions and condition evaluations. ProcessVariablesAndConditionsInDict(build_file_data, False, variables.copy(), build_file_path) # Look at each project's target_defaults dict, and merge settings into # targets. if 'target_defaults' in build_file_data: index = 0 if 'targets' in build_file_data: while index < len(build_file_data['targets']): # This procedure needs to give the impression that target_defaults is # used as defaults, and the individual targets inherit from that. # The individual targets need to be merged into the defaults. Make # a deep copy of the defaults for each target, merge the target dict # as found in the input file into that copy, and then hook up the # copy with the target-specific data merged into it as the replacement # target dict. old_target_dict = build_file_data['targets'][index] new_target_dict = copy.deepcopy(build_file_data['target_defaults']) MergeDicts(new_target_dict, old_target_dict, build_file_path, build_file_path) build_file_data['targets'][index] = new_target_dict index = index + 1 else: raise Exception, \ "Unable to find targets in build file %s" % build_file_path # No longer needed. del build_file_data['target_defaults'] # Look for dependencies. This means that dependency resolution occurs # after "pre" conditionals and variable expansion, but before "post" - # in other words, you can't put a "dependencies" section inside a "post" # conditional within a target. if 'targets' in build_file_data: for target_dict in build_file_data['targets']: if 'dependencies' not in target_dict: continue for dependency in target_dict['dependencies']: other_build_file = \ gyp.common.ResolveTarget(build_file_path, dependency, None)[0] try: LoadTargetBuildFile(other_build_file, data, aux_data, variables, includes, depth, check) except Exception, e: gyp.common.ExceptionAppend( e, 'while loading dependencies of %s' % build_file_path) raise return data
258e1528741d7f7d6d3f5c2f2e8d2f3c5a83d40a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/258e1528741d7f7d6d3f5c2f2e8d2f3c5a83d40a/input.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 2326, 3116, 812, 12, 3510, 67, 768, 67, 803, 16, 501, 16, 9397, 67, 892, 16, 3152, 16, 6104, 16, 3598, 16, 866, 4672, 2552, 4967, 67, 3510, 67, 768, 67, 4481, 225, 468, 971, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 2326, 3116, 812, 12, 3510, 67, 768, 67, 803, 16, 501, 16, 9397, 67, 892, 16, 3152, 16, 6104, 16, 3598, 16, 866, 4672, 2552, 4967, 67, 3510, 67, 768, 67, 4481, 225, 468, 971, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 536) else quickfix.StringField.__init__(self, 536, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5718, 13, 469, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5718, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
if furthestBlock is None: element = self.tree.openElements.pop() while element != formattingElement:
def endTagFormatting(self, token): """The much-feared adoption agency algorithm""" name = token["name"] while True: formattingElement = self.tree.elementInActiveFormattingElements( token["name"]) if (not formattingElement or (formattingElement in self.tree.openElements and not self.tree.elementInScope(formattingElement.name))): self.parser.parseError("adoption-agency-1.1", {"name": token["name"]}) return elif formattingElement not in self.tree.openElements: self.parser.parseError("adoption-agency-1.2", {"name": token["name"]}) self.tree.activeFormattingElements.remove(formattingElement) return if formattingElement != self.tree.openElements[-1]: self.parser.parseError("adoption-agency-1.3", {"name": token["name"]}) afeIndex = self.tree.openElements.index(formattingElement) furthestBlock = None for element in self.tree.openElements[afeIndex:]: if (element.nameTuple in specialElements | scopingElements): furthestBlock = element break if furthestBlock is None:
def endTagFormatting(self, token): """The much-feared adoption agency algorithm""" # http://www.whatwg.org/specs/web-apps/current-work/#adoptionAgency # XXX Better parseError messages appreciated. name = token["name"] while True: # Step 1 paragraph 1 formattingElement = self.tree.elementInActiveFormattingElements( token["name"]) if (not formattingElement or (formattingElement in self.tree.openElements and not self.tree.elementInScope(formattingElement.name))): self.parser.parseError("adoption-agency-1.1", {"name": token["name"]}) return
7b800000ab5eed9d02fde3c4b884769a0bfbf17a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4487/7b800000ab5eed9d02fde3c4b884769a0bfbf17a/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 23974, 12, 2890, 16, 1147, 4672, 3536, 1986, 9816, 17, 3030, 2258, 1261, 3482, 1737, 2075, 4886, 8395, 468, 1062, 2207, 5591, 18, 23770, 18197, 18, 3341, 19, 15115, 19, 4875, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 23974, 12, 2890, 16, 1147, 4672, 3536, 1986, 9816, 17, 3030, 2258, 1261, 3482, 1737, 2075, 4886, 8395, 468, 1062, 2207, 5591, 18, 23770, 18197, 18, 3341, 19, 15115, 19, 4875, 17, ...
> <string>(1)<module>()
> <string>(1)<module>()...
def test_pdb_run_with_code_object(): """Testing run and runeval with code object as a first argument. >>> with PdbTestInput(['step','x', 'continue']): ... pdb_invoke('run', compile('x=1', '<string>', 'exec')) > <string>(1)<module>() (Pdb) step --Return-- > <string>(1)<module>()->None (Pdb) x 1 (Pdb) continue >>> with PdbTestInput(['x', 'continue']): ... x=0 ... pdb_invoke('runeval', compile('x+1', '<string>', 'eval')) > <string>(1)<module>()->None (Pdb) x 1 (Pdb) continue """
4b5b541701b1212739b07742bb32024daf0c33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/4b5b541701b1212739b07742bb32024daf0c33e0/test_pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17414, 67, 2681, 67, 1918, 67, 710, 67, 1612, 13332, 3536, 22218, 1086, 471, 1086, 8622, 598, 981, 733, 487, 279, 1122, 1237, 18, 225, 4080, 598, 453, 1966, 4709, 1210, 12, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17414, 67, 2681, 67, 1918, 67, 710, 67, 1612, 13332, 3536, 22218, 1086, 471, 1086, 8622, 598, 981, 733, 487, 279, 1122, 1237, 18, 225, 4080, 598, 453, 1966, 4709, 1210, 12, 3...
(test_11, "Check BEEP listener support")
(test_11, "Check BEEP listener support"), (test_12, "Check connection on close notification")
def run_all_tests (): test_count = 0 for test in tests: # print log info ("TEST-" + str(test_count) + ": Running " + test[1]) # call test if not test[0](): error ("detected test failure at: " + test[1]) return False info ("TEST-" + str(test_count) + ": OK") # next test test_count += 1 ok ("All tests ok!") return True
fdb7d1984793b92c293a30e5e678576e9b825037 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1306/fdb7d1984793b92c293a30e5e678576e9b825037/vortex-regression-client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 454, 67, 16341, 1832, 30, 1842, 67, 1883, 273, 374, 364, 1842, 316, 7434, 30, 225, 468, 1172, 613, 1123, 7566, 16961, 10951, 397, 609, 12, 3813, 67, 1883, 13, 397, 6398, 2048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 454, 67, 16341, 1832, 30, 1842, 67, 1883, 273, 374, 364, 1842, 316, 7434, 30, 225, 468, 1172, 613, 1123, 7566, 16961, 10951, 397, 609, 12, 3813, 67, 1883, 13, 397, 6398, 2048...
startTime = time.time () search.run () endTime = time.time () print 'start:', startTime print 'end:', endTime runTime = endTime - startTime print 'Time:', runTime
startTime = time.clock () search = Interpolate.GraphSearch (cgraph, start, end) endTime = time.clock () print 'Time:', (endTime - startTime)
def save(sequence, file): """Save a sequence to a file. For now, this function writes sequence out to a file manually, instead of using the save() function built in to AMC object. The AMC.save() function is only writing out 0's. """ f = open(file, "w") # Default format for all of our AMC files f.write(":FULLY-SPECIFIED\n") f.write(":DEGREES\n") # For each frame... for i in range(len(sequence)): # Write the frame number f.write("%d\n" % (i + 1)) # Write the data for each bone in the frame for bone, data in sequence[i].iteritems(): # Line starts with the bone name line = bone # Add all the position data for x in data: line += " %f" % (x) line += "\n" f.write(line) f.close()
6a7529448af834db74750bea96eda594a4c697ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/6a7529448af834db74750bea96eda594a4c697ff/interpolate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 6178, 16, 585, 4672, 3536, 4755, 279, 3102, 358, 279, 585, 18, 225, 2457, 2037, 16, 333, 445, 7262, 3102, 596, 358, 279, 585, 10036, 16, 3560, 434, 1450, 326, 1923, 1435, 445...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 6178, 16, 585, 4672, 3536, 4755, 279, 3102, 358, 279, 585, 18, 225, 2457, 2037, 16, 333, 445, 7262, 3102, 596, 358, 279, 585, 10036, 16, 3560, 434, 1450, 326, 1923, 1435, 445...
if not game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova:
if not game.state.galaxy[game.quadrant.i][game.quadrant.j].supernova:
def no_quad_change(): # No quadrant change -- compute new average enemy distances game.quad[game.sector.x][game.sector.y] = game.ship if game.enemies: for enemy in game.enemies: finald = (w-enemy.kloc).distance() enemy.kavgd = 0.5 * (finald + enemy.kdist) enemy.kdist = finald game.enemies.sort(lambda x, y: cmp(x.kdist, y.kdist)) if not game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova: attack(torps_ok=False) for enemy in game.enemies: enemy.kavgd = enemy.kdist newcnd() drawmaps(0) setwnd(message_window)
e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 21733, 67, 3427, 13332, 468, 2631, 9474, 6890, 2549, 1493, 3671, 394, 8164, 570, 351, 93, 12491, 7920, 18, 21733, 63, 13957, 18, 5709, 280, 18, 92, 6362, 13957, 18, 5709, 280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 21733, 67, 3427, 13332, 468, 2631, 9474, 6890, 2549, 1493, 3671, 394, 8164, 570, 351, 93, 12491, 7920, 18, 21733, 63, 13957, 18, 5709, 280, 18, 92, 6362, 13957, 18, 5709, 280, ...
NAME ====
def replace(self, name, newVersionStr = None, newFlavor = None, ref = None, groupName = None, allowNoMatch = False, searchPath = None): """ NAME ====
748cbae21f60ac1c42057955f2dae32754c7f701 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/748cbae21f60ac1c42057955f2dae32754c7f701/grouprecipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 12, 2890, 16, 508, 16, 28906, 1585, 273, 599, 16, 394, 2340, 9444, 273, 599, 16, 1278, 273, 599, 16, 11619, 273, 599, 16, 1699, 2279, 2060, 273, 1083, 16, 1623, 743, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 12, 2890, 16, 508, 16, 28906, 1585, 273, 599, 16, 394, 2340, 9444, 273, 599, 16, 1278, 273, 599, 16, 11619, 273, 599, 16, 1699, 2279, 2060, 273, 1083, 16, 1623, 743, 273, 599, ...
types = ['INTEGER','INT','BOOLEAN','REAL','STRING','BOOL']
types = ['INTEGER','INT','BOOLEAN','REAL','TEXT','BOOL']
def verify_type(type): types = ['INTEGER','INT','BOOLEAN','REAL','STRING','BOOL'] if type.upper() not in types: raise TypeError('%s is not a legal type.'%type) return True
8f345b07a5e0eb10e21bfe6237d467bc47d68a53 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8f345b07a5e0eb10e21bfe6237d467bc47d68a53/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 723, 12, 723, 4672, 1953, 273, 10228, 14217, 17023, 3217, 17023, 17900, 17023, 31052, 17023, 5151, 17023, 19040, 3546, 309, 618, 18, 5797, 1435, 486, 316, 1953, 30, 1002, 3580, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 723, 12, 723, 4672, 1953, 273, 10228, 14217, 17023, 3217, 17023, 17900, 17023, 31052, 17023, 5151, 17023, 19040, 3546, 309, 618, 18, 5797, 1435, 486, 316, 1953, 30, 1002, 3580, 2...
dChild = data['detailClass'] mod = dChild.split('.')[0]
mod = data['detailClass_mod'] dChild = mod + '.' + data['detailClass_class']
def SetSaveData(self,data): dChild = data['detailClass'] mod = dChild.split('.')[0] exec 'import %s' % mod detClass = eval(dChild) self.SetDimensions(data['x'],data['y'],data['w'],data['h']) old = self.detail self.detail = MultiClient(self,detClass) dData = data.get('detail',None) if dData: if hasattr(self.detail.child,'SetSaveData'): attr = getattr(self.detail.child,'SetSaveData') if callable(attr): attr(dData) old.Destroy() self.detail.OnSize(None)
2268569346a39bcff9b7ba734f85652a7bf4c2d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/2268569346a39bcff9b7ba734f85652a7bf4c2d9/multisash.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4755, 751, 12, 2890, 16, 892, 4672, 681, 273, 501, 3292, 8992, 797, 67, 1711, 3546, 302, 1763, 273, 681, 397, 2611, 397, 501, 3292, 8992, 797, 67, 1106, 3546, 1196, 296, 5666, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4755, 751, 12, 2890, 16, 892, 4672, 681, 273, 501, 3292, 8992, 797, 67, 1711, 3546, 302, 1763, 273, 681, 397, 2611, 397, 501, 3292, 8992, 797, 67, 1106, 3546, 1196, 296, 5666, 73...
if extension.lower() in ['csv', 'tsv', 'tab', 'ods', 'xls']:
if hasattr(self, 'Upload'): entry = self.Upload(media, title) elif extension.lower() in ['csv', 'tsv', 'tab', 'ods', 'xls']:
def upload_docs(self, paths, title=None): """Upload a document. Keyword arguments: paths: Paths of files to upload. title: Title to give the files once uploaded. (Default None for the names of the files).
4eceb294d328f31888b6fffd400b2e3259b3a575 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/4eceb294d328f31888b6fffd400b2e3259b3a575/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 8532, 12, 2890, 16, 2953, 16, 2077, 33, 7036, 4672, 3536, 4777, 279, 1668, 18, 225, 18317, 1775, 30, 2953, 30, 16643, 434, 1390, 358, 3617, 18, 2077, 30, 10984, 358, 8492, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 8532, 12, 2890, 16, 2953, 16, 2077, 33, 7036, 4672, 3536, 4777, 279, 1668, 18, 225, 18317, 1775, 30, 2953, 30, 16643, 434, 1390, 358, 3617, 18, 2077, 30, 10984, 358, 8492, 32...
mark_match = perform_regex_match_upon_line_with_pattern_list(docbody[x], marker_patterns)
mark_match = \ perform_regex_match_upon_line_with_pattern_list(docbody[x], \ marker_patterns)
def find_reference_section_no_title(docbody): """This function would generally be used when it was not possible to locate the start of a document's reference section by means of its title. Instead, this function will look for reference lines that have numeric markers of the format [1], [2], etc. @param docbody: (list) of strings -each string is a line in the document. @return: (dictionary) : { 'start_line' : (integer) - index in docbody of 1st reference line, 'title_string' : (None) - title of the reference section (None since no title), 'marker' : (string) - the marker of the first reference line, 'marker_pattern' : (string) - the regexp string used to find the marker, 'title_marker_same_line' : (integer) 0 - to signal title not on same line as marker. } Much of this information is used by later functions to rebuild a reference section. -- OR -- (None) - when the reference section could not be found. """ ref_start_line = ref_line_marker = None if len(docbody) > 0: marker_patterns = get_first_reference_line_numeration_marker_patterns() ## try to find first reference line in the reference section: x = len(docbody) - 1 found_ref_sect = 0 while x >= 0 and not found_ref_sect: mark_match = perform_regex_match_upon_line_with_pattern_list(docbody[x], marker_patterns) if mark_match is not None and int(mark_match.group('num')) == 1: ## Get marker recognition pattern: mk_ptn = mark_match.re.pattern ## Look for [2] in next 10 lines: next_test_lines = 10 y = x + 1 temp_found = 0 while y < len(docbody) and y < x + next_test_lines and not temp_found: mark_match2 = perform_regex_match_upon_line_with_pattern_list(docbody[y], marker_patterns) if (mark_match2 is not None) and (int(mark_match2.group('num')) == 2) and \ (mark_match.group('left') == mark_match2.group('left')) and (mark_match.group('right') == mark_match2.group('right')): ## Found next reference line: temp_found = 1 elif y == len(docbody) - 1: temp_found = 1 y = y + 1 if temp_found: found_ref_sect = 1 ref_start_line = x ref_line_marker = mark_match.group('mark') ref_line_marker_ptn = mk_ptn x = x - 1 if ref_start_line is not None: ref_sectn_details = { 'start_line' : ref_start_line, 'title_string' : None, 'marker' : ref_line_marker, 'marker_pattern' : ref_line_marker_ptn, 'title_marker_same_line' : 0 } else: ## didn't manage to find the reference section ref_sectn_details = None return ref_sectn_details
afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6180, 67, 3464, 67, 2135, 67, 2649, 12, 2434, 3432, 4672, 3536, 2503, 445, 4102, 19190, 506, 1399, 1347, 518, 1703, 486, 3323, 358, 10627, 326, 787, 434, 279, 1668, 1807, 2114,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6180, 67, 3464, 67, 2135, 67, 2649, 12, 2434, 3432, 4672, 3536, 2503, 445, 4102, 19190, 506, 1399, 1347, 518, 1703, 486, 3323, 358, 10627, 326, 787, 434, 279, 1668, 1807, 2114,...
subval = match.group(0)
return link
def expand_link(link): try: subval = self.expanditem(link.path, defaults, ignore, block) except errors.KeyMissingError, ex: if ignore is True or ex.key in ignore: subval = match.group(0) else: raise
d432ff23b264f94398ab194c1fdcb5f388bab3b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/970/d432ff23b264f94398ab194c1fdcb5f388bab3b2/struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 1232, 12, 1232, 4672, 775, 30, 720, 1125, 273, 365, 18, 12320, 1726, 12, 1232, 18, 803, 16, 3467, 16, 2305, 16, 1203, 13, 1335, 1334, 18, 653, 4841, 668, 16, 431, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 1232, 12, 1232, 4672, 775, 30, 720, 1125, 273, 365, 18, 12320, 1726, 12, 1232, 18, 803, 16, 3467, 16, 2305, 16, 1203, 13, 1335, 1334, 18, 653, 4841, 668, 16, 431, 30, 309, ...
def check_split(self, wrapper, text, expect): result = wrapper._split(text)
def check_split(self, text, expect): result = self.wrapper._split(text)
def check_split(self, wrapper, text, expect): result = wrapper._split(text) self.assertEquals(result, expect, "\nexpected %r\n" "but got %r" % (expect, result))
5d834a356769a34ff8fbaf97e2719b6c6396b601 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5d834a356769a34ff8fbaf97e2719b6c6396b601/test_textwrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4939, 12, 2890, 16, 977, 16, 4489, 4672, 563, 273, 365, 18, 8376, 6315, 4939, 12, 955, 13, 365, 18, 11231, 8867, 12, 2088, 16, 4489, 16, 1548, 82, 3825, 738, 86, 64, 82, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4939, 12, 2890, 16, 977, 16, 4489, 4672, 563, 273, 365, 18, 8376, 6315, 4939, 12, 955, 13, 365, 18, 11231, 8867, 12, 2088, 16, 4489, 16, 1548, 82, 3825, 738, 86, 64, 82, 6...
""" if alg=="scipy":
""" if prec != 53: raise ValueError, "for the scipy algorithm the precision must be 53" if algorithm=="scipy":
def bessel_Y(nu,z,alg="maxima"): r""" Implements the "Y-Bessel function", or "Bessel function of the 2nd kind", with index (or "order") nu and argument z. Defn:
0090c116d1d0d5f9f5ec1cc4c8800a058defd9bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0090c116d1d0d5f9f5ec1cc4c8800a058defd9bb/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 61, 12, 13053, 16, 94, 16, 18413, 1546, 1896, 13888, 6, 4672, 436, 8395, 29704, 326, 315, 61, 17, 38, 403, 292, 445, 3113, 578, 315, 38, 403, 292, 445, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 61, 12, 13053, 16, 94, 16, 18413, 1546, 1896, 13888, 6, 4672, 436, 8395, 29704, 326, 315, 61, 17, 38, 403, 292, 445, 3113, 578, 315, 38, 403, 292, 445, 434, 326, ...
raise LDRdataFindClientException, msg
raise LSCsegFindClientException, msg
def distinctAttrValues(self, attr): """ Query LSCsegFindServer metadata tables for the distince values of an attribute and return the values as a list.
ef3237c3817774b5fe1e9b3617e257669680e382 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/ef3237c3817774b5fe1e9b3617e257669680e382/LSCsegFindClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10217, 3843, 1972, 12, 2890, 16, 1604, 4672, 3536, 2770, 511, 2312, 5680, 3125, 2081, 1982, 4606, 364, 326, 2411, 2410, 924, 434, 392, 1566, 471, 327, 326, 924, 487, 279, 666, 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, 10217, 3843, 1972, 12, 2890, 16, 1604, 4672, 3536, 2770, 511, 2312, 5680, 3125, 2081, 1982, 4606, 364, 326, 2411, 2410, 924, 434, 392, 1566, 471, 327, 326, 924, 487, 279, 666, 18, 2, -...
libBALLc.sipCallCtor(76,self,args)
libBALLc.sipCallCtor(85,self,args)
def __init__(self,*args): libBALLc.sipCallCtor(76,self,args)
6143cd22f226534836314b76952f50c72ab34763 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5247/6143cd22f226534836314b76952f50c72ab34763/BALL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 2561, 38, 4685, 71, 18, 28477, 1477, 27425, 12, 6669, 16, 2890, 16, 1968, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 2561, 38, 4685, 71, 18, 28477, 1477, 27425, 12, 6669, 16, 2890, 16, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if False and authors_to_update:
if authors_to_update:
def run_update(): global authors_to_update global works_to_update global last_update last_update = time() print 'running update: %s works %s authors' % (len(works_to_update), len(authors_to_update)) if works_to_update: requests = [] num = 0 total = len(works_to_update) for wkey in works_to_update: num += 1 print 'update work: %s %d/%d' % (wkey, num, total) if '/' in wkey[7:]: print 'bad wkey:', wkey continue for attempt in range(5): try: requests += update_work(withKey(wkey)) break except AuthorRedirect: print 'fixing author redirect' w = ol.get(wkey) need_update = False for a in w['authors']: r = ol.get(a['author']) if r['type'] == '/type/redirect': a['author'] = {'key': r['location']} need_update = True assert need_update print w ol.save(w['key'], w, 'avoid author redirect') solr_update(requests + ['<commit/>'], debug=True) print >> open(state_file, 'w'), offset if False and authors_to_update: requests = [] for akey in authors_to_update: print 'update author:', akey requests += update_author(akey) solr_update(requests + ['<commit/>'], index='authors', debug=True) authors_to_update = set() works_to_update = set() print >> open(state_file, 'w'), offset
b86dd33ddb4d5140b62151da9e66bc5bcc91119c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/b86dd33ddb4d5140b62151da9e66bc5bcc91119c/solr_update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2725, 13332, 2552, 14494, 67, 869, 67, 2725, 2552, 6330, 67, 869, 67, 2725, 2552, 1142, 67, 2725, 1142, 67, 2725, 273, 813, 1435, 1172, 296, 8704, 1089, 30, 738, 87, 6330, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 2725, 13332, 2552, 14494, 67, 869, 67, 2725, 2552, 6330, 67, 869, 67, 2725, 2552, 1142, 67, 2725, 1142, 67, 2725, 273, 813, 1435, 1172, 296, 8704, 1089, 30, 738, 87, 6330, 73...
def reduce(self, f): """ Reduce an element modulo a standard basis for this ideal. This returns 0 if and only if the element is in this ideal. EXAMPLES: sage: R.<x,y> = PolynomialRing(QQ, 2) sage: I = (x^3 + y, y)*R sage: I.reduce(y) 0 sage: I.reduce(x^3) 0 sage: I.reduce(x - y) x sage: I = (y^2 - (x^3 + x))*R sage: I.reduce(x^3) y^2 - x sage: I.reduce(x^6) y^4 - 2*x*y^2 + x^2 sage: (y^2 - x)^2 y^4 - 2*x*y^2 + x^2 NOTE: Requires computation of a Groebner basis, which is a very expensive operation. """ if self.base_ring() == sage.rings.integer_ring.ZZ: return self._reduce_using_macaulay2(f) try: singular = self._singular_groebner_basis().parent() except (AttributeError, RuntimeError): singular = self._singular_groebner_basis().parent() f = self.ring()(f) g = singular(f) try: self.ring()._singular_(singular).set_ring() h = g.reduce(self._singular_groebner_basis()) except TypeError: return f try: return self.ring()(h) except (TypeError, RuntimeError): return self.ring()(h[1])
def reduce(self, f): """ Reduce an element modulo a standard basis for this ideal. This returns 0 if and only if the element is in this ideal. EXAMPLES: sage: R.<x,y> = PolynomialRing(QQ, 2) sage: I = (x^3 + y, y)*R sage: I.reduce(y) 0 sage: I.reduce(x^3) 0 sage: I.reduce(x - y) x
98c4a5bb70fe354aad05cce6bc478baa67f7a80d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/98c4a5bb70fe354aad05cce6bc478baa67f7a80d/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 12, 2890, 16, 284, 4672, 3536, 24614, 392, 930, 26109, 279, 4529, 10853, 364, 333, 23349, 18, 1220, 1135, 374, 309, 471, 1338, 309, 326, 930, 353, 316, 333, 23349, 18, 225, 5675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 12, 2890, 16, 284, 4672, 3536, 24614, 392, 930, 26109, 279, 4529, 10853, 364, 333, 23349, 18, 1220, 1135, 374, 309, 471, 1338, 309, 326, 930, 353, 316, 333, 23349, 18, 225, 5675, ...
""" return self._list
TESTS: sage: p = Partition([2,1]) sage: pl = p.to_list() sage: pl[0] = 0; p [2, 1] """ return self._list[:]
def to_list(self): """ Return self as a list.
d2bea0c9898d10512ce54569c87e5b09be4cdba6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d2bea0c9898d10512ce54569c87e5b09be4cdba6/partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1098, 12, 2890, 4672, 3536, 2000, 365, 487, 279, 666, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1098, 12, 2890, 4672, 3536, 2000, 365, 487, 279, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
lines = ["Twas brilling, and the slithy toves",
lines = ["Twas brillig, and the slithy toves",
def dump_queue(queue_name): print "Messages on queue: " + queue_name message = 0 while True: try: message = queue.get(timeout=10) content = message.body session.message_accept(RangedSet(message.id)) print "Response: " + content except Empty: print "No more messages!" break except: print "Unexpected exception!" break
53ef9d18f37776a36b9185d191cd218da0d3b13e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/53ef9d18f37776a36b9185d191cd218da0d3b13e/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 4000, 12, 4000, 67, 529, 4672, 225, 1172, 315, 5058, 603, 2389, 30, 315, 397, 2389, 67, 529, 225, 883, 273, 374, 225, 1323, 1053, 30, 775, 30, 883, 273, 2389, 18, 588, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 4000, 12, 4000, 67, 529, 4672, 225, 1172, 315, 5058, 603, 2389, 30, 315, 397, 2389, 67, 529, 225, 883, 273, 374, 225, 1323, 1053, 30, 775, 30, 883, 273, 2389, 18, 588, 12, ...
def save(self, filename, data):
def save(self, filename, data, mode='wb'):
def save(self, filename, data): self.getResource().manage_edit(self.name, self.getParams(data), self.getBody(data))
6beb670f6d8e2dee113a1c6c5b6d646211f5dc67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6beb670f6d8e2dee113a1c6c5b6d646211f5dc67/ZopeExplorer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 16, 501, 16, 1965, 2218, 9464, 11, 4672, 365, 18, 588, 1420, 7675, 12633, 67, 4619, 12, 2890, 18, 529, 16, 365, 18, 588, 1370, 12, 892, 3631, 365, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 16, 501, 16, 1965, 2218, 9464, 11, 4672, 365, 18, 588, 1420, 7675, 12633, 67, 4619, 12, 2890, 18, 529, 16, 365, 18, 588, 1370, 12, 892, 3631, 365, 18, 588, ...
if name.upper() != original_name:
if orignal_name.upper() != original_name:
def case_insensitive_tests(class_): """Class decorator that nullifies tests that require a case-insensitive file system.""" if sys.platform not in ('win32', 'darwin', 'cygwin'): original_name = os.listdir('.')[0] if name.upper() != original_name: changed_name = original_name.upper() else: changed_name = original_name.lower() if os.path.exists(changed_name): return class_ return unittest.TestCase else: return class_
6c3c48c714b0f9b1fd060732ede0cfd83226a06e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/6c3c48c714b0f9b1fd060732ede0cfd83226a06e/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 648, 67, 31940, 67, 16341, 12, 1106, 67, 4672, 3536, 797, 7367, 716, 446, 5032, 7434, 716, 2583, 279, 648, 17, 31940, 585, 2619, 12123, 309, 2589, 18, 9898, 486, 316, 7707, 8082, 1578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 648, 67, 31940, 67, 16341, 12, 1106, 67, 4672, 3536, 797, 7367, 716, 446, 5032, 7434, 716, 2583, 279, 648, 17, 31940, 585, 2619, 12123, 309, 2589, 18, 9898, 486, 316, 7707, 8082, 1578, ...
program[1:1] = ["-X", '"debug-mode=on"'] print " ".join(program) os.execv(program[0], program)
program[1:1] = ["-X", 'debug-mode=on'] print " ".join(program) program=['"%s"' % x for x in program] command=" ".join(program) if WIN32: command = '"%s"' % command os.system(command) else: os.execv(program[0], program)
def do_foreground(self, arg, debug=True): if not WIN32: self.get_status() pid = self.zd_pid if pid: print "To run the program in the foreground, please stop it first." return # Quote the program name, so it works even if it contains spaces program = self.options.program if debug: program[1:1] = ["-X", '"debug-mode=on"'] print " ".join(program) os.execv(program[0], program)
73bca07b6a7ec5b3350b4598295334abb6c10004 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12227/73bca07b6a7ec5b3350b4598295334abb6c10004/ctl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1405, 2915, 12, 2890, 16, 1501, 16, 1198, 33, 5510, 4672, 309, 486, 678, 706, 1578, 30, 365, 18, 588, 67, 2327, 1435, 4231, 273, 365, 18, 94, 72, 67, 6610, 309, 4231, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1405, 2915, 12, 2890, 16, 1501, 16, 1198, 33, 5510, 4672, 309, 486, 678, 706, 1578, 30, 365, 18, 588, 67, 2327, 1435, 4231, 273, 365, 18, 94, 72, 67, 6610, 309, 4231, 30, ...
def _create_context_menu(self): """ Creates a context menu for the underlying text widget. """ menu = QtGui.QMenu(self) clipboard = QtGui.QApplication.clipboard() copy_action = QtGui.QAction('Copy', self) copy_action.triggered.connect(self.copy) self.copy_available.connect(copy_action.setEnabled) menu.addAction(copy_action) paste_action = QtGui.QAction('Paste', self) paste_action.triggered.connect(self.paste) clipboard.dataChanged.connect( lambda: paste_action.setEnabled(not clipboard.text().isEmpty())) menu.addAction(paste_action) menu.addSeparator() select_all_action = QtGui.QAction('Select All', self) select_all_action.triggered.connect(self.select_all) menu.addAction(select_all_action) return menu
def _create_context_menu(self): """ Creates a context menu for the underlying text widget. """ menu = QtGui.QMenu(self) clipboard = QtGui.QApplication.clipboard()
9b3b0bb4f8d4fbc9e2f47305210f0a0c86a5e540 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4217/9b3b0bb4f8d4fbc9e2f47305210f0a0c86a5e540/console_widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2472, 67, 5414, 12, 2890, 4672, 3536, 10210, 279, 819, 3824, 364, 326, 6808, 977, 3604, 18, 3536, 3824, 273, 23425, 18, 53, 4599, 12, 2890, 13, 20304, 273, 23425, 18, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2472, 67, 5414, 12, 2890, 4672, 3536, 10210, 279, 819, 3824, 364, 326, 6808, 977, 3604, 18, 3536, 3824, 273, 23425, 18, 53, 4599, 12, 2890, 13, 20304, 273, 23425, 18, 53...
key = self.fieldsList[i]
print 'key in self.valueFieldsList', key in self.valueFieldsList print 'type( self.valuesList[i] )', type( self.valuesList[i] ) print 'type( self.valuesList[i] ) not in self.__validDataValues'
def checkValues( self ): """ Check that all values are defined and valid """ errorList = [] for i in range( len( self.valuesList ) ): print 'checkValues',self.fieldsList[i], self.valuesList[i] print 'checkValues', self.valueFieldsList print 'checkValues', self.__validDataValues key = self.fieldsList[i] if self.valuesList[i] == None: errorList.append( "no value for %s" % key ) if key in self.valueFieldsList and type( self.valuesList[i] ) not in self.__validDataValues: errorList.append( "value for key %s is not numerical type" % key ) if errorList: return S_ERROR( "Invalid values: %s" % ", ".join( errorList ) ) if not self.startTime: return S_ERROR( "Start time has not been defined" ) if type( self.startTime ) != Time._dateTimeType: return S_ERROR( "Start time is not a datetime object" ) if not self.endTime: return S_ERROR( "End time has not been defined" ) if type( self.endTime ) != Time._dateTimeType: return S_ERROR( "End time is not a datetime object" ) return S_OK()
7dab103896ee585dc279c72335dd7af058e604fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/7dab103896ee585dc279c72335dd7af058e604fb/BaseAccountingType.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1972, 12, 365, 262, 30, 3536, 2073, 716, 777, 924, 854, 2553, 471, 923, 3536, 29902, 273, 5378, 364, 277, 316, 1048, 12, 562, 12, 365, 18, 2372, 682, 262, 262, 30, 1172, 296, 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, 866, 1972, 12, 365, 262, 30, 3536, 2073, 716, 777, 924, 854, 2553, 471, 923, 3536, 29902, 273, 5378, 364, 277, 316, 1048, 12, 562, 12, 365, 18, 2372, 682, 262, 262, 30, 1172, 296, 18...
opth = ( l / ( optw / wl ) ) + 1 return menu, wl, l, h, w, optw, opth menu, wl, l, h, w, optw, opth = calc_lsize( 0.6 ) down = ( y < h / 2 )
opth = ( (l * wl) / (optw-3) ) + 1 return wl, l, optw, opth wl, l, optw, opth = calc_lsize( 0.6 )
def calc_lsize(r): """Calculate the size required on screen to display the list. Unfortunately Python 2.x doesn't allow assigning to the scope one level up of a nested function, so the return list on this function is horrible. I could have used an object and mutated it from here but it doesn't seem like such a big deal. Hopefully I can make this prettier when py3k shows up. :)"""
782a61f807eac87f9c94d710f152c0957f4e9f9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/782a61f807eac87f9c94d710f152c0957f4e9f9c/bpython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 80, 1467, 12, 86, 4672, 3536, 8695, 326, 963, 1931, 603, 5518, 358, 2562, 326, 666, 18, 1351, 24233, 6600, 576, 18, 92, 3302, 1404, 1699, 28639, 358, 326, 2146, 1245, 1801, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 80, 1467, 12, 86, 4672, 3536, 8695, 326, 963, 1931, 603, 5518, 358, 2562, 326, 666, 18, 1351, 24233, 6600, 576, 18, 92, 3302, 1404, 1699, 28639, 358, 326, 2146, 1245, 1801, 7...
result(build_instance_name(inst))
rval = build_instance_name(inst) result(rval)
def MI_enumInstanceNames(self, env, ns, result, cimClass): """Return instance names of a given CIM class
5155fde5244844ed9d69c5212e5dd176e14c39c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10648/5155fde5244844ed9d69c5212e5dd176e14c39c6/cim_provider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20806, 67, 7924, 1442, 1557, 12, 2890, 16, 1550, 16, 3153, 16, 563, 16, 276, 381, 797, 4672, 3536, 990, 791, 1257, 434, 279, 864, 17459, 667, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20806, 67, 7924, 1442, 1557, 12, 2890, 16, 1550, 16, 3153, 16, 563, 16, 276, 381, 797, 4672, 3536, 990, 791, 1257, 434, 279, 864, 17459, 667, 2, -100, -100, -100, -100, -100, -100, -10...
pyexe_dirname, pyexe_basename = os.path.split(self.python_exe)
pyexe_dirname, pyexe_basename = op.split(self.python_exe)
def write_bin_sh_dispatcher(self, source_file, target_file): f = open(target_file, "w") if (source_file is not None): print >> f, '#! /bin/sh' print >> f, '# LIBTBX_DISPATCHER DO NOT EDIT' else: print >> f, '# LIBTBX_DISPATCHER_HEAD DO NOT EDIT' print >> f, '#' print >> f, '# This file is intended to be sourced from other scripts.' print >> f, '# It is like the dispatcher scripts in the bin directory,' print >> f, '# but only sets up the environment without calling a' print >> f, '# command at the end.' print >> f, '#' write_do_not_edit_please_re_run_libtbx_configure_py(f=f) print >> f, '# To customize this auto-generated script create' print >> f, '#' print >> f, '# dispatcher_include*.sh' print >> f, '#' print >> f, '# files in %s and run' % show_string(self.build_path) print >> f, '#' print >> f, '# libtbx.refresh' print >> f, '#' print >> f, '# to re-generate the dispatchers (libtbx.refresh is a subset' print >> f, '# of the functionality of the libtbx/configure.py command).' print >> f, '#' print >> f, '# See also:' print >> f, '# %s' \ % show_string(self.under_build("dispatcher_include_template.sh")) print >> f, '#' print >> f, 'unset PYTHONHOME' print >> f, 'LC_ALL=C' print >> f, 'export LC_ALL' print >> f, 'LIBTBX_BUILD="%s"' % self.build_path print >> f, 'export LIBTBX_BUILD' source_is_py = False if (source_file is not None): dispatcher_name = os.path.basename(target_file) if (dispatcher_name.find('"') >= 0): raise RuntimeError( "Dispatcher target file name contains double-quote: %s\n" % dispatcher_name + " source file: %s" % source_file) print >> f, 'LIBTBX_DISPATCHER_NAME="%s"' % os.path.basename(target_file) print >> f, 'export LIBTBX_DISPATCHER_NAME' if (source_file.lower().endswith(".py")): source_is_py = True pyexe_dirname, pyexe_basename = os.path.split(self.python_exe) print >> f, 'LIBTBX_PYEXE_BASENAME=%s' % show_string(pyexe_basename) print >> f, 'export LIBTBX_PYEXE_BASENAME' for line in self.dispatcher_include(where="at_start"): print >> f, line essentials = [("PYTHONPATH", self.pythonpath)] essentials.append((ld_library_path_var_name(), [self.lib_path])) essentials.append(("PATH", [self.bin_path])) for n,v in essentials: if (len(v) == 0): continue v = ":".join(v) if (sys.platform == "irix6" and n == "LD_LIBRARY_PATH"): n32 = "LD_LIBRARYN32_PATH" print >> f, 'if [ -n "$%s" ]; then' % n32 print >> f, ' %s="%s:$%s"' % (n32, v, n32) print >> f, ' export %s' % n32 print >> f, 'elif [ -n "$%s" ]; then' % n else: print >> f, 'if [ -n "$%s" ]; then' % n print >> f, ' %s="%s:$%s"' % (n, v, n) print >> f, ' export %s' % n print >> f, 'else' print >> f, ' %s="%s"' % (n, v) print >> f, ' export %s' % n print >> f, 'fi' precall_commands = self.dispatcher_precall_commands() if (precall_commands is not None): for line in precall_commands: print >> f, line if (source_is_py): scan_for_dispatcher_includes = True elif (source_file is None or not os.path.isfile(source_file)): scan_for_dispatcher_includes = False else: scan_for_dispatcher_includes = not detect_binary_file.from_initial_block( file_name=source_file) if (scan_for_dispatcher_includes): for line in source_specific_dispatcher_include( pattern="LIBTBX_PRE_DISPATCHER_INCLUDE_SH", source_file=source_file): print >> f, line for line in self.dispatcher_include(where="before_command"): print >> f, line if (scan_for_dispatcher_includes): for line in source_specific_dispatcher_include( pattern="LIBTBX_POST_DISPATCHER_INCLUDE_SH", source_file=source_file): print >> f, line if (source_file is not None): start_python = False cmd = "" if (source_is_py): cmd += ' %s"%s%s$LIBTBX_PYEXE_BASENAME"' % ( ['', '/usr/bin/arch -i386 '][self.build_options.force_32bit], escape_sh_double_quoted(pyexe_dirname), os.sep) if (len(source_specific_dispatcher_include( pattern="LIBTBX_START_PYTHON", source_file=source_file)) > 3): start_python = True if (not start_python): cmd += (" %s'"+source_file+"'") % [ '', '/usr/bin/arch -i386 '][self.build_options.force_32bit and not source_is_py] print >> f, 'if [ -n "$LIBTBX__VALGRIND_FLAG__" ]; then' print >> f, " exec $LIBTBX_VALGRIND"+cmd, '"$@"' print >> f, "elif [ $# -eq 0 ]; then" print >> f, " exec"+cmd print >> f, "else" print >> f, " exec"+cmd, '"$@"' print >> f, "fi" f.close() os.chmod(target_file, 0755)
621ff93ea6f104ac4c6d943d7e9d6c18b1468502 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/621ff93ea6f104ac4c6d943d7e9d6c18b1468502/env_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4757, 67, 674, 67, 18495, 12, 2890, 16, 1084, 67, 768, 16, 1018, 67, 768, 4672, 284, 273, 1696, 12, 3299, 67, 768, 16, 315, 91, 7923, 309, 261, 3168, 67, 768, 353, 486, 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, 1045, 67, 4757, 67, 674, 67, 18495, 12, 2890, 16, 1084, 67, 768, 16, 1018, 67, 768, 4672, 284, 273, 1696, 12, 3299, 67, 768, 16, 315, 91, 7923, 309, 261, 3168, 67, 768, 353, 486, 5...
elif os.path.exists(os.path.join(os.path.split(__file__)[0], 'pixmaps', filename)): full_filename = os.path.join(os.path.split(__file__)[0], 'pixmaps', filename) elif os.path.exists(os.path.join(os.path.split(__file__)[0], 'share', filename)): full_filename = os.path.join(os.path.split(__file__)[0], 'share', filename) elif os.path.exists(os.path.join(__file__.split('/lib')[0], 'share', 'pixmaps', filename)): full_filename = os.path.join(__file__.split('/lib')[0], 'share', 'pixmaps', filename)
elif os.path.exists(os.path.join(os.path.split(__file__)[0], "pixmaps", filename)): full_filename = os.path.join(os.path.split(__file__)[0], "pixmaps", filename) elif os.path.exists(os.path.join(os.path.split(__file__)[0], "share", filename)): full_filename = os.path.join(os.path.split(__file__)[0], "share", filename) elif os.path.exists(os.path.join(__file__.split("/lib")[0], "share", "pixmaps", filename)): full_filename = os.path.join(__file__.split("/lib")[0], "share", "pixmaps", filename)
def find_path(filename): if os.path.exists(os.path.join(sys.prefix, 'share', 'pixmaps', filename)): full_filename = os.path.join(sys.prefix, 'share', 'pixmaps', filename) elif os.path.exists(os.path.join(os.path.split(__file__)[0], filename)): full_filename = os.path.join(os.path.split(__file__)[0], filename) elif os.path.exists(os.path.join(os.path.split(__file__)[0], 'pixmaps', filename)): full_filename = os.path.join(os.path.split(__file__)[0], 'pixmaps', filename) elif os.path.exists(os.path.join(os.path.split(__file__)[0], 'share', filename)): full_filename = os.path.join(os.path.split(__file__)[0], 'share', filename) elif os.path.exists(os.path.join(__file__.split('/lib')[0], 'share', 'pixmaps', filename)): full_filename = os.path.join(__file__.split('/lib')[0], 'share', 'pixmaps', filename) return full_filename
a8a4c6ca09f6afe3062c9a37ce6363c545145985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/a8a4c6ca09f6afe3062c9a37ce6363c545145985/arkadas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 803, 12, 3459, 4672, 309, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 9499, 18, 3239, 16, 296, 14419, 2187, 296, 14861, 10711, 2187, 1544, 3719, 30, 1983, 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, 1104, 67, 803, 12, 3459, 4672, 309, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 9499, 18, 3239, 16, 296, 14419, 2187, 296, 14861, 10711, 2187, 1544, 3719, 30, 1983, 67, ...
if 'html' in environ.get('HTTP_ACCEPT',''):
if 'html' in environ.get('HTTP_ACCEPT','') or \ '*/*' in environ.get('HTTP_ACCEPT',''):
def wsgi_application(self, environ, start_response, exc_info=None): """ This exception as a WSGI application """ if self.headers: headers = list(self.headers) else: headers = [] if 'html' in environ.get('HTTP_ACCEPT',''): replace_header(headers, 'content-type', 'text/html') content = self.html(environ) else: replace_header(headers, 'content-type', 'text/plain') content = self.plain(environ) if isinstance(content, unicode): content = content.encode('utf8') cur_content_type = ( response.header_value(headers, 'content-type') or 'text/html') reponse.replace_header( headers, 'content-type', cur_content_type + '; charset=utf8') start_response('%s %s' % (self.code, self.title), headers, exc_info) return [content]
064a4b61f09111be9d1c13624cf8bd08a39a9967 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/064a4b61f09111be9d1c13624cf8bd08a39a9967/httpexceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 17537, 67, 3685, 12, 2890, 16, 5473, 16, 787, 67, 2740, 16, 3533, 67, 1376, 33, 7036, 4672, 3536, 1220, 1520, 487, 279, 7649, 13797, 2521, 3536, 309, 365, 18, 2485, 30, 1607, 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, 341, 17537, 67, 3685, 12, 2890, 16, 5473, 16, 787, 67, 2740, 16, 3533, 67, 1376, 33, 7036, 4672, 3536, 1220, 1520, 487, 279, 7649, 13797, 2521, 3536, 309, 365, 18, 2485, 30, 1607, 273,...
groups = map(lambda x: x.strip(), match.groups())
groups = map(lambda x: x and x.strip() or x, match.groups())
def match(self, sself, str): for pat, func in self.regexen: match = pat.match(str) if match: # clean up leading and trailing whitespace groups = map(lambda x: x.strip(), match.groups()) return (func, groups) # TODO proper logging?? #print "No method called %s" % (str)
15871ab900b958d43c88ee00f97948530d67e395 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/15871ab900b958d43c88ee00f97948530d67e395/keyworder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 12, 2890, 16, 272, 2890, 16, 609, 4672, 364, 9670, 16, 1326, 316, 365, 18, 7584, 275, 30, 845, 273, 9670, 18, 1916, 12, 701, 13, 309, 845, 30, 468, 2721, 731, 7676, 471, 7341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 12, 2890, 16, 272, 2890, 16, 609, 4672, 364, 9670, 16, 1326, 316, 365, 18, 7584, 275, 30, 845, 273, 9670, 18, 1916, 12, 701, 13, 309, 845, 30, 468, 2721, 731, 7676, 471, 7341, ...
rbuilderUrl = urlparse.urlunsplit( (scheme, netloc, path, query, fragment))
def __init__(self, rbuilderUrl, user, pw): scheme, netloc, path, query, fragment = urlparse.urlsplit(rbuilderUrl) path = 'xmlrpc-private' netloc = netloc.split('@', 1)[-1] netloc = '%s:%s@' % (user, pw) + netloc rbuilderUrl = urlparse.urlunsplit( (scheme, netloc, path, query, fragment))
9e439cf11b693b8679104b8c826d784f045b5405 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8749/9e439cf11b693b8679104b8c826d784f045b5405/rbuilderclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7138, 953, 1489, 16, 729, 16, 8772, 4672, 4355, 16, 17345, 16, 589, 16, 843, 16, 5481, 273, 15185, 18, 718, 4939, 12, 6731, 953, 1489, 13, 589, 273, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7138, 953, 1489, 16, 729, 16, 8772, 4672, 4355, 16, 17345, 16, 589, 16, 843, 16, 5481, 273, 15185, 18, 718, 4939, 12, 6731, 953, 1489, 13, 589, 273, 29...
class _sliceView(object):
class _sliceWidget(object):
def tcl(cmd): global _tpycl try: os.environ['Slicer3_HOME'] except KeyError: home = os.path.dirname(os.path.dirname(sys.executable)) os.environ['Slicer3_HOME'] = home try: _tpycl except NameError: # no tcl yet, so first bring in the adapters, then the actual code import tpycl _tpycl = tpycl.tpycl() _tpycl.tcl_eval(""" set dir $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl source $dir/Slicer3Adapters.tcl ::Slicer3Adapters::Initialize """) # TODO: not clear why package require is not working # - instead, source the pkgIndex directly _tpycl.tcl_eval(""" set dir $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl source $dir/pkgIndex.tcl """) return _tpycl.tcl_eval(cmd)
353564c5b3f1ead12c953a52311d916f5c00ec51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12580/353564c5b3f1ead12c953a52311d916f5c00ec51/slicerqt-with-tcl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 830, 12, 4172, 4672, 2552, 389, 88, 2074, 830, 775, 30, 1140, 18, 28684, 3292, 3738, 21349, 23, 67, 14209, 3546, 1335, 4999, 30, 6382, 273, 1140, 18, 803, 18, 12287, 12, 538, 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, 268, 830, 12, 4172, 4672, 2552, 389, 88, 2074, 830, 775, 30, 1140, 18, 28684, 3292, 3738, 21349, 23, 67, 14209, 3546, 1335, 4999, 30, 6382, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 664) else quickfix.StringField.__init__(self, 664, 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, 1666, 1105, 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, 1666, 1105, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
t_model, t_path = select.get_selected_rows()
t_model, t_path = select.get_selected_rows()
def refresh_tags(self): select = self.tag_tview.get_selection() t_path = None if select: t_model, t_path = select.get_selected_rows() #pylint: disable-msg=W0612 self.tag_ts.clear() alltag = self.req.get_alltag_tag() notag = self.req.get_notag_tag() if self.workview: count_all_task = len(self.req.get_active_tasks_list(workable=True)) count_no_tags = len(self.req.get_active_tasks_list(notag_only=True,\ workable=True)) else: count_all_task = len(self.req.get_tasks_list(started_only=False)) count_no_tags = len(self.req.get_tasks_list(notag_only=True,\ started_only=False))
451ea29e3924785bc6c6b8648aa6459b292a0db4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/451ea29e3924785bc6c6b8648aa6459b292a0db4/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 4156, 12, 2890, 4672, 2027, 273, 365, 18, 2692, 67, 88, 1945, 18, 588, 67, 10705, 1435, 268, 67, 803, 273, 599, 309, 2027, 30, 268, 67, 2284, 16, 268, 67, 803, 273, 2027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 4156, 12, 2890, 4672, 2027, 273, 365, 18, 2692, 67, 88, 1945, 18, 588, 67, 10705, 1435, 268, 67, 803, 273, 599, 309, 2027, 30, 268, 67, 2284, 16, 268, 67, 803, 273, 2027, ...
self.url = url
self._url = url
def __init__(self,url): self.url = url
72bc74904fc331408c9d1b07e324a4834c15af66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9007/72bc74904fc331408c9d1b07e324a4834c15af66/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 718, 4672, 365, 6315, 718, 273, 880, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 718, 4672, 365, 6315, 718, 273, 880, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.search_text.set_text(playlistBean.name)
self.search_panel.search_text.set_text(playlistBean.name)
def onPlaySong(self, w, e): if is_double_click(e): playlistBean = self.similar_songs_model.getSelectedBean() print "play", playlistBean print "type", playlistBean.type if playlistBean.type == CommonBean.TYPE_MUSIC_URL: #thread.start_new_thread(self.playBean, (playlistBean,)) self.playBean(playlistBean) elif playlistBean.type == CommonBean.TYPE_GOOGLE_HELP: self.search_text.set_text(playlistBean.name)
07e357fd48d02d88534d094fa8ef63f110609909 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/07e357fd48d02d88534d094fa8ef63f110609909/online_controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 11765, 55, 932, 12, 2890, 16, 341, 16, 425, 4672, 309, 353, 67, 9056, 67, 7475, 12, 73, 4672, 16428, 3381, 273, 365, 18, 22985, 67, 816, 564, 67, 2284, 18, 588, 7416, 3381, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 11765, 55, 932, 12, 2890, 16, 341, 16, 425, 4672, 309, 353, 67, 9056, 67, 7475, 12, 73, 4672, 16428, 3381, 273, 365, 18, 22985, 67, 816, 564, 67, 2284, 18, 588, 7416, 3381, 1435...
macros['configure'] = '../configure'
macros['configure'] = '../%s' % self.configureName
def do(self, macros):
b7706e161d2a8bc696c6da5de81934e9487d8380 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/b7706e161d2a8bc696c6da5de81934e9487d8380/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 16, 24302, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 16, 24302, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return S_OK({})
return S_OK( {} )
def getDirectoryMetaParameters(self,dpath,credDict,inherited=True,owndata=True): """ Get meta parameters for the given directory """ if inherited: result = self.dtree.getPathIDs(dpath) if not result['OK']: return result pathIDs = result['Value'] dirID = pathIDs[-1] else: result = self.dtree.findDir(dpath) if not result['OK']: return result dirID = result['Value'] if not dirID: return S_ERROR('%s: directory not found' % dpath) pathIDs = [dirID] if len(pathIDs) > 1: pathString = ','.join( [ str(x) for x in pathIDs ] ) req = "SELECT DirID,MetaKey,MetaValue from FC_DirMeta where DirID in (%s)" % pathString else: req = "SELECT DirID,MetaKey,MetaValue from FC_DirMeta where DirID=%d " % dirID result = self._query(req) if not result['OK']: return result if not result['Value']: return S_OK({}) metaDict = {} for dID,key,value in result['Value']: if metaDict.has_key(key): if type(metaDict[key]) == ListType: metaDict[key].append(value) else: metaDict[key] = [metaDict[key]].append(value) else: metaDict[key] = value return S_OK(metaDict)
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19831, 2781, 2402, 12, 2890, 16, 72, 803, 16, 20610, 5014, 16, 6018, 329, 33, 5510, 16, 995, 892, 33, 5510, 4672, 3536, 968, 2191, 1472, 364, 326, 864, 1867, 3536, 309, 12078, 30, 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, 19831, 2781, 2402, 12, 2890, 16, 72, 803, 16, 20610, 5014, 16, 6018, 329, 33, 5510, 16, 995, 892, 33, 5510, 4672, 3536, 968, 2191, 1472, 364, 326, 864, 1867, 3536, 309, 12078, 30, 563,...
cls.assertEqual(d1/d3, Decimal('0.333333333'))
test2 = d1/d3
def thfunc1(cls): d1 = Decimal(1) d3 = Decimal(3) cls.assertEqual(d1/d3, Decimal('0.333333333')) cls.synchro.wait() cls.assertEqual(d1/d3, Decimal('0.333333333')) cls.finish1.set() return
5d53e6cbfbef6c0df398b79f430dae386d14dbe1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/5d53e6cbfbef6c0df398b79f430dae386d14dbe1/test_decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 286, 644, 21, 12, 6429, 4672, 302, 21, 273, 11322, 12, 21, 13, 302, 23, 273, 11322, 12, 23, 13, 1842, 22, 273, 302, 21, 19, 72, 23, 2028, 18, 87, 2515, 303, 18, 7048, 1435, 1842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 286, 644, 21, 12, 6429, 4672, 302, 21, 273, 11322, 12, 21, 13, 302, 23, 273, 11322, 12, 23, 13, 1842, 22, 273, 302, 21, 19, 72, 23, 2028, 18, 87, 2515, 303, 18, 7048, 1435, 1842, ...
ownerConds.append( "( `tq_TaskQueues`.OwnerDN = %s AND `tq_TaskQueues`.OwnerGroup = %s )" % ( dn, group ) )
ownerConds.append( "( `tq_TaskQueues`.OwnerDN = %s AND `tq_TaskQueues`.OwnerGroup = %s )" % ( dn, group ) )
def __generateTQMatchSQL( self, tqMatchDict, numQueuesToGet = 1 ): """ Generate the SQL needed to match a task queue """ #Only enabled TQs sqlCondList = [ "Enabled" ] sqlTables = [ "`tq_TaskQueues`" ] #If OwnerDN and OwnerGroup are defined only use those combinations that make sense if 'OwnerDN' in tqMatchDict and 'OwnerGroup' in tqMatchDict: groups = tqMatchDict[ 'OwnerGroup' ] if type( groups ) not in ( types.ListType, types.TupleType ): groups = [ groups ] dns = tqMatchDict[ 'OwnerDN' ] if type( dns ) not in ( types.ListType, types.TupleType ): dns = [ dns ] ownerConds = [] for group in groups: if Properties.JOB_SHARING in CS.getPropertiesForGroup( group ): ownerConds.append( "`tq_TaskQueues`.OwnerGroup = %s" % group ) else: for dn in dns: ownerConds.append( "( `tq_TaskQueues`.OwnerDN = %s AND `tq_TaskQueues`.OwnerGroup = %s )" % ( dn, group ) ) sqlCondList.append( " OR ".join( ownerConds ) ) else: #If not both are defined, just add the ones that are defined for field in ( 'OwnerGroup', 'OwnerDN' ): if field in tqMatchDict: sqlCondList.append( self.__generateSQLSubCond( "`tq_TaskQueues`.%s = %%s" % field, tqMatchDict[ field ] ) ) #Type of single value conditions for field in ( 'CPUTime', 'Setup' ): if field in tqMatchDict: if field in ( 'CPUTime' ): sqlCondList.append( self.__generateSQLSubCond( "`tq_TaskQueues`.%s <= %%s" % field, tqMatchDict[ field ] ) ) else: sqlCondList.append( self.__generateSQLSubCond( "`tq_TaskQueues`.%s = %%s" % field, tqMatchDict[ field ] ) ) #Match multi value fields for field in self.__multiValueMatchFields: #It has to be %ss , with an 's' at the end because the columns names # are plural and match options are singular if field in tqMatchDict and tqMatchDict[ field ]: tableName = '`tq_TQTo%ss`' % field # sqlTables.append( tableName ) sqlMultiCondList = [] if field != 'GridCE' or 'Site' in tqMatchDict: # Jobs for masked sites can be matched if they specified a GridCE # Site is removed from tqMatchDict if the Site is mask. In this case we want # that the GridCE matches explicetly so the COUNT can not be 0 (that means # not specified for the corresponding jobs. sqlMultiCondList.append( "( SELECT COUNT(%s.Value) FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId ) = 0 " % (tableName,tableName,tableName ) ) csql = self.__generateSQLSubCond( "%%s in ( SELECT %s.Value FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId )" % ( tableName, tableName, tableName ), tqMatchDict[ field ] ) sqlMultiCondList.append( csql ) sqlCondList.append( "( %s )" % " OR ".join( sqlMultiCondList ) ) #In case of Site, check it's not in job banned sites if field in self.__bannedJobMatchFields: bannedTable = '`tq_TQToBanned%ss`' % field csql = self.__generateSQLSubCond( "%%s not in ( SELECT %s.Value FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId )" % ( bannedTable, bannedTable, bannedTable ), tqMatchDict[ field ], boolOp = 'AND' ) sqlCondList.append( csql ) #Resource banning bannedField = "Banned%s" % field if bannedField in tqMatchDict and tqMatchDict[ bannedField ]: tableName = '`tq_TQTo%ss`' % field csql = self.__generateSQLSubCond( "%%s not in ( SELECT %s.Value FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId )" % ( tableName, tableName, tableName ), tqMatchDict[ bannedField ], boolOp = 'AND' ) sqlCondList.append( csql )
a733eda307fd1b6e03d6d8f0aee8c9c601eac082 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/a733eda307fd1b6e03d6d8f0aee8c9c601eac082/TaskQueueDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 7163, 56, 53, 2060, 3997, 12, 365, 16, 20061, 2060, 5014, 16, 818, 17428, 774, 967, 273, 404, 262, 30, 3536, 6654, 326, 3063, 3577, 358, 845, 279, 1562, 2389, 3536, 468, 3386, 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, 7163, 56, 53, 2060, 3997, 12, 365, 16, 20061, 2060, 5014, 16, 818, 17428, 774, 967, 273, 404, 262, 30, 3536, 6654, 326, 3063, 3577, 358, 845, 279, 1562, 2389, 3536, 468, 3386, 36...
def __div__(self, other): return "B.__div__" def __rdiv__(self, other): return "B.__rdiv__" vereq(B(1) / 1, "B.__div__") vereq(1 / B(1), "B.__rdiv__")
def __floordiv__(self, other): return "B.__floordiv__" def __rfloordiv__(self, other): return "B.__rfloordiv__" vereq(B(1) // 1, "B.__floordiv__") vereq(1 // B(1), "B.__rfloordiv__")
def __div__(self, other): return "B.__div__"
800495df1a64262d62c15989c1b6716cff41932e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/800495df1a64262d62c15989c1b6716cff41932e/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2892, 972, 12, 2890, 16, 1308, 4672, 327, 315, 38, 16186, 2892, 14437, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2892, 972, 12, 2890, 16, 1308, 4672, 327, 315, 38, 16186, 2892, 14437, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._write_var_summary(public, private, doc.variables(), uid, doc.by_group(doc.variables()),
self._write_var_summary(public, private, doc, doc.variables(),
def _write_module(self, public, private, uid, doc): """ Write an HTML page describing the given module to the given streams. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. @param uid: The UID of the module to document. @param doc: The L{ModuleDoc} of the module to document. """ # Write the header & navigation bar. str = self._header(uid.name()) public.write(str); private.write(str) self._write_navbar(public, private, uid) self._write_breadcrumbs(public, private, uid)
6ecda71cd0e7e4752ddec3a0c1619699a3092855 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/6ecda71cd0e7e4752ddec3a0c1619699a3092855/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2978, 12, 2890, 16, 1071, 16, 3238, 16, 4555, 16, 997, 4672, 3536, 2598, 392, 3982, 1363, 16868, 326, 864, 1605, 358, 326, 864, 8205, 18, 632, 891, 1071, 30, 1021, 876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 67, 2978, 12, 2890, 16, 1071, 16, 3238, 16, 4555, 16, 997, 4672, 3536, 2598, 392, 3982, 1363, 16868, 326, 864, 1605, 358, 326, 864, 8205, 18, 632, 891, 1071, 30, 1021, 876, ...