rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
for option in diff_options:
for option in diff_options[1]:
def render_diff(self, req, repos, chgset, diff_options): """Raw Unified Diff version""" req.send_response(200) req.send_header('Content-Type', 'text/plain;charset=utf-8') req.send_header('Content-Disposition', 'filename=Changeset%s.diff' % req.args.get('rev')) req.end_headers()
294ad5958b84e6670b05ec7b2263cef3638204e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/294ad5958b84e6670b05ec7b2263cef3638204e0/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 5413, 12, 2890, 16, 1111, 16, 13686, 16, 462, 75, 542, 16, 3122, 67, 2116, 4672, 3536, 4809, 1351, 939, 13008, 1177, 8395, 1111, 18, 4661, 67, 2740, 12, 6976, 13, 1111, 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, 1743, 67, 5413, 12, 2890, 16, 1111, 16, 13686, 16, 462, 75, 542, 16, 3122, 67, 2116, 4672, 3536, 4809, 1351, 939, 13008, 1177, 8395, 1111, 18, 4661, 67, 2740, 12, 6976, 13, 1111, 18, ...
InitSex(self.pop) self.scrambled = self.pop.clone() self.scrambled.scramble() self.popSex = self.pop.clone() self.popSex.setVirtualSplitter(sexSplitter()) def TestIndInfo(self, pop): for ind in self.pop.individuals(): ind.setInfo(ind.sex(), 'a') for ind in self.pop.individuals(): if ind.sex() == Male: self.assertEqual(ind.info('a'), Male) else: self.assertEqual(ind.info('a'), Female)
InitSex(pop) return pop def getScrambledPop(self): pop = self.getPop() pop.scramble() return pop def getPopWithVSP(self): pop = self.getPop() InitSex(pop) pop.setVirtualSplitter(sexSplitter()) return pop
def setUp(self): 'Set up a few typical populations for testing purposes' self.pop = population(size=[20,80], ploidy=2, loci=[5, 7], lociPos=[ [2,3,4,5,6],[2,4,6,8,10,12,14]], alleleNames=['_','A','C','T','G'], infoFields=['a', 'b']) InitSex(self.pop) # with unordered genotype and info self.scrambled = self.pop.clone() self.scrambled.scramble() # with sex virtual subpopulation self.popSex = self.pop.clone() self.popSex.setVirtualSplitter(sexSplitter())
1e5d8fccc3cf9d72e90aa3e9576e370f9ce2f56c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/1e5d8fccc3cf9d72e90aa3e9576e370f9ce2f56c/test_02_population.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 296, 694, 731, 279, 11315, 24917, 3650, 1012, 364, 7769, 13694, 11, 365, 18, 5120, 273, 11209, 12, 1467, 22850, 3462, 16, 3672, 6487, 293, 383, 29609, 33, 22, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 296, 694, 731, 279, 11315, 24917, 3650, 1012, 364, 7769, 13694, 11, 365, 18, 5120, 273, 11209, 12, 1467, 22850, 3462, 16, 3672, 6487, 293, 383, 29609, 33, 22, 16, ...
self.drawAll()
if self.redrawFlag: self.redrawFlag = 2 else: self.redrawFlag = 1 while self.redrawFlag: self.drawAll() self.redrawFlag -= 1 def needsStatusUpdate(self): """Update the status if we aren't busy, otherwise wait for drawAll to get there. """ if not self.redrawFlag: self.drawStatus()
def needsRedraw(self): """Calling this function indicates that we need to redraw the map. This is called by UI callbacks, so it can happen any time an active object may be invoked by Symbian- even during a redraw. If we get called during a redraw, this schedules another redraw to happen immediately after this one is finished. """ self.drawAll()
efe1dfc8e6ac0f44501afa68d307a3e636b5ea7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/efe1dfc8e6ac0f44501afa68d307a3e636b5ea7e/pyhole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4260, 3715, 1899, 12, 2890, 4672, 3536, 19677, 333, 445, 8527, 716, 732, 1608, 358, 16540, 326, 852, 18, 1220, 353, 2566, 635, 6484, 6689, 16, 1427, 518, 848, 5865, 1281, 813, 392, 2695,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4260, 3715, 1899, 12, 2890, 4672, 3536, 19677, 333, 445, 8527, 716, 732, 1608, 358, 16540, 326, 852, 18, 1220, 353, 2566, 635, 6484, 6689, 16, 1427, 518, 848, 5865, 1281, 813, 392, 2695,...
isoDate = time.strftime('%Y-%m-%d %H:%M:%S', date)
isoDate = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(date))
def log(self, url, error, containingPage): """ Logs an error report to a text file in the deadlinks subdirectory. """ site = wikipedia.getSite() errorReport = u'* %s\n' % url for (pageTitle, date, error) in self.historyDict[url]: # ISO 8601 formulation isoDate = time.strftime('%Y-%m-%d %H:%M:%S', date) errorReport += "** In [[%s]] on %s, %s\n" % (pageTitle, isoDate, error) wikipedia.output(u"** Logging link for deletion.") txtfilename = 'deadlinks/results-%s-%s.txt' % (site.family.name, site.lang) txtfile = codecs.open(txtfilename, 'a', 'utf-8') self.logCount += 1 if self.logCount % 30 == 0: # insert a caption txtfile.write('=== %s ===\n' % containingPage.title()[:3]) txtfile.write(errorReport) txtfile.close() if self.reportThread and not containingPage.isTalkPage(): self.reportThread.report(url, errorReport, containingPage)
f8a8b843fb94eb866aa003936cd43d66caab5c93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/f8a8b843fb94eb866aa003936cd43d66caab5c93/weblinkchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 16, 880, 16, 555, 16, 4191, 1964, 4672, 3536, 20238, 392, 555, 2605, 358, 279, 977, 585, 316, 326, 8363, 7135, 29869, 18, 3536, 2834, 273, 21137, 18, 588, 4956, 1435, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 16, 880, 16, 555, 16, 4191, 1964, 4672, 3536, 20238, 392, 555, 2605, 358, 279, 977, 585, 316, 326, 8363, 7135, 29869, 18, 3536, 2834, 273, 21137, 18, 588, 4956, 1435, 55...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 298) else quickfix.IntField.__init__(self, 298, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 576, 10689, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 576, 10689, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
for [returnType, names, arguments] in functions:
for [return_type, names, arguments] in functions:
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
41b13474f628e124e24db208e67a4b0ebf16f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/41b13474f628e124e24db208e67a4b0ebf16f001/generate_bindings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 585, 18, 2626, 2668, 7, 430, 82, 536, 9146, 67, 43, 25172, 67, 11261, 67, 11261, 67, 2739, 55, 67, 18909, 16652, 10185, 87, 67, 44, 22202, 82, 11, 738, 6788, 18, 5797, 10756, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 585, 18, 2626, 2668, 7, 430, 82, 536, 9146, 67, 43, 25172, 67, 11261, 67, 11261, 67, 2739, 55, 67, 18909, 16652, 10185, 87, 67, 44, 22202, 82, 11, 738, 6788, 18, 5797, 10756, 2, -100, -100...
c = secDB.cursor()
c = secDB.cursor(txn)
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
4a1088c2f2437fbec26e363210956a0f8109e7cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4a1088c2f2437fbec26e363210956a0f8109e7cd/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 3813, 12, 2890, 16, 1428, 2290, 4672, 468, 296, 4802, 3610, 11, 1410, 486, 506, 316, 326, 9946, 2063, 5773, 273, 1428, 2290, 18, 84, 588, 2668, 4802, 3610, 6134, 1815, 5773, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 3813, 12, 2890, 16, 1428, 2290, 4672, 468, 296, 4802, 3610, 11, 1410, 486, 506, 316, 326, 9946, 2063, 5773, 273, 1428, 2290, 18, 84, 588, 2668, 4802, 3610, 6134, 1815, 5773, ...
pass
print "debug note: _KLUGE_current_PM returns %r, but %r.propMgr is %r" % \ (res, self, self.propMgr)
def _KLUGE_current_PM(self): #bruce 070627 """ private method, and a kluge; see KLUGE_current_PropertyManager docstring for more info """ pw = self.w.activePartWindow() if not pw: # I don't know if pw can be None print "fyi: _KLUGE_current_PM sees pw of None" ### return None try: res = pw.KLUGE_current_PropertyManager() if res is not self.propMgr: # I think this should now be rare, now that Ninad removed # all official "guest PM" commands; let's find out... # unfortunately it's common, apparently due to a logic bug # in terms of when we access this vs. when various things are # updated, since the PMs don't match the command objects in the # debug prints (see below, when entering or exiting Break Strands) -- # or maybe it's a side effect of an exception in entering it, in # current code? Try again when that bug is fixed... #### DOIT # ## debug note: _KLUGE_current_PM returns ## <dna.commands.BreakStrands.BreakStrands_PropertyManager.BreakStrands_PropertyManager ## object at 0xb333858>, but <commands.SelectChunks.SelectChunks_Command.SelectChunks_Command ## object at 0x9f66870>.propMgr is None # # [bruce 080806] pass ## print "debug note: _KLUGE_current_PM returns %r, but %r.propMgr is %r" % \ ## (res, self, self.propMgr) ### if happens, fix; if not, clean up all calls return res except: # I don't know if this can happen msg = "ignoring exception in %r.KLUGE_current_PropertyManager()" % (pw,) print_compact_traceback(msg + ": ") return None pass
0755b022a23dbf261ce87c84c13bf4288ab1762a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/0755b022a23dbf261ce87c84c13bf4288ab1762a/Command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 47, 11778, 7113, 67, 2972, 67, 12728, 12, 2890, 4672, 468, 2848, 3965, 374, 7301, 26, 5324, 3536, 3238, 707, 16, 471, 279, 15290, 21627, 31, 2621, 1475, 11778, 7113, 67, 2972, 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, 389, 47, 11778, 7113, 67, 2972, 67, 12728, 12, 2890, 4672, 468, 2848, 3965, 374, 7301, 26, 5324, 3536, 3238, 707, 16, 471, 279, 15290, 21627, 31, 2621, 1475, 11778, 7113, 67, 2972, 67, ...
return cgitb_catcher.make_cgitb_middleware(PyBlosxomWSGIApp(conf),
return cgitb_catcher.make_cgitb_middleware(PyBlosxomWSGIApp(configini=conf),
def pyblosxom_app_factory(global_config, **local_config): """ App factory for paste. """ from paste import cgitb_catcher conf = global_config.copy() conf.update(local_config) conf.update(dict(local_config=local_config, global_config=global_config)) if "configpydir" in conf: sys.path.insert(0, conf["configpydir"]) return cgitb_catcher.make_cgitb_middleware(PyBlosxomWSGIApp(conf), global_config)
dcf1e26427eda742f77fa9a5f19f6b7cd2dd353a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11836/dcf1e26427eda742f77fa9a5f19f6b7cd2dd353a/pyblosxom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 70, 383, 30319, 362, 67, 2910, 67, 6848, 12, 6347, 67, 1425, 16, 2826, 3729, 67, 1425, 4672, 3536, 4677, 3272, 364, 19401, 18, 3536, 628, 19401, 1930, 276, 6845, 70, 67, 14683, 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, 2395, 70, 383, 30319, 362, 67, 2910, 67, 6848, 12, 6347, 67, 1425, 16, 2826, 3729, 67, 1425, 4672, 3536, 4677, 3272, 364, 19401, 18, 3536, 628, 19401, 1930, 276, 6845, 70, 67, 14683, 2...
self._cur_content = '' def _get_set_flags(self): """Return a listing of all of the flags which are set as positive. """ set_flags = [] for tag in self.flags.keys(): if self.flags[tag] == 1: set_flags.append(tag) return set_flags
self._cur_content = [] self._collect_characters = 0
def __init__(self, consumer, interest_tags, callback_finalizer = None, exempt_tags = []): """Initialize to begin catching and firing off events.
c2b0153ef6f5f687d19aa43803d0c4f374921b8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/c2b0153ef6f5f687d19aa43803d0c4f374921b8b/ParserSupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4765, 16, 16513, 67, 4156, 16, 1348, 67, 6385, 1824, 273, 599, 16, 431, 5744, 67, 4156, 273, 5378, 4672, 3536, 7520, 358, 2376, 1044, 310, 471, 30253, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4765, 16, 16513, 67, 4156, 16, 1348, 67, 6385, 1824, 273, 599, 16, 431, 5744, 67, 4156, 273, 5378, 4672, 3536, 7520, 358, 2376, 1044, 310, 471, 30253, 33...
R = self.base_ring() if base_ring is None else base_ring
if base_ring is None: gens = Sequence(gens) R = gens.universe().base_ring() else: R = base_ring
def span(gens, base_ring=None, check=True, already_echelonized=False): """ Return the `R`-span of gens (a list of vectors) where R = base_ring. EXAMPLES:: sage: V = span([[1,2,5], [2,2,2]], QQ); V Vector space of degree 3 and dimension 2 over Rational Field Basis matrix: [ 1 0 -3] [ 0 1 4] sage: span([V.gen(0)], QuadraticField(-7,'a')) Vector space of degree 3 and dimension 1 over Number Field in a with defining polynomial x^2 + 7 Basis matrix: [ 1 0 -3] sage: span([[1,2,3], [2,2,2], [1,2,5]], GF(2)) Vector space of degree 3 and dimension 1 over Finite Field of size 2 Basis matrix: [1 0 1] TESTS:: sage: span([[1,2,3], [2,2,2], [1,2/3,5]], ZZ) Free module of degree 3 and rank 3 over Integer Ring Echelon basis matrix: [ 1 0 13] [ 0 2/3 6] [ 0 0 14] sage: span([[1,2,3], [2,2,2], [1,2,QQ['x'].gen()]], ZZ) Traceback (most recent call last): ... ValueError: The elements of gens (= [[1, 2, 3], [2, 2, 2], [1, 2, x]]) must be defined over base_ring (= Integer Ring) or its field of fractions. For backwards compatibility one can also give the base ring as the first argument:: sage: span(QQ,[[1,2],[3,4]]) Vector space of degree 2 and dimension 2 over Rational Field Basis matrix: [1 0] [0 1] """ if ring.is_Ring(gens): # we allow the old input format with first input the base_ring. base_ring, gens = gens, base_ring R = self.base_ring() if base_ring is None else base_ring if not isinstance(R, principal_ideal_domain.PrincipalIdealDomain): raise TypeError, "The base_ring (= %s) must be a principal ideal domain."%R if len(gens) == 0: return FreeModule(R, 0) else: x = gens[0] if isinstance(x,(list,tuple)): try: gens = [ [ R(c) for c in v ] for v in gens ] except TypeError: R = R.fraction_field() try: gens = [ [ R(c) for c in v ] for v in gens ] except TypeError: raise ValueError, \ "The elements of gens (= %s) must be defined over "%gens + \ "base_ring (= %s) or its field of fractions."%base_ring M = FreeModule(R,len(x)) else: M = x.parent() return M.span(gens=gens, base_ring=base_ring, check=check, already_echelonized=already_echelonized)
a4222de62e58b23efc51410ae4a70f7c9c818034 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a4222de62e58b23efc51410ae4a70f7c9c818034/free_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4548, 12, 23730, 16, 1026, 67, 8022, 33, 7036, 16, 866, 33, 5510, 16, 1818, 67, 8987, 292, 265, 1235, 33, 8381, 4672, 3536, 2000, 326, 1375, 54, 68, 17, 3969, 434, 314, 773, 261, 69,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4548, 12, 23730, 16, 1026, 67, 8022, 33, 7036, 16, 866, 33, 5510, 16, 1818, 67, 8987, 292, 265, 1235, 33, 8381, 4672, 3536, 2000, 326, 1375, 54, 68, 17, 3969, 434, 314, 773, 261, 69,...
self.enter() self.dispatch(t.body) self.leave()
self.write(")") self.enter() self.dispatch(t.body) self.leave() def _For(self, t): self.fill("for ") self.dispatch(t.target) self.write(" in ") self.dispatch(t.iter) self.enter() self.dispatch(t.body) self.leave() if t.orelse: self.fill("else") self.enter() self.dispatch(t.orelse) self.leave
self.fill("def "+t.name + "(")
abdcc23a326c677816e7fc6af76d81f37581157f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/abdcc23a326c677816e7fc6af76d81f37581157f/unparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 365, 18, 5935, 2932, 536, 13773, 88, 18, 529, 397, 12452, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 365, 18, 5935, 2932, 536, 13773, 88, 18, 529, 397, 12452, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
table_skeleton e.g.: {'col1': {'sql':'INTEGER', 'index':False, 'primary_key':False}, ...}
EXAMPLE: sage: D = SQLDatabase() sage: table_skeleton = { ... 'graph6':{'sql':'STRING', 'index':True, 'primary_key':True}, ... 'vertices':{'sql':'INTEGER'}, ... 'edges':{'sql':'INTEGER'} ... } sage: D.create_table('simon', table_skeleton) sage: D.show('simon') edges graph6 vertices ------------------------------------------------------------ EMILY - MAKE NOTE IN DOCS THAT TO GET AN AUTO-INCREMENTING PRIMARY KEY, YOU MUST USE THE FULL WORD *INTEGER* INSTEAD OF *INT*, since this makes no sense to me.
def create_table(self, table_name, table_skeleton): """ MAKE NOTE IN DOCS THAT TO GET AN AUTO-INCREMENTING PRIMARY KEY, YOU MUST USE THE FULL WORD *INTEGER* INSTEAD OF *INT*. INPUT: table_name -- deurrrrrrrrrrr table_skeleton -- a double-indexed dictionary outer key - column name inner key - one of the following: primary_key - boolean, whether column has been set as primary key index - boolean, whether column has been set as index sql - one of 'STRING', 'BOOLEAN', 'INTEGER', 'REAL', or other user defined type
12098d45ba68813e42a6a22032a2f2e6d360e158 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/12098d45ba68813e42a6a22032a2f2e6d360e158/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 12, 2890, 16, 1014, 67, 529, 16, 1014, 67, 7771, 12143, 4672, 3536, 19316, 6859, 5219, 2120, 5467, 4596, 7662, 789, 8493, 4978, 8175, 17191, 17, 29836, 1360, 20058, 5311, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 12, 2890, 16, 1014, 67, 529, 16, 1014, 67, 7771, 12143, 4672, 3536, 19316, 6859, 5219, 2120, 5467, 4596, 7662, 789, 8493, 4978, 8175, 17191, 17, 29836, 1360, 20058, 5311, ...
os.system('%s -c "import openalea.deploygui.alea_install_gui as gui; gui.main()"'%(sys.executable))
def install_setuptools(): # INSTALL Setup tools if len(sys.argv)>2 and sys.argv[1]=='--md5update': update_md5(sys.argv[2:]) else: main(sys.argv[1:])
d62bb9bdf7a1d3c3d513fa3321f84c6cbaa3dcf8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4914/d62bb9bdf7a1d3c3d513fa3321f84c6cbaa3dcf8/ez_alea_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 542, 30693, 13332, 468, 22880, 4685, 10939, 8513, 309, 562, 12, 9499, 18, 19485, 13, 34, 22, 471, 2589, 18, 19485, 63, 21, 65, 18920, 413, 1264, 25, 2725, 4278, 1089, 67, 126...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 542, 30693, 13332, 468, 22880, 4685, 10939, 8513, 309, 562, 12, 9499, 18, 19485, 13, 34, 22, 471, 2589, 18, 19485, 63, 21, 65, 18920, 413, 1264, 25, 2725, 4278, 1089, 67, 126...
f = theano.function([m], v)
f = theano.function([m], v, mode=mode)
def test_rebroadcast_rebroadcast(self): m = T.matrix() s = T.addbroadcast(m, 0, 1) v = T.unbroadcast(s, 1) f = theano.function([m], v) f([[76]]) e = f.maker.env.toposort() assert len([n for n in e if isinstance(n.op, T.Rebroadcast)]) == 1
cced27f19b65357b1b41c7adf802b981daa9f12d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/cced27f19b65357b1b41c7adf802b981daa9f12d/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 266, 19805, 67, 266, 19805, 12, 2890, 4672, 312, 273, 399, 18, 5667, 1435, 272, 273, 399, 18, 1289, 19805, 12, 81, 16, 374, 16, 404, 13, 331, 273, 399, 18, 318, 19805, 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, 1842, 67, 266, 19805, 67, 266, 19805, 12, 2890, 4672, 312, 273, 399, 18, 5667, 1435, 272, 273, 399, 18, 1289, 19805, 12, 81, 16, 374, 16, 404, 13, 331, 273, 399, 18, 318, 19805, 12, ...
may be passed as (script_name, callable) pairs. Script_name values should not end in a slash. If the script_name refers to the root of the URI, it should be an empty string (not "/").
may be passed as (path_prefix, app) pairs.
exec """def %s(self, *args):
acc42149c6f09db3b7c163286ba44aeeee07fb89 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/82/acc42149c6f09db3b7c163286ba44aeeee07fb89/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1196, 3536, 536, 738, 87, 12, 2890, 16, 380, 1968, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1196, 3536, 536, 738, 87, 12, 2890, 16, 380, 1968, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
] class SpecialIncludeTestCase(DocutilsTestSupport.ParserTestCase): def test_parser(self): if self.run_in_debugger: pdb.set_trace() document = DocutilsTestSupport.utils.new_document( 'test data', self.settings) DocutilsTestSupport.roles._roles = {} self.parser.parse(self.input, document) output = document.pformat() self.assert_(re.match(self.expected_regex, output), "Real output:\n" + output + "\nExpected output:\n" + self.expected_regex) input = """\
["""\
def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) s.addTestCase( SpecialIncludeTestCase, 'test_parser', SpecialIncludeTestCase.input, SpecialIncludeTestCase.expected_regex) return s
71c178648bb95a4d378360c7a9c15e7bbfd51d04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/71c178648bb95a4d378360c7a9c15e7bbfd51d04/test_include.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 2678, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 272, 18, 1289, 4709, 2449, 12, 13409, 8752, 4709, 2449, 16, 296, 381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 2678, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 272, 18, 1289, 4709, 2449, 12, 13409, 8752, 4709, 2449, 16, 296, 381...
edition["publish_country"] = str(f)[15:17] edition["language"] = "ISO:" + str(f)[35:38]
edition["publish_country"] = str(f)[15:18] edition["languages"] = ["ISO:" + str(f)[35:38]]
def parser(source_id, file_locator, input): for r in MARC21BiblioFile (input): edition = {} edition['source_record_loc'] = [encode_record_locator (r, file_locator)] curr_loc = edition['source_record_loc'][0] if len(r.get_fields('001')) > 1: continue field_1 = r.get_field_value('001') field_3 = r.get_field_value('003') if field_1 and field_3: edition['source_record_id'] = [record_id_delimiter.join ([source_id, field_1.strip(), field_3.strip()])] find_table_of_contents(r, edition) find_authors(r, edition) find_contributions(r, edition) find_title(r, edition) if not "title" in edition: continue find_other_titles(r, edition) find_work_title(r, edition) find_edition(r, edition) find_publisher(r, edition) find_pagination(r, edition) find_subjects(r, edition) find_subject_place(r, edition) find_subject_time(r, edition) find_genre(r, edition) find_series(r, edition) find_description(r, edition) find_table_of_contents(r, edition) find_dewey_number(r, edition) find_lc_classification(r, edition) find_isbn(r, edition) find_oclc(r, edition) find_lccn(r, edition) find_url(r, edition) if len(r.get_fields('008')) > 1: continue f = r.get_field('008') edition["publish_date"] = str(f)[7:11] edition["publish_country"] = str(f)[15:17] edition["language"] = "ISO:" + str(f)[35:38] yield edition
3fee476d3cbd5a47aee5bf4252db8b9af8150d77 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/3fee476d3cbd5a47aee5bf4252db8b9af8150d77/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2082, 12, 3168, 67, 350, 16, 585, 67, 20048, 16, 810, 4672, 364, 436, 316, 490, 27206, 5340, 38, 495, 549, 83, 812, 261, 2630, 4672, 28432, 273, 2618, 28432, 3292, 3168, 67, 3366, 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, 2082, 12, 3168, 67, 350, 16, 585, 67, 20048, 16, 810, 4672, 364, 436, 316, 490, 27206, 5340, 38, 495, 549, 83, 812, 261, 2630, 4672, 28432, 273, 2618, 28432, 3292, 3168, 67, 3366, 67, ...
usage(1)
sys.exit("Usage: %s [-d|--database all|type] [-v[v]] [--extra-verbose|--super-verbose] [--inserts] [--coverage]" % sys.argv[0])
def main(): import unittest from getopt import getopt, GetoptError try: options, arguments = getopt(sys.argv[1:], "d:v", ["database=", "extra-verbose", "super-verbose", "inserts", "coverage"]) except GetoptError: usage(1) dbs = [] newArgs = [] doCoverage = False verbose = 0 for option, value in options: if option in ('-d', '--database'): dbs.append(value) elif option == '--inserts': SQLObjectTest.debugInserts = True elif option == '--coverage': # Handled earlier, so we get better coverage doCoverage = True elif option == '--extra-verbose': verbose = 1 elif option == '--super-verbose': verbose = 2 elif option == '-v': verbose += 1 if verbose >= 1: SQLObjectTest.debugSQL = True if verbose >= 2: SQLObjectTest.debugOutput = True newArgs.append('-vv') newArgs.extend(arguments) sys.argv = [sys.argv[0]] + newArgs if not dbs: dbs = ['mysql'] if dbs == ['all']: dbs = supportedDatabases() for db in dbs: print 'Testing %s' % db curr_db = db setDatabaseType(db) try: unittest.main() except SystemExit: pass if doCoverage: coverage.stop() coverModules()
fcd3ebada5f9000bb2880da9484df78c7113f5fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/fcd3ebada5f9000bb2880da9484df78c7113f5fa/test_sqlobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 2836, 3813, 628, 336, 3838, 1930, 336, 3838, 16, 968, 3838, 668, 225, 775, 30, 702, 16, 1775, 273, 336, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 72, 30, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1930, 2836, 3813, 628, 336, 3838, 1930, 336, 3838, 16, 968, 3838, 668, 225, 775, 30, 702, 16, 1775, 273, 336, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 72, 30, 9...
print "ssh: %s" % (command,)
print "ssh: %s" % command
def run(self, command, timeout=3600, ignore_status=False, stdout_tee=None, stderr_tee=None, connect_timeout=30): """ Run a command on the remote host. Args: command: the command line string timeout: time limit in seconds before attempting to kill the running process. The run() function will take a few seconds longer than 'timeout' to complete if it has to kill the process. ignore_status: do not raise an exception, no matter what the exit code of the command is. Returns: a hosts.base_classes.CmdResult object Raises: AutoservRunError: the exit code of the command execution was not 0 AutoservSSHTimeout: ssh connection has timed out """ stdout = stdout_tee or sys.stdout stderr = stderr_tee or sys.stdout print "ssh: %s" % (command,) env = " ".join("=".join(pair) for pair in self.env.iteritems()) full_cmd = '%s "%s %s"' % (self.ssh_command(connect_timeout), env, utils.sh_escape(command)) try: result = utils.run(full_cmd, timeout, True, stdout, stderr) # we get a CmdError here only if there is timeout of that command. # Catch that and stuff it into AutoservRunError and raise it. except error.CmdError, cmderr: raise error.AutoservRunError(cmderr.args[0], cmderr.args[1])
1e2ce83a87cd61c21ae5660a0769f5db77e32ddc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/1e2ce83a87cd61c21ae5660a0769f5db77e32ddc/ssh_host.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 1296, 16, 2021, 33, 5718, 713, 16, 2305, 67, 2327, 33, 8381, 16, 3909, 67, 22579, 33, 7036, 16, 4514, 67, 22579, 33, 7036, 16, 3077, 67, 4538, 33, 5082, 4672, 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, 1086, 12, 2890, 16, 1296, 16, 2021, 33, 5718, 713, 16, 2305, 67, 2327, 33, 8381, 16, 3909, 67, 22579, 33, 7036, 16, 4514, 67, 22579, 33, 7036, 16, 3077, 67, 4538, 33, 5082, 4672, 353...
f.close(); f=None
f.close(); f=None
def check_pth_processing(self): """Empirically verify whether .pth files are supported in inst. dir""" instdir = self.install_dir log.info("Checking .pth file support in %s", instdir) pth_file = self.pseudo_tempname()+".pth" ok_file = pth_file+'.ok' ok_exists = os.path.exists(ok_file) try: if ok_exists: os.unlink(ok_file) f = open(pth_file,'w') except (OSError,IOError): self.cant_write_to_target() else: try: f.write("import os;open(%r,'w').write('OK')\n" % (ok_file,)) f.close(); f=None executable = sys.executable if os.name=='nt': dirname,basename = os.path.split(executable) alt = os.path.join(dirname,'pythonw.exe') if basename.lower()=='python.exe' and os.path.exists(alt): # use pythonw.exe to avoid opening a console window executable = alt from distutils.spawn import spawn spawn([executable,'-E','-c','pass'],0)
71aeed6af15f476a6af8b6ac10628d11fcf18358 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/71aeed6af15f476a6af8b6ac10628d11fcf18358/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2397, 67, 10632, 12, 2890, 4672, 3536, 41, 1291, 481, 6478, 3929, 2856, 263, 2397, 1390, 854, 3260, 316, 1804, 18, 1577, 8395, 1804, 1214, 273, 365, 18, 5425, 67, 1214, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2397, 67, 10632, 12, 2890, 4672, 3536, 41, 1291, 481, 6478, 3929, 2856, 263, 2397, 1390, 854, 3260, 316, 1804, 18, 1577, 8395, 1804, 1214, 273, 365, 18, 5425, 67, 1214, 613, 1...
log.debug("%s: writing test data to port %d.", router.nickname, port) write_sock.send(test_data[port])
log.debug("(%s, %d): writing test data.", router.nickname, port) try: write_sock.send(test_data[port]) except socket.error, e: if e.errno == errno.ECONNRESET: log.debug("(%s, %d): Connection reset by peer.", router.nickname, port) send_sockets.remove(write_sock) continue
def exit_test(self, router): """ Perform port and IP tests on router. Will block until all port tests are finished. Can raise the following errors: socket.error - errno == errno.ECONNREFUSED: Tor refused our SOCKS connected. """ test_data = {} test_ports = [] recv_sockets = [] listen_sockets = [] self.test_exit = router
4c865d62c51c3e1a9d19c722ba2e4c12fc91c4eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/4c865d62c51c3e1a9d19c722ba2e4c12fc91c4eb/torbel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2427, 67, 3813, 12, 2890, 16, 4633, 4672, 3536, 11217, 1756, 471, 2971, 7434, 603, 4633, 18, 9980, 1203, 3180, 777, 1756, 7434, 854, 6708, 18, 4480, 1002, 326, 3751, 1334, 30, 2987, 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, 2427, 67, 3813, 12, 2890, 16, 4633, 4672, 3536, 11217, 1756, 471, 2971, 7434, 603, 4633, 18, 9980, 1203, 3180, 777, 1756, 7434, 854, 6708, 18, 4480, 1002, 326, 3751, 1334, 30, 2987, 18, ...
sage: sage.algebras.quaternion_algebra.QuaternionAlgebra_abstract.inner_product_matrix(Q)
sage: Q.inner_product_matrix()
def inner_product_matrix(self): """ Return the inner product matrix associated to self.
48b328d83169177c002516f19cf8242db1504925 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/48b328d83169177c002516f19cf8242db1504925/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 5896, 67, 5667, 12, 2890, 4672, 3536, 2000, 326, 3443, 3017, 3148, 3627, 358, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 5896, 67, 5667, 12, 2890, 4672, 3536, 2000, 326, 3443, 3017, 3148, 3627, 358, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
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))
7d819cbf1df622e9f76b4801233dbb334f44d362 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7d819cbf1df622e9f76b4801233dbb334f44d362/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...
return "<NetworkOperator %s%s, %s %d>" % args
return "<NetworkOperator %s, %s, %s %s>" % args
def __repr__(self): args = (self.name.capitalize(), self.country.capitalize(), self.netid, self.type) return "<NetworkOperator %s%s, %s %d>" % args
a4d5d11d46f704ceef14b8a7ed69eefecffb21b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/a4d5d11d46f704ceef14b8a7ed69eefecffb21b6/provider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 833, 273, 261, 2890, 18, 529, 18, 5909, 7053, 554, 9334, 365, 18, 9082, 18, 5909, 7053, 554, 9334, 365, 18, 2758, 350, 16, 365, 18, 723, 13, 327, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 833, 273, 261, 2890, 18, 529, 18, 5909, 7053, 554, 9334, 365, 18, 9082, 18, 5909, 7053, 554, 9334, 365, 18, 2758, 350, 16, 365, 18, 723, 13, 327, 35...
def SetOperationMode(self,component_name,mode):
def SetOperationMode(self,component_name,mode,blocking=False):
def SetOperationMode(self,component_name,mode): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param(component_name + "_controller/OperationMode",mode)
e6c0a8383d72f106d988f8f3c752027bfe5c28f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12032/e6c0a8383d72f106d988f8f3c752027bfe5c28f1/simple_script_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 2988, 2309, 12, 2890, 16, 4652, 67, 529, 16, 3188, 16, 18926, 33, 8381, 4672, 721, 30884, 18, 1330, 1376, 2932, 8920, 2296, 9, 87, 9778, 358, 1674, 1965, 2296, 9, 87, 34, 2984, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2988, 2309, 12, 2890, 16, 4652, 67, 529, 16, 3188, 16, 18926, 33, 8381, 4672, 721, 30884, 18, 1330, 1376, 2932, 8920, 2296, 9, 87, 9778, 358, 1674, 1965, 2296, 9, 87, 34, 2984, ...
value = str(value) if isinstance(value, basestring): if _isinfinity(value): self._exp = 'F' self._int = (0,) sign = _isinfinity(value) if sign == 1: self._sign = 0 else: self._sign = 1 return if _isnan(value): sig, sign, diag = _isnan(value) if len(diag) > context.prec: self._sign, self._int, self._exp = \ context._raise_error(ConversionSyntax) return if sig == 1: self._exp = 'n' else: self._exp = 'N' self._sign = sign self._int = tuple(map(int, diag)) return try: self._sign, self._int, self._exp = _string2exact(value) except ValueError: self._sign, self._int, self._exp = context._raise_error(ConversionSyntax) return
if value >= 0: self._sign = 0 else: self._sign = 1 self._exp = 0 self._int = tuple(map(int, str(abs(value)))) return self
def __init__(self, value="0", context=None): """Create a decimal point instance.
636a6b100fe6083388bc5315758326078abe65b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/636a6b100fe6083388bc5315758326078abe65b4/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 1546, 20, 3113, 819, 33, 7036, 4672, 3536, 1684, 279, 6970, 1634, 791, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 1546, 20, 3113, 819, 33, 7036, 4672, 3536, 1684, 279, 6970, 1634, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print"</p>"
print"</p>"
def processLine(linein): global level, formatMode, slides, hideComments, inBodyText lineLevel = getLineLevel(linein) if ((hideComments == 0) or (lineLevel != (find(linein,"[")+1))): if (formatMode == "simple"): print "<H" + str(lineLevel) + ">" + lstrip(linein) + "</H" + str(lineLevel) + ">" else: if (lineLevel > level): while (lineLevel > level): if (formatMode == "bullets"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<UL>" elif (formatMode == "roman"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL type=\"I\">" elif (formatMode == "numeric"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL type=\"1\">" elif (formatMode == "alpha"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL type=\"A\">" elif (formatMode == "indent"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "<OL>" else: sys.exit("Error! Unknown formatMode type") level = level + 1 elif (lineLevel < level): while (lineLevel < level): if (formatMode == "bullets"): if (inBodyText == 1): print"</p>" inBodyText = 0 print "</UL>" else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "</OL>" level = level - 1 else: print if (lstrip(rstrip(linein)) == "----------------------------------------"): print "<br><br><hr><br>" else: if (slides == 0): if (lineLevel == find(linein," ") +1 ): if (inBodyText == 0): print "<p>" + lstrip(linein) inBodyText = 1 else: print lstrip(linein) else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "<LI>" + lstrip(linein) else: if (lineLevel == 1): if (linein[0] == " "): if (inBodyText == 0): print "<p>" + lstrip(linein) inBodyText = 1 else: print lstrip(linein) else: print "<address>" print lstrip(linein) print "</address>\n" else: if (lineLevel == find(linein," ") +1): if (inBodyText == 0): print "<p>" + lstrip(linein) inBodyText = 1 else: print lstrip(linein) else: if (inBodyText == 1): print"</p>" inBodyText = 0 print "<LI>" + lstrip(linein)
5d9b0fe6e9c819a5a11c56a209bf18b3e56827fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/5d9b0fe6e9c819a5a11c56a209bf18b3e56827fe/otl2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1670, 12, 1369, 267, 4672, 2552, 1801, 16, 740, 2309, 16, 30119, 16, 6853, 9051, 16, 316, 2250, 1528, 980, 2355, 273, 9851, 2355, 12, 1369, 267, 13, 309, 14015, 11248, 9051, 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, 1207, 1670, 12, 1369, 267, 4672, 2552, 1801, 16, 740, 2309, 16, 30119, 16, 6853, 9051, 16, 316, 2250, 1528, 980, 2355, 273, 9851, 2355, 12, 1369, 267, 13, 309, 14015, 11248, 9051, 422, ...
except ParseError:
else:
def process_assignment(self, line, parent_docs, prev_line_doc, lineno, comments, decorators): # If we're not in a namespace, then ignore it. if not (isinstance(parent_docs[-1], NamespaceDoc) or (isinstance(parent_docs[-1], InstanceMethodDoc) and parent_docs[-1].canonical_name != UNKNOWN and parent_docs[-1].canonical_name[-1] == '__init__')): return None
8aea11fb7527a8766f178e72bab2db07263bf944 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/8aea11fb7527a8766f178e72bab2db07263bf944/docparser_quick.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 12960, 12, 2890, 16, 980, 16, 982, 67, 8532, 16, 2807, 67, 1369, 67, 2434, 16, 7586, 16, 5678, 16, 19423, 4672, 468, 971, 732, 4565, 486, 316, 279, 1981, 16, 1508, 2305, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12960, 12, 2890, 16, 980, 16, 982, 67, 8532, 16, 2807, 67, 1369, 67, 2434, 16, 7586, 16, 5678, 16, 19423, 4672, 468, 971, 732, 4565, 486, 316, 279, 1981, 16, 1508, 2305, 51...
source.close() getline(source_name, 1)
getline(source_name, 1)
def test_checkcache(self): getline = linecache.getline try: # Create a source file and cache its contents source_name = support.TESTFN + '.py' with open(source_name, 'w') as source: source.write(SOURCE_1) source.close() getline(source_name, 1)
044e4c9c6da3b4e39f47e76304c6d9c5e30271e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/044e4c9c6da3b4e39f47e76304c6d9c5e30271e1/test_linecache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
else: self.sendCode(451, 'Requested action aborted: error in processing')
elif reason.check(SMTPAddressError): self.sendCode(reason.value.code, reason.value.resp) else: self.sendCode(451, 'Requested action aborted: local error in processing')
def _ebAuthenticated(self, reason): self.challenge = None if reason.check(cred.error.UnauthorizedLogin): self.sendCode(535, 'Authentication failed') else: self.sendCode(451, 'Requested action aborted: error in processing') log.err(reason)
1170bde3fe634dd3cc7b050c30af0e5f44a01304 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1170bde3fe634dd3cc7b050c30af0e5f44a01304/smtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24008, 15606, 12, 2890, 16, 3971, 4672, 365, 18, 25092, 273, 599, 309, 3971, 18, 1893, 12, 20610, 18, 1636, 18, 13981, 5358, 4672, 365, 18, 4661, 1085, 12, 25, 4763, 16, 296, 6492...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24008, 15606, 12, 2890, 16, 3971, 4672, 365, 18, 25092, 273, 599, 309, 3971, 18, 1893, 12, 20610, 18, 1636, 18, 13981, 5358, 4672, 365, 18, 4661, 1085, 12, 25, 4763, 16, 296, 6492...
out = get_text_snippets(text_path, stemmed_patterns, nb_words_around, max_snippets)
out = get_text_snippets(text_path, stemmed_patterns, nb_words_around, max_snippets, False)
def get_pdf_snippets(recID, patterns, nb_words_around=CFG_WEBSEARCH_FULLTEXT_SNIPPETS_WORDS, max_snippets=CFG_WEBSEARCH_FULLTEXT_SNIPPETS): """ Extract text snippets around 'patterns' from the newest PDF file of 'recID' The search is case-insensitive. The snippets are meant to look like in the results of the popular search engine: using " ... " between snippets. For empty patterns it returns "" """ from invenio.bibdocfile import BibRecDocs text_path = "" text_path_courtesy = "" for bd in BibRecDocs(recID).list_bibdocs(): if bd.get_text(): text_path = bd.get_text_path() text_path_courtesy = bd.get_status() if not text_path_courtesy and CFG_INSPIRE_SITE: text_path_courtesy = bd.get_type() break # stop at the first good PDF textable file if text_path: out = get_text_snippets(text_path, patterns, nb_words_around, max_snippets) if not out: # no hit, so check stemmed versions: from invenio.bibindex_engine_stemmer import stem stemmed_patterns = [stem(p, 'en') for p in patterns] out = get_text_snippets(text_path, stemmed_patterns, nb_words_around, max_snippets) if out: out_courtesy = "" if text_path_courtesy: out_courtesy = '<strong>Snippets courtesy of ' + text_path_courtesy + '</strong><br>' return """<div class="snippetbox">%s%s</div>""" % (out_courtesy, out) else: return "" else: return ""
6b78cdbf46abc2b1fee1cced9c2333e441526971 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/6b78cdbf46abc2b1fee1cced9c2333e441526971/bibformat_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7699, 67, 8134, 16664, 12, 3927, 734, 16, 6884, 16, 4264, 67, 3753, 67, 12716, 33, 19727, 67, 14778, 17251, 67, 18111, 5151, 67, 13653, 2579, 1423, 8047, 67, 23287, 16, 943, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7699, 67, 8134, 16664, 12, 3927, 734, 16, 6884, 16, 4264, 67, 3753, 67, 12716, 33, 19727, 67, 14778, 17251, 67, 18111, 5151, 67, 13653, 2579, 1423, 8047, 67, 23287, 16, 943, 6...
""" % rnkNAME
"""
def perform_modifycollection(rnkID='', ln=cdslang, func='', colID='', confirm=0): """Modify which collections the rank method is visible to""" output = "" subtitle = "" if rnkID: rnkNAME = get_current_name(rnkID, ln, get_rnk_nametypes()[0][0], "rnkMETHOD")[0][1] if func in ["0", 0] and confirm in ["1", 1]: finresult = attach_col_rnk(rnkID, colID) elif func in ["1", 1] and confirm in ["1", 1]: finresult = detach_col_rnk(rnkID, colID) if colID: colNAME = get_current_name(colID, ln, get_col_nametypes()[0][0], "collection")[0][1] subtitle = """Step 1 - Select collection to enable/disable rank method '%s' for""" % rnkNAME output = """ <dl> <dt>Enable for:</dt> <dd>To make the rank method visible in the search interface for a collection, choose the wanted collection and press the "Enable" button.</dd> <dt>Disable for:</dt> <dd>To hide the rank method from the search interface for a collection, choose the wanted collection and press the "Disable" button.</dd> <dt>'%s' is currently enabled for the following collections:</dt> <dd> """ % rnkNAME col_list = get_rnk_col(rnkID, ln) if not col_list: output += """No collections""" else: for (id, name) in col_list: output += """%s, """ % name output += """</dd> </dl> """ col_list = get_current_name('', ln, get_col_nametypes()[0][0], "collection") col_rnk = dict(get_rnk_col(rnkID)) col_list = filter(lambda x: not col_rnk.has_key(x[0]), col_list) if col_list: text = """ <span class="adminlabel">Enable for:</span> <select name="colID" class="admin_w200"> <option value="">- select collection -</option> """ for (id, name) in col_list: text += """<option value="%s" %s>%s</option>""" % (id, (func in ["0", 0] and confirm in ["0", 0] and colID and int(colID) == int(id)) and 'selected="selected"' or '' , name) text += """</select>""" output += createhiddenform(action="modifycollection", text=text, button="Enable", rnkID=rnkID, ln=ln, func=0, confirm=0) if confirm in ["0", 0] and func in ["0", 0] and colID: subtitle = "Step 2 - Confirm to enable rank method for the chosen collection" text = "<b><p>Please confirm to enable rank method '%s' for the collection '%s'</p></b>" % (rnkNAME, colNAME) output += createhiddenform(action="modifycollection", text=text, button="Confirm", rnkID=rnkID, ln=ln, colID=colID, func=0, confirm=1) elif confirm in ["1", 1] and func in ["0", 0] and colID: subtitle = "Step 3 - Result" if finresult: output += """<b><span class="info">Rank method '%s' enabled for collection '%s'</span></b>""" % (rnkNAME, colNAME) else: output += """<b><span class="info">Rank method '%s' could not be enabled for collection '%s'</span></b>""" % (rnkNAME[0], colNAME) col_list = get_rnk_col(rnkID, ln) if col_list: text = """ <span class="adminlabel">Disable for:</span> <select name="colID" class="admin_w200"> <option value="">- select collection -</option> """ for (id, name) in col_list: text += """<option value="%s" %s>%s</option>""" % (id, (func in ["1", 1] and confirm in ["0", 0] and colID and int(colID) == int(id)) and 'selected="selected"' or '' , name) text += """</select>""" output += createhiddenform(action="modifycollection", text=text, button="Disable", rnkID=rnkID, ln=ln, func=1, confirm=0) if confirm in ["0", 0] and func in ["1", 1] and colID: subtitle = "Step 2 - Confirm to disable rank method for collection" text = "<b><p>Please confirm to disable rank method '%s' for collection '%s'</p></b>" % (rnkNAME, colNAME) output += createhiddenform(action="modifycollection", text=text, button="Confirm", rnkID=rnkID, ln=ln, colID=colID, func=1, confirm=1) elif confirm in ["1", 1] and func in ["1", 1] and colID: subtitle = "Step 3 - Result" if finresult: output += """<b><span class="info">Rank method '%s' disabled for collection '%s'</span></b>""" % (rnkNAME, colNAME) else: output += """<b><span class="info">Rank method '%s' could not be disabled for collection '%s'</span></b>""" % (rnkNAME, colNAME) try: body = [output, extra] except NameError: body = [output] return addadminbox(subtitle + """&nbsp;&nbsp&nbsp;<small>[<a href="%s/admin/bibrank/guide.html#mc">?</a>]</small>""" % weburl, body)
a6a2a3f836d914026219bf3610ec841b23ae03ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/a6a2a3f836d914026219bf3610ec841b23ae03ce/bibrankadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 17042, 5548, 12, 27639, 79, 734, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 1326, 2218, 2187, 645, 734, 2218, 2187, 6932, 33, 20, 4672, 3536, 11047, 1492, 6980, 326, 6171, 707,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 17042, 5548, 12, 27639, 79, 734, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 1326, 2218, 2187, 645, 734, 2218, 2187, 6932, 33, 20, 4672, 3536, 11047, 1492, 6980, 326, 6171, 707,...
print("|--------------------------------------|") print("| Running test with generic interface. |") print("|--------------------------------------|") pymw_interface = interfaces.generic.GenericInterface() pymw_suite = unittest.TestLoader().loadTestsFromTestCase(TestPyMW) unittest.TextTestRunner(verbosity=2).run(pymw_suite) print("|----------------------------------|") print("| Running test with bad interface. |") print("|----------------------------------|") interface_suite = unittest.TestLoader().loadTestsFromTestCase(TestBadInterface) unittest.TextTestRunner(verbosity=2).run(interface_suite)
if len(sys.argv) == 1 or "--generic" in sys.argv: print("|--------------------------------------|") print("| Running test with generic interface. |") print("|--------------------------------------|") pymw_interface = interfaces.generic.GenericInterface pymw_suite = unittest.TestLoader().loadTestsFromTestCase(TestPyMW) unittest.TextTestRunner(verbosity=2).run(pymw_suite) if len(sys.argv) == 1 or "--generic" in sys.argv: print("|----------------------------------|") print("| Running test with bad interface. |") print("|----------------------------------|") interface_suite = unittest.TestLoader().loadTestsFromTestCase(TestBadInterface) unittest.TextTestRunner(verbosity=2).run(interface_suite)
def testStandardOperation(self): """Test standard operation with null worker program""" num_tasks = 10 actual_total = num_tasks*(num_tasks-1)/2
c642f9dafd96659e8df31f4905d45bd50903cd2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8868/c642f9dafd96659e8df31f4905d45bd50903cd2d/test_cases.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 8336, 2988, 12, 2890, 4672, 3536, 4709, 4529, 1674, 598, 446, 4322, 5402, 8395, 818, 67, 9416, 273, 1728, 3214, 67, 4963, 273, 818, 67, 9416, 21556, 2107, 67, 9416, 17, 21, 13176, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 8336, 2988, 12, 2890, 4672, 3536, 4709, 4529, 1674, 598, 446, 4322, 5402, 8395, 818, 67, 9416, 273, 1728, 3214, 67, 4963, 273, 818, 67, 9416, 21556, 2107, 67, 9416, 17, 21, 13176, ...
return Dec_n1
return _Dec_n1
def compare_total(self, other): """Compares self to other using the abstract representations.
c5de0969ca2a82c66efd30bb675f03c2324a3b27 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/c5de0969ca2a82c66efd30bb675f03c2324a3b27/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4963, 12, 2890, 16, 1308, 4672, 3536, 19199, 365, 358, 1308, 1450, 326, 8770, 27851, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4963, 12, 2890, 16, 1308, 4672, 3536, 19199, 365, 358, 1308, 1450, 326, 8770, 27851, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
encoding = parts[2]
encoding = parts[2].lower()
def decode(s): """Return a decoded string according to RFC 2047, as a unicode string.""" rtn = [] parts = ecre.split(s, 1) while parts: # If there are less than 4 parts, it can't be encoded and we're done if len(parts) < 5: rtn.extend(parts) break # The first element is any non-encoded leading text rtn.append(parts[0]) charset = parts[1] encoding = parts[2] atom = parts[3] # The next chunk to decode should be in parts[4] parts = ecre.split(parts[4]) # The encoding must be either `q' or `b', case-insensitive if encoding.lower() == 'q': func = _qdecode elif encoding.lower() == 'b': func = _bdecode else: func = _identity # Decode and get the unicode in the charset rtn.append(unicode(func(atom), charset)) # Now that we've decoded everything, we just need to join all the parts # together into the final string. return UEMPTYSTRING.join(rtn)
b06ca2ddc40b5033510c264798c22f5758468e6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b06ca2ddc40b5033510c264798c22f5758468e6b/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 87, 4672, 3536, 990, 279, 6383, 533, 4888, 358, 8372, 11492, 27, 16, 487, 279, 5252, 533, 12123, 12119, 273, 5378, 2140, 273, 425, 1793, 18, 4939, 12, 87, 16, 404, 13, 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, 2495, 12, 87, 4672, 3536, 990, 279, 6383, 533, 4888, 358, 8372, 11492, 27, 16, 487, 279, 5252, 533, 12123, 12119, 273, 5378, 2140, 273, 425, 1793, 18, 4939, 12, 87, 16, 404, 13, 1323, ...
InspectableObjectCollectionView.__init__(self, inspector, model, compPal)
InspectableObjectView.__init__(self, inspector, model, compPal)
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass) wxFrame.__init__(self, parent, -1, args['title'], args['pos'], args['size'])#, args['style'], args['name']) InspectableObjectCollectionView.__init__(self, inspector, model, compPal)
3095cf591b9bab682ecbcda45a59ab4acee24fb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/3095cf591b9bab682ecbcda45a59ab4acee24fb6/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 22700, 16, 938, 16, 1161, 14320, 16, 1161, 304, 285, 797, 16, 501, 1767, 4672, 833, 273, 365, 18, 8401, 2615, 12, 2284, 18, 5254, 16, 938, 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, 1001, 2738, 972, 12, 2890, 16, 982, 16, 22700, 16, 938, 16, 1161, 14320, 16, 1161, 304, 285, 797, 16, 501, 1767, 4672, 833, 273, 365, 18, 8401, 2615, 12, 2284, 18, 5254, 16, 938, 18,...
exist. The deletes need to remove entries for both an absolute file path and a Storage Groups
exist. The deletes need to remove entries for both an absolute file path and a Storage Groups
def removeMythvideoSeekTable(self, filename): '''Remove seektable entries for a Mythvideo from the "filemarkup" table. Entries may of may not exist. The deletes need to remove entries for both an absolute file path and a Storage Groups "myth://..." file name definition. return nothing ''' global storagegroups table = u'filemarkup'
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12062, 451, 9115, 16134, 1388, 12, 2890, 16, 1544, 4672, 9163, 3288, 6520, 2121, 3222, 364, 279, 8005, 451, 9115, 628, 326, 315, 768, 15056, 6, 1014, 18, 19411, 2026, 434, 2026, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12062, 451, 9115, 16134, 1388, 12, 2890, 16, 1544, 4672, 9163, 3288, 6520, 2121, 3222, 364, 279, 8005, 451, 9115, 628, 326, 315, 768, 15056, 6, 1014, 18, 19411, 2026, 434, 2026, 48...
basearch=0, nosrc=0):
exactarch=1, nosrc=0):
def getPkgsNewest(rpms, arch=None, arch_hash=None, verbose=0, basearch=0, nosrc=0): # Add all rpms by name,basearch into a hash. h = {} for rpm in rpms: if nosrc and rpm.issrc: continue rarch = rpm.getArch() if basearch: rarch = BuildArchTranslate(rarch) h.setdefault( (rpm["name"], rarch) , []).append(rpm) # For each basearch select one newest rpm. pkgs = [] for r in h.keys(): pkgs.append(selectNewestRpm(h[r], arch, arch_hash, verbose)) if arch: # Add all rpms into a hash by their name. h = {} for rpm in pkgs: if rpm.issrc: continue # Remove all rpms not suitable for this arch. if arch_hash.get(rpm["arch"], 999) == 999: if verbose > 4: print "Removed due to incompatibel arch:", \ rpm.getFilename() continue h.setdefault(rpm["name"], []).append(rpm) # By name find the newest rpm and then decide if a noarch # rpm is the newest (and all others are deleted) or if an # arch-dependent rpm is newest and all noarchs are removed. for rpms in h.values(): newest = selectNewestRpm(rpms, arch, arch_hash, verbose) if newest["arch"] == "noarch": for r in rpms: if r != newest: pkgs.remove(r) else: for r in rpms: if r["arch"] == "noarch": pkgs.remove(r) return pkgs
427871e48b993cbe1bec0e26f0693386c8014c95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/427871e48b993cbe1bec0e26f0693386c8014c95/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 79, 564, 1908, 395, 12, 13832, 959, 16, 6637, 33, 7036, 16, 6637, 67, 2816, 33, 7036, 16, 3988, 33, 20, 16, 1026, 991, 33, 20, 16, 26628, 1310, 33, 20, 4672, 468, 1436, 777, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 79, 564, 1908, 395, 12, 13832, 959, 16, 6637, 33, 7036, 16, 6637, 67, 2816, 33, 7036, 16, 3988, 33, 20, 16, 1026, 991, 33, 20, 16, 26628, 1310, 33, 20, 4672, 468, 1436, 777, ...
self._list_counter = -1
self.list_counter.append(-1)
def visit_bullet_list(self, node): self._list_counter = -1
e20b3a3adf8de70986f2805e2d77e2bc11ff74aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/e20b3a3adf8de70986f2805e2d77e2bc11ff74aa/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 70, 19994, 67, 1098, 12, 2890, 16, 756, 4672, 365, 6315, 1098, 67, 7476, 273, 300, 21, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 70, 19994, 67, 1098, 12, 2890, 16, 756, 4672, 365, 6315, 1098, 67, 7476, 273, 300, 21, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
gLogger.info("RegistrationAgent.execute: File already completed.")
gLogger.info( "RegistrationAgent.execute: File already completed." )
def executeRequest(self): ################################################ # Get a request from request DB res = self.RequestDBClient.getRequest('register') if not res['OK']: gLogger.info("RegistrationAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("RegistrationAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer = res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("RegistrationAgent.execute: Obtained request %s" % requestName)
991ec8b0394b656ec2c67f7fb0b500c383f8babd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/991ec8b0394b656ec2c67f7fb0b500c383f8babd/RegistrationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 400, 273, 365, 18, 691, 2290, 1227, 18, 588, 691, 2668, 4861, 6134, 309, 486, 400, 3292, 3141, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 400, 273, 365, 18, 691, 2290, 1227, 18, 588, 691, 2668, 4861, 6134, 309, 486, 400, 3292, 3141, 3546, ...
gclient_scm.CreateSCM(self.url, self.root_dir, solution_name
gclient.gclient_scm.CreateSCM(self.url, self.root_dir, solution_name
def testRunOnDepsNoDeps(self): solution_name = 'testRunOnDepsNoDeps_solution_name' gclient_config = ( "solutions = [ {\n" " 'name': '%s',\n" " 'url': '%s',\n" " 'custom_deps': {},\n" "} ]\n" ) % (solution_name, self.url)
90ba161b70b445eba62b2a376e4fa2f508854e13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/90ba161b70b445eba62b2a376e4fa2f508854e13/gclient_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1997, 1398, 14430, 2279, 14430, 12, 2890, 4672, 6959, 67, 529, 273, 296, 3813, 1997, 1398, 14430, 2279, 14430, 67, 13385, 67, 529, 11, 314, 2625, 67, 1425, 273, 261, 315, 18281, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1997, 1398, 14430, 2279, 14430, 12, 2890, 4672, 6959, 67, 529, 273, 296, 3813, 1997, 1398, 14430, 2279, 14430, 67, 13385, 67, 529, 11, 314, 2625, 67, 1425, 273, 261, 315, 18281, 61...
return code, self.untagged_responses.get(code, [None])
return self._untagged_response(code, code)
def response(self, code): """Return data for response 'code' if received, or None.
46698bd1f4f6c68089d09c6be3b8ee342ba00bb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/46698bd1f4f6c68089d09c6be3b8ee342ba00bb9/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 2890, 16, 981, 4672, 3536, 990, 501, 364, 766, 296, 710, 11, 309, 5079, 16, 578, 599, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 766, 12, 2890, 16, 981, 4672, 3536, 990, 501, 364, 766, 296, 710, 11, 309, 5079, 16, 578, 599, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.dialog.window.set_cursor(None)
self.dialog.get_window().set_cursor(None)
def os_populate_treeview(self): """ """ if self.model.lock.acquire(False) == False: return True
52925836ae1813f50ca6949f68dbec473741bbf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11070/52925836ae1813f50ca6949f68dbec473741bbf6/opensubtitles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1140, 67, 19936, 67, 3413, 1945, 12, 2890, 4672, 3536, 3536, 309, 365, 18, 2284, 18, 739, 18, 1077, 1039, 12, 8381, 13, 422, 1083, 30, 327, 1053, 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, 1140, 67, 19936, 67, 3413, 1945, 12, 2890, 4672, 3536, 3536, 309, 365, 18, 2284, 18, 739, 18, 1077, 1039, 12, 8381, 13, 422, 1083, 30, 327, 1053, 2, -100, -100, -100, -100, -100, -100,...
error += 'cached VR = %s\n' %self.cache_vr
def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self.__get_paths_for_node(nid) error += "%s got the paths %s\n" %(nid,paths) #We remove the paths that are already displayed if curdis: for pp in self.get_paths_for_node(nid): if pp in paths: paths.remove(pp) error += "path %s is already displayed. Not to add\n"%str(pp) self.trace += " we wont add path %s for %s\n" %(str(pp),nid) node_dic = self.cache_nodes[nid] else: #Not displayed, creating the node node_dic = {} node_dic['paths'] = [] node_dic['parents'] = [] node_dic['children'] = [] # childrens will add themselves afterward if self.cache_nodes.has_key(nid): raise Exception('%s was already a visible node when added' %nid) self.cache_nodes[nid] = node_dic #Now we add each path separately for p in paths: #check that the path is free other = self.get_node_for_path(p) to_readd = [] if other and other != nid: self.trace += " adding %s to path %s but occupied by %s\n"\ %(nid,str(p),other) to_readd = self.__next_nodes(other,p) to_readd.append([other,p]) for t in to_readd: self.__delete_node(t[0],[t[1]]) if p not in node_dic['paths']: #We do all the work only if the node doesn't already #has that path ! node_dic['paths'].append(p) if len(p) > 1: parent = self.get_node_for_path(p[:-1]) if not self.is_displayed(parent): #We should add a node to a non-existing parent break p_child = self.cache_nodes[parent]['children'] if parent not in node_dic['parents']: node_dic['parents'].append(parent) if nid not in p_child: p_child.append(nid)
3ea21cb81161e3d09b3e56c7f94d1f9b5e0adf83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/3ea21cb81161e3d09b3e56c7f94d1f9b5e0adf83/filteredtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 67, 2159, 12, 2890, 16, 31030, 16, 4481, 33, 7036, 4672, 555, 273, 315, 13962, 756, 738, 87, 358, 2953, 738, 87, 64, 82, 6, 8975, 31030, 16, 4481, 13, 365, 18, 5129, 1011...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 67, 2159, 12, 2890, 16, 31030, 16, 4481, 33, 7036, 4672, 555, 273, 315, 13962, 756, 738, 87, 358, 2953, 738, 87, 64, 82, 6, 8975, 31030, 16, 4481, 13, 365, 18, 5129, 1011...
def initWithVideoView_(self, videoView):
def initWithPreviousVideoView_(self, previousMovieView):
def initWithVideoView_(self, videoView): self = super(FullScreenVideoController, self).init() self.videoWindow = FullScreenVideoWindow.alloc().init(videoView).retain() self.videoWindow.controller = self self.delegate = nil return self
bcb8555ae164fb36b5e6d87623581ab40406072f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/bcb8555ae164fb36b5e6d87623581ab40406072f/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 1190, 8351, 10083, 1767, 67, 12, 2890, 16, 2416, 16727, 13120, 1767, 4672, 365, 273, 2240, 12, 5080, 7956, 10083, 2933, 16, 365, 2934, 2738, 1435, 365, 18, 9115, 3829, 273, 11692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1190, 8351, 10083, 1767, 67, 12, 2890, 16, 2416, 16727, 13120, 1767, 4672, 365, 273, 2240, 12, 5080, 7956, 10083, 2933, 16, 365, 2934, 2738, 1435, 365, 18, 9115, 3829, 273, 11692, ...
Compute the p-adic logarithm of any unit in $\Z_p$.
Compute the p-adic logarithm of any nonzero element of $\\Q_p$.
def log(self, branch = None): r""" Compute the p-adic logarithm of any unit in $\Z_p$. (See below for normalization.) The usual power series for log with values in the additive group of $\Z_p$ only converges for 1-units (units congruent to 1 modulo p). However, there is a unique extension of log to a homomorphism defined on all the units. If u = a*v is a unit with v = 1 (mod p), then we define log(u) = log(v). This is the correct extension because the units U of Z_p splits as a product U = V x <w>, where V is the subgroup of 1-units and w is a (p-1)st root of unity. The <w> factor is torsion, so must go to 0 under any homomorphism to the torsion free group $(\Z_p, +)$.
0780026840a08aa901fd7e00aaa4cc716eb639f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0780026840a08aa901fd7e00aaa4cc716eb639f0/padic_generic_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 16, 3803, 273, 599, 4672, 436, 8395, 8155, 326, 293, 17, 20333, 613, 31249, 434, 1281, 16966, 930, 434, 271, 1695, 53, 67, 84, 8, 18, 261, 9704, 5712, 364, 13728, 12998,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 16, 3803, 273, 599, 4672, 436, 8395, 8155, 326, 293, 17, 20333, 613, 31249, 434, 1281, 16966, 930, 434, 271, 1695, 53, 67, 84, 8, 18, 261, 9704, 5712, 364, 13728, 12998,...
return self.do_verify()
return self.do_verify(request)
def __call__(self, environ, start_response): if environ['PATH_INFO'].startswith(self.auth_prefix): self.environ = environ self.start = start_response self.body = [] self.base_url = request.construct_url(environ, with_path_info=False, with_query_string=False) path = re.sub(self.auth_prefix, '', environ['PATH_INFO']) self.parsed_uri = urlparse.urlparse(path) self.query = dict(request.parse_querystring(environ)) path = self.parsed_uri[2] if path == '/' or not path: return self.render() elif path == '/verify': return self.do_verify() elif path == '/process': return self.do_process() else: return self.not_found() else: return self.app(environ, start_response)
07ac717a02ae9e0e60f94ababf0e9d6d9f75f5de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/07ac717a02ae9e0e60f94ababf0e9d6d9f75f5de/open_id.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 309, 5473, 3292, 4211, 67, 5923, 29489, 17514, 1918, 12, 2890, 18, 1944, 67, 3239, 4672, 365, 18, 28684, 273, 5473, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 309, 5473, 3292, 4211, 67, 5923, 29489, 17514, 1918, 12, 2890, 18, 1944, 67, 3239, 4672, 365, 18, 28684, 273, 5473, 365, 1...
a[0] = base_ring(a[0].lift() / (j+1)) a[1] = base_ring(a[1].lift() / (j+1)) a[2] = base_ring(a[2].lift() / (j+1))
if (p.divides(j+1)): a[0] = base_ring(lift(a[0]) / (j+1)) a[1] = base_ring(lift(a[1]) / (j+1)) a[2] = base_ring(lift(a[2]) / (j+1)) else: j_plus_1_inv = ~base_ring(j+1) a[0] = a[0] * j_plus_1_inv a[1] = a[1] * j_plus_1_inv a[2] = a[2] * j_plus_1_inv
def reduce_negative(Q, p, coeffs, offset): """ Applies cohomology relations to incorporate negative powers of $y$ into the $y^0$ term. INPUT: p -- prime 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 = [[10, 15, 20], [1, 2, 3], [4, 5, 6], [7, 8, 9]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_negative(Q, 5, coeffs, 3) sage: coeffs[3] [28, 52, 9] sage: R.<x> = Integers(7^3)['x'] sage: Q = x^3 - x + R(1/4) sage: coeffs = [[7, 14, 21], [1, 2, 3], [4, 5, 6], [7, 8, 9]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_negative(Q, 7, coeffs, 3) sage: coeffs[3] [245, 332, 9] """ m = helper_matrix(Q).list() base_ring = Q.base_ring() next_a = coeffs[0] try: three_j_plus_5 = 5 - base_ring(6*offset) three_j_plus_7 = 7 - base_ring(6*offset) six = base_ring(6) for i in range(0, offset): j = 2*(i-offset) a = next_a next_a = coeffs[i+1] # todo: the following divisions will sometimes involve # a division by (a power of) p. In all cases, we know (from # Kedlaya's estimates) that the answer should be p-integral. # However, since we're working over $Z/p^k Z$, we're not allowed # to "divide by p". So currently we lift to Q, divide, and coerce # back. Eventually, when pAdicInteger is implemented, and plays # nicely with pAdicField, we should reimplement this stuff # using pAdicInteger. a[0] = base_ring(a[0].lift() / (j+1)) a[1] = base_ring(a[1].lift() / (j+1)) a[2] = base_ring(a[2].lift() / (j+1)) c1 = m[3]*a[0] + m[4]*a[1] + m[5]*a[2] c2 = m[6]*a[0] + m[7]*a[1] + m[8]*a[2] next_a[0] = next_a[0] - three_j_plus_5 * c1 next_a[1] = next_a[1] - three_j_plus_7 * c2 three_j_plus_7 = three_j_plus_7 + six three_j_plus_5 = three_j_plus_5 + six except NotImplementedError: raise NotImplementedError, \ "It looks like you've found a non-integral matrix of Frobenius! " \ "(Q=%s, p=%s)\nTime to write a paper." % (Q, p) coeffs[int(offset)] = next_a
27b77e28ae3b8fbd3ab5545206e95e0ab8882088 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/27b77e28ae3b8fbd3ab5545206e95e0ab8882088/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 13258, 12, 53, 16, 293, 16, 16530, 16, 1384, 4672, 3536, 1716, 5259, 1825, 17125, 4676, 7467, 358, 316, 3850, 3831, 340, 6092, 7602, 414, 434, 271, 93, 8, 1368, 326, 271, 93,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13258, 12, 53, 16, 293, 16, 16530, 16, 1384, 4672, 3536, 1716, 5259, 1825, 17125, 4676, 7467, 358, 316, 3850, 3831, 340, 6092, 7602, 414, 434, 271, 93, 8, 1368, 326, 271, 93,...
add_comment_or_review = self.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, '', score ,note, warnings, show_title_p=True)
add_comment_or_review = self.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, '', score, note, warnings, show_title_p=True)
def tmpl_get_comments(self, recID, ln, nb_per_page, page, nb_pages, display_order, display_since, CFG_WEBCOMMENT_ALLOW_REVIEWS, comments, total_nb_comments, avg_score, warnings, border=0, reviews=0, total_nb_reviews=0, nickname='', uid=-1, note='',score=5): """ Get table of all comments @param recID: record id @param ln: language @param nb_per_page: number of results per page @param page: page number @param display_order: hh = highest helpful score, review only lh = lowest helpful score, review only hs = highest star score, review only ls = lowest star score, review only od = oldest date nd = newest date @param display_since: all= no filtering by date nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit integer between 0 and 9 @param CFG_WEBCOMMENT_ALLOW_REVIEWS: is ranking enable, get from config.py/CFG_WEBCOMMENT_ALLOW_REVIEWS @param comments: tuple as returned from webcomment.py/query_retrieve_comments_or_remarks @param total_nb_comments: total number of comments for this record @param avg_score: average score of reviews for this record @param warnings: list of warning tuples (warning_msg, color) @param border: boolean, active if want to show border around each comment/review @param reviews: booelan, enabled for reviews, disabled for comments """ # load the right message language _ = gettext_set_language(ln) # naming data fields of comments if reviews: c_nickname = 0 c_user_id = 1 c_date_creation = 2 c_body = 3 c_nb_votes_yes = 4 c_nb_votes_total = 5 c_star_score = 6 c_title = 7 c_id = 8 discussion = 'reviews' comments_link = '<a href="%s/record/%s/comments/">%s</a> (%i)' % (weburl, recID, _('Comments'), total_nb_comments) reviews_link = '<b>%s (%i)</b>' % (_('Reviews'), total_nb_reviews) add_comment_or_review = self.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, '', score ,note, warnings, show_title_p=True) else: c_nickname = 0 c_user_id = 1 c_date_creation = 2 c_body = 3 c_id = 4 discussion = 'comments' comments_link = '<b>%s (%i)</b>' % (_('Comments'), total_nb_comments) reviews_link = '<a href="%s/record/%s/reviews/">%s</a> (%i)' % (weburl, recID, _('Reviews'), total_nb_reviews) add_comment_or_review = self.tmpl_add_comment_form(recID, uid, nickname, ln, note, warnings)
4dda1758fb5bc9c9536ba57262a213caa97dca4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3302/4dda1758fb5bc9c9536ba57262a213caa97dca4e/webcomment_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 588, 67, 9231, 12, 2890, 16, 1950, 734, 16, 7211, 16, 4264, 67, 457, 67, 2433, 16, 1363, 16, 4264, 67, 7267, 16, 2562, 67, 1019, 16, 2562, 67, 9256, 16, 7577, 67, 14778, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 588, 67, 9231, 12, 2890, 16, 1950, 734, 16, 7211, 16, 4264, 67, 457, 67, 2433, 16, 1363, 16, 4264, 67, 7267, 16, 2562, 67, 1019, 16, 2562, 67, 9256, 16, 7577, 67, 14778, ...
''', 37,
''', 39,
def main(n): i = 2 l = [] while i < n: i += 1 l.append(i) return i, len(l)
9038d75d0c135afe85a7c8e04e4f8fc2d293b8c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/9038d75d0c135afe85a7c8e04e4f8fc2d293b8c2/test_pypy_c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 82, 4672, 277, 273, 576, 328, 273, 5378, 1323, 277, 411, 290, 30, 277, 1011, 404, 328, 18, 6923, 12, 77, 13, 327, 277, 16, 562, 12, 80, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 82, 4672, 277, 273, 576, 328, 273, 5378, 1323, 277, 411, 290, 30, 277, 1011, 404, 328, 18, 6923, 12, 77, 13, 327, 277, 16, 562, 12, 80, 13, 2, -100, -100, -100, -100, -10...
raise ValueError("First returned value must be 'ok', 'fail' or 'error'.")
raise ValueError("First returned value must be 'ok' or 'fail'.")
def raw_handler(self, *args): if not handler.__name__.startswith("request_"): raise ValueError("This decorator can only be used on a katcp request.") msgname = handler.__name__[8:].replace("_","-") reply_args = handler(self, *args) status = reply_args[0] if status in ["fail", "error"]: return katcp.Message.reply(msgname, *pack_types((Str(),Str()), reply_args)) if status == "ok": return katcp.Message.reply(msgname, *pack_types((Str(),) + types, reply_args)) raise ValueError("First returned value must be 'ok', 'fail' or 'error'.")
b9739f1beb6eb69bc5fa664208d1c89a3e5b300c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10400/b9739f1beb6eb69bc5fa664208d1c89a3e5b300c/kattypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1831, 67, 4176, 12, 2890, 16, 380, 1968, 4672, 309, 486, 1838, 16186, 529, 25648, 17514, 1918, 2932, 2293, 9548, 4672, 1002, 2068, 2932, 2503, 7367, 848, 1338, 506, 1399, 603, 279, 417, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1831, 67, 4176, 12, 2890, 16, 380, 1968, 4672, 309, 486, 1838, 16186, 529, 25648, 17514, 1918, 2932, 2293, 9548, 4672, 1002, 2068, 2932, 2503, 7367, 848, 1338, 506, 1399, 603, 279, 417, ...
import traceback logger.notifyChannel("init", netsvc.LOG_ERROR,"SSL Server error in request from %s: %s" % (client_address,traceback.format_exc()))
import traceback e_type, e_value, e_traceback = sys.exc_info() logger.notifyChannel("init", netsvc.LOG_ERROR,"SSL Request handler error in request from %s: %s\n%s" % (client_address,str(e_type),traceback.format_exc()))
def handle_error(self, request, client_address): """ Override the error handler """ import traceback
19ef4fdbb68de4cead161d2e78a3e6cb82991087 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/19ef4fdbb68de4cead161d2e78a3e6cb82991087/SecureXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 1439, 326, 555, 1838, 3536, 1930, 10820, 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, 1640, 67, 1636, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 1439, 326, 555, 1838, 3536, 1930, 10820, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
res = self.registerReplica(replicaTuple) registrationTime = time.time()-startRegistration
res = self.registerReplica( replicaTuple ) registrationTime = time.time() - startRegistration
def replicateAndRegister(self,lfn,destSE,sourceSE='',destPath='',localCache=''): """ Replicate a LFN to a destination SE and register the replica.
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28476, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 10488, 1090, 16, 3168, 1090, 2218, 2187, 10488, 743, 2218, 2187, 3729, 1649, 2218, 11, 4672, 3536, 868, 1780, 340, 279, 18803, 50, 358, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28476, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 10488, 1090, 16, 3168, 1090, 2218, 2187, 10488, 743, 2218, 2187, 3729, 1649, 2218, 11, 4672, 3536, 868, 1780, 340, 279, 18803, 50, 358, 279...
flagmanager(vis=self.vis, mode='rename', oldname='manualflag_2', versionname='Ha! The best version ever!', comment='This is a *much* better name')
flagmanager(vis=self.vis, mode='rename', oldname='unflag_2', versionname='Ha! The best version ever!', comment='This is a *much* better name')
def test1(self): print "Test of flagmanager mode=list, flagbackup=True/False" flagmanager(vis=self.vis, mode='list') fg.open(self.vis) self.assertEqual(len(fg.getflagversionlist()), 3) fg.done()
05385c9baca107ae37130d13ada12822cc89d8d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/05385c9baca107ae37130d13ada12822cc89d8d5/test_flagdata2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21, 12, 2890, 4672, 1172, 315, 4709, 434, 2982, 4181, 1965, 33, 1098, 16, 2982, 9572, 33, 5510, 19, 8381, 6, 2982, 4181, 12, 3516, 33, 2890, 18, 3516, 16, 1965, 2218, 1098, 6134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21, 12, 2890, 4672, 1172, 315, 4709, 434, 2982, 4181, 1965, 33, 1098, 16, 2982, 9572, 33, 5510, 19, 8381, 6, 2982, 4181, 12, 3516, 33, 2890, 18, 3516, 16, 1965, 2218, 1098, 6134,...
parent.repaint()
parent.drawing_area.repaint()
def btn_save_clicked(self, button, strInfo, filePath, listStore, parent): self.__write_file(strInfo, filePath, listStore) parent.marker.refresh() parent.repaint()
e3749b0cc3a6350b6d3e02971da8be54f7131b4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5373/e3749b0cc3a6350b6d3e02971da8be54f7131b4c/widTreeView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10638, 67, 5688, 67, 7475, 329, 12, 2890, 16, 3568, 16, 609, 966, 16, 4612, 16, 666, 2257, 16, 982, 4672, 365, 16186, 2626, 67, 768, 12, 701, 966, 16, 4612, 16, 666, 2257, 13, 982, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10638, 67, 5688, 67, 7475, 329, 12, 2890, 16, 3568, 16, 609, 966, 16, 4612, 16, 666, 2257, 16, 982, 4672, 365, 16186, 2626, 67, 768, 12, 701, 966, 16, 4612, 16, 666, 2257, 13, 982, ...
def classlink(self, object, modname, *dicts):
def classlink(self, object, modname):
def classlink(self, object, modname, *dicts): """Make a link for a class.""" name = classname(object, modname) for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) return name
a5cd89f93dfc2b451a5a589ac3cd84fbcdd53c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a5cd89f93dfc2b451a5a589ac3cd84fbcdd53c4f/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 1232, 12, 2890, 16, 733, 16, 16037, 4672, 3536, 6464, 279, 1692, 364, 279, 667, 12123, 508, 273, 7479, 12, 1612, 16, 16037, 13, 364, 2065, 316, 15838, 30, 309, 2065, 18, 5332, 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, 667, 1232, 12, 2890, 16, 733, 16, 16037, 4672, 3536, 6464, 279, 1692, 364, 279, 667, 12123, 508, 273, 7479, 12, 1612, 16, 16037, 13, 364, 2065, 316, 15838, 30, 309, 2065, 18, 5332, 67,...
return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,)
return "COALESCE(%swrite_date, %screate_date, now())::timestamp AS %s" % (table_prefix, table_prefix, f,)
def convert_field(f): f_qual = "%s.%s" % (self._table, f) # need fully-qualified references in case len(tables) > 1 if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f_qual, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isinstance(self._columns[f], fields.binary) and context.get('bin_size', False): return 'length(%s) as "%s"' % (f_qual, f) return f_qual
d3aad2306f65d7221f245ecd45855b7cb29b6f47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/d3aad2306f65d7221f245ecd45855b7cb29b6f47/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1518, 12, 74, 4672, 284, 67, 3369, 273, 2213, 87, 7866, 87, 6, 738, 261, 2890, 6315, 2121, 16, 284, 13, 468, 1608, 7418, 17, 19724, 5351, 316, 648, 562, 12, 9373, 13, 405, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1518, 12, 74, 4672, 284, 67, 3369, 273, 2213, 87, 7866, 87, 6, 738, 261, 2890, 6315, 2121, 16, 284, 13, 468, 1608, 7418, 17, 19724, 5351, 316, 648, 562, 12, 9373, 13, 405, ...
needsDoctypeCheck = True if needsDoctypeCheck and self.currentToken["name"] == u"HTML": self.currentToken["data"] = False
def doctypeNameState(self): data = self.stream.char() needsDoctypeCheck = False if data in spaceCharacters: self.state = self.states["afterDoctypeName"] needsDoctypeCheck = True elif data == u">": self.tokenQueue.append(self.currentToken) self.state = self.states["data"] elif data == EOF: self.tokenQueue.append({"type": "ParseError", "data": _("Unexpected end of file in DOCTYPE name.")}) self.tokenQueue.append(self.currentToken) self.state = self.states["data"] else: # We can't just uppercase everything that arrives here. For # instance, non-ASCII characters. if data in asciiLowercase: data = data.upper() self.currentToken["name"] += data needsDoctypeCheck = True
5f6c7e4f9048f7a09156aa94f6d51b7d65e98820 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/5f6c7e4f9048f7a09156aa94f6d51b7d65e98820/tokenizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24909, 461, 1119, 12, 2890, 4672, 501, 273, 365, 18, 3256, 18, 3001, 1435, 4260, 3244, 12387, 1564, 273, 1083, 309, 501, 316, 3476, 11600, 30, 365, 18, 2019, 273, 365, 18, 7992, 9614, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24909, 461, 1119, 12, 2890, 4672, 501, 273, 365, 18, 3256, 18, 3001, 1435, 4260, 3244, 12387, 1564, 273, 1083, 309, 501, 316, 3476, 11600, 30, 365, 18, 2019, 273, 365, 18, 7992, 9614, ...
('state', '!=' 'posted'),
('state', '!=', 'posted'),
def close(self, cursor, user, ids, context=None): journal_period_obj = self.pool.get('account.journal.period') move_obj = self.pool.get('account.move')
3af01f0d01756c5cdbe18dacd320bf8ebe2052ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/3af01f0d01756c5cdbe18dacd320bf8ebe2052ca/period.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 13001, 67, 6908, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 22644, 18, 6908, 6134, 3635, 67, 2603, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 13001, 67, 6908, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 22644, 18, 6908, 6134, 3635, 67, 2603, 2...
h = ProbeDetails(Config)
h = ProbeDetails()
def Handshake(resetRetries = False): global Config global __connection global __connectionError global __connectionRetries global failedHandshakes h = ProbeDetails(Config) if __connectionError: # We are not currently connected, the SendHandshake # will reconnect us if it is possible result = SendHandshake(h) else: # We are connected but the connection may have timed-out result = SendHandshake(h) if __connectionError: # Case of timed-out connection, let's try again failedHandshakes -= 1 # Take a Mulligan result = SendHandshake(h)
2abb6f512aead669f454a58e7b6bf70e0d0428a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/2abb6f512aead669f454a58e7b6bf70e0d0428a5/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23998, 12, 6208, 13656, 273, 1083, 4672, 2552, 1903, 2552, 1001, 4071, 2552, 1001, 4071, 668, 2552, 1001, 4071, 13656, 2552, 2535, 1144, 674, 3223, 225, 366, 273, 25490, 3790, 1435, 225, 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, 23998, 12, 6208, 13656, 273, 1083, 4672, 2552, 1903, 2552, 1001, 4071, 2552, 1001, 4071, 668, 2552, 1001, 4071, 13656, 2552, 2535, 1144, 674, 3223, 225, 366, 273, 25490, 3790, 1435, 225, 3...
self.__is_text_file = self.__callback_regexp
self.__is_text_file = eolfix_callback_regexp
def set_mode_regexp( self, expressions ): """Sets mode to regexp.
ff1d678c5812ff8aeddce1cf7bcfa7283dd9285a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/ff1d678c5812ff8aeddce1cf7bcfa7283dd9285a/eolfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3188, 67, 17745, 12, 365, 16, 8041, 262, 30, 3536, 2785, 1965, 358, 7195, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3188, 67, 17745, 12, 365, 16, 8041, 262, 30, 3536, 2785, 1965, 358, 7195, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cval_i = get_constant_value(i) if all((not b for b in i.broadcastable)):
cval_i = get_constant_value(i) if all(i.broadcastable):
def local_upcast_elemwise_constant_inputs(node): """This explicitly upcasts constant inputs to elemwise Ops, when those Ops do implicit upcasting anyway. Rationale: it helps merge things like (1-x) and (1.0 - x). """ if len(node.outputs)>1: return try: shape_i = node.env.shape_feature.shape_i except AttributeError: shape_i = None if isinstance(node.op, T.Elemwise): scalar_op = node.op.scalar_op #print "aa", scalar_op.output_types_preference if getattr(scalar_op,'output_types_preference',None) in (T.scal.upgrade_to_float, T.scal.upcast_out): # this is the kind of op that we can screw with the input dtypes by upcasting # explicitly output_dtype = node.outputs[0].type.dtype new_inputs = [] for i in node.inputs: if i.type.dtype == output_dtype: new_inputs.append(i) else: try: cval_i = get_constant_value(i) # works only for scalars I think if all((not b for b in i.broadcastable)): new_inputs.append(T.cast(cval_i, output_dtype)) else: if shape_i is None: return new_inputs.append(T.alloc(T.cast(cval_i, output_dtype), *[shape_i(d)(i) for d in xrange(i.ndim)])) #print >> sys.stderr, "AAA", *[Shape_i(d)(i) for d in xrange(i.ndim)] except TypeError: if isinstance(i, T.TensorConstant): #for the case of a non-scalar new_inputs.append(T.cast(i, output_dtype)) else: new_inputs.append(i) if new_inputs != node.inputs: rval = [node.op(*new_inputs)] if rval[0].type != node.outputs[0].type: print >> sys.stderr, "NODE:", node print >> sys.stderr, "NODE INPUT TYPES:", [i.type for i in node.inputs] print >> sys.stderr, "RVAL:", rval print >> sys.stderr, "NEW INPUT TYPES:", [i.type for i in new_inputs] print >> sys.stderr, "RVAL INPUT TYPES:", [i.type for i in rval[0].owner.inputs] assert rval[0].type == node.outputs[0].type, (node, rval[0]) return rval
b4817c258a5c5189f1ccc9bc6acb75199743c360 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/b4817c258a5c5189f1ccc9bc6acb75199743c360/opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 416, 4155, 67, 10037, 2460, 67, 14384, 67, 10029, 12, 2159, 4672, 3536, 2503, 8122, 731, 4155, 87, 5381, 4540, 358, 3659, 2460, 19374, 16, 1347, 5348, 19374, 741, 10592, 731, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 416, 4155, 67, 10037, 2460, 67, 14384, 67, 10029, 12, 2159, 4672, 3536, 2503, 8122, 731, 4155, 87, 5381, 4540, 358, 3659, 2460, 19374, 16, 1347, 5348, 19374, 741, 10592, 731, 4...
def _rec_get(ids, table, parent, left='id', prefix=''):
def _rec_get(ids, table, parent=None, left='id', prefix=''):
def _rec_get(ids, table, parent, left='id', prefix=''): if table._parent_store and (not table.pool._init):
9617fd20022ae00ed2ce5c8ae909e2a9c70b2333 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/9617fd20022ae00ed2ce5c8ae909e2a9c70b2333/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 33, 7036, 16, 2002, 2218, 350, 2187, 1633, 2218, 11, 4672, 309, 1014, 6315, 2938, 67, 2233, 471, 261, 902, 1014, 18, 6011, 6315, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 33, 7036, 16, 2002, 2218, 350, 2187, 1633, 2218, 11, 4672, 309, 1014, 6315, 2938, 67, 2233, 471, 261, 902, 1014, 18, 6011, 6315, 2738, ...
description = self.common.massageText(description.strip())
description = self.common.massageText(descFilter(result)[0].strip())
def searchTitle(self, title, pagenumber, pagelen, ignoreError=False): '''Key word video search of the TheWB web site return an array of matching item elements return ''' orgURL = self.thewb_config.find('searchURLS').xpath(".//href")[0].text
6f6daa366b2cfd2b5bb891ffe90ce1e7c399c2ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/6f6daa366b2cfd2b5bb891ffe90ce1e7c399c2ad/thewb_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 4247, 12, 2890, 16, 2077, 16, 4262, 21998, 16, 4262, 292, 275, 16, 2305, 668, 33, 8381, 4672, 9163, 653, 2076, 6191, 1623, 434, 326, 1021, 59, 38, 3311, 2834, 327, 392, 526, 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, 1623, 4247, 12, 2890, 16, 2077, 16, 4262, 21998, 16, 4262, 292, 275, 16, 2305, 668, 33, 8381, 4672, 9163, 653, 2076, 6191, 1623, 434, 326, 1021, 59, 38, 3311, 2834, 327, 392, 526, 434,...
results = self.cat.searchResults(portal_type='DerniereMinute',
""" Retourne 1 sejour futé (non expiré) au hasard. """ cat = getToolByName(self.context, 'portal_catalog') results = cat.searchResults(portal_type='DerniereMinute',
def _getValidDerniereMinute(self): results = self.cat.searchResults(portal_type='DerniereMinute', end={'query': DateTime(), 'range': 'min'}, review_state='published') results = list(results) random.shuffle(results) return results
bbaf8d1319d59ed8c94deb90fc2a9d7e59037cc1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10188/bbaf8d1319d59ed8c94deb90fc2a9d7e59037cc1/derniereminute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1556, 40, 8865, 77, 822, 18329, 12, 2890, 4672, 3536, 17100, 6561, 73, 404, 695, 78, 477, 22706, 132, 107, 261, 5836, 1329, 481, 132, 107, 13, 20309, 711, 1060, 18, 3536, 657...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1556, 40, 8865, 77, 822, 18329, 12, 2890, 4672, 3536, 17100, 6561, 73, 404, 695, 78, 477, 22706, 132, 107, 261, 5836, 1329, 481, 132, 107, 13, 20309, 711, 1060, 18, 3536, 657...
its = Location.iterItems(view, exact=True) locQuery = [ i for i in its if i.displayName == locationName ] for firstSpot in locQuery: return firstSpot
for item in Location.iterItems(view, exact=True): if item.displayName == locationName: return item
def getLocation (cls, view, locationName): """ Factory Method for getting a Location.
56455c863ac6200e8b3ea27b18ea1e62c8fb0bb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/56455c863ac6200e8b3ea27b18ea1e62c8fb0bb7/Calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13312, 261, 6429, 16, 1476, 16, 2117, 461, 4672, 3536, 7822, 2985, 364, 8742, 279, 7050, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13312, 261, 6429, 16, 1476, 16, 2117, 461, 4672, 3536, 7822, 2985, 364, 8742, 279, 7050, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.ss_start.set_size_request(self.ss_start.size_request()[0]*2, -1)
def __init__(self): # Constants self.open_mode_smart = 0 self.open_mode_fit = 1 self.open_mode_1to1 = 2 self.open_mode_last = 3 self.max_zoomratio = 5 # 5 x self.zoomratio_for_zoom_to_fit self.min_zoomratio = 0.1 # 0.1 x self.zoomratio_for_zoom_to_fit
53942116103e52b783d86e1a502852fe89d4db17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/53942116103e52b783d86e1a502852fe89d4db17/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 225, 468, 5245, 365, 18, 3190, 67, 3188, 67, 26416, 273, 374, 365, 18, 3190, 67, 3188, 67, 7216, 273, 404, 365, 18, 3190, 67, 3188, 67, 21, 869, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 225, 468, 5245, 365, 18, 3190, 67, 3188, 67, 26416, 273, 374, 365, 18, 3190, 67, 3188, 67, 7216, 273, 404, 365, 18, 3190, 67, 3188, 67, 21, 869, 21, ...
if options.profile: monkeyPatchProfiling(options.profile)
if options.profile: monkeyPatchTiming(options.profile)
def run_test(modules, options): ######################################################################## suite = unittest.TestSuite() ######################################################################## # Options test_utils.fail_incomplete_tests = options.incomplete if options.exclude: unittest.defaultTestLoader.exclude = ( [e.strip() for e in options.exclude.split(',')] ) if options.profile: monkeyPatchProfiling(options.profile) ######################################################################## # load modules, filtering by tag for module in modules: __import__(module) print 'loading', module test = unittest.defaultTestLoader.loadTestsFromName(module) suite.addTest(test) ######################################################################## # redirect stderr / stdout (realerr, realout), (stderr, stdout) = redirect_output() # restore_output(realerr, realout) DEBUG output = StringIO.StringIO() runner = unittest.TextTestRunner(stream = output) ######################################################################## # run the test suite results = runner.run(suite) ######################################################################## # restore output and compile get results output, stderr, stdout = map(StringIOContents, (output, stderr, stdout)) restore_output(realerr, realout) num_tests = results.testsRun failures = results.monkeyedFailRepr('FAIL', results.failures) errors = results.monkeyedFailRepr('ERROR', results.errors) if options.profile: timings = results.timings ######################################################################## # conditional adds here, profiling etc results = { many_modules_key(modules): from_namespace(locals(), RESULTS_TEMPLATE) } ######################################################################## if options.subprocess: print TEST_RESULTS_START print pformat(results) else: return results ########################################################################
e5a92053de4b8aead0daa40511620a6f620b73ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/e5a92053de4b8aead0daa40511620a6f620b73ad/test_runner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3813, 12, 6400, 16, 702, 4672, 28256, 1970, 13151, 11371, 273, 2836, 3813, 18, 4709, 13587, 1435, 225, 28256, 1970, 13151, 468, 5087, 225, 1842, 67, 5471, 18, 6870, 67, 17624, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3813, 12, 6400, 16, 702, 4672, 28256, 1970, 13151, 11371, 273, 2836, 3813, 18, 4709, 13587, 1435, 225, 28256, 1970, 13151, 468, 5087, 225, 1842, 67, 5471, 18, 6870, 67, 17624, ...
if depth < 0: depth = 0
if depth > maxDepth: maxDepth = depth if debug: print depth, maxDepth
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self.patterns: if opname[:len(pat)] == pat: delta = pat_delta depth = depth + delta break # if we still haven't found a match if delta == 0: meth = getattr(self, opname, None) if meth is not None: depth = depth + meth(i[1]) if depth < 0: depth = 0 return maxDepth
71cf824f0d02426ad5dc6874e27a3b0aa12b70fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/71cf824f0d02426ad5dc6874e27a3b0aa12b70fa/pyassem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 6148, 12, 2890, 16, 1804, 87, 4672, 3598, 273, 374, 22074, 273, 374, 364, 277, 316, 1804, 87, 30, 30273, 273, 277, 63, 20, 65, 3622, 273, 365, 18, 13867, 18, 588, 12, 556, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 6148, 12, 2890, 16, 1804, 87, 4672, 3598, 273, 374, 22074, 273, 374, 364, 277, 316, 1804, 87, 30, 30273, 273, 277, 63, 20, 65, 3622, 273, 365, 18, 13867, 18, 588, 12, 556, 529,...
today = date_today()
today = datetime.datetime.now().date()
def delete_old_closed_tasks(self, widget = None): self.__log("Starting deletion of old tasks") today = date_today() requester = self.plugin_api.get_requester() closed_tids = requester.get_tasks_list(status = [Task.STA_DISMISSED, Task.STA_DONE]) closed_tasks = [requester.get_task(tid) for tid in closed_tids] to_remove = filter(lambda t: t.get_closed_date() < today, closed_tasks) map(lambda t: requester.delete_task(t.get_id()), to_remove) #If automatic purging is on, schedule another run if self.is_automatic: self.schedule_autopurge()
b584cd9d26b1f95d5a0b12e7a932c87011ffab15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/b584cd9d26b1f95d5a0b12e7a932c87011ffab15/reaper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 1673, 67, 12204, 67, 9416, 12, 2890, 16, 3604, 273, 599, 4672, 365, 16186, 1330, 2932, 11715, 10899, 434, 1592, 4592, 7923, 10074, 273, 3314, 18, 6585, 18, 3338, 7675, 712, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 1673, 67, 12204, 67, 9416, 12, 2890, 16, 3604, 273, 599, 4672, 365, 16186, 1330, 2932, 11715, 10899, 434, 1592, 4592, 7923, 10074, 273, 3314, 18, 6585, 18, 3338, 7675, 712, 143...
return LoginHandler(pagename, request).handle()
if request.user.valid: url = Page(request, pagename).url(request) request.http_redirect(url) else: return LoginHandler(pagename, request).handle()
def execute(pagename, request): return LoginHandler(pagename, request).handle()
aabf3e1dd992f33d688a3ce8aa5ef54dd4d31066 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/aabf3e1dd992f33d688a3ce8aa5ef54dd4d31066/login.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 9095, 1069, 16, 590, 4672, 309, 590, 18, 1355, 18, 877, 30, 880, 273, 3460, 12, 2293, 16, 4262, 1069, 2934, 718, 12, 2293, 13, 590, 18, 2505, 67, 7590, 12, 718, 13, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1836, 12, 9095, 1069, 16, 590, 4672, 309, 590, 18, 1355, 18, 877, 30, 880, 273, 3460, 12, 2293, 16, 4262, 1069, 2934, 718, 12, 2293, 13, 590, 18, 2505, 67, 7590, 12, 718, 13, 469, ...
self.prevVals = [0, 0, 0, 0]
self.gemCosts = [0, 0, 0, 0]
def __init__(self,parent = None,name = None,modal = False,fl = Qt.Widget): QDialog.__init__(self,parent,fl) Ui_B_CraftWindow.setupUi(self,self) if (name): self.setObjectName(name) if (modal): self.setModal(modal) self.GemRemakes = [] self.GemDone = [] self.GemTime = [] for i in range (0, 4): idx = i + 1 self.GemRemakes.append(getattr(self, 'Gem%dRemakes' % idx)) self.connect(self.GemRemakes[i],SIGNAL("valueChanged(int)"),self.RemakeChanged) self.GemDone.append(getattr(self, 'Gem%dDone' % idx)) self.connect(self.GemDone[i],SIGNAL("clicked()"),self.GemClicked) self.GemTime.append(getattr(self, 'Gem%dTime' % idx)) self.connect(self.GemTime[i],SIGNAL("textChanged(const QString&)"),self.TimeChanged) self.connect(self.ExpMultiplier,SIGNAL("valueChanged(int)"),self.computeMaterials) self.connect(self.Close,SIGNAL("clicked()"),self.CloseWindow) self.currentItem = None self.totalCost = 0 self.prevVals = [0, 0, 0, 0] self.parent = parent
810688cca430e98d9c6abaae2d180fa8744c7a35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/810688cca430e98d9c6abaae2d180fa8744c7a35/CraftWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 1083, 16, 2242, 273, 7354, 18, 4609, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 2242,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 1083, 16, 2242, 273, 7354, 18, 4609, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 2242,...
def __init__(self): if _debug: print "\t%s: Called Text.__init__()" % rendererName
def __init__(self, scene): """ Initialisation of the Text object @param scene: the scene with which to associate the Text object @type scene: Scene object """ Item.__init__(self) debugMsg("Called Text.__init__()")
def __init__(self): if _debug: print "\t%s: Called Text.__init__()" % rendererName self.font = "Times" pass
d60d10714bbb2646336d5da365b4cf0599efeadb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/d60d10714bbb2646336d5da365b4cf0599efeadb/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 10742, 434, 326, 3867, 733, 225, 632, 891, 9065, 30, 326, 9065, 598, 1492, 358, 13251, 326, 3867, 733, 632, 723, 9065, 30, 29347, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9065, 4672, 3536, 10188, 10742, 434, 326, 3867, 733, 225, 632, 891, 9065, 30, 326, 9065, 598, 1492, 358, 13251, 326, 3867, 733, 632, 723, 9065, 30, 29347, ...
logging.error(u'You can configure backends using the "weboob-config-qt" GUI, too.')
print '\nYou can configure backends using the "weboob-config-qt" GUI, too.'
def load_backends(self, caps=None, names=None, *args, **kwargs): loaded_backends = BaseApplication.load_backends(self, caps, names, *args, **kwargs) if not loaded_backends: logging.error(u'Cannot start application: no configured backend was found.\nHere is a list of all available backends:') from weboob.applications.weboobcfg import WeboobCfg weboobcfg = WeboobCfg() weboobcfg.options, args = weboobcfg._parser.parse_args([]) weboobcfg._handle_app_options() if caps is not None: if not isinstance(caps, (list, tuple, set)): caps = (caps,) caps = [(cap if isinstance(cap, basestring) else cap.__name__) for cap in caps] weboobcfg.command_backends(*caps) logging.error(u'You can configure backends using the "weboob-config add" command:\nweboob-config add <name> [options..]') with open('/dev/null', 'w') as devnull: process = subprocess.Popen(['which', 'weboob-config-qt'], stdout=devnull) return_code = process.wait() if return_code == 0: logging.error(u'You can configure backends using the "weboob-config-qt" GUI, too.') sys.exit(0)
54f9220555eb8913fedd5adbdf4df39ead7f91f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/54f9220555eb8913fedd5adbdf4df39ead7f91f8/console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 823, 5839, 12, 2890, 16, 15788, 33, 7036, 16, 1257, 33, 7036, 16, 380, 1968, 16, 2826, 4333, 4672, 4203, 67, 823, 5839, 273, 3360, 3208, 18, 945, 67, 823, 5839, 12, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 823, 5839, 12, 2890, 16, 15788, 33, 7036, 16, 1257, 33, 7036, 16, 380, 1968, 16, 2826, 4333, 4672, 4203, 67, 823, 5839, 273, 3360, 3208, 18, 945, 67, 823, 5839, 12, 2890, 1...
for plugin in os.listdir("plugins"):
for plugin in os.listdir(eg.PLUGIN_DIR):
def LoadModules(): # pylint: disable-msg=W0104 eg.CheckUpdate eg.AboutDialog eg.AddActionDialog eg.AddPluginDialog eg.AddActionGroupDialog eg.OptionsDialog eg.FindDialog eg.Exceptions eg.EventItem #import MainFrame # pylint: enable-msg=W0104 for plugin in os.listdir("plugins"): if not plugin.startswith("."): eg.PluginInfo.Open(plugin, plugin, ()).Close()
9d159ca9389d375d0ed6358802397fb79101770c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/9d159ca9389d375d0ed6358802397fb79101770c/LanguageEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 7782, 13332, 468, 7601, 30, 4056, 17, 3576, 33, 59, 1611, 3028, 9130, 18, 1564, 1891, 9130, 18, 24813, 6353, 9130, 18, 986, 1803, 6353, 9130, 18, 986, 3773, 6353, 9130, 18, 986, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 7782, 13332, 468, 7601, 30, 4056, 17, 3576, 33, 59, 1611, 3028, 9130, 18, 1564, 1891, 9130, 18, 24813, 6353, 9130, 18, 986, 1803, 6353, 9130, 18, 986, 3773, 6353, 9130, 18, 986, ...
as necessary.
where necessary.
def dumps(params, methodname=None, methodresponse=None, encoding=None): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC request (or response, if the methodresponse option is used). In addition to the data object, the following options can be given as keyword arguments: methodname: the method name for a methodCall packet methodresponse: true to create a methodResponse packet. If this option is used with a tuple, the tuple must be a singleton (i.e. it can contain only one element). encoding: the packet encoding (default is UTF-8) All 8-bit strings in the data structure are assumed to use the packet encoding. Unicode strings are automatically converted, as necessary. """ assert isinstance(params, TupleType) or isinstance(params, Fault),\ "argument must be tuple or Fault instance" if isinstance(params, Fault): methodresponse = 1 elif methodresponse and isinstance(params, TupleType): assert len(params) == 1, "response tuple must be a singleton" if not encoding: encoding = "utf-8" m = Marshaller(encoding) data = m.dumps(params) if encoding != "utf-8": xmlheader = "<?xml version='1.0' encoding=%s?>\n" % repr(encoding) else: xmlheader = "<?xml version='1.0'?>\n" # utf-8 is default # standard XML-RPC wrappings if methodname: # a method call if not isinstance(methodname, StringType): methodname = methodname.encode(encoding) data = ( xmlheader, "<methodCall>\n" "<methodName>", methodname, "</methodName>\n", data, "</methodCall>\n" ) elif methodresponse: # a method response, or a fault structure data = ( xmlheader, "<methodResponse>\n", data, "</methodResponse>\n" ) else: return data # return as is return string.join(data, "")
b0e8e9b72fb6eb42ecd4d9ea9e88563d1ca4528a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b0e8e9b72fb6eb42ecd4d9ea9e88563d1ca4528a/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6711, 12, 2010, 16, 707, 529, 33, 7036, 16, 707, 2740, 33, 7036, 16, 2688, 33, 7036, 4672, 3536, 892, 306, 16, 2116, 65, 317, 10893, 1259, 501, 225, 4037, 392, 1237, 3193, 578, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6711, 12, 2010, 16, 707, 529, 33, 7036, 16, 707, 2740, 33, 7036, 16, 2688, 33, 7036, 4672, 3536, 892, 306, 16, 2116, 65, 317, 10893, 1259, 501, 225, 4037, 392, 1237, 3193, 578, 279, ...
num = None
num = None
def next_num(self): self.debug_trace("next_num") # no checking. while self.data[self.index] in string.whitespace: self.index = self.index + 1 start = self.index while self.data[self.index] not in string.whitespace: self.index = self.index + 1 end = self.index self.debug_trace( "found number %s\n", self.data[start:end]) try: num = string.atoi(self.data[start:end]) except ValueError: try: num = string.atof(self.data[start:end]) except: num = None # shouldn't happen return num
ecf78c969222f7513a2f516b0355728295fb546a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/ecf78c969222f7513a2f516b0355728295fb546a/pxlasm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 2107, 12, 2890, 4672, 365, 18, 4148, 67, 5129, 2932, 4285, 67, 2107, 7923, 468, 1158, 6728, 18, 1323, 365, 18, 892, 63, 2890, 18, 1615, 65, 316, 533, 18, 18777, 30, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 2107, 12, 2890, 4672, 365, 18, 4148, 67, 5129, 2932, 4285, 67, 2107, 7923, 468, 1158, 6728, 18, 1323, 365, 18, 892, 63, 2890, 18, 1615, 65, 316, 533, 18, 18777, 30, 365, 18...
f.close()
sys.stdout.flush() sys.stdout.close()
def run_build_script(ui, repo, core_version=0, type=None, **opts): """ make a build from a configuration file. usage: hg build-app [-l <log range> <core version> <type, e.g. nightly> requires a configuration file config file path defined in BUILD_CONFIG format example [general] server = chrisk@is.oslo.opera.com scp_session = [core 2.2] short = 2.2, branch = protocol-4 [core 2.2 : nightly] short = n, ce name = 0.7 alpha-4-snapshot local-repo = D:\apache-root\dragonfly.opera.com\app\core-2-2 local-zip = D:\apache-root\dragonfly.opera.com\app\core-2-2\zips\Opera-Dragonfly-%s-%s.zip local-log = D:\apache-root\dragonfly.opera.com\app\core-2-2\logs\%s.%s.log remote-repo = /var/www/dragonfly.opera.com/app/test/ usage hg build-app [-l sart:end] 2.2 ce meaning build application log from xx to xx for core 2.2 as a cutting-edge ( or nightly ) build a log of the build commands will be created in the same repo as the config file """ import cPickle if opts['command_log']: path = os.path.join(os.path.split(BUILD_CONFIG)[0], "BUILD_LOG") if os.path.exists(path): l = open(path, 'r') sys.stdout.write(l.read()) l.close() return if opts['show_config_file']: if os.path.exists(BUILD_CONFIG): f = open(BUILD_CONFIG, 'r') sys.stdout.write(f.read()) f.close() return if opts['log_history']: path = os.path.join(os.path.split(BUILD_CONFIG)[0], "BUILD_LOG_PICKLE") f = open(path, "rb") try: build_log = cPickle.load(f) for key in build_log: print key, ': ', build_log[key] except: pass f.close() return if opts['config_file']: print "path to config file: ", BUILD_CONFIG print "path to config file set in: ", __file__ return log_entry = "hg build-app" + \ ( 'log' in opts and ( " -l " + opts['log'] ) or "" ) + \ " " + (core_version and core_version or "")+ \ " " + (type and type or "") import mercurial.commands from mercurial.node import short heads = repo.heads() if len(heads) != 1: print "abort. ensure that there is only one head in the repository" return build_config = parse_config(BUILD_CONFIG) if not build_config: print "no or broken build config file" return os.chdir(repo.root) path = os.path.join(os.path.split(BUILD_CONFIG)[0], "BUILD_LOG_PICKLE") f = open(path, "rb") try: build_log = cPickle.load(f) build_log['read-counter'] +=1 except: build_log = {'title': 'logs', 'read-counter': 0} f.close() head = heads[0] root = repo.root sys.path.insert(0, os.path.join(root, 'tools' )) import dfbuild core_version = core_version in build_config and build_config[core_version] or None type = core_version and type in core_version and core_version[type] or None if not type: print "abort. the command arguments have no according entries in the config file" return print "update to", core_version["branch"] if mercurial.commands.update(ui, repo, rev=core_version["branch"]) != 0: print "abort. hg update failed" return rev = repo.changelog.rev(head) sort_hash = short(head) revision = "%d:%s, %s" % (rev, sort_hash, core_version["branch"]) if not 'id' in type: print "each entriy in the build config must have an id" return if not type['id'] in build_log: build_log[type['id']] = [] build_log[type['id']].append(sort_hash) print "make build, revision:", revision try: sys.argv = \ [ __file__, os.path.join(root, 'src'), type["local-repo"], '-t', '-s', '-d', '-m', '-p', '-k', '$dfversion$=' + type['name'], '-k', '$revdate$=' + revision ] dfbuild.main() except Exception, msg: print "abort. making build failed. ", msg return print "build created" print "make zip" path = type["local-zip"] % (rev, sort_hash) create_path(os.path.split(path)[0]) try: sys.argv = \ [ __file__, os.path.join(root, 'src'), path, '-c', '-s', '-d', '-k', '$dfversion$=' + type['name'], '-k', '$revdate$=' + revision ] dfbuild.main() except Exception, msg: print "abort. making zip failed. ", msg return print "zip created" print "make log" if not opts['log'] and len(build_log[type['id']]): opts['log'] = "tip:%s" % ( build_log[type['id']][-1] ) if opts['log']: print "log", opts['log'] path = type["local-log"] % (rev, sort_hash) create_path(os.path.split(path)[0]) f = open(path, 'w') store_stdout = sys.stdout sys.stdout = f mercurial.commands.log\ ( ui, repo, rev=[opts['log']], copies=None, date='', only_branch=[core_version["branch"]], no_merges=None, only_merges=None, keyword=[], style="changelog" ) f.close() sys.stdout = store_stdout path = os.path.join(os.path.split(BUILD_CONFIG)[0], "BUILD_LOG") f = open(path, os.path.exists(path) and "a" or "w") f.write(time.strftime("%d.%m.%y %H:%M", time.localtime()) + ': ' + log_entry + "; rev: " + revision) f.write("\n") # FWIW os.linesep should be editor linesep path = os.path.join(os.path.split(BUILD_CONFIG)[0], "BUILD_LOG_PICKLE") f = open(path, "wb") cPickle.dump(build_log, f) f.close() print "done"
4d4d6468ae2c70cb14af55566a94ebc626f4b17a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10925/4d4d6468ae2c70cb14af55566a94ebc626f4b17a/hgappext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3510, 67, 4263, 12, 4881, 16, 3538, 16, 2922, 67, 1589, 33, 20, 16, 618, 33, 7036, 16, 2826, 4952, 4672, 3536, 1221, 279, 1361, 628, 279, 1664, 585, 18, 4084, 30, 22576, 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, 1086, 67, 3510, 67, 4263, 12, 4881, 16, 3538, 16, 2922, 67, 1589, 33, 20, 16, 618, 33, 7036, 16, 2826, 4952, 4672, 3536, 1221, 279, 1361, 628, 279, 1664, 585, 18, 4084, 30, 22576, 13...
childPackage.set("fullName", ".".join(splits[:-1])) childPackage.set("packageName", ".".join(splits[:-1]))
childPackage.set("fullName", childPackageName) childPackage.set("packageName", childPackageName.replace("." + split, ""))
def getClassNode(docTree, className): splits = className.split(".") currPackage = docTree length = len(splits) for i in range(length): split = splits[i] if (i < length - 1): # This is a package name -> Get the right package childPackage = currPackage.getListChildByAttribute("packages", "name", split, False) if not childPackage: # The package does not exist -> Create it childPackage = tree.Node("package") childPackage.set("name", split) childPackage.set("fullName", ".".join(splits[:-1])) childPackage.set("packageName", ".".join(splits[:-1])) currPackage.addListChild("packages", childPackage) currPackage = childPackage else: # This is a class name -> Get the right class classNode = currPackage.getListChildByAttribute("classes", "name", split, False) if not classNode: # The class does not exist -> Create it classNode = tree.Node("class") classNode.set("name", split) classNode.set("fullName", className) classNode.set("packageName", className.replace("." + split, "")) currPackage.addListChild("classes", classNode) return classNode
3923c2433d393e18476d5306e6a2c68f0c96abda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/3923c2433d393e18476d5306e6a2c68f0c96abda/docgenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2900, 907, 12, 2434, 2471, 16, 2658, 4672, 11019, 273, 2658, 18, 4939, 2932, 1199, 13, 225, 4306, 2261, 273, 997, 2471, 769, 273, 562, 12, 21902, 13, 364, 277, 316, 1048, 12, 2469, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2900, 907, 12, 2434, 2471, 16, 2658, 4672, 11019, 273, 2658, 18, 4939, 2932, 1199, 13, 225, 4306, 2261, 273, 997, 2471, 769, 273, 562, 12, 21902, 13, 364, 277, 316, 1048, 12, 2469, 467...
for line in difflines: if line.startswith('--- '): words = line.split(None, 2) filename, fromrev = words[1], 'old' groups, blocks = None, None
lines = iter(difflines) for line in lines: if not line.startswith('--- '):
def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * '&nbsp; ' + mod * '&nbsp;'
81b657b816d8b094d2886fe500c5decefefc5342 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/81b657b816d8b094d2886fe500c5decefefc5342/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
try: fp = open(srcname, "wb") for i in range(0, 1000): fp.write("Test of zipfile line %d.\n" % i) fp.close()
zipfp = zipfile.ZipFile(f, "r", compression) self.assertEqual(zipfp.read(TESTFN), self.data) self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data) zipfp.close()
def zipTest(f, compression, srccontents): zip = zipfile.ZipFile(f, "w", compression) # Create the ZIP archive zip.write(srcname, "another"+os.extsep+"name") zip.write(srcname, srcname) zip.close() zip = zipfile.ZipFile(f, "r", compression) # Read the ZIP archive readData2 = zip.read(srcname) readData1 = zip.read("another"+os.extsep+"name") zip.close() if readData1 != srccontents or readData2 != srccontents: raise TestFailed, "Written data doesn't equal read data."
2d2ac3a0a10cdc817f61cb177b9af6e2cc4d5007 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d2ac3a0a10cdc817f61cb177b9af6e2cc4d5007/test_zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3144, 4709, 12, 74, 16, 9154, 16, 1705, 3980, 4672, 3144, 273, 18823, 18, 29394, 12, 74, 16, 315, 91, 3113, 9154, 13, 282, 468, 1788, 326, 18277, 5052, 3144, 18, 2626, 12, 4816, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3144, 4709, 12, 74, 16, 9154, 16, 1705, 3980, 4672, 3144, 273, 18823, 18, 29394, 12, 74, 16, 315, 91, 3113, 9154, 13, 282, 468, 1788, 326, 18277, 5052, 3144, 18, 2626, 12, 4816, 529, ...
""" Compare items against a dict """
"""Compare items against a dict."""
def expr(self, expr): return "%s.keys()" % expr
2e7b15abd167a17bf8f880c7e0bd7891362e04de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/873/2e7b15abd167a17bf8f880c7e0bd7891362e04de/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3065, 12, 2890, 16, 3065, 4672, 327, 2213, 87, 18, 2452, 10031, 738, 3065, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3065, 12, 2890, 16, 3065, 4672, 327, 2213, 87, 18, 2452, 10031, 738, 3065, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
m = max(numpy.sum((positions[0]-positions[49])**2, 1))
m = max(numpy.sum((positions[0]-positions[49])**2), 0)
def optimize_FAST_Separation(self, steps = 10, singleStep = False): classes = [int(x.getclass()) for x in self.graph.rawdata] optimizer = [orangeom.optimizeAnchors, orangeom.optimizeAnchorsRadial, orangeom.optimizeAnchorsR][self.restrain] ai = self.graph.attributeNameIndex attrIndices = [ai[label] for label in self.getShownAttributeList()] if self.__class__ != FreeViz: from qt import qApp
2c2de1c5ef29702c5a4d3b8b957946b7d67b7fdd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/2c2de1c5ef29702c5a4d3b8b957946b7d67b7fdd/orngLinProj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 2046, 882, 67, 5097, 4302, 12, 2890, 16, 6075, 273, 1728, 16, 2202, 4160, 273, 1083, 4672, 3318, 273, 306, 474, 12, 92, 18, 588, 1106, 10756, 364, 619, 316, 365, 18, 4660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 2046, 882, 67, 5097, 4302, 12, 2890, 16, 6075, 273, 1728, 16, 2202, 4160, 273, 1083, 4672, 3318, 273, 306, 474, 12, 92, 18, 588, 1106, 10756, 364, 619, 316, 365, 18, 4660, ...
EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId); EXPECT_TRUE(Get%(resource_type)sInfo(kNewServiceId) != NULL);
EXPECT_TRUE(Get%(resource_type)sInfo(kNewClientId) != NULL);
def WriteServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """
ae51d195b0e1bfaba2243f005a1aba675395595f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/ae51d195b0e1bfaba2243f005a1aba675395595f/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 923, 67, 3813, 273, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 923, 67, 3813, 273, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
gcceso_dict[env.options['SAGE_ROOT'] + "/devel/sage/build/temp/sage/libs/mwrank/mwrank.o"].generate_action(env).dep_register(mwrankcc.generate_action(env))
gcceso_dict[tempdir + "/devel/sage/build/temp/sage/libs/mwrank/mwrank.o"].generate_action(env).dep_register(mwrankcc.generate_action(env))
def buildsage(env, gccc): """ This function actually builds sage """ TM = taskmanager.TM #acquire a list of all pyx files in the tree efw = extfilewalker() efw.addcallback('.pyx',lambda x: True) pyx_list = efw.walk('devel/sage/sage') #set the absolute devel directory if necessary develdir = os.path.realpath('devel/sage/') if verbose>100: print 'Devel Dir: ' + develdir #Create the cython compiler cyc = Cython_compiler() #We want -I. so that it correctly finds include files by default cyc.set_option_val('-I'+'.',None) #Create the build extension dict for all cython extensions pyx_pextn_dict = cyc.get_build_extensions(env, pyx_list, cwd = 'devel/sage') ################################################################### #Configure all extensions ################################################################### config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/flint/fmpz_poly.pyx",include_dirs = [real_sage_local(env, 'include/FLINT/')], libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],prop_options={ str(GCC_extension_object): {'-std':'c99' } } ) ntllibs = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"] config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_p.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pEContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pE.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pEX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_lzz_pContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_lzz_p.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_lzz_pX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2X.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2EContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2E.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2EX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_mat_ZZ.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_mat_GF2E.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2EContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/mwrank/mwrank.pyx", language='C++', define_macros=[("NTL_ALL",None)], libraries=["curvesntl", "g0nntl", "jcntl", "rankntl", "ntl", "gmp", "gmpxx", "stdc++", "m", "pari"] ) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/pari/gen.pyx",libraries=['pari', 'gmp']) cremonalibs = ['g0nntl', 'jcntl', 'gmpxx', 'ntl', 'gmp', 'm', 'stdc++', 'pari', 'curvesntl'] config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/cremona/mat.pyx",language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/cremona/homspace.pyx",language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/cremona/newforms.pyx",language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/rings/finite_field_givaro.pyx",language="C++", libraries=['givaro', 'gmpxx', 'gmp', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/finite_field_ntl_gf2e.pyx',language="C++", libraries=['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/rings/real_rqdf.pyx",language="C++", libraries=['qd', 'm', 'stdc++','gmp','mpfr','qd', 'csage' ]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/misc.pyx',libraries=['mpfr','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_integer_2x2.pyx',libraries=['gmp']) BLAS = env.options['BLAS'] BLAS2 = env.options['BLAS2'] config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/linbox/linbox.pyx',language="C++", libraries=['linboxwrap', 'ntl', 'linbox', 'gmp', 'gmpxx', 'stdc++', 'givaro', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/singular/singular.pyx',language='C++', include_dirs=[real_sage_local(env,'include/singular')], libraries=['m', 'readline', 'singular', 'singfac', 'singcf', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/fplll/fplll.pyx',language='C++', include_dirs = [real_sage_local(env, 'include/fplll')], libraries=['gmp', 'mpfr', 'stdc++', 'fplll']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_modn_dense.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_mod2_dense.pyx',libraries = ['gmp','m4ri']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_rational_dense.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_integer_sparse.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_rational_sparse.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_integer_dense.pyx',libraries = ['iml', 'gmp', 'm', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_real_double_dense.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], include_dirs = [real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries=[BLAS, BLAS2, 'gsl']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/change_ring.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=[BLAS, BLAS2, 'gsl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_complex_double_dense.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], include_dirs=[real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/solve.pyx',define_macros = [('GSL_DISABLE_DEPRECATED','1')], libraries = ['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_mpolynomial_dense.pyx',language="C++", include_dirs = [real_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/complex_number.pyx',libraries = ['mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/probability_distribution.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/integration.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/ode.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/fft.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/interpolation.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/callback.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/real_double.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', 'gmp', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/complex_double.pyx',libraries = ['gsl', BLAS, BLAS2, 'pari', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/real_double_vector.pyx',define_macros = [('GSL_DISABLE_DEPRECAED','1')], include_dirs=[real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries = ['gsl', BLAS, BLAS2, 'pari','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/complex_double_vector.pyx',define_macros = [('GSL_DISABLE_DEPRECAED','1')], include_dirs=[real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries = ['gsl', BLAS, BLAS2, 'pari','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/vector_integer_dense.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/vector_rational_dense.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/gsl_array.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/ode.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl',BLAS]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/dwt.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl',BLAS]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/symmetrica/symmetrica.pyx',libraries=['symmetrica']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/ext/arith_gmp.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/ext/multi_modular.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx',language='C++', include_dirs = [real_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx',language='C++', include_dirs = [real_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/structure/sage_object.pyx',libraries=['ntl']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/real_mpfr.pyx',libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/real_mpfi.pyx',libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/complex_interval.pyx',libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/integer.pyx',libraries = ['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/integer_ring.pyx',libraries = ['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/libecm.pyx',libraries = ['ecm', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/pow_computer.pyx',language='C++', libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/pow_computer_ext.pyx',language='C++', libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_fixed_mod_element.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_capped_absolute_element.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_capped_relative_element.pyx',libraries = ['gmp', 'csage']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ext_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_FM_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_CR_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_CA_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_printing.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/memory.pyx',libraries = ['gmp','stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/bernoulli_mod_p.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/')], libraries=['ntl','stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/')], libraries = ['ntl','stdc++', 'gmp', 'zn_poly']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/')], libraries = ['ntl','stdc++', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/')], libraries = ['ntl','stdc++', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/rational.pyx',libraries = ['ntl','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/sparse_poly.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/real_roots.pyx',libraries = ['mpfr', 'qd']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/number_field/number_field_element.pyx',language = 'C++', libraries=['ntl','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/number_field/number_field_element_quadratic.pyx',language = 'C++', libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/number_field/totallyreal_data.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modular/modsym/heilbronn.pyx',libraries = ['gmp','m']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modular/modsym/p1list.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/integer_mod.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/combinat/expnums.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/combinat/partitions.pyx',language='C++', libraries = ['qd', 'gmp', 'mpfr']) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/combinat/matrices/dancing_links.pyx",language="C++") config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/graphs/graph_fast.pyx',libraries = ['gmp']) #config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/symbolics/symbolicarithmetic.pyx',libraries = ['glite']) #config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/symbolics/symbolicmularithmetic.pyx',libraries = ['glite']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/pbori.pyx',language='C++', include_dirs = [real_sage_local(env,'include/cudd'),real_sage_local(env,'include/polybori'), real_sage_local(env,'include/polybori/groebner')], libraries=['polybori','pboriCudd','groebner']) ################################################################### #End standard configurations ################################################################### tempdir = os.path.realpath(env.options['SAGE_ROOT']) #A dictionary of gcc objects extensions gcceo_dict = { } #A dictionary of gcc shared object extensions gcceso_dict = { } #Manually create the mwrank C extension mwrankcc = GCC_extension_object(gccc, env, ["devel/sage/sage/libs/mwrank/wrap.cc"], tempdir+"/devel/sage/build/temp/sage/libs/mwrank", language='C++', define_macros=[("NTL_ALL",None)], options = { '-fPIC':None } ) #Create the Hypellfrob extensions hypellfrob_cpp = GCC_extension_object(gccc, env,["devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp"], tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob/", language='C++', include_dirs=[abs_sage_path(env, 'sage/libs/ntl'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/') ], options = { '-fPIC':None }) recurrences_zn_poly = GCC_extension_object(gccc, env,[abs_sage_path(env,"sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_zn_poly.cpp")], tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob/", language='C++', include_dirs=[abs_sage_path(env, 'sage/libs/ntl'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/') ], options = { '-fPIC':None } ) recurrences_ntl = GCC_extension_object(gccc, env,["devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp"], tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob/", language='C++', include_dirs=[abs_sage_path(env, 'sage/libs/ntl'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/') ], options = { '-fPIC':None } ) #Manually create the C paritions extension partitions_c = GCC_extension_object(gccc, env,["devel/sage/sage/combinat/partitions_c.cc"], tempdir+"/devel/sage/build/temp/sage/combinat", language='C++', options = { '-fPIC':None } ) #If we don't already have a temporary build directory for planarity, make it safemkdirs(tempdir+"/devel/sage/build/temp/sage/graphs/planarity") #Locate all files that can possibley have depfw = extfilewalker() depfw.addcallback('.pyx',lambda x: True) depfw.addcallback('.pxd',lambda x: True) depfw.addcallback('.pxi',lambda x: True) depfw.addcallback('.py',lambda x: x.find(".doctest") ==-1 ) dep_list = depfw.walk('devel/sage/sage') #Set the dependency locater function funcdict = { '.pyx':get_cython_file_deps, '.pxd':get_cython_file_deps, 'pxi':get_cython_file_deps } #Set possible include directories for various file extensions includedict = { '.pyx':[abs_sage_path(env,'')], '.pxd':[abs_sage_path(env,'')], '.pxi':[abs_sage_path(env,'')] } #Set cacheinfo (used for saving the state at the end of the build) global cacheinfo cacheinfo = get_compile_list(dep_list, funcdict, includedict, "sagebuild.chc", env.options['SAGE_ROOT']) #Add the task that runs on exit to write out the build cache TM.addfinishtask(sagebuild_exit) pyx_ext_dict = { } for x in cacheinfo[0]: if os.path.splitext(x)[1]==".pyx": pyx_ext_dict[x]=pyx_pextn_dict[x] if verbose>100: print '---------------PYX_EXT_DICT------------' print pyx_ext_dict print '----------------------------------------' #If we are building planarity if pyx_ext_dict.has_key('devel/sage/sage/graphs/planarity.pyx'): #Locate all planarity C files efwplan = extfilewalker() efwplan.addcallback('.c',lambda x: True) planarity_list = efwplan.walk('devel/sage/sage/graphs/planarity') planarity_ext = list() for x in planarity_list: #Create their extensions and enable them ext = GCC_extension_object(gccc, env, [x], tempdir+"/devel/sage/build/temp/sage/graphs/planarity", options = { '-fPIC':None } ) ext.generate_action(env).enable() planarity_ext.append(ext) #If we are building mwrank.pyx, build the mwrank c extensions if pyx_ext_dict.has_key("devel/sage/sage/libs/mwrank/mwrank.pyx"): mwrankcc.generate_action(env).enable() else: pass #If we are building hypellfrob, make sure the temporary directories exist and enable the C extensions if pyx_ext_dict.has_key('devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob.pyx'): try: os.makedirs(hypellfrob_cpp.get_out_dir()) except: pass hypellfrob_cpp.generate_action(env).enable() recurrences_ntl.generate_action(env).enable() recurrences_zn_poly.generate_action(env).enable() #If we are building partions.pyx, we should build the partitions C extension if pyx_ext_dict.has_key('devel/sage/sage/combinat/partitions.pyx'): partitions_c.generate_action(env).enable() #For all Cython extensions, create gcc object file extensions for x in pyx_ext_dict.values(): q = x.generate_action(env) gcc_temp_dir = tempdir + '/devel/sage/build/temp/sage/' + (os.path.split(x.sources[0])[0])[len('devel/sage/sage/'):] gcceo = GCC_extension_object(gccc, env, [x], gcc_temp_dir, options = { '-fPIC':None } ) gcceo_dict[x.sources[0]] = gcceo gccaction = gcceo.generate_action(env) gccaction.dep_register(q) q.enable() #Create temporary directories for all object file extensions and enable them for gcceo in gcceo_dict.values(): try: os.makedirs(gcceo.get_out_dir()) except: pass gccaction = gcceo.generate_action(env) gccaction.enable() #For all object file extensions, create shared object file extensions and enable them for gcceo in gcceo_dict.values(): gcc_build_dir = develdir + '/build' + (os.path.split(gcceo.sources[0])[0])[len('devel/sage'):] gcceso = GCC_extension_shared_object(gccc,env, [gcceo], gcc_build_dir) gcceso_dict[gcceso.sources[0] ] = gcceso gcceso.generate_action(env).dep_register(gcceo.generate_action(env)) #Link mwrank C files if needed dict_insert_src(gcceso_dict, env.options['SAGE_ROOT']+"/devel/sage/build/temp/sage/libs/mwrank/mwrank.o", mwrankcc.outfile) #Setup dependencies for mwrank if needed try: gcceso_dict[env.options['SAGE_ROOT'] + "/devel/sage/build/temp/sage/libs/mwrank/mwrank.o"].generate_action(env).dep_register(mwrankcc.generate_action(env)) except KeyError: pass #Link hypellfrob C files if needed dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o", hypellfrob_cpp.outfile) dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o", recurrences_ntl.outfile) dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o", recurrences_zn_poly.outfile) #Setup dependencies for hypellfrob shared object if needed try: gcceso_dict[tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o"].generate_action(env).dep_register(hypellfrob_cpp.generate_action(env)) gcceso_dict[tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o"].generate_action(env).dep_register(recurrences_ntl.generate_action(env)) gcceso_dict[tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o"].generate_action(env).dep_register(recurrences_zn_poly.generate_action(env)) except KeyError: pass #Link parition C file if needed dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/combinat/partitions.o", partitions_c.outfile) #Setup dependencies for parition if needed try: gcceso_dict[tempdir+"/devel/sage/build/temp/sage/combinat/partitions.o"].generate_action(env).dep_register(mwrankcc.generate_action(env)) except KeyError: pass #If we are building planarity, then we should link the C extensions into the planarity shared object if pyx_ext_dict.has_key('devel/sage/sage/graphs/planarity.pyx'): for x in planarity_ext: dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/graphs/planarity.o",x.outfile) #Make output directorys in site-packages if they don't already exist for gcceso in gcceso_dict.values(): try: os.makedirs(gcceso.get_out_dir()) except: pass gccesoaction = gcceso.generate_action(env) gccesoaction.enable() if verbose>10: print 'Copying *.py files' #Copy all python files to site-packages for filenm in cacheinfo[0]: if os.path.splitext(filenm)[1]==".py": filepart = (os.path.split(filenm)[0]) newdir = env.options['SAGE_ROOT'] + '/devel/sage/build/sage/' + filepart.replace('devel/sage/sage','') filename = os.path.split(filenm)[1] if filename[0]=='.': continue safemkdirs(newdir) cmd = 'cp %s %s/%s' % (filenm, newdir, filename) if verbose>30: print cmd os.system( cmd ) #Setup the site-packages symlink if it doesn't already exist safesymlink('../../../../devel/sage/build/sage','local/lib/python/site-packages/sage') #Handle DSage safemkdirs('local/dsage') safesymlink('../../devel/sage/sage/dsage/web', 'local/dsage/web')
fe65cd75c7a4f55a6a103f7bd133aad2068a6574 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/fe65cd75c7a4f55a6a103f7bd133aad2068a6574/sagebuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10736, 410, 12, 3074, 16, 314, 952, 71, 4672, 3536, 1220, 445, 6013, 10736, 272, 410, 3536, 27435, 273, 1562, 4181, 18, 22903, 468, 1077, 1039, 279, 666, 434, 777, 2395, 92, 1390, 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, 10736, 410, 12, 3074, 16, 314, 952, 71, 4672, 3536, 1220, 445, 6013, 10736, 272, 410, 3536, 27435, 273, 1562, 4181, 18, 22903, 468, 1077, 1039, 279, 666, 434, 777, 2395, 92, 1390, 316, ...
attempt, methodname, str(e,args))
attempt, methodname, str(e.args))
def callWrapper(self, protocol, port, methodname, authToken, args): """ Returns a tuple of (usedAnonymous, Exception, result). usedAnonymous is a Boolean stating whether the operation was performed as the anonymous user (due to a failure w/ the passed authToken). Exception is a Boolean stating whether an error occured. """
5765f0a4cb36e6f32881db6d6c47100449eebe96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/5765f0a4cb36e6f32881db6d6c47100449eebe96/netserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 3611, 12, 2890, 16, 1771, 16, 1756, 16, 707, 529, 16, 24050, 16, 833, 4672, 3536, 2860, 279, 3193, 434, 261, 3668, 18792, 16, 1185, 16, 563, 2934, 1399, 18792, 353, 279, 3411, 610...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 3611, 12, 2890, 16, 1771, 16, 1756, 16, 707, 529, 16, 24050, 16, 833, 4672, 3536, 2860, 279, 3193, 434, 261, 3668, 18792, 16, 1185, 16, 563, 2934, 1399, 18792, 353, 279, 3411, 610...
self.tk.call(self._w, 'item', 'delete', entry, col)
self.tk.call(self._w, 'item', 'delete', entry, col)
def item_delete(self, entry, col):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 761, 67, 3733, 12, 2890, 16, 1241, 16, 645, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 761, 67, 3733, 12, 2890, 16, 1241, 16, 645, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
for entry in self.entries:
for entry in self:
def count_new (self): counter = 0 for entry in self.entries: if entry.is_new: counter += 1 return counter
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, 1056, 67, 2704, 261, 2890, 4672, 3895, 273, 374, 364, 1241, 316, 365, 30, 309, 1241, 18, 291, 67, 2704, 30, 3895, 1011, 404, 327, 3895, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1056, 67, 2704, 261, 2890, 4672, 3895, 273, 374, 364, 1241, 316, 365, 30, 309, 1241, 18, 291, 67, 2704, 30, 3895, 1011, 404, 327, 3895, 225, 2, -100, -100, -100, -100, -100, -100, -100...
updateService = session.getUpdateService();
def attachArrayToImage(updateService, image, file, nameSpace): """ Attach an array, stored as a csv file to an image. @param updateService The updateService to create the annotation link. @param image The image to attach the data to. @param filename The name of the file. @param namespace The namespace of the file. """ updateService = session.getUpdateService(); fa = omero.model.FileAnnotationI(); fa.setFile(file); fa.setNs(omero.rtypes.rstring(nameSpace)) l = omero.model.ImageAnnotationLinkI(); l.setParent(image); l.setChild(fa); l = updateService.saveAndReturnObject(l);
08781ea68d3dd27bb2aeac94d373095edd6ca82c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/08781ea68d3dd27bb2aeac94d373095edd6ca82c/script_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3306, 1076, 774, 2040, 12, 2725, 1179, 16, 1316, 16, 585, 16, 508, 3819, 4672, 3536, 8659, 392, 526, 16, 4041, 487, 279, 6101, 585, 358, 392, 1316, 18, 632, 891, 1089, 1179, 1021, 1089...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3306, 1076, 774, 2040, 12, 2725, 1179, 16, 1316, 16, 585, 16, 508, 3819, 4672, 3536, 8659, 392, 526, 16, 4041, 487, 279, 6101, 585, 358, 392, 1316, 18, 632, 891, 1089, 1179, 1021, 1089...
writePackage(content) writePackages(compiledPackages[1:], 1)
self.writePackage(content, script) self.writePackages(compiledPackages[1:], script, 1)
def writePackage(content, packageId=""): # Construct file name resolvedFilePath = self._resolveFileName(filePath, variants, settings, packageId)
f3814ff7d05377a66a4c5fc9e9babe3a2fcbb84b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/f3814ff7d05377a66a4c5fc9e9babe3a2fcbb84b/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 2261, 12, 1745, 16, 2181, 548, 1546, 6, 4672, 468, 14291, 585, 508, 4640, 5598, 273, 365, 6315, 10828, 4771, 12, 22787, 16, 12935, 16, 1947, 16, 2181, 548, 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, 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, 1045, 2261, 12, 1745, 16, 2181, 548, 1546, 6, 4672, 468, 14291, 585, 508, 4640, 5598, 273, 365, 6315, 10828, 4771, 12, 22787, 16, 12935, 16, 1947, 16, 2181, 548, 13, 2, -100, -100, -10...
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.
787dd81bef999c292e440a1785519b813acdc488 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/787dd81bef999c292e440a1785519b813acdc488/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...
def __recvall(self, bytes): """__recvall(bytes) -> data
def __recvall(self, count): """__recvall(count) -> data
def __recvall(self, bytes): """__recvall(bytes) -> data Receive EXACTLY the number of bytes requested from the socket. Blocks until the required number of bytes have been received. """ data = "" while len(data) < bytes: d = self.recv(bytes-len(data)) if not d: raise GeneralProxyError("connection closed unexpectedly") data = data + d return data
b2ddf409815564ff2aef6a6dcddee52f011d5b06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9386/b2ddf409815564ff2aef6a6dcddee52f011d5b06/socks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 18334, 454, 12, 2890, 16, 1056, 4672, 3536, 972, 18334, 454, 12, 1883, 13, 317, 501, 17046, 5675, 6526, 7076, 326, 1300, 434, 1731, 3764, 628, 326, 2987, 18, 22713, 3180, 326, 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, 1001, 18334, 454, 12, 2890, 16, 1056, 4672, 3536, 972, 18334, 454, 12, 1883, 13, 317, 501, 17046, 5675, 6526, 7076, 326, 1300, 434, 1731, 3764, 628, 326, 2987, 18, 22713, 3180, 326, 1931...
if getattr(form, extractData, None):
if getattr(form, "extractData", None):
def validate_input(self, formname, fieldname, fieldset=None, value=None): """Given a form (view) name, a field name and the submitted value, validate the given field. """
b94f4b0efbf7eccce9df567c769ea85b5c6d9a75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12252/b94f4b0efbf7eccce9df567c769ea85b5c6d9a75/validation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2630, 12, 2890, 16, 646, 529, 16, 14680, 16, 16885, 33, 7036, 16, 460, 33, 7036, 4672, 3536, 6083, 279, 646, 261, 1945, 13, 508, 16, 279, 652, 508, 471, 326, 9638, 460, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2630, 12, 2890, 16, 646, 529, 16, 14680, 16, 16885, 33, 7036, 16, 460, 33, 7036, 4672, 3536, 6083, 279, 646, 261, 1945, 13, 508, 16, 279, 652, 508, 471, 326, 9638, 460, 16,...
"""[private helper method for use by DisplistChunk]
""" [private helper method for use by DisplistChunk]
def ensure_dlist_ready_to_call( self, dlist_owner_1 ): #e rename the local vars, revise term "owner" in it [070102 cmt] """[private helper method for use by DisplistChunk] This implements the recursive algorithm described in DisplistChunk.__doc__. dlist_owner_1 should be a DisplistOwner ###term; we use private attrs and/or methods of that class, including _key, _recompile_if_needed_and_return_sublists_dict(). What we do: make sure that dlist_owner_1's display list can be safely called (executed) right after we return, with all displists that will call (directly or indirectly) up to date (in their content). Note that, in general, we won't know which displists will be called by a given one until after we've updated its content (and thereby compiled calls to those displists as part of its content). Assume we are only called when our GL context is current and we're not presently compiling a displist in it. """ ###e verify our GL context is current, or make it so; not needed now since only called during some widget's draw call assert self.compiling_displist == 0 toscan = { dlist_owner_1._key : dlist_owner_1 } def collector( obj1, dict1): dlist_owner = obj1 direct_sublists_dict = dlist_owner._recompile_if_needed_and_return_sublists_dict() # [renamed from _ensure_self_updated] # This says to dlist_owner: if your list is invalid, recompile it (and set your flag saying it's valid); # then you know your direct sublists, so we can ask you to return them. # Note: it only has to include sublists whose drawing effects might be invalid. # This means, if its own effects are valid, it can optim by just returning {}. # [#e Someday it might maintain a dict of invalid sublists and return that. Right now it returns none or all of them.] # Note: during that call, the glpane (self) is modified to know which dlist_owner's list is being compiled. dict1.update( direct_sublists_dict ) seen = transclose( toscan, collector ) # now, for each dlist_owner we saw, tell it its drawing effects are valid. for dlist_owner in seen.itervalues(): dlist_owner._your_drawing_effects_are_valid() # Q: this resets flags which cause inval propogation... does it retain consistency? # A: it does it in reverse logic dir and reverse arrow dir (due to transclose) as inval prop, so it's ok. # Note: that comment won't be understandable in a month [from 070102]. Need to explain it better. ####doc return
9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 67, 72, 1098, 67, 1672, 67, 869, 67, 1991, 12, 365, 16, 302, 1098, 67, 8443, 67, 21, 262, 30, 468, 73, 6472, 326, 1191, 4153, 16, 5588, 784, 2481, 315, 8443, 6, 316, 518, 306...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 67, 72, 1098, 67, 1672, 67, 869, 67, 1991, 12, 365, 16, 302, 1098, 67, 8443, 67, 21, 262, 30, 468, 73, 6472, 326, 1191, 4153, 16, 5588, 784, 2481, 315, 8443, 6, 316, 518, 306...
name = current_thread().get_name()
name = current_thread().name
def _writerThread(self, d, howMany, writerNum): name = current_thread().get_name() start = howMany * writerNum stop = howMany * (writerNum + 1) - 1 if verbose: print("%s: creating records %d - %d" % (name, start, stop))
8215b77b3c5060e898e5fd23b1340edcc225871c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/8215b77b3c5060e898e5fd23b1340edcc225871c/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6299, 3830, 12, 2890, 16, 302, 16, 3661, 5594, 16, 2633, 2578, 4672, 508, 273, 783, 67, 5930, 7675, 529, 787, 273, 3661, 5594, 380, 2633, 2578, 2132, 273, 3661, 5594, 380, 261, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6299, 3830, 12, 2890, 16, 302, 16, 3661, 5594, 16, 2633, 2578, 4672, 508, 273, 783, 67, 5930, 7675, 529, 787, 273, 3661, 5594, 380, 2633, 2578, 2132, 273, 3661, 5594, 380, 261, 62...
if self.Mosaic.__class__.__name__ == "OWMosaicOptimization": self.Mosaic.useTimeLimit = 1
def __init__(self, mosaic, data): self.Mosaic = mosaic
eb316246e2bfc8bb37046dcac9d47deffa628900 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/eb316246e2bfc8bb37046dcac9d47deffa628900/orngMosaic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 312, 27459, 16, 501, 4672, 365, 18, 49, 27459, 273, 312, 27459, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 312, 27459, 16, 501, 4672, 365, 18, 49, 27459, 273, 312, 27459, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
event=menuEventDict[menubarItem][itemName]
event = menuEventDict[menubarItem][itemName]
def ApplyKeybindings(self): "Update the keybindings after they are changed" # Called from configDialog.py self.Bindings.default_keydefs=idleConf.GetCurrentKeySet() self.apply_bindings() for extensionName in self.get_standard_extension_names(): keydefs = idleConf.GetExtensionBindings(extensionName) if keydefs: self.apply_bindings(keydefs) #update menu accelerators menuEventDict={} for menu in self.Bindings.menudefs: menuEventDict[menu[0]]={} for item in menu[1]: if item: menuEventDict[menu[0]][prepstr(item[0])[1]]=item[1] for menubarItem in self.menudict.keys(): menu=self.menudict[menubarItem] end=menu.index(END)+1 for index in range(0,end): if menu.type(index)=='command': accel=menu.entrycget(index,'accelerator') if accel: itemName=menu.entrycget(index,'label') event='' if menuEventDict.has_key(menubarItem): if menuEventDict[menubarItem].has_key(itemName): event=menuEventDict[menubarItem][itemName] if event: accel=get_accelerator(keydefs, event) menu.entryconfig(index,accelerator=accel)
5a67f9b815fdd34617395c6ec5d9a679361b76ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5a67f9b815fdd34617395c6ec5d9a679361b76ea/EditorWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5534, 653, 15863, 12, 2890, 4672, 315, 1891, 326, 498, 15863, 1839, 2898, 854, 3550, 6, 468, 11782, 628, 642, 6353, 18, 2074, 365, 18, 10497, 18, 1886, 67, 856, 12537, 33, 20390, 3976, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5534, 653, 15863, 12, 2890, 4672, 315, 1891, 326, 498, 15863, 1839, 2898, 854, 3550, 6, 468, 11782, 628, 642, 6353, 18, 2074, 365, 18, 10497, 18, 1886, 67, 856, 12537, 33, 20390, 3976, ...
globals()['funny$name'] = TestGlobalFunnyName
def __repr__(self): r""" Print a TestGlobalFunnyName.
a4aad1557cdf06ed8562711534ca467dff85c855 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/a4aad1557cdf06ed8562711534ca467dff85c855/explain_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 436, 8395, 3038, 279, 7766, 5160, 22783, 18538, 461, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12715, 972, 12, 2890, 4672, 436, 8395, 3038, 279, 7766, 5160, 22783, 18538, 461, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tcp_inactive_timeout = 6 tcp_server_precision = 6
tcp_server_timeout = 6 tcp_server_precision = 3
def async_net_continue (self, encoded): if ( encoded.startswith ('0:,') and not encoded.endswith ('0:,') ): # block commands and any contextual statement, # just close (without reporting the abuse to the # abuser, there is obviously no need for that ;-) # self.pns_error ('...') return # process anonymous statement "normally" PNS_session.async_net_continue (self, encoded) # # PNS/TCP public/private seeds are usefull for simplistic # user agents without access to PNS/UDP # # the reason for not allowing commands and contextual # statements from seed PNS/TCP user agents is to prevent # corruption of the peer's context map and index but also # inspection of its semantic graph. a public PNS/TCP service # must be safe for public use and only act as a filtering # proxy for disabled Internet peers that have no access to # the PNS/UDP network. The intended use of a PNS/TCP seed # is to filter public PNS feeds for a set of subscribed # PNS/UDP contexts and provide access to the service # persistent store as well as its subscription services. # But not to walk its semantic graph or make contextual # statements with authority.
f28d2b9030fc81b6c6ecf2ded8797d4cd09b01a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/f28d2b9030fc81b6c6ecf2ded8797d4cd09b01a3/pns_tcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4326, 67, 2758, 67, 17143, 261, 2890, 16, 3749, 4672, 309, 261, 3749, 18, 17514, 1918, 7707, 20, 30, 16, 6134, 471, 486, 3749, 18, 5839, 1918, 7707, 20, 30, 16, 6134, 262, 30, 468, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4326, 67, 2758, 67, 17143, 261, 2890, 16, 3749, 4672, 309, 261, 3749, 18, 17514, 1918, 7707, 20, 30, 16, 6134, 471, 486, 3749, 18, 5839, 1918, 7707, 20, 30, 16, 6134, 262, 30, 468, 1...