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
idstring = "$Id: notation3.py,v 1.93 2001-09-24 16:30:29 timbl Exp $"
idstring = "$Id: notation3.py,v 1.94 2001-09-24 20:01:51 timbl Exp $"
def startDoc(self):
b5d4806e3808ec527cac5e76e3ae3b7ea3dc8d6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/b5d4806e3808ec527cac5e76e3ae3b7ea3dc8d6b/notation3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1759, 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, 787, 1759, 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...
VEHICLE_QUATS = [ ["AHRS_DEBUG_QUAT", 2, "JOBY"], ["AHRS_DEBUG_QUAT", 10, "POINE"], ["AHRS_DEBUG_QUAT", 6, "XSENS Estimation"], ["BOOZ2_AHRS_REF_QUAT", 2, "Reference"]]
VEHICLE_QUATS = [ ["AHRS_DEBUG_QUAT", 10, "POINE"], ["BOOZ2_AHRS_REF_QUAT", 2, "Reference"]]
def OnClose(self, event): IvyStop() self.Destroy()
7602f805bb5eb1dd4d2bc8f747c7a4a28bbba806 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14091/7602f805bb5eb1dd4d2bc8f747c7a4a28bbba806/attitude_viz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4605, 12, 2890, 16, 871, 4672, 467, 29139, 4947, 1435, 365, 18, 10740, 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, ...
[ 1, 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, 2755, 4605, 12, 2890, 16, 871, 4672, 467, 29139, 4947, 1435, 365, 18, 10740, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
c += 1
if __debug__: c -= 1 if not c: import sys, pdb print >> sys.stderr, 'dict lookup lost in infinite loop' pdb.set_trace()
def lookdict(self, lookup_hash, w_lookup): assert isinstance(lookup_hash, r_uint) space = self.space i = lookup_hash % len(self.data)
72eb894867b9b633841a9b51a8f8f25c583d8065 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/72eb894867b9b633841a9b51a8f8f25c583d8065/dictobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2324, 1576, 12, 2890, 16, 3689, 67, 2816, 16, 341, 67, 8664, 4672, 1815, 1549, 12, 8664, 67, 2816, 16, 436, 67, 11890, 13, 3476, 273, 365, 18, 2981, 277, 273, 3689, 67, 2816, 738, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2324, 1576, 12, 2890, 16, 3689, 67, 2816, 16, 341, 67, 8664, 4672, 1815, 1549, 12, 8664, 67, 2816, 16, 436, 67, 11890, 13, 3476, 273, 365, 18, 2981, 277, 273, 3689, 67, 2816, 738, 56...
if self.options.input_encoding.lower() == 'unicode':
if self.settings.input_encoding \ and self.settings.input_encoding.lower() == 'unicode':
def read(self, reader): """Decode and return the source string.""" if self.options.input_encoding.lower() == 'unicode': return self.source else: return self.decode(self.source)
bda0a7626f6d6ffe7d244d26e918cae5fbe214e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/bda0a7626f6d6ffe7d244d26e918cae5fbe214e1/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 2949, 4672, 3536, 6615, 471, 327, 326, 1084, 533, 12123, 309, 365, 18, 4272, 18, 2630, 67, 5999, 521, 471, 365, 18, 4272, 18, 2630, 67, 5999, 18, 8167, 1435, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 2949, 4672, 3536, 6615, 471, 327, 326, 1084, 533, 12123, 309, 365, 18, 4272, 18, 2630, 67, 5999, 521, 471, 365, 18, 4272, 18, 2630, 67, 5999, 18, 8167, 1435, 422, ...
self.monthly_climate = []
def _set_monthly_climate(self, data): errmsg = 'Monthly climate data should contain: month,\n'\ 'temperature and rainfall' self.monthly_climate = [] for vals in data: if len(vals)==3: obj = MonthlyClimate(month=int(vals[0]), temperature=vals[1], rainfall=vals[2]) self.monthly_climate.append(obj) elif vals!=[]: error(errmsg, title='Error reading data', buttons=['OK']) break
bbfcbae9af76ce263b65221ec9ef39d20dbc2975 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1832/bbfcbae9af76ce263b65221ec9ef39d20dbc2975/yasso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 7496, 715, 67, 830, 4988, 12, 2890, 16, 501, 4672, 17460, 273, 296, 5445, 715, 927, 4988, 501, 1410, 912, 30, 3138, 17211, 82, 8314, 296, 19557, 471, 767, 10625, 454, 11,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 7496, 715, 67, 830, 4988, 12, 2890, 16, 501, 4672, 17460, 273, 296, 5445, 715, 927, 4988, 501, 1410, 912, 30, 3138, 17211, 82, 8314, 296, 19557, 471, 767, 10625, 454, 11,...
return self.socket.accept()
request = self.socket.accept() if self.disable_nagle_algorithm: request[0].setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, True) return request
def get_request(self): """Get the request and client address from the socket.
2f2b8fd8268930fd8e853a1acc072c597ea93405 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/2f2b8fd8268930fd8e853a1acc072c597ea93405/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2293, 12, 2890, 4672, 3536, 967, 326, 590, 471, 1004, 1758, 628, 326, 2987, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2293, 12, 2890, 4672, 3536, 967, 326, 590, 471, 1004, 1758, 628, 326, 2987, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
vi.setStartByte (self.fullTextLines[row]) tail = rawItem.visiblePart[-vi.visLenInChars:] vi.visLenInBytes = len (tail.encode ('utf-8'))
vi.setStartByte (visibleLine) head = rawItem.visiblePart[:vi.visLenInChars] vi.visLenInBytes = len (head.encode ('utf-8'))
def createVisualItem (self, rawItem): row = rawItem.coords[1] vi = VisualItem ()
94c1886b22a74c09d75be95009f161fc58142c71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/94c1886b22a74c09d75be95009f161fc58142c71/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 25780, 1180, 261, 2890, 16, 1831, 1180, 4672, 1027, 273, 1831, 1180, 18, 9076, 63, 21, 65, 13206, 273, 26832, 1180, 1832, 2, 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, 752, 25780, 1180, 261, 2890, 16, 1831, 1180, 4672, 1027, 273, 1831, 1180, 18, 9076, 63, 21, 65, 13206, 273, 26832, 1180, 1832, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
dt = max(0, self.nagDelay - (time.time() - self.lastUpdateTime()))
dt = max(2, self.nagDelay - (time.time() - self.lastUpdateTime()))
def rescheduleNag(self): if self.currentNag is not None: self.currentNag.cancel()
309936c811c6d678e72d133e85316fedff740bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12893/309936c811c6d678e72d133e85316fedff740bae/diarybot2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 50, 346, 12, 2890, 4672, 309, 365, 18, 2972, 50, 346, 353, 486, 599, 30, 365, 18, 2972, 50, 346, 18, 10996, 1435, 2, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 50, 346, 12, 2890, 4672, 309, 365, 18, 2972, 50, 346, 353, 486, 599, 30, 365, 18, 2972, 50, 346, 18, 10996, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
v = nc.createVariable('ExternalDipolePotential','d') v.setValue(value)
v = nc.createVariable('ExternalDipolePotential','d',()) v.assignValue(value)
def set_external_dipole(self, value, position=None): ''' Externally imposed dipole potential. This option overwrites DipoleCorrection if set.
91c31fd7161a850fdda3a4a514fea6de67a9a8ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/91c31fd7161a850fdda3a4a514fea6de67a9a8ce/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 9375, 67, 24953, 790, 12, 2890, 16, 460, 16, 1754, 33, 7036, 4672, 9163, 1312, 798, 1230, 709, 7423, 24408, 790, 8555, 18, 1220, 1456, 28151, 463, 625, 790, 20884, 309, 444, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 9375, 67, 24953, 790, 12, 2890, 16, 460, 16, 1754, 33, 7036, 4672, 9163, 1312, 798, 1230, 709, 7423, 24408, 790, 8555, 18, 1220, 1456, 28151, 463, 625, 790, 20884, 309, 444, 1...
result = cmpObjects(value1, value2)
result = noneAwareCmp(value1, value2)
def cmpObjects(v1, v2): # ... somewhat stolen from Indexes.py in the repository # code. if v1 is v2: return 0
2388a0f578f6560a73cabe39afb52dc745b3d868 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2388a0f578f6560a73cabe39afb52dc745b3d868/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9411, 4710, 12, 90, 21, 16, 331, 22, 4672, 468, 1372, 18016, 11304, 384, 355, 275, 628, 3340, 281, 18, 2074, 316, 326, 3352, 468, 981, 18, 309, 331, 21, 353, 331, 22, 30, 327, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9411, 4710, 12, 90, 21, 16, 331, 22, 4672, 468, 1372, 18016, 11304, 384, 355, 275, 628, 3340, 281, 18, 2074, 316, 326, 3352, 468, 981, 18, 309, 331, 21, 353, 331, 22, 30, 327, 374, ...
dict = _readmodule(module, path)
def readmodule(module, path=[]): '''Backwards compatible interface. Call readmodule_ex() and then only keep Class objects from the resulting dictionary.''' dict = _readmodule(module, path) res = {} for key, value in dict.items(): if isinstance(value, Class): res[key] = value return res
4b228016f7248c15c1df2d1be731768fca57d0ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/4b228016f7248c15c1df2d1be731768fca57d0ca/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 12, 2978, 16, 589, 33, 8526, 4672, 9163, 2711, 6397, 7318, 1560, 18, 225, 3049, 855, 2978, 67, 338, 1435, 471, 1508, 1338, 3455, 1659, 2184, 628, 326, 8156, 3880, 1093, 6309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 12, 2978, 16, 589, 33, 8526, 4672, 9163, 2711, 6397, 7318, 1560, 18, 225, 3049, 855, 2978, 67, 338, 1435, 471, 1508, 1338, 3455, 1659, 2184, 628, 326, 8156, 3880, 1093, 6309, ...
del sectdict[key]
del sectdict[option]
def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed
bf6c82da8bd370fcdda9e19cb7edc9a03c6a725e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bf6c82da8bd370fcdda9e19cb7edc9a03c6a725e/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3482, 12, 2890, 16, 2442, 16, 1456, 4672, 3536, 3288, 392, 1456, 12123, 309, 486, 2442, 578, 2442, 422, 315, 5280, 6877, 29140, 1576, 273, 365, 16186, 7606, 469, 30, 775, 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, 1206, 67, 3482, 12, 2890, 16, 2442, 16, 1456, 4672, 3536, 3288, 392, 1456, 12123, 309, 486, 2442, 578, 2442, 422, 315, 5280, 6877, 29140, 1576, 273, 365, 16186, 7606, 469, 30, 775, 30, ...
index = Index(urls=[[line.strip()] for line in fileinput.input(files)])
index = Index(urls=[url.split() for url in program.file_mode(*urls)])
def put(program, indexspec, *files): """Usage: <indexspec> file ... Read ichunk urls from file[s], and put them to an index at indexspec. """ from discodex.objects import Index index = Index(urls=[[line.strip()] for line in fileinput.input(files)]) program.client.put(indexspec, index)
badcb5506665114a3015a1595a577461192e1496 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/badcb5506665114a3015a1595a577461192e1496/discodexcli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 12890, 16, 770, 2793, 16, 380, 2354, 4672, 3536, 5357, 30, 411, 1615, 2793, 34, 585, 1372, 225, 2720, 277, 6551, 6903, 628, 585, 63, 87, 6487, 471, 1378, 2182, 358, 392, 770,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 12890, 16, 770, 2793, 16, 380, 2354, 4672, 3536, 5357, 30, 411, 1615, 2793, 34, 585, 1372, 225, 2720, 277, 6551, 6903, 628, 585, 63, 87, 6487, 471, 1378, 2182, 358, 392, 770,...
if options.num_test_shells > 1:
if options.target == "Debug":
def main(options, args): """Run the tests. Will call sys.exit when complete. Args: options: a dictionary of command line options args: a list of sub directories or files to test """ if options.sources: options.verbose = True # Set up our logging format. log_level = logging.INFO if options.verbose: log_level = logging.DEBUG logging.basicConfig(level=log_level, format='%(asctime)s %(filename)s:%(lineno)-3d' ' %(levelname)s %(message)s', datefmt='%y%m%d %H:%M:%S') if not options.target: if options.debug: options.target = "Debug" else: options.target = "Release" if options.results_directory.startswith("/"): # Assume it's an absolute path and normalize. options.results_directory = path_utils.GetAbsolutePath( options.results_directory) else: # If it's a relative path, make the output directory relative to Debug or # Release. basedir = path_utils.PathFromBase('webkit') options.results_directory = path_utils.GetAbsolutePath( os.path.join(basedir, options.target, options.results_directory)) # Ensure platform is valid and force it to the form 'chromium-<platform>'. options.platform = path_utils.PlatformName(options.platform) if not options.num_test_shells: cpus = 1 if sys.platform in ('win32', 'cygwin'): cpus = int(os.environ.get('NUMBER_OF_PROCESSORS', 1)) elif (hasattr(os, "sysconf") and os.sysconf_names.has_key("SC_NPROCESSORS_ONLN")): # Linux & Unix: ncpus = os.sysconf("SC_NPROCESSORS_ONLN") if isinstance(ncpus, int) and ncpus > 0: cpus = ncpus elif sys.platform in ('darwin'): # OSX: cpus = int(os.popen2("sysctl -n hw.ncpu")[1].read()) # TODO(ojan): Use cpus+1 once we flesh out the flakiness. options.num_test_shells = cpus logging.info("Running %s test_shells in parallel" % options.num_test_shells) if not options.time_out_ms: if options.num_test_shells > 1: options.time_out_ms = str(2 * TestRunner.DEFAULT_TEST_TIMEOUT_MS) else: options.time_out_ms = str(TestRunner.DEFAULT_TEST_TIMEOUT_MS) # Include all tests if none are specified. new_args = [] for arg in args: if arg and arg != '': new_args.append(arg) paths = new_args if not paths: paths = [] if options.test_list: paths += ReadTestFiles(options.test_list) # Create the output directory if it doesn't already exist. path_utils.MaybeMakeDirectory(options.results_directory) test_runner = TestRunner(options) test_runner.GatherFilePaths(paths) if options.lint_test_files: # Creating the expecations for each platform/target pair does all the # test list parsing and ensures it's correct syntax (e.g. no dupes). for platform in test_expectations.TestExpectationsFile.PLATFORMS: test_runner.ParseExpectations(platform, is_debug_mode=True) test_runner.ParseExpectations(platform, is_debug_mode=False) print ("If there are no fail messages, errors or exceptions, then the " "lint succeeded.") return else: test_runner.ParseExpectations(options.platform, options.target == 'Debug') test_runner.PrepareListsAndPrintOutput() if options.find_baselines: # Record where we found each baseline, then exit. print("html,txt,checksum,png"); for t in test_runner._test_files: (expected_txt_dir, expected_txt_file) = path_utils.ExpectedBaseline( t, '.txt')[0] (expected_png_dir, expected_png_file) = path_utils.ExpectedBaseline( t, '.png')[0] (expected_checksum_dir, expected_checksum_file) = path_utils.ExpectedBaseline( t, '.checksum')[0] print("%s,%s,%s,%s" % (path_utils.RelativeTestFilename(t), expected_txt_dir, expected_checksum_dir, expected_png_dir)) return try: test_shell_binary_path = path_utils.TestShellPath(options.target) except path_utils.PathNotFound: print "\nERROR: test_shell is not found. Be sure that you have built it" print "and that you are using the correct build. This script will run the" print "Release one by default. Use --debug to use the Debug build.\n" sys.exit(1) logging.info("Using platform '%s'" % options.platform) logging.info("Placing test results in %s" % options.results_directory) if options.new_baseline: logging.info("Placing new baselines in %s" % path_utils.ChromiumBaselinePath(options.platform)) logging.info("Using %s build at %s" % (options.target, test_shell_binary_path)) if not options.no_pixel_tests: logging.info("Running pixel tests") if 'cygwin' == sys.platform: logging.warn("#" * 40) logging.warn("# UNEXPECTED PYTHON VERSION") logging.warn("# This script should be run using the version of python") logging.warn("# in third_party/python_24/") logging.warn("#" * 40) sys.exit(1) # Delete the disk cache if any to ensure a clean test run. cachedir = os.path.split(test_shell_binary_path)[0] cachedir = os.path.join(cachedir, "cache") if os.path.exists(cachedir): shutil.rmtree(cachedir) test_runner.AddTestType(text_diff.TestTextDiff) if not options.no_pixel_tests: test_runner.AddTestType(image_diff.ImageDiff) if options.fuzzy_pixel_tests: test_runner.AddTestType(fuzzy_image_diff.FuzzyImageDiff) has_new_failures = test_runner.Run() logging.info("Exit status: %d" % has_new_failures) sys.exit(has_new_failures)
515da79572143ff0d03b9b2dfb236b176e5a6b79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/515da79572143ff0d03b9b2dfb236b176e5a6b79/run_webkit_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 3536, 1997, 326, 7434, 18, 225, 9980, 745, 2589, 18, 8593, 1347, 3912, 18, 225, 6634, 30, 702, 30, 279, 3880, 434, 1296, 980, 702, 833, 30, 279, 666, 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, 2774, 12, 2116, 16, 833, 4672, 3536, 1997, 326, 7434, 18, 225, 9980, 745, 2589, 18, 8593, 1347, 3912, 18, 225, 6634, 30, 702, 30, 279, 3880, 434, 1296, 980, 702, 833, 30, 279, 666, 4...
elif options.location == options.GNU: print _('
elif options.location == options.GNU: locline = ' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: print locline locline = " if len(locline) > 2: print locline
def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # common header try: sys.stdout = fp # The time stamp in the header doesn't have the same format # as that generated by xgettext... print pot_header % {'time': timestamp, 'version':__version__} for k, v in self.__messages.items(): for filename, lineno in v: # location comments are different b/w Solaris and GNU d = {'filename': filename, 'lineno': lineno} if options.location == options.SOLARIS: print _('# File: %(filename)s, line: %(lineno)d') % d elif options.location == options.GNU: print _('#: %(filename)s:%(lineno)d') % d # TBD: sorting, normalizing print 'msgid', normalize(k) print 'msgstr ""' print finally: sys.stdout = sys.__stdout__
52043ea2b7a4417a947165040dd20990b822491f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52043ea2b7a4417a947165040dd20990b822491f/pygettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4253, 4672, 702, 273, 365, 16186, 2116, 2858, 273, 813, 18, 21261, 12, 957, 18, 957, 10756, 468, 2975, 1446, 775, 30, 2589, 18, 10283, 273, 4253, 468, 1021, 813, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4253, 4672, 702, 273, 365, 16186, 2116, 2858, 273, 813, 18, 21261, 12, 957, 18, 957, 10756, 468, 2975, 1446, 775, 30, 2589, 18, 10283, 273, 4253, 468, 1021, 813, 14...
if self.hasTickets(): raise Exception("Will not modify database with existing tickets!")
self.assertNoTickets()
def setMilestoneList(self, m, key): """Remove all milestones, set them to `m`""" if self.hasTickets(): raise Exception("Will not modify database with existing tickets!") c = self.db().cursor() c.execute("""DELETE FROM milestone""") for ms in m: print "inserting milestone ", ms[key] c.execute("""INSERT INTO milestone (name) VALUES (%s)""", ms[key].encode('utf-8')) self.db().commit()
5cddf387e67e89477fb9b954001b3573f8af2454 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/5cddf387e67e89477fb9b954001b3573f8af2454/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15430, 18270, 682, 12, 2890, 16, 312, 16, 498, 4672, 3536, 3288, 777, 312, 14849, 5322, 16, 444, 2182, 358, 1375, 81, 68, 8395, 365, 18, 11231, 2279, 6264, 2413, 1435, 225, 276, 273, 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, 15430, 18270, 682, 12, 2890, 16, 312, 16, 498, 4672, 3536, 3288, 777, 312, 14849, 5322, 16, 444, 2182, 358, 1375, 81, 68, 8395, 365, 18, 11231, 2279, 6264, 2413, 1435, 225, 276, 273, 3...
pass
return w_obj.get(w_key, None)
def finditem(self, w_obj, w_key): # performance shortcut to avoid creating the OperationError(KeyError) if type(w_obj) is self.DictObjectCls: if not self.config.objspace.std.withstrdict: return w_obj.content.get(w_key, None) else: # XXX fix this here pass return ObjSpace.finditem(self, w_obj, w_key)
27da6f6af50959ba7f23495d0a16ec84cc782f16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/27da6f6af50959ba7f23495d0a16ec84cc782f16/objspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1726, 12, 2890, 16, 341, 67, 2603, 16, 341, 67, 856, 4672, 468, 9239, 10995, 358, 4543, 4979, 326, 4189, 668, 12, 653, 668, 13, 309, 618, 12, 91, 67, 2603, 13, 353, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 1726, 12, 2890, 16, 341, 67, 2603, 16, 341, 67, 856, 4672, 468, 9239, 10995, 358, 4543, 4979, 326, 4189, 668, 12, 653, 668, 13, 309, 618, 12, 91, 67, 2603, 13, 353, 365, 18, ...
info['browser_href.new'] = self.env.href.browser(path, rev=chgset.rev)
info['browser_href.new'] = self.env.href.browser(path, rev=chgset.rev)
def render_html(self, req, repos, chgset, diff_options): """HTML version"""
8433a395827d5216e9ecfb77e66bd1e6bfb87305 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/8433a395827d5216e9ecfb77e66bd1e6bfb87305/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 2620, 12, 2890, 16, 1111, 16, 13686, 16, 462, 75, 542, 16, 3122, 67, 2116, 4672, 3536, 4870, 1177, 8395, 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, 1743, 67, 2620, 12, 2890, 16, 1111, 16, 13686, 16, 462, 75, 542, 16, 3122, 67, 2116, 4672, 3536, 4870, 1177, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
response = ui.show_msg(self.window, _("Would you like to replace the existing playlist or append these songs?"), ("Existing Playlist"), "existingPlaylist", (_("Replace playlist"), 1, _("Append songs"), 2), default=self.existing_playlist_option)
response = ui.show_msg(self.window, _("Would you like to replace the existing playlist or append these songs?"), _("Existing Playlist"), "existingPlaylist", (_("Replace playlist"), 1, _("Append songs"), 2), default=self.existing_playlist_option)
def on_playlist_menu_click(self, action): plname = misc.unescape_html(action.get_name().replace("Playlist: ", "")) response = ui.show_msg(self.window, _("Would you like to replace the existing playlist or append these songs?"), ("Existing Playlist"), "existingPlaylist", (_("Replace playlist"), 1, _("Append songs"), 2), default=self.existing_playlist_option) if response == 1: # Overwrite self.existing_playlist_option = response self.playlist_create(plname) elif response == 2: # Append songs: self.existing_playlist_option = response self.client.command_list_ok_begin() for song in self.songs: self.client.playlistadd(plname, mpdh.get(song, 'file')) self.client.command_list_end() return
38a6e55609bc875db5ab3887e97cdc63e1bc0c18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/38a6e55609bc875db5ab3887e97cdc63e1bc0c18/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1601, 1098, 67, 5414, 67, 7475, 12, 2890, 16, 1301, 4672, 886, 529, 273, 20448, 18, 318, 6939, 67, 2620, 12, 1128, 18, 588, 67, 529, 7675, 2079, 2932, 30194, 30, 3104, 1408, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1601, 1098, 67, 5414, 67, 7475, 12, 2890, 16, 1301, 4672, 886, 529, 273, 20448, 18, 318, 6939, 67, 2620, 12, 1128, 18, 588, 67, 529, 7675, 2079, 2932, 30194, 30, 3104, 1408, ...
p.stdin.write ("0x%x\n0x%x\n" % (self._addr, self._addr)) lines = [] go = True while go: line = p.stdout.readline ().strip () lines += [ line ] go = not isDoubled (lines)
if inln: p.stdin.write ("0x%x\n0x%x\n" % (self._addr, self._addr)) go = True while go: line = p.stdout.readline ().strip () lines += [ line ] go = not isDoubled (lines) else: p.stdin.write ("0x%x\n" % self._addr) for i in range (2): line = p.stdout.readline ().strip () lines += [ line ]
def lookupFunctionName (self, p):
16c76ad61122d4de2a1adf56a24d755d2c6f00b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11834/16c76ad61122d4de2a1adf56a24d755d2c6f00b3/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 25258, 261, 2890, 16, 293, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 25258, 261, 2890, 16, 293, 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, -1...
t = text or (page.document()+'\n'+MIDSECTIONMARKER+ \
t = text or (page.document()+'\n\n'+MIDSECTIONMARKER+ \
def preRender(self, page, text=None): """ Do as much up-front rendering work as possible and save it. For the STX page type, this means: format mbox-style messages, apply text formatting, format any purple numbers, and identify wiki links. This normally works on page's source, but can be also invoked on arbitrary text. """ t = text or (page.document()+'\n'+MIDSECTIONMARKER+ \ self.preRenderMessages(page)) t = page.applyWikiLinkLineEscapesIn(t) t = self.format(t) t = page.markLinksIn(t) t = self.protectEmailAddresses(page,t) return t
33f2967dfe3e8e91b97ed5f41af10373f75b7595 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/33f2967dfe3e8e91b97ed5f41af10373f75b7595/stx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 3420, 12, 2890, 16, 1363, 16, 977, 33, 7036, 4672, 3536, 2256, 487, 9816, 731, 17, 10211, 9782, 1440, 487, 3323, 471, 1923, 518, 18, 225, 2457, 326, 2347, 60, 1363, 618, 16, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 3420, 12, 2890, 16, 1363, 16, 977, 33, 7036, 4672, 3536, 2256, 487, 9816, 731, 17, 10211, 9782, 1440, 487, 3323, 471, 1923, 518, 18, 225, 2457, 326, 2347, 60, 1363, 618, 16, 333, ...
som1=hlr_test.generate_som()
som1 = hlr_test.generate_som()
def subtract_time_indep_bkg(obj,B_list,**kwargs): """ This function takes a SOM or a SO and a list of time-independent background tuples and subtracts the numbers from the appropriate SO in the SOM or the given SO. The list of tuples (could be just one tuple in the case of the SO) is assumed to be in the same order as the SOs in the SOM. Parameters: ---------- -> obj is a SOM or SO from which to subtract the individual Bs from the B_list -> B_list are the time-independent backgrounds to subtract from the SOs in the SOM or a SO Return: ------- <- A SOM or SO with the time-independent backgrounds subtracted Exceptions: ---------- <- IndexError is raised if the B_list object is empty <- TypeError is raised if the first argument is not a SOM or SO <- RuntimeError is raised if the SOM and list are not the same length """ if len(B_list) <= 0: raise IndexError, "List of time-independent background cannot be empty" # List is correct size, go on else: pass # import the helper functions import hlr_utils (o_descr,l_descr)=hlr_utils.get_descr(obj,B_list) if o_descr == "number" or o_descr == "list": raise TypeError, "First argument must be a SOM or a SO!" # Have a SOM or SO, go on else: pass (result,res_descr)=hlr_utils.empty_result(obj) result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) import common_lib # iterate through the values for i in range(hlr_utils.get_length(obj)): val1 = hlr_utils.get_value(obj,i,o_descr,"all") val2 = hlr_utils.get_value(B_list,i,l_descr,"all") value = common_lib.sub_ncerr(val1, val2) hlr_utils.result_insert(result,res_descr,value,None,"all") return result
4d49f1aa94b12824979865b976621cfb89eca2ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/4d49f1aa94b12824979865b976621cfb89eca2ad/hlr_subtract_time_indep_bkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10418, 67, 957, 67, 267, 15037, 67, 70, 14931, 12, 2603, 16, 38, 67, 1098, 16, 636, 4333, 4672, 3536, 1220, 445, 5530, 279, 348, 1872, 578, 279, 7460, 471, 279, 666, 434, 813, 17, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10418, 67, 957, 67, 267, 15037, 67, 70, 14931, 12, 2603, 16, 38, 67, 1098, 16, 636, 4333, 4672, 3536, 1220, 445, 5530, 279, 348, 1872, 578, 279, 7460, 471, 279, 666, 434, 813, 17, 26...
extra_preargs = list(extra_preargs or []) libraries = list(libraries or [])
extra_preargs = copy.copy(extra_preargs or []) libraries = copy.copy(libraries or [])
def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None): # use separate copies, so can modify the lists extra_preargs = list(extra_preargs or []) libraries = list(libraries or []) # Additional libraries libraries.extend(self.dll_libraries) # we want to put some files in the same directory as the # object files are, build_temp doesn't help much
0d0aad695df507bf98088a926c2198f62de27cd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0d0aad695df507bf98088a926c2198f62de27cd2/cygwinccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 1612, 261, 2890, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 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, 1692, 67, 11574, 67, 1612, 261, 2890, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
elif ord(c) < 32 or c in ' "*+,:;<=>?[]|':
elif ord(c) < 32 or c in ' ",:;<=>':
def normcase(s): res, s = splitdrive(s) for c in s: if c in '/\\': res = res + os.sep elif c == '.' and res[-1:] == os.sep: res = res + mapchar + c elif ord(c) < 32 or c in ' "*+,:;<=>?[]|': if res[-1:] != mapchar: res = res + mapchar else: res = res + c return string.lower(res)
34b1fd84671a477e8d838b55eeec5215098c728c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/34b1fd84671a477e8d838b55eeec5215098c728c/dospath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4651, 3593, 12, 87, 4672, 400, 16, 272, 273, 1416, 25431, 12, 87, 13, 364, 276, 316, 272, 30, 309, 276, 316, 1173, 1695, 4278, 400, 273, 400, 397, 1140, 18, 10814, 1327, 276, 422, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4651, 3593, 12, 87, 4672, 400, 16, 272, 273, 1416, 25431, 12, 87, 13, 364, 276, 316, 272, 30, 309, 276, 316, 1173, 1695, 4278, 400, 273, 400, 397, 1140, 18, 10814, 1327, 276, 422, 26...
if not flag: app.widgetapp.window.nswindow.makeKeyAndOrderFront_(nil)
def applicationShouldHandleReopen_hasVisibleWindows_(self, appl, flag): if not flag: app.widgetapp.window.nswindow.makeKeyAndOrderFront_(nil) if app.widgetapp is not None and app.widgetapp.window is not None: mainWindow = app.widgetapp.window.nswindow if mainWindow.isMiniaturized(): mainWindow.deminiaturize_(appl) return NO
609091f3e6eb4ddad961a41a43bf6643d777db30 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/609091f3e6eb4ddad961a41a43bf6643d777db30/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2521, 14309, 3259, 426, 3190, 67, 5332, 6207, 10399, 67, 12, 2890, 16, 27808, 16, 2982, 4672, 309, 595, 18, 6587, 2910, 353, 486, 599, 471, 595, 18, 6587, 2910, 18, 5668, 353, 486, 599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2521, 14309, 3259, 426, 3190, 67, 5332, 6207, 10399, 67, 12, 2890, 16, 27808, 16, 2982, 4672, 309, 595, 18, 6587, 2910, 353, 486, 599, 471, 595, 18, 6587, 2910, 18, 5668, 353, 486, 599...
'%s/devel/sage/sage/gsl'%SAGE_ROOT]
'%s/devel/sage/sage/gsl/'%SAGE_ROOT]
def cblas(): if os.environ.has_key('SAGE_CBLAS'): return os.environ['SAGE_CBLAS'] elif os.path.exists('/usr/lib/libcblas.dylib') or \ os.path.exists('/usr/lib/libcblas.so'): return 'cblas' elif os.path.exists('/usr/lib/libblas.dll.a'): # untested. return 'blas' else: # This is very slow (?), but *guaranteed* to be available. return 'gslcblas'
680af831f1a5000a7ff683bc8138aeed4f096664 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/680af831f1a5000a7ff683bc8138aeed4f096664/cython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 9521, 13332, 309, 1140, 18, 28684, 18, 5332, 67, 856, 2668, 55, 2833, 67, 8876, 2534, 55, 11, 4672, 327, 1140, 18, 28684, 3292, 55, 2833, 67, 8876, 2534, 55, 3546, 1327, 1140, 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, 2875, 9521, 13332, 309, 1140, 18, 28684, 18, 5332, 67, 856, 2668, 55, 2833, 67, 8876, 2534, 55, 11, 4672, 327, 1140, 18, 28684, 3292, 55, 2833, 67, 8876, 2534, 55, 3546, 1327, 1140, 18...
self.log.info( 'No Valid Site Candidate in Mask for TaskQueueID %s' % taskQueueDict['TaskQueueID'] )
self.log.info( 'No Valid Site Candidate in Mask for TaskQueue %s' % taskQueueDict['TaskQueueID'] )
def __resolveCECandidates( self, taskQueueDict ): """ Return a list of CE's """ # assume user knows what they're doing and avoid site mask e.g. sam jobs if 'GridCEs' in taskQueueDict and taskQueueDict['GridCEs']: self.log.info( 'CEs requested by TaskQueueID %s:' % taskQueueDict['TaskQueueID'], ', '.join( taskQueueDict['GridCEs'] ) ) return taskQueueDict['GridCEs']
4fc45f848c73ccd70e55d2692551954ac266f79d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4fc45f848c73ccd70e55d2692551954ac266f79d/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 1441, 18455, 12, 365, 16, 1562, 3183, 5014, 262, 30, 3536, 2000, 279, 666, 434, 29538, 1807, 3536, 468, 6750, 729, 21739, 4121, 2898, 4565, 9957, 471, 4543, 2834, 3066, 425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1441, 18455, 12, 365, 16, 1562, 3183, 5014, 262, 30, 3536, 2000, 279, 666, 434, 29538, 1807, 3536, 468, 6750, 729, 21739, 4121, 2898, 4565, 9957, 471, 4543, 2834, 3066, 425, ...
for c in channels: print("i: %s div: %s sample: %s" % (i, c.freq_divider, ((i % c.freq_divider) == 0)))
def __read_data(self, channels): # The data in the file are interleaved, so we'll potentially have # a different amount of data to read at each time slice. # It's possible we won't have any data for some time slices, I think. # The BIOPAC engineers tell you not to even try reading interleaved # data. Wusses. # This seems to be the same for all channels, but it's not specced. # This method should prevent us from leaving data from some channels. n_guesses = [c.freq_divider*c.raw_data.shape[0] for c in channels] max_n = max(n_guesses) self.acq_file.seek(self.data_start_offset) for i in xrange(max_n): for c in channels: print("i: %s div: %s sample: %s" % (i, c.freq_divider, ((i % c.freq_divider) == 0))) sample_channels = [c for c in channels if i % c.freq_divider == 0] slice_fmt = self.byte_order_flag+''.join( [c.fmt_str for c in sample_channels]) data = self.acq_file.read(struct.calcsize(slice_fmt)) samples = struct.unpack(slice_fmt, data) for chan, samp in zip(sample_channels, samples): d_index = i//chan.freq_divider print("Writing to %s of %s" % (d_index, chan.raw_data.shape[0])) chan.raw_data[d_index] = samp
7bf81078d32e50b829f18dbc2185efc9f76088eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14571/7bf81078d32e50b829f18dbc2185efc9f76088eb/readers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 892, 12, 2890, 16, 5750, 4672, 468, 1021, 501, 316, 326, 585, 854, 1554, 22593, 16, 1427, 732, 5614, 13935, 1240, 468, 279, 3775, 3844, 434, 501, 358, 855, 622, 1517, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 892, 12, 2890, 16, 5750, 4672, 468, 1021, 501, 316, 326, 585, 854, 1554, 22593, 16, 1427, 732, 5614, 13935, 1240, 468, 279, 3775, 3844, 434, 501, 358, 855, 622, 1517, 81...
if mode != "r": name = tarname
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14136, 3190, 12, 6429, 16, 508, 16, 1965, 1546, 86, 3113, 17041, 33, 7036, 16, 8099, 2815, 33, 29, 4672, 3536, 3678, 10331, 8968, 8232, 5052, 508, 364, 6453, 578, 7410, 18, 6181, 310, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14136, 3190, 12, 6429, 16, 508, 16, 1965, 1546, 86, 3113, 17041, 33, 7036, 16, 8099, 2815, 33, 29, 4672, 3536, 3678, 10331, 8968, 8232, 5052, 508, 364, 6453, 578, 7410, 18, 6181, 310, ...
sage: q.list()
sage: q.list()
def data_to_list(out, n, time): """ Convert output of Hart's sieve and n to a list and time. INPUT: out -- snapshot of text output of Hart's QuadraticSieve program n -- the integer being factored OUTPUT: list -- proper factors found so far str -- time information """ i = out.find('FACTORS:') if i == -1: return [], '', out # whole thing else: verbose = out[:i] out = out[i+len('FACTORS:')+1:].strip() if time: w = out.split('\n') for i in range(len(w)): if 'user' in w[i]: break if i < len(w): t = w[i].strip() out = '\n'.join([w[j] for j in range(i)]) else: t = '' else: t = '' Z = sage.rings.integer.Integer v = out.split() v = list(set([Z(m) for m in v if Z(m) != n])) v.sort() return v, t, verbose
caf0cbc81931ed8855bdc038fd4b579584acb400 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/caf0cbc81931ed8855bdc038fd4b579584acb400/qsieve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 869, 67, 1098, 12, 659, 16, 290, 16, 813, 4672, 3536, 4037, 876, 434, 670, 485, 1807, 272, 21271, 471, 290, 358, 279, 666, 471, 813, 18, 225, 12943, 30, 596, 1493, 4439, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 869, 67, 1098, 12, 659, 16, 290, 16, 813, 4672, 3536, 4037, 876, 434, 670, 485, 1807, 272, 21271, 471, 290, 358, 279, 666, 471, 813, 18, 225, 12943, 30, 596, 1493, 4439, 434...
AssembleOnHost = False CopyAssemblyToTarget = True if StringTagged(Target, "VMS"):
AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget if StringTagged(Target, "VMS") and AssembleOnTarget:
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") if Config == "ALPHA32_VMS": Compile = "cc " elif Config == "ALPHA64_VMS": Compile = "cc /pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": Compile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " else: Compile = { "I386_INTERIX" : "gcc -g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "/usr/sfw/bin/gcc -g ", # -fPIC? }.get(Config) or "gcc -g -fPIC " Compile = Compile + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "SOLsun" : " -xarch=v8plus ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = Compile + " *.mo *.io *.o " if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # not in Link if not StringTagged(Config, "VMS"): Compile += " -c " AssembleOnHost = False CopyAssemblyToTarget = True if StringTagged(Target, "VMS"): Assemble = "macro /alpha " elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32_")): Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: Compile = GnuPlatformPrefix + Compile Link = GnuPlatformPrefix + Link Assemble = GnuPlatformPrefix + Assemble if vms and AssembleOnHost: Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at end # Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = [ ] Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("Assemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for a in [Make]: a.write("Assemble=\"" + Assemble + "\"\nCompile=\"" + Compile + "\"\nLink=\"" + Link + "\"\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".mi") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or CopyAssemblyToTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) Objects += [Object] if vms: if ext_c: VmsMake.write(Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = Assemble + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write(Assemble + " " + a + "\n") continue Makefile.write("Objects=$(Objects) " + Object + "\n" + Object + ": " + a + "\n\t") if ext_c: Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("$(" + Command + ") " + a + " -o " + Object + "\n") Makefile.write("cm3: $(Objects)\n\t") VmsMake.write("link /executable=cm3.exe ") for a in Objects: VmsMake.write(a + " ") VmsMake.write("\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() _MakeArchive(BootDir[2:])
d4000ec74e6d57a15fc1c20dc9234349ed4e61e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/d4000ec74e6d57a15fc1c20dc9234349ed4e61e4/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
m=re.match(" *(\w+)(.*)", txt)
m=re.match(" *(\w+)(.*)", txt, re.DOTALL)
def _split_tag(txt): m=re.match(" *(\w+)(.*)", txt) assert m is not None, "could not match tag name" name = m.group(1) values = m.group(2) return name, values
aa9896e54d168d10161d1b6ff55ea1c344c75d4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/aa9896e54d168d10161d1b6ff55ea1c344c75d4b/utoken.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 67, 2692, 12, 5830, 4672, 312, 33, 266, 18, 1916, 2932, 380, 4713, 91, 6975, 7444, 2225, 16, 6463, 16, 283, 18, 17591, 4685, 13, 1815, 312, 353, 486, 599, 16, 315, 15195, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4939, 67, 2692, 12, 5830, 4672, 312, 33, 266, 18, 1916, 2932, 380, 4713, 91, 6975, 7444, 2225, 16, 6463, 16, 283, 18, 17591, 4685, 13, 1815, 312, 353, 486, 599, 16, 315, 15195, ...
x=urllib.unquote(str(percentname))
x = urllib.unquote(str(percentname))
def url2unicode(percentname, site): # Does the input string contain non-ascii characters? In that case, # it is not really an url, and we do not have to unquote it.... for c in percentname: if ord(c)>128: x=percentname break else: # Before removing the % encoding, make sure it is an ASCII string. # unquote doesn't work on unicode strings. x=urllib.unquote(str(percentname)) #print "DBG> ",language,repr(percentname),repr(x) for encoding in site.encodings(): try: x = x.encode(encoding) return x except: pass raise UnicodeError("Could not decode %s" % repr(percentname))
31ab56fe544dc7fee708c6c5976f3138512d6894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/31ab56fe544dc7fee708c6c5976f3138512d6894/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 22, 9124, 12, 8849, 529, 16, 2834, 4672, 468, 9637, 326, 810, 533, 912, 1661, 17, 9184, 3949, 35, 657, 716, 648, 16, 468, 518, 353, 486, 8654, 392, 880, 16, 471, 732, 741, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 22, 9124, 12, 8849, 529, 16, 2834, 4672, 468, 9637, 326, 810, 533, 912, 1661, 17, 9184, 3949, 35, 657, 716, 648, 16, 468, 518, 353, 486, 8654, 392, 880, 16, 471, 732, 741, 486, ...
if s[0] in ('-', '+'):
if s[:1] in ('-', '+'):
def zfill(x, width): """zfill(x, width) -> string Pad a numeric string x with zeros on the left, to fill a field of the specified width. The string x is never truncated. """ if type(x) == type(''): s = x else: s = `x` n = len(s) if n >= width: return s sign = '' if s[0] in ('-', '+'): sign, s = s[0], s[1:] return sign + '0'*(width-n) + s
1b7aec35c43360ed1ec699458cc103e3223aac14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b7aec35c43360ed1ec699458cc103e3223aac14/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 998, 5935, 12, 92, 16, 1835, 4672, 3536, 94, 5935, 12, 92, 16, 1835, 13, 317, 533, 225, 30961, 279, 6389, 533, 619, 598, 4922, 603, 326, 2002, 16, 358, 3636, 279, 652, 434, 326, 1269...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 998, 5935, 12, 92, 16, 1835, 4672, 3536, 94, 5935, 12, 92, 16, 1835, 13, 317, 533, 225, 30961, 279, 6389, 533, 619, 598, 4922, 603, 326, 2002, 16, 358, 3636, 279, 652, 434, 326, 1269...
raise apache.SERVER_RETURN, apache.HTTP_UNAUTHORIZED
user_info = collect_user_info(req) (auth_code, auth_msg) = acc_authorize_action(user_info, VIEWRESTRCOLL, collection=coll) if auth_code: cookie = mail_cookie_create_authorize_action(VIEWRESTRCOLL, {'collection' : coll}) target = CFG_SITE_SECURE_URL + '/youraccount/login' + \ make_canonical_urlargd({'action' : cookie, 'ln' : argd['ln'], 'referer' : CFG_SITE_URL + req.unparsed_uri}, {}) return redirect_to_url(req, target)
def __call__(self, req, form): """RSS 2.0 feed service."""
7316fb75da82294741c73b0aeb6718e4a822d5b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/7316fb75da82294741c73b0aeb6718e4a822d5b3/websearch_webinterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1111, 16, 646, 4672, 3536, 31211, 576, 18, 20, 4746, 1156, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1111, 16, 646, 4672, 3536, 31211, 576, 18, 20, 4746, 1156, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.list.append(getConfigListEntry(_("New pin"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Reenter new pin"), NoSave(self.pin2)))
self.list.append(getConfigListEntry(_("New PIN"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Reenter new PIN"), NoSave(self.pin2)))
def __init__(self, session, pin, pinname): Screen.__init__(self, session) # for the skin: first try ParentalControlChangePin, then Setup, this allows individual skinning self.skinName = ["ParentalControlChangePin", "Setup" ] self.setup_title = _("Change pin code") self.onChangedEntry = [ ]
912a4c273438b3b7afb7cbbdcae3372ea9e489c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/912a4c273438b3b7afb7cbbdcae3372ea9e489c2/ParentalControlSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 7092, 16, 7092, 529, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 468, 364, 326, 18705, 30, 1122, 775, 9520, 287, 3367, 3043, 12178, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1339, 16, 7092, 16, 7092, 529, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 468, 364, 326, 18705, 30, 1122, 775, 9520, 287, 3367, 3043, 12178, ...
cmd_func = getattr(handler, cmd) cmd_func()
def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion (since in this case we have 1) cmd = completions[0] # build up the first part of the map (for illustrative purposes) cmd_map = list() if cmd_arg != cmd: cmd_map.append(cmd_arg) cmd_map.append(cmd) # map an alias to the command, and build up the map if cmd in cmd_alias_dict.keys(): alias = cmd if cmd_arg == cmd: cmd_map.append(alias) cmd = cmd_alias_dict[cmd] cmd_map.append(cmd) # show command map to avoid confusion if len(cmd_map) != 0: print 'Mapping command: %s' % ' -> '.join(cmd_map) # pass args and optarg data to command handler, which figures out # how to handle the arguments optarg_data = cmd_dict[cmd] handler = commands.CommandHandler(argv[2:], optarg_data) # use reflection to get the function pointer cmd_func = getattr(handler, cmd) cmd_func() return 0 else: print ( 'Command `%s` too ambiguous, ' 'could mean any of: %s' ) % (cmd_arg, ', '.join(completions)) else: if len(argv) == 1: print 'No command specified, showing usage.\n' else: print 'Command not recognised: %s\n' % cmd_arg commands.usage(argv[2:]) # generic error code if not returned sooner return 1
42ce2fdf18b769d6d568447ff569276e0f22919f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7412/42ce2fdf18b769d6d568447ff569276e0f22919f/hm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4172, 12, 19485, 4672, 225, 1797, 67, 3175, 273, 875, 309, 562, 12, 19485, 13, 405, 404, 30, 1797, 67, 3175, 273, 5261, 63, 21, 65, 225, 468, 2549, 2975, 2809, 833, 358, 280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4172, 12, 19485, 4672, 225, 1797, 67, 3175, 273, 875, 309, 562, 12, 19485, 13, 405, 404, 30, 1797, 67, 3175, 273, 5261, 63, 21, 65, 225, 468, 2549, 2975, 2809, 833, 358, 280...
A rank zero example: sage: EllipticCurve('11a').padic_regulator(3) 1 + O(3^20) ???
def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic regulator of this curve.
f06b34a4df7347d15a5cc8350a6afab53e4b6cae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f06b34a4df7347d15a5cc8350a6afab53e4b6cae/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 1574, 11775, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 1574, 11775, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 2072, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, ...
test_v_member = VoluntaryMemberData.john_smith()
test_v_member = VoluntaryMemberData.JohnSmith()
def test_inherinting(self): """ Test that `VoluntaryMember` model inherit from `Person` model.""" test_v_member = VoluntaryMemberData.john_smith() person = meta.Session.query(model.Person).filter_by(last_name=test_v_member.last_name).one() v_member = meta.Session.query(model.VoluntaryMember).filter_by(last_name=test_v_member.last_name).one() assert person == v_member
1138f0b9005f2d9dd3c9ba6103fb3b44db0128b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6029/1138f0b9005f2d9dd3c9ba6103fb3b44db0128b0/test_voluntary_member.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 267, 1614, 474, 310, 12, 2890, 4672, 3536, 7766, 716, 1375, 17431, 10032, 814, 4419, 68, 938, 6811, 628, 1375, 8346, 68, 938, 12123, 1842, 67, 90, 67, 5990, 273, 26861, 10032, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 267, 1614, 474, 310, 12, 2890, 4672, 3536, 7766, 716, 1375, 17431, 10032, 814, 4419, 68, 938, 6811, 628, 1375, 8346, 68, 938, 12123, 1842, 67, 90, 67, 5990, 273, 26861, 10032, ...
shapes="dfn,dfd,nc", extradoc="""
shapes="dfn, dfd, nc", extradoc="""
def _stats(self, dfn, dfd, nc): mu = where(dfd <= 2, inf, dfd / (dfd-2.0)*(1+nc*1.0/dfn)) mu2 = where(dfd <=4, inf, 2*(dfd*1.0/dfn)**2.0 * \ ((dfn+nc/2.0)**2.0 + (dfn+nc)*(dfd-2.0)) / \ ((dfd-2.0)**2.0 * (dfd-4.0))) return mu, mu2, None, None
48ba19baad4689b1adfc686887dc76e1a520ab52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/48ba19baad4689b1adfc686887dc76e1a520ab52/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5296, 12, 2890, 16, 3013, 82, 16, 3013, 72, 16, 8194, 4672, 4129, 273, 1625, 12, 2180, 72, 1648, 576, 16, 8286, 16, 3013, 72, 342, 261, 2180, 72, 17, 22, 18, 20, 17653, 12, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5296, 12, 2890, 16, 3013, 82, 16, 3013, 72, 16, 8194, 4672, 4129, 273, 1625, 12, 2180, 72, 1648, 576, 16, 8286, 16, 3013, 72, 342, 261, 2180, 72, 17, 22, 18, 20, 17653, 12, 21...
if config.has_option('stgit', 'authname') \ and config.has_option('stgit', 'authemail'):
if config.has_option('stgit', 'sender'): return config.get('stgit', 'sender') elif config.has_option('stgit', 'authname') \ and config.has_option('stgit', 'authemail'):
def __get_maintainer(): """Return the 'authname <authemail>' string as read from the configuration file """ if config.has_option('stgit', 'authname') \ and config.has_option('stgit', 'authemail'): return '%s <%s>' % (config.get('stgit', 'authname'), config.get('stgit', 'authemail')) else: return None
901288c20717c357bfd7b640fbd2e3d24d4b636b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/901288c20717c357bfd7b640fbd2e3d24d4b636b/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 81, 1598, 1521, 13332, 3536, 990, 326, 296, 1944, 529, 411, 1944, 3652, 1870, 533, 487, 855, 628, 326, 1664, 585, 3536, 309, 642, 18, 5332, 67, 3482, 2668, 334, 6845, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 81, 1598, 1521, 13332, 3536, 990, 326, 296, 1944, 529, 411, 1944, 3652, 1870, 533, 487, 855, 628, 326, 1664, 585, 3536, 309, 642, 18, 5332, 67, 3482, 2668, 334, 6845, 21...
an "all" model group for which every alternative is optional.
an "all" model group for which every alternative is effectively optional.
def allowsEpsilonTransitionToFinal (self): """Determine whether it is possible to reach a final state by taking this transition.
769a032a108451e14c099738354e54873c1e98d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/769a032a108451e14c099738354e54873c1e98d7/content.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5360, 29889, 10327, 8850, 774, 7951, 261, 2890, 4672, 3536, 8519, 2856, 518, 353, 3323, 358, 9287, 279, 727, 919, 635, 13763, 333, 6007, 18, 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, 0, 0, 0, 0, 0, 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, 5360, 29889, 10327, 8850, 774, 7951, 261, 2890, 4672, 3536, 8519, 2856, 518, 353, 3323, 358, 9287, 279, 727, 919, 635, 13763, 333, 6007, 18, 2, -100, -100, -100, -100, -100, -100, -100, ...
security.declareProtected(PERMISSION_PUBLISH_OBJECTS, 'admin_editrole_html')
def admin_deleteusers(self, names=[], REQUEST=None): """ """ self.getAuthenticationTool().manage_delUsers(names) if REQUEST: self.setSessionInfoTrans(MESSAGE_SAVEDCHANGES, date=self.utGetTodayDate()) REQUEST.RESPONSE.redirect(REQUEST.environ.get('HTTP_REFERER', '%s/admin_users_html' % self.absolute_url()))
2804ba95bf10bb6d5df2326266429ebdabdc7d77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/2804ba95bf10bb6d5df2326266429ebdabdc7d77/NySite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 3733, 5577, 12, 2890, 16, 1257, 22850, 6487, 12492, 33, 7036, 4672, 3536, 3536, 365, 18, 588, 6492, 6364, 7675, 12633, 67, 3771, 6588, 12, 1973, 13, 309, 12492, 30, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 3733, 5577, 12, 2890, 16, 1257, 22850, 6487, 12492, 33, 7036, 4672, 3536, 3536, 365, 18, 588, 6492, 6364, 7675, 12633, 67, 3771, 6588, 12, 1973, 13, 309, 12492, 30, 365, 18, ...
command = 'upnpc -r %s tcp'
command = 'upnpc -r $ tcp'
def miniupnpcbinary(internallanport, externallanport): if internallanport != externallanport: log.addWarning(_('UPnPc binary cannot be used since the internal port (%s) is not identical to the external port (%s)') % (internallanport, externallanport)) command = 'upnpc -r %s tcp' try: output = executeCommand(command, returnoutput=True) except RuntimeError, e: log.addwarning('Failed to use UPnPc binary: %s' % (str(e),)) return for line in output.split('\n'): # "external %s:%s %s is redirected to internal %s:%s\n" if line.startswith("external ") and line.find(" is redirected to internal ") > -1: lst = line.split() external = lst[1].split(':') #internal = lst[7].split(':') try: return (external[0], int(external[1])) except (ValueError, IndexError): log.addwarning(_('UPnPc binary failed, could not decompose %s into IP and port.') % (external)) return None log.addwarning('UPnPc binary failed, could not parse output: %s' % (output,)) return None
fba39e22bd609963d00667cbf6896be4edcd9fdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/fba39e22bd609963d00667cbf6896be4edcd9fdc/upnp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21959, 416, 82, 2436, 8578, 12, 267, 798, 454, 304, 655, 16, 18885, 454, 304, 655, 4672, 309, 8216, 454, 304, 655, 480, 18885, 454, 304, 655, 30, 613, 18, 1289, 6210, 24899, 2668, 3079...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21959, 416, 82, 2436, 8578, 12, 267, 798, 454, 304, 655, 16, 18885, 454, 304, 655, 4672, 309, 8216, 454, 304, 655, 480, 18885, 454, 304, 655, 30, 613, 18, 1289, 6210, 24899, 2668, 3079...
'cur_admin') if request.COOKIES.get(x, False)]) modified_cookies = True
'cur_admin') if request.COOKIES.get(x, False)] map(response.delete_cookie, cookies_to_delete) modified_cookies = (len(cookies_to_delete) > 0)
def process_response(self, request, response): from esp.users.models import ESPUser modified_cookies = False
f4cfb0e8ca47c638e734ccb74d7f6d85b80bc5f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/f4cfb0e8ca47c638e734ccb74d7f6d85b80bc5f6/espauthmiddleware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2740, 12, 2890, 16, 590, 16, 766, 4672, 628, 5001, 84, 18, 5577, 18, 7665, 1930, 512, 3118, 1299, 4358, 67, 16240, 273, 1083, 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, 1207, 67, 2740, 12, 2890, 16, 590, 16, 766, 4672, 628, 5001, 84, 18, 5577, 18, 7665, 1930, 512, 3118, 1299, 4358, 67, 16240, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -10...
Rational Homology of Jacobian of the modular curve associated to the congruence subgroup Gamma0(37)
Rational Homology of Abelian variety J0(37) of dimension 2
def rational_homology(self): """ Return the rational homology of this modular abelian variety.
62147d82541f9aed0900f78cd10df5f262f228f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62147d82541f9aed0900f78cd10df5f262f228f5/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 8371, 67, 17125, 4676, 12, 2890, 4672, 3536, 2000, 326, 436, 8371, 13995, 4676, 434, 333, 681, 2490, 1223, 292, 2779, 1394, 14369, 18, 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, 0, 0, 0, 0, 0, 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, 436, 8371, 67, 17125, 4676, 12, 2890, 4672, 3536, 2000, 326, 436, 8371, 13995, 4676, 434, 333, 681, 2490, 1223, 292, 2779, 1394, 14369, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
except ValueError: pass done[name] = string.strip(value)
except ValueError: done[name] = string.strip(value) else: done[name] = value
def parse_makefile(fn, g=None): """Parse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. """ from distutils.text_file import TextFile fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1) if g is None: g = {} done = {} notdone = {} while 1: line = fp.readline() if line is None: # eof break m = _variable_rx.match(line) if m: n, v = m.group(1, 2) v = string.strip(v) if "$" in v: notdone[n] = v else: try: v = string.atoi(v) except ValueError: pass done[n] = v # do variable interpolation here while notdone: for name in notdone.keys(): value = notdone[name] m = _findvar1_rx.search(value) or _findvar2_rx.search(value) if m: n = m.group(1) if done.has_key(n): after = value[m.end():] value = value[:m.start()] + done[n] + after if "$" in after: notdone[name] = value else: try: value = string.atoi(value) except ValueError: pass done[name] = string.strip(value) del notdone[name] elif notdone.has_key(n): # get it on a subsequent round pass else: done[n] = "" after = value[m.end():] value = value[:m.start()] + after if "$" in after: notdone[name] = value else: try: value = string.atoi(value) except ValueError: pass done[name] = string.strip(value) del notdone[name] else: # bogus variable reference; just drop it since we can't deal del notdone[name] fp.close() # save the results in the global dictionary g.update(done) return g
f70d94b63b2bda65a820b8e360e07a3701048dbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f70d94b63b2bda65a820b8e360e07a3701048dbb/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6540, 768, 12, 4293, 16, 314, 33, 7036, 4672, 3536, 3201, 279, 4344, 768, 17, 4060, 585, 18, 225, 432, 3880, 4191, 508, 19, 1132, 5574, 353, 2106, 18, 225, 971, 392, 3129, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 768, 12, 4293, 16, 314, 33, 7036, 4672, 3536, 3201, 279, 4344, 768, 17, 4060, 585, 18, 225, 432, 3880, 4191, 508, 19, 1132, 5574, 353, 2106, 18, 225, 971, 392, 3129, ...
if len( sys.argv ) <= 1: print HELP_STR
if len( sys.argv ) <= 1: print HELP_STR return
def main(): global HELP_STR mode = 'exec' if len( sys.argv ) <= 1: print HELP_STR else: if sys.argv[1] == '--print-only': mode = 'print' if len( sys.argv ) <= 2: print HELP_STR else: wm_name = sys.argv[2] start_idx = 2 else: wm_name = sys.argv[1] start_idx = 1 new_args = process( start_idx ) result_str = wm_name + ' ' + ' '.join( new_args ) if mode == 'print': print result_str else: print 'running "' + result_str + '"' os.system( result_str )
bbb1218fa2c6ae49ede784851646ba9c3fa589b8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/255/bbb1218fa2c6ae49ede784851646ba9c3fa589b8/old2new.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 22557, 52, 67, 3902, 1965, 273, 296, 4177, 11, 309, 562, 12, 2589, 18, 19485, 262, 1648, 404, 30, 1172, 22557, 52, 67, 3902, 327, 469, 30, 309, 2589, 18, 19485, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 22557, 52, 67, 3902, 1965, 273, 296, 4177, 11, 309, 562, 12, 2589, 18, 19485, 262, 1648, 404, 30, 1172, 22557, 52, 67, 3902, 327, 469, 30, 309, 2589, 18, 19485, 63, ...
'test_cmath.py' : TestDecl(False, UnknownTestModule),
'test_cmath.py' : TestDecl(False, RunningModule),
def __init__(self, enabled, testclass, modified=False): self.enabled = enabled self.testclass = testclass self.modified = modified
5e13baa0cc8c6f264d8b49b286eeec1f1972c9e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/5e13baa0cc8c6f264d8b49b286eeec1f1972c9e8/conftest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3696, 16, 1842, 1106, 16, 4358, 33, 8381, 4672, 365, 18, 5745, 273, 3696, 365, 18, 3813, 1106, 273, 1842, 1106, 365, 18, 7342, 273, 4358, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3696, 16, 1842, 1106, 16, 4358, 33, 8381, 4672, 365, 18, 5745, 273, 3696, 365, 18, 3813, 1106, 273, 1842, 1106, 365, 18, 7342, 273, 4358, 2, -100, -100, ...
else: exists = 0
def editCSVAction(self): ''' Performs an edit of all of a class' items in one go.
b770226c324aa7d3e3245d17d5e8056798231fa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b770226c324aa7d3e3245d17d5e8056798231fa4/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 16570, 1803, 12, 2890, 4672, 9163, 27391, 392, 3874, 434, 777, 434, 279, 667, 11, 1516, 316, 1245, 1960, 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, 3874, 16570, 1803, 12, 2890, 4672, 9163, 27391, 392, 3874, 434, 777, 434, 279, 667, 11, 1516, 316, 1245, 1960, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def initserver(configuration,log):
def initialize(configuration,log):
def initserver(configuration,log): # define the global variables used by the server global logger, max_bytes, xmlparser, dbobj, xmlparser, lwtparser, rls # initialize the logger logger = log log.info("Initializing server module %s" % __name__ ) # initialize the database hash table dbobj = ldbd.LIGOMetadataDatabase(configuration['dbname']) max_bytes = configuration['max_client_byte_string'] # create the xml and ligolw parsers xmlparser = pyRXP.Parser() lwtparser = ldbd.LIGOLwParser() # open a connection to the rls server rls_server = configuration['rls'] cert = configuration['certfile'] key = configuration['keyfile'] rls = rlsClient.RlsClient(rls_server,cert,key)
18c706c85d2fffee7566505dc234286fd2146ed0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/18c706c85d2fffee7566505dc234286fd2146ed0/LDBDServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 7025, 16, 1330, 4672, 468, 4426, 326, 2552, 3152, 1399, 635, 326, 1438, 2552, 1194, 16, 943, 67, 3890, 16, 2025, 4288, 16, 302, 1075, 441, 16, 2025, 4288, 16, 328, 6046, 4288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 7025, 16, 1330, 4672, 468, 4426, 326, 2552, 3152, 1399, 635, 326, 1438, 2552, 1194, 16, 943, 67, 3890, 16, 2025, 4288, 16, 302, 1075, 441, 16, 2025, 4288, 16, 328, 6046, 4288...
self._cursor.execute("PRAGMA synchronous=OFF") self._cursor.execute("PRAGMA count_changes=OFF") self._cursor.execute("PRAGMA cache_size=50000")
def _open_db(self): self._db = sqlite.connect(self._dbfile)
628d3979810c70180fa10aa91c520300076f8f95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11722/628d3979810c70180fa10aa91c520300076f8f95/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3190, 67, 1966, 12, 2890, 4672, 365, 6315, 1966, 273, 16184, 18, 3612, 12, 2890, 6315, 1966, 768, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3190, 67, 1966, 12, 2890, 4672, 365, 6315, 1966, 273, 16184, 18, 3612, 12, 2890, 6315, 1966, 768, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
default_json = os.path.join('tool', 'default.json')
default_json = 'tool' + '/' + 'default.json'
def CreateNewDemoJson(): source = "" build = "" scategories = {} bcategories = {} fJSON = "./config.demo.new.json" # Pre-processing JSON = open(fJSON,"w") JSON.write('// This file is dynamically created by the generator!\n') JSON.write('{\n') # top-level includes default_json = os.path.join('tool', 'default.json') assert os.path.isfile(default_json) JSON.write(' "include": [ { "path" : "%s" } ],\n' % default_json) # per-demo template file json_tmpl = open(os.path.join('tool','tmpl.new.json'),"rU").read() # jobs section JSON.write(' "jobs":\n') JSON.write(' {\n') # Process demo html files while True: html = (yield) #print html if html == None: # terminate the generator part and go to finalizing json file break category, name = demoCategoryFromFile(html) #print ">>> Processing: %s.%s..." % (category, name) # build classname simple = "%s.%s" % (category,name) source = source + ' "source-%s",' % simple build = build + ' "build-%s",' % simple if not category in scategories: scategories[category] = "" scategories[category] += ' "source-%s",' % (simple,) if not category in bcategories: bcategories[category] = "" bcategories[category] += ' "build-%s",' % (simple,) # concat all currcont = json_tmpl.replace('XXX',"%s.%s"%(category,name)).replace("YYY",name).replace("ZZZ",category) JSON.write("%s," % currcont[:-1]) JSON.write("\n\n\n") # Post-processing for category in scategories: JSON.write(""" "source-%s" : { "run" : [ %s] },\n\n""" % (category, scategories[category][:-1])) JSON.write(""" "build-%s" : { "run" : [ %s] },\n\n""" % (category, bcategories[category][:-1])) JSON.write(""" "source" : { "run" : [ %s] },\n\n""" % source[:-1] ) JSON.write(""" "build" : { "run" : [ %s] }\n }\n}""" % build[:-1] ) JSON.close() yield # final yield to provide for .send(None) of caller
e0d068d90547f08aad6a882d7b8b5c3e8bfbdd86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/e0d068d90547f08aad6a882d7b8b5c3e8bfbdd86/gendata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1908, 27126, 3185, 13332, 1084, 273, 1408, 1361, 225, 273, 1408, 888, 4030, 273, 2618, 6533, 4030, 273, 2618, 284, 2986, 273, 25165, 1425, 18, 27928, 18, 2704, 18, 1977, 6, 225, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1908, 27126, 3185, 13332, 1084, 273, 1408, 1361, 225, 273, 1408, 888, 4030, 273, 2618, 6533, 4030, 273, 2618, 284, 2986, 273, 25165, 1425, 18, 27928, 18, 2704, 18, 1977, 6, 225, 46...
return _wolfpack.allitemsserials()
return _wolfpack.allcharsserials()
def allcharsserials(): return _wolfpack.allitemsserials()
6dcf7b8ddb92446376d5fcb69c3b1ed50f842162 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/6dcf7b8ddb92446376d5fcb69c3b1ed50f842162/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 7549, 8818, 87, 13332, 327, 389, 91, 355, 74, 2920, 18, 454, 7549, 8818, 87, 1435, 565, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 7549, 8818, 87, 13332, 327, 389, 91, 355, 74, 2920, 18, 454, 7549, 8818, 87, 1435, 565, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
c.post('/notifications/', {'notify_check': u'true'})
response = c.post('/notifications/', {'notif_id': u'workspace_notify_check', 'workspace_notify_check': u'workspace_notify_check', })
def test_global_notification(self): c = Client() c.login(username='user1', password='test') print Notification.objects.all()
49e101e027e0e51faa1d68f1071b2c9fb88130eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5622/49e101e027e0e51faa1d68f1071b2c9fb88130eb/test_notifications.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6347, 67, 9927, 12, 2890, 4672, 276, 273, 2445, 1435, 276, 18, 5819, 12, 5053, 2218, 1355, 21, 2187, 2201, 2218, 3813, 6134, 1172, 8050, 18, 6911, 18, 454, 1435, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6347, 67, 9927, 12, 2890, 4672, 276, 273, 2445, 1435, 276, 18, 5819, 12, 5053, 2218, 1355, 21, 2187, 2201, 2218, 3813, 6134, 1172, 8050, 18, 6911, 18, 454, 1435, 2, -100, -10...
_remove_expected_call_re = re.compile(r' EXPECT_CALL.*?;\n', re.S)
def Close(self): self.Write("#endif // %s\n\n" % self.guard) CWriter.Close(self)
b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3527, 12, 2890, 4672, 365, 18, 3067, 2932, 7, 409, 430, 225, 368, 738, 87, 64, 82, 64, 82, 6, 738, 365, 18, 24594, 13, 385, 2289, 18, 4605, 12, 2890, 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, 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, 3527, 12, 2890, 4672, 365, 18, 3067, 2932, 7, 409, 430, 225, 368, 738, 87, 64, 82, 64, 82, 6, 738, 365, 18, 24594, 13, 385, 2289, 18, 4605, 12, 2890, 13, 2, -100, -100, -100, -100,...
def __div__(self, other): return "D.__div__" def __rdiv__(self, other): return "D.__rdiv__" vereq(D() / C(), "D.__div__") vereq(C() / D(), "D.__rdiv__")
def __floordiv__(self, other): return "D.__floordiv__" def __rfloordiv__(self, other): return "D.__rfloordiv__" vereq(D() // C(), "D.__floordiv__") vereq(C() // D(), "D.__rfloordiv__")
def __div__(self, other): return "D.__div__"
f389c7727362321a91dbaff13b7e1cef6cbaa3d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f389c7727362321a91dbaff13b7e1cef6cbaa3d8/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2892, 972, 12, 2890, 16, 1308, 4672, 327, 315, 40, 16186, 2892, 14437, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2892, 972, 12, 2890, 16, 1308, 4672, 327, 315, 40, 16186, 2892, 14437, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
relative importance of that node to its graph. Vertices that occur on more shortest paths between other nodes have higher betweenness than nodes that occur on less.
relative importance of that vertex to its graph. Vertices that occur on more shortest paths between other vertices have higher betweenness than vertices that occur on less.
def centrality_betweenness(self, normalized=True): r""" Returns the betweenness centrality (fraction of number of shortest paths that go through each node) as a dictionary keyed by vertices. The betweenness is normalized by default to be in range (0,1). This wraps Networkx's implementation of the algorithm described in [1]. Measures of the centrality of a vertex within a graph determine the relative importance of that node to its graph. Vertices that occur on more shortest paths between other nodes have higher betweenness than nodes that occur on less. INPUT: normalized -- boolean (default True) - if set to False, result is not normalized. REFERENCE: [1] Ulrik Brandes. (2003). Faster Evaluation of Shortest-Path Based Centrality Indices. [Online] Available: http://citeseer.nj.nec.com/brandes00faster.html EXAMPLES: sage: (graphs.ChvatalGraph()).centrality_betweenness() {0: 0.069696969696969688, 1: 0.069696969696969688, 2: 0.060606060606060601, 3: 0.060606060606060601, 4: 0.069696969696969688, 5: 0.069696969696969688, 6: 0.060606060606060601, 7: 0.060606060606060601, 8: 0.060606060606060601, 9: 0.060606060606060601, 10: 0.060606060606060601, 11: 0.060606060606060601} sage: (graphs.ChvatalGraph()).centrality_betweenness(normalized=False) {0: 7.6666666666666661, 1: 7.6666666666666661, 2: 6.6666666666666661, 3: 6.6666666666666661, 4: 7.6666666666666661, 5: 7.6666666666666661, 6: 6.6666666666666661, 7: 6.6666666666666661, 8: 6.6666666666666661, 9: 6.6666666666666661, 10: 6.6666666666666661, 11: 6.6666666666666661} sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.centrality_betweenness() {0: 0.16666666666666666, 1: 0.16666666666666666, 2: 0.0, 3: 0.0}
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 8230, 7919, 67, 15019, 4496, 12, 2890, 16, 5640, 33, 5510, 4672, 436, 8395, 2860, 326, 3086, 4496, 276, 8230, 7919, 261, 16744, 434, 1300, 434, 20579, 2953, 716, 1960, 3059, 1517, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 8230, 7919, 67, 15019, 4496, 12, 2890, 16, 5640, 33, 5510, 4672, 436, 8395, 2860, 326, 3086, 4496, 276, 8230, 7919, 261, 16744, 434, 1300, 434, 20579, 2953, 716, 1960, 3059, 1517, 7...
self._test_args)
self._test_args, self._target)
def run(self): proc = StartTestShell(self._command, self._shell_args + [self._test_uri]) self._single_test_failures = ProcessOutput(proc, self._filename, self._test_uri, self._test_types, self._test_args)
f8bddcfb577500d541351efa8986cc89d8859d02 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/f8bddcfb577500d541351efa8986cc89d8859d02/test_shell_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 5418, 273, 3603, 4709, 13220, 12, 2890, 6315, 3076, 16, 365, 6315, 10304, 67, 1968, 397, 306, 2890, 6315, 3813, 67, 1650, 5717, 365, 6315, 7526, 67, 3813, 67, 26268...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 5418, 273, 3603, 4709, 13220, 12, 2890, 6315, 3076, 16, 365, 6315, 10304, 67, 1968, 397, 306, 2890, 6315, 3813, 67, 1650, 5717, 365, 6315, 7526, 67, 3813, 67, 26268...
DeprecationWarning, 2)
DeprecationWarning, 3)
def nested(*managers): """Support multiple context managers in a single with-statement. Code like this: with nested(A, B, C) as (X, Y, Z): <body> is equivalent to this: with A as X: with B as Y: with C as Z: <body> """ warn("With-statements now directly support multiple context managers", DeprecationWarning, 2) exits = [] vars = [] exc = (None, None, None) try: for mgr in managers: exit = mgr.__exit__ enter = mgr.__enter__ vars.append(enter()) exits.append(exit) yield vars except: exc = sys.exc_info() finally: while exits: exit = exits.pop() try: if exit(*exc): exc = (None, None, None) except: exc = sys.exc_info() if exc != (None, None, None): # Don't rely on sys.exc_info() still containing # the right information. Another exception may # have been raised and caught by an exit method raise exc[0], exc[1], exc[2]
bc0f7b59e29a33e2f5e280add22b5214ae9bbaa5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/bc0f7b59e29a33e2f5e280add22b5214ae9bbaa5/contextlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4764, 30857, 29757, 4672, 3536, 6289, 3229, 819, 21103, 316, 279, 2202, 598, 17, 11516, 18, 225, 3356, 3007, 333, 30, 225, 598, 4764, 12, 37, 16, 605, 16, 385, 13, 487, 261, 60, 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, 4764, 30857, 29757, 4672, 3536, 6289, 3229, 819, 21103, 316, 279, 2202, 598, 17, 11516, 18, 225, 3356, 3007, 333, 30, 225, 598, 4764, 12, 37, 16, 605, 16, 385, 13, 487, 261, 60, 16, ...
for v in endvars: assert v.value == expected[v], ( "Got %d, expected %d, in the variable %s" % (v.value,
for i, v in enumerate(endvars): value = cpu.get_latest_value_int(i) assert value == expected[v], ( "Got %d, expected %d, in the variable %s" % (value,
def check_random_function(r): block_length = demo_conftest.option.block_length vars = [BoxInt(r.random_integer()) for i in range(demo_conftest.option.n_vars)] valueboxes = [BoxInt(box.value) for box in vars] cpu = get_cpu() loop = TreeLoop('test_random_function') loop.inputargs = vars[:] loop.operations = [] builder = OperationBuilder(cpu, loop, vars) for i in range(block_length): r.choice(OPERATIONS).produce_into(builder, r) if builder.should_fail_by is not None: break endvars = [] for v in vars: for op in loop.operations: if v in op.args: break else: endvars.append(v) r.shuffle(endvars) loop.operations.append(ResOperation(rop.FAIL, endvars, None)) builder.print_loop() cpu.compile_operations(loop) if builder.should_fail_by is not None: endvars = builder.should_fail_by.args expected = {} for v in endvars: expected[v] = v.value for v in endvars: v.changevalue_int(-sys.maxint-1) op = cpu.execute_operations(loop, valueboxes) assert op.args == endvars for v in endvars: assert v.value == expected[v], ( "Got %d, expected %d, in the variable %s" % (v.value, expected[v], builder.names[v]) ) print ' # passed.' print
021fe482511837347f8395699b3fc80cc55a9f9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/021fe482511837347f8395699b3fc80cc55a9f9b/test_random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9188, 67, 915, 12, 86, 4672, 1203, 67, 2469, 273, 21477, 67, 591, 1222, 395, 18, 3482, 18, 2629, 67, 2469, 4153, 273, 306, 3514, 1702, 12, 86, 18, 9188, 67, 7745, 10756, 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, 866, 67, 9188, 67, 915, 12, 86, 4672, 1203, 67, 2469, 273, 21477, 67, 591, 1222, 395, 18, 3482, 18, 2629, 67, 2469, 4153, 273, 306, 3514, 1702, 12, 86, 18, 9188, 67, 7745, 10756, 364...
except Exception: logging.getLogger('report').exception()
except Exception, e: logging.getLogger('report').exception(e)
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.localcontext) except GeneratorExit: continue except Exception: logging.getLogger('report').exception() continue if n.get('rml_tag'): try: (tag,attr) = eval(n.get('rml_tag'),{}, self.localcontext) n2 = copy.deepcopy(n) n2.tag = tag n2.attrib.update(attr) yield n2 except GeneratorExit: yield n except Exception: logging.getLogger('report').exception() yield n else: yield n continue if self and self.localcontext and n.get('rml_except'): try: eval(n.get('rml_except'), {}, self.localcontext) except GeneratorExit: continue except Exception: logging.getLogger('report').exception() continue if self and self.localcontext and n.get('rml_tag'): try: (tag,attr) = eval(n.get('rml_tag'),{}, self.localcontext) n2 = copy.deepcopy(n) n2.tag = tag n2.attrib.update(attr or {}) yield n2 tagname = '' except GeneratorExit: pass except Exception: logging.getLogger('report').exception() pass if (tagname is None) or (n.tag==tagname): yield n
063875402e2bf43ec79f5860513c2958f13d1c3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/063875402e2bf43ec79f5860513c2958f13d1c3a/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2159, 16, 365, 33, 7036, 16, 25586, 33, 7036, 4672, 364, 290, 316, 756, 30, 309, 365, 471, 365, 18, 3729, 2472, 471, 290, 18, 588, 2668, 86, 781, 67, 6498, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2159, 16, 365, 33, 7036, 16, 25586, 33, 7036, 4672, 364, 290, 316, 756, 30, 309, 365, 471, 365, 18, 3729, 2472, 471, 290, 18, 588, 2668, 86, 781, 67, 6498, ...
print "x",pkt.__class__
def write(self, pkt): """accepts a either a single packet or a list of packets to be written to the dumpfile """ if self.header_done == 0: if self.linktype == None: if isinstance(pkt,Packet): print "x",pkt.__class__ linktype = LLNumTypes.get(pkt.__class__,1) else: print "xx",pkt[0].__class__ linktype = LLNumTypes.get(pkt[0].__class__,1)
c8bb4ffbf1fe5b0fc994675b25b0d3a55bdab83d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/c8bb4ffbf1fe5b0fc994675b25b0d3a55bdab83d/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 11536, 4672, 3536, 9436, 87, 279, 3344, 279, 2202, 4414, 578, 279, 666, 434, 12640, 358, 506, 5941, 358, 326, 4657, 768, 3536, 225, 309, 365, 18, 3374, 67, 8734, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 11536, 4672, 3536, 9436, 87, 279, 3344, 279, 2202, 4414, 578, 279, 666, 434, 12640, 358, 506, 5941, 358, 326, 4657, 768, 3536, 225, 309, 365, 18, 3374, 67, 8734, 42...
def test_imports():
def test_imports(context):
def test_imports(): """Test massive user accounts imports.""" os.system(DELETE + " profile --group utilisagers --del-users --no-archive") os.system(DELETE + " profile --group responsibilisateurs --del-users --no-archive") log_and_exec(GETENT + " groups --empty | cut -d\":\" -f 1 | xargs -I% " + DELETE + " group --name % --no-archive") log_and_exec(ADD + " profile --name Utilisagers --group utilisagers --comment 'profil normal créé pour la suite de tests utilisateurs'") log_and_exec(ADD + " profile --name Responsibilisateurs --group responsibilisateurs --groups cdrom,lpadmin,plugdev,audio,video,scanner,fuse --comment 'profil power user créé pour la suite de tests utilisateurs.'") log_and_exec(ADD + " users --filename ./testsuite/tests_users.csv", True, 12, comment = "You should specify a profile") log_and_exec(ADD + " users --filename ./testsuite/tests_users.csv --profile utilisagers") log_and_exec(ADD + " users --filename ./testsuite/tests_users.csv --profile utilisagers --lastname-column 1 --firstname-column 0") log_and_exec("time " + ADD + " users --filename ./testsuite/tests_users.csv --profile utilisagers --lastname-column 1 --firstname-column 0 --confirm-import") log_and_exec(ADD + " users --filename ./testsuite/tests_resps.csv --profile responsibilisateurs") log_and_exec(ADD + " users --filename ./testsuite/tests_resps.csv --profile responsibilisateurs --lastname-column 1 --firstname-column 0") log_and_exec("time " + ADD + " users --filename ./testsuite/tests_resps.csv --profile responsibilisateurs --lastname-column 1 --firstname-column 0 --confirm-import") # activer les 2 lignes suivantes pour importer 860 utilisateurs de Latresne... log_and_exec(ADD + " users --filename ./testsuite/tests_users2.csv --profile utilisagers") log_and_exec("time " + ADD + " users --filename ./testsuite/tests_users2.csv --profile utilisagers --confirm-import") os.system("sleep 5") log_and_exec(DELETE + " profile --group utilisagers --del-users --no-archive") log_and_exec(DELETE + " profile --group responsibilisateurs --del-users --no-archive") log_and_exec(GETENT + " groups --empty | cut -d\":\" -f 1 | xargs -I% " + DELETE + " group --name % --no-archive")
07cb13c975b820cb15074a8378ec89357e5846f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/07cb13c975b820cb15074a8378ec89357e5846f4/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 21350, 12, 2472, 4672, 3536, 4709, 8039, 688, 729, 9484, 10095, 12123, 225, 1140, 18, 4299, 12, 6460, 397, 315, 3042, 1493, 1655, 1709, 291, 346, 414, 540, 1493, 3771, 17, 5577...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21350, 12, 2472, 4672, 3536, 4709, 8039, 688, 729, 9484, 10095, 12123, 225, 1140, 18, 4299, 12, 6460, 397, 315, 3042, 1493, 1655, 1709, 291, 346, 414, 540, 1493, 3771, 17, 5577...
"""Takes an iterator of station annual anomaly records (*station*, *series*) and produces an iterator of urban adjustment parameters records. The urban adjustment parameters describe a two-part
"""Takes an iterator of station records and adds an attribute .urban_adjustment to urban stations, which gives urban adjustment parameters. The urban adjustment parameters describe a two-part
def urban_adjustments(anomaly_stream): """Takes an iterator of station annual anomaly records (*station*, *series*) and produces an iterator of urban adjustment parameters records. The urban adjustment parameters describe a two-part linear fit to the difference in annual anomalies between an urban station and the set of nearby rural stations. The algorithm is essentially as follows: For each urban station: 1. Find all the rural stations within a fixed radius; 2. Combine the annual anomaly series for those rural stations, in order of valid-data count; 3. Calculate a two-part linear fit for the difference between the urban annual anomalies and this combined rural annual anomaly; 4. Yield the parameters of this linear fit. If there are not enough rural stations, or the combined rural record does not have enough overlap with the urban record, try a second time for this urban station, with a larger radius. If there is still not enough data, do not produce an adjustment record. """ g.log = open('log/PApars.GHCN.CL.1000.20.log','w') full_radius = 1000.0 minimum_overlap = 20 minimum_rural_neighbors = 3 g.ncrit = 20 g.nstat = g.sumch = g.nyrs = g.nstap = g.nyrsp = g.sumchp = 0 g.nsl1 = g.nsl2 = g.ndsl = g.nswitch = g.nsw0 = g.nok = g.nokx = g.nsta = 0 g.nshort = 0 f = [0.0] * 900 x = [0.0] * 900 # Open output files for some extra logging # # Station usage stats f77 = open("log/PApars.statn.use.GHCN.CL.1000.20", "w") # Isolated urban stations f79 = open("log/PApars.noadj.stations.list", "w") last_year = giss_data.get_ghcn_last_year() iyoff = giss_data.BASE_YEAR - 1 iyrm = last_year - iyoff rural_stations = [] urban_stations = [] urban_lkup = {} pi180 = math.pi / 180.0 all = [] for record in anomaly_stream: station = record.station all.append(record) record.urban_adjustment = None anomalies = record.anomalies length = len(anomalies) # convert anomalies back from int to float; # TODO: preserve as float between annual_anomalies and here. for i in range(length): if valid(anomalies[i]): anomalies[i] *= 0.1 # throw away some precision in lat/lon for compatibility with Fortran lat = 0.1 * math.floor(station.lat * 10 + 0.5) lon = 0.1 * math.floor(station.lon * 10 + 0.5) d = Struct() d.anomalies = anomalies d.cslat = math.cos(lat * pi180) d.snlat = math.sin(lat * pi180) d.cslon = math.cos(lon * pi180) d.snlon = math.sin(lon * pi180) d.id = record.uid d.first_year = record.first - iyoff d.last_year = d.first_year + length - 1 d.uses = 0 d.station = station d.record = record if is_rural(station): rural_stations.append(d) else: urban_stations.append(d) urban_lkup[record] = d nstau = len(urban_stations) # total number of bright / urban or dim / sm.town stations nstar = len(rural_stations) # total number of dark / rural stations g.log.write(" number of rural/urban stations %11d %11d\n" % (nstar, nstau)) # Sort the rural stations according to the length of the time record # (ignoring gaps). for i, st in enumerate(rural_stations): st.recLen = len([v for v in st.anomalies if valid(v)]) st.index = i g.log.write(" rural station: %11d id: %s #ok %11d\n" % ( i + 1, st.id, st.recLen)) rural_stations.sort(key=lambda s:s.recLen) rural_stations.reverse() for i, st in enumerate(rural_stations): g.log.write(" rural station: %11d id: %s #ok %11d\n" % ( i + 1, st.id, st.recLen)) # Combine time series for rural stations around each urban station for record in all: station = record.station us = urban_lkup.get(record, None) if us is None: yield record continue iyu1 = us.first_year + iyoff - 1 # subtract 1 for a possible partial yr iyu2 = us.last_year + iyoff + 1 # add 1 for partial year usingFullRadius = False dropStation = False needNewNeighbours = True while True: if needNewNeighbours: if usingFullRadius: radius = full_radius else: radius = full_radius / 2 neighbors = get_neighbours(us, rural_stations, radius) if not neighbors: if usingFullRadius: dropStation = True g.log.write(' no rural neighbors for %s\n' % us.id) f79.write(" no rural neighbors for %s\n" % (us.id)) break usingFullRadius = True needNewNeighbours = True continue counts, urban_series, combined = combine_neighbors( us, iyrm, iyoff, neighbors, minimum_overlap) iy1 = 1 needNewNeighbours = False quorate_count, first, last, quorate_period_total, length = prepare_series( iy1, iyrm, combined, urban_series, counts, f, iyoff, x, minimum_rural_neighbors) if quorate_count < g.ncrit: if usingFullRadius: f79.write("%s good years: %4d total years: %4d" " too little rural-neighbors-overlap" " - drop station 9999\n" % ( us.id, quorate_count, last - first + 1)) dropStation = True break usingFullRadius = True needNewNeighbours = True continue if float(quorate_count) >= g.xcrit * (last - first + 1. - .1): break # not enough good years for the given range (<66%) # the - 0.1 is to prevent equality with potential uncertainty # due to hardware rounding or compiler behaviour. # nick barnes, ravenbrook limited, 2008 - 09 - 10 # try to save cases in which the gaps are in the early part: iy1 = int(last - (quorate_count - 1) / g.xcrit) if iy1 < first + 1: iy1 = first + 1 # avoid infinite loop f79.write("%s drop early years %4d-%4d\n" % ( us.id, 1 + iyoff, iy1 - 1 + iyoff)) if dropStation: yield record continue #=== c subtract urban station and call a curve fitting program fit = getfit(length, x, f) # find extended range iyxtnd = int(round(quorate_count / g.xcrit)) - (last - first + 1) g.log.write(" possible range increase %11d %11d %11d\n" % ( iyxtnd, quorate_count, last - first + 1)) n1x = first + iyoff n2x = last + iyoff if iyxtnd < 0: sys.exit('impossible') if iyxtnd > 0: lxend = iyu2 - (last + iyoff) if iyxtnd <= lxend: n2x = n2x + lxend else: n1x = n1x - (iyxtnd - lxend) if n1x < iyu1: n1x = iyu1 n2x = iyu2 flag = flags(fit, first + iyoff, last + iyoff) us.record.urban_adjustment = (fit, first + iyoff, last + iyoff, n1x, n2x, flag) yield us.record nuse = 0 for rs in rural_stations: if rs.uses > 0: f77.write(" used station %s %11d times\n" % ( rs.id, rs.uses)) nuse += 1 f77.write("%12d rural stations were used\n" % (nuse)) g.log.write(" %-10s %4d %10.7f %10.7f\n" % ( "all", g.nsta,-g.sumch/g.nsta,-10.*g.sumch/g.nyrs)) g.log.write(" %-11s %8d %10.7f %10.7f\n" % ( "urb warm", g.nstap,-g.sumchp/g.nstap,-10.*g.sumchp/g.nyrsp)) g.log.write(" %-11s %11d %11d %11d %11d %11d %11d\n" % ( "# short,sl1,sl2,dsl,ok", g.nshort,g.nsl1,g.nsl2,g.ndsl,g.nok,g.nokx)) g.log.write(" %-11s %11d %11d\n" % ("switches: all , else ok", g.nswitch,g.nsw0))
b8ca3d48ed1bf1ada1c3b9786de3fd73e2c1d845 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/b8ca3d48ed1bf1ada1c3b9786de3fd73e2c1d845/step2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8896, 21515, 67, 13362, 1346, 12, 304, 26988, 67, 3256, 4672, 3536, 11524, 392, 2775, 434, 13282, 3853, 471, 4831, 392, 1566, 263, 15850, 304, 67, 13362, 475, 358, 8896, 21515, 29719, 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, 8896, 21515, 67, 13362, 1346, 12, 304, 26988, 67, 3256, 4672, 3536, 11524, 392, 2775, 434, 13282, 3853, 471, 4831, 392, 1566, 263, 15850, 304, 67, 13362, 475, 358, 8896, 21515, 29719, 16, ...
def __init__(self, cr, module, idref, mode, report=assertion_report(), noupdate = False):
def __init__(self, cr, module, idref, mode, report=None, noupdate=False):
def __init__(self, cr, module, idref, mode, report=assertion_report(), noupdate = False): self.logger = netsvc.Logger() self.mode = mode self.module = module self.cr = cr self.idref = idref self.pool = pooler.get_pool(cr.dbname)
b4873665348979ea36c18ef7e2de400afa25c383 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/b4873665348979ea36c18ef7e2de400afa25c383/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4422, 16, 1605, 16, 612, 1734, 16, 1965, 16, 2605, 33, 7036, 16, 1158, 2725, 33, 8381, 4672, 225, 365, 18, 4901, 273, 21954, 4227, 18, 3328, 1435, 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, 12, 2890, 16, 4422, 16, 1605, 16, 612, 1734, 16, 1965, 16, 2605, 33, 7036, 16, 1158, 2725, 33, 8381, 4672, 225, 365, 18, 4901, 273, 21954, 4227, 18, 3328, 1435, 365, ...
test = ur""" """ output = ur"""<!-- self.do(test, output) def testComment03(self):
def testComment02(self): test = ur"""
929eb80dd90e5dbc5bd0f84f7b5fa023b1a444ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/929eb80dd90e5dbc5bd0f84f7b5fa023b1a444ff/test_converter_text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4469, 3103, 12, 2890, 4672, 1842, 273, 8896, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4469, 3103, 12, 2890, 4672, 1842, 273, 8896, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
title = "<span weight=\"bold\" size=\"large\">%s (%s)</span>" % (task.get_title(), len(task.get_subtasks()) )
title = "<span weight=\"bold\" size=\"large\">%s (%s)</span>" % (task.get_title(), self.__count_tasks_rec(task) )
def __build_task_title(self,task,extended=False): if extended : excerpt = task.get_excerpt(lines=2) if excerpt.strip() != "" : title = "<b><big>%s</big></b>\n<small>%s</small>" %(task.get_title(),excerpt) else : title = "<b><big>%s</big></b>" %task.get_title() else : alone = (not task.has_parents() and len(task.get_subtasks())!=0) if (not self.workview) and alone: title = "<span weight=\"bold\" size=\"large\">%s (%s)</span>" % (task.get_title(), len(task.get_subtasks()) ) else: title = task.get_title() return title
eff1b23c685275dd94a8e4d79d5592cd6a425998 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/eff1b23c685275dd94a8e4d79d5592cd6a425998/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3510, 67, 4146, 67, 2649, 12, 2890, 16, 4146, 16, 14948, 33, 8381, 4672, 309, 7021, 294, 27623, 273, 1562, 18, 588, 67, 338, 17748, 12, 3548, 33, 22, 13, 309, 27623, 18, 6406, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3510, 67, 4146, 67, 2649, 12, 2890, 16, 4146, 16, 14948, 33, 8381, 4672, 309, 7021, 294, 27623, 273, 1562, 18, 588, 67, 338, 17748, 12, 3548, 33, 22, 13, 309, 27623, 18, 6406, ...
gopt_step = int(line.split()[-1])
def extract(self, inputfile, fupdate=0.05, cupdate=0.002): """Extract information from the file object inputfile."""
49563d4a7d90ab6f08bf9f7a2f75ec878c3276bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8167/49563d4a7d90ab6f08bf9f7a2f75ec878c3276bb/jaguarparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 12, 2890, 16, 810, 768, 16, 284, 2725, 33, 20, 18, 6260, 16, 276, 2725, 33, 20, 18, 24908, 4672, 3536, 4976, 1779, 628, 326, 585, 733, 810, 768, 12123, 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, 2608, 12, 2890, 16, 810, 768, 16, 284, 2725, 33, 20, 18, 6260, 16, 276, 2725, 33, 20, 18, 24908, 4672, 3536, 4976, 1779, 628, 326, 585, 733, 810, 768, 12123, 2, -100, -100, -100, -10...
try:
if hasattr(C, '_save_'):
def save(self, fname): r""" Save the object to disk.
b866fa681c3bd3c933dce1836c1e90c749ffe493 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3400/b866fa681c3bd3c933dce1836c1e90c749ffe493/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 5299, 4672, 436, 8395, 7074, 326, 733, 358, 4234, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 5299, 4672, 436, 8395, 7074, 326, 733, 358, 4234, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Warning: under construction!
Inputs: - master parent widget - height height of image portal (visible area) - width applies of image portal (visible area)
def delete(self): """Delete the annotation from the canvas. """ self.gim.cnv.delete(self.idTag)
95c8599a62e1e1e570a237ed60eab194f3d5337f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/95c8599a62e1e1e570a237ed60eab194f3d5337f/GrayImageDispWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 4672, 3536, 2613, 326, 3204, 628, 326, 5953, 18, 3536, 365, 18, 75, 381, 18, 10305, 90, 18, 3733, 12, 2890, 18, 350, 1805, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 12, 2890, 4672, 3536, 2613, 326, 3204, 628, 326, 5953, 18, 3536, 365, 18, 75, 381, 18, 10305, 90, 18, 3733, 12, 2890, 18, 350, 1805, 13, 282, 2, -100, -100, -100, -100, -100, -...
variantData = getVariants() variantSets = util.computeCombinations(variantData)
def printVariantInfo(variantSetNum, variants, variantSets, variantData): variantStr = simplejson.dumps(variants,ensure_ascii=False) self._console.head("Processing variant set %s/%s (%s)" % (variantSetNum+1, len(variantSets), variantStr))
44c7a40ea4ac06504a8e17cbc9dc3c89dbe47f4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/44c7a40ea4ac06504a8e17cbc9dc3c89dbe47f4b/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 9356, 966, 12, 8688, 694, 2578, 16, 12935, 16, 5437, 2785, 16, 5437, 751, 4672, 5437, 1585, 273, 4143, 1977, 18, 13302, 1121, 12, 15886, 16, 15735, 67, 9184, 33, 8381, 13, 365, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 9356, 966, 12, 8688, 694, 2578, 16, 12935, 16, 5437, 2785, 16, 5437, 751, 4672, 5437, 1585, 273, 4143, 1977, 18, 13302, 1121, 12, 15886, 16, 15735, 67, 9184, 33, 8381, 13, 365, 6...
data = data.replace('$ARCHITECTURES', "i386, ppc")
data = data.replace('$ARCHITECTURES', ", ".join(universal_opts_map[UNIVERSALARCHS]))
def patchFile(inPath, outPath): data = fileContents(inPath) data = data.replace('$FULL_VERSION', getFullVersion()) data = data.replace('$VERSION', getVersion()) data = data.replace('$MACOSX_DEPLOYMENT_TARGET', ''.join((DEPTARGET, ' or later'))) data = data.replace('$ARCHITECTURES', "i386, ppc") data = data.replace('$INSTALL_SIZE', installSize()) # This one is not handy as a template variable data = data.replace('$PYTHONFRAMEWORKINSTALLDIR', '/Library/Frameworks/Python.framework') fp = open(outPath, 'wb') fp.write(data) fp.close()
d0103292f052d3d5735d5b2d0a2307b02b75b8c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/d0103292f052d3d5735d5b2d0a2307b02b75b8c3/build-installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 812, 12, 267, 743, 16, 596, 743, 4672, 501, 273, 22031, 12, 267, 743, 13, 501, 273, 501, 18, 2079, 2668, 8, 18111, 67, 5757, 2187, 10208, 1444, 10756, 501, 273, 501, 18, 2079, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 812, 12, 267, 743, 16, 596, 743, 4672, 501, 273, 22031, 12, 267, 743, 13, 501, 273, 501, 18, 2079, 2668, 8, 18111, 67, 5757, 2187, 10208, 1444, 10756, 501, 273, 501, 18, 2079, ...
return FiniteField_ext_pariElement(self.__parent, ~self.__value)
return FiniteField_ext_pariElement(self.__parent, ~self.__value, check=False)
def __invert__(self): """ EXAMPLES: sage: from sage.rings.finite_field import FiniteField_ext_pari sage: a = FiniteField_ext_pari(9, 'a').gen() sage: ~a a + 2 sage: (a+1)*a 2*a + 1 """
8d181bb00c9bd168ced2431def3272204f314e77 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8d181bb00c9bd168ced2431def3272204f314e77/finite_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 267, 1097, 972, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 410, 18, 86, 899, 18, 9551, 67, 1518, 1930, 9458, 1137, 974, 67, 408, 67, 1065, 77, 272, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 267, 1097, 972, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 410, 18, 86, 899, 18, 9551, 67, 1518, 1930, 9458, 1137, 974, 67, 408, 67, 1065, 77, 272, 41...
0.040427681994512805
0.0404276819945127
def gamma_inc(self, t): """ Return the incomplete Gamma function evaluated at this complex number.
0f85c81e959512e75d1c3f66db056b379125ea81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0f85c81e959512e75d1c3f66db056b379125ea81/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9601, 67, 9523, 12, 2890, 16, 268, 4672, 3536, 2000, 326, 14715, 25409, 445, 12697, 622, 333, 7233, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9601, 67, 9523, 12, 2890, 16, 268, 4672, 3536, 2000, 326, 14715, 25409, 445, 12697, 622, 333, 7233, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
e = withKey(ekey) e['works'] = [Reference(wkey)]
e = ol.get(ekey) e['works'] = [{'key': wkey}]
def update_works(akey, works, do_updates=False): # we can now look up all works by an author while True: # until redirects repaired q = {'type':'/type/edition', 'authors': akey, 'works': None} work_to_edition = defaultdict(set) edition_to_work = defaultdict(set) for e in query_iter(q): if e.get('works', None): for w in e['works']: work_to_edition[w['key']].add(e['key']) edition_to_work[e['key']].add(w['key']) work_by_key = {} fix_redirects = [] for k, editions in work_to_edition.items(): w = withKey(k) if w['type']['key'] == '/type/redirect': print 'redirect found' wkey = w['location'] assert re_work_key.match(wkey) for ekey in editions: e = withKey(ekey) e['works'] = [Reference(wkey)] fix_redirects.append(e) continue work_by_key[k] = w if not fix_redirects: print 'no redirects left' break print 'save redirects' ol.save_many(fix_redirects, "merge works")
fdc40d1c05e36c09d13aa8bf1352122ac212737c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/fdc40d1c05e36c09d13aa8bf1352122ac212737c/find_works.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 18597, 12, 581, 402, 16, 6330, 16, 741, 67, 14703, 33, 8381, 4672, 468, 732, 848, 2037, 2324, 731, 777, 6330, 635, 392, 2869, 1323, 1053, 30, 468, 3180, 18064, 2071, 69, 2921...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 18597, 12, 581, 402, 16, 6330, 16, 741, 67, 14703, 33, 8381, 4672, 468, 732, 848, 2037, 2324, 731, 777, 6330, 635, 392, 2869, 1323, 1053, 30, 468, 3180, 18064, 2071, 69, 2921...
filecontent = filecontent.read()
def _do_savedrawing(pagename, request): _ = request.getText if not request.user.may.write(pagename): return _('You are not allowed to save a drawing on this page.') filename = request.form['filename'][0] filecontent = request.form['filepath'][0] basepath, basename = os.path.split(filename) basename, ext = os.path.splitext(basename) # get directory, and possibly create it attach_dir = getAttachDir(request, pagename, create=1) savepath = os.path.join(attach_dir, basename + ext) # XXX would be better if it worked without this (at least for the png), # XXX but it does not: filecontent = filecontent.read() # read file completely into memory if ext == '.draw': _addLogEntry(request, 'ATTDRW', pagename, basename + ext) filecontent = filecontent.replace("\r", "") elif ext == '.map': filecontent = filecontent.strip() if filecontent: # filecontent is either a file or a non-empty string stream = open(savepath, 'wb') try: _write_stream(filecontent, stream) finally: stream.close() else: # filecontent is empty string (e.g. empty map file), delete the target file try: os.unlink(savepath) except OSError, err: if err.errno != errno.ENOENT: # no such file raise # touch attachment directory to invalidate cache if new map is saved if ext == '.map': os.utime(attach_dir, None) request.emit_http_headers() request.write("OK")
5a717f6ccbabbc65ba4d3c26d2bad3e1c3065df0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/5a717f6ccbabbc65ba4d3c26d2bad3e1c3065df0/AttachFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 14077, 1899, 310, 12, 9095, 1069, 16, 590, 4672, 389, 273, 590, 18, 588, 1528, 225, 309, 486, 590, 18, 1355, 18, 24877, 18, 2626, 12, 9095, 1069, 4672, 327, 389, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 14077, 1899, 310, 12, 9095, 1069, 16, 590, 4672, 389, 273, 590, 18, 588, 1528, 225, 309, 486, 590, 18, 1355, 18, 24877, 18, 2626, 12, 9095, 1069, 4672, 327, 389, 2668, ...
cmd = line.split(' ')[0].upper()
cmd = line.split(' ')[0].upper()
def found_terminator(self): line = ''.join(self.in_buffer).strip() self.in_buffer = [] self.in_buffer_len = 0 cmd = line.split(' ')[0].upper() space = line.find(' ') if space != -1: arg = line[space + 1:] else: arg = ""
42cfb92815cfe91b8e9573da1b07cf8dce19a9ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/42cfb92815cfe91b8e9573da1b07cf8dce19a9ff/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 980, 273, 875, 18, 5701, 12, 2890, 18, 267, 67, 4106, 2934, 6406, 1435, 365, 18, 267, 67, 4106, 273, 5378, 365, 18, 267, 67, 4106, 67, 1897, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 980, 273, 875, 18, 5701, 12, 2890, 18, 267, 67, 4106, 2934, 6406, 1435, 365, 18, 267, 67, 4106, 273, 5378, 365, 18, 267, 67, 4106, 67, 1897, 273,...
self.listWidget.setUpdatesEnabled(1) width = max(self.width(), self.autoSizeListWidget and self.listWidget.sizeHintForColumn(0)+10) if self.autoSizeListWidget: self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.listWidget.resize(width, self.listWidget.sizeHintForRow(0) * (min(self.nrOfSuggestions, len(items)) + 3)) self.listWidget.move(self.mapToGlobal(QPoint(0, self.height()))) self.listWidget.show()
def updateSuggestedItems(self): self.listWidget.setUpdatesEnabled(0) self.listWidget.clear() last = self.getLastTextItem() tuples = zip(self.itemsAsStrings, self.itemsAsItems) if not self.caseSensitive: tuples = [(text.lower(), item) for (text, item) in tuples] last = last.lower() if self.useRE: pattern = re.compile(last) tuples = [(text, item) for (text, item) in tuples if pattern.match(text)] else: if self.matchAnywhere: tuples = [(text, item) for (text, item) in tuples if last in text] else: tuples = [(text, item) for (text, item) in tuples if text.startswith(last)] items = [tup[1] for tup in tuples] if items: if type(items[0]) == str: self.listWidget.addItems(items) else: for item in items: self.listWidget.addItem(QListWidgetItem(item)) self.listWidget.setCurrentRow(0) else: self.listWidget.hide() return self.listWidget.setUpdatesEnabled(1) width = max(self.width(), self.autoSizeListWidget and self.listWidget.sizeHintForColumn(0)+10) if self.autoSizeListWidget: self.listWidget.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.listWidget.resize(width, self.listWidget.sizeHintForRow(0) * (min(self.nrOfSuggestions, len(items)) + 3)) self.listWidget.move(self.mapToGlobal(QPoint(0, self.height()))) self.listWidget.show()
4dd2601ce487793400c1f7e5247f0850daac5006 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/4dd2601ce487793400c1f7e5247f0850daac5006/OWGUIEx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 55, 28892, 3126, 12, 2890, 4672, 365, 18, 1098, 4609, 18, 542, 5121, 1526, 12, 20, 13, 365, 18, 1098, 4609, 18, 8507, 1435, 225, 1142, 273, 365, 18, 588, 3024, 1528, 1180, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 55, 28892, 3126, 12, 2890, 4672, 365, 18, 1098, 4609, 18, 542, 5121, 1526, 12, 20, 13, 365, 18, 1098, 4609, 18, 8507, 1435, 225, 1142, 273, 365, 18, 588, 3024, 1528, 1180, 1435, ...
ret = self._escapeString(jobID)
ret = self._escapeString( jobID )
def rescheduleJob (self, jobID): """ Reschedule the given job to run again from scratch. Retain the already defined parameters in the parameter Attic """ # Check Verified Flag result = self.getJobAttributes( jobID, ['Status','MinorStatus','VerifiedFlag','RescheduleCounter', 'Owner','OwnerDN','OwnerGroup','DIRACSetup'] ) if result['OK']: resultDict = result['Value'] else: return S_ERROR('JobDB.getJobAttributes: can not retrieve job attributes')
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 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, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 2...
sys.exit(1)
sys.exit( 1 )
def runExternalsPostInstall(): """ If there are any postInstall in externals, run them """ postInstallPath = os.path.join( cliParams.targetPath, cliParams.platform, "postInstall" ) if not os.path.isdir( postInstallPath ): logDEBUG( "There's no %s directory. Skipping postInstall step" % postInstallPath ) return postInstallSuffix = "-postInstall" for scriptName in os.listdir( postInstallPath ): suffixFindPos = scriptName.find( postInstallSuffix ) if suffixFindPos == -1 or not suffixFindPos == len( scriptName ) - len( postInstallSuffix ): logDEBUG( "%s does not have the %s suffix. Skipping.." % ( scriptName, postInstallSuffix ) ) continue scriptPath = os.path.join( postInstallPath, scriptName ) os.chmod( scriptPath , executablePerms ) logINFO( "Executing %s..." % scriptPath ) if os.system( "'%s' > '%s.out' 2> '%s.err'" % ( scriptPath, scriptPath, scriptPath ) ): logERROR( "Post installation script %s failed. Check %s.err" % ( scriptPath, scriptPath ) ) sys.exit(1)
d4f08a8582dd40a0aa0b4318b667f128e692da8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d4f08a8582dd40a0aa0b4318b667f128e692da8e/dirac-install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 29764, 1031, 3349, 6410, 13332, 3536, 971, 1915, 854, 1281, 1603, 6410, 316, 18885, 1031, 16, 1086, 2182, 3536, 1603, 6410, 743, 273, 1140, 18, 803, 18, 5701, 12, 4942, 1370, 18, 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, 1086, 29764, 1031, 3349, 6410, 13332, 3536, 971, 1915, 854, 1281, 1603, 6410, 316, 18885, 1031, 16, 1086, 2182, 3536, 1603, 6410, 743, 273, 1140, 18, 803, 18, 5701, 12, 4942, 1370, 18, 3...
import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) sys.modules["%(name)s"] = mod
def __load(): import imp, sys, os for p in sys.path: path = os.path.join(p, "%(filename)s") if os.path.exists(path): break else: assert 0, "file not found: %(filename)s" mod = imp.load_dynamic("%(name)s", path) __load() del __load
def report(self): # XXX something decent pass
678abc68f61ae57565c4683c846e9cb003cf9e86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/678abc68f61ae57565c4683c846e9cb003cf9e86/bundlebuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 4672, 468, 11329, 5943, 2109, 319, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2605, 12, 2890, 4672, 468, 11329, 5943, 2109, 319, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
t.byteswap(True)
if Image.VERSION in ['1.1.4','1.1.5','1.1.6']: t.byteswap(True)
def LoadMonolithic(filename=None): #f='C:/Documents and Settings/Owner/Desktop/Stack_Zproject_GBR_DC.gif' if filename==None: filename=wx.FileSelector() im=Image.open(filename) if im.format in _tif_names: datatype=np.uint16 elif im.format in _gif_names: datatype=np.uint8 l=[] numFrames=0 while 1: l.append(np.asarray(im.getdata(),dtype=datatype)) numFrames+=1 try: im.seek(im.tell()+1) except EOFError: break # end of sequence t=np.array(l,dtype=datatype) # Oops--was t=np.array(im)!! #No need for this any more... # if t.dtype in [np.uint8,np.uint16]: # pass # elif t.dtype==np.int16: # t=np.uint16(t) # Convert from int16 to uint16 (same as what ImageJ does [I think]) # else: # print 'What kind of image fomrat is this anyway???' # print 'Should be a 16bit tiff or 8bit unsigned gif or tiff.' # return t.resize(numFrames,im.size[1],im.size[0]) # Patch around PIL's Tiff stupidity... if im.format=='TIFF': fid=open(filename,'rb') endianness=fid.read(2) fid.close() if endianness=='MM': t.byteswap(True) elif endianness=='II': pass else: print "Just so you know... that ain't no tiff!" return t
473180b2e6ff319ae3b1793f4ad8496a5f4b900c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10587/473180b2e6ff319ae3b1793f4ad8496a5f4b900c/GifTiffLoader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 11415, 355, 483, 335, 12, 3459, 33, 7036, 4672, 468, 74, 2218, 39, 27824, 12922, 471, 8709, 19, 5541, 19, 27583, 19, 2624, 67, 62, 4406, 67, 5887, 54, 67, 5528, 18, 13905, 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, 4444, 11415, 355, 483, 335, 12, 3459, 33, 7036, 4672, 468, 74, 2218, 39, 27824, 12922, 471, 8709, 19, 5541, 19, 27583, 19, 2624, 67, 62, 4406, 67, 5887, 54, 67, 5528, 18, 13905, 11, ...
chunks = filter(None, chunks)
chunks = [ch for ch in chunks if ch]
def wrap_text(text, width): """wrap_text(text : string, width : int) -> [string] Split 'text' into multiple lines of no more than 'width' characters each, and return the list of strings that results. """ if text is None: return [] if len(text) <= width: return [text] text = text.expandtabs() text = text.translate(WS_TRANS) chunks = re.split(r'( +|-+)', text) chunks = filter(None, chunks) # ' - ' results in empty strings lines = [] while chunks: cur_line = [] # list of chunks (to-be-joined) cur_len = 0 # length of current line while chunks: l = len(chunks[0]) if cur_len + l <= width: # can squeeze (at least) this chunk in cur_line.append(chunks[0]) del chunks[0] cur_len = cur_len + l else: # this line is full # drop last chunk if all space if cur_line and cur_line[-1][0] == ' ': del cur_line[-1] break if chunks: # any chunks left to process? # if the current line is still empty, then we had a single # chunk that's too big too fit on a line -- so we break # down and break it up at the line width if cur_len == 0: cur_line.append(chunks[0][0:width]) chunks[0] = chunks[0][width:] # all-whitespace chunks at the end of a line can be discarded # (and we know from the re.split above that if a chunk has # *any* whitespace, it is *all* whitespace) if chunks[0][0] == ' ': del chunks[0] # and store this line in the list-of-all-lines -- as a single # string, of course! lines.append(''.join(cur_line)) return lines
575900fed646b6f5e5fd8e94708072cc35a43df6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/575900fed646b6f5e5fd8e94708072cc35a43df6/fancy_getopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 955, 12, 955, 16, 1835, 4672, 3536, 4113, 67, 955, 12, 955, 294, 533, 16, 1835, 294, 509, 13, 317, 306, 1080, 65, 225, 5385, 296, 955, 11, 1368, 3229, 2362, 434, 1158, 1898...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 955, 12, 955, 16, 1835, 4672, 3536, 4113, 67, 955, 12, 955, 294, 533, 16, 1835, 294, 509, 13, 317, 306, 1080, 65, 225, 5385, 296, 955, 11, 1368, 3229, 2362, 434, 1158, 1898...
return self.makeConnection()
conn = self.makeConnection() self._connectionNumbers[id(conn)] = self._connectionCount self._connectionCount += 1 return conn
def getConnection(self): # SQLite can't share connections between threads, and so can't # pool connections. Since we are isolating threads here, we # don't have to worry about locking as much. if self._memory: return self.makeConnection() threadid = thread.get_ident() if (self._pool is not None and self._threadPool.has_key(threadid)): conn = self._threadPool[threadid] del self._threadPool[threadid] if conn in self._pool: self._pool.remove(conn) else: conn = self.makeConnection() if self._pool is not None: self._threadOrigination[id(conn)] = threadid self._connectionNumbers[id(conn)] = self._connectionCount self._connectionCount += 1 if self.debug: s = 'ACQUIRE' if self._pool is not None: s += ' pool=[%s]' % ', '.join([str(self._connectionNumbers[id(v)]) for v in self._pool]) self.printDebug(conn, s, 'Pool') return conn
8d4da4f4e283c999caf7f5efe381521f46a1c7ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/8d4da4f4e283c999caf7f5efe381521f46a1c7ef/sqliteconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6742, 12, 2890, 4672, 468, 16192, 848, 1404, 7433, 5921, 3086, 7403, 16, 471, 1427, 848, 1404, 468, 2845, 5921, 18, 225, 7897, 732, 854, 16249, 1776, 7403, 2674, 16, 732, 468, 2727, 1404...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6742, 12, 2890, 4672, 468, 16192, 848, 1404, 7433, 5921, 3086, 7403, 16, 471, 1427, 848, 1404, 468, 2845, 5921, 18, 225, 7897, 732, 854, 16249, 1776, 7403, 2674, 16, 732, 468, 2727, 1404...
_platform_cache = platform
_platform_cache[bool(terse)] = platform
def platform(aliased=0, terse=0): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is true, the function will use aliases for various platforms that report system names which differ from their common names, e.g. SunOS will be reported as Solaris. The system_alias() function is used to implement this. Setting terse to true causes the function to return only the absolute minimum information needed to identify the platform. """ global _platform_cache,_platform_aliased_cache if not aliased and (_platform_cache is not None): return _platform_cache elif _platform_aliased_cache is not None: return _platform_aliased_cache # Get uname information and then apply platform specific cosmetics # to it... system,node,release,version,machine,processor = uname() if machine == processor: processor = '' if aliased: system,release,version = system_alias(system,release,version) if system == 'Windows': # MS platforms rel,vers,csd,ptype = win32_ver(version) if terse: platform = _platform(system,release) else: platform = _platform(system,release,version,csd) elif system in ('Linux',): # Linux based systems distname,distversion,distid = dist('') if distname and not terse: platform = _platform(system,release,machine,processor, 'with', distname,distversion,distid) else: # If the distribution name is unknown check for libc vs. glibc libcname,libcversion = libc_ver(sys.executable) platform = _platform(system,release,machine,processor, 'with', libcname+libcversion) elif system == 'Java': # Java platforms r,v,vminfo,(os_name,os_version,os_arch) = java_ver() if terse: platform = _platform(system,release,version) else: platform = _platform(system,release,version, 'on', os_name,os_version,os_arch) elif system == 'MacOS': # MacOS platforms if terse: platform = _platform(system,release) else: platform = _platform(system,release,machine) else: # Generic handler if terse: platform = _platform(system,release) else: bits,linkage = architecture(sys.executable) platform = _platform(system,release,machine,processor,bits,linkage) if aliased: _platform_aliased_cache = platform elif terse: pass else: _platform_cache = platform return platform
51b92569a7dcb6d35980977565c3b69cb6767752 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/51b92569a7dcb6d35980977565c3b69cb6767752/platform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4072, 12, 18083, 8905, 33, 20, 16, 19272, 307, 33, 20, 4672, 225, 3536, 2860, 279, 2202, 533, 29134, 326, 6808, 4072, 598, 487, 9816, 5301, 1779, 487, 3323, 261, 12885, 1158, 1898, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4072, 12, 18083, 8905, 33, 20, 16, 19272, 307, 33, 20, 4672, 225, 3536, 2860, 279, 2202, 533, 29134, 326, 6808, 4072, 598, 487, 9816, 5301, 1779, 487, 3323, 261, 12885, 1158, 1898, 294, ...
return cls.strptime(rfctime, '%a, %d %b %Y %H:%M:%S %Z')
return cls.strptime(rfctime, '%a, %d %b %Y %H:%M:%S %Z').strip()
def fromRfc(cls, rfctime): return cls.strptime(rfctime, '%a, %d %b %Y %H:%M:%S %Z')
06b8e85802a1e8ce02ee6267e6298362ae652c66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/06b8e85802a1e8ce02ee6267e6298362ae652c66/utility.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 28178, 12, 6429, 16, 9075, 21261, 4672, 327, 2028, 18, 701, 10650, 12, 5809, 21261, 16, 1995, 69, 16, 738, 72, 738, 70, 738, 61, 738, 44, 5319, 49, 5319, 55, 738, 62, 6134, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 28178, 12, 6429, 16, 9075, 21261, 4672, 327, 2028, 18, 701, 10650, 12, 5809, 21261, 16, 1995, 69, 16, 738, 72, 738, 70, 738, 61, 738, 44, 5319, 49, 5319, 55, 738, 62, 6134, 2, ...
from gevent.socket import GreenSocket, fromfd, wrap_ssl, socketpair
from gevent.socket import GreenSocket, fromfd, wrap_ssl, socketpair, getaddrinfo, getnameinfo
def patch_socket(): from gevent.socket import GreenSocket, fromfd, wrap_ssl, socketpair _socket = __import__('socket') _socket.socket = GreenSocket _socket.fromfd = fromfd _socket.ssl = wrap_ssl _socket.socketpair = socketpair # XXX also gethostbyname, getaddrinfo
05c763ab02087895221912584964d1e83d4f5805 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10423/05c763ab02087895221912584964d1e83d4f5805/monkey.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 67, 7814, 13332, 628, 314, 2575, 18, 7814, 1930, 17766, 4534, 16, 628, 8313, 16, 2193, 67, 8157, 16, 2987, 6017, 16, 336, 4793, 1376, 16, 336, 529, 1376, 389, 7814, 273, 1001, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 67, 7814, 13332, 628, 314, 2575, 18, 7814, 1930, 17766, 4534, 16, 628, 8313, 16, 2193, 67, 8157, 16, 2987, 6017, 16, 336, 4793, 1376, 16, 336, 529, 1376, 389, 7814, 273, 1001, 56...
entitytable += '|| `&%s` || %s || [http://doctype.googlecode.com/svn/trunk/tests/%s test]\n' % (entityname, buildEntityHexLink(entityhex), testfilename)
entitytable += '|| [%s &%s] || %s || [http://doctype.googlecode.com/svn/trunk/tests/%s test]\n' % (wikiname, entityname, buildEntityHexLink(entityhex), testfilename)
def buildEntityHexLink(entityhex): entityhexupper = entityhex.upper() entityhexlower = entityhex.lower() last4 = entityhexlower[-4:] if entityhex[0] == '0': return '[http://www.fileformat.info/info/unicode/char/%(last4)s/index.htm U+%(entityhexupper)s]' % locals() else: return 'U+' + entityhexupper
5aeaba0894ecf9d0221089b3012ee600ee829490 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3291/5aeaba0894ecf9d0221089b3012ee600ee829490/makehtmlentitytests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1943, 7037, 2098, 12, 1096, 7118, 4672, 1522, 7118, 5797, 273, 1522, 7118, 18, 5797, 1435, 1522, 7118, 8167, 273, 1522, 7118, 18, 8167, 1435, 1142, 24, 273, 1522, 7118, 8167, 18919, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1943, 7037, 2098, 12, 1096, 7118, 4672, 1522, 7118, 5797, 273, 1522, 7118, 18, 5797, 1435, 1522, 7118, 8167, 273, 1522, 7118, 18, 8167, 1435, 1142, 24, 273, 1522, 7118, 8167, 18919, ...
sourceFileMap[sourcePath].append(source)
sourceFileMap[sourcePath].append(sourceEnum)
def __invertSourceMap(self, sourceMap): sourceFileMap = {} for source in self.strings: if source in sourceMap: sourcePaths = sourceMap[source] for sourcePath in sourcePaths: if sourcePath not in sourceFileMap: sourceFileMap[sourcePath] = [] sourceFileMap[sourcePath].append(source) break for sourceName, sourceFileStrings in sourceFileMap.iteritems(): sourceFileStrings.sort()
c4048eeefe0bdf43e83cf95bdd0570eaec92a245 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11667/c4048eeefe0bdf43e83cf95bdd0570eaec92a245/diffstrings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 267, 1097, 1830, 863, 12, 2890, 16, 18570, 4672, 16338, 863, 273, 2618, 225, 364, 1084, 316, 365, 18, 10219, 30, 309, 1084, 316, 18570, 30, 1084, 4466, 273, 18570, 63, 3168, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 267, 1097, 1830, 863, 12, 2890, 16, 18570, 4672, 16338, 863, 273, 2618, 225, 364, 1084, 316, 365, 18, 10219, 30, 309, 1084, 316, 18570, 30, 1084, 4466, 273, 18570, 63, 3168, 65, ...
@param obj: The object whose documentation should be added to this documentation map. @type obj: any
@param objID: The UID of the object whose documentation should be added to this documentation map. @type objID: L{UID}
def add_one(self, objID): """ Add an object's documentation to this documentation map. If you also want to include the objects contained by C{obj}, then use L{add}.
5b4cb5cc8fc14c46653c790e405e72f989b5831d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/5b4cb5cc8fc14c46653c790e405e72f989b5831d/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 476, 12, 2890, 16, 1081, 734, 4672, 3536, 1436, 392, 733, 1807, 7323, 358, 333, 7323, 852, 18, 225, 971, 1846, 2546, 2545, 358, 2341, 326, 2184, 7542, 635, 385, 95, 2603, 5779...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 476, 12, 2890, 16, 1081, 734, 4672, 3536, 1436, 392, 733, 1807, 7323, 358, 333, 7323, 852, 18, 225, 971, 1846, 2546, 2545, 358, 2341, 326, 2184, 7542, 635, 385, 95, 2603, 5779...
self._check_new_update_provides(ntxmbr.po, available_pkg)
txs = self._check_new_update_provides(ntxmbr.po, available_pkg) tx_return.extend(txs)
def _newer_update_in_trans(self, pkgtup, available_pkg): """ We return True if there is a newer package already in the transaction. If there is an older one, we remove it (and update any deps. that aren't satisfied by the newer pkg) and return False so we'll update to this newer pkg. """ found = False for txmbr in self.tsInfo.getMembersWithState(pkgtup, [TS_UPDATED]): count = 0 for po in txmbr.updated_by: if available_pkg.verLE(po): count += 1 else: for ntxmbr in self.tsInfo.getMembers(po.pkgtup): self.tsInfo.remove(ntxmbr.po.pkgtup) self._check_new_update_provides(ntxmbr.po, available_pkg) if count: found = True else: self.tsInfo.remove(txmbr.po.pkgtup) return found
9bef1a0436e11e54b6999745ce72d4e211a2f5a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/9bef1a0436e11e54b6999745ce72d4e211a2f5a7/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2704, 264, 67, 2725, 67, 267, 67, 2338, 12, 2890, 16, 3475, 88, 416, 16, 2319, 67, 10657, 4672, 3536, 1660, 327, 1053, 309, 1915, 353, 279, 16069, 2181, 1818, 316, 326, 2492, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2704, 264, 67, 2725, 67, 267, 67, 2338, 12, 2890, 16, 3475, 88, 416, 16, 2319, 67, 10657, 4672, 3536, 1660, 327, 1053, 309, 1915, 353, 279, 16069, 2181, 1818, 316, 326, 2492, 18, ...
self.__filterExcludes(pkglist, excludes) self.repos.append(resolver) def addRepoByDir(self, dirname, excludes): pkg_list = [] for f in os.listdir(dirname): fn = "%s/%s" % (dirname, f) if not f.endswith(".rpm") or not os.path.isfile(fn): continue pkg = readRpmPackage(self.config, fn, db=self.pydb, tags=self.config.resolvertags) if self.config.ignorearch or \ archCompat(pkg["arch"], self.config.machine): pkg_list.append(pkg) self.__filterExcludes(pkglist, excludes) resolver = RpmResolver(self.config, pkg_list) self.repos.append(resolver)
self.__filterExcludes(pkg_list, excludes) r = RpmResolver(self.config, pkg_list) self.repos.append(repo) self.resolvers.append(r)
def addRepo(self, baseurl, excludes): repo = RpmRepo(self.config, baseurl) repo.read() pkg_list = repo.getPkgList() self.__filterExcludes(pkglist, excludes) self.repos.append(resolver)
279d36aa25c592d76d29f036d6cdc32a8b9bf535 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/279d36aa25c592d76d29f036d6cdc32a8b9bf535/yum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 8791, 12, 2890, 16, 25427, 16, 13644, 4672, 3538, 273, 534, 7755, 8791, 12, 2890, 18, 1425, 16, 25427, 13, 3538, 18, 896, 1435, 3475, 67, 1098, 273, 3538, 18, 588, 11264, 682, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 8791, 12, 2890, 16, 25427, 16, 13644, 4672, 3538, 273, 534, 7755, 8791, 12, 2890, 18, 1425, 16, 25427, 13, 3538, 18, 896, 1435, 3475, 67, 1098, 273, 3538, 18, 588, 11264, 682, 143...
- Pair ``(v, m)`` as in Duursama [D]_
- Pair ``(v, m)`` as in Duursma [D]_
def sd_duursma_data(C, i): r""" Returns the Duursama data `v` and `m` of this formally s.d. code `C` and the type number `i` in (1,2,3,4). Does *not* check if this code is actually sd. INPUT: - ``i`` - Type number OUTPUT: - Pair ``(v, m)`` as in Duursama [D]_ REFERENCES: - [D] - I. Duursma, "Extremal weight enumerators and ultraspherical polynomials" """ n = C.length() d = C.minimum_distance() if i == 1: v = (n-4*d)/2 + 4 m = d-3 if i == 2: v = (n-6*d)/8 + 3 m = d-5 if i == 3: v = (n-4*d)/4 + 3 m = d-4 if i == 4: v = (n-3*d)/2 + 3 m = d-3 return [v,m]
e7978e4a8a9e7a0b967dd74b71761058529fdc6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7978e4a8a9e7a0b967dd74b71761058529fdc6c/linear_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8349, 67, 2544, 25152, 2540, 67, 892, 12, 39, 16, 277, 4672, 436, 8395, 2860, 326, 463, 89, 295, 20353, 69, 501, 1375, 90, 68, 471, 1375, 81, 68, 434, 333, 646, 1230, 272, 18, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8349, 67, 2544, 25152, 2540, 67, 892, 12, 39, 16, 277, 4672, 436, 8395, 2860, 326, 463, 89, 295, 20353, 69, 501, 1375, 90, 68, 471, 1375, 81, 68, 434, 333, 646, 1230, 272, 18, 72, ...
reinit_extrude_controls(self.w, self.o, length = 7.0, attr_target = self)
initial_length = debug_pref("Extrude: initial offset length (A)", Choice([3.0, 7.0, 15.0, 30.0], default_value = 7.0), prefs_key = True, non_debug = True) reinit_extrude_controls(self.w, self.o, length = initial_length, attr_target = self)
def Enter(self): self.status_msg("preparing to enter %s..." % self.msg_modename) # this msg won't last long enough to be seen, if all goes well self.clear() ##e see comment there self.initial_down = self.o.down self.initial_out = self.o.out reinit_extrude_controls(self.w, self.o, length = 7.0, attr_target = self) basicMode.Enter(self)
108a8dde720a2ca3bc22f85d2307b100dcc380dc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/108a8dde720a2ca3bc22f85d2307b100dcc380dc/extrudeMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15439, 12, 2890, 4672, 365, 18, 2327, 67, 3576, 2932, 1484, 12583, 358, 6103, 738, 87, 7070, 738, 365, 18, 3576, 67, 1711, 1069, 13, 468, 333, 1234, 8462, 1404, 1142, 1525, 7304, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15439, 12, 2890, 4672, 365, 18, 2327, 67, 3576, 2932, 1484, 12583, 358, 6103, 738, 87, 7070, 738, 365, 18, 3576, 67, 1711, 1069, 13, 468, 333, 1234, 8462, 1404, 1142, 1525, 7304, 358, ...
def test_yuv__sanity_testing_converted_should_not_raise(self):
def test_hsva__sanity_testing_converted_should_not_raise(self):
def test_yuv__sanity_testing_converted_should_not_raise(self): fails = 0 for i, (r,g,b,a) in enumerate(rgba_combinations): c = pygame.Color (r,g,b,a) other = pygame.Color(0) try: other.yuv = c.yuv except ValueError: fails += 1 self.assertEqual ( (fails, i+1), (0, i+1), '(fails, combos) == (0, combos)' )
c6e7f322382f4acb4620e49e674de647c9ab082a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/c6e7f322382f4acb4620e49e674de647c9ab082a/color_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 21394, 1652, 1842, 67, 4487, 15304, 972, 87, 10417, 67, 3813, 310, 67, 6283, 329, 67, 13139, 67, 902, 67, 11628, 12, 2890, 4672, 6684, 273, 374, 225, 364, 277, 16, 261, 86, 16, 75, 16, 70,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 21394, 1652, 1842, 67, 4487, 15304, 972, 87, 10417, 67, 3813, 310, 67, 6283, 329, 67, 13139, 67, 902, 67, 11628, 12, 2890, 4672, 6684, 273, 374, 225, 364, 277, 16, 261, 86, 16, 75, 16, 70,...
if rawQueueStats.get('counters:deletes_unprocessed_legacy'): deletes_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_legacy'])[0]) else:
def get_queue_statistics(self): """ Get a set of statistics from the HBase metrics table regarding processing queues """ aggStats = {} rawQueueStats = self._make_row_nice(self.client.getRow('metrics', 'crash_report_queues')[0]) if rawQueueStats.get('counters:inserts_unprocessed_legacy'): inserts_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_legacy'])[0]) else: inserts_unprocessed_legacy = 0 if rawQueueStats.get('counters:deletes_unprocessed_legacy'): deletes_unprocessed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_legacy'])[0]) else: deletes_unprocessed_legacy = 0 if rawQueueStats.get('counters:inserts_unprocessed_priority'): inserts_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed_priority'])[0]) else: inserts_unprocessed_priority = 0 if rawQueueStats.get('counters:deletes_unprocessed_priority'): deletes_unprocessed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed_priority'])[0]) else: deletes_unprocessed_priority = 0 if rawQueueStats.get('counters:inserts_unprocessed'): inserts_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:inserts_unprocessed'])[0]) else: inserts_unprocessed = 0 if rawQueueStats.get('counters:deletes_unprocessed'): deletes_unprocessed = long(struct.unpack('>q', rawQueueStats['counters:deletes_unprocessed'])[0]) else: deletes_unprocessed = 0 if rawQueueStats.get('counters:inserts_processed_legacy'): inserts_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_legacy'])[0]) else: inserts_processed_legacy = 0 if rawQueueStats.get('counters:deletes_processed_legacy'): deletes_processed_legacy = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_legacy'])[0]) else: deletes_processed_legacy = 0 if rawQueueStats.get('counters:inserts_processed_priority'): inserts_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:inserts_processed_priority'])[0]) else: inserts_processed_priority = 0 if rawQueueStats.get('counters:deletes_processed_priority'): deletes_processed_priority = long(struct.unpack('>q', rawQueueStats['counters:deletes_processed_priority'])[0]) else: deletes_processed_priority = 0
cadce30658d3300f051172e443dbfa5ec78d5b7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12383/cadce30658d3300f051172e443dbfa5ec78d5b7e/hbaseClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4000, 67, 14438, 12, 2890, 4672, 3536, 968, 279, 444, 434, 7691, 628, 326, 30265, 4309, 1014, 29012, 4929, 11897, 3536, 10421, 4195, 273, 2618, 1831, 3183, 4195, 273, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4000, 67, 14438, 12, 2890, 4672, 3536, 968, 279, 444, 434, 7691, 628, 326, 30265, 4309, 1014, 29012, 4929, 11897, 3536, 10421, 4195, 273, 2618, 1831, 3183, 4195, 273, 365, 6315, ...
print "pool", d
def filter_pools_by_products(self, pools, products): """ Filter a list of pools and return just those that have the products in the list of products and returns those pools """ matched_data_dict = {} for d in pools: print "pool", d for product in products: productid = product.getProduct().getHash() if productid == d['productId']: matched_data_dict[d['id']] = d
80ba406f4eadd2bf1f4dc8fd08f1b4dbfc2bfa09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/80ba406f4eadd2bf1f4dc8fd08f1b4dbfc2bfa09/managerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 27663, 67, 1637, 67, 18736, 12, 2890, 16, 16000, 16, 10406, 4672, 3536, 4008, 279, 666, 434, 16000, 471, 327, 2537, 5348, 716, 1240, 326, 10406, 316, 326, 666, 434, 10406, 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, 1034, 67, 27663, 67, 1637, 67, 18736, 12, 2890, 16, 16000, 16, 10406, 4672, 3536, 4008, 279, 666, 434, 16000, 471, 327, 2537, 5348, 716, 1240, 326, 10406, 316, 326, 666, 434, 10406, 471,...
command = '%s --%s=%s' % (COMMAND, FILTER_FLAG, '*1')
command = '%s --%s=%s' % (COMMAND, FILTER_FLAG, '*One')
def testFlagOverridesEnvVar(self): """Tests that the --gtest_filter flag overrides the GTEST_FILTER environment variable."""
3d7042176307f0d7700a3640f3b3bcc8790b8fcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4198/3d7042176307f0d7700a3640f3b3bcc8790b8fcd/gtest_filter_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4678, 13084, 3491, 1537, 12, 2890, 4672, 3536, 14650, 716, 326, 1493, 75, 3813, 67, 2188, 2982, 9515, 326, 611, 16961, 67, 11126, 3330, 2190, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4678, 13084, 3491, 1537, 12, 2890, 4672, 3536, 14650, 716, 326, 1493, 75, 3813, 67, 2188, 2982, 9515, 326, 611, 16961, 67, 11126, 3330, 2190, 12123, 2, -100, -100, -100, -100, -100, ...
del threading.__warningregistry__
try: del threading.__warningregistry__ except AttributeError: pass
def check(_, w, msg): self.assertEqual(str(w.message), msg)
a88334d0f6f24b0c920c19e85d53be1e1d40c5e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a88334d0f6f24b0c920c19e85d53be1e1d40c5e3/test_threading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 24899, 16, 341, 16, 1234, 4672, 365, 18, 11231, 5812, 12, 701, 12, 91, 18, 2150, 3631, 1234, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 24899, 16, 341, 16, 1234, 4672, 365, 18, 11231, 5812, 12, 701, 12, 91, 18, 2150, 3631, 1234, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...