rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
writeTraceableQuickStub(f, method, stubName)
writeTraceableQuickStub(f, customMethodCalls, method, stubName)
def writeTraceableStub(f, method): """ Write a method stub to `f`. Return an xpc_qsTraceableSpec initializer. """ stubName = method.iface.name + '_' + header.methodNativeName(method) writeTraceableQuickStub(f, method, stubName) fs = '{"%s", %s, %d}' % (method.name, "JS_DATA_TO_FUNC_PTR(JSNative, %s_trcinfo)" % stubName, len(method.params)) return fs
d4894752c17d8324526f58a8ae8c82f1bcfbecae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/d4894752c17d8324526f58a8ae8c82f1bcfbecae/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 11974, 12, 74, 16, 707, 4672, 3536, 2598, 279, 707, 7168, 358, 1375, 74, 8338, 2000, 392, 619, 2436, 67, 12926, 3448, 429, 1990, 12562, 18, 3536, 7168, 461, 273, 707, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 11974, 12, 74, 16, 707, 4672, 3536, 2598, 279, 707, 7168, 358, 1375, 74, 8338, 2000, 392, 619, 2436, 67, 12926, 3448, 429, 1990, 12562, 18, 3536, 7168, 461, 273, 707, ...
self.prefixuri = {} self.uriprefix = {}
self.ns_current = [] self.ns_stack = []
def __init__ (self, xmlrules, htmlrules, url, localhost): """ Init rules and buffers. """ # filter rules self.xmlrules = xmlrules self.htmlrules = htmlrules self.url = url # XML namespaces {name -> uri} and {uri -> name} self.prefixuri = {} self.uriprefix = {} # already filtered XML data self.outbuf = StringIO() self.tagbuf = [] self.rulestack = [] self.stack = [] self.encoding = "UTF-8"
857bd7fe261ab64e4383a47818282d5ebf04d521 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/857bd7fe261ab64e4383a47818282d5ebf04d521/XmlFilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2025, 7482, 16, 1729, 7482, 16, 880, 16, 17365, 4672, 3536, 4378, 2931, 471, 9664, 18, 3536, 468, 1034, 2931, 365, 18, 2902, 7482, 273, 2025, 7482, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2025, 7482, 16, 1729, 7482, 16, 880, 16, 17365, 4672, 3536, 4378, 2931, 471, 9664, 18, 3536, 468, 1034, 2931, 365, 18, 2902, 7482, 273, 2025, 7482, 365, ...
base
base.
def quadratic_twist(self, D): """ Return the quadratic twist of this curve by D, which must be nonzero except in characteristic 2.
b731b462902660c0112a8494ebc6f58ef36102b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b731b462902660c0112a8494ebc6f58ef36102b5/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26146, 67, 11246, 376, 12, 2890, 16, 463, 4672, 3536, 2000, 326, 26146, 2339, 376, 434, 333, 8882, 635, 463, 16, 1492, 1297, 506, 16966, 1335, 316, 23158, 576, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26146, 67, 11246, 376, 12, 2890, 16, 463, 4672, 3536, 2000, 326, 26146, 2339, 376, 434, 333, 8882, 635, 463, 16, 1492, 1297, 506, 16966, 1335, 316, 23158, 576, 18, 2, -100, -100, -100, ...
logging.getLogger().warning("'pid_path' is obslete, please replace it in your config file by 'pidfile'")
logging.getLogger().warning("'pid_path' is obsolete, please replace it in your config file by 'pidfile'")
def setup(self, config_file): # Load configuration file self.cp = MMCConfigParser() self.cp.read(config_file)
0fb5068970cb6f308a20a694df4c145a371e26de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/0fb5068970cb6f308a20a694df4c145a371e26de/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 642, 67, 768, 4672, 468, 4444, 1664, 585, 365, 18, 4057, 273, 18295, 39, 809, 2678, 1435, 365, 18, 4057, 18, 896, 12, 1425, 67, 768, 13, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 642, 67, 768, 4672, 468, 4444, 1664, 585, 365, 18, 4057, 273, 18295, 39, 809, 2678, 1435, 365, 18, 4057, 18, 896, 12, 1425, 67, 768, 13, 2, -100, -100, -100, -100...
keys = [k for k in self.stacks.keys() if not k.spatial]
keys = [k for k in self.stacks.keys() if not k.coordinates]
def __str__(self): deps = DependencySet(FIXME) s = "" s += "Variables independent of spatial coordinates:\n" keys = [k for k in self.stacks.keys() if not k.spatial] for deps in keys: if k.facet: stack = self.stacks[k] s += str(stack) for deps in keys: if not k.facet: stack = self.stacks[k] s += str(stack) s += "Variables dependent of spatial coordinates:\n" for k in dependent: s += k return s
b1b48c45bfffb609a40d14125016d63b2899726b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/624/b1b48c45bfffb609a40d14125016d63b2899726b/dependencies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 8740, 273, 11993, 694, 12, 25810, 13, 272, 273, 1408, 272, 1011, 315, 6158, 14807, 434, 15010, 5513, 5581, 82, 6, 1311, 273, 306, 79, 364, 417, 316, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 8740, 273, 11993, 694, 12, 25810, 13, 272, 273, 1408, 272, 1011, 315, 6158, 14807, 434, 15010, 5513, 5581, 82, 6, 1311, 273, 306, 79, 364, 417, 316, 365...
outputtabs.addTab( tab, "INPUT")
outputtabs.addTab( tab, "Input")
def buildMixer(self): log.debug("Building mixer") self.MatrixButtonControls={} self.MatrixRotaryControls={} self.MatrixVolumeControls={} self.VolumeControls={} self.SelectorControls={} self.SPDIFmodeControls={} self.TriggerControls={}
89a90d3806d33a9441e38874e03b201dde0730bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11526/89a90d3806d33a9441e38874e03b201dde0730bf/audiofire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 21294, 264, 12, 2890, 4672, 613, 18, 4148, 2932, 16713, 6843, 264, 7923, 365, 18, 4635, 3616, 16795, 12938, 365, 18, 4635, 8570, 814, 16795, 12938, 365, 18, 4635, 4545, 16795, 12938,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21294, 264, 12, 2890, 4672, 613, 18, 4148, 2932, 16713, 6843, 264, 7923, 365, 18, 4635, 3616, 16795, 12938, 365, 18, 4635, 8570, 814, 16795, 12938, 365, 18, 4635, 4545, 16795, 12938,...
d = d[:dotind] try: return DateTime.strptime(d, '%H:%M:%S'), tz except: pass if 1: return DateTime.strptime(d, '%Y-%m-%d %H:%M:%S')
dotless=d[:dotind] try: return DateTime.strptime(dotless, '%Y-%m-%d %H:%M:%S') except: pass else: dotless=None candidates=dotless is None and (d,) or (d, dotless) for dt in candidates: dashind = max(dt.rfind('-'), dt.rfind('+')) tz = dt[dashind:] dt = dt[:dashind] try: return DateTime.strptime(dt, '%H:%M:%S'), tz except: pass raise DateTime.Error, "could not parse datetime: %s" % d
def _dateConvertFromDB(d): if d==None: return None for format in ('%Y-%m-%d', # Y/M/D '%H:%M:%S', # hh:mm:ss '%H:%M', # hh:mm '%Y-%m'): # Y-M try: return DateTime.strptime(d, format) except: pass dashind = max(d.rfind('-'), d.rfind('+')) tz = d[dashind:] d = d[:dashind] #maybe it has a miliseconds ? dotind = string.rfind(d, '.') if dotind > 0: d = d[:dotind] try: return DateTime.strptime(d, '%H:%M:%S'), tz # timetz except: pass if 1:#try: # why is tz returned above and not here? return DateTime.strptime(d, '%Y-%m-%d %H:%M:%S') # full date #except: # pass
49e9959848d7e2577a2030348a986cd20779dbf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/49e9959848d7e2577a2030348a986cd20779dbf7/postconn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 2187, 468, 225, 1624, 19, 49, 19, 40, 1995, 44, 5319, 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, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 2187, 468, 225, 1624, 19, 49, 19, 40, 1995, 44, 5319, 4...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 198) else quickfix.StringField.__init__(self, 198, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 5342, 28, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 5342, 28, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738, ...
if (eid,esid) not in self.zero_lag_ids and (eid, self.zero_lag_ids[eid], params[2], params[3]) in self.frgstats:
if (eid, esid) not in self.zero_lag_ids.items() and (eid, self.zero_lag_ids[eid], params[2], params[3]) in self.frgstats:
def add_zero_lag_to_frgstats_and_sort( self ): """ Adds the zero_lag triggers to every entry in frgstats except for the zero-lag entry. Then sorts the concatenated lists. """ for params in self.frgstats: eid, esid = params[0], params[1] # following checks that this eid and esid are not zero lag and that # there are foreground triggers if (eid,esid) not in self.zero_lag_ids and (eid, self.zero_lag_ids[eid], params[2], params[3]) in self.frgstats: self.frgstats[ params ] = self.frgstats[ params ] + self.frgstats[ (eid, self.zero_lag_ids[eid], params[2], params[3])] self.frgstats[params].sort()
45ab9549fbc587ecc782c8a1c97ef62b5969728d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/45ab9549fbc587ecc782c8a1c97ef62b5969728d/ligolw_sqlutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7124, 67, 22532, 67, 869, 67, 4840, 75, 5296, 67, 464, 67, 3804, 12, 365, 262, 30, 3536, 15605, 326, 3634, 67, 22532, 11752, 358, 3614, 1241, 316, 3812, 75, 5296, 1335, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7124, 67, 22532, 67, 869, 67, 4840, 75, 5296, 67, 464, 67, 3804, 12, 365, 262, 30, 3536, 15605, 326, 3634, 67, 22532, 11752, 358, 3614, 1241, 316, 3812, 75, 5296, 1335, 364, ...
except (IndexError, IOError):
except IndexError:
def __init__( self, *args, **kargs): super(RBF,self).__init__( *args, **kargs ) self._set_constraints( ((-50,50),) * self.dims ) self.data_dims = None try: datafile = self.datafiles.split()[0] self.datapoints = [tuple(float(field) for field in line.split(',')) for line in open(datafile)] except (IndexError, IOError): self.datapoints = []
924b7080e81d4f7e3294cc03b47b0f973c9a60d2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/966/924b7080e81d4f7e3294cc03b47b0f973c9a60d2/rbf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 2240, 12, 54, 15259, 16, 2890, 2934, 972, 2738, 972, 12, 380, 1968, 16, 2826, 79, 1968, 262, 365, 6315, 542, 67, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 2240, 12, 54, 15259, 16, 2890, 2934, 972, 2738, 972, 12, 380, 1968, 16, 2826, 79, 1968, 262, 365, 6315, 542, 67, 11...
self.HOST = socket.gethostname()
self.HOST = ''
def __init__(self, server, port): self.PORT = port # Arbitrary non-privileged server self.server = server self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.HOST = socket.gethostname()
0d165893a4afde0d8cae2fb9c45477b2abee56fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/0d165893a4afde0d8cae2fb9c45477b2abee56fd/net_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1438, 16, 1756, 4672, 365, 18, 6354, 273, 1756, 468, 1201, 3682, 3345, 1661, 17, 683, 11860, 1438, 365, 18, 3567, 273, 1438, 365, 18, 87, 273, 2987, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1438, 16, 1756, 4672, 365, 18, 6354, 273, 1756, 468, 1201, 3682, 3345, 1661, 17, 683, 11860, 1438, 365, 18, 3567, 273, 1438, 365, 18, 87, 273, 2987, 18, ...
self._logger.debug('"%s" %s %s',
self._logger.log(netsvc.logging.DEBUG_RPC, '"%s" %s %s',
def log_request(self, code='-', size='-'): self._logger.debug('"%s" %s %s', self.requestline, str(code), str(size))
0ee47f021c9e8ee4dd61b0b3df9c58d9bdfc29c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0ee47f021c9e8ee4dd61b0b3df9c58d9bdfc29c8/http_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 2293, 12, 2890, 16, 981, 2218, 17, 2187, 963, 2218, 6627, 4672, 365, 6315, 4901, 18, 1330, 12, 11296, 4227, 18, 11167, 18, 9394, 67, 8087, 16, 22563, 87, 6, 738, 87, 738, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 2293, 12, 2890, 16, 981, 2218, 17, 2187, 963, 2218, 6627, 4672, 365, 6315, 4901, 18, 1330, 12, 11296, 4227, 18, 11167, 18, 9394, 67, 8087, 16, 22563, 87, 6, 738, 87, 738, 87...
self.mode.editwin.execute()
self.mode.execute()
def action(self, index=-1, multiplier=1): self.mode.editwin.execute()
5cfb102115321ea923828cfe2331e4b8f8a43e20 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/5cfb102115321ea923828cfe2331e4b8f8a43e20/dired.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3188, 18, 4619, 8082, 18, 8837, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3188, 18, 4619, 8082, 18, 8837, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
elif parts.count("feature") > 0: for i, pair in enumerate(parts[j+1:]):
if parts[0] == "feature": for i, pair in enumerate(parts[1:]):
def parseLine (self, line): #self.lock.acquire() parts = multiWs.split(line.strip()) if self.features["sigint"]: self.engine.sigint() # Illegal Move elif parts[0].lower().find("illegal") >= 0: if parts[-2] == "sd" and parts[-1].isdigit(): self.sd = False self.setDepth (int(parts[-1])) # A Move elif self.history: if parts[0] == "move": movestr = parts[1] # Old Variation elif d_plus_dot_expr.match(parts[0]) and parts[1] == "...": movestr = parts[2] else: movestr = False if movestr: move = self.parseMove(movestr) self.history = None self.emit("move", move) # Analyzing elif len(parts) >= 5 and self.forced and isdigits(parts[1:4]): if parts[:4] == ["0","0","0","0"]: # Crafty don't analyze untill it is out of book print >> self.engine, "book off" return his2 = self.history.clone() moves = [] for m in movre.findall(" ".join(parts[4:])+" "): try: moves.append(self.parseMove(m, his2)) except Exception, e: continue if moves: his2.add(moves[-1], mvlist=False) if moves: self.emit("analyze", moves) # Offers draw elif parts[0] == "offer" and parts[1] == "draw": self.emit("draw_offer") # Resigns elif line.find("resign") >= 0: self.emit("resign") #Tell User Error elif parts[0] in ("tellusererror", "Error"): print "Tell User Error", repr(" ".join(parts[1:])) # Tell Somebody elif parts[0][:4] == "tell" and \ parts[0][4:] in ("others", "all", "ics", "icsnoalias"): pass #print "Tell", parts[0][4:], repr(" ".join(parts[1:])) # Error elif parts[0].lower() in ("illegal", "error"): self.__del__() self.emit('dead') # Features elif parts.count("feature") > 0: for i, pair in enumerate(parts[j+1:]): if pair.find("=") < 0: continue key, value = pair.split("=") if value.startswith("\"") and value.endswith("\""): value = value[1:-1] elif value.startswith("\"") and not value.endswith("\""): rest = value[1:]+" "+" ".join(parts[2+i+j:]) i = rest.find("\"") if i >= 0: value = rest[:i] else: value[1:] else: value = int(value) self.features[key] = value #self.lock.release()
9f4908570592caedccdbd02503f0323e274e2545 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5339/9f4908570592caedccdbd02503f0323e274e2545/CECP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1670, 261, 2890, 16, 980, 4672, 468, 2890, 18, 739, 18, 1077, 1039, 1435, 225, 2140, 273, 3309, 15444, 18, 4939, 12, 1369, 18, 6406, 10756, 309, 365, 18, 7139, 9614, 7340, 474, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1670, 261, 2890, 16, 980, 4672, 468, 2890, 18, 739, 18, 1077, 1039, 1435, 225, 2140, 273, 3309, 15444, 18, 4939, 12, 1369, 18, 6406, 10756, 309, 365, 18, 7139, 9614, 7340, 474, 1...
return self.gobaloptioncache[platform+"-"+arch]
options.merge(self.gobaloptioncache[platform+"-"+arch])
def getglobaloptions(self, platform, arch): try: return self.gobaloptioncache[platform+"-"+arch] except KeyError: options = coptions() if not platform in self.platforms or not arch in self.archs: return options options.merge(self.globaloptions) for d in self.depends: options.merge(d.getglobaloptions(platform, arch)) for key,aoptions in self.globalarchoptions.iteritems(): try: p,a = key.split('-') p = expandPlatforms([p]) if a == arch and platform in p: options.merge(aoptions) except: p = expandPlatforms([key]) if arch in p or platform in p: options.merge(aoptions) self.gobaloptioncache[platform+"-"+arch] = options return options
95b9b9970b12fdbcf5e46b2e7ea2f8600efc8449 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/95b9b9970b12fdbcf5e46b2e7ea2f8600efc8449/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6347, 2116, 12, 2890, 16, 4072, 16, 6637, 4672, 775, 30, 702, 18, 2702, 12, 2890, 18, 75, 947, 287, 3482, 2493, 63, 9898, 9078, 10951, 15, 991, 5717, 1335, 4999, 30, 702, 273, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6347, 2116, 12, 2890, 16, 4072, 16, 6637, 4672, 775, 30, 702, 18, 2702, 12, 2890, 18, 75, 947, 287, 3482, 2493, 63, 9898, 9078, 10951, 15, 991, 5717, 1335, 4999, 30, 702, 273, 1...
for step in self.browse(cr,uid,ids):
for step in self.browse(cr, uid, ids):
def state_open_set(self, cr, uid, ids, *args): wf_service = netsvc.LocalService("workflow") for step in self.browse(cr,uid,ids): for step_id in step.step_ids: if step_id.state != 'open': raise osv.except_osv( _('Could not open this offer !'), _('You must first open all offer steps related to this offer.')) wf_service.trg_validate(uid, 'dm.offer', step.id, 'open', cr) self.write(cr, uid, ids, {'state':'open'}) return True
85a1e7b7da9518beac3cb0935570916534cd57ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/85a1e7b7da9518beac3cb0935570916534cd57ee/dm_offer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 919, 67, 3190, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 11578, 67, 3278, 273, 21954, 4227, 18, 25635, 2932, 13815, 7923, 364, 2235, 316, 365, 18, 25731, 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, 919, 67, 3190, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 11578, 67, 3278, 273, 21954, 4227, 18, 25635, 2932, 13815, 7923, 364, 2235, 316, 365, 18, 25731, 12...
error = get_dbus_error(e) if 'SimPinRequired' in error:
if 'SimPinRequired' in get_dbus_error(e):
def enable_device_eb(e): error = get_dbus_error(e) if 'SimPinRequired' in error: pin = config.get('test', 'pin', '0000') self.device.SendPin(pin, dbus_interface=CRD_INTFACE, reply_handler=enable_device_cb, error_handler=log.err) else: raise unittest.SkipTest("Cannot handle error %s" % error)
45c00959c14e666ef31b3f93137f14e6d66959e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/45c00959c14e666ef31b3f93137f14e6d66959e4/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 67, 5964, 67, 24008, 12, 73, 4672, 309, 296, 7993, 12178, 3705, 11, 316, 336, 67, 1966, 407, 67, 1636, 12, 73, 4672, 7092, 273, 642, 18, 588, 2668, 3813, 2187, 296, 13097, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5964, 67, 24008, 12, 73, 4672, 309, 296, 7993, 12178, 3705, 11, 316, 336, 67, 1966, 407, 67, 1636, 12, 73, 4672, 7092, 273, 642, 18, 588, 2668, 3813, 2187, 296, 13097, 2187, ...
print 'dummyUrllib2'
def urlopen(a): print 'dummyUrllib2' return StringIO.StringIO()
f433a0023d696a860f7f854f63ebd0c1137835ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/f433a0023d696a860f7f854f63ebd0c1137835ff/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19613, 12, 69, 4672, 327, 15777, 18, 780, 4294, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19613, 12, 69, 4672, 327, 15777, 18, 780, 4294, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
form.status = self.formErrorsMessage
self.status = self.formErrorsMessage
def handleApply(self, action): data, errors = self.widgets.extract() if errors: form.status = self.formErrorsMessage return content = self.getContent() changed = form.applyChanges(self, content, data) if changed: zope.event.notify( zope.lifecycleevent.ObjectModifiedEvent(content)) self.status = self.successMessage else: self.status = self.noChangesMessage
3774d2c1777765c5f71515f1e1bec8b54c464c45 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9738/3774d2c1777765c5f71515f1e1bec8b54c464c45/subform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 7001, 12, 2890, 16, 1301, 4672, 501, 16, 1334, 273, 365, 18, 18148, 18, 8004, 1435, 309, 1334, 30, 365, 18, 2327, 273, 365, 18, 687, 4229, 1079, 327, 913, 273, 365, 18, 588, 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, 1640, 7001, 12, 2890, 16, 1301, 4672, 501, 16, 1334, 273, 365, 18, 18148, 18, 8004, 1435, 309, 1334, 30, 365, 18, 2327, 273, 365, 18, 687, 4229, 1079, 327, 913, 273, 365, 18, 588, 13...
if self.subwidget_list.has_key(name): self.tk.call(self._w, 'invoke', name)
if self.subwidget_list.has_key(name): self.tk.call(self._w, 'invoke', name)
def invoke(self, name):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4356, 12, 2890, 16, 508, 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, 4356, 12, 2890, 16, 508, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if (not check_intermediate) or len(plist) < 2:
if not check_intermediate:
def __init__(self, master, name, destroy_physically=1, check_intermediate=1): if check_intermediate: path = master._subwidget_name(name) try: path = path[len(master._w)+1:] plist = path.split('.') except: plist = []
f0d8a1f953538c99feabd635c38f7f765c492d7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f0d8a1f953538c99feabd635c38f7f765c492d7f/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 16, 866, 67, 2761, 6785, 33, 21, 4672, 309, 866, 67, 2761, 6785, 30, 589, 273, 4171, 6315, 1717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 16, 866, 67, 2761, 6785, 33, 21, 4672, 309, 866, 67, 2761, 6785, 30, 589, 273, 4171, 6315, 1717, ...
initialSpokenFormats.add(itemKey)
initialSpokenFormats[itemKey]=item
def speakFormattedText(textInfo,handleSymbols=False,wait=False,index=None): global beenCanceled if speechMode==speechMode_off: return elif speechMode==speechMode_beeps: tones.beep(config.conf["speech"]["beepSpeechModePitch"],speechMode_beeps_ms) return beenCanceled=False formattedText=textInfo.getFormattedText(excludes=getExcludedAutoSpeakFormats()) if not hasattr(textInfo.obj,"_lastInitialSpokenFormats"): textInfo.obj._lastInitialSpokenFormats=set() initialSpokenFormats=set() checkFormats=True for item in formattedText: if isinstance(item,textHandler.FormatCommand): itemKey=(item.format.role,item.format.value,item.format.uniqueID) if item.cmd==textHandler.FORMAT_CMD_SINGLETON: if not checkFormats or itemKey not in textInfo.obj._lastInitialSpokenFormats: speechText=" ".join([controlTypes.speechRoleLabels.get(item.format.role,""),item.format.value]) speakMessage(speechText) if checkFormats: initialSpokenFormats.add(itemKey) elif item.cmd==textHandler.FORMAT_CMD_ON: if not checkFormats or itemKey not in textInfo.obj._lastInitialSpokenFormats: speechText=" ".join([controlTypes.speechRoleLabels.get(item.format.role,""),item.format.value,_("on")]) speakMessage(speechText) if checkFormats: initialSpokenFormats.add(itemKey) elif item.cmd==textHandler.FORMAT_CMD_OFF: speechText=" ".join([controlTypes.speechRoleLabels.get(item.format.role,""),_("off")]) speakMessage(speechText) elif isinstance(item,basestring): checkFormats=False if len(item)>1 or not handleSymbols: speakText(item,wait=wait,index=index) else: speech.speakSymbol(item) textInfo.obj._lastInitialSpokenFormats=initialSpokenFormats
541c6edcfb9c82cec02ec3b9815f52cfeb5bbf11 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/541c6edcfb9c82cec02ec3b9815f52cfeb5bbf11/speech.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 18298, 1528, 12, 955, 966, 16, 4110, 14821, 33, 8381, 16, 7048, 33, 8381, 16, 1615, 33, 7036, 4672, 2552, 2118, 23163, 309, 24556, 2309, 631, 87, 12510, 2309, 67, 3674, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 18298, 1528, 12, 955, 966, 16, 4110, 14821, 33, 8381, 16, 7048, 33, 8381, 16, 1615, 33, 7036, 4672, 2552, 2118, 23163, 309, 24556, 2309, 631, 87, 12510, 2309, 67, 3674, 30, ...
if build.Opt.TARGET == ['']: build.Opt.TARGET_ARCH = ['DEBUG', 'RELEASE'] EdkLogger.info('TARGET is: %s' % ''.join(build.Opt.TARGET))
if build.Opt.TARGET == []: build.Opt.TARGET = ['DEBUG', 'RELEASE'] EdkLogger.info('TARGET is: %s' % ''.join(elem + ' ' for elem in build.Opt.TARGET))
def main():
fdc20ec6440ef040a5da13b6c57483df8d5210eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/fdc20ec6440ef040a5da13b6c57483df8d5210eb/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sub_debug('listener bound to address %r', self._address)
def __init__(self, address, family, backlog=1): self._socket = socket.socket(getattr(socket, family)) self._socket.bind(address) self._socket.listen(backlog) self._family = family self._last_accepted = None
735380c44b524f77dbde1acf034a677d7e7e5737 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/735380c44b524f77dbde1acf034a677d7e7e5737/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1758, 16, 6755, 16, 1473, 1330, 33, 21, 4672, 365, 6315, 7814, 273, 2987, 18, 7814, 12, 588, 1747, 12, 7814, 16, 6755, 3719, 365, 6315, 7814, 18, 4376, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1758, 16, 6755, 16, 1473, 1330, 33, 21, 4672, 365, 6315, 7814, 273, 2987, 18, 7814, 12, 588, 1747, 12, 7814, 16, 6755, 3719, 365, 6315, 7814, 18, 4376, ...
runner = TestRunner(_CHROME_SOLUTION, _PROJECTS_TO_BUILD, _TESTS_TO_RUN)
parser = GetOptionParser() (options, args) = parser.parse_args() if args: parser.error('This script takes no arguments') solution = options.solution if not os.path.exists(solution): solution = os.path.join(os.path.dirname(_CHROME_SOLUTION), solution) solution = solution + '.sln' solution = os.path.abspath(solution) runner = TestRunner(solution, _PROJECTS_TO_BUILD, _TESTS_TO_RUN)
def Main(): if not ctypes.windll.shell32.IsUserAnAdmin(): print ("Please run the smoke tests in an admin prompt " "(or AppVerifier won't work).") return 1 runner = TestRunner(_CHROME_SOLUTION, _PROJECTS_TO_BUILD, _TESTS_TO_RUN) failures = 0 for config in _CONFIGURATIONS: failures += runner.BuildConfig(config) if failures != 0: print '%d build errors' % failures return failures for config in _CONFIGURATIONS: failures += runner.RunConfigTests(config) if failures != 0: print '%d unittests failed' % failures return failures
f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f88982b8c53b8b5b6e0a2bf8165f4eb217dca08d/smoke_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12740, 13332, 309, 486, 6983, 18, 10094, 2906, 18, 10304, 1578, 18, 2520, 1299, 979, 4446, 13332, 1172, 7566, 8496, 1086, 326, 3029, 3056, 7434, 316, 392, 3981, 6866, 315, 7751, 280, 4677,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12740, 13332, 309, 486, 6983, 18, 10094, 2906, 18, 10304, 1578, 18, 2520, 1299, 979, 4446, 13332, 1172, 7566, 8496, 1086, 326, 3029, 3056, 7434, 316, 392, 3981, 6866, 315, 7751, 280, 4677,...
print '
def gen_full_pinyin_table(pinyins): _dict = {} for i in xrange(0, len(pinyins)): _dict[pinyins[i]] = i full_pinyin = [] for i in xrange(0, len(pinyins)): if pinyins[i][0] in pinyin_list: full_pinyin.append (pinyins[i]) full_pinyin.sort(lambda a, b: (cmp(a[1], b[1]) << 16) + cmp(a[2],b[4])) print 'static const Pinyin *full_pinyin_table[] = {' for p in full_pinyin: print " &pinyin_table[%d], // %s" % (_dict[p], p[0]) print '};' print '#define FULL_PINYIN_TABLE_NR (sizeof (full_pinyin_table) / sizeof (full_pinyin_table[0]))' print
2adb75fd7849d94019a36a13fbd3196ff707aea3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/471/2adb75fd7849d94019a36a13fbd3196ff707aea3/genpytable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 2854, 67, 84, 11652, 267, 67, 2121, 12, 84, 11652, 2679, 4672, 389, 1576, 273, 2618, 364, 277, 316, 12314, 12, 20, 16, 562, 12, 84, 11652, 2679, 3719, 30, 389, 1576, 63, 84...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2854, 67, 84, 11652, 267, 67, 2121, 12, 84, 11652, 2679, 4672, 389, 1576, 273, 2618, 364, 277, 316, 12314, 12, 20, 16, 562, 12, 84, 11652, 2679, 3719, 30, 389, 1576, 63, 84...
context.error("unsupported directive: %s %s" % (self.mnemonic, operands)) sys.exit()
pa = None if operands: expr = Expression(context, operands) if expr.complete: pa = expr.value if context.memmap.isErasable(pa): context.code = pa + 010000 else: context.error("1DNADR operand must be in erasable memory")
def parse_3DNADR(self, context, symbol, operands): context.error("unsupported directive: %s %s" % (self.mnemonic, operands)) sys.exit()
7b29e1bdd72f89ef067f6f4227a2842caa307ee6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/7b29e1bdd72f89ef067f6f4227a2842caa307ee6/directives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 23, 8609, 1880, 54, 12, 2890, 16, 819, 16, 3273, 16, 14883, 4672, 6790, 273, 599, 309, 14883, 30, 3065, 273, 5371, 12, 2472, 16, 14883, 13, 309, 3065, 18, 6226, 30, 6790, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 23, 8609, 1880, 54, 12, 2890, 16, 819, 16, 3273, 16, 14883, 4672, 6790, 273, 599, 309, 14883, 30, 3065, 273, 5371, 12, 2472, 16, 14883, 13, 309, 3065, 18, 6226, 30, 6790, 2...
def __init__(self, cr, uid, id, table, cache, context={}, list_class = None):
def __init__(self, cr, uid, id, table, cache, context=None, list_class = None): if not context: context = {}
def __init__(self, cr, uid, id, table, cache, context={}, list_class = None): assert id, 'Wrong ID for the browse record, got '+str(id)+ ', expected an integer.' self._list_class = list_class or browse_record_list self._cr = cr self._uid = uid self._id = id self._table = table self._table_name = self._table._name self._context = context
51c822c57b3e0e31f49b4f232d512ab40533e603 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/51c822c57b3e0e31f49b4f232d512ab40533e603/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 1014, 16, 1247, 16, 819, 33, 7036, 16, 666, 67, 1106, 273, 599, 4672, 309, 486, 819, 30, 819, 273, 2618, 1815, 612, 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, 2738, 972, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 1014, 16, 1247, 16, 819, 33, 7036, 16, 666, 67, 1106, 273, 599, 4672, 309, 486, 819, 30, 819, 273, 2618, 1815, 612, 16, ...
if lines: result = result + self.section('DESCRIPTION', join(lines, '\n'))
if desc: result = result + self.section('DESCRIPTION', desc)
def docmodule(self, object, name=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not rstrip(lines[1]): if lines[0]: namesec = namesec + ' - ' + lines[0] lines = lines[2:] result = self.section('NAME', namesec)
4483cbd7eb6854684bc5af9c43d558ab8a2bcacf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4483cbd7eb6854684bc5af9c43d558ab8a2bcacf/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17, 267, 508, 1257...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17, 267, 508, 1257...
names = self.tk.call(self._w, 'panes') ret = [] for x in names: ret.append(self.subwidget(x)) return ret
names = self.tk.call(self._w, 'panes') ret = [] for x in names: ret.append(self.subwidget(x)) return ret
def panes(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, 2800, 281, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 2800, 281, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if variant == "class":
if variant in ("class", "bootstrap"):
def handleClassDefinition(docTree, item, variant): params = item.getChild("params") className = params.children[0].get("value") if len(params.children) > 1: classMap = params.children[1] else: classMap = {} commentAttributes = comment.parseNode(item) classNode = getClassNode(docTree, className, commentAttributes) if variant == "class": classNode.set("type", "class") type = selectNode(params, "2/keyvalue[@key='type']/value/constant/@value") if type == "singleton": classNode.set("isSingleton", True) elif type == "abstract": classNode.set("isAbstract", True) else: classNode.set("type", variant) handleDeprecated(classNode, commentAttributes) handleAccess(classNode, commentAttributes) handleAppearance(item, classNode, className, commentAttributes) try: children = classMap.children except AttributeError: return for keyvalueItem in children: if keyvalueItem.type != "keyvalue": continue key = keyvalueItem.get("key") valueItem = keyvalueItem.getChild("value").getFirstChild() # print "KEY: %s = %s" % (key, valueItem.type) if key == "extend": if variant == "class": handleClassExtend(valueItem, classNode, docTree, className) elif variant == "interface": handleInterfaceExtend(valueItem, classNode, docTree, className) elif key == "include": handleMixins(valueItem, classNode, docTree, className) elif key == "implement": handleInterfaces(valueItem, classNode, docTree) elif key == "construct": handleConstructor(valueItem, classNode) elif key == "statics": handleStatics(valueItem, classNode) elif key == "properties": handleProperties(valueItem, classNode) elif key == "members": handleMembers(valueItem, classNode) elif key == "events": handleEvents(valueItem, classNode) handleSingleton(classNode, docTree) if not classNode.hasChild("desc"): addError(classNode, "Class documentation is missing.", item)
b198afcd6afb9fe9880a550ae663f1f3b15d8892 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/b198afcd6afb9fe9880a550ae663f1f3b15d8892/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 797, 1852, 12, 2434, 2471, 16, 761, 16, 5437, 4672, 859, 273, 761, 18, 588, 1763, 2932, 2010, 7923, 2658, 273, 859, 18, 5906, 63, 20, 8009, 588, 2932, 1132, 7923, 225, 309, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 797, 1852, 12, 2434, 2471, 16, 761, 16, 5437, 4672, 859, 273, 761, 18, 588, 1763, 2932, 2010, 7923, 2658, 273, 859, 18, 5906, 63, 20, 8009, 588, 2932, 1132, 7923, 225, 309, 562, ...
sage: os.listdir(W.directory())
sage: sorted(os.listdir(W.directory()))
def delete_cells_directory(self): """ Delete the directory in which all the cell computations occur.
d313604fd20d8e178abfdc9d30684d263fcbef76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d313604fd20d8e178abfdc9d30684d263fcbef76/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 14741, 67, 5149, 12, 2890, 4672, 3536, 2504, 326, 1867, 316, 1492, 777, 326, 2484, 5305, 1012, 3334, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 14741, 67, 5149, 12, 2890, 4672, 3536, 2504, 326, 1867, 316, 1492, 777, 326, 2484, 5305, 1012, 3334, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.__caller = frame_codeinfo(currentframe(),2)
if self.sql_log: self.__caller = frame_codeinfo(currentframe(),2) else: self.__caller = False
def __init__(self, pool, dbname, serialized=False): self.sql_from_log = {} self.sql_into_log = {}
12f4f6232cf2b9bf2475844cdcdb12599bab952c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/12f4f6232cf2b9bf2475844cdcdb12599bab952c/sql_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2845, 16, 18448, 16, 5343, 33, 8381, 4672, 365, 18, 4669, 67, 2080, 67, 1330, 273, 2618, 365, 18, 4669, 67, 18591, 67, 1330, 273, 2618, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 2845, 16, 18448, 16, 5343, 33, 8381, 4672, 365, 18, 4669, 67, 2080, 67, 1330, 273, 2618, 365, 18, 4669, 67, 18591, 67, 1330, 273, 2618, 2, -100, -100, ...
for node in el.findall('image'):
for node in el.findall('.//image'):
def _images(self, el): result = {} for node in el.findall('image'): rc =( node.text or '') result[node.get('name')] = base64.decodestring(rc) return result
3deeeb112a71bd7004e7b4f9442577d106bf1b49 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/3deeeb112a71bd7004e7b4f9442577d106bf1b49/trml2pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7369, 12, 2890, 16, 415, 4672, 563, 273, 2618, 364, 756, 316, 415, 18, 4720, 454, 2668, 18, 759, 2730, 11, 4672, 4519, 273, 12, 756, 18, 955, 578, 28707, 563, 63, 2159, 18, 588,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7369, 12, 2890, 16, 415, 4672, 563, 273, 2618, 364, 756, 316, 415, 18, 4720, 454, 2668, 18, 759, 2730, 11, 4672, 4519, 273, 12, 756, 18, 955, 578, 28707, 563, 63, 2159, 18, 588,...
statusdict = {RPC_REQUEST_ID:callID,RPC_REQUEST_STATUS:status,RPC_RESULT:retvalue}
statusdict = {RPC_REQUEST_STATUS:status,RPC_RESULT:retvalue} if callID != None: statusdict[RPC_REQUEST_ID] = callID
def new_rpc(conn_id, sock): # If anything fails, close the socket try: # Get the RPC object rpc_dict = RPC_decode(sock) # DEBUG print getruntime(),"RPC Request:",rpc_dict # Get the RPC call id if RPC_REQUEST_ID in rpc_dict: callID = rpc_dict[RPC_REQUEST_ID] else: callID = 0 # Get the requested function if RPC_FUNCTION in rpc_dict: request = rpc_dict[RPC_FUNCTION] else: request = None # Get the value, this is the parameter to the function if RPC_PARAM in rpc_dict: value = rpc_dict[RPC_PARAM] else: value = None # Determine if there are remaining RPC requests if RPC_ADDI_REQ in rpc_dict: additional = rpc_dict[RPC_ADDI_REQ] else: additional = False # If the request exists, call the function if request in RPC_FUNCTIONS: func = RPC_FUNCTIONS[request] # Give the function the conn_id, and the value to the request # Store the status, and the return value status,retvalue = func(conn_id,value) # No request made, it has failed else: status = False retvalue = None # Send the status of the request statusdict = {RPC_REQUEST_ID:callID,RPC_REQUEST_STATUS:status,RPC_RESULT:retvalue} # DEBUG # print "RPC Response:",statusdict # Encode the RPC response dictionary response = RPC_encode(statusdict) # Send the response sock.send(response) # Check if there is more RPC calls if additional: # Recurse new_rpc(conn_id, sock) else: # Wait for the client to receive the response sleep(WAIT_INTERVAL) # Close the socket _safe_close(sock) except Exception, e: print "Exception in RPC Layer:",str(e) # Something went wrong... _safe_close(sock)
97c98a4639b5732c55eb56e45c05285f614b74a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/97c98a4639b5732c55eb56e45c05285f614b74a9/forwarder_rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 7452, 12, 4646, 67, 350, 16, 7313, 4672, 468, 971, 6967, 6684, 16, 1746, 326, 2987, 775, 30, 468, 968, 326, 8295, 733, 6724, 67, 1576, 273, 8295, 67, 3922, 12, 15031, 13, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 7452, 12, 4646, 67, 350, 16, 7313, 4672, 468, 971, 6967, 6684, 16, 1746, 326, 2987, 775, 30, 468, 968, 326, 8295, 733, 6724, 67, 1576, 273, 8295, 67, 3922, 12, 15031, 13, 22...
``action="store_hive" if you want it to be useful).
``action="store_hive"`` if you want it to be useful).
def store_option_strings(self, parser): SubbedOptIndentedFormatter.store_option_strings(self, parser) # 27 is how the lib stock help appears self.help_position = max(self.help_position, 27) self.help_width = self.width - self.help_position
8b3731223665a42371da3742998f24c14d794a06 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5459/8b3731223665a42371da3742998f24c14d794a06/fuse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 3482, 67, 10219, 12, 2890, 16, 2082, 4672, 2592, 2992, 6179, 7790, 329, 5074, 18, 2233, 67, 3482, 67, 10219, 12, 2890, 16, 2082, 13, 468, 12732, 353, 3661, 326, 2561, 12480, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 3482, 67, 10219, 12, 2890, 16, 2082, 4672, 2592, 2992, 6179, 7790, 329, 5074, 18, 2233, 67, 3482, 67, 10219, 12, 2890, 16, 2082, 13, 468, 12732, 353, 3661, 326, 2561, 12480, ...
def Scan(self,essid=None):
def Scan(self, essid=None):
def Scan(self,essid=None): """ Scan for available wireless networks.
fa04a3755cad3227c7d5b6fc1a13a4d8a3cc6201 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/353/fa04a3755cad3227c7d5b6fc1a13a4d8a3cc6201/networking.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8361, 12, 2890, 16, 18518, 350, 33, 7036, 4672, 3536, 8361, 364, 2319, 6636, 2656, 13884, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8361, 12, 2890, 16, 18518, 350, 33, 7036, 4672, 3536, 8361, 364, 2319, 6636, 2656, 13884, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
logger.info("Creating a build job for %s"%','.join(bjsites)) bjspecs=[] for bjsite in bjsites: tmpLibDS = job.outputdata.datasetname+'.lib' jspec = JobSpec() jspec.jobDefinitionID = job.id jspec.jobName = commands.getoutput('uuidgen') jspec.AtlasRelease = 'Atlas-%s' % app.atlas_release jspec.homepackage = 'AnalysisTransforms'+self.cacheVer if job.backend.bexec != '': jspec.transformation = '%s/buildGen-00-00-01' % Client.baseURLSUB else: jspec.transformation = '%s/buildJob-00-00-03' % Client.baseURLSUB if Client.isDQ2free(bjsite) and not local_libds: jspec.destinationDBlock = '%s/%s' % (job.outputdata.datasetname,self.libDatasets[bjsite]) jspec.destinationSE = 'local' else: jspec.destinationDBlock = self.libDatasets[bjsite] jspec.destinationSE = bjsite jspec.prodSourceLabel = configPanda['prodSourceLabelBuild'] jspec.processingType = configPanda['processingType'] jspec.assignedPriority = configPanda['assignedPriorityBuild'] jspec.computingSite = bjsite jspec.cloud = Client.PandaSites[bjsite]['cloud'] jspec.jobParameters = '-o %s' % (self.libraries[bjsite]) if inputsandbox: jspec.jobParameters += ' -i %s' % (os.path.basename(inputsandbox)) matchURL = re.search('(http.*://[^/]+)/',Client.baseURLSSL) if matchURL: jspec.jobParameters += ' --sourceURL %s' % matchURL.group(1) jspec.cmtConfig = AthenaUtils.getCmtConfig(athenaVer=app.atlas_release) if job.backend.bexec != '': jspec.jobParameters += ' --bexec "%s" ' % urllib.quote(job.backend.bexec) jspec.jobParameters += ' -r %s ' % '.' fout = FileSpec() fout.lfn = self.libraries[bjsite] fout.type = 'output' fout.dataset = self.libDatasets[bjsite] fout.destinationDBlock = self.libDatasets[bjsite] jspec.addFile(fout) flog = FileSpec() flog.lfn = '%s.log.tgz' % self.libDatasets[bjsite] flog.type = 'log' flog.dataset = self.libDatasets[bjsite] flog.destinationDBlock = self.libDatasets[bjsite] if configPanda['chirpconfig']: flog.dispatchDBlockToken = configPanda['chirpconfig'] jspec.addFile(flog) bjspecs.append(jspec)
if app.athena_compile: logger.info("Creating a build job for %s"%','.join(bjsites)) bjspecs=[] for bjsite in bjsites: tmpLibDS = job.outputdata.datasetname+'.lib' jspec = JobSpec() jspec.jobDefinitionID = job.id jspec.jobName = commands.getoutput('uuidgen') jspec.AtlasRelease = 'Atlas-%s' % app.atlas_release jspec.homepackage = 'AnalysisTransforms'+self.cacheVer if job.backend.bexec != '': jspec.transformation = '%s/buildGen-00-00-01' % Client.baseURLSUB else: jspec.transformation = '%s/buildJob-00-00-03' % Client.baseURLSUB if Client.isDQ2free(bjsite) and not local_libds: jspec.destinationDBlock = '%s/%s' % (job.outputdata.datasetname,self.libDatasets[bjsite]) jspec.destinationSE = 'local' else: jspec.destinationDBlock = self.libDatasets[bjsite] jspec.destinationSE = bjsite jspec.prodSourceLabel = configPanda['prodSourceLabelBuild'] jspec.processingType = configPanda['processingType'] jspec.assignedPriority = configPanda['assignedPriorityBuild'] jspec.computingSite = bjsite jspec.cloud = Client.PandaSites[bjsite]['cloud'] jspec.jobParameters = '-o %s' % (self.libraries[bjsite]) if inputsandbox: jspec.jobParameters += ' -i %s' % (os.path.basename(inputsandbox)) matchURL = re.search('(http.*://[^/]+)/',Client.baseURLSSL) if matchURL: jspec.jobParameters += ' --sourceURL %s' % matchURL.group(1) jspec.cmtConfig = AthenaUtils.getCmtConfig(athenaVer=app.atlas_release) if job.backend.bexec != '': jspec.jobParameters += ' --bexec "%s" ' % urllib.quote(job.backend.bexec) jspec.jobParameters += ' -r %s ' % '.' fout = FileSpec() fout.lfn = self.libraries[bjsite] fout.type = 'output' fout.dataset = self.libDatasets[bjsite] fout.destinationDBlock = self.libDatasets[bjsite] jspec.addFile(fout) flog = FileSpec() flog.lfn = '%s.log.tgz' % self.libDatasets[bjsite] flog.type = 'log' flog.dataset = self.libDatasets[bjsite] flog.destinationDBlock = self.libDatasets[bjsite] if configPanda['chirpconfig']: flog.dispatchDBlockToken = configPanda['chirpconfig'] jspec.addFile(flog) bjspecs.append(jspec)
def master_prepare(self,app,appconfig): '''Prepare the master job'''
775534c3377a7e5d3fa94f41e62c8f88bed6aebf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/775534c3377a7e5d3fa94f41e62c8f88bed6aebf/AthenaPandaRTHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 9366, 12, 2890, 16, 2910, 16, 2910, 1425, 4672, 9163, 7543, 326, 4171, 1719, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 9366, 12, 2890, 16, 2910, 16, 2910, 1425, 4672, 9163, 7543, 326, 4171, 1719, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
networkBio = self.networkBio
networkBio = self.networkBio._ptr()
def _decrypt(self, data=''): # XXX near mirror image of _encrypt - refactor self.encrypted += data decryptedData = '' # Optimizations to reduce attribute accesses sslBioPtr = self.sslBio._ptr() networkBio = self.networkBio m2bio_ctrl_get_write_guarantee = m2.bio_ctrl_get_write_guarantee m2bio_write = m2.bio_write m2bio_should_retry = m2.bio_should_retry m2bio_ctrl_pending = m2.bio_ctrl_pending m2bio_read = m2.bio_read while 1: g = m2bio_ctrl_get_write_guarantee(networkBio) if g > 0 and self.encrypted != '': r = m2bio_write(networkBio, self.encrypted) if r <= 0: assert(m2bio_should_retry(networkBio)) else: self.encrypted = self.encrypted[r:] pending = m2bio_ctrl_pending(sslBioPtr) if pending: d = m2bio_read(sslBioPtr, pending) if d is not None: # This is strange, but d can be None decryptedData += d else: assert(m2bio_should_retry(sslBioPtr)) else: break
a99db2ef84a088d900677844b0f1a047a8cfd25a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10522/a99db2ef84a088d900677844b0f1a047a8cfd25a/TwistedProtocolWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19790, 12, 2890, 16, 501, 2218, 11, 4672, 468, 11329, 13378, 15593, 1316, 434, 389, 15890, 300, 26627, 365, 18, 18702, 1011, 501, 13794, 751, 273, 875, 468, 19615, 7089, 358, 5459, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19790, 12, 2890, 16, 501, 2218, 11, 4672, 468, 11329, 13378, 15593, 1316, 434, 389, 15890, 300, 26627, 365, 18, 18702, 1011, 501, 13794, 751, 273, 875, 468, 19615, 7089, 358, 5459, ...
fobj.seek(size, 1)
offset += len(buf) fobj.seek(offset + size)
def delete_bytes(fobj, size, offset): """Delete size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or equivalent. Mutagen tries to use mmap to resize the file, but falls back to a significantly slower method if mmap fails. """ assert 0 < size assert 0 <= offset fobj.seek(0, 2) filesize = fobj.tell() movesize = filesize - offset - size assert 0 <= movesize if movesize > 0: fobj.flush() map = mmap.mmap(fobj.fileno(), filesize) try: map.move(offset, offset + size, movesize) map.close() except ValueError: # handle broken python on 64bit map.close() fobj.seek(offset + size) buf = fobj.read(size) while len(buf): fobj.seek(-len(buf) - size, 1) fobj.write(buf) fobj.seek(size, 1) buf = fobj.read(size) fobj.truncate(filesize - size) fobj.flush()
9ecf49cd771d6167567fe3137cabeb27d31dc315 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/9ecf49cd771d6167567fe3137cabeb27d31dc315/_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 3890, 12, 27936, 16, 963, 16, 1384, 4672, 3536, 2613, 963, 1731, 434, 1008, 3476, 5023, 622, 1384, 18, 225, 24705, 1297, 506, 392, 1696, 585, 733, 16, 1696, 7138, 15, 578, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 3890, 12, 27936, 16, 963, 16, 1384, 4672, 3536, 2613, 963, 1731, 434, 1008, 3476, 5023, 622, 1384, 18, 225, 24705, 1297, 506, 392, 1696, 585, 733, 16, 1696, 7138, 15, 578, 76...
if config.plugins.autobackup.mode.value and (config.plugins.autobackup.mode.value != "off"):
if config.plugins.autobackup.enabled.value:
def getWakeTime(self): if config.plugins.autobackup.mode.value and (config.plugins.autobackup.mode.value != "off"): clock = config.plugins.autobackup.wakeup.value nowt = time.time() now = time.localtime(nowt) return int(time.mktime((now.tm_year, now.tm_mon, now.tm_mday, clock[0], clock[1], 0, now.tm_wday, now.tm_yday, now.tm_isdst))) else: return -1
72f1ac0f79f9b6705d800f9cca3b297951460066 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10199/72f1ac0f79f9b6705d800f9cca3b297951460066/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13876, 911, 950, 12, 2890, 4672, 309, 642, 18, 8057, 18, 6079, 9572, 18, 5745, 18, 1132, 30, 7268, 273, 642, 18, 8057, 18, 6079, 9572, 18, 91, 911, 416, 18, 1132, 2037, 88, 273, 813,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13876, 911, 950, 12, 2890, 4672, 309, 642, 18, 8057, 18, 6079, 9572, 18, 5745, 18, 1132, 30, 7268, 273, 642, 18, 8057, 18, 6079, 9572, 18, 91, 911, 416, 18, 1132, 2037, 88, 273, 813,...
""" Return True if the factory is valid
""" Return True if the factory is valid
def is_valid(self): """ Return True if the factory is valid else raise an exception """ return True
0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/0ceea93f880b610f6ec05e7f6f0d32b2a4dd7e66/node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 877, 12, 2890, 4672, 3536, 2000, 1053, 309, 326, 3272, 353, 923, 469, 1002, 392, 1520, 3536, 327, 1053, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 877, 12, 2890, 4672, 3536, 2000, 1053, 309, 326, 3272, 353, 923, 469, 1002, 392, 1520, 3536, 327, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
put(seed_file, '/tmp/%s' % seed_filename)
put(seed_filename, '/tmp/%s' % seed_filename)
def install_debconf_seeds(): print(green('Installing debconf-utils')) sudo('apt-get -y install debconf-utils') for seed_file in conf.DEBCONF_SEEDS: directory, sep, seed_filename = seed_file.rpartition('/') print(green('Installing seed: %s' % seed_filename)) put(seed_file, '/tmp/%s' % seed_filename) sudo('debconf-set-selections /tmp/%s' % seed_filename)
839d8cba6e0dae1c9ecc1c5a3d0867becb464904 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14316/839d8cba6e0dae1c9ecc1c5a3d0867becb464904/packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 31888, 3923, 67, 307, 9765, 13332, 1172, 12, 11571, 2668, 6410, 310, 18202, 3923, 17, 5471, 26112, 14669, 2668, 1657, 17, 588, 300, 93, 3799, 18202, 3923, 17, 5471, 6134, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 31888, 3923, 67, 307, 9765, 13332, 1172, 12, 11571, 2668, 6410, 310, 18202, 3923, 17, 5471, 26112, 14669, 2668, 1657, 17, 588, 300, 93, 3799, 18202, 3923, 17, 5471, 6134, 364, ...
default='3', cmd='-R', cf=('communication', 'retries'))
default='3', cmd='-R', cf=('communication', 'retries'), odesc="<retry count>")
def parse(self, argv, do_getopt=True): '''Parse options''' ret = {} if do_getopt: try: opts, args = getopt.getopt(argv, self.buildGetopt(), []) except getopt.GetoptError, err: self.helpExit(err) if '-h' in argv: self.helpExit('', 0) for key in self.keys(): option = self[key] if do_getopt: option.parse(opts, []) else: option.parse([], argv) if hasattr(option, '_value'): val = option.value self[key] = val
388ae76f595adfa23b4b04f1a567d2cb66c684b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/388ae76f595adfa23b4b04f1a567d2cb66c684b3/Options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 5261, 16, 741, 67, 588, 3838, 33, 5510, 4672, 9163, 3201, 702, 26418, 325, 273, 2618, 309, 741, 67, 588, 3838, 30, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 5261, 16, 741, 67, 588, 3838, 33, 5510, 4672, 9163, 3201, 702, 26418, 325, 273, 2618, 309, 741, 67, 588, 3838, 30, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588...
if "</noinclude>" in s2[firstafter:] and firstafter < 0:
if "</noinclude>" in s2[firstafter:]:
def replaceCategoryLinks(oldtext, new, site = None): """Replace the category links given in the wikitext given in oldtext by the new links given in new. 'new' should be a list of Category objects. """ if site is None: site = getSite() if site == Site('de', 'wikipedia'): raise Error('The PyWikipediaBot is no longer allowed to touch categories on the German Wikipedia. See de.wikipedia.org/wiki/Wikipedia_Diskussion:Personendaten#Position') s = categoryFormat(new, insite = site) s2 = removeCategoryLinks(oldtext, site = site) if s: if site.language() in site.family.category_attop: newtext = s + site.family.category_text_separator + s2 else: # calculate what was after the categories links on the page firstafter = 0 try: while s2[firstafter-1] == oldtext[firstafter-1]: firstafter -= 1 except IndexError: pass # Is there any text in the 'after' part that means we should keep it after? if "</noinclude>" in s2[firstafter:] and firstafter < 0: newtext = s2[:firstafter] + s + s2[firstafter:] elif site.language() in site.family.categories_last: newtext = s2 + site.family.category_text_separator + s else: interwiki = getLanguageLinks(s2) s2 = removeLanguageLinks(s2, site) + site.family.category_text_separator + s newtext = replaceLanguageLinks(s2, interwiki, site) else: return s2 return newtext
f9c80ef99f35a24fb3c47761699987c6879700b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/f9c80ef99f35a24fb3c47761699987c6879700b2/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 4457, 7100, 12, 1673, 955, 16, 394, 16, 2834, 273, 599, 4672, 3536, 5729, 326, 3150, 4716, 864, 316, 326, 341, 1766, 305, 408, 864, 316, 1592, 955, 635, 326, 394, 4716, 864, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 4457, 7100, 12, 1673, 955, 16, 394, 16, 2834, 273, 599, 4672, 3536, 5729, 326, 3150, 4716, 864, 316, 326, 341, 1766, 305, 408, 864, 316, 1592, 955, 635, 326, 394, 4716, 864, 316,...
raise UserWarning, 'bad mozParam'
try: mp = {'name': attrs.getValueByQName(u'name'), 'condition': attrs.getValueByQName(u'condition'), 'pref': attrs.getValueByQName(u'pref')} except KeyError: raise UserWarning, 'bad mozParam' if self.engine['urls'][-1].has_key('MozParams'): self.engine['urls'][-1]['MozParams'].append(mp) else: self.engine['urls'][-1]['MozParams'] = [mp]
def handleMozParam(self, attrs): try: self.engine['urls'][-1]['MozParams'] = { 'name': attrs.getValueByQName(u'name'), 'condition': attrs.getValueByQName(u'condition'), 'trueValue': attrs.getValueByQName(u'trueValue'), 'falseValue': attrs.getValueByQName(u'falseValue')} except KeyError: raise UserWarning, 'bad mozParam' return
efd691aad16921014b7669d108f9fdafb8d89e46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13067/efd691aad16921014b7669d108f9fdafb8d89e46/Tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 49, 11142, 786, 12, 2890, 16, 3422, 4672, 775, 30, 365, 18, 8944, 3292, 10518, 3546, 18919, 21, 23962, 49, 11142, 1370, 3546, 273, 288, 296, 529, 4278, 3422, 18, 24805, 858, 13688,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 49, 11142, 786, 12, 2890, 16, 3422, 4672, 775, 30, 365, 18, 8944, 3292, 10518, 3546, 18919, 21, 23962, 49, 11142, 1370, 3546, 273, 288, 296, 529, 4278, 3422, 18, 24805, 858, 13688,...
def _main(): """ Parse command line options and run checks on Python source. """ global options
def print_statistics(): """ Print overall statistics (number of errors and warnings of each type) """ keys = options.counters.keys() keys.sort() for key in keys: if key[0] in 'EW': print '%-7s %s %s' % (options.counters[key], key, options.messages[key]) def get_error_statistics(): """ Get error statistics. """ return get_statistics("E") def get_warning_statistics(): """ Get warning statistics. """ return get_statistics("W") def get_statistics(type): """ Get statistics for messages of given type (errors or warnings). """ stats = [] keys = options.counters.keys() keys.sort() for key in keys: if key[0] != type: continue stats.append('%-7s %s %s' % \ (options.counters[key], key, options.messages[key])) return stats def print_benchmark(): """ Print benchmark numbers. """ print '%-7.2f %s' % (elapsed, 'seconds elapsed') keys = ['directories', 'files', 'logical lines', 'physical lines'] for key in keys: if key in options.counters: print '%-7d %s per second (%d total)' % ( options.counters[key] / elapsed, key, options.counters[key]) def process_options(arglist=None): """ Process options passed either via arglist or via command line args. """ global options, args
def _main(): """ Parse command line options and run checks on Python source. """ global options usage = "%prog [options] input ..." parser = OptionParser(usage) parser.add_option('-v', '--verbose', default=0, action='count', help="print status messages, or debug with -vv") parser.add_option('-q', '--quiet', default=0, action='count', help="report only file names, or nothing with -qq") parser.add_option('--exclude', metavar='patterns', default=default_exclude, help="skip matches (default %s)" % default_exclude) parser.add_option('--filename', metavar='patterns', help="only check matching files (e.g. *.py)") parser.add_option('--ignore', metavar='errors', default='', help="skip errors and warnings (e.g. E4,W)") parser.add_option('--repeat', action='store_true', help="show all occurrences of the same error") parser.add_option('--show-source', action='store_true', help="show source code for each error") parser.add_option('--show-pep8', action='store_true', help="show text of PEP 8 for each error") parser.add_option('--statistics', action='store_true', help="count errors and warnings") parser.add_option('--benchmark', action='store_true', help="measure processing speed") parser.add_option('--testsuite', metavar='dir', help="run regression tests from dir") parser.add_option('--doctest', action='store_true', help="run doctest on myself") options, args = parser.parse_args() if options.doctest: import doctest return doctest.testmod() if options.testsuite: args.append(options.testsuite) if len(args) == 0: parser.error('input not specified') options.prog = os.path.basename(sys.argv[0]) options.exclude = options.exclude.split(',') for index in range(len(options.exclude)): options.exclude[index] = options.exclude[index].rstrip('/') if options.filename: options.filename = options.filename.split(',') if options.ignore: options.ignore = options.ignore.split(',') else: options.ignore = [] # print options.exclude, options.ignore start_time = time.time() options.counters = {} options.messages = {} for path in args: if os.path.isdir(path): input_dir(path) else: input_file(path) elapsed = time.time() - start_time if options.statistics: keys = options.counters.keys() keys.sort() for key in keys: if key[0] in 'EW': print '%-7s %s %s' % (options.counters[key], key, options.messages[key]) if options.benchmark: print '%-7.2f %s' % (elapsed, 'seconds elapsed') keys = ['directories', 'files', 'logical lines', 'physical lines'] for key in keys: if key in options.counters: print '%-7d %s per second (%d total)' % ( options.counters[key] / elapsed, key, options.counters[key])
b69e50e89584add8ba3cde2f8eea42330b1cdbc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3111/b69e50e89584add8ba3cde2f8eea42330b1cdbc3/pep8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 14438, 13332, 3536, 3038, 13914, 7691, 261, 2696, 434, 1334, 471, 5599, 434, 1517, 618, 13, 3536, 1311, 273, 702, 18, 23426, 18, 2452, 1435, 1311, 18, 3804, 1435, 364, 498, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 14438, 13332, 3536, 3038, 13914, 7691, 261, 2696, 434, 1334, 471, 5599, 434, 1517, 618, 13, 3536, 1311, 273, 702, 18, 23426, 18, 2452, 1435, 1311, 18, 3804, 1435, 364, 498, 316...
if overlaplist.count(timer): overlaplist.remove(timer)
for entry in overlaplist: if entry[1] == timer: overlaplist.remove(entry)
def sort_func(x, y): if x[0] == y[0]: return cmp(y[2], x[2]) return cmp(x[0], y[0])
31e25fad17dc49768debc9b2d83c19886fa40188 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/31e25fad17dc49768debc9b2d83c19886fa40188/TimerSanityCheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 644, 12, 92, 16, 677, 4672, 309, 619, 63, 20, 65, 422, 677, 63, 20, 14542, 327, 9411, 12, 93, 63, 22, 6487, 619, 63, 22, 5717, 327, 9411, 12, 92, 63, 20, 6487, 677, 63,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 644, 12, 92, 16, 677, 4672, 309, 619, 63, 20, 65, 422, 677, 63, 20, 14542, 327, 9411, 12, 93, 63, 22, 6487, 619, 63, 22, 5717, 327, 9411, 12, 92, 63, 20, 6487, 677, 63,...
ser.port = port
ser.port = port
def stop(self): """Stop copying""" if self.alive: self.alive = False self.thread_read.join()
8c80bbcfa2dee7de96e5435fdcc0741993aac1ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/8c80bbcfa2dee7de96e5435fdcc0741993aac1ac/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 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, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -...
def split(self,label):
def split(self, label):
def split(self,label):
78534fa5e44f63d640ff07c425ec3edd3bb48fe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9658/78534fa5e44f63d640ff07c425ec3edd3bb48fe9/CatalogReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 1925, 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, 1416, 12, 2890, 16, 1925, 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...
if controllerResult is not None:
if isinstance(controllerResult, defer.Deferred):
def handleControllerResults(self, controllerResult, request, node, controller, view, success): """Handle a deferred from a controller. """ self.outstandingCallbacks -= 1 if controllerResult is not None: self.outstandingCallbacks += 1 controllerResult.addCallback( self.handleControllerResults, request, node, controller, view) controllerResult.addErrback(self.renderFailure, request) else: returnNode = self.dispatchResult(request, node, view) self.handleNewNode(request, returnNode)
483454b1e5e7a0a179f6f9746f8324b4d33b9efa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/483454b1e5e7a0a179f6f9746f8324b4d33b9efa/view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 2933, 3447, 12, 2890, 16, 2596, 1253, 16, 590, 16, 756, 16, 2596, 16, 1476, 16, 2216, 4672, 3536, 3259, 279, 7045, 628, 279, 2596, 18, 3536, 365, 18, 659, 15167, 10617, 3947, 404...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 2933, 3447, 12, 2890, 16, 2596, 1253, 16, 590, 16, 756, 16, 2596, 16, 1476, 16, 2216, 4672, 3536, 3259, 279, 7045, 628, 279, 2596, 18, 3536, 365, 18, 659, 15167, 10617, 3947, 404...
gLogger.info("ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize)
gLogger.info( "ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize )
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,...
if not review_request.public: return "<span class=\"draftlabel\">[Draft]</span> " + \ summary if review_request.status == 'S': return "<span class=\"draftlabel\">[Submitted]</span> " + \ summary
if (not review_request.public and review_request.status == ReviewRequest.PENDING_REVIEW): return self.__labeled_summary('Draft', summary) if review_request.status == ReviewRequest.SUBMITTED: return self.__labeled_summary('Submitted', summary) elif review_request.status == ReviewRequest.DISCARDED: return self.__labeled_summary('Discarded', summary)
def render_data(self, review_request): summary = conditional_escape(review_request.summary) if not summary: summary = '&nbsp;<i>No Summary</i>'
bff35e74cd9a1b9286aa3b81ecdbae04b2220433 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/bff35e74cd9a1b9286aa3b81ecdbae04b2220433/datagrids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 892, 12, 2890, 16, 10725, 67, 2293, 4672, 4916, 273, 11139, 67, 6939, 12, 16041, 67, 2293, 18, 7687, 13, 309, 486, 4916, 30, 4916, 273, 5183, 10600, 31, 32, 77, 34, 2279, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 67, 892, 12, 2890, 16, 10725, 67, 2293, 4672, 4916, 273, 11139, 67, 6939, 12, 16041, 67, 2293, 18, 7687, 13, 309, 486, 4916, 30, 4916, 273, 5183, 10600, 31, 32, 77, 34, 2279, 1...
get().open(url, 1) def _synthesize(browser):
return open(url, 1) def open_new_tab(url): return open(url, 2) def _synthesize(browser, update_tryorder=1):
def open_new(url): get().open(url, 1)
2e17d91b4cf4bb0fb2a60b21783a4491e2a33017 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2e17d91b4cf4bb0fb2a60b21783a4491e2a33017/webbrowser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 2704, 12, 718, 4672, 336, 7675, 3190, 12, 718, 16, 404, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 2704, 12, 718, 4672, 336, 7675, 3190, 12, 718, 16, 404, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
source files. Use the sphinx-build script to build the docs, like so: ''' % masterfile + (create_makefile and ''' make <builder> ''' or ''' sphinx-build -b <builder> %s %s ''' % (srcdir, builddir))
source files. ''' % masterfile + (create_makefile and '''\ Use the Makefile to build the docs, like so: make builder ''' or '''\ Use the sphinx-build command to build the docs, like so: sphinx-build -b builder %s %s ''' % (srcdir, builddir)) + '''\ where "builder" is one of the supported builders, e.g. html, latex or linkcheck. '''
def inner_main(args): d = {} if not sys.stdout.isatty() or not color_terminal(): nocolor() print bold('Welcome to the Sphinx quickstart utility.') print '''
30bb2bc9fe9895de00dd0f5dfe62e87d5f70e4db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/30bb2bc9fe9895de00dd0f5dfe62e87d5f70e4db/quickstart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 5254, 12, 1968, 4672, 302, 273, 2618, 225, 309, 486, 2589, 18, 10283, 18, 291, 270, 4098, 1435, 578, 486, 2036, 67, 15979, 13332, 30601, 355, 280, 1435, 225, 1172, 13068, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 5254, 12, 1968, 4672, 302, 273, 2618, 225, 309, 486, 2589, 18, 10283, 18, 291, 270, 4098, 1435, 578, 486, 2036, 67, 15979, 13332, 30601, 355, 280, 1435, 225, 1172, 13068, 2668,...
assert_array_almost_equal(sort(roots(poly(a))),sort(a),11)
assert_array_almost_equal(sort(roots(poly(a))),sort(a),5)
def check_inverse(self): a = rand(5) assert_array_almost_equal(sort(roots(poly(a))),sort(a),11)
b2b10d79f63de2efc55775a51b3dd7e86cdd5753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/b2b10d79f63de2efc55775a51b3dd7e86cdd5753/test_basic1a.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 22552, 12, 2890, 4672, 279, 273, 5605, 12, 25, 13, 1815, 67, 1126, 67, 287, 10329, 67, 9729, 12, 3804, 12, 22078, 12, 16353, 12, 69, 3719, 3631, 3804, 12, 69, 3631, 2499, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 22552, 12, 2890, 4672, 279, 273, 5605, 12, 25, 13, 1815, 67, 1126, 67, 287, 10329, 67, 9729, 12, 3804, 12, 22078, 12, 16353, 12, 69, 3719, 3631, 3804, 12, 69, 3631, 2499, 13...
print(response.read())
print(response.read())
def http_error_407(self, req, fp, code, msg, headers): return self.http_error_authentication_required('proxy-authenticate', req, fp, headers)
a61436c9461dc3272553b77cbad149fc9725a302 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6089/a61436c9461dc3272553b77cbad149fc9725a302/HTTPNtlmAuthHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 7132, 27, 12, 2890, 16, 1111, 16, 4253, 16, 981, 16, 1234, 16, 1607, 4672, 327, 365, 18, 2505, 67, 1636, 67, 12293, 67, 4718, 2668, 5656, 17, 22035, 2187, 1111, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1062, 67, 1636, 67, 7132, 27, 12, 2890, 16, 1111, 16, 4253, 16, 981, 16, 1234, 16, 1607, 4672, 327, 365, 18, 2505, 67, 1636, 67, 12293, 67, 4718, 2668, 5656, 17, 22035, 2187, 1111, 1...
<td>&nbsp</td></tr>''' % {'anchor':name.upper(), 'name':name, 'ln':ln}
<td>&nbsp;</td></tr>''' % {'anchor':name.upper(), 'name':name, 'ln':ln}
def tmpl_admin_output_format_show_dependencies(self, ln, name, code, format_templates): """ Shows the dependencies of the given format.
ef89d2b485cd2b62abb54ce2d266e0d2ae1777bf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/ef89d2b485cd2b62abb54ce2d266e0d2ae1777bf/bibformat_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 3666, 67, 2844, 67, 2139, 67, 4500, 67, 11037, 12, 2890, 16, 7211, 16, 508, 16, 981, 16, 740, 67, 8502, 4672, 3536, 9674, 87, 326, 5030, 434, 326, 864, 740, 18, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 3666, 67, 2844, 67, 2139, 67, 4500, 67, 11037, 12, 2890, 16, 7211, 16, 508, 16, 981, 16, 740, 67, 8502, 4672, 3536, 9674, 87, 326, 5030, 434, 326, 864, 740, 18, 2, -100, ...
cannot_set_attr(self.f.id, 'unknown_attr', 2, AttributeError) cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError)
self.cannot_set_attr(self.f.id, 'unknown_attr', 2, AttributeError) self.cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError)
def test_im_func_non_method(self): # Behavior should be the same when a method is added via an attr # assignment self.f.id = types.MethodType(id, None, self.f) self.assertEqual(self.fi.id(), id(self.fi)) self.assertNotEqual(self.fi.id(), id(self.f)) # Test usage try: self.f.id.unknown_attr except AttributeError: pass else: self.fail("using unknown attributes should raise AttributeError") # Test assignment and deletion cannot_set_attr(self.f.id, 'unknown_attr', 2, AttributeError) cannot_set_attr(self.fi.id, 'unknown_attr', 2, AttributeError)
b9303497af9037b7d7af94d298d3f66430105f91 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/b9303497af9037b7d7af94d298d3f66430105f91/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 381, 67, 644, 67, 5836, 67, 2039, 12, 2890, 4672, 468, 28030, 1410, 506, 326, 1967, 1347, 279, 707, 353, 3096, 3970, 392, 1604, 468, 6661, 365, 18, 74, 18, 350, 273, 1953, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 381, 67, 644, 67, 5836, 67, 2039, 12, 2890, 4672, 468, 28030, 1410, 506, 326, 1967, 1347, 279, 707, 353, 3096, 3970, 392, 1604, 468, 6661, 365, 18, 74, 18, 350, 273, 1953, ...
app.Unbind(wx.EVT_MENU, id=-1) app.Unbind(wx.EVT_TOOL, id=-1) app.Unbind(wx.EVT_UPDATE_UI, id=-1) app.Unbind(wx.EVT_WINDOW_DESTROY, id=-1) app.Unbind(wx.EVT_SHOW, id=-1) app.Unbind(wx.EVT_KEY_DOWN) app.Unbind(wx.EVT_CONTEXT_MENU) app.Unbind(wx.EVT_IDLE)
def commit(view): try: view.commit() except VersionConflictError, e: logger.exception(e)
52eb52a3b2b714d8196fd1f311bf50a59a00731c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/52eb52a3b2b714d8196fd1f311bf50a59a00731c/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 1945, 4672, 775, 30, 1476, 18, 7371, 1435, 1335, 4049, 10732, 668, 16, 425, 30, 1194, 18, 4064, 12, 73, 13, 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, 3294, 12, 1945, 4672, 775, 30, 1476, 18, 7371, 1435, 1335, 4049, 10732, 668, 16, 425, 30, 1194, 18, 4064, 12, 73, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for iface in device.interfaces_all():
for iface in device.interface_set_all():
def get_best_host(group, device=None): all_hosts = Host.objects.filter(enabled=True) # pylint: disable-msg=E1101 if group: all_hosts = all_hosts.filter(group=group) if device: for iface in device.interfaces_all(): if iface.is_connected(): sf = iface.connection.connector.upcast() if sf.is_special(): if sf.feature_group: all_hosts = all_hosts.filter(specialfeature__feature_type=sf.feature_type, specialfeature__feature_group=sf.feature_group).distinct() else: all_hosts = all_hosts.filter(specialfeature__feature_type=sf.feature_type).distinct() # pylint: disable-msg=E1101 hosts = all_hosts.annotate(num_devices=models.Count('device')).order_by('num_devices', '?') if len(hosts) > 0: return hosts[0] else: raise fault.new(fault.NO_HOSTS_AVAILABLE, "No hosts available")
8834713624b982088b13a318a137968b73678df4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/8834713624b982088b13a318a137968b73678df4/hosts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12729, 67, 2564, 12, 1655, 16, 2346, 33, 7036, 4672, 777, 67, 11588, 273, 4893, 18, 6911, 18, 2188, 12, 5745, 33, 5510, 13, 468, 7601, 30, 4056, 17, 3576, 33, 41, 2499, 1611...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12729, 67, 2564, 12, 1655, 16, 2346, 33, 7036, 4672, 777, 67, 11588, 273, 4893, 18, 6911, 18, 2188, 12, 5745, 33, 5510, 13, 468, 7601, 30, 4056, 17, 3576, 33, 41, 2499, 1611...
SpecializedSetup<%(name)s, 0>();
SpecializedSetup<%(name)s, 0>(false);
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
c09b66fa6c9b1cbe85cad7ac28eacb107f5b988d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c09b66fa6c9b1cbe85cad7ac28eacb107f5b988d/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 923, 67, 3813, 273, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 923, 67, 3813, 273, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
jobsToProcess = result[ 'Value' ]
jobsToProcess = result[ 'Value' ]
def execute( self ): result = self.jobDB.selectJobs( { 'Status': self.__jobStates } ) if not result[ 'OK' ]: return result jobsList = result[ 'Value' ] self.log.info( "Got %s jobs for this iteration" % len( jobsList ) ) if not jobsList: return S_OK() result = self.jobDB.getAttributesForJobList( jobsList ) if not result[ 'OK' ]: return result jobsToProcess = result[ 'Value' ] for jobId in jobsToProcess: self.log.info( "== Processing job %s == " % jobId ) jobAttrs = jobsToProcess[ jobId ] jobDef = False jobOptimized = False jobOK = True while not jobOptimized: result = self.optimizeJob( jobId, jobAttrs, jobDef ) if not result[ 'OK' ]: self.log.error( "Optimizer %s Job %s: %s" % ( jobId, jobAttrs[ 'MinorStatus' ], result[ 'Message' ] ) ) jobOK = False break optResult = result[ 'Value' ] jobOptimized = optResult[ 'done' ] if 'jobDef' in optResult: jobDef = optResult[ 'jobDef' ] if jobOK: self.log.info( "Finished optimizing job %s" % jobId ) return S_OK()
4634d995f7ac1931e31ebf1c7099fe80da9f4b75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/4634d995f7ac1931e31ebf1c7099fe80da9f4b75/MightyOptimizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 563, 273, 365, 18, 4688, 2290, 18, 4025, 7276, 12, 225, 288, 296, 1482, 4278, 365, 16186, 4688, 7629, 225, 289, 262, 309, 486, 563, 63, 296, 3141, 11, 308, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 563, 273, 365, 18, 4688, 2290, 18, 4025, 7276, 12, 225, 288, 296, 1482, 4278, 365, 16186, 4688, 7629, 225, 289, 262, 309, 486, 563, 63, 296, 3141, 11, 308, 30...
""" Return a compact representation of a revision in the repos. """
"""Return a compact representation of a revision in the repos."""
def short_rev(self, rev): """ Return a compact representation of a revision in the repos. """ return self.normalize_rev(rev)
3d49bda6767e9de61cc951b87411bf3eea2b250a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3d49bda6767e9de61cc951b87411bf3eea2b250a/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3025, 67, 9083, 12, 2890, 16, 5588, 4672, 3536, 990, 279, 6739, 4335, 434, 279, 6350, 316, 326, 13686, 12123, 327, 365, 18, 12237, 67, 9083, 12, 9083, 13, 225, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3025, 67, 9083, 12, 2890, 16, 5588, 4672, 3536, 990, 279, 6739, 4335, 434, 279, 6350, 316, 326, 13686, 12123, 327, 365, 18, 12237, 67, 9083, 12, 9083, 13, 225, 2, -100, -100, -100, -10...
batch_operation=batch_operation, batch_id=batch_id,
batch_operation=batch_operation, batch_id=batch_id,
def __init__(self, author=None, category=None, content=None, atom_id=None, link=None, published=None, title=None, updated=None, transparency=None, comments=None, event_status=None, send_event_notifications=None, visibility=None, recurrence=None, recurrence_exception=None, where=None, when=None, who=None, quick_add=None, extended_property=None, original_event=None, batch_operation=None, batch_id=None, batch_status=None, sequence=None, reminder=None, sync_event=None, uid=None, guests_can_invite_others=None, guests_can_modify=None, guests_can_see_guests=None, extension_elements=None, extension_attributes=None, text=None):
220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2869, 33, 7036, 16, 3150, 33, 7036, 16, 913, 33, 7036, 16, 3179, 67, 350, 33, 7036, 16, 1692, 33, 7036, 16, 9487, 33, 7036, 16, 2077, 33, 7036, 16, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2869, 33, 7036, 16, 3150, 33, 7036, 16, 913, 33, 7036, 16, 3179, 67, 350, 33, 7036, 16, 1692, 33, 7036, 16, 9487, 33, 7036, 16, 2077, 33, 7036, 16, 3...
self.unlockFile(self, path)
self.unlockFile(path)
def shouldCacheFile(self, path): """ Method to determine if a file referenced by path should be cached.
942a3ba9ea8b4a19ec367724ddf67d6fb37fcde8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/942a3ba9ea8b4a19ec367724ddf67d6fb37fcde8/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 31371, 12, 2890, 16, 589, 4672, 3536, 2985, 358, 4199, 309, 279, 585, 8042, 635, 589, 1410, 506, 3472, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 31371, 12, 2890, 16, 589, 4672, 3536, 2985, 358, 4199, 309, 279, 585, 8042, 635, 589, 1410, 506, 3472, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fo.set ('method', 'POST')
fo.set ('method', 'post')
def parse_unicode (document): from cStringIO import StringIO from elementtidy import TidyHTMLTreeBuilder return et.parse (StringIO (body.encode ('utf-8')), TidyHTMLTreeBuilder.TreeBuilder (encoding = 'utf-8'))
379ab415f3483f29a308f6c6495450cf9a433ca5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7252/379ab415f3483f29a308f6c6495450cf9a433ca5/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 9124, 261, 5457, 4672, 628, 276, 780, 4294, 1930, 15777, 628, 930, 18081, 93, 1930, 399, 29609, 4870, 25060, 327, 3393, 18, 2670, 261, 780, 4294, 261, 3432, 18, 3015, 7707, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 9124, 261, 5457, 4672, 628, 276, 780, 4294, 1930, 15777, 628, 930, 18081, 93, 1930, 399, 29609, 4870, 25060, 327, 3393, 18, 2670, 261, 780, 4294, 261, 3432, 18, 3015, 7707, 315...
if debug_thumbview: print "debug: MMKitView.updateModel, __main__._newObj = %r" % (newObj,) import __main__ __main__._newObj = newObj
def updateModel(self, newObj): '''Set new chunk or assembly for display''' if debug_thumbview: print "debug: MMKitView.updateModel, __main__._newObj = %r" % (newObj,) #bruce 060412 import __main__ __main__._newObj = newObj self.model = newObj
522da8d64b3b30f194fe5f73e8708c462e3e532d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/522da8d64b3b30f194fe5f73e8708c462e3e532d/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1488, 12, 2890, 16, 23966, 4672, 9163, 694, 394, 2441, 578, 19931, 364, 2562, 26418, 309, 1198, 67, 21639, 1945, 30, 1172, 315, 4148, 30, 18295, 14102, 1767, 18, 2725, 1488, 16, 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, 1089, 1488, 12, 2890, 16, 23966, 4672, 9163, 694, 394, 2441, 578, 19931, 364, 2562, 26418, 309, 1198, 67, 21639, 1945, 30, 1172, 315, 4148, 30, 18295, 14102, 1767, 18, 2725, 1488, 16, 10...
print 'appling constraints'
def applyConstraints(self): nullConstr = ['wxUnconstrained'] print 'apply constraints', self.parentCompanion.control if self.inited and len(self.textConstrLst) >= 4: constraints = wxLayoutConstraints() validConstr = 0 for constrt in self.textConstrLst: if constrt.params['rel'] not in nullConstr: validConstr = validConstr + 1 if validConstr == 4: print 'appling constraints' for constrt in self.textConstrLst: params = copy.copy(constrt.params) otherWin = params['otherWin'][5:] print 'adtd', otherWin if params['otherWin'] == 'None': params = self.designTimeDefaults(params) elif self.designer.objects.has_key(otherWin): del params['otherWin'] params = self.designTimeDefaults(params) if otherWin == 'self': params['otherWin'] = self.designer.objects[''][1] else: params['otherWin'] = self.designer.objects[otherWin][1] print 'setting attr', params attr = getattr(constraints, string.split(constrt.comp_name, '.')[1]) apply(attr.Set, [], params) self.parentCompanion.control.SetConstraints(constraints) print 'applied constraints'
e6d3b1101435c39fbaff23b10ac5d7e8db0c67f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/e6d3b1101435c39fbaff23b10ac5d7e8db0c67f3/UtilCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 4878, 12, 2890, 4672, 446, 442, 701, 273, 10228, 27226, 984, 591, 31142, 3546, 1172, 296, 9010, 6237, 2187, 365, 18, 2938, 2945, 304, 285, 18, 7098, 309, 365, 18, 2738, 329, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 4878, 12, 2890, 4672, 446, 442, 701, 273, 10228, 27226, 984, 591, 31142, 3546, 1172, 296, 9010, 6237, 2187, 365, 18, 2938, 2945, 304, 285, 18, 7098, 309, 365, 18, 2738, 329, 471, ...
result = self.getExtraConditions(siteName)
result = self.getExtraConditions( siteName )
def selectJob(self, resourceDescription): """ Main job selection function to find the highest priority job matching the resource capacity """
059c4744ef6766e0575a5cd4d6f09d892a66a7df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/059c4744ef6766e0575a5cd4d6f09d892a66a7df/MatcherHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 2278, 12, 2890, 16, 1058, 3291, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 2027, 2278, 12, 2890, 16, 1058, 3291, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
Expects the URLs to be separated by newlines, with no leading or trailing whitespace.
def CollectRemovals(remove_re, inputs): '''Returns a list of all object files in inputs that match remove_re.''' removals = [] for input in inputs: output = Shell('lib.exe', '/list', input)
def LoadSiteList(path): """Loads a list of URLs from |path|. Expects the URLs to be separated by newlines, with no leading or trailing whitespace. Args: path: The path to a file containing a list of new-line separated URLs. Returns: A list of strings, each one a URL. """ f = open(path) urls = f.readlines() f.close() return urls
f781782dd67077478e117c61dca4ea5eefce3544 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/f781782dd67077478e117c61dca4ea5eefce3544/combine_libs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 4956, 682, 12, 803, 4672, 3536, 7968, 279, 666, 434, 10414, 628, 571, 803, 96, 18, 225, 1652, 9302, 4579, 1031, 12, 4479, 67, 266, 16, 4540, 4672, 9163, 1356, 279, 666, 434, 777,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 4956, 682, 12, 803, 4672, 3536, 7968, 279, 666, 434, 10414, 628, 571, 803, 96, 18, 225, 1652, 9302, 4579, 1031, 12, 4479, 67, 266, 16, 4540, 4672, 9163, 1356, 279, 666, 434, 777,...
""" Create a LIGOTimeGPS instance. The first parameter is the count of seconds, and the second (optional) parameter is the count of nanoseconds. If the nanoseconds parameter is not supplied, it is assumed to be 0. Either parameter can be a numeric type or an ASCII string. Example use (all are equivalent): LIGOTimeGPS(100.5) LIGOTimeGPS("100.5") LIGOTimeGPS(100, 500000000) LIGOTimeGPS(0, 100500000000L) LIGOTimeGPS(100.2, 300000000) """
""" Create a LIGOTimeGPS instance. The first parameter is the count of seconds, and the second (optional) parameter is the count of nanoseconds. If the nanoseconds parameter is not supplied, it is assumed to be 0. Either parameter can be a numeric type or an ASCII string. Example use (all are equivalent): LIGOTimeGPS(100.5) LIGOTimeGPS("100.5") LIGOTimeGPS(100, 500000000) LIGOTimeGPS(0, 100500000000L) LIGOTimeGPS(100.2, 300000000) """
def __init__(self, seconds, nanoseconds = 0):
b064bbbb4a6f3f9453fbf35a7c03643a8a94bd52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/b064bbbb4a6f3f9453fbf35a7c03643a8a94bd52/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3974, 16, 6468, 23272, 273, 374, 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...
[ 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, 1001, 2738, 972, 12, 2890, 16, 3974, 16, 6468, 23272, 273, 374, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(r'=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline),
(r'^=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline),
def get_tokens_unprocessed(self, text): rblexer = RubyLexer(**self.options)
a5ad4970049b9fe4336d20fd2308fa988276706e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6148/a5ad4970049b9fe4336d20fd2308fa988276706e/agile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7860, 67, 318, 11005, 12, 2890, 16, 977, 4672, 7138, 31731, 273, 19817, 13356, 12, 636, 2890, 18, 2116, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7860, 67, 318, 11005, 12, 2890, 16, 977, 4672, 7138, 31731, 273, 19817, 13356, 12, 636, 2890, 18, 2116, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def setSelection(self): position = self.position size = self.size trPos = wxPoint(granularise(position.x), granularise(position.y)) trSze = wxSize(granularise(size.x -1), granularise(size.y -1)) if not self.dragging: self.stTL.SetDimensions(trPos.x -4, trPos.y -4, tagSize, tagSize) self.stTR.SetDimensions(trPos.x -3 + trSze.x, trPos.y -4, tagSize, tagSize) self.stBR.SetDimensions(trPos.x -3 + trSze.x, trPos.y -3 + trSze.y, tagSize, tagSize) self.stBL.SetDimensions(trPos.x -4, trPos.y -3 + trSze.y, tagSize, tagSize) self.stT.SetDimensions(trPos.x -4 + trSze.x/2, trPos.y -4, tagSize, tagSize) self.stB.SetDimensions(trPos.x -4 + trSze.x/2, trPos.y -3 + trSze.y, tagSize, tagSize) self.stL.SetDimensions(trPos.x -4, trPos.y -4 + trSze.y/2, tagSize, tagSize) self.stR.SetDimensions(trPos.x -3 +trSze.x, trPos.y -4 + trSze.y/2, tagSize, tagSize) self.sfT.SetDimensions(trPos.x -frmWid, trPos.y -2, trSze.x +frmWid, frmWid) self.sfR.SetDimensions(trPos.x + trSze.x, trPos.y -frmWid, frmWid, trSze.y+frmWid*2) self.sfB.SetDimensions(trPos.x -frmWid, trPos.y + trSze.y, trSze.x +frmWid*2, frmWid) self.sfL.SetDimensions(trPos.x -2, trPos.y-frmWid, frmWid, trSze.y +frmWid) self.position = trPos self.size = trSze
def setSelection(self): position = self.position size = self.size
2dfc26470222dc7c48c18810d65dc6cd09f6688b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2dfc26470222dc7c48c18810d65dc6cd09f6688b/SelectionTags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 6233, 12, 2890, 4672, 1754, 273, 365, 18, 3276, 963, 273, 365, 18, 1467, 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, 444, 6233, 12, 2890, 4672, 1754, 273, 365, 18, 3276, 963, 273, 365, 18, 1467, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.timeProp(sts, "lastModified", event) txt = self.textProp(sts, "summary", event) self.textProp(sts, "description", event) self.textProp(sts, "location", event) self.textProp(sts, "priority", event)
self.timeProp(sts, "lastModified", event) self.exportGeneral(E_PROP, sts, event, ICAL.summary, "SUMMARY") self.exportGeneral(E_PROP, sts, event, ICAL.description, "DESCRIPTION") self.exportGeneral(E_PROP, sts, event, ICAL.location, "LOCATION") self.exportGeneral(E_PROP, sts, event, ICAL.priority, "PRIORITY")
def exportEvent(self, sts, event): w = self._w
04829bd0c6467d1a5ceb640d5981b3facc7553d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/04829bd0c6467d1a5ceb640d5981b3facc7553d5/toIcal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 1133, 12, 2890, 16, 27099, 16, 871, 4672, 341, 273, 365, 6315, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 1133, 12, 2890, 16, 27099, 16, 871, 4672, 341, 273, 365, 6315, 91, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if isInt(imm): imm = int(imm) elif imm[0:2] == "0x": imm = int(imm[2:], 16) else: print imm + " is not a number. WTF dude."
imm = hexorint(imm)
def parse_branch(instruc = "", word_buf = ""): if instruc == "" or word_buf == "": print "ERROR: someone accidentally the code in parse_branch" return "-1" ins_list = instruc.split(" ") ins_list = sanitize(ins_list) ins = ins_list[0] ins = ins.lower() imm = ins_list[1] if isInt(imm): imm = int(imm) elif imm[0:2] == "0x": imm = int(imm[2:], 16) else: print imm + " is not a number. WTF dude." if imm > (2**8) or imm < -(2**8) + 1: print "ERROR: Immediate value " + str(imm) +" is out of range." print "IMM in BR(nzp) IMM must be greater than -(2**8) + 1 and less than 2**8" return "-1" #get sign correct on the binary imm = imm2bin(imm, 9) if ins == "brn": word_buf = word_buf + "100" elif ins == "brnz": word_buf = word_buf + "110" elif ins == "brnp": word_buf = word_buf + "101" elif ins == "brz": word_buf = word_buf + "010" elif ins == "brzp": word_buf = word_buf + "011" elif ins == "brp": word_buf = word_buf + "001" elif ins == "brnzp": word_buf = word_buf + "111" else: print "Someone accidentally'd a branch" print "ERROR: " + instruc + " is an invalid branch instruction" return "-1" return word_buf + imm
86fe33c50bfd48f675145c6ca70fdef6a839b9d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4891/86fe33c50bfd48f675145c6ca70fdef6a839b9d9/assembler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 7500, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 7500, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230,...
- ``list`` - a list of primary ideals and their associated primes [(primary ideal, associated prime), ...]
- ``list`` - a list of associated primes
def associated_primes(self, algorithm='sy'): r""" Return a list of primary ideals (and their associated primes) such that their intersection is `I` = ``self``. An ideal `Q` is called primary if it is a proper ideal of the ring `R` and if whenever `ab \in Q` and `a \not\in Q` then `b^n \in Q` for some `n \in \ZZ`. If `Q` is a primary ideal of the ring `R`, then the radical ideal `P` of `Q`, i.e. `P = \{a \in R, a^n \in Q\}` for some `n \in \ZZ`, is called the *associated prime* of `Q`. If `I` is a proper ideal of the ring `R` then there exists a decomposition in primary ideals `Q_i` such that - their intersection is `I` - none of the `Q_i` contains the intersection of the rest, and - the associated prime ideals of `Q_i` are pairwise different. This method returns the associated primes of the `Q_i`. INPUT: - ``algorithm`` - string: - ``'sy'`` - (default) use the shimoyama-yokoyama algorithm - ``'gtz'`` - use the gianni-trager-zacharias algorithm OUTPUT: - ``list`` - a list of primary ideals and their associated primes [(primary ideal, associated prime), ...] EXAMPLES:: sage: R.<x,y,z> = PolynomialRing(QQ, 3, order='lex') sage: p = z^2 + 1; q = z^3 + 2 sage: I = (p*q^2, y-z^2)*R sage: pd = I.associated_primes(); pd [Ideal (z^3 + 2, y - z^2) of Multivariate Polynomial Ring in x, y, z over Rational Field, Ideal (z^2 + 1, y + 1) of Multivariate Polynomial Ring in x, y, z over Rational Field] ALGORITHM: Uses Singular. REFERENCES:
fea89909599e97cb2dd40bdd0830390795cbcf35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/fea89909599e97cb2dd40bdd0830390795cbcf35/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3627, 67, 683, 4485, 12, 2890, 16, 4886, 2218, 9009, 11, 4672, 436, 8395, 2000, 279, 666, 434, 3354, 10572, 1031, 261, 464, 3675, 3627, 846, 4485, 13, 4123, 716, 3675, 7619, 353, 1375, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3627, 67, 683, 4485, 12, 2890, 16, 4886, 2218, 9009, 11, 4672, 436, 8395, 2000, 279, 666, 434, 3354, 10572, 1031, 261, 464, 3675, 3627, 846, 4485, 13, 4123, 716, 3675, 7619, 353, 1375, ...
def normalizeWeight(value,weightLimits):
def normalizeValue(value,valueLimits):
def normalizeWeight(value,weightLimits): # Transforms a weight to the range (0,1). It is intended that the # user should set weightLimits such that the true weights in the # network fall between the limits. If this is not the case, # weights above given maxweight or below given minweight are # truncated. The rest of the values are transformed linearly, such # that the range (given minweight, given maxweight) becomes (0,1). # # normalizedWeight= (true weight - given minweight) / (given maxweight - given minweight ) # if (weightLimits[0]-weightLimits[1])==0: # if given minweight and maxweight are the same, all weights will be equal normalizedWeight=1 elif value<weightLimits[0]: # if weight is smaller than given minweight normalizedWeight=0 elif value>weightLimits[1]: # if weight is larger than given maxweight normalizedWeight=1 else: normalizedWeight=(value-weightLimits[0])/float(weightLimits[1]-weightLimits[0]) return normalizedWeight
1b046154581ac107eda7faef67d10c4c19528a4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/1b046154581ac107eda7faef67d10c4c19528a4c/visuals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 6544, 12, 1132, 16, 4865, 12768, 4672, 468, 2604, 9741, 279, 3119, 358, 326, 1048, 261, 20, 16, 21, 2934, 2597, 353, 12613, 716, 326, 468, 729, 1410, 444, 3119, 12768, 4123, 716, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 6544, 12, 1132, 16, 4865, 12768, 4672, 468, 2604, 9741, 279, 3119, 358, 326, 1048, 261, 20, 16, 21, 2934, 2597, 353, 12613, 716, 326, 468, 729, 1410, 444, 3119, 12768, 4123, 716, ...
'url --url=$tree\n' + kickstart)
'url --url=$tree\n
def test_provision(self): kickstart = ''' %%pre kickstart lol! do some stuff etc ''' system = data_setup.create_system( owner=User.by_user_name(data_setup.ADMIN_USER), status=u'Manual', shared=True) data_setup.configure_system_power(system, power_type=u'drac', address=u'nowhere.example.com', user=u'teh_powz0r', password=u'onoffonoff', power_id=u'asdf') system.lab_controller = self.lab_controller user = data_setup.create_user(password=u'password') system.user = user session.flush() self.server.auth.login_password(user.user_name, 'password') self.server.systems.provision(system.fqdn, self.distro.install_name, {'method': 'nfs'}, 'noapic', 'noapic runlevel=3', kickstart) self.assertEqual(self.stub_cobbler_thread.cobbler.systems[system.fqdn], {'power_type': 'drac', 'power_address': 'nowhere.example.com', 'power_user': 'teh_powz0r', 'power_pass': 'onoffonoff', 'power_id': 'asdf', 'ksmeta': {'method': 'nfs'}, 'kopts': 'noapic', 'kopts_post': 'noapic runlevel=3', 'profile': system.fqdn, 'netboot-enabled': True}) kickstart_filename = '/var/lib/cobbler/kickstarts/%s.ks' % system.fqdn self.assertEqual(self.stub_cobbler_thread.cobbler.profiles[system.fqdn], {'kickstart': kickstart_filename, 'parent': self.distro.install_name}) self.assertEqual( self.stub_cobbler_thread.cobbler.kickstarts[kickstart_filename], 'url --url=$tree\n' + kickstart) self.assertEqual( self.stub_cobbler_thread.cobbler.system_actions[system.fqdn], 'reboot')
32843c452812e56391809f5e35270c5f563f90c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/32843c452812e56391809f5e35270c5f563f90c4/test_systems.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17051, 12, 2890, 4672, 23228, 1937, 273, 9163, 26510, 1484, 23228, 1937, 328, 355, 5, 741, 2690, 10769, 5527, 9163, 2619, 273, 501, 67, 8401, 18, 2640, 67, 4299, 12, 3410, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17051, 12, 2890, 4672, 23228, 1937, 273, 9163, 26510, 1484, 23228, 1937, 328, 355, 5, 741, 2690, 10769, 5527, 9163, 2619, 273, 501, 67, 8401, 18, 2640, 67, 4299, 12, 3410, 33, ...
subtitle = """<a name="1"></a>1. Access policy.&nbsp&nbsp&nbsp<small>[<a title="See guide" href="%s/admin/webaccess/guide.html
subtitle = """<a name="1"></a>1. Access policy.&nbsp;&nbsp;&nbsp;<small>[<a title="See guide" href="%s/admin/webaccess/guide.html
def perform_accesspolicy(req, callback='yes', confirm=0): """Modify default behaviour of a guest user or if new accounts should automatically/manually be modified.""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="1"></a>1. Access policy.&nbsp&nbsp&nbsp<small>[<a title="See guide" href="%s/admin/webaccess/guide.html#4">?</a>]</small>""" % weburl account_policy = {} account_policy[0] = "Users can register new accounts. New accounts automatically activated." account_policy[1] = "Users can register new accounts. Admin users must activate the accounts." account_policy[2] = "Only admin can register new accounts. User cannot edit email address." account_policy[3] = "Only admin can register new accounts. User cannot edit email address or password." account_policy[4] = "Only admin can register new accounts. User cannot edit email address,password or login method." site_policy = {} site_policy[0] = "Normal operation of the site." site_policy[1] = "Read-only site, all write operations temporarily closed." site_policy[2] = "Site fully closed." output = "(Modifications must be done in access_control_config.py)<br>" output += "<br><b>Current settings:</b><br>" output += "Site status: %s<br>" % (site_policy[CFG_ACCESS_CONTROL_LEVEL_SITE]) output += "Guest accounts allowed: %s<br>" % (CFG_ACCESS_CONTROL_LEVEL_GUESTS == 0 and "Yes" or "No") output += "Account policy: %s<br>" % (account_policy[CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS]) output += "Allowed email addresses limited: %s<br>" % (CFG_ACCESS_CONTROL_LIMIT_REGISTRATION_TO_DOMAIN and CFG_ACCESS_CONTROL_LIMIT_REGISTRATION_TO_DOMAIN or "Not limited") output += "Send email to admin when new account: %s<br>" % (CFG_ACCESS_CONTROL_NOTIFY_ADMIN_ABOUT_NEW_ACCOUNTS == 1 and "Yes" or "No") output += "Send email to user after creating new account: %s<br>" % (CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_NEW_ACCOUNT == 1 and "Yes" or "No") output += "Send email to user when account is activated: %s<br>" % (CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_ACTIVATION == 1 and "Yes" or "No") output += "Send email to user when account is deleted/rejected: %s<br>" % (CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_DELETION == 1 and "Yes" or "No") output += "<br>" output += "<b>Available 'login via' methods:</b><br>" methods = CFG_EXTERNAL_AUTHENTICATION.keys() methods.sort() for system in methods: output += """%s %s<br>""" % (system, (CFG_EXTERNAL_AUTHENTICATION[system][1] and "(Default)" or "")) output += "<br><b>Changing the settings:</b><br>" output += "Currently, all changes must be done using your favourite editor, and the webserver restarted for changes to take effect. For the settings to change, either look in the guide or in access_control_config.py ." body = [output] if callback: return perform_manageaccounts(req, "perform_accesspolicy", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body)
fc350ca50f11deb8546612d6079a2f5f868dc7fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1931/fc350ca50f11deb8546612d6079a2f5f868dc7fb/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3860, 5086, 12, 3658, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 11047, 805, 14273, 434, 279, 13051, 729, 578, 309, 394, 9484, 1410, 6635, 19, 4728, 3452, 506, 4358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3860, 5086, 12, 3658, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 11047, 805, 14273, 434, 279, 13051, 729, 578, 309, 394, 9484, 1410, 6635, 19, 4728, 3452, 506, 4358,...
K = number_field.QuadraticField(D, 'a')
def satisfies_heegner_hypothesis(self, D): """ Returns True precisely when D is a fundamental discriminant that satisfies the Heegner hypothesis for this elliptic curve. """ if not number_field.is_fundamental_discriminant(D): return False if arith.GCD(D, self.conductor()) != 1: return False K = number_field.QuadraticField(D, 'a') for p, _ in factor(self.conductor()): if len(K.factor_integer(p)) != 2: return False return True
92160f8928a0d15c605f7edb7321e90dc2f9a26b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/92160f8928a0d15c605f7edb7321e90dc2f9a26b/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17917, 67, 580, 1332, 1224, 67, 76, 879, 10370, 16786, 12, 2890, 16, 463, 4672, 3536, 2860, 1053, 13382, 291, 2357, 1347, 463, 353, 279, 284, 1074, 14773, 287, 29649, 20030, 716, 17917, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17917, 67, 580, 1332, 1224, 67, 76, 879, 10370, 16786, 12, 2890, 16, 463, 4672, 3536, 2860, 1053, 13382, 291, 2357, 1347, 463, 353, 279, 284, 1074, 14773, 287, 29649, 20030, 716, 17917, ...
retres : boolean if true, then an instance of a result class is returned, otherwise 2 numbers, fvalue and p-value, are returned
drop : alternative :
def het_goldfeldquandt(y, x, idx, split=None, retres=False): '''test whether variance is the same in 2 subsamples Parameters ---------- y : array_like endogenous variable x : array_like exogenous variable, regressors idx : integer column index of variable according to which observations are sorted for the split split : None or integer or float in intervall (0,1) index at which sample is split. If 0<split<1 then split is interpreted as fraction of the observations in the first sample retres : boolean if true, then an instance of a result class is returned, otherwise 2 numbers, fvalue and p-value, are returned Returns ------- (fval, pval) or res fval : float value of the F-statistic pval : float p-value of the hypothesis that the variance in one subsample is larger than in the other subsample res : instance of result class The class instance is just a storage for the intermediate and final results that are calculated Notes ----- TODO: add resultinstance - DONE maybe add drop-middle as option maybe allow for several breaks recommendation for users: use this function as pattern for more flexible split in tests, e.g. drop middle. can do Chow test for structural break in same way ran sanity check ''' x = np.asarray(x) y = np.asarray(y)**2 nobs, nvars = x.shape if split is None: split = nobs//2 elif (0<split) and (split<1): split = int(nobs*split) xsortind = np.argsort(x[:,idx]) y = y[xsortind] x = x[xsortind,:] resols1 = sm.OLS(y[:split], x[:split]).fit() resols2 = sm.OLS(y[split:], x[split:]).fit() fval = resols1.mse_resid/resols2.mse_resid if fval>1: fpval = stats.f.sf(fval, resols1.df_resid, resols2.df_resid) ordering = 'larger' else: fval = 1./fval; fpval = stats.f.sf(fval, resols2.df_resid, resols1.df_resid) ordering = 'smaller' if retres: res = ResultsStore() res.__doc__ = 'Test Results for Goldfeld-Quandt test of heterogeneity' res.fval = fval res.fpval = fpval res.df_fval = (resols2.df_resid, resols1.df_resid) res.resols1 = resols1 res.resols2 = resols2 res.ordering = ordering res.split = split #res.__str__ res._str = '''The Goldfeld-Quandt test for null hypothesis that the
65242e05db93602342fa77d2579bc8cae0fd6ea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/65242e05db93602342fa77d2579bc8cae0fd6ea0/stattools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 278, 67, 75, 1673, 74, 488, 372, 464, 88, 12, 93, 16, 619, 16, 2067, 16, 1416, 33, 7036, 16, 325, 455, 33, 8381, 4672, 9163, 3813, 2856, 12380, 353, 326, 1967, 316, 576, 720, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 278, 67, 75, 1673, 74, 488, 372, 464, 88, 12, 93, 16, 619, 16, 2067, 16, 1416, 33, 7036, 16, 325, 455, 33, 8381, 4672, 9163, 3813, 2856, 12380, 353, 326, 1967, 316, 576, 720, ...
request.user.editor_default = form.get('editor_default', [self.cfg.editor_default])[0] request.user.editor_ui = form.get('editor_ui', [self.cfg.editor_ui])[0]
request.user.editor_default = wikiutil.clean_input(form.get('editor_default', [self.cfg.editor_default])[0]) request.user.editor_ui = wikiutil.clean_input(form.get('editor_ui', [self.cfg.editor_ui])[0])
def _save_user_prefs(self): _ = self._ form = self.request.form request = self.request
ca9d149b6f6e52e2df1a52d1e3e60ffbca7d0cf3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/ca9d149b6f6e52e2df1a52d1e3e60ffbca7d0cf3/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 1355, 67, 1484, 2556, 12, 2890, 4672, 389, 273, 365, 6315, 646, 273, 365, 18, 2293, 18, 687, 590, 273, 365, 18, 2293, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 5688, 67, 1355, 67, 1484, 2556, 12, 2890, 4672, 389, 273, 365, 6315, 646, 273, 365, 18, 2293, 18, 687, 590, 273, 365, 18, 2293, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise NotImplementedError
language = os.environ.get('LANGUAGE') language = language.split('.')[0] language = language.replace('_', '-') accept_language = AcceptLanguage(language) return accept_language.select_language(languages)
def select_language(self, languages): raise NotImplementedError
fe77da676bca92b048bf6c3e7497a1530157ee03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/fe77da676bca92b048bf6c3e7497a1530157ee03/domains.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 4923, 12, 2890, 16, 8191, 4672, 1002, 11206, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 4923, 12, 2890, 16, 8191, 4672, 1002, 11206, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
<ePixmap pixmap="skin_default/border_menu_300.png" position="5,50" zPosition="1" size="300,300" transparent="1" alphatest="on" /> <widget source="menu" render="Listbox" position="10,60" size="290,260" scrollbarMode="showOnDemand">
<widget source="LabelBSSID" render="Label" position="10,60" size="250,25" valign="left" font="Regular;20" transparent="1" foregroundColor=" <widget source="LabelESSID" render="Label" position="10,100" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="LabelQuality" render="Label" position="10,140" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="LabelSignal" render="Label" position="10,180" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="LabelBitrate" render="Label" position="10,220" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="LabelEnc" render="Label" position="10,260" size="250,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="BSSID" render="Label" position="320,60" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="ESSID" render="Label" position="320,100" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="quality" render="Label" position="320,140" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="signal" render="Label" position="320,180" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="bitrate" render="Label" position="320,220" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <widget source="enc" render="Label" position="320,260" size="180,25" valign="center" font="Regular;20" transparent="1" foregroundColor=" <ePixmap pixmap="skin_default/div-h.png" position="0,350" zPosition="1" size="560,2" /> <widget source="IFtext" render="Label" position="10,355" size="120,21" zPosition="10" font="Regular;20" halign="left" backgroundColor=" <widget source="IF" render="Label" position="120,355" size="400,21" zPosition="10" font="Regular;20" halign="left" backgroundColor=" <widget source="Statustext" render="Label" position="10,375" size="115,21" zPosition="10" font="Regular;20" halign="left" backgroundColor=" <widget name="statuspic" pixmaps="skin_default/buttons/button_green.png,skin_default/buttons/button_green_off.png" position="130,380" zPosition="10" size="15,16" transparent="1" alphatest="on"/> </screen>""" def __init__(self, session, iface): Screen.__init__(self, session) self.session = session self.iface = iface self["LabelBSSID"] = StaticText(_('Accesspoint:')) self["LabelESSID"] = StaticText(_('SSID:')) self["LabelQuality"] = StaticText(_('Link Quality:')) self["LabelSignal"] = StaticText(_('Signal Strength:')) self["LabelBitrate"] = StaticText(_('Bitrate:')) self["LabelEnc"] = StaticText(_('Encryption:')) self["BSSID"] = StaticText() self["ESSID"] = StaticText() self["quality"] = StaticText() self["signal"] = StaticText() self["bitrate"] = StaticText() self["enc"] = StaticText() self["IFtext"] = StaticText() self["IF"] = StaticText() self["Statustext"] = StaticText() self["statuspic"] = MultiPixmap() self["statuspic"].hide() self["key_red"] = StaticText(_("Close")) self.resetList() self.updateStatusbar() self["actions"] = NumberActionMap(["WizardActions", "InputActions", "EPGSelectActions", "ShortcutActions"], { "ok": self.exit, "back": self.exit, "red": self.exit, }, -1) self.timer = eTimer() self.timer.timeout.get().append(self.resetList) self.onShown.append(lambda: self.timer.start(5000)) self.onLayoutFinish.append(self.layoutFinished) self.onClose.append(self.cleanup) def cleanup(self): iStatus.stopWlanConsole() def layoutFinished(self): self.setTitle(_("Wireless Network State")) def resetList(self): iStatus.getDataForInterface(self.iface,self.getInfoCB) def getInfoCB(self,data,status): if data is not None: if data is True: if status is not None: self["BSSID"].setText(status[self.iface]["acesspoint"]) self["ESSID"].setText(status[self.iface]["essid"]) self["quality"].setText(status[self.iface]["quality"]+"%") self["signal"].setText(status[self.iface]["signal"]) self["bitrate"].setText(status[self.iface]["bitrate"]) self["enc"].setText(status[self.iface]["encryption"]) self.updateStatusLink(status) def exit(self): self.timer.stop() self.close(True) def updateStatusbar(self): self["BSSID"].setText(_("Please wait...")) self["ESSID"].setText(_("Please wait...")) self["quality"].setText(_("Please wait...")) self["signal"].setText(_("Please wait...")) self["bitrate"].setText(_("Please wait...")) self["enc"].setText(_("Please wait...")) self["IFtext"].setText(_("Network:")) self["IF"].setText(iNetwork.getFriendlyAdapterName(self.iface)) self["Statustext"].setText(_("Link:")) def updateStatusLink(self,status): if status is not None: if status[self.iface]["acesspoint"] == "No Connection" or status[self.iface]["acesspoint"] == "Not-Associated" or status[self.iface]["acesspoint"] == False: self["statuspic"].setPixmapNum(1) else: self["statuspic"].setPixmapNum(0) self["statuspic"].show() class WlanScan(Screen): skin = """ <screen name="WlanScan" position="center,center" size="560,400" title="Choose a Wireless Network" > <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor=" <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor=" <widget source="list" render="Listbox" position="5,40" size="550,300" scrollbarMode="showOnDemand">
def load_cache(cache_file): #Does a cPickle load fd = open(cache_file) cache_data = load(fd) fd.close() return cache_data
e198493e29c22e49dff1da47e83a989cdbd1d913 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/e198493e29c22e49dff1da47e83a989cdbd1d913/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2493, 12, 2493, 67, 768, 4672, 468, 10154, 279, 276, 17968, 298, 1262, 5194, 273, 1696, 12, 2493, 67, 768, 13, 1247, 67, 892, 273, 1262, 12, 8313, 13, 5194, 18, 4412, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2493, 12, 2493, 67, 768, 4672, 468, 10154, 279, 276, 17968, 298, 1262, 5194, 273, 1696, 12, 2493, 67, 768, 13, 1247, 67, 892, 273, 1262, 12, 8313, 13, 5194, 18, 4412, 1435, ...
for channel in self.channel_names: if args[0].split('!', 1)[0] in self.channel_names[channel]:
for channel in self.factory.handlers: if (channel in self.channel_names and args[0].split('!', 1)[0] in self.channel_names[channel]):
def call_handlers(self, event, channel, args=[]): # If the channel is None, this is a server event not associated with a # specific channel, such as a successful sign-on or a quit. Send the # event to every registered handler. if channel is None: handlers = set() # If this is a quit or nick change, only invoke callbacks on the # handlers that are active for the channels where the relevant # user is present. if event in ('userQuit', 'userRenamed'): for channel in self.channel_names: if args[0].split('!', 1)[0] in self.channel_names[channel]: handlers.update(self.factory.handlers[util.canonicalize(channel)]) else: for channel in self.channel_names: handlers.update(self.factory.handlers[util.canonicalize(channel)]) else: # If the channel doesn't start with an IRC channel prefix, treat # the event as a private one. Some networks send notices to "AUTH" # when performing ident lookups, for example. if channel[0] not in irc.CHANNEL_PREFIXES: channel = '@' try: handlers = self.factory.handlers[util.canonicalize(channel)] except KeyError: # How'd we get in this channel? log.err(None, 'Received event for non-configured channel "%s".' % channel) return
291d4b3f6ad2bc6800b65dd9dcec7bbdca8ac38b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6476/291d4b3f6ad2bc6800b65dd9dcec7bbdca8ac38b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 11046, 12, 2890, 16, 871, 16, 1904, 16, 833, 33, 8526, 4672, 468, 971, 326, 1904, 353, 599, 16, 333, 353, 279, 1438, 871, 486, 3627, 598, 279, 468, 2923, 1904, 16, 4123, 487...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 11046, 12, 2890, 16, 871, 16, 1904, 16, 833, 33, 8526, 4672, 468, 971, 326, 1904, 353, 599, 16, 333, 353, 279, 1438, 871, 486, 3627, 598, 279, 468, 2923, 1904, 16, 4123, 487...
raise ValueError, "name is too long (>%d)" \ % (LENGTH_NAME)
raise ValueError("name is too long (>%d)" % (LENGTH_NAME))
def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation about the file size. """ self._check("aw")
a080e25938abc4d1161007bb915b3848123a4f64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a080e25938abc4d1161007bb915b3848123a4f64/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 768, 12, 2890, 16, 8232, 1376, 16, 17041, 33, 7036, 4672, 3536, 986, 326, 20334, 966, 733, 1375, 11718, 1376, 11, 358, 326, 5052, 18, 971, 1375, 768, 2603, 11, 353, 864, 16, 8232,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 768, 12, 2890, 16, 8232, 1376, 16, 17041, 33, 7036, 4672, 3536, 986, 326, 20334, 966, 733, 1375, 11718, 1376, 11, 358, 326, 5052, 18, 971, 1375, 768, 2603, 11, 353, 864, 16, 8232,...
print "update: " + str(self) + " HIDE"
def activateCondition(self, condition): if (condition): if (self.state == self.HIDDEN): print "update: " + str(self) + " SHOW" self.showWidget() else: if (self.state == self.SHOWN): print "update: " + str(self) + " HIDE" self.hideWidget()
8dfa670adff5299752bcb5a42aff4ae91179ee22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/8dfa670adff5299752bcb5a42aff4ae91179ee22/ConditionalWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 3418, 12, 2890, 16, 2269, 4672, 309, 261, 4175, 4672, 309, 261, 2890, 18, 2019, 422, 365, 18, 44, 18216, 4672, 1172, 315, 2725, 30, 315, 397, 609, 12, 2890, 13, 397, 315, 27954,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 3418, 12, 2890, 16, 2269, 4672, 309, 261, 4175, 4672, 309, 261, 2890, 18, 2019, 422, 365, 18, 44, 18216, 4672, 1172, 315, 2725, 30, 315, 397, 609, 12, 2890, 13, 397, 315, 27954,...
self.hatari.pause()
def show(self): self.window.show_all() self.window.deiconify() self.hatari.pause()
9d2db51e40b84e4fd2b16210604ff99c6e3ab80c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8501/9d2db51e40b84e4fd2b16210604ff99c6e3ab80c/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 365, 18, 5668, 18, 4500, 67, 454, 1435, 365, 18, 5668, 18, 323, 3950, 1164, 1435, 365, 18, 76, 8761, 77, 18, 19476, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 365, 18, 5668, 18, 4500, 67, 454, 1435, 365, 18, 5668, 18, 323, 3950, 1164, 1435, 365, 18, 76, 8761, 77, 18, 19476, 1435, 2, -100, -100, -100, -100, -100, -100, ...
sage: rho, phi, z = var('rho phi z') sage: T.gen_transform(rho=rho, phi=phi, z=z) (rho*cos(phi), rho*sin(phi), z) Use with plot3d on a made-up function:: sage: plot3d(phi * z, (phi, 0, 1), (z, 0, 1), transformation=T) To graph a function ``z`` in terms of ``phi`` and ``rho`` you would use:: sage: Cylindrical('z', ['phi', 'rho']) Cylindrical coordinate system (z in terms of phi, rho) See also ``cylindrical_plot3d`` for more examples of plotting in cylindrical
sage: r, theta, z = var('r theta z') sage: T.transform(radius=r, azimuth=theta, height=z) (r*cos(theta), r*sin(theta), z) We can plot with this transform. Remember that the independent variable is the height, and the dependent variables are the radius and the azimuth (in that order):: sage: plot3d(9-r^2, (r, 0, 3), (theta, 0, pi), transformation=T) We next graph the function where the radius is constant:: sage: S=Cylindrical('radius', ['azimuth', 'height']) sage: theta,z=var('theta, z') sage: plot3d(3, (theta,0,2*pi), (z, -2, 2), transformation=S) See also :func:`cylindrical_plot3d` for more examples of plotting in cylindrical
def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: sage: T = Spherical('r', ['theta', 'phi']) sage: T.gen_transform(r=var('r'), theta=var('theta'), phi=var('phi')) (r*sin(theta)*cos(phi), r*sin(phi)*sin(theta), r*cos(theta)) """ return (r * sin(theta) * cos(phi), r * sin(theta) * sin(phi), r * cos(theta))
ae9bf5e0d28a56cbf9d189e5545c9a8340d806de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ae9bf5e0d28a56cbf9d189e5545c9a8340d806de/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 6547, 12, 2890, 16, 436, 33, 7036, 16, 7338, 33, 7036, 16, 7706, 33, 7036, 4672, 3536, 5675, 21373, 2866, 225, 272, 410, 30, 399, 273, 348, 21570, 2668, 86, 2187, 10228, 1448...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 6547, 12, 2890, 16, 436, 33, 7036, 16, 7338, 33, 7036, 16, 7706, 33, 7036, 4672, 3536, 5675, 21373, 2866, 225, 272, 410, 30, 399, 273, 348, 21570, 2668, 86, 2187, 10228, 1448...
@param id: structure type ID
@param sid: structure type ID
def GetMemberSize(id, member_offset): """ Get size of a member @param id: structure type ID @param member_offset: member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. @return: -1 if bad structure type ID is passed or no such member in the structure otherwise returns size of the specified member in bytes. """ s = idaapi.get_struc(id) if not s: return None m = idaapi.get_member(s, member_offset) if not m: return None return idaapi.get_member_size(m)
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 1225, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 963, 434, 279, 3140, 225, 632, 891, 7348, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, 18, 1021, 1384, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 1225, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 963, 434, 279, 3140, 225, 632, 891, 7348, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, 18, 1021, 1384, ...
file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding)))
file.write(_encode(" %s=\"%s\"" % (k, _escape_attrib(v)), encoding))
def _write(self, file, node, encoding, namespaces): # write XML to file tag = node.tag if tag is Comment: file.write("<!-- %s -->" % _escape_cdata(node.text, encoding)) elif tag is ProcessingInstruction: file.write("<?%s?>" % _escape_cdata(node.text, encoding)) else: items = list(node.items()) xmlns_items = [] # new namespaces in this scope try: if isinstance(tag, QName) or tag[:1] == "{": tag, xmlns = fixtag(tag, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(tag) file.write("<" + _encode(tag, encoding)) if items or xmlns_items: items.sort() # lexical order for k, v in items: try: if isinstance(k, QName) or k[:1] == "{": k, xmlns = fixtag(k, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(k) try: if isinstance(v, QName): v, xmlns = fixtag(v, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(v) file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding))) for k, v in xmlns_items: file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding))) if node.text or len(node): file.write(">") if node.text: file.write(_escape_cdata(node.text, encoding)) for n in node: self._write(file, n, encoding, namespaces) file.write("</" + _encode(tag, encoding) + ">") else: file.write(" />") for k, v in xmlns_items: del namespaces[v] if node.tail: file.write(_escape_cdata(node.tail, encoding))
f30bb0eba2d5aeefba5afc5fbc00a0c1ef9c271e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/f30bb0eba2d5aeefba5afc5fbc00a0c1ef9c271e/ElementTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 585, 16, 756, 16, 2688, 16, 7728, 4672, 468, 1045, 3167, 358, 585, 1047, 273, 756, 18, 2692, 309, 1047, 353, 9821, 30, 585, 18, 2626, 2932, 5586, 413, 738, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 585, 16, 756, 16, 2688, 16, 7728, 4672, 468, 1045, 3167, 358, 585, 1047, 273, 756, 18, 2692, 309, 1047, 353, 9821, 30, 585, 18, 2626, 2932, 5586, 413, 738, 8...
print 'Cannot load image:', name
print 'Cannot load image:', fullname
def load_image(name, colorkey=None): fullname = os.path.join('data', name) try: image = pygame.image.load(fullname) except pygame.error, message: print 'Cannot load image:', name raise SystemExit, message image = image.convert() if colorkey is not None: if colorkey is -1: colorkey = image.get_at((0,0)) image.set_colorkey(colorkey, RLEACCEL) return image, image.get_rect()
0bb89b0a3a6a78ca561daf3bb24d3d96c0bb6f91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1298/0bb89b0a3a6a78ca561daf3bb24d3d96c0bb6f91/chimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2730, 12, 529, 16, 645, 778, 402, 33, 7036, 4672, 13321, 273, 1140, 18, 803, 18, 5701, 2668, 892, 2187, 508, 13, 775, 30, 1316, 273, 2395, 13957, 18, 2730, 18, 945, 12, 218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2730, 12, 529, 16, 645, 778, 402, 33, 7036, 4672, 13321, 273, 1140, 18, 803, 18, 5701, 2668, 892, 2187, 508, 13, 775, 30, 1316, 273, 2395, 13957, 18, 2730, 18, 945, 12, 218...
logger.debug("creating container: %s", containername)
logger.info("creating container: %s", containername)
def fill(self, type=None, name=None, **options ): """Determine outputdata and outputsandbox locations of finished jobs and fill output variable""" from Ganga.GPIDev.Lib.Job import Job from GangaAtlas.Lib.ATLASDataset import filecheck job = self._getParent()
468d9a5fa0dd52501ac42aeda8c85af6db6fb2a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/468d9a5fa0dd52501ac42aeda8c85af6db6fb2a8/AthenaMCDatasets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 12, 2890, 16, 618, 33, 7036, 16, 508, 33, 7036, 16, 2826, 2116, 262, 30, 3536, 8519, 876, 892, 471, 6729, 9069, 7838, 434, 6708, 6550, 471, 3636, 876, 2190, 8395, 628, 611, 539, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 12, 2890, 16, 618, 33, 7036, 16, 508, 33, 7036, 16, 2826, 2116, 262, 30, 3536, 8519, 876, 892, 471, 6729, 9069, 7838, 434, 6708, 6550, 471, 3636, 876, 2190, 8395, 628, 611, 539, ...
if len(res[1]):
if len(res[1]) and self.requireSigs:
def checkTroveSignatures(self, trv, callback): assert(hasattr(callback, 'verifyTroveSignatures')) if callback.keyCache is None: callback.keyCache = openpgpkey.getKeyCache() for fingerprint, timestamp, sig in trv.troveInfo.sigs.digitalSigs.iter(): pubKey = callback.keyCache.getPublicKey(fingerprint) if pubKey.isRevoked(): raise openpgpfile.IncompatibleKey('Key %s is revoked' %pubKey.getFingerprint()) expirationTime = pubKey.getTimestamp() if expirationTime and expirationTime < timestamp: raise openpgpfile.IncompatibleKey('Key %s is expired' %pubKey.getFingerprint()) res = ChangeSetJob.checkTroveSignatures(self, trv, callback) if len(res[1]): raise openpgpfile.KeyNotFound('Repository does not recognize ' 'key: %s'% res[1][0])
e93edb6527ab26a865646c41aacc729808ca5f1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/e93edb6527ab26a865646c41aacc729808ca5f1f/fsrepos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 56, 303, 537, 23918, 12, 2890, 16, 433, 90, 16, 1348, 4672, 1815, 12, 5332, 1747, 12, 3394, 16, 296, 8705, 56, 303, 537, 23918, 26112, 309, 1348, 18, 856, 1649, 353, 599, 30, 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, 866, 56, 303, 537, 23918, 12, 2890, 16, 433, 90, 16, 1348, 4672, 1815, 12, 5332, 1747, 12, 3394, 16, 296, 8705, 56, 303, 537, 23918, 26112, 309, 1348, 18, 856, 1649, 353, 599, 30, 13...
body_end = end.copy() self._detect_tag(buff,body_start,body_end)
self._detect_tag(buff,body_start,end)
def _modified(self,buff=None) : #pylint: disable-msg=W0613 """ This function is called when the buffer has been modified, it reflects the changes by: 1. Applying the title style on the first line 2. Changing the name of the window if title change """ #cursor_pos = buff.get_property("cursor-position") cursor_mark = buff.get_insert() cursor_iter = buff.get_iter_at_mark(cursor_mark) cursor_line = cursor_iter.get_line() #This should be called only if we are on the title line #As an optimisation title_end = self._apply_title(buff)
d11a5d2913ab9ec9b969e632dab63720868ed791 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/d11a5d2913ab9ec9b969e632dab63720868ed791/taskview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7342, 12, 2890, 16, 20664, 33, 7036, 13, 294, 468, 2074, 5671, 30, 4056, 17, 3576, 33, 59, 7677, 3437, 3536, 1220, 445, 353, 2566, 1347, 326, 1613, 711, 2118, 4358, 16, 518, 3037,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7342, 12, 2890, 16, 20664, 33, 7036, 13, 294, 468, 2074, 5671, 30, 4056, 17, 3576, 33, 59, 7677, 3437, 3536, 1220, 445, 353, 2566, 1347, 326, 1613, 711, 2118, 4358, 16, 518, 3037,...
self.TrainFolder(fol, False)
folder = IMAPFolder(fol) folder.Train(self.classifier, False)
def Train(self): if options.verbose: t = time.time() if options.imap_ham_train_folders != "": ham_training_folders = options.imap_ham_train_folders.split() for fol in ham_training_folders: self.TrainFolder(fol, False) if options.imap_spam_train_folders != "": spam_training_folders = options.imap_spam_train_folders.split(' ' ) for fol in spam_training_folders: self.TrainFolder(fol, True) self.classifier.store() if options.verbose: print "Training took", time.time() - t, "seconds."
78562f294fdc412cde22daf1b88e62102ccf5c10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/78562f294fdc412cde22daf1b88e62102ccf5c10/imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 18, 11369, 30, 268, 273, 813, 18, 957, 1435, 309, 702, 18, 12161, 67, 31698, 67, 9754, 67, 16064, 480, 1408, 30, 366, 301, 67, 17584, 67, 16064, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 18, 11369, 30, 268, 273, 813, 18, 957, 1435, 309, 702, 18, 12161, 67, 31698, 67, 9754, 67, 16064, 480, 1408, 30, 366, 301, 67, 17584, 67, 16064, ...
str += '<span class=%s-kwarg>**%s</span>, ' % (cssclass, fdoc.kwarg().name()) if str[-1] != '(': str = str[:-2] return str + ')</code></b>'
str += ('<span class=%s-kwarg>**%s</span>%s' % (cssclass, fdoc.kwarg().name(), PARAM_JOIN)) if str[-1] != '(': str = str[:-len(PARAM_JOIN)] return str + ')</code>'
def _func_signature(self, fname, fdoc, cssclass="sig"): """ @return: The HTML code for the function signature of the function with the given name and documentation. @param fname: The short name of the function. @type fname: C{string} @param fdoc: The documentation for the function. @type fdoc: L{objdoc.FuncDoc} """ str = '<b><code class=%s>' % cssclass str += '<span class=%s-name>%s</span>(' % (cssclass, fname) for param in fdoc.parameters(): str += '<span class=%s-arg>%s</span>' % (cssclass, param.name()) if param.default(): default = param.default() if len(default) > 60: default = default[:57]+'...' str += '=<span class=%s-default>%s</span>' % (cssclass, default) str += ', ' if fdoc.vararg(): str += '<span class=%s-vararg>*%s</span>, ' % (cssclass, fdoc.vararg().name()) if fdoc.kwarg(): str += '<span class=%s-kwarg>**%s</span>, ' % (cssclass, fdoc.kwarg().name()) if str[-1] != '(': str = str[:-2]
c953b2de7aa23b0dce9a80366ed13af227c1f7f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/c953b2de7aa23b0dce9a80366ed13af227c1f7f3/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 8195, 12, 2890, 16, 5299, 16, 284, 2434, 16, 2873, 1017, 459, 1546, 7340, 6, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 445, 3372, 434, 326, 445, 598, 326, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 8195, 12, 2890, 16, 5299, 16, 284, 2434, 16, 2873, 1017, 459, 1546, 7340, 6, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 445, 3372, 434, 326, 445, 598, 326, 8...
'create_date': fields.datetime('Latest Date of Inventory'), }
'date': fields.datetime('Latest Inventory Date'), }
def unlink(self, cr, uid, ids, context={}): raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
268a1cc776f5749cadd6c7e0afe68b9a29727b8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/268a1cc776f5749cadd6c7e0afe68b9a29727b8b/report_stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1002, 1140, 90, 18, 14137, 67, 538, 90, 24899, 2668, 668, 401, 19899, 389, 2668, 6225, 2780, 1430, 1281, 1409, 5124, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1002, 1140, 90, 18, 14137, 67, 538, 90, 24899, 2668, 668, 401, 19899, 389, 2668, 6225, 2780, 1430, 1281, 1409, 5124, ...
scoreToMatch = currentPreferenceScore - 1 else: scoreToMatch = currentPreferenceScore preferenceScore, flavorList = self._filterByPreferences( flavorList, scoreToMatch) if preferenceScore is None:
def _filterByFlavorQuery(self, versionFlavorDict, flavorQueryList, flavorFilter, flavorCheck, latestFilter, scoreCache): """ @param versionFlavorDict: dict of available version flavor pairs @type versionFlavorDict: {version -> [flavor]} @param flavorQuery: requested flavors that this query must match. @type flavorQuery: list of flavors @param flavorCheck: How to match the flavorQuery against the available flavors. @type flavorCheck: One of _CHECK_TROVE_STRONG_FLAVOR or _CHECK_TROVE_REG_FLAVOR @param flavorFilter: how to limit matching results for return against the available troves. @type: one of _GET_TROVE_ALL_FLAVORS, _GET_TROVE_AVAILABLE_FLAVORS, or _GET_TROVE_BEST_FLAVOR @type latestFilter: one of _GET_TROVE_ALL_VERSIONS, _GET_TROVE_VERY_LATEST @param latestFilter: once packages are filtered by flavor so that only matching flavors are available, this filter chooses how to filter by version timestamp. @param flavorPreferences: A list of tuples of flavors such that if a flavor in an earlier part of the flavorPreference list is available, then no flavors matching only flavors in the latter part of the list will be acceptable. E.g. [('is:x86_64', 'is:x86') would prefer packages that had the flavor x86_64 in them over those with x86 in them, even if the x86_64 packages were older. """ if latestFilter == _GET_TROVE_VERY_LATEST: versionFlavorList = sorted(versionFlavorDict.iteritems(), reverse=True) else: versionFlavorList = list(versionFlavorDict.items()) if flavorFilter == _GET_TROVE_ALL_FLAVORS and flavorQueryList: for flavor in flavorQueryList: if flavor is not None: flavorFilter = _GET_TROVE_ALLOWED_FLAVOR break
adf01d831ec33eb35a69d047eafd6f0f0f2c9e22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/adf01d831ec33eb35a69d047eafd6f0f0f2c9e22/trovesource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2188, 858, 2340, 9444, 1138, 12, 2890, 16, 1177, 2340, 9444, 5014, 16, 19496, 1138, 682, 16, 19496, 1586, 16, 19496, 1564, 16, 4891, 1586, 16, 4462, 1649, 4672, 3536, 632, 891, 1177...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2188, 858, 2340, 9444, 1138, 12, 2890, 16, 1177, 2340, 9444, 5014, 16, 19496, 1138, 682, 16, 19496, 1586, 16, 19496, 1564, 16, 4891, 1586, 16, 4462, 1649, 4672, 3536, 632, 891, 1177...