rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
self._overrides[key] = value
self._overrides[key] = bool(value)
def _override(self, key, value): if key in self: self[key]._set(bool(value)) else: # override flag values that haven't been entered yet self[key] = Flag(value=value, name=key, parent=self, createOnAccess=self._createOnAccess, required=self._required, track=self._track)
54f4ecb60ca7822eaf866d7338e843c77cdc5d0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/54f4ecb60ca7822eaf866d7338e843c77cdc5d0a/use.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10601, 12, 2890, 16, 498, 16, 460, 4672, 309, 498, 316, 365, 30, 365, 63, 856, 65, 6315, 542, 12, 6430, 12, 1132, 3719, 469, 30, 468, 3849, 2982, 924, 716, 15032, 1404, 2118, 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, 389, 10601, 12, 2890, 16, 498, 16, 460, 4672, 309, 498, 316, 365, 30, 365, 63, 856, 65, 6315, 542, 12, 6430, 12, 1132, 3719, 469, 30, 468, 3849, 2982, 924, 716, 15032, 1404, 2118, 16...
raise ValueError, "Baudrate must be a integer number"
raise ValueError, "Baudrate must be a integer number, not %r" % a
def usage(): print >>sys.stderr, """USAGE: %s [options] Simple Terminal Programm for the serial port. options: -p, --port=PORT: port, a number, defualt = 0 or a device name -b, --baud=BAUD: baudrate, default 9600 -r, --rtscts: enable RTS/CTS flow control (default off) -x, --xonxoff: enable software flow control (default off) -e, --echo: enable local echo (default off) -c, --cr: disable CR -> CR+LF translation """ % sys.argv[0]
43ed8d124fc817e2324f834bb35827b23900a6b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/43ed8d124fc817e2324f834bb35827b23900a6b4/miniterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
bins = arange(min(missedVal),max(missedVal), step )
bins = arange(min(missedVal),max(missedVal)+step, step ) plotbins = bins[0:-1] + step/2.
def efficiencyplot(found, missed, col_name, ifo=None, plot_type = 'linear', \ nbins = 40, output_name = None, plotsym = 'k-', plot_name = '', \ title_string = '', errors = False): """ function to plot the difference if col_name_a in two tables against the value of col_name_b in table1. @param found: metaDataTable containing found injections @param missed: metaDataTable containing missed injections @param col_name: name of column used to plot efficiency @param ifo: name of ifo (default = None), used in extracting information (e.g. which eff_dist) @param plot_type: either 'linear' or 'log' plot on x-axis @param plotsym: the symbol to use when plotting, default = 'k-' @param plot_name: name of the plot (for the legend) @param title_string: extra info for title @param errors: plot errorbars on the efficiencies (using binomial errors) default = False """ if not ifo and ("ifo" in found.validcolumns.keys()): ifo = found[0].ifo foundVal = readcol(found,col_name, ifo) missedVal = readcol(missed,col_name, ifo) if len(foundVal) or len(missedVal): # we have found or missed injections so we can generate the plot if plot_type == 'log': foundVal = log10(foundVal) missedVal = log10(missedVal) if len(foundVal): step = (max(foundVal) - min(foundVal)) /nbins bins = arange(min(foundVal),max(foundVal), step ) if step == 0: bins = array([foundVal[0]/2.0, foundVal[0], foundVal[0] * 3.0/2.0]) else: step = (max(missedVal) - min(missedVal)) /nbins bins = arange(min(missedVal),max(missedVal), step ) if step == 0: bins = array([missedVal[0]/2.0, missedVal[0], missedVal[0] * 3.0/2.0]) fig_num = gcf().number figure(100) [num_found,binsf,stuff] = hist(foundVal, bins) [num_missed,binsm,stuff] = hist(missedVal ,bins) close(100) figure(fig_num) num_found = array(num_found,'d') eff = num_found / (num_found + num_missed) error = sqrt( num_found * num_missed / (num_found + num_missed)**3 ) error = array(error) if plot_type == 'log': bins = 10**bins if plot_name: semilogx(bins, eff, plotsym,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth=2, label = plot_name) else: semilogx(bins, eff, plotsym,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth=2) if errors: errorbar(bins, eff, error,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth = 2, label = plot_name, \ fmt = plotsym) else: if errors: errorbar(bins, eff, error, fmt = plotsym, markersize=12,\ markerfacecolor='None',\ markeredgewidth=1, linewidth=1, label = plot_name) else: plot(bins, eff, plotsym,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth=1, label = plot_name) xlabel(col_name.replace("_"," "), size='x-large') ylabel('Efficiency', size='x-large') ylim(0,1.1) else: # no found or missed injections figtext(0,0,'No found or missed injections',fontsize=32) if ifo: title_string += ' ' + ifo title_string += ' ' + col_name.replace("_"," ") title_string += ' efficiency plot' title(title_string, size='x-large') grid(True) if output_name: if ifo: output_name += '_' + ifo output_name += '_' + col_name + '_eff.png' savefig(output_name)
d0eef52173cec38c7e404229944ee180812c3e90 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/d0eef52173cec38c7e404229944ee180812c3e90/viz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30325, 4032, 12, 7015, 16, 25143, 16, 645, 67, 529, 16, 21479, 33, 7036, 16, 3207, 67, 723, 273, 296, 12379, 2187, 521, 4264, 2679, 273, 8063, 16, 876, 67, 529, 273, 599, 16, 3207, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30325, 4032, 12, 7015, 16, 25143, 16, 645, 67, 529, 16, 21479, 33, 7036, 16, 3207, 67, 723, 273, 296, 12379, 2187, 521, 4264, 2679, 273, 8063, 16, 876, 67, 529, 273, 599, 16, 3207, 8...
print func.func_name, args, kwdict, '->',
print func.func_name, args, sortdict(kwdict), '->',
decl = 'def %s(%s): print "ok %s", a, b, d, e, v, k' % ( name, string.join(arglist, ', '), name)
08dabf0a7374540637ee637f1b37b8d3cf96d9bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08dabf0a7374540637ee637f1b37b8d3cf96d9bf/test_extcall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3496, 273, 296, 536, 738, 87, 9275, 87, 4672, 1172, 315, 601, 738, 87, 3113, 279, 16, 324, 16, 302, 16, 425, 16, 331, 16, 417, 11, 738, 261, 508, 16, 533, 18, 5701, 12, 3175, 1098, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3496, 273, 296, 536, 738, 87, 9275, 87, 4672, 1172, 315, 601, 738, 87, 3113, 279, 16, 324, 16, 302, 16, 425, 16, 331, 16, 417, 11, 738, 261, 508, 16, 533, 18, 5701, 12, 3175, 1098, 16, ...
def setup_look(self, dropdown):
def setup_look(self, group, key, dropdown):
def setup_look(self, dropdown): dropdown.append_text(_("Flat bar")) dropdown.append_text(_("3D look")) self.look_changed(dropdown) dropdown.connect("changed", self.look_changed)
457c8b9cb1b1da16bb303c646357ab06e6a7df80 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8416/457c8b9cb1b1da16bb303c646357ab06e6a7df80/awnPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 7330, 12, 2890, 16, 1041, 16, 498, 16, 13972, 4672, 13972, 18, 6923, 67, 955, 24899, 2932, 16384, 4653, 6, 3719, 13972, 18, 6923, 67, 955, 24899, 2932, 23, 40, 2324, 6, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 7330, 12, 2890, 16, 1041, 16, 498, 16, 13972, 4672, 13972, 18, 6923, 67, 955, 24899, 2932, 16384, 4653, 6, 3719, 13972, 18, 6923, 67, 955, 24899, 2932, 23, 40, 2324, 6, 3719,...
nJobs = len(jobList)
def export_getJobPageSummary(self, attrDict, orderAttribute, pageNumber, numberPerPage): """ Get the summary of the job information for a given page in the job monitor """ last_update = None if attrDict.has_key('LastUpdate'): last_update = attrDict['LastUpdate'] result = jobDB.selectJobs(attrDict, orderAttribute=orderAttribute, newer=last_update) if not result['OK']: return S_ERROR('Failed to select jobs: '+result['Message'])
74e29ee543f16a0f189aaf89e18ba21b78adb37b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/74e29ee543f16a0f189aaf89e18ba21b78adb37b/JobMonitoringHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 588, 2278, 1964, 4733, 12, 2890, 16, 1604, 5014, 16, 1353, 1499, 16, 26484, 16, 1300, 13005, 4672, 3536, 968, 326, 4916, 434, 326, 1719, 1779, 364, 279, 864, 1363, 316, 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, 3359, 67, 588, 2278, 1964, 4733, 12, 2890, 16, 1604, 5014, 16, 1353, 1499, 16, 26484, 16, 1300, 13005, 4672, 3536, 968, 326, 4916, 434, 326, 1719, 1779, 364, 279, 864, 1363, 316, 326, ...
def check_starttag_junk_chars(self):
def test_starttag_junk_chars(self):
def check_starttag_junk_chars(self): self._parse_error("<") self._parse_error("<>") self._parse_error("</>") self._parse_error("</$>") self._parse_error("</") self._parse_error("</a") self._parse_error("<a<a>") self._parse_error("</a<a>") self._parse_error("<$") self._parse_error("<$>") self._parse_error("<!") self._parse_error("<a $>") self._parse_error("<a") self._parse_error("<a foo='bar'") self._parse_error("<a foo='bar") self._parse_error("<a foo='>'") self._parse_error("<a foo='>") self._parse_error("<a foo=>")
a0d064119e8dd4237ff8ffdff3148d0bfed93714 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a0d064119e8dd4237ff8ffdff3148d0bfed93714/test_htmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1937, 2692, 67, 78, 1683, 67, 7549, 12, 2890, 4672, 365, 6315, 2670, 67, 1636, 2932, 32, 7923, 365, 6315, 2670, 67, 1636, 2932, 32, 2984, 13, 365, 6315, 2670, 67, 1636, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1937, 2692, 67, 78, 1683, 67, 7549, 12, 2890, 4672, 365, 6315, 2670, 67, 1636, 2932, 32, 7923, 365, 6315, 2670, 67, 1636, 2932, 32, 2984, 13, 365, 6315, 2670, 67, 1636, 2932,...
val['user_id']=assing_id
val['user_id']=assing_id[0]
def _find_project_bug(self, cr, uid,section_id,lp_server=None,context={}):
495d94f1ff3340701cf9f18bff3c914b0081ae8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/495d94f1ff3340701cf9f18bff3c914b0081ae8e/crm_lp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 4406, 67, 925, 12, 2890, 16, 4422, 16, 4555, 16, 3464, 67, 350, 16, 9953, 67, 3567, 33, 7036, 16, 2472, 12938, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 4406, 67, 925, 12, 2890, 16, 4422, 16, 4555, 16, 3464, 67, 350, 16, 9953, 67, 3567, 33, 7036, 16, 2472, 12938, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
import osaf.framework.wakeup.WakeupCallerParcel as WakeupCallerParcel
def run(self): logger.info("receiveWakeupCall()")
e6350af483db2fc04b017234d3c00f3e0a994cef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e6350af483db2fc04b017234d3c00f3e0a994cef/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1194, 18, 1376, 2932, 18149, 59, 911, 416, 1477, 1435, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1194, 18, 1376, 2932, 18149, 59, 911, 416, 1477, 1435, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def readResponse(self, command, args): """Reads the POP3 server's response and returns a tuple of (response, isClosing, timedOut). isClosing is True if the server closes the socket, which tells found_terminator() to close when the response has been sent. timedOut is set if a TOP or RETR request was still arriving after 30 seconds, and tells found_terminator() to proxy the remainder of the response. """ responseLines = [] startTime = time.time() isMulti = self.isMultiline(command, args) isClosing = False timedOut = False isFirstLine = True seenAllHeaders = False while True: line = self.serverIn.readline() if not line: isClosing = True break elif not isMulti or (isFirstLine and line.startswith('-ERR')): responseLines.append(line) break elif line == '.\r\n': responseLines.append(line) break else: responseLines.append(line) seenAllHeaders = seenAllHeaders or line in ['\r\n', '\n'] if command in ['TOP', 'RETR'] and \ seenAllHeaders and time.time() > startTime + 30: timedOut = True break isFirstLine = False return ''.join(responseLines), isClosing, timedOut
def readResponse(self, command, args): """Reads the POP3 server's response and returns a tuple of (response, isClosing, timedOut). isClosing is True if the server closes the socket, which tells found_terminator() to close when the response has been sent. timedOut is set if a TOP or RETR request was still arriving after 30 seconds, and tells found_terminator() to proxy the remainder of the response. """ responseLines = [] startTime = time.time() isMulti = self.isMultiline(command, args) isClosing = False timedOut = False isFirstLine = True seenAllHeaders = False while True: line = self.serverIn.readline() if not line: # The socket's been closed by the server, probably by QUIT. isClosing = True break elif not isMulti or (isFirstLine and line.startswith('-ERR')): # A single-line response. responseLines.append(line) break elif line == '.\r\n': # The termination line. responseLines.append(line) break else: # A normal line - append it to the response and carry on. responseLines.append(line) seenAllHeaders = seenAllHeaders or line in ['\r\n', '\n']
959f6c8f86abe1ad21eb4ad3e6c79f2ae1aaf183 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/959f6c8f86abe1ad21eb4ad3e6c79f2ae1aaf183/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26694, 12, 2890, 16, 1296, 16, 833, 4672, 3536, 7483, 326, 26839, 23, 1438, 1807, 766, 471, 1135, 279, 3193, 434, 261, 2740, 16, 353, 15745, 16, 7491, 1182, 2934, 225, 353, 15745, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26694, 12, 2890, 16, 1296, 16, 833, 4672, 3536, 7483, 326, 26839, 23, 1438, 1807, 766, 471, 1135, 279, 3193, 434, 261, 2740, 16, 353, 15745, 16, 7491, 1182, 2934, 225, 353, 15745, 353, ...
ans = int (unit / 14.0 * 100)
ans = int(unit * (72./dpi) * 10)
def font_size(val): ans = None unit = Span.unit_convert(val, 14) if unit: # Assume a 10 pt font (14 pixels) has fontsize 100 ans = int (unit / 14.0 * 100) else: if "xx-small" in val: ans = 40 elif "x-small" in val >= 0: ans = 60 elif "small" in val: ans = 80 elif "xx-large" in val: ans = 180 elif "x-large" in val >= 0: ans = 140 elif "large" in val >= 0: ans = 120 if ans is not None: ans += int(font_delta * 20) ans = str(ans) return ans
dd3c14b0f1676aa7cd8ca8e54b190acd43418506 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/dd3c14b0f1676aa7cd8ca8e54b190acd43418506/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3512, 67, 1467, 12, 1125, 4672, 4152, 273, 599, 2836, 273, 12129, 18, 4873, 67, 6283, 12, 1125, 16, 5045, 13, 309, 2836, 30, 468, 15983, 279, 1728, 5818, 3512, 261, 3461, 8948, 13, 711...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3512, 67, 1467, 12, 1125, 4672, 4152, 273, 599, 2836, 273, 12129, 18, 4873, 67, 6283, 12, 1125, 16, 5045, 13, 309, 2836, 30, 468, 15983, 279, 1728, 5818, 3512, 261, 3461, 8948, 13, 711...
if r[2]['type'] in ('ir.actions.report.xml','ir.actions.act_window','ir.actions.wizard'): if r[2].has_key('groups_id'): groups = r[2]['groups_id'] if len(groups) > 0: group_ids = ','.join([ str(x) for x in r[2]['groups_id']]) cr.execute("select count(*) from res_groups_users_rel where gid in (%s) and uid='%s'" % (group_ids, uid)) gr_ids = cr.fetchall() if not gr_ids[0][0] > 0: res2.remove(r) if r[1]=='Menuitem' and not res2: raise osv.except_osv('Error !','You do not have the permission to perform this operation !!!')
if type(r[2])==type({}) and 'type' in r[2]: if r[2]['type'] in ('ir.actions.report.xml','ir.actions.act_window','ir.actions.wizard'): if r[2].has_key('groups_id'): groups = r[2]['groups_id'] if len(groups) > 0: group_ids = ','.join([ str(x) for x in r[2]['groups_id']]) cr.execute("select count(*) from res_groups_users_rel where gid in (%s) and uid='%s'" % (group_ids, uid)) gr_ids = cr.fetchall() if not gr_ids[0][0] > 0: res2.remove(r) if r[1]=='Menuitem' and not res2: raise osv.except_osv('Error !','You do not have the permission to perform this operation !!!')
def clean(x): for key in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_data', 'report_rml_content_data'): if key in x: del x[key] return x
8aff0423b610f1059b2edf279b073744bbbad5da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/8aff0423b610f1059b2edf279b073744bbbad5da/ir_values.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 92, 4672, 364, 498, 316, 7707, 6006, 67, 30319, 91, 67, 1745, 2187, 296, 6006, 67, 86, 781, 67, 1745, 2187, 296, 6006, 67, 30319, 91, 2187, 296, 6006, 67, 86, 781, 2187, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 92, 4672, 364, 498, 316, 7707, 6006, 67, 30319, 91, 67, 1745, 2187, 296, 6006, 67, 86, 781, 67, 1745, 2187, 296, 6006, 67, 30319, 91, 2187, 296, 6006, 67, 86, 781, 2187, 29...
"parse_error::ParseError GLES2Decoder::Handle%s(\n" % func.name)
"parse_error::ParseError GLES2DecoderImpl::Handle%s(\n" % func.name)
def WriteServiceImplementation(self, func, file): """Writes the service implementation for a command.""" file.Write( "parse_error::ParseError GLES2Decoder::Handle%s(\n" % func.name) file.Write( " unsigned int arg_count, const gles2::%s& c) {\n" % func.name) for arg in func.GetOriginalArgs(): arg.WriteGetCode(file) func.WriteHandlerImplementation(file) file.Write(" return parse_error::kParseNoError;\n") file.Write("}\n") file.Write("\n")
dba915f7e61bdcf68079b251ae5822ed80436083 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/dba915f7e61bdcf68079b251ae5822ed80436083/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 4471, 364, 279, 1296, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 4471, 364, 279, 1296, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828,...
res_name = "%s,%s,%s" % (self.wiz_name, state, field)
res_name = "%s,%s,%s" % (self.wiz_name, state, val)
result_def = state_def.get('result', {})
9e8ab8afeeaf533458eb312df49acb9d6539c205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/9e8ab8afeeaf533458eb312df49acb9d6539c205/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 563, 67, 536, 273, 919, 67, 536, 18, 588, 2668, 2088, 2187, 2618, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 563, 67, 536, 273, 919, 67, 536, 18, 588, 2668, 2088, 2187, 2618, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def testPublishJSThroughTool(self):
def testPublishCSSThroughTool(self):
def testPublishJSThroughTool(self): response = self.publish(self.toolpath+'/plone_styles.css') self.assertEqual(response.getStatus(), 200) self.assertEqual(response.getHeader('Content-Type'), 'text/css')
de446fb9c8ffd8b0c6634c760304d1cdfa4f2371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12274/de446fb9c8ffd8b0c6634c760304d1cdfa4f2371/testCSSRegistry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6024, 4596, 882, 76, 2642, 6364, 12, 2890, 4672, 766, 273, 365, 18, 6543, 12, 2890, 18, 6738, 803, 6797, 19, 412, 476, 67, 10218, 18, 5212, 6134, 365, 18, 11231, 5812, 12, 2740, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6024, 4596, 882, 76, 2642, 6364, 12, 2890, 4672, 766, 273, 365, 18, 6543, 12, 2890, 18, 6738, 803, 6797, 19, 412, 476, 67, 10218, 18, 5212, 6134, 365, 18, 11231, 5812, 12, 2740, ...
g=graph.Graph(vertices=intervals)
g = graph.Graph(vertices=intervals)
def RandomInterval(self,n): """ Returns a random interval graph.
d8e15bfa36a0c7cf093fd8b1bae80ee6bc319654 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d8e15bfa36a0c7cf093fd8b1bae80ee6bc319654/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8072, 4006, 12, 2890, 16, 82, 4672, 3536, 2860, 279, 2744, 3673, 2667, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8072, 4006, 12, 2890, 16, 82, 4672, 3536, 2860, 279, 2744, 3673, 2667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.mRenWin.Render()
if self.mRenWin.GetInteractor(): self.mRenWin.GetInteractor().Render() else: self.mRenWin.Render()
def paintEvent(self, e): """ paintEvent(e: QPaintEvent) -> None Paint the QVTKWidget with vtkRenderWindow """ iren = None if self.mRenWin: iren = self.mRenWin.GetInteractor()
e175a9549183d116184e819333c7aab42c6b4e24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/e175a9549183d116184e819333c7aab42c6b4e24/vtkcell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 1133, 12, 2890, 16, 425, 4672, 3536, 12574, 1133, 12, 73, 30, 2238, 12699, 1133, 13, 317, 599, 30001, 326, 2238, 58, 56, 47, 4609, 598, 13659, 3420, 3829, 225, 3536, 277, 1187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 1133, 12, 2890, 16, 425, 4672, 3536, 12574, 1133, 12, 73, 30, 2238, 12699, 1133, 13, 317, 599, 30001, 326, 2238, 58, 56, 47, 4609, 598, 13659, 3420, 3829, 225, 3536, 277, 1187, ...
self.title(d),
self.title_with_separators(d),
def editorheader(self, d, **kw): """ Assemble wiki header for editor
2294767c09832137f0a732336c778882e8c2cb82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/2294767c09832137f0a732336c778882e8c2cb82/modernized.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4858, 3374, 12, 2890, 16, 302, 16, 2826, 9987, 4672, 3536, 2970, 10045, 9050, 1446, 364, 4858, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4858, 3374, 12, 2890, 16, 302, 16, 2826, 9987, 4672, 3536, 2970, 10045, 9050, 1446, 364, 4858, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.stats['NET_ETH_RX_AFTERATHENA'] = int(re.match('NET_ETH_RX_AFTERATHENA=(.*)',line).group(1))
net_temp = int(re.match('NET_ETH_RX_AFTERATHENA=(.*)',line).group(1) self.stats['NET_ETH_RX_AFTERATHENA'] = int(net_temp.split(' ')[0])
def collectStats(self): """Collect job statistics from different log files and fill dict Athena.stats""" import gzip, time, fileinput from Ganga.GPIDev.Lib.Job import Job job = self.getJobObject()
8fcfb5698fc141edad495e60d04e8135c49f1cab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/8fcfb5698fc141edad495e60d04e8135c49f1cab/Athena.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 4195, 12, 2890, 4672, 3536, 10808, 1719, 7691, 628, 3775, 613, 1390, 471, 3636, 2065, 432, 15991, 69, 18, 5296, 8395, 1930, 10331, 16, 813, 16, 585, 2630, 628, 611, 539, 69, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 4195, 12, 2890, 4672, 3536, 10808, 1719, 7691, 628, 3775, 613, 1390, 471, 3636, 2065, 432, 15991, 69, 18, 5296, 8395, 1930, 10331, 16, 813, 16, 585, 2630, 628, 611, 539, 69, 18, ...
push('<dl><dt><strong>%s</strong></dt>\n' % name) if value.__doc__ is not None: doc = self.markup(value.__doc__, self.preformat, funcs, classes, mdict) push('<dd><tt>%s</tt></dd>\n' % doc) for attr, tag in [('fget', '<em>get</em>'), ('fset', '<em>set</em>'), ('fdel', '<em>delete</em>')]: func = getattr(value, attr) if func is not None: base = self.document(func, tag, mod, funcs, classes, mdict, object) push('<dd>%s</dd>\n' % base) push('</dl>\n')
push(self._docproperty(name, value, mod))
def spillproperties(msg, attrs, predicate): ok, attrs = _split_list(attrs, predicate) if ok: hr.maybe() push(msg) for name, kind, homecls, value in ok: push('<dl><dt><strong>%s</strong></dt>\n' % name) if value.__doc__ is not None: doc = self.markup(value.__doc__, self.preformat, funcs, classes, mdict) push('<dd><tt>%s</tt></dd>\n' % doc) for attr, tag in [('fget', '<em>get</em>'), ('fset', '<em>set</em>'), ('fdel', '<em>delete</em>')]: func = getattr(value, attr) if func is not None: base = self.document(func, tag, mod, funcs, classes, mdict, object) push('<dd>%s</dd>\n' % base) push('</dl>\n') return attrs
08e876b38676f9bc70dbbc60809bec10f0d01933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/08e876b38676f9bc70dbbc60809bec10f0d01933/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1694, 737, 4738, 12, 3576, 16, 3422, 16, 5641, 4672, 1529, 16, 3422, 273, 389, 4939, 67, 1098, 12, 7039, 16, 5641, 13, 309, 1529, 30, 15407, 18, 19133, 1435, 1817, 12, 3576, 13, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1694, 737, 4738, 12, 3576, 16, 3422, 16, 5641, 4672, 1529, 16, 3422, 273, 389, 4939, 67, 1098, 12, 7039, 16, 5641, 13, 309, 1529, 30, 15407, 18, 19133, 1435, 1817, 12, 3576, 13, 364, ...
lines.append(u'<tr><td class="label">%s</td>' u'<td class="value">%s</td></tr>' % (label, text))
lines.append(u'<tr><td class="col1">%s</td>' u'<td><b>%s</b></td></tr>' % (label, text))
def makeMoreInfoTable(self, title, moreInfoData): lines = [] lines.append(u'<h3>%s</h3>' % title) lines.append(u'<table cellpadding="0" cellspacing="0">') for label, text in moreInfoData: lines.append(u'<tr><td class="label">%s</td>' u'<td class="value">%s</td></tr>' % (label, text)) lines.append(u'</table>') return u'\n'.join(lines)
4b90b4f8fcab394d7fe9391794e4e9e4ba0e57e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/4b90b4f8fcab394d7fe9391794e4e9e4ba0e57e1/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 7417, 966, 1388, 12, 2890, 16, 2077, 16, 1898, 966, 751, 4672, 2362, 273, 5378, 2362, 18, 6923, 12, 89, 11, 32, 76, 23, 9822, 87, 1757, 76, 23, 1870, 738, 2077, 13, 2362, 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, 1221, 7417, 966, 1388, 12, 2890, 16, 2077, 16, 1898, 966, 751, 4672, 2362, 273, 5378, 2362, 18, 6923, 12, 89, 11, 32, 76, 23, 9822, 87, 1757, 76, 23, 1870, 738, 2077, 13, 2362, 18, ...
if False:
if Target == "NT386GNU":
def Setup(ExistingCompilerRoot, NewRoot): global InstallRoot InstallRoot = NewRoot os.environ["INSTALLROOT"] = NewRoot if (OriginalLIB): # This is Windows-only thing. os.environ["LIB"] = os.path.join(NewRoot, "lib") + OriginalLIB os.environ["PATH"] = (os.path.join(NewRoot, "bin") + OriginalPATH) if ((NewRoot != InstallRoot_CompilerWithPrevious) and (NewRoot != InstallRoot_CompilerWithSelf) and (NewRoot != InstallRoot_Min)): CopyRecursive(InstallRoot_Min, NewRoot) or FatalError() else: CopyCompiler(ExistingCompilerRoot, NewRoot) or FatalError() CopyConfigForDistribution(NewRoot) or sys.exit(1) reload(pylib) or FatalError()
d05c4d7a35451f2404c851871edf4e1de4df519c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9328/d05c4d7a35451f2404c851871edf4e1de4df519c/make-dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 12, 9895, 9213, 2375, 16, 1166, 2375, 4672, 2552, 10284, 2375, 10284, 2375, 273, 1166, 2375, 1140, 18, 28684, 9614, 28865, 9185, 11929, 273, 1166, 2375, 309, 261, 8176, 14484, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 12, 9895, 9213, 2375, 16, 1166, 2375, 4672, 2552, 10284, 2375, 10284, 2375, 273, 1166, 2375, 1140, 18, 28684, 9614, 28865, 9185, 11929, 273, 1166, 2375, 309, 261, 8176, 14484, 4672, ...
if ((bouquet.flags & eServiceReference.flagDirectory) != eServiceReference.flagDirectory):
if (bouquet.flags & eServiceReference.flagDirectory) != eServiceReference.flagDirectory:
def zapToNumber(self, number): bouquet = self.servicelist.bouquet_root service = None serviceHandler = eServiceCenter.getInstance() if bouquet.toString().find('FROM BOUQUET "bouquets.') == -1: #FIXME HACK service, number = self.searchNumberHelper(serviceHandler, number, bouquet) else: bouquetlist = serviceHandler.list(bouquet) if not bouquetlist is None: while number: bouquet = self.servicelist.appendDVBTypes(bouquetlist.getNext()) if not bouquet.valid(): #check end of list break if ((bouquet.flags & eServiceReference.flagDirectory) != eServiceReference.flagDirectory): continue service, number = self.searchNumberHelper(serviceHandler, number, bouquet) if not service is None: if self.servicelist.getRoot() != bouquet: #already in correct bouquet? self.servicelist.clearPath() if self.servicelist.bouquet_root != bouquet: self.servicelist.enterPath(self.servicelist.bouquet_root) self.servicelist.enterPath(bouquet) self.servicelist.setCurrentSelection(service) #select the service in servicelist self.servicelist.zap()
24298d4fbc8394d154053cc4d6c4bdfbd50e4233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/24298d4fbc8394d154053cc4d6c4bdfbd50e4233/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11419, 774, 1854, 12, 2890, 16, 1300, 4672, 800, 89, 28357, 273, 365, 18, 23039, 335, 5449, 18, 16818, 28357, 67, 3085, 1156, 273, 599, 1156, 1503, 273, 425, 1179, 8449, 18, 588, 1442, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11419, 774, 1854, 12, 2890, 16, 1300, 4672, 800, 89, 28357, 273, 365, 18, 23039, 335, 5449, 18, 16818, 28357, 67, 3085, 1156, 273, 599, 1156, 1503, 273, 425, 1179, 8449, 18, 588, 1442, ...
begin = string[:minus+1]
begin = string[:minus + 1]
def latex_length(string): 'Convert lengths to their LaTeX representation.' i = 0 percent = False # the string has the form # ValueUnit+ValueUnit-ValueUnit or # ValueUnit+-ValueUnit # the + and - (glue lengths) are optional # the + always precedes the - # Convert relative lengths to LaTeX units units = {"text%":"\\textwidth", "col%":"\\columnwidth", "page%":"\\paperwidth", "line%":"\\linewidth", "theight%":"\\textheight", "pheight%":"\\paperheight"} for unit in units.keys(): i = string.find(unit) if i != -1: percent = True minus = string.rfind("-", 1, i) plus = string.rfind("+", 0, i) latex_unit = units[unit] if plus == -1 and minus == -1: value = string[:i] value = str(float(value)/100) end = string[i + len(unit):] string = value + latex_unit + end if plus > minus: value = string[plus+1:i] value = str(float(value)/100) begin = string[:plus+1] end = string[i+len(unit):] string = begin + value + latex_unit + end if plus < minus: value = string[minus+1:i] value = str(float(value)/100) begin = string[:minus+1] string = begin + value + latex_unit # replace + and -, but only if the - is not the first character string = string[0] + string[1:].replace("+", " plus ").replace("-", " minus ") # handle the case where "+-1mm" was used, because LaTeX only understands # "plus 1mm minus 1mm" if string.find("plus minus"): lastvaluepos = string.rfind(" ") lastvalue = string[lastvaluepos:] string = string.replace(" ", lastvalue + " ") if percent == False: return "False," + string else: return "True," + string
bcd8b9a1f1241c461beb5db1d5a69424a9a25950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/bcd8b9a1f1241c461beb5db1d5a69424a9a25950/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25079, 67, 2469, 12, 1080, 4672, 296, 2723, 10917, 358, 3675, 21072, 21575, 60, 4335, 1093, 277, 273, 374, 5551, 273, 1083, 468, 326, 533, 711, 326, 646, 468, 1445, 2802, 15, 620, 2802, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25079, 67, 2469, 12, 1080, 4672, 296, 2723, 10917, 358, 3675, 21072, 21575, 60, 4335, 1093, 277, 273, 374, 5551, 273, 1083, 468, 326, 533, 711, 326, 646, 468, 1445, 2802, 15, 620, 2802, ...
injected_cols.extend(['injected_end_time', 'injected_end_time_ns', 'injected_end_time_utc__Px_click_for_daily_ihope_xP_'])
injected_cols.extend(['injected_decisive_distance','injected_end_time', 'injected_end_time_ns', 'injected_end_time_utc__Px_click_for_daily_ihope_xP_'])
def convert_duration( duration ): return sqlutils.convert_duration( duration, convert_durations )
161e33ab7c95414ed2db862fbd5567595c48ff8f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/161e33ab7c95414ed2db862fbd5567595c48ff8f/printutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 8760, 12, 3734, 262, 30, 327, 1847, 5471, 18, 6283, 67, 8760, 12, 3734, 16, 1765, 67, 8760, 87, 262, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 8760, 12, 3734, 262, 30, 327, 1847, 5471, 18, 6283, 67, 8760, 12, 3734, 16, 1765, 67, 8760, 87, 262, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
else: axis.plot(bins[:-1], values, **kwargs) axis.set_xlabel("Time [ms]") axis.set_ylabel("Spikes per second") def plot_isih(spike_trains, bin_size=1, trial_num=None, axis=None, **kwargs): """ Plot inter-spike interval histogram. """
def plot_isih(spike_trains, bin_size=1, trial_num=None, axis=None, style='k', drawstyle='steps-mid', **kwargs): """ Plot inter-spike interval histogram. """
def plot_psth(spike_trains, bin_size=1, trial_num=None, axis=None, **kwargs): """ Plots PSTH of spike_trains. spike_trains: list of spike trains bin_size: bin size in ms trial_num: total number of trials axis: axis to draw on **kwargs: plt.plot arguments """ all_spikes = np.concatenate(tuple(spike_trains)) nbins = np.ceil((max(all_spikes) - min(all_spikes)) / bin_size) values, bins = np.histogram(all_spikes, nbins) # Normalize values for spikes per second if trial_num == None: trial_num = len(spike_trains) values = 1000 * values / bin_size / trial_num if axis == None: axis = plt.gca() axis.plot(bins[:-1], values, **kwargs) axis.set_xlabel("Time [ms]") axis.set_ylabel("Spikes per second") plt.show() else: axis.plot(bins[:-1], values, **kwargs) axis.set_xlabel("Time [ms]") axis.set_ylabel("Spikes per second")
058fc682a7d8f8cb34f4db6a445bc613fa8db0f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7039/058fc682a7d8f8cb34f4db6a445bc613fa8db0f0/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 84, 20244, 12, 1752, 2547, 67, 313, 4167, 16, 4158, 67, 1467, 33, 21, 16, 12950, 67, 2107, 33, 7036, 16, 2654, 33, 7036, 16, 2826, 4333, 4672, 3536, 3008, 6968, 453, 882, 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, 3207, 67, 84, 20244, 12, 1752, 2547, 67, 313, 4167, 16, 4158, 67, 1467, 33, 21, 16, 12950, 67, 2107, 33, 7036, 16, 2654, 33, 7036, 16, 2826, 4333, 4672, 3536, 3008, 6968, 453, 882, 4...
dataD = dataD[ levels[0] ]
dataD = dataD[ levels.pop( 0 ) ]
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, ...
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec")
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)
def MakeInstallerLinux(): import compileall PYTHONV=os.path.basename(PYTHONSDK) if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz rpmarch.txt panda3d.spec") oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/include") oscmd("mkdir -p linuxroot/usr/share/panda3d") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages") oscmd("mkdir -p linuxroot/etc/ld.so.conf.d") oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc") oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc") oscmd("cp --recursive built/include linuxroot/usr/include/panda3d") oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct") oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac") oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw") oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py") oscmd("cp --recursive SceneEditor linuxroot/usr/share/panda3d/SceneEditor") oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models") oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples") oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE") oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes") oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp built/bin/* linuxroot/usr/bin/") for base in os.listdir("built/lib"): oscmd("ln -sf /usr/lib/"+base+" linuxroot/usr/lib/"+PYTHONV+"/lib-dynload/"+base) oscmd("cp built/lib/"+base+" linuxroot/usr/lib/"+base) for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base) compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw") compileall.compile_dir("linuxroot/usr/share/panda3d/SceneEditor") oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/dpkg-deb")): txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_i386.deb") oscmd("chmod -R 755 linuxroot") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rpm -E '{%_arch}' > rpmarch.txt") arch=ReadFile("rpmarch.txt") oscmd("rm -rf "+arch) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec") if (os.path.exists(arch+"/panda3d-"+VERSION+"-1."+arch+".rpm")): oscmd("mv "+arch+"/panda3d-"+VERSION+"-1."+arch+".rpm .") oscmd("rm -rf rpmarch.txt "+arch) oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec")
6338a2c4c448febe6a1ba5735f2e3ce419a80c96 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/6338a2c4c448febe6a1ba5735f2e3ce419a80c96/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 18678, 19475, 13332, 1930, 4074, 454, 12191, 20131, 58, 33, 538, 18, 803, 18, 13909, 12, 16235, 20131, 22625, 13, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20132, 3085, 6, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 18678, 19475, 13332, 1930, 4074, 454, 12191, 20131, 58, 33, 538, 18, 803, 18, 13909, 12, 16235, 20131, 22625, 13, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20132, 3085, 6, 3719,...
raise newtest.Failure("failed test")
raise newtest.service.fail("failed test")
def test_function1(): raise newtest.Failure("failed test")
36b14801fe095a955379a4aa1ebd19abf4e9f718 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/36b14801fe095a955379a4aa1ebd19abf4e9f718/test_dummy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 915, 21, 13332, 1002, 394, 3813, 18, 3278, 18, 6870, 2932, 7307, 1842, 7923, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 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, 1842, 67, 915, 21, 13332, 1002, 394, 3813, 18, 3278, 18, 6870, 2932, 7307, 1842, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return self._executeSingleFileCatalogFunction(lfn,'removeFile',catalogs=catalogs) else: return self._executeFileCatalogFunction(lfn,'removeFile',catalogs=catalogs) class CatalogReplica(CatalogBase): def getCatalogReplicaStatus(self,lfn,singleFile=False,catalogs=[]):
return self._executeSingleFileCatalogFunction( lfn, 'removeFile', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'removeFile', catalogs=catalogs ) class CatalogReplica( CatalogBase ): def getCatalogReplicaStatus( self, lfn, singleFile=False, catalogs=[] ):
def removeCatalogFile(self,lfn,singleFile=False,catalogs=[]): """ Remove a file from the FileCatalog 'lfn' is the file to be removed """ if singleFile: return self._executeSingleFileCatalogFunction(lfn,'removeFile',catalogs=catalogs) else: return self._executeFileCatalogFunction(lfn,'removeFile',catalogs=catalogs)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 9769, 812, 12, 2890, 16, 80, 4293, 16, 7526, 812, 33, 8381, 16, 2574, 287, 14072, 33, 8526, 4672, 3536, 3581, 279, 585, 628, 326, 1387, 9769, 225, 296, 80, 4293, 11, 353, 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, 1206, 9769, 812, 12, 2890, 16, 80, 4293, 16, 7526, 812, 33, 8381, 16, 2574, 287, 14072, 33, 8526, 4672, 3536, 3581, 279, 585, 628, 326, 1387, 9769, 225, 296, 80, 4293, 11, 353, 326, ...
if hasattr(socket, 'AF_UNIX'): class UnixStreamServer(TCPServer): address_family = socket.AF_UNIX class UnixDatagramServer(UDPServer): address_family = socket.AF_UNIX
def server_activate(self): # No need to call listen() for UDP. pass
29624f7d0fc1bdea4fb807517108bcc7bfebe36f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/29624f7d0fc1bdea4fb807517108bcc7bfebe36f/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 10014, 12, 2890, 4672, 468, 2631, 1608, 358, 745, 6514, 1435, 364, 16230, 18, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 1438, 67, 10014, 12, 2890, 4672, 468, 2631, 1608, 358, 745, 6514, 1435, 364, 16230, 18, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.mainmenu = Menu.Menu('main', self.mainmenu_items)
self.mainmenu_items.sort() self.mainmenu = Menu.Menu('main', self.build_menu())
def refresh_menu(self): self.mainmenu_items = [] factory = g.IconFactory() self.process_dir(self.root) self.factory.add_default() self.mainmenu = Menu.Menu('main', self.mainmenu_items) self.mainmenu.attach(self, self)
fbeaf222f91ebd973430116483d70cef3e39fb9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4993/fbeaf222f91ebd973430116483d70cef3e39fb9d/rmenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 5414, 12, 2890, 4672, 365, 18, 5254, 5414, 67, 3319, 273, 5378, 3272, 273, 314, 18, 5554, 1733, 1435, 365, 18, 2567, 67, 1214, 12, 2890, 18, 3085, 13, 365, 18, 6848, 18, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 5414, 12, 2890, 4672, 365, 18, 5254, 5414, 67, 3319, 273, 5378, 3272, 273, 314, 18, 5554, 1733, 1435, 365, 18, 2567, 67, 1214, 12, 2890, 18, 3085, 13, 365, 18, 6848, 18, 12...
print 'evento di chiusura'
def closeEvent(self, event): print 'evento di chiusura' if self.connected: if not self._displayQuestion(PROJECT_NAME, self._text['CloseConfirm']): event.ignore() return
2b180c2608f0d679e5b6befd9eb4c55e12460a26 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8560/2b180c2608f0d679e5b6befd9eb4c55e12460a26/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 1133, 12, 2890, 16, 871, 4672, 309, 365, 18, 8537, 30, 309, 486, 365, 6315, 5417, 11665, 12, 17147, 67, 1985, 16, 365, 6315, 955, 3292, 4605, 11269, 3546, 4672, 871, 18, 6185, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 1133, 12, 2890, 16, 871, 4672, 309, 365, 18, 8537, 30, 309, 486, 365, 6315, 5417, 11665, 12, 17147, 67, 1985, 16, 365, 6315, 955, 3292, 4605, 11269, 3546, 4672, 871, 18, 6185, 14...
im.filedate as im_filedate,
def collate_coadd(self,band): table = '%s_files' % self.release query=""" select im.band as band, im.id as im_id, im.run as im_run, im.filename as im_filename, im.filetype as im_filetype, im.filedate as im_filedate, im.tilename as im_tilename, cat.id as cat_id, cat.run as cat_run, cat.filename as cat_filename, cat.filetype as cat_filetype, cat.filedate as cat_filedate, cat.tilename as cat_tilename from {table} cat, (select id,run,band,filename,filetype,filedate,tilename from {table} where band = '{band}' and filetype='coadd') im where cat.catalog_parentid = im.id """.format(table=table,band=band)
e077f34a22f61ca847c50e8fd64b7b40b080627e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6617/e077f34a22f61ca847c50e8fd64b7b40b080627e/oracle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4508, 340, 67, 2894, 1289, 12, 2890, 16, 12752, 4672, 1014, 273, 1995, 87, 67, 2354, 11, 738, 365, 18, 9340, 843, 1546, 3660, 2027, 709, 18, 12752, 487, 8937, 16, 709, 18, 350, 487, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4508, 340, 67, 2894, 1289, 12, 2890, 16, 12752, 4672, 1014, 273, 1995, 87, 67, 2354, 11, 738, 365, 18, 9340, 843, 1546, 3660, 2027, 709, 18, 12752, 487, 8937, 16, 709, 18, 350, 487, ...
self.class_version, version)
object_version, version)
def update(self, version=None, *args, **kw): # Set zero version if the object does not have a version object_version = self.metadata.get_property('version') if object_version is None: object_version = '00000000'
81e67df19651104d27eb3e5d0ccc26a2b68d94d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/81e67df19651104d27eb3e5d0ccc26a2b68d94d0/Handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 1177, 33, 7036, 16, 380, 1968, 16, 2826, 9987, 4672, 468, 1000, 3634, 1177, 309, 326, 733, 1552, 486, 1240, 279, 1177, 733, 67, 1589, 273, 365, 18, 4165, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 1177, 33, 7036, 16, 380, 1968, 16, 2826, 9987, 4672, 468, 1000, 3634, 1177, 309, 326, 733, 1552, 486, 1240, 279, 1177, 733, 67, 1589, 273, 365, 18, 4165, 18, 588, ...
if o.document_in_parent_page]
if o.document_in_parent_page and o.system.shouldInclude(o)]
def methods(self): return [o for o in self.ob.orderedcontents if o.document_in_parent_page]
670e0e4905e7f545ebb87ce299e665f692e5e23e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5471/670e0e4905e7f545ebb87ce299e665f692e5e23e/pages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2590, 12, 2890, 4672, 327, 306, 83, 364, 320, 316, 365, 18, 947, 18, 9885, 3980, 309, 320, 18, 5457, 67, 267, 67, 2938, 67, 2433, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2590, 12, 2890, 4672, 327, 306, 83, 364, 320, 316, 365, 18, 947, 18, 9885, 3980, 309, 320, 18, 5457, 67, 267, 67, 2938, 67, 2433, 65, 2, -100, -100, -100, -100, -100, -100, -100, -10...
self.userwantswindow = True return
if self.lastkey_was_tab: cursel = int(self.listbox.curselection()[0]) self._change_start(self.completions[cursel]) self.hide_window() return "break" else: self.userwantswindow = True self.lastkey_was_tab = True return
def keypress_event(self, event): if not self.is_active(): return keysym = event.keysym if hasattr(event, "mc_state"): state = event.mc_state else: state = 0
4caee3e62f43c46b049bd7e1bacc6e03cf1f633f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/4caee3e62f43c46b049bd7e1bacc6e03cf1f633f/AutoCompleteWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 1028, 67, 2575, 12, 2890, 16, 871, 4672, 309, 486, 365, 18, 291, 67, 3535, 13332, 327, 1311, 2942, 273, 871, 18, 2452, 2942, 309, 3859, 12, 2575, 16, 315, 13952, 67, 2019, 6, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 1028, 67, 2575, 12, 2890, 16, 871, 4672, 309, 486, 365, 18, 291, 67, 3535, 13332, 327, 1311, 2942, 273, 871, 18, 2452, 2942, 309, 3859, 12, 2575, 16, 315, 13952, 67, 2019, 6, 46...
return self.tree.openElements[i]
if -i > len(self.tree.openElements): return self.tree.openElements[0] else: return self.tree.openElements[i]
def getCurrentTable(self): i = -1 while self.tree.openElements[i].name != "table": i -= 1 return self.tree.openElements[i]
59ce3666568a0a929ca19fea5a49b5b455de3fb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4487/59ce3666568a0a929ca19fea5a49b5b455de3fb0/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5175, 1388, 12, 2890, 4672, 277, 273, 300, 21, 1323, 365, 18, 3413, 18, 3190, 3471, 63, 77, 8009, 529, 480, 315, 2121, 6877, 277, 3947, 404, 327, 365, 18, 3413, 18, 3190, 3471, 63, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5175, 1388, 12, 2890, 4672, 277, 273, 300, 21, 1323, 365, 18, 3413, 18, 3190, 3471, 63, 77, 8009, 529, 480, 315, 2121, 6877, 277, 3947, 404, 327, 365, 18, 3413, 18, 3190, 3471, 63, 7...
@return: The HTML code for the module hierarchy tree. This is used by L{_trees_to_html} to construct the hiearchy page. @rtype: C{string} """ str = '<ul>\n' public.write(str); private.write(str) for (uid, doc) in self._docmap.items(): if not isinstance(doc, ModuleDoc): continue
Write HTML code for a nested list showing the submodule relationships between all documented packages and modules. This is used by L{_trees_to_html} to write the module hierarchy. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """ uids = [uid for uid in self._docmap.keys() if uid.is_module()] if not uids: return uids.sort() _write_if_nonempty(public, private, uids, '<ul>\n') for uid in uids: doc = self._docmap[uid]
def _write_module_tree(self, public, private): """ @return: The HTML code for the module hierarchy tree. This is used by L{_trees_to_html} to construct the hiearchy page. @rtype: C{string} """ str = '<ul>\n' public.write(str); private.write(str) # Find all top-level packages. for (uid, doc) in self._docmap.items(): if not isinstance(doc, ModuleDoc): continue pkg = doc.package() if pkg is None or not self._docmap.has_key(pkg): self._write_module_tree_item(public, private, uid) str = '</ul>\n' public.write(str); private.write(str)
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2978, 67, 3413, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 1605, 9360, 2151, 18, 225, 1220, 353, 1399, 635, 511, 95, 67, 17204, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 2978, 67, 3413, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 326, 1605, 9360, 2151, 18, 225, 1220, 353, 1399, 635, 511, 95, 67, 17204, ...
print "onBusMessage: gstreamer error: %s" % err
logging.error("onBusMessage: gstreamer error: %s", err)
def onBusMessage(self, bus, message): confirmMainThread() "recieves message posted on the GstBus" if message.type == gst.MESSAGE_ERROR: err, debug = message.parse_error() print "onBusMessage: gstreamer error: %s" % err elif message.type == gst.MESSAGE_EOS:
e1525c9d9702d597df70f25448a0a053e7addb24 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/e1525c9d9702d597df70f25448a0a053e7addb24/gstreamerrenderer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 7086, 1079, 12, 2890, 16, 5766, 16, 883, 4672, 6932, 6376, 3830, 1435, 315, 3927, 1385, 3324, 883, 23082, 603, 326, 611, 334, 7086, 6, 309, 883, 18, 723, 422, 314, 334, 18, 8723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 7086, 1079, 12, 2890, 16, 5766, 16, 883, 4672, 6932, 6376, 3830, 1435, 315, 3927, 1385, 3324, 883, 23082, 603, 326, 611, 334, 7086, 6, 309, 883, 18, 723, 422, 314, 334, 18, 8723, ...
hklin, self._sweep_information[first]['header'].get(
hklin, self._sweep_information[epoch]['header'].get(
def _scale_prepare(self): '''Perform all of the preparation required to deliver the scaled data. This should sort together the reflection files, ensure that they are correctly indexed (via pointless) and generally tidy things up.'''
6c666a8ea0ab3b268289c15ff747faf9b7294024 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3290/6c666a8ea0ab3b268289c15ff747faf9b7294024/CCP4ScalerImplementation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 67, 9366, 12, 2890, 4672, 9163, 4990, 777, 434, 326, 31981, 1931, 358, 11795, 326, 12304, 501, 18, 1220, 1410, 1524, 9475, 326, 5463, 1390, 16, 3387, 716, 2898, 854, 8783, 880...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 67, 9366, 12, 2890, 4672, 9163, 4990, 777, 434, 326, 31981, 1931, 358, 11795, 326, 12304, 501, 18, 1220, 1410, 1524, 9475, 326, 5463, 1390, 16, 3387, 716, 2898, 854, 8783, 880...
review_requests = review_requests[:limit] return render_to_response(template_name, RequestContext(request, { 'review_requests': review_requests, 'title': title, 'view': view, 'group': group }))
class BogusQuerySet: """ Simple class to fool the object_list generic view into thinking a list is a QuerySet. """ def __init__(self, list): self.list = list def _clone(self): return self.list return object_list(request, queryset=BogusQuerySet(review_requests), template_name=template_name, paginate_by=50, allow_empty=True, template_object_name='review_request', extra_context={ 'title': title, 'view': view, 'group': group, })
def dashboard(request, limit=50, template_name='reviews/dashboard.html'): view = request.GET.get('view', 'incoming') group = request.GET.get('group', "") if view == 'outgoing': review_requests = \ reviews_db.get_review_requests_from_user(request.user.username, request.user) title = "All Outgoing Review Requests"; elif view == 'to-me': review_requests = reviews_db.get_review_requests_to_user_directly( request.user.username, request.user) title = "Incoming Review Requests to Me"; elif view == 'to-group': if group != "": review_requests = reviews_db.get_review_requests_to_group( group, request.user) title = "Incoming Review Requests to %s" % group; else: review_requests = reviews_db.get_review_requests_to_user_groups( request.user.username, request.user) title = "All Incoming Review Requests to My Groups" else: # "incoming" or invalid review_requests = reviews_db.get_review_requests_to_user( request.user.username, request.user) title = "All Incoming Review Requests" review_requests = review_requests[:limit] return render_to_response(template_name, RequestContext(request, { 'review_requests': review_requests, 'title': title, 'view': view, 'group': group }))
69d6abb9a8ff77165e5918cdb10628b180bc72a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/69d6abb9a8ff77165e5918cdb10628b180bc72a0/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11825, 12, 2293, 16, 1800, 33, 3361, 16, 1542, 67, 529, 2218, 266, 7061, 19, 13479, 18, 2620, 11, 4672, 1476, 273, 590, 18, 3264, 18, 588, 2668, 1945, 2187, 296, 31033, 6134, 1041, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11825, 12, 2293, 16, 1800, 33, 3361, 16, 1542, 67, 529, 2218, 266, 7061, 19, 13479, 18, 2620, 11, 4672, 1476, 273, 590, 18, 3264, 18, 588, 2668, 1945, 2187, 296, 31033, 6134, 1041, 273...
return 'X'
return runstate if (values[0] == jobNum) and (runstate == 'C'): pop.close() print "Job %s is being cancelled." % num return runstate
def waitForJobToRun(self, num): self.logger.log(Log.DEBUG, "CondorJobs:waitForJobToRun") jobNum = "%s.0" % num queueExp = re.compile("\S+") cJobSeen = 0 print "waiting for job %s to run." % num print "this might take a few minutes" secondsWaited = 0 while 1: pop = os.popen("condor_q", "r") bJobSeenNow = False if (secondsWaited > 0) and ((secondsWaited % 60) == 0): minutes = secondsWaited/60 print "Waited %d minute%s so far. Still waiting for job %s to run." % ((secondsWaited / 60), ("" if (minutes == 1) else "s"), num) while 1: line = pop.readline() if not line: break values = queueExp.findall(line) if len(values) == 0: continue runstate = values[5] if (values[0] == jobNum): cJobSeen = cJobSeen + 1 bJobSeenNow = True if (values[0] == jobNum) and (runstate == 'R'): print values pop.close() print "Job %s is now being run." % num return 'R' if (values[0] == jobNum) and (runstate == 'H'): pop.close() # throw exception here print "Job %s is being held. Please review the logs." % num return 'H' if (values[0] == jobNum) and (runstate == 'X'): print values pop.close() # throw exception here print "Saw job %s, but it was being aborted" % num return 'X' # check to see if we've seen the job before, but that # it disappeared if (cJobSeen > 0) and (bJobSeenNow == False): pop.close() print "Was monitoring job %s, but it exitted." % num # throw exception return None pop.close() time.sleep(1) secondsWaited = secondsWaited + 1
c92a87c74e95ac4cf2b8a95c4fce14cbed793e54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6549/c92a87c74e95ac4cf2b8a95c4fce14cbed793e54/CondorJobs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10712, 2278, 774, 1997, 12, 2890, 16, 818, 4672, 365, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 12441, 280, 7276, 30, 7048, 1290, 2278, 774, 1997, 7923, 1719, 2578, 273, 2213, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10712, 2278, 774, 1997, 12, 2890, 16, 818, 4672, 365, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 12441, 280, 7276, 30, 7048, 1290, 2278, 774, 1997, 7923, 1719, 2578, 273, 2213, 8...
if (res.find('tp') > -1) or (res == 'tdhtml'):
else:
def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href = \"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: filename = tempfile.mktemp() tmpf = open(filename, "w") browser_dump, counter_dump = results[res] filename = tempfile.mktemp() tmpf = open(filename, "w") if res == 'ts': i = 0 for val in browser_dump: tmpf.write(result_format % (float(val), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 if (res.find('tp') > -1) or (res == 'tdhtml'): # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results[2:]: r = mypage.split(';') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + '_loadtime', tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if float(values[2]) > 0: linkName += "_T: " + values[2] else: linkName += "_1" url = url_format % (results_server, values[0],) link = link_format % (url, linkName,) print "RETURN: " + link
062121d5d02e3785435c3af046e7dbb74e4ebe60 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11102/062121d5d02e3785435c3af046e7dbb74e4ebe60/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
return '(' + string.join(seq, ', ') + ')' def strseq(object, convert, join=joinseq): """Recursively walk a sequence, stringifying each element.""" if type(object) in [types.ListType, types.TupleType]: return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object)) else: return convert(object) def formatargspec(args, varargs=None, varkw=None, defaults=None, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format an argument spec from the 4 values returned by getargspec. The first four arguments are (args, varargs, varkw, defaults). The other four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional function to format the sequence of arguments.""" specs = [] if defaults: firstdefault = len(args) - len(defaults) for i in range(len(args)): spec = strseq(args[i], formatarg, join) if defaults and i >= firstdefault: spec = spec + formatvalue(defaults[i - firstdefault]) specs.append(spec) if varargs: specs.append(formatvarargs(varargs)) if varkw: specs.append(formatvarkw(varkw)) return '(' + string.join(specs, ', ') + ')' def formatargvalues(args, varargs, varkw, locals, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format an argument spec from the 4 values returned by getargvalues. The first four arguments are (args, varargs, varkw, locals). The next four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional function to format the sequence of arguments.""" def convert(name, locals=locals, formatarg=formatarg, formatvalue=formatvalue): return formatarg(name) + formatvalue(locals[name]) specs = [] for i in range(len(args)): specs.append(strseq(args[i], convert, join)) if varargs: specs.append(formatvarargs(varargs) + formatvalue(locals[varargs])) if varkw: specs.append(formatvarkw(varkw) + formatvalue(locals[varkw])) return '(' + string.join(specs, ', ') + ')' def getframeinfo(frame, context=1): """Get information about a frame or traceback object. A tuple of five things is returned: the filename, the line number of the current line, the function name, a list of lines of context from the source code, and the index of the current line within that list. The optional second argument specifies the number of lines of context to return, which are centered around the current line.""" if istraceback(frame): frame = frame.tb_frame if not isframe(frame): raise TypeError, 'arg is not a frame or traceback object' filename = getsourcefile(frame) lineno = getlineno(frame) if context > 0: start = lineno - 1 - context/2 try: lines, lnum = findsource(frame) except IOError: lines = index = None
print 'could not find or import %s' % repr(key) def apropos(key): """Print all the one-line module summaries that contain a substring.""" key = lower(key) for module in sys.builtin_module_names: desc = __import__(module).__doc__ or '' desc = split(desc, '\n')[0] if find(lower(module + ' ' + desc), key) >= 0: print module, '-', desc or '(no description)' modules = [] for dir in pathdirs(): for module, desc in index(dir): desc = desc or '' if module not in modules: modules.append(module) if find(lower(module + ' ' + desc), key) >= 0: desc = desc or '(no description)' if module[-9:] == '.__init__': print module[:-9], '(package) -', desc else: print module, '-', desc def serve(address, callback=None): import BaseHTTPServer, mimetools class Message(mimetools.Message): def __init__(self, fp, seekable=1): Message = self.__class__ Message.__bases__[0].__bases__[0].__init__(self, fp, seekable) self.encodingheader = self.getheader('content-transfer-encoding') self.typeheader = self.getheader('content-type') self.parsetype() self.parseplist() class DocHandler(BaseHTTPServer.BaseHTTPRequestHandler): def send_document(self, title, contents): self.send_response(200) self.send_header('Content-Type', 'text/html') self.end_headers() self.wfile.write( '''<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><title>Python: %s</title><body bgcolor=" self.wfile.write(contents) self.wfile.write('</body></html>') def do_GET(self): path = self.path if path[-5:] == '.html': path = path[:-5] if path[:1] == '/': path = path[1:] if path and path != '.': try: p, x = locate(path) except DocImportError, value: self.send_document(path, html.escape( 'problem with %s - %s' % (value.filename, value.args))) return if x: self.send_document(describe(x), html.document(x)) else: self.send_document(path, 'There is no Python module or object named "%s".' % path) else: heading = html.heading( '<br><big><big><strong>&nbsp;' 'Python: Index of Modules' '</strong></big></big>', ' builtins = [] for name in sys.builtin_module_names: builtins.append('<a href="%s.html">%s</a>' % (name, name)) indices = ['<p>Built-in modules: ' + join(builtins, ', ')] seen = {} for dir in pathdirs(): indices.append(html.index(dir, seen)) self.send_document('Index of Modules', heading + join(indices)) def log_message(self, *args): pass class DocServer(BaseHTTPServer.HTTPServer): def __init__(self, address, callback): self.callback = callback self.base.__init__(self, address, self.handler) def server_activate(self): self.base.server_activate(self) if self.callback: self.callback() DocServer.base = BaseHTTPServer.HTTPServer DocServer.handler = DocHandler DocHandler.MessageClass = Message try: DocServer(address, callback).serve_forever() except KeyboardInterrupt: print 'server stopped' if __name__ == '__main__': import getopt class BadUsage: pass try: opts, args = getopt.getopt(sys.argv[1:], 'k:p:w') writing = 0 for opt, val in opts: if opt == '-k': apropos(lower(val)) break if opt == '-p': try: port = int(val) except ValueError: raise BadUsage def ready(port=port): print 'server ready at http://127.0.0.1:%d/' % port serve(('127.0.0.1', port), ready) break if opt == '-w': if not args: raise BadUsage writing = 1
def joinseq(seq): if len(seq) == 1: return '(' + seq[0] + ',)' else: return '(' + string.join(seq, ', ') + ')'
4caa3a554805c295c44d1854ad0112769036d6d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/4caa3a554805c295c44d1854ad0112769036d6d6/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 5436, 12, 5436, 4672, 309, 562, 12, 5436, 13, 422, 404, 30, 327, 7321, 397, 3833, 63, 20, 65, 397, 2265, 2506, 469, 30, 327, 7321, 397, 533, 18, 5701, 12, 5436, 16, 2265, 8624,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 5436, 12, 5436, 4672, 309, 562, 12, 5436, 13, 422, 404, 30, 327, 7321, 397, 3833, 63, 20, 65, 397, 2265, 2506, 469, 30, 327, 7321, 397, 533, 18, 5701, 12, 5436, 16, 2265, 8624,...
leftOfBox = xPt[ind-1]
leftOfBox = self.xPts[ind-1]
def value(self): "preserve volume during the binning" totalVol = 0 for ind,xPt,yPt in zip(range(self.numPts), self.xPts, self.yPts): #get leftOfBox if ind == 0: if self.leftSide < xPt: leftOfBox = self.leftSide else: leftOfBox = xPt else: leftOfBox = xPt[ind-1] #get rightOfBox if ind == (self.numPts-1): if self.rightSide > xPt: rightOfBox = self.rightSide else: rightOfBox = xPt else: rightOfBox=xPt[ind+1] boxLength = rightOfBox-leftOfBox boxVol = boxLength*yPt totalVol += boxVol totalHeight = totalVol/self.spacing return totalHeight
def0e7c7c6d0e42909a4dc36014312c805680c64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6231/def0e7c7c6d0e42909a4dc36014312c805680c64/SimpleRebin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 12, 2890, 4672, 315, 27297, 3940, 4982, 326, 4158, 2093, 6, 2078, 17431, 273, 374, 364, 1547, 16, 92, 16484, 16, 93, 16484, 316, 3144, 12, 3676, 12, 2890, 18, 2107, 27961, 3631, 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, 460, 12, 2890, 4672, 315, 27297, 3940, 4982, 326, 4158, 2093, 6, 2078, 17431, 273, 374, 364, 1547, 16, 92, 16484, 16, 93, 16484, 316, 3144, 12, 3676, 12, 2890, 18, 2107, 27961, 3631, 3...
step = (num_tests + 1) / 2
FUNCTIONS_PER_FILE = 98
def WriteServiceUnitTests(self, filename): """Writes the service decorder unit tests.""" num_tests = len(self.functions) step = (num_tests + 1) / 2 count = 0 for test_num in range(0, num_tests, step): count += 1 name = filename % count file = CHeaderWriter( name, "// It is included by gles2_cmd_decoder_unittest_%d.cc\n" % count) file.SetFileNum(count) end = test_num + step if end > num_tests: end = num_tests for idx in range(test_num, end): func = self.functions[idx] if True: #gen_cmd = func.GetInfo('gen_cmd') #if gen_cmd == True or gen_cmd == None: if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) else: func.WriteServiceUnitTest(file)
c30a233166deb867ed545b3e0898dfb2e75a589c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/c30a233166deb867ed545b3e0898dfb2e75a589c/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 14650, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 1156, 443, 901, 264, 2836, 7434, 12123, 818, 67, 16341, 273, 562, 12, 2890, 18, 10722, 13, 13690, 55, 67, 3194, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 14650, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 1156, 443, 901, 264, 2836, 7434, 12123, 818, 67, 16341, 273, 562, 12, 2890, 18, 10722, 13, 13690, 55, 67, 3194, 67, ...
if is_tarfile: source_path = os.path.join(tmpdir_sources, package.name, source_filename) if os.path.exists(source_path): fp = open(source_path, "r")
if is_tarfile and os.path.exists(os.path.join(tmpdir_sources, package.name, source_filename)): fp = open(os.path.join(tmpdir_sources, package.name, source_filename), "r")
def submit(request): if request.method == 'POST': form = PackageSubmitForm(request.POST, request.FILES) if not form.is_valid(): return render_to_response('aur/submit.html', { 'user': request.user, 'form': form}) import tempfile directory = tempfile.mkdtemp() filename = os.path.join(directory, form.cleaned_data['file'].filename) # Save the uploaded file to disk fp = open(filename, "wb") fp.write(form.cleaned_data['file'].content) fp.close() try: pkg = PKGBUILD.Package(filename) except: # TODO: Add error to form return render_to_response('aur/submit.html', { 'user': request.user, 'form': form, 'errors': sys.exc_info()[1]}) pkg.validate() if not pkg.is_valid() or pkg.has_warnings(): return render_to_response('aur/submit.html', { 'user': request.user, 'form': form, 'errors': pkg.get_errors(), 'warnings': pkg.get_warnings()}) # TODO: Check if we are updating an existing package or creating one package = Package(name=pkg['name'], version=pkg['version'], release=pkg['release'], description=pkg['description'], url=pkg['url']) package.repository=Repository.objects.get(name__exact="Unsupported") package.category=Category.objects.get(name__iexact=form.cleaned_data['category']) # Save the package so we can reference it package.save() # Check for, and add dependencies for dependency in pkg['depends']: # This would be nice, but we don't have access to the official # repositories #if Package.objects.filter(name=dependency).count() == 0: # TODO: Display an error #return render_to_response("aur/submit.html") try: dep = Package.objects.get(name__exact=dependency) except Package.DoesNotExist: # Fail silently pass else: package.depends.add(dep) package.maintainers.add(request.user) for license in pkg['licenses']: object, created = License.objects.get_or_create(name=license) package.licenses.add(object) for arch in pkg['arch']: try: object = Architecture.objects.get(name=arch) except Architecture.DoesNotExist: # TODO: Add an error transaction.rollback() return render_to_response('aur/submit.html', { 'user': request.user, 'form': form, 'errors': ['architecture %s does not exist' % arch,], }) else: package.architectures.add(object) # Check if the uploaded file is a tar file or just a PKGBUILD try: tar = tarfile.open(filename, "r") except tarfile.ReadError: # It's not a tar file, so if must be a PKGBUILD since it validated is_tarfile = False pkgbuild = filename pass else: is_tarfile = True tmpdir_sources = os.path.join(directory, 'sources') tar.extractall(tmpdir_sources) pkgbuild = os.path.join(tmpdir_sources, package.name, 'PKGBUILD') # Hash and save PKGBUILD fp = open(pkgbuild, "r") pkgbuild_contents = ''.join(fp.readlines()) fp.close() source = PackageFile(package=package) source.save_filename_file('%s/sources/PKGBUILD' % package.name, pkgbuild_contents) source.save() md5hash = hashlib.md5(pkgbuild_contents) hash = PackageHash(hash=md5hash.hexdigest(), file=source, type='md5') hash.save() del pkgbuild_contents # Save tarball # TODO: Tar the saved sources instead of using the uploaded one, for # security if not is_tarfile: # We only have to PKGBUILD, so lets make a tarball tar = tarfile.open(os.path.join(directory, '%s.tar.gz' % package.name), "w|gz") tar.add(filename, '%s/PKGBUILD' % package.name) tar.close() filename = os.path.join(directory, '%s.tar.gz' % package.name) fp = open(filename, "rb") package.save_tarball_file('%s/%s' % (package.name, os.path.basename(filename)), ''.join(fp.readlines())) fp.close() for index in range(len(pkg['source'])): source_filename = pkg['source'][index] source = PackageFile(package=package) # If it's a local file, save to disk, otherwise record as url if is_tarfile: source_path = os.path.join(tmpdir_sources, package.name, source_filename) if os.path.exists(source_path): fp = open(source_path, "r") source.save_filename_file('%s/sources/%s' % (package.name, source_filename), ''.join(fp.readlines())) fp.close() else: # TODO: Check that it _is_ a url, otherwise report an error # that files are missing source.url = source_filename source.save() # Check for, and save, any hashes this file may have for hash_type in ('md5', 'sha1', 'sha256', 'sha384', 'sha512'): if pkg[hash_type + 'sums']: PackageHash(hash=pkg[hash_type + 'sums'][index], file=source, type=hash_type).save() comment = Comment(package=package, user=request.user, message=form.cleaned_data['comment'], ip=request.META['REMOTE_ADDR'], commit=True,) comment.save() transaction.commit() return HttpResponseRedirect( reverse('aur-package_detail', args=[package.name,])) else: form = PackageSubmitForm() return render_to_response('aur/submit.html', { 'user': request.user, 'form': form, })
f8ab8138a5da279aa3ecc3d07710a4295bf95b6c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3268/f8ab8138a5da279aa3ecc3d07710a4295bf95b6c/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2293, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 646, 273, 7508, 11620, 1204, 12, 2293, 18, 3798, 16, 590, 18, 12669, 13, 309, 486, 646, 18, 291, 67, 877, 13332, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2293, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 646, 273, 7508, 11620, 1204, 12, 2293, 18, 3798, 16, 590, 18, 12669, 13, 309, 486, 646, 18, 291, 67, 877, 13332, 327, ...
s = "" for t in filemode_table: while True: if mode & t[0] == t[0]: s += t[1] elif len(t) > 2: t = t[2:] continue else: s += "-" break return s
perm = [] for table in filemode_table: for bit, char in table: if mode & bit == bit: perm.append(char) break else: perm.append("-") return "".join(perm)
def filemode(mode): """Convert a file's mode to a string of the form -rwxrwxrwx. Used by TarFile.list() """ s = "" for t in filemode_table: while True: if mode & t[0] == t[0]: s += t[1] elif len(t) > 2: t = t[2:] continue else: s += "-" break return s
8bc462fcafe9f11094f0185813f95c0f569b112e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bc462fcafe9f11094f0185813f95c0f569b112e/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 3188, 12, 3188, 4672, 3536, 2723, 279, 585, 1807, 1965, 358, 279, 533, 434, 326, 646, 300, 21878, 92, 21878, 92, 21878, 92, 18, 10286, 635, 20334, 812, 18, 1098, 1435, 3536, 4641, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 3188, 12, 3188, 4672, 3536, 2723, 279, 585, 1807, 1965, 358, 279, 533, 434, 326, 646, 300, 21878, 92, 21878, 92, 21878, 92, 18, 10286, 635, 20334, 812, 18, 1098, 1435, 3536, 4641, ...
K = Qp(p, prec=prec)
K = Qp(p, prec=adjusted_prec-1)
def padic_height(self, p, prec=20, sigma=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic height. The equation of the curve must be minimal at $p$.
dc02e67e52b9174198fb76d7b9504168026ea700 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/dc02e67e52b9174198fb76d7b9504168026ea700/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 7299, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, 352, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 4210, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 7299, 33, 7036, 16, 866, 67, 76, 879, 10370, 281, 281, 33, 5510, 4672, 436, 8395, 14169, 281, 326, 6143, 830, 352, 24...
return ','.join(["0x%02x" % ord(b) for b in data])
return ''.join(["0x%02x,%s" % (ord(b), "\n"[:(i&15)==15]) for i, b in enumerate(data)])
def _toHexArray(self, data): return ','.join(["0x%02x" % ord(b) for b in data])
d289fc0da7ef31ed20fcdea2153e5f6bfa664b71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/d289fc0da7ef31ed20fcdea2153e5f6bfa664b71/sbt86.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 7037, 1076, 12, 2890, 16, 501, 4672, 327, 3316, 18, 5701, 3816, 6, 20, 92, 9, 3103, 92, 6, 738, 4642, 12, 70, 13, 364, 324, 316, 501, 5717, 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, 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, 389, 869, 7037, 1076, 12, 2890, 16, 501, 4672, 327, 3316, 18, 5701, 3816, 6, 20, 92, 9, 3103, 92, 6, 738, 4642, 12, 70, 13, 364, 324, 316, 501, 5717, 2, -100, -100, -100, -100, -10...
global _debug
global _debug
def __init__(self, querystring, base_uri=None, query_language="rdql", query_uri=None): self._query = None
81a6ba8266e7bc1f6c47b80ef27d2cf90751c6d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14754/81a6ba8266e7bc1f6c47b80ef27d2cf90751c6d7/RDF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 20741, 16, 1026, 67, 1650, 33, 7036, 16, 843, 67, 4923, 1546, 13623, 1217, 3113, 843, 67, 1650, 33, 7036, 4672, 365, 6315, 2271, 273, 599, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 20741, 16, 1026, 67, 1650, 33, 7036, 16, 843, 67, 4923, 1546, 13623, 1217, 3113, 843, 67, 1650, 33, 7036, 4672, 365, 6315, 2271, 273, 599, 2, -100, -100,...
instname = self.abstract_getclass(space, w_firstarg).getname(space,"")
instname = space.abstract_getclass(w_firstarg).getname(space,"")
def call_args(self, args): space = self.space if self.w_instance is not None: # bound method args = args.prepend(self.w_instance) else: # unbound method w_firstarg = args.firstarg() if w_firstarg is not None and space.is_true( space.abstract_isinstance(w_firstarg, self.w_class)): pass # ok else: myname = self.getname(space,"") clsdescr = self.w_class.getname(space,"") if clsdescr: clsdescr+=" " if w_firstarg is None: instdescr = "nothing" else: instname = self.abstract_getclass(space, w_firstarg).getname(space,"") if instname: instname += " " instdescr = "%sinstance" %instname msg = ("unbound method %s() must be called with %s" "instance as first argument (got %s instead)") % (myname, clsdescr, instdescr) raise OperationError(space.w_TypeError, space.wrap(msg)) return space.call_args(self.w_function, args)
1da6a4401280cbeb87ad2382df20b9a0485474c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/1da6a4401280cbeb87ad2382df20b9a0485474c1/function.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 1968, 12, 2890, 16, 833, 4672, 3476, 273, 365, 18, 2981, 309, 365, 18, 91, 67, 1336, 353, 486, 599, 30, 468, 2489, 707, 833, 273, 833, 18, 23100, 12, 2890, 18, 91, 67, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 1968, 12, 2890, 16, 833, 4672, 3476, 273, 365, 18, 2981, 309, 365, 18, 91, 67, 1336, 353, 486, 599, 30, 468, 2489, 707, 833, 273, 833, 18, 23100, 12, 2890, 18, 91, 67, 133...
'model': fields.char('Model', required=True, size=64), 'module': fields.char('Module', required=True, size=64), 'db_id': fields.integer('Resource ID',
'model': fields.Char('Model', required=True, size=64), 'module': fields.Char('Module', required=True, size=64), 'db_id': fields.Integer('Resource ID',
def unlink(self, cursor, user, ids, context=None): res = super(ModelAccess, self).unlink(cursor, user, ids, context=context) self.check() return res
b4a50d58947e95abbd9349b5fd45a6d43efaa6fa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/b4a50d58947e95abbd9349b5fd45a6d43efaa6fa/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 400, 273, 2240, 12, 1488, 1862, 16, 365, 2934, 318, 1232, 12, 9216, 16, 729, 16, 3258, 16, 819, 33, 2472, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 400, 273, 2240, 12, 1488, 1862, 16, 365, 2934, 318, 1232, 12, 9216, 16, 729, 16, 3258, 16, 819, 33, 2472, 13, ...
format = depsLogConf.get('format') if format.find('/')>-1: format, mode = format.split('/',1)
mode = depsLogConf.get('dot/span-tree-only', None) if mode: mode = "span-tree-only"
def getFormatMode(depsLogConf): format = mode = None format = depsLogConf.get('format') if format.find('/')>-1: format, mode = format.split('/',1) # e.g. 'dot/span-tree-only' return format, mode
085103914bf26e9488399c8c6b73afd19f6b2ce4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/085103914bf26e9488399c8c6b73afd19f6b2ce4/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10959, 2309, 12, 14877, 1343, 3976, 4672, 740, 273, 1965, 273, 599, 1965, 273, 8740, 1343, 3976, 18, 588, 2668, 9811, 19, 3969, 17, 3413, 17, 3700, 2187, 599, 13, 309, 1965, 30, 1965, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10959, 2309, 12, 14877, 1343, 3976, 4672, 740, 273, 1965, 273, 599, 1965, 273, 8740, 1343, 3976, 18, 588, 2668, 9811, 19, 3969, 17, 3413, 17, 3700, 2187, 599, 13, 309, 1965, 30, 1965, ...
xarch, xfields = self._orm__view_look_dom_arch(cr, uid, doc, context=context)
xarch, xfields = self._view_look_dom_arch(cr, uid, doc, context=context)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False): wiz_id = self.pool.get('ir.actions.wizard').search(cr, uid, [("wiz_name","=","create.model")]) res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar) if (res['type']=='form'): plan_id = False if context.get('journal_id',False): plan_id = self.pool.get('account.journal').browse(cr, uid, int(context['journal_id']), context).plan_id elif context.get('plan_id',False): plan_id = self.pool.get('account.analytic.plan').browse(cr, uid, int(context['plan_id']), context).plan_id if plan_id: i=1 res['arch'] = """<form string="%s">
9d81c152c9d46520c005dd11ae692a9485591862 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/9d81c152c9d46520c005dd11ae692a9485591862/account_analytic_plans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 4672, 341, 452, 67, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 1945, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1476, 67, 350, 33, 7036, 16, 1476, 67, 723, 2218, 687, 2187, 819, 33, 7036, 16, 12748, 33, 8381, 4672, 341, 452, 67, 350, ...
ir_data[i] = val
irData[i] = val
def ReceiveThread(self, startupEvent): # This is the code executing in the new thread. try: dll = cdll.LoadLibrary(dllPath) except: self.lastException = self.Exceptions.DriverNotFound startupEvent.set() return if dll.sz_Open() != 1: self.lastException = self.Exceptions.DriverNotOpen startupEvent.set() return dll.sz_Flush() dwNumBytesRead = DWORD() byteIRdata = c_ubyte() ir_data = array.array("B") for i in range(0, 512): ir_data.append(0) i = 0 startupEvent.set() while not self.abortThread: dll.sz_ReadFile(byref(byteIRdata), byref(dwNumBytesRead)) val = byteIRdata.value
5a2107d7555cd3f605f93550144f1b8f5f1ae659 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/5a2107d7555cd3f605f93550144f1b8f5f1ae659/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17046, 3830, 12, 2890, 16, 11850, 1133, 4672, 468, 1220, 353, 326, 981, 11274, 316, 326, 394, 2650, 18, 775, 30, 302, 2906, 273, 7976, 2906, 18, 2563, 9313, 12, 27670, 743, 13, 1335, 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, 17046, 3830, 12, 2890, 16, 11850, 1133, 4672, 468, 1220, 353, 326, 981, 11274, 316, 326, 394, 2650, 18, 775, 30, 302, 2906, 273, 7976, 2906, 18, 2563, 9313, 12, 27670, 743, 13, 1335, 3...
text = pywikibot.replaceExcept(text, ur'ه([.،_<\]\s])', ur'ە\1', exceptions)
text = pywikibot.replaceExcept(text, ur'ه([.،_<\]\s])', ur'ە\1', exceptions)
def fixArabicLetters(self, text): if self.site.lang=='ckb' or self.site.lang=='fa': exceptions = [ 'gallery', 'hyperlink', 'interwiki', # but changes letters inside wikilinks #'link', 'math', 'pre', 'template', 'timeline', 'ref', 'source', 'startspace', 'inputbox', ] # do not change inside file links namespaces = list(self.site.namespace(6, all = True)) pattern = re.compile(u'\[\[(' + '|'.join(namespaces) + '):.+?\..+?\]\]', re.UNICODE) exceptions.append(pattern) text = pywikibot.replaceExcept(text, u',', u'،', exceptions) if self.site.lang=='ckb': text = pywikibot.replaceExcept(text, ur'ه([.،_<\]\s])', ur'ە\1', exceptions) text = pywikibot.replaceExcept(text, u'ه‌', u'ە', exceptions) text = pywikibot.replaceExcept(text, u'ه', u'ھ', exceptions) text = pywikibot.replaceExcept(text, u'ك', u'ک', exceptions) text = pywikibot.replaceExcept(text, ur'[ىي]', u'ی', exceptions) # replace persian digits for i in range(0,10): if self.site.lang=='ckb': text = pywikibot.replaceExcept(text, u'۰۱۲۳۴۵۶۷۸۹'[i], u'٠١٢٣٤٥٦٧٨٩'[i], exceptions) else: text = pywikibot.replaceExcept(text, u'٠١٢٣٤٥٦٧٨٩'[i], u'۰۱۲۳۴۵۶۷۸۹'[i], exceptions) text = pywikibot.replaceExcept(text, u'0123456789'[i], u'۰۱۲۳۴۵۶۷۸۹'[i], exceptions) # do not change digits in class, style and table params pattern = re.compile(u'=".*?"', re.UNICODE) exceptions.append(pattern) # do not change digits inside html-tags pattern = re.compile(u'<[/]*?[^</]+?[/]*?>', re.UNICODE) exceptions.append(pattern) exceptions.append('table') #exclude tables for now for i in range(0,10): if self.site.lang=='ckb': text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions) else: text = pywikibot.replaceExcept(text, str(i), u'۰۱۲۳۴۵۶۷۸۹'[i], exceptions) return text
58d3daae8615ef1513350cc21247d413ef111873 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/58d3daae8615ef1513350cc21247d413ef111873/cosmetic_changes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 37, 20727, 335, 24181, 5432, 12, 2890, 16, 977, 4672, 309, 365, 18, 4256, 18, 4936, 18920, 363, 70, 11, 578, 365, 18, 4256, 18, 4936, 18920, 507, 4278, 4798, 273, 306, 296, 21454...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 37, 20727, 335, 24181, 5432, 12, 2890, 16, 977, 4672, 309, 365, 18, 4256, 18, 4936, 18920, 363, 70, 11, 578, 365, 18, 4256, 18, 4936, 18920, 507, 4278, 4798, 273, 306, 296, 21454...
planar if it has a planar embedding in which all boundary nodes
planar if it has a planar embedding in which all boundary vertices
def is_circular_planar(self, ordered=True): """ Returns True if a graph with boundary is circular planar, and False otherwise. A graph (with nonempty boundary) is circular planar if it has a planar embedding in which all boundary nodes can be drawn in order on a disc boundary, with all the interior nodes drawn inside the disc. Note -- This function assumes that the graph has nonempty boundary. (Circular Planarity has no definition for graphs without boundary). -- The current version relies on computing the genus of a slightly modified graph so it is time-expensive and not reasonable to use for graphs with > 12 vertices. -- Also since the current version relies on computing the genus, it is necessary that the graph be connected in order to use Euler's formula. INPUT: ordered -- whether or not to consider the order of the boundary (set ordered=False to see if there is any possible boundary order that will satisfy circular planarity) EXAMPLES: sage: g439 = Graph({1:[5,7], 2:[5,6], 3:[6,7], 4:[5,6,7]}) sage: g439.set_boundary([1,2,3,4]) sage.: g439.show(figsize=[2,2], vertex_labels=True, vertex_size=175) sage: g439.is_circular_planar() False sage: g439.set_boundary([1,2,3]) sage: g439.is_circular_planar() True Order matters: sage: K23 = graphs.CompleteBipartiteGraph(2,3) sage: K23.set_boundary([0,1,2,3]) sage: K23.is_circular_planar() False sage: K23.set_boundary([0,2,1,3]) # Diff Order! sage: K23.is_circular_planar() True sage: K23.is_circular_planar(ordered=False) True """ if not self.is_connected(): raise TypeError("Graph must be connected to use Euler's Formula to compute minimal genus.") from sage.rings.infinity import Infinity from sage.combinat.all import CyclicPermutationsOfPartition from sage.graphs.graph_genus1 import trace_faces, nice_copy
e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 4672, 3536, 2860, 1053, 309, 279, 2667, 598, 7679, 353, 15302, 4995, 297, 16, 471, 1083, 3541, 18, 225, 432, 2667, 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, 353, 67, 11614, 9559, 67, 7088, 297, 12, 2890, 16, 5901, 33, 5510, 4672, 3536, 2860, 1053, 309, 279, 2667, 598, 7679, 353, 15302, 4995, 297, 16, 471, 1083, 3541, 18, 225, 432, 2667, 26...
return c.start()
d = c.start() d.addCallback(self.doVCClean) return d def doVCClean(self, res=None): """ Clean the repository after some pull or update This will remove untracked files (eg. *.pyc, junk) from the repo dir. """ command = [self.vcexe, 'clean-tree', '-q', '--force', '--unknown', '--detritus'] srcdir = os.path.join(self.builder.basedir, self.srcdir) c = ShellCommand(self.builder, command, srcdir, sendRC=False, timeout=self.timeout) self.command = c d = c.start() return d
def doVCUpdate(self): if self.revision: command = [self.vcexe, 'pull', self.sourcedata.split('\n')[0], '-q', '--overwrite', '-r', str(self.revision)] else: command = [self.vcexe, 'update', '-q'] srcdir = os.path.join(self.builder.basedir, self.srcdir) c = ShellCommand(self.builder, command, srcdir, sendRC=False, timeout=self.timeout) self.command = c return c.start()
5058e66c22e3b5ca07fb89e5a6eec78dec4180ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12355/5058e66c22e3b5ca07fb89e5a6eec78dec4180ec/command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 13464, 1891, 12, 2890, 4672, 309, 365, 18, 13057, 30, 1296, 273, 306, 2890, 18, 90, 311, 6554, 16, 296, 13469, 2187, 365, 18, 3168, 892, 18, 4939, 2668, 64, 82, 6134, 63, 20, 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, 741, 13464, 1891, 12, 2890, 4672, 309, 365, 18, 13057, 30, 1296, 273, 306, 2890, 18, 90, 311, 6554, 16, 296, 13469, 2187, 365, 18, 3168, 892, 18, 4939, 2668, 64, 82, 6134, 63, 20, 64...
messages.ItemList(self.type, self.id, infos).send_to_frontend()
messages.ItemList(self.type, self.tab, infos).send_to_frontend()
def send_initial_list(self): infos = self.tracker.get_items() messages.ItemList(self.type, self.id, infos).send_to_frontend()
fc71a6b2ac009f0424efa83693f1b358f953b7a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/fc71a6b2ac009f0424efa83693f1b358f953b7a7/messagehandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 6769, 67, 1098, 12, 2890, 4672, 10626, 273, 365, 18, 16543, 18, 588, 67, 3319, 1435, 2743, 18, 1180, 682, 12, 2890, 18, 723, 16, 365, 18, 350, 16, 10626, 2934, 4661, 67, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 6769, 67, 1098, 12, 2890, 4672, 10626, 273, 365, 18, 16543, 18, 588, 67, 3319, 1435, 2743, 18, 1180, 682, 12, 2890, 18, 723, 16, 365, 18, 350, 16, 10626, 2934, 4661, 67, 86...
print "Data Integrity error for %s %s" % (entry.tag, entry.get('name'))
syslog(LOG_ERR, "%s %s served by multiple generators" % (entry.tag, entry.get('name')))
def Bind(self, entry, metadata): '''Bind an entry using the appropriate generator''' glist = [gen for gen in self.generators if gen.__provides__.get(entry.tag, {}).has_key(entry.get('name'))] if len(glist) == 1: return glist[0].__provides__[entry.tag][entry.get('name')](entry, metadata) elif len(glist) > 1: print "Data Integrity error for %s %s" % (entry.tag, entry.get('name')) else: for gen in self.generators: if hasattr(gen, "FindHandler"): return gen.FindHandler(entry)(entry, metadata) raise GeneratorError, (entry.tag, entry.get('name'))
0ff5feb08fcc4b6d607e6d6b981c55655ff979a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/0ff5feb08fcc4b6d607e6d6b981c55655ff979a5/Core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6936, 12, 2890, 16, 1241, 16, 1982, 4672, 9163, 3357, 392, 1241, 1450, 326, 5505, 4456, 26418, 314, 1098, 273, 306, 4507, 364, 3157, 316, 365, 18, 25959, 309, 3157, 16186, 685, 13427, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6936, 12, 2890, 16, 1241, 16, 1982, 4672, 9163, 3357, 392, 1241, 1450, 326, 5505, 4456, 26418, 314, 1098, 273, 306, 4507, 364, 3157, 316, 365, 18, 25959, 309, 3157, 16186, 685, 13427, 25...
job.runningJob['schedulerId']
selJob.runningJob['schedulerId']
def getOutput( self, obj, outdir='' ): """ retrieve job output """
55a0d373215e2d2c4f99fe71353cbd62af3d7838 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/55a0d373215e2d2c4f99fe71353cbd62af3d7838/SchedulerGLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 12, 365, 16, 1081, 16, 15398, 2218, 11, 262, 30, 3536, 4614, 1719, 876, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 12, 365, 16, 1081, 16, 15398, 2218, 11, 262, 30, 3536, 4614, 1719, 876, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
raise osv.except_osv(_('Alert for ' + partner.name +' !'), partner.sale_warn_msg) warning = { 'title': "Warning for " + partner.name, 'message': partner.sale_warn_msg
raise osv.except_osv(_('Alert for %s !') % (partner.name), partner.sale_warn_msg) title = _("Warning for %s") % partner.name message = partner.sale_warn_msg warning = { 'title': title, 'message': message,
def onchange_partner_id(self, cr, uid, ids, part): if not part: return {'value':{'partner_invoice_id': False, 'partner_shipping_id':False, 'partner_order_id':False, 'payment_term' : False}} warning = {} title = False message = False partner = self.pool.get('res.partner').browse(cr, uid, part) if partner.sale_warn != 'no-message': if partner.sale_warn == 'block': raise osv.except_osv(_('Alert for ' + partner.name +' !'), partner.sale_warn_msg) warning = { 'title': "Warning for " + partner.name, 'message': partner.sale_warn_msg }
e1e9aae8ac20f36a8ded160db11c0d01ef6b1452 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/e1e9aae8ac20f36a8ded160db11c0d01ef6b1452/warning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1087, 4672, 309, 486, 1087, 30, 327, 13666, 1132, 4278, 27828, 31993, 67, 16119, 67, 350, 4278, 1083, 16, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1087, 4672, 309, 486, 1087, 30, 327, 13666, 1132, 4278, 27828, 31993, 67, 16119, 67, 350, 4278, 1083, 16, 296...
reuse_constant) | 1
socket.SO_REUSEADDR) | 1
def set_reuse_addr(self): # try to re-use a server port if possible try: # Windows SO_REUSEADDR is very broken (from a unixy perspective) if sys.platform == 'win32': reuse_constant = socket.SO_EXCLUSIVEADDRUSE else: reuse_constant = socket.SO_REUSEADDR
425b00ffa51f2f3780374fe8a992876e2cad03fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/425b00ffa51f2f3780374fe8a992876e2cad03fa/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 266, 1202, 67, 4793, 12, 2890, 4672, 468, 775, 358, 283, 17, 1202, 279, 1438, 1756, 309, 3323, 775, 30, 468, 8202, 7460, 67, 862, 8001, 14142, 353, 8572, 12933, 261, 2080, 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, 444, 67, 266, 1202, 67, 4793, 12, 2890, 4672, 468, 775, 358, 283, 17, 1202, 279, 1438, 1756, 309, 3323, 775, 30, 468, 8202, 7460, 67, 862, 8001, 14142, 353, 8572, 12933, 261, 2080, 279...
def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition):
def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition):
def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'All files']
2d64d49b99aa8c5c52c88b719394e5fabcd92cf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2d64d49b99aa8c5c52c88b719394e5fabcd92cf4/FileDlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 883, 2218, 24529, 279, 585, 2187, 805, 1621, 2218, 1093, 16, 805, 812, 2218, 2187, 8531, 2218, 2187, 2154, 33, 27226, 11437, 16, 949, 33, 27226, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 16, 883, 2218, 24529, 279, 585, 2187, 805, 1621, 2218, 1093, 16, 805, 812, 2218, 2187, 8531, 2218, 2187, 2154, 33, 27226, 11437, 16, 949, 33, 27226, ...
def __init__(self, name=None, email=None, attendee_status=None, attendee_type=None, rel=None, extension_elements=None,
def __init__(self, name=None, email=None, attendee_status=None, attendee_type=None, rel=None, extension_elements=None,
def __init__(self, extension_elements=None, extension_attributes=None, text=None): UriEnumElement.__init__(self, tag='eventStatus', enum_map=EventStatus.status_enum, extension_elements=extension_elements, extension_attributes=extension_attributes, text=text)
6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 10693, 3572, 1046, 16186, 2738, 972, 12, 2890, 16, 1047, 2218, 2575, 148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 10693, 3572, 1046, 16186, 2738, 972, 12, 2890, 16, 1047, 2218, 2575, 148...
ParallelContext._condition.release()
condition.release()
def _checkdone(): jobs = [] for c in ParallelContext._allcontexts: for i in xrange(0, len(c.running)): if c.running[i][0].done: jobs.append(c.running[i]) for j in jobs: if j in c.running: c.running.remove(j) return jobs
a78031823f3fb6b9f94fd6706c2ed1af8a948e75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7005/a78031823f3fb6b9f94fd6706c2ed1af8a948e75/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 8734, 13332, 6550, 273, 5378, 364, 276, 316, 20203, 1042, 6315, 454, 18332, 30, 364, 277, 316, 12314, 12, 20, 16, 562, 12, 71, 18, 8704, 3719, 30, 309, 276, 18, 8704, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 8734, 13332, 6550, 273, 5378, 364, 276, 316, 20203, 1042, 6315, 454, 18332, 30, 364, 277, 316, 12314, 12, 20, 16, 562, 12, 71, 18, 8704, 3719, 30, 309, 276, 18, 8704, 63, ...
delta = datetime.timedelta(hours=24) new_datetime = self.utc + delta else: new_datetime = self.utc
new_datetime = self.utc + datetime.timedelta(hours=24) else: new_datetime = self.utc + datetime.timedelta(minutes=1)
def to_inclusive_query(self): """Converts UTC data to query-friendly, date-inclusive string.
d346020a800c60ea0c2444d7af2eb22aec29ba9b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/d346020a800c60ea0c2444d7af2eb22aec29ba9b/date.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 267, 9173, 67, 2271, 12, 2890, 4672, 3536, 5692, 9951, 501, 358, 843, 17, 29111, 16, 1509, 17, 267, 9173, 533, 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, 358, 67, 267, 9173, 67, 2271, 12, 2890, 4672, 3536, 5692, 9951, 501, 358, 843, 17, 29111, 16, 1509, 17, 267, 9173, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
A warning or error generated while tokenizing a formatted documentation string. @ivar line: The line where the C{TokenizationError} occured. @type line: C{string} """ def __init__(self, descr, linenum, line): """ Construct a new tokenization exception. @param descr: A short description of the error. @type descr: C{string} @param linenum: The line number within the docstring that the error occured on. @type linenum: C{int} @param line: The line that the error occured on @type line: C{string} """ self.descr = descr self.linenum = linenum + 1 self.line = line def _repr(self, typ): str = '%5s: %s: ' % ('L'+`self.linenum`, typ) return str + wordwrap(self.descr, 7, startindex=len(str))[:-1]
An error generated while tokenizing a formatted documentation string. """
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.
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, 389, 12715, 12, 2890, 16, 3815, 4672, 3536, 2000, 279, 533, 4335, 434, 333, 385, 95, 21004, 5496, 225, 1220, 3309, 17, 1369, 533, 1914, 279, 2477, 434, 326, 555, 16, 471, 11470, 1625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 12715, 12, 2890, 16, 3815, 4672, 3536, 2000, 279, 533, 4335, 434, 333, 385, 95, 21004, 5496, 225, 1220, 3309, 17, 1369, 533, 1914, 279, 2477, 434, 326, 555, 16, 471, 11470, 1625, ...
cp.set('candidatethreshold',optionText,oldVal)
cp.set('candidatethreshold',myOpt,oldVal)
def __init__(self,cp,block_id,dagDir,channel=''): self.dagDirectory=dagDir self.__executable = cp.get('condor','clustertool') self.__universe= cp .get('condor','clustertool_universe') pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) pipeline.AnalysisJob.__init__(self,cp) self.add_condor_cmd('getenv','True') self.block_id=blockID=block_id #layerID='RESULTS_'+str(blockID) layerID='RESULTS_'+channel+'_'+str(blockID) #Do not set channel name information here. This puts all #threshold output files into same place self.initialDir=layerPath=determineLayerPath(cp,blockID,layerID) blockPath=determineBlockPath(cp,blockID,channel) #Setup needed directories for this job to write in! buildDir(blockPath) buildDir(layerPath) buildDir(blockPath+'/logs') self.set_stdout_file(os.path.normpath(blockPath+'/logs/tracksearchThreshold-$(cluster)-$(process).out')) self.set_stderr_file(os.path.normpath(blockPath+'/logs/tracksearchThreshold-$(cluster)-$(process).err')) filename="/tracksearchThreshold--"+str(channel)+".sub" self.set_sub_file(os.path.normpath(self.dagDirectory+filename)) #Load in the cluster configuration sections! #Add the candidateUtils.py equivalent library to dag for proper #execution! self.candUtil=str(cp.get('pylibraryfiles','pyutilfile')) if ((self.__universe == 'scheduler') or (self.__universe == 'local')): self.add_condor_cmd('environment','PYTHONPATH=$PYTHONPATH:'+os.path.abspath(os.path.dirname(self.candUtil))) else: self.add_condor_cmd('should_transfer_files','yes') self.add_condor_cmd('when_to_transfer_output','on_exit') self.add_condor_cmd('transfer_input_files',self.candUtil) self.add_condor_cmd('initialdir',self.initialDir) #Setp escaping possible quotes in threshold string! optionTextList=[str('expression-threshold'),str('percentile-cut')] for optionText in optionTextList: oldVal=None if cp.has_option('candidatethreshold',optionText): oldVal=cp.get('candidatethreshold',optionText) newVal=str(oldVal) #New shell escape for latest condor 7.2.4 if newVal.__contains__('"'): newVal=str(newVal).replace('"','""') cp.set('candidatethreshold',optionText,newVal) for sec in ['candidatethreshold']: self.add_ini_opts(cp,sec) if oldVal != None: cp.set('candidatethreshold',optionText,oldVal)
2bf156950a8e87899e02d51b15c066f02356afbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2bf156950a8e87899e02d51b15c066f02356afbf/tracksearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4057, 16, 2629, 67, 350, 16, 30204, 1621, 16, 4327, 2218, 11, 4672, 365, 18, 30204, 2853, 33, 30204, 1621, 365, 16186, 17751, 273, 3283, 18, 588, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4057, 16, 2629, 67, 350, 16, 30204, 1621, 16, 4327, 2218, 11, 4672, 365, 18, 30204, 2853, 33, 30204, 1621, 365, 16186, 17751, 273, 3283, 18, 588, 2668, 1...
raise ValueError, "file is closed"
raise ValueError("file is closed")
def _readnormal(self, size=None): """Read operation for regular files. """ if self.closed: raise ValueError, "file is closed" self.fileobj.seek(self.offset + self.pos) bytesleft = self.size - self.pos if size is None: bytestoread = bytesleft else: bytestoread = min(size, bytesleft) self.pos += bytestoread return self.__read(bytestoread)
9d576e732e0c14bd37ecb65d8001d6f596cc8566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9d576e732e0c14bd37ecb65d8001d6f596cc8566/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 6130, 12, 2890, 16, 963, 33, 7036, 4672, 3536, 1994, 1674, 364, 6736, 1390, 18, 3536, 309, 365, 18, 12204, 30, 1002, 2068, 2932, 768, 353, 4375, 7923, 365, 18, 768, 2603, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 6130, 12, 2890, 16, 963, 33, 7036, 4672, 3536, 1994, 1674, 364, 6736, 1390, 18, 3536, 309, 365, 18, 12204, 30, 1002, 2068, 2932, 768, 353, 4375, 7923, 365, 18, 768, 2603, 18,...
gLogger.error(errStr,"%s %s" % (diracSE,res['Message']))
gLogger.error( errStr, "%s %s" % ( diracSE, res['Message'] ) )
def __resolveBestReplicas(self,sourceSE,lfnReplicas,catalogueSize): ########################################################### # Determine the best replicas (remove banned sources, invalid storage elements and file with the wrong size) configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) gLogger.info("ReplicaManager.__resolveBestReplicas: Obtained current banned sources.") replicaPreference = [] for diracSE,pfn in lfnReplicas.items(): if sourceSE and diracSE != sourceSE: gLogger.info("ReplicaManager.__resolveBestReplicas: %s replica not requested." % diracSE) elif diracSE in bannedSources: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is currently banned as a source." % diracSE) else: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE) storageElement = StorageElement(diracSE) res = storageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__resolveBestReplicas: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: if storageElement.getRemoteProtocols()['Value']: gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source pfns for remote protocols.") res = storageElement.getPfnForProtocol(pfn,self.thirdPartyProtocols) if res['OK']: sourcePfn = res['Value'] gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source file size.") res = storageElement.getFileSize(sourcePfn) if res['OK']: if res['Value']['Successful'].has_key(sourcePfn): sourceFileSize = res['Value']['Successful'][sourcePfn] gLogger.info("ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize) if catalogueSize == sourceFileSize: fileTuple = (diracSE,sourcePfn) replicaPreference.append(fileTuple) else: errStr = "ReplicaManager.__resolveBestReplicas: Catalogue size and physical file size mismatch." gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Value']['Failed'][sourcePfn])) else: errStr = "ReplicaManager.__resolveBestReplicas: Completely failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get PFN for replication for StorageElement." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Source Storage Element has no remote protocols." gLogger.info(errStr,diracSE) if not replicaPreference: errStr = "ReplicaManager.__resolveBestReplicas: Failed to find any valid source Storage Elements." gLogger.error(errStr) return S_ERROR(errStr) else: return S_OK(replicaPreference)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
prec -- the precision (in bits), or a field in which to coerce
prec -- integer (default: 53): the number of bits of precision
def numerical_approximation(self, prec=53): """ Get a numerical approximation of self as either a real or complex number.
620e070c69b2ba56d65f620b55649fc43ff77bab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/620e070c69b2ba56d65f620b55649fc43ff77bab/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -10...
if page.isTalkPage()
if page.isTalkPage():
def generateMore(self, number): """Generate more subjects. This is called internally when the list of subjects becomes too small, but only if there is a PageGenerator""" fs = self.firstSubject() if fs: wikipedia.output(u"NOTE: The first unfinished subject is " + fs.originPage.aslink(True)) wikipedia.output(u"NOTE: Number of pages queued is %d, trying to add %d more."%(len(self.subjects), number)) for i in range(number): try: while True: page = self.pageGenerator.next() if page in globalvar.skip: wikipedia.output(u'Skipping: %s is in the skip list' % page.title()) continue if globalvar.skipauto: dictName, year = page.autoFormat() if dictName is not None: wikipedia.output(u'Skipping: %s is an auto entry %s(%s)' % (page.title(),dictName,year)) continue if globalvar.parenthesesonly: # Only yield pages that have ( ) in titles if "(" not in page.title(): continue if page.isTalkPage() wikipedia.output(u'Skipping: %s is a talk page' % page.title()) continue break
ac0e44da68400682b2e1b41ef42c06bc3a67dbd3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/ac0e44da68400682b2e1b41ef42c06bc3a67dbd3/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 7417, 12, 2890, 16, 1300, 4672, 3536, 4625, 1898, 16782, 18, 1220, 353, 2566, 12963, 1347, 326, 666, 434, 16782, 12724, 4885, 5264, 16, 1496, 1338, 309, 1915, 353, 279, 3460, 3908, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 7417, 12, 2890, 16, 1300, 4672, 3536, 4625, 1898, 16782, 18, 1220, 353, 2566, 12963, 1347, 326, 666, 434, 16782, 12724, 4885, 5264, 16, 1496, 1338, 309, 1915, 353, 279, 3460, 3908, ...
def record(v, filename, audiofilename):
def record(v, info, filename, audiofilename):
def record(v, filename, audiofilename): import thread x, y = gl.getsize() vout = VFile.VoutFile().init(filename) vout.format = 'rgb8' vout.width = x vout.height = y vout.writeheader() buffer = [] thread.start_new_thread(saveframes, (vout, buffer)) if audiofilename: initaudio(audiofilename, buffer) gl.wintitle('(rec) ' + filename) v.StartCapture() t0 = time.millitimer() while not gl.qtest(): if v.GetCaptured() > 2: t = time.millitimer() - t0 cd, st = v.GetCaptureData() data = cd.interleave(x, y) cd.UnlockCaptureData() buffer.append(data, t) else: time.millisleep(10) v.StopCapture() while v.GetCaptured() > 0: t = time.millitimer() - t0 cd, st = v.GetCaptureData() data = cd.interleave(x, y) cd.UnlockCaptureData() buffer.append(data, t) buffer.append(None) # Sentinel gl.wintitle('(done) ' + filename)
dd2d726866c36f9ef98e011ae9958f47d4411fed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dd2d726866c36f9ef98e011ae9958f47d4411fed/Vrec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 90, 16, 1123, 16, 1544, 16, 20232, 77, 792, 2550, 4672, 1930, 2650, 619, 16, 677, 273, 5118, 18, 588, 1467, 1435, 331, 659, 273, 776, 812, 18, 58, 659, 812, 7675, 2738, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 90, 16, 1123, 16, 1544, 16, 20232, 77, 792, 2550, 4672, 1930, 2650, 619, 16, 677, 273, 5118, 18, 588, 1467, 1435, 331, 659, 273, 776, 812, 18, 58, 659, 812, 7675, 2738, 12,...
def get_accession_X_snp_matrix(self, curs, accession_id2row_index, SNPpos2col_index, sequence_table, alignment_table):
def get_accession_X_snp_matrix(self, curs, accession_id2row_index, SNPpos2col_index, sequence_table, alignment_table, alignment_id2positions_to_be_checked_ls): """ 2007-11-05 add alignment_id2positions_to_be_checked_ls to skip '-' columns in reference genome to match the real genome position """
def get_accession_X_snp_matrix(self, curs, accession_id2row_index, SNPpos2col_index, sequence_table, alignment_table): sys.stderr.write("Getting accession_X_snp_matrix ...\n") data_matrix = numpy.zeros([len(accession_id2row_index), len(SNPpos2col_index)], numpy.integer) curs.execute("select s.accession, s.alignment, s.bases, a.chromosome, a.start from %s s, %s a where s.alignment=a.id"%(sequence_table, alignment_table)) rows = curs.fetchmany(5000) counter = 0 while rows: for row in rows: accession_id, alignment_id, bases, chromosome, start_pos = row if accession_id in accession_id2row_index: for i in range(start_pos, start_pos+len(bases)): SNP_pos_key = (chromosome, i) if SNP_pos_key in SNPpos2col_index: if self.debug: import pdb pdb.set_trace() SNP_index = SNPpos2col_index[SNP_pos_key] data_matrix[accession_id2row_index[accession_id], SNP_index] = nt2number[bases[i-start_pos]] counter += 1 rows = curs.fetchmany(5000) if self.report: sys.stderr.write('%s%s'%('\x08'*20, counter)) sys.stderr.write("Done.\n") return data_matrix
fa5623119a62d7df76b8e84a1d3811aa80b925fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9645/fa5623119a62d7df76b8e84a1d3811aa80b925fb/CmpAccession2Ecotype.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3860, 285, 67, 60, 67, 87, 6782, 67, 5667, 12, 2890, 16, 25326, 16, 2006, 285, 67, 350, 22, 492, 67, 1615, 16, 14204, 52, 917, 22, 1293, 67, 1615, 16, 3102, 67, 2121, 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, 336, 67, 3860, 285, 67, 60, 67, 87, 6782, 67, 5667, 12, 2890, 16, 25326, 16, 2006, 285, 67, 350, 22, 492, 67, 1615, 16, 14204, 52, 917, 22, 1293, 67, 1615, 16, 3102, 67, 2121, 16, ...
log_and_exec(CHECK + " group -vv --name test_users_A --extended --auto-no",
log_and_exec(CHK + " group -vv --name test_users_A --extended --auto-no",
def test_users(): """Test ADD/MOD/DEL on user accounts in various ways.""" test_message('''starting users related tests.''') log_and_exec(ADD + " group --name test_users_A --description 'groupe créé pour la suite de tests sur les utilisateurs, vous pouvez effacer'") log_and_exec(ADD + " profile --name Utilisagers --group utilisagers --comment 'profil normal créé pour la suite de tests utilisateurs'") log_and_exec(ADD + " profile --name Responsibilisateurs --group responsibilisateurs --groups cdrom,lpadmin,plugdev,audio,video,scanner,fuse --comment 'profil power user créé pour la suite de tests utilisateurs.'") log_and_exec(ADD + " group --name test_users_B --description 'groupe créé pour la suite de tests sur les utilisateurs, vous pouvez effacer'") os.system(GETENT + " groups") os.system(GETENT + " profiles") log_and_exec(ADD + " user --firstname Utiliçateur --lastname Accentué") log_and_exec(ADD + " user --gecos 'Utilisateur Accentué n°2'", True, 12, comment = "can't build a login from only a GECOS field.") log_and_exec(ADD + " user --login utilisager.normal --profile utilisagers") log_and_exec(MODIFY + " user --login=utilisager.normal -v --add-groups test_users_A") log_and_exec(MODIFY + " user --login=utilisager.normal -v --add-groups test_users_B") # should produce nothing, because nothing is wrong. log_and_exec(CHECK + " group -v --name test_users_B") os.system("rm ~utilisager.normal/test_users_A") # all must be OK, extended checks are not enabled, the program will not "see" the missing link. log_and_exec(CHECK + " group -v --name test_users_A") # the link to group_A isn't here ! log_and_exec(CHECK + " group -vv --name test_users_A --extended --auto-no", True, 7, comment = "a user lacks a symlink.") log_and_exec(CHECK + " group -vv --name test_users_A --extended --auto-yes") # the same check, but checking from users.py #os.system("rm ~utilisager.normal/test_users_A") #log_and_exec(CHECK + " user --name utilisager.normal") # not yet implemented #log_and_exec(CHECK + " user --name utilisager.normal --extended --auto-no", True, 7, comment="user lacks symlink") #log_and_exec(CHECK + " user --name utilisager.normal --extended --auto-yes") # checking for Maildir repair capacity... if configuration.users.mailbox_type == configuration.MAIL_TYPE_HOME_MAILDIR: os.system("rm -rf ~utilisager.normal/" + configuration.users.mailbox) log_and_exec(CHECK + " user -v --name utilisager.normal --auto-no", True, 7, comment="user lacks ~/" + configuration.users.mailbox) log_and_exec(CHECK + " user -v --name utilisager.normal --auto-yes") os.system("touch ~utilisager.normal/.dmrc ; chmod 666 ~utilisager.normal/.dmrc") log_and_exec(CHECK + " user -v --name utilisager.normal --auto-yes") os.system("mv -f ~utilisager.normal/test_users_B ~utilisager.normal/mon_groupe_B_préféré") # all must be ok, the link is just renamed... log_and_exec(CHECK + " group -vv --name test_users_B --extended") # FIXME: verify the user can create things in shared group dirs. log_and_exec(MODIFY + " user --login=utilisager.normal --del-groups test_users_A") # should fail log_and_exec(MODIFY + " user --login=utilisager.normal --del-groups test_users_A", comment = "already not a member.") log_and_exec(ADD + " user --login test.responsibilly --profile responsibilisateurs") log_and_exec(MODIFY + " profile --group utilisagers --add-groups cdrom") log_and_exec(MODIFY + " profile --group utilisagers --add-groups cdrom,test_users_B") log_and_exec(MODIFY + " profile --group utilisagers --apply-groups") log_and_exec(MODIFY + " profile --group responsibilisateurs --add-groups plugdev,audio,test_users_A") log_and_exec(MODIFY + " profile --group responsibilisateurs --del-groups audio") log_and_exec(MODIFY + " profile --group responsibilisateurs --apply-groups") # clean the system log_and_exec(DELETE + " user --login utilicateur.accentue") log_and_exec(DELETE + " user --login utilisateur.accentuen2", True, 5, comment = "this user has *NOT* been created previously.") log_and_exec(DELETE + " profile -vvv --group utilisagers --del-users --no-archive") #os.system(GETENT + " users") log_and_exec(DELETE + " profile --group responsibilisateurs", True, 12, comment = "there are still some users in the pri group of this profile.") log_and_exec(DELETE + " group --name=test_users_A --del-users --no-archive") log_and_exec(DELETE + " user --login test.responsibilly") # this should work now that the last user has been deleted log_and_exec(DELETE + " profile --group responsibilisateurs") log_and_exec(DELETE + " group --name=test_users_B -vv") # already deleted before #log_and_exec(DELETE + " user --login utilisager.normal") #log_and_exec(DELETE + " user --login test.responsibilly") test_message('''users related tests finished.''')
07cb13c975b820cb15074a8378ec89357e5846f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/07cb13c975b820cb15074a8378ec89357e5846f4/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5577, 13332, 3536, 4709, 11689, 19, 6720, 19, 24733, 603, 729, 9484, 316, 11191, 16226, 12123, 225, 1842, 67, 2150, 2668, 6309, 18526, 3677, 3746, 7434, 1093, 11, 6134, 225, 613,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5577, 13332, 3536, 4709, 11689, 19, 6720, 19, 24733, 603, 729, 9484, 316, 11191, 16226, 12123, 225, 1842, 67, 2150, 2668, 6309, 18526, 3677, 3746, 7434, 1093, 11, 6134, 225, 613,...
protocol,
DEFAULT_HTTP_PROTOCOL,
def feed_id(self, user): protocol = getattr(settings, "DEFAULT_HTTP_PROTOCOL", "http") return "%s://%s%s" % ( protocol, Site.objects.get_current().domain, reverse('notification_feed_for_user'), )
bd95ae7ee579679f01d6c9166d74adf85c8b8cce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11515/bd95ae7ee579679f01d6c9166d74adf85c8b8cce/feeds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4746, 67, 350, 12, 2890, 16, 729, 4672, 1771, 273, 3869, 12, 4272, 16, 315, 5280, 67, 3693, 67, 16850, 3113, 315, 2505, 7923, 327, 2213, 87, 23155, 87, 9, 87, 6, 738, 261, 3331, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4746, 67, 350, 12, 2890, 16, 729, 4672, 1771, 273, 3869, 12, 4272, 16, 315, 5280, 67, 3693, 67, 16850, 3113, 315, 2505, 7923, 327, 2213, 87, 23155, 87, 9, 87, 6, 738, 261, 3331, 67, ...
if (self.allow_multiple(file_param_name) and (file_param_name in self._param_files)) : self._param_files[file_param_name].append(file_name)
if self.allow_multiple(file_param_name) : if (not file_param_name in self._param_files) : self._param_files[file_param_name] = [] self._param_files[file_param_name].append(file_name)
def set_param_file (self, file_name, file_param_name, input_file=None, run_callback=True) : if self.allowed_param_names is not None : if not file_param_name in self.allowed_param_names : raise KeyError("Unrecognized input file parameter %s."%file_param_name) if (file_name is None) or (file_name == "") or (file_name == "None") : self._param_files.pop(file_param_name) else : if (input_file is not None) : self.save_file(input_file) elif (self.get_file(file_name) is None) : from iotbx import file_reader input_file = file_reader.any_file(file_name) self.save_file(input_file) if (self.allow_multiple(file_param_name) and (file_param_name in self._param_files)) : self._param_files[file_param_name].append(file_name) else : self._param_files[file_param_name] = file_name if run_callback : callback = self._param_callbacks.get(file_param_name, None) if (callback is not None) : callback(file_name)
1ffdba0daa3c5daa75885bd6e76c93b7058d8745 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/1ffdba0daa3c5daa75885bd6e76c93b7058d8745/file_cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 891, 67, 768, 261, 2890, 16, 585, 67, 529, 16, 585, 67, 891, 67, 529, 16, 810, 67, 768, 33, 7036, 16, 1086, 67, 3394, 33, 5510, 13, 294, 309, 365, 18, 8151, 67, 891, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 891, 67, 768, 261, 2890, 16, 585, 67, 529, 16, 585, 67, 891, 67, 529, 16, 810, 67, 768, 33, 7036, 16, 1086, 67, 3394, 33, 5510, 13, 294, 309, 365, 18, 8151, 67, 891, 67,...
templateString = re.compile(r"<!--StartDeleteIf:(.*?)-->(.*?)<!--EndDeleteIf:\1-->", re.S).sub(self._handleDeleteIf, templateString) templateString = re.compile(r"<!--StartIncludeIf:(.*?)-->(.*?)<!--EndIncludeIf:\1-->", re.S).sub(self._handleIncludeIf, templateString)
templateString = self.deleteIfRegex.sub(self._handleDeleteIf, templateString) templateString = self.includeIfRegex.sub(self._handleIncludeIf, templateString)
def parseSingleTemplate(self, templateString): # Handle conditional includes/deletes templateString = re.compile(r"<!--StartDeleteIf:(.*?)-->(.*?)<!--EndDeleteIf:\1-->", re.S).sub(self._handleDeleteIf, templateString) templateString = re.compile(r"<!--StartIncludeIf:(.*?)-->(.*?)<!--EndIncludeIf:\1-->", re.S).sub(self._handleIncludeIf, templateString)
c6c44c612342a8660a5732bbf5c6c50ee5b72ac5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2223/c6c44c612342a8660a5732bbf5c6c50ee5b72ac5/rdw_templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 5281, 2283, 12, 2890, 16, 1542, 780, 4672, 468, 5004, 11139, 6104, 19, 72, 5092, 1542, 780, 273, 283, 18, 11100, 12, 86, 6, 5586, 413, 1685, 2613, 2047, 30, 21110, 413, 34, 21110...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 5281, 2283, 12, 2890, 16, 1542, 780, 4672, 468, 5004, 11139, 6104, 19, 72, 5092, 1542, 780, 273, 283, 18, 11100, 12, 86, 6, 5586, 413, 1685, 2613, 2047, 30, 21110, 413, 34, 21110...
(acc, lenTable, attrList, strList) = eval(line)
(acc, other_results, lenTable, attrList, strList) = eval(line)
def loadProjections(self, name = None): self.projections = [] self.kNeighborsLabel.setText("Number of neighbors (k): " ) self.percentDataUsedLabel.setText("Percent of data used:" ) self.testingMethodLabel.setText("Testing method used:" ) self.qualityMeasureLabel.setText("Quality measure used:" ) if name == None: name = str(QFileDialog.getOpenFileName( self.lastSaveDirName, "Interesting projections (*.proj)", self, "", "Open Projections")) if name == "": return
24ff6c3ea6e698240bb31639dc58c4b6ec86d2a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/24ff6c3ea6e698240bb31639dc58c4b6ec86d2a7/OWParallelCoordinates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 14789, 87, 12, 2890, 16, 508, 273, 599, 4672, 365, 18, 19183, 87, 273, 5378, 365, 18, 79, 27053, 2224, 18, 542, 1528, 2932, 1854, 434, 11003, 261, 79, 4672, 315, 262, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 14789, 87, 12, 2890, 16, 508, 273, 599, 4672, 365, 18, 19183, 87, 273, 5378, 365, 18, 79, 27053, 2224, 18, 542, 1528, 2932, 1854, 434, 11003, 261, 79, 4672, 315, 262, 365, 18, ...
with open(controlFilePath,'w') as cf: cf.write('action: finish\n') cf.write('pathToYamlDescription: "{0}"\n'.format(pathToYamlDescription.replace("\\","\\\\"))) cf.write('responseFilePath: "{0}"\n'.format(responseFilePath.replace("\\","\\\\"))) cf.write('responseFormat: json\n') cf.write('arguments:\n{0}'.format(argString)) cf.write('outputFilePath: "{0}"\n'.format(outputFilePath.replace("\\","\\\\"))) cf.write('startTime: {0}\n'.format(self.anyLanguageHubResponse['startTime'])) command = "{0} {1} {2}".format( quote(pathToRuby), quote(hubPath), quote(controlFilePath) ) os.system( command ) else: pass except: pass
os.system( command ) else: pass
def __init__(self): commands = copy(sys.argv) scriptDir,scriptFilename = os.path.split(commands.pop(0)) #currentDir = os.path.abspath(currentDir) #completeScriptPath = os.path.join(currentDir,scriptFilename) #os.chdir(currentDir) pathToRuby = "ruby" if "--pathToRuby" in commands: pos = commands.index("--pathToRuby") commands.pop(pos) pathToRuby = commands.pop(pos)
f7963bc0eec3e2063fa3ee9d99234a5cfae5d1e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14380/f7963bc0eec3e2063fa3ee9d99234a5cfae5d1e5/proteomatic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4364, 273, 1610, 12, 9499, 18, 19485, 13, 2728, 1621, 16, 4263, 5359, 273, 1140, 18, 803, 18, 4939, 12, 7847, 18, 5120, 12, 20, 3719, 468, 2972, 1621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 4364, 273, 1610, 12, 9499, 18, 19485, 13, 2728, 1621, 16, 4263, 5359, 273, 1140, 18, 803, 18, 4939, 12, 7847, 18, 5120, 12, 20, 3719, 468, 2972, 1621, ...
print "Single test run (-t) only allowed by itself" sys.exit(1) testlist = buildUnitTestList(options.args, options.unit or len(options.single) > 0) result = 0 if options.unitSuite: result = runUnitSuite(testlist) if options.unit: result = runUnitTests(testlist) if options.single:
print "Single test run (-t) only allowed by itself" sys.exit(1) if options.unitSuite or options.unit: testlist = buildUnitTestList(options.args, options.unit or len(options.single) > 0) if result == 0 and options.unitSuite: result = runUnitSuite(testlist) if result == 0 and options.unit: result = runUnitTests(testlist) if result == 0 and options.single:
def runFuncSuite(): pass
ff31dec48af666050bd72815e4894489578af7ee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/ff31dec48af666050bd72815e4894489578af7ee/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2622, 13587, 13332, 1342, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2622, 13587, 13332, 1342, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
tooltop = _("Delete this property")
tooltip = _("Delete this property")
def make_nautilus_menu_item(self, id_magic = None): menuitem = super(MenuSeparator, self).make_nautilus_menu_item(id_magic) self.make_insensitive(menuitem) return menuitem
fecaff5e8eafd890face9f81b223ee5d76121bc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/fecaff5e8eafd890face9f81b223ee5d76121bc2/contextmenuitems.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 6582, 1367, 407, 67, 5414, 67, 1726, 12, 2890, 16, 612, 67, 11179, 273, 599, 4672, 3824, 1726, 273, 2240, 12, 4599, 6581, 16, 365, 2934, 6540, 67, 6582, 1367, 407, 67, 5414, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6582, 1367, 407, 67, 5414, 67, 1726, 12, 2890, 16, 612, 67, 11179, 273, 599, 4672, 3824, 1726, 273, 2240, 12, 4599, 6581, 16, 365, 2934, 6540, 67, 6582, 1367, 407, 67, 5414, ...
links.append((i, j))
parent_links.append((i, j)) preservation_crosses = links_cross(preservation_links) parent_crosses = links_cross(parent_links) if preservation_crosses.intersection(parent_crosses): return False links = preservation_links + parent_links
def try_draw(curr_row, next_row, curr_loc, parents): curr_items = len(curr_row) next_items = len(next_row) curr_ghosts = [] for i in xrange(curr_items): if curr_row[i] is None: curr_ghosts.append(i) links = [] have_shift = False for rev in curr_row: if rev is not None and rev in next_row: i = curr_row.index(rev) j = next_row.index(rev) if i != j: have_shift = True if abs(i - j) > 1: return False links.append((i, j)) for p in parents: i = curr_loc j = next_row.index(p) if abs(i - j) > 1 and have_shift: return False links.append((i, j)) draw(curr_items, next_items, curr_loc, links, curr_ghosts, curr_row[curr_loc]) return True
a37d58028ad40f45f8769273e0f538f3556dd065 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8042/a37d58028ad40f45f8769273e0f538f3556dd065/asciik.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 9446, 12, 17016, 67, 492, 16, 1024, 67, 492, 16, 4306, 67, 1829, 16, 6298, 4672, 4306, 67, 3319, 273, 562, 12, 17016, 67, 492, 13, 1024, 67, 3319, 273, 562, 12, 4285, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 67, 9446, 12, 17016, 67, 492, 16, 1024, 67, 492, 16, 4306, 67, 1829, 16, 6298, 4672, 4306, 67, 3319, 273, 562, 12, 17016, 67, 492, 13, 1024, 67, 3319, 273, 562, 12, 4285, 67, ...
self.autoscale = 1
self.a_scale = 1
def __init__(self, atoms, verbose=0, timing=0, interval=1, initframe=0): """
6f65c57f1f14ed3bb6864c9e5f05c115e4555284 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/6f65c57f1f14ed3bb6864c9e5f05c115e4555284/primiplotter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9006, 16, 3988, 33, 20, 16, 15538, 33, 20, 16, 3673, 33, 21, 16, 1208, 3789, 33, 20, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9006, 16, 3988, 33, 20, 16, 15538, 33, 20, 16, 3673, 33, 21, 16, 1208, 3789, 33, 20, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.assertRaises((struct.error, OverflowError), pack, ">" + code, x) self.assertRaises((struct.error, OverflowError), pack, "<" + code, x)
self.assertRaises(struct.error, pack, ">" + code, x) self.assertRaises(struct.error, pack, "<" + code, x)
def test_one(self, x, pack=struct.pack, unpack=struct.unpack, unhexlify=binascii.unhexlify): # Try signed. code = self.signed_code if self.signed_min <= x <= self.signed_max: # Try big-endian. expected = x if x < 0: expected += 1 << self.bitsize self.assert_(expected > 0) expected = hex(expected)[2:] # chop "0x" if len(expected) & 1: expected = "0" + expected expected = unhexlify(expected) expected = b"\x00" * (self.bytesize - len(expected)) + expected
464fc36404c8475efe36accdb1ecde6aac75098a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/464fc36404c8475efe36accdb1ecde6aac75098a/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, 468, 6161, 6726, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 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, 468, 6161, 6726, 18, ...
import __main__ class_ = getattr(__main__, options.classname)
classname = options.classname if "." in classname: lastdot = classname.rfind(".") mod = __import__(classname[:lastdot], globals(), locals(), [""]) classname = classname[lastdot+1:] else: import __main__ as mod print mod.__name__, dir(mod) class_ = getattr(mod, classname)
def parseargs(): global DEBUGSTREAM try: opts, args = getopt.getopt( sys.argv[1:], 'nVhc:d', ['class=', 'nosetuid', 'version', 'help', 'debug']) except getopt.error, e: usage(1, e) options = Options() for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-V', '--version'): print >> sys.stderr, __version__ sys.exit(0) elif opt in ('-n', '--nosetuid'): options.setuid = 0 elif opt in ('-c', '--class'): options.classname = arg elif opt in ('-d', '--debug'): DEBUGSTREAM = sys.stderr # parse the rest of the arguments if len(args) < 1: localspec = 'localhost:8025' remotespec = 'localhost:25' elif len(args) < 2: localspec = args[0] remotespec = 'localhost:25' elif len(args) < 3: localspec = args[0] remotespec = args[1] else: usage(1, 'Invalid arguments: %s' % COMMASPACE.join(args)) # split into host/port pairs i = localspec.find(':') if i < 0: usage(1, 'Bad local spec: %s' % localspec) options.localhost = localspec[:i] try: options.localport = int(localspec[i+1:]) except ValueError: usage(1, 'Bad local port: %s' % localspec) i = remotespec.find(':') if i < 0: usage(1, 'Bad remote spec: %s' % remotespec) options.remotehost = remotespec[:i] try: options.remoteport = int(remotespec[i+1:]) except ValueError: usage(1, 'Bad remote port: %s' % remotespec) return options
6235976f8206723596f07f470a4444779e9b31bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6235976f8206723596f07f470a4444779e9b31bb/smtpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1968, 13332, 2552, 6369, 13693, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 82, 58, 28353, 30, 72, 2187, 10228, 1106, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1968, 13332, 2552, 6369, 13693, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 82, 58, 28353, 30, 72, 2187, 10228, 1106, 33, ...
print " <3> Data Set 1, Plot Data:", d1_plot_data print " <3> Data Set 2, Plot Data:", d2_plot_data
print "Data Set 1, Plot Data:", d1_plot_data print "Data Set 2, Plot Data:", d2_plot_data
def scatter_plot(group_info,scatter_info,data_set): #data_set is a dictionary keyed by quantity, containing lists of groups and Independent Data and Dep data points. for quantity_number in scatter_info: #print "Dataset for quantity number "+str(quantity_number)+": ", data_set[quantity_number] if data_set[quantity_number] == []: if diagnostic_level >= 2: print "No Scatter Plot Data in Quantity "+str(quantity_number)+" Dataset.\n" else: if diagnostic_level >= 2: print "Scatter Plot Data for Quantity "+str(quantity_number)+" Dataset." # Set variables for Plot extracted from the first group of lines in config file starting with 'q'. # Variables for plot. plot_title = scatter_info[int(quantity_number)]['Scatter_Plot_Title'] if diagnostic_level >= 2: print "Plot Title:", plot_title ind_title = scatter_info[int(quantity_number)]['Ind_Title'] dep_title = scatter_info[int(quantity_number)]['Dep_Title'] min_ind = float(scatter_info[int(quantity_number)]['Plot_Min']) max_ind = float(scatter_info[int(quantity_number)]['Plot_Max']) min_dep = float(scatter_info[int(quantity_number)]['Plot_Min']) max_dep = float(scatter_info[int(quantity_number)]['Plot_Max']) percent_error = float(scatter_info[int(quantity_number)]['%error']) title_position = scatter_info[int(quantity_number)]['Title_Position'] plot_width = float(scatter_info[int(quantity_number)]['Plot_Width(cm)']) # Specify the position and line spacing of the plot key. key_pos = scatter_info[int(quantity_number)]['Key_Position'] key_dist = 0.1*unit.v_cm v_dist = 0.7*unit.v_cm h_dist = 0.4*unit.v_cm #Create filename from fields in input file record. plot_file_name = scatter_info[int(quantity_number)]['Plot_Filename'] if diagnostic_level >= 3: print " <3> Plot File Name:", plot_file_name # Determine the location for the key, alignment based on Key_Position setting. if key_pos == "tl" or "tc" or "tr" or "ml" or "mc" or "mr" or "bl" or "bc" or "br": pass if diagnostic_level >= 3: print " <3> Key Position =", key_pos else: if diagnostic_level >= 2: print "The key position was not specified.\nUsing the default bottom right position." key_pos = "br" # Determine the location for the title, alignment based on Title_Position setting. if title_position == "tl" or "tc" or "tr" or "ml" or "mc" or "mr" or "bl" or "bc" or "br": () if diagnostic_level >= 3: print " <3> Title Position =", title_position else: if diagnostic_level >= 2: print "The Title position was not specified.\nUsing the default top left position." key_pos = "tl" #Begin Plotting # Initialize graph object g = graph.graphxy(width=plot_width, ratio=1/1, key=graph.key.key(pos=key_pos, dist=key_dist, vdist=v_dist, hdist=h_dist, textattrs=[text.size.footnotesize]), x=graph.axis.linear(title=ind_title, min=min_ind, max=max_ind), y=graph.axis.linear(title=dep_title, min=min_dep, max=max_dep)) #Plot Midline and Error bounds lines. errorLineCenterPoints = [[min_ind,min_dep],[max_ind,max_dep]] if diagnostic_level >= 3: print " <3> Error Line Center Points:", errorLineCenterPoints if min_ind < 0: lower_bound = ((min_dep)+((min_dep)*(percent_error / 100))) errorLineLowerPoints = [[min_ind,lower_bound],[max_ind,max_dep]] upper_bound = ((min_dep)-((min_dep)*(percent_error/100))) errorLineUpperPoints = [[min_ind,upper_bound],[max_ind,max_dep]] if diagnostic_level >= 3: print " <3> Error Line Center Points:", errorLineCenterPoints print " <3> Lower Bound:", lower_bound print " <3> Lower Error Line Points:", errorLineLowerPoints print " <3> Upper Bound:", upper_bound print " <3> Upper Error Line Points:", errorLineUpperPoints else: lower_bound = max_dep - max_dep * percent_error / 100 errorLineLowerPoints = [[min_ind,min_dep],[max_ind,lower_bound]] upper_bound = max_dep + max_dep * percent_error / 100.0 errorLineUpperPoints = [[min_ind,min_dep],[max_ind,upper_bound]] if diagnostic_level >= 3: print " <3> Error Line Center Points:", errorLineCenterPoints print " <3> Lower Bound:", lower_bound print " <3> Lower Error Line Points:", errorLineLowerPoints print " <3> Upper Bound:", upper_bound print " <3> Upper Error Line Points:", errorLineUpperPoints g.plot(graph.data.points(errorLineCenterPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.solid])]) if percent_error == 0: if diagnostic_level >= 1: print "No Error Bars Drawn" else: g.plot(graph.data.points(errorLineLowerPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) g.plot(graph.data.points(errorLineUpperPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) #One point at a time added to plot from each data set. # Iterate over items in scatter data dictionary key for items that are not []. # Append data sets to scatter_plot_data_list # colors for symbols are from http://pyx.sourceforge.net/manual/colorname.html scatter_plot_data_list = [] grouped_data = {} grouped_data_list = range(len(group_quantity_data_dicts[0])+1) if diagnostic_level >= 3: print " <3> Grouped Data List:", grouped_data_list if diagnostic_level >= 3: print " <3> DataSet for Quantity "+str(quantity_number)+":", data_set[quantity_number] if len(data_set[quantity_number]) > 1: if diagnostic_level >= 3: print " <3> Grouped Scatter Data:", data_set[quantity_number] for arr_temp in grouped_data_list: grouped_data_list[arr_temp] = [] for data_set_item in data_set[quantity_number]: if diagnostic_level >= 3: print " <3> Data Set Item:", data_set_item print " <3> Data for Group:"+data_set_item[0]+":", data_set_item[1] grouped_data_list[int(data_set_item[0])].append(data_set_item[1]) if diagnostic_level >= 3: print " <3> Grouped Data List:", grouped_data_list group_counter = 0 for j in grouped_data_list: if diagnostic_level >= 3: print " <3> J =", j if j != []: if diagnostic_level >= 3: print " <3> Group Counter:", group_counter # Pull group symbol specifications from config file. config_group_symbol = group_info[group_counter]["Symbol"] if diagnostic_level >= 3: print " <3> Group Symbol:", config_group_symbol group_symbol = "graph.style.symbol."+config_group_symbol config_group_symbol_color = group_info[group_counter]["Color"] if diagnostic_level >= 3: print " <3> Group Symbol Color:", config_group_symbol_color config_group_symbol_filled = group_info[group_counter]["Filled"] if diagnostic_level >= 3: print " <3> Group Symbol Filled:", config_group_symbol_filled if config_group_symbol_filled == 'yes': fillstyle = "deco.filled([color.cmyk."+config_group_symbol_color+"])" else: fillstyle = "deco.stroked([color.cmyk."+config_group_symbol_color+"])" #Create temporary symbol style. tempstyle = "graph.style.symbol("+group_symbol+", size=0.1*unit.v_cm, symbolattrs=["+fillstyle+"])" scatterpointstyle = eval(tempstyle) if diagnostic_level >= 3: print " <3> Group Title:", group_info[group_counter]["Group_Title"] g.plot(graph.data.points(j, x=1, y=2, title=group_info[group_counter]["Group_Title"]), [scatterpointstyle]) else: pass group_counter = group_counter + 1 if diagnostic_level >= 3: print " <3> Group Counter:", group_counter else: if diagnostic_level >= 1: print "Non-Grouped Scatter Data:" scatter_plot_data = [] scatter_plot_data.append(data_set[quantity_number][0][1]) if diagnostic_level >= 3: print " <3> Grouped Data List:", grouped_data_list # Now plot the Title text, alignment based on Title_Position setting. # "tl" or "tc" or "tr" or "ml" or "mc" or "mr" or "bl" or "bc" or "br" if title_position == 'tl': g.text(0.2, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.normalsize]) elif title_position == 'tc': g.text(g.width/2, g.height - 0.2, plot_title, [text.halign.center, text.valign.top, text.size.normalsize]) elif title_position == 'tr': g.text(g.width-0.2, g.height - 0.2, plot_title, [text.halign.right, text.valign.top, text.size.normalsize]) elif title_position == 'ml': g.text(0.2, g.height/2, plot_title, [text.halign.left, text.valign.middle, text.size.normalsize]) elif title_position == 'mc': g.text(g.width/2, g.height/2, plot_title, [text.halign.center, text.valign.middle, text.size.normalsize]) elif title_position == 'mr': g.text(g.width-0.2, g.height/2, plot_title, [text.halign.right, text.valign.middle, text.size.normalsize]) elif title_position == 'bl': g.text(0.2, 0.2, plot_title, [text.halign.left, text.valign.bottom, text.size.normalsize]) elif title_position == 'bc': g.text(g.width/2, 0.2, plot_title, [text.halign.center, text.valign.bottom, text.size.normalsize]) elif title_position == 'br': g.text(g.width-0.2, 0.2, plot_title, [text.halign.right, text.valign.bottom, text.size.normalsize]) else: print "A title location was not specified.\nUsing the default top left position." g.text(0.2, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.normalsize]) #Make %error text on plot by error bars. # pos_percent_error = str(percent_error)+"%" # neg_percent_error = "-"+str(percent_error)+"%" # g.text(g.width - 0.4, g.height - 0.3, pos_percent_error, [text.halign.center, text.valign.middle, text.size.tiny]) # g.text(g.width - 0.2, g.height - 0.4, neg_percent_error, [text.halign.center, text.valign.middle, text.size.tiny]) # Write the output plot_file_path = output_directory+plot_file_name if diagnostic_level >= 3: print " <3> Plot File Path:", plot_file_path g.writePDFfile(plot_file_path) if diagnostic_level >= 2: print "Scatter Plot to: \n", plot_file_path+".PDF\n"
f66ca75013a32a9d59d8e58dec0baa78eda49b79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/f66ca75013a32a9d59d8e58dec0baa78eda49b79/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 67, 4032, 12, 1655, 67, 1376, 16, 31320, 67, 1376, 16, 892, 67, 542, 4672, 468, 892, 67, 542, 353, 279, 3880, 17408, 635, 10457, 16, 4191, 6035, 434, 3252, 471, 657, 10891, 1910...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 67, 4032, 12, 1655, 67, 1376, 16, 31320, 67, 1376, 16, 892, 67, 542, 4672, 468, 892, 67, 542, 353, 279, 3880, 17408, 635, 10457, 16, 4191, 6035, 434, 3252, 471, 657, 10891, 1910...
self.utToUtf8(loc.url),
self.utToUtf8(loc_url),
def downloadLocationsKml(self, path='', geo_types=None, geo_query='', REQUEST=None): """Returns the selected locations as a KML file""" path = path or '/'
933ff94fb7cb7af2301ddc7b976c89c7aac8beb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/933ff94fb7cb7af2301ddc7b976c89c7aac8beb3/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 10985, 47, 781, 12, 2890, 16, 589, 2218, 2187, 7856, 67, 2352, 33, 7036, 16, 7856, 67, 2271, 2218, 2187, 12492, 33, 7036, 4672, 3536, 1356, 326, 3170, 7838, 487, 279, 1475, 1495, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4224, 10985, 47, 781, 12, 2890, 16, 589, 2218, 2187, 7856, 67, 2352, 33, 7036, 16, 7856, 67, 2271, 2218, 2187, 12492, 33, 7036, 4672, 3536, 1356, 326, 3170, 7838, 487, 279, 1475, 1495, ...
s0 = SubByte(kj[1,c-1]) s1 = SubByte(kj[2,c-1]) s2 = SubByte(kj[3,c-1]) s3 = SubByte(kj[0,c-1])
s0 = SubByte(kj[1, c-1]) s1 = SubByte(kj[2, c-1]) s2 = SubByte(kj[3, c-1]) s3 = SubByte(kj[0, c-1])
def key_schedule(self, kj, i): """ Return $k_i$ for a given $i$ and $k_j$ with $j = i-1$.
26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
def get_dell_repo(repo, localdir):
def get_dell_repo(repo, localdir, only_systems):
def get_dell_repo(repo, localdir): '''Calls the rsync function to obtain a local copy of Dell's repos''' return rsync(repo, localdir)
07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 72, 1165, 67, 7422, 12, 7422, 16, 1191, 1214, 16, 1338, 67, 4299, 87, 4672, 9163, 10125, 326, 3597, 1209, 445, 358, 7161, 279, 1191, 1610, 434, 463, 1165, 1807, 13686, 26418, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 72, 1165, 67, 7422, 12, 7422, 16, 1191, 1214, 16, 1338, 67, 4299, 87, 4672, 9163, 10125, 326, 3597, 1209, 445, 358, 7161, 279, 1191, 1610, 434, 463, 1165, 1807, 13686, 26418, ...
env['HTTP_ACCEPT_LANGUAGE'] = self.headers['accept-language']
env['HTTP_ACCEPT_LANGUAGE'] = self.headers.get('accept-language')
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path
0bef93df8ec828eb6d4bfca80c5056ce194d4c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0bef93df8ec828eb6d4bfca80c5056ce194d4c4a/roundup_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 2681, 67, 19062, 12, 2890, 4672, 9163, 1220, 353, 326, 3443, 1087, 434, 326, 385, 13797, 5057, 9163, 3127, 273, 365, 18, 803, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 2681, 67, 19062, 12, 2890, 4672, 9163, 1220, 353, 326, 3443, 1087, 434, 326, 385, 13797, 5057, 9163, 3127, 273, 365, 18, 803, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
Set the Condor log file to be used by this CondorJob log = path of Condor log file
Set the Condor log file to be used by this CondorJob. log = path of Condor log file.
def set_log_file(self,log): """ Set the Condor log file to be used by this CondorJob log = path of Condor log file """ self.__job.set_log_file(log)
43adc4d722e280c921ddb7c38f99393e57936591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/43adc4d722e280c921ddb7c38f99393e57936591/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1330, 67, 768, 12, 2890, 16, 1330, 4672, 3536, 1000, 326, 735, 72, 280, 613, 585, 358, 506, 1399, 635, 333, 735, 72, 280, 2278, 18, 613, 273, 589, 434, 735, 72, 280, 613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 1330, 67, 768, 12, 2890, 16, 1330, 4672, 3536, 1000, 326, 735, 72, 280, 613, 585, 358, 506, 1399, 635, 333, 735, 72, 280, 2278, 18, 613, 273, 589, 434, 735, 72, 280, 613, ...
summary='%d source files given on command line' % len(to_read))
summary='%d source files given on command line' % len(to_write))
def build_specific(self, source_filenames): """Only rebuild as much as needed for changes in the source_filenames.""" # bring the filenames to the canonical format, that is, # relative to the source directory. dirlen = len(self.srcdir) + 1 to_write = [path.abspath(filename)[dirlen:] for filename in source_filenames] self.load_env() self.build(to_write, summary='%d source files given on command line' % len(to_read))
7c86f6623279052ea372ff758c5fff2ebb8aac62 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/7c86f6623279052ea372ff758c5fff2ebb8aac62/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 12524, 12, 2890, 16, 1084, 67, 19875, 4672, 3536, 3386, 13419, 487, 9816, 487, 3577, 364, 3478, 316, 326, 1084, 67, 19875, 12123, 468, 5186, 310, 326, 9066, 358, 326, 7378, 740...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 12524, 12, 2890, 16, 1084, 67, 19875, 4672, 3536, 3386, 13419, 487, 9816, 487, 3577, 364, 3478, 316, 326, 1084, 67, 19875, 12123, 468, 5186, 310, 326, 9066, 358, 326, 7378, 740...
ChannelGuide(u"http://miroguide.com/")
ChannelGuide(config.get(prefs.CHANNEL_GUIDE_URL))
def setUp(self): MiroTestCase.setUp(self) self.test_handler = TestFrontendMessageHandler() messages.FrontendMessage.install_handler(self.test_handler) messages.BackendMessage.install_handler( messagehandler.BackendMessageHandler()) self.channelTabOrder = TabOrder(u'channel') self.playlistTabOrder = TabOrder(u'playlist') # Adding a guide ensures that if we remove all our channel/playlist # tabs the selection code won't go crazy. ChannelGuide(u"http://miroguide.com/")
175881f80966dbee90de46bc5ac646d92a44edba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/175881f80966dbee90de46bc5ac646d92a44edba/messagetest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 490, 11373, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 3813, 67, 4176, 273, 7766, 21905, 1079, 1503, 1435, 2743, 18, 21905, 1079, 18, 5425, 67, 4176, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 490, 11373, 4709, 2449, 18, 542, 1211, 12, 2890, 13, 365, 18, 3813, 67, 4176, 273, 7766, 21905, 1079, 1503, 1435, 2743, 18, 21905, 1079, 18, 5425, 67, 4176, 12, ...
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 50),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 50),
def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True
d2b96a3b3def3ef52aca2b99e2897609432f783a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2b96a3b3def3ef52aca2b99e2897609432f783a/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 16119, 67, 2080, 67, 266, 11504, 398, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3635, 273, 2618, 364, 436, 316, 365, 18, 6011, 18, 588, 2668, 463...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16119, 67, 2080, 67, 266, 11504, 398, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3635, 273, 2618, 364, 436, 316, 365, 18, 6011, 18, 588, 2668, 463...
floppy = self.vbox.openFloppyImage(location, uuid)
try: floppy = self.vbox.openFloppyImage(location, uuid) except COMError, e: floppy = self.find_floppy(location)
def add_floppy(self, location): uuid = str(uuid_lib.uuid4()) try: floppy = self.vbox.openFloppyImage(location, uuid) if self.vbox_version() < "2.1.0": self.vbox.registerFloppyImage(floppy) except Exception, e: logging.debug(e) return None return floppy
e42d5e4d966b5745bd27753a10b57eeeb93ee098 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/e42d5e4d966b5745bd27753a10b57eeeb93ee098/ufovboxapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 74, 16884, 2074, 12, 2890, 16, 2117, 4672, 3822, 273, 609, 12, 7080, 67, 2941, 18, 7080, 24, 10756, 775, 30, 775, 30, 284, 16884, 2074, 273, 365, 18, 90, 2147, 18, 3190, 42,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 74, 16884, 2074, 12, 2890, 16, 2117, 4672, 3822, 273, 609, 12, 7080, 67, 2941, 18, 7080, 24, 10756, 775, 30, 775, 30, 284, 16884, 2074, 273, 365, 18, 90, 2147, 18, 3190, 42,...
ret, out = run(cmd)
ret, out = run(cmd, options)
def fail(msg): fails.append((test, msg)) if not options.nodiff: print "\nERROR: %s %s" % (test, msg) return None
8148049fb59b4fc3d882a03d84d25cd064415947 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/8148049fb59b4fc3d882a03d84d25cd064415947/run-tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 12, 3576, 4672, 6684, 18, 6923, 12443, 3813, 16, 1234, 3719, 309, 486, 702, 18, 19888, 3048, 30, 1172, 1548, 82, 3589, 30, 738, 87, 738, 87, 6, 738, 261, 3813, 16, 1234, 13, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2321, 12, 3576, 4672, 6684, 18, 6923, 12443, 3813, 16, 1234, 3719, 309, 486, 702, 18, 19888, 3048, 30, 1172, 1548, 82, 3589, 30, 738, 87, 738, 87, 6, 738, 261, 3813, 16, 1234, 13, 32...