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
chanString = chanStringBase + "_SNRSQ_0" testOnFirstChannel = Fr.frgetvect(frameFile,chanString,-1,0.01,0) gpsStart = testOnFirstChannel[1]
def plotsnrchisq(gpsTime,frameFile,outputPath,inspProcParams,tableFile): rsqThreshold = 0; for row in inspProcParams: if row.param == "--channel-name": chanStringBase = row.value ifoName = str(row.value).split(":",1) if row.param == "--segment-length": segLen = eval(row.value) if row.param == "--sample-rate": sampleRate = eval(row.value) if row.param == "--segment-overlap": segOverlap = eval(row.value) if (row.param == "--chisq-delta") or (row.param == "--minimal-match"): chisqDelta = eval(row.value) if row.param =="--chisq-bins": chisqBins = eval(row.value) if row.param == "--snr-threshold": snrThreshold = eval(row.value) if row.param == "--chisq-threshold": chisqThreshold = eval(row.value) if row.param == "--rsq-veto-threshold": rsqThreshold = eval(row.value) if row.param == "--trig-start-time": trigStart = eval(row.value) segLenSec = segLen / sampleRate segOverlapSec = segOverlap / sampleRate chanString = chanStringBase + "_SNRSQ_0" # find the start time of the first channel # BE CAREFUL ! it is assumed that the sampling frequency is higher than 200 Hz testOnFirstChannel = Fr.frgetvect(frameFile,chanString,-1,0.01,0) gpsStart = testOnFirstChannel[1] if (trigStart): trigPosition = int((trigStart - gpsStart) / (segLenSec -segOverlapSec)) else: trigPosition = 0 position = int((eval(gpsTime) - gpsStart) / (segLenSec -segOverlapSec)) \ - trigPosition chanNumber = str(position) chanNameSnr = chanStringBase + "_SNRSQ_" + chanNumber chanNameChisq = chanStringBase + '_CHISQ_' + chanNumber # now, read the data !! # The window width should be an input argument maybe ? duration = 2.0 # startWindow = float(gpsTime) - duration/2. # squareSnr_tuple = Fr.frgetvect(frameFile,chanNameSnr,startWindow,duration,0) squareSnr_tuple = Fr.frgetvect(frameFile,chanNameSnr,-1,segLenSec,0) squareChisq_tuple = Fr.frgetvect(frameFile,chanNameChisq,-1,segLenSec,0) snr_position = float(gpsTime) - ( float(squareSnr_tuple[1]) + \ (segLenSec-segOverlapSec)*position ) chisq_position = float(gpsTime) - ( float(squareChisq_tuple[1]) + \ (segLenSec-segOverlapSec)*position ) # compute the snr vector snr_vector = sqrt(squareSnr_tuple[0]) # print squareSnr_tuple snr_time = array(range(0, segLen)) * squareSnr_tuple[3][0] - snr_position # compute the r^2 rsq_vector = squareChisq_tuple[0] chisq_time = array(range(0, segLen)) * squareChisq_tuple[3][0] - chisq_position # compute the normalized chisq chisqNorm_vector = rsq_vector/(1 + chisqDelta/chisqBins*squareSnr_tuple[0]) # define the time boundaries of the plot snr_start = (snr_position - duration/2.) * 1/squareSnr_tuple[3][0] snr_stop = (snr_position + duration/2.) * 1/squareSnr_tuple[3][0] chisq_start = (chisq_position - duration/2.) * 1/squareChisq_tuple[3][0] chisq_stop = (chisq_position + duration/2.) * 1/squareChisq_tuple[3][0] #prepare the thresholds to be plotted snrThreshVect = int( duration * 1/squareSnr_tuple[3][0] ) * [snrThreshold] if(chisqThreshold < 100.): chisqThreshVect = int( duration * 1/squareChisq_tuple[3][0] ) * [chisqThreshold] if(rsqThreshold > 0 & rsqThreshold < 100.): rsqThreshVect = int( duration * 1/squareChisq_tuple[3][0] ) * [rsqThreshold] # Now plot the snr time serie !! figure(1) plot(snr_time[int(snr_start):int(snr_stop)],snr_vector[int(snr_start):int(snr_stop)]) hold(1) plot(snr_time[int(snr_start):int(snr_stop)],snrThreshVect) hold(0) xlim(-duration/2., duration/2.) xlabel('time (s)',size='x-large') ylabel(r'snr',size='x-large') grid() title(ifoName[0] + ' trigger: ' + gpsTime) figName = ifoName[0] + '_' + str(gpsTime).replace(".","_") + '_snr.png' savefig(outputPath +"/" + figName) tableFile = open(container.locallink,'a') table = HTMLTable() table.add_column('<img width=400 src="' + figName +'">','SNR') figure(11) plot(snr_time[int(snr_start):int(snr_stop)],snr_vector[int(snr_start):int(snr_stop)]) hold(1) plot(snr_time[int(snr_start):int(snr_stop)],snrThreshVect) hold(0) xlim(-duration/20., duration/20.) xlabel('time (s)',size='x-large') ylabel(r'snr',size='x-large') grid() title(ifoName[0] + ' trigger: ' + gpsTime + ' Zoom') figName = ifoName[0] + '_' + str(gpsTime).replace(".","_") + '_snr_zoom.png' savefig(outputPath +"/" + figName) table.add_column('<img width=400 src="' + figName +'">','SNR ZOOM') table.write(tableFile) tableFile.close() ### END CHADS CHANGES ### # Now plot the r^2 time serie !! figure(2) plot(chisq_time[int(chisq_start):int(chisq_stop)],rsq_vector[int(chisq_start):int(chisq_stop)]) if(chisqThreshold < 100.): hold(1) plot(rsqThreshVect) hold(0) xlim(-duration/2., duration/2.) xlabel('time (s)',size='x-large') ylabel(r'chisq/p',size='x-large') grid() title(ifoName[0] + ' trigger: ' + gpsTime) savefig(ifoName[0] + '_' + str(gpsTime).replace(".","_") + '_rsq.png') figure(22) plot(chisq_time[int(chisq_start):int(chisq_stop)],rsq_vector[int(chisq_start):int(chisq_stop)]) if(chisqThreshold < 100.): hold(1) plot(rsqThreshVect) hold(0) xlim(-duration/20., duration/20.) xlabel('time (s)',size='x-large') ylabel(r'chisq/p',size='x-large') grid() title(ifoName[0] + ' trigger: ' + gpsTime + ' Zoom') savefig(ifoName[0] + '_' + str(gpsTime).replace(".","_") + '_rsq_zoom.png') # Now plot the normalized chisq time serie !! figure(3) plot(chisq_time[int(chisq_start):int(chisq_stop)],chisqNorm_vector[int(chisq_start):int(chisq_stop)]) if(rsqThreshold > 0 & rsqThreshold < 100.): hold(1) plot(chisqThreshVect) hold(0) xlim(-duration/2., duration/2.) xlabel('time (s)',size='x-large') ylabel(r'chisq / (p + Delta * snrsq)',size='x-large') grid(1) title(ifoName[0] + ' trigger: ' + gpsTime) savefig(ifoName[0] + '_' + str(gpsTime).replace(".","_") + '_chisq.png') figure(33) plot(chisq_time[int(chisq_start):int(chisq_stop)],chisqNorm_vector[int(chisq_start):int(chisq_stop)]) if(rsqThreshold > 0 & rsqThreshold < 100.): hold(1) plot(chisqThreshVect) hold(0) xlim(-duration/20., duration/20.) xlabel('time (s)',size='x-large') ylabel(r'chisq / (p + Delta * snrsq)',size='x-large') grid(1) title(ifoName[0] + ' trigger: ' + gpsTime + ' Zoom') savefig(ifoName[0] + '_' + str(gpsTime).replace(".","_") + '_chisq_zoom.png')
c4d2198cea6ff30c6d5f1aa9bee69af1c499079e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/c4d2198cea6ff30c6d5f1aa9bee69af1c499079e/plotsnrchisq_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 8134, 86, 343, 291, 85, 12, 75, 1121, 950, 16, 3789, 812, 16, 2844, 743, 16, 267, 1752, 15417, 1370, 16, 2121, 812, 4672, 225, 3597, 85, 7614, 273, 374, 31, 225, 364, 1027, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 8134, 86, 343, 291, 85, 12, 75, 1121, 950, 16, 3789, 812, 16, 2844, 743, 16, 267, 1752, 15417, 1370, 16, 2121, 812, 4672, 225, 3597, 85, 7614, 273, 374, 31, 225, 364, 1027, 316...
if code in self.BUGGY_RANGE_CHECK:
if not PY_STRUCT_RANGE_CHECKING and code in self.BUGGY_RANGE_CHECK:
def test_one(self, x, pack=struct.pack, unpack=struct.unpack, unhexlify=binascii.unhexlify): if verbose: print "trying std", self.formatpair, "on", x, "==", hex(x)
6a31a984e19b4d9bda0424ea3ee39f729c752b8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6a31a984e19b4d9bda0424ea3ee39f729c752b8c/test_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 476, 12, 2890, 16, 619, 16, 2298, 33, 1697, 18, 2920, 16, 6167, 33, 1697, 18, 17309, 16, 640, 7118, 22451, 33, 4757, 9184, 18, 318, 7118, 22451, 4672, 309, 3988, 30, 1172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 476, 12, 2890, 16, 619, 16, 2298, 33, 1697, 18, 2920, 16, 6167, 33, 1697, 18, 17309, 16, 640, 7118, 22451, 33, 4757, 9184, 18, 318, 7118, 22451, 4672, 309, 3988, 30, 1172, ...
resps[det]=antenna.response(gps_time,RA,dec,0,0,'radians',det)[2]
resps[det]=antenna.response(gps_time,RA,dec,0,0,'radians',det)[2]*sensitivities[det]
def detector_thresholds(min_threshold, ifos, RA, dec, gps_time, sensitivities=None): """ Return a dictionary of sensitivity thresholds for each detector, based on a minimum threshold of min_threshold in the least sensitive one, for a source at position (RA,dec) specified in radians at time gps_time. Specifying a dictionary of sensitivities allows one to weight also by the relative SNR of a reference system in each detector to handle different noise curves. """ # Recurse if multiple RA, dec and GPS times are specified if type(gps_time)!=float or type(RA)!=float or type(dec)!=float: assert len(gps_time)==len(RA),len(gps_time)==len(dec) return map(lambda (a,b,c): detector_thresholds(min_threshold,ifos,a,b,c,sensitivities), zip(RA,dec,gps_time)) from pylal import antenna # Sensitivies specifies relative SNRs of a reference signal (BNS) if sensitivities is None: sensitivities={} for det in ifos: sensitivies[det]=1.0 else: assert len(ifos)==len(sensitivites) # Normalise sensitivities minsens=min(sensitivities.values()) for det in ifos: sensitivities[det]/=minsens resps={} threshs={} # Make a dictionary of average responses for det in ifos: resps[det]=antenna.response(gps_time,RA,dec,0,0,'radians',det)[2] worst_resp=min(resps.values()) # Assuming that lowest threshold is in worst detector, return thresholds for det in ifos: threshs[det]=min_threshold*(resps[det]/worst_resp)*sensitivities[det] return threshs
323638fdd5a246491641cf1f6c20df7c1ed90d57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/323638fdd5a246491641cf1f6c20df7c1ed90d57/grbsummary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13826, 67, 8699, 87, 12, 1154, 67, 8699, 16, 309, 538, 16, 26880, 16, 2109, 16, 20985, 67, 957, 16, 15390, 305, 427, 1961, 33, 7036, 4672, 3536, 2000, 279, 3880, 434, 15390, 20862, 199...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13826, 67, 8699, 87, 12, 1154, 67, 8699, 16, 309, 538, 16, 26880, 16, 2109, 16, 20985, 67, 957, 16, 15390, 305, 427, 1961, 33, 7036, 4672, 3536, 2000, 279, 3880, 434, 15390, 20862, 199...
child.expect("3W")
child.expect("3")
def test_multiline(self): child = self.spawn() child.expect("-> ") child.sendline("(+ 1") child.expect(".. ") child.sendline(" 2)") child.expect("3W")
d4d06c93f901853c37f1aa73848febf0d7ba58ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/d4d06c93f901853c37f1aa73848febf0d7ba58ce/test_interactive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5421, 12554, 12, 2890, 4672, 1151, 273, 365, 18, 1752, 9533, 1435, 1151, 18, 12339, 2932, 2122, 9369, 1151, 18, 4661, 1369, 2932, 12, 15, 404, 7923, 1151, 18, 12339, 2932, 838,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5421, 12554, 12, 2890, 4672, 1151, 273, 365, 18, 1752, 9533, 1435, 1151, 18, 12339, 2932, 2122, 9369, 1151, 18, 4661, 1369, 2932, 12, 15, 404, 7923, 1151, 18, 12339, 2932, 838,...
if type( self._utorrent ) == uTorrentServer:
if not self._utorrent or type( self._utorrent ) == uTorrentServer:
def _get_data( self, loc, data = None, retry = True ): last_e = None for i in range( self._retry_max if retry else 1 ): try: headers = { k : v for k, v in self._request.header_items() } if data: bnd = email.generator._make_boundary() headers[ 'Content-Type' ] = 'multipart/form-data; boundary={}'.format( bnd ) data = data.replace( '{{BOUNDARY}}', bnd ) self._request.add_data( data ) self.request( self._request.get_method(), self._request.selector + loc, self._request.get_data(), headers ) resp = self.getresponse() out = resp.read().decode( 'utf8' ) if resp.status == 400: last_e = uTorrentError( out ) if type( self._utorrent ) == uTorrentServer: # if uTorrent server alpha is bound to the same port as WebUI then it will respond with 'invalid request' to the first request in the connection continue raise last_e elif resp.status == 404: raise uTorrentError( 'Invalid request' ) elif resp.status == 401: raise uTorrentError( 'Autorization failed' ) elif resp.status != 200: raise uTorrentError( '{}: {}'.format( resp.reason, resp.status ) ) self._cookies.extract_cookies( resp, self._request ) if len( self._cookies ) > 0: self._request.add_header( 'Cookie', '; '.join( [ '{}={}'.format( quote( c.name, '' ), quote( c.value, '' ) ) for c in self._cookies ] ) ) return out except socket.gaierror as e: raise uTorrentError( e.args[ 1 ] ) except socket.error as e: e = e.args[ 0 ] if str( e ) == 'timed out': last_e = uTorrentError( 'Timeout' ) continue elif e.args[ 0 ] == errno.ECONNREFUSED: self.close() raise uTorrentError( e.args[ 1 ] ) if last_e: self.close() raise last_e
3d642ab4d7ad8cc558e07b27c0d93e7f32199380 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14855/3d642ab4d7ad8cc558e07b27c0d93e7f32199380/utorrentctl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 892, 12, 365, 16, 1515, 16, 501, 273, 599, 16, 3300, 273, 1053, 262, 30, 1142, 67, 73, 273, 599, 364, 277, 316, 1048, 12, 365, 6315, 9620, 67, 1896, 309, 3300, 469, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 892, 12, 365, 16, 1515, 16, 501, 273, 599, 16, 3300, 273, 1053, 262, 30, 1142, 67, 73, 273, 599, 364, 277, 316, 1048, 12, 365, 6315, 9620, 67, 1896, 309, 3300, 469, 4...
this = apply(_quickfix.new_NetworkRequestType, args)
this = _quickfix.new_NetworkRequestType(*args)
def __init__(self, *args): this = apply(_quickfix.new_NetworkRequestType, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 3906, 691, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 3906, 691, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 36...
error_msg.append(_("· El <b>nombre del equipo</b> contiene carácteres incorrectos (sólo letras y números están permitidos).\n"))
self.host_err_3.show() error = 1
def info_to_peez (self): """Processing info to peez step tasks."""
03d407a24d7c829d66405eefa8e2f07ba1e7deea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2662/03d407a24d7c829d66405eefa8e2f07ba1e7deea/gtkui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 869, 67, 347, 6664, 261, 2890, 4672, 3536, 7798, 1123, 358, 293, 1340, 94, 2235, 4592, 12123, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1123, 67, 869, 67, 347, 6664, 261, 2890, 4672, 3536, 7798, 1123, 358, 293, 1340, 94, 2235, 4592, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
page = urlopen(url).read()
def handle(url): m = re.match(r'(http://www\.(atmos-chem-phys|clim-past)\.net/[0-9]+/[0-9]+/[0-9]{4}/[[:alpha:]]+-[0-9]+-[0-9]{4}\w*)', url)
2ec67b52673e29b17cafcebb4027b4c7743dd939 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13110/2ec67b52673e29b17cafcebb4027b4c7743dd939/egu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 718, 4672, 312, 273, 283, 18, 1916, 12, 86, 11, 12, 2505, 2207, 5591, 5834, 12, 270, 26719, 17, 1036, 17, 844, 1900, 96, 830, 381, 17, 84, 689, 5153, 18, 2758, 19, 63, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 718, 4672, 312, 273, 283, 18, 1916, 12, 86, 11, 12, 2505, 2207, 5591, 5834, 12, 270, 26719, 17, 1036, 17, 844, 1900, 96, 830, 381, 17, 84, 689, 5153, 18, 2758, 19, 63, 20...
width = 6) drawline(stepColor, ladderBeam1Point, ladderBeam2Point)
width = beamThickness, isSmooth = True ) drawline(stepColor, ladderBeam1Point, ladderBeam2Point)
def drawLadder(endCenter1, endCenter2, stepSize, beamThickness = 2.0, beam1Color = None, beam2Color = None, stepColor = None ): """ Draw a ladder. @see: B{DnaLineMode.Draw } where it is used @param endCenter1: Ladder center at end 1 @type endCenter1: B{V} @param endCenter2: Ladder center at end 2 @type endCenter2: B{V} @param stepSize: Center to center distance between consecutive steps @type stepSize: float @param beamThickness: Thickness of the two ladder beams @type beamThickness: float @param beam1Color: Color of beam1 @param beam2Color: Color of beam2 """ #Note: The ladder needs to be always parallel to the screen. #Perhaps need to use correct rotation. unitVector = norm(endCenter2 - endCenter1) ladderLength = vlen(endCenter1 - endCenter2) ladderWidth = 8.0 glDisable(GL_LIGHTING) glPushMatrix() glTranslatef(endCenter1[0], endCenter1[1], endCenter1[2]) pointOnAxis = V(0, 0, 0) ladderBeam1Point = None ladderBeam2Point = None x = 0.0 while x < ladderLength: drawPoint(stepColor, pointOnAxis) previousPoint = pointOnAxis previousLadderBeam1Point = ladderBeam1Point previousLadderBeam2Point = ladderBeam2Point pointOnAxis = pointOnAxis + unitVector*stepSize x += stepSize ax = previousPoint[0] ay = previousPoint[1] az = previousPoint[2] bx1 = ax by1 = ay + 0.5*ladderWidth bz1 = az bx2 = ax by2 = ay - 0.5*ladderWidth bz2 = az ladderBeam1Point = V(bx1, by1, bz1) ladderBeam2Point = V(bx2, by2, bz2) if previousLadderBeam1Point: drawline(beam1Color, previousLadderBeam1Point, ladderBeam1Point, width = 6) drawline(beam2Color, previousLadderBeam2Point, ladderBeam2Point, width = 6) drawline(stepColor, ladderBeam1Point, ladderBeam2Point) glPopMatrix()
e6d7667336e87d2ab5ffba97497d8c4c4b5beeba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/e6d7667336e87d2ab5ffba97497d8c4c4b5beeba/drawer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 48, 361, 765, 12, 409, 8449, 21, 16, 679, 8449, 22, 16, 2235, 1225, 16, 16751, 1315, 19517, 273, 576, 18, 20, 16, 16751, 21, 2957, 273, 599, 16, 16751, 22, 2957, 273, 599, 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, 3724, 48, 361, 765, 12, 409, 8449, 21, 16, 679, 8449, 22, 16, 2235, 1225, 16, 16751, 1315, 19517, 273, 576, 18, 20, 16, 16751, 21, 2957, 273, 599, 16, 16751, 22, 2957, 273, 599, 16, ...
result[`cnt`] = string.strip(param[sidx+1:])
pass
def extractKVParams(self, paramsStr): params = safesplitfields(paramsStr, ',') result = {} cnt = 0 for param in params: try: sidx = string.index(param, '=') except ValueError: result[`cnt`] = string.strip(param[sidx+1:]) else: result[string.strip(param[:sidx])] = string.strip(param[sidx+1:]) cnt = cnt + 1 return result
6eb029397632b8d41c11a092feecd7f4c782a432 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6eb029397632b8d41c11a092feecd7f4c782a432/methodparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 16945, 1370, 12, 2890, 16, 859, 1585, 4672, 859, 273, 11029, 281, 1127, 2821, 12, 2010, 1585, 16, 3316, 13, 563, 273, 2618, 7599, 273, 374, 364, 579, 316, 859, 30, 775, 30, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 16945, 1370, 12, 2890, 16, 859, 1585, 4672, 859, 273, 11029, 281, 1127, 2821, 12, 2010, 1585, 16, 3316, 13, 563, 273, 2618, 7599, 273, 374, 364, 579, 316, 859, 30, 775, 30, 272, ...
Uses the PARI C library. INPUT: n -- an integer
Factors or -- for integers -- uses the PARI C library. INPUT: n -- anything that can be factored.
def Min(x): """ The minimum of a list of objects, on which a binary min operation is defined. """ assert isinstance(x,list), "Argument must be a list." if len(x)==0: return 0 m=x[0] for i in range(1,len(x)): m=min(m,x[i]) return m
eb0521b51b6768be088ae6e9f78e94415b7d483f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/eb0521b51b6768be088ae6e9f78e94415b7d483f/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5444, 12, 92, 4672, 3536, 1021, 5224, 434, 279, 666, 434, 2184, 16, 603, 1492, 279, 3112, 1131, 1674, 353, 2553, 18, 3536, 1815, 1549, 12, 92, 16, 1098, 3631, 315, 1379, 1297, 506, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5444, 12, 92, 4672, 3536, 1021, 5224, 434, 279, 666, 434, 2184, 16, 603, 1492, 279, 3112, 1131, 1674, 353, 2553, 18, 3536, 1815, 1549, 12, 92, 16, 1098, 3631, 315, 1379, 1297, 506, 279...
sage: F
sage: F
def factor(self): r""" Compute the irreducible factorization of this polynomial.
3df849f5df2964825f84037aaeb982bf6e81bd42 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3df849f5df2964825f84037aaeb982bf6e81bd42/multi_polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 12, 2890, 4672, 436, 8395, 8155, 326, 9482, 1118, 5286, 1523, 5578, 1588, 434, 333, 16991, 18, 2, 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, 5578, 12, 2890, 4672, 436, 8395, 8155, 326, 9482, 1118, 5286, 1523, 5578, 1588, 434, 333, 16991, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
options['compile_catalog'] = defaults
options.compile_catalog = defaults
def make_catalogs(): '''Compile all message catalogs for release''' options.order('i18n', add_rest=True) for po_file in glob.glob('po/*.po'): locale, ext = os.path.splitext(os.path.basename(po_file)) build_dir = paver_path(os.path.join(options.builddir, locale, 'LC_MESSAGES'))
7bb09147f7e55cba53fc1dd2f4fd81ea783a1ce7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9952/7bb09147f7e55cba53fc1dd2f4fd81ea783a1ce7/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2574, 287, 14072, 13332, 9163, 9937, 777, 883, 26455, 364, 3992, 26418, 702, 18, 1019, 2668, 77, 2643, 82, 2187, 527, 67, 8792, 33, 5510, 13, 364, 8275, 67, 768, 316, 4715, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2574, 287, 14072, 13332, 9163, 9937, 777, 883, 26455, 364, 3992, 26418, 702, 18, 1019, 2668, 77, 2643, 82, 2187, 527, 67, 8792, 33, 5510, 13, 364, 8275, 67, 768, 316, 4715, 1...
name = self._get_field('current') if name == '':
try: applied = self.get_applied() except StackException:
def get_current(self): """Return the name of the topmost patch, or None if there is no such patch.""" name = self._get_field('current') if name == '': return None else: return name
532cdf94f80be6fb95682d9673c12a1d1aecf9a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/532cdf94f80be6fb95682d9673c12a1d1aecf9a0/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 12, 2890, 4672, 3536, 990, 326, 508, 434, 326, 1760, 10329, 4729, 16, 578, 599, 309, 1915, 353, 1158, 4123, 4729, 12123, 775, 30, 6754, 273, 365, 18, 588, 67, 438, 3110,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 12, 2890, 4672, 3536, 990, 326, 508, 434, 326, 1760, 10329, 4729, 16, 578, 599, 309, 1915, 353, 1158, 4123, 4729, 12123, 775, 30, 6754, 273, 365, 18, 588, 67, 438, 3110,...
class ParseError(Exception): """ The base class for warnings and errors generated while parsing epytext strings. When an epytext string is parsed, a list of warnings and a list of errors is generated. Each element of these lists will be an instance of C{ParseError}. Usually, C{ParseError}s are simply displayed to the user. The ParseError class is only used as a base class; it should never be directly instantiated. @ivar linenum: The line on which the error occured. @type linenum: C{int} @ivar descr: A description of the error. @type descr: C{string} """ def __repr__(self): """ Return the formal representation of this C{ParseError}. C{ParseError}s have formal representations of the form:: <ParseError on line 12> @return: the formal representation of this C{ParseError}. @rtype: C{string} """ return '<ParseError on line %d>' % linenum def __str__(self): """ Return the informal string representation of this C{ParseError}. This multi-line string contains a description of the error, and specifies where it occured. @return: the informal representation of this C{ParseError}. @rtype: C{string} """ return self._repr('Error') def as_warning(self): """ Return a string representation of this C{ParseError}. This multi-line string contains a description of the error, and specifies where it occured. The description refers to the error as a 'warning.' @return: a string representation of this C{ParseError}. @rtype: C{string} """ return self._repr('Warning') def as_error(self): """ Return a string representation of this C{ParseError}. This multi-line string contains a description of the error, and specifies where it occured. The description refers to the error as an 'error.' @return: a string representation of this C{ParseError}. @rtype: C{string} """ return self._repr('Error') def __cmp__(self, other): """ Compare two C{ParseError}s, based on their line number. - Return -1 if C{self.linenum<other.linenum} - Return +1 if C{self.linenum>other.linenum} - Return 0 if C{self.linenum==other.linenum}. The return value is undefined if C{other} is not a ParseError. @rtype: C{int} """ if not isinstance(other, ParseError): return -1000 return cmp(self.linenum, other.linenum) def _repr(self, typ): """ Return a string representation of this C{ParseError}. This multi-line string contains a description of the error, and specifies where it occured. @param typ: Either C{'Error'} or C{'Warning'}, depending on what the error should be referred to as. @type typ: C{string} @return: a string representation of this C{ParseError}. @rtype: C{string} """ raise NotImplementedError('_repr is undefined')
def pparse(str, show_warnings=1, show_errors=1, stream=sys.stderr): """ Pretty-parse the string. This parses the string, and catches any warnings or errors produced. Any warnings and errors are displayed, and the resulting DOM parse structure is returned. @param str: The string to parse. @type str: C{string} @param show_warnings: Whether or not to display warnings generated by parsing C{str}. @type show_warnings: C{boolean} @param show_errors: Whether or not to display errors generated by parsing C{str}. @type show_errors: C{boolean} @param stream: The stream that warnings and errors should be written to. @type stream: C{stream} @return: a DOM document encoding the contents of C{str}. @rtype: L{xml.dom.minidom.Document} @raise SyntaxError: If any fatal errors were encountered. """ errors = [] warnings = [] confused = 0 try: val = parse(str, errors, warnings) except: confused = 1 if not show_warnings: warnings = [] warnings.sort() errors.sort() if warnings: print >>stream, '='*SCRWIDTH print >>stream, "WARNINGS" print >>stream, '-'*SCRWIDTH for warning in warnings: print >>stream, warning.as_warning() print >>stream, '='*SCRWIDTH if errors and show_errors: if not warnings: print >>stream, '='*SCRWIDTH print >>stream, "ERRORS" print >>stream, '-'*SCRWIDTH for error in errors: print >>stream, error print >>stream, '='*SCRWIDTH if confused: raise elif errors: raise SyntaxError('Encountered Errors') else: return val
36ace726c8fc4e9c1a450d16c75087d594ead7cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36ace726c8fc4e9c1a450d16c75087d594ead7cf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 2670, 12, 701, 16, 2405, 67, 12103, 33, 21, 16, 2405, 67, 4324, 33, 21, 16, 1407, 33, 9499, 18, 11241, 4672, 3536, 22328, 17, 2670, 326, 533, 18, 225, 1220, 8940, 326, 533, 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, 293, 2670, 12, 701, 16, 2405, 67, 12103, 33, 21, 16, 2405, 67, 4324, 33, 21, 16, 1407, 33, 9499, 18, 11241, 4672, 3536, 22328, 17, 2670, 326, 533, 18, 225, 1220, 8940, 326, 533, 16, ...
dumpParagraphLines(P)
dumpParagraphLines(P)
def flagged(i,TESTS=TESTS): return 'all' in TESTS or '*' in TESTS or str(i) in TESTS
53320badfa0a01e45da5dfa0c826979c0b813239 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/53320badfa0a01e45da5dfa0c826979c0b813239/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2982, 2423, 12, 77, 16, 16961, 55, 33, 16961, 55, 4672, 327, 296, 454, 11, 316, 22130, 55, 578, 5306, 316, 22130, 55, 578, 609, 12, 77, 13, 316, 22130, 55, 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, 2982, 2423, 12, 77, 16, 16961, 55, 33, 16961, 55, 4672, 327, 296, 454, 11, 316, 22130, 55, 578, 5306, 316, 22130, 55, 578, 609, 12, 77, 13, 316, 22130, 55, 2, -100, -100, -100, -100,...
if not os.path.exists(options.apiOutputDirectory): os.makedirs(options.apiOutputDirectory)
if not os.path.exists(jsonDir): os.makedirs(jsonDir) if options.apiDocumentationXmlFile != None: options.apiDocumentationXmlFile = os.path.normpath(options.apiDocumentationXmlFile) xmlDir = os.path.dirname(options.apiDocumentationXmlFile) if not os.path.exists(xmlDir): os.makedirs(xmlDir)
def execute(fileDb, moduleDb, options, pkgid=""): additionalOutput = [] ###################################################################### # SORT OF INCLUDE LIST ###################################################################### print print " SORT OF INCLUDE LIST:" print "----------------------------------------------------------------------------" if options.verbose: print " * Include: %s" % options.include print " * Exclude: %s" % options.exclude print " * Sorting files..." sortedIncludeList = loader.getSortedList(options, fileDb, moduleDb) if options.printList: print print " PRINT OF INCLUDE ORDER:" print "----------------------------------------------------------------------------" print " * The files will be included in this order:" for key in sortedIncludeList: print " - %s" % key ###################################################################### # STRING COMPRESSION (ALPHA!) ###################################################################### if options.compressStrings: print print " STRING COMPRESSION (ALPHA!):" print "----------------------------------------------------------------------------" print " * Searching for string instances..." compressedStrings = {} for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId for token in fileDb[fileId]["tokens"]: if token["type"] != "string": continue if token["detail"] == "doublequotes": compressSource = "\"%s\"" % token["source"] else: compressSource = "'%s'" % token["source"] if not compressedStrings.has_key(compressSource): compressedStrings[compressSource] = 1 else: compressedStrings[compressSource] += 1 if options.verbose: print " * Sorting strings..." compressedList = [] for compressSource in compressedStrings: compressedList.append({ "source" : compressSource, "usages" : compressedStrings[compressSource] }) pos = 0 while pos < len(compressedList): item = compressedList[pos] if item["usages"] <= 1: compressedList.remove(item) else: pos += 1 compressedList.sort(lambda x, y: y["usages"]-x["usages"]) print " * Found %s string instances" % len(compressedList) if options.verbose: print " * Building replacement map..." compressMap = {} compressCounter = 0 compressJavaScript = "QXS%s=[" % pkgid for item in compressedList: if compressCounter != 0: compressJavaScript += "," compressMap[item["source"]] = compressCounter compressCounter += 1 compressJavaScript += item["source"] compressJavaScript += "];" additionalOutput.append(compressJavaScript) print " * Updating tokens..." for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId for token in fileDb[fileId]["tokens"]: if token["type"] != "string": continue if token["detail"] == "doublequotes": compressSource = "\"%s\"" % token["source"] else: compressSource = "'%s'" % token["source"] if compressSource in compressMap: token["source"] = "QXS%s[%s]" % (pkgid, compressMap[compressSource]) token["detail"] = "compressed" ###################################################################### # TOKEN STORAGE ###################################################################### if options.storeTokens: print print " TOKEN STORAGE:" print "----------------------------------------------------------------------------" if options.tokenOutputDirectory == None: print " * You must define the token directory!" sys.exit(1) else: options.tokenOutputDirectory = os.path.normpath(options.tokenOutputDirectory) # Normalizing directory if not os.path.exists(options.tokenOutputDirectory): os.makedirs(options.tokenOutputDirectory) print " * Storing tokens..." for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId tokenString = tokenizer.convertTokensToString(fileDb[fileId]["tokens"]) tokenSize = len(tokenString) / 1000.0 if options.verbose: print " * writing tokens to file (%s KB)..." % tokenSize tokenFileName = os.path.join(options.tokenOutputDirectory, fileId + config.TOKENEXT) tokenFile = file(tokenFileName, "w") tokenFile.write(tokenString) tokenFile.flush() tokenFile.close() ###################################################################### # GENERATION OF API ###################################################################### if options.generateApiDocumentation: print print " GENERATION OF API:" print "----------------------------------------------------------------------------" if options.apiOutputDirectory == None: print " * You must define the API output directory!" sys.exit(1) else: options.apiOutputDirectory = os.path.normpath(options.apiOutputDirectory) # Normalizing directory if not os.path.exists(options.apiOutputDirectory): os.makedirs(options.apiOutputDirectory) docTree = None print " * Generating API tree..." for fileId in fileDb: if options.verbose: print " - %s" % fieId docTree = docgenerator.createDoc(fileDb[fileId]["tree"], docTree) if docTree: print " * Finalising tree..." docgenerator.postWorkPackage(docTree, docTree) if options.xmlApiOutputFilename: print " * Writing XML API file..." xmlContent = "<?xml version=\"1.0\" encoding=\"" + options.encoding + "\"?>\n\n" xmlContent += tree.nodeToXmlString(docTree) filetool(options.apiOutputDirectory, options.xmlApiOutputFilename, xmlContent, options.encoding) if options.jsonApiOutputFilename: print " * Writing JSON API file..." jsonContent = tree.nodeToJsonString(docTree) filetool(options.apiOutputDirectory, options.jsonApiOutputFilename, jsonContent, options.encoding) ###################################################################### # CREATE COPY OF RESOURCES ###################################################################### if options.copyResources: print print " CREATE COPY OF RESOURCES:" print "----------------------------------------------------------------------------" print " * Preparing target configuration..." overrideList = [] for overrideEntry in options.overrideResourceOutput: # Parse # fileId.resourceId:destinationDirectory targetSplit = overrideEntry.split(":") targetStart = targetSplit.pop(0) targetStartSplit = targetStart.split(".") # Store overrideData = {} overrideData["destinationDirectory"] = ":".join(targetSplit) overrideData["resourceId"] = targetStartSplit.pop() overrideData["fileId"] = ".".join(targetStartSplit) # Append overrideList.append(overrideData) print " * Syncing..." for fileId in sortedIncludeList: filePath = fileDb[fileId]["path"] fileResources = fileDb[fileId]["resources"] if len(fileResources) > 0: print " - Found %i resources in %s" % (len(fileResources), fileId) for fileResource in fileResources: fileResourceSplit = fileResource.split(":") resourceId = fileResourceSplit.pop(0) relativeDirectory = ":".join(fileResourceSplit) sourceDirectory = os.path.join(fileDb[fileId]["resourceInput"], relativeDirectory) destinationDirectory = os.path.join(fileDb[fileId]["resourceOutput"], relativeDirectory) # Searching for overrides for overrideData in overrideList: if overrideData["fileId"] == fileId and overrideData["resourceId"] == resourceId: destinationDirectory = overrideData["destinationDirectory"] print " - Copy %s => %s" % (sourceDirectory, destinationDirectory) try: os.listdir(sourceDirectory) except OSError: print " - Source directory isn't readable! Ignore resource!" continue for root, dirs, files in os.walk(sourceDirectory): # Filter ignored directories for ignoredDir in config.DIRIGNORE: if ignoredDir in dirs: dirs.remove(ignoredDir) # Searching for items (resource files) for itemName in files: # Generate absolute source file path itemSourcePath = os.path.join(root, itemName) # Extract relative path and directory itemRelPath = itemSourcePath.replace(sourceDirectory + os.sep, "") itemRelDir = os.path.dirname(itemRelPath) # Generate destination directory and file path itemDestDir = os.path.join(destinationDirectory, itemRelDir) itemDestPath = os.path.join(itemDestDir, itemName) # Check/Create destination directory if not os.path.exists(itemDestDir): os.makedirs(itemDestDir) # Copy file if options.verbose: print " - Copying: %s => %s" % (itemSourcePath, itemDestPath) shutil.copyfile(itemSourcePath, itemDestPath) ###################################################################### # GENERATION OF SETTINGS ###################################################################### if options.generateSourceScript or options.generateCompiledScript: print print " GENERATION OF SETTINGS:" print "----------------------------------------------------------------------------" print " * Processing input data..." typeFloat = re.compile("^([0-9\-]+\.[0-9]+)$") typeNumber = re.compile("^([0-9\-])$") settingsStr = "" # If you change this, change this in qx.Settings and qx.OO, too. settingsStr += 'if(typeof qx==="undefined"){var qx={_UNDEFINED:"undefined",_LOADSTART:(new Date).valueOf()};}' if options.addNewLines: settingsStr += "\n" # If you change this, change this in qx.Settings, too. settingsStr += 'if(typeof qx.Settings===qx._UNDEFINED){qx.Settings={_userSettings:{},_defaultSettings:{}};}' if options.addNewLines: settingsStr += "\n" for setting in options.defineRuntimeSetting: settingSplit = setting.split(":") settingKey = settingSplit.pop(0) settingValue = ":".join(settingSplit) settingKeySplit = settingKey.split(".") settingKeyName = settingKeySplit.pop() settingKeySpace = ".".join(settingKeySplit) checkStr = 'if(typeof qx.Settings._userSettings["%s"]===qx._UNDEFINED){qx.Settings._userSettings["%s"]={};}' % (settingKeySpace, settingKeySpace) if not checkStr in settingsStr: settingsStr += checkStr if options.addNewLines: settingsStr += "\n" settingsStr += 'qx.Settings._userSettings["%s"]["%s"]=' % (settingKeySpace, settingKeyName) if settingValue == "false" or settingValue == "true" or typeFloat.match(settingValue) or typeNumber.match(settingValue): settingsStr += '%s' % settingValue else: settingsStr += '"%s"' % settingValue.replace("\"", "\\\"") settingsStr += ";" if options.addNewLines: settingsStr += "\n" ###################################################################### # GENERATION OF SOURCE VERSION ###################################################################### if options.generateSourceScript: print print " GENERATION OF SOURCE SCRIPT:" print "----------------------------------------------------------------------------" if options.sourceScriptFile == None: print " * You must define the source script file!" sys.exit(1) else: options.sourceScriptFile = os.path.normpath(options.sourceScriptFile) print " * Generating includer..." sourceOutput = settingsStr if sourceOutput != "" and options.addNewLines: settingsStr += "\n" if options.addNewLines: for fileId in sortedIncludeList: sourceOutput += 'document.write(\'<script type="text/javascript" src="%s%s"></script>\');\n' % (os.path.join(fileDb[fileId]["sourceScriptPath"], fileId.replace(".", os.sep)), config.JSEXT) else: includeCode = "" for fileId in sortedIncludeList: includeCode += '<script type="text/javascript" src="%s%s"></script>' % (os.path.join(fileDb[fileId]["sourceScriptPath"], fileId.replace(".", os.sep)), config.JSEXT) sourceOutput += "document.write('%s');" % includeCode print " * Saving includer output as %s..." % options.sourceScriptFile filetool(options.sourceScriptFile, sourceOutput, options.encoding) ###################################################################### # GENERATION OF COMPILED VERSION ###################################################################### if options.generateCompiledScript: print print " GENERATION OF COMPILED SCRIPT:" print "----------------------------------------------------------------------------" compiledOutput = settingsStr + "".join(additionalOutput) print " * Compiling tokens..." if options.compiledScriptFile == None: print " * You must define the compiled script file!" sys.exit(1) else: options.compiledScriptFile = os.path.normpath(options.compiledScriptFile) for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId compiledFileContent = compile.compile(fileDb[fileId]["tokens"], options.addNewLines) if options.addFileIds: compiledOutput += "/* ID: " + fileId + " */\n" + compiledFileContent + "\n" else: compiledOutput += compiledFileContent print " * Saving compiled output as %s..." % options.compiledScriptFile filetool(options.compiledScriptFile, compiledOutput, options.encoding)
9d5888996a6df08028e858d78a00d933c48f1a36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/9d5888996a6df08028e858d78a00d933c48f1a36/generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 768, 4331, 16, 1605, 4331, 16, 702, 16, 3475, 350, 1546, 6, 4672, 225, 3312, 1447, 273, 5378, 282, 28256, 1970, 7, 468, 225, 11530, 15932, 28062, 15130, 28256, 1970, 7, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 768, 4331, 16, 1605, 4331, 16, 702, 16, 3475, 350, 1546, 6, 4672, 225, 3312, 1447, 273, 5378, 282, 28256, 1970, 7, 468, 225, 11530, 15932, 28062, 15130, 28256, 1970, 7, 225, ...
raise URLGrabError(-1, _('Package does not match intended download'))
msg = _(_('Package does not match intended download. Suggestion: run yum clean metadata')) raise URLGrabError(-1, msg)
def verifyPkg(self, fo, po, raiseError): """verifies the package is what we expect it to be raiseError = defaults to 0 - if 1 then will raise a URLGrabError if the file does not check out. otherwise it returns false for a failure, true for success""" failed = False
532335518a7e47d22c30a1588d08d7a4ce94b441 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/532335518a7e47d22c30a1588d08d7a4ce94b441/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 11264, 12, 2890, 16, 18261, 16, 8275, 16, 1002, 668, 4672, 3536, 502, 5032, 326, 2181, 353, 4121, 732, 4489, 518, 358, 506, 1002, 668, 225, 273, 3467, 358, 374, 300, 309, 404, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 11264, 12, 2890, 16, 18261, 16, 8275, 16, 1002, 668, 4672, 3536, 502, 5032, 326, 2181, 353, 4121, 732, 4489, 518, 358, 506, 1002, 668, 225, 273, 3467, 358, 374, 300, 309, 404, 15...
raise TableDBError, dberror[1]
raise TableDBError, dberror.args[1]
def Select(self, table, columns, conditions={}): """Select(table, columns, conditions) - retrieve specific row data Returns a list of row column->value mapping dictionaries.
f2b8856b8ce295d56dbedf4afb70a79e7eb221b7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/f2b8856b8ce295d56dbedf4afb70a79e7eb221b7/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 12, 2890, 16, 1014, 16, 2168, 16, 4636, 12938, 4672, 3536, 3391, 12, 2121, 16, 2168, 16, 4636, 13, 300, 4614, 2923, 1027, 501, 2860, 279, 666, 434, 1027, 1057, 2122, 1132, 2874, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6766, 12, 2890, 16, 1014, 16, 2168, 16, 4636, 12938, 4672, 3536, 3391, 12, 2121, 16, 2168, 16, 4636, 13, 300, 4614, 2923, 1027, 501, 2860, 279, 666, 434, 1027, 1057, 2122, 1132, 2874, ...
app = SimpleDemo()
app = SimpleApp()
def _showhideWidgets(self, widget, hide=True): """ Show or hide all widgets in the window except the given widget. Used for going fullscreen: in fullscreen, you only want the clutter embed widget and the menu bar etc. """ parent = widget.get_parent()
3b67b85e99556271865210ae7472d5929c2a3297 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/579/3b67b85e99556271865210ae7472d5929c2a3297/gl-hello.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 11248, 16166, 12, 2890, 16, 3604, 16, 6853, 33, 5510, 4672, 3536, 9674, 578, 6853, 777, 10965, 316, 326, 2742, 1335, 326, 864, 3604, 18, 10286, 364, 8554, 1983, 9252, 30, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 11248, 16166, 12, 2890, 16, 3604, 16, 6853, 33, 5510, 4672, 3536, 9674, 578, 6853, 777, 10965, 316, 326, 2742, 1335, 326, 864, 3604, 18, 10286, 364, 8554, 1983, 9252, 30, 316,...
return Shader.load(Filename.fromOsSpecific(fn))
fn = Filename.fromOsSpecific(fn) fn.makeTrueCase() return Shader.load(fn)
def loadShader(self, name): fn = os.path.join(os.path.abspath(os.path.dirname(__file__)), name) return Shader.load(Filename.fromOsSpecific(fn))
20760dcafd20bd0ca26e7cdc424606cb75f5ab67 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/20760dcafd20bd0ca26e7cdc424606cb75f5ab67/CommonFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 19396, 12, 2890, 16, 508, 4672, 2295, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 13, 3631, 508, 13, 327, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 19396, 12, 2890, 16, 508, 4672, 2295, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 13, 3631, 508, 13, 327, 2...
self.int = []
self.int = 0
def __init__(self, value=None): if value is None: self.sign = None self.int = [] self.exp = None if isinstance(value, Decimal): if value._sign: self.sign = -1 else: self.sign = 1 self.int = list(value._int) self.exp = value._exp if isinstance(value, tuple): self.sign = value[0] self.int = value[1] self.exp = value[2]
55342e783760513207a56d5a31fa49e579a96cd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/55342e783760513207a56d5a31fa49e579a96cd3/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 33, 7036, 4672, 309, 460, 353, 599, 30, 365, 18, 2977, 273, 599, 365, 18, 474, 273, 374, 365, 18, 2749, 273, 599, 309, 1549, 12, 1132, 16, 11322, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 460, 33, 7036, 4672, 309, 460, 353, 599, 30, 365, 18, 2977, 273, 599, 365, 18, 474, 273, 374, 365, 18, 2749, 273, 599, 309, 1549, 12, 1132, 16, 11322, ...
print name
def module_list (): list = {} #load module descriptions module_descriptions = {} from xml.dom.minidom import * f = open( Configuration.GLADEPATH + "/modules.xml" , "r") xml = f.read() f.close() document = parseString(xml) for node in document.getElementsByTagName("module"): name = node.getAttribute( "name" ) print name if node.firstChild: description = node.firstChild.nodeValue module_descriptions[name] = description dirList=os.listdir( Configuration.MODS_AVAILABLE_DIR ) dirList = [x for x in dirList if blacklisted( x ) == False ] for fname in dirList : tokens = os.path.splitext( fname ) if tokens[1] == '.load': description = None # find a description if module_descriptions.has_key(tokens[0]): description = module_descriptions[tokens[0]] elif module_descriptions.has_key("mod_" + tokens[0]): description = module_descriptions["mod_" + tokens[0]] mod = ModuleModel( tokens[0] ) mod.data[ 'description' ] = description try: mod.load( ) except "VhostUnparsable": pass list[ fname ] = mod mod = None return list
1a1a3de6621682d61909c1da3bb494c5738e637e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9230/1a1a3de6621682d61909c1da3bb494c5738e637e/Module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 67, 1098, 1832, 30, 666, 273, 2618, 225, 468, 945, 1605, 15550, 1605, 67, 30288, 273, 2618, 628, 2025, 18, 9859, 18, 1154, 350, 362, 1930, 380, 284, 273, 1696, 12, 4659, 18, 43, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1605, 67, 1098, 1832, 30, 666, 273, 2618, 225, 468, 945, 1605, 15550, 1605, 67, 30288, 273, 2618, 628, 2025, 18, 9859, 18, 1154, 350, 362, 1930, 380, 284, 273, 1696, 12, 4659, 18, 43, ...
if self.debug > 0: print 'restart required! because cell changed'
log.debug('restart required! because cell changed')
def calculation_required(self, atoms=None, quantities=None): ''' determines if a calculation is needed.
97d65b7f6de853ae8bd02694f63966f3dfe9ab9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/97d65b7f6de853ae8bd02694f63966f3dfe9ab9e/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11096, 67, 4718, 12, 2890, 16, 9006, 33, 7036, 16, 10251, 1961, 33, 7036, 4672, 9163, 12949, 309, 279, 11096, 353, 3577, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11096, 67, 4718, 12, 2890, 16, 9006, 33, 7036, 16, 10251, 1961, 33, 7036, 4672, 9163, 12949, 309, 279, 11096, 353, 3577, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for condition in step2.keys() : print 'step 2 condition:',condition,' command:',step2[condition]['command'],' outputname:',step2[condition]['outputname']
for tag in step2.keys() : print 'step 2 condition:',tag,' command:',step2[tag]['command'],' outputname:',step2[tag]['outputname']
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection script - prepare local DBS query script required parameters --samples <textfile> : list of RelVal sample parameter-sets in plain text file, one sample per line, # marks comment --version <processing version> : processing version (v1, v2, ... ) --DBSURL <URL> : URL of the local DBS (http://cmsdbsprod.cern.ch/cms_dbs_prod_local_07/servlet/DBSServlet, http://cmssrv46.fnal.gov:8080/DBS126/servlet/DBSServlet) optional parameters : --lumi <number> : initial run for generation (default: 666666), set it to 777777 for high statistics samples --event <number> : initial event number --help (-h) : help --debug (-d) : debug statements """ # default try: version = os.environ.get("CMSSW_VERSION") except: print '' print 'CMSSW version cannot be determined from $CMSSW_VERSION' sys.exit(2) try: architecture = os.environ.get("SCRAM_ARCH") except: print '' print 'CMSSW architecture cannot be determined from $SCRAM_ARCH' sys.exit(2) samples = None processing_version = None initial_run = "666666" initial_event = None debug = 0 DBSURL = None try: opts, args = getopt.getopt(argv, "", ["help", "debug", "samples=", "version=", "DBSURL=", "event=", "lumi="]) except getopt.GetoptError: print main.__doc__ sys.exit(2) # check command line parameter for opt, arg in opts : if opt == "--help" : print main.__doc__ sys.exit() elif opt == "--debug" : debug = 1 elif opt == "--samples" : samples = arg elif opt == "--version" : processing_version = arg
b74a22b85cc9cbbc45fc20dac1245123cb4ff30c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/b74a22b85cc9cbbc45fc20dac1245123cb4ff30c/prepareRelValWorkflows.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 13, 294, 3536, 225, 2911, 1971, 3053, 13815, 87, 225, 2911, 31738, 364, 20269, 4929, 434, 4275, 3053, 5216, 225, 300, 1109, 585, 19918, 6166, 4668, 4364, 364, 404, 334, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 13, 294, 3536, 225, 2911, 1971, 3053, 13815, 87, 225, 2911, 31738, 364, 20269, 4929, 434, 4275, 3053, 5216, 225, 300, 1109, 585, 19918, 6166, 4668, 4364, 364, 404, 334, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 630) else quickfix.IntField.__init__(self, 630, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 5082, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 5082, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
if debug: print 'TwistedProtocolWrapper.dataReceived'
def dataReceived(self, data): if debug: print 'TwistedProtocolWrapper.dataReceived' if not self.tlsStarted: ProtocolWrapper.dataReceived(self, data) return
6bd05411f82511020c78f7c57b7ad7f36252149e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8055/6bd05411f82511020c78f7c57b7ad7f36252149e/TwistedProtocolWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 501, 4672, 309, 486, 365, 18, 17116, 9217, 30, 4547, 3611, 18, 892, 8872, 12, 2890, 16, 501, 13, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 8872, 12, 2890, 16, 501, 4672, 309, 486, 365, 18, 17116, 9217, 30, 4547, 3611, 18, 892, 8872, 12, 2890, 16, 501, 13, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for item in new_value:
for item in value:
def copy(self): """Return a deep copy of the node.""" result = object.__new__(self.__class__) for field, value in self.iter_fields(): if isinstance(value, Node): new_value = value.copy() elif isinstance(value, list): new_value = [] for item in new_value: if isinstance(item, Node): item = item.copy() else: item = copy(item) new_value.append(item) else: new_value = copy(new_value) setattr(result, field, new_value) for attr in self.attributes: try: setattr(result, attr, getattr(self, attr)) except AttributeError: pass return result
d436e98474eadda52076d5c4316c0797ea45e136 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14446/d436e98474eadda52076d5c4316c0797ea45e136/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 4672, 3536, 990, 279, 4608, 1610, 434, 326, 756, 12123, 563, 273, 733, 16186, 2704, 972, 12, 2890, 16186, 1106, 972, 13, 364, 652, 16, 460, 316, 365, 18, 2165, 67, 2821...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 4672, 3536, 990, 279, 4608, 1610, 434, 326, 756, 12123, 563, 273, 733, 16186, 2704, 972, 12, 2890, 16186, 1106, 972, 13, 364, 652, 16, 460, 316, 365, 18, 2165, 67, 2821...
if isdir(name):
if isdir(name) and not islink(name):
def walk(top, func, arg): """Directory tree walk with callback function. For each directory in the directory tree rooted at top (including top itself, but excluding '.' and '..'), call func(arg, dirname, fnames). dirname is the name of the directory, and fnames a list of the names of the files and subdirectories in dirname (excluding '.' and '..'). func may modify the fnames list in-place (e.g. via del or slice assignment), and walk will only recurse into the subdirectories whose names remain in fnames; this can be used to implement a filter, or to impose a specific order of visiting. No semantics are defined for, or required of, arg, beyond that arg is always passed to func. It can be used, e.g., to pass a filename pattern, or a mutable object designed to accumulate statistics. Passing None for arg is common.""" try: names = os.listdir(top) except os.error: return func(arg, top, names) for name in names: name = join(top, name) if isdir(name): walk(name, func, arg)
bd8abf16433aa652c206ff603980bcc3f1d35392 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bd8abf16433aa652c206ff603980bcc3f1d35392/macpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 12, 3669, 16, 1326, 16, 1501, 4672, 3536, 2853, 2151, 5442, 598, 1348, 445, 18, 225, 2457, 1517, 1867, 316, 326, 1867, 2151, 1365, 329, 622, 1760, 261, 31348, 1760, 6174, 16, 1496,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 12, 3669, 16, 1326, 16, 1501, 4672, 3536, 2853, 2151, 5442, 598, 1348, 445, 18, 225, 2457, 1517, 1867, 316, 326, 1867, 2151, 1365, 329, 622, 1760, 261, 31348, 1760, 6174, 16, 1496,...
cursor.execute(sql)
cursor.execute(sql)
def _is_auto_field(self, cursor, table_name, column_name): """Checks whether column is an identity column, using COLUMNPROPERTY. See: http://msdn2.microsoft.com/en-us/library/ms174968.aspx """ sql = "SELECT COLUMNPROPERTY(OBJECT_ID(N'%s'), N'%s', 'IsIdentity')" % \ (table_name, column_name)
672a3bf79aaf9caebe9d1386b47cf42345466cd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/672a3bf79aaf9caebe9d1386b47cf42345466cd3/introspection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 6079, 67, 1518, 12, 2890, 16, 3347, 16, 1014, 67, 529, 16, 1057, 67, 529, 4672, 3536, 4081, 2856, 1057, 353, 392, 4215, 1057, 16, 1450, 13473, 9900, 18, 225, 2164, 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, 389, 291, 67, 6079, 67, 1518, 12, 2890, 16, 3347, 16, 1014, 67, 529, 16, 1057, 67, 529, 4672, 3536, 4081, 2856, 1057, 353, 392, 4215, 1057, 16, 1450, 13473, 9900, 18, 225, 2164, 30, ...
node.WikiCategory.append(obj2.node)
node.WikiCategory.add(obj2.node)
def addToGraphWithFilter(self, graphdata, outgraph, obj1, obj2): # If true, add the edge add_edge = True # Redo for category as metadata redo_node = []
3af0763bf216ef36e7efb205e4668a0dcdd02b6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/3af0763bf216ef36e7efb205e4668a0dcdd02b6b/ShowGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9604, 4137, 1190, 1586, 12, 2890, 16, 2667, 892, 16, 596, 4660, 16, 1081, 21, 16, 1081, 22, 4672, 468, 971, 638, 16, 527, 326, 3591, 527, 67, 7126, 273, 1053, 468, 4621, 83, 364, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9604, 4137, 1190, 1586, 12, 2890, 16, 2667, 892, 16, 596, 4660, 16, 1081, 21, 16, 1081, 22, 4672, 468, 971, 638, 16, 527, 326, 3591, 527, 67, 7126, 273, 1053, 468, 4621, 83, 364, 315...
if sysu: major = int((sysu & 0xFF000000L) >> 24) minor = (sysu & 0x00F00000) >> 20 bugfix = (sysu & 0x000F0000) >> 16 stage = (sysu & 0x0000FF00) >> 8 nonrel = (sysu & 0x000000FF) version = '%s.%i.%i' % (_bcd2str(major),minor,bugfix) nonrel = _bcd2str(nonrel) stage = {0x20:'development', 0x40:'alpha', 0x60:'beta', 0x80:'final'}.get(stage,'') versioninfo = (version,stage,nonrel)
def mac_ver(release='',versioninfo=('','',''),machine=''): """ Get MacOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the paramter values which default to ''. All tuple entries are strings. Thanks to Mark R. Levinson for mailing documentation links and code examples for this function. Documentation for the gestalt() API is available online at: http://www.rgaros.nl/gestalt/ """ # Check whether the version info module is available try: import gestalt import MacOS except ImportError: return release,versioninfo,machine # Get the infos sysv,sysu,sysa = _mac_ver_lookup(('sysv','sysu','sysa')) # Decode the infos if sysv: major = (sysv & 0xFF00) >> 8 minor = (sysv & 0x00F0) >> 4 patch = (sysv & 0x000F) if (major, minor) >= (10, 4): # the 'sysv' gestald cannot return patchlevels # higher than 9. Apple introduced 3 new # gestalt codes in 10.4 to deal with this # issue (needed because patch levels can # run higher than 9, such as 10.4.11) major,minor,patch = _mac_ver_lookup(('sys1','sys2','sys3')) release = '%i.%i.%i' %(major, minor, patch) else: release = '%s.%i.%i' % (_bcd2str(major),minor,patch) if sysu: # NOTE: this block is left as documentation of the # intention of this function, the 'sysu' gestalt is no # longer available and there are no alternatives. major = int((sysu & 0xFF000000L) >> 24) minor = (sysu & 0x00F00000) >> 20 bugfix = (sysu & 0x000F0000) >> 16 stage = (sysu & 0x0000FF00) >> 8 nonrel = (sysu & 0x000000FF) version = '%s.%i.%i' % (_bcd2str(major),minor,bugfix) nonrel = _bcd2str(nonrel) stage = {0x20:'development', 0x40:'alpha', 0x60:'beta', 0x80:'final'}.get(stage,'') versioninfo = (version,stage,nonrel) if sysa: machine = {0x1: '68k', 0x2: 'PowerPC', 0xa: 'i386'}.get(sysa,'') return release,versioninfo,machine
616c29f7bb808f63e8b5407b0d9ccbb5eb18039e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/616c29f7bb808f63e8b5407b0d9ccbb5eb18039e/platform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5318, 67, 502, 12, 9340, 2218, 2187, 1589, 1376, 33, 2668, 17023, 2187, 6309, 3631, 9149, 2218, 11, 4672, 225, 3536, 968, 13217, 4618, 1177, 1779, 471, 327, 518, 487, 3193, 261, 9340, 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, 5318, 67, 502, 12, 9340, 2218, 2187, 1589, 1376, 33, 2668, 17023, 2187, 6309, 3631, 9149, 2218, 11, 4672, 225, 3536, 968, 13217, 4618, 1177, 1779, 471, 327, 518, 487, 3193, 261, 9340, 16...
if time_zero != None: (t_descr,e_descr) = hlr_utils.get_descr(time_zero)
if time_zero is not None: t_descr = hlr_utils.get_descr(time_zero)
def tof_to_initial_wavelength_igs(obj,**kwargs): """ This function converts a primary axis of a SOM or SO from time-of-flight to initial_wavelength_igs. The time-of-flight axis for a SOM must be in units of microseconds. The primary axis of a SO is assumed to be in units of microseconds. A tuple of [tof, tof_err2] (assumed to be in units of microseconds) can be converted to [initial_wavelength_igs, initial_wavelength_igs_err2]. Parameters: ---------- -> obj is the SOM, SO or tuple to be converted -> kwargs is a list of key word arguments that the function accepts: lambda_f= a tuple containing the final wavelength and its associated error^2 time_zero= a tuple containing the time zero offset and its associated error^2 dist_source_sample= a tuple or list of tuples containing the source to sample distance information and its associated error^2 dist_sample_detector= a tuple or list of tuples containing the sample to detector distance information and its associated error^2 run_filter=<True or False> This determines if the filter on the negative wavelengths is run units= a string containing the expected units for this function. The default for this function is microseconds Return: ------ <- A SOM or SO with a primary axis in time-of-flight or a tuple converted to initial_wavelength_igs Exceptions: ---------- <- TypeError is raised if the incoming object is not a type the function recognizes <- RuntimeError is raised if the SOM x-axis units are not microseconds """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(obj) (o_descr,d_descr)=hlr_utils.get_descr(obj) # Setup keyword arguments try: lambda_f = kwargs["lambda_f"] except KeyError: lambda_f = None try: time_zero = kwargs["time_zero"] except KeyError: time_zero = None try: dist_source_sample = kwargs["dist_source_sample"] except KeyError: dist_source_sample = None try: dist_sample_detector = kwargs["dist_sample_detector"] except KeyError: dist_sample_detector = None try: units = kwargs["units"] except KeyError: units = "microseconds" try: run_filter = kwargs["run_filter"] except KeyError: run_filter = True # Primary axis for transformation. If a SO is passed, the function, will # assume the axis for transformation is at the 0 position if o_descr == "SOM": axis = hlr_utils.hlr_1D_units(obj, units) else: axis = 0 result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) if res_descr == "SOM": result = hlr_utils.hlr_force_units(result, "Angstroms", axis) result.setAxisLabel(axis, "wavelength") result.setYUnits("Counts/A") result.setYLabel("Intensity") else: pass # Where to get instrument information if dist_source_sample == None or dist_sample_detector == None: if o_descr == "SOM": try: obj.attr_list.instrument.get_primary() inst = obj.attr_list.instrument except RuntimeError: raise RuntimeError, "A detector was not provided!" else: if dist_source_sample == None and dist_sample_detector == None: raise RuntimeError, "If a SOM is not passed, the "\ +"source-sample and sample-detector distances must be "\ +"provided." elif dist_source_sample == None: raise RuntimeError, "If a SOM is not passed, the "\ +"source-sample distance must be provided." elif dist_sample_detector == None: raise RuntimeError, "If a SOM is not passed, the "\ +"sample-detector distance must be provided." else: raise RuntimeError, "If you get here, see Steve Miller for "\ +"your mug." else: pass if lambda_f != None: (l_descr,e_descr) = hlr_utils.get_descr(lambda_f) else: if o_descr == "SOM": try: som_l_f = obj.attr_list["Wavelength_final"] except KeyError: raise RuntimeError, "Please provide a final wavelength "\ +"parameter either via the function call or the SOM" else: raise RuntimeError, "You need to provide a final wavelength" if time_zero != None: (t_descr,e_descr) = hlr_utils.get_descr(time_zero) else: if o_descr == "SOM": try: obj.attr_list["Time_zero"] t_0 = obj.attr_list["Time_zero"][0] t_0_err2 = obj.attr_list["Time_zero"][1] except KeyError: raise RuntimeError, "Please provide a time-zero "\ +"parameter either via the function call or the SOM" else: t_0 = 0.0 t_0_err2 = 0.0 if dist_source_sample != None: (ls_descr,e_descr) = hlr_utils.get_descr(dist_source_sample) # Do nothing, go on else: pass if dist_sample_detector != None: (ld_descr,e_descr) = hlr_utils.get_descr(dist_sample_detector) # Do nothing, go on else: pass if o_descr == "SOM" and run_filter: length = len(obj[0]) filter = True elif o_descr == "SO" and run_filter: length = len(obj) filter = True else: filter = False # iterate through the values import axis_manip for i in range(hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"x",axis) err2 = hlr_utils.get_err2(obj,i,o_descr,"x",axis) map_so = hlr_utils.get_map_so(obj,None,i) if dist_source_sample == None: (L_s,L_s_err2) = hlr_utils.get_parameter("primary",map_so,inst) else: L_s = hlr_utils.get_value(dist_source_sample,i,ls_descr) L_s_err2 = hlr_utils.get_err2(dist_source_sample,i,ls_descr) if dist_sample_detector == None: (L_d,L_d_err2) = hlr_utils.get_parameter("secondary",map_so,inst) else: L_d = hlr_utils.get_value(dist_sample_detector,i,ld_descr) L_d_err2 = hlr_utils.get_err2(dist_sample_detector,i,ld_descr) if lambda_f != None: l_f = hlr_utils.get_value(lambda_f,i,t_descr) l_f_err2 = hlr_utils.get_err2(lambda_f,i,t_descr) else: l_f_tuple = hlr_utils.get_special(som_l_f, map_so) l_f = l_f_tuple[0] l_f_err2 = l_f_tuple[1] if time_zero != None: t_0 = hlr_utils.get_value(time_zero,i,t_descr) t_0_err2 = hlr_utils.get_err2(time_zero,i,t_descr) else: pass value=axis_manip.tof_to_initial_wavelength_igs(val, err2, l_f, l_f_err2, t_0, t_0_err2, L_s, L_s_err2, L_d, L_d_err2) # Remove all wavelengths < 0 if filter: index = 0 for val in value[0]: if val > 0: break index += 1 value[0].__delslice__(0,index) value[1].__delslice__(0,index) map_so.y.__delslice__(0,index) map_so.var_y.__delslice__(0,index) hlr_utils.result_insert(result,res_descr,value,map_so,"x",axis) return result
f2732e272bffc96d577287672dd8a0fe10605815 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/f2732e272bffc96d577287672dd8a0fe10605815/hlr_tof_to_initial_wavelength_igs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 6769, 67, 91, 16775, 67, 360, 87, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 813, 17, 792, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 6769, 67, 91, 16775, 67, 360, 87, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 813, 17, 792, 17, ...
print "[AutoBackup] ***** data:", str
def dataAvail(self, str): print "[AutoBackup] ***** data:", str self.data += str self.showOutput()
a3d8f2c4f33c23ce60252053d181d4d05f4273b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12173/a3d8f2c4f33c23ce60252053d181d4d05f4273b0/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 3769, 671, 12, 2890, 16, 609, 4672, 365, 18, 892, 1011, 609, 365, 18, 4500, 1447, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 3769, 671, 12, 2890, 16, 609, 4672, 365, 18, 892, 1011, 609, 365, 18, 4500, 1447, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for var in doc.variables.items(): pass
for var in doc.variables.values(): self._get_index_terms(var.descr, var, terms, links) for (field, arg, descr) in var.metadata: self._get_index_terms(descr, var, terms, links)
def _extract_term_index(self): """ Extract the set of terms that should be indexed from all documented docstrings. Return the extracted set as a list of tuples of the form C{(key, term, [links])}. This list is used by L{write_indices()} to construct the term index. @rtype: C{list} of C{(string, ParsedDocstring, list of ValueDoc)} """ terms = {} links = {} for doc in self.valdocs: self._get_index_terms(doc.descr, doc, terms, links) if doc.metadata not in (None, UNKNOWN): for (field, arg, descr) in doc.metadata: self._get_index_terms(descr, doc, terms, links) # summary? if isinstance(doc, NamespaceDoc): for var in doc.variables.items(): pass # [XX] ????? add these??? elif isinstance(doc, RoutineDoc): self._get_index_terms(doc.return_descr, doc, terms, links) self._get_index_terms(doc.return_type, doc, terms, links) if doc.arg_descrs not in (None, UNKNOWN): for arg, descr in doc.arg_descrs: self._get_index_terms(descr, doc, terms, links) if doc.arg_types not in (None, UNKNOWN): for arg, descr in doc.arg_types.items(): self._get_index_terms(descr, doc, terms, links) if doc.exception_descrs not in (None, UNKNOWN): for excname, descr in doc.exception_descrs: self._get_index_terms(descr, doc, terms, links) elif isinstance(doc, PropertyDoc): self._get_index_terms(doc.type_descr, doc, terms, links) # Combine terms & links into one list keys = terms.keys() keys.sort() return [(k, terms[k], links[k]) for k in keys]
896efdcbc34c9ccecca07067a434506c3fb65345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/896efdcbc34c9ccecca07067a434506c3fb65345/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 67, 6408, 67, 1615, 12, 2890, 4672, 3536, 8152, 326, 444, 434, 6548, 716, 1410, 506, 8808, 628, 777, 23051, 997, 10219, 18, 225, 2000, 326, 9438, 444, 487, 279, 666, 434, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 67, 6408, 67, 1615, 12, 2890, 4672, 3536, 8152, 326, 444, 434, 6548, 716, 1410, 506, 8808, 628, 777, 23051, 997, 10219, 18, 225, 2000, 326, 9438, 444, 487, 279, 666, 434, 10...
exit_status = 0
def run(argv, ringmaster_class): usage = ("%prog [options] <control file> [command]\n\n" "commands: run (default), stop, show, report, reset, check") parser = OptionParser(usage=usage, prog="ringmaster") parser.add_option("--max-games", "-g", type="int", help="maximum number of games to play in this run") parser.add_option("--parallel", "-j", type="int", help="number of worker processes") parser.add_option("--quiet", "-q", action="store_true", help="silent except for warnings and errors") parser.add_option("--log-gtp", action="store_true", help="write GTP logs") (options, args) = parser.parse_args() if len(args) == 0: parser.error("no control file specified") if len(args) > 2: parser.error("too many arguments") if len(args) == 1: command = "run" else: command = args[1] if command not in ("run", "stop", "show", "report", "reset", "check", "debugstatus"): parser.error("no such command: %s" % command) tourn_pathname = args[0] if not tourn_pathname.endswith(".tourn"): parser.error("not a .tourn file") exit_status = 0 try: if not os.path.exists(tourn_pathname): raise RingmasterError("control file %s not found" % tourn_pathname) ringmaster = ringmaster_class(tourn_pathname) if command == "run": if options.log_gtp: ringmaster.enable_gtp_logging() if options.quiet: ringmaster.set_quiet_mode() do_run(ringmaster, options.parallel, options.max_games) elif command == "show": do_show(ringmaster) elif command == "stop": do_stop(ringmaster) elif command == "report": do_report(ringmaster) elif command == "reset": do_reset(ringmaster) elif command == "check": if not ringmaster.check_players(): exit_status = 1 elif command == "debugstatus": ringmaster.print_status() else: raise AssertionError except RingmasterError, e: print >>sys.stderr, "ringmaster:", e exit_status = 1 except KeyboardInterrupt: exit_status = 3 except job_manager.JobSourceError, e: print >>sys.stderr, "ringmaster: internal error" print >>sys.stderr, e exit_status = 4 except: print >>sys.stderr, "ringmaster: internal error" compact_tracebacks.log_traceback() exit_status = 4 sys.exit(exit_status)
ac6c1f7abe9d9a8a1a88544224f43fd9da450736 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6121/ac6c1f7abe9d9a8a1a88544224f43fd9da450736/ringmaster_command_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 19485, 16, 9221, 7525, 67, 1106, 4672, 4084, 273, 7566, 9, 14654, 306, 2116, 65, 411, 7098, 585, 34, 306, 3076, 13944, 82, 64, 82, 6, 315, 7847, 30, 1086, 261, 1886, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19485, 16, 9221, 7525, 67, 1106, 4672, 4084, 273, 7566, 9, 14654, 306, 2116, 65, 411, 7098, 585, 34, 306, 3076, 13944, 82, 64, 82, 6, 315, 7847, 30, 1086, 261, 1886, 3631, ...
if not hasattr(self.calc, 'sort'): self.calc.sort = self.calc.resort = range(len(self.atoms)) else: self.calc.resort = range(len(self.sort)) for n in range(len(self.resort)): self.resort[self.sort[n]] = n
if not sort: if not hasattr(self.calc, 'sort'): self.calc.sort = range(len(self.atoms)) else: self.calc.sort = sort self.calc.resort = range(len(self.calc.sort)) for n in range(len(self.calc.resort)): self.calc.resort[self.calc.sort[n]] = n
def __init__(self, trajectory=None, atoms=None, poscar=None, xdatcar=None, sort=None, calc=None): if not poscar: self.poscar = 'POSCAR' else: self.poscar = poscar if not atoms: self.atoms = ase.io.read(self.poscar, format='vasp') else: self.atoms = atoms if not xdatcar: self.xdatcar = 'XDATCAR' else: self.xdatcar = xdatcar if not trajectory: self.trajectory = 'out.traj' else: self.trajectory = trajectory if not calc: self.calc = Vasp() else: self.calc = calc if not hasattr(self.calc, 'sort'): self.calc.sort = self.calc.resort = range(len(self.atoms)) else: self.calc.resort = range(len(self.sort)) for n in range(len(self.resort)): self.resort[self.sort[n]] = n self.out = ase.io.trajectory.PickleTrajectory(self.trajectory, mode='w') self.energies = self.calc.read_energy(all=True)[1] self.forces = self.calc.read_forces(self.atoms, all=True)
34edd60ad67e74a36ec90e849f24fcc8c8d85776 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/34edd60ad67e74a36ec90e849f24fcc8c8d85776/vasp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 27016, 33, 7036, 16, 9006, 33, 7036, 16, 949, 9815, 33, 7036, 16, 619, 3404, 9815, 33, 7036, 16, 1524, 33, 7036, 16, 7029, 33, 7036, 4672, 309, 486, 94...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27016, 33, 7036, 16, 9006, 33, 7036, 16, 949, 9815, 33, 7036, 16, 619, 3404, 9815, 33, 7036, 16, 1524, 33, 7036, 16, 7029, 33, 7036, 4672, 309, 486, 94...
return cls(key_name=pk, user=user, **kwargs)
name = kwargs.get("name") if "name" in kwargs: del kwargs["name"] instance = cls(key_name=pk, user=user, **kwargs) instance.name = name return instance
def create(cls, user, **kwargs): pk = cls._make_pk(user) return cls(key_name=pk, user=user, **kwargs)
e26c22d23232af7ca9f9855d234681f1a39771e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2051/e26c22d23232af7ca9f9855d234681f1a39771e7/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 6429, 16, 729, 16, 2826, 4333, 4672, 2365, 273, 2028, 6315, 6540, 67, 5465, 12, 1355, 13, 327, 2028, 12, 856, 67, 529, 33, 5465, 16, 729, 33, 1355, 16, 2826, 4333, 13, 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, 752, 12, 6429, 16, 729, 16, 2826, 4333, 4672, 2365, 273, 2028, 6315, 6540, 67, 5465, 12, 1355, 13, 327, 2028, 12, 856, 67, 529, 33, 5465, 16, 729, 33, 1355, 16, 2826, 4333, 13, 2, ...
columnarItem.Show(false)
columnarItem.Show(False)
def _displayEvents(self): """Display all events in the current time range. """ # @@@ Currently a hack, we have a list of all events, # and hide/show events in the current time range # Note: set the bounds and visibility without doing a refresh, # we want one global refresh
75af3b9581bf19408b14b20fc81f3196ac1304ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/75af3b9581bf19408b14b20fc81f3196ac1304ca/ColumnarTimeView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5417, 3783, 12, 2890, 4672, 3536, 4236, 777, 2641, 316, 326, 783, 813, 1048, 18, 3536, 468, 22175, 36, 15212, 279, 11769, 16, 732, 1240, 279, 666, 434, 777, 2641, 16, 468, 377, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5417, 3783, 12, 2890, 4672, 3536, 4236, 777, 2641, 316, 326, 783, 813, 1048, 18, 3536, 468, 22175, 36, 15212, 279, 11769, 16, 732, 1240, 279, 666, 434, 777, 2641, 16, 468, 377, 47...
i = 0 while i < len(proxyOverride): if proxyOverride[i] == '<local>': proxyOverride[i:i+1] = ['localhost', '127.0.0.1', socket.gethostname(), socket.gethostbyname( socket.gethostname())] i += 1
def proxy_bypass_registry(host): try: import winreg import re except ImportError: # Std modules, so should be around - but you never know! return 0 try: internetSettings = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Internet Settings') proxyEnable = winreg.QueryValueEx(internetSettings, 'ProxyEnable')[0] proxyOverride = str(winreg.QueryValueEx(internetSettings, 'ProxyOverride')[0]) # ^^^^ Returned as Unicode but problems if not converted to ASCII except WindowsError: return 0 if not proxyEnable or not proxyOverride: return 0 # try to make a host list from name and IP address. rawHost, port = splitport(host) host = [rawHost] try: addr = socket.gethostbyname(rawHost) if addr != rawHost: host.append(addr) except socket.error: pass try: fqdn = socket.getfqdn(rawHost) if fqdn != rawHost: host.append(fqdn) except socket.error: pass # make a check value list from the registry entry: replace the # '<local>' string by the localhost entry and the corresponding # canonical entry. proxyOverride = proxyOverride.split(';') i = 0 while i < len(proxyOverride): if proxyOverride[i] == '<local>': proxyOverride[i:i+1] = ['localhost', '127.0.0.1', socket.gethostname(), socket.gethostbyname( socket.gethostname())] i += 1 # print proxyOverride # now check if we match one of the registry values. for test in proxyOverride: test = test.replace(".", r"\.") # mask dots test = test.replace("*", r".*") # change glob sequence test = test.replace("?", r".") # change glob char for val in host: # print "%s <--> %s" %( test, val ) if re.match(test, val, re.I): return 1 return 0
4947606ecca1248bdfa9a71c7ea28239d0f64f56 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/4947606ecca1248bdfa9a71c7ea28239d0f64f56/request.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 29604, 67, 9893, 12, 2564, 4672, 775, 30, 1930, 5657, 1574, 1930, 283, 1335, 11308, 30, 468, 6276, 4381, 16, 1427, 1410, 506, 6740, 300, 1496, 1846, 5903, 5055, 5, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 29604, 67, 9893, 12, 2564, 4672, 775, 30, 1930, 5657, 1574, 1930, 283, 1335, 11308, 30, 468, 6276, 4381, 16, 1427, 1410, 506, 6740, 300, 1496, 1846, 5903, 5055, 5, 327, 374, ...
vlen = 10 * 30 * 768 iters = 1000
vlen = 10 * 30 * 70 iters = 10
def test_using_gpu_2(self):
fa55c51bd1efa263ce0e6f56714324e3514a5b14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/fa55c51bd1efa263ce0e6f56714324e3514a5b14/test_tutorial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9940, 67, 23162, 67, 22, 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...
[ 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, 67, 9940, 67, 23162, 67, 22, 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, ...
train(h, s, True, force, trainnew)
train(h, s, True, force, trainnew, removetrained)
def main(): """Main program; parse options and go.""" global loud try: opts, args = getopt.getopt(sys.argv[1:], 'hfqnd:D:g:s:') except getopt.error, msg: usage(2, msg) if not opts: usage(2, "No options given") pck = None usedb = None force = False trainnew = False good = [] spam = [] for opt, arg in opts: if opt == '-h': usage(0) elif opt == "-f": force = True elif opt == "-n": trainnew = True elif opt == "-q": loud = False elif opt == '-g': good.append(arg) elif opt == '-s': spam.append(arg) elif opt == "-d": usedb = True pck = arg elif opt == "-D": usedb = False pck = arg if args: usage(2, "Positional arguments not allowed") if usedb == None: usage(2, "Must specify one of -d or -D") h = hammie.open(pck, usedb, "c") for g in good: if loud: print "Training ham (%s):" % g train(h, g, False, force, trainnew) save = True for s in spam: if loud: print "Training spam (%s):" % s train(h, s, True, force, trainnew) save = True if save: h.store()
0927af8f2c4fb18ef58c0b4fef71b468f866dfb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/0927af8f2c4fb18ef58c0b4fef71b468f866dfb6/mboxtrain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 5402, 31, 1109, 702, 471, 1960, 12123, 225, 2552, 437, 1100, 225, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 6376, 5402, 31, 1109, 702, 471, 1960, 12123, 225, 2552, 437, 1100, 225, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487,...
if bytes_recv > 524288 and not rein_sent:
if not rein_sent:
def test_rein_during_transfer(self): self.client.login(user=USER, passwd=PASSWD) data = 'abcde12345' * 100000 self.file.write(data) self.file.close()
ba3f6d142c156348fcb5a22e269347fca65ec108 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7236/ba3f6d142c156348fcb5a22e269347fca65ec108/test_ftpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 266, 267, 67, 72, 4017, 67, 13866, 12, 2890, 4672, 365, 18, 2625, 18, 5819, 12, 1355, 33, 4714, 16, 19093, 33, 10884, 16006, 13, 501, 273, 296, 18947, 323, 2138, 25574, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 266, 267, 67, 72, 4017, 67, 13866, 12, 2890, 4672, 365, 18, 2625, 18, 5819, 12, 1355, 33, 4714, 16, 19093, 33, 10884, 16006, 13, 501, 273, 296, 18947, 323, 2138, 25574, 11, ...
ndeps = self._cache.read(cacheId, memory=True)
ndeps = cache.read(cacheId, memory=True)
def getMethodDepsR(classId, methodId, variants, deps): console.debug("%s#%s dependencies:" % (classId, methodId)) console.indent()
9b42a4791cdc214f7766715090b1117a1f44ce46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9b42a4791cdc214f7766715090b1117a1f44ce46/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6272, 14430, 54, 12, 1106, 548, 16, 707, 548, 16, 12935, 16, 8740, 4672, 2983, 18, 4148, 27188, 87, 7, 9, 87, 5030, 2773, 738, 261, 1106, 548, 16, 707, 548, 3719, 2983, 18, 9355, 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, 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, 6272, 14430, 54, 12, 1106, 548, 16, 707, 548, 16, 12935, 16, 8740, 4672, 2983, 18, 4148, 27188, 87, 7, 9, 87, 5030, 2773, 738, 261, 1106, 548, 16, 707, 548, 3719, 2983, 18, 9355, 143...
raise SystemExit, 0
self.end(0)
def event(self, event): #Check for keyp up/down and set new selection if event.type == KEYDOWN and event.key == K_DOWN: if (self.selection < self.ammount-1): self.selection += 1 if event.type == KEYDOWN and event.key == K_UP: if (self.selection > 0): self.selection += -1 #check for enter and do action (currently only for main-menu) if event.type == KEYDOWN and event.key == K_RETURN: if self.selection == 0: self.end(0) if self.selection == 1: pass if self.selection == 2: raise SystemExit, 0
52775a33db935d2225a5ee278cf4f542fcbf5d70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4653/52775a33db935d2225a5ee278cf4f542fcbf5d70/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 12, 2890, 16, 871, 4672, 468, 1564, 364, 498, 84, 731, 19, 2378, 471, 444, 394, 4421, 309, 871, 18, 723, 422, 5311, 12711, 471, 871, 18, 856, 422, 1475, 67, 12711, 30, 309, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 12, 2890, 16, 871, 4672, 468, 1564, 364, 498, 84, 731, 19, 2378, 471, 444, 394, 4421, 309, 871, 18, 723, 422, 5311, 12711, 471, 871, 18, 856, 422, 1475, 67, 12711, 30, 309, 261,...
"{0.name!r:b} {0[n]} {name!s: } {{test}} {{}}"
"{0.name!r:b} {0[n]} {name!s: } {{test}} {{}} {} {.__len__:s}"
def функция
f259b31b50f3152dc27e1d4874d32c6c110e6fdb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9191/f259b31b50f3152dc27e1d4874d32c6c110e6fdb/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 225, 146, 231, 146, 230, 145, 126, 145, 123, 146, 233, 145, 121, 146, 242, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 225, 146, 231, 146, 230, 145, 126, 145, 123, 146, 233, 145, 121, 146, 242, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
r=db().undoLog()
r=db().undoLog(first_transaction, last_transaction)
def undoable_transactions(self, AUTHENTICATION_PATH=None, first_transaction=None, last_transaction=None, PrincipiaUndoBatchSize=None):
2c0fd90a5ec78284b2e81354a10de8269d71305f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2c0fd90a5ec78284b2e81354a10de8269d71305f/Undo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 429, 67, 20376, 12, 2890, 16, 12790, 18915, 2689, 67, 4211, 33, 7036, 16, 1122, 67, 7958, 33, 7036, 16, 1142, 67, 7958, 33, 7036, 16, 2301, 4613, 1155, 31224, 23304, 33, 7036, 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, 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, 15436, 429, 67, 20376, 12, 2890, 16, 12790, 18915, 2689, 67, 4211, 33, 7036, 16, 1122, 67, 7958, 33, 7036, 16, 1142, 67, 7958, 33, 7036, 16, 2301, 4613, 1155, 31224, 23304, 33, 7036, 4...
self._variable_cache[o._expression] = o x2, xdiff = self.visit(o._expression)
e2, ep = self.visit(e) op = ep if e2 != e: o = Variable(e2, l) error("Expression has changed during visit, how did this happen? Might be ok, just wondering.")
def variable(self, o): if o.label() == self._variable.label(): op = self._make_ones_diff(o) return (o, op) else: self._variable_cache[o._expression] = o x2, xdiff = self.visit(o._expression) ufl_assert(o is x2, "How did this happen?") return (o, xdiff)
8be723d9b957f1b19db2cd66f3cdd9bc6c338e28 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/624/8be723d9b957f1b19db2cd66f3cdd9bc6c338e28/forward_ad.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2190, 12, 2890, 16, 320, 4672, 309, 320, 18, 1925, 1435, 422, 365, 6315, 6105, 18, 1925, 13332, 1061, 273, 365, 6315, 6540, 67, 5322, 67, 5413, 12, 83, 13, 327, 261, 83, 16, 1061, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2190, 12, 2890, 16, 320, 4672, 309, 320, 18, 1925, 1435, 422, 365, 6315, 6105, 18, 1925, 13332, 1061, 273, 365, 6315, 6540, 67, 5322, 67, 5413, 12, 83, 13, 327, 261, 83, 16, 1061, 13...
self.assertRaises(ValueError, a.__setitem__, slice(0, 10, 2), [1,2])
def test_set_subscript(self): a = self.type2test(range(20)) self.assertRaises(ValueError, a.__setitem__, slice(0, 10, 0), [1,2,3]) self.assertRaises(TypeError, a.__setitem__, slice(0, 10), 1) self.assertRaises(ValueError, a.__setitem__, slice(0, 10, 2), [1,2]) self.assertRaises(TypeError, a.__getitem__, 'x', 1) a[slice(2,10,3)] = [1,2,3] self.assertEqual(a, self.type2test([0, 1, 1, 3, 4, 2, 6, 7, 3, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]))
c4772043f48e891acb192a3053d8a49ed5e964d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6753/c4772043f48e891acb192a3053d8a49ed5e964d4/list_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 1717, 4263, 12, 2890, 4672, 279, 273, 365, 18, 723, 22, 3813, 12, 3676, 12, 3462, 3719, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 279, 16186, 542, 1726, 972, 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, 1842, 67, 542, 67, 1717, 4263, 12, 2890, 4672, 279, 273, 365, 18, 723, 22, 3813, 12, 3676, 12, 3462, 3719, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 279, 16186, 542, 1726, 972, 16, ...
%s/share/specto/icons/hicolor''' % prefix
%s/share/icons/hicolor''' % prefix
def give_files(dir, *extension): files=[] all_files=os.listdir(dir) for file in all_files: ext=(os.path.splitext(file))[1] if ext in extension: files.append(dir + file) return files
98f1407cb56f37bfa8a21a0ef44221f03df2901c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10818/98f1407cb56f37bfa8a21a0ef44221f03df2901c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8492, 67, 2354, 12, 1214, 16, 380, 6447, 4672, 1390, 33, 8526, 777, 67, 2354, 33, 538, 18, 1098, 1214, 12, 1214, 13, 364, 585, 316, 777, 67, 2354, 30, 1110, 28657, 538, 18, 803, 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, 8492, 67, 2354, 12, 1214, 16, 380, 6447, 4672, 1390, 33, 8526, 777, 67, 2354, 33, 538, 18, 1098, 1214, 12, 1214, 13, 364, 585, 316, 777, 67, 2354, 30, 1110, 28657, 538, 18, 803, 18, ...
fs = ckan.forms.get_standard_fieldset(is_admin=False)
fs = ckan.forms.get_standard_fieldset(is_admin=False, user_editable_groups=[])
def test_edit(self): CreateTestData.create_arbitrary( {u'name':u'name_before', u'title':u'title_before', u'url':u'testurl', u'resources':[{'url':'dlu1', 'format':'tf1'}, ], u'notes':u'testnotes', u'version':u'testversion', u'tags':['one', 'two'], u'license':'gpl-3.0', u'extras':{'key1':'value1', 'key2':'value2'}, } )
7e1700ed4ea3e2c10f5614206de6900c1fdbbfd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/7e1700ed4ea3e2c10f5614206de6900c1fdbbfd9/test_package_saver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4619, 12, 2890, 4672, 1788, 4709, 751, 18, 2640, 67, 297, 3682, 3345, 12, 288, 89, 11, 529, 4278, 89, 11, 529, 67, 5771, 2187, 582, 1404, 1280, 4278, 89, 1404, 1280, 67, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4619, 12, 2890, 4672, 1788, 4709, 751, 18, 2640, 67, 297, 3682, 3345, 12, 288, 89, 11, 529, 4278, 89, 11, 529, 67, 5771, 2187, 582, 1404, 1280, 4278, 89, 1404, 1280, 67, 57...
'nosy=' + str(user), 'title=' + str(title), 'priority=bug'])
'nosy=' + user, 'title=' + title, 'priority=bug'])
def send_bugtracker(msg, parent): from tryton import rpc win = gtk.Dialog(_('Tryton - Bug Tracker'), parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) win.set_icon(TRYTON_ICON) win.set_default_response(gtk.RESPONSE_OK) hbox = gtk.HBox() image = gtk.Image() image.set_from_stock(gtk.STOCK_DIALOG_QUESTION, gtk.ICON_SIZE_DIALOG) hbox.pack_start(image, False, False) table = gtk.Table(2, 2) table.set_col_spacings(3) table.set_row_spacings(3) table.set_border_width(1) label_user = gtk.Label(_('User:')) label_user.set_alignment(1.0, 0.5) table.attach(label_user, 0, 1, 0, 1, yoptions=False, xoptions=gtk.FILL) entry_user = gtk.Entry() entry_user.set_activates_default(True) table.attach(entry_user, 1, 2, 0, 1, yoptions=False, xoptions=gtk.FILL) label_password = gtk.Label(_('Password:')) label_password.set_alignment(1.0, 0.5) table.attach(label_password, 0, 1, 1, 2, yoptions=False, xoptions=gtk.FILL) entry_password = gtk.Entry() entry_password.set_activates_default(True) entry_password.set_visibility(False) table.attach(entry_password, 1, 2, 1, 2, yoptions=False, xoptions=gtk.FILL) hbox.pack_start(table) win.vbox.pack_start(hbox) win.show_all() entry_password.grab_focus() entry_user.set_text(rpc._USERNAME) response = win.run() parent.present() user = entry_user.get_text() password = entry_password.get_text() win.destroy() if response == gtk.RESPONSE_OK: try: msg = msg.encode('ascii', 'replace') server = xmlrpclib.Server(('http://%s:%s@' + CONFIG['roundup.xmlrpc']) % (user, password), allow_none=True) msg_md5 = md5.new(msg).hexdigest() title = '[no title]' for line in msg.split('\n'): if line: title = line msg_ids = server.filter('msg', None, {'summary': str(msg_md5)}) issue_id = None if msg_ids: issue_ids = server.filter('issue', None, {'messages': msg_ids}) if issue_ids: issue_id = issue_ids[0] server.set('issue' + str(issue_id), *['nosy=+' + str(user)]) if not issue_id: msg_id = server.create('msg', *['content=' + str(msg), 'author=' + str(user), 'summary=' + str(msg_md5)]) issue_id = server.create('issue', *['messages=' + str(msg_id), 'nosy=' + str(user), 'title=' + str(title), 'priority=bug']) except Exception, exception: tb_s = reduce(lambda x, y: x + y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) message(_('Exception:') + '\n' + tb_s, parent, msg_type=gtk.MESSAGE_ERROR)
140b9549a7cf73fb5b18edd3f80c6a43d9cf75ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/140b9549a7cf73fb5b18edd3f80c6a43d9cf75ec/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 925, 16543, 12, 3576, 16, 982, 4672, 628, 775, 1917, 1930, 6724, 5657, 273, 22718, 18, 6353, 24899, 2668, 7833, 1917, 300, 16907, 11065, 264, 19899, 982, 16, 22718, 18, 2565, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 925, 16543, 12, 3576, 16, 982, 4672, 628, 775, 1917, 1930, 6724, 5657, 273, 22718, 18, 6353, 24899, 2668, 7833, 1917, 300, 16907, 11065, 264, 19899, 982, 16, 22718, 18, 2565, 1...
return (result, "; ".join(msgs))
if not result: _Fail("; ".join(msgs)) return True, None
def BlockdevRename(devlist): """Rename a list of block devices. @type devlist: list of tuples @param devlist: list of tuples of the form (disk, new_logical_id, new_physical_id); disk is an L{objects.Disk} object describing the current disk, and new logical_id/physical_id is the name we rename it to @rtype: boolean @return: True if all renames succeeded, False otherwise """ msgs = [] result = True for disk, unique_id in devlist: dev = _RecursiveFindBD(disk) if dev is None: msgs.append("Can't find device %s in rename" % str(disk)) result = False continue try: old_rpath = dev.dev_path dev.Rename(unique_id) new_rpath = dev.dev_path if old_rpath != new_rpath: DevCacheManager.RemoveCache(old_rpath) # FIXME: we should add the new cache information here, like: # DevCacheManager.UpdateCache(new_rpath, owner, ...) # but we don't have the owner here - maybe parse from existing # cache? for now, we only lose lvm data when we rename, which # is less critical than DRBD or MD except errors.BlockDeviceError, err: msgs.append("Can't rename device '%s' to '%s': %s" % (dev, unique_id, err)) logging.exception("Can't rename device '%s' to '%s'", dev, unique_id) result = False return (result, "; ".join(msgs))
afdc3985644be8d2b91d9f0e37dfda391a30d036 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/afdc3985644be8d2b91d9f0e37dfda391a30d036/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3914, 5206, 16019, 12, 5206, 1098, 4672, 3536, 16019, 279, 666, 434, 1203, 7166, 18, 225, 632, 723, 4461, 1098, 30, 666, 434, 10384, 632, 891, 4461, 1098, 30, 666, 434, 10384, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3914, 5206, 16019, 12, 5206, 1098, 4672, 3536, 16019, 279, 666, 434, 1203, 7166, 18, 225, 632, 723, 4461, 1098, 30, 666, 434, 10384, 632, 891, 4461, 1098, 30, 666, 434, 10384, 434, 326, ...
r""" $2^n - 1$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000225;a 2^n - 1. sage: a(0) 0 sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(12) 4095 sage: a.list(12) [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self):
def __init__(self): r""" $2^n - 1$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000225;a 2^n - 1. sage: a(0) 0 sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(12) 4095 sage: a.list(12) [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047] AUTHOR: -- Jaap Spies (2007-01-25) """
def _eval(self, n): return Integer(n**2)
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 22, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 22, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
offset_py = 100 + (cpu * 150) width_py = 100
offset_py = RootFrame.Y_OFFSET + (cpu * (RootFrame.CPU_HEIGHT + RootFrame.CPU_SPACE)) width_py = RootFrame.CPU_HEIGHT
def update_rectangle_cpu(self, dc, slice, cpu, offset_time): rq = slice.rqs[cpu]
63ec122063792204803a85c638a9ba7efe7c25cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/63ec122063792204803a85c638a9ba7efe7c25cd/sched-migration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2607, 4341, 67, 11447, 12, 2890, 16, 6744, 16, 2788, 16, 8326, 16, 1384, 67, 957, 4672, 22227, 273, 2788, 18, 86, 12926, 63, 11447, 65, 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, 0, 0, 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, 1089, 67, 2607, 4341, 67, 11447, 12, 2890, 16, 6744, 16, 2788, 16, 8326, 16, 1384, 67, 957, 4672, 22227, 273, 2788, 18, 86, 12926, 63, 11447, 65, 2, -100, -100, -100, -100, -100, -100,...
i -= 1 try: entry = self.activeFormattingElements[i] except: break
entry = self.activeFormattingElements[i]
def reconstructActiveFormattingElements(self): # Within this algorithm the order of steps described in the # specification is not quite the same as the order of steps in the # code. It should still do the same though.
2c0a091732a5ae0de23474d9903258632f674478 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10463/2c0a091732a5ae0de23474d9903258632f674478/_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23243, 3896, 23974, 3471, 12, 2890, 4672, 468, 3423, 267, 333, 4886, 326, 1353, 434, 6075, 11893, 316, 326, 468, 7490, 353, 486, 25102, 326, 1967, 487, 326, 1353, 434, 6075, 316, 326, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23243, 3896, 23974, 3471, 12, 2890, 4672, 468, 3423, 267, 333, 4886, 326, 1353, 434, 6075, 11893, 316, 326, 468, 7490, 353, 486, 25102, 326, 1967, 487, 326, 1353, 434, 6075, 316, 326, 46...
"""search engine stripping of accented letters"""
"""search engine - stripping of accented letters"""
def test_strip_accents(self): """search engine stripping of accented letters""" self.assertEqual("memememe", search_engine.strip_accents('mémêmëmè')) self.assertEqual("MEMEMEME", search_engine.strip_accents('MÉMÊMËMÈ'))
373c3cf8222840ef319c6b6642892be55f56dbdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/373c3cf8222840ef319c6b6642892be55f56dbdd/search_engine_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6406, 67, 8981, 4877, 12, 2890, 4672, 3536, 3072, 4073, 300, 2569, 1382, 434, 30122, 329, 13768, 8395, 365, 18, 11231, 5812, 2932, 3917, 351, 4698, 3113, 1623, 67, 8944, 18, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6406, 67, 8981, 4877, 12, 2890, 4672, 3536, 3072, 4073, 300, 2569, 1382, 434, 30122, 329, 13768, 8395, 365, 18, 11231, 5812, 2932, 3917, 351, 4698, 3113, 1623, 67, 8944, 18, 64...
Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline Content-Type: text/plain; charset=us-ascii Content-Disposition: inline test attachment binary Content-Type: application/octet-stream Content-Disposition: attachment; filename="main.dvi" xxxxxx
Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline test attachment binary --bCsyhTFzCvuiizWE Content-Type: application/octet-stream Content-Disposition: attachment; filename="main.dvi" xxxxxx
def testContentDisposition(self): self.doNewIssue() self._handle_mail('''Content-Type: text/plain;
c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1350, 15087, 12, 2890, 4672, 365, 18, 2896, 1908, 12956, 1435, 365, 6315, 4110, 67, 4408, 2668, 6309, 1350, 17, 559, 30, 977, 19, 7446, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1350, 15087, 12, 2890, 4672, 365, 18, 2896, 1908, 12956, 1435, 365, 6315, 4110, 67, 4408, 2668, 6309, 1350, 17, 559, 30, 977, 19, 7446, 31, 2, -100, -100, -100, -100, -100, -100, ...
move_ids.append(act[1])
if isinstance(act[1], (int, long)): move_ids.append(act[1]) else: move_ids.extend(act[1])
def set_inventory_moves(self, cursor, user, shipment_id, name, value, arg, context=None): move_obj = self.pool.get('stock.move')
67c254956f284f804a6e62bd66d638cb1b74207e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9298/67c254956f284f804a6e62bd66d638cb1b74207e/shipment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 26024, 67, 81, 10829, 12, 2890, 16, 3347, 16, 729, 16, 26990, 67, 350, 16, 508, 16, 460, 16, 1501, 16, 819, 33, 7036, 4672, 3635, 67, 2603, 273, 365, 18, 6011, 18, 588, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 26024, 67, 81, 10829, 12, 2890, 16, 3347, 16, 729, 16, 26990, 67, 350, 16, 508, 16, 460, 16, 1501, 16, 819, 33, 7036, 4672, 3635, 67, 2603, 273, 365, 18, 6011, 18, 588, 26...
log.warn(" the option --library-dirs or uncomment and modify") log.warn(" the parameter library_dirs in setup.cfg)")
log.warn(" specify the option --library-dirs or uncomment and") log.warn(" modify the parameter library_dirs in setup.cfg)")
macros=ext.define_macros+[(undef,) for undef in ext.undef_macros],
ccfc1d116e2df5172991bc6108764544c95e84ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/94/ccfc1d116e2df5172991bc6108764544c95e84ce/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 24302, 33, 408, 18, 11255, 67, 5821, 6973, 15, 63, 12, 318, 536, 16, 13, 364, 640, 536, 316, 1110, 18, 318, 536, 67, 5821, 6973, 6487, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24302, 33, 408, 18, 11255, 67, 5821, 6973, 15, 63, 12, 318, 536, 16, 13, 364, 640, 536, 316, 1110, 18, 318, 536, 67, 5821, 6973, 6487, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if self.debug: environ['wsgi.errors'].write( '=> paste.errordocuments: -> %r\n'%url[0][0] )
def change_response(status, headers, exc_info=None): status_code = status.split(' ') try: code = int(status_code[0]) except ValueError, TypeError: raise Exception( 'StatusBasedForward middleware ' 'received an invalid status code %s'%repr(status_code[0]) ) message = ' '.join(status_code[1:]) new_url = self.mapper( code, message, environ, self.global_conf, **self.params ) if not (new_url == None or isinstance(new_url, str)): raise TypeError( 'Expected the url to internally ' 'redirect to in the StatusBasedForward mapper' 'to be a string or None, not %s'%repr(new_url) ) if new_url: url.append([new_url, status]) else: return start_response(status, headers, exc_info)
fa211ffb1ac28245f645b1f854507dffd08a388a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/fa211ffb1ac28245f645b1f854507dffd08a388a/errordocument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 225, 1267, 67, 710, 273, 1267, 18, 4939, 2668, 8624, 775, 30, 981, 273, 509, 12, 2327, 67, 710, 63, 20, 5717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 225, 1267, 67, 710, 273, 1267, 18, 4939, 2668, 8624, 775, 30, 981, 273, 509, 12, 2327, 67, 710, 63, 20, 5717, ...
pywikibot.output(u"NOTE: %s is redirect to %s" % (page.aslink(True), redirectTargetPage.aslink(True)))
if not globalvar.quiet or pywikibot.verbose: pywikibot.output(u"NOTE: %s is redirect to %s" % (page.aslink(True), redirectTargetPage.aslink(True)))
def batchLoaded(self, counter): """ This is called by a worker to tell us that the promised batch of pages was loaded. In other words, all the pages in self.pending have already been preloaded.
0da43714f7304bde0d82e565cc42552a7b2ab065 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/0da43714f7304bde0d82e565cc42552a7b2ab065/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2581, 8835, 12, 2890, 16, 3895, 4672, 3536, 1220, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 2581, 434, 4689, 1703, 4203, 18, 657, 1308, 4511, 16, 777, 326, 4689, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2581, 8835, 12, 2890, 16, 3895, 4672, 3536, 1220, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 2581, 434, 4689, 1703, 4203, 18, 657, 1308, 4511, 16, 777, 326, 4689, ...
def __init__(self, build, partner_dir, build_dir, repack_dir): super(RepackLinux, self).__init__(build, partner_dir, build_dir, repack_dir)
def __init__(self, build, partner_dir, build_dir, repack_dir, repack_info): super(RepackLinux, self).__init__(build, partner_dir, build_dir, repack_dir, repack_info)
def __init__(self, build, partner_dir, build_dir, repack_dir): super(RepackLinux, self).__init__(build, partner_dir, build_dir, repack_dir) self.platform = "linux" self.uncompressed_build = build.replace('.bz2','')
a3ac8bf7a27f94e009d363751fafc6f23384dc30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10262/a3ac8bf7a27f94e009d363751fafc6f23384dc30/partner-repacks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 16, 19170, 67, 1214, 16, 1361, 67, 1214, 16, 2071, 484, 67, 1214, 16, 2071, 484, 67, 1376, 4672, 2240, 12, 426, 2920, 19475, 16, 365, 2934, 972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 16, 19170, 67, 1214, 16, 1361, 67, 1214, 16, 2071, 484, 67, 1214, 16, 2071, 484, 67, 1376, 4672, 2240, 12, 426, 2920, 19475, 16, 365, 2934, 972, ...
path = os.path.abspath(os.path.join(os.path.basename(__file__), "..",
path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..",
def _show_help(self): path = os.path.abspath(os.path.join(os.path.basename(__file__), "..", "manual", "manual.html")) if os.path.exists(path): HelpWindow(self, path).Show() else: display_error_message("Could not locate manual at '%s'." % path, self)
220dd8363d64983da0c33469068bb50df6873f7f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/220dd8363d64983da0c33469068bb50df6873f7f/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 67, 5201, 12, 2890, 4672, 589, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 315, 838, 3113, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 67, 5201, 12, 2890, 4672, 589, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 315, 838, 3113, 315, ...
return item.geburtsdatum.strftime('%d.%m.%Y')
if item.geburtsdatum != None: return item.geburtsdatum.strftime('%d.%m.%Y')
def renderCell(self, item): return item.geburtsdatum.strftime('%d.%m.%Y')
cab87f27ecd13301a026d856c094ac75a31768f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1740/cab87f27ecd13301a026d856c094ac75a31768f9/teilnehmer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 4020, 12, 2890, 16, 761, 4672, 327, 761, 18, 908, 70, 295, 3428, 3404, 379, 18, 701, 9982, 29909, 72, 7866, 81, 7866, 61, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 4020, 12, 2890, 16, 761, 4672, 327, 761, 18, 908, 70, 295, 3428, 3404, 379, 18, 701, 9982, 29909, 72, 7866, 81, 7866, 61, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
plt.legend(loc=0, ncol=2)
plt.legend(loc=0)
def close(self): formatter = matplotlib.dates.DateFormatter("%b %d") self.ax.xaxis.set_major_formatter(formatter) plt.legend(loc=0, ncol=2) plt.savefig(self.filename, format="png", transparent=False, bbox_inches="tight", pad_inches=0.2)
0ca7964dc132fc745d3c1c15148e95dd39de7625 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12204/0ca7964dc132fc745d3c1c15148e95dd39de7625/vis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4453, 273, 13892, 18, 9683, 18, 1626, 5074, 27188, 70, 738, 72, 7923, 365, 18, 651, 18, 92, 4890, 18, 542, 67, 14019, 67, 12354, 12, 12354, 13, 5451, 18, 16292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4453, 273, 13892, 18, 9683, 18, 1626, 5074, 27188, 70, 738, 72, 7923, 365, 18, 651, 18, 92, 4890, 18, 542, 67, 14019, 67, 12354, 12, 12354, 13, 5451, 18, 16292, ...
self.body.append(r'\pysiglinewithargs{')
self.body.append(r'\pysiglinewithargsret{')
def visit_desc_signature(self, node): if node.parent['objtype'] != 'describe' and node['ids']: hyper = self.hypertarget(node['ids'][0]) else: hyper = '' self.body.append(hyper) for child in node: if isinstance(child, addnodes.desc_parameterlist): self.body.append(r'\pysiglinewithargs{') break else: self.body.append(r'\pysigline{')
f470bd38e66d0bb910b57858a1b6b4561b0cafff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/f470bd38e66d0bb910b57858a1b6b4561b0cafff/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 5569, 67, 8195, 12, 2890, 16, 756, 4672, 309, 756, 18, 2938, 3292, 2603, 723, 3546, 480, 296, 22748, 11, 471, 756, 3292, 2232, 3546, 30, 9512, 273, 365, 18, 18112, 672, 826, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 5569, 67, 8195, 12, 2890, 16, 756, 4672, 309, 756, 18, 2938, 3292, 2603, 723, 3546, 480, 296, 22748, 11, 471, 756, 3292, 2232, 3546, 30, 9512, 273, 365, 18, 18112, 672, 826, ...
def manage_edit(self,data,title,SUBMIT='Change',dtpref_cols='50',
def manage_edit(self,data,title,SUBMIT='Change',dtpref_cols='70',
def manage_edit(self,data,title,SUBMIT='Change',dtpref_cols='50', dtpref_rows='20',REQUEST=None): """ Replaces a Documents contents with Data, Title with Title.
6773f4092920ea5c4bf33404de439716a467f4a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6773f4092920ea5c4bf33404de439716a467f4a1/DTMLMethod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 12, 2890, 16, 892, 16, 2649, 16, 8362, 6068, 2218, 3043, 2187, 7510, 25724, 67, 6842, 2218, 7301, 2187, 3681, 25724, 67, 3870, 2218, 3462, 2187, 5519, 33, 7036, 4672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 4619, 12, 2890, 16, 892, 16, 2649, 16, 8362, 6068, 2218, 3043, 2187, 7510, 25724, 67, 6842, 2218, 7301, 2187, 3681, 25724, 67, 3870, 2218, 3462, 2187, 5519, 33, 7036, 4672, 35...
return RunGit(['rev-list', '-n', '1', '--grep=^git-svn-id: .*@%s$' % rev,
return RunGit(['rev-list', '-n', '1', '--grep=^git-svn-id: .*trunk@%s ' % rev,
def FindSVNRev(rev): """Map an SVN revision to a git hash. Like 'git svn find-rev' but without the git-svn bits.""" # We find r123 by grepping for a line with "git-svn-id: blahblahblah@123". return RunGit(['rev-list', '-n', '1', '--grep=^git-svn-id: .*@%s$' % rev, 'origin'])
5523248db21853be25708d1f8365c990bca05463 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/5523248db21853be25708d1f8365c990bca05463/sync-webkit-git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 23927, 50, 10070, 12, 9083, 4672, 3536, 863, 392, 29537, 50, 6350, 358, 279, 5071, 1651, 18, 23078, 296, 6845, 5893, 82, 1104, 17, 9083, 11, 1496, 2887, 326, 5071, 17, 31505, 4125,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 23927, 50, 10070, 12, 9083, 4672, 3536, 863, 392, 29537, 50, 6350, 358, 279, 5071, 1651, 18, 23078, 296, 6845, 5893, 82, 1104, 17, 9083, 11, 1496, 2887, 326, 5071, 17, 31505, 4125,...
s.save('foo.jpg')
s.alpha_gradient(100,200)
def testset(): fb = quickinit(dpy=":0.0", w=512, h=512, bpp=32, fullscreen=0, opengl=1) if 0: N = 200 for num in [1, 0]: start = time.time() for n in range(N): if num: s = NumSprite(x=0, y=0, width=25, height=25, fb=fb) else: s = Sprite(x=0, y=0, width=25, height=25, fb=fb) s.noise(color=1) s.scale(100,100) s.blit() fb.flip() stop = time.time() print 'num=%d' % num, N/(stop-start), 'fps' if 1: s = NumSprite(x=0, y=0, fname='testpat.png', fb=fb) s.save('foo.jpg') #s.scale(50,50) s.rotate(45, preserve_size=0) s.blit(flip=1) keyboard() if 0: s = NumSprite(x=0, y=0, width=200, height=100, fb=fb) s.fill((128,128,128,255)) s.array[:,0:30,0]=255 s.array[:,30:60,1]=255 s.array[:,60:,2]=255 s2 = s.clone() s2.moveto(-100,-100) #s.circmask(25) #s.alpha_aperture(25) #s.alpha_gradient(25,45) s.alpha_gradient2(25,45, (255,0,0)) #s.dim(0.50) s2.blit(flip=0) s.blit(flip=1) keyboard() if 0: s = NumSprite(x=0, y=-200, width=200, height=200, fb=fb) cosgrat(s, 5, 0, 45) alphaGaussian(s, 50) s.blit() o = Sprite(x=0, y=200, width=200, height=200, fb=fb) cosgrat(o, 5, 0, 45) alphaGaussian(o, 50) o.blit() if 0: print 'starting' for i in [1, 0]: for b in [1, 0]: for f in [1, 0]: if i: s = NumSprite(x=0, y=0, width=200, height=200, fb=fb) print 'numsprite', 'blit=%d' % b, 'flip=%d' % f else: s = Sprite(x=0, y=0, width=200, height=200, fb=fb) print 'sprite', 'blit=%d' % b, 'flip=%d' % f nf = 100 phi = 0 cosgrat(s, 5, phi, 45) start = time.time() for n in range(nf): cosgrat(s, 5, phi, 45) alphaGaussian(s, 25) if b: fb.clear((0,0,0)) s.blit() if f: fb.flip() phi = (phi + 10) % 360 stop = time.time() print ' ', nf/(stop-start), 'fps'
f6454650a8dfa395f3b47067d53fc66a41f56a5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5701/f6454650a8dfa395f3b47067d53fc66a41f56a5e/numsprite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 542, 13332, 12754, 273, 9549, 2738, 12, 72, 2074, 1546, 30, 20, 18, 20, 3113, 341, 33, 13757, 16, 366, 33, 13757, 16, 9107, 84, 33, 1578, 16, 1983, 9252, 33, 20, 16, 1696, 7043...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 13332, 12754, 273, 9549, 2738, 12, 72, 2074, 1546, 30, 20, 18, 20, 3113, 341, 33, 13757, 16, 366, 33, 13757, 16, 9107, 84, 33, 1578, 16, 1983, 9252, 33, 20, 16, 1696, 7043...
@param parent_doc: The C{ModuleDoc} of the containing package. If C{parent_doc} is not provided, then this method will
@param parent_docs: The C{ModuleDoc} of the containing package. If C{parent_docs} is not provided, then this method will
def _get_docs_from_module_file(filename, introspect, parse, progress_estimator, parent_docs=(None,None)): """ Construct and return the API documentation for the python module with the given filename. @param parent_doc: The C{ModuleDoc} of the containing package. If C{parent_doc} is not provided, then this method will check if the given filename is contained in a package; and if so, it will construct a stub C{ModuleDoc} for the containing package(s). """ # Record our progress. modulename = os.path.splitext(os.path.split(filename)[1])[0] if modulename == '__init__': modulename = os.path.split(os.path.split(filename)[0])[1] if parent_docs[0]: modulename = DottedName(parent_docs[0].canonical_name, modulename) elif parent_docs[1]: modulename = DottedName(parent_docs[1].canonical_name, modulename) log.progress(progress_estimator.progress(), '%s (%s)' % (modulename, filename)) progress_estimator.complete += 1 # Normalize the filename. filename = os.path.normpath(os.path.abspath(filename)) # When possible, use the source version of the file. try: filename = py_src_filename(filename) src_file_available = True except ValueError: src_file_available = False # Get the introspected & parsed docs (as appropriate) introspect_doc = parse_doc = None introspect_error = parse_error = None if introspect: try: introspect_doc = introspect_docs( filename=filename, context=parent_docs[0]) except ImportError, e: introspect_error = str(e) if parse and src_file_available: try: parse_doc = parse_docs( filename=filename, context=parent_docs[1]) except ParseError, e: parse_error = str(e) except ImportError, e: parse_error = str(e) # Report any errors we encountered. _report_errors(filename, introspect_doc, parse_doc, introspect_error, parse_error) # Return the docs we found. return (introspect_doc, parse_doc)
0fd30edf9de4f56ecef56d5e553ce8e99e4ff3fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/0fd30edf9de4f56ecef56d5e553ce8e99e4ff3fd/docbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8532, 67, 2080, 67, 2978, 67, 768, 12, 3459, 16, 30165, 16, 1109, 16, 4007, 67, 395, 12502, 16, 982, 67, 8532, 28657, 7036, 16, 7036, 3719, 30, 3536, 14291, 471, 327, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8532, 67, 2080, 67, 2978, 67, 768, 12, 3459, 16, 30165, 16, 1109, 16, 4007, 67, 395, 12502, 16, 982, 67, 8532, 28657, 7036, 16, 7036, 3719, 30, 3536, 14291, 471, 327, 3...
(result,res_descr)=hlr_utils.empty_result(obj)
(result, res_descr) = hlr_utils.empty_result(obj)
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...
elif not self.has_section(section):
elif section not in self.__sections:
def has_option(self, section, option): """Check for the existence of a given option in a given section.""" if not section or section == "DEFAULT": return option in self.__defaults elif not self.has_section(section): return 0 else: option = self.optionxform(option) return option in self.__sections[section]
05e74c488d7085fb533b40a9d6860ee732e784e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/05e74c488d7085fb533b40a9d6860ee732e784e4/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 3482, 12, 2890, 16, 2442, 16, 1456, 4672, 3536, 1564, 364, 326, 15782, 434, 279, 864, 1456, 316, 279, 864, 2442, 12123, 309, 486, 2442, 578, 2442, 422, 315, 5280, 6877, 327, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 3482, 12, 2890, 16, 2442, 16, 1456, 4672, 3536, 1564, 364, 326, 15782, 434, 279, 864, 1456, 316, 279, 864, 2442, 12123, 309, 486, 2442, 578, 2442, 422, 315, 5280, 6877, 327, 1...
return time.strftime("%H:%M:%S", time.gmtime(seconds))
return time.strftime(self.DISPLAY_TIME_FORMAT, time.gmtime(seconds))
def getDisplayTime(self): seconds = self.getCurrentTime() return time.strftime("%H:%M:%S", time.gmtime(seconds))
99e7832b73572e586c169cca42ec8b5753b86c1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/99e7832b73572e586c169cca42ec8b5753b86c1e/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13854, 950, 12, 2890, 4672, 3974, 273, 365, 18, 588, 3935, 950, 1435, 327, 813, 18, 701, 9982, 27188, 44, 5319, 49, 5319, 55, 3113, 813, 18, 75, 10838, 12, 7572, 3719, 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, 13854, 950, 12, 2890, 4672, 3974, 273, 365, 18, 588, 3935, 950, 1435, 327, 813, 18, 701, 9982, 27188, 44, 5319, 49, 5319, 55, 3113, 813, 18, 75, 10838, 12, 7572, 3719, 2, -100, -100, ...
trace(2, depth, "_upgrade(%s)", (pkgs))
self.trace(2, "_upgrade(%s)", (pkgs))
def _upgrade(self, pkgs, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth pruneweight = self._pruneweight trace(2, depth, "_upgrade(%s)", (pkgs))
b26ec53d5174d18eebf24ded272ad218fb19d0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/b26ec53d5174d18eebf24ded272ad218fb19d0b4/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15097, 12, 2890, 16, 16922, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 846, 318, 359, 1274...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15097, 12, 2890, 16, 16922, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 846, 318, 359, 1274...
d = self.get_minmax_data()
def ymax(self, ymax=None): """ EXAMPLES: sage: g = line([(-1,1), (3,2)]) sage: g.ymax() 2.0 sage: g.ymax(10) sage: g.ymax() 10.0 """ d = self.get_minmax_data() if ymax is None: return d['ymax'] self._minmax_data['ymax'] = float(ymax)
acd1446765c851ba4fd5c80c2948dac5c51da03b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/acd1446765c851ba4fd5c80c2948dac5c51da03b/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15275, 12, 2890, 16, 15275, 33, 7036, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 314, 273, 980, 3816, 19236, 21, 16, 21, 3631, 261, 23, 16, 22, 13, 5717, 272, 410, 30, 314, 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, 15275, 12, 2890, 16, 15275, 33, 7036, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 314, 273, 980, 3816, 19236, 21, 16, 21, 3631, 261, 23, 16, 22, 13, 5717, 272, 410, 30, 314, 18,...
print 'Unsupported type: %r' % p['type']
logging.warning('Unsupported type %s for parameter %s', p['type'], name)
def _set_value(self, name, value, **kwargs): ''' Private wrapper function to set a value.
8ca0c9e9d5740dd5b8252931a1573a1c7f83fc15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6471/8ca0c9e9d5740dd5b8252931a1573a1c7f83fc15/instrument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 1132, 12, 2890, 16, 508, 16, 460, 16, 2826, 4333, 4672, 9163, 8726, 4053, 445, 358, 444, 279, 460, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 542, 67, 1132, 12, 2890, 16, 508, 16, 460, 16, 2826, 4333, 4672, 9163, 8726, 4053, 445, 358, 444, 279, 460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def localize(self, step=0.25, tolerance=1.0e-08,
def localize(self, step=0.25, tolerance=1.0e-08, verbose=True,
def localize(self, step=0.25, tolerance=1.0e-08, updaterot=True, updatecoeff=True): print 'Localize with step =', step, 'and tolerance =', tolerance
1c2d083331ea4eea9587cc082d59f6d148ba3e53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/1c2d083331ea4eea9587cc082d59f6d148ba3e53/wannier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26407, 12, 2890, 16, 2235, 33, 20, 18, 2947, 16, 10673, 33, 21, 18, 20, 73, 17, 6840, 16, 3988, 33, 5510, 16, 7760, 352, 33, 5510, 16, 1089, 18132, 33, 5510, 4672, 1172, 296, 2042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26407, 12, 2890, 16, 2235, 33, 20, 18, 2947, 16, 10673, 33, 21, 18, 20, 73, 17, 6840, 16, 3988, 33, 5510, 16, 7760, 352, 33, 5510, 16, 1089, 18132, 33, 5510, 4672, 1172, 296, 2042, ...
testFile = testFile.replace('\\', '/').replace('//', '/')
testFile = testFile.replace('\\', '/').replace('//', '/') lowerTestFile = testFile.lower()
def loadErrors(testFilesGlob, errorFile): errors = [l.split(':test', 1)[0].split('///', 1)[1].split('tests/', 1)[1].lower() for l in file(errorFile).readlines() if l.find('. file:///') != -1] if not errors: errors = [testFilesGlob.split('*', 1)[0] + l.split('.', 1)[1].split(':', 1)[0].strip().lower() for l in file(errorFile).readlines() if re.match('^\d+[.] ', l)] return errors
037c7849d721cf513b470b732473bef445d75e21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3291/037c7849d721cf513b470b732473bef445d75e21/updatecompatibilitytable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 4229, 12, 3813, 2697, 13499, 16, 555, 812, 4672, 1334, 273, 306, 80, 18, 4939, 2668, 30, 3813, 2187, 404, 25146, 20, 8009, 4939, 2668, 28111, 2187, 404, 25146, 21, 8009, 4939, 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, 1262, 4229, 12, 3813, 2697, 13499, 16, 555, 812, 4672, 1334, 273, 306, 80, 18, 4939, 2668, 30, 3813, 2187, 404, 25146, 20, 8009, 4939, 2668, 28111, 2187, 404, 25146, 21, 8009, 4939, 2668...
bitmap.save(gif_bitmap_filename) log('SAVED:%s' % gif_bitmap_filename)
bitmap.save(gfx_bitmap_filename) log('SAVED:%s' % gfx_bitmap_filename)
def def_bitmap1(self, bitmap_code, data, *rest): if len(rest) == 0: colorkey = None else: c = rest[0] colorkey = (c & 255, (c >> 8) & 255, (c >> 16) & 255) #log('def_bitmap1 bitmap_code=%d, data=%d bytes, colorkey=%s' % ( # bitmap_code, len(data), colorkey)) gif_bitmap_filename = '%sbitmap%d.%s' % (self.gfx_dir, bitmap_code, self.gfx_extension) if exists(gif_bitmap_filename): #log('CACHED:%s' % gif_bitmap_filename) pass else: bitmap_filename = '%sbitmap%d.ppm' % (self.gfx_dir, bitmap_code) try: decompressed_data = decompress(data) except Exception, e: raise BitmapCreationException('ERROR UNCOMPRESSING DATA FOR %s (%s)' % ( bitmap_filename, str(e))) f = open(bitmap_filename, 'wb') f.write(decompressed_data) f.close() #TODO: use in memory (don't save ppm first) try: bitmap = PIL.Image.open(bitmap_filename) except IOError, e: raise BitmapCreationException('ERROR LOADING %s (%s)' % ( bitmap_filename, str(e)))
3cb18c99c830806be4edfc5f715dc0bbcb26c753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/3cb18c99c830806be4edfc5f715dc0bbcb26c753/servermessage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1652, 67, 3682, 1458, 21, 12, 2890, 16, 9389, 67, 710, 16, 501, 16, 380, 8792, 4672, 309, 562, 12, 8792, 13, 422, 374, 30, 645, 778, 402, 273, 599, 469, 30, 276, 273, 3127, 63, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1652, 67, 3682, 1458, 21, 12, 2890, 16, 9389, 67, 710, 16, 501, 16, 380, 8792, 4672, 309, 562, 12, 8792, 13, 422, 374, 30, 645, 778, 402, 273, 599, 469, 30, 276, 273, 3127, 63, 20,...
self.failUnless(len(res.children.keys())==2) self.failUnless(len(allNodes.keys())==9)
self.failUnless(len(res.children.keys())==4) self.failUnless(len(allNodes.keys())==10)
def test3(self): allNodes={} m = Chem.MolFromSmiles('c1ccccc1-c1ncccc1') res = RecapDecompose(m,allNodes=allNodes) self.failUnless(res) self.failUnless(len(res.children.keys())==2) self.failUnless(len(allNodes.keys())==3)
e793cf1d5a1abc952de6d7bd7feb70328e8a57c4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9195/e793cf1d5a1abc952de6d7bd7feb70328e8a57c4/Recap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 23, 12, 2890, 4672, 777, 3205, 12938, 312, 273, 26542, 18, 49, 355, 1265, 9552, 1449, 2668, 71, 21, 952, 952, 71, 21, 17, 71, 21, 82, 952, 952, 21, 6134, 400, 273, 868, 5909, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23, 12, 2890, 4672, 777, 3205, 12938, 312, 273, 26542, 18, 49, 355, 1265, 9552, 1449, 2668, 71, 21, 952, 952, 71, 21, 17, 71, 21, 82, 952, 952, 21, 6134, 400, 273, 868, 5909, ...
"menu": self.closeRecursive
"menu": self.closeRecursive, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, "4": self.keyNumberGlobal, "5": self.keyNumberGlobal, "6": self.keyNumberGlobal, "7": self.keyNumberGlobal, "8": self.keyNumberGlobal, "9": self.keyNumberGlobal
def __init__(self, session, parent, childNode): Screen.__init__(self, session) list = [] menuID = None for x in childNode: #walk through the actual nodelist if x.nodeType != xml.dom.minidom.Element.nodeType: continue elif x.tagName == 'item': self.addItem(list, x) count += 1 elif x.tagName == 'menu': self.addMenu(list, x) count += 1 elif x.tagName == "id": menuID = x.getAttribute("val") count = 0
34be902fbb3d1809348ef3b88b2d6617d34e524b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/34be902fbb3d1809348ef3b88b2d6617d34e524b/Menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 982, 16, 9465, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 225, 666, 273, 5378, 225, 3824, 734, 273, 599, 364, 619, 316, 9465, 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, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 982, 16, 9465, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 225, 666, 273, 5378, 225, 3824, 734, 273, 599, 364, 619, 316, 9465, 30, ...
return self.site.loadrevisions(self, getText=True, rvdir=reverseOrder, step=step, total=total)
self.site.loadrevisions(self, getText=True, rvdir=reverseOrder, step=step, total=total) return [( self._revisions[rev].revid, self._revisions[rev].timestamp, self._revisions[rev].user, self._revisions[rev].text ) for rev in sorted(self._revisions, reverse=not reverseOrder) ]
def fullVersionHistory(self, reverseOrder=False, step=None, total=None): """Iterate previous versions including wikitext.
9178df39774c4430f8598d3087f33abf83f86206 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9005/9178df39774c4430f8598d3087f33abf83f86206/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 1444, 5623, 12, 2890, 16, 4219, 2448, 33, 8381, 16, 2235, 33, 7036, 16, 2078, 33, 7036, 4672, 3536, 14916, 2416, 5244, 6508, 341, 1766, 305, 408, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 1444, 5623, 12, 2890, 16, 4219, 2448, 33, 8381, 16, 2235, 33, 7036, 16, 2078, 33, 7036, 4672, 3536, 14916, 2416, 5244, 6508, 341, 1766, 305, 408, 18, 2, -100, -100, -100, -100, -...
if isinstance(value, unicode):
if type(value) is UnicodeType:
def encode(value, instance, **kwargs): """ensure value is an encoded string""" if isinstance(value, unicode): encoding = kwargs.get('encoding') if encoding is None: try: encoding = instance.getCharset() except AttributeError: # that occurs during object initialization # (no acquisition wrapper) encoding = 'UTF8' value = value.encode(encoding) return value
7ceff8c470eae33b4a063061230f3f8948cfaf8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12165/7ceff8c470eae33b4a063061230f3f8948cfaf8b/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 1132, 16, 791, 16, 2826, 4333, 4672, 3536, 15735, 460, 353, 392, 3749, 533, 8395, 309, 618, 12, 1132, 13, 353, 9633, 559, 30, 2688, 273, 1205, 18, 588, 2668, 5999, 6134, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 1132, 16, 791, 16, 2826, 4333, 4672, 3536, 15735, 460, 353, 392, 3749, 533, 8395, 309, 618, 12, 1132, 13, 353, 9633, 559, 30, 2688, 273, 1205, 18, 588, 2668, 5999, 6134, 309,...
if str(x.service_ref) == str(service):
check = x.service_ref.ref.toCompareString() == str(service) if not check: sref = x.service_ref.ref parent_sid = sref.getUnsignedData(5) parent_tsid = sref.getUnsignedData(6) if parent_sid and parent_tsid: sid = sref.getUnsignedData(1) tsid = sref.getUnsignedData(2) sref.setUnsignedData(1, parent_sid) sref.setUnsignedData(2, parent_tsid) sref.setUnsignedData(5, 0) sref.setUnsignedData(6, 0) check = x.service_ref.ref.toCompareString() == str(service) sref.setUnsignedData(1, sid) sref.setUnsignedData(2, tsid) sref.setUnsignedData(5, parent_sid) sref.setUnsignedData(6, parent_tsid) if check:
def isInTimer(self, eventid, begin, duration, service): time_match = 0 chktime = None chktimecmp = None chktimecmp_end = None end = begin + duration for x in self.timer_list: if str(x.service_ref) == str(service): #if x.eit is not None and x.repeated == 0: # if x.eit == eventid: # return duration if x.repeated != 0: if chktime is None: chktime = localtime(begin) chktimecmp = chktime.tm_wday * 1440 + chktime.tm_hour * 60 + chktime.tm_min chktimecmp_end = chktimecmp + (duration / 60) time = localtime(x.begin) for y in range(7): if x.repeated & (2 ** y): timecmp = y * 1440 + time.tm_hour * 60 + time.tm_min if timecmp <= chktimecmp < (timecmp + ((x.end - x.begin) / 60)): time_match = ((timecmp + ((x.end - x.begin) / 60)) - chktimecmp) * 60 elif chktimecmp <= timecmp < chktimecmp_end: time_match = (chktimecmp_end - timecmp) * 60 else: #if x.eit is None: if begin <= x.begin <= end: diff = end - x.begin if time_match < diff: time_match = diff elif x.begin <= begin <= x.end: diff = x.end - begin if time_match < diff: time_match = diff return time_match
365370295e04bdd056f6dd1c5e1523ec3f66e5b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/365370295e04bdd056f6dd1c5e1523ec3f66e5b3/RecordTimer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8048, 6777, 12, 2890, 16, 871, 350, 16, 2376, 16, 3734, 16, 1156, 4672, 813, 67, 1916, 273, 374, 15000, 957, 273, 599, 15000, 957, 9625, 273, 599, 15000, 957, 9625, 67, 409, 273, 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, 8048, 6777, 12, 2890, 16, 871, 350, 16, 2376, 16, 3734, 16, 1156, 4672, 813, 67, 1916, 273, 374, 15000, 957, 273, 599, 15000, 957, 9625, 273, 599, 15000, 957, 9625, 67, 409, 273, 599, ...
to specify at least 'master' here
to specify at least 'master' here. Examples are 'master' or 'feature/new'
def add(cls, repo, name, path, url=None, branch=None, no_checkout=False): """Add a new submodule to the given repository. This will alter the index as well as the .gitmodules file, but will not create a new commit. If the submodule already exists, no matter if the configuration differs from the one provided, the existing submodule will be returned. :param repo: Repository instance which should receive the submodule :param name: The name/identifier for the submodule :param path: repository-relative or absolute path at which the submodule should be located It will be created as required during the repository initialization. :param url: git-clone compatible URL, see git-clone reference for more information If None, the repository is assumed to exist, and the url of the first remote is taken instead. This is useful if you want to make an existing repository a submodule of anotherone. :param branch: branch at which the submodule should (later) be checked out. The given branch must exist in the remote repository, and will be checked out locally as a tracking branch. It will only be written into the configuration if it not None, which is when the checked out branch will be the one the remote HEAD pointed to. The result you get in these situation is somewhat fuzzy, and it is recommended to specify at least 'master' here :param no_checkout: if True, and if the repository has to be cloned manually, no checkout will be performed :return: The newly created submodule instance :note: works atomically, such that no change will be done if the repository update fails for instance""" if repo.bare: raise InvalidGitRepositoryError("Cannot add submodules to bare repositories") # END handle bare repos path = to_native_path_linux(path) if path.endswith('/'): path = path[:-1] # END handle trailing slash # assure we never put backslashes into the url, as some operating systems # like it ... if url != None: url = to_native_path_linux(url) #END assure url correctness # INSTANTIATE INTERMEDIATE SM sm = cls(repo, cls.NULL_BIN_SHA, cls.k_default_mode, path, name) if sm.exists(): # reretrieve submodule from tree try: return repo.head.commit.tree[path] except KeyError: # could only be in index index = repo.index entry = index.entries[index.entry_key(path, 0)] sm.binsha = entry.binsha return sm # END handle exceptions # END handle existing br = git.Head.to_full_path(str(branch) or cls.k_head_default) has_module = sm.module_exists() branch_is_default = branch is None if has_module and url is not None: if url not in [r.url for r in sm.module().remotes]: raise ValueError("Specified URL '%s' does not match any remote url of the repository at '%s'" % (url, sm.abspath)) # END check url # END verify urls match mrepo = None if url is None: if not has_module: raise ValueError("A URL was not given and existing repository did not exsit at %s" % path) # END check url mrepo = sm.module() urls = [r.url for r in mrepo.remotes] if not urls: raise ValueError("Didn't find any remote url in repository at %s" % sm.abspath) # END verify we have url url = urls[0] else: # clone new repo kwargs = {'n' : no_checkout} if not branch_is_default: kwargs['b'] = br # END setup checkout-branch mrepo = git.Repo.clone_from(url, path, **kwargs) # END verify url # update configuration and index index = sm.repo.index writer = sm.config_writer(index=index, write=False) writer.set_value('url', url) writer.set_value('path', path) sm._url = url if not branch_is_default: # store full path writer.set_value(cls.k_head_option, br) sm._branch_path = br # END handle path del(writer) # we deliberatly assume that our head matches our index ! pcommit = repo.head.commit sm._parent_commit = pcommit sm.binsha = mrepo.head.commit.binsha index.add([sm], write=True) return sm
96d003cb2baabd73f2aa0fd9486c13c61415106e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13767/96d003cb2baabd73f2aa0fd9486c13c61415106e/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 6429, 16, 3538, 16, 508, 16, 589, 16, 880, 33, 7036, 16, 3803, 33, 7036, 16, 1158, 67, 17300, 33, 8381, 4672, 3536, 986, 279, 394, 27314, 358, 326, 864, 3352, 18, 1220, 903,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 6429, 16, 3538, 16, 508, 16, 589, 16, 880, 33, 7036, 16, 3803, 33, 7036, 16, 1158, 67, 17300, 33, 8381, 4672, 3536, 986, 279, 394, 27314, 358, 326, 864, 3352, 18, 1220, 903,...
val = float(val)
try: val = float(val) except ValueError: self.log.warn(_('Values of series index and rating must' ' be numbers. Ignoring'), val)
def opts_to_mi(self, mi): from calibre.ebooks.metadata import string_to_authors for x in self.metadata_option_names: val = getattr(self.opts, x, None) if val is not None: if x == 'authors': val = string_to_authors(val) elif x == 'tags': val = [i.strip() for i in val.split(',')] elif x in ('rating', 'series_index'): val = float(val) setattr(mi, x, val)
966379bc79eee8dcfb6622dcfc309a06dce946aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/966379bc79eee8dcfb6622dcfc309a06dce946aa/plumber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1500, 67, 869, 67, 9197, 12, 2890, 16, 12837, 4672, 628, 26139, 266, 18, 73, 12567, 18, 4165, 1930, 533, 67, 869, 67, 19368, 364, 619, 316, 365, 18, 4165, 67, 3482, 67, 1973, 30, 124...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1500, 67, 869, 67, 9197, 12, 2890, 16, 12837, 4672, 628, 26139, 266, 18, 73, 12567, 18, 4165, 1930, 533, 67, 869, 67, 19368, 364, 619, 316, 365, 18, 4165, 67, 3482, 67, 1973, 30, 124...
def processDoctype(self, name, error): self.parser.parseError()
def processDoctype(self, name, error): self.parser.parseError()
63b257c91a1a03874ee2932271f4c904c94d49df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/63b257c91a1a03874ee2932271f4c904c94d49df/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3244, 12387, 12, 2890, 16, 508, 16, 555, 4672, 365, 18, 4288, 18, 2670, 668, 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, ...
[ 1, 1, 1, 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, 1207, 3244, 12387, 12, 2890, 16, 508, 16, 555, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
log.close();
log.close();
def __call__(self, output=None, dry_run=False, **kwargs): log = open(self.working_dir + "/MT/log", "w");
ce2dc58fefe09b170cf07c16260340b4a40af598 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/ce2dc58fefe09b170cf07c16260340b4a40af598/monotone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 876, 33, 7036, 16, 10299, 67, 2681, 33, 8381, 16, 2826, 4333, 4672, 613, 273, 1696, 12, 2890, 18, 20478, 67, 1214, 397, 2206, 6152, 19, 1330, 3113, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 876, 33, 7036, 16, 10299, 67, 2681, 33, 8381, 16, 2826, 4333, 4672, 613, 273, 1696, 12, 2890, 18, 20478, 67, 1214, 397, 2206, 6152, 19, 1330, 3113, 315, ...
field_definition = make_field_constructor(app, field, triple)
field_definition = remove_useless_attributes( make_field_constructor(app, field, triple))
"\n ".join(["('%s', %s)," % (fname, fdef) for fname, fdef in fields.items()]),
62aecfaf0c97490d265e414f1da3d1c0e81c31ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/62aecfaf0c97490d265e414f1da3d1c0e81c31ce/startmigration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1548, 82, 5411, 3552, 5701, 3816, 6, 29909, 87, 2187, 738, 87, 3631, 6, 738, 261, 12749, 16, 284, 536, 13, 364, 5299, 16, 284, 536, 316, 1466, 18, 3319, 1435, 65, 3631, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1548, 82, 5411, 3552, 5701, 3816, 6, 29909, 87, 2187, 738, 87, 3631, 6, 738, 261, 12749, 16, 284, 536, 13, 364, 5299, 16, 284, 536, 316, 1466, 18, 3319, 1435, 65, 3631, 2, -100, -100, -100...
pass
pass
def on_dccmsg(self, c, e):
5406faf41f13c054905eaacabb68f503112dfeeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5406faf41f13c054905eaacabb68f503112dfeeb/articlenos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 72, 952, 3576, 12, 2890, 16, 276, 16, 425, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 72, 952, 3576, 12, 2890, 16, 276, 16, 425, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.assertRaises(ParseError, parse_fetch_response, '* 2 FETCH (UID X)')
self.assertRaises(ParseError, parse_fetch_response, '(UID X)')
def test_bad_UID(self): self.assertRaises(ParseError, parse_fetch_response, '* 2 FETCH (UID X)')
b9adf5976cc7b0ffa2b182c7a426e7c00efc1a4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9352/b9adf5976cc7b0ffa2b182c7a426e7c00efc1a4a/test_response_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8759, 67, 3060, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 21004, 16, 1109, 67, 5754, 67, 2740, 16, 7747, 3060, 1139, 2506, 13, 225, 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, 0, 0, 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, 67, 8759, 67, 3060, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 21004, 16, 1109, 67, 5754, 67, 2740, 16, 7747, 3060, 1139, 2506, 13, 225, 2, -100, -100, -100, -100, -100, -1...
return None
return defaultValue
def getOption( self, opName, defaultValue = None ): """ Get option value with default applied
a07765898970cabae66e971ee8c4efe36dd53e5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/a07765898970cabae66e971ee8c4efe36dd53e5a/CFG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5651, 12, 365, 16, 1061, 461, 16, 4593, 273, 599, 262, 30, 3536, 968, 1456, 460, 598, 805, 6754, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5651, 12, 365, 16, 1061, 461, 16, 4593, 273, 599, 262, 30, 3536, 968, 1456, 460, 598, 805, 6754, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def append(self, s, charset=None):
def append(self, s, charset=None, errors='strict'):
def append(self, s, charset=None): """Append a string to the MIME header.
f447e64f559d49e6d7077d36b4c07c4eef258424 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f447e64f559d49e6d7077d36b4c07c4eef258424/Header.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 272, 16, 4856, 33, 7036, 16, 1334, 2218, 13948, 11, 4672, 3536, 5736, 279, 533, 358, 326, 13195, 1446, 18, 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, 0, 0, 0, 0, 0, 0, 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, 714, 12, 2890, 16, 272, 16, 4856, 33, 7036, 16, 1334, 2218, 13948, 11, 4672, 3536, 5736, 279, 533, 358, 326, 13195, 1446, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return m2.pkey_write_pem(self.pkey, bio._ptr(), cipher, callback)
return m2.pkey_write_pem(self.pkey, bio._ptr(), proto(), callback)
def save_key_bio(self, bio, cipher='aes_128_cbc', callback=util.passphrase_callback): """ Save the key pair to the M2Crypto.BIO object 'bio' in PEM format.
6b3d4380b32ab301defd598df1e92c483e965e0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/6b3d4380b32ab301defd598df1e92c483e965e0c/EVP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 856, 67, 21010, 12, 2890, 16, 25091, 16, 5867, 2218, 22335, 67, 10392, 67, 28409, 2187, 1348, 33, 1367, 18, 5466, 9429, 67, 3394, 4672, 3536, 7074, 326, 498, 3082, 358, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 856, 67, 21010, 12, 2890, 16, 25091, 16, 5867, 2218, 22335, 67, 10392, 67, 28409, 2187, 1348, 33, 1367, 18, 5466, 9429, 67, 3394, 4672, 3536, 7074, 326, 498, 3082, 358, 326, ...
commit = orig.rev_parse(self.branch) if not commit: raise Error("no such branch `%s' at %s" % (self.branch, self.link)) checkout.update_ref("refs/heads/" + self.branch, commit)
def dup_branch(branch): commit = orig.rev_parse(branch) if not commit: raise Error("no such branch `%s' at %s" % (branch, self.link)) checkout.update_ref("refs/heads/" + branch, commit) dup_branch(self.branch)
def _get_workdir(self): """Return an initialized workdir path.
e76f0c20c7871164ce3eda2068025d12bac717e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5275/e76f0c20c7871164ce3eda2068025d12bac717e5/pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1252, 1214, 12, 2890, 4672, 3536, 990, 392, 6454, 22231, 589, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1252, 1214, 12, 2890, 4672, 3536, 990, 392, 6454, 22231, 589, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def remove(self): '''See Job for documentation.'''
def remove(self,force=False): '''See Job for documentation. The force optional argument has no effect (it is provided for the compatibility with Job interface)'''
def remove(self): '''See Job for documentation.''' return super(JobTemplate,self).remove()
50419c6acaca0207003f986f5debcdbe29c8cc46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/50419c6acaca0207003f986f5debcdbe29c8cc46/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 5734, 33, 8381, 4672, 9163, 9704, 3956, 364, 7323, 18, 1021, 2944, 3129, 1237, 711, 1158, 5426, 261, 305, 353, 2112, 364, 326, 8926, 598, 3956, 1560, 2506, 6309, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 5734, 33, 8381, 4672, 9163, 9704, 3956, 364, 7323, 18, 1021, 2944, 3129, 1237, 711, 1158, 5426, 261, 305, 353, 2112, 364, 326, 8926, 598, 3956, 1560, 2506, 6309, 327,...
recurring = {'product':item.product, 'price':item.product.price_set.all()[0].price,}
recurring = {'product':item.product, 'price':item.product.price_set.all()[0].price.quantize(Decimal('.01')),}
def confirm_info(request): payment_module = config_get_group('PAYMENT_PAYPAL') try: order = Order.objects.from_request(request) except Order.DoesNotExist: url = lookup_url(payment_module, 'satchmo_checkout-step1') return HttpResponseRedirect(url) tempCart = Cart.objects.from_request(request) if tempCart.numItems == 0: template = lookup_template(payment_module, 'shop/checkout/empty_cart.html') return render_to_response(template, RequestContext(request)) # Check if the order is still valid if not order.validate(request): context = RequestContext(request, {'message': _('Your order is no longer valid.')}) return render_to_response('shop/404.html', context) template = lookup_template(payment_module, 'shop/checkout/paypal/confirm.html') if payment_module.LIVE.value: log.debug("live order on %s", payment_module.KEY.value) url = payment_module.POST_URL.value account = payment_module.BUSINESS.value else: url = payment_module.POST_TEST_URL.value account = payment_module.BUSINESS_TEST.value try: address = lookup_url(payment_module, payment_module.RETURN_ADDRESS.value, include_server=True) except urlresolvers.NoReverseMatch: address = payment_module.RETURN_ADDRESS.value processor_module = payment_module.MODULE.load_module('processor') processor = processor_module.PaymentProcessor(payment_module) processor.create_pending_payment(order=order) default_view_tax = config_value('TAX', 'DEFAULT_VIEW_TAX') recurring = None order_items = order.orderitem_set.all() for item in order_items: if item.product.is_subscription: recurring = {'product':item.product, 'price':item.product.price_set.all()[0].price,} trial0 = recurring['product'].subscriptionproduct.get_trial_terms(0) if len(order_items) > 1 or trial0 is not None or recurring['price'] < order.balance: recurring['trial1'] = {'price': order.balance,} if trial0 is not None: recurring['trial1']['expire_length'] = trial0.expire_length recurring['trial1']['expire_unit'] = trial0.expire_unit[0] # else: # recurring['trial1']['expire_length'] = recurring['product'].subscriptionproduct.get_trial_terms(0).expire_length trial1 = recurring['product'].subscriptionproduct.get_trial_terms(1) if trial1 is not None: recurring['trial2']['expire_length'] = trial1.expire_length recurring['trial2']['expire_unit'] = trial1.expire_unit[0] recurring['trial2']['price'] = trial1.price ctx = RequestContext(request, {'order': order, 'post_url': url, 'default_view_tax': default_view_tax, 'business': account, 'currency_code': payment_module.CURRENCY_CODE.value, 'return_address': address, 'invoice': order.id, 'subscription': recurring, 'PAYMENT_LIVE' : payment_live(payment_module) }) return render_to_response(template, ctx)
814c55dcc67d35f89c400cf547494fc2655c1b99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/171/814c55dcc67d35f89c400cf547494fc2655c1b99/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 67, 1376, 12, 2293, 4672, 5184, 67, 2978, 273, 642, 67, 588, 67, 1655, 2668, 16436, 67, 30094, 6134, 225, 775, 30, 1353, 273, 4347, 18, 6911, 18, 2080, 67, 2293, 12, 2293, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 67, 1376, 12, 2293, 4672, 5184, 67, 2978, 273, 642, 67, 588, 67, 1655, 2668, 16436, 67, 30094, 6134, 225, 775, 30, 1353, 273, 4347, 18, 6911, 18, 2080, 67, 2293, 12, 2293, 13, ...
except Exception, e: doCopyLog("***Error during distribution building process*** ", workingDir, logPath, log)
except hardhatutil.ExternalCommandErrorWithOutputList, e: print "distribution failed", e.exitCode log.write("***Error during distribution***\n") hardhatutil.dumpOutputList(e.outputList, log)
def doDistribution(releaseMode, workingDir, log, outputDir, buildVersion, buildVersionEscaped, hardhatScript): # Create end-user, developer distributions chanDir = os.path.join(workingDir, 'chandler') os.chdir(chanDir) print "Making distribution files for " + releaseMode log.write(separator) log.write("Making distribution files for " + releaseMode + "\n") if releaseMode == "debug": distOption = "-dD" else: distOption = "-D" try: outputList = hardhatutil.executeCommandReturnOutput( [hardhatScript, "-o", os.path.join(outputDir, buildVersion), distOption, buildVersionEscaped]) hardhatutil.dumpOutputList(outputList, log) except Exception, e: doCopyLog("***Error during distribution building process*** ", workingDir, logPath, log) forceBuildNextCycle(log, workingDir) raise e checkDistributionSize(log, releaseMode, workingDir, buildVersionEscaped)
180548df67365e67192cb5d3943dbaf31ab2b73d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/180548df67365e67192cb5d3943dbaf31ab2b73d/fullchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 9003, 12, 9340, 2309, 16, 5960, 1621, 16, 613, 16, 21412, 16, 1361, 1444, 16, 1361, 1444, 17208, 16, 7877, 11304, 3651, 4672, 468, 282, 1788, 679, 17, 1355, 16, 8751, 23296, 3861, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 9003, 12, 9340, 2309, 16, 5960, 1621, 16, 613, 16, 21412, 16, 1361, 1444, 16, 1361, 1444, 17208, 16, 7877, 11304, 3651, 4672, 468, 282, 1788, 679, 17, 1355, 16, 8751, 23296, 3861, ...
IEEEFormatTestCase)
IEEEFormatTestCase, ReprTestCase)
def test_main(): test_support.run_unittest( FormatFunctionsTestCase, UnknownFormatTestCase, IEEEFormatTestCase)
d736b70ddc75cecdb63c7293233f1b66ce31feeb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/d736b70ddc75cecdb63c7293233f1b66ce31feeb/test_float.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 1842, 67, 13261, 18, 2681, 67, 4873, 3813, 12, 4077, 7503, 4709, 2449, 16, 9077, 1630, 4709, 2449, 16, 467, 9383, 41, 1630, 4709, 2449, 16, 868, 683, 4709, 2449, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 5254, 13332, 1842, 67, 13261, 18, 2681, 67, 4873, 3813, 12, 4077, 7503, 4709, 2449, 16, 9077, 1630, 4709, 2449, 16, 467, 9383, 41, 1630, 4709, 2449, 16, 868, 683, 4709, 2449, ...