rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
assert(compound_widget.children.b.orig_value == 'test') assert('enter a value' in compound_widget.children.c.error_msg)
cw = twc.core.request_local()['validated_widget'] assert(cw.children.b.value == 'test') assert('enter a value' in cw.children.c.error_msg)
def test_compound_child_fail(self): testapi.request(1) try: compound_widget.validate({'a': {'b':'test'}}) assert(False) except twc.ValidationError: pass assert(compound_widget.children.b.orig_value == 'test') assert('enter a value' in compound_widget.children.c.error_msg)
63e95fe54937a8558192c280d2bd6d29e642b625 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11475/63e95fe54937a8558192c280d2bd6d29e642b625/test_validation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 22585, 67, 3624, 67, 6870, 12, 2890, 4672, 1842, 2425, 18, 2293, 12, 21, 13, 775, 30, 11360, 67, 6587, 18, 5662, 12590, 11, 69, 4278, 13666, 70, 11, 2497, 3813, 11, 97, 679...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22585, 67, 3624, 67, 6870, 12, 2890, 4672, 1842, 2425, 18, 2293, 12, 21, 13, 775, 30, 11360, 67, 6587, 18, 5662, 12590, 11, 69, 4278, 13666, 70, 11, 2497, 3813, 11, 97, 679...
data, width, height, bytesperpixel = jpeg.decompress(data)
data, width, height, bytesperpixel = jpeg.decompress(img)
def jpeg2rgb(img, width, height): import cl, CL import jpeg data, width, height, bytesperpixel = jpeg.decompress(data) if bytesperpixel <> 4: raise RuntimeError, 'not rgb jpeg' return data
be6d77a9b8b4e97ff2892eddb9c54c5d81a79e39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/be6d77a9b8b4e97ff2892eddb9c54c5d81a79e39/imgconv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29726, 22, 10948, 12, 6081, 16, 1835, 16, 2072, 4672, 1930, 927, 16, 14934, 1930, 29726, 501, 16, 1835, 16, 2072, 16, 1731, 457, 11743, 273, 29726, 18, 323, 14706, 12, 6081, 13, 309, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29726, 22, 10948, 12, 6081, 16, 1835, 16, 2072, 4672, 1930, 927, 16, 14934, 1930, 29726, 501, 16, 1835, 16, 2072, 16, 1731, 457, 11743, 273, 29726, 18, 323, 14706, 12, 6081, 13, 309, 1...
outfile = sys.stdout
outfile = options.stdout
def main( argv = None ): """script main. parses command line options in sys.argv, unless *argv* is given. """ if not argv: argv = sys.argv # setup command line parser parser = optparse.OptionParser( version = "%prog version: $Id: script_template.py 2871 2010-03-03 10:20:44Z andreas $", usage = globals()["__doc__"] ) parser.add_option("-a", "--annotation-file", dest="annotation_files", type="string", action="append", help="filename with annotations [default=%default]." ) parser.add_option("-s", "--segment-file", dest="segment_files", type="string", action="append", help="filename with segments. Also accepts a glob in parantheses [default=%default]." ) parser.add_option("-w", "--workspace-file", dest="workspace_files", type="string", action="append", help="filename with workspace segments. Also accepts a glob in parantheses [default=%default]." ) parser.add_option("-i", "--isochore-file", dest="isochore_files", type="string", action="append", help="filename with isochore segments. Also accepts a glob in parantheses [default=%default]." ) parser.add_option("-l", "--sample-file", dest="sample_files", type="string", action="append", help="filename with sample files. Start processing from samples [default=%default]." ) parser.add_option("-c", "--counter", dest="counter", type="choice", choices=("nucleotide-overlap", "nucleotide-density", "segment-overlap", ), help="quantity to test [default=%default]." ) parser.add_option("-n", "--num-samples", dest="num_samples", type="int", help="number of samples to compute [default=%default]." ) parser.add_option("-e", "--cache", dest="cache", type="string", help="filename for caching samples [default=%default]." ) parser.add_option("-o", "--order", dest="output_order", type="choice", choices = ( "track", "annotation", "fold", "pvalue", "qvalue" ), help="order results in output by fold, track, etc. [default=%default]." ) parser.add_option("-p", "--pvalue-method", dest="pvalue_method", type="choice", choices = ( "empirical", "norm", ), help="type of pvalue reported [default=%default]." ) parser.add_option("-q", "--qvalue-method", dest="qvalue_method", type="choice", choices = ( "storey", ), help="method to perform multiple testing correction by controlling the fdr [default=%default]." ) parser.add_option( "--qvalue-lambda", dest="qvalue_lambda", type="float", help="fdr computation: lambda [default=%default]." ) parser.add_option( "--qvalue-pi0-method", dest="qvalue_pi0_method", type="choice", choices = ("smoother", "bootstrap" ), help="fdr computation: method for estimating pi0 [default=%default]." ) parser.add_option( "--counts-file", dest="input_filename_counts", type="string", help="start processing from counts - no segments required [default=%default]." ) parser.add_option( "--output-plots-pattern", dest="output_plots_pattern", type="string", help="output pattern for plots [default=%default]" ) parser.add_option( "--output-samples-pattern", dest="output_samples_pattern", type="string", help="output pattern for samples. Samples are stored in bed format, one for " " each segment [default=%default]" ) parser.add_option( "--bucket-size", dest="bucket_size", type="int", help="size of a bin for histogram of segment lengths [default=%default]" ) parser.add_option( "--nbuckets", dest="nbuckets", type="int", help="number of bins for histogram of segment lengths [default=%default]" ) parser.set_defaults( annotation_files = [], segment_files = [], workspace_files = [], sample_files = [], num_samples = 1000, nbuckets = 100000, bucket_size = 1, counter = "nucleotide-overlap", output_stats = "all", output_counts = True, output_order = "fold", cache = None, input_filename_counts = None, pvalue_method = "empirical", output_plots_pattern = None, output_samples_pattern = None, qvalue_method = "storey", qvalue_lambda = None, qvalue_pi0_method = "smoother", ) ## add common options (-h/--help, ...) and parse command line (options, args) = E.Start( parser, argv = argv, add_output_options = True ) ################################################## if options.input_filename_counts: annotator_results = gat.fromCounts( options.input_filename_counts ) else: annotator_results = fromSegments( options, args ) if options.pvalue_method != "empirical": E.info("updating pvalues to %s" % options.pvalue_method ) gat.updatePValues( gat.iterator_results(annotator_results), options.pvalue_method ) ################################################## ################################################## ################################################## ## compute global fdr ################################################## E.info( "computing FDR statistics" ) gat.updateQValues( list(gat.iterator_results(annotator_results)), method = options.qvalue_method, vlambda = options.qvalue_lambda, pi0_method = options.qvalue_pi0_method ) ################################################## # plot histograms if options.output_plots_pattern and HASPLOT: E.info("plotting sample stats" ) for r in gat.iterator_results(annotator_results): plt.figure() key = "%s-%s" % (r.track, r.annotation) s = r.samples hist, bins = numpy.histogram( s, new = True, normed = True, bins = numpy.arange( s.min(), s.max() + 1, 1.0) ) plt.plot( bins[:-1], hist, label = key ) sigma = r.stddev mu = r.expected plt.plot(bins, 1.0/(sigma * numpy.sqrt(2 * numpy.pi)) * numpy.exp( - (bins - mu)**2 / (2 * sigma**2) ), label = "fit", linewidth=2, color='r' ) plt.legend() filename = re.sub(options.output_plots_pattern, "%s", key) plt.savefig( filename ) ################################################## ################################################## ## output ################################################## outfile = sys.stdout outfile.write("\t".join( gat.AnnotatorResult.headers ) + "\n" ) output = list( gat.iterator_results( annotator_results ) ) if options.output_order == "track": output.sort( key = lambda x: (x.track, x.annotation) ) elif options.output_order == "annotation": output.sort( key = lambda x: (x.annotation, x.track) ) elif options.output_order == "fold": output.sort( key = lambda x: x.fold ) elif options.output_order == "pvalue": output.sort( key = lambda x: x.pvalue ) elif options.output_order == "qvalue": output.sort( key = lambda x: x.qvalue ) else: raise ValueError("unknown sort order %s" % options.output_order ) for result in output: outfile.write( str(result) + "\n" ) ## write footer and output benchmark information. E.Stop()
1a405cb5c805471533be3edcc09edf69ae1106a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8016/1a405cb5c805471533be3edcc09edf69ae1106a5/gatrun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 5261, 273, 599, 262, 30, 3536, 4263, 2774, 18, 225, 8940, 1296, 980, 702, 316, 2589, 18, 19485, 16, 3308, 380, 19485, 14, 353, 864, 18, 3536, 225, 309, 486, 5261, 30, 5261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 5261, 273, 599, 262, 30, 3536, 4263, 2774, 18, 225, 8940, 1296, 980, 702, 316, 2589, 18, 19485, 16, 3308, 380, 19485, 14, 353, 864, 18, 3536, 225, 309, 486, 5261, 30, 5261, ...
self.char_data = '' self._node = ''
self._data = ''
def start_element(self, name, attrs): # reset character and node data, we're starting new element self.char_data = '' self._node = '' if attrs: # If the element has attributes # it does not have CDATA. So set # curr elem to null. self._node = '' for key, value in attrs.iteritems(): # Form key name in xml map xmlkey = "".join((name, "_", key)) # Set value if self.cfg: self.cfg.set_option_xml(xmlkey, value) else: print key, value else: # If element has no attributes, the # value will be in CDATA. Store the # element name so that we can use it # in cdata callback. self._node = name
778c51514490332bce4336a8d3fe7336378abb0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2861/778c51514490332bce4336a8d3fe7336378abb0d/xmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2956, 12, 2890, 16, 508, 16, 3422, 4672, 225, 468, 2715, 3351, 471, 756, 501, 16, 732, 4565, 5023, 394, 930, 365, 6315, 892, 273, 875, 225, 309, 3422, 30, 468, 971, 326, 930...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2956, 12, 2890, 16, 508, 16, 3422, 4672, 225, 468, 2715, 3351, 471, 756, 501, 16, 732, 4565, 5023, 394, 930, 365, 6315, 892, 273, 875, 225, 309, 3422, 30, 468, 971, 326, 930...
This methods provides a command line interface for the release team to
This method provides a command line interface for the release team to
def hint_tester(self): """Run a command line interface to test hints
c4d39622efe9ac633c633332c44980b5576582c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2784/c4d39622efe9ac633c633332c44980b5576582c2/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7380, 67, 1078, 387, 12, 2890, 4672, 3536, 1997, 279, 1296, 980, 1560, 358, 1842, 13442, 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, 7380, 67, 1078, 387, 12, 2890, 4672, 3536, 1997, 279, 1296, 980, 1560, 358, 1842, 13442, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
r""" Odious numbers: odd number of 1's in binary expansion. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: AUTHOR: -- Jaap Spies (2007-02-02) """ def __init__(self):
def __init__(self): r""" Odious numbers: odd number of 1's in binary expansion. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000069; a Odious numbers: odd number of 1's in binary expansion. sage: a(0) 1 sage: a(2) 4 sage: a.list(9) [1, 2, 4, 7, 8, 11, 13, 14, 16] AUTHOR: -- Jaap Spies (2007-02-02) """
def _eval(self, n): return sloane.A000120(n) % 2
8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 272, 383, 8806, 18, 37, 13304, 3462, 12, 82, 13, 738, 576, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 272, 383, 8806, 18, 37, 13304, 3462, 12, 82, 13, 738, 576, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.canvasitems[4] = self.gcomprisBoard.canvas.root().add(
self.clouditem = self.rootitem.add(
def start(self): self.gcomprisBoard.level=1 self.gcomprisBoard.maxlevel=1 self.gcomprisBoard.sublevel=1 self.gcomprisBoard.number_of_sublevel=1
690f8ac7446757307ab013b8fb8fe772b4ea0d9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/690f8ac7446757307ab013b8fb8fe772b4ea0d9d/watercycle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 75, 832, 683, 291, 22233, 18, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 1896, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 87, 1255...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 75, 832, 683, 291, 22233, 18, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 1896, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 87, 1255...
def _get_subtitutions(self, patterns):
def _get_substitutions(self, patterns):
def _get_subtitutions(self, patterns): """Return a sequence of tuples of pattern, flags, replacement."""
f7f9f06c10052833aa4b93c52d510bc304e0d28b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12852/f7f9f06c10052833aa4b93c52d510bc304e0d28b/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1717, 30892, 12, 2890, 16, 6884, 4672, 3536, 990, 279, 3102, 434, 10384, 434, 1936, 16, 2943, 16, 6060, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1717, 30892, 12, 2890, 16, 6884, 4672, 3536, 990, 279, 3102, 434, 10384, 434, 1936, 16, 2943, 16, 6060, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
rect = self.image.get_rect() self.shift = [y-x for x, y in zip(rect, rect.center)]
self.rect = self.image.get_rect()
def __init__(self, scale, pawn, imagedir): super(SpritePawn, self).__init__()
1e5635f4f42bf62b610c1f0b36df1adec06c3cb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4543/1e5635f4f42bf62b610c1f0b36df1adec06c3cb6/graphics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3159, 16, 293, 9533, 16, 8902, 23210, 4672, 2240, 12, 3389, 796, 52, 9533, 16, 365, 2934, 972, 2738, 972, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 3159, 16, 293, 9533, 16, 8902, 23210, 4672, 2240, 12, 3389, 796, 52, 9533, 16, 365, 2934, 972, 2738, 972, 1435, 2, -100, -100, -100, -100, -100, -100, -1...
route = notification.data.registration.route if notification.data.next_route: next_route = notification.data.next_route next_route = 'Trying next route %s:%d;transport=%s.' % (next_route.address, next_route.port, next_route.transport) else: next_route = 'No more routes to try; waiting for %.2f seconds.' % (notification.data.delay) if hasattr(notification.data, 'code'): status = '%d %s' % (notification.data.code, notification.data.reason) else: status = notification.data.reason self.output.put('Registration failed at %s:%d;transport=%s (%s). %s' % (route.address, route.port, route.transport, status, next_route))
if notification.data.registration is not None: route = notification.data.registration.route if notification.data.next_route: next_route = notification.data.next_route next_route = 'Trying next route %s:%d;transport=%s.' % (next_route.address, next_route.port, next_route.transport) else: next_route = 'No more routes to try; waiting for %.2f seconds.' % (notification.data.delay) if hasattr(notification.data, 'code'): status = '%d %s' % (notification.data.code, notification.data.reason) else: status = notification.data.reason self.output.put('Registration failed at %s:%d;transport=%s (%s). %s' % (route.address, route.port, route.transport, status, next_route)) else: self.output.put('Registration failed: %s' % notification.data.reason)
def _NH_SIPAccountRegistrationDidFail(self, notification): route = notification.data.registration.route if notification.data.next_route: next_route = notification.data.next_route next_route = 'Trying next route %s:%d;transport=%s.' % (next_route.address, next_route.port, next_route.transport) else: next_route = 'No more routes to try; waiting for %.2f seconds.' % (notification.data.delay) if hasattr(notification.data, 'code'): status = '%d %s' % (notification.data.code, notification.data.reason) else: status = notification.data.reason self.output.put('Registration failed at %s:%d;transport=%s (%s). %s' % (route.address, route.port, route.transport, status, next_route)) self.success = False if self.max_registers is not None: self.max_registers -= 1 if self.max_registers == 0: self.stop() engine = Engine() engine.stop() if threadable.isInIOThread(): reactor.stop() else: reactor.callFromThread(reactor.stop)
6ab4aa343cc7cc67a5657524d7ffdb06aedb0e2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/6ab4aa343cc7cc67a5657524d7ffdb06aedb0e2e/sip_register.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 17739, 3032, 7843, 18250, 3754, 12, 2890, 16, 3851, 4672, 309, 3851, 18, 892, 18, 14170, 353, 486, 599, 30, 1946, 273, 3851, 18, 892, 18, 14170, 18, 5547, 309, 3851, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 50, 44, 67, 17739, 3032, 7843, 18250, 3754, 12, 2890, 16, 3851, 4672, 309, 3851, 18, 892, 18, 14170, 353, 486, 599, 30, 1946, 273, 3851, 18, 892, 18, 14170, 18, 5547, 309, 3851, ...
igd.AddPortMapping("TCP", 1337)
print igd.AddPortMapping("UDP", 1337) print igd.GetSpecificPortMappingEntry("UDP", 1337) print igd.DeletePortMapping("UDP", 1337)
def _configure_logger(logfile_path): import logging global log log = logging.getLogger("upnpidg") log.setLevel(logging.DEBUG) fmtr = logging.Formatter("%(name)s:%(levelname)s:%(message)s") fh = logging.FileHandler(logfile_path, "wb") fh.setLevel(logging.DEBUG) fh.setFormatter(fmtr) ch = logging.StreamHandler() ch.setLevel(logging.CRITICAL) ch.setFormatter(fmtr) log.addHandler(ch) log.addHandler(fh)
769284fd9714471b1be49dbef6ff370d699de0f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4811/769284fd9714471b1be49dbef6ff370d699de0f8/upnpigd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14895, 67, 4901, 12, 28806, 67, 803, 4672, 1930, 2907, 2552, 613, 613, 273, 2907, 18, 588, 3328, 2932, 416, 82, 6610, 75, 7923, 613, 18, 542, 2355, 12, 11167, 18, 9394, 13, 10940,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14895, 67, 4901, 12, 28806, 67, 803, 4672, 1930, 2907, 2552, 613, 613, 273, 2907, 18, 588, 3328, 2932, 416, 82, 6610, 75, 7923, 613, 18, 542, 2355, 12, 11167, 18, 9394, 13, 10940,...
sed -i -e "s|^$(notdir $@)|$@|" $(depfile).tmp sed -e "s|^[^:]*: *||" -e "s| *\\\\$$||" -e 's|^ *||' \ -e "/./s|$$|:|" $(depfile).tmp >> $(depfile).tmp
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw > $(depfile).tmp sed -e 's|\\||' $(depfile).raw |\ xargs -n1 printf "%s:\n" |\ sed -e 1d \ >> $(depfile).tmp
ifdef V quiet=
782b7fea4eb8957ff7aaa6d3b528463557e18de4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6220/782b7fea4eb8957ff7aaa6d3b528463557e18de4/make.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 536, 776, 10902, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 536, 776, 10902, 33, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if picking_id: wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
def action_ship_create(self, cr, uid, ids, *args): wf_service = netsvc.LocalService("workflow") picking_id = False move_obj = self.pool.get('stock.move') proc_obj = self.pool.get('procurement.order') company = self.pool.get('res.users').browse(cr, uid, uid).company_id for order in self.browse(cr, uid, ids, context={}): proc_ids = [] output_id = order.shop_id.warehouse_id.lot_output_id.id picking_id = False for line in order.order_line: proc_id = False date_planned = datetime.now() + relativedelta(days=line.delay or 0.0) date_planned = (date_planned - timedelta(days=company.security_lead)).strftime('%Y-%m-%d %H:%M:%S')
54ae65bc49e1ca211bfd02d70f537690d203f0e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/54ae65bc49e1ca211bfd02d70f537690d203f0e1/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 3261, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 11578, 67, 3278, 273, 21954, 4227, 18, 25635, 2932, 13815, 7923, 6002, 310, 67, 350, 273, 1083, 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, 1301, 67, 3261, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 11578, 67, 3278, 273, 21954, 4227, 18, 25635, 2932, 13815, 7923, 6002, 310, 67, 350, 273, 1083, 3...
""" Return the integer part (seconds) of a LIGOTimeGPS as an int. Example use: int(LIGOTimeGPS(100.5)) """
""" Return the integer part (seconds) of a LIGOTimeGPS as an int. Example use: int(LIGOTimeGPS(100.5)) """
def __int__(self):
6bd9b206313336554b64d1ec732fcfdde7d0ad94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/6bd9b206313336554b64d1ec732fcfdde7d0ad94/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 474, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1001, 474, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
numberOfBasePairsToSubtract): """ AVAILABLE AS A DEBUG PREFERENCE ONLY AS OF 2008-03-26. Will be cleaned up. THIS IS BUGGY """
numberOfBasePairsToRemove): """ AVAILABLE AS A DEBUG PREFERENCE ONLY AS OF 2008-03-27. Will be cleaned up further. Remove the spcified number of base pairs from the duplex. @param group: The DnaGroup which contains this duplex @type group: DnaGroup @param ladderEndAxisAtom: The end axis base atom at a DnaLadder end of the duplex. This end base atom is used as a starting base atom while determining which base atoms to remove. @type ladderEndAxisAtom: Atom @param numberOfBasePairsToRemove: The total number of base paris to remove from the duplex. @type numberOfBasePairsToRemove: int """
def _subtract_bases_from_duplex(self, group, ladderEndAxisAtom, numberOfBasePairsToSubtract): """ AVAILABLE AS A DEBUG PREFERENCE ONLY AS OF 2008-03-26. Will be cleaned up. THIS IS BUGGY """ #TODO: See bug 2712 #Use of wholechain.yield_rail_index_direction_counter #needs to be worked out. Looks like it reaches #"#print "*** this direction doesn't work -- no atomB!" ladder = ladderEndAxisAtom.molecule.ladder atomsScheduledForDeletion = [] atm = ladderEndAxisAtom atomsScheduledForDeletion.extend(atm.strand_neighbors()) #We have already considered the first set of atoms to delete (i.e. #the end strand atoms appended to atomsScheduledForDeletion above. #So, only loop until it reaches 1 #NOTE: The following destructively modifies numberOfBasePairsToSubtract #as there is no use of this variable later. while numberOfBasePairsToSubtract > 1: rail = atm.molecule.get_ladder_rail() baseindex = rail.baseatoms.index(atm) #Following copies some code from DnaMarker.py try_these = [ (rail, baseindex, 1), (rail, baseindex, -1), ] for item_rail, item_baseIndex, item_direction in try_these: pos = item_rail, item_baseIndex, item_direction pos_generator = atm.molecule.wholechain.yield_rail_index_direction_counter( pos ) iter = 0 pos_counter_A = pos_counter_B = None for pos_counter in pos_generator: iter += 1 if iter == 1: # should always happen pos_counter_A = pos_counter elif iter == 2: # won't happen if we start at the end we scan towards pos_counter_B = pos_counter break continue del pos_generator assert iter in (1, 2) railA, indexA, directionA, counter_junk = pos_counter_A assert (railA, indexA, directionA) == (item_rail, item_baseIndex, item_direction) atomB = None if iter < 2: #print "*** this direction doesn't work -- no atomB!" pass else: # this direction works iff we found the right atom railB, indexB, directionB, counter_junk = pos_counter_B atomB = railB.baseatoms[indexB] if atomB is not None: atm = atomB strand_neighbors = atomB.strand_neighbors() for strand_atom in strand_neighbors: if strand_atom not in atomsScheduledForDeletion: atomsScheduledForDeletion.append(strand_atom) break numberOfBasePairsToSubtract = numberOfBasePairsToSubtract - 1 for atm in atomsScheduledForDeletion: if atm: try: atm.kill() except: print_compact_traceback("bug in deleting atom while resizing the segment")
6cd8c5aa68aea88b011fabfb012851fc655ef49c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/6cd8c5aa68aea88b011fabfb012851fc655ef49c/DnaDuplex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 1575, 67, 18602, 67, 2080, 67, 72, 2268, 92, 12, 2890, 16, 1041, 16, 328, 361, 765, 1638, 6558, 3641, 16, 7922, 2171, 10409, 774, 27904, 4672, 3536, 15068, 20027, 5355, 432, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 1575, 67, 18602, 67, 2080, 67, 72, 2268, 92, 12, 2890, 16, 1041, 16, 328, 361, 765, 1638, 6558, 3641, 16, 7922, 2171, 10409, 774, 27904, 4672, 3536, 15068, 20027, 5355, 432, ...
if min_length is not None: lins = [ l for l in lins if l.length() >= min_length ] if max_length is not None: lins = [ l for l in lins if l .length() <= max_length ] if min_sinuosity is not None: lins = [ l for l in lins if l.sinuosity() >= min_sinuosity ] if max_sinuosity is not None: lins = [ l for l in lins if l.sinuosity() <= max_sinuosity ] if min_latitude is not None: lins = [ l for l in lins if min(l.latitudes()) >= min_latitude ] if max_latitude is not None: lins = [ l for l in lins if max(l.latitudes()) <= max_latitude ] if min_longitude is not None: lins = [ l for l in lins if min(l.fixed_longitudes()) >= min_longitude ] if max_longitude is not None: lins = [ l for l in lins if max(l.fixed_longitudes()) <= max_longitude ] if min_delta_rms is not None: lins = [ l for l in lins if len(l.delta_rms()) > 0 and max(l.delta_rms()) >= min_delta_rms ] if max_delta_rms is not None: lins = [ l for l in lins if len(l.delta_rms()) > 0 and min(l.delta_rms()) <= max_delta_rms ] if min_dbar is not None: lins = [ l for l in lins if len(l.dbar()) > 0 and max(l.dbar()) >= min_dbar ] if max_dbar is not None: lins = [ l for l in lins if len(l.dbar()) > 0 and min(l.dbar()) <= max_dbar ]
if length_min is not None: lins = [ l for l in lins if l.length() >= length_min ] if length_max is not None: lins = [ l for l in lins if l.length() <= length_max ] if sinuosity_min is not None: lins = [ l for l in lins if l.sinuosity() >= sinuosity_min ] if sinuosity_max is not None: lins = [ l for l in lins if l.sinuosity() <= sinuosity_max ] if latitude_min is not None: lins = [ l for l in lins if min(l.latitudes()) >= latitude_min ] if latitude_max is not None: lins = [ l for l in lins if max(l.latitudes()) <= latitude_max ] if longitude_min is not None: lins = [ l for l in lins if min(l.fixed_longitudes()) >= longitude_min ] if longitude_max is not None: lins = [ l for l in lins if max(l.fixed_longitudes()) <= longitude_max ] if delta_min is not None: lins = [ l for l in lins if len(l.delta_rms()) > 0 and max(l.delta_rms()) >= delta_min ] if delta_max is not None: lins = [ l for l in lins if len(l.delta_rms()) > 0 and min(l.delta_rms()) <= delta_max ] if dbar_min is not None: lins = [ l for l in lins if len(l.dbar()) > 0 and max(l.dbar()) >= dbar_min ] if dbar_max is not None: lins = [ l for l in lins if len(l.dbar()) > 0 and min(l.dbar()) <= dbar_max ]
def filter(lins, \ min_length = None, max_length = None, \ min_sinuosity = None, max_sinuosity = None, \ min_latitude = None, max_latitude = None, \ min_longitude = None, max_longitude = None, \ min_delta_rms = None, max_delta_rms = None, \ min_dbar = None, max_dbar = None): #{{{ TODO: Testing/debugging """ Takes a list of lineaments, lins, and returns a list of lineaments that match the filtering criteria. Each parameter has a min_ and max_ value. Only lineaments having at least the minimum, and at most the maximum, are returned. All values are None by default, and if called with no keyword arguments, all lineaments in lins are returned. length: spherical length of the lineament in radians of arc on the satellite surface. sinuosity: ratio of lineament length overall to spherical distance between endpoints. latitude & longitude: requires all vertices to be greater than min_ and less than max_ values, stated in units of radians. Latitude ranges from 0 to pi. Longitude is constrained to range from from -pi to pi. delta_rms: refers to the smallest value of delta_rms associated with the lineament, in radians. dbar: refers to the smallest value of dbar associated with the lineament. """ if min_length is not None: lins = [ l for l in lins if l.length() >= min_length ] if max_length is not None: lins = [ l for l in lins if l .length() <= max_length ] if min_sinuosity is not None: lins = [ l for l in lins if l.sinuosity() >= min_sinuosity ] if max_sinuosity is not None: lins = [ l for l in lins if l.sinuosity() <= max_sinuosity ] if min_latitude is not None: lins = [ l for l in lins if min(l.latitudes()) >= min_latitude ] if max_latitude is not None: lins = [ l for l in lins if max(l.latitudes()) <= max_latitude ] if min_longitude is not None: lins = [ l for l in lins if min(l.fixed_longitudes()) >= min_longitude ] if max_longitude is not None: lins = [ l for l in lins if max(l.fixed_longitudes()) <= max_longitude ] if min_delta_rms is not None: lins = [ l for l in lins if len(l.delta_rms()) > 0 and max(l.delta_rms()) >= min_delta_rms ] if max_delta_rms is not None: lins = [ l for l in lins if len(l.delta_rms()) > 0 and min(l.delta_rms()) <= max_delta_rms ] if min_dbar is not None: lins = [ l for l in lins if len(l.dbar()) > 0 and max(l.dbar()) >= min_dbar ] if max_dbar is not None: lins = [ l for l in lins if len(l.dbar()) > 0 and min(l.dbar()) <= max_dbar ] return lins
3ce7bee8800eba157d17edf5e5b124d917ff6021 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3464/3ce7bee8800eba157d17edf5e5b124d917ff6021/lineament.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 12, 80, 2679, 16, 521, 1131, 67, 2469, 565, 273, 599, 16, 943, 67, 2469, 565, 273, 599, 16, 521, 1131, 67, 87, 6860, 8807, 273, 599, 16, 943, 67, 87, 6860, 8807, 273, 599, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 12, 80, 2679, 16, 521, 1131, 67, 2469, 565, 273, 599, 16, 943, 67, 2469, 565, 273, 599, 16, 521, 1131, 67, 87, 6860, 8807, 273, 599, 16, 943, 67, 87, 6860, 8807, 273, 599, 16...
'<mm-owner>' : self.GetAdminEmail()
'<mm-owner>' : self.GetAdminEmail(), '<mm-reminder>' : self.FormatReminder(),
def GetStandardReplacements(self):
ef7b98da0724c58806106d9f674b63d36e31d0ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/ef7b98da0724c58806106d9f674b63d36e31d0ca/HTMLFormatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 8336, 28440, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 968, 8336, 28440, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
tmp = self.html_tls_graph_path(chain, ntls) if tmp != None: l.append(tmp)
console.stdoutln("=" * 80) try: tmp = self.html_tls_graph_path(chain, ntls) if tmp != None: l.append(tmp) except: console.stdoutln("ERROR: Unexpected error:", sys.exc_info()[0])
def html_tls_chain_optimization(self, chain): """Generates and returns the HTML string report analysis of a single TLS graphed chain. """ title = "Chain %s TLS Analysis of %s" % (chain.chain_id, self.struct_id) l = [self.html_head(title), self.html_title(title), '<center><a href="index.html">Back to Index</a></center>', '<br/>' ]
81092918682cb3b404793cc6abd4020f9621498a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10674/81092918682cb3b404793cc6abd4020f9621498a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 17116, 67, 5639, 67, 16689, 1588, 12, 2890, 16, 2687, 4672, 3536, 6653, 471, 1135, 326, 3982, 533, 2605, 6285, 434, 279, 2202, 8098, 2667, 329, 2687, 18, 3536, 2077, 273, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 17116, 67, 5639, 67, 16689, 1588, 12, 2890, 16, 2687, 4672, 3536, 6653, 471, 1135, 326, 3982, 533, 2605, 6285, 434, 279, 2202, 8098, 2667, 329, 2687, 18, 3536, 2077, 273, 315, ...
if not context: context = {}
def write_string(self, cr, uid, id, langs, vals, context=None): if not context: context = {} self.pool.get('ir.model.access').check(cr, uid, 'ir.translation', 'write') for lang in langs: for field in vals: if field in self._columns: self.pool.get('ir.translation')._set_ids(cr, uid, self._name+','+field, 'field', lang, [0], vals[field]) for table in self._inherits: cols = intersect(self._inherit_fields.keys(), vals) if cols: self.pool.get(table).write_string(cr, uid, id, langs, vals, context) return True
6600172e4aacbe9e337eee2dafc7797488e420fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/6600172e4aacbe9e337eee2dafc7797488e420fe/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1080, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 26467, 16, 5773, 16, 819, 33, 7036, 4672, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 3860, 16063, 1893, 12, 3353, 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, 1045, 67, 1080, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 26467, 16, 5773, 16, 819, 33, 7036, 4672, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 3860, 16063, 1893, 12, 3353, 16,...
4
def degree_iterator(self, vertices=None, labels=False): """ INPUT: labels=False: returns an iterator over degrees. labels=True: returns an iterator over tuples (vertex, degree). vertices -- if specified, restrict to this subset.
9d36d03b3ab7f06625c58cdce4e33c649f2fc772 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/9d36d03b3ab7f06625c58cdce4e33c649f2fc772/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10782, 67, 9838, 12, 2890, 16, 6928, 33, 7036, 16, 3249, 33, 8381, 4672, 3536, 12943, 30, 3249, 33, 8381, 30, 1135, 392, 2775, 1879, 10904, 18, 3249, 33, 5510, 30, 1135, 392, 2775, 187...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10782, 67, 9838, 12, 2890, 16, 6928, 33, 7036, 16, 3249, 33, 8381, 4672, 3536, 12943, 30, 3249, 33, 8381, 30, 1135, 392, 2775, 1879, 10904, 18, 3249, 33, 5510, 30, 1135, 392, 2775, 187...
EXAMPLES:
Returns self as a list of lists. EXAMPLES: sage: s = SkewPartition([[4,3,1],[2]]) sage: s.to_list() [[4, 3, 1], [2]] sage: type(s.to_list()) <type 'list'>
def to_list(self): """ EXAMPLES: """ return map(list, list(self))
a81413f56684165290170400ebbbb1d1e1ca37aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/a81413f56684165290170400ebbbb1d1e1ca37aa/skew_partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1098, 12, 2890, 4672, 3536, 2860, 365, 487, 279, 666, 434, 6035, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 272, 273, 10362, 359, 7003, 3816, 63, 24, 16, 23, 16, 21, 6487...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1098, 12, 2890, 4672, 3536, 2860, 365, 487, 279, 666, 434, 6035, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 272, 273, 10362, 359, 7003, 3816, 63, 24, 16, 23, 16, 21, 6487...
state_color = self.state_colors.get(task.state) attr = curses.A_NORMAL if task.uuid == self.selected_task: attr = curses.A_STANDOUT timestamp = datetime.fromtimestamp( task.timestamp or time.time()) timef = timestamp.strftime("%H:%M:%S") line = self.format_row(uuid, task.name, task.worker.hostname, timef, task.state)
def draw(self): win = self.win self.handle_keypress() x = 3 y = blank_line = count(2).next my, mx = win.getmaxyx() win.erase() win.bkgd(" ", curses.color_pair(1)) win.border() win.addstr(1, x, self.greet, curses.A_DIM | curses.color_pair(5)) blank_line() win.addstr(y(), x, self.format_row("UUID", "TASK", "WORKER", "TIME", "STATE"), curses.A_BOLD | curses.A_UNDERLINE) tasks = self.tasks if tasks: for uuid, task in tasks: if task.uuid: state_color = self.state_colors.get(task.state) attr = curses.A_NORMAL if task.uuid == self.selected_task: attr = curses.A_STANDOUT timestamp = datetime.fromtimestamp( task.timestamp or time.time()) timef = timestamp.strftime("%H:%M:%S") line = self.format_row(uuid, task.name, task.worker.hostname, timef, task.state) lineno = y() win.addstr(lineno, x, line, attr) if state_color: win.addstr(lineno, len(line) - STATE_WIDTH + BORDER_SPACING - 1, task.state, state_color | attr) if task.ready: task.visited = time.time()
629d17dc994d51492e8f620348f33d13de3e085a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/629d17dc994d51492e8f620348f33d13de3e085a/cursesmon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 5657, 273, 365, 18, 8082, 365, 18, 4110, 67, 856, 1028, 1435, 619, 273, 890, 677, 273, 7052, 67, 1369, 273, 1056, 12, 22, 2934, 4285, 3399, 16, 7938, 273, 5657, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 5657, 273, 365, 18, 8082, 365, 18, 4110, 67, 856, 1028, 1435, 619, 273, 890, 677, 273, 7052, 67, 1369, 273, 1056, 12, 22, 2934, 4285, 3399, 16, 7938, 273, 5657, ...
Load an image from a file: Input 0 : File name Output 0 : Image object
Load an image from a file: Input 0 : File name Output 0 : Image object
def loadimage(filename): """
d90c9c58c8ff947527b05062876b521a655c63e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4914/d90c9c58c8ff947527b05062876b521a655c63e7/images.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 2730, 12, 3459, 4672, 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, 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, 1262, 2730, 12, 3459, 4672, 3536, 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, -...
classLibPath_split = os.path.split(classLibPath) classLibParentFolder = classLibPath_split[0] os.chdir(classLibParentFolder) return True
classLibPath_split = os.path.split(classLibPath) classLibParentFolder = classLibPath_split[0] os.chdir(classLibParentFolder) return True
def ChangeDirToSCClassLibraryFolder(self): # first, we check if the current working folder # contains an item called 'SCClassLibrary' curPath = os.getcwd() listOfFolders = os.listdir(curPath)
875a686f4ba7b255a5449d87dbd4a5611f7ff5e5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11200/875a686f4ba7b255a5449d87dbd4a5611f7ff5e5/Psycollider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7576, 1621, 774, 2312, 797, 9313, 3899, 12, 2890, 4672, 468, 1122, 16, 732, 866, 309, 326, 783, 5960, 3009, 468, 1914, 392, 761, 2566, 296, 2312, 797, 9313, 11, 662, 743, 273, 1140, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7576, 1621, 774, 2312, 797, 9313, 3899, 12, 2890, 4672, 468, 1122, 16, 732, 866, 309, 326, 783, 5960, 3009, 468, 1914, 392, 761, 2566, 296, 2312, 797, 9313, 11, 662, 743, 273, 1140, 18...
msg = _('The file %(target) is not a .zip file.' % target)
msg = _('The file %(target)s is not a .zip file.' % target)
def unzip_file(pagename, request): _ = request.getText valid_pathname = lambda name: (name.find('/') == -1) and (name.find('\\') == -1) filename, fpath = _access_file(pagename, request) if not filename: return # error msg already sent in _access_file attachment_path = getAttachDir(request, pagename) single_file_size = 2.0 * 1000**2 attachments_file_space = 200.0 * 1000**2 files = _get_files(request, pagename) msg = "" if files: fsize = 0.0 for file in files: fsize += float(os.stat(getFilename(request, pagename, file))[6]) # in byte available_attachments_file_space = attachments_file_space - fsize if zipfile.is_zipfile(fpath): zf = zipfile.ZipFile(fpath) sum_size_over_all_valid_files = 0.0 for name in zf.namelist(): if valid_pathname(name): sum_size_over_all_valid_files += zf.getinfo(name).file_size if sum_size_over_all_valid_files < available_attachments_file_space: valid_name = False for name in zf.namelist(): if valid_pathname(name): zi = zf.getinfo(name) if zi.file_size < single_file_size: new_file = getFilename(request, pagename, name) if not os.path.exists(new_file): outfile = open(new_file, 'wb') outfile.write(zf.read(name)) outfile.close() # it's not allowed to zip a zip file so it is dropped if zipfile.is_zipfile(new_file): os.unlink(new_file) else: valid_name = True os.chmod(new_file, 0666 & config.umask) _addLogEntry(request, 'ATTNEW', pagename, new_file) if valid_name: msg=_("Attachment '%(filename)s' unzipped.") % {'filename': filename} else: msg=_("Attachment '%(filename)s' not unzipped because the " "files are too big, .zip files only, exist already or " "reside in folders.") % {'filename': filename} else: msg=_("Attachment '%(filename)s' could not be unzipped because" " the resulting files would be too large (%(space)d kB" " missing).") % {'filename': filename, 'space': (sum_size_over_all_valid_files - available_attachments_file_space) / 1000} else: msg = _('The file %(target) is not a .zip file.' % target) upload_form(pagename, request, msg=wikiutil.escape(msg))
33664d717e1a4bcd86e8a20a8bbfb808a869692a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/33664d717e1a4bcd86e8a20a8bbfb808a869692a/AttachFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20259, 67, 768, 12, 9095, 1069, 16, 590, 4672, 389, 273, 590, 18, 588, 1528, 923, 67, 28336, 273, 3195, 508, 30, 261, 529, 18, 4720, 2668, 2473, 13, 422, 300, 21, 13, 471, 261, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20259, 67, 768, 12, 9095, 1069, 16, 590, 4672, 389, 273, 590, 18, 588, 1528, 923, 67, 28336, 273, 3195, 508, 30, 261, 529, 18, 4720, 2668, 2473, 13, 422, 300, 21, 13, 471, 261, 529, ...
for src, abs, rel, exact in walk(repo, pats, opts): if abs not in mmap: ui.warn(_("warning: %s is not in the repository!\n") % ((pats and rel) or abs)) continue
for src, abs, rel, exact in walk(repo, pats, opts, node=node):
def getdate(rev): datestr = dcache.get(rev) if datestr is None: cl = repo.changelog.read(repo.changelog.node(rev)) datestr = dcache[rev] = util.datestr(cl[2]) return datestr
bc5725cbf38aeba5acbd3a46ea6eeb98cbcdb479 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/bc5725cbf38aeba5acbd3a46ea6eeb98cbcdb479/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 712, 12, 9083, 4672, 7811, 313, 273, 302, 2493, 18, 588, 12, 9083, 13, 309, 7811, 313, 353, 599, 30, 927, 273, 3538, 18, 24083, 12970, 18, 896, 12, 7422, 18, 24083, 12970, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 712, 12, 9083, 4672, 7811, 313, 273, 302, 2493, 18, 588, 12, 9083, 13, 309, 7811, 313, 353, 599, 30, 927, 273, 3538, 18, 24083, 12970, 18, 896, 12, 7422, 18, 24083, 12970, 18, 2...
if data[:2] == '\xfe\xff':
if data[:2] == b'\xfe\xff':
def pack(x, forcetype = None): """Pack a python object into an AE descriptor""" if forcetype: if isinstance(x, bytes): return AE.AECreateDesc(forcetype, x) else: return pack(x).AECoerceDesc(forcetype) if x == None: return AE.AECreateDesc(b'null', '') if isinstance(x, AEDescType): return x if isinstance(x, FSSType): return AE.AECreateDesc(b'fss ', x.data) if isinstance(x, FSRefType): return AE.AECreateDesc(b'fsrf', x.data) if isinstance(x, AliasType): return AE.AECreateDesc(b'alis', x.data) if isinstance(x, int): return AE.AECreateDesc(b'long', struct.pack('l', x)) if isinstance(x, float): return AE.AECreateDesc(b'doub', struct.pack('d', x)) if isinstance(x, (bytes, str8)): return AE.AECreateDesc(b'TEXT', x) if isinstance(x, str): # See http://developer.apple.com/documentation/Carbon/Reference/Apple_Event_Manager/Reference/reference.html#//apple_ref/doc/constant_group/typeUnicodeText # for the possible encodings. data = x.encode('utf16') if data[:2] == '\xfe\xff': data = data[2:] return AE.AECreateDesc(b'utxt', data) if isinstance(x, list): lst = AE.AECreateList('', 0) for item in x: lst.AEPutDesc(0, pack(item)) return lst if isinstance(x, dict): record = AE.AECreateList('', 1) for key, value in x.items(): packkey(record, key, value) #record.AEPutParamDesc(key, pack(value)) return record if isinstance(x, type) and issubclass(x, ObjectSpecifier): # Note: we are getting a class object here, not an instance return AE.AECreateDesc(b'type', x.want) if hasattr(x, '__aepack__'): return x.__aepack__() if hasattr(x, 'which'): return AE.AECreateDesc(b'TEXT', x.which) if hasattr(x, 'want'): return AE.AECreateDesc(b'TEXT', x.want) return AE.AECreateDesc(b'TEXT', repr(x)) # Copout
a59f7c870f5ef5cef46c19698d6e63d4acf02210 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/a59f7c870f5ef5cef46c19698d6e63d4acf02210/aepack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2298, 12, 92, 16, 364, 71, 5872, 273, 599, 4672, 3536, 4420, 279, 5790, 733, 1368, 392, 432, 41, 4950, 8395, 225, 309, 364, 71, 5872, 30, 309, 1549, 12, 92, 16, 1731, 4672, 327, 432,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2298, 12, 92, 16, 364, 71, 5872, 273, 599, 4672, 3536, 4420, 279, 5790, 733, 1368, 392, 432, 41, 4950, 8395, 225, 309, 364, 71, 5872, 30, 309, 1549, 12, 92, 16, 1731, 4672, 327, 432,...
help='Use Distribute instead of Setuptools. Set environ variable'
help='Use Distribute instead of Setuptools. Set environ variable '
def main(): parser = optparse.OptionParser( version=virtualenv_version, usage="%prog [OPTIONS] DEST_DIR") parser.add_option( '-v', '--verbose', action='count', dest='verbose', default=0, help="Increase verbosity") parser.add_option( '-q', '--quiet', action='count', dest='quiet', default=0, help='Decrease verbosity') parser.add_option( '-p', '--python', dest='python', metavar='PYTHON_EXE', help='The Python interpreter to use, e.g., --python=python2.5 will use the python2.5 ' 'interpreter to create the new environment. The default is the interpreter that ' 'virtualenv was installed with (%s)' % sys.executable) parser.add_option( '--clear', dest='clear', action='store_true', help="Clear out the non-root install and start from scratch") parser.add_option( '--no-site-packages', dest='no_site_packages', action='store_true', help="Don't give access to the global site-packages dir to the " "virtual environment") parser.add_option( '--unzip-setuptools', dest='unzip_setuptools', action='store_true', help="Unzip Setuptools or Distribute when installing it") parser.add_option( '--relocatable', dest='relocatable', action='store_true', help='Make an EXISTING virtualenv environment relocatable. ' 'This fixes up scripts and makes all .pth files relative') parser.add_option( '--distribute', dest='use_distribute', action='store_true', help='Use Distribute instead of Setuptools. Set environ variable' 'VIRTUALENV_USE_DISTRIBUTE to make it the default ') if 'extend_parser' in globals(): extend_parser(parser) options, args = parser.parse_args() global logger if 'adjust_options' in globals(): adjust_options(options, args) verbosity = options.verbose - options.quiet logger = Logger([(Logger.level_for_integer(2-verbosity), sys.stdout)]) if options.python and not os.environ.get('VIRTUALENV_INTERPRETER_RUNNING'): env = os.environ.copy() interpreter = resolve_interpreter(options.python) if interpreter == sys.executable: logger.warn('Already using interpreter %s' % interpreter) else: logger.notify('Running virtualenv with interpreter %s' % interpreter) env['VIRTUALENV_INTERPRETER_RUNNING'] = 'true' file = __file__ if file.endswith('.pyc'): file = file[:-1] os.execvpe(interpreter, [interpreter, file] + sys.argv[1:], env) if not args: print 'You must provide a DEST_DIR' parser.print_help() sys.exit(2) if len(args) > 1: print 'There must be only one argument: DEST_DIR (you gave %s)' % ( ' '.join(args)) parser.print_help() sys.exit(2) home_dir = args[0] if os.environ.get('WORKING_ENV'): logger.fatal('ERROR: you cannot run virtualenv while in a workingenv') logger.fatal('Please deactivate your workingenv, then re-run this script') sys.exit(3) if 'PYTHONHOME' in os.environ: logger.warn('PYTHONHOME is set. You *must* activate the virtualenv before using it') del os.environ['PYTHONHOME'] if options.relocatable: make_environment_relocatable(home_dir) return create_environment(home_dir, site_packages=not options.no_site_packages, clear=options.clear, unzip_setuptools=options.unzip_setuptools, use_distribute=options.use_distribute) if 'after_install' in globals(): after_install(options, home_dir)
e47574578451d8b48139701446c10769f624aa0d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12981/e47574578451d8b48139701446c10769f624aa0d/virtualenv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 1177, 33, 12384, 3074, 67, 1589, 16, 4084, 11613, 14654, 306, 12422, 65, 2030, 882, 67, 4537, 7923, 225, 2082, 18, 1289, 67, 3482,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 1177, 33, 12384, 3074, 67, 1589, 16, 4084, 11613, 14654, 306, 12422, 65, 2030, 882, 67, 4537, 7923, 225, 2082, 18, 1289, 67, 3482,...
return (self.order() % 2 == 1) and \ (2*self.size() > max(self.degree())*(self.order()-1))
return (self.order() % 2 == 1) and ( 2 * self.size() > max(self.degree()) * (self.order() - 1))
def is_overfull(self): r""" Tests whether the current graph is overfull.
5a08a4b6797353b1df4b3cac50929d60c46dbc2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5a08a4b6797353b1df4b3cac50929d60c46dbc2a/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1643, 2854, 12, 2890, 4672, 436, 8395, 7766, 87, 2856, 326, 783, 2667, 353, 1879, 2854, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 353, 67, 1643, 2854, 12, 2890, 4672, 436, 8395, 7766, 87, 2856, 326, 783, 2667, 353, 1879, 2854, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if i < 0: return None data[0] = data[0][i+1:]
if i >= 0: data[0] = data[0][i+1:]
def parsedate_tz(data): """Convert a date string to a time tuple. Accounts for military timezones. """ data = data.split() # The FWS after the comma after the day-of-week is optional, so search and # adjust for this. if data[0].endswith(',') or data[0].lower() in _daynames: # There's a dayname here. Skip it del data[0] else: i = data[0].rfind(',') if i < 0: return None data[0] = data[0][i+1:] if len(data) == 3: # RFC 850 date, deprecated stuff = data[0].split('-') if len(stuff) == 3: data = stuff + data[1:] if len(data) == 4: s = data[3] i = s.find('+') if i > 0: data[3:] = [s[:i], s[i+1:]] else: data.append('') # Dummy tz if len(data) < 5: return None data = data[:5] [dd, mm, yy, tm, tz] = data mm = mm.lower() if mm not in _monthnames: dd, mm = mm, dd.lower() if mm not in _monthnames: return None mm = _monthnames.index(mm) + 1 if mm > 12: mm -= 12 if dd[-1] == ',': dd = dd[:-1] i = yy.find(':') if i > 0: yy, tm = tm, yy if yy[-1] == ',': yy = yy[:-1] if not yy[0].isdigit(): yy, tz = tz, yy if tm[-1] == ',': tm = tm[:-1] tm = tm.split(':') if len(tm) == 2: [thh, tmm] = tm tss = '0' elif len(tm) == 3: [thh, tmm, tss] = tm else: return None try: yy = int(yy) dd = int(dd) thh = int(thh) tmm = int(tmm) tss = int(tss) except ValueError: return None tzoffset = None tz = tz.upper() if _timezones.has_key(tz): tzoffset = _timezones[tz] else: try: tzoffset = int(tz) except ValueError: pass # Convert a timezone offset into seconds ; -0500 -> -18000 if tzoffset: if tzoffset < 0: tzsign = -1 tzoffset = -tzoffset else: tzsign = 1 tzoffset = tzsign * ( (tzoffset/100)*3600 + (tzoffset % 100)*60) tuple = (yy, mm, dd, thh, tmm, tss, 0, 0, 0, tzoffset) return tuple
7faadbf7a5361ec34c63647ea3342e7e7c74457f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7faadbf7a5361ec34c63647ea3342e7e7c74457f/_parseaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 712, 67, 12994, 12, 892, 4672, 3536, 2723, 279, 1509, 533, 358, 279, 813, 3193, 18, 225, 30849, 364, 312, 330, 305, 814, 25954, 18, 3536, 501, 273, 501, 18, 4939, 1435, 468, 1021...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 712, 67, 12994, 12, 892, 4672, 3536, 2723, 279, 1509, 533, 358, 279, 813, 3193, 18, 225, 30849, 364, 312, 330, 305, 814, 25954, 18, 3536, 501, 273, 501, 18, 4939, 1435, 468, 1021...
intPart, fracPart = divmod(num, 1.0)
absNum = abs(num) if absNum == num: sign = 1 else: sign = -1 intPart, fracPart = divmod(absNum, 1.0)
def format(self, num): intPart, fracPart = divmod(num, 1.0) strInt = str(long(intPart)) if self.thousandSeparator is not None: strNew = '' while strInt: left, right = strInt[0:-3], strInt[-3:] if left == '': #strNew = self.thousandSeparator + right + strNew strNew = right + strNew else: strNew = self.thousandSeparator + right + strNew strInt = left strInt = strNew pattern = '%0.' + str(self.decimalPlaces) + 'f' strFrac = (pattern % fracPart)[2:] strBody = strInt + self.decimalSeparator + strFrac if self.prefix: strBody = self.prefix + strBody if self.suffix: strBody = strBody + self.suffix return strBody
b23cde06ced596db79166a8edff3e81285b41fb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/b23cde06ced596db79166a8edff3e81285b41fb3/formatters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 818, 4672, 225, 2417, 2578, 273, 2417, 12, 2107, 13, 309, 2417, 2578, 422, 818, 30, 1573, 273, 404, 469, 30, 1573, 273, 300, 21, 225, 509, 1988, 16, 12445, 1988, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 818, 4672, 225, 2417, 2578, 273, 2417, 12, 2107, 13, 309, 2417, 2578, 422, 818, 30, 1573, 273, 404, 469, 30, 1573, 273, 300, 21, 225, 509, 1988, 16, 12445, 1988, 2...
If a file has been deleted, it is recreated. If the executable
If a file has been deleted, it is restored. If the executable
def revert(ui, repo, *pats, **opts): """revert files or dirs to their states as of some revision With no revision specified, revert the named files or directories to the contents they had in the parent of the working directory. This restores the contents of the affected files to an unmodified state and unschedules adds, removes, copies, and renames. If the working directory has two parents, you must explicitly specify the revision to revert to. Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup. Using the -r option, revert the given files or directories to their contents as of a specific revision. This can be helpful to "roll back" some or all of a change that should not have been committed. Revert modifies the working directory. It does not commit any changes, or change the parent of the working directory. If you revert to a revision other than the parent of the working directory, the reverted files will thus appear modified afterwards. If a file has been deleted, it is recreated. If the executable mode of a file was changed, it is reset. If names are given, all files matching the names are reverted. If no arguments are given, no files are reverted. """ if opts["date"]: if opts["rev"]: raise util.Abort(_("you can't specify a revision and a date")) opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) if not pats and not opts['all']: raise util.Abort(_('no files or directories specified; ' 'use --all to revert the whole repo')) parent, p2 = repo.dirstate.parents() if not opts['rev'] and p2 != nullid: raise util.Abort(_('uncommitted merge - please provide a ' 'specific revision')) ctx = repo.changectx(opts['rev']) node = ctx.node() mf = ctx.manifest() if node == parent: pmf = mf else: pmf = None wlock = repo.wlock() # need all matching names in dirstate and manifest of target rev, # so have to walk both. do not print errors if files exist in one # but not other. names = {} target_only = {} # walk dirstate. for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, badmatch=mf.has_key): names[abs] = (rel, exact) if src == 'b': target_only[abs] = True # walk target manifest. def badmatch(path): if path in names: return True path_ = path + '/' for f in names: if f.startswith(path_): return True return False for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, badmatch=badmatch): if abs in names or src == 'b': continue names[abs] = (rel, exact) target_only[abs] = True changes = repo.status(match=names.has_key, wlock=wlock)[:5] modified, added, removed, deleted, unknown = map(dict.fromkeys, changes) revert = ([], _('reverting %s\n')) add = ([], _('adding %s\n')) remove = ([], _('removing %s\n')) forget = ([], _('forgetting %s\n')) undelete = ([], _('undeleting %s\n')) update = {} disptable = ( # dispatch table: # file state # action if in target manifest # action if not in target manifest # make backup if in target manifest # make backup if not in target manifest (modified, revert, remove, True, True), (added, revert, forget, True, False), (removed, undelete, None, False, False), (deleted, revert, remove, False, False), (unknown, add, None, True, False), (target_only, add, None, False, False), ) entries = names.items() entries.sort() for abs, (rel, exact) in entries: mfentry = mf.get(abs) target = repo.wjoin(abs) def handle(xlist, dobackup): xlist[0].append(abs) update[abs] = 1 if dobackup and not opts['no_backup'] and util.lexists(target): bakname = "%s.orig" % rel ui.note(_('saving current version of %s as %s\n') % (rel, bakname)) if not opts.get('dry_run'): util.copyfile(target, bakname) if ui.verbose or not exact: ui.status(xlist[1] % rel) for table, hitlist, misslist, backuphit, backupmiss in disptable: if abs not in table: continue # file has changed in dirstate if mfentry: handle(hitlist, backuphit) elif misslist is not None: handle(misslist, backupmiss) else: if exact: ui.warn(_('file not managed: %s\n') % rel) break else: # file has not changed in dirstate if node == parent: if exact: ui.warn(_('no changes needed to %s\n') % rel) continue if pmf is None: # only need parent manifest in this unlikely case, # so do not read by default pmf = repo.changectx(parent).manifest() if abs in pmf: if mfentry: # if version of file is same in parent and target # manifests, do nothing if pmf[abs] != mfentry: handle(revert, False) else: handle(remove, False) if not opts.get('dry_run'): repo.dirstate.forget(forget[0]) r = hg.revert(repo, node, update.has_key, wlock) repo.dirstate.update(add[0], 'a') repo.dirstate.update(undelete[0], 'n') repo.dirstate.update(remove[0], 'r') return r
a491955c5629b38f66548915998553042de82b5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/a491955c5629b38f66548915998553042de82b5e/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 266, 1097, 1390, 578, 7717, 358, 3675, 5493, 487, 434, 2690, 6350, 225, 3423, 1158, 6350, 1269, 16, 15226, 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, 15226, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 266, 1097, 1390, 578, 7717, 358, 3675, 5493, 487, 434, 2690, 6350, 225, 3423, 1158, 6350, 1269, 16, 15226, 326, ...
return f.taylor(v=v,a=a,n=n)
return f.taylor(*args)
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -1/720*(45*k^6 - 60*k^4 + 16*k^2)*x^6 - 1/24*(3*k^4 - 4*k^2)*x^4 - 1/2*k^2*x^2 + 1 sage: taylor ((x + 1)^n, x, 0, 4) 1/24*(n^4 - 6*n^3 + 11*n^2 - 6*n)*x^4 + 1/6*(n^3 - 3*n^2 + 2*n)*x^3 + 1/2*(n^2 - n)*x^2 + n*x + 1 """ if not isinstance(f, Expression): f = SR(f) return f.taylor(v=v,a=a,n=n)
ab8ae6b33bfea5b0d0c3557743c3db2669ab4f24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ab8ae6b33bfea5b0d0c3557743c3db2669ab4f24/functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 74, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 1375, 90, 68, 6740, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 74, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 1375, 90, 68, 6740, ...
return ValuesView(self)
return [self[key] for key in self]
def values(self): return ValuesView(self)
e4662bfc927a4538da3cb49db68aa88a3d1a4a4e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/e4662bfc927a4538da3cb49db68aa88a3d1a4a4e/_abcoll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 924, 12, 2890, 4672, 327, 6876, 1767, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 924, 12, 2890, 4672, 327, 6876, 1767, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
VersionReader.__init__(self,pj('src','cpp','plantgl','scenegraph','pgl_version.h'))
VersionReader.__init__(self,pj('src','cpp','plantgl','version.h'))
def __init__(self): VersionReader.__init__(self,pj('src','cpp','plantgl','scenegraph','pgl_version.h'))
a8c56f6b19deedabbec6a36fcec378b17ee6c854 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/799/a8c56f6b19deedabbec6a36fcec378b17ee6c854/versionreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4049, 2514, 16186, 2738, 972, 12, 2890, 16, 84, 78, 2668, 4816, 17023, 4057, 84, 17023, 412, 970, 7043, 17023, 1017, 275, 1332, 1483, 17023, 84, 7043, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4049, 2514, 16186, 2738, 972, 12, 2890, 16, 84, 78, 2668, 4816, 17023, 4057, 84, 17023, 412, 970, 7043, 17023, 1017, 275, 1332, 1483, 17023, 84, 7043, 67...
fileHandle = open('/proc/uptime', 'r')
fileHandle = myopen('/proc/uptime', 'r')
def getuptime(): # Check if we can use the uptime file if os.path.exists("/proc/uptime"): # Open the file fileHandle = open('/proc/uptime', 'r') # Read in the whole file data = fileHandle.read() # Split the file by commas, grap the first number and convert to a float uptime = float(data.split(" ")[0]) # Close the file fileHandle.close() else: # Get an array with 2 elements, set the syscall parameters TwoIntegers = ctypes.c_int * 2 mib = TwoIntegers(CTL_KERN, KERN_BOOTTIME) # Get timeval structure, set the size boottime = timeval() size = ctypes.c_size_t(ctypes.sizeof(boottime)) # Make the syscall libc.sysctl(mib, 2, ctypes.pointer(boottime), ctypes.pointer(size), None, 0) # Calculate uptime from current time uptime = time.time() - boottime.tv_sec+boottime.tv_usec*1.0e-6 return uptime
fe1410e00df04c71ceab1913632dfaf808d08a0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/fe1410e00df04c71ceab1913632dfaf808d08a0a/nonportable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3648, 494, 13332, 468, 2073, 309, 732, 848, 999, 326, 23251, 585, 309, 1140, 18, 803, 18, 1808, 2932, 19, 9381, 19, 3648, 494, 6, 4672, 468, 3502, 326, 585, 26662, 273, 3399, 3190...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3648, 494, 13332, 468, 2073, 309, 732, 848, 999, 326, 23251, 585, 309, 1140, 18, 803, 18, 1808, 2932, 19, 9381, 19, 3648, 494, 6, 4672, 468, 3502, 326, 585, 26662, 273, 3399, 3190...
out = os.popen( hmmalignExe + ' -q ' + self.hmmFile + \
out = os.popen( self.exe.bin + ' -q ' + self.hmmFile + \
def subAlign( self, file ): """ Align fasta formated sequence to hmm profile.
7f12c1463d734e435af7b68b0b2d6216ea51942f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/7f12c1463d734e435af7b68b0b2d6216ea51942f/Hmmer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 10044, 12, 365, 16, 585, 262, 30, 3536, 19317, 13104, 27470, 3102, 358, 366, 7020, 3042, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 10044, 12, 365, 16, 585, 262, 30, 3536, 19317, 13104, 27470, 3102, 358, 366, 7020, 3042, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
else:
elif n > 1:
def _single_variate(base_ring, name, sparse): import polynomial_ring as m name = normalize_names(1, name) key = (base_ring, name, sparse) R = _get_from_cache(key) if not R is None: return R if m.integer_mod_ring.is_IntegerModRing(base_ring) and not sparse: n = base_ring.order() if n.is_prime(): R = m.PolynomialRing_dense_mod_p(base_ring, name) else: R = m.PolynomialRing_dense_mod_n(base_ring, name) elif base_ring.is_field(): R = m.PolynomialRing_field(base_ring, name, sparse) elif base_ring.is_integral_domain(): R = m.PolynomialRing_integral_domain(base_ring, name, sparse) else: R = m.PolynomialRing_generic(base_ring, name, sparse) _save_in_cache(key, R) return R
4fba9edfe3e2892e3204163bec2cb2d01b6578d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4fba9edfe3e2892e3204163bec2cb2d01b6578d9/polynomial_ring_constructor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7526, 67, 1401, 3840, 12, 1969, 67, 8022, 16, 508, 16, 9387, 4672, 1930, 16991, 67, 8022, 487, 312, 508, 273, 3883, 67, 1973, 12, 21, 16, 508, 13, 498, 273, 261, 1969, 67, 8022,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7526, 67, 1401, 3840, 12, 1969, 67, 8022, 16, 508, 16, 9387, 4672, 1930, 16991, 67, 8022, 487, 312, 508, 273, 3883, 67, 1973, 12, 21, 16, 508, 13, 498, 273, 261, 1969, 67, 8022,...
assert request.session
assert request.session is not None
def testHttpAuthSession(self): """ run some requests with http auth, check whether session works """ from MoinMoin.auth.http import HTTPAuth username = u'HttpAuthTestUser' self.config = self.TestConfig(auth=[HTTPAuth()], user_autocreate=True) cookie = '' trail_expected = [] first = True for pagename in self.PAGES: environ = self.setup_env(AUTH_TYPE='Basic', REMOTE_USER=str(username), PATH_INFO='/%s' % pagename, HTTP_COOKIE=cookie) request = self.process_request(environ)
8da57c08ef8cfbefd2d454c1dc46ccccab25736c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/8da57c08ef8cfbefd2d454c1dc46ccccab25736c/test_auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2940, 1730, 2157, 12, 2890, 4672, 3536, 1086, 2690, 3285, 598, 1062, 1357, 16, 866, 2856, 1339, 6330, 3536, 628, 490, 885, 49, 885, 18, 1944, 18, 2505, 1930, 2239, 1730, 2718, 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, 1842, 2940, 1730, 2157, 12, 2890, 4672, 3536, 1086, 2690, 3285, 598, 1062, 1357, 16, 866, 2856, 1339, 6330, 3536, 628, 490, 885, 49, 885, 18, 1944, 18, 2505, 1930, 2239, 1730, 2718, 273,...
sql_lyr = ds.ExecuteSQL( "select CAST(fid as CHARACTER(10)), CAST(block as numeric(7,3)) from small" )
sql_lyr = ds.ExecuteSQL( "select CAST(fid as CHARACTER(10)), CAST(data as numeric(7,3)) from small" )
def ogr_sql_17(): expect = [ '1', '2' ] ds = ogr.Open( 'data/small.mif' ) sql_lyr = ds.ExecuteSQL( "select CAST(fid as CHARACTER(10)), CAST(block as numeric(7,3)) from small" ) fld_def = sql_lyr.GetLayerDefn().GetFieldDefn(0) if fld_def.GetName() != 'fid': gdaltest.post_reason( 'got wrong fid field name' ) print(fld_def.GetName()) return 'fail' if fld_def.GetType() != ogr.OFTString: gdaltest.post_reason( 'got wrong fid field type' ) print(fld_def.GetType()) if fld_def.GetWidth() != 10: gdaltest.post_reason( 'got wrong fid field width' ) print(fld_def.GetWidth()) fld_def = sql_lyr.GetLayerDefn().GetFieldDefn(1) if fld_def.GetName() != 'block': gdaltest.post_reason( 'got wrong block field name' ) print(fld_def.GetName()) return 'fail' if fld_def.GetType() != ogr.OFTReal: gdaltest.post_reason( 'got wrong block field type' ) print(fld_def.GetType()) if fld_def.GetWidth() != 7: gdaltest.post_reason( 'got wrong block field width' ) print(fld_def.GetWidth()) if fld_def.GetPrecision() != 3: gdaltest.post_reason( 'got wrong block field precision' ) print(fld_def.GetPrecision()) tr = ogrtest.check_features_against_list( sql_lyr, 'fid', expect ) ds.ReleaseResultSet( sql_lyr ) ds = None if tr: return 'success' else: return 'fail'
07b31949392f6e00120564349dbe6a4886034eb2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/07b31949392f6e00120564349dbe6a4886034eb2/ogr_sql_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 4669, 67, 4033, 13332, 225, 4489, 273, 306, 296, 21, 2187, 296, 22, 11, 308, 225, 3780, 273, 320, 3197, 18, 3678, 12, 296, 892, 19, 12019, 18, 81, 430, 11, 262, 1847, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 4669, 67, 4033, 13332, 225, 4489, 273, 306, 296, 21, 2187, 296, 22, 11, 308, 225, 3780, 273, 320, 3197, 18, 3678, 12, 296, 892, 19, 12019, 18, 81, 430, 11, 262, 1847, ...
long_description = description(),
long_description = read_description(),
def description(): return \
c6eadbcaea6f6ef4727c25fa765d03affec5aa6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11994/c6eadbcaea6f6ef4727c25fa765d03affec5aa6b/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2477, 13332, 327, 521, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2477, 13332, 327, 521, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
exc_info=exc_info())
exc_info=True)
def __setstate__(self, state): Globals.Persistent.__setstate__(self, state) if self.connection_string: try: self.connect(self.connection_string) except: LOG.error('Error connecting to relational database.', exc_info=exc_info())
22fc36df966e5da4ef7fcfe985822891dfd0b767 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/22fc36df966e5da4ef7fcfe985822891dfd0b767/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 2019, 972, 12, 2890, 16, 919, 4672, 18901, 1031, 18, 11906, 16186, 542, 2019, 972, 12, 2890, 16, 919, 13, 309, 365, 18, 4071, 67, 1080, 30, 775, 30, 365, 18, 3612, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 2019, 972, 12, 2890, 16, 919, 4672, 18901, 1031, 18, 11906, 16186, 542, 2019, 972, 12, 2890, 16, 919, 13, 309, 365, 18, 4071, 67, 1080, 30, 775, 30, 365, 18, 3612, 12, 289...
print " * Found unallowed attribute %s in comment for %s (node)" % (cat, name)
print " * Found unallowed attribute %s in comment for %s (node)" % (cat, name)
def fromNode(node, assignType, name, alternative, old=[]): # # description ############################################################## oldDesc = getAttrib(old, "description") if attribHas(oldDesc, "text"): newText = oldDesc["text"] else: newText = "{var} TODOC" if "\n" in newText: s = "/**\n%s\n-*/" % splitText(newText, False) else: s = "/** %s */" % newText # # other @attributes ############################################################## for attrib in old: cat = attrib["category"] if cat != "description": print " * Found unallowed attribute %s in comment for %s (node)" % (cat, name) return s
553c409f6f9212caba65076dbf5512bad9c2d290 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/553c409f6f9212caba65076dbf5512bad9c2d290/comment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 907, 12, 2159, 16, 2683, 559, 16, 508, 16, 10355, 16, 1592, 33, 8526, 4672, 468, 468, 2477, 19709, 5516, 26487, 7, 1592, 4217, 273, 336, 12399, 12, 1673, 16, 315, 3384, 7923, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 907, 12, 2159, 16, 2683, 559, 16, 508, 16, 10355, 16, 1592, 33, 8526, 4672, 468, 468, 2477, 19709, 5516, 26487, 7, 1592, 4217, 273, 336, 12399, 12, 1673, 16, 315, 3384, 7923, 225,...
self.xmpp.core.message(requester, event.to_element(), **attrs)
elements = [event.to_element(), delay_element(etime)] self.xmpp.core.message(requester, *elements, **attrs)
def event_parser(self, message, requester, room_jid, **attrs): for element in message.children("event"): event = events.Event.from_element(element)
f2e0e8478d2a2032a6db7726b4e18e22b1382a37 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14361/f2e0e8478d2a2032a6db7726b4e18e22b1382a37/historian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 4288, 12, 2890, 16, 883, 16, 19961, 16, 7725, 67, 18252, 16, 2826, 7039, 4672, 364, 930, 316, 883, 18, 5906, 2932, 2575, 6, 4672, 871, 273, 2641, 18, 1133, 18, 2080, 67, 295...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 871, 67, 4288, 12, 2890, 16, 883, 16, 19961, 16, 7725, 67, 18252, 16, 2826, 7039, 4672, 364, 930, 316, 883, 18, 5906, 2932, 2575, 6, 4672, 871, 273, 2641, 18, 1133, 18, 2080, 67, 295...
def __init__(self, sock):
def __init__(self, sock, debuglevel=0):
def __init__(self, sock): self.fp = sock.makefile('rb', 0)
89a1295a50df02bb8b6bace13d5a04bacc4f5436 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/89a1295a50df02bb8b6bace13d5a04bacc4f5436/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100...
def bessel_I(nu,z,alg = "pari",prec=53):
def bessel_I(nu,z,algorithm = "pari",prec=53):
def bessel_I(nu,z,alg = "pari",prec=53): r""" Implements the "I-Bessel function", or "modified Bessel function, 1st kind", with index (or "order") nu and argument z. INPUT: nu -- a real (or complex, for pari) number z -- a real (positive) alg - "pari" or "maxima" or "scipy" prec - real precision (for Pari only) DEFINITION: \begin{verbatim} Maxima: inf ==== - nu - 2 k nu + 2 k \ 2 z > ------------------- / k! Gamma(nu + k + 1) ==== k = 0 Pari: inf ==== - 2 k 2 k \ 2 z Gamma(nu + 1) > ----------------------- / k! Gamma(nu + k + 1) ==== k = 0 \end{verbatim} Sometimes \code{bessel_I(nu,z)} is denoted \code{I_nu(z)} in the literature. WARNING: In Maxima (the manual says) i0 is deprecated but \code{bessel_i(0,*)} is broken. (Was fixed in recent CVS patch though.) EXAMPLES: sage: bessel_I(1,1,"pari",500) 0.565159103992485027207696027609863307328899621621092009480294489479255640964371134092664997766814410064677886055526302676857637684917179812041131208121 sage: bessel_I(1,1) 0.565159103992485 sage: bessel_I(2,1.1,"maxima") 0.16708949925104... sage: bessel_I(0,1.1,"maxima") 1.32616018371265... sage: bessel_I(0,1,"maxima") 1.26606587775200... sage: bessel_I(1,1,"scipy") 0.565159103992... """ if alg=="pari": from sage.libs.pari.all import pari R,a = _setup(prec) b = R(pari(nu).besseli(z)) pari.set_real_precision(a) return b elif alg=="scipy": import scipy.special ans = str(scipy.special.iv(float(nu),complex(real(z),imag(z)))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans) else: return sage_eval(maxima.eval("bessel_i(%s,%s)"%(float(nu),float(z))))
28583b63e951675be5d37abb781bb0ef0026cb95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/28583b63e951675be5d37abb781bb0ef0026cb95/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 45, 12, 13053, 16, 94, 16, 12743, 273, 315, 1065, 77, 3113, 4036, 33, 8643, 4672, 436, 8395, 29704, 326, 315, 45, 17, 38, 403, 292, 445, 3113, 578, 315, 7342, 605,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 45, 12, 13053, 16, 94, 16, 12743, 273, 315, 1065, 77, 3113, 4036, 33, 8643, 4672, 436, 8395, 29704, 326, 315, 45, 17, 38, 403, 292, 445, 3113, 578, 315, 7342, 605,...
self.assertEqual(f.myfileobj.mode, 'rb')
self.assertTrue(f.myfileobj.mode.startswith('r'))
def test_mode(self): self.test_write() f = gzip.GzipFile(self.filename, 'r') self.assertEqual(f.myfileobj.mode, 'rb') f.close()
6b6dbd0d00ea044d6e243459af82b2a1513141ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/6b6dbd0d00ea044d6e243459af82b2a1513141ea/test_gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3188, 12, 2890, 4672, 365, 18, 3813, 67, 2626, 1435, 284, 273, 10331, 18, 27825, 812, 12, 2890, 18, 3459, 16, 296, 86, 6134, 365, 18, 11231, 5510, 12, 74, 18, 4811, 768, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3188, 12, 2890, 4672, 365, 18, 3813, 67, 2626, 1435, 284, 273, 10331, 18, 27825, 812, 12, 2890, 18, 3459, 16, 296, 86, 6134, 365, 18, 11231, 5510, 12, 74, 18, 4811, 768, 26...
elif newlines[i] == "": new_tag = "insert"
def process_chunk(tag, lines, numlines): if tag == 'equal' and \ numlines >= settings.DIFF_CONTEXT_COLLAPSE_THRESHOLD: last_range_start = numlines - settings.DIFF_CONTEXT_NUM_LINES
00ad27ea63dcc1c837119e32ba98c2eb1fed772b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/00ad27ea63dcc1c837119e32ba98c2eb1fed772b/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 6551, 12, 2692, 16, 2362, 16, 818, 3548, 4672, 309, 1047, 422, 296, 9729, 11, 471, 521, 818, 3548, 1545, 1947, 18, 2565, 2246, 67, 13181, 67, 4935, 48, 2203, 1090, 67, 23840,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 6551, 12, 2692, 16, 2362, 16, 818, 3548, 4672, 309, 1047, 422, 296, 9729, 11, 471, 521, 818, 3548, 1545, 1947, 18, 2565, 2246, 67, 13181, 67, 4935, 48, 2203, 1090, 67, 23840,...
elem_subjects = []
elem_subjects = []
def xliff_import(self, file, add_themes_from_folders='', REQUEST=None): """ XLIFF is the XML Localization Interchange File Format designed by a group of software providers. It is specified by www.oasis-open.org """
3326d1d0b238152999fa1bdfcc702dabc012f1ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/3326d1d0b238152999fa1bdfcc702dabc012f1ed/NyGlossary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15643, 3048, 67, 5666, 12, 2890, 16, 585, 16, 527, 67, 17328, 67, 2080, 67, 16064, 2218, 2187, 12492, 33, 7036, 4672, 3536, 1139, 2053, 2246, 353, 326, 3167, 3566, 1588, 5294, 3427, 1387...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15643, 3048, 67, 5666, 12, 2890, 16, 585, 16, 527, 67, 17328, 67, 2080, 67, 16064, 2218, 2187, 12492, 33, 7036, 4672, 3536, 1139, 2053, 2246, 353, 326, 3167, 3566, 1588, 5294, 3427, 1387...
if not diff or fulldata:
if not diff and not fulldata:
def AcceptEntry(self, meta, _, entry_name, diff, fulldata, metadata_updates={}): '''per-plugin bcfg2-admin pull support''' if metadata_updates: if hasattr(self.Entries['ConfigFile'][entry_name], 'infoxml'): print "InfoXML support not yet implemented" elif raw_input("Should metadata updates apply to all hosts? (n/Y) ") in ['Y', 'y']: self.entries[entry_name].metadata.update(metadata_updates) infofile = open(self.entries[entry_name].repopath + '/:info', 'w') for x in self.entries[entry_name].metadata.iteritems(): infofile.write("%s: %s\n" % x) infofile.close() if not diff or fulldata: raise SystemExit, 0 hsq = "Found host-specific file %s; Should it be updated (n/Y): " repo_vers = lxml.etree.Element('ConfigFile', name=entry_name) self.Entries['ConfigFile'][entry_name](repo_vers, meta) repo_curr = repo_vers.text # find the file fragment basefile = [frag for frag in \ self.entries[entry_name].fragments \ if frag.applies(meta)][-1] gsq = "Should this change apply to all hosts effected by file %s? (N/y): " % (basefile.name) if ".H_%s" % (meta.hostname) in basefile.name: answer = raw_input(hsq % basefile.name) else: answer = raw_input(gsq) if answer in ['Y', 'y']: print "writing file, %s" % basefile.name if fulldata: newdata = fulldata else: newdata = '\n'.join(difflib.restore(diff.split('\n'), 1)) open(basefile.name, 'w').write(newdata) return
f39f7d1fe973f8aae5059abd7b471a285a43dcb7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/f39f7d1fe973f8aae5059abd7b471a285a43dcb7/Cfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8662, 1622, 12, 2890, 16, 2191, 16, 389, 16, 1241, 67, 529, 16, 3122, 16, 1983, 892, 16, 1982, 67, 14703, 12938, 4672, 9163, 457, 17, 4094, 6533, 2137, 22, 17, 3666, 6892, 2865, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8662, 1622, 12, 2890, 16, 2191, 16, 389, 16, 1241, 67, 529, 16, 3122, 16, 1983, 892, 16, 1982, 67, 14703, 12938, 4672, 9163, 457, 17, 4094, 6533, 2137, 22, 17, 3666, 6892, 2865, 26418,...
self.iacseq = ''
self.iacseq = b''
def process_rawq(self): """Transfer from raw queue to cooked queue.
a69ff7792116218bfddc90e5e2776d431495b39b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a69ff7792116218bfddc90e5e2776d431495b39b/telnetlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1899, 85, 12, 2890, 4672, 3536, 5912, 628, 1831, 2389, 358, 15860, 329, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
filename = filename.replace('\\','\\\\') syscall = "%s %s" % (SYSCALL_TESTZIP,filename)
syscall_filename = fixDOSPathName(filename) syscall = "%s %s" % (SYSCALL_TESTZIP,syscall_filename)
def testZipFile(filename): filename = filename.replace('\\','\\\\') syscall = "%s %s" % (SYSCALL_TESTZIP,filename) result = os.system(syscall) if result == SYSCALL_TESTZIP_SUCCESS: return 1 else: zLOG.LOG('PloneLocalFolderNG', zLOG.INFO , "testZipFile() FAILED: %s" % syscall ) return 0
9cb00e6b047955694b2d6f79f898e30f13cb4142 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/9cb00e6b047955694b2d6f79f898e30f13cb4142/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 29394, 12, 3459, 4672, 8727, 67, 3459, 273, 2917, 3191, 55, 743, 461, 12, 3459, 13, 8727, 273, 2213, 87, 738, 87, 6, 738, 261, 7474, 2312, 4685, 67, 16961, 13951, 16, 9009, 7795,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29394, 12, 3459, 4672, 8727, 67, 3459, 273, 2917, 3191, 55, 743, 461, 12, 3459, 13, 8727, 273, 2213, 87, 738, 87, 6, 738, 261, 7474, 2312, 4685, 67, 16961, 13951, 16, 9009, 7795,...
del msg['To']
def msg_send(self, msg, emails, priority=None): if not len(emails): return False del msg['To'] msg['To'] = emails[0] if len(emails)>1: if 'Cc' in msg: del msg['Cc'] msg['Cc'] = ','.join(emails[1:]) del msg['Reply-To'] msg['Reply-To'] = self.email if priority: msg['X-Priority'] = priorities.get(priority, '3 (Normal)') s = smtplib.SMTP() s.connect() s.sendmail(self.email, emails, msg.as_string()) s.close() return True
58e9a51264038e97e4ac99a3a64ac10d68e4c26a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/58e9a51264038e97e4ac99a3a64ac10d68e4c26a/openerp_mailgate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 4661, 12, 2890, 16, 1234, 16, 14255, 16, 4394, 33, 7036, 4672, 309, 486, 562, 12, 22762, 4672, 327, 1083, 225, 1234, 3292, 774, 3546, 273, 14255, 63, 20, 65, 309, 562, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1234, 67, 4661, 12, 2890, 16, 1234, 16, 14255, 16, 4394, 33, 7036, 4672, 309, 486, 562, 12, 22762, 4672, 327, 1083, 225, 1234, 3292, 774, 3546, 273, 14255, 63, 20, 65, 309, 562, 12, ...
def test_make_stack_from_der(self):
def test_make_stack_from_der(self):
def test_make_stack_from_der(self): f = open("tests/der_encoded_seq.b64") b64 = f.read(1304) seq = base64.decodestring(b64) stack = X509.new_stack_from_der(seq) cert = stack.pop() subject = cert.get_subject() assert str(subject) == "/DC=org/DC=doegrids/OU=Services/CN=host/bosshog.lbl.gov"
2ee66d2c37557aaac14c543afd7c1ae82131ee2d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10522/2ee66d2c37557aaac14c543afd7c1ae82131ee2d/test_x509.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6540, 67, 3772, 67, 2080, 67, 765, 12, 2890, 4672, 284, 273, 1696, 2932, 16341, 19, 765, 67, 10787, 67, 5436, 18, 70, 1105, 7923, 324, 1105, 273, 284, 18, 896, 12, 3437, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6540, 67, 3772, 67, 2080, 67, 765, 12, 2890, 4672, 284, 273, 1696, 2932, 16341, 19, 765, 67, 10787, 67, 5436, 18, 70, 1105, 7923, 324, 1105, 273, 284, 18, 896, 12, 3437, 30...
path = u"/w/query.php?" + wikipedia.urlencode( params.iteritems() )
path = u"/w/query.php?" + urllib.urlencode( params.items() )
def GetData( lang, params, verbose = False ): """Get data from the query api, and convert it into a data object """ site = wikipedia.getSite( lang ) for k,v in params.iteritems(): if not IsString(v): params[k] = unicode(v) params['format'] = 'json' params['noprofile'] = '' for k,v in params.iteritems(): if type(v) == type(u''): params[k] = ToUtf8(v) # Titles param might be long, case convert it to post request if 'titles' in params: data = urllib.urlencode( {'titles' : params['titles']} ) titlecount = params['titles'].count('|') del params['titles'] else: data = None titlecount = 0 path = u"/w/query.php?" + wikipedia.urlencode( params.iteritems() ) if verbose: wikipedia.output( u"Requesting %d titles from %s:%s" % (titlecount, lang, path) ) url = site.family.querypath(lang) jsontext = site.getUrl( path, retry=True, data=data ) # This will also work, but all unicode strings will need to be converted from \u notation # return eval( jsontext ) return simplejson.loads( jsontext )
e10e119e720e53e14bc7796a5776f9b5ba4a82ac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/e10e119e720e53e14bc7796a5776f9b5ba4a82ac/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 3303, 16, 859, 16, 3988, 273, 1083, 262, 30, 3536, 967, 501, 628, 326, 843, 1536, 16, 471, 1765, 518, 1368, 279, 501, 733, 3536, 2834, 273, 21137, 18, 588, 4956, 12, 3303, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 3303, 16, 859, 16, 3988, 273, 1083, 262, 30, 3536, 967, 501, 628, 326, 843, 1536, 16, 471, 1765, 518, 1368, 279, 501, 733, 3536, 2834, 273, 21137, 18, 588, 4956, 12, 3303, ...
elif self.sampleMethod == 4 and self.data:
elif self.resampling == 4 and self.data:
def setTestData(self, data): """handle test data set""" self.testdata = data self.testDataBtn.setEnabled(self.testdata <> None) if self.testdata: if self.sampleMethod == 4: if self.data: self.score([l.id for l in self.learners.values()]) else: for l in self.learners.values(): l.scores = [] self.paintscores() elif self.sampleMethod == 4 and self.data: # test data removed, switch to testing on train data self.sampleMethod = 3 self.s[3].setChecked(True) self.s[4].setChecked(False) self.recompute()
b6da925d044fec442a4b02d9a5fa7e753c24afa5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/b6da925d044fec442a4b02d9a5fa7e753c24afa5/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4709, 751, 12, 2890, 16, 501, 4672, 3536, 4110, 1842, 501, 444, 8395, 365, 18, 3813, 892, 273, 501, 365, 18, 3813, 751, 20541, 18, 542, 1526, 12, 2890, 18, 3813, 892, 2813, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4709, 751, 12, 2890, 16, 501, 4672, 3536, 4110, 1842, 501, 444, 8395, 365, 18, 3813, 892, 273, 501, 365, 18, 3813, 751, 20541, 18, 542, 1526, 12, 2890, 18, 3813, 892, 2813, 599, ...
self._base_ring = GF(q) self._field_of_definition = GF(q**2, var)
self._base_ring = GF(q, name=name) self._field_of_definition = GF(q**2, name)
def __init__(self, n, q, var='a'): id = 'PGU(%s,%s)'%(n,q) PermutationGroup_generic.__init__(self, id, from_group=True, check=False) self._q = q self._base_ring = GF(q) self._field_of_definition = GF(q**2, var) self._n = n
935d5bfaa2638abb9a346d6f957fb5e86dcfab05 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/935d5bfaa2638abb9a346d6f957fb5e86dcfab05/permgroup_named.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 16, 1043, 16, 569, 2218, 69, 11, 4672, 612, 273, 296, 18679, 57, 9275, 87, 15529, 87, 2506, 17105, 82, 16, 85, 13, 13813, 9245, 1114, 67, 13540, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 290, 16, 1043, 16, 569, 2218, 69, 11, 4672, 612, 273, 296, 18679, 57, 9275, 87, 15529, 87, 2506, 17105, 82, 16, 85, 13, 13813, 9245, 1114, 67, 13540, 1...
if (os.path.exists(pathname)): system("%s %s > %s 2> /dev/null" % (pathname, args, output))
if not os.path.exists(pathname): continue system("%s %s > %s 2> /dev/null" % (pathname, args, output))
def run_command(command, output): parts = command.split(None, 1) cmd = parts[0] if len(parts) > 1: args = parts[1] else: args = '' for dir in path: pathname = dir + '/' + cmd if (os.path.exists(pathname)): system("%s %s > %s 2> /dev/null" % (pathname, args, output))
244132028450511fd19cc5ed4c9d1eeab0e56992 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/244132028450511fd19cc5ed4c9d1eeab0e56992/sysinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3076, 12, 3076, 16, 876, 4672, 2140, 273, 1296, 18, 4939, 12, 7036, 16, 404, 13, 1797, 273, 2140, 63, 20, 65, 309, 562, 12, 6019, 13, 405, 404, 30, 833, 273, 2140, 63, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3076, 12, 3076, 16, 876, 4672, 2140, 273, 1296, 18, 4939, 12, 7036, 16, 404, 13, 1797, 273, 2140, 63, 20, 65, 309, 562, 12, 6019, 13, 405, 404, 30, 833, 273, 2140, 63, 21...
if isinstance(refex, DrtEventVariableExpression) and \ not (refex == self.argument) and not self.function.variable.name == DrtTokens.PERF: if isinstance(self.argument,DrtEventVariableExpression): """In case given eventuality is an event, return earlier""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.EARLIER),refex),self.argument)))])], False elif isinstance(self.argument, DrtStateVariableExpression): """In case given eventuality is a state, return include""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.INCLUDE),self.argument),refex)))])], False elif not state_reference_point and \ isinstance(refex, DrtStateVariableExpression) and \ not (refex == self.argument): """In case no event is found, locate the most recent state""" state_reference_point = refex
elif not state_reference_point and \ isinstance(refex, DrtStateVariableExpression) and \ not (refex == self.argument): """In case no event is found, locate the most recent state""" state_reference_point = refex
def _readings(self, trail=[]): state_reference_point = None """state reference point in case there are no previous events""" for drs in (ancestor for ancestor in ReverseIterator(trail) if isinstance(ancestor, DRS)): search_list = drs.refs if self.argument.variable in search_list: """Described eventuality in the object's referents? Take refs' list up to described eventuality""" search_list = search_list[:search_list.index(self.argument.variable)] for ref in ReverseIterator(search_list): """search for the most recent reference""" refex = DrtVariableExpression(ref) if isinstance(refex, DrtEventVariableExpression) and \ not (refex == self.argument) and not self.function.variable.name == DrtTokens.PERF: if isinstance(self.argument,DrtEventVariableExpression): """In case given eventuality is an event, return earlier""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.EARLIER),refex),self.argument)))])], False #return DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.EARLIER),refex),self.argument) elif isinstance(self.argument, DrtStateVariableExpression): """In case given eventuality is a state, return include""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.INCLUDE),self.argument),refex)))])], False #return DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.INCLUDE),self.argument),refex) elif not state_reference_point and \ isinstance(refex, DrtStateVariableExpression) and \ not (refex == self.argument): """In case no event is found, locate the most recent state""" state_reference_point = refex if state_reference_point: if self.function.variable.name == DrtTokens.PERF: """in case we are dealing with PERF""" if isinstance(self.argument, DrtEventVariableExpression): """Reference point is a state and described eventuality an event, return event abuts on state""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.ABUT),self.argument),state_reference_point)))])], False #return DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.ABUT),self.argument),state_reference_point) elif isinstance(self.argument, DrtStateVariableExpression): """Reference point is a state and described eventuality a state, then add an event referent to the ancestor's refs list and two conditions that that event is the end of eventuality (function needed!!!) and that event abuts on ref.state""" termination_point = DrtEventVariableExpression(unique_variable(Variable("e"))) conds = [DrtEqualityExpression(termination_point,DrtApplicationExpression(self.make_ConstantExpression(DrtTokens.END),self.argument)), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.ABUT),termination_point),state_reference_point)] return [Reading([(trail[-1], DrtFindEventualityExpression.PerfReplacer(termination_point, conds))])], False #return DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.ABUT),termination_point),state_reference_point) elif isinstance(self.argument, DrtStateVariableExpression): """Reference point is a state and given eventuality is also a state, return overlap""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.OVERLAP),state_reference_point),self.argument)))])], False #return DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.OVERLAP),state_reference_point),self.argument) elif isinstance(self.argument, DrtEventVariableExpression): """Reference point is a state and given eventuality is an event, return include""" return [Reading([(trail[-1], DrtFindEventualityExpression.Replacer(trail[-1].conds.index(self), DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.INCLUDE),state_reference_point),self.argument)))])], False #return DrtStateApplicationExpression(DrtStateApplicationExpression(self.make_ConstantExpression(DrtTokens.INCLUDE),state_reference_point),self.argument) else: """no suitable reference found""" return [Reading([(trail[-1],PresuppositionDRS.Remover(trail[-1].conds.index(self)))])], False
68786db639f39079f41b13361b86c9c6d9005077 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2768/68786db639f39079f41b13361b86c9c6d9005077/temporaldrt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 899, 12, 2890, 16, 15569, 33, 8526, 4672, 919, 67, 6180, 67, 1153, 273, 599, 3536, 2019, 2114, 1634, 316, 648, 1915, 854, 1158, 2416, 2641, 8395, 364, 5081, 87, 316, 261, 287...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 899, 12, 2890, 16, 15569, 33, 8526, 4672, 919, 67, 6180, 67, 1153, 273, 599, 3536, 2019, 2114, 1634, 316, 648, 1915, 854, 1158, 2416, 2641, 8395, 364, 5081, 87, 316, 261, 287...
curs.execute("INSERT INTO GAMES VALUES (DEFAULT,NOW(),%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",params)
curs.execute("INSERT INTO GAMES_SP VALUES (DEFAULT,NOW(),%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",params)
def upload(self, **kw): raw_log = pylons.request.body #check for gzip compression if raw_log[0] == '\037' and raw_log[1] == '\213': #try to decompress log raw_log = gzip.GzipFile("","r",9,StringIO.StringIO(raw_log)) raw_log = raw_log.readlines() else: #log is uncompressed, probably a v1 log #split v1 log into an array instead of a blob raw_log = raw_log.split('\n') wml_tree = helperlib.build_tree(raw_log) log_type = "singleplayer" #possible values are singleplayer,multiplayer,ai if wml_tree["game"]["campaign"] == "multiplayer": log_type = "multiplayer" if wml_tree.has_key("upload_log"): if wml_tree["upload_log"].has_key("ai_log"): log_type = "ai" map = wml_tree["game"]["map_data"] #decode the map data to a standard map definition map = map.replace(";","\n")
96ab5bffa7b985ae74dccfa56d32fa94e125d6ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9355/96ab5bffa7b985ae74dccfa56d32fa94e125d6ce/root.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 2826, 9987, 4672, 1831, 67, 1330, 273, 2395, 80, 7008, 18, 2293, 18, 3432, 468, 1893, 364, 10331, 9154, 309, 1831, 67, 1330, 63, 20, 65, 422, 2337, 4630, 27, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 2826, 9987, 4672, 1831, 67, 1330, 273, 2395, 80, 7008, 18, 2293, 18, 3432, 468, 1893, 364, 10331, 9154, 309, 1831, 67, 1330, 63, 20, 65, 422, 2337, 4630, 27, 11, ...
fp.write('
fp.write('
def link (self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None): # First examine a couple of options for things that aren't implemented yet if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): raise DistutilsPlatformError, 'Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac' if runtime_library_dirs: raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' if extra_preargs or extra_postargs: raise DistutilsPlatformError, 'Runtime library dirs not implemented yet' if len(export_symbols) != 1: raise DistutilsPlatformError, 'Need exactly one export symbol' # Next there are various things for which we need absolute pathnames. # This is because we (usually) create the project in a subdirectory of # where we are now, and keeping the paths relative is too much work right # now. sources = map(self._filename_to_abs, self.__sources) include_dirs = map(self._filename_to_abs, self.__include_dirs) if objects: objects = map(self._filename_to_abs, objects) else: objects = [] if build_temp: build_temp = self._filename_to_abs(build_temp) else: build_temp = os.curdir() if output_dir: output_filename = os.path.join(output_dir, output_filename) # The output filename needs special handling: splitting it into dir and # filename part. Actually I'm not sure this is really needed, but it # can't hurt. output_filename = self._filename_to_abs(output_filename) output_dir, output_filename = os.path.split(output_filename) # Now we need the short names of a couple of things for putting them # into the project. if output_filename[-8:] == '.ppc.slb': basename = output_filename[:-8] elif output_filename[-11:] == '.carbon.slb': basename = output_filename[:-11] else: basename = os.path.strip(output_filename)[0] projectname = basename + '.mcp' targetname = basename xmlname = basename + '.xml' exportname = basename + '.mcp.exp' prefixname = 'mwerks_%s_config.h'%basename # Create the directories we need distutils.dir_util.mkpath(build_temp, self.verbose, self.dry_run) distutils.dir_util.mkpath(output_dir, self.verbose, self.dry_run) # And on to filling in the parameters for the project builder settings = {} settings['mac_exportname'] = exportname settings['mac_outputdir'] = output_dir settings['mac_dllname'] = output_filename settings['mac_targetname'] = targetname settings['sysprefix'] = sys.prefix settings['mac_sysprefixtype'] = 'Absolute' sourcefilenames = [] sourcefiledirs = [] for filename in sources + objects: dirname, filename = os.path.split(filename) sourcefilenames.append(filename) if not dirname in sourcefiledirs: sourcefiledirs.append(dirname) settings['sources'] = sourcefilenames settings['extrasearchdirs'] = sourcefiledirs + include_dirs + library_dirs if self.dry_run: print 'CALLING LINKER IN', os.getcwd() for key, value in settings.items(): print '%20.20s %s'%(key, value) return # Build the export file exportfilename = os.path.join(build_temp, exportname) if self.verbose: print '\tCreate export file', exportfilename fp = open(exportfilename, 'w') fp.write('%s\n'%export_symbols[0]) fp.close() # Generate the prefix file, if needed, and put it in the settings if self.__macros: prefixfilename = os.path.join(os.getcwd(), os.path.join(build_temp, prefixname)) fp = open(prefixfilename, 'w') fp.write('#include "mwerks_plugin_config.h"\n') for name, value in self.__macros: if value is None: fp.write('#define %s\n'%name) else: fp.write('#define %s "%s"\n'%(name, value)) fp.close() settings['prefixname'] = prefixname
d652ebaa4b6d7e524fa7da57aa4effee26d2bb8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d652ebaa4b6d7e524fa7da57aa4effee26d2bb8f/mwerkscompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 261, 2890, 16, 1018, 67, 5569, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 261, 2890, 16, 1018, 67, 5569, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
yield ('ticket', _('Opened and closed tickets'))
yield ('ticket', _("Opened and closed tickets"))
def get_timeline_filters(self, req): if 'TICKET_VIEW' in req.perm: yield ('ticket', _('Opened and closed tickets')) if self.timeline_details: yield ('ticket_details', _('Ticket updates'), False)
a8a6442302dc21bfc63206a71113b0375cb3c946 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/a8a6442302dc21bfc63206a71113b0375cb3c946/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 6348, 12, 2890, 16, 1111, 4672, 309, 296, 56, 16656, 1584, 67, 12145, 11, 316, 1111, 18, 12160, 30, 2824, 7707, 16282, 2187, 389, 2932, 23115, 471, 4375, 24475, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 6348, 12, 2890, 16, 1111, 4672, 309, 296, 56, 16656, 1584, 67, 12145, 11, 316, 1111, 18, 12160, 30, 2824, 7707, 16282, 2187, 389, 2932, 23115, 471, 4375, 24475, 6, ...
(tred, tgreen, tblue) = map(ord, PILImage.palette.data[transparency:transparency+3])
palette = PILImage.palette try: palette = palette.palette except: palette = palette.data (tred, tgreen, tblue) = map(ord, palette[transparency:transparency+3])
def _checkTransparency(self,PILImage): if self.mask=='auto': if PILImage.info.has_key("transparency") : transparency = PILImage.info["transparency"] * 3 (tred, tgreen, tblue) = map(ord, PILImage.palette.data[transparency:transparency+3]) self.mask = (tred, tred, tgreen, tgreen, tblue, tblue) else: self.mask = None elif hasattr(self.mask,'rgb'): self.mask = self.mask.rgb()+self.mask.rgb()
7afa065b9541faed369a0a4cc7103e9038c0683f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/7afa065b9541faed369a0a4cc7103e9038c0683f/pdfdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 1429, 18258, 12, 2890, 16, 1102, 48, 2040, 4672, 309, 365, 18, 4455, 18920, 6079, 4278, 309, 29407, 2040, 18, 1376, 18, 5332, 67, 856, 2932, 2338, 18258, 7923, 294, 27472, 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, 389, 1893, 1429, 18258, 12, 2890, 16, 1102, 48, 2040, 4672, 309, 365, 18, 4455, 18920, 6079, 4278, 309, 29407, 2040, 18, 1376, 18, 5332, 67, 856, 2932, 2338, 18258, 7923, 294, 27472, 273...
alb = album[0].comma("album").replace('"', '') art = get_artist(album).replace('"', '') sq.set_text('"%s" AND artist:"%s" AND tracks:%d' % (alb, art, get_trackcount(album)) )
alb = '"%s"' % album[0].comma("album").replace('"', '') art = get_artist(album) if art: alb = '%s AND artist:"%s"' % (alb, art.replace('"', '')) sq.set_text('%s AND tracks:%d' % (alb, get_trackcount(album)) )
def __init__(self, album, cache): self.album = album
c5016f7eb2258a27db928c384253069ade87c1e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/c5016f7eb2258a27db928c384253069ade87c1e3/brainz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14844, 16, 1247, 4672, 365, 18, 25090, 273, 14844, 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, 1001, 2738, 972, 12, 2890, 16, 14844, 16, 1247, 4672, 365, 18, 25090, 273, 14844, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Return True if this group is commutative.
Return ``True`` if this group is commutative.
def is_commutative(self): """ Return True if this group is commutative. EXAMPLES:: sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: G.is_commutative() False sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_commutative() True """ return self.is_abelian()
6ac30ecf5071d4fb909072e90d2311932d8c2165 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6ac30ecf5071d4fb909072e90d2311932d8c2165/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 5702, 322, 1535, 12, 2890, 4672, 3536, 2000, 12176, 5510, 10335, 309, 333, 1041, 353, 1543, 322, 1535, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 611, 273, 13813, 9245...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5702, 322, 1535, 12, 2890, 4672, 3536, 2000, 12176, 5510, 10335, 309, 333, 1041, 353, 1543, 322, 1535, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 611, 273, 13813, 9245...
fedoraRoleApprovalDate = group[0][1]['fedoraRoleApprovalDate'][0], fedoraRoleSponsor = group[0][1]['fedoraRoleSponsor'][0], cn = group[0][1]['cn'][0], fedoraRoleCreationDate = group[0][1]['fedoraRoleCreationDate'][0], objectClass = group[0][1]['objectClass'][0], fedoraRoleType = group[0][1]['fedoraRoleType'][0], fedoraRoleStatus = group[0][1]['fedoraRoleStatus'][0], fedoraRoleDomain = group[0][1]['fedoraRoleDomain'][0]
fedoraRoleApprovalDate = group[0][1]['fedoraRoleApprovalDate'][0].decode('utf8'), fedoraRoleSponsor = group[0][1]['fedoraRoleSponsor'][0].decode('utf8'), cn = group[0][1]['cn'][0].decode('utf8'), fedoraRoleCreationDate = group[0][1]['fedoraRoleCreationDate'][0].decode('utf8'), objectClass = group[0][1]['objectClass'][0].decode('utf8'), fedoraRoleType = group[0][1]['fedoraRoleType'][0].decode('utf8'), fedoraRoleStatus = group[0][1]['fedoraRoleStatus'][0].decode('utf8'), fedoraRoleDomain = group[0][1]['fedoraRoleDomain'][0].decode('utf8'),
def byUserName(self, cn, includeUnapproved=None, unapprovedOnly=None): ''' Return list of groups a certain user is in. Default excludes all non-approved groups''' groups = {} if includeUnapproved: ldapFilter = 'objectClass=FedoraRole' elif unapprovedOnly: ldapFilter = '(&(!(fedoraRoleStatus=approved)) (objectClass=fedoraRole))' else: ldapFilter = '(&(fedoraRoleStatus=approved)(objectClass=FedoraRole))'
f0bb66f2bd8aeeeb4e764ba73f43725601c75529 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9952/f0bb66f2bd8aeeeb4e764ba73f43725601c75529/fasLDAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 635, 15296, 12, 2890, 16, 6227, 16, 2341, 984, 25990, 33, 7036, 16, 640, 25990, 3386, 33, 7036, 4672, 9163, 2000, 666, 434, 3252, 279, 8626, 729, 353, 316, 18, 225, 2989, 13644, 777, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 635, 15296, 12, 2890, 16, 6227, 16, 2341, 984, 25990, 33, 7036, 16, 640, 25990, 3386, 33, 7036, 4672, 9163, 2000, 666, 434, 3252, 279, 8626, 729, 353, 316, 18, 225, 2989, 13644, 777, 1...
inhomogenous second-order linear recurrence generator with fixed coefficients and $b = f(n)$ $a(0) = a0$, $a(1) = a1$, $a(n) = a2*a(n-1) + a3*a(n-2) +f(n)$.
inhomogenous second-order linear recurrence generator with fixed coefficients and $b = f(n)$ $a(0) = a0$, $a(1) = a1$, $a(n) = a2*a(n-1) + a3*a(n-2) +f(n)$. EXAMPLES: sage: from sage.combinat.sloane_functions import recur_gen2b sage: it = recur_gen2b(1,1,1,1, lambda n: 0) sage: [it.next() for i in range(10)] [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
def recur_gen2b(a0,a1,a2,a3,b): r""" inhomogenous second-order linear recurrence generator with fixed coefficients and $b = f(n)$ $a(0) = a0$, $a(1) = a1$, $a(n) = a2*a(n-1) + a3*a(n-2) +f(n)$. """ x, y = ZZ(a0), ZZ(a1) n = 1 yield x while 1: n = n+1 x, y = y, a3*x+a2*y + b(n) yield x # def f(n): # if n > 1: # return 7*n+1 # else: # return 0 # A051959 = recur_gen2b(1,10,2,1,f)
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8112, 67, 4507, 22, 70, 12, 69, 20, 16, 69, 21, 16, 69, 22, 16, 69, 23, 16, 70, 4672, 436, 8395, 316, 17125, 19409, 1481, 2205, 17, 1019, 9103, 25939, 4456, 598, 5499, 14229, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8112, 67, 4507, 22, 70, 12, 69, 20, 16, 69, 21, 16, 69, 22, 16, 69, 23, 16, 70, 4672, 436, 8395, 316, 17125, 19409, 1481, 2205, 17, 1019, 9103, 25939, 4456, 598, 5499, 14229, 471, ...
if job.inputdata and len(app.sites)>0: from dq2.info.TiersOfATLAS import whichCloud,ToACache inclouds=[] for site in app.sites: cloudSite=whichCloud(app.sites[0]) if cloudSite not in inclouds: inclouds.append(cloudSite) outclouds=[] for cloudSite in inclouds: for cloudID, eachCloud in ToACache.dbcloud.iteritems(): if cloudSite==eachCloud: cloud=cloudID outclouds.append(cloud) break
def master_prepare(self,app,appmasterconfig):
5719166be4b8bc3470903493b8904a4472826bd3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/5719166be4b8bc3470903493b8904a4472826bd3/AthenaMCPandaRTHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 9366, 12, 2890, 16, 2910, 16, 2910, 7525, 1425, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 9366, 12, 2890, 16, 2910, 16, 2910, 7525, 1425, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
identify_files(abs_file, rel_file)
identify_files(abs_file, rel_file, sep)
def identify_files(path=os.curdir, prefix='', sep=os.path.join): #set files to a list of the files we want to install print "Searching for files to install" for filename in os.listdir(path): abs_file = os.path.join(path,filename) rel_file = sep(prefix,filename) if os.path.isfile(abs_file) and filename not in exclude_files: print "Marking file %s for installation" % rel_file files_to_install.append(rel_file) elif os.path.isdir(abs_file) and filename not in exclude_dirs: print "Marking directory %s for installation" % rel_file dirs_to_install.append(rel_file) identify_files(abs_file, rel_file)
28f8f81c24f34e1b82192339b86655c7923c0ece /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/28f8f81c24f34e1b82192339b86655c7923c0ece/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 67, 2354, 12, 803, 33, 538, 18, 1397, 1214, 16, 1633, 2218, 2187, 5478, 33, 538, 18, 803, 18, 5701, 4672, 468, 542, 1390, 358, 279, 666, 434, 326, 1390, 732, 2545, 358, 3799, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 67, 2354, 12, 803, 33, 538, 18, 1397, 1214, 16, 1633, 2218, 2187, 5478, 33, 538, 18, 803, 18, 5701, 4672, 468, 542, 1390, 358, 279, 666, 434, 326, 1390, 732, 2545, 358, 3799, 1...
poll_fun (timeout, map)
poll_fun(timeout, map)
def loop (timeout=30.0, use_poll=0, map=None): if map is None: map = socket_map if use_poll: if hasattr (select, 'poll'): poll_fun = poll3 else: poll_fun = poll2 else: poll_fun = poll while map: poll_fun (timeout, map)
79991224d1b5f3a4ab074ddac83ef59addf853be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/79991224d1b5f3a4ab074ddac83ef59addf853be/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 20, 16, 852, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13835, 30, 309, 3859, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 261, 4538, 33, 5082, 18, 20, 16, 999, 67, 13835, 33, 20, 16, 852, 33, 7036, 4672, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 225, 309, 999, 67, 13835, 30, 309, 3859, 2...
print "Doing make " + dbgStr + clean + "install\n" log.write("Doing make " + dbgStr + clean + "install\n")
print "Doing make " + dbgStr + clean + "install strip\n" log.write("Doing make " + dbgStr + clean + "install strip\n")
def doInstall(buildmode, workingDir, log, cleanFirst=False): # for our purposes, we do not really do a build # we will update chandler from CVS, and grab new tarballs when they appear if buildmode == "debug": dbgStr = "DEBUG=1" else: dbgStr = "" if cleanFirst: clean = " clean " else: clean = " " moduleDir = os.path.join(workingDir, mainModule) os.chdir(moduleDir) print "Doing make " + dbgStr + clean + "install\n" log.write("Doing make " + dbgStr + clean + "install\n") try: outputList = hardhatutil.executeCommandReturnOutput( [buildenv['make'], dbgStr, clean, "install" ]) hardhatutil.dumpOutputList(outputList, log) except hardhatutil.ExternalCommandErrorWithOutputList, e: print "build error" log.write("***Error during build***\n") log.write(separator) log.write("Build log:" + "\n") hardhatutil.dumpOutputList(e.outputList, log) log.write(separator) forceBuildNextCycle(log, workingDir) raise e except Exception, e: print "build error" log.write("***Error during build***\n") log.write(separator) log.write("No build log!\n") log.write(separator) forceBuildNextCycle(log, workingDir) raise e
af4f192d0bf65d14d613ba5ea3cfce8279821d33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/af4f192d0bf65d14d613ba5ea3cfce8279821d33/newchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 6410, 12, 3510, 3188, 16, 5960, 1621, 16, 613, 16, 2721, 3759, 33, 8381, 4672, 468, 364, 3134, 13694, 16, 732, 741, 486, 8654, 741, 279, 1361, 468, 732, 903, 1089, 462, 464, 749, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6410, 12, 3510, 3188, 16, 5960, 1621, 16, 613, 16, 2721, 3759, 33, 8381, 4672, 468, 364, 3134, 13694, 16, 732, 741, 486, 8654, 741, 279, 1361, 468, 732, 903, 1089, 462, 464, 749, ...
os.remove(fileID)
os.remove( filename )
def __removeFile( self, fileID, token ): """ Remove one file with fileID name from the storage """ if self.__confirmToken( token, fileID, 'x' ): try: os.remove(fileID) return S_OK() except OSError, x: if str( x ).find( 'No such file' ) >= 0: # File does not exist anyway return S_OK() else: return S_ERROR( 'Failed to remove file %s' % fileID ) else: return S_ERROR( 'File removal %s not authorized' % fileID )
9f0650a3e23eb441883664794fa6606e35b7f93c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9f0650a3e23eb441883664794fa6606e35b7f93c/StorageElementHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 812, 12, 365, 16, 585, 734, 16, 1147, 262, 30, 3536, 3581, 1245, 585, 598, 585, 734, 508, 628, 326, 2502, 3536, 309, 365, 16186, 10927, 1345, 12, 1147, 16, 585, 734, 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, 4479, 812, 12, 365, 16, 585, 734, 16, 1147, 262, 30, 3536, 3581, 1245, 585, 598, 585, 734, 508, 628, 326, 2502, 3536, 309, 365, 16186, 10927, 1345, 12, 1147, 16, 585, 734, 16, ...
return 0
return 0
def get_UseSSL(self): val = self.__getConfigAttribute('UseSSL') if val == None or val == "": return 0 else: return int(val)
2a9ad63ad94aae8bbd9ba7eb119cd3dbdbbf7795 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/637/2a9ad63ad94aae8bbd9ba7eb119cd3dbdbbf7795/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3727, 6745, 12, 2890, 4672, 1244, 273, 365, 16186, 588, 809, 1499, 2668, 3727, 6745, 6134, 309, 1244, 422, 599, 578, 1244, 422, 1408, 30, 327, 374, 469, 30, 327, 509, 12, 1125...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 3727, 6745, 12, 2890, 4672, 1244, 273, 365, 16186, 588, 809, 1499, 2668, 3727, 6745, 6134, 309, 1244, 422, 599, 578, 1244, 422, 1408, 30, 327, 374, 469, 30, 327, 509, 12, 1125...
fv = self.get_free_valency( strict=1)
fv = self.free_valency
def set_valency_from_name( self): for val in PT.periodic_table[ self.name]['valency']: self.valency = val try: fv = self.get_free_valency( strict=1) except: return # this happens on read if fv >= 0: return
f2641bfb56a3e250af8a1ed781bbfb72da6cf993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4298/f2641bfb56a3e250af8a1ed781bbfb72da6cf993/atom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1125, 2075, 67, 2080, 67, 529, 12, 365, 4672, 364, 1244, 316, 453, 56, 18, 6908, 335, 67, 2121, 63, 365, 18, 529, 23962, 1125, 2075, 3546, 30, 365, 18, 1125, 2075, 273, 1244...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1125, 2075, 67, 2080, 67, 529, 12, 365, 4672, 364, 1244, 316, 453, 56, 18, 6908, 335, 67, 2121, 63, 365, 18, 529, 23962, 1125, 2075, 3546, 30, 365, 18, 1125, 2075, 273, 1244...
public_members = declarations.matcher.find( criteria, self.declarations )
public_members = declarations.matcher.find( criteria, self.global_ns )
def test_access_type( self ): criteria = declarations.access_type_matcher_t( declarations.ACCESS_TYPES.PUBLIC ) public_members = declarations.matcher.find( criteria, self.declarations ) if '0.9' in public_members[0].compiler: #2 empty classes, this compiler doesn't generate constructor and copy constructor self.failUnless( 16 == len( public_members ) ) else: self.failUnless( 20 == len( public_members ) )
6158084cc393df0065b620918b14781beb11cb8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7398/6158084cc393df0065b620918b14781beb11cb8b/filters_tester.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 723, 12, 365, 262, 30, 3582, 273, 12312, 18, 3860, 67, 723, 67, 22761, 67, 88, 12, 12312, 18, 13204, 67, 10564, 18, 14939, 262, 1071, 67, 7640, 273, 12312, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 723, 12, 365, 262, 30, 3582, 273, 12312, 18, 3860, 67, 723, 67, 22761, 67, 88, 12, 12312, 18, 13204, 67, 10564, 18, 14939, 262, 1071, 67, 7640, 273, 12312, 18, 22...
self.initializeRepo(repopath, server, password, os_sel, opts)
self.initializeRepo(configfile, repopath, server, password, os_sel, opts)
def __call__(self, args): Bcfg2.Server.Admin.Mode.__call__(self, args) opts = Bcfg2.Options.OptionParser(self.options) opts.parse([]) repopath = raw_input("location of bcfg2 repository [%s]: " % opts['repo']) if repopath == '': repopath = opts['repo'] password = '' while ( password == '' ): password = raw_input( "Input password used for communication verification: " ) server = "https://%s:6789" % socket.getfqdn() rs = raw_input( "Input the server location [%s]: " % server) if rs: server = rs #create the groups.xml file prompt = '''Input base Operating System for clients:\n''' for entry in os_list: prompt += "%d: \n" % (os_list.index(entry) + 1, entry[0]) prompt += ': ' os_sel = os_list[int(raw_input(prompt))-1][1] self.initializeRepo(repopath, server, password, os_sel, opts) print "Repository created successfuly in %s" % (repopath)
02e56a9f80f105aad6bb1b283cd0023c65d14ac9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/02e56a9f80f105aad6bb1b283cd0023c65d14ac9/Init.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 833, 4672, 605, 7066, 22, 18, 2081, 18, 4446, 18, 2309, 16186, 1991, 972, 12, 2890, 16, 833, 13, 1500, 273, 605, 7066, 22, 18, 1320, 18, 1895, 2678, 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, 1001, 1991, 972, 12, 2890, 16, 833, 4672, 605, 7066, 22, 18, 2081, 18, 4446, 18, 2309, 16186, 1991, 972, 12, 2890, 16, 833, 13, 1500, 273, 605, 7066, 22, 18, 1320, 18, 1895, 2678, 12...
k = win32api.RegOpenKeyEx(base,K)
k = _RegOpenKeyEx(base,K)
def get_msvc_paths (path, version='6.0', platform='x86'): """Get a list of devstudio directories (include, lib or path). Return a list of strings; will be empty list if unable to access the registry or appropriate registry keys not found.""" try: import win32api import win32con except ImportError: return [] L = [] if path=='lib': path= 'Library' path = string.upper(path + ' Dirs') K = ('Software\\Microsoft\\Devstudio\\%s\\' + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ (version,platform) for base in (win32con.HKEY_CLASSES_ROOT, win32con.HKEY_LOCAL_MACHINE, win32con.HKEY_CURRENT_USER, win32con.HKEY_USERS): try: k = win32api.RegOpenKeyEx(base,K) i = 0 while 1: try: (p,v,t) = win32api.RegEnumValue(k,i) if string.upper(p) == path: V = string.split(v,';') for v in V: if v == '' or v in L: continue L.append(v) break i = i + 1 except win32api.error: break except win32api.error: pass return L
0d1936ed13e06d714469418a720463c789a4d235 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0d1936ed13e06d714469418a720463c789a4d235/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 959, 4227, 67, 4481, 261, 803, 16, 1177, 2218, 26, 18, 20, 2187, 4072, 2218, 92, 5292, 11, 4672, 3536, 967, 279, 666, 434, 4461, 334, 4484, 6402, 261, 6702, 16, 2561, 578, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 959, 4227, 67, 4481, 261, 803, 16, 1177, 2218, 26, 18, 20, 2187, 4072, 2218, 92, 5292, 11, 4672, 3536, 967, 279, 666, 434, 4461, 334, 4484, 6402, 261, 6702, 16, 2561, 578, 5...
continue
pass
def __init__(self, number): self.adapter = '/dev/dvb/adapter' + number _debug_('register dvb device %s' % self.adapter) INFO_ST = '128s10i' val = ioctl.pack( INFO_ST, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) devfd = os.open(self.adapter + '/frontend0', os.O_TRUNC) r = ioctl.ioctl(devfd, ioctl.IOR('o', 61, INFO_ST), val) os.close(devfd) val = ioctl.unpack( INFO_ST, r ) name = val[0] if val[1] == 0: self.type = 'DVB-S' elif val[1] == 1: self.type = 'DVB-C' elif val[1] == 2: self.type = 'DVB-T' else: self.type = 'unknown (%s)' % val[1] if name.find('\0') > 0: name = name[:name.find('\0')] self.name = name
5599d45d982434ed52f9d9d2764b83295ecaf555 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5599d45d982434ed52f9d9d2764b83295ecaf555/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1300, 4672, 365, 18, 10204, 273, 1173, 5206, 19, 15679, 70, 19, 10204, 11, 397, 1300, 389, 4148, 67, 2668, 4861, 12494, 70, 2346, 738, 87, 11, 738, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1300, 4672, 365, 18, 10204, 273, 1173, 5206, 19, 15679, 70, 19, 10204, 11, 397, 1300, 389, 4148, 67, 2668, 4861, 12494, 70, 2346, 738, 87, 11, 738, 365, ...
"""Report an error message, if not in stealth mode."""
"""Report an error message, if not in stealth mode. Returns False."""
def sendmsg_error(nick, msg): """Report an error message, if not in stealth mode.""" if (not cfg["stealth_mode"]): sendmsg(nick, "error: %s" % msg) print "%s -> error: %s" % (nick, msg)
70d16121d30ba988d5b58d360835248a53501bdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2496/70d16121d30ba988d5b58d360835248a53501bdd/sumiserv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 3576, 67, 1636, 12, 17091, 16, 1234, 4672, 3536, 4820, 392, 555, 883, 16, 309, 486, 316, 18654, 4162, 1965, 18, 2860, 1083, 12123, 309, 261, 902, 2776, 9614, 334, 73, 4162, 67, 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, 1366, 3576, 67, 1636, 12, 17091, 16, 1234, 4672, 3536, 4820, 392, 555, 883, 16, 309, 486, 316, 18654, 4162, 1965, 18, 2860, 1083, 12123, 309, 261, 902, 2776, 9614, 334, 73, 4162, 67, 3...
self.body.append ('\\end{list}\n')
self.out.append ('\\end{list}\n')
def depart_enumerated_list (self, node): if ('contents' in getattr (self, 'topic_classes', [])): self.body.append ('\\end{list}\n') else: self.body.append ('\\end{enumerate}\n' )
37db8ffa549b63ebad9bbc3310aeafe2a276f03b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5620/37db8ffa549b63ebad9bbc3310aeafe2a276f03b/rst2beamer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 7924, 19007, 67, 1098, 261, 2890, 16, 756, 4672, 309, 7707, 3980, 11, 316, 3869, 261, 2890, 16, 296, 10476, 67, 4701, 2187, 5378, 3719, 30, 365, 18, 659, 18, 6923, 7707, 169...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 7924, 19007, 67, 1098, 261, 2890, 16, 756, 4672, 309, 7707, 3980, 11, 316, 3869, 261, 2890, 16, 296, 10476, 67, 4701, 2187, 5378, 3719, 30, 365, 18, 659, 18, 6923, 7707, 169...
swig_files.append(source)
swig_sources.append(source)
def swig_sources (self, sources):
017df766f2a9bcf9a57d1bb1efeeadc60dbc6cb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/017df766f2a9bcf9a57d1bb1efeeadc60dbc6cb8/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 261, 2890, 16, 5550, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1352, 360, 67, 10141, 261, 2890, 16, 5550, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
removes = removes.keys()
def updatedir(ui, repo, patches, similarity=0): '''Update dirstate after patch application according to metadata''' if not patches: return copies = [] removes = {} cfiles = patches.keys() cwd = repo.getcwd() if cwd: cfiles = [util.pathto(repo.root, cwd, f) for f in patches.keys()] for f in patches: gp = patches[f] if not gp: continue if gp.op == 'RENAME': copies.append((gp.oldpath, gp.path)) removes[gp.oldpath] = 1 elif gp.op == 'COPY': copies.append((gp.oldpath, gp.path)) elif gp.op == 'DELETE': removes[gp.path] = 1 for src, dst in copies: repo.copy(src, dst) removes = removes.keys() if (not similarity) and removes: repo.remove(sorted(removes), True) for f in patches: gp = patches[f] if gp and gp.mode: islink, isexec = gp.mode dst = repo.wjoin(gp.path) # patch won't create empty files if gp.op == 'ADD' and not os.path.exists(dst): flags = (isexec and 'x' or '') + (islink and 'l' or '') repo.wwrite(gp.path, '', flags) elif gp.op != 'DELETE': util.set_flags(dst, islink, isexec) cmdutil.addremove(repo, cfiles, similarity=similarity) files = patches.keys() files.extend([r for r in removes if r not in files]) return sorted(files)
e31b5f8b2ad26067c4b8dbefa987c7a75abeb5e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/e31b5f8b2ad26067c4b8dbefa987c7a75abeb5e8/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3526, 481, 12, 4881, 16, 3538, 16, 16482, 16, 16416, 33, 20, 4672, 9163, 1891, 302, 920, 340, 1839, 4729, 2521, 4888, 358, 1982, 26418, 309, 486, 16482, 30, 327, 13200, 273, 5378, 7157, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3526, 481, 12, 4881, 16, 3538, 16, 16482, 16, 16416, 33, 20, 4672, 9163, 1891, 302, 920, 340, 1839, 4729, 2521, 4888, 358, 1982, 26418, 309, 486, 16482, 30, 327, 13200, 273, 5378, 7157, ...
os.makedirs(self.home_dir)
os.makedirs(self.home_dir, 0700)
def run(self,screen): signal.signal(signal.SIGINT,signal.SIG_IGN) self.screen=screen self.theme_manager=themes.ThemeManager(self) try: self.theme_manager.load() except (IOError,OSError): pass self.theme_manager.set_default_attrs(global_theme_attrs) self.theme_manager.set_default_formats(global_theme_formats)
bb328a1236af2b4d2f49c490912822ea4350605e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/bb328a1236af2b4d2f49c490912822ea4350605e/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 9252, 4672, 4277, 18, 10420, 12, 10420, 18, 18513, 3217, 16, 10420, 18, 18513, 67, 10452, 13, 365, 18, 9252, 33, 9252, 365, 18, 7997, 67, 4181, 33, 17328, 18, 8335,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 9252, 4672, 4277, 18, 10420, 12, 10420, 18, 18513, 3217, 16, 10420, 18, 18513, 67, 10452, 13, 365, 18, 9252, 33, 9252, 365, 18, 7997, 67, 4181, 33, 17328, 18, 8335,...
if os.path.exists(os.path.join(checkout_path, filename)): os.remove(os.path.join(checkout_path, filename))
if os.path.exists(os.path.join(self.checkout_path, filename)): os.remove(os.path.join(self.checkout_path, filename))
def updatesingle(self, options, args, file_list): checkout_path = os.path.join(self._root_dir, self.relpath) filename = args.pop() if scm.SVN.AssertVersion("1.5")[0]: if not os.path.exists(os.path.join(checkout_path, '.svn')): # Create an empty checkout and then update the one file we want. Future # operations will only apply to the one file we checked out. command = ["checkout", "--depth", "empty", self.url, checkout_path] self._Run(command, options, cwd=self._root_dir) if os.path.exists(os.path.join(checkout_path, filename)): os.remove(os.path.join(checkout_path, filename)) command = ["update", filename] self._RunAndGetFileList(command, options, file_list) # After the initial checkout, we can use update as if it were any other # dep. self.update(options, args, file_list) else: # If the installed version of SVN doesn't support --depth, fallback to # just exporting the file. This has the downside that revision # information is not stored next to the file, so we will have to # re-export the file every time we sync. if not os.path.exists(checkout_path): os.makedirs(checkout_path) command = ["export", os.path.join(self.url, filename), os.path.join(checkout_path, filename)] command = self._AddAdditionalUpdateFlags(command, options, options.revision) self._Run(command, options, cwd=self._root_dir)
338ead09dbd34566cb60d324c2eb7366229ad94e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/338ead09dbd34566cb60d324c2eb7366229ad94e/gclient_scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4533, 1714, 12, 2890, 16, 702, 16, 833, 16, 585, 67, 1098, 4672, 13926, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 2890, 6315, 3085, 67, 1214, 16, 365, 18, 2878, 803, 13, 1544, 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, 4533, 1714, 12, 2890, 16, 702, 16, 833, 16, 585, 67, 1098, 4672, 13926, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 2890, 6315, 3085, 67, 1214, 16, 365, 18, 2878, 803, 13, 1544, 273, ...
tokenize(open(sys.argv[-1]).readline)
if len(sys.argv) > 1: tokenize(open(sys.argv[1]).readline) else: tokenize(syss.tdin.readline)
def tokenize(readline, tokeneater=printtoken): lnum = parenlev = continued = 0 namechars, numchars = string.letters + '_', string.digits contstr = '' indents = [0] while 1: # loop over lines in stream line = readline() lnum = lnum + 1 pos, max = 0, len(line) if contstr: # continued string if not line: raise TokenError, "EOF within multi-line string" if endprog.search(line) >= 0: pos = end = endprog.regs[0][1] tokeneater(STRING, contstr + line[:end], strstart, (lnum, end), line) contstr = '' else: contstr = contstr + line continue elif parenlev == 0 and not continued: # new statement if not line: break column = 0 while pos < max: # measure leading whitespace if line[pos] == ' ': column = column + 1 elif line[pos] == '\t': column = (column/tabsize + 1)*tabsize elif line[pos] == '\f': column = 0 else: break pos = pos + 1 if pos == max: break if line[pos] in '#\r\n': # skip comments or blank lines tokeneater((NEWLINE, COMMENT)[line[pos] == '#'], line[pos:], (lnum, pos), (lnum, len(line)), line) continue if column > indents[-1]: # count indents or dedents indents.append(column) tokeneater(INDENT, line[:pos], (lnum, 0), (lnum, pos), line) while column < indents[-1]: indents = indents[:-1] tokeneater(DEDENT, line[:pos], (lnum, 0), (lnum, pos), line) else: # continued statement if not line: raise TokenError, "EOF within multi-line statement" continued = 0 while pos < max: if pseudoprog.match(line, pos) > 0: # scan for tokens start, end = pseudoprog.regs[1] spos, epos = (lnum, start), (lnum, end) token, initial = line[start:end], line[start] pos = end if initial in namechars: # ordinary name tokeneater(NAME, token, spos, epos, line) elif initial in numchars: # ordinary number tokeneater(NUMBER, token, spos, epos, line) elif initial in '\r\n': tokeneater(NEWLINE, token, spos, epos, line) elif initial == '#': tokeneater(COMMENT, token, spos, epos, line) elif initial == '\\': # continued stmt continued = 1 elif token in ('\'\'\'', '"""'): # triple-quoted endprog = endprogs[token] if endprog.search(line, pos) >= 0: # all on one line pos = endprog.regs[0][1] token = line[start:pos] tokeneater(STRING, token, spos, (lnum, pos), line) else: strstart = (lnum, start) # multiple lines contstr = line[start:] break elif initial in '\'"': if token[-1] == '\n': # continued string strstart = (lnum, start) endprog, contstr = endprogs[initial], line[start:] break else: # ordinary string tokeneater(STRING, token, spos, epos, line) else: if initial in '([{': parenlev = parenlev + 1 elif initial in ')]}': parenlev = parenlev - 1 tokeneater(OP, token, spos, epos, line) else: tokeneater(ERRORTOKEN, line[pos], spos, (lnum, pos+1), line) pos = pos + 1 for indent in indents[1:]: # pop remaining indent levels tokeneater(DEDENT, '', (lnum, 0), (lnum, 0), '')
da67869f766cef01e3126399eb209553c39dc565 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/da67869f766cef01e3126399eb209553c39dc565/tokenize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13672, 12, 896, 1369, 16, 1147, 73, 2045, 33, 1188, 2316, 4672, 328, 2107, 273, 22146, 298, 90, 273, 17545, 5957, 273, 374, 508, 7549, 16, 818, 7549, 273, 533, 18, 26054, 397, 2070, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13672, 12, 896, 1369, 16, 1147, 73, 2045, 33, 1188, 2316, 4672, 328, 2107, 273, 22146, 298, 90, 273, 17545, 5957, 273, 374, 508, 7549, 16, 818, 7549, 273, 533, 18, 26054, 397, 2070, 21...
project_name = os.path.basename(os.path.normpath(args[0]))
project_name = os.path.basename(args[0])
def _validate_callback(option, opt_str, value, parser, valid_values): if value not in valid_values: raise OptionValueError('%s must be one of: %s, not %s' % (opt_str, '|'.join(valid_values), value)) setattr(parser.values, option.dest, value)
86e0979801e7b3c47e1161883905c45108d5b71f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/86e0979801e7b3c47e1161883905c45108d5b71f/standalone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 67, 3394, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 16, 923, 67, 2372, 4672, 309, 460, 486, 316, 923, 67, 2372, 30, 1002, 2698, 23610, 29909, 87, 1297, 506, 1245, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 67, 3394, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 16, 923, 67, 2372, 4672, 309, 460, 486, 316, 923, 67, 2372, 30, 1002, 2698, 23610, 29909, 87, 1297, 506, 1245, 43...
realPath = util.filesys.realPathCase(pagedir) if not realPath is None: realPath = wikiutil.unquoteWikiname(realPath) self.page_name = realPath[-len(self.page_name):]
if self._text_filename_force is None: realPath = util.filesys.realPathCase(pagedir) if realPath is not None: realPath = wikiutil.unquoteWikiname(realPath) self.page_name = realPath[-len(self.page_name):]
def _setRealPageName(self, pagedir): """ Set page_name to the real case of page name
7105265e3d06d5e2d7996699a9cc522b731d9a36 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/7105265e3d06d5e2d7996699a9cc522b731d9a36/Page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 6955, 1964, 461, 12, 2890, 16, 4262, 23210, 4672, 3536, 1000, 1363, 67, 529, 358, 326, 2863, 648, 434, 1363, 508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 6955, 1964, 461, 12, 2890, 16, 4262, 23210, 4672, 3536, 1000, 1363, 67, 529, 358, 326, 2863, 648, 434, 1363, 508, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
is_inequality.__doc__ = Hrepresentation.is_inequality.__doc__
def is_inequality(self): """ Returns True since this is, by construction, an inequality.
84c90f627aa2eefd601a2ae3a4ad63f4e91ac1cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/84c90f627aa2eefd601a2ae3a4ad63f4e91ac1cc/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 558, 16495, 12, 2890, 4672, 3536, 2860, 1053, 3241, 333, 353, 16, 635, 16171, 16, 392, 316, 9729, 560, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 353, 67, 558, 16495, 12, 2890, 4672, 3536, 2860, 1053, 3241, 333, 353, 16, 635, 16171, 16, 392, 316, 9729, 560, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
x -- a bitstring n -- bit length (optional) EXAMPLE:
- ``x`` - a bitstring - ``n`` - bit length (optional) EXAMPLE::
def from_bits(self, x, n=None): r""" Return integer for bitstring $x$ of length $n$.
d8d819d404da04929f5525b5dd795973a8bd80ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d8d819d404da04929f5525b5dd795973a8bd80ae/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 6789, 12, 2890, 16, 619, 16, 290, 33, 7036, 4672, 436, 8395, 2000, 3571, 364, 2831, 1080, 271, 92, 8, 434, 769, 271, 82, 8, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 6789, 12, 2890, 16, 619, 16, 290, 33, 7036, 4672, 436, 8395, 2000, 3571, 364, 2831, 1080, 271, 92, 8, 434, 769, 271, 82, 8, 18, 2, -100, -100, -100, -100, -100, -100, -100, ...
unfulfilled_datarequest2 = DataRequest.objects.create(creator=admin, name='unfulfilled_datarequest2', description='The second unfulfilled datarequest',
unfulfilled_datarequest2 = DataRequest.objects.create(creator=chintan, name='Plague Riot', description='''Need dataset for the 1771 Plague Riot epidemic that happened in Moscow possibly caused by bubonic plague.''',
def _create_u_datarequests(): unfulfilled_datarequest1 = DataRequest.objects.create(creator=bob, name='unfulfilled_datarequest1', description='The first unfulfilled datarequest', status='U', is_active=True) unfulfilled_datarequest2 = DataRequest.objects.create(creator=admin, name='unfulfilled_datarequest2', description='The second unfulfilled datarequest', status='U', is_active=True) return
e278cb3aea0ebfd6ad83075f5701c47f6ef27bfd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2706/e278cb3aea0ebfd6ad83075f5701c47f6ef27bfd/demo_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 89, 67, 892, 11420, 13332, 640, 2706, 13968, 67, 892, 2293, 21, 273, 1910, 691, 18, 6911, 18, 2640, 12, 20394, 33, 70, 947, 16, 508, 2218, 318, 2706, 13968, 67, 892, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 89, 67, 892, 11420, 13332, 640, 2706, 13968, 67, 892, 2293, 21, 273, 1910, 691, 18, 6911, 18, 2640, 12, 20394, 33, 70, 947, 16, 508, 2218, 318, 2706, 13968, 67, 892, 2...
line = fp.readline().rstrip()
line = readline()
def extractbin(fp): line = fp.readline().rstrip() while line and not line.startswith('literal '): line = fp.readline().rstrip() if not line: return size = int(line[8:]) dec = [] line = fp.readline().rstrip() while line: l = line[0] if l <= 'Z' and l >= 'A': l = ord(l) - ord('A') + 1 else: l = ord(l) - ord('a') + 27 dec.append(base85.b85decode(line[1:])[:l]) line = fp.readline().rstrip() text = zlib.decompress(''.join(dec)) if len(text) != size: raise util.Abort(_('binary patch is %d bytes, not %d') % (len(text), size)) return text
77a66c8259d349e8c183b34b75e5a227c3820bc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/77a66c8259d349e8c183b34b75e5a227c3820bc0/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 4757, 12, 7944, 4672, 980, 273, 12023, 1435, 1323, 980, 471, 486, 980, 18, 17514, 1918, 2668, 13107, 296, 4672, 980, 273, 12023, 1435, 309, 486, 980, 30, 327, 963, 273, 509, 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, 2608, 4757, 12, 7944, 4672, 980, 273, 12023, 1435, 1323, 980, 471, 486, 980, 18, 17514, 1918, 2668, 13107, 296, 4672, 980, 273, 12023, 1435, 309, 486, 980, 30, 327, 963, 273, 509, 12, ...
RA("%s;" % self._reserved[K])
RA(str(self._reserved[K]))
def OutputString(self, attrs=None): # Build up our result # result = [] RA = result.append
a5884e244756452a6c5bd600142d210ac0099052 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a5884e244756452a6c5bd600142d210ac0099052/Cookie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3633, 780, 12, 2890, 16, 3422, 33, 7036, 4672, 468, 3998, 731, 3134, 563, 468, 563, 273, 5378, 26880, 273, 563, 18, 6923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3633, 780, 12, 2890, 16, 3422, 33, 7036, 4672, 468, 3998, 731, 3134, 563, 468, 563, 273, 5378, 26880, 273, 563, 18, 6923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
while len(not_yet_done) > 0: u = not_yet_done[0]
while True: try: u = reduct_data.index(0) except ValueError: break
def _coset_reduction_data_first_coord(G): """ Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate).
87b6229f7390c9d09c32b459d5e79b72affaa765 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/87b6229f7390c9d09c32b459d5e79b72affaa765/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14445, 278, 67, 1118, 4062, 67, 892, 67, 3645, 67, 5732, 12, 43, 4672, 3536, 8155, 501, 1399, 364, 23789, 326, 7378, 4987, 278, 23174, 434, 392, 930, 434, 348, 48, 67, 22, 12, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14445, 278, 67, 1118, 4062, 67, 892, 67, 3645, 67, 5732, 12, 43, 4672, 3536, 8155, 501, 1399, 364, 23789, 326, 7378, 4987, 278, 23174, 434, 392, 930, 434, 348, 48, 67, 22, 12, 6...
def main(): [db] = sys.argv[1:] r = make_table(db) report = format_html(format_table(*r)) changeset = db.split('.')[1] path = '../htmlreports/%s' % changeset
def main(db): full_changeset = db.split('.')[1] rev, changeset = full_changeset.split('_', 1) table, tests = make_table(db) hub_stats, hubs = calc_hub_stats(table) report = format_html(format_table(table, hubs, tests, hub_stats, changeset), rev, changeset) path = '../htmlreports/%s' % full_changeset
def main(): [db] = sys.argv[1:] r = make_table(db) report = format_html(format_table(*r)) changeset = db.split('.')[1] path = '../htmlreports/%s' % changeset try: os.makedirs(path) except OSError, ex: if 'File exists' not in str(ex): raise file(path + '/index.html', 'w').write(report) generate_raw_results(path, db)
8d522fc4736968ac3cd598ebbea9e2c50311575c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/8d522fc4736968ac3cd598ebbea9e2c50311575c/generate_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1966, 4672, 1983, 67, 6329, 278, 273, 1319, 18, 4939, 2668, 1093, 25146, 21, 65, 5588, 16, 22463, 273, 1983, 67, 6329, 278, 18, 4939, 2668, 67, 2187, 404, 13, 1014, 16, 7434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1966, 4672, 1983, 67, 6329, 278, 273, 1319, 18, 4939, 2668, 1093, 25146, 21, 65, 5588, 16, 22463, 273, 1983, 67, 6329, 278, 18, 4939, 2668, 67, 2187, 404, 13, 1014, 16, 7434,...
print 'looking at path', path, ' probability is', pathProbability
def getBestPath (self): bestProbability = 0.0 bestPath = None
c23ea155aa2b5d31f708d55c2474eb37eb2a21fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/c23ea155aa2b5d31f708d55c2474eb37eb2a21fd/ExtraAlgorithms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28782, 743, 261, 2890, 4672, 3796, 25598, 273, 374, 18, 20, 3796, 743, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28782, 743, 261, 2890, 4672, 3796, 25598, 273, 374, 18, 20, 3796, 743, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "renamed", file, "to", bak
print("renamed", file, "to", bak)
def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: print "listing directory", file names = os.listdir(file) for name in names: fullname = os.path.join(file, name) if ((recurse and os.path.isdir(fullname) and not os.path.islink(fullname)) or name.lower().endswith(".py")): check(fullname) return if verbose: print "checking", file, "...", try: f = open(file) except IOError as msg: errprint("%s: I/O Error: %s" % (file, str(msg))) return r = Reindenter(f) f.close() if r.run(): if verbose: print "changed." if dryrun: print "But this is a dry run, so leaving it alone." if not dryrun: bak = file + ".bak" if os.path.exists(bak): os.remove(bak) os.rename(file, bak) if verbose: print "renamed", file, "to", bak f = open(file, "w") r.write(f) f.close() if verbose: print "wrote new", file else: if verbose: print "unchanged."
4b4b89427d87518d9ad192a0b272bc7895013afc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/4b4b89427d87518d9ad192a0b272bc7895013afc/reindent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 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, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 273...
Returns the largest n so that precision information is stored about the coefficient of x^n.
Returns the largest $n$ so that precision information is stored about the coefficient of $x^n$.
def prec_degree(self): """ Returns the largest n so that precision information is stored about the coefficient of x^n.
d8e4cf89a457d2f6ca539347a4fbba1b2e11f0d2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/d8e4cf89a457d2f6ca539347a4fbba1b2e11f0d2/polynomial_padic_capped_relative_dense.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13382, 67, 21361, 12, 2890, 4672, 3536, 2860, 326, 12756, 290, 1427, 716, 6039, 1779, 353, 4041, 2973, 326, 16554, 434, 619, 66, 82, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13382, 67, 21361, 12, 2890, 4672, 3536, 2860, 326, 12756, 290, 1427, 716, 6039, 1779, 353, 4041, 2973, 326, 16554, 434, 619, 66, 82, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
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.contents['__init__'].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, 3980, 3292, 972, 2738, 972, 29489, 9885, 3980, 309, 320, 18, 5457, 67, 267, 67, 2938, 67, 2433, 65, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2590, 12, 2890, 4672, 327, 306, 83, 364, 320, 316, 365, 18, 947, 18, 3980, 3292, 972, 2738, 972, 29489, 9885, 3980, 309, 320, 18, 5457, 67, 267, 67, 2938, 67, 2433, 65, 2, -100, -100...
self.__init_simp.set_active(self.__get_value("InitSimplfiedChinese", True))
self.__init_simp.set_active(self.__get_value("InitSimplifiedChinese", True))
def __init_init_state(self): # init state self.__init_chinese = self.__builder.get_object("InitChinese") self.__init_english = self.__builder.get_object("InitEnglish") self.__init_full = self.__builder.get_object("InitFull") self.__init_half = self.__builder.get_object("InitHalf") self.__init_full_punct = self.__builder.get_object("InitFullPunct") self.__init_half_punct = self.__builder.get_object("InitHalfPunct") self.__init_simp = self.__builder.get_object("InitSimplfiedChinese") self.__init_trad = self.__builder.get_object("IniTraditionalChinese")
4ce8b5db3be34deefc8785d9e9602142a1761c1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/471/4ce8b5db3be34deefc8785d9e9602142a1761c1f/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 67, 2738, 67, 2019, 12, 2890, 4672, 468, 1208, 919, 365, 16186, 2738, 67, 343, 25331, 273, 365, 16186, 9574, 18, 588, 67, 1612, 2932, 2570, 782, 25331, 7923, 365, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 67, 2738, 67, 2019, 12, 2890, 4672, 468, 1208, 919, 365, 16186, 2738, 67, 343, 25331, 273, 365, 16186, 9574, 18, 588, 67, 1612, 2932, 2570, 782, 25331, 7923, 365, 16186, 2738...
global threadingmodule, threadmodule
global threadingmodule, threadmodule, XLock
def init(with_threads=1): """Initialize threading. Should be run once, at the beginning of program. """ global threaded, _to_be_synched, Waiter global threadingmodule, threadmodule if threaded == with_threads: return elif threaded: raise RuntimeError("threads cannot be disabled, once enabled") threaded = with_threads if threaded: print 'Enabling Multithreading.' Waiter = _ThreadedWaiter apply(synchronize, _to_be_synched) _to_be_synched = [] import thread, threading threadmodule = thread threadingmodule = threading for cb in threadCallbacks: cb() else: Waiter = _Waiter # Hack to allow XLocks to be unpickled on an unthreaded system. global XLock class XLock: pass
b3e42d3afd1cb849005d9a65f145c9e8bb638b38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b3e42d3afd1cb849005d9a65f145c9e8bb638b38/threadable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 1918, 67, 12495, 33, 21, 4672, 3536, 7520, 17254, 18, 9363, 506, 1086, 3647, 16, 622, 326, 8435, 434, 5402, 18, 3536, 2552, 286, 20528, 16, 389, 869, 67, 2196, 67, 11982, 204...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 1918, 67, 12495, 33, 21, 4672, 3536, 7520, 17254, 18, 9363, 506, 1086, 3647, 16, 622, 326, 8435, 434, 5402, 18, 3536, 2552, 286, 20528, 16, 389, 869, 67, 2196, 67, 11982, 204...