rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
__slots__ = ( "__toklist", "__tokdict", "__doinit", "__name", "__parent", "__accumNames" )
__slots__ = ( "__toklist", "__tokdict", "__doinit", "__name", "__parent", "__accumNames", "__weakref__" )
def __repr__(self): return repr(self.tup)
3ffe2cb437e5c5ef179a32d974b9041a6bc31b6a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12364/3ffe2cb437e5c5ef179a32d974b9041a6bc31b6a/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 8480, 12, 2890, 18, 88, 416, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 8480, 12, 2890, 18, 88, 416, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self._p['pkgid'] = reader.GetAttribute('pkgid')
self._p['pkgId'] = reader.GetAttribute('pkgid')
def __init__(self, reader): BaseEntry.__init__(self, reader) self._p['pkgid'] = reader.GetAttribute('pkgid') self.files = {}
0e0e619e00dd60cc59ec8ce0eded55c30a06adb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/0e0e619e00dd60cc59ec8ce0eded55c30a06adb1/mdparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2949, 4672, 3360, 1622, 16186, 2738, 972, 12, 2890, 16, 2949, 13, 365, 6315, 84, 3292, 10657, 548, 3546, 273, 2949, 18, 967, 1499, 2668, 10657, 350, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2949, 4672, 3360, 1622, 16186, 2738, 972, 12, 2890, 16, 2949, 13, 365, 6315, 84, 3292, 10657, 548, 3546, 273, 2949, 18, 967, 1499, 2668, 10657, 350, 6134, ...
if upload: upload_xml_doc(outpath, upload)
if uploadurl: RFDocUploader().upload(outpath, uploadurl)
def create_xml_doc(lib, outpath): if _uploading(outpath): upload = outpath outpath = '/tmp/upload.xml' # TODO use temp file module else: upload = None _create_xml_doc(lib, outpath) if upload: upload_xml_doc(outpath, upload) os.remove(outpath)
8bb6da62811da17103eba10dd3d582480996c875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/8bb6da62811da17103eba10dd3d582480996c875/libdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2902, 67, 2434, 12, 2941, 16, 596, 803, 4672, 309, 389, 6327, 310, 12, 659, 803, 4672, 3617, 273, 596, 803, 596, 803, 273, 1173, 5645, 19, 6327, 18, 2902, 11, 468, 2660, 999...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2902, 67, 2434, 12, 2941, 16, 596, 803, 4672, 309, 389, 6327, 310, 12, 659, 803, 4672, 3617, 273, 596, 803, 596, 803, 273, 1173, 5645, 19, 6327, 18, 2902, 11, 468, 2660, 999...
category_suffix = category
subcat = parts[2]
def main(): # Try to find out which list is being administered parts = Utils.GetPathPieces() if not parts: # None, so just do the admin overview and be done with it admin_overview() return # Get the list object listname = parts[0].lower() try: mlist = MailList.MailList(listname, lock=0) except Errors.MMListError, e: admin_overview(_('No such list <em>%(listname)s</em>')) syslog('error', 'admin.py access for non-existent list: %s', listname) return # Now that we know what list has been requested, all subsequent admin # pages are shown in that list's preferred language. i18n.set_language(mlist.preferred_language) # If the user is not authenticated, we're done. cgidata = cgi.FieldStorage(keep_blank_values=1) if not mlist.WebAuthenticate((mm_cfg.AuthListAdmin, mm_cfg.AuthSiteAdmin), cgidata.getvalue('adminpw', '')): if cgidata.has_key('adminpw'): # This is a re-authorization attempt msg = Bold(FontSize('+1', _('Authorization failed.'))).Format() else: msg = '' Auth.loginpage(mlist, 'admin', msg=msg) return # Which subcategory was requested? Default is `general' if len(parts) == 1: category = 'general' category_suffix = '' else: category = parts[1] category_suffix = category # Is this a log-out request? if category == 'logout': print mlist.ZapCookie(mm_cfg.AuthListAdmin) Auth.loginpage(mlist, 'admin', frontpage=1) return # Sanity check if category not in mlist.GetConfigCategories().keys(): category = 'general' # Is the request for variable details? varhelp = None if cgidata.has_key('VARHELP'): varhelp = cgidata['VARHELP'].value elif cgidata.has_key('request_login') and os.environ.get('QUERY_STRING'): # POST methods, even if their actions have a query string, don't get # put into FieldStorage's keys :-( qs = cgi.parse_qs(os.environ['QUERY_STRING']).get('VARHELP') if qs and type(qs) == ListType: varhelp = qs[0] if varhelp: option_help(mlist, varhelp) return # The html page document doc = Document() doc.set_language(mlist.preferred_language) # From this point on, the MailList object must be locked. However, we # must release the lock no matter how we exit. try/finally isn't enough, # because of this scenario: user hits the admin page which may take a long # time to render; user gets bored and hits the browser's STOP button; # browser shuts down socket; server tries to write to broken socket and # gets a SIGPIPE. Under Apache 1.3/mod_cgi, Apache catches this SIGPIPE # (I presume it is buffering output from the cgi script), then turns # around and SIGTERMs the cgi process. Apache waits three seconds and # then SIGKILLs the cgi process. We /must/ catch the SIGTERM and do the # most reasonable thing we can in as short a time period as possible. If # we get the SIGKILL we're screwed (because it's uncatchable and we'll # have no opportunity to clean up after ourselves). # # This signal handler catches the SIGTERM, unlocks the list, and then # exits the process. The effect of this is that the changes made to the # MailList object will be aborted, which seems like the only sensible # semantics. # # BAW: This may not be portable to other web servers or cgi execution # models. def sigterm_handler(signum, frame, mlist=mlist): # Make sure the list gets unlocked... mlist.Unlock() # ...and ensure we exit, otherwise race conditions could cause us to # enter MailList.Save() while we're in the unlocked state, and that # could be bad! sys.exit(0) mlist.Lock() try: # Install the emergency shutdown signal handler signal.signal(signal.SIGTERM, sigterm_handler) if cgidata.keys(): # There are options to change change_options(mlist, category, cgidata, doc) # Let the list sanity check the changed values mlist.CheckValues() # Additional sanity checks if not mlist.digestable and not mlist.nondigestable: add_error_message( doc, _('''You have turned off delivery of both digest and non-digest messages. This is an incompatible state of affairs. You must turn on either digest delivery or non-digest delivery or your mailing list will basically be unusable.''')) if not mlist.digestable and mlist.getDigestMemberKeys(): add_error_message( doc, _('''You have digest members, but digests are turned off. Those people will not receive mail.''')) if not mlist.nondigestable and mlist.getRegularMemberKeys(): add_error_message( doc, _('''You have regular list members but non-digestified mail is turned off. They will receive mail until you fix this problem.''')) # Glom up the results page and print it out show_results(mlist, doc, category, category_suffix, cgidata) print doc.Format() mlist.Save() finally: # Now be sure to unlock the list. It's okay if we get a signal here # because essentially, the signal handler will do the same thing. And # unlocking is unconditional, so it's not an error if we unlock while # we're already unlocked. mlist.Unlock()
33e83ee21ddc441fc27ffc328291a023e9e8557d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/33e83ee21ddc441fc27ffc328291a023e9e8557d/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 6161, 358, 1104, 596, 1492, 666, 353, 3832, 3981, 1249, 329, 2140, 273, 6091, 18, 967, 743, 16539, 8610, 1435, 309, 486, 2140, 30, 468, 599, 16, 1427, 2537, 741, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 6161, 358, 1104, 596, 1492, 666, 353, 3832, 3981, 1249, 329, 2140, 273, 6091, 18, 967, 743, 16539, 8610, 1435, 309, 486, 2140, 30, 468, 599, 16, 1427, 2537, 741, 326, ...
else: self.addText("No new categories were found.")
def executeUpdate(self): self.addText("Starting updating new files") self.addText("Reading file status from server")
a02e8d7153f2c4738602d3234a7588184bd80c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/a02e8d7153f2c4738602d3234a7588184bd80c5f/updateOrange.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17521, 12, 2890, 4672, 365, 18, 1289, 1528, 2932, 11715, 9702, 394, 1390, 7923, 365, 18, 1289, 1528, 2932, 15714, 585, 1267, 628, 1438, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 17521, 12, 2890, 4672, 365, 18, 1289, 1528, 2932, 11715, 9702, 394, 1390, 7923, 365, 18, 1289, 1528, 2932, 15714, 585, 1267, 628, 1438, 7923, 2, -100, -100, -100, -100, -100, -100, -100, ...
def closing(self, node): s = u''
def closing(s, node): r = u''
def closing(self, node): s = u'' if node.getChildrenLength(True) == 1: noline()
01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2/Packer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7647, 12, 87, 16, 756, 4672, 436, 273, 582, 6309, 309, 756, 18, 588, 4212, 1782, 12, 5510, 13, 422, 404, 30, 290, 15572, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7647, 12, 87, 16, 756, 4672, 436, 273, 582, 6309, 309, 756, 18, 588, 4212, 1782, 12, 5510, 13, 422, 404, 30, 290, 15572, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._objects += self._env.SwigWrapper(file, **self._options)
wrapper, module = self._env.Swig(file, **self._options) self._objects += self._env.SwigWrapper(wrapper, **self._options)
def _makeObjects(self): if self._objects is None: settings = Settings() for dep in self._deps: lib = BuildRegistry.GetDependency(dep) if lib: lib._addSettings(settings, self._bdeps) else: print '%s: could not find dependency %s' % (self._name, dep) sys.exit(1) self._settings = settings settings.apply(self._env) self._objects = [] for file in self._sources: if isinstance(file, SCons.Node.FS.File): if file.get_suffix() == '.i': self._objects += self._env.SwigWrapper(file, **self._options) elif file.get_suffix() != '.h': self._objects.append(self._env.SharedObject(file, **self._options)) else: self._objects.append(file)
ae1c5f4b99ec0aac958912d5cc9f44624174e667 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/ae1c5f4b99ec0aac958912d5cc9f44624174e667/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 4710, 12, 2890, 4672, 309, 365, 6315, 6911, 353, 599, 30, 1947, 273, 8709, 1435, 364, 5993, 316, 365, 6315, 14877, 30, 2561, 273, 3998, 4243, 18, 967, 7787, 12, 15037, 13, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 4710, 12, 2890, 4672, 309, 365, 6315, 6911, 353, 599, 30, 1947, 273, 8709, 1435, 364, 5993, 316, 365, 6315, 14877, 30, 2561, 273, 3998, 4243, 18, 967, 7787, 12, 15037, 13, 3...
self.assertRaises(ValueError, time.strftime, '',
self.assertRaises(ValueError, func,
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple (0 is valid for *all* values).
cdc0bc5b7bb85b227d83a29f5689a20431308ec8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/cdc0bc5b7bb85b227d83a29f5689a20431308ec8/test_time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 9982, 67, 10576, 67, 24609, 12, 2890, 4672, 468, 4344, 3071, 716, 10405, 1435, 4271, 326, 4972, 434, 326, 11191, 2140, 468, 792, 326, 813, 3193, 261, 20, 353, 923, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 9982, 67, 10576, 67, 24609, 12, 2890, 4672, 468, 4344, 3071, 716, 10405, 1435, 4271, 326, 4972, 434, 326, 11191, 2140, 468, 792, 326, 813, 3193, 261, 20, 353, 923, 364, ...
topic = topic.replace(what, with)
topic = what.sub(with, topic)
def cmd_topic(self, user, channel, params): """ Updates the current channel's topic. Usage: TOPIC [channel] [command] <topic>
a5a2497f9290e730263a463cbf28a312754709c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2194/a5a2497f9290e730263a463cbf28a312754709c7/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 10476, 12, 2890, 16, 729, 16, 1904, 16, 859, 4672, 3536, 15419, 326, 783, 1904, 1807, 3958, 18, 10858, 30, 8493, 20385, 306, 4327, 65, 306, 3076, 65, 411, 10476, 34, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 10476, 12, 2890, 16, 729, 16, 1904, 16, 859, 4672, 3536, 15419, 326, 783, 1904, 1807, 3958, 18, 10858, 30, 8493, 20385, 306, 4327, 65, 306, 3076, 65, 411, 10476, 34, 2, -100,...
if len(segments) == 2 and segments[1] == '..' and segments[0] == '':
if segments == ['', '..']:
def urljoin(base, url, allow_fragments = 1): """Join a base URL and a possibly relative URL to form an absolute interpretation of the latter.""" if not base: return url bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ urlparse(base, '', allow_fragments) scheme, netloc, path, params, query, fragment = \ urlparse(url, bscheme, allow_fragments) if scheme != bscheme or scheme not in uses_relative: return urlunparse((scheme, netloc, path, params, query, fragment)) if scheme in uses_netloc: if netloc: return urlunparse((scheme, netloc, path, params, query, fragment)) netloc = bnetloc if path[:1] == '/': return urlunparse((scheme, netloc, path, params, query, fragment)) if not path: return urlunparse((scheme, netloc, bpath, params, query or bquery, fragment)) segments = bpath.split('/')[:-1] + path.split('/') # XXX The stuff below is bogus in various ways... if segments[-1] == '.': segments[-1] = '' while '.' in segments: segments.remove('.') while 1: i = 1 n = len(segments) - 1 while i < n: if segments[i] == '..' and segments[i-1]: del segments[i-1:i+1] break i = i+1 else: break if len(segments) == 2 and segments[1] == '..' and segments[0] == '': segments[-1] = '' elif len(segments) >= 2 and segments[-1] == '..': segments[-2:] = [''] return urlunparse((scheme, netloc, '/'.join(segments), params, query, fragment))
867952f6e437270cc906af34dba28a9b580ec265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/867952f6e437270cc906af34dba28a9b580ec265/urlparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 3536, 4572, 279, 1026, 1976, 471, 279, 10016, 3632, 1976, 358, 646, 392, 4967, 10634, 367, 434, 326, 23740, 12123, 309, 486...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25447, 12, 1969, 16, 880, 16, 1699, 67, 29528, 273, 404, 4672, 3536, 4572, 279, 1026, 1976, 471, 279, 10016, 3632, 1976, 358, 646, 392, 4967, 10634, 367, 434, 326, 23740, 12123, 309, 486...
rf.mirror_rp.get_parent_rp().fsync()
if Globals.fsync_directories: rf.mirror_rp.get_parent_rp().fsync()
def restore_orig_regfile(self, rf): """Restore original regular file
70b19e27102e0c4eacb21e293a3082a8f4cbcdff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/783/70b19e27102e0c4eacb21e293a3082a8f4cbcdff/regress.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 4949, 67, 1574, 768, 12, 2890, 16, 9075, 4672, 3536, 10874, 2282, 6736, 585, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 4949, 67, 1574, 768, 12, 2890, 16, 9075, 4672, 3536, 10874, 2282, 6736, 585, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
totalValue /= 60
totalValue /= 60.0
def __consolidateMarks( self, allData ): """ Copies all marks except last step ones and consolidates them """ if allData: lastStepToSend = int( time.mktime( time.gmtime() ) ) else: lastStepToSend = self.__UTCStepTime() - self.timeStep consolidatedMarks = {} remainderMarks = {} for key in self.activitiesMarks: consolidatedMarks[ key ] = {} remainderMarks [ key ] = {} for markTime in self.activitiesMarks[ key ]: markValue = self.activitiesMarks[ key ][ markTime ] if markTime > lastStepToSend: remainderMarks[ key ][ markTime ] = markValue else: consolidatedMarks[ key ][ markTime ] = markValue #Consolidate the copied ones totalValue = 0 for mark in consolidatedMarks[ key ][ markTime ]: totalValue += mark if self.activitiesDefinitions[ key ][ 'type' ] == self.OP_MEAN: totalValue /= len( consolidatedMarks[ key ][ markTime ] ) elif self.activitiesDefinitions[ key ][ 'type' ] == self.OP_RATE: totalValue /= 60 consolidatedMarks[ key ][ markTime ] = totalValue if len( consolidatedMarks[ key ] ) == 0: del( consolidatedMarks[ key ] ) self.activitiesMarks = remainderMarks return consolidatedMarks
3a7d3a07aeb3cc361aaa7f1afa4cf2d6bffe9363 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/3a7d3a07aeb3cc361aaa7f1afa4cf2d6bffe9363/MonitoringClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8559, 7953, 340, 20981, 12, 365, 16, 777, 751, 262, 30, 3536, 28506, 606, 777, 13999, 1335, 1142, 2235, 5945, 471, 21785, 815, 2182, 3536, 309, 777, 751, 30, 1142, 4160, 28878, 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, 8559, 7953, 340, 20981, 12, 365, 16, 777, 751, 262, 30, 3536, 28506, 606, 777, 13999, 1335, 1142, 2235, 5945, 471, 21785, 815, 2182, 3536, 309, 777, 751, 30, 1142, 4160, 28878, 273...
print "control_opt: " + control_opt
def fd_createvirtdev(path, params):
b816f54f7200bbff3079f796073be2e91b9bfc6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8449/b816f54f7200bbff3079f796073be2e91b9bfc6e/tcm_fileio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5194, 67, 2640, 14035, 5206, 12, 803, 16, 859, 4672, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 5194, 67, 2640, 14035, 5206, 12, 803, 16, 859, 4672, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
activity.update(msg="Saving...")
activity.update(msg=_(u"Saving..."))
def reload(rv, filename, serializer=PickleSerializer, activity=None, testmode=False): """ Loads EIM records from a file and applies them """ translator = getTranslator() if not testmode: oldMaster = waitForDeferred(MasterPassword.get(rv)) else: oldMaster = '' newMaster = 'secret' if activity: activity.update(totalWork=None, msg=_(u"Counting records...")) input = open(filename, "rb") load = serializer.loader(input) i = 0 while True: record = load() if not record: break i += 1 input.close() activity.update(totalWork=i) trans = translator(rv) trans.startImport() input = open(filename, "rb") try: load = serializer.loader(input) i = 0 while True: record = load() if not record: break trans.importRecord(record) i += 1 if activity: activity.update(msg="Imported %d records" % i, work=1) if i % 1000 == 0: # Commit every 1,000 records if activity: activity.update(msg="Saving...") rv.commit() del load finally: input.close() trans.finishImport() if activity: activity.update(msg="Saving...") rv.commit() # Passwords that existed before reload are encrypted with oldMaster, and # passwords that we reloaded are encrypted with newMaster, so now we need # to go through all passwords and re-encrypt all the old ones with # newMaster. # First, let's get the newMaster waitForDeferred(MasterPassword.clear()) if not testmode: prefs = schema.ns("osaf.framework.MasterPassword", rv).masterPasswordPrefs if prefs.masterPassword: wx.MessageBox (_(u"Please enter the master password you used to protect this file to reload account passwords."), _(u'Protect Passwords'), parent=wx.GetApp().mainFrame) dummy = schema.ns("osaf.framework.password", rv).passwordPrefs.dummyPassword while True: try: newMaster = waitForDeferred(MasterPassword.get(rv, testPassword=dummy)) break except password.NoMasterPassword: if wx.MessageBox(_(u'If you do not remember your master password, all account passwords will be deleted. Delete account passwords?'), _(u'Reset Master Password'), style = wx.YES_NO, parent=wx.GetApp().mainFrame) == wx.YES: MasterPassword.reset(rv) return # Then re-encrypt for item in password.Password.iterItems(rv): if not waitForDeferred(item.initialized()): # Don't need to re-encrypt uninitialized passwords continue try: pw = waitForDeferred(item.decryptPassword(masterPassword=oldMaster)) except password.DecryptionError: # Maybe this was one of the new passwords loaded from # dump, so let's try the new master password try: waitForDeferred(item.decryptPassword(masterPassword=newMaster)) except password.DecryptionError: # Oops, we are in trouble, can't really do much but # reset() to avoid further problems. logger.exception('found passwords that could not be decrypted; clearing passwords') MasterPassword.reset(rv) break # Since this is already encrypted with the new # master password we don't need to re-encrypt continue waitForDeferred(item.encryptPassword(pw, masterPassword=newMaster))
68743f36ba6816c3651af5201bd1a3df4be52b07 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/68743f36ba6816c3651af5201bd1a3df4be52b07/dumpreload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 12, 4962, 16, 1544, 16, 6340, 33, 17968, 298, 6306, 16, 5728, 33, 7036, 16, 1842, 3188, 33, 8381, 4672, 3536, 4444, 87, 512, 3445, 3853, 628, 279, 585, 471, 10294, 2182, 3536, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 12, 4962, 16, 1544, 16, 6340, 33, 17968, 298, 6306, 16, 5728, 33, 7036, 16, 1842, 3188, 33, 8381, 4672, 3536, 4444, 87, 512, 3445, 3853, 628, 279, 585, 471, 10294, 2182, 3536, 22...
print 'new.code()'
def break_yolks(self): self.yolks = self.yolks - 2
ee00f96c9cb66fe4ba0972e4670ddf7a64ea06f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ee00f96c9cb66fe4ba0972e4670ddf7a64ea06f4/test_new.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 898, 67, 93, 355, 7904, 12, 2890, 4672, 365, 18, 93, 355, 7904, 273, 365, 18, 93, 355, 7904, 300, 576, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 898, 67, 93, 355, 7904, 12, 2890, 4672, 365, 18, 93, 355, 7904, 273, 365, 18, 93, 355, 7904, 300, 576, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
or ord(entry['ChineseCharacter']) < int('20000', 16):
or ord(entry['ChineseCharacter']) < int('10000', 16):
def generator(self): """Provides a pronunciation and a path to the audio file.""" entryList = [] xmlHandler = Kanjidic2Builder.XMLHandler(entryList, self.tagDict)
99fb2d686ab41477e6029705b6d22b813e0f1a62 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/99fb2d686ab41477e6029705b6d22b813e0f1a62/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4456, 12, 2890, 4672, 3536, 17727, 279, 846, 265, 551, 7072, 471, 279, 589, 358, 326, 7447, 585, 12123, 1241, 682, 273, 5378, 2025, 1503, 273, 1475, 304, 18252, 335, 22, 1263, 18, 4201, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4456, 12, 2890, 4672, 3536, 17727, 279, 846, 265, 551, 7072, 471, 279, 589, 358, 326, 7447, 585, 12123, 1241, 682, 273, 5378, 2025, 1503, 273, 1475, 304, 18252, 335, 22, 1263, 18, 4201, ...
logging.getLogger('schema').info("Table '%s': column '%s' changed type from %s to %s" % (self._table, k, c[0], c[1]))
self.__schema.debug("Table '%s': column '%s' changed type from %s to %s", self._table, k, c[0], c[1])
f_pg_def = res[0]
a73711cb180c536a45540480eccaf5c3f0aa8ad3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a73711cb180c536a45540480eccaf5c3f0aa8ad3/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 67, 8365, 67, 536, 273, 400, 63, 20, 65, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 67, 8365, 67, 536, 273, 400, 63, 20, 65, 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,...
Finite subgroup with invariants [2] over QQ of Simple abelian variety factor 65a(1,65) of dimension 1 of J0(65)
(Finite subgroup with invariants [2] over QQ of Simple abelian subvariety 65a(1,65) of dimension 1 of J0(65), Abelian subvariety of dimension 0 of J0(65))
def intersection(self, other): """ Returns the intersection of self and other inside a common ambient Jacobian product.
231a556974015ed454b20c5783447e82495d8183 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/231a556974015ed454b20c5783447e82495d8183/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7619, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 7619, 434, 365, 471, 1308, 4832, 279, 2975, 13232, 1979, 804, 1077, 26968, 3017, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 7619, 12, 2890, 16, 1308, 4672, 3536, 2860, 326, 7619, 434, 365, 471, 1308, 4832, 279, 2975, 13232, 1979, 804, 1077, 26968, 3017, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
ON (s.date_to >= a.name \ AND s.date_from <= a.name \
ON (s.date_to >= to_date(to_char(a.name, 'YYYY-MM-dd'),'YYYY-MM-dd') \ AND s.date_from <= to_date(to_char(a.name, 'YYYY-MM-dd'),'YYYY-MM-dd') \
def _sheet(self, cursor, user, ids, name, args, context): sheet_obj = self.pool.get('hr_timesheet_sheet.sheet')
aaf478c22075e872786f6696ff3b9b7ecaf0bdde /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/aaf478c22075e872786f6696ff3b9b7ecaf0bdde/hr_timesheet_sheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8118, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 6202, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 7256, 67, 8293, 2963, 67, 8118, 18, 8118, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8118, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 6202, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 7256, 67, 8293, 2963, 67, 8118, 18, 8118, 6134, ...
numlines = 4
def revert_include(document): 'Reverts include insets to old format.' i = 0 r1 = re.compile('LatexCommand (.+)') r2 = re.compile('filename (.+)') r3 = re.compile('options (.*)') while True: i = find_token(document.body, "\\begin_inset CommandInset include", i) if i == -1: return previewline = document.body[i + 1] m = r1.match(document.body[i + 2]) if m == None: document.warning("Malformed LyX document: No LatexCommand line for `" + document.body[i] + "' on line " + str(i) + ".") i += 1 continue cmd = m.group(1) m = r2.match(document.body[i + 3]) if m == None: document.warning("Malformed LyX document: No filename line for `" + \ document.body[i] + "' on line " + str(i) + ".") i += 2 continue fn = m.group(1) options = "" numlines = 4 if (cmd == "lstinputlisting"): m = r3.match(document.body[i + 4]) if m != None: options = m.group(1) numlines = 5 newline = "\\begin_inset Include \\" + cmd + "{" + fn + "}" if options: newline += ("[" + options + "]") insertion = [newline, previewline] document.body[i : i + numlines] = insertion i += 2
175959580fbd560833f6e0f045fbd7bd4f8a6029 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/175959580fbd560833f6e0f045fbd7bd4f8a6029/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 6702, 12, 5457, 4672, 296, 426, 31537, 2341, 23576, 358, 1592, 740, 1093, 277, 273, 374, 436, 21, 273, 283, 18, 11100, 2668, 6607, 338, 2189, 261, 15591, 2506, 13, 436, 22, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 6702, 12, 5457, 4672, 296, 426, 31537, 2341, 23576, 358, 1592, 740, 1093, 277, 273, 374, 436, 21, 273, 283, 18, 11100, 2668, 6607, 338, 2189, 261, 15591, 2506, 13, 436, 22, ...
raise RuntimeException
raise RuntimeError
def run(self): raise RuntimeException
854e5f345aed620a20da65deb38ffc43b6ddd112 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/854e5f345aed620a20da65deb38ffc43b6ddd112/threading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1002, 7265, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1086, 12, 2890, 4672, 1002, 7265, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
ctxt.parseDocument() try: doc = ctxt.doc() except: doc = None if error_nr == 0 or ctxt.wellFormed() != 0:
ret = ctxt.parseDocument() try: doc = ctxt.doc() except: doc = None if doc != None: doc.freeDoc() if ret == 0 or ctxt.wellFormed() != 0:
def testNotWfEnt(filename, id): global error_nr global error_msg global log error_nr = 0 error_msg = '' ctxt = libxml2.createFileParserCtxt(filename) if ctxt == None: return -1 ctxt.replaceEntities(1) ctxt.parseDocument() try: doc = ctxt.doc() except: doc = None if error_nr == 0 or ctxt.wellFormed() != 0: print "%s: error: Well Formedness error not detected" % (id) log.write("%s: error: Well Formedness error not detected\n" % (id)) doc.freeDoc() return 0 return 1
8f597c3bf515bc1dc962c7eefbe6eb6745b9d5a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/8f597c3bf515bc1dc962c7eefbe6eb6745b9d5a5/check-xml-test-suite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1248, 59, 74, 14199, 12, 3459, 16, 612, 4672, 2552, 555, 67, 11611, 2552, 555, 67, 3576, 2552, 613, 225, 555, 67, 11611, 273, 374, 555, 67, 3576, 273, 875, 225, 14286, 273, 16394...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1248, 59, 74, 14199, 12, 3459, 16, 612, 4672, 2552, 555, 67, 11611, 2552, 555, 67, 3576, 2552, 613, 225, 555, 67, 11611, 273, 374, 555, 67, 3576, 273, 875, 225, 14286, 273, 16394...
if exist_width or exist_height:
if size and (exist_width or exist_height):
def build_img_attributes(attributes, context): attrs = {} for key, attr_value in attributes.iteritems(): key = key[1] if key == 'src': file_path, size = context.check_image(attr_value) attrs[(None, 'src')] = file_path elif key == 'width': attrs[(None, 'width')] = format_size(attr_value) elif key == 'height': attrs[(None, 'height')] = format_size(attr_value) exist_width = exist_attribute(attrs, ['width']) exist_height = exist_attribute(attrs, ['height']) if exist_width or exist_height: width, height = size width = width * 1.0 height = height * 1.0 tup_width = (None, 'width') tup_height = (None, 'height') # Calculate sizes to resize if exist_width: element = attrs[tup_width] if isinstance(element, str) and element.endswith('%'): value = get_int_value(element[:-1]) attrs[tup_width] = pc_float(value, width) if not exist_height: attrs[tup_height] = round(attrs[tup_width] * height / width) if exist_height: element = attrs[tup_height] if isinstance(element, str) and element.endswith('%'): value = get_int_value(element[:-1]) attrs[tup_height] = pc_float(value, height) if not exist_width: attrs[tup_width] = round(attrs[tup_height] * width / height) return attrs
cf7f7556ee68a5b1a0e9cf6a5e692652a89dd297 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/cf7f7556ee68a5b1a0e9cf6a5e692652a89dd297/pml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 6081, 67, 4350, 12, 4350, 16, 819, 4672, 3422, 273, 2618, 364, 498, 16, 1604, 67, 1132, 316, 1677, 18, 2165, 3319, 13332, 498, 273, 498, 63, 21, 65, 309, 498, 422, 296, 481...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 6081, 67, 4350, 12, 4350, 16, 819, 4672, 3422, 273, 2618, 364, 498, 16, 1604, 67, 1132, 316, 1677, 18, 2165, 3319, 13332, 498, 273, 498, 63, 21, 65, 309, 498, 422, 296, 481...
createComposite()
if not os.path.exists( "generated" ): os.mkdir( "generated" ) generateEnumerationFile() generateSourcesPP( allBuiltNames ) for name in buildNowNames: print name generateClassCode( name ) for name in buildNowStructs: print name generateClassCode( name, isStruct=True )
def createComposite(): filesToOmit = ( "physx_composite.cxx", "physxTemplate.cxx", ) compositeFile = file( "physx_composite.cxx", "w" ) compositeFile.write( "\n" ) for filename in os.listdir( os.getcwd() ): if filename.endswith( ".cxx" ) and (filename not in filesToOmit): compositeFile.write( '#include "%s"\n' % filename )
58c13de4ca94fe933868ae8ab35934c6fb43bffa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/58c13de4ca94fe933868ae8ab35934c6fb43bffa/generateCode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 9400, 13332, 1390, 774, 51, 1938, 273, 261, 315, 844, 1900, 92, 67, 27676, 18, 71, 5279, 3113, 315, 844, 1900, 92, 2283, 18, 71, 5279, 3113, 262, 225, 9635, 812, 273, 585, 12, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 9400, 13332, 1390, 774, 51, 1938, 273, 261, 315, 844, 1900, 92, 67, 27676, 18, 71, 5279, 3113, 315, 844, 1900, 92, 2283, 18, 71, 5279, 3113, 262, 225, 9635, 812, 273, 585, 12, 3...
self._shape_canvas.ReleaseMouse()
if WX_USE_X_CAPTURE: self._shape_canvas.ReleaseMouse()
def inout_enddragleft_cb(self, parent_glyph, io_shape, x, y, keys, attachment): # give the mouse back ASAP, else people get angry, he he self._shape_canvas.ReleaseMouse()
f6b2b49453eca1eb56bc927fd81319f39cb6dd1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/f6b2b49453eca1eb56bc927fd81319f39cb6dd1e/graph_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 659, 67, 409, 15997, 4482, 67, 7358, 12, 2890, 16, 982, 67, 19426, 16, 2527, 67, 4867, 16, 619, 16, 677, 16, 1311, 16, 6042, 4672, 468, 8492, 326, 7644, 1473, 5355, 2203, 16, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 659, 67, 409, 15997, 4482, 67, 7358, 12, 2890, 16, 982, 67, 19426, 16, 2527, 67, 4867, 16, 619, 16, 677, 16, 1311, 16, 6042, 4672, 468, 8492, 326, 7644, 1473, 5355, 2203, 16, 46...
for ip,i in zip(self._inputPoints, range(len(self._inputPoints))):
for ip,nodePos in zip(self._inputPoints, range(len(self._inputPoints))):
def _transferPoints(self): """This will transfer all points from self._inputPoints to the _fastMarching object. """
c5ab73839e49a5c7ec0f94930b1d055d2311811a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/c5ab73839e49a5c7ec0f94930b1d055d2311811a/fastMarching.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13866, 5636, 12, 2890, 4672, 3536, 2503, 903, 7412, 777, 3143, 628, 365, 6315, 2630, 5636, 358, 326, 389, 8076, 49, 991, 310, 733, 18, 3536, 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, 389, 13866, 5636, 12, 2890, 4672, 3536, 2503, 903, 7412, 777, 3143, 628, 365, 6315, 2630, 5636, 358, 326, 389, 8076, 49, 991, 310, 733, 18, 3536, 2, -100, -100, -100, -100, -100, -100, ...
return line3d([(self.xmin, self.ymin, 0), (self.xmax, self.ymax, 0)], arrow_head=True, **options)
return line3d([(self.xtail, self.ytail, 0), (self.xhead, self.yhead, 0)], arrow_head=True, **options)
def plot3d(self, **kwds): """ EXAMPLE: sage: arrow((0,0),(1,1)).plot3d() """ from sage.plot.plot3d.shapes2 import line3d options = self._plot3d_options() options.update(kwds) return line3d([(self.xmin, self.ymin, 0), (self.xmax, self.ymax, 0)], arrow_head=True, **options)
20fed398d25002f78f9edd13592206eb593b0a5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/20fed398d25002f78f9edd13592206eb593b0a5f/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 2890, 16, 2826, 25577, 4672, 3536, 5675, 21373, 30, 272, 410, 30, 12274, 12443, 20, 16, 20, 3631, 12, 21, 16, 21, 13, 2934, 4032, 23, 72, 1435, 3536, 628, 272, 410,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 23, 72, 12, 2890, 16, 2826, 25577, 4672, 3536, 5675, 21373, 30, 272, 410, 30, 12274, 12443, 20, 16, 20, 3631, 12, 21, 16, 21, 13, 2934, 4032, 23, 72, 1435, 3536, 628, 272, 410,...
package_info['version'] = system_output(v_cmd) package_info['arch'] = system_output(a_cmd) try: system(i_cmd) package_info['installed'] = True except: package_info['installed'] = False except: package_info['system_support'] = False package_info['installed'] = False if len(file_result.split(' ')) == 6: if file_result.split(' ')[3] == 'src': package_info['source'] = True elif file_result.split(' ')[3] == 'bin': package_info['source'] = False else: package_info['source'] = False package_info['arch'] = file_result.split(' ')[4] package_info['version'] = file_result.split(' ')[5] elif len(file_result.split(' ')) == 5: if file_result.split(' ')[3] == 'src': package_info['source'] = True elif file_result.split(' ')[3] == 'bin': package_info['source'] = False else: package_info['source'] = False package_info['arch'] = 'noarch' package_info['version'] = file_result.split(' ')[4]
elif file_result.split(' ')[3] == 'bin': package_info['source'] = False
def rpm_info(rpm_package): """\ Returns a dictionary with information about an RPM package file - type: Package management program that handles the file - system_support: If the package management program is installed on the system or not - source: If it is a source (True) our binary (False) package - version: The package version (or name), that is used to check against the package manager if the package is installed - arch: The architecture for which a binary package was built - installed: Whether the package is installed (True) on the system or not (False) Raises an exception if the package file is not an rpm file """ file_result = system_output('file ' + rpm_package) package_pattern = re.compile('RPM', re.IGNORECASE) result = re.search(package_pattern, file_result) if result: package_info = {} package_info['type'] = 'rpm' try: os_dep.command('rpm') # Build the command strings that will be used to get package info # s_cmd - Command to determine if package is a source package # a_cmd - Command to determine package architecture # v_cmd - Command to determine package version # i_cmd - Command to determiine if package is installed s_cmd = 'rpm -qp --qf %{SOURCE} ' + rpm_package + ' 2>/dev/null' a_cmd = 'rpm -qp --qf %{ARCH} ' + rpm_package + ' 2>/dev/null' v_cmd = 'rpm -qp ' + rpm_package + ' 2>/dev/null' i_cmd = 'rpm -q ' + system_output(v_cmd) + ' 2>&1 >/dev/null' package_info['system_support'] = True # Checking whether this is a source or src package source = system_output(s_cmd) if source == '(none)': package_info['source'] = False else: package_info['source'] = True package_info['version'] = system_output(v_cmd) package_info['arch'] = system_output(a_cmd) # Checking if package is installed try: system(i_cmd) package_info['installed'] = True except: package_info['installed'] = False except: package_info['system_support'] = False package_info['installed'] = False # File gives a wealth of information about rpm packages. # However, we can't trust all this info, as incorrectly # packaged rpms can report some wrong values. # It's better than nothing though :) if len(file_result.split(' ')) == 6: # Figure if package is a source package if file_result.split(' ')[3] == 'src': package_info['source'] = True elif file_result.split(' ')[3] == 'bin': package_info['source'] = False else: package_info['source'] = False # Get architecture package_info['arch'] = file_result.split(' ')[4] # Get version package_info['version'] = file_result.split(' ')[5] elif len(file_result.split(' ')) == 5: # Figure if package is a source package if file_result.split(' ')[3] == 'src': package_info['source'] = True elif file_result.split(' ')[3] == 'bin': package_info['source'] = False else: package_info['source'] = False # When the arch param is missing on file, we assume noarch package_info['arch'] = 'noarch' # Get version package_info['version'] = file_result.split(' ')[4] else: # If everything else fails... package_info['source'] = False package_info['arch'] = 'Not Available' package_info['version'] = 'Not Available' return package_info else: raise PackageError('Package %s is not an RPM package.' % rpm_package)
0f5dcab9d2fdfaa6328baf4fa9aa57b606fd56ed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/0f5dcab9d2fdfaa6328baf4fa9aa57b606fd56ed/package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25228, 67, 1376, 12, 86, 7755, 67, 5610, 4672, 3536, 64, 2860, 279, 3880, 598, 1779, 2973, 392, 534, 12728, 2181, 585, 300, 618, 30, 7508, 11803, 5402, 716, 7372, 326, 585, 300, 2619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25228, 67, 1376, 12, 86, 7755, 67, 5610, 4672, 3536, 64, 2860, 279, 3880, 598, 1779, 2973, 392, 534, 12728, 2181, 585, 300, 618, 30, 7508, 11803, 5402, 716, 7372, 326, 585, 300, 2619, ...
message = _("Can't create directory '%(path)s', reported error: %(error)s") % {'path':path, 'error':msg} print message if self.frame: self.frame.logMessage(message)
log.addwarning(_("Can't create directory '%(path)s', reported error: %(error)s") % {'path':path, 'error':msg})
def writeConfig(self): self.config_lock.acquire() for i in self.sections.keys(): if not self.parser.has_section(i): self.parser.add_section(i) for j in self.sections[i].keys(): if j not in ["sharedfiles", "sharedfilesstreams", "wordindex", "fileindex", "sharedmtimes", "bsharedfiles", "bsharedfilesstreams", "bwordindex", "bfileindex", "bsharedmtimes"]: self.parser.set(i, j, self.sections[i][j]) else: self.parser.remove_option(i, j) path, fn = os.path.split(self.filename) try: if not os.path.isdir(path): os.makedirs(path) except OSError, msg: message = _("Can't create directory '%(path)s', reported error: %(error)s") % {'path':path, 'error':msg} print message if self.frame: self.frame.logMessage(message) oldumask = os.umask(0077) try: f = open(self.filename + ".new", "w") except IOError, e: message = _("Can't save config file, I/O error: %s") % e print message if self.frame: self.frame.logMessage(message) self.config_lock.release() return else: try: self.parser.write(f) except IOError, e: message = _("Can't save config file, I/O error: %s") % e print message if self.frame: self.frame.logMessage(message) self.config_lock.release() return else: f.close() os.umask(oldumask) # A paranoid precaution since config contains the password try: os.chmod(self.filename, 0600) except: pass try: s = os.stat(self.filename) if s.st_size > 0: try: if os.path.exists(self.filename + ".old"): os.remove(self.filename + ".old") except OSError, error: message = _("Can't remove %s" % self.filename + ".old") print message if self.frame: self.frame.logMessage(message) try: os.rename(self.filename, self.filename + ".old") except OSError, error: message = _("Can't back config file up, error: %s") % error print message if self.frame: self.frame.logMessage(message) except OSError: pass try: os.rename(self.filename + ".new", self.filename) except OSError, error: message = _("Can't rename config file, error: %s") % error print message if self.frame: self.frame.logMessage(message) self.config_lock.release()
d03b1060449a904912df2e17c0cce7abc6348d8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/d03b1060449a904912df2e17c0cce7abc6348d8f/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 809, 12, 2890, 4672, 365, 18, 1425, 67, 739, 18, 1077, 1039, 1435, 364, 277, 316, 365, 18, 11657, 18, 2452, 13332, 309, 486, 365, 18, 4288, 18, 5332, 67, 3464, 12, 77, 4672, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 809, 12, 2890, 4672, 365, 18, 1425, 67, 739, 18, 1077, 1039, 1435, 364, 277, 316, 365, 18, 11657, 18, 2452, 13332, 309, 486, 365, 18, 4288, 18, 5332, 67, 3464, 12, 77, 4672, 36...
path = os.path.join(os.path.dirname(__file__), 'downloads.html') self.response.out.write(template.render(path, template_values))
self.render_template('downloads.html', template_values)
def get(self): user = util.get_current_user() user_data = UserData.get_for_current_user() logout_url = users.create_logout_url(self.request.uri) template_values = qa.add_template_values({'App': App, 'points': user_data.points, 'username': user and user.nickname() or "", 'login_url': util.create_login_url(self.request.uri), 'logout_url': logout_url}, self.request) path = os.path.join(os.path.dirname(__file__), 'downloads.html') self.response.out.write(template.render(path, template_values))
6d878f00e096131e1d877c83bff8ce52b7d25231 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/6d878f00e096131e1d877c83bff8ce52b7d25231/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 1709, 18, 588, 67, 2972, 67, 1355, 1435, 729, 67, 892, 273, 31109, 18, 588, 67, 1884, 67, 2972, 67, 1355, 1435, 12735, 67, 718, 273, 3677, 18, 2640, 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, 336, 12, 2890, 4672, 729, 273, 1709, 18, 588, 67, 2972, 67, 1355, 1435, 729, 67, 892, 273, 31109, 18, 588, 67, 1884, 67, 2972, 67, 1355, 1435, 12735, 67, 718, 273, 3677, 18, 2640, 67...
"""This thread is responsible fore dispatching events"""
"""This thread is responsible for dispatching events"""
def event_dispatch(self): """This thread is responsible fore dispatching events"""
7cdd5c3d68d5adfce1961b30d323910f37b90467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14505/7cdd5c3d68d5adfce1961b30d323910f37b90467/manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 10739, 12, 2890, 4672, 3536, 2503, 2650, 353, 14549, 895, 3435, 310, 2641, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 10739, 12, 2890, 4672, 3536, 2503, 2650, 353, 14549, 895, 3435, 310, 2641, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
4443*a + 13964
10630*a + 6033
def supersingular_j(FF): r""" This function returns a supersingular j-invariant over the finite field FF. INPUT: FF -- finite field with p^2 elements, where p is a prime number OUTPUT: finite field element -- a supersingular j-invariant defined over the finite field FF EXAMPLES: The following examples calculate supersingular j-invariants for a few finite fields. sage: supersingular_j(GF(7^2, 'a')) 6 Observe that in this example the j-invariant is not defined over the prime field. sage: supersingular_j(GF(15073^2,'a')) 4443*a + 13964 sage: supersingular_j(GF(83401^2, 'a')) 67977 AUTHORS: David Kohel -- kohel@maths.usyd.edu.au Iftikhar Burhanuddin -- burhanud@usc.edu """ if not(FF.is_field()) or not(FF.is_finite()): raise ValueError, "%s is not a finite field"%FF prime = FF.characteristic() if not(rings.Integer(prime).is_prime()): raise ValueError, "%s is not a prime"%prime if not(rings.Integer(FF.cardinality())) == rings.Integer(prime**2): raise ValueError, "%s is not a quadratic extension"%FF if rings.kronecker(-1, prime) != 1: j_invss = 1728 #(2^2 * 3)^3 elif rings.kronecker(-2, prime) != 1: j_invss = 8000 #(2^2 * 5)^3 elif rings.kronecker(-3, prime) != 1: j_invss = 0 #0^3 elif rings.kronecker(-7, prime) != 1: j_invss = 16581375 #(3 * 5 * 17)^3 elif rings.kronecker(-11, prime) != 1: j_invss = -32768 #-(2^5)^3 elif rings.kronecker(-19, prime) != 1: j_invss = -884736 #-(2^5 * 3)^3 elif rings.kronecker(-43, prime) != 1: j_invss = -884736000 #-(2^6 * 3 * 5)^3 elif rings.kronecker(-67, prime) != 1: j_invss = -147197952000 #-(2^5 * 3 * 5 * 11)^3 elif rings.kronecker(-163, prime) != 1: j_invss = -262537412640768000 #-(2^6 * 3 * 5 * 23 * 29)^3 else: D = supersingular_D(prime) DBCP = HilbertClassPolynomialDatabase() hc_poly = rings.PolynomialRing(FF, 'x')(DBCP[D]) root_hc_poly_list = list(hc_poly.roots()) j_invss = root_hc_poly_list[0][0] return FF(j_invss)
f2135af44f01edbdcd2a4661fd321a9928269b8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/f2135af44f01edbdcd2a4661fd321a9928269b8a/ssmod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1169, 414, 17830, 67, 78, 12, 2246, 4672, 436, 8395, 1220, 445, 1135, 279, 1169, 414, 17830, 525, 17, 267, 8688, 1879, 326, 25922, 652, 6512, 18, 225, 12943, 30, 6512, 225, 1493, 25922, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1169, 414, 17830, 67, 78, 12, 2246, 4672, 436, 8395, 1220, 445, 1135, 279, 1169, 414, 17830, 525, 17, 267, 8688, 1879, 326, 25922, 652, 6512, 18, 225, 12943, 30, 6512, 225, 1493, 25922, ...
print 'TEST-UNEXPECTED-FAIL | %s | %s' % (prettifyFilename(result['filename']), result['name'])
print '%s-UNEXPECTED-FAIL | %s | %s' % (testOrSummary, prettifyFilename(result['filename']), result['name'])
def prettyPrintResults(): for result in TEST_RESULTS: #pprint.pprint(result) if len(result['fails']) == 0: print 'TEST-PASS | ', result['name'] else: print 'TEST-UNEXPECTED-FAIL | %s | %s' % (prettifyFilename(result['filename']), result['name']) for failure in result['fails']: if 'exception' in failure: prettyPrintException(failure['exception'])
68b35aeacabc869f9a7e01848fc8afd596e1ef2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11044/68b35aeacabc869f9a7e01848fc8afd596e1ef2c/runtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30410, 3447, 13332, 364, 563, 316, 22130, 67, 20602, 30, 468, 84, 1188, 18, 84, 1188, 12, 2088, 13, 309, 562, 12, 2088, 3292, 6870, 87, 19486, 422, 374, 30, 1172, 296, 16961, 17, 10884...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30410, 3447, 13332, 364, 563, 316, 22130, 67, 20602, 30, 468, 84, 1188, 18, 84, 1188, 12, 2088, 13, 309, 562, 12, 2088, 3292, 6870, 87, 19486, 422, 374, 30, 1172, 296, 16961, 17, 10884...
if anim == None:
if anim == None and partName != None:
def getAnimControls(self, animName=None, partName=None, lodName=None): """getAnimControls(self, string, string=None, string=None)
074afb48f59cc2e0c41f22da9f5756f8b72589d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/074afb48f59cc2e0c41f22da9f5756f8b72589d6/Actor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 20892, 16795, 12, 2890, 16, 10536, 461, 33, 7036, 16, 1087, 461, 33, 7036, 16, 328, 369, 461, 33, 7036, 4672, 3536, 588, 20892, 16795, 12, 2890, 16, 533, 16, 533, 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, 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, 20892, 16795, 12, 2890, 16, 10536, 461, 33, 7036, 16, 1087, 461, 33, 7036, 16, 328, 369, 461, 33, 7036, 4672, 3536, 588, 20892, 16795, 12, 2890, 16, 533, 16, 533, 33, 7036, 16, ...
if path in zdc: del zdc[path]
_uncache(path, zdc) _uncache(path, sys.path_importer_cache) def _uncache(path, cache): if path in cache: del cache[path]
def uncache_zipdir(path): """Ensure that the zip directory cache doesn't have stale info for path""" from zipimport import _zip_directory_cache as zdc if path in zdc: del zdc[path] else: path = normalize_path(path) for p in zdc: if normalize_path(p)==path: del zdc[p] return
9ba52cf30de1f9e8c019481e615fd661e4533bd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/9ba52cf30de1f9e8c019481e615fd661e4533bd2/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6301, 807, 67, 4450, 1214, 12, 803, 4672, 3536, 12512, 716, 326, 3144, 1867, 1247, 3302, 1404, 1240, 14067, 1123, 364, 589, 8395, 628, 3144, 5666, 1930, 389, 4450, 67, 5149, 67, 2493, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6301, 807, 67, 4450, 1214, 12, 803, 4672, 3536, 12512, 716, 326, 3144, 1867, 1247, 3302, 1404, 1240, 14067, 1123, 364, 589, 8395, 628, 3144, 5666, 1930, 389, 4450, 67, 5149, 67, 2493, 48...
except Exception, e: if options['debug']: _internal_error(e) else: raise
except Exception, e: if options['debug']: raise else: _internal_error(e)
def _make_docmap(modules, options): """ Construct the documentation map for the given modules. @param modules: The modules that should be documented. @type modules: C{list} of C{Module} @param options: Options from the command-line arguments. @type options: C{dict} """ from epydoc.objdoc import DocMap # Don't bother documenting base classes if we're just running # checks. d = DocMap(options['quiet'], not options['check']) num_modules = len(modules) if options['verbosity'] > 0: print >>sys.stderr, ('Building API documentation for %d modules.' % num_modules) TRACE_FORMAT = (" [%%%dd/%d] Building docs for %%s" % (len(`num_modules`), num_modules)) module_num = 1 for module in modules: if options['verbosity'] == 1: if module_num == 1 and num_modules <= 70: sys.stderr.write(' [') if (module_num % 60) == 1 and num_modules > 70: sys.stderr.write(' [%3d%%] ' % (100.0*module_num/num_modules)) sys.stderr.write('.') sys.stderr.softspace = 1 if (module_num % 60) == 0 and num_modules > 70: print >>sys.stderr if module_num == num_modules: if num_modules <= 70: sys.stderr.write(']') print >>sys.stderr elif options['verbosity'] > 1: print >>sys.stderr, TRACE_FORMAT % (module_num, module.__name__) module_num += 1 # Add the module. Catch any exceptions that get generated. try: d.add(module) except Exception, e: if options['debug']: _internal_error(e) else: raise except: if options['debug']: _internal_error() else: raise return d
a7bbeb3a62ba23aa4ff65cf77d29c716f8d6b185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/a7bbeb3a62ba23aa4ff65cf77d29c716f8d6b185/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 2434, 1458, 12, 6400, 16, 702, 4672, 3536, 14291, 326, 7323, 852, 364, 326, 864, 4381, 18, 225, 632, 891, 4381, 30, 1021, 4381, 716, 1410, 506, 23051, 18, 632, 723, 4381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 67, 2434, 1458, 12, 6400, 16, 702, 4672, 3536, 14291, 326, 7323, 852, 364, 326, 864, 4381, 18, 225, 632, 891, 4381, 30, 1021, 4381, 716, 1410, 506, 23051, 18, 632, 723, 4381...
print map(fnptr, range(6))
def test_longwinded_and_direct(self): rgenop = self.RGenOp() gv_fn = make_longwinded_and(rgenop) fnptr = self.cast(gv_fn, 1)
8ecfd48ed26f0d1cf79534ccef2d3ca131ec2e96 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/8ecfd48ed26f0d1cf79534ccef2d3ca131ec2e96/rgenop_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5748, 8082, 785, 67, 464, 67, 7205, 12, 2890, 4672, 436, 4507, 556, 273, 365, 18, 54, 7642, 3817, 1435, 11404, 67, 4293, 273, 1221, 67, 5748, 8082, 785, 67, 464, 12, 86, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5748, 8082, 785, 67, 464, 67, 7205, 12, 2890, 4672, 436, 4507, 556, 273, 365, 18, 54, 7642, 3817, 1435, 11404, 67, 4293, 273, 1221, 67, 5748, 8082, 785, 67, 464, 12, 86, 45...
def GetDefaultAttributes(self): return self.GetClassDefaultAttributes(self.GetWindowVariant()) @staticmethod def GetClassDefaultAttributes(variant): return wx.ListBox.GetClassDefaultAttributes(variant)
def HitTest(self, pos): # we need to find out if the hit is on left arrow, on month or # on right arrow
66d5448b448819bcbcd82d89699e64bb95a1e0d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/66d5448b448819bcbcd82d89699e64bb95a1e0d2/minical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 670, 305, 4709, 12, 2890, 16, 949, 4672, 225, 468, 732, 1608, 358, 1104, 596, 309, 326, 6800, 353, 603, 2002, 12274, 16, 603, 3138, 578, 468, 603, 2145, 12274, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 670, 305, 4709, 12, 2890, 16, 949, 4672, 225, 468, 732, 1608, 358, 1104, 596, 309, 326, 6800, 353, 603, 2002, 12274, 16, 603, 3138, 578, 468, 603, 2145, 12274, 2, -100, -100, -100, -10...
}, self.preferred_language)
}, lang=self.preferred_language)
def DoActualRemoval(alias, me=self): kind = "(unfound)" try: del me.passwords[alias] except KeyError: pass if me.user_options.has_key(alias): del me.user_options[alias] try: del me.members[alias] kind = "regular" except KeyError: pass try: del me.digest_members[alias] kind = "digest" except KeyError: pass if me.language.has_key(alias): del me.language[alias]
d4117e2559487604b13fa55121d903681fad00c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d4117e2559487604b13fa55121d903681fad00c3/MailList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 11266, 24543, 12, 4930, 16, 1791, 33, 2890, 4672, 3846, 273, 7751, 318, 7015, 2225, 775, 30, 1464, 1791, 18, 3664, 87, 63, 4930, 65, 1335, 4999, 30, 1342, 309, 1791, 18, 1355, 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, 2256, 11266, 24543, 12, 4930, 16, 1791, 33, 2890, 4672, 3846, 273, 7751, 318, 7015, 2225, 775, 30, 1464, 1791, 18, 3664, 87, 63, 4930, 65, 1335, 4999, 30, 1342, 309, 1791, 18, 1355, 67...
sourceDefaultFlavor = defaultFlavor
def findTroves(self, labelPath, troveSpecs, defaultFlavor=None, acrossLabels=False, acrossFlavors=True, affinityDatabase=None, allowMissing=False, bestFlavor=None, getLeaves=None, troveTypes=TROVE_QUERY_PRESENT, exactFlavors=False, **kw):
127a81c6a5d75b35c3011b7fc3a2d923ae83f8d2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/127a81c6a5d75b35c3011b7fc3a2d923ae83f8d2/trovesource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 56, 303, 3324, 12, 2890, 16, 1433, 743, 16, 23432, 537, 15999, 16, 805, 2340, 9444, 33, 7036, 16, 10279, 5888, 33, 8381, 16, 10279, 2340, 842, 1383, 33, 5510, 16, 21775, 4254, 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, 1104, 56, 303, 3324, 12, 2890, 16, 1433, 743, 16, 23432, 537, 15999, 16, 805, 2340, 9444, 33, 7036, 16, 10279, 5888, 33, 8381, 16, 10279, 2340, 842, 1383, 33, 5510, 16, 21775, 4254, 33...
for groups in [[0], range(16)]:
for groups in [[0], list(range(16))]:
def test_setgroups(self): for groups in [[0], range(16)]: posix.setgroups(groups) self.assertListEqual(groups, posix.getgroups())
d71649265368594aaa2e1642f7d0da1863a83da7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/d71649265368594aaa2e1642f7d0da1863a83da7/test_posix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 4650, 12, 2890, 4672, 364, 3252, 316, 12167, 20, 6487, 666, 12, 3676, 12, 2313, 3719, 14542, 16366, 18, 542, 4650, 12, 4650, 13, 365, 18, 11231, 682, 5812, 12, 4650, 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, 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, 542, 4650, 12, 2890, 4672, 364, 3252, 316, 12167, 20, 6487, 666, 12, 3676, 12, 2313, 3719, 14542, 16366, 18, 542, 4650, 12, 4650, 13, 365, 18, 11231, 682, 5812, 12, 4650, 16,...
if self.delayed and self.delayed.active(): self.delayed.cancel()
if self.delayed: if self.delayed.active(): self.delayed.cancel() self.delayed = None
def cancel_delayed(self): if self.delayed and self.delayed.active(): self.delayed.cancel()
44d970c9026c7652a5255ce8af75cfe9976cb4ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3445/44d970c9026c7652a5255ce8af75cfe9976cb4ce/relay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3755, 67, 10790, 329, 12, 2890, 4672, 309, 365, 18, 10790, 329, 471, 365, 18, 10790, 329, 18, 3535, 13332, 365, 18, 10790, 329, 18, 10996, 1435, 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, 3755, 67, 10790, 329, 12, 2890, 4672, 309, 365, 18, 10790, 329, 471, 365, 18, 10790, 329, 18, 3535, 13332, 365, 18, 10790, 329, 18, 10996, 1435, 2, -100, -100, -100, -100, -100, -100, ...
summary = _("All emails have been successfully sent to Partners:.\n\n") + msg_sent
summary = _("All E-mails have been successfully sent to Partners:.\n\n") + msg_sent
def _sendmail(self ,cr, uid, data, context): if data['form']['email_conf']: mail_notsent = '' msg_sent = '' msg_unsent = '' count = 0 pool = pooler.get_pool(cr.dbname) data_user = pool.get('res.users').browse(cr,uid,uid) line_obj = pool.get('account_followup.stat') move_lines = line_obj.browse(cr,uid,data['form']['partner_ids'][0][2]) partners = [] dict_lines = {} for line in move_lines: partners.append(line.name) dict_lines[line.name.id] =line for partner in partners: ids_lines = pool.get('account.move.line').search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable'])]) data_lines = pool.get('account.move.line').browse(cr,uid,ids_lines) followup_data = dict_lines[partner.id] dest = False if partner.address: for adr in partner.address: if adr.type=='contact': if adr.email: dest = [adr.email] if (not dest) and adr.type=='default': if adr.email: dest = [adr.email] src = tools.config.options['smtp_user'] if not data['form']['partner_lang']: body = data['form']['email_body'] else: cxt = context.copy() cxt['lang'] = partner.lang body = pool.get('res.users').browse(cr, uid, uid, context=cxt).company_id.follow_up_msg total_amt = followup_data.debit - followup_data.credit move_line = '' subtotal_due = 0.0 subtotal_paid = 0.0 subtotal_maturity = 0.0 balance = 0.0 l = '--------------------------------------------------------------------------------------------------------------------------' head = l+ '\n' + 'Date'.rjust(10) + '\t' + 'Description'.rjust(10) + '\t' + 'Ref'.rjust(10) + '\t' + 'Maturity date'.rjust(10) + '\t' + 'Due'.rjust(10) + '\t' + 'Paid'.rjust(10) + '\t' + 'Maturity'.rjust(10) + '\t' + 'Litigation'.rjust(10) + '\n' + l for i in data_lines: maturity = '' if i.date_maturity < time.strftime('%Y-%m-%d') and (i.debit - i.credit): maturity = i.debit - i.credit subtotal_due = subtotal_due + i.debit subtotal_paid = subtotal_paid + i.credit subtotal_maturity = subtotal_maturity + int(maturity) balance = balance + (i.debit - i.credit) move_line = move_line + (i.date).rjust(10) + '\t'+ (i.name).rjust(10) + '\t'+ (i.ref or '').rjust(10) + '\t' + (i.date_maturity or '').rjust(10) + '\t' + str(i.debit).rjust(10) + '\t' + str(i.credit).rjust(10) + '\t' + str(maturity).rjust(10) + '\t' + str(i.blocked).rjust(10) + '\n' move_line = move_line + l + '\n'+ '\t\t\t' + 'Sub total'.rjust(35) + '\t' + (str(subtotal_due) or '').rjust(10) + '\t' + (str(subtotal_paid) or '').rjust(10) + '\t' + (str(subtotal_maturity) or '').rjust(10)+ '\n' move_line = move_line + '\t\t\t' + 'Balance'.rjust(33) + '\t' + str(balance).rjust(10) + '\n' + l val = { 'partner_name':partner.name, 'followup_amount':total_amt, 'user_signature':data_user.name, 'company_name':data_user.company_id.name, 'company_currency':data_user.company_id.currency_id.name, 'line':move_line, 'heading': head, 'date':time.strftime('%Y-%m-%d'), } body = body%val sub = str(data['form']['email_subject']) msg = '' if dest: tools.email_send(src,dest,sub,body) msg_sent += partner.name + '\n' else: msg += partner.name + '\n' msg_unsent += msg if not msg_unsent: summary = _("All emails have been successfully sent to Partners:.\n\n") + msg_sent else: msg_unsent = _("Mail not sent to following Partners, Email not available !\n\n") + msg_unsent msg_sent = msg_sent and _("\n\nMail sent to following Partners successfully, !\n\n") + msg_sent line = '==========================================================================' summary = msg_unsent + line + msg_sent return {'summary' : summary} else: return {'summary' : '\n\n\nMail not sent to any partner if you want to sent it please tick send email confirmation on wizard'}
35ca7bf8a746180743701efeaadf67e3c9d9d20c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/35ca7bf8a746180743701efeaadf67e3c9d9d20c/wizard_followup_print.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 4408, 12, 2890, 269, 3353, 16, 4555, 16, 501, 16, 819, 4672, 309, 501, 3292, 687, 21712, 3652, 67, 3923, 3546, 30, 4791, 67, 902, 7569, 273, 875, 1234, 67, 7569, 273, 875, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4661, 4408, 12, 2890, 269, 3353, 16, 4555, 16, 501, 16, 819, 4672, 309, 501, 3292, 687, 21712, 3652, 67, 3923, 3546, 30, 4791, 67, 902, 7569, 273, 875, 1234, 67, 7569, 273, 875, ...
aFontData.SetInitialFont(font)
fontData.SetInitialFont(font)
def fontDialog(parent=None, fontData=None, font=None): if fontData is None: fontData = wx.FontData() fontData.SetColour(wx.BLACK) fontData.SetInitialFont(wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)) if font is not None: aFontData.SetInitialFont(font) dialog = wx.FontDialog(parent, fontData) result = DialogResults(dialog.ShowModal()) if result.accepted: fontData = dialog.GetFontData() result.fontData = fontData result.color = fontData.GetColour().Get() result.colour = result.color result.font = fontData.GetChosenFont() else: result.color = None result.colour = None result.font = None dialog.Destroy() return result
19cc8ed9e1e5501e5181c61ac69cc5a1a9b5772b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/19cc8ed9e1e5501e5181c61ac69cc5a1a9b5772b/dialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3512, 6353, 12, 2938, 33, 7036, 16, 3512, 751, 33, 7036, 16, 3512, 33, 7036, 4672, 309, 3512, 751, 353, 599, 30, 3512, 751, 273, 7075, 18, 5711, 751, 1435, 3512, 751, 18, 694, 26404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3512, 6353, 12, 2938, 33, 7036, 16, 3512, 751, 33, 7036, 16, 3512, 33, 7036, 4672, 309, 3512, 751, 353, 599, 30, 3512, 751, 273, 7075, 18, 5711, 751, 1435, 3512, 751, 18, 694, 26404, ...
if len(args)==1:
if len(args)==2:
def main(): parser = OptionParser(conflict_handler='resolve') XCAPClient.setupOptionParser(parser) client = XCAPClient() options, args = parser.parse_args() client.initialize(options, args) try: cmd = getattr(client, args[0].lower()) except AttributeError: sys.exit(__doc__ + '\nInvalid action\n') except IndexError: sys.exit(__doc__) if cmd == client.put: resource = sys.stdin.read() headers = {'Content-type' : 'application/xcap-el+xml'} else: resource = None headers = {} if len(args)==1: application = args[1] else: application, node = args[1:] if cmd in [client.get, client.delete]: result = cmd(application, node) elif cmd == client.put: result = client.put(application, resource, node, headers) else: wtf if 200 <= result.code <= 200: if result.body: sys.stdout.write(result.body) else: sys.exit(1)
b760d240243816ca915bda7c484d5674e1e5cab0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3446/b760d240243816ca915bda7c484d5674e1e5cab0/script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 12, 20340, 67, 4176, 2218, 10828, 6134, 1139, 17296, 1227, 18, 8401, 1895, 2678, 12, 4288, 13, 1004, 273, 1139, 17296, 1227, 1435, 702, 16, 833, 273, 2082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2082, 273, 18862, 12, 20340, 67, 4176, 2218, 10828, 6134, 1139, 17296, 1227, 18, 8401, 1895, 2678, 12, 4288, 13, 1004, 273, 1139, 17296, 1227, 1435, 702, 16, 833, 273, 2082, ...
def register_to_xmldoc(xmldoc, program, options, version = None, cvs_date = None):
def register_to_xmldoc(xmldoc, program, paramdict, **kwargs):
def register_to_xmldoc(xmldoc, program, options, version = None, cvs_date = None): """ Register the current process and params to an xml document """ process = append_process(xmldoc, program = program, version = version, cvs_entry_time = cvs_date) params = map(lambda key:(key, 'lstring', options.__dict__[key]), filter(lambda x: options.__dict__[x], options.__dict__)) append_process_params(xmldoc, process, params) return process.process_id
96942c5f180ab59baf28478f4490c8894e1b545f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/96942c5f180ab59baf28478f4490c8894e1b545f/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 869, 67, 2902, 2434, 12, 2902, 2434, 16, 5402, 16, 579, 1576, 16, 2826, 4333, 4672, 3536, 5433, 326, 783, 1207, 471, 859, 358, 392, 2025, 1668, 3536, 1207, 273, 714, 67, 2567...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 869, 67, 2902, 2434, 12, 2902, 2434, 16, 5402, 16, 579, 1576, 16, 2826, 4333, 4672, 3536, 5433, 326, 783, 1207, 471, 859, 358, 392, 2025, 1668, 3536, 1207, 273, 714, 67, 2567...
self.tiireview_serv.createAssignment("tii-unit-test", tiiasnnid, opts) tiiresult = self.tiireview_serv.getAssignment("tii-unit-test", tiiasnnid)
self.tiireview_serv.createAssignment(tiisiteid, tiiasnnid, opts) tiiresult = self.tiireview_serv.getAssignment(tiisiteid, tiiasnnid)
def testCheckAgainstJournalsRepository(self): """ journal_check / searchjournals values of 0 to not check against periodicals, etc., 1 to check against it, default is 1" """ opts = HashMap() opts.put('journal_check','1') tiiasnnid = "/unittests/usejournals/"+str(uuid.uuid1()) # Test creating an assignment checked against Journals self.tiireview_serv.createAssignment("tii-unit-test", tiiasnnid, opts)
63c15d9c9b1090a570c367a1552444d43bc1162b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3642/63c15d9c9b1090a570c367a1552444d43bc1162b/turnitin-tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1564, 23530, 334, 46, 6561, 1031, 3305, 12, 2890, 4672, 3536, 13001, 67, 1893, 342, 1623, 78, 6561, 1031, 924, 434, 374, 358, 486, 866, 5314, 17478, 1031, 16, 5527, 12990, 404, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1564, 23530, 334, 46, 6561, 1031, 3305, 12, 2890, 4672, 3536, 13001, 67, 1893, 342, 1623, 78, 6561, 1031, 924, 434, 374, 358, 486, 866, 5314, 17478, 1031, 16, 5527, 12990, 404, 358...
if hasattr(os, 'utime'): past = time.time() - 3 os.utime(testfile, (past, past)) else: time.sleep(3)
def test(): raise ValueError""" # if this test runs fast, test_bug737473.py will have same mtime # even if it's rewrited and it'll not reloaded. so adjust mtime # of original to past. if hasattr(os, 'utime'): past = time.time() - 3 os.utime(testfile, (past, past)) else: time.sleep(3) if 'test_bug737473' in sys.modules: del sys.modules['test_bug737473'] import test_bug737473 try: test_bug737473.test() except ValueError: # this loads source code to linecache traceback.extract_tb(sys.exc_traceback) print >> open(testfile, 'w'), """\
f5a6514fe91d5f4f48407b59076e14507d602efd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f5a6514fe91d5f4f48407b59076e14507d602efd/test_traceback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 1002, 2068, 8395, 225, 468, 309, 333, 1842, 7597, 4797, 16, 1842, 67, 925, 9036, 5608, 9036, 18, 2074, 903, 1240, 1967, 13158, 468, 5456, 309, 518, 1807, 283, 5363, 329, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 1002, 2068, 8395, 225, 468, 309, 333, 1842, 7597, 4797, 16, 1842, 67, 925, 9036, 5608, 9036, 18, 2074, 903, 1240, 1967, 13158, 468, 5456, 309, 518, 1807, 283, 5363, 329, 471...
newlist.append(dep_listcleanup(x))
newlist=newlist+dep_listcleanup(x)
def dep_listcleanup(deplist): "remove unnecessary clutter from deplists. Remove multiple list levels, empty lists" newlist=[] if (len(deplist)==1): #remove multiple-depth lists if (type(deplist[0])==types.ListType): for x in deplist[0]: if type(x)==types.ListType: if len(x)!=0: newlist.append(dep_listcleanup(x)) else: newlist.append(x) else: #unembed single nodes newlist.append(deplist[0]) else: for x in deplist: if type(x)==types.ListType: if len(x)==1: newlist.append(x[0]) elif len(x)!=0: newlist.append(dep_listcleanup(x)) else: newlist.append(x) return newlist
0b72ebd58da6b04efc0c7dbaca1c6a6922d9a339 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/0b72ebd58da6b04efc0c7dbaca1c6a6922d9a339/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5993, 67, 1098, 16732, 12, 323, 17842, 4672, 315, 4479, 19908, 927, 18220, 628, 443, 412, 1486, 18, 225, 3581, 3229, 666, 7575, 16, 1008, 6035, 6, 394, 1098, 33, 8526, 309, 261, 1897, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5993, 67, 1098, 16732, 12, 323, 17842, 4672, 315, 4479, 19908, 927, 18220, 628, 443, 412, 1486, 18, 225, 3581, 3229, 666, 7575, 16, 1008, 6035, 6, 394, 1098, 33, 8526, 309, 261, 1897, ...
Try to convert the overconvergent modular form f into an element of self. An error will be raised if this is
Try to convert the overconvergent modular form `f` into an element of self. An error will be raised if this is
def _coerce_from_ocmf(self, f): r""" Try to convert the overconvergent modular form f into an element of self. An error will be raised if this is obviously nonsense.
b526c3d210b712e2659f9ba0fab589c5ff5e9564 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b526c3d210b712e2659f9ba0fab589c5ff5e9564/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2894, 2765, 67, 2080, 67, 504, 16126, 12, 2890, 16, 284, 4672, 436, 8395, 6161, 358, 1765, 326, 1879, 591, 502, 75, 319, 681, 2490, 646, 1375, 74, 68, 1368, 392, 930, 434, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2894, 2765, 67, 2080, 67, 504, 16126, 12, 2890, 16, 284, 4672, 436, 8395, 6161, 358, 1765, 326, 1879, 591, 502, 75, 319, 681, 2490, 646, 1375, 74, 68, 1368, 392, 930, 434, 365, ...
@with_warning_restore def check_float_coerce(self, format, number): if PY_STRUCT_FLOAT_COERCE == 2: packed = struct.pack(format, number) floored = struct.unpack(format, packed)[0] self.assertEqual(floored, int(number), "did not correcly coerce float to int") return try: struct.pack(format, number) except (struct.error, TypeError): if PY_STRUCT_FLOAT_COERCE: self.fail("expected DeprecationWarning for float coerce") except DeprecationWarning: if not PY_STRUCT_FLOAT_COERCE: self.fail("expected to raise struct.error for float coerce") else: self.fail("did not raise error for float coerce")
def decorator(*args, **kw): with warnings.catch_warnings(): # We need this function to warn every time, so stick an # unqualifed 'always' at the head of the filter list warnings.simplefilter("always") warnings.filterwarnings("error", category=DeprecationWarning) return func(*args, **kw)
bcd7347b7882853fa5e5ff5fc3a15e495b640b42 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/bcd7347b7882853fa5e5ff5fc3a15e495b640b42/test_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7367, 30857, 1968, 16, 2826, 9987, 4672, 598, 5599, 18, 14683, 67, 12103, 13332, 468, 1660, 1608, 333, 445, 358, 1894, 3614, 813, 16, 1427, 25608, 392, 468, 640, 3369, 430, 329, 296, 177...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7367, 30857, 1968, 16, 2826, 9987, 4672, 598, 5599, 18, 14683, 67, 12103, 13332, 468, 1660, 1608, 333, 445, 358, 1894, 3614, 813, 16, 1427, 25608, 392, 468, 640, 3369, 430, 329, 296, 177...
self.noescape = True
self.noescape += 1
def _write_sig(self, spec, args): # don't escape "*" in signatures self.noescape = True for c in spec: if c.isdigit(): self.visit_node(self.get_textonly_node(args[int(c)])) else: self.curpar.append(c) self.noescape = False
1b8542c8a7397ff58b5bc1499607d94cbe364a7f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5620/1b8542c8a7397ff58b5bc1499607d94cbe364a7f/restwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 7340, 12, 2890, 16, 857, 16, 833, 4672, 468, 2727, 1404, 4114, 10971, 316, 14862, 365, 18, 2135, 6939, 1011, 404, 364, 276, 316, 857, 30, 309, 276, 18, 291, 11052, 13332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 7340, 12, 2890, 16, 857, 16, 833, 4672, 468, 2727, 1404, 4114, 10971, 316, 14862, 365, 18, 2135, 6939, 1011, 404, 364, 276, 316, 857, 30, 309, 276, 18, 291, 11052, 13332...
list = []
msng_list = []
def qseries(self, repo, missing=None, summary=False): start = self.series_end() if not missing: for i in range(len(self.series)): patch = self.series[i] if self.ui.verbose: if i < start: status = 'A' else: status = 'U' self.ui.write('%d %s ' % (i, status)) if summary: msg = self.readheaders(patch)[0] msg = msg and ': ' + msg[0] or ': ' else: msg = '' self.ui.write('%s%s\n' % (patch, msg)) else: list = [] for root, dirs, files in os.walk(self.path): d = root[len(self.path) + 1:] for f in files: fl = os.path.join(d, f) if (fl not in self.series and fl not in (self.status_path, self.series_path) and not fl.startswith('.')): list.append(fl) list.sort() if list: for x in list: if self.ui.verbose: self.ui.write("D ") self.ui.write("%s\n" % x)
a997fc1a39dcf401316f04b026acda2feaa3fe16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/a997fc1a39dcf401316f04b026acda2feaa3fe16/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 10222, 12, 2890, 16, 3538, 16, 3315, 33, 7036, 16, 4916, 33, 8381, 4672, 787, 273, 365, 18, 10222, 67, 409, 1435, 309, 486, 3315, 30, 364, 277, 316, 1048, 12, 1897, 12, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 10222, 12, 2890, 16, 3538, 16, 3315, 33, 7036, 16, 4916, 33, 8381, 4672, 787, 273, 365, 18, 10222, 67, 409, 1435, 309, 486, 3315, 30, 364, 277, 316, 1048, 12, 1897, 12, 2890, 1...
Load a C{ProductDefinition} object to a Conary repository.
Load a C{ProductDefinition} object from a Conary repository.
def loadFromRepository(self, client): """ Load a C{ProductDefinition} object to a Conary repository. Prior to calling this method, the C{ProductDefinition} object should be initialized by calling C{setProductShortname}, C{setProductVersion}, C{setConaryRepositoryHostname} and C{setConaryNamespace}. @param client: A Conary client object @type client: C{conaryclient.ConaryClient} @param message: An optional commit message @type message: C{str} @raises C{RepositoryError}: @raises C{ProductDefinitionTroveNotFound}: @raises C{ProductDefinitionFileNotFound}: """ label = self.getProductDefinitionLabel() stream = self._getStreamFromRepository(client, label) stream.seek(0) self.parseStream(stream)
1829758312b531bbfafa927a69ea1bbb070ef805 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7634/1829758312b531bbfafa927a69ea1bbb070ef805/api1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24935, 3305, 12, 2890, 16, 1004, 4672, 3536, 4444, 279, 385, 95, 4133, 1852, 97, 733, 628, 279, 735, 814, 3352, 18, 30326, 358, 4440, 333, 707, 16, 326, 385, 95, 4133, 1852, 97, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24935, 3305, 12, 2890, 16, 1004, 4672, 3536, 4444, 279, 385, 95, 4133, 1852, 97, 733, 628, 279, 735, 814, 3352, 18, 30326, 358, 4440, 333, 707, 16, 326, 385, 95, 4133, 1852, 97, 733, ...
if (job.outputdata.outputdata and job.backend._name == 'LCG' and job.outputdata.output) or (job.backend._name == 'Panda' and job.outputdata.output):
if (job.outputdata.outputdata and job.backend._name in [ 'LCG', 'CREAM'] and job.outputdata.output) or (job.backend._name == 'Panda' and job.outputdata.output):
def retrieve(self, type=None, name=None, **options ): """Retrieve files listed in outputdata and registered in output from remote SE to local filesystem in background thread""" from Ganga.GPIDev.Lib.Job import Job from GangaAtlas.Lib.ATLASDataset import Download import os, threading
60e3471604e85c56754aefe032e708e83b749990 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/60e3471604e85c56754aefe032e708e83b749990/DQ2Dataset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 12, 2890, 16, 618, 33, 7036, 16, 508, 33, 7036, 16, 2826, 2116, 262, 30, 3536, 5767, 1390, 12889, 316, 876, 892, 471, 4104, 316, 876, 628, 2632, 3174, 358, 1191, 6496, 316, 5412,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 12, 2890, 16, 618, 33, 7036, 16, 508, 33, 7036, 16, 2826, 2116, 262, 30, 3536, 5767, 1390, 12889, 316, 876, 892, 471, 4104, 316, 876, 628, 2632, 3174, 358, 1191, 6496, 316, 5412,...
user_info['remote_ip'] = gethostbyname(req.connection.remote_ip)
try: user_info['remote_ip'] = gethostbyname(req.connection.remote_ip) except gaierror: pass
def collect_user_info(req): """Given the mod_python request object rec or a uid it returns a dictionary containing at least the keys uid, nickname, email, groups, plus any external keys in the user preferences (collected at login time and built by the different external authentication plugins) and if the mod_python request object is provided, also the remote_ip, remote_host, referer, agent fields. If the user is authenticated with Apache should provide also apache_user and apache_group. """ user_info = { 'remote_ip' : '', 'remote_host' : '', 'referer' : '', 'uri' : '', 'agent' : '', 'apache_user' : '', 'apache_group' : [], 'uid' : -1, 'nickname' : '', 'email' : '', 'group' : [], 'guest' : '1', 'last_login' : datetime.datetime(1970, 1, 1) } try: if req is None: uid = -1 elif type(req) in (type(1), type(1L)): ## req is infact a user identification uid = req elif type(req) is dict: ## req is by mistake already a user_info try: assert(req.has_key('uid')) assert(req.has_key('email')) assert(req.has_key('nickname')) except AssertionError: ## mmh... misuse of collect_user_info. Better warn the admin! register_exception(alert_admin=True) user_info.update(req) return user_info else: uid = getUid(req) user_info['remote_ip'] = gethostbyname(req.connection.remote_ip) user_info['remote_host'] = req.connection.remote_host or '' user_info['referer'] = req.headers_in.get('Referer', '') user_info['uri'] = req.unparsed_uri or () user_info['agent'] = req.headers_in.get('User-Agent', 'N/A') try: user_info['apache_user'] = getApacheUser(req) if user_info['apache_user']: user_info['apache_group'] = auth_apache_user_in_groups(user_info['apache_user']) except AttributeError: pass user_info['uid'] = uid user_info['nickname'] = get_nickname(uid) or '' user_info['email'] = get_email(uid) or '' user_info['group'] = [] user_info['guest'] = str(isGuestUser(uid)) if uid: user_info['group'] = [group[1] for group in get_groups(uid)] user_info['last_login'] = get_last_login(uid) prefs = get_user_preferences(uid) login_method = prefs['login_method'] login_object = CFG_EXTERNAL_AUTHENTICATION[login_method][0] if login_object and ((datetime.datetime.now() - user_info['last_login']).days > 0): ## The user uses an external authentication method and it's a bit since ## she has not performed a login try: groups = login_object.fetch_user_groups_membership(user_info['email'], req=req) # groups is a dictionary {group_name : group_description,} new_groups = {} for key, value in groups.items(): new_groups[key + " [" + str(login_method) + "]"] = value groups = new_groups except (AttributeError, NotImplementedError, TypeError, InvenioWebAccessExternalAuthError): pass else: # Groups synchronization from invenio.webgroup import synchronize_external_groups synchronize_external_groups(uid, groups, login_method) user_info['group'] = [group[1] for group in get_groups(uid)] try: # Importing external settings new_prefs = login_object.fetch_user_preferences(user_info['email'], req=req) for key, value in new_prefs.items(): prefs['EXTERNAL_' + key] = value except (AttributeError, NotImplementedError, TypeError, InvenioWebAccessExternalAuthError): pass else: set_user_preferences(uid, prefs) prefs = get_user_preferences(uid) run_sql('UPDATE user SET last_login=NOW() WHERE id=%s', (uid, )) user_info['last_login'] = get_last_login(uid) if prefs: for key, value in prefs.iteritems(): user_info[key.lower()] = value except Exception, e: register_exception() return user_info
990a2447cdee3912247733c96bc21c65e6e1d284 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/990a2447cdee3912247733c96bc21c65e6e1d284/webuser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 1355, 67, 1376, 12, 3658, 4672, 3536, 6083, 326, 681, 67, 8103, 590, 733, 1950, 578, 279, 4555, 518, 1135, 279, 3880, 4191, 622, 4520, 326, 1311, 4555, 16, 19570, 16, 2699, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 1355, 67, 1376, 12, 3658, 4672, 3536, 6083, 326, 681, 67, 8103, 590, 733, 1950, 578, 279, 4555, 518, 1135, 279, 3880, 4191, 622, 4520, 326, 1311, 4555, 16, 19570, 16, 2699, 1...
key = (j[0], arch)
key = (j, arch)
def doop_source(self, pkg):
f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 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, ...
nm = '_' + utility.MakeIdentifier('%s_%s_FacetMap' % (ns, cls.__name__.strip('_')))
nm = '_' + utility.MakeIdentifier('%s_%s_FacetMap' % (ns_uri, cls.__name__.strip('_')))
def __FacetMapAttributeName (cls): if cls == simpleTypeDefinition: return '_%s__FacetMap' % (cls.__name__.strip('_'),)
b02c1371a15d08a6902f3f124a75fb090245ac50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/b02c1371a15d08a6902f3f124a75fb090245ac50/basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11137, 863, 19240, 261, 6429, 4672, 309, 2028, 422, 4143, 559, 1852, 30, 327, 2070, 9, 87, 972, 11137, 863, 11, 738, 261, 6429, 16186, 529, 25648, 6406, 2668, 4623, 3631, 13, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11137, 863, 19240, 261, 6429, 4672, 309, 2028, 422, 4143, 559, 1852, 30, 327, 2070, 9, 87, 972, 11137, 863, 11, 738, 261, 6429, 16186, 529, 25648, 6406, 2668, 4623, 3631, 13, 2, ...
if os_path_exists(output_file):
if os.path.exists(output_file):
def make_cmd_args(video, options, streaming=False): if not find_in_path(os_environ['PATH'], 'rtmpdump'): print >> stderr, 'Error: rtmpdump has not been found' exit(1) if 'rtmp_url' not in video: get_video_player_info(video, options) output_file = None if not streaming: output_file = urlparse.urlparse(video['url']).path.split('/')[-1] output_file = output_file.replace('.html', '_%s_%s.flv' % (options.quality, options.lang)) cmd_args = '--rtmp %s --flv %s --swfVfy %s' % (video['rtmp_url'], output_file, video['player_url']) else: cmd_args = '--rtmp %s --swfVfy %s' % (video['rtmp_url'], video['player_url']) if not options.verbose: cmd_args += ' --quiet' if not streaming: if os_path_exists(output_file): # try to resume a download cmd_args += ' --resume' print ':: Resuming download of %s' % output_file else: print ':: Downloading to %s' % output_file else: print ':: Streaming from %s' % video['rtmp_url'] return cmd_args
dd84159756778af9a20710245188c70555fadd0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11589/dd84159756778af9a20710245188c70555fadd0e/arte+7.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4172, 67, 1968, 12, 9115, 16, 702, 16, 12833, 33, 8381, 4672, 309, 486, 1104, 67, 267, 67, 803, 12, 538, 67, 28684, 3292, 4211, 17337, 296, 3797, 1291, 8481, 11, 4672, 1172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4172, 67, 1968, 12, 9115, 16, 702, 16, 12833, 33, 8381, 4672, 309, 486, 1104, 67, 267, 67, 803, 12, 538, 67, 28684, 3292, 4211, 17337, 296, 3797, 1291, 8481, 11, 4672, 1172, ...
new.dtype.char = new.data.dtype.char
new.dtype = new.data.dtype
def __pow__(self, other): """ Element-by-element power (unless other is a scalar, in which case return the matrix power.) """ if isscalar(other) or (isdense(other) and rank(other)==0): new = self.copy() new.data = new.data ** other new.dtype.char = new.data.dtype.char new.ftype = _transtabl[new.dtype.char] return new else: ocs = other.tocsc() if (ocs.shape != self.shape): raise ValueError, "inconsistent shapes" dtypechar = _coerce_rules[(self.dtype.char, ocs.dtype.char)] nnz1, nnz2 = self.nnz, ocs.nnz data1, data2 = _convert_data(self.data[:nnz1], ocs.data[:nnz2], dtypechar) func = getattr(sparsetools, _transtabl[dtypechar]+'cscmul') c, rowc, ptrc, ierr = func(data1, self.rowind[:nnz1], self.indptr, data2, ocs.rowind[:nnz2], ocs.indptr) if ierr: raise ValueError, "ran out of space (but shouldn't have happened)" M, N = self.shape return csc_matrix((c, rowc, ptrc), dims=(M, N))
755141cd47edbf647cfcd8d09fd47ede3320459c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/755141cd47edbf647cfcd8d09fd47ede3320459c/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 1308, 4672, 3536, 3010, 17, 1637, 17, 2956, 7212, 261, 28502, 1308, 353, 279, 4981, 16, 316, 1492, 648, 327, 326, 3148, 7212, 12998, 3536, 309, 3385, 3473...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23509, 972, 12, 2890, 16, 1308, 4672, 3536, 3010, 17, 1637, 17, 2956, 7212, 261, 28502, 1308, 353, 279, 4981, 16, 316, 1492, 648, 327, 326, 3148, 7212, 12998, 3536, 309, 3385, 3473...
try: WinregTests.remote_name = sys.argv[sys.argv.index("--remote")+1] except (IndexError, ValueError):
if not REMOTE_NAME:
def test_main(): test_support.run_unittest(WinregTests)
e33fa887d39f026dadd8bcb182725c90f7d51ece /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/e33fa887d39f026dadd8bcb182725c90f7d51ece/test_winreg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 1842, 67, 13261, 18, 2681, 67, 4873, 3813, 12, 18049, 1574, 14650, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5254, 13332, 1842, 67, 13261, 18, 2681, 67, 4873, 3813, 12, 18049, 1574, 14650, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
changes = xmlrpc.changelog(self.last_completed-1)
changes = xmlrpc().changelog(self.last_completed-1)
def synchronize(self): 'Run synchronization. Can be interrupted and restarted at any time.' if self.last_started == 0: # no synchronization in progress. Fetch changelog self.last_started = now() changes = xmlrpc.changelog(self.last_completed-1) if not changes: return for change in changes: self.projects_to_do.add(change[0]) self.store() # sort projects to allow for repeatable runs for project in sorted(self.projects_to_do): print "Synchronizing", project.encode('utf-8') data = self.copy_simple_page(project) if not data: self.delete_project(project) self.store() continue try: files = set(self.get_package_files(data)) except xml.parsers.expat.ExpatError, e: # not well-formed, skip for now print "Page for %s cannot be parsed: %r" % (project, e) raise for file in files: print "Copying", file self.maybe_copy_file(file) if project in self.files_per_project: for file in self.files_per_project[project]-files: self.remove_file(file) self.files_per_project[project] = files self.complete_projects.add(project) self.projects_to_do.remove(project) self.store()
36846de4584513120803239969bb9f02bf48b376 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1369/36846de4584513120803239969bb9f02bf48b376/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16978, 12, 2890, 4672, 296, 1997, 24488, 18, 4480, 506, 15711, 471, 28893, 622, 1281, 813, 1093, 309, 365, 18, 2722, 67, 14561, 422, 374, 30, 468, 1158, 24488, 316, 4007, 18, 8065, 21182...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16978, 12, 2890, 4672, 296, 1997, 24488, 18, 4480, 506, 15711, 471, 28893, 622, 1281, 813, 1093, 309, 365, 18, 2722, 67, 14561, 422, 374, 30, 468, 1158, 24488, 316, 4007, 18, 8065, 21182...
elif default:
elif str(default):
def __get(self, key, default): """Obtains value of argument from dictionary""" if self.__args.has_key(key): return self.__args[key] elif default: return default else: sys.stderr.write( '\n Argument %s= not given to %s \n' % (key, self.prog)) sys.exit(1)
840bf7e12d2acdda0c81e2c9e37367bd9a60b58a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3143/840bf7e12d2acdda0c81e2c9e37367bd9a60b58a/rsfbak.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 12, 2890, 16, 498, 16, 805, 4672, 3536, 19351, 460, 434, 1237, 628, 3880, 8395, 309, 365, 16186, 1968, 18, 5332, 67, 856, 12, 856, 4672, 327, 365, 16186, 1968, 63, 856, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 12, 2890, 16, 498, 16, 805, 4672, 3536, 19351, 460, 434, 1237, 628, 3880, 8395, 309, 365, 16186, 1968, 18, 5332, 67, 856, 12, 856, 4672, 327, 365, 16186, 1968, 63, 856, 65, ...
if _arguments.has_key('errn'):
if _arguments.get('errn', 0):
def do_script(self, _no_object=None, _attributes={}, **_arguments): """do script: Run a UNIX shell script or command Keyword argument with_command: data to be passed to the Terminal application as the command line Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'core' _subcode = 'dosc'
d883fe0f8edb19c1db13af7f62ca177c49791de6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d883fe0f8edb19c1db13af7f62ca177c49791de6/Terminal_Suite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4263, 12, 2890, 16, 389, 2135, 67, 1612, 33, 7036, 16, 389, 4350, 28793, 2826, 67, 7099, 4672, 3536, 2896, 2728, 30, 1939, 279, 23160, 5972, 2728, 578, 1296, 18317, 1237, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4263, 12, 2890, 16, 389, 2135, 67, 1612, 33, 7036, 16, 389, 4350, 28793, 2826, 67, 7099, 4672, 3536, 2896, 2728, 30, 1939, 279, 23160, 5972, 2728, 578, 1296, 18317, 1237, 598, ...
self.output_write("Apparently successful\n")
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one
ab0576817151497fdda52a6927ea2e47cb997bd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/ab0576817151497fdda52a6927ea2e47cb997bd6/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 3170, 16, 7380, 33, 8381, 4672, 3536, 2360, 603, 326, 666, 434, 4209, 471, 2230, 2182, 1245, 17, 1637, 17, 476, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 3170, 16, 7380, 33, 8381, 4672, 3536, 2360, 603, 326, 666, 434, 4209, 471, 2230, 2182, 1245, 17, 1637, 17, 476, 2, -100, -100, -100, -100, -100...
m = max([len(c) for c in G.cliques()])
m = G.clique_number()
def chromatic_number(G): """ Returns the minimal number of colors needed to color the vertices of the graph G. EXAMPLES: sage: from sage.graphs.graph_coloring import chromatic_number sage: G = Graph({0:[1,2,3],1:[2]}) sage: chromatic_number(G) 3 sage: G = graphs.PetersenGraph() sage: G.chromatic_number() 3 """ o = G.order() if o == 0: return 0 if len(G.edges()) == 0: return 1 elif G.is_bipartite(): #can we do it in linear time? return 2 else: #counting cliques is faster than our brute-force method... m = max([len(c) for c in G.cliques()]) if m >= o-1: #marginal improvement... if there's an o-1 clique and not an o clique, don't waste our time coloring. return m for n in range(m,o+1): for C in all_graph_colorings(G,n): return n
8f8267438f3a2fe6634d0e02ad0ebfc3d22a08b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8f8267438f3a2fe6634d0e02ad0ebfc3d22a08b0/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8123, 2126, 67, 2696, 12, 43, 4672, 3536, 2860, 326, 16745, 1300, 434, 5740, 3577, 358, 2036, 326, 6928, 434, 326, 2667, 611, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8123, 2126, 67, 2696, 12, 43, 4672, 3536, 2860, 326, 16745, 1300, 434, 5740, 3577, 358, 2036, 326, 6928, 434, 326, 2667, 611, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 41...
plotVar(var)
self.plotVar(var, loggers)
def run_and_plot(time, variables): """Run the simulator and plot all the variables in the variables."""
1cf86d6668a0f6d9627128153fe0d77a29f0d411 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14363/1cf86d6668a0f6d9627128153fe0d77a29f0d411/quickEcell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 464, 67, 4032, 12, 957, 16, 3152, 4672, 3536, 1997, 326, 3142, 11775, 471, 3207, 777, 326, 3152, 316, 326, 3152, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 464, 67, 4032, 12, 957, 16, 3152, 4672, 3536, 1997, 326, 3142, 11775, 471, 3207, 777, 326, 3152, 316, 326, 3152, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if name is not None: host_ip = GridFTPPacket.__dns_lookups.get(name) host_id = GridFTPPacket.__dns_cache.get((host_ip, name)) if host_ip is None: info = socket.getaddrinfo(name, 0)[0] host_ip = GridFTPPacket.__dns_lookups[name] = info[4][0] if host_id is None: domain = name.rsplit(".", 1)[1] values = (host_ip, name, domain) cursor.execute(''' INSERT INTO dns_cache( ip_address, hostname, domain) VALUES(%s, %s, %s) RETURNING ID ''', values) host_id = cursor.fetchone()[0] GridFTPPacket.__dns_cache[(host_ip, name)] = host_id
try: if name is not None: host_ip = self.ip_address; host_id = GridFTPPacket.__dns_cache.get((host_ip, name)) if host_id is None: domain = None components = name.rsplit(".", 1) if len(components) > 1: domain = components[1] values = (host_ip, name, domain) cursor.execute(''' INSERT INTO dns_cache( ip_address, hostname, domain) VALUES(%s, %s, %s) RETURNING ID ''', values) host_id = cursor.fetchone()[0] GridFTPPacket.__dns_cache[(host_ip, name)] = host_id except Exception, detail: print "Error processing " + name + ": " + str(detail)
def get_host_id(self, cursor): """ Determine the host key which matches the HOSTNAME string in this packet. If this HOSTNAME is not defined in the cache, attempt to insert it into the dns_cache table and return that id.
6d9b426f7f1a73d1abfba0818eb58288eb551afd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8394/6d9b426f7f1a73d1abfba0818eb58288eb551afd/gridftppacket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2564, 67, 350, 12, 2890, 16, 3347, 4672, 3536, 10229, 326, 1479, 498, 1492, 1885, 326, 21425, 1985, 533, 316, 333, 4414, 18, 971, 333, 21425, 1985, 353, 486, 2553, 316, 326, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2564, 67, 350, 12, 2890, 16, 3347, 4672, 3536, 10229, 326, 1479, 498, 1492, 1885, 326, 21425, 1985, 533, 316, 333, 4414, 18, 971, 333, 21425, 1985, 353, 486, 2553, 316, 326, 1...
self._cont_handler.characters(str(String(char, start, len)))
self._cont_handler.characters(String(char, start, len).getBytes('utf-8').tostring().decode('utf-8'))
def characters(self, char, start, len): self._cont_handler.characters(str(String(char, start, len)))
d20bc8090e55b0a1f3b7d3e3ef7f5e88d556ad1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6753/d20bc8090e55b0a1f3b7d3e3ef7f5e88d556ad1f/drv_javasax.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3949, 12, 2890, 16, 1149, 16, 787, 16, 562, 4672, 365, 6315, 1213, 67, 4176, 18, 20558, 12, 701, 12, 780, 12, 3001, 16, 787, 16, 562, 20349, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3949, 12, 2890, 16, 1149, 16, 787, 16, 562, 4672, 365, 6315, 1213, 67, 4176, 18, 20558, 12, 701, 12, 780, 12, 3001, 16, 787, 16, 562, 20349, 2, -100, -100, -100, -100, -100, -100, -1...
p = processors.InvalidationProcessor(prefixes, timeout=timeout, cookie_name=cookie_name)
p = InvalidationProcessor(prefixes, timeout=timeout, cookie_name=cookie_name)
def setup_invalidation_processor(): from openlibrary.core import processors config = infogami.config.get("invalidation", {}) prefixes = config.get('prefixes', []) timeout = config.get("timeout", 60) cookie_name = config.get("cookie", "invalidation_timestamp") print "prefixes", prefixes print "timeout", timeout if prefixes: p = processors.InvalidationProcessor(prefixes, timeout=timeout, cookie_name=cookie_name) delegate.app.add_processor(p) client.hooks.append(p.hook)
e223208b6a7752b690e335c6dd016088341bbd19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/e223208b6a7752b690e335c6dd016088341bbd19/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5387, 367, 67, 8700, 13332, 628, 1696, 12083, 18, 3644, 1930, 13399, 225, 642, 273, 1123, 75, 26223, 18, 1425, 18, 588, 2932, 5387, 367, 3113, 2618, 13, 225, 9419, 273, 642, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5387, 367, 67, 8700, 13332, 628, 1696, 12083, 18, 3644, 1930, 13399, 225, 642, 273, 1123, 75, 26223, 18, 1425, 18, 588, 2932, 5387, 367, 3113, 2618, 13, 225, 9419, 273, 642, ...
path = "/var/lib/pacman/%s/%s" %(repo, pack_dir)
if (self.ver[0] == 3 and self.ver[1] == 1) and not repo == "local": path_to_db = "/var/lib/pacman/sync" else: path_to_db = "/var/lib/pacman" path = "%s/%s/%s" %(path_to_db, repo, pack_dir)
def set_pac_properties(self, pac): """Set the properties for the given pac""" if pac.installed: version = pac.inst_ver repo = "local" else: version = pac.version repo = pac.repo pack_dir = "-".join((pac.name, version)) path = "/var/lib/pacman/%s/%s" %(repo, pack_dir) self._set_summary(pac, path) self._set_filelist(pac, path) pac.prop_setted = True return
a500d71a58aa8a2879e31d2413ce4a679b48d908 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2654/a500d71a58aa8a2879e31d2413ce4a679b48d908/pacman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 84, 1077, 67, 4738, 12, 2890, 16, 293, 1077, 4672, 3536, 694, 326, 1790, 364, 326, 864, 293, 1077, 8395, 309, 293, 1077, 18, 13435, 30, 1177, 273, 293, 1077, 18, 8591, 67, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 84, 1077, 67, 4738, 12, 2890, 16, 293, 1077, 4672, 3536, 694, 326, 1790, 364, 326, 864, 293, 1077, 8395, 309, 293, 1077, 18, 13435, 30, 1177, 273, 293, 1077, 18, 8591, 67, 5...
execcheckfile = execname+'.good' if (not execcheckfile or not os.access(execcheckfile, os.R_OK)):
if onlyone: ceident='' else: if len(compoptslist)==1: ceident = '.0-' else: ceident = '.'+str(compoptsnum+1)+'-' if len(execoptslist)==1: ceindent += '0' else: ceident += str(execoptsnum) execcheckfile = execname+'.'+machine+ceident+'.good' if not os.path.isfile(execcheckfile): execcheckfile=execname+'.comm-'+os.getenv('CHPL_COMM','none')+ceident+'.good' if not os.path.isfile(execcheckfile): execcheckfile=execname+platform+ceident+'.good' if not os.path.isfile(execcheckfile): execcheckfile=execname+ceident+'.good' if not os.path.isfile(execcheckfile): execcheckfile=execname+'.good' if not os.access(execcheckfile, os.R_OK):
def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return
97dd26e665e2ca235f4c8596da4b25c90663de32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/97dd26e665e2ca235f4c8596da4b25c90663de32/sub_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
enclosure = PyRSS2Gen.Enclosure(media_link, str(media_size), 'audio/mpeg'),
enclosure = PyRSS2Gen.Enclosure(media_link, str(media.size), 'audio/mpeg'),
def update_rss(self, media_obj_list, rss_file): i =0 rss_item_list = [] if not os.path.exists(self.rss_dir): os.makedirs(self.rss_dir) if len(media_obj_list) == 1: sub_title = '(currently playing)' else: sub_title = '(playlist)' for media_obj in media_obj_list: media_size = media_obj.size media_link = self.channel.url + self.media_url_dir + media_obj.file_name media_description = '<table>' for key in media_obj.metadata.keys(): if media_obj.metadata[key] != '': media_description += '<tr><td>%s: </td><td><b>%s</b></td></tr>' % \ (key.capitalize(), media_obj.metadata[key]) media_description += '</table>' rss_item_list.append(PyRSS2Gen.RSSItem( title = media_obj.metadata['artist'] + ' : ' + media_obj.metadata['title'], link = media_link, description = media_description, enclosure = PyRSS2Gen.Enclosure(media_link, str(media_size), 'audio/mpeg'), guid = PyRSS2Gen.Guid(media_link), pubDate = datetime.datetime.now()) ) rss = PyRSS2Gen.RSS2(title = self.channel.name + ' ' + sub_title, link = self.channel.url, description = self.channel.description, lastBuildDate = datetime.datetime.now(), items = rss_item_list,) rss.write_xml(open(rss_file, "w"))
787fef0709b19aa8df299b667ccf69a2ca01c4b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/787fef0709b19aa8df299b667ccf69a2ca01c4b6/deefuzz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 25151, 12, 2890, 16, 3539, 67, 2603, 67, 1098, 16, 18817, 67, 768, 4672, 277, 273, 20, 18817, 67, 1726, 67, 1098, 273, 5378, 309, 486, 1140, 18, 803, 18, 1808, 12, 2890, 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, 1089, 67, 25151, 12, 2890, 16, 3539, 67, 2603, 67, 1098, 16, 18817, 67, 768, 4672, 277, 273, 20, 18817, 67, 1726, 67, 1098, 273, 5378, 309, 486, 1140, 18, 803, 18, 1808, 12, 2890, 18...
date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time
date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time[:6]
def printdir(self): """Print a table of contents for the zip file.""" print "%-46s %19s %12s" % ("File Name", "Modified ", "Size") for zinfo in self.filelist: date = "%d-%02d-%02d %02d:%02d:%02d" % zinfo.date_time print "%-46s %s %12d" % (zinfo.filename, date, zinfo.file_size)
351e1a3e8805bca158d1f116a637e787e2b70f18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/351e1a3e8805bca158d1f116a637e787e2b70f18/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1214, 12, 2890, 4672, 3536, 5108, 279, 1014, 434, 2939, 364, 326, 3144, 585, 12123, 1172, 2213, 17, 8749, 87, 738, 3657, 87, 738, 2138, 87, 6, 738, 7566, 812, 1770, 3113, 315, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1214, 12, 2890, 4672, 3536, 5108, 279, 1014, 434, 2939, 364, 326, 3144, 585, 12123, 1172, 2213, 17, 8749, 87, 738, 3657, 87, 738, 2138, 87, 6, 738, 7566, 812, 1770, 3113, 315, 45...
pre='((\r?\n)+---- *)?(\r?\n)'
pre='((\r?\n)+---- *)?(\r?\n)+'
def header(year): s=[] cent=(int(year)-1)/100+1 s.append('<!-- robot -->') s.append('<table align=center><tr><td align=center>') s.append("[[Eeuwen]]: [[%s]] -- '''[[%s]]''' -- [[%s]]"%cmap(beforeandafter(cent))) s.append('</td></tr><tr><td align=center>') s.append(('Jaren: '+'[[%s]] -- '*5+"'''%s'''"+' -- [[%s]]'*5)%ymap(range(year-5,year+6))) s.append('</td></tr></table>') s.append('<!-- /robot -->') s.append("----") return '\r\n'.join(s)
450be09d5bf1a58256bc4e29ab9fcb401bc0baf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/450be09d5bf1a58256bc4e29ab9fcb401bc0baf7/yearlayout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1446, 12, 6874, 4672, 272, 33, 8526, 8301, 28657, 474, 12, 6874, 24950, 21, 13176, 6625, 15, 21, 272, 18, 6923, 2668, 5586, 413, 14386, 1493, 1870, 13, 272, 18, 6923, 2668, 32, 2121, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1446, 12, 6874, 4672, 272, 33, 8526, 8301, 28657, 474, 12, 6874, 24950, 21, 13176, 6625, 15, 21, 272, 18, 6923, 2668, 5586, 413, 14386, 1493, 1870, 13, 272, 18, 6923, 2668, 32, 2121, 5...
Shafarevich-Tate group for the Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
Tate-Shafarevich group for the Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field
def update(self): """ Updates some properties from ``curve``.
56ba0d7a834d25fb4d2cfe8a7925ba51a1476a6e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/56ba0d7a834d25fb4d2cfe8a7925ba51a1476a6e/BSD.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 15419, 2690, 1790, 628, 12176, 16683, 68, 8338, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 3536, 15419, 2690, 1790, 628, 12176, 16683, 68, 8338, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.perlPath, self.perlIncPath, _ = self._getperl(macros, self.recipe)
self.perlPath, perlIncPath, _ = self._getperl(macros, self.recipe) self.perlIncPath = ' '.join('-I'+x for x in perlIncPath)
def _fetchPerl(self): """ Cache the perl path and @INC path with -I%(destdir)s prepended to each element if necessary """ if self.perlPath is not None: return
4030388ef8d3268532300dc19ad2b0482e3ad07a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8747/4030388ef8d3268532300dc19ad2b0482e3ad07a/packagepolicy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5754, 2173, 80, 12, 2890, 4672, 3536, 4379, 326, 1534, 80, 589, 471, 632, 23213, 589, 598, 300, 45, 17105, 10488, 1214, 13, 87, 26989, 358, 1517, 930, 309, 4573, 3536, 309, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5754, 2173, 80, 12, 2890, 4672, 3536, 4379, 326, 1534, 80, 589, 471, 632, 23213, 589, 598, 300, 45, 17105, 10488, 1214, 13, 87, 26989, 358, 1517, 930, 309, 4573, 3536, 309, 365, 1...
this = apply(_quickfix.new_TradeRequestType, args)
this = _quickfix.new_TradeRequestType(*args)
def __init__(self, *args): this = apply(_quickfix.new_TradeRequestType, 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, 22583, 691, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 22583, 691, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 3...
sage: N.basis()
sage.: N.basis()
def new_submodule(self, p=None): """ Return the new or $p$-new submodule of this ambient module.
127b68d926c53d243ab15970f5f2d3289775eb71 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/127b68d926c53d243ab15970f5f2d3289775eb71/ambient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 1717, 2978, 12, 2890, 16, 293, 33, 7036, 4672, 3536, 2000, 326, 394, 578, 271, 84, 8, 17, 2704, 27314, 434, 333, 13232, 1979, 1605, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 1717, 2978, 12, 2890, 16, 293, 33, 7036, 4672, 3536, 2000, 326, 394, 578, 271, 84, 8, 17, 2704, 27314, 434, 333, 13232, 1979, 1605, 18, 2, -100, -100, -100, -100, -100, -100, ...
group_id = self.id_get(cr, 'res.groups', group)
group_id = self.id_get(cr, group)
def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8')))
4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2692, 67, 5414, 1726, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 1950, 67, 350, 273, 1950, 18, 588, 2932, 350, 3113, 6309, 2934, 3015, 2668, 9184, 6134, 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, 5414, 1726, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 1950, 67, 350, 273, 1950, 18, 588, 2932, 350, 3113, 6309, 2934, 3015, 2668, 9184, 6134, 365,...
self._node = self._repo.lookup(self._id)
self._node = self._repo.lookup(changeid)
def __init__(self, repo, changeid): """changeid is a revision number, node, or tag""" self._repo = repo self._id = changeid
5fde7534a11ea9e7fff05a74aed2f6ace16f849e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/5fde7534a11ea9e7fff05a74aed2f6ace16f849e/context.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3538, 16, 2549, 350, 4672, 3536, 3427, 350, 353, 279, 6350, 1300, 16, 756, 16, 578, 1047, 8395, 365, 6315, 7422, 273, 3538, 365, 6315, 350, 273, 2549, 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, 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, 3538, 16, 2549, 350, 4672, 3536, 3427, 350, 353, 279, 6350, 1300, 16, 756, 16, 578, 1047, 8395, 365, 6315, 7422, 273, 3538, 365, 6315, 350, 273, 2549, 35...
if len(dnick) <= 1 or dnick[0] != cfg.irc_to_dc_prefix:
if not dnick.startswith(cfg.irc_to_dc_prefix):
def irc_from_dc(dnick): # Decode a Dtella-encoded IRC nick, for use in IRC. if len(dnick) <= 1 or dnick[0] != cfg.irc_to_dc_prefix: raise NickError("Bad prefix") inick = dnick[1:].replace('!','|') for c in inick: if c not in irc_nick_chars: raise NickError("Invalid character: %s" % c) return inick
6db8a85a24beb27e78894da622727e4166dfbc60 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8524/6db8a85a24beb27e78894da622727e4166dfbc60/dtella_bridgeserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 1310, 67, 2080, 67, 7201, 12, 5176, 1200, 4672, 468, 6209, 279, 463, 88, 1165, 69, 17, 10787, 467, 11529, 10909, 16, 364, 999, 316, 467, 11529, 18, 309, 486, 8800, 1200, 18, 17514...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 1310, 67, 2080, 67, 7201, 12, 5176, 1200, 4672, 468, 6209, 279, 463, 88, 1165, 69, 17, 10787, 467, 11529, 10909, 16, 364, 999, 316, 467, 11529, 18, 309, 486, 8800, 1200, 18, 17514...
if self.group and owner and self.group.account_set.filter(owner=owner).count(): raise forms.ValidationError( _('Users may only have one account per group'))
if self.group: accounts = self.group.account_set.filter(owner__username=owner) if self.instance: accounts = accounts.exclude(id=self.instance.id).count() else: accounts = accounts.count() if accounts: raise forms.ValidationError( _('Users may only have one account per group'))
def clean_owner(self): owner = self.cleaned_data['owner']
9f79e83673afb830ac856bbd0ee1b3c399f4dc80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12178/9f79e83673afb830ac856bbd0ee1b3c399f4dc80/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 8443, 12, 2890, 4672, 3410, 273, 365, 18, 6200, 329, 67, 892, 3292, 8443, 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, ...
[ 1, 1, 1, 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, 2721, 67, 8443, 12, 2890, 4672, 3410, 273, 365, 18, 6200, 329, 67, 892, 3292, 8443, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"""A field that stores a read-only computation."""
"""A field that always returns a computed."""
def get_size(self, instance): """Get size of the stored data used for get_size in BaseObject """ return 0
7b89c28afec2690609496429e0a4329890cfbda2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12165/7b89c28afec2690609496429e0a4329890cfbda2/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1467, 12, 2890, 16, 791, 4672, 3536, 967, 963, 434, 326, 4041, 501, 1399, 364, 336, 67, 1467, 316, 3360, 921, 3536, 327, 374, 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, 336, 67, 1467, 12, 2890, 16, 791, 4672, 3536, 967, 963, 434, 326, 4041, 501, 1399, 364, 336, 67, 1467, 316, 3360, 921, 3536, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100...
GrinderLog.setup(self.debug)
def __init__(self): usage = "usage: %prog yum [OPTIONS]" shortdesc = "Fetches content from a yum repo." desc = "yum" CliDriver.__init__(self, "yum", usage, shortdesc, desc) GrinderLog.setup(self.debug)
ea266321bf76f5afad6520c4e55739b65581b365 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/ea266321bf76f5afad6520c4e55739b65581b365/GrinderCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4084, 273, 315, 9167, 30, 738, 14654, 677, 379, 306, 12422, 4279, 3025, 5569, 273, 315, 14288, 913, 628, 279, 677, 379, 3538, 1199, 3044, 273, 315, 93, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4084, 273, 315, 9167, 30, 738, 14654, 677, 379, 306, 12422, 4279, 3025, 5569, 273, 315, 14288, 913, 628, 279, 677, 379, 3538, 1199, 3044, 273, 315, 93, ...
os.unlink(sFile)
os.unlink(os.path.join(sSourceDir, sFile))
def run(request, response, func=download_from_web): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running once an item is None.''' while 1: item = request.get() if item is None: break (sUrl, sFile, download_size, checksum) = stripper(item) response.put((name, sUrl, sFile, func(sUrl, sFile, sSourceDir, None))) # This will take care of making sure that if downloaded, they are zipped (thread_name, Url, File, exit_status) = responseQueue.get() if exit_status == True: if zip_bool: ziplock.acquire() try: compress_the_file(zip_type_file, sFile, sSourceDir) os.unlink(sFile) # Remove it because we don't need the file once it is zipped. finally: ziplock.release() else: pypt_variables.errlist.append(sFile) pass
b8e894b2e6e1e7f672d95da72ee9cabedb9e55db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12499/b8e894b2e6e1e7f672d95da72ee9cabedb9e55db/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 7813, 67, 2080, 67, 4875, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2293, 16, 766, 16, 1326, 33, 7813, 67, 2080, 67, 4875, 4672, 9163, 967, 1516, 628, 326, 590, 7530, 16, 1207, 2182, 598, 1326, 9334, 1378, 326, 1686, 7563, 598, 326, 4884, 180...
edf.WriteImage({},self.theDiffractionData.data)
edf.WriteImage({'Title':"Edf file converted by the Area Diffraction Machine"}, Numeric.transpose(self.theDiffractionData.data), DataType= "SignedInteger", Append=0)
def saveDiffractionImage(self,filename,colorMaps,colorMapName, maskedPixelInfo, pixel1X=None,pixel1Y=None, pixel2X=None, pixel2Y=None, lowerBound=0, upperBound=1, logScale = None, invert = None, drawQLines=None,drawdQLines=None,QData=None,calibrationData=None, drawPeaks=None,peakList=None, qLinesColor = None, dQLinesColor = None, peakLinesColor = None):
8b910c94afb1c262a3e7a60df31477457e6d718b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8973/8b910c94afb1c262a3e7a60df31477457e6d718b/DiffractionData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 5938, 5738, 2040, 12, 2890, 16, 3459, 16, 3266, 8903, 16, 3266, 863, 461, 16, 13196, 9037, 966, 16, 4957, 21, 60, 33, 7036, 16, 11743, 21, 61, 33, 7036, 16, 4957, 22, 60, 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, 1923, 5938, 5738, 2040, 12, 2890, 16, 3459, 16, 3266, 8903, 16, 3266, 863, 461, 16, 13196, 9037, 966, 16, 4957, 21, 60, 33, 7036, 16, 11743, 21, 61, 33, 7036, 16, 4957, 22, 60, 33, ...
return self.op.removeApostrophes(decomposition)
return op.removeApostrophes(decomposition)
def cleanDecomposition(self, decomposition, reading, **options): if not hasattr(self, '_operators'): self._operators = [] for operatorReading, operatorOptions, op in self._operators: if reading == operatorReading and options == operatorOptions: break else: op = self.f.createReadingOperator(reading, **options) self._operators.append((reading, options, op))
d48307a18f20d2156b7a7c4516a5be50da22b2ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/d48307a18f20d2156b7a7c4516a5be50da22b2ae/readingoperator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 17731, 3276, 12, 2890, 16, 26288, 16, 6453, 16, 2826, 2116, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 30659, 11, 4672, 365, 6315, 30659, 273, 5378, 364, 3726, 15714, 16, 3726, 1320...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 17731, 3276, 12, 2890, 16, 26288, 16, 6453, 16, 2826, 2116, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 30659, 11, 4672, 365, 6315, 30659, 273, 5378, 364, 3726, 15714, 16, 3726, 1320...
groupdict = match.groupdict() method = dispatch[groupdict["start"] or groupdict["backquote"] or groupdict["refend"] or groupdict["fnend"]]
groups = match.groupdict() method = dispatch[groups['start'] or groups['backquote'] or groups['refend'] or groups['fnend']]
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
9fe47ec4311156cad473d8ed8bf0dba5fd73c14e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/9fe47ec4311156cad473d8ed8bf0dba5fd73c14e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
frac = str(f)[:-1]
frac = str(f) if frac[-1]=="L": frac = frac[:-1]
def __str__(self): n, p = self.n, self.p i, f = divmod(abs(n), _tento(p)) if p: frac = str(f)[:-1] frac = "0" * (p - len(frac)) + frac else: frac = "" return "-"[:n<0] + \ str(i)[:-1] + \ "." + frac
9bc2adbfe062085dff3ae99e12e6c47ca2a53580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/9bc2adbfe062085dff3ae99e12e6c47ca2a53580/FixedPoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 290, 16, 293, 273, 365, 18, 82, 16, 365, 18, 84, 277, 16, 284, 273, 26105, 12, 5113, 12, 82, 3631, 389, 88, 29565, 12, 84, 3719, 309, 293, 30, 282, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 290, 16, 293, 273, 365, 18, 82, 16, 365, 18, 84, 277, 16, 284, 273, 26105, 12, 5113, 12, 82, 3631, 389, 88, 29565, 12, 84, 3719, 309, 293, 30, 282, ...
self.log.info( 'Adding Thread Pool:', directorPool)
self.log.info( 'Adding Thread Pool:', directorPool )
def __createDirector(self,submitPool): """ Instantiate a new PilotDirector for the given SubmitPool """
2167c40fe092d0205e599c452b700e4f2aaec45c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/2167c40fe092d0205e599c452b700e4f2aaec45c/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 28280, 12, 2890, 16, 9297, 2864, 4672, 3536, 26492, 279, 394, 453, 22797, 28280, 364, 326, 864, 17320, 2864, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2640, 28280, 12, 2890, 16, 9297, 2864, 4672, 3536, 26492, 279, 394, 453, 22797, 28280, 364, 326, 864, 17320, 2864, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pos = []
pos = ["(no file)"]
def show_warnings (self): """ Display all warnings. This function is pathetically dumb, as it simply shows all lines in the log that contain the substring 'Warning'. """ pos = [] page = 1 something = 0 for line in self.lines: if line.find("Warning") != -1: self.msg.info( {"file":pos[-1], "page":page}, string.rstrip(line)) something = 1 else: self.update_file(line, pos) page = self.update_page(line, page) return something
ce3b58fe3aba60eaa53233278856d049a7043861 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/ce3b58fe3aba60eaa53233278856d049a7043861/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 12103, 261, 2890, 4672, 3536, 9311, 777, 5599, 18, 1220, 445, 353, 589, 278, 6478, 302, 3592, 16, 487, 518, 8616, 17975, 777, 2362, 316, 326, 613, 716, 912, 326, 3019, 296, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 12103, 261, 2890, 4672, 3536, 9311, 777, 5599, 18, 1220, 445, 353, 589, 278, 6478, 302, 3592, 16, 487, 518, 8616, 17975, 777, 2362, 316, 326, 613, 716, 912, 326, 3019, 296, 6...
if not validateElements(e,ch): return False
if not validateElements(e): return False
def validateElements(elements): for e in elements: if isinstance(e,(list,tuple)): if not validateElements(e,ch): return False else: if not self.getSafeValue(e).validate(templatenode,callback): return False return True
55b009bade3cf645100a894d845b1acc779ca7dd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/55b009bade3cf645100a894d845b1acc779ca7dd/datatypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 3471, 12, 6274, 4672, 364, 425, 316, 2186, 30, 309, 1549, 12, 73, 16, 12, 1098, 16, 8052, 3719, 30, 309, 486, 1954, 3471, 12, 73, 4672, 327, 1083, 469, 30, 309, 486, 365, 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, 1954, 3471, 12, 6274, 4672, 364, 425, 316, 2186, 30, 309, 1549, 12, 73, 16, 12, 1098, 16, 8052, 3719, 30, 309, 486, 1954, 3471, 12, 73, 4672, 327, 1083, 469, 30, 309, 486, 365, 18, ...
def _get_message(self, message):
def _get_message(self):
def _get_message(self, message): return self._message
5f4d8f9d0f8b7c75992da0773c61f986e1be0b7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/5f4d8f9d0f8b7c75992da0773c61f986e1be0b7c/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2150, 12, 2890, 4672, 327, 365, 6315, 2150, 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, 389, 588, 67, 2150, 12, 2890, 4672, 327, 365, 6315, 2150, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
__builtin__.__import__ = types.MethodType(Y(), None, (pseudoclass, str)) import spam
orig_import = __import__ try: __builtin__.__import__ = types.MethodType(Y(), None, (pseudoclass, str)) import spam finally: __builtin__.__import__ = orig_import
def __call__(self, *args): # 'self' was freed already return (self, args)
bf839e2efa78a4668105846c4d406f968343bff4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf839e2efa78a4668105846c4d406f968343bff4/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 468, 296, 2890, 11, 1703, 28004, 1818, 327, 261, 2890, 16, 833, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 468, 296, 2890, 11, 1703, 28004, 1818, 327, 261, 2890, 16, 833, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
thread.start_new_thread(self.thread_update_hash, ())
self.thread_update_hash()
def update_hashfile(self):
bbf831aedbd676fd6385faae182b6e52b4dcd5db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2200/bbf831aedbd676fd6385faae182b6e52b4dcd5db/parano.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2816, 768, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2816, 768, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
data_obj = pool.get('ir.model.data') id2 = data_obj._get_id(cr, uid, 'hr', 'hr_case_phone_tree_view') id3 = data_obj._get_id(cr, uid, 'hr', 'hr_case_phone_form_view')
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view') id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
def _doIt(self, cr, uid, data, context): form = data['form'] pool = pooler.get_pool(cr.dbname) mod_obj = pool.get('ir.model.data') result = mod_obj._get_id(cr, uid, 'hr', 'view_hr_case_phonecalls_filter') res = mod_obj.read(cr, uid, result, ['res_id']) phonecall_case_obj = pool.get('hr.phonecall') job_case_obj = pool.get('hr.applicant') # Select the view
567b6069ac51ee03f2b7252d505366880abd77b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/567b6069ac51ee03f2b7252d505366880abd77b3/hr_recruitment_wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 7193, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 646, 273, 501, 3292, 687, 3546, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 681, 67, 2603...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 7193, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 646, 273, 501, 3292, 687, 3546, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 681, 67, 2603...
if _logfile: _logfile.write("return 1, imp.load_module(%s, %s, %s)\n\n" % \ (`fqname`, `pathname`, `desc`))
def get_code(self, parent, modname, fqname, get_code=get_code): # Usually 'parent', if not None, defines a context for # importing. In the normal python import mechanism, parent.__path__ # is a list containing the package directory. # Beware: There seem to be some unusual uses of this (See win32com.__init__) # In Greg Steins importers module, parent.__path__ is the same as above, # and parent.__ispkg__ is the package directory itself. # If importing a package, a dict containing these items is returned as the # third item and thus inserted into the new module. # If importing a normal module, __file__ is inserted into the module. # XXX What should WE do?
149ae78cb8c0170db1567faade141bb8e3ece089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/149ae78cb8c0170db1567faade141bb8e3ece089/support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 710, 12, 2890, 16, 982, 16, 16037, 16, 8508, 529, 16, 336, 67, 710, 33, 588, 67, 710, 4672, 468, 29785, 296, 2938, 2187, 309, 486, 599, 16, 11164, 279, 819, 364, 468, 25077,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 710, 12, 2890, 16, 982, 16, 16037, 16, 8508, 529, 16, 336, 67, 710, 33, 588, 67, 710, 4672, 468, 29785, 296, 2938, 2187, 309, 486, 599, 16, 11164, 279, 819, 364, 468, 25077,...
and not x[1].translate \ and x[1]._type not in ('text', 'binary')]
and x[0] not in self._data[self._id] \ and ((not x[1].translate \ and x[1]._type not in ('text', 'binary')) \ or x[0] == name)]
def __getitem__(self, name): if name == 'id': return self._id if name == 'setLang': return self.setLang if not self._data[self._id].has_key(name): # build the list of fields we will fetch
b11549ad6b2d5212d767c5c4733568a2fa9ea24c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/b11549ad6b2d5212d767c5c4733568a2fa9ea24c/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 508, 4672, 309, 508, 422, 296, 350, 4278, 327, 365, 6315, 350, 309, 508, 422, 296, 542, 7275, 4278, 327, 365, 18, 542, 7275, 309, 486, 365, 6315, 892, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31571, 972, 12, 2890, 16, 508, 4672, 309, 508, 422, 296, 350, 4278, 327, 365, 6315, 350, 309, 508, 422, 296, 542, 7275, 4278, 327, 365, 18, 542, 7275, 309, 486, 365, 6315, 892, ...
if stat <> SUCCESS:
if stat != SUCCESS:
def unpack_replyheader(self): xid = self.unpack_uint() mtype = self.unpack_enum() if mtype <> REPLY: raise RuntimeError, 'no REPLY but %r' % (mtype,) stat = self.unpack_enum() if stat == MSG_DENIED: stat = self.unpack_enum() if stat == RPC_MISMATCH: low = self.unpack_uint() high = self.unpack_uint() raise RuntimeError, \ 'MSG_DENIED: RPC_MISMATCH: %r' % ((low, high),) if stat == AUTH_ERROR: stat = self.unpack_uint() raise RuntimeError, \ 'MSG_DENIED: AUTH_ERROR: %r' % (stat,) raise RuntimeError, 'MSG_DENIED: %r' % (stat,) if stat <> MSG_ACCEPTED: raise RuntimeError, \ 'Neither MSG_DENIED nor MSG_ACCEPTED: %r' % (stat,) verf = self.unpack_auth() stat = self.unpack_enum() if stat == PROG_UNAVAIL: raise RuntimeError, 'call failed: PROG_UNAVAIL' if stat == PROG_MISMATCH: low = self.unpack_uint() high = self.unpack_uint() raise RuntimeError, \ 'call failed: PROG_MISMATCH: %r' % ((low, high),) if stat == PROC_UNAVAIL: raise RuntimeError, 'call failed: PROC_UNAVAIL' if stat == GARBAGE_ARGS: raise RuntimeError, 'call failed: GARBAGE_ARGS' if stat <> SUCCESS: raise RuntimeError, 'call failed: %r' % (stat,) return xid, verf # Caller must get procedure-specific part of reply
1ca8397a72985f1ea6854d833361d924adeec5fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1ca8397a72985f1ea6854d833361d924adeec5fa/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 67, 10629, 3374, 12, 2890, 4672, 19031, 273, 365, 18, 17309, 67, 11890, 1435, 22189, 273, 365, 18, 17309, 67, 7924, 1435, 309, 22189, 2813, 2438, 23893, 30, 1002, 7265, 16, 296, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 67, 10629, 3374, 12, 2890, 4672, 19031, 273, 365, 18, 17309, 67, 11890, 1435, 22189, 273, 365, 18, 17309, 67, 7924, 1435, 309, 22189, 2813, 2438, 23893, 30, 1002, 7265, 16, 296, 21...