rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
SELECT 'loadbalancer/' || lb || '/virtualserver/' || vs || '/realserver/' || rs || '/'
SELECT '/loadbalancer/' || lb || '/virtualserver/' || vs || '/realserver/' || rs || '/'
def query(self): return """
890e568faea2f3e24da02fbc763cced05144a7cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13049/890e568faea2f3e24da02fbc763cced05144a7cd/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 12, 2890, 4672, 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, 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, 843, 12, 2890, 4672, 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, -100, -10...
if not self._plugins: p = plugins.PluginManager(rbuildConfig.rmakePluginDirs, ['test']) p.loadPlugins() p.callLibraryHook('library_preInit') self._plugins = p
cfg = buildcfg.BuildConfiguration(False)
def _getRmakeConfig(self, useCache=True, includeContext=True): """ Returns an rmake configuration file that matches the product associated with the current handle. @param useCache: if True (default), uses a cached version of the rmake configuration file if available, and caches the results for future invocations. @type useCache: bool @param includeContext: include context-specific information, as required when building an rmake configuration for use in a specific rMake job (default: True). Setting this to False also disables caching. @type includeContext: bool @return: rMake configuration file suitable for use with the current product. """ if not includeContext: useCache = False
874589e4f801f3abfbd141ab33a7b2dc2cc81b6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8748/874589e4f801f3abfbd141ab33a7b2dc2cc81b6e/rmakefacade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 54, 6540, 809, 12, 2890, 16, 999, 1649, 33, 5510, 16, 2341, 1042, 33, 5510, 4672, 3536, 2860, 392, 436, 6540, 1664, 585, 716, 1885, 326, 3017, 3627, 598, 326, 783, 1640, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 54, 6540, 809, 12, 2890, 16, 999, 1649, 33, 5510, 16, 2341, 1042, 33, 5510, 4672, 3536, 2860, 392, 436, 6540, 1664, 585, 716, 1885, 326, 3017, 3627, 598, 326, 783, 1640, 18, ...
raise EOFError
raise self.abort('socket error: EOF')
def _get_line(self):
30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1369, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1369, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
warnings.warn('Using the zLOG module is deprecated (to be removed in '
warnings.warn('The zLOG package is deprecated and will be removed in '
def LOG(subsystem, severity, summary, detail='', error=None, reraise=None): """Log some information The required arguments are: subsystem -- The subsystem generating the message (e.g. ZODB) severity -- The "severity" of the event. This may be an integer or a floating point number. Logging back ends may consider the int() of this value to be significant. For example, a backend may consider any severity whos integer value is WARNING to be a warning. summary -- A short summary of the event detail -- A detailed description error -- A three-element tuple consisting of an error type, value, and traceback. If provided, then a summary of the error is added to the detail. reraise -- If provided with a true value, then the error given by error is reraised. """ warnings.warn('Using the zLOG module is deprecated (to be removed in ' 'Zope 2.12. Use the Python logging module instead.', DeprecationWarning, stacklevel=2) log_write(subsystem, severity, summary, detail, error) if reraise and error: raise error[0], error[1], error[2]
a1222c12c02bd2aa723086aa14bfb6e098132b99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9656/a1222c12c02bd2aa723086aa14bfb6e098132b99/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2018, 12, 1717, 4299, 16, 11426, 16, 4916, 16, 7664, 2218, 2187, 555, 33, 7036, 16, 436, 6070, 784, 33, 7036, 4672, 3536, 1343, 2690, 1779, 225, 1021, 1931, 1775, 854, 30, 225, 15359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2018, 12, 1717, 4299, 16, 11426, 16, 4916, 16, 7664, 2218, 2187, 555, 33, 7036, 16, 436, 6070, 784, 33, 7036, 4672, 3536, 1343, 2690, 1779, 225, 1021, 1931, 1775, 854, 30, 225, 15359, ...
200i
200
def _from_xdata_ydata(self, xdata, ydata, coerce, options): if coerce: xdata, ydata = self._coerce(xdata, ydata) g = Graphics() g._Graphics__objects.append(GraphicPrimitive_Polygon(xdata, ydata, options)) try: g._extend_axes(min(xdata), max(xdata), min(ydata), max(ydata)) except ValueError: pass return g
05b222be23efe09be0cb234f323a68643173a1fe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/05b222be23efe09be0cb234f323a68643173a1fe/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2080, 67, 92, 892, 67, 93, 892, 12, 2890, 16, 25363, 16, 29175, 16, 12270, 16, 702, 4672, 309, 12270, 30, 25363, 16, 29175, 273, 365, 6315, 2894, 2765, 12, 92, 892, 16, 29175, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2080, 67, 92, 892, 67, 93, 892, 12, 2890, 16, 25363, 16, 29175, 16, 12270, 16, 702, 4672, 309, 12270, 30, 25363, 16, 29175, 273, 365, 6315, 2894, 2765, 12, 92, 892, 16, 29175, 1...
direction = "decrease"
def formatMessage(self, state, series, good, bad, html=False): if state == "machine": good = bad.last_other
16b34b6d3ae5d0e75061f6e6f70a5c084823c9f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14013/16b34b6d3ae5d0e75061f6e6f70a5c084823c9f4/analyze_talos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20925, 12, 2890, 16, 919, 16, 4166, 16, 7494, 16, 5570, 16, 1729, 33, 8381, 4672, 309, 919, 422, 315, 9149, 6877, 7494, 273, 5570, 18, 2722, 67, 3011, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20925, 12, 2890, 16, 919, 16, 4166, 16, 7494, 16, 5570, 16, 1729, 33, 8381, 4672, 309, 919, 422, 315, 9149, 6877, 7494, 273, 5570, 18, 2722, 67, 3011, 2, -100, -100, -100, -100, -100, ...
cxx(context) if 'fortran' or 'f77' in api: f77(context)
cxx(context, myplatform) if 'fortran' in api or 'f77' in api: f77(context, myplatform)
def check_all(context): cc(context) ar(context) libs(context) c99(context) x11(context) ppm(context) jpeg(context) api = read_api_options(context) if 'c++' in api: cxx(context) if 'fortran' or 'f77' in api: f77(context) if 'fortran-90' in api or 'fortran90' in api or 'f90' in api: f90(context) if 'python' in api: numpy(context)
48f74b0cc7ad87ff031aeb2e4a6d08e2d4a9ecf3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3143/48f74b0cc7ad87ff031aeb2e4a6d08e2d4a9ecf3/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 454, 12, 2472, 4672, 4946, 12, 2472, 13, 419, 12, 2472, 13, 15042, 12, 2472, 13, 276, 2733, 12, 2472, 13, 619, 2499, 12, 2472, 13, 293, 7755, 12, 2472, 13, 29726, 12, 2472, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 454, 12, 2472, 4672, 4946, 12, 2472, 13, 419, 12, 2472, 13, 15042, 12, 2472, 13, 276, 2733, 12, 2472, 13, 619, 2499, 12, 2472, 13, 293, 7755, 12, 2472, 13, 29726, 12, 2472, ...
'WHERE j.type = \'general\' ' \
'WHERE (j.type = \'general\') and (j.id=l.journal_id) ' \
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'account_analytic_analysis_summary_month') cr.execute('CREATE VIEW account_analytic_analysis_summary_month AS (' \ 'SELECT ' \ '(TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') + (d.account_id * 1000000))::integer AS id, ' \ 'd.account_id AS account_id, ' \ 'TO_CHAR(d.month, \'Mon YYYY\') AS month, ' \ 'TO_NUMBER(TO_CHAR(d.month, \'YYYYMM\'), \'999999\') AS month_id, ' \ 'COALESCE(SUM(l.unit_amount), 0.0) AS unit_amount ' \ 'FROM ' \ '(SELECT ' \ 'd2.account_id, ' \ 'd2.month ' \ 'FROM ' \ '(SELECT ' \ 'a.id AS account_id, ' \ 'l.month AS month ' \ 'FROM ' \ '(SELECT ' \ 'DATE_TRUNC(\'month\', l.date) AS month ' \ 'FROM account_analytic_line AS l, ' \ 'account_analytic_journal AS j ' \ 'WHERE j.type = \'general\' ' \ 'GROUP BY DATE_TRUNC(\'month\', l.date) ' \ ') AS l, ' \ 'account_analytic_account AS a ' \ 'GROUP BY l.month, a.id ' \ ') AS d2 ' \ 'GROUP BY d2.account_id, d2.month ' \ ') AS d ' \ 'LEFT JOIN ' \ '(SELECT ' \ 'l.account_id AS account_id, ' \ 'DATE_TRUNC(\'month\', l.date) AS month, ' \ 'SUM(l.unit_amount) AS unit_amount ' \ 'FROM account_analytic_line AS l, ' \ 'account_analytic_journal AS j ' \ 'WHERE j.type = \'general\' ' \ 'GROUP BY l.account_id, DATE_TRUNC(\'month\', l.date) ' \ ') AS l ' 'ON (' \ 'd.account_id = l.account_id ' \ 'AND d.month = l.month' \ ') ' \ 'GROUP BY d.month, d.account_id ' \ ')')
0ac89474cc14161907673faacb8e7bcd415c08bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/0ac89474cc14161907673faacb8e7bcd415c08bb/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 4669, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 4631, 67, 304, 7834, 335, 67, 12746, 67, 7687, 67, 7496, 6134, 4422, 18, 883...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 4669, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 4631, 67, 304, 7834, 335, 67, 12746, 67, 7687, 67, 7496, 6134, 4422, 18, 883...
expected = '<div>alert("Hello world")</div>'
expected = '<div></div>'
def test_javascript(self): data = '<div><script>alert("Hello world")</script></div>' stream = sanitize_str(data) data_return = stream_to_html(stream) expected = '<div>alert("Hello world")</div>' self.assertEqual(data_return, expected)
355475d08a625416297b41f869508929fe35dc2f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/355475d08a625416297b41f869508929fe35dc2f/test_xhtml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11242, 12, 2890, 4672, 501, 273, 2368, 2892, 4438, 4263, 34, 11798, 2932, 18601, 9117, 7923, 1757, 4263, 4695, 2892, 1870, 1407, 273, 8881, 67, 701, 12, 892, 13, 501, 67, 2463,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11242, 12, 2890, 4672, 501, 273, 2368, 2892, 4438, 4263, 34, 11798, 2932, 18601, 9117, 7923, 1757, 4263, 4695, 2892, 1870, 1407, 273, 8881, 67, 701, 12, 892, 13, 501, 67, 2463,...
util.redirect(RESPONSE, 'pcng_maintainance', 'Issues updated')
util.redirect(RESPONSE, REQUEST['HTTP_REFERER'], 'Issues updated')
def update_schema_for_issues(self, RESPONSE=None): """ update stored issue schema for all issues """
78c080fd8ba47ef5fe4f9ab84c033b5f23acf8a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/78c080fd8ba47ef5fe4f9ab84c033b5f23acf8a6/Collector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4821, 67, 1884, 67, 9618, 12, 2890, 16, 20645, 33, 7036, 4672, 3536, 1089, 4041, 5672, 1963, 364, 777, 8296, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4821, 67, 1884, 67, 9618, 12, 2890, 16, 20645, 33, 7036, 4672, 3536, 1089, 4041, 5672, 1963, 364, 777, 8296, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Compute the matrix of the Hecke operator T_n acting on self.
Compute the matrix of the Hecke operator `T_n` acting on self.
def _compute_hecke_matrix(self, n): r""" Compute the matrix of the Hecke operator T_n acting on self.
18bec4535984905a4cd46a619d51b7ef9b44e94c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/18bec4535984905a4cd46a619d51b7ef9b44e94c/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 1129, 73, 67, 5667, 12, 2890, 16, 290, 4672, 436, 8395, 8155, 326, 3148, 434, 326, 670, 762, 73, 3726, 399, 67, 82, 1328, 310, 603, 365, 18, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 1129, 73, 67, 5667, 12, 2890, 16, 290, 4672, 436, 8395, 8155, 326, 3148, 434, 326, 670, 762, 73, 3726, 399, 67, 82, 1328, 310, 603, 365, 18, 2, -100, -100, -100, -100,...
"import setuptools; __file__=%r; execfile(%r)" % (self.setup_py, self.setup_py),
"import setuptools; __file__=%r; execfile(%r)" % (self.setup_py, self.setup_py),
def install(self, install_options): if self.editable: self.install_editable() return ## FIXME: this is not a useful record: ## Also a bad location if sys.platform == 'win32': install_location = os.path.join(sys.prefix, 'Lib') else: install_location = os.path.join(sys.prefix, 'lib', 'python%s' % sys.version[:3]) temp_location = tempfile.mkdtemp('-record', 'pip-') record_filename = os.path.join(temp_location, 'install-record.txt') ## FIXME: I'm not sure if this is a reasonable location; probably not ## but we can't put it in the default location, as that is a virtualenv symlink that isn't writable header_dir = os.path.join(os.path.dirname(os.path.dirname(self.source_dir)), 'lib', 'include') logger.notify('Running setup.py install for %s' % self.name) logger.indent += 2 try: call_subprocess( [sys.executable, '-c', "import setuptools; __file__=%r; execfile(%r)" % (self.setup_py, self.setup_py), 'install', '--single-version-externally-managed', '--record', record_filename, '--install-headers', header_dir] + install_options, cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) finally: logger.indent -= 2 f = open(record_filename) for line in f: line = line.strip() if line.endswith('.egg-info'): egg_info_dir = line break else: logger.warn('Could not find .egg-info directory in install record for %s' % self) ## FIXME: put the record somewhere return f.close() new_lines = [] f = open(record_filename) for line in f: filename = line.strip() if os.path.isdir(filename): filename += os.path.sep new_lines.append(make_path_relative(filename, egg_info_dir)) f.close() f = open(os.path.join(egg_info_dir, 'installed-files.txt'), 'w') f.write('\n'.join(new_lines)+'\n') f.close()
cb7affe62ff47fc7a3504c6a6b07b9e96efedbf2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/cb7affe62ff47fc7a3504c6a6b07b9e96efedbf2/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 16, 3799, 67, 2116, 4672, 309, 365, 18, 19653, 30, 365, 18, 5425, 67, 19653, 1435, 327, 7541, 9852, 30, 333, 353, 486, 279, 5301, 1409, 30, 7541, 8080, 279, 5570, 2117,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 16, 3799, 67, 2116, 4672, 309, 365, 18, 19653, 30, 365, 18, 5425, 67, 19653, 1435, 327, 7541, 9852, 30, 333, 353, 486, 279, 5301, 1409, 30, 7541, 8080, 279, 5570, 2117,...
return template.generate(**data).render('text').strip()
return to_unicode(template.generate(**data).render('text')).strip()
def format_subj(self, summary): template = TextTemplate(self.config.get('notification', 'ticket_subject_template')) prefix = self.config.get('notification', 'smtp_subject_prefix') if prefix == '__default__': prefix = '[%s]' % self.config.get('project', 'name') data = { 'prefix': prefix, 'summary': summary, 'ticket': self.ticket, 'env': self.env, } return template.generate(**data).render('text').strip()
b597c7f48b1a442a3c5e461f5ab9cd8f66a35b1a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/b597c7f48b1a442a3c5e461f5ab9cd8f66a35b1a/notification.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1717, 78, 12, 2890, 16, 4916, 4672, 1542, 273, 3867, 2283, 12, 2890, 18, 1425, 18, 588, 2668, 9927, 2187, 296, 16282, 67, 7857, 67, 3202, 26112, 225, 1633, 273, 365, 18, 1425,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1717, 78, 12, 2890, 16, 4916, 4672, 1542, 273, 3867, 2283, 12, 2890, 18, 1425, 18, 588, 2668, 9927, 2187, 296, 16282, 67, 7857, 67, 3202, 26112, 225, 1633, 273, 365, 18, 1425,...
codestring = open(pathname, 'r').read()
codestring = open(pathname, 'rU').read()
def _compile(pathname, timestamp): """Compile (and cache) a Python source file. The file specified by <pathname> is compiled to a code object and returned. Presuming the appropriate privileges exist, the bytecodes will be saved back to the filesystem for future imports. The source file's modification timestamp must be provided as a Long value. """ codestring = open(pathname, 'r').read() if codestring and codestring[-1] != '\n': codestring = codestring + '\n' code = __builtin__.compile(codestring, pathname, 'exec') # try to cache the compiled code try: f = open(pathname + _suffix_char, 'wb') except IOError: pass else: f.write('\0\0\0\0') f.write(struct.pack('<I', timestamp)) marshal.dump(code, f) f.flush() f.seek(0, 0) f.write(imp.get_magic()) f.close() return code
d012a9946465b57d134f51a65996d1879faec2eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d012a9946465b57d134f51a65996d1879faec2eb/imputil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 12, 28336, 16, 2858, 4672, 3536, 9937, 261, 464, 1247, 13, 279, 6600, 1084, 585, 18, 225, 1021, 585, 1269, 635, 411, 28336, 34, 353, 7743, 358, 279, 981, 733, 471, 2106, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 12, 28336, 16, 2858, 4672, 3536, 9937, 261, 464, 1247, 13, 279, 6600, 1084, 585, 18, 225, 1021, 585, 1269, 635, 411, 28336, 34, 353, 7743, 358, 279, 981, 733, 471, 2106, 18...
time.sleep(0.5) buf = ctypes.create_string_buffer(len(msg)) rslt = PeekNamedPipe(msvcrt.get_osfhandle(proc.stdout.fileno()), buf, ctypes.sizeof(buf), None, None, None) self.assertNotEqual(rslt, 0, "PeekNamedPipe failed") self.assertEqual(msg, buf.value)
count, max = 0, 100 while count < max and proc.poll() is None: buf = ctypes.create_string_buffer(len(msg)) rslt = PeekNamedPipe(msvcrt.get_osfhandle(proc.stdout.fileno()), buf, ctypes.sizeof(buf), None, None, None) self.assertNotEqual(rslt, 0, "PeekNamedPipe failed") if buf.value: self.assertEqual(msg, buf.value) break time.sleep(0.1) count += 1 else: self.fail("Did not receive communication from the subprocess")
def _kill(self, sig): # Start sys.executable as a subprocess and communicate from the # subprocess to the parent that the interpreter is ready. When it # becomes ready, send *sig* via os.kill to the subprocess and check # that the return code is equal to *sig*. import ctypes from ctypes import wintypes import msvcrt
867acfc2c4f7c3635b2380544fa89840d2c84a38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/867acfc2c4f7c3635b2380544fa89840d2c84a38/test_os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16418, 12, 2890, 16, 3553, 4672, 468, 3603, 2589, 18, 17751, 487, 279, 6652, 471, 15541, 628, 326, 468, 6652, 358, 326, 982, 716, 326, 16048, 353, 5695, 18, 5203, 518, 468, 12724, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16418, 12, 2890, 16, 3553, 4672, 468, 3603, 2589, 18, 17751, 487, 279, 6652, 471, 15541, 628, 326, 468, 6652, 358, 326, 982, 716, 326, 16048, 353, 5695, 18, 5203, 518, 468, 12724, ...
r = int(colour[1:5], 16) g = int(colour[5:9], 16) b = int(colour[9:13], 16)
r = string.atoi(colour[1:5], 16) g = string.atoi(colour[5:9], 16) b = string.atoi(colour[9:13], 16)
def set_colour(self, colour): try: r = int(colour[1:5], 16) g = int(colour[5:9], 16) b = int(colour[9:13], 16) except: print "Invalid colour spec:", colour r, g, b = (0, 0, 0) self.set_colour_rgb(r, g, b)
1acfe4c17281b3e95ce310a722d8e31f561bd7fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4591/1acfe4c17281b3e95ce310a722d8e31f561bd7fe/OptionsBox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 27408, 12, 2890, 16, 15046, 4672, 775, 30, 436, 273, 533, 18, 270, 11359, 12, 27408, 63, 21, 30, 25, 6487, 2872, 13, 314, 273, 533, 18, 270, 11359, 12, 27408, 63, 25, 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, 444, 67, 27408, 12, 2890, 16, 15046, 4672, 775, 30, 436, 273, 533, 18, 270, 11359, 12, 27408, 63, 21, 30, 25, 6487, 2872, 13, 314, 273, 533, 18, 270, 11359, 12, 27408, 63, 25, 30, ...
"""
r"""
def invertible_residues(self, reduce=True): """ Returns a iterator through a list of invertible residues modulo this integral ideal.
ef0819690a4fd01b3d6fba60378c1b5b3e6c0cda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ef0819690a4fd01b3d6fba60378c1b5b3e6c0cda/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9848, 1523, 67, 15567, 3610, 12, 2890, 16, 5459, 33, 5510, 4672, 436, 8395, 2860, 279, 2775, 3059, 279, 666, 434, 9848, 1523, 25435, 26109, 333, 21423, 23349, 18, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9848, 1523, 67, 15567, 3610, 12, 2890, 16, 5459, 33, 5510, 4672, 436, 8395, 2860, 279, 2775, 3059, 279, 666, 434, 9848, 1523, 25435, 26109, 333, 21423, 23349, 18, 2, -100, -100, -100, -1...
avail = self.pkgSack.returnNewestByNameArch(patterns=patterns, ignore_case=ic)
try: avail = self.pkgSack.returnNewestByNameArch(patterns=patterns, ignore_case=ic) except Errors.PackageSackError: avail = []
def doPackageLists(self, pkgnarrow='all', patterns=None, showdups=None, ignore_case=False): """generates lists of packages, un-reduced, based on pkgnarrow option"""
c15e86d0361988a21bf5dd0136c4a14a84c0df65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/c15e86d0361988a21bf5dd0136c4a14a84c0df65/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2261, 7432, 12, 2890, 16, 2365, 1600, 7815, 2218, 454, 2187, 6884, 33, 7036, 16, 2405, 72, 18294, 33, 7036, 16, 2305, 67, 3593, 33, 8381, 4672, 3536, 3441, 815, 6035, 434, 5907, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2261, 7432, 12, 2890, 16, 2365, 1600, 7815, 2218, 454, 2187, 6884, 33, 7036, 16, 2405, 72, 18294, 33, 7036, 16, 2305, 67, 3593, 33, 8381, 4672, 3536, 3441, 815, 6035, 434, 5907, 1...
Qd.MoveTo(left + 4, top + ascent)
Qd.MoveTo(int(left + 4), int(top + ascent))
def listDefDraw(self, selected, cellRect, theCell, dataOffset, dataLen, theList): savedPort = Qd.GetPort() Qd.SetPort(theList.GetListPort()) savedClip = Qd.NewRgn() Qd.GetClip(savedClip) Qd.ClipRect(cellRect) savedPenState = Qd.GetPenState() Qd.PenNormal() Qd.EraseRect(cellRect) #draw the cell if it contains data ascent, descent, leading, size, hm = Fm.FontMetrics() linefeed = ascent + descent + leading if dataLen: left, top, right, bottom = cellRect data = theList.LGetCell(dataLen, theCell) lines = data.split("\r") line1 = lines[0] if len(lines) > 1: line2 = lines[1] else: line2 = "" Qd.MoveTo(left + 4, top + ascent) Qd.DrawText(line1, 0, len(line1)) if line2: Qd.MoveTo(left + 4, top + ascent + linefeed) Qd.DrawText(line2, 0, len(line2)) Qd.PenPat("\x11\x11\x11\x11\x11\x11\x11\x11") bottom = top + theList.cellSize[1] Qd.MoveTo(left, bottom - 1) Qd.LineTo(right, bottom - 1) if selected: self.listDefHighlight(selected, cellRect, theCell, dataOffset, dataLen, theList) #restore graphics environment Qd.SetPort(savedPort) Qd.SetClip(savedClip) Qd.DisposeRgn(savedClip) Qd.SetPenState(savedPenState)
919c110a0ca98f436b98dc8615e7fffdc62b74a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/919c110a0ca98f436b98dc8615e7fffdc62b74a4/Wlists.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 3262, 6493, 12, 2890, 16, 3170, 16, 2484, 6120, 16, 326, 4020, 16, 501, 2335, 16, 501, 2891, 16, 326, 682, 4672, 5198, 2617, 273, 2238, 72, 18, 967, 2617, 1435, 2238, 72, 18, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 3262, 6493, 12, 2890, 16, 3170, 16, 2484, 6120, 16, 326, 4020, 16, 501, 2335, 16, 501, 2891, 16, 326, 682, 4672, 5198, 2617, 273, 2238, 72, 18, 967, 2617, 1435, 2238, 72, 18, 69...
except hub.Backups.Error, e: print >> sys.stderr, NOT_SUBSCRIBED
print "Linked TKLBAM to your Hub account."
def main(): apikey = None args = sys.argv[1:] if args: if len(args) != 1 or args[0] in ("-h", "--help"): usage() apikey = args[0] if registry.sub_apikey: print >> sys.stderr, "error: already initialized" sys.exit(1) if not apikey: print "Copy paste the API-KEY from your Hub account's user profile" print apikey = raw_input("API-KEY: ") sub_apikey = hub.Backups.get_sub_apikey(apikey) registry.sub_apikey = sub_apikey registry.secret = generate_secret() registry.key = keypacket.fmt(registry.secret, "") try: credentials = hub.Backups(sub_apikey).get_credentials() registry.credentials = credentials print "Successfully linked TKLBAM to your Hub account." except hub.Backups.Error, e: print >> sys.stderr, NOT_SUBSCRIBED
54bc09b9c48c05a9025457756a17c58ba3acc588 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/54bc09b9c48c05a9025457756a17c58ba3acc588/cmd_init.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 24731, 273, 599, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 833, 30, 309, 562, 12, 1968, 13, 480, 404, 578, 833, 63, 20, 65, 316, 7566, 17, 76, 3113, 5238, 5201...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 24731, 273, 599, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 833, 30, 309, 562, 12, 1968, 13, 480, 404, 578, 833, 63, 20, 65, 316, 7566, 17, 76, 3113, 5238, 5201...
self.flag_command(self.session.set_wireless)
self.flag_command(self.session.set_wireless, line)
def do_wireless(self, line): self.flag_command(self.session.set_wireless) return 0
6348a397444293213ebed29101e9e92278a42177 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/6348a397444293213ebed29101e9e92278a42177/linksys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 14538, 2656, 12, 2890, 16, 980, 4672, 365, 18, 6420, 67, 3076, 12, 2890, 18, 3184, 18, 542, 67, 14538, 2656, 16, 980, 13, 327, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 14538, 2656, 12, 2890, 16, 980, 4672, 365, 18, 6420, 67, 3076, 12, 2890, 18, 3184, 18, 542, 67, 14538, 2656, 16, 980, 13, 327, 374, 2, -100, -100, -100, -100, -100, -100, -1...
security.declareProtected(permissions.ModifyPortalContent,
security.declareProtected(CMFCorePermissions.ModifyPortalContent,
def initializeLayers(self, instance, item=None, container=None): # scan each field looking for registered layers optionally # call its initializeInstance method and then the # initializeField method initializedLayers = [] called = lambda x: x in initializedLayers
67576cc5acaaf506c58ee3fea91da40c0a6516a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/67576cc5acaaf506c58ee3fea91da40c0a6516a2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 9282, 12, 2890, 16, 791, 16, 761, 33, 7036, 16, 1478, 33, 7036, 4672, 468, 4135, 1517, 652, 7849, 364, 4104, 6623, 8771, 468, 745, 2097, 4046, 1442, 707, 471, 1508, 326, 468, 404...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4046, 9282, 12, 2890, 16, 791, 16, 761, 33, 7036, 16, 1478, 33, 7036, 4672, 468, 4135, 1517, 652, 7849, 364, 4104, 6623, 8771, 468, 745, 2097, 4046, 1442, 707, 471, 1508, 326, 468, 404...
print socket.getservbyname('telnet', 'tcp') try: socket.getservbyname('telnet', 'udp') except socket.error: pass
if hasattr(socket, 'getservbyname'): print socket.getservbyname('telnet', 'tcp') try: socket.getservbyname('telnet', 'udp') except socket.error: pass
def missing_ok(str): try: getattr(socket, str) except AttributeError: pass
a519032526fb7a400f85b169e2a94016a202c4cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a519032526fb7a400f85b169e2a94016a202c4cc/test_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3315, 67, 601, 12, 701, 4672, 775, 30, 3869, 12, 7814, 16, 609, 13, 1335, 6394, 30, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 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, 3315, 67, 601, 12, 701, 4672, 775, 30, 3869, 12, 7814, 16, 609, 13, 1335, 6394, 30, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
"Handle an unparsed entity declaration event."
"Handle an unparsed entity declaration event."
def unparsedEntityDecl(self, name, publicId, systemId, ndata):
84da8aa7e2f1bdaf8692dbfd9981430c84278038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84da8aa7e2f1bdaf8692dbfd9981430c84278038/handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27810, 1943, 3456, 12, 2890, 16, 508, 16, 1071, 548, 16, 30083, 16, 290, 892, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27810, 1943, 3456, 12, 2890, 16, 508, 16, 1071, 548, 16, 30083, 16, 290, 892, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
_apache._global_unlock(srv, "pspcache")
_apache._global_unlock(srv, None, 0)
def dbm_cache_get(srv, dbmfile, filename, mtime): dbm_type = dbm_cache_type(dbmfile) _apache._global_lock(srv, "pspcache") try: dbm = dbm_type.open(dbmfile, 'c') try: entry = dbm[filename] t, val = entry.split(" ", 1) if long(t) == mtime: return str2code(val) except KeyError: return None finally: try: dbm.close() except: pass _apache._global_unlock(srv, "pspcache")
c2e7ef82b91104bb337b4fee85b47cb0574245b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/c2e7ef82b91104bb337b4fee85b47cb0574245b2/psp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 81, 67, 2493, 67, 588, 12, 20818, 16, 1319, 81, 768, 16, 1544, 16, 13158, 4672, 225, 1319, 81, 67, 723, 273, 1319, 81, 67, 2493, 67, 723, 12, 1966, 81, 768, 13, 389, 19211, 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, 1319, 81, 67, 2493, 67, 588, 12, 20818, 16, 1319, 81, 768, 16, 1544, 16, 13158, 4672, 225, 1319, 81, 67, 723, 273, 1319, 81, 67, 2493, 67, 723, 12, 1966, 81, 768, 13, 389, 19211, 6...
bugs.sort(cmp=lambda x,y: int(x) - int(y))
try: bugs.sort(cmp=lambda x,y: int(x) - int(y)) except ValueError: bugs.sort()
def get_bug_list(self): """ Returns a sorted list of bugs associated with this review request. """ bugs = re.split(r"[, ]+", self.bugs_closed) bugs.sort(cmp=lambda x,y: int(x) - int(y)) return bugs
d6a6c9e2f4a096b2f2307a563e9e17c530b73c3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/d6a6c9e2f4a096b2f2307a563e9e17c530b73c3b/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 925, 67, 1098, 12, 2890, 4672, 3536, 2860, 279, 3115, 666, 434, 22398, 3627, 598, 333, 10725, 590, 18, 3536, 22398, 273, 283, 18, 4939, 12, 86, 6, 63, 16, 308, 15, 3113, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 925, 67, 1098, 12, 2890, 4672, 3536, 2860, 279, 3115, 666, 434, 22398, 3627, 598, 333, 10725, 590, 18, 3536, 22398, 273, 283, 18, 4939, 12, 86, 6, 63, 16, 308, 15, 3113, 365...
if attr["fromdate"] <= date and date <= attr["todate"]:
attr_fromdate = len(attr['fromdate'])==4 and ('%s-01-01' % attr['fromdate']) or attr['fromdate'] attr_todate = len(attr['todate'])==4 and ('%s-12-31' % attr['todate']) or attr['todate'] if attr_fromdate <= date and date <= attr_todate:
def matchhistoric(self, hansard_id, date): ids = [] for attr in self.historichansard[hansard_id]: if attr["fromdate"] <= date and date <= attr["todate"]: ids.append(attr["id"])
5cabd40b37922737a37044f75217c4c09cfa6b54 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8428/5cabd40b37922737a37044f75217c4c09cfa6b54/resolvemembernames.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 11488, 19208, 12, 2890, 16, 366, 634, 1060, 67, 350, 16, 1509, 4672, 3258, 273, 5378, 364, 1604, 316, 365, 18, 11488, 280, 1354, 634, 1060, 63, 76, 634, 1060, 67, 350, 14542, 1604...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11488, 19208, 12, 2890, 16, 366, 634, 1060, 67, 350, 16, 1509, 4672, 3258, 273, 5378, 364, 1604, 316, 365, 18, 11488, 280, 1354, 634, 1060, 63, 76, 634, 1060, 67, 350, 14542, 1604...
r.recv = r.read fp = socket._fileobject(r, close=True)
r.readable = lambda: True r.writable = r.seekable = lambda: False fp = io.BufferedReader(r)
def do_open(self, http_class, req): """Return an addinfourl object for the request, using http_class.
97609b49f3f52c36deef8e9c0f15dd285369f6d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/97609b49f3f52c36deef8e9c0f15dd285369f6d8/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 3536, 990, 392, 527, 10625, 477, 80, 733, 364, 326, 590, 16, 1450, 1062, 67, 1106, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3190, 12, 2890, 16, 1062, 67, 1106, 16, 1111, 4672, 3536, 990, 392, 527, 10625, 477, 80, 733, 364, 326, 590, 16, 1450, 1062, 67, 1106, 18, 2, -100, -100, -100, -100, -100, -...
vetoMatch.append([vetoName,startT,stopT])
vetoMatch.append([os.path.basename(vetoNameLong).split(self.vetoExtension,1)[0],startT,stopT])
def __checkIntervals__(self,vList,gpsTime): """ This method is not to be called explicity. It is called by self.findInterval(IFO,gpsTime). This method returns a text string giving the veto list names and intervals that the gpsTime intersects with. """ vetoMatch=list() for vetoName,vetoList in vList: for startT,stopT,KWSig in vetoList: if ((startT-self.tolWin)<=gpsTime<=(stopT+self.tolWin)): vetoMatch.append([vetoName,startT,stopT]) tmpList=list() for a,b,c in vetoMatch: tmpList.append("%s %s %s\n"%(str(a),str(b),str(c))) outputString=str().join(tmpList) if vetoMatch.__len__()==0: outputString="%s %s %s\n"%("NONE","0","0") return outputString
e1ce7d037c529d5a6d49d15e7bf4ddc9c1a08df5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/e1ce7d037c529d5a6d49d15e7bf4ddc9c1a08df5/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 24224, 972, 12, 2890, 16, 90, 682, 16, 75, 1121, 950, 4672, 3536, 1220, 707, 353, 486, 358, 506, 2566, 431, 20458, 18, 2597, 353, 2566, 635, 365, 18, 4720, 4006, 12, 45, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 24224, 972, 12, 2890, 16, 90, 682, 16, 75, 1121, 950, 4672, 3536, 1220, 707, 353, 486, 358, 506, 2566, 431, 20458, 18, 2597, 353, 2566, 635, 365, 18, 4720, 4006, 12, 45, ...
('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'),
('%w', '0?%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'),
def strftest(now): if verbose: print "strftime test for", time.ctime(now) nowsecs = str(long(now))[:-1] gmt = time.gmtime(now) now = time.localtime(now) if now[3] < 12: ampm='AM' else: ampm='PM' jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6)) try: if now[8]: tz = time.tzname[1] else: tz = time.tzname[0] except AttributeError: tz = '' if now[3] > 12: clock12 = now[3] - 12 elif now[3] > 0: clock12 = now[3] else: clock12 = 12 expectations = ( ('%a', calendar.day_abbr[now[6]], 'abbreviated weekday name'), ('%A', calendar.day_name[now[6]], 'full weekday name'), ('%b', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%B', calendar.month_name[now[1]], 'full month name'), # %c see below ('%d', '%02d' % now[2], 'day of month as number (00-31)'), ('%H', '%02d' % now[3], 'hour (00-23)'), ('%I', '%02d' % clock12, 'hour (01-12)'), ('%j', '%03d' % now[7], 'julian day (001-366)'), ('%m', '%02d' % now[1], 'month as number (01-12)'), ('%M', '%02d' % now[4], 'minute, (00-59)'), ('%p', ampm, 'AM or PM as appropriate'), ('%S', '%02d' % now[5], 'seconds of current time (00-60)'), ('%U', '%02d' % ((now[7] + jan1[6])/7), 'week number of the year (Sun 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), 'week number of the year (Mon 1st)'), # %x see below ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%y', '%02d' % (now[0]%100), 'year without century'), ('%Y', '%d' % now[0], 'year with century'), # %Z see below ('%%', '%', 'single percent sign'), ) nonstandard_expectations = ( # These are standard but don't have predictable output ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), '%m/%d/%y %H:%M:%S'), ('(%Z)', '(%s)' % tz, 'time zone name'), # These are some platform specific extensions ('%D', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), 'mm/dd/yy'), ('%e', '%2d' % now[2], 'day of month as number, blank padded ( 0-31)'), ('%h', calendar.month_abbr[now[1]], 'abbreviated month name'), ('%k', '%2d' % now[3], 'hour, blank padded ( 0-23)'), ('%n', '\n', 'newline character'), ('%r', '%02d:%02d:%02d %s' % (clock12, now[4], now[5], ampm), '%I:%M:%S %p'), ('%R', '%02d:%02d' % (now[3], now[4]), '%H:%M'), ('%s', nowsecs, 'seconds since the Epoch in UCT'), ('%t', '\t', 'tab character'), ('%T', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%3y', '%03d' % (now[0]%100), 'year without century rendered using fieldwidth'), ) if verbose: print "Strftime test, platform: %s, Python version: %s" % \ (sys.platform, string.split(sys.version)[0]) for e in expectations: try: result = time.strftime(e[0], now) except ValueError, error: print "Standard '%s' format gave error:" % e[0], error continue if result == e[1]: continue if result[0] == '%': print "Does not support standard '%s' format (%s)" % (e[0], e[2]) else: print "Conflict for %s (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result) for e in nonstandard_expectations: try: result = time.strftime(e[0], now) except ValueError, result: if verbose: print "Error for nonstandard '%s' format (%s): %s" % \ (e[0], e[2], str(result)) continue if result == e[1]: if verbose: print "Supports nonstandard '%s' format (%s)" % (e[0], e[2]) elif result[0] == '%': if verbose: print "Does not appear to support '%s' format (%s)" % (e[0], e[2]) else: if verbose: print "Conflict for nonstandard '%s' format (%s):" % (e[0], e[2]) print " Expected %s, but got %s" % (e[1], result)
7944ea523ed1da2cfa99c922509caa07114b4096 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7944ea523ed1da2cfa99c922509caa07114b4096/test_strftime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 1222, 395, 12, 3338, 4672, 309, 3988, 30, 1172, 315, 701, 9982, 1842, 364, 3113, 813, 18, 21261, 12, 3338, 13, 2037, 21317, 273, 609, 12, 5748, 12, 3338, 3719, 10531, 17, 21, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 1222, 395, 12, 3338, 4672, 309, 3988, 30, 1172, 315, 701, 9982, 1842, 364, 3113, 813, 18, 21261, 12, 3338, 13, 2037, 21317, 273, 609, 12, 5748, 12, 3338, 3719, 10531, 17, 21, 65, ...
if len(atoms) < 2: msg = redmsg("Please select some atoms, jigs, and/or chunks, covering at least 2 atoms")
if len(atoms) < 3: msg = redmsg("Please select some atoms, jigs, and/or chunks, covering at least 3 atoms")
def setViewNormalTo(self): '''Set view to the normal vector of the plane defined by 3 or more selected atoms or a jig's (Motor or RectGadget) axis. ''' cmd = greenmsg("Set View Normal To: ") # This implementation has two serious problems: # 1. it selects a normal based on the atoms and not the axis of a jig (e.g. a moved rotary motor). # 2. doesn't consider selected jigs that have no atoms. # Bruce and I will discuss this and determine the best implem. # In the meantime, I'm keeping setViewNormalToOrig(). mark 060122. atoms = self.assy.getSelectedAtoms() if len(atoms) < 2: msg = redmsg("Please select some atoms, jigs, and/or chunks, covering at least 2 atoms") env.history.message(cmd + msg) return pos = A( map( lambda a: a.posn(), atoms ) ) # build list of atom xyz positions. nears = [ self.glpane.out, self.glpane.up ] from geometry import compute_heuristic_axis axis = compute_heuristic_axis( pos, 'normal', already_centered = False, nears = nears, dflt = None )
2921495805bfaedd3ca84a6f6fe320cd92bd2dd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2921495805bfaedd3ca84a6f6fe320cd92bd2dd6/ops_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 5506, 774, 12, 2890, 4672, 9163, 694, 1476, 358, 326, 2212, 3806, 434, 326, 11017, 2553, 635, 890, 578, 1898, 3170, 9006, 578, 279, 525, 360, 1807, 261, 24749, 280, 578, 9315, 43,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 5506, 774, 12, 2890, 4672, 9163, 694, 1476, 358, 326, 2212, 3806, 434, 326, 11017, 2553, 635, 890, 578, 1898, 3170, 9006, 578, 279, 525, 360, 1807, 261, 24749, 280, 578, 9315, 43,...
return [ "-hfs", "-nodesktop", "-part"
return [ "-hfs", "-no-desktop", "-part",
def _get_mkisofs_options(self, isodir): return [ "-hfs", "-nodesktop", "-part" "-map", isodir + "/ppc/mapping", "-hfs-bless", isodir + "/ppc/mac", "-hfs-volid", self.fslabel ]
e0328e752e0fc5f53e8643bf02fe1aba23543ace /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9342/e0328e752e0fc5f53e8643bf02fe1aba23543ace/live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24816, 291, 792, 87, 67, 2116, 12, 2890, 16, 353, 369, 481, 4672, 327, 306, 3701, 76, 2556, 3113, 3701, 2135, 17, 31949, 3113, 3701, 2680, 3113, 3701, 1458, 3113, 353, 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, 389, 588, 67, 24816, 291, 792, 87, 67, 2116, 12, 2890, 16, 353, 369, 481, 4672, 327, 306, 3701, 76, 2556, 3113, 3701, 2135, 17, 31949, 3113, 3701, 2680, 3113, 3701, 1458, 3113, 353, 36...
for fileID,lfn in fileIDLFNs.items():
for fileID, lfn in fileIDLFNs.items():
def _checkExistingMetadata(self,existingMetadata,lfns): failed = {} successful = {} fileIDLFNs = {} for lfn,fileDict in existingMetadata.items(): fileIDLFNs[fileDict['FileID']] = lfn # For those that exist get the replicas to determine whether they are already registered res = self._getFileReplicas(fileIDLFNs.keys()) if not res['OK']: for lfn in fileIDLFNs.values(): failed[lfn] = 'Failed checking pre-existing replicas' else: for fileID,lfn in fileIDLFNs.items(): fileMetadata = existingMetadata[lfn] existingGuid = fileMetadata['GUID'] existingSize = fileMetadata['Size'] existingChecksum = fileMetadata['Checksum'] newGuid = lfns[lfn]['GUID'] newSize = lfns[lfn]['Size'] newChecksum = lfns[lfn]['Checksum'] # If the DB does not have replicas for this file return an error if not res['Value'].has_key(fileID): failed[lfn] = "File already registered with alternative replicas" # If the supplied SE is not in the existing replicas return an error elif not lfns[lfn]['SE'] in res['Value'][fileID].keys(): failed[lfn] = "File already registered with alternative replicas" # Ensure that the key file metadata is the same elif (existingGuid != newGuid) or (existingSize != newSize) or (existingChecksum != newChecksum): failed[lfn] = "File already registered with alternative metadata" # If we get here the file being registered already exists exactly in the DB else: successful[lfn] = True return successful,failed
26c5008a7adbc1c761e2409bed59b7710e5f2c74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/26c5008a7adbc1c761e2409bed59b7710e5f2c74/FileManagerBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 9895, 2277, 12, 2890, 16, 11711, 2277, 16, 20850, 2387, 4672, 2535, 273, 2618, 6873, 273, 2618, 585, 734, 9105, 10386, 273, 2618, 364, 328, 4293, 16, 768, 5014, 316, 2062, 227...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 9895, 2277, 12, 2890, 16, 11711, 2277, 16, 20850, 2387, 4672, 2535, 273, 2618, 6873, 273, 2618, 585, 734, 9105, 10386, 273, 2618, 364, 328, 4293, 16, 768, 5014, 316, 2062, 227...
mirror.response = response.read()
logging.debug('%s got response for %s: %s' % (threading.currentThread().getName(), mirror.identifier, response.code)) try: mirror.response = response.read() except ValueError, e: if str(e) == 'invalid literal for int(): ': mirror.response = 'response not read due to http://bugs.python.org/issue1205' logging.info('mirror %s sends broken chunked reply, see http://bugs.python.org/issue1205' % mirror.identifier) else: raise
def ping_http(mirror): """Try to reach host at baseurl. Set status_baseurl_new.""" logging.debug("%s pinging %s" % (threading.currentThread().getName(), mirror.identifier)) #req = urllib2.Request('http://old-cherry.suse.de') # never works #req = urllib2.Request('http://doozer.poeml.de/') # always works req = urllib2.Request(mirror.baseurl) req.add_header('User-Agent', USER_AGENT) req.get_method = lambda: "HEAD" mirror.status_baseurl_new = False mirror.timed_out = True if mirror.baseurl == '': mirror.response_code = None mirror.response = None return None try: response = urllib2.urlopen(req) logging.debug('%s got response for %s: %s' % (threading.currentThread().getName(), mirror.identifier, response)) try: mirror.response_code = response.code # if the web server redirects to an ftp:// URL, our response won't have a code attribute # (except we are going via a proxy) except AttributeError: if response.url.startswith('ftp://'): # count as success mirror.response_code = 200 logging.debug('mirror %s redirects to ftp:// URL' % mirror.identifier) mirror.response = response.read() mirror.status_baseurl_new = True except httplib.BadStatusLine: mirror.response_code = None mirror.response = None except urllib2.HTTPError, e: mirror.response_code = e.code mirror.response = e.read() except urllib2.URLError, e: mirror.response_code = 0 mirror.response = "%s" % e.reason # not reached, if the timeout goes off mirror.timed_out = False
25643f1655d4f188c7f51c256187f78a3ff14004 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3890/25643f1655d4f188c7f51c256187f78a3ff14004/pingd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10087, 67, 2505, 12, 27197, 4672, 3536, 7833, 358, 9287, 1479, 622, 25427, 18, 1000, 1267, 67, 1969, 718, 67, 2704, 12123, 225, 2907, 18, 4148, 27188, 87, 10087, 310, 738, 87, 6, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10087, 67, 2505, 12, 27197, 4672, 3536, 7833, 358, 9287, 1479, 622, 25427, 18, 1000, 1267, 67, 1969, 718, 67, 2704, 12123, 225, 2907, 18, 4148, 27188, 87, 10087, 310, 738, 87, 6, 738, ...
dbl_click_call(t,t1,'OOO',event)
dbl_click_call(t,t1,'OOO',2,event)
def dbl_click_msgtext(event): t=msgtext.get('1.0',END) #Entire contents of text box t1=msgtext.get('1.0',CURRENT) #Contents from start to cursor dbl_click_call(t,t1,'OOO',event)
b42869f7f2ecdc35a209cbaa5bb9ab1641eb5814 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/b42869f7f2ecdc35a209cbaa5bb9ab1641eb5814/map65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 80, 67, 7475, 67, 3576, 955, 12, 2575, 4672, 268, 33, 3576, 955, 18, 588, 2668, 21, 18, 20, 2187, 4415, 13, 6647, 468, 14199, 577, 2939, 434, 977, 3919, 268, 21, 33, 3576, 955,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 80, 67, 7475, 67, 3576, 955, 12, 2575, 4672, 268, 33, 3576, 955, 18, 588, 2668, 21, 18, 20, 2187, 4415, 13, 6647, 468, 14199, 577, 2939, 434, 977, 3919, 268, 21, 33, 3576, 955,...
119.9980
119.99830020752132
def incomplete_gamma(s,x,prec=53): r""" Implements the incomplete Gamma function. The argument x and s are complex numbers (x must be a positive real number if s = 0). The result returned is $\int_x^\infty e^{-t}t^{s-1}dt$. EXAMPLES: sage: incomplete_gamma(0.1,6,200) 119.99999984701215694 sage: incomplete_gamma(0,6,200) 120.00000000000000000 sage: incomplete_gamma(0.3,6,200) 119.99990598341125736 sage: incomplete_gamma(0.3,6) 120.0000 sage: incomplete_gamma(0.5,6) 119.9980 sage: incomplete_gamma(0.5,6,100) 119.99830019 """ from sage.libs.pari.all import pari R,a = _setup(prec) b = R(pari(x).incgam(s)) pari.set_real_precision(a) return b
5d4d1a4315d1dc34b216f5bb99d2f5bcf1f776e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/5d4d1a4315d1dc34b216f5bb99d2f5bcf1f776e9/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14715, 67, 20589, 12, 87, 16, 92, 16, 4036, 33, 8643, 4672, 436, 8395, 29704, 326, 14715, 25409, 445, 18, 225, 1021, 1237, 619, 471, 272, 854, 7233, 5600, 261, 92, 1297, 506, 279, 6895...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14715, 67, 20589, 12, 87, 16, 92, 16, 4036, 33, 8643, 4672, 436, 8395, 29704, 326, 14715, 25409, 445, 18, 225, 1021, 1237, 619, 471, 272, 854, 7233, 5600, 261, 92, 1297, 506, 279, 6895...
self.cv.release()
def _handleClassInd(self, broker, codec, seq): kind = codec.read_uint8() pname = str(codec.read_str8()) cname = str(codec.read_str8()) hash = codec.read_bin128()
dc4e5689e88e42c1dc783761a2615aab45312cd6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/dc4e5689e88e42c1dc783761a2615aab45312cd6/qmfconsole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 797, 3866, 12, 2890, 16, 8625, 16, 9196, 16, 3833, 4672, 3846, 225, 273, 9196, 18, 896, 67, 11890, 28, 1435, 19952, 273, 609, 12, 21059, 18, 896, 67, 701, 28, 10756, 18290, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4110, 797, 3866, 12, 2890, 16, 8625, 16, 9196, 16, 3833, 4672, 3846, 225, 273, 9196, 18, 896, 67, 11890, 28, 1435, 19952, 273, 609, 12, 21059, 18, 896, 67, 701, 28, 10756, 18290, ...
v = v[:100] + ' ...' return '%s(%s): %s [default=%s] '%(name,iname, desc, v)
v = v[:100] + ' ...' return '%s(%s): %s [default=%s] '%(name, iname, desc, v)
def get_tip(self): """ Return the tool tip """
0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66/node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14587, 12, 2890, 4672, 3536, 2000, 326, 5226, 9529, 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...
[ 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, 336, 67, 14587, 12, 2890, 4672, 3536, 2000, 326, 5226, 9529, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.assertIs(p.poll(), None)
self.assertIsNone(p.poll())
def test_terminate(self): p = subprocess.Popen([sys.executable, "-c", "input()"])
aae966053cafa95fb0a3e6c41e5c6eae9cd1db63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/aae966053cafa95fb0a3e6c41e5c6eae9cd1db63/test_subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30017, 12, 2890, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 2630, 10031, 5717, 2, 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, 1842, 67, 30017, 12, 2890, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 2630, 10031, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
mo = re.match(r"[rb](\d+)", rs)
mo = re.match(r"([rb])(\d+)", rs)
def parse(self, vs=None, rs=None): """ Parse vs and rs into v, s, g, r. """ if vs is not None: mo = re.match(r"v(\d+)s(\d+)g(\d+)", vs) if not mo: raise ValueError("%r is not a valid virtual server" % vs) v, s, g = int(mo.group(1)), int(mo.group(2)), int(mo.group(3)) if rs is not None: mo = re.match(r"[rb](\d+)", rs) if not mo: raise ValueError("%r is not a valid real server" % rs) r = int(mo.group(1)) return v, s, g, r return v, s, g, None return None, None, None, None
7c642c83662e6df49097c3079102e8ab494ded57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13049/7c642c83662e6df49097c3079102e8ab494ded57/alteon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 6195, 33, 7036, 16, 3597, 33, 7036, 4672, 3536, 2884, 6195, 471, 3597, 1368, 331, 16, 272, 16, 314, 16, 436, 18, 3536, 309, 6195, 353, 486, 599, 30, 7344, 273, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 6195, 33, 7036, 16, 3597, 33, 7036, 4672, 3536, 2884, 6195, 471, 3597, 1368, 331, 16, 272, 16, 314, 16, 436, 18, 3536, 309, 6195, 353, 486, 599, 30, 7344, 273, 28...
"""Same as in BaseServer but as a thread.""" self.finish_request(request, client_address) self.close_request(request)
"""Same as in BaseServer but as a thread. In addition, exception handling is done here. """ try: self.finish_request(request, client_address) self.close_request(request) except: self.handle_error(request, client_address) self.close_request(request)
def process_request_thread(self, request, client_address): """Same as in BaseServer but as a thread.""" self.finish_request(request, client_address) self.close_request(request)
2086ef2ac92362f93a5ff8fb2c9ee1aa31fb654d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2086ef2ac92362f93a5ff8fb2c9ee1aa31fb654d/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 67, 5930, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 8650, 487, 316, 3360, 2081, 1496, 487, 279, 2650, 12123, 365, 18, 13749, 67, 2293, 12, 2293, 16, 1004, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 67, 5930, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 8650, 487, 316, 3360, 2081, 1496, 487, 279, 2650, 12123, 365, 18, 13749, 67, 2293, 12, 2293, 16, 1004, 67, ...
def setupResponse(self, result, method): return {'status_code' : result.status_code, 'headers' : result.headers, 'content' : result.content }
def setupRequest(self, method): qs = self.request.query_string parsedQs = cgi.parse_qs(qs) params = {} if parsedQs.has_key('url') and parsedQs.has_key('method'): params['success'] = True params['headers'] = {} params['body'] = None for header in parsedQs: if header == "url": params['url'] = urllib.unquote(parsedQs['url'][0]) elif header == "method": params['method'] = urllib.unquote(parsedQs['method'][0]) elif header == 'body': params['body'] = urllib.unquote(parsedQs['body'][0]) else: params['headers'][urllib.unquote(header)] = urllib.unquote(parsedQs[header][0]) return params params['success'] = False return params
9d5b73c8c3d2f92800ab621cc1824db9a52e9ca5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13890/9d5b73c8c3d2f92800ab621cc1824db9a52e9ca5/urlreq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 691, 12, 2890, 16, 707, 4672, 8719, 273, 365, 18, 2293, 18, 2271, 67, 1080, 2707, 53, 87, 273, 276, 10052, 18, 2670, 67, 12926, 12, 12926, 13, 859, 273, 2618, 225, 309, 2707, 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, 3875, 691, 12, 2890, 16, 707, 4672, 8719, 273, 365, 18, 2293, 18, 2271, 67, 1080, 2707, 53, 87, 273, 276, 10052, 18, 2670, 67, 12926, 12, 12926, 13, 859, 273, 2618, 225, 309, 2707, 5...
start_time, ignore1, ignore2, ignore3 = self._jmim.opt_get_optimization_interval()
start_time, ignore1, ignore2, ignore3 = self._m.jmimodel.opt_get_optimization_interval()
def getStartTime(self): start_time, ignore1, ignore2, ignore3 = self._jmim.opt_get_optimization_interval() return start_time
733964346bd705d3e3fa78795693f8a99289c936 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/733964346bd705d3e3fa78795693f8a99289c936/shooting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31953, 12, 2890, 4672, 787, 67, 957, 16, 2305, 21, 16, 2305, 22, 16, 2305, 23, 273, 365, 6315, 81, 18, 78, 81, 381, 1009, 18, 3838, 67, 588, 67, 16689, 1588, 67, 6624, 1435, 327, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31953, 12, 2890, 4672, 787, 67, 957, 16, 2305, 21, 16, 2305, 22, 16, 2305, 23, 273, 365, 6315, 81, 18, 78, 81, 381, 1009, 18, 3838, 67, 588, 67, 16689, 1588, 67, 6624, 1435, 327, 7...
cmds.append('create unique index index_key on
cmds.append('create index index_key on
def no_rep_clone(): # # the set of curated clones (excluding singletons) which have a final mgi ID of "MGI:" # and no representative clone has been designated # global cmds cmds.append('select distinct f1._Fantom2_key, f1.final_mgiID, ' + \ 'f1.riken_cloneid, f1.riken_cluster ' + \ 'into #curated ' + \ 'from MGI_Fantom2 f1 ' + \ 'where f1.final_mgiID like "MGI:%" ' + \ 'and f1.riken_cloneid != "zilch" ' + \ 'or exists (select 1 from MGI_Fantom2 f2 ' + \ 'where f1.final_mgiID = f2.riken_cloneid ' + \ 'and f2.riken_cloneid != "zilch")') cmds.append('create index index_cluster on #curated(riken_cloneid)') cmds.append('delete from #curated where riken_cloneid = "zilch"') cmds.append('select * into #singleton from #curated group by final_mgiID having count(*) = 1') cmds.append('create unique index index_cluster on #singleton(riken_cloneid)') cmds.append('select c.* ' + \ 'into #no_rep_clone ' + \ 'from #curated c ' + \ 'where not exists (select 1 from MGI_Fantom2 f1 ' + \ 'where c.final_mgiID = f1.final_mgiID ' + \ 'and f1.seq_note = "Representative") ' + \ 'and not exists (select 1 from #singleton s ' + \ 'where c.riken_cloneid = s.riken_cloneid)') cmds.append('create unique index index_key on #no_rep_clone(_Fantom2_key)') # results[20] cmds.append('select * from #no_rep_clone order by final_mgiID')
3859a6fe7c8ce4969be2d87260ff72e4850e244c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/340/3859a6fe7c8ce4969be2d87260ff72e4850e244c/fantom2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 14462, 67, 14056, 13332, 225, 468, 468, 326, 444, 434, 662, 690, 927, 5322, 261, 338, 18596, 6396, 87, 13, 1492, 1240, 279, 727, 312, 10052, 1599, 434, 315, 49, 13797, 2773, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14462, 67, 14056, 13332, 225, 468, 468, 326, 444, 434, 662, 690, 927, 5322, 261, 338, 18596, 6396, 87, 13, 1492, 1240, 279, 727, 312, 10052, 1599, 434, 315, 49, 13797, 2773, ...
dropitem(item, char, corpse)
dropitem(citem, char, corpse)
def createpack(char, killer, corpse, pack): if killer: luckChance = properties.luckchance(killer) else: luckChance = 0 # A pack is actually a list of lists for item in pack: packchance = item[ PACK_CHANCE ] packstackable = item[ PACK_STACKABLE ] packamount = item[ PACK_AMOUNT ] packitem = item[ PACK_ITEM ] spawn = False if packchance >= random.random(): spawn = True # There is a chance that the item will spawn anyway if the luck check # succeeds if not spawn: spawn = luckChance > random.randint(0, 9999) if spawn: if type( packamount ) == str: amount = utilities.rolldice( packamount ) elif type( packamount ) == list: amount = random.randint( packamount[0], packamount[1] ) else: amount = int( packamount ) if packstackable == True: if type( packitem ) == list: itemid = random.choice( packitem ) elif type( packitem ) == str: itemid = str( packitem ) item = wolfpack.additem( itemid ) item.amount = amount dropitem(item, char, corpse) else: for i in range(0, amount): if type( packitem ) == list: itemid = random.choice( packitem ) elif type( packitem ) == str: itemid = str( packitem ) if itemid == 'RANDOM_MAGIC_ITEM': # Select the item-id value = random.random() # 10% Jewelry if value > 0.90: item = wolfpack.additem(random.choice(DEF_JEWELRY)) # 10% Shield elif value > 0.80: item = wolfpack.additem(random.choice(DEF_SHIELDS)) # 40% Armor elif value > 0.40: item = wolfpack.additem(random.choice(DEF_ARMOR)) # 40% Weapon else: item = wolfpack.additem(random.choice(DEF_ALLWEAPONS)) maxproperties = item[ PACK_MAXPROPERTIES ] minintensity = item[ PACK_MININTENSITY ] maxintensity = item[ PACK_MAXINTENSITY ] properties.applyRandom(item, maxproperties, minintensity, maxintensity, luckChance) else: item = wolfpack.additem(itemid) dropitem(item, char, corpse)
b5ae9023c1a6483a08f382d72eaaa4d5e8abacbe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/b5ae9023c1a6483a08f382d72eaaa4d5e8abacbe/loot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2920, 12, 3001, 16, 8673, 264, 16, 1858, 84, 307, 16, 2298, 4672, 309, 8673, 264, 30, 328, 9031, 782, 1359, 273, 1790, 18, 80, 9031, 343, 1359, 12, 16418, 264, 13, 469, 30, 328,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2920, 12, 3001, 16, 8673, 264, 16, 1858, 84, 307, 16, 2298, 4672, 309, 8673, 264, 30, 328, 9031, 782, 1359, 273, 1790, 18, 80, 9031, 343, 1359, 12, 16418, 264, 13, 469, 30, 328,...
elif t.find(')(') != -1 and t.find('<') == -1 : c += indent + ' %s;\n' % ( t.replace(')(', ' %s)('%a['name']))
elif fPPos : c += indent + ' %s;\n' % ( t[:fPPos] + a['name'] + t[fPPos:] )
def genClassShadow(self, attrs, inner = 0 ) : inner_shadows = {} bases = self.getBases( attrs['id'] ) cls = self.genTypeName(attrs['id'],const=True,colon=True) clt = string.translate(str(cls), self.transtable) if self.isUnnamedType(cls) and inner : clt = '' xtyp = self.xref[attrs['id']] typ = xtyp['elem'].lower() indent = inner * 2 * ' ' if typ == 'enumeration' : c = indent + 'enum %s {};\n' % clt else: if not bases : c = indent + '%s %s {\n%s public:\n' % (typ, clt, indent) else : c = indent + '%s %s : ' % (typ, clt) for b in bases : if b.get('virtual','') == '1' : acc = 'virtual ' + b['access'] else : acc = b['access'] bname = self.genTypeName(b['type'],colon=True) if self.xref[b['type']]['attrs'].get('access') in ('private','protected'): bname = string.translate(str(bname),self.transtable) c += indent + '%s %s' % ( acc , bname ) if b is not bases[-1] : c += ', ' c += indent + ' {\n' + indent +' public:\n' if clt: # and not self.checkAccessibleType(xtyp): c += indent + ' %s();\n' % (clt) if self.isClassVirtual( attrs ) : c += indent + ' virtual ~%s() throw();\n' % ( clt ) members = attrs.get('members','') memList = members.split() for m in memList : member = self.xref[m] if member['elem'] in ('Class','Struct','Union','Enumeration') \ and member['attrs'].get('access') in ('private','protected') \ and not self.isUnnamedType(member['attrs'].get('name')): cmem = self.genTypeName(member['attrs']['id'],const=True,colon=True) if cmem != cls and cmem not in inner_shadows : inner_shadows[cmem] = string.translate(str(cmem), self.transtable) c += self.genClassShadow(member['attrs'], inner + 1) for m in memList : member = self.xref[m] if member['elem'] in ('Field',) : a = member['attrs'] t = self.genTypeName(a['type'],colon=True,const=True) #---- Check if a type and a member with the same name exist in the same scope mTypeElem = self.xref[a['type']]['elem'] if mTypeElem in ('Class','Struct'): mTypeName = self.xref[a['type']]['attrs']['name'] mTypeId = a['type'] for el in self.xref[self.xref[a['type']]['attrs']['context']]['attrs'].get('members').split(): if self.xref[el]['attrs'].get('name') == mTypeName and mTypeId != el : t = mTypeElem.lower() + ' ' + t[2:] break #---- Check for non public types------------------------ noPublicType = self.checkAccessibleType(self.xref[a['type']]) if ( noPublicType and not self.isUnnamedType(self.xref[a['type']]['attrs'].get('name'))): noPubTypeAttrs = self.xref[noPublicType]['attrs'] cmem = self.genTypeName(noPubTypeAttrs['id'],const=True,colon=True) if cmem != cls and cmem not in inner_shadows : inner_shadows[cmem] = string.translate(str(cmem), self.transtable) c += self.genClassShadow(noPubTypeAttrs, inner + 1) #---- translate the type with the inner shadow type----- ikeys = inner_shadows.keys() ikeys.sort(lambda x,y : len(y) - len(x)) for ikey in ikeys : if t.find(ikey) == 0 : t = t.replace(ikey, inner_shadows[ikey]) # change current class by shadow name elif t.find(ikey[2:]) != -1 : t = t.replace(ikey[2:], inner_shadows[ikey]) # idem without leading :: mType = self.xref[a.get('type')] if mType and self.isUnnamedType(mType['attrs'].get('name')) : t = self.genClassShadow(mType['attrs'], inner+1)[:-2] if t[-1] == ']' : c += indent + ' %s %s;\n' % ( t[:t.find('[')], a['name']+t[t.find('['):] ) elif t.find(')(') != -1 and t.find('<') == -1 : c += indent + ' %s;\n' % ( t.replace(')(', ' %s)('%a['name'])) else : c += indent + ' %s %s;\n' % ( t, a['name'] ) c += indent + '};\n' return c
ec31cd97075a1a92c798384d7e042f8340ae2fb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4350/ec31cd97075a1a92c798384d7e042f8340ae2fb8/gendict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 797, 12957, 12, 2890, 16, 3422, 16, 3443, 273, 374, 262, 294, 3443, 67, 19119, 87, 273, 2618, 8337, 273, 365, 18, 588, 38, 3304, 12, 3422, 3292, 350, 3546, 262, 2028, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 797, 12957, 12, 2890, 16, 3422, 16, 3443, 273, 374, 262, 294, 3443, 67, 19119, 87, 273, 2618, 8337, 273, 365, 18, 588, 38, 3304, 12, 3422, 3292, 350, 3546, 262, 2028, 273, 365, ...
for set1 in self.sets + []:
for set1 in self.sets + [[]]:
def test_set_clear(self): """intbitset - clearing""" for set1 in self.sets + []: intbitset1 = intbitset(set1) intbitset1.clear() self.assertEqual(list(intbitset1), []) intbitset1 = intbitset(set1, trailing_bits=True) intbitset1.clear() self.assertEqual(list(intbitset1), [])
d4a1d7e3f52dbeaebf8d74a7a99b4870caa65e1a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/d4a1d7e3f52dbeaebf8d74a7a99b4870caa65e1a/intbitset_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 8507, 12, 2890, 4672, 3536, 474, 3682, 542, 300, 29820, 8395, 364, 444, 21, 316, 365, 18, 4424, 397, 306, 8526, 14542, 509, 3682, 542, 21, 273, 509, 3682, 542, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 8507, 12, 2890, 4672, 3536, 474, 3682, 542, 300, 29820, 8395, 364, 444, 21, 316, 365, 18, 4424, 397, 306, 8526, 14542, 509, 3682, 542, 21, 273, 509, 3682, 542, 12, ...
eval("%s = %s" % (var, repr(val)))
exec "%s = %s" % (var, repr(val))
def AddToPath(path): # if it's a relative path and we know what directory the current # python script is in, make the path relative to that directory. if not os.path.isabs(path) and sys.path[0]: path = os.path.join(sys.path[0], path) path = os.path.realpath(path) # sys.path[0] should always refer to the current script's directory, # so place the new dir right after that. sys.path.insert(1, path)
e781cbd421a662968fad080078cccc8c623d0644 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/e781cbd421a662968fad080078cccc8c623d0644/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 774, 743, 12, 803, 4672, 468, 309, 518, 1807, 279, 3632, 589, 471, 732, 5055, 4121, 1867, 326, 783, 468, 5790, 2728, 353, 316, 16, 1221, 326, 589, 3632, 358, 716, 1867, 18, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 774, 743, 12, 803, 4672, 468, 309, 518, 1807, 279, 3632, 589, 471, 732, 5055, 4121, 1867, 326, 783, 468, 5790, 2728, 353, 316, 16, 1221, 326, 589, 3632, 358, 716, 1867, 18, 309, ...
'''
"""
def _array_docstring_(name, shape, compat): return ''' Constructor: .. method:: %(name)s(obj, dtype=numpy.float32, order='V', init = True, value = None) :param obj: a data or shape object (see below) :param dtype: desired element type :param order: desired memory layout (see below) :param init: True: initialize the image with zeros; False: do not initialize the image :type init: boolean :param value: initialize the image with this value (overrides init) :type value: convertible to dtype **obj** may be one of the following * If obj is a vigra.%(name)s or a subclass, a copy of obj with the given dtype and order is created, and obj's class is transferred. * If obj is a numpy.ndarray with compatible shape, a copy of obj with the given dtype, order and class vigra.%(name)s is created. * If obj is a sequence, it is interpreted as a shape. When the shape is compatible, a new vigra.%(name)s with the given dtype and order is created. * Otherwise, or if the shape is not compatible, an exception is raised.
7142b8e8a5aa0e21c28f74980abb0be6e15b7601 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12582/7142b8e8a5aa0e21c28f74980abb0be6e15b7601/arraytypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1126, 67, 24675, 67, 12, 529, 16, 2179, 16, 4796, 4672, 327, 3536, 11417, 30, 225, 6116, 707, 2866, 8975, 529, 13, 87, 12, 2603, 16, 3182, 33, 15974, 18, 5659, 1578, 16, 1353, 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, 389, 1126, 67, 24675, 67, 12, 529, 16, 2179, 16, 4796, 4672, 327, 3536, 11417, 30, 225, 6116, 707, 2866, 8975, 529, 13, 87, 12, 2603, 16, 3182, 33, 15974, 18, 5659, 1578, 16, 1353, 2...
def loop(timeout=30.0, use_poll=False, map=None):
def loop(timeout=30.0, use_poll=False, map=None, count=None):
def loop(timeout=30.0, use_poll=False, map=None): if map is None: map = socket_map if use_poll and hasattr(select, 'poll'): poll_fun = poll2 else: poll_fun = poll while map: poll_fun(timeout, map)
48dbcbcca054c0b85a2ade5e721d386bdf08f5e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/48dbcbcca054c0b85a2ade5e721d386bdf08f5e0/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 8381, 16, 852, 33, 7036, 16, 1056, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 8381, 16, 852, 33, 7036, 16, 1056, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13...
for lfn,error in res['Value']['Failed'].items(): gLogger.error("[%s] __validateChecksums: Failed to get file checksum" % se,"%s %s" % (lfn,error)) for lfn,metadata in res['Value']['Successful'].items():
for lfn, error in res['Value']['Failed'].items(): gLogger.error( "[%s] __validateChecksums: Failed to get file checksum" % se, "%s %s" % ( lfn, error ) ) for lfn, metadata in res['Value']['Successful'].items():
def __validateChecksums(self,se, migratedFileIDs,migratingFiles): """ Obtain the checksums in the catalog if not present and check against the checksum from the storage """ lfnFileID = {} checksumToObtain = [] for fileID in migratedFileIDs.keys(): if not migratingFiles[fileID]['Checksum']: lfn = migratingFiles[fileID]['LFN'] checksumToObtain.append(lfn) lfnFileID[lfn] = fileID if checksumToObtain: res = self.ReplicaManager.getCatalogFileMetadata(checksumToObtain) if not res['OK']: gLogger.error("[%s] __validateChecksums: Failed to obtain file checksums" % se) return res for lfn,error in res['Value']['Failed'].items(): gLogger.error("[%s] __validateChecksums: Failed to get file checksum" % se,"%s %s" % (lfn,error)) for lfn,metadata in res['Value']['Successful'].items(): migratingFiles[lfnFileID[lfn]]['Checksum'] = metadata['CheckSumValue'] mismatchFiles = [] matchFiles = [] checksumMismatches = [] fileRecords = [] for fileID,seChecksum in migratedFileIDs.items(): lfn = migratingFiles[fileID]['LFN'] catalogChecksum = migratingFiles[fileID]['Checksum'] if not seChecksum: gLogger.error("[%s] __validateChecksums: Storage checksum not available" % se, migratingFiles[fileID]['PFN']) elif not compareAdler(seChecksum,catalogChecksum): gLogger.error("[%s] __validateChecksums: Storage and catalog checksum mismatch" % se,"%s '%s' '%s'" % (migratingFiles[fileID]['PFN'],seChecksum,catalogChecksum)) mismatchFiles.append(fileID) pfn = migratingFiles[fileID]['PFN'] se = migratingFiles[fileID]['SE'] checksumMismatches.append((lfn,pfn,se,'CatalogPFNChecksumMismatch')) fileRecords.append((lfn,'Checksum match','%s@%s' % (seChecksum,se),'','MigrationMonitoringAgent')) else: fileRecords.append((lfn,'Checksum mismatch','%s@%s' % (seChecksum,se),'','MigrationMonitoringAgent')) matchFiles.append(fileID) # Add the data logging records self.DataLog.addFileRecords(fileRecords) if checksumMismatches: # Update the (mis)matching checksums (in the integrityDB and) in the migration monitoring db self.__reportProblematicReplicas(checksumMismatches) res = self.MigrationMonitoringDB.setMigratingReplicaStatus(mismatchFiles,'ChecksumFail') if not res['OK']: gLogger.error("[%s] __validateChecksums: Failed to update checksum mismatching files." % se, res['Message']) if matchFiles: res = self.MigrationMonitoringDB.setMigratingReplicaStatus(matchFiles,'ChecksumMatch') if not res['OK']: gLogger.error("[%s] __validateChecksums: Failed to update checksum mismatching files." % se, res['Message']) resDict = {'MatchingFiles':matchFiles,'MismatchFiles':mismatchFiles} return S_OK(resDict)
d0365a9152f6e7105162edd475d5401448bfdaed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d0365a9152f6e7105162edd475d5401448bfdaed/MigrationMonitoringAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5662, 10723, 87, 12, 2890, 16, 307, 16, 24741, 812, 5103, 16, 81, 2757, 1776, 2697, 4672, 3536, 24850, 326, 26829, 316, 326, 6222, 309, 486, 3430, 471, 866, 5314, 326, 6697, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5662, 10723, 87, 12, 2890, 16, 307, 16, 24741, 812, 5103, 16, 81, 2757, 1776, 2697, 4672, 3536, 24850, 326, 26829, 316, 326, 6222, 309, 486, 3430, 471, 866, 5314, 326, 6697, 628, ...
item.revision.number-1
item.revision.number
def on_context_diff_previous_revision(self, widget, data=None): from rabbitvcs.ui.diff import SVNDiff
5200718ae5c0f6f4b7d708f19b46ad4ab72016a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/5200718ae5c0f6f4b7d708f19b46ad4ab72016a5/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2472, 67, 5413, 67, 11515, 67, 13057, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 628, 767, 70, 3682, 18982, 18, 4881, 18, 5413, 1930, 29537, 2908, 3048, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 2472, 67, 5413, 67, 11515, 67, 13057, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 628, 767, 70, 3682, 18982, 18, 4881, 18, 5413, 1930, 29537, 2908, 3048, 2, -100, -100, -100,...
document.warning("""Warning: Can not determine whether document
document.warning("""Warning: Cannot determine whether document
def convert_graphics(document): """ Add extension to documentnames of insetgraphics if necessary. """ i = 0 while 1: i = find_token(document.body, "\\begin_inset Graphics", i) if i == -1: return j = find_token_exact(document.body, "documentname", i) if j == -1: return i = i + 1 filename = document.body[j].split()[1] absname = os.path.normpath(os.path.join(document.dir, filename)) if document.input == stdin and not os.path.isabs(filename): # We don't know the directory and cannot check the document. # We could use a heuristic and take the current directory, # and we could try to find out if documentname has an extension, # but that would be just guesses and could be wrong. document.warning("""Warning: Can not determine whether document %s needs an extension when reading from standard input. You may need to correct the document manually or run lyx2lyx again with the .lyx document as commandline argument.""" % filename) continue # This needs to be the same algorithm as in pre 233 insetgraphics if access(absname, F_OK): continue if access(absname + ".ps", F_OK): document.body[j] = document.body[j].replace(filename, filename + ".ps") continue if access(absname + ".eps", F_OK): document.body[j] = document.body[j].replace(filename, filename + ".eps")
1a4b549a534c70cc8c336b0baeeb523d07c9cb58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/1a4b549a534c70cc8c336b0baeeb523d07c9cb58/lyx_1_4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 31586, 12, 5457, 4672, 3536, 1436, 2710, 358, 1668, 1973, 434, 316, 542, 31586, 309, 4573, 18, 3536, 277, 273, 374, 1323, 404, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 343...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 31586, 12, 5457, 4672, 3536, 1436, 2710, 358, 1668, 1973, 434, 316, 542, 31586, 309, 4573, 18, 3536, 277, 273, 374, 1323, 404, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 343...
evaluate it. */ var v = cell_id_list; var n = v.length; var i; //We want all of these evaluate cell requests to be made //synchronously so that they actually get evaluated in the //correct order. async_bool = false; for(i=0; i<n; i++) { var cell_input = get_cell(v[i]); var I = cell_input.value; if (first_variable_name_in_string(I).length > 0) { evaluate_cell(v[i],0); } } async_bool = true;
evaluate it. Previously, we just called evaluate on everything all at once. This is undesirable, since packets often arrive out-of-order, so the cells get evaluated out-of-order. Set the global variable evaluating_all = true. Then, we kick off evaluations by evaluating the first cell. In cell_evaluate_callback, we check to see if evaluating_all is set, and proceed from there. This way, each cell is evaluated immediately after the server acknowledges that it has received the previous request. */ evaluating_all = true; evaluating_all_cursor = 1; //start at 1 since we kick-off with zero evaluate_cell(cell_id_list[0],false);
def notebook_lib(): s= r"""
2f5b170dbdc55ce71d36e9a73ea76c885b0779f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2f5b170dbdc55ce71d36e9a73ea76c885b0779f4/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self.field[self.pos] in self.atomends:
if self.field[self.pos] in atomends:
def getatom(self): """Parse an RFC-822 atom.""" atomlist = ['']
52d51c96f28f628bf085945df0f7b389d6cbc349 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52d51c96f28f628bf085945df0f7b389d6cbc349/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7466, 12, 2890, 4672, 3536, 3201, 392, 8372, 17, 24532, 3179, 12123, 3179, 1098, 273, 10228, 3546, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7466, 12, 2890, 4672, 3536, 3201, 392, 8372, 17, 24532, 3179, 12123, 3179, 1098, 273, 10228, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.sock.send(str)
sendptr = 0 while sendptr < len(str): sendptr = sendptr + self.sock.send(str[sendptr:])
def send(self, str): """Send `str' to the server.""" if self.debuglevel > 0: print 'send:', `str` if self.sock: try: self.sock.send(str) except socket.error: raise SMTPServerDisconnected('Server not connected') else: raise SMTPServerDisconnected('please run connect() first')
ee42fbe23c78c345abc1d3626baa225d436ec848 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ee42fbe23c78c345abc1d3626baa225d436ec848/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 609, 4672, 3536, 3826, 1375, 701, 11, 358, 326, 1438, 12123, 309, 365, 18, 4148, 2815, 405, 374, 30, 1172, 296, 4661, 30, 2187, 1375, 701, 68, 309, 365, 18, 15031, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 609, 4672, 3536, 3826, 1375, 701, 11, 358, 326, 1438, 12123, 309, 365, 18, 4148, 2815, 405, 374, 30, 1172, 296, 4661, 30, 2187, 1375, 701, 68, 309, 365, 18, 15031, ...
if method: method(self) else:
try: getattr(self, '_pkt_' + pkt_type)() except AttributeError:
def __read_response(self): # # Read a single response from the backend # Looks at the next byte, and calls a more specific # method the handle the rest of the response # # PostgreSQL responses begin with a single character <c>, this # method looks up a method named _pkt_<c> and calls that # to handle the response # pkt_type = self.__read_bytes(1)
15eb9e7027130fcea48d0efc84f51a100e3256c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1238/15eb9e7027130fcea48d0efc84f51a100e3256c8/bpgsql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 2740, 12, 2890, 4672, 468, 468, 2720, 279, 2202, 766, 628, 326, 4221, 468, 225, 10176, 87, 622, 326, 1024, 1160, 16, 471, 4097, 279, 1898, 2923, 468, 225, 707, 326, 1640...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 67, 2740, 12, 2890, 4672, 468, 468, 2720, 279, 2202, 766, 628, 326, 4221, 468, 225, 10176, 87, 622, 326, 1024, 1160, 16, 471, 4097, 279, 1898, 2923, 468, 225, 707, 326, 1640...
OUTPUT: - matrix over QQ
OUTPUT: matrix over `\\QQ`
def basis_matrix(self): """ Return basis matrix `M` in Hermite normal form for self as a matrix with rational entries.
b7a16ed05ab1759a61c3840607275d6cd5b220a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b7a16ed05ab1759a61c3840607275d6cd5b220a1/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10853, 67, 5667, 12, 2890, 4672, 3536, 2000, 10853, 3148, 1375, 49, 68, 316, 670, 1035, 1137, 2212, 646, 364, 365, 487, 279, 3148, 598, 436, 8371, 3222, 18, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 10853, 67, 5667, 12, 2890, 4672, 3536, 2000, 10853, 3148, 1375, 49, 68, 316, 670, 1035, 1137, 2212, 646, 364, 365, 487, 279, 3148, 598, 436, 8371, 3222, 18, 2, -100, -100, -100, -100, ...
"debuginstall": (debuginstall, []),
"debuginstall": (debuginstall, [], ''),
def version_(ui): """output version and copyright information""" ui.write(_("Mercurial Distributed SCM (version %s)\n") % util.version()) ui.status(_( "\nCopyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others\n" "This is free software; see the source for copying conditions. " "There is NO\nwarranty; " "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" ))
e6251eb3d04dd08d6aafb8d43832c0d8a6bb1288 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/e6251eb3d04dd08d6aafb8d43832c0d8a6bb1288/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1177, 67, 12, 4881, 4672, 3536, 2844, 1177, 471, 22245, 1779, 8395, 5915, 18, 2626, 24899, 2932, 8478, 1397, 649, 27877, 8795, 49, 261, 1589, 738, 87, 5153, 82, 7923, 738, 1709, 18, 1589...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1177, 67, 12, 4881, 4672, 3536, 2844, 1177, 471, 22245, 1779, 8395, 5915, 18, 2626, 24899, 2932, 8478, 1397, 649, 27877, 8795, 49, 261, 1589, 738, 87, 5153, 82, 7923, 738, 1709, 18, 1589...
self.assertTrue('Please log in' in self.browser.contents)
self.assertTrue('Login Name' in self.browser.contents)
def test_unauthenticated(self): ''' unauthenticated users do not have the necessary permissions to view the review list ''' self.browser.open('http://nohost/plone/full_review_list') self.assertTrue('Please log in' in self.browser.contents)
368c3db384a4e7283e0ed43d722155a3a003bcad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12237/368c3db384a4e7283e0ed43d722155a3a003bcad/test_reviewlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 14454, 12, 2890, 4672, 9163, 640, 14454, 3677, 741, 486, 1240, 326, 4573, 4371, 358, 1476, 326, 10725, 666, 9163, 365, 18, 11213, 18, 3190, 2668, 2505, 2207, 2135, 2564, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 14454, 12, 2890, 4672, 9163, 640, 14454, 3677, 741, 486, 1240, 326, 4573, 4371, 358, 1476, 326, 10725, 666, 9163, 365, 18, 11213, 18, 3190, 2668, 2505, 2207, 2135, 2564, 1...
resizable_height += self.spacing
if resizable_height != inner_height: resizable_height += self.spacing
def do_get_preferred_width(self, for_height): inner_height = for_height - 2*self.border preferred_width = 0 if self._horizontal is False: #find size available for resizable elements resizable_elements = list() resizable_height = inner_height for element in self.elements: if element.get('resizable', 0) != 0: if element['resizable'] > 1: element['resizable'] = 1 elif element['resizable'] < 0: element['resizable'] = 0 resizable_elements.append(element) else: resizable_height -= element['object'].get_preferred_size()[3] resizable_height -= self.spacing resizable_height += self.spacing #find resizable elements who will bypass box size for element in self.elements: obj_width = element['object'].get_preferred_size()[2] used_width = obj_width if element.get('resizable', 0) != 0: original_height = element['object'].get_preferred_size()[3] if element.get('keep_ratio') is True and original_height != 0 and for_height != -1: obj_height = element['resizable'] * resizable_height factor = float(obj_height)/float(original_height) used_width = int(obj_width*factor) preferred_width = max(preferred_width, used_width) else: for element in self.elements: obj_width = element['object'].get_preferred_size()[2] used_width = obj_width if element.get('keep_ratio') is True and obj_width != 0 and element.get('expand') is True and for_height != -1: obj_height = element['object'].get_preferred_size()[3] ratio = float(obj_width) / float(obj_height) used_width = int(inner_height * ratio) preferred_width += used_width + self.spacing if preferred_width != 0: preferred_width -= self.spacing preferred_width += 2*self.border return preferred_width, preferred_width
ea56ae78d261300805eb0ec1a0e6760b7ba6d3a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5279/ea56ae78d261300805eb0ec1a0e6760b7ba6d3a9/box.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 588, 67, 23616, 67, 2819, 12, 2890, 16, 364, 67, 4210, 4672, 3443, 67, 4210, 273, 364, 67, 4210, 300, 576, 14, 2890, 18, 8815, 9119, 67, 2819, 273, 374, 309, 365, 6315, 1839...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 23616, 67, 2819, 12, 2890, 16, 364, 67, 4210, 4672, 3443, 67, 4210, 273, 364, 67, 4210, 300, 576, 14, 2890, 18, 8815, 9119, 67, 2819, 273, 374, 309, 365, 6315, 1839...
datafile_re = re.compile('.*\.(pt|js|png|gif|css|mo|rng|xml|zcml|pot|po)\Z')
datafile_re = re.compile(r'.*\.(pt|js|png|gif|css|mo|rng|xml|zcml|pot|po)\Z')
def setup(**kwargs): if kwargs.has_key("classifiers"): del kwargs["classifiers"] _setup(**kwargs)
82bf642178d9bbed43f5e4f85d6a2e14f77b4e29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/82bf642178d9bbed43f5e4f85d6a2e14f77b4e29/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 636, 4333, 4672, 309, 1205, 18, 5332, 67, 856, 2932, 1106, 3383, 6, 4672, 1464, 1205, 9614, 1106, 3383, 11929, 389, 8401, 12, 636, 4333, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 3875, 12, 636, 4333, 4672, 309, 1205, 18, 5332, 67, 856, 2932, 1106, 3383, 6, 4672, 1464, 1205, 9614, 1106, 3383, 11929, 389, 8401, 12, 636, 4333, 13, 2, -100, -100, -100, -100, -100, ...
sage: f(t) = function('f',t) sage: _laplace_latex_(f(t),t,s)
sage: f = function('f',t) sage: _laplace_latex_(0,f,t,s)
def _laplace_latex_(*args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f(t) = function('f',t) sage: _laplace_latex_(f(t),t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' AUTHORS: - Golam Mortuza Hossain (2009-06-22) """ return "\\mathcal{L}\\left(%s\\right)"%(', '.join([latex(x) for x in args]))
acf862616c491eaa6eff0382681451ce96478191 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/acf862616c491eaa6eff0382681451ce96478191/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11821, 964, 67, 26264, 67, 30857, 1968, 4672, 436, 8395, 2000, 21072, 21575, 60, 2652, 364, 21072, 964, 2510, 434, 279, 16754, 445, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11821, 964, 67, 26264, 67, 30857, 1968, 4672, 436, 8395, 2000, 21072, 21575, 60, 2652, 364, 21072, 964, 2510, 434, 279, 16754, 445, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, ...
collection.getItemDisplayName()) +
linkText) +
def formatCollection(self, collection, childstring): result = ('<div class="set-item">\n' ' <div class="set-title">' + ' <a href="%s" title="%s">%s</a>' % ( toLink(collection.itsPath), collection.__class__.__name__, collection.getItemDisplayName()) + ' </div>\n' + ' <div class="set-box">' + childstring + '</div>\n' '</div>\n') return result
d79d79cf16dfec42b5d0b75a63906dd177104add /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d79d79cf16dfec42b5d0b75a63906dd177104add/repo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 2532, 12, 2890, 16, 1849, 16, 1151, 1080, 4672, 563, 273, 7707, 32, 2892, 667, 1546, 542, 17, 1726, 6, 5333, 82, 11, 296, 225, 411, 2892, 667, 1546, 542, 17, 2649, 7918, 397, 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, 740, 2532, 12, 2890, 16, 1849, 16, 1151, 1080, 4672, 563, 273, 7707, 32, 2892, 667, 1546, 542, 17, 1726, 6, 5333, 82, 11, 296, 225, 411, 2892, 667, 1546, 542, 17, 2649, 7918, 397, 29...
if fields[1]:
if fields[1]:
def parseProxy(proxy=None,option=None): """ This function is parsing a grid X509 proxy and returns the proxy time left in seconds, DN, Subject or Issuer according to option values. @type proxy: string or file name @param proxy: string containing the proxy or proxy file name @type option: string @param option: the proxy parameter to be returned. If not given, a dictionary with all the available parameters is returned. Possible values are: "TimeLeft","DN","Subject","Issuer". """ temp_proxy_file="" if proxy: if os.path.exists(proxy): cmd = "openssl x509 -noout -text -in %s" % proxy else: # Create temporary proxy file, do not forget to remove it before leaving temp_proxy_file = __makeProxyFile(proxy) cmd = "openssl x509 -noout -text -in %s" % temp_proxy_file else: proxy_file = getActiveGridProxy() cmd = "openssl x509 -noout -text -in %s" % proxy_file result = shellCall(PROXY_COMMAND_TIMEOUT,cmd) if temp_proxy_file: os.remove(temp_proxy_file) if not result['OK']: return S_ERROR('OpenSSL call failed') status,output,error = result['Value'] if status != 0 : return S_ERROR('Failed to execute command. Cmd: %s; StdOut: %s; StdErr: %s' % (cmd,output,error)) text_lines = output.split("\n") proxyDict = {} for line in text_lines: fields = line.split(":") if len(fields) < 5 and len(fields) > 1: item = fields[0].strip() if item == "Not After": ind = line.find(':') date = line[ind+1:].strip() date1 = time.strptime(date,"%b %d %H:%M:%S %Y %Z") date2 = time.gmtime() diff = time.mktime(date1) - time.mktime(date2) if diff <= 0: proxyDict['TimeLeft'] = 0 else: proxyDict['TimeLeft'] = diff if item == "Subject": subject = fields[1].replace(", ","/").strip() proxyDict['Subject'] = subject # Assume full legacy proxy # This should be updated with more modern proxy types #DN = subject.replace('/CN=proxy','').replace('/CN=limited proxy','') DN = subject cn_list = re.findall('/CN=proxy|/CN=limited proxy|/CN=[0-9]+',DN) for cn in cn_list: DN = DN.replace(cn,'') proxyDict['DN'] = DN if item == "Issuer": issuer = fields[1].replace(", ","/").strip() proxyDict['Issuer'] = issuer if item == "Serial Number": if fields[1]: serial = int(fields[1].split()[0]) else: serial = 0 proxyDict['Serial'] = serial if option: try: value = proxyDict[option] return S_OK(value) except KeyValue: return S_ERROR('Illegal option '+option) else: return S_OK(proxyDict)
2e16b51beb0514385f39b1f9bc35e7bd56d5f66c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/2e16b51beb0514385f39b1f9bc35e7bd56d5f66c/GridCredentials.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3886, 12, 5656, 33, 7036, 16, 3482, 33, 7036, 4672, 3536, 1220, 445, 353, 5811, 279, 3068, 1139, 5995, 2889, 471, 1135, 326, 2889, 813, 2002, 316, 3974, 16, 18001, 16, 9912, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3886, 12, 5656, 33, 7036, 16, 3482, 33, 7036, 4672, 3536, 1220, 445, 353, 5811, 279, 3068, 1139, 5995, 2889, 471, 1135, 326, 2889, 813, 2002, 316, 3974, 16, 18001, 16, 9912, 578, ...
showTip = conf.getint('tips', 'showonstartup')
showTip = conf.getboolean('tips', 'showonstartup')
def showTip(frame, forceShow=0): """ Displays tip of the day. Driven from and updates config file """ try: conf = createAndReadConfig('Explorer') except IOError: conf = None showTip, index = (1, 0) else: showTip = conf.getint('tips', 'showonstartup') index = conf.getint('tips', 'tipindex') if showTip or forceShow: tp = wx.CreateFileTipProvider(toPyPath('Docs/tips.txt'), index) showTip = wx.ShowTip(frame, tp, showTip) index = tp.GetCurrentTip() if conf: conf.set('tips', 'showonstartup', int(showTip)) conf.set('tips', 'tipindex', index) try: writeConfig(conf) except IOError: wx.LogError('Could not edit tips settings, please make ' 'sure that the Explorer.*.cfg file is not read only and you ' 'have sufficient priviledges to write to this file.')
2880a79b57fa42c3ae86a32a9f44503e1df55435 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2880a79b57fa42c3ae86a32a9f44503e1df55435/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 14189, 12, 3789, 16, 2944, 5706, 33, 20, 4672, 3536, 9311, 87, 9529, 434, 326, 2548, 18, 225, 11473, 837, 628, 471, 4533, 642, 585, 3536, 775, 30, 2195, 273, 30545, 1994, 809, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 14189, 12, 3789, 16, 2944, 5706, 33, 20, 4672, 3536, 9311, 87, 9529, 434, 326, 2548, 18, 225, 11473, 837, 628, 471, 4533, 642, 585, 3536, 775, 30, 2195, 273, 30545, 1994, 809, 26...
- `bound` (int, default -1) -- Use `-1` (the default) to
- ``bound`` (int, default -1) -- Use `-1` (the default) to
def saturate(self, bound=-1): """ Compute the saturation of the Mordell-Weil group at all primes up to bound.
9932a677a12413086a59217c4c0d425b0543b6eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/9932a677a12413086a59217c4c0d425b0543b6eb/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5942, 295, 340, 12, 2890, 16, 2489, 29711, 21, 4672, 3536, 8155, 326, 22824, 434, 326, 490, 517, 1165, 17, 3218, 330, 1041, 622, 777, 846, 4485, 731, 358, 2489, 18, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5942, 295, 340, 12, 2890, 16, 2489, 29711, 21, 4672, 3536, 8155, 326, 22824, 434, 326, 490, 517, 1165, 17, 3218, 330, 1041, 622, 777, 846, 4485, 731, 358, 2489, 18, 2, -100, -100, -100...
warning_level = warning
global warnings_leve, exception_level warnings_level = warning
def setDeprecationLevel(warning=1, exception=None): """ Set the deprecation level for SQLObject. Low levels are more actively being deprecated. Any warning at a level at or below ``warning`` will give a warning. Any warning at a level at or below ``exception`` will give an exception. You can use a higher ``exception`` level for tests to help upgrade your code. ``None`` for either value means never warn or raise exceptions. The levels currently mean: 1) Deprecated in current version (0.7). Will be removed in next version (0.8) 2) Planned to deprecate in next version, remove later. 3) Planned to deprecate sometime, remove sometime much later ;) As the SQLObject versions progress, the deprecation level of specific features will go down, indicating the advancing nature of the feature's doom. We'll try to keep features at 1 for a major revision. As time continues there may be a level 0, which will give a useful error message (better than ``AttributeError``) but where the feature has been fully removed. """ warning_level = warning exception_level = exception
0004a65377d252d7027eacf759525e6b872b218f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/0004a65377d252d7027eacf759525e6b872b218f/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 758, 13643, 2355, 12, 8551, 33, 21, 16, 1520, 33, 7036, 4672, 3536, 1000, 326, 20097, 1801, 364, 3063, 921, 18, 225, 23629, 7575, 854, 1898, 1328, 4492, 3832, 6849, 18, 225, 5502, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 758, 13643, 2355, 12, 8551, 33, 21, 16, 1520, 33, 7036, 4672, 3536, 1000, 326, 20097, 1801, 364, 3063, 921, 18, 225, 23629, 7575, 854, 1898, 1328, 4492, 3832, 6849, 18, 225, 5502, ...
return super(Party, self).copy(cursor, user, ids, default=default, context=context)
default['addresses'] = False new_ids = [] for party in self.browse(cursor, user, ids, context=context): new_id = super(Party, self).copy(cursor, user, party.id, default=default, context=context) address_obj.copy(cursor, user, [x.id for x in party.addresses], default={ 'party': new_id, }, context=context) new_ids.append(new_id) if int_id: return new_ids[0] return new_ids
def copy(self, cursor, user, ids, default=None, context=None): if default is None: default = {} default = default.copy() default['code'] = False return super(Party, self).copy(cursor, user, ids, default=default, context=context)
0094ef4057abf43fd5f27b5d426a0620b14a419b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9269/0094ef4057abf43fd5f27b5d426a0620b14a419b/party.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 309, 805, 353, 599, 30, 805, 273, 2618, 805, 273, 805, 18, 3530, 1435, 805, 3292, 710, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 309, 805, 353, 599, 30, 805, 273, 2618, 805, 273, 805, 18, 3530, 1435, 805, 3292, 710, 3546, ...
Result: An integer value representing the new run_id or a dictionary containing values for the keys, "faultcode" and "faultstring".
Result: An integer value representing the new run_id
def testrun_create(self, build_id, environment_id, manager_id, plan_id, plan_text_version, summary, notes=None, product_version=None): """Create A New TestRun.
83012e559756373ef19add9ed3d26f1bf779a22c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/231/83012e559756373ef19add9ed3d26f1bf779a22c/testopia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 281, 313, 318, 67, 2640, 12, 2890, 16, 1361, 67, 350, 16, 3330, 67, 350, 16, 3301, 67, 350, 16, 4995, 67, 350, 16, 4995, 67, 955, 67, 1589, 16, 4916, 16, 10913, 33, 7036, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 281, 313, 318, 67, 2640, 12, 2890, 16, 1361, 67, 350, 16, 3330, 67, 350, 16, 3301, 67, 350, 16, 4995, 67, 350, 16, 4995, 67, 955, 67, 1589, 16, 4916, 16, 10913, 33, 7036, 16, ...
def __init__(self, title): Statistic.__init__(self, title)
def __init__(self, name, title): Statistic.__init__(self, name, title)
def __init__(self, title): Statistic.__init__(self, title)
b8888de85047fe93273e5989b691f6b75032d60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2516/b8888de85047fe93273e5989b691f6b75032d60e/msvnstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2077, 4672, 8269, 5846, 16186, 2738, 972, 12, 2890, 16, 508, 16, 2077, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2077, 4672, 8269, 5846, 16186, 2738, 972, 12, 2890, 16, 508, 16, 2077, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
OWGUI.separator(db)
def __init__(self,parent=None, signalManager = None): OWWidget.__init__(self, parent, signalManager, "FeatureConstructor")
c15d76d03c013a0bb3999b55edf085b6ef401de6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/c15d76d03c013a0bb3999b55edf085b6ef401de6/OWFeatureConstructor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 315, 4595, 6293, 7923, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 315, 4595, 6293, 7923, 2, -100, -10...
if loud: print " Reading as Maildir"
if loud: print " Reading %s as Maildir" % (path,)
def maildir_train(h, path, is_spam, force): """Train bayes with all messages from a maildir.""" if loud: print " Reading as Maildir" import time import socket pid = os.getpid() host = socket.gethostname() counter = 0 trained = 0 for fn in os.listdir(path): counter += 1 cfn = os.path.join(path, fn) tfn = os.path.normpath(os.path.join(path, "..", "tmp", "%d.%d_%d.%s" % (time.time(), pid, counter, host))) if loud: sys.stdout.write(" %s \r" % fn) sys.stdout.flush() f = file(cfn, "rb") msg = mboxutils.get_message(f) f.close() if not msg_train(h, msg, is_spam, force): continue trained += 1 f = file(tfn, "wb") f.write(msg.as_string()) f.close() # XXX: This will raise an exception on Windows. Do any Windows # people actually use Maildirs? os.rename(tfn, cfn) if loud: print (" Trained %d out of %d messages " % (trained, counter))
0927af8f2c4fb18ef58c0b4fef71b468f866dfb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/0927af8f2c4fb18ef58c0b4fef71b468f866dfb6/mboxtrain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10843, 545, 481, 67, 9754, 12, 76, 16, 589, 16, 353, 67, 1752, 301, 16, 2944, 4672, 3536, 23419, 324, 528, 281, 598, 777, 2743, 628, 279, 10843, 545, 481, 12123, 225, 309, 437, 1100, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10843, 545, 481, 67, 9754, 12, 76, 16, 589, 16, 353, 67, 1752, 301, 16, 2944, 4672, 3536, 23419, 324, 528, 281, 598, 777, 2743, 628, 279, 10843, 545, 481, 12123, 225, 309, 437, 1100, ...
reutrn get_message_from_template("messages", name, *args)
return get_message_from_template("messages", name, *args)
def get_message(name, *args): """Return message with given name from messages.tmpl template""" reutrn get_message_from_template("messages", name, *args)
b07a5c4e08db676e3d992962fbcc4c9d707fd769 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/b07a5c4e08db676e3d992962fbcc4c9d707fd769/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2150, 12, 529, 16, 380, 1968, 4672, 3536, 990, 883, 598, 864, 508, 628, 2743, 18, 24717, 1542, 8395, 327, 336, 67, 2150, 67, 2080, 67, 3202, 2932, 6833, 3113, 508, 16, 380, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2150, 12, 529, 16, 380, 1968, 4672, 3536, 990, 883, 598, 864, 508, 628, 2743, 18, 24717, 1542, 8395, 327, 336, 67, 2150, 67, 2080, 67, 3202, 2932, 6833, 3113, 508, 16, 380, ...
def test_unicode_nfc_and_nfd_decomposition_equality(self): text = u'Hyv\xe4' assert_equals(unic(unicodedata.normalize('NFC', text)), text) assert_equals(unic(unicodedata.normalize('NFD', text)), text)
if not is_jython: def test_unicode_nfc_and_nfd_decomposition_equality(self): text = u'Hyv\xe4' assert_equals(unic(unicodedata.normalize('NFC', text)), text) assert_equals(unic(unicodedata.normalize('NFD', text)), text)
def test_unicode_nfc_and_nfd_decomposition_equality(self): text = u'Hyv\xe4' assert_equals(unic(unicodedata.normalize('NFC', text)), text) # In Mac filesystem umlaut characters are presented in NFD-format. # This is to check that unic normalizes all strings to NFC assert_equals(unic(unicodedata.normalize('NFD', text)), text)
ac1180e55c073ded267c2b31bebb6c14ab797704 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/ac1180e55c073ded267c2b31bebb6c14ab797704/test_unic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9124, 67, 82, 7142, 67, 464, 67, 82, 8313, 67, 323, 24388, 67, 9729, 560, 12, 2890, 4672, 977, 273, 582, 11, 17507, 90, 64, 6554, 24, 11, 1815, 67, 14963, 12, 318, 335, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9124, 67, 82, 7142, 67, 464, 67, 82, 8313, 67, 323, 24388, 67, 9729, 560, 12, 2890, 4672, 977, 273, 582, 11, 17507, 90, 64, 6554, 24, 11, 1815, 67, 14963, 12, 318, 335, 1...
rational arithmetic to calculate the matrix of the U operator and its
rational arithmetic to calculate the matrix of the `U` operator and its
def eigenfunctions(self, n, F = None, exact_arith=True): """ Calculate approximations to eigenfunctions of self. These are the eigenfunctions of self.hecke_matrix(p, n), which are approximations to the true eigenfunctions. Returns a list of OverconvergentModularFormElement objects, in increasing order of slope.
d7c9d61652cabcfb658c91a720989214f7a469bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d7c9d61652cabcfb658c91a720989214f7a469bd/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16719, 10722, 12, 2890, 16, 290, 16, 478, 273, 599, 16, 5565, 67, 297, 483, 33, 5510, 4672, 3536, 9029, 26962, 1012, 358, 16719, 10722, 434, 365, 18, 8646, 854, 326, 16719, 10722, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16719, 10722, 12, 2890, 16, 290, 16, 478, 273, 599, 16, 5565, 67, 297, 483, 33, 5510, 4672, 3536, 9029, 26962, 1012, 358, 16719, 10722, 434, 365, 18, 8646, 854, 326, 16719, 10722, 434, ...
this = apply(_quickfix.new_DuplicateFieldNumber, args)
this = _quickfix.new_DuplicateFieldNumber(*args)
def __init__(self, *args): this = apply(_quickfix.new_DuplicateFieldNumber, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 11826, 974, 1854, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 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, 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, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 11826, 974, 1854, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
self.resultbuffer1.insert(self.resultbuffer1.get_end_iter(), '%s:' % fromLangTemp) front = self.resultbuffer1.get_iter_at_mark(self.resultbuffer1.get_insert())
buf.insert(buf.get_end_iter(), '%s:' % (fromLangTemp,)) front = buf.get_iter_at_mark(buf.get_insert())
def enter_callback(self, widget, data = None): '''Submit entrybox text for translation.'''
882d67c8fe0f86c4b7052562c51b41df492db552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9947/882d67c8fe0f86c4b7052562c51b41df492db552/traduisons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 67, 3394, 12, 2890, 16, 3604, 16, 501, 273, 599, 4672, 9163, 11620, 1241, 2147, 977, 364, 4794, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 67, 3394, 12, 2890, 16, 3604, 16, 501, 273, 599, 4672, 9163, 11620, 1241, 2147, 977, 364, 4794, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
raise ParseError()
raise ParseError("Bad base list")
def parse_classdef_bases(elt): """ If the given tree token element contains a valid base list (that contains only dotted names), then return a corresponding list of L{DottedName}s. Otherwise, raise a ParseError. @bug: Does not handle either of:: - class A( (base.in.parens) ): pass - class B( (lambda:calculated.base)() ): pass """ if (not isinstance(elt, list) or elt[0] != (token.OP, '(')): raise ParseError() return [parse_dotted_name(n) for n in split_on(elt[1:-1], (token.OP, ','))]
a3ef0fa18cbe7a3bcd10dd7313809fd187cded40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/a3ef0fa18cbe7a3bcd10dd7313809fd187cded40/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1106, 536, 67, 18602, 12, 20224, 4672, 3536, 971, 326, 864, 2151, 1147, 930, 1914, 279, 923, 1026, 666, 261, 19056, 1914, 1338, 20965, 1257, 3631, 1508, 327, 279, 4656, 666, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1106, 536, 67, 18602, 12, 20224, 4672, 3536, 971, 326, 864, 2151, 1147, 930, 1914, 279, 923, 1026, 666, 261, 19056, 1914, 1338, 20965, 1257, 3631, 1508, 327, 279, 4656, 666, 43...
rect_box.x1 = base_x + 0 rect_box.y1 = base_y + 0
rect_box.x1 = base_x rect_box.y1 = base_y
def _allocate_rect(self, base_x, base_y, width, height, flags): rect_box = clutter.ActorBox() rect_box.x1 = base_x + 0 rect_box.y1 = base_y + 0 rect_box.x2 = base_x + width rect_box.y2 = base_y + height self.rect.allocate(rect_box, flags)
396c70e19554ff464786325fbd4b049f2ed3c3a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5279/396c70e19554ff464786325fbd4b049f2ed3c3a7/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16247, 67, 2607, 12, 2890, 16, 1026, 67, 92, 16, 1026, 67, 93, 16, 1835, 16, 2072, 16, 2943, 4672, 4917, 67, 2147, 273, 927, 18220, 18, 17876, 3514, 1435, 4917, 67, 2147, 18, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16247, 67, 2607, 12, 2890, 16, 1026, 67, 92, 16, 1026, 67, 93, 16, 1835, 16, 2072, 16, 2943, 4672, 4917, 67, 2147, 273, 927, 18220, 18, 17876, 3514, 1435, 4917, 67, 2147, 18, 92...
self.logger.debug('Added task %s', task)
self.logger.debug('Added task (%i tasks queued)', self.queue.qsize())
def add_task(self, task): """ Add a task to the queue """ self.logger.debug('Added task %s', task) if self.hung_check_period: self.requests_since_last_hung_check += 1 if self.requests_since_last_hung_check > self.hung_check_period: self.requests_since_last_hung_check = 0 self.logger.info('Calling periodic kill_hung_threads()') self.kill_hung_threads() if not self.idle_workers and self.spawn_if_under: # spawn_if_under can come into effect... busy = 0 now = time.time() self.logger.debug('No idle workers for task; checking if we need to make more workers') for worker in self.workers: if not hasattr(worker, 'thread_id'): # Not initialized continue if worker.thread_id in self.worker_tracker: time_started, info = self.worker_tracker[worker.thread_id] if now - time_started < self.hung_thread_limit: busy += 1 if busy < self.spawn_if_under: self.logger.info( 'No idle tasks, and only %s busy tasks; adding %s more ' 'workers', busy, self.spawn_if_under-busy) self._last_added_new_idle_workers = time.time() for i in range(self.spawn_if_under - busy): self.add_worker_thread() else: self.logger.debug( 'No extra workers needed (%s busy workers)', busy) if (len(self.workers) > self.nworkers and len(self.idle_workers) > 3 and time.time()-self._last_added_new_idle_workers > self.hung_thread_limit): # We've spawned worers in the past, but they aren't needed # anymore; kill off some self.logger.info( 'Culling %s extra workers (%s idle workers present)', len(self.workers)-self.nworkers, len(self.idle_workers)) for i in range(len(self.workers) - self.nworkers): self.queue.put(self.SHUTDOWN) self.queue.put(task)
1a4a60600040d9f61e5bc617f380ebf3b4a36acf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11400/1a4a60600040d9f61e5bc617f380ebf3b4a36acf/httpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4146, 12, 2890, 16, 1562, 4672, 3536, 1436, 279, 1562, 358, 326, 2389, 3536, 365, 18, 4901, 18, 4148, 2668, 8602, 1562, 6142, 77, 4592, 12234, 13, 2187, 365, 18, 4000, 18, 85,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4146, 12, 2890, 16, 1562, 4672, 3536, 1436, 279, 1562, 358, 326, 2389, 3536, 365, 18, 4901, 18, 4148, 2668, 8602, 1562, 6142, 77, 4592, 12234, 13, 2187, 365, 18, 4000, 18, 85,...
a = AssemblerMk + " " + fullpath + " -o " + BootDir + "/" + Object
a = Assembler + " " + fullpath + " -o " + BootDir + "/" + Object
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32_VMS": CCompiler = "CCompiler" CCompilerFlags = " " elif Config == "ALPHA64_VMS": CCompiler = "CCompiler" CCompilerFlags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": CCompiler = "/usr/bin/CCompiler" CCompilerFlags = "-g -mt -xldscope=symbolic " else: # gcc platforms CCompiler = { "SOLgnu" : "/usr/sfw/bin/gcc", }.get(Config) or "gcc" CCompilerFlags = { "I386_INTERIX" : "-g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " CCompilerFlags = CCompilerFlags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "I386_LINUX" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", "SOLsun" : " -xarch=v8plus -xcode=pic32 ", "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = "$(CC) $(CFLAGS) *.mo *.io *.o " # link flags if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # add -c to compiler but not link (i.e. not CCompilerFlags) Compile = "$(CC) $(CFLAGS) " if not StringTagged(Config, "VMS"): Compile = Compile + " -c " AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget # pick assembler AssemblerFlags = " " if StringTagged(Target, "VMS") and AssembleOnTarget: AssemblerMk = "macro" # not right, come back to it later AssemblerSh = "macro" # not right, come back to it later AssemblerFlags = "/alpha " # not right, come back to it later elif Target == "I386_SOLARIS" or Target == "AMD64_SOLARIS": # # see http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html # see http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 # a = (" if test -x /usr/sfw/bin/gas ; then echo /usr/sfw/bin/gas ; \\\n" + " elif test -x /opt/csw/gnu/as ; then echo /opt/csw/gnu/as ; \\\n" + " else echo \"unable to find GNU assembler\" ; fi") AssemblerMk = "$(shell " + a + ")" AssemblerSh = "`" + a + "`" elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): AssemblerMk = "/usr/ccs/bin/as" AssemblerSh = "/usr/ccs/bin/as" else: AssemblerMk = "as" AssemblerSh = "as" # set assembler flags if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32")): AssemblerFlags = AssemblerFlags + " --64" else: AssemblerFlags = AssemblerFlags + " --32" AssemblerFlags = (AssemblerFlags + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", # -s puts symbols where linker won't automatically strip them "I386_SOLARIS" : " -s ", "AMD64_SOLARIS" : " -s -xarch=amd64 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: CCompiler = GnuPlatformPrefix + CCompiler Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: AssemblerMk = GnuPlatformPrefix + AssemblerMk AssemblerSh = GnuPlatformPrefix + AssemblerSh # # squeeze runs of spaces and spaces at ends # CCompilerFlags = re.sub(" +", " ", CCompilerFlags) CCompilerFlags = re.sub(" +$", "", CCompilerFlags) CCompilerFlags = re.sub("^ +", "", CCompilerFlags) Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) AssemblerFlags = re.sub(" +", " ", AssemblerFlags) AssemblerFlags = re.sub(" +$", "", AssemblerFlags) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") VmsLink = open(os.path.join(BootDir, "vmslink.opt"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = { } Makefile.write(".SUFFIXES:\n" + ".SUFFIXES: .c .is .ms .s .o .obj .io .mo\n\n" + "all: cm3\n\n" + "clean:\n" + "\trm -rf *.io *.mo *.o *.obj\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\n" + "set -e\n" + "set -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n" + "CC ?= " + CCompiler + "\n" + "CFLAGS ?= " + CCompilerFlags + "\n" + "Compile=" + Compile + "\n" + "Assemble=" + AssemblerMk + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for a in [Make]: a.write("# edit up here\n\n" + "CC=${CC:-" + CCompiler + "}\n" + "CFLAGS=${CFLAGS:-" + CCompilerFlags + "}\n" + "Compile=" + Compile + "\n" + "Assemble=" + AssemblerSh + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".is") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or AssembleOnTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) if Objects.get(Object): continue Objects[Object] = 1 if ext_c: VmsMake.write("$ " + Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = AssemblerMk + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write("$ " + AssemblerMk + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") Makefile.write(".c.o:\n" + "\t$(Compile) -o $@ $<\n\n" + ".c.obj:\n" + "\t$(Compile) -o $@ $<\n\n" + ".is.io:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".s.o:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".ms.mo:\n" + "\t$(Assemble) -o $@ $<\n\n") Makefile.write("cm3:") Objects = Objects.keys() Objects.sort() k = 4 for a in Objects: k = k + 1 + len(a) if k > 76: # line wrap Makefile.write(" \\\n") k = 1 + len(a) Makefile.write(" " + a) Makefile.write("\n\t") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.o\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.obj\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.mo\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.io\n") VmsMake.write("$ link /executable=cm3.exe vmslink/options\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() if vms or StringTagged(Config, "NT") or Config == "NT386": _MakeZip(BootDir[2:]) else: _MakeTGZ(BootDir[2:])
d914ba405ba7a2127bb1b90ea294618a40d4c8bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/d914ba405ba7a2127bb1b90ea294618a40d4c8bb/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 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, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
raise ScanError('Unable to scan stream')
raise ConnectionError('Unable to scan stream')
def scan_stream(self, buffer): """ Scan a buffer
bef3518a3bfa5e86c06cb84c8b0244be7487803a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8077/bef3518a3bfa5e86c06cb84c8b0244be7487803a/pyclamd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 3256, 12, 2890, 16, 1613, 4672, 3536, 8361, 279, 1613, 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, 4135, 67, 3256, 12, 2890, 16, 1613, 4672, 3536, 8361, 279, 1613, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
document.body[i] = document.body[i].replace('\\begin_inset Space \\rightarrowfill{}', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'rightarrowfill{}\n\\end_layout\n\n\\end_inset\n\n')
subst = document.body[i].replace('\\begin_inset Space \\rightarrowfill{}', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'rightarrowfill{}\n\\end_layout\n\n\\end_inset\n\n') subst = subst.split('\n') document.body[i : i+1] = subst i += len(subst)
def revert_rightarrowfill(document): ' Revert \\begin_inset Space \\rightarrowfill{} to ERT ' i = 0 while True: i = find_token(document.body, '\\begin_inset Space \\rightarrowfill{}', i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of space inset.") continue del document.body[j] document.body[i] = document.body[i].replace('\\begin_inset Space \\rightarrowfill{}', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'rightarrowfill{}\n\\end_layout\n\n\\end_inset\n\n')
a97fbaa6858229f4bef56786ffb07688ef5a4d82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/a97fbaa6858229f4bef56786ffb07688ef5a4d82/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 4083, 7815, 5935, 12, 5457, 4672, 296, 868, 1097, 1736, 10086, 67, 267, 542, 14059, 1736, 4083, 7815, 5935, 2916, 358, 4232, 56, 296, 277, 273, 374, 1323, 1053, 30, 277, 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, 15226, 67, 4083, 7815, 5935, 12, 5457, 4672, 296, 868, 1097, 1736, 10086, 67, 267, 542, 14059, 1736, 4083, 7815, 5935, 2916, 358, 4232, 56, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, ...
stderr = run_command(code % 1)
stderr = run_command(code % "gc.DEBUG_UNCOLLECTABLE")
def run_command(code): p = subprocess.Popen([sys.executable, "-c", code], stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() self.assertEqual(p.returncode, 0) self.assertEqual(stdout.strip(), b"") return strip_python_stderr(stderr)
d29a6f6447bf07946544f6c6a749bb11dcb3c0b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/d29a6f6447bf07946544f6c6a749bb11dcb3c0b6/test_gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3076, 12, 710, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 981, 6487, 3909, 33, 1717, 2567, 18, 27602, 16, 4514, 33, 1717, 2567, 18, 27602,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3076, 12, 710, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 981, 6487, 3909, 33, 1717, 2567, 18, 27602, 16, 4514, 33, 1717, 2567, 18, 27602,...
t = time.time()-int(self.timeout) old_keys = [key for key in self.cache if self.cache[key][1] < t]
t = time.time()-int(self.timeout) old_keys = [key for key in self.cache.keys() if self.cache[key][1] < t]
def cached_result(self2, cr, *args, **kwargs): if time.time()-int(self.timeout) > self.lasttime: self.lasttime = time.time() t = time.time()-int(self.timeout) old_keys = [key for key in self.cache if self.cache[key][1] < t] for key in old_keys: del self.cache[key]
acdabf76518eaaa6d59076453b1f5fa2fbd535c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/acdabf76518eaaa6d59076453b1f5fa2fbd535c0/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3472, 67, 2088, 12, 2890, 22, 16, 4422, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 813, 18, 957, 1435, 17, 474, 12, 2890, 18, 4538, 13, 405, 365, 18, 2722, 957, 30, 365, 18, 2722, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3472, 67, 2088, 12, 2890, 22, 16, 4422, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 813, 18, 957, 1435, 17, 474, 12, 2890, 18, 4538, 13, 405, 365, 18, 2722, 957, 30, 365, 18, 2722, 9...
Inverse of self.phi. INPUT: - ``l`` - a vector in the sense of ``self.is_vector``
The operation `\phi^{-1}` from [MR02]_ or the inverse of ``self.phi``. INPUT: - ``l`` - a vector in the sense of ``self.is_vector``
def antiphi(self, l): """ Inverse of self.phi. INPUT: - ``l`` - a vector in the sense of ``self.is_vector`` EXAMPLE:: sage: sr = mq.SR(gf2=True) sage: A = sr.random_state_array() sage: A [a^3 + a + 1] sage: sr.antiphi(sr.phi(A)) == A True """ e = self.e V = self.k.vector_space()
f145241e51a69266a2640a052ee008637b5d9160 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f145241e51a69266a2640a052ee008637b5d9160/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 392, 14587, 12266, 12, 2890, 16, 328, 4672, 3536, 1021, 1674, 1375, 64, 9973, 66, 95, 17, 21, 11760, 628, 306, 23464, 3103, 65, 67, 578, 326, 8322, 434, 12176, 2890, 18, 9973, 68, 8338...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 392, 14587, 12266, 12, 2890, 16, 328, 4672, 3536, 1021, 1674, 1375, 64, 9973, 66, 95, 17, 21, 11760, 628, 306, 23464, 3103, 65, 67, 578, 326, 8322, 434, 12176, 2890, 18, 9973, 68, 8338...
return (0,temp)
return (2,temp)
def __getstate__(self):
c9109f8e984f28385edfa8cd144687c5d82b83fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/c9109f8e984f28385edfa8cd144687c5d82b83fa/feed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2019, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1001, 588, 2019, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
text = str(QtGui.QApplication.clipboard().text(mode))
text = str(QtGui.QApplication.clipboard().text(mode)).rstrip()
def paste(self, mode=QtGui.QClipboard.Clipboard): """ Paste the contents of the clipboard into the input region.
656368b89a1e2c2fc08f31962db6b17db87eb058 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4217/656368b89a1e2c2fc08f31962db6b17db87eb058/console_widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19401, 12, 2890, 16, 1965, 33, 23310, 18070, 18, 53, 15339, 3752, 18, 15339, 3752, 4672, 3536, 453, 14725, 326, 2939, 434, 326, 20304, 1368, 326, 810, 3020, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19401, 12, 2890, 16, 1965, 33, 23310, 18070, 18, 53, 15339, 3752, 18, 15339, 3752, 4672, 3536, 453, 14725, 326, 2939, 434, 326, 20304, 1368, 326, 810, 3020, 18, 2, -100, -100, -100, -100...
if os.path.isabs(self.target_file._name) and self.target_file._name.startswith(MEDIA_URL): self.target_file._name = self.target_file._name[len(MEDIA_URL):]
if os.path.isabs(self.target_file.name) and self.target_file.name.startswith(MEDIA_URL): self.target_file.name = self.target_file.name[len(MEDIA_URL):]
def delete(self, *args, **kwargs): """ Delete entry; provide hack to fix old absolute-path-storing. """ import os # If needby, strip URL prefix if os.path.isabs(self.target_file._name) and self.target_file._name.startswith(MEDIA_URL): self.target_file._name = self.target_file._name[len(MEDIA_URL):] # In case trailing slash missing if self.target_file._name[0] is '/': self.target_file._name = self.target_file._name[1:] super(Media, self).delete(*args, **kwargs)
81ffe4d3321c4b3e34b534d5502ee26761c8cd7d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/81ffe4d3321c4b3e34b534d5502ee26761c8cd7d/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 2504, 1241, 31, 5615, 11769, 358, 2917, 1592, 4967, 17, 803, 17, 334, 6053, 18, 3536, 1930, 1140, 468, 971, 1608, 1637, 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, 1430, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 2504, 1241, 31, 5615, 11769, 358, 2917, 1592, 4967, 17, 803, 17, 334, 6053, 18, 3536, 1930, 1140, 468, 971, 1608, 1637, 16, 2...
fmt = '<hhqq'
fmt = '<HHQQ'
def FileHeader(self): """Return the per-file header as a string.""" dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) if self.flag_bits & 0x08: # Set these to zero because we write them after the file data CRC = compress_size = file_size = 0 else: CRC = self.CRC compress_size = self.compress_size file_size = self.file_size
bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf02e3bb21b2d75cba4ce409a14ae64dbc2dd6d2/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 1864, 12, 2890, 4672, 3536, 990, 326, 1534, 17, 768, 1446, 487, 279, 533, 12123, 3681, 273, 365, 18, 712, 67, 957, 16153, 712, 273, 261, 7510, 63, 20, 65, 300, 5342, 3672, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1387, 1864, 12, 2890, 4672, 3536, 990, 326, 1534, 17, 768, 1446, 487, 279, 533, 12123, 3681, 273, 365, 18, 712, 67, 957, 16153, 712, 273, 261, 7510, 63, 20, 65, 300, 5342, 3672, 13, ...
for line in open(filename).readlines():
try: lines = open(filename).readlines() except IOError: return for line in lines:
def read_info(self, name): '''read in :info metadata''' self.interpolate = False self.paranoid = False filename = "%s/%s" % (self.repopath, name) for line in open(filename).readlines(): match = self.info.match(line) if not match: if not self.iignore.match(line): logger.warning("Failed to match line: %s"%line) continue else: mgd = match.groupdict() if mgd['owner']: self.metadata['owner'] = mgd['owner'] elif mgd['group']: self.metadata['group'] = mgd['group'] elif mgd['encoding']: self.metadata['encoding'] = mgd['encoding'] elif mgd['perms']: self.metadata['perms'] = mgd['perms'] if len(self.metadata['perms']) == 3: self.metadata['perms'] = "0%s" % (self.metadata['perms']) elif mgd['paranoid'] in ["True", "true"]: self.paranoid = True elif mgd['interpolate'] in ["True", "true"]: self.interpolate = True elif mgd['mtime']: self.metadata['mtime'] = mgd['mtime']
1b53eefe575e63d8995e7fc9065bec99dbe38927 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/1b53eefe575e63d8995e7fc9065bec99dbe38927/Cfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1376, 12, 2890, 16, 508, 4672, 9163, 896, 316, 294, 1376, 1982, 26418, 365, 18, 18676, 340, 273, 1083, 365, 18, 1065, 304, 839, 273, 1083, 1544, 273, 2213, 87, 5258, 87, 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, 855, 67, 1376, 12, 2890, 16, 508, 4672, 9163, 896, 316, 294, 1376, 1982, 26418, 365, 18, 18676, 340, 273, 1083, 365, 18, 1065, 304, 839, 273, 1083, 1544, 273, 2213, 87, 5258, 87, 6, ...
b.pack(side = LEFT)
b.pack(side=LEFT)
def build_status_bar(self): status_bar = self.status_bar canvas = self.canvas
5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 2327, 67, 3215, 12, 2890, 4672, 1267, 67, 3215, 273, 365, 18, 2327, 67, 3215, 5953, 273, 365, 18, 15424, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 2327, 67, 3215, 12, 2890, 4672, 1267, 67, 3215, 273, 365, 18, 2327, 67, 3215, 5953, 273, 365, 18, 15424, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.window.makeKeyAndOrderFront_(None)
self.actionButton.sendActionOn_(NSLeftMouseDownMask) self.showWindow_(None)
def awakeFromNib(self): self.window.makeKeyAndOrderFront_(None)
109d64c21aabb187be80dd07881eec8e52a75af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/109d64c21aabb187be80dd07881eec8e52a75af3/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1690, 911, 1265, 50, 495, 12, 2890, 4672, 365, 18, 5668, 18, 6540, 653, 1876, 2448, 9580, 67, 12, 7036, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1690, 911, 1265, 50, 495, 12, 2890, 4672, 365, 18, 5668, 18, 6540, 653, 1876, 2448, 9580, 67, 12, 7036, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
x = ''
x = ''
def html_head(self, title): x = '' x += 'Content-Type: text/html\n\n' x += self.html_head_nocgi(title) return x
506108cc1b3c6c0eaca0e88ca4b1e860b5a5f693 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/506108cc1b3c6c0eaca0e88ca4b1e860b5a5f693/refineprep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 1978, 12, 2890, 16, 2077, 4672, 619, 225, 273, 875, 619, 1011, 296, 1350, 17, 559, 30, 977, 19, 2620, 64, 82, 64, 82, 11, 619, 1011, 365, 18, 2620, 67, 1978, 67, 31470, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 1978, 12, 2890, 16, 2077, 4672, 619, 225, 273, 875, 619, 1011, 296, 1350, 17, 559, 30, 977, 19, 2620, 64, 82, 64, 82, 11, 619, 1011, 365, 18, 2620, 67, 1978, 67, 31470, 1...
cr.execute("select product_uom,-sum(product_qty) as product_qty from stock_move where location_id=%s and location_dest_id<>%s and product_id=%s and state in ('done', 'assigned') group by product_uom", (id, id, product_id))
cr.execute("""SELECT product_uom,-sum(product_qty) AS product_qty FROM stock_move WHERE location_id=%s AND location_dest_id<>%s AND product_id=%s AND state in ('done', 'assigned') GROUP BY product_uom """, (id, id, product_id))
def _product_reserve(self, cr, uid, ids, product_id, product_qty, context=None): """ @param product_id: Id of product @param product_qty: Quantity of product @return: List of Values or False """ result = [] amount = 0.0 if context is None: context = {} for id in self.search(cr, uid, [('location_id', 'child_of', ids)]): cr.execute("select product_uom,sum(product_qty) as product_qty from stock_move where location_dest_id=%s and location_id<>%s and product_id=%s and state='done' group by product_uom", (id, id, product_id)) results = cr.dictfetchall() cr.execute("select product_uom,-sum(product_qty) as product_qty from stock_move where location_id=%s and location_dest_id<>%s and product_id=%s and state in ('done', 'assigned') group by product_uom", (id, id, product_id)) results += cr.dictfetchall()
fed8a6838f1bfe251e8f3b59483688b993f333a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fed8a6838f1bfe251e8f3b59483688b993f333a8/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 455, 6527, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 67, 350, 16, 3017, 67, 85, 4098, 16, 819, 33, 7036, 4672, 3536, 632, 891, 3017, 67, 350, 30, 3124, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 455, 6527, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 67, 350, 16, 3017, 67, 85, 4098, 16, 819, 33, 7036, 4672, 3536, 632, 891, 3017, 67, 350, 30, 3124, 434, ...
expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search):
expr = re.compile(r"(\W+|^)'([%s%s%s\s]+)'([%s]+|$)" % (letters, digits, literal_punc, phrase_delimiters)).search,):
def doc_literal( self, s, expr = re.compile(r"'([%s%s%s\s]+)'[%s]+" % (letters, digits, literal_punc, phrase_delimiters)).search):
e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e1cb047fc51a61870e65b9df3b3e8db9c35b5b9b/DocumentClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 67, 13107, 12, 365, 16, 272, 16, 3065, 273, 283, 18, 11100, 12, 86, 5187, 3816, 9, 87, 9, 87, 9, 87, 64, 87, 3737, 2506, 14451, 87, 3737, 6, 738, 261, 26054, 16, 6815, 16, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 67, 13107, 12, 365, 16, 272, 16, 3065, 273, 283, 18, 11100, 12, 86, 5187, 3816, 9, 87, 9, 87, 9, 87, 64, 87, 3737, 2506, 14451, 87, 3737, 6, 738, 261, 26054, 16, 6815, 16, 7...
if elem.find('{http://www.opengis.net/wcs/1.1/ows}AccessConstraints'):
if elem.find('{http://www.opengis.net/wcs/1.1/ows}AccessConstraints') is not None:
def __init__(self,elem): self.service="WCS" self.version="1.1.0" self.title = elem.find('{http://www.opengis.net/ows}Title').text if elem.find('{http://www.opengis.net/ows}Abstract'): self.abstract=elem.find('{http://www.opengis.net/ows}Abstract').text else: self.abstract = None self.keywords = [f.text for f in elem.findall('{http://www.opengis.net/ows}Keywords/{http://www.opengis.net/ows}Keyword')] #self.link = elem.find('{http://www.opengis.net/wcs/1.1}Service/{http://www.opengis.net/wcs/1.1}OnlineResource').attrib.get('{http://www.w3.org/1999/xlink}href', '') if elem.find('{http://www.opengis.net/wcs/1.1/ows}Fees'): self.fees=elem.find('{http://www.opengis.net/wcs/1.1/ows}Fees').text else: self.fees=None if elem.find('{http://www.opengis.net/wcs/1.1/ows}AccessConstraints'): self.accessConstraints=elem.find('{http://www.opengis.net/wcs/1.1/ows}AccessConstraints').text else: self.accessConstraints=None
cc08b917ebc86e41fb0d63a0851abb7f9435b8e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11708/cc08b917ebc86e41fb0d63a0851abb7f9435b8e3/wcs110.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10037, 4672, 365, 18, 3278, 1546, 59, 4596, 6, 365, 18, 1589, 1546, 21, 18, 21, 18, 20, 6, 365, 18, 2649, 273, 3659, 18, 4720, 2668, 95, 2505, 2207, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10037, 4672, 365, 18, 3278, 1546, 59, 4596, 6, 365, 18, 1589, 1546, 21, 18, 21, 18, 20, 6, 365, 18, 2649, 273, 3659, 18, 4720, 2668, 95, 2505, 2207, ...
self.assertRaises((IOError, EOFError), _hotshot.logreader, ".")
emptyfile = tempfile.NamedTemporaryFile() try: self.assertRaises((IOError, EOFError), _hotshot.logreader, emptyfile.name) finally: emptyfile.close()
def test_logreader_eof_error(self): self.assertRaises((IOError, EOFError), _hotshot.logreader, ".") gc.collect()
20b8739501a6808dd676469e3e5052be3d8eb258 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/20b8739501a6808dd676469e3e5052be3d8eb258/test_hotshot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1330, 10530, 67, 9339, 67, 1636, 12, 2890, 4672, 1008, 768, 273, 13275, 18, 7604, 23808, 1435, 775, 30, 365, 18, 11231, 12649, 6141, 12443, 4294, 668, 16, 6431, 668, 3631, 389,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1330, 10530, 67, 9339, 67, 1636, 12, 2890, 4672, 1008, 768, 273, 13275, 18, 7604, 23808, 1435, 775, 30, 365, 18, 11231, 12649, 6141, 12443, 4294, 668, 16, 6431, 668, 3631, 389,...
buf = open(join(tmpmoddir, pofilename), 'w')
buf = file(join(tmpmoddir, pofilename), 'w')
def _process(format, modules, rows, buffer, lang, newlang): if format == 'csv': writer=csv.writer(buffer, 'UNIX') for row in rows: writer.writerow(row) elif format == 'po': rows.pop(0) writer = tools.TinyPoFile(buffer) writer.write_infos(modules)
a8c69e78856ea0914362d799b2cd6dde016c7fd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/a8c69e78856ea0914362d799b2cd6dde016c7fd9/translate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2139, 16, 4381, 16, 2595, 16, 1613, 16, 3303, 16, 394, 4936, 4672, 309, 740, 422, 296, 6715, 4278, 2633, 33, 6715, 18, 6299, 12, 4106, 16, 296, 10377, 60, 6134, 364, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2139, 16, 4381, 16, 2595, 16, 1613, 16, 3303, 16, 394, 4936, 4672, 309, 740, 422, 296, 6715, 4278, 2633, 33, 6715, 18, 6299, 12, 4106, 16, 296, 10377, 60, 6134, 364, 1...