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
self.body.append('}')
pass
def depart_footnote_reference(self, node): self.body.append('}')
90784f3a87cc8f4fbeeebc362d4c40bbfc0c9e8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/90784f3a87cc8f4fbeeebc362d4c40bbfc0c9e8a/latexwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 10923, 7652, 67, 6180, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1713, 13, 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, 26000, 67, 10923, 7652, 67, 6180, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1713, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def test():
def main():
def test(): import sys import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'td') except getopt.error, msg: sys.stdout = sys.stderr print msg print "usage: quopri [-t | -d] [file] ..." print "-t: quote tabs" print "-d: decode; default encode" sys.exit(2) deco = 0 tabs = 0 for o, a in opts: if o == '-t': tabs = 1 if o == '-d': deco = 1 if tabs and deco: sys.stdout = sys.stderr print "-t and -d are mutually exclusive" sys.exit(2) if not args: args = ['-'] sts = 0 for file in args: if file == '-': fp = sys.stdin else: try: fp = open(file) except IOError, msg: sys.stderr.write("%s: can't open (%s)\n" % (file, msg)) sts = 1 continue if deco: decode(fp, sys.stdout) else: encode(fp, sys.stdout, tabs) if fp is not sys.stdin: fp.close() if sts: sys.exit(sts)
53a09da638705a8ff2ab16da881324da670a0b96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/53a09da638705a8ff2ab16da881324da670a0b96/quopri.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1652, 2774, 13332, 1930, 2589, 1930, 336, 3838, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 4465, 6134, 1335, 336, 3838, 18, 1636,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1652, 2774, 13332, 1930, 2589, 1930, 336, 3838, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 4465, 6134, 1335, 336, 3838, 18, 1636,...
newAddress.fullName = fullName
newAddress.fullName = name
def getEmailAddress (cls, nameOrAddressString, fullName=''): """ Lookup or create an EmailAddress based on the supplied string. @param nameOrAddressString: emailAddress string, or fullName for lookup @type nameOrAddressString: C{String} @param fullName: explict fullName to use when a new item is created @type fullName: C{String} @return: C{EmailAddress} or None if not found, and nameOrAddressString is\ not a valid email address. """ import osaf.mail.message as message # avoid circularity
b49ad043cedb1bb6d12fe3f876acb791dd27643e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b49ad043cedb1bb6d12fe3f876acb791dd27643e/Mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17297, 1887, 261, 6429, 16, 26840, 1887, 780, 16, 12424, 2218, 11, 4672, 3536, 8834, 578, 752, 392, 8166, 1887, 2511, 603, 326, 4580, 533, 18, 632, 891, 26840, 1887, 780, 30, 28748, 533,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17297, 1887, 261, 6429, 16, 26840, 1887, 780, 16, 12424, 2218, 11, 4672, 3536, 8834, 578, 752, 392, 8166, 1887, 2511, 603, 326, 4580, 533, 18, 632, 891, 26840, 1887, 780, 30, 28748, 533,...
send_project_index(req, mpr, env_parent_dir)
send_project_index(req, mpr, env_parent_dir, options)
def get_environment(req, mpr, options): global env_cache, env_cache_lock if options.has_key('TracEnv'): env_path = options['TracEnv'] elif options.has_key('TracEnvParentDir'): env_parent_dir = options['TracEnvParentDir'] env_name = mpr.cgi_location.split('/')[-1] env_path = os.path.join(env_parent_dir, env_name) if len(env_name) == 0 or not os.path.exists(env_path): send_project_index(req, mpr, env_parent_dir) return None else: raise TracError, \ 'Missing PythonOption "TracEnv" or "TracEnvParentDir". Trac ' \ 'requires one of these options to locate the Trac environment(s).' env = None try: env_cache_lock.acquire() if not env_path in env_cache: env_cache[env_path] = open_environment(env_path) env = env_cache[env_path] finally: env_cache_lock.release() return env
94e1ff49cbc483309344ddbf01a6ece010fc3f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/94e1ff49cbc483309344ddbf01a6ece010fc3f74/modpython_frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10274, 12, 3658, 16, 312, 683, 16, 702, 4672, 2552, 1550, 67, 2493, 16, 1550, 67, 2493, 67, 739, 225, 309, 702, 18, 5332, 67, 856, 2668, 1609, 71, 3491, 11, 4672, 1550, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10274, 12, 3658, 16, 312, 683, 16, 702, 4672, 2552, 1550, 67, 2493, 16, 1550, 67, 2493, 67, 739, 225, 309, 702, 18, 5332, 67, 856, 2668, 1609, 71, 3491, 11, 4672, 1550, 67, ...
for dep in self.dependencies: g = False d = os.stat(dep)[stat.ST_MTIME] try: e = os.stat(targ)[stat.ST_MTIME] except OSError as f: assert f.errno == 2 g = True if g != True and d > e: g = True if g == True: print self.command(self.targets, self.dependencies) status = subprocess.check_call(self.command(self.targets, self.dependencies), shell=True) print "execute command:", targ, "<-", dep print dep, "uptodate"
if is_target_outdated(targ, *self.dependencies): assert self.command(self.targets, self.dependencies) if is_target_outdated(targ, *self.dependencies): raise Exception class PatternRule: def __init__(self, pattern, repl, command): self.pattern = pattern self.repl = repl self.command = command pattern_rules.append(self) def update(self, target): dep = re.subn(self.pattern, self.repl, target, 1) if dep[1] == 1: if is_target_outdated(target, dep[0]): assert self.command([target], [dep[0]]) return True else: return False
def update(self): # recursively update, this propagates modifications up the tree for dep in self.dependencies: try: self.relationships()[dep].update() except KeyError: # no relationship is defined, do nothing # (eg the file is created by moi) pass for targ in self.targets: for dep in self.dependencies: g = False d = os.stat(dep)[stat.ST_MTIME] try: e = os.stat(targ)[stat.ST_MTIME] except OSError as f: assert f.errno == 2 g = True if g != True and d > e: g = True if g == True: # might have to use list2cmd or w/e here on windows? print self.command(self.targets, self.dependencies) status = subprocess.check_call(self.command(self.targets, self.dependencies), shell=True) print "execute command:", targ, "<-", dep print dep, "uptodate"
94a4ec81c8d23fc721dfafb5c2d502011e360c2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4811/94a4ec81c8d23fc721dfafb5c2d502011e360c2b/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 468, 8536, 1089, 16, 333, 9619, 815, 17953, 731, 326, 2151, 364, 5993, 316, 365, 18, 11037, 30, 775, 30, 365, 18, 21632, 1435, 63, 15037, 8009, 2725, 1435, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 468, 8536, 1089, 16, 333, 9619, 815, 17953, 731, 326, 2151, 364, 5993, 316, 365, 18, 11037, 30, 775, 30, 365, 18, 21632, 1435, 63, 15037, 8009, 2725, 1435, 1335, ...
Integral Homology of Jacobian of the modular curve associated to the congruence subgroup Gamma1(17)
Integral Homology of Abelian variety J1(17) of dimension 5
def integral_homology(self): """ Return the integral homology of this modular abelian variety.
83d03c9b2d797a52ad4e3f2fe47728d1f93f64bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/83d03c9b2d797a52ad4e3f2fe47728d1f93f64bc/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21423, 67, 17125, 4676, 12, 2890, 4672, 3536, 2000, 326, 21423, 13995, 4676, 434, 333, 681, 2490, 1223, 292, 2779, 1394, 14369, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 21423, 67, 17125, 4676, 12, 2890, 4672, 3536, 2000, 326, 21423, 13995, 4676, 434, 333, 681, 2490, 1223, 292, 2779, 1394, 14369, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
nose.tools.assert_raises(sundials.SundialsSimulationException,
nose.tools.assert_raises(jmodelica.simulation.SimulationException,
def test_set_get_model(self): """Test the model setter/getter.""" simulator = self.simulator assert simulator.get_model() == self.m another_model = load_example_standard_model('VDP_pack_VDP_Opt', 'VDP.mo', 'VDP_pack.VDP_Opt') simulator.set_model(another_model) assert simulator.get_model() == another_model nose.tools.assert_raises(sundials.SundialsSimulationException, simulator.set_model, None) another_model = load_example_standard_model('VDP_pack_VDP_Opt', 'VDP.mo', 'VDP_pack.VDP_Opt') simulator.model = another_model # testing property assert another_model == simulator.get_model()
0261d64d203e8a3e88c0fa6b40d87efd45259f84 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/0261d64d203e8a3e88c0fa6b40d87efd45259f84/test_sundials.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 588, 67, 2284, 12, 2890, 4672, 3536, 4709, 326, 938, 7794, 19, 11990, 12123, 3142, 11775, 273, 365, 18, 9812, 11775, 1815, 3142, 11775, 18, 588, 67, 2284, 1435, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 588, 67, 2284, 12, 2890, 4672, 3536, 4709, 326, 938, 7794, 19, 11990, 12123, 3142, 11775, 273, 365, 18, 9812, 11775, 1815, 3142, 11775, 18, 588, 67, 2284, 1435, 422, ...
mseed.plotMSFile(filename = gap_file, outfile = os.path.join(self.outpath,
mseed.plotMSFile(filename=gap_file, outfile=os.path.join(self.outpath,
def test_LibMSEEDPlot(self): """ Plots examples in tests/output directory """ mseed = libmseed() mseed_file = os.path.join(self.path, 'BW.BGLD..EHE.D.2008.001_first_10_percent') gap_file = os.path.join(self.path, 'BW.RJOB..EHZ.D.2009.056') small_file = os.path.join(self.path, 'test.mseed') small_gap_file = os.path.join(self.path, 'gaps.mseed') # calculate full minmaxlist only once minmaxlist = mseed._getMinMaxList(mseed_file, 777) # full graph with user defined colors and size. mseed.plotMSFile(mseed_file, outfile = os.path.join( self.outpath, 'full_graph_777x222px_orange_and_turquoise'), size = (777, 222), color = '#ffcc66', bgcolor = '#99ffff', minmaxlist = minmaxlist) # same graph as before but returned as a binary string. imgstring = mseed.plotMSFile(mseed_file, size = (777, 222), format = 'png', color = '#ffcc66', bgcolor = '#99ffff', minmaxlist = minmaxlist) imgfile = open(os.path.join(self.outpath, 'full_graph_777x222px_orange_and_turquoise.png'), 'rb') self.assertEqual(imgstring, imgfile.read()) imgfile.close() # same graph as above but with a transparent background and a green/ # orange gradient applied to the graph. mseed.plotMSFile(mseed_file, os.path.join(self.outpath, 'full_graph_777x222px_green-orange-gradient_and_transparent'), size = (777, 222), transparent = True, minmaxlist = minmaxlist, color = ('#99ff99', '#ffcc66')) # graph with user defined start and endtime both outside the graph mstg = mseed.readFileToTraceGroup(mseed_file, dataflag = 0) starttime = mstg.contents.traces.contents.starttime endtime = mstg.contents.traces.contents.endtime # graph begins one day before the file and ends one day after the file stime = mseed._convertMSTimeToDatetime(starttime - 86400 * 1e6) etime = mseed._convertMSTimeToDatetime(endtime + 86400 * 1e6) # create graph mseed.plotMSFile(mseed_file, os.path.join(self.outpath, 'graph_800x200px_with_one_empty_day_before_and_after_graph'),\ starttime = stime, endtime = etime) # graph that plots the hour of the MiniSEED file mstg = mseed.readFileToTraceGroup(mseed_file, dataflag = 0) endtime = mstg.contents.traces.contents.endtime starttime = mseed._convertMSTimeToDatetime(endtime - 3600 * 1e6) # create graph mseed.plotMSFile(mseed_file, os.path.join(self.outpath, 'graph_800x200px_last_hour_two_gray_shades'),\ starttime = starttime, color = '0.7', bgcolor = '0.2') # graph with a large gap in between and a gradient in the graph and the # background and basic shadow effect applied to the graph. mseed.plotMSFile(filename = gap_file, outfile = os.path.join(self.outpath, 'graph_888x222px_with_gap_two_gradients_and_shadows'), size = (888, 222), color = ('#ffff00', '#ff6633'), bgcolor = ('#111111','#ccccff'), shadows = True) # small graph with only 11947 samples. It works reasonably well but # the plotting method is designed to plot files with several million # datasamples. mseed.plotMSFile(filename = small_file, outfile = os.path.join(self.outpath, 'small_graph_with_very_few_datasamples')) # small graph with several gaps mseed.plotMSFile(filename = small_gap_file, outfile = os.path.join(self.outpath, 'small_graph_with_small_gaps_yellow'), color = 'y')
86891c3b02b856fac5ffaeae1fd61c5974df3489 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/86891c3b02b856fac5ffaeae1fd61c5974df3489/test_plotting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5664, 49, 1090, 2056, 11532, 12, 2890, 4672, 3536, 3008, 6968, 10991, 316, 7434, 19, 2844, 1867, 3536, 312, 12407, 273, 2561, 81, 12407, 1435, 312, 12407, 67, 768, 273, 1140, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5664, 49, 1090, 2056, 11532, 12, 2890, 4672, 3536, 3008, 6968, 10991, 316, 7434, 19, 2844, 1867, 3536, 312, 12407, 273, 2561, 81, 12407, 1435, 312, 12407, 67, 768, 273, 1140, 1...
G += plot(funcs[i], xmin=xmin, xmax=xmax, polar=polar, **kwds)
G += plot(funcs[i], (xmin, xmax), polar=polar, **kwds)
def _call(self, funcs, xrange, parametric=False, polar=False, label='', **kwds): options = dict(self.options) for k, v in kwds.iteritems(): options[k] = v
d274024cc5c2eb3dc7cb77f27b21fc757fe9e529 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d274024cc5c2eb3dc7cb77f27b21fc757fe9e529/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 12, 2890, 16, 15630, 16, 12314, 16, 579, 1591, 33, 8381, 16, 24244, 33, 8381, 16, 1433, 2218, 2187, 2826, 25577, 4672, 702, 273, 2065, 12, 2890, 18, 2116, 13, 364, 417, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 12, 2890, 16, 15630, 16, 12314, 16, 579, 1591, 33, 8381, 16, 24244, 33, 8381, 16, 1433, 2218, 2187, 2826, 25577, 4672, 702, 273, 2065, 12, 2890, 18, 2116, 13, 364, 417, 16, ...
BoolParam(default_warn))
BoolParam(default_0_3))
def warning(*msg): _logger.warning('WARNING theano.configdefaults: '+' '.join(msg))
7eb32681722fcfb14efae9fd5b59f9299c0768c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/7eb32681722fcfb14efae9fd5b59f9299c0768c0/configdefaults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3436, 30857, 3576, 4672, 389, 4901, 18, 8551, 2668, 9511, 326, 31922, 18, 1425, 7606, 30, 10058, 2418, 5701, 12, 3576, 3719, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3436, 30857, 3576, 4672, 389, 4901, 18, 8551, 2668, 9511, 326, 31922, 18, 1425, 7606, 30, 10058, 2418, 5701, 12, 3576, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return self.getCertInChain(0)[ 'Value' ].getRemainingSecs()
remainingSecs = self.getCertInChain(0)[ 'Value' ].getRemainingSecs()[ 'Value' ] for i in range( 1, len( self.__certList ) ): stepRS = self.getCertInChain(i)[ 'Value' ].getRemainingSecs()[ 'Value' ] remainingSecs = min( remainingSecs, stepRS ) return S_OK( remainingSecs )
def getRemainingSecs( self ): """ Get remaining time """ if not self.__loadedChain: return S_ERROR( "No chain loaded" ) return self.getCertInChain(0)[ 'Value' ].getRemainingSecs()
4be08f9f800e2f322b0bde36a8e3d07835a36457 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4be08f9f800e2f322b0bde36a8e3d07835a36457/X509Chain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 11429, 25059, 12, 365, 262, 30, 3536, 968, 4463, 813, 3536, 309, 486, 365, 16186, 4230, 3893, 30, 327, 348, 67, 3589, 12, 315, 2279, 2687, 4203, 6, 262, 327, 365, 18, 588, 5461, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 11429, 25059, 12, 365, 262, 30, 3536, 968, 4463, 813, 3536, 309, 486, 365, 16186, 4230, 3893, 30, 327, 348, 67, 3589, 12, 315, 2279, 2687, 4203, 6, 262, 327, 365, 18, 588, 5461, ...
"""Generator that generates dates of recurrences"""
"""Generator that generates dates of recurrences."""
def apply(self, event, enddate=None): """Generator that generates dates of recurrences""" cur = event.dtstart.date() count = 0 while True: if ((enddate and cur > enddate) or (self.count is not None and count >= self.count) or (self.until and cur > self.until)): break if cur not in self.exceptions: yield cur count += 1 cur = self._nextRecurrence(cur)
15beedc0f80329674af0a112ec77fed67633c130 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/15beedc0f80329674af0a112ec77fed67633c130/cal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 871, 16, 679, 712, 33, 7036, 4672, 3536, 3908, 716, 6026, 7811, 434, 8112, 12228, 12123, 662, 273, 871, 18, 7510, 1937, 18, 712, 1435, 1056, 273, 374, 1323, 1053, 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, 2230, 12, 2890, 16, 871, 16, 679, 712, 33, 7036, 4672, 3536, 3908, 716, 6026, 7811, 434, 8112, 12228, 12123, 662, 273, 871, 18, 7510, 1937, 18, 712, 1435, 1056, 273, 374, 1323, 1053, 3...
'balance_end': fields.function(_end_balance, method=True, string='Balance', help="Closing balance based on transactions"), 'balance_end_cash': fields.function(_balance_end_cash, method=True, string='Balance', help="Closing balance based on cashBox"), 'starting_details_ids': fields.one2many('singer.statement', 'starting_id', string='Opening Cashbox'), 'ending_details_ids': fields.one2many('singer.statement', 'ending_id', string='Closing Cashbox'),
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on transactions"), 'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"), 'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'), 'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
def _end_balance(self, cursor, user, ids, name, attr, context=None): res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users')
c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 409, 67, 12296, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1604, 16, 819, 33, 7036, 4672, 400, 67, 7095, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 7095, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 409, 67, 12296, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1604, 16, 819, 33, 7036, 4672, 400, 67, 7095, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 7095, 6...
def __init__(self, ui, repo, inc, exc):
def __init__(self, ui, repo):
def __init__(self, ui, repo, inc, exc): self.ui = ui self.repo = repo self.matcher = util.matcher(repo.root, inc=inc, exc=exc)[1] self.restrict = kwtools['hgcmd'] in restricted.split()
f0f2f142857321e7962ce6419c8ae2230b506410 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/f0f2f142857321e7962ce6419c8ae2230b506410/keyword.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 16, 3538, 4672, 365, 18, 4881, 273, 5915, 365, 18, 7422, 273, 3538, 365, 18, 22761, 273, 1709, 18, 22761, 12, 7422, 18, 3085, 16, 7290, 33, 9523, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5915, 16, 3538, 4672, 365, 18, 4881, 273, 5915, 365, 18, 7422, 273, 3538, 365, 18, 22761, 273, 1709, 18, 22761, 12, 7422, 18, 3085, 16, 7290, 33, 9523, ...
task.set_due_date(task_data["duedate"]) task.set_start_date(task_data["startdate"])
task.set_due_date(dates.strtodate(task_data["duedate"])) task.set_start_date(dates.strtodate(task_data["startdate"]))
def modify_task(self, tid, task_data): # Apply supplied task data to the task object with the specified ID task = self.req.get_task(tid) task.set_status(task_data["status"], donedate=task_data["donedate"]) task.set_title(task_data["title"]) task.set_due_date(task_data["duedate"]) task.set_start_date(task_data["startdate"]) task.set_text(task_data["text"])
ae9f12e981e9977a36758a05bd778dfd3246a541 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/ae9f12e981e9977a36758a05bd778dfd3246a541/dbuswrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 67, 4146, 12, 2890, 16, 11594, 16, 1562, 67, 892, 4672, 468, 5534, 4580, 1562, 501, 358, 326, 1562, 733, 598, 326, 1269, 1599, 1562, 273, 365, 18, 3658, 18, 588, 67, 4146, 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, 5612, 67, 4146, 12, 2890, 16, 11594, 16, 1562, 67, 892, 4672, 468, 5534, 4580, 1562, 501, 358, 326, 1562, 733, 598, 326, 1269, 1599, 1562, 273, 365, 18, 3658, 18, 588, 67, 4146, 12, ...
cdescr += 'Old description:' + 2*CRLF + old_descr + \ 2*CRLF cdescr += 'New description:' + 2*CRLF + new_descr + \
cdescr += 'Old description:' + 2 * CRLF + old_descr + \ 2 * CRLF cdescr += 'New description:' + 2 * CRLF + new_descr + \
def _notify(self, ticket, newticket=True, modtime=None): self.ticket = ticket self.modtime = modtime self.newticket = newticket
da2496a3ac027731fc150ee0fa0ccf80086a21e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/da2496a3ac027731fc150ee0fa0ccf80086a21e0/notification.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12336, 12, 2890, 16, 9322, 16, 394, 16282, 33, 5510, 16, 681, 957, 33, 7036, 4672, 365, 18, 16282, 273, 9322, 365, 18, 1711, 957, 273, 681, 957, 365, 18, 2704, 16282, 273, 394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 12336, 12, 2890, 16, 9322, 16, 394, 16282, 33, 5510, 16, 681, 957, 33, 7036, 4672, 365, 18, 16282, 273, 9322, 365, 18, 1711, 957, 273, 681, 957, 365, 18, 2704, 16282, 273, 394, ...
self.playlist_handle.write('%s\n' % f)
if os.path.isdir(f): for file in os.listdir(f): self.playlist_handle.write('%s\n' % os.path.join(f, file)) else: self.playlist_handle.write('%s\n' % f)
def queue_file(self,arg=None, menuw=None): if not self.playlist_handle: self.playlist_handle = open(('%s/%s.m3u' % (self.playlist_folder, time.strftime(self.naming))),'w+') for f in self.item.files.get(): self.playlist_handle.write('%s\n' % f) self.playlist_handle.flush() rc.post_event(Event(OSD_MESSAGE, arg='Queued Track')) return
dcd75b507930bd64198d034932604631e32e5234 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/dcd75b507930bd64198d034932604631e32e5234/playlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2389, 67, 768, 12, 2890, 16, 3175, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 309, 486, 365, 18, 1601, 1098, 67, 4110, 30, 365, 18, 1601, 1098, 67, 4110, 273, 1696, 12, 29909, 87, 5258,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2389, 67, 768, 12, 2890, 16, 3175, 33, 7036, 16, 3824, 91, 33, 7036, 4672, 309, 486, 365, 18, 1601, 1098, 67, 4110, 30, 365, 18, 1601, 1098, 67, 4110, 273, 1696, 12, 29909, 87, 5258,...
p = xmlrpclib.ServerProxy(URL)
p = xmlrpclib.ServerProxy(self.url)
def test_close(self): p = xmlrpclib.ServerProxy(URL) self.assertEqual(p('close')(), None)
a44b5a332620c8fc0fcf25f81025e5f9d832a5e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/a44b5a332620c8fc0fcf25f81025e5f9d832a5e2/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 12, 2890, 4672, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 2890, 18, 718, 13, 365, 18, 11231, 5812, 12, 84, 2668, 4412, 6134, 9334, 599, 13, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 12, 2890, 4672, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 2890, 18, 718, 13, 365, 18, 11231, 5812, 12, 84, 2668, 4412, 6134, 9334, 599, 13, 2, -100, -100, ...
x_half = self.x_length / 2.0 y_half = self.y_length / 2.0 orientation_position_based = {"AXIAL" : (x - x_half,y - y_half, z), "CORONAL" : (x - x_half, y, z - y_half), "SAGITAL" : (x, y - y_half, z + x_half)} xc,yc,zc = orientation_position_based[self.orientation] self.position = (xc,yc,zc) self.actor.SetPosition(xc,yc,zc)
self.position = position self.actor.SetPosition(x,y,z)
def SetPosition(self, position): x,y,z = position x_half = self.x_length / 2.0 y_half = self.y_length / 2.0 orientation_position_based = {"AXIAL" : (x - x_half,y - y_half, z), "CORONAL" : (x - x_half, y, z - y_half), "SAGITAL" : (x, y - y_half, z + x_half)} xc,yc,zc = orientation_position_based[self.orientation] self.position = (xc,yc,zc) self.actor.SetPosition(xc,yc,zc)
d8df5d576e393f5c8db03d2308e5e6c2d2e3c49e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/d8df5d576e393f5c8db03d2308e5e6c2d2e3c49e/cursor_actors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 2555, 12, 2890, 16, 1754, 4672, 619, 16, 93, 16, 94, 273, 1754, 619, 67, 20222, 273, 365, 18, 92, 67, 2469, 342, 576, 18, 20, 677, 67, 20222, 273, 365, 18, 93, 67, 2469, 342,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 2555, 12, 2890, 16, 1754, 4672, 619, 16, 93, 16, 94, 273, 1754, 619, 67, 20222, 273, 365, 18, 92, 67, 2469, 342, 576, 18, 20, 677, 67, 20222, 273, 365, 18, 93, 67, 2469, 342,...
file('debian/bin/patch-apply', 'w').write(apply) file('debian/bin/patch-unpatch', 'w').write(unpatch)
file('debian/bin/patch.apply', 'w').write(apply) file('debian/bin/patch.unpatch', 'w').write(unpatch)
def do_extra(self, packages, makefile): apply = self.templates['patch.apply'] unpatch = self.templates['patch.unpatch']
e1f5c945efee0ccd76c2649a53152787a7f14727 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5794/e1f5c945efee0ccd76c2649a53152787a7f14727/gencontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7763, 12, 2890, 16, 5907, 16, 1221, 768, 4672, 2230, 273, 365, 18, 8502, 3292, 2272, 18, 9010, 3546, 640, 2272, 273, 365, 18, 8502, 3292, 2272, 18, 318, 2272, 3546, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 7763, 12, 2890, 16, 5907, 16, 1221, 768, 4672, 2230, 273, 365, 18, 8502, 3292, 2272, 18, 9010, 3546, 640, 2272, 273, 365, 18, 8502, 3292, 2272, 18, 318, 2272, 3546, 2, -100, ...
def testExceptionInTpcFinish(self): for sub in self.sub1, self.sub2: sub._p_jar = SubTransactionJar(errors='tpc_finish') sub.modify(nojar=1) self.nosub1.modify() try: get_transaction().commit() except TestTxnException: pass except Transaction.POSException.TransactionError: pass assert Transaction.hosed == 1 Transaction.hosed = 0
def testExceptionInTpcFinish(self):
16b081c875873c122c85de967c55b72ebc57ffee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/16b081c875873c122c85de967c55b72ebc57ffee/testTransaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 503, 382, 56, 2436, 11641, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 503, 382, 56, 2436, 11641, 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...
self.parse_error(_["Invalid [VER] operator: %s"] % self.buffer)
self.parse_error(_["Invalid [VER] operator"])
def parse_ver(self): self.parse_dbg_indent += " " match = re_ver_fun.match(self.buffer) if match: p = match.span(0)[1] self.buffer = self.buffer[p:] self.pdbg("parse_ver new buffer = %s" % self.buffer) op = match.group(1) orig_ver = match.group(2) ver = format_version(orig_ver) plugin = C.cname(match.group(3)) expr = "[VER %s %s %s]" % (op, orig_ver, plugin) self.pdbg("parse_ver, expr=%s ver=%s" % (expr, ver)) if not plugin in self.active: self.pdbg("parse_ver [VER] \"%s\" not active" % plugin) self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(False, expr) # file does not exist if self.datadir == None: # this case is reached when doing fromfile checks # and we do not have the actual plugin to check, so # we assume that the plugin matches the given version if op == '=': self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(True, expr) else: self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(False, expr) desc = plugin_description(self.datadir.find_path(plugin)) match = re_header_version.search(desc) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) self.pdbg("parse_ver (header) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) else: match = re_filename_version.search(plugin) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) self.pdbg("parse_ver (filename) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) else: self.pdbg("parse_ver no version for %s" % plugin) return(False, expr) self.pdbg("parse_ver compare p_ver=%s %s ver=%s" % (p_ver, op, ver)) self.parse_dbg_indent = self.parse_dbg_indent[:-2] if op == '=': return(p_ver == ver, expr) elif op == '<': return(p_ver < ver, expr) elif op == '>': return(p_ver > ver, expr) else: self.parse_error(_["Invalid [VER] operator: %s"] % self.buffer) return(None, None) self.parse_error(_["Invalid [VER] function: %s"] % self.buffer) self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(None, None)
04e1c8d2fe1601583da11cfd534a62b3c470ebd2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2827/04e1c8d2fe1601583da11cfd534a62b3c470ebd2/mlox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 502, 12, 2890, 4672, 365, 18, 2670, 67, 1966, 75, 67, 9355, 1011, 315, 225, 315, 845, 273, 283, 67, 502, 67, 12125, 18, 1916, 12, 2890, 18, 4106, 13, 309, 845, 30, 293, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 502, 12, 2890, 4672, 365, 18, 2670, 67, 1966, 75, 67, 9355, 1011, 315, 225, 315, 845, 273, 283, 67, 502, 67, 12125, 18, 1916, 12, 2890, 18, 4106, 13, 309, 845, 30, 293, 2...
print 'OnscreenText.configure: invalid option:', option
print 'OnscreenImage.configure: invalid option:', option
def configure(self, option=None, **kw): for option, value in kw.items(): # Use option string to access setter function try: setter = eval('self.set' + string.upper(option[0]) + option[1:]) if (((setter == self.setPos) or (setter == self.setHpr) or (setter == self.setScale)) and (isinstance(value, types.TupleType) or isinstance(value, types.ListType))): apply(setter, value) else: setter(value) except AttributeError: print 'OnscreenText.configure: invalid option:', option
95ed440fc92a9f22e9467ce9f988c91857d93c4c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/95ed440fc92a9f22e9467ce9f988c91857d93c4c/OnscreenImage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 1456, 33, 7036, 16, 2826, 9987, 4672, 364, 1456, 16, 460, 316, 5323, 18, 3319, 13332, 468, 2672, 1456, 533, 358, 2006, 7794, 445, 775, 30, 7794, 273, 5302, 2668, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 1456, 33, 7036, 16, 2826, 9987, 4672, 364, 1456, 16, 460, 316, 5323, 18, 3319, 13332, 468, 2672, 1456, 533, 358, 2006, 7794, 445, 775, 30, 7794, 273, 5302, 2668, 28...
def name(self):
def name(self, new_name=None): """ Returns the name of self. If new_name is passed in, then this function returns a new object identitical to self whose name is new_name. Note that this can overwrite existing variables in the system. EXAMPLES: sage: x = r([1,2,3]); x [1] 1 2 3 sage: x.name() 'sage3' sage: x = r([1,2,3]).name('x'); x [1] 1 2 3 sage: x.name() 'x' sage: s5 = gap.SymmetricGroup(5).name('s5') sage: s5 SymmetricGroup( [ 1 .. 5 ] ) sage: s5.name() 's5' """ if new_name is not None: if not isinstance(new_name, str): raise TypeError, "new_name must be a string" p = self.parent() p.set(new_name, self._name) return p._object_class()(p, new_name, is_name=True)
def name(self): return self._name
c85329e85a50cc7c2c250035bda469deb038c5d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c85329e85a50cc7c2c250035bda469deb038c5d0/expect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 2890, 16, 394, 67, 529, 33, 7036, 4672, 3536, 2860, 326, 508, 434, 365, 18, 225, 971, 394, 67, 529, 353, 2275, 316, 16, 1508, 333, 445, 1135, 279, 394, 733, 3390, 305, 1706,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 2890, 16, 394, 67, 529, 33, 7036, 4672, 3536, 2860, 326, 508, 434, 365, 18, 225, 971, 394, 67, 529, 353, 2275, 316, 16, 1508, 333, 445, 1135, 279, 394, 733, 3390, 305, 1706,...
define_macros = [ ('SIMUPOP_MODULE', '"simuPOP_op"'), ('OPTIMIZED', None)] + serial_macro,
define_macros = [ ('SIMUPOP_MODULE', 'simuPOP_op'), ('OPTIMIZED', None)] + serial_macro,
def addCarrayEntry(file): ' add a line at the wrap file for carray type definition' shutil.copy(file, file+'tmp') ofile = open(file, 'w') ifile = open(file+'tmp', 'r') for line in ifile.readlines(): if line.find('static PyMethodDef SwigMethods[] = ') != -1: ofile.write('''static PyMethodDef SwigMethods[] = { /* add carray entries */ { (char*)"carray", a_array, METH_VARARGS, a_array_doc}, ''') else: ofile.write(line) ifile.close() ofile.close() os.remove(file+'tmp')
14d9c19c36ce4097d8b2722411d2b682acf8a600 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/14d9c19c36ce4097d8b2722411d2b682acf8a600/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 39, 1126, 1622, 12, 768, 4672, 296, 527, 279, 980, 622, 326, 2193, 585, 364, 276, 1126, 618, 2379, 11, 11060, 18, 3530, 12, 768, 16, 585, 6797, 5645, 6134, 434, 398, 273, 1696, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 39, 1126, 1622, 12, 768, 4672, 296, 527, 279, 980, 622, 326, 2193, 585, 364, 276, 1126, 618, 2379, 11, 11060, 18, 3530, 12, 768, 16, 585, 6797, 5645, 6134, 434, 398, 273, 1696, ...
print r
def get_bug(self, tracker, id, do_assignee, do_url = True): reports = [] for r in tracker.get_bug(id): print r (bid, product, title, severity, status, assignee, url) = r severity = severity[0].upper() + severity[1:].lower() status = status[0].upper() + status[1:].lower() if not do_url: url = '' if product: reports.append("%s bug %s in %s \"%s\" [%s,%s] %s" % (tracker.description, bid, product, title, severity, status, url)) else: reports.append("%s bug %s \"%s\" [%s,%s] %s" % (tracker.description, bid, title, severity, status, url)) if do_assignee and assignee: reports[-1] = reports[-1] + (" - Assigned to %s" % assignee) return reports
a1873865d09620ddbd225087a2af830e9d31df4a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3104/a1873865d09620ddbd225087a2af830e9d31df4a/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 925, 12, 2890, 16, 9745, 16, 612, 16, 741, 67, 6145, 1340, 16, 741, 67, 718, 273, 1053, 4672, 10557, 273, 5378, 364, 436, 316, 9745, 18, 588, 67, 925, 12, 350, 4672, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 925, 12, 2890, 16, 9745, 16, 612, 16, 741, 67, 6145, 1340, 16, 741, 67, 718, 273, 1053, 4672, 10557, 273, 5378, 364, 436, 316, 9745, 18, 588, 67, 925, 12, 350, 4672, 261, ...
variable_families = data_flow_families(graph) def merges(varlist): d = {} for i in range(len(varlist)): v = variable_families.find_rep(varlist[i]) if v in d: yield d[v], i d[v] = i entrymap = mkentrymap(graph) for block, links in entrymap.items(): if not block.exits: continue try: while True: j, i = merges(block.inputargs).next() argi = block.inputargs[i] argj = block.inputargs[j] block.renamevariables({argi: argj}) assert block.inputargs[i] == block.inputargs[j] == argj del block.inputargs[i]
entrymapitems = mkentrymap(graph).items() progress = True while progress: variable_families = data_flow_families(graph) progress = False for block, links in entrymapitems: if not block.exits: continue entryargs = {} for i in range(len(block.inputargs)): key = []
def remove_identical_vars(graph): """When the same variable is passed multiple times into the next block, pass it only once. This enables further optimizations by the annotator, which otherwise doesn't realize that tests performed on one of the copies of the variable also affect the other.""" from pypy.translator.backendopt.ssa import data_flow_families variable_families = data_flow_families(graph) def merges(varlist): d = {} for i in range(len(varlist)): v = variable_families.find_rep(varlist[i]) if v in d: yield d[v], i d[v] = i entrymap = mkentrymap(graph) for block, links in entrymap.items(): if not block.exits: continue try: while True: # look for the next possible merge (restarting each time) j, i = merges(block.inputargs).next() # we can remove the argument i and replace it with the j. argi = block.inputargs[i] argj = block.inputargs[j] block.renamevariables({argi: argj}) assert block.inputargs[i] == block.inputargs[j] == argj del block.inputargs[i] for link in links: assert (variable_families.find_rep(link.args[i]) == variable_families.find_rep(link.args[j])) del link.args[i] except StopIteration: pass
73344188ad55ff78c780e5d8d1c1f2c8d1fb5a09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/73344188ad55ff78c780e5d8d1c1f2c8d1fb5a09/simplify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 6392, 1706, 67, 4699, 12, 4660, 4672, 3536, 9434, 326, 1967, 2190, 353, 2275, 3229, 4124, 1368, 326, 1024, 1203, 16, 1342, 518, 1338, 3647, 18, 225, 1220, 19808, 9271, 5213, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 6392, 1706, 67, 4699, 12, 4660, 4672, 3536, 9434, 326, 1967, 2190, 353, 2275, 3229, 4124, 1368, 326, 1024, 1203, 16, 1342, 518, 1338, 3647, 18, 225, 1220, 19808, 9271, 5213, 70...
match = re.match(".*:a(.*?):",line)
match = re.match(".*:a([-0-9]*?):",line)
def parse(self,line,line_no) : self.line_no = line_no # Get the Format Revision No. # This allows us to change revisions in the future, and # have this code still be able to cope with changes. match = re.match("^F1:",line) # If line starts with F1: then Revision 1 if match : # Parse the line for revision 1 format if debug : print "Matching a Format Rev 1 line" match = re.match(".*:T(.*?):",line) # Time of Week if match : self.tm = float (match.group(1)) else : print "Failure parsing time of week at line", line_no return "Error" match = re.match(".*:S(.*?):",line) # Status Flags if match : self.status = match.group(1) else : print "Failure parsing status flags at line", line_no return "Error" match = re.match(".*:N(.*?):",line) # Lat North if match : self.latitude = float(match.group(1)) else : print "Failure parsing Lat North at line", line_no return "Error" match = re.match(".*:E(.*?):",line) # Lon East if match : self.longitude = float (match.group(1)) else : print "Failure parsing Lon East at line", line_no return "Error" match = re.match(".*:A(.*?):",line) # Altitude if match : self.altitude = float(match.group(1)) else : print "Failure parsing Altitude at line", line_no return "Error" match = re.match(".*:W(.*?):",line) # Waypoint Index if match : self.waypointIndex = int(match.group(1)) else : print "Failure parsing Wapoint Index at line", line_no return "Error" match = re.match(".*:a(.*?):",line) # rmat 0 if match : self.rmat0 = int(match.group(1)) else : print "Failure parsing rmat0 at line", line_no return "Error" match = re.match(".*:b(.*?):",line) # rmat 1 if match : self.rmat1 = int(match.group(1)) else : print "Failure parsing rmat1 at line", line_no return "Error" match = re.match(".*:c(.*?):",line) # rmat 2 if match : self.rmat2 = int(match.group(1)) else : print "Failure parsing rmat2 at line", line_no return "Error" match = re.match(".*:d(.*?):",line) # rmat 3 if match : self.rmat3 = int(match.group(1)) else : print "Failure parsing rmat3 at line", line_no return "Error" match = re.match(".*:e(.*?):",line) # rmat 4 if match : self.rmat4 = int(match.group(1)) else : print "Failure parsing rmat4 at line", line_no return "Error" match = re.match(".*:f(.*?):",line) # rmat 5 if match : self.rmat5 = int(match.group(1)) else : print "Failure parsing rmat5 at line", line_no return "Error" match = re.match(".*:g(.*?):",line) # rmat 6 if match : self.rmat6 = int(match.group(1)) else : print "Failure parsing rmat6 at line", line_no return "Error" match = re.match(".*:h(.*?):",line) # rmat 7 if match : self.rmat7 = int(match.group(1)) else : print "Failure parsing rmat7 at line", line_no return "Error" match = re.match(".*:i(.*?):",line) # rmat 8 if match : self.rmat8 = int(match.group(1)) else : print "Failure parsing rmat8 at line", line_no return "Error" # Because of a mistake in sprintf in UDB code, # sog and cog have to be swapped over in Rev F1 of telemetry match = re.match(".*:c(.*?):",line) # Speed Over Ground if match : self.sog = int(match.group(1)) else : print "Failure parsing Speed Over Ground at line", line_no return "Error" match = re.match(".*:s(.*?):",line) # Course Over Ground if match : self.cog = int(match.group(1)) else : print "Failure parsing Course Over Ground at line", line_no return "Error" # line was parsed without Errors return "F1"
cd5bc44ce8c6c3c66609fa0abbf924716106f1b8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6667/cd5bc44ce8c6c3c66609fa0abbf924716106f1b8/uav_log_to_kml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 1369, 16, 1369, 67, 2135, 13, 294, 365, 18, 1369, 67, 2135, 273, 980, 67, 2135, 468, 968, 326, 4077, 13132, 2631, 18, 468, 1220, 5360, 584, 358, 2549, 18325, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 1369, 16, 1369, 67, 2135, 13, 294, 365, 18, 1369, 67, 2135, 273, 980, 67, 2135, 468, 968, 326, 4077, 13132, 2631, 18, 468, 1220, 5360, 584, 358, 2549, 18325, 316, ...
def getCursorID(self): return self.__cursorID
self.player.changeSound() def isTouched(self): return self.__cursorID is not None
def onCursorUp(self): self.__cursorID = None
8d0e6591341b9080daf0caea2de05c84bdd3b31c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7301/8d0e6591341b9080daf0caea2de05c84bdd3b31c/Game.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6688, 1211, 12, 2890, 4672, 365, 16186, 9216, 734, 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, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6688, 1211, 12, 2890, 4672, 365, 16186, 9216, 734, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if t is lltype.Void:
counts[t] = counts.get(t, 0) + 1 key = lltype.frozendict(counts) return key def frame_type_for_vars(self, vars): key = self._key_for_types([v.concretetype for v in vars]) if key not in self.frametypes: fields = [] fieldsbytype = {} for t in STORAGE_TYPES: for j in range(key.get(t, 0)): fname = 'state_%s_%d' % (STORAGE_FIELDS[t], j) fields.append((fname, t)) fieldsbytype.setdefault(t, []).append(fname) self.frametypes[key] = (frame.make_state_header_type("FrameState", *fields), fieldsbytype) T, fieldsbytype = self.frametypes[key] data = {} for (k, fs) in fieldsbytype.iteritems(): data[k] = fs[:] fieldnames = [] for v in vars: if v.concretetype is lltype.Void:
def _key_fieldnames_for_types(self, types): fieldnames = [] counts = {} for tt in types: t = storage_type(tt) if t is lltype.Void: fieldnames.append(None) else: n = counts.get(t, 0) fieldnames.append('state_%s_%d' % (STORAGE_FIELDS[t], n)) counts[t] = n + 1 key = lltype.frozendict(counts) return key, fieldnames
15f04e6b641cf653f925f296af5deeaf7f6340fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/15f04e6b641cf653f925f296af5deeaf7f6340fa/transform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 856, 67, 1518, 1973, 67, 1884, 67, 2352, 12, 2890, 16, 1953, 4672, 25051, 273, 5378, 6880, 273, 2618, 364, 3574, 316, 1953, 30, 268, 273, 2502, 67, 723, 12, 748, 13, 6880, 63, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 856, 67, 1518, 1973, 67, 1884, 67, 2352, 12, 2890, 16, 1953, 4672, 25051, 273, 5378, 6880, 273, 2618, 364, 3574, 316, 1953, 30, 268, 273, 2502, 67, 723, 12, 748, 13, 6880, 63, 8...
'context' : context
'context' : context, 'nodestroy':True,
def action_print_survey(self, cr, uid, ids, context=None): """ If response is available then print this response otherwise print survey form(print template of the survey). @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Survey IDs @param context: A standard dictionary for contextual values @return : Dictionary value for print survey form. """ if not context: context = {} datas = {} if 'response_id' in context: response_id = context.get('response_id', 0) datas['ids'] = [context.get('survey_id', 0)] else: response_id = self.pool.get('survey.response').search(cr, uid, [('survey_id','=', ids)], context=context) datas['ids'] = ids page_setting = {'orientation': 'vertical', 'without_pagebreak': 0, 'paper_size': 'letter', 'page_number': 1, 'survey_title': 1} report = {} if response_id and response_id[0]: context.update({'survey_id': datas['ids']}) datas['form'] = page_setting datas['model'] = 'survey.print.answer' report = { 'type': 'ir.actions.report.xml', 'report_name': 'survey.browse.response', 'datas': datas, 'context' : context } else:
9efa15363196a60d2b14e53fa7edc931a815d6d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9efa15363196a60d2b14e53fa7edc931a815d6d0/survey.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 1188, 67, 21448, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 971, 766, 353, 2319, 1508, 1172, 333, 766, 3541, 1172, 14902, 646, 12, 1188, 1542, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 1188, 67, 21448, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 971, 766, 353, 2319, 1508, 1172, 333, 766, 3541, 1172, 14902, 646, 12, 1188, 1542, 434...
"plot", "plot3D", "stemPlot",
"plot", "plot3D", "stemPlot", "waterfallPlot",
def import_to_global(modname, attrs=None, math=False): """ import_to_global(modname, (a,b,c,...), math): like "from modname import a,b,c,...", but imports to global namespace (__main__). If math==True, also registers functions with QtiPlot's math function list. """ mod = __import__(modname) for submod in modname.split(".")[1:]: mod = getattr(mod, submod) if attrs==None: attrs=dir(mod) for name in attrs: f = getattr(mod, name) setattr(__main__, name, f) # make functions available in QtiPlot's math function list if math and callable(f): qti.mathFunctions[name] = f
1a07eaefe366a8f9c8992385cae3f16b25f7120f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2185/1a07eaefe366a8f9c8992385cae3f16b25f7120f/qtiplotrc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 3422, 33, 7036, 16, 4233, 33, 8381, 4672, 3536, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 261, 69, 16, 70, 16, 71, 16, 2777, 3631, 423...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 3422, 33, 7036, 16, 4233, 33, 8381, 4672, 3536, 1930, 67, 869, 67, 6347, 12, 1711, 529, 16, 261, 69, 16, 70, 16, 71, 16, 2777, 3631, 423...
self.credentials = Credentials(SIPURI(user=self.id.username, host=self.id.domain, display_name=self.display_name), password=self.password)
self.credentials = Credentials(SIPURI(user=self.id.username, host=self.id.domain, display=self.display_name), password=self.password)
def __init__(self, id): self.id = id self.contact = None self.credentials = Credentials(SIPURI(user=self.id.username, host=self.id.domain, display_name=self.display_name), password=self.password)
516fe244fb849ba2174488f96e73ebc528a14274 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/516fe244fb849ba2174488f96e73ebc528a14274/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 612, 4672, 365, 18, 350, 273, 612, 365, 18, 8994, 273, 599, 365, 18, 11687, 273, 14582, 12, 17739, 3098, 12, 1355, 33, 2890, 18, 350, 18, 5053, 16, 147...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 612, 4672, 365, 18, 350, 273, 612, 365, 18, 8994, 273, 599, 365, 18, 11687, 273, 14582, 12, 17739, 3098, 12, 1355, 33, 2890, 18, 350, 18, 5053, 16, 147...
context = self.get_context(node, local_context)
context = self.get_context(function, local_context)
def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and (not 'eval' in value or not 'search' in value): raise YamlImportException('You must provide a "model" and an "eval" or "search" to evaluate.') value_model = self.get_model(value['model']) local_context = {'ref': self._ref, '_ref': self._ref} local_context['obj'] = lambda x: value_model.browse(self.cr, self.uid, x, context=context) local_context.update(self.id_map) id = eval(value['eval'], local_context) if id != None: args.append(id) model = self.get_model(function.model) method = function.name getattr(model, method)(self.cr, self.uid, *args)
84419e2509a89c4ae5e7503f4d22f44434009e0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/84419e2509a89c4ae5e7503f4d22f44434009e0c/yaml_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 915, 12, 2890, 16, 756, 4672, 309, 365, 18, 3188, 480, 296, 2738, 4278, 327, 445, 16, 924, 273, 756, 18, 3319, 1435, 63, 20, 65, 1191, 67, 2472, 273, 13666, 1734, 4278, 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, 1207, 67, 915, 12, 2890, 16, 756, 4672, 309, 365, 18, 3188, 480, 296, 2738, 4278, 327, 445, 16, 924, 273, 756, 18, 3319, 1435, 63, 20, 65, 1191, 67, 2472, 273, 13666, 1734, 4278, 365...
os.fsync(f.fileno())
if hasattr(os, 'fsync'): os.fsync(f.fileno())
def _sync_flush(f): """Ensure changes to file f are physically on disk.""" f.flush() os.fsync(f.fileno())
e6f55d9836e577a90e567b37bb44eaefb3c8a21b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e6f55d9836e577a90e567b37bb44eaefb3c8a21b/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8389, 67, 11330, 12, 74, 4672, 3536, 12512, 3478, 358, 585, 284, 854, 24758, 6478, 603, 4234, 12123, 284, 18, 11330, 1435, 309, 3859, 12, 538, 16, 296, 2556, 1209, 11, 4672, 1140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8389, 67, 11330, 12, 74, 4672, 3536, 12512, 3478, 358, 585, 284, 854, 24758, 6478, 603, 4234, 12123, 284, 18, 11330, 1435, 309, 3859, 12, 538, 16, 296, 2556, 1209, 11, 4672, 1140, ...
sage: c = maple._commands()
sage: c = maple._commands()
def _commands(self): """ Return list of all commands defined in Maple.
62d5fe0b6da169e0f6852637b1d028893ff65619 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/62d5fe0b6da169e0f6852637b1d028893ff65619/maple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7847, 12, 2890, 4672, 3536, 2000, 666, 434, 777, 4364, 2553, 316, 1635, 298, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 389, 7847, 12, 2890, 4672, 3536, 2000, 666, 434, 777, 4364, 2553, 316, 1635, 298, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
manager.add_shortcut('ipython', '<ctrl>i', 'IPython', 'Toggle IPython', show_ipython) manager.add_shortcut('run-current-code', '<ctrl>r', 'IPython', 'Send current line or selection in IPython', run_code)
manager.add_shortcut('ipython', '<ctrl>i', 'IPython', 'Toggle IPython console', show_ipython) manager.add_shortcut('run-current-code', '<ctrl>r', 'IPython', 'Send current line or selection to IPython', send_code)
def init(manager): manager.add_shortcut('ipython', '<ctrl>i', 'IPython', 'Toggle IPython', show_ipython) manager.add_shortcut('run-current-code', '<ctrl>r', 'IPython', 'Send current line or selection in IPython', run_code) manager.add_shortcut('run-code-file', 'F6', 'IPython', 'Run current file in IPython', run_file) manager.add_shortcut('restart-ipython', '<ctrl><shift>i','IPython', 'Restart IPython', restart_ipython)
85b66c2aafefa4a2d2ab8d92722b9c5c4a52b5db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/85b66c2aafefa4a2d2ab8d92722b9c5c4a52b5db/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 4181, 4672, 3301, 18, 1289, 67, 24744, 2668, 9126, 3041, 2187, 2368, 16277, 34, 77, 2187, 296, 2579, 18490, 2187, 296, 17986, 26085, 2983, 2187, 2405, 67, 9126, 3041, 13, 3301, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4181, 4672, 3301, 18, 1289, 67, 24744, 2668, 9126, 3041, 2187, 2368, 16277, 34, 77, 2187, 296, 2579, 18490, 2187, 296, 17986, 26085, 2983, 2187, 2405, 67, 9126, 3041, 13, 3301, ...
'--nodeps',
def build_package(pkgatom): proc = subprocess.call([ 'emerge', '--nodeps', '--nospinner', '--verbose', '--oneshot', pkgatom ]) if proc != os.EX_OK: bug_report(pkgatom) return False return True
c51ba60c8826cc86748400edf41a8edb17be64f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10378/c51ba60c8826cc86748400edf41a8edb17be64f5/tinderbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5610, 12, 10657, 7466, 4672, 5418, 273, 6652, 18, 1991, 3816, 296, 351, 1583, 2187, 225, 3534, 18050, 84, 7872, 2187, 3534, 11369, 2187, 3534, 265, 4607, 352, 2187, 3475, 7466, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5610, 12, 10657, 7466, 4672, 5418, 273, 6652, 18, 1991, 3816, 296, 351, 1583, 2187, 225, 3534, 18050, 84, 7872, 2187, 3534, 11369, 2187, 3534, 265, 4607, 352, 2187, 3475, 7466, ...
low = get_date(limits[0]) high = get_date(limits[1])
low = get_datetime(limits[0]) high = get_datetime(limits[1])
def get_date_range(var): "Returns the two dates contained as a low,high tuple" limits = string.split(var, ",") if len(limits)==1: low = get_date(limits[0]) return low,None if len(limits)==2: low = get_date(limits[0]) high = get_date(limits[1]) return low,high
8e7fb32e3762f5a28ad3e571a423fcd17ceb818e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/8e7fb32e3762f5a28ad3e571a423fcd17ceb818e/bibrank_word_indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 712, 67, 3676, 12, 1401, 4672, 315, 1356, 326, 2795, 7811, 7542, 487, 279, 4587, 16, 8766, 3193, 6, 8181, 273, 533, 18, 4939, 12, 1401, 16, 5753, 13, 309, 562, 12, 14270, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 712, 67, 3676, 12, 1401, 4672, 315, 1356, 326, 2795, 7811, 7542, 487, 279, 4587, 16, 8766, 3193, 6, 8181, 273, 533, 18, 4939, 12, 1401, 16, 5753, 13, 309, 562, 12, 14270, 13...
class GoogleBug:
class GoogleBug(object):
def get_google_issue_entries(client, google_name, query=None): if query is None: feed = client.get_issues(google_name) else: feed = client.get_issues(google_name, query=query) return feed.entry
6b3118091b9d4f10323f000aea1047fd79bccbc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/6b3118091b9d4f10323f000aea1047fd79bccbc4/google.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9536, 67, 13882, 67, 8219, 12, 2625, 16, 5200, 67, 529, 16, 843, 33, 7036, 4672, 309, 843, 353, 599, 30, 4746, 273, 1004, 18, 588, 67, 9618, 12, 9536, 67, 529, 13, 469, 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, 336, 67, 9536, 67, 13882, 67, 8219, 12, 2625, 16, 5200, 67, 529, 16, 843, 33, 7036, 4672, 309, 843, 353, 599, 30, 4746, 273, 1004, 18, 588, 67, 9618, 12, 9536, 67, 529, 13, 469, 30...
SELECT share_id, shares.tree_id, shares.protocol, hostname, port, scan_command
SELECT share_id, tree_id, hash, shares.protocol, hostname, port, scan_command
def scan_share(db, share_id, proto, host, port, tree_id, command): cursor = db.cursor() hoststr = sharestr(proto, host, port) savepath = share_save_path(proto, host, port) patchmode = tree_id != None and os.path.isfile(savepath) address = socket.gethostbyname(host) log("Scanning %s (%s) ...", (hoststr, address)) start = datetime.datetime.now() if patchmode: data = run_scanner(command, address, proto, port, "-u " + quote_for_shell(savepath)) else: data = run_scanner(command, address, proto, port) save = tempfile.TemporaryFile(bufsize=-1) line_count = 0 line_count_patch = 0 for line in data.stdout: line_count += 1 if line[0] in ('+', '-', '*'): line_count_patch += 1 if line_count > max_lines_from_scanner: kill_process(data) data.stdout.close() data.wait() log("Scanning %s failed. Too many lines from scanner (elapsed time %s).", (hoststr, datetime.datetime.now() - start)) return save.write(line) if data.wait() != 0: # assume next_scan is far away from now and we do not have to # acquire lock on the shares table again cursor.execute(""" UPDATE shares SET next_scan = now() + %(w)s WHERE share_id = %(s)s; """, {'s':share_id, 'w': wait_until_next_scan_failed}) log("Scanning %s failed (elapsed time %s).", (hoststr, datetime.datetime.now() - start)) return if patchmode and (line_count_patch > (line_count - line_count_patch) / patch_fallback): log("Patch is too long for %s (patch %s, non-patch %s). Fallback to non-patching mode", (hoststr, line_count_patch, line_count - line_count_patch)) patchmode = False db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_READ_COMMITTED) scan_time = datetime.datetime.now() - start start = datetime.datetime.now() if tree_id is None: cursor.execute("INSERT INTO trees (share_id) VALUES (%(s)s) RETURNING tree_id", {'s':share_id}) tree_id = cursor.fetchone()['tree_id'] qcache = PsycoCache(cursor) paths_buffer = dict() save.seek(0) if patchmode: for line in save: if line[0] not in ('+', '-', '*'): break scan_line_patch(cursor, tree_id, line.strip('\n'), qcache, paths_buffer) else: cursor.execute("DELETE FROM paths WHERE tree_id = %(t)s", {'t':tree_id}) for line in save: if line[0] in ('+', '-', '*'): continue scan_line(cursor, tree_id, line.strip('\n'), qcache, paths_buffer) qcache.allcommit() try: save.seek(0) file = open(savepath, 'w') shutil.copyfileobj(save, file) file.close() except: log("Failed to save contents of %s to file %s.", (hoststr, savepath)) save.close() cursor.execute(""" UPDATE shares SET tree_id = %(t)s, last_scan = now() WHERE share_id = %(s)s; """, {'s': share_id, 't': tree_id}) if qcache.totalsize >= 0: cursor.execute(""" UPDATE shares SET size = %(sz)s WHERE share_id = %(s)s; """, {'s':share_id, 'sz': qcache.totalsize}) db.commit() if patchmode: deleted = qcache.stat_pdelete + qcache.stat_fdelete added = qcache.stat_padd + qcache.stat_fadd modified = qcache.stat_fmodify log("Scanning %s succeded. Database updated in patching mode: delete %s, add %s, modify %s (scan time %s, update time %s).", (hoststr, str(deleted), str(added), str(modified), scan_time, datetime.datetime.now() - start)) else: log("Scanning %s succeded. Database updated in non-patching mode (scan time %s, update time %s).", (hoststr, scan_time, datetime.datetime.now() - start))
5ebc594182d5001f460d9b2bacaa20cc20b426a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/5ebc594182d5001f460d9b2bacaa20cc20b426a7/spider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 14419, 12, 1966, 16, 7433, 67, 350, 16, 3760, 16, 1479, 16, 1756, 16, 2151, 67, 350, 16, 1296, 4672, 3347, 273, 1319, 18, 9216, 1435, 1479, 701, 273, 24123, 313, 12, 9393, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 67, 14419, 12, 1966, 16, 7433, 67, 350, 16, 3760, 16, 1479, 16, 1756, 16, 2151, 67, 350, 16, 1296, 4672, 3347, 273, 1319, 18, 9216, 1435, 1479, 701, 273, 24123, 313, 12, 9393, ...
priority:: An integer value. See get_thread_priority() documentation for a list of legal values.
@param priority:: An integer value. See get_thread_priority() documentation for a list of legal values.
def set_thread_priority(priority): """ priority:: An integer value. See get_thread_priority() documentation for a list of legal values. """ pass
88b8a1bd1deaae376f22144e433e9a82abe1b629 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12774/88b8a1bd1deaae376f22144e433e9a82abe1b629/miso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 5930, 67, 8457, 12, 8457, 4672, 3536, 632, 891, 4394, 2866, 1922, 3571, 460, 18, 2164, 336, 67, 5930, 67, 8457, 1435, 7323, 364, 279, 666, 434, 19286, 924, 18, 3536, 1342, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 5930, 67, 8457, 12, 8457, 4672, 3536, 632, 891, 4394, 2866, 1922, 3571, 460, 18, 2164, 336, 67, 5930, 67, 8457, 1435, 7323, 364, 279, 666, 434, 19286, 924, 18, 3536, 1342, 225...
if self.freq <> other.freq:
if self.freq != other.freq:
def __cmp__(self, other): if self.freq <> other.freq: raise TypeError("frequencies are not equal!") return int(self)-int(other)
c207acc5c7f49d5bd86329331c20462583407dd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c207acc5c7f49d5bd86329331c20462583407dd3/tsdate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 309, 365, 18, 10212, 480, 1308, 18, 10212, 30, 1002, 3580, 2932, 74, 26387, 854, 486, 3959, 4442, 13, 327, 509, 12, 2890, 24950, 474, 12, 301...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 309, 365, 18, 10212, 480, 1308, 18, 10212, 30, 1002, 3580, 2932, 74, 26387, 854, 486, 3959, 4442, 13, 327, 509, 12, 2890, 24950, 474, 12, 301...
if DEBUG: print 'Entry (2): >%s<' % text
def DrawMenu_Selection(self, menuw, settings, x0, y0, width, height): val = settings menu = menuw.menustack[-1]
36486eb675bd71f34f0bc633ac672c9bb25397f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/36486eb675bd71f34f0bc633ac672c9bb25397f5/skin_main1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4599, 67, 6233, 12, 2890, 16, 3824, 91, 16, 1947, 16, 619, 20, 16, 677, 20, 16, 1835, 16, 2072, 4672, 1244, 273, 1947, 3824, 273, 3824, 91, 18, 27617, 641, 484, 18919, 21, 65,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10184, 4599, 67, 6233, 12, 2890, 16, 3824, 91, 16, 1947, 16, 619, 20, 16, 677, 20, 16, 1835, 16, 2072, 4672, 1244, 273, 1947, 3824, 273, 3824, 91, 18, 27617, 641, 484, 18919, 21, 65,...
if not (user.is_superuser or key_edit.user==user):
form, user_cmp = None, request.user if not key_id: form = SSHKeyForm() else: key_edit = get_object_or_404(SSHKey, pk=key_id) form = SSHKeyForm(instance=key_edit) user_cmp = key_edit.user if not (user.is_superuser or user_cmp==user):
def key_ajax_get(request, key_id=None): if request.is_ajax: key_edit = get_object_or_404(SSHKey, pk=key_id) user = request.user if not (user.is_superuser or key_edit.user==user): return HttpResponseForbidden("Only superuser or owner can get user's SSH key.") return HttpResponse(key_edit.key) return HttpResponse("Cannot retrieve information")
de7079f3b6ba425af07463ca7c80d015c628b16b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/de7079f3b6ba425af07463ca7c80d015c628b16b/users.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 12813, 67, 588, 12, 2293, 16, 498, 67, 350, 33, 7036, 4672, 309, 590, 18, 291, 67, 12813, 30, 498, 67, 4619, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 12559, 653, 16, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 12813, 67, 588, 12, 2293, 16, 498, 67, 350, 33, 7036, 4672, 309, 590, 18, 291, 67, 12813, 30, 498, 67, 4619, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 12559, 653, 16, 23...
def __init__(self, rect, parent = None, areaBorder = 2, resizeBorder = 5): QtGui.QGraphicsRectItem.__init__(self, rect)
def __init__(self, rect, parent = None, scene = None, areaBorder = 2, resizeBorder = 5): QtGui.QGraphicsRectItem.__init__(self, rect, parent, scene)
def __init__(self, rect, parent = None, areaBorder = 2, resizeBorder = 5): QtGui.QGraphicsRectItem.__init__(self, rect)
02f4a6c73b42867905faef46b7958e062e0a5f7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2085/02f4a6c73b42867905faef46b7958e062e0a5f7b/ocrwidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4917, 16, 982, 273, 599, 16, 5091, 8107, 273, 576, 16, 7041, 8107, 273, 1381, 4672, 23425, 18, 53, 17558, 6120, 1180, 16186, 2738, 972, 12, 2890, 16, 491...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 4917, 16, 982, 273, 599, 16, 5091, 8107, 273, 576, 16, 7041, 8107, 273, 1381, 4672, 23425, 18, 53, 17558, 6120, 1180, 16186, 2738, 972, 12, 2890, 16, 491...
yi = ff.replace("pi",repr(RR(pi))) yi = sage_eval(yi.replace("x",repr(xi)))
yi = ff(xi)
def plot_fourier_series_partial_sum_cesaro(self,N,L,xmin,xmax, **kwds): r""" Plots the partial sum \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N (1-n/N)*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] over xmin < x < xmin. This is a "smoother" partial sum - the Gibbs phenomenon is mollified.
5168ece748a266be5681974a91884400b5d9f02c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/5168ece748a266be5681974a91884400b5d9f02c/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 74, 24775, 67, 10222, 67, 11601, 67, 1364, 67, 764, 14349, 12, 2890, 16, 50, 16, 48, 16, 92, 1154, 16, 92, 1896, 16, 2826, 25577, 4672, 436, 8395, 3008, 6968, 326, 4702, 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, 3207, 67, 74, 24775, 67, 10222, 67, 11601, 67, 1364, 67, 764, 14349, 12, 2890, 16, 50, 16, 48, 16, 92, 1154, 16, 92, 1896, 16, 2826, 25577, 4672, 436, 8395, 3008, 6968, 326, 4702, 21...
insertValueList.append("( %d,'%s' )" % (dirID,meta) ) req = "INSERT INTO FC_Meta_%s (DirID,Value) VALUES %s" % (metaname,', '.join(insertValueList) ) result = self._update(req) if not result['OK']: return result
insertValueList.append( "( %d,'%s' )" % ( dirID, meta ) ) req = "INSERT INTO FC_Meta_%s (DirID,Value) VALUES %s" % ( metaname, ', '.join( insertValueList ) ) result = self._update( req ) if not result['OK']: return result
def __transformMetaParameterToData(self,metaname): """ Relocate the meta parameters of all the directories to the corresponding indexed metadata table """ req = "SELECT DirID,MetaValue from FC_DirMeta WHERE MetaKey='%s'" % metaname result = self._query(req) if not result['OK']: return result if not result['Value']: return S_OK() dirDict = {} for dirID,meta in result['Value']: dirDict[dirID] = meta dirList = dirDict.keys() # Exclude child directories from the list for dirID in dirList: result = self.dtree.getSubdirectoriesByID(dirID) if not result['OK']: return result if not result['Value']: continue childIDs = result['Value'].keys() for childID in childIDs: if childID in dirList: del dirList[dirList.index(childID)] insertValueList = [] for dirID in dirList: insertValueList.append("( %d,'%s' )" % (dirID,meta) ) req = "INSERT INTO FC_Meta_%s (DirID,Value) VALUES %s" % (metaname,', '.join(insertValueList) ) result = self._update(req) if not result['OK']: return result req = "DELETE FROM FC_DirMeta WHERE MetaKey='%s'" % metaname result = self._update(req) return result
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6547, 2781, 1662, 774, 751, 12, 2890, 16, 10578, 304, 339, 4672, 3536, 4275, 504, 340, 326, 2191, 1472, 434, 777, 326, 6402, 358, 326, 4656, 8808, 1982, 1014, 3536, 225, 1111, 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, 1001, 6547, 2781, 1662, 774, 751, 12, 2890, 16, 10578, 304, 339, 4672, 3536, 4275, 504, 340, 326, 2191, 1472, 434, 777, 326, 6402, 358, 326, 4656, 8808, 1982, 1014, 3536, 225, 1111, 273,...
raise MnetError("Incorrect checksum: %s" % retPacket)
raise MnetError("Incorrect checksum: %s" % pktInfo)
def mnetSend(self, data, source=10, destination=2, timeout=0.2): """Sends a packet in the Citizen Explorer 'micronet' format, receives and validates a response, and returns the data. All data is expressed as a list of byte values.
7b5529a2ac0d4d2f9f85f3fad2d0a08789300cd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/7b5529a2ac0d4d2f9f85f3fad2d0a08789300cd6/board.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 2758, 3826, 12, 2890, 16, 501, 16, 1084, 33, 2163, 16, 2929, 33, 22, 16, 2021, 33, 20, 18, 22, 4672, 3536, 10501, 279, 4414, 316, 326, 385, 305, 452, 275, 1312, 11766, 296, 2759...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 2758, 3826, 12, 2890, 16, 501, 16, 1084, 33, 2163, 16, 2929, 33, 22, 16, 2021, 33, 20, 18, 22, 4672, 3536, 10501, 279, 4414, 316, 326, 385, 305, 452, 275, 1312, 11766, 296, 2759...
curses.delay_output(400)
time.sleep(0.4)
def tracktorpedo(w, l, i, n, iquad): "Torpedo-track animation." if not game.options & OPTION_CURSES: if l == 1: if n != 1: skip(1) proutn(_("Track for torpedo number %d- ") % i) else: skip(1) proutn(_("Torpedo track- ")) elif l==4 or l==9: skip(1) proutn("%d - %d " % (w.x, w.y)) else: if not damaged(DSRSENS) or game.condition=="docked": if i != 1 and l == 1: drawmaps(2) curses.delay_output(400) if (iquad==IHDOT) or (iquad==IHBLANK): put_srscan_sym(w, '+') #sound(l*10) #curses.delay_output(100) #nosound() put_srscan_sym(w, iquad) else: curwnd.attron(curses.A_REVERSE) put_srscan_sym(w, iquad) #sound(500) #curses.delay_output(1000) #nosound() curwnd.attroff(curses.A_REVERSE) put_srscan_sym(w, iquad) else: proutn("%d - %d " % (w.x, w.y))
b1c9c5334f08ac7846e441ce750b7e9ad119b37d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/b1c9c5334f08ac7846e441ce750b7e9ad119b37d/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3298, 13039, 1845, 83, 12, 91, 16, 328, 16, 277, 16, 290, 16, 277, 21733, 4672, 315, 27266, 1845, 83, 17, 4101, 8794, 1199, 309, 486, 7920, 18, 2116, 473, 7845, 67, 7509, 1090, 55, 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, 3298, 13039, 1845, 83, 12, 91, 16, 328, 16, 277, 16, 290, 16, 277, 21733, 4672, 315, 27266, 1845, 83, 17, 4101, 8794, 1199, 309, 486, 7920, 18, 2116, 473, 7845, 67, 7509, 1090, 55, 3...
filtered = wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, data, 'filter', attrs)
filtered += wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, data, 'filter', attrs)
def _main(): fname = sys.argv[1] if fname=="-": f = sys.stdin else: f = file(fname) import wc, time wc.config = wc.Configuration() # set debug level wc.set_debuglevel(wc.HURT_ME_PLENTY) wc.config['filters'] = ['Replacer', 'Rewriter', 'BinaryCharFilter'] wc.config.init_filter_modules() from wc.proxy import proxy_poll, run_timers from wc.filter import FilterException attrs = wc.filter.initStateObjects(url=fname) filtered = "" data = f.read(1024) while data: try: filtered = wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, data, 'filter', attrs) except FilterException, msg: pass data = f.read(1024) i = 1 while 1: try: filtered = wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, "", 'finish', attrs) break except FilterException, msg: print "Test: finish: exception:", msg proxy_poll(timeout=max(0, run_timers())) i+=1 if i==99: print "Test: oooooops" break print filtered
595daecc5983d5fcc29db04a559a669a213d19b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/595daecc5983d5fcc29db04a559a669a213d19b9/filterfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5254, 13332, 5299, 273, 2589, 18, 19485, 63, 21, 65, 309, 5299, 31713, 17, 6877, 284, 273, 2589, 18, 21772, 469, 30, 284, 273, 585, 12, 12749, 13, 1930, 14310, 16, 813, 14310, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5254, 13332, 5299, 273, 2589, 18, 19485, 63, 21, 65, 309, 5299, 31713, 17, 6877, 284, 273, 2589, 18, 21772, 469, 30, 284, 273, 585, 12, 12749, 13, 1930, 14310, 16, 813, 14310, 18,...
return unicode(self.text()).lower() >= unicode(other.text()).lower()
return sort_key(unicode(self.text())) >= sort_key(unicode(other.text()))
def __ge__(self, other): return unicode(self.text()).lower() >= unicode(other.text()).lower()
0ac81d2c14ecbb444a2f2681fe9d408526d93e27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/0ac81d2c14ecbb444a2f2681fe9d408526d93e27/edit_authors_dialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 908, 972, 12, 2890, 16, 1308, 4672, 327, 5252, 12, 2890, 18, 955, 1435, 2934, 8167, 1435, 1545, 5252, 12, 3011, 18, 955, 1435, 2934, 8167, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 908, 972, 12, 2890, 16, 1308, 4672, 327, 5252, 12, 2890, 18, 955, 1435, 2934, 8167, 1435, 1545, 5252, 12, 3011, 18, 955, 1435, 2934, 8167, 1435, 2, -100, -100, -100, -100, -100, ...
if sys.argv[-1] == "Release":
if sys.argv[1] == "Release":
def main(): build_all = "-a" in sys.argv if sys.argv[-1] == "Release": arch = "x86" debug = False configure = "VC-WIN32" makefile = "32.mak" elif sys.argv[-1] == "Debug": arch = "x86" debug = True configure = "VC-WIN32" makefile="d32.mak" elif sys.argv[-1] == "ReleaseItanium": arch = "ia64" debug = False configure = "VC-WIN64I" do_script = "ms\\do_win64i" makefile = "ms\\nt.mak" os.environ["VSEXTCOMP_USECL"] = "MS_ITANIUM" elif sys.argv[-1] == "ReleaseAMD64": arch="amd64" debug=False configure = "VC-WIN64A" do_script = "ms\\do_win64a" makefile = "ms\\nt.mak" os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON" make_flags = "" if build_all: make_flags = "-a" # perl should be on the path, but we also look in "\perl" and "c:\\perl" # as "well known" locations perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"]) perl = find_working_perl(perls) if perl is None: sys.exit(1) print "Found a working perl at '%s'" % (perl,) # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live. ssl_dir = find_best_ssl_dir(("../..",)) if ssl_dir is None: sys.exit(1) old_cd = os.getcwd() try: os.chdir(ssl_dir) # If the ssl makefiles do not exist, we invoke Perl to generate them. if not os.path.isfile(makefile): print "Creating the makefiles..." # Put our working Perl at the front of our path os.environ["PATH"] = os.path.split(perl)[0] + \ os.pathsep + \ os.environ["PATH"] if arch=="x86": run_32all_py() else: run_configure(configure, do_script) # Now run make. print "Executing nmake over the ssl makefiles..." rc = os.system("nmake /nologo -f "+makefile) if rc: print "Executing d32.mak failed" print rc sys.exit(rc) finally: os.chdir(old_cd) # And finally, we can build the _ssl module itself for Python. defs = "SSL_DIR=%s" % (ssl_dir,) if debug: defs = defs + " " + "DEBUG=1" rc = os.system('nmake /nologo -f _ssl.mak ' + defs + " " + make_flags) sys.exit(rc)
876cfbc0b80700e514befb9c03e37c5b7273cb6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/876cfbc0b80700e514befb9c03e37c5b7273cb6c/build_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 6637, 273, 315, 92, 5292, 6, 1198, 273, 1083, 5068, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 6637, 273, 315, 92, 5292, 6, 1198, 273, 1083, 5068, 273, 3...
self.assertTrue(len(impage.text) <= 200)
self.assertTrue(impage._imageinfo["size"] <= 2000)
def testAllImages(self): """Test the site.allimages() method"""
b386c763dfa286fcd1988dabcc7a358d4afe10b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9005/b386c763dfa286fcd1988dabcc7a358d4afe10b8/site_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1595, 8946, 12, 2890, 4672, 3536, 4709, 326, 2834, 18, 454, 7369, 1435, 707, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 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, 1842, 1595, 8946, 12, 2890, 4672, 3536, 4709, 326, 2834, 18, 454, 7369, 1435, 707, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'broken sort', self._objectlist, attribute, order
def _on_configuration_changed(self, *k): order_descending = self._order_button.get_active() if order_descending: order = gtk.SORT_DESCENDING else: order = gtk.SORT_ASCENDING attribute = self._proxy.read()
b9c466169462bb506f4ba12050d3993b30b3ff15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11322/b9c466169462bb506f4ba12050d3993b30b3ff15/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 7025, 67, 6703, 12, 2890, 16, 380, 79, 4672, 1353, 67, 5569, 2846, 273, 365, 6315, 1019, 67, 5391, 18, 588, 67, 3535, 1435, 309, 1353, 67, 5569, 2846, 30, 1353, 273, 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, 389, 265, 67, 7025, 67, 6703, 12, 2890, 16, 380, 79, 4672, 1353, 67, 5569, 2846, 273, 365, 6315, 1019, 67, 5391, 18, 588, 67, 3535, 1435, 309, 1353, 67, 5569, 2846, 30, 1353, 273, 22...
list -- list of EllpticCurve objects.
list -- list of EllipticCurve objects.
def isogeny_class(self, label): """ Returns the isogeny class of elliptic curves that are isogeneous to the curve with given Cremona label. INPUT: label -- string OUTPUT: list -- list of EllpticCurve objects. """ conductor, iso, num = parse_cremona_label(label) A = self.allcurves(conductor) K = [k for k in A.keys() if k[:len(iso)] == iso and k[len(iso)].isdigit()] return [self.elliptic_curve(str(conductor) + id) for id in K]
744afc21f8d5aaa26af78f056bca854defd17092 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/744afc21f8d5aaa26af78f056bca854defd17092/cremona.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 19409, 93, 67, 1106, 12, 2890, 16, 1433, 4672, 3536, 2860, 326, 353, 19409, 93, 667, 434, 415, 549, 21507, 24106, 716, 854, 353, 30075, 1481, 358, 326, 8882, 598, 864, 5799, 2586, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19409, 93, 67, 1106, 12, 2890, 16, 1433, 4672, 3536, 2860, 326, 353, 19409, 93, 667, 434, 415, 549, 21507, 24106, 716, 854, 353, 30075, 1481, 358, 326, 8882, 598, 864, 5799, 2586, ...
class Continue (object):
class Continue (Continuation): def __init__ (self, finalizations): self.__call__, self.continued = continuation ( finalizations )
def continuation (finalizations): "combines continuations into one execution path" i = iter (finalizations) first = continued = i.next () try: while True: continued.finalization = i.next () continued = continued.finalization except StopIteration: pass return first, continued
fd0817d4b515a4b7b82c4afd19f8e7c14a772283 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/fd0817d4b515a4b7b82c4afd19f8e7c14a772283/finalization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17378, 261, 6385, 7089, 4672, 315, 9301, 1465, 9985, 1012, 1368, 1245, 4588, 589, 6, 277, 273, 1400, 261, 6385, 7089, 13, 1122, 273, 17545, 5957, 273, 277, 18, 4285, 1832, 775, 30, 1323,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17378, 261, 6385, 7089, 4672, 315, 9301, 1465, 9985, 1012, 1368, 1245, 4588, 589, 6, 277, 273, 1400, 261, 6385, 7089, 13, 1122, 273, 17545, 5957, 273, 277, 18, 4285, 1832, 775, 30, 1323,...
self.state = 'parse' self.script = '' self.waited = 0 self.rulestack = []
def __init__ (self, rules, url, **opts): if wc.config['showerrors']: self.error = self._error self.warning = self._warning self.fatalError = self._fatalError HtmlParser.__init__(self) self.rules = rules self.comments = opts['comments'] self.javascript = opts['javascript'] self.outbuf = StringIO() self.inbuf = StringIO() self.waitbuf = [] self.state = 'parse' self.script = '' self.waited = 0 self.rulestack = [] self.buf = [] self.url = url or "unknown" if self.javascript: self.jsEnv = jslib.new_jsenv() self.output_counter = 0 self.popup_counter = 0
475def66113a258d59f287a283585f27e07dd77a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/475def66113a258d59f287a283585f27e07dd77a/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2931, 16, 880, 16, 2826, 4952, 4672, 309, 14310, 18, 1425, 3292, 4500, 4324, 3546, 30, 365, 18, 1636, 273, 365, 6315, 1636, 365, 18, 8551, 273, 365, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2931, 16, 880, 16, 2826, 4952, 4672, 309, 14310, 18, 1425, 3292, 4500, 4324, 3546, 30, 365, 18, 1636, 273, 365, 6315, 1636, 365, 18, 8551, 273, 365, 631...
cmd = self.ttype2cmd.get(ttype) while cmd is None:
styles = [] while ttype is not Token: try: styles.append(t2n[ttype]) except KeyError: styles.append(_get_ttype_name(ttype))
def format(self, tokensource, outfile): # TODO: add support for background colors enc = self.encoding
23174d003ddef264e12aea8db04492915ff167fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2885/23174d003ddef264e12aea8db04492915ff167fc/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 2430, 552, 16, 8756, 4672, 468, 2660, 30, 527, 2865, 364, 5412, 5740, 2446, 273, 365, 18, 5999, 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, 740, 12, 2890, 16, 2430, 552, 16, 8756, 4672, 468, 2660, 30, 527, 2865, 364, 5412, 5740, 2446, 273, 365, 18, 5999, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.post is None: redirect('..')
def index(self, version=None, **kw): if self.post is None: redirect('..') c.post = self.W.post if request.method == 'POST': require(has_artifact_access('moderate', self.post)) post_fields = self.W.edit_post.validate(kw, None) for k,v in post_fields.iteritems(): try: setattr(self.post, k, v) except AttributeError: continue redirect(request.referer) elif request.method=='GET': if version is not None: HC = self.post.__mongometa__.history_class ss = HC.query.find({'artifact_id':self.post._id, 'version':int(version)}).first() if not ss: raise exc.HTTPNotFound post = Object( ss.data, acl=self.post.acl, author=self.post.author, url=self.post.url, thread=self.post.thread, reply_subject=self.post.reply_subject, attachments=self.post.attachments, ) else: post=self.post return dict(discussion=self.post.discussion, post=post)
86872890fe294bc9d746719d4be1c1be7c060063 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/86872890fe294bc9d746719d4be1c1be7c060063/discuss.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 16, 1177, 33, 7036, 16, 2826, 9987, 4672, 276, 18, 2767, 273, 365, 18, 59, 18, 2767, 309, 590, 18, 2039, 422, 296, 3798, 4278, 2583, 12, 5332, 67, 17706, 67, 3860, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 16, 1177, 33, 7036, 16, 2826, 9987, 4672, 276, 18, 2767, 273, 365, 18, 59, 18, 2767, 309, 590, 18, 2039, 422, 296, 3798, 4278, 2583, 12, 5332, 67, 17706, 67, 3860, 266...
c1 = base_ring(a[0].lift() * (j+1) / (3*j + 5))
if p.divides(3*j + 5): c1 = base_ring(lift(a[0]) * (j+1) / (3*j + 5)) else: c1 = a[0] * (j+1) / (3*j + 5)
def reduce_positive(Q, coeffs, offset): """ Applies cohomology relations to incorporate positive powers of $y$ into the $y^0$ term. INPUT: Q -- cubic polynomial coeffs -- list of length 3 lists. The i^th list [a, b, c] represents $y^{2(i - offset)} (a + bx + cx^2) dx/y$. offset -- nonnegative integer OUTPUT: The reduction is performed in-place. The output is placed in coeffs[offset]. Note that coeffs[i] will be meaningless for i > offset after this function is finished. EXAMPLE: sage: R.<x> = Integers(5^3)['x'] sage: Q = x^3 - x + R(1/4) sage: coeffs = [[1, 2, 3], [10, 15, 20]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_positive(Q, coeffs, 0) sage: coeffs[0] [16, 102, 88] sage: coeffs = [[9, 8, 7], [10, 15, 20]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_positive(Q, coeffs, 0) sage: coeffs[0] [24, 108, 92] """ base_ring = Q.base_ring() next_a = coeffs[len(coeffs) - 1] Qa = Q[1] Qb = Q[0] A = 2*Qa B = 3*Qb for i in range(len(coeffs)-1, offset, -1): j = 2*(i-offset) - 2 a = next_a next_a = coeffs[i-1] a[0] = a[0] - Qa*a[2]/3 # subtract d(y^j + 1) # todo: see comments about pAdicInteger in reduceNegative() # subtract off c1 of d(x y^j + 1) c1 = base_ring(a[0].lift() * (j+1) / (3*j + 5)) # subtract off c2 of d(x^2 y^j + 1) c2 = base_ring(a[1].lift() * (j+1) / (3*j + 7)) next_a[0] = next_a[0] + B*c1 next_a[1] = next_a[1] + A*c1 + B*c2 next_a[2] = next_a[2] + A*c2 coeffs[int(offset)] = next_a
3596b006f3d4354e0ecd5702d8e8c91372a58ee1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3596b006f3d4354e0ecd5702d8e8c91372a58ee1/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 21094, 12, 53, 16, 16530, 16, 1384, 4672, 3536, 1716, 5259, 1825, 17125, 4676, 7467, 358, 316, 3850, 3831, 340, 6895, 7602, 414, 434, 271, 93, 8, 1368, 326, 271, 93, 66, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 21094, 12, 53, 16, 16530, 16, 1384, 4672, 3536, 1716, 5259, 1825, 17125, 4676, 7467, 358, 316, 3850, 3831, 340, 6895, 7602, 414, 434, 271, 93, 8, 1368, 326, 271, 93, 66, 20, ...
raise ValueError, "array-shape mismatch in array", k
raise ValueError, "array-shape mismatch in array %d" % k
def fromarrays(arrayList, dtype=None, shape=None, formats=None, names=None, titles=None, aligned=False, byteorder=None): """ create a record array from a (flat) list of arrays >>> x1=array([1,2,3,4]) >>> x2=array(['a','dd','xyz','12']) >>> x3=array([1.1,2,3,4]) >>> r=fromarrays([x1,x2,x3],names='a,b,c') >>> print r[1] (2, 'dd', 2.0) >>> x1[1]=34 >>> r.a array([1, 2, 3, 4]) """ arrayList = [sb.asarray(x) for x in arrayList] if shape is None or shape == 0: shape = arrayList[0].shape if isinstance(shape, int): shape = (shape,) if formats is None and dtype is None: # go through each object in the list to see if it is an ndarray # and determine the formats. formats = '' for obj in arrayList: if not isinstance(obj, sb.ndarray): raise ValueError, "item in the array list must be an ndarray." formats += _typestr[obj.dtype.type] if issubclass(obj.dtype.type, nt.flexible): formats += `obj.itemsize` formats += ',' formats=formats[:-1] if dtype is not None: descr = sb.dtype(dtype) _names = descr.names else: parsed = format_parser(formats, names, titles, aligned, byteorder) _names = parsed._names descr = parsed._descr # Determine shape from data-type. if len(descr) != len(arrayList): raise ValueError, "mismatch between the number of fields "\ "and the number of arrays" d0 = descr[0].shape nn = len(d0) if nn > 0: shape = shape[nn:] for k, obj in enumerate(arrayList): nn = len(descr[k].shape) if obj.shape[nn:] != shape: raise ValueError, "array-shape mismatch in array", k _array = recarray(shape, descr) # populate the record array (makes a copy) for i in range(len(arrayList)): _array[_names[i]] = arrayList[i] return _array
310966efbfb7641a0ee91ef79b3a21c2be2c32c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/310966efbfb7641a0ee91ef79b3a21c2be2c32c6/records.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 16223, 12, 1126, 682, 16, 3182, 33, 7036, 16, 2179, 33, 7036, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 13939, 33, 8381, 16, 1160, 1019, 33, 7036, 4672, 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, 628, 16223, 12, 1126, 682, 16, 3182, 33, 7036, 16, 2179, 33, 7036, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 13939, 33, 8381, 16, 1160, 1019, 33, 7036, 4672, 3...
clist = elistmap.keys() clist.insert(0, "")
clistmap = {} for mem in elistmap.keys(): mem = mem.split(os.sep) for i in range(len(mem)+1): p = os.sep.join(mem[0:i]) clistmap[p] = 0 clist = clistmap.keys()
def genCategories(self): config = self._request.getConfiguration() root = config["datadir"]
1eda3b23ba27e372d2bef7791a3d23465aaea000 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/1eda3b23ba27e372d2bef7791a3d23465aaea000/pycategories.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 10487, 12, 2890, 4672, 642, 273, 365, 6315, 2293, 18, 588, 1750, 1435, 1365, 273, 642, 9614, 3404, 361, 481, 11929, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3157, 10487, 12, 2890, 4672, 642, 273, 365, 6315, 2293, 18, 588, 1750, 1435, 1365, 273, 642, 9614, 3404, 361, 481, 11929, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if file_result[-1] not in modlist + \ [ignore.get('name') for ignore \ in inst.findall('Ignore')]:
if file_result[-1] not in modlist + ignores:
def VerifyPackage(self, entry, modlist, pinned_version=None): ''' Verify Package status for entry. Performs the following: - Checks for the presence of required Package Instances. - Compares the evra 'version' info against self.installed{}. - RPM level package verify (rpm --verify). - Checks for the presence of unrequired package instances.
ebdbc22d327a6c33794a0b62745bbbcb6893f943 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/ebdbc22d327a6c33794a0b62745bbbcb6893f943/RPMng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2261, 12, 2890, 16, 1241, 16, 681, 1098, 16, 26193, 67, 1589, 33, 7036, 4672, 9163, 8553, 7508, 1267, 364, 1241, 18, 27391, 326, 3751, 30, 300, 13074, 364, 326, 9805, 434, 1931, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2261, 12, 2890, 16, 1241, 16, 681, 1098, 16, 26193, 67, 1589, 33, 7036, 4672, 9163, 8553, 7508, 1267, 364, 1241, 18, 27391, 326, 3751, 30, 300, 13074, 364, 326, 9805, 434, 1931, ...
if not newtext and not prependtext and not appendtext:
if newtext == False and not prependtext and not appendtext:
def edit(self, newtext=False, prependtext=False, appendtext=False, summary=False, section=False, minor=False, bot=False, basetime=False, recreate=False, createonly=False, nocreate=False, watch=False, unwatch=False): """ Edit the page Most params are self-explanatory basetime - set this to the time you loaded the pagetext to avoid overwriting other people's edits in edit conflicts """ if not newtext and not prependtext and not appendtext: raise EditError("No text specified") if prependtext and section: raise EditError("Bad param combination") if createonly and nocreate: raise EditError("Bad param combination") token = self.getToken('edit') if newtext: hashtext = newtext elif prependtext and appendtext: hashtext = prependtext+appendtext elif prependtext: hashtext = prependtext else: hashtext = appendtext params = { 'action': 'edit', 'title':self.title, 'token':token, 'md5':md5(hashtext).hexdigest(), } if newtext: params['text'] = newtext if prependtext: params['prependtext'] = prependtext if appendtext: params['appendtext'] = appendtext if summary: params['summary'] = summary if section: params['section'] = section if self.section: params['section'] = self.section if minor: params['minor'] = '1' else: params['notminor'] = '1' if bot: params['bot'] = '1' if basetime: params['basetimestamp'] = basetime if recreate: params['recreate'] = '1' if createonly: params['createonly'] = '1' if nocreate: params['nocreate'] = '1' if watch: params['watch'] = '1' if unwatch: params['unwatch'] = '1' req = api.APIRequest(self.wiki, params, write=True) result = req.query() return result
23e103c93527353d7cc19dcdb7fc7d4d98a6d516 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8398/23e103c93527353d7cc19dcdb7fc7d4d98a6d516/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 12, 2890, 16, 394, 955, 33, 8381, 16, 8254, 955, 33, 8381, 16, 714, 955, 33, 8381, 16, 4916, 33, 8381, 16, 2442, 33, 8381, 16, 8439, 33, 8381, 16, 2512, 33, 8381, 16, 2580, 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, 3874, 12, 2890, 16, 394, 955, 33, 8381, 16, 8254, 955, 33, 8381, 16, 714, 955, 33, 8381, 16, 4916, 33, 8381, 16, 2442, 33, 8381, 16, 8439, 33, 8381, 16, 2512, 33, 8381, 16, 2580, 2...
value = self.value.split('.') self.value = struct.pack('!HH', int(value[0]), int(value[1]))
value = value.split('.') value = struct.pack('!HH', int(value[0]), int(value[1]))
def encode(self): # generate DMAP tagged data format # step 1 - find out what type of object we are if self.type == 'c': # our object is a container, # this means we're going to have to # check contains[] value = '' for item in self.contains: # get the data stream from each of the sub elements if type(item) == str: #preencoded value += item else: value += item.encode() # get the length of the data length = len(value) # pack: 4 byte code, 4 byte length, length bytes of value data = struct.pack('!4sI%ss' % length, self.code, length, value) return data else: # we don't have to traverse anything # to calculate the length and such # we want to encode the contents of # value for our value if self.type == 'v': value = self.value.split('.') self.value = struct.pack('!HH', int(value[0]), int(value[1])) packing = "4s" elif self.type == 'l': packing = 'q' elif self.type == 'ul': packing = 'Q' elif self.type == 'i': if (type(self.value) == str and len(self.value) <= 4): packing = '4s' else: packing = 'i' elif self.type == 'ui': packing = 'I' elif self.type == 'h': packing = 'h' elif self.type == 'uh': packing = 'H' elif self.type == 'b': packing = 'b' elif self.type == 'ub': packing = 'B' elif self.type == 't': packing = 'I' elif self.type == 's': packing = '%ss' % len(self.value) else: raise DAAPError('DAAPObject: encode: unknown code %s' % self.code) return value = self.value if type(value) == float: value = int(value) if type(value) == unicode: value = value.encode('utf-8') # calculate the length of what we're packing length = struct.calcsize('!%s' % packing) # pack: 4 characters for the code, 4 bytes for the length, and 'length' bytes for the value data = struct.pack('!4sI%s' % (packing), self.code, length, value) return data
f483eba74fc335f338ecc6c6548084738ca1473b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8691/f483eba74fc335f338ecc6c6548084738ca1473b/daap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 4672, 468, 2103, 463, 8352, 12503, 501, 740, 468, 2235, 404, 300, 1104, 596, 4121, 618, 434, 733, 732, 854, 309, 365, 18, 723, 422, 296, 71, 4278, 468, 3134, 733, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2890, 4672, 468, 2103, 463, 8352, 12503, 501, 740, 468, 2235, 404, 300, 1104, 596, 4121, 618, 434, 733, 732, 854, 309, 365, 18, 723, 422, 296, 71, 4278, 468, 3134, 733, 353, ...
MelBase('VNAM','_vnam','soundLevel'),
MelBase('VNAM','soundLevel'),
def loadData(self,record,ins,type,size,readId): if size == 136: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 124: #--Else 124 byte record (skips sightUsage, semiAutomaticFireDelayMin and semiAutomaticFireDelayMax... unpacked = ins.unpack('Iff4B5fI4BffII11fIIffI',size,readId) elif size == 120: #--Else 120 byte record (skips resistType, sightUsage, semiAutomaticFireDelayMin and semiAutomaticFireDelayMax... unpacked = ins.unpack('Iff4B5fI4BffII11fIIff',size,readId) else: raise "Unexpected size encountered for WEAP:DNAM subrecord: %s" % size unpacked += self.defaults[len(unpacked):] setter = record.__setattr__ for attr,value,action in zip(self.attrs,unpacked,self.actions): if callable(action): value = action(value) setter(attr,value) if self._debug: print unpacked
a615e8547fe5fe7615e4e9bc94e9cafa1925f9da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/a615e8547fe5fe7615e4e9bc94e9cafa1925f9da/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29422, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, 16, 896, 548, 4672, 309, 963, 422, 404, 5718, 30, 490, 292, 3823, 18, 945, 751, 12, 2890, 16, 3366, 16, 2679, 16, 723, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29422, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, 16, 896, 548, 4672, 309, 963, 422, 404, 5718, 30, 490, 292, 3823, 18, 945, 751, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1...
self.emit ("buffer-closed-event")
self._buffer_closed ()
def file_close(self, mi=None, event=None): self.chk_save () del self.entries.selected self.plugin.do_edit('getbufferlist') self.plugin.do_edit('getcurrentbuffer') self.emit ("buffer-closed-event")
ed500b819555108af67057bd24de252315b598d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/ed500b819555108af67057bd24de252315b598d2/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 4412, 12, 2890, 16, 12837, 33, 7036, 16, 871, 33, 7036, 4672, 365, 18, 27038, 67, 5688, 1832, 1464, 365, 18, 8219, 18, 8109, 365, 18, 4094, 18, 2896, 67, 4619, 2668, 588, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 4412, 12, 2890, 16, 12837, 33, 7036, 16, 871, 33, 7036, 4672, 365, 18, 27038, 67, 5688, 1832, 1464, 365, 18, 8219, 18, 8109, 365, 18, 4094, 18, 2896, 67, 4619, 2668, 588, 41...
_debug("Checking robot.txt allowance for:\n user agent: %s\n url: %s" %
_debug("Checking robots.txt allowance for:\n user agent: %s\n url: %s" %
def can_fetch(self, useragent, url): """using the parsed robots.txt decide if useragent can fetch url""" _debug("Checking robot.txt allowance for:\n user agent: %s\n url: %s" % (useragent, url)) if self.disallow_all: return False if self.allow_all: return True # search for given user agent matches # the first match counts url = urllib.quote(urlparse.urlparse(urllib.unquote(url))[2]) or "/" for entry in self.entries: if entry.applies_to(useragent): return entry.allowance(url) # try the default entry last if self.default_entry: return self.default_entry.allowance(url) # agent not found ==> access granted return True
2d95f1ad570791a5dffb16addd74b35b46f77fdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2d95f1ad570791a5dffb16addd74b35b46f77fdc/robotparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 5754, 12, 2890, 16, 22649, 16, 880, 4672, 3536, 9940, 326, 2707, 29255, 18, 5830, 16288, 309, 22649, 848, 2158, 880, 8395, 389, 4148, 2932, 14294, 29255, 18, 5830, 1699, 1359, 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, 848, 67, 5754, 12, 2890, 16, 22649, 16, 880, 4672, 3536, 9940, 326, 2707, 29255, 18, 5830, 16288, 309, 22649, 848, 2158, 880, 8395, 389, 4148, 2932, 14294, 29255, 18, 5830, 1699, 1359, 3...
def fetch_content(inner, self, mailbox, filter): yield inner.thread(mailbox.noop) result, data = yield inner.thread(mailbox.search, None, filter)
def walk_mail(inner, self, uid, path=(), headers=[]): if not path: header = yield inner.sub(self.get_header(uid, "HEADER")) if header is None: return headers = headers + [header] path = list(path) + [0] while True: path[-1] += 1 path_str = ".".join(map(str, path)) header = yield inner.sub(self.get_header(uid, path_str + ".MIME")) if header is None: return if header.get_content_maintype() == "multipart": yield inner.sub(self.walk_mail(uid, path, headers + [header])) else: inner.send(path_str, tuple(headers + [header])) @threado.stream def fetch_mails(inner, self, filter): result, data = yield inner.sub(self.call("uid", "SEARCH", None, filter))
def fetch_content(inner, self, mailbox, filter): yield inner.thread(mailbox.noop)
03f9267fe39b8fc29637e9fabadc16ea290e1fb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14361/03f9267fe39b8fc29637e9fabadc16ea290e1fb0/imapbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 1745, 12, 7872, 16, 365, 16, 14187, 16, 1034, 4672, 2824, 3443, 18, 5930, 12, 4408, 2147, 18, 2135, 556, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 1745, 12, 7872, 16, 365, 16, 14187, 16, 1034, 4672, 2824, 3443, 18, 5930, 12, 4408, 2147, 18, 2135, 556, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
{"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_process_path_info)
{"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_process_path_info)
def blosxom_handler(request): """ This is the default blosxom handler. It calls the renderer callback to get a renderer. If there is no renderer, it uses the blosxom renderer. It calls the pathinfo callback to process the path_info http variable. It calls the filelist callback to build a list of entries to display. It calls the prepare callback to do any additional preparation before rendering the entries. Then it tells the renderer to render the entries. @param request: A standard request object @type request: L{Pyblosxom.pyblosxom.Request} object """ config = request.getConfiguration() data = request.getData() # go through the renderer callback to see if anyone else # wants to render. this renderer gets stored in the data dict # for downstream processing. rend = tools.run_callback('renderer', {'request': request}, donefunc = lambda x: x != None, defaultfunc = lambda x: None) if not rend: # get the renderer we want to use rend = config.get("renderer", "blosxom") # import the renderer rend = tools.importname("Pyblosxom.renderers", rend) # get the renderer object rend = rend.Renderer(request, config.get("stdoutput", sys.stdout)) data['renderer'] = rend # generate the timezone variable data["timezone"] = time.tzname[time.localtime()[8]] # process the path info to determine what kind of blog entry(ies) # this is tools.run_callback("pathinfo", {"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_process_path_info) # call the filelist callback to generate a list of entries data["entry_list"] = tools.run_callback("filelist", {"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_file_list_handler) # figure out the blog-level mtime which is the mtime of the head of # the entry_list entry_list = data["entry_list"] if isinstance(entry_list, list) and len(entry_list) > 0: mtime = entry_list[0].get("mtime", time.time()) else: mtime = time.time() mtime_tuple = time.localtime(mtime) mtime_gmtuple = time.gmtime(mtime) data["latest_date"] = time.strftime('%a, %d %b %Y', mtime_tuple) # Make sure we get proper 'English' dates when using standards loc = locale.getlocale(locale.LC_ALL) locale.setlocale(locale.LC_ALL, 'C') data["latest_w3cdate"] = time.strftime('%Y-%m-%dT%H:%M:%SZ', mtime_gmtuple) data['latest_rfc822date'] = time.strftime('%a, %d %b %Y %H:%M GMT', mtime_gmtuple) # set the locale back locale.setlocale(locale.LC_ALL, loc) # we pass the request with the entry_list through the prepare callback # giving everyone a chance to transform the data. the request is # modified in place. tools.run_callback("prepare", {"request": request}) # now we pass the entry_list through the renderer entry_list = data["entry_list"] renderer = data['renderer'] if renderer and not renderer.rendered: if entry_list: renderer.setContent(entry_list) # Log it as success tools.run_callback("logrequest", {'filename':config.get('logfile',''), 'return_code': '200', 'request': request}) else: renderer.addHeader('Status', '404 Not Found') renderer.setContent( {'title': 'The page you are looking for is not available', 'body': 'Somehow I cannot find the page you want. ' + 'Go Back to <a href="%s">%s</a>?' % (config["base_url"], config["blog_title"])}) # Log it as failure tools.run_callback("logrequest", {'filename':config.get('logfile',''), 'return_code': '404', 'request': request}) renderer.render() elif not renderer: output = config.get('stdoutput', sys.stdout) output.write("Content-Type: text/plain\n\n" + \ "There is something wrong with your setup.\n" + \ "Check your config files and verify that your " + \ "configuration is correct.\n") cache = tools.get_cache(request) if cache: cache.close()
2d889182f07a1e20247eba2168cf4d18f81fcdab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11836/2d889182f07a1e20247eba2168cf4d18f81fcdab/pyblosxom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 383, 30319, 362, 67, 4176, 12, 2293, 4672, 3536, 1220, 353, 326, 805, 324, 383, 30319, 362, 1838, 18, 225, 2597, 4097, 326, 5690, 1348, 358, 336, 279, 5690, 18, 225, 971, 1915, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 383, 30319, 362, 67, 4176, 12, 2293, 4672, 3536, 1220, 353, 326, 805, 324, 383, 30319, 362, 1838, 18, 225, 2597, 4097, 326, 5690, 1348, 358, 336, 279, 5690, 18, 225, 971, 1915, 35...
extra_compile_args=(('-W -Wall -Wimplicit -Wuninitialized ' '-Wshadow -Wpointer-arith -Wcast-align ' '-Waggregate-return -Wstrict-prototypes ' '-Wnested-externs -Werror').split() + ['-Wp,-U_FORTIFY_SOURCE'])
extra_compile_args=python_cflags_env.split()
def GetIncludes(flags): """Parse a flags string for includes of the form -I<DIR>. Args: flags: a string in shell syntax denoting compiler options Returns: a list of <DIR>s of the includes Raises: ValueError: In the doctests below, note that a single quoted backslash takes four backslashes to represent if it is inside a single quoted string inside this present triple-quoted string. >>> GetIncludes('-I x -X -I"y" -Y') ['x', 'y'] >>> GetIncludes('-Ix -Dfoo -Iy') ['x', 'y'] >>> GetIncludes(r'-Ix -I"y\\z" -I"y\\\\z" -Y') ['x', 'y\\\\z', 'y\\\\z'] >>> GetIncludes('-DX -Iquote Y') Traceback (most recent call last): ... ValueError: These options are not allowed: -Iquote, -Isystem, -I-. >>> GetIncludes('-DX -I x -I') Traceback (most recent call last): ... ValueError: Argument expected after '-I'. """ flags = shlex.split(flags) if set(OPTIONS_NOT_ALLOWED) & set(flags): raise ValueError('These options are not allowed: %s.' % ', '.join(OPTIONS_NOT_ALLOWED)) # Fish out the directories of '-I' options. i = 0 inc_dirs = [] while i < len(flags): if flags[i].startswith('-I'): inc_dir = flags[i][len('-I'):] if inc_dir: # "-Idir" inc_dirs.append(inc_dir) i += 1 continue else: # "-I dir" if i == len(flags) - 1: raise ValueError("Argument expected after '-I'.") inc_dirs.append(flags[i+1]) i += 2 else: i += 1 return inc_dirs
369fda0a4d5ca955dddc79dd0f61568f8ca72aa0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7392/369fda0a4d5ca955dddc79dd0f61568f8ca72aa0/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 16815, 12, 7133, 4672, 3536, 3201, 279, 2943, 533, 364, 6104, 434, 326, 646, 300, 45, 32, 4537, 18652, 225, 6634, 30, 2943, 30, 279, 533, 316, 5972, 6279, 5545, 17128, 5274, 702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 16815, 12, 7133, 4672, 3536, 3201, 279, 2943, 533, 364, 6104, 434, 326, 646, 300, 45, 32, 4537, 18652, 225, 6634, 30, 2943, 30, 279, 533, 316, 5972, 6279, 5545, 17128, 5274, 702, ...
dispatcher.handle_error()
xmpp_connection.handle_error()
def RunDispatcherHandler(dispatcher, handler): """Handles a single event for an asyncore.dispatcher.
5b1bf077a7b9ec15911dce368946ffaee00746a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5b1bf077a7b9ec15911dce368946ffaee00746a3/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 6681, 1503, 12, 18495, 16, 1838, 4672, 3536, 8788, 279, 2202, 871, 364, 392, 4326, 479, 18, 18495, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 6681, 1503, 12, 18495, 16, 1838, 4672, 3536, 8788, 279, 2202, 871, 364, 392, 4326, 479, 18, 18495, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
infoStr ="StorageElement.putFile: Failed to put file." gLogger.error(infoStr,'%s with protocol %s' % (destUrl,protocolName)) infoStr ="StorageElement.putFile: Removing failed file remnant." gLogger.info(infoStr,'%s with protocol %s' % (destUrl,protocolName)) res = storage.removeFile(destUrl) if res['OK']: if res['Value']['Successful'].has_key(destUrl): infoStr ="StorageElement.putFile: Removed failed file remnant from storage." gLogger.info(infoStr,'%s with protocol %s' % (destUrl,protocolName)) else: infoStr ="StorageElement.putFile: Failed to remove failed file remnant from storage." gLogger.error(infoStr,'%s with protocol %s' % (destUrl,protocolName)) else: infoStr ="StorageElement.putFile: Failed to remove failed file remnant from storage." gLogger.error(infoStr,'%s with protocol %s' % (destUrl,protocolName))
errStr ="StorageElement.putFile: Failed to put file." errMessage = res['Value']['Failed'][destUrl] gLogger.error(errStr,'%s with protocol %s: %s' % (destUrl,protocolName,errMessage))
def putFile(self,file,alternativePath=None,desiredProtocol=None): """ This method will upload a local file to the SE
7103ee9939a5a7ab45b51df34eb263621ec53a2c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/7103ee9939a5a7ab45b51df34eb263621ec53a2c/StorageElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 768, 16, 27071, 743, 33, 7036, 16, 30458, 5752, 33, 7036, 4672, 3536, 1220, 707, 903, 3617, 279, 1191, 585, 358, 326, 3174, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 812, 12, 2890, 16, 768, 16, 27071, 743, 33, 7036, 16, 30458, 5752, 33, 7036, 4672, 3536, 1220, 707, 903, 3617, 279, 1191, 585, 358, 326, 3174, 2, -100, -100, -100, -100, -100, -1...
if terminator is None or terminator == '':
if not terminator:
def handle_read (self):
4b01d59f3ea455e4bdd8907351637a82fe54d202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4b01d59f3ea455e4bdd8907351637a82fe54d202/asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 896, 261, 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, 1640, 67, 896, 261, 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...
resource = memory.File(TEST_DATA_2) handler = CSV(resource)
handler = CSV() handler.load_state_from_string(TEST_DATA_2)
def test_set_state_in_memory_resource(self): resource = memory.File(TEST_DATA_2) handler = CSV(resource) handler.add_row(['a', 'b', 'c']) handler.save_state() handler2 = CSV(resource) self.assertEqual(handler2.get_row(3), ['a', 'b', 'c'])
7404f7e83f01f05f84fa82ab4b9b9fcd644b8aa8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/7404f7e83f01f05f84fa82ab4b9b9fcd644b8aa8/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 2019, 67, 267, 67, 7858, 67, 3146, 12, 2890, 4672, 1838, 273, 10381, 1435, 1838, 18, 945, 67, 2019, 67, 2080, 67, 1080, 12, 16961, 67, 4883, 67, 22, 13, 1838, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 2019, 67, 267, 67, 7858, 67, 3146, 12, 2890, 4672, 1838, 273, 10381, 1435, 1838, 18, 945, 67, 2019, 67, 2080, 67, 1080, 12, 16961, 67, 4883, 67, 22, 13, 1838, 18, ...
self.assertEqual(properties, msg.content['application_headers'])
self.assertEqual(properties, self.getApplicationHeaders(msg))
def assertPublishGet(self, queue, exchange="", routing_key="", properties=None): """ Publish to exchange and assert queue.get() returns the same message. """ body = self.uniqueString() dp=self.session.delivery_properties(routing_key=routing_key) mp=self.session.message_properties(application_headers=properties) self.session.message_transfer(destination=exchange, message=Message(dp, mp, body)) msg = queue.get(timeout=1) self.assertEqual(body, msg.body) if (properties): self.assertEqual(properties, msg.content['application_headers'])
74701253cb10e3ca35e613669e068da23ae2bc7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/74701253cb10e3ca35e613669e068da23ae2bc7b/exchange.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 6024, 967, 12, 2890, 16, 2389, 16, 7829, 1546, 3113, 7502, 67, 856, 1546, 3113, 1790, 33, 7036, 4672, 3536, 9761, 358, 7829, 471, 1815, 2389, 18, 588, 1435, 1135, 326, 1967, 883, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 6024, 967, 12, 2890, 16, 2389, 16, 7829, 1546, 3113, 7502, 67, 856, 1546, 3113, 1790, 33, 7036, 4672, 3536, 9761, 358, 7829, 471, 1815, 2389, 18, 588, 1435, 1135, 326, 1967, 883, ...
MOZILLA_LIB_PATH=mozilla_lib_path)
MOZILLA_LIB_PATH=mozilla_runtime_path[0])
def install_app_config(self): source = os.path.join(resource_dir, 'app.config.template') dest = '/usr/share/miro/resources/app.config'
915b5933c8ab9321f08e6dc0ba38cba4933e613c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/915b5933c8ab9321f08e6dc0ba38cba4933e613c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 2910, 67, 1425, 12, 2890, 4672, 1084, 273, 1140, 18, 803, 18, 5701, 12, 3146, 67, 1214, 16, 296, 2910, 18, 1425, 18, 3202, 6134, 1570, 273, 1173, 13640, 19, 14419, 19, 9197, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 2910, 67, 1425, 12, 2890, 4672, 1084, 273, 1140, 18, 803, 18, 5701, 12, 3146, 67, 1214, 16, 296, 2910, 18, 1425, 18, 3202, 6134, 1570, 273, 1173, 13640, 19, 14419, 19, 9197, ...
self.lineno = self.lineno + 1
count = count + 1
def calcNewLines (str, start, end):
4e40c07fcc94f4237dfbc46774cb4bd5627af518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12443/4e40c07fcc94f4237dfbc46774cb4bd5627af518/xil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 1908, 5763, 261, 701, 16, 787, 16, 679, 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, ...
[ 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, 7029, 1908, 5763, 261, 701, 16, 787, 16, 679, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.close(self["list"].l.getCurrentSelection()[0])
if len(self["list"].list) > 0: self.close(self["list"].l.getCurrentSelection()[0]) else: self.close(None)
def go(self): self.close(self["list"].l.getCurrentSelection()[0]) #self.close(self["input"].getText())
ec5be08b08e4163539937341316230241f6d2eda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/ec5be08b08e4163539937341316230241f6d2eda/ChoiceBox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 12, 2890, 4672, 365, 18, 4412, 12, 2890, 9614, 1098, 6, 8009, 80, 18, 588, 3935, 6233, 1435, 63, 20, 5717, 468, 2890, 18, 4412, 12, 2890, 9614, 2630, 6, 8009, 588, 1528, 10756, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 12, 2890, 4672, 365, 18, 4412, 12, 2890, 9614, 1098, 6, 8009, 80, 18, 588, 3935, 6233, 1435, 63, 20, 5717, 468, 2890, 18, 4412, 12, 2890, 9614, 2630, 6, 8009, 588, 1528, 10756, ...
line += c
line += c
def readline(self, size=None, eol='\n'): """read a line which is terminated with end-of-line (eol) character ('\n' by default) or until timeout""" line = '' while 1: c = self.read(1) if c: line += c #not very efficient but lines are usually not that long if c == eol: break if size is not None and len(line) >= size: break else: break return line
0a06dd5133ebccedf57bfd5cad2b2ea3aa21d306 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/0a06dd5133ebccedf57bfd5cad2b2ea3aa21d306/serialutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 33, 7036, 16, 14775, 2218, 64, 82, 11, 4672, 3536, 896, 279, 980, 1492, 353, 14127, 598, 679, 17, 792, 17, 1369, 261, 30951, 13, 3351, 7707, 64, 82, 11, 635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 33, 7036, 16, 14775, 2218, 64, 82, 11, 4672, 3536, 896, 279, 980, 1492, 353, 14127, 598, 679, 17, 792, 17, 1369, 261, 30951, 13, 3351, 7707, 64, 82, 11, 635...
msg += """ <packagereq type="conditional" requires="%s">%s</packagereq>\n""" % (pkg, req)
msg += """ <packagereq type="conditional" requires="%s">%s</packagereq>\n""" % (req, pkg)
def xml(self): """write out an xml stanza for the group object""" msg ="""
4d786c6d615ff74f47612940861464c8860998f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/4d786c6d615ff74f47612940861464c8860998f9/comps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 12, 2890, 4672, 3536, 2626, 596, 392, 2025, 21650, 364, 326, 1041, 733, 8395, 1234, 273, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 12, 2890, 4672, 3536, 2626, 596, 392, 2025, 21650, 364, 326, 1041, 733, 8395, 1234, 273, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
top nodes and the bottom nodes are retained from the given graph. Top and bottom nodes are connected if the bottom node belongs to the clique represented by a top node.
top vertices and the bottom vertices are retained from the given graph. Top and bottom vertices are connected if the bottom vertex belongs to the clique represented by a top vertex.
def cliques_get_clique_bipartite(self, **kwds): """ Returns a bipartite graph constructed such that cliques are the top nodes and the bottom nodes are retained from the given graph. Top and bottom nodes are connected if the bottom node belongs to the clique represented by a top node. Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. (See examples below). EXAMPLES: sage: (graphs.ChvatalGraph()).cliques_get_clique_bipartite() Graph on 36 vertices sage.: ((graphs.ChvatalGraph()).cliques_get_clique_bipartite()).show(figsize=[2,2], vertex_size=20, vertex_labels=False) sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D.cliques_get_clique_bipartite() Traceback (most recent call last): ... TypeError: Function defined for undirected graphs only. See documentation. sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.cliques_get_clique_bipartite() Graph on 6 vertices sage.: (D.cliques_get_clique_bipartite()).show(figsize=[2,2]) """ if (self.is_directed()): raise TypeError('Function defined for undirected graphs only. See documentation.') else: import networkx.cliques return Graph(networkx.cliques.make_clique_bipartite(self._nxg, **kwds))
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 588, 67, 4857, 1857, 67, 70, 5762, 1137, 12, 2890, 16, 2826, 25577, 4672, 3536, 2860, 279, 324, 5762, 1137, 2667, 15688, 4123, 716, 4942, 29896, 854, 326, 1760, 6928, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 588, 67, 4857, 1857, 67, 70, 5762, 1137, 12, 2890, 16, 2826, 25577, 4672, 3536, 2860, 279, 324, 5762, 1137, 2667, 15688, 4123, 716, 4942, 29896, 854, 326, 1760, 6928, 47...
new_obj = AudioObject.init_from_file(self.wav_filename, label)
new_obj = AudioObject.init_from_file(wav_filename, label)
def test_init_from_file(self): new_obj = AudioObject.init_from_file(self.wav_filename) filename = 'example.wav' self.assertEqual(filename, new_obj.label) self.assertEqual(filename, new_obj.mods.content.title) self.assertEqual(filename, new_obj.dc.content.title) self.assert_(isinstance(new_obj.audio.content, file), 'audio datastream content should be a file object') # typeOfResource self.assertEqual('sound recording', new_obj.mods.content.resource_type, 'mods:typeOfResource initialized to "sound recording"') # codec quality self.assertEqual('lossless', new_obj.digtech.content.codec_quality, 'codec quality should be initialized to "lossless"') # duration self.assertEqual(3, new_obj.digtech.content.duration, 'duration should be calculated and stored in duration, rounded to the nearest second')
ebf7098ec98c4922b049ba6136693a701aa15f39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6133/ebf7098ec98c4922b049ba6136693a701aa15f39/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2738, 67, 2080, 67, 768, 12, 2890, 4672, 394, 67, 2603, 273, 15045, 921, 18, 2738, 67, 2080, 67, 768, 12, 2890, 18, 24801, 67, 3459, 13, 1544, 273, 296, 8236, 18, 24801, 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, 1842, 67, 2738, 67, 2080, 67, 768, 12, 2890, 4672, 394, 67, 2603, 273, 15045, 921, 18, 2738, 67, 2080, 67, 768, 12, 2890, 18, 24801, 67, 3459, 13, 1544, 273, 296, 8236, 18, 24801, 11...
'date_due': fields.date('Due Date'),
'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}),
def _get_partner(self, cr, uid, context={}): return context.get('partner_id', False)
3db30f732752ade5c9c2e3f43b43414620071ca3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3db30f732752ade5c9c2e3f43b43414620071ca3/voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 31993, 12, 2890, 16, 4422, 16, 4555, 16, 819, 12938, 4672, 327, 819, 18, 588, 2668, 31993, 67, 350, 2187, 1083, 13, 225, 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, 389, 588, 67, 31993, 12, 2890, 16, 4422, 16, 4555, 16, 819, 12938, 4672, 327, 819, 18, 588, 2668, 31993, 67, 350, 2187, 1083, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100...
self.path = path
def __init__(self, path, authz, log, options={}): self.path = path # might be needed by __del__()/close() self.log = log self.options = options self.pool = Pool() # Remove any trailing slash or else subversion might abort if isinstance(path, unicode): path = path.encode('utf-8') path = os.path.normpath(path).replace('\\', '/') self.path = repos.svn_repos_find_root_path(path, self.pool()) if self.path is None: raise TracError("%s does not appear to be a Subversion repository." \ % path)
0820321d5f408bf3fbba2bb84a92f2b962b13924 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/0820321d5f408bf3fbba2bb84a92f2b962b13924/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 18686, 16, 613, 16, 702, 12938, 4672, 468, 4825, 506, 3577, 635, 1001, 3771, 972, 1435, 19, 4412, 1435, 365, 18, 1330, 273, 613, 365, 18, 2116, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 589, 16, 18686, 16, 613, 16, 702, 12938, 4672, 468, 4825, 506, 3577, 635, 1001, 3771, 972, 1435, 19, 4412, 1435, 365, 18, 1330, 273, 613, 365, 18, 2116, ...
elif not to:
elif not to or util.binary(to):
def trydiff(repo, revs, ctx1, ctx2, modified, added, removed, copy, getfilectx, opts, losedatafn): date1 = util.datestr(ctx1.date()) man1 = ctx1.manifest() gone = set() gitmode = {'l': '120000', 'x': '100755', '': '100644'} copyto = dict([(v, k) for k, v in copy.items()]) if opts.git: revs = None for f in sorted(modified + added + removed): to = None tn = None dodiff = True header = [] if f in man1: to = getfilectx(f, ctx1).data() if f not in removed: tn = getfilectx(f, ctx2).data() a, b = f, f if opts.git or losedatafn: if f in added: mode = gitmode[ctx2.flags(f)] if f in copy or f in copyto: if opts.git: if f in copy: a = copy[f] else: a = copyto[f] omode = gitmode[man1.flags(a)] _addmodehdr(header, omode, mode) if a in removed and a not in gone: op = 'rename' gone.add(a) else: op = 'copy' header.append('%s from %s\n' % (op, a)) header.append('%s to %s\n' % (op, f)) to = getfilectx(a, ctx1).data() else: losedatafn(f) else: if opts.git: header.append('new file mode %s\n' % mode) elif ctx2.flags(f): losedatafn(f) if util.binary(tn): if opts.git: dodiff = 'binary' else: losedatafn(f) if not opts.git and not tn: # regular diffs cannot represent new empty file losedatafn(f) elif f in removed: if opts.git: # have we already reported a copy above? if ((f in copy and copy[f] in added and copyto[copy[f]] == f) or (f in copyto and copyto[f] in added and copy[copyto[f]] == f)): dodiff = False else: header.append('deleted file mode %s\n' % gitmode[man1.flags(f)]) elif not to: # regular diffs cannot represent empty file deletion losedatafn(f) else: oflag = man1.flags(f) nflag = ctx2.flags(f) binary = util.binary(to) or util.binary(tn) if opts.git: _addmodehdr(header, gitmode[oflag], gitmode[nflag]) if binary: dodiff = 'binary' elif binary or nflag != oflag: losedatafn(f) if opts.git: header.insert(0, mdiff.diffline(revs, a, b, opts)) if dodiff: if dodiff == 'binary': text = b85diff(to, tn) else: text = mdiff.unidiff(to, date1, # ctx2 date may be dynamic tn, util.datestr(ctx2.date()), a, b, revs, opts=opts) if header and (text or len(header) > 1): yield ''.join(header) if text: yield text
9e155ec3716390762274937ced84c4adbbfea3f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/9e155ec3716390762274937ced84c4adbbfea3f6/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5413, 12, 7422, 16, 5588, 87, 16, 1103, 21, 16, 1103, 22, 16, 4358, 16, 3096, 16, 3723, 16, 1610, 16, 336, 768, 5900, 16, 1500, 16, 437, 730, 396, 4293, 4672, 225, 1509, 21, 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, 775, 5413, 12, 7422, 16, 5588, 87, 16, 1103, 21, 16, 1103, 22, 16, 4358, 16, 3096, 16, 3723, 16, 1610, 16, 336, 768, 5900, 16, 1500, 16, 437, 730, 396, 4293, 4672, 225, 1509, 21, 2...
def test_image_processing_libarary_error(self):
def test_image_processing_library_error(self):
def test_image_processing_libarary_error(self): """ If the image processing library errors while preparing a photo, report a helpful message to the user and log the error. The photo is not added to the user's profile. """ # Get a copy of the error log. string_log = StringIO.StringIO() logger = logging.getLogger() my_log = logging.StreamHandler(string_log) logger.addHandler(my_log) logger.setLevel(logging.ERROR)
9e8506a891d4c7f625fe82c0cf793579c3f070fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/9e8506a891d4c7f625fe82c0cf793579c3f070fe/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2730, 67, 10632, 67, 12083, 67, 1636, 12, 2890, 4672, 3536, 971, 326, 1316, 4929, 5313, 1334, 1323, 675, 12583, 279, 10701, 16, 2605, 279, 28063, 883, 358, 326, 729, 471, 613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2730, 67, 10632, 67, 12083, 67, 1636, 12, 2890, 4672, 3536, 971, 326, 1316, 4929, 5313, 1334, 1323, 675, 12583, 279, 10701, 16, 2605, 279, 28063, 883, 358, 326, 729, 471, 613, ...
print "installdeps placeholder"
root.init()
def main(): # defaults config_opts = {} setup_default_config_opts(config_opts) # cli option parsing (options, args) = command_parse() # config path -- can be overridden on cmdline config_path=MOCKCONFDIR if options.configdir: config_path = options.configdir # basic config for logging until config files are read logging.config.fileConfig(os.path.join(config_path, config_opts["log_config_file"])) # check args if len(args) < 1: log.error("No srpm or command specified - nothing to do") sys.exit(50) # Read in the config files: default, and then user specified for cfg in ( os.path.join(config_path, 'defaults.cfg'), '%s/%s.cfg' % (config_path, options.chroot)): if os.path.exists(cfg): execfile(cfg) else: log.error("Could not find required config file: %s" % cfg) sys.exit(1) # reconfigure logging in case config file was overridden logging.config.fileConfig(os.path.join(config_path, config_opts["log_config_file"])) # cmdline options override config options set_config_opts_per_cmdline(config_opts, options) warn_obsolete_config_options(config_opts) # do whatever we're here to do root = mock.backend.Root(config_opts, mock.uid.uidManager()) if args[0] == 'init': print "initializing chroot " if config_opts['clean']: root.clean() root.init() elif args[0] == 'clean': print "clean placeholder" elif args[0] == 'chroot': print "chroot placeholder" elif args[0] == 'shell': print "shell placeholder" elif args[0] == 'installdeps': print "installdeps placeholder" elif args[0] == 'rebuild': print "rebuild placeholder" else: pass
863d42e7e6937981012968857cb74052971062b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/863d42e7e6937981012968857cb74052971062b1/mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 3467, 642, 67, 4952, 273, 2618, 3875, 67, 1886, 67, 1425, 67, 4952, 12, 1425, 67, 4952, 13, 225, 468, 4942, 1456, 5811, 261, 2116, 16, 833, 13, 273, 1296, 67, 2670, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 468, 3467, 642, 67, 4952, 273, 2618, 3875, 67, 1886, 67, 1425, 67, 4952, 12, 1425, 67, 4952, 13, 225, 468, 4942, 1456, 5811, 261, 2116, 16, 833, 13, 273, 1296, 67, 2670, ...
patterns.append(url(config_value(key, 'URL_BASE'), [urlmodule]))
patterns.append(url(config_value(key, 'URL_BASE'), [urlmodule, '', '']))
def make_urlpatterns(): patterns = [] for key in config_value('PAYMENT', 'MODULES'): cfg = config_get(key, 'MODULE') modulename = cfg.editor_value urlmodule = "%s.urls" % modulename patterns.append(url(config_value(key, 'URL_BASE'), [urlmodule])) return tuple(patterns)
60d6cebdeb7f3eb2d508872d10523384e4b2920b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/171/60d6cebdeb7f3eb2d508872d10523384e4b2920b/urls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 718, 13317, 13332, 6884, 273, 5378, 364, 498, 316, 642, 67, 1132, 2668, 16436, 2187, 296, 12194, 55, 11, 4672, 2776, 273, 642, 67, 588, 12, 856, 16, 296, 12194, 6134, 31961, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 718, 13317, 13332, 6884, 273, 5378, 364, 498, 316, 642, 67, 1132, 2668, 16436, 2187, 296, 12194, 55, 11, 4672, 2776, 273, 642, 67, 588, 12, 856, 16, 296, 12194, 6134, 31961, ...
(4 + 4*5^2 + O(5^3), 0)
(4 + 4*5^2 + O(5^3) + O(T^5), O(T^5))
def Dp_valued_series(self, n=3, prec=5): r""" Returns a vector of two components which are p-adic power series. The answer v is such that $$(1-\varphi)^(-2)* L_p(E,T) = v[1] * \omega + v[2] * \eta$$ as an element of the Dieudonne module $D_p(E) = H^1_{dR}(E/\QQ_p)$ where $\omega$ is the invariant differential and $\eta$ is $x\cdot\omega$. According to the p-adic BSD this function has a zero of order rank(E(Q)) and it's leading term is \begin{verbatim} +- #Sha(E/Q) * Tamagawa product / Torsion^2 * padic height regulator with values in D_p(E). \end{verbatim}
db4f2cc6bf72585208b07ed32559545fe9bfc9b4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/db4f2cc6bf72585208b07ed32559545fe9bfc9b4/padic_lseries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 84, 67, 4531, 329, 67, 10222, 12, 2890, 16, 290, 33, 23, 16, 13382, 33, 25, 4672, 436, 8395, 2860, 279, 3806, 434, 2795, 4085, 1492, 854, 293, 17, 20333, 7212, 4166, 18, 1021, 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, 463, 84, 67, 4531, 329, 67, 10222, 12, 2890, 16, 290, 33, 23, 16, 13382, 33, 25, 4672, 436, 8395, 2860, 279, 3806, 434, 2795, 4085, 1492, 854, 293, 17, 20333, 7212, 4166, 18, 1021, 5...
files = self._get_files("%s/%s/%s" % (arch, subarch, self.config_name))
files = self.getFiles("%s/%s/%s" % (arch, subarch, self.config_name))
def _readSubarch(self, arch, subarch): files = self._get_files("%s/%s/%s" % (arch, subarch, self.config_name)) config = ConfigParser(self.schema, files)
c03c8299cf4044d71a47f7ca0d3d708c70b8eb4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/c03c8299cf4044d71a47f7ca0d3d708c70b8eb4e/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 1676, 991, 12, 2890, 16, 6637, 16, 720, 991, 4672, 1390, 273, 365, 18, 588, 2697, 27188, 87, 5258, 87, 5258, 87, 6, 738, 261, 991, 16, 720, 991, 16, 365, 18, 1425, 67, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 896, 1676, 991, 12, 2890, 16, 6637, 16, 720, 991, 4672, 1390, 273, 365, 18, 588, 2697, 27188, 87, 5258, 87, 5258, 87, 6, 738, 261, 991, 16, 720, 991, 16, 365, 18, 1425, 67, 52...
version_arg = "--version" elif os.system("pkg-config %s --exists &>/dev/null" % name) == 0: command = "pkg-config %s %%s 2>/dev/null" % name version_arg = "--modversion"
version = os.popen(command % '--version').read().strip() if len(version) == 0: raise ValueError, 'command not found' if minver and version < minver: err= 'requires %s version %s (%s found)' % \ (name, minver, version) raise ValueError, err
def check_library(self, name, minver): """ Check dependencies add add the flags to include_dirs, library_dirs and libraries. The basic logic is taken from pygame. """ try: if os.system("%s-config --version &>/dev/null" % name) == 0: # Use foo-config if it exists. command = "%s-config %%s 2>/dev/null" % name version_arg = "--version" elif os.system("pkg-config %s --exists &>/dev/null" % name) == 0: # Otherwise try pkg-config foo. command = "pkg-config %s %%s 2>/dev/null" % name version_arg = "--modversion" else: raise Exception, "not found"
081fd338dac312d4e4838eecc7c77dfb5661dba8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/081fd338dac312d4e4838eecc7c77dfb5661dba8/distribution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 12083, 12, 2890, 16, 508, 16, 1131, 502, 4672, 3536, 2073, 5030, 527, 527, 326, 2943, 358, 2341, 67, 8291, 16, 5313, 67, 8291, 471, 14732, 18, 1021, 5337, 4058, 353, 9830, 628...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 12083, 12, 2890, 16, 508, 16, 1131, 502, 4672, 3536, 2073, 5030, 527, 527, 326, 2943, 358, 2341, 67, 8291, 16, 5313, 67, 8291, 471, 14732, 18, 1021, 5337, 4058, 353, 9830, 628...
self.image = image
def checkImageDuplicated(self, image): """ Function to check the duplicated images. """ # {{Dupe|Image:Blanche_Montel.jpg}} dupText = wikipedia.translate(self.site, duplicatesText) dupRegex = wikipedia.translate(self.site, duplicatesRegex) dupTalkHead = wikipedia.translate(self.site, duplicate_user_talk_head) dupTalkText = wikipedia.translate(self.site, duplicates_user_talk_text) dupComment_talk = wikipedia.translate(self.site, duplicates_comment_talk) dupComment_image = wikipedia.translate(self.site, duplicates_comment_image) self.image = image duplicateRegex = r'\n\*(?:\[\[:Image:%s\]\] has the following duplicates:|\*\[\[:Image:%s\]\])$' % (self.convert_to_url(self.image), self.convert_to_url(self.image)) imagePage = wikipedia.ImagePage(self.site, 'Image:%s' % self.image) hash_found = imagePage.getHash() duplicates = self.site.getImagesFromAnHash(hash_found) if duplicates == None: return False # Error, we need to skip the page. if len(duplicates) > 1: if len(duplicates) == 2: wikipedia.output(u'%s has a duplicate! Reporting it...' % self.image) else: wikipedia.output(u'%s has %s duplicates! Reporting them...' % (self.image, len(duplicates) - 1)) if self.duplicatesReport: repme = "\n*[[:Image:%s]] has the following duplicates:" % self.convert_to_url(self.image) for duplicate in duplicates: if self.convert_to_url(duplicate) == self.convert_to_url(self.image): continue # the image itself, not report also this as duplicate repme += "\n**[[:Image:%s]]" % self.convert_to_url(duplicate) result = self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = duplicateRegex) if not result: return True # If Errors, exit (but continue the check) if not dupText == None and not dupRegex == None: time_image_list = list() time_list = list() for duplicate in duplicates: DupePage = wikipedia.ImagePage(self.site, u'Image:%s' % duplicate) imagedata = DupePage.getLatestUploader()[1] # '2008-06-18T08:04:29Z' data = time.strptime(imagedata, "%Y-%m-%dT%H:%M:%SZ") data_seconds = time.mktime(data) time_image_list.append([data_seconds, duplicate]) time_list.append(data_seconds) older_image = self.returnOlderTime(time_image_list, time_list) # And if the images are more than two? Page_oder_image = wikipedia.ImagePage(self.site, u'Image:%s' % older_image) string = '' images_to_tag_list = [] for duplicate in duplicates: if wikipedia.ImagePage(self.site, u'%s:%s' % (self.image_namespace, duplicate)) == \ wikipedia.ImagePage(self.site, u'%s:%s' % (self.image_namespace, older_image)): continue # the older image, not report also this as duplicate DupePage = wikipedia.ImagePage(self.site, u'Image:%s' % duplicate) try: DupPageText = DupePage.get() older_page_text = Page_oder_image.get() except wikipedia.NoPage: continue # The page doesn't exists if re.findall(dupRegex, DupPageText) == [] and re.findall(dupRegex, older_page_text) == []: wikipedia.output(u'%s is a duplicate and has to be tagged...' % duplicate) images_to_tag_list.append(duplicate) #if duplicate != duplicates[-1]: string += "*[[:%s%s]]\n" % (self.image_namespace, duplicate) #else: # string += "*[[:%s%s]]" % (self.image_namespace, duplicate) else: wikipedia.output(u"Already put the dupe-template in the image's page or in the dupe's page. Skip.") return True # Ok - No problem. Let's continue the checking phase older_image_ns = '%s%s' % (self.image_namespace, older_image) # adding the namespace if len(images_to_tag_list) > 1: for image_to_tag in images_to_tag_list[:-1]: self.report(re.sub(r'__image__', r'%s' % older_image_ns, dupText), image_to_tag, commImage = dupComment_image, unver = True) if len(images_to_tag_list) != 0: self.report(re.sub(r'__image__', r'%s' % older_image_ns, dupText), images_to_tag_list[-1], dupTalkText % (older_image_ns, string), dupTalkHead, commTalk = dupComment_talk, commImage = dupComment_image, unver = True) if older_image != self.image: return False # The image is a duplicate, it will be deleted. return True # Ok - No problem. Let's continue the checking phase
35a9f9395ca206d18b529e378fe7a0b110b9f1c4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/35a9f9395ca206d18b529e378fe7a0b110b9f1c4/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2040, 19682, 690, 12, 2890, 16, 1316, 4672, 3536, 4284, 358, 866, 326, 16975, 4602, 18, 3536, 468, 10179, 40, 89, 347, 96, 2040, 30, 4802, 304, 18706, 67, 49, 1580, 292, 18, 14362...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2040, 19682, 690, 12, 2890, 16, 1316, 4672, 3536, 4284, 358, 866, 326, 16975, 4602, 18, 3536, 468, 10179, 40, 89, 347, 96, 2040, 30, 4802, 304, 18706, 67, 49, 1580, 292, 18, 14362...
if not self.optimized: self.mainArea.resize(0, self.height()) self.resize(self.controlArea.width(), self.height())
qApp.processEvents() self.adjustSize()
def updateOptimizationGui(self): state = [True, False, False] if self.optimized else [False, True, True] for s, func in zip(state, [self.fixedSpinBox.setDisabled, self.optimizationBox.setDisabled, self.mainArea.setHidden]): func(s) if not self.optimized: self.mainArea.resize(0, self.height()) self.resize(self.controlArea.width(), self.height())
b5200d400a472ae12720d7772ce15d5dcc3a721d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/b5200d400a472ae12720d7772ce15d5dcc3a721d/OWKMeans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13930, 1588, 18070, 12, 2890, 4672, 919, 273, 306, 5510, 16, 1083, 16, 1083, 65, 309, 365, 18, 16689, 1235, 469, 306, 8381, 16, 1053, 16, 1053, 65, 364, 272, 16, 1326, 316, 3144,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13930, 1588, 18070, 12, 2890, 4672, 919, 273, 306, 5510, 16, 1083, 16, 1083, 65, 309, 365, 18, 16689, 1235, 469, 306, 8381, 16, 1053, 16, 1053, 65, 364, 272, 16, 1326, 316, 3144,...
def ChangeLogFileRevDesc(entry_dict, indent, line_length):
def ChangeLogFileRevDesc(entry_dict, indent, line_length, patch):
def ChangeLogFileRevDesc(entry_dict, indent, line_length): leading_space = ' ' * indent change_log_entry = '' pos = 0 for description in entry_dict.keys(): change_log_entry = change_log_entry + leading_space + '* ' pos = len(leading_space + '* ') # get the revisions and rcs files associated with the # description. for revision, rcs_file in entry_dict[description]: # NB do a better wrapping job. if pos > line_length: change_log_entry = change_log_entry + '\n' + leading_space pos = len(leading_space) change_log_entry = change_log_entry + rcs_file + ' [' + revision + ']' + ', ' pos = pos + len(rcs_file + ' [' + revision + ']' + ', ') # replace last ', ' with a semicolon - strings are immutable so # an inplace assignment won't do. change_log_entry = change_log_entry[:-2] + ':\n' # add on the current description change_log_entry = change_log_entry + description + '\n' return change_log_entry
42ecb661e06383ac8af5bf242e802c26a1bbfe5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/42ecb661e06383ac8af5bf242e802c26a1bbfe5f/cvs2log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7576, 19103, 10070, 4217, 12, 4099, 67, 1576, 16, 3504, 16, 980, 67, 2469, 16, 4729, 4672, 7676, 67, 2981, 273, 296, 296, 380, 3504, 225, 2549, 67, 1330, 67, 4099, 273, 875, 949, 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, 7576, 19103, 10070, 4217, 12, 4099, 67, 1576, 16, 3504, 16, 980, 67, 2469, 16, 4729, 4672, 7676, 67, 2981, 273, 296, 296, 380, 3504, 225, 2549, 67, 1330, 67, 4099, 273, 875, 949, 273, ...
def multiply_by_two(self, number): """Returns the given number multiplied by two The result is always a floating point number. This keyword fails if the given `number` cannot be converted to number. """ return float(number) * 2 def numbers_should_be_equal(self, first, second): print '*DEBUG* Got %s and %s' if float(first) != float(second): raise AssertionError('Given numbers are unequal!')
def numbers_should_be_equal(first, second): print '*DEBUG* Got arguments %s and %s' % (first, second) if float(first) != float(second): raise AssertionError('Given numbers are unequal!')
def multiply_by_two(self, number): """Returns the given number multiplied by two The result is always a floating point number. This keyword fails if the given `number` cannot be converted to number. """ return float(number) * 2
fed6c8b6510a3a2449233bbaf570d42375dfd4a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/fed6c8b6510a3a2449233bbaf570d42375dfd4a7/ExampleLibrary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10194, 67, 1637, 67, 15415, 12, 2890, 16, 1300, 4672, 3536, 1356, 326, 864, 1300, 27789, 635, 2795, 225, 1021, 563, 353, 3712, 279, 13861, 1634, 1300, 18, 1220, 4932, 6684, 309, 326, 864...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10194, 67, 1637, 67, 15415, 12, 2890, 16, 1300, 4672, 3536, 1356, 326, 864, 1300, 27789, 635, 2795, 225, 1021, 563, 353, 3712, 279, 13861, 1634, 1300, 18, 1220, 4932, 6684, 309, 326, 864...
self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"],
self["key_green"] = StaticText(_("Connect")) self["key_yellow"] = StaticText() self["actions"] = NumberActionMap(["WizardActions", "InputActions", "EPGSelectActions"],
def __init__(self, session, args = 0): Screen.__init__(self, session) self.skin_path = plugin_path self.menu = args self.list = [] self.oktext = _("\nPress OK on your remote control to continue.") self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) if self.menu == 0: self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None)) self.list.append(("install-plugins", _("Install extensions"), _("\nInstall new Extensions or Plugins to your dreambox" ) + self.oktext, None)) self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None)) self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext, None)) self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None)) self.list.append(("ipkg-install", _("Install local extension"), _("\nScan for local packages and install them." ) + self.oktext, None)) for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): if p.__call__.has_key("SoftwareSupported"): callFnc = p.__call__["SoftwareSupported"](None) if callFnc is not None: if p.__call__.has_key("menuEntryName"): menuEntryName = p.__call__["menuEntryName"](None) else: menuEntryName = _('Extended Software') if p.__call__.has_key("menuEntryDescription"): menuEntryDescription = p.__call__["menuEntryDescription"](None) else: menuEntryDescription = _('Extended Software Plugin') self.list.append(('default-plugin', menuEntryName, menuEntryDescription + self.oktext, callFnc)) if config.usage.setup_level.index >= 2: # expert+ self.list.append(("advanced", _("Advanced Options"), _("\nAdvanced options and settings." ) + self.oktext, None)) elif self.menu == 1: self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext, None)) self.list.append(("backuplocation", _("Choose backup location"), _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext, None)) self.list.append(("backupfiles", _("Choose backup files"), _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext, None)) if config.usage.setup_level.index >= 2: # expert+ self.list.append(("ipkg-manager", _("Packet management"), _("\nView, install and remove available or installed packages." ) + self.oktext, None)) self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext, None)) for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): if p.__call__.has_key("AdvancedSoftwareSupported"): callFnc = p.__call__["AdvancedSoftwareSupported"](None) if callFnc is not None: if p.__call__.has_key("menuEntryName"): menuEntryName = p.__call__["menuEntryName"](None) else: menuEntryName = _('Advanced Software') if p.__call__.has_key("menuEntryDescription"): menuEntryDescription = p.__call__["menuEntryDescription"](None) else: menuEntryDescription = _('Advanced Software Plugin') self.list.append(('advanced-plugin', menuEntryName, menuEntryDescription + self.oktext, callFnc))
e198493e29c22e49dff1da47e83a989cdbd1d913 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/e198493e29c22e49dff1da47e83a989cdbd1d913/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 833, 273, 374, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 7771, 267, 67, 803, 273, 1909, 67, 803, 365, 18, 5414, 273, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 833, 273, 374, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 7771, 267, 67, 803, 273, 1909, 67, 803, 365, 18, 5414, 273, 83...
self.print_string(2,10,"Fore: " + str((thrusters[0].getForce()*100)),
self.print_string(2,10,"Fore: " + str((thrusters[0].getForce())),
def print_thrusters(self,thrusters): self.print_string(2,10,"Fore: " + str((thrusters[0].getForce()*100)), curses.A_STANDOUT) self.print_string(22,10,"Aft: " + str((thrusters[1].getForce()*100)), curses.A_STANDOUT) self.print_string(11,30,"Starboard: " + str((thrusters[2].getForce()*100)), curses.A_STANDOUT) self.print_string(11,0,"Port: " + str((thrusters[3].getForce()*100)), curses.A_STANDOUT)
8ab9cef70e24e2705046281649e26c98bc33f51b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10608/8ab9cef70e24e2705046281649e26c98bc33f51b/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 451, 86, 6326, 12, 2890, 16, 451, 86, 6326, 4672, 365, 18, 1188, 67, 1080, 12, 22, 16, 2163, 10837, 13573, 30, 315, 397, 609, 12443, 451, 86, 6326, 63, 20, 8009, 588, 10997...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 451, 86, 6326, 12, 2890, 16, 451, 86, 6326, 4672, 365, 18, 1188, 67, 1080, 12, 22, 16, 2163, 10837, 13573, 30, 315, 397, 609, 12443, 451, 86, 6326, 63, 20, 8009, 588, 10997...
print self.timer_diff
def timer_inc_display(self):
47c7b2de69f2ef74a5ccace1a52699180780bde1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11306/47c7b2de69f2ef74a5ccace1a52699180780bde1/ballcatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5441, 67, 9523, 67, 5417, 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, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5441, 67, 9523, 67, 5417, 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,...