rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
log.info( "Setting up Galaxy" )
log.info( "Setting up Galaxy application" )
def manage_galaxy( self, to_be_started=True ): if self.app.TESTFLAG is True: log.debug( "Attempted to manage Galaxy, but TESTFLAG is set." ) return os.putenv( "GALAXY_HOME", self.galaxy_home ) os.putenv( "TEMP", '/mnt/galaxyData/tmp' ) if to_be_started: self.status() if not self.configured: log.info( "Setting up Galaxy" ) s3_conn = self.app.cloud_interface.get_s3_connection() if not os.path.exists(self.galaxy_home): log.error("Galaxy application directory '%s' does not exist! Aborting." % self.galaxy_home) log.debug("ls /mnt/: %s" % os.listdir('/mnt/')) return False
f1e02789a8d89044056e79b3297b684df86ef6ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5255/f1e02789a8d89044056e79b3297b684df86ef6ea/galaxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 25030, 31851, 12, 365, 16, 358, 67, 2196, 67, 14561, 33, 5510, 262, 30, 309, 365, 18, 2910, 18, 16961, 9651, 353, 1053, 30, 613, 18, 4148, 12, 315, 28788, 358, 10680, 611, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 25030, 31851, 12, 365, 16, 358, 67, 2196, 67, 14561, 33, 5510, 262, 30, 309, 365, 18, 2910, 18, 16961, 9651, 353, 1053, 30, 613, 18, 4148, 12, 315, 28788, 358, 10680, 611, ...
assert len(all) == 71, len(all)
assert len(all) == 72, len(all)
def test_license_names(self): all = model.LicenseList.all_formatted assert len(all) == 71, len(all) assert 'Other::License Not Specified' in all
29f7dd393186a898ae9615c52db868d209f8ac63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/265/29f7dd393186a898ae9615c52db868d209f8ac63/test_package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12687, 67, 1973, 12, 2890, 4672, 777, 273, 938, 18, 13211, 682, 18, 454, 67, 14897, 1815, 562, 12, 454, 13, 422, 19387, 16, 562, 12, 454, 13, 1815, 296, 8290, 2866, 13211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 12687, 67, 1973, 12, 2890, 4672, 777, 273, 938, 18, 13211, 682, 18, 454, 67, 14897, 1815, 562, 12, 454, 13, 422, 19387, 16, 562, 12, 454, 13, 1815, 296, 8290, 2866, 13211, ...
if os.path.exists(filePath): filePath = "%s_%s" % (filePath, fileId)
i = 1 path, ext = filePath.rsplit(".", 1) while os.path.exists(filePath): filePath = "%s_%s.%s" % (path,i,ext) i +=1
def downloadFile(rawFileStore, originalFile, filePath=None): """ Downloads an OriginalFile from the server. @param rawFileStore: The Omero rawFileStore @param originalFile: The OriginalFileI @param filePath: Where to download the file. If None, use originalFile.getName().getValue() """ fileId = originalFile.getId().getValue() rawFileStore.setFileId(fileId) fileSize = originalFile.getSize().getValue() maxBlockSize = 10000 cnt = 0 if filePath == None: filePath = originalFile.getName().getValue() if os.path.exists(filePath): # don't overwrite filePath = "%s_%s" % (filePath, fileId) fileHandle = open(filePath, 'w') data = ''; cnt = 0; fileSize = originalFile.getSize().getValue() while(cnt<fileSize): blockSize = min(maxBlockSize, fileSize) block = rawFileStore.read(cnt, blockSize) cnt = cnt+blockSize fileHandle.write(block) fileHandle.close() return filePath
82ea9f26cbf22cec7e6daf3adee74e61df02399f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/82ea9f26cbf22cec7e6daf3adee74e61df02399f/script_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 812, 12, 1899, 812, 2257, 16, 2282, 812, 16, 4612, 33, 7036, 4672, 3536, 13059, 87, 392, 19225, 812, 628, 326, 1438, 18, 225, 632, 891, 1831, 812, 2257, 30, 565, 1021, 25645, 243...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 812, 12, 1899, 812, 2257, 16, 2282, 812, 16, 4612, 33, 7036, 4672, 3536, 13059, 87, 392, 19225, 812, 628, 326, 1438, 18, 225, 632, 891, 1831, 812, 2257, 30, 565, 1021, 25645, 243...
view = self.getview(1)
view = self.getview(READWRITE)
def import_list(self, propnames, proplist): ''' Import a node - all information including "id" is present and should not be sanity checked. Triggers are not triggered. The journal should be initialised using the "creator" and "creation" information.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1098, 12, 2890, 16, 2270, 1973, 16, 450, 17842, 4672, 9163, 6164, 279, 756, 300, 777, 1779, 6508, 315, 350, 6, 353, 3430, 471, 1410, 486, 506, 16267, 5950, 18, 840, 8060, 854...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1098, 12, 2890, 16, 2270, 1973, 16, 450, 17842, 4672, 9163, 6164, 279, 756, 300, 777, 1779, 6508, 315, 350, 6, 353, 3430, 471, 1410, 486, 506, 16267, 5950, 18, 840, 8060, 854...
int(key)
intkeys[int(key)] = args[key]
def templatesWithParams(self): """Iterate templates used on this Page.
fd8b8e502014adf7d3b58dfa6bd933b2259fb758 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9005/fd8b8e502014adf7d3b58dfa6bd933b2259fb758/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5539, 19591, 12, 2890, 4672, 3536, 14916, 5539, 1399, 603, 333, 3460, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5539, 19591, 12, 2890, 4672, 3536, 14916, 5539, 1399, 603, 333, 3460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
outputfilename = outputfilename,append(".1")
outputfilename = outputfilename.append(".1")
def vertex_reference(n, nv): if (n < 0): return n + nv return n - 1
233c2051fd44c6365e2446fc7e86127c7913a2b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2274/233c2051fd44c6365e2446fc7e86127c7913a2b6/Obj2DatTex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5253, 67, 6180, 12, 82, 16, 8779, 4672, 309, 261, 82, 411, 374, 4672, 327, 290, 397, 8779, 327, 290, 300, 404, 225, 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, 5253, 67, 6180, 12, 82, 16, 8779, 4672, 309, 261, 82, 411, 374, 4672, 327, 290, 397, 8779, 327, 290, 300, 404, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Semi-public instance variables (XXX should be made private):
Semi-public read-only instance variables (XXX should be made private):
def __init__(self, stack):
90f09405606ca0eb9c7b66595fbe62655a2101df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/90f09405606ca0eb9c7b66595fbe62655a2101df/solitaire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2110, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2110, 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...
def Fail(self, recipe_id, path, score, summary):
def Fail(self, task_id, path, score, summary):
def Fail(self, recipe_id, path, score, summary): """ Record a Fail """ try: task = RecipeTask.by_id(task_id) except InvalidRequestError: raise BX(_('Invalid recipe ID: %s' % recipe_id)) return task.Fail(path, score, summary)
f6039c8131a27407379f7b50b2cedaa187691bf3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/f6039c8131a27407379f7b50b2cedaa187691bf3/recipetasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8911, 12, 2890, 16, 1562, 67, 350, 16, 589, 16, 4462, 16, 4916, 4672, 3536, 5059, 279, 8911, 3536, 775, 30, 1562, 273, 7776, 3151, 2174, 18, 1637, 67, 350, 12, 4146, 67, 350, 13, 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, 8911, 12, 2890, 16, 1562, 67, 350, 16, 589, 16, 4462, 16, 4916, 4672, 3536, 5059, 279, 8911, 3536, 775, 30, 1562, 273, 7776, 3151, 2174, 18, 1637, 67, 350, 12, 4146, 67, 350, 13, 133...
"""
"""
def fl_get_select_text_font(p1, p2, p3): """ fl_get_select_text_font(p1, p2, p3) -> num. """ retval = _fl_get_select_text_font(p1, p2, p3) 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, 588, 67, 4025, 67, 955, 67, 5776, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 588, 67, 4025, 67, 955, 67, 5776, 12, 84, 21, 16, 293, 22, 16, 293, 23, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 4025, 67, 955, 67, 5776, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 588, 67, 4025, 67, 955, 67, 5776, 12, 84, 21, 16, 293, 22, 16, 293, 23, ...
import tempfile filename = tempfile.mktemp() self.__tempfiles.append(filename)
import tempfile filename = tempfile.mktemp() self.__tempfiles.append(filename)
def retrieve(self, url, filename=None): url = unwrap(url) if self.tempcache and self.tempcache.has_key(url): return self.tempcache[url] type, url1 = splittype(url) if not filename and (not type or type == 'file'): try: fp = self.open_local_file(url1) del fp return url2pathname(splithost(url1)[1]), None except IOError, msg: pass fp = self.open(url) headers = fp.info() if not filename: import tempfile filename = tempfile.mktemp() self.__tempfiles.append(filename) result = filename, headers if self.tempcache is not None: self.tempcache[url] = result tfp = open(filename, 'wb') bs = 1024*8 block = fp.read(bs) while block: tfp.write(block) block = fp.read(bs) fp.close() tfp.close() del fp del tfp return result
fcea3a44cb5bc4ca94c174353aba37f481e83a11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fcea3a44cb5bc4ca94c174353aba37f481e83a11/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 12, 2890, 16, 880, 16, 1544, 33, 7036, 4672, 880, 273, 11014, 12, 718, 13, 309, 365, 18, 874, 2436, 807, 471, 365, 18, 874, 2436, 807, 18, 5332, 67, 856, 12, 718, 4672, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 12, 2890, 16, 880, 16, 1544, 33, 7036, 4672, 880, 273, 11014, 12, 718, 13, 309, 365, 18, 874, 2436, 807, 471, 365, 18, 874, 2436, 807, 18, 5332, 67, 856, 12, 718, 4672, 327, ...
logf = config['logfile']
logf = tools.config['logfile']
def init_logger(): from tools import config import os logger = logging.getLogger() if config['syslog']: # SysLog Handler if os.name == 'nt': sysloghandler = logging.handlers.NTEventLogHandler("%s %s" % (release.description, release.version)) else: sysloghandler = logging.handlers.SysLogHandler('/dev/log') formatter = logging.Formatter('%(application)s:%(uncoloredlevelname)s:%(name)s:%(message)s') sysloghandler.setFormatter(formatter) logger.addHandler(sysloghandler) # create a format for log messages and dates formatter = logging.Formatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') if config['logfile']: # LogFile Handler logf = config['logfile'] try: dirname = os.path.dirname(logf) if dirname and not os.path.isdir(dirname): os.makedirs(dirname) handler = logging.handlers.TimedRotatingFileHandler(logf,'D',1,30) except Exception, ex: sys.stderr.write("ERROR: couldn't create the logfile directory\n") handler = logging.StreamHandler(sys.stdout) else: # Normal Handler on standard output handler = logging.StreamHandler(sys.stdout) # tell the handler to use this format handler.setFormatter(formatter) # add the handler to the root logger logger.addHandler(handler) logger.setLevel(config['log_level'] or '0') if isinstance(handler, logging.StreamHandler) and os.name != 'nt': # change color of level names # uses of ANSI color codes # see http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html # maybe use http://code.activestate.com/recipes/574451/ colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', None, 'default'] foreground = lambda f: 30 + colors.index(f) background = lambda f: 40 + colors.index(f) mapping = { 'DEBUG_RPC': ('blue', 'white'), 'DEBUG': ('blue', 'default'), 'INFO': ('green', 'default'), 'WARNING': ('yellow', 'default'), 'ERROR': ('red', 'default'), 'CRITICAL': ('white', 'red'), } for level, (fg, bg) in mapping.items(): msg = "\x1b[%dm\x1b[%dm%s\x1b[0m" % (foreground(fg), background(bg), level) logging.addLevelName(getattr(logging, level), msg)
4ae6d79e28f81cc7ad286d86e637210377f80e44 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/4ae6d79e28f81cc7ad286d86e637210377f80e44/netsvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4901, 13332, 628, 8513, 1930, 642, 1930, 1140, 225, 1194, 273, 2907, 18, 588, 3328, 1435, 225, 309, 642, 3292, 9499, 1330, 3546, 30, 468, 16995, 1343, 4663, 309, 1140, 18, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 4901, 13332, 628, 8513, 1930, 642, 1930, 1140, 225, 1194, 273, 2907, 18, 588, 3328, 1435, 225, 309, 642, 3292, 9499, 1330, 3546, 30, 468, 16995, 1343, 4663, 309, 1140, 18, 529,...
self._error_check(line, pre_out)
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: We check that errors are correctly checked:: sage: maxima._eval_line('1+1;') '2' sage: maxima.eval('sage0: x == x;') Traceback (most recent call last): ... TypeError: error evaluating "sage0: x == x;":... """ if len(line) == 0: return '' line = line.rstrip() if line[-1] != '$' and line[-1] != ';': line += ';'
1c5683ac123dd26a0497c4d29290cfe1a7e6273a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1c5683ac123dd26a0497c4d29290cfe1a7e6273a/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 12, 2890, 16, 980, 16, 1699, 67, 1202, 67, 768, 33, 8381, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 283, 2139, 33, 5510, 16, 555, 67, 1893, 33, 5510, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8622, 67, 1369, 12, 2890, 16, 980, 16, 1699, 67, 1202, 67, 768, 33, 8381, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 283, 2139, 33, 5510, 16, 555, 67, 1893, 33, 5510, 4672, ...
self._report_dir = os.path.join(script_dir, "latest")
self._report_dir = os.path.join(script_dir, "latest", test)
def __init__(self, options, args, test): # the known list of tests self._test_list = {"test_shell": self.TestTestShell, "unit": self.TestUnit, "net": self.TestNet, "ipc": self.TestIpc, "base": self.TestBase, "layout": self.TestLayout, "dll": self.TestDll, "layout_all": self.TestLayoutAll, "ui": self.TestUI}
80ed27631dfc12248faa97fe3e11cdf477a2ea19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/80ed27631dfc12248faa97fe3e11cdf477a2ea19/chrome_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 833, 16, 1842, 4672, 468, 326, 4846, 666, 434, 7434, 365, 6315, 3813, 67, 1098, 273, 12528, 3813, 67, 10304, 6877, 365, 18, 4709, 4709, 13220, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 702, 16, 833, 16, 1842, 4672, 468, 326, 4846, 666, 434, 7434, 365, 6315, 3813, 67, 1098, 273, 12528, 3813, 67, 10304, 6877, 365, 18, 4709, 4709, 13220, 1...
target="file:///"""
""" html += ' target="file:///'
def play(self): print "VideoDisplay play" html = """<?xml version="1.0" encoding="utf-8"?>
8a3f2485c913feeffbadba36ab15f37670a1a332 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/8a3f2485c913feeffbadba36ab15f37670a1a332/VideoDisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 4672, 1172, 315, 10083, 4236, 6599, 6, 1729, 273, 3536, 12880, 2902, 1177, 1546, 21, 18, 20, 6, 2688, 1546, 3158, 17, 28, 6, 35, 34, 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, 6599, 12, 2890, 4672, 1172, 315, 10083, 4236, 6599, 6, 1729, 273, 3536, 12880, 2902, 1177, 1546, 21, 18, 20, 6, 2688, 1546, 3158, 17, 28, 6, 35, 34, 2, -100, -100, -100, -100, -100, ...
def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A000261(SloaneSequence): r""" $a(n) = n*a(n-1) + (n-3)*a(n-2)$, with $a(1) = 1$, $a(2) = 1$. With offset 1, permanent of (0,1)-matrix of size $n \times (n+d)$ with $d=3$ and $n$ zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), p. 197-210. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000261;a a(n) = n*a(n-1) + (n-3)*a(n-2), a(1) = 0, a(2) = 1. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 0 sage: a.offset 1 sage: a(8) 30637 sage: a(22) 1801366114380914335441 sage: a.list(9) [0, 1, 3, 13, 71, 465, 3539, 30637, 296967] AUTHOR: -- Jaap Spies (2007-01-23) """ def __init__(self):
_k1 = 1 _k2 = 1 class A090010(ExtremesOfPermanentsSequence2): def __init__(self): r""" Permanent of (0,1)-matrix of size $n \times (n+d)$ with $d=6$ and $n$ zeros not on a line. $ a(n) = (n+5)*a(n-1) + (n-1)*a(n-2), a(1)=6, a(2)=43$. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. REFERENCES: Seok-Zun Song et al., Extremes of permanents of (0,1)-matrices, Lin. Algebra and its Applic. 373 (2003), p. 197-210. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A090010;a Permanent of (0,1)-matrix of size n X (n+d) with d=6 and n zeros not on a line. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 6 sage: a(2) 43 sage: a.offset 1 sage: a(8) 67741129 sage: a(22) 192416593029158989003270143 sage: a.list(9) [6, 43, 356, 3333, 34754, 398959, 4996032, 67741129, 988344062] AUTHOR: -- Jaap Spies (2007-01-23) """
def gen(self,a0,a1,d): """ """ x, y = ZZ(a0), ZZ(a1) k = 1 yield x while True: k = k+1 x, y = y, k*y+(k-d)*x yield x
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 12, 2890, 16, 69, 20, 16, 69, 21, 16, 72, 4672, 3536, 225, 3536, 619, 16, 677, 273, 2285, 62, 12, 69, 20, 3631, 2285, 62, 12, 69, 21, 13, 417, 273, 404, 2824, 619, 1323, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 12, 2890, 16, 69, 20, 16, 69, 21, 16, 72, 4672, 3536, 225, 3536, 619, 16, 677, 273, 2285, 62, 12, 69, 20, 3631, 2285, 62, 12, 69, 21, 13, 417, 273, 404, 2824, 619, 1323, 10...
self.AppendUnique(CPPFLAGS='-DQT_GUI_LIB')
self.AppendUnique(CPPFLAGS=['-DQT_GUI_LIB'])
def enable_modules(self, modules, debug=False) : import sys validModules = [ 'QtCore', 'QtGui', 'QtOpenGL', 'Qt3Support', # The next modules have not been tested yet so, please # maybe they require additional work on non Linux platforms 'QtSql', 'QtNetwork', 'QtSvg', 'QtTest', 'QtXml', 'QtUiTools', ] pclessModules = [ 'QtUiTools', 'QtUiTools_debug', ] invalidModules=[] for module in modules: if module not in validModules : invalidModules.append(module) if invalidModules : raise "Modules %s are not Qt4 modules. Valid Qt4 modules are: %s"% \ (str(invalidModules),str(validModules)) # TODO: Check whether we should add QT_CORE_LIB, QT_XML_LIB, QT_NETWORK_LIB... if 'QtGui' in modules: self.AppendUnique(CPPFLAGS='-DQT_GUI_LIB') if sys.platform == "linux2" : if debug : modules = [module+"_debug" for module in modules] for module in modules : if module in pclessModules : # self.AppendUnique(LIBS=[module]) self.AppendUnique(LIBPATH=[os.path.join(self["QTDIR"],"lib",module)]) self.AppendUnique(CPPPATH=[os.path.join(self["QTDIR"],"include","qt4",module)]) modules.remove(module) self.ParseConfig('PKG_CONFIG_PATH=%s/lib/pkgconfig pkg-config %s --libs --cflags'% ( self['QTDIR'], ' '.join(modules))) return if sys.platform == "win32" : if debug : debugSuffix = 'd' else : debugSuffix = '' self.AppendUnique(LIBS=[lib+'4'+debugSuffix for lib in modules]) if 'QtOpenGL' in modules: self.AppendUnique(LIBS=['opengl32']) self.AppendUnique(CPPPATH=[ '$QTDIR/include/'+module for module in modules]) self.AppendUnique(LIBPATH=['$QTDIR/lib'])
a29a11930590320d8d88cb9a798ebfaa7e8b8698 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1456/a29a11930590320d8d88cb9a798ebfaa7e8b8698/qt4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 6400, 12, 2890, 16, 4381, 16, 1198, 33, 8381, 13, 294, 1930, 2589, 225, 923, 7782, 273, 306, 296, 23310, 4670, 2187, 296, 23310, 18070, 2187, 296, 23310, 3678, 11261, 2187, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 6400, 12, 2890, 16, 4381, 16, 1198, 33, 8381, 13, 294, 1930, 2589, 225, 923, 7782, 273, 306, 296, 23310, 4670, 2187, 296, 23310, 18070, 2187, 296, 23310, 3678, 11261, 2187, 296...
def acquire(self, blocking=1): if blocking==0 and self.locked():
def bounded(self): return self.counter >= self.limit def acquire(self, blocking=True): if not blocking and self.locked():
def acquire(self, blocking=1): if blocking==0 and self.locked(): return False # This logic handles the self.limit is None case because None != any integer. while self.counter == 0: # Loop until there are resources to acquire. We loop because we # could be one of several coroutines waiting for a single item. If # we all get notified, only one is going to claim it, and the rest # of us must continue waiting. self.acqevent.wait() # claim the resource self.counter -= 1 if self.counter == 0: # If we just transitioned from having a resource to having none, # make anyone else's wait() actually wait. self.acqevent.reset() if self.counter + 1 == self.limit: # If we just transitioned from being full to having room for one # more resource, notify whoever was waiting to release one. self.relevent.send() return True
961419045b357378af67f700b41d9403d322b26b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/961419045b357378af67f700b41d9403d322b26b/coros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28079, 12, 2890, 4672, 327, 365, 18, 7476, 1545, 365, 18, 3595, 225, 1652, 10533, 12, 2890, 16, 9445, 33, 5510, 4672, 309, 486, 9445, 471, 365, 18, 15091, 13332, 327, 1083, 468, 1220, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28079, 12, 2890, 4672, 327, 365, 18, 7476, 1545, 365, 18, 3595, 225, 1652, 10533, 12, 2890, 16, 9445, 33, 5510, 4672, 309, 486, 9445, 471, 365, 18, 15091, 13332, 327, 1083, 468, 1220, ...
while True:
while 1:
def normalvariate(self, mu, sigma): """Normal distribution.
14a7c7ebf715375bc359ca58c82867ca32386c8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/14a7c7ebf715375bc359ca58c82867ca32386c8c/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2212, 1401, 3840, 12, 2890, 16, 4129, 16, 7299, 4672, 3536, 5506, 7006, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2212, 1401, 3840, 12, 2890, 16, 4129, 16, 7299, 4672, 3536, 5506, 7006, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.compareVersion(installDevice) >= 0:
if self.compareVersion(installDevice) <= 0:
def install(self): self.status = "in_progress" override="" # only activate override in cases where it is needed. installDevice = self.getCurrentInstallDevice() if self.compareVersion(installDevice) >= 0: # activate for downgrade and reflash override="--override_bios_version" instStr = """dellBiosUpdate %s -u -f %s""" % (override, os.path.join(self.path, "bios.hdr"))
d75255903cc84495f00bb856e8b25208b77de8a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/36/d75255903cc84495f00bb856e8b25208b77de8a1/dellbios.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 4672, 365, 18, 2327, 273, 315, 267, 67, 8298, 6, 3849, 1546, 6, 468, 1338, 10235, 3849, 316, 6088, 1625, 518, 353, 3577, 18, 3799, 3654, 273, 365, 18, 588, 3935, 6410, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 4672, 365, 18, 2327, 273, 315, 267, 67, 8298, 6, 3849, 1546, 6, 468, 1338, 10235, 3849, 316, 6088, 1625, 518, 353, 3577, 18, 3799, 3654, 273, 365, 18, 588, 3935, 6410, ...
rect.x -= sx + self.grid._rlSize
rect.x -= sx + _rlSize
def OnPress(self,evt): self.startX = self.lastX = evt.m_x sx = self.grid.GetViewStart()[0] * self.ux sx -= self.grid._rlSize px,py = self.lwin.ClientToScreenXY(evt.m_x,evt.m_y) px,py = self.grid.ScreenToClientXY(px,py)
a6c129111b38341eb561b110fd1566b260740675 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/a6c129111b38341eb561b110fd1566b260740675/gridmovers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 11840, 12, 2890, 16, 73, 11734, 4672, 365, 18, 1937, 60, 273, 365, 18, 2722, 60, 273, 6324, 18, 81, 67, 92, 13280, 273, 365, 18, 5222, 18, 967, 1767, 1685, 1435, 63, 20, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 11840, 12, 2890, 16, 73, 11734, 4672, 365, 18, 1937, 60, 273, 365, 18, 2722, 60, 273, 6324, 18, 81, 67, 92, 13280, 273, 365, 18, 5222, 18, 967, 1767, 1685, 1435, 63, 20, 65, ...
def align(self, value): mod = value % self.p if mod != 0: return value - mod + self.p else: return value def test_align(self): self.assertEqual(self.align(0) % self.p, 0) self.assertEqual(self.align(1) % self.p, 0) self.assertEqual(self.align(3) % self.p, 0) self.assertEqual(self.align(4) % self.p, 0) self.assertEqual(self.align(7) % self.p, 0) self.assertEqual(self.align(8) % self.p, 0) self.assertEqual(self.align(9) % self.p, 0)
def calcsize(self, fmt): """Wrapper around struct.calcsize which enforces the alignment of the end of a structure to the alignment requirement of pointer. Note: This wrapper should only be used if a pointer member is included and no member with a size larger than a pointer exists. """ return struct.calcsize(fmt + '0P')
def align(self, value): mod = value % self.p if mod != 0: return value - mod + self.p else: return value
300a10ceb1febf233333c4843a55c526b4019feb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/300a10ceb1febf233333c4843a55c526b4019feb/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5689, 12, 2890, 16, 460, 4672, 681, 273, 460, 738, 365, 18, 84, 309, 681, 480, 374, 30, 327, 460, 300, 681, 397, 365, 18, 84, 469, 30, 327, 460, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5689, 12, 2890, 16, 460, 4672, 681, 273, 460, 738, 365, 18, 84, 309, 681, 480, 374, 30, 327, 460, 300, 681, 397, 365, 18, 84, 469, 30, 327, 460, 2, -100, -100, -100, -100, -100, -1...
if not self._dict['Download-URL']: return "%s: This package needs to be installed manually (no Download-URL field)" % _fmtpackagename(self)
if not self._dict.get('Download-URL'): return "%s: This package needs to be installed manually (no Download-URL field)" % self.fullname()
def installSinglePackage(self, output=None): """Download, unpack and install a single package. If output is given it should be a file-like object and it will receive a log of what happened.""" if not self._dict['Download-URL']: return "%s: This package needs to be installed manually (no Download-URL field)" % _fmtpackagename(self) msg = self.downloadPackageOnly(output) if msg: return "%s: download: %s" % (self.fullname(), msg) msg = self.unpackPackageOnly(output) if msg: return "%s: unpack: %s" % (self.fullname(), msg) return self.installPackageOnly(output)
749f481478023f3aea9c2e7456240e84d8efe188 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/749f481478023f3aea9c2e7456240e84d8efe188/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 5281, 2261, 12, 2890, 16, 876, 33, 7036, 4672, 3536, 7109, 16, 6167, 471, 3799, 279, 2202, 2181, 18, 225, 971, 876, 353, 864, 518, 1410, 506, 279, 585, 17, 5625, 733, 471, 518, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 5281, 2261, 12, 2890, 16, 876, 33, 7036, 4672, 3536, 7109, 16, 6167, 471, 3799, 279, 2202, 2181, 18, 225, 971, 876, 353, 864, 518, 1410, 506, 279, 585, 17, 5625, 733, 471, 518, ...
self.currentWhoisDeferred.callback(False) del self.currentWhoisDeferred
nick = params[1] if nick in self.pendingWhoisTests: for result in self.pendingWhoisTests[nick]: result.callback(False) del self.pendingWhoisTests[nick] def irc_RPL_WHOISSERVER(self, prefix, params): pass def irc_RPL_WHOISIDLE(self, prefix, params): pass def irc_RPL_WHOISCHANNELS(self, prefix, params): pass def irc_RPL_ENDOFWHOIS(self, prefix, params): pass
def irc_ERR_NOSUCHNICK(self, prefix, params): """Reply to the WHOIS command we use to evaluate if a nick is used or not. This indicates that the nick is available. """ self.currentWhoisDeferred.callback(False) del self.currentWhoisDeferred
cfbd2fd2638d1918000b5f3cd2d4609e101d1228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/cfbd2fd2638d1918000b5f3cd2d4609e101d1228/Bots.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 277, 1310, 67, 9712, 67, 3417, 19958, 50, 16656, 12, 2890, 16, 1633, 16, 859, 4672, 3536, 7817, 358, 326, 678, 7995, 5127, 1296, 732, 999, 358, 5956, 309, 279, 10909, 353, 1399, 578, 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, 277, 1310, 67, 9712, 67, 3417, 19958, 50, 16656, 12, 2890, 16, 1633, 16, 859, 4672, 3536, 7817, 358, 326, 678, 7995, 5127, 1296, 732, 999, 358, 5956, 309, 279, 10909, 353, 1399, 578, 4...
self.type_key(chrkey) self.env.key_clear() return
def press(self, key): from curses.ascii import ctrl, ESC
07c9e525fecac3908358ea88578b2a1cd303b85e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/07c9e525fecac3908358ea88578b2a1cd303b85e/console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11779, 12, 2890, 16, 498, 4672, 628, 30436, 18, 9184, 1930, 6414, 16, 512, 2312, 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, 11779, 12, 2890, 16, 498, 4672, 628, 30436, 18, 9184, 1930, 6414, 16, 512, 2312, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
total = self.n_success + self.n_fail + self.n_error if self.status is not None: if ok: self.status("Ran %d tests. OK" % total) else: self.status( "Ran %d tests. %d failed, %d errors." % (total, self.n_fail, self.n_error) )
if ok: if self.on_success is not None: self.on_success() else: if self.on_failure is not None: self.on_failure()
def done(self): ok = not (self.n_error or self.n_fail) total = self.n_success + self.n_fail + self.n_error if self.status is not None: if ok: self.status("Ran %d tests. OK" % total) else: self.status( "Ran %d tests. %d failed, %d errors." % (total, self.n_fail, self.n_error) )
958f10c55a04380a7b01daf5a841383cfd9f91bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14942/958f10c55a04380a7b01daf5a841383cfd9f91bd/qtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2731, 12, 2890, 4672, 1529, 273, 486, 261, 2890, 18, 82, 67, 1636, 578, 365, 18, 82, 67, 6870, 13, 309, 1529, 30, 309, 365, 18, 265, 67, 4768, 353, 486, 599, 30, 365, 18, 265, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2731, 12, 2890, 4672, 1529, 273, 486, 261, 2890, 18, 82, 67, 1636, 578, 365, 18, 82, 67, 6870, 13, 309, 1529, 30, 309, 365, 18, 265, 67, 4768, 353, 486, 599, 30, 365, 18, 265, 67, ...
dir = os.path.dirname(self.database_path)
dir = os.path.expanduser('~/Library')
def initialize_database(self): self.library_path = prefs['library_path'] self.olddb = None if self.library_path is None: # Need to migrate to new database layout QMessageBox.information(self, 'Database format changed', '''\
6b1d2571c1cff06fae9a975bebc5cf7784553814 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/6b1d2571c1cff06fae9a975bebc5cf7784553814/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 6231, 12, 2890, 4672, 365, 18, 12083, 67, 803, 273, 15503, 3292, 12083, 67, 803, 3546, 365, 18, 355, 449, 70, 273, 599, 309, 365, 18, 12083, 67, 803, 353, 599, 30, 468, 123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 6231, 12, 2890, 4672, 365, 18, 12083, 67, 803, 273, 15503, 3292, 12083, 67, 803, 3546, 365, 18, 355, 449, 70, 273, 599, 309, 365, 18, 12083, 67, 803, 353, 599, 30, 468, 123...
events = kq.control(None, 4, 1)
time.sleep(1.0) else: self.fail('timeout waiting for event notifications')
def test_queue_event(self): serverSocket = socket.socket() serverSocket.bind(('127.0.0.1', 0)) serverSocket.listen(1) client = socket.socket() client.setblocking(False) try: client.connect(('127.0.0.1', serverSocket.getsockname()[1])) except socket.error, e: self.assertEquals(e.args[0], errno.EINPROGRESS) else: #raise AssertionError("Connect should have raised EINPROGRESS") pass # FreeBSD doesn't raise an exception here server, addr = serverSocket.accept()
c187d11af3407ea424d1debf8a37775ea7cdf95f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/c187d11af3407ea424d1debf8a37775ea7cdf95f/test_kqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4000, 67, 2575, 12, 2890, 4672, 1438, 4534, 273, 2987, 18, 7814, 1435, 1438, 4534, 18, 4376, 12, 2668, 14260, 18, 20, 18, 20, 18, 21, 2187, 374, 3719, 1438, 4534, 18, 18085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4000, 67, 2575, 12, 2890, 4672, 1438, 4534, 273, 2987, 18, 7814, 1435, 1438, 4534, 18, 4376, 12, 2668, 14260, 18, 20, 18, 20, 18, 21, 2187, 374, 3719, 1438, 4534, 18, 18085, ...
sumfilesizeDataset += contents_size[guid]
try: sumfilesizeDataset += contents_size[guid] except: pass
def get_contents(self,backnav=False, overlap=True, filesize=False): '''Helper function to access dataset content'''
e5874c7e4d4882a55d796888a7a11ba73803090c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/e5874c7e4d4882a55d796888a7a11ba73803090c/DQ2Dataset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3980, 12, 2890, 16, 823, 11589, 33, 8381, 16, 7227, 33, 5510, 16, 14104, 33, 8381, 4672, 9163, 2276, 445, 358, 2006, 3709, 913, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3980, 12, 2890, 16, 823, 11589, 33, 8381, 16, 7227, 33, 5510, 16, 14104, 33, 8381, 4672, 9163, 2276, 445, 358, 2006, 3709, 913, 26418, 2, -100, -100, -100, -100, -100, -100, -...
def argsort(self, axis=-1, kind='quicksort', order=None):
def argsort(self, axis=None, kind='quicksort', order=None):
def argsort(self, axis=-1, kind='quicksort', order=None): """Returns the indices that would sort this array. Refer to `numpy.argsort` for full documentation."""
5447a65985b27540cf31abe349a10b767f6f417e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/5447a65985b27540cf31abe349a10b767f6f417e/farray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22482, 12, 2890, 16, 2654, 33, 7036, 16, 3846, 2218, 19525, 3804, 2187, 1353, 33, 7036, 4672, 3536, 1356, 326, 4295, 716, 4102, 1524, 333, 526, 18, 225, 868, 586, 358, 1375, 15974, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22482, 12, 2890, 16, 2654, 33, 7036, 16, 3846, 2218, 19525, 3804, 2187, 1353, 33, 7036, 4672, 3536, 1356, 326, 4295, 716, 4102, 1524, 333, 526, 18, 225, 868, 586, 358, 1375, 15974, 18, ...
raise wikipedia.CaptchaError(id)
raise CaptchaError(id)
def solveCaptcha(self, data): captchaW = re.compile('<label for="wpCaptchaWord">(?P<question>[^<]*)</label>') captchaR = re.compile('<input type="hidden" name="wpCaptchaId" id="wpCaptchaId" value="(?P<id>\d+)" />') match = captchaR.search(data) if match: id = match.group('id') match = captchaW.search(data) if match: answer = input('What is the answer to the captcha "%s" ?' % match.group('question')) else: if not config.solve_captcha: raise wikipedia.CaptchaError(id) url = self.protocol() + '://' + self.hostname() + self.captcha_image_address(id) answer = ui.askForCaptcha(url) return {'id':id, 'answer':answer} Recaptcha = re.compile('<script type="text/javascript" src="http://api\.recaptcha\.net/[^"]*"></script>') if Recaptcha.search(data): raise wikipedia.CaptchaError('We have been prompted for a ReCaptcha, but pywikipedia does not yet support ReCaptchas') return None
ea4681407ef0933b7cfd408210a6435cb51d6105 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/ea4681407ef0933b7cfd408210a6435cb51d6105/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12439, 26837, 12, 2890, 16, 501, 4672, 21083, 59, 273, 283, 18, 11100, 2668, 32, 1925, 364, 1546, 8612, 26837, 3944, 6441, 3680, 52, 32, 4173, 34, 5969, 32, 15471, 1757, 1925, 1870, 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, 12439, 26837, 12, 2890, 16, 501, 4672, 21083, 59, 273, 283, 18, 11100, 2668, 32, 1925, 364, 1546, 8612, 26837, 3944, 6441, 3680, 52, 32, 4173, 34, 5969, 32, 15471, 1757, 1925, 1870, 13, ...
response = self._dispatch()
response = self._dispatch_raw()
def dispatch(self): """Dispatch callback and return result.""" response = self._dispatch() if not response: raise InvalidResponseError("Empty response") try: payload = deserialize(response) except ValueError, exc: raise InvalidResponseError(str(exc))
2d642a746ca74cfbd601f604a9b6cfb5664e3bb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/2d642a746ca74cfbd601f604a9b6cfb5664e3bb7/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 12, 2890, 4672, 3536, 5325, 1348, 471, 327, 563, 12123, 766, 273, 365, 6315, 10739, 67, 1899, 1435, 309, 486, 766, 30, 1002, 1962, 28551, 2932, 1921, 766, 7923, 775, 30, 2385, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 12, 2890, 4672, 3536, 5325, 1348, 471, 327, 563, 12123, 766, 273, 365, 6315, 10739, 67, 1899, 1435, 309, 486, 766, 30, 1002, 1962, 28551, 2932, 1921, 766, 7923, 775, 30, 2385, 273,...
buf = buf[:148] + "%06o\0" % chksum + buf[155:]
buf = buf[:-364] + "%06o\0" % chksum + buf[-357:]
def tobuf(self, posix=False): """Return a tar header block as a 512 byte string. """ parts = [ stn(self.name, 100), itn(self.mode & 07777, 8, posix), itn(self.uid, 8, posix), itn(self.gid, 8, posix), itn(self.size, 12, posix), itn(self.mtime, 12, posix), " ", # checksum field self.type, stn(self.linkname, 100), stn(MAGIC, 6), stn(VERSION, 2), stn(self.uname, 32), stn(self.gname, 32), itn(self.devmajor, 8, posix), itn(self.devminor, 8, posix), stn(self.prefix, 155) ]
3354f285b958bbe8fa99b0091fcd4335251dec71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3354f285b958bbe8fa99b0091fcd4335251dec71/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 1203, 487, 279, 13908, 1160, 533, 18, 3536, 2140, 273, 306, 384, 82, 12, 2890, 18, 529, 16, 2130, 3631, 518,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4385, 12, 2890, 16, 16366, 33, 8381, 4672, 3536, 990, 279, 8232, 1446, 1203, 487, 279, 13908, 1160, 533, 18, 3536, 2140, 273, 306, 384, 82, 12, 2890, 18, 529, 16, 2130, 3631, 518,...
body = root.getElementsByTagName("body").pop()
body = root.getElementsByTagName("body") if not body: dom.unlink() return [] body = body.pop()
def import_content(self, content): dom = minidom.parseString(content) root = dom.documentElement body = root.getElementsByTagName("body").pop() subscriptions = self._walk_outline(body) dom.unlink() return subscriptions
b65e08380d82a14bf4b29a24967774702520fa70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/b65e08380d82a14bf4b29a24967774702520fa70/opml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1745, 12, 2890, 16, 913, 4672, 4092, 273, 1131, 350, 362, 18, 2670, 780, 12, 1745, 13, 1365, 273, 4092, 18, 5457, 1046, 1417, 273, 1365, 18, 588, 3471, 10401, 2932, 3432, 792...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1745, 12, 2890, 16, 913, 4672, 4092, 273, 1131, 350, 362, 18, 2670, 780, 12, 1745, 13, 1365, 273, 4092, 18, 5457, 1046, 1417, 273, 1365, 18, 588, 3471, 10401, 2932, 3432, 792...
self.mox.StubOutWithMock(gclient_utils, 'subprocess')
self.mox.StubOutWithMock(gclient.gclient_utils, 'subprocess')
def setUp(self): BaseTestCase.setUp(self) self.mox.StubOutWithMock(gclient.os.path, 'exists') self.mox.StubOutWithMock(gclient.os.path, 'isfile') self.mox.StubOutWithMock(gclient.os.path, 'isdir') self.mox.StubOutWithMock(gclient.os, 'remove') self.mox.StubOutWithMock(gclient.sys, 'stdout') self.mox.StubOutWithMock(gclient_utils, 'subprocess') # These are not tested. self.mox.StubOutWithMock(gclient_utils, 'FileRead') self.mox.StubOutWithMock(gclient_utils, 'FileWrite') self.mox.StubOutWithMock(gclient_utils, 'SubprocessCall') self.mox.StubOutWithMock(gclient_utils, 'RemoveDirectory') # Mock them to be sure nothing bad happens. self.mox.StubOutWithMock(gclient_scm, 'CaptureSVN') self._CaptureSVNInfo = gclient_scm.CaptureSVNInfo self.mox.StubOutWithMock(gclient_scm, 'CaptureSVNInfo') self.mox.StubOutWithMock(gclient_scm, 'CaptureSVNStatus') self.mox.StubOutWithMock(gclient_scm, 'RunSVN') self.mox.StubOutWithMock(gclient_scm, 'RunSVNAndGetFileList') self._gclient_gclient = gclient.GClient gclient.GClient = self.mox.CreateMockAnything() self._scm_wrapper = gclient_scm.CreateSCM gclient_scm.CreateSCM = self.mox.CreateMockAnything()
90ba161b70b445eba62b2a376e4fa2f508854e13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/90ba161b70b445eba62b2a376e4fa2f508854e13/gclient_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3360, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 81, 2409, 18, 11974, 1182, 1190, 9865, 12, 75, 2625, 18, 538, 18, 803, 16, 296, 1808, 6134, 365, 18, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3360, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 81, 2409, 18, 11974, 1182, 1190, 9865, 12, 75, 2625, 18, 538, 18, 803, 16, 296, 1808, 6134, 365, 18, 81...
if type(date) is type((0, 0)) and len(date) == 2:
if isinstance(date, tuple) and len(date) == 2:
def parsedate(date, formats=None, defaults=None): """parse a localized date/time string and return a (unixtime, offset) tuple. The date may be a "unixtime offset" string or in one of the specified formats. If the date already is a (unixtime, offset) tuple, it is returned. """ if not date: return 0, 0 if type(date) is type((0, 0)) and len(date) == 2: return date if not formats: formats = defaultdateformats date = date.strip() try: when, offset = map(int, date.split(' ')) except ValueError: # fill out defaults if not defaults: defaults = {} now = makedate() for part in "d mb yY HI M S".split(): if part not in defaults: if part[0] in "HMS": defaults[part] = "00" elif part[0] in "dm": defaults[part] = "1" else: defaults[part] = datestr(now, "%" + part[0]) for format in formats: try: when, offset = strdate(date, format, defaults) except (ValueError, OverflowError): pass else: break else: raise Abort(_('invalid date: %r ') % date) # validate explicit (probably user-specified) date and # time zone offset. values must fit in signed 32 bits for # current 32-bit linux runtimes. timezones go from UTC-12 # to UTC+14 if abs(when) > 0x7fffffff: raise Abort(_('date exceeds 32 bits: %d') % when) if offset < -50400 or offset > 43200: raise Abort(_('impossible time zone offset: %d') % offset) return when, offset
e7337b1971e01497436d748d705e3b068a17047d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/e7337b1971e01497436d748d705e3b068a17047d/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 712, 12, 712, 16, 6449, 33, 7036, 16, 3467, 33, 7036, 4672, 3536, 2670, 279, 13596, 1509, 19, 957, 533, 471, 327, 279, 261, 21136, 957, 16, 1384, 13, 3193, 18, 225, 1021, 1509, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 712, 12, 712, 16, 6449, 33, 7036, 16, 3467, 33, 7036, 4672, 3536, 2670, 279, 13596, 1509, 19, 957, 533, 471, 327, 279, 261, 21136, 957, 16, 1384, 13, 3193, 18, 225, 1021, 1509, ...
filePrefixes.add(os.path.dirname(path)) fileIds.add(f.fileId())
fileIdsPathMap[path] = f.fileId()
def _createPackageChangeSet(repos, db, cfg, bldList, recipeObj, sourceVersion, targetLabel=None, alwaysBumpCount=False, policyTroves=None, signatureKey = None): """ Helper function for cookPackage object. See there for most parameter definitions. BldList is the list of components created by cooking a package recipe. RecipeObj is the instantiation of the package recipe. """ # determine final version and flavor - flavor is shared among # all components, so just grab the first one. flavor = bldList[0].flavor.copy() componentNames = [ x.name for x in bldList ] targetVersion = nextVersion(repos, db, componentNames, sourceVersion, flavor, targetLabel, alwaysBumpCount=alwaysBumpCount) buildTime = time.time() sourceName = recipeObj.__class__.name + ':source' buildReqs = set((x.getName(), x.getVersion(), x.getFlavor()) for x in recipeObj.buildReqMap.itervalues()) buildReqs = getRecursiveRequirements(db, buildReqs, cfg.flavor) # create all of the package troves we need, and let each package provide # itself grpMap = {} filePrefixes = set() fileIds = set() for buildPkg in bldList: compName = buildPkg.getName() main, comp = compName.split(':') # Extract file prefixes and file ids for (path, (realPath, f)) in buildPkg.iteritems(): filePrefixes.add(os.path.dirname(path)) fileIds.add(f.fileId()) if main not in grpMap: grpMap[main] = trove.Trove(main, targetVersion, flavor, None) grpMap[main].setSize(0) grpMap[main].setSourceName(sourceName) grpMap[main].setBuildTime(buildTime) grpMap[main].setConaryVersion(constants.version) if policyTroves: grpMap[main].setPolicyProviders(policyTroves) grpMap[main].setLoadedTroves(recipeObj.getLoadedTroves()) grpMap[main].setBuildRequirements(buildReqs) grpMap[main].setBuildFlavor(use.allFlagsToFlavor(recipeObj.name)) provides = deps.DependencySet() provides.addDep(deps.TroveDependencies, deps.Dependency(main)) grpMap[main].setProvides(provides) grpMap[main].setIsCollection(True) grpMap[main].setIsDerived(recipeObj._isDerived) filePrefixes = list(filePrefixes) filePrefixes.sort() # Now eliminate prefixes of prefixes ret = [] oldp = None for p in filePrefixes: if oldp and p.startswith(oldp): continue ret.append(p) oldp = p filePrefixes = ret # Sort the file ids to make sure we get consistent behavior fileIds = sorted(fileIds) # look up the pathids used by our immediate predecessor troves. ident = _IdGen() searchBranch = targetVersion.branch() if targetLabel: # this keeps cook and emerge branchs from showing up searchBranch = searchBranch.parentBranch() if repos and not searchBranch.getHost() == 'local': versionDict = dict( [ (x, { searchBranch : None } ) for x in grpMap ] ) versionDict = repos.getTroveLeavesByBranch(versionDict) if not versionDict and searchBranch.hasParentBranch(): # there was no match on this branch; look uphill searchBranch = searchBranch.parentBranch() versionDict = dict((x, { searchBranch : None } ) for x in grpMap ) versionDict = repos.getTroveLeavesByBranch(versionDict) log.info('looking up pathids from repository history') # look up the pathids for every file that has been built by # this source component, following our branch ancestry while True: d = repos.getPackageBranchPathIds(sourceName, searchBranch, filePrefixes, fileIds) ident.merge(d) if not searchBranch.hasParentBranch(): break searchBranch = searchBranch.parentBranch() log.info('pathId lookup complete') built = [] packageList = [] perviousQuery = {} for buildPkg in bldList: # bldList only contains components compName = buildPkg.getName() main, comp = compName.split(':') assert(comp) grp = grpMap[main] (p, fileMap) = _createComponent(repos, buildPkg, targetVersion, ident) built.append((compName, p.getVersion().asString(), p.getFlavor())) packageList.append((None, p, fileMap)) p.setSourceName(sourceName) p.setBuildTime(buildTime) p.setConaryVersion(constants.version) p.setIsCollection(False) p.setIsDerived(recipeObj._isDerived) # Add build flavor p.setBuildFlavor(use.allFlagsToFlavor(recipeObj.name)) _signTrove(p, signatureKey) byDefault = recipeObj.byDefault(compName) grp.addTrove(compName, p.getVersion(), p.getFlavor(), byDefault = byDefault) if byDefault: grp.setSize(grp.getSize() + p.getSize()) if not targetVersion.isOnLocalHost(): # this keeps cook and emerge branchs from showing up searchBranch = targetVersion.branch() previousVersions = repos.getTroveLeavesByBranch( dict( ( x[1].getName(), { targetVersion.branch() : [ flavor ] } ) for x in packageList ) ) needTroves = [] for name in previousVersions: prevVersion = previousVersions[name].keys()[0] prevFlavor = previousVersions[name][prevVersion][0] needTroves.append((name, prevVersion, prevFlavor)) previousTroves = repos.getTroves(needTroves) previousTroveDict = dict( (x[0][0], x[1]) for x in itertools.izip(needTroves, previousTroves)) relativePackageList = [] needTroves = {} for empty, p, fileMap in packageList: if cfg.commitRelativeChangeset: oldTrove = previousTroveDict.get(p.getName(), None) else: oldTrove = None relativePackageList.append((oldTrove, p, fileMap)) packageList = relativePackageList changeSet = changeset.CreateFromFilesystem(packageList) for packageName in grpMap: changeSet.addPrimaryTrove(packageName, targetVersion, flavor) for grp in grpMap.values(): _signTrove(grp, signatureKey) grpDiff = grp.diff(None, absolute = 1)[0] changeSet.newTrove(grpDiff) return changeSet, built
e3de85c6ac4e6646b13442ebba235f6512d98a7c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/e3de85c6ac4e6646b13442ebba235f6512d98a7c/cook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 2261, 21565, 12, 15564, 16, 1319, 16, 2776, 16, 324, 1236, 682, 16, 16100, 2675, 16, 1084, 1444, 16, 1018, 2224, 33, 7036, 16, 3712, 38, 2801, 1380, 33, 8381, 16, 3329, 56, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 2261, 21565, 12, 15564, 16, 1319, 16, 2776, 16, 324, 1236, 682, 16, 16100, 2675, 16, 1084, 1444, 16, 1018, 2224, 33, 7036, 16, 3712, 38, 2801, 1380, 33, 8381, 16, 3329, 56, ...
for kernel in ['linux-2.6.18', 'linux-2.6.26']: run_command(['python', 'scons.py', kernel])
kernels = ['liblinux2.6.18.so', 'liblinux2.6.26.so'] run_command(['python', 'scons.py'] + kernels)
def build_nsc(): # XXX: Detect gcc major version(s) available to build supported stacks for kernel in ['linux-2.6.18', 'linux-2.6.26']: run_command(['python', 'scons.py', kernel])
ed8e3d23565bfd36c249a3273a6c288f830441be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1665/ed8e3d23565bfd36c249a3273a6c288f830441be/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 82, 1017, 13332, 468, 11329, 30, 13796, 314, 952, 7888, 1177, 12, 87, 13, 2319, 358, 1361, 3260, 19838, 282, 5536, 87, 273, 10228, 2941, 20132, 22, 18, 26, 18, 2643, 18, 2048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 82, 1017, 13332, 468, 11329, 30, 13796, 314, 952, 7888, 1177, 12, 87, 13, 2319, 358, 1361, 3260, 19838, 282, 5536, 87, 273, 10228, 2941, 20132, 22, 18, 26, 18, 2643, 18, 2048...
return _get_element(self, 'descendant::text:bookmark-start', text_name=name)
return _get_element(self, 'descendant::text:bookmark-start', text_name=name)
def get_bookmark_start_by_name(self, name): return _get_element(self, 'descendant::text:bookmark-start', text_name=name)
ce277637ece39c490aa0e17baab70b714a014dd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10612/ce277637ece39c490aa0e17baab70b714a014dd4/element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3618, 3355, 67, 1937, 67, 1637, 67, 529, 12, 2890, 16, 508, 4672, 327, 389, 588, 67, 2956, 12, 2890, 16, 296, 26236, 970, 2866, 955, 30, 3618, 3355, 17, 1937, 2187, 977, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3618, 3355, 67, 1937, 67, 1637, 67, 529, 12, 2890, 16, 508, 4672, 327, 389, 588, 67, 2956, 12, 2890, 16, 296, 26236, 970, 2866, 955, 30, 3618, 3355, 17, 1937, 2187, 977, 67,...
if isAllCaps(s1): species = 2 else: species = 1
try: [s1, s2] = string.splitfields(testSymbol, '-')
def isCurrent(symbol, species = 1): ok = 0 results = db.sql('select symbol, _Marker_Status_key from MRK_Marker ' + \ 'where _Species_key = %d ' % (species) + \ 'and symbol = "%s"' % (symbol), 'auto') for r in results: if r['symbol'] == symbol and r['_Marker_Status_key'] in [-2,1,3]: ok = 1 return ok
52f4e8b6e840b9f436b4119680c455853b0753f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/340/52f4e8b6e840b9f436b4119680c455853b0753f2/MRK_NomenTransgene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25694, 12, 7175, 16, 12891, 273, 404, 4672, 225, 1529, 273, 374, 1686, 273, 1319, 18, 4669, 2668, 4025, 3273, 16, 389, 7078, 67, 1482, 67, 856, 628, 490, 54, 47, 67, 7078, 296, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25694, 12, 7175, 16, 12891, 273, 404, 4672, 225, 1529, 273, 374, 1686, 273, 1319, 18, 4669, 2668, 4025, 3273, 16, 389, 7078, 67, 1482, 67, 856, 628, 490, 54, 47, 67, 7078, 296, 397, ...
AUTHORS: - Robert Bradshaw (2007-10): numerical algorithm - Robert Bradshaw (2008-10): algebraic algorithm
def minpoly(ex, var='x', algorithm=None, bits=None, degree=None, epsilon=0): r""" Return the minimal polynomial of self, if possible. INPUT: - ``var`` - polynomial variable name (default 'x') - ``algorithm`` - 'algebraic' or 'numerical' (default both, but with numerical first) - ``bits`` - the number of bits to use in numerical approx - ``degree`` - the expected algebraic degree - ``epsilon`` - return without error as long as f(self) epsilon, in the case that the result cannot be proven. All of the above parameters are optional, with epsilon=0, bits and degree tested up to 1000 and 24 by default respectively. The numerical algorithm will be faster if bits and/or degree are given explicitly. The algebraic algorithm ignores the last three parameters. OUTPUT: The minimal polynomial of self. If the numerical algorithm is used then it is proved symbolically when epsilon=0 (default). If the minimal polynomial could not be found, two distinct kinds of errors are raised. If no reasonable candidate was found with the given bit/degree parameters, a ``ValueError`` will be raised. If a reasonable candidate was found but (perhaps due to limits in the underlying symbolic package) was unable to be proved correct, a ``NotImplementedError`` will be raised. ALGORITHM: Two distinct algorithms are used, depending on the algorithm parameter. By default, the numerical algorithm is attempted first, then the algebraic one. Algebraic: Attempt to evaluate this expression in QQbar, using cyclotomic fields to resolve exponential and trig functions at rational multiples of pi, field extensions to handle roots and rational exponents, and computing compositums to represent the full expression as an element of a number field where the minimal polynomial can be computed exactly. The bits, degree, and epsilon parameters are ignored. Numerical: Computes a numerical approximation of ``self`` and use PARI's algdep to get a candidate minpoly `f`. If `f(\mathtt{self})`, evaluated to a higher precision, is close enough to 0 then evaluate `f(\mathtt{self})` symbolically, attempting to prove vanishing. If this fails, and ``epsilon`` is non-zero, return `f` if and only if `f(\mathtt{self}) < \mathtt{epsilon}`. Otherwise raise a ``ValueError`` (if no suitable candidate was found) or a ``NotImplementedError`` (if a likely candidate was found but could not be proved correct). EXAMPLES: First some simple examples:: sage: sqrt(2).minpoly() x^2 - 2 sage: minpoly(2^(1/3)) x^3 - 2 sage: minpoly(sqrt(2) + sqrt(-1)) x^4 - 2*x^2 + 9 sage: minpoly(sqrt(2)-3^(1/3)) x^6 - 6*x^4 + 6*x^3 + 12*x^2 + 36*x + 1 Works with trig and exponential functions too. :: sage: sin(pi/3).minpoly() x^2 - 3/4 sage: sin(pi/7).minpoly() x^6 - 7/4*x^4 + 7/8*x^2 - 7/64 sage: minpoly(exp(I*pi/17)) x^16 - x^15 + x^14 - x^13 + x^12 - x^11 + x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1 Here we verify it gives the same result as the abstract number field. :: sage: (sqrt(2) + sqrt(3) + sqrt(6)).minpoly() x^4 - 22*x^2 - 48*x - 23 sage: K.<a,b> = NumberField([x^2-2, x^2-3]) sage: (a+b+a*b).absolute_minpoly() x^4 - 22*x^2 - 48*x - 23 The minpoly function is used implicitly when creating number fields:: sage: x = var('x') sage: eqn = x^3 + sqrt(2)*x + 5 == 0 sage: a = solve(eqn, x)[0].rhs() sage: QQ[a] Number Field in a with defining polynomial x^6 + 10*x^3 - 2*x^2 + 25 Here we solve a cubic and then recover it from its complicated radical expansion. :: sage: f = x^3 - x + 1 sage: a = f.solve(x)[0].rhs(); a -1/2*(I*sqrt(3) + 1)*(1/18*sqrt(3)*sqrt(23) - 1/2)^(1/3) - 1/6*(-I*sqrt(3) + 1)/(1/18*sqrt(3)*sqrt(23) - 1/2)^(1/3) sage: a.minpoly() x^3 - x + 1 Note that simplification may be necessary to see that the minimal polynomial is correct. :: sage: a = sqrt(2)+sqrt(3)+sqrt(5) sage: f = a.minpoly(); f x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576 sage: f(a) ((((sqrt(2) + sqrt(3) + sqrt(5))^2 - 40)*(sqrt(2) + sqrt(3) + sqrt(5))^2 + 352)*(sqrt(2) + sqrt(3) + sqrt(5))^2 - 960)*(sqrt(2) + sqrt(3) + sqrt(5))^2 + 576 sage: f(a).expand() 0 Here we show use of the ``epsilon`` parameter. That this result is actually exact can be shown using the addition formula for sin, but maxima is unable to see that. :: sage: a = sin(pi/5) sage: a.minpoly(algorithm='numerical') Traceback (most recent call last): ... NotImplementedError: Could not prove minimal polynomial x^4 - 5/4*x^2 + 5/16 (epsilon 0.00000000000000e-1) sage: f = a.minpoly(algorithm='numerical', epsilon=1e-100); f x^4 - 5/4*x^2 + 5/16 sage: f(a).numerical_approx(100) 0.00000000000000000000000000000 The degree must be high enough (default tops out at 24). :: sage: a = sqrt(3) + sqrt(2) sage: a.minpoly(algorithm='numerical', bits=100, degree=3) Traceback (most recent call last): ... ValueError: Could not find minimal polynomial (100 bits, degree 3). sage: a.minpoly(algorithm='numerical', bits=100, degree=10) x^4 - 10*x^2 + 1 There is a difference between algorithm='algebraic' and algorithm='numerical':: sage: cos(pi/33).minpoly(algorithm='algebraic') x^10 + 1/2*x^9 - 5/2*x^8 - 5/4*x^7 + 17/8*x^6 + 17/16*x^5 - 43/64*x^4 - 43/128*x^3 + 3/64*x^2 + 3/128*x + 1/1024 sage: cos(pi/33).minpoly(algorithm='numerical') Traceback (most recent call last): ... NotImplementedError: Could not prove minimal polynomial x^10 + 1/2*x^9 - 5/2*x^8 - 5/4*x^7 + 17/8*x^6 + 17/16*x^5 - 43/64*x^4 - 43/128*x^3 + 3/64*x^2 + 3/128*x + 1/1024 (epsilon ...) Sometimes it fails, as it must given that some numbers aren't algebraic:: sage: sin(1).minpoly(algorithm='numerical') Traceback (most recent call last): ... ValueError: Could not find minimal polynomial (1000 bits, degree 24). .. note:: Of course, failure to produce a minimal polynomial does not necessarily indicate that this number is transcendental. AUTHORS: - Robert Bradshaw (2007-10): numerical algorithm - Robert Bradshaw (2008-10): algebraic algorithm """ if algorithm is None or algorithm.startswith('numeric'): bits_list = [bits] if bits else [100,200,500,1000] degree_list = [degree] if degree else [2,4,8,12,24] for bits in bits_list: a = ex.numerical_approx(bits) check_bits = int(1.25 * bits + 80) aa = ex.numerical_approx(check_bits) for degree in degree_list: f = QQ[var](algdep(a, degree)) # TODO: use the known_bits parameter? # If indeed we have found a minimal polynomial, # it should be accurate to a much higher precision. error = abs(f(aa)) dx = ~RR(Integer(1) << (check_bits - degree - 2)) expected_error = abs(f.derivative()(CC(aa))) * dx if error < expected_error: # Degree might have been an over-estimate, factor because we want (irreducible) minpoly. ff = f.factor() for g, e in ff: lead = g.leading_coefficient() if lead != 1: g = g / lead expected_error = abs(g.derivative()(CC(aa))) * dx error = abs(g(aa)) if error < expected_error: # See if we can prove equality exactly if g(ex).simplify_trig().simplify_radical() == 0: return g # Otherwise fall back to numerical guess elif epsilon and error < epsilon: return g elif algorithm is not None: raise NotImplementedError, "Could not prove minimal polynomial %s (epsilon %s)" % (g, RR(error).str(no_sci=False)) if algorithm is not None: raise ValueError, "Could not find minimal polynomial (%s bits, degree %s)." % (bits, degree) if algorithm is None or algorithm == 'algebraic': from sage.rings.all import QQbar return QQ[var](QQbar(ex).minpoly()) raise ValueError, "Unknown algorithm: %s" % algorithm
86e87880bfb86915da047327d5455d1e0168d6ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/86e87880bfb86915da047327d5455d1e0168d6ef/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 16353, 12, 338, 16, 569, 2218, 92, 2187, 4886, 33, 7036, 16, 4125, 33, 7036, 16, 10782, 33, 7036, 16, 12263, 33, 20, 4672, 436, 8395, 2000, 326, 16745, 16991, 434, 365, 16, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 16353, 12, 338, 16, 569, 2218, 92, 2187, 4886, 33, 7036, 16, 4125, 33, 7036, 16, 10782, 33, 7036, 16, 12263, 33, 20, 4672, 436, 8395, 2000, 326, 16745, 16991, 434, 365, 16, 309, ...
tokenlist[ikey] = (dictvalue,i)
tokenlist[ikey] = ParseResultsWithOffset(dictvalue,i)
def postParse( self, instring, loc, tokenlist ): for i,tok in enumerate(tokenlist): ikey = _ustr(tok[0]).strip() if len(tok)==1: tokenlist[ikey] = ("",i) elif len(tok)==2 and not isinstance(tok[1],ParseResults): tokenlist[ikey] = (tok[1],i) else: dictvalue = tok.copy() #ParseResults(i) del dictvalue[0] if len(dictvalue)!= 1 or (isinstance(dictvalue,ParseResults) and dictvalue.keys()): tokenlist[ikey] = (dictvalue,i) else: tokenlist[ikey] = (dictvalue[0],i)
29b3e3c7804d6a8e68a658a5ebdd7674f71d33ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/29b3e3c7804d6a8e68a658a5ebdd7674f71d33ed/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 3201, 12, 365, 16, 316, 1080, 16, 1515, 16, 1147, 1098, 262, 30, 364, 277, 16, 17692, 316, 4241, 12, 2316, 1098, 4672, 277, 856, 273, 389, 27008, 12, 17692, 63, 20, 65, 2934, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 3201, 12, 365, 16, 316, 1080, 16, 1515, 16, 1147, 1098, 262, 30, 364, 277, 16, 17692, 316, 4241, 12, 2316, 1098, 4672, 277, 856, 273, 389, 27008, 12, 17692, 63, 20, 65, 2934, 6...
self.current_stage_tick = 0
def set_max_ticks(self, m): self._next_stage() self.current_stage_tick = 0 self.current_stage_max = m
4719b68626c47e5b4e78e019c8a48ff3506576c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/4719b68626c47e5b4e78e019c8a48ff3506576c8/async_processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1896, 67, 11767, 12, 2890, 16, 312, 4672, 365, 6315, 4285, 67, 12869, 1435, 365, 18, 2972, 67, 12869, 67, 1896, 273, 312, 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, 444, 67, 1896, 67, 11767, 12, 2890, 16, 312, 4672, 365, 6315, 4285, 67, 12869, 1435, 365, 18, 2972, 67, 12869, 67, 1896, 273, 312, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.assert_re_match(r"^Usage: gcc", out)
self.assert_re_match(r"^Usage: [^ ]*gcc", out)
def runtest(self): out, err = self.runcmd("DISTCC_HOSTS=localhost " + self.distcc() + _gcc + " --help") if re.search('distcc', out): raise ("gcc help contains \"distcc\": \"%s\"" % out) self.assert_re_match(r"^Usage: gcc", out)
fdaf4c739372bb2a573823fa0779dc82dc60ac67 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7392/fdaf4c739372bb2a573823fa0779dc82dc60ac67/testdistcc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3813, 12, 2890, 4672, 596, 16, 393, 273, 365, 18, 86, 551, 1264, 2932, 2565, 882, 6743, 67, 8908, 55, 33, 13014, 315, 397, 365, 18, 4413, 952, 1435, 397, 389, 75, 952, 397, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 12, 2890, 4672, 596, 16, 393, 273, 365, 18, 86, 551, 1264, 2932, 2565, 882, 6743, 67, 8908, 55, 33, 13014, 315, 397, 365, 18, 4413, 952, 1435, 397, 389, 75, 952, 397, 315...
self.assertEqual(r[TrapLong(5):TrapLong(10)], r[5:10])
def test_subclasses(self): r = list(range(10)) self.assertEqual(r[TrapInt(5):TrapInt(10)], r[5:10]) self.assertEqual(r[TrapLong(5):TrapLong(10)], r[5:10]) self.assertEqual(slice(TrapInt()).indices(0), (0,0,1)) self.assertEqual(slice(TrapLong(0)).indices(0), (0,0,1))
0d4cbc19eb2c7ce9725c851f862b87c26a75c899 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/0d4cbc19eb2c7ce9725c851f862b87c26a75c899/test_index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1717, 4701, 12, 2890, 4672, 436, 273, 666, 12, 3676, 12, 2163, 3719, 365, 18, 11231, 5812, 12, 86, 63, 56, 1266, 1702, 12, 25, 4672, 56, 1266, 1702, 12, 2163, 13, 6487, 436...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1717, 4701, 12, 2890, 4672, 436, 273, 666, 12, 3676, 12, 2163, 3719, 365, 18, 11231, 5812, 12, 86, 63, 56, 1266, 1702, 12, 25, 4672, 56, 1266, 1702, 12, 2163, 13, 6487, 436...
navtrail += ' &gt; <a class="navtrail" href="%s/record/%s">%s</a> &gt; %s' % \
navtrail += ' <a class="navtrail" href="%s/record/%s">%s</a> &gt; %s' % \
def page_start(req, of, cc, as, ln, uid, title_message=None, description='', keywords='', recID=-1, tab=''): "Start page according to given output format." _ = gettext_set_language(ln) if not title_message: title_message = _("Search Results") if not req: return # we were called from CLI content_type = get_output_format_content_type(of) if of.startswith('x'): if of == 'xr': # we are doing RSS output req.content_type = "application/rss+xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") else: # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": pass # nothing to do, we shall only return list of recIDs elif content_type == 'text/html': # we are doing HTML output: req.content_type = "text/html" req.send_http_header() if not description: description = "%s %s." % (cc, _("Search Results")) if not keywords: keywords = "%s, WebSearch, %s" % (get_coll_i18nname(CFG_SITE_NAME, ln), get_coll_i18nname(cc, ln)) argd = {} if req.args: argd = cgi.parse_qs(req.args) rssurl = websearch_templates.build_rss_url(argd) navtrail = create_navtrail_links(cc, as, ln) navtrail_append_title_p = 1 # FIXME: Find a good point to put this code. # This is a nice hack to trigger jsMath only when displaying single # records. if of.lower() in CFG_WEBSEARCH_USE_JSMATH_FOR_FORMATS: metaheaderadd = """ <script type='text/javascript'> jsMath = { styles: {'#jsMath_button': 'display: none'}, Controls: {cookie: {printwarn: 0}} }; </script> <script src='/jsMath/easy/invenio-jsmath.js' type='text/javascript'></script>
9480ea62e68ea5f495cbb9bb7eda496e44234f74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/9480ea62e68ea5f495cbb9bb7eda496e44234f74/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1363, 67, 1937, 12, 3658, 16, 434, 16, 4946, 16, 487, 16, 7211, 16, 4555, 16, 2077, 67, 2150, 33, 7036, 16, 2477, 2218, 2187, 7093, 2218, 2187, 1950, 734, 29711, 21, 16, 3246, 2218, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1363, 67, 1937, 12, 3658, 16, 434, 16, 4946, 16, 487, 16, 7211, 16, 4555, 16, 2077, 67, 2150, 33, 7036, 16, 2477, 2218, 2187, 7093, 2218, 2187, 1950, 734, 29711, 21, 16, 3246, 2218, ...
log.info('%s: remove %s' % (self.name, String(rec.name)))
log.info('%s: remove %s' % (self.name, String(remote.recording.name)))
def check_recordings(self): """ Check the internal list of recordings and add or remove them from the external application. """ if self.check_timer: notifier.removeTimer(self.check_timer) for remote in copy.copy(self.recordings): if remote.id == IN_PROGRESS: # already checking break if remote.id == UNKNOWN_ID and not remote.valid: # remove it from the list, the external app still doesn't # know about this self.recordings.remove(rec) continue if remote.id == UNKNOWN_ID: # add the recording rec = remote.recording channel = self.channels[rec.channel] filename = self.get_url(rec) log.info('%s: schedule %s' % (self.name, String(rec.name))) self.entity.call('vdr.record', self.__vdr_record, remote.device, channel, remote.start, rec.stop + rec.stop_padding, filename, ()) remote.id = IN_PROGRESS break if not remote.valid: # remove the recording log.info('%s: remove %s' % (self.name, String(rec.name))) try: self.entity.call('vdr.remove', self.__vdr_remove, remote.id) except: pass self.recordings.remove(remote) break # return False, the function will be rescheduled by mbus return return False
2a82d5c372e63e41aba7e8fa39f7a755a784e2a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/2a82d5c372e63e41aba7e8fa39f7a755a784e2a0/external.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 3366, 899, 12, 2890, 4672, 3536, 2073, 326, 2713, 666, 434, 1409, 899, 471, 527, 578, 1206, 2182, 628, 326, 3903, 2521, 18, 3536, 309, 365, 18, 1893, 67, 12542, 30, 19057, 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, 866, 67, 3366, 899, 12, 2890, 4672, 3536, 2073, 326, 2713, 666, 434, 1409, 899, 471, 527, 578, 1206, 2182, 628, 326, 3903, 2521, 18, 3536, 309, 365, 18, 1893, 67, 12542, 30, 19057, 18,...
dc.SetTextForeground(lightColour)
dc.SetTextForeground(self.lightColour)
def DrawMonth(self, dc, startDate, y, highlightDate = False): """ draw a single month return the updated value of y """ dc.SetTextForeground(wx.BLACK);
b4bffc7cad7daee9a037b7296130e65ad5d69367 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b4bffc7cad7daee9a037b7296130e65ad5d69367/minical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 5445, 12, 2890, 16, 6744, 16, 12572, 16, 677, 16, 8839, 1626, 273, 1083, 4672, 3536, 3724, 279, 2202, 3138, 327, 326, 3526, 460, 434, 677, 3536, 6744, 18, 694, 1528, 23206, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 5445, 12, 2890, 16, 6744, 16, 12572, 16, 677, 16, 8839, 1626, 273, 1083, 4672, 3536, 3724, 279, 2202, 3138, 327, 326, 3526, 460, 434, 677, 3536, 6744, 18, 694, 1528, 23206, 12, ...
return True, r2, touch_loc
return True, r2, touch_loc_bl
def reach(self, point, pressure_thres, move_back_distance): self.set_pressure_threshold(pressure_thres) loc = self.current_location()[0] front_loc = point.copy() front_loc[0,0] = loc[0,0]
7afbc453c5c750798bfc45712af1852e65d80e2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/7afbc453c5c750798bfc45712af1852e65d80e2e/linear_move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9287, 12, 2890, 16, 1634, 16, 17590, 67, 451, 455, 16, 3635, 67, 823, 67, 8969, 4672, 365, 18, 542, 67, 17103, 67, 8699, 12, 17103, 67, 451, 455, 13, 1515, 273, 365, 18, 2972, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9287, 12, 2890, 16, 1634, 16, 17590, 67, 451, 455, 16, 3635, 67, 823, 67, 8969, 4672, 365, 18, 542, 67, 17103, 67, 8699, 12, 17103, 67, 451, 455, 13, 1515, 273, 365, 18, 2972, 67, ...
gv_largedummy = make_largedummy(rgenop) gv_add1 = make_adder(rgenop, 1)
# def f(x, y):
b35f75177afb43e727dffc43fa04ad88fdb0b837 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/b35f75177afb43e727dffc43fa04ad88fdb0b837/rgenop_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 284, 12, 92, 16, 677, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 284, 12, 92, 16, 677, 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, ...
elif name=='max_age': cookie = '%s; Max-Age="%s"' % (cookie,v) elif name=='comment': cookie = '%s; Comment="%s"' % (cookie,v)
elif name=='max_age': cookie = '%s; Max-Age=%s' % (cookie,v) elif name=='comment': cookie = '%s; Comment=%s' % (cookie,v)
def _cookie_list(self):
349fac2452df2de544bd34705932de86103ab82e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/349fac2452df2de544bd34705932de86103ab82e/Response.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8417, 67, 1098, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8417, 67, 1098, 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...
for i in environ['PATH'].split(':'): print i
def main(): parse_arguments() set_path('') check_controllers() check_logicaldisks() check_physicaldisks() for i in environ['PATH'].split(':'): print i end()
5f628114bc14885c3da679fe1555528c9d118aed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9255/5f628114bc14885c3da679fe1555528c9d118aed/check_hpacucli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1109, 67, 7099, 1435, 444, 67, 803, 2668, 6134, 866, 67, 20171, 1435, 866, 67, 20300, 28577, 1435, 866, 67, 20441, 28577, 1435, 679, 1435, 282, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 2774, 13332, 1109, 67, 7099, 1435, 444, 67, 803, 2668, 6134, 866, 67, 20171, 1435, 866, 67, 20300, 28577, 1435, 866, 67, 20441, 28577, 1435, 679, 1435, 282, 2, -100, -100, -100, -100, -1...
aboutDialog = gnome.ui.GnomeAbout ("Kickstart Configurator", "2.0",
aboutDialog = gnome.ui.GnomeAbout ("Kickstart Configurator", "1.95",
def on_about_activate(self, args): aboutDialog = gnome.ui.GnomeAbout ("Kickstart Configurator", "2.0", "Copyright (c) 2000, 2001 Red Hat, Inc.", ["Brent Fox <bfox@redhat.com>", "Tammy Fox <tfox@redhat.com>"], "A graphical interface for creating a basic kickstart file.") aboutDialog.run_and_close()
62f09e04bba899311c4bed7fbf217da872489434 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/62f09e04bba899311c4bed7fbf217da872489434/ksconfig_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 21071, 67, 10014, 12, 2890, 16, 833, 4672, 2973, 6353, 273, 22908, 1742, 18, 4881, 18, 43, 82, 1742, 24813, 7566, 47, 1200, 1937, 1903, 10662, 3113, 315, 21, 18, 8778, 3113, 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, 603, 67, 21071, 67, 10014, 12, 2890, 16, 833, 4672, 2973, 6353, 273, 22908, 1742, 18, 4881, 18, 43, 82, 1742, 24813, 7566, 47, 1200, 1937, 1903, 10662, 3113, 315, 21, 18, 8778, 3113, 3...
raise UsageError('dependant module "%s" not found'
raise UsageError('dependent module "%s" not found'
def get_module_list(self, seed, skip=[]): '''gets a list of module objects (in correct dependency order) needed to build the modules in the seed list''' #"
86f380e1b390c7da9579bf8d28f6d4f59fa4df7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/86f380e1b390c7da9579bf8d28f6d4f59fa4df7e/moduleset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2978, 67, 1098, 12, 2890, 16, 5009, 16, 2488, 33, 8526, 4672, 9163, 14665, 279, 666, 434, 1605, 2184, 261, 267, 3434, 4904, 1353, 13, 3577, 358, 1361, 326, 4381, 316, 326, 500...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 2978, 67, 1098, 12, 2890, 16, 5009, 16, 2488, 33, 8526, 4672, 9163, 14665, 279, 666, 434, 1605, 2184, 261, 267, 3434, 4904, 1353, 13, 3577, 358, 1361, 326, 4381, 316, 326, 500...
if 'resourceBrokers' in dir(self.directors[submitPool]['director']) and self.directors[submitPool]['director'].resourceBrokers:
if 'resourceBrokers' in dir( self.directors[submitPool]['director'] ) and self.directors[submitPool]['director'].resourceBrokers:
def __checkSubmitPools(self): # this method is called at initialization and at the beginning of each execution cycle # in this way running parameters can be dynamically changed via the remote # configuration.
2167c40fe092d0205e599c452b700e4f2aaec45c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/2167c40fe092d0205e599c452b700e4f2aaec45c/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 11620, 16639, 12, 2890, 4672, 468, 333, 707, 353, 2566, 622, 10313, 471, 622, 326, 8435, 434, 1517, 4588, 8589, 468, 316, 333, 4031, 3549, 1472, 848, 506, 18373, 3550, 3970, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 1893, 11620, 16639, 12, 2890, 4672, 468, 333, 707, 353, 2566, 622, 10313, 471, 622, 326, 8435, 434, 1517, 4588, 8589, 468, 316, 333, 4031, 3549, 1472, 848, 506, 18373, 3550, 3970, ...
self.contents.remove(collection)
def deleteItem(collection):
fa32d123d616db04372ead057fdb1c7217bea690 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/fa32d123d616db04372ead057fdb1c7217bea690/SideBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 1180, 12, 5548, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 1180, 12, 5548, 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, -...
self.interface = interfaces.base_interface.BaseSystemInterface() self.pymw_master = pymw.PyMW_Master(self.interface, use_state_records=True)
self.interface = pymw.interfaces.base_interface.BaseSystemInterface() self.pymw_master = pymw.pymw.PyMW_Master(self.interface, use_state_records=True)
def setUp(self): self.interface = interfaces.base_interface.BaseSystemInterface() self.pymw_master = pymw.PyMW_Master(self.interface, use_state_records=True)
d86b656c07187e937a2710c0b9c97e36440c131d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8868/d86b656c07187e937a2710c0b9c97e36440c131d/test_cases.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 5831, 273, 2395, 81, 91, 18, 15898, 18, 1969, 67, 5831, 18, 2171, 3163, 1358, 1435, 365, 18, 2074, 81, 91, 67, 7525, 273, 2395, 81, 91, 18, 2074, 81, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 5831, 273, 2395, 81, 91, 18, 15898, 18, 1969, 67, 5831, 18, 2171, 3163, 1358, 1435, 365, 18, 2074, 81, 91, 67, 7525, 273, 2395, 81, 91, 18, 2074, 81, ...
bannedSources = gConfig.getValue(configStr,[]) gLogger.info("ReplicaManager.__resolveBestReplicas: Obtained current banned sources.")
bannedSources = gConfig.getValue( configStr, [] ) gLogger.info( "ReplicaManager.__resolveBestReplicas: Obtained current banned sources." )
def __resolveBestReplicas(self,sourceSE,lfnReplicas,catalogueSize): ########################################################### # Determine the best replicas (remove banned sources, invalid storage elements and file with the wrong size) configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) gLogger.info("ReplicaManager.__resolveBestReplicas: Obtained current banned sources.") replicaPreference = [] for diracSE,pfn in lfnReplicas.items(): if sourceSE and diracSE != sourceSE: gLogger.info("ReplicaManager.__resolveBestReplicas: %s replica not requested." % diracSE) elif diracSE in bannedSources: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is currently banned as a source." % diracSE) else: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE) storageElement = StorageElement(diracSE) res = storageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__resolveBestReplicas: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: if storageElement.getRemoteProtocols()['Value']: gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source pfns for remote protocols.") res = storageElement.getPfnForProtocol(pfn,self.thirdPartyProtocols) if res['OK']: sourcePfn = res['Value'] gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source file size.") res = storageElement.getFileSize(sourcePfn) if res['OK']: if res['Value']['Successful'].has_key(sourcePfn): sourceFileSize = res['Value']['Successful'][sourcePfn] gLogger.info("ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize) if catalogueSize == sourceFileSize: fileTuple = (diracSE,sourcePfn) replicaPreference.append(fileTuple) else: errStr = "ReplicaManager.__resolveBestReplicas: Catalogue size and physical file size mismatch." gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Value']['Failed'][sourcePfn])) else: errStr = "ReplicaManager.__resolveBestReplicas: Completely failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get PFN for replication for StorageElement." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Source Storage Element has no remote protocols." gLogger.info(errStr,diracSE) if not replicaPreference: errStr = "ReplicaManager.__resolveBestReplicas: Failed to find any valid source Storage Elements." gLogger.error(errStr) return S_ERROR(errStr) else: return S_OK(replicaPreference)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
support.run_unittest(CFilterTests, PyFilterTests, CWarnTests, PyWarnTests, CWCmdLineTests, PyWCmdLineTests, _WarningsTests, CWarningsDisplayTests, PyWarningsDisplayTests, CCatchWarningTests, PyCatchWarningTests, CEnvironmentVariableTests, PyEnvironmentVariableTests )
support.run_unittest( CFilterTests, PyFilterTests, CWarnTests, PyWarnTests, CWCmdLineTests, PyWCmdLineTests, _WarningsTests, CWarningsDisplayTests, PyWarningsDisplayTests, CCatchWarningTests, PyCatchWarningTests, CEnvironmentVariableTests, PyEnvironmentVariableTests, BootstrapTest, )
def test_main(): py_warnings.onceregistry.clear() c_warnings.onceregistry.clear() support.run_unittest(CFilterTests, PyFilterTests, CWarnTests, PyWarnTests, CWCmdLineTests, PyWCmdLineTests, _WarningsTests, CWarningsDisplayTests, PyWarningsDisplayTests, CCatchWarningTests, PyCatchWarningTests, CEnvironmentVariableTests, PyEnvironmentVariableTests )
7d79b8b7714b5e7d8a0582a07b5625c280c879c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/7d79b8b7714b5e7d8a0582a07b5625c280c879c0/test_warnings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 2395, 67, 12103, 18, 265, 71, 11877, 2128, 18, 8507, 1435, 276, 67, 12103, 18, 265, 71, 11877, 2128, 18, 8507, 1435, 2865, 18, 2681, 67, 4873, 3813, 12, 385, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 13332, 2395, 67, 12103, 18, 265, 71, 11877, 2128, 18, 8507, 1435, 276, 67, 12103, 18, 265, 71, 11877, 2128, 18, 8507, 1435, 2865, 18, 2681, 67, 4873, 3813, 12, 385, 158...
f, c = checkfile (file)
f, c = checkfile (file, typemap = {'url': 4})
def expand (file, entry):
89c29a86dc08bb3b60c29eac40431d7542f55727 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1356/89c29a86dc08bb3b60c29eac40431d7542f55727/testsuite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 261, 768, 16, 1241, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 261, 768, 16, 1241, 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, -10...
try: (stdoutdata, stderrdata) = p.communicate() except Kill: logging.debug("sigkill!")
(stdoutdata, stderrdata) = p.communicate()
def setrlimits(): for rsrc, limits in rlimits.items(): resource.setrlimit(rsrc, limits)
2179086eb1fb19d09e692536ea2cfae89b93d398 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7293/2179086eb1fb19d09e692536ea2cfae89b93d398/benchmark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1321, 1038, 87, 13332, 364, 3597, 1310, 16, 8181, 316, 436, 14270, 18, 3319, 13332, 1058, 18, 542, 1321, 1038, 12, 86, 4816, 16, 8181, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1321, 1038, 87, 13332, 364, 3597, 1310, 16, 8181, 316, 436, 14270, 18, 3319, 13332, 1058, 18, 542, 1321, 1038, 12, 86, 4816, 16, 8181, 13, 2, -100, -100, -100, -100, -100, -100, -...
('CCD_IMAGE_SATURATION','SATURATED_VALUE',int),
('CCD_IMAGE_SATURATION','SATURATED_VALUE',float),
def readHeader(self,maxlength=6144): if not self.parameters: rawdata = open(self.filename,"rb").read(maxlength) headeropen = rawdata.index("{") headerclose= rawdata.index("}") self.header = rawdata[headeropen+1:headerclose-headeropen]
d0a1221263db3218a8480282955832761ec51ddf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/d0a1221263db3218a8480282955832761ec51ddf/saturn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 1864, 12, 2890, 16, 27875, 33, 26, 25339, 4672, 309, 486, 365, 18, 3977, 30, 1831, 892, 273, 1696, 12, 2890, 18, 3459, 10837, 6731, 20387, 896, 12, 27875, 13, 1446, 3190, 273, 183...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 1864, 12, 2890, 16, 27875, 33, 26, 25339, 4672, 309, 486, 365, 18, 3977, 30, 1831, 892, 273, 1696, 12, 2890, 18, 3459, 10837, 6731, 20387, 896, 12, 27875, 13, 1446, 3190, 273, 183...
spamtxt = "ham"
spamtxt = options["Headers", "header_ham_string"]
def msg_train(h, msg, is_spam, force): """Train bayes with a single message.""" # XXX: big hack -- why is email.Message unable to represent # multipart/alternative? try: msg.as_string() except TypeError: # We'll be unable to represent this as text :( return False if is_spam: spamtxt = "spam" else: spamtxt = "ham" oldtxt = msg.get(TRAINED_HDR) if force: # Train no matter what. if oldtxt != None: del msg[TRAINED_HDR] elif oldtxt == spamtxt: # Skip this one, we've already trained with it. return False elif oldtxt != None: # It's been trained, but as something else. Untrain. del msg[TRAINED_HDR] h.untrain(msg, not is_spam) h.train(msg, is_spam) msg.add_header(TRAINED_HDR, spamtxt) return True
ca4a679ea0649c164ebf5bac979e0797b1a52e2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/ca4a679ea0649c164ebf5bac979e0797b1a52e2c/mboxtrain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 9754, 12, 76, 16, 1234, 16, 353, 67, 1752, 301, 16, 2944, 4672, 3536, 23419, 324, 528, 281, 598, 279, 2202, 883, 12123, 225, 468, 11329, 30, 5446, 11769, 1493, 11598, 353, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 9754, 12, 76, 16, 1234, 16, 353, 67, 1752, 301, 16, 2944, 4672, 3536, 23419, 324, 528, 281, 598, 279, 2202, 883, 12123, 225, 468, 11329, 30, 5446, 11769, 1493, 11598, 353, 26...
result = re.search(r'<!-- Generated by Doxygen 1.5.[456] -->', text) if not result: sys.stderr.write('Can only process output of doxygen 1.5.4/5/6, sorry.\n') sys.exit(1) text = text[result.regs[0][0]:]
def getNamespaceList(): text = open(path + "/namespaces.html").read() result = re.search(r'<!-- Generated by Doxygen 1.5.[456] -->', text) if not result: sys.stderr.write('Can only process output of doxygen 1.5.4/5/6, sorry.\n') sys.exit(1) text = text[result.regs[0][0]:] return re.findall(r'<tr><td class="indexkey"><a class="el" href="([^"]+)">([^<]+)</a>', text)
70d4222879e48190040c86800ae957ba2d971a99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12582/70d4222879e48190040c86800ae957ba2d971a99/makeFunctionIndex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11153, 682, 13332, 977, 273, 1696, 12, 803, 397, 2206, 16078, 18, 2620, 20387, 896, 1435, 327, 283, 18, 4720, 454, 12, 86, 11, 32, 313, 4438, 4465, 667, 1546, 1615, 856, 14050, 69, 667...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11153, 682, 13332, 977, 273, 1696, 12, 803, 397, 2206, 16078, 18, 2620, 20387, 896, 1435, 327, 283, 18, 4720, 454, 12, 86, 11, 32, 313, 4438, 4465, 667, 1546, 1615, 856, 14050, 69, 667...
self.tk.call(self._w, 'dragsite', 'clear')
self.tk.call(self._w, 'dragsite', 'clear')
def dragsite_clear(self):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5081, 1341, 1137, 67, 8507, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5081, 1341, 1137, 67, 8507, 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, -10...
print "STATUS: recreating database as utf8"
print "Status: recreating database as utf8"
#print "WARNING: cannot upgrade %s. upgrade def not found. skipping" % \
af98851618b632afb0a950644c796b7c633ace40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/af98851618b632afb0a950644c796b7c633ace40/upgrade-db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1188, 315, 9511, 30, 2780, 8400, 738, 87, 18, 8400, 1652, 486, 1392, 18, 14195, 6, 738, 521, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1188, 315, 9511, 30, 2780, 8400, 738, 87, 18, 8400, 1652, 486, 1392, 18, 14195, 6, 738, 521, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
close_cbx = widgetset.Checkbox(_("Close to system tray when I click the red X")) attach_boolean(close_cbx, prefs.MINIMIZE_TO_TRAY) extras.append(close_cbx)
lab = widgetset.Label(_("When I click the red close button:")) extras.append(align_left(lab)) rbg = widgetset.RadioButtonGroup() rad_close = widgetset.RadioButton(_("Close to tray so that downloads can continue."), rbg) rad_quit = widgetset.RadioButton(_("Quit Miro completely."), rbg) attach_radio([(rad_close, True), (rad_quit, False)], prefs.MINIMIZE_TO_TRAY) extras.append(align_left(rad_close, left_pad=20)) extras.append(align_left(rad_quit, left_pad=20))
def _general_panel(): extras = [] show_cbx = widgetset.Checkbox(_("Enable tray icon")) attach_boolean(show_cbx, options.SHOW_TRAYICON) extras.append(show_cbx) close_cbx = widgetset.Checkbox(_("Close to system tray when I click the red X")) attach_boolean(close_cbx, prefs.MINIMIZE_TO_TRAY) extras.append(close_cbx) return extras
6de5a930c219340edfa26dc057d6dd7bc16c5396 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/6de5a930c219340edfa26dc057d6dd7bc16c5396/prefpanelset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12259, 67, 13916, 13332, 11875, 273, 5378, 2405, 67, 7358, 92, 273, 3604, 542, 18, 21272, 24899, 2932, 8317, 268, 435, 4126, 6, 3719, 3306, 67, 6494, 12, 4500, 67, 7358, 92, 16, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12259, 67, 13916, 13332, 11875, 273, 5378, 2405, 67, 7358, 92, 273, 3604, 542, 18, 21272, 24899, 2932, 8317, 268, 435, 4126, 6, 3719, 3306, 67, 6494, 12, 4500, 67, 7358, 92, 16, 7...
e.num = getint(b)
e.num = getint_event(b)
def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.focus = getboolean(f) except TclError: pass e.height = getint(h) e.keycode = getint(k) # For Visibility events, event state is a string and # not an integer: try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) e.char = A try: e.send_event = getboolean(E) except TclError: pass e.keysym = K e.keysym_num = getint(N) e.type = T try: e.widget = self._nametowidget(W) except KeyError: e.widget = W e.x_root = getint(X) e.y_root = getint(Y) try: e.delta = getint(D) except ValueError: e.delta = 0 return (e,)
7adbc32c0ff67ab12c5d7c23c2ad35380c412134 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7adbc32c0ff67ab12c5d7c23c2ad35380c412134/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 17207, 12, 2890, 16, 380, 1968, 4672, 3536, 3061, 445, 12123, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 6315, 1717, 334, 67, 2139, 4672, 327, 833, 336, 6494, 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, 389, 1717, 17207, 12, 2890, 16, 380, 1968, 4672, 3536, 3061, 445, 12123, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 6315, 1717, 334, 67, 2139, 4672, 327, 833, 336, 6494, 273, 365, 18,...
'id_number': sponsor.institution.name,
'institution': serialize_institution(sponsor.institution, as_string=False),
def serialize_trialsecondarysponsor(sponsor, as_string=True): """ Serializes a given trial number object to JSON """ json = { 'id_number': sponsor.institution.name, } if as_string: json = simplejson.dumps(json) return json
497e2462e150ccf75a1888fc0978b0f0d1b47571 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12441/497e2462e150ccf75a1888fc0978b0f0d1b47571/serializers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 67, 16857, 544, 10013, 814, 87, 500, 2467, 12, 87, 500, 2467, 16, 487, 67, 1080, 33, 5510, 4672, 3536, 7366, 3128, 279, 864, 12950, 1300, 733, 358, 1796, 3536, 1163, 273, 288, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 67, 16857, 544, 10013, 814, 87, 500, 2467, 12, 87, 500, 2467, 16, 487, 67, 1080, 33, 5510, 4672, 3536, 7366, 3128, 279, 864, 12950, 1300, 733, 358, 1796, 3536, 1163, 273, 288, 29...
sys.stdout.write(data)
sys.stdout.write(data.decode('ascii'))
def listener(self): """Helper for mt_interact() -- this executes in the other thread.""" while 1: try: data = self.read_eager() except EOFError: print('*** Connection closed by remote host ***') return if data: sys.stdout.write(data) else: sys.stdout.flush()
ba488d150492aa6ded31da7b055cd85a152dd611 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ba488d150492aa6ded31da7b055cd85a152dd611/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2991, 12, 2890, 4672, 3536, 2276, 364, 5874, 67, 2761, 621, 1435, 1493, 333, 11997, 316, 326, 1308, 2650, 12123, 1323, 404, 30, 775, 30, 501, 273, 365, 18, 896, 67, 73, 6817, 1435, 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, 2991, 12, 2890, 4672, 3536, 2276, 364, 5874, 67, 2761, 621, 1435, 1493, 333, 11997, 316, 326, 1308, 2650, 12123, 1323, 404, 30, 775, 30, 501, 273, 365, 18, 896, 67, 73, 6817, 1435, 133...
self.started_playing = False
self.started_playing = STOPPED self._duration = None
def reset(self): self.stop() self.play_from_time = None self.started_playing = False
2934e8b32a8c6a4773091ef2abaa54b3e4f5615d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/2934e8b32a8c6a4773091ef2abaa54b3e4f5615d/vlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 365, 18, 5681, 1435, 365, 18, 1601, 67, 2080, 67, 957, 273, 599, 365, 18, 14561, 67, 1601, 310, 273, 1083, 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, 2715, 12, 2890, 4672, 365, 18, 5681, 1435, 365, 18, 1601, 67, 2080, 67, 957, 273, 599, 365, 18, 14561, 67, 1601, 310, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.engine.processFrame(f2)
self.engine.process_frame(f2)
def test_abort(self): """ Test transaction ABORT. """ self._connect() self.engine.processFrame(StompFrame('BEGIN', headers={'transaction': 'abc'})) self.engine.processFrame(StompFrame('BEGIN', headers={'transaction': '123'})) f1 = StompFrame('SEND', headers={'destination': '/dest', 'transaction': 'abc'}, body='ASDF') self.engine.processFrame(f1) f2 = StompFrame('SEND', headers={'destination': '/dest', 'transaction': 'abc'}, body='ASDF') self.engine.processFrame(f2) f3 = StompFrame('SEND', headers={'destination': '/dest', 'transaction': '123'}, body='ASDF') self.engine.processFrame(f3) assert len(self.tm.messages) == 0 self.engine.processFrame(StompFrame('ABORT', headers={'transaction': 'abc'})) assert len(self.tm.messages) == 0 assert len(self.engine.transactions) == 1
f9d8d8c4b602e4da62a32eac4e04f31994d99e97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10258/f9d8d8c4b602e4da62a32eac4e04f31994d99e97/test_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 18623, 12, 2890, 4672, 3536, 7766, 2492, 10336, 3871, 18, 3536, 365, 6315, 3612, 1435, 225, 365, 18, 8944, 18, 2567, 3219, 12, 510, 20667, 3219, 2668, 16061, 2187, 1607, 5899, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18623, 12, 2890, 4672, 3536, 7766, 2492, 10336, 3871, 18, 3536, 365, 6315, 3612, 1435, 225, 365, 18, 8944, 18, 2567, 3219, 12, 510, 20667, 3219, 2668, 16061, 2187, 1607, 5899, ...
x,y = R.gens()
def full_division_polynomial(self, m): """ Return the m-th bivariate division polynomial in x and y.
84dad5dfc790d5dacf9589fdd0cfafb884726e83 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/84dad5dfc790d5dacf9589fdd0cfafb884726e83/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2892, 1951, 67, 3915, 13602, 12, 2890, 16, 312, 4672, 3536, 2000, 326, 312, 17, 451, 324, 27693, 16536, 16991, 316, 619, 471, 677, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1983, 67, 2892, 1951, 67, 3915, 13602, 12, 2890, 16, 312, 4672, 3536, 2000, 326, 312, 17, 451, 324, 27693, 16536, 16991, 316, 619, 471, 677, 18, 2, -100, -100, -100, -100, -100, -100, ...
member.attrib['value'],
value,
def _introspect_enum(self, xmlnode): members = [] for member in xmlnode.findall('member'): # Keep the name closer to what we'd take from C by default; # see http://bugzilla.gnome.org/show_bug.cgi?id=575613 name = member.attrib['nick'].replace('-', '_') members.append(ast.Member(name, member.attrib['value'], member.attrib['name'], member.attrib['nick']))
8916db0a3831cb5e6c3b714125f7596f43d6aa6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2770/8916db0a3831cb5e6c3b714125f7596f43d6aa6a/gdumpparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 474, 26170, 67, 7924, 12, 2890, 16, 2025, 2159, 4672, 4833, 273, 5378, 364, 3140, 316, 2025, 2159, 18, 4720, 454, 2668, 5990, 11, 4672, 468, 10498, 326, 508, 13306, 358, 4121, 732, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 474, 26170, 67, 7924, 12, 2890, 16, 2025, 2159, 4672, 4833, 273, 5378, 364, 3140, 316, 2025, 2159, 18, 4720, 454, 2668, 5990, 11, 4672, 468, 10498, 326, 508, 13306, 358, 4121, 732, ...
def list_tasks(tree_root): """Lists all the tasks from an xml tree."""
def list_tasks(tree_root, critical): """Lists all the tasks from an xml tree. If critical is true, only tasks that have pending work units will be listed. """
def list_tasks(tree_root): """Lists all the tasks from an xml tree.""" # Calculate the number of days used on each task. units_done = find_units_done(tree_root) current_time = time.time() # Print how many tasks there are. print "Tracking %d task(s)." % len(tree_root.getiterator("task")) for node in tree_root.getiterator("task"): print "---" task_id = node.find("id").text print "Task %s" % task_id print "Name '%s'" % node.find("name").text date_in_string = node.find("starting-day").text date_in_seconds = string_to_seconds(date_in_string) assert current_time > date_in_seconds days = int((current_time - date_in_seconds) / DAY_IN_SECONDS) done = units_done.get(task_id, 0) print "Started on %s, %d days ago" % (date_in_string, days) print "Work units done %d, remaining to be done %d" % (done, days + 1 - done)
deca39e93de50a548409509c29a51ebdd1ae093e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2730/deca39e93de50a548409509c29a51ebdd1ae093e/frequent-trask-reminder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 9416, 12, 3413, 67, 3085, 16, 11239, 4672, 3536, 7432, 777, 326, 4592, 628, 392, 2025, 2151, 18, 225, 971, 11239, 353, 638, 16, 1338, 4592, 716, 1240, 4634, 1440, 4971, 903, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 9416, 12, 3413, 67, 3085, 16, 11239, 4672, 3536, 7432, 777, 326, 4592, 628, 392, 2025, 2151, 18, 225, 971, 11239, 353, 638, 16, 1338, 4592, 716, 1240, 4634, 1440, 4971, 903, 5...
self.unlink(tounlink)
self.unlink(cr, uid, tounlink)
def clear(self): self.check_id += 1 if self.check_id % self._check_time: return True tounlink = [] max = time.time() - self._max_hours * 60 * 60 for id in self.datas: if self.datas[id]['internal.date_access'] < max: tounlink.append(id) self.unlink(tounlink) if len(self.datas)>self._max_count: sorted = map(lambda x: (x[1]['internal.date_access'], x[0]), self.datas.items()) sorted.sort() ids = map(lambda x: x[1], sorted[:len(self.datas)-self._max_count]) self.unlink(ids) return True
7337e4f690fba84a29fd885cdcf7d39e5b504c0f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/7337e4f690fba84a29fd885cdcf7d39e5b504c0f/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 4672, 365, 18, 1893, 67, 350, 1011, 404, 309, 365, 18, 1893, 67, 350, 738, 365, 6315, 1893, 67, 957, 30, 327, 1053, 358, 318, 1232, 273, 5378, 943, 273, 813, 18, 957,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 4672, 365, 18, 1893, 67, 350, 1011, 404, 309, 365, 18, 1893, 67, 350, 738, 365, 6315, 1893, 67, 957, 30, 327, 1053, 358, 318, 1232, 273, 5378, 943, 273, 813, 18, 957,...
persist = self._getFlags('classes') & self.TRANSIENT == 0
persist = self._getFlags(key) & self.TRANSIENT == 0
def _xmlValues(self, generator, withSchema, version, mode):
5cada73099c62f5c9868e332d2b9415d51a0298a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5cada73099c62f5c9868e332d2b9415d51a0298a/Values.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2902, 1972, 12, 2890, 16, 4456, 16, 598, 3078, 16, 1177, 16, 1965, 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, ...
[ 1, 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, 389, 2902, 1972, 12, 2890, 16, 4456, 16, 598, 3078, 16, 1177, 16, 1965, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if user.getClasses(self.parent_program, verbs=[self.parent_program.getModuleExtension('StudentClassRegModuleInfo').signup_verb]).count() == 0:
if user.getClasses(self.parent_program, verbs=[self.parent_program.getModuleExtension('StudentClassRegModuleInfo').signup_verb.name]).count() == 0:
def cannotAdd(self, user, checkFull=True, request=False, use_cache=True): """ Go through and give an error message if this user cannot add this class to their schedule. """ if not user.isStudent(): return 'You are not a student!' if not self.isAccepted(): return 'This class is not accepted.'
7c5fc1b8ca8f08591f334ffa2013024e89c097de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/7c5fc1b8ca8f08591f334ffa2013024e89c097de/class_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2780, 986, 12, 2890, 16, 729, 16, 866, 5080, 33, 5510, 16, 590, 33, 8381, 16, 999, 67, 2493, 33, 5510, 4672, 3536, 4220, 3059, 471, 8492, 392, 555, 883, 309, 333, 729, 2780, 527, 333...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2780, 986, 12, 2890, 16, 729, 16, 866, 5080, 33, 5510, 16, 590, 33, 8381, 16, 999, 67, 2493, 33, 5510, 4672, 3536, 4220, 3059, 471, 8492, 392, 555, 883, 309, 333, 729, 2780, 527, 333...
if not hasattr(client, 'langWarnings'): client.langWarnings = 1
if hasattr(client, 'langMuted') and client.langMuted: self.debug('%s is already muted'%client.name)
def penalizeClient(self, penalty, client, data=''): # addition to mute players in Urban Terror if self.console.gameName[:5] == 'iourt' and self._mute: if not hasattr(client, 'langWarnings'): client.langWarnings = 1 else: client.langWarnings += 1 if client.langWarnings == 1: if self._muteduration1 != 0: self.debug('Muting %s for %s minutes.' % (client.name, self._muteduration1)) self.console.say('Muting %s for %s minutes.' % (client.name, self._muteduration1)) self.console.write('mute %s %s' % (client.cid, self._muteduration1)) elif client.langWarnings == 2: if self._muteduration2 != 0: self.debug('Muting %s for %s minutes.' % (client.name, self._muteduration2)) self.console.say('Muting %s for %s minutes.' % (client.name, self._muteduration2)) self.console.write('mute %s %s' % (client.cid, self._muteduration2)) else: self.debug('Muting %s for %s minutes.' % (client.name, self._muteduration3)) self.console.say('Muting %s for %s minutes.' % (client.name, self._muteduration3)) self.console.write('mute %s %s' % (client.cid, self._muteduration3)) if not self._muteonly: self._adminPlugin.penalizeClient(penalty.type, client, penalty.reason, penalty.keyword, penalty.duration, None, data) else: self._adminPlugin.penalizeClient(penalty.type, client, penalty.reason, penalty.keyword, penalty.duration, None, data)
3da500bd16ac3fc74379196d36267648ead47425 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12909/3da500bd16ac3fc74379196d36267648ead47425/censor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14264, 287, 554, 1227, 12, 2890, 16, 23862, 16, 1004, 16, 501, 2218, 11, 4672, 468, 2719, 358, 312, 624, 18115, 316, 587, 6731, 304, 399, 1636, 309, 365, 18, 8698, 18, 13957, 461, 1053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14264, 287, 554, 1227, 12, 2890, 16, 23862, 16, 1004, 16, 501, 2218, 11, 4672, 468, 2719, 358, 312, 624, 18115, 316, 587, 6731, 304, 399, 1636, 309, 365, 18, 8698, 18, 13957, 461, 1053...
atoms.append(Atom(inp[3],(inp[4],inp[5],inp[6])))
atoms.append(Atom(inp[3],(inp[4],inp[5],inp[6])))
def read_aims_output(filename, index = -1): """ Import FHI-aims output files with all data available, i.e. relaxations, MD information, force information etc etc etc. """ from ase import Atoms, Atom from ase.calculators.singlepoint import SinglePointCalculator from ase.units import Ang, fs molecular_dynamics = False fd = open(filename, 'r') cell = [] images = [] n_periodic = -1 f = None pbc = False found_aims_calculator = False v_unit = Ang/(1000.0*fs) while True: line = fd.readline() if not line: break if "List of parameters used to initialize the calculator:" in line: fd.readline() calc = read_aims_calculator(fd) calc.out = filename found_aims_calculator = True if "Number of atoms" in line: inp = line.split() n_atoms = int(inp[5]) if "| Unit cell:" in line: if not pbc: pbc = True for i in range(3): inp = fd.readline().split() cell.append([inp[1],inp[2],inp[3]]) if "Atomic structure:" in line: fd.readline() atoms = Atoms() for i in range(n_atoms): inp = fd.readline().split() atoms.append(Atom(inp[3],(inp[4],inp[5],inp[6]))) if "Complete information for previous time-step:" in line: molecular_dynamics = True if "Updated atomic structure:" in line and not molecular_dynamics: fd.readline() atoms = Atoms() velocities = [] for i in range(n_atoms): inp = fd.readline().split() atoms.append(Atom(inp[4],(inp[1],inp[2],inp[3]))) if molecular_dynamics: inp = fd.readline().split() if "Atomic structure (and velocities)" in line: fd.readline() atoms = Atoms() velocities = [] for i in range(n_atoms): inp = fd.readline().split() atoms.append(Atom(inp[4],(inp[1],inp[2],inp[3]))) inp = fd.readline().split() velocities += [[float(inp[1])*v_unit,float(inp[2])*v_unit,float(inp[3])*v_unit]] atoms.set_velocities(velocities) images.append(atoms) if "Total atomic forces" in line: f = [] for i in range(n_atoms): inp = fd.readline().split() f.append([float(inp[2]),float(inp[3]),float(inp[4])]) if not found_aims_calculator: e = images[-1].get_potential_energy() images[-1].set_calculator(SinglePointCalculator(e,f,None,None,atoms)) e = None f = None if "Total energy corrected" in line: e = float(line.split()[5]) if pbc: atoms.set_cell(cell) atoms.pbc = True if not found_aims_calculator: atoms.set_calculator(SinglePointCalculator(e,None,None,None,atoms)) if not molecular_dynamics: images.append(atoms) e = None if found_aims_calculator: calc.set_results(images[-1]) images[-1].set_calculator(calc) fd.close() if molecular_dynamics: images = images[1:] # return requested images, code borrowed from ase/io/trajectory.py if isinstance(index, int): return images[index] else: step = index.step or 1 if step > 0: start = index.start or 0 if start < 0: start += len(images) stop = index.stop or len(images) if stop < 0: stop += len(images) else: if index.start is None: start = len(images) - 1 else: start = index.start if start < 0: start += len(images) if index.stop is None: stop = -1 else: stop = index.stop if stop < 0: stop += len(images) return [images[i] for i in range(start, stop, step)]
48fe9ab14b50d1e39b9c7e09dd8ffb3e9d875765 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/48fe9ab14b50d1e39b9c7e09dd8ffb3e9d875765/aims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 4581, 87, 67, 2844, 12, 3459, 16, 770, 273, 300, 21, 4672, 3536, 225, 6164, 28705, 45, 17, 4581, 87, 876, 1390, 598, 777, 501, 2319, 16, 277, 18, 73, 18, 25744, 1012, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 4581, 87, 67, 2844, 12, 3459, 16, 770, 273, 300, 21, 4672, 3536, 225, 6164, 28705, 45, 17, 4581, 87, 876, 1390, 598, 777, 501, 2319, 16, 277, 18, 73, 18, 25744, 1012, 16, ...
open(self.ref_output_file, 'w').write(strip_dates(output)) open(self.ref_code_file, 'w').write(str(code)) def PrepareReferenceOutput(self, cmd): if os.path.exists(self.ref_output_file): return (open(self.ref_output_file).read(), int(open(self.ref_code_file).read()))
open('%s/%s/cmdline.txt' % (self.base_path, cmdnum), 'w').write( ' '.join(self.cmds[cmdnum])) open('%s/%s/out.txt' % (self.base_path, cmdnum), 'w').write( strip_dates(output)) open('%s/%s/code.txt' % (self.base_path, cmdnum), 'w').write(str(code)) def RunCommand(self, cmdnum, batch=False): if os.path.exists('%s/%s' % (self.base_path, cmdnum)): ref_output = open('%s/%s/out.txt' % (self.base_path, cmdnum)).read() ref_code = int(open( '%s/%s/code.txt' % (self.base_path, cmdnum)).read()) output, retcode = execute(self.cmds[cmdnum]) output = strip_dates(output) if retcode != ref_code or ref_output != output: handle, tmpfilename = tempfile.mkstemp( prefix=clean_path_name(self.cmds[cmdnum])) open(tmpfilename, 'w').write(output) diff_output = process.execute(['colordiff', '-u', '%s/%s/out.txt' % (self.base_path, cmdnum), tmpfilename])[0] logging.warning( '''command '''Diffed output follows:\n%s\n%s''' % ( stylize(ST_OK, cmdnum), stylize(ST_BAD, retcode), stylize(ST_OK, ref_code), stylize(ST_NAME, cmdfmt(self.cmds[cmdnum])), '-' * 50, diff_output, '-' * 50)) if batch or logging.ask_for_repair('''Should I keep the new ''' '''return code and trace as reference for future runs?'''): self.SaveOutput(cmdnum, output, retcode) else: raise exceptions.LicornRuntimeException( 'command "%s" failed.\nPath: %s.' % ( cmdfmt(self.cmds[cmdnum]), '%s/%s/*' % ( self.base_path, cmdnum))) else: logging.notice('command cmdnum, cmdfmt(self.cmds[cmdnum])))
def SaveOutput(self, output, code):
07cb13c975b820cb15074a8378ec89357e5846f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/07cb13c975b820cb15074a8378ec89357e5846f4/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 1447, 12, 2890, 16, 876, 16, 981, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 1447, 12, 2890, 16, 876, 16, 981, 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, ...
dest, revs, checkout = hg.parseurl( ui.expandpath('default-push', 'default'))
dest, branches = hg.parseurl(ui.expandpath('default-push', 'default')) revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
def summary(ui, repo, **opts): """summarize working directory state This generates a brief summary of the working directory state, including parents, branch, commit status, and available updates. With the --remote option, this will check the default paths for incoming and outgoing changes. This can be time-consuming. """ ctx = repo[None] parents = ctx.parents() pnode = parents[0].node() tags = repo.tags() for p in parents: t = ' '.join([t for t in tags if tags[t] == p.node()]) if p.rev() == -1: if not len(repo): t += _(' (empty repository)') else: t += _(' (no revision checked out)') ui.write(_('parent: %d:%s %s\n') % (p.rev(), str(p), t)) if p.description(): ui.status(' ' + p.description().splitlines()[0].strip() + '\n') branch = ctx.branch() bheads = repo.branchheads(branch) m = _('branch: %s\n') % branch if branch != 'default': ui.write(m) else: ui.status(m) st = list(repo.status(unknown=True))[:7] ms = merge_.mergestate(repo) st.append([f for f in ms if f == 'u']) labels = [_('%d modified'), _('%d added'), _('%d removed'), _('%d deleted'), _('%d unknown'), _('%d ignored'), _('%d unresolved')] t = [] for s, l in zip(st, labels): if s: t.append(l % len(s)) t = ', '.join(t) cleanworkdir = False if len(parents) > 1: t += _(' (merge)') elif branch != parents[0].branch(): t += _(' (new branch)') elif (not st[0] and not st[1] and not st[2]): t += _(' (clean)') cleanworkdir = True elif pnode not in bheads: t += _(' (new branch head)') if cleanworkdir: ui.status(_('commit: %s\n') % t.strip()) else: ui.write(_('commit: %s\n') % t.strip()) # all ancestors of branch heads - all ancestors of parent = new csets new = [0] * len(repo) cl = repo.changelog for a in cl.ancestors(*[cl.rev(n) for n in bheads]): new[a] = 1 for a in cl.ancestors(*[p.rev() for p in parents]): new[a] = 0 new = sum(new) if new == 0: ui.status(_('update: (current)\n')) elif pnode not in bheads: ui.write(_('update: %d new changesets (update)\n') % new) else: ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % (new, len(bheads))) if opts.get('remote'): t = [] source, revs, checkout = hg.parseurl(ui.expandpath('default'), opts.get('rev')) other = hg.repository(cmdutil.remoteui(repo, {}), source) ui.debug('comparing with %s\n' % url.hidepassword(source)) repo.ui.pushbuffer() common, incoming, rheads = repo.findcommonincoming(other) repo.ui.popbuffer() if incoming: t.append(_('1 or more incoming')) dest, revs, checkout = hg.parseurl( ui.expandpath('default-push', 'default')) other = hg.repository(cmdutil.remoteui(repo, {}), dest) ui.debug('comparing with %s\n' % url.hidepassword(dest)) repo.ui.pushbuffer() o = repo.findoutgoing(other) repo.ui.popbuffer() o = repo.changelog.nodesbetween(o, revs)[0] if o: t.append(_('%d outgoing') % len(o)) if t: ui.write(_('remote: %s\n') % (', '.join(t))) else: ui.status(_('remote: (synced)\n'))
bbc7f45a05bb9efa83dc3c90bb4b009f23cf5ebb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/bbc7f45a05bb9efa83dc3c90bb4b009f23cf5ebb/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4916, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 1364, 21872, 5960, 1867, 919, 225, 1220, 6026, 279, 324, 17802, 4916, 434, 326, 5960, 1867, 919, 16, 6508, 6298, 16, 3803, 16, 3294,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4916, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 1364, 21872, 5960, 1867, 919, 225, 1220, 6026, 279, 324, 17802, 4916, 434, 326, 5960, 1867, 919, 16, 6508, 6298, 16, 3803, 16, 3294,...
return http.Response(stream='done')
return HTMLResponse(stream='done')
def render(self, ctx): # TODO -- this must not block long (!) self.worksheet.quit() return http.Response(stream='done')
39855fabbbbe971c1c1d64566b1625e9c1c6d482 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/39855fabbbbe971c1c1d64566b1625e9c1c6d482/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 468, 2660, 1493, 333, 1297, 486, 1203, 1525, 16051, 13, 365, 18, 1252, 8118, 18, 27176, 1435, 327, 1062, 18, 1064, 12, 3256, 2218, 8734, 6134, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 468, 2660, 1493, 333, 1297, 486, 1203, 1525, 16051, 13, 365, 18, 1252, 8118, 18, 27176, 1435, 327, 1062, 18, 1064, 12, 3256, 2218, 8734, 6134, 2, -100, ...
if (component.outer_x2 == self.width) or \ (component.outer_y2 == self.height) or \ (component.x == 0) or (component.y == 0): self.compact()
if (component.outer_x2 == self.width) or \ (component.outer_y2 == self.height) or \ (component.x == 0) or (component.y == 0): self.compact()
def remove(self, *components): """ Removes components from this container """ for component in components: if component in self._components: component.container = None self._components.remove(component) else: raise RuntimeError, "Unable to remove component from container."
e0b99a5b5662f711ce161fc5d4712d26f1717de2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13166/e0b99a5b5662f711ce161fc5d4712d26f1717de2/container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 380, 8119, 4672, 3536, 20284, 4085, 628, 333, 1478, 3536, 364, 1794, 316, 4085, 30, 309, 1794, 316, 365, 6315, 8119, 30, 1794, 18, 3782, 273, 599, 365, 6315, 8119, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 380, 8119, 4672, 3536, 20284, 4085, 628, 333, 1478, 3536, 364, 1794, 316, 4085, 30, 309, 1794, 316, 365, 6315, 8119, 30, 1794, 18, 3782, 273, 599, 365, 6315, 8119, ...
f = open("htdocs/images/trophy.png", "r")
f = open("htdocs/media/rb/images/trophy.png", "r")
def testNewScreenshot(self): """Testing the reviewrequests/screenshot/new API""" review_request = self.testNewReviewRequest()
20cf9312039ced5659c121d39fa1a8cb2b092c4c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/20cf9312039ced5659c121d39fa1a8cb2b092c4c/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1908, 29354, 12, 2890, 4672, 3536, 22218, 326, 10725, 11420, 19, 29435, 19, 2704, 1491, 8395, 10725, 67, 2293, 273, 365, 18, 3813, 1908, 9159, 691, 1435, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1908, 29354, 12, 2890, 4672, 3536, 22218, 326, 10725, 11420, 19, 29435, 19, 2704, 1491, 8395, 10725, 67, 2293, 273, 365, 18, 3813, 1908, 9159, 691, 1435, 2, -100, -100, -100, -100, ...
"WHERE partner_id = %s" \
"WHERE l.partner_id = %s" \
def _sum_credit_partner(self, partner): move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted']
4c7c70770d0c8dec92179476cfe0aaeade79fcd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4c7c70770d0c8dec92179476cfe0aaeade79fcd9/account_partner_ledger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1364, 67, 20688, 67, 31993, 12, 2890, 16, 19170, 4672, 3635, 67, 2019, 273, 10228, 17153, 17023, 2767, 329, 3546, 309, 365, 18, 3299, 67, 8501, 422, 296, 2767, 329, 4278, 3635, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1364, 67, 20688, 67, 31993, 12, 2890, 16, 19170, 4672, 3635, 67, 2019, 273, 10228, 17153, 17023, 2767, 329, 3546, 309, 365, 18, 3299, 67, 8501, 422, 296, 2767, 329, 4278, 3635, 67, ...
self.listboxItems = [(str(item.text()), QListWidgetItem(item)) for item in items]
if not items: return if type(items[0]) == str: self.listboxItems = [(item, QListWidgetItem(item)) for item in items] else: self.listboxItems = [(str(item.text()), QListWidgetItem(item)) for item in items]
def setAllListItems(self, items = None): if not items: items = [self.listbox.item(i) for i in range(self.listbox.count())] self.listboxItems = [(str(item.text()), QListWidgetItem(item)) for item in items]
8130a286e396fdd74f2a2a39d7d07343e774fdc4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/8130a286e396fdd74f2a2a39d7d07343e774fdc4/OWGUIEx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30213, 682, 3126, 12, 2890, 16, 1516, 273, 599, 4672, 309, 486, 1516, 30, 1516, 273, 306, 2890, 18, 1098, 2147, 18, 1726, 12, 77, 13, 364, 277, 316, 1048, 12, 2890, 18, 1098, 2147, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30213, 682, 3126, 12, 2890, 16, 1516, 273, 599, 4672, 309, 486, 1516, 30, 1516, 273, 306, 2890, 18, 1098, 2147, 18, 1726, 12, 77, 13, 364, 277, 316, 1048, 12, 2890, 18, 1098, 2147, 1...
result[len(result):] = temp
result.extend(temp)
def randrange(n): """Return a random shuffle of range(n).""" fn = os.path.join(td, "rr%06d" % n) try: fp = open(fn, "rb") except IOError: result = [] for i in range(n): result.append(random.random()) try: try: fp = open(fn, "wb") marshal.dump(result, fp) fp.close() fp = None finally: if fp: try: os.unlink(fn) except os.error: pass except IOError, msg: print "can't write", fn, ":", msg else: result = marshal.load(fp) fp.close() ##assert len(result) == n # Shuffle it a bit... for i in range(10): i = random.randrange(0, n) temp = result[:i] del result[:i] temp.reverse() result[len(result):] = temp del temp return result
1a0647b0e18d6de52c4c51bdae9fe97eb7441d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1a0647b0e18d6de52c4c51bdae9fe97eb7441d05/sortperf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5605, 3676, 12, 82, 4672, 3536, 990, 279, 2744, 12552, 434, 1048, 12, 82, 13, 12123, 2295, 273, 1140, 18, 803, 18, 5701, 12, 4465, 16, 315, 523, 9, 7677, 72, 6, 738, 290, 13, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5605, 3676, 12, 82, 4672, 3536, 990, 279, 2744, 12552, 434, 1048, 12, 82, 13, 12123, 2295, 273, 1140, 18, 803, 18, 5701, 12, 4465, 16, 315, 523, 9, 7677, 72, 6, 738, 290, 13, 775, ...
assert len(Globals.connection) == len(rpaths) + 1
assert len(Globals.connections) == len(rpaths) + 1
def TestConnections(rpaths): """Test connections, printing results""" if len(Globals.connections) == 1: print "No remote connections specified" else: assert len(Globals.connection) == len(rpaths) + 1 for i in range(1, len(Globals.connections)): test_connection(i, rpaths[i-1])
42db27732a70c284d903c31c62ba1b8e44ed8d6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/783/42db27732a70c284d903c31c62ba1b8e44ed8d6b/SetConnections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7766, 9314, 12, 86, 4481, 4672, 3536, 4709, 5921, 16, 19171, 1686, 8395, 309, 562, 12, 19834, 18, 13313, 13, 422, 404, 30, 1172, 315, 2279, 2632, 5921, 1269, 6, 469, 30, 1815, 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, 7766, 9314, 12, 86, 4481, 4672, 3536, 4709, 5921, 16, 19171, 1686, 8395, 309, 562, 12, 19834, 18, 13313, 13, 422, 404, 30, 1172, 315, 2279, 2632, 5921, 1269, 6, 469, 30, 1815, 562, 12,...
'license_id', 'tags']),
'license_id']),
def build_package_form(is_admin=False): builder = FormBuilder(model.Package) # Extra fields builder.add_field(ResourcesField('resources', hidden_label=True)) builder.add_field(TagField('tags')) builder.add_field(ExtrasField('extras', hidden_label=True)) # Labels and instructions builder.set_field_text('name', '%s %s' % (_('Name'), _('(required)')), hints=literal(_("<strong>Unique identifier</strong> for package.<br/>2+ chars, lowercase, using only 'a-z0-9' and '-_'"))) builder.set_field_text('license_id', _('License')) builder.set_field_text('tags', _('Tags'), _('(space separated list)')) builder.set_field_text('notes', _('Notes'), hints=literal(_('You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown formatting</a> here.'))) # Options/settings builder.set_field_option('name', 'validate', package_name_validator) builder.set_field_option('license_id', 'dropdown', {'options':[('', None)] + model.Package.get_license_options()}) builder.set_field_option('state', 'dropdown', {'options':model.State.all}) builder.set_field_option('notes', 'textarea', {'size':'60x15'}) # Layout field_groups = OrderedDict([ (_('Basic information'), ['name', 'title', 'version', 'url', 'notes']), (_('Resources'), ['resources']), (_('Detail'), ['author', 'author_email', 'maintainer', 'maintainer_email', 'license_id', 'tags']), (_('Extras'), ['extras']), ]) if is_admin: field_groups[_('Detail')].append('state') builder.set_displayed_fields(field_groups) builder.set_label_prettifier(prettify) return builder # Strings for i18n: [_('Name'), _('Title'), _('Version'), _('URL'), _('Notes'), _('Resources'), _('Author'), _('Author email'), _('Maintainer'), _('Maintainer email'), _('License'), _('Tags'), _('Extras'), _('State')]
4f638f17bb019ee22098c8a1a801b79292ce8222 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/4f638f17bb019ee22098c8a1a801b79292ce8222/package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5610, 67, 687, 12, 291, 67, 3666, 33, 8381, 4672, 2089, 273, 2748, 1263, 12, 2284, 18, 2261, 13, 225, 468, 13592, 1466, 2089, 18, 1289, 67, 1518, 12, 3805, 974, 2668, 4683, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5610, 67, 687, 12, 291, 67, 3666, 33, 8381, 4672, 2089, 273, 2748, 1263, 12, 2284, 18, 2261, 13, 225, 468, 13592, 1466, 2089, 18, 1289, 67, 1518, 12, 3805, 974, 2668, 4683, ...
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_report') cr.execute(""" create or replace view purchase_report as ( select min(l.id) as id, s.date_order as date, to_char(s.date_order, 'YYYY') as name, to_char(s.date_order, 'MM') as month, s.state, s.warehouse_id as warehouse_id, s.partner_id as partner_id, s.fiscal_position, s.create_uid as user_id, s.company_id as company_id, s.invoice_method, l.product_id, s.location_id as location_id, sum(l.product_qty*u.factor) as quantity, count(*) as nbr, sum(l.product_qty*l.price_unit) as price_total, (sum(l.product_qty*l.price_unit)/sum(l.product_qty*u.factor))::decimal(16,2) as price_average from purchase_order s left join purchase_order_line l on (s.id=l.order_id) left join product_uom u on (u.id=l.product_uom) where l.product_id is not null group by s.company_id, s.create_uid, s.partner_id, s.location_id, l.product_id, s.date_order, to_char(s.date_order, 'YYYY'), to_char(s.date_order, 'MM'), s.state, s.warehouse_id, s.fiscal_position, s.invoice_method ) """)
9da45d3b15595e5a0b0fa6b9a76f8c8f7c0b8e1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9da45d3b15595e5a0b0fa6b9a76f8c8f7c0b8e1f/purchase_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 4669, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 12688, 12104, 67, 6006, 6134, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 8513, 18, 4669, 18, 7285, 67, 1945, 67, 430, 67, 1808, 12, 3353, 16, 296, 12688, 12104, 67, 6006, 6134, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476...
print WARNING-DTD % ('document', line_number, tag_name)
print WARNING_DTD % ('document', line_number, tag_name)
def pre_stream(stream , tag_uri, tag_name, attributes, pdf_stylesheet): stack = [] story = [] styles = getSampleStyleSheet() styleN = styles['Normal'] content = [] has_content = False stack.append((tag_name, attributes, None)) while True: event, value, line_number = stream_next(stream) if event == None: break #### START ELEMENT #### if event == START_ELEMENT: print WARNING-DTD % ('document', line_number, tag_name) stack.append((tag_name, attributes, None)) #### END ELEMENT #### elif event == END_ELEMENT: tag_uri, tag_name = value if tag_name == 'pre': return create_preformatted(pdf_stylesheet, {}, stack.pop(), content) else: print WARNING_DTD % ('document', line_number, tag_name) # unknown tag stack.append((tag_name, attributes, None)) #### TEXT ELEMENT #### elif event == TEXT: if stack: # we dont strip the string --> preformatted widget value = XML.encode(Unicode.decode(value, encoding)) # entities content.append(value)
20fd928bec432beecf5a6e98f6bc76ae937660d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/20fd928bec432beecf5a6e98f6bc76ae937660d6/rml2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 67, 3256, 12, 3256, 269, 1047, 67, 1650, 16, 1047, 67, 529, 16, 1677, 16, 8169, 67, 19403, 4672, 2110, 273, 5378, 17285, 273, 5378, 5687, 273, 26078, 2885, 8229, 1435, 2154, 50, 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, 675, 67, 3256, 12, 3256, 269, 1047, 67, 1650, 16, 1047, 67, 529, 16, 1677, 16, 8169, 67, 19403, 4672, 2110, 273, 5378, 17285, 273, 5378, 5687, 273, 26078, 2885, 8229, 1435, 2154, 50, 2...
' parx ' : ' 037__c:', ' primarch ' : ' 037__c:',
'parx' : '037__c:', 'primarch' : '037__c:',
def __init__(self, message): """Initialization.""" self.message = message
9ac6f199aca80bde5350b014ceb25041ee84876b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2139/9ac6f199aca80bde5350b014ceb25041ee84876b/search_engine_query_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 883, 4672, 3536, 17701, 12123, 365, 18, 2150, 273, 883, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 883, 4672, 3536, 17701, 12123, 365, 18, 2150, 273, 883, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'hu': u'User talk',
'hr': u'Razgovor sa suradnikom',
def __init__(self): family.Family.__init__(self) self.name = 'uncyclopedia'
5291e54d99c50e05679c62b06fbab03ab3f57e0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5291e54d99c50e05679c62b06fbab03ab3f57e0d/uncyclopedia_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 551, 93, 7550, 1845, 1155, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 551, 93, 7550, 1845, 1155, 11, 2, -100, -100, -100, -100, -100, -100, -100, -10...
confautoprc = confautoprc.replace("p3openal_audio","p3fmod_audio")
configprc = configprc.replace("p3openal_audio","p3fmod_audio")
def CreatePandaVersionFiles(): # First, move any conflicting files out of the way. if os.path.isfile("dtool/src/dtoolutil/pandaVersion.h"): os.rename("dtool/src/dtoolutil/pandaVersion.h", "dtool/src/dtoolutil/pandaVersion.h.moved") if os.path.isfile("dtool/src/dtoolutil/checkPandaVersion.h"): os.rename("dtool/src/dtoolutil/checkPandaVersion.h", "dtool/src/dtoolutil/checkPandaVersion.h.moved") if os.path.isfile("dtool/src/dtoolutil/checkPandaVersion.cxx"): os.rename("dtool/src/dtoolutil/checkPandaVersion.cxx", "dtool/src/dtoolutil/checkPandaVersion.cxx.moved") version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile(GetOutputDir()+'/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.h', checkpandaversion_h) ConditionalWriteFile(GetOutputDir()+"/tmp/null.cxx","")
767550b926294e77ee5dd664a7a8abe490cbea0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/767550b926294e77ee5dd664a7a8abe490cbea0d/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 468, 5783, 16, 3635, 1281, 21462, 1390, 596, 434, 326, 4031, 18, 309, 1140, 18, 803, 18, 291, 768, 2932, 72, 6738, 19, 4816, 19, 72, 6738, 1367, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 468, 5783, 16, 3635, 1281, 21462, 1390, 596, 434, 326, 4031, 18, 309, 1140, 18, 803, 18, 291, 768, 2932, 72, 6738, 19, 4816, 19, 72, 6738, 1367, ...
sage: sage.symbolic.units.unit_derivations_expr('volume') length^3 sage: sage.symbolic.units.unit_derivations_expr('electric_potential') length^2*mass/(current*time^3)
sage: sage.symbolic.units.unit_derivations_expr('volume') length^3 sage: sage.symbolic.units.unit_derivations_expr('electric_potential') length^2*mass/(current*time^3)
def unit_derivations_expr(v): """ Given derived units name, returns the corresponding units expression. For example, given 'acceleration' output the symbolic expression length/time^2. INPUT: - `v` -- string, name of a unit type such as 'area', 'volume', etc. OUTPUT: - symbolic expression EXAMPLES:: sage: sage.symbolic.units.unit_derivations_expr('volume') length^3 sage: sage.symbolic.units.unit_derivations_expr('electric_potential') length^2*mass/(current*time^3) If the unit name is unknown, a KeyError is raised:: sage: sage.symbolic.units.unit_derivations_expr('invalid') Traceback (most recent call last): ... KeyError: 'invalid' """ v = str(v) Z = unit_derivations[v] if isinstance(Z,str): d = dict([(x,str_to_unit(x)) for x in vars_in_str(Z)]) from sage.misc.all import sage_eval Z = sage_eval(Z, d) unit_derivations[v] = Z return Z
ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2836, 67, 20615, 1012, 67, 8638, 12, 90, 4672, 3536, 16803, 10379, 4971, 508, 16, 1135, 326, 4656, 4971, 2652, 18, 225, 2457, 3454, 16, 864, 296, 30737, 7067, 11, 876, 326, 16754, 2652, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2836, 67, 20615, 1012, 67, 8638, 12, 90, 4672, 3536, 16803, 10379, 4971, 508, 16, 1135, 326, 4656, 4971, 2652, 18, 225, 2457, 3454, 16, 864, 296, 30737, 7067, 11, 876, 326, 16754, 2652, ...
tblstr += ' <td class="admintd">%s</td>\n' % (row, )
tblstr += ' <td class="%s">%s</td>\n' % (align[0], row)
def tupletotable(header=[], tuple=[], start='', end='', extracolumn=''): """create html table for a tuple. header - optional header for the columns tuple - create table of this start - text to be added in the beginning, most likely beginning of a form end - text to be added in the end, mot likely end of a form. extracolumn - mainly used to put in a button. """ tblstr = '' for h in header + ['']: tblstr += ' <th class="adminheader">%s</th>\n' % (h, ) if tblstr: tblstr = ' <tr>\n%s\n </tr>\n' % (tblstr, ) tblstr = start + '<table class="admin_wvar_nomargin">\n' + tblstr # extra column try: extra = '<tr>' row = tuple[0] if type(row) not in [int, long, str, dict]: for data in row: extra += '<td class="admintd">%s</td>\n' % (data,) else: extra += ' <td class="admintd">%s</td>\n' % (row, ) extra += '<td rowspan="%s" style="vertical-align: bottom">\n%s\n</td>\n</tr>\n' % (len(tuple), extracolumn) except IndexError: extra = '' tblstr += extra for row in tuple[1:]: tblstr += ' <tr>\n' if type(row) not in [int, long, str, dict]: for data in row: tblstr += '<td class="admintd">%s</td>\n' % (data,) else: tblstr += ' <td class="admintd">%s</td>\n' % (row, ) tblstr += ' </tr> \n' tblstr += '</table> \n ' tblstr += end return tblstr
911068548336831a628cc7a6d8a3e449446b6170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/911068548336831a628cc7a6d8a3e449446b6170/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28325, 1469, 352, 429, 12, 3374, 22850, 6487, 3193, 22850, 6487, 787, 2218, 2187, 679, 2218, 2187, 7582, 1077, 355, 755, 2218, 11, 4672, 3536, 2640, 1729, 1014, 364, 279, 3193, 18, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28325, 1469, 352, 429, 12, 3374, 22850, 6487, 3193, 22850, 6487, 787, 2218, 2187, 679, 2218, 2187, 7582, 1077, 355, 755, 2218, 11, 4672, 3536, 2640, 1729, 1014, 364, 279, 3193, 18, 225, ...
specific = regcompile('(.*/)(?P<filename>[\w\-.]+)\.((H_(?P<hostname>\S+))|' +
specific = regcompile('(.*/)(?P<filename>[\S\-.]+)\.((H_(?P<hostname>\S+))|' +
def __cmp__(self, other): fields = ['all', 'image', 'classes', 'bundles', 'attributes', 'hostname'] try: most1 = [index for index in range(len(fields)) if getattr(self, fields[index])][0] except IndexError: most1 = 0 try: most2 = [index for index in range(len(fields)) if getattr(other, fields[index])][0] except IndexError: most2 = 0 return most1 - most2
b9ac6e48c38beb674c18eae33c5b8a6f2eb39f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/b9ac6e48c38beb674c18eae33c5b8a6f2eb39f33/Cfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 1466, 273, 10228, 454, 2187, 296, 2730, 2187, 296, 4701, 2187, 296, 22773, 2187, 296, 4350, 2187, 296, 10358, 3546, 775, 30, 4486, 21, 273, 306...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9625, 972, 12, 2890, 16, 1308, 4672, 1466, 273, 10228, 454, 2187, 296, 2730, 2187, 296, 4701, 2187, 296, 22773, 2187, 296, 4350, 2187, 296, 10358, 3546, 775, 30, 4486, 21, 273, 306...
raise ValueError, "%s is not a valid perfect matching: all elements of the list must be pairs"%p
raise ValueError, ("%s is not a valid perfect matching:\n" "all elements of the list must be pairs"%p)
def __classcall_private__(cls,p): r""" This function tries to recognize the input (it can be either a list or a tuple of pairs, or a fix-point free involution given as a list or as a permutation), constructs the parent (enumerated set of PerfectMatchings of the ground set) and calls the __init__ function to construct our object.
7619bf90f7950f97d9086feaa0096424f8c9a8d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7619bf90f7950f97d9086feaa0096424f8c9a8d1/perfect_matching.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1106, 1991, 67, 1152, 972, 12, 6429, 16, 84, 4672, 436, 8395, 1220, 445, 9327, 358, 21431, 326, 810, 261, 305, 848, 506, 3344, 279, 666, 578, 279, 3193, 434, 5574, 16, 578, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1106, 1991, 67, 1152, 972, 12, 6429, 16, 84, 4672, 436, 8395, 1220, 445, 9327, 358, 21431, 326, 810, 261, 305, 848, 506, 3344, 279, 666, 578, 279, 3193, 434, 5574, 16, 578, 279, ...
data = input_handler(curs, message_size, report)
data = input_handler(curs, message_size, self.report)
def input_node(self, curs, free_computing_nodes, message_size=None, report=0, input_handler=fetch_cluster_block): """ 10-20-05 10-22-05 add input_handler and regard curs as parameter_list """ communicator = self.communicator node_rank = communicator.rank sys.stderr.write("Input node(%s) working...\n"%node_rank) data = input_handler(curs, message_size, report) counter = 0 while data: communicator.send("1", communicator.size-1, 1) #WATCH: tag is 1, to the output_node. free_computing_node, source, tag = communicator.receiveString(communicator.size-1, 2) #WATCH: tag is 2, from the output_node data_pickle = cPickle.dumps(data, -1) communicator.send(data_pickle, int(free_computing_node), 0) #WATCH: int() if report: sys.stderr.write("block %s sent to %s.\n"%(counter, free_computing_node)) data = input_handler(curs, message_size, report) counter += 1 #tell computing_node to exit the loop for node in free_computing_nodes: #send it to the computing_node communicator.send("-1", node, 0) sys.stderr.write("Input node(%s) done\n"%(node_rank))
f6a09112921c3d48fc0ae17e03205994b9649650 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/f6a09112921c3d48fc0ae17e03205994b9649650/MPIwrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 810, 67, 2159, 12, 2890, 16, 25326, 16, 4843, 67, 13406, 310, 67, 4690, 16, 883, 67, 1467, 33, 7036, 16, 2605, 33, 20, 16, 810, 67, 4176, 33, 5754, 67, 7967, 67, 2629, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 810, 67, 2159, 12, 2890, 16, 25326, 16, 4843, 67, 13406, 310, 67, 4690, 16, 883, 67, 1467, 33, 7036, 16, 2605, 33, 20, 16, 810, 67, 4176, 33, 5754, 67, 7967, 67, 2629, 4672, 3536, ...
self.__set_field('bottom', bottom) self.__set_field('top', top)
self._set_field('bottom', bottom) self._set_field('top', top)
def restore_old_boundaries(self): bottom = self.__get_field('bottom.old') top = self.__get_field('top.old')
8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 1673, 67, 3653, 5646, 12, 2890, 4672, 5469, 273, 365, 16186, 588, 67, 1518, 2668, 9176, 18, 1673, 6134, 1760, 273, 365, 16186, 588, 67, 1518, 2668, 3669, 18, 1673, 6134, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 1673, 67, 3653, 5646, 12, 2890, 4672, 5469, 273, 365, 16186, 588, 67, 1518, 2668, 9176, 18, 1673, 6134, 1760, 273, 365, 16186, 588, 67, 1518, 2668, 3669, 18, 1673, 6134, 2, -...