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
def _compare_providers(self, pkgs, bestpkg, requiring_arch):
def _compare_providers(self, pkgs, bestpkg, reqpo): def _common_prefix_len(x, y, minlen=2): num = min(len(x), len(y)) for off in range(num): if x[off] != y[off]: return max(off, minlen) return max(num, minlen) def _common_sourcerpm(x, y): if not hasattr(x, 'sourcerpm'): return False if not hasattr(y, 'sourcerpm'): return False return x.sourcerpm == y.sourcerpm
def _compare_providers(self, pkgs, bestpkg, requiring_arch):
598f36ebcd8da6498317b30929238b65a6db623e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/598f36ebcd8da6498317b30929238b65a6db623e/depsolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9877, 67, 17520, 12, 2890, 16, 16922, 16, 3796, 10657, 16, 29468, 67, 991, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9877, 67, 17520, 12, 2890, 16, 16922, 16, 3796, 10657, 16, 29468, 67, 991, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.mkpath (os.path.dirname (obj))
self.mkpath(os.path.dirname(obj))
def compile (self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
35c5384ab8055cc66d91421c142147c213766a95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/35c5384ab8055cc66d91421c142147c213766a95/bcppcompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 261, 2890, 16, 5550, 16, 876, 67, 1214, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 1198, 33, 20, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 261, 2890, 16, 5550, 16, 876, 67, 1214, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 1198, 33, 20, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, ...
client = { 'host': chooseClientIP(myT), 'uuid': myT.getUUID(), 'maxbw': myC.maxbw, 'protocol': 'ssh', 'client_check': getClientCheck(myT), 'server_check': getServerCheck(myT), 'action': getAnnounceCheck('inventory'), 'group': getClientGroup(myT)}
client = { 'host': chooseClientIP(myT), 'uuid': myT.getUUID(), 'maxbw': myC.maxbw, 'protocol': 'ssh', 'client_check': getClientCheck(myT), 'server_check': getServerCheck(myT), 'action': getAnnounceCheck('halt'), 'group': getClientGroup(myT)}
def runHaltPhase(myCommandOnHostID, condition): (myCoH, myC, myT) = gatherCoHStuff(myCommandOnHostID) logger = logging.getLogger() logger.info("command_on_host #%s: halt phase" % myCommandOnHostID) if myCoH == None: return None if myCoH.isHaltRunning(): # halt still running, immediately returns logging.getLogger().info("command_on_host #%s: still halting" % myCommandOnHostID) return None if myCoH.isHaltIgnored(): # halt has already be ignored, jump to next stage logger.info("command_on_host #%s: halt ignored" % myCommandOnHostID) return runDonePhase(myCommandOnHostID) if myCoH.isHaltDone(): # halt has already be done, jump to next stage logger.info("command_on_host #%s: halt done" % myCommandOnHostID) return runDonePhase(myCommandOnHostID) if myC.isPartOfABundle() and not isLastToHaltInBundle(myCommandOnHostID): # there is still a coh in the same bundle that has to halt, jump to next stage logger.info("command_on_host #%s: another coh from the same bundle will do the halt" % myCommandOnHostID) return runDonePhase(myCommandOnHostID) if not myCoH.isHaltImminent(): # nothing to do right now, give out logger.info("command_on_host #%s: do not halt right now" % myCoH.getId()) return None if not myC.hasToHalt(): # do not run halt logger.info("command_on_host #%s: halt ignored" % myCommandOnHostID) myCoH.setHaltIgnored() myCoH.setStateScheduled() return runDonePhase(myCommandOnHostID) if condition == 'done' and not myC.hasToHaltIfDone(): # halt on done and we do not have to halt on done logger.info("command_on_host #%s: halt-on-done ignored" % myCommandOnHostID) myCoH.setHaltIgnored() myCoH.setStateScheduled() return runDonePhase(myCommandOnHostID) if condition == 'failed' and not myC.hasToHaltIfFailed(): # halt on failed and we do not have to halt on failure logger.info("command_on_host #%s: halt-on-failed ignored" % myCommandOnHostID) myCoH.setHaltIgnored() myCoH.setStateScheduled() return runDonePhase(myCommandOnHostID) client = { 'host': chooseClientIP(myT), 'uuid': myT.getUUID(), 'maxbw': myC.maxbw, 'protocol': 'ssh', 'client_check': getClientCheck(myT), 'server_check': getServerCheck(myT), 'action': getAnnounceCheck('inventory'), 'group': getClientGroup(myT)} if not client['host']: # We couldn't get an IP address for the target host return twisted.internet.defer.fail(Exception("Can't get target IP address")).addErrback(parseHaltError, myCommandOnHostID) myCoH.setHaltInProgress() myCoH.setStateHaltInProgress() if SchedulerConfig().mode == 'sync': updateHistory(myCommandOnHostID, 'halt_in_progress') mydeffered = callOnBestLauncher( myCommandOnHostID, 'sync_remote_halt', False, myCommandOnHostID, client, SchedulerConfig().max_command_time ) mydeffered.\ addCallback(parseHaltResult, myCommandOnHostID).\ addErrback(parseHaltError, myCommandOnHostID) elif SchedulerConfig().mode == 'async': mydeffered = callOnBestLauncher( myCommandOnHostID, 'async_remote_halt', False, myCommandOnHostID, client, SchedulerConfig().max_command_time ) mydeffered.\ addCallback(parseHaltOrder, myCommandOnHostID).\ addErrback(parseHaltError, myCommandOnHostID) else: return None return mydeffered
3bc4d624e13e01ddd41b7f7a18bcd835c125f0d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/3bc4d624e13e01ddd41b7f7a18bcd835c125f0d1/scheduling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 27034, 11406, 12, 4811, 2189, 1398, 2594, 734, 16, 2269, 4672, 261, 4811, 4249, 44, 16, 3399, 39, 16, 3399, 56, 13, 273, 11090, 4249, 44, 510, 3809, 12, 4811, 2189, 1398, 2594, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 27034, 11406, 12, 4811, 2189, 1398, 2594, 734, 16, 2269, 4672, 261, 4811, 4249, 44, 16, 3399, 39, 16, 3399, 56, 13, 273, 11090, 4249, 44, 510, 3809, 12, 4811, 2189, 1398, 2594, 7...
def __init__(self, *attrs): table.Table.__init__(self, *attrs) self.cursor = CoincDatabaseConnection.cursor()
connection = None def __init__(self, *attrs): table.Table.__init__(self, *attrs) self.cursor = self.connection.cursor()
def get_geocent_peak(self): return LIGOTimeGPS(self.peak_time, self.peak_time_ns)
d54fb732022835e478a56be4372e71bb33d3cede /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3592/d54fb732022835e478a56be4372e71bb33d3cede/SnglBurstUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 908, 504, 319, 67, 10244, 12, 2890, 4672, 327, 511, 3047, 51, 950, 28983, 12, 2890, 18, 10244, 67, 957, 16, 365, 18, 10244, 67, 957, 67, 2387, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 908, 504, 319, 67, 10244, 12, 2890, 4672, 327, 511, 3047, 51, 950, 28983, 12, 2890, 18, 10244, 67, 957, 16, 365, 18, 10244, 67, 957, 67, 2387, 13, 2, -100, -100, -100, -100,...
decoupler._addVariable(var, False)
def transformIntoCond(self, containing=None): """Transforms this scope into its binding condition. `containing` is the scope object corresponding to the containing scope.
6e025f7b21e49c8c49798a30af00a60a9939001e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5223/6e025f7b21e49c8c49798a30af00a60a9939001e/decouple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 5952, 12441, 12, 2890, 16, 4191, 33, 7036, 4672, 3536, 15236, 333, 2146, 1368, 2097, 5085, 2269, 18, 1375, 1213, 3280, 68, 353, 326, 2146, 733, 4656, 358, 326, 4191, 2146, 18, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2510, 5952, 12441, 12, 2890, 16, 4191, 33, 7036, 4672, 3536, 15236, 333, 2146, 1368, 2097, 5085, 2269, 18, 1375, 1213, 3280, 68, 353, 326, 2146, 733, 4656, 358, 326, 4191, 2146, 18, 2, ...
def __init__(self, defaultText=""):
def __init__(self, domain, defaultText):
def __init__(self, defaultText=""): super(LocalizableString, self).__init__() self.defaultText = defaultText
4e870a41aa5b8819295178c3abbadff4706a3709 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/4e870a41aa5b8819295178c3abbadff4706a3709/Types.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2461, 16, 805, 1528, 4672, 2240, 12, 2042, 6934, 780, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 1886, 1528, 273, 805, 1528, 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, 2738, 972, 12, 2890, 16, 2461, 16, 805, 1528, 4672, 2240, 12, 2042, 6934, 780, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 1886, 1528, 273, 805, 1528, 2, -100, -100, -100, -100...
class barrier: def __init__(self, n): self.n = n
def setUp(self): self.done_mutex = thread.allocate_lock() self.done_mutex.acquire() self.running_mutex = thread.allocate_lock() self.random_mutex = thread.allocate_lock() self.running = 0 self.next_ident = 0 class ThreadRunningTests(BasicThreadTest): def newtask(self): with self.running_mutex: self.next_ident += 1 verbose_print("creating task %s" % self.next_ident) thread.start_new_thread(self.task, (self.next_ident,)) self.running += 1 def task(self, ident): with self.random_mutex: delay = random.random() * NUMTASKS verbose_print("task %s will run for %s" % (ident, round(delay, 1))) time.sleep(delay) verbose_print("task %s done" % ident) with self.running_mutex: self.running -= 1 if self.running == 0: self.done_mutex.release() def test_starting_threads(self): for i in range(NUMTASKS): self.newtask() verbose_print("waiting for tasks to complete...") self.done_mutex.acquire() verbose_print("all tasks done") def test_stack_size(self): self.assertEquals(thread.stack_size(), 0, "intial stack size is not 0") thread.stack_size(0) self.assertEquals(thread.stack_size(), 0, "stack_size not reset to default") if os.name not in ("nt", "os2", "posix"): return tss_supported = True try: thread.stack_size(4096) except ValueError: verbose_print("caught expected ValueError setting " "stack_size(4096)") except thread.error: tss_supported = False verbose_print("platform does not support changing thread stack " "size") if tss_supported: fail_msg = "stack_size(%d) failed - should succeed" for tss in (262144, 0x100000, 0): thread.stack_size(tss) self.assertEquals(thread.stack_size(), tss, fail_msg % tss) verbose_print("successfully set stack_size(%d)" % tss) for tss in (262144, 0x100000): verbose_print("trying stack_size = (%d)" % tss) self.next_ident = 0 for i in range(NUMTASKS): self.newtask() verbose_print("waiting for all tasks to complete") self.done_mutex.acquire() verbose_print("all tasks done") thread.stack_size(0) class Barrier: def __init__(self, num_threads): self.num_threads = num_threads
def newtask(): global next_ident, running mutex.acquire() next_ident = next_ident + 1 if verbose: print 'creating task', next_ident thread.start_new_thread(task, (next_ident,)) running = running + 1 mutex.release()
157f92e2b29d073ecbc5a79ea012f85cd0478331 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/157f92e2b29d073ecbc5a79ea012f85cd0478331/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 4146, 13332, 2552, 1024, 67, 6392, 16, 3549, 9020, 18, 1077, 1039, 1435, 1024, 67, 6392, 273, 1024, 67, 6392, 397, 404, 309, 3988, 30, 1172, 296, 23799, 1562, 2187, 1024, 67, 6392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 4146, 13332, 2552, 1024, 67, 6392, 16, 3549, 9020, 18, 1077, 1039, 1435, 1024, 67, 6392, 273, 1024, 67, 6392, 397, 404, 309, 3988, 30, 1172, 296, 23799, 1562, 2187, 1024, 67, 6392, ...
f = open(filename, 'rb') data = f.read() f.close()
data = read_file(filename, 'rb')
def test_write_file(self): tree = self.parse(_bytes('<a><b/></a>')) handle, filename = tempfile.mkstemp() try: tree.write(filename) f = open(filename, 'rb') data = f.read() f.close() finally: os.close(handle) os.remove(filename) self.assertEquals(_bytes('<a><b/></a>'), data)
b14f67842b88f2fcecb24166f1ffb7de156066b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13107/b14f67842b88f2fcecb24166f1ffb7de156066b1/test_etree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 768, 12, 2890, 4672, 2151, 273, 365, 18, 2670, 24899, 3890, 2668, 32, 69, 4438, 70, 19, 4695, 69, 1870, 3719, 1640, 16, 1544, 273, 13275, 18, 24816, 19781, 84, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2626, 67, 768, 12, 2890, 4672, 2151, 273, 365, 18, 2670, 24899, 3890, 2668, 32, 69, 4438, 70, 19, 4695, 69, 1870, 3719, 1640, 16, 1544, 273, 13275, 18, 24816, 19781, 84, 1435...
def __init__(self,cparser,scienceSegment,injectFlag,logfile):
def __init__(self,cparser,injectFlag,logfile,scienceSegment=''): self.sciSeg='' self.runStartTime='' self.blockID='' self.lastBlockID='' self.dagName=''
def __init__(self,cparser,scienceSegment,injectFlag,logfile): #cp -> ConfigParser object self.cp=cparser self.injectFlag=False self.injectFlag=injectFlag self.jobType="" #Injection relevant config if self.injectFlag == True: self.jobType='injection' else: self.jobType='normal' #Check to see if Config object contains a multichannel #section if so set the multichannel boolean to true and adjust #dag construction accordingly self.currentchannel=str('') self.channellist=list() self.have_multichannel=False self.sec_multichannel=sec_multichannel="multichannel" if self.cp.has_section(sec_multichannel): self.have_multichannel=True for channel in self.cp.options(sec_multichannel): self.channellist.append(str(self.cp.get(sec_multichannel,channel)).strip()) #Expects a fixed size PsuedoScience Segment #The dag for this run will be then run from this data self.sciSeg=scienceSegment self.runStartTime=self.sciSeg.start() #The variable to link a previous jobblock into next block #???? self.blockJobLinkList=[] #???? self.blockID=str(self.sciSeg.start())+':'+str(self.sciSeg.dur()) self.lastBlockID='NONE' #???? self.dag = pipeline.CondorDAG(logfile) self.dagName='tracksearchDAG_'+str(self.sciSeg.start())+'_duration_'+str(self.sciSeg.dur()) self.resultPath=self.cp.get('filelayout','workpath') self.dagDirectory=self.getDagDirectory() self.dagFilename=self.dagDirectory+'/'+self.dagName buildDir(self.dagDirectory) self.dag.set_dag_file(self.dagFilename) #Variables that are common to all search layers self.percentOverlap=float(string.strip(self.cp.get('layerconfig','layerOverlapPercent'))) self.layerTimeScaleInfo=[] tempLib=[] for opt in self.cp.options('layerconfig'): section='layerconfig' arg=string.strip(self.cp.get(section,opt)) if str(opt).__contains__(str('TimeScale').lower()): entry=[] entry.append(str(opt)) entry.append(str(arg)) tempLib.append(entry) tempLib.sort() self.layerTimeScaleInfo=tempLib tempLib=[] self.layerSetSizeInfo=[] for opt in self.cp.options('layerconfig'): section='layerconfig' arg=string.strip(self.cp.get(section,opt)) if str(opt).__contains__(str('SetSize').lower()): entry=[] entry.append(str(arg)) tempLib.append(entry) tempLib.sort() self.layerSetSizeInfo=tempLib if self.layerTimeScaleInfo.__len__()!=self.layerSetSizeInfo.__len__(): sys.stderr.write("ERROR with section [layerconfig]\n") self.layerCount=self.layerTimeScaleInfo.__len__()
10eef3f371e9c27dc4f8bdc774a4c04da9328dc4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/10eef3f371e9c27dc4f8bdc774a4c04da9328dc4/tracksearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 71, 4288, 16, 1017, 6254, 4131, 16, 22170, 4678, 16, 28806, 4672, 468, 4057, 317, 25076, 733, 365, 18, 4057, 33, 71, 4288, 365, 18, 22170, 4678, 33, 8381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 71, 4288, 16, 1017, 6254, 4131, 16, 22170, 4678, 16, 28806, 4672, 468, 4057, 317, 25076, 733, 365, 18, 4057, 33, 71, 4288, 365, 18, 22170, 4678, 33, 8381...
idb = id(b)
idb = compute_unique_id(b)
def run_once(): a = A() ida = id(a) b = B() idb = id(b) c = C() idc = id(c) llop.gc__collect(lltype.Void) llop.gc__collect(lltype.Void) llop.gc__collect(lltype.Void) return ida, idb, idc
8624ed2e4cb7a9fc5cd3578b6a083738d4e4e7e9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/8624ed2e4cb7a9fc5cd3578b6a083738d4e4e7e9/test_boehm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 13332, 279, 273, 432, 1435, 612, 69, 273, 612, 12, 69, 13, 324, 273, 605, 1435, 612, 70, 273, 3671, 67, 6270, 67, 350, 12, 70, 13, 276, 273, 385, 1435, 612, 71, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 13332, 279, 273, 432, 1435, 612, 69, 273, 612, 12, 69, 13, 324, 273, 605, 1435, 612, 70, 273, 3671, 67, 6270, 67, 350, 12, 70, 13, 276, 273, 385, 1435, 612, 71, 273...
acct = proto.WebbyAccount('%s@%s' % key,
acct = WebbyAccount('%s@%s' % key,
def doConnection(self, host, username, password, channels): key = (username, host) if key in ACCOUNTS and ACCOUNTS[key].isOnline(): self.disconnect(ACCOUNTS[key])
bb05985127b7357665d1c21721b52fde34acbe27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/bb05985127b7357665d1c21721b52fde34acbe27/minchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1952, 12, 2890, 16, 1479, 16, 2718, 16, 2201, 16, 5750, 4672, 498, 273, 261, 5053, 16, 1479, 13, 309, 498, 316, 29437, 55, 471, 29437, 55, 63, 856, 8009, 291, 16860, 13332, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1952, 12, 2890, 16, 1479, 16, 2718, 16, 2201, 16, 5750, 4672, 498, 273, 261, 5053, 16, 1479, 13, 309, 498, 316, 29437, 55, 471, 29437, 55, 63, 856, 8009, 291, 16860, 13332, 365, ...
def figure(n=None, style='/tmp/currstyle.gs', color=-2, frame=0, labelsize=14, labelfont='helvetica',aspect=1.618,dpi=75):
def setdpi(num): """ Set the dpi for new windows """ if num in [75,100]: _dpi = num gist.set_default_dpi(_dpi) else: raise ValueError, "DPI must be 75 or 100" def figure(n=None,style='/tmp/currstyle.gs', color=-2, frame=0, labelsize=14, labelfont='helvetica',aspect=1.618): global _figures
def figure(n=None, style='/tmp/currstyle.gs', color=-2, frame=0, labelsize=14, labelfont='helvetica',aspect=1.618,dpi=75): if (aspect < 0.1) or (aspect > 10): aspect = 1.618 if isinstance(color, types.StringType): color = _colornum[color] fid = open(style,'w') syst = write_style.getsys(color=color,frame=frame, labelsize=labelsize,font=labelfont) cntr = (5.5*inches,4.25*inches) # horizontal, vertical height = 4.25*inches width = aspect*height syst['viewport'] = [cntr[0]-width/2.0,cntr[0]+width/2.0,cntr[1]-height/2.0,cntr[1]+height/2.0] fid.write(write_style.style2string(syst,landscape=1)) fid.close() if n is None: gist.window(style=style,width=int(width*1.25/inches*dpi),height=int(height*1.4/inches*dpi),dpi=dpi) else: gist.window(n,style=style,width=int(width*1.25/inches*dpi),height=int(height*1.4/inches*dpi),dpi=dpi) _current_style = style return
52cc5149afc80e6ec63ff8f313429740b6845b1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52cc5149afc80e6ec63ff8f313429740b6845b1a/Mplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 72, 7259, 12, 2107, 4672, 3536, 1000, 326, 16361, 364, 394, 9965, 3536, 309, 818, 316, 306, 5877, 16, 6625, 14542, 389, 72, 7259, 273, 818, 29503, 18, 542, 67, 1886, 67, 72, 7259,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 72, 7259, 12, 2107, 4672, 3536, 1000, 326, 16361, 364, 394, 9965, 3536, 309, 818, 316, 306, 5877, 16, 6625, 14542, 389, 72, 7259, 273, 818, 29503, 18, 542, 67, 1886, 67, 72, 7259,...
Raised when all weights along axis are zero. See numpy.ma.average for a
When all weights along axis are zero. See numpy.ma.average for a
def average(a, axis=None, weights=None, returned=False): """Return the weighted average of array a over the given axis. Parameters ---------- a : array_like Data to be averaged. axis : {None, integer}, optional Axis along which to average a. If None, averaging is done over the entire array irrespective of its shape. weights : {None, array_like}, optional The importance each datum has in the computation of the average. The weights array can either be 1D, in which case its length must be the size of a along the given axis, or of the same shape as a. If weights=None, all data are assumed to have weight equal to one. returned :{False, boolean}, optional If True, the tuple (average, sum_of_weights) is returned, otherwise only the average is returmed. Note that if weights=None, then the sum of the weights is also the number of elements averaged over. Returns ------- average, [sum_of_weights] : {array_type, double} Return the average along the specified axis. When returned is True, return a tuple with the average as the first element and the sum of the weights as the second element. The return type is Float if a is of integer type, otherwise it is of the same type as a. sum_of_weights is has the same type as the average. Example ------- >>> average(range(1,11), weights=range(10,0,-1)) 4.0 Exceptions ---------- ZeroDivisionError Raised when all weights along axis are zero. See numpy.ma.average for a version robust to this type of error. TypeError Raised when the length of 1D weights is not the same as the shape of a along axis. """ if not isinstance(a, np.matrix) : a = np.asarray(a) if weights is None : avg = a.mean(axis) scl = avg.dtype.type(a.size/avg.size) else : a = a + 0.0 wgt = np.array(weights, dtype=a.dtype, copy=0) # Sanity checks if a.shape != wgt.shape : if axis is None : raise TypeError, "Axis must be specified when shapes of a and weights differ." if wgt.ndim != 1 : raise TypeError, "1D weights expected when shapes of a and weights differ." if wgt.shape[0] != a.shape[axis] : raise ValueError, "Length of weights not compatible with specified axis." # setup wgt to broadcast along axis wgt = np.array(wgt, copy=0, ndmin=a.ndim).swapaxes(-1,axis) scl = wgt.sum(axis=axis) if (scl == 0.0).any(): raise ZeroDivisionError, "Weights sum to zero, can't be normalized" avg = np.multiply(a,wgt).sum(axis)/scl if returned: scl = np.multiply(avg,0) + scl return avg, scl else: return avg
46768e679bbb8f2beabdafff51696d76e7caa920 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/46768e679bbb8f2beabdafff51696d76e7caa920/function_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8164, 12, 69, 16, 2654, 33, 7036, 16, 5376, 33, 7036, 16, 2106, 33, 8381, 4672, 3536, 990, 326, 13747, 8164, 434, 526, 279, 1879, 326, 864, 2654, 18, 282, 7012, 12181, 279, 294, 526, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8164, 12, 69, 16, 2654, 33, 7036, 16, 5376, 33, 7036, 16, 2106, 33, 8381, 4672, 3536, 990, 326, 13747, 8164, 434, 526, 279, 1879, 326, 864, 2654, 18, 282, 7012, 12181, 279, 294, 526, ...
duration = datetime.timedelta(minutes=int(m.group(2) or 0), seconds=int(m.group(3)))
duration = datetime.timedelta(hours=int(m.group(2) or 0), minutes=int(m.group(4) or 0), seconds=int(m.group(5)))
def iter_videos(self): ul = select(self.document.getroot(), 'div.container-videos ul', 1) for li in ul.findall('li'): id = re.sub(r'/video/(.+)\.html', r'\1', li.find('a').attrib['href'])
738ddc9c60b0f1b40036ab1f370d939643741984 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/738ddc9c60b0f1b40036ab1f370d939643741984/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 6768, 538, 12, 2890, 4672, 7493, 273, 2027, 12, 2890, 18, 5457, 18, 588, 3085, 9334, 296, 2892, 18, 3782, 17, 6768, 538, 7493, 2187, 404, 13, 364, 4501, 316, 7493, 18, 4720, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 6768, 538, 12, 2890, 4672, 7493, 273, 2027, 12, 2890, 18, 5457, 18, 588, 3085, 9334, 296, 2892, 18, 3782, 17, 6768, 538, 7493, 2187, 404, 13, 364, 4501, 316, 7493, 18, 4720, ...
match = re.match(".*:b(.*?):",line)
match = re.match(".*:b([-0-9]*?):",line)
def parse(self,line,line_no) : self.line_no = line_no # Get the Format Revision No. # This allows us to change revisions in the future, and # have this code still be able to cope with changes. match = re.match("^F1:",line) # If line starts with F1: then Revision 1 if match : # Parse the line for revision 1 format if debug : print "Matching a Format Rev 1 line" match = re.match(".*:T(.*?):",line) # Time of Week if match : self.tm = float (match.group(1)) else : print "Failure parsing time of week at line", line_no return "Error" match = re.match(".*:S(.*?):",line) # Status Flags if match : self.status = match.group(1) else : print "Failure parsing status flags at line", line_no return "Error" match = re.match(".*:N(.*?):",line) # Lat North if match : self.latitude = float(match.group(1)) else : print "Failure parsing Lat North at line", line_no return "Error" match = re.match(".*:E(.*?):",line) # Lon East if match : self.longitude = float (match.group(1)) else : print "Failure parsing Lon East at line", line_no return "Error" match = re.match(".*:A(.*?):",line) # Altitude if match : self.altitude = float(match.group(1)) else : print "Failure parsing Altitude at line", line_no return "Error" match = re.match(".*:W(.*?):",line) # Waypoint Index if match : self.waypointIndex = int(match.group(1)) else : print "Failure parsing Wapoint Index at line", line_no return "Error" match = re.match(".*:a(.*?):",line) # rmat 0 if match : self.rmat0 = int(match.group(1)) else : print "Failure parsing rmat0 at line", line_no return "Error" match = re.match(".*:b(.*?):",line) # rmat 1 if match : self.rmat1 = int(match.group(1)) else : print "Failure parsing rmat1 at line", line_no return "Error" match = re.match(".*:c(.*?):",line) # rmat 2 if match : self.rmat2 = int(match.group(1)) else : print "Failure parsing rmat2 at line", line_no return "Error" match = re.match(".*:d(.*?):",line) # rmat 3 if match : self.rmat3 = int(match.group(1)) else : print "Failure parsing rmat3 at line", line_no return "Error" match = re.match(".*:e(.*?):",line) # rmat 4 if match : self.rmat4 = int(match.group(1)) else : print "Failure parsing rmat4 at line", line_no return "Error" match = re.match(".*:f(.*?):",line) # rmat 5 if match : self.rmat5 = int(match.group(1)) else : print "Failure parsing rmat5 at line", line_no return "Error" match = re.match(".*:g(.*?):",line) # rmat 6 if match : self.rmat6 = int(match.group(1)) else : print "Failure parsing rmat6 at line", line_no return "Error" match = re.match(".*:h(.*?):",line) # rmat 7 if match : self.rmat7 = int(match.group(1)) else : print "Failure parsing rmat7 at line", line_no return "Error" match = re.match(".*:i(.*?):",line) # rmat 8 if match : self.rmat8 = int(match.group(1)) else : print "Failure parsing rmat8 at line", line_no return "Error" # Because of a mistake in sprintf in UDB code, # sog and cog have to be swapped over in Rev F1 of telemetry match = re.match(".*:c(.*?):",line) # Speed Over Ground if match : self.sog = int(match.group(1)) else : print "Failure parsing Speed Over Ground at line", line_no return "Error" match = re.match(".*:s(.*?):",line) # Course Over Ground if match : self.cog = int(match.group(1)) else : print "Failure parsing Course Over Ground at line", line_no return "Error" # line was parsed without Errors return "F1"
716cb9f57d23f6a76a31997d0f269ce3f4054e2d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1364/716cb9f57d23f6a76a31997d0f269ce3f4054e2d/uav_log_to_kml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 1369, 16, 1369, 67, 2135, 13, 294, 365, 18, 1369, 67, 2135, 273, 980, 67, 2135, 468, 968, 326, 4077, 13132, 2631, 18, 468, 1220, 5360, 584, 358, 2549, 18325, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 1369, 16, 1369, 67, 2135, 13, 294, 365, 18, 1369, 67, 2135, 273, 980, 67, 2135, 468, 968, 326, 4077, 13132, 2631, 18, 468, 1220, 5360, 584, 358, 2549, 18325, 316, ...
s._checked = False
self._checked = False
def __init__(self, type=None, geometry=None, checked=False, PedFileSystem=None): if checked: c = 1 else: c = 0
8b0d9b4983d6ed15d745f54e0a9026e2a7051775 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5978/8b0d9b4983d6ed15d745f54e0a9026e2a7051775/filesystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 33, 7036, 16, 5316, 33, 7036, 16, 5950, 33, 8381, 16, 453, 329, 11785, 33, 7036, 4672, 309, 5950, 30, 276, 273, 404, 469, 30, 276, 273, 374, 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, 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, 618, 33, 7036, 16, 5316, 33, 7036, 16, 5950, 33, 8381, 16, 453, 329, 11785, 33, 7036, 4672, 309, 5950, 30, 276, 273, 404, 469, 30, 276, 273, 374, 2, ...
end = dt(mean.year, mean.month, mean.day + 1)
end = start + timedelta(days=1)
def fit_day(self): mean = self.mean_time() start = dt(mean.year, mean.month, mean.day) end = dt(mean.year, mean.month, mean.day + 1) self.update(start, end)
0fbc52ed0b49e27fced0712da05c81dbe9355d9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/0fbc52ed0b49e27fced0712da05c81dbe9355d9b/objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 67, 2881, 12, 2890, 4672, 3722, 273, 365, 18, 7079, 67, 957, 1435, 787, 273, 3681, 12, 7079, 18, 6874, 16, 3722, 18, 7496, 16, 3722, 18, 2881, 13, 679, 273, 787, 397, 10661, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 67, 2881, 12, 2890, 4672, 3722, 273, 365, 18, 7079, 67, 957, 1435, 787, 273, 3681, 12, 7079, 18, 6874, 16, 3722, 18, 7496, 16, 3722, 18, 2881, 13, 679, 273, 787, 397, 10661, 12...
delay = random.random() * 2 if verbose: print 'task', self.getName(), 'will run for', delay, 'sec' self.sema.acquire() self.mutex.acquire() self.nrunning.inc() if verbose: print self.nrunning.get(), 'tasks are running' self.testcase.assert_(self.nrunning.get() <= 3) self.mutex.release() time.sleep(delay) if verbose: print 'task', self.getName(), 'done' self.mutex.acquire() self.nrunning.dec() self.testcase.assert_(self.nrunning.get() >= 0) if verbose: print self.getName(), 'is finished.', self.nrunning.get(), \ 'tasks are running' self.mutex.release() self.sema.release()
delay = random.random() / 10000.0 if verbose: print 'task %s will run for %.1f usec' % ( self.getName(), delay * 1e6) with self.sema: with self.mutex: self.nrunning.inc() if verbose: print self.nrunning.get(), 'tasks are running' self.testcase.assert_(self.nrunning.get() <= 3) time.sleep(delay) if verbose: print 'task', self.getName(), 'done' with self.mutex: self.nrunning.dec() self.testcase.assert_(self.nrunning.get() >= 0) if verbose: print '%s is finished. %d tasks are running' % ( self.getName(), self.nrunning.get())
def run(self): delay = random.random() * 2 if verbose: print 'task', self.getName(), 'will run for', delay, 'sec'
b62035f3c42ef32531fe3a28e880614f93a6ae73 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/b62035f3c42ef32531fe3a28e880614f93a6ae73/test_threading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 4624, 273, 2744, 18, 9188, 1435, 380, 576, 309, 3988, 30, 1172, 296, 4146, 2187, 365, 18, 17994, 9334, 296, 20194, 1086, 364, 2187, 4624, 16, 296, 3321, 11, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 4624, 273, 2744, 18, 9188, 1435, 380, 576, 309, 3988, 30, 1172, 296, 4146, 2187, 365, 18, 17994, 9334, 296, 20194, 1086, 364, 2187, 4624, 16, 296, 3321, 11, 2, -1...
flist = FileList(root)
flist = PyShellFileList(root)
def main(): global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = FileList(root) if sys.argv[1:]: for filename in sys.argv[1:]: flist.open(filename) t = PyShell(flist) t.interact()
497449d987eac61c2a97fad4d333e0142df31da5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/497449d987eac61c2a97fad4d333e0142df31da5/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 284, 1098, 16, 1365, 1365, 273, 399, 79, 1435, 2917, 1095, 29292, 12, 3085, 13, 1365, 18, 1918, 9446, 1435, 284, 1098, 273, 4707, 13220, 26098, 12, 3085, 13, 309, 2589...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 284, 1098, 16, 1365, 1365, 273, 399, 79, 1435, 2917, 1095, 29292, 12, 3085, 13, 1365, 18, 1918, 9446, 1435, 284, 1098, 273, 4707, 13220, 26098, 12, 3085, 13, 309, 2589...
}
}
def select_crystal_symmetry( from_command_line, from_parameter_file, from_coordinate_files, from_reflection_files): result = crystal.symmetry( unit_cell=None, space_group_info=None) if (from_command_line is not None): result = result.join_symmetry( other_symmetry=from_command_line, force=False) if (from_parameter_file is not None): result = result.join_symmetry( other_symmetry=from_parameter_file, force=False) if (result.unit_cell() is None): for crystal_symmetry in from_reflection_files: unit_cell = crystal_symmetry.unit_cell() if (unit_cell is not None): result = crystal.symmetry( unit_cell=unit_cell, space_group_info=result.space_group_info(), assert_is_compatible_unit_cell=False) break for crystal_symmetry in from_coordinate_files: result = result.join_symmetry(other_symmetry=crystal_symmetry, force=False) if (result.space_group_info() is None): for crystal_symmetry in from_reflection_files: space_group_info = crystal_symmetry.space_group_info() if (space_group_info is not None): result = crystal.symmetry( unit_cell=result.unit_cell(), space_group_info=space_group_info, assert_is_compatible_unit_cell=False) break return result
95ea40706150efdd497c59bd7453515caa13e6e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/95ea40706150efdd497c59bd7453515caa13e6e4/remove_outliers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 3353, 31365, 67, 8117, 18042, 12, 628, 67, 3076, 67, 1369, 16, 628, 67, 6775, 67, 768, 16, 628, 67, 29191, 67, 2354, 16, 628, 67, 26606, 67, 2354, 4672, 563, 273, 4422, 313...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 3353, 31365, 67, 8117, 18042, 12, 628, 67, 3076, 67, 1369, 16, 628, 67, 6775, 67, 768, 16, 628, 67, 29191, 67, 2354, 16, 628, 67, 26606, 67, 2354, 4672, 563, 273, 4422, 313...
def configure_dialog(self, plugin_api):
def configure_dialog(self, plugin_api, manager_dialog):
def configure_dialog(self, plugin_api): self.on_geolocalized_preferences(plugin_api)
7813809bbd4893146300f8f0cc188a5c9ba1c6b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/7813809bbd4893146300f8f0cc188a5c9ba1c6b6/geolocalized_tasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 12730, 12, 2890, 16, 1909, 67, 2425, 16, 3301, 67, 12730, 4672, 365, 18, 265, 67, 908, 355, 23735, 1235, 67, 23219, 12, 4094, 67, 2425, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5068, 67, 12730, 12, 2890, 16, 1909, 67, 2425, 16, 3301, 67, 12730, 4672, 365, 18, 265, 67, 908, 355, 23735, 1235, 67, 23219, 12, 4094, 67, 2425, 13, 225, 2, -100, -100, -100, -100, ...
witness = list(classdef.getmro())
witness = [get_unique_cdef_id(cdef) for cdef in classdef.getmro()]
for classdef in annotator.bookkeeper.classdefs: if not hasattr(classdef, 'minid'): witness = list(classdef.getmro()) witness.reverse() classdef.minid = TotalOrderSymbolic(witness, lst) classdef.maxid = TotalOrderSymbolic(witness + [MAX], lst)
b96a14f3481fa11c4e42c1adbd461732361d9a2c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/b96a14f3481fa11c4e42c1adbd461732361d9a2c/normalizecalls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 364, 667, 536, 316, 6545, 639, 18, 3618, 79, 9868, 18, 1106, 12537, 30, 309, 486, 3859, 12, 1106, 536, 16, 296, 1154, 350, 11, 4672, 15628, 273, 306, 588, 67, 6270, 67, 71, 536, 67, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 364, 667, 536, 316, 6545, 639, 18, 3618, 79, 9868, 18, 1106, 12537, 30, 309, 486, 3859, 12, 1106, 536, 16, 296, 1154, 350, 11, 4672, 15628, 273, 306, 588, 67, 6270, 67, 71, 536, 67, 350, ...
comment = comment + str else: if paren: comment = comment + str
cur.append(token[1]) else: name = [] addr = [] for token in tokens: if token[1] == '': continue if token[0] == 2: name.append(token[1]) elif token[0] == 1: if specials.search(token[1]) >= 0: addr.append(quote(token[1])) else: addr.append(token[1])
def parseaddr(address): import string str = '' email = '' comment = '' backslash = 0 dquote = 0 space = 0 paren = 0 bracket = 0 seen_bracket = 0 for c in address: if backslash: str = str + c backslash = 0 continue if c == '\\': backslash = 1 continue if dquote: if c == '"': dquote = 0 else: str = str + c continue if c == '"': dquote = 1 continue if c in string.whitespace: space = 1 continue if space: str = str + ' ' space = 0 if paren: if c == '(': paren = paren + 1 str = str + c continue if c == ')': paren = paren - 1 if paren == 0: comment = comment + str str = '' continue if c == '(': paren = paren + 1 if bracket: email = email + str str = '' elif not seen_bracket: email = email + str str = '' continue if bracket: if c == '>': bracket = 0 email = email + str str = '' continue if c == '<': bracket = 1 seen_bracket = 1 comment = comment + str str = '' email = '' continue if c == '#' and not bracket and not paren: # rest is comment break str = str + c if str: if seen_bracket: if bracket: email = str else: comment = comment + str else: if paren: comment = comment + str else: email = email + str return string.strip(comment), string.strip(email)
4fc35f6fe9840dd900330fa5e979466e53ea44e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4fc35f6fe9840dd900330fa5e979466e53ea44e5/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4793, 12, 2867, 4672, 1930, 533, 609, 273, 875, 2699, 273, 875, 2879, 273, 875, 23253, 273, 374, 302, 6889, 273, 374, 3476, 273, 374, 22146, 273, 374, 9843, 273, 374, 5881, 67, 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, 1109, 4793, 12, 2867, 4672, 1930, 533, 609, 273, 875, 2699, 273, 875, 2879, 273, 875, 23253, 273, 374, 302, 6889, 273, 374, 3476, 273, 374, 22146, 273, 374, 9843, 273, 374, 5881, 67, 2...
self.list_win.addstr(docstring_string, get_colpair('comment'))
self.list_win.addstr('\n' + docstring_string, get_colpair('comment'))
def lsize(): wl = max(len(i) for i in v_items) + 1 if not wl: wl = 1 cols = ((max_w - 2) // wl) or 1 rows = len(v_items) // cols
5d71a37a8e8be99d478e4b35bf3ccef74d778ed1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/5d71a37a8e8be99d478e4b35bf3ccef74d778ed1/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 1467, 13332, 19564, 273, 943, 12, 1897, 12, 77, 13, 364, 277, 316, 331, 67, 3319, 13, 397, 404, 309, 486, 19564, 30, 19564, 273, 404, 5347, 273, 14015, 1896, 67, 91, 300, 576, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 1467, 13332, 19564, 273, 943, 12, 1897, 12, 77, 13, 364, 277, 316, 331, 67, 3319, 13, 397, 404, 309, 486, 19564, 30, 19564, 273, 404, 5347, 273, 14015, 1896, 67, 91, 300, 576, 1...
>>> a = TA(p)
... def __init__(self, context):
c4df19b7123c032c70b5860013f9a3c864759b7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9520/c4df19b7123c032c70b5860013f9a3c864759b7f/adapter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 16, 819, 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, ...
[ 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, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 16, 819, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
<widget name="status" position="10,300" size="540,60" font="Regular;20" />
def runBackup(): destination = config.plugins.autobackup.mode.value if destination and (destination != "off"): try: print "[AutoBackup] **************** begin **************** destination:", destination os.system("/usr/lib/enigma2/python/Plugins/PLi/AutoBackup/settings-backup.sh %s" % destination) except Exception, e: print "[AutoBackup] FAIL:", e
72f1ac0f79f9b6705d800f9cca3b297951460066 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10199/72f1ac0f79f9b6705d800f9cca3b297951460066/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6248, 13332, 2929, 273, 642, 18, 8057, 18, 6079, 9572, 18, 3188, 18, 1132, 309, 2929, 471, 261, 10590, 480, 315, 3674, 6, 4672, 775, 30, 1172, 5158, 4965, 6248, 65, 380, 1644, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6248, 13332, 2929, 273, 642, 18, 8057, 18, 6079, 9572, 18, 3188, 18, 1132, 309, 2929, 471, 261, 10590, 480, 315, 3674, 6, 4672, 775, 30, 1172, 5158, 4965, 6248, 65, 380, 1644, 27...
(Rheostat, 100),
(Rheostat, 1000),
def create_components(self):
68e9d9e0c9b9895ad7bed7ca4429509271f2d3b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/68e9d9e0c9b9895ad7bed7ca4429509271f2d3b4/electric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 8119, 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, 752, 67, 8119, 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, -100...
if self.currentNag is not None:
if self.currentNag is not None and not self.currentNag.cancelled:
def rescheduleNag(self): if self.currentNag is not None: self.currentNag.cancel()
309936c811c6d678e72d133e85316fedff740bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12893/309936c811c6d678e72d133e85316fedff740bae/diarybot2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 50, 346, 12, 2890, 4672, 309, 365, 18, 2972, 50, 346, 353, 486, 599, 471, 486, 365, 18, 2972, 50, 346, 18, 10996, 1259, 30, 365, 18, 2972, 50, 346, 18, 10996, 1435, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 50, 346, 12, 2890, 4672, 309, 365, 18, 2972, 50, 346, 353, 486, 599, 471, 486, 365, 18, 2972, 50, 346, 18, 10996, 1259, 30, 365, 18, 2972, 50, 346, 18, 10996, 1435, 2, -...
printError(prog) printError(args)
printError(str(prog)) printError(str(args))
def runScript(prog=None, script=None, arg1=None, arg2=None): if prog == None: prog = "/bin/sh" if not os.path.exists("/var/tmp"): os.makedirs("/var/tmp") (fd, tmpfilename) = tempfile.mkstemp(dir="/var/tmp/", prefix="rpm-tmp.") if fd == None: return 0 if script != None: os.write(fd, script) os.close(fd) fd = None args = [prog] if prog != "/sbin/ldconfig": args.append(tmpfilename) if arg1 != None: args.append(arg1) if arg2 != None: args.append(arg2) pid = os.fork() if pid != 0: (cpid, status) = os.waitpid(pid, 0) else: os.close(0) os.execv(prog, args) sys.exit() os.unlink(tmpfilename) if status != 0: printError("Error in running script:") printError(prog) printError(args) return 0 return 1
984c34f1b65512f4749e9d591e3115236330d3c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/984c34f1b65512f4749e9d591e3115236330d3c4/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3651, 12, 14654, 33, 7036, 16, 2728, 33, 7036, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 4672, 309, 11243, 422, 599, 30, 11243, 273, 2206, 4757, 19, 674, 6, 309, 486, 114...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3651, 12, 14654, 33, 7036, 16, 2728, 33, 7036, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 4672, 309, 11243, 422, 599, 30, 11243, 273, 2206, 4757, 19, 674, 6, 309, 486, 114...
def runUnitSuite(options):
def runUnitSuite(options):
def runUnitSuite(options): """ Run all unit tests in a single process >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['release', 'debug'] >>> runUnitSuite(options) /.../release/RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../debug/RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ failed = False for mode in options.modes: cmd = [options.runpython[mode], os.path.join('tools', 'run_tests.py')] if options.verbose: cmd += ['-v'] cmd += ['application', 'i18n', 'osaf', 'repository'] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=3600) if result != 0: log('***Error exit code=%d' % result) failed = True failedTests.append('unitSuite') if failed and not options.noStop: break log('- + ' * 15) return failed
d58064cb39bf42c3f7785764c4761d8408532db9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/d58064cb39bf42c3f7785764c4761d8408532db9/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2802, 13587, 12, 2116, 4672, 3536, 1939, 777, 2836, 7434, 316, 279, 2202, 1207, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18, 25011, 2681, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2802, 13587, 12, 2116, 4672, 3536, 1939, 777, 2836, 7434, 316, 279, 2202, 1207, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18, 25011, 2681, 22...
tripler = gungame.getPlayer(event_var["userid"])
tripler = gungame.getPlayer(userid)
def player_death(event_var): # Get deaths player tripler = gungame.getPlayer(event_var["userid"]) # Reset the triple level counter on player death tripler.set("triple", 0) # Check to see if this player is currently triple-levelled if userid in list_currentTripleLevel: # Since they are triple-levelled, we need to remove the triple removeTriple(userid)
78000ae868a5e16e3b62fdb8ace6f2f125e10e69 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/78000ae868a5e16e3b62fdb8ace6f2f125e10e69/gg_triple_level.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7291, 67, 323, 421, 12, 2575, 67, 1401, 4672, 468, 968, 443, 421, 87, 7291, 6882, 20728, 273, 31475, 13957, 18, 588, 12148, 12, 8339, 13, 225, 468, 7151, 326, 14543, 1801, 3895, 603, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7291, 67, 323, 421, 12, 2575, 67, 1401, 4672, 468, 968, 443, 421, 87, 7291, 6882, 20728, 273, 31475, 13957, 18, 588, 12148, 12, 8339, 13, 225, 468, 7151, 326, 14543, 1801, 3895, 603, 7...
- ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to the method
- ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to the method
def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to the method EXAMPLES:: sage: f = attrcall('core', 3); f *.core(3) sage: [f(p) for p in Partitions(5)] [[2], [1, 1], [1, 1], [3, 1, 1], [2], [2], [1, 1]] """ return AttrCallObject(name, args, kwds)
de59da7528761ca0af3091344b196fc14ba3d207 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/de59da7528761ca0af3091344b196fc14ba3d207/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 1991, 12, 529, 16, 380, 1968, 16, 2826, 25577, 4672, 3536, 2860, 279, 4140, 1492, 5530, 316, 392, 733, 16, 5571, 326, 707, 4141, 508, 628, 716, 733, 16, 471, 4097, 518, 598, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 1991, 12, 529, 16, 380, 1968, 16, 2826, 25577, 4672, 3536, 2860, 279, 4140, 1492, 5530, 316, 392, 733, 16, 5571, 326, 707, 4141, 508, 628, 716, 733, 16, 471, 4097, 518, 598, 326,...
security.declareProtected(CMFCorePermissions.View, 'contentExpired')
security.declareProtected(permissions.View, 'contentExpired')
def contentEffective(self, date): """Is the date within the resource's effective range? """ effective = self.getField('effectiveDate').get(self) expires = self.getField('expirationDate').get(self) pastEffective = ( effective is None or effective <= date ) beforeExpiration = ( expires is None or expires >= date ) return pastEffective and beforeExpiration
bffbf06ccb0e344dcf82f7addf15838da46c2ba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/bffbf06ccb0e344dcf82f7addf15838da46c2ba5/ExtensibleMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 28531, 12, 2890, 16, 1509, 4672, 3536, 2520, 326, 1509, 3470, 326, 1058, 1807, 11448, 1048, 35, 3536, 11448, 273, 365, 18, 588, 974, 2668, 28894, 1626, 16063, 588, 12, 2890, 13, 736...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 28531, 12, 2890, 16, 1509, 4672, 3536, 2520, 326, 1509, 3470, 326, 1058, 1807, 11448, 1048, 35, 3536, 11448, 273, 365, 18, 588, 974, 2668, 28894, 1626, 16063, 588, 12, 2890, 13, 736...
str += HTML_Doc._SPECIAL_METHODS[fname]+'</i></h3>\n'
str += SPECIAL_METHODS[fname]+'</i></h3>\n'
def _func_details(self, functions, cls, heading='Function Details'): """Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>'
b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 990, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, 365, 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, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 990, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, 365, 6...
return self.assert_(repr(self.f).startswith("<open file '" + TESTFN))
self.assertEquals(repr(self.f), "_fileio._FileIO(%d, %s)" % (self.f.fileno(), repr(self.f.mode)))
def testRepr(self): # verify repr works return # XXX doesn't work yet self.assert_(repr(self.f).startswith("<open file '" + TESTFN))
682faf8fe00d43d4663ba3d84d9a89a346dd0879 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/682faf8fe00d43d4663ba3d84d9a89a346dd0879/test_fileio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 426, 683, 12, 2890, 4672, 468, 3929, 8480, 6330, 327, 468, 11329, 3302, 1404, 1440, 4671, 365, 18, 11231, 67, 12, 12715, 12, 2890, 18, 74, 2934, 17514, 1918, 2932, 32, 3190, 585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 426, 683, 12, 2890, 4672, 468, 3929, 8480, 6330, 327, 468, 11329, 3302, 1404, 1440, 4671, 365, 18, 11231, 67, 12, 12715, 12, 2890, 18, 74, 2934, 17514, 1918, 2932, 32, 3190, 585, ...
if isinstance(dm, basestring) and shasattr(instance, dm):
if type(dm) is StringType and shasattr(instance, dm):
def getDefault(self, instance): """Return the default value to be used for initializing this field""" dm = self.default_method if dm: if isinstance(dm, basestring) and shasattr(instance, dm): method = getattr(instance, dm) return method() elif callable(dm): return dm() else: raise ValueError('%s.default_method is neither a method of %s' ' nor a callable' % (self.getName(), instance.__class__)) if not self.default: default_adapter = component.queryAdapter(instance, IFieldDefaultProvider, name=self.__name__) if default_adapter is not None: return default_adapter() return self.default
7ceff8c470eae33b4a063061230f3f8948cfaf8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12165/7ceff8c470eae33b4a063061230f3f8948cfaf8b/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4829, 12, 2890, 16, 791, 4672, 3536, 990, 326, 805, 460, 358, 506, 1399, 364, 22584, 333, 652, 8395, 9113, 273, 365, 18, 1886, 67, 2039, 309, 9113, 30, 309, 618, 12, 10956, 13, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4829, 12, 2890, 16, 791, 4672, 3536, 990, 326, 805, 460, 358, 506, 1399, 364, 22584, 333, 652, 8395, 9113, 273, 365, 18, 1886, 67, 2039, 309, 9113, 30, 309, 618, 12, 10956, 13, 353, ...
instanceCat.objectType = 'POINT'
def doOneCatalogType(self, catalogType, queryTypes, obsHistID): #nFN = self.getNextGoodFileNum() self.executionDBManager = jobDB.JobState() t0 = self.executionDBManager.getJobId()
fa2e63a27dcb0519a268db93e01ae343ce3245f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/fa2e63a27dcb0519a268db93e01ae343ce3245f5/jobAllocator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3335, 9769, 559, 12, 2890, 16, 6222, 559, 16, 843, 2016, 16, 7160, 8648, 734, 4672, 468, 82, 19793, 273, 365, 18, 588, 2134, 18195, 812, 2578, 1435, 365, 18, 16414, 2290, 1318, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3335, 9769, 559, 12, 2890, 16, 6222, 559, 16, 843, 2016, 16, 7160, 8648, 734, 4672, 468, 82, 19793, 273, 365, 18, 588, 2134, 18195, 812, 2578, 1435, 365, 18, 16414, 2290, 1318, 27...
self.write_encode(publicId, 'document type public-id')
self.write_encode(publicid, 'document type public-id')
def doctype(self, name, publicid, systemid): """ Handles a doctype event.
008bf36a653a84e78b35a4d0d20a24c2fb708748 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14078/008bf36a653a84e78b35a4d0d20a24c2fb708748/_htmlprinters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24909, 12, 2890, 16, 508, 16, 1071, 350, 16, 2619, 350, 4672, 3536, 27020, 279, 24909, 871, 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, ...
[ 1, 1, 1, 1, 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, 24909, 12, 2890, 16, 508, 16, 1071, 350, 16, 2619, 350, 4672, 3536, 27020, 279, 24909, 871, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
py_pjsua.perror(APP, title, rc)
py_pjsua.perror(THIS_FILE, title, rc)
def err_exit(title, rc): py_pjsua.perror(APP, title, rc) exit(1)
3b901a0beb73f99f7867c71ce9db1fc3a70ffd3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1375/3b901a0beb73f99f7867c71ce9db1fc3a70ffd3b/pjsua_app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 393, 67, 8593, 12, 2649, 16, 4519, 4672, 2395, 67, 84, 2924, 11886, 18, 84, 1636, 12, 2455, 5127, 67, 3776, 16, 2077, 16, 4519, 13, 2427, 12, 21, 13, 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, 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, 393, 67, 8593, 12, 2649, 16, 4519, 4672, 2395, 67, 84, 2924, 11886, 18, 84, 1636, 12, 2455, 5127, 67, 3776, 16, 2077, 16, 4519, 13, 2427, 12, 21, 13, 225, 2, -100, -100, -100, -100, ...
GLsizei num_values = GetNumValuesReturnedForGLGet(pname, &num_values);
GLsizei num_values = 0; GetNumValuesReturnedForGLGet(pname, &num_values);
code = """ typedef %(func_name)s::Result Result;
b112298f642b44d190d201a64cdc60963266551a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/b112298f642b44d190d201a64cdc60963266551a/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 981, 273, 3536, 225, 618, 536, 8975, 644, 67, 529, 13, 87, 2866, 1253, 3438, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 981, 273, 3536, 225, 618, 536, 8975, 644, 67, 529, 13, 87, 2866, 1253, 3438, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
f = self.FileIO(support.TESTFN, "wb") f.write(b"abcxxx") f.f = f wr = weakref.ref(f) del f support.gc_collect()
with support.check_warnings(('', ResourceWarning)): f = self.FileIO(support.TESTFN, "wb") f.write(b"abcxxx") f.f = f wr = weakref.ref(f) del f support.gc_collect()
def test_garbage_collection(self): # FileIO objects are collected, and collecting them flushes # all data to disk. f = self.FileIO(support.TESTFN, "wb") f.write(b"abcxxx") f.f = f wr = weakref.ref(f) del f support.gc_collect() self.assertTrue(wr() is None, wr) with self.open(support.TESTFN, "rb") as f: self.assertEqual(f.read(), b"abcxxx")
ebe5d8ae3b43f03a48aa02eb11862d234678a01f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ebe5d8ae3b43f03a48aa02eb11862d234678a01f/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 75, 12332, 67, 5548, 12, 2890, 4672, 468, 1387, 4294, 2184, 854, 12230, 16, 471, 30160, 2182, 3663, 281, 468, 777, 501, 358, 4234, 18, 598, 2865, 18, 1893, 67, 12103, 12, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 75, 12332, 67, 5548, 12, 2890, 4672, 468, 1387, 4294, 2184, 854, 12230, 16, 471, 30160, 2182, 3663, 281, 468, 777, 501, 358, 4234, 18, 598, 2865, 18, 1893, 67, 12103, 12, 266...
if self.VSpacerWidget: self.VSpacerWidget.changeSize(10, self.VSpacerWidget.defaultHeight)
if self.parentWidget._lastGroupBox is self: return if self.verticalSpacer: self.verticalSpacer.changeSize(10, self.verticalSpacer.defaultHeight)
def show(self): """ Unhides the group box. @see: L{hide} """ QWidget.show(self) if self.labelWidget: self.labelWidget.show() if self.VSpacerWidget: self.VSpacerWidget.changeSize(10, self.VSpacerWidget.defaultHeight)
2c693e515c1d7f66b30f5a604a259df854e709ab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/2c693e515c1d7f66b30f5a604a259df854e709ab/PM_GroupBox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 3536, 1351, 76, 4369, 326, 1041, 3919, 18, 225, 632, 5946, 30, 511, 95, 11248, 97, 3536, 2238, 4609, 18, 4500, 12, 2890, 13, 309, 365, 18, 1925, 4609, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 3536, 1351, 76, 4369, 326, 1041, 3919, 18, 225, 632, 5946, 30, 511, 95, 11248, 97, 3536, 2238, 4609, 18, 4500, 12, 2890, 13, 309, 365, 18, 1925, 4609, 30, 365, ...
testPortFailure(self, self.iptables, None, VALID_PORT, ENETUNREACH)
testPortFailure(self, self.iptables, None, VALID_PORT, ECONNREFUSED)
def testRejectTimedout(self): self.config["nuauth_reject_after_timeout"] = "1" self.config["nuauth_reject_authenticated_drop"] = "0" self.nuauth = Nuauth(self.config) testPortFailure(self, self.iptables, None, VALID_PORT, ENETUNREACH)
15ac1ac2fd0dc23b338cbc17e7b2c1d8d9b4564e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10929/15ac1ac2fd0dc23b338cbc17e7b2c1d8d9b4564e/test_reject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21705, 19336, 659, 12, 2890, 4672, 365, 18, 1425, 9614, 13053, 1944, 67, 24163, 67, 5205, 67, 4538, 11929, 273, 315, 21, 6, 365, 18, 1425, 9614, 13053, 1944, 67, 24163, 67, 14454, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21705, 19336, 659, 12, 2890, 4672, 365, 18, 1425, 9614, 13053, 1944, 67, 24163, 67, 5205, 67, 4538, 11929, 273, 315, 21, 6, 365, 18, 1425, 9614, 13053, 1944, 67, 24163, 67, 14454, ...
use_statcache -- if true, use statcache.stat() instead of os.stat()
use_statcache -- obsolete argument
def cmpfiles(a, b, common, shallow=1, use_statcache=0): """Compare common files in two directories. a, b -- directory names common -- list of file names found in both directories shallow -- if true, do comparison based solely on stat() information use_statcache -- if true, use statcache.stat() instead of os.stat() Returns a tuple of three lists: files that compare equal files that are different filenames that aren't regular files. """ res = ([], [], []) for x in common: ax = os.path.join(a, x) bx = os.path.join(b, x) res[_cmp(ax, bx, shallow, use_statcache)].append(x) return res
8eb4044f7e42af1134a6a98e52201df0a8aaa01f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8eb4044f7e42af1134a6a98e52201df0a8aaa01f/filecmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9411, 2354, 12, 69, 16, 324, 16, 2975, 16, 18501, 33, 21, 16, 999, 67, 5642, 2493, 33, 20, 4672, 3536, 8583, 2975, 1390, 316, 2795, 6402, 18, 225, 279, 16, 324, 1493, 1867, 1257, 297...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9411, 2354, 12, 69, 16, 324, 16, 2975, 16, 18501, 33, 21, 16, 999, 67, 5642, 2493, 33, 20, 4672, 3536, 8583, 2975, 1390, 316, 2795, 6402, 18, 225, 279, 16, 324, 1493, 1867, 1257, 297...
''' % { 'publisher': __escape(current_pub.name()),
''' % { 'publisher': __escape(current_pub.name().replace('.', '')),
def __process(tdb, options): current_pub = None if options.style == TdbxmlConstants.OPTION_STYLE_LEGACY: print '''\ <property name="org.lockss.title">
d69f31386906d5bcb9f8b64e0bd397ad2c15d0da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/766/d69f31386906d5bcb9f8b64e0bd397ad2c15d0da/tdbxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2567, 12, 88, 1966, 16, 702, 4672, 783, 67, 10174, 273, 599, 309, 702, 18, 4060, 422, 17050, 2902, 2918, 18, 7425, 67, 15066, 67, 19384, 2226, 61, 30, 1172, 875, 8314, 411, 4468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2567, 12, 88, 1966, 16, 702, 4672, 783, 67, 10174, 273, 599, 309, 702, 18, 4060, 422, 17050, 2902, 2918, 18, 7425, 67, 15066, 67, 19384, 2226, 61, 30, 1172, 875, 8314, 411, 4468,...
elif type(userName) == unicode:
elif not py3k and isinstance(userName, unicode):
def _GetGoodDispatchAndUserName(IDispatch, userName, clsctx): # Get a dispatch object, and a 'user name' (ie, the name as # displayed to the user in repr() etc. if userName is None: if isinstance(IDispatch, str): userName = IDispatch elif isinstance(IDispatch, unicode): # We always want the displayed name to be a real string userName = IDispatch.encode("ascii", "replace") elif type(userName) == unicode: # As above - always a string... userName = userName.encode("ascii", "replace") else: userName = str(userName) return (_GetGoodDispatch(IDispatch, clsctx), userName)
630a59738bd262f37fb993c3688eb2f31785cfee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/677/630a59738bd262f37fb993c3688eb2f31785cfee/dynamic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 18195, 5325, 1876, 15296, 12, 734, 291, 2272, 16, 12065, 16, 2028, 5900, 4672, 468, 968, 279, 3435, 733, 16, 471, 279, 296, 1355, 508, 11, 261, 1385, 16, 326, 508, 487, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 18195, 5325, 1876, 15296, 12, 734, 291, 2272, 16, 12065, 16, 2028, 5900, 4672, 468, 968, 279, 3435, 733, 16, 471, 279, 296, 1355, 508, 11, 261, 1385, 16, 326, 508, 487, 468, ...
if book['author_sort'][0] != current_letter :
if book['author_sort'][0].upper() != current_letter :
def generateHTMLByAuthor(self): # Write books by author A-Z if self.verbose: print self.updateProgressFullStep("generateHTMLByAuthor()") friendly_name = "By Author"
f0232f60fa83b8111e4ba6c8dc84caa88c454708 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/f0232f60fa83b8111e4ba6c8dc84caa88c454708/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 4870, 858, 3594, 12, 2890, 4672, 468, 2598, 6978, 87, 635, 2869, 432, 17, 62, 309, 365, 18, 11369, 30, 1172, 365, 18, 2725, 5491, 5080, 4160, 2932, 7163, 4870, 858, 3594, 1435, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 4870, 858, 3594, 12, 2890, 4672, 468, 2598, 6978, 87, 635, 2869, 432, 17, 62, 309, 365, 18, 11369, 30, 1172, 365, 18, 2725, 5491, 5080, 4160, 2932, 7163, 4870, 858, 3594, 1435, 7...
OUTPUT: - an order in a quaternion algebra
OUTPUT: an order in a quaternion algebra
def right_order(self): """ Return the right order associated to this fractional ideal.
aa7c8c5c25a8f62637a37f480aa5f24e29d7fbee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/aa7c8c5c25a8f62637a37f480aa5f24e29d7fbee/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2145, 67, 1019, 12, 2890, 4672, 3536, 2000, 326, 2145, 1353, 3627, 358, 333, 20462, 23349, 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, ...
[ 1, 1, 1, 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, 2145, 67, 1019, 12, 2890, 4672, 3536, 2000, 326, 2145, 1353, 3627, 358, 333, 20462, 23349, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
r = index.reply()
r = index.reply()
def OnFormButtonClicked(event, wavelet): '''Handles FormButtonClicked events. ''' # Logs the button name in the appengine logs. logging.debug('OnFormButtonClicked Called, Button Name %s' % event.button_name) # Assigns the wavelet's operation queue to opQ for easier access. opQ = wavelet.get_operation_queue() # If the button is the 'new question' button: if event.button_name == 'helpdesk-newquestion': # Logs that the button is the new question button. logging.debug('New Question Wave') # Creates a new wave. q_wave = myRobot.new_wave(wavelet.domain, participants = [event.modified_by], submit = True) # Calls "create_question_wave" on the new wave (see the function above) create_question_wave(q_wave) # Submits the question wave using the active api. myRobot.submit(q_wave) # If the button is the helpdesktesting button: elif event.button_name == 'helpdesktesting-newquestion': # Does the same as above, but the 3 steps are combined into one. myRobot.submit(create_question_wave(myRobot.new_wave(wavelet.domain, participants = [ event.modified_by], submit=True))) # if the button is the 'add me' button on the helpdeskdev wave: elif event.button_name == 'helpdesk-dev-add_me': # Gets the wave_id wave_id_box = event.blip.first(element.Input, name = 'Wave Add') # if that was sucsessful: if wave_id_box: # extracts the wave id from the box. wave_id = wave_id_box.value().serialize()['properties']['value'] # If that was unsucsessful: if not wave_id: # end running code return else: # end running code return # tries to find the wavelet_id input box. wavelet_id_box = event.blip.first(element.Input, name = 'Wavelet ID') # If it found the box: if wavelet_id_box: # Extract the wavelet id from the box. wavelet_id = wavelet_id_box.value().serialize()['properties']['value'] # if it couldn't find the box: extracts the wavelet id from the wave id. else: #extract the wavelet id from the wave id wavelet_id = wave_id.split('!')[0] + '!conv+root' # The following 8 lines attempt to add the person who asked to the wave # and make them full access. try: wavelet.get_operation_queue().wavelet_add_participant(wave_id, wavelet_id, event.modified_by) except: wavelet.root_blip.append('\nOperation Failed') try: wavelet.get_operation_queue().wavelet_modify_participant_role(wave_id, wavelet_id, event.modified_by, 'FULL') except: wavelet.root_blip.append('\nOperation Failed') # TODO: Comment from here downwards. elif event.button_name == 'helpdesk-dev-add_them': wave_id_box = event.blip.first(element.Input, name = 'Wave Add') if wave_id_box: wave_id = wave_id_box.value().serialize()['properties']['value'] if not wave_id: return else: return wavelet_id_box = event.blip.first(element.Input, name = 'Wavelet ID') if wavelet_id_box: wavelet_id = wavelet_id_box.value().serialize()['properties']['value'] else: wavelet_id = wave_id.split('!')[0] + '!conv+root' who = event.blip.first(element.Input, name = 'User ID') if who: who = who.value().serialize()['properties']['value'] else: who = event.modified_by try: wavelet.get_operation_queue().wavelet_add_participant(wave_id, wavelet_id, who) except: wavelet.root_blip.append('\nOperation Failed') try: wavelet.get_operation_queue().wavelet_modify_participant_role(wave_id, wavelet_id, who, 'FULL') except: wavelet.root_blip.append('\nOperation Failed') elif event.button_name == 'helpdesk-submitquestion': logging.debug('New Question Submitted') questionline = event.blip.first(element.Input) if questionline: question = questionline.value().serialize()['properties']['value'] else: question = wavelet.title detailbox = event.blip.first(element.TextArea) if detailbox: detail = detailbox.value().serialize()['properties']['value'] else: detail = '' #attachments = {} #for e in wavelet.root_blip.elements: # if isinstance(e, element.Attachment): # attachments[e.get('caption')] = e.get('data') #logging.debug('No. of attachments: %s' % str(len(attachments))) if (question == 'Type a simple version of your question here') or (not question) or (question == 'New Helpdesk Question'): wavelet.reply('You need to summarise your question in the question box before submitting.\nIf you are having trouble with the helpdesk, add \'nat.abbotts@wavewatchers.org\' to this wave.') return wavelet.root_blip.range(0, len(wavelet.root_blip.text) - 1).delete() wavelet.title = question wavelet.root_blip.append('\n') wavelet.root_blip.append(detail) #for i in attachments.keys(): # wavelet.root_blip.append(element.Attachment(caption = i, data = attachments[i])) opQ.wavelet_add_participant(wavelet.wave_id, wavelet.wavelet_id, 'wave-helpdesk@googlegroups.com') opQ.wavelet_modify_tag(wavelet.wave_id, wavelet.wavelet_id, 'question') d_wave = myRobot.new_wave('googlewave.com', participants = [event.modified_by], submit = True) for i in PARTICIPANTS + [event.modified_by]: opQ.wavelet_add_participant(d_wave.wave_id, d_wave.wavelet_id, i) d_wave.title = "[PUBLIC DISCUSSION] " + question opQ.wavelet_modify_tag(d_wave.wave_id, d_wave.wavelet_id, 'discussion') d_wave.root_blip.append(wavelet.root_blip.text) d_wave.root_blip.append('\n\nOriginal Question Wave', bundled_annotations = [('link/wave', wavelet.wave_id)]) #for i in attachments.keys(): # wavelet.root_blip.append(element.Attachment(caption = i, data = attachments[i])) myRobot.submit(d_wave) wavelet.reply('''This wave is public read-only (anyone can see it, but only participants can edit). The Helpdesk Team will choose the best answer
08f71e7780f463f0c91db94bc34c01d8d26623b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4190/08f71e7780f463f0c91db94bc34c01d8d26623b0/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1204, 3616, 27633, 12, 2575, 16, 19342, 808, 4672, 9163, 8788, 2748, 3616, 27633, 2641, 18, 9163, 468, 20238, 326, 3568, 508, 316, 326, 595, 8944, 5963, 18, 2907, 18, 4148, 2668, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1204, 3616, 27633, 12, 2575, 16, 19342, 808, 4672, 9163, 8788, 2748, 3616, 27633, 2641, 18, 9163, 468, 20238, 326, 3568, 508, 316, 326, 595, 8944, 5963, 18, 2907, 18, 4148, 2668, 1...
var = exp(-lambda_)/(1-exp(-lambda))**2
var = exp(-lambda_)/(1-exp(-lambda_))**2
def _stats(self, lambda_): m2, m1 = arr(lambda_) mu = 1/(exp(lambda_)-1) var = exp(-lambda_)/(1-exp(-lambda))**2 g1 = 2*cosh(lambda_/2.0) g2 = 4+2*cosh(lambda_) return mu, var, g1, g2
8a4682bd7af0347f95143e11c28e4922c100d870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/8a4682bd7af0347f95143e11c28e4922c100d870/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5296, 12, 2890, 16, 3195, 67, 4672, 312, 22, 16, 312, 21, 273, 2454, 12, 14661, 67, 13, 4129, 273, 404, 19, 12, 2749, 12, 14661, 67, 24950, 21, 13, 569, 273, 1329, 19236, 14661,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5296, 12, 2890, 16, 3195, 67, 4672, 312, 22, 16, 312, 21, 273, 2454, 12, 14661, 67, 13, 4129, 273, 404, 19, 12, 2749, 12, 14661, 67, 24950, 21, 13, 569, 273, 1329, 19236, 14661,...
from VideoDisplay import VideoDisplayController self.videoDisplayController = VideoDisplayController.getInstance()
def awakeFromNib(self): from VideoDisplay import VideoDisplayController self.videoDisplayController = VideoDisplayController.getInstance() # FIXME!! self.frame.channelsDisplay = self.channelsHostView self.frame.mainDisplay = self.mainHostView self.frame.videoInfoDisplay = self.videoInfoHostView self.frame.videoInfoDisplay.backgroundColor = NSColor.blackColor() self.restoreLayout() self.updateWindowTexture() self.showWindow_(nil)
084ad09e643153e1ea45246b96909c3b07bfdd0d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/084ad09e643153e1ea45246b96909c3b07bfdd0d/MainFrame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1690, 911, 1265, 50, 495, 12, 2890, 4672, 468, 9852, 8548, 365, 18, 3789, 18, 9114, 4236, 273, 365, 18, 9114, 2594, 1767, 365, 18, 3789, 18, 5254, 4236, 273, 365, 18, 5254, 2594, 1767,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1690, 911, 1265, 50, 495, 12, 2890, 4672, 468, 9852, 8548, 365, 18, 3789, 18, 9114, 4236, 273, 365, 18, 9114, 2594, 1767, 365, 18, 3789, 18, 5254, 4236, 273, 365, 18, 5254, 2594, 1767,...
test(r"""sre.match(r"\%03o" % i, chr(i)) != None""", 1) test(r"""sre.match(r"\%03o0" % i, chr(i)+"0") != None""", 1) test(r"""sre.match(r"\%03o8" % i, chr(i)+"8") != None""", 1) test(r"""sre.match(r"\x%02x" % i, chr(i)) != None""", 1) test(r"""sre.match(r"\x%02x0" % i, chr(i)+"0") != None""", 1) test(r"""sre.match(r"\x%02xz" % i, chr(i)+"z") != None""", 1)
test(r"""sre.match(r"\%03o" % i, chr(i)) is not None""", 1) test(r"""sre.match(r"\%03o0" % i, chr(i)+"0") is not None""", 1) test(r"""sre.match(r"\%03o8" % i, chr(i)+"8") is not None""", 1) test(r"""sre.match(r"\x%02x" % i, chr(i)) is not None""", 1) test(r"""sre.match(r"\x%02x0" % i, chr(i)+"0") is not None""", 1) test(r"""sre.match(r"\x%02xz" % i, chr(i)+"z") is not None""", 1)
def test(expression, result, exception=None): try: r = eval(expression) except: if exception: if not isinstance(sys.exc_value, exception): print expression, "FAILED" # display name, not actual value if exception is sre.error: print "expected", "sre.error" else: print "expected", exception.__name__ print "got", sys.exc_type.__name__, str(sys.exc_value) else: print expression, "FAILED" traceback.print_exc(file=sys.stdout) else: if exception: print expression, "FAILED" if exception is sre.error: print "expected", "sre.error" else: print "expected", exception.__name__ print "got result", repr(r) else: if r != result: print expression, "FAILED" print "expected", repr(result) print "got result", repr(r)
ec47d67f7e38555348764543458e5e6016584e10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ec47d67f7e38555348764543458e5e6016584e10/test_sre.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 8692, 16, 563, 16, 1520, 33, 7036, 4672, 775, 30, 436, 273, 5302, 12, 8692, 13, 1335, 30, 309, 1520, 30, 309, 486, 1549, 12, 9499, 18, 10075, 67, 1132, 16, 1520, 4672, 1172...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 8692, 16, 563, 16, 1520, 33, 7036, 4672, 775, 30, 436, 273, 5302, 12, 8692, 13, 1335, 30, 309, 1520, 30, 309, 486, 1549, 12, 9499, 18, 10075, 67, 1132, 16, 1520, 4672, 1172...
if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf:
if(sysvals.suspendmode == 'standby'): dm['resume_machine'] = 'PM: Restoring platform NVS memory' elif(sysvals.suspendmode == 'disk'): dm['suspend_late'] = 'PM: freeze of devices complete after.*' dm['suspend_noirq'] = 'PM: late freeze of devices complete after.*' dm['suspend_machine'] = 'PM: noirq freeze of devices complete after.*' dm['resume_machine'] = 'PM: Restoring platform NVS memory' dm['resume_early'] = 'PM: noirq restore of devices complete after.*' dm['resume'] = 'PM: early restore of devices complete after.*' dm['resume_complete'] = 'PM: restore of devices complete after.*' elif(sysvals.suspendmode == 'freeze'): dm['resume_machine'] = 'ACPI: resume from mwait' at = { 'sync_filesystems': { 'smsg': 'PM: Syncing filesystems.*', 'emsg': 'PM: Preparing system for mem sleep.*' }, 'freeze_user_processes': { 'smsg': 'Freezing user space processes .*', 'emsg': 'Freezing remaining freezable tasks.*' }, 'freeze_tasks': { 'smsg': 'Freezing remaining freezable tasks.*', 'emsg': 'PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*' }, 'ACPI prepare': { 'smsg': 'ACPI: Preparing to enter system sleep state.*', 'emsg': 'PM: Saving platform NVS memory.*' }, 'PM vns': { 'smsg': 'PM: Saving platform NVS memory.*', 'emsg': 'Disabling non-boot CPUs .*' }, } t0 = -1.0 cpu_start = -1.0 prevktime = -1.0 actions = dict() for line in data.dmesgtext:
def analyzeKernelLog(): global sysvals, data print("PROCESSING DATA") data.vprint("Analyzing the dmesg data...") if(os.path.exists(sysvals.dmesgfile) == False): print("ERROR: %s doesn't exist") % sysvals.dmesgfile return False lf = sortKernelLog() phase = "suspend_runtime" dm = { 'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", } if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf: # -- preprocessing -- # parse each dmesg line into the time and message m = re.match(r".*(\[ *)(?P<ktime>[0-9\.]*)(\]) (?P<msg>.*)", line) if(m): ktime = float(m.group("ktime")) msg = m.group("msg") else: print line continue # -- phase changes -- # suspend_general start if(re.match(dm['suspend_general'], msg)): phase = "suspend_general" data.dmesg[phase]['start'] = ktime data.start = ktime # action start: syncing filesystems action_start = ktime # suspend_early start elif(re.match(dm['suspend_early'], msg)): data.dmesg["suspend_general"]['end'] = ktime phase = "suspend_early" data.dmesg[phase]['start'] = ktime # suspend_noirq start elif(re.match(dm['suspend_noirq'], msg)): data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq" data.dmesg[phase]['start'] = ktime # suspend_cpu start elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu" data.dmesg[phase]['start'] = ktime # resume_cpu start elif(re.match(dm['resume_cpu'], msg)): data.tSuspended = ktime data.dmesg["suspend_cpu"]['end'] = ktime phase = "resume_cpu" data.dmesg[phase]['start'] = ktime # resume_noirq start elif(re.match(dm['resume_noirq'], msg)): data.dmesg["resume_cpu"]['end'] = ktime phase = "resume_noirq" data.dmesg[phase]['start'] = ktime # action end: ACPI resume data.newAction("resume_cpu", "ACPI", -1, "", action_start, ktime) # resume_early start elif(re.match(dm['resume_early'], msg)): data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early" data.dmesg[phase]['start'] = ktime # resume_general start elif(re.match(dm['resume_general'], msg)): data.dmesg["resume_early"]['end'] = ktime phase = "resume_general" data.dmesg[phase]['start'] = ktime # resume complete start elif(re.match(dm['resume_complete'], msg)): data.dmesg["resume_general"]['end'] = ktime data.end = ktime phase = "resume_runtime" break # -- device callbacks -- if(phase in data.phases): # device init call if(re.match(r"calling (?P<f>.*)\+ @ .*, parent: .*", msg)): sm = re.match(r"calling (?P<f>.*)\+ @ (?P<n>.*), parent: (?P<p>.*)", msg); f = sm.group("f") n = sm.group("n") p = sm.group("p") if(f and n and p): data.newAction(phase, f, int(n), p, ktime, -1) # device init return elif(re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs", msg)): sm = re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs(?P<a>.*)", msg); f = sm.group("f") t = sm.group("t") list = data.dmesg[phase]['list'] if(f in list): dev = list[f] dev['length'] = int(t) dev['end'] = ktime data.vprint("%15s [%f - %f] %s(%d) %s" % (phase, dev['start'], dev['end'], f, dev['pid'], dev['par'])) # -- phase specific actions -- if(phase == "suspend_general"): if(re.match(r"PM: Preparing system for mem sleep.*", msg)): data.newAction(phase, "filesystem-sync", -1, "", action_start, ktime) elif(re.match(r"Freezing user space processes .*", msg)): action_start = ktime elif(re.match(r"Freezing remaining freezable tasks.*", msg)): data.newAction(phase, "freeze-user-processes", -1, "", action_start, ktime) action_start = ktime elif(re.match(r"PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*", msg)): data.newAction(phase, "freeze-tasks", -1, "", action_start, ktime) elif(phase == "suspend_cpu"): m = re.match(r"smpboot: CPU (?P<cpu>[0-9]*) is now offline", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"ACPI: Preparing to enter system sleep state.*", msg)): action_start = ktime elif(re.match(r"Disabling non-boot CPUs .*", msg)): data.newAction(phase, "ACPI", -1, "", action_start, ktime) action_start = ktime elif(phase == "resume_cpu"): m = re.match(r"CPU(?P<cpu>[0-9]*) is up", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"Enabling non-boot CPUs .*", msg)): action_start = ktime # fill in any missing phases lp = "suspend_general" for p in data.phases: if(p == "suspend_general"): continue if(data.dmesg[p]['start'] < 0): data.dmesg[p]['start'] = data.dmesg[lp]['end'] if(p == "resume_cpu"): data.tSuspended = data.dmesg[lp]['end'] if(data.dmesg[p]['end'] < 0): data.dmesg[p]['end'] = data.dmesg[p]['start'] lp = p data.fixupInitcallsThatDidntReturn() return True
0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
prec = tokens[i-1]
prec = t.prec
def check_function_call_spaces(tokens, lines, warnings): "Check for function calls having the silly GNU spaces before (." keywlist = 'if', 'for', 'while', 'switch', 'return', 'case', 'goto' keywords = dict([(x, 1) for x in keywlist]) for i, t in enumerate(tokens): if t.bracelevel == 0: continue if t.typ != Token.punct or t.string != '(': continue prec = tokens[i-1] if prec.typ != Token.ident or prec.string in keywords: continue if prec.line == t.line and prec.end == t.col: continue m = t.matching if tokens[m+1].typ == Token.punct and tokens[m+1].string == '(': continue w = 'Space between function name and parenthesis (col %d): %s' warnings.append((t.line, w % (t.col, lines[t.line])))
ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f/check-coding-style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 915, 67, 1991, 67, 9554, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 445, 4097, 7999, 326, 17714, 715, 611, 50, 57, 7292, 1865, 261, 1199, 498, 91, 1098, 273, 296, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 915, 67, 1991, 67, 9554, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 445, 4097, 7999, 326, 17714, 715, 611, 50, 57, 7292, 1865, 261, 1199, 498, 91, 1098, 273, 296, 4...
remoteData = modifier.getRemoteData() diffGen = modifier.showDiff( remoteData )
diffGen = modifier.showDiff()
def showDiff( self ): if not authorizeAction(): return S_ERROR( "You are not authorized to commit configurations!! Bad boy!" ) modifier = self.__getModificator() modifier.loadFromBuffer( session[ 'cfgData' ] ) remoteData = modifier.getRemoteData() diffGen = modifier.showDiff( remoteData ) c.diffList = self.__generateHTMLDiff( diffGen ) return render( "/systems/configuration/diff.mako" )
93d17422caa1de3149c743d82c340d0af2c4de20 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12767/93d17422caa1de3149c743d82c340d0af2c4de20/configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 5938, 12, 365, 262, 30, 309, 486, 12229, 1803, 13332, 327, 348, 67, 3589, 12, 315, 6225, 854, 486, 10799, 358, 3294, 10459, 8548, 6107, 800, 93, 4442, 262, 9606, 273, 365, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 5938, 12, 365, 262, 30, 309, 486, 12229, 1803, 13332, 327, 348, 67, 3589, 12, 315, 6225, 854, 486, 10799, 358, 3294, 10459, 8548, 6107, 800, 93, 4442, 262, 9606, 273, 365, 16186, ...
textview.gtkspell = self.spell
textview.gtkspell = self.spell
def do_toggle_spellcheck(self, enable=None): #~ print 'do_toggle_spellcheck', enable if enable is None: action = self.actiongroup.get_action('toggle_spellcheck') enable = action.get_active()
a814e90941387bfde1586d081690a8ee36b7c460 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4103/a814e90941387bfde1586d081690a8ee36b7c460/spell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 14401, 67, 1752, 1165, 1893, 12, 2890, 16, 4237, 33, 7036, 4672, 468, 98, 1172, 296, 2896, 67, 14401, 67, 1752, 1165, 1893, 2187, 4237, 309, 4237, 353, 599, 30, 1301, 273, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 14401, 67, 1752, 1165, 1893, 12, 2890, 16, 4237, 33, 7036, 4672, 468, 98, 1172, 296, 2896, 67, 14401, 67, 1752, 1165, 1893, 2187, 4237, 309, 4237, 353, 599, 30, 1301, 273, 365...
pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
pt = templating.Templates(self.instance.config.TEMPLATES).get(name, extension)
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28678, 12, 2890, 4672, 9163, 2000, 279, 3460, 2283, 364, 326, 4141, 1363, 9163, 508, 273, 365, 18, 18340, 2710, 273, 365, 18, 3202, 5818, 273, 26212, 12, 2890, 18, 1336, 18, 1425, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28678, 12, 2890, 4672, 9163, 2000, 279, 3460, 2283, 364, 326, 4141, 1363, 9163, 508, 273, 365, 18, 18340, 2710, 273, 365, 18, 3202, 5818, 273, 26212, 12, 2890, 18, 1336, 18, 1425, 18, ...
- ScanError: in case of communication problem
- ConnectionError: in case of communication problem
def shutdown(self): """ Force Clamd to shutdown and exit
bef3518a3bfa5e86c06cb84c8b0244be7487803a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8077/bef3518a3bfa5e86c06cb84c8b0244be7487803a/pyclamd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 12, 2890, 4672, 3536, 11889, 3905, 301, 72, 358, 5731, 471, 2427, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5731, 12, 2890, 4672, 3536, 11889, 3905, 301, 72, 358, 5731, 471, 2427, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
NotImplementedError: The argument cf (=5/4) must be in ]0,1[.
ValueError: The argument slope (=5/4) must be in ]0,1[.
sage: def cf():
d352084048076a1147fa81ffe09ce8981f274743 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d352084048076a1147fa81ffe09ce8981f274743/word_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 6080, 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, 272, 410, 30, 1652, 6080, 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, -1...
if tag.tag in ('country-region', 'place', 'placetype', 'placename', 'state', 'city', 'street', 'address', 'content', 'form'):
if tag.tag and barename(tag.tag.lower()) in \ ('country-region', 'place', 'placetype', 'placename', 'state', 'city', 'street', 'address', 'content', 'form'):
def upshift_markup(self, root): self.log.debug('Converting style information to CSS...') size_map = { 'xx-small': '0.5', 'x-small': '1', 'small': '2', 'medium': '3', 'large': '4', 'x-large': '5', 'xx-large': '6', } mobi_version = self.book_header.mobi_version for x in root.xpath('//ncx'): x.getparent().remove(x) for i, tag in enumerate(root.iter(etree.Element)): tag.attrib.pop('xmlns', '') for x in tag.attrib: if ':' in x: del tag.attrib[x] if tag.tag in ('country-region', 'place', 'placetype', 'placename', 'state', 'city', 'street', 'address', 'content', 'form'): tag.tag = 'div' if tag.tag in ('content', 'form') else 'span' for key in tag.attrib.keys(): tag.attrib.pop(key) continue styles, attrib = [], tag.attrib if attrib.has_key('style'): style = attrib.pop('style').strip() if style: styles.append(style) if attrib.has_key('height'): height = attrib.pop('height').strip() if height and '<' not in height and '>' not in height and \ re.search(r'\d+', height): if tag.tag in ('table', 'td', 'tr'): pass elif tag.tag == 'img': tag.set('height', height) else: styles.append('margin-top: %s' % self.ensure_unit(height)) if attrib.has_key('width'): width = attrib.pop('width').strip() if width and re.search(r'\d+', width): if tag.tag in ('table', 'td', 'tr'): pass elif tag.tag == 'img': tag.set('width', width) else: styles.append('text-indent: %s' % self.ensure_unit(width)) if width.startswith('-'): styles.append('margin-left: %s' % self.ensure_unit(width[1:])) if attrib.has_key('align'): align = attrib.pop('align').strip() if align: align = align.lower() if align == 'baseline': styles.append('vertical-align: '+align) else: styles.append('text-align: %s' % align) if tag.tag == 'hr': if mobi_version == 1: tag.tag = 'div' styles.append('page-break-before: always') styles.append('display: block') styles.append('margin: 0') elif tag.tag == 'i': tag.tag = 'span' tag.attrib['class'] = 'italic' elif tag.tag == 'b': tag.tag = 'span' tag.attrib['class'] = 'bold' elif tag.tag == 'font': sz = tag.get('size', '').lower() try: float(sz) except ValueError: if sz in size_map.keys(): attrib['size'] = size_map[sz] elif tag.tag == 'img': recindex = None for attr in self.IMAGE_ATTRS: recindex = attrib.pop(attr, None) or recindex if recindex is not None: try: recindex = '%05d'%int(recindex) except: pass attrib['src'] = 'images/%s.jpg' % recindex for attr in ('width', 'height'): if attr in attrib: val = attrib[attr] if val.lower().endswith('em'): try: nval = float(val[:-2]) nval *= 16 * (168.451/72) # Assume this was set using the Kindle profile attrib[attr] = "%dpx"%int(nval) except: del attrib[attr] elif val.lower().endswith('%'): del attrib[attr] elif tag.tag == 'pre': if not tag.text: tag.tag = 'div'
fa0799597d686a4e870bf0a6d76a9addb8114756 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/fa0799597d686a4e870bf0a6d76a9addb8114756/reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 731, 4012, 67, 15056, 12, 2890, 16, 1365, 4672, 365, 18, 1330, 18, 4148, 2668, 2723, 310, 2154, 1779, 358, 6765, 7821, 13, 963, 67, 1458, 273, 288, 296, 5279, 17, 12019, 4278, 296, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 731, 4012, 67, 15056, 12, 2890, 16, 1365, 4672, 365, 18, 1330, 18, 4148, 2668, 2723, 310, 2154, 1779, 358, 6765, 7821, 13, 963, 67, 1458, 273, 288, 296, 5279, 17, 12019, 4278, 296, 20,...
@rtype: A urllib2 file-like object or reading from the connection.
@rtype: fp
def u2open(self, u2request): """ Open a connection. @param u2request: A urllib2 request. @rtype: u2request: urllib2.Requet. @return: The opened file-like urllib2 object. @rtype: A urllib2 file-like object or reading from the connection. """ tm = self.options.timeout if self.u2ver() >= 2.6: if self.urlopener is None: return u2.urlopen(u2request, timeout=tm) else: return self.urlopener.open(u2request, timeout=tm) else: socket.setdefaulttimeout(tm) if self.urlopener is None: return u2.urlopen(u2request) else: return self.urlopener.open(u2request)
1a96b01ba1f0b29eddc38a8ed9506c5c46f41728 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1242/1a96b01ba1f0b29eddc38a8ed9506c5c46f41728/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 582, 22, 3190, 12, 2890, 16, 582, 22, 2293, 4672, 3536, 3502, 279, 1459, 18, 632, 891, 582, 22, 2293, 30, 432, 11527, 22, 590, 18, 632, 86, 723, 30, 582, 22, 2293, 30, 11527, 22, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 582, 22, 3190, 12, 2890, 16, 582, 22, 2293, 4672, 3536, 3502, 279, 1459, 18, 632, 891, 582, 22, 2293, 30, 432, 11527, 22, 590, 18, 632, 86, 723, 30, 582, 22, 2293, 30, 11527, 22, 1...
signature= boto.utils.encode(self.aws_secret_access_key, url, True)
def make_url(self, returnURL, paymentReason, pipelineName, **params): """ Generate the URL with the signature required for a transaction """ params['callerKey'] = str(self.aws_access_key_id) params['returnURL'] = str(returnURL) params['paymentReason'] = str(paymentReason) params['pipelineName'] = pipelineName
48ba841ce4557745a8840c3332166e1f2f4b4e1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/48ba841ce4557745a8840c3332166e1f2f4b4e1e/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 718, 12, 2890, 16, 327, 1785, 16, 5184, 8385, 16, 5873, 461, 16, 2826, 2010, 4672, 3536, 6654, 326, 1976, 598, 326, 3372, 1931, 364, 279, 2492, 3536, 859, 3292, 16140, 653, 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, 1221, 67, 718, 12, 2890, 16, 327, 1785, 16, 5184, 8385, 16, 5873, 461, 16, 2826, 2010, 4672, 3536, 6654, 326, 1976, 598, 326, 3372, 1931, 364, 279, 2492, 3536, 859, 3292, 16140, 653, 3...
self.refresh()
if refresh: self.refresh()
def resize(self): """This method exists simply to keep it straight forward when initialising a window and resizing it.""" self.size() self.win.mvwin(self.y, self.x) self.win.resize(self.h, self.w) self.refresh()
4a82f5f09bb7e653a67c969608ad51544e4ab12c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/4a82f5f09bb7e653a67c969608ad51544e4ab12c/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7041, 12, 2890, 4672, 3536, 2503, 707, 1704, 8616, 358, 3455, 518, 21251, 5104, 1347, 2172, 13734, 279, 2742, 471, 400, 6894, 518, 12123, 365, 18, 1467, 1435, 365, 18, 8082, 18, 17509, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7041, 12, 2890, 4672, 3536, 2503, 707, 1704, 8616, 358, 3455, 518, 21251, 5104, 1347, 2172, 13734, 279, 2742, 471, 400, 6894, 518, 12123, 365, 18, 1467, 1435, 365, 18, 8082, 18, 17509, 8...
"""Removes a Atom object.
"""Removes an Atom object.
def remove_atom(self, atom): """Removes a Atom object. """ assert isinstance(atom, Atom) assert atom.model_id == self.model_id self.chain_dict[atom.chain_id].remove_atom(atom)
a181eacbeb3c68b8f7caba918a821d3f3e6c50f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/a181eacbeb3c68b8f7caba918a821d3f3e6c50f6/Structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 7466, 12, 2890, 16, 3179, 4672, 3536, 6220, 392, 7149, 733, 18, 3536, 1815, 1549, 12, 7466, 16, 7149, 13, 1815, 3179, 18, 2284, 67, 350, 422, 365, 18, 2284, 67, 350, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 7466, 12, 2890, 16, 3179, 4672, 3536, 6220, 392, 7149, 733, 18, 3536, 1815, 1549, 12, 7466, 16, 7149, 13, 1815, 3179, 18, 2284, 67, 350, 422, 365, 18, 2284, 67, 350, 365, 1...
self.layout.itemAtPosition(y, x).widget().replaceImage(image)
self.layout.itemAtPosition(y, x).widget().setImage(image)
def setImage(self, image, x=0, y=0, normalize=True, title=None): '''Place the given image at the given position of this window's grid layout.
11a8a60d7328a17d6e9343c1223cd9deae7c4c8d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12582/11a8a60d7328a17d6e9343c1223cd9deae7c4c8d/imagewindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18893, 12, 2890, 16, 1316, 16, 619, 33, 20, 16, 677, 33, 20, 16, 3883, 33, 5510, 16, 2077, 33, 7036, 4672, 9163, 6029, 326, 864, 1316, 622, 326, 864, 1754, 434, 333, 2742, 1807, 3068...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18893, 12, 2890, 16, 1316, 16, 619, 33, 20, 16, 677, 33, 20, 16, 3883, 33, 5510, 16, 2077, 33, 7036, 4672, 9163, 6029, 326, 864, 1316, 622, 326, 864, 1754, 434, 333, 2742, 1807, 3068...
funcs.append(value)
funcs.append((key, value))
def docmodule(self, object): """Produce text documentation for a given module object.""" result = ''
2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2c3f3ddf9452a1f3f228e0d8c7abdbeed214a6b7/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 563, 273, 875, 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, 997, 2978, 12, 2890, 16, 733, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 563, 273, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if what_to_do == self.ACTION_ANIMATE_ONLY: self.toggle(new_state) self.animate()
def action(self, event=None): what_to_do = self.ACTION_ANIMATE_AND_OPERATE new_state = None if event is not None and event.content is not None: what_to_do = event.content if isinstance(event.content, dict): what_to_do = event.content['action'] new_state = event.content['state'] actions = [self.ACTION_ANIMATE_AND_OPERATE, self.ACTION_ANIMATE_ONLY] if what_to_do in actions: if not self.is_locked: self.lock_for(self.cooldown_ms) self.launch_event(self.event_type, self.is_on) self.toggle(new_state) self._animate_timeout_id = gobject.timeout_add(10, self.animate) else: if self.cooldown_ms >= 1000: self.launch_event('infobar_message', 'Please wait %d seconds' %(self.cooldown_ms / 1000)) if what_to_do == self.ACTION_ANIMATE_ONLY: self.toggle(new_state) self.animate()
ccb593c8b7e8f82b3dc9caeb447999b88b75f2e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5280/ccb593c8b7e8f82b3dc9caeb447999b88b75f2e7/icon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 871, 33, 7036, 4672, 4121, 67, 869, 67, 2896, 273, 365, 18, 12249, 67, 1258, 3445, 1777, 67, 4307, 67, 13950, 1777, 394, 67, 2019, 273, 599, 309, 871, 353, 486, 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, 1301, 12, 2890, 16, 871, 33, 7036, 4672, 4121, 67, 869, 67, 2896, 273, 365, 18, 12249, 67, 1258, 3445, 1777, 67, 4307, 67, 13950, 1777, 394, 67, 2019, 273, 599, 309, 871, 353, 486, 5...
def target_architecture(self, extra_opts=()): """Return the architecture that the compiler will build for. This is most useful for detecting universal compilers in OS X.""" extra_opts = list(extra_opts) status, output = exec_command(self.compiler_f90 + ['-v'] + extra_opts, use_tee=False) if status == 0: m = re.match(r'(?m)^Target: (.*)$', output) if m: return m.group(1) return None def is_universal_compiler(self): """Return True if this compiler can compile universal binaries (for OS X). Currently only checks for i686 and powerpc architectures (no 64-bit support yet). """ if sys.platform != 'darwin': return False i686_arch = self.target_architecture(extra_opts=['-arch', 'i686']) if not i686_arch or not i686_arch.startswith('i686-'): return False ppc_arch = self.target_architecture(extra_opts=['-arch', 'ppc']) if not ppc_arch or not ppc_arch.startswith('powerpc-'): return False return True def _add_arches_for_universal_build(self, flags): if self.is_universal_compiler(): flags[:0] = ['-arch', 'i686', '-arch', 'ppc'] return flags
def _can_target(self, cmd, arch): """Return true is the compiler support the -arch flag for the given architecture.""" newcmd = cmd[:] newcmd.extend(["-arch", arch, "-v"]) st, out = exec_command(" ".join(newcmd)) if st == 0: for line in out.splitlines(): m = re.search(_R_ARCHS[arch], line) if m: return True return False def _universal_flags(self, cmd): """Return a list of -arch flags for every supported architecture.""" arch_flags = [] for arch in ["ppc", "i686"]: if self._can_target(cmd, arch): arch_flags.extend(["-arch", arch]) return arch_flags
def target_architecture(self, extra_opts=()): """Return the architecture that the compiler will build for. This is most useful for detecting universal compilers in OS X.""" extra_opts = list(extra_opts) status, output = exec_command(self.compiler_f90 + ['-v'] + extra_opts, use_tee=False) if status == 0: m = re.match(r'(?m)^Target: (.*)$', output) if m: return m.group(1) return None
f29ca7fe5bc789bce868f26f53f1ef037c360a1c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/f29ca7fe5bc789bce868f26f53f1ef037c360a1c/gnu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1018, 67, 991, 18123, 12, 2890, 16, 2870, 67, 4952, 33, 1435, 4672, 3536, 990, 326, 27418, 716, 326, 5274, 903, 1361, 364, 18, 1220, 353, 4486, 5301, 364, 5966, 310, 26182, 1161, 330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1018, 67, 991, 18123, 12, 2890, 16, 2870, 67, 4952, 33, 1435, 4672, 3536, 990, 326, 27418, 716, 326, 5274, 903, 1361, 364, 18, 1220, 353, 4486, 5301, 364, 5966, 310, 26182, 1161, 330, ...
return portal_url() + '/' + icon
res = portal_url(relative=1) + '/' + icon while res[:1] == '/': res = res[1:] return res
def getIcon(self, relative_to_portal=0): """ Using this method allows the content class creator to grab icons on the fly instead of using a fixed attribute on the class. """ ti = self.getTypeInfo() if ti is not None: icon = quote(ti.getIcon()) if icon: if relative_to_portal: return icon else: # Need the full path to the icon. portal_url = getToolByName( self, 'portal_url' ) return portal_url() + '/' + icon return 'misc_/OFSP/dtmldoc.gif'
c860dc5ebc6eb36a3fcc6600667c62fcf20c137a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/c860dc5ebc6eb36a3fcc6600667c62fcf20c137a/DynamicType.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21724, 12, 2890, 16, 3632, 67, 869, 67, 24386, 33, 20, 4672, 3536, 11637, 333, 707, 5360, 326, 913, 667, 11784, 358, 11086, 17455, 603, 326, 21434, 3560, 434, 1450, 279, 5499, 1566, 603,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21724, 12, 2890, 16, 3632, 67, 869, 67, 24386, 33, 20, 4672, 3536, 11637, 333, 707, 5360, 326, 913, 667, 11784, 358, 11086, 17455, 603, 326, 21434, 3560, 434, 1450, 279, 5499, 1566, 603,...
self._buf = ""
def flush(self): stuff = string.split(self._buf, '\n') stuff = string.join(stuff, '\r') self.setselection_at_end() self.ted.WEInsert(stuff, None, None) selstart, selend = self.getselection() self._inputstart = selstart self._buf = "" self.ted.WEClearUndo() self.updatescrollbars() if self._parentwindow.wid.GetWindowPort().QDIsPortBuffered(): self._parentwindow.wid.GetWindowPort().QDFlushPortBuffer(None)
3277501b00a1e9b64206abc7bd521066ca55c86f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3277501b00a1e9b64206abc7bd521066ca55c86f/PyConsole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 10769, 273, 533, 18, 4939, 12, 2890, 6315, 4385, 16, 2337, 82, 6134, 10769, 273, 533, 18, 5701, 12, 334, 3809, 16, 2337, 86, 6134, 365, 18, 542, 10705, 67, 270, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 10769, 273, 533, 18, 4939, 12, 2890, 6315, 4385, 16, 2337, 82, 6134, 10769, 273, 533, 18, 5701, 12, 334, 3809, 16, 2337, 86, 6134, 365, 18, 542, 10705, 67, 270, ...
return 0
return ZZ(0)
def _eval_(self, x): """ EXAMPLES::
f16c96c035dfc14f7d80c9fa9b9759bd8ce4d651 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f16c96c035dfc14f7d80c9fa9b9759bd8ce4d651/generalized.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 12, 2890, 16, 619, 4672, 3536, 225, 5675, 8900, 11386, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8622, 67, 12, 2890, 16, 619, 4672, 3536, 225, 5675, 8900, 11386, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.env["VLINKFLAGS"] += ['-L%s' % path]
self.env["_VLINKFLAGS"] += ['-L%s' % path]
def modelsim(self): """Apply Variables for the Target create vlib task and vini task as well as dobefore and doafter tasks if needed """ env = self.env.derive() # cxx hack replaces the cpp routine setattr(self,modelsim_sccom.__name__,modelsim_sccom) self.mappings['.cpp']=modelsim_sccom self.env["VCOMFLAGS"] += ['-work', 'work'] self.env["VLOGFLAGS"] += ['-work', 'work'] self.env["SCCOMFLAGS"] += ['-work', 'work'] self.env["SCGENMODFLAGS"] += ['-lib', 'work'] self.env["VSIMFLAGS"] += ['-c', '-lib', 'work'] self.env["SCLINKFLAGS"] += ['-work', 'work'] # Collect sccom flags from defines includes and uselib if hasattr(self, "defines"): for define in Utils.to_list(self.defines): self.env["SCCOMFLAGS"] += ['-D%s' % define] self.env["VLINKFLAGS"] += ['-D%s' % define] if hasattr(self, "includes"): for inc in Utils.to_list(self.includes): i = self.path.find_dir(inc) if i: self.env["SCCOMFLAGS"] += ['-I%s' % i.abspath()] if hasattr(self, "uselib"): for lib in Utils.to_list(self.uselib): for path in self.env["INCLUDES_%s" % lib]: self.env["SCCOMFLAGS"] += ['-I%s' % path] for path in self.env["LIBPATH_%s" % lib]: self.env["VLINKFLAGS"] += ['-L%s' % path] for lib in self.env["LIB_%s" % lib]: self.env["VLINKFLAGS"] += ['-l%s' % lib] #if hasattr(self, "use"): # for lib in Utils.to_list(self.use): # print lib # print dir(self.bld) #for path in self.env["INCLUDES_%s" % lib]: # self.env["SCCOMFLAGS"] += ['-I%s' % path] #for path in self.env["LIBPATH_%s" % lib]: # self.env["VLINKFLAGS"] += ['-L%s' % path] #for lib in self.env["LIB_%s" % lib]: # self.env["VLINKFLAGS"] += ['-l%s' % lib] # Create vlib task on target workdir = self.path.find_or_declare(self.target) vlib = self.create_task('vlib', tgt=[workdir]) vlib.target = self.target self.mdeps = [] if hasattr(self, "after"): lst = [n for n in self.bld.all_task_gen if "modelsim" in n.features and n.target == self.after] for l in lst: for t in l.tasks: if len(t.outputs) > 0: self.mdeps += t.outputs # If given generate scgenmod tasks to get systemc header if hasattr(self, "generate"): for p in Utils.to_list(self.generate): ls = p.split(':') if len(ls)!=2: print "a generator pair has to be like '<object>:<header.h>'" import sys sys.exit(1) tgt = self.path.find_or_declare(ls[1]) env = self.env.derive() env.append_value("src", ls[0]) mod = self.create_task('scgenmod', tgt=tgt) mod.env = env self.env["SCCOMFLAGS"] += ['-I%s' % tgt.parent.bldpath()] mod.dep_nodes += self.mdeps # Create modelsim ini task if needed tgt = None if hasattr(self, "config"): tgt = self.path.find_or_declare("modelsim_%s.ini" % self.target) tsk = self.create_task('vini', tgt=tgt) tsk.root = self.bld.out_dir tsk.path = self.path.get_bld().abspath() tsk.target = self.target tsk.config = self.path.find_resource(self.config) or self.config tsk.set_run_after(vlib) ini = tgt.get_bld().abspath() self.env["VSIMFLAGS"] += ['-modelsimini', ini] self.env["VCOMFLAGS"] += ['-modelsimini', ini] self.env["VLOGFLAGS"] += ['-modelsimini', ini] self.env["SCCOMFLAGS"] += ['-modelsimini', ini] self.env["SCGENMODFLAGS"] += ['-modelsimini', ini] self.env["SCLINKFLAGS"] += ['-modelsimini', ini] # Create dobefore task if needed if hasattr(self, "dobefore"): do = self.path.find_resource(self.dobefore) if do: do = do.abspath() else: do = self.dobefore self.env["VSIMBEFORE"] += ['-do', do] before = self.create_task('vsim_before') before.dep_nodes += self.mdeps if tgt: before.dep_nodes += [tgt] before.dotask = self.dobefore before.target = self.target # Create doafter task if needed if hasattr(self, "doafter"): do = self.path.find_resource(self.doafter) if do: do = do.abspath() else: do = self.doafter self.env["VSIMAFTER"] += ['-do', do] after = self.create_task('vsim_after') after.dep_nodes += self.mdeps if tgt: after.dep_nodes += [tgt] after.dotask = self.doafter after.target = self.target
7c31064d730fec5e3b83aa4842fea01bd5df60db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/209/7c31064d730fec5e3b83aa4842fea01bd5df60db/modelsim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3679, 381, 12, 2890, 4672, 3536, 7001, 23536, 364, 326, 5916, 752, 331, 2941, 1562, 471, 331, 8767, 1562, 487, 5492, 487, 741, 5771, 471, 741, 5205, 4592, 309, 3577, 3536, 1550, 273, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3679, 381, 12, 2890, 4672, 3536, 7001, 23536, 364, 326, 5916, 752, 331, 2941, 1562, 471, 331, 8767, 1562, 487, 5492, 487, 741, 5771, 471, 741, 5205, 4592, 309, 3577, 3536, 1550, 273, 365...
offset = 0
def fib(self): """ Returns a generator over all Fibanacci numbers, starting with 0. """ x, y = Integer(0), Integer(1) yield x while True: x, y = y, x+y yield x
e5d5b60c16d66a2bb879d4bdc18e2f9b3b075cd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e5d5b60c16d66a2bb879d4bdc18e2f9b3b075cd6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 495, 12, 2890, 4672, 3536, 2860, 279, 4456, 1879, 777, 478, 495, 304, 8981, 77, 5600, 16, 5023, 598, 374, 18, 3536, 619, 16, 677, 273, 2144, 12, 20, 3631, 2144, 12, 21, 13, 2824...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 495, 12, 2890, 4672, 3536, 2860, 279, 4456, 1879, 777, 478, 495, 304, 8981, 77, 5600, 16, 5023, 598, 374, 18, 3536, 619, 16, 677, 273, 2144, 12, 20, 3631, 2144, 12, 21, 13, 2824...
text=Text(subpanel, bg='white',highlightthickness=0) text.pack(side = LEFT, fill = BOTH, expand = 1)
text=Text(subpanel, bg='white',highlightthickness=0, wrap=NONE) text.grid(row=0, column=0,sticky=N+S+E+W)
def build_tab_localization(self): panel = TFrame(self.root, style='FlatFrame', borderwidth = 5) self.nb.add(panel, text='Localization') subpanel = TFrame(panel, style='RoundedFrame', borderwidth = 4) subpanel.pack(side = TOP, fill = BOTH, expand = 1) sb=TScrollbar(subpanel) sb.pack(side = RIGHT, fill=Y, expand = 1) text=Text(subpanel, bg='white',highlightthickness=0) text.pack(side = LEFT, fill = BOTH, expand = 1) text['yscrollcommand'] = sb.set sb['command'] = text.yview txt=_('\nThe project is not localized yet.\n') txt+=_('We plan to provide localization resources for next version\n') txt+=_('So if you wish joining to sK1 team as a localizator, just contact us!') text['state']=NORMAL text.insert(END, txt) text['state']=DISABLED
f97d4ae13dc3170337eb5ab568147410c3748b0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/f97d4ae13dc3170337eb5ab568147410c3748b0b/aboutdlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 7032, 67, 3729, 1588, 12, 2890, 4672, 6594, 273, 399, 3219, 12, 2890, 18, 3085, 16, 2154, 2218, 16384, 3219, 2187, 5795, 2819, 273, 1381, 13, 365, 18, 6423, 18, 1289, 12, 139...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 7032, 67, 3729, 1588, 12, 2890, 4672, 6594, 273, 399, 3219, 12, 2890, 18, 3085, 16, 2154, 2218, 16384, 3219, 2187, 5795, 2819, 273, 1381, 13, 365, 18, 6423, 18, 1289, 12, 139...
r'<IMG BORDER=0 SRC="documents/pfeilGross.gif"></A>\n' \ r'</th>\n<th width=100%><font size="+2">' docuReplacement = r'<table bgcolor=" r'<th align=left ><font size=+2> \1 </font></th>\n' \ r'<tr>\n</table>' publicReplacement = r'</DL></DL>\n' \ r'<table bgcolor=" r'<th align=left ><font size=+2> Members </font></th>\n' \ r'<tr>\n</table>\n' \ r'<DL><DL>\n<DT><h3>Public'
r'<IMG BORDER=0 ALT="details" SRC="documents/pfeilGross.gif"></A>\n' \ r'</th>\n<th width="100%"><font size="+2">' docuReplacement = r'<table bgcolor=" r'<th align=left ><font size="+2"> \1 </font></th>\n' \ r'</tr>\n</table>' publicReplacement = r'<table bgcolor=" r'<th align=left ><font size="+2"> Member Index </font></th>\n' \ r'</tr>\n</table>\n' \ r'<DL>\n<DT><B><BR>Public'
headingTypedef = re.compile(r'typedef')
6a37979285b6676bcc5235bfce9be42497c36af8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12582/6a37979285b6676bcc5235bfce9be42497c36af8/postprocessing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 11053, 559, 536, 273, 283, 18, 11100, 12, 86, 1404, 388, 536, 6134, 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, 11053, 559, 536, 273, 283, 18, 11100, 12, 86, 1404, 388, 536, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
select = SortedDict([( '_count_students', 'SELECT COUNT(*) FROM "users_userbit" WHERE ("users_userbit"."verb_id" = %s AND "users_userbit"."qsc_id" = "program_classsection"."anchor_id" AND "users_userbit"."startdate" <= %s AND "users_userbit"."enddate" >= %s)'),
select = SortedDict([( '_count_students', 'SELECT COUNT(DISTINCT "users_userbit"."user_id") FROM "users_userbit" WHERE ("users_userbit"."verb_id" = %s AND "users_userbit"."qsc_id" = "program_classsection"."anchor_id" AND "users_userbit"."startdate" <= %s AND "users_userbit"."enddate" >= %s)'),
def prefetch_catalog_data(cls, queryset): """ Take a queryset of a set of ClassSubject's, and annotate each class in it with the '_count_students' and 'event_ids' fields (used internally when available by many functions to save on queries later) """ now = datetime.datetime.now() enrolled_node=GetNode("V/Flags/Registration/Enrolled")
4293e80a387d566b8cbaf83eebd19e7d4fa8b360 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/4293e80a387d566b8cbaf83eebd19e7d4fa8b360/class_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17607, 67, 7199, 67, 892, 12, 6429, 16, 11892, 4672, 3536, 17129, 279, 11892, 434, 279, 444, 434, 1659, 6638, 1807, 16, 471, 13795, 1517, 667, 316, 518, 598, 326, 2070, 1883, 67, 16120, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17607, 67, 7199, 67, 892, 12, 6429, 16, 11892, 4672, 3536, 17129, 279, 11892, 434, 279, 444, 434, 1659, 6638, 1807, 16, 471, 13795, 1517, 667, 316, 518, 598, 326, 2070, 1883, 67, 16120, ...
for envvar, value in self._reset.iteritems(): self._environ[envvar] = value for unset in self._unset: del self._environ[unset]
for (k, v) in self._changed.items(): if v is None: if k in os.environ: del os.environ[k] else: os.environ[k] = v
def __exit__(self, *ignore_exc): for envvar, value in self._reset.iteritems(): self._environ[envvar] = value for unset in self._unset: del self._environ[unset]
2466cd422cadba18451709f77af02289c9dd45e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/2466cd422cadba18451709f77af02289c9dd45e3/test_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8593, 972, 12, 2890, 16, 380, 6185, 67, 10075, 4672, 364, 1550, 1401, 16, 460, 316, 365, 6315, 6208, 18, 2165, 3319, 13332, 365, 6315, 28684, 63, 3074, 1401, 65, 273, 460, 364, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8593, 972, 12, 2890, 16, 380, 6185, 67, 10075, 4672, 364, 1550, 1401, 16, 460, 316, 365, 6315, 6208, 18, 2165, 3319, 13332, 365, 6315, 28684, 63, 3074, 1401, 65, 273, 460, 364, 2...
PortEndPoint.Source)
PortEndPoint.Source, None, True)
def loadFromXML(connection): """ loadFromXML(connection) -> Connection Static method that parses an xml element and creates a Connection. Keyword arguments: - connection : xml.dom.minidom.Element
68da96934afde6d82bda07d1042d0caf25c3f357 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/68da96934afde6d82bda07d1042d0caf25c3f357/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24935, 4201, 12, 4071, 4672, 3536, 24935, 4201, 12, 4071, 13, 317, 4050, 10901, 707, 716, 8940, 392, 2025, 930, 471, 3414, 279, 4050, 18, 18317, 1775, 30, 300, 1459, 294, 2025, 18, 9859,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24935, 4201, 12, 4071, 4672, 3536, 24935, 4201, 12, 4071, 13, 317, 4050, 10901, 707, 716, 8940, 392, 2025, 930, 471, 3414, 279, 4050, 18, 18317, 1775, 30, 300, 1459, 294, 2025, 18, 9859,...
ce_name = cp.get("ce", "name") vo_map = VoMapper(cp) jobs_info = getJobsInfo(vo_map, cp) total_nodes, claimed, unclaimed = parseNodes(cp) VOView_plugin = getTemplate("GlueCEPlugin", "GlueVOViewLocalID") for vo in voList(cp): info = jobs_info.get("vo", {"running": 0, "queued": 0, "quota": 0, "prio":0}) info["vo"] = vo info["job_manager"] = "condor" info["queue"] = vo info["wait"] = info["queued"] info["total"] = info["running"] + info["wait"] info["free_slots"] = info["quota"] info["job_slots"] = total_nodes print VOView_plugin % info
ce_name = cp.get("ce", "name") vo_map = VoMapper(cp) jobs_info = getJobsInfo(vo_map, cp) total_nodes, claimed, unclaimed = parseNodes(cp) VOView_plugin = getTemplate("GlueCEPlugin", "GlueVOViewLocalID") for vo in voList(cp): info = jobs_info.get("vo", {"running": 0, "queued": 0, "quota": 0, "prio":0}) info["vo"] = vo info["job_manager"] = "condor" info["queue"] = vo info["wait"] = info["queued"] info["total"] = info["running"] + info["wait"] info["free_slots"] = info["quota"] info["job_slots"] = total_nodes print VOView_plugin % info
def print_VOViewLocal(queue_info, cp): ce_name = cp.get("ce", "name") vo_map = VoMapper(cp) jobs_info = getJobsInfo(vo_map, cp) total_nodes, claimed, unclaimed = parseNodes(cp) VOView_plugin = getTemplate("GlueCEPlugin", "GlueVOViewLocalID") for vo in voList(cp): info = jobs_info.get("vo", {"running": 0, "queued": 0, "quota": 0, "prio":0}) info["vo"] = vo info["job_manager"] = "condor" info["queue"] = vo info["wait"] = info["queued"] info["total"] = info["running"] + info["wait"] info["free_slots"] = info["quota"] info["job_slots"] = total_nodes print VOView_plugin % info
0efa3cb5e7f2bd3346075651023a98965f64829e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12088/0efa3cb5e7f2bd3346075651023a98965f64829e/osg-info-dynamic-condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 16169, 1767, 2042, 12, 4000, 67, 1376, 16, 3283, 4672, 5898, 67, 529, 273, 3283, 18, 588, 2932, 311, 3113, 315, 529, 7923, 19993, 67, 1458, 273, 776, 83, 4597, 12, 4057, 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, 1172, 67, 16169, 1767, 2042, 12, 4000, 67, 1376, 16, 3283, 4672, 5898, 67, 529, 273, 3283, 18, 588, 2932, 311, 3113, 315, 529, 7923, 19993, 67, 1458, 273, 776, 83, 4597, 12, 4057, 13, ...
(x,y) = (x.conjugate()*y).reduced_trace()
(x,y) = (x.conjugate()*y).reduced_trace()
def ternary_quadratic_form(self): """ Return the ternary quadratic form associated to this order.
9e5bebf6d1408b31803ae172a9024d12bca8d284 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/9e5bebf6d1408b31803ae172a9024d12bca8d284/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 24265, 67, 21733, 20004, 67, 687, 12, 2890, 4672, 3536, 2000, 326, 268, 24265, 26146, 646, 3627, 358, 333, 1353, 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, 268, 24265, 67, 21733, 20004, 67, 687, 12, 2890, 4672, 3536, 2000, 326, 268, 24265, 26146, 646, 3627, 358, 333, 1353, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
QWhatsThis.add(self.dirscf_checkbox, """Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.""") QWhatsThis.add(self.gbasis_combox, """Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.""") QWhatsThis.add(self.checkBox10_3_2, """Reads the $HESS group from the output file of a previous GAMESS calculation. Only valid for identical molecules.""") QWhatsThis.add(self.checkBox10_2_2_2, """Reads the $VEC group from the output of a previous GAMESS calculation. Requires that both the molecule and basis set be identical. Useful for restarted calculations and starting orbitals for electron correlation methods.""")
QWhatsThis.add(self.dirscf_checkbox, """Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.""") QWhatsThis.add(self.gbasis_combox, """Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.""") QWhatsThis.add(self.checkBox10_3_2, """Reads the $HESS group from the output file of a previous GAMESS calculation. Only valid for identical molecules.""") QWhatsThis.add(self.checkBox10_2_2_2, """Reads the $VEC group from the output of a previous GAMESS calculation. Requires that both the molecule and basis set be identical. Useful for restarted calculations and starting orbitals for electron correlation methods.""")
def __init__(self): GamessPropDialog.__init__(self, modal=True) self.sManager = ServerManager() self.servers = self.sManager.getServers() self.server = self.servers[0] QWhatsThis.add(self.name_linedit, """Name of the GAMESS jig.""") QWhatsThis.add(self.runtyp_combox, """Type of calculation, where "Energy" calculates the Energy Minima, and "Optimization" calculates the "Equilibrium Geometry".""") QWhatsThis.add(self.comment_linedit, """Description, also placed in the comment line of the $DATA section of the INP file.""") QWhatsThis.add(self.choose_color_btn, """Change the GAMESS jig color.""") QWhatsThis.add(self.rhf_radiobtn, """Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.""") QWhatsThis.add(self.uhf_radiobtn, """Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. """) QWhatsThis.add(self.rohf_radiobtn, """Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.""") QWhatsThis.add(self.icharg_spinbox, """The total charge of the structure to be treated quantum mechanically (ICHARG).""") QWhatsThis.add(self.multi_combox, """N + 1, where N is the number of unpaired electrons (MULT).""") QWhatsThis.add(self.memory_spinbox, """System memory reserved for calculation""") QWhatsThis.add(self.dirscf_checkbox, """Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.""") QWhatsThis.add(self.gbasis_combox, """Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.""") QWhatsThis.add(self.checkBox10_3_2, """Reads the $HESS group from the output file of a previous GAMESS calculation. Only valid for identical molecules.""") QWhatsThis.add(self.checkBox10_2_2_2, """Reads the $VEC group from the output of a previous GAMESS calculation. Requires that both the molecule and basis set be identical. Useful for restarted calculations and starting orbitals for electron correlation methods.""") QWhatsThis.add(self.none_radiobtn, """Select this button to neglect electron correlation in the calculation.""") QWhatsThis.add(self.dft_radiobtn, """Select this button to perform a density functional theory calculation.""") QWhatsThis.add(self.mp2_radiobtn, """Select this button to perform a Second-Order Moeller Plesset calculation.""") QWhatsThis.add(self.dfttyp_combox, """Select an available density functional in GAMESS.""") QWhatsThis.add(self.gridsize_combox, """Select the grid spacing for the DFT calculation.""") QWhatsThis.add(self.core_electrons_checkbox, """Check this box to include both the valence and core electrons in the MP2 calculation.""") QWhatsThis.add(self.density_conv_combox, """Selects the accuracy of the electron density convergence for the calculation (CONV).""") QWhatsThis.add(self.rmsd_combox, """Gradient convergence tolerance (OPTTOL), in Hartree/Bohr. Convergence of a geometry search requires the largest component of the gradient to be less than this value, and the root mean square gradient less than 1/3 of OPTTOL. (default=0.0001)""") QWhatsThis.add(self.iterations_spinbox, """Maximum number of SCF iteration cycles (MAXIT).""") QWhatsThis.add(self.edit_input_file_cbox, """Opens the INP file generated by NanoEngineer-1 in a text editor.""") QWhatsThis.add(self.whats_this_btn, """What's This Help Utility""") QWhatsThis.add(self.run_job_btn, """Save GAMESS parameters, generates the INP file and launches the GAMESS job.""") QWhatsThis.add(self.save_btn, """Save GAMESS parameters and generates the INP file. It does not launch the GAMESS job.""") QWhatsThis.add(self.cancel_btn, """Cancels changes and closes dialog.""")
27df67bdd1347295fce56794988bf1709aeab362 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/27df67bdd1347295fce56794988bf1709aeab362/GamessProp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 611, 301, 403, 4658, 6353, 16186, 2738, 972, 12, 2890, 16, 13010, 33, 5510, 13, 365, 18, 87, 1318, 273, 3224, 1318, 1435, 365, 18, 14247, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 611, 301, 403, 4658, 6353, 16186, 2738, 972, 12, 2890, 16, 13010, 33, 5510, 13, 365, 18, 87, 1318, 273, 3224, 1318, 1435, 365, 18, 14247, 273, 365, 18,...
self.ctxt.send_port_stats_request(dpid)
self.ctxt.send_port_stats_request(dpid, OFPP_NONE)
def port_timer(self, dpid): self.ctxt.send_port_stats_request(dpid) self.post_callback(MONITOR_PORT_PERIOD, lambda : self.port_timer(dpid))
ea374ed9a1406e2d830c2b1b80718601529f7ef4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11602/ea374ed9a1406e2d830c2b1b80718601529f7ef4/monitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1756, 67, 12542, 12, 2890, 16, 302, 6610, 4672, 365, 18, 20364, 18, 4661, 67, 655, 67, 5296, 67, 2293, 12, 72, 6610, 16, 15932, 6584, 67, 9826, 13, 365, 18, 2767, 67, 3394, 12, 17667...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1756, 67, 12542, 12, 2890, 16, 302, 6610, 4672, 365, 18, 20364, 18, 4661, 67, 655, 67, 5296, 67, 2293, 12, 72, 6610, 16, 15932, 6584, 67, 9826, 13, 365, 18, 2767, 67, 3394, 12, 17667...
self._update_ui ()
def _table_mode_process_key_event (self, key): '''Xingma Mode Process Key Event''' cond_letter_translate = lambda (c): \ self._convert_to_full_width (c) if self._full_width_letter [self._mode] else c cond_punct_translate = lambda (c): \ self._convert_to_full_width (c) if self._full_width_punct [self._mode] else c # We have to process the pinyin mode change key event here, # because we ignore all Release event below. if self._match_hotkey (key, keysyms.Shift_R, modifier.SHIFT_MASK + modifier.RELEASE_MASK) and self._ime_py: res = self._editor.r_shift () self._refresh_properties () self._update_ui () return res # process commit to preedit if self._match_hotkey (key, keysyms.Shift_R, modifier.SHIFT_MASK + modifier.RELEASE_MASK) or self._match_hotkey (key, keysyms.Shift_L, modifier.SHIFT_MASK + modifier.RELEASE_MASK): res = self._editor.l_shift () self._update_ui () return res # Match sigle char mode switch hotkey if self._match_hotkey (key, keysyms.comma, modifier.CONTROL_MASK): self.property_activate ( u"onechar" ) return True # Ignore key release event now :) if key.mask & modifier.RELEASE_MASK: return True
43c42c7420cca1de98b4dc33a2516418dcbccddb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/544/43c42c7420cca1de98b4dc33a2516418dcbccddb/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2121, 67, 3188, 67, 2567, 67, 856, 67, 2575, 261, 2890, 16, 498, 4672, 9163, 60, 310, 2540, 8126, 4389, 1929, 2587, 26418, 6941, 67, 13449, 67, 13929, 273, 3195, 261, 71, 4672, 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, 389, 2121, 67, 3188, 67, 2567, 67, 856, 67, 2575, 261, 2890, 16, 498, 4672, 9163, 60, 310, 2540, 8126, 4389, 1929, 2587, 26418, 6941, 67, 13449, 67, 13929, 273, 3195, 261, 71, 4672, 52...
if (a - i) > 0.5: i += 1
if a > 0: if a - i > 0.5: i += 1 elif a < 0: if a - i < -0.5: i -= 1
def nint(a): '''return the nearest integer to a.''' i = int(a) if (a - i) > 0.5: i += 1 return i
6ed75f69db25b214f06b16ecc655f2e88167f9ae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/6ed75f69db25b214f06b16ecc655f2e88167f9ae/Guff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 474, 12, 69, 4672, 9163, 2463, 326, 11431, 3571, 358, 279, 1093, 6309, 225, 277, 273, 509, 12, 69, 13, 225, 309, 279, 405, 374, 30, 309, 279, 300, 277, 405, 374, 18, 25, 30, 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, 290, 474, 12, 69, 4672, 9163, 2463, 326, 11431, 3571, 358, 279, 1093, 6309, 225, 277, 273, 509, 12, 69, 13, 225, 309, 279, 405, 374, 30, 309, 279, 300, 277, 405, 374, 18, 25, 30, 2...
if (freqSubBand > freqBand): freqSubBand = freqBand
if (freqSubBand == 0): freqSubBand = 10
def usage(): msg = """\
07f0d8a234499c03308304055c012921a7b6c43c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/07f0d8a234499c03308304055c012921a7b6c43c/fscanDriver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1234, 273, 3536, 64, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1234, 273, 3536, 64, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)
result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial) if result < 0: raise except_orm(_('Module loading failed'), _('Loading %s/%s failed:\n %s') % (module, fname, warning_msg))
def convert_csv_import(cr, module, fname, csvcontent, idref=None, mode='init', noupdate=False): '''Import csv file : quote: " delimiter: , encoding: utf-8''' if not idref: idref={} logger = logging.getLogger('init') model = ('.'.join(fname.split('.')[:-1]).split('-'))[0] #remove folder path from model head, model = os.path.split(model) pool = pooler.get_pool(cr.dbname) input = cStringIO.StringIO(csvcontent) #FIXME reader = csv.reader(input, quotechar='"', delimiter=',') fields = reader.next() fname_partial = "" if config.get('import_partial'): fname_partial = module + '/'+ fname if not os.path.isfile(config.get('import_partial')): pickle.dump({}, file(config.get('import_partial'),'w+')) else: data = pickle.load(file(config.get('import_partial'))) if fname_partial in data: if not data[fname_partial]: return else: for i in range(data[fname_partial]): reader.next() if not (mode == 'init' or 'id' in fields): logger.error("Import specification does not contain 'id' and we are in init mode, Cannot continue.") return uid = 1 datas = [] for line in reader: if (not line) or not reduce(lambda x,y: x or y, line) : continue try: datas.append(map(lambda x: misc.ustr(x), line)) except: logger.error("Cannot import the line: %s", line) pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial) if config.get('import_partial'): data = pickle.load(file(config.get('import_partial'))) data[fname_partial] = 0 pickle.dump(data, file(config.get('import_partial'),'wb')) cr.commit()
12ba501178e56235ae7b2016378a47fdf2c0c2ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/12ba501178e56235ae7b2016378a47fdf2c0c2ac/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 6715, 67, 5666, 12, 3353, 16, 1605, 16, 5299, 16, 6101, 1745, 16, 612, 1734, 33, 7036, 16, 1965, 2218, 2738, 2187, 1158, 2725, 33, 8381, 4672, 9163, 5010, 6101, 585, 294, 386...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 6715, 67, 5666, 12, 3353, 16, 1605, 16, 5299, 16, 6101, 1745, 16, 612, 1734, 33, 7036, 16, 1965, 2218, 2738, 2187, 1158, 2725, 33, 8381, 4672, 9163, 5010, 6101, 585, 294, 386...
print 'ZZZZ', ln
def get_command(ln, prefix, suffix): b = 0; e = len(ln) - 1 while b <= e: if ln[b].isspace(): b = b + 1 elif ln[e].isspace(): e = e - 1 else: break if b > e: return False if e - b < len(prefix) + len(suffix): return False e = e + 1 return ln[b:b+len(prefix)] == prefix and \ ln[e-len(suffix):e] == suffix
7621a78c3be2dcc00e4c9d34d234820ff5b6228e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2839/7621a78c3be2dcc00e4c9d34d234820ff5b6228e/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3076, 12, 2370, 16, 1633, 16, 3758, 4672, 324, 273, 374, 31, 425, 273, 562, 12, 2370, 13, 300, 404, 1323, 324, 1648, 425, 30, 309, 7211, 63, 70, 8009, 1054, 909, 13332, 324,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3076, 12, 2370, 16, 1633, 16, 3758, 4672, 324, 273, 374, 31, 425, 273, 562, 12, 2370, 13, 300, 404, 1323, 324, 1648, 425, 30, 309, 7211, 63, 70, 8009, 1054, 909, 13332, 324,...
sage: EllipticCurve('123a1').sha_an_padic(41)
NOTE: the following doctest is DISABLED. When I put in the fix for trac I'm not sure whether this indicates a bug, possibly a normalisation issue. sage.: EllipticCurve('123a1').sha_an_padic(41)
def sha_an_padic(self, p, prec=0): r""" Returns the conjectural order of Sha(E), according to the $p$-adic analogue of the BSD conjecture.
a93576505bbd9352e11a22a46f1d7a260b3855a6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a93576505bbd9352e11a22a46f1d7a260b3855a6/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6056, 67, 304, 67, 6982, 335, 12, 2890, 16, 293, 16, 13382, 33, 20, 4672, 436, 8395, 2860, 326, 356, 937, 3766, 1353, 434, 2638, 69, 12, 41, 3631, 4888, 358, 326, 271, 84, 8, 17, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6056, 67, 304, 67, 6982, 335, 12, 2890, 16, 293, 16, 13382, 33, 20, 4672, 436, 8395, 2860, 326, 356, 937, 3766, 1353, 434, 2638, 69, 12, 41, 3631, 4888, 358, 326, 271, 84, 8, 17, 2...
if CodeElements[0][0] == ElemType.QUOTED_WORD or CodeElements[0][0] == ElemType.INFIX_BOOL or CodeElements[0][0] == ElemType.INFIX_NUM:
if CodeElements[0][0] == ElemType.QUOTED_WORD or CodeElements[0][0] == ElemType.INFIX_BOOL or (CodeElements[0][0] == ElemType.INFIX_NUM and CodeElements[0][1] != '-'):
def ParseFromCodeElements(self, CodeElements, ProcName, Procedures): ErrProcName = ProcName or 'global' elemtype = CodeElements[0][0] # check for the easy ones first if elemtype == ElemType.QUOTED_WORD: elem = CodeElements.pop(0) self.ArgType = ParamType.QUOTEDWORD self.AddElement(ElemType.QUOTED_WORD, elem[1], None) return True elif elemtype == ElemType.OPEN_BRACKET: CodeElements.pop(0) bracketDepth = 1 # assume that it's a numeric list at the start, and if any non-numbers are found then we'll call it a code list instead self.ArgType = ParamType.LISTNUM while len(CodeElements) > 0: elem = CodeElements.pop(0) if elem[0] == ElemType.OPEN_BRACKET: bracketDepth += 1 if elem[0] == ElemType.CLOSE_BRACKET: bracketDepth -= 1 if bracketDepth == 0: break self.AddElement(elem[0], elem[1], None) for ch in elem[1]: if not (ch.isdigit() or ch == '.' or ch =='[' or ch == ']'): self.ArgType = ParamType.LISTCODE if bracketDepth != 0: print "Syntax error: List ended with unclosed bracket in procedure '%s'" % ErrProcName return False return True # otherwise, assume that we are parsing either a boolean or numeric expression parenDepth = 0 while len(CodeElements) > 0: elem = CodeElements.pop(0) if elem[0] == ElemType.OPEN_BRACKET or elem[0] == ElemType.CLOSE_BRACKET: print "Syntax error: invalid bracket '%s' found in expression in procedure '%s'" % (elem[1], ErrProcName) return False elif elem[0] == ElemType.OPEN_PAREN: # check for parenthesized built-in procedure calls bSpecialProc = False if CodeElements[0][0] == ElemType.UNQUOT_WORD: name = CodeElements[0][1] procs = [ proc for proc in Builtin._procs if proc.bParenthesized and (proc.FullName == name.lower() or proc.AbbrevName == name.lower()) ] if len(procs) > 0: # okay, we're looking at a special instruction form # first, extract a code element stream for only this instruction InstrElements = [] InstrParen = 1 while len(CodeElements) > 0: elem = CodeElements.pop(0) if elem[0] == ElemType.OPEN_PAREN: InstrParen += 1 elif elem[0] == ElemType.CLOSE_PAREN: InstrParen -= 1 if InstrParen == 0: break InstrElements.append(elem) # now, create the special instruction and check that all elements were used Instruct = Instruction(name, True, procs[0].nParams, procs[0].bExtraNumbers) if not Instruct.GetArguments(InstrElements, ProcName, Procedures): return False if len(InstrElements) > 0: print "Syntax error: extraneous code in parenthesized instruction '%s' in procedure '%s'" % (name, ErrProcName) return False self.AddElement(ElemType.FUNC_CALL, name, Instruct) bSpecialProc = True if not bSpecialProc: # nope, just a regular old parenthesis parenDepth += 1 self.AddElement(ElemType.OPEN_PAREN, elem[1], None) if len(CodeElements) == 0: print "Syntax error: hanging open-parenthesis in procedure '%s'" % ErrProcName return False if CodeElements[0][0] == ElemType.CLOSE_PAREN: print "Syntax error: empty parenthesis pair in procedure '%s'" % ErrProcName return False if CodeElements[0][0] == ElemType.QUOTED_WORD or CodeElements[0][0] == ElemType.INFIX_BOOL or CodeElements[0][0] == ElemType.INFIX_NUM: print "Syntax error: invalid symbol '%s' after open-parenthesis in procedure '%s'" % (CodeElements[0][1], ErrProcName) return False continue elif elem[0] == ElemType.CLOSE_PAREN: if parenDepth == 0: print "Syntax error: unmatched close-parenthesis in procedure '%s'" % ErrProcName return False parenDepth -= 1 self.AddElement(ElemType.CLOSE_PAREN, elem[1], None) # handle a sub-procedure call elif elem[0] == ElemType.UNQUOT_WORD: # push the procedure name back on the element list and call the parser function CodeElements.insert(0, elem) Instruct = Parser.GetSingleInstruction(CodeElements, ProcName, Procedures) if Instruct is None: return False self.AddElement(ElemType.FUNC_CALL, elem[1], Instruct) # handle values elif elem[0] == ElemType.NUMBER or elem[0] == ElemType.BOOLEAN or elem[0] == ElemType.VAR_VALUE: self.AddElement(elem[0], elem[1], None) # handle infix operators elif elem[0] == ElemType.INFIX_NUM or elem[0] == ElemType.INFIX_BOOL: self.AddElement(elem[0], elem[1], None) if len(CodeElements) == 0: print "Syntax error: hanging infix '%s' in expression in procedure '%s'" % (elem[1], ErrProcName) return False if CodeElements[0][0] == ElemType.CLOSE_PAREN: print "Syntax error: missing value between '%s' and '%s' in procedure '%s'" % (elem[1], CodeElements[0][1], ErrProcName) return False if CodeElements[0][0] == ElemType.QUOTED_WORD or CodeElements[0][0] == ElemType.INFIX_BOOL or CodeElements[0][0] == ElemType.INFIX_NUM: print "Syntax error: invalid symbol '%s' after operator '%s' in procedure '%s'" % (CodeElements[0][1], elem[1], ErrProcName) return False continue # unknown element type or bug else: print "Syntax error: unknown element code %i in text '%s' from procedure '%s'" % (int(elem[0]), elem[1], ErrProcName) return False if len(CodeElements) == 0: break if CodeElements[0][0] == ElemType.CLOSE_PAREN and parenDepth > 0: continue if CodeElements[0][0] != ElemType.INFIX_BOOL and CodeElements[0][0] != ElemType.INFIX_NUM: break # check parenthesis depth if parenDepth != 0: print "Syntax error: Expression ended with unclosed parenthesis in procedure '%s'. Missing operator or closing parenthesis?" % ErrProcName return False return True
15356bb71e9fcd79a022146a2e7850e62fa61bd3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2419/15356bb71e9fcd79a022146a2e7850e62fa61bd3/tt_instruction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1265, 1085, 3471, 12, 2890, 16, 3356, 3471, 16, 18470, 461, 16, 1186, 23382, 4672, 1926, 15417, 461, 273, 18470, 461, 578, 296, 6347, 11, 3659, 723, 273, 3356, 3471, 63, 20, 6362, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1265, 1085, 3471, 12, 2890, 16, 3356, 3471, 16, 18470, 461, 16, 1186, 23382, 4672, 1926, 15417, 461, 273, 18470, 461, 578, 296, 6347, 11, 3659, 723, 273, 3356, 3471, 63, 20, 6362, ...
if fragment[-1] in WHITESPACE:
if fragment[-1] in whitespace:
def handleSpecialCharacters(engine, text, program=None): from paraparser import greeks, symenc from string import whitespace standard={'lt':'<', 'gt':'>', 'amp':'&'} # add space prefix if space here if text[0:1] in whitespace: program.append(" ") #print "handling", repr(text) # shortcut if 0 and "&" not in text: result = [] for x in text.split(): result.append(x+" ") if result: last = result[-1] if text[-1:] not in whitespace: result[-1] = last.strip() program.extend(result) return program if program is None: program = [] amptext = text.split("&") first = 1 lastfrag = amptext[-1] for fragment in amptext: if not first: # check for special chars semi = fragment.find(";") if semi>0: name = fragment[:semi] if name[0]=='#': try: if name[1] == 'x': n = atoi(name[2:], 16) else: n = atoi(name[1:]) except atoi_error: n = -1 if 0<=n<=255: fragment = chr(n)+fragment[semi+1:] elif symenc.has_key(n): fragment = fragment[semi+1:] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(symenc[n]) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: fragment = "&"+fragment elif standard.has_key(name): fragment = standard[name]+fragment[semi+1:] elif greeks.has_key(name): fragment = fragment[semi+1:] greeksub = greeks[name] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(greeksub) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: # add back the & fragment = "&"+fragment else: # add back the & fragment = "&"+fragment # add white separated components of fragment followed by space sfragment = fragment.split() for w in sfragment[:-1]: program.append(w+" ") # does the last one need a space? if sfragment and fragment: # reader 3 used to go nuts if you don't special case the last frag, but it's fixed? if fragment[-1] in WHITESPACE: # or fragment==lastfrag: program.append( sfragment[-1]+" " ) else: last = sfragment[-1].strip() if last: #print "last is", repr(last) program.append( last ) first = 0 #print "HANDLED", program return program
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12193, 11600, 12, 8944, 16, 977, 16, 5402, 33, 7036, 4672, 628, 779, 438, 297, 550, 1930, 314, 992, 7904, 16, 5382, 1331, 628, 533, 1930, 7983, 4529, 5899, 11, 5618, 11, 2497, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12193, 11600, 12, 8944, 16, 977, 16, 5402, 33, 7036, 4672, 628, 779, 438, 297, 550, 1930, 314, 992, 7904, 16, 5382, 1331, 628, 533, 1930, 7983, 4529, 5899, 11, 5618, 11, 2497, 32...
raise exceptions.ValueError("Parameter " + sys.argv[idx+1] + " has been processed before.") self.processedArgs.append(idx+1) opt['value'] = True
raise exceptions.ValueError("Parameter " + args[idx+1] + " has been processed before.") try: arg = args[idx+1] if len(arg) > 3 and arg[2] == '=': val = _getParamValue(opt, args[idx+1][3:]) else: val = _getParamValue(opt, args[idx+1][2:]) self.processedArgs.append(idx+1) opt['value'] = val except: continue
def __getParamLongArg(self): '''get param from long arg ''' for opt in self.options: if opt['longarg'].endswith('='): # expecting an argument try: endChar = len(opt['longarg'].split('=')[0]) idx = map(lambda x:x[:(endChar+2)]=='--'+opt['longarg'][0:endChar], sys.argv[1:]).index(True) # case 1: --arg something if sys.argv[idx+1] == '--'+opt['longarg'][0:-1]: if idx+1 in self.processedArgs or idx+2 in self.processedArgs: raise exceptions.ValueError("Parameter " + sys.argv[idx+1] + " has been processed before.") try: val = _getParamValue(p, sys.argv[idx+2]) self.processedArgs.append(idx+1) self.processedArgs.append(idx+2) opt['value'] = val except: continue # case 2 --arg=something else: if sys.argv[idx+1][endChar+2] != '=': raise exceptions.ValueError("Parameter " + sys.argv[idx+1] + " is invalid. (--longarg=value)") try: val = _getParamValue(p, sys.argv[idx+1][(endChar+3):]) self.processedArgs.append(idx+1) opt['value'] = val except: continue except: # not available continue else: # true or false if '--' + opt['longarg'] in sys.argv[1:]: idx = sys.argv[1:].index('--'+opt['longarg']) if idx+1 in self.processedArgs: raise exceptions.ValueError("Parameter " + sys.argv[idx+1] + " has been processed before.") self.processedArgs.append(idx+1) opt['value'] = True
84f4cb18ad1ca1b3b2af57319388a364da1f8f6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/84f4cb18ad1ca1b3b2af57319388a364da1f8f6a/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 786, 3708, 4117, 12, 2890, 4672, 9163, 588, 579, 628, 1525, 1501, 9163, 364, 2153, 316, 365, 18, 2116, 30, 309, 2153, 3292, 5748, 3175, 29489, 5839, 1918, 2668, 2218, 4672, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 786, 3708, 4117, 12, 2890, 4672, 9163, 588, 579, 628, 1525, 1501, 9163, 364, 2153, 316, 365, 18, 2116, 30, 309, 2153, 3292, 5748, 3175, 29489, 5839, 1918, 2668, 2218, 4672, 46...
self.setStartState() self.theSession.run( self.getStepSize() ) self.setStopState()
if( self.SimulationButton.getCurrentState() == "stop" ): self.setStartState() self.theSession.run( self.getStepSize() ) self.setStopState() else: self.theSession.run( self.getStepSize() )
def __stepSimulation( self, *arg ) : """steps simulation arg[0] --- stop button (gtk.Button) Returns None if step measure is second, then Session.run() if step measure is step than Session.step () """ if self.getStepType():
52594a70f60d48bab559e6a4fbe7a3be88664235 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/52594a70f60d48bab559e6a4fbe7a3be88664235/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4119, 18419, 12, 365, 16, 380, 3175, 225, 262, 294, 3536, 8986, 14754, 1501, 63, 20, 65, 225, 9948, 225, 2132, 3568, 261, 4521, 79, 18, 3616, 13, 2860, 599, 309, 2235, 6649, 353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4119, 18419, 12, 365, 16, 380, 3175, 225, 262, 294, 3536, 8986, 14754, 1501, 63, 20, 65, 225, 9948, 225, 2132, 3568, 261, 4521, 79, 18, 3616, 13, 2860, 599, 309, 2235, 6649, 353,...
f.write('\ndef get_info(name): return globals().get(name,{})\n')
f.write('\ndef get_info(name): g=globals(); return g.get(name,g.get(name+"_info",{}))\n')
f.write('\ndef get_info(name): return globals().get(name,{})\n')
191555b758309b741a5195ede9fc617164eeac60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/191555b758309b741a5195ede9fc617164eeac60/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 18, 2626, 2668, 64, 82, 536, 336, 67, 1376, 12, 529, 4672, 327, 10941, 7675, 588, 12, 529, 16, 2916, 5153, 82, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 18, 2626, 2668, 64, 82, 536, 336, 67, 1376, 12, 529, 4672, 327, 10941, 7675, 588, 12, 529, 16, 2916, 5153, 82, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return 'trees.html'
return self._trees_url
def url(self, obj): """ Return the URL for the given object, which can be a C{VariableDoc}, a C{ValueDoc}, or a C{DottedName}. """ # Module: <canonical_name>-module.html if isinstance(obj, ModuleDoc): if obj not in self.module_set: return None return urllib.quote('%s'%obj.canonical_name) + '-module.html' # Class: <canonical_name>-class.html elif isinstance(obj, ClassDoc): if obj not in self.class_set: return None return urllib.quote('%s'%obj.canonical_name) + '-class.html' # Variable elif isinstance(obj, VariableDoc): val_doc = obj.value if isinstance(val_doc, (ModuleDoc, ClassDoc)): return self.url(val_doc) elif obj.container in (None, UNKNOWN): if val_doc in (None, UNKNOWN): return None return self.url(val_doc) elif obj.is_imported == True: if obj.imported_from is not UNKNOWN: return self.url(obj.imported_from) else: return None else: container_url = self.url(obj.container) if container_url is None: return None return '%s#%s' % (container_url, urllib.quote('%s'%obj.name)) # Value (other than module or class) elif isinstance(obj, ValueDoc): container = self.docindex.container(obj) if container is None: return None # We couldn't find it! else: container_url = self.url(container) if container_url is None: return None anchor = urllib.quote('%s'%obj.canonical_name[-1]) return '%s#%s' % (container_url, anchor) # Dotted name: look up the corresponding APIDoc elif isinstance(obj, DottedName): val_doc = self.docindex.get_valdoc(obj) if val_doc is None: return None return self.url(val_doc) # Special pages: elif obj == 'indices': return 'identifier-index.html' elif obj == 'help': return 'help.html' elif obj == 'trees': return 'trees.html' else: raise ValueError, "Don't know what to do with %r" % obj
ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 12, 2890, 16, 1081, 4672, 3536, 2000, 326, 1976, 364, 326, 864, 733, 16, 1492, 848, 506, 279, 385, 95, 3092, 1759, 5779, 279, 385, 95, 620, 1759, 5779, 578, 279, 385, 95, 10412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 12, 2890, 16, 1081, 4672, 3536, 2000, 326, 1976, 364, 326, 864, 733, 16, 1492, 848, 506, 279, 385, 95, 3092, 1759, 5779, 279, 385, 95, 620, 1759, 5779, 578, 279, 385, 95, 10412, ...
"INTEGER": "int"}
"INTEGER": "int", "BLOB": "jpg"}
def get_table_structure(self, table): '''Returns a list of tuples (name, type) with the table columns name and type'''
78fc32ed099bff1d250dc5957eb6062ac3644738 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13558/78fc32ed099bff1d250dc5957eb6062ac3644738/fusqldb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2121, 67, 7627, 12, 2890, 16, 1014, 4672, 9163, 1356, 279, 666, 434, 10384, 261, 529, 16, 618, 13, 598, 326, 1014, 2168, 508, 471, 618, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2121, 67, 7627, 12, 2890, 16, 1014, 4672, 9163, 1356, 279, 666, 434, 10384, 261, 529, 16, 618, 13, 598, 326, 1014, 2168, 508, 471, 618, 26418, 2, -100, -100, -100, -100, -100,...
def setup_cacheconv(self,cp): convert_script = open('cacheconv.sh','w')
def setup_cacheconv(self,cp): convert_script = open('cacheconv.sh','w')
def setup_cacheconv(self,cp): # create a shell script to call convertlalcache.pl if the value of $RETURN is 0 convert_script = open('cacheconv.sh','w')
a2bbfd42c8ab7fadc011df769e183127e596cd3e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/a2bbfd42c8ab7fadc011df769e183127e596cd3e/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 17703, 17181, 90, 12, 2890, 16, 4057, 4672, 468, 752, 279, 5972, 2728, 358, 745, 1765, 80, 287, 2493, 18, 412, 309, 326, 460, 434, 271, 14033, 353, 374, 1765, 67, 4263, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 17703, 17181, 90, 12, 2890, 16, 4057, 4672, 468, 752, 279, 5972, 2728, 358, 745, 1765, 80, 287, 2493, 18, 412, 309, 326, 460, 434, 271, 14033, 353, 374, 1765, 67, 4263, 273, ...
op1.int.reverse() op2.int.reverse()
def __add__(self, other, context=None): """Returns self + other.
1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 972, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 1356, 365, 397, 1308, 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,...
[ 1, 1, 1, 1, 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, 1001, 1289, 972, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 1356, 365, 397, 1308, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.label_weight = weight
self.label_weight = label_weight
def __init__(self, index, label_weight, is_in_y=False): self.index = index self.label_weight = weight self.is_in_y = is_in_y self.eq_graph_edges = set() self.matching_edge = None
a2ad0dee0947cbc68b1113dad3dc27777f909fdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11717/a2ad0dee0947cbc68b1113dad3dc27777f909fdb/partition_dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 770, 16, 1433, 67, 4865, 16, 353, 67, 267, 67, 93, 33, 8381, 4672, 365, 18, 1615, 273, 770, 365, 18, 1925, 67, 4865, 273, 1433, 67, 4865, 365, 18, 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, 770, 16, 1433, 67, 4865, 16, 353, 67, 267, 67, 93, 33, 8381, 4672, 365, 18, 1615, 273, 770, 365, 18, 1925, 67, 4865, 273, 1433, 67, 4865, 365, 18, 29...
crashMe()
def onRetr(self, command, args, response): """Adds the judgement header based on the raw headers and body of the message.""" # Use '\n\r?\n' to detect the end of the headers in case of # broken emails that don't use the proper line separators. if re.search(r'\n\r?\n', response): # Remove the trailing .\r\n before passing to the email parser. # Thanks to Scott Schlesier for this fix. terminatingDotPresent = (response[-4:] == '\n.\r\n') if terminatingDotPresent: response = response[:-3]
f370fb1757f33d03d025d117d08d9248ca48a489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/f370fb1757f33d03d025d117d08d9248ca48a489/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 7055, 86, 12, 2890, 16, 1296, 16, 833, 16, 766, 4672, 3536, 3655, 326, 525, 1100, 75, 820, 1446, 2511, 603, 326, 1831, 1607, 471, 1417, 434, 326, 883, 12123, 468, 2672, 2337, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 7055, 86, 12, 2890, 16, 1296, 16, 833, 16, 766, 4672, 3536, 3655, 326, 525, 1100, 75, 820, 1446, 2511, 603, 326, 1831, 1607, 471, 1417, 434, 326, 883, 12123, 468, 2672, 2337, 82, ...
self.local_hostname = socket.getfqdn()
fqdn = socket.getfqdn() if '.' in fqdn: self.local_hostname = fqdn else: addr = socket.gethostbyname(socket.gethostname()) self.local_hostname = '[%s]' % addr
def __init__(self, host = '', port = 0, local_hostname = None): """Initialize a new instance.
49a8032da66c7e4fa333e8cf846ce3f9274a215f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/49a8032da66c7e4fa333e8cf846ce3f9274a215f/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 273, 10226, 1756, 273, 374, 16, 1191, 67, 10358, 273, 599, 4672, 3536, 7520, 279, 394, 791, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 273, 10226, 1756, 273, 374, 16, 1191, 67, 10358, 273, 599, 4672, 3536, 7520, 279, 394, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...