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
return curses.tparm(curses.tigetstr("setf"), 2)
return curses.tparm(SETF, 2)
def GetColor(color = None): if not HAVE_COLORS: return "" if color != None: color = color.lower() if (color == "blue"): return curses.tparm(curses.tigetstr("setf"), 1) elif (color == "green"): return curses.tparm(curses.tigetstr("setf"), 2) elif (color == "cyan"): return curses.tparm(curses.tigetstr("setf"), 3) elif (color == "red"): return curses.tparm(curses.tigetstr("setf"), 4) elif (color == "magenta"): return curses.tparm(curses.tigetstr("setf"), 5) elif (color == "yellow"): return curses.tparm(curses.tigetstr("setf"), 6) else: return curses.tparm(curses.tigetstr("sgr0"))
dc98a47cce179ee845b39ee597207fed290ca2b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/dc98a47cce179ee845b39ee597207fed290ca2b0/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2957, 12, 3266, 273, 599, 4672, 309, 486, 21926, 3412, 67, 10989, 55, 30, 327, 1408, 309, 2036, 480, 599, 30, 2036, 273, 2036, 18, 8167, 1435, 309, 261, 3266, 422, 315, 14081, 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, 968, 2957, 12, 3266, 273, 599, 4672, 309, 486, 21926, 3412, 67, 10989, 55, 30, 327, 1408, 309, 2036, 480, 599, 30, 2036, 273, 2036, 18, 8167, 1435, 309, 261, 3266, 422, 315, 14081, 6, ...
q0.append('%s:(%s)'% (searchfield, v))
if type(searchfield) == str: q0.append('%s:(%s)'% (searchfield, v)) elif type(searchfield) == list: q0.append('(%s)'% \ ' OR '.join(('%s:(%s)'%(s,v)) for s in searchfield))
def POST(self): i = web.input(wtitle='', wauthor='', wtopic='', wisbn='', wpublisher='', wdescription='', psort_order='', pfulltext='', ftokens=[], q='', ) results = [] qresults = web.storage(begin=0, total_results=0) facets = [] errortext = None
68ce85c697d065a1f712ca5a13670a5844d9a571 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/68ce85c697d065a1f712ca5a13670a5844d9a571/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5485, 12, 2890, 4672, 277, 273, 3311, 18, 2630, 12, 91, 2649, 2218, 2187, 341, 4161, 2218, 2187, 341, 10476, 2218, 2187, 341, 291, 13392, 2218, 2187, 6357, 2394, 264, 2218, 2187, 341, 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, 5485, 12, 2890, 4672, 277, 273, 3311, 18, 2630, 12, 91, 2649, 2218, 2187, 341, 4161, 2218, 2187, 341, 10476, 2218, 2187, 341, 291, 13392, 2218, 2187, 6357, 2394, 264, 2218, 2187, 341, 33...
SEname=jobreport.siteDetails['se-name'] logging.debug("site SEname %s"%SEname)
def handleJobReport(self, jobReportLocation): """ _handleJobReport_
afc6f80bc9a4a01aad177d4ca8d0f14e4fdeb563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/afc6f80bc9a4a01aad177d4ca8d0f14e4fdeb563/DBSComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 2278, 4820, 12, 2890, 16, 1719, 4820, 2735, 4672, 3536, 389, 4110, 2278, 4820, 67, 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, 1640, 2278, 4820, 12, 2890, 16, 1719, 4820, 2735, 4672, 3536, 389, 4110, 2278, 4820, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return (int(status), text)
return (int(status), "\n".join(text))
def _read_reply(self): """Reads a (possibly multi-line) response from the server. Returns a tuple containing (code, text)""" text = "" while True: line = self._fd.readline().rstrip() if not line: raise RuntimeError("Protocol error, empty line received")
a69ac806cad0f7a43e2c9d874af69a8ed76054e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8495/a69ac806cad0f7a43e2c9d874af69a8ed76054e7/protocol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 10629, 12, 2890, 4672, 3536, 7483, 279, 261, 917, 8781, 3309, 17, 1369, 13, 766, 628, 326, 1438, 18, 2860, 279, 3193, 4191, 261, 710, 16, 977, 15574, 977, 273, 1408, 1323...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 67, 10629, 12, 2890, 4672, 3536, 7483, 279, 261, 917, 8781, 3309, 17, 1369, 13, 766, 628, 326, 1438, 18, 2860, 279, 3193, 4191, 261, 710, 16, 977, 15574, 977, 273, 1408, 1323...
options.modes = [ options.mode ]
options.modes = [options.mode]
def main(options): """ >>> options = parseOptions() >>> options.dryrun = True >>> options.verbose = True >>> main(options) False Try and run a test that does not exist >>> options.single = 'TestFoo.py' >>> main(options) Test(s) not found False Try different single tests single unit test: >>> options.single = 'TestCrypto' >>> main(options) /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False unit test and functional test: >>> options.single = 'TestCrypto,TestSharing' >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --chandlerTests=TestSharing -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False unit, functional and two perf tests, one of which is a startup test: >>> options.single = 'TestCrypto,TestSharing,PerfImportCalendar,startup_large' >>> main(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --chandlerTests=TestSharing -D2 -M0 ... /.../RunPython... application/tests/TestCrypto.py -v ... Creating repository for startup time tests ... Startup_with_large_calendar ... ... False Try and specify an invalid mode >>> options.single = '' >>> options.mode = 'foo' >>> main(options) foo removed from mode list foo mode requested but not found -- stopping test run True Run unit tests with --dryrun >>> options.mode = None >>> options.unit = True >>> main(options) /.../RunPython... .../tests/TestReferenceAttributes.py -v ... /.../RunPython... setup.py test -v ... False Run unitSuite with --dryrun >>> options.unit = False >>> options.unitSuite = True >>> main(options) /.../RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False Run functional tests with --dryrun >>> options.unit = False >>> options.unitSuite = False >>> options.funcSuite = True >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/cats/Functional/FunctionalTestSuite.py -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False Run functional tests each in its on process >>> options.funcSuite = False >>> options.func = True >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --chandlerTests=TestAllDayEvent -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... False Run performance tests with --dryrun >>> options.func = False >>> options.perf = True >>> options.profile = False >>> main(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py ... ... /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=test_profile/__repository__.001 PerfLargeDataResizeCalendar.py ... ... Creating repository for startup time tests ... Startup ... ... False """ checkOptions(options) failed = False if options.mode is None: options.modes = modes = ['release', 'debug'] # silently clear any missing modes if default list is specified for mode in modes: if not os.path.isdir(os.path.join(options.chandlerBin, mode)): options.modes.remove(mode) else: options.mode = options.mode.strip().lower() options.modes = [ options.mode ] # complain about any missing modes if mode was explicitly stated if not os.path.isdir(os.path.join(options.chandlerBin, options.mode)): options.modes.remove(options.mode) log('%s removed from mode list' % options.mode) if len(options.modes) == 0: log('%s mode requested but not found -- stopping test run' % options.mode) failed = True if not failed: try: # Empty the log file so that we won't be confused by old results later f = open(os.path.join(options.profileDir, 'chandler.log'), 'w') f.close() except IOError: pass # Remove old perf log files (we leave the the latest) for f in glob.glob(os.path.join(options.profileDir, '*.log.*')): try: os.remove(f) except OSError: pass if options.testcase: failed = runTestCase(options) elif options.single: failed = runSingles(options) else: if not options.perf: failed = runLocalizationCheck(options) if options.unit and (not failed or options.noStop): failed = runUnitTests(options) if not failed or options.noStop: if runPluginTests(options): failed = True if options.unitSuite and (not failed or options.noStop): if runUnitSuite(options): failed = True if options.funcSuite and (not failed or options.noStop): if runFuncTest(options): failed = True if options.func and (not failed or options.noStop): if runFuncTestsSingly(options): failed = True if options.recorded and (not failed or options.noStop): if runRecordedScripts(options): failed = True if options.perf and (not failed or options.noStop): if runPerfTests(options): failed = True print 'At end Recorded script status is :', failed if len(failedTests) > 0: log('+-' * 32) log('The following tests failed:') log('\n'.join(failedTests)) log('') return failed
134ce2a6ff32b988db479ade6fcf70a08aac23f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/134ce2a6ff32b988db479ade6fcf70a08aac23f5/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 4672, 3536, 4080, 702, 273, 1109, 1320, 1435, 4080, 702, 18, 25011, 2681, 225, 273, 1053, 4080, 702, 18, 11369, 273, 1053, 4080, 2774, 12, 2116, 13, 1083, 225, 6161, 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, 2774, 12, 2116, 4672, 3536, 4080, 702, 273, 1109, 1320, 1435, 4080, 702, 18, 25011, 2681, 225, 273, 1053, 4080, 702, 18, 11369, 273, 1053, 4080, 2774, 12, 2116, 13, 1083, 225, 6161, 471,...
a1,a2,a3 = ai[:3]
pi = RR.pi()
def elliptic_logarithm(self, embedding=None, precision=100, algorithm='pari'): """ Returns the elliptic logarithm of this elliptic curve point.
4af7cab0ea14839a0f0075ec0490074db7cd7fb4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/4af7cab0ea14839a0f0075ec0490074db7cd7fb4/ell_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 415, 549, 21507, 67, 1330, 31249, 12, 2890, 16, 15853, 33, 7036, 16, 6039, 33, 6625, 16, 4886, 2218, 1065, 77, 11, 4672, 3536, 2860, 326, 415, 549, 21507, 613, 31249, 434, 333, 415, 54...
self._stop = False
self._stop_server = False
def __init__(self, request_handler): threading.Thread.__init__(self) self._stop = False self.ready = threading.Event() request_handler.protocol_version = "HTTP/1.0" self.httpd = LoopbackHttpServer(('127.0.0.1', 0), request_handler) #print "Serving HTTP on %s port %s" % (self.httpd.server_name, # self.httpd.server_port) self.port = self.httpd.server_port
4566c71e0ea13acd519b732eda3cf9d70d3a62ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/4566c71e0ea13acd519b732eda3cf9d70d3a62ca/test_urllib2_localnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 67, 4176, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 6315, 5681, 67, 3567, 273, 1083, 365, 18, 1672, 273, 17254, 18, 1133, 1435, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 67, 4176, 4672, 17254, 18, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 6315, 5681, 67, 3567, 273, 1083, 365, 18, 1672, 273, 17254, 18, 1133, 1435, 59...
<button name="%s" string="send_email" type="action" icon="gtk-apply" context="{'user_id':%s, 'user_type':'existing', 'share_url': user%s_url}"/> """%(user.id, user.id, user.id, send_email_act_id, user.id, user.id)
<button name="do_send_email" string="Send Email" type="object" icon="gtk-apply" context="{'user_id':%s, 'user_type':'existing', 'share_url': user%s_url, 'share_model': %s, 'share_rec_id': %s }"/> """%(user.id, user.id, user.id, user.id, share_model, share_rec_id)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = context.get('existing_user_ids', []) new_user_ids = context.get('new_user_ids', []) _arch_lst = """<form string="Share Users"> <separator colspan="4" string="Step 4: Share User Details"/> """ _fields = result['fields'] send_email_act = data_obj._get_id(cr, uid, 'base', 'share_email_act') send_email_act_id = data_obj.browse(cr, uid, send_email_act, context=context).res_id
8166cedceb0edc65ee8718fcb28479e1c65e4a60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/8166cedceb0edc65ee8718fcb28479e1c65e4a60/wizard_share.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 16, 1717, 5414, 33, 8381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 16, 1717, 5414, 33, 8381, ...
self.params['PROPERTIES_TAB'] = '<a:tab caption="@@PROPERTIES@@">%s</a:tab>' % sProperties
self.params['PROPERTIES_TAB'] = \ '<a:tab caption="@@PROPERTIES@@">%s</a:tab>' % sProperties
def setParams(self): self.response.setHeader('Cache-Control', 'no-cache') sLang = self.request.getLang() user = self.session.user iUserRole = objectAccess.getAccess(self.item, user) readonly = (iUserRole==1) self.params = { 'ID': self.item.id, 'URI': self.request.serverVariables['SCRIPT_NAME'] + '/' + self.item.id, 'ICON': self.item.__image__, 'NAME': self.item.displayName.value, 'MODIFIED': date.Date(self.item.modified).format(DATES_FORMAT, sLang), 'MODIFIED_BY': self.item.modifiedBy, 'CONTENTCLASS': self.item.contentclass, 'PROPERTIES_TAB': '', 'EXTRA_TABS': '', 'SECURITY_TAB': self.getSecurity(self.item), 'UPDATE_DISABLED': self.getStringFromBoolean(readonly) } # inspect item properties sProperties = '' for attr_name in self.item.__props__: attr = getattr(self.item, attr_name) if isinstance(attr, datatypes.DataType): control, tab = self.getControlFromAttribute(attr_name, attr, readonly) sProperties += control self.params['EXTRA_TABS'] += tab self.params['PROPERTIES_TAB'] = '<a:tab caption="@@PROPERTIES@@">%s</a:tab>' % sProperties
9a2f8b99a4794ca66a515bfe9ca832718bd20756 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2504/9a2f8b99a4794ca66a515bfe9ca832718bd20756/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31705, 12, 2890, 4672, 365, 18, 2740, 18, 542, 1864, 2668, 1649, 17, 3367, 2187, 296, 2135, 17, 2493, 6134, 272, 7275, 273, 365, 18, 2293, 18, 588, 7275, 1435, 225, 729, 273, 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, 31705, 12, 2890, 4672, 365, 18, 2740, 18, 542, 1864, 2668, 1649, 17, 3367, 2187, 296, 2135, 17, 2493, 6134, 272, 7275, 273, 365, 18, 2293, 18, 588, 7275, 1435, 225, 729, 273, 365, 18, ...
sys.stdout.write("%s" % path) else: oldPath = oldPackage.getFile(fileId)[0] sys.stdout.write("%s (aka %s)" % (path, oldPath)) if not newVersion: print
dispStr = path if not newVersion: sys.stdout.write(dispStr + '\n')
def diff(repos, versionStr = None): try: state = SourceStateFromFile("SRS") except OSError: return if state.getVersion() == versions.NewVersion(): log.error("no versions have been committed") return if versionStr: versionStr = state.expandVersionStr(versionStr) pkgList = repos.findTrove(None, state.getName(), versionStr) if len(pkgList) > 1: log.error("%s specifies multiple versions" % versionStr) return oldPackage = pkgList[0] else: oldPackage = repos.getTrove(state.getName(), state.getVersion(), None) result = update.buildLocalChanges(repos, [(state, oldPackage, versions.NewVersion())], flags = update.IGNOREUGIDS) if not result: return (changeSet, ((isDifferent, newState),)) = result if not isDifferent: return packageChanges = changeSet.iterNewPackageList() pkgCs = packageChanges.next() assert(util.assertIteratorAtEnd(packageChanges)) for (fileId, path, newVersion) in pkgCs.getNewFileList(): print "%s: new" % path for (fileId, path, newVersion) in pkgCs.getChangedFileList(): if not path: path = oldPackage.getFile(fileId)[0] sys.stdout.write("%s" % path) else: oldPath = oldPackage.getFile(fileId)[0] sys.stdout.write("%s (aka %s)" % (path, oldPath)) if not newVersion: print continue sys.stdout.write(": changed\n") csInfo = changeSet.getFileChange(fileId) for item in files.fieldsChanged(csInfo): print " %s" % item if files.contentsChanged(csInfo): (contType, contents) = changeSet.getFileContents(fileId) if contType == changeset.ChangedFileTypes.diff: lines = contents.get().readlines() str = " " + " ".join(lines) print print str print for fileId in pkgCs.getOldFileList(): path = oldPackage.getFile(fileId)[0] print "%s: removed" % path
7830d1575c55710b6d860ce5307666faff7610d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/7830d1575c55710b6d860ce5307666faff7610d9/checkin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 15564, 16, 1177, 1585, 273, 599, 4672, 775, 30, 919, 273, 4998, 1119, 13087, 2932, 10090, 55, 7923, 1335, 10002, 30, 327, 225, 309, 919, 18, 588, 1444, 1435, 422, 5244, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 15564, 16, 1177, 1585, 273, 599, 4672, 775, 30, 919, 273, 4998, 1119, 13087, 2932, 10090, 55, 7923, 1335, 10002, 30, 327, 225, 309, 919, 18, 588, 1444, 1435, 422, 5244, 18, 1...
methodresponse: true to create a methodResponse packet
methodresponse: true to create a methodResponse packet. If this option is used with a tuple, the tuple must be a singleton (i.e. it can contain only one element).
def dumps(params, methodname=None, methodresponse=None, encoding=None): """data [,options] -> marshalled data Convert a tuple or a fault object to an XML-RPC request (or response, if the methodsresponse option is used). In addition to the data object, the following options can be given as keyword arguments: methodname: the method name for a methodCall packet methodresponse: true to create a methodResponse packet encoding: the packet encoding (default is UTF-8) All 8-bit strings in the data structure are assumed to use the packet encoding. Unicode strings are automatically converted, as necessary. """ assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" if not encoding: encoding = "utf-8" m = Marshaller(encoding) data = m.dumps(params) if encoding != "utf-8": xmlheader = "<?xml version='1.0' encoding=%s?>\n" % repr(encoding) else: xmlheader = "<?xml version='1.0'?>\n" # utf-8 is default # standard XML-RPC wrappings if methodname: # a method call if not isinstance(methodname, StringType): methodname = methodname.encode(encoding) data = ( xmlheader, "<methodCall>\n" "<methodName>", methodname, "</methodName>\n", data, "</methodCall>\n" ) elif methodresponse or isinstance(params, Fault): # a method response data = ( xmlheader, "<methodResponse>\n", data, "</methodResponse>\n" ) else: return data # return as is return string.join(data, "")
cd906440fbd0694e165a09262268a608df82deeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cd906440fbd0694e165a09262268a608df82deeb/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6711, 12, 2010, 16, 707, 529, 33, 7036, 16, 707, 2740, 33, 7036, 16, 2688, 33, 7036, 4672, 3536, 892, 306, 16, 2116, 65, 317, 10893, 1259, 501, 225, 4037, 279, 3193, 578, 279, 12530, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6711, 12, 2010, 16, 707, 529, 33, 7036, 16, 707, 2740, 33, 7036, 16, 2688, 33, 7036, 4672, 3536, 892, 306, 16, 2116, 65, 317, 10893, 1259, 501, 225, 4037, 279, 3193, 578, 279, 12530, ...
if (f != 'Config') and (f != '.svn'):
if (f != 'Config') and (f != '.git'):
def GetDirs(path, dirs): dirs[path] = [] filelist = os.listdir(path) for f in filelist: fullname = path + f if os.path.isdir(fullname): if (f != 'Config') and (f != '.svn'): fullname = fullname + '/' GetDirs(fullname, dirs) else: dirs[path].append(f)
2572f59a3503849836aeb2ce3fe3748b9335620c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1030/2572f59a3503849836aeb2ce3fe3748b9335620c/make_luaui_nsh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 9872, 12, 803, 16, 7717, 4672, 7717, 63, 803, 65, 273, 5378, 26204, 273, 1140, 18, 1098, 1214, 12, 803, 13, 364, 284, 316, 26204, 30, 13321, 273, 589, 397, 284, 309, 1140, 18, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 9872, 12, 803, 16, 7717, 4672, 7717, 63, 803, 65, 273, 5378, 26204, 273, 1140, 18, 1098, 1214, 12, 803, 13, 364, 284, 316, 26204, 30, 13321, 273, 589, 397, 284, 309, 1140, 18, 8...
patchname = dogitpatch(patchname, gitpatches)
patchname = dogitpatch(patchname, gitpatches, cwd=cwd)
def patch(patchname, ui, strip=1, cwd=None): """apply the patch <patchname> to the working directory. a list of patched files is returned""" (dopatch, gitpatches) = readgitpatch(patchname) files = {} fuzz = False if dopatch: if dopatch == 'filter': patchname = dogitpatch(patchname, gitpatches) patcher = util.find_in_path('gpatch', os.environ.get('PATH', ''), 'patch') args = [] if cwd: args.append('-d %s' % util.shellquote(cwd)) fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip, util.shellquote(patchname))) if dopatch == 'filter': False and os.unlink(patchname) for line in fp: line = line.rstrip() ui.note(line + '\n') if line.startswith('patching file '): pf = util.parse_patch_output(line) printed_file = False files.setdefault(pf, (None, None)) elif line.find('with fuzz') >= 0: fuzz = True if not printed_file: ui.warn(pf + '\n') printed_file = True ui.warn(line + '\n') elif line.find('saving rejects to file') >= 0: ui.warn(line + '\n') elif line.find('FAILED') >= 0: if not printed_file: ui.warn(pf + '\n') printed_file = True ui.warn(line + '\n') code = fp.close() if code: raise util.Abort(_("patch command failed: %s") % util.explain_exit(code)[0]) for gp in gitpatches: files[gp.path] = (gp.op, gp) return (files, fuzz)
8021fe818edcb3ab3beaca6584497128f740649a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/8021fe818edcb3ab3beaca6584497128f740649a/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2272, 529, 16, 5915, 16, 2569, 33, 21, 16, 7239, 33, 7036, 4672, 3536, 9010, 326, 4729, 411, 2272, 529, 34, 358, 326, 5960, 1867, 18, 279, 666, 434, 25786, 1390, 353, 2106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2272, 529, 16, 5915, 16, 2569, 33, 21, 16, 7239, 33, 7036, 4672, 3536, 9010, 326, 4729, 411, 2272, 529, 34, 358, 326, 5960, 1867, 18, 279, 666, 434, 25786, 1390, 353, 2106, ...
if not expectedToWork:
if not expect_success:
def tryProtocolCombo (server_protocol, client_protocol, expectedToWork, certsreqs=None):
f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
try:
try:
def edge_coloring(g, value_only=False, vizing=False, hex_colors=False, log=0): r""" Properly colors the edges of a graph. See the URL http://en.wikipedia.org/wiki/Edge_coloring for further details on edge coloring. INPUT: - ``g`` -- a graph. - ``value_only`` -- (default: ``False``): - When set to ``True``, only the chromatic index is returned. - When set to ``False``, a partition of the edge set into matchings is returned if possible. - ``vizing`` -- (default: ``False``): - When set to ``True``, tries to find a `\Delta + 1`-edge-coloring, where `\Delta` is equal to the maximum degree in the graph. - When set to ``False``, tries to find a `\Delta`-edge-coloring, where `\Delta` is equal to the maximum degree in the graph. If impossible, tries to find and returns a `\Delta + 1`-edge-coloring. This implies that ``value_only=False``. - ``hex_colors`` -- (default: ``False``) when set to ``True``, the partition returned is a dictionary whose keys are colors and whose values are the color classes (ideal for plotting). - ``log`` -- (default: ``0``) as edge-coloring is an `NP`-complete problem, this function may take some time depending on the graph. Use ``log`` to define the level of verbosity you wantfrom the linear program solver. By default ``log=0``, meaning that there will be no message printed by the solver. OUTPUT: In the following, `\Delta` is equal to the maximum degree in the graph ``g``. - If ``vizing=True`` and ``value_only=False``, return a partition of the edge set into `\Delta + 1` matchings. - If ``vizing=False`` and ``value_only=True``, return the chromatic index. - If ``vizing=False`` and ``value_only=False``, return a partition of the edge set into the minimum number of matchings. - If ``vizing=True`` and ``value_only=True``, should return something, but mainly you are just trying to compute the maximum degree of the graph, and this is not the easiest way. By Vizing's theorem, a graph has a chromatic index equal to `\Delta` or to `\Delta + 1`. EXAMPLE:: sage: from sage.graphs.graph_coloring import edge_coloring sage: g = graphs.PetersenGraph() sage: edge_coloring(g, value_only=True) # optional - requires GLPK or CBC 4 Complete graphs are colored using the linear-time round-robin coloring:: sage: from sage.graphs.graph_coloring import edge_coloring sage: len(edge_coloring(graphs.CompleteGraph(20))) 19 """ from sage.numerical.mip import MixedIntegerLinearProgram from sage.plot.colors import rainbow if g.is_clique(): if value_only: return g.order() if g.order() % 2 == 0 else g.order() + 1 vertices = g.vertices() r = round_robin(g.order()) classes = [[] for v in g] if g.order() % 2 == 0 and not vizing: classes.pop() for (u, v, c) in r.edge_iterator(): classes[c].append((vertices[u], vertices[v])) if hex_colors: return zip(rainbow(len(classes)), classes) else: return classes p = MixedIntegerLinearProgram(maximization=True) color = p.new_variable(dim=2) obj = {} k = max(g.degree()) # reorders the edge if necessary... R = lambda x: x if (x[0] <= x[1]) else (x[1], x[0], x[2]) # Vizing's coloring uses Delta + 1 colors if vizing: value_only = False k += 1 # A vertex can not have two incident edges with the same color. [p.add_constraint( sum([color[R(e)][i] for e in g.edges_incident(v)]), max=1) for v in g.vertex_iterator() for i in xrange(k)] # an edge must have a color [p.add_constraint(sum([color[R(e)][i] for i in xrange(k)]), max=1, min=1) for e in g.edge_iterator()] # anything is good as an objective value as long as it is satisfiable e = g.edge_iterator().next() p.set_objective(color[R(e)][0]) p.set_binary(color) try: if value_only: p.solve(objective_only=True, log=log) else: chi = p.solve(log=log) except: if value_only: return k + 1 else: # if the coloring with Delta colors fails, tries Delta + 1 return edge_coloring(g, vizing=True, hex_colors=hex_colors, log=log) if value_only: return k # Builds the color classes color = p.get_values(color) classes = [[] for i in xrange(k)] [classes[i].append(e) for e in g.edge_iterator() for i in xrange(k) if color[R(e)][i] == 1] # if needed, builds a dictionary from the color classes adding colors if hex_colors: return dict(zip(rainbow(len(classes)), classes)) else: return classes
a468d77074137cba0ddfb241121c56cde855518e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a468d77074137cba0ddfb241121c56cde855518e/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 3266, 310, 12, 75, 16, 460, 67, 3700, 33, 8381, 16, 331, 6894, 33, 8381, 16, 3827, 67, 9724, 33, 8381, 16, 613, 33, 20, 4672, 436, 8395, 1186, 457, 715, 5740, 326, 5231, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 3266, 310, 12, 75, 16, 460, 67, 3700, 33, 8381, 16, 331, 6894, 33, 8381, 16, 3827, 67, 9724, 33, 8381, 16, 613, 33, 20, 4672, 436, 8395, 1186, 457, 715, 5740, 326, 5231, ...
self.program_info = None
def __init__(self, item): self.item = item self.video_path = item.get_filename() if self.video_path is None: self.program_info = None return # add a random string to the filename to ensure it's unique. Two # videos can have the same basename if they're in different # directories. thumbnail_filename = '%s.%s.png' % (os.path.basename(self.video_path), util.random_string(5)) self.thumbnail_path = os.path.join(thumbnail_directory(), thumbnail_filename) self.program_info = None if hasattr(app, 'in_unit_tests'): return videopath = fileutil.expand_filename(self.video_path) thumbnailpath = fileutil.expand_filename(self.thumbnail_path) command_line, env = movie_data_program_info(videopath, thumbnailpath) self.program_info = (command_line, env)
1ba4c98f96fe2ceb6deb3abf18c2384f10813f44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/1ba4c98f96fe2ceb6deb3abf18c2384f10813f44/moviedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 761, 4672, 365, 18, 1726, 273, 761, 365, 18, 9115, 67, 803, 273, 761, 18, 588, 67, 3459, 1435, 309, 365, 18, 9115, 67, 803, 353, 599, 30, 327, 468, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 761, 4672, 365, 18, 1726, 273, 761, 365, 18, 9115, 67, 803, 273, 761, 18, 588, 67, 3459, 1435, 309, 365, 18, 9115, 67, 803, 353, 599, 30, 327, 468, 5...
preferences = self.model.get_value(selection, 5) if preferences: self.prefs_button.set_sensitive(True) else: self.prefs_button.set_sensitive(False) descr_text = self.model.get_value(selection, 2)
if selection: preferences = self.model.get_value(selection, 5) if preferences: self.prefs_button.set_sensitive(True) else: self.prefs_button.set_sensitive(False) descr_text = self.model.get_value(selection, 2)
def OnSelect(self, tree): """ When an Extension is selected, enables/disables the preferences button according to the reported Extension capabilities and updates the description label. Parameters: tree -- GTKTreeView holding the Extensions's representation. """ selection = self.tree.get_selection().get_selected()[1] preferences = self.model.get_value(selection, 5) if preferences: self.prefs_button.set_sensitive(True) else: self.prefs_button.set_sensitive(False) descr_text = self.model.get_value(selection, 2) self.description.set_text(descr_text)
4c51c6f56b0c2da9477f7d84605d4f52760567c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10033/4c51c6f56b0c2da9477f7d84605d4f52760567c3/ExtensionManagerDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3391, 12, 2890, 16, 2151, 4672, 3536, 5203, 392, 10021, 353, 3170, 16, 19808, 19, 2251, 1538, 326, 12750, 3568, 4888, 358, 326, 14010, 10021, 12359, 471, 4533, 326, 2477, 1433, 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, 2755, 3391, 12, 2890, 16, 2151, 4672, 3536, 5203, 392, 10021, 353, 3170, 16, 19808, 19, 2251, 1538, 326, 12750, 3568, 4888, 358, 326, 14010, 10021, 12359, 471, 4533, 326, 2477, 1433, 18, ...
if True: import pydb pydb.debugger()
def runUnusedClasses(self, parts, packages, variants): if not self._config.get("log/classes-unused", False): return
47977568036ebc88899e0c6ce932c66f12bc746a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/47977568036ebc88899e0c6ce932c66f12bc746a/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 21106, 4818, 12, 2890, 16, 2140, 16, 5907, 16, 12935, 4672, 309, 486, 365, 6315, 1425, 18, 588, 2932, 1330, 19, 4701, 17, 14375, 3113, 1083, 4672, 327, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 21106, 4818, 12, 2890, 16, 2140, 16, 5907, 16, 12935, 4672, 309, 486, 365, 6315, 1425, 18, 588, 2932, 1330, 19, 4701, 17, 14375, 3113, 1083, 4672, 327, 2, -100, -100, -100, -100, ...
sage: n = 100000000 + randint(0,100000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
sage: n = 1000000000 + randint(0,1000000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
def number_of_partitions(n,k=None, algorithm='default'): r""" Returns the size of partitions_list(n,k). INPUT: n -- an integer k -- (default: None); if specified, instead returns the cardinality of the set of all (unordered) partitions of the positive integer n into sums with k summands. algorithm -- (default: 'default') 'default' -- if k is given use Gap. Otherwise, on x86 when n > 3000, use 'bober' On non x86 use 'pari'. 'bober' -- use Jonathon Bober's implementation 'gap' -- use GAP (VERY *slow*) 'pari' -- use PARI. Speed seems the same as GAP until $n$ is in the thousands, in which case PARI is faster. *But* PARI has a bug, e.g., on 64-bit Linux PARI-2.3.2 outputs numbpart(147007)%1000 as 536, but it should be 533!. So do not use this option. IMPLEMENTATION: Wraps GAP's NrPartitions or PARI's numbpart function. Use the function \code{partitions(n)} to return a generator over all partitions of $n$. It is possible to associate with every partition of the integer n a conjugacy class of permutations in the symmetric group on n points and vice versa. Therefore p(n) = NrPartitions(n) is the number of conjugacy classes of the symmetric group on n points. EXAMPLES: sage: v = list(partitions(5)); v [(1, 1, 1, 1, 1), (1, 1, 1, 2), (1, 2, 2), (1, 1, 3), (2, 3), (1, 4), (5,)] sage: len(v) 7 sage: number_of_partitions(5, algorithm='gap') 7 sage: number_of_partitions(5, algorithm='pari') 7 sage: number_of_partitions(5, algorithm='bober') 7 The input must be a nonnegative integer or a ValueError is raised. sage: number_of_partitions(-5) Traceback (most recent call last): ... ValueError: n (=-5) must be a nonnegative integer sage: number_of_partitions(10,2) 5 sage: number_of_partitions(10) 42 sage: number_of_partitions(3) 3 sage: number_of_partitions(10) 42 sage: number_of_partitions(3, algorithm='pari') 3 sage: number_of_partitions(10, algorithm='pari') 42 sage: number_of_partitions(40) 37338 sage: number_of_partitions(100) 190569292 sage: number_of_partitions(100000) 27493510569775696512677516320986352688173429315980054758203125984302147328114964173055050741660736621590157844774296248940493063070200461792764493033510116079342457190155718943509725312466108452006369558934464248716828789832182345009262853831404597021307130674510624419227311238999702284408609370935531629697851569569892196108480158600569421098519 A generating function for p(n) is given by the reciprocal of Euler's function: \[ \sum_{n=0}^\infty p(n)x^n = \prod_{k=1}^\infty \left(\frac {1}{1-x^k} \right). \] We use SAGE to verify that the first several coefficients do instead agree: sage: q = PowerSeriesRing(QQ, 'q', default_prec=9).gen() sage: prod([(1-q^k)^(-1) for k in range(1,9)]) ## partial product of 1 + q + 2*q^2 + 3*q^3 + 5*q^4 + 7*q^5 + 11*q^6 + 15*q^7 + 22*q^8 + O(q^9) sage: [number_of_partitions(k) for k in range(2,10)] [2, 3, 5, 7, 11, 15, 22, 30] REFERENCES: http://en.wikipedia.org/wiki/Partition_%28number_theory%29 TESTS: sage: n = 500 + randint(0,500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1500 + randint(0,1500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True Another consistency test for n up to 500: sage: len([n for n in [1..500] if number_of_partitions(n) != number_of_partitions(n,algorithm='pari')]) 0 """ n = ZZ(n) if n < 0: raise ValueError, "n (=%s) must be a nonnegative integer"%n elif n == 0: return ZZ(1) global first_warning PROCESSOR = os.uname()[-1] bober_is_good = 'x86' in PROCESSOR if k is not None: algorithm = 'gap' elif algorithm == 'default': if bober_is_good: algorithm = 'bober' elif PROCESSOR in ['x86', 'Power Macintosh']: algorithm = 'pari' else: algorithm = 'gap' if algorithm == 'gap': if k is None: ans=gap.eval("NrPartitions(%s)"%(ZZ(n))) else: ans=gap.eval("NrPartitions(%s,%s)"%(ZZ(n),ZZ(k))) return ZZ(ans) if k is not None: raise ValueError, "only the GAP algorithm works if k is specified." if algorithm == 'bober': if not bober_is_good: if first_warning: print "*WARNING*: bober's implementation is broken on this platform or this size of n." first_warning=False return partitions_ext.number_of_partitions(n) elif algorithm == 'pari': if n > 3000 and 'x86_64' in PROCESSOR: if first_warning: print "*WARNING*: Pari's numbpart is very buggy on x86_64 (fixed in svn, so don't report to pari-dev)" first_warning = False return ZZ(pari(ZZ(n)).numbpart()) raise ValueError, "unknown algorithm '%s'"%algorithm
133ed5d488fcc631795027cd415e935f304eaad7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/133ed5d488fcc631795027cd415e935f304eaad7/combinat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 792, 67, 21275, 12, 82, 16, 79, 33, 7036, 16, 4886, 2218, 1886, 11, 4672, 436, 8395, 2860, 326, 963, 434, 10060, 67, 1098, 12, 82, 16, 79, 2934, 225, 12943, 30, 290, 1493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 792, 67, 21275, 12, 82, 16, 79, 33, 7036, 16, 4886, 2218, 1886, 11, 4672, 436, 8395, 2860, 326, 963, 434, 10060, 67, 1098, 12, 82, 16, 79, 2934, 225, 12943, 30, 290, 1493, ...
return (self, nextPath)
if nextRes is None: return (nextRes, nextPath) return (CustomizingResource(nextRes, self.forWho), nextPath)
def finishLocating((nextRes, nextPath)): custom = ixmantissa.ICustomizable(nextRes, None) if custom is not None: return (custom.customizeFor(self.forWho), nextPath) self.currentResource = nextRes return (self, nextPath)
a4368c828ff98659da59808428ed2fed5d98dc09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6980/a4368c828ff98659da59808428ed2fed5d98dc09/publicweb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 1333, 1776, 12443, 4285, 607, 16, 1024, 743, 3719, 30, 1679, 273, 8288, 81, 970, 21269, 18, 2871, 1192, 6934, 12, 4285, 607, 16, 599, 13, 309, 1679, 353, 486, 599, 30, 327, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 1333, 1776, 12443, 4285, 607, 16, 1024, 743, 3719, 30, 1679, 273, 8288, 81, 970, 21269, 18, 2871, 1192, 6934, 12, 4285, 607, 16, 599, 13, 309, 1679, 353, 486, 599, 30, 327, 261, ...
tessparams = ['tesseract', tmp.name, tmpTxt.name.replace(".txt", "")
tessparams = ['tesseract', tmp.name, tmpTxt.name.replace(".txt", "")]
def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True ): self.logger.debug("create tmp tif") tmp = tempfile.NamedTemporaryFile(suffix=".tif") self.logger.debug("create tmp txt") tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") self.logger.debug("save tiff") self.image.save(tmp.name, 'TIFF')
497821fb18a93cdb356d5d1e6d3ae215b5cc1915 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/497821fb18a93cdb356d5d1e6d3ae215b5cc1915/captcha.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 88, 403, 264, 12, 2890, 16, 7931, 33, 8381, 16, 6815, 33, 5510, 16, 12400, 33, 5510, 16, 18966, 33, 5510, 262, 30, 365, 18, 4901, 18, 4148, 2932, 2640, 1853, 268, 430, 7923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 88, 403, 264, 12, 2890, 16, 7931, 33, 8381, 16, 6815, 33, 5510, 16, 12400, 33, 5510, 16, 18966, 33, 5510, 262, 30, 365, 18, 4901, 18, 4148, 2932, 2640, 1853, 268, 430, 7923...
ci.dte = updated
ci.date = updated
def check(self): """Retrieve and parse a feed""" #try: txt = None fp = feedparser.parse(self._feed.url)
7a1829675dac109ecc780e97ec672eeaef79b6d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2189/7a1829675dac109ecc780e97ec672eeaef79b6d3/feedchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 3536, 5767, 471, 1109, 279, 4746, 8395, 468, 698, 30, 6463, 273, 599, 4253, 273, 4746, 4288, 18, 2670, 12, 2890, 6315, 7848, 18, 718, 13, 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, 866, 12, 2890, 4672, 3536, 5767, 471, 1109, 279, 4746, 8395, 468, 698, 30, 6463, 273, 599, 4253, 273, 4746, 4288, 18, 2670, 12, 2890, 6315, 7848, 18, 718, 13, 2, -100, -100, -100, -100...
raise ValueError, _('default value for ' + \ 'DateHTMLProperty must be either DateHTMLProperty ' + \
raise ValueError, _('default value for ' 'DateHTMLProperty must be either DateHTMLProperty '
def field(self, size = 30, default = None): ''' Render a form edit field for the property
2721f8df9c4c4d3ee090797279eb990d57d383a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2721f8df9c4c4d3ee090797279eb990d57d383a9/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 12, 2890, 16, 963, 273, 5196, 16, 805, 273, 599, 4672, 9163, 6987, 279, 646, 3874, 652, 364, 326, 1272, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 12, 2890, 16, 963, 273, 5196, 16, 805, 273, 599, 4672, 9163, 6987, 279, 646, 3874, 652, 364, 326, 1272, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif opt in ('-?', '--help'):
elif opt in ('-v', '--verbose'): verbosity += 1 elif opt in ('-?', '-h', '--help'):
def main(): output=None copyfunc=None creator=None plist=None nib=None resources=[] SHORTOPTS = "o:ln:r:p:c:?" LONGOPTS=("output=", "link", "nib=", "resource=", "plist=", "creator=", "help") try: options, args = getopt.getopt(sys.argv[1:], SHORTOPTS, LONGOPTS) except getopt.error: usage() if len(args) != 1: usage() for opt, arg in options: if opt in ('-o', '--output'): output = arg elif opt in ('-l', '--link'): copyfunc = os.symlink elif opt in ('-n', '--nib'): nib = arg elif opt in ('-r', '--resource'): resources.append(arg) elif opt in ('-c', '--creator'): creator = arg elif opt in ('-p', '--plist'): plist = arg elif opt in ('-?', '--help'): usage() buildappbundle(args[0], output=output, copyfunc=copyfunc, creator=creator, plist=plist, resources=resources)
e9d33f103e82fa58ed5906c6ccf3ccd9d68cdd17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e9d33f103e82fa58ed5906c6ccf3ccd9d68cdd17/buildappbundle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 876, 33, 7036, 1610, 644, 33, 7036, 11784, 33, 7036, 21074, 33, 7036, 28421, 33, 7036, 2703, 33, 8526, 20079, 15620, 55, 273, 315, 83, 30, 2370, 30, 86, 30, 84, 30, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 876, 33, 7036, 1610, 644, 33, 7036, 11784, 33, 7036, 21074, 33, 7036, 28421, 33, 7036, 2703, 33, 8526, 20079, 15620, 55, 273, 315, 83, 30, 2370, 30, 86, 30, 84, 30, 71, ...
previous_reboots = glob.glob('reboot*') if previous_reboots: previous_reboots = [int(i[len('reboot'):]) for i in previous_reboots] boot = 1 + max(previous_reboots) else: boot = 1
def before_each_step(): # make separate directories for each step: # if files exist here, this is not the first step. # this is a safe assumption because we always create at least one file if not glob.glob('*'): _before_each_step() # first step goes in cwd return previous_reboots = glob.glob('reboot*') if previous_reboots: previous_reboots = [int(i[len('reboot'):]) for i in previous_reboots] boot = 1 + max(previous_reboots) else: boot = 1 os.mkdir('reboot%d' % boot) pwd = os.getcwd() try: os.chdir('reboot%d' % boot) _before_each_step() finally: os.chdir(pwd)
244132028450511fd19cc5ed4c9d1eeab0e56992 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/244132028450511fd19cc5ed4c9d1eeab0e56992/sysinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 67, 13798, 67, 4119, 13332, 468, 1221, 9004, 6402, 364, 1517, 2235, 30, 468, 309, 1390, 1005, 2674, 16, 333, 353, 486, 326, 1122, 2235, 18, 468, 333, 353, 279, 4183, 24743, 2724, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 67, 13798, 67, 4119, 13332, 468, 1221, 9004, 6402, 364, 1517, 2235, 30, 468, 309, 1390, 1005, 2674, 16, 333, 353, 486, 326, 1122, 2235, 18, 468, 333, 353, 279, 4183, 24743, 2724, ...
if api.getFocusObject().role not in (controlTypes.ROLE_MENUITEM,controlTypes.ROLE_POPUPMENU):
focusObject=api.getFocusObject() if focusObject.role not in (controlTypes.ROLE_MENUITEM,controlTypes.ROLE_POPUPMENU) or focusObject!=oldFocus:
def event_menuEnd(self): if self.IAccessibleRole in (IAccessibleHandler.ROLE_SYSTEM_MENUITEM,IAccessibleHandler.ROLE_SYSTEM_MENUPOPUP) and self!=api.getFocusObject(): return api.processPendingEvents() if api.getFocusObject().role not in (controlTypes.ROLE_MENUITEM,controlTypes.ROLE_POPUPMENU): return obj=api.findObjectWithFocus() IAccessibleHandler.focus_manageEvent(obj)
52862ebaa31e41489dc75de534938dfe9e5e6097 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/52862ebaa31e41489dc75de534938dfe9e5e6097/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 5414, 1638, 12, 2890, 4672, 309, 365, 18, 45, 10451, 2996, 316, 261, 45, 10451, 1503, 18, 16256, 67, 14318, 67, 29227, 12674, 16, 45, 10451, 1503, 18, 16256, 67, 14318, 67, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 5414, 1638, 12, 2890, 4672, 309, 365, 18, 45, 10451, 2996, 316, 261, 45, 10451, 1503, 18, 16256, 67, 14318, 67, 29227, 12674, 16, 45, 10451, 1503, 18, 16256, 67, 14318, 67, 29...
return False
def InstallService(self, entry): '''Install Service for entry''' self.CondPrint('verbose', "Installing Service %s" % (entry.get('name'))) if entry.attrib['status'] == 'off': if self.setup['dryrun']: print "Disabling service %s" % (entry.get('name')) return False else: cmdrc = system("update-rc.d -f %s remove" % entry.get('name')) else: if self.setup['dryrun']: print "Enabling service %s" % (entry.attrib['name']) return False else: cmdrc = system("update-rc.d %s defaults" % (entry.attrib['name'])) if cmdrc: return False return True
97f27837c96643ff5a16a35c1871a884eee89d93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/97f27837c96643ff5a16a35c1871a884eee89d93/Debian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 1179, 12, 2890, 16, 1241, 4672, 9163, 6410, 1956, 364, 1241, 26418, 365, 18, 12441, 5108, 2668, 11369, 2187, 315, 6410, 310, 1956, 738, 87, 6, 738, 261, 4099, 18, 588, 2668, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 1179, 12, 2890, 16, 1241, 4672, 9163, 6410, 1956, 364, 1241, 26418, 365, 18, 12441, 5108, 2668, 11369, 2187, 315, 6410, 310, 1956, 738, 87, 6, 738, 261, 4099, 18, 588, 2668, 529, ...
global buildscriptFile
global buildscriptFile, fromAddr, mailtoAddr, alertAddr, adminAddr, defaultDomain, defaultRsyncServer
def main(): global buildscriptFile parser = OptionParser(usage="%prog [options] buildName", version="%prog 1.2") parser.add_option("-t", "--toAddr", action="store", type="string", dest="toAddr", default="buildreport", help="Where to mail script reports\n" " [default] buildreport " + "(at) osafoundation " + "(dot) org") parser.add_option("-p", "--project", action="store", type="string", dest="project", default="chandler", help="Name of script to use (without .py extension)\n" "[default] chandler") parser.add_option("-o", "--output", action="store", type="string", dest="outputDir", default=os.path.join(os.environ['HOME'],"output"), help="Name of temp output directory\n" " [default] ~/output") parser.add_option("-a", "--alert", action="store", type="string", dest="alertAddr", default="buildman", help="E-mail to notify on build errors \n" " [default] buildman " + "(at) osafoundation " + "(dot) org") (options, args) = parser.parse_args() if len(args) != 1: parser.print_help() parser.error("You must at least provide a name for your build") buildName = args[0] fromAddr += "@" + defaultDomain prevStartInt = 0 curDir = os.path.abspath(os.getcwd()) buildscriptFile = os.path.join("buildscripts", options.project + ".py") outputDir = os.path.abspath(options.outputDir) if not os.path.exists(outputDir): os.mkdir(outputDir) if not os.path.exists(buildDir): os.mkdir(buildDir) path = os.environ.get('PATH', os.environ.get('path')) cvsProgram = hardhatutil.findInPath(path, "cvs") print "cvs =", cvsProgram rsyncProgram = hardhatutil.findInPath(path, "rsync") print "rsync =", rsyncProgram clobber = go = 1 if os.path.exists(stopFile): os.remove(stopFile) startInt = int(time.time()) startTime = str(startInt) os.chdir(curDir) nowString = time.strftime("%Y-%m-%d %H:%M:%S") buildVersion = hardhatutil.RemovePunctuation(nowString) print "Starting:", nowString, buildVersion log = open(logFile, "w") log.write("Start: " + nowString + "\n") try: # load (or reload) the buildscript file for the project mod = hardhatutil.ModuleFromFile(buildscriptFile, "buildscript") treeName = mod.treeName SendMail(fromAddr, options.toAddr, startTime, buildName, "building", treeName, None) ret = mod.Start(hardhatFile, buildDir, "-D'"+ nowString + "'", buildVersion, clobber, log) except TinderbuildError, e: print e print "Tinderbuild: Build failed" log.write("Tinderbuild: Build failed\n") status = "build_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, options.alertAddr, startTime, buildName, "The build failed", treeName, logContents) log = open(logFile, "w") except Exception, e: print e print "Build failed" log.write("Build failed\n") status = "build_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, options.alertAddr, startTime, buildName, "The build failed", treeName, logContents) log = open(logFile, "w") else: if ret == "success-nochanges": print "There were no changes, and the tests were successful" log.write("There were no changes, and the tests were successful\n") status = "success" elif ret == "success-changes": print "There were changes, and the tests were successful" log.write("There were changes, and the tests were successful\n") status = "success" newDir = os.path.join(outputDir, buildVersion) print "Renaming " + os.path.join(buildDir, "output", buildVersion) + " to " + newDir log.write("Renaming " + os.path.join(buildDir, "output", buildVersion) + " to " + newDir + "\n") os.rename(os.path.join(buildDir, "output", buildVersion), newDir) if os.path.exists(outputDir+os.sep+"index.html"): os.remove(outputDir+os.sep+"index.html") if os.path.exists(outputDir+os.sep+"time.js"): os.remove(outputDir+os.sep+"time.js") print "Calling RotateDirectories" log.write("Calling RotateDirectories\n") RotateDirectories(outputDir) print "Calling CreateIndex with " + newDir log.write("Calling CreateIndex with " + newDir + "\n") CreateIndex(outputDir, buildVersion, nowString, buildName) buildNameNoSpaces = buildName.replace(" ", "") print "Rsyncing..." outputList = hardhatutil.executeCommandReturnOutputRetry( [rsyncProgram, "-e", "ssh", "-avzp", "--delete", outputDir + os.sep, "192.168.101.46:continuous/" + buildNameNoSpaces]) hardhatutil.dumpOutputList(outputList, log) elif ret == "build_failed": print "The build failed" log.write("The build failed\n") status = "build_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, options.alertAddr, startTime, buildName, "The build failed", treeName, logContents) log = open(logFile, "w") elif ret == "test_failed": print "Unit tests failed" log.write("Unit tests failed\n") status = "test_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, options.alertAddr, startTime, buildName, "Unit tests failed", treeName, logContents) log = open(logFile, "w") else: print "There were no changes" log.write("There were no changes in CVS\n") status = "not_running" log.write( "End = " + time.strftime("%Y-%m-%d %H:%M:%S") + "\n") log.close() log = open(logFile, "r") logContents = log.read() log.close() nowTime = str(int(time.time())) SendMail(fromAddr, options.toAddr, startTime, buildName, status, treeName, logContents)
b2c0c7996e95b491076026bd941d2c86fa18eb53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b2c0c7996e95b491076026bd941d2c86fa18eb53/tinderbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 1361, 4263, 812, 16, 628, 3178, 16, 4791, 869, 3178, 16, 6881, 3178, 16, 3981, 3178, 16, 805, 3748, 16, 805, 54, 8389, 2081, 225, 2082, 273, 18862, 12, 9167, 11613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2552, 1361, 4263, 812, 16, 628, 3178, 16, 4791, 869, 3178, 16, 6881, 3178, 16, 3981, 3178, 16, 805, 3748, 16, 805, 54, 8389, 2081, 225, 2082, 273, 18862, 12, 9167, 11613, ...
self.setinput(NORMS.get(v_norm))
self.setstd(NORMS.get(v_norm))
def init_settings(self): (v_norm, v_input, v_clist, v_dev) = config.TV_SETTINGS.split() v_norm = string.upper(v_norm) self.setinput(NORMS.get(v_norm))
96ae91396918a113e34228b3ff34f7815582f111 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/96ae91396918a113e34228b3ff34f7815582f111/v4l2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4272, 12, 2890, 4672, 261, 90, 67, 7959, 16, 331, 67, 2630, 16, 331, 67, 830, 376, 16, 331, 67, 5206, 13, 273, 642, 18, 15579, 67, 19428, 18, 4939, 1435, 331, 67, 7959, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4272, 12, 2890, 4672, 261, 90, 67, 7959, 16, 331, 67, 2630, 16, 331, 67, 830, 376, 16, 331, 67, 5206, 13, 273, 642, 18, 15579, 67, 19428, 18, 4939, 1435, 331, 67, 7959, 2...
started.wait();
started.wait();
def run(): with JSContext(g) as ctxt: ctxt.eval(""" started.wait(); for (i=0; i<10; i++) { sleep(100); } finished.release(); """)
39238494c6380764c75b46d3d726c011640ecf54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5828/39238494c6380764c75b46d3d726c011640ecf54/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 598, 6756, 1042, 12, 75, 13, 487, 14286, 30, 14286, 18, 8622, 2932, 3660, 5746, 18, 7048, 5621, 225, 364, 261, 77, 33, 20, 31, 277, 32, 2163, 31, 277, 27245, 288, 5329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 598, 6756, 1042, 12, 75, 13, 487, 14286, 30, 14286, 18, 8622, 2932, 3660, 5746, 18, 7048, 5621, 225, 364, 261, 77, 33, 20, 31, 277, 32, 2163, 31, 277, 27245, 288, 5329, ...
overscanData = afwImage.ImageF(exposure.getMaskedImage().getImage(), overscanBbox, False)
overscanData = afwImage.ImageF(exposure.getMaskedImage().getImage(), overscanBBox, False)
def OverscanCorrection(exposure, policy, stageSig = isrLib.ISR_OSCAN, stageName = 'lsst.ip.isr.overscancorrection'): """ This returns a new Exposure that is a subsection of the input exposure. NOTE : do we need to deal with the WCS in any way, shape, or form? """ # common input test metadata = exposure.getMetadata() if metadata.exists(stageSig): pexLog.Trace(stageName, 4, '%s has already been run' % (stageSig)) return mi = exposure.getMaskedImage() overscanKeyword = policy.getPolicy('overscanPolicy').getString('overscanKeyword') overscan = metadata.getString(overscanKeyword) overscanBbox = isrLib.BboxFromDatasec(overscan) # if "True", do a deep copy overscanData = afwImage.ImageF(exposure.getMaskedImage().getImage(), overscanBbox, False) # what type of overscan modeling? overscanFitType = policy.getPolicy('overscanPolicy').getString('overscanFitType') if overscanFitType == 'MEAN': offset = afwMath.makeStatistics(overscanData, afwMath.MEAN).getValue(afwMath.MEAN) mi -= offset elif overscanFitType == 'MEDIAN': offset = afwMath.makeStatistics(overscanData, afwMath.MEDIAN).getValue(afwMath.MEDIAN) mi -= offset elif overscanFitType == 'POLY': polyOrder = policy.getPolicy('overscanPolicy').getInt('polyOrder') raise pexExcept.LsstException, '%s : %s not implemented' % (stageName, overscanFitType) else: raise pexExcept.LsstException, '%s : %s an invalid overscan type' % (stageName, overscanFitType) # common outputs stageSummary = 'using overscan section %s with %s=%f' % (overscan, overscanFitType, offset) pexLog.Trace(stageName, 4, '%s %s' % (stageSig, stageSummary)) metadata.setString(stageSig, '%s; %s' % (stageSummary, time.asctime()))
df249f635ded5dfefd62ff151f23027f6e90fe8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6526/df249f635ded5dfefd62ff151f23027f6e90fe8c/IsrStages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 531, 2496, 4169, 20884, 12, 22739, 16, 3329, 16, 6009, 8267, 225, 273, 353, 86, 5664, 18, 5127, 54, 67, 51, 2312, 1258, 16, 6009, 461, 273, 296, 3251, 334, 18, 625, 18, 291, 86, 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, 531, 2496, 4169, 20884, 12, 22739, 16, 3329, 16, 6009, 8267, 225, 273, 353, 86, 5664, 18, 5127, 54, 67, 51, 2312, 1258, 16, 6009, 461, 273, 296, 3251, 334, 18, 625, 18, 291, 86, 18, ...
The given dictionary is never altered by this keyword.
Values are returned sorted according to keys. The given dictionary is never altered by this keyword.
def get_dictionary_values(self, dictionary): """Returns values of the given dictionary. The given dictionary is never altered by this keyword.
9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db/Collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15556, 67, 2372, 12, 2890, 16, 3880, 4672, 3536, 1356, 924, 434, 326, 864, 3880, 18, 225, 1021, 864, 3880, 353, 5903, 22349, 635, 333, 4932, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15556, 67, 2372, 12, 2890, 16, 3880, 4672, 3536, 1356, 924, 434, 326, 864, 3880, 18, 225, 1021, 864, 3880, 353, 5903, 22349, 635, 333, 4932, 18, 2, -100, -100, -100, -100, -10...
<img width=16 height=16 src="webplugin/icon_cancel_search.png" alt="Clear search results">
<img width=16 height=16 src="/webplugin/icon_cancel_search.png" alt="Clear search results">
def update_features_avail(feature_key, name, col, fsize, fcolor, prefix, suffix): text_features_avail.setdefault(feature_key, [name, 0, col, fsize, fcolor, prefix, suffix]) text_features_avail[feature_key][1] += 1
7247d86e6c22753799dc0dd61d252e56bac872a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/7247d86e6c22753799dc0dd61d252e56bac872a4/webplugin_example.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 7139, 67, 842, 671, 12, 7238, 67, 856, 16, 508, 16, 645, 16, 284, 1467, 16, 284, 3266, 16, 1633, 16, 3758, 4672, 977, 67, 7139, 67, 842, 671, 18, 542, 1886, 12, 7238, 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, 1089, 67, 7139, 67, 842, 671, 12, 7238, 67, 856, 16, 508, 16, 645, 16, 284, 1467, 16, 284, 3266, 16, 1633, 16, 3758, 4672, 977, 67, 7139, 67, 842, 671, 18, 542, 1886, 12, 7238, 67,...
if not mod:
if not mod and hasattr(env, 'autodoc_current_module'):
def generate_rst(what, name, members, undoc, add_content, document, lineno, indent=''): env = document.settings.env # find out what to import if what == 'module': mod = obj = name objpath = [] elif what in ('class', 'exception', 'function'): mod, obj = rpartition(name, '.') if not mod: mod = env.autodoc_current_module if not mod: mod = env.currmodule objpath = [obj] else: mod_cls, obj = rpartition(name, '.') if not mod_cls: mod_cls = env.autodoc_current_class if not mod_cls: mod_cls = env.currclass mod, cls = rpartition(mod_cls, '.') if not mod: mod = env.autodoc_current_module if not mod: mod = env.currmodule objpath = [cls, obj] result = ViewList() try: todoc = module = __import__(mod, None, None, ['foo']) for part in objpath: todoc = getattr(todoc, part) if hasattr(todoc, '__module__'): if todoc.__module__ != mod: return [], result docstring = todoc.__doc__ except (ImportError, AttributeError): warning = document.reporter.warning( 'autodoc can\'t import/find %s %r, check your spelling ' 'and sys.path' % (what, str(name)), line=lineno) return [warning], result # add directive header try: if what == 'class': args = inspect.formatargspec(*inspect.getargspec(todoc.__init__)) elif what in ('function', 'method'): args = inspect.formatargspec(*inspect.getargspec(todoc)) if what == 'method': if args[1:7] == 'self, ': args = '(' + args[7:] elif args == '(self)': args = '()' else: args = '' except: args = '' if len(objpath) == 2: qualname = '%s.%s' % (cls, obj) else: qualname = obj result.append(indent + '.. %s:: %s%s' % (what, qualname, args), '<autodoc>') result.append('', '<autodoc>') # the module directive doesn't like content if what != 'module': indent += ' ' # add docstring content if what == 'module' and env.config.automodule_skip_lines: docstring = '\n'.join(docstring.splitlines() [env.config.automodule_skip_lines:]) docstring = prepare_docstring(docstring) for i, line in enumerate(docstring): result.append(indent + line, '<docstring of %s>' % name, i) # add source content, if present if add_content: for line, src in zip(add_content.data, add_content.items): result.append(indent + line, src[0], src[1]) if not members or what in ('function', 'method', 'attribute'): return [], result env.autodoc_current_module = mod if objpath: env.autodoc_current_class = objpath[0] warnings = [] # add members, if possible _all = members == ['__all__'] if _all: all_members = sorted(inspect.getmembers(todoc)) else: all_members = [(mname, getattr(todoc, mname)) for mname in members] for (membername, member) in all_members: if _all and membername.startswith('_'): continue doc = getattr(member, '__doc__', None) if not undoc and not doc: continue if what == 'module': if isinstance(member, types.FunctionType): memberwhat = 'function' elif isinstance(member, types.ClassType) or \ isinstance(member, type): if issubclass(member, base_exception): memberwhat = 'exception' else: memberwhat = 'class' else: # XXX: todo -- attribute docs continue else: if callable(member): memberwhat = 'method' elif isinstance(member, property): memberwhat = 'attribute' else: # XXX: todo -- attribute docs continue full_membername = name + '.' + membername subwarn, subres = generate_rst(memberwhat, full_membername, ['__all__'], undoc, None, document, lineno, indent) warnings.extend(subwarn) result.extend(subres) env.autodoc_current_module = None env.autodoc_current_class = None return warnings, result
d739756f2a1551291f77000c21e3e2788a757319 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/d739756f2a1551291f77000c21e3e2788a757319/autodoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 16114, 12, 23770, 16, 508, 16, 4833, 16, 640, 2434, 16, 527, 67, 1745, 16, 1668, 16, 7586, 16, 3504, 2218, 11, 4672, 1550, 273, 1668, 18, 4272, 18, 3074, 225, 468, 1104, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 16114, 12, 23770, 16, 508, 16, 4833, 16, 640, 2434, 16, 527, 67, 1745, 16, 1668, 16, 7586, 16, 3504, 2218, 11, 4672, 1550, 273, 1668, 18, 4272, 18, 3074, 225, 468, 1104, 59...
""" print >> fp, hostname, '\tIGNORE' print >> fp, ' print >> fp, '%s: %s' % (loopaddr, mailbox) print >> fp db[hostname + '\0'] = 'IGNORE\0' db[loopaddr + '\0'] = loopaddr + '\0'
%s\t%s """ % (loopaddr, loopdest) db[loopaddr + '\0'] = loopdest + '\0'
def addvirtual(mlist, db, fp): listname = mlist.internal_name() fieldsz = len(listname) + len('request') hostname = mlist.host_name loopaddr = Utils.get_site_email(mlist.host_name, 'loop') mailbox, domain = Utils.ParseEmail(loopaddr) # Seek to the end of the text file, but if it's empty write the standard # disclaimer, and the loop catch address. fp.seek(0, 2) if not fp.tell(): print >> fp, """\
fdea0f4d4aafc034bf532b1250b6ea19c3d2c875 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/fdea0f4d4aafc034bf532b1250b6ea19c3d2c875/Postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12384, 12, 781, 376, 16, 1319, 16, 4253, 4672, 666, 529, 273, 312, 1098, 18, 7236, 67, 529, 1435, 1466, 94, 273, 562, 12, 1098, 529, 13, 397, 562, 2668, 2293, 6134, 5199, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12384, 12, 781, 376, 16, 1319, 16, 4253, 4672, 666, 529, 273, 312, 1098, 18, 7236, 67, 529, 1435, 1466, 94, 273, 562, 12, 1098, 529, 13, 397, 562, 2668, 2293, 6134, 5199, 273, 3...
if e.args[0] not in (EBADF, ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED):
if e.args[0] not in (EBADF, ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED):
def readwrite(obj, flags): try: if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_write_event() if flags & select.POLLPRI: obj.handle_expt_event() if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): obj.handle_close() except socket.error, e: if e.args[0] not in (EBADF, ECONNRESET, ENOTCONN, ESHUTDOWN,
abc781a962aa492251f207efcc0f000124eb5aef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/abc781a962aa492251f207efcc0f000124eb5aef/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2626, 12, 2603, 16, 2943, 4672, 775, 30, 309, 2943, 473, 2027, 18, 14232, 20663, 30, 1081, 18, 4110, 67, 896, 67, 2575, 1435, 309, 2943, 473, 2027, 18, 14232, 1502, 1693, 30, 1081...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2626, 12, 2603, 16, 2943, 4672, 775, 30, 309, 2943, 473, 2027, 18, 14232, 20663, 30, 1081, 18, 4110, 67, 896, 67, 2575, 1435, 309, 2943, 473, 2027, 18, 14232, 1502, 1693, 30, 1081...
} obj_event.write(cr, uid, [event.id], val) elif event.write_date == google_up: pass else: google_id = an_event.id.text utime = dateutil.parser.parse(an_event.updated.text) au_dt = au_tz.normalize(utime.astimezone(au_tz)) timestring_update = datetime.datetime(*au_dt.timetuple()[:6]).strftime('%Y-%m-%d %H:%M:%S') name_event = an_event.title.text or '' stime = an_event.when[0].start_time etime = an_event.when[0].end_time stime = dateutil.parser.parse(stime) etime = dateutil.parser.parse(etime) try : au_dt = au_tz.normalize(stime.astimezone(au_tz)) timestring = datetime.datetime(*au_dt.timetuple()[:6]).strftime('%Y-%m-%d %H:%M:%S') au_dt = au_tz.normalize(etime.astimezone(au_tz)) timestring_end = datetime.datetime(*au_dt.timetuple()[:6]).strftime('%Y-%m-%d %H:%M:%S') except : timestring = datetime.datetime(*stime.timetuple()[:6]).strftime('%Y-%m-%d %H:%M:%S') timestring_end = datetime.datetime(*etime.timetuple()[:6]).strftime('%Y-%m-%d %H:%M:%S') val = { 'name': name_event, 'date_begin': timestring, 'date_end': timestring_end, 'product_id': product[0], 'google_event_id': an_event.id.text, 'event_modify_date': timestring_update } obj_event.create(cr, uid, val) return {}
} obj_event.create(cr, uid, val) summary_dict['Event Created In Tiny'] += 1 final_summary = '************Summary************ \n' for sum in summary_dict: final_summary += '\n' + str(sum) + ' : ' + str(summary_dict[sum]) + '\n' return {'summary': final_summary}
def _synch_events(self, cr, uid, data, context={}):
18e7199fddc011b8df4da326cd52218e10b2a68c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/18e7199fddc011b8df4da326cd52218e10b2a68c/synchronize_events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 87, 2515, 67, 5989, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 12938, 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,...
[ 1, 1, 1, 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, 389, 87, 2515, 67, 5989, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 12938, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
else: field = get_field(field_type) return field.decode(data)
field = get_field(field_type) return field.decode(data)
def _decode(field_type, data): # integer if field_type == 'integer': return int(sortable_unserialise(data)) # A common field or a new field else: field = get_field(field_type) return field.decode(data)
dcc5296da0e6c344eb7677e3a059afa6d63f6cd9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/dcc5296da0e6c344eb7677e3a059afa6d63f6cd9/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3922, 12, 1518, 67, 723, 16, 501, 4672, 468, 3571, 309, 652, 67, 723, 422, 296, 7745, 4278, 327, 509, 12, 27236, 67, 318, 8818, 784, 12, 892, 3719, 468, 432, 2975, 652, 578, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3922, 12, 1518, 67, 723, 16, 501, 4672, 468, 3571, 309, 652, 67, 723, 422, 296, 7745, 4278, 327, 509, 12, 27236, 67, 318, 8818, 784, 12, 892, 3719, 468, 432, 2975, 652, 578, 279...
if missingCandidates == foundCandidates:
if foundCandidates and missingCandidates == foundCandidates:
def do(self): missingBuildRequires = set() missingBuildRequiresChoices = []
9351b3b6eb7b297585795ee5d0f0dab86351e44e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7642/9351b3b6eb7b297585795ee5d0f0dab86351e44e/enforcebuildreqs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 4672, 3315, 3116, 21671, 273, 444, 1435, 3315, 3116, 21671, 17442, 273, 5378, 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, 741, 12, 2890, 4672, 3315, 3116, 21671, 273, 444, 1435, 3315, 3116, 21671, 17442, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
canvas.setFont('Times-Bold',16) canvas.drawString(108, layout.PAGE_HEIGHT-108, Title) canvas.setFont('Times-Roman',9)
def myFirstPage(canvas, doc): canvas.saveState() canvas.setFont('Times-Bold',16) canvas.drawString(108, layout.PAGE_HEIGHT-108, Title) canvas.setFont('Times-Roman',9) canvas.restoreState()
4271964167f946db4efa82f704a8a08e0ace45d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/4271964167f946db4efa82f704a8a08e0ace45d6/fodyssey.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 3759, 1964, 12, 15424, 16, 997, 4672, 5953, 18, 5688, 1119, 1435, 5953, 18, 13991, 1119, 1435, 225, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3399, 3759, 1964, 12, 15424, 16, 997, 4672, 5953, 18, 5688, 1119, 1435, 5953, 18, 13991, 1119, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""Set the value of the attribute ``attr` of the tag ``tag``."""
"""Set the value of the attribute ``attr`` of the tag ``tag``."""
def setattr(self, tag, attr, val, token=None): """Set the value of the attribute ``attr` of the tag ``tag``.""" return self._upload(self._tagattr(tag, attr), StringIO(json.dumps(val)), token=token)
d95f44bb49f20b52cedae7abd65b384cbcd3f9da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/d95f44bb49f20b52cedae7abd65b384cbcd3f9da/ddfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9241, 12, 2890, 16, 1047, 16, 1604, 16, 1244, 16, 1147, 33, 7036, 4672, 3536, 694, 326, 460, 434, 326, 1566, 12176, 1747, 10335, 434, 326, 1047, 12176, 2692, 10335, 12123, 327, 365, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9241, 12, 2890, 16, 1047, 16, 1604, 16, 1244, 16, 1147, 33, 7036, 4672, 3536, 694, 326, 460, 434, 326, 1566, 12176, 1747, 10335, 434, 326, 1047, 12176, 2692, 10335, 12123, 327, 365, 6315...
if n == 1:
if n <= 1:
def iterator(self): r""" Algorithm based on: \url{http://marknelson.us/2002/03/01/next-permutation/}
85dd4f7a45bef5d2324ee0c678f238b13859366b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/85dd4f7a45bef5d2324ee0c678f238b13859366b/permutation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2775, 12, 2890, 4672, 436, 8395, 15067, 2511, 603, 30, 521, 718, 95, 2505, 2207, 3355, 3084, 816, 18, 407, 19, 6976, 22, 19, 4630, 19, 1611, 19, 4285, 17, 12160, 9245, 19, 97, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2775, 12, 2890, 4672, 436, 8395, 15067, 2511, 603, 30, 521, 718, 95, 2505, 2207, 3355, 3084, 816, 18, 407, 19, 6976, 22, 19, 4630, 19, 1611, 19, 4285, 17, 12160, 9245, 19, 97, 2, -10...
self.blockItem.contents[self.dropRow].contents.add(item)
self.blockItem.contents[self.dropRow].add(item)
def AddItem(self, itemUUID): item = self.blockItem.findUUID(itemUUID) self.blockItem.contents[self.dropRow].contents.add(item)
1aac3f2cca3c773a337a4ba3345fbc96e4e7cbc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/1aac3f2cca3c773a337a4ba3345fbc96e4e7cbc9/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 1180, 12, 2890, 16, 761, 5562, 4672, 761, 273, 365, 18, 2629, 1180, 18, 4720, 5562, 12, 1726, 5562, 13, 365, 18, 2629, 1180, 18, 3980, 63, 2890, 18, 7285, 1999, 8009, 1289, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1436, 1180, 12, 2890, 16, 761, 5562, 4672, 761, 273, 365, 18, 2629, 1180, 18, 4720, 5562, 12, 1726, 5562, 13, 365, 18, 2629, 1180, 18, 3980, 63, 2890, 18, 7285, 1999, 8009, 1289, 12, ...
self.startSeleniumServer(single, seleniumVersion)
self.startSeleniumServer(single, seleniumVersion, trustAllCerts)
def runTests(self, appConf): import time testStartDate = time.strftime(self.timeFormat)
c4353e2d218573c1f41fc0a5adaf56da040b2519 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/c4353e2d218573c1f41fc0a5adaf56da040b2519/qxtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 14650, 12, 2890, 16, 595, 3976, 4672, 1930, 813, 1842, 22635, 273, 813, 18, 701, 9982, 12, 2890, 18, 957, 1630, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 14650, 12, 2890, 16, 595, 3976, 4672, 1930, 813, 1842, 22635, 273, 813, 18, 701, 9982, 12, 2890, 18, 957, 1630, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
-c, --cr: disable CR -> CR+LF translation
-c, --cr: disable LF -> CR+LF translation
def usage(): print >>sys.stderr, """USAGE: %s [options] Simple Terminal Programm for the serial port. options: -p, --port=PORT: port, a number, defualt = 0 or a device name -b, --baud=BAUD: baudrate, default 9600 -r, --rtscts: enable RTS/CTS flow control (default off) -x, --xonxoff: enable software flow control (default off) -e, --echo: enable local echo (default off) -c, --cr: disable CR -> CR+LF translation """ % sys.argv[0]
b786cd543c0d1d1d0891ed88728d89d9950c58cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/b786cd543c0d1d1d0891ed88728d89d9950c58cb/miniterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
import win32_cypto self.crypt_handler = win32_cypto
import win32_crypto self.crypt_handler = win32_crypto
def __init__(self): super(Win32CryptoKeyring,self).__init__()
b230b1f706f036bec6b49665a469441f2d4c8f54 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5209/b230b1f706f036bec6b49665a469441f2d4c8f54/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 18049, 1578, 18048, 653, 8022, 16, 2890, 2934, 972, 2738, 972, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 18049, 1578, 18048, 653, 8022, 16, 2890, 2934, 972, 2738, 972, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
signal.setitimer(self.itimer, 0.2)
signal.setitimer(self.itimer, 0.2, 0.2)
def test_itimer_prof(self): self.itimer = signal.ITIMER_PROF signal.signal(signal.SIGPROF, self.sig_prof) signal.setitimer(self.itimer, 0.2)
2b860db35c5346c216672f94031ecc800dbebf02 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/2b860db35c5346c216672f94031ecc800dbebf02/test_signal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 305, 4417, 67, 16121, 12, 2890, 4672, 365, 18, 305, 4417, 273, 4277, 18, 1285, 31582, 67, 3373, 42, 4277, 18, 10420, 12, 10420, 18, 18513, 3373, 42, 16, 365, 18, 7340, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 305, 4417, 67, 16121, 12, 2890, 4672, 365, 18, 305, 4417, 273, 4277, 18, 1285, 31582, 67, 3373, 42, 4277, 18, 10420, 12, 10420, 18, 18513, 3373, 42, 16, 365, 18, 7340, 67, ...
button.unparent()
hbuttonbox.remove(button)
def showMessage (self, messageDialog, vertical=False): if self.messageSock.child: self.messageSock.remove(self.messageSock.child) message, separator, hbuttonbox = messageDialog.child.get_children() if vertical: buttonbox = gtk.VButtonBox() buttonbox.props.layout_style = gtk.BUTTONBOX_SPREAD for button in hbuttonbox.get_children(): button.unparent() buttonbox.add(button) else: hbuttonbox.unparent() buttonbox = hbuttonbox message.unparent() texts = message.get_children()[1] text1, text2 = texts.get_children() texts.set_child_packing(text1, True, False, 0, gtk.PACK_START) texts.set_child_packing(text2, True, False, 0, gtk.PACK_START) texts.set_spacing(0) message.pack_end(buttonbox, False, False) self.messageSock.add(message) self.messageSock.show_all() notebooks["messageArea"].show()
bc72423b70257f4d1622bba1dbfd2d45882bf680 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/bc72423b70257f4d1622bba1dbfd2d45882bf680/gamewidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1079, 261, 2890, 16, 883, 6353, 16, 9768, 33, 8381, 4672, 309, 365, 18, 2150, 55, 975, 18, 3624, 30, 365, 18, 2150, 55, 975, 18, 4479, 12, 2890, 18, 2150, 55, 975, 18, 3624, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1079, 261, 2890, 16, 883, 6353, 16, 9768, 33, 8381, 4672, 309, 365, 18, 2150, 55, 975, 18, 3624, 30, 365, 18, 2150, 55, 975, 18, 4479, 12, 2890, 18, 2150, 55, 975, 18, 3624, ...
Return '' if EOF is hit. Block if no data is immediately
Return b'' if EOF is hit. Block if no data is immediately
def read_some(self): """Read at least one byte of cooked data unless EOF is hit.
4ff2306a48ad184f76d4bd456b4caf600359b831 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/4ff2306a48ad184f76d4bd456b4caf600359b831/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 19068, 12, 2890, 4672, 3536, 1994, 622, 4520, 1245, 1160, 434, 15860, 329, 501, 3308, 6431, 353, 6800, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 855, 67, 19068, 12, 2890, 4672, 3536, 1994, 622, 4520, 1245, 1160, 434, 15860, 329, 501, 3308, 6431, 353, 6800, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if hasattr(h,'filled'): if allowmask: np = numpy.ma
if hasattr(h,'_mask'): if mask is None: mask = h._mask
def getNcData(self,bounds=None,allowmask=True): # Return values from cache if available. if 'z' in self.store.cachedcoords: if bounds is None: return self.store.cachedcoords[self.dimname] else: return self.store.cachedcoords[self.dimname][bounds]
35296bc8b4b1e8efa77e656fef37900d621a50b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/35296bc8b4b1e8efa77e656fef37900d621a50b3/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 71, 751, 12, 2890, 16, 10576, 33, 7036, 16, 5965, 4455, 33, 5510, 4672, 468, 2000, 924, 628, 1247, 309, 2319, 18, 309, 296, 94, 11, 316, 365, 18, 2233, 18, 7097, 9076, 30, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 71, 751, 12, 2890, 16, 10576, 33, 7036, 16, 5965, 4455, 33, 5510, 4672, 468, 2000, 924, 628, 1247, 309, 2319, 18, 309, 296, 94, 11, 316, 365, 18, 2233, 18, 7097, 9076, 30, 309...
def _ExpandPath(self, path): """Expands a relative path to an absolute path rooted at either the WebKit LayoutTests directory or the chrome layout tests directories.""" if self._standalone: base_dir = self._base_dir else: base_dir = path_utils.PathFromBase() if path and path.find("LayoutTests") == -1: full_path = os.path.join(base_dir, 'webkit', 'data', 'layout_tests', path) else: full_path = os.path.join(base_dir, 'third_party', 'WebKit', path) full_path = os.path.normpath(full_path) return full_path
def _ExpandTests(self, test_list_path): """Converts the list of tests into an absolute, normalized path and ensures directories end with the path separator.""" path = self._ExpandPath(test_list_path) if self._standalone: # If we can't check the filesystem to see if this is a directory, # we assume that files w/o an extension are directories. This may or # may not end up biting us. if os.path.splitext(path)[1] == '': path = os.path.join(path, '') else: if os.path.isdir(path): path = os.path.join(path, '') # This is kind of slow - O(n*m) - since this is called for all # entries in the test lists. It has not been a performance # issue so far. Maybe we should re-measure the time spent reading # in the test lists? result = [] for test in self._full_test_list: if test.startswith(path): result.append(test) return result
211a3ffcbe86cd75b6c6053d87df43b574b52ab2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/211a3ffcbe86cd75b6c6053d87df43b574b52ab2/test_expectations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12271, 14650, 12, 2890, 16, 1842, 67, 1098, 67, 803, 4672, 3536, 5692, 326, 666, 434, 7434, 1368, 392, 4967, 16, 5640, 589, 471, 11932, 6402, 679, 598, 326, 589, 4182, 12123, 589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12271, 14650, 12, 2890, 16, 1842, 67, 1098, 67, 803, 4672, 3536, 5692, 326, 666, 434, 7434, 1368, 392, 4967, 16, 5640, 589, 471, 11932, 6402, 679, 598, 326, 589, 4182, 12123, 589, ...
sendtime = float(connobj.recv(10).split()[0])
sendtime = float(connobj.recv(100).strip().split()[0])
def handleconnection(ip, port, connobj, ch, mainch): while True: sendtime = float(connobj.recv(10).split()[0]) lag = getruntime() - sendtime if mycontext['maxlag'] < lag: mycontext['maxlag'] = lag
8a08d7e4395befd31dafe0fe61aaf23545dbdffb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7272/8a08d7e4395befd31dafe0fe61aaf23545dbdffb/ut_repytests_testtcpbuffersize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 4071, 12, 625, 16, 1756, 16, 1487, 2603, 16, 462, 16, 2774, 343, 4672, 1323, 1053, 30, 1366, 957, 273, 1431, 12, 591, 2135, 441, 18, 18334, 12, 6625, 2934, 6406, 7675, 4939, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 4071, 12, 625, 16, 1756, 16, 1487, 2603, 16, 462, 16, 2774, 343, 4672, 1323, 1053, 30, 1366, 957, 273, 1431, 12, 591, 2135, 441, 18, 18334, 12, 6625, 2934, 6406, 7675, 4939, 1435...
aH = (availHeight - H - max(pS,tSB) - tH)*0.99
aH = (availHeight-H-tHS-hx)*0.99999
def split(self, availWidth, availHeight): canv = self.canv C = self._content x = i = H = pS = 0 n = len(C) I2W = {} for x in xrange(n): c = C[x] I = c._ptoinfo if I not in I2W.keys(): T = I.trailer Hdr = I.header tW, tH = _listWrapOn(T, availWidth, self.canv) tSB = T[0].getSpaceBefore() I2W[I] = T,tW,tH,tSB else: T,tW,tH,tSB = I2W[I] _, h = c.wrapOn(canv,availWidth,0xfffffff) if x: h += max(c.getSpaceBefore()-pS,0) pS = c.getSpaceAfter() H += h+pS if H+tH+max(tSB,pS)>=availHeight-_FUZZ: break i += 1
5ff6a5fdbd2ac83da8c2921d82a3bd22bd2e6039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5ff6a5fdbd2ac83da8c2921d82a3bd22bd2e6039/flowables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 15783, 2384, 16, 15783, 2686, 4672, 848, 90, 273, 365, 18, 4169, 90, 385, 273, 365, 6315, 1745, 619, 273, 277, 273, 670, 273, 293, 55, 273, 374, 290, 273, 562, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 15783, 2384, 16, 15783, 2686, 4672, 848, 90, 273, 365, 18, 4169, 90, 385, 273, 365, 6315, 1745, 619, 273, 277, 273, 670, 273, 293, 55, 273, 374, 290, 273, 562, 12...
(newModule.__class__.__name__, e)
(new_instance.__class__.__name__, e)
def _reload_module(self, module_instance, glyph): """Reload a module by storing all configuration information, deleting the module, and then recreating and reconnecting it.
9fb3c4b7c35895fdc6dfa58b93ab9b27b60f8410 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/9fb3c4b7c35895fdc6dfa58b93ab9b27b60f8410/graphEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17517, 67, 2978, 12, 2890, 16, 1605, 67, 1336, 16, 9440, 4672, 3536, 13013, 279, 1605, 635, 15729, 777, 1664, 1779, 16, 12993, 326, 1605, 16, 471, 1508, 283, 23799, 471, 11812, 310,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17517, 67, 2978, 12, 2890, 16, 1605, 67, 1336, 16, 9440, 4672, 3536, 13013, 279, 1605, 635, 15729, 777, 1664, 1779, 16, 12993, 326, 1605, 16, 471, 1508, 283, 23799, 471, 11812, 310,...
sys.stderr.write("rhandler setup\n")
def setup(self): """ We need to use socket._fileobject Because SSL.Connection doesn't have a 'dup'. Not exactly sure WHY this is, but this is backed up by comments in socket.py and SSL/connection.c """
b1b23473908f460d8f8c5eb0723232ca502a9876 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/b1b23473908f460d8f8c5eb0723232ca502a9876/SecureXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 4672, 3536, 1660, 1608, 358, 999, 2987, 6315, 768, 1612, 15191, 7419, 18, 1952, 3302, 1404, 1240, 279, 296, 26427, 10332, 2288, 8950, 3071, 14735, 61, 333, 353, 16, 1496, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3875, 12, 2890, 4672, 3536, 1660, 1608, 358, 999, 2987, 6315, 768, 1612, 15191, 7419, 18, 1952, 3302, 1404, 1240, 279, 296, 26427, 10332, 2288, 8950, 3071, 14735, 61, 333, 353, 16, 1496, ...
length = ZZ(len(S)).exact_log(2) if length != int(length): TypeError, "lookup table length is not a power of 2." self.m = int(length)
self.m = ZZ(len(S)).exact_log(2)
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`.
3495ceab0e02c75313a92b9ead9001643cee42f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3495ceab0e02c75313a92b9ead9001643cee42f5/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 1375, 55, 8338, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 225, 2826, 4333, 4672, 3536, 14291, 279, 12785, 3919, 261, 55, 17, 2147, 13, 364, 279, 864, 3689, 1014, 1375, 55, 8338, 2, -100, -100, -10...
var servlet = jsonrpc.ServiceProxy(%(here)r, %(methods)r);
var servlet = new jsonrpc.ServiceProxy(%(here)r, %(methods)r);
def jsonjs(self): env = self.servlet().request().environ() base = self.jsolaitURL lib = self.libURL here = wsgilib.construct_url(env, False) here += '?_action_=jsonaction'; if self.baseConfig: base_base = env['%s.base_url' % self.baseConfig] if not base.startswith('/'): base = base_base + '/' + base if not lib.startswith('/'): lib = base_base + '/' + lib text = (r''' <script type="text/javascript" src="%(base)s/init.js"></script> <script type="text/javascript" src="%(base)s/lib/urllib.js"></script> <script type="text/javascript" src="%(base)s/lib/jsonrpc.js"></script> <script type="text/javascript" src="%(base)s/lib/lang.js"></script> <script type="text/javascript"> var jsonrpc = importModule('jsonrpc'); var servlet = jsonrpc.ServiceProxy(%(here)r, %(methods)r); </script> ''' % {'base': base, 'lib': lib, 'here': here, 'methods': self.jsonMethods()}) return text
73962900ef0ba113e5bf7c5dd22c4c73d9c76dfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/73962900ef0ba113e5bf7c5dd22c4c73d9c76dfb/jsoncomponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1163, 2924, 12, 2890, 4672, 1550, 273, 365, 18, 23231, 7675, 2293, 7675, 28684, 1435, 1026, 273, 365, 18, 2924, 355, 1540, 1785, 2561, 273, 365, 18, 2941, 1785, 2674, 273, 341, 1055, 330...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1163, 2924, 12, 2890, 4672, 1550, 273, 365, 18, 23231, 7675, 2293, 7675, 28684, 1435, 1026, 273, 365, 18, 2924, 355, 1540, 1785, 2561, 273, 365, 18, 2941, 1785, 2674, 273, 341, 1055, 330...
company_id=move.company_id.id context['currency_id']=move.company_id.currency_id.id pricetype=self.pool.get('product.price.type').browse(cr,uid,move.company_id.property_valuation_price_type.id) amount_unit=move.product_id.price_get(pricetype.field, context)[move.product_id.id] amount=amount_unit * q or 1.0
company_id = move.company_id.id context['currency_id'] = move.company_id.currency_id.id pricetype = price_type_obj.browse(cr,uid,move.company_id.property_valuation_price_type.id) amount_unit = move.product_id.price_get(pricetype.field, context)[move.product_id.id] amount = amount_unit * q or 1.0
def action_done(self, cr, uid, ids, context=None): track_flag = False picking_ids = [] for move in self.browse(cr, uid, ids): if move.picking_id: picking_ids.append(move.picking_id.id) if move.move_dest_id.id and (move.state != 'done'): cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id)) if move.move_dest_id.state in ('waiting', 'confirmed'): self.write(cr, uid, [move.move_dest_id.id], {'state': 'assigned'}) if move.move_dest_id.picking_id: wf_service = netsvc.LocalService("workflow") wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) else: pass # self.action_done(cr, uid, [move.move_dest_id.id]) if move.move_dest_id.auto_validate: self.action_done(cr, uid, [move.move_dest_id.id], context=context)
236e0e35d74af3f7e0b707748e0f165c4c1c7baf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/236e0e35d74af3f7e0b707748e0f165c4c1c7baf/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 8734, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3298, 67, 6420, 273, 1083, 6002, 310, 67, 2232, 273, 5378, 364, 3635, 316, 365, 18, 25731, 12, 3353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 8734, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3298, 67, 6420, 273, 1083, 6002, 310, 67, 2232, 273, 5378, 364, 3635, 316, 365, 18, 25731, 12, 3353, ...
f.write( '<p>Tests are run on %s platform.</p>' % string.capitalize( sys.platform ) )
f.write( '<p>Tests are run on %s platform.</p>' % platform_name() )
def collect_logs( tag , runner , platform , user , comment , incremental , args , **unused ): import_utils() if comment is None: comment = 'comment.html' comment_path = os.path.join( regression_root, comment ) if not os.path.exists( comment_path ): log( 'Comment file "%s" not found; creating default comment.' % comment_path ) f = open( comment_path, 'w' ) f.write( '<p>Tests are run on %s platform.</p>' % string.capitalize( sys.platform ) ) f.close() run_type = '' if incremental: run_type = 'incremental' else: run_type = 'full' source = 'tarball' cvs_root_file = os.path.join( boost_root, 'CVS', 'root' ) if os.path.exists( cvs_root_file ): if string.split( open( cvs_root_file ).readline(), '@' )[0] == ':pserver:anonymous': source = 'anonymous CVS' else: source = 'CVS' from runner import collect_logs collect_logs( regression_results , runner , tag , platform , comment_path , timestamp_path , user , source , run_type )
607bf556f67b3b32e73b3ce08f70fd612b1256b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/607bf556f67b3b32e73b3ce08f70fd612b1256b5/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 10011, 12, 1047, 269, 8419, 269, 4072, 269, 729, 269, 2879, 269, 20649, 269, 833, 269, 2826, 14375, 262, 30, 1930, 67, 5471, 1435, 225, 309, 2879, 353, 599, 30, 2879, 273, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 10011, 12, 1047, 269, 8419, 269, 4072, 269, 729, 269, 2879, 269, 20649, 269, 833, 269, 2826, 14375, 262, 30, 1930, 67, 5471, 1435, 225, 309, 2879, 353, 599, 30, 2879, 273, 29...
return 0
return False
def _dispose(self, mlist, msg, msgdata): # Make sure we have the most up-to-date state mlist.Load() try: pid = os.getpid() self._func(mlist, msg, msgdata) # Failsafe -- a child may have leaked through. if pid <> os.getpid(): syslog('error', 'child process leaked thru: %s', modname) os._exit(1) self.__logged = 0 except socket.error: # There was a problem connecting to the SMTP server. Log this # once, but crank up our sleep time so we don't fill the error # log. port = mm_cfg.SMTPPORT if port == 0: port = 'smtp' # Log this just once. if not self.__logged: syslog('error', 'Cannot connect to SMTP server %s on port %s', mm_cfg.SMTPHOST, port) self.__logged = 1 return 1 except Errors.SomeRecipientsFailed, e: # The delivery module being used (SMTPDirect or Sendmail) failed # to deliver the message to one or all of the recipients. # Permanent failures should be registered (but registration # requires the list lock), and temporary failures should be # retried later. # # For permanent failures, make a copy of the message for bounce # handling. I'm not sure this is necessary, or the right thing to # do. pcnt = len(e.permfailures) copy = email.message_from_string(str(msg)) self._permfailures.setdefault(mlist, []).extend( zip(e.permfailures, [copy] * pcnt)) # Temporary failures if not e.tempfailures: # Don't need to keep the message queued if there were only # permanent failures. return 0 now = time.time() recips = e.tempfailures last_recip_count = msgdata.get('last_recip_count', 0) deliver_until = msgdata.get('deliver_until', now) if len(recips) == last_recip_count: # We didn't make any progress, so don't attempt delivery any # longer. BAW: is this the best disposition? if now > deliver_until: return 0 else: # Keep trying to delivery this for 3 days deliver_until = now + mm_cfg.DELIVERY_RETRY_PERIOD msgdata['last_recip_count'] = len(recips) msgdata['deliver_until'] = deliver_until msgdata['recips'] = recips # Requeue return 1 # We've successfully completed handling of this message return 0
e28b5bfa9c4fd0244c5f9967160e37de6d1b4d85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/e28b5bfa9c4fd0244c5f9967160e37de6d1b4d85/OutgoingRunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2251, 4150, 12, 2890, 16, 312, 1098, 16, 1234, 16, 1234, 892, 4672, 468, 4344, 3071, 732, 1240, 326, 4486, 731, 17, 869, 17, 712, 919, 312, 1098, 18, 2563, 1435, 775, 30, 4231, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2251, 4150, 12, 2890, 16, 312, 1098, 16, 1234, 16, 1234, 892, 4672, 468, 4344, 3071, 732, 1240, 326, 4486, 731, 17, 869, 17, 712, 919, 312, 1098, 18, 2563, 1435, 775, 30, 4231, ...
return http.Response(stream=template('login.html', **template_dict))
return HTMLResponse(stream=template('login.html', **template_dict))
def errors_found(): for key, value in filled_in.iteritems(): template_dict[key] = value minus = 1 if 'email' in template_dict else 0 size = len(template_dict) - minus count = 0 boxes = [] if size == 1: return ('',) for i in template_dict: if '_' in i: count += 1 plural = True if count > 1 else False template_dict['error'] = 'Es ' if plural else 'E '
2c1a5997a8830efcfb475993e5f1efb45ed121ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2c1a5997a8830efcfb475993e5f1efb45ed121ea/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1334, 67, 7015, 13332, 364, 498, 16, 460, 316, 6300, 67, 267, 18, 2165, 3319, 13332, 1542, 67, 1576, 63, 856, 65, 273, 460, 12647, 273, 404, 309, 296, 3652, 11, 316, 1542, 67, 1576, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1334, 67, 7015, 13332, 364, 498, 16, 460, 316, 6300, 67, 267, 18, 2165, 3319, 13332, 1542, 67, 1576, 63, 856, 65, 273, 460, 12647, 273, 404, 309, 296, 3652, 11, 316, 1542, 67, 1576, ...
env_tuple_list = SDKEnvironmentUpdate[sdk_dir]
env_tuple_list = SDKEnvironmentUpdates[sdk_dir]
def set_sdk_by_directory(env, sdk_dir): global SDKEnvironmentUpdates try: env_tuple_list = SDKEnvironmentUpdate[sdk_dir] except KeyError: env_tuple_list = [] SDKEnvironmentUpdate[sdk_dir] = env_tuple_list include_path = os.path.join(sdk_dir, 'include') mfc_path = os.path.join(include_path, 'mfc') atl_path = os.path.join(include_path, 'atl') if os.path.exists(mfc_path): env_tuple_list.append(('INCLUDE', mfc_path)) if os.path.exists(atl_path): env_tuple_list.append(('INCLUDE', atl_path)) env_tuple_list.append(('INCLUDE', include_path)) env_tuple_list.append(('LIB', os.path.join(sdk_dir, 'lib'))) env_tuple_list.append(('LIBPATH', os.path.join(sdk_dir, 'lib'))) env_tuple_list.append(('PATH', os.path.join(sdk_dir, 'bin'))) for variable, directory in env_tuple_list: env.PrependENVPath(variable, directory)
651342c0d69a06f19d7db9560ff8c8219611257f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/651342c0d69a06f19d7db9560ff8c8219611257f/sdk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 20907, 67, 1637, 67, 5149, 12, 3074, 16, 14446, 67, 1214, 4672, 2552, 3881, 5494, 5121, 775, 30, 1550, 67, 8052, 67, 1098, 273, 3881, 5494, 5121, 63, 20907, 67, 1214, 65, 1335...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 20907, 67, 1637, 67, 5149, 12, 3074, 16, 14446, 67, 1214, 4672, 2552, 3881, 5494, 5121, 775, 30, 1550, 67, 8052, 67, 1098, 273, 3881, 5494, 5121, 63, 20907, 67, 1214, 65, 1335...
origin = self.ren.GetOrigin() cam = self.ren.GetActiveCamera()
origin = ren.GetOrigin() cam = ren.GetActiveCamera()
def Reposition(self): """ Based on code of method Zoom in the vtkInteractorStyleRubberBandZoom, the of vtk 5.4.3 """ size = self.ren.GetSize()
c64e6b6cf3ce5b3574fd1784d421ddaf5ea6c9d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/c64e6b6cf3ce5b3574fd1784d421ddaf5ea6c9d1/viewer_slice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 868, 3276, 12, 2890, 4672, 3536, 25935, 603, 981, 434, 707, 2285, 4252, 316, 326, 13659, 2465, 3362, 2885, 54, 373, 744, 14231, 11497, 16, 326, 434, 13659, 1381, 18, 24, 18, 23, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 868, 3276, 12, 2890, 4672, 3536, 25935, 603, 981, 434, 707, 2285, 4252, 316, 326, 13659, 2465, 3362, 2885, 54, 373, 744, 14231, 11497, 16, 326, 434, 13659, 1381, 18, 24, 18, 23, 3536, ...
if self.request.get('lang', False):
if self.request.form.get('lang', False):
def getPreferredLanguages(self):
03248eadc035742375ff98de1a853d1bfd727b0e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8420/03248eadc035742375ff98de1a853d1bfd727b0e/i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12822, 4193, 12912, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12822, 4193, 12912, 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, ...
Display = TreeDisplayModel()
display = TreeDisplayModel()
def create_operations_box(self): """Create and return the operations box (which holds a tree view)""" scrolled_window = gtk.ScrolledWindow() scrolled_window.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) self.tree_store = TreeInfoModel() Display = TreeDisplayModel() mdl = self.tree_store.get_model() self.view = Display.make_view(mdl) self.view.get_selection().connect("changed", self.on_selection_changed) scrolled_window.add_with_viewport(self.view) return scrolled_window
9d492cae068d04dccea7b824cceed2984729452a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7853/9d492cae068d04dccea7b824cceed2984729452a/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 17542, 67, 2147, 12, 2890, 4672, 3536, 1684, 471, 327, 326, 5295, 3919, 261, 12784, 14798, 279, 2151, 1476, 15574, 888, 25054, 67, 5668, 273, 22718, 18, 1541, 25054, 3829, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 17542, 67, 2147, 12, 2890, 4672, 3536, 1684, 471, 327, 326, 5295, 3919, 261, 12784, 14798, 279, 2151, 1476, 15574, 888, 25054, 67, 5668, 273, 22718, 18, 1541, 25054, 3829, 1435, ...
return _ldap_call(self._l.modrdn,dn,newrdn,delold)
return self._ldap_call(self._l.modrdn,dn,newrdn,delold)
def modrdn(self,dn,newrdn,delold=1): return _ldap_call(self._l.modrdn,dn,newrdn,delold)
140b2770ed9a36efdac97d90834cdd76cd0d786b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4610/140b2770ed9a36efdac97d90834cdd76cd0d786b/ldapthreadlock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 86, 5176, 12, 2890, 16, 5176, 16, 2704, 86, 5176, 16, 3771, 1673, 33, 21, 4672, 327, 389, 14394, 67, 1991, 12, 2890, 6315, 80, 18, 1711, 86, 5176, 16, 5176, 16, 2704, 86, 5176, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 681, 86, 5176, 12, 2890, 16, 5176, 16, 2704, 86, 5176, 16, 3771, 1673, 33, 21, 4672, 327, 389, 14394, 67, 1991, 12, 2890, 6315, 80, 18, 1711, 86, 5176, 16, 5176, 16, 2704, 86, 5176, ...
self.pixels_points[i].pop(j) self.points[i].pop(j) self.colours[i].pop(j) if (i, j) == self.point_dragged: self.point_dragged = None if len(self.points[i]) == 1: self.points.pop(i) self.pixels_points.pop(i) self.colours.pop(i)
self.RemovePoint(i, j)
def OnRighClick(self, evt): point = self._has_clicked_in_a_point(evt.GetPositionTuple()) if point: i, j = point print "RightClick", i, j self.pixels_points[i].pop(j) self.points[i].pop(j) self.colours[i].pop(j) if (i, j) == self.point_dragged: self.point_dragged = None if len(self.points[i]) == 1: self.points.pop(i) self.pixels_points.pop(i) self.colours.pop(i) self.Refresh() nevt = CLUTEvent(myEVT_CLUT_POINT_CHANGED, self.GetId()) self.GetEventHandler().ProcessEvent(nevt) return evt.Skip()
6a2fe195f10ee152dee13c99203f19c8eda531e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/6a2fe195f10ee152dee13c99203f19c8eda531e8/clut_raycasting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 54, 2031, 6563, 12, 2890, 16, 6324, 4672, 1634, 273, 365, 6315, 5332, 67, 7475, 329, 67, 267, 67, 69, 67, 1153, 12, 73, 11734, 18, 967, 2555, 9038, 10756, 309, 1634, 30, 277, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 54, 2031, 6563, 12, 2890, 16, 6324, 4672, 1634, 273, 365, 6315, 5332, 67, 7475, 329, 67, 267, 67, 69, 67, 1153, 12, 73, 11734, 18, 967, 2555, 9038, 10756, 309, 1634, 30, 277, 1...
return sb.ndarray.__setattr__(self,attr,val)
return object.__setattr__(self,attr,val)
def __setattr__(self, attr, val): fielddict = sb.ndarray.__getattribute__(self,'dtype').fields try: res = fielddict[attr][:2] except: return sb.ndarray.__setattr__(self,attr,val) return self.setfield(val,*res)
34b811398d0a7ef3583a0539b1b61b343e55d237 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/34b811398d0a7ef3583a0539b1b61b343e55d237/records.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 1604, 16, 1244, 4672, 7314, 292, 449, 933, 273, 2393, 18, 25681, 16186, 588, 4589, 972, 12, 2890, 11189, 8972, 16063, 2821, 775, 30, 400, 273, 7314, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 1747, 972, 12, 2890, 16, 1604, 16, 1244, 4672, 7314, 292, 449, 933, 273, 2393, 18, 25681, 16186, 588, 4589, 972, 12, 2890, 11189, 8972, 16063, 2821, 775, 30, 400, 273, 7314, ...
self.check = Checkbutton(self, text=label, variable=self.variable) self.check.pack(side=LEFT)
self.check = tk.Checkbutton(self, text=label, variable=self.variable) self.check.pack(side=tk.LEFT)
def __init__(self, master=None, label="Debug", default=False, *args, **kwargs): """Create a Flag widget with the given label and default value.
f057996c3a6de2d5fabf3ad7997bbd1f796a9e23 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/f057996c3a6de2d5fabf3ad7997bbd1f796a9e23/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 1546, 2829, 3113, 805, 33, 8381, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1684, 279, 9960, 3604, 598, 326, 864, 1433, 471, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 1546, 2829, 3113, 805, 33, 8381, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 1684, 279, 9960, 3604, 598, 326, 864, 1433, 471, 80...
Yield tuples of the form (QUERY, package_id, id,).
Yield tuples of the form (QUERY, package_id, id, mimetype, schema, url).
def iter_queries(self, package_ids, id=None, id_alt=None): """ Yield tuples of the form (QUERY, package_id, id,). """ assert _DF or not isinstance(package_ids, basestring)
342ced6909076a9f201646311ba592017d1d5539 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11977/342ced6909076a9f201646311ba592017d1d5539/sqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 13748, 12, 2890, 16, 2181, 67, 2232, 16, 612, 33, 7036, 16, 612, 67, 2390, 33, 7036, 4672, 3536, 31666, 10384, 434, 326, 646, 261, 10753, 16, 2181, 67, 350, 16, 612, 16, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 13748, 12, 2890, 16, 2181, 67, 2232, 16, 612, 33, 7036, 16, 612, 67, 2390, 33, 7036, 4672, 3536, 31666, 10384, 434, 326, 646, 261, 10753, 16, 2181, 67, 350, 16, 612, 16, 12...
self.__lock.release()
self._available.release()
def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.wait(timeout) if (time.time() - start) >= timeout: raise TimeoutError, "Unable to get connection " \ "within %d seconds" % timeout else: self.__available.wait() return cnx finally: self.__lock.release()
3ae5818256d7afb7361900047341642489d25e5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3ae5818256d7afb7361900047341642489d25e5a/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10305, 92, 12, 2890, 16, 2021, 33, 7036, 4672, 787, 273, 813, 18, 957, 1435, 365, 16186, 739, 18, 1077, 1039, 1435, 775, 30, 1323, 1053, 30, 309, 365, 16186, 10305, 13713, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10305, 92, 12, 2890, 16, 2021, 33, 7036, 4672, 787, 273, 813, 18, 957, 1435, 365, 16186, 739, 18, 1077, 1039, 1435, 775, 30, 1323, 1053, 30, 309, 365, 16186, 10305, 13713, 30,...
virtual=1))
virtual=1)), Whitespace.NL
for typedef in self.includedActorTypedefs: self.cls.addstmt(typedef)
e33655ed3bb4f79bad4b4db09009c3bf557b9905 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/e33655ed3bb4f79bad4b4db09009c3bf557b9905/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 364, 618, 536, 316, 365, 18, 20405, 17876, 559, 12537, 30, 365, 18, 6429, 18, 1289, 10589, 12, 723, 536, 13, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 364, 618, 536, 316, 365, 18, 20405, 17876, 559, 12537, 30, 365, 18, 6429, 18, 1289, 10589, 12, 723, 536, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
mant = Q & ((1 << MANT_DIG - 1) - 1)
mant = Q & ((one << MANT_DIG - 1) - 1)
def float_unpack(Q, size): """Convert a 32-bit or 64-bit integer created by float_pack into a Python float.""" if size == 8: MIN_EXP = -1021 # = sys.float_info.min_exp MAX_EXP = 1024 # = sys.float_info.max_exp MANT_DIG = 53 # = sys.float_info.mant_dig BITS = 64 elif size == 4: MIN_EXP = -125 # C's FLT_MIN_EXP MAX_EXP = 128 # FLT_MAX_EXP MANT_DIG = 24 # FLT_MANT_DIG BITS = 32 else: raise ValueError("invalid size value") if not objectmodel.we_are_translated(): # This tests generates wrong code when translated: # with gcc, shifting a 64bit int by 64 bits does # not change the value. if Q >> BITS: raise ValueError("input out of range") # extract pieces one = r_ulonglong(1) sign = rarithmetic.intmask(Q >> BITS - 1) exp = rarithmetic.intmask((Q & ((one << BITS - 1) - (one << MANT_DIG - 1))) >> MANT_DIG - 1) mant = Q & ((1 << MANT_DIG - 1) - 1) if exp == MAX_EXP - MIN_EXP + 2: # nan or infinity result = float('nan') if mant else float('inf') elif exp == 0: # subnormal or zero result = math.ldexp(mant, MIN_EXP - MANT_DIG) else: # normal mant += 1 << MANT_DIG - 1 result = math.ldexp(mant, exp + MIN_EXP - MANT_DIG - 1) return -result if sign else result
6173039b94d6cc71178fa216f7bd538440d7f2ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/6173039b94d6cc71178fa216f7bd538440d7f2ea/ieee.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1431, 67, 17309, 12, 53, 16, 963, 4672, 3536, 2723, 279, 3847, 17, 3682, 578, 5178, 17, 3682, 3571, 2522, 635, 1431, 67, 2920, 1368, 279, 6600, 1431, 12123, 225, 309, 963, 422, 1725, 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, 1431, 67, 17309, 12, 53, 16, 963, 4672, 3536, 2723, 279, 3847, 17, 3682, 578, 5178, 17, 3682, 3571, 2522, 635, 1431, 67, 2920, 1368, 279, 6600, 1431, 12123, 225, 309, 963, 422, 1725, 3...
return ('Dictionary text must contain one or more white-space ' 'delimited words.') class InvalidSampleTextError(Exception):
return ('The dictionary must be a list of one or more words.') class InvalidSampleError(Exception):
def __str__(self): return ('Dictionary text must contain one or more white-space ' 'delimited words.')
bc9d5a1d58b676e7cc6dcf78f4cef02419954da2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3480/bc9d5a1d58b676e7cc6dcf78f4cef02419954da2/lipsum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 7707, 10905, 977, 1297, 912, 1245, 578, 1898, 9578, 17, 2981, 296, 296, 3771, 1038, 329, 4511, 1093, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 7707, 10905, 977, 1297, 912, 1245, 578, 1898, 9578, 17, 2981, 296, 296, 3771, 1038, 329, 4511, 1093, 13, 2, -100, -100, -100, -100, -100, -100, -100,...
getPackedInputSandbox(f)
getPackedInputSandbox(os.path.join(orig_wdir,f))
def stopcb(poll=False): global exitcode if poll: exitcode = child.poll() return exitcode != -1
050e690cfd567aae5e2aab0afcf5cde625dacb9f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/050e690cfd567aae5e2aab0afcf5cde625dacb9f/LCG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 7358, 12, 13835, 33, 8381, 4672, 2552, 2427, 710, 309, 7672, 30, 2427, 710, 273, 1151, 18, 13835, 1435, 327, 2427, 710, 480, 300, 21, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 7358, 12, 13835, 33, 8381, 4672, 2552, 2427, 710, 309, 7672, 30, 2427, 710, 273, 1151, 18, 13835, 1435, 327, 2427, 710, 480, 300, 21, 2, -100, -100, -100, -100, -100, -100, -100, ...
raise errors['unknown'][1], errors['unknown'][0]
raise errors['unknown'][1](errors['unknown'][0])
def leastsq(func,x0,args=(),Dfun=None,full_output=0,col_deriv=0,ftol=1.49012e-8,xtol=1.49012e-8,gtol=0.0,maxfev=0,epsfcn=0.0,factor=100,diag=None,warning=True): """Minimize the sum of squares of a set of equations. Description: Return the point which minimizes the sum of squares of M (non-linear) equations in N unknowns given a starting estimate, x0, using a modification of the Levenberg-Marquardt algorithm. x = arg min(sum(func(y)**2,axis=0)) y Inputs: func -- A Python function or method which takes at least one (possibly length N vector) argument and returns M floating point numbers. x0 -- The starting estimate for the minimization. args -- Any extra arguments to func are placed in this tuple. Dfun -- A function or method to compute the Jacobian of func with derivatives across the rows. If this is None, the Jacobian will be estimated. full_output -- non-zero to return all optional outputs. col_deriv -- non-zero to specify that the Jacobian function computes derivatives down the columns (faster, because there is no transpose operation). warning -- True to print a warning message when the call is unsuccessful; False to suppress the warning message. Outputs: (x, {cov_x, infodict, mesg}, ier) x -- the solution (or the result of the last iteration for an unsuccessful call. cov_x -- uses the fjac and ipvt optional outputs to construct an estimate of the jacobian around the solution. None if a singular matrix encountered (indicates very flat curvature in some direction). This matrix must be multiplied by the residual standard deviation to get the covariance of the parameter estimates --- see curve_fit. infodict -- a dictionary of optional outputs with the keys: 'nfev' : the number of function calls 'fvec' : the function evaluated at the output 'fjac' : A permutation of the R matrix of a QR factorization of the final approximate Jacobian matrix, stored column wise. Together with ipvt, the covariance of the estimate can be approximated. 'ipvt' : an integer array of length N which defines a permutation matrix, p, such that fjac*p = q*r, where r is upper triangular with diagonal elements of nonincreasing magnitude. Column j of p is column ipvt(j) of the identity matrix. 'qtf' : the vector (transpose(q) * fvec). mesg -- a string message giving information about the cause of failure. ier -- an integer flag. If it is equal to 1, 2, 3 or 4, the solution was found. Otherwise, the solution was not found. In either case, the optional output variable 'mesg' gives more information. Extended Inputs: ftol -- Relative error desired in the sum of squares. xtol -- Relative error desired in the approximate solution. gtol -- Orthogonality desired between the function vector and the columns of the Jacobian. maxfev -- The maximum number of calls to the function. If zero, then 100*(N+1) is the maximum where N is the number of elements in x0. epsfcn -- A suitable step length for the forward-difference approximation of the Jacobian (for Dfun=None). If epsfcn is less than the machine precision, it is assumed that the relative errors in the functions are of the order of the machine precision. factor -- A parameter determining the initial step bound (factor * || diag * x||). Should be in interval (0.1,100). diag -- A sequency of N positive entries that serve as a scale factors for the variables. Remarks: "leastsq" is a wrapper around MINPACK's lmdif and lmder algorithms. See also: scikits.openopt, which offers a unified syntax to call this and other solvers fmin, fmin_powell, fmin_cg, fmin_bfgs, fmin_ncg -- multivariate local optimizers fmin_l_bfgs_b, fmin_tnc, fmin_cobyla -- constrained multivariate optimizers anneal, brute -- global optimizers fminbound, brent, golden, bracket -- local scalar minimizers fsolve -- n-dimensional root-finding brentq, brenth, ridder, bisect, newton -- one-dimensional root-finding fixed_point -- scalar and vector fixed-point finder curve_fit -- find parameters for a curve-fitting problem. """ x0 = array(x0,ndmin=1) n = len(x0) if type(args) != type(()): args = (args,) m = check_func(func,x0,args,n)[0] if Dfun is None: if (maxfev == 0): maxfev = 200*(n+1) retval = _minpack._lmdif(func,x0,args,full_output,ftol,xtol,gtol,maxfev,epsfcn,factor,diag) else: if col_deriv: check_func(Dfun,x0,args,n,(n,m)) else: check_func(Dfun,x0,args,n,(m,n)) if (maxfev == 0): maxfev = 100*(n+1) retval = _minpack._lmder(func,Dfun,x0,args,full_output,col_deriv,ftol,xtol,gtol,maxfev,factor,diag) errors = {0:["Improper input parameters.", TypeError], 1:["Both actual and predicted relative reductions in the sum of squares\n are at most %f" % ftol, None], 2:["The relative error between two consecutive iterates is at most %f" % xtol, None], 3:["Both actual and predicted relative reductions in the sum of squares\n are at most %f and the relative error between two consecutive iterates is at \n most %f" % (ftol,xtol), None], 4:["The cosine of the angle between func(x) and any column of the\n Jacobian is at most %f in absolute value" % gtol, None], 5:["Number of calls to function has reached maxfev = %d." % maxfev, ValueError], 6:["ftol=%f is too small, no further reduction in the sum of squares\n is possible.""" % ftol, ValueError], 7:["xtol=%f is too small, no further improvement in the approximate\n solution is possible." % xtol, ValueError], 8:["gtol=%f is too small, func(x) is orthogonal to the columns of\n the Jacobian to machine precision." % gtol, ValueError], 'unknown':["Unknown error.", TypeError]} info = retval[-1] # The FORTRAN return value if (info not in [1,2,3,4] and not full_output): if info in [5,6,7,8]: if warning: print "Warning: " + errors[info][0] else: try: raise errors[info][1], errors[info][0] except KeyError: raise errors['unknown'][1], errors['unknown'][0] if n == 1: retval = (retval[0][0],) + retval[1:] mesg = errors[info][0] if full_output: from numpy.dual import inv from numpy.linalg import LinAlgError perm = take(eye(n),retval[1]['ipvt']-1,0) r = triu(transpose(retval[1]['fjac'])[:n,:]) R = dot(r, perm) try: cov_x = inv(dot(transpose(R),R)) except LinAlgError: cov_x = None return (retval[0], cov_x) + retval[1:-1] + (mesg,info) else: return (retval[0], info)
510547f61f981abe1ea89b12aa0442c154378da2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12971/510547f61f981abe1ea89b12aa0442c154378da2/minpack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4520, 11410, 12, 644, 16, 92, 20, 16, 1968, 33, 9334, 40, 12125, 33, 7036, 16, 2854, 67, 2844, 33, 20, 16, 1293, 67, 20615, 33, 20, 16, 1222, 355, 33, 21, 18, 7616, 1611, 22, 73, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4520, 11410, 12, 644, 16, 92, 20, 16, 1968, 33, 9334, 40, 12125, 33, 7036, 16, 2854, 67, 2844, 33, 20, 16, 1293, 67, 20615, 33, 20, 16, 1222, 355, 33, 21, 18, 7616, 1611, 22, 73, ...
figure(1)
def plot_systematics(filelist,cp,dir,epoch,dag,opts): flist = [] for file in filelist: if os.path.split(file)[-1][:8] == "out-bin-": flist.append(file) freq = [] freqfile = cp.get('noisecomp','freq-file') for line in open(freqfile,'r').readlines(): freq.append(float(line.strip())) hfr1 = {} hfi1 = {} htr1 = {} hti1 = {} htrfr = {} htifi = {} htrfi = {} htifr = {} Ai = {} Ar = {} N = {} amp = {} amphf = {} Nt = 0 for f in freq: hfr1[f] = 0.0 hfi1[f] = 0.0 htr1[f] = 0.0 hti1[f] = 0.0 htrfr[f] = 0 htifi[f] = 0 htrfi[f] = 0 htifr[f] = 0 Ai[f] = 0.0 Ar[f] = 0.0 N[f] = 0.0 amp[f] = 0.0 amphf[f] = 0.0 freqcnt = 0; print "\tfirst pass through systematics files..." for file in flist: try: input = open(file,'r') except: print "WARNING: file " + file + " doesn't exist" continue for line in input.readlines(): tmp = line.split() if len(tmp) == 1: Nt += 1 continue ampt = float(tmp[0])**2 + float(tmp[1])**2 ampf = float(tmp[2])**2 + float(tmp[3])**2 N[freq[freqcnt]] += 1.0 amp[freq[freqcnt]] += ampt/2.0 + ampf/2.0 amphf[freq[freqcnt]] += ampf htr1[freq[freqcnt]] += float(tmp[0]) hti1[freq[freqcnt]] += float(tmp[1]) hfr1[freq[freqcnt]] += float(tmp[2]) hfi1[freq[freqcnt]] += float(tmp[3]) htrfr[freq[freqcnt]] += float(tmp[0])*float(tmp[2])#/ampf htifi[freq[freqcnt]] += float(tmp[1])*float(tmp[3])#/ampf htrfi[freq[freqcnt]] += float(tmp[0])*float(tmp[3])#/ampf htifr[freq[freqcnt]] += float(tmp[1])*float(tmp[2])#/ampf freqcnt += 1 if freqcnt >= len(freq): freqcnt = 0 #if N[freq[freqcnt]] > 100: break #Actually make it the mean for f in freq: #print "...found " + str(N[f]) + " of " + str(Nt) + " for " + str(f) htr1[f] /= N[f] hti1[f] /= N[f] hfr1[f] /= N[f] hfi1[f] /= N[f] #Ai[f] = (htifr[f]-htrfi[f])/N[f] #Ar[f] = (htrfr[f]+htifi[f])/N[f] Ai[f] = (htifr[f]-htrfi[f])/(amp[f]) Ar[f] = (htrfr[f]+htifi[f])/(amp[f]) amp[f] = sqrt(amp[f]/N[f]) fname = "Ar_Ai_"+epoch[1]+"-"+epoch[2]+".txt" fl = open(fname,'w') fl.write("#freq h(t) re sys\th(t) im sys\th(t) mag sys\th(t) phase sys\n") mag = {} phase = {} for f in freq: mag[f] = sqrt(Ar[f]*Ar[f]+Ai[f]*Ai[f]) phase[f] = atan2(Ai[f],Ar[f])*180.0/3.14159 fl.write(str(f) + "\t"+str(Ar[f])+"\t"+str(Ai[f])+"\t"+str(mag[f])+"\t"+str(phase[f])+"\n") fl.close() realHistVecs = {} imagHistVecs = {} binVec = [] nbins = int(ceil(float(N.values()[0])/50.0)); for f in freq: realHistVecs[f] = zeros(2*nbins) imagHistVecs[f] = zeros(2*nbins) for b in range(-nbins,nbins): binVec.append(float(b)/nbins) xr1 = {} xi1 = {} xr2 = {} xi2 = {} xr3 = {} xi3 = {} xr4 = {} xi4 = {} N = {} for f in freq: xr1[f] = 0.0 xi1[f] = 0.0 xr2[f] = 0.0 xi2[f] = 0.0 xr3[f] = 0.0 xi3[f] = 0.0 xr4[f] = 0.0 xi4[f] = 0.0 N[f] = 0.0 freqcnt = 0; print "\tsecond pass through systematics files..." #Compute the moments of the distribution for file in flist: try: input = open(file,'r') except: print "WARNING: file " + file + " doesn't exist" continue for line in input.readlines(): tmp = line.split() if len(tmp) == 1: continue N[freq[freqcnt]] += 1.0 htr = float(tmp[0]) hti = float(tmp[1]) hfr = float(tmp[2]) hfi = float(tmp[3]) xr = htr-Ar[freq[freqcnt]]*hfr + Ai[freq[freqcnt]]*hfi xi = hti-Ar[freq[freqcnt]]*hfi - Ai[freq[freqcnt]]*hfr bin(binVec,realHistVecs[freq[freqcnt]],xr/amp[freq[freqcnt]]) bin(binVec,imagHistVecs[freq[freqcnt]],xi/amp[freq[freqcnt]]) xr1[freq[freqcnt]] += xr xi1[freq[freqcnt]] += xi xr2[freq[freqcnt]] += xr*xr xi2[freq[freqcnt]] += xi*xi xr3[freq[freqcnt]] += xr*xr*xr xi3[freq[freqcnt]] += xi*xi*xi xr4[freq[freqcnt]] += xr*xr*xr*xr xi4[freq[freqcnt]] += xi*xi*xi*xi freqcnt += 1 if freqcnt >= len(freq): freqcnt = 0 #if N[freq[freqcnt]] > 100: break #Put them in units of the noise amplitude for f in freq: xr1[f] /= N[f]*amp[f] xi1[f] /= N[f]*amp[f] xr2[f] = sqrt(xr2[f]/N[f])/amp[f] xi2[f] = sqrt(xi2[f]/N[f])/amp[f] if xr3[f]: xr3[f] = pow(abs(xr3[f]/N[f]),1.0/3.0)/amp[f]*xr3[f]/abs(xr3[f]) else: xr3[f] = 0.0 if xi3[f]: xi3[f] = pow(abs(xi3[f]/N[f]),1.0/3.0)/amp[f]*xi3[f]/abs(xi3[f]) else: xi3[f] = 0.0 xr4[f] = pow(abs(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4)),1.0/4.0)/amp[f]*(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4))/abs(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4)) xi4[f] = pow(abs(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4)),1.0/4.0)/amp[f]*(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4))/abs(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4)) fname = "x1_x2_x3_x4_"+epoch[1]+"-"+epoch[2]+".txt" fl = open(fname,'w') fl.write("#freq \t xr \t xi \t xr^2 \t xi^2 \t xr^3 \t xi^3 \t xr^4 \t xi^4 \n") for f in freq: fl.write(str(f) + '\t' + str(xr1[f]) + '\t' + str(xi1[f]) + '\t' + str(xr2[f]) + '\t' + str(xi2[f]) + '\t' + str(xr3[f]) + '\t' + str(xi3[f]) + '\t' + str(xr4[f]) + '\t' + str(xi4[f]) + '\n') rootN = [] rootNdeg = [] for f in N.values(): rootN.append(1/sqrt(f)) rootNdeg.append(180/sqrt(f)/3.14159) fl.close() # Plot the results print "\tplotting..." # Plot the systematic in magnitude magfigname = "sys_mag"+epoch[1]+"-"+epoch[2]+".png" figure(1) errorbar(mag.keys(),mag.values(),rootN) title('h(t) and h(f) magnitude systematics '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('Mag') grid() savefig(dir + '/'+ magfigname) thumb = 'thumb-'+magfigname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the systematic in phase phasefigname = "sys_phase"+epoch[1]+"-"+epoch[2]+".png" figure(1) errorbar(phase.keys(),phase.values(),rootNdeg) title('h(t) and h(f) phase systematics '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('Phase (degrees)') grid() savefig(dir + '/'+ phasefigname) thumb = 'thumb-'+phasefigname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x1figname = "sys_x1_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr1.keys(),xr1.values()) plot(xi1.keys(),xi1.values(),'r') legend(['real','imaginary']) title('mean '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('mean') grid() savefig(dir + '/'+ x1figname) thumb = 'thumb-'+x1figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x2figname = "sys_x2_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr2.keys(),xr2.values()) plot(xi2.keys(),xi2.values(),'r') legend(['real','imaginary']) title('residual noise sqrt of second moment '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('sigma') grid() savefig(dir + '/'+ x2figname) thumb = 'thumb-'+x2figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x3figname = "sys_x3_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr3.keys(),xr3.values()) plot(xi3.keys(),xi3.values(),'r') legend(['real','imaginary']) title('residual noise cube root of third moment '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('cube root of skew') grid() savefig(dir + '/'+ x3figname) thumb = 'thumb-'+x3figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x4figname = "sys_x4_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr4.keys(),xr4.values()) plot(xi4.keys(),xi4.values(),'r') legend(['real','imaginary']) title('residual noise fourth root of excess kurtosis '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('fourth root of excess kurtosis') grid() savefig(dir + '/'+ x4figname) thumb = 'thumb-'+x4figname savefig(dir + '/'+ thumb,dpi=20) clf() close() pgname = dir + '/' + "sys_plots"+epoch[1]+"-"+epoch[2]+".html" page = open(pgname,'w') page.write('<h2>Plots of systematic errors between h(t) and h(f) '+epoch[1]+"-"+epoch[2]+'</h2><hr><br><br>\n') page.write('<h3>Systematics in magnitude and phase and moments of the residual distributions</h3><hr>\n') page.write('<img src='+magfigname+' width=600>\n') page.write('<img src='+phasefigname+' width=600>\n') page.write('<img src='+x1figname+' width=600>\n') page.write('<img src='+x2figname+' width=600>\n') page.write('<img src='+x3figname+' width=600>\n') page.write('<img src='+x4figname+' width=600><br><br>\n') page.write('<h3>Raw distribution of residual noise</h3><hr><br>\n') for f in freq: figname = "n_hist_"+str(f)+'_'+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(binVec,realHistVecs[f]) plot(binVec,imagHistVecs[f],'r') legend(['real','imaginary']) title('residual noise distribution '+epoch[1]+"-"+epoch[2]+'\n'+'freq = '+str(f)) ylabel('Number') xlabel('n / amp of h(t)') thumb = 'thumb-'+figname savefig(dir + '/'+ thumb,dpi=20) grid() savefig(dir + '/'+ figname) clf() close() page.write('<a href='+figname+'><img src='+thumb+'></a>\n') page.close
da21469de3d5dc0444d38910fa554bbd3b46754d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/da21469de3d5dc0444d38910fa554bbd3b46754d/strain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 4299, 270, 2102, 12, 7540, 5449, 16, 4057, 16, 1214, 16, 12015, 16, 30204, 16, 4952, 4672, 284, 1098, 273, 5378, 364, 585, 316, 26204, 30, 309, 1140, 18, 803, 18, 4939, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 4299, 270, 2102, 12, 7540, 5449, 16, 4057, 16, 1214, 16, 12015, 16, 30204, 16, 4952, 4672, 284, 1098, 273, 5378, 364, 585, 316, 26204, 30, 309, 1140, 18, 803, 18, 4939, 12, ...
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit, context=context_multi_currency)
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context
02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 19170, 67, 350, 16, 13001, 67, 350, 16, 6205, 16, 5462, 67, 350, 16, 27963, 16, 819, 33, 7036, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 19170, 67, 350, 16, 13001, 67, 350, 16, 6205, 16, 5462, 67, 350, 16, 27963, 16, 819, 33, 7036, 4672, 3536, ...
button.clicked = partial(hide_opts, pager, optsval)
button._callback_add('clicked', partial(hide_opts, pager, optsval))
def show_opts(pager, *args, **kwargs): box = elementary.Box(pager) box.show() scroller = elementary.Scroller(pager) scroller.show() scroller.bounce_set(0, 0) scroller.size_hint_weight_set(1.0, 1.0) scroller.size_hint_align_set(-1.0, -1.0) box.pack_start(scroller) oframe = elementary.Frame(pager) oframe.label_set(_("Options")) oframe.show() oframe.style_set('pad_small') oframe.size_hint_weight_set(1.0, 1.0) oframe.size_hint_align_set(-1.0, -1.0) obox = elementary.Box(oframe) obox.show() optsconf = loadOpts() optsval = {} """ report = elementary.Check(obox) report.label_set('request delivery report') report.show() report.size_hint_weight_set(1.0, 0.0) report.size_hint_align_set(0.0, 0.0) obox.pack_end(report) charset = elementary.Check(obox) charset.label_set('force GSM ASCII charset') charset.show() charset.size_hint_weight_set(-1.0, 0.0) charset.size_hint_align_set(-1.0, 0.0) obox.pack_end(charset) store = elementary.Check(obox) store.label_set('store SMS in outbox') store.show() store.size_hint_weight_set(-1.0, 0.0) store.size_hint_align_set(-1.0, 0.0) obox.pack_end(store) flash = elementary.Check(obox) flash.label_set('send as Class 0') flash.show() flash.size_hint_weight_set(-1.0, 0.0) flash.size_hint_align_set(-1.0, 0.0) obox.pack_end(flash) csm = elementary.Check(obox) csm.label_set('ask before sending CSM') csm.show() csm.size_hint_weight_set(-1.0, 0.0) csm.size_hint_align_set(-1.0, 0.0) obox.pack_end(csm) """ for opt in opts: chk = elementary.Check(obox) chk.label_set(opts[opt]) chk.show() chk.size_hint_weight_set(-1.0, 0.0) chk.size_hint_align_set(-1.0, 0.0) obox.pack_end(chk) try: chk.state_set(optsconf[opt]) except: chk.state_set(optsdef[opt]) optsval[opt] = chk button = elementary.Button(pager) button.label_set(_("Back")) button.show() button.clicked = partial(hide_opts, pager, optsval) button.size_hint_weight_set(-1.0, 0.0) button.size_hint_align_set(-1.0, 0.0) box.pack_end(button) oframe.content_set(obox) scroller.content_set(oframe) pager.content_push(box)
925033402ecbb94f7bf67b07664d713f2f07039b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11430/925033402ecbb94f7bf67b07664d713f2f07039b/opimd_reply.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4952, 12, 24081, 16, 380, 1968, 16, 2826, 4333, 4672, 3919, 273, 930, 814, 18, 3514, 12, 24081, 13, 3919, 18, 4500, 1435, 225, 888, 1539, 273, 930, 814, 18, 1541, 1539, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4952, 12, 24081, 16, 380, 1968, 16, 2826, 4333, 4672, 3919, 273, 930, 814, 18, 3514, 12, 24081, 13, 3919, 18, 4500, 1435, 225, 888, 1539, 273, 930, 814, 18, 1541, 1539, 12, ...
self.layoutWidget1 = QtGui.QWidget(self.tab_2) self.layoutWidget1.setGeometry(QtCore.QRect(90,10,569,73)) self.layoutWidget1.setObjectName("layoutWidget1") self.vboxlayout13 = QtGui.QVBoxLayout(self.layoutWidget1) self.vboxlayout13.setObjectName("vboxlayout13") self.label_2 = QtGui.QLabel(self.layoutWidget1)
self.layoutWidget2 = QtGui.QWidget(self.tab_2) self.layoutWidget2.setGeometry(QtCore.QRect(90,10,583,73)) self.layoutWidget2.setObjectName("layoutWidget2") self.vboxlayout12 = QtGui.QVBoxLayout(self.layoutWidget2) self.vboxlayout12.setObjectName("vboxlayout12") self.label_2 = QtGui.QLabel(self.layoutWidget2)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,776,593).size()).expandedTo(MainWindow.minimumSizeHint())) MainWindow.setWindowIcon(QtGui.QIcon("../../../.designer/backup"))
79b42f390e6f53f319f4cccbce3f6018d111c729 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/79b42f390e6f53f319f4cccbce3f6018d111c729/main_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 12740, 3829, 4672, 12740, 3829, 18, 542, 16707, 2932, 6376, 3829, 7923, 12740, 3829, 18, 15169, 12, 23310, 4670, 18, 53, 1225, 12, 23310, 4670, 18, 53, 6120, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13943, 12, 2890, 16, 12740, 3829, 4672, 12740, 3829, 18, 542, 16707, 2932, 6376, 3829, 7923, 12740, 3829, 18, 15169, 12, 23310, 4670, 18, 53, 1225, 12, 23310, 4670, 18, 53, 6120, 1...
print "\n".join(out)
def _str_member_list(self, name): """ Generate a member listing, autosummary:: table where possible, and a table where not.
138b7efa6ddc85a068d234a5067ea5a71a6b28db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8817/138b7efa6ddc85a068d234a5067ea5a71a6b28db/docscrape_sphinx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 701, 67, 5990, 67, 1098, 12, 2890, 16, 508, 4672, 3536, 6654, 279, 3140, 11591, 16, 13133, 27804, 2866, 1014, 1625, 3323, 16, 471, 279, 1014, 1625, 486, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 67, 5990, 67, 1098, 12, 2890, 16, 508, 4672, 3536, 6654, 279, 3140, 11591, 16, 13133, 27804, 2866, 1014, 1625, 3323, 16, 471, 279, 1014, 1625, 486, 18, 2, -100, -100, -100, -...
self.new_word = []
def on_back_clicked(self, widget=None, data=None): if self.search.get_text()!= '': self.frame2.hide() self.search.set_text('') self.welcome.show() self.note.set_alignment(0.5, 0.1) self.note.set_markup('<span foreground="white"><b>Nothing selected</b></span>') return self.treestore.clear() #self.search.set_text('') self.new_word = [] conn = sqlite3.connect(db_file_path) c = conn.cursor() c.execute("""select word, accuracy from word_groups""") ls = c.fetchall() #print 'l', ls c.close() self.acc_dict = {} for i in ls: if i[1] == u'0:0': self.acc_dict[i[0]] = 0 else: try: self.new_word.remove(i[0]) except: pass t = i[1].split(':') acc = float(t[0])/float(t[1])*100 acc = int(acc) self.acc_dict[i[0]] = acc
3d4b7cae0d5feaf772d3ed4be964bb8a9304ed1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10994/3d4b7cae0d5feaf772d3ed4be964bb8a9304ed1f/wordgroupz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 823, 67, 7475, 329, 12, 2890, 16, 3604, 33, 7036, 16, 501, 33, 7036, 4672, 309, 365, 18, 3072, 18, 588, 67, 955, 1435, 5, 33, 875, 30, 365, 18, 3789, 22, 18, 11248, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 823, 67, 7475, 329, 12, 2890, 16, 3604, 33, 7036, 16, 501, 33, 7036, 4672, 309, 365, 18, 3072, 18, 588, 67, 955, 1435, 5, 33, 875, 30, 365, 18, 3789, 22, 18, 11248, 1435, ...
use_f_model_scaled = False):
use_f_model_scaled = False, overall_scale = 1.0, f_ordered_solvent = None, f_ordered_solvent_dist = None, n_ordered_water = 0, b_ordered_water = 0.0): assert f_obs is not None assert f_obs.is_real_array()
def __init__(self, f_obs = None, r_free_flags = None, b_cart = [0.,0.,0.,0.,0.,0.], k_sol = 0.0, b_sol = 0.0, sf_algorithm = "fft", sf_cos_sin_table = True, target_name = None, abcd = None, alpha_beta_params = None, xray_structure = None, f_mask = None, f_calc = None, mask_params = None, trust_xray_structure = False, update_xray_structure = True, use_f_model_scaled = False): self.f_obs = f_obs self.r_free_flags = None self.sf_algorithm = sf_algorithm self.sf_cos_sin_table = sf_cos_sin_table self.abcd = abcd self.alpha_beta_params = alpha_beta_params self.xray_structure = xray_structure self.overall_scale = 1.0 self.use_f_model_scaled= use_f_model_scaled if(mask_params is not None): self.mask_params = mask_params else: self.mask_params = mmtbx.masks.mask_master_params.extract() zero = flex.complex_double(self.f_obs.data().size(), 0.0) assert self.f_obs is not None assert self.f_obs.is_real_array() if(r_free_flags is not None): assert r_free_flags.indices().all_eq(self.f_obs.indices()) self.update_r_free_flags(r_free_flags) self.f_obs_w = self.f_obs.select(self.work) self.f_obs_t = self.f_obs.select(self.test) self.structure_factor_gradients_w = cctbx.xray.structure_factors.gradients( miller_set = self.f_obs_w, cos_sin_table = self.sf_cos_sin_table) self.uc = self.f_obs.unit_cell() self.d_spacings = self.f_obs.d_spacings().data() self.d_spacings_w = self.d_spacings.select(self.work) self.d_spacings_t = self.d_spacings.select(self.test) self.ss = 1./flex.pow2(self.d_spacings) / 4. if(self.xray_structure is None): self.xray_structure_mask_cache = None assert [f_calc, f_mask].count(None) == 0 assert f_mask.is_complex_array() assert f_calc.is_complex_array() assert f_mask.indices().all_eq(self.f_obs.indices()) assert f_calc.indices().all_eq(self.f_obs.indices()) self.update_core(f_calc = f_calc, f_mask = f_mask, b_cart = b_cart, k_sol = k_sol, b_sol = b_sol) else: self.xray_structure_mask_cache = \ self.xray_structure.deep_copy_scatterers() if(not trust_xray_structure): assert [f_calc, f_mask].count(None) == 2 if(update_xray_structure): self.update_xray_structure(xray_structure = self.xray_structure, update_f_calc = True, update_f_mask = True, force_update_f_mask = True, k_sol = k_sol, b_sol = b_sol, b_cart = b_cart) else: self.update_core(f_calc = f_calc, f_mask = f_mask, b_cart = b_cart, k_sol = k_sol, b_sol = b_sol) assert len(b_cart) == 6 if(self.abcd is not None): assert self.abcd.indices().all_eq(self.f_obs.indices()) == 1 if(self.sf_algorithm not in ("fft", "direct")): raise RuntimeError("Unknown s.f. calculation method: %s"% self.sf_algorithm) self.f_ordered_solvent = self.f_obs.array(data = zero) self.f_ordered_solvent_dist = self.f_obs.array(data = zero) self.n_ordered_water = 0.0 self.b_ordered_water = 0.0 self._setup_target_functors(target_name=target_name)
65c736cff24544f6f106f227d62f69c231be8261 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/65c736cff24544f6f106f227d62f69c231be8261/f_model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 67, 10992, 1171, 273, 599, 16, 436, 67, 9156, 67, 7133, 1850, 273, 599, 16, 324, 67, 11848, 7734, 273, 306, 20, 12990, 20, 12990, 20, 12990, 20, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 67, 10992, 1171, 273, 599, 16, 436, 67, 9156, 67, 7133, 1850, 273, 599, 16, 324, 67, 11848, 7734, 273, 306, 20, 12990, 20, 12990, 20, 12990, 20, 1...
info[field][i] = (buginfo[0], bug_url % buginfo[0])
try: full_bug_url = bug_url % buginfo[0] info[field][i] = (buginfo[0], full_bug_url) except TypeError: logging.warning("Invalid bugtracker url format")
def review_detail(request, review_request_id, template_name="reviews/review_detail.html"): """ Main view for review requests. This covers the review request information and all the reviews on it. """ review_request = get_object_or_404(ReviewRequest, pk=review_request_id) reviews = review_request.get_public_reviews() draft = review_request.get_draft(request.user) review = review_request.get_pending_review(request.user) if request.user.is_authenticated(): # If the review request is public and pending review and if the user # is logged in, mark that they've visited this review request. if review_request.public and review_request.status == "P": visited, visited_is_new = ReviewRequestVisit.objects.get_or_create( user=request.user, review_request=review_request) visited.timestamp = datetime.now() visited.save() # Unlike review above, this covers replies as well. review_timestamp = 0 if request.user.is_authenticated(): try: last_draft_review = Review.objects.filter( review_request=review_request, user=request.user, public=False).latest() review_timestamp = last_draft_review.timestamp except Review.DoesNotExist: pass # Find out if we can bail early. Generate an ETag for this. last_activity_time = review_request.get_last_activity_time() etag = "%s:%s:%s:%s" % (request.user, last_activity_time, review_timestamp, settings.AJAX_SERIAL) if etag_if_none_match(request, etag): return HttpResponseNotModified() repository = review_request.repository changedescs = review_request.changedescs.filter(public=True) entries = [] for temp_review in reviews: temp_review.ordered_comments = \ temp_review.comments.order_by('filediff', 'first_line') entries.append({ 'review': temp_review, 'timestamp': temp_review.timestamp, }) for changedesc in changedescs: fields_changed = [] for name, info in changedesc.fields_changed.items(): multiline = False if 'added' in info or 'removed' in info: change_type = 'add_remove' # We don't hard-code URLs in the bug info, since the # tracker may move, but we can do it here. if (name == "bugs_closed" and review_request.repository.bug_tracker): bug_url = review_request.repository.bug_tracker for field in info: for i, buginfo in enumerate(info[field]): info[field][i] = (buginfo[0], bug_url % buginfo[0]) elif 'old' in info or 'new' in info: change_type = 'changed' multiline = (name == "description" or name == "testing_done") # Branch text is allowed to have entities, so mark it safe. if name == "branch": if 'old' in info: info['old'][0] = mark_safe(info['old'][0]) if 'new' in info: info['new'][0] = mark_safe(info['new'][0]) elif name == "screenshot_captions": change_type = 'screenshot_captions' else: # No clue what this is. Bail. continue fields_changed.append({ 'title': fields_changed_name_map.get(name, name), 'multiline': multiline, 'info': info, 'type': change_type, }) entries.append({ 'changeinfo': fields_changed, 'changedesc': changedesc, 'timestamp': changedesc.timestamp, }) entries.sort(key=lambda item: item['timestamp']) response = render_to_response(template_name, RequestContext(request, { 'draft': draft, 'review_request': review_request, 'review_request_details': draft or review_request, 'entries': entries, 'review': review, 'request': request, 'upload_diff_form': UploadDiffForm(repository), 'upload_screenshot_form': UploadScreenshotForm(), 'scmtool': repository.get_scmtool(), 'PRE_CREATION': PRE_CREATION, })) set_etag(response, etag) return response
ee4b6ce0d22b89e91f0e4559331af6b81f826430 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/ee4b6ce0d22b89e91f0e4559331af6b81f826430/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10725, 67, 8992, 12, 2293, 16, 10725, 67, 2293, 67, 350, 16, 1542, 67, 529, 1546, 266, 7061, 19, 16041, 67, 8992, 18, 2620, 6, 4672, 3536, 12740, 1476, 364, 10725, 3285, 18, 1220, 2555...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10725, 67, 8992, 12, 2293, 16, 10725, 67, 2293, 67, 350, 16, 1542, 67, 529, 1546, 266, 7061, 19, 16041, 67, 8992, 18, 2620, 6, 4672, 3536, 12740, 1476, 364, 10725, 3285, 18, 1220, 2555...
while self.updating_art: gtk.main_iteration()
def update_album_art(self): if self.downloading_art: return self.stop_art_update = True while self.updating_art: gtk.main_iteration() thread = threading.Thread(target=self.update_album_art2) thread.start()
7887607cb534b053442ac9710ec7241659a64004 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/7887607cb534b053442ac9710ec7241659a64004/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 25090, 67, 485, 12, 2890, 4672, 309, 365, 18, 7813, 310, 67, 485, 30, 327, 365, 18, 5681, 67, 485, 67, 2725, 273, 1053, 2650, 273, 17254, 18, 3830, 12, 3299, 33, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 25090, 67, 485, 12, 2890, 4672, 309, 365, 18, 7813, 310, 67, 485, 30, 327, 365, 18, 5681, 67, 485, 67, 2725, 273, 1053, 2650, 273, 17254, 18, 3830, 12, 3299, 33, 2890, 18, ...
e_dir = os.path.join(self._root_dir, entry)
entry_fixed = entry.replace('/', os.path.sep) e_dir = os.path.join(self._root_dir, entry_fixed)
def RunOnDeps(self, command, args): """Runs a command on each dependency in a client and its dependencies.
7e4f973c324c3a681c5f85ed5f17db8b8829ac9e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/7e4f973c324c3a681c5f85ed5f17db8b8829ac9e/gclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1398, 14430, 12, 2890, 16, 1296, 16, 833, 4672, 3536, 9361, 279, 1296, 603, 1517, 4904, 316, 279, 1004, 471, 2097, 5030, 18, 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, 1939, 1398, 14430, 12, 2890, 16, 1296, 16, 833, 4672, 3536, 9361, 279, 1296, 603, 1517, 4904, 316, 279, 1004, 471, 2097, 5030, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
accel = self.client.get_string(gconf_path) if gconf_path in [x[0] for x in GHOTKEYS]: globalhotkeys.unbind(accel) if not globalhotkeys.bind(key, self.guake.show_hide): globalhotkeys.bind(accel, self.guake.show_hide) model.set(giter, 2, accel) raise ShowableError(_('key binding error'), _('Unable to bind %s key') % key, -1) else: if accel != 'disabled': keynum, mask = gtk.accelerator_parse(accel) self.guake.accel_group.disconnect_key(keynum, mask)
def each_key(model, path, subiter): keyentry = model.get_value(subiter, 2) if keyentry and keyentry == hotkey: msg = _("The shortcut \"%s\" is already in use.") % keylabel raise ShowableError(_('Error setting keybinding.'), msg, -1)
de00492a8254b0d7a402011a0823338d7843934d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11147/de00492a8254b0d7a402011a0823338d7843934d/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1517, 67, 856, 12, 2284, 16, 589, 16, 720, 2165, 4672, 498, 4099, 273, 938, 18, 588, 67, 1132, 12, 1717, 2165, 16, 576, 13, 309, 498, 4099, 471, 498, 4099, 422, 12811, 856, 30, 1234,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1517, 67, 856, 12, 2284, 16, 589, 16, 720, 2165, 4672, 498, 4099, 273, 938, 18, 588, 67, 1132, 12, 1717, 2165, 16, 576, 13, 309, 498, 4099, 471, 498, 4099, 422, 12811, 856, 30, 1234,...
objects = self.object_filenames(sources, strip_dir=1,
objects = self.object_filenames(sources, strip_dir=0,
def _prep_compile(self, sources, output_dir, depends=None): """Decide which souce files must be recompiled.
bca6afe49388ea29611207af33e3eb07a4170da1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bca6afe49388ea29611207af33e3eb07a4170da1/ccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19109, 67, 11100, 12, 2890, 16, 5550, 16, 876, 67, 1214, 16, 10935, 33, 7036, 4672, 3536, 1799, 831, 1492, 272, 1395, 311, 1390, 1297, 506, 283, 19397, 18, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19109, 67, 11100, 12, 2890, 16, 5550, 16, 876, 67, 1214, 16, 10935, 33, 7036, 4672, 3536, 1799, 831, 1492, 272, 1395, 311, 1390, 1297, 506, 283, 19397, 18, 2, -100, -100, -100, -1...
def _state(self, cr, uid, ids, name, args, context={}):
def _state(self, cr, uid, ids, name, args, context=None):
def _state(self, cr, uid, ids, name, args, context={}): result = {} mod_obj = self.pool.get('ir.module.module') for md in self.browse(cr, uid, ids): ids = mod_obj.search(cr, uid, [('name', '=', md.name)]) if ids: result[md.id] = mod_obj.read(cr, uid, [ids[0]], ['state'])[0]['state'] else: result[md.id] = 'unknown' return result
e7222cab5279bd291723fbbb0cc5fed751321ff0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/e7222cab5279bd291723fbbb0cc5fed751321ff0/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 563, 273, 2618, 681, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2978, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 563, 273, 2618, 681, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2978, 18, 2...
print " <3> Data Set 2, Data:", d2_data_seconds
print "Data Set 2, Data:", d2_data_seconds
def extract_comp_data(comp_file_info): ## Read in d line dict from config file and Process data from source .csv files. d1_data = [] d2_data = [] d1_data_dict = {} d2_data_dict = {} d1_scatter_data_labels = [] d2_scatter_data_labels = [] #List of variables from configuration file column names. d1_data_filename = comp_file_info['d1_Filename'] #String of filename d1_column_name_row_index = int(comp_file_info['d1_Col_Name_Row'])-1 #Data 1, Column Name Row Number d1_data_row_index = int(comp_file_info['d1_Data_Row'])-1 #Data 1, Starting Row Number d1_start_data_val = comp_file_info['d1_Start'] #String value to start d1 plot data d1_stop_data_val = comp_file_info['d1_End'] #String value to stop d1 plot data d1_start_comp_val = comp_file_info['d1_Comp_Start'] #String value to start d1 compare data d1_stop_comp_val = comp_file_info['d1_Comp_End'] #String value to start d1 compare data d1_initial_value = comp_file_info['d1_Initial_Value'] #Initial Value for Quantity d1_ind_column_name_value = comp_file_info['d1_Ind_Col_Name'].strip() #Data 1, Independent Data Column Name d1_Dep_column_name_value = comp_file_info['d1_Dep_Col_Name'].strip() #Data 1, Dep Column Name ind_Scale_Factor = float(comp_file_info['Scale_Ind']) Dep_Scale_Factor = float(comp_file_info['Scale_Dep']) d2_data_filename = comp_file_info['d2_Filename'] #String of filename d2_column_name_row_index = int(comp_file_info['d2_Col_Name_Row'])-1 #Data Set 2, Data Column Name Row Number d2_data_row_index = int(comp_file_info['d2_Data_Row'])-1 #Data Set 2, Data Starting Row Number d2_start_data_val = comp_file_info['d2_Start'] #String value to start d2 plot data d2_stop_data_val = comp_file_info['d2_End'] #String value to stop d2 plot data d2_start_comp_val = comp_file_info['d2_Comp_Start'] #String value to start d2 compare data d2_stop_comp_val = comp_file_info['d2_Comp_End'] #String value to start d2 compare data d2_initial_value = comp_file_info['d2_Initial_Value'] #Initial value for Quantity d2_ind_column_name_value = comp_file_info['d2_Ind_Col_Name'].strip() #Data Set 2, Independent Data Column Name d2_Dep_column_name_value = comp_file_info['d2_Dep_Col_Name'].strip() #Data Set 2, Dep Column Name # Create Scatter Data Labels for the comparison results. if d1_Dep_column_name_value[0] == '[': if diagnostic_level >= 2: print "Data Set 1, Column Name List Detected" d1_compound_col_names = eval(d1_Dep_column_name_value) if diagnostic_level >= 3: print " <3> Data Set 1, Compound Column Names:", d1_compound_col_names for name in d1_compound_col_names: if diagnostic_level >= 2: print "Data Set 1, Sub-Column Name:", name d1_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: if diagnostic_level >= 2: print "Single Data Set 1, Column Name:", d1_Dep_column_name_value d1_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+d1_Dep_column_name_value+"~"+d1_ind_column_name_value) if d2_Dep_column_name_value[0] == '[': if diagnostic_level >= 2: print "Data Set 2, Column Name List Detected" d2_compound_col_names = eval(d2_Dep_column_name_value) if diagnostic_level >= 3: print " <3> Data Set 2, Compound Column Names:", d2_Dep_column_name_value for name in d2_compound_col_names: if diagnostic_level >= 2: print "Data Set 2, Sub-Column Name:", name d2_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: if diagnostic_level >= 2: print "Single Data Set 2, Column Name:", d2_Dep_column_name_value d2_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+d2_Dep_column_name_value+"~"+d2_ind_column_name_value) if diagnostic_level >= 3: print " <3> Data Set 1, Data Labels:\n", d1_scatter_data_labels print " <3> Data Set 2, Data Labels:\n", d2_scatter_data_labels combined_scatter_data_labels = [d1_scatter_data_labels,d2_scatter_data_labels] if diagnostic_level >= 3: print " <3> Combined Scatter Data:",combined_scatter_data_labels metric = comp_file_info['Metric'] #String indicating the type of metric required. group_value = int(comp_file_info['Group']) try: d1_file_object = open(data_directory+d1_data_filename, "U") except: print "!!! Data Set 1, filename "+d1_data_filename+" will not open. !!!" exit() try: d2_file_object = open(data_directory+d2_data_filename, "U") except: print "!!! Data Set 2, filename "+d2_data_filename+" will not open. !!!" exit() if diagnostic_level >= 2: print "*** Start File Processing ***" # Read in Data Set 1, data and flip lists from rows to columns. if diagnostic_level >= 2: print "Reading in:", d1_data_filename for x in range(d1_column_name_row_index): d1_file_object.next() d1_data_cols = zip(*csv.reader(d1_file_object)) if diagnostic_level >= 3: print " <3> Data Set 1, Data Columns:",d1_data_cols # Find Ind_Axis index number and confirm Col_Name based on d1_Ind_Col_Name value in config file. column_counter = 0 for column in d1_data_cols: if column[0].strip() == d1_ind_column_name_value: if diagnostic_level >= 2: print "Data Set 1, Independent Data Col name is: ",column[0].strip() if diagnostic_level >= 3: print " <3> The Index Value is:",column_counter d1_ind_axis_column_name = column[0].strip() else: column_counter = column_counter + 1 if column_counter == len(d1_data_cols): print "!!! Problem with d1_Ind_Col_Name: "+column[0].strip()+" value in Config File !!!" exit() #Convert tuples to lists. d1_data_list = [list(sublist) for sublist in d1_data_cols] if diagnostic_level >= 3: print " <3> Data Set 1, Data List:", d1_data_list if diagnostic_level >= 2: print "*** Build Data Set 1 Dictionary. ***" #Catch errors if conversion of data from string to float fails. for d1_list in d1_data_list: if diagnostic_level >= 3: print " <3> Data Set 1, List:", d1_list try: temp_list = [] for x in d1_list[(d1_data_row_index-d1_column_name_row_index):]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) if diagnostic_level >= 3: print " <3> Temp List:", temp_list d1_data_dict[d1_list[0].strip()] = temp_list except: print "!!! Data Set 1, Conversion Error in Column Name "+d1_list[0].strip()+". !!!" exit() #Read in d2 data and flip lists from rows to columns. if diagnostic_level >= 2: print "Reading in:", d2_data_filename for x in range(d2_column_name_row_index): d2_file_object.next() d2_data_cols = zip(*csv.reader(d2_file_object)) if diagnostic_level >= 3: print " <3> Data Set 2, Data Columns:", d2_data_cols #Find Ind_Axis index number and confirm Col_Name based on d2_Ind_Col_Name value in config file. column_counter = 0 for column in d2_data_cols: if column[0].strip() == d2_ind_column_name_value: if diagnostic_level >= 2: print "Data Set 2, Independent Data Col name is: ",column[0].strip() if diagnostic_level >= 3: print " <3> The Index Value is: ",column_counter d2_ind_axis_column_name = column[0].strip() else: column_counter = column_counter + 1 if column_counter == len(d2_data_cols): print "!!! Problem with d2_Ind_Col_Name value in Config File !!!" exit() #Convert tuples to lists. d2_data_list = [list(sublist) for sublist in d2_data_cols] #Build Prediction/Data Set 2, Data Dictionary #Catch errors if conversion of data from string to float fails. for d2_list in d2_data_list: try: temp_list = [] for x in d2_list[(d2_data_row_index-d2_column_name_row_index):]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) d2_data_dict[d2_list[0].strip()] = temp_list except: print "!!! Data Set 2, Conversion Error in Column Name "+d2_list[0].strip()+". !!!" exit() # Passing in the Ind_Axis Column Name. d1_comp_ranges = find_start_stop_index(d1_data_dict,d1_ind_axis_column_name,d1_start_data_val,d1_stop_data_val,d1_start_comp_val,d1_stop_comp_val,ind_Scale_Factor) d2_comp_ranges = find_start_stop_index(d2_data_dict,d2_ind_axis_column_name,d2_start_data_val,d2_stop_data_val,d2_start_comp_val,d2_stop_comp_val,ind_Scale_Factor) if diagnostic_level >= 3: print " <3> D1 COMP RANGES: ",d1_comp_ranges print " <3> D2 COMP RANGES: ",d2_comp_ranges #### Begin Column specific operations. scatter_counter = 0 for scatter_label in combined_scatter_data_labels[0]: if diagnostic_level >= 3: print " <3> Scatter Counter Value:", scatter_counter d1_label_temp = [] d2_label_temp = [] d1_label_temp = split("~",combined_scatter_data_labels[0][scatter_counter]) d2_label_temp = split("~",combined_scatter_data_labels[1][scatter_counter]) if diagnostic_level >= 3: print " <3> Data Set 1, Label Split:", d1_label_temp print " <3> Data Set 2, Label Split:", d2_label_temp ##Find metric values. d1_data_values_comp = d1_data_dict[d1_label_temp[3]][d1_comp_ranges[2]:(d1_comp_ranges[3]+1)] d2_data_values_comp = d2_data_dict[d2_label_temp[3]][d2_comp_ranges[2]:(d2_comp_ranges[3]+1)] if diagnostic_level >= 3: print " <3> Data Set 1, data values:", d1_data_values_comp print " <3> Data Set 2, data values:", d2_data_values_comp # This allows the d line Quantity value to be set to 0 when either d1 or d2 data is missing. if comp_file_info['Quantity'] == str(0): print "Quantity set to 0, no comparison made." else: if metric == 'max': if diagnostic_level >= 2: print "*** Compute Rise ***" temp_d1_data_values = [x for x in d1_data_values_comp if x != 'Null'] d1_rise_value = max(temp_d1_data_values) - float(d1_initial_value) temp_d2_data_values = [x for x in d2_data_values_comp if x != 'Null'] d2_rise_value = max(temp_d2_data_values) - float(d2_initial_value) if diagnostic_level >= 2: print "Data Set 1, Initial Value is:", d1_initial_value print "Data Set 1, Rise Value is:", d1_rise_value print "Data Set 2, Initial Value is:", d2_initial_value print "Data Set 2, Rise Value is:", d2_rise_value print "\n*** Computing Rise Relative Difference ***" try: relative_difference = ((d2_rise_value-d1_rise_value)/d1_rise_value) if diagnostic_level >= 2: print "Rise Relative Difference is:", relative_difference except: print "!!! Computation of Rise relative_difference failed. !!!\nCheck source data for columns listed above." exit() #Append Rise Values to Global Scatter Data Dictionary. if diagnostic_level >= 3: print " <3> Scatter Data Labels:", combined_scatter_data_labels[0][scatter_counter] scatter_data_dict[combined_scatter_data_labels[0][scatter_counter]] = [d1_rise_value,d2_rise_value,relative_difference] elif metric == 'min': if diagnostic_level >= 2: print "*** Compute Drop ***" temp_d1_data_values = [x for x in d1_data_values_comp if x != 'Null'] d1_drop_value = float(d1_initial_value) - min(temp_d1_data_values) temp_d2_data_values = [x for x in d2_data_values_comp if x != 'Null'] d2_drop_value = float(d2_initial_value) - min(temp_d2_data_values) if diagnostic_level >= 2: print "Data Set 1, Initial Value is:", d1_initial_value print "Data Set 1, Drop Value is:", d1_drop_value print "Data Set 2, Initial Value is:", d2_initial_value print "Data Set 2, Drop Value is:", d2_drop_value print "\n*** Computing Drop Relative Difference ***" try: relative_difference = ((d2_drop_value-d1_drop_value)/d1_drop_value) if diagnostic_level >= 2: print "Min Relative Difference is:", relative_difference except: print "!!! Computation of Min relative_difference failed. !!!\nCheck source data for columns listed above." exit() #Append Drop Values to Global Scatter Data Dictionary. scatter_data_dict[combined_scatter_data_labels[0][scatter_counter]] = [d1_drop_value,d2_drop_value,relative_difference] else: print "!!! Metric is undefined in the input file. !!!" exit() #Create data lists based on specified ranges d1_data_seconds = zip(d1_data_dict[d1_ind_axis_column_name][d1_comp_ranges[0]:(d1_comp_ranges[1]+1)], d1_data_dict[d1_label_temp[3]][d1_comp_ranges[0]:(d1_comp_ranges[1]+1)]) if diagnostic_level >= 3: print " <3> Data Set 1, Data:", d1_data_seconds d2_data_seconds = zip(d2_data_dict[d2_ind_axis_column_name][d2_comp_ranges[0]:(d2_comp_ranges[1]+1)], d2_data_dict[d2_label_temp[3]][d2_comp_ranges[0]:(d2_comp_ranges[1]+1)]) if diagnostic_level >= 3: print " <3> Data Set 2, Data:", d2_data_seconds #Scale Ind_Axis Data. d1_data.append([[x[0] / ind_Scale_Factor, x[1]] for x in d1_data_seconds]) if diagnostic_level >= 3: print " <3> Scaled Data Set 1, Data:", d1_data d2_data.append([[x[0] / ind_Scale_Factor, x[1]] for x in d2_data_seconds]) if diagnostic_level >= 3: print " <3> Scaled Prediction Data:", d2_data #Need to Scale Dep_Axis Data... scatter_counter = scatter_counter + 1 if diagnostic_level >= 3: print "\n <3> Scatter Counter:", scatter_counter, "\n" # Close files d1_file_object.close() d2_file_object.close() return [d1_data,d2_data]
f66ca75013a32a9d59d8e58dec0baa78eda49b79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/f66ca75013a32a9d59d8e58dec0baa78eda49b79/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 302, 21, 67, 892, 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, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 302, 21, 67, 892, 273...
f = open(filename, 'w') f.write((filename + '\n').encode("utf-8")) f.close() os.access(filename,os.R_OK) os.remove(filename) os.chdir(oldwd) os.rmdir(dirname)
try: with open(filename, 'w') as f: f.write((filename + '\n').encode("utf-8")) os.access(filename,os.R_OK) os.remove(filename) finally: os.chdir(oldwd) os.rmdir(dirname) class UnicodeNFCFileTests(UnicodeFileTests): normal_form = 'NFC' class UnicodeNFDFileTests(UnicodeFileTests): normal_form = 'NFD' class UnicodeNFKCFileTests(UnicodeFileTests): normal_form = 'NFKC' class UnicodeNFKDFileTests(UnicodeFileTests): normal_form = 'NFKD'
def test_directory(self): dirname = os.path.join(test_support.TESTFN,u'Gr\xfc\xdf-\u66e8\u66e9\u66eb') filename = u'\xdf-\u66e8\u66e9\u66eb' oldwd = os.getcwd() os.mkdir(dirname) os.chdir(dirname) f = open(filename, 'w') f.write((filename + '\n').encode("utf-8")) f.close() os.access(filename,os.R_OK) os.remove(filename) os.chdir(oldwd) os.rmdir(dirname)
5ffe43e17133f7a72b6157e1e7cbbdfa34517672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/5ffe43e17133f7a72b6157e1e7cbbdfa34517672/test_pep277.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5149, 12, 2890, 4672, 4283, 273, 1140, 18, 803, 18, 5701, 12, 3813, 67, 13261, 18, 16961, 19793, 16, 89, 11, 20799, 64, 30772, 64, 92, 2180, 6943, 89, 6028, 73, 28, 64, 89,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5149, 12, 2890, 4672, 4283, 273, 1140, 18, 803, 18, 5701, 12, 3813, 67, 13261, 18, 16961, 19793, 16, 89, 11, 20799, 64, 30772, 64, 92, 2180, 6943, 89, 6028, 73, 28, 64, 89,...
pass
print_exception(exc_info[0], exc_info[1], exc_info[2], file=errors)
def start_response(status, headers, exc_info=None): if exc_info: try: if headers_sent: # Re-raise original exception only if headers sent raise exc_info[0], exc_info[1], exc_info[2] else: # We assume that the sender, who is probably setting # the headers a second time /w a 500 has produced # a more appropriate response. pass finally: # avoid dangling circular reference exc_info = None elif headers_set: # You cannot set the headers more than once, unless the # exc_info is provided. raise AssertionError("Headers already set and no exc_info!") headers_set.append(True) data['status'] = status data['headers'] = headers return output.write
8fdf9d4aa02d01c741fb2d098b973000ae755ed2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/8fdf9d4aa02d01c741fb2d098b973000ae755ed2/wsgilib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 309, 3533, 67, 1376, 30, 775, 30, 309, 1607, 67, 7569, 30, 468, 868, 17, 11628, 2282, 1520, 1338, 309, 1607, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 309, 3533, 67, 1376, 30, 775, 30, 309, 1607, 67, 7569, 30, 468, 868, 17, 11628, 2282, 1520, 1338, 309, 1607, 32...
if not rescond: size = len(recarr) * self.rowsize + 1 self._limdatacache.setitem(item, recarr, size)
if not rescond: size = len(recarr) * self.rowsize + 1 self._limdatacache.setitem(item, recarr, size)
def readIndexed2XXX(self, condition, condvars, field=None, flavor=None): """Read a slice of table fulfilling the condition."""
0681da097c6bbcd4976a4e47431ba6dd8ae3324c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12687/0681da097c6bbcd4976a4e47431ba6dd8ae3324c/Table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 15034, 22, 15639, 12, 2890, 16, 2269, 16, 6941, 4699, 16, 652, 33, 7036, 16, 19496, 33, 7036, 4672, 3536, 1994, 279, 2788, 434, 1014, 16136, 74, 5789, 326, 2269, 12123, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 15034, 22, 15639, 12, 2890, 16, 2269, 16, 6941, 4699, 16, 652, 33, 7036, 16, 19496, 33, 7036, 4672, 3536, 1994, 279, 2788, 434, 1014, 16136, 74, 5789, 326, 2269, 12123, 2, -100, -...
cherrypy.engine.exit()
try: cherrypy.engine.exit() finally: cherrypy.server.httpserver = None
def exit(self): cherrypy.engine.exit()
c290d0037cc5585a836c0b4cdcc92cdea15833f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/c290d0037cc5585a836c0b4cdcc92cdea15833f6/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 12, 2890, 4672, 462, 370, 28398, 18, 8944, 18, 8593, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 12, 2890, 4672, 462, 370, 28398, 18, 8944, 18, 8593, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for d in self.projects:
print self.projects for d in self.projects: self.pbxBuildTree(d.sourceTree)
def writePBXBuildFile(self): w = self.file.write w("/* Begin PBXBuildFile section */\n") for d in self.projects:
7acf31f605f22a42f548bfa94b2b3190987034c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/7acf31f605f22a42f548bfa94b2b3190987034c7/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 20724, 60, 3116, 812, 12, 2890, 4672, 341, 273, 365, 18, 768, 18, 2626, 341, 2932, 20308, 14323, 20819, 60, 3116, 812, 2442, 1195, 64, 82, 7923, 364, 302, 316, 365, 18, 13582, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 20724, 60, 3116, 812, 12, 2890, 4672, 341, 273, 365, 18, 768, 18, 2626, 341, 2932, 20308, 14323, 20819, 60, 3116, 812, 2442, 1195, 64, 82, 7923, 364, 302, 316, 365, 18, 13582, 30...
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account defined on this product and Variant account on category of this product is same.'))
raise osv.except_osv(_('Error!'), _('Can not create Journal Entry, Output Account defined on this product and Variant account on category of this product are same.'))
def _get_accounting_data_for_valuation(self, cr, uid, move, context=None): """ Return the accounts and journal to use to post Journal Entries for the real-time valuation of the move.
f8d9f98f342cde826c20ddb03f3a861ff792ba29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f8d9f98f342cde826c20ddb03f3a861ff792ba29/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4631, 310, 67, 892, 67, 1884, 67, 4531, 367, 12, 2890, 16, 4422, 16, 4555, 16, 3635, 16, 819, 33, 7036, 4672, 3536, 2000, 326, 9484, 471, 13001, 358, 999, 358, 1603, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4631, 310, 67, 892, 67, 1884, 67, 4531, 367, 12, 2890, 16, 4422, 16, 4555, 16, 3635, 16, 819, 33, 7036, 4672, 3536, 2000, 326, 9484, 471, 13001, 358, 999, 358, 1603, 16...
if key == IHALPHA:
if key == "IHALPHA":
def phasers(): "Fire phasers at bad guys." hits = [] kz = 0; k = 1; irec=0 # Cheating inhibitor ifast = False; no = False; itarg = True; msgflag = True; rpow=0 automode = "NOTSET" key=0 skip(1) # SR sensors and Computer are needed for automode if damaged(DSRSENS) or damaged(DCOMPTR): itarg = False if game.condition == "docked": prout(_("Phasers can't be fired through base shields.")) scanner.chew() return if damaged(DPHASER): prout(_("Phaser control damaged.")) scanner.chew() return if game.shldup: if damaged(DSHCTRL): prout(_("High speed shield control damaged.")) scanner.chew() return if game.energy <= 200.0: prout(_("Insufficient energy to activate high-speed shield control.")) scanner.chew() return prout(_("Weapons Officer Sulu- \"High-speed shield control enabled, sir.\"")) ifast = True # Original code so convoluted, I re-did it all # (That was Tom Almy talking about the C code, I think -- ESR) while automode=="NOTSET": key=scanner.next() if key == IHALPHA: if scanner.sees("manual"): if len(game.enemies)==0: prout(_("There is no enemy present to select.")) scanner.chew() key = IHEOL automode="AUTOMATIC" else: automode = "MANUAL" key = scanner.next() elif scanner.sees("automatic"): if (not itarg) and len(game.enemies) != 0: automode = "FORCEMAN" else: if len(game.enemies)==0: prout(_("Energy will be expended into space.")) automode = "AUTOMATIC" key = scanner.next() elif scanner.sees("no"): no = True else: huh() return elif key == IHREAL: if len(game.enemies)==0: prout(_("Energy will be expended into space.")) automode = "AUTOMATIC" elif not itarg: automode = "FORCEMAN" else: automode = "AUTOMATIC" else: # IHEOL if len(game.enemies)==0: prout(_("Energy will be expended into space.")) automode = "AUTOMATIC" elif not itarg: automode = "FORCEMAN" else: proutn(_("Manual or automatic? ")) scanner.chew() avail = game.energy if ifast: avail -= 200.0 if automode == "AUTOMATIC": if key == IHALPHA and scanner.sees("no"): no = True key = scanner.next() if key != IHREAL and len(game.enemies) != 0: prout(_("Phasers locked on target. Energy available: %.2f")%avail) irec=0 while True: scanner.chew() if not kz: for i in range(len(game.enemies)): irec += math.fabs(game.enemies[i].kpower)/(PHASEFAC*math.pow(0.90,game.enemies[i].kdist))*randreal(1.01, 1.06) + 1.0 kz=1 proutn(_("%d units required. ") % irec) scanner.chew() proutn(_("Units to fire= ")) key = scanner.next() if key!=IHREAL: return rpow = scanner.real if rpow > avail: proutn(_("Energy available= %.2f") % avail) skip(1) key = IHEOL if not rpow > avail: break if rpow<=0: # chicken out scanner.chew() return key=scanner.next() if key == IHALPHA and scanner.sees("no"): no = True if ifast: game.energy -= 200; # Go and do it! if checkshctrl(rpow): return scanner.chew() game.energy -= rpow extra = rpow if len(game.enemies): extra = 0.0 powrem = rpow for i in range(len(game.enemies)): hits.append(0.0) if powrem <= 0: continue hits[i] = math.fabs(game.enemies[i].kpower)/(PHASEFAC*math.pow(0.90,game.enemies[i].kdist)) over = randreal(1.01, 1.06) * hits[i] temp = powrem powrem -= hits[i] + over if powrem <= 0 and temp < hits[i]: hits[i] = temp if powrem <= 0: over = 0.0 extra += over if powrem > 0.0: extra += powrem hittem(hits) game.ididit = True if extra > 0 and not game.alldone: if game.tholian: proutn(_("*** Tholian web absorbs ")) if len(game.enemies)>0: proutn(_("excess ")) prout(_("phaser energy.")) else: prout(_("%d expended on empty space.") % int(extra)) elif automode == "FORCEMAN": scanner.chew() key = IHEOL if damaged(DCOMPTR): prout(_("Battle computer damaged, manual fire only.")) else: skip(1) prouts(_("---WORKING---")) skip(1) prout(_("Short-range-sensors-damaged")) prout(_("Insufficient-data-for-automatic-phaser-fire")) prout(_("Manual-fire-must-be-used")) skip(1) elif automode == "MANUAL": rpow = 0.0 for k in range(len(game.enemies)): aim = game.enemies[k].kloc ienm = game.quad[aim.i][aim.j] if msgflag: proutn(_("Energy available= %.2f") % (avail-0.006)) skip(1) msgflag = False rpow = 0.0 if damaged(DSRSENS) and \ not game.sector.distance(aim)<2**0.5 and ienm in (IHC, IHS): prout(cramen(ienm) + _(" can't be located without short range scan.")) scanner.chew() key = IHEOL hits[k] = 0; # prevent overflow -- thanks to Alexei Voitenko k += 1 continue if key == IHEOL: scanner.chew() if itarg and k > kz: irec=(abs(game.enemies[k].kpower)/(PHASEFAC*math.pow(0.9,game.enemies[k].kdist))) * randreal(1.01, 1.06) + 1.0 kz = k proutn("(") if not damaged(DCOMPTR): proutn("%d" % irec) else: proutn("??") proutn(") ") proutn(_("units to fire at %s- ") % crmena(False, ienm, "sector", aim)) key = scanner.next() if key == IHALPHA and scanner.sees("no"): no = True key = scanner.next() continue if key == IHALPHA: huh() return if key == IHEOL: if k==1: # Let me say I'm baffled by this msgflag = True continue if scanner.real < 0: # abort out scanner.chew() return hits[k] = scanner.real rpow += scanner.real # If total requested is too much, inform and start over if rpow > avail: prout(_("Available energy exceeded -- try again.")) scanner.chew() return key = scanner.next(); # scan for next value k += 1 if rpow == 0.0: # zero energy -- abort scanner.chew() return if key == IHALPHA and scanner.sees("no"): no = True game.energy -= rpow scanner.chew() if ifast: game.energy -= 200.0 if checkshctrl(rpow): return hittem(hits) game.ididit = True # Say shield raised or malfunction, if necessary if game.alldone: return if ifast: skip(1) if no == 0: if withprob(0.99): prout(_("Sulu- \"Sir, the high-speed shield control has malfunctioned . . .")) prouts(_(" CLICK CLICK POP . . .")) prout(_(" No response, sir!")) game.shldup = False else: prout(_("Shields raised.")) else: game.shldup = False overheat(rpow);
af15867a294e48006eba4fd9997cae401ccbfb05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/af15867a294e48006eba4fd9997cae401ccbfb05/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1844, 345, 414, 13332, 315, 9723, 1844, 345, 414, 622, 5570, 3058, 1900, 1199, 11076, 273, 5378, 417, 94, 273, 374, 31, 417, 273, 404, 31, 277, 3927, 33, 20, 468, 22682, 1776, 316, 157...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1844, 345, 414, 13332, 315, 9723, 1844, 345, 414, 622, 5570, 3058, 1900, 1199, 11076, 273, 5378, 417, 94, 273, 374, 31, 417, 273, 404, 31, 277, 3927, 33, 20, 468, 22682, 1776, 316, 157...
def version(ui):
def show_version(ui):
def version(ui): """output version and copyright information""" ui.write("Mercurial version %s\n" % version.get_version()) ui.status( "\nCopyright (C) 2005 Matt Mackall <mpm@selenic.com>\n" "This is free software; see the source for copying conditions. " "There is NO\nwarranty; " "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" )
0893811fc01f0dd4b4e8636ca072a2337f13402a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/0893811fc01f0dd4b4e8636ca072a2337f13402a/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1589, 12, 4881, 4672, 3536, 2844, 1177, 471, 22245, 1779, 8395, 5915, 18, 2626, 2932, 8478, 1397, 649, 1177, 738, 87, 64, 82, 6, 738, 1177, 18, 588, 67, 1589, 10756, 5915, 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, 2405, 67, 1589, 12, 4881, 4672, 3536, 2844, 1177, 471, 22245, 1779, 8395, 5915, 18, 2626, 2932, 8478, 1397, 649, 1177, 738, 87, 64, 82, 6, 738, 1177, 18, 588, 67, 1589, 10756, 5915, 18...
box = '<table class="box"><tr><th colspan=2>|strusers|</th></tr>\n'
box = '<table class="box" width="100%"><tr><th colspan=2>|strusers|</th></tr>\n'
def users(self, uri, build_user): log(3, 'Creating users table') box = '<table class="box"><tr><th colspan=2>|strusers|</th></tr>\n' box = box + '<tr>\n' box = box + '<th class="collabel">|strusername|</th>\n' box = box + '<th class="collabel">|strname|</th>\n' box = box + '</tr>\n'; if uri.letter > '': usernames = lampadas.users.letter_keys(uri.letter) for username in usernames: user = lampadas.users[username] box = box + '<tr>\n' box = box + '<td><a href="/user/' + username + '|uri.lang_ext|">' + username + '</a></td>\n' box = box + '<td>' + user.name + '</a></td>\n' box = box + '</tr>\n' box = box + '</table>\n' return box
082273c82228cdbe8b4f226333276a401090d396 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/082273c82228cdbe8b4f226333276a401090d396/HTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3677, 12, 2890, 16, 2003, 16, 1361, 67, 1355, 4672, 613, 12, 23, 16, 296, 11092, 3677, 1014, 6134, 3919, 273, 2368, 2121, 667, 1546, 2147, 6, 1835, 1546, 6625, 9, 14050, 313, 4438, 451...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3677, 12, 2890, 16, 2003, 16, 1361, 67, 1355, 4672, 613, 12, 23, 16, 296, 11092, 3677, 1014, 6134, 3919, 273, 2368, 2121, 667, 1546, 2147, 6, 1835, 1546, 6625, 9, 14050, 313, 4438, 451...
do_test("malloc", "LD_PRELOAD=libhugetlbfs.so HUGETLB_MORECORE=yes")
do_test("malloc", LD_PRELOAD="libhugetlbfs.so", HUGETLB_MORECORE="yes")
def functional_tests(): """ Run the set of functional tests. """ global linkhuge_wordsizes # Kernel background tests not requiring hugepage support do_test("zero_filesize_segment") # Library background tests not requiring hugepage support do_test("test_root") do_test("meminfo_nohuge") # Library tests requiring kernel hugepage support do_test("gethugepagesize") do_test("gethugepagesizes") do_test("empty_mounts", "HUGETLB_VERBOSE=1") do_test("large_mounts", "HUGETLB_VERBOSE=1") # Tests requiring an active and usable hugepage mount do_test("find_path") do_test("unlinked_fd") do_test("readback") do_test("truncate") do_test("shared") do_test("mprotect") do_test_with_rlimit(resource.RLIMIT_MEMLOCK, -1, "mlock") do_test("misalign") # Specific kernel bug tests do_test("ptrace-write-hugepage") do_test("icache-hygiene") do_test("slbpacaflush") do_test("straddle_4GB", bits=(64,)) do_test("huge_at_4GB_normal_below", bits=(64,)) do_test("huge_below_4GB_normal_above", bits=(64,)) do_test("map_high_truncate_2") do_test("misaligned_offset") do_test("truncate_above_4GB") do_test("brk_near_huge") do_test("task-size-overrun") do_test_with_rlimit(resource.RLIMIT_STACK, -1, "stack_grow_into_huge") if dangerous == 1: do_test("readahead_reserve") do_test("madvise_reserve") do_test("fadvise_reserve") else: do_test("readahead_reserve.sh") do_test("madvise_reserve.sh") do_test("fadvise_reserve.sh") sysctls = setup_shm_sysctl(64*1048576) do_test("shm-perms") restore_shm_sysctl(sysctls) # Tests requiring an active mount and hugepage COW do_test("private") do_test("fork-cow") do_test("direct") do_test("malloc") do_test("malloc", "LD_PRELOAD=libhugetlbfs.so HUGETLB_MORECORE=yes") do_test("malloc_manysmall") do_test("malloc_manysmall", \ "LD_PRELOAD=libhugetlbfs.so HUGETLB_MORECORE=yes") do_test("heapshrink") do_test("heapshrink", "LD_PRELOAD=libheapshrink.so") do_test("heapshrink", "LD_PRELOAD=libhugetlbfs.so HUGETLB_MORECORE=yes") do_test("heapshrink", "LD_PRELOAD=\"libhugetlbfs.so libheapshrink.so\" " + \ "HUGETLB_MORECORE=yes") do_test("heapshrink", "LD_PRELOAD=libheapshrink.so HUGETLB_MORECORE=yes " +\ "HUGETLB_MORECORE_SHRINK=yes") do_test("heapshrink", "LD_PRELOAD=\"libhugetlbfs.so libheapshrink.so\" " + \ "HUGETLB_MORECORE=yes HUGETLB_MORECORE_SHRINK=yes") do_test("heap-overflow", "HUGETLB_VERBOSE=1 HUGETLB_MORECORE=yes") # Run the remapping tests' up-front checks linkhuge_wordsizes = check_linkhuge_tests() # Original elflink tests elflink_test("linkhuge_nofd", "HUGETLB_VERBOSE=0") elflink_test("linkhuge") # Original elflink sharing tests elfshare_test("linkshare") elflink_and_share_test("linkhuge") # elflink_rw tests elflink_rw_test("linkhuge_rw") # elflink_rw sharing tests elflink_rw_and_share_test("linkhuge_rw") # Accounting bug tests # reset free hpages because sharing will have held some # alternatively, use do_test("chunk-overcommit") do_test("alloc-instantiate-race shared") do_test("alloc-instantiate-race private") do_test("truncate_reserve_wraparound") do_test("truncate_sigbus_versus_oom") # Test direct allocation API do_test("get_huge_pages") # Test overriding of shmget() do_test("shmoverride_linked") do_test("shmoverride_unlinked", "LD_PRELOAD=libhugetlbfs.so") # Test hugetlbfs filesystem quota accounting do_test("quota.sh") # Test accounting of HugePages_{Total|Free|Resv|Surp} # Alters the size of the hugepage pool so should probably be run last do_test("counters.sh")
637db55c57379f6e4c69d320ca16f9b05c873e3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3715/637db55c57379f6e4c69d320ca16f9b05c873e3f/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18699, 67, 16341, 13332, 3536, 1939, 326, 444, 434, 18699, 7434, 18, 3536, 2552, 1692, 76, 21627, 67, 3753, 3128, 225, 468, 14556, 5412, 7434, 486, 29468, 366, 637, 17600, 2865, 741, 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, 18699, 67, 16341, 13332, 3536, 1939, 326, 444, 434, 18699, 7434, 18, 3536, 2552, 1692, 76, 21627, 67, 3753, 3128, 225, 468, 14556, 5412, 7434, 486, 29468, 366, 637, 17600, 2865, 741, 67, ...