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
render.DrawTabX(self, dc, self._pagesInfoVec[tabIdx].GetXRect(), tabIdx, self._nTabXButtonStatus)
self.Refresh()
def OnMouseMove(self, event): """ Handles the wx.EVT_MOTION for L{PageContainer}. """
3a0b1f421ffd09b66f7f6a99913173fbe0ebb517 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12725/3a0b1f421ffd09b66f7f6a99913173fbe0ebb517/flatnotebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9186, 7607, 12, 2890, 16, 871, 4672, 3536, 27020, 326, 7075, 18, 24427, 56, 67, 49, 1974, 1146, 364, 511, 95, 1964, 2170, 5496, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9186, 7607, 12, 2890, 16, 871, 4672, 3536, 27020, 326, 7075, 18, 24427, 56, 67, 49, 1974, 1146, 364, 511, 95, 1964, 2170, 5496, 3536, 2, -100, -100, -100, -100, -100, -100, -100, ...
agent = Agent(self, bankKey, obj.label)
agent = Agent(self, obj.agentBank, obj.label)
def _updateAgent(self, obj): bankKey = "%d.%d" % (obj.brokerBank, obj.agentBank) if obj._deleteTime == 0: if bankKey not in self.agents: agent = Agent(self, bankKey, obj.label) self.agents[bankKey] = agent if self.session.console != None: self.session.console.newAgent(agent) else: agent = self.agents.pop(bankKey, None) if agent != None and self.session.console != None: self.session.console.delAgent(agent)
0d08ba902f6f1345e2b0a283cf6e677e5be4b47d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/0d08ba902f6f1345e2b0a283cf6e677e5be4b47d/console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 3630, 12, 2890, 16, 1081, 4672, 11218, 653, 273, 2213, 72, 7866, 72, 6, 738, 261, 2603, 18, 21722, 16040, 16, 1081, 18, 5629, 16040, 13, 309, 1081, 6315, 3733, 950, 422, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2725, 3630, 12, 2890, 16, 1081, 4672, 11218, 653, 273, 2213, 72, 7866, 72, 6, 738, 261, 2603, 18, 21722, 16040, 16, 1081, 18, 5629, 16040, 13, 309, 1081, 6315, 3733, 950, 422, 374...
self._updateRegisteration(fd)
self._updateRegistration(fd)
def addWriter(self, writer, writes=writes, selectables=selectables): """Add a FileDescriptor for notification of data available to write. """ fd = writer.fileno() if not writes.has_key(fd): selectables[fd] = writer writes[fd] = 1 self._updateRegisteration(fd)
f8f4cce658115ffd1811a37759775bcb2c3a9b99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f8f4cce658115ffd1811a37759775bcb2c3a9b99/pollreactor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 2289, 12, 2890, 16, 2633, 16, 7262, 33, 13284, 16, 2027, 1538, 33, 4025, 1538, 4672, 3536, 986, 279, 1387, 3187, 364, 3851, 434, 501, 2319, 358, 1045, 18, 3536, 5194, 273, 2633, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 2289, 12, 2890, 16, 2633, 16, 7262, 33, 13284, 16, 2027, 1538, 33, 4025, 1538, 4672, 3536, 986, 279, 1387, 3187, 364, 3851, 434, 501, 2319, 358, 1045, 18, 3536, 5194, 273, 2633, 1...
eventlisttmp = eventlisttmp + ['1',unicode(self.ParseEventValue(event), 'latin-1')]
eventlisttmp = eventlisttmp + ['1',myutils.to_unicode(self.ParseEventValue(event))]
def run(self): '''This is the main workhorse function. Keeps popping events off the queue, and processing them, until program quits ''' ## line format: ## date; time (1 minute resolution); fullapppath; hwnd; username; window title; eventdata ## ## if we are logging keystroke count, that field becomes the penultimate field. ## ## event data: ascii if normal key, escaped if "special" key, escaped if csv separator ## self.processName = self.GetProcessName(event.Window) #fullapppath ## hwnd = event.Window ## username = os.environ['USERNAME'] ## date = time.strftime('%Y%m%d') ## time = time.strftime('%H%m') #is this correct? or format event.time probably... ## windowtitle = str(event.WindowName) # Logic: put the line into a list, check if all contents (except for eventdata) are equal, if so, just append eventdata to existing eventdata. otherwise, write out the previous event list, and start a new one. ## on flush or on exit, make sure to write the latest dataline self.eventlist = range(7) #initialize our eventlist to something. if self.settings['General']['Log Key Count'] == True: self.eventlist.append(7) while not self.finished.isSet(): try: event = self.q.get(timeout=0.5) #need the timeout so that thread terminates properly when exiting loggable = self.TestForNoLog(event) # see if the program is in the no-log list. if not loggable: if self.cmdoptions.debug: self.PrintDebug("not loggable, we are outta here\n") continue if self.cmdoptions.debug: self.PrintDebug("loggable, lets log it. key: " + self.ParseEventValue(event)) loggable = self.OpenLogFile() #will return true if log file has been opened without problems if not loggable: self.PrintDebug("some error occurred when opening the log file. we cannot log this event. check systemlog (if specified) for details.\n") continue # try a few different environment vars to get the username for varname in ['USERNAME','USER','LOGNAME']: username = os.getenv(varname) if username is not None: break if username is None: username = 'none' eventlisttmp = [time.strftime('%Y%m%d'), # date time.strftime('%H%M'), # time self.GetProcessName(event).replace(self.settings['General']['Log File Field Separator'], '[sep_key]'), # process name (full path on windows, just name on linux) str(event.Window), # window handle unicode(username, 'latin-1').replace(self.settings['General']['Log File Field Separator'], '[sep_key]'), # username unicode(event.WindowName, 'latin-1').replace(self.settings['General']['Log File Field Separator'], '[sep_key]')] # window title if self.settings['General']['Log Key Count'] == True: eventlisttmp = eventlisttmp + ['1',unicode(self.ParseEventValue(event), 'latin-1')] else: eventlisttmp.append(unicode(self.ParseEventValue(event), 'latin-1')) if (self.eventlist[:6] == eventlisttmp[:6]) and (self.settings['General']['Limit Keylog Field Size'] == 0 or (len(self.eventlist[-1]) + len(eventlisttmp[-1])) < self.settings['General']['Limit Keylog Field Size']): self.eventlist[-1] = self.eventlist[-1] + eventlisttmp[-1] #append char to log if self.settings['General']['Log Key Count'] == True: self.eventlist[-2] = str(int(self.eventlist[-2]) + 1) # increase stroke count else: self.WriteToLogFile() #write the eventlist to file, unless it's just the dummy list self.eventlist = eventlisttmp except Queue.Empty: pass #let's keep iterating except: self.PrintDebug("some exception was caught in the logwriter loop...\nhere it is:\n", sys.exc_info()) pass #let's keep iterating self.finished.set() #shouldn't ever need this, but just in case...
6cc681747db54c819352ad7345b0858ccd3ec88c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3638/6cc681747db54c819352ad7345b0858ccd3ec88c/logwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 9163, 2503, 353, 326, 2774, 1440, 76, 23035, 445, 18, 10498, 87, 1843, 1382, 2641, 3397, 326, 2389, 16, 471, 4929, 2182, 16, 3180, 5402, 719, 1282, 9163, 7541, 980,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 9163, 2503, 353, 326, 2774, 1440, 76, 23035, 445, 18, 10498, 87, 1843, 1382, 2641, 3397, 326, 2389, 16, 471, 4929, 2182, 16, 3180, 5402, 719, 1282, 9163, 7541, 980,...
get_starter_file_name() + '" >> "' + prog_path + \ '/cron_log.txt"' + ' 2>> "' + prog_path + \ '/cron_log.txt"' + os.linesep
get_starter_file_name() + '" >> /dev/null 2>&1'
def setup_startup(prog_path): """ <Purpose> Sets up seattle to run at startup on the current computer. On Windows, this means adding a script to the startup folder, while on Unix systems it means adding a line to the crontab. <Arguments> prog_path: The path to the directory where the seattle files are located. <Exceptions> UnsupportedOSError if the os is not supported. AlreadyInstalledError if seattle has already been installed on the system. <Side Effects> None. <Returns> The path to the startup file on Windows if successful. True on Linux if successful. False if it fails. """ # First check to make sure it's a supported os if OS == "Windows" or OS == "WindowsCE": # Try setting up the startup folder on a Windows system sysrelease = get_win_startup_folder(platform.release()) if not sysrelease: return False # Check to see if we've already installed a startup script here startupscript = sysrelease + os.sep + get_starter_file_name() if os.path.exists(startupscript): raise AlreadyInstalledError #BUG fix ticket 320. keys need to be generated before setting up the cron tab to avoid a race condition. #In the windows case we should handle this in a consistent manner and set up the node keys before we modify the statup settings. generate_keys(prog_path) # Now that we have the startup folder and we know seattle is not installed, # customize the starter file. preprocess_file(prog_path + os.sep + get_starter_file_name(), {"%PROG_PATH%": prog_path}) # And copy it to the startup folder. shutil.copy(prog_path + os.sep + get_starter_file_name(), sysrelease + os.sep + get_starter_file_name()) return (sysrelease + os.sep + get_starter_file_name()) else: # Assume we're running on a Linux system, so add a line to the crontab # First, customize the starter file in the install directory preprocess_file(prog_path + os.sep + get_starter_file_name(), {"%PROG_PATH%": prog_path}) # Next check to see if the line is already there crontab_f = subprocess.Popen("crontab -l", shell=True, stdout=subprocess.PIPE).stdout found = False for line in crontab_f: if re.search(os.sep + get_starter_file_name(), line): found = True break crontab_f.close() if found: raise AlreadyInstalledError # Now we know they don't, so we should add it #BUG fix ticket 320. keys need to be generated before setting up the cron tab to avoid a race condition #generate the node keys generate_keys(prog_path) # Generate a temp file with the user's crontab plus our task # (tempfile module used as suggested in Jacob Appelbaum's patch) cron_line = '*/10 * * * * "' + prog_path + '/' + \ get_starter_file_name() + '" >> "' + prog_path + \ '/cron_log.txt"' + ' 2>> "' + prog_path + \ '/cron_log.txt"' + os.linesep crontab_f = subprocess.Popen("crontab -l", shell=True, stdout=subprocess.PIPE).stdout filedescriptor, tmp_location = tempfile.mkstemp("temp", "seattle") for line in crontab_f: os.write(filedescriptor, line) os.write(filedescriptor, cron_line) os.close(filedescriptor) # Now, replace the crontab with that temp file os.popen('crontab "' + tmp_location + '"') os.unlink(tmp_location) return True
b1784f9160f423fa65cf93b3344757c06ce7b045 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/b1784f9160f423fa65cf93b3344757c06ce7b045/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 23939, 12, 14654, 67, 803, 4672, 3536, 411, 10262, 4150, 34, 11511, 731, 695, 4558, 298, 358, 1086, 622, 11850, 603, 326, 783, 26579, 18, 2755, 8202, 16, 333, 4696, 6534, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 23939, 12, 14654, 67, 803, 4672, 3536, 411, 10262, 4150, 34, 11511, 731, 695, 4558, 298, 358, 1086, 622, 11850, 603, 326, 783, 26579, 18, 2755, 8202, 16, 333, 4696, 6534, 279, ...
insert_data = [ [7, 'jack', datetime.datetime(2005, 11, 10, 0, 0), datetime.date(2005,11,10), datetime.time(12,20,2)], [8, 'roy', datetime.datetime(2005, 11, 10, 11, 52, 35), datetime.date(2005,10,10), datetime.time(0,0,0)], [9, 'foo', datetime.datetime(2005, 11, 10, 11, 52, 35, 54839), datetime.date(1970,4,1), datetime.time(23,59,59,999)], [10, 'colber', None, None, None] ] fnames = ['user_id', 'user_name', 'user_datetime', 'user_date', 'user_time'] collist = [Column('user_id', INT, primary_key = True), Column('user_name', VARCHAR(20)), Column('user_datetime', DateTime(timezone=False)),
insert_data = [ [7, 'jack', datetime.datetime(2005, 11, 10, 0, 0), datetime.date(2005,11,10), datetime.time(12,20,2)], [8, 'roy', datetime.datetime(2005, 11, 10, 11, 52, 35), datetime.date(2005,10,10), datetime.time(0,0,0)], [9, 'foo', datetime.datetime(2005, 11, 10, 11, 52, 35, 54839), datetime.date(1970,4,1), datetime.time(23,59,59,999)], [10, 'colber', None, None, None] ] fnames = ['user_id', 'user_name', 'user_datetime', 'user_date', 'user_time'] collist = [Column('user_id', INT, primary_key = True), Column('user_name', VARCHAR(20)), Column('user_datetime', DateTime(timezone=False)),
def setUpAll(self): global users_with_date, insert_data
ec6d7b39003f244b4acc7352f5973c910053e17f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/ec6d7b39003f244b4acc7352f5973c910053e17f/testtypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 1595, 12, 2890, 4672, 2552, 3677, 67, 1918, 67, 712, 16, 2243, 67, 892, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 1595, 12, 2890, 4672, 2552, 3677, 67, 1918, 67, 712, 16, 2243, 67, 892, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
os.system("nosetests --with-nosexunit --source-folder=src --where=test/springpythontest --xml-report-folder=%s" % dir)
os.system("nosetests --with-nosexunit --source-folder=src --where=test/springpythontest --xml-report-folder=%s checkin" % dir)
def test(dir): if not os.path.exists(dir): os.makedirs(dir) os.system("nosetests --with-nosexunit --source-folder=src --where=test/springpythontest --xml-report-folder=%s" % dir)
6f45fa77cc268f5d236c3bfe6bff81d5ad93b7c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7713/6f45fa77cc268f5d236c3bfe6bff81d5ad93b7c1/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 1214, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 1214, 4672, 1140, 18, 81, 9477, 10539, 12, 1214, 13, 1140, 18, 4299, 2932, 18050, 278, 25563, 1493, 1918, 17, 2135, 20909, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1214, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 1214, 4672, 1140, 18, 81, 9477, 10539, 12, 1214, 13, 1140, 18, 4299, 2932, 18050, 278, 25563, 1493, 1918, 17, 2135, 20909, ...
assert i.attrib['tag'].isdigit()
if tag == 'FMT': continue if not tag.isdigit(): non_digit = True else: if tag[0] != '9' and non_digit: raise BadSubtag
def read_fields(self, want): want = set(want)
0c93cd75ae1c28849653cff8b0b07bcba3f9d91c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/0c93cd75ae1c28849653cff8b0b07bcba3f9d91c/marc_xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2821, 12, 2890, 16, 2545, 4672, 2545, 273, 444, 12, 17369, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2821, 12, 2890, 16, 2545, 4672, 2545, 273, 444, 12, 17369, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
res = self.__putFile(srcFile,destFile,0) if os.path.exists(srcFile): os.remove(srcFile) self.__executeOperation(destFile,'removeFile')
res = self.__putFile( srcFile, destFile, 0 ) if os.path.exists( srcFile ): os.remove( srcFile ) self.__executeOperation( destFile, 'removeFile' )
def __makeDir(self,path): srcFile = '%s/%s' % (os.getcwd(),'dirac_directory') dfile = open(srcFile,'w') dfile.write(" ") dfile.close() destFile = '%s/%s' % (path,'dirac_directory.%s' % time.time()) directoryDict = {destFile:srcFile} res = self.__putFile(srcFile,destFile,0) if os.path.exists(srcFile): os.remove(srcFile) self.__executeOperation(destFile,'removeFile') return res
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6540, 1621, 12, 2890, 16, 803, 4672, 24672, 273, 1995, 87, 5258, 87, 11, 738, 261, 538, 18, 588, 11089, 9334, 11, 3211, 8836, 67, 5149, 6134, 302, 768, 273, 1696, 12, 4816, 812, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6540, 1621, 12, 2890, 16, 803, 4672, 24672, 273, 1995, 87, 5258, 87, 11, 738, 261, 538, 18, 588, 11089, 9334, 11, 3211, 8836, 67, 5149, 6134, 302, 768, 273, 1696, 12, 4816, 812, ...
bot = SandboxBot(hours, no_repeat)
bot = SandboxBot(hours, no_repeat, delay)
def main(): hours = 1 no_repeat = True for arg in wikipedia.handleArgs(): if arg.startswith('-hours:'): hours = float(arg[7:]) no_repeat = False else: wikipedia.showHelp('clean_sandbox') return bot = SandboxBot(hours, no_repeat) bot.run()
5af2f5a9221ce111d4be71621dc4061ff47e919e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5af2f5a9221ce111d4be71621dc4061ff47e919e/clean_sandbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 7507, 273, 404, 1158, 67, 9374, 273, 1053, 364, 1501, 316, 21137, 18, 4110, 2615, 13332, 309, 1501, 18, 17514, 1918, 2668, 17, 16814, 2497, 4672, 7507, 273, 1431, 12, 3175, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7507, 273, 404, 1158, 67, 9374, 273, 1053, 364, 1501, 316, 21137, 18, 4110, 2615, 13332, 309, 1501, 18, 17514, 1918, 2668, 17, 16814, 2497, 4672, 7507, 273, 1431, 12, 3175, ...
condorJobfile = os.path.join(self.localStagingDir, self.workflow+".condor")
condorJobfile = os.path.join(self.localStagingDir, shortName+".condor")
def writeCondorFile(self, pipelinePolicy): self.logger.log(Log.DEBUG, "VanillaWorkflowConfigurator:writeCondorFile")
9fabc637352b9a9dd98720e19642c13ae2362a78 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6549/9fabc637352b9a9dd98720e19642c13ae2362a78/VanillaCondorWorkflowConfigurator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12441, 280, 812, 12, 2890, 16, 5873, 2582, 4672, 365, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 58, 26476, 8484, 17182, 30, 2626, 12441, 280, 812, 7923, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12441, 280, 812, 12, 2890, 16, 5873, 2582, 4672, 365, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 58, 26476, 8484, 17182, 30, 2626, 12441, 280, 812, 7923, 2, -100, -100, -10...
def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"):
def __init__(self, dag, job, cp, opts, time, ifo, frame_cache, p_nodes=[], type="ht", variety="fg"):
def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"): """ """ pipeline.CondorDAGNode.__init__(self,job)
2869ef397c55840877c2be60eb9ece759794479d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/2869ef397c55840877c2be60eb9ece759794479d/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 22940, 16, 1719, 16, 3283, 16, 1500, 16, 813, 16, 21479, 16, 2623, 67, 2493, 16, 293, 67, 4690, 22850, 6487, 618, 1546, 647, 3113, 1394, 14369, 1546, 213...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22940, 16, 1719, 16, 3283, 16, 1500, 16, 813, 16, 21479, 16, 2623, 67, 2493, 16, 293, 67, 4690, 22850, 6487, 618, 1546, 647, 3113, 1394, 14369, 1546, 213...
for line in gdb_output.splitlines(): if line.startswith('$1'): self.assertTrue(re.match(r'\$1 = Frame 0x[0-9a-f]+, for file <string>, line 3, in foo \(\)', line), 'Unexpected gdb representation: %r\n%s' % (line, gdb_output)) return self.fail('Did not find expected line beginning with $1')
self.assertTrue(re.match(r'.*\s+\$1 =\s+Frame 0x[0-9a-f]+, for file <string>, line 3, in foo \(\)\s+.*', gdb_output, re.DOTALL), 'Unexpected gdb representation: %r\n%s' % (gdb_output, gdb_output))
def foo(a, b, c): pass
9362d7b9455f0d54064561e221047077a1c94d81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/9362d7b9455f0d54064561e221047077a1c94d81/test_gdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8431, 12, 69, 16, 324, 16, 276, 4672, 1342, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8431, 12, 69, 16, 324, 16, 276, 4672, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if self.text != "":
if self.text != "" and model.get_value(it, column).startswith(self.complete):
def search_func(self, model, column, key, it): if self.mod: cp_text = key else: cp_text = self.text + key self.complete = cp_text if model.get_path(model.get_iter_first()) == model.get_path(it): self.found = False if model.get_value(it, column).startswith(cp_text): self.found = True if model.iter_next(it) is None and not self.found: if self.text != "": self.complete = model.get_value(it, 1) else: self.complete = key self.insert_complete() self.hide() return not model.get_value(it, column).startswith(cp_text)
609d3b2f4044112b0b4ef84717924b2174df81ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/609d3b2f4044112b0b4ef84717924b2174df81ac/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 644, 12, 2890, 16, 938, 16, 1057, 16, 498, 16, 518, 4672, 309, 365, 18, 1711, 30, 3283, 67, 955, 273, 498, 469, 30, 3283, 67, 955, 273, 365, 18, 955, 397, 498, 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, 1623, 67, 644, 12, 2890, 16, 938, 16, 1057, 16, 498, 16, 518, 4672, 309, 365, 18, 1711, 30, 3283, 67, 955, 273, 498, 469, 30, 3283, 67, 955, 273, 365, 18, 955, 397, 498, 365, 18, ...
table:style-name="table-default.cell-A1">
table:style-name="table-default.cell-A4">
def test_table_footer(self): html = """<html xmlns="http://www.w3.org/1999/xhtml"> <table> <tfoot> <tr> <td>Cell1</td> <td>Cell2</td> </tr> </tfoot> <tr> <td>Cell3</td> <td>Cell4</td> </tr> </table> </html> """ odt = xhtml2odt(html) # remove namespaces odt = re.sub('(xmlns:[a-z0-9=:".-]+\s+)*', '', str(odt)) # remove comments odt = re.sub('(<!--[a-z0-9=-]+-->)*', '', odt) print odt assert re.search(r""" <table:table \s+ table:style-name="table-default"> \s* <table:table-column \s+ table:number-columns-repeated="2"/> \s* <table:table-row> \s*
9cd87a34e72c7238b1b710177511eae4bd213897 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7063/9cd87a34e72c7238b1b710177511eae4bd213897/test_tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2121, 67, 14723, 12, 2890, 4672, 1729, 273, 3536, 32, 2620, 12302, 1546, 2505, 2207, 5591, 18, 91, 23, 18, 3341, 19, 21, 11984, 19, 26341, 6441, 411, 2121, 34, 411, 88, 10923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2121, 67, 14723, 12, 2890, 4672, 1729, 273, 3536, 32, 2620, 12302, 1546, 2505, 2207, 5591, 18, 91, 23, 18, 3341, 19, 21, 11984, 19, 26341, 6441, 411, 2121, 34, 411, 88, 10923...
assert gc.collect() > 0
if gc.collect() == 0: raise TestFailed
def test_instance(): class A: pass a = A() a.a = a gc.collect() del a assert gc.collect() > 0
e3aa6f872c7d08b44faf5e6c53625eda81d38bd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e3aa6f872c7d08b44faf5e6c53625eda81d38bd1/test_gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1336, 13332, 667, 432, 30, 1342, 279, 273, 432, 1435, 279, 18, 69, 273, 279, 8859, 18, 14676, 1435, 1464, 279, 309, 8859, 18, 14676, 1435, 422, 374, 30, 1002, 7766, 2925, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1336, 13332, 667, 432, 30, 1342, 279, 273, 432, 1435, 279, 18, 69, 273, 279, 8859, 18, 14676, 1435, 1464, 279, 309, 8859, 18, 14676, 1435, 422, 374, 30, 1002, 7766, 2925, 225...
return self._qexp
if prec is None: return self._qexp elif prec > self.prec(): raise ValueError else: return self._qexp.add_bigoh(prec)
def qexp(self): r""" Return the q-expansion of self, to as high precision as it is known.
3585551616e64b7ecefd90f53b929dc9de8efd18 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3585551616e64b7ecefd90f53b929dc9de8efd18/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 2749, 12, 2890, 4672, 436, 8395, 2000, 326, 1043, 17, 2749, 12162, 434, 365, 16, 358, 487, 3551, 6039, 487, 518, 353, 4846, 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, 1043, 2749, 12, 2890, 4672, 436, 8395, 2000, 326, 1043, 17, 2749, 12162, 434, 365, 16, 358, 487, 3551, 6039, 487, 518, 353, 4846, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
sub.__parent = self
sub.__parent = wkref(self)
def __setitem__( self, k, v ): if isinstance(v,ParseResultsWithOffset): self.__tokdict[k] = self.__tokdict.get(k,list()) + [v] sub = v[0] elif isinstance(k,int): self.__toklist[k] = v sub = v else: self.__tokdict[k] = self.__tokdict.get(k,list()) + [(v,0)] sub = v if isinstance(sub,ParseResults): sub.__parent = self
3ffe2cb437e5c5ef179a32d974b9041a6bc31b6a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12364/3ffe2cb437e5c5ef179a32d974b9041a6bc31b6a/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 365, 16, 417, 16, 331, 262, 30, 309, 1549, 12, 90, 16, 3201, 3447, 1190, 2335, 4672, 365, 16186, 17692, 1576, 63, 79, 65, 273, 365, 16186, 17692, 1576, 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, 542, 1726, 972, 12, 365, 16, 417, 16, 331, 262, 30, 309, 1549, 12, 90, 16, 3201, 3447, 1190, 2335, 4672, 365, 16186, 17692, 1576, 63, 79, 65, 273, 365, 16186, 17692, 1576, 18, ...
print >>sys.stderr, """\ the output will contain "%s" and should be usable. * "backslashreplace" (for other output formats, Python 2.3+); look for "%s" in the output.""" % ( data.encode('ascii', 'xmlcharrefreplace'), data.encode('ascii', 'backslashreplace'))
sys.stderr.write( ' the output will contain "%s" and should be usable.\n' '* "backslashreplace" (for other output formats, Python 2.3+);\n' ' look for "%s" in the output.\n' % (data.encode('ascii', 'xmlcharrefreplace'), data.encode('ascii', 'backslashreplace')))
def report_UnicodeError(self, error): print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error)
9227369877d31f35c47c4ad0bee70ce68f3ba2ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/9227369877d31f35c47c4ad0bee70ce68f3ba2ee/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 16532, 668, 12, 2890, 16, 555, 4672, 1172, 1671, 9499, 18, 11241, 16, 1995, 87, 30, 738, 87, 11, 738, 261, 1636, 16186, 1106, 972, 16186, 529, 972, 16, 555, 13, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 16532, 668, 12, 2890, 16, 555, 4672, 1172, 1671, 9499, 18, 11241, 16, 1995, 87, 30, 738, 87, 11, 738, 261, 1636, 16186, 1106, 972, 16186, 529, 972, 16, 555, 13, 2, -100, -1...
pre.appendChild(doc.createTextNode(self.getBody()))
pre.appendChild(doc.createTextNode(self.getBody()))
def toXHTML(self): """ Print a message into XHTML+RDFa format """ #root nodes doc = getDOMImplementation().createDocument(None, 'html', None) root = doc.documentElement root.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml') root.setAttribute('xmlns:sioc', str(SIOC)) root.setAttribute('xmlns:foaf', str(FOAF)) root.setAttribute('xmlns:dc', str(DC)) root.setAttribute('xmlns:dct', str(DCT)) root.setAttribute('xmlns:mvcb', str(MVCB)) root.setAttribute('xmlns:xsd', str(XSD)) head = doc.createElement('head') root.appendChild(head) head.setAttribute('profile', 'http://www.w3.org/2003/g/data-view') link = doc.createElement('link') link.setAttribute('rel', 'transformation') link.setAttribute('href', 'http://www-sop.inria.fr/acacia/soft/RDFa2RDFXML.xsl') head.appendChild(link) link = doc.createElement('link') link.setAttribute('rel', 'meta') link.setAttribute('type', 'application/rdf+xml') link.setAttribute('title', 'SIOC') link.setAttribute('href', self.getRdfUrl()) head.appendChild(link) link = doc.createElement('link') link.setAttribute('rel', 'stylesheet') link.setAttribute('type', 'text/css') link.setAttribute('href', self.config.get('base')+'swaml.css') head.appendChild(link) title = doc.createElement('title') title.appendChild(doc.createTextNode(self.getSubject())) head.appendChild(title) #body body = doc.createElement('body') root.appendChild(body) body.setAttribute('typeof', 'foaf:Document') body.setAttribute('about', self.getXhtmlUrl()) a = doc.createElement('a') body.appendChild(a) a.setAttribute('href', self.getUri()) body.setAttribute('rel', 'foaf:primaryTopic') #post div div = doc.createElement('div') body.appendChild(div) div.setAttribute('typeof', 'sioc:Post') div.setAttribute('about', self.getUri()) #post fields try: h1 = doc.createElement('h1') div.appendChild(h1) h1.setAttribute('property', 'dc:title') h1.appendChild(doc.createTextNode(self.getSubject())) p = doc.createElement('p') div.appendChild(p) strong = doc.createElement('strong') p.appendChild(strong) strong.appendChild(doc.createTextNode('From: ')) a = doc.createElement('a') a.setAttribute('rel', 'sioc:has_creator') a.setAttribute('href', self.getSender().getUri()) a.appendChild(doc.createTextNode(self.getSender().getName())) p.appendChild(a) p = doc.createElement('p') div.appendChild(p) strong = doc.createElement('strong') p.appendChild(strong) strong.appendChild(doc.createTextNode('To: ')) a = doc.createElement('a') a.setAttribute('rel', 'sioc:has_container') a.setAttribute('href', self.config.get('base')+'forum') if (len(self.config.get('title'))>0): a.appendChild(doc.createTextNode(self.config.get('title'))) else: a.appendChild(doc.createTextNode(self.config.get('base')+'forum')) p.appendChild(a) p = doc.createElement('p') div.appendChild(p) strong = doc.createElement('strong') p.appendChild(strong) strong.appendChild(doc.createTextNode('Date: ')) span = doc.createElement('span') span.setAttribute('property', 'dct:created') span.setAttribute('datatype', 'xsd:dateTime') span.appendChild(doc.createTextNode(self.getDate())) p.appendChild(span) #p = doc.createElement('p') #div.appendChild(p) #strong = doc.createElement('strong') #p.appendChild(strong) #strong.appendChild(doc.createTextNode('Message-Id: ')) #span = doc.createElement('span') #span.setAttribute('property', 'sioc:id') #span.appendChild(doc.createTextNode(self.getSwamlId())) #p.appendChild(span) pre = doc.createElement('pre') div.appendChild(pre) pre.setAttribute('property', 'sioc:content') pre.appendChild(doc.createTextNode(self.getBody())) #FIXME: parse URLs parent = self.getParent() if (parent != None): p = doc.createElement('p') div.appendChild(p) p.appendChild(doc.createTextNode('Reply of: ')) a = doc.createElement('a') a.setAttribute('rel', 'sioc:reply_of') a.setAttribute('href', parent) a.appendChild(doc.createTextNode(parent)) p.appendChild(a) if (len(self.childs) > 0): for child in self.childs: p = doc.createElement('p') div.appendChild(p) p.appendChild(doc.createTextNode('Has reply: ')) a = doc.createElement('a') a.setAttribute('rel', 'sioc:has_reply') a.setAttribute('href', child) a.appendChild(doc.createTextNode(child)) p.appendChild(a) previous = self.getPreviousByDate() if (previous != None): p = doc.createElement('p') div.appendChild(p) p.appendChild(doc.createTextNode('Previous by Date: ')) a = doc.createElement('a') a.setAttribute('rel', 'sioc:previous_by_date') a.setAttribute('href', previous) a.appendChild(doc.createTextNode(previous)) p.appendChild(a) next = self.getNextByDate() if (next != None): p = doc.createElement('p') div.appendChild(p) p.appendChild(doc.createTextNode('Next by Date: ')) a = doc.createElement('a') a.setAttribute('rel', 'sioc:next_by_date') a.setAttribute('href', next) a.appendChild(doc.createTextNode(next)) p.appendChild(a) except Exception, detail: print 'Error exporting to XHTML message ' + str(self.getId()) + ': ' + str(detail) #credits p = doc.createElement('p') body.appendChild(p) p.setAttribute('class', 'credits') a = doc.createElement('a') a.setAttribute('rel', 'mvcb:generatorAgent') a.setAttribute('href', 'http://swaml.berlios.de/') a.appendChild(doc.createTextNode('Generated by ')) abbr = doc.createElement('abbr') abbr.setAttribute('title', 'Semantic Web Archives of Mailing Lists') abbr.appendChild(doc.createTextNode('SWAML')) a.appendChild(abbr) p.appendChild(a) #and dump to disk try: xhtml_file = open(self.getXhtmlPath(), 'w+') #FIXME try: xml.dom.ext.PrettyPrint(doc, xhtml_file) except UnicodeDecodeError, detail: xhtml_file.write("") print 'Decode error saving message ' + str(self.getId()) + ': ' + str(detail) xhtml_file.flush() xhtml_file.close() except IOError, detail: print 'IOError saving message ' + str(self.getId()) + ': ' + str(detail)
8193f8a0c5095160f9997eedc83a82f8b0d21cf2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2232/8193f8a0c5095160f9997eedc83a82f8b0d21cf2/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 60, 4870, 12, 2890, 4672, 3536, 3038, 279, 883, 1368, 30551, 15, 30137, 69, 740, 3536, 225, 468, 3085, 2199, 997, 273, 2343, 1872, 13621, 7675, 2640, 2519, 12, 7036, 16, 296, 2620, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 60, 4870, 12, 2890, 4672, 3536, 3038, 279, 883, 1368, 30551, 15, 30137, 69, 740, 3536, 225, 468, 3085, 2199, 997, 273, 2343, 1872, 13621, 7675, 2640, 2519, 12, 7036, 16, 296, 2620, ...
for set1 in self.sets + []:
for set1 in self.sets + [[]]:
def test_ascii_bit_dump(self): """intbitset - ascii bit dump""" for set1 in self.sets + []: tot = 0 count = 0 for bit in intbitset(set1).strbits(): if bit == '0': self.failIf(count in set1) elif bit == '1': self.failIf(count not in set1) tot += 1 else: self.fail() count += 1 self.assertEqual(tot, len(set1))
d4a1d7e3f52dbeaebf8d74a7a99b4870caa65e1a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/d4a1d7e3f52dbeaebf8d74a7a99b4870caa65e1a/intbitset_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9184, 67, 3682, 67, 8481, 12, 2890, 4672, 3536, 474, 3682, 542, 300, 11384, 2831, 4657, 8395, 364, 444, 21, 316, 365, 18, 4424, 397, 306, 8526, 14542, 9997, 273, 374, 1056, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9184, 67, 3682, 67, 8481, 12, 2890, 4672, 3536, 474, 3682, 542, 300, 11384, 2831, 4657, 8395, 364, 444, 21, 316, 365, 18, 4424, 397, 306, 8526, 14542, 9997, 273, 374, 1056, 2...
if root.level == 30:
if not root.level:
def output(text, decoder=None, newline=True, toStdout=False, level=INFO): """Output a message to the user via the userinterface. Works like print, but uses the encoding used by the user's console (console_encoding in the configuration file) instead of ASCII. If decoder is None, text should be a unicode string. Otherwise it should be encoded in the given encoding. If newline is True, a linebreak will be added after printing the text. If toStdout is True, the text will be sent to standard output, so that it can be piped to another process. All other text will be sent to stderr. See: http://en.wikipedia.org/wiki/Pipeline_%28Unix%29 text can contain special sequences to create colored output. These consist of the escape character \03 and the color name in curly braces, e. g. \03{lightpurple}. \03{default} resets the color. @param level: output level for logging module; use VERBOSE for optional messages, INPUT for prompts requiring user reponse (not yet fully implemented) """ # make sure logging system has been initialized root = logging.getLogger("pywiki") if root.level == 30: # init_handlers sets this level init_handlers(strm=ui.output_stream) frame = currentframe() module = os.path.basename(frame.f_code.co_filename) context = {'caller_name': frame.f_code.co_name, 'caller_file': module, 'caller_line': frame.f_lineno} if decoder: text = unicode(text, decoder) elif not isinstance(text, unicode): if not isinstance(text, str): # looks like text is a non-text object. # Maybe it has a __unicode__ builtin ? # (allows to print Page, Site...) text = unicode(text) else: try: text = unicode(text, 'utf-8') except UnicodeDecodeError: text = unicode(text, 'iso8859-1') if newline: text += "\n" if toStdout: level = STDOUT ui.output(text, level=level, context=context)
e715a9c4076536e56293f775a8d59b683a3d5432 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9005/e715a9c4076536e56293f775a8d59b683a3d5432/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 12, 955, 16, 8320, 33, 7036, 16, 9472, 33, 5510, 16, 358, 27334, 33, 8381, 16, 1801, 33, 5923, 4672, 3536, 1447, 279, 883, 358, 326, 729, 3970, 326, 729, 5831, 18, 225, 4147, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 12, 955, 16, 8320, 33, 7036, 16, 9472, 33, 5510, 16, 358, 27334, 33, 8381, 16, 1801, 33, 5923, 4672, 3536, 1447, 279, 883, 358, 326, 729, 3970, 326, 729, 5831, 18, 225, 4147, 87...
sizer2 = wx.BoxSizer(wx.VERTICAL)
def modval(self, event): dialog = wx.Dialog(None, -1, "Set Light Values", size=wx.Size(300, 300)) self.dialog = dialog sizer = wx.BoxSizer(wx.VERTICAL) sizer2 = wx.BoxSizer(wx.VERTICAL) self.values = scrolled.ScrolledPanel(dialog, -1, size=wx.Size(300, 200)) box = wx.BoxSizer(wx.HORIZONTAL) label = wx.StaticText(self.values, -1, "Value(s):") box.Add(label, 0, wx.ALIGN_CENTRE | wx.ALL, 5) box2 = wx.BoxSizer(wx.VERTICAL) self.fields = [ ] for i in range(0, self.c.num_vals): if (i >= len(self.c.vals)): v = '0' else: v = str(self.c.vals[i]) field = wx.TextCtrl(self.values, -1, v) self.fields.append(field) box2.Add(field, 0, wx.ALIGN_CENTRE | wx.ALL, 5) box.Add(box2, 0, wx.ALIGN_CENTRE | wx.ALL, 5) self.values.SetSizer(box) sizer.Add(self.values, 0, wx.ALIGN_CENTRE | wx.ALL, 2) bbox = wx.BoxSizer(wx.HORIZONTAL) cancel = wx.Button(dialog, -1, "Cancel") dialog.Bind(wx.EVT_BUTTON, self.cancel, cancel); bbox.Add(cancel, 0, wx.ALIGN_LEFT | wx.ALL, 5); ok = wx.Button(dialog, -1, "Ok") dialog.Bind(wx.EVT_BUTTON, self.ok, ok); bbox.Add(ok, 0, wx.ALIGN_LEFT | wx.ALL, 5); sizer.Add(bbox, 0, wx.ALIGN_CENTRE | wx.ALL, 2)
e4a495f473299f3234d1d57514918996b249814d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/e4a495f473299f3234d1d57514918996b249814d/_control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 681, 1125, 12, 2890, 16, 871, 4672, 6176, 273, 7075, 18, 6353, 12, 7036, 16, 300, 21, 16, 315, 694, 15992, 6876, 3113, 963, 33, 27226, 18, 1225, 12, 19249, 16, 11631, 3719, 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, 681, 1125, 12, 2890, 16, 871, 4672, 6176, 273, 7075, 18, 6353, 12, 7036, 16, 300, 21, 16, 315, 694, 15992, 6876, 3113, 963, 33, 27226, 18, 1225, 12, 19249, 16, 11631, 3719, 365, 18, ...
assert res == self.main.im_func(1, 10)
assert res == main(1, 10)
def test_tl_2(self): res = self.meta_interp(self.main.im_func, [1, 10], listops=True, backendopt=True) assert res == self.main.im_func(1, 10) self.check_loops({'int_sub':1, 'int_le':1, 'int_is_true':1, 'guard_false':1, 'jump':1})
e59b5cc5e71c3b11feca4a3c33171e5eb96d4282 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/e59b5cc5e71c3b11feca4a3c33171e5eb96d4282/test_tl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6172, 67, 22, 12, 2890, 4672, 400, 273, 365, 18, 3901, 67, 24940, 12, 2890, 18, 5254, 18, 381, 67, 644, 16, 306, 21, 16, 1728, 6487, 666, 4473, 33, 5510, 16, 4221, 3838, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6172, 67, 22, 12, 2890, 4672, 400, 273, 365, 18, 3901, 67, 24940, 12, 2890, 18, 5254, 18, 381, 67, 644, 16, 306, 21, 16, 1728, 6487, 666, 4473, 33, 5510, 16, 4221, 3838, ...
else
else:
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 680) else quickfix.IntField.__init__(self, 680, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 3672, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 3672, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 27...
if (version == TAL_VERSION and isinstance(program[1], tuple) and
if (version == TAL_VERSION and isinstance_(program[1], tuple) and
def getProgramMode(program): version = getProgramVersion(program) if (version == TAL_VERSION and isinstance(program[1], tuple) and len(program[1]) == 2): opcode, mode = program[1] if opcode == "mode": return mode return None
d2ed77fafe9c3762d19dfd9ae43938d2aebc7bbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9834/d2ed77fafe9c3762d19dfd9ae43938d2aebc7bbf/taldefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3570, 3295, 2309, 12, 12890, 4672, 1177, 273, 3570, 3295, 1444, 12, 12890, 13, 309, 261, 1589, 422, 399, 1013, 67, 5757, 471, 1549, 67, 12, 12890, 63, 21, 6487, 3193, 13, 471, 562, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3570, 3295, 2309, 12, 12890, 4672, 1177, 273, 3570, 3295, 1444, 12, 12890, 13, 309, 261, 1589, 422, 399, 1013, 67, 5757, 471, 1549, 67, 12, 12890, 63, 21, 6487, 3193, 13, 471, 562, 12,...
namedRepl[n] = v[0]
if v[0] != name: namedRepl[name] = [v[0], v[2]]
def process(self, text): # keys are ref groups # values are a dict where : # keys are ref content # values are [name, [list of full ref matches]] foundRefs = {} foundRefNames = [] # Replace key by value namedRepl = {}
cf52d53ad4531135e73ebcbe3e028663a00bb7b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/cf52d53ad4531135e73ebcbe3e028663a00bb7b1/reflinks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 977, 4672, 468, 1311, 854, 1278, 3252, 468, 924, 854, 279, 2065, 1625, 294, 468, 282, 1311, 854, 1278, 913, 468, 282, 924, 854, 306, 529, 16, 306, 1098, 434, 1983, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 977, 4672, 468, 1311, 854, 1278, 3252, 468, 924, 854, 279, 2065, 1625, 294, 468, 282, 1311, 854, 1278, 913, 468, 282, 924, 854, 306, 529, 16, 306, 1098, 434, 1983, ...
jobid = self.client.SubmitJob(jdl) raise 'problem'
jobid = self.client.submitJob(jdl)
def _sendJob(self,jdl): """Internal function. Still to check proxy timeleft and VO eligibility etc.
28afabf46f73fd75c169cf165ffc6c0a14ea9785 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/28afabf46f73fd75c169cf165ffc6c0a14ea9785/Dirac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 2278, 12, 2890, 16, 78, 5761, 4672, 3536, 3061, 445, 18, 934, 737, 358, 866, 2889, 1658, 6516, 1222, 471, 776, 51, 415, 360, 3628, 5527, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 2278, 12, 2890, 16, 78, 5761, 4672, 3536, 3061, 445, 18, 934, 737, 358, 866, 2889, 1658, 6516, 1222, 471, 776, 51, 415, 360, 3628, 5527, 18, 2, -100, -100, -100, -100, -100,...
print (" reinitializing sub-commands: %s" % command.get_sub_commands())
def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option values in programmatically, overriding or supplementing user-supplied values from the config files and command line. You'll have to re-finalize the command object (by calling 'finalize_options()' or 'ensure_finalized()') before using it for real.
7c04d132f40e66010904dda5acf76c7e6460cdac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7c04d132f40e66010904dda5acf76c7e6460cdac/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 11160, 67, 3076, 261, 2890, 16, 1296, 16, 283, 2738, 67, 1717, 7847, 33, 20, 4672, 3536, 426, 6769, 3128, 279, 1296, 358, 326, 919, 518, 1703, 316, 1347, 1122, 2106, 635, 296, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 11160, 67, 3076, 261, 2890, 16, 1296, 16, 283, 2738, 67, 1717, 7847, 33, 20, 4672, 3536, 426, 6769, 3128, 279, 1296, 358, 326, 919, 518, 1703, 316, 1347, 1122, 2106, 635, 296, 588...
html = HtmlWindow()
def do_reload(self, _b): if len(history) == 0: return url = history[-1] del history[-1] self.load_url(html, url)
9e12cbf33c71c37ace3ba407711b86950816a6ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12352/9e12cbf33c71c37ace3ba407711b86950816a6ae/gtkhtml_demo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 17517, 12, 2890, 16, 389, 70, 4672, 309, 562, 12, 8189, 13, 422, 374, 30, 327, 880, 273, 4927, 18919, 21, 65, 1464, 4927, 18919, 21, 65, 365, 18, 945, 67, 718, 12, 2620, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 17517, 12, 2890, 16, 389, 70, 4672, 309, 562, 12, 8189, 13, 422, 374, 30, 327, 880, 273, 4927, 18919, 21, 65, 1464, 4927, 18919, 21, 65, 365, 18, 945, 67, 718, 12, 2620, 1...
OWGUI.tableItem(table, i,j, str(data[i][key]), backColor = bgColor)
item = OWGUI.tableItem(table, i,j, data[i][key].native(), backColor = bgColor) item.setData(OrangeValueRole, QVariant(str(data[i][key])))
def setTable(self, table, data): if data==None: return qApp.setOverrideCursor(Qt.WaitCursor) vars = data.domain.variables m = data.domain.getmetas(False) ml = [(k, m[k]) for k in m] ml.sort(lambda x,y: cmp(y[0], x[0])) metas = [x[1] for x in ml] metaKeys = [x[0] for x in ml]
d0badfbd529c7a9f22acebcbff6c708d89b17725 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/d0badfbd529c7a9f22acebcbff6c708d89b17725/OWDataTable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30146, 12, 2890, 16, 1014, 16, 501, 4672, 309, 501, 631, 7036, 30, 327, 1043, 3371, 18, 542, 6618, 6688, 12, 23310, 18, 5480, 6688, 13, 4153, 273, 501, 18, 4308, 18, 7528, 312, 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, 30146, 12, 2890, 16, 1014, 16, 501, 4672, 309, 501, 631, 7036, 30, 327, 1043, 3371, 18, 542, 6618, 6688, 12, 23310, 18, 5480, 6688, 13, 4153, 273, 501, 18, 4308, 18, 7528, 312, 273, ...
rule.pattern(10),)) \
rule.pattern(10), rule.pattern(11), rule.pattern(12),)) \
def fc_forall_None(rule, arg_patterns, arg_context): engine = rule.rule_base.engine patterns = rule.goal_arg_patterns() if len(arg_patterns) == len(patterns): context = contexts.bc_context(rule) try: if all(itertools.imap(lambda pat, arg: pat.match_pattern(context, context, arg, arg_context), patterns, arg_patterns)): rule.rule_base.num_bc_rules_matched += 1 flag_1 = False with engine.prove(rule.rule_base.root_name, 'fc_premises', context, (rule.pattern(0), rule.pattern(1), rule.pattern(2), rule.pattern(3), rule.pattern(4), rule.pattern(5), rule.pattern(6), rule.pattern(7), rule.pattern(8), rule.pattern(9), rule.pattern(10),)) \ as gen_1: for x_1 in gen_1: flag_1 = True assert x_1 is None, \ "compiler.fc_forall_None: got unexpected plan from when clause 1" mark2 = context.mark(True) if rule.pattern(11).match_data(context, context, context.lookup_data('fn_head1') + context.lookup_data('fn_tail1')): context.end_save_all_undo() rule.rule_base.num_bc_rule_successes += 1 yield else: context.end_save_all_undo() context.undo_to_mark(mark2) if not flag_1: raise AssertionError("compiler.fc_forall_None: 'when' clause 1 failed") rule.rule_base.num_bc_rule_failures += 1 finally: context.done()
bd4e660a9ed69b909bf026a87883b9b1a9562934 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14714/bd4e660a9ed69b909bf026a87883b9b1a9562934/compiler_bc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8036, 67, 1884, 454, 67, 7036, 12, 5345, 16, 1501, 67, 13317, 16, 1501, 67, 2472, 4672, 4073, 273, 1720, 18, 5345, 67, 1969, 18, 8944, 6884, 273, 1720, 18, 27354, 67, 3175, 67, 13317, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8036, 67, 1884, 454, 67, 7036, 12, 5345, 16, 1501, 67, 13317, 16, 1501, 67, 2472, 4672, 4073, 273, 1720, 18, 5345, 67, 1969, 18, 8944, 6884, 273, 1720, 18, 27354, 67, 3175, 67, 13317, ...
'price_unit': grid.get_price(cr, uid, grid.id, order, dt, context), 'date_planned': dt,
'price_unit': grid.get_price(cr, uid, grid.id, order, time.strftime('%Y-%m-%d'), context),
def _delivery_set(self, cr, uid, data, context): order_obj = pooler.get_pool(cr.dbname).get('sale.order') line_obj = pooler.get_pool(cr.dbname).get('sale.order.line') order_objs = order_obj.browse(cr, uid, data['ids'], context) for order in order_objs: dt = time.strftime('%Y-%m-%d') grid_id = pooler.get_pool(cr.dbname).get('delivery.carrier').grid_get(cr, uid, [data['form']['carrier_id']],order.partner_shipping_id.id) if not grid_id: raise except_osv('No grid avaible !', 'No grid matching for this carrier !') grid = pooler.get_pool(cr.dbname).get('delivery.grid').browse(cr, uid, [grid_id])[0] line_obj.create(cr, uid, { 'order_id': order.id, 'name': grid.carrier_id.name, 'product_uom_qty': 1, 'product_uom': grid.carrier_id.product_id.uom_id.id, 'product_id': grid.carrier_id.product_id.id,
9f3c56f8692ac07a44361962672017669a0baa6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/9f3c56f8692ac07a44361962672017669a0baa6b/delivery_sale_order.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15703, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1353, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 87, 5349, 18, 1019...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15703, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1353, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 87, 5349, 18, 1019...
self.videofile.Enable(sel)
self.videofile.Enable(sel)
def onUpdateFormat(self, event): """ Created: 26.04.2005, KP Description: Update the gui based on the selected output format """ sel = self.formatMenu.GetSelection() if sel: self.outputFormatLbl.SetLabel("Video Codec:") else: self.outputFormatLbl.SetLabel("Image Format:") self.delFramesBox.Enable(sel) self.qualitySlider.Enable(sel) self.videofile.Enable(sel) self.videofileBtn.Enable(sel) currentSelection = self.outputFormat.GetSelection() self.outputFormat.Clear() for i in self.outputFormats[sel]: self.outputFormat.Append(i) self.outputFormat.SetSelection(self.oldSelection) self.oldSelection = currentSelection
ed5ed7160382ea536c275802dc74ac0d3b7a7ac2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/ed5ed7160382ea536c275802dc74ac0d3b7a7ac2/VideoGeneration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 1630, 12, 2890, 16, 871, 4672, 3536, 12953, 30, 10659, 18, 3028, 18, 6976, 25, 16, 1475, 52, 6507, 30, 2315, 326, 13238, 2511, 603, 326, 3170, 876, 740, 3536, 357, 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, 27728, 1630, 12, 2890, 16, 871, 4672, 3536, 12953, 30, 10659, 18, 3028, 18, 6976, 25, 16, 1475, 52, 6507, 30, 2315, 326, 13238, 2511, 603, 326, 3170, 876, 740, 3536, 357, 273, 365, 18,...
event.arg and hasattr(self.current_item,'type'):
event.arg and self.current_item and hasattr(self.current_item,'type'):
def eventhandler(self, event, menuw=None): """ Handle playlist specific events """
164039cc45d1cb0e4afbdf9eb7743be169b440aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/164039cc45d1cb0e4afbdf9eb7743be169b440aa/playlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 16, 3824, 91, 33, 7036, 4672, 3536, 5004, 16428, 2923, 2641, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 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, 871, 4176, 12, 2890, 16, 871, 16, 3824, 91, 33, 7036, 4672, 3536, 5004, 16428, 2923, 2641, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
rledata = binascii.rlecode_hqx(self.data) self.ofp.write(rledata)
rledata = binascii.rlecode_hqx(self.data) self.ofp.write(rledata)
def close(self):
a220e67a9ed94d66b81e393a3bb9e6acd10068c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a220e67a9ed94d66b81e393a3bb9e6acd10068c1/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 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, 0, 0, 0,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 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, -100, -...
""" String Variable Input 0 : The stored value Ouput 0 : Transmit the stored value """
"""String Variable :param : The stored value :returns: Transmit the stored value """
def __call__(self, inputs): """ inputs is the list of input values """ res = float(inputs[0]) self.set_caption('%.1e'%res) return ( res, )
f78cad0f6ee07e911240d784cd94a6972a31d06b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4914/f78cad0f6ee07e911240d784cd94a6972a31d06b/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 4540, 4672, 3536, 4540, 353, 326, 666, 434, 810, 924, 3536, 400, 273, 1431, 12, 10029, 63, 20, 5717, 365, 18, 542, 67, 15386, 29909, 18, 21, 73, 11, 9,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 4540, 4672, 3536, 4540, 353, 326, 666, 434, 810, 924, 3536, 400, 273, 1431, 12, 10029, 63, 20, 5717, 365, 18, 542, 67, 15386, 29909, 18, 21, 73, 11, 9,...
raise Errors.HeaderParseError( "Not a header, not a continuation: ``%s''"%line)
firstbodyline = line break
def _parseheaders(self, container, fp): # Parse the headers, returning a list of header/value pairs. None as # the header means the Unix-From header. lastheader = '' lastvalue = [] lineno = 0 while True: # Don't strip the line before we test for the end condition, # because whitespace-only header lines are RFC compliant # continuation lines. line = fp.readline() if not line: break line = line.splitlines()[0] if not line: break # Ignore the trailing newline lineno += 1 # Check for initial Unix From_ line if line.startswith('From '): if lineno == 1: container.set_unixfrom(line) continue elif self._strict: raise Errors.HeaderParseError( 'Unix-from in headers after first rfc822 header') else: # ignore the wierdly placed From_ line # XXX: maybe set unixfrom anyway? or only if not already? continue # Header continuation line if line[0] in ' \t': if not lastheader: raise Errors.HeaderParseError( 'Continuation line seen before first header') lastvalue.append(line) continue # Normal, non-continuation header. BAW: this should check to make # sure it's a legal header, e.g. doesn't contain spaces. Also, we # should expose the header matching algorithm in the API, and # allow for a non-strict parsing mode (that ignores the line # instead of raising the exception). i = line.find(':') if i < 0: if self._strict: raise Errors.HeaderParseError( "Not a header, not a continuation: ``%s''"%line) elif lineno == 1 and line.startswith('--'): # allow through duplicate boundary tags. continue else: raise Errors.HeaderParseError( "Not a header, not a continuation: ``%s''"%line) if lastheader: container[lastheader] = NL.join(lastvalue) lastheader = line[:i] lastvalue = [line[i+1:].lstrip()] # Make sure we retain the last header if lastheader: container[lastheader] = NL.join(lastvalue)
fd75ad1c4ab511c4bd028c66a273ed9117440b57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fd75ad1c4ab511c4bd028c66a273ed9117440b57/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 2485, 12, 2890, 16, 1478, 16, 4253, 4672, 468, 2884, 326, 1607, 16, 5785, 279, 666, 434, 1446, 19, 1132, 5574, 18, 225, 599, 487, 468, 326, 1446, 4696, 326, 9480, 17, 1265, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 2485, 12, 2890, 16, 1478, 16, 4253, 4672, 468, 2884, 326, 1607, 16, 5785, 279, 666, 434, 1446, 19, 1132, 5574, 18, 225, 599, 487, 468, 326, 1446, 4696, 326, 9480, 17, 1265, ...
def _arrow(self, xmin, ymin, xmax, ymax, options):
def _arrow(self, xtail, ytail, xhead, yhead, options):
def _arrow(self, xmin, ymin, xmax, ymax, options): """ Add an arrow with given bounding box to this graphics object.
20fed398d25002f78f9edd13592206eb593b0a5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/20fed398d25002f78f9edd13592206eb593b0a5f/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7815, 12, 2890, 16, 619, 13101, 16, 677, 13101, 16, 619, 1978, 16, 677, 1978, 16, 702, 4672, 3536, 1436, 392, 12274, 598, 864, 7552, 3919, 358, 333, 17313, 733, 18, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7815, 12, 2890, 16, 619, 13101, 16, 677, 13101, 16, 619, 1978, 16, 677, 1978, 16, 702, 4672, 3536, 1436, 392, 12274, 598, 864, 7552, 3919, 358, 333, 17313, 733, 18, 2, -100, -100,...
readlist = fileinfo[myfilehandle]['fobj'].readlines(*args)
try: readlist = fileinfo[myfilehandle]['fobj'].readlines(*args) except KeyError: raise ValueError("Invalid file object (probably closed).")
def readlines(self,*args): # prevent TOCTOU race with client changing my filehandle myfilehandle = self.filehandle restrictions.assertisallowed('file.readlines',*args)
822c8eb85bfbea98d079fe696f6d57d97031ab7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/822c8eb85bfbea98d079fe696f6d57d97031ab7b/emulfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 16, 14, 1968, 4672, 468, 5309, 8493, 1268, 26556, 17996, 598, 1004, 12770, 3399, 585, 4110, 3399, 768, 4110, 273, 365, 18, 768, 4110, 17499, 18, 11231, 291, 8151, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 16, 14, 1968, 4672, 468, 5309, 8493, 1268, 26556, 17996, 598, 1004, 12770, 3399, 585, 4110, 3399, 768, 4110, 273, 365, 18, 768, 4110, 17499, 18, 11231, 291, 8151, 2668, ...
We create a curve and a point over QQbar::
We create a curve and a point over QQbar (see
def EllipticCurve(x=None, y=None, j=None): r""" There are several ways to construct an elliptic curve: .. math:: y^2 + a_1 xy + a_3 y = x^3 + a_2 x^2 + a_4 x + a_6. - EllipticCurve([a1,a2,a3,a4,a6]): Elliptic curve with given a-invariants. The invariants are coerced into the parent of the first element. If all are integers, they are coerced into the rational numbers. - EllipticCurve([a4,a6]): Same as above, but a1=a2=a3=0. - EllipticCurve(label): Returns the elliptic curve over Q from the Cremona database with the given label. The label is a string, such as "11a" or "37b2". The letters in the label *must* be lower case (Cremona's new labeling). - EllipticCurve(R, [a1,a2,a3,a4,a6]): Create the elliptic curve over R with given a-invariants. Here R can be an arbitrary ring. Note that addition need not be defined. - EllipticCurve(j): Return an elliptic curve with j-invariant `j`. Warning: this is deprecated. Use ``EllipticCurve_from_j(j)`` or ``EllipticCurve(j=j)`` instead. EXAMPLES: We illustrate creating elliptic curves. :: sage: EllipticCurve([0,0,1,-1,0]) Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field We create a curve from a Cremona label:: sage: EllipticCurve('37b2') Elliptic Curve defined by y^2 + y = x^3 + x^2 - 1873*x - 31833 over Rational Field sage: EllipticCurve('5077a') Elliptic Curve defined by y^2 + y = x^3 - 7*x + 6 over Rational Field sage: EllipticCurve('389a') Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field We create curves over a finite field as follows:: sage: EllipticCurve([GF(5)(0),0,1,-1,0]) Elliptic Curve defined by y^2 + y = x^3 + 4*x over Finite Field of size 5 sage: EllipticCurve(GF(5), [0, 0,1,-1,0]) Elliptic Curve defined by y^2 + y = x^3 + 4*x over Finite Field of size 5 Elliptic curves over `\ZZ/N\ZZ` with `N` prime are of type "elliptic curve over a finite field":: sage: F = Zmod(101) sage: EllipticCurve(F, [2, 3]) Elliptic Curve defined by y^2 = x^3 + 2*x + 3 over Ring of integers modulo 101 sage: E = EllipticCurve([F(2), F(3)]) sage: type(E) <class 'sage.schemes.elliptic_curves.ell_finite_field.EllipticCurve_finite_field'> In contrast, elliptic curves over `\ZZ/N\ZZ` with `N` composite are of type "generic elliptic curve":: sage: F = Zmod(95) sage: EllipticCurve(F, [2, 3]) Elliptic Curve defined by y^2 = x^3 + 2*x + 3 over Ring of integers modulo 95 sage: E = EllipticCurve([F(2), F(3)]) sage: type(E) <class 'sage.schemes.elliptic_curves.ell_generic.EllipticCurve_generic'> The following is a curve over the complex numbers:: sage: E = EllipticCurve(CC, [0,0,1,-1,0]) sage: E Elliptic Curve defined by y^2 + 1.00000000000000*y = x^3 + (-1.00000000000000)*x over Complex Field with 53 bits of precision sage: E.j_invariant() 2988.97297297297 We can also create elliptic curves by giving the Weierstrass equation:: sage: x, y = var('x,y') sage: EllipticCurve(y^2 + y == x^3 + x - 9) Elliptic Curve defined by y^2 + y = x^3 + x - 9 over Rational Field sage: R.<x,y> = GF(5)[] sage: EllipticCurve(x^3 + x^2 + 2 - y^2 - y*x) Elliptic Curve defined by y^2 + x*y = x^3 + x^2 + 2 over Finite Field of size 5 We can explicitly specify the `j`-invariant:: sage: E = EllipticCurve(j=1728); E; E.j_invariant(); E.label() Elliptic Curve defined by y^2 = x^3 - x over Rational Field 1728 '32a2' sage: E = EllipticCurve(j=GF(5)(2)); E; E.j_invariant() Elliptic Curve defined by y^2 = x^3 + x + 1 over Finite Field of size 5 2 TESTS:: sage: R = ZZ['u', 'v'] sage: EllipticCurve(R, [1,1]) Elliptic Curve defined by y^2 = x^3 + x + 1 over Multivariate Polynomial Ring in u, v over Integer Ring We create a curve and a point over QQbar:: sage: E = EllipticCurve(QQbar,[0,1]) sage: E(0) (0 : 1 : 0) """ import ell_generic, ell_finite_field, ell_number_field, ell_rational_field, ell_padic_field # here to avoid circular includes if j is not None: return EllipticCurve_from_j(j) assert x is not None if is_SymbolicEquation(x): x = x.lhs() - x.rhs() if parent(x) is SR: x = x._polynomial_(rings.QQ['x', 'y']) if rings.is_MPolynomial(x) and y is None: f = x if f.degree() != 3: raise ValueError, "Elliptic curves must be defined by a cubic polynomial." if f.degrees() == (3,2): x, y = f.parent().gens() elif f.degree() == (2,3): y, x = f.parent().gens() elif len(f.parent().gens()) == 2 or len(f.parent().gens()) == 3 and f.is_homogeneous(): # We'd need a point too... raise NotImplementedError, "Construction of an elliptic curve from a generic cubic not yet implemented." else: raise ValueError, "Defining polynomial must be a cubic polynomial in two variables." try: if f.coefficient(x**3) < 0: f = -f # is there a nicer way to extract the coefficients? a1 = a2 = a3 = a4 = a6 = 0 for coeff, mon in f: if mon == x**3: assert coeff == 1 elif mon == x**2: a2 = coeff elif mon == x: a4 = coeff elif mon == 1: a6 = coeff elif mon == y**2: assert coeff == -1 elif mon == x*y: a1 = -coeff elif mon == y: a3 = -coeff else: assert False return EllipticCurve([a1, a2, a3, a4, a6]) except AssertionError: raise NotImplementedError, "Construction of an elliptic curve from a generic cubic not yet implemented." if rings.is_Ring(x): if rings.is_RationalField(x): return ell_rational_field.EllipticCurve_rational_field(x, y) elif rings.is_FiniteField(x) or (rings.is_IntegerModRing(x) and x.characteristic().is_prime()): return ell_finite_field.EllipticCurve_finite_field(x, y) elif rings.is_pAdicField(x): return ell_padic_field.EllipticCurve_padic_field(x, y) elif rings.is_NumberField(x): return ell_number_field.EllipticCurve_number_field(x, y) return ell_generic.EllipticCurve_generic(x, y) if isinstance(x, str): return ell_rational_field.EllipticCurve_rational_field(x) if rings.is_RingElement(x) and y is None: from sage.misc.misc import deprecation deprecation("'EllipticCurve(j)' is deprecated; use 'EllipticCurve_from_j(j)' or 'EllipticCurve(j=j)' instead.") # Fixed for all characteristics and cases by John Cremona j=x F=j.parent().fraction_field() char=F.characteristic() if char==2: if j==0: return EllipticCurve(F, [ 0, 0, 1, 0, 0 ]) else: return EllipticCurve(F, [ 1, 0, 0, 0, 1/j ]) if char==3: if j==0: return EllipticCurve(F, [ 0, 0, 0, 1, 0 ]) else: return EllipticCurve(F, [ 0, j, 0, 0, -j**2 ]) if j == 0: return EllipticCurve(F, [ 0, 0, 0, 0, 1 ]) if j == 1728: return EllipticCurve(F, [ 0, 0, 0, 1, 0 ]) k=j-1728 return EllipticCurve(F, [0,0,0,-3*j*k, -2*j*k**2]) if not isinstance(x,list): raise TypeError, "invalid input to EllipticCurve constructor" x = Sequence(x) if not (len(x) in [2,5]): raise ValueError, "sequence of coefficients must have length 2 or 5" R = x.universe() if isinstance(x[0], (rings.Rational, rings.Integer, int, long)): return ell_rational_field.EllipticCurve_rational_field(x, y) elif rings.is_NumberField(R): return ell_number_field.EllipticCurve_number_field(x, y) elif rings.is_pAdicField(R): return ell_padic_field.EllipticCurve_padic_field(x, y) elif rings.is_FiniteField(R) or (rings.is_IntegerModRing(R) and R.characteristic().is_prime()): return ell_finite_field.EllipticCurve_finite_field(x, y) return ell_generic.EllipticCurve_generic(x, y)
4f4b859014d732aca8a4a622165d9952e7b10a70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/4f4b859014d732aca8a4a622165d9952e7b10a70/constructor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10426, 549, 21507, 9423, 12, 92, 33, 7036, 16, 677, 33, 7036, 16, 525, 33, 7036, 4672, 436, 8395, 6149, 854, 11392, 16226, 358, 4872, 392, 415, 549, 21507, 8882, 30, 225, 6116, 4233, 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, 10426, 549, 21507, 9423, 12, 92, 33, 7036, 16, 677, 33, 7036, 16, 525, 33, 7036, 4672, 436, 8395, 6149, 854, 11392, 16226, 358, 4872, 392, 415, 549, 21507, 8882, 30, 225, 6116, 4233, 2...
def submitter_list(request, template_name='datagrid/datagrid.html'):
def submitter_list(request, template_name='reviews/datagrid.html'):
def submitter_list(request, template_name='datagrid/datagrid.html'): """ Displays a list of all users. """ return SubmitterDataGrid(request).render_to_response(template_name)
6f4a0165391879a5d504e61e7331d7c6a1359d77 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/6f4a0165391879a5d504e61e7331d7c6a1359d77/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 387, 67, 1098, 12, 2293, 16, 1542, 67, 529, 2218, 266, 7061, 19, 3404, 22239, 18, 2620, 11, 4672, 3536, 9311, 87, 279, 666, 434, 777, 3677, 18, 3536, 327, 17320, 387, 751, 6313, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 387, 67, 1098, 12, 2293, 16, 1542, 67, 529, 2218, 266, 7061, 19, 3404, 22239, 18, 2620, 11, 4672, 3536, 9311, 87, 279, 666, 434, 777, 3677, 18, 3536, 327, 17320, 387, 751, 6313, ...
if g.isAbsolute():
if g.isAbsolute() or len(f.getPath()) == 0:
def join(path, *args): """Join two or more pathname components, inserting os.sep as needed""" f = File(path) for a in args: g = File(a) if g.isAbsolute(): f = g else: f = File(f, a) return f.getPath()
4cd1e3bba25d73bc04f43d775102b030d037637f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/4cd1e3bba25d73bc04f43d775102b030d037637f/javapath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 803, 16, 380, 1968, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 1140, 18, 10814, 487, 3577, 8395, 284, 273, 1387, 12, 803, 13, 364, 279, 316, 833, 30, 314, 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, 1233, 12, 803, 16, 380, 1968, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 1140, 18, 10814, 487, 3577, 8395, 284, 273, 1387, 12, 803, 13, 364, 279, 316, 833, 30, 314, 273,...
class GzipDecodedResponse(gzip.GzipFile):
class GzipDecodedResponse(gzip.GzipFile if gzip else object):
def gzip_decode(data): """gzip encoded data -> unencoded data Decode data using the gzip content encoding as described in RFC 1952 """ if not gzip: raise NotImplementedError f = BytesIO(data) gzf = gzip.GzipFile(mode="rb", fileobj=f) try: decoded = gzf.read() except IOError: raise ValueError("invalid data") f.close() gzf.close() return decoded
9ab0731f76cf685bb9d8cfa41951a0fe1ab8ab43 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/9ab0731f76cf685bb9d8cfa41951a0fe1ab8ab43/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10331, 67, 3922, 12, 892, 4672, 3536, 17380, 3749, 501, 317, 640, 10787, 501, 225, 6209, 501, 1450, 326, 10331, 913, 2688, 487, 11893, 316, 8372, 5342, 9401, 3536, 309, 486, 10331, 30, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10331, 67, 3922, 12, 892, 4672, 3536, 17380, 3749, 501, 317, 640, 10787, 501, 225, 6209, 501, 1450, 326, 10331, 913, 2688, 487, 11893, 316, 8372, 5342, 9401, 3536, 309, 486, 10331, 30, 1...
flight_pos = re.sub(".[tT][xX][tT]$",".kml", flight_log_name) match = re.match(".log$",flight_log_name)
flight_pos = re.sub("\.[tT][xX][tT]$",".kml", flight_log_name) match = re.match("\.log$",flight_log_name)
def create_kmz(flight_log_dir,flight_log_name): flight_log = os.path.join(flight_log_dir, flight_log_name) match = re.match(".[tT][xX][tT]$",flight_log_name) # match a .txt file if match : #flight telelemetry file must end in .txt or .TXT for this to work flight_pos = re.sub(".[tT][xX][tT]$",".kml", flight_log_name) match = re.match(".log$",flight_log_name) # match a .txt file if match : flight_pos = re.sub(".log",".kml", flight_log_name) else : flight_pos = re.sub("$",".kml", flight_log_name) flight_pos_kml = os.path.join(flight_log_dir, flight_pos) f = open(flight_log, 'r') f_pos = open(flight_pos_kml, 'w') roll = 0 # only used with ardustation roll pitch = 0 # only used with ardustation pitch line_no = 0 log_book = flight_log_book() for line in f : line_no += 1 log = telemetry() # Make a new empty log entry log_format = log.parse(line,line_no) if log_format == "Error" :# we had an error print "Error parsing telemetry line ",line_no continue # Go get the next line elif log_format == "F1" or log_format == "F2" or \ log_format == "ARDUSTATION!!!": # We have a normal telemetry line if debug : print "lat",log.latitude,"lon",log.longitude,"alt",log.altitude, \ "wp", log.waypointIndex, "rmat1", log.rmat1 if (log.latitude == 0 or log.longitude == 0 or log.altitude ==0 ): if debug: print "lat or long or alt is 0; ignoring line", line_no continue # Get next line of telemetry - can happen at boot time on plane else : # We have a good log entry - put it in the logbook. if log_format == "ARDUSTATION!!!" : log_book.ardustation_pos = "Recorded" log.roll = roll # add the last roll parsed from Ardustation +++ log.pitch = pitch # add the last pitch parsed from Ardustation +++ log_book.entries.append(log) elif log_format == "F4" : # We have a type of options.h line log_book.roll_stabilization = log.roll_stabilization log_book.pitch_stabilization = log.pitch_stabilization log_book.yaw_stabilization_rudder = log.yaw_stabilization_rudder log_book.yaw_stabilization_aileron = log.yaw_stabilization_aileron log_book.aileron_navigation = log.aileron_navigation log_book.rudder_navigation = log.rudder_navigation log_book.use_altitudehold = log.use_altitudehold log_book.racing_mode = log.racing_mode log_book.F4 = "Recorded" elif log_format == "F5" : # We have a type of options.h line log_book.yawkp_aileron = log.yawkp_aileron log_book.yawkd_aileron = log.yawkd_aileron log_book.rollkp = log.rollkp log_book.rollkd = log.rollkd log_book.aileron_boost = log.aileron_boost log_book.F5 = "Recorded" elif log_format == "F6" : # We have a type of options.h line log_book.pitchgain = log.pitchgain log_book.pitchkd = log.pitchkd log_book.rudder_elev_mix = log.rudder_elev_mix log_book.roll_elev_mix = log.roll_elev_mix log_book.elevator_boost = log.elevator_boost log_book.F6 = "Recorded" elif log_format == "F7" : # We have a type of options.h line log_book.yawkp_rudder = log.yawkp_rudder log_book.yawkd_rudder = log.yawkd_rudder log_book.rudder_boost = log.rudder_boost log_book.rtl_pitch_down = log.rtl_pitch_down log_book.F7 = "Recorded" elif log_format == "F8" : # We have a type of options.h line log_book.heightmax = log.heightmax log_book.heightmin = log.heightmin log_book.minimumthrottle = log.minimumthrottle log_book.maximumthrottle = log.maximumthrottle log_book.pitchatminthrottle = log.pitchatminthrottle log_book.pitchatmaxthrottle = log.pitchatmaxthrottle log_book.pitchatzerothrottle = log.pitchatzerothrottle log_book.F8 = "Recorded" elif log_format == "ARDUSTATION+++" : # Intermediate Ardustation line roll = log.roll pitch = log.pitch else : print "Parsed a line format - ,", log_format, \ "but don't know what to do with it." initial_points = 10 # no. log entries to find origin at start flight_origin = origin() flight_origin.average(initial_points,log_book) calculate_headings_pitch_roll(log_book) write_document_preamble(log_book,f_pos) write_flight_path(log_book,flight_origin,f_pos) write_flight_vectors(log_book,flight_origin,f_pos) write_document_postamble(log_book,f_pos) # create_simulated_dead_reckoning(log_book) # simulate new code for plane # to do dead reckoning. # write_simulated_paths(f_sim,log_book) # still to be written # Close up the open files f.close() f_pos.close() # Make up the KML files into KMZ file match = re.match(".[tT][xX][tT]$",flight_log_name) # match a .txt file if match : #flight telelemetry file must end in .txt or .TXT for this to work flight_kmz = re.sub(".[tT][xX][tT]$",".kmz", flight_log_name) match = re.match(".log$",line) # match a .txt file if match : flight_kmz = re.sub(".log",".kmz", flight_log_name) else : flight_kmz = re.sub("$",".kmz", flight_log_name) flight_kmz = re.sub(".[tT][xX][tT]$",".kmz", flight_log_name) flight_pos_kmz = os.path.join(flight_log_dir,flight_kmz) # Try to find a models directory nearby to add to zip files.... model_dir = [] model_dir.append(os.path.join(flight_log_dir,"models")) model_dir.append(os.path.join(os.getcwd(), "models")) if (os.access(os.path.join(model_dir[1],"waypoint.dae"),os.F_OK)) and \ (os.access(os.path.join(model_dir[1],"block_plane.dae"),os.F_OK)) and \ (os.access(os.path.join(model_dir[1],"arrow.dae"),os.F_OK)): dir_index = 1 else: print "Program currently needs the models directory (part of the Tools/uav_log_to_kml download)" print "to be placed, with it's internal file contents, in the directory containing" print "your flight telemetry. i.e. in the same directory as ", flight_log_name print "Exiting Program" exit(0) # We exit the program. Note that we did leave a kml file around waypoint_model = os.path.join("models","waypoint.dae") block_plane_model = os.path.join("models","block_plane.dae") arrow_model = os.path.join("models","arrow.dae") kmzfile = ZipFile(flight_pos_kmz, "w",ZIP_DEFLATED) # "a" to append, "r" to read kmzfile.write(flight_pos_kml) kmzfile.write(waypoint_model) kmzfile.write(block_plane_model) kmzfile.write(arrow_model) kmzfile.close() # Remove the temporary kml files, now we have the kmz file os.remove(flight_pos_kml) # Calculate Average wind speed - Experimental - not accurate # as really not enough points to sample from level flight - atleast # for the DIY Drones.com T3 Course. But left here for future analysis, # for example if we have air speed or a climb / dive performance model. # calc_average_wind_speed(log_book) # Create a graph of altitude ### write out a csv file enabling analysis in Excel or OpenOffice flight_csv = re.sub(".[tT][xX][tT]$",".csv", flight_log_name) flight_cos_csv = os.path.join(flight_log_dir, flight_csv) f_csv = open(flight_cos_csv, 'w') print >> f_csv, "Time (secs), Status, Lat, Lon,Waypoint, Altitude, COG, SOG, CPU, SVS, VDOP, HDOP" for entry in log_book.entries : print >> f_csv, entry.tm / 1000.0, ",", entry.status, "," , \ entry.latitude / 10000000.0, ",",entry.longitude / 10000000.0,",", \ entry.waypointIndex, ",", entry.altitude / 100.0 , "," , \ entry.cog / 100.0 , "," , entry.sog / 100.0,",", entry.cpu,",", entry.svs, \ ",", entry.vdop, ",", entry.hdop f_csv.close()
ffedcf48c142046974fd4ccb31a5aa8f25f4ddc5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6667/ffedcf48c142046974fd4ccb31a5aa8f25f4ddc5/uav_log_to_kml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 18353, 94, 12, 19131, 67, 1330, 67, 1214, 16, 19131, 67, 1330, 67, 529, 4672, 25187, 67, 1330, 273, 1140, 18, 803, 18, 5701, 12, 19131, 67, 1330, 67, 1214, 16, 25187, 67, 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, 752, 67, 18353, 94, 12, 19131, 67, 1330, 67, 1214, 16, 19131, 67, 1330, 67, 529, 4672, 25187, 67, 1330, 273, 1140, 18, 803, 18, 5701, 12, 19131, 67, 1330, 67, 1214, 16, 25187, 67, 13...
if DEBUG: logger.debug("...removing from trash (%s)", self.trash.getItemDisplayName().encode('ascii', 'replace'))
def add(self, item): """ Add an item to the collection. """ if DEBUG: logger.debug("Adding %s to %s...", item.getItemDisplayName().encode('ascii', 'replace'), self.getItemDisplayName().encode('ascii', 'replace')) self.inclusions.add(item)
ffbafa2c10bbb63bff531dba7da53521f8e95bf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ffbafa2c10bbb63bff531dba7da53521f8e95bf8/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 761, 4672, 3536, 1436, 392, 761, 358, 326, 1849, 18, 3536, 309, 6369, 30, 1194, 18, 4148, 2932, 13962, 738, 87, 358, 738, 87, 7070, 16, 761, 18, 588, 1180, 20524, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 761, 4672, 3536, 1436, 392, 761, 358, 326, 1849, 18, 3536, 309, 6369, 30, 1194, 18, 4148, 2932, 13962, 738, 87, 358, 738, 87, 7070, 16, 761, 18, 588, 1180, 20524, ...
command = 'tfreezer -r ' + self.username
command = 'tfreezer -d 3 -r ' + self.username global debug_level
def restore_external_tar(self): #CONNECT WITH THE SERVER if self.hostname == 'localhost': print _("Localhost external restoration not permitted to avoid loops") return roothome = pwd.getpwuid(0).pw_dir try: pkey = paramiko.DSSKey.from_private_key_file(roothome + '/'+ID_DSA_PATH,"") ssh = paramiko.SSHClient() try: ssh.load_system_host_keys(roothome + '/'+KNOWN_HOSTS_PATH) except Exception as e: debug("Exception " + e.type() + ": " + str(e), DEBUG_LOW) ssh.connect(self.hostname,int(self.port),pkey=pkey) except Exception as e: debug("Exception " + e.type() + ": " + str(e), DEBUG_LOW) print _("Can't connect to the server, please review your settings") return
c1fca65b2e188e83381632c559cb70bb9b3433f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6139/c1fca65b2e188e83381632c559cb70bb9b3433f6/TFuser_frozen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 9375, 67, 11718, 12, 2890, 4672, 468, 11032, 13601, 12786, 15061, 225, 309, 365, 18, 10358, 422, 296, 13014, 4278, 1172, 389, 2932, 2042, 2564, 3903, 3127, 22226, 486, 15498, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 9375, 67, 11718, 12, 2890, 4672, 468, 11032, 13601, 12786, 15061, 225, 309, 365, 18, 10358, 422, 296, 13014, 4278, 1172, 389, 2932, 2042, 2564, 3903, 3127, 22226, 486, 15498, 358...
self.assert_(msg.get_sequences() == ['unseen', 'flagged'])
self.assertEqual(msg.get_sequences(), ['unseen', 'flagged'])
def test_sequences(self): # Get, set, join, and leave sequences msg = mailbox.MHMessage(_sample_message) self.assertEqual(msg.get_sequences(), []) msg.set_sequences(['foobar']) self.assertEqual(msg.get_sequences(), ['foobar']) msg.set_sequences([]) self.assertEqual(msg.get_sequences(), []) msg.add_sequence('unseen') self.assertEqual(msg.get_sequences(), ['unseen']) msg.add_sequence('flagged') self.assert_(msg.get_sequences() == ['unseen', 'flagged']) msg.add_sequence('flagged') self.assert_(msg.get_sequences() == ['unseen', 'flagged']) msg.remove_sequence('unseen') self.assertEqual(msg.get_sequences(), ['flagged']) msg.add_sequence('foobar') self.assert_(msg.get_sequences() == ['flagged', 'foobar']) msg.remove_sequence('replied') self.assert_(msg.get_sequences() == ['flagged', 'foobar']) msg.set_sequences(['foobar', 'replied']) self.assert_(msg.get_sequences() == ['foobar', 'replied'])
7731c36bc6f787ca91b8429603fe004822f1f2d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7731c36bc6f787ca91b8429603fe004822f1f2d8/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17190, 12, 2890, 4672, 468, 968, 16, 444, 16, 1233, 16, 471, 8851, 8463, 1234, 273, 14187, 18, 49, 44, 1079, 24899, 6358, 67, 2150, 13, 365, 18, 11231, 5812, 12, 3576, 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, 1842, 67, 17190, 12, 2890, 4672, 468, 968, 16, 444, 16, 1233, 16, 471, 8851, 8463, 1234, 273, 14187, 18, 49, 44, 1079, 24899, 6358, 67, 2150, 13, 365, 18, 11231, 5812, 12, 3576, 18, ...
__version__))
__version__), dir=os.environ.get('CALIBRE_TEMP_DIR', None))
def base_dir(): global _base_dir if _base_dir is None: td = os.environ.get('CALIBRE_WORKER_TEMP_DIR', None) if td is not None: try: td = cPickle.loads(binascii.unhexlify(td)) except: td = None if td and os.path.exists(td): _base_dir = td else: _base_dir = tempfile.mkdtemp(prefix='%s_%s_tmp_'%(__appname__, __version__)) atexit.register(remove_dir, _base_dir) return _base_dir
60558691303d249328a025a8fb30a6c4e58910cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/60558691303d249328a025a8fb30a6c4e58910cf/ptempfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 1214, 13332, 2552, 389, 1969, 67, 1214, 309, 389, 1969, 67, 1214, 353, 599, 30, 6655, 273, 1140, 18, 28684, 18, 588, 2668, 7913, 13450, 862, 67, 10566, 654, 67, 10258, 67, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 1214, 13332, 2552, 389, 1969, 67, 1214, 309, 389, 1969, 67, 1214, 353, 599, 30, 6655, 273, 1140, 18, 28684, 18, 588, 2668, 7913, 13450, 862, 67, 10566, 654, 67, 10258, 67, 45...
context.move_to(pixxFM_left + 1, pixyFM_left + pixyFADEMARKER_HEIGHT - 1)
context.move_to(pixxFM_left + 1, pixyFM_left + self._PIXY_FADEMARKER_HEIGHT - 1)
def OnDraw(self, widget, event): """ This function blits the waveform data onto the screen, and then draws the play cursor over it. """ c = self.cachedDrawArea e = event.area #check if the expose area is within the already cached rectangle if e.x < c.x or (e.x + e.width > c.x + c.width) or self.redrawWaveform: self.DrawWaveform(event.area) # Get a cairo surface for this drawing op context = widget.window.cairo_create()
e365371eaeb7fba1c7c274012de019f596548adb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e365371eaeb7fba1c7c274012de019f596548adb/EventViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 6493, 12, 2890, 16, 3604, 16, 871, 4672, 3536, 1220, 445, 2811, 1282, 326, 31511, 501, 10170, 326, 5518, 16, 471, 1508, 30013, 326, 6599, 3347, 1879, 518, 18, 3536, 276, 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, 2755, 6493, 12, 2890, 16, 3604, 16, 871, 4672, 3536, 1220, 445, 2811, 1282, 326, 31511, 501, 10170, 326, 5518, 16, 471, 1508, 30013, 326, 6599, 3347, 1879, 518, 18, 3536, 276, 273, 365, ...
eval("%s(%s)" % (colType.__name__, header[col])) except:
colType(header[col]) except ValueError, TypeError:
def seval(item): """ Strips parens from item prior to calling eval in an attempt to make it safer """ return eval(item.replace('(', '').replace(')', ''))
6ea653a6b2a8bbfc133116d87ed74132f74ed63f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6ea653a6b2a8bbfc133116d87ed74132f74ed63f/csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 695, 1125, 12, 1726, 4672, 3536, 3978, 7146, 30821, 628, 761, 6432, 358, 4440, 5302, 316, 392, 4395, 358, 1221, 518, 7864, 586, 3536, 327, 5302, 12, 1726, 18, 2079, 2668, 12, 2187, 875, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 695, 1125, 12, 1726, 4672, 3536, 3978, 7146, 30821, 628, 761, 6432, 358, 4440, 5302, 316, 392, 4395, 358, 1221, 518, 7864, 586, 3536, 327, 5302, 12, 1726, 18, 2079, 2668, 12, 2187, 875, ...
errorWindow(_(callback(e)))
errorWindow(callback(e))
def handle_gui_exception(e, callback, logMsg = None, showMsg = True): if logMsg: log.error(logMsg) log.exception(e) if showMsg: if isinstance(e, socket_error): errorWindow(_('network error, unable to connect to server')) elif isinstance(e, SSL.SSLError): errorWindow(_('Unable to verify server\'s identity: %s' % str(e))) elif isinstance(e, connection.RestlibException): errorWindow(callback % linkify(e.msg)) else: if hasattr(callback, '__call__'): errorWindow(_(callback(e))) else: errorWindow(_(callback)) #just a string return False
03630209bf66698f2290e925c11809c0bbbe676b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/03630209bf66698f2290e925c11809c0bbbe676b/managergui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 20292, 67, 4064, 12, 73, 16, 1348, 16, 613, 3332, 273, 599, 16, 2405, 3332, 273, 1053, 4672, 309, 613, 3332, 30, 613, 18, 1636, 12, 1330, 3332, 13, 613, 18, 4064, 12, 73, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 20292, 67, 4064, 12, 73, 16, 1348, 16, 613, 3332, 273, 599, 16, 2405, 3332, 273, 1053, 4672, 309, 613, 3332, 30, 613, 18, 1636, 12, 1330, 3332, 13, 613, 18, 4064, 12, 73, ...
PACKAGE_BLOCK = LCURL + ZeroOrMore( IMPORT_DEFINITION ^ BASE_BLOCK ^ CLASS_DEFINITION ^ INTERFACE_DEFINITION) + RCURL PACKAGE_DEFINITION = PACKAGE + Optional( QUALIFIED_IDENTIFIER ) + PACKAGE_BLOCK PROGRAM = ZeroOrMore( COMMENTS ^ PACKAGE_DEFINITION )
PACKAGE_BLOCK = LCURL + ZeroOrMore( IMPORT_DEFINITION ^ BASE_BLOCK ) + (CLASS_DEFINITION ^ INTERFACE_DEFINITION) + RCURL PACKAGE_DEFINITION = (PACKAGE + Optional( QUALIFIED_IDENTIFIER("name") ) ).setParseAction(parseASPackage) + PACKAGE_BLOCK PROGRAM = ZeroOrMore( COMMENTS ) + PACKAGE_DEFINITION
def locate(pattern, root=os.getcwd()): for path, dirs, files in os.walk(root): for filename in [os.path.abspath(os.path.join(path, filename)) for filename in files if fnmatch.fnmatch(filename, pattern)]: yield filename
bb9f063b2a1938147bc2fabe31d90194b87492bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/886/bb9f063b2a1938147bc2fabe31d90194b87492bf/asGrammar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10627, 12, 4951, 16, 1365, 33, 538, 18, 588, 11089, 1435, 4672, 364, 589, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 4672, 364, 1544, 316, 306, 538, 18, 803, 18, 5113, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10627, 12, 4951, 16, 1365, 33, 538, 18, 588, 11089, 1435, 4672, 364, 589, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 4672, 364, 1544, 316, 306, 538, 18, 803, 18, 5113, 803, ...
print( '%s\t%s' % (domain_to_scan, ifcmgkernel_scan_url( domain_to_scan ) ) )
print( '%s\t%s' % (ifcmgkernel_scan_url( domain_to_scan ), domain_to_scan ) )
def spider_on_url( domain_to_scan, pages_to_scan, verbose ): if pages_to_scan == 0: print( '%s\t%s' % (domain_to_scan, ifcmgkernel_scan_url( domain_to_scan ) ) ) else: s = Spider(domain_to_scan, pages_to_scan ) while s.done == False: r = s.run() if r is not None: if verbose: print r else: print '%d\t%s' % ( r.category, r.link ) s.close()
7811a32811f22745ac5347d81f5f408e49452c94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4021/7811a32811f22745ac5347d81f5f408e49452c94/ifcmgtool_spider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28022, 67, 265, 67, 718, 12, 2461, 67, 869, 67, 9871, 16, 4689, 67, 869, 67, 9871, 16, 3988, 262, 30, 309, 4689, 67, 869, 67, 9871, 422, 374, 30, 1172, 12, 1995, 87, 64, 88, 9, 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, 28022, 67, 265, 67, 718, 12, 2461, 67, 869, 67, 9871, 16, 4689, 67, 869, 67, 9871, 16, 3988, 262, 30, 309, 4689, 67, 869, 67, 9871, 422, 374, 30, 1172, 12, 1995, 87, 64, 88, 9, 8...
return self.cursor.execute("SELECT MAX(ROWID) FROM %s" % self.dbtablename).fetchone()[0]
self.cursor.execute("SELECT MAX(ROWID) FROM %s" % self.dbtablename) return self.cursor.fetchone()[0]
def maxrowid(self): return self.cursor.execute("SELECT MAX(ROWID) FROM %s" % self.dbtablename).fetchone()[0]
b8545b74150cfe31e029f12509877cab82e33719 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/b8545b74150cfe31e029f12509877cab82e33719/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 492, 350, 12, 2890, 4672, 327, 365, 18, 9216, 18, 8837, 2932, 4803, 4552, 12, 11226, 734, 13, 4571, 738, 87, 6, 738, 365, 18, 1966, 7032, 14724, 2934, 5754, 476, 1435, 63, 20, 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, 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, 943, 492, 350, 12, 2890, 4672, 327, 365, 18, 9216, 18, 8837, 2932, 4803, 4552, 12, 11226, 734, 13, 4571, 738, 87, 6, 738, 365, 18, 1966, 7032, 14724, 2934, 5754, 476, 1435, 63, 20, 6...
""" % ("LK%d (%s)" % (idx, k['key']), k['desc'], authors)
""" % ("LK%d (%s)" % (idx, k['key']), authors, k['desc'])
def gencode(k): idx = k['idx'] df = codepat % idx print "Generating %s..." % df f = file(df,'w') print >>f, """
7eb95f11b60100968c8a402cf6878cdc6303147c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3118/7eb95f11b60100968c8a402cf6878cdc6303147c/ll-generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 3015, 12, 79, 4672, 2067, 273, 417, 3292, 3465, 3546, 3013, 273, 981, 16330, 738, 2067, 1172, 315, 21755, 738, 87, 7070, 738, 3013, 284, 273, 585, 12, 2180, 11189, 91, 6134, 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, 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, 314, 3015, 12, 79, 4672, 2067, 273, 417, 3292, 3465, 3546, 3013, 273, 981, 16330, 738, 2067, 1172, 315, 21755, 738, 87, 7070, 738, 3013, 284, 273, 585, 12, 2180, 11189, 91, 6134, 1172, ...
if default!=None and str(default) != 'django.db.models.fields.NOT_PROVIDED': output.extend( self.get_add_column_sql( table_name, col_name, col_type, True, unique, primary_key, default ) ) output.extend( [ self.style.SQL_KEYWORD('UPDATE'), self.style.SQL_TABLE(self.connection.ops.quote_name(table_name)), self.style.SQL_KEYWORD('SET'), self.style.SQL_FIELD(self.connection.ops.quote_name(col_name)), '=', self.quote_value(default) ], self.style.SQL_KEYWORD('WHERE'), self.style.SQL_FIELD(self.connection.ops.quote_name(col_name)), self.style.SQL_KEYWORD('IS NULL'), ) output.extend( get_change_column_def_sql( self, table_name, col_name, col_type, None, None ) ) return output
if default==None or str(default) == 'django.db.models.fields.NOT_PROVIDED': default = '' output.extend( self.get_add_column_sql( table_name, col_name, col_type, True, unique, primary_key, default ) ) output.append( ' '.join( [ self.style.SQL_KEYWORD('UPDATE'), self.style.SQL_TABLE(self.connection.ops.quote_name(table_name)), self.style.SQL_KEYWORD('SET'), self.style.SQL_FIELD(self.connection.ops.quote_name(col_name)), '=', self.quote_value(default) , self.style.SQL_KEYWORD('WHERE'), self.style.SQL_FIELD(self.connection.ops.quote_name(col_name)), self.style.SQL_KEYWORD('IS NULL'), ';' ] ) ) output.extend( self.get_change_column_def_sql( table_name, col_name, col_type, None, None, None, {'update_null': True} ) ) return output
def get_add_column_sql( self, table_name, col_name, col_type, null, unique, primary_key, f_default ): output = [] field_output = [] if not null: if default!=None and str(default) != 'django.db.models.fields.NOT_PROVIDED': # since we can't add a null column and then change it after we've set all the default values, # add a null column, set it's default values, then replace the whole table via get_change_column_def_sql output.extend( self.get_add_column_sql( table_name, col_name, col_type, True, unique, primary_key, default ) ) output.extend( [ self.style.SQL_KEYWORD('UPDATE'), self.style.SQL_TABLE(self.connection.ops.quote_name(table_name)), self.style.SQL_KEYWORD('SET'), self.style.SQL_FIELD(self.connection.ops.quote_name(col_name)), '=', self.quote_value(default) ], self.style.SQL_KEYWORD('WHERE'), self.style.SQL_FIELD(self.connection.ops.quote_name(col_name)), self.style.SQL_KEYWORD('IS NULL'), ) output.extend( get_change_column_def_sql( self, table_name, col_name, col_type, None, None ) ) return output field_output.append(self.style.SQL_KEYWORD('ALTER TABLE')) field_output.append(self.style.SQL_TABLE(self.connection.ops.quote_name(table_name))) field_output.append(self.style.SQL_KEYWORD('ADD COLUMN')) field_output.append(self.style.SQL_FIELD(self.connection.ops.quote_name(col_name))) field_output.append(col_type) field_output.append(kw('%sNULL' % (not null and 'NOT ' or ''))) if unique or primary_key: field_output.append(kw('UNIQUE')) if primary_key: field_output.append((self.style.SQL_KEYWORD('PRIMARY KEY'))) output.append(' '.join(field_output) + ';') return output
752a5180af1947be683ecae3a679becba2f396b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8472/752a5180af1947be683ecae3a679becba2f396b1/sqlite3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1289, 67, 2827, 67, 4669, 12, 365, 16, 1014, 67, 529, 16, 645, 67, 529, 16, 645, 67, 723, 16, 446, 16, 3089, 16, 3354, 67, 856, 16, 284, 67, 1886, 262, 30, 876, 273, 537...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 2827, 67, 4669, 12, 365, 16, 1014, 67, 529, 16, 645, 67, 529, 16, 645, 67, 723, 16, 446, 16, 3089, 16, 3354, 67, 856, 16, 284, 67, 1886, 262, 30, 876, 273, 537...
for i in range(len(document.body)): document.body[i] = document.body[i].replace('\\newpage', '\\begin_inset Newpage newpage\n\\end_inset') document.body[i] = document.body[i].replace('\\pagebreak', '\\begin_inset Newpage pagebreak\n\\end_inset') document.body[i] = document.body[i].replace('\\clearpage', '\\begin_inset Newpage clearpage\n\\end_inset') document.body[i] = document.body[i].replace('\\cleardoublepage', '\\begin_inset Newpage cleardoublepage\n\\end_inset')
i = 0 while True: i = find_token(document.body, '\\newpage', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage newpage', '\\end_inset'] i = 0 while True: i = find_token(document.body, '\\pagebreak', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage pagebreak', '\\end_inset'] i = 0 while True: i = find_token(document.body, '\\clearpage', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage clearpage', '\\end_inset'] i = 0 while True: i = find_token(document.body, '\\cleardoublepage', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage cleardoublepage', '\\end_inset']
def convert_pagebreaks(document): ' Convert inline Newpage insets to new format ' for i in range(len(document.body)): document.body[i] = document.body[i].replace('\\newpage', '\\begin_inset Newpage newpage\n\\end_inset') document.body[i] = document.body[i].replace('\\pagebreak', '\\begin_inset Newpage pagebreak\n\\end_inset') document.body[i] = document.body[i].replace('\\clearpage', '\\begin_inset Newpage clearpage\n\\end_inset') document.body[i] = document.body[i].replace('\\cleardoublepage', '\\begin_inset Newpage cleardoublepage\n\\end_inset')
e8ffafef998e17f0024b9646dc6adfde3af7ce03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/e8ffafef998e17f0024b9646dc6adfde3af7ce03/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 2433, 29292, 12, 5457, 4672, 296, 4037, 6370, 1166, 2433, 23576, 358, 394, 740, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 3718, 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, 1765, 67, 2433, 29292, 12, 5457, 4672, 296, 4037, 6370, 1166, 2433, 23576, 358, 394, 740, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 3718, 27...
cmd = Popen(run, shell=True, universal_newlines=True,
shell = platform.system() == 'Windows' cmd = Popen(run, shell=shell, universal_newlines=True,
def _compile(self, debug=False): run = ['sass', '-C', '-t', 'expanded', '-E', 'utf-8'] if debug: run.append('--line-numbers') if SASS_DEBUG_INFO: run.append('--debug-info') run.extend(self.path_args) cmd = Popen(run, shell=True, universal_newlines=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) output, error = cmd.communicate('@import %s' % self.main_module) assert cmd.wait() == 0, 'Command returned bad result:\n%s' % error return output
3d924e0f5eae548af5cf2552e16c5da038ff31f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11828/3d924e0f5eae548af5cf2552e16c5da038ff31f2/sass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 12, 2890, 16, 1198, 33, 8381, 4672, 1086, 273, 10228, 87, 428, 2187, 2400, 39, 2187, 2400, 88, 2187, 296, 17336, 2187, 2400, 41, 2187, 296, 3158, 17, 28, 3546, 309, 1198, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 12, 2890, 16, 1198, 33, 8381, 4672, 1086, 273, 10228, 87, 428, 2187, 2400, 39, 2187, 2400, 88, 2187, 296, 17336, 2187, 2400, 41, 2187, 296, 3158, 17, 28, 3546, 309, 1198, 3...
self.args['command'].append("port=%s"%(self.args['port']))
self.args['command'].append("port=%s"%(self.args['port'])) if self.args['netport']: self.args['command'].append("net_port=%s"%(self.args['netport']))
def start(self): self.args['command']=["make","drop-db"] if self.args['dbname']: self.args['command'].append("database=%s"%(self.args['dbname'])) if self.args['port']: self.args['command'].append("port=%s"%(self.args['port'])) cmd = LoggedRemoteCommand("shell",self.args) self.startCommand(cmd)
b7db641b141dca8b63d6ec23f4f477a0d6c864a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/b7db641b141dca8b63d6ec23f4f477a0d6c864a3/buildstep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 1968, 3292, 3076, 3546, 33, 9614, 6540, 15937, 7285, 17, 1966, 11929, 309, 365, 18, 1968, 3292, 20979, 3546, 30, 365, 18, 1968, 3292, 3076, 29489, 6923, 293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 1968, 3292, 3076, 3546, 33, 9614, 6540, 15937, 7285, 17, 1966, 11929, 309, 365, 18, 1968, 3292, 20979, 3546, 30, 365, 18, 1968, 3292, 3076, 29489, 6923, 293...
arch.set_promisc(self.ins, i, 0)
set_promisc(self.ins, i, 0)
def close(self): if self.closed: return self.closed=1 if self.promisc: for i in self.iff: arch.set_promisc(self.ins, i, 0) SuperSocket.close(self)
14c74c45cca1c3048391b67bd41fd3df4f699bde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/14c74c45cca1c3048391b67bd41fd3df4f699bde/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 12204, 30, 327, 365, 18, 12204, 33, 21, 309, 365, 18, 17401, 291, 71, 30, 364, 277, 316, 365, 18, 3048, 30, 444, 67, 17401, 291, 71, 12, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 12204, 30, 327, 365, 18, 12204, 33, 21, 309, 365, 18, 17401, 291, 71, 30, 364, 277, 316, 365, 18, 3048, 30, 444, 67, 17401, 291, 71, 12, 2890, 1...
walname = self.last_restart_point(srcname)
if lstname == None: lstname = self.last_restart_point(srcname) self.log.debug("calculated restart point: %s" % lstname) else: self.log.debug("using supplied restart point: %s" % lstname)
def slave_xrestore_unsafe(self, srcname, dstpath, parent_pid): srcdir = self.cf.get("completed_wals") partdir = self.cf.get("partial_wals") pausefile = os.path.join(srcdir, "PAUSE") stopfile = os.path.join(srcdir, "STOP") prgrfile = os.path.join(srcdir, "PROGRESS") srcfile = os.path.join(srcdir, srcname) partfile = os.path.join(partdir, srcname)
5c30a274a6945a32dc53e7725ba74053bda74e5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14597/5c30a274a6945a32dc53e7725ba74053bda74e5e/walmgr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11735, 67, 92, 13991, 67, 318, 4626, 12, 2890, 16, 1705, 529, 16, 3046, 803, 16, 982, 67, 6610, 4672, 1705, 1214, 273, 365, 18, 8522, 18, 588, 2932, 13615, 67, 91, 1031, 7923, 1087, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11735, 67, 92, 13991, 67, 318, 4626, 12, 2890, 16, 1705, 529, 16, 3046, 803, 16, 982, 67, 6610, 4672, 1705, 1214, 273, 365, 18, 8522, 18, 588, 2932, 13615, 67, 91, 1031, 7923, 1087, ...
if 0 and isinstance(mod, model.Module) and fromname in mod.contents:
if isinstance(mod, model.Module) and fromname in mod.contents:
def visitFrom(self, node): modname = self.builder.expandModname(node.modname) name2fullname = self.builder.current._name2fullname for fromname, asname in node.names: if fromname == '*': self.builder.warning("import *", modname) if modname not in self.system.allobjects: return mod = self.system.allobjects[modname] if isinstance(mod, model.Package): self.builder.warning("import * from a package", modname) return assert mod.processed if mod.all is not None: names = mod.all else: names = [k for k in mod.contents.keys() if not k.startswith('_')] for n in names: name2fullname[n] = modname + '.' + n return if asname is None: asname = fromname if isinstance(self.builder.current, model.Module) and \ self.builder.current.all is not None and \ asname in self.builder.current.all and \ modname in self.system.allobjects: mod = self.system.allobjects[modname] if 0 and isinstance(mod, model.Module) and fromname in mod.contents: print 'moving', mod.contents[fromname], 'into', self.builder.current # this code attempts to preserve "rather a lot" of # invariants assumed by various bits of pydoctor and that # are of course not written down anywhere :/ ob = mod.contents[fromname] targetmod = self.builder.current del self.system.allobjects[ob.fullName()] ob.parent = ob.parentMod = targetmod ob.prefix = targetmod.fullName() + '.' ob.name = asname self.system.allobjects[ob.fullName()] = ob del mod.contents[fromname] mod.orderedcontents.remove(ob) mod._name2fullname[fromname] = ob.fullName() targetmod.contents[asname] = ob targetmod.orderedcontents.append(ob) else: name2fullname[asname] = modname + '.' + fromname
9bb3a6288d25e47112367fa143fd703418bbf415 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5471/9bb3a6288d25e47112367fa143fd703418bbf415/astbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 1265, 12, 2890, 16, 756, 4672, 16037, 273, 365, 18, 9574, 18, 12320, 1739, 529, 12, 2159, 18, 1711, 529, 13, 508, 22, 21885, 273, 365, 18, 9574, 18, 2972, 6315, 529, 22, 21885, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 1265, 12, 2890, 16, 756, 4672, 16037, 273, 365, 18, 9574, 18, 12320, 1739, 529, 12, 2159, 18, 1711, 529, 13, 508, 22, 21885, 273, 365, 18, 9574, 18, 2972, 6315, 529, 22, 21885, ...
tokentype, token, start, end, line = g.next()
tokentype, token = g.next()[0:2]
def _getname(g): # Helper to get a dotted name, return a pair (name, token) where # name is the dotted name, or None if there was no dotted name, # and token is the next input token. parts = [] tokentype, token, start, end, line = g.next() if tokentype != NAME and token != '*': return (None, token) parts.append(token) while True: tokentype, token, start, end, line = g.next() if token != '.': break tokentype, token, start, end, line = g.next() if tokentype != NAME: break parts.append(token) return (".".join(parts), token)
63d2bd0c0f14b0ec86d5455858d3bf941cb273f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/63d2bd0c0f14b0ec86d5455858d3bf941cb273f5/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 529, 12, 75, 4672, 468, 9705, 358, 336, 279, 20965, 508, 16, 327, 279, 3082, 261, 529, 16, 1147, 13, 1625, 468, 508, 353, 326, 20965, 508, 16, 578, 599, 309, 1915, 1703, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 529, 12, 75, 4672, 468, 9705, 358, 336, 279, 20965, 508, 16, 327, 279, 3082, 261, 529, 16, 1147, 13, 1625, 468, 508, 353, 326, 20965, 508, 16, 578, 599, 309, 1915, 1703, 11...
"""
"""
def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg:
e3cd823031c382369be6fdc654dc96aea91a478c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e3cd823031c382369be6fdc654dc96aea91a478c/mrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 9200, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 3536, 632, 891, 365, 30, 1021, 733, 4407, 18, 632, 891, 4422, 30, 432, 2063, 334...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3624, 67, 9200, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 3536, 632, 891, 365, 30, 1021, 733, 4407, 18, 632, 891, 4422, 30, 432, 2063, 334...
class SessionGenerator(Asynchronizer, Exceptionable):
class SessionGenerator(_Asynchronizer, _Exceptionable):
def __checkResponseStatus(self, xml_dom): """Checks the response for errors and raises one if any exists.""" doc = xml_dom e = doc.getElementsByTagName('lfm')[0] if e.getAttribute('status') == STATUS_OK: return STATUS_OK else: e = doc.getElementsByTagName('error')[0] status = e.getAttribute('code') details = e.firstChild.data.strip() self._report_error(ServiceException(status, details))
903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 1064, 1482, 12, 2890, 16, 2025, 67, 9859, 4672, 3536, 4081, 326, 766, 364, 1334, 471, 14183, 1245, 309, 1281, 1704, 12123, 225, 997, 273, 2025, 67, 9859, 425, 273, 997, 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, 1893, 1064, 1482, 12, 2890, 16, 2025, 67, 9859, 4672, 3536, 4081, 326, 766, 364, 1334, 471, 14183, 1245, 309, 1281, 1704, 12123, 225, 997, 273, 2025, 67, 9859, 425, 273, 997, 18, ...
_fl_addto_selected_xevent = cfuncproto(so_libforms, "fl_addto_selected_xevent", cty.c_long, [Window, cty.c_long],
_fl_addto_selected_xevent = cfuncproto(so_libforms, "fl_addto_selected_xevent", cty.c_long, [Window, cty.c_long],
def fl_set_idle_callback(py_callback, user_data): """ fl_set_idle_callback(py_callback, user_data) -> event callback """ c_callback = FL_APPEVENT_CB(py_callback) _cfunc_refs[get_rand_dictkey()] = c_callback retval = _fl_set_idle_callback(c_callback, user_data) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 20390, 67, 3394, 12, 2074, 67, 3394, 16, 729, 67, 892, 4672, 3536, 1183, 67, 542, 67, 20390, 67, 3394, 12, 2074, 67, 3394, 16, 729, 67, 892, 13, 317, 871, 1348, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 20390, 67, 3394, 12, 2074, 67, 3394, 16, 729, 67, 892, 4672, 3536, 1183, 67, 542, 67, 20390, 67, 3394, 12, 2074, 67, 3394, 16, 729, 67, 892, 13, 317, 871, 1348, ...
def _err(f):
def _err(fail):
def _err(f): f.close() os.unlink(tmpfile.path) return f
aa24aef849a0b055d35c79338e0d3deb78d86971 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13646/aa24aef849a0b055d35c79338e0d3deb78d86971/services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 370, 12, 6870, 4672, 284, 18, 4412, 1435, 1140, 18, 318, 1232, 12, 5645, 768, 18, 803, 13, 327, 284, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 370, 12, 6870, 4672, 284, 18, 4412, 1435, 1140, 18, 318, 1232, 12, 5645, 768, 18, 803, 13, 327, 284, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
res = self.checkArgumentFormat(path)
res = self.checkArgumentFormat( path )
def getFile(self,path,localPath=False): """ Get a local copy in the current directory of a physical file specified by its path """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value']
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 803, 16, 3729, 743, 33, 8381, 4672, 3536, 968, 279, 1191, 1610, 316, 326, 783, 1867, 434, 279, 11640, 585, 1269, 635, 2097, 589, 3536, 400, 273, 365, 18, 1893, 1379...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 803, 16, 3729, 743, 33, 8381, 4672, 3536, 968, 279, 1191, 1610, 316, 326, 783, 1867, 434, 279, 11640, 585, 1269, 635, 2097, 589, 3536, 400, 273, 365, 18, 1893, 1379...
b.pack(side = TOP)
b.pack(side=TOP)
def build_tools(self): tframe = self.tframe canvas = self.canvas fr=TFrame(tframe, style='FlatFrame', borderwidth=12) fr.pack(side = TOP, fill = X) label = TLabel(fr, style='FlatLabel') label.pack(side = TOP, fill = X) label = TLabel(tframe, style='HLine') label.pack(side = TOP, fill = X)
5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 6642, 12, 2890, 4672, 3253, 1474, 273, 365, 18, 88, 3789, 5953, 273, 365, 18, 15424, 225, 3812, 33, 56, 3219, 12, 88, 3789, 16, 2154, 2218, 16384, 3219, 2187, 5795, 2819, 33,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 6642, 12, 2890, 4672, 3253, 1474, 273, 365, 18, 88, 3789, 5953, 273, 365, 18, 15424, 225, 3812, 33, 56, 3219, 12, 88, 3789, 16, 2154, 2218, 16384, 3219, 2187, 5795, 2819, 33,...
'''
"""
def view_check(self): ''' Raise the Unauthorised exception if the user's not permitted to view this class. ''' if not self.is_view_ok(): raise Unauthorised("view", self._classname, translator=self._client.translator)
16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 1893, 12, 2890, 4672, 3536, 20539, 326, 1351, 4161, 5918, 1520, 309, 326, 729, 1807, 486, 15498, 358, 1476, 333, 667, 18, 3536, 309, 486, 365, 18, 291, 67, 1945, 67, 601, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 1893, 12, 2890, 4672, 3536, 20539, 326, 1351, 4161, 5918, 1520, 309, 326, 729, 1807, 486, 15498, 358, 1476, 333, 667, 18, 3536, 309, 486, 365, 18, 291, 67, 1945, 67, 601, 133...
'wrapper': ConditionalTalesModifier,
'wrapper': ConditionalModifier,
def afterRetrieveModifier(self, obj, repo_clone, preserve=()): """If we find any LargeFilePlaceHolders, replace them with the values from the current working copy. If the values are missing from the working copy, remove them from the retrieved object.""" # Search for fields stored via AnnotationStorage annotations = getattr(obj, '__annotations__', None) orig_annotations = getattr(repo_clone, '__annotations__', None) for storage, name, orig_val in self._getFieldValues(repo_clone): if isinstance(orig_val, LargeFilePlaceHolder): if storage == 'annotation': val = _empty_marker if annotations is not None: val = annotations.get(name, _empty_marker) if val is not _empty_marker: orig_annotations[name] = val else: # remove the annotation if not present on the # working copy, or if annotations are missing # entirely del orig_annotations[name] else: # attribute storage val = getattr(obj, name, _empty_marker) if val is not _empty_marker: setattr(repo_clone, name, val) else: delattr(repo_clone, name) return [], [], {}
b94a74b17dc5f9c6f32e3160f727174152d8b0a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11952/b94a74b17dc5f9c6f32e3160f727174152d8b0a2/StandardModifiers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 5767, 9829, 12, 2890, 16, 1081, 16, 3538, 67, 14056, 16, 9420, 33, 1435, 4672, 3536, 2047, 732, 1104, 1281, 16236, 908, 812, 6029, 27003, 16, 1453, 2182, 598, 326, 924, 628, 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, 1839, 5767, 9829, 12, 2890, 16, 1081, 16, 3538, 67, 14056, 16, 9420, 33, 1435, 4672, 3536, 2047, 732, 1104, 1281, 16236, 908, 812, 6029, 27003, 16, 1453, 2182, 598, 326, 924, 628, 326, ...
sent_to_link += '<a href="write?msg_to=%s&amp;ln=%s">%s</a>'% (to, ln, to_display)
sent_to_link += '<a href="write?msg_to=%s&amp;ln=%s">%s</a>'% (to, ln, cgi.escape(to_display))
def tmpl_display_msg(self, msg_id="", msg_from_id="", msg_from_nickname="", msg_sent_to="", msg_sent_to_group="", msg_subject="", msg_body="", msg_sent_date="", msg_received_date=datetext_default, ln=cdslang): """ Displays a given message @param msg_id: id of the message @param msg_from_id: id of user who sent the message @param msg_from_nickname: nickname of the user who sent the message @param msg_sent_to: list of users who received the message (comma separated string) @param msg_sent_to_group: list of groups who received the message (comma separated string) @param msg_subject: subject of the message @param msg_body: body of the message @param msg_sent_date: date at which the message was sent @param msg_received_date: date at which the message had to be received (if this argument != 0000-00-00 => reminder @param ln: language of the page @return the message in HTML format """
a8deb2f53ded0267fd0976f6b7e5c5db401c5b0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2876/a8deb2f53ded0267fd0976f6b7e5c5db401c5b0b/webmessage_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 5417, 67, 3576, 12, 2890, 16, 1234, 67, 350, 1546, 3113, 1234, 67, 2080, 67, 350, 1546, 3113, 1234, 67, 2080, 67, 17091, 529, 1546, 3113, 1234, 67, 7569, 67, 869, 1546, 3113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 5417, 67, 3576, 12, 2890, 16, 1234, 67, 350, 1546, 3113, 1234, 67, 2080, 67, 350, 1546, 3113, 1234, 67, 2080, 67, 17091, 529, 1546, 3113, 1234, 67, 7569, 67, 869, 1546, 3113...
anAttribute = self.theSimulator.getEntityPropertyAttributes(aFullPN)
anAttributeList = self.theSimulator.getEntityPropertyAttributes(aFullPN)
def __savePropertyList( self, anEml, anEntityTypeString,\ aSystemPath, anIDList ):
1f2e57fcdcd8feb5954a80e9c7fd9ef6f5107f67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/1f2e57fcdcd8feb5954a80e9c7fd9ef6f5107f67/Session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5688, 1396, 682, 12, 365, 16, 392, 41, 781, 16, 392, 22562, 780, 17211, 279, 3163, 743, 16, 392, 24583, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5688, 1396, 682, 12, 365, 16, 392, 41, 781, 16, 392, 22562, 780, 17211, 279, 3163, 743, 16, 392, 24583, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS)
sub_key = OpenKey(key, subkeystr, 0, KEY_ALL_ACCESS)
def DeleteTestData(self, root_key): key = OpenKey(root_key, test_key_name, 0, KEY_ALL_ACCESS) sub_key = OpenKey(key, "sub_key", 0, KEY_ALL_ACCESS) # It is not necessary to delete the values before deleting # the key (although subkeys must not exist). We delete them # manually just to prove we can :-) for value_name, value_data, value_type in test_data: DeleteValue(sub_key, value_name)
f82d9b52fae475a132a21d1b7174730f17b735de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/f82d9b52fae475a132a21d1b7174730f17b735de/test_winreg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2504, 4709, 751, 12, 2890, 16, 1365, 67, 856, 4672, 498, 273, 3502, 653, 12, 3085, 67, 856, 16, 1842, 67, 856, 67, 529, 16, 374, 16, 5311, 67, 4685, 67, 13204, 13, 720, 67, 856, 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, 2504, 4709, 751, 12, 2890, 16, 1365, 67, 856, 4672, 498, 273, 3502, 653, 12, 3085, 67, 856, 16, 1842, 67, 856, 67, 529, 16, 374, 16, 5311, 67, 4685, 67, 13204, 13, 720, 67, 856, 27...
self.dragState.HandleDragEnd(runHandler=False) self.dragState = None
def OnMouseEvent(self, event): """ Handles mouse events, calls overridable methods related to: 1. Selecting an item 2. Dragging/moving an item 3. Resizing an item """ # ignore entering and leaving events if (event.Entering() or event.Leaving()): event.Skip() return
90692531d20746f1b2f4c14b6b5de2355c7412cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/90692531d20746f1b2f4c14b6b5de2355c7412cd/CollectionCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9186, 1133, 12, 2890, 16, 871, 4672, 3536, 27020, 7644, 2641, 16, 4097, 5713, 27621, 2590, 3746, 358, 30, 404, 18, 6766, 310, 392, 761, 576, 18, 28425, 1998, 19, 81, 13767, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9186, 1133, 12, 2890, 16, 871, 4672, 3536, 27020, 7644, 2641, 16, 4097, 5713, 27621, 2590, 3746, 358, 30, 404, 18, 6766, 310, 392, 761, 576, 18, 28425, 1998, 19, 81, 13767, 392, ...
print sys.stderr, "WARNING: PPrinter bug. Is theano ticket
def __call__(self, *args): print sys.stderr, "WARNING: PPrinter bug. Is theano ticket #249 fixed yet?" if len(args) == 1: return self.process(*args) elif len(args) == 2 and isinstance(args[1], (PrinterState, dict)): return self.process(*args) elif len(args) > 2: return self.process_graph(*args) else: raise TypeError('Not enough arguments to call.')
c0b770a152441710858c6e5a17d44c09de724fd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/c0b770a152441710858c6e5a17d44c09de724fd4/printing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 468, 3247, 29, 5499, 4671, 7225, 309, 562, 12, 1968, 13, 422, 404, 30, 327, 365, 18, 2567, 30857, 1968, 13, 1327, 562, 12, 1968, 13, 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, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 468, 3247, 29, 5499, 4671, 7225, 309, 562, 12, 1968, 13, 422, 404, 30, 327, 365, 18, 2567, 30857, 1968, 13, 1327, 562, 12, 1968, 13, 4...
- ``k`` -- an integer - ``prec`` -- (default: 10) a positive integer - ``cusp_only`` -- bool (default: False) - ``var`` -- string (default: 'q'
- ``k`` -- an integer - ``prec`` -- (default: 10) a positive integer - ``cusp_only`` -- bool (default: False) - ``var`` -- string (default: 'q'
def victor_miller_basis(k, prec=10, cusp_only=False, var='q'): r""" Compute and return the Victor-Miller basis for modular forms of weight k and level 1 to precision $O(q^prec)$. if ``cusp_only`` is True, return only a basis for the cuspidal subspace. INPUT: - ``k`` -- an integer - ``prec`` -- (default: 10) a positive integer - ``cusp_only`` -- bool (default: False) - ``var`` -- string (default: 'q' OUTPUT: A sequence whose entries are power series in ZZ[[var]]. EXAMPLES:: sage: victor_miller_basis(1, 6) [] sage: victor_miller_basis(0, 6) [ 1 + O(q^6) ] sage: victor_miller_basis(2, 6) [] sage: victor_miller_basis(4, 6) [ 1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + O(q^6) ] sage: victor_miller_basis(6, 6, var='w') [ 1 - 504*w - 16632*w^2 - 122976*w^3 - 532728*w^4 - 1575504*w^5 + O(w^6) ] sage: victor_miller_basis(6, 6) [ 1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6) [ 1 + 196560*q^2 + 16773120*q^3 + 398034000*q^4 + 4629381120*q^5 + O(q^6), q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6, cusp_only=True) [ q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6, cusp_only=True) [ q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6) [ 1 + 52416000*q^3 + 39007332000*q^4 + 6609020221440*q^5 + O(q^6), q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(32, 6) [ 1 + 2611200*q^3 + 19524758400*q^4 + 19715347537920*q^5 + O(q^6), q + 50220*q^3 + 87866368*q^4 + 18647219790*q^5 + O(q^6), q^2 + 432*q^3 + 39960*q^4 - 1418560*q^5 + O(q^6) ] sage: victor_miller_basis(40,200)[1:] == victor_miller_basis(40,200,cusp_only=True) True sage: victor_miller_basis(200,40)[1:] == victor_miller_basis(200,40,cusp_only=True) True """ k = Integer(k) if k%2 == 1 or k==2: return Sequence([]) elif k < 0: raise ValueError, "k must be non-negative" elif k == 0: return Sequence([PowerSeriesRing(ZZ,var)(1).add_bigoh(prec)], cr=True) e = k.mod(12) if e == 2: e += 12 n = (k-e) // 12 if n == 0 and cusp_only: return Sequence([]) # If prec is less than or equal to the dimension of the space of # cusp forms, which is just n, then we know the answer, and we # simply return it. if prec <= n: q = PowerSeriesRing(ZZ,var).gen(0) err = bigO(q**prec) ls = [0] * (n+1) if not cusp_only: ls[0] = 1 + err for i in range(1,prec): ls[i] = q**i + err for i in range(prec,n+1): ls[i] = err return Sequence(ls, cr=True) F6 = ((-504)*eisenstein_series_qexp(6,prec,var=var)).change_ring(ZZ) if e == 0: A = F6.parent()(1) elif e == 4: A = (240*eisenstein_series_qexp(4,prec,var=var)).change_ring(ZZ) elif e == 6: A = F6 elif e == 8: A = (480*eisenstein_series_qexp(8,prec,var=var)).change_ring(ZZ) elif e == 10: A = (-264*eisenstein_series_qexp(10,prec,var=var)).change_ring(ZZ) else: # e == 14 A = (-24*eisenstein_series_qexp(14,prec,var=var)).change_ring(ZZ) if n == 0: return Sequence([A], cr=True) F6_squared = F6**2 D = delta_qexp(prec,var=var) Fprod = F6_squared Dprod = D R = A.parent() if cusp_only: ls = [R(0)] + [A] * n start = 1 else: ls = [A] * (n+1) start = 0 for i in range(1,n+1): ls[n-i] *= Fprod ls[i] *= Dprod Fprod *= F6_squared Dprod *= D Dprod = Dprod.add_bigoh(prec) if cusp_only: M = Matrix(ZZ, n, prec, [x.list() for x in ls[1:]]) for i in range(n): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i+1]) else: M = Matrix(ZZ, n+1, prec, [x.list() for x in ls]) for i in range(1,n+1): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i]) return Sequence([ R(x.list()).add_bigoh(prec) for x in M.rows() ], cr=True)
2321956881b47b95cdccb07d5eb127ed8d839f8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2321956881b47b95cdccb07d5eb127ed8d839f8c/vm_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
html.write("<tr class=form><td class=whiteborder colspan=%d>" % colspan)
html.write("<tr class=form><td class=whiteborder>")
def show_view(view, show_heading = False, show_buttons = True, show_footer = True): # Parse display options display_options = html.var("display_options", "") # assume all missing options as active (upper case) for c in "HTBFCEOZRSIX": if c not in display_options and c.lower() not in display_options: display_options += c html.display_options = display_options # [1] Datasource datasource = multisite_datasources[view["datasource"]] tablename = datasource["table"] # [2] Layout layout = multisite_layouts[view["layout"]] # User can override the layout settings via HTML variables (buttons) # which are safed persistently. This is known as "view options" vo = view_options(view["name"]) num_columns = vo.get("num_columns", view.get("num_columns", 1)) browser_reload = vo.get("refresh", view.get("browser_reload", None)) if browser_reload and 'R' in display_options: html.set_browser_reload(browser_reload) # [3] Filters show_filters = [ multisite_filters[fn] for fn in view["show_filters"] ] hide_filters = [ multisite_filters[fn] for fn in view["hide_filters"] ] hard_filters = [ multisite_filters[fn] for fn in view["hard_filters"] ] for varname, value in view["hard_filtervars"]: # shown filters are set, if form is fresh and variable not supplied in URL if not html.var("filled_in") and not html.has_var(varname): html.set_var(varname, value) filterheaders = "" only_sites = None for filt in show_filters + hide_filters + hard_filters: header = filt.filter(tablename) if header.startswith("Sites:"): only_sites = header.strip().split(" ")[1:] else: filterheaders += header query = filterheaders + view.get("add_headers", "") # [4] Sorting sorters = [ (multisite_sorters[sn], reverse) for sn, reverse in view["sorters"] ] # [5] Grouping group_painters = [ (multisite_painters[n], v) for n, v in view["group_painters"] ] # [6] Columns painters = [ (multisite_painters[n], v) for n, v in view["painters"] ] # Now compute this list of all columns we need to query via Livestatus. # Those are: (1) columns used by the sorters in use, (2) columns use by # column- and group-painters in use and - note - (3) columns used to # satisfy external references (filters) of views we link to. The last bit # is the trickiest. Also compute this list of view options use by the # painters columns = [] painter_options = [] for s, r in sorters: columns += s["columns"] for p, v in (group_painters + painters): columns += p["columns"] painter_options += p.get("options", []) if v: linkview = html.available_views.get(v) if linkview: for ef in linkview["hide_filters"]: f = multisite_filters[ef] columns += f.link_columns painter_options = list(set(painter_options)) painter_options.sort() # Add key columns, needed for executing commands columns += datasource["keys"] # Make column list unique and remove (implicit) site column colset = set(columns) if "site" in colset: colset.remove("site") columns = list(colset) # Fetch data. Some views show data only after pressing [Search] if (not view["mustsearch"]) or html.var("search"): # names for additional columns (through Stats: headers) add_columns = datasource.get("add_columns", []) columns, rows = query_data(datasource, columns, add_columns, query, only_sites, get_limit()) sort_data(rows, sorters) else: columns, rows = [], [] # html.write("<pre>%s</pre>" % pprint.pformat((columns, rows))) # Show heading (change between "preview" mode and full page mode) if show_heading: # Show/Hide the header with page title, MK logo, etc. if 'H' in display_options: html.body_start(view_title(view)) if 'T' in display_options: html.top_heading(view_title(view)) has_done_actions = False if show_buttons and 'B' in display_options: show_context_links(view, hide_filters) need_navi = show_buttons and ('F' in display_options or 'C' in display_options or 'O' in display_options or 'E' in display_options) if need_navi: html.write("<table class=navi><tr>\n") colspan = 0 # Filter-button if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): filter_isopen = html.var("search", "") == "" and view["mustsearch"] toggle_button("table_filter", filter_isopen, "Filter", ["filter"]) html.write("<td class=minigap></td>\n") colspan += 2 # Command-button if 'C' in display_options and len(rows) > 0 and config.may("act") and not html.do_actions(): toggle_button("table_actions", False, "Commands") html.write("<td class=minigap></td>\n") colspan += 2 # Painter-Options if len(painter_options) > 0 and config.may("painter_options"): toggle_button("painter_options", False, "Display") html.write("<td class=minigap></td>\n") colspan += 2 # Buttons for view options if 'O' in display_options: if config.user_may(config.user, "view_option_columns"): for col in config.view_option_columns: uri = html.makeuri([("num_columns", col)]) if col == num_columns: addclass = " selected" else: addclass = "" html.write('<td class="left w30%s"><a href="%s">%s</a></td>\n' % (addclass, uri, col)) html.write("<td class=minigap></td>\n") colspan += 2 if 'R' in display_options and config.user_may(config.user, "view_option_refresh"): for ref in config.view_option_refreshes: uri = html.makeuri([("refresh", ref)]) if ref == browser_reload or (not ref and not browser_reload): addclass = " selected" else: addclass = "" if ref: reftext = "%d s" % ref else: reftext = "&#8734;" html.write('<td class="left w40%s"><a href="%s">%s</a></td>\n' % (addclass, uri, reftext)) html.write("<td class=minigap></td>\n") colspan += 2 html.write("<td class=gap></td>\n") colspan += 1 # Customize/Edit view button if 'E' in display_options and config.may("edit_views"): backurl = htmllib.urlencode(html.makeuri([])) html.write('<td class="right" onmouseover="hover_tab(this);" onmouseout="unhover_tab(this);">') if view["owner"] == html.req.user: html.write('<a href="edit_view.py?load_view=%s&back=%s">Edit</a>\n' % (view["name"], backurl)) else: html.write('<a href="edit_view.py?clonefrom=%s&load_view=%s&back=%s">Edit</a>\n' % (view["owner"], view["name"], backurl)) html.write('</td>') colspan += 1 html.write("</tr>") # Filter form if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): show_filter_form(filter_isopen, show_filters, colspan) # Actions if 'C' in display_options and len(rows) > 0: if html.do_actions() and html.transaction_valid(): # submit button pressed, no reload try: html.write("<tr class=form><td class=whiteborder colspan=%d>" % colspan) # Create URI with all actions variables removed backurl = html.makeuri([]) has_done_actions = do_actions(datasource["infos"][0], rows, backurl) html.write("</td></tr>") except MKUserError, e: html.show_error(e.message) html.write("</td></tr>") html.add_user_error(e.varname, e.message) show_action_form(True, datasource, colspan) else: show_action_form(False, datasource, colspan) if 'O' in display_options and len(painter_options) > 0 and config.may("painter_options"): show_painter_options(painter_options, colspan) # Ende des Bereichs mit den Tabs html.write("</table>\n") # class=navi if not has_done_actions: # Limit exceeded? Show warning count = len(rows) limit = get_limit() if limit != None and count == limit + 1: text = "Your query produced more then %d results. " % limit if html.var("limit", "soft") == "soft" and config.may("ignore_soft_limit"): text += '<a href="%s">Repeat query and allow more results.</a>' % html.makeuri([("limit", "hard")]) elif html.var("limit") == "hard" and config.may("ignore_hard_limit"): text += '<a href="%s">Repeat query without limit.</a>' % html.makeuri([("limit", "none")]) html.show_warning(text) del rows[-1] layout["render"]((columns, rows), view, group_painters, painters, num_columns) # Play alarm sounds, if critical events have been displayed if 'S' in display_options and view.get("play_sounds"): play_alarm_sounds() # In multi site setups error messages of single sites do not block the # output and raise now exception. We simply print error messages here: if config.show_livestatus_errors: for sitename, info in html.live.deadsites.items(): html.show_error("<b>%s - Livestatus error</b><br>%s" % (info["site"]["alias"], info["exception"])) if show_footer: html.bottom_focuscode() if 'Z' in display_options: html.bottom_footer() if 'H' in display_options: html.body_end()
5988dc68b2c4439ac451c483e6643ca4800ad36f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/5988dc68b2c4439ac451c483e6643ca4800ad36f/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
if e.errno == errno.ECHILD: return
def wait(self, child_pid): """Wait for child_pid to finish, ignoring EINTR.""" while True: try: os.waitpid(child_pid, 0) return except OSError as e: if e.errno == errno.ECHILD: return if e.errno != errno.EINTR: raise
b0b24642f4bc7647e209adcba4b1fc8348302f3d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/b0b24642f4bc7647e209adcba4b1fc8348302f3d/test_signal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 2890, 16, 1151, 67, 6610, 4672, 3536, 5480, 364, 1151, 67, 6610, 358, 4076, 16, 14398, 512, 3217, 54, 12123, 1323, 1053, 30, 775, 30, 1140, 18, 7048, 6610, 12, 3624, 67, 6610...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 2890, 16, 1151, 67, 6610, 4672, 3536, 5480, 364, 1151, 67, 6610, 358, 4076, 16, 14398, 512, 3217, 54, 12123, 1323, 1053, 30, 775, 30, 1140, 18, 7048, 6610, 12, 3624, 67, 6610...
[Fractional ideal (7/2*a - 81/2),
[Fractional ideal (-a), Fractional ideal (7/2*a - 81/2),
def kodaira_symbol(self, P, proof = None): r""" Returns the Kodaira Symbol of this elliptic curve at the prime `P`.
c60d7dbafd779fe009a5246532e3a8695cf3cce8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c60d7dbafd779fe009a5246532e3a8695cf3cce8/ell_number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 369, 10658, 354, 67, 7175, 12, 2890, 16, 453, 16, 14601, 273, 599, 4672, 436, 8395, 2860, 326, 1475, 369, 10658, 354, 8565, 434, 333, 415, 549, 21507, 8882, 622, 326, 17014, 1375, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 369, 10658, 354, 67, 7175, 12, 2890, 16, 453, 16, 14601, 273, 599, 4672, 436, 8395, 2860, 326, 1475, 369, 10658, 354, 8565, 434, 333, 415, 549, 21507, 8882, 622, 326, 17014, 1375, ...
model.PackageListing.id).execute().rowcount
model.PackageListing.id).execute().rowcount
def index(self): if identity.current.anonymous: own = 'need to be logged in' else: own = model.PackageListing.query.filter_by(owner=fasid).count() # most packages owned in DEVEL collection top_owners_select = sqlalchemy.select( [func.count(model.PackageListing.owner).label('numpkgs'), model.PackageListing.owner], and_( model.PackageListing.collectionid==DEVEL, model.PackageListing.owner!=ORPHAN_ID)).group_by( model.PackageListing.owner).order_by( desc('numpkgs')).limit(20) top_owners_names = [] for listing in top_owners_select.execute(): top_owners_names.append(self.fas.cache[int(listing.owner)]['username'])
9632e88aef7435300565e923e2057e435e2b7f8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/9632e88aef7435300565e923e2057e435e2b7f8d/stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 4672, 309, 4215, 18, 2972, 18, 19070, 30, 4953, 273, 296, 14891, 358, 506, 7545, 316, 11, 469, 30, 4953, 273, 938, 18, 2261, 19081, 18, 2271, 18, 2188, 67, 1637, 12, 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, 770, 12, 2890, 4672, 309, 4215, 18, 2972, 18, 19070, 30, 4953, 273, 296, 14891, 358, 506, 7545, 316, 11, 469, 30, 4953, 273, 938, 18, 2261, 19081, 18, 2271, 18, 2188, 67, 1637, 12, 8...
PsynthLabelString = 'Psynth: %+.3f' % self.dicts[self.stPt]['Pres']
PsynthLabelString = 'Psynth: %+.3fs' % self.dicts[self.stPt]['Pres']
def drawPsynthLabel(self): if not self.dicts[self.stPt].has_key('Psynth'): return PsynthLabelString = 'Psynth: %+.3f' % self.dicts[self.stPt]['Pres'] self.PsynthLabel = self.axs[0].text(self.dicts[self.stPt]['Psynth'], 1 - 0.08 * len(self.axs), ' ' + PsynthLabelString, transform = self.trans[0], color=self.dictPhaseColors['Psynth'])
e3cbfd70f9175004acca4efdf96cb210893ee944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/e3cbfd70f9175004acca4efdf96cb210893ee944/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 52, 11982, 451, 2224, 12, 2890, 4672, 309, 486, 365, 18, 16287, 63, 2890, 18, 334, 16484, 8009, 5332, 67, 856, 2668, 52, 11982, 451, 11, 4672, 327, 453, 11982, 451, 2224, 780, 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, 3724, 52, 11982, 451, 2224, 12, 2890, 4672, 309, 486, 365, 18, 16287, 63, 2890, 18, 334, 16484, 8009, 5332, 67, 856, 2668, 52, 11982, 451, 11, 4672, 327, 453, 11982, 451, 2224, 780, 27...
FL_Coord, STRING],
FL_Coord, STRING],
def fl_create_select(p1, p2, p3, p4, p5, p6): """ fl_create_select(p1, p2, p3, p4, p5, p6) -> object """ retval = _fl_create_select(p1, p2, p3, p4, p5, p6) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 4025, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 16, 293, 26, 4672, 3536, 1183, 67, 2640, 67, 4025, 12, 84, 21, 16, 293, 22, 16, 293, 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, 1183, 67, 2640, 67, 4025, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 16, 293, 26, 4672, 3536, 1183, 67, 2640, 67, 4025, 12, 84, 21, 16, 293, 22, 16, 293, 2...
elif isinstance(d, (tuple,list)):
elif isinstance(d, (tuple, list)):
def polynomial_system(self, P=None, K=None): """ Return a MPolynomialSystem for self for a given plaintext-key pair.
e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16991, 67, 4299, 12, 2890, 16, 453, 33, 7036, 16, 1475, 33, 7036, 4672, 3536, 2000, 279, 490, 5850, 13602, 3163, 364, 365, 364, 279, 864, 11917, 17, 856, 3082, 18, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16991, 67, 4299, 12, 2890, 16, 453, 33, 7036, 16, 1475, 33, 7036, 4672, 3536, 2000, 279, 490, 5850, 13602, 3163, 364, 365, 364, 279, 864, 11917, 17, 856, 3082, 18, 2, -100, -100, -100,...
timeTup=time.strptime(sStart, '%m/%d-%H:%M:%S %Y') wallClock=time.mktime(timeTup) wallClock = time.mktime(time.localtime())-wallClock
timeTup = time.strptime( sStart, '%m/%d-%H:%M:%S %Y' ) wallClock = time.mktime( timeTup ) wallClock = time.mktime( time.localtime() ) - wallClock
def getResourceUsage(self): """Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds. """ if not self.bin: return S_ERROR('Could not determine bin directory for LSF')
b590345882082ff68315923d410c01c4d6437735 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b590345882082ff68315923d410c01c4d6437735/LSFTimeLeft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5070, 5357, 12, 2890, 4672, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924, 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, 5070, 5357, 12, 2890, 4672, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924, 2...
super(LeaderManager, self).__init__()
self.__init__()
def reset(self): ''' Resets the LeaderManager for a clean start of GunGame. ''' # Call the __init__ to reset the LeaderManager instance super(LeaderManager, self).__init__()
176c453398b76f3d9316ea7ba2cc15f2ef8ba1c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4555/176c453398b76f3d9316ea7ba2cc15f2ef8ba1c2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 9163, 1124, 2413, 326, 26048, 1318, 364, 279, 2721, 787, 434, 611, 318, 12496, 18, 9163, 468, 3049, 326, 1001, 2738, 972, 358, 2715, 326, 26048, 1318, 791, 2240, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 9163, 1124, 2413, 326, 26048, 1318, 364, 279, 2721, 787, 434, 611, 318, 12496, 18, 9163, 468, 3049, 326, 1001, 2738, 972, 358, 2715, 326, 26048, 1318, 791, 2240, 12...
r1 = dataregion.DataRegion(0, 9, self.testData)
r1 = dataregion.DataRegion(0, 10, self.testData)
def testInstanciation(self): r1 = dataregion.DataRegion(0, 9, self.testData) self.assertEqual(len(r1), len(self.testData))
a99f0b07bf212c9310a7d9405127369573f6271c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/a99f0b07bf212c9310a7d9405127369573f6271c/dataregion_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 382, 27866, 7072, 12, 2890, 4672, 436, 21, 273, 501, 6858, 18, 751, 5165, 12, 20, 16, 1728, 16, 365, 18, 3813, 751, 13, 365, 18, 11231, 5812, 12, 1897, 12, 86, 21, 3631, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 382, 27866, 7072, 12, 2890, 4672, 436, 21, 273, 501, 6858, 18, 751, 5165, 12, 20, 16, 1728, 16, 365, 18, 3813, 751, 13, 365, 18, 11231, 5812, 12, 1897, 12, 86, 21, 3631, 562, ...
%(z)s = %(x)s %% %(y)s;
%(z)s = %(x_mod_y)s;
def c_code(self, node, name, (x, y), (z, ), sub): """ We want the result to have the same sign as python, not the other implementaiton of mod. """ #raise NotImplementedError("Unlike Python, C's modulo returns negative modulo on negative dividend (to implement)") return """
e06004c8a7c2d70dd7df24bcbcc3b37ae6accc37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/e06004c8a7c2d70dd7df24bcbcc3b37ae6accc37/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 92, 16, 677, 3631, 261, 94, 16, 262, 16, 720, 4672, 3536, 1660, 2545, 326, 563, 358, 1240, 326, 1967, 1573, 487, 5790, 16, 486, 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, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 92, 16, 677, 3631, 261, 94, 16, 262, 16, 720, 4672, 3536, 1660, 2545, 326, 563, 358, 1240, 326, 1967, 1573, 487, 5790, 16, 486, 3...
else:
elif menu.choices:
def GetDisplayStyle(self, menu=None): """ return current display style """ if menu: if menu.force_skin_layout != -1: return menu.force_skin_layout else: different = 0 last = menu.choices[ 0 ].image for i in menu.choices: if last != i.image: different = 1 break last = i.image if not different: if menu and menu.skin_settings: settings = menu.skin_settings else: settings = self.settings
fa12e4536552005caa317559ba3e3324261012fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/fa12e4536552005caa317559ba3e3324261012fd/skin_main1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4236, 2885, 12, 2890, 16, 3824, 33, 7036, 4672, 3536, 327, 783, 2562, 2154, 3536, 309, 3824, 30, 309, 225, 3824, 18, 5734, 67, 7771, 267, 67, 6741, 480, 300, 21, 30, 327, 3824, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4236, 2885, 12, 2890, 16, 3824, 33, 7036, 4672, 3536, 327, 783, 2562, 2154, 3536, 309, 3824, 30, 309, 225, 3824, 18, 5734, 67, 7771, 267, 67, 6741, 480, 300, 21, 30, 327, 3824, ...
extra_link_args=['-framework', 'QuickTime']) )
extra_link_args=['-framework', 'QuickTime', '-framework', 'Carbon']) )
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' )
5d17da08d106d09e9e5babe3488bc842be1d1f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d17da08d106d09e9e5babe3488bc842be1d1f52/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 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, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
os.remove(pdf)
def test0(self): "Test if pythonpoint.pdf can be created from pythonpoint.xml."
80a5af4bd2a4641790bf438f53554e192f536b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/80a5af4bd2a4641790bf438f53554e192f536b89/test_tools_pythonpoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 20, 12, 2890, 4672, 315, 4709, 309, 5790, 1153, 18, 7699, 848, 506, 2522, 628, 5790, 1153, 18, 2902, 1199, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 20, 12, 2890, 4672, 315, 4709, 309, 5790, 1153, 18, 7699, 848, 506, 2522, 628, 5790, 1153, 18, 2902, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def generateBootCode(self, parts, packages, boot, variants, settings, bootCode, globalCodes, format=False):
def generateBootCode(self, parts, packages, boot, variants, settings, bootCode, globalCodes, version="source", format=False):
def generateBootCode(self, parts, packages, boot, variants, settings, bootCode, globalCodes, format=False): # returns the Javascript code for the initial ("boot") script as a string
f6109300a0b30f21f4b185d7f9d00da2c39d5bd2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/f6109300a0b30f21f4b185d7f9d00da2c39d5bd2/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 15817, 1085, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 16, 1947, 16, 4835, 1085, 16, 2552, 6295, 16, 1177, 1546, 3168, 3113, 740, 33, 8381, 4672, 468, 1135, 326, 22326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 15817, 1085, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 16, 1947, 16, 4835, 1085, 16, 2552, 6295, 16, 1177, 1546, 3168, 3113, 740, 33, 8381, 4672, 468, 1135, 326, 22326, ...
'staff': v.status==STAFF,
'administrateur': v.status>COACH,
def add_echeance(request): """View: adds a deadline for user/group and course/module. """ # récup visiteur v = request.session['v'] if request.method == 'POST': if 'c' in request.POST: # dernière étape, recup des valeurs et sauvegarde de l'échéance g = Groupe.objects.get(id=request.POST['g']) uf = {} if request.POST['u'] == "0": u = None uf['id'], uf['nom_prenom'] = (0, _('== All Students ==')) else: u = Utilisateur.objects.get(id=request.POST['u']) uf['id'], uf['nom_prenom'] = (u.id, u.nom_prenom()) c = Cours.objects.get(id=request.POST['c']) c.title = c.titre(v.langue) f3 = EcheanceForm3(request.POST) lm = [(0, _('== All Modules =='))] lm.extend([(mc.module.id, mc.module.slug) for mc in c.modulecours_set.all()]) f3.fields['module'].choices = lm if f3.is_valid(): v.lastw = datetime.datetime.now() request.session['v'] = v v.save() if f3.cleaned_data['module'] == "0": m = None mf = {} mf['id'], mf['slug'] = (0, _('== All Modules ==')) else: m = Module.objects.get(id=f3.cleaned_data['module']) mf = m e = Echeance(groupe=g,utilisateur=u,cours=c,module=m, echeance=f3.cleaned_data['deadline']) e.save()
5622003147f995391ac97c1031fcc18f24ef8d30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11552/5622003147f995391ac97c1031fcc18f24ef8d30/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 8987, 73, 1359, 12, 2293, 4672, 3536, 1767, 30, 4831, 279, 14096, 364, 729, 19, 1655, 471, 4362, 19, 2978, 18, 3536, 468, 436, 132, 107, 71, 416, 2281, 1137, 295, 331, 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, 527, 67, 8987, 73, 1359, 12, 2293, 4672, 3536, 1767, 30, 4831, 279, 14096, 364, 729, 19, 1655, 471, 4362, 19, 2978, 18, 3536, 468, 436, 132, 107, 71, 416, 2281, 1137, 295, 331, 273, ...
for i in range(ctrl.GetItemCount()): ctrl.SetItemState(i, 0, SEL_FOC)
if not (ctrl.GetWindowStyleFlag() & wxLC_SINGLE_SEL): for i in range(ctrl.GetItemCount()): ctrl.SetItemState(i, 0, SEL_FOC)
def selectBeforePopup(event): """Ensures the item the mouse is pointing at is selected before a popup. Works with both single-select and multi-select lists.""" ctrl = event.GetEventObject() if isinstance(ctrl, wxListCtrl): n, flags = ctrl.HitTest(event.GetPosition()) if n >= 0: if not ctrl.GetItemState(n, wxLIST_STATE_SELECTED): for i in range(ctrl.GetItemCount()): ctrl.SetItemState(i, 0, SEL_FOC) #for i in getListCtrlSelection(ctrl, SEL_FOC): # ctrl.SetItemState(i, 0, SEL_FOC) ctrl.SetItemState(n, SEL_FOC, SEL_FOC)
dd4ceed1882eba033a58d7f24c2e696c72944b0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/dd4ceed1882eba033a58d7f24c2e696c72944b0f/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 4649, 13770, 12, 2575, 4672, 3536, 19869, 326, 761, 326, 7644, 353, 17022, 622, 353, 3170, 1865, 279, 10431, 18, 225, 4147, 87, 598, 3937, 2202, 17, 4025, 471, 3309, 17, 4025, 6035...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4649, 13770, 12, 2575, 4672, 3536, 19869, 326, 761, 326, 7644, 353, 17022, 622, 353, 3170, 1865, 279, 10431, 18, 225, 4147, 87, 598, 3937, 2202, 17, 4025, 471, 3309, 17, 4025, 6035...
self.options["%s.downloads-tarball" % self.program].append(value)
program.get("downloads-tarball").append(value)
def handleOption(self, sec, opt, value): if sec in self.options: # Mirrors or lists to handle
e3d00bde989431745d3c2d68912693a977e97fa9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2406/e3d00bde989431745d3c2d68912693a977e97fa9/xmlreport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1895, 12, 2890, 16, 1428, 16, 2153, 16, 460, 4672, 309, 1428, 316, 365, 18, 2116, 30, 468, 490, 27026, 578, 6035, 358, 1640, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1895, 12, 2890, 16, 1428, 16, 2153, 16, 460, 4672, 309, 1428, 316, 365, 18, 2116, 30, 468, 490, 27026, 578, 6035, 358, 1640, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
sage: S == loads(dumps(S)) True
sage: TestSuite(S).run()
def unrank(self, r): """ Returns the subset of s that has rank k. EXAMPLES:: sage: Subsets(3,2).unrank(0) {1, 2} sage: Subsets([2,4,5],2).unrank(0) {2, 4} """
1a44ccc23f867ab08fe6b0234354f39b5f210df8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1a44ccc23f867ab08fe6b0234354f39b5f210df8/subset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 11500, 12, 2890, 16, 436, 4672, 3536, 2860, 326, 7931, 434, 272, 716, 711, 6171, 417, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 2592, 4424, 12, 23, 16, 22, 2934, 318, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 11500, 12, 2890, 16, 436, 4672, 3536, 2860, 326, 7931, 434, 272, 716, 711, 6171, 417, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 2592, 4424, 12, 23, 16, 22, 2934, 318, ...
output.write(" got: %s\n" % (self.eval_nuninst(nuninst, "/" in pkg and self.nuninst_orig or None))) output.write(" * %s: %s\n" % (arch, ", ".join(sorted(broken))))
output.write(" got: %s\n" % (self.eval_nuninst(nuninst, "/" in pkg and nuninst_comp or None))) output.write(" * %s: %s\n" % (arch, ", ".join(sorted([b for b in broken if b not in nuninst_comp[arch]]))))
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst()
ffeddc471d8a477df144d4e513c8a8dae814240b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/ffeddc471d8a477df144d4e513c8a8dae814240b/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, -100, -100, -100, -100, -100, -100, -100, ...
def __gt__(self,other):
def __gt__(self,other):
def __gt__(self,other): raise NotImplementedError('Subclasses of Variable must implement __gt__',self.__class__.__name__)
8963a02fce2adfaa5a561e13a296f58d5647b16e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/8963a02fce2adfaa5a561e13a296f58d5647b16e/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4521, 972, 12, 2890, 16, 3011, 4672, 1002, 11206, 2668, 1676, 4701, 434, 7110, 1297, 2348, 1001, 4521, 972, 2187, 2890, 16186, 1106, 972, 16186, 529, 972, 13, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 4521, 972, 12, 2890, 16, 3011, 4672, 1002, 11206, 2668, 1676, 4701, 434, 7110, 1297, 2348, 1001, 4521, 972, 2187, 2890, 16186, 1106, 972, 16186, 529, 972, 13, 2, -100, -100, -100, ...
from ComputedAttribute import ComputedAttribute
def maintemplate(self, REQUEST=None): """ Return the standard or plone main_template, unevaluated.
825ff76e6fd5d7e5eff1e567f301967d56ff6e21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/825ff76e6fd5d7e5eff1e567f301967d56ff6e21/Views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11566, 29761, 12, 2890, 16, 12492, 33, 7036, 4672, 3536, 2000, 326, 4529, 578, 886, 476, 2774, 67, 3202, 16, 640, 14168, 690, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11566, 29761, 12, 2890, 16, 12492, 33, 7036, 4672, 3536, 2000, 326, 4529, 578, 886, 476, 2774, 67, 3202, 16, 640, 14168, 690, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...