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
for col in ['MODEL_DATA', 'CORRECTED_DATA', 'IMAGING_WEIGHT'] : if col in cnames: raise ValueError("Column MODEL_DATA, CORRECTED_DATA, or IMAGING_WEIGHT already exists")
def addImagingColumns(msname, ack=True): """ Add the columns to an MS needed for the casa imager. It adds the columns MODEL_WEIGHT, CORRECTED_WEIGHT, and IMAGING_WEIGHT. It also sets the CHANNEL_SELECTION keyword needed for the older casa imagers. It fails if one of the columns already exists. """ # numpy is needed import numpy as np # Open the MS t = table (msname, readonly=False, ack=False) # Check if the columns do not already exist. cnames = t.colnames() for col in ['MODEL_DATA', 'CORRECTED_DATA', 'IMAGING_WEIGHT'] : if col in cnames: raise ValueError("Column MODEL_DATA, CORRECTED_DATA, or IMAGING_WEIGHT already exists") # Get the description of the DATA column. try: cdesc = t.getcoldesc('DATA') except: raise ValueError('Column DATA does not exist') # Add the columns using the DATA storage specification (if tiled). hasTiled = False try: dminfo = t.getdminfo("DATA") if dminfo['TYPE'][:5] == 'Tiled': hasTiled = True except: hasTiled = False # Use TiledShapeStMan if needed. if not hasTiled: dminfo = {'TYPE': 'TiledShapeStMan', 'SPEC': {'DEFAULTTILESHAPE':[4,32,128]}} # Add the columns. Use the description of the DATA column. dminfo['NAME'] = 'modeldata' cdesc['comment'] = 'The model data column' t.addcols (maketabdesc(makecoldesc('MODEL_DATA', cdesc)), dminfo) if ack: print 'added column MODEL_DATA' dminfo['NAME'] = 'correcteddata' cdesc['comment'] = 'The corrected data column' t.addcols (maketabdesc(makecoldesc('CORRECTED_DATA', cdesc)), dminfo) if ack: print 'added column CORRECTED_DATA' # Add IMAGING_WEIGHT which is 1-dim and has type float. shp = cdesc['shape'] if len(shp) > 0: shp = [shp[0]] # use nchan cd = makearrcoldesc ('IMAGING_WEIGHT', 0, ndim=1, shape=shp, valuetype='float') dminfo = {'TYPE': 'TiledShapeStMan', 'SPEC': {'DEFAULTTILESHAPE':[32,128]}} dminfo['NAME'] = 'imagingweight' t.addcols (maketabdesc(cd), dminfo) if ack: print 'added column IMAGING_WEIGHT' # Finally define the CHANNEL_SELECTION keyword containing the channels of # all spectral windows. tspw = table(t.getkeyword('SPECTRAL_WINDOW'), ack=False) nchans = tspw.getcol('NUM_CHAN') chans = [[0,nch] for nch in nchans] t.putcolkeyword ('MODEL_DATA', 'CHANNEL_SELECT', np.array(chans)) if ack: print 'defined keyword CHANNEL_SELECTION in column MODEL_DATA' # Flush the table to make sure it is written. t.flush()
cdd87430da981b0b5338b43dfdfa5f4e0b5c00a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7472/cdd87430da981b0b5338b43dfdfa5f4e0b5c00a0/tableutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1170, 5755, 3380, 12, 959, 529, 16, 8479, 33, 5510, 4672, 3536, 1436, 326, 2168, 358, 392, 9238, 3577, 364, 326, 8697, 69, 709, 6817, 18, 225, 2597, 4831, 326, 2168, 21700, 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, 527, 1170, 5755, 3380, 12, 959, 529, 16, 8479, 33, 5510, 4672, 3536, 1436, 326, 2168, 358, 392, 9238, 3577, 364, 326, 8697, 69, 709, 6817, 18, 225, 2597, 4831, 326, 2168, 21700, 67, 29...
if event == 'return':
if event == 'return': if sys.excepthook != g_excepthook: set_excepthook()
def profile(self, frame, event, arg): """ Profiler method. The Python profiling mechanism is used by the debugger mainly to handle synchronization issues related to the life time of the frame structure. """ #print_debug('profile: %s, %s, %s, %s, %s' % (repr(frame), event, frame.f_code.co_name, frame.f_code.co_filename, repr(arg)[:40])) if event == 'return': self.m_frame = frame.f_back
3936cfe7191507813ad88daecdb00c41fdd1a2a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9402/3936cfe7191507813ad88daecdb00c41fdd1a2a6/rpdb2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3042, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 3536, 28338, 707, 18, 1021, 6600, 25658, 12860, 353, 1399, 635, 326, 19977, 31457, 358, 1640, 24488, 8296, 3746, 358, 326, 17140, 813, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3042, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 3536, 28338, 707, 18, 1021, 6600, 25658, 12860, 353, 1399, 635, 326, 19977, 31457, 358, 1640, 24488, 8296, 3746, 358, 326, 17140, 813, ...
release_files = ['/etc/redhat-release', '/etc/debian_version' ] release_files += [ os.path.join('/etc', fname) for fname in os.listdir('/etc') if fname.endswith('release') \ and fname != 'lsb-release' ] for filename in release_files: if os.path.exists(filename): info.append(('Distribution', open(filename, 'r').readline().strip())) break
distro = get_distro() if distro: info.append(('Distribution', distro))
def start_build(self): assert self.outputdir
fb98bce3bc90ae3e92151adac044c90793e583fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/fb98bce3bc90ae3e92151adac044c90793e583fa/tinderbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 3510, 12, 2890, 4672, 1815, 365, 18, 2844, 1214, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 3510, 12, 2890, 4672, 1815, 365, 18, 2844, 1214, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
errMsg = "Error: couldn't find bus to allow re-enabling of the screen saver.\n\n" \ "Please visit the web-site listed in the 'About' dialog of this application " \ "and check for a newer version of the software." errDlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=errMsg) errDlg.run() errDlg.destroy() sys.exit(1)
return False
def toggleSleepPrevention(): global sleepPrevented, screenSaverCookie, timer bus = dbus.SessionBus() if sleepPrevented: ssProxy = None if 'org.gnome.ScreenSaver' in bus.list_names(): # For Gnome ssProxy = bus.get_object('org.gnome.ScreenSaver', '/org/gnome/ScreenSaver') elif 'org.freedesktop.ScreenSaver' in bus.list_names(): # For KDE and others ssProxy = bus.get_object('org.freedesktop.ScreenSaver', '/ScreenSaver') else: errMsg = "Error: couldn't find bus to allow re-enabling of the screen saver.\n\n" \ "Please visit the web-site listed in the 'About' dialog of this application " \ "and check for a newer version of the software." errDlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=errMsg) errDlg.run() errDlg.destroy() sys.exit(1) if screenSaverCookie != None: ssProxy.UnInhibit(screenSaverCookie) sleepPrevented = False print "Caffiene is now dormant; powersaving is re-enabled" # If the user clicks on the full coffee-cup to disable sleep prevention, it should also # cancel the timer for timed activation. if timer != None: print "Cancelling the 'timed activation' timer (was set for " + str(timer.interval) + " seconds)" timer.cancel() else: ssProxy = None if 'org.gnome.ScreenSaver' in bus.list_names(): # For Gnome ssProxy = bus.get_object('org.gnome.ScreenSaver', '/org/gnome/ScreenSaver') elif 'org.freedesktop.ScreenSaver' in bus.list_names(): # For KDE and others ssProxy = bus.get_object('org.freedesktop.ScreenSaver', '/ScreenSaver') else: errMsg = "Error: couldn't find bus to allow inhibiting of the screen saver.\n\n" \ "Please visit the web-site listed in the 'About' dialog of this application " \ "and check for a newer version of the software." errDlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format=errMsg) errDlg.run() errDlg.destroy() sys.exit(2) screenSaverCookie = ssProxy.Inhibit("Caffeine", "User has requested that Caffeine disable the screen saver") sleepPrevented = True print "Caffiene is now preventing powersaving modes and screensaver activation"
2fb8947e320a8cd93783e4c5600a72e97e38c60d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1563/2fb8947e320a8cd93783e4c5600a72e97e38c60d/caffeine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 20768, 1386, 11111, 13332, 2552, 5329, 25828, 329, 16, 5518, 55, 21851, 6151, 16, 5441, 5766, 273, 21866, 18, 2157, 7086, 1435, 309, 5329, 25828, 329, 30, 5202, 3886, 273, 599, 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, 10486, 20768, 1386, 11111, 13332, 2552, 5329, 25828, 329, 16, 5518, 55, 21851, 6151, 16, 5441, 5766, 273, 21866, 18, 2157, 7086, 1435, 309, 5329, 25828, 329, 30, 5202, 3886, 273, 599, 309,...
("links", "I"),)
("nlink", "I"), ("uid", "I"), ("gid", "I"), ("rdev", "Q"), ("atime", "I"), ("atimens", "I"), ("mtime", "I"), ("mtimens", "I"), ("ctime", "I"), ("ctimens", "I"), ("__pad1", "68x"),) def get_st_times(self): return dict(( ("st_" + a, self[a] + self[a + "ns"] / (10 ** 9)) for a in (b + "time" for b in "amc"))) assert Inode.size == 128, Inode.size
def __repr__(self): return "<{0} {1}>".format(self.__class__.__name__, self.__values)
a2d8f4bc0f5dd94eba8767e5d77b1beb78415227 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4811/a2d8f4bc0f5dd94eba8767e5d77b1beb78415227/clfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 95, 20, 97, 288, 21, 97, 2984, 18, 2139, 12, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 365, 16186, 2372, 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, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 95, 20, 97, 288, 21, 97, 2984, 18, 2139, 12, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 365, 16186, 2372, 13, 2, -100, -100, -100, -100, ...
players = [P('UTG', 100), P('SS', 6), P('CO', 100), P('BTN', 100)]
players = [P('UTG', 80), P('SS', 100), P('CO', 100), P('BTN', 100)]
def __repr__(self): return self.nickname
c3a7dd039f85f59330adfc1527fe216448cfcc10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14397/c3a7dd039f85f59330adfc1527fe216448cfcc10/rotator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 365, 18, 17091, 529, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 365, 18, 17091, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def test_it(self): def tr(frame, event, arg):
def trace(self, frame, event, arg): """A trace function that raises an exception in response to a specific trace event.""" if event == self.raiseOnEvent:
def test_it(self): def tr(frame, event, arg): raise ValueError # just something that isn't RuntimeError def f(): return 1 try: for i in xrange(sys.getrecursionlimit() + 1): sys.settrace(tr) try: f() except ValueError: pass else: self.fail("exception not thrown!") except RuntimeError: self.fail("recursion counter not reset")
2119dc63126f8255cd59541e25ef5a556c25c297 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2119dc63126f8255cd59541e25ef5a556c25c297/test_trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 3536, 37, 2606, 445, 716, 14183, 392, 1520, 316, 766, 358, 279, 2923, 2606, 871, 12123, 309, 871, 422, 365, 18, 11628, 1398, 1133, 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, 2606, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 3536, 37, 2606, 445, 716, 14183, 392, 1520, 316, 766, 358, 279, 2923, 2606, 871, 12123, 309, 871, 422, 365, 18, 11628, 1398, 1133, 30...
/.../chandler... --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
/.../release/RunPython... Chandler.py --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
def runPerfTests(options, tests=None): """ Run the Performance Test Suite >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['debug'] >>> runPerfTests(options) Skipping Performance Tests - release mode not specified False >>> options.modes = ['release'] >>> runPerfTests(options) /.../chandler... --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 ... /.../chandler... --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 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 ... Creating repository for startup time tests ... Startup ... ... Creating repository for startup time tests ... Startup_with_large_calendar ... ... Showing performance log in 5 seconds, Ctrl+C to stop tests - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ failed = False savePWD = os.getcwd() try: if 'release' in options.modes: delayedLogger = DelayedLogger() if not options.dryrun: os.chdir(options.chandlerHome) if tests is None: for item in glob.glob(os.path.join(options.profileDir, '__repository__.0*')): if os.path.isdir(item): build_lib.rmdirs(item) else: os.remove(item) testlist = [] testlistLarge = [] if tests is None: testlistStartup = ['startup', 'startup_large'] for item in glob.glob(os.path.join(options.chandlerHome, 'tools', 'QATestScripts', 'Performance', 'Perf*.py')): if 'PerfLargeData' in item: testlistLarge.append(item) else: testlist.append(item) else: testlistStartup = [] for item in tests: if 'PerfLargeData' in item: testlistLarge.append(item) elif item in ('startup', 'startup_large'): testlistStartup.append(item) else: testlist.append(item) repeat = 1 if options.tbox: repeat = 3 elif options.repeat: repeat = options.repeat # small repo tests if testlist: failed = runScriptPerfTests(options, testlist, repeat=repeat, logger=delayedLogger) # large repo tests if testlistLarge and (not failed or options.noStop): if runScriptPerfTests(options, testlistLarge, largeData=True, repeat=repeat, logger=delayedLogger): failed = True # startup tests if testlistStartup and (not failed or options.noStop): if os.name == 'nt' or sys.platform == 'cygwin': t = build_lib.getCommand(['which', 'time.exe']) if not t: log('time.exe not found, skipping startup performance tests') elif sys.platform == 'darwin': t = build_lib.getCommand(['which', 'gtime']) if t.startswith("no gtime"): log('gtime not found, skipping startup performance tests') log('NOTE: gtime is not part of OS X, you need to compile one' + \ 'yourself (get source from http://directory.fsf.org/time.html)' + \ 'or get it from darwinports project.') else: t = '/usr/bin/time' if os.path.isfile(t): if 'startup' in testlistStartup and runStartupPerfTests(options, t, repeat=repeat, logger=delayedLogger): failed = True if not failed: # Don't continue even if noStop, almost certain these won't work if 'startup_large' in testlistStartup and runStartupPerfTests(options, t, largeData=True, repeat=repeat, logger=delayedLogger): failed = True else: log('time command not found, skipping startup performance tests') if not tests: log('Showing performance log in 5 seconds, Ctrl+C to stop tests') if not options.dryrun: try: time.sleep(5) except KeyboardInterrupt: sys.exit(0) log('- + ' * 15) delayedLogger.logAll() else: log('Skipping Performance Tests - release mode not specified') finally: os.chdir(savePWD) return failed
af34e6a7a2160f1862685baa804a3205994c1ff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/af34e6a7a2160f1862685baa804a3205994c1ff0/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 22016, 14650, 12, 2116, 16, 7434, 33, 7036, 4672, 3536, 1939, 326, 11217, 1359, 7766, 348, 9519, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 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, 1086, 22016, 14650, 12, 2116, 16, 7434, 33, 7036, 4672, 3536, 1939, 326, 11217, 1359, 7766, 348, 9519, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18...
"%s", 0);""" % (name,name,name,len(vals[0]), vals[3][0], vals[3][1], vals[4], name, vals[5])) mlist.append(r"""PyDict_SetItemString(dictionary, "%s", f);"""%name)
"%s", 0);""" % (name, name, name, len(uf.type_descriptions), uf.nin, uf.nout, uf.identity, name, uf.docstring)) mlist.append(r"""PyDict_SetItemString(dictionary, "%s", f);""" % name)
def make_ufuncs(funcdict): code3list = [] for name, vals in funcdict.items(): mlist = [] mlist.append(\
912beccc011bf60d61b61fa24021f6235dba0225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/912beccc011bf60d61b61fa24021f6235dba0225/generate_umath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 89, 17728, 12, 644, 1576, 4672, 981, 23, 1098, 273, 5378, 364, 508, 16, 5773, 316, 1326, 1576, 18, 3319, 13332, 312, 1098, 273, 5378, 312, 1098, 18, 6923, 4713, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 89, 17728, 12, 644, 1576, 4672, 981, 23, 1098, 273, 5378, 364, 508, 16, 5773, 316, 1326, 1576, 18, 3319, 13332, 312, 1098, 273, 5378, 312, 1098, 18, 6923, 4713, 2, -100, -100...
display_toc = True,
display_toc = display_toc,
def get_doc_context(self, docname, body, metatags): # no relation links... toc = self.env.get_toctree_for(self.config.master_doc, self, False) self.fix_refuris(toc) toc = self.render_partial(toc)['fragment'] return dict( parents = [], prev = None, next = None, docstitle = None, title = self.config.html_title, meta = None, body = body, metatags = metatags, rellinks = [], sourcename = '', toc = toc, display_toc = True, )
8c0c728d1bee97e3c286784db062067175a24269 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/8c0c728d1bee97e3c286784db062067175a24269/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2434, 67, 2472, 12, 2890, 16, 997, 529, 16, 1417, 16, 5100, 270, 1341, 4672, 468, 1158, 2533, 4716, 2777, 17919, 273, 365, 18, 3074, 18, 588, 67, 869, 299, 992, 67, 1884, 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, 336, 67, 2434, 67, 2472, 12, 2890, 16, 997, 529, 16, 1417, 16, 5100, 270, 1341, 4672, 468, 1158, 2533, 4716, 2777, 17919, 273, 365, 18, 3074, 18, 588, 67, 869, 299, 992, 67, 1884, 12...
def createLocalization(source, dest, apps = ['browser'], exceptions = {}):
def createLocalization(source, dest, apps, exceptions = {}):
def createLocalization(source, dest, apps = ['browser'], exceptions = {}): ''' Creates a new localization. @type source: string @param source: path to the mozilla sources to use @type dest: string @param dest: path to the localization to create or update @type apps: array of strings @param apps: the applications for which to create or update the localization @type exceptions: mapping @param exceptions: stuff to ignore ''' assert os.path.isdir(source), "source directory is not a directory" clientmk = os.path.join(source,'client.mk') assert os.path.isfile(clientmk), "client.mk missing" if not os.path.isdir(dest): os.makedirs(dest) assert os.path.isdir(dest), "target should be a directory" # get the directories to iterate over dirs = set() cmd = ['make', '-f', clientmk] + \ ['echo-variable-LOCALES_' + app for app in apps] p = Popen(cmd, stdout = PIPE) for ln in p.stdout.readlines(): dirs.update(ln.strip().split()) dirs = sorted(list(dirs)) for d in dirs: assert os.path.isdir(os.path.join(source, d)), \ "expecting source directory %s" % d for d in dirs: logging.debug('processing %s' % d) if d in exceptions and exceptions[d] == 'all': continue basepath = os.path.join(source, d, 'locales', 'en-US') ign_mod = {} if d in exceptions: ign_mod = exceptions[d] logging.debug('using exceptions: %s' % str(ign_mod)) l10nbase = os.path.join(dest, d) if not os.path.isdir(l10nbase): os.makedirs(l10nbase) for root, files in walk(basepath): ignore = None if root in ign_mod: if ign_mod[root] == '.': continue ignore = re.compile(ign_mod[root]) l10npath = os.path.join(l10nbase, root) if not os.path.isdir(l10npath): os.mkdir(l10npath) for f in files: if ignore and ignore.search(f): # ignoring some files continue copy2(os.path.join(basepath, root, f), l10npath)
49a7d6788e9ac5eaf23892dea2ac2731b2f2cf78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13067/49a7d6788e9ac5eaf23892dea2ac2731b2f2cf78/l10n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 19157, 12, 3168, 16, 1570, 16, 8279, 16, 4798, 273, 2618, 4672, 9163, 10210, 279, 394, 17981, 18, 225, 632, 723, 225, 1084, 30, 533, 632, 891, 1084, 30, 589, 358, 326, 27513, 5550...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19157, 12, 3168, 16, 1570, 16, 8279, 16, 4798, 273, 2618, 4672, 9163, 10210, 279, 394, 17981, 18, 225, 632, 723, 225, 1084, 30, 533, 632, 891, 1084, 30, 589, 358, 326, 27513, 5550...
pickle.dump(self.store,f)
try: pos=f.tell() pickle.dump(self.store,f) except: S=self.store.copy() ff=getStringIO() for k,v in S.iteritems(): try: pickle.dump({k:v},ff) except: S[k] = '<unpicklable object %r>' % v f.seek(pos,0) pickle.dump(S,f)
def _dump(self,f): import pickle pickle.dump(self.store,f)
a88a3fa0bac6560af6665baa1d58961ea20fa485 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/a88a3fa0bac6560af6665baa1d58961ea20fa485/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8481, 12, 2890, 16, 74, 4672, 1930, 13379, 13379, 18, 8481, 12, 2890, 18, 2233, 16, 74, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 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, 389, 8481, 12, 2890, 16, 74, 4672, 1930, 13379, 13379, 18, 8481, 12, 2890, 18, 2233, 16, 74, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return reader
app.readers.append(reader)
def load_buffer_cb(textbuffer): notify_cb() error = None
7fdef3684029c1d80eda94dcbfdca62b0de12694 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14744/7fdef3684029c1d80eda94dcbfdca62b0de12694/reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 4106, 67, 7358, 12, 955, 4106, 4672, 5066, 67, 7358, 1435, 555, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 4106, 67, 7358, 12, 955, 4106, 4672, 5066, 67, 7358, 1435, 555, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
app.add_directive('plot', plot_directive, True, (1, 0, False),
app.add_directive('plot', plot_directive, True, (0, 1, False),
def setup(app): setup.app = app setup.config = app.config setup.confdir = app.confdir app.add_config_value('plot_output_dir', '_static', True) app.add_config_value('plot_pre_code', '', True) app.add_config_value('plot_rcparams', sane_rcparameters, True) app.add_config_value('plot_include_source', False, True) app.add_directive('plot', plot_directive, True, (1, 0, False), **plot_directive_options)
f91aedb05477b881587ce6f465f3172c85d0c55d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/f91aedb05477b881587ce6f465f3172c85d0c55d/plot_directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2910, 4672, 3875, 18, 2910, 273, 595, 3875, 18, 1425, 273, 595, 18, 1425, 3875, 18, 3923, 1214, 273, 595, 18, 3923, 1214, 225, 595, 18, 1289, 67, 1425, 67, 1132, 2668, 4032, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2910, 4672, 3875, 18, 2910, 273, 595, 3875, 18, 1425, 273, 595, 18, 1425, 3875, 18, 3923, 1214, 273, 595, 18, 3923, 1214, 225, 595, 18, 1289, 67, 1425, 67, 1132, 2668, 4032, ...
text = text[bol+1:]
bol = bol + 1 while bol < len(text) and text[bol] in string.whitespace: bol = bol + 1 text = text[bol:]
def wrap(text, column=70): """Wrap and fill the text to the specified column. Wrapping is always in effect, although if it is not possible to wrap a line (because some word is longer than `column' characters) the line is broken at the next available whitespace boundary. Paragraphs are also always filled, unless the line begins with whitespace. This is the algorithm that the Python FAQ wizard uses, and seems like a good compromise. """ wrapped = '' # first split the text into paragraphs, defined as a blank line paras = re.split('\n\n', text) for para in paras: # fill lines = [] fillprev = 0 for line in string.split(para, '\n'): if not line: lines.append(line) continue if line[0] in string.whitespace: fillthis = 0 else: fillthis = 1 if fillprev and fillthis: # if the previous line should be filled, then just append a # single space, and the rest of the current line lines[-1] = string.rstrip(lines[-1]) + ' ' + line else: # no fill, i.e. retain newline lines.append(line) fillprev = fillthis # wrap each line for text in lines: while text: if len(text) <= column: line = text text = '' else: bol = column # find the last whitespace character while bol > 0 and text[bol] not in string.whitespace: bol = bol - 1 # now find the last non-whitespace character eol = bol while eol > 0 and text[eol] in string.whitespace: eol = eol - 1 # watch out for text that's longer than the column width if eol == 0: # break on whitespace after column eol = column while eol < len(text) and \ text[eol] not in string.whitespace: eol = eol + 1 bol = eol while bol < len(text) and \ text[bol] in string.whitespace: bol = bol + 1 bol = bol - 1 line = text[:eol+1] + '\n' text = text[bol+1:] wrapped = wrapped + line wrapped = wrapped + '\n' wrapped = wrapped + '\n' return wrapped
cd79e27fb5734e98146264bc722a0a91c574aa24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/cd79e27fb5734e98146264bc722a0a91c574aa24/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 12, 955, 16, 1057, 33, 7301, 4672, 3536, 2964, 471, 3636, 326, 977, 358, 326, 1269, 1057, 18, 225, 4266, 1382, 353, 3712, 316, 5426, 16, 26347, 309, 518, 353, 486, 3323, 358, 219...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 12, 955, 16, 1057, 33, 7301, 4672, 3536, 2964, 471, 3636, 326, 977, 358, 326, 1269, 1057, 18, 225, 4266, 1382, 353, 3712, 316, 5426, 16, 26347, 309, 518, 353, 486, 3323, 358, 219...
def SetMemberName(id, member_offset, name):
def SetMemberName(sid, member_offset, name):
def SetMemberName(id, member_offset, name): """ Change structure member name @param id: structure type ID @param member_offset: offset of the member @param name: new name of the member @return: != 0 - ok. """ s = idaapi.get_struc(id) if not s: return 0 return idaapi.set_member_name(s, member_offset, name)
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4419, 461, 12, 7453, 16, 3140, 67, 3348, 16, 508, 4672, 3536, 7576, 3695, 3140, 508, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 1384, 434, 326, 3140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4419, 461, 12, 7453, 16, 3140, 67, 3348, 16, 508, 4672, 3536, 7576, 3695, 3140, 508, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 1384, 434, 326, 3140, ...
funcls = functions[opts.function] funcargs = prefix_args(FUNCPREFIX, opts) funcargs['dims'] = opts.dims function = funcls(**funcargs)
function = opts.function function.setup(opts.dims)
def setup(opts): """Mrs Setup (run on both master and slave)""" from motion.basic import Basic from simulation import functions from cli import prefix_args global function, motion, comparator funcls = functions[opts.function] funcargs = prefix_args(FUNCPREFIX, opts) funcargs['dims'] = opts.dims function = funcls(**funcargs) #TODO: comparator = opts.soc_maximize and operator.gt or operator.lt comparator = operator.lt motion = Basic(comparator, function.constraints)
e7a386d9fa3677dd7fe4b386e48989bee0f431d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/966/e7a386d9fa3677dd7fe4b386e48989bee0f431d5/mrspso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 4952, 4672, 3536, 49, 5453, 10939, 261, 2681, 603, 3937, 4171, 471, 11735, 15574, 628, 21188, 18, 13240, 1930, 7651, 628, 14754, 1930, 4186, 628, 4942, 1930, 1633, 67, 1968, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 4952, 4672, 3536, 49, 5453, 10939, 261, 2681, 603, 3937, 4171, 471, 11735, 15574, 628, 21188, 18, 13240, 1930, 7651, 628, 14754, 1930, 4186, 628, 4942, 1930, 1633, 67, 1968, 225,...
'network', 'VM',
def VBD_metrics_get_last_updated(self, _1, _2): return xen_api_success(now())
65fb4d66adcb6a0b0e906a04f51a06d09c04a2ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/65fb4d66adcb6a0b0e906a04f51a06d09c04a2ad/XendAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 776, 18096, 67, 9597, 67, 588, 67, 2722, 67, 7007, 12, 2890, 16, 389, 21, 16, 389, 22, 4672, 327, 23048, 67, 2425, 67, 4768, 12, 3338, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 776, 18096, 67, 9597, 67, 588, 67, 2722, 67, 7007, 12, 2890, 16, 389, 21, 16, 389, 22, 4672, 327, 23048, 67, 2425, 67, 4768, 12, 3338, 10756, 2, -100, -100, -100, -100, -100, -100, -...
elif execve_match: cwds.append(cwd) match = execve_match
def _do_strace(self, args, outfile, outname): """ Run strace on given command args, sending output to file. Return (status code, list of dependencies, list of outputs). """ shell('strace', '-fo', outname, '-e', 'trace=open,stat64,execve,exit_group,chdir,mkdir,rename', args, silent=False)
62c48ce0b420b1fe48378d0f1ec717ee941781df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7381/62c48ce0b420b1fe48378d0f1ec717ee941781df/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 701, 623, 12, 2890, 16, 833, 16, 8756, 16, 596, 529, 4672, 3536, 1939, 609, 623, 603, 864, 1296, 833, 16, 5431, 876, 358, 585, 18, 2000, 261, 2327, 981, 16, 666, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 701, 623, 12, 2890, 16, 833, 16, 8756, 16, 596, 529, 4672, 3536, 1939, 609, 623, 603, 864, 1296, 833, 16, 5431, 876, 358, 585, 18, 2000, 261, 2327, 981, 16, 666, 434, ...
y_margin = [ 2, 1 ]
y_margin = [ 1, 1 ]
def amin(a): m=sys.maxint for i in a: if not i == None and i < m: m=i return m
7169412c674120ad9bc19e0ae2900b06f0d5006d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3323/7169412c674120ad9bc19e0ae2900b06f0d5006d/chart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 1154, 12, 69, 4672, 312, 33, 9499, 18, 1896, 474, 364, 277, 316, 279, 30, 309, 486, 277, 422, 599, 471, 277, 411, 312, 30, 312, 33, 77, 327, 312, 225, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 279, 1154, 12, 69, 4672, 312, 33, 9499, 18, 1896, 474, 364, 277, 316, 279, 30, 309, 486, 277, 422, 599, 471, 277, 411, 312, 30, 312, 33, 77, 327, 312, 225, 2, -100, -100, -100, -10...
createDir(basedir)
try: createDir(basedir) except: if not os.path.exists(basedir): raise
def Download(basedir, url): cmps = url.rsplit("/", 1) href = cmps[1] filename = ''.join([basedir, "/", href]) print 'Downloading ' + href + '...' createDir(basedir) proxies = None # if None, use proxy from env var http_proxy if not options.httpProxy == "": proxies = {'http': options.httpProxy} opener = urllib.FancyURLopener(proxies=proxies) opener.retrieve(url, filename)
2ad906783b8f473844958f09bc393447e024ccf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1130/2ad906783b8f473844958f09bc393447e024ccf2/download-cmake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13059, 12, 31722, 16, 880, 4672, 5003, 1121, 273, 880, 18, 86, 4939, 2932, 19, 3113, 404, 13, 3897, 273, 5003, 1121, 63, 21, 65, 1544, 273, 875, 18, 5701, 3816, 31722, 16, 2206, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13059, 12, 31722, 16, 880, 4672, 5003, 1121, 273, 880, 18, 86, 4939, 2932, 19, 3113, 404, 13, 3897, 273, 5003, 1121, 63, 21, 65, 1544, 273, 875, 18, 5701, 3816, 31722, 16, 2206, 3113, ...
idaapi.set_fixup(ea, fd)
idaapi.set_fixup(ea, fd)
def SetFixup(ea, fixuptype, targetsel, targetoff, displ): """ Set fixup information @param ea: address to set fixup information about @param fixuptype: fixup type. see GetFixupTgtType() for possible fixup types. @param targetsel: target selector @param targetoff: target offset @param displ: displacement @return: none """ fd = idaapi.fixup_data_t() fd.type = fixuptype fd.sel = targetsel fd.off = targetoff fd.displacement = displ idaapi.set_fixup(ea, fd)
f6eb09ba783822659c8520f1385c89f40cdd4a71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6984/f6eb09ba783822659c8520f1385c89f40cdd4a71/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 8585, 416, 12, 24852, 16, 2917, 3648, 388, 16, 1018, 1786, 16, 1018, 3674, 16, 1015, 412, 4672, 3536, 1000, 2917, 416, 1779, 225, 632, 891, 24164, 30, 1758, 358, 444, 2917, 416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 8585, 416, 12, 24852, 16, 2917, 3648, 388, 16, 1018, 1786, 16, 1018, 3674, 16, 1015, 412, 4672, 3536, 1000, 2917, 416, 1779, 225, 632, 891, 24164, 30, 1758, 358, 444, 2917, 416, ...
def basic_doc_literal():
def rhqTest():
def basic_doc_literal(): global errors try: url = 'http://localhost:7080/rhq-rhq-enterprise-server-ejb3/WebServiceTestBean?wsdl' start(url) client = Client(url, transport=mytransport) print client # # create name # name = client.factory.create('name') name.first = u'Jeff'+unichr(1234) name.last = 'Ortel &amp;lt; Company' # # create a phone object using the wsdl # phoneA = client.factory.create('phone') phoneA.npa = 410 phoneA.nxx = 555 phoneA.number = 5138 phoneB = client.factory.create('phone') phoneB.npa = 919 phoneB.nxx = 555 phoneB.number = 4406 # # create a person object using the wsdl # person = client.factory.create('person') print person person.name = name person.age = 43 person.phone.append(phoneA) person.phone.append(phoneB) print person # # addPerson() # print 'addPersion()' result = client.service.addPerson(person) sent = client.last_sent() rcvd = client.last_received() print '\nreply(\n%s\n)\n' % result # # create a new name object used to update the person # newname = client.factory.create('name') newname.first = 'Todd' newname.last = None # # update the person's name (using the webservice) # print 'updatePersion()' result = client.service.updatePerson(person, newname) print '\nreply(\n%s\n)\n' % str(result) result = client.service.updatePerson(person, None) print '\nreply(\n%s\n)\n' % str(result) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc() try: print "echo('this is cool')" result = client.service.echo('this is cool') print '\nreply( %s )\n' % str(result) print 'echo(None)' result = client.service.echo(None) print '\nreply( %s )\n' % str(result) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc() try: print 'hello()' result = client.service.hello() print '\nreply( %s )\n' % str(result) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc() try: print 'testVoid()' result = client.service.testVoid() print '\nreply( %s )\n' % str(result) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc() try: mylist = ['my', 'dog', 'likes', 'steak'] print 'testListArgs(%s)' % mylist result = client.service.testListArg(mylist) print '\nreply( %s )\n' % str(result) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc() try: s = 'hello' for n in range(0, 3): print 'getList(%s, %d)' % (s, n) result = client.service.getList(s, n) print '\nreply( %s )\n' % str(result) if len(result) != n: errors += 1 print 'expected (%d), reply (%d)' % (n, len(result)) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc() try: print 'testExceptions()' result = client.service.testExceptions() print '\nreply( %s )\n' % tostr(result) raise Exception('Fault expected and not raised') except WebFault, f: print f print f.fault print f.document except Exception, e: errors += 1 print e tb.print_exc() # # test faults # try: url = 'http://localhost:7080/rhq-rhq-enterprise-server-ejb3/WebServiceTestBean?wsdl' start(url) client = Client(url, faults=False) print 'testExceptions() faults=No' result = client.service.testExceptions() sent = client.last_sent() rcvd = client.last_received() print '\nreply( %s )\n' % str(result) except WebFault, f: errors += 1 print f print f.fault except Exception, e: errors += 1 print e tb.print_exc()
4c882c9a2debbaa4aa8d6233c3b5a8a4d699d429 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5930/4c882c9a2debbaa4aa8d6233c3b5a8a4d699d429/rhq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 6259, 85, 4709, 13332, 225, 2552, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10649, 23,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 6259, 85, 4709, 13332, 225, 2552, 1334, 225, 775, 30, 880, 273, 296, 2505, 2207, 13014, 30, 7301, 3672, 19, 30138, 85, 17, 30138, 85, 17, 2328, 12113, 17, 3567, 17, 73, 10649, 23,...
def assert_completion_not_in_result(self, name, kind, result):
def assert_completion_not_in_result(self, name, scope, result):
def assert_completion_not_in_result(self, name, kind, result): for proposal in result: if proposal.name == name and proposal.kind == kind: self.fail('completion <%s> was proposed' % name)
6d539fe256ff5d47931d765fcb7729894783cbf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8286/6d539fe256ff5d47931d765fcb7729894783cbf0/codeassisttest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 67, 11469, 67, 902, 67, 267, 67, 2088, 12, 2890, 16, 508, 16, 2146, 16, 563, 4672, 364, 14708, 316, 563, 30, 309, 14708, 18, 529, 422, 508, 471, 14708, 18, 9224, 422, 3846, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 67, 11469, 67, 902, 67, 267, 67, 2088, 12, 2890, 16, 508, 16, 2146, 16, 563, 4672, 364, 14708, 316, 563, 30, 309, 14708, 18, 529, 422, 508, 471, 14708, 18, 9224, 422, 3846, 30,...
pdb_path = "%s.pdb" % (basename)
pdb_file = "%s.pdb" % (basename)
def write_tls_pdb_file(self, chain, cpartition): """Write out a PDB file with the TLS predicted anisotropic ADPs for this segmentation. """ basename = "%s_CHAIN%s_NTLS%d_UTLS" % (self.struct_id, chain.chain_id, cpartition.num_tls_segments()) pdb_path = "%s.pdb" % (basename)
81092918682cb3b404793cc6abd4020f9621498a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10674/81092918682cb3b404793cc6abd4020f9621498a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17116, 67, 17414, 67, 768, 12, 2890, 16, 2687, 16, 276, 10534, 4672, 3536, 3067, 596, 279, 21601, 585, 598, 326, 8098, 15071, 392, 17693, 1764, 335, 432, 8640, 87, 364, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17116, 67, 17414, 67, 768, 12, 2890, 16, 2687, 16, 276, 10534, 4672, 3536, 3067, 596, 279, 21601, 585, 598, 326, 8098, 15071, 392, 17693, 1764, 335, 432, 8640, 87, 364, 333, ...
if currency:
if currency and user2.company:
def get_sale_price(self, cursor, user, ids, quantity=0, context=None): ''' Return the sale price for product ids.
e99b34ab0670dbe546e0b34224974812ab78b8f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9306/e99b34ab0670dbe546e0b34224974812ab78b8f3/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 87, 5349, 67, 8694, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 10457, 33, 20, 16, 819, 33, 7036, 4672, 9163, 2000, 326, 272, 5349, 6205, 364, 3017, 3258, 18, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 87, 5349, 67, 8694, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 10457, 33, 20, 16, 819, 33, 7036, 4672, 9163, 2000, 326, 272, 5349, 6205, 364, 3017, 3258, 18, 2, -100, -100, ...
self.env = EnvironmentStub(default_data=True) from trac.core import ComponentMeta self.old_registry = ComponentMeta._registry ComponentMeta._registry = {}
self.env = EnvironmentStub(default_data=False, enable=['%s.%s' % (self.__module__, c) for c in ['Converter0', 'Converter1', 'Converter2']])
def setUp(self): self.env = EnvironmentStub(default_data=True)
a39bc057b60f8f385008daaf573f26ee4c1ea796 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/a39bc057b60f8f385008daaf573f26ee4c1ea796/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 3074, 273, 7518, 11974, 12, 1886, 67, 892, 33, 5510, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24292, 12, 2890, 4672, 365, 18, 3074, 273, 7518, 11974, 12, 1886, 67, 892, 33, 5510, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if check_addr_prefixlen: if IP('%s/%s' % (ip, 32-netbits)).broadcast().int() != last: raise ValueError, \ "the range %s is not on a network boundary." % data
if IP('%s/%s' % (ip, 32-netbits)).broadcast().int() != last: raise ValueError, \ "the range %s is not on a network boundary." % data
def __init__(self, data, ipversion = 0, make_net = 0): """Create an instance of an IP object.
190a5ca170362c7b09eea5d60eb2716fd85d501c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14367/190a5ca170362c7b09eea5d60eb2716fd85d501c/IPy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 16, 2359, 1589, 273, 374, 16, 1221, 67, 2758, 273, 374, 4672, 3536, 1684, 392, 791, 434, 392, 2971, 733, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 16, 2359, 1589, 273, 374, 16, 1221, 67, 2758, 273, 374, 4672, 3536, 1684, 392, 791, 434, 392, 2971, 733, 18, 2, -100, -100, -100, -100, -100, -100, ...
self.targets[tag['name']] = target elif tag.has_key('href') and not self.link_exclude.match(tag['href']): purl = urlparse(tag['href']) path = unquote(purl[2]) if path and os.access(path, os.R_OK) and os.path.splitext(path)[1][1:].lower() in \ ['png', 'jpg', 'bmp', 'jpeg']: self.process_image(path, tag_css) else: text = self.get_text(tag, limit=1000) if not text.strip(): text = "Link" self.add_text(text, tag_css) self.links.append(HTMLConverter.Link(self.current_para.contents[-1], tag))
self.targets[tag[key]] = target
def parse_tag(self, tag, parent_css): try: tagname = tag.name.lower() except AttributeError: if not isinstance(tag, HTMLConverter.IGNORED_TAGS): self.add_text(tag, parent_css) return tag_css = self.tag_css(tag, parent_css=parent_css) try: # Skip element if its display attribute is set to none if tag_css['display'].lower() == 'none' or \ tag_css['visibility'].lower() == 'hidden': return except KeyError: pass if 'page-break-before' in tag_css.keys(): if tag_css['page-break-before'].lower() != 'avoid': self.end_page() tag_css.pop('page-break-before') end_page = False if 'page-break-after' in tag_css.keys() and \ tag_css['page-break-after'].lower() != 'avoid': end_page = True tag_css.pop('page-break-after') if self.force_page_break.match(tagname): self.end_page() self.page_break_found = True if not self.page_break_found and self.page_break.match(tagname): if len(self.current_page.contents) > 3: self.end_page() if self.verbose: print 'Forcing page break at', tagname if tagname in ["title", "script", "meta", 'del', 'frameset']: pass elif tagname == 'a' and self.max_link_levels >= 0: if tag.has_key('name'): if self.anchor_to_previous: self.process_children(tag, tag_css) for c in self.anchor_to_previous.contents: if isinstance(c, (TextBlock, ImageBlock)): self.targets[tag['name']] = c return tb = self.book.create_text_block() tb.Paragraph(" ") self.anchor_to_previous.append(tb) self.targets[tag['name']] = tb return previous = self.current_block self.process_children(tag, tag_css) target = None if self.current_block == previous: self.current_para.append_to(self.current_block) self.current_para = Paragraph() if self.current_block.has_text(): target = self.current_block else: target = BlockSpace() self.current_page.append(target) else: found = False for item in self.current_page.contents: if item == previous: found = True continue if found: target = item break if target and not isinstance(target, (TextBlock, ImageBlock)): if isinstance(target, RuledLine): target = self.book.create_text_block(textStyle=self.current_block.textStyle, blockStyle=self.current_block.blockStyle) target.Paragraph(' ') self.current_page.append(target) else: target = BlockSpace() self.current_page.append(target) if target == None: if self.current_block.has_text(): target = self.current_block else: target = BlockSpace() self.current_page.append(target) self.targets[tag['name']] = target elif tag.has_key('href') and not self.link_exclude.match(tag['href']): purl = urlparse(tag['href']) path = unquote(purl[2]) if path and os.access(path, os.R_OK) and os.path.splitext(path)[1][1:].lower() in \ ['png', 'jpg', 'bmp', 'jpeg']: self.process_image(path, tag_css) else: text = self.get_text(tag, limit=1000) if not text.strip(): text = "Link" self.add_text(text, tag_css) self.links.append(HTMLConverter.Link(self.current_para.contents[-1], tag)) elif tagname == 'img': if tag.has_key('src') and os.access(unquote(tag['src']), os.R_OK): path = os.path.abspath(unquote(tag['src'])) width, height = None, None try: width = int(tag['width']) height = int(tag['height']) except: pass dropcaps = tag.has_key('class') and tag['class'] == 'libprs500_dropcaps' self.process_image(path, tag_css, width, height, dropcaps=dropcaps) else: if self.verbose: print >>sys.stderr, "Failed to process:", tag elif tagname in ['style', 'link']: def update_css(ncss): for key in ncss.keys(): if self.css.has_key(key): self.css[key].update(ncss[key]) else: self.css[key] = ncss[key] ncss = {} if tagname == 'style': for c in tag.contents: if isinstance(c, NavigableString): ncss.update(self.parse_css(str(c))) elif tag.has_key('type') and tag['type'] == "text/css" \ and tag.has_key('href'): purl = urlparse(tag['href']) path = unquote(purl[2]) try: f = open(path, 'rb') src = f.read() f.close() match = self.PAGE_BREAK_PAT.search(src) if match and not re.match('avoid', match.group(1), re.IGNORECASE): self.page_break_found = True ncss = self.parse_css(src) except IOError: pass if ncss: update_css(ncss) elif tagname == 'pre': for c in tag.findAll(True): c.replaceWith(self.get_text(c)) self.end_current_para() self.current_block.append_to(self.current_page) attrs = Span.translate_attrs(tag_css, self.profile.dpi, self.fonts, self.font_delta, self.memory) attrs['fontfacename'] = self.fonts['mono']['normal'][1] ts = self.book.create_text_style(**self.unindented_style.attrs) ts.attrs.update(attrs) self.current_block = self.book.create_text_block( blockStyle=self.current_block.blockStyle, textStyle=ts) src = ''.join([str(i) for i in tag.contents]) lines = src.split('\n') for line in lines: try: self.current_para.append(line) self.current_para.CR() except ConversionError: pass self.end_current_block() self.current_block = self.book.create_text_block() elif tagname in ['ul', 'ol', 'dl']: self.list_level += 1 if tagname == 'ol': old_counter = self.list_counter self.list_counter = 1 prev_bs = self.current_block.blockStyle self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = self.list_indent*self.list_level bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style) self.process_children(tag, tag_css) self.end_current_block() self.current_block.blockStyle = prev_bs self.list_level -= 1 if tagname == 'ol': self.list_counter = old_counter elif tagname in ['li', 'dt', 'dd']: margin = self.list_indent*self.list_level if tagname == 'dd': margin += 80 if int(self.current_block.blockStyle.attrs['sidemargin']) != margin: self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = margin attrs['blockwidth'] = int(attrs['blockwidth']) + margin bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style)
b6075d3dd6c27ae601bd9acb1970998212e8ed19 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/b6075d3dd6c27ae601bd9acb1970998212e8ed19/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2692, 12, 2890, 16, 1047, 16, 982, 67, 5212, 4672, 775, 30, 25586, 273, 1047, 18, 529, 18, 8167, 1435, 1335, 6394, 30, 309, 486, 1549, 12, 2692, 16, 3982, 5072, 18, 3047, 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, 1109, 67, 2692, 12, 2890, 16, 1047, 16, 982, 67, 5212, 4672, 775, 30, 25586, 273, 1047, 18, 529, 18, 8167, 1435, 1335, 6394, 30, 309, 486, 1549, 12, 2692, 16, 3982, 5072, 18, 3047, 3...
def revert(self, files='', options=''):
def revert(self, files='', options='', rev=None):
def revert(self, files='', options=''): """ Revert files or dirs to their states as of some revision
7d837f2ab8cc60d954fea3b3f277a4fcef78640f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/7d837f2ab8cc60d954fea3b3f277a4fcef78640f/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 12, 2890, 16, 1390, 2218, 2187, 702, 2218, 2187, 5588, 33, 7036, 4672, 3536, 868, 1097, 1390, 578, 7717, 358, 3675, 5493, 487, 434, 2690, 6350, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 15226, 12, 2890, 16, 1390, 2218, 2187, 702, 2218, 2187, 5588, 33, 7036, 4672, 3536, 868, 1097, 1390, 578, 7717, 358, 3675, 5493, 487, 434, 2690, 6350, 2, -100, -100, -100, -100, -100, -1...
r, phi = complex(r), complex(phi)
def rect(r, phi): r, phi = complex(r), complex(phi) return complex(r * math.cos(phi), r * math.sin(phi))
d265b40c2f1e228c0cbd532ea68ae4f9079e1876 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/d265b40c2f1e228c0cbd532ea68ae4f9079e1876/cmath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4917, 12, 86, 16, 7706, 4672, 327, 7233, 12, 86, 380, 4233, 18, 14445, 12, 9973, 3631, 436, 380, 4233, 18, 21861, 12, 9973, 3719, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4917, 12, 86, 16, 7706, 4672, 327, 7233, 12, 86, 380, 4233, 18, 14445, 12, 9973, 3631, 436, 380, 4233, 18, 21861, 12, 9973, 3719, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100...
def test_convert_to_phylip32(self): """Convert FASTA to PHYLIP 3.2 format.""" self.conversion(11, "phy", "phylip")
def test_convert_to_phylip32(self): """Convert FASTA to PHYLIP 3.2 format.""" self.conversion(11, "phy", "phylip")
60c6dbb802b2cfe55e5183e45dfff540b247cb1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/60c6dbb802b2cfe55e5183e45dfff540b247cb1a/test_Prank_tool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6283, 67, 869, 67, 844, 93, 3169, 1578, 12, 2890, 4672, 3536, 2723, 24239, 37, 358, 15490, 61, 2053, 52, 890, 18, 22, 740, 12123, 365, 18, 20990, 12, 2499, 16, 315, 844, 93...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6283, 67, 869, 67, 844, 93, 3169, 1578, 12, 2890, 4672, 3536, 2723, 24239, 37, 358, 15490, 61, 2053, 52, 890, 18, 22, 740, 12123, 365, 18, 20990, 12, 2499, 16, 315, 844, 93...
print >> sys.stderr, __doc__ % globals()
"""Print usage message and exit. Uses stderr if code != 0.""" if code == 0: out = sys.stdout else: out = sys.stderr print >> out, __doc__ % globals()
def usage(code, msg=''): print >> sys.stderr, __doc__ % globals() if msg: print >> sys.stderr, msg sys.exit(code)
eab357004ac61bf1eb4f4332d07b6d81ef1d1c3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/eab357004ac61bf1eb4f4332d07b6d81ef1d1c3b/pep2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 710, 16, 1234, 2218, 11, 4672, 3536, 5108, 4084, 883, 471, 2427, 18, 225, 14854, 4514, 309, 981, 480, 374, 12123, 309, 981, 422, 374, 30, 596, 273, 2589, 18, 10283, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 710, 16, 1234, 2218, 11, 4672, 3536, 5108, 4084, 883, 471, 2427, 18, 225, 14854, 4514, 309, 981, 480, 374, 12123, 309, 981, 422, 374, 30, 596, 273, 2589, 18, 10283, 469, 30, ...
help='can you grab your own flag')
help='enables grabbing your own flag')
def parse_cli_args(self, args): p = optparse.OptionParser()
21393d81a7e0665fa2100f39559b9d2d20eb0227 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9601/21393d81a7e0665fa2100f39559b9d2d20eb0227/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4857, 67, 1968, 12, 2890, 16, 833, 4672, 293, 273, 2153, 2670, 18, 1895, 2678, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4857, 67, 1968, 12, 2890, 16, 833, 4672, 293, 273, 2153, 2670, 18, 1895, 2678, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return self.open_database(_sqlitecache.update_filelist(location, checksum))
return self.open_database(_sqlitecache.update_filelist(location, checksum, self.callback))
def getFilelists(self, location, checksum): """Load filelist.xml.gz from an sqlite cache and update it if required""" return self.open_database(_sqlitecache.update_filelist(location, checksum))
d56127a5ce286fc95e5f57bb574fefc23a7db216 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2779/d56127a5ce286fc95e5f57bb574fefc23a7db216/sqlitecache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2812, 330, 292, 1486, 12, 2890, 16, 2117, 16, 6697, 4672, 3536, 2563, 26204, 18, 2902, 18, 9764, 628, 392, 16184, 1247, 471, 1089, 518, 309, 1931, 8395, 327, 365, 18, 3190, 67, 6231, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2812, 330, 292, 1486, 12, 2890, 16, 2117, 16, 6697, 4672, 3536, 2563, 26204, 18, 2902, 18, 9764, 628, 392, 16184, 1247, 471, 1089, 518, 309, 1931, 8395, 327, 365, 18, 3190, 67, 6231, 2...
pieces = l.rstrip().split(' ') assert len(pieces)>1, "Cannot parse %r as a patch timestamp" % l date = ' '.join(pieces[:2]) author = ' '.join(pieces[2:]) y,m,d,hh,mm,ss,d1,d2,d3 = strptime(date, "%a %b %d %H:%M:%S %Z %Y")
pieces = fsep.split(l.rstrip(), 8) assert len(pieces)>=7, "Cannot parse %r as a patch timestamp" % l date = ' '.join(pieces[:8]) author = pieces[8] y,m,d,hh,mm,ss,d1,d2,d3 = strptime(date, "%a %b %d %H %M %S %Z %Y")
def _parseDarcsPull(self, output): """Process 'darcs pull' output to Changesets. """ from datetime import datetime from time import strptime from sha import new from vcpx.changes import Changeset
b89a44daa5b9d76bf24a2b3328f1784a9448a34e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5981/b89a44daa5b9d76bf24a2b3328f1784a9448a34e/source.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 40, 297, 2143, 9629, 12, 2890, 16, 876, 4672, 3536, 2227, 296, 72, 297, 2143, 6892, 11, 876, 358, 17776, 2413, 18, 3536, 628, 3314, 1930, 3314, 628, 813, 1930, 17572, 628, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 40, 297, 2143, 9629, 12, 2890, 16, 876, 4672, 3536, 2227, 296, 72, 297, 2143, 6892, 11, 876, 358, 17776, 2413, 18, 3536, 628, 3314, 1930, 3314, 628, 813, 1930, 17572, 628, 6...
def true (): return True
def true (): return True
3004e3e23864b855bd231b5918342e70e2449275 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/3004e3e23864b855bd231b5918342e70e2449275/producer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 638, 1832, 30, 327, 1053, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 638, 1832, 30, 327, 1053, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
response = None:
response = None
def main(): # initialize the gmail module success,explanation_str = send_gmail.init_gmail() if not success: integrationtestlib.log(explanation_str) sys.exit(0) #add Eric Kimbrel to the email notify list integrationtestlib.notify_list.append("lekimbrel@gmail.com") # PART 1 verify that there are at least 10 nat forwarders running integrationtestlib.log("Looking up nat forwarders") try: nodes = nat_forwarder_list_lookup() except: nodes = [] #make sure we fail if there was an excpetion if len(nodes) < 10: integrationtestlib.log('WARNING: only '+str(len(nodes))+' forwarders are running!') integrationtestlib.notify('WARNING: test_nat_servers_running.py FAILED, only '+str(len(servers))+' nat forwarders are running!') # PART 2 check that nat forwarders are responsive integrationtestlib.log("Checking that we can talk to a nat forwarder") try: response = nat_check_bi_directional(getmyip(),55000) except: response = None: if response != True and response != False: integrationtestlib.log('WARNING: nat forwarders appear un-responsive') integrationtestlib.notify('WARNING: test_nat_servers_running.py FAILED, nat forwarders did not respond')
41c6650cfe184f9d7788348c15ad02488b0f3182 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/41c6650cfe184f9d7788348c15ad02488b0f3182/test_nat_servers_running.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 4046, 326, 314, 4408, 1605, 2216, 16, 338, 15854, 67, 701, 273, 1366, 67, 75, 4408, 18, 2738, 67, 75, 4408, 1435, 309, 486, 2216, 30, 12040, 3813, 2941, 18, 1330, 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, 2774, 13332, 468, 4046, 326, 314, 4408, 1605, 2216, 16, 338, 15854, 67, 701, 273, 1366, 67, 75, 4408, 18, 2738, 67, 75, 4408, 1435, 309, 486, 2216, 30, 12040, 3813, 2941, 18, 1330, 12,...
context.Message( '%s >= %s not found.' %(pkg, version) ) Exit(1)
return False
def CheckDependencies(env, deps): conf = env.Configure( custom_tests = { 'CheckVersion' : CheckVersion, 'CheckPackage' : CheckPackage }) for pkg, version in deps.iteritems(): if not conf.CheckPackage( pkg, version ): context.Message( '%s >= %s not found.' %(pkg, version) ) Exit(1) env = conf.Finish()
63682645e209ed898cc35f01b7b74084aa62fc1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5456/63682645e209ed898cc35f01b7b74084aa62fc1d/pkgconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 8053, 12, 3074, 16, 8740, 4672, 2195, 273, 1550, 18, 11207, 12, 1679, 67, 16341, 273, 288, 296, 1564, 1444, 11, 294, 2073, 1444, 16, 296, 1564, 2261, 11, 294, 2073, 2261, 289, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 8053, 12, 3074, 16, 8740, 4672, 2195, 273, 1550, 18, 11207, 12, 1679, 67, 16341, 273, 288, 296, 1564, 1444, 11, 294, 2073, 1444, 16, 296, 1564, 2261, 11, 294, 2073, 2261, 289, 13...
images = [j for j in range(metadata['start'], metadata['end'] + 1)]
images = range(metadata['start'], metadata['end'] + 1)
def write_xds_inp_index(metadata): '''Write an XDS.INP file from the metadata obtained already. N.B. this will assume that the beam direction and rotation axis correspond to the usual definitions for ADSC images on beamlines.''' fout = open('XDS.INP', 'w') fout.write('JOB=XYCORR INIT COLSPOT IDXREF\n') fout.write('DETECTOR=%s MINIMUM_VALID_PIXEL_VALUE=1 OVERLOAD=65000\n' % metadata['detector']) fout.write('DIRECTION_OF_DETECTOR_X-AXIS= 1.0 0.0 0.0\n') fout.write('DIRECTION_OF_DETECTOR_Y-AXIS= 0.0 1.0 0.0\n') fout.write('TRUSTED_REGION=0.0 1.41\n') fout.write('MAXIMUM_NUMBER_OF_PROCESSORS=%d\n' % get_number_cpus()) fout.write('NX=%d NY=%d QX=%.5f QY=%5f\n' % \ (metadata['size'][0], metadata['size'][1], metadata['pixel'][0], metadata['pixel'][1])) # N.B. assuming that the direct beam for XDS is the same as Mosflm, # with X, Y swapped and converted to pixels from mm. orgx = metadata['beam'][1] / metadata['pixel'][1] orgy = metadata['beam'][0] / metadata['pixel'][0] fout.write('ORGX=%.1f ORGY=%.1f\n' % (orgx, orgy)) fout.write('ROTATION_AXIS= 1.0 0.0 0.0\n') fout.write('DETECTOR_DISTANCE=%.2f\n' % metadata['distance']) fout.write('X-RAY_WAVELENGTH=%.5f\n' % metadata['wavelength']) fout.write('OSCILLATION_RANGE=%.3f\n' % metadata['oscillation'][1]) fout.write('INCIDENT_BEAM_DIRECTION=0.0 0.0 1.0\n') fout.write('FRACTION_OF_POLARIZATION=0.95\n') fout.write('POLARIZATION_PLANE_NORMAL=0.0 1.0 0.0\n') fout.write('FRIEDEL\'S_LAW=FALSE\n') fout.write('NAME_TEMPLATE_OF_DATA_FRAMES=%s\n' % \ os.path.join(metadata['directory'], metadata['template'].replace('#', '?'))) fout.write('STARTING_ANGLE=%.3f STARTING_FRAME=%d\n' % \ (metadata['oscillation'][0], metadata['start'])) fout.write('DATA_RANGE=%d %d\n' % (metadata['start'], metadata['end'])) # compute the background range as min(all, 5) if metadata['end'] - metadata['start'] > 5: fout.write('BACKGROUND_RANGE=%d %d\n' % (metadata['start'], metadata['start'] + 5)) else: fout.write('BACKGROUND_RANGE=%d %d\n' % (metadata['start'], metadata['end'])) # by default autoindex off all images - can make this better later on. # Ok: I think it is too slow already. Three wedges, as per xia2... # that would be 5 images per wedge, then. images = [j for j in range(metadata['start'], metadata['end'] + 1)] wedge = (images[0], images[0] + 4) fout.write('SPOT_RANGE=%d %d\n' % wedge) # if we have more than 90 degrees of data, use wedges at the start, # 45 degrees in and 90 degrees in, else use a wedge at the start, # one in the middle and one at the end. if int(90.0 / metadata['oscillation'][1]) + 4 in images: wedge = (int(45.0 / metadata['oscillation'][1]), int(45.0 / metadata['oscillation'][1]) + 4) fout.write('SPOT_RANGE=%d %d\n' % wedge) wedge = (int(90.0 / metadata['oscillation'][1]), int(90.0 / metadata['oscillation'][1]) + 4) fout.write('SPOT_RANGE=%d %d\n' % wedge) else: mid = (len(images) / 2) - 4 + images[0] - 1 wedge = (mid, mid + 4) fout.write('SPOT_RANGE=%d %d\n' % wedge) wedge = (images[-5], images[-1]) fout.write('SPOT_RANGE=%d %d\n' % wedge) fout.close() return
a804b4416c6a57ed03555e688ee929e1fadf5fb5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3290/a804b4416c6a57ed03555e688ee929e1fadf5fb5/fast_dp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 92, 2377, 67, 31647, 67, 1615, 12, 4165, 4672, 9163, 3067, 392, 1139, 3948, 18, 706, 52, 585, 628, 326, 1982, 12700, 1818, 18, 423, 18, 38, 18, 333, 903, 6750, 716, 326, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 92, 2377, 67, 31647, 67, 1615, 12, 4165, 4672, 9163, 3067, 392, 1139, 3948, 18, 706, 52, 585, 628, 326, 1982, 12700, 1818, 18, 423, 18, 38, 18, 333, 903, 6750, 716, 326, 16...
if os.path.exists(url) and os.access(os.W_OK):
if os.path.exists(url) and os.access(url, os.W_OK):
def _getLocalTroves(troveList): if not self.localRep or not troveList: return [ None ] * len(troveList)
8fa8c00ade7e22e2145cd732f587398426e5f4cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/8fa8c00ade7e22e2145cd732f587398426e5f4cc/netclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2042, 56, 303, 3324, 12, 88, 303, 537, 682, 4672, 309, 486, 365, 18, 3729, 18933, 578, 486, 23432, 537, 682, 30, 327, 306, 599, 308, 380, 562, 12, 88, 303, 537, 682, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2042, 56, 303, 3324, 12, 88, 303, 537, 682, 4672, 309, 486, 365, 18, 3729, 18933, 578, 486, 23432, 537, 682, 30, 327, 306, 599, 308, 380, 562, 12, 88, 303, 537, 682, 13, ...
self.push('211-%s %s status:\r\n' %(__pname__, __ver__))
self.push('211-FTP server status:\r\n')
def ftp_STAT(self, line): """Return statistics about current ftp session. If an argument is provided return directory listing over command channel. """ # return STATus information about ftpd if not line: s = [] s.append('Connected to: %s:%s' %self.socket.getsockname()) if self.authenticated: s.append('Logged in as: %s' %self.username) else: if not self.username: s.append("Waiting for username.") else: s.append("Waiting for password.") if self.current_type == 'a': type = 'ASCII' else: type = 'Binary' s.append("TYPE: %s; STRUcture: File; MODE: Stream" %type) if self.data_server: s.append('Passive data channel waiting for connection.') elif self.data_channel: dc = self.data_channel s.append('Data connection open:') s.append('Total bytes sent: %s' %dc.tot_bytes_sent) s.append('Total bytes received: %s' %dc.tot_bytes_received) else: s.append('Data connection closed.') self.push('211-%s %s status:\r\n' %(__pname__, __ver__)) self.push(''.join([' %s\r\n' %item for item in s])) self.respond('211 End of status.')
8e85073db3fe21c86d1703f17ffb309e9d4d0552 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/8e85073db3fe21c86d1703f17ffb309e9d4d0552/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 28549, 12, 2890, 16, 980, 4672, 3536, 990, 7691, 2973, 783, 13487, 1339, 18, 971, 392, 1237, 353, 2112, 327, 1867, 11591, 1879, 1296, 1904, 18, 3536, 468, 327, 2347, 789, 407,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 28549, 12, 2890, 16, 980, 4672, 3536, 990, 7691, 2973, 783, 13487, 1339, 18, 971, 392, 1237, 353, 2112, 327, 1867, 11591, 1879, 1296, 1904, 18, 3536, 468, 327, 2347, 789, 407,...
msg = '["%s",%s,%s,%s,%s]' % (
message = '["%s",%s,%s,%s,%s]' % (
def handle_scope_message(self, msg): msg = '["%s",%s,%s,%s,%s]' % ( msg[1], # service msg[2], # command msg[4], # status msg[5], # tag msg[8], # payload ) if self.debug: pretty_print("send to client:", msg, self.debug_format, self.debug_format_payload) self.send_message(msg)
c13b2ba635ee2da491abf2bb3ad577d14bd228e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10923/c13b2ba635ee2da491abf2bb3ad577d14bd228e9/stpwebsocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4887, 67, 2150, 12, 2890, 16, 1234, 4672, 883, 273, 5271, 28385, 87, 3113, 9, 87, 15529, 87, 15529, 87, 15529, 87, 3864, 738, 261, 1234, 63, 21, 6487, 468, 1156, 1234, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4887, 67, 2150, 12, 2890, 16, 1234, 4672, 883, 273, 5271, 28385, 87, 3113, 9, 87, 15529, 87, 15529, 87, 15529, 87, 3864, 738, 261, 1234, 63, 21, 6487, 468, 1156, 1234, 63, ...
try: execv(tempfile.mktemp(), ())
try: execv(tempfile.mktemp(), ('blah',))
def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if env.has_key('PATH'): envpath = env['PATH'] else: envpath = defpath PATH = envpath.split(pathsep) if not _notfound: import tempfile # Exec a file that is guaranteed not to exist try: execv(tempfile.mktemp(), ()) except error, _notfound: pass exc, arg = error, _notfound for dir in PATH: fullname = path.join(dir, file) try: apply(func, (fullname,) + argrest) except error, (errno, msg): if errno != arg[0]: exc, arg = error, (errno, msg) raise exc, arg
bf7f42d2874f701cc9aecbef609a469e11717a10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bf7f42d2874f701cc9aecbef609a469e11717a10/os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196...
dest = '%s?rev=%s' % (dest['_id'], dest['_rev'])
dest = '%s?%s' % (unicode_quote(dest['_id']), unicode_urlencode({'rev': dest['_rev']}))
def copy(self, src, dest): """Copy the given document to create a new document.
14559955d28383771e075ad211b5c776127cbddd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9373/14559955d28383771e075ad211b5c776127cbddd/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 1705, 16, 1570, 4672, 3536, 2951, 326, 864, 1668, 358, 752, 279, 394, 1668, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 1705, 16, 1570, 4672, 3536, 2951, 326, 864, 1668, 358, 752, 279, 394, 1668, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return None
return classes[0][1]
def compile_recipe(src): ''' Compile the code in src and return the first object that is a recipe or profile. @param src: Python source code @type src: string @return: Recipe/Profile class or None, if no such class was found in C{src} ''' locals = {} exec src in globals(), locals for obj in locals.values(): if type(obj) is type and obj.__name__ not in basic_recipe_names: for base in obj.__bases__: if base in basic_recipes: return obj return None
fea37f24ae5a1f5bcdf7622ca962d778e947af1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/fea37f24ae5a1f5bcdf7622ca962d778e947af1c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3927, 3151, 12, 4816, 4672, 9163, 16143, 326, 981, 316, 1705, 471, 327, 326, 1122, 733, 716, 353, 279, 16100, 578, 3042, 18, 632, 891, 1705, 30, 6600, 1084, 981, 632, 723, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3927, 3151, 12, 4816, 4672, 9163, 16143, 326, 981, 316, 1705, 471, 327, 326, 1122, 733, 716, 353, 279, 16100, 578, 3042, 18, 632, 891, 1705, 30, 6600, 1084, 981, 632, 723, 17...
evt = ev.Io(fileno, ev.EV_WRITE, self._evloop, write, fileno)
evt = libev.Io(fileno, libev.EV_WRITE, self._evloop, write, fileno)
def add_descriptor(self, fileno, read=None, write=None, exc=None): if read: evt = event.Io(fileno, ev.EV_READ, self._evloop, read, fileno) evt.start() self.readers[fileno] = evt, read
dd926e62e8470f0b70059a4a46ec4fe05ba666d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/dd926e62e8470f0b70059a4a46ec4fe05ba666d6/libev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 12628, 12, 2890, 16, 24256, 16, 855, 33, 7036, 16, 1045, 33, 7036, 16, 3533, 33, 7036, 4672, 309, 855, 30, 6324, 273, 871, 18, 15963, 12, 7540, 5764, 16, 2113, 18, 24427, 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, 527, 67, 12628, 12, 2890, 16, 24256, 16, 855, 33, 7036, 16, 1045, 33, 7036, 16, 3533, 33, 7036, 4672, 309, 855, 30, 6324, 273, 871, 18, 15963, 12, 7540, 5764, 16, 2113, 18, 24427, 67...
if scheme == 'https': self.server = m2xmlrpclib.ServerProxy(rbuilderUrl) else: self.server = xmlrpclib.ServerProxy(rbuilderUrl)
rbuilderUrl = urlparse.urlunsplit((scheme, netloc, path, '', '')) self.server = xmlrpclib.ServerProxy(rbuilderUrl)
def __init__(self, rbuilderUrl, user, pw): scheme, netloc, path, query, fragment = urlparse.urlsplit(rbuilderUrl) path = 'xmlrpc-private' netloc = netloc.split('@', 1)[-1] netloc = '%s:%s@' % (user, pw) + netloc rbuilderUrl = urlparse.urlunsplit( (scheme, netloc, path, query, fragment))
9e439cf11b693b8679104b8c826d784f045b5405 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8749/9e439cf11b693b8679104b8c826d784f045b5405/rbuilderclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7138, 953, 1489, 16, 729, 16, 8772, 4672, 4355, 16, 17345, 16, 589, 16, 843, 16, 5481, 273, 15185, 18, 718, 4939, 12, 6731, 953, 1489, 13, 589, 273, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7138, 953, 1489, 16, 729, 16, 8772, 4672, 4355, 16, 17345, 16, 589, 16, 843, 16, 5481, 273, 15185, 18, 718, 4939, 12, 6731, 953, 1489, 13, 589, 273, 29...
self.logger.info("line state mask: 0x%02" % (self.linstate_mask,))
self.logger.info("line state mask: 0x%02x" % (self.linstate_mask,))
def _telnetProcessSubnegotiation(self, suboption): """Process subnegotiation, the data between IAC SB and IAC SE.""" if suboption[0:1] == COM_PORT_OPTION: if self.logger: self.logger.debug('received COM_PORT_OPTION: %r' % (suboption,)) if suboption[1:2] == SET_BAUDRATE: backup = self.serial.baudrate try: (self.serial.baudrate,) = struct.unpack("!I", suboption[2:6]) except ValueError, e: if self.logger: self.logger.error("failed to set baud rate: %s" % (e,)) self.serial.baudrate = backup else: if self.logger: self.logger.info("changed baud rate: %s" % (self.serial.baudrate,)) self.rfc2217SendSubnegotiation(SERVER_SET_BAUDRATE, struct.pack("!I", self.serial.baudrate)) elif suboption[1:2] == SET_DATASIZE: backup = self.serial.bytesize try: (self.serial.bytesize,) = struct.unpack("!B", suboption[2:3]) except ValueError, e: if self.logger: self.logger.error("failed to set data size: %s" % (e,)) self.serial.bytesize = backup else: if self.logger: self.logger.info("changed data size: %s" % (self.serial.bytesize,)) self.rfc2217SendSubnegotiation(SERVER_SET_DATASIZE, struct.pack("!B", self.serial.bytesize)) elif suboption[1:2] == SET_PARITY: backup = self.serial.parity try: self.serial.parity = RFC2217_REVERSE_PARITY_MAP[struct.unpack("!B", suboption[2:3])[0]] except ValueError, e: if self.logger: self.logger.error("failed to set parity: %s" % (e,)) self.serial.parity = backup else: if self.logger: self.logger.info("changed parity: %s" % (self.serial.parity,)) self.rfc2217SendSubnegotiation( SERVER_SET_PARITY, struct.pack("!B", RFC2217_PARITY_MAP[self.serial.parity]) ) elif suboption[1:2] == SET_STOPSIZE: backup = self.serial.stopbits try: self.serial.stopbits = RFC2217_REVERSE_STOPBIT_MAP[struct.unpack("!B", suboption[2:3])[0]] except ValueError, e: if self.logger: self.logger.error("failed to set stop bits: %s" % (e,)) self.serial.stopbits = backup else: if self.logger: self.logger.info("changed stop bits: %s" % (self.serial.stopbits,)) self.rfc2217SendSubnegotiation( SERVER_SET_STOPSIZE, struct.pack("!B", RFC2217_STOPBIT_MAP[self.serial.stopbits]) ) elif suboption[1:2] == SET_CONTROL: if suboption[2:3] == SET_CONTROL_REQ_FLOW_SETTING: if self.serial.xonxoff: self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_USE_SW_FLOW_CONTROL) elif self.serial.rtscts: self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_USE_HW_FLOW_CONTROL) else: self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_USE_NO_FLOW_CONTROL) elif suboption[2:3] == SET_CONTROL_USE_NO_FLOW_CONTROL: self.serial.xonxoff = False self.serial.rtscts = False if self.logger: self.logger.info("changed flow control to None") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_USE_NO_FLOW_CONTROL) elif suboption[2:3] == SET_CONTROL_USE_SW_FLOW_CONTROL: self.serial.xonxoff = True if self.logger: self.logger.info("changed flow control to XON/XOFF") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_USE_SW_FLOW_CONTROL) elif suboption[2:3] == SET_CONTROL_USE_HW_FLOW_CONTROL: self.serial.rtscts = True if self.logger: self.logger.info("changed flow control to RTS/CTS") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_USE_HW_FLOW_CONTROL) elif suboption[2:3] == SET_CONTROL_REQ_BREAK_STATE: if self.logger: self.logger.warning("requested break state - not implemented") pass # XXX needs cached value elif suboption[2:3] == SET_CONTROL_BREAK_ON: self.serial.setBreak(True) if self.logger: self.logger.info("changed BREAK to active") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_BREAK_ON) elif suboption[2:3] == SET_CONTROL_BREAK_OFF: self.serial.setBreak(False) if self.logger: self.logger.info("changed BREAK to inactive") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_BREAK_OFF) elif suboption[2:3] == SET_CONTROL_REQ_DTR: if self.logger: self.logger.warning("requested DTR state - not implemented") pass # XXX needs cached value elif suboption[2:3] == SET_CONTROL_DTR_ON: self.serial.setDTR(True) if self.logger: self.logger.info("changed DTR to active") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_DTR_ON) elif suboption[2:3] == SET_CONTROL_DTR_OFF: self.serial.setDTR(False) if self.logger: self.logger.info("changed DTR to inactive") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_DTR_OFF) elif suboption[2:3] == SET_CONTROL_REQ_RTS: if self.logger: self.logger.warning("requested RTS state - not implemented") pass # XXX needs cached value #~ self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_RTS_ON) elif suboption[2:3] == SET_CONTROL_RTS_ON: self.serial.setRTS(True) if self.logger: self.logger.info("changed RTS to active") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_RTS_ON) elif suboption[2:3] == SET_CONTROL_RTS_OFF: self.serial.setRTS(False) if self.logger: self.logger.info("changed RTS to inactive") self.rfc2217SendSubnegotiation(SERVER_SET_CONTROL, SET_CONTROL_RTS_OFF) #~ elif suboption[2:3] == SET_CONTROL_REQ_FLOW_SETTING_IN: #~ elif suboption[2:3] == SET_CONTROL_USE_NO_FLOW_CONTROL_IN: #~ elif suboption[2:3] == SET_CONTROL_USE_SW_FLOW_CONTOL_IN: #~ elif suboption[2:3] == SET_CONTROL_USE_HW_FLOW_CONTOL_IN: #~ elif suboption[2:3] == SET_CONTROL_USE_DCD_FLOW_CONTROL: #~ elif suboption[2:3] == SET_CONTROL_USE_DTR_FLOW_CONTROL: #~ elif suboption[2:3] == SET_CONTROL_USE_DSR_FLOW_CONTROL: elif suboption[1:2] == NOTIFY_LINESTATE: # client polls for current state self.rfc2217SendSubnegotiation( SERVER_NOTIFY_LINESTATE, to_bytes([0]) # sorry, nothing like that implemented ) elif suboption[1:2] == NOTIFY_MODEMSTATE: if self.logger: self.logger.info("request for modem state") # client polls for current state self.check_modem_lines(force_notification=True) elif suboption[1:2] == FLOWCONTROL_SUSPEND: if self.logger: self.logger.info("suspend") self._remote_suspend_flow = True elif suboption[1:2] == FLOWCONTROL_RESUME: if self.logger: self.logger.info("resume") self._remote_suspend_flow = False elif suboption[1:2] == SET_LINESTATE_MASK: self.linstate_mask = ord(suboption[2:3]) # ensure it is a number if self.logger: self.logger.info("line state mask: 0x%02" % (self.linstate_mask,)) elif suboption[1:2] == SET_MODEMSTATE_MASK: self.modemstate_mask = ord(suboption[2:3]) # ensure it is a number if self.logger: self.logger.info("modem state mask: 0x%02" % (self.modemstate_mask,)) elif suboption[1:2] == PURGE_DATA: if suboption[2:3] == PURGE_RECEIVE_BUFFER: self.serial.flushInput() if self.logger: self.logger.info("purge in") self.rfc2217SendSubnegotiation(SERVER_PURGE_DATA, PURGE_RECEIVE_BUFFER) elif suboption[2:3] == PURGE_TRANSMIT_BUFFER: self.serial.flushOutput() if self.logger: self.logger.info("purge out") self.rfc2217SendSubnegotiation(SERVER_PURGE_DATA, PURGE_TRANSMIT_BUFFER) elif suboption[2:3] == PURGE_BOTH_BUFFERS: self.serial.flushInput() self.serial.flushOutput() if self.logger: self.logger.info("purge both") self.rfc2217SendSubnegotiation(SERVER_PURGE_DATA, PURGE_BOTH_BUFFERS) else: if self.logger: self.logger.error("undefined PURGE_DATA: %r" % list(suboption[2:])) else: if self.logger: self.logger.error("undefined COM_PORT_OPTION: %r" % list(suboption[1:])) else: if self.logger: self.logger.warning("unknown subnegotiation: %r" % (suboption,))
1f107871b694699edca4521432f16d6a5c0b71f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/1f107871b694699edca4521432f16d6a5c0b71f8/rfc2217.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19261, 2758, 2227, 1676, 14518, 352, 7072, 12, 2890, 16, 720, 3482, 4672, 3536, 2227, 720, 14518, 352, 7072, 16, 326, 501, 3086, 467, 2226, 348, 38, 471, 467, 2226, 3174, 12123, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19261, 2758, 2227, 1676, 14518, 352, 7072, 12, 2890, 16, 720, 3482, 4672, 3536, 2227, 720, 14518, 352, 7072, 16, 326, 501, 3086, 467, 2226, 348, 38, 471, 467, 2226, 3174, 12123, 309...
self._canvas.lower(item)
def fill(self, flag): if self._filling: path = tuple(self._path) smooth = self._filling < 0 if len(path) > 2: item = self._canvas._create('polygon', path, {'fill': self._color, 'smooth': smooth}) self._items.append(item) self._canvas.lower(item) if self._tofill: for item in self._tofill: self._canvas.itemconfigure(item, fill=self._color) self._items.append(item) self._path = [] self._tofill = [] self._filling = flag if flag: self._path.append(self._position) self.forward(0)
6c71e658f535ce74e59f94a4f5de2adca0b56ccc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6c71e658f535ce74e59f94a4f5de2adca0b56ccc/turtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 12, 2890, 16, 2982, 4672, 309, 365, 6315, 74, 5789, 30, 589, 273, 3193, 12, 2890, 6315, 803, 13, 11957, 273, 365, 6315, 74, 5789, 411, 374, 309, 562, 12, 803, 13, 405, 576, 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, 3636, 12, 2890, 16, 2982, 4672, 309, 365, 6315, 74, 5789, 30, 589, 273, 3193, 12, 2890, 6315, 803, 13, 11957, 273, 365, 6315, 74, 5789, 411, 374, 309, 562, 12, 803, 13, 405, 576, 30,...
for slot in range(max(showslot - 1,0), lastslot): if item.slot(slot).done() == '1' \
for slot in item.slots(): if slot.slotType() != 'player': continue if slot.done() == '1' \
def materialsReport(self, itemlist, showslot = 0): self.MMLabel.show() self.MatMultiplier.show() self.setWindowTitle('Materials Report') self.materials = { 'Gems' : { }, 'Liquids' : {}, 'Dusts': {} } self.gemnames = { } self.totalcost = 0 if showslot == 0: lastslot = 6 else: lastslot = showslot for loc, item in itemlist.items(): if item.ActiveState != 'player': continue for slot in range(max(showslot - 1,0), lastslot): if item.slot(slot).done() == '1' \ and showslot == 0 \ and self.parent.showDoneInMatsList: continue gemtype = item.slot(slot).type() effect = item.slot(slot).effect() amount = item.slot(slot).amount() for mattype, matl in item.slot(slot).gemMaterials(self.parent.realm).items(): for mat, val in matl.items(): if self.materials[mattype].has_key(mat): self.materials[mattype][mat] += val else: self.materials[mattype][mat] = val if gemtype == 'Unused': continue gemname = item.slot(slot).gemName(self.parent.realm) if self.gemnames.has_key(gemname): self.gemnames[gemname] += 1 else: self.gemnames[gemname] = 1
eb3bd85de50e071054a6ffd440f51ac6f14f60b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/eb3bd85de50e071054a6ffd440f51ac6f14f60b1/ReportWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31824, 4820, 12, 2890, 16, 761, 1098, 16, 2405, 14194, 273, 374, 4672, 365, 18, 49, 1495, 873, 18, 4500, 1435, 365, 18, 15947, 23365, 18, 4500, 1435, 365, 18, 542, 3829, 4247, 2668, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31824, 4820, 12, 2890, 16, 761, 1098, 16, 2405, 14194, 273, 374, 4672, 365, 18, 49, 1495, 873, 18, 4500, 1435, 365, 18, 15947, 23365, 18, 4500, 1435, 365, 18, 542, 3829, 4247, 2668, 11...
self.disconnect("Connection reset by peer.")
self.disconnect("Connection reset by peer")
def privmsg(self, string): """Send data to DCC peer.
30d79e85854b7dc034c00c4ae9de3eb9fcf959b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/30d79e85854b7dc034c00c4ae9de3eb9fcf959b0/irclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6015, 3576, 12, 2890, 16, 533, 4672, 3536, 3826, 501, 358, 463, 6743, 4261, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6015, 3576, 12, 2890, 16, 533, 4672, 3536, 3826, 501, 358, 463, 6743, 4261, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.setDaemon(False)
self.set_daemon(False)
def __init__(self, certificate, ssl_version=None, certreqs=None, cacerts=None, expect_bad_connects=False, chatty=True, connectionchatty=False, starttls_server=False): if ssl_version is None: ssl_version = ssl.PROTOCOL_TLSv1 if certreqs is None: certreqs = ssl.CERT_NONE self.certificate = certificate self.protocol = ssl_version self.certreqs = certreqs self.cacerts = cacerts self.expect_bad_connects = expect_bad_connects self.chatty = chatty self.connectionchatty = connectionchatty self.starttls_server = starttls_server self.sock = socket.socket() self.port = support.bind_port(self.sock) self.flag = None self.active = False threading.Thread.__init__(self) self.setDaemon(False)
0453b41ee11c44cbeb3aee45f5f15c32a9767585 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/0453b41ee11c44cbeb3aee45f5f15c32a9767585/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4944, 16, 5832, 67, 1589, 33, 7036, 16, 3320, 25782, 33, 7036, 16, 276, 1077, 1051, 87, 33, 7036, 16, 4489, 67, 8759, 67, 3612, 87, 33, 8381, 16, 7916,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4944, 16, 5832, 67, 1589, 33, 7036, 16, 3320, 25782, 33, 7036, 16, 276, 1077, 1051, 87, 33, 7036, 16, 4489, 67, 8759, 67, 3612, 87, 33, 8381, 16, 7916,...
del oldMenu
oldMenu.Destroy()
def ReplaceViewParcelMenu(self): """ Override to customize your parcel menu. """ mainFrameId = id(app.model.mainFrame) if app.association.has_key(mainFrameId): mainFrame = app.association[mainFrameId] menuBar = mainFrame.GetMenuBar () menuIndex = menuBar.FindMenu (_('View')) + 1 assert (menuIndex != wxNOT_FOUND) noParcelMenu = menuBar.FindMenu(_('Help')) == menuIndex
70b6fbe3ca3f0126515d7df2588df6bb3d50f883 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/70b6fbe3ca3f0126515d7df2588df6bb3d50f883/ViewerParcel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6910, 1767, 1553, 2183, 4599, 12, 2890, 4672, 3536, 1439, 358, 20236, 3433, 779, 2183, 3824, 18, 3536, 2774, 3219, 548, 273, 612, 12, 2910, 18, 2284, 18, 5254, 3219, 13, 309, 595, 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, 6910, 1767, 1553, 2183, 4599, 12, 2890, 4672, 3536, 1439, 358, 20236, 3433, 779, 2183, 3824, 18, 3536, 2774, 3219, 548, 273, 612, 12, 2910, 18, 2284, 18, 5254, 3219, 13, 309, 595, 18, ...
files = list(files)
def manage_FTPlist(self, REQUEST): """Directory listing for FTP. """ out=()
aa16e4594e7c5987bb70b83ee24ff70996bf7aa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/aa16e4594e7c5987bb70b83ee24ff70996bf7aa3/ObjectManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 17104, 1098, 12, 2890, 16, 12492, 4672, 3536, 2853, 11591, 364, 19324, 18, 3536, 596, 33, 1435, 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, 10680, 67, 17104, 1098, 12, 2890, 16, 12492, 4672, 3536, 2853, 11591, 364, 19324, 18, 3536, 596, 33, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif google and isinstance(data, google.appengine.ext.db.Query):
elif appengine and isinstance(data, appengine.ext.db.Query):
def _any(data): ret = None # Opps, we used to check if it is of type list, but that fails # i.e. in the case of django.newforms.utils.ErrorList, which extends # the type "list". Oh man, that was a dumb mistake! if isinstance(data, list): ret = _list(data) # Same as for lists above. elif google and isinstance(data, google.appengine.ext.db.Query): ret = _list(data) elif isinstance(data, dict): ret = _dict(data) elif isinstance(data, Decimal): # json.dumps() cant handle Decimal ret = str(data) elif isinstance(data, QuerySet): # Actually its the same as a list ... ret = _list(data) elif isinstance(data, Model): ret = _model(data) elif google and isinstance(data, google.appengine.ext.db.Model): ret = _googleModel(data) # here we need to encode the string as unicode (otherwise we get utf-16 in the json-response) elif isinstance(data, basestring): ret = unicode(data) # see http://code.djangoproject.com/ticket/5868 elif isinstance(data, Promise): ret = force_unicode(data) elif isinstance(data, datetime.datetime): # For dojo.date.stamp we convert the dates to use 'T' as separator instead of space # i.e. 2008-01-01T10:10:10 instead of 2008-01-01 10:10:10 ret = str(data).replace(' ', 'T') elif isinstance(data, datetime.date): ret = str(data) elif isinstance(data, datetime.time): ret = "T" + str(data) else: ret = data return ret
2fec64b9ba0f1a17aee81d2d5a89857585fe46c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12008/2fec64b9ba0f1a17aee81d2d5a89857585fe46c2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2273, 12, 892, 4672, 325, 273, 599, 468, 6066, 1121, 16, 732, 1399, 358, 866, 309, 518, 353, 434, 618, 666, 16, 1496, 716, 6684, 468, 277, 18, 73, 18, 316, 326, 648, 434, 13710,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2273, 12, 892, 4672, 325, 273, 599, 468, 6066, 1121, 16, 732, 1399, 358, 866, 309, 518, 353, 434, 618, 666, 16, 1496, 716, 6684, 468, 277, 18, 73, 18, 316, 326, 648, 434, 13710,...
end = result.find('\n') -1
end = result.find('\n')
def dht_lookup(gp, nam): #gp.fout.write("DHT look up\n") cmd = "hipconf dht get " + nam + " 2>&1" #gp.fout.write("Command: %s\n" % (cmd)) p = os.popen(cmd, "r") result = p.readline() while result: start = result.find("2001:001") end = result.find('\n') -1 if start != -1 and end != -1: return result[start:end] result = p.readline() return None
920ca02f09012cdc7e4ba1ee2530c8cdd3f9c7e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6933/920ca02f09012cdc7e4ba1ee2530c8cdd3f9c7e7/dnsproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 647, 67, 8664, 12, 6403, 16, 15135, 4672, 468, 6403, 18, 617, 322, 18, 2626, 2932, 40, 5062, 2324, 731, 64, 82, 7923, 1797, 273, 315, 5310, 3923, 302, 647, 336, 315, 397, 15135, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 647, 67, 8664, 12, 6403, 16, 15135, 4672, 468, 6403, 18, 617, 322, 18, 2626, 2932, 40, 5062, 2324, 731, 64, 82, 7923, 1797, 273, 315, 5310, 3923, 302, 647, 336, 315, 397, 15135, ...
if (subject and self._cmd_dispatch.has_key(string.split(subject)[0])): lines = [subject] + string.split(mail.body, '\n')
if (subject and self.__dispatch.has_key(string.split(subject)[0])): lines = [subject] + string.split(msg.body, '\n')
def ParseMailCommands(self):
4b2df7e3d338f55697b3a243715d01d52d223317 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4b2df7e3d338f55697b3a243715d01d52d223317/MailCommandHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 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, 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, 2884, 6759, 9127, 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, -...
r = apply(func, args, kw)
if kw: r = apply(func, args, kw) else: r = apply(func, args)
def s_apply(self, func, *args, **kw):
e7b9fde1b8461b389f2bcc21350eb132a287f14b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7b9fde1b8461b389f2bcc21350eb132a287f14b/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 67, 9010, 12, 2890, 16, 1326, 16, 380, 1968, 16, 2826, 9987, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 67, 9010, 12, 2890, 16, 1326, 16, 380, 1968, 16, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
counter[0] = [0]
counter[0] = 0
def reset_counter(): counter[0] = [0]
8244f70579a785683c03836eedb778cffae63571 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4645/8244f70579a785683c03836eedb778cffae63571/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 7476, 13332, 3895, 63, 20, 65, 273, 306, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 2715, 67, 7476, 13332, 3895, 63, 20, 65, 273, 306, 20, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
result.append(self.key_list('SUP',self.sup,sep=' $ '))
result.append(self.key_list('SUP',self.sup,sep=' '))
def __str__(self): result = [str(self.ruleid)] result.append(self.key_list('NAME',self.names,quoted=1)) result.append(self.key_attr('DESC',self.desc,quoted=1)) result.append({0:'',1:' OBSOLETE'}[self.obsolete]) result.append(self.key_attr('FORM',self.form,quoted=0)) result.append(self.key_list('SUP',self.sup,sep=' $ ')) return '( %s )' % ''.join(result)
f805d9004859ee9c8bc13b124533faf839ff3769 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4610/f805d9004859ee9c8bc13b124533faf839ff3769/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 563, 273, 306, 701, 12, 2890, 18, 5345, 350, 25887, 563, 18, 6923, 12, 2890, 18, 856, 67, 1098, 2668, 1985, 2187, 2890, 18, 1973, 16, 15179, 33, 21, 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, 1001, 701, 972, 12, 2890, 4672, 563, 273, 306, 701, 12, 2890, 18, 5345, 350, 25887, 563, 18, 6923, 12, 2890, 18, 856, 67, 1098, 2668, 1985, 2187, 2890, 18, 1973, 16, 15179, 33, 21, 3...
dsp_file=r"com\Active Debugging.dsp", libraries="axscript", pch_header = "stdafx.h", optional_headers = ["activdbg.h"],
libraries="axscript msdbg", pch_header="stdafx.h", optional_headers=["activdbg.h"], sources=(""" %(axdebug)s/AXDebug.cpp %(axdebug)s/PyIActiveScriptDebug.cpp %(axdebug)s/PyIActiveScriptErrorDebug.cpp %(axdebug)s/PyIActiveScriptSiteDebug.cpp %(axdebug)s/PyIApplicationDebugger.cpp %(axdebug)s/PyIDebugApplication.cpp %(axdebug)s/PyIDebugApplicationNode.cpp %(axdebug)s/PyIDebugApplicationNodeEvents.cpp %(axdebug)s/PyIDebugApplicationThread.cpp %(axdebug)s/PyIDebugCodeContext.cpp %(axdebug)s/PyIDebugDocument.cpp %(axdebug)s/PyIDebugDocumentContext.cpp %(axdebug)s/PyIDebugDocumentHelper.cpp %(axdebug)s/PyIDebugDocumentHost.cpp %(axdebug)s/PyIDebugDocumentInfo.cpp %(axdebug)s/PyIDebugDocumentProvider.cpp %(axdebug)s/PyIDebugDocumentText.cpp %(axdebug)s/PyIDebugDocumentTextAuthor.cpp %(axdebug)s/PyIDebugDocumentTextEvents.cpp %(axdebug)s/PyIDebugDocumentTextExternalAuthor.cpp %(axdebug)s/PyIDebugExpression.cpp %(axdebug)s/PyIDebugExpressionCallBack.cpp %(axdebug)s/PyIDebugExpressionContext.cpp %(axdebug)s/PyIDebugProperties.cpp %(axdebug)s/PyIDebugSessionProvider.cpp %(axdebug)s/PyIDebugStackFrame.cpp %(axdebug)s/PyIDebugStackFrameSniffer.cpp %(axdebug)s/PyIDebugStackFrameSnifferEx.cpp %(axdebug)s/PyIDebugSyncOperation.cpp %(axdebug)s/PyIEnumDebugApplicationNodes.cpp %(axdebug)s/PyIEnumDebugCodeContexts.cpp %(axdebug)s/PyIEnumDebugExpressionContexts.cpp %(axdebug)s/PyIEnumDebugPropertyInfo.cpp %(axdebug)s/PyIEnumDebugStackFrames.cpp %(axdebug)s/PyIEnumRemoteDebugApplications.cpp %(axdebug)s/PyIEnumRemoteDebugApplicationThreads.cpp %(axdebug)s/PyIMachineDebugManager.cpp %(axdebug)s/PyIMachineDebugManagerEvents.cpp %(axdebug)s/PyIProcessDebugManager.cpp %(axdebug)s/PyIProvideExpressionContexts.cpp %(axdebug)s/PyIRemoteDebugApplication.cpp %(axdebug)s/PyIRemoteDebugApplicationEvents.cpp %(axdebug)s/PyIRemoteDebugApplicationThread.cpp %(axdebug)s/stdafx.cpp """ % dirs).split(),
def finalize_options(self): if self.install_dir is None: installobj = self.distribution.get_command_obj('install') self.install_dir = installobj.install_lib print 'Installing data files to %s' % self.install_dir install_data.finalize_options(self)
108c74ad682fc2de5f9ab6ea268d714ded2f823c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/108c74ad682fc2de5f9ab6ea268d714ded2f823c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 309, 365, 18, 5425, 67, 1214, 353, 599, 30, 1804, 287, 383, 441, 273, 365, 18, 16279, 18, 588, 67, 3076, 67, 2603, 2668, 5425, 6134, 365, 18, 5425, 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, 12409, 67, 2116, 12, 2890, 4672, 309, 365, 18, 5425, 67, 1214, 353, 599, 30, 1804, 287, 383, 441, 273, 365, 18, 16279, 18, 588, 67, 3076, 67, 2603, 2668, 5425, 6134, 365, 18, 5425, 6...
debug_print("compiled new " + type)
from pypy.jit.metainterp.pyjitpl import DEBUG if DEBUG > 0: debug_print("compiled new " + type)
def send_loop_to_backend(metainterp, loop, type): metainterp.cpu.compile_operations(loop) if not we_are_translated(): if type != "entry bridge": metainterp.staticdata.stats.compiled_count += 1 else: loop._ignore_during_counting = True log.info("compiled new " + type) else: debug_print("compiled new " + type)
481efb91193a67c192d86c98dbf97d572e22d9ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/481efb91193a67c192d86c98dbf97d572e22d9ee/compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 6498, 67, 869, 67, 9993, 12, 10578, 11606, 84, 16, 2798, 16, 618, 4672, 5100, 11606, 84, 18, 11447, 18, 11100, 67, 17542, 12, 6498, 13, 309, 486, 732, 67, 834, 67, 22899, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 6498, 67, 869, 67, 9993, 12, 10578, 11606, 84, 16, 2798, 16, 618, 4672, 5100, 11606, 84, 18, 11447, 18, 11100, 67, 17542, 12, 6498, 13, 309, 486, 732, 67, 834, 67, 22899, 1...
valid_image_csum_vec = 5
valid_image_csum_vec = self.get_cpu_parm("csum_vec", 5)
def insert_csum(self, orig_image): # make this a valid image by inserting a checksum in the correct place intvecs = struct.unpack("<8I", orig_image[0:32])
61e0fa6efabcd097811e19eb86095391bb68bf26 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1457/61e0fa6efabcd097811e19eb86095391bb68bf26/nxpprog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 71, 1364, 12, 2890, 16, 1647, 67, 2730, 4672, 468, 1221, 333, 279, 923, 1316, 635, 21079, 279, 6697, 316, 326, 3434, 3166, 509, 27698, 273, 1958, 18, 17309, 2932, 32, 28, 45,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 71, 1364, 12, 2890, 16, 1647, 67, 2730, 4672, 468, 1221, 333, 279, 923, 1316, 635, 21079, 279, 6697, 316, 326, 3434, 3166, 509, 27698, 273, 1958, 18, 17309, 2932, 32, 28, 45,...
out.write('distl_binned_image_spot_size=10\n')
out.write('distl_binned_image_spot_size = 10\n')
def _write_dataset_preferences(self): '''Write the dataset_preferences.py file in the working directory - this will include the beam centres etc.'''
b577ffbb2af8e67da81d91b2b24fbeebfe6acfef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/b577ffbb2af8e67da81d91b2b24fbeebfe6acfef/LabelitScreen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 8682, 67, 23219, 12, 2890, 4672, 9163, 3067, 326, 3709, 67, 23219, 18, 2074, 585, 316, 326, 5960, 1867, 300, 333, 903, 2341, 326, 16751, 8301, 455, 5527, 1093, 6309, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 8682, 67, 23219, 12, 2890, 4672, 9163, 3067, 326, 3709, 67, 23219, 18, 2074, 585, 316, 326, 5960, 1867, 300, 333, 903, 2341, 326, 16751, 8301, 455, 5527, 1093, 6309, 2, ...
def _do_resync(self, reponame, rev=None, clean=True):
def _sync(self, reponame, rev, clean):
def _do_resync(self, reponame, rev=None, clean=True): rm = RepositoryManager(self.env) if reponame == '*': if rev is not None: raise TracError(_('Cannot synchronize a single revision ' 'on multiple repositories')) repositories = rm.get_real_repositories(None) else: if reponame == '(default)': reponame = '' repos = rm.get_repository(reponame, None) if repos is None: raise TracError(_("Unknown repository '%(reponame)s'", reponame=reponame or '(default)')) if rev is not None: repos.sync_changeset(rev) printout(_('%(rev)s resynced on %(reponame)s.', rev=rev, reponame=repos.reponame or '(default)')) return repositories = [repos] from trac.versioncontrol.cache import CACHE_METADATA_KEYS db = self.env.get_db_cnx() cursor = db.cursor() inval = False for repos in sorted(repositories, key=lambda r: r.reponame): reponame = repos.reponame printout(_('Resyncing repository history for %(reponame)s... ', reponame=reponame or '(default)')) if clean: cursor.execute("DELETE FROM revision WHERE repos=%s", (reponame,)) cursor.execute("DELETE FROM node_change " "WHERE repos=%s", (reponame,)) cursor.executemany("DELETE FROM repository " "WHERE id=%s AND name=%s", [(reponame, k) for k in CACHE_METADATA_KEYS]) cursor.executemany("INSERT INTO repository (id, name, value) " "VALUES (%s, %s, %s)", [(reponame, k, '') for k in CACHE_METADATA_KEYS]) db.commit() if repos.sync(self._resync_feedback): inval = True cursor.execute("SELECT count(rev) FROM revision WHERE repos=%s", (reponame,)) for cnt, in cursor: printout(ngettext('%(num)s revision cached.', '%(num)s revisions cached.', num=cnt)) if inval: self.config.touch() # FIXME: Brute force printout(_('Done.'))
a71236dfd0981393512b53cd578cb5e61387797d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/a71236dfd0981393512b53cd578cb5e61387797d/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8389, 12, 2890, 16, 283, 500, 339, 16, 5588, 16, 2721, 4672, 6692, 273, 6281, 1318, 12, 2890, 18, 3074, 13, 309, 283, 500, 339, 422, 5306, 30, 309, 5588, 353, 486, 599, 30, 1002...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8389, 12, 2890, 16, 283, 500, 339, 16, 5588, 16, 2721, 4672, 6692, 273, 6281, 1318, 12, 2890, 18, 3074, 13, 309, 283, 500, 339, 422, 5306, 30, 309, 5588, 353, 486, 599, 30, 1002...
None,
# typedef void (*lc_callback)(uint32_t, uint32_t, uint32_t, void*);
252469d959d952d07c6c2b796be96c97a8628abc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3138/252469d959d952d07c6c2b796be96c97a8628abc/libconcord.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 618, 536, 918, 261, 14, 17704, 67, 3394, 21433, 11890, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 918, 14, 1769, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 618, 536, 918, 261, 14, 17704, 67, 3394, 21433, 11890, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 918, 14, 1769, 2, -100, -100, -100, -100, -100, -100, -100, -1...
value = FileUpload.read() result = mx_tidy(wrapValueInHTML(value), **MX_TIDY_OPTIONS)
value.seek(0) value = value.read() else: value = wrapValueInHTML(value) result = mx_tidy(value, **MX_TIDY_OPTIONS)
def doTidy(value, field, request, cleanup=0): """Tidy the data in 'value' for the field in the current request Optional cleanup: * removes header/footer of the output data * Removes warnings from the error data Return None for 'nothing done' else return (nerrors, nwarnings, outputdata, errordata) """ # we can't use the mimetype from the field because it's updated *after* # validation so we must get it from the request tf_name = '%s_text_format' % field.getName() text_format = getattr(request, tf_name, '') # MX_TIDY_MIMETYPES configuration option isn't empty # and the current text_format isn't in the list if MX_TIDY_MIMETYPES and text_format not in MX_TIDY_MIMETYPES: # do not filter this mime type return # it's a file upload if isinstance(value, FileUpload): # *mmh* ok it's a file upload but a file upload could destroy # the layout, too. value = FileUpload.read() result = mx_tidy(wrapValueInHTML(value), **MX_TIDY_OPTIONS) nerrors, nwarnings, outputdata, errordata = result # parse and change the error data errordata = parseErrorData(errordata, removeWarnings=cleanup) if cleanup: # unwrap tidied output data outputdata = unwrapValueFromHTML(outputdata) return nerrors, nwarnings, outputdata, errordata
bdf5a986663a8f97c6d5be70ced7f42f7487970e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/bdf5a986663a8f97c6d5be70ced7f42f7487970e/validators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 56, 29609, 12, 1132, 16, 652, 16, 590, 16, 6686, 33, 20, 4672, 3536, 56, 29609, 326, 501, 316, 296, 1132, 11, 364, 326, 652, 316, 326, 783, 590, 225, 4055, 6686, 30, 380, 7157, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 56, 29609, 12, 1132, 16, 652, 16, 590, 16, 6686, 33, 20, 4672, 3536, 56, 29609, 326, 501, 316, 296, 1132, 11, 364, 326, 652, 316, 326, 783, 590, 225, 4055, 6686, 30, 380, 7157, ...
self.config = config
def __init__(self, msg, config): """Message constructor""" self.__class__.id += 1 self.id = self.__class__.id self.messageId = msg['Message-Id'] self.date = msg['Date'] self.From = msg['From'] self.getAddressFrom = msg.getaddr('From') self.to = msg['To'] #tip because decode_header returns the exception # ValueError: too many values to unpack #performance this tip subject_parted = msg['Subject'].split(' ') subject = '' for one in subject_parted: [(s, enconding)] = decode_header(one) if (subject == ''): subject = s else: subject += ' ' + s self.subject = subject #unicode(msg['Subject'], errors='ignore') self.body = msg.fp.read() #[(self.body, enconding)] = decode_header(msg.fp.read()) self.config = config
db9d8293a00f10e50dd314daeca038a9a8b57008 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/db9d8293a00f10e50dd314daeca038a9a8b57008/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1234, 16, 642, 4672, 3536, 1079, 3885, 8395, 365, 16186, 1106, 25648, 350, 1011, 404, 365, 18, 350, 273, 365, 16186, 1106, 25648, 350, 365, 18, 2150, 548, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1234, 16, 642, 4672, 3536, 1079, 3885, 8395, 365, 16186, 1106, 25648, 350, 1011, 404, 365, 18, 350, 273, 365, 16186, 1106, 25648, 350, 365, 18, 2150, 548, ...
doDebug = constricted = 0
doDebug = constricted = emptyEditor = 0
def sendToRunningBoa(names, host='127.0.0.1', port=50007): import socket try: if names: print 'Sent', for name in names: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, port)) # do not change files of form [prot]://[path] if string.find(name, '://') == -1: name = os.path.abspath(name) s.send(name) print name, s.close() print except socket.error: return 0 else: return 1
f6b199ece3b4869b1e18a280f16305d1a63f8b49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f6b199ece3b4869b1e18a280f16305d1a63f8b49/Boa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29091, 7051, 38, 11867, 12, 1973, 16, 1479, 2218, 14260, 18, 20, 18, 20, 18, 21, 2187, 1756, 33, 25, 3784, 27, 4672, 1930, 2987, 775, 30, 309, 1257, 30, 1172, 296, 7828, 2187, 364, 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, 29091, 7051, 38, 11867, 12, 1973, 16, 1479, 2218, 14260, 18, 20, 18, 20, 18, 21, 2187, 1756, 33, 25, 3784, 27, 4672, 1930, 2987, 775, 30, 309, 1257, 30, 1172, 296, 7828, 2187, 364, 5...
hall=m.make('hall',type='hall',xyz=hall_xyz)
def dontrunme():
cb794d1f5092b5f91efda32f7502ddf83476a820 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/cb794d1f5092b5f91efda32f7502ddf83476a820/define_world.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2727, 313, 318, 3501, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2727, 313, 318, 3501, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def addfield(self, pkt, s, val): if self.is_applicable(pkt): return MACField.addfield(self, pkt, s, val) else: return s def getfield(self, pkt, s): if self.is_applicable(pkt): return MACField.getfield(self, pkt, s) else: return s,None
def addfield(self, pkt, s, val): if self.is_applicable(pkt): return MACField.addfield(self, pkt, s, val) else: return s
fdc42c04e59757fb088ee127057846d803626638 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/fdc42c04e59757fb088ee127057846d803626638/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1518, 12, 2890, 16, 11536, 16, 272, 16, 1244, 4672, 309, 365, 18, 291, 67, 438, 10120, 12, 5465, 88, 4672, 327, 14246, 974, 18, 1289, 1518, 12, 2890, 16, 11536, 16, 272, 16, 124...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1518, 12, 2890, 16, 11536, 16, 272, 16, 1244, 4672, 309, 365, 18, 291, 67, 438, 10120, 12, 5465, 88, 4672, 327, 14246, 974, 18, 1289, 1518, 12, 2890, 16, 11536, 16, 272, 16, 124...
label = fullmatch.group('label')
label = fullmatch.group('label') or target
def _lhref_formatter(self, match, fullmatch): ns = fullmatch.group('lns') target = fullmatch.group('ltgt') label = fullmatch.group('label') if ns in self.link_resolvers: return self._link_resolvers[ns](self, ns, target, label) elif target[:2] == '//': return self._make_ext_link(ns+':'+target, label) else: return match
db09b7ea6dc40dcf0b61793b93d948635eb7b221 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/db09b7ea6dc40dcf0b61793b93d948635eb7b221/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 80, 7547, 67, 12354, 12, 2890, 16, 845, 16, 1983, 1916, 4672, 3153, 273, 1983, 1916, 18, 1655, 2668, 2370, 87, 6134, 1018, 273, 1983, 1916, 18, 1655, 2668, 5618, 4521, 6134, 1433, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 80, 7547, 67, 12354, 12, 2890, 16, 845, 16, 1983, 1916, 4672, 3153, 273, 1983, 1916, 18, 1655, 2668, 2370, 87, 6134, 1018, 273, 1983, 1916, 18, 1655, 2668, 5618, 4521, 6134, 1433, ...
if not target.startswith("http:") and target[0] != '/':
if not (":" in target[:10]) and target[0] != '/':
def link(text, target): if not target.startswith("http:") and target[0] != '/': target = defaults.checkmk_web_uri + "/" + target return "<a target=\"main\" class=link href=\"%s\">%s</a>" % (target, htmllib.attrencode(text))
d6b4c91a8b31f13ab3cb60021ec5c2ff9507065a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/d6b4c91a8b31f13ab3cb60021ec5c2ff9507065a/sidebar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 12, 955, 16, 1018, 4672, 1377, 309, 486, 7566, 2773, 316, 1018, 10531, 2163, 5717, 471, 1018, 63, 20, 65, 480, 2023, 30, 1018, 273, 3467, 18, 1893, 24816, 67, 4875, 67, 1650, 397...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 12, 955, 16, 1018, 4672, 1377, 309, 486, 7566, 2773, 316, 1018, 10531, 2163, 5717, 471, 1018, 63, 20, 65, 480, 2023, 30, 1018, 273, 3467, 18, 1893, 24816, 67, 4875, 67, 1650, 397...
srw = codecs.StreamReaderWriter(file, info.streamreader, info.streamwriter, errors)
if isinstance(info, tuple): reader = info[2] writer = info[3] else: reader = info.streamreader writer = info.streamwriter srw = codecs.StreamReaderWriter(file, reader, writer, errors)
def _unicode_open(file, encoding, errors='strict'): info = codecs.lookup(encoding) srw = codecs.StreamReaderWriter(file, info.streamreader, info.streamwriter, errors) srw.encoding = encoding return srw
db228d7fbdd78d1de47f3ffe9c6278e0c254f955 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/94/db228d7fbdd78d1de47f3ffe9c6278e0c254f955/test_input_output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9124, 67, 3190, 12, 768, 16, 2688, 16, 1334, 2218, 13948, 11, 4672, 1123, 273, 17437, 18, 8664, 12, 5999, 13, 309, 1549, 12, 1376, 16, 3193, 4672, 2949, 273, 1123, 63, 22, 65, 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, 9124, 67, 3190, 12, 768, 16, 2688, 16, 1334, 2218, 13948, 11, 4672, 1123, 273, 17437, 18, 8664, 12, 5999, 13, 309, 1549, 12, 1376, 16, 3193, 4672, 2949, 273, 1123, 63, 22, 65, 2...
myAngle=arcsin(dY/dX)+pi
myAngle=arctan(dY/dX)+pi
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->(1,0) is angle 0 radians, then we rotate counter clockwise from there... What is returned in a three element tuple (numsides,style,angle) which can be put into a plot call via marker=X as a **kwarg """ if A == None or B == None: return (3,0,0) if( A != type(tuple()) and len(A) != 2) \ or \ ( B != type(tuple()) and len(B) != 2): return (3,0,0) # # Calculate orientation of triangle # Ang = arcsin(dY/dX) dY=float(B[-1]-A[-1]) dX=float(B[0]-A[0]) if dY>=0 and dX>=0: myAngle=arcsin(dY/dX) elif dY>=0 and dX<0: myAngle=pi-arcsin(dY/dX) elif dY<0 and dX<0: myAngle=arcsin(dY/dX)+pi elif dY<0 and dX>0: myAngle=(2.0*pi)-arcsin(dY/dX) else: myAngle=0 return (3,0,myAngle)
85dd29f68b1a30f27a22c6fa0de5a1f96b00e3f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/85dd29f68b1a30f27a22c6fa0de5a1f96b00e3f7/followupPDSurface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 4926, 12, 37, 33, 7036, 16, 38, 33, 7036, 4672, 3536, 15510, 87, 2795, 5901, 5574, 487, 10384, 261, 92, 21, 16, 93, 21, 13, 471, 261, 92, 22, 16, 93, 22, 13, 2777, 9697, 333...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 4926, 12, 37, 33, 7036, 16, 38, 33, 7036, 4672, 3536, 15510, 87, 2795, 5901, 5574, 487, 10384, 261, 92, 21, 16, 93, 21, 13, 471, 261, 92, 22, 16, 93, 22, 13, 2777, 9697, 333...
self.capabilities = tuple(string.split(self.untagged_responses[cap][-1]))
self.capabilities = tuple(string.split(string.upper(self.untagged_responses[cap][-1])))
def __init__(self, host = '', port = IMAP4_PORT): self.host = host self.port = port self.debug = Debug self.state = 'LOGOUT' self.literal = None # A literal argument to a command self.tagged_commands = {} # Tagged commands awaiting response self.untagged_responses = {} # {typ: [data, ...], ...} self.continuation_response = '' # Last continuation response self.tagnum = 0
30d9015f140da5892d740ccd86b9eb81fa96b76c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/30d9015f140da5892d740ccd86b9eb81fa96b76c/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 273, 10226, 1756, 273, 6246, 2203, 24, 67, 6354, 4672, 365, 18, 2564, 273, 1479, 365, 18, 655, 273, 1756, 365, 18, 4148, 273, 4015, 365, 18, 2019, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1479, 273, 10226, 1756, 273, 6246, 2203, 24, 67, 6354, 4672, 365, 18, 2564, 273, 1479, 365, 18, 655, 273, 1756, 365, 18, 4148, 273, 4015, 365, 18, 2019, ...
def get_auth_token(self): token = self.connection.getAuthToken("grzywacz", "ppp")
def get_auth_token(self, jid): token = self.connection.getAuthToken(jid, self.config.secret)
def get_auth_token(self): token = self.connection.getAuthToken("grzywacz", "ppp") if token: self.token = token
6ae69a1f0b11fce5d57fd6497d495bb8e4d0e504 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/6ae69a1f0b11fce5d57fd6497d495bb8e4d0e504/xmlrpcbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1944, 67, 2316, 12, 2890, 16, 14201, 4672, 1147, 273, 365, 18, 4071, 18, 588, 28967, 12, 18252, 16, 365, 18, 1425, 18, 5875, 13, 309, 1147, 30, 365, 18, 2316, 273, 1147, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 1944, 67, 2316, 12, 2890, 16, 14201, 4672, 1147, 273, 365, 18, 4071, 18, 588, 28967, 12, 18252, 16, 365, 18, 1425, 18, 5875, 13, 309, 1147, 30, 365, 18, 2316, 273, 1147, 225...
protocol.ClientCreator(reactor, SOCKSv4Outgoing, self).connectTCP(server,port)
d = protocol.ClientCreator(reactor, SOCKSv4Outgoing, self).connectTCP(server,port) d.addErrback(lambda result, self=self: self.makeReply(91))
def dataReceived(self,data): if self.otherConn: self.otherConn.write(data) return self.buf=self.buf+data if '\000' in self.buf[8:]: head,self.buf=self.buf[:8],self.buf[8:] try: version,code,port=struct.unpack("!BBH",head[:4]) except struct.error: raise RuntimeError, "struct error with head='%s' and buf='%s'"%(repr(head),repr(self.buf)) user,self.buf=string.split(self.buf,"\000",1) if head[4:7]=="\000\000\000": # domain is after server,self.buf=string.split(self.buf,'\000',1) #server=gethostbyname(server) else: server=socket.inet_ntoa(head[4:8]) assert version==4, "Bad version code: %s"%version if not self.authorize(code,server,port,user): self.makeReply(91) return if code==1: # CONNECT protocol.ClientCreator(reactor, SOCKSv4Outgoing, self).connectTCP(server,port) elif code==2: # BIND self.serv = reactor.listenTCP(0, SOCKSv4IncomingFactory(self, socket.gethostbyname(server))) kind, ourip, ourport = self.serv.getHost() self.makeReply(90, 0, ourport, ourip) else: raise RuntimeError, "Bad Connect Code: %s" % code assert self.buf=="","hmm, still stuff in buffer... '%s'"
8fb3a3a9b2750f4ca1ac7020527e993ed51eea64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8fb3a3a9b2750f4ca1ac7020527e993ed51eea64/socks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 892, 4672, 309, 365, 18, 3011, 3543, 30, 365, 18, 3011, 3543, 18, 2626, 12, 892, 13, 327, 365, 18, 4385, 33, 2890, 18, 4385, 15, 892, 309, 2337, 3784, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 892, 4672, 309, 365, 18, 3011, 3543, 30, 365, 18, 3011, 3543, 18, 2626, 12, 892, 13, 327, 365, 18, 4385, 33, 2890, 18, 4385, 15, 892, 309, 2337, 3784, 11, ...
"""(Internal) Build SQL to update a RowObject.
"""(Internal) Build SQL template to update a RowObject.
def buildUpdateSQL(self, tableInfo): """(Internal) Build SQL to update a RowObject.
713b02eeb66706f2a94c6f00253fc5664457b297 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/713b02eeb66706f2a94c6f00253fc5664457b297/sqlreflector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1891, 3997, 12, 2890, 16, 25926, 4672, 3536, 12, 3061, 13, 3998, 3063, 358, 1089, 279, 6556, 921, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1891, 3997, 12, 2890, 16, 25926, 4672, 3536, 12, 3061, 13, 3998, 3063, 358, 1089, 279, 6556, 921, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.frames = []
self.framefiles = []
def __init__(self, filename, (width, height)): Layer.__init__(self) self.filename = filename self.mediafile = MediaFile(filename) self.size = (width, height) # List of filenames of individual frames self.frames = [] self.rip_frames(1, 120)
423b4fe6c4f2620619ec0784822e87586eac07bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4675/423b4fe6c4f2620619ec0784822e87586eac07bd/layer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 261, 2819, 16, 2072, 3719, 30, 12112, 16186, 2738, 972, 12, 2890, 13, 365, 18, 3459, 273, 1544, 365, 18, 5829, 768, 273, 6128, 812, 12, 3459, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1544, 16, 261, 2819, 16, 2072, 3719, 30, 12112, 16186, 2738, 972, 12, 2890, 13, 365, 18, 3459, 273, 1544, 365, 18, 5829, 768, 273, 6128, 812, 12, 3459, ...
key = l % self._scramble_key + 0xF;
key = self._scramble_key&0xFF if key != 0 and key <= 0xF0: key = l % key + 0xF else: key = 0
def read_stream(self, tag, stream): if self.stream_read: raise LRFParseError('There can be only one stream per object') if not hasattr(self, 'stream_flags'): raise LRFParseError('Stream flags not initialized') self.stream = stream.read(self.stream_size) if self.stream_flags & 0x200 !=0: l = len(self.stream); key = l % self._scramble_key + 0xF; if l > 0x400 and (isinstance(self, ImageStream) or isinstance(self, Font) or isinstance(self, SoundStream)): l = 0x400; self.stream = self.descramble_buffer(self.stream, l, key) if self.stream_flags & 0x100 !=0: decomp_size = struct.unpack("<I", self.stream[:4])[0] self.stream = zlib.decompress(self.stream[4:]) if len(self.stream) != decomp_size: raise LRFParseError("Stream decompressed size is wrong!") if stream.read(2) != '\x06\xF5': print "Warning: corrupted end-of-stream tag at %08X; skipping it"%stream.tell()-2 self.end_stream(None, None)
ba816d3efc046d3a5b6ebcb2c44b09903d438cb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/ba816d3efc046d3a5b6ebcb2c44b09903d438cb6/objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3256, 12, 2890, 16, 1047, 16, 1407, 4672, 309, 365, 18, 3256, 67, 896, 30, 1002, 511, 12918, 21004, 2668, 9828, 848, 506, 1338, 1245, 1407, 1534, 733, 6134, 309, 486, 3859, 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, 855, 67, 3256, 12, 2890, 16, 1047, 16, 1407, 4672, 309, 365, 18, 3256, 67, 896, 30, 1002, 511, 12918, 21004, 2668, 9828, 848, 506, 1338, 1245, 1407, 1534, 733, 6134, 309, 486, 3859, 12...
for doc in self.valdocs: if isinstance(doc, ModuleDoc): filename = 'toc-%s' % urllib.unquote(self.url(doc)) self._write(self.write_module_toc, directory, filename, doc)
for doc in self.module_list: filename = 'toc-%s' % urllib.unquote(self.url(doc)) self._write(self.write_module_toc, directory, filename, doc)
def write(self, directory=None): """ Write the documentation to the given directory.
896efdcbc34c9ccecca07067a434506c3fb65345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/896efdcbc34c9ccecca07067a434506c3fb65345/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 1045, 12, 2890, 16, 1867, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
newparams[k+p:j] = tmp[:j]
newparams[k+p:k+p+j] = tmp[:j]
def _transparams(self, params): """ Transforms params to induce stationarity/invertability.
1605048ab16600ba699073d25d3520de0f02e555 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/1605048ab16600ba699073d25d3520de0f02e555/kalmanf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2338, 2010, 12, 2890, 16, 859, 4672, 3536, 2604, 9741, 859, 358, 1547, 3965, 13282, 20498, 19, 267, 1097, 2967, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2338, 2010, 12, 2890, 16, 859, 4672, 3536, 2604, 9741, 859, 358, 1547, 3965, 13282, 20498, 19, 267, 1097, 2967, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if config.floatX == 'float32' and config.floatX in self.dtypes: return theano._asarray(x, dtype='float32')
dtype = None if isinstance(x, numpy.float64) and 'float64' in self.dtypes: dtype = 'float64' elif isinstance(x, numpy.float32) and 'float32' in self.dtypes: dtype = 'float32' elif isinstance(x, float) and config.floatX in self.dtypes and config.floatX == 'float32': dtype = config.floatX if dtype: return theano._asarray(x, dtype=dtype)
def __call__(self, x): # change the default casting behaviour for python floats to always cast to float32 if config.floatX == 'float32' and config.floatX in self.dtypes: return theano._asarray(x, dtype='float32') for dtype in self.dtypes: x_ = theano._asarray(x, dtype=dtype) if numpy.all(x == x_): break # returns either an exact x_==x, or the last casted x_ return x_
2c6139c618b5bec49020df3f279df9ff11eec8d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/2c6139c618b5bec49020df3f279df9ff11eec8d4/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 4672, 468, 2549, 326, 805, 27660, 14273, 364, 5790, 19172, 358, 3712, 4812, 358, 1431, 1578, 3182, 273, 599, 309, 1549, 12, 92, 16, 3972, 18, 5659, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 4672, 468, 2549, 326, 805, 27660, 14273, 364, 5790, 19172, 358, 3712, 4812, 358, 1431, 1578, 3182, 273, 599, 309, 1549, 12, 92, 16, 3972, 18, 5659, ...
if cell.content and 'start' in cell.content: new_url = '%sstart=%s' % (url, cell.content['start'])
if cell.start: new_url = '%sstart=%s' % (url, Time.encode(cell.start))
def render_namespace(items, times): nitems, iitems = len(items), 0 # blocks = [(nrows, ncols), ..] blocks, table, state = [], [], [] nrows = 0 for time in times[:-1]: cells = [] # add the busy cells for rowspan in state: if rowspan > 0: cells.append(Cell(Cell.busy)) else: cells.append(Cell(Cell.free, content={'start': Time.encode(time)})) # add new cells icell = 0 while iitems < nitems: start, end, item, cal = items[iitems] if start != time: break # look for a free cell while icell < len(cells): if cells[icell].type == Cell.free: break icell = icell + 1 # add cell rowspan = times.index(end) - times.index(start) cell = Cell(Cell.new, item, start, end, rowspan, None, cal) if icell >= len(cells): state.append(rowspan) cells.append(cell) else: state[icell] = rowspan cells[icell] = cell # next item iitems = iitems + 1 ncols = len(cells) # empty row? if ncols == 0: cells.append(Cell(Cell.free, content={'start': Time.encode(time)})) # next row, reduce the current rowspans nrows = nrows + 1 for i in range(ncols): rowspan = state[i] if rowspan > 0: state[i] = rowspan - 1 # a new block? if state.count(0) == ncols: state = [] blocks.append((nrows, ncols)) nrows = 0 # Add current row cells to table table.append((0, cells)) # calculate the number of columns total_ncols = mcm(map(lambda x: x[1], blocks)) # add colspan to each row and fill the incomplete rows with free cells base = 0 for nrows, ncols in blocks: if ncols == 0: colspan = total_ncols else: colspan = total_ncols/ncols irow = 0 while irow < nrows: cells = table[base + irow][1] icol = len(cells) while icol < ncols: start = Time.encode(times[base+irow]) cells.append(Cell(Cell.free, content={'start': start})) icol = icol + 1 table[base + irow] = (colspan, cells) irow = irow + 1 base = base + nrows #################################################################### # FOR EACH ROW for index, row in enumerate(table): i = 0 # FOR EACH CELL while i<len(row[1]): cell = row[1][i] ######################################################## # EXTEND FREE CELL if cell.type == Cell.free: j = i + 1 while j<len(row[1]) and row[1][j].type==Cell.free: row[1][j].type = Cell.busy j = j + 1 if j-i > 1: cell.colspan = j - i i = j ######################################################## # EXTEND NEW CELL elif cell.type == Cell.new: new_extended = [] colspan = len(row[1]) - i # MAX COLSPAN REACHED ( = 1) if colspan <= 1: break # FOR EACH LINE BELOW, USED FOR CELL TO EXTEND for n in range(cell.rowspan): if colspan <= 1: break # GET CURRENT TESTED ROW row_index = index+n irow = table[row_index] # REDUCE max colspan if necessary ilen = len(irow[1]) if ilen < colspan: colspan = ilen # TRY TO EXTEND k = 1 while k < colspan: if irow[1][i+k].type != Cell.free: colspan = k break k = k + 1 new_extended.append((row_index, i)) if colspan > 1: for row_index, k in new_extended: table[row_index][1][k].colspan = colspan for col in range(1, colspan): table[row_index][1][k+col].type = Cell.busy i = i + colspan else: i = i + 1 # end else: i = i + 1 ###################################################################### # render_namespace ###################################################################### url = ';edit_event_form?method=grid_weekly_view&' ns_rows = [] for (colspan, cells) in table: ns_cells = [] for cell in cells: # Don't add busy cells as they don't appear in template if cell.type == Cell.busy: continue if not cell.colspan: cell.colspan = colspan ns_cell = cell.to_dict() # Add start time to url used to add events new_url = None if cell.content and 'start' in cell.content: new_url = '%sstart=%s' % (url, cell.content['start']) ns_cell['newurl'] = new_url ns_cells.append(ns_cell) ns_rows.append({'cells': ns_cells, 'colspan': colspan}) return ns_rows, total_ncols
1d613a42339f87a03d37293214879a0488e9bfef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/1d613a42339f87a03d37293214879a0488e9bfef/gridlayout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4937, 12, 3319, 16, 4124, 4672, 290, 3319, 16, 277, 3319, 273, 562, 12, 3319, 3631, 374, 468, 4398, 273, 306, 12, 82, 3870, 16, 21330, 3631, 6116, 65, 4398, 16, 1014, 16, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4937, 12, 3319, 16, 4124, 4672, 290, 3319, 16, 277, 3319, 273, 562, 12, 3319, 3631, 374, 468, 4398, 273, 306, 12, 82, 3870, 16, 21330, 3631, 6116, 65, 4398, 16, 1014, 16, 9...
attr_set.appendChild(attributes)
attr_set[0].appendChild(attributes)
def set_attribute(tag,node,p,value): id = node.getAttribute("id") attr_set = node.getElementsByTagName(tag) if not attr_set: return attributes = attr_set[0].getElementsByTagName("attributes") if not attributes: attributes = doc.createElement("attributes") attr_set.appendChild(attributes) else: attributes = attributes[0] for nvp in attributes.getElementsByTagName("nvpair"): if p == nvp.getAttribute("name"): nvp.setAttribute("value",value) return attributes.appendChild(mknvpair(id,p,value))
5fdc739b156e47555aaa3b2bd7a94e16e62ed1c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11962/5fdc739b156e47555aaa3b2bd7a94e16e62ed1c1/hb2openais-helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4589, 12, 2692, 16, 2159, 16, 84, 16, 1132, 4672, 612, 273, 756, 18, 588, 1499, 2932, 350, 7923, 1604, 67, 542, 273, 756, 18, 588, 3471, 10401, 12, 2692, 13, 309, 486, 1604,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4589, 12, 2692, 16, 2159, 16, 84, 16, 1132, 4672, 612, 273, 756, 18, 588, 1499, 2932, 350, 7923, 1604, 67, 542, 273, 756, 18, 588, 3471, 10401, 12, 2692, 13, 309, 486, 1604,...
fcb('
fcb(include_with_prefix("cmn"))
def fcb(line): print >> f, line
46e9678f240b95e1574582bc77500e440d3d33bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/46e9678f240b95e1574582bc77500e440d3d33bf/cout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 7358, 12, 1369, 4672, 1172, 1671, 284, 16, 980, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 7358, 12, 1369, 4672, 1172, 1671, 284, 16, 980, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'win': { 'var': 0,
'win': { 'stddev': 0,
def generateSummaryPage(self, pagename, tests, startdate, enddate): # tests { testname: { build: { date: { hour: [ (testname, itemDateTime, delta.days, buildname, hour, revision, runs, total, average) ] }}}}
529018113dc78215bd476acf6fba265caad9be59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/529018113dc78215bd476acf6fba265caad9be59/perf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 4733, 1964, 12, 2890, 16, 4262, 1069, 16, 7434, 16, 787, 712, 16, 679, 712, 4672, 468, 7434, 288, 1842, 529, 30, 288, 1361, 30, 288, 1509, 30, 288, 6126, 30, 306, 261, 3813, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4733, 1964, 12, 2890, 16, 4262, 1069, 16, 7434, 16, 787, 712, 16, 679, 712, 4672, 468, 7434, 288, 1842, 529, 30, 288, 1361, 30, 288, 1509, 30, 288, 6126, 30, 306, 261, 3813, 52...
prog=self.rulescache.getRegex(regex) if self.extremeverbosity: self._logger().debug('Attachment %s Rule %s'%(object,regex)) if prog.search( object): info=ruleset[regex] action=info[0] description=info[2] self._logger().debug('Rulematch: Attachment=%s Rule=%s Description=%s Action=%s'%(object,regex,description,action)) suspect.debug('Rulematch: Attachment=%s Rule=%s Description=%s Action=%s'%(object,regex,description,action)) if action=='deny': asciirep="".join([x for x in object if ord(x) < 128]) self._logger().info('Mail contains blocked attachment name/type %s (delete, send bounce) '%object) blockinfo="%s: %s"%(asciirep,description) suspect.tags['FiletypePlugin.errormessage']=blockinfo bounce=Bounce(self.config) bounce.send_template_file(suspect.from_address, self.blockedfiletemplate, suspect,dict(blockinfo=blockinfo)) return DELETE if action=='delete': self._logger().info('Mail contains blocked attachment name/type %s (delete, no bounce)'%object) return DELETE if action=='accept': return 'accept'
prog=self.rulescache.getRegex(regex) if self.extremeverbosity: self._logger().debug('Attachment %s Rule %s'%(object,regex)) if prog.search( object): info=ruleset[regex] action=info[0] description=info[2] self._logger().debug('Rulematch: Attachment=%s Rule=%s Description=%s Action=%s'%(object,regex,description,action)) suspect.debug('Rulematch: Attachment=%s Rule=%s Description=%s Action=%s'%(object,regex,description,action)) if action=='deny': asciirep="".join([x for x in object if ord(x) < 128]) self._logger().info('Mail contains blocked attachment name/type %s (delete, send bounce) '%object) blockinfo="%s: %s"%(asciirep,description) suspect.tags['FiletypePlugin.errormessage']=blockinfo bounce=Bounce(self.config) bounce.send_template_file(suspect.from_address, self.blockedfiletemplate, suspect,dict(blockinfo=blockinfo)) return DELETE if action=='delete': self._logger().info('Mail contains blocked attachment name/type %s (delete, no bounce)'%object) return DELETE if action=='accept': return 'accept'
def matchRules(self,ruleset,object,suspect): if ruleset==None: return DUNNO for regex in ruleset.keys(): prog=self.rulescache.getRegex(regex) if self.extremeverbosity: self._logger().debug('Attachment %s Rule %s'%(object,regex)) if prog.search( object): info=ruleset[regex] action=info[0] description=info[2] self._logger().debug('Rulematch: Attachment=%s Rule=%s Description=%s Action=%s'%(object,regex,description,action)) suspect.debug('Rulematch: Attachment=%s Rule=%s Description=%s Action=%s'%(object,regex,description,action)) if action=='deny': # remove non ascii chars asciirep="".join([x for x in object if ord(x) < 128]) self._logger().info('Mail contains blocked attachment name/type %s (delete, send bounce) '%object) blockinfo="%s: %s"%(asciirep,description) suspect.tags['FiletypePlugin.errormessage']=blockinfo bounce=Bounce(self.config) bounce.send_template_file(suspect.from_address, self.blockedfiletemplate, suspect,dict(blockinfo=blockinfo)) return DELETE if action=='delete': self._logger().info('Mail contains blocked attachment name/type %s (delete, no bounce)'%object) return DELETE if action=='accept': return 'accept' return DUNNO
4d29772df90bb45487afb97d9c84fabc464e2256 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10919/4d29772df90bb45487afb97d9c84fabc464e2256/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 4478, 12, 2890, 16, 7482, 278, 16, 1612, 16, 87, 407, 1181, 4672, 309, 25303, 631, 7036, 30, 327, 463, 2124, 3417, 225, 364, 3936, 316, 25303, 18, 2452, 13332, 11243, 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, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 4478, 12, 2890, 16, 7482, 278, 16, 1612, 16, 87, 407, 1181, 4672, 309, 25303, 631, 7036, 30, 327, 463, 2124, 3417, 225, 364, 3936, 316, 25303, 18, 2452, 13332, 11243, 33, 2890, 18...
True returns dict keyed by node labels.
True returns dict keyed by vertex labels.
def cluster_triangles(self, nbunch=None, with_labels=False): r""" Returns the number of triangles for nbunch of nodes as an ordered list. The clustering coefficient of a graph is the fraction of possible triangles that are triangles, c_i = triangles_i / (k_i*(k_i-1)/2) where k_i is the degree of node i, [1]. A coefficient for the whole graph is the average of the c_i. Transitivity is the fraction of all possible triangles which are triangles, T = 3*triangles/triads, [1]. INPUT: -- nbunch - The nodes to inspect. If nbunch=None, returns data for all nodes in the graph -- with_labels - (boolean) default False returns list as above True returns dict keyed by node labels. REFERENCE: [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX documentation. [Online] Available: https://networkx.lanl.gov/reference/networkx/ EXAMPLES: sage: (graphs.FruchtGraph()).cluster_triangles() [1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0] sage: (graphs.FruchtGraph()).cluster_triangles(with_labels=True) {0: 1, 1: 1, 2: 0, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 0, 9: 1, 10: 1, 11: 0} sage: (graphs.FruchtGraph()).cluster_triangles(nbunch=[0,1,2]) [1, 1, 0] """ import networkx return networkx.triangles(self._nxg, nbunch, with_labels)
e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2855, 67, 16857, 12356, 12, 2890, 16, 4264, 4384, 33, 7036, 16, 598, 67, 5336, 33, 8381, 4672, 436, 8395, 2860, 326, 1300, 434, 19959, 364, 4264, 4384, 434, 2199, 487, 392, 5901, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2855, 67, 16857, 12356, 12, 2890, 16, 4264, 4384, 33, 7036, 16, 598, 67, 5336, 33, 8381, 4672, 436, 8395, 2860, 326, 1300, 434, 19959, 364, 4264, 4384, 434, 2199, 487, 392, 5901, 666, ...
self.text(data, value) def text(self, data, value=None): """ Manage a data object's text information @param data: The current object being built. @type data: L{Object} @param value: Text content. @type value: unicode """ md = data.__metadata__ if value is None: try: return md.__xml__.text except AttributeError: return None else:
md = data.__metadata__
def import_text(self, data, node): """ Import text nodes into L{data} @param data: The current object being built. @type data: L{Object} @param node: The current node being proecessed. @type node: L{sax.Element} """ if node.text is None: return if len(node.text): value = node.getText() value = booleans.get(value.lower(), value) self.text(data, value)
692007d9afb0d2cc2f88cd84fc66410578df926d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5930/692007d9afb0d2cc2f88cd84fc66410578df926d/unmarshaller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 955, 12, 2890, 16, 501, 16, 756, 4672, 3536, 6164, 977, 2199, 1368, 511, 95, 892, 97, 632, 891, 501, 30, 1021, 783, 733, 3832, 6650, 18, 632, 723, 501, 30, 511, 95, 921, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 955, 12, 2890, 16, 501, 16, 756, 4672, 3536, 6164, 977, 2199, 1368, 511, 95, 892, 97, 632, 891, 501, 30, 1021, 783, 733, 3832, 6650, 18, 632, 723, 501, 30, 511, 95, 921, ...
return os.stat(n).st_rdev
return (devname, os.stat(n).st_rdev)
def blkdev_name_to_number(name): """Take the given textual block-device name (e.g., '/dev/sda1', 'hda') and return the device number used by the OS. """ n = expand_dev_name(name) devname = 'virtual-device' devnum = None try: return os.stat(n).st_rdev except Exception, ex: pass scsi_major = [ 8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135 ] if re.match( '/dev/sd[a-z]([1-9]|1[0-5])?$', n): major = scsi_major[(ord(n[7:8]) - ord('a')) / 16] minor = ((ord(n[7:8]) - ord('a')) % 16) * 16 + int(n[8:] or 0) devnum = major * 256 + minor elif re.match( '/dev/sd[a-i][a-z]([1-9]|1[0-5])?$', n): major = scsi_major[((ord(n[7:8]) - ord('a') + 1) * 26 + (ord(n[8:9]) - ord('a'))) / 16 ] minor = (((ord(n[7:8]) - ord('a') + 1 ) * 26 + (ord(n[8:9]) - ord('a'))) % 16) * 16 + int(n[9:] or 0) devnum = major * 256 + minor elif re.match( '/dev/hd[a-t]([1-9]|[1-5][0-9]|6[0-3])?', n): ide_majors = [ 3, 22, 33, 34, 56, 57, 88, 89, 90, 91 ] major = ide_majors[(ord(n[7:8]) - ord('a')) / 2] minor = ((ord(n[7:8]) - ord('a')) % 2) * 64 + int(n[8:] or 0) devnum = major * 256 + minor elif re.match( '/dev/xvd[a-p]([1-9]|1[0-5])?$', n): devnum = (202 << 8) + ((ord(n[8:9]) - ord('a')) << 4) + int(n[9:] or 0) elif re.match('/dev/xvd[q-z]([1-9]|1[0-5])?$', n): devname = 'virtual-device-ext' devnum = (1 << 28) + ((ord(n[8:9]) - ord('a')) << 8) + int(n[9:] or 0) elif re.match('/dev/xvd[a-i][a-z]([1-9]|1[0-5])?$', n): devname = 'virtual-device-ext' devnum = (1 << 28) + (((ord(n[8:9]) - ord('a') + 1) * 26 + (ord(n[9:10]) - ord('a'))) << 8) + int(n[10:] or 0) elif re.match( '^(0x)[0-9a-fA-F]+$', name ): devnum = string.atoi(name, 16) elif re.match('^[0-9]+$', name): devnum = string.atoi(name, 10) return (devname, devnum)
aa6d3ee870ad5274751e0dc00f934a504a043457 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/aa6d3ee870ad5274751e0dc00f934a504a043457/blkif.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11992, 5206, 67, 529, 67, 869, 67, 2696, 12, 529, 4672, 3536, 13391, 326, 864, 25774, 1203, 17, 5964, 508, 261, 73, 18, 75, 12990, 1173, 5206, 19, 87, 2414, 21, 2187, 296, 76, 2414, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11992, 5206, 67, 529, 67, 869, 67, 2696, 12, 529, 4672, 3536, 13391, 326, 864, 25774, 1203, 17, 5964, 508, 261, 73, 18, 75, 12990, 1173, 5206, 19, 87, 2414, 21, 2187, 296, 76, 2414, ...
return self.circuit_thread.is_alive() and \ self.listen_thread.is_alive() and \ self.stream_thread.is_alive() and \ self.test_thread.is_alive()
return self.circuit_thread.isAlive() and \ self.listen_thread.isAlive() and \ self.stream_thread.isAlive() and \ self.test_thread.isAlive()
def tests_running(self): """ Returns True if all threads associated with testing are alive. """ return self.circuit_thread.is_alive() and \ self.listen_thread.is_alive() and \ self.stream_thread.is_alive() and \ self.test_thread.is_alive()
a4f6ecf4da168ab2afb8f9b968abcef3a9cdd9d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/a4f6ecf4da168ab2afb8f9b968abcef3a9cdd9d8/torbel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7434, 67, 8704, 12, 2890, 4672, 3536, 2860, 1053, 309, 777, 7403, 3627, 598, 7769, 854, 13714, 18, 3536, 327, 365, 18, 24987, 67, 5930, 18, 291, 10608, 1435, 471, 521, 365, 18, 18085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7434, 67, 8704, 12, 2890, 4672, 3536, 2860, 1053, 309, 777, 7403, 3627, 598, 7769, 854, 13714, 18, 3536, 327, 365, 18, 24987, 67, 5930, 18, 291, 10608, 1435, 471, 521, 365, 18, 18085, ...
has = len(person_role_map.select(whereclause =
has = len(person_role_map.select(whereclause =
def roles(self): """ Lists and changes the person's roles. """
c21a2c9136cd8bc3f07470ed0a9e22791b6d4862 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12856/c21a2c9136cd8bc3f07470ed0a9e22791b6d4862/person.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4900, 12, 2890, 4672, 3536, 11592, 471, 3478, 326, 6175, 1807, 4900, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4900, 12, 2890, 4672, 3536, 11592, 471, 3478, 326, 6175, 1807, 4900, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
inc_dir = base else: inc_dir = os.path.join(base, "Include") if not os.path.exists(inc_dir): inc_dir = os.path.join(os.path.dirname(base), "Include") return inc_dir
return base else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir)
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: base = os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: inc_dir = base else: inc_dir = os.path.join(base, "Include") if not os.path.exists(inc_dir): inc_dir = os.path.join(os.path.dirname(base), "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": if plat_specific: return os.path.join(prefix, "Mac", "Include") else: return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " "on platform '%s'" % os.name)
47dc7517cd156ad0faf4d9705c6f7439a7e68b5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/47dc7517cd156ad0faf4d9705c6f7439a7e68b5d/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8103, 67, 9523, 12, 412, 270, 67, 12524, 33, 20, 16, 1633, 33, 7036, 4672, 3536, 990, 326, 1867, 4191, 5876, 6600, 1446, 1390, 18, 225, 971, 296, 412, 270, 67, 12524, 11, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8103, 67, 9523, 12, 412, 270, 67, 12524, 33, 20, 16, 1633, 33, 7036, 4672, 3536, 990, 326, 1867, 4191, 5876, 6600, 1446, 1390, 18, 225, 971, 296, 412, 270, 67, 12524, 11, 35...
Fixer ("rowenna","Speak with Rowenna",[("decided_iso_evil",0),("iso_mission3",0),("iso_mission2",1)],"bases/fixers/iso.spr","bases/fixers/iso.py")
Fixer ("rowenna","Speak with Rowenna",[("decided_iso_evil",0),("iso_mission3",0),("iso_mission2",1)],"bases/fixers/iso.spr","bases/fixers/iso.py"), Fixer ("rowenna","Speak with Rowenna",[("decided_iso_evil",0),("iso_mission3",0),("iso_mission2",-1)],"bases/fixers/iso.spr","bases/fixers/iso.py")
def drawobjs(self,room,x,y,wid,hei): Base.Texture(room,self.name,self.image,x+(wid/2),y+(hei/2)) Base.Python(room,self.name,x,y,wid,hei,self.text,self.choices,True)
48d1c7446bcf1ad1d9765ef348c313d2d39646f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/48d1c7446bcf1ad1d9765ef348c313d2d39646f9/fixers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 18093, 12, 2890, 16, 13924, 16, 92, 16, 93, 16, 30902, 16, 580, 77, 4672, 3360, 18, 10967, 12, 13924, 16, 2890, 18, 529, 16, 2890, 18, 2730, 16, 92, 15, 12, 30902, 19, 22, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 18093, 12, 2890, 16, 13924, 16, 92, 16, 93, 16, 30902, 16, 580, 77, 4672, 3360, 18, 10967, 12, 13924, 16, 2890, 18, 529, 16, 2890, 18, 2730, 16, 92, 15, 12, 30902, 19, 22, 36...
root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator')
root = SubElement(root, 'office:meta') el1 = SubElement(root, 'meta:generator')
def create_meta(self): root = etree.Element('office:document-meta', attrib=META_NAMESPACE_DICT) doc = etree.ElementTree(root) root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator') el1.text = 'Docutils/rst2odf.py/%s' % (VERSION, ) s1 = os.environ.get('USER', '') el1 = etree.SubElement(root, 'meta:initial-creator') el1.text = s1 s2 = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime()) el1 = etree.SubElement(root, 'meta:creation-date') el1.text = s2 el1 = etree.SubElement(root, 'dc:creator') el1.text = s1 el1 = etree.SubElement(root, 'dc:date') el1.text = s2 el1 = etree.SubElement(root, 'dc:language') el1.text = 'en-US' el1 = etree.SubElement(root, 'meta:editing-cycles') el1.text = '1' el1 = etree.SubElement(root, 'meta:editing-duration') el1.text = 'PT00M01S' title = self.visitor.get_title() el1 = etree.SubElement(root, 'dc:title') if title: el1.text = title else: el1.text = '[no title]' s1 = etree.tostring(doc) #doc = minidom.parseString(s1) #s1 = doc.toprettyxml(' ') return s1
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
]
Extension( 'pyRXPU', uRXPLIBSOURCES, include_dirs=[RXPDIR], define_macros=[('CHAR_SIZE', 16),], library_dirs=[], libraries=LIBS, ), ], classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: ReportLab BSD derived', 'Programming Language :: Python', 'Programming Language :: C', 'Operating System :: Unix', 'Operating System :: POSIX', 'Operating System :: Microsoft :: Windows', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Processing :: Markup :: XML', ]
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg)
256ec0f31741d4323e9df85b73a53b374cf16545 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/256ec0f31741d4323e9df85b73a53b374cf16545/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 809, 668, 12, 3576, 4672, 1930, 4798, 667, 1903, 668, 12, 11855, 18, 503, 4672, 1342, 1002, 1903, 668, 12, 3576, 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, 1002, 809, 668, 12, 3576, 4672, 1930, 4798, 667, 1903, 668, 12, 11855, 18, 503, 4672, 1342, 1002, 1903, 668, 12, 3576, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
course.distance = randreal(course.distance)
wcourse.distance = randreal(wcourse.distance)
def warp(course, involuntary): "ove under warp drive." blooey = False; twarp = False if not involuntary: # Not WARPX entry game.ididit = False if game.damage[DWARPEN] > 10.0: scanner.chew() skip(1) prout(_("Engineer Scott- \"The warp engines are damaged, Sir.\"")) return if damaged(DWARPEN) and game.warpfac > 4.0: scanner.chew() skip(1) prout(_("Engineer Scott- \"Sorry, Captain. Until this damage")) prout(_(" is repaired, I can only give you warp 4.\"")) return # Read in course and distance if course==None: try: course = getcourse(isprobe=False) except TrekError: return # Make sure starship has enough energy for the trip # Note: this formula is slightly different from the C version, # and lets you skate a bit closer to the edge. if course.power(game.warpfac) >= game.energy: # Insufficient power for trip game.ididit = False skip(1) prout(_("Engineering to bridge--")) if not game.shldup or 0.5*course.power(game.warpfac) > game.energy: iwarp = (game.energy/(course.dist+0.05)) ** 0.333333333 if iwarp <= 0: prout(_("We can't do it, Captain. We don't have enough energy.")) else: proutn(_("We don't have enough energy, but we could do it at warp %d") % iwarp) if game.shldup: prout(",") prout(_("if you'll lower the shields.")) else: prout(".") else: prout(_("We haven't the energy to go that far with the shields up.")) return # Make sure enough time is left for the trip game.optime = course.time(game.warpfac) if game.optime >= 0.8*game.state.remtime: skip(1) prout(_("First Officer Spock- \"Captain, I compute that such")) proutn(_(" a trip would require approximately %2.0f") % (100.0*game.optime/game.state.remtime)) prout(_(" percent of our")) proutn(_(" remaining time. Are you sure this is wise?\" ")) if not ja(): game.ididit = False game.optime=0 return # Entry WARPX if game.warpfac > 6.0: # Decide if engine damage will occur # ESR: Seems wrong. Probability of damage goes *down* with distance? prob = course.distance*(6.0-game.warpfac)**2/66.666666666 if prob > randreal(): blooey = True course.distance = randreal(course.distance) # Decide if time warp will occur if 0.5*course.distance*math.pow(7.0,game.warpfac-10.0) > randreal(): twarp = True if game.idebug and game.warpfac==10 and not twarp: blooey = False proutn("=== Force time warp? ") if ja(): twarp = True if blooey or twarp: # If time warp or engine damage, check path # If it is obstructed, don't do warp or damage for m_unused in range(course.moves): course.next() w = course.sector() if not w.valid_sector(): break if game.quad[w.i][w.j] != '.': blooey = False twarp = False course.reset() # Activate Warp Engines and pay the cost imove(course, noattack=False) if game.alldone: return game.energy -= course.power(game.warpfac) if game.energy <= 0: finish(FNRG) game.optime = course.time(game.warpfac) if twarp: timwrp() if blooey: game.damage[DWARPEN] = game.damfac * randreal(1.0, 4.0) skip(1) prout(_("Engineering to bridge--")) prout(_(" Scott here. The warp engines are damaged.")) prout(_(" We'll have to reduce speed to warp 4.")) game.ididit = True return
b8ffe91a83c83c29cc1a574e3fc2d857d582df33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/b8ffe91a83c83c29cc1a574e3fc2d857d582df33/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 11441, 12, 5566, 16, 29876, 10032, 814, 4672, 315, 841, 3613, 341, 11441, 14316, 1199, 324, 383, 83, 402, 273, 1083, 31, 268, 905, 84, 273, 1083, 309, 486, 29876, 10032, 814, 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, 341, 11441, 12, 5566, 16, 29876, 10032, 814, 4672, 315, 841, 3613, 341, 11441, 14316, 1199, 324, 383, 83, 402, 273, 1083, 31, 268, 905, 84, 273, 1083, 309, 486, 29876, 10032, 814, 30, ...