rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
path_prefix = path_prefix,
path_prefix=path_prefix,
def collection( self, collection_name, resource_name, path_prefix=None, member_prefix='/{id}', controller=None, collection_actions=COLLECTION_ACTIONS, member_actions = MEMBER_ACTIONS, member_options=None, **kwargs): """Create a submapper that represents a collection.
5fb4c0a4dadc5fe2486dee255c3991b78918fa87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12081/5fb4c0a4dadc5fe2486dee255c3991b78918fa87/mapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1849, 12, 365, 16, 1849, 67, 529, 16, 1058, 67, 529, 16, 589, 67, 3239, 33, 7036, 16, 3140, 67, 3239, 2218, 4938, 350, 24259, 2596, 33, 7036, 16, 1849, 67, 4905, 33, 25964, 67, 12249...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1849, 12, 365, 16, 1849, 67, 529, 16, 1058, 67, 529, 16, 589, 67, 3239, 33, 7036, 16, 3140, 67, 3239, 2218, 4938, 350, 24259, 2596, 33, 7036, 16, 1849, 67, 4905, 33, 25964, 67, 12249...
p += s[pos]
p += unichr(ord(s[pos]))
def PyUnicode_DecodeRawUnicodeEscape(s, size,errors): if (size == 0): return u'' pos = 0 p = [] while (pos < len(s)): ch = s[pos] #/* Non-escape characters are interpreted as Unicode ordinals */ if (ch != '\\'): p += ch pos += 1 continue startinpos = pos pos += 1
5efa14154184eac5ee6ca6162a67c199654ad7fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/5efa14154184eac5ee6ca6162a67c199654ad7fc/unicodecodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 16532, 67, 6615, 4809, 16532, 8448, 12, 87, 16, 963, 16, 4324, 4672, 225, 309, 261, 1467, 422, 374, 4672, 327, 582, 6309, 949, 273, 374, 293, 273, 5378, 1323, 261, 917, 411, 562,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 16532, 67, 6615, 4809, 16532, 8448, 12, 87, 16, 963, 16, 4324, 4672, 225, 309, 261, 1467, 422, 374, 4672, 327, 582, 6309, 949, 273, 374, 293, 273, 5378, 1323, 261, 917, 411, 562,...
token = self.token() else: self.error("parsing typedef: expecting a name") return token
token = self.token() else: self.error("parsing typedef: expecting a name") return token
#self.debug("end typedef type", token)
c7d1398e49a7858195b4b8e0b9832ded1fb9f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3857/c7d1398e49a7858195b4b8e0b9832ded1fb9f169/apibuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 2890, 18, 4148, 2932, 409, 618, 536, 618, 3113, 1147, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 2890, 18, 4148, 2932, 409, 618, 536, 618, 3113, 1147, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
the curve, then `|h(P) - \hat{h}(P)| \leq B`, where `h(P)` is
the curve, then `h(P) \le \hat{h}(P) + B`, where `h(P)` is
def CPS_height_bound(self): r""" Return the Cremona-Prickett-Siksek height bound. This is a floating point number B such that if P is a rational point on the curve, then `|h(P) - \hat{h}(P)| \leq B`, where `h(P)` is the naive logarithmic height of `P` and `\hat{h}(P)` is the canonical height.
44699f49bf3139d49818b64ebdefb81646859d9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/44699f49bf3139d49818b64ebdefb81646859d9f/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5181, 55, 67, 4210, 67, 3653, 12, 2890, 4672, 436, 8395, 2000, 326, 5799, 2586, 69, 17, 2050, 29378, 88, 17, 55, 1766, 307, 79, 2072, 2489, 18, 1220, 353, 279, 13861, 1634, 1300, 605, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5181, 55, 67, 4210, 67, 3653, 12, 2890, 4672, 436, 8395, 2000, 326, 5799, 2586, 69, 17, 2050, 29378, 88, 17, 55, 1766, 307, 79, 2072, 2489, 18, 1220, 353, 279, 13861, 1634, 1300, 605, ...
for loc in config.items('locations'): run_location(loc, config)
else: for loc in config.items('locations'): run_location(loc, config)
def run_config(configfile, location = None): """ Loads the config file and call run_location """ # Parse config file config = ConfigParser() config.optionxform = lambda x: x config.read(configfile) if not config.has_section('locations'): print 'ERROR: Configuration file: %s does not have a \'locations\'' \ ' section' % config_path sys.exit(1) # Run sections if location: loc_path = config.get('locations', location) run_location((location,loc_path), config) for loc in config.items('locations'): run_location(loc, config)
1114f4db0641f58732078070859c9e3038acdf1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10608/1114f4db0641f58732078070859c9e3038acdf1c/build-deps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1425, 12, 1425, 768, 16, 2117, 273, 599, 4672, 3536, 4444, 87, 326, 642, 585, 471, 745, 1086, 67, 3562, 3536, 468, 2884, 642, 585, 642, 273, 25076, 1435, 642, 18, 3482, 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, 1086, 67, 1425, 12, 1425, 768, 16, 2117, 273, 599, 4672, 3536, 4444, 87, 326, 642, 585, 471, 745, 1086, 67, 3562, 3536, 468, 2884, 642, 585, 642, 273, 25076, 1435, 642, 18, 3482, 92, ...
name = self.htmlfile_map[self.htmlfile.referrer]
name = self.htmlfile_map[self.htmlfile.referrer.path]
def elem_to_link(elem, href, counter): text = (u''.join(elem.xpath('string()'))).strip() if not text: return None, None, None t = elem.xpath('descendant-or-self::a[@href]') if t: _href = 'content/' + t[0].get('href', '') parts = _href.split('#') _href = parts[0] frag = None if len(parts) == 1 else parts[-1] else: _href = href id = elem.get('id', 'calibre_chapter_%d'%counter) elem.set('id', id) frag = id return text, _href, frag
061085273453f61710800137d7adeb5d4f10e9d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/061085273453f61710800137d7adeb5d4f10e9d3/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3659, 67, 869, 67, 1232, 12, 10037, 16, 3897, 16, 3895, 4672, 977, 273, 261, 89, 6309, 18, 5701, 12, 10037, 18, 18644, 2668, 1080, 11866, 3719, 2934, 6406, 1435, 309, 486, 977, 30, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3659, 67, 869, 67, 1232, 12, 10037, 16, 3897, 16, 3895, 4672, 977, 273, 261, 89, 6309, 18, 5701, 12, 10037, 18, 18644, 2668, 1080, 11866, 3719, 2934, 6406, 1435, 309, 486, 977, 30, 327...
goodargs = argsreduce(cond, *((k,)+args)) place(output,cond,self._cdf(*goodargs))
if any(cond): goodargs = argsreduce(cond, *((k,)+args)) place(output,cond,self._cdf(*goodargs))
def cdf(self, k, *args, **kwds): """Cumulative distribution function at k of the given RV
4ca9f7d91b2d0cf6aa79bb5c23d73807cff34ffb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/4ca9f7d91b2d0cf6aa79bb5c23d73807cff34ffb/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23655, 12, 2890, 16, 417, 16, 380, 1968, 16, 2826, 25577, 4672, 3536, 39, 11276, 7006, 445, 622, 417, 434, 326, 864, 534, 58, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23655, 12, 2890, 16, 417, 16, 380, 1968, 16, 2826, 25577, 4672, 3536, 39, 11276, 7006, 445, 622, 417, 434, 326, 864, 534, 58, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
raise osv.except_osv(_('Invalid action !'),
raise osv.except_osv(_('Invalid action !'),
def unlink(self, cr, uid, ids, context=None): procurements = self.read(cr, uid, ids, ['state']) unlink_ids = [] for s in procurements: if s['state'] in ['draft','cancel']: unlink_ids.append(s['id']) else: raise osv.except_osv(_('Invalid action !'), _('Cannot delete Procurement Order(s) which are in %s State!') % \ s['state']) return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
be16348523df3d3f4769b71419d143ad492f98b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be16348523df3d3f4769b71419d143ad492f98b4/procurement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 5418, 594, 1346, 273, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 2019, 19486, 8255, 67, 2232, 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, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 5418, 594, 1346, 273, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 2019, 19486, 8255, 67, 2232, 273, ...
The name of a set-up function. This is called before running the
A set-up function. This is called before running the
def DocFileSuite(*paths, **kw): """A unittest suite for one or more doctest files. The path to each doctest file is given as a string; the interpretation of that string depends on the keyword argument "module_relative". A number of options may be provided as keyword arguments: module_relative If "module_relative" is True, then the given file paths are interpreted as os-independent module-relative paths. By default, these paths are relative to the calling module's directory; but if the "package" argument is specified, then they are relative to that package. To ensure os-independence, "filename" should use "/" characters to separate path segments, and may not be an absolute path (i.e., it may not begin with "/"). If "module_relative" is False, then the given file paths are interpreted as os-specific paths. These paths may be absolute or relative (to the current working directory). package A Python package or the name of a Python package whose directory should be used as the base directory for module relative paths. If "package" is not specified, then the calling module's directory is used as the base directory for module relative filenames. It is an error to specify "package" if "module_relative" is False. setUp The name of a set-up function. This is called before running the tests in each file. The setUp function will be passed a DocTest object. The setUp function can access the test globals as the globs attribute of the test passed. tearDown The name of a tear-down function. This is called after running the tests in each file. The tearDown function will be passed a DocTest object. The tearDown function can access the test globals as the globs attribute of the test passed. globs A dictionary containing initial global variables for the tests. optionflags A set of doctest option flags expressed as an integer. """ suite = unittest.TestSuite() # We do this here so that _normalize_module is called at the right # level. If it were called in DocFileTest, then this function # would be the caller and we might guess the package incorrectly. if kw.get('module_relative', True): kw['package'] = _normalize_module(kw.get('package')) for path in paths: suite.addTest(DocFileTest(path, **kw)) return suite
7a98ec2b175493f6fa830f03a8e0321d9cc58cf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7a98ec2b175493f6fa830f03a8e0321d9cc58cf2/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3521, 812, 13587, 30857, 4481, 16, 2826, 9987, 4672, 3536, 37, 2836, 3813, 11371, 364, 1245, 578, 1898, 31263, 395, 1390, 18, 225, 1021, 589, 358, 1517, 31263, 395, 585, 353, 864, 487, 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, 3521, 812, 13587, 30857, 4481, 16, 2826, 9987, 4672, 3536, 37, 2836, 3813, 11371, 364, 1245, 578, 1898, 31263, 395, 1390, 18, 225, 1021, 589, 358, 1517, 31263, 395, 585, 353, 864, 487, 2...
self.fail(merge_error_messages(error_messages))
self.failUnless("HTTP Error 401: Unauthorized" in merge_error_messages(error_messages))
def test_restricted_pictures_hyde(self): """websearch - restricted pictures not available to Mr. Hyde"""
b48d823d2ef34229657cbb51a34ca4c3a7554e87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2139/b48d823d2ef34229657cbb51a34ca4c3a7554e87/websearch_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 29306, 67, 84, 28636, 67, 18112, 323, 12, 2890, 4672, 3536, 4875, 3072, 300, 15693, 293, 28636, 486, 2319, 358, 490, 86, 18, 14881, 323, 8395, 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, 1842, 67, 29306, 67, 84, 28636, 67, 18112, 323, 12, 2890, 4672, 3536, 4875, 3072, 300, 15693, 293, 28636, 486, 2319, 358, 490, 86, 18, 14881, 323, 8395, 2, -100, -100, -100, -100, -100, ...
"extend" : ["build-common"],
"extend" : ["build-views-common"],
def process(options): print ">>> Processing..." print " - Configuration: %s" % options.config print " - Jobs: %s" % ", ".join(options.jobs) # TODO: File parser # - Translate dashed to camelcase # - Translate "true" to Python "True" # Include/Exclude hints # # class/module => # include items with their dependencies # exclude items, also remove items not needed by other modules than the removed ones # # =class/module => # explicit include/exclude of given module or class # # +class/module => # aggressive exclude (excluding also things needed by other classes) # config = { "common" : { "classPath" : [ "framework/source/class", "application/apiviewer/source/class", "application/feedreader/source/class", "application/webmail/source/class", "application/showcase/source/class" ], "require" : { "qx.log.Logger" : ["qx.log.appender.Native"] } }, "source" : { "extend" : ["common"], "sourceScript" : "source.js" }, "build-common" : { "extend" : ["common"], "optimizeVariables" : True, }, "build-core" : { "extend" : ["build-common"], "buildScript" : "build-core.js", "include" : ["apiviewer.Application"], "exclude" : ["ui_tree","=qx.ui.core.Widget"] }, "build-apiviewer" : { "extend" : ["build-common"], "buildScript" : "build-apiviewer.js", "include" : ["apiviewer.*","qx.theme.ClassicRoyale"] }, "build-feedreader" : { "extend" : ["build-common"], "buildScript" : "build-feedreader.js", "include" : ["feedreader.Application"] }, "build-app-views" : { "extend" : ["build-common"], "buildScript" : "build-app-views.js", "views" : { "apiviewer" : ["apiviewer.Application"], "feedreader" : ["feedreader.Application"], "webmail" : ["webmail.Application"], "showcase" : ["showcase.Application"] } }, "build-comp-views" : { "extend" : ["build-common"], "buildScript" : "build-comp-views.js", "views" : { "tree" : ["ui_tree"], "colorselector" : ["qx.ui.component.ColorSelector"], "window" : ["ui_window"], "toolbar" : ["ui_toolbar", "ui_menu"], "table" : ["ui_table"], "form" : ["ui_form"] } }, "build-apiviewer-views" : { "extend" : ["build-common"], "buildScript" : "build-apiviewer-views.js", "collapseViews" : ["core"], "optimizeLatency" : 5000, "views" : { "core" : ["apiviewer.Application","qx.theme.ClassicRoyale"], "viewer" : ["apiviewer.Viewer"], "content" : ["apiviewer.ui.ClassViewer","apiviewer.ui.PackageViewer"] } } } resolve(config, options.jobs) for job in options.jobs: execute(job, config[job])
e6b4075dfb37c381aad1176ed078ecdce16b4dbe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e6b4075dfb37c381aad1176ed078ecdce16b4dbe/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2116, 4672, 1172, 315, 23012, 19652, 7070, 1172, 315, 225, 300, 4659, 30, 738, 87, 6, 738, 702, 18, 1425, 1172, 315, 225, 300, 26909, 30, 738, 87, 6, 738, 3104, 3552, 5701, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2116, 4672, 1172, 315, 23012, 19652, 7070, 1172, 315, 225, 300, 4659, 30, 738, 87, 6, 738, 702, 18, 1425, 1172, 315, 225, 300, 26909, 30, 738, 87, 6, 738, 3104, 3552, 5701, ...
except Exception, e:
except:
def _getAppData(self): if self._realAppData is None: # initialise AppData the first time it's actually needed try: self._realAppData = AppData(self._Application, self._path, self._pid, self._url, self._terms) except Exception, e: import sys, traceback print >> sys.stderr, '(A problem occured in AS_appdata; see first traceback for actual error.)' traceback.print_exc() print >> sys.stderr, '\n\n\n' return 0 # raising an error here (presumably due to bugs) causes Python to go into infinite recursion, so return a bad value instead; that'll throw a [misleading] error downstream return self._realAppData
a5ccf51844814277bb32be555d595a5db88f17d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10961/a5ccf51844814277bb32be555d595a5db88f17d3/reference.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 3371, 751, 12, 2890, 4672, 309, 365, 6315, 7688, 3371, 751, 353, 599, 30, 468, 21301, 4677, 751, 326, 1122, 813, 518, 1807, 6013, 3577, 775, 30, 365, 6315, 7688, 3371, 751, 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, 588, 3371, 751, 12, 2890, 4672, 309, 365, 6315, 7688, 3371, 751, 353, 599, 30, 468, 21301, 4677, 751, 326, 1122, 813, 518, 1807, 6013, 3577, 775, 30, 365, 6315, 7688, 3371, 751, 2...
u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None)
u = _urlopen_with_retry(self.FTP_HOST, timeout=None)
def test_ftp_NoneWithdefault(self): prev = socket.getdefaulttimeout() socket.setdefaulttimeout(60) try: u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None) self.assertEqual(u.fp.fp._sock.gettimeout(), 60) finally: socket.setdefaulttimeout(prev)
6534a4ed2b25b245b424847a6f61ed4524fa5f72 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/6534a4ed2b25b245b424847a6f61ed4524fa5f72/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 7036, 1190, 1886, 12, 2890, 4672, 2807, 273, 2987, 18, 588, 1886, 4538, 1435, 2987, 18, 542, 1886, 4538, 12, 4848, 13, 775, 30, 582, 273, 389, 295, 18589, 67, 1918...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11727, 67, 7036, 1190, 1886, 12, 2890, 4672, 2807, 273, 2987, 18, 588, 1886, 4538, 1435, 2987, 18, 542, 1886, 4538, 12, 4848, 13, 775, 30, 582, 273, 389, 295, 18589, 67, 1918...
p.solve(solver = solver, log = verbose)
p.solve(solver=solver, log=verbose)
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
851087dd5fd3776eb2db10b18fb5402a16a5dd17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/851087dd5fd3776eb2db10b18fb5402a16a5dd17/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
l, sender = args sender = Node().initWithDict(sender) self.table.table.insertNode(sender) if self.finished or self.answered.has_key(sender.id): return self.outstanding = self.outstanding - 1 self.answered[sender.id] = 1 if l.has_key('nodes'): for node in l['nodes']: n = Node().initWithDict(node) if not self.found.has_key(n.id): self.found[n.id] = n elif l.has_key('values'): def x(y, z=self.results): y = y.decode('base64') if not z.has_key(y): z[y] = 1 return y else: return None v = filter(None, map(x, l['values'])) if(len(v)): reactor.callFromThread(self.callback, v) self.schedule()
l, sender = args sender = Node().initWithDict(sender) self.table.table.insertNode(sender) if self.finished or self.answered.has_key(sender.id): return self.outstanding = self.outstanding - 1 self.answered[sender.id] = 1 if l.has_key('nodes'): for node in l['nodes']: n = Node().initWithDict(node) if not self.found.has_key(n.id): self.found[n.id] = n elif l.has_key('values'): def x(y, z=self.results): y = y.decode('base64') if not z.has_key(y): z[y] = 1 return y else: return None v = filter(None, map(x, l['values'])) if(len(v)): reactor.callFromThread(self.callback, v) self.schedule()
def handleGotNodes(self, args):
815cbec78a6e942fe1dd3e3ef1b578ab1c471873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/665/815cbec78a6e942fe1dd3e3ef1b578ab1c471873/actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 15617, 3205, 12, 2890, 16, 833, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 15617, 3205, 12, 2890, 16, 833, 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, -10...
if isinstance(f, str):
if isinstance(f, (str, unicode)):
def __loadV1Tag(self, f): if isinstance(f, str): fp = file(f, "rb") closeFile = 1; else: fp = f; closeFile = 0;
69708fe2333a09e19ea7e3affac27323d2dd54b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2607/69708fe2333a09e19ea7e3affac27323d2dd54b1/tag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 945, 58, 21, 1805, 12, 2890, 16, 284, 4672, 309, 1549, 12, 74, 16, 261, 701, 16, 5252, 3719, 30, 4253, 273, 585, 12, 74, 16, 315, 6731, 7923, 1746, 812, 273, 404, 31, 469, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 945, 58, 21, 1805, 12, 2890, 16, 284, 4672, 309, 1549, 12, 74, 16, 261, 701, 16, 5252, 3719, 30, 4253, 273, 585, 12, 74, 16, 315, 6731, 7923, 1746, 812, 273, 404, 31, 469, 30...
The name of the files has to be the same of the authorized users
The names of the files have to be the same as the authorized users
def read_hints(self, basedir): """Read the hint commands from the specified directory The hint commands are read from the files contained by the `Hints' directory within the directory specified as `basedir' parameter. The name of the files has to be the same of the authorized users for the hints. The file contains rows with the format:
644caa3f3125e8104b46e0ef2774fdb1917b2f5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2784/644caa3f3125e8104b46e0ef2774fdb1917b2f5c/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 24598, 12, 2890, 16, 15573, 4672, 3536, 1994, 326, 7380, 4364, 628, 326, 1269, 1867, 225, 1021, 7380, 4364, 854, 855, 628, 326, 1390, 7542, 635, 326, 1375, 13368, 11, 1867, 3470...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24598, 12, 2890, 16, 15573, 4672, 3536, 1994, 326, 7380, 4364, 628, 326, 1269, 1867, 225, 1021, 7380, 4364, 854, 855, 628, 326, 1390, 7542, 635, 326, 1375, 13368, 11, 1867, 3470...
column.set_fixed_width(max(self.columnwidths[i], 10))
column.set_fixed_width(max(self.config.columnwidths[i], 10))
def initialize_columns(self): # Initialize current playlist data and widget self.resizing_columns = False self.columnformat = self.config.currentformat.split("|") self.currentdata = gtk.ListStore(*([int] + [str] * len(self.columnformat))) self.current.set_model(self.currentdata) cellrenderer = gtk.CellRendererText() cellrenderer.set_property("ellipsize", pango.ELLIPSIZE_END) self.columns = [] colnames = self.parse_formatting_colnames(self.config.currentformat) if len(self.columnformat) != len(self.config.columnwidths): # Number of columns changed, set columns equally spaced: self.config.columnwidths = [] for i in range(len(self.columnformat)): self.config.columnwidths.append(int(self.current.allocation.width/len(self.columnformat))) for i in range(len(self.columnformat)): column = gtk.TreeViewColumn(colnames[i], cellrenderer, markup=(i+1)) self.columns += [column] column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) # If just one column, we want it to expand with the tree, so don't set a # fixed_width; if multiple columns, size accordingly: if len(self.columnformat) > 1: column.set_resizable(True) try: column.set_fixed_width(max(self.columnwidths[i], 10)) except: column.set_fixed_width(150) column.connect('clicked', self.on_current_column_click) self.current.append_column(column) self.current.set_fixed_height_mode(True) self.current.set_headers_visible(len(self.columnformat) > 1 and self.config.show_header) self.current.set_headers_clickable(not self.filterbox_visible)
622db5d99cdaf77ea2136a171d53fc6986a8328b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/622db5d99cdaf77ea2136a171d53fc6986a8328b/current.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 5112, 12, 2890, 4672, 468, 9190, 783, 16428, 501, 471, 3604, 365, 18, 455, 6894, 67, 5112, 273, 1083, 365, 18, 2827, 2139, 273, 365, 18, 1425, 18, 2972, 2139, 18, 4939, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 5112, 12, 2890, 4672, 468, 9190, 783, 16428, 501, 471, 3604, 365, 18, 455, 6894, 67, 5112, 273, 1083, 365, 18, 2827, 2139, 273, 365, 18, 1425, 18, 2972, 2139, 18, 4939, 2932,...
print 'Remote server refused the connection.' return print "Error: ", failure.getErrorMessage() print "Traceback: ", failure.printTraceback()
print 'Remote server %s refused the connection.' % (self.server) else: print "Error: ", failure.getErrorMessage() print "Traceback: ", failure.printTraceback()
def _catch_failure(self, failure): from twisted.internet import error if failure.check(error.ConnectionRefusedError): print 'Remote server refused the connection.' return print "Error: ", failure.getErrorMessage() print "Traceback: ", failure.printTraceback()
b9334553331c39fddd5367b85a6c3b8e2eed4e4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b9334553331c39fddd5367b85a6c3b8e2eed4e4e/dsage_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14683, 67, 12251, 12, 2890, 16, 5166, 4672, 628, 2339, 25444, 18, 267, 14726, 1930, 555, 309, 5166, 18, 1893, 12, 1636, 18, 1952, 1957, 3668, 668, 4672, 1172, 296, 5169, 1438, 1278,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14683, 67, 12251, 12, 2890, 16, 5166, 4672, 628, 2339, 25444, 18, 267, 14726, 1930, 555, 309, 5166, 18, 1893, 12, 1636, 18, 1952, 1957, 3668, 668, 4672, 1172, 296, 5169, 1438, 1278,...
attribute_type_id = AddSliceAttributeType(admin, name, {'description': description, 'min_role_id': min_role_id})
attribute_type_id = AddSliceAttributeType(admin, attribute_type_fields)
def unicmp(a, b, encoding = "utf-8"): """ When connected directly to the DB, values are returned as raw 8-bit strings that may need to be decoded (as UTF-8 by default) in order to compare them against expected Python Unicode strings. """ is8bit = re.compile("[\x80-\xff]").search if isinstance(a, str) and is8bit(a): a = unicode(a, encoding) if isinstance(b, str) and is8bit(b): b = unicode(b, encoding) return a == b
f51dbe12c30f8473b083ea86b3dade41e56f4615 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/f51dbe12c30f8473b083ea86b3dade41e56f4615/Test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 335, 1291, 12, 69, 16, 324, 16, 2688, 273, 315, 3158, 17, 28, 6, 4672, 3536, 5203, 5840, 5122, 358, 326, 2383, 16, 924, 854, 2106, 487, 1831, 1725, 17, 3682, 2064, 716, 2026, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 335, 1291, 12, 69, 16, 324, 16, 2688, 273, 315, 3158, 17, 28, 6, 4672, 3536, 5203, 5840, 5122, 358, 326, 2383, 16, 924, 854, 2106, 487, 1831, 1725, 17, 3682, 2064, 716, 2026, 16...
print "Profiling command enter for BuildAtoms command"
ALLOWED_COMMAND_NAMES = ('DEPOSIT', 'BUILD_DNA', 'DNA_SEGMENT', 'DNA_STRAND', 'CRYSTAL', 'BUILD_NANOTUBE') ok, commandName = grab_text_line_using_dialog( title = "profile entering given command", label = "Enter the command.commandName e.g. 'BUILD_DNA' , 'DEPOSIT'" ) if not ok: print "No command name entered , returning" return commandName = str(commandName) commandName = commandName.upper() if not commandName in ALLOWED_COMMAND_NAMES: print "Invalid command name %s. Returning."%(commandName) return print "Profiling command enter for %s"%(commandName)
def _debug_command_entered_profiling(self): """ Debug option for profiling code to enter BuildAtoms command. """ #Note: To profile other commands, simply repalce call to #'toolsBuildAtoms' with the appropriate method. Other option is #to just do "win.commandSequencer.userEnterCommand('COMMAND_NAME')" # -- Ninad 2008-10-03 print "Profiling command enter for BuildAtoms command" win = self._debug_win doProfile(True) tm0 = clock() profile(self.win.toolsBuildAtoms) tm1 = clock() print "Profiling complete. Total time to enter Build Atoms = ", (tm1-tm0) doProfile(False)
7dd5cfcef3fd3e312d1a1fdac9f8d25eca91a99f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/7dd5cfcef3fd3e312d1a1fdac9f8d25eca91a99f/DebugMenuMixin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4148, 67, 3076, 67, 2328, 329, 67, 16121, 4973, 12, 2890, 4672, 3536, 4015, 1456, 364, 25658, 981, 358, 6103, 3998, 14280, 1296, 18, 3536, 468, 8067, 30, 2974, 3042, 1308, 4364, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4148, 67, 3076, 67, 2328, 329, 67, 16121, 4973, 12, 2890, 4672, 3536, 4015, 1456, 364, 25658, 981, 358, 6103, 3998, 14280, 1296, 18, 3536, 468, 8067, 30, 2974, 3042, 1308, 4364, 16,...
authentication.
authentication.
def __init__(self, email=None, password=None, account_type='HOSTED_OR_GOOGLE', service=None, source=None, server=None, additional_headers=None): """Creates an object of type GDataService.
c6f5c407589126fc84499bf29cb17f4d244b2562 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5609/c6f5c407589126fc84499bf29cb17f4d244b2562/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2699, 33, 7036, 16, 2201, 33, 7036, 16, 2236, 67, 723, 2218, 8908, 2056, 67, 916, 67, 16387, 13369, 900, 2187, 1156, 33, 7036, 16, 1084, 33, 7036, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2699, 33, 7036, 16, 2201, 33, 7036, 16, 2236, 67, 723, 2218, 8908, 2056, 67, 916, 67, 16387, 13369, 900, 2187, 1156, 33, 7036, 16, 1084, 33, 7036, 16, ...
sc=sc+(t-int(t))
sc=sc+ms
def __init__(self,*args): """Return a new date-time object
92b0ff07ac42eb6719c4d212edd1adf91e39d066 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/92b0ff07ac42eb6719c4d212edd1adf91e39d066/DateTime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 3536, 990, 279, 394, 1509, 17, 957, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14, 1968, 4672, 3536, 990, 279, 394, 1509, 17, 957, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
filters = [FILTER_RESPONSE_HEADER, FILTER_RESPONSE_DECODE, FILTER_RESPONSE_MODIFY, FILTER_RESPONSE_ENCODE, ] self.attrs = get_filterattrs(self.url, filters, headers=msg)
self.attrs = get_filterattrs(self.url, [FILTER_RESPONSE_HEADER], headers=msg)
def process_headers (self): # Headers are terminated by a blank line .. now in the regexp, # we want to say it's either a newline at the beginning of # the document, or it's a lot of headers followed by two newlines. # The cleaner alternative would be to read one line at a time # until we get to a blank line... m = re.match(r'^((?:[^\r\n]+\r?\n)*\r?\n)', self.recv_buffer) if not m: return # get headers fp = StringIO(self.read(m.end())) msg = WcMessage(fp) # put unparsed data (if any) back to the buffer msg.rewindbody() self.recv_buffer = fp.read() + self.recv_buffer debug(PROXY, "%s server headers\n%s", str(self), str(msg)) if self.statuscode==100: # it's a Continue request, so go back to waiting for headers # XXX for HTTP/1.1 clients, forward this self.state = 'response' return http_ver = serverpool.http_versions[self.addr] if http_ver >= (1,1): self.persistent = not has_header_value(msg, 'Connection', 'Close') elif http_ver >= (1,0): self.persistent = has_header_value(msg, 'Connection', 'Keep-Alive') else: self.persistent = False filters = [FILTER_RESPONSE_HEADER, FILTER_RESPONSE_DECODE, FILTER_RESPONSE_MODIFY, FILTER_RESPONSE_ENCODE, ] self.attrs = get_filterattrs(self.url, filters, headers=msg) try: self.headers = applyfilter(FILTER_RESPONSE_HEADER, msg, "finish", self.attrs) except FilterPics, msg: self.statuscode = 403 debug(PROXY, "%s FilterPics %s", str(self), `msg`) # XXX get version response = "HTTP/1.1 403 Forbidden" headers = WcMessage(StringIO('Content-type: text/plain\r\n' 'Content-Length: %d\r\n\r\n' % len(msg))) self.client.server_response(response, self.statuscode, headers) self.client.server_content(msg) self.client.server_close() self.state = 'recycle' self.reuse() return server_set_headers(self.headers) self.bytes_remaining = server_set_encoding_headers(self.headers, self.is_rewrite(), self.decoders, self.client.compress, self.bytes_remaining) # 304 Not Modified does not send any type info, because it was cached if self.statuscode!=304: server_set_content_headers(self.headers, self.document, self.mime, self.url) # XXX <doh> #if not self.headers.has_key('Content-Length'): # self.headers['Connection'] = 'close\r' #remove_headers(self.headers, ['Keep-Alive']) # XXX </doh> if self.statuscode!=407: self.client.server_response(self.response, self.statuscode, self.headers) if self.statuscode in (204, 304) or self.method == 'HEAD': # These response codes indicate no content self.state = 'recycle' else: self.state = 'content'
a4b027340c36d7b5af70fcf0a57827d429c563ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/a4b027340c36d7b5af70fcf0a57827d429c563ea/HttpServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2485, 261, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 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, 1207, 67, 2485, 261, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 434,...
self.pos = (curr_x, (curr_y + (tx*10)))
self.pos = (curr_x,curr_y)
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size) self.image = pygame.Surface((size,size)) self.image.fill(self.color) proj_x = self.velocity * math.cos(self.rad_angle) * tx if proj_y < 0: print "proj_x:" + str(proj_x) self.hit_ground() if (curr_y >= 500 and curr_y <= 600): if (proj_y < 10): self.bounce = True print proj_y if (self.bounce == False): self.pos = (curr_x, (SCREEN_WIDTH - ((proj_x * 20)) + 20 )) else: self.pos = (curr_x, (curr_y + (tx*10))) self.rect.center = self.pos self.t = self.t + 1
25adcc4c56b6447a6930c8e2f3924510c2cd6046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12377/25adcc4c56b6447a6930c8e2f3924510c2cd6046/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 309, 365, 18, 11462, 30, 468, 9852, 300, 12324, 358, 7837, 596, 3661, 358, 336, 813, 1368, 333, 8013, 364, 677, 468, 1188, 315, 4406, 398, 677, 30, 315, 397, 609,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 309, 365, 18, 11462, 30, 468, 9852, 300, 12324, 358, 7837, 596, 3661, 358, 336, 813, 1368, 333, 8013, 364, 677, 468, 1188, 315, 4406, 398, 677, 30, 315, 397, 609,...
def __makeHashPost( self, au ): """Requests the hash of an AU.""" post = self.__makePost( 'HashCUS', {'action': 'Hash'} ) post.add ('auid', au.auId ) post.add( 'hashtype', 4 ) return post
def __makeHashPost( self, au ): """Requests the hash of an AU.""" post = self.__makePost( 'HashCUS', {'action': 'Hash'} ) post.add ('auid', au.auId ) post.add( 'hashtype', 4 ) # (sic) return post
cb9a70c7bbdce1e09c351d60188d3e6bda051e84 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/766/cb9a70c7bbdce1e09c351d60188d3e6bda051e84/lockss_daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6540, 2310, 3349, 12, 365, 16, 20309, 262, 30, 3536, 6421, 326, 1651, 434, 392, 28235, 12123, 1603, 273, 365, 16186, 6540, 3349, 12, 296, 2310, 39, 3378, 2187, 13666, 1128, 4278, 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, 1001, 6540, 2310, 3349, 12, 365, 16, 20309, 262, 30, 3536, 6421, 326, 1651, 434, 392, 28235, 12123, 1603, 273, 365, 16186, 6540, 3349, 12, 296, 2310, 39, 3378, 2187, 13666, 1128, 4278, 2...
Diagonal offset (see `tril` for details).
Diagonal offset (see `tril` for details).
def tril_indices_from(arr,k=0): """ Return the indices for the lower-triangle of an (n, n) array. See `tril_indices` for full details. Parameters ---------- n : int Sets the size of the arrays for which the returned indices will be valid. k : int, optional Diagonal offset (see `tril` for details). See Also -------- tril_indices, tril Notes ----- .. versionadded:: 1.4.0 """ if not arr.ndim==2 and arr.shape[0] == arr.shape[1]: raise ValueError("input array must be 2-d and square") return tril_indices(arr.shape[0],k)
4d40dff448b1b368af6752fa8b9a93716db76b3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/4d40dff448b1b368af6752fa8b9a93716db76b3f/twodim_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 433, 330, 67, 6836, 67, 2080, 12, 5399, 16, 79, 33, 20, 4672, 3536, 2000, 326, 4295, 364, 326, 2612, 17, 16857, 4341, 434, 392, 261, 82, 16, 290, 13, 526, 18, 225, 2164, 1375, 313, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 433, 330, 67, 6836, 67, 2080, 12, 5399, 16, 79, 33, 20, 4672, 3536, 2000, 326, 4295, 364, 326, 2612, 17, 16857, 4341, 434, 392, 261, 82, 16, 290, 13, 526, 18, 225, 2164, 1375, 313, ...
self[i] = segment(lo, hi) i += 1
if lo != hi: self[i] = segment(lo, hi) i += 1
def coalesce(self): """ Sort the elements of a list into ascending order, and merge continuous segments into single segments. This operation is O(n log n). """ self.sort() i = j = 0 n = len(self) while j < n: lo, hi = self[j] j += 1 while j < n and hi >= self[j][0]: hi = max(hi, self[j][1]) j += 1 self[i] = segment(lo, hi) i += 1 del self[i : ] return self
440e4d0549f6b4bbf9fda26156772404ade850f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3589/440e4d0549f6b4bbf9fda26156772404ade850f8/segments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1825, 24827, 12, 2890, 4672, 3536, 5928, 326, 2186, 434, 279, 666, 1368, 13976, 1353, 16, 471, 2691, 17235, 5155, 1368, 2202, 5155, 18, 225, 1220, 1674, 353, 531, 12, 82, 613, 290, 2934,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1825, 24827, 12, 2890, 4672, 3536, 5928, 326, 2186, 434, 279, 666, 1368, 13976, 1353, 16, 471, 2691, 17235, 5155, 1368, 2202, 5155, 18, 225, 1220, 1674, 353, 531, 12, 82, 613, 290, 2934,...
len(p))
ln)
def post_build(self, p, pay): p += pay dataofs = self.dataofs if dataofs is None: dataofs = 5+((len(self.fieldtype["options"].i2m(self,self.options))+3)/4) p = p[:12]+chr((dataofs << 4) | ord(p[12])&0x0f)+p[13:] if self.chksum is None: if isinstance(self.underlayer, IP): psdhdr = struct.pack("!4s4sHH", inet_aton(self.underlayer.src), inet_aton(self.underlayer.dst), self.underlayer.proto, len(p)) ck=checksum(psdhdr+p) p = p[:16]+struct.pack("!H", ck)+p[18:] elif isinstance(self.underlayer, IPv6) or isinstance(self.underlayer, _IPv6OptionHeader): ck = in6_chksum(socket.IPPROTO_TCP, self.underlayer, p) p = p[:16]+struct.pack("!H", ck)+p[18:] else: warning("No IP underlayer to compute checksum. Leaving null.") return p
7d48566027e4866dea183ac88a657eac4cc3f7de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7311/7d48566027e4866dea183ac88a657eac4cc3f7de/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 3510, 12, 2890, 16, 293, 16, 8843, 4672, 293, 1011, 8843, 501, 792, 87, 273, 365, 18, 892, 792, 87, 309, 501, 792, 87, 353, 599, 30, 501, 792, 87, 273, 1381, 15, 12443, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 3510, 12, 2890, 16, 293, 16, 8843, 4672, 293, 1011, 8843, 501, 792, 87, 273, 365, 18, 892, 792, 87, 309, 501, 792, 87, 353, 599, 30, 501, 792, 87, 273, 1381, 15, 12443, 1...
for host, (at, autodir) in self._get_hosts(host).iteritems():
for host, at, autodir in self._get_hosts(host):
def report(self, test, host=None, wait_on_client=True): assert self.current_test == test self.current_test = None
ff19f5f24bcb393ece8b98216938f887984eba8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/ff19f5f24bcb393ece8b98216938f887984eba8a/profiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 16, 1842, 16, 1479, 33, 7036, 16, 2529, 67, 265, 67, 2625, 33, 5510, 4672, 1815, 365, 18, 2972, 67, 3813, 422, 1842, 365, 18, 2972, 67, 3813, 273, 599, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 16, 1842, 16, 1479, 33, 7036, 16, 2529, 67, 265, 67, 2625, 33, 5510, 4672, 1815, 365, 18, 2972, 67, 3813, 422, 1842, 365, 18, 2972, 67, 3813, 273, 599, 2, -100, -100,...
file2.write(cgi_file2 % sys.executable)
file2.write(cgi_file2 % self.pythonexe)
def setUp(self): BaseTestCase.setUp(self) self.parent_dir = tempfile.mkdtemp() self.cgi_dir = os.path.join(self.parent_dir, 'cgi-bin') os.mkdir(self.cgi_dir)
76830e67dd7602e27a29b6cca8977d419c2a3374 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/76830e67dd7602e27a29b6cca8977d419c2a3374/test_httpservers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3360, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 2938, 67, 1214, 273, 13275, 18, 24816, 72, 5814, 1435, 365, 18, 19062, 67, 1214, 273, 1140, 18, 803, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3360, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 2938, 67, 1214, 273, 13275, 18, 24816, 72, 5814, 1435, 365, 18, 19062, 67, 1214, 273, 1140, 18, 803, 18, ...
if(_subprocess.WaitForSingleObject(self._handle, 0) == _subprocess.WAIT_OBJECT_0): self.returncode = _subprocess.GetExitCodeProcess(self._handle)
if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0: self.returncode = _GetExitCodeProcess(self._handle)
def _internal_poll(self, _deadstate=None): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: if(_subprocess.WaitForSingleObject(self._handle, 0) == _subprocess.WAIT_OBJECT_0): self.returncode = _subprocess.GetExitCodeProcess(self._handle) return self.returncode
238db7ba819d46924f61ad07c279e6a344651634 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/238db7ba819d46924f61ad07c279e6a344651634/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7236, 67, 13835, 12, 2890, 16, 389, 22097, 2019, 33, 7036, 4672, 3536, 1564, 309, 1151, 1207, 711, 14127, 18, 225, 2860, 18125, 1566, 12123, 309, 365, 18, 2463, 710, 353, 599, 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, 389, 7236, 67, 13835, 12, 2890, 16, 389, 22097, 2019, 33, 7036, 4672, 3536, 1564, 309, 1151, 1207, 711, 14127, 18, 225, 2860, 18125, 1566, 12123, 309, 365, 18, 2463, 710, 353, 599, 30, ...
self.save(filename, xmin, xmax, ymin, ymax, figsize, dpi=dpi, axes=axes)
self.save(filename, xmin, xmax, ymin, ymax, figsize, dpi=dpi, axes=axes,axes_label=axes_label)
def show(self, xmin=None, xmax=None, ymin=None, ymax=None, figsize=DEFAULT_FIGSIZE, filename=None, dpi=DEFAULT_DPI, axes=True, axes_label=None, **args): """ Show this graphics image with the default image viewer.
dba777957ab03c632454902f8b372143c24a237d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/dba777957ab03c632454902f8b372143c24a237d/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 14697, 33, 5280, 67, 5236, 4574, 16, 1544, 33, 7036, 16, 16361, 33, 5280, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 14697, 33, 5280, 67, 5236, 4574, 16, 1544, 33, 7036, 16, 16361, 33, 5280, 67, ...
self._cls = ObjectUID(type(obj.__self__))
if obj.__name__ == '__new__': self._cls = ObjectUID(obj.__self__) else: self._cls = ObjectUID(type(obj.__self__))
def cls(self): if not hasattr(self, '_cls'): obj = self._obj if type(obj) in (_MethodType, _ZopeMethodType, _ZopeCMethodType): self._cls = ObjectUID(obj.im_class) elif (type(obj) is _BuiltinMethodType and obj.__self__ is not None): self._cls = ObjectUID(type(obj.__self__)) elif type(obj) in (_WrapperDescriptorType, _MethodDescriptorType): self._cls = ObjectUID(obj.__objclass__) else: self._cls = None return self._cls
5b4ec01f979bcd2b1a913e52d110a2c12e272d74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5b4ec01f979bcd2b1a913e52d110a2c12e272d74/uid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2028, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 6429, 11, 4672, 1081, 273, 365, 6315, 2603, 309, 618, 12, 2603, 13, 316, 261, 67, 21988, 16, 389, 62, 1306, 21988, 16, 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, 2028, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 6429, 11, 4672, 1081, 273, 365, 6315, 2603, 309, 618, 12, 2603, 13, 316, 261, 67, 21988, 16, 389, 62, 1306, 21988, 16, 389, ...
stream.write("test", "Q")
def test_read101Traces(self): """ Testing reading Q file with more than 100 traces. """ testfile = os.path.join(self.path, 'data', '101.QHD') # read stream = readQ(testfile) stream.verify() self.assertEqual(len(stream), 101) stream.write("test", "Q")
d3df87726649a9055bd26671de7f6ad0765cf08b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/d3df87726649a9055bd26671de7f6ad0765cf08b/test_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 15168, 29773, 12, 2890, 4672, 3536, 7766, 310, 6453, 2238, 585, 598, 1898, 2353, 2130, 19649, 18, 3536, 1842, 768, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 803, 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, 1842, 67, 896, 15168, 29773, 12, 2890, 4672, 3536, 7766, 310, 6453, 2238, 585, 598, 1898, 2353, 2130, 19649, 18, 3536, 1842, 768, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 803, 16, 2...
al.stock_journal as stock_journal
al.stock_journal as stock_journal, sum(al.in_value - al.out_value) as value
def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_move') cr.execute(""" create or replace view report_stock_move as ( select min(sm_id) as id, sum(value) as value, al.dp as date, al.curr_year as year, al.curr_month as month, al.curr_day as day, al.curr_day_diff as day_diff, al.curr_day_diff1 as day_diff1, al.curr_day_diff2 as day_diff2, al.location_id as location_id, al.picking_id as picking_id, al.company_id as company_id, al.location_dest_id as location_dest_id, al.product_qty, al.out_qty as product_qty_out, al.in_qty as product_qty_in, al.address_id as partner_id, al.product_id as product_id, al.state as state , al.product_uom as product_uom, al.categ_id as categ_id, coalesce(al.type, 'other') as type, al.stock_journal as stock_journal FROM (SELECT
70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 6006, 67, 15381, 67, 8501, 6134, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476, 2605,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 6006, 67, 15381, 67, 8501, 6134, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476, 2605,...
document.body[m] = document.body[m][:l-1] + document.body[m][l+len(option + '="' + val + '"'):]
document.body[m] = document.body[m][:l - 1] + document.body[m][l+len(option + '="' + val + '"'):]
def remove_option(document, m, option): l = document.body[m].find(option) if l != -1: val = document.body[m][l:].split('"')[1] document.body[m] = document.body[m][:l-1] + document.body[m][l+len(option + '="' + val + '"'):] return l
bcd8b9a1f1241c461beb5db1d5a69424a9a25950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/bcd8b9a1f1241c461beb5db1d5a69424a9a25950/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3482, 12, 5457, 16, 312, 16, 1456, 4672, 328, 273, 1668, 18, 3432, 63, 81, 8009, 4720, 12, 3482, 13, 309, 328, 480, 300, 21, 30, 1244, 273, 1668, 18, 3432, 63, 81, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3482, 12, 5457, 16, 312, 16, 1456, 4672, 328, 273, 1668, 18, 3432, 63, 81, 8009, 4720, 12, 3482, 13, 309, 328, 480, 300, 21, 30, 1244, 273, 1668, 18, 3432, 63, 81, 6362, ...
p = xmlrpclib.ServerProxy(URL)
p = xmlrpclib.ServerProxy(self.url)
def test_close(self): p = xmlrpclib.ServerProxy(URL) self.assertEqual(p('close')(), None)
0aa7003cd55f7835a85d0679f927232ccccf38e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/0aa7003cd55f7835a85d0679f927232ccccf38e4/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 12, 2890, 4672, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 2890, 18, 718, 13, 365, 18, 11231, 5812, 12, 84, 2668, 4412, 6134, 9334, 599, 13, 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, 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, 1842, 67, 4412, 12, 2890, 4672, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 2890, 18, 718, 13, 365, 18, 11231, 5812, 12, 84, 2668, 4412, 6134, 9334, 599, 13, 2, -100, -100, ...
return self._encodeUri(v)
if self._is_encoded: return v else: return self._encodeUri(v)
def encodedValue(self, val=None): v = super(Uri, self).value(val) return self._encodeUri(v)
6c19a0fe131d9af57eccbb1dba943d266fb804b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/6c19a0fe131d9af57eccbb1dba943d266fb804b1/Path.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3749, 620, 12, 2890, 16, 1244, 33, 7036, 4672, 331, 273, 2240, 12, 3006, 16, 365, 2934, 1132, 12, 1125, 13, 327, 365, 6315, 3015, 3006, 12, 90, 13, 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, 3749, 620, 12, 2890, 16, 1244, 33, 7036, 4672, 331, 273, 2240, 12, 3006, 16, 365, 2934, 1132, 12, 1125, 13, 327, 365, 6315, 3015, 3006, 12, 90, 13, 2, -100, -100, -100, -100, -100, -...
for d in default_include_dirs: d = os.path.join(d, os.path.basename(py_incl_dir)) if d not in include_dirs: include_dirs.append(d)
if os.name=='posix': for d in default_include_dirs: d = os.path.join(d, os.path.basename(py_incl_dir)) if d not in include_dirs: include_dirs.append(d)
def __init__(self): from distutils.sysconfig import get_python_inc py_incl_dir = get_python_inc() include_dirs = [py_incl_dir] for d in default_include_dirs: d = os.path.join(d, os.path.basename(py_incl_dir)) if d not in include_dirs: include_dirs.append(d) system_info.__init__(self, default_lib_dirs=[], default_include_dirs=include_dirs)
78aa98e2bc6b4bc1cb0d39dc8c43a40fc2a96215 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/78aa98e2bc6b4bc1cb0d39dc8c43a40fc2a96215/system_info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 628, 2411, 5471, 18, 9499, 1425, 1930, 336, 67, 8103, 67, 9523, 2395, 67, 267, 830, 67, 1214, 273, 336, 67, 8103, 67, 9523, 1435, 2341, 67, 8291, 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, 1001, 2738, 972, 12, 2890, 4672, 628, 2411, 5471, 18, 9499, 1425, 1930, 336, 67, 8103, 67, 9523, 2395, 67, 267, 830, 67, 1214, 273, 336, 67, 8103, 67, 9523, 1435, 2341, 67, 8291, 273, ...
r = cr.fetchone()[0]
r = cr.fetchone() if r: r = r[0]
def check(self, cr, uid, model, mode='read', raise_exception=True, context=None): if uid==1: # User root have all accesses # TODO: exclude xml-rpc requests return True
09df5e21055072a1c5c1ba15f4ac591fb0db02f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/09df5e21055072a1c5c1ba15f4ac591fb0db02f4/ir_model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 4422, 16, 4555, 16, 938, 16, 1965, 2218, 896, 2187, 1002, 67, 4064, 33, 5510, 16, 819, 33, 7036, 4672, 309, 4555, 631, 21, 30, 468, 2177, 1365, 1240, 777, 2006, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 4422, 16, 4555, 16, 938, 16, 1965, 2218, 896, 2187, 1002, 67, 4064, 33, 5510, 16, 819, 33, 7036, 4672, 309, 4555, 631, 21, 30, 468, 2177, 1365, 1240, 777, 2006, 28...
line = lines[curline] if line.startswith("\\begin_inset ERT"): ert_end = find_end_of_inset(lines, curline + 1) continue elif line.startswith("\\begin_inset Formula"): line = line[20:] elif line.startswith("\\begin_inset Quotes"): qtype = line[20:].strip() side = qtype[1] dbls = qtype[2] if side == "l": if dbls == "d": line = "``" else: line = "`" else: if dbls == "d": line = "''" else: line = "'" elif line.isspace() or \ line.startswith("\\begin_layout") or \ line.startswith("\\end_layout") or \ line.startswith("\\begin_inset") or \ line.startswith("\\end_inset") or \ line.startswith("\\lang") or \ line.strip() == "status collapsed" or \ line.strip() == "status open": continue add_to_preamble(document, ['% added by lyx2lyx for converted index entries', '\\@ifundefined{textmu}', ' {\\usepackage{textcomp}}{}']) if ert_end >= curline: line = line.replace(r'\backslash', r'\\') else: line = line.replace('&', '\\&{}') line = line.replace(' line = line.replace('^', '\\^{}') line = line.replace('%', '\\%{}') line = line.replace('_', '\\_{}') line = line.replace('$', '\\${}') for rep in unicode_reps: line = line.replace(rep[1], rep[0] + "{}") line = line.replace(r'\backslash', r'\textbackslash{}') line = line.replace(r'\series bold', r'\bfseries{}').replace(r'\series default', r'\mdseries{}') line = line.replace(r'\shape italic', r'\itshape{}').replace(r'\shape smallcaps', r'\scshape{}') line = line.replace(r'\shape slanted', r'\slshape{}').replace(r'\shape default', r'\upshape{}') line = line.replace(r'\emph on', r'\em{}').replace(r'\emph default', r'\em{}') line = line.replace(r'\noun on', r'\scshape{}').replace(r'\noun default', r'\upshape{}') line = line.replace(r'\bar under', r'\underbar{').replace(r'\bar default', r'}') line = line.replace(r'\family sans', r'\sffamily{}').replace(r'\family default', r'\normalfont{}') line = line.replace(r'\family typewriter', r'\ttfamily{}').replace(r'\family roman', r'\rmfamily{}') line = line.replace(r'\InsetSpace ', r'').replace(r'\SpecialChar ', r'') content += line
line = lines[curline] if line.startswith("\\begin_inset ERT"): ert_end = find_end_of_inset(lines, curline + 1) continue inert = ert_end >= curline content += lyxline2latex(document, lines[curline], inert)
def lyx2latex(document, lines): 'Convert some LyX stuff into corresponding LaTeX stuff, as best we can.' # clean up multiline stuff content = "" ert_end = 0 for curline in range(len(lines)): line = lines[curline] if line.startswith("\\begin_inset ERT"): # We don't want to replace things inside ERT, so figure out # where the end of the inset is. ert_end = find_end_of_inset(lines, curline + 1) continue elif line.startswith("\\begin_inset Formula"): line = line[20:] elif line.startswith("\\begin_inset Quotes"): # For now, we do a very basic reversion. Someone who understands # quotes is welcome to fix it up. qtype = line[20:].strip() # lang = qtype[0] side = qtype[1] dbls = qtype[2] if side == "l": if dbls == "d": line = "``" else: line = "`" else: if dbls == "d": line = "''" else: line = "'" elif line.isspace() or \ line.startswith("\\begin_layout") or \ line.startswith("\\end_layout") or \ line.startswith("\\begin_inset") or \ line.startswith("\\end_inset") or \ line.startswith("\\lang") or \ line.strip() == "status collapsed" or \ line.strip() == "status open": #skip all that stuff continue # this needs to be added to the preamble because of cases like # \textmu, \textbackslash, etc. add_to_preamble(document, ['% added by lyx2lyx for converted index entries', '\\@ifundefined{textmu}', ' {\\usepackage{textcomp}}{}']) # a lossless reversion is not possible # try at least to handle some common insets and settings if ert_end >= curline: line = line.replace(r'\backslash', r'\\') else: line = line.replace('&', '\\&{}') line = line.replace('#', '\\#{}') line = line.replace('^', '\\^{}') line = line.replace('%', '\\%{}') line = line.replace('_', '\\_{}') line = line.replace('$', '\\${}') # Do the LyX text --> LaTeX conversion for rep in unicode_reps: line = line.replace(rep[1], rep[0] + "{}") line = line.replace(r'\backslash', r'\textbackslash{}') line = line.replace(r'\series bold', r'\bfseries{}').replace(r'\series default', r'\mdseries{}') line = line.replace(r'\shape italic', r'\itshape{}').replace(r'\shape smallcaps', r'\scshape{}') line = line.replace(r'\shape slanted', r'\slshape{}').replace(r'\shape default', r'\upshape{}') line = line.replace(r'\emph on', r'\em{}').replace(r'\emph default', r'\em{}') line = line.replace(r'\noun on', r'\scshape{}').replace(r'\noun default', r'\upshape{}') line = line.replace(r'\bar under', r'\underbar{').replace(r'\bar default', r'}') line = line.replace(r'\family sans', r'\sffamily{}').replace(r'\family default', r'\normalfont{}') line = line.replace(r'\family typewriter', r'\ttfamily{}').replace(r'\family roman', r'\rmfamily{}') line = line.replace(r'\InsetSpace ', r'').replace(r'\SpecialChar ', r'') content += line return content
5ef8c7bc54d8157c9afe8ec8565ae0f5e09a44d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/5ef8c7bc54d8157c9afe8ec8565ae0f5e09a44d0/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18519, 92, 22, 26264, 12, 5457, 16, 2362, 4672, 296, 2723, 2690, 511, 93, 60, 10769, 1368, 4656, 21072, 21575, 60, 10769, 16, 487, 3796, 732, 848, 1093, 468, 2721, 731, 19431, 10769, 913...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18519, 92, 22, 26264, 12, 5457, 16, 2362, 4672, 296, 2723, 2690, 511, 93, 60, 10769, 1368, 4656, 21072, 21575, 60, 10769, 16, 487, 3796, 732, 848, 1093, 468, 2721, 731, 19431, 10769, 913...
logger.debug("removing segment_definer row for key %s"
ligomd.table['segment_definer']['stream'].pop(row_idx) logger.debug("removed segment_definer row for key %s"
uniq_def = (row[run_col],row[ifos_col],row[name_col],row[vers_col])
cc8ed73c84b31177ed12b5faed7b07d63eea2809 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/cc8ed73c84b31177ed12b5faed7b07d63eea2809/LDBDServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 10748, 67, 536, 273, 261, 492, 63, 2681, 67, 1293, 6487, 492, 63, 430, 538, 67, 1293, 6487, 492, 63, 529, 67, 1293, 6487, 492, 63, 2496, 67, 1293, 5717, 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, 10748, 67, 536, 273, 261, 492, 63, 2681, 67, 1293, 6487, 492, 63, 430, 538, 67, 1293, 6487, 492, 63, 529, 67, 1293, 6487, 492, 63, 2496, 67, 1293, 5717, 2, -100, -100, -100, -100, -100, -1...
source = unicode(source)
if source is not None: source = unicode(source)
def _get_sources(self, cursor, args): ''' Take a list of (name, ttype, lang, source). Add the translations to the cache. Return a dict with the translations. ''' res = {} clause = '' value = [] if len(args) > cursor.IN_MAX: for i in range(0, len(args), cursor.IN_MAX): sub_args = args[i:i + cursor.IN_MAX] res.update(self._get_sources(cursor, sub_args)) return res for name, ttype, lang, source in args: name = unicode(name) ttype = unicode(ttype) lang = unicode(lang) source = unicode(source) trans = self.get(cursor, (lang, ttype, name, source)) if trans is not None: res[(name, ttype, lang, source)] = trans else: res[(name, ttype, lang, source)] = False self.add(cursor, (lang, ttype, name, source), False) if clause: clause += ' OR ' if source: source = source.strip().replace('\n',' ') clause += '(lang = %s ' \ 'AND type = %s ' \ 'AND name = %s ' \ 'AND src = %s ' \ 'AND value != \'\' ' \ 'AND value IS NOT NULL ' \ 'AND fuzzy = false)' value.extend((lang, ttype, str(name), source)) else: clause += '(lang = %s ' \ 'AND type = %s ' \ 'AND name = %s ' \ 'AND value != \'\' ' \ 'AND value IS NOT NULL ' \ 'AND fuzzy = false)' value.extend((lang, ttype, str(name))) if clause: cursor.execute('SELECT lang, type, name, src, value ' \ 'FROM ir_translation ' \ 'WHERE ' + clause, value) for lang, ttype, name, source, value in cursor.fetchall(): res[(name, ttype, lang, source)] = value self.add(cursor, (lang, ttype, name, source), value) return res
edb8a060fde581e023d8ef428a079a3f3a4e5eba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/edb8a060fde581e023d8ef428a079a3f3a4e5eba/translation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10141, 12, 2890, 16, 3347, 16, 833, 4672, 9163, 17129, 279, 666, 434, 261, 529, 16, 27963, 16, 3303, 16, 1084, 2934, 1436, 326, 7863, 358, 326, 1247, 18, 2000, 279, 2065,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10141, 12, 2890, 16, 3347, 16, 833, 4672, 9163, 17129, 279, 666, 434, 261, 529, 16, 27963, 16, 3303, 16, 1084, 2934, 1436, 326, 7863, 358, 326, 1247, 18, 2000, 279, 2065,...
if sum([string is not None, frequencies is not None]) != 1: raise ValueError("Exactly one of `string` or `frequencies` parameters must be defined")
self._tree = None self._index = None
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
0aa5d0e07206199e4e64708c13056046cecfe083 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0aa5d0e07206199e4e64708c13056046cecfe083/huffman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 533, 273, 599, 16, 18138, 273, 599, 4672, 436, 8395, 11417, 364, 670, 28581, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 533, 273, 599, 16, 18138, 273, 599, 4672, 436, 8395, 11417, 364, 670, 28581, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if seg[0]<gpsStart:
if int(newStart)<int(gpsStart):
def getSciSegs(serverURL="ldbd://metaserver.phy.syr.edu:30015", ifo=None, gpsStart=None, gpsStop=None, cut=bool(False)): """ This method is designed to query the server specified by SERVERURL. The method will return the segments that are between and overlaping with the variable gpsStart and gpsStop. If the flag cut is specified to be True then the returned lists will be cut so that the times are between gpsStart and gpsStop inclusive. In addition to these required arguments you must also specify in a text string the IFO of interest. Valid entries are L1 H1 V1 , but only one IFO at a time can be specified. You can call this method by specifying specific keyswords ifo,gpsStart,gpsStop,cut,serverURL. For example to call using no segment cuts and the default URL try: x=getSciSegs(gpsStart=987654321,gpsStop=876543210) A query failure will give an error but no records found for the options specified will return an empty list. """ if sum([x==None for x in (ifo,gpsStart,gpsStop)])>0: os.stderr.write("Invalid arguments given to getSciSegs.\n") return None ifo=ifo.strip() queryString="""SELECT \
1e29e36156588ee071e46ba72a98a2110619ac3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/1e29e36156588ee071e46ba72a98a2110619ac3d/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 8450, 1761, 564, 12, 3567, 1785, 1546, 1236, 16410, 2207, 10578, 345, 12330, 18, 844, 93, 18, 9009, 86, 18, 28049, 30, 19249, 3600, 3113, 21479, 33, 7036, 16, 20985, 1685, 33, 7036...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 8450, 1761, 564, 12, 3567, 1785, 1546, 1236, 16410, 2207, 10578, 345, 12330, 18, 844, 93, 18, 9009, 86, 18, 28049, 30, 19249, 3600, 3113, 21479, 33, 7036, 16, 20985, 1685, 33, 7036...
IStatusMessage(self.request).addStatusMessage(_(u"Changes saved"), "info")
IStatusMessage(self.request).addStatusMessage(_(u"Item created"), "info")
def handleAdd(self, action): data, errors = self.extractData() if errors: self.status = self.formErrorsMessage return obj = self.createAndAdd(data) if obj is not None: # mark only as finished if we get the new object self._finishedAdd = True IStatusMessage(self.request).addStatusMessage(_(u"Changes saved"), "info")
a4f825f3e799f514951acc569f9034c418dfa12d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12260/a4f825f3e799f514951acc569f9034c418dfa12d/add.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 986, 12, 2890, 16, 1301, 4672, 501, 16, 1334, 273, 365, 18, 8004, 751, 1435, 309, 1334, 30, 365, 18, 2327, 273, 365, 18, 687, 4229, 1079, 327, 1081, 273, 365, 18, 2640, 1876, 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, 1640, 986, 12, 2890, 16, 1301, 4672, 501, 16, 1334, 273, 365, 18, 8004, 751, 1435, 309, 1334, 30, 365, 18, 2327, 273, 365, 18, 687, 4229, 1079, 327, 1081, 273, 365, 18, 2640, 1876, 9...
if typeGuess and typeGuess1 and typeGuess == typeGuess1: pass
if typeGuess and typeGuess1 and typeGuess == typeGuess1: pass
def getFilenameFromHTTP(info, url): u"""info is an http header from the download, url is the url to the downloaded file (responseObject.geturl() ). or not. the response object is not unicode, and we like unicode. So the original, unicode url may be passed.""" filename = None logStatusMsg(u"determining filename", 5) filename = email.message_from_string(unicodeC(info).encode('utf-8')).get_filename(failobj=False) if filename: m = htmlUnQuote(filename) if m.result: filename = m.result logStatusMsg(u"filename from content-disposition header", 5) return unicodeC( filename ) # trust filename from http header over our URL extraction technique logStatusMsg(u"filename from url", 5) filename = percentUnQuote( urlparse.urlparse( url )[2].split('/')[-1] ) # Tup[2] is the path try: typeGuess = info.gettype() except AttributeError: typeGuess = None typeGuess1 = mimetypes.guess_type(filename)[0] if typeGuess and typeGuess1 and typeGuess == typeGuess1: pass # we're good elif typeGuess: # trust server content-type over filename logStatusMsg(u"getting extension from content-type header", 5) fileExt = mimetypes.guess_extension(typeGuess) if fileExt: # sloppy filename guess, probably will never get hit if not filename: logStatusMsg(u"never guessed filename, just setting it to the time", 5) filename = unicodeC( int(time.time()) ) + fileExt else: filename += fileExt elif 'content_type' not in info: msg = u"Proper file extension could not be determined for the downloaded file: %s you may need to add an extension to the file for it to work in some programs. It came from url %s. It may be correct, but I have no way of knowing due to insufficient information from the server." % (filename, url) logStatusMsg( msg, 1 ) if not filename: logStatusMsg('Could not determine filename for torrent from %s' % url, 1) return None if filename.endswith('.obj'): filename = filename[:-4] return unicodeC( filename)
633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14632, 1265, 3693, 12, 1376, 16, 880, 4672, 582, 8395, 1376, 353, 392, 1062, 1446, 628, 326, 4224, 16, 880, 353, 326, 880, 358, 326, 13549, 585, 261, 2740, 921, 18, 588, 718, 1435, 262...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14632, 1265, 3693, 12, 1376, 16, 880, 4672, 582, 8395, 1376, 353, 392, 1062, 1446, 628, 326, 4224, 16, 880, 353, 326, 880, 358, 326, 13549, 585, 261, 2740, 921, 18, 588, 718, 1435, 262...
LOG('ZServer', severity[type], message)
LOG('ZServer', severity[type], message)
def log_info(self, message, type='info'): if message[:14]=='adding channel' or \ message[:15]=='closing channel' or \ message == 'Computing default hostname': LOG('ZServer', BLATHER, message) else: LOG('ZServer', severity[type], message)
4e6ad399d16bb07341c9fe28d936f3bef90b3b54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/4e6ad399d16bb07341c9fe28d936f3bef90b3b54/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 1376, 12, 2890, 16, 883, 16, 618, 2218, 1376, 11, 4672, 309, 883, 10531, 3461, 65, 18920, 3439, 1904, 11, 578, 521, 883, 10531, 3600, 65, 18920, 19506, 1904, 11, 578, 521, 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, 613, 67, 1376, 12, 2890, 16, 883, 16, 618, 2218, 1376, 11, 4672, 309, 883, 10531, 3461, 65, 18920, 3439, 1904, 11, 578, 521, 883, 10531, 3600, 65, 18920, 19506, 1904, 11, 578, 521, 883...
elif argType=='/new': return 1
def ProcessArgs(self, args, dde = None): # If we are going to talk to a remote app via DDE, then # activate it! if dde is not None: dde.Exec("self.Activate()") if len(args) and args[0] in ['/nodde','/newinstance']: del args[0] # already handled. if len(args)<1 or not args[0]: # argv[0]=='' when started without args, just like Python.exe! return try: if args[0] and args[0][0]!='/': argStart = 0 argType = win32ui.GetProfileVal("Python","Default Arg Type","/edit").lower() else: argStart = 1 argType = args[0] if argStart >= len(args): raise TypeError("The command line requires an additional arg.") if argType=="/edit": # Load up the default application. if dde: fname = win32api.GetFullPathName(args[argStart]) dde.Exec("win32ui.GetApp().OpenDocumentFile(%s)" % (repr(fname))) else: win32ui.GetApp().OpenDocumentFile(args[argStart]) elif argType=="/rundlg": if dde: dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils scriptutils.RunScript(args[argStart], ' '.join(args[argStart+1:])) elif argType=="/run": if dde: dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils scriptutils.RunScript(args[argStart], ' '.join(args[argStart+1:]), 0) elif argType=="/app": raise RuntimeError("/app only supported for new instances of Pythonwin.exe") elif argType=='/new': # Allow a new instance of Pythonwin return 1 elif argType=='/dde': # Send arbitary command if dde is not None: dde.Exec(args[argStart]) else: win32ui.MessageBox("The /dde command can only be used\r\nwhen Pythonwin is already running") else: raise TypeError("Command line arguments not recognised") except: # too early for print anything. win32ui.DisplayTraceback(sys.exc_info(), " - error processing command line args")
027cb7c66e196ab1760204f5a4e39f7167ce22ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/027cb7c66e196ab1760204f5a4e39f7167ce22ae/intpyapp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 2615, 12, 2890, 16, 833, 16, 302, 323, 273, 599, 4672, 468, 971, 732, 854, 8554, 358, 26591, 358, 279, 2632, 595, 3970, 463, 1639, 16, 1508, 468, 10235, 518, 5, 309, 302, 323, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 2615, 12, 2890, 16, 833, 16, 302, 323, 273, 599, 4672, 468, 971, 732, 854, 8554, 358, 26591, 358, 279, 2632, 595, 3970, 463, 1639, 16, 1508, 468, 10235, 518, 5, 309, 302, 323, ...
output = 'WARNING: Output truncated!\n' + output[:MAX_OUTPUT] + '\n(truncated)'
if output.lstrip()[:len(TRACEBACK)] != TRACEBACK: output = 'WARNING: Output truncated!\n' + output[:MAX_OUTPUT] + '\n(truncated)' else: output = output[:MAX_OUTPUT] + '\n(truncated)'
def set_output_text(self, output, html, sage=None): output = output.replace('\r','') i = output.find(worksheet.SAGE_VARS) if i != -1: output = output[:i] if len(output) > MAX_OUTPUT: output = 'WARNING: Output truncated!\n' + output[:MAX_OUTPUT] + '\n(truncated)' self.__out = output self.__out_html = html self.__sage = sage
c4ab78446ea632038ba497db6732da90c79b4b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/c4ab78446ea632038ba497db6732da90c79b4b10/cell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2844, 67, 955, 12, 2890, 16, 876, 16, 1729, 16, 272, 410, 33, 7036, 4672, 876, 273, 876, 18, 2079, 2668, 64, 86, 17023, 6134, 277, 273, 876, 18, 4720, 12, 1252, 8118, 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, 444, 67, 2844, 67, 955, 12, 2890, 16, 876, 16, 1729, 16, 272, 410, 33, 7036, 4672, 876, 273, 876, 18, 2079, 2668, 64, 86, 17023, 6134, 277, 273, 876, 18, 4720, 12, 1252, 8118, 18, ...
f.name = '(pure %r)' % repr(x) return f
_pure.name = '(pure %r)' % repr(x) return _pure
def f(_, s): return (x, s)
a98e7a502632761f6288209a1068fea4b06004b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11574/a98e7a502632761f6288209a1068fea4b06004b2/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 24899, 16, 272, 4672, 327, 261, 92, 16, 272, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 24899, 16, 272, 4672, 327, 261, 92, 16, 272, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
activity = dict.get('activity', None);
def onUpdateStatus(self, dict): fractionDone = dict.get('fractionDone', None); timeEst = dict.get('timeEst', None); downRate = dict.get('downRate', None); upRate = dict.get('upRate', None); activity = dict.get('activity', None); downTotal = dict.get('downTotal', None); upTotal = dict.get('upTotal', None); if fractionDone is not None and not self.fin: self.gauge.SetValue(int(fractionDone * 1000)) self.frame.SetTitle('%d%% %s - BitTorrent %s' % (int(fractionDone*100), self.filename, version)) if timeEst is not None: self.timeEstText.SetLabel(hours(dict['timeEst'])) if activity is not None and not self.fin: self.timeEstText.SetLabel(activity) if downRate is not None: self.downRateText.SetLabel('%.0f KiB/s' % (float(downRate) / (1 << 10))) if upRate is not None: self.upRateText.SetLabel('%.0f KiB/s' % (float(upRate) / (1 << 10))) if downTotal is not None: self.downTotalText.SetLabel('%.1f MiB/s' % (downTotal)) if upTotal is not None: self.upTotalText.SetLabel('%.1f MiB/s' % (upTotal))
2d868aeec4c0310f00c36989ee66c1416373df86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4538/2d868aeec4c0310f00c36989ee66c1416373df86/btdownloadgui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 1482, 12, 2890, 16, 2065, 4672, 8330, 7387, 273, 2065, 18, 588, 2668, 16744, 7387, 2187, 599, 1769, 813, 9122, 273, 2065, 18, 588, 2668, 957, 9122, 2187, 599, 1769, 2588, 4727, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 1482, 12, 2890, 16, 2065, 4672, 8330, 7387, 273, 2065, 18, 588, 2668, 16744, 7387, 2187, 599, 1769, 813, 9122, 273, 2065, 18, 588, 2668, 957, 9122, 2187, 599, 1769, 2588, 4727, 27...
L = [
test_conv_no_sign = [
def write(self, line): pass
9d23adb4de4f4b645bd57e54b868b250619f66a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/9d23adb4de4f4b645bd57e54b868b250619f66a7/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 980, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 980, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
log.debug('CALLED RECORD STOP 1')
_debug_('CALLED RECORD STOP 1')
def checkToRecord(self): if DEBUG: log.debug('in checkToRecord') rec_cmd = None rec_prog = None cleaned = None delay_recording = FALSE total_padding = 0
dbf3be6baca9b3de2bbdcffda6a49e6878cff42d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/dbf3be6baca9b3de2bbdcffda6a49e6878cff42d/recordserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 774, 2115, 12, 2890, 4672, 309, 6369, 30, 613, 18, 4148, 2668, 267, 866, 774, 2115, 6134, 1950, 67, 4172, 273, 599, 1950, 67, 14654, 273, 599, 9426, 273, 599, 4624, 67, 3366, 310,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 774, 2115, 12, 2890, 4672, 309, 6369, 30, 613, 18, 4148, 2668, 267, 866, 774, 2115, 6134, 1950, 67, 4172, 273, 599, 1950, 67, 14654, 273, 599, 9426, 273, 599, 4624, 67, 3366, 310,...
print new_link temp_links.append(new_link)
print new_link temp_links.append(new_link)
def proceed(self, url, location): container_id = self.parent.url.split("/")[-1].split("id=")[-1] url = "http://relink.us/view.php?id="+container_id self.html = self.req.load(url, cookies=True) temp_links = []
2599ae0c23fd9f0766ba22a1741d458a08985823 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/2599ae0c23fd9f0766ba22a1741d458a08985823/RelinkUs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11247, 12, 2890, 16, 880, 16, 2117, 4672, 1478, 67, 350, 273, 365, 18, 2938, 18, 718, 18, 4939, 2932, 4898, 13, 18919, 21, 8009, 4939, 2932, 350, 1546, 13, 18919, 21, 65, 880, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11247, 12, 2890, 16, 880, 16, 2117, 4672, 1478, 67, 350, 273, 365, 18, 2938, 18, 718, 18, 4939, 2932, 4898, 13, 18919, 21, 8009, 4939, 2932, 350, 1546, 13, 18919, 21, 65, 880, 273, 3...
classAddReq.insertAttributeString( 'GridMiddleware', classAdJob.get_expression( 'GridMiddleware' ) )
classAddReq.set_expression( 'GridMiddleware', classAdJob.get_expression( 'GridMiddleware' ) )
def __sendJobToTaskQueue(self, job, classAdJob, siteCandidates, bannedSites): """This method sends jobs to the task queue agent and if candidate sites are defined, updates job JDL accordingly. """
23e51c00abffabe26aa8e179bef06759b2240851 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/23e51c00abffabe26aa8e179bef06759b2240851/JobSchedulingAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4661, 2278, 774, 2174, 3183, 12, 2890, 16, 1719, 16, 667, 1871, 2278, 16, 2834, 18455, 16, 324, 10041, 17055, 4672, 3536, 2503, 707, 9573, 6550, 358, 326, 1562, 2389, 4040, 471, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4661, 2278, 774, 2174, 3183, 12, 2890, 16, 1719, 16, 667, 1871, 2278, 16, 2834, 18455, 16, 324, 10041, 17055, 4672, 3536, 2503, 707, 9573, 6550, 358, 326, 1562, 2389, 4040, 471, 30...
the string representation of an object.
the string representation of the simplified form.
def __hash__(self): """ Returns the hash of this symbolic expression.
8eedbbfce167c1470bdff16fb0f03226d63a4e84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8eedbbfce167c1470bdff16fb0f03226d63a4e84/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 3536, 2860, 326, 1651, 434, 333, 16754, 2652, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 3536, 2860, 326, 1651, 434, 333, 16754, 2652, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu"
elif(re.match(dm['suspend_machine'], msg)): data.dmesg['suspend_noirq']['end'] = ktime phase = 'suspend_machine'
def analyzeKernelLog(): global sysvals, data print("PROCESSING DATA") data.vprint("Analyzing the dmesg data...") if(os.path.exists(sysvals.dmesgfile) == False): print("ERROR: %s doesn't exist") % sysvals.dmesgfile return False lf = sortKernelLog() phase = "suspend_runtime" dm = { 'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", } if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf: # -- preprocessing -- # parse each dmesg line into the time and message m = re.match(r".*(\[ *)(?P<ktime>[0-9\.]*)(\]) (?P<msg>.*)", line) if(m): ktime = float(m.group("ktime")) msg = m.group("msg") else: print line continue # -- phase changes -- # suspend_general start if(re.match(dm['suspend_general'], msg)): phase = "suspend_general" data.dmesg[phase]['start'] = ktime data.start = ktime # action start: syncing filesystems action_start = ktime # suspend_early start elif(re.match(dm['suspend_early'], msg)): data.dmesg["suspend_general"]['end'] = ktime phase = "suspend_early" data.dmesg[phase]['start'] = ktime # suspend_noirq start elif(re.match(dm['suspend_noirq'], msg)): data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq" data.dmesg[phase]['start'] = ktime # suspend_cpu start elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu" data.dmesg[phase]['start'] = ktime # resume_cpu start elif(re.match(dm['resume_cpu'], msg)): data.tSuspended = ktime data.dmesg["suspend_cpu"]['end'] = ktime phase = "resume_cpu" data.dmesg[phase]['start'] = ktime # resume_noirq start elif(re.match(dm['resume_noirq'], msg)): data.dmesg["resume_cpu"]['end'] = ktime phase = "resume_noirq" data.dmesg[phase]['start'] = ktime # action end: ACPI resume data.newAction("resume_cpu", "ACPI", -1, "", action_start, ktime) # resume_early start elif(re.match(dm['resume_early'], msg)): data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early" data.dmesg[phase]['start'] = ktime # resume_general start elif(re.match(dm['resume_general'], msg)): data.dmesg["resume_early"]['end'] = ktime phase = "resume_general" data.dmesg[phase]['start'] = ktime # resume complete start elif(re.match(dm['resume_complete'], msg)): data.dmesg["resume_general"]['end'] = ktime data.end = ktime phase = "resume_runtime" break # -- device callbacks -- if(phase in data.phases): # device init call if(re.match(r"calling (?P<f>.*)\+ @ .*, parent: .*", msg)): sm = re.match(r"calling (?P<f>.*)\+ @ (?P<n>.*), parent: (?P<p>.*)", msg); f = sm.group("f") n = sm.group("n") p = sm.group("p") if(f and n and p): data.newAction(phase, f, int(n), p, ktime, -1) # device init return elif(re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs", msg)): sm = re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs(?P<a>.*)", msg); f = sm.group("f") t = sm.group("t") list = data.dmesg[phase]['list'] if(f in list): dev = list[f] dev['length'] = int(t) dev['end'] = ktime data.vprint("%15s [%f - %f] %s(%d) %s" % (phase, dev['start'], dev['end'], f, dev['pid'], dev['par'])) # -- phase specific actions -- if(phase == "suspend_general"): if(re.match(r"PM: Preparing system for mem sleep.*", msg)): data.newAction(phase, "filesystem-sync", -1, "", action_start, ktime) elif(re.match(r"Freezing user space processes .*", msg)): action_start = ktime elif(re.match(r"Freezing remaining freezable tasks.*", msg)): data.newAction(phase, "freeze-user-processes", -1, "", action_start, ktime) action_start = ktime elif(re.match(r"PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*", msg)): data.newAction(phase, "freeze-tasks", -1, "", action_start, ktime) elif(phase == "suspend_cpu"): m = re.match(r"smpboot: CPU (?P<cpu>[0-9]*) is now offline", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"ACPI: Preparing to enter system sleep state.*", msg)): action_start = ktime elif(re.match(r"Disabling non-boot CPUs .*", msg)): data.newAction(phase, "ACPI", -1, "", action_start, ktime) action_start = ktime elif(phase == "resume_cpu"): m = re.match(r"CPU(?P<cpu>[0-9]*) is up", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"Enabling non-boot CPUs .*", msg)): action_start = ktime # fill in any missing phases lp = "suspend_general" for p in data.phases: if(p == "suspend_general"): continue if(data.dmesg[p]['start'] < 0): data.dmesg[p]['start'] = data.dmesg[lp]['end'] if(p == "resume_cpu"): data.tSuspended = data.dmesg[lp]['end'] if(data.dmesg[p]['end'] < 0): data.dmesg[p]['end'] = data.dmesg[p]['start'] lp = p data.fixupInitcallsThatDidntReturn() return True
0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
assert self.dprint("processing chunk [%d:%d, %d:%d]" % (u1, u2, v1, v2))
assert self.dprint("processing chunk [%d:%d, %d:%d], min=%d max=%d" % (u1, u2, v1, v2, minval, maxval))
def scaleChunk(self, raw, minval, maxval, u1, u2, v1, v2, output): assert self.dprint("processing chunk [%d:%d, %d:%d]" % (u1, u2, v1, v2)) if minval == maxval: output[u1:u2, v1:v2] = (raw[u1:u2, v1:v2] - minval).astype(numpy.uint8) else: #gray=((raw-minval)*(255.0/(maxval-minval))).astype(numpy.uint8) temp1 = raw[u1:u2, v1:v2] - minval temp2 = temp1 * (255.0/(maxval-minval)) output[u1:u2, v1:v2] = temp2.astype(numpy.uint8)
56188d9ce087ed3501aadcd2009ec913d830865d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/56188d9ce087ed3501aadcd2009ec913d830865d/filter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 5579, 12, 2890, 16, 1831, 16, 1131, 1125, 16, 30443, 16, 582, 21, 16, 582, 22, 16, 331, 21, 16, 331, 22, 16, 876, 4672, 1815, 365, 18, 72, 1188, 2932, 10632, 2441, 9799, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3159, 5579, 12, 2890, 16, 1831, 16, 1131, 1125, 16, 30443, 16, 582, 21, 16, 582, 22, 16, 331, 21, 16, 331, 22, 16, 876, 4672, 1815, 365, 18, 72, 1188, 2932, 10632, 2441, 9799, 72, ...
if source_url :
LOG.info("Radio content", source_url) if source_url : LOG.info("Radio url", source_url)
def get_radio_source(url): if url: if url.endswith(".pls"): source_url = getStationPath(url) if source_url : return source_url elif url.endswith(".m3u"): content = get_content(url) for line in content.rsplit(): if not line.startswith("#"): return line return url
adeb81d5b38c0a966bacdba3eb53f680a94be299 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/adeb81d5b38c0a966bacdba3eb53f680a94be299/plsparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 17006, 67, 3168, 12, 718, 4672, 309, 880, 30, 309, 880, 18, 5839, 1918, 2932, 18, 412, 87, 6, 4672, 1084, 67, 718, 273, 336, 16672, 743, 12, 718, 13, 2018, 18, 1376, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17006, 67, 3168, 12, 718, 4672, 309, 880, 30, 309, 880, 18, 5839, 1918, 2932, 18, 412, 87, 6, 4672, 1084, 67, 718, 273, 336, 16672, 743, 12, 718, 13, 2018, 18, 1376, 2932, ...
if userhome.endswith('/'): i += 1
userhome = userhome.rstrip('/')
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if not path.startswith('~'): return path i = path.find('/', 1) if i < 0: i = len(path) if i == 1: if 'HOME' not in os.environ: import pwd userhome = pwd.getpwuid(os.getuid()).pw_dir else: userhome = os.environ['HOME'] else: import pwd try: pwent = pwd.getpwnam(path[1:i]) except KeyError: return path userhome = pwent.pw_dir if userhome.endswith('/'): i += 1 return userhome + path[i:]
1775cbd57556ff8c73c5486683d0652f0f01c800 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1775cbd57556ff8c73c5486683d0652f0f01c800/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14717, 12, 803, 4672, 3536, 12271, 4871, 471, 4871, 1355, 16171, 87, 18, 225, 971, 729, 578, 271, 14209, 353, 5917, 16, 741, 5083, 12123, 309, 486, 589, 18, 17514, 1918, 2668, 20206, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14717, 12, 803, 4672, 3536, 12271, 4871, 471, 4871, 1355, 16171, 87, 18, 225, 971, 729, 578, 271, 14209, 353, 5917, 16, 741, 5083, 12123, 309, 486, 589, 18, 17514, 1918, 2668, 20206, 467...
def __changePathFunction(self,paths,s_uid,s_gid,change_function_directory,change_function_file):
def __changePathFunction(self,paths,credDict,change_function_directory,change_function_file):
def __changePathFunction(self,paths,s_uid,s_gid,change_function_directory,change_function_file): """ A generic function to change Owner, Group or Mode for the given paths """ result = self.findUser(s_uid) if not result['OK']: return result uid = result['Value'] result = self.findGroup(s_gid) if not result['OK']: return result gid = result['Value'] result = checkArgumentFormat(paths) if not result['OK']: return result arguments = result['Value'] dirList = [] result = self.isDirectory(paths,uid,gid) if not result['OK']: return result for p in result['Value']['Successful']: if result['Value']['Successful'][p]: dirList.append(p) fileList = [] if len(dirList) < len(paths): result = self.isFile(paths,uid,gid) if not result['OK']: return result fileList = result['Value']['Successful'].keys() successful = {} failed = {} dirArgs = {} fileArgs = {} for path in arguments: if (not path in dirList) and (not path in fileList): failed[path] = 'Path not found' if path in dirList: dirArgs[path] = arguments[path] elif path in fileList: fileArgs[path] = arguments[path] if dirArgs: result = change_function_directory(dirArgs,uid,gid) if not result['OK']: return result successful.update(result['Value']['Successful']) failed.update(result['Value']['Successful']) if fileArgs: result = change_function_file(fileArgs,uid,gid) if not result['OK']: return result successful.update(result['Value']['Successful']) failed.update(result['Value']['Successful']) return S_OK({'Successful':successful,'Failed':failed})
3eab4a36ea67908c182928eca3df6778bb7f3555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3eab4a36ea67908c182928eca3df6778bb7f3555/FileCatalogDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3427, 743, 2083, 12, 2890, 16, 4481, 16, 20610, 5014, 16, 3427, 67, 915, 67, 5149, 16, 3427, 67, 915, 67, 768, 4672, 3536, 432, 5210, 445, 358, 2549, 16837, 16, 3756, 578, 8126, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3427, 743, 2083, 12, 2890, 16, 4481, 16, 20610, 5014, 16, 3427, 67, 915, 67, 5149, 16, 3427, 67, 915, 67, 768, 4672, 3536, 432, 5210, 445, 358, 2549, 16837, 16, 3756, 578, 8126, ...
self.root_playingitem.hide() self.root_drawingitem.show()
def playing_stop(self): if self.running: self.running=False self.root_playingitem.hide() self.root_drawingitem.show() self.root_coloritem.show() self.root_toolitem.show() self.item_frame_counter.set(text=len(self.cartoon)+1)
b1c14c9a59e62e367ea62c3c74cab73788521d4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/b1c14c9a59e62e367ea62c3c74cab73788521d4b/anim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23982, 67, 5681, 12, 2890, 4672, 309, 365, 18, 8704, 30, 365, 18, 8704, 33, 8381, 365, 18, 3085, 67, 3266, 1726, 18, 4500, 1435, 365, 18, 3085, 67, 6738, 1726, 18, 4500, 1435, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23982, 67, 5681, 12, 2890, 4672, 309, 365, 18, 8704, 30, 365, 18, 8704, 33, 8381, 365, 18, 3085, 67, 3266, 1726, 18, 4500, 1435, 365, 18, 3085, 67, 6738, 1726, 18, 4500, 1435, 365, 1...
else: raise util.Abort(_("Invalid response: '%s'") % result)
def prompt(name, fixonly=None): if args.get('auto', False): result = 'f' else: result = ui.prompt("(a)bort, (i)gnore, or (f)ix?", "^[aif]$", "a") if result == 'a': return True elif result == 'i': pass elif result == 'f': fixwhite(repo.wjoin(name), args['tabsize'], fixonly) else: raise util.Abort(_("Invalid response: '%s'") % result)
c128fed761ce885846fb3f026c9273f659a01858 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7385/c128fed761ce885846fb3f026c9273f659a01858/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6866, 12, 529, 16, 2917, 3700, 33, 7036, 4672, 309, 833, 18, 588, 2668, 6079, 2187, 1083, 4672, 563, 273, 296, 74, 11, 469, 30, 563, 273, 5915, 18, 13325, 2932, 12, 69, 13, 70, 499, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6866, 12, 529, 16, 2917, 3700, 33, 7036, 4672, 309, 833, 18, 588, 2668, 6079, 2187, 1083, 4672, 563, 273, 296, 74, 11, 469, 30, 563, 273, 5915, 18, 13325, 2932, 12, 69, 13, 70, 499, ...
self.assertEqual(result.encode('iso-8859-15').startswith(iso885915_str), True)
self.failUnless(result.encode('iso-8859-15' ).startswith(iso885915_str))
def testPT_RenderWithISO885915(self): manage_addPageTemplate(self.app, 'test', text=iso885915_str, encoding='iso-8859-15') zpt = self.app['test'] result = zpt.pt_render() # use startswith() because the renderer appends a trailing \n self.assertEqual(result.encode('iso-8859-15').startswith(iso885915_str), True) self.assertEqual(zpt.output_encoding, 'iso-8859-15')
9ee8932389e2937ac17156196be900f498e09cdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9658/9ee8932389e2937ac17156196be900f498e09cdc/testZopePageTemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1856, 67, 3420, 1190, 12609, 17258, 3600, 12, 2890, 4672, 10680, 67, 1289, 1964, 2283, 12, 2890, 18, 2910, 16, 296, 3813, 2187, 977, 33, 9699, 17258, 3600, 67, 701, 16, 2688, 2218,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1856, 67, 3420, 1190, 12609, 17258, 3600, 12, 2890, 4672, 10680, 67, 1289, 1964, 2283, 12, 2890, 18, 2910, 16, 296, 3813, 2187, 977, 33, 9699, 17258, 3600, 67, 701, 16, 2688, 2218,...
import pdb;pdb.set_trace()
def __call__(self, *inputs, **kwargs): """ Don't generate alloc that do nothing. If you always want an Alloc node, call make_node. """ ret = super(Alloc,self).__call__(*inputs,**kwargs) import pdb;pdb.set_trace() if inputs[0].type == ret.type: return inputs[0] else: return ret
47cfeb11d5ed13c5372ba01c04167706470263ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/47cfeb11d5ed13c5372ba01c04167706470263ce/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 10029, 16, 2826, 4333, 4672, 3536, 7615, 1404, 2103, 4767, 716, 741, 5083, 18, 971, 1846, 3712, 2545, 392, 12830, 756, 16, 745, 1221, 67, 2159, 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, 1001, 1991, 972, 12, 2890, 16, 380, 10029, 16, 2826, 4333, 4672, 3536, 7615, 1404, 2103, 4767, 716, 741, 5083, 18, 971, 1846, 3712, 2545, 392, 12830, 756, 16, 745, 1221, 67, 2159, 18, ...
name_width = max(name_width, max(len(r[0]) for r in results))
name_width = max([name_width] + [len(r[0]) for r in results])
def main(resfiles): result_lists = [] name_width = 40 for resfile in resfiles: try: text = open(resfile).read() except IOError: print "Bad result file: %s" % resfile continue results = parse_results(text) result_lists.append((resfile, results)) name_width = max(name_width, max(len(r[0]) for r in results)) print_result(("Test", "Status", "Seconds", "Info"), name_width) print_result(("----", "------", "-------", "----"), name_width) for resfile, results in result_lists: print " (Result file: %s)" % resfile for r in results: print_result(r, name_width)
716759aa6b50a16bd5ce648c54ba87ecc1e9edc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/716759aa6b50a16bd5ce648c54ba87ecc1e9edc7/scan_results.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 455, 2354, 4672, 563, 67, 9772, 273, 5378, 508, 67, 2819, 273, 8063, 225, 364, 400, 768, 316, 400, 2354, 30, 775, 30, 977, 273, 1696, 12, 455, 768, 2934, 896, 1435, 1335, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 455, 2354, 4672, 563, 67, 9772, 273, 5378, 508, 67, 2819, 273, 8063, 225, 364, 400, 768, 316, 400, 2354, 30, 775, 30, 977, 273, 1696, 12, 455, 768, 2934, 896, 1435, 1335, 8...
def check_arc(self):
def test_arc(self):
def check_arc(self): gc = agg.GraphicsContextArray((640,648)) gc.save("arc.png")
c0f30ec18c196e2839d7133e04d7e6b9893240a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/c0f30ec18c196e2839d7133e04d7e6b9893240a8/test_arc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11828, 12, 2890, 4672, 8859, 273, 10421, 18, 17558, 1042, 1076, 12443, 1105, 20, 16, 27382, 3719, 8859, 18, 5688, 2932, 11828, 18, 6446, 7923, 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, 0, 0, 0, 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, 11828, 12, 2890, 4672, 8859, 273, 10421, 18, 17558, 1042, 1076, 12443, 1105, 20, 16, 27382, 3719, 8859, 18, 5688, 2932, 11828, 18, 6446, 7923, 2, -100, -100, -100, -100, -100, ...
stacklevel=k break
stacklevel=k break
def _imregion_check_params(param=None, value=None): a=inspect.stack() stacklevel=0 for k in range(len(a)): if (string.find(a[k][1], 'ipython console') > 0): stacklevel=k break myf=sys._getframe(stacklevel).f_globals return myf['cu'].verifyparam({param:value})
a69d01757f03ee69e74cf5758fa605dd04201481 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/a69d01757f03ee69e74cf5758fa605dd04201481/imregion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 381, 6858, 67, 1893, 67, 2010, 12, 891, 33, 7036, 16, 460, 33, 7036, 4672, 279, 33, 12009, 18, 3772, 1435, 26847, 33, 20, 364, 417, 316, 1048, 12, 1897, 12, 69, 3719, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 381, 6858, 67, 1893, 67, 2010, 12, 891, 33, 7036, 16, 460, 33, 7036, 4672, 279, 33, 12009, 18, 3772, 1435, 26847, 33, 20, 364, 417, 316, 1048, 12, 1897, 12, 69, 3719, 30, 309, ...
return 'ttt '.join(tags)+'ttt '
return ', '.join(tags)
def tags_to_string(cls, tags): return 'ttt '.join(tags)+'ttt '
4594402dfc945b364da39c56be85778d7230ad03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/4594402dfc945b364da39c56be85778d7230ad03/profiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2342, 67, 869, 67, 1080, 12, 6429, 16, 2342, 4672, 327, 296, 748, 88, 2418, 5701, 12, 4156, 13, 6797, 748, 88, 296, 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, 2342, 67, 869, 67, 1080, 12, 6429, 16, 2342, 4672, 327, 296, 748, 88, 2418, 5701, 12, 4156, 13, 6797, 748, 88, 296, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if (total-1)/items_per_page * page != 0:
if (total-1)/(items_per_page * page) != 0:
def simple_search(request, response_type, items_per_page, page, start_index): """ simple search with query """ tags = Tag.objects.all().order_by("name") query = request.GET['query'] if not query: return no_results(request, response_type, query, None, is_simple = True) books = SEARCH_ENGINE.simple_search(query) authors = SEARCH_ENGINE.author_search(author=query, max_length=5) if not books and not authors: return no_results(request, response_type, query, books.suggestion, is_simple = True) total = len(books) # TODO search in annotation next = None if (total-1)/items_per_page * page != 0: next = page+1 if response_type == "atom": return render_response(request, 'book/opds/search_response.xml', {'books': books[start_index:start_index+items_per_page], 'query': query, 'curr': page, 'items_per_page': items_per_page, 'total':total, 'next':next, }, context_instance=RequestContext(request)) if response_type == "xhtml": return render_response(request, 'book/xhtml/search_response.xml', {'books': books,'items_per_page': items_per_page, 'query': query, 'tags': tags, 'authors': authors, 'suggestions':books.suggestion}, context_instance=RequestContext(request))
8262e603b5f1869c1f8573176613bbfab195b4b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4508/8262e603b5f1869c1f8573176613bbfab195b4b6/search_views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 67, 3072, 12, 2293, 16, 766, 67, 723, 16, 1516, 67, 457, 67, 2433, 16, 1363, 16, 787, 67, 1615, 4672, 3536, 4143, 1623, 598, 843, 3536, 2342, 273, 4034, 18, 6911, 18, 454, 7675...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 67, 3072, 12, 2293, 16, 766, 67, 723, 16, 1516, 67, 457, 67, 2433, 16, 1363, 16, 787, 67, 1615, 4672, 3536, 4143, 1623, 598, 843, 3536, 2342, 273, 4034, 18, 6911, 18, 454, 7675...
elif socket.gethostname() == 'walden':
elif socket.gethostname() == 'bitdiddle.concentric.net':
def build_opener(self): opener = OpenerDirectory() for ph in self.proxy_handlers: if type(ph) == types.ClassType: ph = ph() opener.add_handler(ph)
5cd5cbaf8b626d729e14304f4612dd5de8207c89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5cd5cbaf8b626d729e14304f4612dd5de8207c89/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 25098, 12, 2890, 4672, 20532, 273, 6066, 708, 2853, 1435, 364, 1844, 316, 365, 18, 5656, 67, 11046, 30, 309, 618, 12, 844, 13, 422, 1953, 18, 18328, 30, 1844, 273, 1844, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 25098, 12, 2890, 4672, 20532, 273, 6066, 708, 2853, 1435, 364, 1844, 316, 365, 18, 5656, 67, 11046, 30, 309, 618, 12, 844, 13, 422, 1953, 18, 18328, 30, 1844, 273, 1844, 1435...
''' Move an instrument in the instrument list. Used for drag and drop ordering of instruments in InstrumentViewer.py '''
""" Move an instrument in the instrument list. Used for drag and drop ordering of instruments in InstrumentViewer.py Parameters: id -- unique ID of the instument to restore. position -- new position of the instrument inside the instrument pane to the left of the screen. """
def MoveInstrument(self, id, position): ''' Move an instrument in the instrument list. Used for drag and drop ordering of instruments in InstrumentViewer.py ''' self.temp = id instr = [x for x in self.instruments if x.id == id][0] self.temp1 = self.instruments.index(instr) self.instruments.remove(instr) self.instruments.insert(position, instr)
e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9933, 19228, 12, 2890, 16, 612, 16, 1754, 4672, 3536, 9933, 392, 10353, 316, 326, 10353, 666, 18, 10286, 364, 8823, 471, 3640, 9543, 434, 29555, 316, 25565, 18415, 18, 2074, 225, 7012, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9933, 19228, 12, 2890, 16, 612, 16, 1754, 4672, 3536, 9933, 392, 10353, 316, 326, 10353, 666, 18, 10286, 364, 8823, 471, 3640, 9543, 434, 29555, 316, 25565, 18415, 18, 2074, 225, 7012, 3...
default=DEFAULTS['MOZILLA_REV'], help="Revision of Mozilla repository to update to. Default: \"" + DEFAULTS['MOZILLA_REV'] + "\"")
default=None, help="Revision of Mozilla repository to update to. Default: \"" + get_DEFAULT_tag('MOZILLA_REV') + "\"")
def check_retries_option(option, opt_str, value, parser): if value < 0: raise OptionValueError("%s option value needs to be positive (not '%d')" % (opt_str, value)) setattr(parser.values, option.dest, value)
455dd9b8bd602fec7a2c696fe5ef5a4fae6024d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11044/455dd9b8bd602fec7a2c696fe5ef5a4fae6024d4/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 15215, 67, 3482, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 309, 460, 411, 374, 30, 1002, 2698, 23610, 27188, 87, 1456, 460, 4260, 358, 506, 6895, 261, 902, 1995, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15215, 67, 3482, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 309, 460, 411, 374, 30, 1002, 2698, 23610, 27188, 87, 1456, 460, 4260, 358, 506, 6895, 261, 902, 1995, ...
Example -------
Examples --------
def cublasIsamax(n, x, incx): """ Index of maximum absolute value. Finds the smallest index of the maximum magnitude element of a single-precision vector. Parameters ---------- n : int Number of elements in input vector. x : ctypes.c_void_p Pointer to single-precision input vector. incx : int Storage spacing between elements of `x`. Returns ------- idx : int Index of maximum magnitude element. Example ------- >>> import pycuda.autoinit >>> import pycuda.gpuarray as gpuarray >>> import numpy as np >>> x = np.random.rand(5).astype(np.float32) >>> x_gpu = gpuarray.to_gpu(x) >>> m = cublasIsamax(x_gpu.size, x_gpu.gpudata, 1) >>> np.allclose(m, np.argmax(x)) True Notes ----- This function returns a 0-based index. """ a = _libcublas.cublasIsamax(n, int(x), incx) status = cublasGetError() cublasCheckStatus(status) return a-1
f3eb0a79d8c436d509dec60f91ff7a7dcced528c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14753/f3eb0a79d8c436d509dec60f91ff7a7dcced528c/cublas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 30579, 2520, 301, 651, 12, 82, 16, 619, 16, 7290, 92, 4672, 3536, 3340, 434, 4207, 4967, 460, 18, 225, 4163, 87, 326, 13541, 770, 434, 326, 4207, 13463, 930, 434, 279, 2202, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 30579, 2520, 301, 651, 12, 82, 16, 619, 16, 7290, 92, 4672, 3536, 3340, 434, 4207, 4967, 460, 18, 225, 4163, 87, 326, 13541, 770, 434, 326, 4207, 13463, 930, 434, 279, 2202, 17, ...
def setUp(self): super(ExecuteTestCase, self).setUp() self.COMMAND = self.COMMAND % self.filename1
def setUp(self): super(ExecuteTestCase, self).setUp() self.COMMAND = self.COMMAND % self.filename1
5706fb1294daaefb2ced6777bac535f482205a3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6753/5706fb1294daaefb2ced6777bac535f482205a3b/test_chdir.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 2240, 12, 5289, 4709, 2449, 16, 365, 2934, 542, 1211, 1435, 365, 18, 19104, 273, 365, 18, 19104, 738, 365, 18, 3459, 21, 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, 0, 0, 0, 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, 24292, 12, 2890, 4672, 2240, 12, 5289, 4709, 2449, 16, 365, 2934, 542, 1211, 1435, 365, 18, 19104, 273, 365, 18, 19104, 738, 365, 18, 3459, 21, 2, -100, -100, -100, -100, -100, -100, -...
elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'func':
elif line.category_id.contribute and line.category_id.amount_type == 'func':
def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids for slip in self.browse(cr, uid, ids): allow = 0.0 #for emp in emp_pool.browse(cr, uid, [vals['employee_id'][0]]): emp = slip.employee_id sql_req= ''' SELECT c.id as id, c.wage as wage, function as function FROM hr_contract c LEFT JOIN hr_employee emp on (c.employee_id=emp.id) LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id) LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id) WHERE (emp.id=%s) AND (date_start <= %s) AND (date_end IS NULL OR date_end >= %s) LIMIT 1 ''' cr.execute(sql_req, (emp.id, vals['date'], vals['date'])) contract_id = cr.dictfetchone() if not contract_id: continue contract = self.pool.get('hr.contract').browse(cr, uid, contract_id['id']) sal_type = contract.wage_type_id.type function = contract.function.id lines = [] if function: func = func_pool.read(cr, uid, function, ['line_ids']) lines = slip_line_pool.browse(cr, uid, func['line_ids'])
9cefb7520803ded7f648633ccca30e623a0dd192 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/9cefb7520803ded7f648633ccca30e623a0dd192/hr_payroll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 8118, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 801, 84, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 272, 3169, 67, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 8118, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 801, 84, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 272, 3169, 67, 60...
raise EvaluationError, 'only supporting complexType definition'
raise EvaluateException, 'only supporting complexType definition'
def _getElement(self, element, literal=False, local=False, namespaceURI=None): """Returns a typecode instance representing the passed in element. element -- XMLSchema.ElementDeclaration instance literal -- literal encoding? local -- is locally defined? namespaceURI -- namespace """ if not element.isElement(): raise TypeError, 'Expecting an ElementDeclaration'
f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 21336, 12, 2890, 16, 930, 16, 7158, 33, 8381, 16, 1191, 33, 8381, 16, 19421, 33, 7036, 4672, 3536, 1356, 279, 618, 710, 791, 5123, 326, 2275, 316, 930, 18, 930, 1493, 3167, 3078, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21336, 12, 2890, 16, 930, 16, 7158, 33, 8381, 16, 1191, 33, 8381, 16, 19421, 33, 7036, 4672, 3536, 1356, 279, 618, 710, 791, 5123, 326, 2275, 316, 930, 18, 930, 1493, 3167, 3078, ...
if config.get('i mport_partial', False):
if config.get('import_partial', False):
def _tag_record(self, cr, rec, data_node=None): rec_model = rec.getAttribute("model").encode('ascii') model = self.pool.get(rec_model) assert model, "The model %s does not exist !" % (rec_model,) rec_id = rec.getAttribute("id").encode('ascii') self._test_xml_id(rec_id)
66ea8170e0709d3b318285b07096c31cc9327563 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/66ea8170e0709d3b318285b07096c31cc9327563/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2692, 67, 3366, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 1950, 67, 2284, 273, 1950, 18, 588, 1499, 2932, 2284, 20387, 3015, 2668, 9184, 6134, 938, 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, 389, 2692, 67, 3366, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 1950, 67, 2284, 273, 1950, 18, 588, 1499, 2932, 2284, 20387, 3015, 2668, 9184, 6134, 938, 273, 365...
res = re.findall(r'\{\{(?:[Tt]emplate:|)(?:%s(?:[ \n]*?(?:\n|\||\}|<)|creator:)' % l.lower(), g.lower())
res = re.findall(r'\{\{(?:[Tt]emplate:|)(?:%s[ \n]*?(?:\n|\||\}|<)|creator:)' % l.lower(), g.lower())
def checkbot(): """ Main function """ # Command line configurable parameters repeat = True # Restart after having check all the images? limit = 80 # How many images check? time_sleep = 30 # How many time sleep after the check? skip_number = 0 # How many images to skip before checking? wait_number = 0 # How many time sleep before the check? commonsActive = False # Check if on commons there's an image with the same name? normal = False # Check the new images or use another generator? urlUsed = False # Use the url-related function instead of the new-pages generator regexGen = False # Use the regex generator untagged = False # Use the untagged generator skip_list = list() # Inizialize the skip list used below duplicatesActive = False # Use the duplicate option duplicatesReport = False # Use the duplicate-report option sendemailActive = False # Use the send-email smartdetection = False # Enable the smart detection # Here below there are the parameters. for arg in wikipedia.handleArgs(): if arg.startswith('-limit'): if len(arg) == 7: limit = int(wikipedia.input(u'How many images do you want to check?')) else: limit = int(arg[7:]) if arg.startswith('-time'): if len(arg) == 5: time_sleep = int(wikipedia.input(u'How many seconds do you want runs to be apart?')) else: time_sleep = int(arg[6:]) elif arg == '-break': repeat = False elif arg == '-commons': commonsActive = True elif arg.startswith('-duplicates'): duplicatesActive = True if len(arg) == 11: duplicates_rollback = 1 elif len(arg) > 11: duplicates_rollback = int(arg[12:]) elif arg == '-duplicatereport': duplicatesReport = True elif arg == '-sendemail': sendemailActive = True elif arg == '-smartdetection': smartdetection = True elif arg.startswith('-skip'): if len(arg) == 5: skip = True skip_number = int(wikipedia.input(u'How many images do you want to skip?')) elif len(arg) > 5: skip = True skip_number = int(arg[6:]) elif arg.startswith('-wait'): if len(arg) == 5: wait = True wait_number = int(wikipedia.input(u'How many time do you want to wait before checking the images?')) elif len(arg) > 5: wait = True wait_number = int(arg[6:]) elif arg.startswith('-start'): if len(arg) == 6: firstPageTitle = str(wikipedia.input(u'From witch page do you want to start?')) elif len(arg) > 6: firstPageTitle = str(arg[7:]) generator = wikipedia.getSite().allpages(start=firstPageTitle ,namespace=6) repeat = False elif arg.startswith('-page'): if len(arg) == 5: regexPageName = str(wikipedia.input(u'Which page do you want to use for the regex?')) elif len(arg) > 5: regexPageName = str(arg[6:]) repeat = False regexGen = True elif arg.startswith('-url'): if len(arg) == 4: regexPageUrl = str(wikipedia.input(u'Which url do you want to use for the regex?')) elif len(arg) > 4: regexPageUrl = str(arg[5:]) urlUsed = True repeat = False regexGen = True elif arg.startswith('-regex'): if len(arg) == 6: regexpToUse = str(wikipedia.input(u'Which regex do you want to use?')) elif len(arg) > 6: regexpToUse = str(arg[7:]) generator = 'regex' repeat = False elif arg.startswith('-cat'): if len(arg) == 4: catName = str(wikipedia.input(u'In which category do I work?')) elif len(arg) > 4: catName = str(arg[5:]) catSelected = catlib.Category(wikipedia.getSite(), 'Category:%s' % catName) generator = pagegenerators.CategorizedPageGenerator(catSelected) repeat = False elif arg.startswith('-ref'): if len(arg) == 4: refName = str(wikipedia.input(u'The references of what page should I parse?')) elif len(arg) > 4: refName = str(arg[5:]) generator = pagegenerators.ReferringPageGenerator(wikipedia.Page(wikipedia.getSite(), refName)) repeat = False elif arg.startswith('-untagged'): untagged = True if len(arg) == 9: projectUntagged = str(wikipedia.input(u'In which project should I work?')) elif len(arg) > 9: projectUntagged = str(arg[10:]) # Understand if the generator it's the default or not. try: generator except NameError: normal = True # Define the site. site = wikipedia.getSite() # Block of text to translate the parameters set above. image_n = site.image_namespace() image_namespace = "%s:" % image_n # Example: "User_talk:" unvertext = wikipedia.translate(site, n_txt) di = wikipedia.translate(site, delete_immediately) dih = wikipedia.translate(site, delete_immediately_head) din = wikipedia.translate(site, delete_immediately_notification) nh = wikipedia.translate(site, nothing_head) nn = wikipedia.translate(site, nothing_notification) dels = wikipedia.translate(site, del_comm) smwl = wikipedia.translate(site, second_message_without_license) TextFind = wikipedia.translate(site, txt_find) # If the images to skip are 0, set the skip variable to False (the same for the wait time) if skip_number == 0: skip = False if wait_number == 0: wait = False # nothing = Defining an empty image description nothing = ['', ' ', ' ', ' ', '\n', '\n ', '\n ', '\n\n', '\n \n', ' \n', ' \n ', ' \n \n'] # something = Minimal requirements for an image description. # If this fits, no tagging will take place (if there aren't other issues) # MIT license is ok on italian wikipedia, let also this here something = ['{{'] # Don't put "}}" here, please. Useless and can give problems. # Unused file extensions. Does not contain PDF. notallowed = ("xcf", "xls", "sxw", "sxi", "sxc", "sxd") # A little block-statement to ensure that the bot will not start with en-parameters if site.lang not in project_inserted: wikipedia.output(u"Your project is not supported by this script. You have to edit the script and add it!") return # Some formatting for delete immediately template di = '\n%s' % di dels = dels % di # Reading the log of the new images if another generator is not given. if normal == True: if limit == 1: wikipedia.output(u"Retrieving the latest file for checking...") else: wikipedia.output(u"Retrieving the latest %d files for checking..." % limit) # Main Loop while 1: # Defing the Main Class. mainClass = main(site, sendemailActive = sendemailActive, duplicatesReport = duplicatesReport, smartdetection = smartdetection) # Untagged is True? Let's take that generator if untagged == True: generator = mainClass.untaggedGenerator(projectUntagged, limit) normal = False # Ensure that normal is False # Normal True? Take the default generator if normal == True: generator = pagegenerators.NewimagesPageGenerator(number = limit, site = site) # if urlUsed and regexGen, get the source for the generator if urlUsed == True and regexGen == True: textRegex = site.getUrl(regexPageUrl, no_hostname = True) # Not an url but a wiki page as "source" for the regex elif regexGen == True: pageRegex = wikipedia.Page(site, regexPageName) try: textRegex = pageRegex.get() except wikipedia.NoPage: wikipedia.output(u"%s doesn't exist!" % page.title()) textRegex = '' # No source, so the bot will quit later. # If generator is the regex' one, use your own Generator using an url or page and a regex. if generator == 'regex' and regexGen == True: generator = mainClass.regexGenerator(regexpToUse, textRegex) # Ok, We (should) have a generator, so let's go on. try: # Take the additional settings for the Project tupla_written = mainClass.takesettings() except wikipedia.Error: # Error? Settings = None wikipedia.output(u'Problems with loading the settigs, run without them.') tupla_written = None some_problem = False # Ensure that if the list given is empty it will be converted to "None" # (but it should be already done in the takesettings() function) if tupla_written == []: tupla_written = None # Real-Time page loaded if tupla_written != None: wikipedia.output(u'\t >> Loaded the real-time page... <<') # No settings found, No problem, continue. else: wikipedia.output(u'\t >> No additional settings found! <<') # Load the white templates(hidden template is the same as white template, regarding the meaning) hiddentemplate = mainClass.loadHiddenTemplates() # Load the notification for only white templates images HiddenTN = wikipedia.translate(site, HiddenTemplateNotification) # Not the main, but the most important loop. #parsed = False for image in generator: # When you've a lot of image to skip before working use this workaround, otherwise # let this commented, thanks. [ decoment also parsed = False if you want to use it # #if image.title() != u'Immagine:Nytlogo379x64.gif' and not parsed: # wikipedia.output(u"%s already parsed." % image.title()) # continue #else: # parsed = True # If I don't inizialize the generator, wait part and skip part are useless if wait: printWithTimeZone(u'Waiting %s seconds before checking the images,' % wait_number) # Let's sleep... time.sleep(wait_number) # Never sleep again (we are in a loop) wait = False # If the generator returns something that is not an image, simply skip it. if normal == False and regexGen == False: if image_namespace.lower() not in image.title().lower() and \ 'image:' not in image.title().lower(): wikipedia.output(u'%s seems not an image, skip it...' % image.title()) continue try: imageName = image.title().split(image_namespace)[1] # Deleting the namespace (useless here) except IndexError:# Namespace image not found, that's not an image! Let's skip... wikipedia.output(u"%s is not an image, skipping..." % image.title()) continue mainClass.setParameters(imageName) # Setting the image for the main class # Skip block if skip == True: # If the images to skip are more the images to check, make them the same number if skip_number > limit: skip_number = limit # Print a starting message only if no images has been skipped if skip_list == []: if skip_number == 1: wikipedia.output(u'Skipping the first image:\n') else: wikipedia.output(u'Skipping the first %s images:\n' % skip_number) # If we still have pages to skip: if len(skip_list) < skip_number: wikipedia.output(u'Skipping %s...' % imageName) skip_list.append(imageName) if skip_number == 1: wikipedia.output('') skip = False continue else: wikipedia.output('') # Print a blank line. skip = False elif skip_list == []: # Skip must be false if we are here but # the user has set 0 as images to skip wikipedia.output(u'\t\t>> No images to skip...<<') skip_list.append('skip = Off') # Only to print it once parentesi = False # parentesi are these in italian: { ( ) } [] delete = False tagged = False extension = imageName.split('.')[-1] # get the extension from the image's name # Page => ImagePage p = wikipedia.ImagePage(site, image.title()) # Get the text in the image (called g) try: g = p.get() except wikipedia.NoPage: wikipedia.output(u"Skipping %s because it has been deleted." % imageName) continue except wikipedia.IsRedirectPage: wikipedia.output(u"The file description for %s is a redirect?!" % imageName) continue # Check on commons if there's already an image with the same name if commonsActive == True: response = mainClass.checkImageOnCommons() if response == False: continue # Check if there are duplicates of the image on the project selected if duplicatesActive == True: response2 = mainClass.checkImageDuplicated(duplicates_rollback) if response2 == False: continue # Is the image already tagged? If yes, no need to double-check, skip for i in TextFind: # If there are {{ use regex, otherwise no (if there's not the {{ may not be a template # and the regex will be wrong) if '{{' in i: regexP = re.compile('\{\{(?:template|)%s ?(?:\||\n|\}|<) ?' % i.split('{{')[1].replace(' ', '[ _]'), re.I) result = regexP.findall(g) if result != []: tagged = True elif i.lower() in g: tagged = True # Deleting the useless template from the description (before adding something # in the image the original text will be reloaded, don't worry). hiddenTemplateFound = False white_template_found = 0 for l in hiddentemplate: if tagged == False: # why creator? Because on commons there's a template such as {{creator:name}} that.. works res = re.findall(r'\{\{(?:[Tt]emplate:|)(?:%s(?:[ \n]*?(?:\n|\||\}|<)|creator:)' % l.lower(), g.lower()) if res != []: white_template_found += 1 if l != '' and l != ' ': # Check that l is not nothing or a space # Deleting! (replace the template with nothing) regex_white_template = re.compile(r'\{\{(?:template:|)(?:%s|creator)' % l, re.IGNORECASE) g = regex_white_template.sub(r'', g) hiddenTemplateFound = True if white_template_found == 1: wikipedia.output(u'A white template found, skipping the template...') elif white_template_found == 0: pass # if nothing found, print nothing else: wikipedia.output(u'White templates found: %s; skipping those templates...' % white_template_found) for a_word in something: # something is the array with {{, MIT License and so on. if a_word in g: # There's a template, probably a license (or I hope so) parentesi = True # Is the extension allowed? (is it an image or f.e. a .xls file?) for parl in notallowed: if parl.lower() in extension.lower(): delete = True some_problem = False # If it has "some_problem" it must check # the additional settings. # if tupla_writte, use addictional settings if tupla_written != None: # In every tupla there's a setting configuration for tupla in tupla_written: name = tupla[1] find_tipe = tupla[2] find = tupla[3] find_list = mainClass.load(find) imagechanges = tupla[4] if imagechanges.lower() == 'false': imagestatus = False elif imagechanges.lower() == 'true': imagestatus = True else: wikipedia.output(u"Error! Imagechanges set wrongly!") tupla_written = None break summary = tupla[5] head_2 = tupla[6] text = tupla[7] text = text % imageName mexCatched = tupla[8] wikipedia.setAction(summary) for k in find_list: if find_tipe.lower() == 'findonly': if k.lower() == g.lower(): some_problem = True text_used = text head_used = head_2 imagestatus_used = imagestatus name_used = name summary_used = summary mex_used = mexCatched break elif find_tipe.lower() == 'find': if k.lower() in g.lower(): some_problem = True text_used = text head_used = head_2 imagestatus_used = imagestatus name_used = name summary_used = summary mex_used = mexCatched continue # If the image exists (maybe it has been deleting during the oder # checking parts or something, who knows? ;-)) if p.exists(): # Here begins the check block. if tagged == True: # Tagged? Yes, skip. printWithTimeZone(u'%s is already tagged...' % imageName) continue if some_problem == True: if mex_used in g: wikipedia.output(u'Image already fixed. Skip.') continue wikipedia.output(u"The image description for %s contains %s..." % (imageName, name_used)) if mex_used.lower() == 'default': mex_used = unvertext if imagestatus_used == False: reported = mainClass.report_image(imageName) else: reported = True if reported == True: #if imagestatus_used == True: mainClass.report(mex_used, imageName, text_used, "\n%s\n" % head_used, None, imagestatus_used, summary_used) else: wikipedia.output(u"Skipping the image...") some_problem = False continue elif parentesi == True: seems_ok = False license_found = None if smartdetection: license_found = mainClass.smartDetection(g) else: printWithTimeZone(u"%s seems ok..." % imageName) # It works also without this... but i want only to be sure ^^ parentesi = False continue elif delete == True: wikipedia.output(u"%s is not a file!" % imageName) # Modify summary text wikipedia.setAction(dels) canctext = di % extension notification = din % imageName head = dih mainClass.report(canctext, imageName, notification, head) delete = False continue elif g in nothing: wikipedia.output(u"The image description for %s does not contain a license template!" % imageName) if hiddenTemplateFound and HiddenTN != None and HiddenTN != '' and HiddenTN != ' ': notification = HiddenTN % imageName else: notification = nn % imageName head = nh mainClass.report(unvertext, imageName, notification, head, smwl) continue else: wikipedia.output(u"%s has only text and not the specific license..." % imageName) if hiddenTemplateFound and HiddenTN != None and HiddenTN != '' and HiddenTN != ' ': notification = HiddenTN % imageName else: notification = nn % imageName head = nh mainClass.report(unvertext, imageName, notification, head, smwl) continue # A little block to perform the repeat or to break. if repeat == True: printWithTimeZone(u"Waiting for %s seconds," % time_sleep) time.sleep(time_sleep) elif repeat == False: wikipedia.output(u"\t\t\t>> STOP! <<") return True # Exit
70760e66ce31a1554b071adce744e6dadea907e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/70760e66ce31a1554b071adce744e6dadea907e1/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 4819, 13332, 3536, 12740, 445, 3536, 468, 3498, 980, 14593, 1472, 7666, 273, 1053, 468, 20709, 1839, 7999, 866, 777, 326, 4602, 35, 1800, 273, 8958, 468, 9017, 4906, 4602, 866, 35, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4819, 13332, 3536, 12740, 445, 3536, 468, 3498, 980, 14593, 1472, 7666, 273, 1053, 468, 20709, 1839, 7999, 866, 777, 326, 4602, 35, 1800, 273, 8958, 468, 9017, 4906, 4602, 866, 35, ...
return 0 if self.undef_cites != new:
elif self.undef_cites != new:
def bibtex_needed (self): """ Return true if BibTeX must be run. """ if self.run_needed: return 1 self.msg(2, _("checking if BibTeX must be run..."))
7e57cdea587b20eb3a5d8f354d5b1ae0aa82a95c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/7e57cdea587b20eb3a5d8f354d5b1ae0aa82a95c/bibtex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25581, 21763, 67, 17471, 261, 2890, 4672, 3536, 2000, 638, 309, 605, 495, 21575, 60, 1297, 506, 1086, 18, 3536, 309, 365, 18, 2681, 67, 17471, 30, 327, 404, 365, 18, 3576, 12, 22, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25581, 21763, 67, 17471, 261, 2890, 4672, 3536, 2000, 638, 309, 605, 495, 21575, 60, 1297, 506, 1086, 18, 3536, 309, 365, 18, 2681, 67, 17471, 30, 327, 404, 365, 18, 3576, 12, 22, 16, ...
name = user.User(self.request, id=uid).name if name: options.append((name, name))
name = user.User(self.request, id=uid).name options.append((name, name))
def _user_select(self): options = [] users = user.getUserList(self.request) for uid in users: name = user.User(self.request, id=uid).name if name: # why do we have empty names? options.append((name, name)) options.sort()
75cbb258b238202535fb9810d5e9053221950150 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/75cbb258b238202535fb9810d5e9053221950150/userform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1355, 67, 4025, 12, 2890, 4672, 702, 273, 5378, 3677, 273, 729, 18, 588, 1299, 682, 12, 2890, 18, 2293, 13, 364, 4555, 316, 3677, 30, 508, 273, 729, 18, 1299, 12, 2890, 18, 2293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1355, 67, 4025, 12, 2890, 4672, 702, 273, 5378, 3677, 273, 729, 18, 588, 1299, 682, 12, 2890, 18, 2293, 13, 364, 4555, 316, 3677, 30, 508, 273, 729, 18, 1299, 12, 2890, 18, 2293...
def handle_close_event(self):
def handle_close(self):
def handle_close_event(self): self.closed = True
ec0f44b37fd8a0237268c3752f08c4c9b114cacd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/ec0f44b37fd8a0237268c3752f08c4c9b114cacd/test_asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4412, 12, 2890, 4672, 365, 18, 12204, 273, 1053, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4412, 12, 2890, 4672, 365, 18, 12204, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
gas_test = loess(E, NOx, span=2./3.) gas_test.predict(gas_fit_E, stderr=False) gas_test.predict(gas_test.predicted.values, stderr=False)
gas = loess(E, NOx, span=2./3.) gas.model.parametric_flags = True try: gas.fit() except ValueError: pass else: raise AssertionError("ValueError not raised !") if 0: dfile = open(os.path.join('examples','madeup_data'), 'r') dfile.readline() x = N.fromiter((float(v) for v in dfile.readline().rstrip().split()), N.float_).reshape(-1,2) dfile.readline() y = N.fromiter((float(v) for v in dfile.readline().rstrip().split()), N.float_) dfile = open(os.path.join('examples','madeup_data'), 'r') dfile.readline() rfile = open(os.path.join('examples','madeup_result'), 'r') results = [] for i in range(8): rfile.readline() z = N.fromiter((float(v) for v in rfile.readline().rstrip().split()), N.float_) results.append(z) newdata1 = N.array([[-2.5, 0.0, 2.5], [0., 0., 0.]]) newdata2 = N.array([[-0.5, 0.5], [0., 0.]]) madeup = cloess.loess(x,y) print madeup.model madeup.model.parametric_flags = [True, False] print madeup.model madeup.model.parametric_flags[0] = False print madeup.model madeup.model.update(family="symmetric",normalize=False) print madeup.model
def test_1dpredict_2(self): "Basic test 1d - new predictions" (E, NOx, gas_fit_E, newdata, coverage, results) = self.d gas = cloess.loess(E,NOx, span=2./3.) gas.predict(newdata, stderr=True) gas.predicted.confidence(0.99) assert_almost_equal(gas.predicted.confidence_intervals.lower, results[3][0::3], 6) assert_almost_equal(gas.predicted.confidence_intervals.fit, results[3][1::3], 6) assert_almost_equal(gas.predicted.confidence_intervals.upper, results[3][2::3], 6)
1c704f083ca1a2778b5ef277990cbe04631b4066 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/1c704f083ca1a2778b5ef277990cbe04631b4066/pyloess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 21, 72, 14491, 67, 22, 12, 2890, 4672, 315, 8252, 1842, 404, 72, 300, 394, 13067, 6, 261, 41, 16, 3741, 92, 16, 16189, 67, 7216, 67, 41, 16, 394, 892, 16, 11196, 16, 1686...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21, 72, 14491, 67, 22, 12, 2890, 4672, 315, 8252, 1842, 404, 72, 300, 394, 13067, 6, 261, 41, 16, 3741, 92, 16, 16189, 67, 7216, 67, 41, 16, 394, 892, 16, 11196, 16, 1686...
assert id is not None, 'None is not a possible id for %s' % cls.__name
assert id is not None, 'None is not a possible id for %s' % cls.__name__
def get(cls, id, connection=None, selectResults=None):
3e163b538c8796b264239c3df4b918f3bad28dcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/3e163b538c8796b264239c3df4b918f3bad28dcc/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 6429, 16, 612, 16, 1459, 33, 7036, 16, 2027, 3447, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 6429, 16, 612, 16, 1459, 33, 7036, 16, 2027, 3447, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'gsl', 'cblas', 'atlas',
'gsl', '...blas', 'atlas',
def pyx_preparse(s): r""" Preparse a Pyx file * include cdefs.pxi, interrupt.pxi, stdsage.pxi * parse clang pragma (c or c++) * parse clib pragma (additional libraries to link in) * parse cinclude (additional include directories) The pragmas: \begin{description} \item[clang] may be either c or c++ indicating whether a C or C++ compiler should be used \item[clib] additional libraries to be linked in, the space separated list is split and passed to distutils. \item[cinclude] additional directories to search for header files. The space separated list is split and passed to distutils. \end{description} EXAMPLE: sage: from sage.misc.cython import pyx_preparse sage: pyx_preparse("") ('\ninclude "interrupt.pxi" # ctrl-c interrupt block support\ninclude "stdsage.pxi" # ctrl-c interrupt block support\n\ninclude "cdefs.pxi"\n', ['mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm', 'curvesntl', 'g0nntl', 'jcntl', 'rankntl', 'gsl', 'cblas', 'atlas', 'ntl', 'csage'], ['.../local/include/csage/', '.../local/include/', '.../local/include/python2.5/', '.../devel/sage/sage/ext/', '.../devel/sage/', '.../devel/sage/sage/gsl/'], 'c', []) sage: s, libs, inc, lang, f = pyx_preparse("# clang c++\n #clib foo\n # cinclude bar\n") sage: lang 'c++' sage: libs ['foo', 'mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm', 'curvesntl', 'g0nntl', 'jcntl', 'rankntl', 'gsl', 'cblas', 'atlas', 'ntl', 'csage'] sage: inc ['bar', '.../local/include/csage/', '.../local/include/', '.../local/include/python2.5/', '.../devel/sage/sage/ext/', '.../devel/sage/', '.../devel/sage/sage/gsl/'] """ lang = parse_keywords('clang', s) if lang[0]: lang = lang[0][0] else: lang = "c" v, s = parse_keywords('clib', s) libs = v + standard_libs additional_source_files, s = parse_keywords('cfile', s) v, s = parse_keywords('cinclude', s) inc = [environ_parse(x.replace('"','').replace("'","")) for x in v] + include_dirs s = """
2781b18e15484ad4900a2aa0f4a7a52de84e9b56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/2781b18e15484ad4900a2aa0f4a7a52de84e9b56/cython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 92, 67, 1484, 2670, 12, 87, 4672, 436, 8395, 2962, 2670, 279, 4707, 92, 585, 380, 2341, 276, 12537, 18, 4430, 77, 16, 13123, 18, 4430, 77, 16, 2044, 87, 410, 18, 4430, 77, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 92, 67, 1484, 2670, 12, 87, 4672, 436, 8395, 2962, 2670, 279, 4707, 92, 585, 380, 2341, 276, 12537, 18, 4430, 77, 16, 13123, 18, 4430, 77, 16, 2044, 87, 410, 18, 4430, 77, 380,...
+ self._length[match] - (2 * self._N) - samegrams + 2)
+ self.length[match] - (2 * self._N) - samegrams + 2)
def search(self, query): """Get items from the index that share some N-grams with the query and meet the similaroty threshold. @param query: Item to match against the candidate items.
3494fa39678f2e5bc57cacb7df60645ab385db6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12095/3494fa39678f2e5bc57cacb7df60645ab385db6a/ngram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 843, 4672, 3536, 967, 1516, 628, 326, 770, 716, 7433, 2690, 423, 17, 28854, 598, 326, 843, 471, 18721, 326, 7281, 352, 93, 5573, 18, 225, 632, 891, 843, 30, 4342, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1623, 12, 2890, 16, 843, 4672, 3536, 967, 1516, 628, 326, 770, 716, 7433, 2690, 423, 17, 28854, 598, 326, 843, 471, 18721, 326, 7281, 352, 93, 5573, 18, 225, 632, 891, 843, 30, 4342, ...
sum_center_weight = sum([mol.center_weight for mol in self._mols]) sum_center = sum([mol.center for mol in self._mols]) self.center = sum_center / float(sum_center_weight) if len(self._mols) == 1: print "debug note re bug 2508: these points should be close: %r and %r" % (self.center , self._mols[0].center)
centers = [mol.center for mol in self._mols] weights = [mol.center_weight for mol in self._mols] self.center = weighted_average(weights, centers)
def full_inval_and_update(self): for mol in self._mols: mol.full_inval_and_update() assert mol.quat == Q(1,0,0,0) # KLUGE, but much here depends on this [bruce 070411] assert not (mol.center != mol.basecenter) # ditto (this "not !=" is how you have to compare Numeric arrays) [bruce 070411] # note: this will fail if Chunk has user_specified_center (nim at the moment), # and Chunk.set_basecenter_and_quat may not be correct then anyway (not sure). # compute self.center as weighted average of component centers sum_center_weight = sum([mol.center_weight for mol in self._mols]) sum_center = sum([mol.center for mol in self._mols]) self.center = sum_center / float(sum_center_weight) if len(self._mols) == 1: ## assert self.center == self._mols[0].center # or that they're close # sanity check [bruce 070928] print "debug note re bug 2508: these points should be close: %r and %r" % (self.center , self._mols[0].center) return
33a65eae62bd8e09e572f411711b8d22ee164ab8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/33a65eae62bd8e09e572f411711b8d22ee164ab8/extrudeMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 267, 1125, 67, 464, 67, 2725, 12, 2890, 4672, 364, 12629, 316, 365, 6315, 81, 3528, 30, 12629, 18, 2854, 67, 267, 1125, 67, 464, 67, 2725, 1435, 1815, 12629, 18, 372, 270, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 267, 1125, 67, 464, 67, 2725, 12, 2890, 4672, 364, 12629, 316, 365, 6315, 81, 3528, 30, 12629, 18, 2854, 67, 267, 1125, 67, 464, 67, 2725, 1435, 1815, 12629, 18, 372, 270, ...
print "%s:" % normpath(relfilename) print " %s" % contents
filename_contents_tuples.append((normpath(relfilename), contents)) filename_contents_tuples.sort() for filename, contents in filename_contents_tuples: print "%s:" % filename print " %s" % contents
def document_dir_files(path): for dirpath, dirnames, filenames in os.walk(path): relpath = dirpath[len(path)+1:] for filename in filenames: abspath = os.path.join(dirpath, filename) contents = open(abspath, 'r').read() contents = "\n ".join(contents.splitlines()) relfilename = os.path.join(relpath, filename) print "%s:" % normpath(relfilename) print " %s" % contents
c834f9176e738d910436bcf107477281745af913 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14687/c834f9176e738d910436bcf107477281745af913/test_xpi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 67, 1214, 67, 2354, 12, 803, 4672, 364, 17803, 16, 1577, 1973, 16, 9066, 316, 1140, 18, 11348, 12, 803, 4672, 14614, 273, 17803, 63, 1897, 12, 803, 27921, 21, 26894, 364, 1544, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 67, 1214, 67, 2354, 12, 803, 4672, 364, 17803, 16, 1577, 1973, 16, 9066, 316, 1140, 18, 11348, 12, 803, 4672, 14614, 273, 17803, 63, 1897, 12, 803, 27921, 21, 26894, 364, 1544, 3...
GROUP BY account_analytic_line.account_id" ,(ids2,))
GROUP BY account_analytic_line.account_id" ,(parent_ids,))
def _last_worked_date_calc (self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id, max(date) \ from account_analytic_line \ where account_id =ANY(%s) \ and invoice_id is null \ GROUP BY account_analytic_line.account_id" ,(ids2,)) for account_id, sum in cr.fetchall(): res[account_id] = sum for obj_id in ids: res.setdefault(obj_id, '') for child_id in self.search(cr, uid, [('parent_id', 'child_of', [obj_id])]): if res[obj_id] < res.get(child_id, ''): res[obj_id] = res.get(child_id, '') for id in ids: res[id] = res.get(id, '') return res
3c18c11c83e2549431192a3a0c1f46403db9d628 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8241/3c18c11c83e2549431192a3a0c1f46403db9d628/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2722, 67, 1252, 329, 67, 712, 67, 12448, 261, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 3258, 22, 273, 365, 18, 3072, 12, 3353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2722, 67, 1252, 329, 67, 712, 67, 12448, 261, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 3258, 22, 273, 365, 18, 3072, 12, 3353...
this = apply(_quickfix.new_LegRatioQty, args)
this = _quickfix.new_LegRatioQty(*args)
def __init__(self, *args): this = apply(_quickfix.new_LegRatioQty, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8329, 8541, 53, 4098, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8329, 8541, 53, 4098, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
f = f_gen(a=0.0,name='f',longname='An F',shapes="dfn,dfd",
f = f_gen(a=0.0,name='f',longname='An F',shapes="dfn, dfd",
def _stats(self, dfn, dfd): v2 = arr(dfd*1.0) v1 = arr(dfn*1.0) mu = where (v2 > 2, v2 / arr(v2 - 2), inf) mu2 = 2*v2*v2*(v2+v1-2)/(v1*(v2-2)**2 * (v2-4)) mu2 = where(v2 > 4, mu2, inf) g1 = 2*(v2+2*v1-2)/(v2-6)*sqrt((2*v2-4)/(v1*(v2+v1-2))) g1 = where(v2 > 6, g1, nan) g2 = 3/(2*v2-16)*(8+g1*g1*(v2-6)) g2 = where(v2 > 8, g2, nan) return mu, mu2, g1, g2
48ba19baad4689b1adfc686887dc76e1a520ab52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/48ba19baad4689b1adfc686887dc76e1a520ab52/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5296, 12, 2890, 16, 3013, 82, 16, 3013, 72, 4672, 331, 22, 273, 2454, 12, 2180, 72, 14, 21, 18, 20, 13, 331, 21, 273, 2454, 12, 2180, 82, 14, 21, 18, 20, 13, 4129, 273, 1625...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5296, 12, 2890, 16, 3013, 82, 16, 3013, 72, 4672, 331, 22, 273, 2454, 12, 2180, 72, 14, 21, 18, 20, 13, 331, 21, 273, 2454, 12, 2180, 82, 14, 21, 18, 20, 13, 4129, 273, 1625...
if sys.argv[1] == "-install": lines=open(pkgconfig_file).readlines() open(pkgconfig_file, 'w').writelines(map(replace_prefix,lines)) print __doc__
if sys.argv[1] == '-install': print ('pygobject is now installed on your machine.\n')
def replace_prefix(s): if prefix_pattern.match(s): s='prefix='+sys.prefix.replace("\\","/")+'\n' s=s.replace("@DATADIR@", os.path.join(sys.prefix,'share').replace("\\","/")) return s
8cb3f2e78161639c568110aad6a807dcf59f3ae8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8659/8cb3f2e78161639c568110aad6a807dcf59f3ae8/pygobject_postinstall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 67, 3239, 12, 87, 4672, 309, 1633, 67, 4951, 18, 1916, 12, 87, 4672, 272, 2218, 3239, 2218, 15, 9499, 18, 3239, 18, 2079, 2932, 1695, 15937, 4898, 13, 6797, 64, 82, 11, 272, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 67, 3239, 12, 87, 4672, 309, 1633, 67, 4951, 18, 1916, 12, 87, 4672, 272, 2218, 3239, 2218, 15, 9499, 18, 3239, 18, 2079, 2932, 1695, 15937, 4898, 13, 6797, 64, 82, 11, 272, 33...
def chooseRequestClass(self, method, path, environment): """Choose and return a request class and a publication class""" content_type = environment.get('CONTENT_TYPE', '') is_xml = content_type.startswith('text/xml') if method in ('GET', 'POST', 'HEAD'): if (method == 'POST' and environment.get('HTTP_SOAPACTION') and is_xml): factory = zapi.queryUtility(ISOAPRequestFactory) if factory is not None: request_cls = factory(StringIO(), StringIO(), {}).__class__ publication_cls = SOAPPublication else: request_cls = BrowserRequest publication_cls = BrowserPublication elif (method == 'POST' and is_xml): request_cls = XMLRPCRequest publication_cls = XMLRPCPublication else: request_cls = BrowserRequest publication_cls = BrowserPublication else: request_cls = HTTPRequest publication_cls = HTTPPublication return request_cls, publication_cls
def __call__(self, request_string, handle_errors=True, form=None): # Commit work done by previous python code. commit()
4aad475624e9562757330604b25b8c84cfecfc6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9519/4aad475624e9562757330604b25b8c84cfecfc6e/functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 590, 67, 1080, 16, 1640, 67, 4324, 33, 5510, 16, 646, 33, 7036, 4672, 468, 10269, 1440, 2731, 635, 2416, 5790, 981, 18, 3294, 1435, 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, 1001, 1991, 972, 12, 2890, 16, 590, 67, 1080, 16, 1640, 67, 4324, 33, 5510, 16, 646, 33, 7036, 4672, 468, 10269, 1440, 2731, 635, 2416, 5790, 981, 18, 3294, 1435, 2, -100, -100, -100, ...
return self.__worksheets[self.__worksheets()[0]]
return self.__worksheets[self.worksheet_names()[0]]
def get_worksheet_with_id(self, id): for W in self.__worksheets.itervalues(): if W.id() == id: return W return self.__worksheets[self.__worksheets()[0]] #raise KeyError, "no worksheet with id %s"%id
45610bcef2c73ff0aa4dfda4960879b434d24f9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/45610bcef2c73ff0aa4dfda4960879b434d24f9d/notebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1252, 8118, 67, 1918, 67, 350, 12, 2890, 16, 612, 4672, 364, 678, 316, 365, 16186, 18597, 10245, 18, 2165, 2372, 13332, 309, 678, 18, 350, 1435, 422, 612, 30, 327, 678, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1252, 8118, 67, 1918, 67, 350, 12, 2890, 16, 612, 4672, 364, 678, 316, 365, 16186, 18597, 10245, 18, 2165, 2372, 13332, 309, 678, 18, 350, 1435, 422, 612, 30, 327, 678, 327, ...
sdef.setPermission('Modify portal content', 0, ['Employee', 'Manager', 'Owner'])
sdef.setPermission('Modify portal content', 0, ['Customer', 'Employee', 'Manager', 'Owner'])
sdef = wf.states['open']
15ee3a4a37696c78e95e852ad33b8774ad3c46fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10431/15ee3a4a37696c78e95e852ad33b8774ad3c46fb/eXtreme_iteration_workflow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 536, 273, 11578, 18, 7992, 3292, 3190, 3546, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 536, 273, 11578, 18, 7992, 3292, 3190, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
title=item.getp('legend'), with=withstring, using='1:($2)')
**kwargs)
def _add_line(self, item): """Add a 2D or 3D curve to the scene.""" if DEBUG: print "Adding a line" # get data: x = squeeze(item.getp('xdata')) y = squeeze(item.getp('ydata')) z = item.getp('zdata') # get line specifiactions: marker, color, style, width = self._get_linespecs(item) withstring = self._get_withstring(marker, color, style, width) if z is not None: # zdata is given, add a 3D curve: data = Gnuplot.Data(arrayconverter(x), arrayconverter(y), arrayconverter(squeeze(z)), title=item.getp('legend'), with=withstring, using='1:2:($3)') self._g('set parametric') else: # no zdata, add a 2D curve: data = Gnuplot.Data(arrayconverter(x), arrayconverter(y), title=item.getp('legend'), with=withstring, using='1:($2)') return data
e1eae8a026c35517220eaf929a751e68d18ca571 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4727/e1eae8a026c35517220eaf929a751e68d18ca571/gnuplot_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 1369, 12, 2890, 16, 761, 4672, 3536, 986, 279, 576, 40, 578, 890, 40, 8882, 358, 326, 9065, 12123, 309, 6369, 30, 1172, 315, 13962, 279, 980, 6, 468, 336, 501, 30, 619...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 1369, 12, 2890, 16, 761, 4672, 3536, 986, 279, 576, 40, 578, 890, 40, 8882, 358, 326, 9065, 12123, 309, 6369, 30, 1172, 315, 13962, 279, 980, 6, 468, 336, 501, 30, 619...
namespaces=namespaces, step=step,
step=step,
def categorymembers(self, category, namespaces=None, step=None, total=None): """Iterate members of specified category.
78498bee71bedde016ca629ee13643aac6a96815 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/78498bee71bedde016ca629ee13643aac6a96815/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3150, 7640, 12, 2890, 16, 3150, 16, 7728, 33, 7036, 16, 2235, 33, 7036, 16, 2078, 33, 7036, 4672, 3536, 14916, 4833, 434, 1269, 3150, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3150, 7640, 12, 2890, 16, 3150, 16, 7728, 33, 7036, 16, 2235, 33, 7036, 16, 2078, 33, 7036, 4672, 3536, 14916, 4833, 434, 1269, 3150, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
filt.add("project", value)
project_str = value
def main(): try: opts, args = getopt.getopt(sys.argv[2:], 's:p:w:d:n:') except getopt.GetoptError, err: print str(err) usage() if len(sys.argv) < 2: usage() action = sys.argv[1].lower() filt = Filter() submitter_str = "" delegate_str = "" for name, value in opts: if name == '-s': filt.add("state", value) elif name == '-p': filt.add("project", value) elif name == '-w': submitter_str = value elif name == '-d': delegate_str = value elif name == '-n': try: filt.add("max_count", int(value)) except: sys.stderr.write("Invalid maximum count '%s'\n" % value) usage() else: sys.stderr.write("Unknown option '%s'\n" % name) usage() if len(args) > 1: sys.stderr.write("Too many arguments specified\n") usage() try: rpc = xmlrpclib.Server(PW_XMLRPC_URL) except: sys.stderr.write("Unable to connect to %s\n" % PW_XMLRPC_URL) sys.exit(1) if action == 'list' or action == 'search': if len(args) > 0: filt.add("name__icontains", args[0]) action_list(rpc, filt, submitter_str, delegate_str) elif action.startswith('project'): action_projects(rpc) elif action.startswith('state'): action_states(rpc) elif action == 'view': try: patch_id = int(args[0]) except: sys.stderr.write("Invalid patch ID given\n") sys.exit(1) s = rpc.patch_get_mbox(patch_id) if len(s) > 0: print s elif action == 'get' or action == 'save': try: patch_id = int(args[0]) except: sys.stderr.write("Invalid patch ID given\n") sys.exit(1) action_get(rpc, patch_id) elif action == 'apply': try: patch_id = int(args[0]) except: sys.stderr.write("Invalid patch ID given\n") sys.exit(1) action_apply(rpc, patch_id) else: sys.stderr.write("Unknown action '%s'\n" % action) usage()
4b41c609084eff2ab49e1a7501314a0fa57450c4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7754/4b41c609084eff2ab49e1a7501314a0fa57450c4/pwclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 22, 30, 6487, 296, 87, 30, 84, 30, 91, 30, 72, 30, 82, 2497, 13, 1335, 336, 3838, 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, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 22, 30, 6487, 296, 87, 30, 84, 30, 91, 30, 72, 30, 82, 2497, 13, 1335, 336, 3838, 18, ...